platforms.tsx 1.2 KB

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