@capgo/cli 4.11.4 → 4.11.6
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 +9 -0
- package/bun.lockb +0 -0
- package/dist/index.js +53 -1125
- package/package.json +1 -3
- package/src/app/info.ts +3 -4
- package/src/bundle/cleanup.ts +3 -7
- package/src/key.ts +5 -0
package/dist/index.js
CHANGED
|
@@ -10025,10 +10025,10 @@ var require_clear = __commonJS({
|
|
|
10025
10025
|
var erase = _require.erase;
|
|
10026
10026
|
var cursor = _require.cursor;
|
|
10027
10027
|
var width = (str) => [...strip(str)].length;
|
|
10028
|
-
module2.exports = function(
|
|
10028
|
+
module2.exports = function(prompt, perLine) {
|
|
10029
10029
|
if (!perLine) return erase.line + cursor.to(0);
|
|
10030
10030
|
let rows = 0;
|
|
10031
|
-
const lines =
|
|
10031
|
+
const lines = prompt.split(/\r?\n/);
|
|
10032
10032
|
var _iterator = _createForOfIteratorHelper(lines), _step;
|
|
10033
10033
|
try {
|
|
10034
10034
|
for (_iterator.s(); !(_step = _iterator.n()).done; ) {
|
|
@@ -11652,14 +11652,14 @@ Instructions:
|
|
|
11652
11652
|
if (this.closed) return;
|
|
11653
11653
|
if (this.firstRender) this.out.write(cursor.hide);
|
|
11654
11654
|
super.render();
|
|
11655
|
-
let
|
|
11655
|
+
let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
|
|
11656
11656
|
if (this.showMinError) {
|
|
11657
|
-
|
|
11657
|
+
prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
|
|
11658
11658
|
this.showMinError = false;
|
|
11659
11659
|
}
|
|
11660
|
-
|
|
11661
|
-
this.out.write(this.clear +
|
|
11662
|
-
this.clear = clear(
|
|
11660
|
+
prompt += this.renderOptions(this.value);
|
|
11661
|
+
this.out.write(this.clear + prompt);
|
|
11662
|
+
this.clear = clear(prompt, this.out.columns);
|
|
11663
11663
|
}
|
|
11664
11664
|
};
|
|
11665
11665
|
module2.exports = MultiselectPrompt;
|
|
@@ -12066,14 +12066,14 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
|
|
|
12066
12066
|
if (this.closed) return;
|
|
12067
12067
|
if (this.firstRender) this.out.write(cursor.hide);
|
|
12068
12068
|
super.render();
|
|
12069
|
-
let
|
|
12069
|
+
let prompt = [style.symbol(this.done, this.aborted), color.bold(this.msg), style.delimiter(false), this.renderDoneOrInstructions()].join(" ");
|
|
12070
12070
|
if (this.showMinError) {
|
|
12071
|
-
|
|
12071
|
+
prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
|
|
12072
12072
|
this.showMinError = false;
|
|
12073
12073
|
}
|
|
12074
|
-
|
|
12075
|
-
this.out.write(this.clear +
|
|
12076
|
-
this.clear = clear(
|
|
12074
|
+
prompt += this.renderOptions(this.filteredOptions);
|
|
12075
|
+
this.out.write(this.clear + prompt);
|
|
12076
|
+
this.clear = clear(prompt, this.out.columns);
|
|
12077
12077
|
}
|
|
12078
12078
|
};
|
|
12079
12079
|
module2.exports = AutocompleteMultiselectPrompt;
|
|
@@ -12357,7 +12357,7 @@ var require_dist4 = __commonJS({
|
|
|
12357
12357
|
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
12358
12358
|
var noop = () => {
|
|
12359
12359
|
};
|
|
12360
|
-
function
|
|
12360
|
+
function prompt() {
|
|
12361
12361
|
return _prompt.apply(this, arguments);
|
|
12362
12362
|
}
|
|
12363
12363
|
function _prompt() {
|
|
@@ -12366,7 +12366,7 @@ var require_dist4 = __commonJS({
|
|
|
12366
12366
|
onCancel = noop
|
|
12367
12367
|
} = {}) {
|
|
12368
12368
|
const answers = {};
|
|
12369
|
-
const override2 =
|
|
12369
|
+
const override2 = prompt._override || {};
|
|
12370
12370
|
questions = [].concat(questions);
|
|
12371
12371
|
let answer, question, quit, name, type, lastPrompt;
|
|
12372
12372
|
const getFormattedAnswer = /* @__PURE__ */ function() {
|
|
@@ -12415,7 +12415,7 @@ var require_dist4 = __commonJS({
|
|
|
12415
12415
|
}
|
|
12416
12416
|
}
|
|
12417
12417
|
try {
|
|
12418
|
-
answer =
|
|
12418
|
+
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : yield prompts[type](question);
|
|
12419
12419
|
answers[name] = answer = yield getFormattedAnswer(question, answer, true);
|
|
12420
12420
|
quit = yield onSubmit(question, answer, answers);
|
|
12421
12421
|
} catch (err) {
|
|
@@ -12440,13 +12440,13 @@ var require_dist4 = __commonJS({
|
|
|
12440
12440
|
return answer === void 0 ? deafultValue : answer;
|
|
12441
12441
|
}
|
|
12442
12442
|
function inject(answers) {
|
|
12443
|
-
|
|
12443
|
+
prompt._injected = (prompt._injected || []).concat(answers);
|
|
12444
12444
|
}
|
|
12445
12445
|
function override(answers) {
|
|
12446
|
-
|
|
12446
|
+
prompt._override = Object.assign({}, answers);
|
|
12447
12447
|
}
|
|
12448
|
-
module2.exports = Object.assign(
|
|
12449
|
-
prompt
|
|
12448
|
+
module2.exports = Object.assign(prompt, {
|
|
12449
|
+
prompt,
|
|
12450
12450
|
prompts,
|
|
12451
12451
|
inject,
|
|
12452
12452
|
override
|
|
@@ -12513,10 +12513,10 @@ var require_clear2 = __commonJS({
|
|
|
12513
12513
|
var strip = require_strip2();
|
|
12514
12514
|
var { erase, cursor } = require_src();
|
|
12515
12515
|
var width = (str) => [...strip(str)].length;
|
|
12516
|
-
module2.exports = function(
|
|
12516
|
+
module2.exports = function(prompt, perLine) {
|
|
12517
12517
|
if (!perLine) return erase.line + cursor.to(0);
|
|
12518
12518
|
let rows = 0;
|
|
12519
|
-
const lines =
|
|
12519
|
+
const lines = prompt.split(/\r?\n/);
|
|
12520
12520
|
for (let line of lines) {
|
|
12521
12521
|
rows += 1 + Math.floor(Math.max(width(line) - 1, 0) / perLine);
|
|
12522
12522
|
}
|
|
@@ -13975,19 +13975,19 @@ Instructions:
|
|
|
13975
13975
|
if (this.closed) return;
|
|
13976
13976
|
if (this.firstRender) this.out.write(cursor.hide);
|
|
13977
13977
|
super.render();
|
|
13978
|
-
let
|
|
13978
|
+
let prompt = [
|
|
13979
13979
|
style.symbol(this.done, this.aborted),
|
|
13980
13980
|
color.bold(this.msg),
|
|
13981
13981
|
style.delimiter(false),
|
|
13982
13982
|
this.renderDoneOrInstructions()
|
|
13983
13983
|
].join(" ");
|
|
13984
13984
|
if (this.showMinError) {
|
|
13985
|
-
|
|
13985
|
+
prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
|
|
13986
13986
|
this.showMinError = false;
|
|
13987
13987
|
}
|
|
13988
|
-
|
|
13989
|
-
this.out.write(this.clear +
|
|
13990
|
-
this.clear = clear(
|
|
13988
|
+
prompt += this.renderOptions(this.value);
|
|
13989
|
+
this.out.write(this.clear + prompt);
|
|
13990
|
+
this.clear = clear(prompt, this.out.columns);
|
|
13991
13991
|
}
|
|
13992
13992
|
};
|
|
13993
13993
|
module2.exports = MultiselectPrompt;
|
|
@@ -14351,19 +14351,19 @@ Filtered results for: ${this.inputValue ? this.inputValue : color.gray("Enter so
|
|
|
14351
14351
|
if (this.closed) return;
|
|
14352
14352
|
if (this.firstRender) this.out.write(cursor.hide);
|
|
14353
14353
|
super.render();
|
|
14354
|
-
let
|
|
14354
|
+
let prompt = [
|
|
14355
14355
|
style.symbol(this.done, this.aborted),
|
|
14356
14356
|
color.bold(this.msg),
|
|
14357
14357
|
style.delimiter(false),
|
|
14358
14358
|
this.renderDoneOrInstructions()
|
|
14359
14359
|
].join(" ");
|
|
14360
14360
|
if (this.showMinError) {
|
|
14361
|
-
|
|
14361
|
+
prompt += color.red(`You must select a minimum of ${this.minSelected} choices.`);
|
|
14362
14362
|
this.showMinError = false;
|
|
14363
14363
|
}
|
|
14364
|
-
|
|
14365
|
-
this.out.write(this.clear +
|
|
14366
|
-
this.clear = clear(
|
|
14364
|
+
prompt += this.renderOptions(this.filteredOptions);
|
|
14365
|
+
this.out.write(this.clear + prompt);
|
|
14366
|
+
this.clear = clear(prompt, this.out.columns);
|
|
14367
14367
|
}
|
|
14368
14368
|
};
|
|
14369
14369
|
module2.exports = AutocompleteMultiselectPrompt;
|
|
@@ -14534,9 +14534,9 @@ var require_lib2 = __commonJS({
|
|
|
14534
14534
|
var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
|
|
14535
14535
|
var noop = () => {
|
|
14536
14536
|
};
|
|
14537
|
-
async function
|
|
14537
|
+
async function prompt(questions = [], { onSubmit = noop, onCancel = noop } = {}) {
|
|
14538
14538
|
const answers = {};
|
|
14539
|
-
const override2 =
|
|
14539
|
+
const override2 = prompt._override || {};
|
|
14540
14540
|
questions = [].concat(questions);
|
|
14541
14541
|
let answer, question, quit, name, type, lastPrompt;
|
|
14542
14542
|
const getFormattedAnswer = async (question2, answer2, skipValidation = false) => {
|
|
@@ -14573,7 +14573,7 @@ var require_lib2 = __commonJS({
|
|
|
14573
14573
|
}
|
|
14574
14574
|
}
|
|
14575
14575
|
try {
|
|
14576
|
-
answer =
|
|
14576
|
+
answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts[type](question);
|
|
14577
14577
|
answers[name] = answer = await getFormattedAnswer(question, answer, true);
|
|
14578
14578
|
quit = await onSubmit(question, answer, answers);
|
|
14579
14579
|
} catch (err) {
|
|
@@ -14591,12 +14591,12 @@ var require_lib2 = __commonJS({
|
|
|
14591
14591
|
return answer === void 0 ? deafultValue : answer;
|
|
14592
14592
|
}
|
|
14593
14593
|
function inject(answers) {
|
|
14594
|
-
|
|
14594
|
+
prompt._injected = (prompt._injected || []).concat(answers);
|
|
14595
14595
|
}
|
|
14596
14596
|
function override(answers) {
|
|
14597
|
-
|
|
14597
|
+
prompt._override = Object.assign({}, answers);
|
|
14598
14598
|
}
|
|
14599
|
-
module2.exports = Object.assign(
|
|
14599
|
+
module2.exports = Object.assign(prompt, { prompt, prompts, inject, override });
|
|
14600
14600
|
}
|
|
14601
14601
|
});
|
|
14602
14602
|
|
|
@@ -14645,13 +14645,13 @@ var require_log = __commonJS({
|
|
|
14645
14645
|
});
|
|
14646
14646
|
async function logPrompt(msg, promptObject) {
|
|
14647
14647
|
const { wordWrap } = await Promise.resolve().then(() => tslib_1.__importStar(require_dist3()));
|
|
14648
|
-
const { prompt
|
|
14648
|
+
const { prompt } = await Promise.resolve().then(() => tslib_1.__importStar(require_prompts3()));
|
|
14649
14649
|
exports2.logger.log({
|
|
14650
14650
|
msg: `${colors_1.default.input("[?]")} ${wordWrap(msg, { indentation: 4 })}`,
|
|
14651
14651
|
logger: exports2.logger,
|
|
14652
14652
|
format: false
|
|
14653
14653
|
});
|
|
14654
|
-
return
|
|
14654
|
+
return prompt(promptObject, { onCancel: () => process.exit(1) });
|
|
14655
14655
|
}
|
|
14656
14656
|
exports2.logPrompt = logPrompt;
|
|
14657
14657
|
function logSuccess(msg) {
|
|
@@ -24700,9 +24700,9 @@ See the docs for adding the ${colors_1.default.strong(platformName)} platform: $
|
|
|
24700
24700
|
}
|
|
24701
24701
|
exports2.isValidEnterprisePlatform = isValidEnterprisePlatform;
|
|
24702
24702
|
async function promptForPlatform(platforms, promptMessage, selectedPlatformName) {
|
|
24703
|
-
const { prompt
|
|
24703
|
+
const { prompt } = await Promise.resolve().then(() => tslib_1.__importStar(require_prompts3()));
|
|
24704
24704
|
if (!selectedPlatformName) {
|
|
24705
|
-
const answers = await
|
|
24705
|
+
const answers = await prompt([
|
|
24706
24706
|
{
|
|
24707
24707
|
type: "select",
|
|
24708
24708
|
name: "mode",
|
|
@@ -24722,13 +24722,13 @@ Valid platforms include: ${knownPlatforms.join(", ")}`);
|
|
|
24722
24722
|
}
|
|
24723
24723
|
exports2.promptForPlatform = promptForPlatform;
|
|
24724
24724
|
async function promptForPlatformTarget(targets, selectedTarget) {
|
|
24725
|
-
const { prompt
|
|
24725
|
+
const { prompt } = await Promise.resolve().then(() => tslib_1.__importStar(require_prompts3()));
|
|
24726
24726
|
const validTargets = targets.filter((t) => t.id !== void 0);
|
|
24727
24727
|
if (!selectedTarget) {
|
|
24728
24728
|
if (validTargets.length === 1) {
|
|
24729
24729
|
return validTargets[0];
|
|
24730
24730
|
} else {
|
|
24731
|
-
const answers = await
|
|
24731
|
+
const answers = await prompt([
|
|
24732
24732
|
{
|
|
24733
24733
|
type: "select",
|
|
24734
24734
|
name: "target",
|
|
@@ -117806,865 +117806,6 @@ var require_dist_cjs72 = __commonJS({
|
|
|
117806
117806
|
}
|
|
117807
117807
|
});
|
|
117808
117808
|
|
|
117809
|
-
// node_modules/mimic-fn/index.js
|
|
117810
|
-
var require_mimic_fn = __commonJS({
|
|
117811
|
-
"node_modules/mimic-fn/index.js"(exports2, module2) {
|
|
117812
|
-
"use strict";
|
|
117813
|
-
var mimicFn = (to, from) => {
|
|
117814
|
-
for (const prop of Reflect.ownKeys(from)) {
|
|
117815
|
-
Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
|
|
117816
|
-
}
|
|
117817
|
-
return to;
|
|
117818
|
-
};
|
|
117819
|
-
module2.exports = mimicFn;
|
|
117820
|
-
module2.exports.default = mimicFn;
|
|
117821
|
-
}
|
|
117822
|
-
});
|
|
117823
|
-
|
|
117824
|
-
// node_modules/onetime/index.js
|
|
117825
|
-
var require_onetime = __commonJS({
|
|
117826
|
-
"node_modules/onetime/index.js"(exports2, module2) {
|
|
117827
|
-
"use strict";
|
|
117828
|
-
var mimicFn = require_mimic_fn();
|
|
117829
|
-
var calledFunctions = /* @__PURE__ */ new WeakMap();
|
|
117830
|
-
var onetime = (function_, options = {}) => {
|
|
117831
|
-
if (typeof function_ !== "function") {
|
|
117832
|
-
throw new TypeError("Expected a function");
|
|
117833
|
-
}
|
|
117834
|
-
let returnValue;
|
|
117835
|
-
let callCount = 0;
|
|
117836
|
-
const functionName = function_.displayName || function_.name || "<anonymous>";
|
|
117837
|
-
const onetime2 = function(...arguments_) {
|
|
117838
|
-
calledFunctions.set(onetime2, ++callCount);
|
|
117839
|
-
if (callCount === 1) {
|
|
117840
|
-
returnValue = function_.apply(this, arguments_);
|
|
117841
|
-
function_ = null;
|
|
117842
|
-
} else if (options.throw === true) {
|
|
117843
|
-
throw new Error(`Function \`${functionName}\` can only be called once`);
|
|
117844
|
-
}
|
|
117845
|
-
return returnValue;
|
|
117846
|
-
};
|
|
117847
|
-
mimicFn(onetime2, function_);
|
|
117848
|
-
calledFunctions.set(onetime2, callCount);
|
|
117849
|
-
return onetime2;
|
|
117850
|
-
};
|
|
117851
|
-
module2.exports = onetime;
|
|
117852
|
-
module2.exports.default = onetime;
|
|
117853
|
-
module2.exports.callCount = (function_) => {
|
|
117854
|
-
if (!calledFunctions.has(function_)) {
|
|
117855
|
-
throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
|
|
117856
|
-
}
|
|
117857
|
-
return calledFunctions.get(function_);
|
|
117858
|
-
};
|
|
117859
|
-
}
|
|
117860
|
-
});
|
|
117861
|
-
|
|
117862
|
-
// node_modules/restore-cursor/index.js
|
|
117863
|
-
var require_restore_cursor = __commonJS({
|
|
117864
|
-
"node_modules/restore-cursor/index.js"(exports2, module2) {
|
|
117865
|
-
"use strict";
|
|
117866
|
-
var onetime = require_onetime();
|
|
117867
|
-
var signalExit = require_signal_exit();
|
|
117868
|
-
module2.exports = onetime(() => {
|
|
117869
|
-
signalExit(() => {
|
|
117870
|
-
process.stderr.write("\x1B[?25h");
|
|
117871
|
-
}, { alwaysLast: true });
|
|
117872
|
-
});
|
|
117873
|
-
}
|
|
117874
|
-
});
|
|
117875
|
-
|
|
117876
|
-
// node_modules/cli-cursor/index.js
|
|
117877
|
-
var require_cli_cursor = __commonJS({
|
|
117878
|
-
"node_modules/cli-cursor/index.js"(exports2) {
|
|
117879
|
-
"use strict";
|
|
117880
|
-
var restoreCursor = require_restore_cursor();
|
|
117881
|
-
var isHidden = false;
|
|
117882
|
-
exports2.show = (writableStream = process.stderr) => {
|
|
117883
|
-
if (!writableStream.isTTY) {
|
|
117884
|
-
return;
|
|
117885
|
-
}
|
|
117886
|
-
isHidden = false;
|
|
117887
|
-
writableStream.write("\x1B[?25h");
|
|
117888
|
-
};
|
|
117889
|
-
exports2.hide = (writableStream = process.stderr) => {
|
|
117890
|
-
if (!writableStream.isTTY) {
|
|
117891
|
-
return;
|
|
117892
|
-
}
|
|
117893
|
-
restoreCursor();
|
|
117894
|
-
isHidden = true;
|
|
117895
|
-
writableStream.write("\x1B[?25l");
|
|
117896
|
-
};
|
|
117897
|
-
exports2.toggle = (force, writableStream) => {
|
|
117898
|
-
if (force !== void 0) {
|
|
117899
|
-
isHidden = force;
|
|
117900
|
-
}
|
|
117901
|
-
if (isHidden) {
|
|
117902
|
-
exports2.show(writableStream);
|
|
117903
|
-
} else {
|
|
117904
|
-
exports2.hide(writableStream);
|
|
117905
|
-
}
|
|
117906
|
-
};
|
|
117907
|
-
}
|
|
117908
|
-
});
|
|
117909
|
-
|
|
117910
|
-
// node_modules/@trufflesuite/spinnies/spinners.json
|
|
117911
|
-
var require_spinners = __commonJS({
|
|
117912
|
-
"node_modules/@trufflesuite/spinnies/spinners.json"(exports2, module2) {
|
|
117913
|
-
module2.exports = {
|
|
117914
|
-
dots: {
|
|
117915
|
-
interval: 50,
|
|
117916
|
-
frames: ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"]
|
|
117917
|
-
},
|
|
117918
|
-
dashes: {
|
|
117919
|
-
interval: 80,
|
|
117920
|
-
frames: ["-", "_"]
|
|
117921
|
-
}
|
|
117922
|
-
};
|
|
117923
|
-
}
|
|
117924
|
-
});
|
|
117925
|
-
|
|
117926
|
-
// node_modules/chalk/source/util.js
|
|
117927
|
-
var require_util7 = __commonJS({
|
|
117928
|
-
"node_modules/chalk/source/util.js"(exports2, module2) {
|
|
117929
|
-
"use strict";
|
|
117930
|
-
var stringReplaceAll = (string, substring, replacer) => {
|
|
117931
|
-
let index = string.indexOf(substring);
|
|
117932
|
-
if (index === -1) {
|
|
117933
|
-
return string;
|
|
117934
|
-
}
|
|
117935
|
-
const substringLength = substring.length;
|
|
117936
|
-
let endIndex = 0;
|
|
117937
|
-
let returnValue = "";
|
|
117938
|
-
do {
|
|
117939
|
-
returnValue += string.substr(endIndex, index - endIndex) + substring + replacer;
|
|
117940
|
-
endIndex = index + substringLength;
|
|
117941
|
-
index = string.indexOf(substring, endIndex);
|
|
117942
|
-
} while (index !== -1);
|
|
117943
|
-
returnValue += string.substr(endIndex);
|
|
117944
|
-
return returnValue;
|
|
117945
|
-
};
|
|
117946
|
-
var stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {
|
|
117947
|
-
let endIndex = 0;
|
|
117948
|
-
let returnValue = "";
|
|
117949
|
-
do {
|
|
117950
|
-
const gotCR = string[index - 1] === "\r";
|
|
117951
|
-
returnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
117952
|
-
endIndex = index + 1;
|
|
117953
|
-
index = string.indexOf("\n", endIndex);
|
|
117954
|
-
} while (index !== -1);
|
|
117955
|
-
returnValue += string.substr(endIndex);
|
|
117956
|
-
return returnValue;
|
|
117957
|
-
};
|
|
117958
|
-
module2.exports = {
|
|
117959
|
-
stringReplaceAll,
|
|
117960
|
-
stringEncaseCRLFWithFirstIndex
|
|
117961
|
-
};
|
|
117962
|
-
}
|
|
117963
|
-
});
|
|
117964
|
-
|
|
117965
|
-
// node_modules/chalk/source/templates.js
|
|
117966
|
-
var require_templates = __commonJS({
|
|
117967
|
-
"node_modules/chalk/source/templates.js"(exports2, module2) {
|
|
117968
|
-
"use strict";
|
|
117969
|
-
var TEMPLATE_REGEX = /(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi;
|
|
117970
|
-
var STYLE_REGEX = /(?:^|\.)(\w+)(?:\(([^)]*)\))?/g;
|
|
117971
|
-
var STRING_REGEX = /^(['"])((?:\\.|(?!\1)[^\\])*)\1$/;
|
|
117972
|
-
var ESCAPE_REGEX = /\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi;
|
|
117973
|
-
var ESCAPES = /* @__PURE__ */ new Map([
|
|
117974
|
-
["n", "\n"],
|
|
117975
|
-
["r", "\r"],
|
|
117976
|
-
["t", " "],
|
|
117977
|
-
["b", "\b"],
|
|
117978
|
-
["f", "\f"],
|
|
117979
|
-
["v", "\v"],
|
|
117980
|
-
["0", "\0"],
|
|
117981
|
-
["\\", "\\"],
|
|
117982
|
-
["e", "\x1B"],
|
|
117983
|
-
["a", "\x07"]
|
|
117984
|
-
]);
|
|
117985
|
-
function unescape2(c2) {
|
|
117986
|
-
const u = c2[0] === "u";
|
|
117987
|
-
const bracket = c2[1] === "{";
|
|
117988
|
-
if (u && !bracket && c2.length === 5 || c2[0] === "x" && c2.length === 3) {
|
|
117989
|
-
return String.fromCharCode(parseInt(c2.slice(1), 16));
|
|
117990
|
-
}
|
|
117991
|
-
if (u && bracket) {
|
|
117992
|
-
return String.fromCodePoint(parseInt(c2.slice(2, -1), 16));
|
|
117993
|
-
}
|
|
117994
|
-
return ESCAPES.get(c2) || c2;
|
|
117995
|
-
}
|
|
117996
|
-
function parseArguments(name, arguments_) {
|
|
117997
|
-
const results = [];
|
|
117998
|
-
const chunks = arguments_.trim().split(/\s*,\s*/g);
|
|
117999
|
-
let matches;
|
|
118000
|
-
for (const chunk of chunks) {
|
|
118001
|
-
const number = Number(chunk);
|
|
118002
|
-
if (!Number.isNaN(number)) {
|
|
118003
|
-
results.push(number);
|
|
118004
|
-
} else if (matches = chunk.match(STRING_REGEX)) {
|
|
118005
|
-
results.push(matches[2].replace(ESCAPE_REGEX, (m2, escape, character) => escape ? unescape2(escape) : character));
|
|
118006
|
-
} else {
|
|
118007
|
-
throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);
|
|
118008
|
-
}
|
|
118009
|
-
}
|
|
118010
|
-
return results;
|
|
118011
|
-
}
|
|
118012
|
-
function parseStyle(style) {
|
|
118013
|
-
STYLE_REGEX.lastIndex = 0;
|
|
118014
|
-
const results = [];
|
|
118015
|
-
let matches;
|
|
118016
|
-
while ((matches = STYLE_REGEX.exec(style)) !== null) {
|
|
118017
|
-
const name = matches[1];
|
|
118018
|
-
if (matches[2]) {
|
|
118019
|
-
const args = parseArguments(name, matches[2]);
|
|
118020
|
-
results.push([name].concat(args));
|
|
118021
|
-
} else {
|
|
118022
|
-
results.push([name]);
|
|
118023
|
-
}
|
|
118024
|
-
}
|
|
118025
|
-
return results;
|
|
118026
|
-
}
|
|
118027
|
-
function buildStyle(chalk, styles) {
|
|
118028
|
-
const enabled = {};
|
|
118029
|
-
for (const layer of styles) {
|
|
118030
|
-
for (const style of layer.styles) {
|
|
118031
|
-
enabled[style[0]] = layer.inverse ? null : style.slice(1);
|
|
118032
|
-
}
|
|
118033
|
-
}
|
|
118034
|
-
let current = chalk;
|
|
118035
|
-
for (const [styleName, styles2] of Object.entries(enabled)) {
|
|
118036
|
-
if (!Array.isArray(styles2)) {
|
|
118037
|
-
continue;
|
|
118038
|
-
}
|
|
118039
|
-
if (!(styleName in current)) {
|
|
118040
|
-
throw new Error(`Unknown Chalk style: ${styleName}`);
|
|
118041
|
-
}
|
|
118042
|
-
current = styles2.length > 0 ? current[styleName](...styles2) : current[styleName];
|
|
118043
|
-
}
|
|
118044
|
-
return current;
|
|
118045
|
-
}
|
|
118046
|
-
module2.exports = (chalk, temporary) => {
|
|
118047
|
-
const styles = [];
|
|
118048
|
-
const chunks = [];
|
|
118049
|
-
let chunk = [];
|
|
118050
|
-
temporary.replace(TEMPLATE_REGEX, (m2, escapeCharacter, inverse, style, close, character) => {
|
|
118051
|
-
if (escapeCharacter) {
|
|
118052
|
-
chunk.push(unescape2(escapeCharacter));
|
|
118053
|
-
} else if (style) {
|
|
118054
|
-
const string = chunk.join("");
|
|
118055
|
-
chunk = [];
|
|
118056
|
-
chunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));
|
|
118057
|
-
styles.push({ inverse, styles: parseStyle(style) });
|
|
118058
|
-
} else if (close) {
|
|
118059
|
-
if (styles.length === 0) {
|
|
118060
|
-
throw new Error("Found extraneous } in Chalk template literal");
|
|
118061
|
-
}
|
|
118062
|
-
chunks.push(buildStyle(chalk, styles)(chunk.join("")));
|
|
118063
|
-
chunk = [];
|
|
118064
|
-
styles.pop();
|
|
118065
|
-
} else {
|
|
118066
|
-
chunk.push(character);
|
|
118067
|
-
}
|
|
118068
|
-
});
|
|
118069
|
-
chunks.push(chunk.join(""));
|
|
118070
|
-
if (styles.length > 0) {
|
|
118071
|
-
const errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? "" : "s"} (\`}\`)`;
|
|
118072
|
-
throw new Error(errMessage);
|
|
118073
|
-
}
|
|
118074
|
-
return chunks.join("");
|
|
118075
|
-
};
|
|
118076
|
-
}
|
|
118077
|
-
});
|
|
118078
|
-
|
|
118079
|
-
// node_modules/chalk/source/index.js
|
|
118080
|
-
var require_source = __commonJS({
|
|
118081
|
-
"node_modules/chalk/source/index.js"(exports2, module2) {
|
|
118082
|
-
"use strict";
|
|
118083
|
-
var ansiStyles = require_ansi_styles();
|
|
118084
|
-
var { stdout: stdoutColor, stderr: stderrColor } = require_supports_color();
|
|
118085
|
-
var {
|
|
118086
|
-
stringReplaceAll,
|
|
118087
|
-
stringEncaseCRLFWithFirstIndex
|
|
118088
|
-
} = require_util7();
|
|
118089
|
-
var { isArray } = Array;
|
|
118090
|
-
var levelMapping = [
|
|
118091
|
-
"ansi",
|
|
118092
|
-
"ansi",
|
|
118093
|
-
"ansi256",
|
|
118094
|
-
"ansi16m"
|
|
118095
|
-
];
|
|
118096
|
-
var styles = /* @__PURE__ */ Object.create(null);
|
|
118097
|
-
var applyOptions = (object, options = {}) => {
|
|
118098
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
118099
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
118100
|
-
}
|
|
118101
|
-
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
118102
|
-
object.level = options.level === void 0 ? colorLevel : options.level;
|
|
118103
|
-
};
|
|
118104
|
-
var ChalkClass = class {
|
|
118105
|
-
constructor(options) {
|
|
118106
|
-
return chalkFactory(options);
|
|
118107
|
-
}
|
|
118108
|
-
};
|
|
118109
|
-
var chalkFactory = (options) => {
|
|
118110
|
-
const chalk2 = {};
|
|
118111
|
-
applyOptions(chalk2, options);
|
|
118112
|
-
chalk2.template = (...arguments_) => chalkTag(chalk2.template, ...arguments_);
|
|
118113
|
-
Object.setPrototypeOf(chalk2, Chalk.prototype);
|
|
118114
|
-
Object.setPrototypeOf(chalk2.template, chalk2);
|
|
118115
|
-
chalk2.template.constructor = () => {
|
|
118116
|
-
throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
|
|
118117
|
-
};
|
|
118118
|
-
chalk2.template.Instance = ChalkClass;
|
|
118119
|
-
return chalk2.template;
|
|
118120
|
-
};
|
|
118121
|
-
function Chalk(options) {
|
|
118122
|
-
return chalkFactory(options);
|
|
118123
|
-
}
|
|
118124
|
-
for (const [styleName, style] of Object.entries(ansiStyles)) {
|
|
118125
|
-
styles[styleName] = {
|
|
118126
|
-
get() {
|
|
118127
|
-
const builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);
|
|
118128
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
118129
|
-
return builder;
|
|
118130
|
-
}
|
|
118131
|
-
};
|
|
118132
|
-
}
|
|
118133
|
-
styles.visible = {
|
|
118134
|
-
get() {
|
|
118135
|
-
const builder = createBuilder(this, this._styler, true);
|
|
118136
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
118137
|
-
return builder;
|
|
118138
|
-
}
|
|
118139
|
-
};
|
|
118140
|
-
var usedModels = ["rgb", "hex", "keyword", "hsl", "hsv", "hwb", "ansi", "ansi256"];
|
|
118141
|
-
for (const model of usedModels) {
|
|
118142
|
-
styles[model] = {
|
|
118143
|
-
get() {
|
|
118144
|
-
const { level } = this;
|
|
118145
|
-
return function(...arguments_) {
|
|
118146
|
-
const styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);
|
|
118147
|
-
return createBuilder(this, styler, this._isEmpty);
|
|
118148
|
-
};
|
|
118149
|
-
}
|
|
118150
|
-
};
|
|
118151
|
-
}
|
|
118152
|
-
for (const model of usedModels) {
|
|
118153
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
118154
|
-
styles[bgModel] = {
|
|
118155
|
-
get() {
|
|
118156
|
-
const { level } = this;
|
|
118157
|
-
return function(...arguments_) {
|
|
118158
|
-
const styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);
|
|
118159
|
-
return createBuilder(this, styler, this._isEmpty);
|
|
118160
|
-
};
|
|
118161
|
-
}
|
|
118162
|
-
};
|
|
118163
|
-
}
|
|
118164
|
-
var proto = Object.defineProperties(() => {
|
|
118165
|
-
}, {
|
|
118166
|
-
...styles,
|
|
118167
|
-
level: {
|
|
118168
|
-
enumerable: true,
|
|
118169
|
-
get() {
|
|
118170
|
-
return this._generator.level;
|
|
118171
|
-
},
|
|
118172
|
-
set(level) {
|
|
118173
|
-
this._generator.level = level;
|
|
118174
|
-
}
|
|
118175
|
-
}
|
|
118176
|
-
});
|
|
118177
|
-
var createStyler = (open2, close, parent) => {
|
|
118178
|
-
let openAll;
|
|
118179
|
-
let closeAll;
|
|
118180
|
-
if (parent === void 0) {
|
|
118181
|
-
openAll = open2;
|
|
118182
|
-
closeAll = close;
|
|
118183
|
-
} else {
|
|
118184
|
-
openAll = parent.openAll + open2;
|
|
118185
|
-
closeAll = close + parent.closeAll;
|
|
118186
|
-
}
|
|
118187
|
-
return {
|
|
118188
|
-
open: open2,
|
|
118189
|
-
close,
|
|
118190
|
-
openAll,
|
|
118191
|
-
closeAll,
|
|
118192
|
-
parent
|
|
118193
|
-
};
|
|
118194
|
-
};
|
|
118195
|
-
var createBuilder = (self2, _styler, _isEmpty) => {
|
|
118196
|
-
const builder = (...arguments_) => {
|
|
118197
|
-
if (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {
|
|
118198
|
-
return applyStyle(builder, chalkTag(builder, ...arguments_));
|
|
118199
|
-
}
|
|
118200
|
-
return applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
118201
|
-
};
|
|
118202
|
-
Object.setPrototypeOf(builder, proto);
|
|
118203
|
-
builder._generator = self2;
|
|
118204
|
-
builder._styler = _styler;
|
|
118205
|
-
builder._isEmpty = _isEmpty;
|
|
118206
|
-
return builder;
|
|
118207
|
-
};
|
|
118208
|
-
var applyStyle = (self2, string) => {
|
|
118209
|
-
if (self2.level <= 0 || !string) {
|
|
118210
|
-
return self2._isEmpty ? "" : string;
|
|
118211
|
-
}
|
|
118212
|
-
let styler = self2._styler;
|
|
118213
|
-
if (styler === void 0) {
|
|
118214
|
-
return string;
|
|
118215
|
-
}
|
|
118216
|
-
const { openAll, closeAll } = styler;
|
|
118217
|
-
if (string.indexOf("\x1B") !== -1) {
|
|
118218
|
-
while (styler !== void 0) {
|
|
118219
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
118220
|
-
styler = styler.parent;
|
|
118221
|
-
}
|
|
118222
|
-
}
|
|
118223
|
-
const lfIndex = string.indexOf("\n");
|
|
118224
|
-
if (lfIndex !== -1) {
|
|
118225
|
-
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
118226
|
-
}
|
|
118227
|
-
return openAll + string + closeAll;
|
|
118228
|
-
};
|
|
118229
|
-
var template;
|
|
118230
|
-
var chalkTag = (chalk2, ...strings) => {
|
|
118231
|
-
const [firstString] = strings;
|
|
118232
|
-
if (!isArray(firstString) || !isArray(firstString.raw)) {
|
|
118233
|
-
return strings.join(" ");
|
|
118234
|
-
}
|
|
118235
|
-
const arguments_ = strings.slice(1);
|
|
118236
|
-
const parts = [firstString.raw[0]];
|
|
118237
|
-
for (let i = 1; i < firstString.length; i++) {
|
|
118238
|
-
parts.push(
|
|
118239
|
-
String(arguments_[i - 1]).replace(/[{}\\]/g, "\\$&"),
|
|
118240
|
-
String(firstString.raw[i])
|
|
118241
|
-
);
|
|
118242
|
-
}
|
|
118243
|
-
if (template === void 0) {
|
|
118244
|
-
template = require_templates();
|
|
118245
|
-
}
|
|
118246
|
-
return template(chalk2, parts.join(""));
|
|
118247
|
-
};
|
|
118248
|
-
Object.defineProperties(Chalk.prototype, styles);
|
|
118249
|
-
var chalk = Chalk();
|
|
118250
|
-
chalk.supportsColor = stdoutColor;
|
|
118251
|
-
chalk.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
118252
|
-
chalk.stderr.supportsColor = stderrColor;
|
|
118253
|
-
module2.exports = chalk;
|
|
118254
|
-
}
|
|
118255
|
-
});
|
|
118256
|
-
|
|
118257
|
-
// node_modules/@trufflesuite/spinnies/utils.js
|
|
118258
|
-
var require_utils13 = __commonJS({
|
|
118259
|
-
"node_modules/@trufflesuite/spinnies/utils.js"(exports2, module2) {
|
|
118260
|
-
"use strict";
|
|
118261
|
-
var readline = require("readline");
|
|
118262
|
-
var stripAnsi = require_strip_ansi();
|
|
118263
|
-
var { dashes, dots } = require_spinners();
|
|
118264
|
-
var chalk = require_source();
|
|
118265
|
-
var VALID_STATUSES = ["succeed", "fail", "warn", "spinning", "non-spinnable", "stopped"];
|
|
118266
|
-
var VALID_COLORS = [
|
|
118267
|
-
"black",
|
|
118268
|
-
"red",
|
|
118269
|
-
"green",
|
|
118270
|
-
"yellow",
|
|
118271
|
-
"blue",
|
|
118272
|
-
"magenta",
|
|
118273
|
-
"cyan",
|
|
118274
|
-
"white",
|
|
118275
|
-
"gray",
|
|
118276
|
-
"grey",
|
|
118277
|
-
"blackBright",
|
|
118278
|
-
"redBright",
|
|
118279
|
-
"greenBright",
|
|
118280
|
-
"yellowBright",
|
|
118281
|
-
"blueBright",
|
|
118282
|
-
"magentaBright",
|
|
118283
|
-
"cyanBright",
|
|
118284
|
-
"whiteBright",
|
|
118285
|
-
"bgBlack",
|
|
118286
|
-
"bgRed",
|
|
118287
|
-
"bgGreen",
|
|
118288
|
-
"bgYellow",
|
|
118289
|
-
"bgBlue",
|
|
118290
|
-
"bgMagenta",
|
|
118291
|
-
"bgCyan",
|
|
118292
|
-
"bgWhite",
|
|
118293
|
-
"bgGray",
|
|
118294
|
-
"bgGrey",
|
|
118295
|
-
"bgBlackBright",
|
|
118296
|
-
"bgRedBright",
|
|
118297
|
-
"bgGreenBright",
|
|
118298
|
-
"bgYellowBright",
|
|
118299
|
-
"bgBlueBright",
|
|
118300
|
-
"bgMagentaBright",
|
|
118301
|
-
"bgCyanBright",
|
|
118302
|
-
"bgWhiteBright",
|
|
118303
|
-
// the only non-chalk color - we handle this separately as a special placholder for default terminal foreground color
|
|
118304
|
-
"none"
|
|
118305
|
-
];
|
|
118306
|
-
function purgeSpinnerOptions(options) {
|
|
118307
|
-
const { text, status, indent } = options;
|
|
118308
|
-
const opts = { text, status, indent };
|
|
118309
|
-
const colors = colorOptions(options);
|
|
118310
|
-
const prefixes = prefixOptions(options);
|
|
118311
|
-
if (!VALID_STATUSES.includes(status)) delete opts.status;
|
|
118312
|
-
if (typeof text !== "string") delete opts.text;
|
|
118313
|
-
if (typeof indent !== "number") delete opts.indent;
|
|
118314
|
-
return { ...colors, ...prefixes, ...opts };
|
|
118315
|
-
}
|
|
118316
|
-
function purgeSpinnersOptions({ spinner, disableSpins, ...others }) {
|
|
118317
|
-
const colors = colorOptions(others);
|
|
118318
|
-
const prefixes = prefixOptions(others);
|
|
118319
|
-
const disableSpinsOption = typeof disableSpins === "boolean" ? { disableSpins } : {};
|
|
118320
|
-
spinner = turnToValidSpinner(spinner);
|
|
118321
|
-
return { ...colors, ...prefixes, ...disableSpinsOption, spinner };
|
|
118322
|
-
}
|
|
118323
|
-
function turnToValidSpinner(spinner = {}) {
|
|
118324
|
-
const platformSpinner = terminalSupportsUnicode() ? dots : dashes;
|
|
118325
|
-
if (false === "object") return platformSpinner;
|
|
118326
|
-
let { interval, frames } = spinner;
|
|
118327
|
-
if (!Array.isArray(frames) || frames.length < 1) frames = platformSpinner.frames;
|
|
118328
|
-
if (typeof interval !== "number") interval = platformSpinner.interval;
|
|
118329
|
-
return { interval, frames };
|
|
118330
|
-
}
|
|
118331
|
-
function colorOptions({ textColor, prefixColor }) {
|
|
118332
|
-
const colors = { textColor, prefixColor };
|
|
118333
|
-
Object.keys(colors).forEach((key2) => {
|
|
118334
|
-
if (!VALID_COLORS.includes(colors[key2])) delete colors[key2];
|
|
118335
|
-
});
|
|
118336
|
-
return colors;
|
|
118337
|
-
}
|
|
118338
|
-
function prefixOptions({ succeedPrefix, failPrefix, warnPrefix, stoppedPrefix }) {
|
|
118339
|
-
if (terminalSupportsUnicode()) {
|
|
118340
|
-
succeedPrefix = succeedPrefix || "\u2713";
|
|
118341
|
-
failPrefix = failPrefix || "\u2716";
|
|
118342
|
-
warnPrefix = warnPrefix || "\u26A0";
|
|
118343
|
-
} else {
|
|
118344
|
-
succeedPrefix = succeedPrefix || "\u221A";
|
|
118345
|
-
failPrefix = failPrefix || "\xD7";
|
|
118346
|
-
warnPrefix = warnPrefix || "~";
|
|
118347
|
-
}
|
|
118348
|
-
stoppedPrefix = stoppedPrefix || "";
|
|
118349
|
-
return { succeedPrefix, failPrefix, warnPrefix, stoppedPrefix };
|
|
118350
|
-
}
|
|
118351
|
-
function breakText(text, prefixLength) {
|
|
118352
|
-
return text.split("\n").map((line, index) => index === 0 ? breakLine(line, prefixLength) : breakLine(line, 0)).join("\n");
|
|
118353
|
-
}
|
|
118354
|
-
function breakLine(line, prefixLength) {
|
|
118355
|
-
const columns = process.stderr.columns || 95;
|
|
118356
|
-
return line.length >= columns - prefixLength ? `${line.substring(0, columns - prefixLength - 1)}
|
|
118357
|
-
${breakLine(line.substring(columns - prefixLength - 1, line.length), 0)}` : line;
|
|
118358
|
-
}
|
|
118359
|
-
function getLinesLength(text, prefixLength) {
|
|
118360
|
-
return stripAnsi(text).split("\n").map((line, index) => index === 0 ? line.length + prefixLength : line.length);
|
|
118361
|
-
}
|
|
118362
|
-
function writeStream(stream, output, rawLines) {
|
|
118363
|
-
stream.write(output);
|
|
118364
|
-
readline.moveCursor(stream, 0, -rawLines.length);
|
|
118365
|
-
}
|
|
118366
|
-
function cleanStream(stream, rawLines) {
|
|
118367
|
-
rawLines.forEach((lineLength, index) => {
|
|
118368
|
-
readline.moveCursor(stream, lineLength, index);
|
|
118369
|
-
readline.clearLine(stream, 1);
|
|
118370
|
-
readline.moveCursor(stream, -lineLength, -index);
|
|
118371
|
-
});
|
|
118372
|
-
readline.moveCursor(stream, 0, rawLines.length);
|
|
118373
|
-
readline.clearScreenDown(stream);
|
|
118374
|
-
readline.moveCursor(stream, 0, -rawLines.length);
|
|
118375
|
-
}
|
|
118376
|
-
function terminalSupportsUnicode() {
|
|
118377
|
-
return process.platform !== "win32" || process.env.TERM_PROGRAM === "vscode" || !!process.env.WT_SESSION;
|
|
118378
|
-
}
|
|
118379
|
-
function applyColor(color, text) {
|
|
118380
|
-
if (color && color !== "none") {
|
|
118381
|
-
return chalk[color](text);
|
|
118382
|
-
}
|
|
118383
|
-
return text;
|
|
118384
|
-
}
|
|
118385
|
-
module2.exports = {
|
|
118386
|
-
purgeSpinnersOptions,
|
|
118387
|
-
purgeSpinnerOptions,
|
|
118388
|
-
colorOptions,
|
|
118389
|
-
prefixOptions,
|
|
118390
|
-
breakText,
|
|
118391
|
-
getLinesLength,
|
|
118392
|
-
writeStream,
|
|
118393
|
-
cleanStream,
|
|
118394
|
-
terminalSupportsUnicode,
|
|
118395
|
-
applyColor
|
|
118396
|
-
};
|
|
118397
|
-
}
|
|
118398
|
-
});
|
|
118399
|
-
|
|
118400
|
-
// node_modules/@trufflesuite/spinnies/index.js
|
|
118401
|
-
var require_spinnies = __commonJS({
|
|
118402
|
-
"node_modules/@trufflesuite/spinnies/index.js"(exports2, module2) {
|
|
118403
|
-
"use strict";
|
|
118404
|
-
var readline = require("readline");
|
|
118405
|
-
var cliCursor = require_cli_cursor();
|
|
118406
|
-
var { dashes, dots } = require_spinners();
|
|
118407
|
-
var { purgeSpinnerOptions, purgeSpinnersOptions, colorOptions, prefixOptions, breakText, getLinesLength, terminalSupportsUnicode, applyColor } = require_utils13();
|
|
118408
|
-
var { isValidStatus, writeStream, cleanStream } = require_utils13();
|
|
118409
|
-
var Spinnies2 = class {
|
|
118410
|
-
constructor(options = {}) {
|
|
118411
|
-
options = purgeSpinnersOptions(options);
|
|
118412
|
-
this.options = {
|
|
118413
|
-
prefixColor: "none",
|
|
118414
|
-
textColor: "none",
|
|
118415
|
-
spinner: terminalSupportsUnicode() ? dots : dashes,
|
|
118416
|
-
disableSpins: false,
|
|
118417
|
-
...options
|
|
118418
|
-
};
|
|
118419
|
-
this.spinners = {};
|
|
118420
|
-
this.isCursorHidden = false;
|
|
118421
|
-
this.currentInterval = null;
|
|
118422
|
-
this.stream = process.stderr;
|
|
118423
|
-
this.lineCount = 0;
|
|
118424
|
-
this.currentFrameIndex = 0;
|
|
118425
|
-
this.spin = !this.options.disableSpins && !process.env.CI && process.stderr && process.stderr.isTTY;
|
|
118426
|
-
this.bindSigint();
|
|
118427
|
-
}
|
|
118428
|
-
pick(name) {
|
|
118429
|
-
return this.spinners[name];
|
|
118430
|
-
}
|
|
118431
|
-
add(name, options = {}) {
|
|
118432
|
-
if (typeof name !== "string") {
|
|
118433
|
-
throw Error("A spinner reference name must be specified");
|
|
118434
|
-
}
|
|
118435
|
-
if (typeof options === "string") {
|
|
118436
|
-
options = { text: options };
|
|
118437
|
-
}
|
|
118438
|
-
if (!options.text) {
|
|
118439
|
-
options.text = name;
|
|
118440
|
-
}
|
|
118441
|
-
const spinnerProperties = {
|
|
118442
|
-
...colorOptions(this.options),
|
|
118443
|
-
...prefixOptions(this.options),
|
|
118444
|
-
status: "spinning",
|
|
118445
|
-
...purgeSpinnerOptions(options)
|
|
118446
|
-
};
|
|
118447
|
-
this.spinners[name] = spinnerProperties;
|
|
118448
|
-
this.updateSpinnerState();
|
|
118449
|
-
return spinnerProperties;
|
|
118450
|
-
}
|
|
118451
|
-
update(name, options = {}) {
|
|
118452
|
-
if (typeof options === "string") {
|
|
118453
|
-
options = { text: options };
|
|
118454
|
-
}
|
|
118455
|
-
const { status } = options;
|
|
118456
|
-
this.setSpinnerProperties(name, options, status);
|
|
118457
|
-
this.updateSpinnerState();
|
|
118458
|
-
return this.spinners[name];
|
|
118459
|
-
}
|
|
118460
|
-
succeed(name, options) {
|
|
118461
|
-
if (typeof options === "string") {
|
|
118462
|
-
options = {
|
|
118463
|
-
text: options,
|
|
118464
|
-
prefixColor: "green",
|
|
118465
|
-
textColor: "none"
|
|
118466
|
-
};
|
|
118467
|
-
}
|
|
118468
|
-
if (!options) {
|
|
118469
|
-
options = {
|
|
118470
|
-
prefixColor: "green",
|
|
118471
|
-
textColor: "none"
|
|
118472
|
-
};
|
|
118473
|
-
}
|
|
118474
|
-
this.setSpinnerProperties(name, options, "succeed");
|
|
118475
|
-
this.updateSpinnerState();
|
|
118476
|
-
return this.spinners[name];
|
|
118477
|
-
}
|
|
118478
|
-
fail(name, options) {
|
|
118479
|
-
if (typeof options === "string") {
|
|
118480
|
-
options = {
|
|
118481
|
-
text: options,
|
|
118482
|
-
prefixColor: "red",
|
|
118483
|
-
textColor: "none"
|
|
118484
|
-
};
|
|
118485
|
-
}
|
|
118486
|
-
if (!options) {
|
|
118487
|
-
options = {
|
|
118488
|
-
prefixColor: "red",
|
|
118489
|
-
textColor: "none"
|
|
118490
|
-
};
|
|
118491
|
-
}
|
|
118492
|
-
this.setSpinnerProperties(name, options, "fail");
|
|
118493
|
-
this.updateSpinnerState();
|
|
118494
|
-
return this.spinners[name];
|
|
118495
|
-
}
|
|
118496
|
-
warn(name, options) {
|
|
118497
|
-
if (typeof options === "string") {
|
|
118498
|
-
options = {
|
|
118499
|
-
text: options,
|
|
118500
|
-
prefixColor: "yellow",
|
|
118501
|
-
textColor: "none"
|
|
118502
|
-
};
|
|
118503
|
-
}
|
|
118504
|
-
if (!options) {
|
|
118505
|
-
options = {
|
|
118506
|
-
prefixColor: "yellow",
|
|
118507
|
-
textColor: "none"
|
|
118508
|
-
};
|
|
118509
|
-
}
|
|
118510
|
-
this.setSpinnerProperties(name, options, "warn");
|
|
118511
|
-
this.updateSpinnerState();
|
|
118512
|
-
return this.spinners[name];
|
|
118513
|
-
}
|
|
118514
|
-
stop(name, options = {}) {
|
|
118515
|
-
if (typeof options === "string") {
|
|
118516
|
-
options = {
|
|
118517
|
-
text: options,
|
|
118518
|
-
prefixColor: "red",
|
|
118519
|
-
textColor: "none"
|
|
118520
|
-
};
|
|
118521
|
-
}
|
|
118522
|
-
this.setSpinnerProperties(name, options, "stopped");
|
|
118523
|
-
this.updateSpinnerState();
|
|
118524
|
-
return this.spinners[name];
|
|
118525
|
-
}
|
|
118526
|
-
remove(name) {
|
|
118527
|
-
if (typeof name !== "string") throw Error("A spinner reference name must be specified");
|
|
118528
|
-
const spinner = this.spinners[name];
|
|
118529
|
-
delete this.spinners[name];
|
|
118530
|
-
return spinner;
|
|
118531
|
-
}
|
|
118532
|
-
stopAll(newStatus = "stopped") {
|
|
118533
|
-
Object.keys(this.spinners).forEach((name) => {
|
|
118534
|
-
const { status: currentStatus } = this.spinners[name];
|
|
118535
|
-
const options = this.spinners[name];
|
|
118536
|
-
if (!["fail", "succeed", "warn", "non-spinnable"].includes(currentStatus)) {
|
|
118537
|
-
if (!["succeed", "fail", "warn"].includes(newStatus)) {
|
|
118538
|
-
newStatus = "stopped";
|
|
118539
|
-
}
|
|
118540
|
-
switch (newStatus) {
|
|
118541
|
-
case "fail":
|
|
118542
|
-
options.prefixColor = "red";
|
|
118543
|
-
options.textColor = "none";
|
|
118544
|
-
break;
|
|
118545
|
-
case "succeed":
|
|
118546
|
-
options.prefixColor = "green";
|
|
118547
|
-
options.textColor = "none";
|
|
118548
|
-
break;
|
|
118549
|
-
case "warn":
|
|
118550
|
-
options.prefixColor = "yellow";
|
|
118551
|
-
options.textColor = "none";
|
|
118552
|
-
break;
|
|
118553
|
-
default:
|
|
118554
|
-
options.textColor = "none";
|
|
118555
|
-
}
|
|
118556
|
-
options.status = newStatus;
|
|
118557
|
-
}
|
|
118558
|
-
});
|
|
118559
|
-
this.checkIfActiveSpinners();
|
|
118560
|
-
return this.spinners;
|
|
118561
|
-
}
|
|
118562
|
-
hasActiveSpinners() {
|
|
118563
|
-
return !!Object.values(this.spinners).find(({ status }) => status === "spinning");
|
|
118564
|
-
}
|
|
118565
|
-
setSpinnerProperties(name, options, status) {
|
|
118566
|
-
if (typeof name !== "string") throw Error("A spinner reference name must be specified");
|
|
118567
|
-
if (!this.spinners[name]) throw Error(`No spinner initialized with name ${name}`);
|
|
118568
|
-
options = purgeSpinnerOptions(options);
|
|
118569
|
-
status = status || "spinning";
|
|
118570
|
-
this.spinners[name] = { ...this.spinners[name], ...options, status };
|
|
118571
|
-
}
|
|
118572
|
-
updateSpinnerState(name, options = {}, status) {
|
|
118573
|
-
if (this.spin) {
|
|
118574
|
-
clearInterval(this.currentInterval);
|
|
118575
|
-
this.currentInterval = this.loopStream();
|
|
118576
|
-
if (!this.isCursorHidden) cliCursor.hide();
|
|
118577
|
-
this.isCursorHidden = true;
|
|
118578
|
-
this.checkIfActiveSpinners();
|
|
118579
|
-
} else {
|
|
118580
|
-
this.setRawStreamOutput();
|
|
118581
|
-
}
|
|
118582
|
-
}
|
|
118583
|
-
loopStream() {
|
|
118584
|
-
const { frames, interval } = this.options.spinner;
|
|
118585
|
-
return setInterval(() => {
|
|
118586
|
-
this.setStreamOutput(frames[this.currentFrameIndex]);
|
|
118587
|
-
this.currentFrameIndex = this.currentFrameIndex === frames.length - 1 ? 0 : ++this.currentFrameIndex;
|
|
118588
|
-
this.checkIfActiveSpinners();
|
|
118589
|
-
}, interval);
|
|
118590
|
-
}
|
|
118591
|
-
setStreamOutput(frame = "") {
|
|
118592
|
-
let output = "";
|
|
118593
|
-
const linesLength = [];
|
|
118594
|
-
const hasActiveSpinners = this.hasActiveSpinners();
|
|
118595
|
-
Object.values(this.spinners).map(({ text, status, textColor, prefixColor, succeedPrefix, failPrefix, warnPrefix, stoppedPrefix, indent }) => {
|
|
118596
|
-
let line;
|
|
118597
|
-
let prefixLength = indent || 0;
|
|
118598
|
-
let prefix = "";
|
|
118599
|
-
switch (status) {
|
|
118600
|
-
case "spinning":
|
|
118601
|
-
prefixLength += frame.length + 1;
|
|
118602
|
-
prefix = `${frame} `;
|
|
118603
|
-
break;
|
|
118604
|
-
case "succeed":
|
|
118605
|
-
prefixLength += succeedPrefix.length + 1;
|
|
118606
|
-
prefix = `${succeedPrefix} `;
|
|
118607
|
-
break;
|
|
118608
|
-
case "fail":
|
|
118609
|
-
prefixLength += failPrefix.length + 1;
|
|
118610
|
-
prefix = `${failPrefix} `;
|
|
118611
|
-
break;
|
|
118612
|
-
case "warn":
|
|
118613
|
-
prefixLength += warnPrefix.length + 1;
|
|
118614
|
-
prefix = `${warnPrefix} `;
|
|
118615
|
-
break;
|
|
118616
|
-
default:
|
|
118617
|
-
prefixLength += stoppedPrefix ? stoppedPrefix.length + 1 : 0;
|
|
118618
|
-
prefix = stoppedPrefix ? `${stoppedPrefix} ` : "";
|
|
118619
|
-
break;
|
|
118620
|
-
}
|
|
118621
|
-
if (status === "spinning" || hasActiveSpinners) {
|
|
118622
|
-
text = breakText(text, prefixLength);
|
|
118623
|
-
}
|
|
118624
|
-
line = `${applyColor(prefixColor, prefix)}${applyColor(textColor, text)}`;
|
|
118625
|
-
linesLength.push(...getLinesLength(text, prefixLength));
|
|
118626
|
-
output += indent ? `${" ".repeat(indent)}${line}
|
|
118627
|
-
` : `${line}
|
|
118628
|
-
`;
|
|
118629
|
-
});
|
|
118630
|
-
if (!hasActiveSpinners) readline.clearScreenDown(this.stream);
|
|
118631
|
-
writeStream(this.stream, output, linesLength);
|
|
118632
|
-
if (hasActiveSpinners) cleanStream(this.stream, linesLength);
|
|
118633
|
-
this.lineCount = linesLength.length;
|
|
118634
|
-
}
|
|
118635
|
-
setRawStreamOutput() {
|
|
118636
|
-
Object.values(this.spinners).forEach((i) => {
|
|
118637
|
-
process.stderr.write(`- ${i.text}
|
|
118638
|
-
`);
|
|
118639
|
-
});
|
|
118640
|
-
}
|
|
118641
|
-
checkIfActiveSpinners() {
|
|
118642
|
-
if (!this.hasActiveSpinners()) {
|
|
118643
|
-
if (this.spin) {
|
|
118644
|
-
this.setStreamOutput();
|
|
118645
|
-
readline.moveCursor(this.stream, 0, this.lineCount);
|
|
118646
|
-
clearInterval(this.currentInterval);
|
|
118647
|
-
this.isCursorHidden = false;
|
|
118648
|
-
cliCursor.show();
|
|
118649
|
-
}
|
|
118650
|
-
this.spinners = {};
|
|
118651
|
-
}
|
|
118652
|
-
}
|
|
118653
|
-
bindSigint(lines) {
|
|
118654
|
-
process.removeAllListeners("SIGINT");
|
|
118655
|
-
process.on("SIGINT", () => {
|
|
118656
|
-
cliCursor.show();
|
|
118657
|
-
readline.moveCursor(process.stderr, 0, this.lineCount);
|
|
118658
|
-
process.exit(0);
|
|
118659
|
-
});
|
|
118660
|
-
}
|
|
118661
|
-
};
|
|
118662
|
-
module2.exports = Spinnies2;
|
|
118663
|
-
module2.exports.dots = dots;
|
|
118664
|
-
module2.exports.dashes = dashes;
|
|
118665
|
-
}
|
|
118666
|
-
});
|
|
118667
|
-
|
|
118668
117809
|
// node_modules/semver/preload.js
|
|
118669
117810
|
var require_preload = __commonJS({
|
|
118670
117811
|
"node_modules/semver/preload.js"(exports2, module2) {
|
|
@@ -118672,217 +117813,6 @@ var require_preload = __commonJS({
|
|
|
118672
117813
|
}
|
|
118673
117814
|
});
|
|
118674
117815
|
|
|
118675
|
-
// node_modules/prompt-sync/node_modules/strip-ansi/node_modules/ansi-regex/index.js
|
|
118676
|
-
var require_ansi_regex2 = __commonJS({
|
|
118677
|
-
"node_modules/prompt-sync/node_modules/strip-ansi/node_modules/ansi-regex/index.js"(exports2, module2) {
|
|
118678
|
-
"use strict";
|
|
118679
|
-
module2.exports = (options) => {
|
|
118680
|
-
options = Object.assign({
|
|
118681
|
-
onlyFirst: false
|
|
118682
|
-
}, options);
|
|
118683
|
-
const pattern = [
|
|
118684
|
-
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
118685
|
-
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"
|
|
118686
|
-
].join("|");
|
|
118687
|
-
return new RegExp(pattern, options.onlyFirst ? void 0 : "g");
|
|
118688
|
-
};
|
|
118689
|
-
}
|
|
118690
|
-
});
|
|
118691
|
-
|
|
118692
|
-
// node_modules/prompt-sync/node_modules/strip-ansi/index.js
|
|
118693
|
-
var require_strip_ansi2 = __commonJS({
|
|
118694
|
-
"node_modules/prompt-sync/node_modules/strip-ansi/index.js"(exports2, module2) {
|
|
118695
|
-
"use strict";
|
|
118696
|
-
var ansiRegex = require_ansi_regex2();
|
|
118697
|
-
var stripAnsi = (string) => typeof string === "string" ? string.replace(ansiRegex(), "") : string;
|
|
118698
|
-
module2.exports = stripAnsi;
|
|
118699
|
-
module2.exports.default = stripAnsi;
|
|
118700
|
-
}
|
|
118701
|
-
});
|
|
118702
|
-
|
|
118703
|
-
// node_modules/prompt-sync/index.js
|
|
118704
|
-
var require_prompt_sync = __commonJS({
|
|
118705
|
-
"node_modules/prompt-sync/index.js"(exports2, module2) {
|
|
118706
|
-
"use strict";
|
|
118707
|
-
var fs6 = require("fs");
|
|
118708
|
-
var stripAnsi = require_strip_ansi2();
|
|
118709
|
-
var term = 13;
|
|
118710
|
-
function create(config) {
|
|
118711
|
-
config = config || {};
|
|
118712
|
-
var sigint = config.sigint;
|
|
118713
|
-
var eot = config.eot;
|
|
118714
|
-
var autocomplete = config.autocomplete = config.autocomplete || function() {
|
|
118715
|
-
return [];
|
|
118716
|
-
};
|
|
118717
|
-
var history = config.history;
|
|
118718
|
-
prompt2.history = history || { save: function() {
|
|
118719
|
-
} };
|
|
118720
|
-
prompt2.hide = function(ask) {
|
|
118721
|
-
return prompt2(ask, { echo: "" });
|
|
118722
|
-
};
|
|
118723
|
-
return prompt2;
|
|
118724
|
-
function prompt2(ask, value, opts) {
|
|
118725
|
-
var insert = 0, savedinsert = 0, res, i, savedstr;
|
|
118726
|
-
opts = opts || {};
|
|
118727
|
-
if (Object(ask) === ask) {
|
|
118728
|
-
opts = ask;
|
|
118729
|
-
ask = opts.ask;
|
|
118730
|
-
} else if (Object(value) === value) {
|
|
118731
|
-
opts = value;
|
|
118732
|
-
value = opts.value;
|
|
118733
|
-
}
|
|
118734
|
-
ask = ask || "";
|
|
118735
|
-
var echo = opts.echo;
|
|
118736
|
-
var masked = "echo" in opts;
|
|
118737
|
-
autocomplete = opts.autocomplete || autocomplete;
|
|
118738
|
-
var fd = process.platform === "win32" ? process.stdin.fd : fs6.openSync("/dev/tty", "rs");
|
|
118739
|
-
var wasRaw = process.stdin.isRaw;
|
|
118740
|
-
if (!wasRaw) {
|
|
118741
|
-
process.stdin.setRawMode && process.stdin.setRawMode(true);
|
|
118742
|
-
}
|
|
118743
|
-
var buf = Buffer.alloc(3);
|
|
118744
|
-
var str = "", character, read;
|
|
118745
|
-
savedstr = "";
|
|
118746
|
-
if (ask) {
|
|
118747
|
-
process.stdout.write(ask);
|
|
118748
|
-
}
|
|
118749
|
-
var cycle = 0;
|
|
118750
|
-
var prevComplete;
|
|
118751
|
-
while (true) {
|
|
118752
|
-
read = fs6.readSync(fd, buf, 0, 3);
|
|
118753
|
-
if (read > 1) {
|
|
118754
|
-
switch (buf.toString()) {
|
|
118755
|
-
case "\x1B[A":
|
|
118756
|
-
if (masked) break;
|
|
118757
|
-
if (!history) break;
|
|
118758
|
-
if (history.atStart()) break;
|
|
118759
|
-
if (history.atEnd()) {
|
|
118760
|
-
savedstr = str;
|
|
118761
|
-
savedinsert = insert;
|
|
118762
|
-
}
|
|
118763
|
-
str = history.prev();
|
|
118764
|
-
insert = str.length;
|
|
118765
|
-
process.stdout.write("\x1B[2K\x1B[0G" + ask + str);
|
|
118766
|
-
break;
|
|
118767
|
-
case "\x1B[B":
|
|
118768
|
-
if (masked) break;
|
|
118769
|
-
if (!history) break;
|
|
118770
|
-
if (history.pastEnd()) break;
|
|
118771
|
-
if (history.atPenultimate()) {
|
|
118772
|
-
str = savedstr;
|
|
118773
|
-
insert = savedinsert;
|
|
118774
|
-
history.next();
|
|
118775
|
-
} else {
|
|
118776
|
-
str = history.next();
|
|
118777
|
-
insert = str.length;
|
|
118778
|
-
}
|
|
118779
|
-
process.stdout.write("\x1B[2K\x1B[0G" + ask + str + "\x1B[" + (insert + ask.length + 1) + "G");
|
|
118780
|
-
break;
|
|
118781
|
-
case "\x1B[D":
|
|
118782
|
-
if (masked) break;
|
|
118783
|
-
var before = insert;
|
|
118784
|
-
insert = --insert < 0 ? 0 : insert;
|
|
118785
|
-
if (before - insert)
|
|
118786
|
-
process.stdout.write("\x1B[1D");
|
|
118787
|
-
break;
|
|
118788
|
-
case "\x1B[C":
|
|
118789
|
-
if (masked) break;
|
|
118790
|
-
insert = ++insert > str.length ? str.length : insert;
|
|
118791
|
-
process.stdout.write("\x1B[" + (insert + ask.length + 1) + "G");
|
|
118792
|
-
break;
|
|
118793
|
-
default:
|
|
118794
|
-
if (buf.toString()) {
|
|
118795
|
-
str = str + buf.toString();
|
|
118796
|
-
str = str.replace(/\0/g, "");
|
|
118797
|
-
insert = str.length;
|
|
118798
|
-
promptPrint(masked, ask, echo, str, insert);
|
|
118799
|
-
process.stdout.write("\x1B[" + (insert + ask.length + 1) + "G");
|
|
118800
|
-
buf = Buffer.alloc(3);
|
|
118801
|
-
}
|
|
118802
|
-
}
|
|
118803
|
-
continue;
|
|
118804
|
-
}
|
|
118805
|
-
character = buf[read - 1];
|
|
118806
|
-
if (character == 3) {
|
|
118807
|
-
process.stdout.write("^C\n");
|
|
118808
|
-
fs6.closeSync(fd);
|
|
118809
|
-
if (sigint) process.exit(130);
|
|
118810
|
-
process.stdin.setRawMode && process.stdin.setRawMode(wasRaw);
|
|
118811
|
-
return null;
|
|
118812
|
-
}
|
|
118813
|
-
if (character == 4) {
|
|
118814
|
-
if (str.length == 0 && eot) {
|
|
118815
|
-
process.stdout.write("exit\n");
|
|
118816
|
-
process.exit(0);
|
|
118817
|
-
}
|
|
118818
|
-
}
|
|
118819
|
-
if (character == term) {
|
|
118820
|
-
fs6.closeSync(fd);
|
|
118821
|
-
if (!history) break;
|
|
118822
|
-
if (!masked && str.length) history.push(str);
|
|
118823
|
-
history.reset();
|
|
118824
|
-
break;
|
|
118825
|
-
}
|
|
118826
|
-
if (character == 9) {
|
|
118827
|
-
res = autocomplete(str);
|
|
118828
|
-
if (str == res[0]) {
|
|
118829
|
-
res = autocomplete("");
|
|
118830
|
-
} else {
|
|
118831
|
-
prevComplete = res.length;
|
|
118832
|
-
}
|
|
118833
|
-
if (res.length == 0) {
|
|
118834
|
-
process.stdout.write(" ");
|
|
118835
|
-
continue;
|
|
118836
|
-
}
|
|
118837
|
-
var item = res[cycle++] || res[cycle = 0, cycle++];
|
|
118838
|
-
if (item) {
|
|
118839
|
-
process.stdout.write("\r\x1B[K" + ask + item);
|
|
118840
|
-
str = item;
|
|
118841
|
-
insert = item.length;
|
|
118842
|
-
}
|
|
118843
|
-
}
|
|
118844
|
-
if (character == 127 || process.platform == "win32" && character == 8) {
|
|
118845
|
-
if (!insert) continue;
|
|
118846
|
-
str = str.slice(0, insert - 1) + str.slice(insert);
|
|
118847
|
-
insert--;
|
|
118848
|
-
process.stdout.write("\x1B[2D");
|
|
118849
|
-
} else {
|
|
118850
|
-
if (character < 32 || character > 126)
|
|
118851
|
-
continue;
|
|
118852
|
-
str = str.slice(0, insert) + String.fromCharCode(character) + str.slice(insert);
|
|
118853
|
-
insert++;
|
|
118854
|
-
}
|
|
118855
|
-
;
|
|
118856
|
-
promptPrint(masked, ask, echo, str, insert);
|
|
118857
|
-
}
|
|
118858
|
-
process.stdout.write("\n");
|
|
118859
|
-
process.stdin.setRawMode && process.stdin.setRawMode(wasRaw);
|
|
118860
|
-
return str || value || "";
|
|
118861
|
-
}
|
|
118862
|
-
;
|
|
118863
|
-
function promptPrint(masked, ask, echo, str, insert) {
|
|
118864
|
-
if (masked) {
|
|
118865
|
-
process.stdout.write("\x1B[2K\x1B[0G" + ask + Array(str.length + 1).join(echo));
|
|
118866
|
-
} else {
|
|
118867
|
-
process.stdout.write("\x1B[s");
|
|
118868
|
-
if (insert == str.length) {
|
|
118869
|
-
process.stdout.write("\x1B[2K\x1B[0G" + ask + str);
|
|
118870
|
-
} else {
|
|
118871
|
-
if (ask) {
|
|
118872
|
-
process.stdout.write("\x1B[2K\x1B[0G" + ask + str);
|
|
118873
|
-
} else {
|
|
118874
|
-
process.stdout.write("\x1B[2K\x1B[0G" + str + "\x1B[" + (str.length - insert) + "D");
|
|
118875
|
-
}
|
|
118876
|
-
}
|
|
118877
|
-
var askLength = stripAnsi(ask).length;
|
|
118878
|
-
process.stdout.write(`\x1B[${askLength + 1 + (echo == "" ? 0 : insert)}G`);
|
|
118879
|
-
}
|
|
118880
|
-
}
|
|
118881
|
-
}
|
|
118882
|
-
module2.exports = create;
|
|
118883
|
-
}
|
|
118884
|
-
});
|
|
118885
|
-
|
|
118886
117816
|
// node_modules/commander/esm.mjs
|
|
118887
117817
|
var import_index = __toESM(require_commander(), 1);
|
|
118888
117818
|
var {
|
|
@@ -118903,7 +117833,7 @@ var {
|
|
|
118903
117833
|
// package.json
|
|
118904
117834
|
var package_default = {
|
|
118905
117835
|
name: "@capgo/cli",
|
|
118906
|
-
version: "4.11.
|
|
117836
|
+
version: "4.11.6",
|
|
118907
117837
|
description: "A CLI to upload to capgo servers",
|
|
118908
117838
|
author: "github.com/riderx",
|
|
118909
117839
|
license: "Apache 2.0",
|
|
@@ -118954,7 +117884,6 @@ var package_default = {
|
|
|
118954
117884
|
"@manypkg/find-root": "^2.2.1",
|
|
118955
117885
|
"@supabase/supabase-js": "^2.43.5",
|
|
118956
117886
|
"@tomasklaen/checksum": "^1.1.0",
|
|
118957
|
-
"@trufflesuite/spinnies": "^0.1.1",
|
|
118958
117887
|
"adm-zip": "^0.5.14",
|
|
118959
117888
|
"ci-info": "^4.0.0",
|
|
118960
117889
|
commander: "12.1.0",
|
|
@@ -118968,7 +117897,6 @@ var package_default = {
|
|
|
118968
117897
|
"node-dir": "^0.1.17",
|
|
118969
117898
|
open: "^10.1.0",
|
|
118970
117899
|
prettyjson: "^1.2.5",
|
|
118971
|
-
"prompt-sync": "^4.2.0",
|
|
118972
117900
|
semver: "^7.6.2",
|
|
118973
117901
|
tmp: "^0.2.3"
|
|
118974
117902
|
},
|
|
@@ -121305,6 +120233,9 @@ async function createKey(options, log = true) {
|
|
|
121305
120233
|
CapacitorUpdater: {}
|
|
121306
120234
|
};
|
|
121307
120235
|
}
|
|
120236
|
+
if (!extConfig.plugins.CapacitorUpdater) {
|
|
120237
|
+
extConfig.plugins.CapacitorUpdater = {};
|
|
120238
|
+
}
|
|
121308
120239
|
extConfig.plugins.CapacitorUpdater.privateKey = privateKey;
|
|
121309
120240
|
(0, import_config2.writeConfig)(extConfig, config.app.extConfigFilePath);
|
|
121310
120241
|
}
|
|
@@ -122719,7 +121650,6 @@ var import_node_path4 = require("node:path");
|
|
|
122719
121650
|
var import_node_os4 = __toESM(require("node:os"));
|
|
122720
121651
|
var import_node_process21 = __toESM(require("node:process"));
|
|
122721
121652
|
var import_get_latest_version2 = __toESM(require_src3());
|
|
122722
|
-
var import_spinnies = __toESM(require_spinnies());
|
|
122723
121653
|
async function getLatestDependencies(installedDependencies) {
|
|
122724
121654
|
const latestDependencies = {};
|
|
122725
121655
|
const all = [];
|
|
@@ -122774,10 +121704,10 @@ async function getInfo() {
|
|
|
122774
121704
|
}
|
|
122775
121705
|
}
|
|
122776
121706
|
f2.info("\n");
|
|
122777
|
-
const
|
|
122778
|
-
|
|
121707
|
+
const s = de();
|
|
121708
|
+
s.start(`Running: Loading latest dependencies`);
|
|
122779
121709
|
const latestDependencies = await getLatestDependencies(installedDependencies);
|
|
122780
|
-
|
|
121710
|
+
s.stop(`Latest Dependencies:`);
|
|
122781
121711
|
for (const dependency in latestDependencies) {
|
|
122782
121712
|
if (Object.prototype.hasOwnProperty.call(latestDependencies, dependency)) {
|
|
122783
121713
|
const latestVersion = latestDependencies[dependency];
|
|
@@ -123031,8 +121961,6 @@ async function listApp(options) {
|
|
|
123031
121961
|
// src/bundle/cleanup.ts
|
|
123032
121962
|
var import_node_process26 = __toESM(require("node:process"));
|
|
123033
121963
|
var import_preload = __toESM(require_preload());
|
|
123034
|
-
var import_prompt_sync = __toESM(require_prompt_sync());
|
|
123035
|
-
var prompt = (0, import_prompt_sync.default)();
|
|
123036
121964
|
async function removeVersions(toRemove, supabase, appid) {
|
|
123037
121965
|
for await (const row of toRemove) {
|
|
123038
121966
|
f2.warn(`Removing ${row.name} created on ${getHumanDate(row.created_at)}`);
|
|
@@ -123101,10 +122029,10 @@ async function cleanupBundle(appid, options) {
|
|
|
123101
122029
|
}
|
|
123102
122030
|
displayBundles(allVersions);
|
|
123103
122031
|
if (!force) {
|
|
123104
|
-
const
|
|
123105
|
-
if (
|
|
122032
|
+
const doDelete = await se({ message: "Do you want to continue removing the versions specified?" });
|
|
122033
|
+
if (eD(doDelete) || !doDelete) {
|
|
123106
122034
|
f2.warn("Not confirmed, aborting removal...");
|
|
123107
|
-
|
|
122035
|
+
import_node_process26.default.exit();
|
|
123108
122036
|
}
|
|
123109
122037
|
}
|
|
123110
122038
|
f2.success("You have confirmed removal, removing versions now");
|