platforms.tsx 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import integrationDocsPlatforms from 'integration-docs-platforms';
  2. import sortBy from 'lodash/sortBy';
  3. import {t} from 'sentry/locale';
  4. import {PlatformIntegration} from 'sentry/types';
  5. import {tracing} from './platformCategories';
  6. const otherPlatform = {
  7. integrations: [
  8. {
  9. link: 'https://docs.sentry.io/platforms/',
  10. type: 'language',
  11. id: 'other',
  12. name: t('Other'),
  13. },
  14. ],
  15. id: 'other',
  16. name: t('Other'),
  17. };
  18. const platformIntegrations: PlatformIntegration[] = [
  19. ...integrationDocsPlatforms.platforms,
  20. otherPlatform,
  21. ]
  22. .map(platform => {
  23. const integrations = platform.integrations
  24. .map(i => ({...i, language: platform.id} as PlatformIntegration))
  25. // filter out any tracing platforms; as they're not meant to be used as a platform for
  26. // the project creation flow
  27. .filter(integration => !(tracing as readonly string[]).includes(integration.id))
  28. // filter out any performance onboarding documentation
  29. .filter(integration => !integration.id.includes('performance-onboarding'))
  30. // filter out any replay onboarding documentation
  31. .filter(integration => !integration.id.includes('replay-onboarding'))
  32. // filter out any profiling onboarding documentation
  33. .filter(integration => !integration.id.includes('profiling-onboarding'));
  34. return integrations;
  35. })
  36. .flat();
  37. const platforms = sortBy(platformIntegrations, 'id');
  38. export default platforms;