@modern-js/upgrade-generator 3.1.0 → 3.1.1
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/dist/index.js +1014 -911
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -134434,55 +134434,58 @@ var require_recursive_readdir2 = __commonJS({
|
|
|
134434
134434
|
var require_commander2 = __commonJS({
|
|
134435
134435
|
"../../../toolkit/utils/compiled/commander/index.js"(exports, module2) {
|
|
134436
134436
|
(() => {
|
|
134437
|
-
var
|
|
134437
|
+
var t = { 81: (t2) => {
|
|
134438
134438
|
"use strict";
|
|
134439
|
-
|
|
134440
|
-
}, 361: (
|
|
134439
|
+
t2.exports = require("child_process");
|
|
134440
|
+
}, 361: (t2) => {
|
|
134441
134441
|
"use strict";
|
|
134442
|
-
|
|
134443
|
-
}, 147: (
|
|
134442
|
+
t2.exports = require("events");
|
|
134443
|
+
}, 147: (t2) => {
|
|
134444
134444
|
"use strict";
|
|
134445
|
-
|
|
134446
|
-
}, 17: (
|
|
134445
|
+
t2.exports = require("fs");
|
|
134446
|
+
}, 17: (t2) => {
|
|
134447
134447
|
"use strict";
|
|
134448
|
-
|
|
134449
|
-
},
|
|
134450
|
-
|
|
134451
|
-
|
|
134452
|
-
|
|
134453
|
-
const {
|
|
134454
|
-
const {
|
|
134455
|
-
|
|
134456
|
-
|
|
134457
|
-
|
|
134458
|
-
t2.
|
|
134459
|
-
|
|
134460
|
-
|
|
134461
|
-
|
|
134462
|
-
|
|
134463
|
-
|
|
134464
|
-
|
|
134465
|
-
|
|
134448
|
+
t2.exports = require("path");
|
|
134449
|
+
}, 282: (t2) => {
|
|
134450
|
+
"use strict";
|
|
134451
|
+
t2.exports = require("process");
|
|
134452
|
+
}, 632: (t2, e2, i2) => {
|
|
134453
|
+
const { Argument: n } = i2(535);
|
|
134454
|
+
const { Command: s } = i2(302);
|
|
134455
|
+
const { CommanderError: r, InvalidArgumentError: o } = i2(796);
|
|
134456
|
+
const { Help: a } = i2(519);
|
|
134457
|
+
const { Option: l } = i2(437);
|
|
134458
|
+
e2 = t2.exports = new s();
|
|
134459
|
+
e2.program = e2;
|
|
134460
|
+
e2.Argument = n;
|
|
134461
|
+
e2.Command = s;
|
|
134462
|
+
e2.CommanderError = r;
|
|
134463
|
+
e2.Help = a;
|
|
134464
|
+
e2.InvalidArgumentError = o;
|
|
134465
|
+
e2.InvalidOptionArgumentError = o;
|
|
134466
|
+
e2.Option = l;
|
|
134467
|
+
}, 535: (t2, e2, i2) => {
|
|
134468
|
+
const { InvalidArgumentError: n } = i2(796);
|
|
134466
134469
|
class Argument {
|
|
134467
|
-
constructor(
|
|
134468
|
-
this.description =
|
|
134470
|
+
constructor(t3, e3) {
|
|
134471
|
+
this.description = e3 || "";
|
|
134469
134472
|
this.variadic = false;
|
|
134470
134473
|
this.parseArg = void 0;
|
|
134471
134474
|
this.defaultValue = void 0;
|
|
134472
134475
|
this.defaultValueDescription = void 0;
|
|
134473
134476
|
this.argChoices = void 0;
|
|
134474
|
-
switch (
|
|
134477
|
+
switch (t3[0]) {
|
|
134475
134478
|
case "<":
|
|
134476
134479
|
this.required = true;
|
|
134477
|
-
this._name =
|
|
134480
|
+
this._name = t3.slice(1, -1);
|
|
134478
134481
|
break;
|
|
134479
134482
|
case "[":
|
|
134480
134483
|
this.required = false;
|
|
134481
|
-
this._name =
|
|
134484
|
+
this._name = t3.slice(1, -1);
|
|
134482
134485
|
break;
|
|
134483
134486
|
default:
|
|
134484
134487
|
this.required = true;
|
|
134485
|
-
this._name =
|
|
134488
|
+
this._name = t3;
|
|
134486
134489
|
break;
|
|
134487
134490
|
}
|
|
134488
134491
|
if (this._name.length > 3 && this._name.slice(-3) === "...") {
|
|
@@ -134493,31 +134496,31 @@ var require_commander2 = __commonJS({
|
|
|
134493
134496
|
name() {
|
|
134494
134497
|
return this._name;
|
|
134495
134498
|
}
|
|
134496
|
-
_concatValue(
|
|
134497
|
-
if (
|
|
134498
|
-
return [
|
|
134499
|
+
_concatValue(t3, e3) {
|
|
134500
|
+
if (e3 === this.defaultValue || !Array.isArray(e3)) {
|
|
134501
|
+
return [t3];
|
|
134499
134502
|
}
|
|
134500
|
-
return
|
|
134503
|
+
return e3.concat(t3);
|
|
134501
134504
|
}
|
|
134502
|
-
default(
|
|
134503
|
-
this.defaultValue =
|
|
134504
|
-
this.defaultValueDescription =
|
|
134505
|
+
default(t3, e3) {
|
|
134506
|
+
this.defaultValue = t3;
|
|
134507
|
+
this.defaultValueDescription = e3;
|
|
134505
134508
|
return this;
|
|
134506
134509
|
}
|
|
134507
|
-
argParser(
|
|
134508
|
-
this.parseArg =
|
|
134510
|
+
argParser(t3) {
|
|
134511
|
+
this.parseArg = t3;
|
|
134509
134512
|
return this;
|
|
134510
134513
|
}
|
|
134511
|
-
choices(
|
|
134512
|
-
this.argChoices =
|
|
134513
|
-
this.parseArg = (
|
|
134514
|
-
if (!
|
|
134515
|
-
throw new n(`Allowed choices are ${
|
|
134514
|
+
choices(t3) {
|
|
134515
|
+
this.argChoices = t3.slice();
|
|
134516
|
+
this.parseArg = (t4, e3) => {
|
|
134517
|
+
if (!this.argChoices.includes(t4)) {
|
|
134518
|
+
throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
134516
134519
|
}
|
|
134517
134520
|
if (this.variadic) {
|
|
134518
|
-
return this._concatValue(
|
|
134521
|
+
return this._concatValue(t4, e3);
|
|
134519
134522
|
}
|
|
134520
|
-
return
|
|
134523
|
+
return t4;
|
|
134521
134524
|
};
|
|
134522
134525
|
return this;
|
|
134523
134526
|
}
|
|
@@ -134530,24 +134533,25 @@ var require_commander2 = __commonJS({
|
|
|
134530
134533
|
return this;
|
|
134531
134534
|
}
|
|
134532
134535
|
}
|
|
134533
|
-
function humanReadableArgName(
|
|
134534
|
-
const
|
|
134535
|
-
return
|
|
134536
|
+
function humanReadableArgName(t3) {
|
|
134537
|
+
const e3 = t3.name() + (t3.variadic === true ? "..." : "");
|
|
134538
|
+
return t3.required ? "<" + e3 + ">" : "[" + e3 + "]";
|
|
134536
134539
|
}
|
|
134537
|
-
|
|
134538
|
-
|
|
134539
|
-
},
|
|
134540
|
+
e2.Argument = Argument;
|
|
134541
|
+
e2.humanReadableArgName = humanReadableArgName;
|
|
134542
|
+
}, 302: (t2, e2, i2) => {
|
|
134540
134543
|
const n = i2(361).EventEmitter;
|
|
134541
134544
|
const s = i2(81);
|
|
134542
134545
|
const r = i2(17);
|
|
134543
134546
|
const o = i2(147);
|
|
134544
|
-
const
|
|
134545
|
-
const {
|
|
134546
|
-
const {
|
|
134547
|
-
const {
|
|
134548
|
-
const {
|
|
134547
|
+
const a = i2(282);
|
|
134548
|
+
const { Argument: l, humanReadableArgName: h } = i2(535);
|
|
134549
|
+
const { CommanderError: u } = i2(796);
|
|
134550
|
+
const { Help: c } = i2(519);
|
|
134551
|
+
const { Option: p, splitOptionFlags: m, DualOptions: d } = i2(437);
|
|
134552
|
+
const { suggestSimilar: f } = i2(860);
|
|
134549
134553
|
class Command2 extends n {
|
|
134550
|
-
constructor(
|
|
134554
|
+
constructor(t3) {
|
|
134551
134555
|
super();
|
|
134552
134556
|
this.commands = [];
|
|
134553
134557
|
this.options = [];
|
|
@@ -134559,25 +134563,27 @@ var require_commander2 = __commonJS({
|
|
|
134559
134563
|
this.rawArgs = [];
|
|
134560
134564
|
this.processedArgs = [];
|
|
134561
134565
|
this._scriptPath = null;
|
|
134562
|
-
this._name =
|
|
134566
|
+
this._name = t3 || "";
|
|
134563
134567
|
this._optionValues = {};
|
|
134564
134568
|
this._optionValueSources = {};
|
|
134565
134569
|
this._storeOptionsAsProperties = false;
|
|
134566
134570
|
this._actionHandler = null;
|
|
134567
134571
|
this._executableHandler = false;
|
|
134568
134572
|
this._executableFile = null;
|
|
134573
|
+
this._executableDir = null;
|
|
134569
134574
|
this._defaultCommandName = null;
|
|
134570
134575
|
this._exitCallback = null;
|
|
134571
134576
|
this._aliases = [];
|
|
134572
134577
|
this._combineFlagAndOptionalValue = true;
|
|
134573
134578
|
this._description = "";
|
|
134579
|
+
this._summary = "";
|
|
134574
134580
|
this._argsDescription = void 0;
|
|
134575
134581
|
this._enablePositionalOptions = false;
|
|
134576
134582
|
this._passThroughOptions = false;
|
|
134577
134583
|
this._lifeCycleHooks = {};
|
|
134578
134584
|
this._showHelpAfterError = false;
|
|
134579
|
-
this._showSuggestionAfterError =
|
|
134580
|
-
this._outputConfiguration = { writeOut: (
|
|
134585
|
+
this._showSuggestionAfterError = true;
|
|
134586
|
+
this._outputConfiguration = { writeOut: (t4) => a.stdout.write(t4), writeErr: (t4) => a.stderr.write(t4), getOutHelpWidth: () => a.stdout.isTTY ? a.stdout.columns : void 0, getErrHelpWidth: () => a.stderr.isTTY ? a.stderr.columns : void 0, outputError: (t4, e3) => e3(t4) };
|
|
134581
134587
|
this._hidden = false;
|
|
134582
134588
|
this._hasHelpOption = true;
|
|
134583
134589
|
this._helpFlags = "-h, --help";
|
|
@@ -134590,35 +134596,35 @@ var require_commander2 = __commonJS({
|
|
|
134590
134596
|
this._helpCommandDescription = "display help for command";
|
|
134591
134597
|
this._helpConfiguration = {};
|
|
134592
134598
|
}
|
|
134593
|
-
copyInheritedSettings(
|
|
134594
|
-
this._outputConfiguration =
|
|
134595
|
-
this._hasHelpOption =
|
|
134596
|
-
this._helpFlags =
|
|
134597
|
-
this._helpDescription =
|
|
134598
|
-
this._helpShortFlag =
|
|
134599
|
-
this._helpLongFlag =
|
|
134600
|
-
this._helpCommandName =
|
|
134601
|
-
this._helpCommandnameAndArgs =
|
|
134602
|
-
this._helpCommandDescription =
|
|
134603
|
-
this._helpConfiguration =
|
|
134604
|
-
this._exitCallback =
|
|
134605
|
-
this._storeOptionsAsProperties =
|
|
134606
|
-
this._combineFlagAndOptionalValue =
|
|
134607
|
-
this._allowExcessArguments =
|
|
134608
|
-
this._enablePositionalOptions =
|
|
134609
|
-
this._showHelpAfterError =
|
|
134610
|
-
this._showSuggestionAfterError =
|
|
134599
|
+
copyInheritedSettings(t3) {
|
|
134600
|
+
this._outputConfiguration = t3._outputConfiguration;
|
|
134601
|
+
this._hasHelpOption = t3._hasHelpOption;
|
|
134602
|
+
this._helpFlags = t3._helpFlags;
|
|
134603
|
+
this._helpDescription = t3._helpDescription;
|
|
134604
|
+
this._helpShortFlag = t3._helpShortFlag;
|
|
134605
|
+
this._helpLongFlag = t3._helpLongFlag;
|
|
134606
|
+
this._helpCommandName = t3._helpCommandName;
|
|
134607
|
+
this._helpCommandnameAndArgs = t3._helpCommandnameAndArgs;
|
|
134608
|
+
this._helpCommandDescription = t3._helpCommandDescription;
|
|
134609
|
+
this._helpConfiguration = t3._helpConfiguration;
|
|
134610
|
+
this._exitCallback = t3._exitCallback;
|
|
134611
|
+
this._storeOptionsAsProperties = t3._storeOptionsAsProperties;
|
|
134612
|
+
this._combineFlagAndOptionalValue = t3._combineFlagAndOptionalValue;
|
|
134613
|
+
this._allowExcessArguments = t3._allowExcessArguments;
|
|
134614
|
+
this._enablePositionalOptions = t3._enablePositionalOptions;
|
|
134615
|
+
this._showHelpAfterError = t3._showHelpAfterError;
|
|
134616
|
+
this._showSuggestionAfterError = t3._showSuggestionAfterError;
|
|
134611
134617
|
return this;
|
|
134612
134618
|
}
|
|
134613
|
-
command(
|
|
134614
|
-
let n2 =
|
|
134619
|
+
command(t3, e3, i3) {
|
|
134620
|
+
let n2 = e3;
|
|
134615
134621
|
let s2 = i3;
|
|
134616
134622
|
if (typeof n2 === "object" && n2 !== null) {
|
|
134617
134623
|
s2 = n2;
|
|
134618
134624
|
n2 = null;
|
|
134619
134625
|
}
|
|
134620
134626
|
s2 = s2 || {};
|
|
134621
|
-
const [, r2, o2] =
|
|
134627
|
+
const [, r2, o2] = t3.match(/([^ ]+) *(.*)/);
|
|
134622
134628
|
const a2 = this.createCommand(r2);
|
|
134623
134629
|
if (n2) {
|
|
134624
134630
|
a2.description(n2);
|
|
@@ -134637,60 +134643,53 @@ var require_commander2 = __commonJS({
|
|
|
134637
134643
|
return this;
|
|
134638
134644
|
return a2;
|
|
134639
134645
|
}
|
|
134640
|
-
createCommand(
|
|
134641
|
-
return new Command2(
|
|
134646
|
+
createCommand(t3) {
|
|
134647
|
+
return new Command2(t3);
|
|
134642
134648
|
}
|
|
134643
134649
|
createHelp() {
|
|
134644
|
-
return Object.assign(new
|
|
134650
|
+
return Object.assign(new c(), this.configureHelp());
|
|
134645
134651
|
}
|
|
134646
|
-
configureHelp(
|
|
134647
|
-
if (
|
|
134652
|
+
configureHelp(t3) {
|
|
134653
|
+
if (t3 === void 0)
|
|
134648
134654
|
return this._helpConfiguration;
|
|
134649
|
-
this._helpConfiguration =
|
|
134655
|
+
this._helpConfiguration = t3;
|
|
134650
134656
|
return this;
|
|
134651
134657
|
}
|
|
134652
|
-
configureOutput(
|
|
134653
|
-
if (
|
|
134658
|
+
configureOutput(t3) {
|
|
134659
|
+
if (t3 === void 0)
|
|
134654
134660
|
return this._outputConfiguration;
|
|
134655
|
-
Object.assign(this._outputConfiguration,
|
|
134661
|
+
Object.assign(this._outputConfiguration, t3);
|
|
134656
134662
|
return this;
|
|
134657
134663
|
}
|
|
134658
|
-
showHelpAfterError(
|
|
134659
|
-
if (typeof
|
|
134660
|
-
|
|
134661
|
-
this._showHelpAfterError =
|
|
134664
|
+
showHelpAfterError(t3 = true) {
|
|
134665
|
+
if (typeof t3 !== "string")
|
|
134666
|
+
t3 = !!t3;
|
|
134667
|
+
this._showHelpAfterError = t3;
|
|
134662
134668
|
return this;
|
|
134663
134669
|
}
|
|
134664
|
-
showSuggestionAfterError(
|
|
134665
|
-
this._showSuggestionAfterError = !!
|
|
134670
|
+
showSuggestionAfterError(t3 = true) {
|
|
134671
|
+
this._showSuggestionAfterError = !!t3;
|
|
134666
134672
|
return this;
|
|
134667
134673
|
}
|
|
134668
|
-
addCommand(
|
|
134669
|
-
if (!
|
|
134670
|
-
throw new Error(
|
|
134671
|
-
|
|
134672
|
-
e4.forEach((e5) => {
|
|
134673
|
-
if (e5._executableHandler && !e5._executableFile) {
|
|
134674
|
-
throw new Error(`Must specify executableFile for deeply nested executable: ${e5.name()}`);
|
|
134675
|
-
}
|
|
134676
|
-
checkExplicitNames(e5.commands);
|
|
134677
|
-
});
|
|
134674
|
+
addCommand(t3, e3) {
|
|
134675
|
+
if (!t3._name) {
|
|
134676
|
+
throw new Error(`Command passed to .addCommand() must have a name
|
|
134677
|
+
- specify the name in Command constructor or using .name()`);
|
|
134678
134678
|
}
|
|
134679
|
-
|
|
134680
|
-
|
|
134681
|
-
|
|
134682
|
-
|
|
134683
|
-
|
|
134684
|
-
|
|
134685
|
-
this
|
|
134686
|
-
e3.parent = this;
|
|
134679
|
+
e3 = e3 || {};
|
|
134680
|
+
if (e3.isDefault)
|
|
134681
|
+
this._defaultCommandName = t3._name;
|
|
134682
|
+
if (e3.noHelp || e3.hidden)
|
|
134683
|
+
t3._hidden = true;
|
|
134684
|
+
this.commands.push(t3);
|
|
134685
|
+
t3.parent = this;
|
|
134687
134686
|
return this;
|
|
134688
134687
|
}
|
|
134689
|
-
createArgument(
|
|
134690
|
-
return new
|
|
134688
|
+
createArgument(t3, e3) {
|
|
134689
|
+
return new l(t3, e3);
|
|
134691
134690
|
}
|
|
134692
|
-
argument(
|
|
134693
|
-
const s2 = this.createArgument(
|
|
134691
|
+
argument(t3, e3, i3, n2) {
|
|
134692
|
+
const s2 = this.createArgument(t3, e3);
|
|
134694
134693
|
if (typeof i3 === "function") {
|
|
134695
134694
|
s2.default(n2).argParser(i3);
|
|
134696
134695
|
} else {
|
|
@@ -134699,33 +134698,33 @@ var require_commander2 = __commonJS({
|
|
|
134699
134698
|
this.addArgument(s2);
|
|
134700
134699
|
return this;
|
|
134701
134700
|
}
|
|
134702
|
-
arguments(
|
|
134703
|
-
|
|
134704
|
-
this.argument(
|
|
134701
|
+
arguments(t3) {
|
|
134702
|
+
t3.split(/ +/).forEach((t4) => {
|
|
134703
|
+
this.argument(t4);
|
|
134705
134704
|
});
|
|
134706
134705
|
return this;
|
|
134707
134706
|
}
|
|
134708
|
-
addArgument(
|
|
134709
|
-
const
|
|
134710
|
-
if (
|
|
134711
|
-
throw new Error(`only the last argument can be variadic '${
|
|
134707
|
+
addArgument(t3) {
|
|
134708
|
+
const e3 = this._args.slice(-1)[0];
|
|
134709
|
+
if (e3 && e3.variadic) {
|
|
134710
|
+
throw new Error(`only the last argument can be variadic '${e3.name()}'`);
|
|
134712
134711
|
}
|
|
134713
|
-
if (
|
|
134714
|
-
throw new Error(`a default value for a required argument is never used: '${
|
|
134712
|
+
if (t3.required && t3.defaultValue !== void 0 && t3.parseArg === void 0) {
|
|
134713
|
+
throw new Error(`a default value for a required argument is never used: '${t3.name()}'`);
|
|
134715
134714
|
}
|
|
134716
|
-
this._args.push(
|
|
134715
|
+
this._args.push(t3);
|
|
134717
134716
|
return this;
|
|
134718
134717
|
}
|
|
134719
|
-
addHelpCommand(
|
|
134720
|
-
if (
|
|
134718
|
+
addHelpCommand(t3, e3) {
|
|
134719
|
+
if (t3 === false) {
|
|
134721
134720
|
this._addImplicitHelpCommand = false;
|
|
134722
134721
|
} else {
|
|
134723
134722
|
this._addImplicitHelpCommand = true;
|
|
134724
|
-
if (typeof
|
|
134725
|
-
this._helpCommandName =
|
|
134726
|
-
this._helpCommandnameAndArgs =
|
|
134723
|
+
if (typeof t3 === "string") {
|
|
134724
|
+
this._helpCommandName = t3.split(" ")[0];
|
|
134725
|
+
this._helpCommandnameAndArgs = t3;
|
|
134727
134726
|
}
|
|
134728
|
-
this._helpCommandDescription =
|
|
134727
|
+
this._helpCommandDescription = e3 || this._helpCommandDescription;
|
|
134729
134728
|
}
|
|
134730
134729
|
return this;
|
|
134731
134730
|
}
|
|
@@ -134735,116 +134734,121 @@ var require_commander2 = __commonJS({
|
|
|
134735
134734
|
}
|
|
134736
134735
|
return this._addImplicitHelpCommand;
|
|
134737
134736
|
}
|
|
134738
|
-
hook(
|
|
134739
|
-
const i3 = ["preAction", "postAction"];
|
|
134740
|
-
if (!i3.includes(
|
|
134741
|
-
throw new Error(`Unexpected value for event passed to hook : '${
|
|
134737
|
+
hook(t3, e3) {
|
|
134738
|
+
const i3 = ["preSubcommand", "preAction", "postAction"];
|
|
134739
|
+
if (!i3.includes(t3)) {
|
|
134740
|
+
throw new Error(`Unexpected value for event passed to hook : '${t3}'.
|
|
134742
134741
|
Expecting one of '${i3.join("', '")}'`);
|
|
134743
134742
|
}
|
|
134744
|
-
if (this._lifeCycleHooks[
|
|
134745
|
-
this._lifeCycleHooks[
|
|
134743
|
+
if (this._lifeCycleHooks[t3]) {
|
|
134744
|
+
this._lifeCycleHooks[t3].push(e3);
|
|
134746
134745
|
} else {
|
|
134747
|
-
this._lifeCycleHooks[
|
|
134746
|
+
this._lifeCycleHooks[t3] = [e3];
|
|
134748
134747
|
}
|
|
134749
134748
|
return this;
|
|
134750
134749
|
}
|
|
134751
|
-
exitOverride(
|
|
134752
|
-
if (
|
|
134753
|
-
this._exitCallback =
|
|
134750
|
+
exitOverride(t3) {
|
|
134751
|
+
if (t3) {
|
|
134752
|
+
this._exitCallback = t3;
|
|
134754
134753
|
} else {
|
|
134755
|
-
this._exitCallback = (
|
|
134756
|
-
if (
|
|
134757
|
-
throw
|
|
134754
|
+
this._exitCallback = (t4) => {
|
|
134755
|
+
if (t4.code !== "commander.executeSubCommandAsync") {
|
|
134756
|
+
throw t4;
|
|
134758
134757
|
} else {
|
|
134759
134758
|
}
|
|
134760
134759
|
};
|
|
134761
134760
|
}
|
|
134762
134761
|
return this;
|
|
134763
134762
|
}
|
|
134764
|
-
_exit(
|
|
134763
|
+
_exit(t3, e3, i3) {
|
|
134765
134764
|
if (this._exitCallback) {
|
|
134766
|
-
this._exitCallback(new
|
|
134765
|
+
this._exitCallback(new u(t3, e3, i3));
|
|
134767
134766
|
}
|
|
134768
|
-
|
|
134767
|
+
a.exit(t3);
|
|
134769
134768
|
}
|
|
134770
|
-
action(
|
|
134771
|
-
const listener = (
|
|
134769
|
+
action(t3) {
|
|
134770
|
+
const listener = (e3) => {
|
|
134772
134771
|
const i3 = this._args.length;
|
|
134773
|
-
const n2 =
|
|
134772
|
+
const n2 = e3.slice(0, i3);
|
|
134774
134773
|
if (this._storeOptionsAsProperties) {
|
|
134775
134774
|
n2[i3] = this;
|
|
134776
134775
|
} else {
|
|
134777
134776
|
n2[i3] = this.opts();
|
|
134778
134777
|
}
|
|
134779
134778
|
n2.push(this);
|
|
134780
|
-
return
|
|
134779
|
+
return t3.apply(this, n2);
|
|
134781
134780
|
};
|
|
134782
134781
|
this._actionHandler = listener;
|
|
134783
134782
|
return this;
|
|
134784
134783
|
}
|
|
134785
|
-
createOption(
|
|
134786
|
-
return new
|
|
134784
|
+
createOption(t3, e3) {
|
|
134785
|
+
return new p(t3, e3);
|
|
134787
134786
|
}
|
|
134788
|
-
addOption(
|
|
134789
|
-
const
|
|
134790
|
-
const i3 =
|
|
134791
|
-
|
|
134792
|
-
|
|
134793
|
-
if (
|
|
134794
|
-
|
|
134795
|
-
n2 = this._findOption(t4) ? this.getOptionValue(i3) : true;
|
|
134796
|
-
}
|
|
134797
|
-
if (n2 !== void 0) {
|
|
134798
|
-
this.setOptionValueWithSource(i3, n2, "default");
|
|
134787
|
+
addOption(t3) {
|
|
134788
|
+
const e3 = t3.name();
|
|
134789
|
+
const i3 = t3.attributeName();
|
|
134790
|
+
if (t3.negate) {
|
|
134791
|
+
const e4 = t3.long.replace(/^--no-/, "--");
|
|
134792
|
+
if (!this._findOption(e4)) {
|
|
134793
|
+
this.setOptionValueWithSource(i3, t3.defaultValue === void 0 ? true : t3.defaultValue, "default");
|
|
134799
134794
|
}
|
|
134795
|
+
} else if (t3.defaultValue !== void 0) {
|
|
134796
|
+
this.setOptionValueWithSource(i3, t3.defaultValue, "default");
|
|
134800
134797
|
}
|
|
134801
|
-
this.options.push(
|
|
134802
|
-
const handleOptionValue = (
|
|
134803
|
-
|
|
134804
|
-
|
|
134798
|
+
this.options.push(t3);
|
|
134799
|
+
const handleOptionValue = (e4, n2, s2) => {
|
|
134800
|
+
if (e4 == null && t3.presetArg !== void 0) {
|
|
134801
|
+
e4 = t3.presetArg;
|
|
134802
|
+
}
|
|
134803
|
+
const r2 = this.getOptionValue(i3);
|
|
134804
|
+
if (e4 !== null && t3.parseArg) {
|
|
134805
134805
|
try {
|
|
134806
|
-
|
|
134807
|
-
} catch (
|
|
134808
|
-
if (
|
|
134809
|
-
const
|
|
134810
|
-
this.
|
|
134806
|
+
e4 = t3.parseArg(e4, r2);
|
|
134807
|
+
} catch (t4) {
|
|
134808
|
+
if (t4.code === "commander.invalidArgument") {
|
|
134809
|
+
const e5 = `${n2} ${t4.message}`;
|
|
134810
|
+
this.error(e5, { exitCode: t4.exitCode, code: t4.code });
|
|
134811
134811
|
}
|
|
134812
|
-
throw
|
|
134812
|
+
throw t4;
|
|
134813
134813
|
}
|
|
134814
|
-
} else if (
|
|
134815
|
-
|
|
134814
|
+
} else if (e4 !== null && t3.variadic) {
|
|
134815
|
+
e4 = t3._concatValue(e4, r2);
|
|
134816
134816
|
}
|
|
134817
|
-
if (
|
|
134818
|
-
if (
|
|
134819
|
-
|
|
134817
|
+
if (e4 == null) {
|
|
134818
|
+
if (t3.negate) {
|
|
134819
|
+
e4 = false;
|
|
134820
|
+
} else if (t3.isBoolean() || t3.optional) {
|
|
134821
|
+
e4 = true;
|
|
134820
134822
|
} else {
|
|
134821
|
-
|
|
134823
|
+
e4 = "";
|
|
134822
134824
|
}
|
|
134823
|
-
} else if (t4 !== null) {
|
|
134824
|
-
this.setOptionValueWithSource(i3, e3.negate ? false : t4, r2);
|
|
134825
134825
|
}
|
|
134826
|
+
this.setOptionValueWithSource(i3, e4, s2);
|
|
134826
134827
|
};
|
|
134827
|
-
this.on("option:" +
|
|
134828
|
-
const i4 = `error: option '${
|
|
134829
|
-
handleOptionValue(
|
|
134828
|
+
this.on("option:" + e3, (e4) => {
|
|
134829
|
+
const i4 = `error: option '${t3.flags}' argument '${e4}' is invalid.`;
|
|
134830
|
+
handleOptionValue(e4, i4, "cli");
|
|
134830
134831
|
});
|
|
134831
|
-
if (
|
|
134832
|
-
this.on("optionEnv:" +
|
|
134833
|
-
const i4 = `error: option '${
|
|
134834
|
-
handleOptionValue(
|
|
134832
|
+
if (t3.envVar) {
|
|
134833
|
+
this.on("optionEnv:" + e3, (e4) => {
|
|
134834
|
+
const i4 = `error: option '${t3.flags}' value '${e4}' from env '${t3.envVar}' is invalid.`;
|
|
134835
|
+
handleOptionValue(e4, i4, "env");
|
|
134835
134836
|
});
|
|
134836
134837
|
}
|
|
134837
134838
|
return this;
|
|
134838
134839
|
}
|
|
134839
|
-
_optionEx(
|
|
134840
|
-
|
|
134841
|
-
|
|
134840
|
+
_optionEx(t3, e3, i3, n2, s2) {
|
|
134841
|
+
if (typeof e3 === "object" && e3 instanceof p) {
|
|
134842
|
+
throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");
|
|
134843
|
+
}
|
|
134844
|
+
const r2 = this.createOption(e3, i3);
|
|
134845
|
+
r2.makeOptionMandatory(!!t3.mandatory);
|
|
134842
134846
|
if (typeof n2 === "function") {
|
|
134843
134847
|
r2.default(s2).argParser(n2);
|
|
134844
134848
|
} else if (n2 instanceof RegExp) {
|
|
134845
|
-
const
|
|
134846
|
-
n2 = (
|
|
134847
|
-
const n3 =
|
|
134849
|
+
const t4 = n2;
|
|
134850
|
+
n2 = (e4, i4) => {
|
|
134851
|
+
const n3 = t4.exec(e4);
|
|
134848
134852
|
return n3 ? n3[0] : i4;
|
|
134849
134853
|
};
|
|
134850
134854
|
r2.default(s2).argParser(n2);
|
|
@@ -134853,209 +134857,233 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
134853
134857
|
}
|
|
134854
134858
|
return this.addOption(r2);
|
|
134855
134859
|
}
|
|
134856
|
-
option(
|
|
134857
|
-
return this._optionEx({},
|
|
134860
|
+
option(t3, e3, i3, n2) {
|
|
134861
|
+
return this._optionEx({}, t3, e3, i3, n2);
|
|
134858
134862
|
}
|
|
134859
|
-
requiredOption(
|
|
134860
|
-
return this._optionEx({ mandatory: true },
|
|
134863
|
+
requiredOption(t3, e3, i3, n2) {
|
|
134864
|
+
return this._optionEx({ mandatory: true }, t3, e3, i3, n2);
|
|
134861
134865
|
}
|
|
134862
|
-
combineFlagAndOptionalValue(
|
|
134863
|
-
this._combineFlagAndOptionalValue = !!
|
|
134866
|
+
combineFlagAndOptionalValue(t3 = true) {
|
|
134867
|
+
this._combineFlagAndOptionalValue = !!t3;
|
|
134864
134868
|
return this;
|
|
134865
134869
|
}
|
|
134866
|
-
allowUnknownOption(
|
|
134867
|
-
this._allowUnknownOption = !!
|
|
134870
|
+
allowUnknownOption(t3 = true) {
|
|
134871
|
+
this._allowUnknownOption = !!t3;
|
|
134868
134872
|
return this;
|
|
134869
134873
|
}
|
|
134870
|
-
allowExcessArguments(
|
|
134871
|
-
this._allowExcessArguments = !!
|
|
134874
|
+
allowExcessArguments(t3 = true) {
|
|
134875
|
+
this._allowExcessArguments = !!t3;
|
|
134872
134876
|
return this;
|
|
134873
134877
|
}
|
|
134874
|
-
enablePositionalOptions(
|
|
134875
|
-
this._enablePositionalOptions = !!
|
|
134878
|
+
enablePositionalOptions(t3 = true) {
|
|
134879
|
+
this._enablePositionalOptions = !!t3;
|
|
134876
134880
|
return this;
|
|
134877
134881
|
}
|
|
134878
|
-
passThroughOptions(
|
|
134879
|
-
this._passThroughOptions = !!
|
|
134880
|
-
if (!!this.parent &&
|
|
134882
|
+
passThroughOptions(t3 = true) {
|
|
134883
|
+
this._passThroughOptions = !!t3;
|
|
134884
|
+
if (!!this.parent && t3 && !this.parent._enablePositionalOptions) {
|
|
134881
134885
|
throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");
|
|
134882
134886
|
}
|
|
134883
134887
|
return this;
|
|
134884
134888
|
}
|
|
134885
|
-
storeOptionsAsProperties(
|
|
134886
|
-
this._storeOptionsAsProperties = !!
|
|
134889
|
+
storeOptionsAsProperties(t3 = true) {
|
|
134890
|
+
this._storeOptionsAsProperties = !!t3;
|
|
134887
134891
|
if (this.options.length) {
|
|
134888
134892
|
throw new Error("call .storeOptionsAsProperties() before adding options");
|
|
134889
134893
|
}
|
|
134890
134894
|
return this;
|
|
134891
134895
|
}
|
|
134892
|
-
getOptionValue(
|
|
134896
|
+
getOptionValue(t3) {
|
|
134893
134897
|
if (this._storeOptionsAsProperties) {
|
|
134894
|
-
return this[
|
|
134898
|
+
return this[t3];
|
|
134895
134899
|
}
|
|
134896
|
-
return this._optionValues[
|
|
134900
|
+
return this._optionValues[t3];
|
|
134897
134901
|
}
|
|
134898
|
-
setOptionValue(
|
|
134902
|
+
setOptionValue(t3, e3) {
|
|
134903
|
+
return this.setOptionValueWithSource(t3, e3, void 0);
|
|
134904
|
+
}
|
|
134905
|
+
setOptionValueWithSource(t3, e3, i3) {
|
|
134899
134906
|
if (this._storeOptionsAsProperties) {
|
|
134900
|
-
this[
|
|
134907
|
+
this[t3] = e3;
|
|
134901
134908
|
} else {
|
|
134902
|
-
this._optionValues[
|
|
134909
|
+
this._optionValues[t3] = e3;
|
|
134903
134910
|
}
|
|
134911
|
+
this._optionValueSources[t3] = i3;
|
|
134904
134912
|
return this;
|
|
134905
134913
|
}
|
|
134906
|
-
|
|
134907
|
-
this.
|
|
134908
|
-
this._optionValueSources[e3] = i3;
|
|
134909
|
-
return this;
|
|
134914
|
+
getOptionValueSource(t3) {
|
|
134915
|
+
return this._optionValueSources[t3];
|
|
134910
134916
|
}
|
|
134911
|
-
|
|
134912
|
-
|
|
134917
|
+
getOptionValueSourceWithGlobals(t3) {
|
|
134918
|
+
let e3;
|
|
134919
|
+
getCommandAndParents(this).forEach((i3) => {
|
|
134920
|
+
if (i3.getOptionValueSource(t3) !== void 0) {
|
|
134921
|
+
e3 = i3.getOptionValueSource(t3);
|
|
134922
|
+
}
|
|
134923
|
+
});
|
|
134924
|
+
return e3;
|
|
134913
134925
|
}
|
|
134914
|
-
_prepareUserArgs(
|
|
134915
|
-
if (
|
|
134926
|
+
_prepareUserArgs(t3, e3) {
|
|
134927
|
+
if (t3 !== void 0 && !Array.isArray(t3)) {
|
|
134916
134928
|
throw new Error("first parameter to parse must be array or undefined");
|
|
134917
134929
|
}
|
|
134918
|
-
|
|
134919
|
-
if (
|
|
134920
|
-
|
|
134921
|
-
if (
|
|
134922
|
-
|
|
134930
|
+
e3 = e3 || {};
|
|
134931
|
+
if (t3 === void 0) {
|
|
134932
|
+
t3 = a.argv;
|
|
134933
|
+
if (a.versions && a.versions.electron) {
|
|
134934
|
+
e3.from = "electron";
|
|
134923
134935
|
}
|
|
134924
134936
|
}
|
|
134925
|
-
this.rawArgs =
|
|
134937
|
+
this.rawArgs = t3.slice();
|
|
134926
134938
|
let i3;
|
|
134927
|
-
switch (
|
|
134939
|
+
switch (e3.from) {
|
|
134928
134940
|
case void 0:
|
|
134929
134941
|
case "node":
|
|
134930
|
-
this._scriptPath =
|
|
134931
|
-
i3 =
|
|
134942
|
+
this._scriptPath = t3[1];
|
|
134943
|
+
i3 = t3.slice(2);
|
|
134932
134944
|
break;
|
|
134933
134945
|
case "electron":
|
|
134934
|
-
if (
|
|
134935
|
-
this._scriptPath =
|
|
134936
|
-
i3 =
|
|
134946
|
+
if (a.defaultApp) {
|
|
134947
|
+
this._scriptPath = t3[1];
|
|
134948
|
+
i3 = t3.slice(2);
|
|
134937
134949
|
} else {
|
|
134938
|
-
i3 =
|
|
134950
|
+
i3 = t3.slice(1);
|
|
134939
134951
|
}
|
|
134940
134952
|
break;
|
|
134941
134953
|
case "user":
|
|
134942
|
-
i3 =
|
|
134954
|
+
i3 = t3.slice(0);
|
|
134943
134955
|
break;
|
|
134944
134956
|
default:
|
|
134945
|
-
throw new Error(`unexpected parse option { from: '${
|
|
134957
|
+
throw new Error(`unexpected parse option { from: '${e3.from}' }`);
|
|
134946
134958
|
}
|
|
134947
|
-
if (!this.
|
|
134948
|
-
this._scriptPath
|
|
134949
|
-
|
|
134950
|
-
this._name = this._name || this._scriptPath && r.basename(this._scriptPath, r.extname(this._scriptPath));
|
|
134959
|
+
if (!this._name && this._scriptPath)
|
|
134960
|
+
this.nameFromFilename(this._scriptPath);
|
|
134961
|
+
this._name = this._name || "program";
|
|
134951
134962
|
return i3;
|
|
134952
134963
|
}
|
|
134953
|
-
parse(
|
|
134954
|
-
const i3 = this._prepareUserArgs(
|
|
134964
|
+
parse(t3, e3) {
|
|
134965
|
+
const i3 = this._prepareUserArgs(t3, e3);
|
|
134955
134966
|
this._parseCommand([], i3);
|
|
134956
134967
|
return this;
|
|
134957
134968
|
}
|
|
134958
|
-
parseAsync(
|
|
134969
|
+
parseAsync(t3, e3) {
|
|
134959
134970
|
return __async(this, null, function* () {
|
|
134960
|
-
const i3 = this._prepareUserArgs(
|
|
134971
|
+
const i3 = this._prepareUserArgs(t3, e3);
|
|
134961
134972
|
yield this._parseCommand([], i3);
|
|
134962
134973
|
return this;
|
|
134963
134974
|
});
|
|
134964
134975
|
}
|
|
134965
|
-
_executeSubCommand(
|
|
134966
|
-
|
|
134976
|
+
_executeSubCommand(t3, e3) {
|
|
134977
|
+
e3 = e3.slice();
|
|
134967
134978
|
let i3 = false;
|
|
134968
134979
|
const n2 = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
134969
|
-
|
|
134970
|
-
|
|
134971
|
-
|
|
134972
|
-
|
|
134973
|
-
|
|
134974
|
-
|
|
134975
|
-
|
|
134976
|
-
|
|
134977
|
-
|
|
134978
|
-
|
|
134979
|
-
h2 = ".";
|
|
134980
|
+
function findFile(t4, e4) {
|
|
134981
|
+
const i4 = r.resolve(t4, e4);
|
|
134982
|
+
if (o.existsSync(i4))
|
|
134983
|
+
return i4;
|
|
134984
|
+
if (n2.includes(r.extname(e4)))
|
|
134985
|
+
return void 0;
|
|
134986
|
+
const s2 = n2.find((t5) => o.existsSync(`${i4}${t5}`));
|
|
134987
|
+
if (s2)
|
|
134988
|
+
return `${i4}${s2}`;
|
|
134989
|
+
return void 0;
|
|
134980
134990
|
}
|
|
134981
|
-
|
|
134982
|
-
|
|
134983
|
-
|
|
134991
|
+
this._checkForMissingMandatoryOptions();
|
|
134992
|
+
this._checkForConflictingOptions();
|
|
134993
|
+
let l2 = t3._executableFile || `${this._name}-${t3._name}`;
|
|
134994
|
+
let h2 = this._executableDir || "";
|
|
134995
|
+
if (this._scriptPath) {
|
|
134996
|
+
let t4;
|
|
134997
|
+
try {
|
|
134998
|
+
t4 = o.realpathSync(this._scriptPath);
|
|
134999
|
+
} catch (e4) {
|
|
135000
|
+
t4 = this._scriptPath;
|
|
135001
|
+
}
|
|
135002
|
+
h2 = r.resolve(r.dirname(t4), h2);
|
|
134984
135003
|
}
|
|
134985
|
-
|
|
134986
|
-
|
|
134987
|
-
|
|
134988
|
-
|
|
134989
|
-
|
|
134990
|
-
|
|
134991
|
-
u2 = `${c2}${e4}`;
|
|
135004
|
+
if (h2) {
|
|
135005
|
+
let e4 = findFile(h2, l2);
|
|
135006
|
+
if (!e4 && !t3._executableFile && this._scriptPath) {
|
|
135007
|
+
const i4 = r.basename(this._scriptPath, r.extname(this._scriptPath));
|
|
135008
|
+
if (i4 !== this._name) {
|
|
135009
|
+
e4 = findFile(h2, `${i4}-${t3._name}`);
|
|
134992
135010
|
}
|
|
134993
|
-
}
|
|
135011
|
+
}
|
|
135012
|
+
l2 = e4 || l2;
|
|
134994
135013
|
}
|
|
134995
|
-
i3 = n2.includes(r.extname(
|
|
134996
|
-
let
|
|
134997
|
-
if (
|
|
135014
|
+
i3 = n2.includes(r.extname(l2));
|
|
135015
|
+
let c2;
|
|
135016
|
+
if (a.platform !== "win32") {
|
|
134998
135017
|
if (i3) {
|
|
134999
|
-
|
|
135000
|
-
|
|
135001
|
-
|
|
135018
|
+
e3.unshift(l2);
|
|
135019
|
+
e3 = incrementNodeInspectorPort(a.execArgv).concat(e3);
|
|
135020
|
+
c2 = s.spawn(a.argv[0], e3, { stdio: "inherit" });
|
|
135002
135021
|
} else {
|
|
135003
|
-
|
|
135022
|
+
c2 = s.spawn(l2, e3, { stdio: "inherit" });
|
|
135004
135023
|
}
|
|
135005
135024
|
} else {
|
|
135006
|
-
|
|
135007
|
-
|
|
135008
|
-
|
|
135009
|
-
}
|
|
135010
|
-
|
|
135011
|
-
|
|
135012
|
-
|
|
135013
|
-
|
|
135014
|
-
|
|
135015
|
-
|
|
135025
|
+
e3.unshift(l2);
|
|
135026
|
+
e3 = incrementNodeInspectorPort(a.execArgv).concat(e3);
|
|
135027
|
+
c2 = s.spawn(a.execPath, e3, { stdio: "inherit" });
|
|
135028
|
+
}
|
|
135029
|
+
if (!c2.killed) {
|
|
135030
|
+
const t4 = ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"];
|
|
135031
|
+
t4.forEach((t5) => {
|
|
135032
|
+
a.on(t5, () => {
|
|
135033
|
+
if (c2.killed === false && c2.exitCode === null) {
|
|
135034
|
+
c2.kill(t5);
|
|
135035
|
+
}
|
|
135036
|
+
});
|
|
135016
135037
|
});
|
|
135017
|
-
}
|
|
135018
|
-
const
|
|
135019
|
-
if (!
|
|
135020
|
-
|
|
135038
|
+
}
|
|
135039
|
+
const p2 = this._exitCallback;
|
|
135040
|
+
if (!p2) {
|
|
135041
|
+
c2.on("close", a.exit.bind(a));
|
|
135021
135042
|
} else {
|
|
135022
|
-
|
|
135023
|
-
|
|
135043
|
+
c2.on("close", () => {
|
|
135044
|
+
p2(new u(a.exitCode || 0, "commander.executeSubCommandAsync", "(close)"));
|
|
135024
135045
|
});
|
|
135025
135046
|
}
|
|
135026
|
-
|
|
135027
|
-
if (
|
|
135028
|
-
const
|
|
135029
|
-
|
|
135030
|
-
- if
|
|
135031
|
-
|
|
135032
|
-
|
|
135033
|
-
throw new Error(
|
|
135034
|
-
}
|
|
135035
|
-
|
|
135036
|
-
|
|
135047
|
+
c2.on("error", (e4) => {
|
|
135048
|
+
if (e4.code === "ENOENT") {
|
|
135049
|
+
const e5 = h2 ? `searched for local subcommand relative to directory '${h2}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
135050
|
+
const i4 = `'${l2}' does not exist
|
|
135051
|
+
- if '${t3._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
135052
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
135053
|
+
- ${e5}`;
|
|
135054
|
+
throw new Error(i4);
|
|
135055
|
+
} else if (e4.code === "EACCES") {
|
|
135056
|
+
throw new Error(`'${l2}' not executable`);
|
|
135057
|
+
}
|
|
135058
|
+
if (!p2) {
|
|
135059
|
+
a.exit(1);
|
|
135037
135060
|
} else {
|
|
135038
|
-
const
|
|
135039
|
-
|
|
135040
|
-
|
|
135061
|
+
const t4 = new u(1, "commander.executeSubCommandAsync", "(error)");
|
|
135062
|
+
t4.nestedError = e4;
|
|
135063
|
+
p2(t4);
|
|
135041
135064
|
}
|
|
135042
135065
|
});
|
|
135043
|
-
this.runningCommand =
|
|
135066
|
+
this.runningCommand = c2;
|
|
135044
135067
|
}
|
|
135045
|
-
_dispatchSubcommand(
|
|
135046
|
-
const n2 = this._findCommand(
|
|
135068
|
+
_dispatchSubcommand(t3, e3, i3) {
|
|
135069
|
+
const n2 = this._findCommand(t3);
|
|
135047
135070
|
if (!n2)
|
|
135048
135071
|
this.help({ error: true });
|
|
135049
|
-
|
|
135050
|
-
|
|
135051
|
-
|
|
135052
|
-
|
|
135053
|
-
|
|
135072
|
+
let s2;
|
|
135073
|
+
s2 = this._chainOrCallSubCommandHook(s2, n2, "preSubcommand");
|
|
135074
|
+
s2 = this._chainOrCall(s2, () => {
|
|
135075
|
+
if (n2._executableHandler) {
|
|
135076
|
+
this._executeSubCommand(n2, e3.concat(i3));
|
|
135077
|
+
} else {
|
|
135078
|
+
return n2._parseCommand(e3, i3);
|
|
135079
|
+
}
|
|
135080
|
+
});
|
|
135081
|
+
return s2;
|
|
135054
135082
|
}
|
|
135055
135083
|
_checkNumberOfArguments() {
|
|
135056
|
-
this._args.forEach((
|
|
135057
|
-
if (
|
|
135058
|
-
this.missingArgument(
|
|
135084
|
+
this._args.forEach((t3, e3) => {
|
|
135085
|
+
if (t3.required && this.args[e3] == null) {
|
|
135086
|
+
this.missingArgument(t3.name());
|
|
135059
135087
|
}
|
|
135060
135088
|
});
|
|
135061
135089
|
if (this._args.length > 0 && this._args[this._args.length - 1].variadic) {
|
|
@@ -135066,15 +135094,15 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
135066
135094
|
}
|
|
135067
135095
|
}
|
|
135068
135096
|
_processArguments() {
|
|
135069
|
-
const myParseArg = (
|
|
135070
|
-
let n2 =
|
|
135071
|
-
if (
|
|
135097
|
+
const myParseArg = (t4, e3, i3) => {
|
|
135098
|
+
let n2 = e3;
|
|
135099
|
+
if (e3 !== null && t4.parseArg) {
|
|
135072
135100
|
try {
|
|
135073
|
-
n2 =
|
|
135101
|
+
n2 = t4.parseArg(e3, i3);
|
|
135074
135102
|
} catch (i4) {
|
|
135075
135103
|
if (i4.code === "commander.invalidArgument") {
|
|
135076
|
-
const n3 = `error: command-argument value '${
|
|
135077
|
-
this.
|
|
135104
|
+
const n3 = `error: command-argument value '${e3}' is invalid for argument '${t4.name()}'. ${i4.message}`;
|
|
135105
|
+
this.error(n3, { exitCode: i4.exitCode, code: i4.code });
|
|
135078
135106
|
}
|
|
135079
135107
|
throw i4;
|
|
135080
135108
|
}
|
|
@@ -135082,74 +135110,85 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
135082
135110
|
return n2;
|
|
135083
135111
|
};
|
|
135084
135112
|
this._checkNumberOfArguments();
|
|
135085
|
-
const
|
|
135086
|
-
this._args.forEach((
|
|
135087
|
-
let n2 =
|
|
135088
|
-
if (
|
|
135113
|
+
const t3 = [];
|
|
135114
|
+
this._args.forEach((e3, i3) => {
|
|
135115
|
+
let n2 = e3.defaultValue;
|
|
135116
|
+
if (e3.variadic) {
|
|
135089
135117
|
if (i3 < this.args.length) {
|
|
135090
135118
|
n2 = this.args.slice(i3);
|
|
135091
|
-
if (
|
|
135092
|
-
n2 = n2.reduce((
|
|
135119
|
+
if (e3.parseArg) {
|
|
135120
|
+
n2 = n2.reduce((t4, i4) => myParseArg(e3, i4, t4), e3.defaultValue);
|
|
135093
135121
|
}
|
|
135094
135122
|
} else if (n2 === void 0) {
|
|
135095
135123
|
n2 = [];
|
|
135096
135124
|
}
|
|
135097
135125
|
} else if (i3 < this.args.length) {
|
|
135098
135126
|
n2 = this.args[i3];
|
|
135099
|
-
if (
|
|
135100
|
-
n2 = myParseArg(
|
|
135127
|
+
if (e3.parseArg) {
|
|
135128
|
+
n2 = myParseArg(e3, n2, e3.defaultValue);
|
|
135101
135129
|
}
|
|
135102
135130
|
}
|
|
135103
|
-
|
|
135131
|
+
t3[i3] = n2;
|
|
135104
135132
|
});
|
|
135105
|
-
this.processedArgs =
|
|
135133
|
+
this.processedArgs = t3;
|
|
135106
135134
|
}
|
|
135107
|
-
_chainOrCall(
|
|
135108
|
-
if (
|
|
135109
|
-
return
|
|
135135
|
+
_chainOrCall(t3, e3) {
|
|
135136
|
+
if (t3 && t3.then && typeof t3.then === "function") {
|
|
135137
|
+
return t3.then(() => e3());
|
|
135110
135138
|
}
|
|
135111
|
-
return
|
|
135139
|
+
return e3();
|
|
135112
135140
|
}
|
|
135113
|
-
_chainOrCallHooks(
|
|
135114
|
-
let i3 =
|
|
135141
|
+
_chainOrCallHooks(t3, e3) {
|
|
135142
|
+
let i3 = t3;
|
|
135115
135143
|
const n2 = [];
|
|
135116
|
-
getCommandAndParents(this).reverse().filter((
|
|
135117
|
-
|
|
135118
|
-
n2.push({ hookedCommand:
|
|
135144
|
+
getCommandAndParents(this).reverse().filter((t4) => t4._lifeCycleHooks[e3] !== void 0).forEach((t4) => {
|
|
135145
|
+
t4._lifeCycleHooks[e3].forEach((e4) => {
|
|
135146
|
+
n2.push({ hookedCommand: t4, callback: e4 });
|
|
135119
135147
|
});
|
|
135120
135148
|
});
|
|
135121
|
-
if (
|
|
135149
|
+
if (e3 === "postAction") {
|
|
135122
135150
|
n2.reverse();
|
|
135123
135151
|
}
|
|
135124
|
-
n2.forEach((
|
|
135125
|
-
i3 = this._chainOrCall(i3, () =>
|
|
135152
|
+
n2.forEach((t4) => {
|
|
135153
|
+
i3 = this._chainOrCall(i3, () => t4.callback(t4.hookedCommand, this));
|
|
135126
135154
|
});
|
|
135127
135155
|
return i3;
|
|
135128
135156
|
}
|
|
135129
|
-
|
|
135130
|
-
|
|
135131
|
-
this.
|
|
135132
|
-
|
|
135133
|
-
|
|
135134
|
-
|
|
135135
|
-
if (e3 && this._findCommand(e3[0])) {
|
|
135136
|
-
return this._dispatchSubcommand(e3[0], e3.slice(1), t3);
|
|
135157
|
+
_chainOrCallSubCommandHook(t3, e3, i3) {
|
|
135158
|
+
let n2 = t3;
|
|
135159
|
+
if (this._lifeCycleHooks[i3] !== void 0) {
|
|
135160
|
+
this._lifeCycleHooks[i3].forEach((t4) => {
|
|
135161
|
+
n2 = this._chainOrCall(n2, () => t4(this, e3));
|
|
135162
|
+
});
|
|
135137
135163
|
}
|
|
135138
|
-
|
|
135139
|
-
|
|
135164
|
+
return n2;
|
|
135165
|
+
}
|
|
135166
|
+
_parseCommand(t3, e3) {
|
|
135167
|
+
const i3 = this.parseOptions(e3);
|
|
135168
|
+
this._parseOptionsEnv();
|
|
135169
|
+
this._parseOptionsImplied();
|
|
135170
|
+
t3 = t3.concat(i3.operands);
|
|
135171
|
+
e3 = i3.unknown;
|
|
135172
|
+
this.args = t3.concat(e3);
|
|
135173
|
+
if (t3 && this._findCommand(t3[0])) {
|
|
135174
|
+
return this._dispatchSubcommand(t3[0], t3.slice(1), e3);
|
|
135175
|
+
}
|
|
135176
|
+
if (this._hasImplicitHelpCommand() && t3[0] === this._helpCommandName) {
|
|
135177
|
+
if (t3.length === 1) {
|
|
135140
135178
|
this.help();
|
|
135141
135179
|
}
|
|
135142
|
-
return this._dispatchSubcommand(
|
|
135180
|
+
return this._dispatchSubcommand(t3[1], [], [this._helpLongFlag]);
|
|
135143
135181
|
}
|
|
135144
135182
|
if (this._defaultCommandName) {
|
|
135145
|
-
outputHelpIfRequested(this,
|
|
135146
|
-
return this._dispatchSubcommand(this._defaultCommandName,
|
|
135183
|
+
outputHelpIfRequested(this, e3);
|
|
135184
|
+
return this._dispatchSubcommand(this._defaultCommandName, t3, e3);
|
|
135147
135185
|
}
|
|
135148
135186
|
if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {
|
|
135149
135187
|
this.help({ error: true });
|
|
135150
135188
|
}
|
|
135151
135189
|
outputHelpIfRequested(this, i3.unknown);
|
|
135152
135190
|
this._checkForMissingMandatoryOptions();
|
|
135191
|
+
this._checkForConflictingOptions();
|
|
135153
135192
|
const checkForUnknownOptions = () => {
|
|
135154
135193
|
if (i3.unknown.length > 0) {
|
|
135155
135194
|
this.unknownOption(i3.unknown[0]);
|
|
@@ -135162,21 +135201,24 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
135162
135201
|
let i4;
|
|
135163
135202
|
i4 = this._chainOrCallHooks(i4, "preAction");
|
|
135164
135203
|
i4 = this._chainOrCall(i4, () => this._actionHandler(this.processedArgs));
|
|
135165
|
-
if (this.parent)
|
|
135166
|
-
this.
|
|
135204
|
+
if (this.parent) {
|
|
135205
|
+
i4 = this._chainOrCall(i4, () => {
|
|
135206
|
+
this.parent.emit(n2, t3, e3);
|
|
135207
|
+
});
|
|
135208
|
+
}
|
|
135167
135209
|
i4 = this._chainOrCallHooks(i4, "postAction");
|
|
135168
135210
|
return i4;
|
|
135169
135211
|
}
|
|
135170
135212
|
if (this.parent && this.parent.listenerCount(n2)) {
|
|
135171
135213
|
checkForUnknownOptions();
|
|
135172
135214
|
this._processArguments();
|
|
135173
|
-
this.parent.emit(n2,
|
|
135174
|
-
} else if (
|
|
135215
|
+
this.parent.emit(n2, t3, e3);
|
|
135216
|
+
} else if (t3.length) {
|
|
135175
135217
|
if (this._findCommand("*")) {
|
|
135176
|
-
return this._dispatchSubcommand("*",
|
|
135218
|
+
return this._dispatchSubcommand("*", t3, e3);
|
|
135177
135219
|
}
|
|
135178
135220
|
if (this.listenerCount("command:*")) {
|
|
135179
|
-
this.emit("command:*",
|
|
135221
|
+
this.emit("command:*", t3, e3);
|
|
135180
135222
|
} else if (this.commands.length) {
|
|
135181
135223
|
this.unknownCommand();
|
|
135182
135224
|
} else {
|
|
@@ -135191,131 +135233,155 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
135191
135233
|
this._processArguments();
|
|
135192
135234
|
}
|
|
135193
135235
|
}
|
|
135194
|
-
_findCommand(
|
|
135195
|
-
if (!
|
|
135236
|
+
_findCommand(t3) {
|
|
135237
|
+
if (!t3)
|
|
135196
135238
|
return void 0;
|
|
135197
|
-
return this.commands.find((
|
|
135239
|
+
return this.commands.find((e3) => e3._name === t3 || e3._aliases.includes(t3));
|
|
135198
135240
|
}
|
|
135199
|
-
_findOption(
|
|
135200
|
-
return this.options.find((
|
|
135241
|
+
_findOption(t3) {
|
|
135242
|
+
return this.options.find((e3) => e3.is(t3));
|
|
135201
135243
|
}
|
|
135202
135244
|
_checkForMissingMandatoryOptions() {
|
|
135203
|
-
for (let
|
|
135204
|
-
|
|
135205
|
-
if (
|
|
135206
|
-
|
|
135245
|
+
for (let t3 = this; t3; t3 = t3.parent) {
|
|
135246
|
+
t3.options.forEach((e3) => {
|
|
135247
|
+
if (e3.mandatory && t3.getOptionValue(e3.attributeName()) === void 0) {
|
|
135248
|
+
t3.missingMandatoryOptionValue(e3);
|
|
135207
135249
|
}
|
|
135208
135250
|
});
|
|
135209
135251
|
}
|
|
135210
135252
|
}
|
|
135211
|
-
|
|
135212
|
-
const t3 =
|
|
135253
|
+
_checkForConflictingLocalOptions() {
|
|
135254
|
+
const t3 = this.options.filter((t4) => {
|
|
135255
|
+
const e4 = t4.attributeName();
|
|
135256
|
+
if (this.getOptionValue(e4) === void 0) {
|
|
135257
|
+
return false;
|
|
135258
|
+
}
|
|
135259
|
+
return this.getOptionValueSource(e4) !== "default";
|
|
135260
|
+
});
|
|
135261
|
+
const e3 = t3.filter((t4) => t4.conflictsWith.length > 0);
|
|
135262
|
+
e3.forEach((e4) => {
|
|
135263
|
+
const i3 = t3.find((t4) => e4.conflictsWith.includes(t4.attributeName()));
|
|
135264
|
+
if (i3) {
|
|
135265
|
+
this._conflictingOption(e4, i3);
|
|
135266
|
+
}
|
|
135267
|
+
});
|
|
135268
|
+
}
|
|
135269
|
+
_checkForConflictingOptions() {
|
|
135270
|
+
for (let t3 = this; t3; t3 = t3.parent) {
|
|
135271
|
+
t3._checkForConflictingLocalOptions();
|
|
135272
|
+
}
|
|
135273
|
+
}
|
|
135274
|
+
parseOptions(t3) {
|
|
135275
|
+
const e3 = [];
|
|
135213
135276
|
const i3 = [];
|
|
135214
|
-
let n2 =
|
|
135215
|
-
const s2 =
|
|
135216
|
-
function maybeOption(
|
|
135217
|
-
return
|
|
135277
|
+
let n2 = e3;
|
|
135278
|
+
const s2 = t3.slice();
|
|
135279
|
+
function maybeOption(t4) {
|
|
135280
|
+
return t4.length > 1 && t4[0] === "-";
|
|
135218
135281
|
}
|
|
135219
135282
|
let r2 = null;
|
|
135220
135283
|
while (s2.length) {
|
|
135221
|
-
const
|
|
135222
|
-
if (
|
|
135284
|
+
const t4 = s2.shift();
|
|
135285
|
+
if (t4 === "--") {
|
|
135223
135286
|
if (n2 === i3)
|
|
135224
|
-
n2.push(
|
|
135287
|
+
n2.push(t4);
|
|
135225
135288
|
n2.push(...s2);
|
|
135226
135289
|
break;
|
|
135227
135290
|
}
|
|
135228
|
-
if (r2 && !maybeOption(
|
|
135229
|
-
this.emit(`option:${r2.name()}`,
|
|
135291
|
+
if (r2 && !maybeOption(t4)) {
|
|
135292
|
+
this.emit(`option:${r2.name()}`, t4);
|
|
135230
135293
|
continue;
|
|
135231
135294
|
}
|
|
135232
135295
|
r2 = null;
|
|
135233
|
-
if (maybeOption(
|
|
135234
|
-
const
|
|
135235
|
-
if (
|
|
135236
|
-
if (
|
|
135237
|
-
const
|
|
135238
|
-
if (
|
|
135239
|
-
this.optionMissingArgument(
|
|
135240
|
-
this.emit(`option:${
|
|
135241
|
-
} else if (
|
|
135242
|
-
let
|
|
135296
|
+
if (maybeOption(t4)) {
|
|
135297
|
+
const e4 = this._findOption(t4);
|
|
135298
|
+
if (e4) {
|
|
135299
|
+
if (e4.required) {
|
|
135300
|
+
const t5 = s2.shift();
|
|
135301
|
+
if (t5 === void 0)
|
|
135302
|
+
this.optionMissingArgument(e4);
|
|
135303
|
+
this.emit(`option:${e4.name()}`, t5);
|
|
135304
|
+
} else if (e4.optional) {
|
|
135305
|
+
let t5 = null;
|
|
135243
135306
|
if (s2.length > 0 && !maybeOption(s2[0])) {
|
|
135244
|
-
|
|
135307
|
+
t5 = s2.shift();
|
|
135245
135308
|
}
|
|
135246
|
-
this.emit(`option:${
|
|
135309
|
+
this.emit(`option:${e4.name()}`, t5);
|
|
135247
135310
|
} else {
|
|
135248
|
-
this.emit(`option:${
|
|
135311
|
+
this.emit(`option:${e4.name()}`);
|
|
135249
135312
|
}
|
|
135250
|
-
r2 =
|
|
135313
|
+
r2 = e4.variadic ? e4 : null;
|
|
135251
135314
|
continue;
|
|
135252
135315
|
}
|
|
135253
135316
|
}
|
|
135254
|
-
if (
|
|
135255
|
-
const
|
|
135256
|
-
if (
|
|
135257
|
-
if (
|
|
135258
|
-
this.emit(`option:${
|
|
135317
|
+
if (t4.length > 2 && t4[0] === "-" && t4[1] !== "-") {
|
|
135318
|
+
const e4 = this._findOption(`-${t4[1]}`);
|
|
135319
|
+
if (e4) {
|
|
135320
|
+
if (e4.required || e4.optional && this._combineFlagAndOptionalValue) {
|
|
135321
|
+
this.emit(`option:${e4.name()}`, t4.slice(2));
|
|
135259
135322
|
} else {
|
|
135260
|
-
this.emit(`option:${
|
|
135261
|
-
s2.unshift(`-${
|
|
135323
|
+
this.emit(`option:${e4.name()}`);
|
|
135324
|
+
s2.unshift(`-${t4.slice(2)}`);
|
|
135262
135325
|
}
|
|
135263
135326
|
continue;
|
|
135264
135327
|
}
|
|
135265
135328
|
}
|
|
135266
|
-
if (/^--[^=]+=/.test(
|
|
135267
|
-
const
|
|
135268
|
-
const i4 = this._findOption(
|
|
135329
|
+
if (/^--[^=]+=/.test(t4)) {
|
|
135330
|
+
const e4 = t4.indexOf("=");
|
|
135331
|
+
const i4 = this._findOption(t4.slice(0, e4));
|
|
135269
135332
|
if (i4 && (i4.required || i4.optional)) {
|
|
135270
|
-
this.emit(`option:${i4.name()}`,
|
|
135333
|
+
this.emit(`option:${i4.name()}`, t4.slice(e4 + 1));
|
|
135271
135334
|
continue;
|
|
135272
135335
|
}
|
|
135273
135336
|
}
|
|
135274
|
-
if (maybeOption(
|
|
135337
|
+
if (maybeOption(t4)) {
|
|
135275
135338
|
n2 = i3;
|
|
135276
135339
|
}
|
|
135277
|
-
if ((this._enablePositionalOptions || this._passThroughOptions) &&
|
|
135278
|
-
if (this._findCommand(
|
|
135279
|
-
|
|
135340
|
+
if ((this._enablePositionalOptions || this._passThroughOptions) && e3.length === 0 && i3.length === 0) {
|
|
135341
|
+
if (this._findCommand(t4)) {
|
|
135342
|
+
e3.push(t4);
|
|
135280
135343
|
if (s2.length > 0)
|
|
135281
135344
|
i3.push(...s2);
|
|
135282
135345
|
break;
|
|
135283
|
-
} else if (
|
|
135284
|
-
|
|
135346
|
+
} else if (t4 === this._helpCommandName && this._hasImplicitHelpCommand()) {
|
|
135347
|
+
e3.push(t4);
|
|
135285
135348
|
if (s2.length > 0)
|
|
135286
|
-
|
|
135349
|
+
e3.push(...s2);
|
|
135287
135350
|
break;
|
|
135288
135351
|
} else if (this._defaultCommandName) {
|
|
135289
|
-
i3.push(
|
|
135352
|
+
i3.push(t4);
|
|
135290
135353
|
if (s2.length > 0)
|
|
135291
135354
|
i3.push(...s2);
|
|
135292
135355
|
break;
|
|
135293
135356
|
}
|
|
135294
135357
|
}
|
|
135295
135358
|
if (this._passThroughOptions) {
|
|
135296
|
-
n2.push(
|
|
135359
|
+
n2.push(t4);
|
|
135297
135360
|
if (s2.length > 0)
|
|
135298
135361
|
n2.push(...s2);
|
|
135299
135362
|
break;
|
|
135300
135363
|
}
|
|
135301
|
-
n2.push(
|
|
135364
|
+
n2.push(t4);
|
|
135302
135365
|
}
|
|
135303
|
-
return { operands:
|
|
135366
|
+
return { operands: e3, unknown: i3 };
|
|
135304
135367
|
}
|
|
135305
135368
|
opts() {
|
|
135306
135369
|
if (this._storeOptionsAsProperties) {
|
|
135307
|
-
const
|
|
135308
|
-
const
|
|
135309
|
-
for (let i3 = 0; i3 <
|
|
135310
|
-
const
|
|
135311
|
-
|
|
135370
|
+
const t3 = {};
|
|
135371
|
+
const e3 = this.options.length;
|
|
135372
|
+
for (let i3 = 0; i3 < e3; i3++) {
|
|
135373
|
+
const e4 = this.options[i3].attributeName();
|
|
135374
|
+
t3[e4] = e4 === this._versionOptionName ? this._version : this[e4];
|
|
135312
135375
|
}
|
|
135313
|
-
return
|
|
135376
|
+
return t3;
|
|
135314
135377
|
}
|
|
135315
135378
|
return this._optionValues;
|
|
135316
135379
|
}
|
|
135317
|
-
|
|
135318
|
-
this.
|
|
135380
|
+
optsWithGlobals() {
|
|
135381
|
+
return getCommandAndParents(this).reduce((t3, e3) => Object.assign(t3, e3.opts()), {});
|
|
135382
|
+
}
|
|
135383
|
+
error(t3, e3) {
|
|
135384
|
+
this._outputConfiguration.outputError(`${t3}
|
|
135319
135385
|
`, this._outputConfiguration.writeErr);
|
|
135320
135386
|
if (typeof this._showHelpAfterError === "string") {
|
|
135321
135387
|
this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
@@ -135324,166 +135390,217 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
135324
135390
|
this._outputConfiguration.writeErr("\n");
|
|
135325
135391
|
this.outputHelp({ error: true });
|
|
135326
135392
|
}
|
|
135327
|
-
|
|
135393
|
+
const i3 = e3 || {};
|
|
135394
|
+
const n2 = i3.exitCode || 1;
|
|
135395
|
+
const s2 = i3.code || "commander.error";
|
|
135396
|
+
this._exit(n2, s2, t3);
|
|
135328
135397
|
}
|
|
135329
135398
|
_parseOptionsEnv() {
|
|
135330
|
-
this.options.forEach((
|
|
135331
|
-
if (
|
|
135332
|
-
const
|
|
135333
|
-
if (this.getOptionValue(
|
|
135334
|
-
if (
|
|
135335
|
-
this.emit(`optionEnv:${
|
|
135399
|
+
this.options.forEach((t3) => {
|
|
135400
|
+
if (t3.envVar && t3.envVar in a.env) {
|
|
135401
|
+
const e3 = t3.attributeName();
|
|
135402
|
+
if (this.getOptionValue(e3) === void 0 || ["default", "config", "env"].includes(this.getOptionValueSource(e3))) {
|
|
135403
|
+
if (t3.required || t3.optional) {
|
|
135404
|
+
this.emit(`optionEnv:${t3.name()}`, a.env[t3.envVar]);
|
|
135336
135405
|
} else {
|
|
135337
|
-
this.emit(`optionEnv:${
|
|
135406
|
+
this.emit(`optionEnv:${t3.name()}`);
|
|
135338
135407
|
}
|
|
135339
135408
|
}
|
|
135340
135409
|
}
|
|
135341
135410
|
});
|
|
135342
135411
|
}
|
|
135343
|
-
|
|
135344
|
-
const t3 =
|
|
135345
|
-
this.
|
|
135346
|
-
|
|
135347
|
-
|
|
135348
|
-
|
|
135349
|
-
|
|
135412
|
+
_parseOptionsImplied() {
|
|
135413
|
+
const t3 = new d(this.options);
|
|
135414
|
+
const hasCustomOptionValue = (t4) => this.getOptionValue(t4) !== void 0 && !["default", "implied"].includes(this.getOptionValueSource(t4));
|
|
135415
|
+
this.options.filter((e3) => e3.implied !== void 0 && hasCustomOptionValue(e3.attributeName()) && t3.valueFromOption(this.getOptionValue(e3.attributeName()), e3)).forEach((t4) => {
|
|
135416
|
+
Object.keys(t4.implied).filter((t5) => !hasCustomOptionValue(t5)).forEach((e3) => {
|
|
135417
|
+
this.setOptionValueWithSource(e3, t4.implied[e3], "implied");
|
|
135418
|
+
});
|
|
135419
|
+
});
|
|
135350
135420
|
}
|
|
135351
|
-
|
|
135352
|
-
const
|
|
135353
|
-
this.
|
|
135421
|
+
missingArgument(t3) {
|
|
135422
|
+
const e3 = `error: missing required argument '${t3}'`;
|
|
135423
|
+
this.error(e3, { code: "commander.missingArgument" });
|
|
135424
|
+
}
|
|
135425
|
+
optionMissingArgument(t3) {
|
|
135426
|
+
const e3 = `error: option '${t3.flags}' argument missing`;
|
|
135427
|
+
this.error(e3, { code: "commander.optionMissingArgument" });
|
|
135428
|
+
}
|
|
135429
|
+
missingMandatoryOptionValue(t3) {
|
|
135430
|
+
const e3 = `error: required option '${t3.flags}' not specified`;
|
|
135431
|
+
this.error(e3, { code: "commander.missingMandatoryOptionValue" });
|
|
135432
|
+
}
|
|
135433
|
+
_conflictingOption(t3, e3) {
|
|
135434
|
+
const findBestOptionFromValue = (t4) => {
|
|
135435
|
+
const e4 = t4.attributeName();
|
|
135436
|
+
const i4 = this.getOptionValue(e4);
|
|
135437
|
+
const n2 = this.options.find((t5) => t5.negate && e4 === t5.attributeName());
|
|
135438
|
+
const s2 = this.options.find((t5) => !t5.negate && e4 === t5.attributeName());
|
|
135439
|
+
if (n2 && (n2.presetArg === void 0 && i4 === false || n2.presetArg !== void 0 && i4 === n2.presetArg)) {
|
|
135440
|
+
return n2;
|
|
135441
|
+
}
|
|
135442
|
+
return s2 || t4;
|
|
135443
|
+
};
|
|
135444
|
+
const getErrorMessage = (t4) => {
|
|
135445
|
+
const e4 = findBestOptionFromValue(t4);
|
|
135446
|
+
const i4 = e4.attributeName();
|
|
135447
|
+
const n2 = this.getOptionValueSource(i4);
|
|
135448
|
+
if (n2 === "env") {
|
|
135449
|
+
return `environment variable '${e4.envVar}'`;
|
|
135450
|
+
}
|
|
135451
|
+
return `option '${e4.flags}'`;
|
|
135452
|
+
};
|
|
135453
|
+
const i3 = `error: ${getErrorMessage(t3)} cannot be used with ${getErrorMessage(e3)}`;
|
|
135454
|
+
this.error(i3, { code: "commander.conflictingOption" });
|
|
135354
135455
|
}
|
|
135355
|
-
unknownOption(
|
|
135456
|
+
unknownOption(t3) {
|
|
135356
135457
|
if (this._allowUnknownOption)
|
|
135357
135458
|
return;
|
|
135358
|
-
let
|
|
135359
|
-
if (
|
|
135459
|
+
let e3 = "";
|
|
135460
|
+
if (t3.startsWith("--") && this._showSuggestionAfterError) {
|
|
135360
135461
|
let i4 = [];
|
|
135361
135462
|
let n2 = this;
|
|
135362
135463
|
do {
|
|
135363
|
-
const
|
|
135364
|
-
i4 = i4.concat(
|
|
135464
|
+
const t4 = n2.createHelp().visibleOptions(n2).filter((t5) => t5.long).map((t5) => t5.long);
|
|
135465
|
+
i4 = i4.concat(t4);
|
|
135365
135466
|
n2 = n2.parent;
|
|
135366
135467
|
} while (n2 && !n2._enablePositionalOptions);
|
|
135367
|
-
|
|
135468
|
+
e3 = f(t3, i4);
|
|
135368
135469
|
}
|
|
135369
|
-
const i3 = `error: unknown option '${
|
|
135370
|
-
this.
|
|
135470
|
+
const i3 = `error: unknown option '${t3}'${e3}`;
|
|
135471
|
+
this.error(i3, { code: "commander.unknownOption" });
|
|
135371
135472
|
}
|
|
135372
|
-
_excessArguments(
|
|
135473
|
+
_excessArguments(t3) {
|
|
135373
135474
|
if (this._allowExcessArguments)
|
|
135374
135475
|
return;
|
|
135375
|
-
const
|
|
135376
|
-
const i3 =
|
|
135476
|
+
const e3 = this._args.length;
|
|
135477
|
+
const i3 = e3 === 1 ? "" : "s";
|
|
135377
135478
|
const n2 = this.parent ? ` for '${this.name()}'` : "";
|
|
135378
|
-
const s2 = `error: too many arguments${n2}. Expected ${
|
|
135379
|
-
this.
|
|
135479
|
+
const s2 = `error: too many arguments${n2}. Expected ${e3} argument${i3} but got ${t3.length}.`;
|
|
135480
|
+
this.error(s2, { code: "commander.excessArguments" });
|
|
135380
135481
|
}
|
|
135381
135482
|
unknownCommand() {
|
|
135382
|
-
const
|
|
135383
|
-
let
|
|
135483
|
+
const t3 = this.args[0];
|
|
135484
|
+
let e3 = "";
|
|
135384
135485
|
if (this._showSuggestionAfterError) {
|
|
135385
135486
|
const i4 = [];
|
|
135386
|
-
this.createHelp().visibleCommands(this).forEach((
|
|
135387
|
-
i4.push(
|
|
135388
|
-
if (
|
|
135389
|
-
i4.push(
|
|
135487
|
+
this.createHelp().visibleCommands(this).forEach((t4) => {
|
|
135488
|
+
i4.push(t4.name());
|
|
135489
|
+
if (t4.alias())
|
|
135490
|
+
i4.push(t4.alias());
|
|
135390
135491
|
});
|
|
135391
|
-
|
|
135492
|
+
e3 = f(t3, i4);
|
|
135392
135493
|
}
|
|
135393
|
-
const i3 = `error: unknown command '${
|
|
135394
|
-
this.
|
|
135494
|
+
const i3 = `error: unknown command '${t3}'${e3}`;
|
|
135495
|
+
this.error(i3, { code: "commander.unknownCommand" });
|
|
135395
135496
|
}
|
|
135396
|
-
version(
|
|
135397
|
-
if (
|
|
135497
|
+
version(t3, e3, i3) {
|
|
135498
|
+
if (t3 === void 0)
|
|
135398
135499
|
return this._version;
|
|
135399
|
-
this._version =
|
|
135400
|
-
|
|
135500
|
+
this._version = t3;
|
|
135501
|
+
e3 = e3 || "-V, --version";
|
|
135401
135502
|
i3 = i3 || "output the version number";
|
|
135402
|
-
const n2 = this.createOption(
|
|
135503
|
+
const n2 = this.createOption(e3, i3);
|
|
135403
135504
|
this._versionOptionName = n2.attributeName();
|
|
135404
135505
|
this.options.push(n2);
|
|
135405
135506
|
this.on("option:" + n2.name(), () => {
|
|
135406
|
-
this._outputConfiguration.writeOut(`${
|
|
135507
|
+
this._outputConfiguration.writeOut(`${t3}
|
|
135407
135508
|
`);
|
|
135408
|
-
this._exit(0, "commander.version",
|
|
135509
|
+
this._exit(0, "commander.version", t3);
|
|
135409
135510
|
});
|
|
135410
135511
|
return this;
|
|
135411
135512
|
}
|
|
135412
|
-
description(
|
|
135413
|
-
if (
|
|
135513
|
+
description(t3, e3) {
|
|
135514
|
+
if (t3 === void 0 && e3 === void 0)
|
|
135414
135515
|
return this._description;
|
|
135415
|
-
this._description =
|
|
135416
|
-
if (
|
|
135417
|
-
this._argsDescription =
|
|
135516
|
+
this._description = t3;
|
|
135517
|
+
if (e3) {
|
|
135518
|
+
this._argsDescription = e3;
|
|
135418
135519
|
}
|
|
135419
135520
|
return this;
|
|
135420
135521
|
}
|
|
135421
|
-
|
|
135422
|
-
if (
|
|
135522
|
+
summary(t3) {
|
|
135523
|
+
if (t3 === void 0)
|
|
135524
|
+
return this._summary;
|
|
135525
|
+
this._summary = t3;
|
|
135526
|
+
return this;
|
|
135527
|
+
}
|
|
135528
|
+
alias(t3) {
|
|
135529
|
+
if (t3 === void 0)
|
|
135423
135530
|
return this._aliases[0];
|
|
135424
|
-
let
|
|
135531
|
+
let e3 = this;
|
|
135425
135532
|
if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {
|
|
135426
|
-
|
|
135533
|
+
e3 = this.commands[this.commands.length - 1];
|
|
135427
135534
|
}
|
|
135428
|
-
if (
|
|
135535
|
+
if (t3 === e3._name)
|
|
135429
135536
|
throw new Error("Command alias can't be the same as its name");
|
|
135430
|
-
|
|
135537
|
+
e3._aliases.push(t3);
|
|
135431
135538
|
return this;
|
|
135432
135539
|
}
|
|
135433
|
-
aliases(
|
|
135434
|
-
if (
|
|
135540
|
+
aliases(t3) {
|
|
135541
|
+
if (t3 === void 0)
|
|
135435
135542
|
return this._aliases;
|
|
135436
|
-
|
|
135543
|
+
t3.forEach((t4) => this.alias(t4));
|
|
135437
135544
|
return this;
|
|
135438
135545
|
}
|
|
135439
|
-
usage(
|
|
135440
|
-
if (
|
|
135546
|
+
usage(t3) {
|
|
135547
|
+
if (t3 === void 0) {
|
|
135441
135548
|
if (this._usage)
|
|
135442
135549
|
return this._usage;
|
|
135443
|
-
const
|
|
135444
|
-
return [].concat(this.options.length || this._hasHelpOption ? "[options]" : [], this.commands.length ? "[command]" : [], this._args.length ?
|
|
135550
|
+
const t4 = this._args.map((t5) => h(t5));
|
|
135551
|
+
return [].concat(this.options.length || this._hasHelpOption ? "[options]" : [], this.commands.length ? "[command]" : [], this._args.length ? t4 : []).join(" ");
|
|
135445
135552
|
}
|
|
135446
|
-
this._usage =
|
|
135553
|
+
this._usage = t3;
|
|
135447
135554
|
return this;
|
|
135448
135555
|
}
|
|
135449
|
-
name(
|
|
135450
|
-
if (
|
|
135556
|
+
name(t3) {
|
|
135557
|
+
if (t3 === void 0)
|
|
135451
135558
|
return this._name;
|
|
135452
|
-
this._name =
|
|
135559
|
+
this._name = t3;
|
|
135453
135560
|
return this;
|
|
135454
135561
|
}
|
|
135455
|
-
|
|
135456
|
-
|
|
135457
|
-
|
|
135458
|
-
|
|
135562
|
+
nameFromFilename(t3) {
|
|
135563
|
+
this._name = r.basename(t3, r.extname(t3));
|
|
135564
|
+
return this;
|
|
135565
|
+
}
|
|
135566
|
+
executableDir(t3) {
|
|
135567
|
+
if (t3 === void 0)
|
|
135568
|
+
return this._executableDir;
|
|
135569
|
+
this._executableDir = t3;
|
|
135570
|
+
return this;
|
|
135571
|
+
}
|
|
135572
|
+
helpInformation(t3) {
|
|
135573
|
+
const e3 = this.createHelp();
|
|
135574
|
+
if (e3.helpWidth === void 0) {
|
|
135575
|
+
e3.helpWidth = t3 && t3.error ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();
|
|
135459
135576
|
}
|
|
135460
|
-
return
|
|
135577
|
+
return e3.formatHelp(this, e3);
|
|
135461
135578
|
}
|
|
135462
|
-
_getHelpContext(
|
|
135463
|
-
|
|
135464
|
-
const
|
|
135579
|
+
_getHelpContext(t3) {
|
|
135580
|
+
t3 = t3 || {};
|
|
135581
|
+
const e3 = { error: !!t3.error };
|
|
135465
135582
|
let i3;
|
|
135466
|
-
if (
|
|
135467
|
-
i3 = (
|
|
135583
|
+
if (e3.error) {
|
|
135584
|
+
i3 = (t4) => this._outputConfiguration.writeErr(t4);
|
|
135468
135585
|
} else {
|
|
135469
|
-
i3 = (
|
|
135586
|
+
i3 = (t4) => this._outputConfiguration.writeOut(t4);
|
|
135470
135587
|
}
|
|
135471
|
-
|
|
135472
|
-
|
|
135473
|
-
return
|
|
135588
|
+
e3.write = t3.write || i3;
|
|
135589
|
+
e3.command = this;
|
|
135590
|
+
return e3;
|
|
135474
135591
|
}
|
|
135475
|
-
outputHelp(
|
|
135476
|
-
let
|
|
135477
|
-
if (typeof
|
|
135478
|
-
|
|
135479
|
-
|
|
135592
|
+
outputHelp(t3) {
|
|
135593
|
+
let e3;
|
|
135594
|
+
if (typeof t3 === "function") {
|
|
135595
|
+
e3 = t3;
|
|
135596
|
+
t3 = void 0;
|
|
135480
135597
|
}
|
|
135481
|
-
const i3 = this._getHelpContext(
|
|
135482
|
-
getCommandAndParents(this).reverse().forEach((
|
|
135598
|
+
const i3 = this._getHelpContext(t3);
|
|
135599
|
+
getCommandAndParents(this).reverse().forEach((t4) => t4.emit("beforeAllHelp", i3));
|
|
135483
135600
|
this.emit("beforeHelp", i3);
|
|
135484
135601
|
let n2 = this.helpInformation(i3);
|
|
135485
|
-
if (
|
|
135486
|
-
n2 =
|
|
135602
|
+
if (e3) {
|
|
135603
|
+
n2 = e3(n2);
|
|
135487
135604
|
if (typeof n2 !== "string" && !Buffer.isBuffer(n2)) {
|
|
135488
135605
|
throw new Error("outputHelp callback must return a string or a Buffer");
|
|
135489
135606
|
}
|
|
@@ -135491,306 +135608,342 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
135491
135608
|
i3.write(n2);
|
|
135492
135609
|
this.emit(this._helpLongFlag);
|
|
135493
135610
|
this.emit("afterHelp", i3);
|
|
135494
|
-
getCommandAndParents(this).forEach((
|
|
135611
|
+
getCommandAndParents(this).forEach((t4) => t4.emit("afterAllHelp", i3));
|
|
135495
135612
|
}
|
|
135496
|
-
helpOption(
|
|
135497
|
-
if (typeof
|
|
135498
|
-
this._hasHelpOption =
|
|
135613
|
+
helpOption(t3, e3) {
|
|
135614
|
+
if (typeof t3 === "boolean") {
|
|
135615
|
+
this._hasHelpOption = t3;
|
|
135499
135616
|
return this;
|
|
135500
135617
|
}
|
|
135501
|
-
this._helpFlags =
|
|
135502
|
-
this._helpDescription =
|
|
135503
|
-
const i3 =
|
|
135618
|
+
this._helpFlags = t3 || this._helpFlags;
|
|
135619
|
+
this._helpDescription = e3 || this._helpDescription;
|
|
135620
|
+
const i3 = m(this._helpFlags);
|
|
135504
135621
|
this._helpShortFlag = i3.shortFlag;
|
|
135505
135622
|
this._helpLongFlag = i3.longFlag;
|
|
135506
135623
|
return this;
|
|
135507
135624
|
}
|
|
135508
|
-
help(
|
|
135509
|
-
this.outputHelp(
|
|
135510
|
-
let
|
|
135511
|
-
if (
|
|
135512
|
-
|
|
135625
|
+
help(t3) {
|
|
135626
|
+
this.outputHelp(t3);
|
|
135627
|
+
let e3 = a.exitCode || 0;
|
|
135628
|
+
if (e3 === 0 && t3 && typeof t3 !== "function" && t3.error) {
|
|
135629
|
+
e3 = 1;
|
|
135513
135630
|
}
|
|
135514
|
-
this._exit(
|
|
135631
|
+
this._exit(e3, "commander.help", "(outputHelp)");
|
|
135515
135632
|
}
|
|
135516
|
-
addHelpText(
|
|
135633
|
+
addHelpText(t3, e3) {
|
|
135517
135634
|
const i3 = ["beforeAll", "before", "after", "afterAll"];
|
|
135518
|
-
if (!i3.includes(
|
|
135635
|
+
if (!i3.includes(t3)) {
|
|
135519
135636
|
throw new Error(`Unexpected value for position to addHelpText.
|
|
135520
135637
|
Expecting one of '${i3.join("', '")}'`);
|
|
135521
135638
|
}
|
|
135522
|
-
const n2 = `${
|
|
135523
|
-
this.on(n2, (
|
|
135639
|
+
const n2 = `${t3}Help`;
|
|
135640
|
+
this.on(n2, (t4) => {
|
|
135524
135641
|
let i4;
|
|
135525
|
-
if (typeof
|
|
135526
|
-
i4 =
|
|
135642
|
+
if (typeof e3 === "function") {
|
|
135643
|
+
i4 = e3({ error: t4.error, command: t4.command });
|
|
135527
135644
|
} else {
|
|
135528
|
-
i4 =
|
|
135645
|
+
i4 = e3;
|
|
135529
135646
|
}
|
|
135530
135647
|
if (i4) {
|
|
135531
|
-
|
|
135648
|
+
t4.write(`${i4}
|
|
135532
135649
|
`);
|
|
135533
135650
|
}
|
|
135534
135651
|
});
|
|
135535
135652
|
return this;
|
|
135536
135653
|
}
|
|
135537
135654
|
}
|
|
135538
|
-
function outputHelpIfRequested(
|
|
135539
|
-
const i3 =
|
|
135655
|
+
function outputHelpIfRequested(t3, e3) {
|
|
135656
|
+
const i3 = t3._hasHelpOption && e3.find((e4) => e4 === t3._helpLongFlag || e4 === t3._helpShortFlag);
|
|
135540
135657
|
if (i3) {
|
|
135541
|
-
|
|
135542
|
-
|
|
135658
|
+
t3.outputHelp();
|
|
135659
|
+
t3._exit(0, "commander.helpDisplayed", "(outputHelp)");
|
|
135543
135660
|
}
|
|
135544
135661
|
}
|
|
135545
|
-
function incrementNodeInspectorPort(
|
|
135546
|
-
return
|
|
135547
|
-
if (!
|
|
135548
|
-
return
|
|
135662
|
+
function incrementNodeInspectorPort(t3) {
|
|
135663
|
+
return t3.map((t4) => {
|
|
135664
|
+
if (!t4.startsWith("--inspect")) {
|
|
135665
|
+
return t4;
|
|
135549
135666
|
}
|
|
135550
|
-
let
|
|
135667
|
+
let e3;
|
|
135551
135668
|
let i3 = "127.0.0.1";
|
|
135552
135669
|
let n2 = "9229";
|
|
135553
135670
|
let s2;
|
|
135554
|
-
if ((s2 =
|
|
135555
|
-
|
|
135556
|
-
} else if ((s2 =
|
|
135557
|
-
|
|
135671
|
+
if ((s2 = t4.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
135672
|
+
e3 = s2[1];
|
|
135673
|
+
} else if ((s2 = t4.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
|
|
135674
|
+
e3 = s2[1];
|
|
135558
135675
|
if (/^\d+$/.test(s2[3])) {
|
|
135559
135676
|
n2 = s2[3];
|
|
135560
135677
|
} else {
|
|
135561
135678
|
i3 = s2[3];
|
|
135562
135679
|
}
|
|
135563
|
-
} else if ((s2 =
|
|
135564
|
-
|
|
135680
|
+
} else if ((s2 = t4.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
|
|
135681
|
+
e3 = s2[1];
|
|
135565
135682
|
i3 = s2[3];
|
|
135566
135683
|
n2 = s2[4];
|
|
135567
135684
|
}
|
|
135568
|
-
if (
|
|
135569
|
-
return `${
|
|
135685
|
+
if (e3 && n2 !== "0") {
|
|
135686
|
+
return `${e3}=${i3}:${parseInt(n2) + 1}`;
|
|
135570
135687
|
}
|
|
135571
|
-
return
|
|
135688
|
+
return t4;
|
|
135572
135689
|
});
|
|
135573
135690
|
}
|
|
135574
|
-
function getCommandAndParents(
|
|
135575
|
-
const
|
|
135576
|
-
for (let i3 =
|
|
135577
|
-
|
|
135691
|
+
function getCommandAndParents(t3) {
|
|
135692
|
+
const e3 = [];
|
|
135693
|
+
for (let i3 = t3; i3; i3 = i3.parent) {
|
|
135694
|
+
e3.push(i3);
|
|
135578
135695
|
}
|
|
135579
|
-
return
|
|
135696
|
+
return e3;
|
|
135580
135697
|
}
|
|
135581
|
-
|
|
135582
|
-
},
|
|
135698
|
+
e2.Command = Command2;
|
|
135699
|
+
}, 796: (t2, e2) => {
|
|
135583
135700
|
class CommanderError extends Error {
|
|
135584
|
-
constructor(
|
|
135701
|
+
constructor(t3, e3, i2) {
|
|
135585
135702
|
super(i2);
|
|
135586
135703
|
Error.captureStackTrace(this, this.constructor);
|
|
135587
135704
|
this.name = this.constructor.name;
|
|
135588
|
-
this.code =
|
|
135589
|
-
this.exitCode =
|
|
135705
|
+
this.code = e3;
|
|
135706
|
+
this.exitCode = t3;
|
|
135590
135707
|
this.nestedError = void 0;
|
|
135591
135708
|
}
|
|
135592
135709
|
}
|
|
135593
135710
|
class InvalidArgumentError extends CommanderError {
|
|
135594
|
-
constructor(
|
|
135595
|
-
super(1, "commander.invalidArgument",
|
|
135711
|
+
constructor(t3) {
|
|
135712
|
+
super(1, "commander.invalidArgument", t3);
|
|
135596
135713
|
Error.captureStackTrace(this, this.constructor);
|
|
135597
135714
|
this.name = this.constructor.name;
|
|
135598
135715
|
}
|
|
135599
135716
|
}
|
|
135600
|
-
|
|
135601
|
-
|
|
135602
|
-
},
|
|
135603
|
-
const { humanReadableArgName: n } = i2(
|
|
135717
|
+
e2.CommanderError = CommanderError;
|
|
135718
|
+
e2.InvalidArgumentError = InvalidArgumentError;
|
|
135719
|
+
}, 519: (t2, e2, i2) => {
|
|
135720
|
+
const { humanReadableArgName: n } = i2(535);
|
|
135604
135721
|
class Help {
|
|
135605
135722
|
constructor() {
|
|
135606
135723
|
this.helpWidth = void 0;
|
|
135607
135724
|
this.sortSubcommands = false;
|
|
135608
135725
|
this.sortOptions = false;
|
|
135609
|
-
|
|
135610
|
-
|
|
135611
|
-
|
|
135612
|
-
|
|
135613
|
-
|
|
135614
|
-
const
|
|
135615
|
-
s.
|
|
135726
|
+
this.showGlobalOptions = false;
|
|
135727
|
+
}
|
|
135728
|
+
visibleCommands(t3) {
|
|
135729
|
+
const e3 = t3.commands.filter((t4) => !t4._hidden);
|
|
135730
|
+
if (t3._hasImplicitHelpCommand()) {
|
|
135731
|
+
const [, i3, n2] = t3._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);
|
|
135732
|
+
const s = t3.createCommand(i3).helpOption(false);
|
|
135733
|
+
s.description(t3._helpCommandDescription);
|
|
135616
135734
|
if (n2)
|
|
135617
135735
|
s.arguments(n2);
|
|
135618
|
-
|
|
135736
|
+
e3.push(s);
|
|
135619
135737
|
}
|
|
135620
135738
|
if (this.sortSubcommands) {
|
|
135621
|
-
|
|
135739
|
+
e3.sort((t4, e4) => t4.name().localeCompare(e4.name()));
|
|
135622
135740
|
}
|
|
135623
|
-
return
|
|
135741
|
+
return e3;
|
|
135624
135742
|
}
|
|
135625
|
-
|
|
135626
|
-
const
|
|
135627
|
-
|
|
135628
|
-
|
|
135743
|
+
compareOptions(t3, e3) {
|
|
135744
|
+
const getSortKey = (t4) => t4.short ? t4.short.replace(/^-/, "") : t4.long.replace(/^--/, "");
|
|
135745
|
+
return getSortKey(t3).localeCompare(getSortKey(e3));
|
|
135746
|
+
}
|
|
135747
|
+
visibleOptions(t3) {
|
|
135748
|
+
const e3 = t3.options.filter((t4) => !t4.hidden);
|
|
135749
|
+
const i3 = t3._hasHelpOption && t3._helpShortFlag && !t3._findOption(t3._helpShortFlag);
|
|
135750
|
+
const n2 = t3._hasHelpOption && !t3._findOption(t3._helpLongFlag);
|
|
135629
135751
|
if (i3 || n2) {
|
|
135630
135752
|
let s;
|
|
135631
135753
|
if (!i3) {
|
|
135632
|
-
s =
|
|
135754
|
+
s = t3.createOption(t3._helpLongFlag, t3._helpDescription);
|
|
135633
135755
|
} else if (!n2) {
|
|
135634
|
-
s =
|
|
135756
|
+
s = t3.createOption(t3._helpShortFlag, t3._helpDescription);
|
|
135635
135757
|
} else {
|
|
135636
|
-
s =
|
|
135758
|
+
s = t3.createOption(t3._helpFlags, t3._helpDescription);
|
|
135637
135759
|
}
|
|
135638
|
-
|
|
135760
|
+
e3.push(s);
|
|
135639
135761
|
}
|
|
135640
135762
|
if (this.sortOptions) {
|
|
135641
|
-
|
|
135642
|
-
t3.sort((e4, t4) => getSortKey(e4).localeCompare(getSortKey(t4)));
|
|
135763
|
+
e3.sort(this.compareOptions);
|
|
135643
135764
|
}
|
|
135644
|
-
return
|
|
135765
|
+
return e3;
|
|
135645
135766
|
}
|
|
135646
|
-
|
|
135647
|
-
if (
|
|
135648
|
-
|
|
135649
|
-
|
|
135767
|
+
visibleGlobalOptions(t3) {
|
|
135768
|
+
if (!this.showGlobalOptions)
|
|
135769
|
+
return [];
|
|
135770
|
+
const e3 = [];
|
|
135771
|
+
for (let i3 = t3.parent; i3; i3 = i3.parent) {
|
|
135772
|
+
const t4 = i3.options.filter((t5) => !t5.hidden);
|
|
135773
|
+
e3.push(...t4);
|
|
135774
|
+
}
|
|
135775
|
+
if (this.sortOptions) {
|
|
135776
|
+
e3.sort(this.compareOptions);
|
|
135777
|
+
}
|
|
135778
|
+
return e3;
|
|
135779
|
+
}
|
|
135780
|
+
visibleArguments(t3) {
|
|
135781
|
+
if (t3._argsDescription) {
|
|
135782
|
+
t3._args.forEach((e3) => {
|
|
135783
|
+
e3.description = e3.description || t3._argsDescription[e3.name()] || "";
|
|
135650
135784
|
});
|
|
135651
135785
|
}
|
|
135652
|
-
if (
|
|
135653
|
-
return
|
|
135786
|
+
if (t3._args.find((t4) => t4.description)) {
|
|
135787
|
+
return t3._args;
|
|
135654
135788
|
}
|
|
135655
135789
|
return [];
|
|
135656
135790
|
}
|
|
135657
|
-
subcommandTerm(
|
|
135658
|
-
const
|
|
135659
|
-
return
|
|
135791
|
+
subcommandTerm(t3) {
|
|
135792
|
+
const e3 = t3._args.map((t4) => n(t4)).join(" ");
|
|
135793
|
+
return t3._name + (t3._aliases[0] ? "|" + t3._aliases[0] : "") + (t3.options.length ? " [options]" : "") + (e3 ? " " + e3 : "");
|
|
135660
135794
|
}
|
|
135661
|
-
optionTerm(
|
|
135662
|
-
return
|
|
135795
|
+
optionTerm(t3) {
|
|
135796
|
+
return t3.flags;
|
|
135663
135797
|
}
|
|
135664
|
-
argumentTerm(
|
|
135665
|
-
return
|
|
135798
|
+
argumentTerm(t3) {
|
|
135799
|
+
return t3.name();
|
|
135666
135800
|
}
|
|
135667
|
-
longestSubcommandTermLength(
|
|
135668
|
-
return
|
|
135801
|
+
longestSubcommandTermLength(t3, e3) {
|
|
135802
|
+
return e3.visibleCommands(t3).reduce((t4, i3) => Math.max(t4, e3.subcommandTerm(i3).length), 0);
|
|
135669
135803
|
}
|
|
135670
|
-
longestOptionTermLength(
|
|
135671
|
-
return
|
|
135804
|
+
longestOptionTermLength(t3, e3) {
|
|
135805
|
+
return e3.visibleOptions(t3).reduce((t4, i3) => Math.max(t4, e3.optionTerm(i3).length), 0);
|
|
135672
135806
|
}
|
|
135673
|
-
|
|
135674
|
-
return
|
|
135807
|
+
longestGlobalOptionTermLength(t3, e3) {
|
|
135808
|
+
return e3.visibleGlobalOptions(t3).reduce((t4, i3) => Math.max(t4, e3.optionTerm(i3).length), 0);
|
|
135675
135809
|
}
|
|
135676
|
-
|
|
135677
|
-
|
|
135678
|
-
|
|
135679
|
-
|
|
135810
|
+
longestArgumentTermLength(t3, e3) {
|
|
135811
|
+
return e3.visibleArguments(t3).reduce((t4, i3) => Math.max(t4, e3.argumentTerm(i3).length), 0);
|
|
135812
|
+
}
|
|
135813
|
+
commandUsage(t3) {
|
|
135814
|
+
let e3 = t3._name;
|
|
135815
|
+
if (t3._aliases[0]) {
|
|
135816
|
+
e3 = e3 + "|" + t3._aliases[0];
|
|
135680
135817
|
}
|
|
135681
135818
|
let i3 = "";
|
|
135682
|
-
for (let
|
|
135683
|
-
i3 =
|
|
135819
|
+
for (let e4 = t3.parent; e4; e4 = e4.parent) {
|
|
135820
|
+
i3 = e4.name() + " " + i3;
|
|
135684
135821
|
}
|
|
135685
|
-
return i3 +
|
|
135822
|
+
return i3 + e3 + " " + t3.usage();
|
|
135686
135823
|
}
|
|
135687
|
-
commandDescription(
|
|
135688
|
-
return
|
|
135824
|
+
commandDescription(t3) {
|
|
135825
|
+
return t3.description();
|
|
135689
135826
|
}
|
|
135690
|
-
subcommandDescription(
|
|
135691
|
-
return
|
|
135827
|
+
subcommandDescription(t3) {
|
|
135828
|
+
return t3.summary() || t3.description();
|
|
135692
135829
|
}
|
|
135693
|
-
optionDescription(
|
|
135694
|
-
const
|
|
135695
|
-
if (
|
|
135696
|
-
|
|
135830
|
+
optionDescription(t3) {
|
|
135831
|
+
const e3 = [];
|
|
135832
|
+
if (t3.argChoices) {
|
|
135833
|
+
e3.push(`choices: ${t3.argChoices.map((t4) => JSON.stringify(t4)).join(", ")}`);
|
|
135697
135834
|
}
|
|
135698
|
-
if (
|
|
135699
|
-
t3.
|
|
135835
|
+
if (t3.defaultValue !== void 0) {
|
|
135836
|
+
const i3 = t3.required || t3.optional || t3.isBoolean() && typeof t3.defaultValue === "boolean";
|
|
135837
|
+
if (i3) {
|
|
135838
|
+
e3.push(`default: ${t3.defaultValueDescription || JSON.stringify(t3.defaultValue)}`);
|
|
135839
|
+
}
|
|
135700
135840
|
}
|
|
135701
|
-
if (
|
|
135702
|
-
|
|
135841
|
+
if (t3.presetArg !== void 0 && t3.optional) {
|
|
135842
|
+
e3.push(`preset: ${JSON.stringify(t3.presetArg)}`);
|
|
135703
135843
|
}
|
|
135704
|
-
if (t3.
|
|
135705
|
-
|
|
135844
|
+
if (t3.envVar !== void 0) {
|
|
135845
|
+
e3.push(`env: ${t3.envVar}`);
|
|
135706
135846
|
}
|
|
135707
|
-
|
|
135708
|
-
|
|
135709
|
-
argumentDescription(e3) {
|
|
135710
|
-
const t3 = [];
|
|
135711
|
-
if (e3.argChoices) {
|
|
135712
|
-
t3.push(`choices: ${e3.argChoices.map((e4) => JSON.stringify(e4)).join(", ")}`);
|
|
135847
|
+
if (e3.length > 0) {
|
|
135848
|
+
return `${t3.description} (${e3.join(", ")})`;
|
|
135713
135849
|
}
|
|
135714
|
-
|
|
135715
|
-
|
|
135716
|
-
|
|
135717
|
-
|
|
135718
|
-
|
|
135719
|
-
|
|
135720
|
-
|
|
135850
|
+
return t3.description;
|
|
135851
|
+
}
|
|
135852
|
+
argumentDescription(t3) {
|
|
135853
|
+
const e3 = [];
|
|
135854
|
+
if (t3.argChoices) {
|
|
135855
|
+
e3.push(`choices: ${t3.argChoices.map((t4) => JSON.stringify(t4)).join(", ")}`);
|
|
135856
|
+
}
|
|
135857
|
+
if (t3.defaultValue !== void 0) {
|
|
135858
|
+
e3.push(`default: ${t3.defaultValueDescription || JSON.stringify(t3.defaultValue)}`);
|
|
135859
|
+
}
|
|
135860
|
+
if (e3.length > 0) {
|
|
135861
|
+
const i3 = `(${e3.join(", ")})`;
|
|
135862
|
+
if (t3.description) {
|
|
135863
|
+
return `${t3.description} ${i3}`;
|
|
135721
135864
|
}
|
|
135722
135865
|
return i3;
|
|
135723
135866
|
}
|
|
135724
|
-
return
|
|
135867
|
+
return t3.description;
|
|
135725
135868
|
}
|
|
135726
|
-
formatHelp(
|
|
135727
|
-
const i3 =
|
|
135728
|
-
const n2 =
|
|
135869
|
+
formatHelp(t3, e3) {
|
|
135870
|
+
const i3 = e3.padWidth(t3, e3);
|
|
135871
|
+
const n2 = e3.helpWidth || 80;
|
|
135729
135872
|
const s = 2;
|
|
135730
135873
|
const r = 2;
|
|
135731
|
-
function formatItem(
|
|
135874
|
+
function formatItem(t4, o2) {
|
|
135732
135875
|
if (o2) {
|
|
135733
|
-
const a2 = `${
|
|
135734
|
-
return
|
|
135876
|
+
const a2 = `${t4.padEnd(i3 + r)}${o2}`;
|
|
135877
|
+
return e3.wrap(a2, n2 - s, i3 + r);
|
|
135735
135878
|
}
|
|
135736
|
-
return
|
|
135879
|
+
return t4;
|
|
135737
135880
|
}
|
|
135738
|
-
function formatList(
|
|
135739
|
-
return
|
|
135881
|
+
function formatList(t4) {
|
|
135882
|
+
return t4.join("\n").replace(/^/gm, " ".repeat(s));
|
|
135740
135883
|
}
|
|
135741
|
-
let o = [`Usage: ${
|
|
135742
|
-
const a =
|
|
135884
|
+
let o = [`Usage: ${e3.commandUsage(t3)}`, ""];
|
|
135885
|
+
const a = e3.commandDescription(t3);
|
|
135743
135886
|
if (a.length > 0) {
|
|
135744
|
-
o = o.concat([a, ""]);
|
|
135887
|
+
o = o.concat([e3.wrap(a, n2, 0), ""]);
|
|
135745
135888
|
}
|
|
135746
|
-
const
|
|
135889
|
+
const l = e3.visibleArguments(t3).map((t4) => formatItem(e3.argumentTerm(t4), e3.argumentDescription(t4)));
|
|
135890
|
+
if (l.length > 0) {
|
|
135891
|
+
o = o.concat(["Arguments:", formatList(l), ""]);
|
|
135892
|
+
}
|
|
135893
|
+
const h = e3.visibleOptions(t3).map((t4) => formatItem(e3.optionTerm(t4), e3.optionDescription(t4)));
|
|
135747
135894
|
if (h.length > 0) {
|
|
135748
|
-
o = o.concat(["
|
|
135895
|
+
o = o.concat(["Options:", formatList(h), ""]);
|
|
135749
135896
|
}
|
|
135750
|
-
|
|
135751
|
-
|
|
135752
|
-
|
|
135897
|
+
if (this.showGlobalOptions) {
|
|
135898
|
+
const i4 = e3.visibleGlobalOptions(t3).map((t4) => formatItem(e3.optionTerm(t4), e3.optionDescription(t4)));
|
|
135899
|
+
if (i4.length > 0) {
|
|
135900
|
+
o = o.concat(["Global Options:", formatList(i4), ""]);
|
|
135901
|
+
}
|
|
135753
135902
|
}
|
|
135754
|
-
const u =
|
|
135903
|
+
const u = e3.visibleCommands(t3).map((t4) => formatItem(e3.subcommandTerm(t4), e3.subcommandDescription(t4)));
|
|
135755
135904
|
if (u.length > 0) {
|
|
135756
135905
|
o = o.concat(["Commands:", formatList(u), ""]);
|
|
135757
135906
|
}
|
|
135758
135907
|
return o.join("\n");
|
|
135759
135908
|
}
|
|
135760
|
-
padWidth(
|
|
135761
|
-
return Math.max(
|
|
135909
|
+
padWidth(t3, e3) {
|
|
135910
|
+
return Math.max(e3.longestOptionTermLength(t3, e3), e3.longestGlobalOptionTermLength(t3, e3), e3.longestSubcommandTermLength(t3, e3), e3.longestArgumentTermLength(t3, e3));
|
|
135762
135911
|
}
|
|
135763
|
-
wrap(
|
|
135764
|
-
|
|
135765
|
-
|
|
135766
|
-
|
|
135767
|
-
|
|
135768
|
-
|
|
135769
|
-
|
|
135770
|
-
|
|
135771
|
-
const a =
|
|
135772
|
-
const
|
|
135773
|
-
const
|
|
135774
|
-
|
|
135775
|
-
|
|
135776
|
-
|
|
135777
|
-
|
|
135778
|
-
|
|
135912
|
+
wrap(t3, e3, i3, n2 = 40) {
|
|
135913
|
+
const s = " \\f\\t\\v - \uFEFF";
|
|
135914
|
+
const r = new RegExp(`[\\n][${s}]+`);
|
|
135915
|
+
if (t3.match(r))
|
|
135916
|
+
return t3;
|
|
135917
|
+
const o = e3 - i3;
|
|
135918
|
+
if (o < n2)
|
|
135919
|
+
return t3;
|
|
135920
|
+
const a = t3.slice(0, i3);
|
|
135921
|
+
const l = t3.slice(i3).replace("\r\n", "\n");
|
|
135922
|
+
const h = " ".repeat(i3);
|
|
135923
|
+
const u = "";
|
|
135924
|
+
const c = `\\s${u}`;
|
|
135925
|
+
const p = new RegExp(`
|
|
135926
|
+
|.{1,${o - 1}}([${c}]|$)|[^${c}]+?([${c}]|$)`, "g");
|
|
135927
|
+
const m = l.match(p) || [];
|
|
135928
|
+
return a + m.map((t4, e4) => {
|
|
135929
|
+
if (t4 === "\n")
|
|
135930
|
+
return "";
|
|
135931
|
+
return (e4 > 0 ? h : "") + t4.trimEnd();
|
|
135779
135932
|
}).join("\n");
|
|
135780
135933
|
}
|
|
135781
135934
|
}
|
|
135782
|
-
|
|
135783
|
-
},
|
|
135784
|
-
const { InvalidArgumentError: n } = i2(
|
|
135935
|
+
e2.Help = Help;
|
|
135936
|
+
}, 437: (t2, e2, i2) => {
|
|
135937
|
+
const { InvalidArgumentError: n } = i2(796);
|
|
135785
135938
|
class Option {
|
|
135786
|
-
constructor(
|
|
135787
|
-
this.flags =
|
|
135788
|
-
this.description =
|
|
135789
|
-
this.required =
|
|
135790
|
-
this.optional =
|
|
135791
|
-
this.variadic = /\w\.\.\.[>\]]$/.test(
|
|
135939
|
+
constructor(t3, e3) {
|
|
135940
|
+
this.flags = t3;
|
|
135941
|
+
this.description = e3 || "";
|
|
135942
|
+
this.required = t3.includes("<");
|
|
135943
|
+
this.optional = t3.includes("[");
|
|
135944
|
+
this.variadic = /\w\.\.\.[>\]]$/.test(t3);
|
|
135792
135945
|
this.mandatory = false;
|
|
135793
|
-
const i3 = splitOptionFlags(
|
|
135946
|
+
const i3 = splitOptionFlags(t3);
|
|
135794
135947
|
this.short = i3.shortFlag;
|
|
135795
135948
|
this.long = i3.longFlag;
|
|
135796
135949
|
this.negate = false;
|
|
@@ -135799,48 +135952,63 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
135799
135952
|
}
|
|
135800
135953
|
this.defaultValue = void 0;
|
|
135801
135954
|
this.defaultValueDescription = void 0;
|
|
135955
|
+
this.presetArg = void 0;
|
|
135802
135956
|
this.envVar = void 0;
|
|
135803
135957
|
this.parseArg = void 0;
|
|
135804
135958
|
this.hidden = false;
|
|
135805
135959
|
this.argChoices = void 0;
|
|
135960
|
+
this.conflictsWith = [];
|
|
135961
|
+
this.implied = void 0;
|
|
135806
135962
|
}
|
|
135807
|
-
default(
|
|
135808
|
-
this.defaultValue =
|
|
135809
|
-
this.defaultValueDescription =
|
|
135963
|
+
default(t3, e3) {
|
|
135964
|
+
this.defaultValue = t3;
|
|
135965
|
+
this.defaultValueDescription = e3;
|
|
135810
135966
|
return this;
|
|
135811
135967
|
}
|
|
135812
|
-
|
|
135813
|
-
this.
|
|
135968
|
+
preset(t3) {
|
|
135969
|
+
this.presetArg = t3;
|
|
135814
135970
|
return this;
|
|
135815
135971
|
}
|
|
135816
|
-
|
|
135817
|
-
this.
|
|
135972
|
+
conflicts(t3) {
|
|
135973
|
+
this.conflictsWith = this.conflictsWith.concat(t3);
|
|
135818
135974
|
return this;
|
|
135819
135975
|
}
|
|
135820
|
-
|
|
135821
|
-
this.
|
|
135976
|
+
implies(t3) {
|
|
135977
|
+
this.implied = Object.assign(this.implied || {}, t3);
|
|
135822
135978
|
return this;
|
|
135823
135979
|
}
|
|
135824
|
-
|
|
135825
|
-
this.
|
|
135980
|
+
env(t3) {
|
|
135981
|
+
this.envVar = t3;
|
|
135826
135982
|
return this;
|
|
135827
135983
|
}
|
|
135828
|
-
|
|
135829
|
-
|
|
135830
|
-
|
|
135984
|
+
argParser(t3) {
|
|
135985
|
+
this.parseArg = t3;
|
|
135986
|
+
return this;
|
|
135987
|
+
}
|
|
135988
|
+
makeOptionMandatory(t3 = true) {
|
|
135989
|
+
this.mandatory = !!t3;
|
|
135990
|
+
return this;
|
|
135991
|
+
}
|
|
135992
|
+
hideHelp(t3 = true) {
|
|
135993
|
+
this.hidden = !!t3;
|
|
135994
|
+
return this;
|
|
135995
|
+
}
|
|
135996
|
+
_concatValue(t3, e3) {
|
|
135997
|
+
if (e3 === this.defaultValue || !Array.isArray(e3)) {
|
|
135998
|
+
return [t3];
|
|
135831
135999
|
}
|
|
135832
|
-
return
|
|
136000
|
+
return e3.concat(t3);
|
|
135833
136001
|
}
|
|
135834
|
-
choices(
|
|
135835
|
-
this.argChoices =
|
|
135836
|
-
this.parseArg = (
|
|
135837
|
-
if (!
|
|
135838
|
-
throw new n(`Allowed choices are ${
|
|
136002
|
+
choices(t3) {
|
|
136003
|
+
this.argChoices = t3.slice();
|
|
136004
|
+
this.parseArg = (t4, e3) => {
|
|
136005
|
+
if (!this.argChoices.includes(t4)) {
|
|
136006
|
+
throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
135839
136007
|
}
|
|
135840
136008
|
if (this.variadic) {
|
|
135841
|
-
return this._concatValue(
|
|
136009
|
+
return this._concatValue(t4, e3);
|
|
135842
136010
|
}
|
|
135843
|
-
return
|
|
136011
|
+
return t4;
|
|
135844
136012
|
};
|
|
135845
136013
|
return this;
|
|
135846
136014
|
}
|
|
@@ -135853,86 +136021,117 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
135853
136021
|
attributeName() {
|
|
135854
136022
|
return camelcase(this.name().replace(/^no-/, ""));
|
|
135855
136023
|
}
|
|
135856
|
-
is(
|
|
135857
|
-
return this.short ===
|
|
136024
|
+
is(t3) {
|
|
136025
|
+
return this.short === t3 || this.long === t3;
|
|
136026
|
+
}
|
|
136027
|
+
isBoolean() {
|
|
136028
|
+
return !this.required && !this.optional && !this.negate;
|
|
135858
136029
|
}
|
|
135859
136030
|
}
|
|
135860
|
-
|
|
135861
|
-
|
|
136031
|
+
class DualOptions {
|
|
136032
|
+
constructor(t3) {
|
|
136033
|
+
this.positiveOptions = /* @__PURE__ */ new Map();
|
|
136034
|
+
this.negativeOptions = /* @__PURE__ */ new Map();
|
|
136035
|
+
this.dualOptions = /* @__PURE__ */ new Set();
|
|
136036
|
+
t3.forEach((t4) => {
|
|
136037
|
+
if (t4.negate) {
|
|
136038
|
+
this.negativeOptions.set(t4.attributeName(), t4);
|
|
136039
|
+
} else {
|
|
136040
|
+
this.positiveOptions.set(t4.attributeName(), t4);
|
|
136041
|
+
}
|
|
136042
|
+
});
|
|
136043
|
+
this.negativeOptions.forEach((t4, e3) => {
|
|
136044
|
+
if (this.positiveOptions.has(e3)) {
|
|
136045
|
+
this.dualOptions.add(e3);
|
|
136046
|
+
}
|
|
136047
|
+
});
|
|
136048
|
+
}
|
|
136049
|
+
valueFromOption(t3, e3) {
|
|
136050
|
+
const i3 = e3.attributeName();
|
|
136051
|
+
if (!this.dualOptions.has(i3))
|
|
136052
|
+
return true;
|
|
136053
|
+
const n2 = this.negativeOptions.get(i3).presetArg;
|
|
136054
|
+
const s = n2 !== void 0 ? n2 : false;
|
|
136055
|
+
return e3.negate === (s === t3);
|
|
136056
|
+
}
|
|
135862
136057
|
}
|
|
135863
|
-
function
|
|
135864
|
-
|
|
136058
|
+
function camelcase(t3) {
|
|
136059
|
+
return t3.split("-").reduce((t4, e3) => t4 + e3[0].toUpperCase() + e3.slice(1));
|
|
136060
|
+
}
|
|
136061
|
+
function splitOptionFlags(t3) {
|
|
136062
|
+
let e3;
|
|
135865
136063
|
let i3;
|
|
135866
|
-
const n2 =
|
|
136064
|
+
const n2 = t3.split(/[ |,]+/);
|
|
135867
136065
|
if (n2.length > 1 && !/^[[<]/.test(n2[1]))
|
|
135868
|
-
|
|
136066
|
+
e3 = n2.shift();
|
|
135869
136067
|
i3 = n2.shift();
|
|
135870
|
-
if (!
|
|
135871
|
-
|
|
136068
|
+
if (!e3 && /^-[^-]$/.test(i3)) {
|
|
136069
|
+
e3 = i3;
|
|
135872
136070
|
i3 = void 0;
|
|
135873
136071
|
}
|
|
135874
|
-
return { shortFlag:
|
|
136072
|
+
return { shortFlag: e3, longFlag: i3 };
|
|
135875
136073
|
}
|
|
135876
|
-
|
|
135877
|
-
|
|
135878
|
-
|
|
136074
|
+
e2.Option = Option;
|
|
136075
|
+
e2.splitOptionFlags = splitOptionFlags;
|
|
136076
|
+
e2.DualOptions = DualOptions;
|
|
136077
|
+
}, 860: (t2, e2) => {
|
|
135879
136078
|
const i2 = 3;
|
|
135880
|
-
function editDistance(
|
|
135881
|
-
if (Math.abs(
|
|
135882
|
-
return Math.max(
|
|
136079
|
+
function editDistance(t3, e3) {
|
|
136080
|
+
if (Math.abs(t3.length - e3.length) > i2)
|
|
136081
|
+
return Math.max(t3.length, e3.length);
|
|
135883
136082
|
const n = [];
|
|
135884
|
-
for (let t4 = 0; t4 <= e3.length; t4++) {
|
|
135885
|
-
n[t4] = [t4];
|
|
135886
|
-
}
|
|
135887
136083
|
for (let e4 = 0; e4 <= t3.length; e4++) {
|
|
135888
|
-
n[
|
|
136084
|
+
n[e4] = [e4];
|
|
135889
136085
|
}
|
|
135890
|
-
for (let
|
|
135891
|
-
|
|
136086
|
+
for (let t4 = 0; t4 <= e3.length; t4++) {
|
|
136087
|
+
n[0][t4] = t4;
|
|
136088
|
+
}
|
|
136089
|
+
for (let i3 = 1; i3 <= e3.length; i3++) {
|
|
136090
|
+
for (let s = 1; s <= t3.length; s++) {
|
|
135892
136091
|
let r = 1;
|
|
135893
|
-
if (
|
|
136092
|
+
if (t3[s - 1] === e3[i3 - 1]) {
|
|
135894
136093
|
r = 0;
|
|
135895
136094
|
} else {
|
|
135896
136095
|
r = 1;
|
|
135897
136096
|
}
|
|
135898
136097
|
n[s][i3] = Math.min(n[s - 1][i3] + 1, n[s][i3 - 1] + 1, n[s - 1][i3 - 1] + r);
|
|
135899
|
-
if (s > 1 && i3 > 1 &&
|
|
136098
|
+
if (s > 1 && i3 > 1 && t3[s - 1] === e3[i3 - 2] && t3[s - 2] === e3[i3 - 1]) {
|
|
135900
136099
|
n[s][i3] = Math.min(n[s][i3], n[s - 2][i3 - 2] + 1);
|
|
135901
136100
|
}
|
|
135902
136101
|
}
|
|
135903
136102
|
}
|
|
135904
|
-
return n[
|
|
136103
|
+
return n[t3.length][e3.length];
|
|
135905
136104
|
}
|
|
135906
|
-
function suggestSimilar(
|
|
135907
|
-
if (!
|
|
136105
|
+
function suggestSimilar(t3, e3) {
|
|
136106
|
+
if (!e3 || e3.length === 0)
|
|
135908
136107
|
return "";
|
|
135909
|
-
|
|
135910
|
-
const n =
|
|
136108
|
+
e3 = Array.from(new Set(e3));
|
|
136109
|
+
const n = t3.startsWith("--");
|
|
135911
136110
|
if (n) {
|
|
135912
|
-
|
|
135913
|
-
|
|
136111
|
+
t3 = t3.slice(2);
|
|
136112
|
+
e3 = e3.map((t4) => t4.slice(2));
|
|
135914
136113
|
}
|
|
135915
136114
|
let s = [];
|
|
135916
136115
|
let r = i2;
|
|
135917
136116
|
const o = 0.4;
|
|
135918
|
-
|
|
135919
|
-
if (
|
|
136117
|
+
e3.forEach((e4) => {
|
|
136118
|
+
if (e4.length <= 1)
|
|
135920
136119
|
return;
|
|
135921
|
-
const i3 = editDistance(
|
|
135922
|
-
const n2 = Math.max(
|
|
136120
|
+
const i3 = editDistance(t3, e4);
|
|
136121
|
+
const n2 = Math.max(t3.length, e4.length);
|
|
135923
136122
|
const a = (n2 - i3) / n2;
|
|
135924
136123
|
if (a > o) {
|
|
135925
136124
|
if (i3 < r) {
|
|
135926
136125
|
r = i3;
|
|
135927
|
-
s = [
|
|
136126
|
+
s = [e4];
|
|
135928
136127
|
} else if (i3 === r) {
|
|
135929
|
-
s.push(
|
|
136128
|
+
s.push(e4);
|
|
135930
136129
|
}
|
|
135931
136130
|
}
|
|
135932
136131
|
});
|
|
135933
|
-
s.sort((
|
|
136132
|
+
s.sort((t4, e4) => t4.localeCompare(e4));
|
|
135934
136133
|
if (n) {
|
|
135935
|
-
s = s.map((
|
|
136134
|
+
s = s.map((t4) => `--${t4}`);
|
|
135936
136135
|
}
|
|
135937
136136
|
if (s.length > 1) {
|
|
135938
136137
|
return `
|
|
@@ -135944,28 +136143,28 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
135944
136143
|
}
|
|
135945
136144
|
return "";
|
|
135946
136145
|
}
|
|
135947
|
-
|
|
136146
|
+
e2.suggestSimilar = suggestSimilar;
|
|
135948
136147
|
} };
|
|
135949
|
-
var
|
|
136148
|
+
var e = {};
|
|
135950
136149
|
function __nccwpck_require__(i2) {
|
|
135951
|
-
var n =
|
|
136150
|
+
var n = e[i2];
|
|
135952
136151
|
if (n !== void 0) {
|
|
135953
136152
|
return n.exports;
|
|
135954
136153
|
}
|
|
135955
|
-
var s =
|
|
136154
|
+
var s = e[i2] = { exports: {} };
|
|
135956
136155
|
var r = true;
|
|
135957
136156
|
try {
|
|
135958
|
-
|
|
136157
|
+
t[i2](s, s.exports, __nccwpck_require__);
|
|
135959
136158
|
r = false;
|
|
135960
136159
|
} finally {
|
|
135961
136160
|
if (r)
|
|
135962
|
-
delete
|
|
136161
|
+
delete e[i2];
|
|
135963
136162
|
}
|
|
135964
136163
|
return s.exports;
|
|
135965
136164
|
}
|
|
135966
136165
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
135967
136166
|
__nccwpck_require__.ab = __dirname + "/";
|
|
135968
|
-
var i = __nccwpck_require__(
|
|
136167
|
+
var i = __nccwpck_require__(632);
|
|
135969
136168
|
module2.exports = i;
|
|
135970
136169
|
})();
|
|
135971
136170
|
}
|
|
@@ -136105,12 +136304,17 @@ var require_commands = __commonJS({
|
|
|
136105
136304
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
136106
136305
|
var commands_exports = {};
|
|
136107
136306
|
__export2(commands_exports, {
|
|
136307
|
+
getArgv: () => getArgv,
|
|
136108
136308
|
getCommand: () => getCommand,
|
|
136109
136309
|
isDevCommand: () => isDevCommand
|
|
136110
136310
|
});
|
|
136111
136311
|
module2.exports = __toCommonJS2(commands_exports);
|
|
136312
|
+
var getArgv = () => {
|
|
136313
|
+
var _a2;
|
|
136314
|
+
return (((_a2 = process.env.MODERN_ARGV) == null ? void 0 : _a2.split(" ")) || process.argv).slice(2);
|
|
136315
|
+
};
|
|
136112
136316
|
var getCommand = () => {
|
|
136113
|
-
const args =
|
|
136317
|
+
const args = getArgv();
|
|
136114
136318
|
const command = args[0];
|
|
136115
136319
|
return command;
|
|
136116
136320
|
};
|
|
@@ -136121,108 +136325,6 @@ var require_commands = __commonJS({
|
|
|
136121
136325
|
}
|
|
136122
136326
|
});
|
|
136123
136327
|
|
|
136124
|
-
// ../../../toolkit/utils/dist/format.js
|
|
136125
|
-
var require_format2 = __commonJS({
|
|
136126
|
-
"../../../toolkit/utils/dist/format.js"(exports, module2) {
|
|
136127
|
-
var __defProp2 = Object.defineProperty;
|
|
136128
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
136129
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
136130
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
136131
|
-
var __export2 = (target, all) => {
|
|
136132
|
-
for (var name in all)
|
|
136133
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
136134
|
-
};
|
|
136135
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
136136
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
136137
|
-
for (let key of __getOwnPropNames2(from))
|
|
136138
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
136139
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
136140
|
-
}
|
|
136141
|
-
return to;
|
|
136142
|
-
};
|
|
136143
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
136144
|
-
var format_exports = {};
|
|
136145
|
-
__export2(format_exports, {
|
|
136146
|
-
formatWebpackMessages: () => formatWebpackMessages
|
|
136147
|
-
});
|
|
136148
|
-
module2.exports = __toCommonJS2(format_exports);
|
|
136149
|
-
var friendlySyntaxErrorLabel = "SyntaxError:";
|
|
136150
|
-
function isLikelyASyntaxError(message) {
|
|
136151
|
-
return message.includes(friendlySyntaxErrorLabel);
|
|
136152
|
-
}
|
|
136153
|
-
function formatMessage(stats) {
|
|
136154
|
-
let lines = [];
|
|
136155
|
-
let message;
|
|
136156
|
-
if (typeof stats === "object") {
|
|
136157
|
-
const fileName = stats.moduleName ? `File: ${stats.moduleName}
|
|
136158
|
-
` : "";
|
|
136159
|
-
const mainMessage = typeof stats.formatted === "string" ? stats.formatted : stats.message;
|
|
136160
|
-
const details = stats.details ? `
|
|
136161
|
-
Details: ${stats.details}
|
|
136162
|
-
` : "";
|
|
136163
|
-
const stack = stats.stack ? `
|
|
136164
|
-
${stats.stack}` : "";
|
|
136165
|
-
message = `${fileName}${mainMessage}${details}${stack}`;
|
|
136166
|
-
} else {
|
|
136167
|
-
message = stats;
|
|
136168
|
-
}
|
|
136169
|
-
lines = message.split("\n");
|
|
136170
|
-
lines = lines.map((line) => {
|
|
136171
|
-
const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(
|
|
136172
|
-
line
|
|
136173
|
-
);
|
|
136174
|
-
if (!parsingError) {
|
|
136175
|
-
return line;
|
|
136176
|
-
}
|
|
136177
|
-
const [, errorLine, errorColumn, errorMessage] = parsingError;
|
|
136178
|
-
return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;
|
|
136179
|
-
});
|
|
136180
|
-
message = lines.join("\n");
|
|
136181
|
-
message = message.replace(
|
|
136182
|
-
/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g,
|
|
136183
|
-
`${friendlySyntaxErrorLabel} $3 ($1:$2)
|
|
136184
|
-
`
|
|
136185
|
-
);
|
|
136186
|
-
lines = message.split("\n");
|
|
136187
|
-
if (lines.length > 2 && lines[1].trim() === "") {
|
|
136188
|
-
lines.splice(1, 1);
|
|
136189
|
-
}
|
|
136190
|
-
lines[0] = lines[0].replace(/^(.*) \d+:\d+-\d+$/, "$1");
|
|
136191
|
-
if (lines[1] && lines[1].indexOf("Module not found:") !== -1) {
|
|
136192
|
-
lines[1] = lines[1].replace("Error: ", "");
|
|
136193
|
-
}
|
|
136194
|
-
message = lines.join("\n");
|
|
136195
|
-
message = message.replace(
|
|
136196
|
-
/^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm,
|
|
136197
|
-
""
|
|
136198
|
-
);
|
|
136199
|
-
message = message.replace(/^\s*at\s<anonymous>(\n|$)/gm, "");
|
|
136200
|
-
lines = message.split("\n");
|
|
136201
|
-
lines = lines.filter(
|
|
136202
|
-
(line, index, arr) => index === 0 || line.trim() !== "" || line.trim() !== arr[index - 1].trim()
|
|
136203
|
-
);
|
|
136204
|
-
message = lines.join("\n");
|
|
136205
|
-
return message.trim();
|
|
136206
|
-
}
|
|
136207
|
-
function formatWebpackMessages(json) {
|
|
136208
|
-
var _a2, _b, _c;
|
|
136209
|
-
const formattedErrors = (_a2 = json == null ? void 0 : json.errors) == null ? void 0 : _a2.map(formatMessage);
|
|
136210
|
-
const formattedWarnings = (_b = json == null ? void 0 : json.warnings) == null ? void 0 : _b.map(formatMessage);
|
|
136211
|
-
const result = {
|
|
136212
|
-
errors: formattedErrors || [],
|
|
136213
|
-
warnings: formattedWarnings || []
|
|
136214
|
-
};
|
|
136215
|
-
if ((_c = result.errors) == null ? void 0 : _c.some(isLikelyASyntaxError)) {
|
|
136216
|
-
result.errors = result.errors.filter(isLikelyASyntaxError);
|
|
136217
|
-
}
|
|
136218
|
-
if (result.errors.length > 1) {
|
|
136219
|
-
result.errors.length = 1;
|
|
136220
|
-
}
|
|
136221
|
-
return result;
|
|
136222
|
-
}
|
|
136223
|
-
}
|
|
136224
|
-
});
|
|
136225
|
-
|
|
136226
136328
|
// ../../../toolkit/utils/dist/logger.js
|
|
136227
136329
|
var require_logger4 = __commonJS({
|
|
136228
136330
|
"../../../toolkit/utils/dist/logger.js"(exports, module2) {
|
|
@@ -137007,10 +137109,10 @@ var require_constants6 = __commonJS({
|
|
|
137007
137109
|
API_DIR: () => API_DIR,
|
|
137008
137110
|
CONFIG_CACHE_DIR: () => CONFIG_CACHE_DIR,
|
|
137009
137111
|
CONFIG_FILE_EXTENSIONS: () => CONFIG_FILE_EXTENSIONS,
|
|
137112
|
+
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: () => DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS,
|
|
137010
137113
|
DEFAULT_DEV_HOST: () => DEFAULT_DEV_HOST,
|
|
137011
137114
|
DEFAULT_SERVER_CONFIG: () => DEFAULT_SERVER_CONFIG,
|
|
137012
137115
|
ENTRY_NAME_PATTERN: () => ENTRY_NAME_PATTERN,
|
|
137013
|
-
HMR_SOCK_PATH: () => HMR_SOCK_PATH,
|
|
137014
137116
|
INTERNAL_APP_TOOLS_PLUGINS: () => INTERNAL_APP_TOOLS_PLUGINS,
|
|
137015
137117
|
INTERNAL_APP_TOOLS_RUNTIME_PLUGINS: () => INTERNAL_APP_TOOLS_RUNTIME_PLUGINS,
|
|
137016
137118
|
INTERNAL_CLI_PLUGINS: () => INTERNAL_CLI_PLUGINS,
|
|
@@ -137024,8 +137126,7 @@ var require_constants6 = __commonJS({
|
|
|
137024
137126
|
MAIN_ENTRY_NAME: () => MAIN_ENTRY_NAME,
|
|
137025
137127
|
OUTPUT_CONFIG_FILE: () => OUTPUT_CONFIG_FILE,
|
|
137026
137128
|
PLUGIN_SCHEMAS: () => PLUGIN_SCHEMAS,
|
|
137027
|
-
|
|
137028
|
-
ROUTE_MINIFEST_FILE: () => ROUTE_MINIFEST_FILE,
|
|
137129
|
+
ROUTE_MANIFEST_FILE: () => ROUTE_MANIFEST_FILE,
|
|
137029
137130
|
ROUTE_SPEC_FILE: () => ROUTE_SPEC_FILE,
|
|
137030
137131
|
SERVER_BUNDLE_DIRECTORY: () => SERVER_BUNDLE_DIRECTORY,
|
|
137031
137132
|
SERVER_DIR: () => SERVER_DIR,
|
|
@@ -137041,7 +137142,6 @@ var require_constants6 = __commonJS({
|
|
|
137041
137142
|
SHARED_DIR: () => SHARED_DIR
|
|
137042
137143
|
});
|
|
137043
137144
|
module2.exports = __toCommonJS2(constants_exports);
|
|
137044
|
-
var HMR_SOCK_PATH = "/webpack-hmr";
|
|
137045
137145
|
var ROUTE_SPEC_FILE = "route.json";
|
|
137046
137146
|
var MAIN_ENTRY_NAME = "main";
|
|
137047
137147
|
var LAUNCH_EDITOR_ENDPOINT = "/__open-stack-frame-in-editor";
|
|
@@ -137057,8 +137157,7 @@ var require_constants6 = __commonJS({
|
|
|
137057
137157
|
var CONFIG_FILE_EXTENSIONS = [".js", ".ts", ".mjs"];
|
|
137058
137158
|
var OUTPUT_CONFIG_FILE = "modern.config.json";
|
|
137059
137159
|
var DEFAULT_SERVER_CONFIG = "modern.server-runtime.config";
|
|
137060
|
-
var
|
|
137061
|
-
var ROUTE_MANIFEST = `_MODERNJS_ROUTE_MANIFEST`;
|
|
137160
|
+
var ROUTE_MANIFEST_FILE = "routes-manifest.json";
|
|
137062
137161
|
var LOADER_ROUTES_DIR = `loader-routes`;
|
|
137063
137162
|
var DEFAULT_DEV_HOST = "0.0.0.0";
|
|
137064
137163
|
var INTERNAL_APP_TOOLS_PLUGINS = {
|
|
@@ -137262,6 +137361,15 @@ var require_constants6 = __commonJS({
|
|
|
137262
137361
|
],
|
|
137263
137362
|
"@modern-js/plugin-nocode": []
|
|
137264
137363
|
};
|
|
137364
|
+
var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
|
137365
|
+
allowNamespaces: true,
|
|
137366
|
+
allExtensions: true,
|
|
137367
|
+
allowDeclareFields: true,
|
|
137368
|
+
// aligns Babel's behavior with TypeScript's default behavior.
|
|
137369
|
+
// https://babeljs.io/docs/en/babel-preset-typescript#optimizeconstenums
|
|
137370
|
+
optimizeConstEnums: true,
|
|
137371
|
+
isTSX: true
|
|
137372
|
+
};
|
|
137265
137373
|
}
|
|
137266
137374
|
});
|
|
137267
137375
|
|
|
@@ -138783,9 +138891,9 @@ var require_getServerConfig2 = __commonJS({
|
|
|
138783
138891
|
}
|
|
138784
138892
|
});
|
|
138785
138893
|
|
|
138786
|
-
// ../../../toolkit/utils/dist/
|
|
138787
|
-
var
|
|
138788
|
-
"../../../toolkit/utils/dist/
|
|
138894
|
+
// ../../../toolkit/utils/dist/resolve.js
|
|
138895
|
+
var require_resolve = __commonJS({
|
|
138896
|
+
"../../../toolkit/utils/dist/resolve.js"(exports, module2) {
|
|
138789
138897
|
var __defProp2 = Object.defineProperty;
|
|
138790
138898
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
138791
138899
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
@@ -138803,12 +138911,13 @@ var require_tryResolve2 = __commonJS({
|
|
|
138803
138911
|
return to;
|
|
138804
138912
|
};
|
|
138805
138913
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
138806
|
-
var
|
|
138807
|
-
__export2(
|
|
138914
|
+
var resolve_exports = {};
|
|
138915
|
+
__export2(resolve_exports, {
|
|
138916
|
+
getAntdMajorVersion: () => getAntdMajorVersion,
|
|
138808
138917
|
isPackageInstalled: () => isPackageInstalled,
|
|
138809
138918
|
tryResolve: () => tryResolve
|
|
138810
138919
|
});
|
|
138811
|
-
module2.exports = __toCommonJS2(
|
|
138920
|
+
module2.exports = __toCommonJS2(resolve_exports);
|
|
138812
138921
|
var import_ensureArray = require_ensureArray2();
|
|
138813
138922
|
var tryResolve = (name, resolvePath) => {
|
|
138814
138923
|
let filePath = "";
|
|
@@ -138831,6 +138940,17 @@ var require_tryResolve2 = __commonJS({
|
|
|
138831
138940
|
return false;
|
|
138832
138941
|
}
|
|
138833
138942
|
};
|
|
138943
|
+
var getAntdMajorVersion = (appDirectory) => {
|
|
138944
|
+
try {
|
|
138945
|
+
const pkgJsonPath = require.resolve("antd/package.json", {
|
|
138946
|
+
paths: [appDirectory]
|
|
138947
|
+
});
|
|
138948
|
+
const { version } = require(pkgJsonPath);
|
|
138949
|
+
return Number(version.split(".")[0]);
|
|
138950
|
+
} catch (err) {
|
|
138951
|
+
return null;
|
|
138952
|
+
}
|
|
138953
|
+
};
|
|
138834
138954
|
}
|
|
138835
138955
|
});
|
|
138836
138956
|
|
|
@@ -138891,15 +139011,16 @@ var require_analyzeProject2 = __commonJS({
|
|
|
138891
139011
|
});
|
|
138892
139012
|
module2.exports = __toCommonJS2(analyzeProject_exports);
|
|
138893
139013
|
var path3 = __toESM2(require("path"));
|
|
139014
|
+
var import_commands = require_commands();
|
|
138894
139015
|
var import_compiled = require_compiled2();
|
|
138895
139016
|
var isApiOnly = (appDirectory, entryDir) => __async2(void 0, null, function* () {
|
|
138896
139017
|
const srcDir = path3.join(appDirectory, entryDir != null ? entryDir : "src");
|
|
138897
139018
|
const existSrc = yield import_compiled.fs.pathExists(srcDir);
|
|
138898
|
-
const options = (0, import_compiled.minimist)(
|
|
139019
|
+
const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
|
|
138899
139020
|
return !existSrc || Boolean(options["api-only"]);
|
|
138900
139021
|
});
|
|
138901
139022
|
var isWebOnly = () => __async2(void 0, null, function* () {
|
|
138902
|
-
const options = (0, import_compiled.minimist)(
|
|
139023
|
+
const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
|
|
138903
139024
|
return Boolean(options["web-only"]);
|
|
138904
139025
|
});
|
|
138905
139026
|
}
|
|
@@ -138970,27 +139091,10 @@ var require_chainId2 = __commonJS({
|
|
|
138970
139091
|
},
|
|
138971
139092
|
/** Predefined rule groups */
|
|
138972
139093
|
ONE_OF: {
|
|
138973
|
-
JS: "js",
|
|
138974
|
-
TS: "ts",
|
|
138975
|
-
CSS: "css",
|
|
138976
|
-
LESS: "less",
|
|
138977
|
-
SASS: "sass",
|
|
138978
|
-
YAML: "yml",
|
|
138979
|
-
TOML: "toml",
|
|
138980
|
-
FALLBACK: "fallback",
|
|
138981
|
-
MARKDOWN: "markdown",
|
|
138982
|
-
BFF_CLIENT: "bff-client",
|
|
138983
|
-
CSS_MODULES: "css-modules",
|
|
138984
|
-
LESS_MODULES: "less-modules",
|
|
138985
|
-
SASS_MODULES: "sass-modules",
|
|
138986
139094
|
SVG: "svg",
|
|
138987
139095
|
SVG_URL: "svg-url",
|
|
138988
139096
|
SVG_ASSET: "svg-asset",
|
|
138989
|
-
SVG_INLINE: "svg-inline"
|
|
138990
|
-
ASSETS: "assets",
|
|
138991
|
-
ASSETS_URL: "assets-url",
|
|
138992
|
-
ASSETS_INLINE: "assets-inline",
|
|
138993
|
-
IMAGE_COMPRESS: "image-compress"
|
|
139097
|
+
SVG_INLINE: "svg-inline"
|
|
138994
139098
|
},
|
|
138995
139099
|
/** Predefined loaders */
|
|
138996
139100
|
USE: {
|
|
@@ -139675,7 +139779,6 @@ var require_dist3 = __commonJS({
|
|
|
139675
139779
|
module2.exports = __toCommonJS2(src_exports2);
|
|
139676
139780
|
__reExport(src_exports2, require_compiled2(), module2.exports);
|
|
139677
139781
|
__reExport(src_exports2, require_commands(), module2.exports);
|
|
139678
|
-
__reExport(src_exports2, require_format2(), module2.exports);
|
|
139679
139782
|
__reExport(src_exports2, require_FileSizeReporter2(), module2.exports);
|
|
139680
139783
|
__reExport(src_exports2, require_printBuildError2(), module2.exports);
|
|
139681
139784
|
__reExport(src_exports2, require_debug5(), module2.exports);
|
|
@@ -139707,7 +139810,7 @@ var require_dist3 = __commonJS({
|
|
|
139707
139810
|
__reExport(src_exports2, require_wait2(), module2.exports);
|
|
139708
139811
|
__reExport(src_exports2, require_emptyDir2(), module2.exports);
|
|
139709
139812
|
__reExport(src_exports2, require_getServerConfig2(), module2.exports);
|
|
139710
|
-
__reExport(src_exports2,
|
|
139813
|
+
__reExport(src_exports2, require_resolve(), module2.exports);
|
|
139711
139814
|
__reExport(src_exports2, require_analyzeProject2(), module2.exports);
|
|
139712
139815
|
__reExport(src_exports2, require_chainId2(), module2.exports);
|
|
139713
139816
|
__reExport(src_exports2, require_version2(), module2.exports);
|