config.js 1.6 KB

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