@sentry/wizard 3.42.0 → 4.0.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.
- package/.node-cache/node-v22.14.0-darwin-arm64 +0 -0
- package/.node-cache/node-v22.14.0-darwin-x64 +0 -0
- package/.node-cache/node-v22.14.0-linux-arm64 +0 -0
- package/.node-cache/node-v22.14.0-linux-x64 +0 -0
- package/.node-cache/node-v22.14.0-win-x64.exe +0 -0
- package/CHANGELOG.md +30 -0
- package/COPYING +3575 -0
- package/bin.ts +85 -80
- package/dist/bin.js +44 -35
- package/dist/bin.js.map +1 -1
- package/dist/e2e-tests/jest.config.js +1 -1
- package/dist/e2e-tests/jest.config.js.map +1 -1
- package/dist/e2e-tests/tests/flutter.test.js +62 -147
- package/dist/e2e-tests/tests/flutter.test.js.map +1 -1
- package/dist/e2e-tests/tests/nextjs.test.js +77 -175
- package/dist/e2e-tests/tests/nextjs.test.js.map +1 -1
- package/dist/e2e-tests/tests/nuxt-3.test.js +61 -162
- package/dist/e2e-tests/tests/nuxt-3.test.js.map +1 -1
- package/dist/e2e-tests/tests/nuxt-4.test.js +62 -163
- package/dist/e2e-tests/tests/nuxt-4.test.js.map +1 -1
- package/dist/e2e-tests/tests/remix.test.js +147 -189
- package/dist/e2e-tests/tests/remix.test.js.map +1 -1
- package/dist/e2e-tests/tests/sveltekit.test.js +133 -187
- package/dist/e2e-tests/tests/sveltekit.test.js.map +1 -1
- package/dist/e2e-tests/utils/index.d.ts +1 -1
- package/dist/e2e-tests/utils/index.js +113 -195
- package/dist/e2e-tests/utils/index.js.map +1 -1
- package/dist/lib/Constants.js +5 -5
- package/dist/lib/Constants.js.map +1 -1
- package/dist/lib/Helper/BottomBar.d.ts +1 -1
- package/dist/lib/Helper/BottomBar.js +14 -15
- package/dist/lib/Helper/BottomBar.js.map +1 -1
- package/dist/lib/Helper/Env.js +5 -2
- package/dist/lib/Helper/Env.js.map +1 -1
- package/dist/lib/Helper/File.js +14 -27
- package/dist/lib/Helper/File.js.map +1 -1
- package/dist/lib/Helper/Git.js +24 -59
- package/dist/lib/Helper/Git.js.map +1 -1
- package/dist/lib/Helper/Logging.js +2 -2
- package/dist/lib/Helper/Logging.js.map +1 -1
- package/dist/lib/Helper/MergeConfig.js +4 -4
- package/dist/lib/Helper/MergeConfig.js.map +1 -1
- package/dist/lib/Helper/Package.d.ts +4 -1
- package/dist/lib/Helper/Package.js +12 -38
- package/dist/lib/Helper/Package.js.map +1 -1
- package/dist/lib/Helper/SentryCli.js +77 -149
- package/dist/lib/Helper/SentryCli.js.map +1 -1
- package/dist/lib/Helper/Wizard.js +29 -124
- package/dist/lib/Helper/Wizard.js.map +1 -1
- package/dist/lib/Helper/__tests__/File.js +4 -4
- package/dist/lib/Helper/__tests__/File.js.map +1 -1
- package/dist/lib/Helper/__tests__/MergeConfig.js +24 -24
- package/dist/lib/Helper/__tests__/MergeConfig.js.map +1 -1
- package/dist/lib/Helper/__tests__/SentryCli.js +33 -23
- package/dist/lib/Helper/__tests__/SentryCli.js.map +1 -1
- package/dist/lib/Setup.js +23 -85
- package/dist/lib/Setup.js.map +1 -1
- package/dist/lib/Steps/BaseStep.js +8 -8
- package/dist/lib/Steps/BaseStep.js.map +1 -1
- package/dist/lib/Steps/ChooseIntegration.js +80 -125
- package/dist/lib/Steps/ChooseIntegration.js.map +1 -1
- package/dist/lib/Steps/ConfigureProject.js +6 -66
- package/dist/lib/Steps/ConfigureProject.js.map +1 -1
- package/dist/lib/Steps/Initial.js +16 -104
- package/dist/lib/Steps/Initial.js.map +1 -1
- package/dist/lib/Steps/Integrations/BaseIntegration.js +24 -118
- package/dist/lib/Steps/Integrations/BaseIntegration.js.map +1 -1
- package/dist/lib/Steps/Integrations/Cordova.js +95 -183
- package/dist/lib/Steps/Integrations/Cordova.js.map +1 -1
- package/dist/lib/Steps/Integrations/Electron.js +87 -145
- package/dist/lib/Steps/Integrations/Electron.js.map +1 -1
- package/dist/lib/Steps/Integrations/MobileProject.js +40 -148
- package/dist/lib/Steps/Integrations/MobileProject.js.map +1 -1
- package/dist/lib/Steps/OpenSentry.js +63 -126
- package/dist/lib/Steps/OpenSentry.js.map +1 -1
- package/dist/lib/Steps/PromptForParameters.js +110 -206
- package/dist/lib/Steps/PromptForParameters.js.map +1 -1
- package/dist/lib/Steps/Result.js +19 -79
- package/dist/lib/Steps/Result.js.map +1 -1
- package/dist/lib/Steps/SentryProjectSelector.js +57 -148
- package/dist/lib/Steps/SentryProjectSelector.js.map +1 -1
- package/dist/lib/Steps/ShouldConfigure.js +6 -66
- package/dist/lib/Steps/ShouldConfigure.js.map +1 -1
- package/dist/lib/Steps/WaitForSentry.js +43 -120
- package/dist/lib/Steps/WaitForSentry.js.map +1 -1
- package/dist/lib/Steps/Welcome.js +17 -76
- package/dist/lib/Steps/Welcome.js.map +1 -1
- package/dist/lib/__tests__/Env.js +3 -3
- package/dist/lib/__tests__/Env.js.map +1 -1
- package/dist/src/android/android-wizard.js +100 -176
- package/dist/src/android/android-wizard.js.map +1 -1
- package/dist/src/android/code-tools.js +24 -33
- package/dist/src/android/code-tools.js.map +1 -1
- package/dist/src/android/gradle.js +106 -165
- package/dist/src/android/gradle.js.map +1 -1
- package/dist/src/android/manifest.js +26 -27
- package/dist/src/android/manifest.js.map +1 -1
- package/dist/src/android/templates.js +76 -23
- package/dist/src/android/templates.js.map +1 -1
- package/dist/src/apple/apple-wizard.js +129 -225
- package/dist/src/apple/apple-wizard.js.map +1 -1
- package/dist/src/apple/cocoapod.js +47 -109
- package/dist/src/apple/cocoapod.js.map +1 -1
- package/dist/src/apple/code-tools.js +32 -35
- package/dist/src/apple/code-tools.js.map +1 -1
- package/dist/src/apple/fastlane.js +51 -97
- package/dist/src/apple/fastlane.js.map +1 -1
- package/dist/src/apple/templates.js +41 -5
- package/dist/src/apple/templates.js.map +1 -1
- package/dist/src/apple/xcode-manager.d.ts +2 -2
- package/dist/src/apple/xcode-manager.js +93 -108
- package/dist/src/apple/xcode-manager.js.map +1 -1
- package/dist/src/flutter/code-tools.js +79 -127
- package/dist/src/flutter/code-tools.js.map +1 -1
- package/dist/src/flutter/flutter-wizard.js +75 -136
- package/dist/src/flutter/flutter-wizard.js.map +1 -1
- package/dist/src/flutter/templates.js +48 -12
- package/dist/src/flutter/templates.js.map +1 -1
- package/dist/src/nextjs/nextjs-wizard.js +527 -805
- package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
- package/dist/src/nextjs/templates.js +380 -40
- package/dist/src/nextjs/templates.js.map +1 -1
- package/dist/src/nextjs/utils.js +5 -5
- package/dist/src/nextjs/utils.js.map +1 -1
- package/dist/src/nuxt/nuxt-wizard.js +91 -188
- package/dist/src/nuxt/nuxt-wizard.js.map +1 -1
- package/dist/src/nuxt/sdk-example.js +68 -137
- package/dist/src/nuxt/sdk-example.js.map +1 -1
- package/dist/src/nuxt/sdk-setup.d.ts +4 -4
- package/dist/src/nuxt/sdk-setup.js +180 -336
- package/dist/src/nuxt/sdk-setup.js.map +1 -1
- package/dist/src/nuxt/templates.js +195 -18
- package/dist/src/nuxt/templates.js.map +1 -1
- package/dist/src/nuxt/utils.js +29 -76
- package/dist/src/nuxt/utils.js.map +1 -1
- package/dist/src/react-native/expo-env-file.js +41 -94
- package/dist/src/react-native/expo-env-file.js.map +1 -1
- package/dist/src/react-native/expo-metro.d.ts +1 -1
- package/dist/src/react-native/expo-metro.js +75 -130
- package/dist/src/react-native/expo-metro.js.map +1 -1
- package/dist/src/react-native/expo.js +61 -114
- package/dist/src/react-native/expo.js.map +1 -1
- package/dist/src/react-native/git.js +23 -56
- package/dist/src/react-native/git.js.map +1 -1
- package/dist/src/react-native/glob.js +3 -3
- package/dist/src/react-native/glob.js.map +1 -1
- package/dist/src/react-native/gradle.js +4 -4
- package/dist/src/react-native/gradle.js.map +1 -1
- package/dist/src/react-native/javascript.js +51 -95
- package/dist/src/react-native/javascript.js.map +1 -1
- package/dist/src/react-native/metro.js +176 -296
- package/dist/src/react-native/metro.js.map +1 -1
- package/dist/src/react-native/react-native-wizard.js +267 -418
- package/dist/src/react-native/react-native-wizard.js.map +1 -1
- package/dist/src/react-native/uninstall.js +37 -80
- package/dist/src/react-native/uninstall.js.map +1 -1
- package/dist/src/react-native/xcode.js +57 -55
- package/dist/src/react-native/xcode.js.map +1 -1
- package/dist/src/remix/codemods/express-server.js +27 -82
- package/dist/src/remix/codemods/express-server.js.map +1 -1
- package/dist/src/remix/codemods/handle-error.js +28 -31
- package/dist/src/remix/codemods/handle-error.js.map +1 -1
- package/dist/src/remix/codemods/root-common.js +11 -11
- package/dist/src/remix/codemods/root-common.js.map +1 -1
- package/dist/src/remix/codemods/root-v1.js +17 -67
- package/dist/src/remix/codemods/root-v1.js.map +1 -1
- package/dist/src/remix/codemods/root-v2.js +89 -140
- package/dist/src/remix/codemods/root-v2.js.map +1 -1
- package/dist/src/remix/remix-wizard.js +181 -343
- package/dist/src/remix/remix-wizard.js.map +1 -1
- package/dist/src/remix/sdk-example.js +84 -66
- package/dist/src/remix/sdk-example.js.map +1 -1
- package/dist/src/remix/sdk-setup.js +161 -293
- package/dist/src/remix/sdk-setup.js.map +1 -1
- package/dist/src/remix/templates.js +10 -2
- package/dist/src/remix/templates.js.map +1 -1
- package/dist/src/remix/utils.js +13 -14
- package/dist/src/remix/utils.js.map +1 -1
- package/dist/src/run.js +106 -178
- package/dist/src/run.js.map +1 -1
- package/dist/src/sourcemaps/sourcemaps-wizard.js +248 -372
- package/dist/src/sourcemaps/sourcemaps-wizard.js.map +1 -1
- package/dist/src/sourcemaps/tools/angular.js +32 -66
- package/dist/src/sourcemaps/tools/angular.js.map +1 -1
- package/dist/src/sourcemaps/tools/create-react-app.js +14 -59
- package/dist/src/sourcemaps/tools/create-react-app.js.map +1 -1
- package/dist/src/sourcemaps/tools/esbuild.js +34 -77
- package/dist/src/sourcemaps/tools/esbuild.js.map +1 -1
- package/dist/src/sourcemaps/tools/nextjs.d.ts +2 -2
- package/dist/src/sourcemaps/tools/nextjs.js +75 -102
- package/dist/src/sourcemaps/tools/nextjs.js.map +1 -1
- package/dist/src/sourcemaps/tools/remix.js +53 -93
- package/dist/src/sourcemaps/tools/remix.js.map +1 -1
- package/dist/src/sourcemaps/tools/rollup.js +35 -76
- package/dist/src/sourcemaps/tools/rollup.js.map +1 -1
- package/dist/src/sourcemaps/tools/sentry-cli.js +157 -289
- package/dist/src/sourcemaps/tools/sentry-cli.js.map +1 -1
- package/dist/src/sourcemaps/tools/tsc.js +68 -134
- package/dist/src/sourcemaps/tools/tsc.js.map +1 -1
- package/dist/src/sourcemaps/tools/vite.js +111 -196
- package/dist/src/sourcemaps/tools/vite.js.map +1 -1
- package/dist/src/sourcemaps/tools/webpack.d.ts +1 -1
- package/dist/src/sourcemaps/tools/webpack.js +158 -260
- package/dist/src/sourcemaps/tools/webpack.js.map +1 -1
- package/dist/src/sourcemaps/utils/detect-tool.js +9 -54
- package/dist/src/sourcemaps/utils/detect-tool.js.map +1 -1
- package/dist/src/sourcemaps/utils/other-wizards.js +77 -144
- package/dist/src/sourcemaps/utils/other-wizards.js.map +1 -1
- package/dist/src/sourcemaps/utils/sdk-version.js +112 -191
- package/dist/src/sourcemaps/utils/sdk-version.js.map +1 -1
- package/dist/src/sveltekit/sdk-example.js +20 -70
- package/dist/src/sveltekit/sdk-example.js.map +1 -1
- package/dist/src/sveltekit/sdk-setup.js +250 -411
- package/dist/src/sveltekit/sdk-setup.js.map +1 -1
- package/dist/src/sveltekit/sveltekit-wizard.js +107 -191
- package/dist/src/sveltekit/sveltekit-wizard.js.map +1 -1
- package/dist/src/sveltekit/templates.js +147 -13
- package/dist/src/sveltekit/templates.js.map +1 -1
- package/dist/src/sveltekit/utils.js +3 -3
- package/dist/src/sveltekit/utils.js.map +1 -1
- package/dist/src/telemetry.d.ts +2 -2
- package/dist/src/telemetry.js +58 -108
- package/dist/src/telemetry.js.map +1 -1
- package/dist/src/utils/ast-utils.js +39 -54
- package/dist/src/utils/ast-utils.js.map +1 -1
- package/dist/src/utils/bash.js +28 -75
- package/dist/src/utils/bash.js.map +1 -1
- package/dist/src/utils/clack-utils.d.ts +3 -7
- package/dist/src/utils/clack-utils.js +688 -1083
- package/dist/src/utils/clack-utils.js.map +1 -1
- package/dist/src/utils/debug.js +6 -10
- package/dist/src/utils/debug.js.map +1 -1
- package/dist/src/utils/package-json.js +5 -6
- package/dist/src/utils/package-json.js.map +1 -1
- package/dist/src/utils/package-manager.js +65 -139
- package/dist/src/utils/package-manager.js.map +1 -1
- package/dist/src/utils/release-registry.js +12 -59
- package/dist/src/utils/release-registry.js.map +1 -1
- package/dist/src/utils/semver.js +3 -4
- package/dist/src/utils/semver.js.map +1 -1
- package/dist/src/utils/sentrycli-utils.js +4 -4
- package/dist/src/utils/sentrycli-utils.js.map +1 -1
- package/dist/src/utils/url.js +5 -6
- package/dist/src/utils/url.js.map +1 -1
- package/dist/test/android/code-tools.test.js +18 -18
- package/dist/test/android/code-tools.test.js.map +1 -1
- package/dist/test/apple/cocoapod.test.js +154 -299
- package/dist/test/apple/cocoapod.test.js.map +1 -1
- package/dist/test/apple/code-tools.test.js +375 -263
- package/dist/test/apple/code-tools.test.js.map +1 -1
- package/dist/test/apple/fastfile.test.js +319 -271
- package/dist/test/apple/fastfile.test.js.map +1 -1
- package/dist/test/apple/templates.test.js +114 -30
- package/dist/test/apple/templates.test.js.map +1 -1
- package/dist/test/apple/xcode-manager.test.js +230 -234
- package/dist/test/apple/xcode-manager.test.js.map +1 -1
- package/dist/test/flutter/code-tools.test.js +119 -48
- package/dist/test/flutter/code-tools.test.js.map +1 -1
- package/dist/test/flutter/templates.test.js +63 -20
- package/dist/test/flutter/templates.test.js.map +1 -1
- package/dist/test/nextjs/templates.test.js +332 -43
- package/dist/test/nextjs/templates.test.js.map +1 -1
- package/dist/test/nuxt/templates.test.js +161 -33
- package/dist/test/nuxt/templates.test.js.map +1 -1
- package/dist/test/react-native/expo-metro.test.js +61 -15
- package/dist/test/react-native/expo-metro.test.js.map +1 -1
- package/dist/test/react-native/expo.test.js +37 -17
- package/dist/test/react-native/expo.test.js.map +1 -1
- package/dist/test/react-native/gradle.test.js +260 -28
- package/dist/test/react-native/gradle.test.js.map +1 -1
- package/dist/test/react-native/javascript.test.js +85 -19
- package/dist/test/react-native/javascript.test.js.map +1 -1
- package/dist/test/react-native/metro.test.js +261 -187
- package/dist/test/react-native/metro.test.js.map +1 -1
- package/dist/test/react-native/xcode.test.js +243 -62
- package/dist/test/react-native/xcode.test.js.map +1 -1
- package/dist/test/remix/client-entry.test.js +81 -21
- package/dist/test/remix/client-entry.test.js.map +1 -1
- package/dist/test/remix/server-instrumentation.test.js +21 -8
- package/dist/test/remix/server-instrumentation.test.js.map +1 -1
- package/dist/test/sourcemaps/tools/sentry-cli.test.js +20 -72
- package/dist/test/sourcemaps/tools/sentry-cli.test.js.map +1 -1
- package/dist/test/sourcemaps/tools/tsc.test.js +142 -68
- package/dist/test/sourcemaps/tools/tsc.test.js.map +1 -1
- package/dist/test/sourcemaps/tools/vite.test.js +106 -75
- package/dist/test/sourcemaps/tools/vite.test.js.map +1 -1
- package/dist/test/sourcemaps/tools/webpack.test.js +226 -102
- package/dist/test/sourcemaps/tools/webpack.test.js.map +1 -1
- package/dist/test/sveltekit/templates.test.js +117 -18
- package/dist/test/sveltekit/templates.test.js.map +1 -1
- package/dist/test/utils/ast-utils.test.js +99 -58
- package/dist/test/utils/ast-utils.test.js.map +1 -1
- package/dist/test/utils/clack-utils.test.js +142 -247
- package/dist/test/utils/clack-utils.test.js.map +1 -1
- package/e2e-tests/package.json +1 -1
- package/e2e-tests/tests/flutter.test.ts +20 -20
- package/e2e-tests/tests/nextjs.test.ts +2 -2
- package/e2e-tests/tests/nuxt-3.test.ts +4 -4
- package/e2e-tests/tests/nuxt-4.test.ts +3 -3
- package/e2e-tests/tests/remix.test.ts +3 -3
- package/e2e-tests/tests/sveltekit.test.ts +3 -3
- package/e2e-tests/utils/index.ts +33 -15
- package/lib/Helper/BottomBar.ts +1 -1
- package/lib/Helper/Env.ts +1 -1
- package/lib/Helper/Package.ts +12 -10
- package/lib/Helper/SentryCli.ts +18 -27
- package/lib/Helper/Wizard.ts +1 -2
- package/lib/Setup.ts +4 -5
- package/lib/Steps/ChooseIntegration.ts +40 -8
- package/lib/Steps/Initial.ts +17 -26
- package/lib/Steps/Integrations/BaseIntegration.ts +2 -8
- package/lib/Steps/Integrations/Cordova.ts +9 -15
- package/lib/Steps/Integrations/Electron.ts +23 -20
- package/lib/Steps/Integrations/MobileProject.ts +18 -15
- package/lib/Steps/OpenSentry.ts +12 -7
- package/lib/Steps/PromptForParameters.ts +12 -19
- package/lib/Steps/SentryProjectSelector.ts +30 -29
- package/lib/Steps/WaitForSentry.ts +29 -23
- package/package.json +12 -8
- package/src/apple/xcode-manager.ts +10 -10
- package/src/nextjs/templates.ts +2 -6
- package/src/nuxt/sdk-setup.ts +21 -18
- package/src/react-native/expo-metro.ts +2 -2
- package/src/react-native/react-native-wizard.ts +1 -2
- package/src/react-native/uninstall.ts +1 -2
- package/src/react-native/xcode.ts +1 -1
- package/src/run.ts +12 -5
- package/src/sourcemaps/tools/nextjs.ts +2 -5
- package/src/sourcemaps/tools/webpack.ts +3 -3
- package/src/telemetry.ts +27 -7
- package/src/utils/clack-utils.ts +50 -47
- package/test/apple/cocoapod.test.ts +4 -0
- package/test/apple/fastfile.test.ts +12 -7
- package/test/apple/xcode-manager.test.ts +13 -11
- package/test/nextjs/templates.test.ts +0 -12
- package/test/utils/clack-utils.test.ts +40 -50
- package/types/read-env.d.ts +3 -0
- package/types/xcode.d.ts +1 -0
- package/dist/package.json +0 -128
|
@@ -22,59 +22,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
describe('Nuxt-3',
|
|
66
|
-
|
|
67
|
-
beforeAll(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
case 1:
|
|
72
|
-
_a.sent();
|
|
73
|
-
return [2 /*return*/];
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}); });
|
|
77
|
-
afterAll(function () {
|
|
26
|
+
const path = __importStar(require("node:path"));
|
|
27
|
+
const Constants_1 = require("../../lib/Constants");
|
|
28
|
+
const utils_1 = require("../utils");
|
|
29
|
+
describe('Nuxt-3', () => {
|
|
30
|
+
const projectDir = path.resolve(__dirname, '../test-applications/nuxt-3-test-app');
|
|
31
|
+
beforeAll(async () => {
|
|
32
|
+
await runWizardOnNuxtProject(projectDir);
|
|
33
|
+
});
|
|
34
|
+
afterAll(() => {
|
|
78
35
|
(0, utils_1.revertLocalChanges)(projectDir);
|
|
79
36
|
(0, utils_1.cleanupGit)(projectDir);
|
|
80
37
|
});
|
|
@@ -82,105 +39,62 @@ describe('Nuxt-3', function () {
|
|
|
82
39
|
testNuxtProjectConfigs(projectDir);
|
|
83
40
|
testNuxtProjectBuildsAndRuns(projectDir);
|
|
84
41
|
});
|
|
85
|
-
function runWizardOnNuxtProject(projectDir) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
_f.label = 5;
|
|
116
|
-
case 5:
|
|
117
|
-
deploymentPlatformPrompted = _b;
|
|
118
|
-
_c = deploymentPlatformPrompted;
|
|
119
|
-
if (!_c) return [3 /*break*/, 7];
|
|
120
|
-
return [4 /*yield*/, wizardInstance.sendStdinAndWaitForOutput(utils_1.KEYS.ENTER,
|
|
121
|
-
// "Do you want to enable Tracing", sometimes doesn't work as `Tracing` can be printed in bold.
|
|
122
|
-
'Do you want to enable', {
|
|
123
|
-
timeout: 240000,
|
|
124
|
-
})];
|
|
125
|
-
case 6:
|
|
126
|
-
_c = (_f.sent());
|
|
127
|
-
_f.label = 7;
|
|
128
|
-
case 7:
|
|
129
|
-
tracingOptionPrompted = _c;
|
|
130
|
-
_d = tracingOptionPrompted;
|
|
131
|
-
if (!_d) return [3 /*break*/, 9];
|
|
132
|
-
return [4 /*yield*/, wizardInstance.sendStdinAndWaitForOutput(utils_1.KEYS.ENTER,
|
|
133
|
-
// "Do you want to enable Sentry Session Replay", sometimes doesn't work as `Sentry Session Replay` can be printed in bold.
|
|
134
|
-
'to get a video-like reproduction of errors during a user session?')];
|
|
135
|
-
case 8:
|
|
136
|
-
_d = (_f.sent());
|
|
137
|
-
_f.label = 9;
|
|
138
|
-
case 9:
|
|
139
|
-
replayOptionPrompted = _d;
|
|
140
|
-
_e = replayOptionPrompted;
|
|
141
|
-
if (!_e) return [3 /*break*/, 11];
|
|
142
|
-
return [4 /*yield*/, wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.ENTER], 'Do you want to create an example page', {
|
|
143
|
-
optional: true,
|
|
144
|
-
})];
|
|
145
|
-
case 10:
|
|
146
|
-
_e = (_f.sent());
|
|
147
|
-
_f.label = 11;
|
|
148
|
-
case 11:
|
|
149
|
-
_e;
|
|
150
|
-
return [4 /*yield*/, wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.ENTER, utils_1.KEYS.ENTER], 'Successfully installed the Sentry Nuxt SDK!')];
|
|
151
|
-
case 12:
|
|
152
|
-
_f.sent();
|
|
153
|
-
wizardInstance.kill();
|
|
154
|
-
return [2 /*return*/];
|
|
155
|
-
}
|
|
156
|
-
});
|
|
157
|
-
});
|
|
42
|
+
async function runWizardOnNuxtProject(projectDir) {
|
|
43
|
+
const integration = Constants_1.Integration.nuxt;
|
|
44
|
+
const wizardInstance = (0, utils_1.startWizardInstance)(integration, projectDir);
|
|
45
|
+
const packageManagerPrompted = await wizardInstance.waitForOutput('Please select your package manager.');
|
|
46
|
+
const nftOverridePrompted = packageManagerPrompted &&
|
|
47
|
+
(await wizardInstance.sendStdinAndWaitForOutput(
|
|
48
|
+
// Selecting `yarn` as the package manager
|
|
49
|
+
[utils_1.KEYS.DOWN, utils_1.KEYS.ENTER], 'Do you want to add an override for @vercel/nft version ^0.27.4?', {
|
|
50
|
+
timeout: 240000,
|
|
51
|
+
}));
|
|
52
|
+
const deploymentPlatformPrompted = nftOverridePrompted &&
|
|
53
|
+
(await wizardInstance.sendStdinAndWaitForOutput(utils_1.KEYS.ENTER, 'Please select your deployment platform.', {
|
|
54
|
+
timeout: 240000,
|
|
55
|
+
}));
|
|
56
|
+
const tracingOptionPrompted = deploymentPlatformPrompted &&
|
|
57
|
+
(await wizardInstance.sendStdinAndWaitForOutput(utils_1.KEYS.ENTER,
|
|
58
|
+
// "Do you want to enable Tracing", sometimes doesn't work as `Tracing` can be printed in bold.
|
|
59
|
+
'Do you want to enable', {
|
|
60
|
+
timeout: 240000,
|
|
61
|
+
}));
|
|
62
|
+
const replayOptionPrompted = tracingOptionPrompted &&
|
|
63
|
+
(await wizardInstance.sendStdinAndWaitForOutput(utils_1.KEYS.ENTER,
|
|
64
|
+
// "Do you want to enable Sentry Session Replay", sometimes doesn't work as `Sentry Session Replay` can be printed in bold.
|
|
65
|
+
'to get a video-like reproduction of errors during a user session?'));
|
|
66
|
+
replayOptionPrompted &&
|
|
67
|
+
(await wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.ENTER], 'Do you want to create an example page', {
|
|
68
|
+
optional: true,
|
|
69
|
+
}));
|
|
70
|
+
await wizardInstance.sendStdinAndWaitForOutput([utils_1.KEYS.ENTER, utils_1.KEYS.ENTER], 'Successfully installed the Sentry Nuxt SDK!');
|
|
71
|
+
wizardInstance.kill();
|
|
158
72
|
}
|
|
159
73
|
function testNuxtProjectSetup(projectDir) {
|
|
160
|
-
|
|
161
|
-
test('package.json is updated correctly',
|
|
74
|
+
const integration = Constants_1.Integration.nuxt;
|
|
75
|
+
test('package.json is updated correctly', () => {
|
|
162
76
|
(0, utils_1.checkPackageJson)(projectDir, integration);
|
|
163
77
|
});
|
|
164
|
-
test('.env-sentry-build-plugin is created and contains the auth token',
|
|
78
|
+
test('.env-sentry-build-plugin is created and contains the auth token', () => {
|
|
165
79
|
(0, utils_1.checkEnvBuildPlugin)(projectDir);
|
|
166
80
|
});
|
|
167
|
-
test('config files created',
|
|
168
|
-
(0, utils_1.checkFileExists)(
|
|
169
|
-
(0, utils_1.checkFileExists)(
|
|
81
|
+
test('config files created', () => {
|
|
82
|
+
(0, utils_1.checkFileExists)(`${projectDir}/sentry.server.config.ts`);
|
|
83
|
+
(0, utils_1.checkFileExists)(`${projectDir}/sentry.client.config.ts`);
|
|
170
84
|
});
|
|
171
|
-
test('example page exists',
|
|
172
|
-
(0, utils_1.checkFileExists)(
|
|
173
|
-
(0, utils_1.checkFileExists)(
|
|
85
|
+
test('example page exists', () => {
|
|
86
|
+
(0, utils_1.checkFileExists)(`${projectDir}/pages/sentry-example-page.vue`);
|
|
87
|
+
(0, utils_1.checkFileExists)(`${projectDir}/server/api/sentry-example-api.ts`);
|
|
174
88
|
});
|
|
175
89
|
}
|
|
176
90
|
function testNuxtProjectConfigs(projectDir) {
|
|
177
|
-
test('nuxt config contains sentry module',
|
|
91
|
+
test('nuxt config contains sentry module', () => {
|
|
178
92
|
(0, utils_1.checkFileContents)(path.resolve(projectDir, 'nuxt.config.ts'), [
|
|
179
93
|
"modules: ['@sentry/nuxt/module'],",
|
|
180
94
|
'sentry: {',
|
|
181
95
|
' sourceMapsUploadOptions: {',
|
|
182
|
-
|
|
183
|
-
|
|
96
|
+
` org: '${utils_1.TEST_ARGS.ORG_SLUG}',`,
|
|
97
|
+
` project: '${utils_1.TEST_ARGS.PROJECT_SLUG}'`,
|
|
184
98
|
' }',
|
|
185
99
|
'},',
|
|
186
100
|
'sourcemap: {',
|
|
@@ -188,13 +102,13 @@ function testNuxtProjectConfigs(projectDir) {
|
|
|
188
102
|
'}',
|
|
189
103
|
]);
|
|
190
104
|
});
|
|
191
|
-
test('sentry.client.config.ts contents',
|
|
105
|
+
test('sentry.client.config.ts contents', () => {
|
|
192
106
|
(0, utils_1.checkFileContents)(path.resolve(projectDir, 'sentry.client.config.ts'), [
|
|
193
107
|
'import * as Sentry from "@sentry/nuxt";',
|
|
194
108
|
'Sentry.init({',
|
|
195
109
|
' // If set up, you can use your runtime config here',
|
|
196
110
|
' // dsn: useRuntimeConfig().public.sentry.dsn,',
|
|
197
|
-
|
|
111
|
+
` dsn: "${utils_1.TEST_ARGS.PROJECT_DSN}",`,
|
|
198
112
|
' // We recommend adjusting this value in production, or using tracesSampler',
|
|
199
113
|
' // for finer control',
|
|
200
114
|
' tracesSampleRate: 1.0,',
|
|
@@ -211,11 +125,11 @@ function testNuxtProjectConfigs(projectDir) {
|
|
|
211
125
|
'});',
|
|
212
126
|
]);
|
|
213
127
|
});
|
|
214
|
-
test('sentry.server.config.ts contents',
|
|
128
|
+
test('sentry.server.config.ts contents', () => {
|
|
215
129
|
(0, utils_1.checkFileContents)(path.resolve(projectDir, 'sentry.server.config.ts'), [
|
|
216
130
|
'import * as Sentry from "@sentry/nuxt";',
|
|
217
131
|
'Sentry.init({',
|
|
218
|
-
|
|
132
|
+
` dsn: "${utils_1.TEST_ARGS.PROJECT_DSN}",`,
|
|
219
133
|
' // We recommend adjusting this value in production, or using tracesSampler',
|
|
220
134
|
' // for finer control',
|
|
221
135
|
' tracesSampleRate: 1.0,',
|
|
@@ -226,26 +140,11 @@ function testNuxtProjectConfigs(projectDir) {
|
|
|
226
140
|
});
|
|
227
141
|
}
|
|
228
142
|
function testNuxtProjectBuildsAndRuns(projectDir) {
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
_a.sent();
|
|
236
|
-
return [2 /*return*/];
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
}); });
|
|
240
|
-
test('runs on prod mode correctly', function () { return __awaiter(_this, void 0, void 0, function () {
|
|
241
|
-
return __generator(this, function (_a) {
|
|
242
|
-
switch (_a.label) {
|
|
243
|
-
case 0: return [4 /*yield*/, (0, utils_1.checkIfRunsOnProdMode)(projectDir, 'Listening on')];
|
|
244
|
-
case 1:
|
|
245
|
-
_a.sent();
|
|
246
|
-
return [2 /*return*/];
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
}); });
|
|
143
|
+
test('builds successfully', async () => {
|
|
144
|
+
await (0, utils_1.checkIfBuilds)(projectDir);
|
|
145
|
+
});
|
|
146
|
+
test('runs on prod mode correctly', async () => {
|
|
147
|
+
await (0, utils_1.checkIfRunsOnProdMode)(projectDir, 'Listening on');
|
|
148
|
+
});
|
|
250
149
|
}
|
|
251
150
|
//# sourceMappingURL=nuxt-3.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nuxt-3.test.js","sourceRoot":"","sources":["../../../e2e-tests/tests/nuxt-3.test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nuxt-3.test.js","s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,wBAAwB;YACxB,0BAA0B;YAC1B,+GAA+G;YAC/G,iBAAiB;YACjB,KAAK;SACN,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,4BAA4B,CAAC,UAAkB;IACtD,IAAI,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;QACrC,MAAM,IAAA,qBAAa,EAAC,UAAU,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,6BAA6B,EAAE,KAAK,IAAI,EAAE;QAC7C,MAAM,IAAA,6BAAqB,EAAC,UAAU,EAAE,cAAc,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import * as path from 'node:path';\nimport { Integration } from '../../lib/Constants';\nimport {\n KEYS,\n TEST_ARGS,\n checkEnvBuildPlugin,\n checkFileContents,\n checkFileExists,\n checkIfBuilds,\n checkIfRunsOnProdMode,\n checkPackageJson,\n cleanupGit,\n revertLocalChanges,\n startWizardInstance,\n} from '../utils';\n\ndescribe('Nuxt-3', () => {\n const projectDir = path.resolve(\n __dirname,\n '../test-applications/nuxt-3-test-app',\n );\n\n beforeAll(async () => {\n await runWizardOnNuxtProject(projectDir);\n });\n\n afterAll(() => {\n revertLocalChanges(projectDir);\n cleanupGit(projectDir);\n });\n\n testNuxtProjectSetup(projectDir);\n\n testNuxtProjectConfigs(projectDir);\n\n testNuxtProjectBuildsAndRuns(projectDir);\n});\n\nasync function runWizardOnNuxtProject(projectDir: string): Promise<void> {\n const integration = Integration.nuxt;\n\n const wizardInstance = startWizardInstance(integration, projectDir);\n const packageManagerPrompted = await wizardInstance.waitForOutput(\n 'Please select your package manager.',\n );\n\n const nftOverridePrompted =\n packageManagerPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n // Selecting `yarn` as the package manager\n [KEYS.DOWN, KEYS.ENTER],\n 'Do you want to add an override for @vercel/nft version ^0.27.4?',\n {\n timeout: 240_000,\n },\n ));\n\n const deploymentPlatformPrompted =\n nftOverridePrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n KEYS.ENTER,\n 'Please select your deployment platform.',\n {\n timeout: 240_000,\n },\n ));\n\n const tracingOptionPrompted =\n deploymentPlatformPrompted &&\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 'Do you want to enable',\n {\n timeout: 240_000,\n },\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 replayOptionPrompted &&\n (await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER],\n 'Do you want to create an example page',\n {\n optional: true,\n },\n ));\n\n await wizardInstance.sendStdinAndWaitForOutput(\n [KEYS.ENTER, KEYS.ENTER],\n 'Successfully installed the Sentry Nuxt SDK!',\n );\n\n wizardInstance.kill();\n}\n\nfunction testNuxtProjectSetup(projectDir: string) {\n const integration = Integration.nuxt;\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('config files created', () => {\n checkFileExists(`${projectDir}/sentry.server.config.ts`);\n checkFileExists(`${projectDir}/sentry.client.config.ts`);\n });\n\n test('example page exists', () => {\n checkFileExists(`${projectDir}/pages/sentry-example-page.vue`);\n checkFileExists(`${projectDir}/server/api/sentry-example-api.ts`);\n });\n}\n\nfunction testNuxtProjectConfigs(projectDir: string) {\n test('nuxt config contains sentry module', () => {\n checkFileContents(path.resolve(projectDir, 'nuxt.config.ts'), [\n \"modules: ['@sentry/nuxt/module'],\",\n 'sentry: {',\n ' sourceMapsUploadOptions: {',\n ` org: '${TEST_ARGS.ORG_SLUG}',`,\n ` project: '${TEST_ARGS.PROJECT_SLUG}'`,\n ' }',\n '},',\n 'sourcemap: {',\n \" client: 'hidden'\",\n '}',\n ]);\n });\n\n test('sentry.client.config.ts contents', () => {\n checkFileContents(path.resolve(projectDir, 'sentry.client.config.ts'), [\n 'import * as Sentry from \"@sentry/nuxt\";',\n 'Sentry.init({',\n ' // If set up, you can use your runtime config here',\n ' // dsn: useRuntimeConfig().public.sentry.dsn,',\n ` dsn: \"${TEST_ARGS.PROJECT_DSN}\",`,\n ' // We recommend adjusting this value in production, or using tracesSampler',\n ' // for finer control',\n ' tracesSampleRate: 1.0,',\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 ' // If the entire session is not sampled, use the below sample rate to sample',\n ' // sessions when an error occurs.',\n ' replaysOnErrorSampleRate: 1.0,',\n \" // If you don't want to use Session Replay, just remove the line below:\",\n ' integrations: [Sentry.replayIntegration()],',\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 test('sentry.server.config.ts contents', () => {\n checkFileContents(path.resolve(projectDir, 'sentry.server.config.ts'), [\n 'import * as Sentry from \"@sentry/nuxt\";',\n 'Sentry.init({',\n ` dsn: \"${TEST_ARGS.PROJECT_DSN}\",`,\n ' // We recommend adjusting this value in production, or using tracesSampler',\n ' // for finer control',\n ' tracesSampleRate: 1.0,',\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\nfunction testNuxtProjectBuildsAndRuns(projectDir: string) {\n test('builds successfully', async () => {\n await checkIfBuilds(projectDir);\n });\n\n test('runs on prod mode correctly', async () => {\n await checkIfRunsOnProdMode(projectDir, 'Listening on');\n });\n}\n"]}
|
|
@@ -22,60 +22,17 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
35
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
36
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
37
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
38
|
-
function step(op) {
|
|
39
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
40
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
41
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
42
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
43
|
-
switch (op[0]) {
|
|
44
|
-
case 0: case 1: t = op; break;
|
|
45
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
46
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
47
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
48
|
-
default:
|
|
49
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
50
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
51
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
52
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
53
|
-
if (t[2]) _.ops.pop();
|
|
54
|
-
_.trys.pop(); continue;
|
|
55
|
-
}
|
|
56
|
-
op = body.call(thisArg, _);
|
|
57
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
58
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
describe('Nuxt-4',
|
|
67
|
-
|
|
68
|
-
beforeAll(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
case 1:
|
|
73
|
-
_a.sent();
|
|
74
|
-
return [2 /*return*/];
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}); });
|
|
78
|
-
afterAll(function () {
|
|
26
|
+
const path = __importStar(require("node:path"));
|
|
27
|
+
const Constants_1 = require("../../lib/Constants");
|
|
28
|
+
const utils_1 = require("../utils");
|
|
29
|
+
const utils_2 = require("../utils");
|
|
30
|
+
describe('Nuxt-4', () => {
|
|
31
|
+
const projectDir = path.resolve(__dirname, '../test-applications/nuxt-4-test-app');
|
|
32
|
+
beforeAll(async () => {
|
|
33
|
+
await runWizardOnNuxtProject(projectDir);
|
|
34
|
+
});
|
|
35
|
+
afterAll(() => {
|
|
79
36
|
(0, utils_1.revertLocalChanges)(projectDir);
|
|
80
37
|
(0, utils_1.cleanupGit)(projectDir);
|
|
81
38
|
});
|
|
@@ -83,105 +40,62 @@ describe('Nuxt-4', function () {
|
|
|
83
40
|
testNuxtProjectConfigs(projectDir);
|
|
84
41
|
testNuxtProjectBuildsAndRuns(projectDir);
|
|
85
42
|
});
|
|
86
|
-
function runWizardOnNuxtProject(projectDir) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
_f.label = 5;
|
|
117
|
-
case 5:
|
|
118
|
-
deploymentPlatformPrompted = _b;
|
|
119
|
-
_c = deploymentPlatformPrompted;
|
|
120
|
-
if (!_c) return [3 /*break*/, 7];
|
|
121
|
-
return [4 /*yield*/, wizardInstance.sendStdinAndWaitForOutput(utils_2.KEYS.ENTER,
|
|
122
|
-
// "Do you want to enable Tracing", sometimes doesn't work as `Tracing` can be printed in bold.
|
|
123
|
-
'Do you want to enable', {
|
|
124
|
-
timeout: 240000,
|
|
125
|
-
})];
|
|
126
|
-
case 6:
|
|
127
|
-
_c = (_f.sent());
|
|
128
|
-
_f.label = 7;
|
|
129
|
-
case 7:
|
|
130
|
-
tracingOptionPrompted = _c;
|
|
131
|
-
_d = tracingOptionPrompted;
|
|
132
|
-
if (!_d) return [3 /*break*/, 9];
|
|
133
|
-
return [4 /*yield*/, wizardInstance.sendStdinAndWaitForOutput([utils_2.KEYS.ENTER],
|
|
134
|
-
// "Do you want to enable Sentry Session Replay", sometimes doesn't work as `Sentry Session Replay` can be printed in bold.
|
|
135
|
-
'to get a video-like reproduction of errors during a user session?')];
|
|
136
|
-
case 8:
|
|
137
|
-
_d = (_f.sent());
|
|
138
|
-
_f.label = 9;
|
|
139
|
-
case 9:
|
|
140
|
-
replayOptionPrompted = _d;
|
|
141
|
-
_e = replayOptionPrompted;
|
|
142
|
-
if (!_e) return [3 /*break*/, 11];
|
|
143
|
-
return [4 /*yield*/, wizardInstance.sendStdinAndWaitForOutput([utils_2.KEYS.ENTER], 'Do you want to create an example page', {
|
|
144
|
-
optional: true,
|
|
145
|
-
})];
|
|
146
|
-
case 10:
|
|
147
|
-
_e = (_f.sent());
|
|
148
|
-
_f.label = 11;
|
|
149
|
-
case 11:
|
|
150
|
-
_e;
|
|
151
|
-
return [4 /*yield*/, wizardInstance.sendStdinAndWaitForOutput([utils_2.KEYS.ENTER, utils_2.KEYS.ENTER], 'Successfully installed the Sentry Nuxt SDK!')];
|
|
152
|
-
case 12:
|
|
153
|
-
_f.sent();
|
|
154
|
-
wizardInstance.kill();
|
|
155
|
-
return [2 /*return*/];
|
|
156
|
-
}
|
|
157
|
-
});
|
|
158
|
-
});
|
|
43
|
+
async function runWizardOnNuxtProject(projectDir) {
|
|
44
|
+
const integration = Constants_1.Integration.nuxt;
|
|
45
|
+
const wizardInstance = (0, utils_2.startWizardInstance)(integration, projectDir);
|
|
46
|
+
const packageManagerPrompted = await wizardInstance.waitForOutput('Please select your package manager.');
|
|
47
|
+
const nftOverridePrompted = packageManagerPrompted &&
|
|
48
|
+
(await wizardInstance.sendStdinAndWaitForOutput(
|
|
49
|
+
// Selecting `yarn` as the package manager
|
|
50
|
+
[utils_2.KEYS.DOWN, utils_2.KEYS.ENTER], 'Do you want to add an override for @vercel/nft version ^0.27.4?', {
|
|
51
|
+
timeout: 240000,
|
|
52
|
+
}));
|
|
53
|
+
const deploymentPlatformPrompted = nftOverridePrompted &&
|
|
54
|
+
(await wizardInstance.sendStdinAndWaitForOutput(utils_2.KEYS.ENTER, 'Please select your deployment platform.', {
|
|
55
|
+
timeout: 240000,
|
|
56
|
+
}));
|
|
57
|
+
const tracingOptionPrompted = deploymentPlatformPrompted &&
|
|
58
|
+
(await wizardInstance.sendStdinAndWaitForOutput(utils_2.KEYS.ENTER,
|
|
59
|
+
// "Do you want to enable Tracing", sometimes doesn't work as `Tracing` can be printed in bold.
|
|
60
|
+
'Do you want to enable', {
|
|
61
|
+
timeout: 240000,
|
|
62
|
+
}));
|
|
63
|
+
const replayOptionPrompted = tracingOptionPrompted &&
|
|
64
|
+
(await wizardInstance.sendStdinAndWaitForOutput([utils_2.KEYS.ENTER],
|
|
65
|
+
// "Do you want to enable Sentry Session Replay", sometimes doesn't work as `Sentry Session Replay` can be printed in bold.
|
|
66
|
+
'to get a video-like reproduction of errors during a user session?'));
|
|
67
|
+
replayOptionPrompted &&
|
|
68
|
+
(await wizardInstance.sendStdinAndWaitForOutput([utils_2.KEYS.ENTER], 'Do you want to create an example page', {
|
|
69
|
+
optional: true,
|
|
70
|
+
}));
|
|
71
|
+
await wizardInstance.sendStdinAndWaitForOutput([utils_2.KEYS.ENTER, utils_2.KEYS.ENTER], 'Successfully installed the Sentry Nuxt SDK!');
|
|
72
|
+
wizardInstance.kill();
|
|
159
73
|
}
|
|
160
74
|
function testNuxtProjectSetup(projectDir) {
|
|
161
|
-
|
|
162
|
-
test('package.json is updated correctly',
|
|
75
|
+
const integration = Constants_1.Integration.nuxt;
|
|
76
|
+
test('package.json is updated correctly', () => {
|
|
163
77
|
(0, utils_2.checkPackageJson)(projectDir, integration);
|
|
164
78
|
});
|
|
165
|
-
test('.env-sentry-build-plugin is created and contains the auth token',
|
|
79
|
+
test('.env-sentry-build-plugin is created and contains the auth token', () => {
|
|
166
80
|
(0, utils_2.checkEnvBuildPlugin)(projectDir);
|
|
167
81
|
});
|
|
168
|
-
test('config files created',
|
|
169
|
-
(0, utils_2.checkFileExists)(
|
|
170
|
-
(0, utils_2.checkFileExists)(
|
|
82
|
+
test('config files created', () => {
|
|
83
|
+
(0, utils_2.checkFileExists)(`${projectDir}/sentry.server.config.ts`);
|
|
84
|
+
(0, utils_2.checkFileExists)(`${projectDir}/sentry.client.config.ts`);
|
|
171
85
|
});
|
|
172
|
-
test('example page exists',
|
|
173
|
-
(0, utils_2.checkFileExists)(
|
|
174
|
-
(0, utils_2.checkFileExists)(
|
|
86
|
+
test('example page exists', () => {
|
|
87
|
+
(0, utils_2.checkFileExists)(`${projectDir}/app/pages/sentry-example-page.vue`);
|
|
88
|
+
(0, utils_2.checkFileExists)(`${projectDir}/server/api/sentry-example-api.ts`);
|
|
175
89
|
});
|
|
176
90
|
}
|
|
177
91
|
function testNuxtProjectConfigs(projectDir) {
|
|
178
|
-
test('nuxt config contains sentry module',
|
|
92
|
+
test('nuxt config contains sentry module', () => {
|
|
179
93
|
(0, utils_2.checkFileContents)(path.resolve(projectDir, 'nuxt.config.ts'), [
|
|
180
94
|
"modules: ['@sentry/nuxt/module'],",
|
|
181
95
|
'sentry: {',
|
|
182
96
|
' sourceMapsUploadOptions: {',
|
|
183
|
-
|
|
184
|
-
|
|
97
|
+
` org: '${utils_2.TEST_ARGS.ORG_SLUG}',`,
|
|
98
|
+
` project: '${utils_2.TEST_ARGS.PROJECT_SLUG}'`,
|
|
185
99
|
' }',
|
|
186
100
|
'},',
|
|
187
101
|
'sourcemap: {',
|
|
@@ -189,13 +103,13 @@ function testNuxtProjectConfigs(projectDir) {
|
|
|
189
103
|
'}',
|
|
190
104
|
]);
|
|
191
105
|
});
|
|
192
|
-
test('sentry.client.config.ts contents',
|
|
106
|
+
test('sentry.client.config.ts contents', () => {
|
|
193
107
|
(0, utils_2.checkFileContents)(path.resolve(projectDir, 'sentry.client.config.ts'), [
|
|
194
108
|
'import * as Sentry from "@sentry/nuxt";',
|
|
195
109
|
'Sentry.init({',
|
|
196
110
|
' // If set up, you can use your runtime config here',
|
|
197
111
|
' // dsn: useRuntimeConfig().public.sentry.dsn,',
|
|
198
|
-
|
|
112
|
+
` dsn: "${utils_2.TEST_ARGS.PROJECT_DSN}",`,
|
|
199
113
|
' // We recommend adjusting this value in production, or using tracesSampler',
|
|
200
114
|
' // for finer control',
|
|
201
115
|
' tracesSampleRate: 1.0,',
|
|
@@ -212,11 +126,11 @@ function testNuxtProjectConfigs(projectDir) {
|
|
|
212
126
|
'});',
|
|
213
127
|
]);
|
|
214
128
|
});
|
|
215
|
-
test('sentry.server.config.ts contents',
|
|
129
|
+
test('sentry.server.config.ts contents', () => {
|
|
216
130
|
(0, utils_2.checkFileContents)(path.resolve(projectDir, 'sentry.server.config.ts'), [
|
|
217
131
|
'import * as Sentry from "@sentry/nuxt";',
|
|
218
132
|
'Sentry.init({',
|
|
219
|
-
|
|
133
|
+
` dsn: "${utils_2.TEST_ARGS.PROJECT_DSN}",`,
|
|
220
134
|
' // We recommend adjusting this value in production, or using tracesSampler',
|
|
221
135
|
' // for finer control',
|
|
222
136
|
' tracesSampleRate: 1.0,',
|
|
@@ -227,26 +141,11 @@ function testNuxtProjectConfigs(projectDir) {
|
|
|
227
141
|
});
|
|
228
142
|
}
|
|
229
143
|
function testNuxtProjectBuildsAndRuns(projectDir) {
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
_a.sent();
|
|
237
|
-
return [2 /*return*/];
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
}); });
|
|
241
|
-
test('runs on prod mode correctly', function () { return __awaiter(_this, void 0, void 0, function () {
|
|
242
|
-
return __generator(this, function (_a) {
|
|
243
|
-
switch (_a.label) {
|
|
244
|
-
case 0: return [4 /*yield*/, (0, utils_2.checkIfRunsOnProdMode)(projectDir, 'Listening on')];
|
|
245
|
-
case 1:
|
|
246
|
-
_a.sent();
|
|
247
|
-
return [2 /*return*/];
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
}); });
|
|
144
|
+
test('builds successfully', async () => {
|
|
145
|
+
await (0, utils_2.checkIfBuilds)(projectDir);
|
|
146
|
+
});
|
|
147
|
+
test('runs on prod mode correctly', async () => {
|
|
148
|
+
await (0, utils_2.checkIfRunsOnProdMode)(projectDir, 'Listening on');
|
|
149
|
+
});
|
|
251
150
|
}
|
|
252
151
|
//# sourceMappingURL=nuxt-4.test.js.map
|