platformPickerCategories.tsx 3.7 KB

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