@sentry/wizard 3.42.1 → 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 +26 -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 -3
- 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 -2
- 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/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
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import * as path from 'path';
|
|
1
|
+
import * as path from 'node:path';
|
|
2
|
+
import { Integration } from '../../lib/Constants';
|
|
2
3
|
import {
|
|
4
|
+
KEYS,
|
|
5
|
+
TEST_ARGS,
|
|
3
6
|
checkEnvBuildPlugin,
|
|
4
7
|
checkFileContents,
|
|
5
8
|
checkFileExists,
|
|
@@ -7,12 +10,9 @@ import {
|
|
|
7
10
|
checkIfRunsOnProdMode,
|
|
8
11
|
checkPackageJson,
|
|
9
12
|
cleanupGit,
|
|
10
|
-
KEYS,
|
|
11
13
|
revertLocalChanges,
|
|
12
14
|
startWizardInstance,
|
|
13
|
-
TEST_ARGS,
|
|
14
15
|
} from '../utils';
|
|
15
|
-
import { Integration } from '../../lib/Constants';
|
|
16
16
|
|
|
17
17
|
describe('Nuxt-3', () => {
|
|
18
18
|
const projectDir = path.resolve(
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import * as path from 'path';
|
|
1
|
+
import * as path from 'node:path';
|
|
2
2
|
import { Integration } from '../../lib/Constants';
|
|
3
3
|
import { cleanupGit, revertLocalChanges } from '../utils';
|
|
4
4
|
import {
|
|
5
|
+
KEYS,
|
|
6
|
+
TEST_ARGS,
|
|
5
7
|
checkEnvBuildPlugin,
|
|
6
8
|
checkFileContents,
|
|
7
9
|
checkFileExists,
|
|
8
10
|
checkIfBuilds,
|
|
9
11
|
checkIfRunsOnProdMode,
|
|
10
12
|
checkPackageJson,
|
|
11
|
-
KEYS,
|
|
12
13
|
startWizardInstance,
|
|
13
|
-
TEST_ARGS,
|
|
14
14
|
} from '../utils';
|
|
15
15
|
|
|
16
16
|
describe('Nuxt-4', () => {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/* eslint-disable jest/expect-expect */
|
|
2
|
+
import * as path from 'node:path';
|
|
2
3
|
import { Integration } from '../../lib/Constants';
|
|
3
4
|
import {
|
|
5
|
+
KEYS,
|
|
6
|
+
TEST_ARGS,
|
|
4
7
|
checkEnvBuildPlugin,
|
|
5
8
|
checkFileContents,
|
|
6
9
|
checkFileExists,
|
|
@@ -10,13 +13,10 @@ import {
|
|
|
10
13
|
checkPackageJson,
|
|
11
14
|
cleanupGit,
|
|
12
15
|
createFile,
|
|
13
|
-
KEYS,
|
|
14
16
|
modifyFile,
|
|
15
17
|
revertLocalChanges,
|
|
16
18
|
startWizardInstance,
|
|
17
|
-
TEST_ARGS,
|
|
18
19
|
} from '../utils';
|
|
19
|
-
import * as path from 'path';
|
|
20
20
|
|
|
21
21
|
const SERVER_TEMPLATE = `import { createRequestHandler } from '@remix-run/express';
|
|
22
22
|
import { installGlobals } from '@remix-run/node';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/* eslint-disable jest/expect-expect */
|
|
2
|
+
import * as path from 'node:path';
|
|
2
3
|
import { Integration } from '../../lib/Constants';
|
|
3
4
|
import {
|
|
5
|
+
KEYS,
|
|
6
|
+
TEST_ARGS,
|
|
4
7
|
checkEnvBuildPlugin,
|
|
5
8
|
checkFileContents,
|
|
6
9
|
checkFileExists,
|
|
@@ -10,12 +13,9 @@ import {
|
|
|
10
13
|
checkPackageJson,
|
|
11
14
|
cleanupGit,
|
|
12
15
|
createFile,
|
|
13
|
-
KEYS,
|
|
14
16
|
revertLocalChanges,
|
|
15
17
|
startWizardInstance,
|
|
16
|
-
TEST_ARGS,
|
|
17
18
|
} from '../utils';
|
|
18
|
-
import * as path from 'path';
|
|
19
19
|
|
|
20
20
|
const SERVER_HOOK_TEMPLATE = `import type { Handle } from '@sveltejs/kit';
|
|
21
21
|
|
package/e2e-tests/utils/index.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import * as fs from 'fs';
|
|
2
|
-
import * as path from 'path';
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
3
|
|
|
4
4
|
import type { Integration } from '../../lib/Constants';
|
|
5
|
-
import { spawn, execSync } from 'child_process';
|
|
6
|
-
import type { ChildProcess } from 'child_process';
|
|
5
|
+
import { spawn, execSync } from 'node:child_process';
|
|
6
|
+
import type { ChildProcess } from 'node:child_process';
|
|
7
7
|
import { dim, green, red } from '../../lib/Helper/Logging';
|
|
8
8
|
|
|
9
9
|
export const KEYS = {
|
|
@@ -49,13 +49,13 @@ export class WizardTestEnv {
|
|
|
49
49
|
this.taskHandle = spawn(cmd, args, { cwd: opts?.cwd, stdio: 'pipe' });
|
|
50
50
|
|
|
51
51
|
if (opts?.debug) {
|
|
52
|
-
this.taskHandle.stdout
|
|
53
|
-
this.taskHandle.stderr
|
|
52
|
+
this.taskHandle.stdout?.pipe(process.stdout);
|
|
53
|
+
this.taskHandle.stderr?.pipe(process.stderr);
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
sendStdin(input: string) {
|
|
58
|
-
this.taskHandle.stdin
|
|
58
|
+
this.taskHandle.stdin?.write(input);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/**
|
|
@@ -100,9 +100,15 @@ export class WizardTestEnv {
|
|
|
100
100
|
|
|
101
101
|
return new Promise<boolean>((resolve, reject) => {
|
|
102
102
|
const timeoutId = setTimeout(() => {
|
|
103
|
+
this.kill();
|
|
103
104
|
reject(new Error(`Timeout waiting for status code: ${statusCode}`));
|
|
104
105
|
}, timeout);
|
|
105
106
|
|
|
107
|
+
this.taskHandle.on('error', (err: Error) => {
|
|
108
|
+
clearTimeout(timeoutId);
|
|
109
|
+
reject(err);
|
|
110
|
+
});
|
|
111
|
+
|
|
106
112
|
this.taskHandle.on('exit', (code: number | null) => {
|
|
107
113
|
clearTimeout(timeoutId);
|
|
108
114
|
resolve(code === statusCode);
|
|
@@ -134,15 +140,25 @@ export class WizardTestEnv {
|
|
|
134
140
|
return new Promise<boolean>((resolve, reject) => {
|
|
135
141
|
let outputBuffer = '';
|
|
136
142
|
const timeoutId = setTimeout(() => {
|
|
143
|
+
this.kill();
|
|
137
144
|
if (optional) {
|
|
138
145
|
// The output is not found but it's optional so we can resolve the promise with false
|
|
139
146
|
resolve(false);
|
|
140
147
|
} else {
|
|
141
|
-
reject(
|
|
148
|
+
reject(
|
|
149
|
+
new Error(
|
|
150
|
+
`Timeout waiting for output: ${output}. Got the following instead: ${outputBuffer}`,
|
|
151
|
+
),
|
|
152
|
+
);
|
|
142
153
|
}
|
|
143
154
|
}, timeout);
|
|
144
155
|
|
|
145
|
-
this.taskHandle.
|
|
156
|
+
this.taskHandle.on('error', (err: Error) => {
|
|
157
|
+
clearTimeout(timeoutId);
|
|
158
|
+
reject(err);
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
this.taskHandle.stdout?.on('data', (data) => {
|
|
146
162
|
outputBuffer += data;
|
|
147
163
|
if (outputBuffer.includes(output)) {
|
|
148
164
|
clearTimeout(timeoutId);
|
|
@@ -154,9 +170,9 @@ export class WizardTestEnv {
|
|
|
154
170
|
}
|
|
155
171
|
|
|
156
172
|
kill() {
|
|
157
|
-
this.taskHandle.stdin
|
|
158
|
-
this.taskHandle.stderr
|
|
159
|
-
this.taskHandle.stdout
|
|
173
|
+
this.taskHandle.stdin?.destroy();
|
|
174
|
+
this.taskHandle.stderr?.destroy();
|
|
175
|
+
this.taskHandle.stdout?.destroy();
|
|
160
176
|
this.taskHandle.kill('SIGINT');
|
|
161
177
|
this.taskHandle.unref();
|
|
162
178
|
}
|
|
@@ -230,16 +246,18 @@ export function startWizardInstance(
|
|
|
230
246
|
projectDir: string,
|
|
231
247
|
debug = false,
|
|
232
248
|
): WizardTestEnv {
|
|
233
|
-
const
|
|
249
|
+
const binName = process.env.SENTRY_WIZARD_E2E_TEST_BIN
|
|
250
|
+
? ['dist-bin', `sentry-wizard-${process.platform}-${process.arch}`]
|
|
251
|
+
: ['dist', 'bin.js'];
|
|
252
|
+
const binPath = path.join(__dirname, '..', '..', ...binName);
|
|
234
253
|
|
|
235
254
|
revertLocalChanges(projectDir);
|
|
236
255
|
cleanupGit(projectDir);
|
|
237
256
|
initGit(projectDir);
|
|
238
257
|
|
|
239
258
|
return new WizardTestEnv(
|
|
240
|
-
|
|
259
|
+
binPath,
|
|
241
260
|
[
|
|
242
|
-
binPath,
|
|
243
261
|
'--debug',
|
|
244
262
|
'-i',
|
|
245
263
|
integration,
|
package/lib/Helper/BottomBar.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { nl } from './Logging';
|
|
|
4
4
|
|
|
5
5
|
export class BottomBar {
|
|
6
6
|
public static bar: typeof ui.BottomBar;
|
|
7
|
-
public static interval: NodeJS.
|
|
7
|
+
public static interval: NodeJS.Timeout;
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
|
10
10
|
public static show(msg: string): void {
|
package/lib/Helper/Env.ts
CHANGED
package/lib/Helper/Package.ts
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import * as _ from 'lodash';
|
|
2
1
|
import { satisfies, subset, valid, validRange } from 'semver';
|
|
3
2
|
|
|
4
3
|
import { green, red } from './Logging';
|
|
5
4
|
|
|
6
5
|
export function checkPackageVersion(
|
|
7
|
-
appPackage:
|
|
6
|
+
appPackage: {
|
|
7
|
+
dependencies?: Record<string, string>;
|
|
8
|
+
devDependencies?: Record<string, string>;
|
|
9
|
+
},
|
|
8
10
|
packageName: string,
|
|
9
11
|
acceptableVersions: string,
|
|
10
12
|
canBeLatest: boolean,
|
|
11
13
|
): boolean {
|
|
12
|
-
const depsVersion =
|
|
13
|
-
const devDepsVersion =
|
|
14
|
+
const depsVersion = appPackage?.dependencies?.[packageName] ?? '';
|
|
15
|
+
const devDepsVersion = appPackage?.devDependencies?.[packageName] ?? '';
|
|
14
16
|
|
|
15
17
|
if (!depsVersion && !devDepsVersion) {
|
|
16
18
|
red(`✗ ${packageName} isn't in your dependencies.`);
|
|
17
19
|
red(' Please install it with yarn/npm.');
|
|
18
20
|
return false;
|
|
19
|
-
}
|
|
21
|
+
}
|
|
22
|
+
if (
|
|
20
23
|
!fulfillsVersionRange(depsVersion, acceptableVersions, canBeLatest) &&
|
|
21
24
|
!fulfillsVersionRange(devDepsVersion, acceptableVersions, canBeLatest)
|
|
22
25
|
) {
|
|
@@ -24,12 +27,11 @@ export function checkPackageVersion(
|
|
|
24
27
|
`✗ Your \`package.json\` specifies a version of \`${packageName}\` outside of the compatible version range ${acceptableVersions}.\n`,
|
|
25
28
|
);
|
|
26
29
|
return false;
|
|
27
|
-
} else {
|
|
28
|
-
green(
|
|
29
|
-
`✓ A compatible version of \`${packageName}\` is specified in \`package.json\`.`,
|
|
30
|
-
);
|
|
31
|
-
return true;
|
|
32
30
|
}
|
|
31
|
+
green(
|
|
32
|
+
`✓ A compatible version of \`${packageName}\` is specified in \`package.json\`.`,
|
|
33
|
+
);
|
|
34
|
+
return true;
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
function fulfillsVersionRange(
|
package/lib/Helper/SentryCli.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as fs from 'fs';
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
2
|
import type { Answers } from 'inquirer';
|
|
3
|
-
import * as
|
|
4
|
-
import * as path from 'path';
|
|
3
|
+
import * as path from 'node:path';
|
|
5
4
|
|
|
6
5
|
import type { Args } from '../Constants';
|
|
7
6
|
import { addToGitignore } from './Git';
|
|
@@ -30,9 +29,9 @@ export class SentryCli {
|
|
|
30
29
|
public convertAnswersToProperties(answers: Answers): SentryCliProps {
|
|
31
30
|
const props: SentryCliProps = {};
|
|
32
31
|
props['defaults/url'] = this._argv.url;
|
|
33
|
-
props['defaults/org'] =
|
|
34
|
-
props['defaults/project'] =
|
|
35
|
-
props['auth/token'] =
|
|
32
|
+
props['defaults/org'] = answers.config?.organization?.slug ?? null;
|
|
33
|
+
props['defaults/project'] = answers.config?.project?.slug ?? null;
|
|
34
|
+
props['auth/token'] = answers.config?.auth?.token ?? null;
|
|
36
35
|
try {
|
|
37
36
|
const cliPath = this._resolve('@sentry/cli/bin/sentry-cli', {
|
|
38
37
|
paths: [process.cwd()],
|
|
@@ -41,7 +40,7 @@ export class SentryCli {
|
|
|
41
40
|
.relative(process.cwd(), cliPath)
|
|
42
41
|
.replace(/\\/g, '\\\\');
|
|
43
42
|
} catch (e) {
|
|
44
|
-
// we do nothing and leave
|
|
43
|
+
// we do nothing and leave everything as it is
|
|
45
44
|
}
|
|
46
45
|
return props;
|
|
47
46
|
}
|
|
@@ -49,17 +48,13 @@ export class SentryCli {
|
|
|
49
48
|
/** Create the contents of a `sentry.properties` file */
|
|
50
49
|
public dumpProperties(props: SentryCliProps): string {
|
|
51
50
|
const rv = [];
|
|
52
|
-
for (
|
|
53
|
-
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
rv.push(`#${key}=`);
|
|
60
|
-
} else {
|
|
61
|
-
rv.push(`${key}=${value}`);
|
|
62
|
-
}
|
|
51
|
+
for (const [key, value] of Object.entries(props)) {
|
|
52
|
+
const normalizedKey = key.replace(/\//g, '.');
|
|
53
|
+
if (value === undefined || value === null) {
|
|
54
|
+
// comment that property out since it has no value
|
|
55
|
+
rv.push(`#${normalizedKey}=`);
|
|
56
|
+
} else {
|
|
57
|
+
rv.push(`${normalizedKey}=${value}`);
|
|
63
58
|
}
|
|
64
59
|
}
|
|
65
60
|
// eslint-disable-next-line prefer-template
|
|
@@ -68,13 +63,10 @@ export class SentryCli {
|
|
|
68
63
|
|
|
69
64
|
public dumpConfig(config: SentryCliConfig): string {
|
|
70
65
|
const dumpedSections: string[] = [];
|
|
71
|
-
for (const sectionName
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const section = `[${sectionName}]\n${props}`;
|
|
76
|
-
dumpedSections.push(section);
|
|
77
|
-
}
|
|
66
|
+
for (const [sectionName, val] of Object.entries(config)) {
|
|
67
|
+
const props = this.dumpProperties(val);
|
|
68
|
+
const section = `[${sectionName}]\n${props}`;
|
|
69
|
+
dumpedSections.push(section);
|
|
78
70
|
}
|
|
79
71
|
return dumpedSections.join('\n');
|
|
80
72
|
}
|
|
@@ -127,8 +119,7 @@ export class SentryCli {
|
|
|
127
119
|
|
|
128
120
|
await addToGitignore(
|
|
129
121
|
SENTRYCLIRC_FILENAME,
|
|
130
|
-
`⚠ Could not add ${SENTRYCLIRC_FILENAME} to ${GITIGNORE_FILENAME},
|
|
131
|
-
'please add it to not commit your auth key.',
|
|
122
|
+
`⚠ Could not add ${SENTRYCLIRC_FILENAME} to ${GITIGNORE_FILENAME}, please add it to not commit your auth key.`,
|
|
132
123
|
);
|
|
133
124
|
|
|
134
125
|
try {
|
package/lib/Helper/Wizard.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Answers } from 'inquirer';
|
|
2
|
-
import * as _ from 'lodash';
|
|
3
2
|
|
|
4
3
|
import type { Args } from '../Constants';
|
|
5
4
|
import type { IStep } from '../Steps/BaseStep';
|
|
@@ -24,7 +23,7 @@ function sanitizeAndValidateArgs(argv: Args): void {
|
|
|
24
23
|
}
|
|
25
24
|
|
|
26
25
|
export function getCurrentIntegration(answers: Answers): BaseIntegration {
|
|
27
|
-
return
|
|
26
|
+
return answers.integration as BaseIntegration;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
29
|
export async function startWizard<M extends IStep>(
|
package/lib/Setup.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as _ from 'lodash';
|
|
2
1
|
import { enableDebugLogs } from '../src/utils/debug';
|
|
3
2
|
|
|
4
3
|
import { readEnvironment } from './Helper/Env';
|
|
@@ -21,21 +20,21 @@ export async function run(argv: any): Promise<any> {
|
|
|
21
20
|
if (args.uninstall === undefined) {
|
|
22
21
|
args.uninstall = false;
|
|
23
22
|
}
|
|
24
|
-
|
|
23
|
+
const steps = [
|
|
25
24
|
Step.Initial,
|
|
26
25
|
Step.Welcome,
|
|
27
26
|
Step.ChooseIntegration,
|
|
28
27
|
Step.ShouldConfigure,
|
|
29
28
|
];
|
|
30
29
|
if (args.uninstall === false) {
|
|
31
|
-
steps
|
|
32
|
-
steps,
|
|
30
|
+
steps.push(
|
|
33
31
|
Step.OpenSentry,
|
|
34
32
|
Step.WaitForSentry,
|
|
35
33
|
Step.SentryProjectSelector,
|
|
36
34
|
Step.PromptForParameters,
|
|
37
35
|
);
|
|
38
36
|
}
|
|
39
|
-
steps
|
|
37
|
+
steps.push(Step.ConfigureProject, Step.Result);
|
|
38
|
+
|
|
40
39
|
return startWizard(args, ...steps);
|
|
41
40
|
}
|
|
@@ -1,25 +1,55 @@
|
|
|
1
1
|
import type { Answers } from 'inquirer';
|
|
2
2
|
import { prompt } from 'inquirer';
|
|
3
3
|
|
|
4
|
+
import { readFileSync } from 'node:fs';
|
|
5
|
+
import { hasPackageInstalled } from '../../src/utils/package-json';
|
|
4
6
|
import {
|
|
5
7
|
Args,
|
|
6
8
|
DEFAULT_URL,
|
|
7
9
|
getIntegrationChoices,
|
|
8
10
|
Integration,
|
|
9
11
|
} from '../Constants';
|
|
12
|
+
import { dim, red } from '../Helper/Logging';
|
|
10
13
|
import { BaseStep } from './BaseStep';
|
|
11
14
|
import { Cordova } from './Integrations/Cordova';
|
|
12
15
|
import { Electron } from './Integrations/Electron';
|
|
13
|
-
import { hasPackageInstalled } from '../../src/utils/package-json';
|
|
14
|
-
import { dim } from '../Helper/Logging';
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
function getProjectPackage(): Record<string, unknown> {
|
|
18
|
+
let projectPackage: Record<string, unknown> = {};
|
|
19
|
+
|
|
20
|
+
const projectPackagePathCandidates = [
|
|
21
|
+
// If we run directly in setup-wizard
|
|
22
|
+
'../../package.json',
|
|
23
|
+
|
|
24
|
+
// If we run from the CLI
|
|
25
|
+
`${process.cwd()}/package.json`,
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
for (const pathCandidate of projectPackagePathCandidates) {
|
|
29
|
+
let data: string;
|
|
30
|
+
try {
|
|
31
|
+
data = readFileSync(pathCandidate, 'utf-8');
|
|
32
|
+
} catch (error) {
|
|
33
|
+
// If the file does not exist, continue to the next candidate
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
17
36
|
|
|
18
|
-
try {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
} catch {
|
|
22
|
-
|
|
37
|
+
try {
|
|
38
|
+
projectPackage = JSON.parse(data) as Record<string, unknown>;
|
|
39
|
+
break;
|
|
40
|
+
} catch (error) {
|
|
41
|
+
// If the file exists but is not valid JSON, log an error and continue.
|
|
42
|
+
// Note: we don't want to crash the wizard if the package.json is invalid,
|
|
43
|
+
// because it is only use by the integration detection logic.
|
|
44
|
+
// Furthmore other package managers, i.e. bun, allow JSON-with-comments which might
|
|
45
|
+
// throw errors with JSON.parse, and will require a different JSON parser in the future.
|
|
46
|
+
red(
|
|
47
|
+
`Failed to parse JSON from ${pathCandidate}, is your file a valid package.json?`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return projectPackage;
|
|
23
53
|
}
|
|
24
54
|
|
|
25
55
|
type IntegrationPromptAnswer = {
|
|
@@ -44,6 +74,8 @@ export class ChooseIntegration extends BaseStep {
|
|
|
44
74
|
}
|
|
45
75
|
|
|
46
76
|
public tryDetectingIntegration(): Integration | undefined {
|
|
77
|
+
const projectPackage = getProjectPackage();
|
|
78
|
+
|
|
47
79
|
if (hasPackageInstalled('react-native', projectPackage)) {
|
|
48
80
|
return Integration.reactNative;
|
|
49
81
|
}
|
package/lib/Steps/Initial.ts
CHANGED
|
@@ -1,44 +1,35 @@
|
|
|
1
1
|
import type { Answers } from 'inquirer';
|
|
2
|
-
import
|
|
3
|
-
import * as path from 'path';
|
|
2
|
+
import { join, dirname } from 'node:path';
|
|
4
3
|
|
|
5
4
|
import { dim } from '../Helper/Logging';
|
|
6
5
|
import { BaseStep } from './BaseStep';
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
let
|
|
8
|
+
type PackageJSON = { version?: string };
|
|
9
|
+
let wizardPackage: PackageJSON = {};
|
|
10
10
|
|
|
11
11
|
try {
|
|
12
|
-
wizardPackage =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
wizardPackage = process.env.npm_package_version
|
|
13
|
+
? { version: process.env.npm_package_version }
|
|
14
|
+
: (JSON.parse(
|
|
15
|
+
readFileSync(
|
|
16
|
+
join(
|
|
17
|
+
dirname(require.resolve('@sentry/wizard')),
|
|
18
|
+
'..',
|
|
19
|
+
'package.json',
|
|
20
|
+
),
|
|
21
|
+
'utf-8',
|
|
22
|
+
),
|
|
23
|
+
) as PackageJSON);
|
|
17
24
|
} catch {
|
|
18
25
|
// We don't need to have this
|
|
19
26
|
}
|
|
20
27
|
|
|
21
|
-
try {
|
|
22
|
-
sentryCliPackage = require(path.join(
|
|
23
|
-
path.dirname(require.resolve('@sentry/cli')),
|
|
24
|
-
'..',
|
|
25
|
-
'package.json',
|
|
26
|
-
));
|
|
27
|
-
} catch {
|
|
28
|
-
// We don't need to have tahis
|
|
29
|
-
}
|
|
30
|
-
|
|
31
28
|
export class Initial extends BaseStep {
|
|
32
29
|
// eslint-disable-next-line @typescript-eslint/require-await
|
|
33
30
|
public async emit(_answers: Answers): Promise<Answers> {
|
|
34
31
|
dim('Running Sentry Wizard...');
|
|
35
|
-
dim(
|
|
36
|
-
`version: ${_.get(
|
|
37
|
-
wizardPackage,
|
|
38
|
-
'version',
|
|
39
|
-
'DEV',
|
|
40
|
-
)} | sentry-cli version: ${_.get(sentryCliPackage, 'version', 'DEV')}`,
|
|
41
|
-
);
|
|
32
|
+
dim(`version: ${wizardPackage.version ?? 'DEV'}`);
|
|
42
33
|
return {};
|
|
43
34
|
}
|
|
44
35
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Answers } from 'inquirer';
|
|
2
|
-
import * as _ from 'lodash';
|
|
3
2
|
|
|
4
3
|
import type { Args } from '../../Constants';
|
|
5
4
|
import { BaseStep } from '../BaseStep';
|
|
@@ -34,13 +33,8 @@ export abstract class BaseIntegration extends BaseStep {
|
|
|
34
33
|
}
|
|
35
34
|
|
|
36
35
|
public async shouldEmit(_answers: Answers): Promise<boolean> {
|
|
37
|
-
return (
|
|
38
|
-
|
|
39
|
-
_.pickBy(
|
|
40
|
-
await this.shouldConfigure(_answers),
|
|
41
|
-
(active: boolean) => active,
|
|
42
|
-
),
|
|
43
|
-
).length > 0
|
|
36
|
+
return Object.values(await this.shouldConfigure(_answers)).some(
|
|
37
|
+
(active: boolean) => active,
|
|
44
38
|
);
|
|
45
39
|
}
|
|
46
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as fs from 'fs';
|
|
1
|
+
import * as fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
2
3
|
import type { Answers } from 'inquirer';
|
|
3
|
-
import * as path from 'path';
|
|
4
4
|
|
|
5
5
|
import type { Args } from '../../Constants';
|
|
6
6
|
import { exists, matchesContent, patchMatchingFile } from '../../Helper/File';
|
|
@@ -8,7 +8,8 @@ import { green } from '../../Helper/Logging';
|
|
|
8
8
|
import { SentryCli } from '../../Helper/SentryCli';
|
|
9
9
|
import { BaseIntegration } from './BaseIntegration';
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
import xcode from 'xcode';
|
|
12
|
+
import type { PBXShellScriptBuildPhase } from 'xcode';
|
|
12
13
|
|
|
13
14
|
export class Cordova extends BaseIntegration {
|
|
14
15
|
protected _sentryCli: SentryCli;
|
|
@@ -142,18 +143,11 @@ export class Cordova extends BaseIntegration {
|
|
|
142
143
|
}
|
|
143
144
|
|
|
144
145
|
const buildScripts = [];
|
|
145
|
-
for (const
|
|
146
|
-
{}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
key,
|
|
151
|
-
)
|
|
152
|
-
) {
|
|
153
|
-
const val = proj.hash.project.objects.PBXShellScriptBuildPhase[key];
|
|
154
|
-
if (val.isa) {
|
|
155
|
-
buildScripts.push(val);
|
|
156
|
-
}
|
|
146
|
+
for (const val of Object.values(
|
|
147
|
+
proj.hash.project.objects.PBXShellScriptBuildPhase || {},
|
|
148
|
+
)) {
|
|
149
|
+
if ((val as PBXShellScriptBuildPhase).isa) {
|
|
150
|
+
buildScripts.push(val);
|
|
157
151
|
}
|
|
158
152
|
}
|
|
159
153
|
|