publish-microfrontend 1.8.0-beta.7777 → 1.8.1-beta.7789
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/lib/index.js +283 -281
- package/package.json +2 -2
- package/src/index.ts +4 -3
package/lib/index.js
CHANGED
|
@@ -272,13 +272,13 @@ var require_utils = __commonJS({
|
|
|
272
272
|
return ini.parse(content);
|
|
273
273
|
};
|
|
274
274
|
var file = exports2.file = function() {
|
|
275
|
-
var
|
|
275
|
+
var args = [].slice.call(arguments).filter(function(arg) {
|
|
276
276
|
return arg != null;
|
|
277
277
|
});
|
|
278
|
-
for (var i in
|
|
279
|
-
if ("string" !== typeof
|
|
278
|
+
for (var i in args)
|
|
279
|
+
if ("string" !== typeof args[i])
|
|
280
280
|
return;
|
|
281
|
-
var file2 = path.join.apply(null,
|
|
281
|
+
var file2 = path.join.apply(null, args);
|
|
282
282
|
var content;
|
|
283
283
|
try {
|
|
284
284
|
return fs.readFileSync(file2, "utf-8");
|
|
@@ -380,9 +380,9 @@ var require_deep_extend = __commonJS({
|
|
|
380
380
|
return arguments[0];
|
|
381
381
|
}
|
|
382
382
|
var target = arguments[0];
|
|
383
|
-
var
|
|
383
|
+
var args = Array.prototype.slice.call(arguments, 1);
|
|
384
384
|
var val, src, clone;
|
|
385
|
-
|
|
385
|
+
args.forEach(function(obj) {
|
|
386
386
|
if (typeof obj !== "object" || obj === null || Array.isArray(obj)) {
|
|
387
387
|
return;
|
|
388
388
|
}
|
|
@@ -438,7 +438,7 @@ var require_minimist = __commonJS({
|
|
|
438
438
|
function isConstructorOrProto(obj, key) {
|
|
439
439
|
return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
|
|
440
440
|
}
|
|
441
|
-
module2.exports = function(
|
|
441
|
+
module2.exports = function(args, opts) {
|
|
442
442
|
if (!opts) {
|
|
443
443
|
opts = {};
|
|
444
444
|
}
|
|
@@ -466,8 +466,8 @@ var require_minimist = __commonJS({
|
|
|
466
466
|
Object.keys(opts.alias || {}).forEach(function(key2) {
|
|
467
467
|
aliases[key2] = [].concat(opts.alias[key2]);
|
|
468
468
|
aliases[key2].forEach(function(x) {
|
|
469
|
-
aliases[x] = [key2].concat(aliases[key2].filter(function(
|
|
470
|
-
return x !==
|
|
469
|
+
aliases[x] = [key2].concat(aliases[key2].filter(function(y2) {
|
|
470
|
+
return x !== y2;
|
|
471
471
|
}));
|
|
472
472
|
});
|
|
473
473
|
});
|
|
@@ -536,12 +536,12 @@ var require_minimist = __commonJS({
|
|
|
536
536
|
setArg(key2, defaults2[key2] === void 0 ? false : defaults2[key2]);
|
|
537
537
|
});
|
|
538
538
|
var notFlags = [];
|
|
539
|
-
if (
|
|
540
|
-
notFlags =
|
|
541
|
-
|
|
539
|
+
if (args.indexOf("--") !== -1) {
|
|
540
|
+
notFlags = args.slice(args.indexOf("--") + 1);
|
|
541
|
+
args = args.slice(0, args.indexOf("--"));
|
|
542
542
|
}
|
|
543
|
-
for (var i = 0; i <
|
|
544
|
-
var arg =
|
|
543
|
+
for (var i = 0; i < args.length; i++) {
|
|
544
|
+
var arg = args[i];
|
|
545
545
|
var key;
|
|
546
546
|
var next;
|
|
547
547
|
if (/^--.+=/.test(arg)) {
|
|
@@ -557,7 +557,7 @@ var require_minimist = __commonJS({
|
|
|
557
557
|
setArg(key, false, arg);
|
|
558
558
|
} else if (/^--.+/.test(arg)) {
|
|
559
559
|
key = arg.match(/^--(.+)/)[1];
|
|
560
|
-
next =
|
|
560
|
+
next = args[i + 1];
|
|
561
561
|
if (next !== void 0 && !/^(-|--)[^-]/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
562
562
|
setArg(key, next, arg);
|
|
563
563
|
i += 1;
|
|
@@ -596,11 +596,11 @@ var require_minimist = __commonJS({
|
|
|
596
596
|
}
|
|
597
597
|
key = arg.slice(-1)[0];
|
|
598
598
|
if (!broken && key !== "-") {
|
|
599
|
-
if (
|
|
600
|
-
setArg(key,
|
|
599
|
+
if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) {
|
|
600
|
+
setArg(key, args[i + 1], arg);
|
|
601
601
|
i += 1;
|
|
602
|
-
} else if (
|
|
603
|
-
setArg(key,
|
|
602
|
+
} else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) {
|
|
603
|
+
setArg(key, args[i + 1] === "true", arg);
|
|
604
604
|
i += 1;
|
|
605
605
|
} else {
|
|
606
606
|
setArg(key, flags.strings[key] ? "" : true, arg);
|
|
@@ -611,7 +611,7 @@ var require_minimist = __commonJS({
|
|
|
611
611
|
argv._.push(flags.strings._ || !isNumber2(arg) ? arg : Number(arg));
|
|
612
612
|
}
|
|
613
613
|
if (opts.stopEarly) {
|
|
614
|
-
argv._.push.apply(argv._,
|
|
614
|
+
argv._.push.apply(argv._, args.slice(i + 1));
|
|
615
615
|
break;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
@@ -2719,11 +2719,11 @@ var require_brace_expansion = __commonJS({
|
|
|
2719
2719
|
function isPadded(el) {
|
|
2720
2720
|
return /^-?0\d/.test(el);
|
|
2721
2721
|
}
|
|
2722
|
-
function lte(i,
|
|
2723
|
-
return i <=
|
|
2722
|
+
function lte(i, y2) {
|
|
2723
|
+
return i <= y2;
|
|
2724
2724
|
}
|
|
2725
|
-
function gte(i,
|
|
2726
|
-
return i >=
|
|
2725
|
+
function gte(i, y2) {
|
|
2726
|
+
return i >= y2;
|
|
2727
2727
|
}
|
|
2728
2728
|
function expand(str, isTop) {
|
|
2729
2729
|
var expansions = [];
|
|
@@ -2765,18 +2765,18 @@ var require_brace_expansion = __commonJS({
|
|
|
2765
2765
|
var N;
|
|
2766
2766
|
if (isSequence) {
|
|
2767
2767
|
var x = numeric(n[0]);
|
|
2768
|
-
var
|
|
2768
|
+
var y2 = numeric(n[1]);
|
|
2769
2769
|
var width = Math.max(n[0].length, n[1].length);
|
|
2770
2770
|
var incr = n.length == 3 ? Math.abs(numeric(n[2])) : 1;
|
|
2771
2771
|
var test2 = lte;
|
|
2772
|
-
var reverse =
|
|
2772
|
+
var reverse = y2 < x;
|
|
2773
2773
|
if (reverse) {
|
|
2774
2774
|
incr *= -1;
|
|
2775
2775
|
test2 = gte;
|
|
2776
2776
|
}
|
|
2777
2777
|
var pad = n.some(isPadded);
|
|
2778
2778
|
N = [];
|
|
2779
|
-
for (var i = x; test2(i,
|
|
2779
|
+
for (var i = x; test2(i, y2); i += incr) {
|
|
2780
2780
|
var c;
|
|
2781
2781
|
if (isAlphaSequence) {
|
|
2782
2782
|
c = String.fromCharCode(i);
|
|
@@ -2940,7 +2940,7 @@ var require_minimatch = __commonJS({
|
|
|
2940
2940
|
}
|
|
2941
2941
|
this.parseNegate();
|
|
2942
2942
|
let set = this.globSet = this.braceExpand();
|
|
2943
|
-
if (options.debug) this.debug = (...
|
|
2943
|
+
if (options.debug) this.debug = (...args) => console.error(...args);
|
|
2944
2944
|
this.debug(this.pattern, set);
|
|
2945
2945
|
set = this.globParts = set.map((s) => s.split(slashSplit));
|
|
2946
2946
|
this.debug(this.pattern, set);
|
|
@@ -3984,12 +3984,12 @@ var require_wrappy = __commonJS({
|
|
|
3984
3984
|
});
|
|
3985
3985
|
return wrapper;
|
|
3986
3986
|
function wrapper() {
|
|
3987
|
-
var
|
|
3988
|
-
for (var i = 0; i <
|
|
3989
|
-
|
|
3987
|
+
var args = new Array(arguments.length);
|
|
3988
|
+
for (var i = 0; i < args.length; i++) {
|
|
3989
|
+
args[i] = arguments[i];
|
|
3990
3990
|
}
|
|
3991
|
-
var ret = fn.apply(this,
|
|
3992
|
-
var cb2 =
|
|
3991
|
+
var ret = fn.apply(this, args);
|
|
3992
|
+
var cb2 = args[args.length - 1];
|
|
3993
3993
|
if (typeof ret === "function" && ret !== cb2) {
|
|
3994
3994
|
Object.keys(cb2).forEach(function(k) {
|
|
3995
3995
|
ret[k] = cb2[k];
|
|
@@ -4065,16 +4065,16 @@ var require_inflight = __commonJS({
|
|
|
4065
4065
|
return once(function RES() {
|
|
4066
4066
|
var cbs = reqs[key];
|
|
4067
4067
|
var len = cbs.length;
|
|
4068
|
-
var
|
|
4068
|
+
var args = slice(arguments);
|
|
4069
4069
|
try {
|
|
4070
4070
|
for (var i = 0; i < len; i++) {
|
|
4071
|
-
cbs[i].apply(null,
|
|
4071
|
+
cbs[i].apply(null, args);
|
|
4072
4072
|
}
|
|
4073
4073
|
} finally {
|
|
4074
4074
|
if (cbs.length > len) {
|
|
4075
4075
|
cbs.splice(0, len);
|
|
4076
4076
|
process.nextTick(function() {
|
|
4077
|
-
RES.apply(null,
|
|
4077
|
+
RES.apply(null, args);
|
|
4078
4078
|
});
|
|
4079
4079
|
} else {
|
|
4080
4080
|
delete reqs[key];
|
|
@@ -4082,10 +4082,10 @@ var require_inflight = __commonJS({
|
|
|
4082
4082
|
}
|
|
4083
4083
|
});
|
|
4084
4084
|
}
|
|
4085
|
-
function slice(
|
|
4086
|
-
var length =
|
|
4085
|
+
function slice(args) {
|
|
4086
|
+
var length = args.length;
|
|
4087
4087
|
var array = [];
|
|
4088
|
-
for (var i = 0; i < length; i++) array[i] =
|
|
4088
|
+
for (var i = 0; i < length; i++) array[i] = args[i];
|
|
4089
4089
|
return array;
|
|
4090
4090
|
}
|
|
4091
4091
|
}
|
|
@@ -4703,8 +4703,8 @@ var require_delayed_stream = __commonJS({
|
|
|
4703
4703
|
};
|
|
4704
4704
|
DelayedStream.prototype.release = function() {
|
|
4705
4705
|
this._released = true;
|
|
4706
|
-
this._bufferedEvents.forEach(function(
|
|
4707
|
-
this.emit.apply(this,
|
|
4706
|
+
this._bufferedEvents.forEach(function(args) {
|
|
4707
|
+
this.emit.apply(this, args);
|
|
4708
4708
|
}.bind(this));
|
|
4709
4709
|
this._bufferedEvents = [];
|
|
4710
4710
|
};
|
|
@@ -4713,16 +4713,16 @@ var require_delayed_stream = __commonJS({
|
|
|
4713
4713
|
this.resume();
|
|
4714
4714
|
return r;
|
|
4715
4715
|
};
|
|
4716
|
-
DelayedStream.prototype._handleEmit = function(
|
|
4716
|
+
DelayedStream.prototype._handleEmit = function(args) {
|
|
4717
4717
|
if (this._released) {
|
|
4718
|
-
this.emit.apply(this,
|
|
4718
|
+
this.emit.apply(this, args);
|
|
4719
4719
|
return;
|
|
4720
4720
|
}
|
|
4721
|
-
if (
|
|
4722
|
-
this.dataSize +=
|
|
4721
|
+
if (args[0] === "data") {
|
|
4722
|
+
this.dataSize += args[1].length;
|
|
4723
4723
|
this._checkIfMaxDataSizeExceeded();
|
|
4724
4724
|
}
|
|
4725
|
-
this._bufferedEvents.push(
|
|
4725
|
+
this._bufferedEvents.push(args);
|
|
4726
4726
|
};
|
|
4727
4727
|
DelayedStream.prototype._checkIfMaxDataSizeExceeded = function() {
|
|
4728
4728
|
if (this._maxDataSizeExceeded) {
|
|
@@ -14142,7 +14142,7 @@ var require_ms = __commonJS({
|
|
|
14142
14142
|
var h = m * 60;
|
|
14143
14143
|
var d = h * 24;
|
|
14144
14144
|
var w = d * 7;
|
|
14145
|
-
var
|
|
14145
|
+
var y2 = d * 365.25;
|
|
14146
14146
|
module2.exports = function(val, options) {
|
|
14147
14147
|
options = options || {};
|
|
14148
14148
|
var type = typeof val;
|
|
@@ -14174,7 +14174,7 @@ var require_ms = __commonJS({
|
|
|
14174
14174
|
case "yrs":
|
|
14175
14175
|
case "yr":
|
|
14176
14176
|
case "y":
|
|
14177
|
-
return n *
|
|
14177
|
+
return n * y2;
|
|
14178
14178
|
case "weeks":
|
|
14179
14179
|
case "week":
|
|
14180
14180
|
case "w":
|
|
@@ -14282,7 +14282,7 @@ var require_common2 = __commonJS({
|
|
|
14282
14282
|
let enableOverride = null;
|
|
14283
14283
|
let namespacesCache;
|
|
14284
14284
|
let enabledCache;
|
|
14285
|
-
function debug(...
|
|
14285
|
+
function debug(...args) {
|
|
14286
14286
|
if (!debug.enabled) {
|
|
14287
14287
|
return;
|
|
14288
14288
|
}
|
|
@@ -14293,28 +14293,28 @@ var require_common2 = __commonJS({
|
|
|
14293
14293
|
self2.prev = prevTime;
|
|
14294
14294
|
self2.curr = curr;
|
|
14295
14295
|
prevTime = curr;
|
|
14296
|
-
|
|
14297
|
-
if (typeof
|
|
14298
|
-
|
|
14296
|
+
args[0] = createDebug.coerce(args[0]);
|
|
14297
|
+
if (typeof args[0] !== "string") {
|
|
14298
|
+
args.unshift("%O");
|
|
14299
14299
|
}
|
|
14300
14300
|
let index = 0;
|
|
14301
|
-
|
|
14301
|
+
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format4) => {
|
|
14302
14302
|
if (match === "%%") {
|
|
14303
14303
|
return "%";
|
|
14304
14304
|
}
|
|
14305
14305
|
index++;
|
|
14306
14306
|
const formatter = createDebug.formatters[format4];
|
|
14307
14307
|
if (typeof formatter === "function") {
|
|
14308
|
-
const val =
|
|
14308
|
+
const val = args[index];
|
|
14309
14309
|
match = formatter.call(self2, val);
|
|
14310
|
-
|
|
14310
|
+
args.splice(index, 1);
|
|
14311
14311
|
index--;
|
|
14312
14312
|
}
|
|
14313
14313
|
return match;
|
|
14314
14314
|
});
|
|
14315
|
-
createDebug.formatArgs.call(self2,
|
|
14315
|
+
createDebug.formatArgs.call(self2, args);
|
|
14316
14316
|
const logFn = self2.log || createDebug.log;
|
|
14317
|
-
logFn.apply(self2,
|
|
14317
|
+
logFn.apply(self2, args);
|
|
14318
14318
|
}
|
|
14319
14319
|
debug.namespace = namespace;
|
|
14320
14320
|
debug.useColors = createDebug.useColors();
|
|
@@ -14521,16 +14521,16 @@ var require_browser = __commonJS({
|
|
|
14521
14521
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
14522
14522
|
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
14523
14523
|
}
|
|
14524
|
-
function formatArgs(
|
|
14525
|
-
|
|
14524
|
+
function formatArgs(args) {
|
|
14525
|
+
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
|
|
14526
14526
|
if (!this.useColors) {
|
|
14527
14527
|
return;
|
|
14528
14528
|
}
|
|
14529
14529
|
const c = "color: " + this.color;
|
|
14530
|
-
|
|
14530
|
+
args.splice(1, 0, c, "color: inherit");
|
|
14531
14531
|
let index = 0;
|
|
14532
14532
|
let lastC = 0;
|
|
14533
|
-
|
|
14533
|
+
args[0].replace(/%[a-zA-Z%]/g, (match) => {
|
|
14534
14534
|
if (match === "%%") {
|
|
14535
14535
|
return;
|
|
14536
14536
|
}
|
|
@@ -14539,7 +14539,7 @@ var require_browser = __commonJS({
|
|
|
14539
14539
|
lastC = index;
|
|
14540
14540
|
}
|
|
14541
14541
|
});
|
|
14542
|
-
|
|
14542
|
+
args.splice(lastC, 0, c);
|
|
14543
14543
|
}
|
|
14544
14544
|
exports2.log = console.debug || console.log || (() => {
|
|
14545
14545
|
});
|
|
@@ -14820,16 +14820,16 @@ var require_node = __commonJS({
|
|
|
14820
14820
|
function useColors() {
|
|
14821
14821
|
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty2.isatty(process.stderr.fd);
|
|
14822
14822
|
}
|
|
14823
|
-
function formatArgs(
|
|
14823
|
+
function formatArgs(args) {
|
|
14824
14824
|
const { namespace: name, useColors: useColors2 } = this;
|
|
14825
14825
|
if (useColors2) {
|
|
14826
14826
|
const c = this.color;
|
|
14827
14827
|
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
14828
14828
|
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
14829
|
-
|
|
14830
|
-
|
|
14829
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
14830
|
+
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
14831
14831
|
} else {
|
|
14832
|
-
|
|
14832
|
+
args[0] = getDate() + name + " " + args[0];
|
|
14833
14833
|
}
|
|
14834
14834
|
}
|
|
14835
14835
|
function getDate() {
|
|
@@ -14838,8 +14838,8 @@ var require_node = __commonJS({
|
|
|
14838
14838
|
}
|
|
14839
14839
|
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
14840
14840
|
}
|
|
14841
|
-
function log(...
|
|
14842
|
-
return process.stderr.write(util2.format(...
|
|
14841
|
+
function log(...args) {
|
|
14842
|
+
return process.stderr.write(util2.format(...args) + "\n");
|
|
14843
14843
|
}
|
|
14844
14844
|
function save(namespaces) {
|
|
14845
14845
|
if (namespaces) {
|
|
@@ -15733,21 +15733,21 @@ var UI = class {
|
|
|
15733
15733
|
this.wrap = (_a2 = opts.wrap) !== null && _a2 !== void 0 ? _a2 : true;
|
|
15734
15734
|
this.rows = [];
|
|
15735
15735
|
}
|
|
15736
|
-
span(...
|
|
15737
|
-
const cols = this.div(...
|
|
15736
|
+
span(...args) {
|
|
15737
|
+
const cols = this.div(...args);
|
|
15738
15738
|
cols.span = true;
|
|
15739
15739
|
}
|
|
15740
15740
|
resetOutput() {
|
|
15741
15741
|
this.rows = [];
|
|
15742
15742
|
}
|
|
15743
|
-
div(...
|
|
15744
|
-
if (
|
|
15743
|
+
div(...args) {
|
|
15744
|
+
if (args.length === 0) {
|
|
15745
15745
|
this.div("");
|
|
15746
15746
|
}
|
|
15747
|
-
if (this.wrap && this.shouldApplyLayoutDSL(...
|
|
15748
|
-
return this.applyLayoutDSL(
|
|
15747
|
+
if (this.wrap && this.shouldApplyLayoutDSL(...args) && typeof args[0] === "string") {
|
|
15748
|
+
return this.applyLayoutDSL(args[0]);
|
|
15749
15749
|
}
|
|
15750
|
-
const cols =
|
|
15750
|
+
const cols = args.map((arg) => {
|
|
15751
15751
|
if (typeof arg === "string") {
|
|
15752
15752
|
return this.colFromString(arg);
|
|
15753
15753
|
}
|
|
@@ -15756,8 +15756,8 @@ var UI = class {
|
|
|
15756
15756
|
this.rows.push(cols);
|
|
15757
15757
|
return cols;
|
|
15758
15758
|
}
|
|
15759
|
-
shouldApplyLayoutDSL(...
|
|
15760
|
-
return
|
|
15759
|
+
shouldApplyLayoutDSL(...args) {
|
|
15760
|
+
return args.length === 1 && typeof args[0] === "string" && /[\t\n]/.test(args[0]);
|
|
15761
15761
|
}
|
|
15762
15762
|
applyLayoutDSL(str) {
|
|
15763
15763
|
const rows = str.split("\n").map((row) => row.split(" "));
|
|
@@ -16095,7 +16095,7 @@ function tokenizeArgString(argString) {
|
|
|
16095
16095
|
let prevC = null;
|
|
16096
16096
|
let c = null;
|
|
16097
16097
|
let opening = null;
|
|
16098
|
-
const
|
|
16098
|
+
const args = [];
|
|
16099
16099
|
for (let ii = 0; ii < argString.length; ii++) {
|
|
16100
16100
|
prevC = c;
|
|
16101
16101
|
c = argString.charAt(ii);
|
|
@@ -16110,11 +16110,11 @@ function tokenizeArgString(argString) {
|
|
|
16110
16110
|
} else if ((c === "'" || c === '"') && !opening) {
|
|
16111
16111
|
opening = c;
|
|
16112
16112
|
}
|
|
16113
|
-
if (!
|
|
16114
|
-
|
|
16115
|
-
|
|
16113
|
+
if (!args[i])
|
|
16114
|
+
args[i] = "";
|
|
16115
|
+
args[i] += c;
|
|
16116
16116
|
}
|
|
16117
|
-
return
|
|
16117
|
+
return args;
|
|
16118
16118
|
}
|
|
16119
16119
|
|
|
16120
16120
|
// ../../../node_modules/yargs-parser/build/lib/yargs-parser-types.js
|
|
@@ -16151,7 +16151,7 @@ var YargsParser = class {
|
|
|
16151
16151
|
__: void 0,
|
|
16152
16152
|
key: void 0
|
|
16153
16153
|
}, options);
|
|
16154
|
-
const
|
|
16154
|
+
const args = tokenizeArgString(argsInput);
|
|
16155
16155
|
const inputIsString = typeof argsInput === "string";
|
|
16156
16156
|
const aliases = combineAliases(Object.assign(/* @__PURE__ */ Object.create(null), opts.alias));
|
|
16157
16157
|
const configuration = Object.assign({
|
|
@@ -16274,8 +16274,8 @@ var YargsParser = class {
|
|
|
16274
16274
|
let notFlags = [];
|
|
16275
16275
|
const argv = Object.assign(/* @__PURE__ */ Object.create(null), { _: [] });
|
|
16276
16276
|
const argvReturn = {};
|
|
16277
|
-
for (let i = 0; i <
|
|
16278
|
-
const arg =
|
|
16277
|
+
for (let i = 0; i < args.length; i++) {
|
|
16278
|
+
const arg = args[i];
|
|
16279
16279
|
const truncatedArg = arg.replace(/^-{3,}/, "---");
|
|
16280
16280
|
let broken;
|
|
16281
16281
|
let key;
|
|
@@ -16292,9 +16292,9 @@ var YargsParser = class {
|
|
|
16292
16292
|
m = arg.match(/^--?([^=]+)=([\s\S]*)$/);
|
|
16293
16293
|
if (m !== null && Array.isArray(m) && m.length >= 3) {
|
|
16294
16294
|
if (checkAllAliases(m[1], flags.arrays)) {
|
|
16295
|
-
i = eatArray(i, m[1],
|
|
16295
|
+
i = eatArray(i, m[1], args, m[2]);
|
|
16296
16296
|
} else if (checkAllAliases(m[1], flags.nargs) !== false) {
|
|
16297
|
-
i = eatNargs(i, m[1],
|
|
16297
|
+
i = eatNargs(i, m[1], args, m[2]);
|
|
16298
16298
|
} else {
|
|
16299
16299
|
setArg(m[1], m[2], true);
|
|
16300
16300
|
}
|
|
@@ -16310,11 +16310,11 @@ var YargsParser = class {
|
|
|
16310
16310
|
if (m !== null && Array.isArray(m) && m.length >= 2) {
|
|
16311
16311
|
key = m[1];
|
|
16312
16312
|
if (checkAllAliases(key, flags.arrays)) {
|
|
16313
|
-
i = eatArray(i, key,
|
|
16313
|
+
i = eatArray(i, key, args);
|
|
16314
16314
|
} else if (checkAllAliases(key, flags.nargs) !== false) {
|
|
16315
|
-
i = eatNargs(i, key,
|
|
16315
|
+
i = eatNargs(i, key, args);
|
|
16316
16316
|
} else {
|
|
16317
|
-
next =
|
|
16317
|
+
next = args[i + 1];
|
|
16318
16318
|
if (next !== void 0 && (!next.match(/^-/) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
|
|
16319
16319
|
setArg(key, next);
|
|
16320
16320
|
i++;
|
|
@@ -16332,7 +16332,7 @@ var YargsParser = class {
|
|
|
16332
16332
|
setArg(m[1], m[2]);
|
|
16333
16333
|
}
|
|
16334
16334
|
} else if (arg.match(/^-.\..+/) && !arg.match(negative)) {
|
|
16335
|
-
next =
|
|
16335
|
+
next = args[i + 1];
|
|
16336
16336
|
m = arg.match(/^-(.\..+)/);
|
|
16337
16337
|
if (m !== null && Array.isArray(m) && m.length >= 2) {
|
|
16338
16338
|
key = m[1];
|
|
@@ -16352,9 +16352,9 @@ var YargsParser = class {
|
|
|
16352
16352
|
value = arg.slice(j + 3);
|
|
16353
16353
|
key = letters[j];
|
|
16354
16354
|
if (checkAllAliases(key, flags.arrays)) {
|
|
16355
|
-
i = eatArray(i, key,
|
|
16355
|
+
i = eatArray(i, key, args, value);
|
|
16356
16356
|
} else if (checkAllAliases(key, flags.nargs) !== false) {
|
|
16357
|
-
i = eatNargs(i, key,
|
|
16357
|
+
i = eatNargs(i, key, args, value);
|
|
16358
16358
|
} else {
|
|
16359
16359
|
setArg(key, value);
|
|
16360
16360
|
}
|
|
@@ -16381,11 +16381,11 @@ var YargsParser = class {
|
|
|
16381
16381
|
key = arg.slice(-1)[0];
|
|
16382
16382
|
if (!broken && key !== "-") {
|
|
16383
16383
|
if (checkAllAliases(key, flags.arrays)) {
|
|
16384
|
-
i = eatArray(i, key,
|
|
16384
|
+
i = eatArray(i, key, args);
|
|
16385
16385
|
} else if (checkAllAliases(key, flags.nargs) !== false) {
|
|
16386
|
-
i = eatNargs(i, key,
|
|
16386
|
+
i = eatNargs(i, key, args);
|
|
16387
16387
|
} else {
|
|
16388
|
-
next =
|
|
16388
|
+
next = args[i + 1];
|
|
16389
16389
|
if (next !== void 0 && (!/^(-|--)[^-]/.test(next) || next.match(negative)) && !checkAllAliases(key, flags.bools) && !checkAllAliases(key, flags.counts)) {
|
|
16390
16390
|
setArg(key, next);
|
|
16391
16391
|
i++;
|
|
@@ -16401,10 +16401,10 @@ var YargsParser = class {
|
|
|
16401
16401
|
key = arg.slice(1);
|
|
16402
16402
|
setArg(key, defaultValue(key));
|
|
16403
16403
|
} else if (arg === "--") {
|
|
16404
|
-
notFlags =
|
|
16404
|
+
notFlags = args.slice(i + 1);
|
|
16405
16405
|
break;
|
|
16406
16406
|
} else if (configuration["halt-at-non-option"]) {
|
|
16407
|
-
notFlags =
|
|
16407
|
+
notFlags = args.slice(i);
|
|
16408
16408
|
break;
|
|
16409
16409
|
} else {
|
|
16410
16410
|
pushPositional(arg);
|
|
@@ -16447,7 +16447,7 @@ var YargsParser = class {
|
|
|
16447
16447
|
argv._.push(maybeCoercedNumber);
|
|
16448
16448
|
}
|
|
16449
16449
|
}
|
|
16450
|
-
function eatNargs(i, key,
|
|
16450
|
+
function eatNargs(i, key, args2, argAfterEqualSign) {
|
|
16451
16451
|
let ii;
|
|
16452
16452
|
let toEat = checkAllAliases(key, flags.nargs);
|
|
16453
16453
|
toEat = typeof toEat !== "number" || isNaN(toEat) ? 1 : toEat;
|
|
@@ -16460,13 +16460,13 @@ var YargsParser = class {
|
|
|
16460
16460
|
}
|
|
16461
16461
|
let available = isUndefined2(argAfterEqualSign) ? 0 : 1;
|
|
16462
16462
|
if (configuration["nargs-eats-options"]) {
|
|
16463
|
-
if (
|
|
16463
|
+
if (args2.length - (i + 1) + available < toEat) {
|
|
16464
16464
|
error = Error(__("Not enough arguments following: %s", key));
|
|
16465
16465
|
}
|
|
16466
16466
|
available = toEat;
|
|
16467
16467
|
} else {
|
|
16468
|
-
for (ii = i + 1; ii <
|
|
16469
|
-
if (!
|
|
16468
|
+
for (ii = i + 1; ii < args2.length; ii++) {
|
|
16469
|
+
if (!args2[ii].match(/^-[^0-9]/) || args2[ii].match(negative) || isUnknownOptionAsArg(args2[ii]))
|
|
16470
16470
|
available++;
|
|
16471
16471
|
else
|
|
16472
16472
|
break;
|
|
@@ -16480,13 +16480,13 @@ var YargsParser = class {
|
|
|
16480
16480
|
consumed--;
|
|
16481
16481
|
}
|
|
16482
16482
|
for (ii = i + 1; ii < consumed + i + 1; ii++) {
|
|
16483
|
-
setArg(key,
|
|
16483
|
+
setArg(key, args2[ii]);
|
|
16484
16484
|
}
|
|
16485
16485
|
return i + consumed;
|
|
16486
16486
|
}
|
|
16487
|
-
function eatArray(i, key,
|
|
16487
|
+
function eatArray(i, key, args2, argAfterEqualSign) {
|
|
16488
16488
|
let argsToSet = [];
|
|
16489
|
-
let next = argAfterEqualSign ||
|
|
16489
|
+
let next = argAfterEqualSign || args2[i + 1];
|
|
16490
16490
|
const nargsCount = checkAllAliases(key, flags.nargs);
|
|
16491
16491
|
if (checkAllAliases(key, flags.bools) && !/^(true|false)$/.test(next)) {
|
|
16492
16492
|
argsToSet.push(true);
|
|
@@ -16499,10 +16499,10 @@ var YargsParser = class {
|
|
|
16499
16499
|
if (!isUndefined2(argAfterEqualSign)) {
|
|
16500
16500
|
argsToSet.push(processValue(key, argAfterEqualSign, true));
|
|
16501
16501
|
}
|
|
16502
|
-
for (let ii = i + 1; ii <
|
|
16502
|
+
for (let ii = i + 1; ii < args2.length; ii++) {
|
|
16503
16503
|
if (!configuration["greedy-arrays"] && argsToSet.length > 0 || nargsCount && typeof nargsCount === "number" && argsToSet.length >= nargsCount)
|
|
16504
16504
|
break;
|
|
16505
|
-
next =
|
|
16505
|
+
next = args2[ii];
|
|
16506
16506
|
if (/^-/.test(next) && !negative.test(next) && !isUnknownOptionAsArg(next))
|
|
16507
16507
|
break;
|
|
16508
16508
|
i = ii;
|
|
@@ -16778,8 +16778,8 @@ var YargsParser = class {
|
|
|
16778
16778
|
o[key] = value;
|
|
16779
16779
|
}
|
|
16780
16780
|
}
|
|
16781
|
-
function extendAliases(...
|
|
16782
|
-
|
|
16781
|
+
function extendAliases(...args2) {
|
|
16782
|
+
args2.forEach(function(obj) {
|
|
16783
16783
|
Object.keys(obj || {}).forEach(function(key) {
|
|
16784
16784
|
if (flags.aliases[key])
|
|
16785
16785
|
return;
|
|
@@ -16803,8 +16803,8 @@ var YargsParser = class {
|
|
|
16803
16803
|
}
|
|
16804
16804
|
});
|
|
16805
16805
|
flags.aliases[key].forEach(function(x) {
|
|
16806
|
-
flags.aliases[x] = [key].concat(flags.aliases[key].filter(function(
|
|
16807
|
-
return x !==
|
|
16806
|
+
flags.aliases[x] = [key].concat(flags.aliases[key].filter(function(y2) {
|
|
16807
|
+
return x !== y2;
|
|
16808
16808
|
}));
|
|
16809
16809
|
});
|
|
16810
16810
|
});
|
|
@@ -17000,12 +17000,12 @@ var parser = new YargsParser({
|
|
|
17000
17000
|
}
|
|
17001
17001
|
}
|
|
17002
17002
|
});
|
|
17003
|
-
var yargsParser = function Parser(
|
|
17004
|
-
const result = parser.parse(
|
|
17003
|
+
var yargsParser = function Parser(args, opts) {
|
|
17004
|
+
const result = parser.parse(args.slice(), opts);
|
|
17005
17005
|
return result.argv;
|
|
17006
17006
|
};
|
|
17007
|
-
yargsParser.detailed = function(
|
|
17008
|
-
return parser.parse(
|
|
17007
|
+
yargsParser.detailed = function(args, opts) {
|
|
17008
|
+
return parser.parse(args.slice(), opts);
|
|
17009
17009
|
};
|
|
17010
17010
|
yargsParser.camelCase = camelCase;
|
|
17011
17011
|
yargsParser.decamelize = decamelize;
|
|
@@ -17074,15 +17074,15 @@ var Y18N = class {
|
|
|
17074
17074
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
17075
17075
|
this.writeQueue = [];
|
|
17076
17076
|
}
|
|
17077
|
-
__(...
|
|
17077
|
+
__(...args) {
|
|
17078
17078
|
if (typeof arguments[0] !== "string") {
|
|
17079
17079
|
return this._taggedLiteral(arguments[0], ...arguments);
|
|
17080
17080
|
}
|
|
17081
|
-
const str =
|
|
17081
|
+
const str = args.shift();
|
|
17082
17082
|
let cb = function() {
|
|
17083
17083
|
};
|
|
17084
|
-
if (typeof
|
|
17085
|
-
cb =
|
|
17084
|
+
if (typeof args[args.length - 1] === "function")
|
|
17085
|
+
cb = args.pop();
|
|
17086
17086
|
cb = cb || function() {
|
|
17087
17087
|
};
|
|
17088
17088
|
if (!this.cache[this.locale])
|
|
@@ -17097,17 +17097,17 @@ var Y18N = class {
|
|
|
17097
17097
|
} else {
|
|
17098
17098
|
cb();
|
|
17099
17099
|
}
|
|
17100
|
-
return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(
|
|
17100
|
+
return shim.format.apply(shim.format, [this.cache[this.locale][str] || str].concat(args));
|
|
17101
17101
|
}
|
|
17102
17102
|
__n() {
|
|
17103
|
-
const
|
|
17104
|
-
const singular =
|
|
17105
|
-
const plural =
|
|
17106
|
-
const quantity =
|
|
17103
|
+
const args = Array.prototype.slice.call(arguments);
|
|
17104
|
+
const singular = args.shift();
|
|
17105
|
+
const plural = args.shift();
|
|
17106
|
+
const quantity = args.shift();
|
|
17107
17107
|
let cb = function() {
|
|
17108
17108
|
};
|
|
17109
|
-
if (typeof
|
|
17110
|
-
cb =
|
|
17109
|
+
if (typeof args[args.length - 1] === "function")
|
|
17110
|
+
cb = args.pop();
|
|
17111
17111
|
if (!this.cache[this.locale])
|
|
17112
17112
|
this._readLocaleFile();
|
|
17113
17113
|
let str = quantity === 1 ? singular : plural;
|
|
@@ -17131,7 +17131,7 @@ var Y18N = class {
|
|
|
17131
17131
|
const values = [str];
|
|
17132
17132
|
if (~str.indexOf("%d"))
|
|
17133
17133
|
values.push(quantity);
|
|
17134
|
-
return shim.format.apply(shim.format, values.concat(
|
|
17134
|
+
return shim.format.apply(shim.format, values.concat(args));
|
|
17135
17135
|
}
|
|
17136
17136
|
setLocale(locale) {
|
|
17137
17137
|
this.locale = locale;
|
|
@@ -17148,16 +17148,16 @@ var Y18N = class {
|
|
|
17148
17148
|
}
|
|
17149
17149
|
}
|
|
17150
17150
|
}
|
|
17151
|
-
_taggedLiteral(parts, ...
|
|
17151
|
+
_taggedLiteral(parts, ...args) {
|
|
17152
17152
|
let str = "";
|
|
17153
17153
|
parts.forEach(function(part, i) {
|
|
17154
|
-
const arg =
|
|
17154
|
+
const arg = args[i + 1];
|
|
17155
17155
|
str += part;
|
|
17156
17156
|
if (typeof arg !== "undefined") {
|
|
17157
17157
|
str += "%s";
|
|
17158
17158
|
}
|
|
17159
17159
|
});
|
|
17160
|
-
return this.__.apply(this, [str].concat([].slice.call(
|
|
17160
|
+
return this.__.apply(this, [str].concat([].slice.call(args, 1)));
|
|
17161
17161
|
}
|
|
17162
17162
|
_enqueueWrite(work) {
|
|
17163
17163
|
this.writeQueue.push(work);
|
|
@@ -17351,19 +17351,19 @@ function argsert(arg1, arg2, arg3) {
|
|
|
17351
17351
|
try {
|
|
17352
17352
|
let position = 0;
|
|
17353
17353
|
const [parsed, callerArguments, _length] = parseArgs();
|
|
17354
|
-
const
|
|
17355
|
-
while (
|
|
17356
|
-
|
|
17357
|
-
const length = _length ||
|
|
17354
|
+
const args = [].slice.call(callerArguments);
|
|
17355
|
+
while (args.length && args[args.length - 1] === void 0)
|
|
17356
|
+
args.pop();
|
|
17357
|
+
const length = _length || args.length;
|
|
17358
17358
|
if (length < parsed.demanded.length) {
|
|
17359
|
-
throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${
|
|
17359
|
+
throw new YError(`Not enough arguments provided. Expected ${parsed.demanded.length} but received ${args.length}.`);
|
|
17360
17360
|
}
|
|
17361
17361
|
const totalCommands = parsed.demanded.length + parsed.optional.length;
|
|
17362
17362
|
if (length > totalCommands) {
|
|
17363
17363
|
throw new YError(`Too many arguments provided. Expected max ${totalCommands} but received ${length}.`);
|
|
17364
17364
|
}
|
|
17365
17365
|
parsed.demanded.forEach((demanded) => {
|
|
17366
|
-
const arg =
|
|
17366
|
+
const arg = args.shift();
|
|
17367
17367
|
const observedType = guessType(arg);
|
|
17368
17368
|
const matchingTypes = demanded.cmd.filter((type) => type === observedType || type === "*");
|
|
17369
17369
|
if (matchingTypes.length === 0)
|
|
@@ -17371,9 +17371,9 @@ function argsert(arg1, arg2, arg3) {
|
|
|
17371
17371
|
position += 1;
|
|
17372
17372
|
});
|
|
17373
17373
|
parsed.optional.forEach((optional) => {
|
|
17374
|
-
if (
|
|
17374
|
+
if (args.length === 0)
|
|
17375
17375
|
return;
|
|
17376
|
-
const arg =
|
|
17376
|
+
const arg = args.shift();
|
|
17377
17377
|
const observedType = guessType(arg);
|
|
17378
17378
|
const matchingTypes = optional.cmd.filter((type) => type === observedType || type === "*");
|
|
17379
17379
|
if (matchingTypes.length === 0)
|
|
@@ -18333,37 +18333,37 @@ function usage(yargs, shim3) {
|
|
|
18333
18333
|
return ["(", description, ")"].join("");
|
|
18334
18334
|
};
|
|
18335
18335
|
self2.stringifiedValues = function stringifiedValues(values, separator) {
|
|
18336
|
-
let
|
|
18336
|
+
let string = "";
|
|
18337
18337
|
const sep = separator || ", ";
|
|
18338
18338
|
const array = [].concat(values);
|
|
18339
18339
|
if (!values || !array.length)
|
|
18340
|
-
return
|
|
18340
|
+
return string;
|
|
18341
18341
|
array.forEach((value) => {
|
|
18342
|
-
if (
|
|
18343
|
-
|
|
18344
|
-
|
|
18342
|
+
if (string.length)
|
|
18343
|
+
string += sep;
|
|
18344
|
+
string += JSON.stringify(value);
|
|
18345
18345
|
});
|
|
18346
|
-
return
|
|
18346
|
+
return string;
|
|
18347
18347
|
};
|
|
18348
18348
|
function defaultString(value, defaultDescription) {
|
|
18349
|
-
let
|
|
18349
|
+
let string = `[${__("default:")} `;
|
|
18350
18350
|
if (value === void 0 && !defaultDescription)
|
|
18351
18351
|
return null;
|
|
18352
18352
|
if (defaultDescription) {
|
|
18353
|
-
|
|
18353
|
+
string += defaultDescription;
|
|
18354
18354
|
} else {
|
|
18355
18355
|
switch (typeof value) {
|
|
18356
18356
|
case "string":
|
|
18357
|
-
|
|
18357
|
+
string += `"${value}"`;
|
|
18358
18358
|
break;
|
|
18359
18359
|
case "object":
|
|
18360
|
-
|
|
18360
|
+
string += JSON.stringify(value);
|
|
18361
18361
|
break;
|
|
18362
18362
|
default:
|
|
18363
|
-
|
|
18363
|
+
string += value;
|
|
18364
18364
|
}
|
|
18365
18365
|
}
|
|
18366
|
-
return `${
|
|
18366
|
+
return `${string}]`;
|
|
18367
18367
|
}
|
|
18368
18368
|
function windowWidth() {
|
|
18369
18369
|
const maxWidth2 = 80;
|
|
@@ -18511,32 +18511,32 @@ var Completion = class {
|
|
|
18511
18511
|
this.indexAfterLastReset = 0;
|
|
18512
18512
|
this.zshShell = (_c2 = ((_a2 = this.shim.getEnv("SHELL")) === null || _a2 === void 0 ? void 0 : _a2.includes("zsh")) || ((_b2 = this.shim.getEnv("ZSH_NAME")) === null || _b2 === void 0 ? void 0 : _b2.includes("zsh"))) !== null && _c2 !== void 0 ? _c2 : false;
|
|
18513
18513
|
}
|
|
18514
|
-
defaultCompletion(
|
|
18514
|
+
defaultCompletion(args, argv, current2, done) {
|
|
18515
18515
|
const handlers = this.command.getCommandHandlers();
|
|
18516
|
-
for (let i = 0, ii =
|
|
18517
|
-
if (handlers[
|
|
18518
|
-
const builder = handlers[
|
|
18516
|
+
for (let i = 0, ii = args.length; i < ii; ++i) {
|
|
18517
|
+
if (handlers[args[i]] && handlers[args[i]].builder) {
|
|
18518
|
+
const builder = handlers[args[i]].builder;
|
|
18519
18519
|
if (isCommandBuilderCallback(builder)) {
|
|
18520
18520
|
this.indexAfterLastReset = i + 1;
|
|
18521
|
-
const
|
|
18522
|
-
builder(
|
|
18523
|
-
return
|
|
18521
|
+
const y2 = this.yargs.getInternalMethods().reset();
|
|
18522
|
+
builder(y2, true);
|
|
18523
|
+
return y2.argv;
|
|
18524
18524
|
}
|
|
18525
18525
|
}
|
|
18526
18526
|
}
|
|
18527
18527
|
const completions = [];
|
|
18528
|
-
this.commandCompletions(completions,
|
|
18529
|
-
this.optionCompletions(completions,
|
|
18530
|
-
this.choicesFromOptionsCompletions(completions,
|
|
18531
|
-
this.choicesFromPositionalsCompletions(completions,
|
|
18528
|
+
this.commandCompletions(completions, args, current2);
|
|
18529
|
+
this.optionCompletions(completions, args, argv, current2);
|
|
18530
|
+
this.choicesFromOptionsCompletions(completions, args, argv, current2);
|
|
18531
|
+
this.choicesFromPositionalsCompletions(completions, args, argv, current2);
|
|
18532
18532
|
done(null, completions);
|
|
18533
18533
|
}
|
|
18534
|
-
commandCompletions(completions,
|
|
18534
|
+
commandCompletions(completions, args, current2) {
|
|
18535
18535
|
const parentCommands = this.yargs.getInternalMethods().getContext().commands;
|
|
18536
|
-
if (!current2.match(/^-/) && parentCommands[parentCommands.length - 1] !== current2 && !this.previousArgHasChoices(
|
|
18536
|
+
if (!current2.match(/^-/) && parentCommands[parentCommands.length - 1] !== current2 && !this.previousArgHasChoices(args)) {
|
|
18537
18537
|
this.usage.getCommands().forEach((usageCommand) => {
|
|
18538
18538
|
const commandName = parseCommand(usageCommand[0]).cmd;
|
|
18539
|
-
if (
|
|
18539
|
+
if (args.indexOf(commandName) === -1) {
|
|
18540
18540
|
if (!this.zshShell) {
|
|
18541
18541
|
completions.push(commandName);
|
|
18542
18542
|
} else {
|
|
@@ -18547,29 +18547,29 @@ var Completion = class {
|
|
|
18547
18547
|
});
|
|
18548
18548
|
}
|
|
18549
18549
|
}
|
|
18550
|
-
optionCompletions(completions,
|
|
18551
|
-
if ((current2.match(/^-/) || current2 === "" && completions.length === 0) && !this.previousArgHasChoices(
|
|
18550
|
+
optionCompletions(completions, args, argv, current2) {
|
|
18551
|
+
if ((current2.match(/^-/) || current2 === "" && completions.length === 0) && !this.previousArgHasChoices(args)) {
|
|
18552
18552
|
const options = this.yargs.getOptions();
|
|
18553
18553
|
const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [];
|
|
18554
18554
|
Object.keys(options.key).forEach((key) => {
|
|
18555
18555
|
const negable = !!options.configuration["boolean-negation"] && options.boolean.includes(key);
|
|
18556
18556
|
const isPositionalKey = positionalKeys.includes(key);
|
|
18557
|
-
if (!isPositionalKey && !options.hiddenOptions.includes(key) && !this.argsContainKey(
|
|
18557
|
+
if (!isPositionalKey && !options.hiddenOptions.includes(key) && !this.argsContainKey(args, key, negable)) {
|
|
18558
18558
|
this.completeOptionKey(key, completions, current2, negable && !!options.default[key]);
|
|
18559
18559
|
}
|
|
18560
18560
|
});
|
|
18561
18561
|
}
|
|
18562
18562
|
}
|
|
18563
|
-
choicesFromOptionsCompletions(completions,
|
|
18564
|
-
if (this.previousArgHasChoices(
|
|
18565
|
-
const choices = this.getPreviousArgChoices(
|
|
18563
|
+
choicesFromOptionsCompletions(completions, args, argv, current2) {
|
|
18564
|
+
if (this.previousArgHasChoices(args)) {
|
|
18565
|
+
const choices = this.getPreviousArgChoices(args);
|
|
18566
18566
|
if (choices && choices.length > 0) {
|
|
18567
18567
|
completions.push(...choices.map((c) => c.replace(/:/g, "\\:")));
|
|
18568
18568
|
}
|
|
18569
18569
|
}
|
|
18570
18570
|
}
|
|
18571
|
-
choicesFromPositionalsCompletions(completions,
|
|
18572
|
-
if (current2 === "" && completions.length > 0 && this.previousArgHasChoices(
|
|
18571
|
+
choicesFromPositionalsCompletions(completions, args, argv, current2) {
|
|
18572
|
+
if (current2 === "" && completions.length > 0 && this.previousArgHasChoices(args)) {
|
|
18573
18573
|
return;
|
|
18574
18574
|
}
|
|
18575
18575
|
const positionalKeys = this.yargs.getGroups()[this.usage.getPositionalGroupName()] || [];
|
|
@@ -18585,14 +18585,14 @@ var Completion = class {
|
|
|
18585
18585
|
}
|
|
18586
18586
|
}
|
|
18587
18587
|
}
|
|
18588
|
-
getPreviousArgChoices(
|
|
18589
|
-
if (
|
|
18588
|
+
getPreviousArgChoices(args) {
|
|
18589
|
+
if (args.length < 1)
|
|
18590
18590
|
return;
|
|
18591
|
-
let previousArg =
|
|
18591
|
+
let previousArg = args[args.length - 1];
|
|
18592
18592
|
let filter2 = "";
|
|
18593
|
-
if (!previousArg.startsWith("-") &&
|
|
18593
|
+
if (!previousArg.startsWith("-") && args.length > 1) {
|
|
18594
18594
|
filter2 = previousArg;
|
|
18595
|
-
previousArg =
|
|
18595
|
+
previousArg = args[args.length - 2];
|
|
18596
18596
|
}
|
|
18597
18597
|
if (!previousArg.startsWith("-"))
|
|
18598
18598
|
return;
|
|
@@ -18613,12 +18613,12 @@ var Completion = class {
|
|
|
18613
18613
|
return choices.filter((choice) => !filter2 || choice.startsWith(filter2));
|
|
18614
18614
|
}
|
|
18615
18615
|
}
|
|
18616
|
-
previousArgHasChoices(
|
|
18617
|
-
const choices = this.getPreviousArgChoices(
|
|
18616
|
+
previousArgHasChoices(args) {
|
|
18617
|
+
const choices = this.getPreviousArgChoices(args);
|
|
18618
18618
|
return choices !== void 0 && choices.length > 0;
|
|
18619
18619
|
}
|
|
18620
|
-
argsContainKey(
|
|
18621
|
-
const argsContains = (s) =>
|
|
18620
|
+
argsContainKey(args, key, negable) {
|
|
18621
|
+
const argsContains = (s) => args.indexOf((/^[^0-9]$/.test(s) ? "-" : "--") + s) !== -1;
|
|
18622
18622
|
if (argsContains(key))
|
|
18623
18623
|
return true;
|
|
18624
18624
|
if (negable && argsContains(`no-${key}`))
|
|
@@ -18652,7 +18652,7 @@ var Completion = class {
|
|
|
18652
18652
|
completions.push(dashes + "no-" + keyWithDesc);
|
|
18653
18653
|
}
|
|
18654
18654
|
}
|
|
18655
|
-
customCompletion(
|
|
18655
|
+
customCompletion(args, argv, current2, done) {
|
|
18656
18656
|
assertNotStrictEqual(this.customCompletionFunction, null, this.shim);
|
|
18657
18657
|
if (isSyncCompletionFunction(this.customCompletionFunction)) {
|
|
18658
18658
|
const result = this.customCompletionFunction(current2, argv);
|
|
@@ -18669,7 +18669,7 @@ var Completion = class {
|
|
|
18669
18669
|
}
|
|
18670
18670
|
return done(null, result);
|
|
18671
18671
|
} else if (isFallbackCompletionFunction(this.customCompletionFunction)) {
|
|
18672
|
-
return this.customCompletionFunction(current2, argv, (onCompleted = done) => this.defaultCompletion(
|
|
18672
|
+
return this.customCompletionFunction(current2, argv, (onCompleted = done) => this.defaultCompletion(args, argv, current2, onCompleted), (completions) => {
|
|
18673
18673
|
done(null, completions);
|
|
18674
18674
|
});
|
|
18675
18675
|
} else {
|
|
@@ -18678,10 +18678,10 @@ var Completion = class {
|
|
|
18678
18678
|
});
|
|
18679
18679
|
}
|
|
18680
18680
|
}
|
|
18681
|
-
getCompletion(
|
|
18682
|
-
const current2 =
|
|
18683
|
-
const argv = this.yargs.parse(
|
|
18684
|
-
const completionFunction = this.customCompletionFunction ? (argv2) => this.customCompletion(
|
|
18681
|
+
getCompletion(args, done) {
|
|
18682
|
+
const current2 = args.length ? args[args.length - 1] : "";
|
|
18683
|
+
const argv = this.yargs.parse(args, true);
|
|
18684
|
+
const completionFunction = this.customCompletionFunction ? (argv2) => this.customCompletion(args, argv2, current2, done) : (argv2) => this.defaultCompletion(args, argv2, current2, done);
|
|
18685
18685
|
return isPromise(argv) ? argv.then(completionFunction) : completionFunction(argv);
|
|
18686
18686
|
}
|
|
18687
18687
|
generateCompletionScript($0, cmd) {
|
|
@@ -19514,11 +19514,11 @@ var YargsInstance = class {
|
|
|
19514
19514
|
getAliases() {
|
|
19515
19515
|
return this.parsed ? this.parsed.aliases : {};
|
|
19516
19516
|
}
|
|
19517
|
-
async getCompletion(
|
|
19518
|
-
argsert("<array> [function]", [
|
|
19517
|
+
async getCompletion(args, done) {
|
|
19518
|
+
argsert("<array> [function]", [args, done], arguments.length);
|
|
19519
19519
|
if (!done) {
|
|
19520
19520
|
return new Promise((resolve7, reject) => {
|
|
19521
|
-
__classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(
|
|
19521
|
+
__classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, (err, completions) => {
|
|
19522
19522
|
if (err)
|
|
19523
19523
|
reject(err);
|
|
19524
19524
|
else
|
|
@@ -19526,7 +19526,7 @@ var YargsInstance = class {
|
|
|
19526
19526
|
});
|
|
19527
19527
|
});
|
|
19528
19528
|
} else {
|
|
19529
|
-
return __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(
|
|
19529
|
+
return __classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(args, done);
|
|
19530
19530
|
}
|
|
19531
19531
|
}
|
|
19532
19532
|
getDemandedOptions() {
|
|
@@ -19759,11 +19759,11 @@ var YargsInstance = class {
|
|
|
19759
19759
|
options(key, opt) {
|
|
19760
19760
|
return this.option(key, opt);
|
|
19761
19761
|
}
|
|
19762
|
-
parse(
|
|
19763
|
-
argsert("[string|array] [function|boolean|object] [function]", [
|
|
19762
|
+
parse(args, shortCircuit, _parseFn) {
|
|
19763
|
+
argsert("[string|array] [function|boolean|object] [function]", [args, shortCircuit, _parseFn], arguments.length);
|
|
19764
19764
|
this[kFreeze]();
|
|
19765
|
-
if (typeof
|
|
19766
|
-
|
|
19765
|
+
if (typeof args === "undefined") {
|
|
19766
|
+
args = __classPrivateFieldGet(this, _YargsInstance_processArgs, "f");
|
|
19767
19767
|
}
|
|
19768
19768
|
if (typeof shortCircuit === "object") {
|
|
19769
19769
|
__classPrivateFieldSet(this, _YargsInstance_parseContext, shortCircuit, "f");
|
|
@@ -19774,10 +19774,10 @@ var YargsInstance = class {
|
|
|
19774
19774
|
shortCircuit = false;
|
|
19775
19775
|
}
|
|
19776
19776
|
if (!shortCircuit)
|
|
19777
|
-
__classPrivateFieldSet(this, _YargsInstance_processArgs,
|
|
19777
|
+
__classPrivateFieldSet(this, _YargsInstance_processArgs, args, "f");
|
|
19778
19778
|
if (__classPrivateFieldGet(this, _YargsInstance_parseFn, "f"))
|
|
19779
19779
|
__classPrivateFieldSet(this, _YargsInstance_exitProcess, false, "f");
|
|
19780
|
-
const parsed = this[kRunYargsParserAndExecuteCommands](
|
|
19780
|
+
const parsed = this[kRunYargsParserAndExecuteCommands](args, !!shortCircuit);
|
|
19781
19781
|
const tmpParsed = this.parsed;
|
|
19782
19782
|
__classPrivateFieldGet(this, _YargsInstance_completion, "f").setParsed(this.parsed);
|
|
19783
19783
|
if (isPromise(parsed)) {
|
|
@@ -19802,12 +19802,12 @@ var YargsInstance = class {
|
|
|
19802
19802
|
}
|
|
19803
19803
|
return parsed;
|
|
19804
19804
|
}
|
|
19805
|
-
parseAsync(
|
|
19806
|
-
const maybePromise = this.parse(
|
|
19805
|
+
parseAsync(args, shortCircuit, _parseFn) {
|
|
19806
|
+
const maybePromise = this.parse(args, shortCircuit, _parseFn);
|
|
19807
19807
|
return !isPromise(maybePromise) ? Promise.resolve(maybePromise) : maybePromise;
|
|
19808
19808
|
}
|
|
19809
|
-
parseSync(
|
|
19810
|
-
const maybePromise = this.parse(
|
|
19809
|
+
parseSync(args, shortCircuit, _parseFn) {
|
|
19810
|
+
const maybePromise = this.parse(args, shortCircuit, _parseFn);
|
|
19811
19811
|
if (isPromise(maybePromise)) {
|
|
19812
19812
|
throw new YError(".parseSync() must not be used with asynchronous builders, handlers, or middleware");
|
|
19813
19813
|
}
|
|
@@ -20037,21 +20037,21 @@ var YargsInstance = class {
|
|
|
20037
20037
|
}
|
|
20038
20038
|
[kCreateLogger]() {
|
|
20039
20039
|
return {
|
|
20040
|
-
log: (...
|
|
20040
|
+
log: (...args) => {
|
|
20041
20041
|
if (!this[kHasParseCallback]())
|
|
20042
|
-
console.log(...
|
|
20042
|
+
console.log(...args);
|
|
20043
20043
|
__classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
|
|
20044
20044
|
if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length)
|
|
20045
20045
|
__classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + "\n", "f");
|
|
20046
|
-
__classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") +
|
|
20046
|
+
__classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(" "), "f");
|
|
20047
20047
|
},
|
|
20048
|
-
error: (...
|
|
20048
|
+
error: (...args) => {
|
|
20049
20049
|
if (!this[kHasParseCallback]())
|
|
20050
|
-
console.error(...
|
|
20050
|
+
console.error(...args);
|
|
20051
20051
|
__classPrivateFieldSet(this, _YargsInstance_hasOutput, true, "f");
|
|
20052
20052
|
if (__classPrivateFieldGet(this, _YargsInstance_output, "f").length)
|
|
20053
20053
|
__classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + "\n", "f");
|
|
20054
|
-
__classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") +
|
|
20054
|
+
__classPrivateFieldSet(this, _YargsInstance_output, __classPrivateFieldGet(this, _YargsInstance_output, "f") + args.join(" "), "f");
|
|
20055
20055
|
}
|
|
20056
20056
|
};
|
|
20057
20057
|
}
|
|
@@ -20131,10 +20131,10 @@ var YargsInstance = class {
|
|
|
20131
20131
|
return obj.version || "unknown";
|
|
20132
20132
|
}
|
|
20133
20133
|
[kParsePositionalNumbers](argv) {
|
|
20134
|
-
const
|
|
20135
|
-
for (let i = 0, arg; (arg =
|
|
20134
|
+
const args = argv["--"] ? argv["--"] : argv._;
|
|
20135
|
+
for (let i = 0, arg; (arg = args[i]) !== void 0; i++) {
|
|
20136
20136
|
if (__classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.looksLikeNumber(arg) && Number.isSafeInteger(Math.floor(parseFloat(`${arg}`)))) {
|
|
20137
|
-
|
|
20137
|
+
args[i] = Number(arg);
|
|
20138
20138
|
}
|
|
20139
20139
|
}
|
|
20140
20140
|
return argv;
|
|
@@ -20389,16 +20389,16 @@ var YargsInstance = class {
|
|
|
20389
20389
|
[kRebase](base, dir) {
|
|
20390
20390
|
return __classPrivateFieldGet(this, _YargsInstance_shim, "f").path.relative(base, dir);
|
|
20391
20391
|
}
|
|
20392
|
-
[kRunYargsParserAndExecuteCommands](
|
|
20392
|
+
[kRunYargsParserAndExecuteCommands](args, shortCircuit, calledFromCommand, commandIndex = 0, helpOnly = false) {
|
|
20393
20393
|
let skipValidation = !!calledFromCommand || helpOnly;
|
|
20394
|
-
|
|
20394
|
+
args = args || __classPrivateFieldGet(this, _YargsInstance_processArgs, "f");
|
|
20395
20395
|
__classPrivateFieldGet(this, _YargsInstance_options, "f").__ = __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.__;
|
|
20396
20396
|
__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration = this[kGetParserConfiguration]();
|
|
20397
20397
|
const populateDoubleDash = !!__classPrivateFieldGet(this, _YargsInstance_options, "f").configuration["populate--"];
|
|
20398
20398
|
const config = Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f").configuration, {
|
|
20399
20399
|
"populate--": true
|
|
20400
20400
|
});
|
|
20401
|
-
const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(
|
|
20401
|
+
const parsed = __classPrivateFieldGet(this, _YargsInstance_shim, "f").Parser.detailed(args, Object.assign({}, __classPrivateFieldGet(this, _YargsInstance_options, "f"), {
|
|
20402
20402
|
configuration: { "parse-positional-numbers": false, ...config }
|
|
20403
20403
|
}));
|
|
20404
20404
|
const argv = Object.assign(parsed.argv, __classPrivateFieldGet(this, _YargsInstance_parseContext, "f"));
|
|
@@ -20465,8 +20465,8 @@ var YargsInstance = class {
|
|
|
20465
20465
|
if (requestCompletions) {
|
|
20466
20466
|
if (__classPrivateFieldGet(this, _YargsInstance_exitProcess, "f"))
|
|
20467
20467
|
setBlocking(true);
|
|
20468
|
-
|
|
20469
|
-
const completionArgs =
|
|
20468
|
+
args = [].concat(args);
|
|
20469
|
+
const completionArgs = args.slice(args.indexOf(`--${__classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey}`) + 1);
|
|
20470
20470
|
__classPrivateFieldGet(this, _YargsInstance_completion, "f").getCompletion(completionArgs, (err, completions) => {
|
|
20471
20471
|
if (err)
|
|
20472
20472
|
throw new YError(err.message);
|
|
@@ -20553,12 +20553,13 @@ var YargsInstance = class {
|
|
|
20553
20553
|
}
|
|
20554
20554
|
}
|
|
20555
20555
|
};
|
|
20556
|
-
function isYargsInstance(
|
|
20557
|
-
return !!
|
|
20556
|
+
function isYargsInstance(y2) {
|
|
20557
|
+
return !!y2 && typeof y2.getInternalMethods === "function";
|
|
20558
20558
|
}
|
|
20559
20559
|
|
|
20560
20560
|
// ../../../node_modules/yargs/index.mjs
|
|
20561
20561
|
var Yargs = YargsFactory(esm_default);
|
|
20562
|
+
var yargs_default = Yargs;
|
|
20562
20563
|
|
|
20563
20564
|
// src/index.ts
|
|
20564
20565
|
var import_rc = __toESM(require_rc());
|
|
@@ -20918,32 +20919,32 @@ var supportsColor = {
|
|
|
20918
20919
|
var supports_color_default = supportsColor;
|
|
20919
20920
|
|
|
20920
20921
|
// ../../../node_modules/ora/node_modules/chalk/source/utilities.js
|
|
20921
|
-
function stringReplaceAll(
|
|
20922
|
-
let index =
|
|
20922
|
+
function stringReplaceAll(string, substring, replacer) {
|
|
20923
|
+
let index = string.indexOf(substring);
|
|
20923
20924
|
if (index === -1) {
|
|
20924
|
-
return
|
|
20925
|
+
return string;
|
|
20925
20926
|
}
|
|
20926
20927
|
const substringLength = substring.length;
|
|
20927
20928
|
let endIndex = 0;
|
|
20928
20929
|
let returnValue = "";
|
|
20929
20930
|
do {
|
|
20930
|
-
returnValue +=
|
|
20931
|
+
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
20931
20932
|
endIndex = index + substringLength;
|
|
20932
|
-
index =
|
|
20933
|
+
index = string.indexOf(substring, endIndex);
|
|
20933
20934
|
} while (index !== -1);
|
|
20934
|
-
returnValue +=
|
|
20935
|
+
returnValue += string.slice(endIndex);
|
|
20935
20936
|
return returnValue;
|
|
20936
20937
|
}
|
|
20937
|
-
function stringEncaseCRLFWithFirstIndex(
|
|
20938
|
+
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
20938
20939
|
let endIndex = 0;
|
|
20939
20940
|
let returnValue = "";
|
|
20940
20941
|
do {
|
|
20941
|
-
const gotCR =
|
|
20942
|
-
returnValue +=
|
|
20942
|
+
const gotCR = string[index - 1] === "\r";
|
|
20943
|
+
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix;
|
|
20943
20944
|
endIndex = index + 1;
|
|
20944
|
-
index =
|
|
20945
|
+
index = string.indexOf("\n", endIndex);
|
|
20945
20946
|
} while (index !== -1);
|
|
20946
|
-
returnValue +=
|
|
20947
|
+
returnValue += string.slice(endIndex);
|
|
20947
20948
|
return returnValue;
|
|
20948
20949
|
}
|
|
20949
20950
|
|
|
@@ -21068,26 +21069,26 @@ var createBuilder = (self2, _styler, _isEmpty) => {
|
|
|
21068
21069
|
builder[IS_EMPTY] = _isEmpty;
|
|
21069
21070
|
return builder;
|
|
21070
21071
|
};
|
|
21071
|
-
var applyStyle = (self2,
|
|
21072
|
-
if (self2.level <= 0 || !
|
|
21073
|
-
return self2[IS_EMPTY] ? "" :
|
|
21072
|
+
var applyStyle = (self2, string) => {
|
|
21073
|
+
if (self2.level <= 0 || !string) {
|
|
21074
|
+
return self2[IS_EMPTY] ? "" : string;
|
|
21074
21075
|
}
|
|
21075
21076
|
let styler = self2[STYLER];
|
|
21076
21077
|
if (styler === void 0) {
|
|
21077
|
-
return
|
|
21078
|
+
return string;
|
|
21078
21079
|
}
|
|
21079
21080
|
const { openAll, closeAll } = styler;
|
|
21080
|
-
if (
|
|
21081
|
+
if (string.includes("\x1B")) {
|
|
21081
21082
|
while (styler !== void 0) {
|
|
21082
|
-
|
|
21083
|
+
string = stringReplaceAll(string, styler.close, styler.open);
|
|
21083
21084
|
styler = styler.parent;
|
|
21084
21085
|
}
|
|
21085
21086
|
}
|
|
21086
|
-
const lfIndex =
|
|
21087
|
+
const lfIndex = string.indexOf("\n");
|
|
21087
21088
|
if (lfIndex !== -1) {
|
|
21088
|
-
|
|
21089
|
+
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
21089
21090
|
}
|
|
21090
|
-
return openAll +
|
|
21091
|
+
return openAll + string + closeAll;
|
|
21091
21092
|
};
|
|
21092
21093
|
Object.defineProperties(createChalk.prototype, styles2);
|
|
21093
21094
|
var chalk = createChalk();
|
|
@@ -21384,17 +21385,17 @@ var SignalExit = class extends SignalExitBase {
|
|
|
21384
21385
|
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
21385
21386
|
return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
|
|
21386
21387
|
}
|
|
21387
|
-
#processEmit(ev, ...
|
|
21388
|
+
#processEmit(ev, ...args) {
|
|
21388
21389
|
const og = this.#originalProcessEmit;
|
|
21389
21390
|
if (ev === "exit" && processOk(this.#process)) {
|
|
21390
|
-
if (typeof
|
|
21391
|
-
this.#process.exitCode =
|
|
21391
|
+
if (typeof args[0] === "number") {
|
|
21392
|
+
this.#process.exitCode = args[0];
|
|
21392
21393
|
}
|
|
21393
|
-
const ret = og.call(this.#process, ev, ...
|
|
21394
|
+
const ret = og.call(this.#process, ev, ...args);
|
|
21394
21395
|
this.#emitter.emit("exit", this.#process.exitCode, null);
|
|
21395
21396
|
return ret;
|
|
21396
21397
|
} else {
|
|
21397
|
-
return og.call(this.#process, ev, ...
|
|
21398
|
+
return og.call(this.#process, ev, ...args);
|
|
21398
21399
|
}
|
|
21399
21400
|
}
|
|
21400
21401
|
};
|
|
@@ -21507,11 +21508,11 @@ function ansiRegex({ onlyFirst = false } = {}) {
|
|
|
21507
21508
|
|
|
21508
21509
|
// ../../../node_modules/ora/node_modules/strip-ansi/index.js
|
|
21509
21510
|
var regex = ansiRegex();
|
|
21510
|
-
function stripAnsi2(
|
|
21511
|
-
if (typeof
|
|
21512
|
-
throw new TypeError(`Expected a \`string\`, got \`${typeof
|
|
21511
|
+
function stripAnsi2(string) {
|
|
21512
|
+
if (typeof string !== "string") {
|
|
21513
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
21513
21514
|
}
|
|
21514
|
-
return
|
|
21515
|
+
return string.replace(regex, "");
|
|
21515
21516
|
}
|
|
21516
21517
|
|
|
21517
21518
|
// ../../../node_modules/get-east-asian-width/lookup.js
|
|
@@ -21543,8 +21544,8 @@ function eastAsianWidth(codePoint, { ambiguousAsWide = false } = {}) {
|
|
|
21543
21544
|
var import_emoji_regex = __toESM(require_emoji_regex(), 1);
|
|
21544
21545
|
var segmenter = new Intl.Segmenter();
|
|
21545
21546
|
var defaultIgnorableCodePointRegex = /^\p{Default_Ignorable_Code_Point}$/u;
|
|
21546
|
-
function stringWidth(
|
|
21547
|
-
if (typeof
|
|
21547
|
+
function stringWidth(string, options = {}) {
|
|
21548
|
+
if (typeof string !== "string" || string.length === 0) {
|
|
21548
21549
|
return 0;
|
|
21549
21550
|
}
|
|
21550
21551
|
const {
|
|
@@ -21552,14 +21553,14 @@ function stringWidth(string2, options = {}) {
|
|
|
21552
21553
|
countAnsiEscapeCodes = false
|
|
21553
21554
|
} = options;
|
|
21554
21555
|
if (!countAnsiEscapeCodes) {
|
|
21555
|
-
|
|
21556
|
+
string = stripAnsi2(string);
|
|
21556
21557
|
}
|
|
21557
|
-
if (
|
|
21558
|
+
if (string.length === 0) {
|
|
21558
21559
|
return 0;
|
|
21559
21560
|
}
|
|
21560
21561
|
let width = 0;
|
|
21561
21562
|
const eastAsianWidthOptions = { ambiguousAsWide: !ambiguousIsNarrow };
|
|
21562
|
-
for (const { segment: character } of segmenter.segment(
|
|
21563
|
+
for (const { segment: character } of segmenter.segment(string)) {
|
|
21563
21564
|
const codePoint = character.codePointAt(0);
|
|
21564
21565
|
if (codePoint <= 31 || codePoint >= 127 && codePoint <= 159) {
|
|
21565
21566
|
continue;
|
|
@@ -21947,28 +21948,28 @@ function ora(options) {
|
|
|
21947
21948
|
var import_util4 = require("util");
|
|
21948
21949
|
var instance = ora();
|
|
21949
21950
|
var currentProgress = void 0;
|
|
21950
|
-
function logInfo(message, ...
|
|
21951
|
-
const msg = (0, import_util4.format)(message, ...
|
|
21951
|
+
function logInfo(message, ...args) {
|
|
21952
|
+
const msg = (0, import_util4.format)(message, ...args);
|
|
21952
21953
|
instance.info(msg);
|
|
21953
21954
|
return msg;
|
|
21954
21955
|
}
|
|
21955
|
-
function logDone(message, ...
|
|
21956
|
-
const msg = (0, import_util4.format)(message, ...
|
|
21956
|
+
function logDone(message, ...args) {
|
|
21957
|
+
const msg = (0, import_util4.format)(message, ...args);
|
|
21957
21958
|
instance.succeed(msg);
|
|
21958
21959
|
return msg;
|
|
21959
21960
|
}
|
|
21960
|
-
function logWarn(message, ...
|
|
21961
|
-
const msg = (0, import_util4.format)(message, ...
|
|
21961
|
+
function logWarn(message, ...args) {
|
|
21962
|
+
const msg = (0, import_util4.format)(message, ...args);
|
|
21962
21963
|
instance.warn(msg);
|
|
21963
21964
|
return msg;
|
|
21964
21965
|
}
|
|
21965
|
-
function logFail(message, ...
|
|
21966
|
-
const msg = (0, import_util4.format)(message, ...
|
|
21966
|
+
function logFail(message, ...args) {
|
|
21967
|
+
const msg = (0, import_util4.format)(message, ...args);
|
|
21967
21968
|
instance.fail(msg);
|
|
21968
21969
|
return msg;
|
|
21969
21970
|
}
|
|
21970
|
-
function progress(message, ...
|
|
21971
|
-
const msg = (0, import_util4.format)(message, ...
|
|
21971
|
+
function progress(message, ...args) {
|
|
21972
|
+
const msg = (0, import_util4.format)(message, ...args);
|
|
21972
21973
|
instance.start(msg);
|
|
21973
21974
|
currentProgress = msg;
|
|
21974
21975
|
}
|
|
@@ -21979,8 +21980,8 @@ function logSuspend() {
|
|
|
21979
21980
|
logReset();
|
|
21980
21981
|
return () => instance.start(currentProgress);
|
|
21981
21982
|
}
|
|
21982
|
-
function fail(message, ...
|
|
21983
|
-
logFail(message, ...
|
|
21983
|
+
function fail(message, ...args) {
|
|
21984
|
+
logFail(message, ...args);
|
|
21984
21985
|
process.exit(1);
|
|
21985
21986
|
}
|
|
21986
21987
|
|
|
@@ -23545,9 +23546,9 @@ var ZlibHeaderTransformStream_default = ZlibHeaderTransformStream;
|
|
|
23545
23546
|
|
|
23546
23547
|
// ../../../node_modules/axios/lib/helpers/callbackify.js
|
|
23547
23548
|
var callbackify = (fn, reducer) => {
|
|
23548
|
-
return utils_default.isAsyncFn(fn) ? function(...
|
|
23549
|
-
const cb =
|
|
23550
|
-
fn.apply(this,
|
|
23549
|
+
return utils_default.isAsyncFn(fn) ? function(...args) {
|
|
23550
|
+
const cb = args.pop();
|
|
23551
|
+
fn.apply(this, args).then((value) => {
|
|
23551
23552
|
try {
|
|
23552
23553
|
reducer ? cb(null, ...reducer(value)) : cb(null, value);
|
|
23553
23554
|
} catch (err) {
|
|
@@ -23600,22 +23601,22 @@ function throttle(fn, freq) {
|
|
|
23600
23601
|
let threshold = 1e3 / freq;
|
|
23601
23602
|
let lastArgs;
|
|
23602
23603
|
let timer;
|
|
23603
|
-
const invoke = (
|
|
23604
|
+
const invoke = (args, now = Date.now()) => {
|
|
23604
23605
|
timestamp = now;
|
|
23605
23606
|
lastArgs = null;
|
|
23606
23607
|
if (timer) {
|
|
23607
23608
|
clearTimeout(timer);
|
|
23608
23609
|
timer = null;
|
|
23609
23610
|
}
|
|
23610
|
-
fn.apply(null,
|
|
23611
|
+
fn.apply(null, args);
|
|
23611
23612
|
};
|
|
23612
|
-
const throttled = (...
|
|
23613
|
+
const throttled = (...args) => {
|
|
23613
23614
|
const now = Date.now();
|
|
23614
23615
|
const passed = now - timestamp;
|
|
23615
23616
|
if (passed >= threshold) {
|
|
23616
|
-
invoke(
|
|
23617
|
+
invoke(args, now);
|
|
23617
23618
|
} else {
|
|
23618
|
-
lastArgs =
|
|
23619
|
+
lastArgs = args;
|
|
23619
23620
|
if (!timer) {
|
|
23620
23621
|
timer = setTimeout(() => {
|
|
23621
23622
|
timer = null;
|
|
@@ -23662,7 +23663,7 @@ var progressEventDecorator = (total, throttled) => {
|
|
|
23662
23663
|
loaded
|
|
23663
23664
|
}), throttled[1]];
|
|
23664
23665
|
};
|
|
23665
|
-
var asyncDecorator = (fn) => (...
|
|
23666
|
+
var asyncDecorator = (fn) => (...args) => utils_default.asap(() => fn(...args));
|
|
23666
23667
|
|
|
23667
23668
|
// ../../../node_modules/axios/lib/adapters/http.js
|
|
23668
23669
|
var zlibOptions = {
|
|
@@ -24596,9 +24597,9 @@ var trackStream = (stream4, chunkSize, onProgress, onFinish) => {
|
|
|
24596
24597
|
var isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
|
|
24597
24598
|
var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
|
|
24598
24599
|
var encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
|
|
24599
|
-
var test = (fn, ...
|
|
24600
|
+
var test = (fn, ...args) => {
|
|
24600
24601
|
try {
|
|
24601
|
-
return !!fn(...
|
|
24602
|
+
return !!fn(...args);
|
|
24602
24603
|
} catch (e) {
|
|
24603
24604
|
return false;
|
|
24604
24605
|
}
|
|
@@ -25572,15 +25573,15 @@ function runScript(script, cwd = process.cwd(), output = process.stdout) {
|
|
|
25572
25573
|
cp.on("close", (code) => code === 0 ? resolve7() : reject(new Error(error.value)));
|
|
25573
25574
|
});
|
|
25574
25575
|
}
|
|
25575
|
-
function runCommand(exe,
|
|
25576
|
+
function runCommand(exe, args, cwd, output) {
|
|
25576
25577
|
const npmCommand = isWindows ? `${exe}.cmd` : exe;
|
|
25577
|
-
const sanitizedArgs = sanitizeCmdArgs(
|
|
25578
|
+
const sanitizedArgs = sanitizeCmdArgs(args);
|
|
25578
25579
|
const cmd = [npmCommand, ...sanitizedArgs].join(" ");
|
|
25579
25580
|
return runScript(cmd, cwd, output);
|
|
25580
25581
|
}
|
|
25581
|
-
function sanitizeCmdArgs(
|
|
25582
|
+
function sanitizeCmdArgs(args) {
|
|
25582
25583
|
const quote = isWindows ? '"' : "'";
|
|
25583
|
-
return
|
|
25584
|
+
return args.map((arg) => {
|
|
25584
25585
|
let result = arg.trim();
|
|
25585
25586
|
if (/\s/.test(result)) {
|
|
25586
25587
|
if (!result.startsWith(quote)) {
|
|
@@ -25595,9 +25596,9 @@ function sanitizeCmdArgs(args2) {
|
|
|
25595
25596
|
}
|
|
25596
25597
|
|
|
25597
25598
|
// src/utils.ts
|
|
25598
|
-
function runNpmProcess(
|
|
25599
|
+
function runNpmProcess(args, target, output) {
|
|
25599
25600
|
const cwd = (0, import_path7.resolve)(process.cwd(), target);
|
|
25600
|
-
return runCommand("npm",
|
|
25601
|
+
return runCommand("npm", args, cwd, output);
|
|
25601
25602
|
}
|
|
25602
25603
|
async function findTarball(packageRef, target = ".", ...flags) {
|
|
25603
25604
|
const ms = new MemoryStream();
|
|
@@ -25714,8 +25715,9 @@ var defaultArgs = (0, import_rc.default)("microfrontend", {
|
|
|
25714
25715
|
headers: {},
|
|
25715
25716
|
interactive: false
|
|
25716
25717
|
});
|
|
25717
|
-
var
|
|
25718
|
+
var y = yargs_default(process.argv.slice(2), current).string("source").describe("source", "Sets the source of either the previously packed *.tgz bundle or the directory to publish.").default("source", current).string("url").describe("url", "Sets the explicit URL where to publish the micro frontend to.").default("url", defaultArgs.url).string("api-key").describe("api-key", "Sets the potential API key to send to the service.").default("api-key", defaultArgs.apiKey).string("cert").describe("cert", "Sets a custom certificate authority to use, if any.").default("cert", defaultArgs.cert).boolean("allow-self-signed").describe("allow-self-signed", "Indicates that self-signed certificates should be allowed.").default("allow-self-signed", defaultArgs.allowSelfSigned).choices("mode", publishModeKeys).describe("mode", "Sets the authorization mode to use.").default("mode", defaultArgs.mode).alias("mode", "auth-mode").choices("from", fromKeys).describe("from", "Sets the type of the source to use for publishing.").default("from", defaultArgs.from).option("fields", void 0).describe("fields", "Sets additional fields to be included in the feed service request.").default("fields", defaultArgs.fields).option("headers", void 0).describe("headers", "Sets additional headers to be included in the feed service request.").default("headers", defaultArgs.headers).boolean("interactive").describe("interactive", "Defines if authorization tokens can be retrieved interactively.").default("interactive", defaultArgs.interactive);
|
|
25718
25719
|
async function run() {
|
|
25720
|
+
const args = await y.argv;
|
|
25719
25721
|
const {
|
|
25720
25722
|
cert,
|
|
25721
25723
|
source,
|