@modern-js/create 2.10.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1339 -935
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -33111,55 +33111,58 @@ var require_recursive_readdir = __commonJS({
|
|
|
33111
33111
|
var require_commander = __commonJS({
|
|
33112
33112
|
"../utils/compiled/commander/index.js"(exports, module2) {
|
|
33113
33113
|
(() => {
|
|
33114
|
-
var
|
|
33114
|
+
var t = { 81: (t2) => {
|
|
33115
33115
|
"use strict";
|
|
33116
|
-
|
|
33117
|
-
}, 361: (
|
|
33116
|
+
t2.exports = require("child_process");
|
|
33117
|
+
}, 361: (t2) => {
|
|
33118
33118
|
"use strict";
|
|
33119
|
-
|
|
33120
|
-
}, 147: (
|
|
33119
|
+
t2.exports = require("events");
|
|
33120
|
+
}, 147: (t2) => {
|
|
33121
33121
|
"use strict";
|
|
33122
|
-
|
|
33123
|
-
}, 17: (
|
|
33122
|
+
t2.exports = require("fs");
|
|
33123
|
+
}, 17: (t2) => {
|
|
33124
33124
|
"use strict";
|
|
33125
|
-
|
|
33126
|
-
},
|
|
33127
|
-
|
|
33128
|
-
|
|
33129
|
-
|
|
33130
|
-
const {
|
|
33131
|
-
const {
|
|
33132
|
-
|
|
33133
|
-
|
|
33134
|
-
|
|
33135
|
-
t2.
|
|
33136
|
-
|
|
33137
|
-
|
|
33138
|
-
|
|
33139
|
-
|
|
33140
|
-
|
|
33141
|
-
|
|
33142
|
-
|
|
33125
|
+
t2.exports = require("path");
|
|
33126
|
+
}, 282: (t2) => {
|
|
33127
|
+
"use strict";
|
|
33128
|
+
t2.exports = require("process");
|
|
33129
|
+
}, 632: (t2, e2, i2) => {
|
|
33130
|
+
const { Argument: n } = i2(535);
|
|
33131
|
+
const { Command: s } = i2(302);
|
|
33132
|
+
const { CommanderError: r, InvalidArgumentError: o } = i2(796);
|
|
33133
|
+
const { Help: a } = i2(519);
|
|
33134
|
+
const { Option: l } = i2(437);
|
|
33135
|
+
e2 = t2.exports = new s();
|
|
33136
|
+
e2.program = e2;
|
|
33137
|
+
e2.Argument = n;
|
|
33138
|
+
e2.Command = s;
|
|
33139
|
+
e2.CommanderError = r;
|
|
33140
|
+
e2.Help = a;
|
|
33141
|
+
e2.InvalidArgumentError = o;
|
|
33142
|
+
e2.InvalidOptionArgumentError = o;
|
|
33143
|
+
e2.Option = l;
|
|
33144
|
+
}, 535: (t2, e2, i2) => {
|
|
33145
|
+
const { InvalidArgumentError: n } = i2(796);
|
|
33143
33146
|
class Argument {
|
|
33144
|
-
constructor(
|
|
33145
|
-
this.description =
|
|
33147
|
+
constructor(t3, e3) {
|
|
33148
|
+
this.description = e3 || "";
|
|
33146
33149
|
this.variadic = false;
|
|
33147
33150
|
this.parseArg = void 0;
|
|
33148
33151
|
this.defaultValue = void 0;
|
|
33149
33152
|
this.defaultValueDescription = void 0;
|
|
33150
33153
|
this.argChoices = void 0;
|
|
33151
|
-
switch (
|
|
33154
|
+
switch (t3[0]) {
|
|
33152
33155
|
case "<":
|
|
33153
33156
|
this.required = true;
|
|
33154
|
-
this._name =
|
|
33157
|
+
this._name = t3.slice(1, -1);
|
|
33155
33158
|
break;
|
|
33156
33159
|
case "[":
|
|
33157
33160
|
this.required = false;
|
|
33158
|
-
this._name =
|
|
33161
|
+
this._name = t3.slice(1, -1);
|
|
33159
33162
|
break;
|
|
33160
33163
|
default:
|
|
33161
33164
|
this.required = true;
|
|
33162
|
-
this._name =
|
|
33165
|
+
this._name = t3;
|
|
33163
33166
|
break;
|
|
33164
33167
|
}
|
|
33165
33168
|
if (this._name.length > 3 && this._name.slice(-3) === "...") {
|
|
@@ -33170,31 +33173,31 @@ var require_commander = __commonJS({
|
|
|
33170
33173
|
name() {
|
|
33171
33174
|
return this._name;
|
|
33172
33175
|
}
|
|
33173
|
-
_concatValue(
|
|
33174
|
-
if (
|
|
33175
|
-
return [
|
|
33176
|
+
_concatValue(t3, e3) {
|
|
33177
|
+
if (e3 === this.defaultValue || !Array.isArray(e3)) {
|
|
33178
|
+
return [t3];
|
|
33176
33179
|
}
|
|
33177
|
-
return
|
|
33180
|
+
return e3.concat(t3);
|
|
33178
33181
|
}
|
|
33179
|
-
default(
|
|
33180
|
-
this.defaultValue =
|
|
33181
|
-
this.defaultValueDescription =
|
|
33182
|
+
default(t3, e3) {
|
|
33183
|
+
this.defaultValue = t3;
|
|
33184
|
+
this.defaultValueDescription = e3;
|
|
33182
33185
|
return this;
|
|
33183
33186
|
}
|
|
33184
|
-
argParser(
|
|
33185
|
-
this.parseArg =
|
|
33187
|
+
argParser(t3) {
|
|
33188
|
+
this.parseArg = t3;
|
|
33186
33189
|
return this;
|
|
33187
33190
|
}
|
|
33188
|
-
choices(
|
|
33189
|
-
this.argChoices =
|
|
33190
|
-
this.parseArg = (
|
|
33191
|
-
if (!
|
|
33192
|
-
throw new n(`Allowed choices are ${
|
|
33191
|
+
choices(t3) {
|
|
33192
|
+
this.argChoices = t3.slice();
|
|
33193
|
+
this.parseArg = (t4, e3) => {
|
|
33194
|
+
if (!this.argChoices.includes(t4)) {
|
|
33195
|
+
throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
33193
33196
|
}
|
|
33194
33197
|
if (this.variadic) {
|
|
33195
|
-
return this._concatValue(
|
|
33198
|
+
return this._concatValue(t4, e3);
|
|
33196
33199
|
}
|
|
33197
|
-
return
|
|
33200
|
+
return t4;
|
|
33198
33201
|
};
|
|
33199
33202
|
return this;
|
|
33200
33203
|
}
|
|
@@ -33207,24 +33210,25 @@ var require_commander = __commonJS({
|
|
|
33207
33210
|
return this;
|
|
33208
33211
|
}
|
|
33209
33212
|
}
|
|
33210
|
-
function humanReadableArgName(
|
|
33211
|
-
const
|
|
33212
|
-
return
|
|
33213
|
+
function humanReadableArgName(t3) {
|
|
33214
|
+
const e3 = t3.name() + (t3.variadic === true ? "..." : "");
|
|
33215
|
+
return t3.required ? "<" + e3 + ">" : "[" + e3 + "]";
|
|
33213
33216
|
}
|
|
33214
|
-
|
|
33215
|
-
|
|
33216
|
-
},
|
|
33217
|
+
e2.Argument = Argument;
|
|
33218
|
+
e2.humanReadableArgName = humanReadableArgName;
|
|
33219
|
+
}, 302: (t2, e2, i2) => {
|
|
33217
33220
|
const n = i2(361).EventEmitter;
|
|
33218
33221
|
const s = i2(81);
|
|
33219
33222
|
const r = i2(17);
|
|
33220
33223
|
const o = i2(147);
|
|
33221
|
-
const
|
|
33222
|
-
const {
|
|
33223
|
-
const {
|
|
33224
|
-
const {
|
|
33225
|
-
const {
|
|
33224
|
+
const a = i2(282);
|
|
33225
|
+
const { Argument: l, humanReadableArgName: h } = i2(535);
|
|
33226
|
+
const { CommanderError: u } = i2(796);
|
|
33227
|
+
const { Help: c } = i2(519);
|
|
33228
|
+
const { Option: p, splitOptionFlags: m, DualOptions: d } = i2(437);
|
|
33229
|
+
const { suggestSimilar: f } = i2(860);
|
|
33226
33230
|
class Command3 extends n {
|
|
33227
|
-
constructor(
|
|
33231
|
+
constructor(t3) {
|
|
33228
33232
|
super();
|
|
33229
33233
|
this.commands = [];
|
|
33230
33234
|
this.options = [];
|
|
@@ -33236,25 +33240,27 @@ var require_commander = __commonJS({
|
|
|
33236
33240
|
this.rawArgs = [];
|
|
33237
33241
|
this.processedArgs = [];
|
|
33238
33242
|
this._scriptPath = null;
|
|
33239
|
-
this._name =
|
|
33243
|
+
this._name = t3 || "";
|
|
33240
33244
|
this._optionValues = {};
|
|
33241
33245
|
this._optionValueSources = {};
|
|
33242
33246
|
this._storeOptionsAsProperties = false;
|
|
33243
33247
|
this._actionHandler = null;
|
|
33244
33248
|
this._executableHandler = false;
|
|
33245
33249
|
this._executableFile = null;
|
|
33250
|
+
this._executableDir = null;
|
|
33246
33251
|
this._defaultCommandName = null;
|
|
33247
33252
|
this._exitCallback = null;
|
|
33248
33253
|
this._aliases = [];
|
|
33249
33254
|
this._combineFlagAndOptionalValue = true;
|
|
33250
33255
|
this._description = "";
|
|
33256
|
+
this._summary = "";
|
|
33251
33257
|
this._argsDescription = void 0;
|
|
33252
33258
|
this._enablePositionalOptions = false;
|
|
33253
33259
|
this._passThroughOptions = false;
|
|
33254
33260
|
this._lifeCycleHooks = {};
|
|
33255
33261
|
this._showHelpAfterError = false;
|
|
33256
|
-
this._showSuggestionAfterError =
|
|
33257
|
-
this._outputConfiguration = { writeOut: (
|
|
33262
|
+
this._showSuggestionAfterError = true;
|
|
33263
|
+
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) };
|
|
33258
33264
|
this._hidden = false;
|
|
33259
33265
|
this._hasHelpOption = true;
|
|
33260
33266
|
this._helpFlags = "-h, --help";
|
|
@@ -33267,35 +33273,35 @@ var require_commander = __commonJS({
|
|
|
33267
33273
|
this._helpCommandDescription = "display help for command";
|
|
33268
33274
|
this._helpConfiguration = {};
|
|
33269
33275
|
}
|
|
33270
|
-
copyInheritedSettings(
|
|
33271
|
-
this._outputConfiguration =
|
|
33272
|
-
this._hasHelpOption =
|
|
33273
|
-
this._helpFlags =
|
|
33274
|
-
this._helpDescription =
|
|
33275
|
-
this._helpShortFlag =
|
|
33276
|
-
this._helpLongFlag =
|
|
33277
|
-
this._helpCommandName =
|
|
33278
|
-
this._helpCommandnameAndArgs =
|
|
33279
|
-
this._helpCommandDescription =
|
|
33280
|
-
this._helpConfiguration =
|
|
33281
|
-
this._exitCallback =
|
|
33282
|
-
this._storeOptionsAsProperties =
|
|
33283
|
-
this._combineFlagAndOptionalValue =
|
|
33284
|
-
this._allowExcessArguments =
|
|
33285
|
-
this._enablePositionalOptions =
|
|
33286
|
-
this._showHelpAfterError =
|
|
33287
|
-
this._showSuggestionAfterError =
|
|
33276
|
+
copyInheritedSettings(t3) {
|
|
33277
|
+
this._outputConfiguration = t3._outputConfiguration;
|
|
33278
|
+
this._hasHelpOption = t3._hasHelpOption;
|
|
33279
|
+
this._helpFlags = t3._helpFlags;
|
|
33280
|
+
this._helpDescription = t3._helpDescription;
|
|
33281
|
+
this._helpShortFlag = t3._helpShortFlag;
|
|
33282
|
+
this._helpLongFlag = t3._helpLongFlag;
|
|
33283
|
+
this._helpCommandName = t3._helpCommandName;
|
|
33284
|
+
this._helpCommandnameAndArgs = t3._helpCommandnameAndArgs;
|
|
33285
|
+
this._helpCommandDescription = t3._helpCommandDescription;
|
|
33286
|
+
this._helpConfiguration = t3._helpConfiguration;
|
|
33287
|
+
this._exitCallback = t3._exitCallback;
|
|
33288
|
+
this._storeOptionsAsProperties = t3._storeOptionsAsProperties;
|
|
33289
|
+
this._combineFlagAndOptionalValue = t3._combineFlagAndOptionalValue;
|
|
33290
|
+
this._allowExcessArguments = t3._allowExcessArguments;
|
|
33291
|
+
this._enablePositionalOptions = t3._enablePositionalOptions;
|
|
33292
|
+
this._showHelpAfterError = t3._showHelpAfterError;
|
|
33293
|
+
this._showSuggestionAfterError = t3._showSuggestionAfterError;
|
|
33288
33294
|
return this;
|
|
33289
33295
|
}
|
|
33290
|
-
command(
|
|
33291
|
-
let n2 =
|
|
33296
|
+
command(t3, e3, i3) {
|
|
33297
|
+
let n2 = e3;
|
|
33292
33298
|
let s2 = i3;
|
|
33293
33299
|
if (typeof n2 === "object" && n2 !== null) {
|
|
33294
33300
|
s2 = n2;
|
|
33295
33301
|
n2 = null;
|
|
33296
33302
|
}
|
|
33297
33303
|
s2 = s2 || {};
|
|
33298
|
-
const [, r2, o2] =
|
|
33304
|
+
const [, r2, o2] = t3.match(/([^ ]+) *(.*)/);
|
|
33299
33305
|
const a2 = this.createCommand(r2);
|
|
33300
33306
|
if (n2) {
|
|
33301
33307
|
a2.description(n2);
|
|
@@ -33314,60 +33320,53 @@ var require_commander = __commonJS({
|
|
|
33314
33320
|
return this;
|
|
33315
33321
|
return a2;
|
|
33316
33322
|
}
|
|
33317
|
-
createCommand(
|
|
33318
|
-
return new Command3(
|
|
33323
|
+
createCommand(t3) {
|
|
33324
|
+
return new Command3(t3);
|
|
33319
33325
|
}
|
|
33320
33326
|
createHelp() {
|
|
33321
|
-
return Object.assign(new
|
|
33327
|
+
return Object.assign(new c(), this.configureHelp());
|
|
33322
33328
|
}
|
|
33323
|
-
configureHelp(
|
|
33324
|
-
if (
|
|
33329
|
+
configureHelp(t3) {
|
|
33330
|
+
if (t3 === void 0)
|
|
33325
33331
|
return this._helpConfiguration;
|
|
33326
|
-
this._helpConfiguration =
|
|
33332
|
+
this._helpConfiguration = t3;
|
|
33327
33333
|
return this;
|
|
33328
33334
|
}
|
|
33329
|
-
configureOutput(
|
|
33330
|
-
if (
|
|
33335
|
+
configureOutput(t3) {
|
|
33336
|
+
if (t3 === void 0)
|
|
33331
33337
|
return this._outputConfiguration;
|
|
33332
|
-
Object.assign(this._outputConfiguration,
|
|
33338
|
+
Object.assign(this._outputConfiguration, t3);
|
|
33333
33339
|
return this;
|
|
33334
33340
|
}
|
|
33335
|
-
showHelpAfterError(
|
|
33336
|
-
if (typeof
|
|
33337
|
-
|
|
33338
|
-
this._showHelpAfterError =
|
|
33341
|
+
showHelpAfterError(t3 = true) {
|
|
33342
|
+
if (typeof t3 !== "string")
|
|
33343
|
+
t3 = !!t3;
|
|
33344
|
+
this._showHelpAfterError = t3;
|
|
33339
33345
|
return this;
|
|
33340
33346
|
}
|
|
33341
|
-
showSuggestionAfterError(
|
|
33342
|
-
this._showSuggestionAfterError = !!
|
|
33347
|
+
showSuggestionAfterError(t3 = true) {
|
|
33348
|
+
this._showSuggestionAfterError = !!t3;
|
|
33343
33349
|
return this;
|
|
33344
33350
|
}
|
|
33345
|
-
addCommand(
|
|
33346
|
-
if (!
|
|
33347
|
-
throw new Error(
|
|
33348
|
-
|
|
33349
|
-
e4.forEach((e5) => {
|
|
33350
|
-
if (e5._executableHandler && !e5._executableFile) {
|
|
33351
|
-
throw new Error(`Must specify executableFile for deeply nested executable: ${e5.name()}`);
|
|
33352
|
-
}
|
|
33353
|
-
checkExplicitNames(e5.commands);
|
|
33354
|
-
});
|
|
33351
|
+
addCommand(t3, e3) {
|
|
33352
|
+
if (!t3._name) {
|
|
33353
|
+
throw new Error(`Command passed to .addCommand() must have a name
|
|
33354
|
+
- specify the name in Command constructor or using .name()`);
|
|
33355
33355
|
}
|
|
33356
|
-
|
|
33357
|
-
|
|
33358
|
-
|
|
33359
|
-
|
|
33360
|
-
|
|
33361
|
-
|
|
33362
|
-
this
|
|
33363
|
-
e3.parent = this;
|
|
33356
|
+
e3 = e3 || {};
|
|
33357
|
+
if (e3.isDefault)
|
|
33358
|
+
this._defaultCommandName = t3._name;
|
|
33359
|
+
if (e3.noHelp || e3.hidden)
|
|
33360
|
+
t3._hidden = true;
|
|
33361
|
+
this.commands.push(t3);
|
|
33362
|
+
t3.parent = this;
|
|
33364
33363
|
return this;
|
|
33365
33364
|
}
|
|
33366
|
-
createArgument(
|
|
33367
|
-
return new
|
|
33365
|
+
createArgument(t3, e3) {
|
|
33366
|
+
return new l(t3, e3);
|
|
33368
33367
|
}
|
|
33369
|
-
argument(
|
|
33370
|
-
const s2 = this.createArgument(
|
|
33368
|
+
argument(t3, e3, i3, n2) {
|
|
33369
|
+
const s2 = this.createArgument(t3, e3);
|
|
33371
33370
|
if (typeof i3 === "function") {
|
|
33372
33371
|
s2.default(n2).argParser(i3);
|
|
33373
33372
|
} else {
|
|
@@ -33376,33 +33375,33 @@ var require_commander = __commonJS({
|
|
|
33376
33375
|
this.addArgument(s2);
|
|
33377
33376
|
return this;
|
|
33378
33377
|
}
|
|
33379
|
-
arguments(
|
|
33380
|
-
|
|
33381
|
-
this.argument(
|
|
33378
|
+
arguments(t3) {
|
|
33379
|
+
t3.split(/ +/).forEach((t4) => {
|
|
33380
|
+
this.argument(t4);
|
|
33382
33381
|
});
|
|
33383
33382
|
return this;
|
|
33384
33383
|
}
|
|
33385
|
-
addArgument(
|
|
33386
|
-
const
|
|
33387
|
-
if (
|
|
33388
|
-
throw new Error(`only the last argument can be variadic '${
|
|
33384
|
+
addArgument(t3) {
|
|
33385
|
+
const e3 = this._args.slice(-1)[0];
|
|
33386
|
+
if (e3 && e3.variadic) {
|
|
33387
|
+
throw new Error(`only the last argument can be variadic '${e3.name()}'`);
|
|
33389
33388
|
}
|
|
33390
|
-
if (
|
|
33391
|
-
throw new Error(`a default value for a required argument is never used: '${
|
|
33389
|
+
if (t3.required && t3.defaultValue !== void 0 && t3.parseArg === void 0) {
|
|
33390
|
+
throw new Error(`a default value for a required argument is never used: '${t3.name()}'`);
|
|
33392
33391
|
}
|
|
33393
|
-
this._args.push(
|
|
33392
|
+
this._args.push(t3);
|
|
33394
33393
|
return this;
|
|
33395
33394
|
}
|
|
33396
|
-
addHelpCommand(
|
|
33397
|
-
if (
|
|
33395
|
+
addHelpCommand(t3, e3) {
|
|
33396
|
+
if (t3 === false) {
|
|
33398
33397
|
this._addImplicitHelpCommand = false;
|
|
33399
33398
|
} else {
|
|
33400
33399
|
this._addImplicitHelpCommand = true;
|
|
33401
|
-
if (typeof
|
|
33402
|
-
this._helpCommandName =
|
|
33403
|
-
this._helpCommandnameAndArgs =
|
|
33400
|
+
if (typeof t3 === "string") {
|
|
33401
|
+
this._helpCommandName = t3.split(" ")[0];
|
|
33402
|
+
this._helpCommandnameAndArgs = t3;
|
|
33404
33403
|
}
|
|
33405
|
-
this._helpCommandDescription =
|
|
33404
|
+
this._helpCommandDescription = e3 || this._helpCommandDescription;
|
|
33406
33405
|
}
|
|
33407
33406
|
return this;
|
|
33408
33407
|
}
|
|
@@ -33412,116 +33411,121 @@ var require_commander = __commonJS({
|
|
|
33412
33411
|
}
|
|
33413
33412
|
return this._addImplicitHelpCommand;
|
|
33414
33413
|
}
|
|
33415
|
-
hook(
|
|
33416
|
-
const i3 = ["preAction", "postAction"];
|
|
33417
|
-
if (!i3.includes(
|
|
33418
|
-
throw new Error(`Unexpected value for event passed to hook : '${
|
|
33414
|
+
hook(t3, e3) {
|
|
33415
|
+
const i3 = ["preSubcommand", "preAction", "postAction"];
|
|
33416
|
+
if (!i3.includes(t3)) {
|
|
33417
|
+
throw new Error(`Unexpected value for event passed to hook : '${t3}'.
|
|
33419
33418
|
Expecting one of '${i3.join("', '")}'`);
|
|
33420
33419
|
}
|
|
33421
|
-
if (this._lifeCycleHooks[
|
|
33422
|
-
this._lifeCycleHooks[
|
|
33420
|
+
if (this._lifeCycleHooks[t3]) {
|
|
33421
|
+
this._lifeCycleHooks[t3].push(e3);
|
|
33423
33422
|
} else {
|
|
33424
|
-
this._lifeCycleHooks[
|
|
33423
|
+
this._lifeCycleHooks[t3] = [e3];
|
|
33425
33424
|
}
|
|
33426
33425
|
return this;
|
|
33427
33426
|
}
|
|
33428
|
-
exitOverride(
|
|
33429
|
-
if (
|
|
33430
|
-
this._exitCallback =
|
|
33427
|
+
exitOverride(t3) {
|
|
33428
|
+
if (t3) {
|
|
33429
|
+
this._exitCallback = t3;
|
|
33431
33430
|
} else {
|
|
33432
|
-
this._exitCallback = (
|
|
33433
|
-
if (
|
|
33434
|
-
throw
|
|
33431
|
+
this._exitCallback = (t4) => {
|
|
33432
|
+
if (t4.code !== "commander.executeSubCommandAsync") {
|
|
33433
|
+
throw t4;
|
|
33435
33434
|
} else {
|
|
33436
33435
|
}
|
|
33437
33436
|
};
|
|
33438
33437
|
}
|
|
33439
33438
|
return this;
|
|
33440
33439
|
}
|
|
33441
|
-
_exit(
|
|
33440
|
+
_exit(t3, e3, i3) {
|
|
33442
33441
|
if (this._exitCallback) {
|
|
33443
|
-
this._exitCallback(new
|
|
33442
|
+
this._exitCallback(new u(t3, e3, i3));
|
|
33444
33443
|
}
|
|
33445
|
-
|
|
33444
|
+
a.exit(t3);
|
|
33446
33445
|
}
|
|
33447
|
-
action(
|
|
33448
|
-
const listener = (
|
|
33446
|
+
action(t3) {
|
|
33447
|
+
const listener = (e3) => {
|
|
33449
33448
|
const i3 = this._args.length;
|
|
33450
|
-
const n2 =
|
|
33449
|
+
const n2 = e3.slice(0, i3);
|
|
33451
33450
|
if (this._storeOptionsAsProperties) {
|
|
33452
33451
|
n2[i3] = this;
|
|
33453
33452
|
} else {
|
|
33454
33453
|
n2[i3] = this.opts();
|
|
33455
33454
|
}
|
|
33456
33455
|
n2.push(this);
|
|
33457
|
-
return
|
|
33456
|
+
return t3.apply(this, n2);
|
|
33458
33457
|
};
|
|
33459
33458
|
this._actionHandler = listener;
|
|
33460
33459
|
return this;
|
|
33461
33460
|
}
|
|
33462
|
-
createOption(
|
|
33463
|
-
return new
|
|
33461
|
+
createOption(t3, e3) {
|
|
33462
|
+
return new p(t3, e3);
|
|
33464
33463
|
}
|
|
33465
|
-
addOption(
|
|
33466
|
-
const
|
|
33467
|
-
const i3 =
|
|
33468
|
-
|
|
33469
|
-
|
|
33470
|
-
if (
|
|
33471
|
-
|
|
33472
|
-
n2 = this._findOption(t4) ? this.getOptionValue(i3) : true;
|
|
33473
|
-
}
|
|
33474
|
-
if (n2 !== void 0) {
|
|
33475
|
-
this.setOptionValueWithSource(i3, n2, "default");
|
|
33464
|
+
addOption(t3) {
|
|
33465
|
+
const e3 = t3.name();
|
|
33466
|
+
const i3 = t3.attributeName();
|
|
33467
|
+
if (t3.negate) {
|
|
33468
|
+
const e4 = t3.long.replace(/^--no-/, "--");
|
|
33469
|
+
if (!this._findOption(e4)) {
|
|
33470
|
+
this.setOptionValueWithSource(i3, t3.defaultValue === void 0 ? true : t3.defaultValue, "default");
|
|
33476
33471
|
}
|
|
33472
|
+
} else if (t3.defaultValue !== void 0) {
|
|
33473
|
+
this.setOptionValueWithSource(i3, t3.defaultValue, "default");
|
|
33477
33474
|
}
|
|
33478
|
-
this.options.push(
|
|
33479
|
-
const handleOptionValue = (
|
|
33480
|
-
|
|
33481
|
-
|
|
33475
|
+
this.options.push(t3);
|
|
33476
|
+
const handleOptionValue = (e4, n2, s2) => {
|
|
33477
|
+
if (e4 == null && t3.presetArg !== void 0) {
|
|
33478
|
+
e4 = t3.presetArg;
|
|
33479
|
+
}
|
|
33480
|
+
const r2 = this.getOptionValue(i3);
|
|
33481
|
+
if (e4 !== null && t3.parseArg) {
|
|
33482
33482
|
try {
|
|
33483
|
-
|
|
33484
|
-
} catch (
|
|
33485
|
-
if (
|
|
33486
|
-
const
|
|
33487
|
-
this.
|
|
33483
|
+
e4 = t3.parseArg(e4, r2);
|
|
33484
|
+
} catch (t4) {
|
|
33485
|
+
if (t4.code === "commander.invalidArgument") {
|
|
33486
|
+
const e5 = `${n2} ${t4.message}`;
|
|
33487
|
+
this.error(e5, { exitCode: t4.exitCode, code: t4.code });
|
|
33488
33488
|
}
|
|
33489
|
-
throw
|
|
33489
|
+
throw t4;
|
|
33490
33490
|
}
|
|
33491
|
-
} else if (
|
|
33492
|
-
|
|
33493
|
-
}
|
|
33494
|
-
if (
|
|
33495
|
-
if (
|
|
33496
|
-
|
|
33491
|
+
} else if (e4 !== null && t3.variadic) {
|
|
33492
|
+
e4 = t3._concatValue(e4, r2);
|
|
33493
|
+
}
|
|
33494
|
+
if (e4 == null) {
|
|
33495
|
+
if (t3.negate) {
|
|
33496
|
+
e4 = false;
|
|
33497
|
+
} else if (t3.isBoolean() || t3.optional) {
|
|
33498
|
+
e4 = true;
|
|
33497
33499
|
} else {
|
|
33498
|
-
|
|
33500
|
+
e4 = "";
|
|
33499
33501
|
}
|
|
33500
|
-
} else if (t4 !== null) {
|
|
33501
|
-
this.setOptionValueWithSource(i3, e3.negate ? false : t4, r2);
|
|
33502
33502
|
}
|
|
33503
|
+
this.setOptionValueWithSource(i3, e4, s2);
|
|
33503
33504
|
};
|
|
33504
|
-
this.on("option:" +
|
|
33505
|
-
const i4 = `error: option '${
|
|
33506
|
-
handleOptionValue(
|
|
33505
|
+
this.on("option:" + e3, (e4) => {
|
|
33506
|
+
const i4 = `error: option '${t3.flags}' argument '${e4}' is invalid.`;
|
|
33507
|
+
handleOptionValue(e4, i4, "cli");
|
|
33507
33508
|
});
|
|
33508
|
-
if (
|
|
33509
|
-
this.on("optionEnv:" +
|
|
33510
|
-
const i4 = `error: option '${
|
|
33511
|
-
handleOptionValue(
|
|
33509
|
+
if (t3.envVar) {
|
|
33510
|
+
this.on("optionEnv:" + e3, (e4) => {
|
|
33511
|
+
const i4 = `error: option '${t3.flags}' value '${e4}' from env '${t3.envVar}' is invalid.`;
|
|
33512
|
+
handleOptionValue(e4, i4, "env");
|
|
33512
33513
|
});
|
|
33513
33514
|
}
|
|
33514
33515
|
return this;
|
|
33515
33516
|
}
|
|
33516
|
-
_optionEx(
|
|
33517
|
-
|
|
33518
|
-
|
|
33517
|
+
_optionEx(t3, e3, i3, n2, s2) {
|
|
33518
|
+
if (typeof e3 === "object" && e3 instanceof p) {
|
|
33519
|
+
throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");
|
|
33520
|
+
}
|
|
33521
|
+
const r2 = this.createOption(e3, i3);
|
|
33522
|
+
r2.makeOptionMandatory(!!t3.mandatory);
|
|
33519
33523
|
if (typeof n2 === "function") {
|
|
33520
33524
|
r2.default(s2).argParser(n2);
|
|
33521
33525
|
} else if (n2 instanceof RegExp) {
|
|
33522
|
-
const
|
|
33523
|
-
n2 = (
|
|
33524
|
-
const n3 =
|
|
33526
|
+
const t4 = n2;
|
|
33527
|
+
n2 = (e4, i4) => {
|
|
33528
|
+
const n3 = t4.exec(e4);
|
|
33525
33529
|
return n3 ? n3[0] : i4;
|
|
33526
33530
|
};
|
|
33527
33531
|
r2.default(s2).argParser(n2);
|
|
@@ -33530,209 +33534,233 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
33530
33534
|
}
|
|
33531
33535
|
return this.addOption(r2);
|
|
33532
33536
|
}
|
|
33533
|
-
option(
|
|
33534
|
-
return this._optionEx({},
|
|
33537
|
+
option(t3, e3, i3, n2) {
|
|
33538
|
+
return this._optionEx({}, t3, e3, i3, n2);
|
|
33535
33539
|
}
|
|
33536
|
-
requiredOption(
|
|
33537
|
-
return this._optionEx({ mandatory: true },
|
|
33540
|
+
requiredOption(t3, e3, i3, n2) {
|
|
33541
|
+
return this._optionEx({ mandatory: true }, t3, e3, i3, n2);
|
|
33538
33542
|
}
|
|
33539
|
-
combineFlagAndOptionalValue(
|
|
33540
|
-
this._combineFlagAndOptionalValue = !!
|
|
33543
|
+
combineFlagAndOptionalValue(t3 = true) {
|
|
33544
|
+
this._combineFlagAndOptionalValue = !!t3;
|
|
33541
33545
|
return this;
|
|
33542
33546
|
}
|
|
33543
|
-
allowUnknownOption(
|
|
33544
|
-
this._allowUnknownOption = !!
|
|
33547
|
+
allowUnknownOption(t3 = true) {
|
|
33548
|
+
this._allowUnknownOption = !!t3;
|
|
33545
33549
|
return this;
|
|
33546
33550
|
}
|
|
33547
|
-
allowExcessArguments(
|
|
33548
|
-
this._allowExcessArguments = !!
|
|
33551
|
+
allowExcessArguments(t3 = true) {
|
|
33552
|
+
this._allowExcessArguments = !!t3;
|
|
33549
33553
|
return this;
|
|
33550
33554
|
}
|
|
33551
|
-
enablePositionalOptions(
|
|
33552
|
-
this._enablePositionalOptions = !!
|
|
33555
|
+
enablePositionalOptions(t3 = true) {
|
|
33556
|
+
this._enablePositionalOptions = !!t3;
|
|
33553
33557
|
return this;
|
|
33554
33558
|
}
|
|
33555
|
-
passThroughOptions(
|
|
33556
|
-
this._passThroughOptions = !!
|
|
33557
|
-
if (!!this.parent &&
|
|
33559
|
+
passThroughOptions(t3 = true) {
|
|
33560
|
+
this._passThroughOptions = !!t3;
|
|
33561
|
+
if (!!this.parent && t3 && !this.parent._enablePositionalOptions) {
|
|
33558
33562
|
throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");
|
|
33559
33563
|
}
|
|
33560
33564
|
return this;
|
|
33561
33565
|
}
|
|
33562
|
-
storeOptionsAsProperties(
|
|
33563
|
-
this._storeOptionsAsProperties = !!
|
|
33566
|
+
storeOptionsAsProperties(t3 = true) {
|
|
33567
|
+
this._storeOptionsAsProperties = !!t3;
|
|
33564
33568
|
if (this.options.length) {
|
|
33565
33569
|
throw new Error("call .storeOptionsAsProperties() before adding options");
|
|
33566
33570
|
}
|
|
33567
33571
|
return this;
|
|
33568
33572
|
}
|
|
33569
|
-
getOptionValue(
|
|
33573
|
+
getOptionValue(t3) {
|
|
33570
33574
|
if (this._storeOptionsAsProperties) {
|
|
33571
|
-
return this[
|
|
33575
|
+
return this[t3];
|
|
33572
33576
|
}
|
|
33573
|
-
return this._optionValues[
|
|
33577
|
+
return this._optionValues[t3];
|
|
33574
33578
|
}
|
|
33575
|
-
setOptionValue(
|
|
33579
|
+
setOptionValue(t3, e3) {
|
|
33580
|
+
return this.setOptionValueWithSource(t3, e3, void 0);
|
|
33581
|
+
}
|
|
33582
|
+
setOptionValueWithSource(t3, e3, i3) {
|
|
33576
33583
|
if (this._storeOptionsAsProperties) {
|
|
33577
|
-
this[
|
|
33584
|
+
this[t3] = e3;
|
|
33578
33585
|
} else {
|
|
33579
|
-
this._optionValues[
|
|
33586
|
+
this._optionValues[t3] = e3;
|
|
33580
33587
|
}
|
|
33588
|
+
this._optionValueSources[t3] = i3;
|
|
33581
33589
|
return this;
|
|
33582
33590
|
}
|
|
33583
|
-
|
|
33584
|
-
this.
|
|
33585
|
-
this._optionValueSources[e3] = i3;
|
|
33586
|
-
return this;
|
|
33591
|
+
getOptionValueSource(t3) {
|
|
33592
|
+
return this._optionValueSources[t3];
|
|
33587
33593
|
}
|
|
33588
|
-
|
|
33589
|
-
|
|
33594
|
+
getOptionValueSourceWithGlobals(t3) {
|
|
33595
|
+
let e3;
|
|
33596
|
+
getCommandAndParents(this).forEach((i3) => {
|
|
33597
|
+
if (i3.getOptionValueSource(t3) !== void 0) {
|
|
33598
|
+
e3 = i3.getOptionValueSource(t3);
|
|
33599
|
+
}
|
|
33600
|
+
});
|
|
33601
|
+
return e3;
|
|
33590
33602
|
}
|
|
33591
|
-
_prepareUserArgs(
|
|
33592
|
-
if (
|
|
33603
|
+
_prepareUserArgs(t3, e3) {
|
|
33604
|
+
if (t3 !== void 0 && !Array.isArray(t3)) {
|
|
33593
33605
|
throw new Error("first parameter to parse must be array or undefined");
|
|
33594
33606
|
}
|
|
33595
|
-
|
|
33596
|
-
if (
|
|
33597
|
-
|
|
33598
|
-
if (
|
|
33599
|
-
|
|
33607
|
+
e3 = e3 || {};
|
|
33608
|
+
if (t3 === void 0) {
|
|
33609
|
+
t3 = a.argv;
|
|
33610
|
+
if (a.versions && a.versions.electron) {
|
|
33611
|
+
e3.from = "electron";
|
|
33600
33612
|
}
|
|
33601
33613
|
}
|
|
33602
|
-
this.rawArgs =
|
|
33614
|
+
this.rawArgs = t3.slice();
|
|
33603
33615
|
let i3;
|
|
33604
|
-
switch (
|
|
33616
|
+
switch (e3.from) {
|
|
33605
33617
|
case void 0:
|
|
33606
33618
|
case "node":
|
|
33607
|
-
this._scriptPath =
|
|
33608
|
-
i3 =
|
|
33619
|
+
this._scriptPath = t3[1];
|
|
33620
|
+
i3 = t3.slice(2);
|
|
33609
33621
|
break;
|
|
33610
33622
|
case "electron":
|
|
33611
|
-
if (
|
|
33612
|
-
this._scriptPath =
|
|
33613
|
-
i3 =
|
|
33623
|
+
if (a.defaultApp) {
|
|
33624
|
+
this._scriptPath = t3[1];
|
|
33625
|
+
i3 = t3.slice(2);
|
|
33614
33626
|
} else {
|
|
33615
|
-
i3 =
|
|
33627
|
+
i3 = t3.slice(1);
|
|
33616
33628
|
}
|
|
33617
33629
|
break;
|
|
33618
33630
|
case "user":
|
|
33619
|
-
i3 =
|
|
33631
|
+
i3 = t3.slice(0);
|
|
33620
33632
|
break;
|
|
33621
33633
|
default:
|
|
33622
|
-
throw new Error(`unexpected parse option { from: '${
|
|
33623
|
-
}
|
|
33624
|
-
if (!this._scriptPath && require.main) {
|
|
33625
|
-
this._scriptPath = require.main.filename;
|
|
33634
|
+
throw new Error(`unexpected parse option { from: '${e3.from}' }`);
|
|
33626
33635
|
}
|
|
33627
|
-
|
|
33636
|
+
if (!this._name && this._scriptPath)
|
|
33637
|
+
this.nameFromFilename(this._scriptPath);
|
|
33638
|
+
this._name = this._name || "program";
|
|
33628
33639
|
return i3;
|
|
33629
33640
|
}
|
|
33630
|
-
parse(
|
|
33631
|
-
const i3 = this._prepareUserArgs(
|
|
33641
|
+
parse(t3, e3) {
|
|
33642
|
+
const i3 = this._prepareUserArgs(t3, e3);
|
|
33632
33643
|
this._parseCommand([], i3);
|
|
33633
33644
|
return this;
|
|
33634
33645
|
}
|
|
33635
|
-
parseAsync(
|
|
33646
|
+
parseAsync(t3, e3) {
|
|
33636
33647
|
return __async(this, null, function* () {
|
|
33637
|
-
const i3 = this._prepareUserArgs(
|
|
33648
|
+
const i3 = this._prepareUserArgs(t3, e3);
|
|
33638
33649
|
yield this._parseCommand([], i3);
|
|
33639
33650
|
return this;
|
|
33640
33651
|
});
|
|
33641
33652
|
}
|
|
33642
|
-
_executeSubCommand(
|
|
33643
|
-
|
|
33653
|
+
_executeSubCommand(t3, e3) {
|
|
33654
|
+
e3 = e3.slice();
|
|
33644
33655
|
let i3 = false;
|
|
33645
33656
|
const n2 = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
33646
|
-
|
|
33647
|
-
|
|
33648
|
-
|
|
33649
|
-
|
|
33650
|
-
|
|
33651
|
-
|
|
33652
|
-
|
|
33653
|
-
|
|
33654
|
-
|
|
33655
|
-
|
|
33656
|
-
h2 = ".";
|
|
33657
|
+
function findFile(t4, e4) {
|
|
33658
|
+
const i4 = r.resolve(t4, e4);
|
|
33659
|
+
if (o.existsSync(i4))
|
|
33660
|
+
return i4;
|
|
33661
|
+
if (n2.includes(r.extname(e4)))
|
|
33662
|
+
return void 0;
|
|
33663
|
+
const s2 = n2.find((t5) => o.existsSync(`${i4}${t5}`));
|
|
33664
|
+
if (s2)
|
|
33665
|
+
return `${i4}${s2}`;
|
|
33666
|
+
return void 0;
|
|
33657
33667
|
}
|
|
33658
|
-
|
|
33659
|
-
|
|
33660
|
-
|
|
33668
|
+
this._checkForMissingMandatoryOptions();
|
|
33669
|
+
this._checkForConflictingOptions();
|
|
33670
|
+
let l2 = t3._executableFile || `${this._name}-${t3._name}`;
|
|
33671
|
+
let h2 = this._executableDir || "";
|
|
33672
|
+
if (this._scriptPath) {
|
|
33673
|
+
let t4;
|
|
33674
|
+
try {
|
|
33675
|
+
t4 = o.realpathSync(this._scriptPath);
|
|
33676
|
+
} catch (e4) {
|
|
33677
|
+
t4 = this._scriptPath;
|
|
33678
|
+
}
|
|
33679
|
+
h2 = r.resolve(r.dirname(t4), h2);
|
|
33661
33680
|
}
|
|
33662
|
-
|
|
33663
|
-
|
|
33664
|
-
|
|
33665
|
-
|
|
33666
|
-
|
|
33667
|
-
|
|
33668
|
-
u2 = `${c2}${e4}`;
|
|
33681
|
+
if (h2) {
|
|
33682
|
+
let e4 = findFile(h2, l2);
|
|
33683
|
+
if (!e4 && !t3._executableFile && this._scriptPath) {
|
|
33684
|
+
const i4 = r.basename(this._scriptPath, r.extname(this._scriptPath));
|
|
33685
|
+
if (i4 !== this._name) {
|
|
33686
|
+
e4 = findFile(h2, `${i4}-${t3._name}`);
|
|
33669
33687
|
}
|
|
33670
|
-
}
|
|
33688
|
+
}
|
|
33689
|
+
l2 = e4 || l2;
|
|
33671
33690
|
}
|
|
33672
|
-
i3 = n2.includes(r.extname(
|
|
33673
|
-
let
|
|
33674
|
-
if (
|
|
33691
|
+
i3 = n2.includes(r.extname(l2));
|
|
33692
|
+
let c2;
|
|
33693
|
+
if (a.platform !== "win32") {
|
|
33675
33694
|
if (i3) {
|
|
33676
|
-
|
|
33677
|
-
|
|
33678
|
-
|
|
33695
|
+
e3.unshift(l2);
|
|
33696
|
+
e3 = incrementNodeInspectorPort(a.execArgv).concat(e3);
|
|
33697
|
+
c2 = s.spawn(a.argv[0], e3, { stdio: "inherit" });
|
|
33679
33698
|
} else {
|
|
33680
|
-
|
|
33699
|
+
c2 = s.spawn(l2, e3, { stdio: "inherit" });
|
|
33681
33700
|
}
|
|
33682
33701
|
} else {
|
|
33683
|
-
|
|
33684
|
-
|
|
33685
|
-
|
|
33686
|
-
}
|
|
33687
|
-
|
|
33688
|
-
|
|
33689
|
-
|
|
33690
|
-
|
|
33691
|
-
|
|
33692
|
-
|
|
33702
|
+
e3.unshift(l2);
|
|
33703
|
+
e3 = incrementNodeInspectorPort(a.execArgv).concat(e3);
|
|
33704
|
+
c2 = s.spawn(a.execPath, e3, { stdio: "inherit" });
|
|
33705
|
+
}
|
|
33706
|
+
if (!c2.killed) {
|
|
33707
|
+
const t4 = ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"];
|
|
33708
|
+
t4.forEach((t5) => {
|
|
33709
|
+
a.on(t5, () => {
|
|
33710
|
+
if (c2.killed === false && c2.exitCode === null) {
|
|
33711
|
+
c2.kill(t5);
|
|
33712
|
+
}
|
|
33713
|
+
});
|
|
33693
33714
|
});
|
|
33694
|
-
}
|
|
33695
|
-
const
|
|
33696
|
-
if (!
|
|
33697
|
-
|
|
33715
|
+
}
|
|
33716
|
+
const p2 = this._exitCallback;
|
|
33717
|
+
if (!p2) {
|
|
33718
|
+
c2.on("close", a.exit.bind(a));
|
|
33698
33719
|
} else {
|
|
33699
|
-
|
|
33700
|
-
|
|
33720
|
+
c2.on("close", () => {
|
|
33721
|
+
p2(new u(a.exitCode || 0, "commander.executeSubCommandAsync", "(close)"));
|
|
33701
33722
|
});
|
|
33702
33723
|
}
|
|
33703
|
-
|
|
33704
|
-
if (
|
|
33705
|
-
const
|
|
33706
|
-
|
|
33707
|
-
- if
|
|
33708
|
-
|
|
33709
|
-
|
|
33710
|
-
throw new Error(
|
|
33711
|
-
}
|
|
33712
|
-
|
|
33713
|
-
|
|
33724
|
+
c2.on("error", (e4) => {
|
|
33725
|
+
if (e4.code === "ENOENT") {
|
|
33726
|
+
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";
|
|
33727
|
+
const i4 = `'${l2}' does not exist
|
|
33728
|
+
- if '${t3._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
33729
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
33730
|
+
- ${e5}`;
|
|
33731
|
+
throw new Error(i4);
|
|
33732
|
+
} else if (e4.code === "EACCES") {
|
|
33733
|
+
throw new Error(`'${l2}' not executable`);
|
|
33734
|
+
}
|
|
33735
|
+
if (!p2) {
|
|
33736
|
+
a.exit(1);
|
|
33714
33737
|
} else {
|
|
33715
|
-
const
|
|
33716
|
-
|
|
33717
|
-
|
|
33738
|
+
const t4 = new u(1, "commander.executeSubCommandAsync", "(error)");
|
|
33739
|
+
t4.nestedError = e4;
|
|
33740
|
+
p2(t4);
|
|
33718
33741
|
}
|
|
33719
33742
|
});
|
|
33720
|
-
this.runningCommand =
|
|
33743
|
+
this.runningCommand = c2;
|
|
33721
33744
|
}
|
|
33722
|
-
_dispatchSubcommand(
|
|
33723
|
-
const n2 = this._findCommand(
|
|
33745
|
+
_dispatchSubcommand(t3, e3, i3) {
|
|
33746
|
+
const n2 = this._findCommand(t3);
|
|
33724
33747
|
if (!n2)
|
|
33725
33748
|
this.help({ error: true });
|
|
33726
|
-
|
|
33727
|
-
|
|
33728
|
-
|
|
33729
|
-
|
|
33730
|
-
|
|
33749
|
+
let s2;
|
|
33750
|
+
s2 = this._chainOrCallSubCommandHook(s2, n2, "preSubcommand");
|
|
33751
|
+
s2 = this._chainOrCall(s2, () => {
|
|
33752
|
+
if (n2._executableHandler) {
|
|
33753
|
+
this._executeSubCommand(n2, e3.concat(i3));
|
|
33754
|
+
} else {
|
|
33755
|
+
return n2._parseCommand(e3, i3);
|
|
33756
|
+
}
|
|
33757
|
+
});
|
|
33758
|
+
return s2;
|
|
33731
33759
|
}
|
|
33732
33760
|
_checkNumberOfArguments() {
|
|
33733
|
-
this._args.forEach((
|
|
33734
|
-
if (
|
|
33735
|
-
this.missingArgument(
|
|
33761
|
+
this._args.forEach((t3, e3) => {
|
|
33762
|
+
if (t3.required && this.args[e3] == null) {
|
|
33763
|
+
this.missingArgument(t3.name());
|
|
33736
33764
|
}
|
|
33737
33765
|
});
|
|
33738
33766
|
if (this._args.length > 0 && this._args[this._args.length - 1].variadic) {
|
|
@@ -33743,15 +33771,15 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
33743
33771
|
}
|
|
33744
33772
|
}
|
|
33745
33773
|
_processArguments() {
|
|
33746
|
-
const myParseArg = (
|
|
33747
|
-
let n2 =
|
|
33748
|
-
if (
|
|
33774
|
+
const myParseArg = (t4, e3, i3) => {
|
|
33775
|
+
let n2 = e3;
|
|
33776
|
+
if (e3 !== null && t4.parseArg) {
|
|
33749
33777
|
try {
|
|
33750
|
-
n2 =
|
|
33778
|
+
n2 = t4.parseArg(e3, i3);
|
|
33751
33779
|
} catch (i4) {
|
|
33752
33780
|
if (i4.code === "commander.invalidArgument") {
|
|
33753
|
-
const n3 = `error: command-argument value '${
|
|
33754
|
-
this.
|
|
33781
|
+
const n3 = `error: command-argument value '${e3}' is invalid for argument '${t4.name()}'. ${i4.message}`;
|
|
33782
|
+
this.error(n3, { exitCode: i4.exitCode, code: i4.code });
|
|
33755
33783
|
}
|
|
33756
33784
|
throw i4;
|
|
33757
33785
|
}
|
|
@@ -33759,74 +33787,85 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
33759
33787
|
return n2;
|
|
33760
33788
|
};
|
|
33761
33789
|
this._checkNumberOfArguments();
|
|
33762
|
-
const
|
|
33763
|
-
this._args.forEach((
|
|
33764
|
-
let n2 =
|
|
33765
|
-
if (
|
|
33790
|
+
const t3 = [];
|
|
33791
|
+
this._args.forEach((e3, i3) => {
|
|
33792
|
+
let n2 = e3.defaultValue;
|
|
33793
|
+
if (e3.variadic) {
|
|
33766
33794
|
if (i3 < this.args.length) {
|
|
33767
33795
|
n2 = this.args.slice(i3);
|
|
33768
|
-
if (
|
|
33769
|
-
n2 = n2.reduce((
|
|
33796
|
+
if (e3.parseArg) {
|
|
33797
|
+
n2 = n2.reduce((t4, i4) => myParseArg(e3, i4, t4), e3.defaultValue);
|
|
33770
33798
|
}
|
|
33771
33799
|
} else if (n2 === void 0) {
|
|
33772
33800
|
n2 = [];
|
|
33773
33801
|
}
|
|
33774
33802
|
} else if (i3 < this.args.length) {
|
|
33775
33803
|
n2 = this.args[i3];
|
|
33776
|
-
if (
|
|
33777
|
-
n2 = myParseArg(
|
|
33804
|
+
if (e3.parseArg) {
|
|
33805
|
+
n2 = myParseArg(e3, n2, e3.defaultValue);
|
|
33778
33806
|
}
|
|
33779
33807
|
}
|
|
33780
|
-
|
|
33808
|
+
t3[i3] = n2;
|
|
33781
33809
|
});
|
|
33782
|
-
this.processedArgs =
|
|
33810
|
+
this.processedArgs = t3;
|
|
33783
33811
|
}
|
|
33784
|
-
_chainOrCall(
|
|
33785
|
-
if (
|
|
33786
|
-
return
|
|
33812
|
+
_chainOrCall(t3, e3) {
|
|
33813
|
+
if (t3 && t3.then && typeof t3.then === "function") {
|
|
33814
|
+
return t3.then(() => e3());
|
|
33787
33815
|
}
|
|
33788
|
-
return
|
|
33816
|
+
return e3();
|
|
33789
33817
|
}
|
|
33790
|
-
_chainOrCallHooks(
|
|
33791
|
-
let i3 =
|
|
33818
|
+
_chainOrCallHooks(t3, e3) {
|
|
33819
|
+
let i3 = t3;
|
|
33792
33820
|
const n2 = [];
|
|
33793
|
-
getCommandAndParents(this).reverse().filter((
|
|
33794
|
-
|
|
33795
|
-
n2.push({ hookedCommand:
|
|
33821
|
+
getCommandAndParents(this).reverse().filter((t4) => t4._lifeCycleHooks[e3] !== void 0).forEach((t4) => {
|
|
33822
|
+
t4._lifeCycleHooks[e3].forEach((e4) => {
|
|
33823
|
+
n2.push({ hookedCommand: t4, callback: e4 });
|
|
33796
33824
|
});
|
|
33797
33825
|
});
|
|
33798
|
-
if (
|
|
33826
|
+
if (e3 === "postAction") {
|
|
33799
33827
|
n2.reverse();
|
|
33800
33828
|
}
|
|
33801
|
-
n2.forEach((
|
|
33802
|
-
i3 = this._chainOrCall(i3, () =>
|
|
33829
|
+
n2.forEach((t4) => {
|
|
33830
|
+
i3 = this._chainOrCall(i3, () => t4.callback(t4.hookedCommand, this));
|
|
33803
33831
|
});
|
|
33804
33832
|
return i3;
|
|
33805
33833
|
}
|
|
33806
|
-
|
|
33807
|
-
|
|
33808
|
-
this.
|
|
33809
|
-
|
|
33810
|
-
|
|
33811
|
-
|
|
33812
|
-
if (e3 && this._findCommand(e3[0])) {
|
|
33813
|
-
return this._dispatchSubcommand(e3[0], e3.slice(1), t3);
|
|
33834
|
+
_chainOrCallSubCommandHook(t3, e3, i3) {
|
|
33835
|
+
let n2 = t3;
|
|
33836
|
+
if (this._lifeCycleHooks[i3] !== void 0) {
|
|
33837
|
+
this._lifeCycleHooks[i3].forEach((t4) => {
|
|
33838
|
+
n2 = this._chainOrCall(n2, () => t4(this, e3));
|
|
33839
|
+
});
|
|
33814
33840
|
}
|
|
33815
|
-
|
|
33816
|
-
|
|
33841
|
+
return n2;
|
|
33842
|
+
}
|
|
33843
|
+
_parseCommand(t3, e3) {
|
|
33844
|
+
const i3 = this.parseOptions(e3);
|
|
33845
|
+
this._parseOptionsEnv();
|
|
33846
|
+
this._parseOptionsImplied();
|
|
33847
|
+
t3 = t3.concat(i3.operands);
|
|
33848
|
+
e3 = i3.unknown;
|
|
33849
|
+
this.args = t3.concat(e3);
|
|
33850
|
+
if (t3 && this._findCommand(t3[0])) {
|
|
33851
|
+
return this._dispatchSubcommand(t3[0], t3.slice(1), e3);
|
|
33852
|
+
}
|
|
33853
|
+
if (this._hasImplicitHelpCommand() && t3[0] === this._helpCommandName) {
|
|
33854
|
+
if (t3.length === 1) {
|
|
33817
33855
|
this.help();
|
|
33818
33856
|
}
|
|
33819
|
-
return this._dispatchSubcommand(
|
|
33857
|
+
return this._dispatchSubcommand(t3[1], [], [this._helpLongFlag]);
|
|
33820
33858
|
}
|
|
33821
33859
|
if (this._defaultCommandName) {
|
|
33822
|
-
outputHelpIfRequested(this,
|
|
33823
|
-
return this._dispatchSubcommand(this._defaultCommandName,
|
|
33860
|
+
outputHelpIfRequested(this, e3);
|
|
33861
|
+
return this._dispatchSubcommand(this._defaultCommandName, t3, e3);
|
|
33824
33862
|
}
|
|
33825
33863
|
if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {
|
|
33826
33864
|
this.help({ error: true });
|
|
33827
33865
|
}
|
|
33828
33866
|
outputHelpIfRequested(this, i3.unknown);
|
|
33829
33867
|
this._checkForMissingMandatoryOptions();
|
|
33868
|
+
this._checkForConflictingOptions();
|
|
33830
33869
|
const checkForUnknownOptions = () => {
|
|
33831
33870
|
if (i3.unknown.length > 0) {
|
|
33832
33871
|
this.unknownOption(i3.unknown[0]);
|
|
@@ -33839,21 +33878,24 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
33839
33878
|
let i4;
|
|
33840
33879
|
i4 = this._chainOrCallHooks(i4, "preAction");
|
|
33841
33880
|
i4 = this._chainOrCall(i4, () => this._actionHandler(this.processedArgs));
|
|
33842
|
-
if (this.parent)
|
|
33843
|
-
this.
|
|
33881
|
+
if (this.parent) {
|
|
33882
|
+
i4 = this._chainOrCall(i4, () => {
|
|
33883
|
+
this.parent.emit(n2, t3, e3);
|
|
33884
|
+
});
|
|
33885
|
+
}
|
|
33844
33886
|
i4 = this._chainOrCallHooks(i4, "postAction");
|
|
33845
33887
|
return i4;
|
|
33846
33888
|
}
|
|
33847
33889
|
if (this.parent && this.parent.listenerCount(n2)) {
|
|
33848
33890
|
checkForUnknownOptions();
|
|
33849
33891
|
this._processArguments();
|
|
33850
|
-
this.parent.emit(n2,
|
|
33851
|
-
} else if (
|
|
33892
|
+
this.parent.emit(n2, t3, e3);
|
|
33893
|
+
} else if (t3.length) {
|
|
33852
33894
|
if (this._findCommand("*")) {
|
|
33853
|
-
return this._dispatchSubcommand("*",
|
|
33895
|
+
return this._dispatchSubcommand("*", t3, e3);
|
|
33854
33896
|
}
|
|
33855
33897
|
if (this.listenerCount("command:*")) {
|
|
33856
|
-
this.emit("command:*",
|
|
33898
|
+
this.emit("command:*", t3, e3);
|
|
33857
33899
|
} else if (this.commands.length) {
|
|
33858
33900
|
this.unknownCommand();
|
|
33859
33901
|
} else {
|
|
@@ -33868,131 +33910,155 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
33868
33910
|
this._processArguments();
|
|
33869
33911
|
}
|
|
33870
33912
|
}
|
|
33871
|
-
_findCommand(
|
|
33872
|
-
if (!
|
|
33913
|
+
_findCommand(t3) {
|
|
33914
|
+
if (!t3)
|
|
33873
33915
|
return void 0;
|
|
33874
|
-
return this.commands.find((
|
|
33916
|
+
return this.commands.find((e3) => e3._name === t3 || e3._aliases.includes(t3));
|
|
33875
33917
|
}
|
|
33876
|
-
_findOption(
|
|
33877
|
-
return this.options.find((
|
|
33918
|
+
_findOption(t3) {
|
|
33919
|
+
return this.options.find((e3) => e3.is(t3));
|
|
33878
33920
|
}
|
|
33879
33921
|
_checkForMissingMandatoryOptions() {
|
|
33880
|
-
for (let
|
|
33881
|
-
|
|
33882
|
-
if (
|
|
33883
|
-
|
|
33922
|
+
for (let t3 = this; t3; t3 = t3.parent) {
|
|
33923
|
+
t3.options.forEach((e3) => {
|
|
33924
|
+
if (e3.mandatory && t3.getOptionValue(e3.attributeName()) === void 0) {
|
|
33925
|
+
t3.missingMandatoryOptionValue(e3);
|
|
33884
33926
|
}
|
|
33885
33927
|
});
|
|
33886
33928
|
}
|
|
33887
33929
|
}
|
|
33888
|
-
|
|
33889
|
-
const t3 =
|
|
33930
|
+
_checkForConflictingLocalOptions() {
|
|
33931
|
+
const t3 = this.options.filter((t4) => {
|
|
33932
|
+
const e4 = t4.attributeName();
|
|
33933
|
+
if (this.getOptionValue(e4) === void 0) {
|
|
33934
|
+
return false;
|
|
33935
|
+
}
|
|
33936
|
+
return this.getOptionValueSource(e4) !== "default";
|
|
33937
|
+
});
|
|
33938
|
+
const e3 = t3.filter((t4) => t4.conflictsWith.length > 0);
|
|
33939
|
+
e3.forEach((e4) => {
|
|
33940
|
+
const i3 = t3.find((t4) => e4.conflictsWith.includes(t4.attributeName()));
|
|
33941
|
+
if (i3) {
|
|
33942
|
+
this._conflictingOption(e4, i3);
|
|
33943
|
+
}
|
|
33944
|
+
});
|
|
33945
|
+
}
|
|
33946
|
+
_checkForConflictingOptions() {
|
|
33947
|
+
for (let t3 = this; t3; t3 = t3.parent) {
|
|
33948
|
+
t3._checkForConflictingLocalOptions();
|
|
33949
|
+
}
|
|
33950
|
+
}
|
|
33951
|
+
parseOptions(t3) {
|
|
33952
|
+
const e3 = [];
|
|
33890
33953
|
const i3 = [];
|
|
33891
|
-
let n2 =
|
|
33892
|
-
const s2 =
|
|
33893
|
-
function maybeOption(
|
|
33894
|
-
return
|
|
33954
|
+
let n2 = e3;
|
|
33955
|
+
const s2 = t3.slice();
|
|
33956
|
+
function maybeOption(t4) {
|
|
33957
|
+
return t4.length > 1 && t4[0] === "-";
|
|
33895
33958
|
}
|
|
33896
33959
|
let r2 = null;
|
|
33897
33960
|
while (s2.length) {
|
|
33898
|
-
const
|
|
33899
|
-
if (
|
|
33961
|
+
const t4 = s2.shift();
|
|
33962
|
+
if (t4 === "--") {
|
|
33900
33963
|
if (n2 === i3)
|
|
33901
|
-
n2.push(
|
|
33964
|
+
n2.push(t4);
|
|
33902
33965
|
n2.push(...s2);
|
|
33903
33966
|
break;
|
|
33904
33967
|
}
|
|
33905
|
-
if (r2 && !maybeOption(
|
|
33906
|
-
this.emit(`option:${r2.name()}`,
|
|
33968
|
+
if (r2 && !maybeOption(t4)) {
|
|
33969
|
+
this.emit(`option:${r2.name()}`, t4);
|
|
33907
33970
|
continue;
|
|
33908
33971
|
}
|
|
33909
33972
|
r2 = null;
|
|
33910
|
-
if (maybeOption(
|
|
33911
|
-
const
|
|
33912
|
-
if (
|
|
33913
|
-
if (
|
|
33914
|
-
const
|
|
33915
|
-
if (
|
|
33916
|
-
this.optionMissingArgument(
|
|
33917
|
-
this.emit(`option:${
|
|
33918
|
-
} else if (
|
|
33919
|
-
let
|
|
33973
|
+
if (maybeOption(t4)) {
|
|
33974
|
+
const e4 = this._findOption(t4);
|
|
33975
|
+
if (e4) {
|
|
33976
|
+
if (e4.required) {
|
|
33977
|
+
const t5 = s2.shift();
|
|
33978
|
+
if (t5 === void 0)
|
|
33979
|
+
this.optionMissingArgument(e4);
|
|
33980
|
+
this.emit(`option:${e4.name()}`, t5);
|
|
33981
|
+
} else if (e4.optional) {
|
|
33982
|
+
let t5 = null;
|
|
33920
33983
|
if (s2.length > 0 && !maybeOption(s2[0])) {
|
|
33921
|
-
|
|
33984
|
+
t5 = s2.shift();
|
|
33922
33985
|
}
|
|
33923
|
-
this.emit(`option:${
|
|
33986
|
+
this.emit(`option:${e4.name()}`, t5);
|
|
33924
33987
|
} else {
|
|
33925
|
-
this.emit(`option:${
|
|
33988
|
+
this.emit(`option:${e4.name()}`);
|
|
33926
33989
|
}
|
|
33927
|
-
r2 =
|
|
33990
|
+
r2 = e4.variadic ? e4 : null;
|
|
33928
33991
|
continue;
|
|
33929
33992
|
}
|
|
33930
33993
|
}
|
|
33931
|
-
if (
|
|
33932
|
-
const
|
|
33933
|
-
if (
|
|
33934
|
-
if (
|
|
33935
|
-
this.emit(`option:${
|
|
33994
|
+
if (t4.length > 2 && t4[0] === "-" && t4[1] !== "-") {
|
|
33995
|
+
const e4 = this._findOption(`-${t4[1]}`);
|
|
33996
|
+
if (e4) {
|
|
33997
|
+
if (e4.required || e4.optional && this._combineFlagAndOptionalValue) {
|
|
33998
|
+
this.emit(`option:${e4.name()}`, t4.slice(2));
|
|
33936
33999
|
} else {
|
|
33937
|
-
this.emit(`option:${
|
|
33938
|
-
s2.unshift(`-${
|
|
34000
|
+
this.emit(`option:${e4.name()}`);
|
|
34001
|
+
s2.unshift(`-${t4.slice(2)}`);
|
|
33939
34002
|
}
|
|
33940
34003
|
continue;
|
|
33941
34004
|
}
|
|
33942
34005
|
}
|
|
33943
|
-
if (/^--[^=]+=/.test(
|
|
33944
|
-
const
|
|
33945
|
-
const i4 = this._findOption(
|
|
34006
|
+
if (/^--[^=]+=/.test(t4)) {
|
|
34007
|
+
const e4 = t4.indexOf("=");
|
|
34008
|
+
const i4 = this._findOption(t4.slice(0, e4));
|
|
33946
34009
|
if (i4 && (i4.required || i4.optional)) {
|
|
33947
|
-
this.emit(`option:${i4.name()}`,
|
|
34010
|
+
this.emit(`option:${i4.name()}`, t4.slice(e4 + 1));
|
|
33948
34011
|
continue;
|
|
33949
34012
|
}
|
|
33950
34013
|
}
|
|
33951
|
-
if (maybeOption(
|
|
34014
|
+
if (maybeOption(t4)) {
|
|
33952
34015
|
n2 = i3;
|
|
33953
34016
|
}
|
|
33954
|
-
if ((this._enablePositionalOptions || this._passThroughOptions) &&
|
|
33955
|
-
if (this._findCommand(
|
|
33956
|
-
|
|
34017
|
+
if ((this._enablePositionalOptions || this._passThroughOptions) && e3.length === 0 && i3.length === 0) {
|
|
34018
|
+
if (this._findCommand(t4)) {
|
|
34019
|
+
e3.push(t4);
|
|
33957
34020
|
if (s2.length > 0)
|
|
33958
34021
|
i3.push(...s2);
|
|
33959
34022
|
break;
|
|
33960
|
-
} else if (
|
|
33961
|
-
|
|
34023
|
+
} else if (t4 === this._helpCommandName && this._hasImplicitHelpCommand()) {
|
|
34024
|
+
e3.push(t4);
|
|
33962
34025
|
if (s2.length > 0)
|
|
33963
|
-
|
|
34026
|
+
e3.push(...s2);
|
|
33964
34027
|
break;
|
|
33965
34028
|
} else if (this._defaultCommandName) {
|
|
33966
|
-
i3.push(
|
|
34029
|
+
i3.push(t4);
|
|
33967
34030
|
if (s2.length > 0)
|
|
33968
34031
|
i3.push(...s2);
|
|
33969
34032
|
break;
|
|
33970
34033
|
}
|
|
33971
34034
|
}
|
|
33972
34035
|
if (this._passThroughOptions) {
|
|
33973
|
-
n2.push(
|
|
34036
|
+
n2.push(t4);
|
|
33974
34037
|
if (s2.length > 0)
|
|
33975
34038
|
n2.push(...s2);
|
|
33976
34039
|
break;
|
|
33977
34040
|
}
|
|
33978
|
-
n2.push(
|
|
34041
|
+
n2.push(t4);
|
|
33979
34042
|
}
|
|
33980
|
-
return { operands:
|
|
34043
|
+
return { operands: e3, unknown: i3 };
|
|
33981
34044
|
}
|
|
33982
34045
|
opts() {
|
|
33983
34046
|
if (this._storeOptionsAsProperties) {
|
|
33984
|
-
const
|
|
33985
|
-
const
|
|
33986
|
-
for (let i3 = 0; i3 <
|
|
33987
|
-
const
|
|
33988
|
-
|
|
34047
|
+
const t3 = {};
|
|
34048
|
+
const e3 = this.options.length;
|
|
34049
|
+
for (let i3 = 0; i3 < e3; i3++) {
|
|
34050
|
+
const e4 = this.options[i3].attributeName();
|
|
34051
|
+
t3[e4] = e4 === this._versionOptionName ? this._version : this[e4];
|
|
33989
34052
|
}
|
|
33990
|
-
return
|
|
34053
|
+
return t3;
|
|
33991
34054
|
}
|
|
33992
34055
|
return this._optionValues;
|
|
33993
34056
|
}
|
|
33994
|
-
|
|
33995
|
-
this.
|
|
34057
|
+
optsWithGlobals() {
|
|
34058
|
+
return getCommandAndParents(this).reduce((t3, e3) => Object.assign(t3, e3.opts()), {});
|
|
34059
|
+
}
|
|
34060
|
+
error(t3, e3) {
|
|
34061
|
+
this._outputConfiguration.outputError(`${t3}
|
|
33996
34062
|
`, this._outputConfiguration.writeErr);
|
|
33997
34063
|
if (typeof this._showHelpAfterError === "string") {
|
|
33998
34064
|
this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
@@ -34001,166 +34067,217 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
34001
34067
|
this._outputConfiguration.writeErr("\n");
|
|
34002
34068
|
this.outputHelp({ error: true });
|
|
34003
34069
|
}
|
|
34004
|
-
|
|
34070
|
+
const i3 = e3 || {};
|
|
34071
|
+
const n2 = i3.exitCode || 1;
|
|
34072
|
+
const s2 = i3.code || "commander.error";
|
|
34073
|
+
this._exit(n2, s2, t3);
|
|
34005
34074
|
}
|
|
34006
34075
|
_parseOptionsEnv() {
|
|
34007
|
-
this.options.forEach((
|
|
34008
|
-
if (
|
|
34009
|
-
const
|
|
34010
|
-
if (this.getOptionValue(
|
|
34011
|
-
if (
|
|
34012
|
-
this.emit(`optionEnv:${
|
|
34076
|
+
this.options.forEach((t3) => {
|
|
34077
|
+
if (t3.envVar && t3.envVar in a.env) {
|
|
34078
|
+
const e3 = t3.attributeName();
|
|
34079
|
+
if (this.getOptionValue(e3) === void 0 || ["default", "config", "env"].includes(this.getOptionValueSource(e3))) {
|
|
34080
|
+
if (t3.required || t3.optional) {
|
|
34081
|
+
this.emit(`optionEnv:${t3.name()}`, a.env[t3.envVar]);
|
|
34013
34082
|
} else {
|
|
34014
|
-
this.emit(`optionEnv:${
|
|
34083
|
+
this.emit(`optionEnv:${t3.name()}`);
|
|
34015
34084
|
}
|
|
34016
34085
|
}
|
|
34017
34086
|
}
|
|
34018
34087
|
});
|
|
34019
34088
|
}
|
|
34020
|
-
|
|
34021
|
-
const t3 =
|
|
34022
|
-
this.
|
|
34023
|
-
|
|
34024
|
-
|
|
34025
|
-
|
|
34026
|
-
|
|
34089
|
+
_parseOptionsImplied() {
|
|
34090
|
+
const t3 = new d(this.options);
|
|
34091
|
+
const hasCustomOptionValue = (t4) => this.getOptionValue(t4) !== void 0 && !["default", "implied"].includes(this.getOptionValueSource(t4));
|
|
34092
|
+
this.options.filter((e3) => e3.implied !== void 0 && hasCustomOptionValue(e3.attributeName()) && t3.valueFromOption(this.getOptionValue(e3.attributeName()), e3)).forEach((t4) => {
|
|
34093
|
+
Object.keys(t4.implied).filter((t5) => !hasCustomOptionValue(t5)).forEach((e3) => {
|
|
34094
|
+
this.setOptionValueWithSource(e3, t4.implied[e3], "implied");
|
|
34095
|
+
});
|
|
34096
|
+
});
|
|
34027
34097
|
}
|
|
34028
|
-
|
|
34029
|
-
const
|
|
34030
|
-
this.
|
|
34098
|
+
missingArgument(t3) {
|
|
34099
|
+
const e3 = `error: missing required argument '${t3}'`;
|
|
34100
|
+
this.error(e3, { code: "commander.missingArgument" });
|
|
34101
|
+
}
|
|
34102
|
+
optionMissingArgument(t3) {
|
|
34103
|
+
const e3 = `error: option '${t3.flags}' argument missing`;
|
|
34104
|
+
this.error(e3, { code: "commander.optionMissingArgument" });
|
|
34105
|
+
}
|
|
34106
|
+
missingMandatoryOptionValue(t3) {
|
|
34107
|
+
const e3 = `error: required option '${t3.flags}' not specified`;
|
|
34108
|
+
this.error(e3, { code: "commander.missingMandatoryOptionValue" });
|
|
34109
|
+
}
|
|
34110
|
+
_conflictingOption(t3, e3) {
|
|
34111
|
+
const findBestOptionFromValue = (t4) => {
|
|
34112
|
+
const e4 = t4.attributeName();
|
|
34113
|
+
const i4 = this.getOptionValue(e4);
|
|
34114
|
+
const n2 = this.options.find((t5) => t5.negate && e4 === t5.attributeName());
|
|
34115
|
+
const s2 = this.options.find((t5) => !t5.negate && e4 === t5.attributeName());
|
|
34116
|
+
if (n2 && (n2.presetArg === void 0 && i4 === false || n2.presetArg !== void 0 && i4 === n2.presetArg)) {
|
|
34117
|
+
return n2;
|
|
34118
|
+
}
|
|
34119
|
+
return s2 || t4;
|
|
34120
|
+
};
|
|
34121
|
+
const getErrorMessage = (t4) => {
|
|
34122
|
+
const e4 = findBestOptionFromValue(t4);
|
|
34123
|
+
const i4 = e4.attributeName();
|
|
34124
|
+
const n2 = this.getOptionValueSource(i4);
|
|
34125
|
+
if (n2 === "env") {
|
|
34126
|
+
return `environment variable '${e4.envVar}'`;
|
|
34127
|
+
}
|
|
34128
|
+
return `option '${e4.flags}'`;
|
|
34129
|
+
};
|
|
34130
|
+
const i3 = `error: ${getErrorMessage(t3)} cannot be used with ${getErrorMessage(e3)}`;
|
|
34131
|
+
this.error(i3, { code: "commander.conflictingOption" });
|
|
34031
34132
|
}
|
|
34032
|
-
unknownOption(
|
|
34133
|
+
unknownOption(t3) {
|
|
34033
34134
|
if (this._allowUnknownOption)
|
|
34034
34135
|
return;
|
|
34035
|
-
let
|
|
34036
|
-
if (
|
|
34136
|
+
let e3 = "";
|
|
34137
|
+
if (t3.startsWith("--") && this._showSuggestionAfterError) {
|
|
34037
34138
|
let i4 = [];
|
|
34038
34139
|
let n2 = this;
|
|
34039
34140
|
do {
|
|
34040
|
-
const
|
|
34041
|
-
i4 = i4.concat(
|
|
34141
|
+
const t4 = n2.createHelp().visibleOptions(n2).filter((t5) => t5.long).map((t5) => t5.long);
|
|
34142
|
+
i4 = i4.concat(t4);
|
|
34042
34143
|
n2 = n2.parent;
|
|
34043
34144
|
} while (n2 && !n2._enablePositionalOptions);
|
|
34044
|
-
|
|
34145
|
+
e3 = f(t3, i4);
|
|
34045
34146
|
}
|
|
34046
|
-
const i3 = `error: unknown option '${
|
|
34047
|
-
this.
|
|
34147
|
+
const i3 = `error: unknown option '${t3}'${e3}`;
|
|
34148
|
+
this.error(i3, { code: "commander.unknownOption" });
|
|
34048
34149
|
}
|
|
34049
|
-
_excessArguments(
|
|
34150
|
+
_excessArguments(t3) {
|
|
34050
34151
|
if (this._allowExcessArguments)
|
|
34051
34152
|
return;
|
|
34052
|
-
const
|
|
34053
|
-
const i3 =
|
|
34153
|
+
const e3 = this._args.length;
|
|
34154
|
+
const i3 = e3 === 1 ? "" : "s";
|
|
34054
34155
|
const n2 = this.parent ? ` for '${this.name()}'` : "";
|
|
34055
|
-
const s2 = `error: too many arguments${n2}. Expected ${
|
|
34056
|
-
this.
|
|
34156
|
+
const s2 = `error: too many arguments${n2}. Expected ${e3} argument${i3} but got ${t3.length}.`;
|
|
34157
|
+
this.error(s2, { code: "commander.excessArguments" });
|
|
34057
34158
|
}
|
|
34058
34159
|
unknownCommand() {
|
|
34059
|
-
const
|
|
34060
|
-
let
|
|
34160
|
+
const t3 = this.args[0];
|
|
34161
|
+
let e3 = "";
|
|
34061
34162
|
if (this._showSuggestionAfterError) {
|
|
34062
34163
|
const i4 = [];
|
|
34063
|
-
this.createHelp().visibleCommands(this).forEach((
|
|
34064
|
-
i4.push(
|
|
34065
|
-
if (
|
|
34066
|
-
i4.push(
|
|
34164
|
+
this.createHelp().visibleCommands(this).forEach((t4) => {
|
|
34165
|
+
i4.push(t4.name());
|
|
34166
|
+
if (t4.alias())
|
|
34167
|
+
i4.push(t4.alias());
|
|
34067
34168
|
});
|
|
34068
|
-
|
|
34169
|
+
e3 = f(t3, i4);
|
|
34069
34170
|
}
|
|
34070
|
-
const i3 = `error: unknown command '${
|
|
34071
|
-
this.
|
|
34171
|
+
const i3 = `error: unknown command '${t3}'${e3}`;
|
|
34172
|
+
this.error(i3, { code: "commander.unknownCommand" });
|
|
34072
34173
|
}
|
|
34073
|
-
version(
|
|
34074
|
-
if (
|
|
34174
|
+
version(t3, e3, i3) {
|
|
34175
|
+
if (t3 === void 0)
|
|
34075
34176
|
return this._version;
|
|
34076
|
-
this._version =
|
|
34077
|
-
|
|
34177
|
+
this._version = t3;
|
|
34178
|
+
e3 = e3 || "-V, --version";
|
|
34078
34179
|
i3 = i3 || "output the version number";
|
|
34079
|
-
const n2 = this.createOption(
|
|
34180
|
+
const n2 = this.createOption(e3, i3);
|
|
34080
34181
|
this._versionOptionName = n2.attributeName();
|
|
34081
34182
|
this.options.push(n2);
|
|
34082
34183
|
this.on("option:" + n2.name(), () => {
|
|
34083
|
-
this._outputConfiguration.writeOut(`${
|
|
34184
|
+
this._outputConfiguration.writeOut(`${t3}
|
|
34084
34185
|
`);
|
|
34085
|
-
this._exit(0, "commander.version",
|
|
34186
|
+
this._exit(0, "commander.version", t3);
|
|
34086
34187
|
});
|
|
34087
34188
|
return this;
|
|
34088
34189
|
}
|
|
34089
|
-
description(
|
|
34090
|
-
if (
|
|
34190
|
+
description(t3, e3) {
|
|
34191
|
+
if (t3 === void 0 && e3 === void 0)
|
|
34091
34192
|
return this._description;
|
|
34092
|
-
this._description =
|
|
34093
|
-
if (
|
|
34094
|
-
this._argsDescription =
|
|
34193
|
+
this._description = t3;
|
|
34194
|
+
if (e3) {
|
|
34195
|
+
this._argsDescription = e3;
|
|
34095
34196
|
}
|
|
34096
34197
|
return this;
|
|
34097
34198
|
}
|
|
34098
|
-
|
|
34099
|
-
if (
|
|
34199
|
+
summary(t3) {
|
|
34200
|
+
if (t3 === void 0)
|
|
34201
|
+
return this._summary;
|
|
34202
|
+
this._summary = t3;
|
|
34203
|
+
return this;
|
|
34204
|
+
}
|
|
34205
|
+
alias(t3) {
|
|
34206
|
+
if (t3 === void 0)
|
|
34100
34207
|
return this._aliases[0];
|
|
34101
|
-
let
|
|
34208
|
+
let e3 = this;
|
|
34102
34209
|
if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {
|
|
34103
|
-
|
|
34210
|
+
e3 = this.commands[this.commands.length - 1];
|
|
34104
34211
|
}
|
|
34105
|
-
if (
|
|
34212
|
+
if (t3 === e3._name)
|
|
34106
34213
|
throw new Error("Command alias can't be the same as its name");
|
|
34107
|
-
|
|
34214
|
+
e3._aliases.push(t3);
|
|
34108
34215
|
return this;
|
|
34109
34216
|
}
|
|
34110
|
-
aliases(
|
|
34111
|
-
if (
|
|
34217
|
+
aliases(t3) {
|
|
34218
|
+
if (t3 === void 0)
|
|
34112
34219
|
return this._aliases;
|
|
34113
|
-
|
|
34220
|
+
t3.forEach((t4) => this.alias(t4));
|
|
34114
34221
|
return this;
|
|
34115
34222
|
}
|
|
34116
|
-
usage(
|
|
34117
|
-
if (
|
|
34223
|
+
usage(t3) {
|
|
34224
|
+
if (t3 === void 0) {
|
|
34118
34225
|
if (this._usage)
|
|
34119
34226
|
return this._usage;
|
|
34120
|
-
const
|
|
34121
|
-
return [].concat(this.options.length || this._hasHelpOption ? "[options]" : [], this.commands.length ? "[command]" : [], this._args.length ?
|
|
34227
|
+
const t4 = this._args.map((t5) => h(t5));
|
|
34228
|
+
return [].concat(this.options.length || this._hasHelpOption ? "[options]" : [], this.commands.length ? "[command]" : [], this._args.length ? t4 : []).join(" ");
|
|
34122
34229
|
}
|
|
34123
|
-
this._usage =
|
|
34230
|
+
this._usage = t3;
|
|
34124
34231
|
return this;
|
|
34125
34232
|
}
|
|
34126
|
-
name(
|
|
34127
|
-
if (
|
|
34233
|
+
name(t3) {
|
|
34234
|
+
if (t3 === void 0)
|
|
34128
34235
|
return this._name;
|
|
34129
|
-
this._name =
|
|
34236
|
+
this._name = t3;
|
|
34130
34237
|
return this;
|
|
34131
34238
|
}
|
|
34132
|
-
|
|
34133
|
-
|
|
34134
|
-
|
|
34135
|
-
|
|
34239
|
+
nameFromFilename(t3) {
|
|
34240
|
+
this._name = r.basename(t3, r.extname(t3));
|
|
34241
|
+
return this;
|
|
34242
|
+
}
|
|
34243
|
+
executableDir(t3) {
|
|
34244
|
+
if (t3 === void 0)
|
|
34245
|
+
return this._executableDir;
|
|
34246
|
+
this._executableDir = t3;
|
|
34247
|
+
return this;
|
|
34248
|
+
}
|
|
34249
|
+
helpInformation(t3) {
|
|
34250
|
+
const e3 = this.createHelp();
|
|
34251
|
+
if (e3.helpWidth === void 0) {
|
|
34252
|
+
e3.helpWidth = t3 && t3.error ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();
|
|
34136
34253
|
}
|
|
34137
|
-
return
|
|
34254
|
+
return e3.formatHelp(this, e3);
|
|
34138
34255
|
}
|
|
34139
|
-
_getHelpContext(
|
|
34140
|
-
|
|
34141
|
-
const
|
|
34256
|
+
_getHelpContext(t3) {
|
|
34257
|
+
t3 = t3 || {};
|
|
34258
|
+
const e3 = { error: !!t3.error };
|
|
34142
34259
|
let i3;
|
|
34143
|
-
if (
|
|
34144
|
-
i3 = (
|
|
34260
|
+
if (e3.error) {
|
|
34261
|
+
i3 = (t4) => this._outputConfiguration.writeErr(t4);
|
|
34145
34262
|
} else {
|
|
34146
|
-
i3 = (
|
|
34147
|
-
}
|
|
34148
|
-
|
|
34149
|
-
|
|
34150
|
-
return
|
|
34263
|
+
i3 = (t4) => this._outputConfiguration.writeOut(t4);
|
|
34264
|
+
}
|
|
34265
|
+
e3.write = t3.write || i3;
|
|
34266
|
+
e3.command = this;
|
|
34267
|
+
return e3;
|
|
34151
34268
|
}
|
|
34152
|
-
outputHelp(
|
|
34153
|
-
let
|
|
34154
|
-
if (typeof
|
|
34155
|
-
|
|
34156
|
-
|
|
34269
|
+
outputHelp(t3) {
|
|
34270
|
+
let e3;
|
|
34271
|
+
if (typeof t3 === "function") {
|
|
34272
|
+
e3 = t3;
|
|
34273
|
+
t3 = void 0;
|
|
34157
34274
|
}
|
|
34158
|
-
const i3 = this._getHelpContext(
|
|
34159
|
-
getCommandAndParents(this).reverse().forEach((
|
|
34275
|
+
const i3 = this._getHelpContext(t3);
|
|
34276
|
+
getCommandAndParents(this).reverse().forEach((t4) => t4.emit("beforeAllHelp", i3));
|
|
34160
34277
|
this.emit("beforeHelp", i3);
|
|
34161
34278
|
let n2 = this.helpInformation(i3);
|
|
34162
|
-
if (
|
|
34163
|
-
n2 =
|
|
34279
|
+
if (e3) {
|
|
34280
|
+
n2 = e3(n2);
|
|
34164
34281
|
if (typeof n2 !== "string" && !Buffer.isBuffer(n2)) {
|
|
34165
34282
|
throw new Error("outputHelp callback must return a string or a Buffer");
|
|
34166
34283
|
}
|
|
@@ -34168,306 +34285,342 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
34168
34285
|
i3.write(n2);
|
|
34169
34286
|
this.emit(this._helpLongFlag);
|
|
34170
34287
|
this.emit("afterHelp", i3);
|
|
34171
|
-
getCommandAndParents(this).forEach((
|
|
34288
|
+
getCommandAndParents(this).forEach((t4) => t4.emit("afterAllHelp", i3));
|
|
34172
34289
|
}
|
|
34173
|
-
helpOption(
|
|
34174
|
-
if (typeof
|
|
34175
|
-
this._hasHelpOption =
|
|
34290
|
+
helpOption(t3, e3) {
|
|
34291
|
+
if (typeof t3 === "boolean") {
|
|
34292
|
+
this._hasHelpOption = t3;
|
|
34176
34293
|
return this;
|
|
34177
34294
|
}
|
|
34178
|
-
this._helpFlags =
|
|
34179
|
-
this._helpDescription =
|
|
34180
|
-
const i3 =
|
|
34295
|
+
this._helpFlags = t3 || this._helpFlags;
|
|
34296
|
+
this._helpDescription = e3 || this._helpDescription;
|
|
34297
|
+
const i3 = m(this._helpFlags);
|
|
34181
34298
|
this._helpShortFlag = i3.shortFlag;
|
|
34182
34299
|
this._helpLongFlag = i3.longFlag;
|
|
34183
34300
|
return this;
|
|
34184
34301
|
}
|
|
34185
|
-
help(
|
|
34186
|
-
this.outputHelp(
|
|
34187
|
-
let
|
|
34188
|
-
if (
|
|
34189
|
-
|
|
34302
|
+
help(t3) {
|
|
34303
|
+
this.outputHelp(t3);
|
|
34304
|
+
let e3 = a.exitCode || 0;
|
|
34305
|
+
if (e3 === 0 && t3 && typeof t3 !== "function" && t3.error) {
|
|
34306
|
+
e3 = 1;
|
|
34190
34307
|
}
|
|
34191
|
-
this._exit(
|
|
34308
|
+
this._exit(e3, "commander.help", "(outputHelp)");
|
|
34192
34309
|
}
|
|
34193
|
-
addHelpText(
|
|
34310
|
+
addHelpText(t3, e3) {
|
|
34194
34311
|
const i3 = ["beforeAll", "before", "after", "afterAll"];
|
|
34195
|
-
if (!i3.includes(
|
|
34312
|
+
if (!i3.includes(t3)) {
|
|
34196
34313
|
throw new Error(`Unexpected value for position to addHelpText.
|
|
34197
34314
|
Expecting one of '${i3.join("', '")}'`);
|
|
34198
34315
|
}
|
|
34199
|
-
const n2 = `${
|
|
34200
|
-
this.on(n2, (
|
|
34316
|
+
const n2 = `${t3}Help`;
|
|
34317
|
+
this.on(n2, (t4) => {
|
|
34201
34318
|
let i4;
|
|
34202
|
-
if (typeof
|
|
34203
|
-
i4 =
|
|
34319
|
+
if (typeof e3 === "function") {
|
|
34320
|
+
i4 = e3({ error: t4.error, command: t4.command });
|
|
34204
34321
|
} else {
|
|
34205
|
-
i4 =
|
|
34322
|
+
i4 = e3;
|
|
34206
34323
|
}
|
|
34207
34324
|
if (i4) {
|
|
34208
|
-
|
|
34325
|
+
t4.write(`${i4}
|
|
34209
34326
|
`);
|
|
34210
34327
|
}
|
|
34211
34328
|
});
|
|
34212
34329
|
return this;
|
|
34213
34330
|
}
|
|
34214
34331
|
}
|
|
34215
|
-
function outputHelpIfRequested(
|
|
34216
|
-
const i3 =
|
|
34332
|
+
function outputHelpIfRequested(t3, e3) {
|
|
34333
|
+
const i3 = t3._hasHelpOption && e3.find((e4) => e4 === t3._helpLongFlag || e4 === t3._helpShortFlag);
|
|
34217
34334
|
if (i3) {
|
|
34218
|
-
|
|
34219
|
-
|
|
34335
|
+
t3.outputHelp();
|
|
34336
|
+
t3._exit(0, "commander.helpDisplayed", "(outputHelp)");
|
|
34220
34337
|
}
|
|
34221
34338
|
}
|
|
34222
|
-
function incrementNodeInspectorPort(
|
|
34223
|
-
return
|
|
34224
|
-
if (!
|
|
34225
|
-
return
|
|
34339
|
+
function incrementNodeInspectorPort(t3) {
|
|
34340
|
+
return t3.map((t4) => {
|
|
34341
|
+
if (!t4.startsWith("--inspect")) {
|
|
34342
|
+
return t4;
|
|
34226
34343
|
}
|
|
34227
|
-
let
|
|
34344
|
+
let e3;
|
|
34228
34345
|
let i3 = "127.0.0.1";
|
|
34229
34346
|
let n2 = "9229";
|
|
34230
34347
|
let s2;
|
|
34231
|
-
if ((s2 =
|
|
34232
|
-
|
|
34233
|
-
} else if ((s2 =
|
|
34234
|
-
|
|
34348
|
+
if ((s2 = t4.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
34349
|
+
e3 = s2[1];
|
|
34350
|
+
} else if ((s2 = t4.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
|
|
34351
|
+
e3 = s2[1];
|
|
34235
34352
|
if (/^\d+$/.test(s2[3])) {
|
|
34236
34353
|
n2 = s2[3];
|
|
34237
34354
|
} else {
|
|
34238
34355
|
i3 = s2[3];
|
|
34239
34356
|
}
|
|
34240
|
-
} else if ((s2 =
|
|
34241
|
-
|
|
34357
|
+
} else if ((s2 = t4.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
|
|
34358
|
+
e3 = s2[1];
|
|
34242
34359
|
i3 = s2[3];
|
|
34243
34360
|
n2 = s2[4];
|
|
34244
34361
|
}
|
|
34245
|
-
if (
|
|
34246
|
-
return `${
|
|
34362
|
+
if (e3 && n2 !== "0") {
|
|
34363
|
+
return `${e3}=${i3}:${parseInt(n2) + 1}`;
|
|
34247
34364
|
}
|
|
34248
|
-
return
|
|
34365
|
+
return t4;
|
|
34249
34366
|
});
|
|
34250
34367
|
}
|
|
34251
|
-
function getCommandAndParents(
|
|
34252
|
-
const
|
|
34253
|
-
for (let i3 =
|
|
34254
|
-
|
|
34368
|
+
function getCommandAndParents(t3) {
|
|
34369
|
+
const e3 = [];
|
|
34370
|
+
for (let i3 = t3; i3; i3 = i3.parent) {
|
|
34371
|
+
e3.push(i3);
|
|
34255
34372
|
}
|
|
34256
|
-
return
|
|
34373
|
+
return e3;
|
|
34257
34374
|
}
|
|
34258
|
-
|
|
34259
|
-
},
|
|
34375
|
+
e2.Command = Command3;
|
|
34376
|
+
}, 796: (t2, e2) => {
|
|
34260
34377
|
class CommanderError extends Error {
|
|
34261
|
-
constructor(
|
|
34378
|
+
constructor(t3, e3, i2) {
|
|
34262
34379
|
super(i2);
|
|
34263
34380
|
Error.captureStackTrace(this, this.constructor);
|
|
34264
34381
|
this.name = this.constructor.name;
|
|
34265
|
-
this.code =
|
|
34266
|
-
this.exitCode =
|
|
34382
|
+
this.code = e3;
|
|
34383
|
+
this.exitCode = t3;
|
|
34267
34384
|
this.nestedError = void 0;
|
|
34268
34385
|
}
|
|
34269
34386
|
}
|
|
34270
34387
|
class InvalidArgumentError extends CommanderError {
|
|
34271
|
-
constructor(
|
|
34272
|
-
super(1, "commander.invalidArgument",
|
|
34388
|
+
constructor(t3) {
|
|
34389
|
+
super(1, "commander.invalidArgument", t3);
|
|
34273
34390
|
Error.captureStackTrace(this, this.constructor);
|
|
34274
34391
|
this.name = this.constructor.name;
|
|
34275
34392
|
}
|
|
34276
34393
|
}
|
|
34277
|
-
|
|
34278
|
-
|
|
34279
|
-
},
|
|
34280
|
-
const { humanReadableArgName: n } = i2(
|
|
34394
|
+
e2.CommanderError = CommanderError;
|
|
34395
|
+
e2.InvalidArgumentError = InvalidArgumentError;
|
|
34396
|
+
}, 519: (t2, e2, i2) => {
|
|
34397
|
+
const { humanReadableArgName: n } = i2(535);
|
|
34281
34398
|
class Help {
|
|
34282
34399
|
constructor() {
|
|
34283
34400
|
this.helpWidth = void 0;
|
|
34284
34401
|
this.sortSubcommands = false;
|
|
34285
34402
|
this.sortOptions = false;
|
|
34286
|
-
|
|
34287
|
-
|
|
34288
|
-
|
|
34289
|
-
|
|
34290
|
-
|
|
34291
|
-
const
|
|
34292
|
-
s.
|
|
34403
|
+
this.showGlobalOptions = false;
|
|
34404
|
+
}
|
|
34405
|
+
visibleCommands(t3) {
|
|
34406
|
+
const e3 = t3.commands.filter((t4) => !t4._hidden);
|
|
34407
|
+
if (t3._hasImplicitHelpCommand()) {
|
|
34408
|
+
const [, i3, n2] = t3._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);
|
|
34409
|
+
const s = t3.createCommand(i3).helpOption(false);
|
|
34410
|
+
s.description(t3._helpCommandDescription);
|
|
34293
34411
|
if (n2)
|
|
34294
34412
|
s.arguments(n2);
|
|
34295
|
-
|
|
34413
|
+
e3.push(s);
|
|
34296
34414
|
}
|
|
34297
34415
|
if (this.sortSubcommands) {
|
|
34298
|
-
|
|
34416
|
+
e3.sort((t4, e4) => t4.name().localeCompare(e4.name()));
|
|
34299
34417
|
}
|
|
34300
|
-
return
|
|
34418
|
+
return e3;
|
|
34301
34419
|
}
|
|
34302
|
-
|
|
34303
|
-
const
|
|
34304
|
-
|
|
34305
|
-
|
|
34420
|
+
compareOptions(t3, e3) {
|
|
34421
|
+
const getSortKey = (t4) => t4.short ? t4.short.replace(/^-/, "") : t4.long.replace(/^--/, "");
|
|
34422
|
+
return getSortKey(t3).localeCompare(getSortKey(e3));
|
|
34423
|
+
}
|
|
34424
|
+
visibleOptions(t3) {
|
|
34425
|
+
const e3 = t3.options.filter((t4) => !t4.hidden);
|
|
34426
|
+
const i3 = t3._hasHelpOption && t3._helpShortFlag && !t3._findOption(t3._helpShortFlag);
|
|
34427
|
+
const n2 = t3._hasHelpOption && !t3._findOption(t3._helpLongFlag);
|
|
34306
34428
|
if (i3 || n2) {
|
|
34307
34429
|
let s;
|
|
34308
34430
|
if (!i3) {
|
|
34309
|
-
s =
|
|
34431
|
+
s = t3.createOption(t3._helpLongFlag, t3._helpDescription);
|
|
34310
34432
|
} else if (!n2) {
|
|
34311
|
-
s =
|
|
34433
|
+
s = t3.createOption(t3._helpShortFlag, t3._helpDescription);
|
|
34312
34434
|
} else {
|
|
34313
|
-
s =
|
|
34435
|
+
s = t3.createOption(t3._helpFlags, t3._helpDescription);
|
|
34314
34436
|
}
|
|
34315
|
-
|
|
34437
|
+
e3.push(s);
|
|
34316
34438
|
}
|
|
34317
34439
|
if (this.sortOptions) {
|
|
34318
|
-
|
|
34319
|
-
t3.sort((e4, t4) => getSortKey(e4).localeCompare(getSortKey(t4)));
|
|
34440
|
+
e3.sort(this.compareOptions);
|
|
34320
34441
|
}
|
|
34321
|
-
return
|
|
34442
|
+
return e3;
|
|
34322
34443
|
}
|
|
34323
|
-
|
|
34324
|
-
if (
|
|
34325
|
-
|
|
34326
|
-
|
|
34444
|
+
visibleGlobalOptions(t3) {
|
|
34445
|
+
if (!this.showGlobalOptions)
|
|
34446
|
+
return [];
|
|
34447
|
+
const e3 = [];
|
|
34448
|
+
for (let i3 = t3.parent; i3; i3 = i3.parent) {
|
|
34449
|
+
const t4 = i3.options.filter((t5) => !t5.hidden);
|
|
34450
|
+
e3.push(...t4);
|
|
34451
|
+
}
|
|
34452
|
+
if (this.sortOptions) {
|
|
34453
|
+
e3.sort(this.compareOptions);
|
|
34454
|
+
}
|
|
34455
|
+
return e3;
|
|
34456
|
+
}
|
|
34457
|
+
visibleArguments(t3) {
|
|
34458
|
+
if (t3._argsDescription) {
|
|
34459
|
+
t3._args.forEach((e3) => {
|
|
34460
|
+
e3.description = e3.description || t3._argsDescription[e3.name()] || "";
|
|
34327
34461
|
});
|
|
34328
34462
|
}
|
|
34329
|
-
if (
|
|
34330
|
-
return
|
|
34463
|
+
if (t3._args.find((t4) => t4.description)) {
|
|
34464
|
+
return t3._args;
|
|
34331
34465
|
}
|
|
34332
34466
|
return [];
|
|
34333
34467
|
}
|
|
34334
|
-
subcommandTerm(
|
|
34335
|
-
const
|
|
34336
|
-
return
|
|
34468
|
+
subcommandTerm(t3) {
|
|
34469
|
+
const e3 = t3._args.map((t4) => n(t4)).join(" ");
|
|
34470
|
+
return t3._name + (t3._aliases[0] ? "|" + t3._aliases[0] : "") + (t3.options.length ? " [options]" : "") + (e3 ? " " + e3 : "");
|
|
34337
34471
|
}
|
|
34338
|
-
optionTerm(
|
|
34339
|
-
return
|
|
34472
|
+
optionTerm(t3) {
|
|
34473
|
+
return t3.flags;
|
|
34340
34474
|
}
|
|
34341
|
-
argumentTerm(
|
|
34342
|
-
return
|
|
34475
|
+
argumentTerm(t3) {
|
|
34476
|
+
return t3.name();
|
|
34343
34477
|
}
|
|
34344
|
-
longestSubcommandTermLength(
|
|
34345
|
-
return
|
|
34478
|
+
longestSubcommandTermLength(t3, e3) {
|
|
34479
|
+
return e3.visibleCommands(t3).reduce((t4, i3) => Math.max(t4, e3.subcommandTerm(i3).length), 0);
|
|
34346
34480
|
}
|
|
34347
|
-
longestOptionTermLength(
|
|
34348
|
-
return
|
|
34481
|
+
longestOptionTermLength(t3, e3) {
|
|
34482
|
+
return e3.visibleOptions(t3).reduce((t4, i3) => Math.max(t4, e3.optionTerm(i3).length), 0);
|
|
34349
34483
|
}
|
|
34350
|
-
|
|
34351
|
-
return
|
|
34484
|
+
longestGlobalOptionTermLength(t3, e3) {
|
|
34485
|
+
return e3.visibleGlobalOptions(t3).reduce((t4, i3) => Math.max(t4, e3.optionTerm(i3).length), 0);
|
|
34352
34486
|
}
|
|
34353
|
-
|
|
34354
|
-
|
|
34355
|
-
|
|
34356
|
-
|
|
34487
|
+
longestArgumentTermLength(t3, e3) {
|
|
34488
|
+
return e3.visibleArguments(t3).reduce((t4, i3) => Math.max(t4, e3.argumentTerm(i3).length), 0);
|
|
34489
|
+
}
|
|
34490
|
+
commandUsage(t3) {
|
|
34491
|
+
let e3 = t3._name;
|
|
34492
|
+
if (t3._aliases[0]) {
|
|
34493
|
+
e3 = e3 + "|" + t3._aliases[0];
|
|
34357
34494
|
}
|
|
34358
34495
|
let i3 = "";
|
|
34359
|
-
for (let
|
|
34360
|
-
i3 =
|
|
34496
|
+
for (let e4 = t3.parent; e4; e4 = e4.parent) {
|
|
34497
|
+
i3 = e4.name() + " " + i3;
|
|
34361
34498
|
}
|
|
34362
|
-
return i3 +
|
|
34499
|
+
return i3 + e3 + " " + t3.usage();
|
|
34363
34500
|
}
|
|
34364
|
-
commandDescription(
|
|
34365
|
-
return
|
|
34501
|
+
commandDescription(t3) {
|
|
34502
|
+
return t3.description();
|
|
34366
34503
|
}
|
|
34367
|
-
subcommandDescription(
|
|
34368
|
-
return
|
|
34504
|
+
subcommandDescription(t3) {
|
|
34505
|
+
return t3.summary() || t3.description();
|
|
34369
34506
|
}
|
|
34370
|
-
optionDescription(
|
|
34371
|
-
const
|
|
34372
|
-
if (
|
|
34373
|
-
|
|
34507
|
+
optionDescription(t3) {
|
|
34508
|
+
const e3 = [];
|
|
34509
|
+
if (t3.argChoices) {
|
|
34510
|
+
e3.push(`choices: ${t3.argChoices.map((t4) => JSON.stringify(t4)).join(", ")}`);
|
|
34374
34511
|
}
|
|
34375
|
-
if (
|
|
34376
|
-
t3.
|
|
34512
|
+
if (t3.defaultValue !== void 0) {
|
|
34513
|
+
const i3 = t3.required || t3.optional || t3.isBoolean() && typeof t3.defaultValue === "boolean";
|
|
34514
|
+
if (i3) {
|
|
34515
|
+
e3.push(`default: ${t3.defaultValueDescription || JSON.stringify(t3.defaultValue)}`);
|
|
34516
|
+
}
|
|
34377
34517
|
}
|
|
34378
|
-
if (
|
|
34379
|
-
|
|
34518
|
+
if (t3.presetArg !== void 0 && t3.optional) {
|
|
34519
|
+
e3.push(`preset: ${JSON.stringify(t3.presetArg)}`);
|
|
34380
34520
|
}
|
|
34381
|
-
if (t3.
|
|
34382
|
-
|
|
34521
|
+
if (t3.envVar !== void 0) {
|
|
34522
|
+
e3.push(`env: ${t3.envVar}`);
|
|
34383
34523
|
}
|
|
34384
|
-
|
|
34524
|
+
if (e3.length > 0) {
|
|
34525
|
+
return `${t3.description} (${e3.join(", ")})`;
|
|
34526
|
+
}
|
|
34527
|
+
return t3.description;
|
|
34385
34528
|
}
|
|
34386
|
-
argumentDescription(
|
|
34387
|
-
const
|
|
34388
|
-
if (
|
|
34389
|
-
|
|
34529
|
+
argumentDescription(t3) {
|
|
34530
|
+
const e3 = [];
|
|
34531
|
+
if (t3.argChoices) {
|
|
34532
|
+
e3.push(`choices: ${t3.argChoices.map((t4) => JSON.stringify(t4)).join(", ")}`);
|
|
34390
34533
|
}
|
|
34391
|
-
if (
|
|
34392
|
-
|
|
34534
|
+
if (t3.defaultValue !== void 0) {
|
|
34535
|
+
e3.push(`default: ${t3.defaultValueDescription || JSON.stringify(t3.defaultValue)}`);
|
|
34393
34536
|
}
|
|
34394
|
-
if (
|
|
34395
|
-
const i3 = `(${
|
|
34396
|
-
if (
|
|
34397
|
-
return `${
|
|
34537
|
+
if (e3.length > 0) {
|
|
34538
|
+
const i3 = `(${e3.join(", ")})`;
|
|
34539
|
+
if (t3.description) {
|
|
34540
|
+
return `${t3.description} ${i3}`;
|
|
34398
34541
|
}
|
|
34399
34542
|
return i3;
|
|
34400
34543
|
}
|
|
34401
|
-
return
|
|
34544
|
+
return t3.description;
|
|
34402
34545
|
}
|
|
34403
|
-
formatHelp(
|
|
34404
|
-
const i3 =
|
|
34405
|
-
const n2 =
|
|
34546
|
+
formatHelp(t3, e3) {
|
|
34547
|
+
const i3 = e3.padWidth(t3, e3);
|
|
34548
|
+
const n2 = e3.helpWidth || 80;
|
|
34406
34549
|
const s = 2;
|
|
34407
34550
|
const r = 2;
|
|
34408
|
-
function formatItem(
|
|
34551
|
+
function formatItem(t4, o2) {
|
|
34409
34552
|
if (o2) {
|
|
34410
|
-
const a2 = `${
|
|
34411
|
-
return
|
|
34553
|
+
const a2 = `${t4.padEnd(i3 + r)}${o2}`;
|
|
34554
|
+
return e3.wrap(a2, n2 - s, i3 + r);
|
|
34412
34555
|
}
|
|
34413
|
-
return
|
|
34556
|
+
return t4;
|
|
34414
34557
|
}
|
|
34415
|
-
function formatList(
|
|
34416
|
-
return
|
|
34558
|
+
function formatList(t4) {
|
|
34559
|
+
return t4.join("\n").replace(/^/gm, " ".repeat(s));
|
|
34417
34560
|
}
|
|
34418
|
-
let o = [`Usage: ${
|
|
34419
|
-
const a =
|
|
34561
|
+
let o = [`Usage: ${e3.commandUsage(t3)}`, ""];
|
|
34562
|
+
const a = e3.commandDescription(t3);
|
|
34420
34563
|
if (a.length > 0) {
|
|
34421
|
-
o = o.concat([a, ""]);
|
|
34564
|
+
o = o.concat([e3.wrap(a, n2, 0), ""]);
|
|
34422
34565
|
}
|
|
34423
|
-
const
|
|
34566
|
+
const l = e3.visibleArguments(t3).map((t4) => formatItem(e3.argumentTerm(t4), e3.argumentDescription(t4)));
|
|
34567
|
+
if (l.length > 0) {
|
|
34568
|
+
o = o.concat(["Arguments:", formatList(l), ""]);
|
|
34569
|
+
}
|
|
34570
|
+
const h = e3.visibleOptions(t3).map((t4) => formatItem(e3.optionTerm(t4), e3.optionDescription(t4)));
|
|
34424
34571
|
if (h.length > 0) {
|
|
34425
|
-
o = o.concat(["
|
|
34572
|
+
o = o.concat(["Options:", formatList(h), ""]);
|
|
34426
34573
|
}
|
|
34427
|
-
|
|
34428
|
-
|
|
34429
|
-
|
|
34574
|
+
if (this.showGlobalOptions) {
|
|
34575
|
+
const i4 = e3.visibleGlobalOptions(t3).map((t4) => formatItem(e3.optionTerm(t4), e3.optionDescription(t4)));
|
|
34576
|
+
if (i4.length > 0) {
|
|
34577
|
+
o = o.concat(["Global Options:", formatList(i4), ""]);
|
|
34578
|
+
}
|
|
34430
34579
|
}
|
|
34431
|
-
const u =
|
|
34580
|
+
const u = e3.visibleCommands(t3).map((t4) => formatItem(e3.subcommandTerm(t4), e3.subcommandDescription(t4)));
|
|
34432
34581
|
if (u.length > 0) {
|
|
34433
34582
|
o = o.concat(["Commands:", formatList(u), ""]);
|
|
34434
34583
|
}
|
|
34435
34584
|
return o.join("\n");
|
|
34436
34585
|
}
|
|
34437
|
-
padWidth(
|
|
34438
|
-
return Math.max(
|
|
34586
|
+
padWidth(t3, e3) {
|
|
34587
|
+
return Math.max(e3.longestOptionTermLength(t3, e3), e3.longestGlobalOptionTermLength(t3, e3), e3.longestSubcommandTermLength(t3, e3), e3.longestArgumentTermLength(t3, e3));
|
|
34439
34588
|
}
|
|
34440
|
-
wrap(
|
|
34441
|
-
|
|
34442
|
-
|
|
34443
|
-
|
|
34444
|
-
|
|
34445
|
-
|
|
34446
|
-
|
|
34447
|
-
|
|
34448
|
-
const a =
|
|
34449
|
-
const
|
|
34450
|
-
const
|
|
34451
|
-
|
|
34452
|
-
|
|
34453
|
-
|
|
34454
|
-
|
|
34455
|
-
|
|
34589
|
+
wrap(t3, e3, i3, n2 = 40) {
|
|
34590
|
+
const s = " \\f\\t\\v - \uFEFF";
|
|
34591
|
+
const r = new RegExp(`[\\n][${s}]+`);
|
|
34592
|
+
if (t3.match(r))
|
|
34593
|
+
return t3;
|
|
34594
|
+
const o = e3 - i3;
|
|
34595
|
+
if (o < n2)
|
|
34596
|
+
return t3;
|
|
34597
|
+
const a = t3.slice(0, i3);
|
|
34598
|
+
const l = t3.slice(i3).replace("\r\n", "\n");
|
|
34599
|
+
const h = " ".repeat(i3);
|
|
34600
|
+
const u = "";
|
|
34601
|
+
const c = `\\s${u}`;
|
|
34602
|
+
const p = new RegExp(`
|
|
34603
|
+
|.{1,${o - 1}}([${c}]|$)|[^${c}]+?([${c}]|$)`, "g");
|
|
34604
|
+
const m = l.match(p) || [];
|
|
34605
|
+
return a + m.map((t4, e4) => {
|
|
34606
|
+
if (t4 === "\n")
|
|
34607
|
+
return "";
|
|
34608
|
+
return (e4 > 0 ? h : "") + t4.trimEnd();
|
|
34456
34609
|
}).join("\n");
|
|
34457
34610
|
}
|
|
34458
34611
|
}
|
|
34459
|
-
|
|
34460
|
-
},
|
|
34461
|
-
const { InvalidArgumentError: n } = i2(
|
|
34612
|
+
e2.Help = Help;
|
|
34613
|
+
}, 437: (t2, e2, i2) => {
|
|
34614
|
+
const { InvalidArgumentError: n } = i2(796);
|
|
34462
34615
|
class Option {
|
|
34463
|
-
constructor(
|
|
34464
|
-
this.flags =
|
|
34465
|
-
this.description =
|
|
34466
|
-
this.required =
|
|
34467
|
-
this.optional =
|
|
34468
|
-
this.variadic = /\w\.\.\.[>\]]$/.test(
|
|
34616
|
+
constructor(t3, e3) {
|
|
34617
|
+
this.flags = t3;
|
|
34618
|
+
this.description = e3 || "";
|
|
34619
|
+
this.required = t3.includes("<");
|
|
34620
|
+
this.optional = t3.includes("[");
|
|
34621
|
+
this.variadic = /\w\.\.\.[>\]]$/.test(t3);
|
|
34469
34622
|
this.mandatory = false;
|
|
34470
|
-
const i3 = splitOptionFlags(
|
|
34623
|
+
const i3 = splitOptionFlags(t3);
|
|
34471
34624
|
this.short = i3.shortFlag;
|
|
34472
34625
|
this.long = i3.longFlag;
|
|
34473
34626
|
this.negate = false;
|
|
@@ -34476,48 +34629,63 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
34476
34629
|
}
|
|
34477
34630
|
this.defaultValue = void 0;
|
|
34478
34631
|
this.defaultValueDescription = void 0;
|
|
34632
|
+
this.presetArg = void 0;
|
|
34479
34633
|
this.envVar = void 0;
|
|
34480
34634
|
this.parseArg = void 0;
|
|
34481
34635
|
this.hidden = false;
|
|
34482
34636
|
this.argChoices = void 0;
|
|
34637
|
+
this.conflictsWith = [];
|
|
34638
|
+
this.implied = void 0;
|
|
34483
34639
|
}
|
|
34484
|
-
default(
|
|
34485
|
-
this.defaultValue =
|
|
34486
|
-
this.defaultValueDescription =
|
|
34640
|
+
default(t3, e3) {
|
|
34641
|
+
this.defaultValue = t3;
|
|
34642
|
+
this.defaultValueDescription = e3;
|
|
34487
34643
|
return this;
|
|
34488
34644
|
}
|
|
34489
|
-
|
|
34490
|
-
this.
|
|
34645
|
+
preset(t3) {
|
|
34646
|
+
this.presetArg = t3;
|
|
34491
34647
|
return this;
|
|
34492
34648
|
}
|
|
34493
|
-
|
|
34494
|
-
this.
|
|
34649
|
+
conflicts(t3) {
|
|
34650
|
+
this.conflictsWith = this.conflictsWith.concat(t3);
|
|
34495
34651
|
return this;
|
|
34496
34652
|
}
|
|
34497
|
-
|
|
34498
|
-
this.
|
|
34653
|
+
implies(t3) {
|
|
34654
|
+
this.implied = Object.assign(this.implied || {}, t3);
|
|
34499
34655
|
return this;
|
|
34500
34656
|
}
|
|
34501
|
-
|
|
34502
|
-
this.
|
|
34657
|
+
env(t3) {
|
|
34658
|
+
this.envVar = t3;
|
|
34503
34659
|
return this;
|
|
34504
34660
|
}
|
|
34505
|
-
|
|
34506
|
-
|
|
34507
|
-
|
|
34661
|
+
argParser(t3) {
|
|
34662
|
+
this.parseArg = t3;
|
|
34663
|
+
return this;
|
|
34664
|
+
}
|
|
34665
|
+
makeOptionMandatory(t3 = true) {
|
|
34666
|
+
this.mandatory = !!t3;
|
|
34667
|
+
return this;
|
|
34668
|
+
}
|
|
34669
|
+
hideHelp(t3 = true) {
|
|
34670
|
+
this.hidden = !!t3;
|
|
34671
|
+
return this;
|
|
34672
|
+
}
|
|
34673
|
+
_concatValue(t3, e3) {
|
|
34674
|
+
if (e3 === this.defaultValue || !Array.isArray(e3)) {
|
|
34675
|
+
return [t3];
|
|
34508
34676
|
}
|
|
34509
|
-
return
|
|
34677
|
+
return e3.concat(t3);
|
|
34510
34678
|
}
|
|
34511
|
-
choices(
|
|
34512
|
-
this.argChoices =
|
|
34513
|
-
this.parseArg = (
|
|
34514
|
-
if (!
|
|
34515
|
-
throw new n(`Allowed choices are ${
|
|
34679
|
+
choices(t3) {
|
|
34680
|
+
this.argChoices = t3.slice();
|
|
34681
|
+
this.parseArg = (t4, e3) => {
|
|
34682
|
+
if (!this.argChoices.includes(t4)) {
|
|
34683
|
+
throw new n(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
34516
34684
|
}
|
|
34517
34685
|
if (this.variadic) {
|
|
34518
|
-
return this._concatValue(
|
|
34686
|
+
return this._concatValue(t4, e3);
|
|
34519
34687
|
}
|
|
34520
|
-
return
|
|
34688
|
+
return t4;
|
|
34521
34689
|
};
|
|
34522
34690
|
return this;
|
|
34523
34691
|
}
|
|
@@ -34530,86 +34698,117 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
34530
34698
|
attributeName() {
|
|
34531
34699
|
return camelcase(this.name().replace(/^no-/, ""));
|
|
34532
34700
|
}
|
|
34533
|
-
is(
|
|
34534
|
-
return this.short ===
|
|
34701
|
+
is(t3) {
|
|
34702
|
+
return this.short === t3 || this.long === t3;
|
|
34703
|
+
}
|
|
34704
|
+
isBoolean() {
|
|
34705
|
+
return !this.required && !this.optional && !this.negate;
|
|
34535
34706
|
}
|
|
34536
34707
|
}
|
|
34537
|
-
|
|
34538
|
-
|
|
34708
|
+
class DualOptions {
|
|
34709
|
+
constructor(t3) {
|
|
34710
|
+
this.positiveOptions = /* @__PURE__ */ new Map();
|
|
34711
|
+
this.negativeOptions = /* @__PURE__ */ new Map();
|
|
34712
|
+
this.dualOptions = /* @__PURE__ */ new Set();
|
|
34713
|
+
t3.forEach((t4) => {
|
|
34714
|
+
if (t4.negate) {
|
|
34715
|
+
this.negativeOptions.set(t4.attributeName(), t4);
|
|
34716
|
+
} else {
|
|
34717
|
+
this.positiveOptions.set(t4.attributeName(), t4);
|
|
34718
|
+
}
|
|
34719
|
+
});
|
|
34720
|
+
this.negativeOptions.forEach((t4, e3) => {
|
|
34721
|
+
if (this.positiveOptions.has(e3)) {
|
|
34722
|
+
this.dualOptions.add(e3);
|
|
34723
|
+
}
|
|
34724
|
+
});
|
|
34725
|
+
}
|
|
34726
|
+
valueFromOption(t3, e3) {
|
|
34727
|
+
const i3 = e3.attributeName();
|
|
34728
|
+
if (!this.dualOptions.has(i3))
|
|
34729
|
+
return true;
|
|
34730
|
+
const n2 = this.negativeOptions.get(i3).presetArg;
|
|
34731
|
+
const s = n2 !== void 0 ? n2 : false;
|
|
34732
|
+
return e3.negate === (s === t3);
|
|
34733
|
+
}
|
|
34539
34734
|
}
|
|
34540
|
-
function
|
|
34541
|
-
|
|
34735
|
+
function camelcase(t3) {
|
|
34736
|
+
return t3.split("-").reduce((t4, e3) => t4 + e3[0].toUpperCase() + e3.slice(1));
|
|
34737
|
+
}
|
|
34738
|
+
function splitOptionFlags(t3) {
|
|
34739
|
+
let e3;
|
|
34542
34740
|
let i3;
|
|
34543
|
-
const n2 =
|
|
34741
|
+
const n2 = t3.split(/[ |,]+/);
|
|
34544
34742
|
if (n2.length > 1 && !/^[[<]/.test(n2[1]))
|
|
34545
|
-
|
|
34743
|
+
e3 = n2.shift();
|
|
34546
34744
|
i3 = n2.shift();
|
|
34547
|
-
if (!
|
|
34548
|
-
|
|
34745
|
+
if (!e3 && /^-[^-]$/.test(i3)) {
|
|
34746
|
+
e3 = i3;
|
|
34549
34747
|
i3 = void 0;
|
|
34550
34748
|
}
|
|
34551
|
-
return { shortFlag:
|
|
34749
|
+
return { shortFlag: e3, longFlag: i3 };
|
|
34552
34750
|
}
|
|
34553
|
-
|
|
34554
|
-
|
|
34555
|
-
|
|
34751
|
+
e2.Option = Option;
|
|
34752
|
+
e2.splitOptionFlags = splitOptionFlags;
|
|
34753
|
+
e2.DualOptions = DualOptions;
|
|
34754
|
+
}, 860: (t2, e2) => {
|
|
34556
34755
|
const i2 = 3;
|
|
34557
|
-
function editDistance(
|
|
34558
|
-
if (Math.abs(
|
|
34559
|
-
return Math.max(
|
|
34756
|
+
function editDistance(t3, e3) {
|
|
34757
|
+
if (Math.abs(t3.length - e3.length) > i2)
|
|
34758
|
+
return Math.max(t3.length, e3.length);
|
|
34560
34759
|
const n = [];
|
|
34561
|
-
for (let t4 = 0; t4 <= e3.length; t4++) {
|
|
34562
|
-
n[t4] = [t4];
|
|
34563
|
-
}
|
|
34564
34760
|
for (let e4 = 0; e4 <= t3.length; e4++) {
|
|
34565
|
-
n[
|
|
34761
|
+
n[e4] = [e4];
|
|
34566
34762
|
}
|
|
34567
|
-
for (let
|
|
34568
|
-
|
|
34763
|
+
for (let t4 = 0; t4 <= e3.length; t4++) {
|
|
34764
|
+
n[0][t4] = t4;
|
|
34765
|
+
}
|
|
34766
|
+
for (let i3 = 1; i3 <= e3.length; i3++) {
|
|
34767
|
+
for (let s = 1; s <= t3.length; s++) {
|
|
34569
34768
|
let r = 1;
|
|
34570
|
-
if (
|
|
34769
|
+
if (t3[s - 1] === e3[i3 - 1]) {
|
|
34571
34770
|
r = 0;
|
|
34572
34771
|
} else {
|
|
34573
34772
|
r = 1;
|
|
34574
34773
|
}
|
|
34575
34774
|
n[s][i3] = Math.min(n[s - 1][i3] + 1, n[s][i3 - 1] + 1, n[s - 1][i3 - 1] + r);
|
|
34576
|
-
if (s > 1 && i3 > 1 &&
|
|
34775
|
+
if (s > 1 && i3 > 1 && t3[s - 1] === e3[i3 - 2] && t3[s - 2] === e3[i3 - 1]) {
|
|
34577
34776
|
n[s][i3] = Math.min(n[s][i3], n[s - 2][i3 - 2] + 1);
|
|
34578
34777
|
}
|
|
34579
34778
|
}
|
|
34580
34779
|
}
|
|
34581
|
-
return n[
|
|
34780
|
+
return n[t3.length][e3.length];
|
|
34582
34781
|
}
|
|
34583
|
-
function suggestSimilar(
|
|
34584
|
-
if (!
|
|
34782
|
+
function suggestSimilar(t3, e3) {
|
|
34783
|
+
if (!e3 || e3.length === 0)
|
|
34585
34784
|
return "";
|
|
34586
|
-
|
|
34587
|
-
const n =
|
|
34785
|
+
e3 = Array.from(new Set(e3));
|
|
34786
|
+
const n = t3.startsWith("--");
|
|
34588
34787
|
if (n) {
|
|
34589
|
-
|
|
34590
|
-
|
|
34788
|
+
t3 = t3.slice(2);
|
|
34789
|
+
e3 = e3.map((t4) => t4.slice(2));
|
|
34591
34790
|
}
|
|
34592
34791
|
let s = [];
|
|
34593
34792
|
let r = i2;
|
|
34594
34793
|
const o = 0.4;
|
|
34595
|
-
|
|
34596
|
-
if (
|
|
34794
|
+
e3.forEach((e4) => {
|
|
34795
|
+
if (e4.length <= 1)
|
|
34597
34796
|
return;
|
|
34598
|
-
const i3 = editDistance(
|
|
34599
|
-
const n2 = Math.max(
|
|
34797
|
+
const i3 = editDistance(t3, e4);
|
|
34798
|
+
const n2 = Math.max(t3.length, e4.length);
|
|
34600
34799
|
const a = (n2 - i3) / n2;
|
|
34601
34800
|
if (a > o) {
|
|
34602
34801
|
if (i3 < r) {
|
|
34603
34802
|
r = i3;
|
|
34604
|
-
s = [
|
|
34803
|
+
s = [e4];
|
|
34605
34804
|
} else if (i3 === r) {
|
|
34606
|
-
s.push(
|
|
34805
|
+
s.push(e4);
|
|
34607
34806
|
}
|
|
34608
34807
|
}
|
|
34609
34808
|
});
|
|
34610
|
-
s.sort((
|
|
34809
|
+
s.sort((t4, e4) => t4.localeCompare(e4));
|
|
34611
34810
|
if (n) {
|
|
34612
|
-
s = s.map((
|
|
34811
|
+
s = s.map((t4) => `--${t4}`);
|
|
34613
34812
|
}
|
|
34614
34813
|
if (s.length > 1) {
|
|
34615
34814
|
return `
|
|
@@ -34621,28 +34820,28 @@ Expecting one of '${i3.join("', '")}'`);
|
|
|
34621
34820
|
}
|
|
34622
34821
|
return "";
|
|
34623
34822
|
}
|
|
34624
|
-
|
|
34823
|
+
e2.suggestSimilar = suggestSimilar;
|
|
34625
34824
|
} };
|
|
34626
|
-
var
|
|
34825
|
+
var e = {};
|
|
34627
34826
|
function __nccwpck_require__(i2) {
|
|
34628
|
-
var n =
|
|
34827
|
+
var n = e[i2];
|
|
34629
34828
|
if (n !== void 0) {
|
|
34630
34829
|
return n.exports;
|
|
34631
34830
|
}
|
|
34632
|
-
var s =
|
|
34831
|
+
var s = e[i2] = { exports: {} };
|
|
34633
34832
|
var r = true;
|
|
34634
34833
|
try {
|
|
34635
|
-
|
|
34834
|
+
t[i2](s, s.exports, __nccwpck_require__);
|
|
34636
34835
|
r = false;
|
|
34637
34836
|
} finally {
|
|
34638
34837
|
if (r)
|
|
34639
|
-
delete
|
|
34838
|
+
delete e[i2];
|
|
34640
34839
|
}
|
|
34641
34840
|
return s.exports;
|
|
34642
34841
|
}
|
|
34643
34842
|
if (typeof __nccwpck_require__ !== "undefined")
|
|
34644
34843
|
__nccwpck_require__.ab = __dirname + "/";
|
|
34645
|
-
var i = __nccwpck_require__(
|
|
34844
|
+
var i = __nccwpck_require__(632);
|
|
34646
34845
|
module2.exports = i;
|
|
34647
34846
|
})();
|
|
34648
34847
|
}
|
|
@@ -34782,12 +34981,21 @@ var require_commands = __commonJS({
|
|
|
34782
34981
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
34783
34982
|
var commands_exports = {};
|
|
34784
34983
|
__export2(commands_exports, {
|
|
34984
|
+
getArgv: () => getArgv,
|
|
34785
34985
|
getCommand: () => getCommand,
|
|
34986
|
+
getFullArgv: () => getFullArgv,
|
|
34786
34987
|
isDevCommand: () => isDevCommand
|
|
34787
34988
|
});
|
|
34788
34989
|
module2.exports = __toCommonJS2(commands_exports);
|
|
34990
|
+
var getFullArgv = () => {
|
|
34991
|
+
var _a;
|
|
34992
|
+
return ((_a = process.env.MODERN_ARGV) == null ? void 0 : _a.split(" ")) || process.argv;
|
|
34993
|
+
};
|
|
34994
|
+
var getArgv = () => {
|
|
34995
|
+
return getFullArgv().slice(2);
|
|
34996
|
+
};
|
|
34789
34997
|
var getCommand = () => {
|
|
34790
|
-
const args =
|
|
34998
|
+
const args = getArgv();
|
|
34791
34999
|
const command = args[0];
|
|
34792
35000
|
return command;
|
|
34793
35001
|
};
|
|
@@ -34798,108 +35006,6 @@ var require_commands = __commonJS({
|
|
|
34798
35006
|
}
|
|
34799
35007
|
});
|
|
34800
35008
|
|
|
34801
|
-
// ../utils/dist/format.js
|
|
34802
|
-
var require_format = __commonJS({
|
|
34803
|
-
"../utils/dist/format.js"(exports, module2) {
|
|
34804
|
-
var __defProp2 = Object.defineProperty;
|
|
34805
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
34806
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
34807
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
34808
|
-
var __export2 = (target, all) => {
|
|
34809
|
-
for (var name in all)
|
|
34810
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
34811
|
-
};
|
|
34812
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
34813
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
34814
|
-
for (let key of __getOwnPropNames2(from))
|
|
34815
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
34816
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
34817
|
-
}
|
|
34818
|
-
return to;
|
|
34819
|
-
};
|
|
34820
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
34821
|
-
var format_exports = {};
|
|
34822
|
-
__export2(format_exports, {
|
|
34823
|
-
formatWebpackMessages: () => formatWebpackMessages
|
|
34824
|
-
});
|
|
34825
|
-
module2.exports = __toCommonJS2(format_exports);
|
|
34826
|
-
var friendlySyntaxErrorLabel = "SyntaxError:";
|
|
34827
|
-
function isLikelyASyntaxError(message) {
|
|
34828
|
-
return message.includes(friendlySyntaxErrorLabel);
|
|
34829
|
-
}
|
|
34830
|
-
function formatMessage(stats) {
|
|
34831
|
-
let lines = [];
|
|
34832
|
-
let message;
|
|
34833
|
-
if (typeof stats === "object") {
|
|
34834
|
-
const fileName = stats.moduleName ? `File: ${stats.moduleName}
|
|
34835
|
-
` : "";
|
|
34836
|
-
const mainMessage = typeof stats.formatted === "string" ? stats.formatted : stats.message;
|
|
34837
|
-
const details = stats.details ? `
|
|
34838
|
-
Details: ${stats.details}
|
|
34839
|
-
` : "";
|
|
34840
|
-
const stack = stats.stack ? `
|
|
34841
|
-
${stats.stack}` : "";
|
|
34842
|
-
message = `${fileName}${mainMessage}${details}${stack}`;
|
|
34843
|
-
} else {
|
|
34844
|
-
message = stats;
|
|
34845
|
-
}
|
|
34846
|
-
lines = message.split("\n");
|
|
34847
|
-
lines = lines.map((line) => {
|
|
34848
|
-
const parsingError = /Line (\d+):(?:(\d+):)?\s*Parsing error: (.+)$/.exec(
|
|
34849
|
-
line
|
|
34850
|
-
);
|
|
34851
|
-
if (!parsingError) {
|
|
34852
|
-
return line;
|
|
34853
|
-
}
|
|
34854
|
-
const [, errorLine, errorColumn, errorMessage] = parsingError;
|
|
34855
|
-
return `${friendlySyntaxErrorLabel} ${errorMessage} (${errorLine}:${errorColumn})`;
|
|
34856
|
-
});
|
|
34857
|
-
message = lines.join("\n");
|
|
34858
|
-
message = message.replace(
|
|
34859
|
-
/SyntaxError\s+\((\d+):(\d+)\)\s*(.+?)\n/g,
|
|
34860
|
-
`${friendlySyntaxErrorLabel} $3 ($1:$2)
|
|
34861
|
-
`
|
|
34862
|
-
);
|
|
34863
|
-
lines = message.split("\n");
|
|
34864
|
-
if (lines.length > 2 && lines[1].trim() === "") {
|
|
34865
|
-
lines.splice(1, 1);
|
|
34866
|
-
}
|
|
34867
|
-
lines[0] = lines[0].replace(/^(.*) \d+:\d+-\d+$/, "$1");
|
|
34868
|
-
if (lines[1] && lines[1].indexOf("Module not found:") !== -1) {
|
|
34869
|
-
lines[1] = lines[1].replace("Error: ", "");
|
|
34870
|
-
}
|
|
34871
|
-
message = lines.join("\n");
|
|
34872
|
-
message = message.replace(
|
|
34873
|
-
/^\s*at\s((?!webpack:).)*:\d+:\d+[\s)]*(\n|$)/gm,
|
|
34874
|
-
""
|
|
34875
|
-
);
|
|
34876
|
-
message = message.replace(/^\s*at\s<anonymous>(\n|$)/gm, "");
|
|
34877
|
-
lines = message.split("\n");
|
|
34878
|
-
lines = lines.filter(
|
|
34879
|
-
(line, index, arr) => index === 0 || line.trim() !== "" || line.trim() !== arr[index - 1].trim()
|
|
34880
|
-
);
|
|
34881
|
-
message = lines.join("\n");
|
|
34882
|
-
return message.trim();
|
|
34883
|
-
}
|
|
34884
|
-
function formatWebpackMessages(json) {
|
|
34885
|
-
var _a, _b, _c;
|
|
34886
|
-
const formattedErrors = (_a = json == null ? void 0 : json.errors) == null ? void 0 : _a.map(formatMessage);
|
|
34887
|
-
const formattedWarnings = (_b = json == null ? void 0 : json.warnings) == null ? void 0 : _b.map(formatMessage);
|
|
34888
|
-
const result = {
|
|
34889
|
-
errors: formattedErrors || [],
|
|
34890
|
-
warnings: formattedWarnings || []
|
|
34891
|
-
};
|
|
34892
|
-
if ((_c = result.errors) == null ? void 0 : _c.some(isLikelyASyntaxError)) {
|
|
34893
|
-
result.errors = result.errors.filter(isLikelyASyntaxError);
|
|
34894
|
-
}
|
|
34895
|
-
if (result.errors.length > 1) {
|
|
34896
|
-
result.errors.length = 1;
|
|
34897
|
-
}
|
|
34898
|
-
return result;
|
|
34899
|
-
}
|
|
34900
|
-
}
|
|
34901
|
-
});
|
|
34902
|
-
|
|
34903
35009
|
// ../utils/dist/logger.js
|
|
34904
35010
|
var require_logger = __commonJS({
|
|
34905
35011
|
"../utils/dist/logger.js"(exports, module2) {
|
|
@@ -35684,10 +35790,10 @@ var require_constants = __commonJS({
|
|
|
35684
35790
|
API_DIR: () => API_DIR,
|
|
35685
35791
|
CONFIG_CACHE_DIR: () => CONFIG_CACHE_DIR,
|
|
35686
35792
|
CONFIG_FILE_EXTENSIONS: () => CONFIG_FILE_EXTENSIONS,
|
|
35793
|
+
DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: () => DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS,
|
|
35687
35794
|
DEFAULT_DEV_HOST: () => DEFAULT_DEV_HOST,
|
|
35688
35795
|
DEFAULT_SERVER_CONFIG: () => DEFAULT_SERVER_CONFIG,
|
|
35689
35796
|
ENTRY_NAME_PATTERN: () => ENTRY_NAME_PATTERN,
|
|
35690
|
-
HMR_SOCK_PATH: () => HMR_SOCK_PATH,
|
|
35691
35797
|
INTERNAL_APP_TOOLS_PLUGINS: () => INTERNAL_APP_TOOLS_PLUGINS,
|
|
35692
35798
|
INTERNAL_APP_TOOLS_RUNTIME_PLUGINS: () => INTERNAL_APP_TOOLS_RUNTIME_PLUGINS,
|
|
35693
35799
|
INTERNAL_CLI_PLUGINS: () => INTERNAL_CLI_PLUGINS,
|
|
@@ -35701,8 +35807,7 @@ var require_constants = __commonJS({
|
|
|
35701
35807
|
MAIN_ENTRY_NAME: () => MAIN_ENTRY_NAME,
|
|
35702
35808
|
OUTPUT_CONFIG_FILE: () => OUTPUT_CONFIG_FILE,
|
|
35703
35809
|
PLUGIN_SCHEMAS: () => PLUGIN_SCHEMAS,
|
|
35704
|
-
|
|
35705
|
-
ROUTE_MINIFEST_FILE: () => ROUTE_MINIFEST_FILE,
|
|
35810
|
+
ROUTE_MANIFEST_FILE: () => ROUTE_MANIFEST_FILE,
|
|
35706
35811
|
ROUTE_SPEC_FILE: () => ROUTE_SPEC_FILE,
|
|
35707
35812
|
SERVER_BUNDLE_DIRECTORY: () => SERVER_BUNDLE_DIRECTORY,
|
|
35708
35813
|
SERVER_DIR: () => SERVER_DIR,
|
|
@@ -35718,7 +35823,6 @@ var require_constants = __commonJS({
|
|
|
35718
35823
|
SHARED_DIR: () => SHARED_DIR
|
|
35719
35824
|
});
|
|
35720
35825
|
module2.exports = __toCommonJS2(constants_exports);
|
|
35721
|
-
var HMR_SOCK_PATH = "/webpack-hmr";
|
|
35722
35826
|
var ROUTE_SPEC_FILE = "route.json";
|
|
35723
35827
|
var MAIN_ENTRY_NAME = "main";
|
|
35724
35828
|
var LAUNCH_EDITOR_ENDPOINT = "/__open-stack-frame-in-editor";
|
|
@@ -35734,8 +35838,7 @@ var require_constants = __commonJS({
|
|
|
35734
35838
|
var CONFIG_FILE_EXTENSIONS = [".js", ".ts", ".mjs"];
|
|
35735
35839
|
var OUTPUT_CONFIG_FILE = "modern.config.json";
|
|
35736
35840
|
var DEFAULT_SERVER_CONFIG = "modern.server-runtime.config";
|
|
35737
|
-
var
|
|
35738
|
-
var ROUTE_MANIFEST = `_MODERNJS_ROUTE_MANIFEST`;
|
|
35841
|
+
var ROUTE_MANIFEST_FILE = "routes-manifest.json";
|
|
35739
35842
|
var LOADER_ROUTES_DIR = `loader-routes`;
|
|
35740
35843
|
var DEFAULT_DEV_HOST = "0.0.0.0";
|
|
35741
35844
|
var INTERNAL_APP_TOOLS_PLUGINS = {
|
|
@@ -35939,6 +36042,15 @@ var require_constants = __commonJS({
|
|
|
35939
36042
|
],
|
|
35940
36043
|
"@modern-js/plugin-nocode": []
|
|
35941
36044
|
};
|
|
36045
|
+
var DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS = {
|
|
36046
|
+
allowNamespaces: true,
|
|
36047
|
+
allExtensions: true,
|
|
36048
|
+
allowDeclareFields: true,
|
|
36049
|
+
// aligns Babel's behavior with TypeScript's default behavior.
|
|
36050
|
+
// https://babeljs.io/docs/en/babel-preset-typescript#optimizeconstenums
|
|
36051
|
+
optimizeConstEnums: true,
|
|
36052
|
+
isTSX: true
|
|
36053
|
+
};
|
|
35942
36054
|
}
|
|
35943
36055
|
});
|
|
35944
36056
|
|
|
@@ -37049,19 +37161,16 @@ var require_prettyInstructions = __commonJS({
|
|
|
37049
37161
|
};
|
|
37050
37162
|
var getAddressUrls = (protocol = "http", port) => {
|
|
37051
37163
|
const ipv4Interfaces = getIpv4Interfaces();
|
|
37052
|
-
return ipv4Interfaces.reduce(
|
|
37053
|
-
|
|
37054
|
-
|
|
37055
|
-
|
|
37056
|
-
|
|
37057
|
-
|
|
37058
|
-
|
|
37059
|
-
|
|
37060
|
-
|
|
37061
|
-
|
|
37062
|
-
},
|
|
37063
|
-
[]
|
|
37064
|
-
);
|
|
37164
|
+
return ipv4Interfaces.reduce((memo, detail) => {
|
|
37165
|
+
let label = "Network: ";
|
|
37166
|
+
let url = `${protocol}://${detail.address}:${port}`;
|
|
37167
|
+
if (detail.address.includes(`localhost`) || detail.internal) {
|
|
37168
|
+
label = "Local: ";
|
|
37169
|
+
url = `${protocol}://localhost:${port}`;
|
|
37170
|
+
}
|
|
37171
|
+
memo.push({ label, url });
|
|
37172
|
+
return memo;
|
|
37173
|
+
}, []);
|
|
37065
37174
|
};
|
|
37066
37175
|
var prettyInstructions = (appContext, config) => {
|
|
37067
37176
|
const { entrypoints, serverRoutes, port, apiOnly, checkedEntries } = appContext;
|
|
@@ -37073,15 +37182,15 @@ var require_prettyInstructions = __commonJS({
|
|
|
37073
37182
|
let message = "App running at:\n\n";
|
|
37074
37183
|
if ((0, import_is.isSingleEntry)(entrypoints) || apiOnly) {
|
|
37075
37184
|
message += urls.map(
|
|
37076
|
-
({
|
|
37185
|
+
({ label, url }) => ` ${import_compiled.chalk.bold(`> ${label.padEnd(10)}`)}${import_compiled.chalk.cyanBright(
|
|
37077
37186
|
normalizeUrl(`${url}/${routes[0].urlPath}`)
|
|
37078
37187
|
)}
|
|
37079
37188
|
`
|
|
37080
37189
|
).join("");
|
|
37081
37190
|
} else {
|
|
37082
37191
|
const maxNameLength = Math.max(...routes.map((r) => r.entryName.length));
|
|
37083
|
-
urls.forEach(({
|
|
37084
|
-
message += ` ${import_compiled.chalk.bold(`> ${
|
|
37192
|
+
urls.forEach(({ label, url }) => {
|
|
37193
|
+
message += ` ${import_compiled.chalk.bold(`> ${label}`)}
|
|
37085
37194
|
`;
|
|
37086
37195
|
routes.forEach(({ entryName, urlPath, isSSR }) => {
|
|
37087
37196
|
if (!checkedEntries.includes(entryName)) {
|
|
@@ -37460,9 +37569,9 @@ var require_getServerConfig = __commonJS({
|
|
|
37460
37569
|
}
|
|
37461
37570
|
});
|
|
37462
37571
|
|
|
37463
|
-
// ../utils/dist/
|
|
37464
|
-
var
|
|
37465
|
-
"../utils/dist/
|
|
37572
|
+
// ../utils/dist/resolve.js
|
|
37573
|
+
var require_resolve = __commonJS({
|
|
37574
|
+
"../utils/dist/resolve.js"(exports, module2) {
|
|
37466
37575
|
var __defProp2 = Object.defineProperty;
|
|
37467
37576
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
37468
37577
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
@@ -37480,12 +37589,13 @@ var require_tryResolve = __commonJS({
|
|
|
37480
37589
|
return to;
|
|
37481
37590
|
};
|
|
37482
37591
|
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
37483
|
-
var
|
|
37484
|
-
__export2(
|
|
37592
|
+
var resolve_exports = {};
|
|
37593
|
+
__export2(resolve_exports, {
|
|
37594
|
+
getAntdMajorVersion: () => getAntdMajorVersion,
|
|
37485
37595
|
isPackageInstalled: () => isPackageInstalled,
|
|
37486
37596
|
tryResolve: () => tryResolve
|
|
37487
37597
|
});
|
|
37488
|
-
module2.exports = __toCommonJS2(
|
|
37598
|
+
module2.exports = __toCommonJS2(resolve_exports);
|
|
37489
37599
|
var import_ensureArray = require_ensureArray();
|
|
37490
37600
|
var tryResolve = (name, resolvePath) => {
|
|
37491
37601
|
let filePath = "";
|
|
@@ -37508,6 +37618,17 @@ var require_tryResolve = __commonJS({
|
|
|
37508
37618
|
return false;
|
|
37509
37619
|
}
|
|
37510
37620
|
};
|
|
37621
|
+
var getAntdMajorVersion = (appDirectory) => {
|
|
37622
|
+
try {
|
|
37623
|
+
const pkgJsonPath = require.resolve("antd/package.json", {
|
|
37624
|
+
paths: [appDirectory]
|
|
37625
|
+
});
|
|
37626
|
+
const { version: version2 } = require(pkgJsonPath);
|
|
37627
|
+
return Number(version2.split(".")[0]);
|
|
37628
|
+
} catch (err) {
|
|
37629
|
+
return null;
|
|
37630
|
+
}
|
|
37631
|
+
};
|
|
37511
37632
|
}
|
|
37512
37633
|
});
|
|
37513
37634
|
|
|
@@ -37568,15 +37689,16 @@ var require_analyzeProject = __commonJS({
|
|
|
37568
37689
|
});
|
|
37569
37690
|
module2.exports = __toCommonJS2(analyzeProject_exports);
|
|
37570
37691
|
var path4 = __toESM2(require("path"));
|
|
37692
|
+
var import_commands = require_commands();
|
|
37571
37693
|
var import_compiled = require_compiled();
|
|
37572
37694
|
var isApiOnly = (appDirectory, entryDir) => __async2(void 0, null, function* () {
|
|
37573
37695
|
const srcDir = path4.join(appDirectory, entryDir != null ? entryDir : "src");
|
|
37574
37696
|
const existSrc = yield import_compiled.fs.pathExists(srcDir);
|
|
37575
|
-
const options = (0, import_compiled.minimist)(
|
|
37697
|
+
const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
|
|
37576
37698
|
return !existSrc || Boolean(options["api-only"]);
|
|
37577
37699
|
});
|
|
37578
37700
|
var isWebOnly = () => __async2(void 0, null, function* () {
|
|
37579
|
-
const options = (0, import_compiled.minimist)(
|
|
37701
|
+
const options = (0, import_compiled.minimist)((0, import_commands.getArgv)());
|
|
37580
37702
|
return Boolean(options["web-only"]);
|
|
37581
37703
|
});
|
|
37582
37704
|
}
|
|
@@ -37647,27 +37769,10 @@ var require_chainId = __commonJS({
|
|
|
37647
37769
|
},
|
|
37648
37770
|
/** Predefined rule groups */
|
|
37649
37771
|
ONE_OF: {
|
|
37650
|
-
JS: "js",
|
|
37651
|
-
TS: "ts",
|
|
37652
|
-
CSS: "css",
|
|
37653
|
-
LESS: "less",
|
|
37654
|
-
SASS: "sass",
|
|
37655
|
-
YAML: "yml",
|
|
37656
|
-
TOML: "toml",
|
|
37657
|
-
FALLBACK: "fallback",
|
|
37658
|
-
MARKDOWN: "markdown",
|
|
37659
|
-
BFF_CLIENT: "bff-client",
|
|
37660
|
-
CSS_MODULES: "css-modules",
|
|
37661
|
-
LESS_MODULES: "less-modules",
|
|
37662
|
-
SASS_MODULES: "sass-modules",
|
|
37663
37772
|
SVG: "svg",
|
|
37664
37773
|
SVG_URL: "svg-url",
|
|
37665
37774
|
SVG_ASSET: "svg-asset",
|
|
37666
|
-
SVG_INLINE: "svg-inline"
|
|
37667
|
-
ASSETS: "assets",
|
|
37668
|
-
ASSETS_URL: "assets-url",
|
|
37669
|
-
ASSETS_INLINE: "assets-inline",
|
|
37670
|
-
IMAGE_COMPRESS: "image-compress"
|
|
37775
|
+
SVG_INLINE: "svg-inline"
|
|
37671
37776
|
},
|
|
37672
37777
|
/** Predefined loaders */
|
|
37673
37778
|
USE: {
|
|
@@ -38352,7 +38457,6 @@ var require_dist = __commonJS({
|
|
|
38352
38457
|
module2.exports = __toCommonJS2(src_exports2);
|
|
38353
38458
|
__reExport(src_exports2, require_compiled(), module2.exports);
|
|
38354
38459
|
__reExport(src_exports2, require_commands(), module2.exports);
|
|
38355
|
-
__reExport(src_exports2, require_format(), module2.exports);
|
|
38356
38460
|
__reExport(src_exports2, require_FileSizeReporter(), module2.exports);
|
|
38357
38461
|
__reExport(src_exports2, require_printBuildError(), module2.exports);
|
|
38358
38462
|
__reExport(src_exports2, require_debug2(), module2.exports);
|
|
@@ -38384,7 +38488,7 @@ var require_dist = __commonJS({
|
|
|
38384
38488
|
__reExport(src_exports2, require_wait(), module2.exports);
|
|
38385
38489
|
__reExport(src_exports2, require_emptyDir(), module2.exports);
|
|
38386
38490
|
__reExport(src_exports2, require_getServerConfig(), module2.exports);
|
|
38387
|
-
__reExport(src_exports2,
|
|
38491
|
+
__reExport(src_exports2, require_resolve(), module2.exports);
|
|
38388
38492
|
__reExport(src_exports2, require_analyzeProject(), module2.exports);
|
|
38389
38493
|
__reExport(src_exports2, require_chainId(), module2.exports);
|
|
38390
38494
|
__reExport(src_exports2, require_version(), module2.exports);
|
|
@@ -67435,7 +67539,7 @@ var require_compiled2 = __commonJS({
|
|
|
67435
67539
|
});
|
|
67436
67540
|
|
|
67437
67541
|
// ../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/dist/format.js
|
|
67438
|
-
var
|
|
67542
|
+
var require_format = __commonJS({
|
|
67439
67543
|
"../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/dist/format.js"(exports) {
|
|
67440
67544
|
"use strict";
|
|
67441
67545
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -69085,7 +69189,7 @@ var require_ssr = __commonJS({
|
|
|
69085
69189
|
});
|
|
69086
69190
|
|
|
69087
69191
|
// ../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/dist/tryResolve.js
|
|
69088
|
-
var
|
|
69192
|
+
var require_tryResolve = __commonJS({
|
|
69089
69193
|
"../../../node_modules/.pnpm/@modern-js+utils@1.21.5/node_modules/@modern-js/utils/dist/tryResolve.js"(exports) {
|
|
69090
69194
|
"use strict";
|
|
69091
69195
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -69396,7 +69500,7 @@ var require_dist2 = __commonJS({
|
|
|
69396
69500
|
};
|
|
69397
69501
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
69398
69502
|
__exportStar(require_compiled2(), exports);
|
|
69399
|
-
__exportStar(
|
|
69503
|
+
__exportStar(require_format(), exports);
|
|
69400
69504
|
__exportStar(require_FileSizeReporter2(), exports);
|
|
69401
69505
|
__exportStar(require_printBuildError2(), exports);
|
|
69402
69506
|
__exportStar(require_debug4(), exports);
|
|
@@ -69428,7 +69532,7 @@ var require_dist2 = __commonJS({
|
|
|
69428
69532
|
__exportStar(require_emptyDir2(), exports);
|
|
69429
69533
|
__exportStar(require_getServerConfig2(), exports);
|
|
69430
69534
|
__exportStar(require_ssr(), exports);
|
|
69431
|
-
__exportStar(
|
|
69535
|
+
__exportStar(require_tryResolve(), exports);
|
|
69432
69536
|
__exportStar(require_analyzeProject2(), exports);
|
|
69433
69537
|
__exportStar(require_chainId2(), exports);
|
|
69434
69538
|
__exportStar(require_version2(), exports);
|
|
@@ -71171,6 +71275,306 @@ var require_browser = __commonJS({
|
|
|
71171
71275
|
}
|
|
71172
71276
|
});
|
|
71173
71277
|
|
|
71278
|
+
// ../../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js
|
|
71279
|
+
var require_has_flag = __commonJS({
|
|
71280
|
+
"../../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
|
71281
|
+
"use strict";
|
|
71282
|
+
module2.exports = (flag, argv = process.argv) => {
|
|
71283
|
+
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
71284
|
+
const position = argv.indexOf(prefix + flag);
|
|
71285
|
+
const terminatorPosition = argv.indexOf("--");
|
|
71286
|
+
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
71287
|
+
};
|
|
71288
|
+
}
|
|
71289
|
+
});
|
|
71290
|
+
|
|
71291
|
+
// ../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
71292
|
+
var require_supports_color = __commonJS({
|
|
71293
|
+
"../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module2) {
|
|
71294
|
+
"use strict";
|
|
71295
|
+
var os2 = require("os");
|
|
71296
|
+
var tty = require("tty");
|
|
71297
|
+
var hasFlag = require_has_flag();
|
|
71298
|
+
var { env } = process;
|
|
71299
|
+
var forceColor;
|
|
71300
|
+
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
71301
|
+
forceColor = 0;
|
|
71302
|
+
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
71303
|
+
forceColor = 1;
|
|
71304
|
+
}
|
|
71305
|
+
if ("FORCE_COLOR" in env) {
|
|
71306
|
+
if (env.FORCE_COLOR === "true") {
|
|
71307
|
+
forceColor = 1;
|
|
71308
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
71309
|
+
forceColor = 0;
|
|
71310
|
+
} else {
|
|
71311
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
71312
|
+
}
|
|
71313
|
+
}
|
|
71314
|
+
function translateLevel(level) {
|
|
71315
|
+
if (level === 0) {
|
|
71316
|
+
return false;
|
|
71317
|
+
}
|
|
71318
|
+
return {
|
|
71319
|
+
level,
|
|
71320
|
+
hasBasic: true,
|
|
71321
|
+
has256: level >= 2,
|
|
71322
|
+
has16m: level >= 3
|
|
71323
|
+
};
|
|
71324
|
+
}
|
|
71325
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
71326
|
+
if (forceColor === 0) {
|
|
71327
|
+
return 0;
|
|
71328
|
+
}
|
|
71329
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
71330
|
+
return 3;
|
|
71331
|
+
}
|
|
71332
|
+
if (hasFlag("color=256")) {
|
|
71333
|
+
return 2;
|
|
71334
|
+
}
|
|
71335
|
+
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
71336
|
+
return 0;
|
|
71337
|
+
}
|
|
71338
|
+
const min = forceColor || 0;
|
|
71339
|
+
if (env.TERM === "dumb") {
|
|
71340
|
+
return min;
|
|
71341
|
+
}
|
|
71342
|
+
if (process.platform === "win32") {
|
|
71343
|
+
const osRelease = os2.release().split(".");
|
|
71344
|
+
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
71345
|
+
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
71346
|
+
}
|
|
71347
|
+
return 1;
|
|
71348
|
+
}
|
|
71349
|
+
if ("CI" in env) {
|
|
71350
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
71351
|
+
return 1;
|
|
71352
|
+
}
|
|
71353
|
+
return min;
|
|
71354
|
+
}
|
|
71355
|
+
if ("TEAMCITY_VERSION" in env) {
|
|
71356
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
71357
|
+
}
|
|
71358
|
+
if (env.COLORTERM === "truecolor") {
|
|
71359
|
+
return 3;
|
|
71360
|
+
}
|
|
71361
|
+
if ("TERM_PROGRAM" in env) {
|
|
71362
|
+
const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
71363
|
+
switch (env.TERM_PROGRAM) {
|
|
71364
|
+
case "iTerm.app":
|
|
71365
|
+
return version2 >= 3 ? 3 : 2;
|
|
71366
|
+
case "Apple_Terminal":
|
|
71367
|
+
return 2;
|
|
71368
|
+
}
|
|
71369
|
+
}
|
|
71370
|
+
if (/-256(color)?$/i.test(env.TERM)) {
|
|
71371
|
+
return 2;
|
|
71372
|
+
}
|
|
71373
|
+
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
71374
|
+
return 1;
|
|
71375
|
+
}
|
|
71376
|
+
if ("COLORTERM" in env) {
|
|
71377
|
+
return 1;
|
|
71378
|
+
}
|
|
71379
|
+
return min;
|
|
71380
|
+
}
|
|
71381
|
+
function getSupportLevel(stream) {
|
|
71382
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
71383
|
+
return translateLevel(level);
|
|
71384
|
+
}
|
|
71385
|
+
module2.exports = {
|
|
71386
|
+
supportsColor: getSupportLevel,
|
|
71387
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
71388
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
71389
|
+
};
|
|
71390
|
+
}
|
|
71391
|
+
});
|
|
71392
|
+
|
|
71393
|
+
// ../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
|
|
71394
|
+
var require_node = __commonJS({
|
|
71395
|
+
"../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module2) {
|
|
71396
|
+
var tty = require("tty");
|
|
71397
|
+
var util = require("util");
|
|
71398
|
+
exports.init = init;
|
|
71399
|
+
exports.log = log;
|
|
71400
|
+
exports.formatArgs = formatArgs;
|
|
71401
|
+
exports.save = save;
|
|
71402
|
+
exports.load = load;
|
|
71403
|
+
exports.useColors = useColors;
|
|
71404
|
+
exports.destroy = util.deprecate(
|
|
71405
|
+
() => {
|
|
71406
|
+
},
|
|
71407
|
+
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
|
71408
|
+
);
|
|
71409
|
+
exports.colors = [6, 2, 3, 4, 5, 1];
|
|
71410
|
+
try {
|
|
71411
|
+
const supportsColor = require_supports_color();
|
|
71412
|
+
if (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {
|
|
71413
|
+
exports.colors = [
|
|
71414
|
+
20,
|
|
71415
|
+
21,
|
|
71416
|
+
26,
|
|
71417
|
+
27,
|
|
71418
|
+
32,
|
|
71419
|
+
33,
|
|
71420
|
+
38,
|
|
71421
|
+
39,
|
|
71422
|
+
40,
|
|
71423
|
+
41,
|
|
71424
|
+
42,
|
|
71425
|
+
43,
|
|
71426
|
+
44,
|
|
71427
|
+
45,
|
|
71428
|
+
56,
|
|
71429
|
+
57,
|
|
71430
|
+
62,
|
|
71431
|
+
63,
|
|
71432
|
+
68,
|
|
71433
|
+
69,
|
|
71434
|
+
74,
|
|
71435
|
+
75,
|
|
71436
|
+
76,
|
|
71437
|
+
77,
|
|
71438
|
+
78,
|
|
71439
|
+
79,
|
|
71440
|
+
80,
|
|
71441
|
+
81,
|
|
71442
|
+
92,
|
|
71443
|
+
93,
|
|
71444
|
+
98,
|
|
71445
|
+
99,
|
|
71446
|
+
112,
|
|
71447
|
+
113,
|
|
71448
|
+
128,
|
|
71449
|
+
129,
|
|
71450
|
+
134,
|
|
71451
|
+
135,
|
|
71452
|
+
148,
|
|
71453
|
+
149,
|
|
71454
|
+
160,
|
|
71455
|
+
161,
|
|
71456
|
+
162,
|
|
71457
|
+
163,
|
|
71458
|
+
164,
|
|
71459
|
+
165,
|
|
71460
|
+
166,
|
|
71461
|
+
167,
|
|
71462
|
+
168,
|
|
71463
|
+
169,
|
|
71464
|
+
170,
|
|
71465
|
+
171,
|
|
71466
|
+
172,
|
|
71467
|
+
173,
|
|
71468
|
+
178,
|
|
71469
|
+
179,
|
|
71470
|
+
184,
|
|
71471
|
+
185,
|
|
71472
|
+
196,
|
|
71473
|
+
197,
|
|
71474
|
+
198,
|
|
71475
|
+
199,
|
|
71476
|
+
200,
|
|
71477
|
+
201,
|
|
71478
|
+
202,
|
|
71479
|
+
203,
|
|
71480
|
+
204,
|
|
71481
|
+
205,
|
|
71482
|
+
206,
|
|
71483
|
+
207,
|
|
71484
|
+
208,
|
|
71485
|
+
209,
|
|
71486
|
+
214,
|
|
71487
|
+
215,
|
|
71488
|
+
220,
|
|
71489
|
+
221
|
|
71490
|
+
];
|
|
71491
|
+
}
|
|
71492
|
+
} catch (error) {
|
|
71493
|
+
}
|
|
71494
|
+
exports.inspectOpts = Object.keys(process.env).filter((key) => {
|
|
71495
|
+
return /^debug_/i.test(key);
|
|
71496
|
+
}).reduce((obj, key) => {
|
|
71497
|
+
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
|
|
71498
|
+
return k.toUpperCase();
|
|
71499
|
+
});
|
|
71500
|
+
let val = process.env[key];
|
|
71501
|
+
if (/^(yes|on|true|enabled)$/i.test(val)) {
|
|
71502
|
+
val = true;
|
|
71503
|
+
} else if (/^(no|off|false|disabled)$/i.test(val)) {
|
|
71504
|
+
val = false;
|
|
71505
|
+
} else if (val === "null") {
|
|
71506
|
+
val = null;
|
|
71507
|
+
} else {
|
|
71508
|
+
val = Number(val);
|
|
71509
|
+
}
|
|
71510
|
+
obj[prop] = val;
|
|
71511
|
+
return obj;
|
|
71512
|
+
}, {});
|
|
71513
|
+
function useColors() {
|
|
71514
|
+
return "colors" in exports.inspectOpts ? Boolean(exports.inspectOpts.colors) : tty.isatty(process.stderr.fd);
|
|
71515
|
+
}
|
|
71516
|
+
function formatArgs(args) {
|
|
71517
|
+
const { namespace: name, useColors: useColors2 } = this;
|
|
71518
|
+
if (useColors2) {
|
|
71519
|
+
const c = this.color;
|
|
71520
|
+
const colorCode = "\x1B[3" + (c < 8 ? c : "8;5;" + c);
|
|
71521
|
+
const prefix = ` ${colorCode};1m${name} \x1B[0m`;
|
|
71522
|
+
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
|
71523
|
+
args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
|
|
71524
|
+
} else {
|
|
71525
|
+
args[0] = getDate() + name + " " + args[0];
|
|
71526
|
+
}
|
|
71527
|
+
}
|
|
71528
|
+
function getDate() {
|
|
71529
|
+
if (exports.inspectOpts.hideDate) {
|
|
71530
|
+
return "";
|
|
71531
|
+
}
|
|
71532
|
+
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
|
71533
|
+
}
|
|
71534
|
+
function log(...args) {
|
|
71535
|
+
return process.stderr.write(util.format(...args) + "\n");
|
|
71536
|
+
}
|
|
71537
|
+
function save(namespaces) {
|
|
71538
|
+
if (namespaces) {
|
|
71539
|
+
process.env.DEBUG = namespaces;
|
|
71540
|
+
} else {
|
|
71541
|
+
delete process.env.DEBUG;
|
|
71542
|
+
}
|
|
71543
|
+
}
|
|
71544
|
+
function load() {
|
|
71545
|
+
return process.env.DEBUG;
|
|
71546
|
+
}
|
|
71547
|
+
function init(debug2) {
|
|
71548
|
+
debug2.inspectOpts = {};
|
|
71549
|
+
const keys = Object.keys(exports.inspectOpts);
|
|
71550
|
+
for (let i = 0; i < keys.length; i++) {
|
|
71551
|
+
debug2.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];
|
|
71552
|
+
}
|
|
71553
|
+
}
|
|
71554
|
+
module2.exports = require_common()(exports);
|
|
71555
|
+
var { formatters } = module2.exports;
|
|
71556
|
+
formatters.o = function(v) {
|
|
71557
|
+
this.inspectOpts.colors = this.useColors;
|
|
71558
|
+
return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
71559
|
+
};
|
|
71560
|
+
formatters.O = function(v) {
|
|
71561
|
+
this.inspectOpts.colors = this.useColors;
|
|
71562
|
+
return util.inspect(v, this.inspectOpts);
|
|
71563
|
+
};
|
|
71564
|
+
}
|
|
71565
|
+
});
|
|
71566
|
+
|
|
71567
|
+
// ../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
|
|
71568
|
+
var require_src = __commonJS({
|
|
71569
|
+
"../../../node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports, module2) {
|
|
71570
|
+
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
71571
|
+
module2.exports = require_browser();
|
|
71572
|
+
} else {
|
|
71573
|
+
module2.exports = require_node();
|
|
71574
|
+
}
|
|
71575
|
+
}
|
|
71576
|
+
});
|
|
71577
|
+
|
|
71174
71578
|
// ../../../node_modules/.pnpm/follow-redirects@1.15.1/node_modules/follow-redirects/debug.js
|
|
71175
71579
|
var require_debug5 = __commonJS({
|
|
71176
71580
|
"../../../node_modules/.pnpm/follow-redirects@1.15.1/node_modules/follow-redirects/debug.js"(exports, module2) {
|
|
@@ -71178,7 +71582,7 @@ var require_debug5 = __commonJS({
|
|
|
71178
71582
|
module2.exports = function() {
|
|
71179
71583
|
if (!debug2) {
|
|
71180
71584
|
try {
|
|
71181
|
-
debug2 =
|
|
71585
|
+
debug2 = require_src()("follow-redirects");
|
|
71182
71586
|
} catch (error) {
|
|
71183
71587
|
}
|
|
71184
71588
|
if (typeof debug2 !== "function") {
|
|
@@ -78312,7 +78716,7 @@ var require_codesmith = __commonJS({
|
|
|
78312
78716
|
});
|
|
78313
78717
|
|
|
78314
78718
|
// ../../../node_modules/.pnpm/@modern-js+codesmith@2.0.5/node_modules/@modern-js/codesmith/dist/js/node/index.js
|
|
78315
|
-
var
|
|
78719
|
+
var require_node2 = __commonJS({
|
|
78316
78720
|
"../../../node_modules/.pnpm/@modern-js+codesmith@2.0.5/node_modules/@modern-js/codesmith/dist/js/node/index.js"(exports) {
|
|
78317
78721
|
"use strict";
|
|
78318
78722
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -78418,10 +78822,10 @@ var import_utils5 = __toESM(require_dist());
|
|
|
78418
78822
|
|
|
78419
78823
|
// src/createAction.ts
|
|
78420
78824
|
var import_path2 = __toESM(require("path"));
|
|
78421
|
-
var import_codesmith = __toESM(
|
|
78825
|
+
var import_codesmith = __toESM(require_node2());
|
|
78422
78826
|
|
|
78423
78827
|
// package.json
|
|
78424
|
-
var version = "2.
|
|
78828
|
+
var version = "2.12.0";
|
|
78425
78829
|
|
|
78426
78830
|
// ../../cli/plugin-i18n/dist/esm-node/index.js
|
|
78427
78831
|
var import_lodash2 = __toESM(require_lodash2());
|