@sentry/wizard 4.5.0 → 4.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (293) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/README.md +23 -19
  3. package/dist/bin.js +22 -0
  4. package/dist/bin.js.map +1 -1
  5. package/dist/e2e-tests/tests/flutter.test.js +16 -16
  6. package/dist/e2e-tests/tests/flutter.test.js.map +1 -1
  7. package/dist/e2e-tests/tests/help-message.test.js +56 -0
  8. package/dist/e2e-tests/tests/help-message.test.js.map +1 -0
  9. package/dist/e2e-tests/tests/nextjs-14.test.js +17 -16
  10. package/dist/e2e-tests/tests/nextjs-14.test.js.map +1 -1
  11. package/dist/e2e-tests/tests/nextjs-15.test.js +16 -16
  12. package/dist/e2e-tests/tests/nextjs-15.test.js.map +1 -1
  13. package/dist/e2e-tests/tests/nuxt-3.test.js +13 -12
  14. package/dist/e2e-tests/tests/nuxt-3.test.js.map +1 -1
  15. package/dist/e2e-tests/tests/nuxt-4.test.js +13 -12
  16. package/dist/e2e-tests/tests/nuxt-4.test.js.map +1 -1
  17. package/dist/e2e-tests/tests/remix.test.js +20 -20
  18. package/dist/e2e-tests/tests/remix.test.js.map +1 -1
  19. package/dist/e2e-tests/tests/sveltekit.test.js +20 -20
  20. package/dist/e2e-tests/tests/sveltekit.test.js.map +1 -1
  21. package/dist/e2e-tests/utils/index.d.ts +1 -1
  22. package/dist/e2e-tests/utils/index.js +35 -13
  23. package/dist/e2e-tests/utils/index.js.map +1 -1
  24. package/dist/lib/Constants.d.ts +7 -1
  25. package/dist/lib/Constants.js.map +1 -1
  26. package/dist/lib/Helper/File.d.ts +1 -1
  27. package/dist/lib/Helper/File.js +1 -3
  28. package/dist/lib/Helper/File.js.map +1 -1
  29. package/dist/lib/Helper/Logging.d.ts +4 -1
  30. package/dist/lib/Helper/Logging.js +3 -0
  31. package/dist/lib/Helper/Logging.js.map +1 -1
  32. package/dist/lib/Helper/Package.d.ts +5 -3
  33. package/dist/lib/Helper/Package.js +2 -2
  34. package/dist/lib/Helper/Package.js.map +1 -1
  35. package/dist/lib/Helper/SentryCli.d.ts +20 -7
  36. package/dist/lib/Helper/SentryCli.js +21 -13
  37. package/dist/lib/Helper/SentryCli.js.map +1 -1
  38. package/dist/lib/Helper/Wizard.js +9 -5
  39. package/dist/lib/Helper/Wizard.js.map +1 -1
  40. package/dist/lib/Helper/__tests__/File.js +9 -9
  41. package/dist/lib/Helper/__tests__/File.js.map +1 -1
  42. package/dist/lib/Helper/__tests__/MergeConfig.js +17 -17
  43. package/dist/lib/Helper/__tests__/MergeConfig.js.map +1 -1
  44. package/dist/lib/Helper/__tests__/SentryCli.js +39 -21
  45. package/dist/lib/Helper/__tests__/SentryCli.js.map +1 -1
  46. package/dist/lib/Setup.d.ts +4 -1
  47. package/dist/lib/Setup.js +12 -2
  48. package/dist/lib/Setup.js.map +1 -1
  49. package/dist/lib/Steps/BaseStep.d.ts +1 -1
  50. package/dist/lib/Steps/BaseStep.js.map +1 -1
  51. package/dist/lib/Steps/Integrations/BaseIntegration.js +1 -2
  52. package/dist/lib/Steps/Integrations/BaseIntegration.js.map +1 -1
  53. package/dist/lib/Steps/Integrations/Cordova.js +14 -10
  54. package/dist/lib/Steps/Integrations/Cordova.js.map +1 -1
  55. package/dist/lib/Steps/Integrations/Electron.d.ts +4 -1
  56. package/dist/lib/Steps/Integrations/Electron.js +1 -1
  57. package/dist/lib/Steps/Integrations/Electron.js.map +1 -1
  58. package/dist/lib/Steps/Integrations/MobileProject.d.ts +3 -1
  59. package/dist/lib/Steps/Integrations/MobileProject.js +1 -1
  60. package/dist/lib/Steps/Integrations/MobileProject.js.map +1 -1
  61. package/dist/lib/Steps/PromptForParameters.d.ts +4 -1
  62. package/dist/lib/Steps/PromptForParameters.js.map +1 -1
  63. package/dist/lib/Steps/SentryProjectSelector.d.ts +42 -1
  64. package/dist/lib/Steps/SentryProjectSelector.js +1 -1
  65. package/dist/lib/Steps/SentryProjectSelector.js.map +1 -1
  66. package/dist/lib/Steps/WaitForSentry.d.ts +3 -1
  67. package/dist/lib/Steps/WaitForSentry.js +4 -4
  68. package/dist/lib/Steps/WaitForSentry.js.map +1 -1
  69. package/dist/lib/Steps/Welcome.js +5 -0
  70. package/dist/lib/Steps/Welcome.js.map +1 -1
  71. package/dist/lib/Types.d.ts +14 -0
  72. package/dist/lib/Types.js +3 -0
  73. package/dist/lib/Types.js.map +1 -0
  74. package/dist/lib/__tests__/Env.js +10 -16
  75. package/dist/lib/__tests__/Env.js.map +1 -1
  76. package/dist/src/android/android-wizard.js +15 -12
  77. package/dist/src/android/android-wizard.js.map +1 -1
  78. package/dist/src/android/code-tools.js +1 -1
  79. package/dist/src/android/code-tools.js.map +1 -1
  80. package/dist/src/android/gradle.js +4 -4
  81. package/dist/src/android/gradle.js.map +1 -1
  82. package/dist/src/android/manifest.js +1 -1
  83. package/dist/src/android/manifest.js.map +1 -1
  84. package/dist/src/apple/apple-wizard.d.ts +2 -2
  85. package/dist/src/apple/apple-wizard.js +54 -175
  86. package/dist/src/apple/apple-wizard.js.map +1 -1
  87. package/dist/src/apple/check-installed-cli.d.ts +1 -0
  88. package/dist/src/apple/check-installed-cli.js +60 -0
  89. package/dist/src/apple/check-installed-cli.js.map +1 -0
  90. package/dist/src/apple/cocoapod.js +1 -1
  91. package/dist/src/apple/cocoapod.js.map +1 -1
  92. package/dist/src/apple/code-tools.js +1 -1
  93. package/dist/src/apple/code-tools.js.map +1 -1
  94. package/dist/src/apple/configure-fastlane.d.ts +5 -0
  95. package/dist/src/apple/configure-fastlane.js +66 -0
  96. package/dist/src/apple/configure-fastlane.js.map +1 -0
  97. package/dist/src/apple/configure-package-manager.d.ts +5 -0
  98. package/dist/src/apple/configure-package-manager.js +68 -0
  99. package/dist/src/apple/configure-package-manager.js.map +1 -0
  100. package/dist/src/apple/configure-sentry-cli.d.ts +4 -0
  101. package/dist/src/apple/configure-sentry-cli.js +47 -0
  102. package/dist/src/apple/configure-sentry-cli.js.map +1 -0
  103. package/dist/src/apple/configure-xcode-project.d.ts +8 -0
  104. package/dist/src/apple/configure-xcode-project.js +11 -0
  105. package/dist/src/apple/configure-xcode-project.js.map +1 -0
  106. package/dist/src/apple/fastlane.d.ts +1 -1
  107. package/dist/src/apple/fastlane.js +5 -5
  108. package/dist/src/apple/fastlane.js.map +1 -1
  109. package/dist/src/apple/inject-code-snippet.d.ts +6 -0
  110. package/dist/src/apple/inject-code-snippet.js +54 -0
  111. package/dist/src/apple/inject-code-snippet.js.map +1 -0
  112. package/dist/src/apple/lookup-xcode-project.d.ts +7 -0
  113. package/dist/src/apple/lookup-xcode-project.js +98 -0
  114. package/dist/src/apple/lookup-xcode-project.js.map +1 -0
  115. package/dist/src/apple/options.d.ts +4 -0
  116. package/dist/src/apple/options.js +3 -0
  117. package/dist/src/apple/options.js.map +1 -0
  118. package/dist/src/apple/search-xcode-project-at-path.d.ts +1 -0
  119. package/dist/src/apple/search-xcode-project-at-path.js +70 -0
  120. package/dist/src/apple/search-xcode-project-at-path.js.map +1 -0
  121. package/dist/src/apple/templates.js +11 -7
  122. package/dist/src/apple/templates.js.map +1 -1
  123. package/dist/src/apple/xcode-manager.js +4 -7
  124. package/dist/src/apple/xcode-manager.js.map +1 -1
  125. package/dist/src/flutter/code-tools.js +3 -3
  126. package/dist/src/flutter/code-tools.js.map +1 -1
  127. package/dist/src/flutter/flutter-wizard.js +21 -15
  128. package/dist/src/flutter/flutter-wizard.js.map +1 -1
  129. package/dist/src/flutter/templates.js +4 -4
  130. package/dist/src/flutter/templates.js.map +1 -1
  131. package/dist/src/nextjs/nextjs-wizard.js +118 -43
  132. package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
  133. package/dist/src/nextjs/templates.d.ts +10 -1
  134. package/dist/src/nextjs/templates.js +192 -62
  135. package/dist/src/nextjs/templates.js.map +1 -1
  136. package/dist/src/nuxt/nuxt-wizard.js +21 -16
  137. package/dist/src/nuxt/nuxt-wizard.js.map +1 -1
  138. package/dist/src/nuxt/sdk-example.js +3 -3
  139. package/dist/src/nuxt/sdk-example.js.map +1 -1
  140. package/dist/src/nuxt/sdk-setup.js +9 -9
  141. package/dist/src/nuxt/sdk-setup.js.map +1 -1
  142. package/dist/src/nuxt/templates.js +173 -58
  143. package/dist/src/nuxt/templates.js.map +1 -1
  144. package/dist/src/nuxt/utils.js +6 -3
  145. package/dist/src/nuxt/utils.js.map +1 -1
  146. package/dist/src/react-native/expo-env-file.js +1 -1
  147. package/dist/src/react-native/expo-env-file.js.map +1 -1
  148. package/dist/src/react-native/expo-metro.js +4 -4
  149. package/dist/src/react-native/expo-metro.js.map +1 -1
  150. package/dist/src/react-native/expo.js +4 -4
  151. package/dist/src/react-native/expo.js.map +1 -1
  152. package/dist/src/react-native/javascript.d.ts +6 -4
  153. package/dist/src/react-native/javascript.js +31 -15
  154. package/dist/src/react-native/javascript.js.map +1 -1
  155. package/dist/src/react-native/metro.js +8 -8
  156. package/dist/src/react-native/metro.js.map +1 -1
  157. package/dist/src/react-native/react-native-wizard.d.ts +5 -1
  158. package/dist/src/react-native/react-native-wizard.js +66 -36
  159. package/dist/src/react-native/react-native-wizard.js.map +1 -1
  160. package/dist/src/react-native/uninstall.js +8 -5
  161. package/dist/src/react-native/uninstall.js.map +1 -1
  162. package/dist/src/react-native/xcode.d.ts +9 -4
  163. package/dist/src/react-native/xcode.js +65 -22
  164. package/dist/src/react-native/xcode.js.map +1 -1
  165. package/dist/src/remix/codemods/handle-error.js +4 -1
  166. package/dist/src/remix/codemods/handle-error.js.map +1 -1
  167. package/dist/src/remix/remix-wizard.js +23 -18
  168. package/dist/src/remix/remix-wizard.js.map +1 -1
  169. package/dist/src/remix/sdk-example.js +163 -64
  170. package/dist/src/remix/sdk-example.js.map +1 -1
  171. package/dist/src/remix/sdk-setup.js +11 -7
  172. package/dist/src/remix/sdk-setup.js.map +1 -1
  173. package/dist/src/run.d.ts +3 -1
  174. package/dist/src/run.js +29 -9
  175. package/dist/src/run.js.map +1 -1
  176. package/dist/src/sourcemaps/sourcemaps-wizard.js +30 -28
  177. package/dist/src/sourcemaps/sourcemaps-wizard.js.map +1 -1
  178. package/dist/src/sourcemaps/tools/angular.js +3 -3
  179. package/dist/src/sourcemaps/tools/angular.js.map +1 -1
  180. package/dist/src/sourcemaps/tools/create-react-app.js +3 -3
  181. package/dist/src/sourcemaps/tools/create-react-app.js.map +1 -1
  182. package/dist/src/sourcemaps/tools/esbuild.js +6 -6
  183. package/dist/src/sourcemaps/tools/esbuild.js.map +1 -1
  184. package/dist/src/sourcemaps/tools/nextjs.js +5 -5
  185. package/dist/src/sourcemaps/tools/nextjs.js.map +1 -1
  186. package/dist/src/sourcemaps/tools/remix.js +4 -4
  187. package/dist/src/sourcemaps/tools/remix.js.map +1 -1
  188. package/dist/src/sourcemaps/tools/rollup.js +6 -6
  189. package/dist/src/sourcemaps/tools/rollup.js.map +1 -1
  190. package/dist/src/sourcemaps/tools/sentry-cli.js +15 -15
  191. package/dist/src/sourcemaps/tools/sentry-cli.js.map +1 -1
  192. package/dist/src/sourcemaps/tools/tsc.js +6 -6
  193. package/dist/src/sourcemaps/tools/tsc.js.map +1 -1
  194. package/dist/src/sourcemaps/tools/vite.js +12 -12
  195. package/dist/src/sourcemaps/tools/vite.js.map +1 -1
  196. package/dist/src/sourcemaps/tools/webpack.js +10 -10
  197. package/dist/src/sourcemaps/tools/webpack.js.map +1 -1
  198. package/dist/src/sourcemaps/utils/detect-tool.js +2 -2
  199. package/dist/src/sourcemaps/utils/detect-tool.js.map +1 -1
  200. package/dist/src/sourcemaps/utils/other-wizards.js +5 -5
  201. package/dist/src/sourcemaps/utils/other-wizards.js.map +1 -1
  202. package/dist/src/sourcemaps/utils/sdk-version.js +7 -7
  203. package/dist/src/sourcemaps/utils/sdk-version.js.map +1 -1
  204. package/dist/src/sveltekit/sdk-example.js +1 -1
  205. package/dist/src/sveltekit/sdk-example.js.map +1 -1
  206. package/dist/src/sveltekit/sdk-setup.js +15 -14
  207. package/dist/src/sveltekit/sdk-setup.js.map +1 -1
  208. package/dist/src/sveltekit/sveltekit-wizard.js +25 -20
  209. package/dist/src/sveltekit/sveltekit-wizard.js.map +1 -1
  210. package/dist/src/sveltekit/templates.js +126 -37
  211. package/dist/src/sveltekit/templates.js.map +1 -1
  212. package/dist/src/telemetry.js +11 -0
  213. package/dist/src/telemetry.js.map +1 -1
  214. package/dist/src/utils/{clack-utils.d.ts → clack/index.d.ts} +45 -7
  215. package/dist/src/utils/{clack-utils.js → clack/index.js} +75 -20
  216. package/dist/src/utils/clack/index.js.map +1 -0
  217. package/dist/src/utils/debug.js +1 -1
  218. package/dist/src/utils/debug.js.map +1 -1
  219. package/dist/src/utils/find-files-with-extension.d.ts +1 -0
  220. package/dist/src/utils/find-files-with-extension.js +39 -0
  221. package/dist/src/utils/find-files-with-extension.js.map +1 -0
  222. package/dist/src/utils/package-manager.d.ts +8 -1
  223. package/dist/src/utils/package-manager.js +79 -23
  224. package/dist/src/utils/package-manager.js.map +1 -1
  225. package/dist/src/utils/sentrycli-utils.js +0 -1
  226. package/dist/src/utils/sentrycli-utils.js.map +1 -1
  227. package/dist/src/utils/types.d.ts +4 -0
  228. package/dist/src/utils/types.js.map +1 -1
  229. package/dist/src/version.d.ts +1 -1
  230. package/dist/src/version.js +1 -1
  231. package/dist/src/version.js.map +1 -1
  232. package/dist/test/android/code-tools.test.js +13 -13
  233. package/dist/test/android/code-tools.test.js.map +1 -1
  234. package/dist/test/apple/cocoapod.test.js +78 -73
  235. package/dist/test/apple/cocoapod.test.js.map +1 -1
  236. package/dist/test/apple/code-tools.test.js +174 -167
  237. package/dist/test/apple/code-tools.test.js.map +1 -1
  238. package/dist/test/apple/fastfile.test.js +87 -84
  239. package/dist/test/apple/fastfile.test.js.map +1 -1
  240. package/dist/test/apple/templates.test.js +32 -27
  241. package/dist/test/apple/templates.test.js.map +1 -1
  242. package/dist/test/apple/xcode-manager.test.js +208 -185
  243. package/dist/test/apple/xcode-manager.test.js.map +1 -1
  244. package/dist/test/flutter/code-tools.test.js +29 -30
  245. package/dist/test/flutter/code-tools.test.js.map +1 -1
  246. package/dist/test/flutter/templates.test.js +38 -37
  247. package/dist/test/flutter/templates.test.js.map +1 -1
  248. package/dist/test/nextjs/templates.test.js +155 -103
  249. package/dist/test/nextjs/templates.test.js.map +1 -1
  250. package/dist/test/nuxt/templates.test.js +25 -24
  251. package/dist/test/nuxt/templates.test.js.map +1 -1
  252. package/dist/test/react-native/expo-metro.test.js +12 -11
  253. package/dist/test/react-native/expo-metro.test.js.map +1 -1
  254. package/dist/test/react-native/expo.test.js +11 -10
  255. package/dist/test/react-native/expo.test.js.map +1 -1
  256. package/dist/test/react-native/gradle.test.js +27 -26
  257. package/dist/test/react-native/gradle.test.js.map +1 -1
  258. package/dist/test/react-native/javascript.test.js +109 -59
  259. package/dist/test/react-native/javascript.test.js.map +1 -1
  260. package/dist/test/react-native/metro.test.js +66 -65
  261. package/dist/test/react-native/metro.test.js.map +1 -1
  262. package/dist/test/react-native/xcode.test.js +138 -37
  263. package/dist/test/react-native/xcode.test.js.map +1 -1
  264. package/dist/test/remix/client-entry.test.js +8 -7
  265. package/dist/test/remix/client-entry.test.js.map +1 -1
  266. package/dist/test/remix/server-instrumentation.test.js +6 -5
  267. package/dist/test/remix/server-instrumentation.test.js.map +1 -1
  268. package/dist/test/sourcemaps/tools/sentry-cli.test.js +21 -21
  269. package/dist/test/sourcemaps/tools/sentry-cli.test.js.map +1 -1
  270. package/dist/test/sourcemaps/tools/tsc.test.js +13 -14
  271. package/dist/test/sourcemaps/tools/tsc.test.js.map +1 -1
  272. package/dist/test/sourcemaps/tools/vite.test.js +13 -14
  273. package/dist/test/sourcemaps/tools/vite.test.js.map +1 -1
  274. package/dist/test/sourcemaps/tools/webpack.test.js +19 -20
  275. package/dist/test/sourcemaps/tools/webpack.test.js.map +1 -1
  276. package/dist/test/sveltekit/templates.test.js +13 -12
  277. package/dist/test/sveltekit/templates.test.js.map +1 -1
  278. package/dist/test/utils/ast-utils.test.js +45 -44
  279. package/dist/test/utils/ast-utils.test.js.map +1 -1
  280. package/dist/test/utils/clack/index.test.d.ts +1 -0
  281. package/dist/test/utils/clack/index.test.js +375 -0
  282. package/dist/test/utils/clack/index.test.js.map +1 -0
  283. package/dist/test/utils/package-manager.test.d.ts +1 -0
  284. package/dist/test/utils/package-manager.test.js +30 -0
  285. package/dist/test/utils/package-manager.test.js.map +1 -0
  286. package/package.json +10 -38
  287. package/dist/e2e-tests/jest.config.d.ts +0 -17
  288. package/dist/e2e-tests/jest.config.js +0 -23
  289. package/dist/e2e-tests/jest.config.js.map +0 -1
  290. package/dist/src/utils/clack-utils.js.map +0 -1
  291. package/dist/test/utils/clack-utils.test.js +0 -306
  292. package/dist/test/utils/clack-utils.test.js.map +0 -1
  293. /package/dist/{test/utils/clack-utils.test.d.ts → e2e-tests/tests/help-message.test.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.7.0
4
+
5
+ - feat: Add `deno` as a package manager ([#905](https://github.com/getsentry/sentry-wizard/pull/905))
6
+ - feat(nextjs): Add `onRouterTransitionStart` to client instrumentation template ([#938](https://github.com/getsentry/sentry-wizard/pull/938))
7
+ - feat(cocoa): Update snippets to use new UI Profiling configureation ([#933](https://github.com/getsentry/sentry-wizard/pull/933))
8
+ - fix(react-native): Handles xcode build phase patching failure ([#866](https://github.com/getsentry/sentry-wizard/pull/866))
9
+ - feat(react-native): Add a Session Replay step ([#915](https://github.com/getsentry/sentry-wizard/pull/915))
10
+
11
+ ## 4.6.0
12
+
13
+ - feat(nextjs): Switch to injecting `instrumentation-client.ts` ([#918](https://github.com/getsentry/sentry-wizard/pull/918))
14
+ - feat(remix): New Remix example page ([#917](https://github.com/getsentry/sentry-wizard/pull/917))
15
+ - feat(nuxt): New Nuxt example page ([#916](https://github.com/getsentry/sentry-wizard/pull/916))
16
+ - feat(sveltekit): New Sveltekit example page ([#913](https://github.com/getsentry/sentry-wizard/pull/913))
17
+ - feat(nextjs): New NextJS example page ([#899](https://github.com/getsentry/sentry-wizard/pull/899))
18
+ - feat(telemetry): Add `is_binary` tag to distinguish fossilized binaries ([#857](https://github.com/getsentry/sentry-wizard/pull/857))
19
+ - fix(utils): Bail package manager detection if multiple candidates are detected ([#864](https://github.com/getsentry/sentry-wizard/pull/864))
20
+ - fix(nextjs): Create root layout for example page if it doesn't exist([#863](https://github.com/getsentry/sentry-wizard/pull/863))
21
+ - ref(utils): Unify `getPackageManger` and `detectPackageManager` ([#865](https://github.com/getsentry/sentry-wizard/pull/865))
22
+ - feat: add option to ignore git changes ([#898](https://github.com/getsentry/sentry-wizard/pull/898))
23
+ - fix(apple): Add additional types to `xcode.d.ts` ([#900](https://github.com/getsentry/sentry-wizard/pull/900))
24
+ - fix: enable debug logs for option `--debug` ([#902](https://github.com/getsentry/sentry-wizard/pull/902))
25
+
3
26
  ## 4.5.0
4
27
 
5
28
  - feat(nextjs): Remove react component annotation prompt and insertion ([#858](https://github.com/getsentry/sentry-wizard/pull/858))
@@ -16,8 +39,9 @@
16
39
  - feat(deps): Bump axios from 1.7.4 to 1.8.2 ([#844](https://github.com/getsentry/sentry-wizard/pull/844))
17
40
  - feat(sourcemaps): Remove NextJS and Remix flows from sourcemaps wizard ([#849](https://github.com/getsentry/sentry-wizard/pull/849))
18
41
 
19
- The NextJS and Remix flows have been removed when running the wizard with `npx @sentry/wizard -i sourcemaps`.
42
+ The NextJS and Remix flows have been removed when running the wizard with `npx @sentry/wizard -i sourcemaps`.
20
43
  Please use `npx @sentry/wizard -i nextjs` and `npx @sentry/wizard -i remix` instead.
44
+
21
45
  - ref: Reword Replay feature selection ([#847](https://github.com/getsentry/sentry-wizard/pull/847))
22
46
  - ref: Fix auth token env variable wording in flutter and apple wizards ([#853](https://github.com/getsentry/sentry-wizard/pull/853))
23
47
 
package/README.md CHANGED
@@ -48,30 +48,34 @@ yarn sentry-wizard
48
48
  npx @sentry/wizard
49
49
  ```
50
50
 
51
- At the current moment, the wizard can be used for Next.js, react-native, iOS, Flutter, Nuxt, Remix, Sveltekit, Android, Electron, Cordova, and for sourcemaps setup. If you have other platforms you would like the wizard to support, please open a [GitHub issue](https://github.com/getsentry/sentry-wizard/issues)!
51
+ At the current moment, the wizard can be used for Next.js, react-native, iOS,
52
+ Flutter, Nuxt, Remix, Sveltekit, Android, Electron, Cordova, and for sourcemaps
53
+ setup. If you have other platforms you would like the wizard to support, please
54
+ open a [GitHub issue](https://github.com/getsentry/sentry-wizard/issues)!
52
55
 
53
56
  # Options
54
57
 
55
58
  The following CLI arguments are available:
56
59
 
57
- | Option | Description | Type | Default | Choices | Environment Variable |
58
- | --------------------- | ----------------------------------------------------------------- | ------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
59
- | `--help` | Show help | boolean | | | |
60
- | `--version` | Show version number | boolean | | | |
61
- | `--debug` | Enable verbose logging | boolean | `false` | | `SENTRY_WIZARD_DEBUG` |
62
- | `--uninstall` | Revert project setup process. Not available for all integrations. | boolean | `false` | | `SENTRY_WIZARD_UNINSTALL` |
63
- | `--skip-connect` | Skips the connection to the server | boolean | `false` | | `SENTRY_WIZARD_SKIP_CONNECT` |
64
- | `--quiet` | Do not fallback to prompting user asking questions | boolean | `false` | | `SENTRY_WIZARD_QUIET` |
65
- | `-i, --integration` | Choose the integration to setup | choices | Select integration during setup | "reactNative", "flutter", ios", "android", "cordova", "electron", "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps" | `SENTRY_WIZARD_INTEGRATION` |
66
- | `-p, --platform` | Choose platform(s) | array | Select platform(s) during setup | "ios", "android" | `SENTRY_WIZARD_PLATFORM` |
67
- | `-u, --url` | The URL to your Sentry installation | string | `https://sentry.io` | | `SENTRY_WIZARD_URL` |
68
- | `--project` | The Sentry project slug to use | string | Select project during setup | | |
69
- | `--org` | The Sentry org slug to use | string | Select org during setup | | |
70
- | `--saas` | Skip the self-hosted or SaaS URL selection process | boolean | Select self-hosted or SaaS during setup | | |
71
- | `-s, --signup` | Redirect to signup page if not logged in | boolean | `false` | | |
72
- | `--disable-telemetry` | Don't send telemetry data to Sentry | boolean | `false` | | |
73
- | `--force-install` | Force install the SDK NPM package (use with caution!) | boolean | `false` | | |
74
- | `--coming-from` | Specify the partner organization initiating this command. | string | | | |
60
+ | Option | Description | Type | Default | Choices | Environment Variable |
61
+ | ---------------------- | ----------------------------------------------------------------- | ------- | --------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------- |
62
+ | `--help` | Show help | boolean | | | |
63
+ | `--version` | Show version number | boolean | | | |
64
+ | `--debug` | Enable verbose logging | boolean | `false` | | `SENTRY_WIZARD_DEBUG` |
65
+ | `--uninstall` | Revert project setup process. Not available for all integrations. | boolean | `false` | | `SENTRY_WIZARD_UNINSTALL` |
66
+ | `--skip-connect` | Skips the connection to the server | boolean | `false` | | `SENTRY_WIZARD_SKIP_CONNECT` |
67
+ | `--quiet` | Do not fallback to prompting user asking questions | boolean | `false` | | `SENTRY_WIZARD_QUIET` |
68
+ | `-i, --integration` | Choose the integration to setup | choices | Select integration during setup | "reactNative", "flutter", ios", "android", "cordova", "electron", "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps" | `SENTRY_WIZARD_INTEGRATION` |
69
+ | `-p, --platform` | Choose platform(s) | array | Select platform(s) during setup | "ios", "android" | `SENTRY_WIZARD_PLATFORM` |
70
+ | `-u, --url` | The URL to your Sentry installation | string | `https://sentry.io` | | `SENTRY_WIZARD_URL` |
71
+ | `--project` | The Sentry project slug to use | string | Select project during setup | | |
72
+ | `--org` | The Sentry org slug to use | string | Select org during setup | | |
73
+ | `--saas` | Skip the self-hosted or SaaS URL selection process | boolean | Select self-hosted or SaaS during setup | | |
74
+ | `-s, --signup` | Redirect to signup page if not logged in | boolean | `false` | | |
75
+ | `--disable-telemetry` | Don't send telemetry data to Sentry | boolean | `false` | | |
76
+ | `--force-install` | Force install the SDK NPM package (use with caution!) | boolean | `false` | | |
77
+ | `--coming-from` | Specify the partner organization initiating this command. | string | | | |
78
+ | `--ignore-git-changes` | Ignore git changes in the project and not prompt for confirmation | boolean | `false` | | |
75
79
 
76
80
  ## Resources
77
81
 
package/dist/bin.js CHANGED
@@ -36,32 +36,48 @@ __exportStar(require("./lib/Setup"), exports);
36
36
  const PRESELECTED_PROJECT_OPTIONS = {
37
37
  'preSelectedProject.authToken': {
38
38
  describe: 'Preselected project auth token',
39
+ hidden: true,
39
40
  },
40
41
  'preSelectedProject.selfHosted': {
41
42
  describe: 'Preselected project is self-hosted',
43
+ hidden: true,
42
44
  },
43
45
  'preSelectedProject.dsn': {
44
46
  describe: 'Preselected project DSN',
47
+ hidden: true,
45
48
  },
46
49
  'preSelectedProject.id': {
47
50
  describe: 'Preselected project id',
51
+ hidden: true,
48
52
  },
49
53
  'preSelectedProject.projectSlug': {
50
54
  describe: 'Preselected project slug',
55
+ hidden: true,
51
56
  },
52
57
  'preSelectedProject.projectName': {
53
58
  describe: 'Preselected project name',
59
+ hidden: true,
54
60
  },
55
61
  'preSelectedProject.orgId': {
56
62
  describe: 'Preselected organization id',
63
+ hidden: true,
57
64
  },
58
65
  'preSelectedProject.orgName': {
59
66
  describe: 'Preselected organization name',
67
+ hidden: true,
60
68
  },
61
69
  'preSelectedProject.orgSlug': {
62
70
  describe: 'Preselected organization slug',
71
+ hidden: true,
63
72
  },
64
73
  };
74
+ const xcodeProjectDirOption = {
75
+ default: undefined,
76
+ describe: 'Path to the project containing the Xcode project file. Only applies to the Apple wizard.',
77
+ type: 'string',
78
+ // This is a hidden option because it is used as an internal option
79
+ hidden: true,
80
+ };
65
81
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
66
82
  const argv = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv), process.cwd())
67
83
  .options({
@@ -139,6 +155,12 @@ const argv = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv), process.
139
155
  describe: 'Force install the SDK NPM package',
140
156
  type: 'boolean',
141
157
  },
158
+ 'ignore-git-changes': {
159
+ default: false,
160
+ describe: 'Ignore git changes in the project',
161
+ type: 'boolean',
162
+ },
163
+ 'xcode-project-dir': xcodeProjectDirOption,
142
164
  ...PRESELECTED_PROJECT_OPTIONS,
143
165
  })
144
166
  // This prevents `yargs` from trying to read the local package.json
package/dist/bin.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,mCAAmC;AACnC,kDAA2C;AAE3C,kDAA0B;AAC1B,2CAAwC;AAExC,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAEvC,iFAAiF;AACjF,+BAA+B;AAC/B,IAAI,CAAC,IAAA,kBAAS,EAAC,OAAO,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE;IACnD,IAAA,aAAG,EACD,kCAAkC,kBAAkB,2BAA2B,OAAO,CAAC,OAAO,wCAAwC,CACvI,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACjB;AAED,+CAAwD;AACxD,mCAAgC;AAChC,2CAA+C;AAE/C,8CAA4B;AAE5B,MAAM,2BAA2B,GAAG;IAClC,8BAA8B,EAAE;QAC9B,QAAQ,EAAE,gCAAgC;KAC3C;IACD,+BAA+B,EAAE;QAC/B,QAAQ,EAAE,oCAAoC;KAC/C;IACD,wBAAwB,EAAE;QACxB,QAAQ,EAAE,yBAAyB;KACpC;IACD,uBAAuB,EAAE;QACvB,QAAQ,EAAE,wBAAwB;KACnC;IACD,gCAAgC,EAAE;QAChC,QAAQ,EAAE,0BAA0B;KACrC;IACD,gCAAgC,EAAE;QAChC,QAAQ,EAAE,0BAA0B;KACrC;IACD,0BAA0B,EAAE;QAC1B,QAAQ,EAAE,6BAA6B;KACxC;IACD,4BAA4B,EAAE;QAC5B,QAAQ,EAAE,+BAA+B;KAC1C;IACD,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J,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,oDAAoD;QAC9D,kBAAkB,EAAE,yCAAyC;QAC7D,IAAI,EAAE,SAAS;KAChB;IACD,CAAC,EAAE;QACD,KAAK,EAAE,QAAQ;QACf,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,0CAA0C;QACpD,IAAI,EAAE,SAAS;KAChB;IACD,mBAAmB,EAAE;QACnB,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,qCAAqC;QAC/C,IAAI,EAAE,SAAS;KAChB;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,iDAAiD;QAC3D,IAAI,EAAE,QAAQ;KACf;IACD,eAAe,EAAE;QACf,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,mCAAmC;QAC7C,IAAI,EAAE,SAAS;KAChB;IACD,GAAG,2BAA2B;CAC/B,CAAC;IACF,mEAAmE;IACnE,gFAAgF;KAC/E,OAAO,CAAC,wBAAc,CAAC,CAAC,IAAI,CAAC;AAEhC,0FAA0F;AAC1F,sFAAsF;AACtF,mEAAmE;AACnE,KAAK,IAAA,SAAG,EAAC,IAAI,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { satisfies } from 'semver';\nimport { red } from './lib/Helper/Logging';\n\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\n\nconst NODE_VERSION_RANGE = '>=18.20.0';\n\n// Have to run this above the other imports because they are importing clack that\n// has the problematic imports.\nif (!satisfies(process.version, NODE_VERSION_RANGE)) {\n red(\n `Sentry wizard requires Node.js ${NODE_VERSION_RANGE}. You are using Node.js ${process.version}. Please upgrade your Node.js version.`,\n );\n process.exit(1);\n}\n\nimport { Integration, Platform } from './lib/Constants';\nimport { run } from './src/run';\nimport { WIZARD_VERSION } from './src/version';\n\nexport * from './lib/Setup';\n\nconst PRESELECTED_PROJECT_OPTIONS = {\n 'preSelectedProject.authToken': {\n describe: 'Preselected project auth token',\n },\n 'preSelectedProject.selfHosted': {\n describe: 'Preselected project is self-hosted',\n },\n 'preSelectedProject.dsn': {\n describe: 'Preselected project DSN',\n },\n 'preSelectedProject.id': {\n describe: 'Preselected project id',\n },\n 'preSelectedProject.projectSlug': {\n describe: 'Preselected project slug',\n },\n 'preSelectedProject.projectName': {\n describe: 'Preselected project name',\n },\n 'preSelectedProject.orgId': {\n describe: 'Preselected organization id',\n },\n 'preSelectedProject.orgName': {\n describe: 'Preselected organization name',\n },\n 'preSelectedProject.orgSlug': {\n describe: 'Preselected organization slug',\n },\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\nconst argv = yargs(hideBin(process.argv), process.cwd())\n .options({\n debug: {\n default: false,\n describe: 'Enable verbose logging\\nenv: SENTRY_WIZARD_DEBUG',\n type: 'boolean',\n },\n uninstall: {\n default: false,\n describe: 'Revert project setup process\\nenv: SENTRY_WIZARD_UNINSTALL',\n type: 'boolean',\n },\n 'skip-connect': {\n default: false,\n describe:\n 'Skips the connection to the server\\nenv: SENTRY_WIZARD_SKIP_CONNECT',\n type: 'boolean',\n },\n quiet: {\n default: false,\n describe:\n 'Do not fallback to prompting user asking questions\\nenv: SENTRY_WIZARD_QUIET',\n type: 'boolean',\n },\n i: {\n alias: 'integration',\n choices: Object.keys(Integration),\n describe:\n 'Choose the integration to setup\\nenv: SENTRY_WIZARD_INTEGRATION',\n },\n p: {\n alias: 'platform',\n choices: Object.keys(Platform),\n describe: 'Choose platform(s)\\nenv: SENTRY_WIZARD_PLATFORM',\n type: 'array',\n },\n u: {\n alias: 'url',\n describe: 'The url to your Sentry installation\\nenv: SENTRY_WIZARD_URL',\n },\n project: {\n type: 'string',\n describe: 'The Sentry project slug to use',\n defaultDescription: 'Select project during setup',\n default: undefined,\n },\n org: {\n type: 'string',\n describe: 'The Sentry org slug to use',\n defaultDescription: 'Select org during setup',\n default: undefined,\n },\n saas: {\n default: false,\n describe: 'Skip the self-hosted or SaaS URL selection process',\n defaultDescription: 'Select self-hosted or SaaS during setup',\n type: 'boolean',\n },\n s: {\n alias: 'signup',\n default: false,\n describe: 'Redirect to signup page if not logged in',\n type: 'boolean',\n },\n 'disable-telemetry': {\n default: false,\n describe: \"Don't send telemetry data to Sentry\",\n type: 'boolean',\n },\n 'promo-code': {\n alias: 'promo-code',\n describe: 'A promo code that will be applied during signup',\n type: 'string',\n },\n 'force-install': {\n default: false,\n describe: 'Force install the SDK NPM package',\n type: 'boolean',\n },\n ...PRESELECTED_PROJECT_OPTIONS,\n })\n // This prevents `yargs` from trying to read the local package.json\n // as it's not available in the Node Single Executable Binary artifacts versions\n .version(WIZARD_VERSION).argv;\n\n// @ts-expect-error - for some reason TS doesn't recognize the aliases as valid properties\n// meaning it only knows e.g. u but not url. Maybe a bug in this old version of yargs?\n// Can't upgrade yargs though without dropping support for Node 14.\nvoid run(argv);\n"]}
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,mCAAmC;AACnC,kDAA2C;AAE3C,kDAA0B;AAC1B,2CAAwC;AAExC,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAEvC,iFAAiF;AACjF,+BAA+B;AAC/B,IAAI,CAAC,IAAA,kBAAS,EAAC,OAAO,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE;IACnD,IAAA,aAAG,EACD,kCAAkC,kBAAkB,2BAA2B,OAAO,CAAC,OAAO,wCAAwC,CACvI,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;CACjB;AAED,+CAAwD;AACxD,mCAAgC;AAChC,2CAA+C;AAE/C,8CAA4B;AAE5B,MAAM,2BAA2B,GAAkC;IACjE,8BAA8B,EAAE;QAC9B,QAAQ,EAAE,gCAAgC;QAC1C,MAAM,EAAE,IAAI;KACb;IACD,+BAA+B,EAAE;QAC/B,QAAQ,EAAE,oCAAoC;QAC9C,MAAM,EAA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,EAAE,mCAAmC;QAC7C,IAAI,EAAE,SAAS;KAChB;IACD,mBAAmB,EAAE,qBAAqB;IAC1C,GAAG,2BAA2B;CAC/B,CAAC;IACF,mEAAmE;IACnE,gFAAgF;KAC/E,OAAO,CAAC,wBAAc,CAAC,CAAC,IAAI,CAAC;AAEhC,0FAA0F;AAC1F,sFAAsF;AACtF,mEAAmE;AACnE,KAAK,IAAA,SAAG,EAAC,IAAI,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { satisfies } from 'semver';\nimport { red } from './lib/Helper/Logging';\n\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\n\nconst NODE_VERSION_RANGE = '>=18.20.0';\n\n// Have to run this above the other imports because they are importing clack that\n// has the problematic imports.\nif (!satisfies(process.version, NODE_VERSION_RANGE)) {\n red(\n `Sentry wizard requires Node.js ${NODE_VERSION_RANGE}. You are using Node.js ${process.version}. Please upgrade your Node.js version.`,\n );\n process.exit(1);\n}\n\nimport { Integration, Platform } from './lib/Constants';\nimport { run } from './src/run';\nimport { WIZARD_VERSION } from './src/version';\n\nexport * from './lib/Setup';\n\nconst PRESELECTED_PROJECT_OPTIONS: Record<string, yargs.Options> = {\n 'preSelectedProject.authToken': {\n describe: 'Preselected project auth token',\n hidden: true,\n },\n 'preSelectedProject.selfHosted': {\n describe: 'Preselected project is self-hosted',\n hidden: true,\n },\n 'preSelectedProject.dsn': {\n describe: 'Preselected project DSN',\n hidden: true,\n },\n 'preSelectedProject.id': {\n describe: 'Preselected project id',\n hidden: true,\n },\n 'preSelectedProject.projectSlug': {\n describe: 'Preselected project slug',\n hidden: true,\n },\n 'preSelectedProject.projectName': {\n describe: 'Preselected project name',\n hidden: true,\n },\n 'preSelectedProject.orgId': {\n describe: 'Preselected organization id',\n hidden: true,\n },\n 'preSelectedProject.orgName': {\n describe: 'Preselected organization name',\n hidden: true,\n },\n 'preSelectedProject.orgSlug': {\n describe: 'Preselected organization slug',\n hidden: true,\n },\n};\nconst xcodeProjectDirOption: yargs.Options = {\n default: undefined,\n describe:\n 'Path to the project containing the Xcode project file. Only applies to the Apple wizard.',\n type: 'string',\n // This is a hidden option because it is used as an internal option\n hidden: true,\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\nconst argv = yargs(hideBin(process.argv), process.cwd())\n .options({\n debug: {\n default: false,\n describe: 'Enable verbose logging\\nenv: SENTRY_WIZARD_DEBUG',\n type: 'boolean',\n },\n uninstall: {\n default: false,\n describe: 'Revert project setup process\\nenv: SENTRY_WIZARD_UNINSTALL',\n type: 'boolean',\n },\n 'skip-connect': {\n default: false,\n describe:\n 'Skips the connection to the server\\nenv: SENTRY_WIZARD_SKIP_CONNECT',\n type: 'boolean',\n },\n quiet: {\n default: false,\n describe:\n 'Do not fallback to prompting user asking questions\\nenv: SENTRY_WIZARD_QUIET',\n type: 'boolean',\n },\n i: {\n alias: 'integration',\n choices: Object.keys(Integration),\n describe:\n 'Choose the integration to setup\\nenv: SENTRY_WIZARD_INTEGRATION',\n },\n p: {\n alias: 'platform',\n choices: Object.keys(Platform),\n describe: 'Choose platform(s)\\nenv: SENTRY_WIZARD_PLATFORM',\n type: 'array',\n },\n u: {\n alias: 'url',\n describe: 'The url to your Sentry installation\\nenv: SENTRY_WIZARD_URL',\n },\n project: {\n type: 'string',\n describe: 'The Sentry project slug to use',\n defaultDescription: 'Select project during setup',\n default: undefined,\n },\n org: {\n type: 'string',\n describe: 'The Sentry org slug to use',\n defaultDescription: 'Select org during setup',\n default: undefined,\n },\n saas: {\n default: false,\n describe: 'Skip the self-hosted or SaaS URL selection process',\n defaultDescription: 'Select self-hosted or SaaS during setup',\n type: 'boolean',\n },\n s: {\n alias: 'signup',\n default: false,\n describe: 'Redirect to signup page if not logged in',\n type: 'boolean',\n },\n 'disable-telemetry': {\n default: false,\n describe: \"Don't send telemetry data to Sentry\",\n type: 'boolean',\n },\n 'promo-code': {\n alias: 'promo-code',\n describe: 'A promo code that will be applied during signup',\n type: 'string',\n },\n 'force-install': {\n default: false,\n describe: 'Force install the SDK NPM package',\n type: 'boolean',\n },\n 'ignore-git-changes': {\n default: false,\n describe: 'Ignore git changes in the project',\n type: 'boolean',\n },\n 'xcode-project-dir': xcodeProjectDirOption,\n ...PRESELECTED_PROJECT_OPTIONS,\n })\n // This prevents `yargs` from trying to read the local package.json\n // as it's not available in the Node Single Executable Binary artifacts versions\n .version(WIZARD_VERSION).argv;\n\n// @ts-expect-error - for some reason TS doesn't recognize the aliases as valid properties\n// meaning it only knows e.g. u but not url. Maybe a bug in this old version of yargs?\n// Can't upgrade yargs though without dropping support for Node 14.\nvoid run(argv);\n"]}
@@ -25,16 +25,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const fs = __importStar(require("node:fs"));
27
27
  const path = __importStar(require("node:path"));
28
- /* eslint-disable jest/expect-expect */
29
28
  const Constants_1 = require("../../lib/Constants");
30
29
  const utils_1 = require("../utils");
31
30
  const utils_2 = require("../utils");
32
31
  const utils_3 = require("../utils");
33
- describe('Flutter', () => {
32
+ const vitest_1 = require("vitest");
33
+ (0, vitest_1.describe)('Flutter', () => {
34
34
  const integration = Constants_1.Integration.flutter;
35
35
  const projectDir = path.resolve(__dirname, '../test-applications/flutter-test-app');
36
- describe('with apple platforms', () => {
37
- beforeAll(async () => {
36
+ (0, vitest_1.describe)('with apple platforms', () => {
37
+ (0, vitest_1.beforeAll)(async () => {
38
38
  const wizardInstance = (0, utils_2.startWizardInstance)(integration, projectDir);
39
39
  const tracingOptionPrompted = await wizardInstance.waitForOutput(
40
40
  // "Do you want to enable Tracing", sometimes doesn't work as `Tracing` can be printed in bold.
@@ -47,35 +47,35 @@ describe('Flutter', () => {
47
47
  (await wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.ENTER], 'Successfully installed the Sentry Flutter SDK!'));
48
48
  wizardInstance.kill();
49
49
  });
50
- afterAll(() => {
50
+ (0, vitest_1.afterAll)(() => {
51
51
  (0, utils_1.revertLocalChanges)(projectDir);
52
52
  (0, utils_1.cleanupGit)(projectDir);
53
53
  });
54
- test('pubspec.yaml is updated.', () => {
54
+ (0, vitest_1.test)('pubspec.yaml is updated.', () => {
55
55
  (0, utils_3.checkFileContents)(`${projectDir}/pubspec.yaml`, `sentry_flutter:`); // dependencies
56
56
  (0, utils_3.checkFileContents)(`${projectDir}/pubspec.yaml`, `sentry_dart_plugin:`); // dev_dependencies
57
57
  (0, utils_3.checkFileContents)(`${projectDir}/pubspec.yaml`, `sentry:`); // gradle plugin options
58
58
  });
59
- test('sentry.properties exists and has auth token', () => {
59
+ (0, vitest_1.test)('sentry.properties exists and has auth token', () => {
60
60
  (0, utils_3.checkSentryProperties)(projectDir);
61
61
  });
62
- test('.gitignore has sentry.properties', () => {
62
+ (0, vitest_1.test)('.gitignore has sentry.properties', () => {
63
63
  (0, utils_3.checkFileContents)(`${projectDir}/.gitignore`, `sentry.properties`);
64
64
  });
65
- test('lib/main.dart calls sentry init', () => {
65
+ (0, vitest_1.test)('lib/main.dart calls sentry init', () => {
66
66
  (0, utils_3.checkFileContents)(`${projectDir}/lib/main.dart`, `import 'package:sentry_flutter/sentry_flutter.dart';`);
67
67
  (0, utils_3.checkFileContents)(`${projectDir}/lib/main.dart`, `await SentryFlutter.init(`);
68
68
  });
69
- test('lib/main.dart enables tracing and profiling', () => {
69
+ (0, vitest_1.test)('lib/main.dart enables tracing and profiling', () => {
70
70
  (0, utils_3.checkFileContents)(`${projectDir}/lib/main.dart`, `options.tracesSampleRate = 1.0;`);
71
71
  (0, utils_3.checkFileContents)(`${projectDir}/lib/main.dart`, `options.profilesSampleRate = 1.0;`);
72
72
  });
73
- test('builds correctly', async () => {
73
+ (0, vitest_1.test)('builds correctly', async () => {
74
74
  await (0, utils_3.checkIfFlutterBuilds)(projectDir, '✓ Built build/web');
75
75
  });
76
76
  });
77
- describe('without apple platforms', () => {
78
- beforeAll(async () => {
77
+ (0, vitest_1.describe)('without apple platforms', () => {
78
+ (0, vitest_1.beforeAll)(async () => {
79
79
  const wizardInstance = (0, utils_2.startWizardInstance)(integration, projectDir);
80
80
  if (fs.existsSync(`${projectDir}/ios`)) {
81
81
  fs.renameSync(`${projectDir}/ios`, `${projectDir}/_ios`);
@@ -92,13 +92,13 @@ describe('Flutter', () => {
92
92
  (await wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.ENTER], 'Successfully installed the Sentry Flutter SDK!'));
93
93
  wizardInstance.kill();
94
94
  });
95
- afterAll(() => {
95
+ (0, vitest_1.afterAll)(() => {
96
96
  (0, utils_1.revertLocalChanges)(projectDir);
97
97
  (0, utils_1.cleanupGit)(projectDir);
98
98
  });
99
- test('lib/main.dart does not add profiling with missing ios and macos folder', () => {
99
+ (0, vitest_1.test)('lib/main.dart does not add profiling with missing ios and macos folder', () => {
100
100
  const fileContent = fs.readFileSync(`${projectDir}/lib/main.dart`, 'utf-8');
101
- expect(fileContent).not.toContain(`options.profilesSampleRate = 1.0;`);
101
+ (0, vitest_1.expect)(fileContent).not.toContain(`options.profilesSampleRate = 1.0;`);
102
102
  });
103
103
  });
104
104
  });
@@ -1 +1 @@
1
- {"version":3,"file":"flutter.test.js","sourceRoot":"","sources":["../../../e2e-tests/tests/flutter.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA8B;AAC9B,gDAAkC;AAClC,uCAAuC;AACvC,mDAAkD;AAClD,oCAKkB;AAClB,oCAA+C;AAC/C,oCAKkB;AAElB,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,MAAM,WAAW,GAAG,uBAAW,CAAC,OAAO,CAAC;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAC7B,SAAS,EACT,uCAAuC,CACxC,CAAC;IAEF,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;QACpC,SAAS,CAAC,KAAK,IAAI,EAAE;YACnB,MA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YAAI,CAAC,KAAK,CAAC;gBACZ,+FAA+F;gBAC/F,+CAA+C,CAC9C,CAAC,CAAC;YAEL,qBAAqB;gBACnB,CAAC,MAAM,cAAc,CAAC,yBAAyB,CAC7C,CAAC,YAAI,CAAC,KAAK,CAAC,EACZ,gDAAgD,CACjD,CAAC,CAAC;YAEL,cAAc,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,GAAG,EAAE;YACZ,IAAA,0BAAkB,EAAC,UAAU,CAAC,CAAC;YAC/B,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,wEAAwE,EAAE,GAAG,EAAE;YAClF,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CAAC,GAAG,UAAU,gBAAgB,EAAE,OAAO,CAAC,CAAC;YAC5E,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import * as fs from 'node:fs';\nimport * as path from 'node:path';\n/* eslint-disable jest/expect-expect */\nimport { Integration } from '../../lib/Constants';\nimport {\n KEYS,\n // checkEnvBuildPlugin,\n cleanupGit,\n revertLocalChanges,\n} from '../utils';\nimport { startWizardInstance } from '../utils';\nimport {\n checkFileContents,\n checkIfFlutterBuilds,\n // checkFileExists,\n checkSentryProperties,\n} from '../utils';\n\ndescribe('Flutter', () => {\n const integration = Integration.flutter;\n const projectDir = path.resolve(\n __dirname,\n '../test-applications/flutter-test-app',\n );\n\n describe('with apple platforms', () => {\n beforeAll(async () => {\n const wizardInstance = startWizardInstance(integration, projectDir);\n\n const tracingOptionPrompted = await wizardInstance.waitForOutput(\n // \"Do you want to enable Tracing\", sometimes doesn't work as `Tracing` can be printed in bold.\n 'to track the performance of your application?',\n );\n\n const profilingOptionPrompted = tracingOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Profiling\", sometimes doesn't work as `Profiling` can be printed in bold.\n 'to analyze CPU usage and optimize performance-critical code on iOS & macOS?',\n ));\n\n profilingOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Successfully installed the Sentry Flutter SDK!',\n ));\n\n wizardInstance.kill();\n });\n\n afterAll(() => {\n revertLocalChanges(projectDir);\n cleanupGit(projectDir);\n });\n\n test('pubspec.yaml is updated.', () => {\n checkFileContents(`${projectDir}/pubspec.yaml`, `sentry_flutter:`); // dependencies\n checkFileContents(`${projectDir}/pubspec.yaml`, `sentry_dart_plugin:`); // dev_dependencies\n checkFileContents(`${projectDir}/pubspec.yaml`, `sentry:`); // gradle plugin options\n });\n\n test('sentry.properties exists and has auth token', () => {\n checkSentryProperties(projectDir);\n });\n\n test('.gitignore has sentry.properties', () => {\n checkFileContents(`${projectDir}/.gitignore`, `sentry.properties`);\n });\n\n test('lib/main.dart calls sentry init', () => {\n checkFileContents(`${projectDir}/lib/main.dart`, `import 'package:sentry_flutter/sentry_flutter.dart';`);\n checkFileContents(`${projectDir}/lib/main.dart`, `await SentryFlutter.init(`);\n });\n\n test('lib/main.dart enables tracing and profiling', () => {\n checkFileContents(`${projectDir}/lib/main.dart`, `options.tracesSampleRate = 1.0;`);\n checkFileContents(`${projectDir}/lib/main.dart`, `options.profilesSampleRate = 1.0;`);\n });\n\n test('builds correctly', async () => {\n await checkIfFlutterBuilds(projectDir, '✓ Built build/web');\n });\n });\n\n describe('without apple platforms', () => {\n beforeAll(async () => {\n\n const wizardInstance = startWizardInstance(integration, projectDir);\n\n if (fs.existsSync(`${projectDir}/ios`)) {\n fs.renameSync(`${projectDir}/ios`, `${projectDir}/_ios`);\n }\n if (fs.existsSync(`${projectDir}/macos`)) {\n fs.renameSync(`${projectDir}/macos`, `${projectDir}/_macos`);\n }\n\n const continueOnUncommitedFilesPromted = await wizardInstance.waitForOutput(\n 'Do you want to continue anyway?'\n )\n\n const tracingOptionPrompted = continueOnUncommitedFilesPromted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Tracing\", sometimes doesn't work as `Tracing` can be printed in bold.\n 'to track the performance of your application?',\n ));\n\n tracingOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Successfully installed the Sentry Flutter SDK!',\n ));\n\n wizardInstance.kill();\n });\n\n afterAll(() => {\n revertLocalChanges(projectDir);\n cleanupGit(projectDir);\n });\n\n test('lib/main.dart does not add profiling with missing ios and macos folder', () => {\n const fileContent = fs.readFileSync(`${projectDir}/lib/main.dart`, 'utf-8');\n expect(fileContent).not.toContain(`options.profilesSampleRate = 1.0;`);\n });\n });\n});\n"]}
1
+ {"version":3,"file":"flutter.test.js","sourceRoot":"","sources":["../../../e2e-tests/tests/flutter.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,4CAA8B;AAC9B,gDAAkC;AAClC,mDAAkD;AAClD,oCAKkB;AAClB,oCAA+C;AAC/C,oCAKkB;AAClB,mCAAqE;AAErE,IAAA,iBAAQ,EAAC,SAAS,EAAE,GAAG,EAAE;IACvB,MAAM,WAAW,GAAG,uBAAW,CAAC,OAAO,CAAC;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAC7B,SAAS,EACT,uCAAuC,CACxC,CAAC;IAEF,IAAA,iBAAQ,EAAC,sBAAsB,EAAE,GAAG,EAAE;QACpC,IAAA,kBAAS,EAAC,KAAK,IAAI,EAAE;YACnB,MAAM,cAAc,GAAG,IAAA,2BAAmB,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC;YAEpE,MAAM,qBAAqB,GAAG,MAAM,cAAc,CAAC,aAAa;YAC9D,+FAA+F;YAC/F,+CAA+C,CAChD,CAAC;YAEF,MAAM,uBAAuB,GAC3B,qBAAqB;gBACrB,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CAAC,KAAK,CAAC,EACZ,gDAAgD,CACjD,CAAC,CAAC;YAEL,cAAc,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,IAAA,iBAAQ,EAAC,GAAG,EAAE;YACZ,IAAA,0BAAkB,EAAC,UAAU,CAAC,CAAC;YAC/B,IAAA,kBAAU,EAAC,UAAU,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;QAEH,IAAA,aAAI,EAAC,wEAAwE,EAAE,GAAG,EAAE;YAClF,MAAM,WAAW,GAAG,EAAE,CAAC,YAAY,CACjC,GAAG,UAAU,gBAAgB,EAC7B,OAAO,CACR,CAAC;YACF,IAAA,eAAM,EAAC,WAAW,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,mCAAmC,CAAC,CAAC;QACzE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import * as fs from 'node:fs';\nimport * as path from 'node:path';\nimport { Integration } from '../../lib/Constants';\nimport {\n KEYS,\n // checkEnvBuildPlugin,\n cleanupGit,\n revertLocalChanges,\n} from '../utils';\nimport { startWizardInstance } from '../utils';\nimport {\n checkFileContents,\n checkIfFlutterBuilds,\n // checkFileExists,\n checkSentryProperties,\n} from '../utils';\nimport { afterAll, beforeAll, describe, expect, test } from 'vitest';\n\ndescribe('Flutter', () => {\n const integration = Integration.flutter;\n const projectDir = path.resolve(\n __dirname,\n '../test-applications/flutter-test-app',\n );\n\n describe('with apple platforms', () => {\n beforeAll(async () => {\n const wizardInstance = startWizardInstance(integration, projectDir);\n\n const tracingOptionPrompted = await wizardInstance.waitForOutput(\n // \"Do you want to enable Tracing\", sometimes doesn't work as `Tracing` can be printed in bold.\n 'to track the performance of your application?',\n );\n\n const profilingOptionPrompted =\n tracingOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Profiling\", sometimes doesn't work as `Profiling` can be printed in bold.\n 'to analyze CPU usage and optimize performance-critical code on iOS & macOS?',\n ));\n\n profilingOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Successfully installed the Sentry Flutter SDK!',\n ));\n\n wizardInstance.kill();\n });\n\n afterAll(() => {\n revertLocalChanges(projectDir);\n cleanupGit(projectDir);\n });\n\n test('pubspec.yaml is updated.', () => {\n checkFileContents(`${projectDir}/pubspec.yaml`, `sentry_flutter:`); // dependencies\n checkFileContents(`${projectDir}/pubspec.yaml`, `sentry_dart_plugin:`); // dev_dependencies\n checkFileContents(`${projectDir}/pubspec.yaml`, `sentry:`); // gradle plugin options\n });\n\n test('sentry.properties exists and has auth token', () => {\n checkSentryProperties(projectDir);\n });\n\n test('.gitignore has sentry.properties', () => {\n checkFileContents(`${projectDir}/.gitignore`, `sentry.properties`);\n });\n\n test('lib/main.dart calls sentry init', () => {\n checkFileContents(\n `${projectDir}/lib/main.dart`,\n `import 'package:sentry_flutter/sentry_flutter.dart';`,\n );\n checkFileContents(\n `${projectDir}/lib/main.dart`,\n `await SentryFlutter.init(`,\n );\n });\n\n test('lib/main.dart enables tracing and profiling', () => {\n checkFileContents(\n `${projectDir}/lib/main.dart`,\n `options.tracesSampleRate = 1.0;`,\n );\n checkFileContents(\n `${projectDir}/lib/main.dart`,\n `options.profilesSampleRate = 1.0;`,\n );\n });\n\n test('builds correctly', async () => {\n await checkIfFlutterBuilds(projectDir, '✓ Built build/web');\n });\n });\n\n describe('without apple platforms', () => {\n beforeAll(async () => {\n const wizardInstance = startWizardInstance(integration, projectDir);\n\n if (fs.existsSync(`${projectDir}/ios`)) {\n fs.renameSync(`${projectDir}/ios`, `${projectDir}/_ios`);\n }\n if (fs.existsSync(`${projectDir}/macos`)) {\n fs.renameSync(`${projectDir}/macos`, `${projectDir}/_macos`);\n }\n\n const continueOnUncommitedFilesPromted =\n await wizardInstance.waitForOutput('Do you want to continue anyway?');\n\n const tracingOptionPrompted =\n continueOnUncommitedFilesPromted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Tracing\", sometimes doesn't work as `Tracing` can be printed in bold.\n 'to track the performance of your application?',\n ));\n\n tracingOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Successfully installed the Sentry Flutter SDK!',\n ));\n\n wizardInstance.kill();\n });\n\n afterAll(() => {\n revertLocalChanges(projectDir);\n cleanupGit(projectDir);\n });\n\n test('lib/main.dart does not add profiling with missing ios and macos folder', () => {\n const fileContent = fs.readFileSync(\n `${projectDir}/lib/main.dart`,\n 'utf-8',\n );\n expect(fileContent).not.toContain(`options.profilesSampleRate = 1.0;`);\n });\n });\n});\n"]}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const node_child_process_1 = require("node:child_process");
4
+ const node_path_1 = require("node:path");
5
+ const vitest_1 = require("vitest");
6
+ (0, vitest_1.describe)('--help command', () => {
7
+ (0, vitest_1.it)('prints the up to date help command', () => {
8
+ const binName = process.env.SENTRY_WIZARD_E2E_TEST_BIN
9
+ ? ['dist-bin', `sentry-wizard-${process.platform}-${process.arch}`]
10
+ : ['dist', 'bin.js'];
11
+ const binPath = (0, node_path_1.join)(__dirname, '..', '..', ...binName);
12
+ const output = (0, node_child_process_1.execSync)(`${binPath} --help`, {
13
+ stdio: 'pipe',
14
+ });
15
+ (0, vitest_1.expect)(output.toString()).toMatchInlineSnapshot(`
16
+ "Options:
17
+ --help Show help [boolean]
18
+ --debug Enable verbose logging
19
+ env: SENTRY_WIZARD_DEBUG [boolean] [default: false]
20
+ --uninstall Revert project setup process
21
+ env: SENTRY_WIZARD_UNINSTALL
22
+ [boolean] [default: false]
23
+ --skip-connect Skips the connection to the server
24
+ env: SENTRY_WIZARD_SKIP_CONNECT
25
+ [boolean] [default: false]
26
+ --quiet Do not fallback to prompting user asking questions
27
+ env: SENTRY_WIZARD_QUIET [boolean] [default: false]
28
+ -i, --integration Choose the integration to setup
29
+ env: SENTRY_WIZARD_INTEGRATION
30
+ [choices: "reactNative", "flutter", "ios", "android", "cordova", "electron",
31
+ "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps"]
32
+ -p, --platform Choose platform(s)
33
+ env: SENTRY_WIZARD_PLATFORM
34
+ [array] [choices: "ios", "android"]
35
+ -u, --url The url to your Sentry installation
36
+ env: SENTRY_WIZARD_URL
37
+ --project The Sentry project slug to use
38
+ [string] [default: Select project during setup]
39
+ --org The Sentry org slug to use
40
+ [string] [default: Select org during setup]
41
+ --saas Skip the self-hosted or SaaS URL selection process
42
+ [boolean] [default: Select self-hosted or SaaS during setup]
43
+ -s, --signup Redirect to signup page if not logged in
44
+ [boolean] [default: false]
45
+ --disable-telemetry Don't send telemetry data to Sentry
46
+ [boolean] [default: false]
47
+ --force-install Force install the SDK NPM package
48
+ [boolean] [default: false]
49
+ --ignore-git-changes Ignore git changes in the project
50
+ [boolean] [default: false]
51
+ --version Show version number [boolean]
52
+ "
53
+ `);
54
+ });
55
+ });
56
+ //# sourceMappingURL=help-message.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-message.test.js","sourceRoot":"","sources":["../../../e2e-tests/tests/help-message.test.ts"],"names":[],"mappings":";;AAAA,2DAA8C;AAC9C,yCAAiC;AACjC,mCAA8C;AAE9C,IAAA,iBAAQ,EAAC,gBAAgB,EAAE,GAAG,EAAE;IAC9B,IAAA,WAAE,EAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,0BAA0B;YACpD,CAAC,CAAC,CAAC,UAAU,EAAE,iBAAiB,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;YACnE,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QAEvB,MAAM,OAAO,GAAG,IAAA,gBAAI,EAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,CAAC;QAExD,MAAM,MAAM,GAAG,IAAA,6BAAQ,EAAC,GAAG,OAAO,SAAS,EAAE;YAC3C,KAAK,EAAE,MAAM;SACd,CAAC,CAAC;QAEH,IAAA,eAAM,EAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsC/C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { execSync } from 'node:child_process';\nimport { join } from 'node:path';\nimport { describe, expect, it } from 'vitest';\n\ndescribe('--help command', () => {\n it('prints the up to date help command', () => {\n const binName = process.env.SENTRY_WIZARD_E2E_TEST_BIN\n ? ['dist-bin', `sentry-wizard-${process.platform}-${process.arch}`]\n : ['dist', 'bin.js'];\n\n const binPath = join(__dirname, '..', '..', ...binName);\n\n const output = execSync(`${binPath} --help`, {\n stdio: 'pipe',\n });\n\n expect(output.toString()).toMatchInlineSnapshot(`\n \"Options:\n --help Show help [boolean]\n --debug Enable verbose logging\n env: SENTRY_WIZARD_DEBUG [boolean] [default: false]\n --uninstall Revert project setup process\n env: SENTRY_WIZARD_UNINSTALL\n [boolean] [default: false]\n --skip-connect Skips the connection to the server\n env: SENTRY_WIZARD_SKIP_CONNECT\n [boolean] [default: false]\n --quiet Do not fallback to prompting user asking questions\n env: SENTRY_WIZARD_QUIET [boolean] [default: false]\n -i, --integration Choose the integration to setup\n env: SENTRY_WIZARD_INTEGRATION\n [choices: \"reactNative\", \"flutter\", \"ios\", \"android\", \"cordova\", \"electron\",\n \"nextjs\", \"nuxt\", \"remix\", \"sveltekit\", \"sourcemaps\"]\n -p, --platform Choose platform(s)\n env: SENTRY_WIZARD_PLATFORM\n [array] [choices: \"ios\", \"android\"]\n -u, --url The url to your Sentry installation\n env: SENTRY_WIZARD_URL\n --project The Sentry project slug to use\n [string] [default: Select project during setup]\n --org The Sentry org slug to use\n [string] [default: Select org during setup]\n --saas Skip the self-hosted or SaaS URL selection process\n [boolean] [default: Select self-hosted or SaaS during setup]\n -s, --signup Redirect to signup page if not logged in\n [boolean] [default: false]\n --disable-telemetry Don't send telemetry data to Sentry\n [boolean] [default: false]\n --force-install Force install the SDK NPM package\n [boolean] [default: false]\n --ignore-git-changes Ignore git changes in the project\n [boolean] [default: false]\n --version Show version number [boolean]\n \"\n `);\n });\n});\n"]}
@@ -23,16 +23,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- /* eslint-disable jest/expect-expect */
27
26
  const path = __importStar(require("node:path"));
28
27
  const Constants_1 = require("../../lib/Constants");
29
28
  const utils_1 = require("../utils");
30
29
  const utils_2 = require("../utils");
31
30
  const utils_3 = require("../utils");
32
- describe('NextJS-14', () => {
31
+ const vitest_1 = require("vitest");
32
+ (0, vitest_1.describe)('NextJS-14', () => {
33
33
  const integration = Constants_1.Integration.nextjs;
34
34
  const projectDir = path.resolve(__dirname, '../test-applications/nextjs-14-test-app');
35
- beforeAll(async () => {
35
+ (0, vitest_1.beforeAll)(async () => {
36
36
  const wizardInstance = (0, utils_2.startWizardInstance)(integration, projectDir);
37
37
  const packageManagerPrompted = await wizardInstance.waitForOutput('Please select your package manager.');
38
38
  const routeThroughNextJsPrompted = packageManagerPrompted &&
@@ -61,32 +61,33 @@ describe('NextJS-14', () => {
61
61
  [utils_1.KEYS.DOWN, utils_1.KEYS.ENTER], 'Successfully installed the Sentry Next.js SDK!'));
62
62
  wizardInstance.kill();
63
63
  });
64
- afterAll(() => {
64
+ (0, vitest_1.afterAll)(() => {
65
65
  (0, utils_1.revertLocalChanges)(projectDir);
66
66
  (0, utils_1.cleanupGit)(projectDir);
67
67
  });
68
- test('package.json is updated correctly', () => {
68
+ (0, vitest_1.test)('package.json is updated correctly', () => {
69
69
  (0, utils_3.checkPackageJson)(projectDir, integration);
70
70
  });
71
- test('.env-sentry-build-plugin is created and contains the auth token', () => {
71
+ (0, vitest_1.test)('.env-sentry-build-plugin is created and contains the auth token', () => {
72
72
  (0, utils_1.checkEnvBuildPlugin)(projectDir);
73
73
  });
74
- test('example page exists', () => {
74
+ (0, vitest_1.test)('example page exists', () => {
75
+ (0, utils_3.checkFileExists)(`${projectDir}/src/app/layout.tsx`);
75
76
  (0, utils_3.checkFileExists)(`${projectDir}/src/app/sentry-example-page/page.tsx`);
76
77
  (0, utils_3.checkFileExists)(`${projectDir}/src/app/api/sentry-example-api/route.ts`);
77
78
  });
78
- test('config files created', () => {
79
+ (0, vitest_1.test)('config files created', () => {
79
80
  (0, utils_3.checkFileExists)(`${projectDir}/sentry.server.config.ts`);
80
- (0, utils_3.checkFileExists)(`${projectDir}/sentry.client.config.ts`);
81
81
  (0, utils_3.checkFileExists)(`${projectDir}/sentry.edge.config.ts`);
82
82
  });
83
- test('global error file exists', () => {
83
+ (0, vitest_1.test)('global error file exists', () => {
84
84
  (0, utils_3.checkFileExists)(`${projectDir}/src/app/global-error.tsx`);
85
85
  });
86
- test('instrumentation file exists', () => {
86
+ (0, vitest_1.test)('instrumentation files exists', () => {
87
87
  (0, utils_3.checkFileExists)(`${projectDir}/src/instrumentation.ts`);
88
+ (0, utils_3.checkFileExists)(`${projectDir}/src/instrumentation-client.ts`);
88
89
  });
89
- test('instrumentation file contains Sentry initialization', () => {
90
+ (0, vitest_1.test)('instrumentation file contains Sentry initialization', () => {
90
91
  (0, utils_3.checkFileContents)(`${projectDir}/src/instrumentation.ts`, [
91
92
  "import * as Sentry from '@sentry/nextjs';",
92
93
  `export async function register() {
@@ -102,19 +103,19 @@ describe('NextJS-14', () => {
102
103
  export const onRequestError = Sentry.captureRequestError;`,
103
104
  ]);
104
105
  });
105
- test('next.config file contains Sentry wrapper', () => {
106
+ (0, vitest_1.test)('next.config file contains Sentry wrapper', () => {
106
107
  (0, utils_3.checkFileContents)(`${projectDir}/next.config.mjs`, [
107
108
  "import {withSentryConfig} from '@sentry/nextjs'",
108
109
  'export default withSentryConfig(nextConfig, {',
109
110
  ]);
110
111
  });
111
- test('runs on dev mode correctly', async () => {
112
+ (0, vitest_1.test)('runs on dev mode correctly', async () => {
112
113
  await (0, utils_3.checkIfRunsOnDevMode)(projectDir, 'Ready in');
113
114
  });
114
- test('builds correctly', async () => {
115
+ (0, vitest_1.test)('builds correctly', async () => {
115
116
  await (0, utils_3.checkIfBuilds)(projectDir);
116
117
  });
117
- test('runs on prod mode correctly', async () => {
118
+ (0, vitest_1.test)('runs on prod mode correctly', async () => {
118
119
  await (0, utils_3.checkIfRunsOnProdMode)(projectDir, 'Ready in');
119
120
  });
120
121
  });
@@ -1 +1 @@
1
- {"version":3,"file":"nextjs-14.test.js","sourceRoot":"","sources":["../../../e2e-tests/tests/nextjs-14.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAuC;AACvC,gDAAkC;AAClC,mDAAkD;AAClD,oCAKkB;AAClB,oCAA+C;AAC/C,oCAOkB;AAElB,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,MAAM,WAAW,GAAG,uBAAW,CAAC,MAAM,CAAC;IACvC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAC7B,SAAS,EACT,yCAAyC,CAC1C,CAAC;IAEF,SAAS,CAAC,KAAK,IAAI,EAAE;QACnB,MAAM,cAAc,GAAG,IAAA,2BAAmB,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACpE,MAAM,sBAAsB,GAAG,MAAM,cAAc,CAAC,aAAa,CAC/D,qCAAqC,CACtC,CAAC;QAEF,MAAM,0BAA0B,GAC9B,sBAAsB;YACtB,CAAC,MAAM,cAAc,CAAC,yBAAyB;YAC7C,0CAA0C;YAC1C,CAAC,YAAI,CAAC,IAAI,EAAE,YAAI,CAAC,KAAK,CAAC,EACvB,iFAAiF,EACjF;gBACE,OAAO,EAAE,MAAO;aACjB,CACF,CAAC,CAAC;QAEL,MAAM,qBAAqB,GACzB,0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C,UAAU,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;QAC7C,MAAM,IAAA,6BAAqB,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["/* eslint-disable jest/expect-expect */\nimport * as path from 'node:path';\nimport { Integration } from '../../lib/Constants';\nimport {\n KEYS,\n checkEnvBuildPlugin,\n cleanupGit,\n revertLocalChanges,\n} from '../utils';\nimport { startWizardInstance } from '../utils';\nimport {\n checkFileContents,\n checkFileExists,\n checkIfBuilds,\n checkIfRunsOnDevMode,\n checkIfRunsOnProdMode,\n checkPackageJson,\n} from '../utils';\n\ndescribe('NextJS-14', () => {\n const integration = Integration.nextjs;\n const projectDir = path.resolve(\n __dirname,\n '../test-applications/nextjs-14-test-app',\n );\n\n beforeAll(async () => {\n const wizardInstance = startWizardInstance(integration, projectDir);\n const packageManagerPrompted = await wizardInstance.waitForOutput(\n 'Please select your package manager.',\n );\n\n const routeThroughNextJsPrompted =\n packageManagerPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n // Selecting `yarn` as the package manager\n [KEYS.DOWN, KEYS.ENTER],\n 'Do you want to route Sentry requests in the browser through your Next.js server',\n {\n timeout: 240_000,\n },\n ));\n\n const tracingOptionPrompted =\n routeThroughNextJsPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Tracing\", sometimes doesn't work as `Tracing` can be printed in bold.\n 'to track the performance of your application?',\n ));\n\n const replayOptionPrompted =\n tracingOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Sentry Session Replay\", sometimes doesn't work as `Sentry Session Replay` can be printed in bold.\n 'to get a video-like reproduction of errors during a user session?',\n ));\n\n const examplePagePrompted =\n replayOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Do you want to create an example page',\n {\n optional: true,\n },\n ));\n\n const ciCdPrompted =\n examplePagePrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Are you using a CI/CD tool',\n ));\n\n ciCdPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n // Selecting `No` for CI/CD tool\n [KEYS.DOWN, KEYS.ENTER],\n 'Successfully installed the Sentry Next.js SDK!',\n ));\n\n wizardInstance.kill();\n });\n\n afterAll(() => {\n revertLocalChanges(projectDir);\n cleanupGit(projectDir);\n });\n\n test('package.json is updated correctly', () => {\n checkPackageJson(projectDir, integration);\n });\n\n test('.env-sentry-build-plugin is created and contains the auth token', () => {\n checkEnvBuildPlugin(projectDir);\n });\n\n test('example page exists', () => {\n checkFileExists(`${projectDir}/src/app/sentry-example-page/page.tsx`);\n checkFileExists(`${projectDir}/src/app/api/sentry-example-api/route.ts`);\n });\n\n test('config files created', () => {\n checkFileExists(`${projectDir}/sentry.server.config.ts`);\n checkFileExists(`${projectDir}/sentry.client.config.ts`);\n checkFileExists(`${projectDir}/sentry.edge.config.ts`);\n });\n\n test('global error file exists', () => {\n checkFileExists(`${projectDir}/src/app/global-error.tsx`);\n });\n\n test('instrumentation file exists', () => {\n checkFileExists(`${projectDir}/src/instrumentation.ts`);\n });\n\n test('instrumentation file contains Sentry initialization', () => {\n checkFileContents(`${projectDir}/src/instrumentation.ts`, [\n \"import * as Sentry from '@sentry/nextjs';\",\n `export async function register() {\n if (process.env.NEXT_RUNTIME === 'nodejs') {\n await import('../sentry.server.config');\n }\n\n if (process.env.NEXT_RUNTIME === 'edge') {\n await import('../sentry.edge.config');\n }\n}\n\nexport const onRequestError = Sentry.captureRequestError;`,\n ]);\n });\n\n test('next.config file contains Sentry wrapper', () => {\n checkFileContents(`${projectDir}/next.config.mjs`, [\n \"import {withSentryConfig} from '@sentry/nextjs'\",\n 'export default withSentryConfig(nextConfig, {',\n ]);\n });\n\n test('runs on dev mode correctly', async () => {\n await checkIfRunsOnDevMode(projectDir, 'Ready in');\n });\n\n test('builds correctly', async () => {\n await checkIfBuilds(projectDir);\n });\n\n test('runs on prod mode correctly', async () => {\n await checkIfRunsOnProdMode(projectDir, 'Ready in');\n });\n});\n"]}
1
+ {"version":3,"file":"nextjs-14.test.js","sourceRoot":"","sources":["../../../e2e-tests/tests/nextjs-14.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;AAClC,mDAAkD;AAClD,oCAKkB;AAClB,oCAA+C;AAC/C,oCAOkB;AAClB,mCAA6D;AAE7D,IAAA,iBAAQ,EAAC,WAAW,EAAE,GAAG,EAAE;IACzB,MAAM,WAAW,GAAG,uBAAW,CAAC,MAAM,CAAC;IACvC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAC7B,SAAS,EACT,yCAAyC,CAC1C,CAAC;IAEF,IAAA,kBAAS,EAAC,KAAK,IAAI,EAAE;QACnB,MAAM,cAAc,GAAG,IAAA,2BAAmB,EAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QACpE,MAAM,sBAAsB,GAAG,MAAM,cAAc,CAAC,aAAa,CAC/D,qCAAqC,CACtC,CAAC;QAEF,MAAM,0BAA0B,GAC9B,sBAAsB;YACtB,CAAC,MAAM,cAAc,CAAC,yBAAyB;YAC7C,0CAA0C;YAC1C,CAAC,YAAI,CAAC,IAAI,EAAE,YAAI,CAAC,KAAK,CAAC,EACvB,iFAAiF,EACjF;gBACE,OAAO,EAAE,MAAO;aACjB,CACF,CAAC,CAAC;QAEL,MAAM,qBAAqB,GACzB,0BAA0B;YAC1B,CAAC,MAAM,cAAc,CAAC,yBAAyB,CAC7C,CAAC,YAAI,CAAC,KAAK,CAAC;YACZ,+FAA+F;YAC/F,+CAA+C,CAChD,CAAC,CAAC;QAEL,MAAM,oBAAoB,GACxB,qBAAqB;YACrB,CAAC,MAAM,cAAc,CAAC,yBAAyB,CAC7C,CAAC,YA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AE;QAC7C,MAAM,IAAA,6BAAqB,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import * as path from 'node:path';\nimport { Integration } from '../../lib/Constants';\nimport {\n KEYS,\n checkEnvBuildPlugin,\n cleanupGit,\n revertLocalChanges,\n} from '../utils';\nimport { startWizardInstance } from '../utils';\nimport {\n checkFileContents,\n checkFileExists,\n checkIfBuilds,\n checkIfRunsOnDevMode,\n checkIfRunsOnProdMode,\n checkPackageJson,\n} from '../utils';\nimport { afterAll, beforeAll, describe, test } from 'vitest';\n\ndescribe('NextJS-14', () => {\n const integration = Integration.nextjs;\n const projectDir = path.resolve(\n __dirname,\n '../test-applications/nextjs-14-test-app',\n );\n\n beforeAll(async () => {\n const wizardInstance = startWizardInstance(integration, projectDir);\n const packageManagerPrompted = await wizardInstance.waitForOutput(\n 'Please select your package manager.',\n );\n\n const routeThroughNextJsPrompted =\n packageManagerPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n // Selecting `yarn` as the package manager\n [KEYS.DOWN, KEYS.ENTER],\n 'Do you want to route Sentry requests in the browser through your Next.js server',\n {\n timeout: 240_000,\n },\n ));\n\n const tracingOptionPrompted =\n routeThroughNextJsPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Tracing\", sometimes doesn't work as `Tracing` can be printed in bold.\n 'to track the performance of your application?',\n ));\n\n const replayOptionPrompted =\n tracingOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Sentry Session Replay\", sometimes doesn't work as `Sentry Session Replay` can be printed in bold.\n 'to get a video-like reproduction of errors during a user session?',\n ));\n\n const examplePagePrompted =\n replayOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Do you want to create an example page',\n {\n optional: true,\n },\n ));\n\n const ciCdPrompted =\n examplePagePrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Are you using a CI/CD tool',\n ));\n\n ciCdPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n // Selecting `No` for CI/CD tool\n [KEYS.DOWN, KEYS.ENTER],\n 'Successfully installed the Sentry Next.js SDK!',\n ));\n\n wizardInstance.kill();\n });\n\n afterAll(() => {\n revertLocalChanges(projectDir);\n cleanupGit(projectDir);\n });\n\n test('package.json is updated correctly', () => {\n checkPackageJson(projectDir, integration);\n });\n\n test('.env-sentry-build-plugin is created and contains the auth token', () => {\n checkEnvBuildPlugin(projectDir);\n });\n\n test('example page exists', () => {\n checkFileExists(`${projectDir}/src/app/layout.tsx`);\n checkFileExists(`${projectDir}/src/app/sentry-example-page/page.tsx`);\n checkFileExists(`${projectDir}/src/app/api/sentry-example-api/route.ts`);\n });\n\n test('config files created', () => {\n checkFileExists(`${projectDir}/sentry.server.config.ts`);\n checkFileExists(`${projectDir}/sentry.edge.config.ts`);\n });\n\n test('global error file exists', () => {\n checkFileExists(`${projectDir}/src/app/global-error.tsx`);\n });\n\n test('instrumentation files exists', () => {\n checkFileExists(`${projectDir}/src/instrumentation.ts`);\n checkFileExists(`${projectDir}/src/instrumentation-client.ts`);\n });\n\n test('instrumentation file contains Sentry initialization', () => {\n checkFileContents(`${projectDir}/src/instrumentation.ts`, [\n \"import * as Sentry from '@sentry/nextjs';\",\n `export async function register() {\n if (process.env.NEXT_RUNTIME === 'nodejs') {\n await import('../sentry.server.config');\n }\n\n if (process.env.NEXT_RUNTIME === 'edge') {\n await import('../sentry.edge.config');\n }\n}\n\nexport const onRequestError = Sentry.captureRequestError;`,\n ]);\n });\n\n test('next.config file contains Sentry wrapper', () => {\n checkFileContents(`${projectDir}/next.config.mjs`, [\n \"import {withSentryConfig} from '@sentry/nextjs'\",\n 'export default withSentryConfig(nextConfig, {',\n ]);\n });\n\n test('runs on dev mode correctly', async () => {\n await checkIfRunsOnDevMode(projectDir, 'Ready in');\n });\n\n test('builds correctly', async () => {\n await checkIfBuilds(projectDir);\n });\n\n test('runs on prod mode correctly', async () => {\n await checkIfRunsOnProdMode(projectDir, 'Ready in');\n });\n});\n"]}