platforms.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. return integrations;
  33. })
  34. .flat();
  35. const platforms = sortBy(platformIntegrations, 'id');
  36. export default platforms;