config.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. allowUrls: [],
  42. tracePropagationTargets: [],
  43. },
  44. distPrefix: '',
  45. apmSampling: 1,
  46. dsn_requests: '',
  47. demoMode: false,
  48. customerDomain: {
  49. subdomain: 'foobar',
  50. organizationUrl: 'https://foobar.sentry.io',
  51. sentryUrl: 'https://sentry.io',
  52. },
  53. links: {
  54. sentryUrl: 'https://sentry.io',
  55. organizationUrl: 'https://foobar.sentry.io',
  56. regionUrl: 'https://us.sentry.io',
  57. },
  58. ...params,
  59. };
  60. }