@sentry/wizard 3.4.0 → 3.5.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 +12 -0
- package/bin.ts +29 -19
- package/dist/bin.js +23 -18
- package/dist/bin.js.map +1 -1
- package/dist/lib/Helper/Wizard.js +0 -9
- package/dist/lib/Helper/Wizard.js.map +1 -1
- package/dist/lib/Setup.js.map +1 -1
- package/dist/lib/Steps/ChooseIntegration.js +26 -10
- package/dist/lib/Steps/ChooseIntegration.js.map +1 -1
- package/dist/lib/Steps/Integrations/{NextJs.d.ts → NextJsShim.d.ts} +1 -1
- package/dist/lib/Steps/Integrations/{NextJs.js → NextJsShim.js} +13 -10
- package/dist/lib/Steps/Integrations/NextJsShim.js.map +1 -0
- package/dist/lib/Steps/Integrations/SourceMapsShim.js +4 -1
- package/dist/lib/Steps/Integrations/SourceMapsShim.js.map +1 -1
- package/dist/lib/Steps/Integrations/{SvelteKit.d.ts → SvelteKitShim.d.ts} +1 -1
- package/dist/lib/Steps/Integrations/{SvelteKit.js → SvelteKitShim.js} +13 -10
- package/dist/lib/Steps/Integrations/SvelteKitShim.js.map +1 -0
- package/dist/package.json +3 -3
- package/dist/src/nextjs/nextjs-wizard.d.ts +2 -5
- package/dist/src/nextjs/nextjs-wizard.js +1 -1
- package/dist/src/nextjs/nextjs-wizard.js.map +1 -1
- package/dist/src/sourcemaps/sourcemaps-wizard.d.ts +2 -5
- package/dist/src/sourcemaps/sourcemaps-wizard.js +34 -19
- package/dist/src/sourcemaps/sourcemaps-wizard.js.map +1 -1
- package/dist/src/sourcemaps/tools/create-react-app.d.ts +1 -0
- package/dist/src/sourcemaps/tools/create-react-app.js +69 -0
- package/dist/src/sourcemaps/tools/create-react-app.js.map +1 -0
- package/dist/src/sourcemaps/tools/sentry-cli.js +5 -0
- package/dist/src/sourcemaps/tools/sentry-cli.js.map +1 -1
- package/dist/src/sourcemaps/utils/sdk-version.d.ts +14 -0
- package/dist/src/sourcemaps/utils/sdk-version.js +275 -0
- package/dist/src/sourcemaps/utils/sdk-version.js.map +1 -0
- package/dist/src/sveltekit/sveltekit-wizard.d.ts +2 -5
- package/dist/src/sveltekit/sveltekit-wizard.js +1 -1
- package/dist/src/sveltekit/sveltekit-wizard.js.map +1 -1
- package/dist/src/utils/clack-utils.d.ts +13 -2
- package/dist/src/utils/clack-utils.js +76 -43
- package/dist/src/utils/clack-utils.js.map +1 -1
- package/dist/src/utils/types.d.ts +12 -0
- package/dist/src/utils/types.js +3 -0
- package/dist/src/utils/types.js.map +1 -0
- package/lib/Helper/Wizard.ts +0 -9
- package/lib/Setup.ts +1 -0
- package/lib/Steps/ChooseIntegration.ts +35 -11
- package/lib/Steps/Integrations/{NextJs.ts → NextJsShim.ts} +5 -2
- package/lib/Steps/Integrations/SourceMapsShim.ts +4 -1
- package/lib/Steps/Integrations/{SvelteKit.ts → SvelteKitShim.ts} +5 -2
- package/package.json +3 -3
- package/src/nextjs/nextjs-wizard.ts +3 -8
- package/src/sourcemaps/sourcemaps-wizard.ts +21 -11
- package/src/sourcemaps/tools/create-react-app.ts +19 -0
- package/src/sourcemaps/tools/sentry-cli.ts +5 -0
- package/src/sourcemaps/utils/sdk-version.ts +264 -0
- package/src/sveltekit/sveltekit-wizard.ts +3 -6
- package/src/utils/clack-utils.ts +69 -27
- package/src/utils/types.ts +13 -0
- package/dist/lib/Steps/Integrations/NextJs.js.map +0 -1
- package/dist/lib/Steps/Integrations/SvelteKit.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.5.0
|
|
4
|
+
|
|
5
|
+
- feat(sourcemaps): Check if correct SDK version is installed (#336)
|
|
6
|
+
- feat: Open browser when logging in (sourcemaps, sveltekit, nextjs) (#328)
|
|
7
|
+
- feat(sourcmaps): Add create-react-app option (#335)
|
|
8
|
+
- fix: Support `--url` arg in NextJs, SvelteKit and Sourcemaps wizards (#331)
|
|
9
|
+
- fix: Update minimum Node version to Node 14 (#332)
|
|
10
|
+
|
|
3
11
|
## 3.4.0
|
|
4
12
|
|
|
5
13
|
- feat(sourcemaps): Add setup flow for esbuild (#327)
|
|
@@ -67,6 +75,10 @@ fix(sveltekit): Bump magicast to handle satisfies keyword (#279)
|
|
|
67
75
|
|
|
68
76
|
## 3.0.0
|
|
69
77
|
|
|
78
|
+
### Node Version Compatibility
|
|
79
|
+
|
|
80
|
+
- The minimum Node version for the wizard is now Node 14.
|
|
81
|
+
|
|
70
82
|
### Various fixes & improvements
|
|
71
83
|
|
|
72
84
|
- build: Update a bunch of dev dependencies (#248) by @lforst
|
package/bin.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { Integration, Platform } from './lib/Constants';
|
|
3
3
|
import { run } from './lib/Setup';
|
|
4
4
|
import { runNextjsWizard } from './src/nextjs/nextjs-wizard';
|
|
5
5
|
import { runSourcemapsWizard } from './src/sourcemaps/sourcemaps-wizard';
|
|
6
6
|
import { runSvelteKitWizard } from './src/sveltekit/sveltekit-wizard';
|
|
7
7
|
import { withTelemetry } from './src/telemetry';
|
|
8
|
+
import { WizardOptions } from './src/utils/types';
|
|
8
9
|
export * from './lib/Setup';
|
|
9
10
|
|
|
10
11
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
|
@@ -44,7 +45,6 @@ const argv = require('yargs')
|
|
|
44
45
|
})
|
|
45
46
|
.option('u', {
|
|
46
47
|
alias: 'url',
|
|
47
|
-
default: DEFAULT_URL,
|
|
48
48
|
describe: 'The url to your Sentry installation\nenv: SENTRY_WIZARD_URL',
|
|
49
49
|
})
|
|
50
50
|
.option('s', {
|
|
@@ -63,22 +63,32 @@ const argv = require('yargs')
|
|
|
63
63
|
describe: 'A promo code that will be applied during signup',
|
|
64
64
|
}).argv;
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
66
|
+
// Collect argv options that are relevant for the new wizard
|
|
67
|
+
// flows based on `clack`
|
|
68
|
+
const wizardOptions: WizardOptions = {
|
|
69
|
+
url: argv.url as string | undefined,
|
|
70
|
+
promoCode: argv['promo-code'] as string | undefined,
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
switch (argv.i) {
|
|
74
|
+
case 'nextjs':
|
|
75
|
+
// eslint-disable-next-line no-console
|
|
76
|
+
runNextjsWizard(wizardOptions).catch(console.error);
|
|
77
|
+
break;
|
|
78
|
+
case 'sveltekit':
|
|
79
79
|
// eslint-disable-next-line no-console
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
runSvelteKitWizard(wizardOptions).catch(console.error);
|
|
81
|
+
break;
|
|
82
|
+
case 'sourcemaps':
|
|
83
|
+
withTelemetry(
|
|
84
|
+
{
|
|
85
|
+
enabled: !argv['disable-telemetry'],
|
|
86
|
+
integration: 'sourcemaps',
|
|
87
|
+
},
|
|
88
|
+
() => runSourcemapsWizard(wizardOptions),
|
|
89
|
+
// eslint-disable-next-line no-console
|
|
90
|
+
).catch(console.error);
|
|
91
|
+
break;
|
|
92
|
+
default:
|
|
93
|
+
void run(argv);
|
|
84
94
|
}
|
package/dist/bin.js
CHANGED
|
@@ -57,7 +57,6 @@ var argv = require('yargs')
|
|
|
57
57
|
})
|
|
58
58
|
.option('u', {
|
|
59
59
|
alias: 'url',
|
|
60
|
-
default: Constants_1.DEFAULT_URL,
|
|
61
60
|
describe: 'The url to your Sentry installation\nenv: SENTRY_WIZARD_URL',
|
|
62
61
|
})
|
|
63
62
|
.option('s', {
|
|
@@ -75,22 +74,28 @@ var argv = require('yargs')
|
|
|
75
74
|
alias: 'promo-code',
|
|
76
75
|
describe: 'A promo code that will be applied during signup',
|
|
77
76
|
}).argv;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
77
|
+
// Collect argv options that are relevant for the new wizard
|
|
78
|
+
// flows based on `clack`
|
|
79
|
+
var wizardOptions = {
|
|
80
|
+
url: argv.url,
|
|
81
|
+
promoCode: argv['promo-code'],
|
|
82
|
+
};
|
|
83
|
+
switch (argv.i) {
|
|
84
|
+
case 'nextjs':
|
|
85
|
+
// eslint-disable-next-line no-console
|
|
86
|
+
(0, nextjs_wizard_1.runNextjsWizard)(wizardOptions).catch(console.error);
|
|
87
|
+
break;
|
|
88
|
+
case 'sveltekit':
|
|
89
|
+
// eslint-disable-next-line no-console
|
|
90
|
+
(0, sveltekit_wizard_1.runSvelteKitWizard)(wizardOptions).catch(console.error);
|
|
91
|
+
break;
|
|
92
|
+
case 'sourcemaps':
|
|
93
|
+
(0, telemetry_1.withTelemetry)({
|
|
94
|
+
enabled: !argv['disable-telemetry'],
|
|
95
|
+
integration: 'sourcemaps',
|
|
96
|
+
}, function () { return (0, sourcemaps_wizard_1.runSourcemapsWizard)(wizardOptions); }).catch(console.error);
|
|
97
|
+
break;
|
|
98
|
+
default:
|
|
99
|
+
void (0, Setup_1.run)(argv);
|
|
95
100
|
}
|
|
96
101
|
//# sourceMappingURL=bin.js.map
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":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IAC3B,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE,qCAAqC;IAC/C,IAAI,EAAE,SAAS;CAChB,CAAC;KACD,MAAM,CAAC,YAAY,EAAE;IACpB,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,iDAAiD;CAC5D,CAAC,CAAC,IAAI,CAAC;AAEV,4DAA4D;AAC5D,yBAAyB;AACzB,IAAM,aAAa,GAAkB;IACnC,GAAG,EAAE,IAAI,CAAC,GAAyB;IACnC,SAAS,EAAE,IAAI,CAAC,YAAY,CAAuB;CACpD,CAAC;AAEF,QAAQ,IAAI,CAAC,CAAC,EAAE;IACd,KAAK,QAAQ;QACX,sCAAsC;QACtC,IAAA,+BAAe,EAAC,aAAa,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACpD,MAAM;IACR,KAAK,WAAW;QACd,sCAAsC;QACtC,IAAA,qCAAkB,EAAC,aAAa,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACvD,MAAM;IACR,KAAK,YAAY;QACf,IAAA,yBAAa,EACX;YACE,OAAO,EAAE,CAAC,IAAI,CAAC,mBAAmB,CAAC;YACnC,WAAW,EAAE,YAAY;SAC1B,EACD,cAAM,OAAA,IAAA,uCAAmB,EAAC,aAAa,CAAC,EAAlC,CAAkC,CAEzC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QACvB,MAAM;IACR;QACE,KAAK,IAAA,WAAG,EAAC,IAAI,CAAC,CAAC;CAClB","sourcesContent":["#!/usr/bin/env node\nimport { Integration, Platform } from './lib/Constants';\nimport { run } from './lib/Setup';\nimport { runNextjsWizard } from './src/nextjs/nextjs-wizard';\nimport { runSourcemapsWizard } from './src/sourcemaps/sourcemaps-wizard';\nimport { runSvelteKitWizard } from './src/sveltekit/sveltekit-wizard';\nimport { withTelemetry } from './src/telemetry';\nimport { WizardOptions } from './src/utils/types';\nexport * from './lib/Setup';\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\nconst argv = require('yargs')\n .option('debug', {\n default: false,\n describe: 'Enable verbose logging\\nenv: SENTRY_WIZARD_DEBUG',\n type: 'boolean',\n })\n .option('uninstall', {\n default: false,\n describe: 'Revert project setup process\\nenv: SENTRY_WIZARD_UNINSTALL',\n type: 'boolean',\n })\n .option('skip-connect', {\n default: false,\n describe:\n 'Skips the connection to the server\\nenv: SENTRY_WIZARD_SKIP_CONNECT',\n type: 'boolean',\n })\n .option('quiet', {\n default: false,\n describe:\n 'Do not fallback to prompting user asking questions\\nenv: SENTRY_WIZARD_QUIET',\n type: 'boolean',\n })\n .option('i', {\n alias: 'integration',\n choices: Object.keys(Integration),\n describe: 'Choose the integration to setup\\nenv: SENTRY_WIZARD_INTEGRATION',\n })\n .option('p', {\n alias: 'platform',\n choices: Object.keys(Platform),\n describe: 'Choose platform(s)\\nenv: SENTRY_WIZARD_PLATFORM',\n type: 'array',\n })\n .option('u', {\n alias: 'url',\n describe: 'The url to your Sentry installation\\nenv: SENTRY_WIZARD_URL',\n })\n .option('s', {\n alias: 'signup',\n default: false,\n describe: 'Redirect to signup page if not logged in',\n type: 'boolean',\n })\n .option('disable-telemetry', {\n default: false,\n describe: \"Don't send telemetry data to Sentry\",\n type: 'boolean',\n })\n .option('promo-code', {\n alias: 'promo-code',\n describe: 'A promo code that will be applied during signup',\n }).argv;\n\n// Collect argv options that are relevant for the new wizard\n// flows based on `clack`\nconst wizardOptions: WizardOptions = {\n url: argv.url as string | undefined,\n promoCode: argv['promo-code'] as string | undefined,\n};\n\nswitch (argv.i) {\n case 'nextjs':\n // eslint-disable-next-line no-console\n runNextjsWizard(wizardOptions).catch(console.error);\n break;\n case 'sveltekit':\n // eslint-disable-next-line no-console\n runSvelteKitWizard(wizardOptions).catch(console.error);\n break;\n case 'sourcemaps':\n withTelemetry(\n {\n enabled: !argv['disable-telemetry'],\n integration: 'sourcemaps',\n },\n () => runSourcemapsWizard(wizardOptions),\n // eslint-disable-next-line no-console\n ).catch(console.error);\n break;\n default:\n void run(argv);\n}\n"]}
|
|
@@ -72,22 +72,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
72
72
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73
73
|
exports.startWizard = exports.getCurrentIntegration = void 0;
|
|
74
74
|
var _ = __importStar(require("lodash"));
|
|
75
|
-
var Constants_1 = require("../Constants");
|
|
76
75
|
var BottomBar_1 = require("./BottomBar");
|
|
77
76
|
var Logging_1 = require("./Logging");
|
|
78
77
|
function sanitizeAndValidateArgs(argv) {
|
|
79
|
-
if (!argv.url) {
|
|
80
|
-
argv.url = Constants_1.DEFAULT_URL;
|
|
81
|
-
(0, Logging_1.dim)("no URL provided, fallback to ".concat(argv.url));
|
|
82
|
-
}
|
|
83
78
|
if (argv.quiet === undefined) {
|
|
84
79
|
argv.quiet = true;
|
|
85
80
|
(0, Logging_1.dim)('will activate quiet mode for you');
|
|
86
81
|
}
|
|
87
|
-
var baseUrl = argv.url;
|
|
88
|
-
baseUrl += baseUrl.endsWith('/') ? '' : '/';
|
|
89
|
-
baseUrl = baseUrl.replace(/:\/(?!\/)/g, '://');
|
|
90
|
-
argv.url = baseUrl;
|
|
91
82
|
// @ts-ignore skip-connect does not exist on args
|
|
92
83
|
if (argv['skip-connect']) {
|
|
93
84
|
// @ts-ignore skip-connect does not exist on args
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../lib/Helper/Wizard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,wCAA4B;
|
|
1
|
+
{"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../lib/Helper/Wizard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AI,CAAC,UAAU,CAAC,EAAA;;wCAArC,OAAO,GAAG,SAA2B;wCAC3C,4CAAY,UAAU,GAAK,OAAO,GAAG;;;6BACtC,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,EAAA;wBANzB,sBAAO,SAMkB,EAAC;;;oBAE1B,qBAAS,CAAC,IAAI,EAAE,CAAC;oBACjB,IAAA,YAAE,GAAE,CAAC;oBACL,IAAA,aAAG,EAAC,4BAA4B,CAAC,CAAC;oBAClC,IAAA,aAAG,EAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,GAAC,CAAC,OAAO,CAAC,CAAC;oBAChC,IAAA,YAAE,GAAE,CAAC;oBACL,IAAA,aAAG,EAAC,2CAA2C,CAAC,CAAC;oBACjD,IAAA,aAAG,EAAC,mCAAmC,CAAC,CAAC;oBACzC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;;;;;CAEnB;AA7BD,kCA6BC","sourcesContent":["import type { Answers } from 'inquirer';\nimport * as _ from 'lodash';\n\nimport type { Args } from '../Constants';\nimport type { IStep } from '../Steps/BaseStep';\nimport type { BaseIntegration } from '../Steps/Integrations/BaseIntegration';\nimport { BottomBar } from './BottomBar';\nimport { debug, dim, nl, red } from './Logging';\n\nfunction sanitizeAndValidateArgs(argv: Args): void {\n if (argv.quiet === undefined) {\n argv.quiet = true;\n dim('will activate quiet mode for you');\n }\n // @ts-ignore skip-connect does not exist on args\n if (argv['skip-connect']) {\n // @ts-ignore skip-connect does not exist on args\n argv.skipConnect = argv['skip-connect'];\n // @ts-ignore skip-connect does not exist on args\n delete argv['skip-connect'];\n }\n // @ts-ignore skip-connect does not exist on args\n argv.promoCode = argv['promo-code'];\n}\n\nexport function getCurrentIntegration(answers: Answers): BaseIntegration {\n return _.get(answers, 'integration') as BaseIntegration;\n}\n\nexport async function startWizard<M extends IStep>(\n argv: Args,\n ...steps: Array<{ new (debug: Args): M }>\n): Promise<Answers> {\n try {\n sanitizeAndValidateArgs(argv);\n if (argv.debug) {\n debug(argv);\n }\n if (argv.quiet) {\n dim(\"Quiet mode On, DAMA, don't ask me anything\");\n }\n return await steps\n .map((step) => new step(argv))\n .reduce(async (answer, step) => {\n const prevAnswer = await answer;\n const answers = await step.emit(prevAnswer);\n return { ...prevAnswer, ...answers };\n }, Promise.resolve({}));\n } catch (e) {\n BottomBar.hide();\n nl();\n red('Sentry Wizard failed with:');\n red(argv.debug ? e : e.message);\n nl();\n red('Protip: Add --debug to see whats going on');\n red('OR use --help to see your options');\n process.exit(1);\n }\n}\n"]}
|
package/dist/lib/Setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Setup.js","sourceRoot":"","sources":["../../lib/Setup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAA4B;AAE5B,oCAA+C;AAC/C,0CAA8C;AAC9C,4CAAgC;AAEhC,SAAsB,GAAG,CAAC,IAAS;;;;YAC3B,IAAI,yBAAQ,IAAI,GAAK,IAAA,qBAAe,GAAE,CAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Setup.js","sourceRoot":"","sources":["../../lib/Setup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAA4B;AAE5B,oCAA+C;AAC/C,0CAA8C;AAC9C,4CAAgC;AAEhC,SAAsB,GAAG,CAAC,IAAS;;;;YAC3B,IAAI,yBAAQ,IAAI,GAAK,IAAA,qBAAe,GAAE,CAAE,CAAC;YAE/C,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;gBAChC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;aACxB;YACG,KAAK,GAAG;gBACV,IAAI,CAAC,OAAO;gBACZ,IAAI,CAAC,OAAO;gBACZ,IAAI,CAAC,iBAAiB;gBACtB,IAAI,CAAC,eAAe;aACrB,CAAC;YACF,IAAI,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE;gBAC5B,KAAK,GAAG,CAAC,CAAC,MAAM,CACd,KAAK,EACL,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,qBAAqB,EAC1B,IAAI,CAAC,mBAAmB,CACzB,CAAC;aACH;YACD,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC5D,sBAAO,oBAAW,8BAAC,IAAI,GAAK,KAAK,WAAE;;;CACpC;AAvBD,kBAuBC","sourcesContent":["import * as _ from 'lodash';\n\nimport { readEnvironment } from './Helper/Env';\nimport { startWizard } from './Helper/Wizard';\nimport * as Step from './Steps';\n\nexport async function run(argv: any): Promise<any> {\n const args = { ...argv, ...readEnvironment() };\n\n if (args.uninstall === undefined) {\n args.uninstall = false;\n }\n let steps = [\n Step.Initial,\n Step.Welcome,\n Step.ChooseIntegration,\n Step.ShouldConfigure,\n ];\n if (args.uninstall === false) {\n steps = _.concat(\n steps,\n Step.OpenSentry,\n Step.WaitForSentry,\n Step.SentryProjectSelector,\n Step.PromptForParameters,\n );\n }\n steps = _.concat(steps, Step.ConfigureProject, Step.Result);\n return startWizard(args, ...steps);\n}\n"]}
|
|
@@ -77,14 +77,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
77
77
|
exports.ChooseIntegration = void 0;
|
|
78
78
|
var inquirer_1 = require("inquirer");
|
|
79
79
|
var _ = __importStar(require("lodash"));
|
|
80
|
+
var picocolors_1 = require("picocolors");
|
|
80
81
|
var Constants_1 = require("../Constants");
|
|
81
82
|
var BaseStep_1 = require("./BaseStep");
|
|
82
83
|
var Cordova_1 = require("./Integrations/Cordova");
|
|
83
84
|
var Electron_1 = require("./Integrations/Electron");
|
|
84
|
-
var
|
|
85
|
+
var NextJsShim_1 = require("./Integrations/NextJsShim");
|
|
85
86
|
var ReactNative_1 = require("./Integrations/ReactNative");
|
|
86
87
|
var SourceMapsShim_1 = require("./Integrations/SourceMapsShim");
|
|
87
|
-
var
|
|
88
|
+
var SvelteKitShim_1 = require("./Integrations/SvelteKitShim");
|
|
88
89
|
var projectPackage = {};
|
|
89
90
|
try {
|
|
90
91
|
// If we run directly in setup-wizard
|
|
@@ -108,26 +109,24 @@ var ChooseIntegration = /** @class */ (function (_super) {
|
|
|
108
109
|
integrationPrompt = _a.sent();
|
|
109
110
|
integration = null;
|
|
110
111
|
switch (integrationPrompt.integration) {
|
|
111
|
-
case Constants_1.Integration.reactNative:
|
|
112
|
-
integration = new ReactNative_1.ReactNative(this._argv);
|
|
113
|
-
break;
|
|
114
112
|
case Constants_1.Integration.cordova:
|
|
115
|
-
integration = new Cordova_1.Cordova(this._argv);
|
|
113
|
+
integration = new Cordova_1.Cordova(sanitizeUrl(this._argv));
|
|
116
114
|
break;
|
|
117
115
|
case Constants_1.Integration.electron:
|
|
118
|
-
integration = new Electron_1.Electron(this._argv);
|
|
116
|
+
integration = new Electron_1.Electron(sanitizeUrl(this._argv));
|
|
119
117
|
break;
|
|
120
118
|
case Constants_1.Integration.nextjs:
|
|
121
|
-
integration = new
|
|
119
|
+
integration = new NextJsShim_1.NextJsShim(this._argv);
|
|
122
120
|
break;
|
|
123
121
|
case Constants_1.Integration.sveltekit:
|
|
124
|
-
integration = new
|
|
122
|
+
integration = new SvelteKitShim_1.SvelteKitShim(this._argv);
|
|
125
123
|
break;
|
|
126
124
|
case Constants_1.Integration.sourcemaps:
|
|
127
125
|
integration = new SourceMapsShim_1.SourceMapsShim(this._argv);
|
|
128
126
|
break;
|
|
127
|
+
case Constants_1.Integration.reactNative:
|
|
129
128
|
default:
|
|
130
|
-
integration = new ReactNative_1.ReactNative(this._argv);
|
|
129
|
+
integration = new ReactNative_1.ReactNative(sanitizeUrl(this._argv));
|
|
131
130
|
break;
|
|
132
131
|
}
|
|
133
132
|
return [2 /*return*/, { integration: integration }];
|
|
@@ -174,4 +173,21 @@ var ChooseIntegration = /** @class */ (function (_super) {
|
|
|
174
173
|
return ChooseIntegration;
|
|
175
174
|
}(BaseStep_1.BaseStep));
|
|
176
175
|
exports.ChooseIntegration = ChooseIntegration;
|
|
176
|
+
/**
|
|
177
|
+
* For the `clack`-based wizard flows, which we only shim here, we don't set
|
|
178
|
+
* a default url value. For backwards-compatibility with the other flows,
|
|
179
|
+
* we fill it here and sanitize a user-enterd url.
|
|
180
|
+
*/
|
|
181
|
+
function sanitizeUrl(argv) {
|
|
182
|
+
if (!argv.url) {
|
|
183
|
+
argv.url = Constants_1.DEFAULT_URL;
|
|
184
|
+
(0, picocolors_1.dim)("no URL provided, fallback to ".concat(argv.url));
|
|
185
|
+
return argv;
|
|
186
|
+
}
|
|
187
|
+
var baseUrl = argv.url;
|
|
188
|
+
baseUrl += baseUrl.endsWith('/') ? '' : '/';
|
|
189
|
+
baseUrl = baseUrl.replace(/:\/(?!\/)/g, '://');
|
|
190
|
+
argv.url = baseUrl;
|
|
191
|
+
return argv;
|
|
192
|
+
}
|
|
177
193
|
//# sourceMappingURL=ChooseIntegration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChooseIntegration.js","sourceRoot":"","sources":["../../../lib/Steps/ChooseIntegration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAkC;AAClC,wCAA4B;
|
|
1
|
+
{"version":3,"file":"ChooseIntegration.js","sourceRoot":"","sources":["../../../lib/Steps/ChooseIntegration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qCAAkC;AAClC,wCA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,uCAAgC,IAAI,CAAC,GAAG,CAAE,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC;KACb;IAED,IAAI,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC;IACvB,OAAO,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;IAC5C,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IAC/C,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC;IAEnB,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { Answers } from 'inquirer';\nimport { prompt } from 'inquirer';\nimport * as _ from 'lodash';\nimport { dim } from 'picocolors';\n\nimport {\n Args,\n DEFAULT_URL,\n getIntegrationChoices,\n Integration,\n} from '../Constants';\nimport { BaseStep } from './BaseStep';\nimport { Cordova } from './Integrations/Cordova';\nimport { Electron } from './Integrations/Electron';\nimport { NextJsShim } from './Integrations/NextJsShim';\nimport { ReactNative } from './Integrations/ReactNative';\nimport { SourceMapsShim } from './Integrations/SourceMapsShim';\nimport { SvelteKitShim } from './Integrations/SvelteKitShim';\n\nlet projectPackage: any = {};\n\ntry {\n // If we run directly in setup-wizard\n projectPackage = require('../../package.json');\n} catch {\n projectPackage = require(`${process.cwd()}/package.json`);\n}\n\ntype IntegrationPromptAnswer = {\n integration: Integration;\n};\n\nexport class ChooseIntegration extends BaseStep {\n public async emit(_answers: Answers): Promise<Answers> {\n const integrationPrompt = await this._getIntegrationPromptSelection();\n\n let integration = null;\n switch (integrationPrompt.integration) {\n case Integration.cordova:\n integration = new Cordova(sanitizeUrl(this._argv));\n break;\n case Integration.electron:\n integration = new Electron(sanitizeUrl(this._argv));\n break;\n case Integration.nextjs:\n integration = new NextJsShim(this._argv);\n break;\n case Integration.sveltekit:\n integration = new SvelteKitShim(this._argv);\n break;\n case Integration.sourcemaps:\n integration = new SourceMapsShim(this._argv);\n break;\n case Integration.reactNative:\n default:\n integration = new ReactNative(sanitizeUrl(this._argv));\n break;\n }\n\n return { integration };\n }\n\n public tryDetectingIntegration(): Integration | undefined {\n if (_.has(projectPackage, 'dependencies.react-native')) {\n return Integration.reactNative;\n }\n if (_.has(projectPackage, 'dependencies.cordova')) {\n return Integration.cordova;\n }\n return;\n }\n\n private async _getIntegrationPromptSelection(): Promise<IntegrationPromptAnswer> {\n // If we receive project type as an arg we skip asking\n if (this._argv.integration) {\n return { integration: this._argv.integration };\n } else {\n if (this._argv.quiet) {\n throw new Error('You need to choose a integration');\n }\n\n const detectedDefaultSelection = this.tryDetectingIntegration();\n\n return prompt([\n {\n choices: getIntegrationChoices(),\n default: detectedDefaultSelection,\n message: 'What integration do you want to set up?',\n name: 'integration',\n type: 'list',\n },\n ]);\n }\n }\n}\n\n/**\n * For the `clack`-based wizard flows, which we only shim here, we don't set\n * a default url value. For backwards-compatibility with the other flows,\n * we fill it here and sanitize a user-enterd url.\n */\nfunction sanitizeUrl(argv: Args): Args {\n if (!argv.url) {\n argv.url = DEFAULT_URL;\n dim(`no URL provided, fallback to ${argv.url}`);\n return argv;\n }\n\n let baseUrl = argv.url;\n baseUrl += baseUrl.endsWith('/') ? '' : '/';\n baseUrl = baseUrl.replace(/:\\/(?!\\/)/g, '://');\n argv.url = baseUrl;\n\n return argv;\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import { BaseIntegration } from './BaseIntegration';
|
|
|
5
5
|
* This class just redirects to the new `nextjs-wizard.ts` flow
|
|
6
6
|
* for anyone calling the wizard without the '-i nextjs' flag.
|
|
7
7
|
*/
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class NextJsShim extends BaseIntegration {
|
|
9
9
|
protected _argv: Args;
|
|
10
10
|
constructor(_argv: Args);
|
|
11
11
|
emit(_answers: Answers): Promise<Answers>;
|
|
@@ -51,25 +51,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
-
exports.
|
|
54
|
+
exports.NextJsShim = void 0;
|
|
55
55
|
var nextjs_wizard_1 = require("../../../src/nextjs/nextjs-wizard");
|
|
56
56
|
var BaseIntegration_1 = require("./BaseIntegration");
|
|
57
57
|
/**
|
|
58
58
|
* This class just redirects to the new `nextjs-wizard.ts` flow
|
|
59
59
|
* for anyone calling the wizard without the '-i nextjs' flag.
|
|
60
60
|
*/
|
|
61
|
-
var
|
|
62
|
-
__extends(
|
|
63
|
-
function
|
|
61
|
+
var NextJsShim = /** @class */ (function (_super) {
|
|
62
|
+
__extends(NextJsShim, _super);
|
|
63
|
+
function NextJsShim(_argv) {
|
|
64
64
|
var _this = _super.call(this, _argv) || this;
|
|
65
65
|
_this._argv = _argv;
|
|
66
66
|
return _this;
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
NextJsShim.prototype.emit = function (_answers) {
|
|
69
69
|
return __awaiter(this, void 0, void 0, function () {
|
|
70
70
|
return __generator(this, function (_a) {
|
|
71
71
|
switch (_a.label) {
|
|
72
|
-
case 0: return [4 /*yield*/, (0, nextjs_wizard_1.runNextjsWizard)({
|
|
72
|
+
case 0: return [4 /*yield*/, (0, nextjs_wizard_1.runNextjsWizard)({
|
|
73
|
+
promoCode: this._argv.promoCode,
|
|
74
|
+
url: this._argv.url,
|
|
75
|
+
})];
|
|
73
76
|
case 1:
|
|
74
77
|
_a.sent();
|
|
75
78
|
return [2 /*return*/, {}];
|
|
@@ -77,7 +80,7 @@ var NextJs = /** @class */ (function (_super) {
|
|
|
77
80
|
});
|
|
78
81
|
});
|
|
79
82
|
};
|
|
80
|
-
|
|
83
|
+
NextJsShim.prototype.shouldConfigure = function (_answers) {
|
|
81
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
82
85
|
return __generator(this, function (_a) {
|
|
83
86
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
@@ -89,7 +92,7 @@ var NextJs = /** @class */ (function (_super) {
|
|
|
89
92
|
});
|
|
90
93
|
});
|
|
91
94
|
};
|
|
92
|
-
return
|
|
95
|
+
return NextJsShim;
|
|
93
96
|
}(BaseIntegration_1.BaseIntegration));
|
|
94
|
-
exports.
|
|
95
|
-
//# sourceMappingURL=
|
|
97
|
+
exports.NextJsShim = NextJsShim;
|
|
98
|
+
//# sourceMappingURL=NextJsShim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NextJsShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/NextJsShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,mEAAoE;AAGpE,qDAAoD;AAEpD;;;GAGG;AACH;IAAgC,8BAAe;IAC7C,oBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,yBAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,+BAAe,EAAC;4BACpB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;yBACpB,CAAC,EAAA;;wBAHF,SAGE,CAAC;wBACH,sBAAO,EAAE,EAAC;;;;KACX;IAEY,oCAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,kEAAkE;gBAClE,IAAI,IAAI,CAAC,gBAAgB,EAAE;oBACzB,sBAAO,IAAI,CAAC,gBAAgB,EAAC;iBAC9B;gBACD,6DAA6D;gBAC7D,sBAAO,IAAI,CAAC,eAAe,EAAC;;;KAC7B;IACH,iBAAC;AAAD,CAAC,AArBD,CAAgC,iCAAe,GAqB9C;AArBY,gCAAU","sourcesContent":["import type { Answers } from 'inquirer';\nimport { runNextjsWizard } from '../../../src/nextjs/nextjs-wizard';\n\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\n\n/**\n * This class just redirects to the new `nextjs-wizard.ts` flow\n * for anyone calling the wizard without the '-i nextjs' flag.\n */\nexport class NextJsShim extends BaseIntegration {\n public constructor(protected _argv: Args) {\n super(_argv);\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runNextjsWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n });\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (this._shouldConfigure) {\n return this._shouldConfigure;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return this.shouldConfigure;\n }\n}\n"]}
|
|
@@ -69,7 +69,10 @@ var SourceMapsShim = /** @class */ (function (_super) {
|
|
|
69
69
|
return __awaiter(this, void 0, void 0, function () {
|
|
70
70
|
return __generator(this, function (_a) {
|
|
71
71
|
switch (_a.label) {
|
|
72
|
-
case 0: return [4 /*yield*/, (0, sourcemaps_wizard_1.runSourcemapsWizard)({
|
|
72
|
+
case 0: return [4 /*yield*/, (0, sourcemaps_wizard_1.runSourcemapsWizard)({
|
|
73
|
+
promoCode: this._argv.promoCode,
|
|
74
|
+
url: this._argv.url,
|
|
75
|
+
})];
|
|
73
76
|
case 1:
|
|
74
77
|
_a.sent();
|
|
75
78
|
return [2 /*return*/, {}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceMapsShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/SourceMapsShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+EAAgF;AAGhF,qDAAoD;AAEpD;;;GAGG;AACH;IAAoC,kCAAe;IACjD,wBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,6BAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,uCAAmB,EAAC,
|
|
1
|
+
{"version":3,"file":"SourceMapsShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/SourceMapsShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+EAAgF;AAGhF,qDAAoD;AAEpD;;;GAGG;AACH;IAAoC,kCAAe;IACjD,wBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,6BAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,uCAAmB,EAAC;4BACxB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;yBACpB,CAAC,EAAA;;wBAHF,SAGE,CAAC;wBACH,sBAAO,EAAE,EAAC;;;;KACX;IAEY,wCAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,sBAAO,IAAI,CAAC,gBAAgB,EAAC;;;KAC9B;IACH,qBAAC;AAAD,CAAC,AAhBD,CAAoC,iCAAe,GAgBlD;AAhBY,wCAAc","sourcesContent":["import type { Answers } from 'inquirer';\nimport { runSourcemapsWizard } from '../../../src/sourcemaps/sourcemaps-wizard';\n\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\n\n/**\n * This class just redirects to the `sourcemaps-wizard.ts` flow\n * for anyone calling the wizard without the '-i sveltekit' flag.\n */\nexport class SourceMapsShim extends BaseIntegration {\n public constructor(protected _argv: Args) {\n super(_argv);\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runSourcemapsWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n });\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n return this._shouldConfigure;\n }\n}\n"]}
|
|
@@ -5,7 +5,7 @@ import { BaseIntegration } from './BaseIntegration';
|
|
|
5
5
|
* This class just redirects to the new `sveltekit-wizard.ts` flow
|
|
6
6
|
* for anyone calling the wizard without the '-i sveltekit' flag.
|
|
7
7
|
*/
|
|
8
|
-
export declare class
|
|
8
|
+
export declare class SvelteKitShim extends BaseIntegration {
|
|
9
9
|
protected _argv: Args;
|
|
10
10
|
constructor(_argv: Args);
|
|
11
11
|
emit(_answers: Answers): Promise<Answers>;
|
|
@@ -51,25 +51,28 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
-
exports.
|
|
54
|
+
exports.SvelteKitShim = void 0;
|
|
55
55
|
var sveltekit_wizard_1 = require("../../../src/sveltekit/sveltekit-wizard");
|
|
56
56
|
var BaseIntegration_1 = require("./BaseIntegration");
|
|
57
57
|
/**
|
|
58
58
|
* This class just redirects to the new `sveltekit-wizard.ts` flow
|
|
59
59
|
* for anyone calling the wizard without the '-i sveltekit' flag.
|
|
60
60
|
*/
|
|
61
|
-
var
|
|
62
|
-
__extends(
|
|
63
|
-
function
|
|
61
|
+
var SvelteKitShim = /** @class */ (function (_super) {
|
|
62
|
+
__extends(SvelteKitShim, _super);
|
|
63
|
+
function SvelteKitShim(_argv) {
|
|
64
64
|
var _this = _super.call(this, _argv) || this;
|
|
65
65
|
_this._argv = _argv;
|
|
66
66
|
return _this;
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
SvelteKitShim.prototype.emit = function (_answers) {
|
|
69
69
|
return __awaiter(this, void 0, void 0, function () {
|
|
70
70
|
return __generator(this, function (_a) {
|
|
71
71
|
switch (_a.label) {
|
|
72
|
-
case 0: return [4 /*yield*/, (0, sveltekit_wizard_1.runSvelteKitWizard)({
|
|
72
|
+
case 0: return [4 /*yield*/, (0, sveltekit_wizard_1.runSvelteKitWizard)({
|
|
73
|
+
promoCode: this._argv.promoCode,
|
|
74
|
+
url: this._argv.url,
|
|
75
|
+
})];
|
|
73
76
|
case 1:
|
|
74
77
|
_a.sent();
|
|
75
78
|
return [2 /*return*/, {}];
|
|
@@ -77,7 +80,7 @@ var SvelteKit = /** @class */ (function (_super) {
|
|
|
77
80
|
});
|
|
78
81
|
});
|
|
79
82
|
};
|
|
80
|
-
|
|
83
|
+
SvelteKitShim.prototype.shouldConfigure = function (_answers) {
|
|
81
84
|
return __awaiter(this, void 0, void 0, function () {
|
|
82
85
|
return __generator(this, function (_a) {
|
|
83
86
|
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
|
@@ -89,7 +92,7 @@ var SvelteKit = /** @class */ (function (_super) {
|
|
|
89
92
|
});
|
|
90
93
|
});
|
|
91
94
|
};
|
|
92
|
-
return
|
|
95
|
+
return SvelteKitShim;
|
|
93
96
|
}(BaseIntegration_1.BaseIntegration));
|
|
94
|
-
exports.
|
|
95
|
-
//# sourceMappingURL=
|
|
97
|
+
exports.SvelteKitShim = SvelteKitShim;
|
|
98
|
+
//# sourceMappingURL=SvelteKitShim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SvelteKitShim.js","sourceRoot":"","sources":["../../../../lib/Steps/Integrations/SvelteKitShim.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,4EAA6E;AAG7E,qDAAoD;AAEpD;;;GAGG;AACH;IAAmC,iCAAe;IAChD,uBAA6B,KAAW;QAAxC,YACE,kBAAM,KAAK,CAAC,SACb;QAF4B,WAAK,GAAL,KAAK,CAAM;;IAExC,CAAC;IAEY,4BAAI,GAAjB,UAAkB,QAAiB;;;;4BACjC,qBAAM,IAAA,qCAAkB,EAAC;4BACvB,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS;4BAC/B,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG;yBACpB,CAAC,EAAA;;wBAHF,SAGE,CAAC;wBACH,sBAAO,EAAE,EAAC;;;;KACX;IAEY,uCAAe,GAA5B,UAA6B,QAAiB;;;gBAC5C,kEAAkE;gBAClE,IAAI,IAAI,CAAC,gBAAgB,EAAE;oBACzB,sBAAO,IAAI,CAAC,gBAAgB,EAAC;iBAC9B;gBACD,6DAA6D;gBAC7D,sBAAO,IAAI,CAAC,eAAe,EAAC;;;KAC7B;IACH,oBAAC;AAAD,CAAC,AArBD,CAAmC,iCAAe,GAqBjD;AArBY,sCAAa","sourcesContent":["import type { Answers } from 'inquirer';\nimport { runSvelteKitWizard } from '../../../src/sveltekit/sveltekit-wizard';\n\nimport type { Args } from '../../Constants';\nimport { BaseIntegration } from './BaseIntegration';\n\n/**\n * This class just redirects to the new `sveltekit-wizard.ts` flow\n * for anyone calling the wizard without the '-i sveltekit' flag.\n */\nexport class SvelteKitShim extends BaseIntegration {\n public constructor(protected _argv: Args) {\n super(_argv);\n }\n\n public async emit(_answers: Answers): Promise<Answers> {\n await runSvelteKitWizard({\n promoCode: this._argv.promoCode,\n url: this._argv.url,\n });\n return {};\n }\n\n public async shouldConfigure(_answers: Answers): Promise<Answers> {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (this._shouldConfigure) {\n return this._shouldConfigure;\n }\n // eslint-disable-next-line @typescript-eslint/unbound-method\n return this.shouldConfigure;\n }\n}\n"]}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/wizard",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"homepage": "https://github.com/getsentry/sentry-wizard",
|
|
5
5
|
"repository": "https://github.com/getsentry/sentry-wizard",
|
|
6
6
|
"description": "Sentry wizard helping you to configure your project",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"opn": "^5.4.0",
|
|
37
37
|
"r2": "^2.0.1",
|
|
38
38
|
"read-env": "^1.3.0",
|
|
39
|
-
"semver": "^7.3
|
|
39
|
+
"semver": "^7.5.3",
|
|
40
40
|
"xcode": "3.0.1",
|
|
41
41
|
"yargs": "^16.2.0"
|
|
42
42
|
},
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"**/xmldom": "^0.6.0"
|
|
66
66
|
},
|
|
67
67
|
"engines": {
|
|
68
|
-
"node": ">=
|
|
68
|
+
"node": ">=14.0.0",
|
|
69
69
|
"npm": ">=3.10.7",
|
|
70
70
|
"yarn": ">=1.0.2"
|
|
71
71
|
},
|
|
@@ -1,5 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
export declare function runNextjsWizard(options: NextjsWizardOptions): Promise<void>;
|
|
5
|
-
export {};
|
|
1
|
+
import { WizardOptions } from '../utils/types';
|
|
2
|
+
export declare function runNextjsWizard(options: WizardOptions): Promise<void>;
|
|
@@ -103,7 +103,7 @@ function runNextjsWizard(options) {
|
|
|
103
103
|
return [4 /*yield*/, (0, clack_utils_1.ensurePackageIsInstalled)(packageJson, 'next', 'Next.js')];
|
|
104
104
|
case 3:
|
|
105
105
|
_e.sent();
|
|
106
|
-
return [4 /*yield*/, (0, clack_utils_1.askForSelfHosted)()];
|
|
106
|
+
return [4 /*yield*/, (0, clack_utils_1.askForSelfHosted)(options.url)];
|
|
107
107
|
case 4:
|
|
108
108
|
_b = _e.sent(), sentryUrl = _b.url, selfHosted = _b.selfHosted;
|
|
109
109
|
return [4 /*yield*/, (0, clack_utils_1.askForWizardLogin)({
|