@sentry/wizard 4.4.0 → 4.6.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 (228) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/README.md +23 -19
  3. package/dist/bin.js +13 -0
  4. package/dist/bin.js.map +1 -1
  5. package/dist/e2e-tests/tests/nextjs-14.test.js +4 -5
  6. package/dist/e2e-tests/tests/nextjs-14.test.js.map +1 -1
  7. package/dist/e2e-tests/tests/nextjs-15.test.js +3 -5
  8. package/dist/e2e-tests/tests/nextjs-15.test.js.map +1 -1
  9. package/dist/e2e-tests/utils/index.d.ts +1 -1
  10. package/dist/e2e-tests/utils/index.js +20 -2
  11. package/dist/e2e-tests/utils/index.js.map +1 -1
  12. package/dist/lib/Constants.d.ts +2 -0
  13. package/dist/lib/Constants.js.map +1 -1
  14. package/dist/lib/Helper/File.d.ts +1 -1
  15. package/dist/lib/Helper/File.js +1 -3
  16. package/dist/lib/Helper/File.js.map +1 -1
  17. package/dist/lib/Helper/Logging.d.ts +3 -0
  18. package/dist/lib/Helper/Logging.js +3 -0
  19. package/dist/lib/Helper/Logging.js.map +1 -1
  20. package/dist/lib/Helper/Package.d.ts +5 -3
  21. package/dist/lib/Helper/Package.js +2 -2
  22. package/dist/lib/Helper/Package.js.map +1 -1
  23. package/dist/lib/Helper/SentryCli.d.ts +20 -7
  24. package/dist/lib/Helper/SentryCli.js +21 -13
  25. package/dist/lib/Helper/SentryCli.js.map +1 -1
  26. package/dist/lib/Helper/Wizard.js +9 -5
  27. package/dist/lib/Helper/Wizard.js.map +1 -1
  28. package/dist/lib/Helper/__tests__/SentryCli.js +21 -4
  29. package/dist/lib/Helper/__tests__/SentryCli.js.map +1 -1
  30. package/dist/lib/Setup.d.ts +3 -1
  31. package/dist/lib/Setup.js.map +1 -1
  32. package/dist/lib/Steps/Integrations/BaseIntegration.js +1 -2
  33. package/dist/lib/Steps/Integrations/BaseIntegration.js.map +1 -1
  34. package/dist/lib/Steps/Integrations/Cordova.js +14 -10
  35. package/dist/lib/Steps/Integrations/Cordova.js.map +1 -1
  36. package/dist/lib/Steps/Integrations/Electron.d.ts +4 -1
  37. package/dist/lib/Steps/Integrations/Electron.js +1 -1
  38. package/dist/lib/Steps/Integrations/Electron.js.map +1 -1
  39. package/dist/lib/Steps/Integrations/MobileProject.d.ts +3 -1
  40. package/dist/lib/Steps/Integrations/MobileProject.js +1 -1
  41. package/dist/lib/Steps/Integrations/MobileProject.js.map +1 -1
  42. package/dist/lib/Steps/PromptForParameters.d.ts +4 -1
  43. package/dist/lib/Steps/PromptForParameters.js.map +1 -1
  44. package/dist/lib/Steps/SentryProjectSelector.d.ts +42 -1
  45. package/dist/lib/Steps/SentryProjectSelector.js +1 -1
  46. package/dist/lib/Steps/SentryProjectSelector.js.map +1 -1
  47. package/dist/lib/Steps/WaitForSentry.d.ts +3 -1
  48. package/dist/lib/Steps/WaitForSentry.js +4 -4
  49. package/dist/lib/Steps/WaitForSentry.js.map +1 -1
  50. package/dist/lib/Types.d.ts +14 -0
  51. package/dist/lib/Types.js +3 -0
  52. package/dist/lib/Types.js.map +1 -0
  53. package/dist/lib/__tests__/Env.js +6 -13
  54. package/dist/lib/__tests__/Env.js.map +1 -1
  55. package/dist/src/android/android-wizard.js +15 -12
  56. package/dist/src/android/android-wizard.js.map +1 -1
  57. package/dist/src/android/code-tools.js +1 -1
  58. package/dist/src/android/code-tools.js.map +1 -1
  59. package/dist/src/android/gradle.js +4 -4
  60. package/dist/src/android/gradle.js.map +1 -1
  61. package/dist/src/android/manifest.js +1 -1
  62. package/dist/src/android/manifest.js.map +1 -1
  63. package/dist/src/apple/apple-wizard.d.ts +2 -2
  64. package/dist/src/apple/apple-wizard.js +37 -118
  65. package/dist/src/apple/apple-wizard.js.map +1 -1
  66. package/dist/src/apple/check-installed-cli.d.ts +1 -0
  67. package/dist/src/apple/check-installed-cli.js +60 -0
  68. package/dist/src/apple/check-installed-cli.js.map +1 -0
  69. package/dist/src/apple/cocoapod.js +1 -1
  70. package/dist/src/apple/cocoapod.js.map +1 -1
  71. package/dist/src/apple/code-tools.js +1 -1
  72. package/dist/src/apple/code-tools.js.map +1 -1
  73. package/dist/src/apple/configure-fastlane.d.ts +5 -0
  74. package/dist/src/apple/configure-fastlane.js +66 -0
  75. package/dist/src/apple/configure-fastlane.js.map +1 -0
  76. package/dist/src/apple/fastlane.d.ts +1 -1
  77. package/dist/src/apple/fastlane.js +5 -5
  78. package/dist/src/apple/fastlane.js.map +1 -1
  79. package/dist/src/apple/lookup-xcode-project.d.ts +7 -0
  80. package/dist/src/apple/lookup-xcode-project.js +98 -0
  81. package/dist/src/apple/lookup-xcode-project.js.map +1 -0
  82. package/dist/src/apple/options.d.ts +4 -0
  83. package/dist/src/apple/options.js +3 -0
  84. package/dist/src/apple/options.js.map +1 -0
  85. package/dist/src/apple/search-xcode-project-at-path.d.ts +1 -0
  86. package/dist/src/apple/search-xcode-project-at-path.js +70 -0
  87. package/dist/src/apple/search-xcode-project-at-path.js.map +1 -0
  88. package/dist/src/apple/xcode-manager.js +1 -1
  89. package/dist/src/apple/xcode-manager.js.map +1 -1
  90. package/dist/src/flutter/code-tools.js +3 -3
  91. package/dist/src/flutter/code-tools.js.map +1 -1
  92. package/dist/src/flutter/flutter-wizard.js +21 -15
  93. package/dist/src/flutter/flutter-wizard.js.map +1 -1
  94. package/dist/src/flutter/templates.js +4 -4
  95. package/dist/src/flutter/templates.js.map +1 -1
  96. package/dist/src/nextjs/nextjs-wizard.js +118 -67
  97. package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
  98. package/dist/src/nextjs/templates.d.ts +11 -3
  99. package/dist/src/nextjs/templates.js +193 -71
  100. package/dist/src/nextjs/templates.js.map +1 -1
  101. package/dist/src/nuxt/nuxt-wizard.js +21 -16
  102. package/dist/src/nuxt/nuxt-wizard.js.map +1 -1
  103. package/dist/src/nuxt/sdk-example.js +3 -3
  104. package/dist/src/nuxt/sdk-example.js.map +1 -1
  105. package/dist/src/nuxt/sdk-setup.js +9 -9
  106. package/dist/src/nuxt/sdk-setup.js.map +1 -1
  107. package/dist/src/nuxt/templates.js +173 -58
  108. package/dist/src/nuxt/templates.js.map +1 -1
  109. package/dist/src/nuxt/utils.js +6 -3
  110. package/dist/src/nuxt/utils.js.map +1 -1
  111. package/dist/src/react-native/expo-env-file.js +1 -1
  112. package/dist/src/react-native/expo-env-file.js.map +1 -1
  113. package/dist/src/react-native/expo-metro.js +4 -4
  114. package/dist/src/react-native/expo-metro.js.map +1 -1
  115. package/dist/src/react-native/expo.js +4 -4
  116. package/dist/src/react-native/expo.js.map +1 -1
  117. package/dist/src/react-native/javascript.js +7 -7
  118. package/dist/src/react-native/javascript.js.map +1 -1
  119. package/dist/src/react-native/metro.js +8 -8
  120. package/dist/src/react-native/metro.js.map +1 -1
  121. package/dist/src/react-native/react-native-wizard.d.ts +1 -1
  122. package/dist/src/react-native/react-native-wizard.js +36 -31
  123. package/dist/src/react-native/react-native-wizard.js.map +1 -1
  124. package/dist/src/react-native/uninstall.js +8 -5
  125. package/dist/src/react-native/uninstall.js.map +1 -1
  126. package/dist/src/react-native/xcode.d.ts +2 -1
  127. package/dist/src/react-native/xcode.js +1 -2
  128. package/dist/src/react-native/xcode.js.map +1 -1
  129. package/dist/src/remix/codemods/handle-error.js +4 -1
  130. package/dist/src/remix/codemods/handle-error.js.map +1 -1
  131. package/dist/src/remix/remix-wizard.js +23 -18
  132. package/dist/src/remix/remix-wizard.js.map +1 -1
  133. package/dist/src/remix/sdk-example.js +163 -64
  134. package/dist/src/remix/sdk-example.js.map +1 -1
  135. package/dist/src/remix/sdk-setup.js +11 -7
  136. package/dist/src/remix/sdk-setup.js.map +1 -1
  137. package/dist/src/run.d.ts +3 -1
  138. package/dist/src/run.js +29 -9
  139. package/dist/src/run.js.map +1 -1
  140. package/dist/src/sourcemaps/sourcemaps-wizard.js +30 -28
  141. package/dist/src/sourcemaps/sourcemaps-wizard.js.map +1 -1
  142. package/dist/src/sourcemaps/tools/angular.js +3 -3
  143. package/dist/src/sourcemaps/tools/angular.js.map +1 -1
  144. package/dist/src/sourcemaps/tools/create-react-app.js +3 -3
  145. package/dist/src/sourcemaps/tools/create-react-app.js.map +1 -1
  146. package/dist/src/sourcemaps/tools/esbuild.js +6 -6
  147. package/dist/src/sourcemaps/tools/esbuild.js.map +1 -1
  148. package/dist/src/sourcemaps/tools/nextjs.js +5 -5
  149. package/dist/src/sourcemaps/tools/nextjs.js.map +1 -1
  150. package/dist/src/sourcemaps/tools/remix.js +4 -4
  151. package/dist/src/sourcemaps/tools/remix.js.map +1 -1
  152. package/dist/src/sourcemaps/tools/rollup.js +6 -6
  153. package/dist/src/sourcemaps/tools/rollup.js.map +1 -1
  154. package/dist/src/sourcemaps/tools/sentry-cli.js +23 -16
  155. package/dist/src/sourcemaps/tools/sentry-cli.js.map +1 -1
  156. package/dist/src/sourcemaps/tools/tsc.js +6 -6
  157. package/dist/src/sourcemaps/tools/tsc.js.map +1 -1
  158. package/dist/src/sourcemaps/tools/vite.js +12 -12
  159. package/dist/src/sourcemaps/tools/vite.js.map +1 -1
  160. package/dist/src/sourcemaps/tools/webpack.js +10 -10
  161. package/dist/src/sourcemaps/tools/webpack.js.map +1 -1
  162. package/dist/src/sourcemaps/utils/detect-tool.js +2 -2
  163. package/dist/src/sourcemaps/utils/detect-tool.js.map +1 -1
  164. package/dist/src/sourcemaps/utils/other-wizards.js +5 -5
  165. package/dist/src/sourcemaps/utils/other-wizards.js.map +1 -1
  166. package/dist/src/sourcemaps/utils/sdk-version.js +7 -7
  167. package/dist/src/sourcemaps/utils/sdk-version.js.map +1 -1
  168. package/dist/src/sveltekit/sdk-example.js +1 -1
  169. package/dist/src/sveltekit/sdk-example.js.map +1 -1
  170. package/dist/src/sveltekit/sdk-setup.js +15 -14
  171. package/dist/src/sveltekit/sdk-setup.js.map +1 -1
  172. package/dist/src/sveltekit/sveltekit-wizard.js +25 -20
  173. package/dist/src/sveltekit/sveltekit-wizard.js.map +1 -1
  174. package/dist/src/sveltekit/templates.js +126 -37
  175. package/dist/src/sveltekit/templates.js.map +1 -1
  176. package/dist/src/telemetry.js +11 -0
  177. package/dist/src/telemetry.js.map +1 -1
  178. package/dist/src/utils/{clack-utils.d.ts → clack/index.d.ts} +54 -15
  179. package/dist/src/utils/{clack-utils.js → clack/index.js} +107 -24
  180. package/dist/src/utils/clack/index.js.map +1 -0
  181. package/dist/src/utils/debug.js +1 -1
  182. package/dist/src/utils/debug.js.map +1 -1
  183. package/dist/src/utils/find-files-with-extension.d.ts +1 -0
  184. package/dist/src/utils/find-files-with-extension.js +39 -0
  185. package/dist/src/utils/find-files-with-extension.js.map +1 -0
  186. package/dist/src/utils/package-manager.d.ts +6 -1
  187. package/dist/src/utils/package-manager.js +32 -27
  188. package/dist/src/utils/package-manager.js.map +1 -1
  189. package/dist/src/utils/sentrycli-utils.js +0 -1
  190. package/dist/src/utils/sentrycli-utils.js.map +1 -1
  191. package/dist/src/utils/types.d.ts +4 -0
  192. package/dist/src/utils/types.js.map +1 -1
  193. package/dist/src/version.d.ts +1 -1
  194. package/dist/src/version.js +1 -1
  195. package/dist/src/version.js.map +1 -1
  196. package/dist/test/android/code-tools.test.js +0 -1
  197. package/dist/test/android/code-tools.test.js.map +1 -1
  198. package/dist/test/apple/cocoapod.test.js +1 -1
  199. package/dist/test/apple/cocoapod.test.js.map +1 -1
  200. package/dist/test/apple/code-tools.test.js +1 -1
  201. package/dist/test/apple/code-tools.test.js.map +1 -1
  202. package/dist/test/apple/fastfile.test.js +1 -1
  203. package/dist/test/apple/fastfile.test.js.map +1 -1
  204. package/dist/test/apple/xcode-manager.test.js +26 -2
  205. package/dist/test/apple/xcode-manager.test.js.map +1 -1
  206. package/dist/test/flutter/code-tools.test.js +0 -2
  207. package/dist/test/flutter/code-tools.test.js.map +1 -1
  208. package/dist/test/flutter/templates.test.js +23 -23
  209. package/dist/test/flutter/templates.test.js.map +1 -1
  210. package/dist/test/nextjs/templates.test.js +127 -133
  211. package/dist/test/nextjs/templates.test.js.map +1 -1
  212. package/dist/test/react-native/expo-metro.test.js +1 -1
  213. package/dist/test/react-native/expo-metro.test.js.map +1 -1
  214. package/dist/test/react-native/javascript.test.js +1 -1
  215. package/dist/test/react-native/javascript.test.js.map +1 -1
  216. package/dist/test/react-native/metro.test.js +1 -1
  217. package/dist/test/react-native/metro.test.js.map +1 -1
  218. package/dist/test/sourcemaps/tools/sentry-cli.test.js +14 -3
  219. package/dist/test/sourcemaps/tools/sentry-cli.test.js.map +1 -1
  220. package/dist/test/utils/{clack-utils.test.js → clack/index.test.js} +131 -41
  221. package/dist/test/utils/clack/index.test.js.map +1 -0
  222. package/dist/test/utils/package-manager.test.d.ts +1 -0
  223. package/dist/test/utils/package-manager.test.js +29 -0
  224. package/dist/test/utils/package-manager.test.js.map +1 -0
  225. package/package.json +1 -1
  226. package/dist/src/utils/clack-utils.js.map +0 -1
  227. package/dist/test/utils/clack-utils.test.js.map +0 -1
  228. /package/dist/test/utils/{clack-utils.test.d.ts → clack/index.test.d.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"templates.test.js","sourceRoot":"","sources":["../../../test/flutter/templates.test.ts"],"names":[],"mappings":";;AAAA,2DAIqC;AAErC,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACvB,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAChD,MAAM,QAAQ,GAAG,IAAA,0BAAc,EAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;YAClE,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC;;;;;;;OAOtC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;QACjC,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAChD,MAAM,QAAQ,GAAG,IAAA,4BAAgB,EAAC,eAAe,CAAC,CAAC;YACnD,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,4BAA4B,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;YAC3D,MAAM,QAAQ,GAAG,IAAA,uBAAW,EAC1B,QAAQ,EACR;gBACE,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,IAAI;aAChB,EACD,eAAe,CAChB,CAAC;YACF,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;;OAetC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;YACzD,MAAM,QAAQ,GAAG,IAAA,uBAAW,EAC1B,QAAQ,EACR;gBACE,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,KAAK;aACjB,EACD,eAAe,CAChB,CAAC;YACF,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;OAYtC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACvD,MAAM,QAAQ,GAAG,IAAA,uBAAW,EAC1B,QAAQ,EACR;gBACE,OAAO,EAAE,KAAK;gBACd,SAAS,EAAE,KAAK;aACjB,EACD,eAAe,CAChB,CAAC;YACF,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;OAStC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {\n pubspecOptions,\n sentryProperties,\n initSnippet,\n} from '../../src/flutter/templates';\n\ndescribe('Flutter code templates', () => {\n describe('pubspec', () => {\n it('generates pubspec with project and org', () => {\n const template = pubspecOptions('fixture-project', 'fixture-org');\n expect(template).toMatchInlineSnapshot(`\n \"sentry:\n upload_debug_symbols: true\n upload_source_maps: true\n project: fixture-project\n org: fixture-org\n \"\n `);\n });\n });\n describe('sentry.properties', () => {\n it('generates sentry.properties with token', () => {\n const template = sentryProperties('fixture-token');\n expect(template).toMatchInlineSnapshot(`\"auth_token=fixture-token\"`);\n });\n });\n describe('init', () => {\n it('generates Sentry config with all features enabled', () => {\n const template = initSnippet(\n 'my-dsn',\n {\n tracing: true,\n profiling: true,\n },\n 'const MyApp()',\n );\n expect(template).toMatchInlineSnapshot(`\n \"await SentryFlutter.init(\n (options) {\n options.dsn = 'my-dsn';\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0;\n // The sampling rate for profiling is relative to tracesSampleRate\n // Setting to 1.0 will profile 100% of sampled transactions:\n options.profilesSampleRate = 1.0;\n },\n appRunner: () => runApp(SentryWidget(child: const MyApp())),\n );\n // TODO: Remove this line after sending the first sample event to sentry.\n await Sentry.captureException(Exception('This is a sample exception.'));\"\n `);\n });\n\n it('generates Sentry config with profiling disabled', () => {\n const template = initSnippet(\n 'my-dsn',\n {\n tracing: true,\n profiling: false,\n },\n 'const MyApp()',\n );\n expect(template).toMatchInlineSnapshot(`\n \"await SentryFlutter.init(\n (options) {\n options.dsn = 'my-dsn';\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0;\n },\n appRunner: () => runApp(SentryWidget(child: const MyApp())),\n );\n // TODO: Remove this line after sending the first sample event to sentry.\n await Sentry.captureException(Exception('This is a sample exception.'));\"\n `);\n });\n\n it('generates Sentry config with tracing disabled', () => {\n const template = initSnippet(\n 'my-dsn',\n {\n tracing: false,\n profiling: false,\n },\n 'const MyApp()',\n );\n expect(template).toMatchInlineSnapshot(`\n \"await SentryFlutter.init(\n (options) {\n options.dsn = 'my-dsn';\n },\n appRunner: () => runApp(SentryWidget(child: const MyApp())),\n );\n // TODO: Remove this line after sending the first sample event to sentry.\n await Sentry.captureException(Exception('This is a sample exception.'));\"\n `);\n });\n });\n});\n"]}
