@sentry/wizard 6.6.0 → 6.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 (116) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/LICENSE +97 -8
  3. package/dist/bin.js +5 -0
  4. package/dist/bin.js.map +1 -1
  5. package/dist/e2e-tests/tests/help-message.test.js +5 -1
  6. package/dist/e2e-tests/tests/help-message.test.js.map +1 -1
  7. package/dist/e2e-tests/tests/nextjs-15.test.js +79 -0
  8. package/dist/e2e-tests/tests/nextjs-15.test.js.map +1 -1
  9. package/dist/e2e-tests/tests/react-router.test.d.ts +1 -0
  10. package/dist/e2e-tests/tests/react-router.test.js +255 -0
  11. package/dist/e2e-tests/tests/react-router.test.js.map +1 -0
  12. package/dist/e2e-tests/utils/index.d.ts +8 -2
  13. package/dist/e2e-tests/utils/index.js +72 -21
  14. package/dist/e2e-tests/utils/index.js.map +1 -1
  15. package/dist/lib/Constants.d.ts +1 -0
  16. package/dist/lib/Constants.js +5 -0
  17. package/dist/lib/Constants.js.map +1 -1
  18. package/dist/src/android/android-wizard.js +8 -1
  19. package/dist/src/android/android-wizard.js.map +1 -1
  20. package/dist/src/angular/angular-wizard.js +8 -1
  21. package/dist/src/angular/angular-wizard.js.map +1 -1
  22. package/dist/src/apple/apple-wizard.js +8 -1
  23. package/dist/src/apple/apple-wizard.js.map +1 -1
  24. package/dist/src/flutter/flutter-wizard.js +8 -1
  25. package/dist/src/flutter/flutter-wizard.js.map +1 -1
  26. package/dist/src/nextjs/nextjs-wizard.js +35 -9
  27. package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
  28. package/dist/src/nextjs/templates.d.ts +3 -3
  29. package/dist/src/nextjs/templates.js +18 -7
  30. package/dist/src/nextjs/templates.js.map +1 -1
  31. package/dist/src/nuxt/nuxt-wizard.js +8 -1
  32. package/dist/src/nuxt/nuxt-wizard.js.map +1 -1
  33. package/dist/src/react-native/react-native-wizard.js +8 -1
  34. package/dist/src/react-native/react-native-wizard.js.map +1 -1
  35. package/dist/src/react-router/codemods/client.entry.d.ts +1 -0
  36. package/dist/src/react-router/codemods/client.entry.js +73 -0
  37. package/dist/src/react-router/codemods/client.entry.js.map +1 -0
  38. package/dist/src/react-router/codemods/react-router-config.d.ts +9 -0
  39. package/dist/src/react-router/codemods/react-router-config.js +178 -0
  40. package/dist/src/react-router/codemods/react-router-config.js.map +1 -0
  41. package/dist/src/react-router/codemods/root.d.ts +1 -0
  42. package/dist/src/react-router/codemods/root.js +171 -0
  43. package/dist/src/react-router/codemods/root.js.map +1 -0
  44. package/dist/src/react-router/codemods/routes-config.d.ts +1 -0
  45. package/dist/src/react-router/codemods/routes-config.js +106 -0
  46. package/dist/src/react-router/codemods/routes-config.js.map +1 -0
  47. package/dist/src/react-router/codemods/server-entry.d.ts +4 -0
  48. package/dist/src/react-router/codemods/server-entry.js +275 -0
  49. package/dist/src/react-router/codemods/server-entry.js.map +1 -0
  50. package/dist/src/react-router/codemods/utils.d.ts +2 -0
  51. package/dist/src/react-router/codemods/utils.js +13 -0
  52. package/dist/src/react-router/codemods/utils.js.map +1 -0
  53. package/dist/src/react-router/codemods/vite.d.ts +8 -0
  54. package/dist/src/react-router/codemods/vite.js +169 -0
  55. package/dist/src/react-router/codemods/vite.js.map +1 -0
  56. package/dist/src/react-router/react-router-wizard.d.ts +2 -0
  57. package/dist/src/react-router/react-router-wizard.js +254 -0
  58. package/dist/src/react-router/react-router-wizard.js.map +1 -0
  59. package/dist/src/react-router/sdk-example.d.ts +18 -0
  60. package/dist/src/react-router/sdk-example.js +306 -0
  61. package/dist/src/react-router/sdk-example.js.map +1 -0
  62. package/dist/src/react-router/sdk-setup.d.ts +17 -0
  63. package/dist/src/react-router/sdk-setup.js +250 -0
  64. package/dist/src/react-router/sdk-setup.js.map +1 -0
  65. package/dist/src/react-router/templates.d.ts +11 -0
  66. package/dist/src/react-router/templates.js +273 -0
  67. package/dist/src/react-router/templates.js.map +1 -0
  68. package/dist/src/remix/remix-wizard.js +8 -1
  69. package/dist/src/remix/remix-wizard.js.map +1 -1
  70. package/dist/src/run.d.ts +2 -1
  71. package/dist/src/run.js +6 -0
  72. package/dist/src/run.js.map +1 -1
  73. package/dist/src/sourcemaps/sourcemaps-wizard.js +8 -1
  74. package/dist/src/sourcemaps/sourcemaps-wizard.js.map +1 -1
  75. package/dist/src/sveltekit/sveltekit-wizard.js +8 -1
  76. package/dist/src/sveltekit/sveltekit-wizard.js.map +1 -1
  77. package/dist/src/utils/ast-utils.d.ts +30 -0
  78. package/dist/src/utils/ast-utils.js +71 -1
  79. package/dist/src/utils/ast-utils.js.map +1 -1
  80. package/dist/src/utils/clack/index.d.ts +5 -2
  81. package/dist/src/utils/clack/index.js +14 -2
  82. package/dist/src/utils/clack/index.js.map +1 -1
  83. package/dist/src/utils/types.d.ts +9 -0
  84. package/dist/src/utils/types.js.map +1 -1
  85. package/dist/src/version.d.ts +1 -1
  86. package/dist/src/version.js +1 -1
  87. package/dist/src/version.js.map +1 -1
  88. package/dist/test/nextjs/templates.test.js +20 -0
  89. package/dist/test/nextjs/templates.test.js.map +1 -1
  90. package/dist/test/react-router/codemods/client-entry.test.d.ts +1 -0
  91. package/dist/test/react-router/codemods/client-entry.test.js +168 -0
  92. package/dist/test/react-router/codemods/client-entry.test.js.map +1 -0
  93. package/dist/test/react-router/codemods/react-router-config.test.d.ts +1 -0
  94. package/dist/test/react-router/codemods/react-router-config.test.js +168 -0
  95. package/dist/test/react-router/codemods/react-router-config.test.js.map +1 -0
  96. package/dist/test/react-router/codemods/root.test.d.ts +1 -0
  97. package/dist/test/react-router/codemods/root.test.js +178 -0
  98. package/dist/test/react-router/codemods/root.test.js.map +1 -0
  99. package/dist/test/react-router/codemods/server-entry.test.d.ts +1 -0
  100. package/dist/test/react-router/codemods/server-entry.test.js +415 -0
  101. package/dist/test/react-router/codemods/server-entry.test.js.map +1 -0
  102. package/dist/test/react-router/codemods/vite.test.d.ts +1 -0
  103. package/dist/test/react-router/codemods/vite.test.js +158 -0
  104. package/dist/test/react-router/codemods/vite.test.js.map +1 -0
  105. package/dist/test/react-router/routes-config.test.d.ts +1 -0
  106. package/dist/test/react-router/routes-config.test.js +156 -0
  107. package/dist/test/react-router/routes-config.test.js.map +1 -0
  108. package/dist/test/react-router/sdk-setup.test.d.ts +1 -0
  109. package/dist/test/react-router/sdk-setup.test.js +411 -0
  110. package/dist/test/react-router/sdk-setup.test.js.map +1 -0
  111. package/dist/test/react-router/templates.test.d.ts +1 -0
  112. package/dist/test/react-router/templates.test.js +220 -0
  113. package/dist/test/react-router/templates.test.js.map +1 -0
  114. package/dist/test/utils/clack/index.test.js +1 -1
  115. package/dist/test/utils/clack/index.test.js.map +1 -1
  116. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,7 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## 6.7.0
