config.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import {User} from './user';
  2. export function Config(params = {}) {
  3. return {
  4. theme: 'light',
  5. user: User(),
  6. messages: [],
  7. languageCode: 'en',
  8. csrfCookieName: 'csrf-test-cookie',
  9. superUserCookieName: 'su-test-cookie',
  10. superUserCookieDomain: '.sentry.io',
  11. features: new Set(),
  12. singleOrganization: false,
  13. urlPrefix: 'https://sentry-jest-tests.example.com/',
  14. needsUpgrade: false,
  15. supportEmail: 'support@sentry.io',
  16. invitesEnabled: false,
  17. privacyUrl: null,
  18. termsUrl: null,
  19. // Maintain isOnPremise key for backcompat (plugins?).
  20. isOnPremise: false,
  21. isSelfHosted: false,
  22. lastOrganization: null,
  23. gravatarBaseUrl: 'https://gravatar.com',
  24. dsn: 'test-dsn',
  25. userIdentity: {
  26. ip_address: '127.0.0.1',
  27. email: 'example@example.com',
  28. id: '1',
  29. isStaff: false,
  30. },
  31. isAuthenticated: true,
  32. version: {
  33. current: '1.0.0-dev',
  34. latest: '1.0.0-dev',
  35. build: 'test-build',
  36. upgradeAvailable: false,
  37. },
  38. sentryConfig: {
  39. dsn: 'test-dsn',
  40. release: '1.0.0.-dev',
  41. whitelistUrls: [],
  42. },
  43. distPrefix: '',
  44. apmSampling: 1,
  45. dsn_requests: '',
  46. demoMode: false,
  47. customerDomain: {
  48. subdomain: 'foobar',
  49. organizationUrl: 'https://foobar.sentry.io',
  50. sentryUrl: 'https://sentry.io',
  51. },
  52. links: {
  53. sentryUrl: 'https://sentry.io',
  54. organizationUrl: 'https://foobar.sentry.io',
  55. regionUrl: 'https://us.sentry.io',
  56. },
  57. ...params,
  58. };
  59. }