platformPickerCategories.tsx 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. import {t} from 'sentry/locale';
  2. import type {PlatformKey} from 'sentry/types/project';
  3. const popularPlatformCategories: Set<PlatformKey> = new Set([
  4. 'android',
  5. 'apple-ios',
  6. 'dotnet',
  7. 'dotnet-aspnetcore',
  8. 'flutter',
  9. 'go',
  10. 'java',
  11. 'java-spring-boot',
  12. 'javascript',
  13. 'javascript-angular',
  14. 'javascript-nextjs',
  15. 'javascript-react',
  16. 'javascript-vue',
  17. 'node',
  18. 'node-express',
  19. 'node-nestjs',
  20. 'php',
  21. 'php-laravel',
  22. 'python',
  23. 'python-django',
  24. 'python-fastapi',
  25. 'python-flask',
  26. 'react-native',
  27. 'ruby-rails',
  28. 'ruby',
  29. 'unity',
  30. ]);
  31. const browser: Set<PlatformKey> = new Set([
  32. 'dart',
  33. 'javascript',
  34. 'javascript-angular',
  35. 'javascript-astro',
  36. 'javascript-ember',
  37. 'javascript-gatsby',
  38. 'javascript-nextjs',
  39. 'javascript-react',
  40. 'javascript-remix',
  41. 'javascript-solid',
  42. 'javascript-solidstart',
  43. 'javascript-svelte',
  44. 'javascript-sveltekit',
  45. 'javascript-vue',
  46. 'javascript-nuxt',
  47. 'unity',
  48. ]);
  49. const server: Set<PlatformKey> = new Set([
  50. 'bun',
  51. 'deno',
  52. 'dotnet',
  53. 'dotnet-aspnet',
  54. 'dotnet-aspnetcore',
  55. 'elixir',
  56. 'go',
  57. 'go-http',
  58. 'go-echo',
  59. 'go-fasthttp',
  60. 'go-fiber',
  61. 'go-gin',
  62. 'go-iris',
  63. 'go-negroni',
  64. 'java',
  65. 'java-log4j2',
  66. 'java-logback',
  67. 'java-spring',
  68. 'java-spring-boot',
  69. 'kotlin',
  70. 'native',
  71. 'node',
  72. 'node-connect',
  73. 'node-express',
  74. 'node-fastify',
  75. 'node-hapi',
  76. 'node-koa',
  77. 'node-nestjs',
  78. 'php',
  79. 'php-laravel',
  80. 'php-symfony',
  81. 'powershell',
  82. 'python',
  83. 'python-aiohttp',
  84. 'python-asgi',
  85. 'python-bottle',
  86. 'python-celery',
  87. 'python-chalice',
  88. 'python-django',
  89. 'python-falcon',
  90. 'python-fastapi',
  91. 'python-flask',
  92. 'python-pyramid',
  93. 'python-quart',
  94. 'python-rq',
  95. 'python-sanic',
  96. 'python-starlette',
  97. 'python-tornado',
  98. 'python-tryton',
  99. 'python-wsgi',
  100. 'ruby',
  101. 'ruby-rack',
  102. 'ruby-rails',
  103. 'rust',
  104. ]);
  105. const mobile: Set<PlatformKey> = new Set([
  106. 'android',
  107. 'apple-ios',
  108. 'capacitor',
  109. 'cordova',
  110. 'dotnet-maui',
  111. 'dotnet-xamarin',
  112. 'flutter',
  113. 'ionic',
  114. 'react-native',
  115. 'unity',
  116. 'unreal',
  117. ]);
  118. const desktop: Set<PlatformKey> = new Set([
  119. 'apple-macos',
  120. 'dotnet',
  121. 'dotnet-maui',
  122. 'dotnet-winforms',
  123. 'dotnet-wpf',
  124. 'electron',
  125. 'flutter',
  126. 'java',
  127. 'kotlin',
  128. 'minidump',
  129. 'native',
  130. 'native-qt',
  131. 'unity',
  132. 'unreal',
  133. ]);
  134. const serverless: Set<PlatformKey> = new Set([
  135. 'dotnet-awslambda',
  136. 'dotnet-gcpfunctions',
  137. 'node-awslambda',
  138. 'node-azurefunctions',
  139. 'node-gcpfunctions',
  140. 'python-awslambda',
  141. 'python-gcpfunctions',
  142. 'python-serverless',
  143. ]);
  144. export const createablePlatforms: Set<PlatformKey> = new Set([
  145. ...popularPlatformCategories,
  146. ...browser,
  147. ...server,
  148. ...mobile,
  149. ...desktop,
  150. ...serverless,
  151. ]);
  152. /**
  153. * Additional aliases used for filtering in the platform picker
  154. */
  155. export const filterAliases: Partial<Record<PlatformKey, string[]>> = {
  156. native: ['cpp', 'c++'],
  157. };
  158. const categoryList = [
  159. {id: 'popular', name: t('Popular'), platforms: popularPlatformCategories},
  160. {id: 'browser', name: t('Browser'), platforms: browser},
  161. {id: 'server', name: t('Server'), platforms: server},
  162. {id: 'mobile', name: t('Mobile'), platforms: mobile},
  163. {id: 'desktop', name: t('Desktop'), platforms: desktop},
  164. {id: 'serverless', name: t('Serverless'), platforms: serverless},
  165. {
  166. id: 'all',
  167. name: t('All'),
  168. platforms: createablePlatforms,
  169. },
  170. ];
  171. export default categoryList;
  172. // TODO(aknaus): Drop in favour of PlatformIntegration
  173. export type Platform = {
  174. key: PlatformKey;
  175. id?: string;
  176. link?: string | null;
  177. name?: string;
  178. };