4
+
5
+ ### Features
6
+
7
+ - feat: Add wizard for `react-router` framework mode ([#1076](https://github.com/getsentry/sentry-wizard/pull/1076))
8
+
9
+ This release adds a new wizard setup flow for React Router (framework):
10
+ ```sh
11
+ npx @sentry/wizard@latest -i reactRouter
12
+ ```
13
+ - feat(nextjs): Add --spotlight support ([#1119](https://github.com/getsentry/sentry-wizard/pull/1119))
14
+
15
+ This release adds a new mode for setting up the Sentry SDK in NextJS for Spotlight.
16
+ When running
17
+
18
+ ```sh
19
+ npx @sentry/wizard@latest -i nextjs --spotlight
20
+ ```
21
+ the NextJS SDK will be configured to only send its telemetry to Spotlight.
22
+ No Sentry account is required to complete this flow.
23
+
24
+ ## 6.6.1
25
+
26
+ fix(telemetry): Handle promise rejections during wizard cancellation ([#1111](https://github.com/getsentry/sentry-wizard/pull/1111))
27
+
28
+ Work in this release was contributed by @kaanmertkoc. Thank you for your contribution!
29
+
3
30
  ## 6.6.0
4
31
 
32
+ - feat: Add wizard for react-router framework mode ([#1076](https://github.com/getsentry/sentry-wizard/pull/1076))
5
33
  - feat(angular): Set `sendDefaultPii: true` by default ([#1057](https://github.com/getsentry/sentry-wizard/pull/1057))
6
34
  - feat(nextjs): Update turbopack warning ([#1089](https://github.com/getsentry/sentry-wizard/pull/1089))
7
35
  - feat(nextjs): Set `sendDefaultPii: true` by default ([#1052](https://github.com/getsentry/sentry-wizard/pull/1052))
package/LICENSE CHANGED
@@ -1,13 +1,102 @@
1
- The MIT License (MIT)
1
+ # Functional Source License, Version 1.1, MIT Future License
2
2
 
3
- Copyright (c) 2017 Sentry
3
+ ## Abbreviation
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ FSL-1.1-MIT
6
+
7
+ ## Notice
8
+
9
+ Copyright 2008-2025 Functional Software, Inc. dba Sentry
10
+
11
+ ## Terms and Conditions
12
+
13
+ ### Licensor ("We")
14
+
15
+ The party offering the Software under these Terms and Conditions.
16
+
17
+ ### The Software
18
+
19
+ The "Software" is each version of the software that we make available under
20
+ these Terms and Conditions, as indicated by our inclusion of these Terms and
21
+ Conditions with the Software.
22
+
23
+ ### License Grant
24
+
25
+ Subject to your compliance with this License Grant and the Patents,
26
+ Redistribution and Trademark clauses below, we hereby grant you the right to
27
+ use, copy, modify, create derivative works, publicly perform, publicly display
28
+ and redistribute the Software for any Permitted Purpose identified below.
29
+
30
+ ### Permitted Purpose
31
+
32
+ A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33
+ means making the Software available to others in a commercial product or
34
+ service that:
35
+
36
+ 1. substitutes for the Software;
37
+
38
+ 2. substitutes for any other product or service we offer using the Software
39
+ that exists as of the date we make the Software available; or
40
+
41
+ 3. offers the same or substantially similar functionality as the Software.
42
+
43
+ Permitted Purposes specifically include using the Software:
44
+
45
+ 1. for your internal use and access;
46
+
47
+ 2. for non-commercial education;
48
+
49
+ 3. for non-commercial research; and
50
+
51
+ 4. in connection with professional services that you provide to a licensee
52
+ using the Software in accordance with these Terms and Conditions.
53
+
54
+ ### Patents
55
+
56
+ To the extent your use for a Permitted Purpose would necessarily infringe our
57
+ patents, the license grant above includes a license under our patents. If you
58
+ make a claim against any party that the Software infringes or contributes to
59
+ the infringement of any patent, then your patent license to the Software ends
60
+ immediately.
61
+
62
+ ### Redistribution
63
+
64
+ The Terms and Conditions apply to all copies, modifications and derivatives of
65
+ the Software.
66
+
67
+ If you redistribute any copies, modifications or derivatives of the Software,
68
+ you must include a copy of or a link to these Terms and Conditions and not
69
+ remove any copyright notices provided in or with the Software.
70
+
71
+ ### Disclaimer
72
+
73
+ THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74
+ IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75
+ PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76
+
77
+ IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78
+ SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79
+ EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80
+
81
+ ### Trademarks
82
+
83
+ Except for displaying the License Details and identifying us as the origin of
84
+ the Software, you have no right under these Terms and Conditions to use our
85
+ trademarks, trade names, service marks or product names.
86
+
87
+ ## Grant of Future License
88
+
89
+ We hereby irrevocably grant you an additional license to use the Software under
90
+ the MIT license that is effective on the second anniversary of the date we make
91
+ the Software available. On or after that date, you may use the Software under
92
+ the MIT license, in which case the following will apply:
93
+
94
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
95
+ this software and associated documentation files (the "Software"), to deal in
96
+ the Software without restriction, including without limitation the rights to
97
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
98
+ of the Software, and to permit persons to whom the Software is furnished to do
99
+ so, subject to the following conditions:
11
100
 
12
101
  The above copyright notice and this permission notice shall be included in all
13
102
  copies or substantial portions of the Software.
package/dist/bin.js CHANGED
@@ -160,6 +160,11 @@ const argv = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv), process.
160
160
  describe: 'Ignore git changes in the project',
161
161
  type: 'boolean',
162
162
  },
163
+ spotlight: {
164
+ default: false,
165
+ describe: 'Enable Spotlight for local development. This does not require a Sentry account or project.',
166
+ type: 'boolean',
167
+ },
163
168
  'xcode-project-dir': xcodeProjectDirOption,
164
169
  ...PRESELECTED_PROJECT_OPTIONS,
165
170
  })
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,GAAkC;IACjE,8BAA8B,EAAE;QAC9B,QAAQ,EAAE,gCAAgC;QAC1C,MAAM,EAAE,IAAI;KACb;IACD,+BAA+B,EAAE;QAC/B,QAAQ,EAAE,oCAAoC;QAC9C,MAAM,EAAE,IAAI;KACb;IACD,wBAAwB,EAAE;QACxB,QAAQ,EAAE,yBAAyB;QACnC,MAAM,EAAE,IAAI;KACb;IACD,uBAAuB,EAAE;QACvB,QAAQ,EAAE,wBAAwB;QAClC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/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"]}
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,EAAE,IAAI;KACb;IACD,wBAAwB,EAAE;QACxB,QAAQ,EAAE,yBAAyB;QACnC,MAAM,EAAE,IAAI;KACb;IACD,uBAAuB,EAAE;QACvB,QAAQ,EAAE,wBAAwB;QAClC,MAAM,EAAE,IAAI;KACb;IACD,gCAAgC,EAAE;QAChC,QAAQ,EAAE,0BAA0B;QACpC,MAAM,EAAE,IAAI;KACb;IACD,gCAAgC,EAAE;QAChC,QA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AC,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 spotlight: {\n default: false,\n describe:\n 'Enable Spotlight for local development. This does not require a Sentry account or 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"]}
@@ -28,7 +28,8 @@ const vitest_1 = require("vitest");
28
28
  -i, --integration Choose the integration to setup
29
29
  env: SENTRY_WIZARD_INTEGRATION
30
30
  [choices: "reactNative", "flutter", "ios", "android", "cordova", "angular",
31
- "electron", "nextjs", "nuxt", "remix", "sveltekit", "sourcemaps"]
31
+ "electron", "nextjs", "nuxt", "remix", "reactRouter", "sveltekit",
32
+ "sourcemaps"]
32
33
  -p, --platform Choose platform(s)
33
34
  env: SENTRY_WIZARD_PLATFORM
34
35
  [array] [choices: "ios", "android"]
@@ -48,6 +49,9 @@ const vitest_1 = require("vitest");
48
49
  [boolean] [default: false]
49
50
  --ignore-git-changes Ignore git changes in the project
50
51
  [boolean] [default: false]
52
+ --spotlight Enable Spotlight for local development. This does
53
+ not require a Sentry account or project.
54
+ [boolean] [default: false]
51
55
  --version Show version number [boolean]
52
56
  "
53
57
  `);
@@ -1 +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\", \"angular\",\n \"electron\", \"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"]}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA0C/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\", \"angular\",\n \"electron\", \"nextjs\", \"nuxt\", \"remix\", \"reactRouter\", \"sveltekit\",\n \"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 --spotlight Enable Spotlight for local development. This does\n not require a Sentry account or project.\n [boolean] [default: false]\n --version Show version number [boolean]\n \"\n `);\n });\n});\n"]}
@@ -24,6 +24,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const path = __importStar(require("node:path"));
27
+ const fs = __importStar(require("node:fs"));
27
28
  const Constants_1 = require("../../lib/Constants");
28
29
  const utils_1 = require("../utils");
29
30
  const utils_2 = require("../utils");
@@ -135,4 +136,82 @@ export const onRequestError = Sentry.captureRequestError;`,
135
136
  ]);
136
137
  });
137
138
  });
139
+ (0, vitest_1.describe)('NextJS-15 Spotlight', () => {
140
+ const integration = Constants_1.Integration.nextjs;
141
+ const projectDir = path.resolve(__dirname, '../test-applications/nextjs-15-test-app');
142
+ (0, vitest_1.beforeAll)(async () => {
143
+ // Clean up any previous test artifacts including ignored files like .env.sentry-build-plugin
144
+ (0, utils_1.revertLocalChanges)(projectDir);
145
+ (0, utils_1.cleanupGit)(projectDir);
146
+ // Explicitly remove .env.sentry-build-plugin if it exists
147
+ const envBuildPluginPath = path.join(projectDir, '.env.sentry-build-plugin');
148
+ if (fs.existsSync(envBuildPluginPath)) {
149
+ fs.unlinkSync(envBuildPluginPath);
150
+ }
151
+ const wizardInstance = (0, utils_2.startWizardInstance)(integration, projectDir, false, true);
152
+ const spotlightModePrompted = await wizardInstance.waitForOutput('Spotlight mode enabled!');
153
+ const packageManagerPrompted = spotlightModePrompted &&
154
+ (await wizardInstance.waitForOutput('Please select your package manager.'));
155
+ const routeThroughNextJsPrompted = packageManagerPrompted &&
156
+ (await wizardInstance.sendStdinAndWaitForOutput(
157
+ // Selecting `yarn` as the package manager
158
+ [utils_1.KEYS.DOWN, utils_1.KEYS.ENTER], 'Do you want to route Sentry requests in the browser through your Next.js server', {
159
+ timeout: 240000,
160
+ }));
161
+ const tracingOptionPrompted = routeThroughNextJsPrompted &&
162
+ (await wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.ENTER], 'to track the performance of your application?'));
163
+ const replayOptionPrompted = tracingOptionPrompted &&
164
+ (await wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.ENTER], 'to get a video-like reproduction of errors during a user session?'));
165
+ const logOptionPrompted = replayOptionPrompted &&
166
+ (await wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.ENTER], 'to send your application logs to Sentry?'));
167
+ // Skip example page creation
168
+ logOptionPrompted &&
169
+ (await wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.DOWN, utils_1.KEYS.ENTER], 'Successfully installed the Sentry Next.js SDK!', {
170
+ optional: true,
171
+ }));
172
+ wizardInstance.kill();
173
+ });
174
+ (0, vitest_1.afterAll)(() => {
175
+ (0, utils_1.revertLocalChanges)(projectDir);
176
+ (0, utils_1.cleanupGit)(projectDir);
177
+ });
178
+ (0, vitest_1.test)('package.json is updated correctly', () => {
179
+ (0, utils_3.checkPackageJson)(projectDir, integration);
180
+ });
181
+ (0, vitest_1.test)('.env-sentry-build-plugin should NOT exist in spotlight mode', () => {
182
+ const envFilePath = `${projectDir}/.env.sentry-build-plugin`;
183
+ (0, utils_1.checkFileDoesNotExist)(envFilePath);
184
+ // Explicit assertion to satisfy linter
185
+ (0, vitest_1.expect)(fs.existsSync(envFilePath)).toBe(false);
186
+ });
187
+ (0, vitest_1.test)('config files created', () => {
188
+ (0, utils_3.checkFileExists)(`${projectDir}/sentry.server.config.ts`);
189
+ (0, utils_3.checkFileExists)(`${projectDir}/sentry.edge.config.ts`);
190
+ });
191
+ (0, vitest_1.test)('server config file contains empty DSN and spotlight flag', () => {
192
+ (0, utils_3.checkFileContents)(`${projectDir}/sentry.server.config.ts`, [
193
+ 'dsn: ""',
194
+ 'spotlight: true',
195
+ ]);
196
+ });
197
+ (0, vitest_1.test)('edge config file contains empty DSN and spotlight flag', () => {
198
+ (0, utils_3.checkFileContents)(`${projectDir}/sentry.edge.config.ts`, [
199
+ 'dsn: ""',
200
+ 'spotlight: true',
201
+ ]);
202
+ });
203
+ (0, vitest_1.test)('instrumentation client file contains empty DSN and spotlight flag', () => {
204
+ (0, utils_3.checkFileExists)(`${projectDir}/src/instrumentation-client.ts`);
205
+ (0, utils_3.checkFileContents)(`${projectDir}/src/instrumentation-client.ts`, [
206
+ 'dsn: ""',
207
+ 'spotlight: true',
208
+ ]);
209
+ });
210
+ (0, vitest_1.test)('builds correctly', async () => {
211
+ await (0, utils_3.checkIfBuilds)(projectDir);
212
+ });
213
+ (0, vitest_1.test)('runs on dev mode correctly', async () => {
214
+ await (0, utils_3.checkIfRunsOnDevMode)(projectDir, 'Ready in');
215
+ });
216
+ });
138
217
  //# sourceMappingURL=nextjs-15.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nextjs-15.test.js","sourceRoot":"","sources":["../../../e2e-tests/tests/nextjs-15.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;gB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,UAAU,gCAAgC,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,qDAAqD,EAAE,GAAG,EAAE;QAC/D,IAAA,yBAAiB,EAAC,GAAG,UAAU,yBAAyB,EAAE;YACxD,2CAA2C;YAC3C;;;;;;;;;;0DAUoD;SACrD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,0CAA0C,EAAE,GAAG,EAAE;QACpD,IAAA,yBAAiB,EAAC,GAAG,UAAU,iBAAiB,EAAE;YAChD,iDAAiD;YACjD,+CAA+C;SAChD,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,IAAA,4BAAoB,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAClC,MAAM,IAAA,qBAAa,EAAC,UAAU,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;QAC7C,MAAM,IAAA,6BAAqB,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,8CAA8C,EAAE,GAAG,EAAE;QACxD,IAAA,uBAAe,EAAC,GAAG,UAAU,mBAAmB,CAAC,CAAC;QAClD,IAAA,yBAAiB,EAAC,GAAG,UAAU,mBAAmB,EAAE;YAClD,cAAc;YACd,UAAU;YACV,oFAAoF;SACrF,CAAC,CAAC;IACL,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 { describe, beforeAll, afterAll, test } from 'vitest';\n\ndescribe('NextJS-15', () => {\n const integration = Integration.nextjs;\n const projectDir = path.resolve(\n __dirname,\n '../test-applications/nextjs-15-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 logOptionPrompted =\n replayOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Logs\", sometimes doesn't work as `Logs` can be printed in bold.\n 'to send your application logs to Sentry?',\n ));\n\n const examplePagePrompted =\n logOptionPrompted &&\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 // Selecting `No` for CI/CD tool\n const mcpPrompted =\n ciCdPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.DOWN, KEYS.ENTER],\n 'Optionally add a project-scoped MCP server configuration for the Sentry MCP?',\n { optional: true },\n ));\n\n // Accept MCP config (default is now Yes)\n const editorPrompted =\n mcpPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Which editor do you want to configure?',\n ));\n\n // Select Cursor as the editor (first option)\n editorPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [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.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.ts`, [\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 test('MCP configuration file is created for Cursor', () => {\n checkFileExists(`${projectDir}/.cursor/mcp.json`);\n checkFileContents(`${projectDir}/.cursor/mcp.json`, [\n '\"mcpServers\"',\n '\"Sentry\"',\n '\"url\": \"https://mcp.sentry.dev/mcp/sentry-javascript-sdks/sentry-wizard-e2e-tests\"',\n ]);\n });\n});\n"]}
1
+ {"version":3,"file":"nextjs-15.test.js","sourceRoot":"","sources":["../../../e2e-tests/tests/nextjs-15.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gDAAkC;AAClC,4CAA8B;AAC9B,mDAAkD;AAClD,oCAMkB;AAClB,oCAA+C;AAC/C,oCAOkB;AAClB,mCAAqE;AAErE,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,iF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AA0B,EAAE;YACzD,SAAS;YACT,iBAAiB;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,wDAAwD,EAAE,GAAG,EAAE;QAClE,IAAA,yBAAiB,EAAC,GAAG,UAAU,wBAAwB,EAAE;YACvD,SAAS;YACT,iBAAiB;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,mEAAmE,EAAE,GAAG,EAAE;QAC7E,IAAA,uBAAe,EAAC,GAAG,UAAU,gCAAgC,CAAC,CAAC;QAC/D,IAAA,yBAAiB,EAAC,GAAG,UAAU,gCAAgC,EAAE;YAC/D,SAAS;YACT,iBAAiB;SAClB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,kBAAkB,EAAE,KAAK,IAAI,EAAE;QAClC,MAAM,IAAA,qBAAa,EAAC,UAAU,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,IAAA,aAAI,EAAC,4BAA4B,EAAE,KAAK,IAAI,EAAE;QAC5C,MAAM,IAAA,4BAAoB,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import * as path from 'node:path';\nimport * as fs from 'node:fs';\nimport { Integration } from '../../lib/Constants';\nimport {\n KEYS,\n checkEnvBuildPlugin,\n checkFileDoesNotExist,\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 { describe, beforeAll, afterAll, test, expect } from 'vitest';\n\ndescribe('NextJS-15', () => {\n const integration = Integration.nextjs;\n const projectDir = path.resolve(\n __dirname,\n '../test-applications/nextjs-15-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 logOptionPrompted =\n replayOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n // \"Do you want to enable Logs\", sometimes doesn't work as `Logs` can be printed in bold.\n 'to send your application logs to Sentry?',\n ));\n\n const examplePagePrompted =\n logOptionPrompted &&\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 // Selecting `No` for CI/CD tool\n const mcpPrompted =\n ciCdPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.DOWN, KEYS.ENTER],\n 'Optionally add a project-scoped MCP server configuration for the Sentry MCP?',\n { optional: true },\n ));\n\n // Accept MCP config (default is now Yes)\n const editorPrompted =\n mcpPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Which editor do you want to configure?',\n ));\n\n // Select Cursor as the editor (first option)\n editorPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [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.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.ts`, [\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 test('MCP configuration file is created for Cursor', () => {\n checkFileExists(`${projectDir}/.cursor/mcp.json`);\n checkFileContents(`${projectDir}/.cursor/mcp.json`, [\n '\"mcpServers\"',\n '\"Sentry\"',\n '\"url\": \"https://mcp.sentry.dev/mcp/sentry-javascript-sdks/sentry-wizard-e2e-tests\"',\n ]);\n });\n});\n\ndescribe('NextJS-15 Spotlight', () => {\n const integration = Integration.nextjs;\n const projectDir = path.resolve(\n __dirname,\n '../test-applications/nextjs-15-test-app',\n );\n\n beforeAll(async () => {\n // Clean up any previous test artifacts including ignored files like .env.sentry-build-plugin\n revertLocalChanges(projectDir);\n cleanupGit(projectDir);\n \n // Explicitly remove .env.sentry-build-plugin if it exists\n const envBuildPluginPath = path.join(projectDir, '.env.sentry-build-plugin');\n if (fs.existsSync(envBuildPluginPath)) {\n fs.unlinkSync(envBuildPluginPath);\n }\n \n const wizardInstance = startWizardInstance(integration, projectDir, false, true);\n\n const spotlightModePrompted = await wizardInstance.waitForOutput(\n 'Spotlight mode enabled!',\n );\n\n const packageManagerPrompted =\n spotlightModePrompted &&\n (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 'to track the performance of your application?',\n ));\n\n const replayOptionPrompted =\n tracingOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'to get a video-like reproduction of errors during a user session?',\n ));\n\n const logOptionPrompted =\n replayOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'to send your application logs to Sentry?',\n ));\n\n // Skip example page creation\n logOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.DOWN, KEYS.ENTER],\n 'Successfully installed the Sentry Next.js SDK!',\n {\n optional: true,\n },\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 should NOT exist in spotlight mode', () => {\n const envFilePath = `${projectDir}/.env.sentry-build-plugin`;\n checkFileDoesNotExist(envFilePath);\n // Explicit assertion to satisfy linter\n expect(fs.existsSync(envFilePath)).toBe(false);\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('server config file contains empty DSN and spotlight flag', () => {\n checkFileContents(`${projectDir}/sentry.server.config.ts`, [\n 'dsn: \"\"',\n 'spotlight: true',\n ]);\n });\n\n test('edge config file contains empty DSN and spotlight flag', () => {\n checkFileContents(`${projectDir}/sentry.edge.config.ts`, [\n 'dsn: \"\"',\n 'spotlight: true',\n ]);\n });\n\n test('instrumentation client file contains empty DSN and spotlight flag', () => {\n checkFileExists(`${projectDir}/src/instrumentation-client.ts`);\n checkFileContents(`${projectDir}/src/instrumentation-client.ts`, [\n 'dsn: \"\"',\n 'spotlight: true',\n ]);\n });\n\n test('builds correctly', async () => {\n await checkIfBuilds(projectDir);\n });\n\n test('runs on dev mode correctly', async () => {\n await checkIfRunsOnDevMode(projectDir, 'Ready in');\n });\n});\n"]}
@@ -0,0 +1 @@
1
+ export {};