@sentry/wizard 3.32.0 → 3.33.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/CHANGELOG.md +8 -0
- package/README.md +1 -1
- package/bin.ts +59 -27
- package/dist/bin.js +97 -70
- package/dist/bin.js.map +1 -1
- package/dist/e2e-tests/jest.config.d.ts +15 -0
- package/dist/e2e-tests/jest.config.js +17 -0
- package/dist/e2e-tests/jest.config.js.map +1 -0
- package/dist/e2e-tests/tests/remix.test.d.ts +1 -0
- package/dist/e2e-tests/tests/remix.test.js +187 -0
- package/dist/e2e-tests/tests/remix.test.js.map +1 -0
- package/dist/e2e-tests/utils/index.d.ts +117 -0
- package/dist/e2e-tests/utils/index.js +353 -0
- package/dist/e2e-tests/utils/index.js.map +1 -0
- package/dist/lib/Steps/SentryProjectSelector.js +1 -1
- package/dist/lib/Steps/SentryProjectSelector.js.map +1 -1
- package/dist/package.json +7 -3
- package/dist/src/remix/sdk-example.js +5 -1
- package/dist/src/remix/sdk-example.js.map +1 -1
- package/dist/src/run.d.ts +12 -1
- package/dist/src/run.js +27 -1
- package/dist/src/run.js.map +1 -1
- package/dist/src/sourcemaps/sourcemaps-wizard.d.ts +2 -2
- package/dist/src/sourcemaps/sourcemaps-wizard.js.map +1 -1
- package/dist/src/sourcemaps/tools/remix.d.ts +2 -2
- package/dist/src/sourcemaps/tools/remix.js.map +1 -1
- package/dist/src/utils/clack-utils.js +22 -17
- package/dist/src/utils/clack-utils.js.map +1 -1
- package/dist/src/utils/types.d.ts +6 -14
- package/dist/src/utils/types.js.map +1 -1
- package/e2e-tests/jest.config.ts +14 -0
- package/e2e-tests/test-applications/remix-test-app/app/entry.client.tsx +18 -0
- package/e2e-tests/test-applications/remix-test-app/app/entry.server.tsx +140 -0
- package/e2e-tests/test-applications/remix-test-app/app/root.tsx +30 -0
- package/e2e-tests/test-applications/remix-test-app/app/routes/_index.tsx +48 -0
- package/e2e-tests/test-applications/remix-test-app/app/tailwind.css +3 -0
- package/e2e-tests/test-applications/remix-test-app/package.json +37 -0
- package/e2e-tests/test-applications/remix-test-app/postcss.config.js +6 -0
- package/e2e-tests/test-applications/remix-test-app/tailwind.config.ts +9 -0
- package/e2e-tests/test-applications/remix-test-app/vite.config.ts +16 -0
- package/e2e-tests/tests/remix.test.ts +163 -0
- package/e2e-tests/utils/index.ts +302 -0
- package/lib/Steps/SentryProjectSelector.ts +1 -1
- package/package.json +7 -3
- package/src/remix/sdk-example.ts +6 -0
- package/src/run.ts +45 -5
- package/src/sourcemaps/sourcemaps-wizard.ts +4 -3
- package/src/sourcemaps/tools/remix.ts +2 -2
- package/src/utils/clack-utils.ts +17 -8
- package/src/utils/types.ts +8 -14
package/dist/src/run.js
CHANGED
|
@@ -83,6 +83,31 @@ var remix_wizard_1 = require("./remix/remix-wizard");
|
|
|
83
83
|
var sveltekit_wizard_1 = require("./sveltekit/sveltekit-wizard");
|
|
84
84
|
var sourcemaps_wizard_1 = require("./sourcemaps/sourcemaps-wizard");
|
|
85
85
|
var Env_1 = require("../lib/Helper/Env");
|
|
86
|
+
function preSelectedProjectArgsToObject(args) {
|
|
87
|
+
if (!args.preSelectedProject) {
|
|
88
|
+
return undefined;
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
authToken: args.preSelectedProject.authToken,
|
|
92
|
+
selfHosted: args.preSelectedProject.selfHosted,
|
|
93
|
+
project: {
|
|
94
|
+
id: args.preSelectedProject.projectId,
|
|
95
|
+
keys: [
|
|
96
|
+
{
|
|
97
|
+
dsn: {
|
|
98
|
+
public: args.preSelectedProject.dsn,
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
organization: {
|
|
103
|
+
id: args.preSelectedProject.orgId,
|
|
104
|
+
name: args.preSelectedProject.orgName,
|
|
105
|
+
slug: args.preSelectedProject.orgSlug,
|
|
106
|
+
},
|
|
107
|
+
slug: args.preSelectedProject.projectSlug,
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}
|
|
86
111
|
function run(argv) {
|
|
87
112
|
return __awaiter(this, void 0, void 0, function () {
|
|
88
113
|
var finalArgs, integration, wizardOptions, _a;
|
|
@@ -123,6 +148,7 @@ function run(argv) {
|
|
|
123
148
|
orgSlug: finalArgs.org,
|
|
124
149
|
projectSlug: finalArgs.project,
|
|
125
150
|
saas: finalArgs.saas,
|
|
151
|
+
preSelectedProject: preSelectedProjectArgsToObject(finalArgs),
|
|
126
152
|
};
|
|
127
153
|
_a = integration;
|
|
128
154
|
switch (_a) {
|
|
@@ -174,7 +200,7 @@ function run(argv) {
|
|
|
174
200
|
void (0, Setup_1.run)(argv);
|
|
175
201
|
return [3 /*break*/, 20];
|
|
176
202
|
case 19:
|
|
177
|
-
clack.log.error(
|
|
203
|
+
clack.log.error('No setup wizard selected!');
|
|
178
204
|
_b.label = 20;
|
|
179
205
|
case 20: return [2 /*return*/];
|
|
180
206
|
}
|
package/dist/src/run.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/run.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAyE;AACzE,oDAAwC;AACxC,mDAAuD;AACvD,0EAA0E;AAE1E,sCAAgD;AAEhD,2DAA4D;AAC5D,qDAAsD;AACtD,wDAAyD;AACzD,qDAAsD;AACtD,iEAAkE;AAClE,oEAAqE;AACrE,yCAAoD;
|
|
1
|
+
{"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/run.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAyE;AACzE,oDAAwC;AACxC,mDAAuD;AACvD,0EAA0E;AAE1E,sCAAgD;AAEhD,2DAA4D;AAC5D,qDAAsD;AACtD,wD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AC;KACX;AACH,CAAC","sourcesContent":["// @ts-ignore - clack is ESM and TS complains about that. It works though\nimport * as clack from '@clack/prompts';\nimport { abortIfCancelled } from './utils/clack-utils';\nimport { runReactNativeWizard } from './react-native/react-native-wizard';\n\nimport { run as legacyRun } from '../lib/Setup';\nimport type { PreselectedProject, WizardOptions } from './utils/types';\nimport { runAndroidWizard } from './android/android-wizard';\nimport { runAppleWizard } from './apple/apple-wizard';\nimport { runNextjsWizard } from './nextjs/nextjs-wizard';\nimport { runRemixWizard } from './remix/remix-wizard';\nimport { runSvelteKitWizard } from './sveltekit/sveltekit-wizard';\nimport { runSourcemapsWizard } from './sourcemaps/sourcemaps-wizard';\nimport { readEnvironment } from '../lib/Helper/Env';\nimport type { Platform } from '../lib/Constants';\nimport type { PackageDotJson } from './utils/package-json';\n\ntype WizardIntegration =\n | 'reactNative'\n | 'ios'\n | 'android'\n | 'cordova'\n | 'electron'\n | 'nextjs'\n | 'remix'\n | 'sveltekit'\n | 'sourcemaps';\n\ntype Args = {\n integration?: WizardIntegration;\n\n uninstall: boolean;\n signup: boolean;\n skipConnect: boolean;\n debug: boolean;\n quiet: boolean;\n disableTelemetry: boolean;\n promoCode?: string;\n preSelectedProject?: {\n authToken: string;\n selfHosted: boolean;\n dsn: string;\n projectId: string;\n projectSlug: string;\n projectName: string;\n orgId: string;\n orgName: string;\n orgSlug: string;\n };\n url?: string;\n platform?: Platform[];\n org?: string;\n project?: string;\n saas?: boolean;\n};\n\nfunction preSelectedProjectArgsToObject(\n args: Args,\n): PreselectedProject | undefined {\n if (!args.preSelectedProject) {\n return undefined;\n }\n\n return {\n authToken: args.preSelectedProject.authToken,\n selfHosted: args.preSelectedProject.selfHosted,\n project: {\n id: args.preSelectedProject.projectId,\n keys: [\n {\n dsn: {\n public: args.preSelectedProject.dsn,\n },\n },\n ],\n organization: {\n id: args.preSelectedProject.orgId,\n name: args.preSelectedProject.orgName,\n slug: args.preSelectedProject.orgSlug,\n },\n slug: args.preSelectedProject.projectSlug,\n },\n };\n}\n\nexport async function run(argv: Args) {\n const finalArgs = {\n ...argv,\n ...readEnvironment(),\n };\n\n let integration = finalArgs.integration;\n if (!integration) {\n clack.intro(`Sentry Wizard ${tryGetWizardVersion()}`);\n\n integration = await abortIfCancelled(\n clack.select({\n message: 'What do you want to set up?',\n options: [\n { value: 'reactNative', label: 'React Native' },\n { value: 'ios', label: 'iOS' },\n { value: 'android', label: 'Android' },\n { value: 'cordova', label: 'Cordova' },\n { value: 'electron', label: 'Electron' },\n { value: 'nextjs', label: 'Next.js' },\n { value: 'remix', label: 'Remix' },\n { value: 'sveltekit', label: 'SvelteKit' },\n { value: 'sourcemaps', label: 'Configure Source Maps Upload' },\n ],\n }),\n );\n\n if (!integration) {\n clack.log.error('No integration selected. Exiting.');\n return;\n }\n\n clack.outro(`Starting ${integration} setup`);\n }\n\n const wizardOptions: WizardOptions = {\n telemetryEnabled: !finalArgs.disableTelemetry,\n promoCode: finalArgs.promoCode,\n url: finalArgs.url,\n orgSlug: finalArgs.org,\n projectSlug: finalArgs.project,\n saas: finalArgs.saas,\n preSelectedProject: preSelectedProjectArgsToObject(finalArgs),\n };\n\n switch (integration) {\n case 'reactNative':\n await runReactNativeWizard({\n ...wizardOptions,\n uninstall: finalArgs.uninstall,\n });\n break;\n\n case 'ios':\n await runAppleWizard(wizardOptions);\n break;\n\n case 'android':\n await runAndroidWizard(wizardOptions);\n break;\n\n case 'nextjs':\n await runNextjsWizard(wizardOptions);\n break;\n\n case 'remix':\n await runRemixWizard(wizardOptions);\n break;\n\n case 'sveltekit':\n await runSvelteKitWizard(wizardOptions);\n break;\n\n case 'sourcemaps':\n await runSourcemapsWizard(wizardOptions);\n break;\n\n case 'cordova':\n argv.integration = 'cordova';\n void legacyRun(argv);\n break;\n\n case 'electron':\n argv.integration = 'electron';\n void legacyRun(argv);\n break;\n\n default:\n clack.log.error('No setup wizard selected!');\n }\n}\n\n/**\n * TODO: replace with rollup replace whenever we switch to rollup\n */\nfunction tryGetWizardVersion(): string {\n try {\n const wizardPkgJson = require('../package.json') as PackageDotJson;\n return wizardPkgJson.version ?? '';\n } catch {\n return '';\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WizardOptions } from '../utils/types';
|
|
2
|
-
import { SupportedTools } from './utils/detect-tool';
|
|
1
|
+
import type { WizardOptions } from '../utils/types';
|
|
2
|
+
import type { SupportedTools } from './utils/detect-tool';
|
|
3
3
|
export declare function runSourcemapsWizard(options: WizardOptions): Promise<void>;
|
|
4
4
|
export declare function configureCI(selectedTool: SupportedTools, authToken: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourcemaps-wizard.js","sourceRoot":"","sources":["../../../src/sourcemaps/sourcemaps-wizard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAyE;AACzE,2DAAmC;AACnC,gDAA0B;AAC1B,mDAAuC;AAEvC,oDAQ8B;AAC9B,6EAA0E;AAE1E,qCAAmD;AACnD,iDAA4E;AAC5E,2CAAyD;AACzD,mCAAkE;AAClE,yCAAuD;AACvD,2CAAyD;AAEzD,6DAA+E;AAC/E,mDAAyE;AACzE,0CAAwD;AACxD,uDAAyF;AACzF,2CAA0E;AAC1E,mDAAqE;AACrE,yCAAiE;AACjE,uCAA+D;AAC/D,4DAA+D;AAC/D,oCAAiD;AAEjD,SAAsB,mBAAmB,CACvC,OAAsB;;;YAEtB,sBAAO,IAAA,yBAAa,EAClB;oBACE,OAAO,EAAE,OAAO,CAAC,gBAAgB;oBACjC,WAAW,EAAE,YAAY;oBACzB,aAAa,EAAE,OAAO;iBACvB,EACD,cAAM,OAAA,gCAAgC,CAAC,OAAO,CAAC,EAAzC,CAAyC,CAChD,EAAC;;;CACH;AAXD,kDAWC;AAED,SAAe,gCAAgC,CAC7C,OAAsB;;;;;;oBAEtB,IAAA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AC,IAAI,CACV,UAAG,KAAK,4DAAyD,CAClE,yEAEC,eAAK,CAAC,IAAI,CAAC,UAAG,KAAK,wCAAqC,CAAC,qBACzD,eAAK,CAAC,IAAI,CAAC,UAAG,KAAK,cAAI,cAAc,CAAE,CAAC,yFAExC,eAAK,CAAC,IAAI,CACV,UAAG,KAAK,4DAAyD,CAClE,UACH,CAAC,kBACA,eAAK,CAAC,GAAG,CACT,6RAIoD,CACrD,OACH,CAAC,CAAC;AACH,CAAC","sourcesContent":["// @ts-ignore - clack is ESM and TS complains about that. It works though\nimport clack from '@clack/prompts';\nimport chalk from 'chalk';\nimport * as Sentry from '@sentry/node';\n\nimport {\n abort,\n abortIfCancelled,\n confirmContinueIfNoOrDirtyGitRepo,\n SENTRY_DOT_ENV_FILE,\n printWelcome,\n SENTRY_CLI_RC_FILE,\n getOrAskForProjectData,\n} from '../utils/clack-utils';\nimport { isUnicodeSupported } from '../utils/vendor/is-unicorn-supported';\nimport { SourceMapUploadToolConfigurationOptions } from './tools/types';\nimport { configureVitePlugin } from './tools/vite';\nimport { setupNpmScriptInCI, configureSentryCLI } from './tools/sentry-cli';\nimport { configureWebPackPlugin } from './tools/webpack';\nimport { configureTscSourcemapGenerationFlow } from './tools/tsc';\nimport { configureRollupPlugin } from './tools/rollup';\nimport { configureEsbuildPlugin } from './tools/esbuild';\nimport { WizardOptions } from '../utils/types';\nimport { configureCRASourcemapGenerationFlow } from './tools/create-react-app';\nimport { ensureMinimumSdkVersionIsInstalled } from './utils/sdk-version';\nimport { traceStep, withTelemetry } from '../telemetry';\nimport { checkIfMoreSuitableWizardExistsAndAskForRedirect } from './utils/other-wizards';\nimport { configureAngularSourcemapGenerationFlow } from './tools/angular';\nimport { detectUsedTool, SupportedTools } from './utils/detect-tool';\nimport { configureNextJsSourceMapsUpload } from './tools/nextjs';\nimport { configureRemixSourceMapsUpload } from './tools/remix';\nimport { detectPackageManger } from '../utils/package-manager';\nimport { getIssueStreamUrl } from '../utils/url';\n\nexport async function runSourcemapsWizard(\n options: WizardOptions,\n): Promise<void> {\n return withTelemetry(\n {\n enabled: options.telemetryEnabled,\n integration: 'sourcemaps',\n wizardOptions: options,\n },\n () => runSourcemapsWizardWithTelemetry(options),\n );\n}\n\nasync function runSourcemapsWizardWithTelemetry(\n options: WizardOptions,\n): Promise<void> {\n printWelcome({\n wizardName: 'Sentry Source Maps Upload Configuration Wizard',\n message: `This wizard will help you upload source maps to Sentry as part of your build.\nThank you for using Sentry :)${\n options.telemetryEnabled\n ? `\n\n(This setup wizard sends telemetry data and crash reports to Sentry.\nYou can turn this off by running the wizard with the '--disable-telemetry' flag.)`\n : ''\n }`,\n promoCode: options.promoCode,\n });\n\n const moreSuitableWizard = await traceStep(\n 'check-framework-wizard',\n checkIfMoreSuitableWizardExistsAndAskForRedirect,\n );\n if (moreSuitableWizard) {\n await traceStep('run-framework-wizard', () => moreSuitableWizard(options));\n return;\n }\n\n await confirmContinueIfNoOrDirtyGitRepo();\n\n await traceStep('check-sdk-version', ensureMinimumSdkVersionIsInstalled);\n\n const { selfHosted, selectedProject, sentryUrl, authToken } =\n await getOrAskForProjectData(options);\n\n const wizardOptionsWithPreSelectedProject = {\n ...options,\n preSelectedProject: {\n project: selectedProject,\n authToken,\n selfHosted,\n },\n };\n\n const selectedTool = await traceStep('select-tool', askForUsedBundlerTool);\n\n Sentry.setTag('selected-tool', selectedTool);\n\n if (selectedTool === 'no-tool') {\n clack.log.info(\n \"No Problem! But in this case, there's nothing to configure :)\",\n );\n await abort('Exiting, have a great day!', 0);\n return;\n }\n\n await traceStep('tool-setup', () =>\n startToolSetupFlow(\n selectedTool,\n {\n orgSlug: selectedProject.organization.slug,\n projectSlug: selectedProject.slug,\n selfHosted,\n url: sentryUrl,\n authToken,\n },\n wizardOptionsWithPreSelectedProject,\n ),\n );\n\n await traceStep('ci-setup', () => configureCI(selectedTool, authToken));\n\n traceStep('outro', () =>\n printOutro(\n sentryUrl,\n selectedProject.organization.slug,\n selectedProject.id,\n ),\n );\n}\n\nasync function askForUsedBundlerTool(): Promise<SupportedTools> {\n const selectedTool = await abortIfCancelled(\n clack.select({\n message: 'Which framework, bundler or build tool are you using?',\n options: [\n {\n label: 'Angular',\n value: 'angular',\n hint: 'Select this option if you are using Angular.',\n },\n {\n label: 'Create React App',\n value: 'create-react-app',\n hint: 'Select this option if you set up your app with Create React App.',\n },\n {\n label: 'Next.js',\n value: 'nextjs',\n hint: 'Select this option if you want to set up source maps in a Next.js project.',\n },\n {\n label: 'Remix',\n value: 'remix',\n hint: 'Select this option if you want to set up source maps in a Remix project.',\n },\n {\n label: 'Webpack',\n value: 'webpack',\n hint: 'Select this if you are using Webpack and you have access to your Webpack config.',\n },\n {\n label: 'Vite',\n value: 'vite',\n hint: 'Select this if you are using Vite and you have access to your Vite config.',\n },\n {\n label: 'esbuild',\n value: 'esbuild',\n hint: 'Select this if you are using esbuild and you have access to your esbuild config.',\n },\n {\n label: 'Rollup',\n value: 'rollup',\n hint: 'Select this if you are using Rollup and you have access to your Rollup config.',\n },\n {\n label: 'tsc',\n value: 'tsc',\n hint: 'Configure source maps when using tsc as build tool',\n },\n {\n label: 'I use another tool',\n value: 'sentry-cli',\n hint: 'This will configure source maps upload for you using sentry-cli',\n },\n {\n label: \"I don't minify, transpile or bundle my code\",\n value: 'no-tool',\n hint: 'This will exit the wizard',\n },\n ],\n initialValue: await detectUsedTool(),\n }),\n );\n\n return selectedTool;\n}\n\nasync function startToolSetupFlow(\n selctedTool: SupportedTools,\n options: SourceMapUploadToolConfigurationOptions,\n wizardOptions: WizardOptions,\n): Promise<void> {\n switch (selctedTool) {\n case 'webpack':\n await configureWebPackPlugin(options);\n break;\n case 'vite':\n await configureVitePlugin(options);\n break;\n case 'esbuild':\n await configureEsbuildPlugin(options);\n break;\n case 'rollup':\n await configureRollupPlugin(options);\n break;\n case 'tsc':\n await configureSentryCLI(options, configureTscSourcemapGenerationFlow);\n break;\n case 'create-react-app':\n await configureSentryCLI(options, configureCRASourcemapGenerationFlow);\n break;\n case 'angular':\n await configureSentryCLI(\n options,\n configureAngularSourcemapGenerationFlow,\n );\n break;\n case 'nextjs':\n await configureNextJsSourceMapsUpload(options, wizardOptions);\n break;\n case 'remix':\n await configureRemixSourceMapsUpload(options, wizardOptions);\n break;\n default:\n await configureSentryCLI(options);\n break;\n }\n}\n\nexport async function configureCI(\n selectedTool: SupportedTools,\n authToken: string,\n): Promise<void> {\n const isUsingCI = await abortIfCancelled(\n clack.select({\n message: `Are you using a CI/CD tool to build and deploy your application?`,\n options: [\n {\n label: 'Yes',\n hint: 'I use a tool like GitHub Actions, GitLab, CircleCI, TravisCI, Jenkins, Vercel, ...',\n value: true,\n },\n {\n label: 'No',\n hint: 'I build and deploy my application manually',\n value: false,\n },\n ],\n initialValue: true,\n }),\n );\n\n Sentry.setTag('using-ci', isUsingCI);\n\n const isCliBasedFlowTool = [\n 'sentry-cli',\n 'tsc',\n 'angular',\n 'create-react-app',\n ].includes(selectedTool);\n\n // some non-cli-based flows also use the .sentryclirc file\n const usesSentryCliRc = selectedTool === 'nextjs';\n\n const authTokenFile =\n isCliBasedFlowTool || usesSentryCliRc\n ? SENTRY_CLI_RC_FILE\n : SENTRY_DOT_ENV_FILE;\n\n if (!isUsingCI) {\n clack.log.info(\n `No Problem! Just make sure that the Sentry auth token from ${chalk.cyan(\n authTokenFile,\n )} is available whenever you build and deploy your app.`,\n );\n return;\n }\n\n if (isCliBasedFlowTool) {\n await traceStep('ci-npm-script-setup', setupNpmScriptInCI);\n }\n\n await traceStep('ci-auth-token-setup', () => setupAuthTokenInCI(authToken));\n}\n\nasync function setupAuthTokenInCI(authToken: string) {\n clack.log.step(\n 'Add the Sentry authentication token as an environment variable to your CI setup:',\n );\n\n // Intentially logging directly to console here so that the code can be copied/pasted directly\n // eslint-disable-next-line no-console\n console.log(\n chalk.greenBright(`\nSENTRY_AUTH_TOKEN=${authToken}\n`),\n );\n\n clack.log.warn(\n chalk.yellow('DO NOT commit this auth token to your repository!'),\n );\n\n const addedEnvVarToCI = await abortIfCancelled(\n clack.select({\n message: 'Did you configure CI as shown above?',\n options: [\n { label: 'Yes, continue!', value: true },\n {\n label: \"I'll do it later...\",\n value: false,\n hint: chalk.yellow(\n 'You need to set the auth token to upload source maps in CI',\n ),\n },\n ],\n initialValue: true,\n }),\n );\n\n Sentry.setTag('added-env-var-to-ci', addedEnvVarToCI);\n\n if (!addedEnvVarToCI) {\n clack.log.info(\"Don't forget! :)\");\n }\n}\n\nfunction printOutro(url: string, orgSlug: string, projectId: string) {\n const packageManager = detectPackageManger();\n const buildCommand = packageManager?.buildCommand ?? 'npm run build';\n\n const issueStreamUrl = getIssueStreamUrl({ url, orgSlug, projectId });\n\n const arrow = isUnicodeSupported() ? '→' : '->';\n\n clack.outro(`${chalk.green(\"That's it - everything is set up!\")}\n\n ${chalk.cyan(`Test and validate your setup locally with the following Steps:\n\n 1. Build your application in ${chalk.bold('production mode')}.\n ${chalk.gray(`${arrow} For example, run ${chalk.bold(buildCommand)}.`)}\n ${chalk.gray(\n `${arrow} You should see source map upload logs in your console.`,\n )}\n 2. Run your application and throw a test error.\n ${chalk.gray(`${arrow} The error should appear in Sentry:`)}\n ${chalk.gray(`${arrow} ${issueStreamUrl}`)}\n 3. Open the error in Sentry and verify that it's source-mapped.\n ${chalk.gray(\n `${arrow} The stack trace should show your original source code.`,\n )}\n `)}\n ${chalk.dim(\n `If you encounter any issues, please refer to the Troubleshooting Guide:\n https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js\n\n If the guide doesn't help or you encounter a bug, please let us know:\n https://github.com/getsentry/sentry-javascript/issues`,\n )}\n`);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sourcemaps-wizard.js","sourceRoot":"","sources":["../../../src/sourcemaps/sourcemaps-wizard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAyE;AACzE,2DAAmC;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AAG,IAAA,qCAAmB,GAAE,CAAC;IAC7C,IAAM,YAAY,GAAG,MAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,YAAY,mCAAI,eAAe,CAAC;IAErE,IAAM,cAAc,GAAG,IAAA,uBAAiB,EAAC,EAAE,GAAG,KAAA,EAAE,OAAO,SAAA,EAAE,SAAS,WAAA,EAAE,CAAC,CAAC;IAEtE,IAAM,KAAK,GAAG,IAAA,yCAAkB,GAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IAEhD,iBAAK,CAAC,KAAK,CAAC,UAAG,eAAK,CAAC,KAAK,CAAC,mCAAmC,CAAC,oBAE5D,eAAK,CAAC,IAAI,CAAC,4GAEkB,eAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,sBACvD,eAAK,CAAC,IAAI,CAAC,UAAG,KAAK,+BAAqB,eAAK,CAAC,IAAI,CAAC,YAAY,CAAC,MAAG,CAAC,qBACpE,eAAK,CAAC,IAAI,CACV,UAAG,KAAK,4DAAyD,CAClE,yEAEC,eAAK,CAAC,IAAI,CAAC,UAAG,KAAK,wCAAqC,CAAC,qBACzD,eAAK,CAAC,IAAI,CAAC,UAAG,KAAK,cAAI,cAAc,CAAE,CAAC,yFAExC,eAAK,CAAC,IAAI,CACV,UAAG,KAAK,4DAAyD,CAClE,UACH,CAAC,kBACA,eAAK,CAAC,GAAG,CACT,6RAIoD,CACrD,OACH,CAAC,CAAC;AACH,CAAC","sourcesContent":["// @ts-ignore - clack is ESM and TS complains about that. It works though\nimport clack from '@clack/prompts';\nimport chalk from 'chalk';\nimport * as Sentry from '@sentry/node';\n\nimport {\n abort,\n abortIfCancelled,\n confirmContinueIfNoOrDirtyGitRepo,\n SENTRY_DOT_ENV_FILE,\n printWelcome,\n SENTRY_CLI_RC_FILE,\n getOrAskForProjectData,\n} from '../utils/clack-utils';\nimport { isUnicodeSupported } from '../utils/vendor/is-unicorn-supported';\nimport type { SourceMapUploadToolConfigurationOptions } from './tools/types';\nimport { configureVitePlugin } from './tools/vite';\nimport { setupNpmScriptInCI, configureSentryCLI } from './tools/sentry-cli';\nimport { configureWebPackPlugin } from './tools/webpack';\nimport { configureTscSourcemapGenerationFlow } from './tools/tsc';\nimport { configureRollupPlugin } from './tools/rollup';\nimport { configureEsbuildPlugin } from './tools/esbuild';\nimport type { WizardOptions } from '../utils/types';\nimport { configureCRASourcemapGenerationFlow } from './tools/create-react-app';\nimport { ensureMinimumSdkVersionIsInstalled } from './utils/sdk-version';\nimport { traceStep, withTelemetry } from '../telemetry';\nimport { checkIfMoreSuitableWizardExistsAndAskForRedirect } from './utils/other-wizards';\nimport { configureAngularSourcemapGenerationFlow } from './tools/angular';\nimport type { SupportedTools } from './utils/detect-tool';\nimport { detectUsedTool } from './utils/detect-tool';\nimport { configureNextJsSourceMapsUpload } from './tools/nextjs';\nimport { configureRemixSourceMapsUpload } from './tools/remix';\nimport { detectPackageManger } from '../utils/package-manager';\nimport { getIssueStreamUrl } from '../utils/url';\n\nexport async function runSourcemapsWizard(\n options: WizardOptions,\n): Promise<void> {\n return withTelemetry(\n {\n enabled: options.telemetryEnabled,\n integration: 'sourcemaps',\n wizardOptions: options,\n },\n () => runSourcemapsWizardWithTelemetry(options),\n );\n}\n\nasync function runSourcemapsWizardWithTelemetry(\n options: WizardOptions,\n): Promise<void> {\n printWelcome({\n wizardName: 'Sentry Source Maps Upload Configuration Wizard',\n message: `This wizard will help you upload source maps to Sentry as part of your build.\nThank you for using Sentry :)${\n options.telemetryEnabled\n ? `\n\n(This setup wizard sends telemetry data and crash reports to Sentry.\nYou can turn this off by running the wizard with the '--disable-telemetry' flag.)`\n : ''\n }`,\n promoCode: options.promoCode,\n });\n\n const moreSuitableWizard = await traceStep(\n 'check-framework-wizard',\n checkIfMoreSuitableWizardExistsAndAskForRedirect,\n );\n if (moreSuitableWizard) {\n await traceStep('run-framework-wizard', () => moreSuitableWizard(options));\n return;\n }\n\n await confirmContinueIfNoOrDirtyGitRepo();\n\n await traceStep('check-sdk-version', ensureMinimumSdkVersionIsInstalled);\n\n const { selfHosted, selectedProject, sentryUrl, authToken } =\n await getOrAskForProjectData(options);\n\n const wizardOptionsWithPreSelectedProject = {\n ...options,\n preSelectedProject: {\n project: selectedProject,\n authToken,\n selfHosted,\n },\n };\n\n const selectedTool = await traceStep('select-tool', askForUsedBundlerTool);\n\n Sentry.setTag('selected-tool', selectedTool);\n\n if (selectedTool === 'no-tool') {\n clack.log.info(\n \"No Problem! But in this case, there's nothing to configure :)\",\n );\n await abort('Exiting, have a great day!', 0);\n return;\n }\n\n await traceStep('tool-setup', () =>\n startToolSetupFlow(\n selectedTool,\n {\n orgSlug: selectedProject.organization.slug,\n projectSlug: selectedProject.slug,\n selfHosted,\n url: sentryUrl,\n authToken,\n },\n wizardOptionsWithPreSelectedProject,\n ),\n );\n\n await traceStep('ci-setup', () => configureCI(selectedTool, authToken));\n\n traceStep('outro', () =>\n printOutro(\n sentryUrl,\n selectedProject.organization.slug,\n selectedProject.id,\n ),\n );\n}\n\nasync function askForUsedBundlerTool(): Promise<SupportedTools> {\n const selectedTool = await abortIfCancelled(\n clack.select({\n message: 'Which framework, bundler or build tool are you using?',\n options: [\n {\n label: 'Angular',\n value: 'angular',\n hint: 'Select this option if you are using Angular.',\n },\n {\n label: 'Create React App',\n value: 'create-react-app',\n hint: 'Select this option if you set up your app with Create React App.',\n },\n {\n label: 'Next.js',\n value: 'nextjs',\n hint: 'Select this option if you want to set up source maps in a Next.js project.',\n },\n {\n label: 'Remix',\n value: 'remix',\n hint: 'Select this option if you want to set up source maps in a Remix project.',\n },\n {\n label: 'Webpack',\n value: 'webpack',\n hint: 'Select this if you are using Webpack and you have access to your Webpack config.',\n },\n {\n label: 'Vite',\n value: 'vite',\n hint: 'Select this if you are using Vite and you have access to your Vite config.',\n },\n {\n label: 'esbuild',\n value: 'esbuild',\n hint: 'Select this if you are using esbuild and you have access to your esbuild config.',\n },\n {\n label: 'Rollup',\n value: 'rollup',\n hint: 'Select this if you are using Rollup and you have access to your Rollup config.',\n },\n {\n label: 'tsc',\n value: 'tsc',\n hint: 'Configure source maps when using tsc as build tool',\n },\n {\n label: 'I use another tool',\n value: 'sentry-cli',\n hint: 'This will configure source maps upload for you using sentry-cli',\n },\n {\n label: \"I don't minify, transpile or bundle my code\",\n value: 'no-tool',\n hint: 'This will exit the wizard',\n },\n ],\n initialValue: await detectUsedTool(),\n }),\n );\n\n return selectedTool;\n}\n\nasync function startToolSetupFlow(\n selctedTool: SupportedTools,\n options: SourceMapUploadToolConfigurationOptions,\n wizardOptions: WizardOptions,\n): Promise<void> {\n switch (selctedTool) {\n case 'webpack':\n await configureWebPackPlugin(options);\n break;\n case 'vite':\n await configureVitePlugin(options);\n break;\n case 'esbuild':\n await configureEsbuildPlugin(options);\n break;\n case 'rollup':\n await configureRollupPlugin(options);\n break;\n case 'tsc':\n await configureSentryCLI(options, configureTscSourcemapGenerationFlow);\n break;\n case 'create-react-app':\n await configureSentryCLI(options, configureCRASourcemapGenerationFlow);\n break;\n case 'angular':\n await configureSentryCLI(\n options,\n configureAngularSourcemapGenerationFlow,\n );\n break;\n case 'nextjs':\n await configureNextJsSourceMapsUpload(options, wizardOptions);\n break;\n case 'remix':\n await configureRemixSourceMapsUpload(options, wizardOptions);\n break;\n default:\n await configureSentryCLI(options);\n break;\n }\n}\n\nexport async function configureCI(\n selectedTool: SupportedTools,\n authToken: string,\n): Promise<void> {\n const isUsingCI = await abortIfCancelled(\n clack.select({\n message: `Are you using a CI/CD tool to build and deploy your application?`,\n options: [\n {\n label: 'Yes',\n hint: 'I use a tool like GitHub Actions, GitLab, CircleCI, TravisCI, Jenkins, Vercel, ...',\n value: true,\n },\n {\n label: 'No',\n hint: 'I build and deploy my application manually',\n value: false,\n },\n ],\n initialValue: true,\n }),\n );\n\n Sentry.setTag('using-ci', isUsingCI);\n\n const isCliBasedFlowTool = [\n 'sentry-cli',\n 'tsc',\n 'angular',\n 'create-react-app',\n ].includes(selectedTool);\n\n // some non-cli-based flows also use the .sentryclirc file\n const usesSentryCliRc = selectedTool === 'nextjs';\n\n const authTokenFile =\n isCliBasedFlowTool || usesSentryCliRc\n ? SENTRY_CLI_RC_FILE\n : SENTRY_DOT_ENV_FILE;\n\n if (!isUsingCI) {\n clack.log.info(\n `No Problem! Just make sure that the Sentry auth token from ${chalk.cyan(\n authTokenFile,\n )} is available whenever you build and deploy your app.`,\n );\n return;\n }\n\n if (isCliBasedFlowTool) {\n await traceStep('ci-npm-script-setup', setupNpmScriptInCI);\n }\n\n await traceStep('ci-auth-token-setup', () => setupAuthTokenInCI(authToken));\n}\n\nasync function setupAuthTokenInCI(authToken: string) {\n clack.log.step(\n 'Add the Sentry authentication token as an environment variable to your CI setup:',\n );\n\n // Intentially logging directly to console here so that the code can be copied/pasted directly\n // eslint-disable-next-line no-console\n console.log(\n chalk.greenBright(`\nSENTRY_AUTH_TOKEN=${authToken}\n`),\n );\n\n clack.log.warn(\n chalk.yellow('DO NOT commit this auth token to your repository!'),\n );\n\n const addedEnvVarToCI = await abortIfCancelled(\n clack.select({\n message: 'Did you configure CI as shown above?',\n options: [\n { label: 'Yes, continue!', value: true },\n {\n label: \"I'll do it later...\",\n value: false,\n hint: chalk.yellow(\n 'You need to set the auth token to upload source maps in CI',\n ),\n },\n ],\n initialValue: true,\n }),\n );\n\n Sentry.setTag('added-env-var-to-ci', addedEnvVarToCI);\n\n if (!addedEnvVarToCI) {\n clack.log.info(\"Don't forget! :)\");\n }\n}\n\nfunction printOutro(url: string, orgSlug: string, projectId: string) {\n const packageManager = detectPackageManger();\n const buildCommand = packageManager?.buildCommand ?? 'npm run build';\n\n const issueStreamUrl = getIssueStreamUrl({ url, orgSlug, projectId });\n\n const arrow = isUnicodeSupported() ? '→' : '->';\n\n clack.outro(`${chalk.green(\"That's it - everything is set up!\")}\n\n ${chalk.cyan(`Test and validate your setup locally with the following Steps:\n\n 1. Build your application in ${chalk.bold('production mode')}.\n ${chalk.gray(`${arrow} For example, run ${chalk.bold(buildCommand)}.`)}\n ${chalk.gray(\n `${arrow} You should see source map upload logs in your console.`,\n )}\n 2. Run your application and throw a test error.\n ${chalk.gray(`${arrow} The error should appear in Sentry:`)}\n ${chalk.gray(`${arrow} ${issueStreamUrl}`)}\n 3. Open the error in Sentry and verify that it's source-mapped.\n ${chalk.gray(\n `${arrow} The stack trace should show your original source code.`,\n )}\n `)}\n ${chalk.dim(\n `If you encounter any issues, please refer to the Troubleshooting Guide:\n https://docs.sentry.io/platforms/javascript/sourcemaps/troubleshooting_js\n\n If the guide doesn't help or you encounter a bug, please let us know:\n https://github.com/getsentry/sentry-javascript/issues`,\n )}\n`);\n}\n"]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { WizardOptions } from '../../utils/types';
|
|
2
|
-
import { SourceMapUploadToolConfigurationOptions } from './types';
|
|
1
|
+
import type { WizardOptions } from '../../utils/types';
|
|
2
|
+
import type { SourceMapUploadToolConfigurationOptions } from './types';
|
|
3
3
|
export declare const configureRemixSourceMapsUpload: (options: SourceMapUploadToolConfigurationOptions, wizardOptions: WizardOptions) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remix.js","sourceRoot":"","sources":["../../../../src/sourcemaps/tools/remix.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAyE;AACzE,oDAAwC;AACxC,gDAA0B;AAC1B,yDAA0D;AAC1D,6CAA4C;AAC5C,uDAA2D;AAI3D,mDAAuC;AAEhC,IAAM,8BAA8B,GAAG,UAC5C,OAAgD,EAChD,aAA4B;;;;;gBAE5B,KAAK,CAAC,GAAG;qBACN,IAAI,CAAC,iQAEyE,eAAK,CAAC,IAAI,CACzF,iBAAiB,CAClB,4BAAyB,CAAC,CAAC;gBAEI,qBAAM,IAAA,8BAAgB,EACpD,KAAK,CAAC,MAAM,CAAC;wBACX,OAAO,EAAE,q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E,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;wBACnD,YAAY,EAAE,IAAI;qBACnB,CAAC,CACH,EAAA;;gBAND,SAMC,CAAC;;;;;KAEL,CAAC;AAtEW,QAAA,8BAA8B,kCAsEzC;AAEF,IAAM,WAAW,GAAG,eAAK,CAAC,IAAI,CAAC,8BAE3B,eAAK,CAAC,WAAW,CACjB,gEAAgE,CACjE,WAEF,CAAC,CAAC","sourcesContent":["// @ts-ignore - clack is ESM and TS complains about that. It works though\nimport * as clack from '@clack/prompts';\nimport chalk from 'chalk';\nimport { runRemixWizard } from '../../remix/remix-wizard';\nimport { traceStep } from '../../telemetry';\nimport { abortIfCancelled } from '../../utils/clack-utils';\nimport { WizardOptions } from '../../utils/types';\nimport { SourceMapUploadToolConfigurationOptions } from './types';\n\nimport * as Sentry from '@sentry/node';\n\nexport const configureRemixSourceMapsUpload = async (\n options: SourceMapUploadToolConfigurationOptions,\n wizardOptions: WizardOptions,\n) => {\n clack.log\n .info(`Source Maps upload for Remix is configured automatically by default if you run the Sentry Wizard for Remix.\nBut don't worry, we can redirect you to the wizard now!\nIn case you already tried the wizard, we can also show you how to configure your ${chalk.cyan(\n 'remix.config.js',\n )} file manually instead.`);\n\n const shouldRedirect: boolean = await abortIfCancelled(\n clack.select({\n message: 'Do you want to run the Sentry Wizard for Remix now?',\n options: [\n {\n label: 'Yes, run the wizard!',\n value: true,\n hint: 'The wizard can also configure your SDK setup',\n },\n {\n label: 'No, show me how to configure it manually',\n value: false,\n },\n ],\n }),\n );\n\n Sentry.setTag('redirect-remix-wizard', shouldRedirect);\n\n if (shouldRedirect) {\n await traceStep('run-remix-wizard', () => runRemixWizard(wizardOptions));\n clack.intro('Sentry Source Maps Upload Configuration Wizard');\n clack.log.info(\n \"Welcome back to the Source Maps wizard - we're almost done ;)\",\n );\n } else {\n clack.log.step(\n `Build your app with ${chalk.cyan(\n 'remix build --sourcemap',\n )}, then upload your source maps using ${chalk.cyan(\n 'sentry-upload-sourcemaps',\n )} cli tool.`,\n );\n\n clack.log.step(\n `You can add ${chalk.cyan(\n 'sentry-upload-sourcemaps',\n )} to your build script in ${chalk.cyan('package.json')} like this:`,\n );\n\n // Intentially logging directly to console here so that the code can be copied/pasted directly\n // eslint-disable-next-line no-console\n console.log(codeSnippet);\n\n clack.log.step(`or run it manually after building your app.\n\nTo see all available options for ${chalk.cyan(\n 'sentry-upload-sourcemaps',\n )}, run ${chalk.cyan('sentry-upload-sourcemaps --help')}\n`);\n\n await abortIfCancelled(\n clack.select({\n message: 'Did you finish configuring your build and prod scripts?',\n options: [{ label: 'Yes, continue!', value: true }],\n initialValue: true,\n }),\n );\n }\n};\n\nconst codeSnippet = chalk.gray(`\n\"scripts\": {\n ${chalk.greenBright(\n '\"build\": \"remix build --sourcemap && sentry-upload-sourcemaps\"',\n )};\n}\n`);\n"]}
|
|
1
|
+
{"version":3,"file":"remix.js","sourceRoot":"","sources":["../../../../src/sourcemaps/tools/remix.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yEAAyE;AACzE,oDAAwC;AACxC,gDAA0B;AAC1B,yDAA0D;AAC1D,6CAA4C;AAC5C,uDAA2D;AAI3D,mDAAuC;AAEhC,IAAM,8BAA8B,GAAG,UAC5C,OAAgD,EAChD,aAA4B;;;;;gBAE5B,KAAK,CAAC,GAAG;qBACN,IAAI,CAAC,iQAEyE,eAAK,CAAC,IAAI,CACzF,iBAAiB,CAClB,4BAAyB,CAAC,CAAC;gBAEI,qBAAM,IAAA,8BAAgB,EACpD,KAAK,CAAC,MAAM,CAAC;wBACX,OAAO,EAAE,qDAAqD;wBAC9D,OAAO,EAAE;4BACP;gCACE,KAAK,EAAE,sBAAsB;gCAC7B,KAAK,EAAE,IAAI;gCACX,IAAI,EAAE,8CAA8C;6BACrD;4BACD;gCACE,KAAK,EAA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MC,CAAC;;;;;KAEL,CAAC;AAtEW,QAAA,8BAA8B,kCAsEzC;AAEF,IAAM,WAAW,GAAG,eAAK,CAAC,IAAI,CAAC,8BAE3B,eAAK,CAAC,WAAW,CACjB,gEAAgE,CACjE,WAEF,CAAC,CAAC","sourcesContent":["// @ts-ignore - clack is ESM and TS complains about that. It works though\nimport * as clack from '@clack/prompts';\nimport chalk from 'chalk';\nimport { runRemixWizard } from '../../remix/remix-wizard';\nimport { traceStep } from '../../telemetry';\nimport { abortIfCancelled } from '../../utils/clack-utils';\nimport type { WizardOptions } from '../../utils/types';\nimport type { SourceMapUploadToolConfigurationOptions } from './types';\n\nimport * as Sentry from '@sentry/node';\n\nexport const configureRemixSourceMapsUpload = async (\n options: SourceMapUploadToolConfigurationOptions,\n wizardOptions: WizardOptions,\n) => {\n clack.log\n .info(`Source Maps upload for Remix is configured automatically by default if you run the Sentry Wizard for Remix.\nBut don't worry, we can redirect you to the wizard now!\nIn case you already tried the wizard, we can also show you how to configure your ${chalk.cyan(\n 'remix.config.js',\n )} file manually instead.`);\n\n const shouldRedirect: boolean = await abortIfCancelled(\n clack.select({\n message: 'Do you want to run the Sentry Wizard for Remix now?',\n options: [\n {\n label: 'Yes, run the wizard!',\n value: true,\n hint: 'The wizard can also configure your SDK setup',\n },\n {\n label: 'No, show me how to configure it manually',\n value: false,\n },\n ],\n }),\n );\n\n Sentry.setTag('redirect-remix-wizard', shouldRedirect);\n\n if (shouldRedirect) {\n await traceStep('run-remix-wizard', () => runRemixWizard(wizardOptions));\n clack.intro('Sentry Source Maps Upload Configuration Wizard');\n clack.log.info(\n \"Welcome back to the Source Maps wizard - we're almost done ;)\",\n );\n } else {\n clack.log.step(\n `Build your app with ${chalk.cyan(\n 'remix build --sourcemap',\n )}, then upload your source maps using ${chalk.cyan(\n 'sentry-upload-sourcemaps',\n )} cli tool.`,\n );\n\n clack.log.step(\n `You can add ${chalk.cyan(\n 'sentry-upload-sourcemaps',\n )} to your build script in ${chalk.cyan('package.json')} like this:`,\n );\n\n // Intentially logging directly to console here so that the code can be copied/pasted directly\n // eslint-disable-next-line no-console\n console.log(codeSnippet);\n\n clack.log.step(`or run it manually after building your app.\n\nTo see all available options for ${chalk.cyan(\n 'sentry-upload-sourcemaps',\n )}, run ${chalk.cyan('sentry-upload-sourcemaps --help')}\n`);\n\n await abortIfCancelled(\n clack.select({\n message: 'Did you finish configuring your build and prod scripts?',\n options: [{ label: 'Yes, continue!', value: true }],\n initialValue: true,\n }),\n );\n }\n};\n\nconst codeSnippet = chalk.gray(`\n\"scripts\": {\n ${chalk.greenBright(\n '\"build\": \"remix build --sourcemap && sentry-upload-sourcemaps\"',\n )};\n}\n`);\n"]}
|
|
@@ -600,32 +600,37 @@ function runPrettierIfInstalled() {
|
|
|
600
600
|
var _this = this;
|
|
601
601
|
return __generator(this, function (_a) {
|
|
602
602
|
return [2 /*return*/, (0, telemetry_1.traceStep)('run-prettier', function () { return __awaiter(_this, void 0, void 0, function () {
|
|
603
|
-
var packageJson, prettierInstalled, shouldRunPrettier, prettierSpinner,
|
|
604
|
-
return __generator(this, function (
|
|
605
|
-
switch (
|
|
603
|
+
var packageJson, prettierInstalled, shouldRunPrettier, changedOrUntrackedFiles, prettierSpinner, e_2;
|
|
604
|
+
return __generator(this, function (_a) {
|
|
605
|
+
switch (_a.label) {
|
|
606
606
|
case 0: return [4 /*yield*/, getPackageDotJson()];
|
|
607
607
|
case 1:
|
|
608
|
-
packageJson =
|
|
608
|
+
packageJson = _a.sent();
|
|
609
609
|
prettierInstalled = (0, package_json_1.hasPackageInstalled)('prettier', packageJson);
|
|
610
610
|
if (!prettierInstalled) return [3 /*break*/, 3];
|
|
611
611
|
return [4 /*yield*/, abortIfCancelled(clack.confirm({
|
|
612
612
|
message: 'Looks like you have Prettier in your project. Do you want to run it on your files?',
|
|
613
613
|
}))];
|
|
614
614
|
case 2:
|
|
615
|
-
shouldRunPrettier =
|
|
615
|
+
shouldRunPrettier = _a.sent();
|
|
616
616
|
if (!shouldRunPrettier) {
|
|
617
617
|
return [2 /*return*/];
|
|
618
618
|
}
|
|
619
619
|
return [3 /*break*/, 4];
|
|
620
620
|
case 3: return [2 /*return*/];
|
|
621
621
|
case 4:
|
|
622
|
+
changedOrUntrackedFiles = getUncommittedOrUntrackedFiles()
|
|
623
|
+
.map(function (filename) {
|
|
624
|
+
return filename.startsWith('- ') ? filename.slice(2) : filename;
|
|
625
|
+
})
|
|
626
|
+
.join(' ');
|
|
622
627
|
prettierSpinner = clack.spinner();
|
|
623
628
|
prettierSpinner.start('Running Prettier on your files.');
|
|
624
|
-
|
|
629
|
+
_a.label = 5;
|
|
625
630
|
case 5:
|
|
626
|
-
|
|
631
|
+
_a.trys.push([5, 7, , 8]);
|
|
627
632
|
return [4 /*yield*/, new Promise(function (resolve, reject) {
|
|
628
|
-
childProcess.exec(
|
|
633
|
+
childProcess.exec("npx prettier --ignore-unknown --write ".concat(changedOrUntrackedFiles), function (err) {
|
|
629
634
|
if (err) {
|
|
630
635
|
reject(err);
|
|
631
636
|
}
|
|
@@ -635,10 +640,10 @@ function runPrettierIfInstalled() {
|
|
|
635
640
|
});
|
|
636
641
|
})];
|
|
637
642
|
case 6:
|
|
638
|
-
|
|
643
|
+
_a.sent();
|
|
639
644
|
return [3 /*break*/, 8];
|
|
640
645
|
case 7:
|
|
641
|
-
|
|
646
|
+
e_2 = _a.sent();
|
|
642
647
|
prettierSpinner.stop('Prettier failed to run.');
|
|
643
648
|
clack.log.error('Prettier failed to run. There may be formatting issues in your updated files.');
|
|
644
649
|
return [2 /*return*/];
|
|
@@ -909,7 +914,7 @@ function askForSelfHosted(urlFromArgs, saas) {
|
|
|
909
914
|
}
|
|
910
915
|
function askForWizardLogin(options) {
|
|
911
916
|
return __awaiter(this, void 0, void 0, function () {
|
|
912
|
-
var hasSentryAccount, wizardHash,
|
|
917
|
+
var hasSentryAccount, wizardHash, e_3, loginUrl, urlToOpen, loginSpinner, data;
|
|
913
918
|
return __generator(this, function (_a) {
|
|
914
919
|
switch (_a.label) {
|
|
915
920
|
case 0:
|
|
@@ -931,17 +936,17 @@ function askForWizardLogin(options) {
|
|
|
931
936
|
wizardHash = (_a.sent()).data.hash;
|
|
932
937
|
return [3 /*break*/, 10];
|
|
933
938
|
case 5:
|
|
934
|
-
|
|
939
|
+
e_3 = _a.sent();
|
|
935
940
|
if (!(options.url !== SAAS_URL)) return [3 /*break*/, 7];
|
|
936
941
|
clack.log.error('Loading Wizard failed. Did you provide the right URL?');
|
|
937
|
-
clack.log.info(JSON.stringify(
|
|
942
|
+
clack.log.info(JSON.stringify(e_3, null, 2));
|
|
938
943
|
return [4 /*yield*/, abort(chalk_1.default.red('Please check your configuration and try again.\n\n Let us know if you think this is an issue with the wizard or Sentry: https://github.com/getsentry/sentry-wizard/issues'))];
|
|
939
944
|
case 6:
|
|
940
945
|
_a.sent();
|
|
941
946
|
return [3 /*break*/, 9];
|
|
942
947
|
case 7:
|
|
943
948
|
clack.log.error('Loading Wizard failed.');
|
|
944
|
-
clack.log.info(JSON.stringify(
|
|
949
|
+
clack.log.info(JSON.stringify(e_3, null, 2));
|
|
945
950
|
return [4 /*yield*/, abort(chalk_1.default.red('Please try again in a few minutes and let us know if this issue persists: https://github.com/getsentry/sentry-wizard/issues'))];
|
|
946
951
|
case 8:
|
|
947
952
|
_a.sent();
|
|
@@ -1194,7 +1199,7 @@ exports.makeCodeSnippet = makeCodeSnippet;
|
|
|
1194
1199
|
*/
|
|
1195
1200
|
function createNewConfigFile(filepath, codeSnippet, moreInformation) {
|
|
1196
1201
|
return __awaiter(this, void 0, void 0, function () {
|
|
1197
|
-
var prettyFilename,
|
|
1202
|
+
var prettyFilename, e_4;
|
|
1198
1203
|
return __generator(this, function (_a) {
|
|
1199
1204
|
switch (_a.label) {
|
|
1200
1205
|
case 0:
|
|
@@ -1215,8 +1220,8 @@ function createNewConfigFile(filepath, codeSnippet, moreInformation) {
|
|
|
1215
1220
|
}
|
|
1216
1221
|
return [2 /*return*/, true];
|
|
1217
1222
|
case 3:
|
|
1218
|
-
|
|
1219
|
-
(0, debug_1.debug)(
|
|
1223
|
+
e_4 = _a.sent();
|
|
1224
|
+
(0, debug_1.debug)(e_4);
|
|
1220
1225
|
clack.log.warn("Could not create a new ".concat(prettyFilename, " file. Please create one manually and follow the instructions below."));
|
|
1221
1226
|
return [3 /*break*/, 4];
|
|
1222
1227
|
case 4: return [2 /*return*/, false];
|