1
+ {"version":3,"file":"templates.test.js","sourceRoot":"","sources":["../../../test/flutter/templates.test.ts"],"names":[],"mappings":";;AAAA,2DAIqC;AAErC,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;QACvB,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAChD,MAAM,QAAQ,GAAG,IAAA,0BAAc,EAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC;YAClE,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC;;;;;;;aAOhC,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;QACjC,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;YAChD,MAAM,QAAQ,GAAG,IAAA,4BAAgB,EAAC,eAAe,CAAC,CAAC;YACnD,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,4BAA4B,CAAC,CAAC;QACvE,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,QAAQ,CAAC,MAAM,EAAE,GAAG,EAAE;QACpB,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;YAC3D,MAAM,QAAQ,GAAG,IAAA,uBAAW,EAC1B,QAAQ,EACR;gBACE,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,IAAI;aAChB,EACD,eAAe,CAChB,CAAC;YACF,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;;OAetC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;YACzD,MAAM,QAAQ,GAAG,IAAA,uBAAW,EAC1B,QAAQ,EACR;gBACE,OAAO,EAAE,IAAI;gBACb,SAAS,EAAE,KAAK;aACjB,EACD,eAAe,CAChB,CAAC;YACF,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;OAYtC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACvD,MAAM,QAAQ,GAAG,IAAA,uBAAW,EAC1B,QAAQ,EACR;gBACE,OAAO,EAAE,KAAK;gBACd,SAAS,EAAE,KAAK;aACjB,EACD,eAAe,CAChB,CAAC;YACF,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;OAStC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {\n pubspecOptions,\n sentryProperties,\n initSnippet,\n} from '../../src/flutter/templates';\n\ndescribe('Flutter code templates', () => {\n describe('pubspec', () => {\n it('generates pubspec with project and org', () => {\n const template = pubspecOptions('fixture-project', 'fixture-org');\n expect(template).toMatchInlineSnapshot(`\n \"sentry:\n upload_debug_symbols: true\n upload_source_maps: true\n project: fixture-project\n org: fixture-org\n \"\n `);\n });\n });\n describe('sentry.properties', () => {\n it('generates sentry.properties with token', () => {\n const template = sentryProperties('fixture-token');\n expect(template).toMatchInlineSnapshot(`\"auth_token=fixture-token\"`);\n });\n });\n describe('init', () => {\n it('generates Sentry config with all features enabled', () => {\n const template = initSnippet(\n 'my-dsn',\n {\n tracing: true,\n profiling: true,\n },\n 'const MyApp()',\n );\n expect(template).toMatchInlineSnapshot(`\n \"await SentryFlutter.init(\n (options) {\n options.dsn = 'my-dsn';\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0;\n // The sampling rate for profiling is relative to tracesSampleRate\n // Setting to 1.0 will profile 100% of sampled transactions:\n options.profilesSampleRate = 1.0;\n },\n appRunner: () => runApp(SentryWidget(child: const MyApp())),\n );\n // TODO: Remove this line after sending the first sample event to sentry.\n await Sentry.captureException(StateError('This is a sample exception.'));\"\n `);\n });\n\n it('generates Sentry config with profiling disabled', () => {\n const template = initSnippet(\n 'my-dsn',\n {\n tracing: true,\n profiling: false,\n },\n 'const MyApp()',\n );\n expect(template).toMatchInlineSnapshot(`\n \"await SentryFlutter.init(\n (options) {\n options.dsn = 'my-dsn';\n // Set tracesSampleRate to 1.0 to capture 100% of transactions for tracing.\n // We recommend adjusting this value in production.\n options.tracesSampleRate = 1.0;\n },\n appRunner: () => runApp(SentryWidget(child: const MyApp())),\n );\n // TODO: Remove this line after sending the first sample event to sentry.\n await Sentry.captureException(StateError('This is a sample exception.'));\"\n `);\n });\n\n it('generates Sentry config with tracing disabled', () => {\n const template = initSnippet(\n 'my-dsn',\n {\n tracing: false,\n profiling: false,\n },\n 'const MyApp()',\n );\n expect(template).toMatchInlineSnapshot(`\n \"await SentryFlutter.init(\n (options) {\n options.dsn = 'my-dsn';\n },\n appRunner: () => runApp(SentryWidget(child: const MyApp())),\n );\n // TODO: Remove this line after sending the first sample event to sentry.\n await Sentry.captureException(StateError('This is a sample exception.'));\"\n `);\n });\n });\n});\n"]}
@@ -2,107 +2,104 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const templates_1 = require("../../src/nextjs/templates");
4
4
  describe('Next.js code templates', () => {
5
- describe('getSentryConfigContents', () => {
6
- describe('client-side', () => {
7
- it('generates client-side Sentry config with all features enabled', () => {
8
- const template = (0, templates_1.getSentryConfigContents)('my-dsn', 'client', {
9
- performance: true,
10
- replay: true,
11
- });
12
- expect(template).toMatchInlineSnapshot(`
13
- "// This file configures the initialization of Sentry on the client.
14
- // The config you add here will be used whenever a users loads a page in their browser.
15
- // https://docs.sentry.io/platforms/javascript/guides/nextjs/
5
+ describe('getInstrumentationClientFileContents', () => {
6
+ it('generates client-side Sentry config with all features enabled', () => {
7
+ const template = (0, templates_1.getInstrumentationClientFileContents)('my-dsn', {
8
+ performance: true,
9
+ replay: true,
10
+ });
11
+ expect(template).toMatchInlineSnapshot(`
12
+ "// This file configures the initialization of Sentry on the client.
13
+ // The added config here will be used whenever a users loads a page in their browser.
14
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/
16
15
 
17
- import * as Sentry from "@sentry/nextjs";
16
+ import * as Sentry from "@sentry/nextjs";
18
17
 
19
- Sentry.init({
20
- dsn: "my-dsn",
18
+ Sentry.init({
19
+ dsn: "my-dsn",
21
20
 
22
- // Add optional integrations for additional features
23
- integrations: [
24
- Sentry.replayIntegration(),
25
- ],
21
+ // Add optional integrations for additional features
22
+ integrations: [
23
+ Sentry.replayIntegration(),
24
+ ],
26
25
 
27
- // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
28
- tracesSampleRate: 1,
26
+ // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
27
+ tracesSampleRate: 1,
29
28
 
30
- // Define how likely Replay events are sampled.
31
- // This sets the sample rate to be 10%. You may want this to be 100% while
32
- // in development and sample at a lower rate in production
33
- replaysSessionSampleRate: 0.1,
29
+ // Define how likely Replay events are sampled.
30
+ // This sets the sample rate to be 10%. You may want this to be 100% while
31
+ // in development and sample at a lower rate in production
32
+ replaysSessionSampleRate: 0.1,
34
33
 
35
- // Define how likely Replay events are sampled when an error occurs.
36
- replaysOnErrorSampleRate: 1.0,
34
+ // Define how likely Replay events are sampled when an error occurs.
35
+ replaysOnErrorSampleRate: 1.0,
37
36
 
38
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
39
- debug: false,
40
- });
41
- "
42
- `);
37
+ // Setting this option to true will print useful information to the console while you're setting up Sentry.
38
+ debug: false,
39
+ });"
40
+ `);
41
+ });
42
+ it('generates client-side Sentry config with performance monitoring disabled', () => {
43
+ const template = (0, templates_1.getInstrumentationClientFileContents)('my-dsn', {
44
+ performance: false,
45
+ replay: true,
43
46
  });
44
- it('generates client-side Sentry config with performance monitoring disabled', () => {
45
- const template = (0, templates_1.getSentryConfigContents)('my-dsn', 'client', {
46
- performance: false,
47
- replay: true,
48
- });
49
- expect(template).toMatchInlineSnapshot(`
50
- "// This file configures the initialization of Sentry on the client.
51
- // The config you add here will be used whenever a users loads a page in their browser.
52
- // https://docs.sentry.io/platforms/javascript/guides/nextjs/
47
+ expect(template).toMatchInlineSnapshot(`
48
+ "// This file configures the initialization of Sentry on the client.
49
+ // The added config here will be used whenever a users loads a page in their browser.
50
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/
53
51
 
54
- import * as Sentry from "@sentry/nextjs";
52
+ import * as Sentry from "@sentry/nextjs";
55
53
 
56
- Sentry.init({
57
- dsn: "my-dsn",
54
+ Sentry.init({
55
+ dsn: "my-dsn",
58
56
 
59
- // Add optional integrations for additional features
60
- integrations: [
61
- Sentry.replayIntegration(),
62
- ],
57
+ // Add optional integrations for additional features
58
+ integrations: [
59
+ Sentry.replayIntegration(),
60
+ ],
63
61
 
64
- // Define how likely Replay events are sampled.
65
- // This sets the sample rate to be 10%. You may want this to be 100% while
66
- // in development and sample at a lower rate in production
67
- replaysSessionSampleRate: 0.1,
62
+ // Define how likely Replay events are sampled.
63
+ // This sets the sample rate to be 10%. You may want this to be 100% while
64
+ // in development and sample at a lower rate in production
65
+ replaysSessionSampleRate: 0.1,
68
66
 
69
- // Define how likely Replay events are sampled when an error occurs.
70
- replaysOnErrorSampleRate: 1.0,
67
+ // Define how likely Replay events are sampled when an error occurs.
68
+ replaysOnErrorSampleRate: 1.0,
71
69
 
72
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
73
- debug: false,
74
- });
75
- "
76
- `);
70
+ // Setting this option to true will print useful information to the console while you're setting up Sentry.
71
+ debug: false,
72
+ });"
73
+ `);
74
+ });
75
+ it('generates client-side Sentry config with session replay disabled', () => {
76
+ const template = (0, templates_1.getInstrumentationClientFileContents)('my-dsn', {
77
+ performance: true,
78
+ replay: false,
77
79
  });
78
- it('generates client-side Sentry config with session replay disabled', () => {
79
- const template = (0, templates_1.getSentryConfigContents)('my-dsn', 'client', {
80
- performance: true,
81
- replay: false,
82
- });
83
- expect(template).toMatchInlineSnapshot(`
84
- "// This file configures the initialization of Sentry on the client.
85
- // The config you add here will be used whenever a users loads a page in their browser.
86
- // https://docs.sentry.io/platforms/javascript/guides/nextjs/
80
+ expect(template).toMatchInlineSnapshot(`
81
+ "// This file configures the initialization of Sentry on the client.
82
+ // The added config here will be used whenever a users loads a page in their browser.
83
+ // https://docs.sentry.io/platforms/javascript/guides/nextjs/
87
84
 
88
- import * as Sentry from "@sentry/nextjs";
85
+ import * as Sentry from "@sentry/nextjs";
89
86
 
90
- Sentry.init({
91
- dsn: "my-dsn",
87
+ Sentry.init({
88
+ dsn: "my-dsn",
92
89
 
93
- // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
94
- tracesSampleRate: 1,
90
+ // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.
91
+ tracesSampleRate: 1,
95
92
 
96
- // Setting this option to true will print useful information to the console while you're setting up Sentry.
97
- debug: false,
98
- });
99
- "
100
- `);
101
- });
93
+ // Setting this option to true will print useful information to the console while you're setting up Sentry.
94
+ debug: false,
95
+ });"
96
+ `);
102
97
  });
98
+ });
99
+ describe('getSentryServersideConfigContents', () => {
103
100
  describe('server-side', () => {
104
101
  it('generates server-side Sentry config with all features enabled', () => {
105
- const template = (0, templates_1.getSentryConfigContents)('my-dsn', 'server', {
102
+ const template = (0, templates_1.getSentryServersideConfigContents)('my-dsn', 'server', {
106
103
  performance: true,
107
104
  replay: true,
108
105
  });
@@ -126,7 +123,7 @@ describe('Next.js code templates', () => {
126
123
  `);
127
124
  });
128
125
  it('generates server-side Sentry config with performance monitoring disabled', () => {
129
- const template = (0, templates_1.getSentryConfigContents)('my-dsn', 'server', {
126
+ const template = (0, templates_1.getSentryServersideConfigContents)('my-dsn', 'server', {
130
127
  performance: false,
131
128
  replay: true,
132
129
  });
@@ -147,7 +144,7 @@ describe('Next.js code templates', () => {
147
144
  `);
148
145
  });
149
146
  it('generates server-side Sentry config with spotlight disabled', () => {
150
- const template = (0, templates_1.getSentryConfigContents)('my-dsn', 'server', {
147
+ const template = (0, templates_1.getSentryServersideConfigContents)('my-dsn', 'server', {
151
148
  performance: true,
152
149
  replay: true,
153
150
  });
@@ -173,7 +170,7 @@ describe('Next.js code templates', () => {
173
170
  });
174
171
  describe('edge', () => {
175
172
  it('generates edge Sentry config with all features enabled', () => {
176
- const template = (0, templates_1.getSentryConfigContents)('my-dsn', 'edge', {
173
+ const template = (0, templates_1.getSentryServersideConfigContents)('my-dsn', 'edge', {
177
174
  performance: true,
178
175
  replay: true,
179
176
  });
@@ -198,7 +195,7 @@ describe('Next.js code templates', () => {
198
195
  `);
199
196
  });
200
197
  it('generates edge Sentry config with performance monitoring disabled', () => {
201
- const template = (0, templates_1.getSentryConfigContents)('my-dsn', 'edge', {
198
+ const template = (0, templates_1.getSentryServersideConfigContents)('my-dsn', 'edge', {
202
199
  performance: false,
203
200
  replay: true,
204
201
  });
@@ -229,7 +226,6 @@ describe('Next.js code templates', () => {
229
226
  selfHosted: false,
230
227
  sentryUrl: 'https://dont-use-this-url.com',
231
228
  tunnelRoute: true,
232
- reactComponentAnnotation: false,
233
229
  });
234
230
  expect(template).toMatchInlineSnapshot(`
235
231
  "{
@@ -272,7 +268,6 @@ describe('Next.js code templates', () => {
272
268
  selfHosted: true,
273
269
  sentryUrl: 'https://my-sentry.com',
274
270
  tunnelRoute: true,
275
- reactComponentAnnotation: false,
276
271
  });
277
272
  expect(template).toMatchInlineSnapshot(`
278
273
  "{
@@ -316,7 +311,6 @@ describe('Next.js code templates', () => {
316
311
  selfHosted: false,
317
312
  sentryUrl: 'https://dont-use-this-url.com',
318
313
  tunnelRoute: false,
319
- reactComponentAnnotation: false,
320
314
  });
321
315
  expect(template).toMatchInlineSnapshot(`
322
316
  "{
@@ -352,53 +346,53 @@ describe('Next.js code templates', () => {
352
346
  }"
353
347
  `);
354
348
  });
355
- it('adds `reactComponentAnnotations` option if `reactComponentAnnotations` is enabled', () => {
356
- const template = (0, templates_1.getWithSentryConfigOptionsTemplate)({
357
- orgSlug: 'my-org',
358
- projectSlug: 'my-project',
359
- selfHosted: false,
360
- sentryUrl: 'https://dont-use-this-url.com',
361
- tunnelRoute: true,
362
- reactComponentAnnotation: true,
363
- });
364
- expect(template).toMatchInlineSnapshot(`
365
- "{
366
- // For all available options, see:
367
- // https://www.npmjs.com/package/@sentry/webpack-plugin#options
368
-
369
- org: "my-org",
370
- project: "my-project",
371
-
372
- // Only print logs for uploading source maps in CI
373
- silent: !process.env.CI,
374
-
375
- // For all available options, see:
376
- // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
377
-
378
- // Upload a larger set of source maps for prettier stack traces (increases build time)
379
- widenClientFileUpload: true,
380
-
381
- // Automatically annotate React components to show their full name in breadcrumbs and session replay
382
- reactComponentAnnotation: {
383
- enabled: true,
384
- },
385
-
386
- // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.
387
- // This can increase your server load as well as your hosting bill.
388
- // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-
389
- // side errors will fail.
390
- tunnelRoute: "/monitoring",
391
-
392
- // Automatically tree-shake Sentry logger statements to reduce bundle size
393
- disableLogger: true,
394
-
395
- // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)
396
- // See the following for more information:
397
- // https://docs.sentry.io/product/crons/
398
- // https://vercel.com/docs/cron-jobs
399
- automaticVercelMonitors: true,
400
- }"
401
- `);
349
+ });
350
+ describe('getRootLayout', () => {
351
+ it('generates a root layout component with types', () => {
352
+ expect((0, templates_1.getRootLayout)(true)).toMatchInlineSnapshot(`
353
+ "// This file was generated by the Sentry wizard because we couldn't find a root layout file.
354
+ // You can delete this file at any time.
355
+
356
+ export const metadata = {
357
+ title: 'Sentry NextJS Example',
358
+ description: 'Generated by Sentry',
359
+ }
360
+
361
+ export default function RootLayout({
362
+ children,
363
+ }: {
364
+ children: React.ReactNode
365
+ }) {
366
+ return (
367
+ <html lang="en">
368
+ <body>{children}</body>
369
+ </html>
370
+ )
371
+ }
372
+ "
373
+ `);
374
+ });
375
+ it('generates a root layout component without types', () => {
376
+ expect((0, templates_1.getRootLayout)(false)).toMatchInlineSnapshot(`
377
+ "// This file was generated by the Sentry wizard because we couldn't find a root layout file.
378
+ // You can delete this file at any time.
379
+
380
+ export const metadata = {
381
+ title: 'Sentry NextJS Example',
382
+ description: 'Generated by Sentry',
383
+ }
384
+
385
+ export default function RootLayout({
386
+ children,
387
+ }) {
388
+ return (
389
+ <html lang="en">
390
+ <body>{children}</body>
391
+ </html>
392
+ )
393
+ }
394
+ "
395
+ `);
402
396
  });
403
397
  });
404
398
  });
@@ -1 +1 @@
1
- {"version":3,"file":"templates.test.js","sourceRoot":"","sources":["../../../test/nextjs/templates.test.ts"],"names":[],"mappings":";;AAAA,0DAGoC;AAEpC,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACvC,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;YAC3B,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;gBACvE,MAAM,QAAQ,GAAG,IAAA,mCAAuB,EAAC,QAAQ,EAAE,QAAQ,EAAE;oBAC3D,WAAW,EAAE,IAAI;oBACjB,MAAM,EAAE,IAAI;iBACb,CAAC,CAAC;gBAEH,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SA8BtC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,0EAA0E,EAAE,GAAG,EAAE;gBAClF,MAAM,QAAQ,GAAG,IAAA,mCAAuB,EAAC,QAAQ,EAAE,QAAQ,EAAE;oBAC3D,WAAW,EAAE,KAAK;oBAClB,MAAM,EAAE,IAAI;iBACb,CAAC,CAAC;gBA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;;;;;;;;;;;;;;;;;;;aAqChC,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {\n getSentryConfigContents,\n getWithSentryConfigOptionsTemplate,\n} from '../../src/nextjs/templates';\n\ndescribe('Next.js code templates', () => {\n describe('getSentryConfigContents', () => {\n describe('client-side', () => {\n it('generates client-side Sentry config with all features enabled', () => {\n const template = getSentryConfigContents('my-dsn', 'client', {\n performance: true,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the client.\n // The config you add here will be used whenever a users loads a page in their browser.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Add optional integrations for additional features\n integrations: [\n Sentry.replayIntegration(),\n ],\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Define how likely Replay events are sampled.\n // This sets the sample rate to be 10%. You may want this to be 100% while\n // in development and sample at a lower rate in production\n replaysSessionSampleRate: 0.1,\n\n // Define how likely Replay events are sampled when an error occurs.\n replaysOnErrorSampleRate: 1.0,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n\n it('generates client-side Sentry config with performance monitoring disabled', () => {\n const template = getSentryConfigContents('my-dsn', 'client', {\n performance: false,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the client.\n // The config you add here will be used whenever a users loads a page in their browser.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Add optional integrations for additional features\n integrations: [\n Sentry.replayIntegration(),\n ],\n\n // Define how likely Replay events are sampled.\n // This sets the sample rate to be 10%. You may want this to be 100% while\n // in development and sample at a lower rate in production\n replaysSessionSampleRate: 0.1,\n\n // Define how likely Replay events are sampled when an error occurs.\n replaysOnErrorSampleRate: 1.0,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n\n it('generates client-side Sentry config with session replay disabled', () => {\n const template = getSentryConfigContents('my-dsn', 'client', {\n performance: true,\n replay: false,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the client.\n // The config you add here will be used whenever a users loads a page in their browser.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n });\n\n describe('server-side', () => {\n it('generates server-side Sentry config with all features enabled', () => {\n const template = getSentryConfigContents('my-dsn', 'server', {\n performance: true,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the server.\n // The config you add here will be used whenever the server handles a request.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n\n it('generates server-side Sentry config with performance monitoring disabled', () => {\n const template = getSentryConfigContents('my-dsn', 'server', {\n performance: false,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the server.\n // The config you add here will be used whenever the server handles a request.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n\n it('generates server-side Sentry config with spotlight disabled', () => {\n const template = getSentryConfigContents('my-dsn', 'server', {\n performance: true,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the server.\n // The config you add here will be used whenever the server handles a request.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n });\n\n describe('edge', () => {\n it('generates edge Sentry config with all features enabled', () => {\n const template = getSentryConfigContents('my-dsn', 'edge', {\n performance: true,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).\n // The config you add here will be used whenever one of the edge features is loaded.\n // Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n\n it('generates edge Sentry config with performance monitoring disabled', () => {\n const template = getSentryConfigContents('my-dsn', 'edge', {\n performance: false,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).\n // The config you add here will be used whenever one of the edge features is loaded.\n // Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n });\n });\n\n describe('getWithSentryConfigOptionsTemplate', () => {\n it('generates options for SaaS', () => {\n const template = getWithSentryConfigOptionsTemplate({\n orgSlug: 'my-org',\n projectSlug: 'my-project',\n selfHosted: false,\n sentryUrl: 'https://dont-use-this-url.com',\n tunnelRoute: true,\n reactComponentAnnotation: false,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"{\n // For all available options, see:\n // https://www.npmjs.com/package/@sentry/webpack-plugin#options\n\n org: \"my-org\",\n project: \"my-project\",\n\n // Only print logs for uploading source maps in CI\n silent: !process.env.CI,\n\n // For all available options, see:\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/\n\n // Upload a larger set of source maps for prettier stack traces (increases build time)\n widenClientFileUpload: true,\n\n // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.\n // This can increase your server load as well as your hosting bill.\n // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-\n // side errors will fail.\n tunnelRoute: \"/monitoring\",\n\n // Automatically tree-shake Sentry logger statements to reduce bundle size\n disableLogger: true,\n\n // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)\n // See the following for more information:\n // https://docs.sentry.io/product/crons/\n // https://vercel.com/docs/cron-jobs\n automaticVercelMonitors: true,\n }\"\n `);\n });\n\n it('generates options for self-hosted', () => {\n const template = getWithSentryConfigOptionsTemplate({\n orgSlug: 'my-org',\n projectSlug: 'my-project',\n selfHosted: true,\n sentryUrl: 'https://my-sentry.com',\n tunnelRoute: true,\n reactComponentAnnotation: false,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"{\n // For all available options, see:\n // https://www.npmjs.com/package/@sentry/webpack-plugin#options\n\n org: \"my-org\",\n project: \"my-project\",\n sentryUrl: \"https://my-sentry.com\",\n\n // Only print logs for uploading source maps in CI\n silent: !process.env.CI,\n\n // For all available options, see:\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/\n\n // Upload a larger set of source maps for prettier stack traces (increases build time)\n widenClientFileUpload: true,\n\n // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.\n // This can increase your server load as well as your hosting bill.\n // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-\n // side errors will fail.\n tunnelRoute: \"/monitoring\",\n\n // Automatically tree-shake Sentry logger statements to reduce bundle size\n disableLogger: true,\n\n // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)\n // See the following for more information:\n // https://docs.sentry.io/product/crons/\n // https://vercel.com/docs/cron-jobs\n automaticVercelMonitors: true,\n }\"\n `);\n });\n\n it('comments out tunnelRoute if `tunnelRoute` option is disabled', () => {\n const template = getWithSentryConfigOptionsTemplate({\n orgSlug: 'my-org',\n projectSlug: 'my-project',\n selfHosted: false,\n sentryUrl: 'https://dont-use-this-url.com',\n tunnelRoute: false,\n reactComponentAnnotation: false,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"{\n // For all available options, see:\n // https://www.npmjs.com/package/@sentry/webpack-plugin#options\n\n org: \"my-org\",\n project: \"my-project\",\n\n // Only print logs for uploading source maps in CI\n silent: !process.env.CI,\n\n // For all available options, see:\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/\n\n // Upload a larger set of source maps for prettier stack traces (increases build time)\n widenClientFileUpload: true,\n\n // Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.\n // This can increase your server load as well as your hosting bill.\n // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-\n // side errors will fail.\n // tunnelRoute: \"/monitoring\",\n\n // Automatically tree-shake Sentry logger statements to reduce bundle size\n disableLogger: true,\n\n // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)\n // See the following for more information:\n // https://docs.sentry.io/product/crons/\n // https://vercel.com/docs/cron-jobs\n automaticVercelMonitors: true,\n }\"\n `);\n });\n\n it('adds `reactComponentAnnotations` option if `reactComponentAnnotations` is enabled', () => {\n const template = getWithSentryConfigOptionsTemplate({\n orgSlug: 'my-org',\n projectSlug: 'my-project',\n selfHosted: false,\n sentryUrl: 'https://dont-use-this-url.com',\n tunnelRoute: true,\n reactComponentAnnotation: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"{\n // For all available options, see:\n // https://www.npmjs.com/package/@sentry/webpack-plugin#options\n\n org: \"my-org\",\n project: \"my-project\",\n\n // Only print logs for uploading source maps in CI\n silent: !process.env.CI,\n\n // For all available options, see:\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/\n\n // Upload a larger set of source maps for prettier stack traces (increases build time)\n widenClientFileUpload: true,\n\n // Automatically annotate React components to show their full name in breadcrumbs and session replay\n reactComponentAnnotation: {\n enabled: true,\n },\n\n // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.\n // This can increase your server load as well as your hosting bill.\n // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-\n // side errors will fail.\n tunnelRoute: \"/monitoring\",\n\n // Automatically tree-shake Sentry logger statements to reduce bundle size\n disableLogger: true,\n\n // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)\n // See the following for more information:\n // https://docs.sentry.io/product/crons/\n // https://vercel.com/docs/cron-jobs\n automaticVercelMonitors: true,\n }\"\n `);\n });\n });\n});\n"]}
1
+ {"version":3,"file":"templates.test.js","sourceRoot":"","sources":["../../../test/nextjs/templates.test.ts"],"names":[],"mappings":";;AAAA,0DAKoC;AAEpC,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,QAAQ,CAAC,sCAAsC,EAAE,GAAG,EAAE;QACpD,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;YACvE,MAAM,QAAQ,GAAG,IAAA,gDAAoC,EAAC,QAAQ,EAAE;gBAC9D,WAAW,EAAE,IAAI;gBACjB,MAAM,EAAE,IAAI;aACb,CAAC,CAAC;YAEH,MAAM,CAAC,QAAQ,CAAC,CAAC,q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BAAa,EAAC,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;OAqBjD,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QACH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;YACzD,MAAM,CAAC,IAAA,yBAAa,EAAC,KAAK,CAAC,CAAC,CAAC,qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;OAmBlD,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import {\n getRootLayout,\n getSentryServersideConfigContents,\n getInstrumentationClientFileContents,\n getWithSentryConfigOptionsTemplate,\n} from '../../src/nextjs/templates';\n\ndescribe('Next.js code templates', () => {\n describe('getInstrumentationClientFileContents', () => {\n it('generates client-side Sentry config with all features enabled', () => {\n const template = getInstrumentationClientFileContents('my-dsn', {\n performance: true,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the client.\n // The added config here will be used whenever a users loads a page in their browser.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Add optional integrations for additional features\n integrations: [\n Sentry.replayIntegration(),\n ],\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Define how likely Replay events are sampled.\n // This sets the sample rate to be 10%. You may want this to be 100% while\n // in development and sample at a lower rate in production\n replaysSessionSampleRate: 0.1,\n\n // Define how likely Replay events are sampled when an error occurs.\n replaysOnErrorSampleRate: 1.0,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\"\n `);\n });\n\n it('generates client-side Sentry config with performance monitoring disabled', () => {\n const template = getInstrumentationClientFileContents('my-dsn', {\n performance: false,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the client.\n // The added config here will be used whenever a users loads a page in their browser.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Add optional integrations for additional features\n integrations: [\n Sentry.replayIntegration(),\n ],\n\n // Define how likely Replay events are sampled.\n // This sets the sample rate to be 10%. You may want this to be 100% while\n // in development and sample at a lower rate in production\n replaysSessionSampleRate: 0.1,\n\n // Define how likely Replay events are sampled when an error occurs.\n replaysOnErrorSampleRate: 1.0,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\"\n `);\n });\n\n it('generates client-side Sentry config with session replay disabled', () => {\n const template = getInstrumentationClientFileContents('my-dsn', {\n performance: true,\n replay: false,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the client.\n // The added config here will be used whenever a users loads a page in their browser.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\"\n `);\n });\n });\n\n describe('getSentryServersideConfigContents', () => {\n describe('server-side', () => {\n it('generates server-side Sentry config with all features enabled', () => {\n const template = getSentryServersideConfigContents('my-dsn', 'server', {\n performance: true,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the server.\n // The config you add here will be used whenever the server handles a request.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n\n it('generates server-side Sentry config with performance monitoring disabled', () => {\n const template = getSentryServersideConfigContents('my-dsn', 'server', {\n performance: false,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the server.\n // The config you add here will be used whenever the server handles a request.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n\n it('generates server-side Sentry config with spotlight disabled', () => {\n const template = getSentryServersideConfigContents('my-dsn', 'server', {\n performance: true,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry on the server.\n // The config you add here will be used whenever the server handles a request.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n });\n\n describe('edge', () => {\n it('generates edge Sentry config with all features enabled', () => {\n const template = getSentryServersideConfigContents('my-dsn', 'edge', {\n performance: true,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).\n // The config you add here will be used whenever one of the edge features is loaded.\n // Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Define how likely traces are sampled. Adjust this value in production, or use tracesSampler for greater control.\n tracesSampleRate: 1,\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n\n it('generates edge Sentry config with performance monitoring disabled', () => {\n const template = getSentryServersideConfigContents('my-dsn', 'edge', {\n performance: false,\n replay: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"// This file configures the initialization of Sentry for edge features (middleware, edge routes, and so on).\n // The config you add here will be used whenever one of the edge features is loaded.\n // Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\n import * as Sentry from \"@sentry/nextjs\";\n\n Sentry.init({\n dsn: \"my-dsn\",\n\n // Setting this option to true will print useful information to the console while you're setting up Sentry.\n debug: false,\n });\n \"\n `);\n });\n });\n });\n\n describe('getWithSentryConfigOptionsTemplate', () => {\n it('generates options for SaaS', () => {\n const template = getWithSentryConfigOptionsTemplate({\n orgSlug: 'my-org',\n projectSlug: 'my-project',\n selfHosted: false,\n sentryUrl: 'https://dont-use-this-url.com',\n tunnelRoute: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"{\n // For all available options, see:\n // https://www.npmjs.com/package/@sentry/webpack-plugin#options\n\n org: \"my-org\",\n project: \"my-project\",\n\n // Only print logs for uploading source maps in CI\n silent: !process.env.CI,\n\n // For all available options, see:\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/\n\n // Upload a larger set of source maps for prettier stack traces (increases build time)\n widenClientFileUpload: true,\n\n // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.\n // This can increase your server load as well as your hosting bill.\n // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-\n // side errors will fail.\n tunnelRoute: \"/monitoring\",\n\n // Automatically tree-shake Sentry logger statements to reduce bundle size\n disableLogger: true,\n\n // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)\n // See the following for more information:\n // https://docs.sentry.io/product/crons/\n // https://vercel.com/docs/cron-jobs\n automaticVercelMonitors: true,\n }\"\n `);\n });\n\n it('generates options for self-hosted', () => {\n const template = getWithSentryConfigOptionsTemplate({\n orgSlug: 'my-org',\n projectSlug: 'my-project',\n selfHosted: true,\n sentryUrl: 'https://my-sentry.com',\n tunnelRoute: true,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"{\n // For all available options, see:\n // https://www.npmjs.com/package/@sentry/webpack-plugin#options\n\n org: \"my-org\",\n project: \"my-project\",\n sentryUrl: \"https://my-sentry.com\",\n\n // Only print logs for uploading source maps in CI\n silent: !process.env.CI,\n\n // For all available options, see:\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/\n\n // Upload a larger set of source maps for prettier stack traces (increases build time)\n widenClientFileUpload: true,\n\n // Route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.\n // This can increase your server load as well as your hosting bill.\n // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-\n // side errors will fail.\n tunnelRoute: \"/monitoring\",\n\n // Automatically tree-shake Sentry logger statements to reduce bundle size\n disableLogger: true,\n\n // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)\n // See the following for more information:\n // https://docs.sentry.io/product/crons/\n // https://vercel.com/docs/cron-jobs\n automaticVercelMonitors: true,\n }\"\n `);\n });\n\n it('comments out tunnelRoute if `tunnelRoute` option is disabled', () => {\n const template = getWithSentryConfigOptionsTemplate({\n orgSlug: 'my-org',\n projectSlug: 'my-project',\n selfHosted: false,\n sentryUrl: 'https://dont-use-this-url.com',\n tunnelRoute: false,\n });\n\n expect(template).toMatchInlineSnapshot(`\n \"{\n // For all available options, see:\n // https://www.npmjs.com/package/@sentry/webpack-plugin#options\n\n org: \"my-org\",\n project: \"my-project\",\n\n // Only print logs for uploading source maps in CI\n silent: !process.env.CI,\n\n // For all available options, see:\n // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/\n\n // Upload a larger set of source maps for prettier stack traces (increases build time)\n widenClientFileUpload: true,\n\n // Uncomment to route browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers.\n // This can increase your server load as well as your hosting bill.\n // Note: Check that the configured route will not match with your Next.js middleware, otherwise reporting of client-\n // side errors will fail.\n // tunnelRoute: \"/monitoring\",\n\n // Automatically tree-shake Sentry logger statements to reduce bundle size\n disableLogger: true,\n\n // Enables automatic instrumentation of Vercel Cron Monitors. (Does not yet work with App Router route handlers.)\n // See the following for more information:\n // https://docs.sentry.io/product/crons/\n // https://vercel.com/docs/cron-jobs\n automaticVercelMonitors: true,\n }\"\n `);\n });\n });\n\n describe('getRootLayout', () => {\n it('generates a root layout component with types', () => {\n expect(getRootLayout(true)).toMatchInlineSnapshot(`\n \"// This file was generated by the Sentry wizard because we couldn't find a root layout file.\n // You can delete this file at any time.\n\n export const metadata = {\n title: 'Sentry NextJS Example',\n description: 'Generated by Sentry',\n }\n\n export default function RootLayout({\n children,\n }: {\n children: React.ReactNode\n }) {\n return (\n <html lang=\"en\">\n <body>{children}</body>\n </html>\n )\n }\n \"\n `);\n });\n it('generates a root layout component without types', () => {\n expect(getRootLayout(false)).toMatchInlineSnapshot(`\n \"// This file was generated by the Sentry wizard because we couldn't find a root layout file.\n // You can delete this file at any time.\n\n export const metadata = {\n title: 'Sentry NextJS Example',\n description: 'Generated by Sentry',\n }\n\n export default function RootLayout({\n children,\n }) {\n return (\n <html lang=\"en\">\n <body>{children}</body>\n </html>\n )\n }\n \"\n `);\n });\n });\n});\n"]}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- // @ts-ignore - magicast is ESM and TS complains about that. It works though
3
+ // @ts-expect-error - magicast is ESM and TS complains about that. It works though
4
4
  const magicast_1 = require("magicast");
5
5
  const expo_metro_1 = require("../../src/react-native/expo-metro");
6
6
  describe('expo-metro config', () => {
@@ -1 +1 @@
1
- {"version":3,"file":"expo-metro.test.js","sourceRoot":"","sources":["../../../test/react-native/expo-metro.test.ts"],"names":[],"mappings":";;AAAA,4EAA4E;AAC5E,uCAAqD;AACrD,kEAAuE;AAEvE,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,IAAI,CAAC,6BAA6B,EAAE,GAAG,EAAE;QACvC,MAA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about that. It works though\nimport { generateCode, parseModule } from 'magicast';\nimport { patchMetroInMemory } from '../../src/react-native/expo-metro';\n\ndescribe('expo-metro config', () => {\n test('patches minimal expo config', () => {\n const mod = parseModule(`\nconst { getDefaultConfig } = require(\"expo/metro-config\");\n\n/** @type {import('expo/metro-config').MetroConfig} */\nconst config = getDefaultConfig(__dirname);\n\nconfig.resolver.assetExts.push(\n // Adds support for .db files for SQLite databases\n 'db'\n);\n\nmodule.exports = config;\n `);\n\n const result = patchMetroInMemory(mod);\n expect(result).toBe(true);\n expect(generateCode(mod.$ast).code).toBe(\n `\nconst {\n getSentryExpoConfig\n} = require(\"@sentry/react-native/metro\");\n\n/** @type {import('expo/metro-config').MetroConfig} */\nconst config = getSentryExpoConfig(__dirname);\n\nconfig.resolver.assetExts.push(\n // Adds support for .db files for SQLite databases\n 'db'\n);\n\nmodule.exports = config;\n`.trim(),\n );\n });\n\n test('keeps expo metro config if other imports are present', () => {\n const mod = parseModule(`\nconst { getDefaultConfig, otherExport } = require(\"expo/metro-config\");\n\nconst config = getDefaultConfig(__dirname);\n\nmodule.exports = config;\n `);\n\n const result = patchMetroInMemory(mod);\n expect(result).toBe(true);\n expect(generateCode(mod.$ast).code).toBe(\n `\nconst { getDefaultConfig, otherExport } = require(\"expo/metro-config\");\n\nconst {\n getSentryExpoConfig\n} = require(\"@sentry/react-native/metro\");\n\nconst config = getSentryExpoConfig(__dirname);\n\nmodule.exports = config;\n`.trim(),\n );\n });\n\n test('does not modify when sentry already present', () => {\n const mod = parseModule(`\nconst { getSentryExpoConfig } = require(\"@sentry/react-native/metro\");\n`);\n\n const result = patchMetroInMemory(mod);\n expect(result).toBe(false);\n expect(generateCode(mod.$ast).code).toBe(\n `\nconst { getSentryExpoConfig } = require(\"@sentry/react-native/metro\");\n`.trim(),\n );\n });\n});\n"]}
1
+ {"version":3,"file":"expo-metro.test.js","sourceRoot":"","sources":["../../../test/react-native/expo-metro.test.ts"],"names":[],"mappings":";;AAAA,kFAAkF;AA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AI,CACtC;;CAEL,CAAC,IAAI,EAAE,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["// @ts-expect-error - magicast is ESM and TS complains about that. It works though\nimport { generateCode, parseModule } from 'magicast';\nimport { patchMetroInMemory } from '../../src/react-native/expo-metro';\n\ndescribe('expo-metro config', () => {\n test('patches minimal expo config', () => {\n const mod = parseModule(`\nconst { getDefaultConfig } = require(\"expo/metro-config\");\n\n/** @type {import('expo/metro-config').MetroConfig} */\nconst config = getDefaultConfig(__dirname);\n\nconfig.resolver.assetExts.push(\n // Adds support for .db files for SQLite databases\n 'db'\n);\n\nmodule.exports = config;\n `);\n\n const result = patchMetroInMemory(mod);\n expect(result).toBe(true);\n expect(generateCode(mod.$ast).code).toBe(\n `\nconst {\n getSentryExpoConfig\n} = require(\"@sentry/react-native/metro\");\n\n/** @type {import('expo/metro-config').MetroConfig} */\nconst config = getSentryExpoConfig(__dirname);\n\nconfig.resolver.assetExts.push(\n // Adds support for .db files for SQLite databases\n 'db'\n);\n\nmodule.exports = config;\n`.trim(),\n );\n });\n\n test('keeps expo metro config if other imports are present', () => {\n const mod = parseModule(`\nconst { getDefaultConfig, otherExport } = require(\"expo/metro-config\");\n\nconst config = getDefaultConfig(__dirname);\n\nmodule.exports = config;\n `);\n\n const result = patchMetroInMemory(mod);\n expect(result).toBe(true);\n expect(generateCode(mod.$ast).code).toBe(\n `\nconst { getDefaultConfig, otherExport } = require(\"expo/metro-config\");\n\nconst {\n getSentryExpoConfig\n} = require(\"@sentry/react-native/metro\");\n\nconst config = getSentryExpoConfig(__dirname);\n\nmodule.exports = config;\n`.trim(),\n );\n });\n\n test('does not modify when sentry already present', () => {\n const mod = parseModule(`\nconst { getSentryExpoConfig } = require(\"@sentry/react-native/metro\");\n`);\n\n const result = patchMetroInMemory(mod);\n expect(result).toBe(false);\n expect(generateCode(mod.$ast).code).toBe(\n `\nconst { getSentryExpoConfig } = require(\"@sentry/react-native/metro\");\n`.trim(),\n );\n });\n});\n"]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const javascript_1 = require("../../src/react-native/javascript");
4
- // @ts-ignore - magicast is ESM and TS complains about that. It works though
4
+ // @ts-expect-error - magicast is ESM and TS complains about that. It works though
5
5
  const magicast_1 = require("magicast");
6
6
  describe('react-native javascript', () => {
7
7
  describe('addSentryInitWithSdkImport', () => {