@sentry/wizard 3.25.1 → 3.25.2
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 +4 -0
- package/bin.ts +10 -2
- package/dist/bin.js +12 -3
- package/dist/bin.js.map +1 -1
- package/dist/lib/Helper/Env.js +1 -0
- package/dist/lib/Helper/Env.js.map +1 -1
- package/dist/lib/Setup.d.ts +6 -0
- package/dist/lib/Setup.js +6 -0
- package/dist/lib/Setup.js.map +1 -1
- package/dist/lib/Steps/ChooseIntegration.js +0 -29
- package/dist/lib/Steps/ChooseIntegration.js.map +1 -1
- package/dist/package.json +2 -1
- package/dist/src/run.d.ts +16 -0
- package/dist/src/run.js +195 -0
- package/dist/src/run.js.map +1 -0
- package/dist/src/utils/clack-utils.js +1 -1
- package/dist/src/utils/clack-utils.js.map +1 -1
- package/dist/src/utils/package-json.d.ts +1 -0
- package/dist/src/utils/package-json.js.map +1 -1
- package/lib/Helper/Env.ts +1 -0
- package/lib/Setup.ts +6 -0
- package/lib/Steps/ChooseIntegration.ts +0 -29
- package/package.json +2 -1
- package/src/run.ts +142 -0
- package/src/utils/clack-utils.ts +1 -1
- package/src/utils/package-json.ts +1 -0
- package/dist/lib/Steps/Integrations/Android.d.ts +0 -9
- package/dist/lib/Steps/Integrations/Android.js +0 -86
- package/dist/lib/Steps/Integrations/Android.js.map +0 -1
- package/dist/lib/Steps/Integrations/Apple.d.ts +0 -10
- package/dist/lib/Steps/Integrations/Apple.js +0 -92
- package/dist/lib/Steps/Integrations/Apple.js.map +0 -1
- package/dist/lib/Steps/Integrations/NextJsShim.d.ts +0 -13
- package/dist/lib/Steps/Integrations/NextJsShim.js +0 -99
- package/dist/lib/Steps/Integrations/NextJsShim.js.map +0 -1
- package/dist/lib/Steps/Integrations/ReactNative.d.ts +0 -10
- package/dist/lib/Steps/Integrations/ReactNative.js +0 -93
- package/dist/lib/Steps/Integrations/ReactNative.js.map +0 -1
- package/dist/lib/Steps/Integrations/Remix.d.ts +0 -12
- package/dist/lib/Steps/Integrations/Remix.js +0 -98
- package/dist/lib/Steps/Integrations/Remix.js.map +0 -1
- package/dist/lib/Steps/Integrations/SourceMapsShim.d.ts +0 -13
- package/dist/lib/Steps/Integrations/SourceMapsShim.js +0 -94
- package/dist/lib/Steps/Integrations/SourceMapsShim.js.map +0 -1
- package/dist/lib/Steps/Integrations/SvelteKitShim.d.ts +0 -13
- package/dist/lib/Steps/Integrations/SvelteKitShim.js +0 -99
- package/dist/lib/Steps/Integrations/SvelteKitShim.js.map +0 -1
- package/lib/Steps/Integrations/Android.ts +0 -23
- package/lib/Steps/Integrations/Apple.ts +0 -27
- package/lib/Steps/Integrations/NextJsShim.ts +0 -33
- package/lib/Steps/Integrations/ReactNative.ts +0 -28
- package/lib/Steps/Integrations/Remix.ts +0 -32
- package/lib/Steps/Integrations/SourceMapsShim.ts +0 -28
- package/lib/Steps/Integrations/SvelteKitShim.ts +0 -33
package/CHANGELOG.md
CHANGED
package/bin.ts
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
import { satisfies } from 'semver';
|
|
3
3
|
import { red } from './lib/Helper/Logging';
|
|
4
4
|
|
|
5
|
+
import yargs from 'yargs';
|
|
6
|
+
import { hideBin } from 'yargs/helpers';
|
|
7
|
+
|
|
5
8
|
const NODE_VERSION_RANGE = '>=14.18.0';
|
|
6
9
|
|
|
7
10
|
// Have to run this above the other imports because they are importing clack that
|
|
@@ -14,11 +17,12 @@ if (!satisfies(process.version, NODE_VERSION_RANGE)) {
|
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
import { Integration, Platform } from './lib/Constants';
|
|
17
|
-
import { run } from './
|
|
20
|
+
import { run } from './src/run';
|
|
21
|
+
|
|
18
22
|
export * from './lib/Setup';
|
|
19
23
|
|
|
20
24
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
|
21
|
-
const argv =
|
|
25
|
+
const argv = yargs(hideBin(process.argv))
|
|
22
26
|
.option('debug', {
|
|
23
27
|
default: false,
|
|
24
28
|
describe: 'Enable verbose logging\nenv: SENTRY_WIZARD_DEBUG',
|
|
@@ -70,6 +74,10 @@ const argv = require('yargs')
|
|
|
70
74
|
.option('promo-code', {
|
|
71
75
|
alias: 'promo-code',
|
|
72
76
|
describe: 'A promo code that will be applied during signup',
|
|
77
|
+
type: 'string',
|
|
73
78
|
}).argv;
|
|
74
79
|
|
|
80
|
+
// @ts-expect-error - for some reason TS doesn't recognize the aliases as valid properties
|
|
81
|
+
// meaning it only knows e.g. u but not url. Maybe a bug in this old version of yargs?
|
|
82
|
+
// Can't upgrade yargs though without dropping support for Node 14.
|
|
75
83
|
void run(argv);
|
package/dist/bin.js
CHANGED
|
@@ -14,9 +14,14 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
14
14
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
16
|
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
17
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
21
|
var semver_1 = require("semver");
|
|
19
22
|
var Logging_1 = require("./lib/Helper/Logging");
|
|
23
|
+
var yargs_1 = __importDefault(require("yargs"));
|
|
24
|
+
var helpers_1 = require("yargs/helpers");
|
|
20
25
|
var NODE_VERSION_RANGE = '>=14.18.0';
|
|
21
26
|
// Have to run this above the other imports because they are importing clack that
|
|
22
27
|
// has the problematic imports.
|
|
@@ -25,10 +30,10 @@ if (!(0, semver_1.satisfies)(process.version, NODE_VERSION_RANGE)) {
|
|
|
25
30
|
process.exit(1);
|
|
26
31
|
}
|
|
27
32
|
var Constants_1 = require("./lib/Constants");
|
|
28
|
-
var
|
|
33
|
+
var run_1 = require("./src/run");
|
|
29
34
|
__exportStar(require("./lib/Setup"), exports);
|
|
30
35
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
|
31
|
-
var argv =
|
|
36
|
+
var argv = (0, yargs_1.default)((0, helpers_1.hideBin)(process.argv))
|
|
32
37
|
.option('debug', {
|
|
33
38
|
default: false,
|
|
34
39
|
describe: 'Enable verbose logging\nenv: SENTRY_WIZARD_DEBUG',
|
|
@@ -78,6 +83,10 @@ var argv = require('yargs')
|
|
|
78
83
|
.option('promo-code', {
|
|
79
84
|
alias: 'promo-code',
|
|
80
85
|
describe: 'A promo code that will be applied during signup',
|
|
86
|
+
type: 'string',
|
|
81
87
|
}).argv;
|
|
82
|
-
|
|
88
|
+
// @ts-expect-error - for some reason TS doesn't recognize the aliases as valid properties
|
|
89
|
+
// meaning it only knows e.g. u but not url. Maybe a bug in this old version of yargs?
|
|
90
|
+
// Can't upgrade yargs though without dropping support for Node 14.
|
|
91
|
+
void (0, run_1.run)(argv);
|
|
83
92
|
//# sourceMappingURL=bin.js.map
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../bin.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AACA,iCAAmC;AACnC,gDAA2C;AAE3C,gDAA0B;AAC1B,yCAAwC;AAExC,IAAM,kBAAkB,GAAG,WAAW,CAAC;AAEvC,iFAAiF;AACjF,+BAA+B;AAC/B,IAAI,CAAC,IAAA,kBAAS,EAAC,OAAO,CAAC,OAAO,EAAE,kBAAkB,CAAC,EAAE;IACnD,IAAA,aAAG,EACD,yCAAkC,kBAAkB,qCAA2B,OAAO,CAAC,OAAO,2CAAwC,CACvI,CAAC;IACF,O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mB,EAAE;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;IAC3D,IAAI,EAAE,QAAQ;CACf,CAAC,CAAC,IAAI,CAAC;AAEV,0FAA0F;AAC1F,sFAAsF;AACtF,mEAAmE;AACnE,KAAK,IAAA,SAAG,EAAC,IAAI,CAAC,CAAC","sourcesContent":["#!/usr/bin/env node\nimport { satisfies } from 'semver';\nimport { red } from './lib/Helper/Logging';\n\nimport yargs from 'yargs';\nimport { hideBin } from 'yargs/helpers';\n\nconst NODE_VERSION_RANGE = '>=14.18.0';\n\n// Have to run this above the other imports because they are importing clack that\n// has the problematic imports.\nif (!satisfies(process.version, NODE_VERSION_RANGE)) {\n red(\n `Sentry wizard requires Node.js ${NODE_VERSION_RANGE}. You are using Node.js ${process.version}. Please upgrade your Node.js version.`,\n );\n process.exit(1);\n}\n\nimport { Integration, Platform } from './lib/Constants';\nimport { run } from './src/run';\n\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 = yargs(hideBin(process.argv))\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 type: 'string',\n }).argv;\n\n// @ts-expect-error - for some reason TS doesn't recognize the aliases as valid properties\n// meaning it only knows e.g. u but not url. Maybe a bug in this old version of yargs?\n// Can't upgrade yargs though without dropping support for Node 14.\nvoid run(argv);\n"]}
|
package/dist/lib/Helper/Env.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.readEnvironment = void 0;
|
|
4
4
|
var readEnv = require('read-env').default;
|
|
5
|
+
// TODO: move to src/utils (+tests)
|
|
5
6
|
function readEnvironment() {
|
|
6
7
|
var result = readEnv('SENTRY_WIZARD');
|
|
7
8
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Env.js","sourceRoot":"","sources":["../../../lib/Helper/Env.ts"],"names":[],"mappings":";;;AAAA,IAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;AAE5C,SAAgB,eAAe;IAC7B,IAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC;AAChB,CAAC;AAHD,0CAGC","sourcesContent":["const readEnv = require('read-env').default;\n\nexport function readEnvironment(): Record<string, unknown> {\n const result = readEnv('SENTRY_WIZARD');\n return result;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Env.js","sourceRoot":"","sources":["../../../lib/Helper/Env.ts"],"names":[],"mappings":";;;AAAA,IAAM,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC;AAE5C,mCAAmC;AACnC,SAAgB,eAAe;IAC7B,IAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACxC,OAAO,MAAM,CAAC;AAChB,CAAC;AAHD,0CAGC","sourcesContent":["const readEnv = require('read-env').default;\n\n// TODO: move to src/utils (+tests)\nexport function readEnvironment(): Record<string, unknown> {\n const result = readEnv('SENTRY_WIZARD');\n return result;\n}\n"]}
|
package/dist/lib/Setup.d.ts
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated this function is the entry point to the old, step-based wizards located in `lib`.
|
|
3
|
+
* When creating new wizards, we now add them to clack-based wizards under `src`.
|
|
4
|
+
* Therefor, do not call this function anymore.
|
|
5
|
+
* Use `run` from {@link ../src/run.ts} instead.
|
|
6
|
+
*/
|
|
1
7
|
export declare function run(argv: any): Promise<any>;
|
package/dist/lib/Setup.js
CHANGED
|
@@ -85,6 +85,12 @@ var debug_1 = require("../src/utils/debug");
|
|
|
85
85
|
var Env_1 = require("./Helper/Env");
|
|
86
86
|
var Wizard_1 = require("./Helper/Wizard");
|
|
87
87
|
var Step = __importStar(require("./Steps"));
|
|
88
|
+
/**
|
|
89
|
+
* @deprecated this function is the entry point to the old, step-based wizards located in `lib`.
|
|
90
|
+
* When creating new wizards, we now add them to clack-based wizards under `src`.
|
|
91
|
+
* Therefor, do not call this function anymore.
|
|
92
|
+
* Use `run` from {@link ../src/run.ts} instead.
|
|
93
|
+
*/
|
|
88
94
|
function run(argv) {
|
|
89
95
|
return __awaiter(this, void 0, void 0, function () {
|
|
90
96
|
var args, steps;
|
package/dist/lib/Setup.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Setup.js","sourceRoot":"","sources":["../../lib/Setup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAA4B;AAC5B,4CAAqD;AAErD,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,KAAK,EAAE;gBACd,IAAA,uBAAe,GAAE,CAAC;aACnB;YAED,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;AA3BD,kBA2BC","sourcesContent":["import * as _ from 'lodash';\nimport { enableDebugLogs } from '../src/utils/debug';\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 (argv.debug) {\n enableDebugLogs();\n }\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"]}
|
|
1
|
+
{"version":3,"file":"Setup.js","sourceRoot":"","sources":["../../lib/Setup.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAA4B;AAC5B,4CAAqD;AAErD,oCAA+C;AAC/C,0CAA8C;AAC9C,4CAAgC;AAEhC;;;;;GAKG;AACH,SAAsB,GAAG,CAAC,IAAS;;;;YAC3B,IAAI,yBAAQ,IAAI,GAAK,IAAA,qBAAe,GAAE,CAAE,CAAC;YAE/C,IAAI,IAAI,CAAC,KAAK,EAAE;gBACd,IAAA,uBAAe,GAAE,CAAC;aACnB;YAED,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;AA3BD,kBA2BC","sourcesContent":["import * as _ from 'lodash';\nimport { enableDebugLogs } from '../src/utils/debug';\n\nimport { readEnvironment } from './Helper/Env';\nimport { startWizard } from './Helper/Wizard';\nimport * as Step from './Steps';\n\n/**\n * @deprecated this function is the entry point to the old, step-based wizards located in `lib`.\n * When creating new wizards, we now add them to clack-based wizards under `src`.\n * Therefor, do not call this function anymore.\n * Use `run` from {@link ../src/run.ts} instead.\n */\nexport async function run(argv: any): Promise<any> {\n const args = { ...argv, ...readEnvironment() };\n\n if (argv.debug) {\n enableDebugLogs();\n }\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"]}
|
|
@@ -57,14 +57,7 @@ var Constants_1 = require("../Constants");
|
|
|
57
57
|
var BaseStep_1 = require("./BaseStep");
|
|
58
58
|
var Cordova_1 = require("./Integrations/Cordova");
|
|
59
59
|
var Electron_1 = require("./Integrations/Electron");
|
|
60
|
-
var NextJsShim_1 = require("./Integrations/NextJsShim");
|
|
61
|
-
var ReactNative_1 = require("./Integrations/ReactNative");
|
|
62
|
-
var SourceMapsShim_1 = require("./Integrations/SourceMapsShim");
|
|
63
|
-
var Apple_1 = require("./Integrations/Apple");
|
|
64
|
-
var SvelteKitShim_1 = require("./Integrations/SvelteKitShim");
|
|
65
60
|
var package_json_1 = require("../../src/utils/package-json");
|
|
66
|
-
var Remix_1 = require("./Integrations/Remix");
|
|
67
|
-
var Android_1 = require("./Integrations/Android");
|
|
68
61
|
var Logging_1 = require("../Helper/Logging");
|
|
69
62
|
var projectPackage = {};
|
|
70
63
|
try {
|
|
@@ -89,34 +82,12 @@ var ChooseIntegration = /** @class */ (function (_super) {
|
|
|
89
82
|
integrationPrompt = _a.sent();
|
|
90
83
|
integration = null;
|
|
91
84
|
switch (integrationPrompt.integration) {
|
|
92
|
-
case Constants_1.Integration.android:
|
|
93
|
-
integration = new Android_1.Android(this._argv);
|
|
94
|
-
break;
|
|
95
85
|
case Constants_1.Integration.cordova:
|
|
96
86
|
integration = new Cordova_1.Cordova(sanitizeUrl(this._argv));
|
|
97
87
|
break;
|
|
98
88
|
case Constants_1.Integration.electron:
|
|
99
89
|
integration = new Electron_1.Electron(sanitizeUrl(this._argv));
|
|
100
90
|
break;
|
|
101
|
-
case Constants_1.Integration.nextjs:
|
|
102
|
-
integration = new NextJsShim_1.NextJsShim(this._argv);
|
|
103
|
-
break;
|
|
104
|
-
case Constants_1.Integration.remix:
|
|
105
|
-
integration = new Remix_1.Remix(this._argv);
|
|
106
|
-
break;
|
|
107
|
-
case Constants_1.Integration.sveltekit:
|
|
108
|
-
integration = new SvelteKitShim_1.SvelteKitShim(this._argv);
|
|
109
|
-
break;
|
|
110
|
-
case Constants_1.Integration.sourcemaps:
|
|
111
|
-
integration = new SourceMapsShim_1.SourceMapsShim(this._argv);
|
|
112
|
-
break;
|
|
113
|
-
case Constants_1.Integration.ios:
|
|
114
|
-
integration = new Apple_1.Apple(this._argv);
|
|
115
|
-
break;
|
|
116
|
-
case Constants_1.Integration.reactNative:
|
|
117
|
-
default:
|
|
118
|
-
integration = new ReactNative_1.ReactNative(this._argv);
|
|
119
|
-
break;
|
|
120
91
|
}
|
|
121
92
|
return [2 /*return*/, { integration: integration }];
|
|
122
93
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChooseIntegration.js","sourceRoot":"","sources":["../../../lib/Steps/ChooseIntegration.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AiE9B;;;;GAIG;AACH,SAAS,WAAW,CAAC,IAAU;IAC7B,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,GAAG,GAAG,uBAAW,CAAC;QACvB,IAAA,aAAG,EAAC,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';\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 { hasPackageInstalled } from '../../src/utils/package-json';\nimport { dim } from '../Helper/Logging';\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 }\n\n return { integration };\n }\n\n public tryDetectingIntegration(): Integration | undefined {\n if (hasPackageInstalled('react-native', projectPackage)) {\n return Integration.reactNative;\n }\n if (hasPackageInstalled('cordova', projectPackage)) {\n return Integration.cordova;\n }\n if (hasPackageInstalled('electron', projectPackage)) {\n return Integration.electron;\n }\n if (hasPackageInstalled('next', projectPackage)) {\n return Integration.nextjs;\n }\n if (hasPackageInstalled('remix-run', projectPackage)) {\n return Integration.remix;\n }\n if (hasPackageInstalled('@sveltejs/kit', projectPackage)) {\n return Integration.sveltekit;\n }\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 platform');\n }\n\n const detectedDefaultSelection = this.tryDetectingIntegration();\n\n return prompt([\n {\n choices: getIntegrationChoices(),\n default: detectedDefaultSelection,\n message: 'What platform do you want to set up?',\n name: 'integration',\n type: 'list',\n pageSize: 10,\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"]}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/wizard",
|
|
3
|
-
"version": "3.25.
|
|
3
|
+
"version": "3.25.2",
|
|
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",
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"@types/node": "^10.11.0",
|
|
51
51
|
"@types/rimraf": "^3.0.2",
|
|
52
52
|
"@types/semver": "^7.3.7",
|
|
53
|
+
"@types/yargs": "^16.0.9",
|
|
53
54
|
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
54
55
|
"@typescript-eslint/parser": "^5.13.0",
|
|
55
56
|
"eslint": "^8.18.0",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Platform } from '../lib/Constants';
|
|
2
|
+
type WizardIntegration = 'reactNative' | 'ios' | 'android' | 'cordova' | 'electron' | 'nextjs' | 'remix' | 'sveltekit' | 'sourcemaps';
|
|
3
|
+
type Args = {
|
|
4
|
+
integration?: WizardIntegration;
|
|
5
|
+
uninstall: boolean;
|
|
6
|
+
signup: boolean;
|
|
7
|
+
skipConnect: boolean;
|
|
8
|
+
debug: boolean;
|
|
9
|
+
quiet: boolean;
|
|
10
|
+
disableTelemetry: boolean;
|
|
11
|
+
promoCode?: string;
|
|
12
|
+
url?: string;
|
|
13
|
+
platform?: Platform[];
|
|
14
|
+
};
|
|
15
|
+
export declare function run(argv: Args): Promise<void>;
|
|
16
|
+
export {};
|
package/dist/src/run.js
ADDED
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
46
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
47
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
48
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
49
|
+
function step(op) {
|
|
50
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
51
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
52
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
53
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
54
|
+
switch (op[0]) {
|
|
55
|
+
case 0: case 1: t = op; break;
|
|
56
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
57
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
58
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
59
|
+
default:
|
|
60
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
61
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
62
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
63
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
64
|
+
if (t[2]) _.ops.pop();
|
|
65
|
+
_.trys.pop(); continue;
|
|
66
|
+
}
|
|
67
|
+
op = body.call(thisArg, _);
|
|
68
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
69
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
73
|
+
exports.run = void 0;
|
|
74
|
+
// @ts-ignore - clack is ESM and TS complains about that. It works though
|
|
75
|
+
var clack = __importStar(require("@clack/prompts"));
|
|
76
|
+
var clack_utils_1 = require("./utils/clack-utils");
|
|
77
|
+
var react_native_wizard_1 = require("./react-native/react-native-wizard");
|
|
78
|
+
var Setup_1 = require("../lib/Setup");
|
|
79
|
+
var android_wizard_1 = require("./android/android-wizard");
|
|
80
|
+
var apple_wizard_1 = require("./apple/apple-wizard");
|
|
81
|
+
var nextjs_wizard_1 = require("./nextjs/nextjs-wizard");
|
|
82
|
+
var remix_wizard_1 = require("./remix/remix-wizard");
|
|
83
|
+
var sveltekit_wizard_1 = require("./sveltekit/sveltekit-wizard");
|
|
84
|
+
var sourcemaps_wizard_1 = require("./sourcemaps/sourcemaps-wizard");
|
|
85
|
+
var Env_1 = require("../lib/Helper/Env");
|
|
86
|
+
function run(argv) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
88
|
+
var finalArgs, integration, wizardOptions, _a;
|
|
89
|
+
return __generator(this, function (_b) {
|
|
90
|
+
switch (_b.label) {
|
|
91
|
+
case 0:
|
|
92
|
+
finalArgs = __assign(__assign({}, argv), (0, Env_1.readEnvironment)());
|
|
93
|
+
integration = finalArgs.integration;
|
|
94
|
+
if (!!integration) return [3 /*break*/, 2];
|
|
95
|
+
clack.intro("Sentry Wizard ".concat(tryGetWizardVersion()));
|
|
96
|
+
return [4 /*yield*/, (0, clack_utils_1.abortIfCancelled)(clack.select({
|
|
97
|
+
message: 'What do you want to set up?',
|
|
98
|
+
options: [
|
|
99
|
+
{ value: 'reactNative', label: 'React Native' },
|
|
100
|
+
{ value: 'ios', label: 'iOS' },
|
|
101
|
+
{ value: 'android', label: 'Android' },
|
|
102
|
+
{ value: 'cordova', label: 'Cordova' },
|
|
103
|
+
{ value: 'electron', label: 'Electron' },
|
|
104
|
+
{ value: 'nextjs', label: 'NextJS' },
|
|
105
|
+
{ value: 'remix', label: 'Remix' },
|
|
106
|
+
{ value: 'sveltekit', label: 'SvelteKit' },
|
|
107
|
+
{ value: 'sourcemaps', label: 'Configure Source Maps Upload' },
|
|
108
|
+
],
|
|
109
|
+
}))];
|
|
110
|
+
case 1:
|
|
111
|
+
integration = _b.sent();
|
|
112
|
+
if (!integration) {
|
|
113
|
+
clack.log.error('No integration selected. Exiting.');
|
|
114
|
+
return [2 /*return*/];
|
|
115
|
+
}
|
|
116
|
+
clack.outro("Starting ".concat(integration, " setup"));
|
|
117
|
+
_b.label = 2;
|
|
118
|
+
case 2:
|
|
119
|
+
wizardOptions = {
|
|
120
|
+
telemetryEnabled: !argv.disableTelemetry,
|
|
121
|
+
promoCode: argv.promoCode,
|
|
122
|
+
url: argv.url,
|
|
123
|
+
};
|
|
124
|
+
_a = integration;
|
|
125
|
+
switch (_a) {
|
|
126
|
+
case 'reactNative': return [3 /*break*/, 3];
|
|
127
|
+
case 'ios': return [3 /*break*/, 5];
|
|
128
|
+
case 'android': return [3 /*break*/, 7];
|
|
129
|
+
case 'nextjs': return [3 /*break*/, 9];
|
|
130
|
+
case 'remix': return [3 /*break*/, 11];
|
|
131
|
+
case 'sveltekit': return [3 /*break*/, 13];
|
|
132
|
+
case 'sourcemaps': return [3 /*break*/, 15];
|
|
133
|
+
case 'cordova': return [3 /*break*/, 17];
|
|
134
|
+
case 'electron': return [3 /*break*/, 18];
|
|
135
|
+
}
|
|
136
|
+
return [3 /*break*/, 19];
|
|
137
|
+
case 3: return [4 /*yield*/, (0, react_native_wizard_1.runReactNativeWizard)(__assign(__assign({}, wizardOptions), { uninstall: argv.uninstall }))];
|
|
138
|
+
case 4:
|
|
139
|
+
_b.sent();
|
|
140
|
+
return [3 /*break*/, 20];
|
|
141
|
+
case 5: return [4 /*yield*/, (0, apple_wizard_1.runAppleWizard)(wizardOptions)];
|
|
142
|
+
case 6:
|
|
143
|
+
_b.sent();
|
|
144
|
+
return [3 /*break*/, 20];
|
|
145
|
+
case 7: return [4 /*yield*/, (0, android_wizard_1.runAndroidWizard)(wizardOptions)];
|
|
146
|
+
case 8:
|
|
147
|
+
_b.sent();
|
|
148
|
+
return [3 /*break*/, 20];
|
|
149
|
+
case 9: return [4 /*yield*/, (0, nextjs_wizard_1.runNextjsWizard)(wizardOptions)];
|
|
150
|
+
case 10:
|
|
151
|
+
_b.sent();
|
|
152
|
+
return [3 /*break*/, 20];
|
|
153
|
+
case 11: return [4 /*yield*/, (0, remix_wizard_1.runRemixWizard)(wizardOptions)];
|
|
154
|
+
case 12:
|
|
155
|
+
_b.sent();
|
|
156
|
+
return [3 /*break*/, 20];
|
|
157
|
+
case 13: return [4 /*yield*/, (0, sveltekit_wizard_1.runSvelteKitWizard)(wizardOptions)];
|
|
158
|
+
case 14:
|
|
159
|
+
_b.sent();
|
|
160
|
+
return [3 /*break*/, 20];
|
|
161
|
+
case 15: return [4 /*yield*/, (0, sourcemaps_wizard_1.runSourcemapsWizard)(wizardOptions)];
|
|
162
|
+
case 16:
|
|
163
|
+
_b.sent();
|
|
164
|
+
return [3 /*break*/, 20];
|
|
165
|
+
case 17:
|
|
166
|
+
argv.integration = 'cordova';
|
|
167
|
+
void (0, Setup_1.run)(argv);
|
|
168
|
+
return [3 /*break*/, 20];
|
|
169
|
+
case 18:
|
|
170
|
+
argv.integration = 'electron';
|
|
171
|
+
void (0, Setup_1.run)(argv);
|
|
172
|
+
return [3 /*break*/, 20];
|
|
173
|
+
case 19:
|
|
174
|
+
clack.log.error("No setup wizard selected!");
|
|
175
|
+
_b.label = 20;
|
|
176
|
+
case 20: return [2 /*return*/];
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
exports.run = run;
|
|
182
|
+
/**
|
|
183
|
+
* TODO: replace with rollup replace whenever we switch to rollup
|
|
184
|
+
*/
|
|
185
|
+
function tryGetWizardVersion() {
|
|
186
|
+
var _a;
|
|
187
|
+
try {
|
|
188
|
+
var wizardPkgJson = require('../package.json');
|
|
189
|
+
return (_a = wizardPkgJson.version) !== null && _a !== void 0 ? _a : '';
|
|
190
|
+
}
|
|
191
|
+
catch (_b) {
|
|
192
|
+
return '';
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=run.js.map
|
|
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pC,yBAAM;yBAGN,qBAAM,IAAA,qCAAkB,EAAC,aAAa,CAAC,EAAA;;oBAAvC,SAAuC,CAAC;oBACxC,yBAAM;yBAGN,qBAAM,IAAA,uCAAmB,EAAC,aAAa,CAAC,EAAA;;oBAAxC,SAAwC,CAAC;oBACzC,yBAAM;;oBAGN,IAAI,CAAC,WAAW,GAAG,SAAS,CAAC;oBAC7B,KAAK,IAAA,WAAS,EAAC,IAAI,CAAC,CAAC;oBACrB,yBAAM;;oBAGN,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;oBAC9B,KAAK,IAAA,WAAS,EAAC,IAAI,CAAC,CAAC;oBACrB,yBAAM;;oBAGN,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;;;;;;CAElD;AAtFD,kBAsFC;AAED;;GAEG;AACH,SAAS,mBAAmB;;IAC1B,IAAI;QACF,IAAM,aAAa,GAAG,OAAO,CAAC,iBAAiB,CAAmB,CAAC;QACnE,OAAO,MAAA,aAAa,CAAC,OAAO,mCAAI,EAAE,CAAC;KACpC;IAAC,WAAM;QACN,OAAO,EAAE,CAAC;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 { 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 { Platform } from '../lib/Constants';\nimport { 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\n url?: string;\n platform?: Platform[];\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: 'NextJS' },\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: !argv.disableTelemetry,\n promoCode: argv.promoCode,\n url: argv.url,\n };\n\n switch (integration) {\n case 'reactNative':\n await runReactNativeWizard({\n ...wizardOptions,\n uninstall: argv.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"]}
|
|
@@ -817,7 +817,7 @@ function askForSelfHosted(urlFromArgs) {
|
|
|
817
817
|
}
|
|
818
818
|
}
|
|
819
819
|
catch (_c) {
|
|
820
|
-
clack.log.error(
|
|
820
|
+
clack.log.error("Please enter a valid URL. (It should look something like \"https://sentry.mydomain.com/\", got ".concat(url, ")"));
|
|
821
821
|
}
|
|
822
822
|
return [3 /*break*/, 3];
|
|
823
823
|
case 6:
|