@oclif/plugin-test-esbuild 0.5.119 → 0.5.121
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/README.md +1 -1
- package/dist/{chunk-OMNPGPJT.js → chunk-HRNB5OEJ.js} +618 -247
- package/dist/{chunk-GUNNOKO7.js → chunk-JD5FDRED.js} +1 -1
- package/dist/{chunk-ONELJFFE.js → chunk-MD35VLHN.js} +1 -1
- package/dist/{chunk-TQ3XA2OA.js → chunk-TAGCSGUB.js} +1 -1
- package/dist/{chunk-4FIM6MQO.js → chunk-USBUBGDZ.js} +1 -1
- package/dist/commands/esbuild.js +2 -2
- package/dist/commands/hello/index.js +2 -2
- package/dist/commands/hello/world.js +2 -2
- package/dist/hooks/init/init.js +2 -2
- package/dist/index.js +16 -15
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
|
@@ -254,7 +254,7 @@ var require_package = __commonJS({
|
|
|
254
254
|
module.exports = {
|
|
255
255
|
name: "@oclif/core",
|
|
256
256
|
description: "base library for oclif CLIs",
|
|
257
|
-
version: "4.
|
|
257
|
+
version: "4.10.2",
|
|
258
258
|
author: "Salesforce",
|
|
259
259
|
bugs: "https://github.com/oclif/core/issues",
|
|
260
260
|
dependencies: {
|
|
@@ -268,7 +268,7 @@ var require_package = __commonJS({
|
|
|
268
268
|
"indent-string": "^4.0.0",
|
|
269
269
|
"is-wsl": "^2.2.0",
|
|
270
270
|
lilconfig: "^3.1.3",
|
|
271
|
-
minimatch: "^
|
|
271
|
+
minimatch: "^10.2.4",
|
|
272
272
|
semver: "^7.7.3",
|
|
273
273
|
"string-width": "^4.2.3",
|
|
274
274
|
"supports-color": "^8",
|
|
@@ -279,7 +279,7 @@ var require_package = __commonJS({
|
|
|
279
279
|
},
|
|
280
280
|
devDependencies: {
|
|
281
281
|
"@commitlint/config-conventional": "^19",
|
|
282
|
-
"@eslint/compat": "^1.4.
|
|
282
|
+
"@eslint/compat": "^1.4.1",
|
|
283
283
|
"@oclif/plugin-help": "^6",
|
|
284
284
|
"@oclif/plugin-plugins": "^5",
|
|
285
285
|
"@oclif/prettier-config": "^0.2.1",
|
|
@@ -309,9 +309,9 @@ var require_package = __commonJS({
|
|
|
309
309
|
husky: "^9.1.7",
|
|
310
310
|
"lint-staged": "^15",
|
|
311
311
|
madge: "^6.1.0",
|
|
312
|
-
mocha: "^11.7.
|
|
312
|
+
mocha: "^11.7.5",
|
|
313
313
|
nyc: "^15.1.0",
|
|
314
|
-
prettier: "^3.
|
|
314
|
+
prettier: "^3.8.1",
|
|
315
315
|
shx: "^0.4.0",
|
|
316
316
|
sinon: "^18",
|
|
317
317
|
"ts-node": "^10.9.2",
|
|
@@ -216212,8 +216212,10 @@ var require_docopts = __commonJS({
|
|
|
216212
216212
|
toString() {
|
|
216213
216213
|
const opts = ["<%= command.id %>"];
|
|
216214
216214
|
if (this.cmd.args) {
|
|
216215
|
-
const
|
|
216216
|
-
|
|
216215
|
+
const a = Object.values((0, ensure_arg_object_1.ensureArgObject)(this.cmd.args)).filter((arg) => !arg.hidden).map((arg) => {
|
|
216216
|
+
const suffix = arg.multiple ? "..." : this.cmd.strict === false ? "..." : "";
|
|
216217
|
+
return arg.required ? `${arg.name.toUpperCase()}${suffix}` : `[${arg.name.toUpperCase()}${suffix}]`;
|
|
216218
|
+
}) || [];
|
|
216217
216219
|
opts.push(...a);
|
|
216218
216220
|
}
|
|
216219
216221
|
try {
|
|
@@ -216700,7 +216702,8 @@ var require_command = __commonJS({
|
|
|
216700
216702
|
if (args.filter((a) => a.description).length === 0)
|
|
216701
216703
|
return;
|
|
216702
216704
|
return args.map((a) => {
|
|
216703
|
-
|
|
216705
|
+
const suffix = a.multiple ? "..." : this.command.strict === false ? "..." : "";
|
|
216706
|
+
let name = `${a.name.toUpperCase()}${suffix}`;
|
|
216704
216707
|
name = a.required ? `${name}` : `[${name}]`;
|
|
216705
216708
|
let description = a.description || "";
|
|
216706
216709
|
if (a.default)
|
|
@@ -217195,8 +217198,8 @@ var require_help = __commonJS({
|
|
|
217195
217198
|
` : `This command is in ${state}.
|
|
217196
217199
|
`);
|
|
217197
217200
|
}
|
|
217198
|
-
if (command.deprecateAliases && command.aliases.includes(name)) {
|
|
217199
|
-
const actualCmd = this.config.commands.find((c) => c.aliases.includes(name));
|
|
217201
|
+
if (command.deprecateAliases && [...command.aliases ?? [], ...command.hiddenAliases ?? []].includes(name)) {
|
|
217202
|
+
const actualCmd = this.config.commands.find((c) => [...c.aliases ?? [], ...c.hiddenAliases ?? []].includes(name));
|
|
217200
217203
|
const actualCmdName = actualCmd ? (0, ids_1.toConfiguredId)(actualCmd.id, this.config) : "";
|
|
217201
217204
|
const opts = { ...command.deprecationOptions, ...actualCmd ? { to: actualCmdName } : {} };
|
|
217202
217205
|
this.log(`${(0, util_2.formatCommandDeprecationWarning)((0, ids_1.toConfiguredId)(name, this.config), opts)}
|
|
@@ -217727,34 +217730,35 @@ var require_os = __commonJS({
|
|
|
217727
217730
|
}
|
|
217728
217731
|
});
|
|
217729
217732
|
|
|
217730
|
-
// node_modules/balanced-match/index.js
|
|
217731
|
-
var
|
|
217732
|
-
"node_modules/balanced-match/index.js"(exports
|
|
217733
|
+
// node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.js
|
|
217734
|
+
var require_commonjs = __commonJS({
|
|
217735
|
+
"node_modules/@oclif/core/node_modules/balanced-match/dist/commonjs/index.js"(exports) {
|
|
217733
217736
|
"use strict";
|
|
217734
217737
|
init_cjs_shims();
|
|
217735
|
-
|
|
217736
|
-
|
|
217737
|
-
|
|
217738
|
-
|
|
217739
|
-
|
|
217738
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
217739
|
+
exports.range = exports.balanced = void 0;
|
|
217740
|
+
var balanced = (a, b, str) => {
|
|
217741
|
+
const ma = a instanceof RegExp ? maybeMatch(a, str) : a;
|
|
217742
|
+
const mb = b instanceof RegExp ? maybeMatch(b, str) : b;
|
|
217743
|
+
const r = ma !== null && mb != null && (0, exports.range)(ma, mb, str);
|
|
217740
217744
|
return r && {
|
|
217741
217745
|
start: r[0],
|
|
217742
217746
|
end: r[1],
|
|
217743
217747
|
pre: str.slice(0, r[0]),
|
|
217744
|
-
body: str.slice(r[0] +
|
|
217745
|
-
post: str.slice(r[1] +
|
|
217748
|
+
body: str.slice(r[0] + ma.length, r[1]),
|
|
217749
|
+
post: str.slice(r[1] + mb.length)
|
|
217746
217750
|
};
|
|
217747
|
-
}
|
|
217748
|
-
|
|
217749
|
-
|
|
217751
|
+
};
|
|
217752
|
+
exports.balanced = balanced;
|
|
217753
|
+
var maybeMatch = (reg, str) => {
|
|
217754
|
+
const m = str.match(reg);
|
|
217750
217755
|
return m ? m[0] : null;
|
|
217751
|
-
}
|
|
217752
|
-
|
|
217753
|
-
|
|
217754
|
-
|
|
217755
|
-
|
|
217756
|
-
|
|
217757
|
-
var i = ai;
|
|
217756
|
+
};
|
|
217757
|
+
var range = (a, b, str) => {
|
|
217758
|
+
let begs, beg, left, right = void 0, result;
|
|
217759
|
+
let ai = str.indexOf(a);
|
|
217760
|
+
let bi = str.indexOf(b, ai + 1);
|
|
217761
|
+
let i = ai;
|
|
217758
217762
|
if (ai >= 0 && bi > 0) {
|
|
217759
217763
|
if (a === b) {
|
|
217760
217764
|
return [ai, bi];
|
|
@@ -217762,14 +217766,16 @@ var require_balanced_match = __commonJS({
|
|
|
217762
217766
|
begs = [];
|
|
217763
217767
|
left = str.length;
|
|
217764
217768
|
while (i >= 0 && !result) {
|
|
217765
|
-
if (i
|
|
217769
|
+
if (i === ai) {
|
|
217766
217770
|
begs.push(i);
|
|
217767
217771
|
ai = str.indexOf(a, i + 1);
|
|
217768
|
-
} else if (begs.length
|
|
217769
|
-
|
|
217772
|
+
} else if (begs.length === 1) {
|
|
217773
|
+
const r = begs.pop();
|
|
217774
|
+
if (r !== void 0)
|
|
217775
|
+
result = [r, bi];
|
|
217770
217776
|
} else {
|
|
217771
217777
|
beg = begs.pop();
|
|
217772
|
-
if (beg < left) {
|
|
217778
|
+
if (beg !== void 0 && beg < left) {
|
|
217773
217779
|
left = beg;
|
|
217774
217780
|
right = bi;
|
|
217775
217781
|
}
|
|
@@ -217777,62 +217783,80 @@ var require_balanced_match = __commonJS({
|
|
|
217777
217783
|
}
|
|
217778
217784
|
i = ai < bi && ai >= 0 ? ai : bi;
|
|
217779
217785
|
}
|
|
217780
|
-
if (begs.length) {
|
|
217786
|
+
if (begs.length && right !== void 0) {
|
|
217781
217787
|
result = [left, right];
|
|
217782
217788
|
}
|
|
217783
217789
|
}
|
|
217784
217790
|
return result;
|
|
217785
|
-
}
|
|
217791
|
+
};
|
|
217792
|
+
exports.range = range;
|
|
217786
217793
|
}
|
|
217787
217794
|
});
|
|
217788
217795
|
|
|
217789
|
-
// node_modules/brace-expansion/index.js
|
|
217790
|
-
var
|
|
217791
|
-
"node_modules/brace-expansion/index.js"(exports
|
|
217796
|
+
// node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.js
|
|
217797
|
+
var require_commonjs2 = __commonJS({
|
|
217798
|
+
"node_modules/@oclif/core/node_modules/brace-expansion/dist/commonjs/index.js"(exports) {
|
|
217799
|
+
"use strict";
|
|
217792
217800
|
init_cjs_shims();
|
|
217793
|
-
|
|
217794
|
-
|
|
217801
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
217802
|
+
exports.EXPANSION_MAX = void 0;
|
|
217803
|
+
exports.expand = expand;
|
|
217804
|
+
var balanced_match_1 = require_commonjs();
|
|
217795
217805
|
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
217796
217806
|
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
217797
217807
|
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
217798
217808
|
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
217799
217809
|
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
217810
|
+
var escSlashPattern = new RegExp(escSlash, "g");
|
|
217811
|
+
var escOpenPattern = new RegExp(escOpen, "g");
|
|
217812
|
+
var escClosePattern = new RegExp(escClose, "g");
|
|
217813
|
+
var escCommaPattern = new RegExp(escComma, "g");
|
|
217814
|
+
var escPeriodPattern = new RegExp(escPeriod, "g");
|
|
217815
|
+
var slashPattern = /\\\\/g;
|
|
217816
|
+
var openPattern = /\\{/g;
|
|
217817
|
+
var closePattern = /\\}/g;
|
|
217818
|
+
var commaPattern = /\\,/g;
|
|
217819
|
+
var periodPattern = /\\\./g;
|
|
217820
|
+
exports.EXPANSION_MAX = 1e5;
|
|
217800
217821
|
function numeric(str) {
|
|
217801
|
-
return
|
|
217822
|
+
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
217802
217823
|
}
|
|
217803
217824
|
function escapeBraces(str) {
|
|
217804
|
-
return str.
|
|
217825
|
+
return str.replace(slashPattern, escSlash).replace(openPattern, escOpen).replace(closePattern, escClose).replace(commaPattern, escComma).replace(periodPattern, escPeriod);
|
|
217805
217826
|
}
|
|
217806
217827
|
function unescapeBraces(str) {
|
|
217807
|
-
return str.
|
|
217828
|
+
return str.replace(escSlashPattern, "\\").replace(escOpenPattern, "{").replace(escClosePattern, "}").replace(escCommaPattern, ",").replace(escPeriodPattern, ".");
|
|
217808
217829
|
}
|
|
217809
217830
|
function parseCommaParts(str) {
|
|
217810
|
-
if (!str)
|
|
217831
|
+
if (!str) {
|
|
217811
217832
|
return [""];
|
|
217812
|
-
|
|
217813
|
-
|
|
217814
|
-
|
|
217833
|
+
}
|
|
217834
|
+
const parts = [];
|
|
217835
|
+
const m = (0, balanced_match_1.balanced)("{", "}", str);
|
|
217836
|
+
if (!m) {
|
|
217815
217837
|
return str.split(",");
|
|
217816
|
-
|
|
217817
|
-
|
|
217818
|
-
|
|
217819
|
-
var p = pre.split(",");
|
|
217838
|
+
}
|
|
217839
|
+
const { pre, body, post } = m;
|
|
217840
|
+
const p = pre.split(",");
|
|
217820
217841
|
p[p.length - 1] += "{" + body + "}";
|
|
217821
|
-
|
|
217842
|
+
const postParts = parseCommaParts(post);
|
|
217822
217843
|
if (post.length) {
|
|
217844
|
+
;
|
|
217823
217845
|
p[p.length - 1] += postParts.shift();
|
|
217824
217846
|
p.push.apply(p, postParts);
|
|
217825
217847
|
}
|
|
217826
217848
|
parts.push.apply(parts, p);
|
|
217827
217849
|
return parts;
|
|
217828
217850
|
}
|
|
217829
|
-
function
|
|
217830
|
-
if (!str)
|
|
217851
|
+
function expand(str, options = {}) {
|
|
217852
|
+
if (!str) {
|
|
217831
217853
|
return [];
|
|
217832
|
-
if (str.substr(0, 2) === "{}") {
|
|
217833
|
-
str = "\\{\\}" + str.substr(2);
|
|
217834
217854
|
}
|
|
217835
|
-
|
|
217855
|
+
const { max = exports.EXPANSION_MAX } = options;
|
|
217856
|
+
if (str.slice(0, 2) === "{}") {
|
|
217857
|
+
str = "\\{\\}" + str.slice(2);
|
|
217858
|
+
}
|
|
217859
|
+
return expand_(escapeBraces(str), max, true).map(unescapeBraces);
|
|
217836
217860
|
}
|
|
217837
217861
|
function embrace(str) {
|
|
217838
217862
|
return "{" + str + "}";
|
|
@@ -217846,73 +217870,74 @@ var require_brace_expansion = __commonJS({
|
|
|
217846
217870
|
function gte(i, y) {
|
|
217847
217871
|
return i >= y;
|
|
217848
217872
|
}
|
|
217849
|
-
function
|
|
217850
|
-
|
|
217851
|
-
|
|
217852
|
-
if (!m)
|
|
217853
|
-
|
|
217854
|
-
|
|
217873
|
+
function expand_(str, max, isTop) {
|
|
217874
|
+
const expansions = [];
|
|
217875
|
+
const m = (0, balanced_match_1.balanced)("{", "}", str);
|
|
217876
|
+
if (!m)
|
|
217877
|
+
return [str];
|
|
217878
|
+
const pre = m.pre;
|
|
217879
|
+
const post = m.post.length ? expand_(m.post, max, false) : [""];
|
|
217855
217880
|
if (/\$$/.test(m.pre)) {
|
|
217856
|
-
for (
|
|
217857
|
-
|
|
217881
|
+
for (let k = 0; k < post.length && k < max; k++) {
|
|
217882
|
+
const expansion = pre + "{" + m.body + "}" + post[k];
|
|
217858
217883
|
expansions.push(expansion);
|
|
217859
217884
|
}
|
|
217860
217885
|
} else {
|
|
217861
|
-
|
|
217862
|
-
|
|
217863
|
-
|
|
217864
|
-
|
|
217886
|
+
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
217887
|
+
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
217888
|
+
const isSequence = isNumericSequence || isAlphaSequence;
|
|
217889
|
+
const isOptions = m.body.indexOf(",") >= 0;
|
|
217865
217890
|
if (!isSequence && !isOptions) {
|
|
217866
|
-
if (m.post.match(
|
|
217891
|
+
if (m.post.match(/,(?!,).*\}/)) {
|
|
217867
217892
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
217868
|
-
return
|
|
217893
|
+
return expand_(str, max, true);
|
|
217869
217894
|
}
|
|
217870
217895
|
return [str];
|
|
217871
217896
|
}
|
|
217872
|
-
|
|
217897
|
+
let n;
|
|
217873
217898
|
if (isSequence) {
|
|
217874
217899
|
n = m.body.split(/\.\./);
|
|
217875
217900
|
} else {
|
|
217876
217901
|
n = parseCommaParts(m.body);
|
|
217877
|
-
if (n.length === 1) {
|
|
217878
|
-
n =
|
|
217902
|
+
if (n.length === 1 && n[0] !== void 0) {
|
|
217903
|
+
n = expand_(n[0], max, false).map(embrace);
|
|
217879
217904
|
if (n.length === 1) {
|
|
217880
|
-
return post.map(
|
|
217881
|
-
return m.pre + n[0] + p;
|
|
217882
|
-
});
|
|
217905
|
+
return post.map((p) => m.pre + n[0] + p);
|
|
217883
217906
|
}
|
|
217884
217907
|
}
|
|
217885
217908
|
}
|
|
217886
|
-
|
|
217887
|
-
if (isSequence) {
|
|
217888
|
-
|
|
217889
|
-
|
|
217890
|
-
|
|
217891
|
-
|
|
217892
|
-
|
|
217893
|
-
|
|
217909
|
+
let N;
|
|
217910
|
+
if (isSequence && n[0] !== void 0 && n[1] !== void 0) {
|
|
217911
|
+
const x = numeric(n[0]);
|
|
217912
|
+
const y = numeric(n[1]);
|
|
217913
|
+
const width = Math.max(n[0].length, n[1].length);
|
|
217914
|
+
let incr = n.length === 3 && n[2] !== void 0 ? Math.abs(numeric(n[2])) : 1;
|
|
217915
|
+
let test = lte;
|
|
217916
|
+
const reverse = y < x;
|
|
217894
217917
|
if (reverse) {
|
|
217895
217918
|
incr *= -1;
|
|
217896
217919
|
test = gte;
|
|
217897
217920
|
}
|
|
217898
|
-
|
|
217921
|
+
const pad = n.some(isPadded);
|
|
217899
217922
|
N = [];
|
|
217900
|
-
for (
|
|
217901
|
-
|
|
217923
|
+
for (let i = x; test(i, y); i += incr) {
|
|
217924
|
+
let c;
|
|
217902
217925
|
if (isAlphaSequence) {
|
|
217903
217926
|
c = String.fromCharCode(i);
|
|
217904
|
-
if (c === "\\")
|
|
217927
|
+
if (c === "\\") {
|
|
217905
217928
|
c = "";
|
|
217929
|
+
}
|
|
217906
217930
|
} else {
|
|
217907
217931
|
c = String(i);
|
|
217908
217932
|
if (pad) {
|
|
217909
|
-
|
|
217933
|
+
const need = width - c.length;
|
|
217910
217934
|
if (need > 0) {
|
|
217911
|
-
|
|
217912
|
-
if (i < 0)
|
|
217935
|
+
const z = new Array(need + 1).join("0");
|
|
217936
|
+
if (i < 0) {
|
|
217913
217937
|
c = "-" + z + c.slice(1);
|
|
217914
|
-
else
|
|
217938
|
+
} else {
|
|
217915
217939
|
c = z + c;
|
|
217940
|
+
}
|
|
217916
217941
|
}
|
|
217917
217942
|
}
|
|
217918
217943
|
}
|
|
@@ -217920,15 +217945,16 @@ var require_brace_expansion = __commonJS({
|
|
|
217920
217945
|
}
|
|
217921
217946
|
} else {
|
|
217922
217947
|
N = [];
|
|
217923
|
-
for (
|
|
217924
|
-
N.push.apply(N,
|
|
217948
|
+
for (let j = 0; j < n.length; j++) {
|
|
217949
|
+
N.push.apply(N, expand_(n[j], max, false));
|
|
217925
217950
|
}
|
|
217926
217951
|
}
|
|
217927
|
-
for (
|
|
217928
|
-
for (
|
|
217929
|
-
|
|
217930
|
-
if (!isTop || isSequence || expansion)
|
|
217952
|
+
for (let j = 0; j < N.length; j++) {
|
|
217953
|
+
for (let k = 0; k < post.length && expansions.length < max; k++) {
|
|
217954
|
+
const expansion = pre + N[j] + post[k];
|
|
217955
|
+
if (!isTop || isSequence || expansion) {
|
|
217931
217956
|
expansions.push(expansion);
|
|
217957
|
+
}
|
|
217932
217958
|
}
|
|
217933
217959
|
}
|
|
217934
217960
|
}
|
|
@@ -217937,9 +217963,9 @@ var require_brace_expansion = __commonJS({
|
|
|
217937
217963
|
}
|
|
217938
217964
|
});
|
|
217939
217965
|
|
|
217940
|
-
// node_modules/minimatch/dist/commonjs/assert-valid-pattern.js
|
|
217966
|
+
// node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js
|
|
217941
217967
|
var require_assert_valid_pattern = __commonJS({
|
|
217942
|
-
"node_modules/minimatch/dist/commonjs/assert-valid-pattern.js"(exports) {
|
|
217968
|
+
"node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js"(exports) {
|
|
217943
217969
|
"use strict";
|
|
217944
217970
|
init_cjs_shims();
|
|
217945
217971
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -217957,9 +217983,9 @@ var require_assert_valid_pattern = __commonJS({
|
|
|
217957
217983
|
}
|
|
217958
217984
|
});
|
|
217959
217985
|
|
|
217960
|
-
// node_modules/minimatch/dist/commonjs/brace-expressions.js
|
|
217986
|
+
// node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.js
|
|
217961
217987
|
var require_brace_expressions = __commonJS({
|
|
217962
|
-
"node_modules/minimatch/dist/commonjs/brace-expressions.js"(exports) {
|
|
217988
|
+
"node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/brace-expressions.js"(exports) {
|
|
217963
217989
|
"use strict";
|
|
217964
217990
|
init_cjs_shims();
|
|
217965
217991
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -218075,31 +218101,82 @@ var require_brace_expressions = __commonJS({
|
|
|
218075
218101
|
}
|
|
218076
218102
|
});
|
|
218077
218103
|
|
|
218078
|
-
// node_modules/minimatch/dist/commonjs/unescape.js
|
|
218104
|
+
// node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.js
|
|
218079
218105
|
var require_unescape = __commonJS({
|
|
218080
|
-
"node_modules/minimatch/dist/commonjs/unescape.js"(exports) {
|
|
218106
|
+
"node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/unescape.js"(exports) {
|
|
218081
218107
|
"use strict";
|
|
218082
218108
|
init_cjs_shims();
|
|
218083
218109
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
218084
218110
|
exports.unescape = void 0;
|
|
218085
|
-
var unescape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
218086
|
-
|
|
218111
|
+
var unescape = (s, { windowsPathsNoEscape = false, magicalBraces = true } = {}) => {
|
|
218112
|
+
if (magicalBraces) {
|
|
218113
|
+
return windowsPathsNoEscape ? s.replace(/\[([^\/\\])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
218114
|
+
}
|
|
218115
|
+
return windowsPathsNoEscape ? s.replace(/\[([^\/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
|
|
218087
218116
|
};
|
|
218088
218117
|
exports.unescape = unescape;
|
|
218089
218118
|
}
|
|
218090
218119
|
});
|
|
218091
218120
|
|
|
218092
|
-
// node_modules/minimatch/dist/commonjs/ast.js
|
|
218121
|
+
// node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.js
|
|
218093
218122
|
var require_ast = __commonJS({
|
|
218094
|
-
"node_modules/minimatch/dist/commonjs/ast.js"(exports) {
|
|
218123
|
+
"node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/ast.js"(exports) {
|
|
218095
218124
|
"use strict";
|
|
218096
218125
|
init_cjs_shims();
|
|
218126
|
+
var _a;
|
|
218097
218127
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
218098
218128
|
exports.AST = void 0;
|
|
218099
218129
|
var brace_expressions_js_1 = require_brace_expressions();
|
|
218100
218130
|
var unescape_js_1 = require_unescape();
|
|
218101
218131
|
var types = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
218102
218132
|
var isExtglobType = (c) => types.has(c);
|
|
218133
|
+
var isExtglobAST = (c) => isExtglobType(c.type);
|
|
218134
|
+
var adoptionMap = /* @__PURE__ */ new Map([
|
|
218135
|
+
["!", ["@"]],
|
|
218136
|
+
["?", ["?", "@"]],
|
|
218137
|
+
["@", ["@"]],
|
|
218138
|
+
["*", ["*", "+", "?", "@"]],
|
|
218139
|
+
["+", ["+", "@"]]
|
|
218140
|
+
]);
|
|
218141
|
+
var adoptionWithSpaceMap = /* @__PURE__ */ new Map([
|
|
218142
|
+
["!", ["?"]],
|
|
218143
|
+
["@", ["?"]],
|
|
218144
|
+
["+", ["?", "*"]]
|
|
218145
|
+
]);
|
|
218146
|
+
var adoptionAnyMap = /* @__PURE__ */ new Map([
|
|
218147
|
+
["!", ["?", "@"]],
|
|
218148
|
+
["?", ["?", "@"]],
|
|
218149
|
+
["@", ["?", "@"]],
|
|
218150
|
+
["*", ["*", "+", "?", "@"]],
|
|
218151
|
+
["+", ["+", "@", "?", "*"]]
|
|
218152
|
+
]);
|
|
218153
|
+
var usurpMap = /* @__PURE__ */ new Map([
|
|
218154
|
+
["!", /* @__PURE__ */ new Map([["!", "@"]])],
|
|
218155
|
+
[
|
|
218156
|
+
"?",
|
|
218157
|
+
/* @__PURE__ */ new Map([
|
|
218158
|
+
["*", "*"],
|
|
218159
|
+
["+", "*"]
|
|
218160
|
+
])
|
|
218161
|
+
],
|
|
218162
|
+
[
|
|
218163
|
+
"@",
|
|
218164
|
+
/* @__PURE__ */ new Map([
|
|
218165
|
+
["!", "!"],
|
|
218166
|
+
["?", "?"],
|
|
218167
|
+
["@", "@"],
|
|
218168
|
+
["*", "*"],
|
|
218169
|
+
["+", "+"]
|
|
218170
|
+
])
|
|
218171
|
+
],
|
|
218172
|
+
[
|
|
218173
|
+
"+",
|
|
218174
|
+
/* @__PURE__ */ new Map([
|
|
218175
|
+
["?", "*"],
|
|
218176
|
+
["*", "*"]
|
|
218177
|
+
])
|
|
218178
|
+
]
|
|
218179
|
+
]);
|
|
218103
218180
|
var startNoTraversal = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
218104
218181
|
var startNoDot = "(?!\\.)";
|
|
218105
218182
|
var addPatternStart = /* @__PURE__ */ new Set(["[", "."]);
|
|
@@ -218109,7 +218186,8 @@ var require_ast = __commonJS({
|
|
|
218109
218186
|
var qmark = "[^/]";
|
|
218110
218187
|
var star = qmark + "*?";
|
|
218111
218188
|
var starNoEmpty = qmark + "+?";
|
|
218112
|
-
var
|
|
218189
|
+
var ID = 0;
|
|
218190
|
+
var AST = class {
|
|
218113
218191
|
type;
|
|
218114
218192
|
#root;
|
|
218115
218193
|
#hasMagic;
|
|
@@ -218124,6 +218202,22 @@ var require_ast = __commonJS({
|
|
|
218124
218202
|
// set to true if it's an extglob with no children
|
|
218125
218203
|
// (which really means one child of '')
|
|
218126
218204
|
#emptyExt = false;
|
|
218205
|
+
id = ++ID;
|
|
218206
|
+
get depth() {
|
|
218207
|
+
return (this.#parent?.depth ?? -1) + 1;
|
|
218208
|
+
}
|
|
218209
|
+
[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")]() {
|
|
218210
|
+
return {
|
|
218211
|
+
"@@type": "AST",
|
|
218212
|
+
id: this.id,
|
|
218213
|
+
type: this.type,
|
|
218214
|
+
root: this.#root.id,
|
|
218215
|
+
parent: this.#parent?.id,
|
|
218216
|
+
depth: this.depth,
|
|
218217
|
+
partsLength: this.#parts.length,
|
|
218218
|
+
parts: this.#parts
|
|
218219
|
+
};
|
|
218220
|
+
}
|
|
218127
218221
|
constructor(type, parent, options = {}) {
|
|
218128
218222
|
this.type = type;
|
|
218129
218223
|
if (type)
|
|
@@ -218189,7 +218283,7 @@ var require_ast = __commonJS({
|
|
|
218189
218283
|
for (const p of parts) {
|
|
218190
218284
|
if (p === "")
|
|
218191
218285
|
continue;
|
|
218192
|
-
if (typeof p !== "string" && !(p instanceof
|
|
218286
|
+
if (typeof p !== "string" && !(p instanceof _a && p.#parent === this)) {
|
|
218193
218287
|
throw new Error("invalid part: " + p);
|
|
218194
218288
|
}
|
|
218195
218289
|
this.#parts.push(p);
|
|
@@ -218214,7 +218308,7 @@ var require_ast = __commonJS({
|
|
|
218214
218308
|
const p = this.#parent;
|
|
218215
218309
|
for (let i = 0; i < this.#parentIndex; i++) {
|
|
218216
218310
|
const pp = p.#parts[i];
|
|
218217
|
-
if (!(pp instanceof
|
|
218311
|
+
if (!(pp instanceof _a && pp.type === "!")) {
|
|
218218
218312
|
return false;
|
|
218219
218313
|
}
|
|
218220
218314
|
}
|
|
@@ -218239,13 +218333,14 @@ var require_ast = __commonJS({
|
|
|
218239
218333
|
this.push(part.clone(this));
|
|
218240
218334
|
}
|
|
218241
218335
|
clone(parent) {
|
|
218242
|
-
const c = new
|
|
218336
|
+
const c = new _a(this.type, parent);
|
|
218243
218337
|
for (const p of this.#parts) {
|
|
218244
218338
|
c.copyIn(p);
|
|
218245
218339
|
}
|
|
218246
218340
|
return c;
|
|
218247
218341
|
}
|
|
218248
|
-
static #parseAST(str, ast, pos, opt) {
|
|
218342
|
+
static #parseAST(str, ast, pos, opt, extDepth) {
|
|
218343
|
+
const maxDepth = opt.maxExtglobRecursion ?? 2;
|
|
218249
218344
|
let escaping = false;
|
|
218250
218345
|
let inBrace = false;
|
|
218251
218346
|
let braceStart = -1;
|
|
@@ -218277,11 +218372,12 @@ var require_ast = __commonJS({
|
|
|
218277
218372
|
acc2 += c;
|
|
218278
218373
|
continue;
|
|
218279
218374
|
}
|
|
218280
|
-
|
|
218375
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i2) === "(" && extDepth <= maxDepth;
|
|
218376
|
+
if (doRecurse) {
|
|
218281
218377
|
ast.push(acc2);
|
|
218282
218378
|
acc2 = "";
|
|
218283
|
-
const ext = new
|
|
218284
|
-
i2 =
|
|
218379
|
+
const ext = new _a(c, ast);
|
|
218380
|
+
i2 = _a.#parseAST(str, ext, i2, opt, extDepth + 1);
|
|
218285
218381
|
ast.push(ext);
|
|
218286
218382
|
continue;
|
|
218287
218383
|
}
|
|
@@ -218291,7 +218387,7 @@ var require_ast = __commonJS({
|
|
|
218291
218387
|
return i2;
|
|
218292
218388
|
}
|
|
218293
218389
|
let i = pos + 1;
|
|
218294
|
-
let part = new
|
|
218390
|
+
let part = new _a(null, ast);
|
|
218295
218391
|
const parts = [];
|
|
218296
218392
|
let acc = "";
|
|
218297
218393
|
while (i < str.length) {
|
|
@@ -218318,19 +218414,22 @@ var require_ast = __commonJS({
|
|
|
218318
218414
|
acc += c;
|
|
218319
218415
|
continue;
|
|
218320
218416
|
}
|
|
218321
|
-
|
|
218417
|
+
const doRecurse = !opt.noext && isExtglobType(c) && str.charAt(i) === "(" && /* c8 ignore start - the maxDepth is sufficient here */
|
|
218418
|
+
(extDepth <= maxDepth || ast && ast.#canAdoptType(c));
|
|
218419
|
+
if (doRecurse) {
|
|
218420
|
+
const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
|
|
218322
218421
|
part.push(acc);
|
|
218323
218422
|
acc = "";
|
|
218324
|
-
const ext = new
|
|
218423
|
+
const ext = new _a(c, part);
|
|
218325
218424
|
part.push(ext);
|
|
218326
|
-
i =
|
|
218425
|
+
i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd);
|
|
218327
218426
|
continue;
|
|
218328
218427
|
}
|
|
218329
218428
|
if (c === "|") {
|
|
218330
218429
|
part.push(acc);
|
|
218331
218430
|
acc = "";
|
|
218332
218431
|
parts.push(part);
|
|
218333
|
-
part = new
|
|
218432
|
+
part = new _a(null, ast);
|
|
218334
218433
|
continue;
|
|
218335
218434
|
}
|
|
218336
218435
|
if (c === ")") {
|
|
@@ -218349,9 +218448,71 @@ var require_ast = __commonJS({
|
|
|
218349
218448
|
ast.#parts = [str.substring(pos - 1)];
|
|
218350
218449
|
return i;
|
|
218351
218450
|
}
|
|
218451
|
+
#canAdoptWithSpace(child) {
|
|
218452
|
+
return this.#canAdopt(child, adoptionWithSpaceMap);
|
|
218453
|
+
}
|
|
218454
|
+
#canAdopt(child, map = adoptionMap) {
|
|
218455
|
+
if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null) {
|
|
218456
|
+
return false;
|
|
218457
|
+
}
|
|
218458
|
+
const gc = child.#parts[0];
|
|
218459
|
+
if (!gc || typeof gc !== "object" || gc.type === null) {
|
|
218460
|
+
return false;
|
|
218461
|
+
}
|
|
218462
|
+
return this.#canAdoptType(gc.type, map);
|
|
218463
|
+
}
|
|
218464
|
+
#canAdoptType(c, map = adoptionAnyMap) {
|
|
218465
|
+
return !!map.get(this.type)?.includes(c);
|
|
218466
|
+
}
|
|
218467
|
+
#adoptWithSpace(child, index) {
|
|
218468
|
+
const gc = child.#parts[0];
|
|
218469
|
+
const blank = new _a(null, gc, this.options);
|
|
218470
|
+
blank.#parts.push("");
|
|
218471
|
+
gc.push(blank);
|
|
218472
|
+
this.#adopt(child, index);
|
|
218473
|
+
}
|
|
218474
|
+
#adopt(child, index) {
|
|
218475
|
+
const gc = child.#parts[0];
|
|
218476
|
+
this.#parts.splice(index, 1, ...gc.#parts);
|
|
218477
|
+
for (const p of gc.#parts) {
|
|
218478
|
+
if (typeof p === "object")
|
|
218479
|
+
p.#parent = this;
|
|
218480
|
+
}
|
|
218481
|
+
this.#toString = void 0;
|
|
218482
|
+
}
|
|
218483
|
+
#canUsurpType(c) {
|
|
218484
|
+
const m = usurpMap.get(this.type);
|
|
218485
|
+
return !!m?.has(c);
|
|
218486
|
+
}
|
|
218487
|
+
#canUsurp(child) {
|
|
218488
|
+
if (!child || typeof child !== "object" || child.type !== null || child.#parts.length !== 1 || this.type === null || this.#parts.length !== 1) {
|
|
218489
|
+
return false;
|
|
218490
|
+
}
|
|
218491
|
+
const gc = child.#parts[0];
|
|
218492
|
+
if (!gc || typeof gc !== "object" || gc.type === null) {
|
|
218493
|
+
return false;
|
|
218494
|
+
}
|
|
218495
|
+
return this.#canUsurpType(gc.type);
|
|
218496
|
+
}
|
|
218497
|
+
#usurp(child) {
|
|
218498
|
+
const m = usurpMap.get(this.type);
|
|
218499
|
+
const gc = child.#parts[0];
|
|
218500
|
+
const nt = m?.get(gc.type);
|
|
218501
|
+
if (!nt)
|
|
218502
|
+
return false;
|
|
218503
|
+
this.#parts = gc.#parts;
|
|
218504
|
+
for (const p of this.#parts) {
|
|
218505
|
+
if (typeof p === "object") {
|
|
218506
|
+
p.#parent = this;
|
|
218507
|
+
}
|
|
218508
|
+
}
|
|
218509
|
+
this.type = nt;
|
|
218510
|
+
this.#toString = void 0;
|
|
218511
|
+
this.#emptyExt = false;
|
|
218512
|
+
}
|
|
218352
218513
|
static fromGlob(pattern, options = {}) {
|
|
218353
|
-
const ast = new
|
|
218354
|
-
|
|
218514
|
+
const ast = new _a(null, void 0, options);
|
|
218515
|
+
_a.#parseAST(pattern, ast, 0, options, 0);
|
|
218355
218516
|
return ast;
|
|
218356
218517
|
}
|
|
218357
218518
|
// returns the regular expression if there's magic, or the unescaped
|
|
@@ -218445,12 +218606,14 @@ var require_ast = __commonJS({
|
|
|
218445
218606
|
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
218446
218607
|
toRegExpSource(allowDot) {
|
|
218447
218608
|
const dot = allowDot ?? !!this.#options.dot;
|
|
218448
|
-
if (this.#root === this)
|
|
218609
|
+
if (this.#root === this) {
|
|
218610
|
+
this.#flatten();
|
|
218449
218611
|
this.#fillNegs();
|
|
218450
|
-
|
|
218451
|
-
|
|
218612
|
+
}
|
|
218613
|
+
if (!isExtglobAST(this)) {
|
|
218614
|
+
const noEmpty = this.isStart() && this.isEnd() && !this.#parts.some((s) => typeof s !== "string");
|
|
218452
218615
|
const src = this.#parts.map((p) => {
|
|
218453
|
-
const [re, _, hasMagic, uflag] = typeof p === "string" ?
|
|
218616
|
+
const [re, _, hasMagic, uflag] = typeof p === "string" ? _a.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot);
|
|
218454
218617
|
this.#hasMagic = this.#hasMagic || hasMagic;
|
|
218455
218618
|
this.#uflag = this.#uflag || uflag;
|
|
218456
218619
|
return re;
|
|
@@ -218489,9 +218652,10 @@ var require_ast = __commonJS({
|
|
|
218489
218652
|
let body = this.#partsToRegExp(dot);
|
|
218490
218653
|
if (this.isStart() && this.isEnd() && !body && this.type !== "!") {
|
|
218491
218654
|
const s = this.toString();
|
|
218492
|
-
|
|
218493
|
-
|
|
218494
|
-
|
|
218655
|
+
const me = this;
|
|
218656
|
+
me.#parts = [s];
|
|
218657
|
+
me.type = null;
|
|
218658
|
+
me.#hasMagic = void 0;
|
|
218495
218659
|
return [s, (0, unescape_js_1.unescape)(this.toString()), false, false];
|
|
218496
218660
|
}
|
|
218497
218661
|
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true);
|
|
@@ -218518,6 +218682,38 @@ var require_ast = __commonJS({
|
|
|
218518
218682
|
this.#uflag
|
|
218519
218683
|
];
|
|
218520
218684
|
}
|
|
218685
|
+
#flatten() {
|
|
218686
|
+
if (!isExtglobAST(this)) {
|
|
218687
|
+
for (const p of this.#parts) {
|
|
218688
|
+
if (typeof p === "object") {
|
|
218689
|
+
p.#flatten();
|
|
218690
|
+
}
|
|
218691
|
+
}
|
|
218692
|
+
} else {
|
|
218693
|
+
let iterations = 0;
|
|
218694
|
+
let done = false;
|
|
218695
|
+
do {
|
|
218696
|
+
done = true;
|
|
218697
|
+
for (let i = 0; i < this.#parts.length; i++) {
|
|
218698
|
+
const c = this.#parts[i];
|
|
218699
|
+
if (typeof c === "object") {
|
|
218700
|
+
c.#flatten();
|
|
218701
|
+
if (this.#canAdopt(c)) {
|
|
218702
|
+
done = false;
|
|
218703
|
+
this.#adopt(c, i);
|
|
218704
|
+
} else if (this.#canAdoptWithSpace(c)) {
|
|
218705
|
+
done = false;
|
|
218706
|
+
this.#adoptWithSpace(c, i);
|
|
218707
|
+
} else if (this.#canUsurp(c)) {
|
|
218708
|
+
done = false;
|
|
218709
|
+
this.#usurp(c);
|
|
218710
|
+
}
|
|
218711
|
+
}
|
|
218712
|
+
}
|
|
218713
|
+
} while (!done && ++iterations < 10);
|
|
218714
|
+
}
|
|
218715
|
+
this.#toString = void 0;
|
|
218716
|
+
}
|
|
218521
218717
|
#partsToRegExp(dot) {
|
|
218522
218718
|
return this.#parts.map((p) => {
|
|
218523
218719
|
if (typeof p === "string") {
|
|
@@ -218532,6 +218728,7 @@ var require_ast = __commonJS({
|
|
|
218532
218728
|
let escaping = false;
|
|
218533
218729
|
let re = "";
|
|
218534
218730
|
let uflag = false;
|
|
218731
|
+
let inStar = false;
|
|
218535
218732
|
for (let i = 0; i < glob.length; i++) {
|
|
218536
218733
|
const c = glob.charAt(i);
|
|
218537
218734
|
if (escaping) {
|
|
@@ -218539,6 +218736,16 @@ var require_ast = __commonJS({
|
|
|
218539
218736
|
re += (reSpecials.has(c) ? "\\" : "") + c;
|
|
218540
218737
|
continue;
|
|
218541
218738
|
}
|
|
218739
|
+
if (c === "*") {
|
|
218740
|
+
if (inStar)
|
|
218741
|
+
continue;
|
|
218742
|
+
inStar = true;
|
|
218743
|
+
re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
|
|
218744
|
+
hasMagic = true;
|
|
218745
|
+
continue;
|
|
218746
|
+
} else {
|
|
218747
|
+
inStar = false;
|
|
218748
|
+
}
|
|
218542
218749
|
if (c === "\\") {
|
|
218543
218750
|
if (i === glob.length - 1) {
|
|
218544
218751
|
re += "\\\\";
|
|
@@ -218557,14 +218764,6 @@ var require_ast = __commonJS({
|
|
|
218557
218764
|
continue;
|
|
218558
218765
|
}
|
|
218559
218766
|
}
|
|
218560
|
-
if (c === "*") {
|
|
218561
|
-
if (noEmpty && glob === "*")
|
|
218562
|
-
re += starNoEmpty;
|
|
218563
|
-
else
|
|
218564
|
-
re += star;
|
|
218565
|
-
hasMagic = true;
|
|
218566
|
-
continue;
|
|
218567
|
-
}
|
|
218568
218767
|
if (c === "?") {
|
|
218569
218768
|
re += qmark;
|
|
218570
218769
|
hasMagic = true;
|
|
@@ -218576,34 +218775,35 @@ var require_ast = __commonJS({
|
|
|
218576
218775
|
}
|
|
218577
218776
|
};
|
|
218578
218777
|
exports.AST = AST;
|
|
218778
|
+
_a = AST;
|
|
218579
218779
|
}
|
|
218580
218780
|
});
|
|
218581
218781
|
|
|
218582
|
-
// node_modules/minimatch/dist/commonjs/escape.js
|
|
218782
|
+
// node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.js
|
|
218583
218783
|
var require_escape = __commonJS({
|
|
218584
|
-
"node_modules/minimatch/dist/commonjs/escape.js"(exports) {
|
|
218784
|
+
"node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/escape.js"(exports) {
|
|
218585
218785
|
"use strict";
|
|
218586
218786
|
init_cjs_shims();
|
|
218587
218787
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
218588
218788
|
exports.escape = void 0;
|
|
218589
|
-
var escape = (s, { windowsPathsNoEscape = false } = {}) => {
|
|
218789
|
+
var escape = (s, { windowsPathsNoEscape = false, magicalBraces = false } = {}) => {
|
|
218790
|
+
if (magicalBraces) {
|
|
218791
|
+
return windowsPathsNoEscape ? s.replace(/[?*()[\]{}]/g, "[$&]") : s.replace(/[?*()[\]\\{}]/g, "\\$&");
|
|
218792
|
+
}
|
|
218590
218793
|
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
218591
218794
|
};
|
|
218592
218795
|
exports.escape = escape;
|
|
218593
218796
|
}
|
|
218594
218797
|
});
|
|
218595
218798
|
|
|
218596
|
-
// node_modules/minimatch/dist/commonjs/index.js
|
|
218597
|
-
var
|
|
218598
|
-
"node_modules/minimatch/dist/commonjs/index.js"(exports) {
|
|
218799
|
+
// node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.js
|
|
218800
|
+
var require_commonjs3 = __commonJS({
|
|
218801
|
+
"node_modules/@oclif/core/node_modules/minimatch/dist/commonjs/index.js"(exports) {
|
|
218599
218802
|
"use strict";
|
|
218600
218803
|
init_cjs_shims();
|
|
218601
|
-
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
218602
|
-
return mod && mod.__esModule ? mod : { "default": mod };
|
|
218603
|
-
};
|
|
218604
218804
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
218605
218805
|
exports.unescape = exports.escape = exports.AST = exports.Minimatch = exports.match = exports.makeRe = exports.braceExpand = exports.defaults = exports.filter = exports.GLOBSTAR = exports.sep = exports.minimatch = void 0;
|
|
218606
|
-
var brace_expansion_1 =
|
|
218806
|
+
var brace_expansion_1 = require_commonjs2();
|
|
218607
218807
|
var assert_valid_pattern_js_1 = require_assert_valid_pattern();
|
|
218608
218808
|
var ast_js_1 = require_ast();
|
|
218609
218809
|
var escape_js_1 = require_escape();
|
|
@@ -218726,7 +218926,7 @@ var require_commonjs = __commonJS({
|
|
|
218726
218926
|
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
218727
218927
|
return [pattern];
|
|
218728
218928
|
}
|
|
218729
|
-
return (0, brace_expansion_1.
|
|
218929
|
+
return (0, brace_expansion_1.expand)(pattern, { max: options.braceExpandMax });
|
|
218730
218930
|
};
|
|
218731
218931
|
exports.braceExpand = braceExpand;
|
|
218732
218932
|
exports.minimatch.braceExpand = exports.braceExpand;
|
|
@@ -218762,15 +218962,18 @@ var require_commonjs = __commonJS({
|
|
|
218762
218962
|
isWindows;
|
|
218763
218963
|
platform;
|
|
218764
218964
|
windowsNoMagicRoot;
|
|
218965
|
+
maxGlobstarRecursion;
|
|
218765
218966
|
regexp;
|
|
218766
218967
|
constructor(pattern, options = {}) {
|
|
218767
218968
|
(0, assert_valid_pattern_js_1.assertValidPattern)(pattern);
|
|
218768
218969
|
options = options || {};
|
|
218769
218970
|
this.options = options;
|
|
218971
|
+
this.maxGlobstarRecursion = options.maxGlobstarRecursion ?? 200;
|
|
218770
218972
|
this.pattern = pattern;
|
|
218771
218973
|
this.platform = options.platform || defaultPlatform;
|
|
218772
218974
|
this.isWindows = this.platform === "win32";
|
|
218773
|
-
|
|
218975
|
+
const awe = "allowWindowsEscape";
|
|
218976
|
+
this.windowsPathsNoEscape = !!options.windowsPathsNoEscape || options[awe] === false;
|
|
218774
218977
|
if (this.windowsPathsNoEscape) {
|
|
218775
218978
|
this.pattern = this.pattern.replace(/\\/g, "/");
|
|
218776
218979
|
}
|
|
@@ -218827,7 +219030,10 @@ var require_commonjs = __commonJS({
|
|
|
218827
219030
|
const isUNC = s[0] === "" && s[1] === "" && (s[2] === "?" || !globMagic.test(s[2])) && !globMagic.test(s[3]);
|
|
218828
219031
|
const isDrive = /^[a-z]:/i.test(s[0]);
|
|
218829
219032
|
if (isUNC) {
|
|
218830
|
-
return [
|
|
219033
|
+
return [
|
|
219034
|
+
...s.slice(0, 4),
|
|
219035
|
+
...s.slice(4).map((ss) => this.parse(ss))
|
|
219036
|
+
];
|
|
218831
219037
|
} else if (isDrive) {
|
|
218832
219038
|
return [s[0], ...s.slice(1).map((ss) => this.parse(ss))];
|
|
218833
219039
|
}
|
|
@@ -219099,7 +219305,8 @@ var require_commonjs = __commonJS({
|
|
|
219099
219305
|
// out of pattern, then that's fine, as long as all
|
|
219100
219306
|
// the parts match.
|
|
219101
219307
|
matchOne(file, pattern, partial = false) {
|
|
219102
|
-
|
|
219308
|
+
let fileStartIndex = 0;
|
|
219309
|
+
let patternStartIndex = 0;
|
|
219103
219310
|
if (this.isWindows) {
|
|
219104
219311
|
const fileDrive = typeof file[0] === "string" && /^[a-z]:$/i.test(file[0]);
|
|
219105
219312
|
const fileUNC = !fileDrive && file[0] === "" && file[1] === "" && file[2] === "?" && /^[a-z]:$/i.test(file[3]);
|
|
@@ -219108,14 +219315,14 @@ var require_commonjs = __commonJS({
|
|
|
219108
219315
|
const fdi = fileUNC ? 3 : fileDrive ? 0 : void 0;
|
|
219109
219316
|
const pdi = patternUNC ? 3 : patternDrive ? 0 : void 0;
|
|
219110
219317
|
if (typeof fdi === "number" && typeof pdi === "number") {
|
|
219111
|
-
const [fd, pd] = [
|
|
219318
|
+
const [fd, pd] = [
|
|
219319
|
+
file[fdi],
|
|
219320
|
+
pattern[pdi]
|
|
219321
|
+
];
|
|
219112
219322
|
if (fd.toLowerCase() === pd.toLowerCase()) {
|
|
219113
219323
|
pattern[pdi] = fd;
|
|
219114
|
-
|
|
219115
|
-
|
|
219116
|
-
} else if (fdi > pdi) {
|
|
219117
|
-
file = file.slice(fdi);
|
|
219118
|
-
}
|
|
219324
|
+
patternStartIndex = pdi;
|
|
219325
|
+
fileStartIndex = fdi;
|
|
219119
219326
|
}
|
|
219120
219327
|
}
|
|
219121
219328
|
}
|
|
@@ -219123,49 +219330,123 @@ var require_commonjs = __commonJS({
|
|
|
219123
219330
|
if (optimizationLevel >= 2) {
|
|
219124
219331
|
file = this.levelTwoFileOptimize(file);
|
|
219125
219332
|
}
|
|
219126
|
-
|
|
219127
|
-
|
|
219128
|
-
|
|
219129
|
-
|
|
219130
|
-
|
|
219131
|
-
|
|
219132
|
-
|
|
219133
|
-
|
|
219333
|
+
if (pattern.includes(exports.GLOBSTAR)) {
|
|
219334
|
+
return this.#matchGlobstar(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
219335
|
+
}
|
|
219336
|
+
return this.#matchOne(file, pattern, partial, fileStartIndex, patternStartIndex);
|
|
219337
|
+
}
|
|
219338
|
+
#matchGlobstar(file, pattern, partial, fileIndex, patternIndex) {
|
|
219339
|
+
const firstgs = pattern.indexOf(exports.GLOBSTAR, patternIndex);
|
|
219340
|
+
const lastgs = pattern.lastIndexOf(exports.GLOBSTAR);
|
|
219341
|
+
const [head, body, tail] = partial ? [
|
|
219342
|
+
pattern.slice(patternIndex, firstgs),
|
|
219343
|
+
pattern.slice(firstgs + 1),
|
|
219344
|
+
[]
|
|
219345
|
+
] : [
|
|
219346
|
+
pattern.slice(patternIndex, firstgs),
|
|
219347
|
+
pattern.slice(firstgs + 1, lastgs),
|
|
219348
|
+
pattern.slice(lastgs + 1)
|
|
219349
|
+
];
|
|
219350
|
+
if (head.length) {
|
|
219351
|
+
const fileHead = file.slice(fileIndex, fileIndex + head.length);
|
|
219352
|
+
if (!this.#matchOne(fileHead, head, partial, 0, 0)) {
|
|
219134
219353
|
return false;
|
|
219135
219354
|
}
|
|
219136
|
-
|
|
219137
|
-
|
|
219138
|
-
|
|
219139
|
-
|
|
219140
|
-
|
|
219141
|
-
|
|
219142
|
-
|
|
219143
|
-
|
|
219144
|
-
|
|
219145
|
-
|
|
219146
|
-
|
|
219355
|
+
fileIndex += head.length;
|
|
219356
|
+
patternIndex += head.length;
|
|
219357
|
+
}
|
|
219358
|
+
let fileTailMatch = 0;
|
|
219359
|
+
if (tail.length) {
|
|
219360
|
+
if (tail.length + fileIndex > file.length)
|
|
219361
|
+
return false;
|
|
219362
|
+
let tailStart = file.length - tail.length;
|
|
219363
|
+
if (this.#matchOne(file, tail, partial, tailStart, 0)) {
|
|
219364
|
+
fileTailMatch = tail.length;
|
|
219365
|
+
} else {
|
|
219366
|
+
if (file[file.length - 1] !== "" || fileIndex + tail.length === file.length) {
|
|
219367
|
+
return false;
|
|
219147
219368
|
}
|
|
219148
|
-
|
|
219149
|
-
|
|
219150
|
-
|
|
219151
|
-
if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) {
|
|
219152
|
-
this.debug("globstar found match!", fr, fl, swallowee);
|
|
219153
|
-
return true;
|
|
219154
|
-
} else {
|
|
219155
|
-
if (swallowee === "." || swallowee === ".." || !options.dot && swallowee.charAt(0) === ".") {
|
|
219156
|
-
this.debug("dot detected!", file, fr, pattern, pr);
|
|
219157
|
-
break;
|
|
219158
|
-
}
|
|
219159
|
-
this.debug("globstar swallow a segment, and continue");
|
|
219160
|
-
fr++;
|
|
219161
|
-
}
|
|
219369
|
+
tailStart--;
|
|
219370
|
+
if (!this.#matchOne(file, tail, partial, tailStart, 0)) {
|
|
219371
|
+
return false;
|
|
219162
219372
|
}
|
|
219163
|
-
|
|
219164
|
-
|
|
219165
|
-
|
|
219166
|
-
|
|
219167
|
-
|
|
219373
|
+
fileTailMatch = tail.length + 1;
|
|
219374
|
+
}
|
|
219375
|
+
}
|
|
219376
|
+
if (!body.length) {
|
|
219377
|
+
let sawSome = !!fileTailMatch;
|
|
219378
|
+
for (let i2 = fileIndex; i2 < file.length - fileTailMatch; i2++) {
|
|
219379
|
+
const f = String(file[i2]);
|
|
219380
|
+
sawSome = true;
|
|
219381
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
219382
|
+
return false;
|
|
219168
219383
|
}
|
|
219384
|
+
}
|
|
219385
|
+
return partial || sawSome;
|
|
219386
|
+
}
|
|
219387
|
+
const bodySegments = [[[], 0]];
|
|
219388
|
+
let currentBody = bodySegments[0];
|
|
219389
|
+
let nonGsParts = 0;
|
|
219390
|
+
const nonGsPartsSums = [0];
|
|
219391
|
+
for (const b of body) {
|
|
219392
|
+
if (b === exports.GLOBSTAR) {
|
|
219393
|
+
nonGsPartsSums.push(nonGsParts);
|
|
219394
|
+
currentBody = [[], 0];
|
|
219395
|
+
bodySegments.push(currentBody);
|
|
219396
|
+
} else {
|
|
219397
|
+
currentBody[0].push(b);
|
|
219398
|
+
nonGsParts++;
|
|
219399
|
+
}
|
|
219400
|
+
}
|
|
219401
|
+
let i = bodySegments.length - 1;
|
|
219402
|
+
const fileLength = file.length - fileTailMatch;
|
|
219403
|
+
for (const b of bodySegments) {
|
|
219404
|
+
b[1] = fileLength - (nonGsPartsSums[i--] + b[0].length);
|
|
219405
|
+
}
|
|
219406
|
+
return !!this.#matchGlobStarBodySections(file, bodySegments, fileIndex, 0, partial, 0, !!fileTailMatch);
|
|
219407
|
+
}
|
|
219408
|
+
// return false for "nope, not matching"
|
|
219409
|
+
// return null for "not matching, cannot keep trying"
|
|
219410
|
+
#matchGlobStarBodySections(file, bodySegments, fileIndex, bodyIndex, partial, globStarDepth, sawTail) {
|
|
219411
|
+
const bs = bodySegments[bodyIndex];
|
|
219412
|
+
if (!bs) {
|
|
219413
|
+
for (let i = fileIndex; i < file.length; i++) {
|
|
219414
|
+
sawTail = true;
|
|
219415
|
+
const f = file[i];
|
|
219416
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
219417
|
+
return false;
|
|
219418
|
+
}
|
|
219419
|
+
}
|
|
219420
|
+
return sawTail;
|
|
219421
|
+
}
|
|
219422
|
+
const [body, after] = bs;
|
|
219423
|
+
while (fileIndex <= after) {
|
|
219424
|
+
const m = this.#matchOne(file.slice(0, fileIndex + body.length), body, partial, fileIndex, 0);
|
|
219425
|
+
if (m && globStarDepth < this.maxGlobstarRecursion) {
|
|
219426
|
+
const sub = this.#matchGlobStarBodySections(file, bodySegments, fileIndex + body.length, bodyIndex + 1, partial, globStarDepth + 1, sawTail);
|
|
219427
|
+
if (sub !== false) {
|
|
219428
|
+
return sub;
|
|
219429
|
+
}
|
|
219430
|
+
}
|
|
219431
|
+
const f = file[fileIndex];
|
|
219432
|
+
if (f === "." || f === ".." || !this.options.dot && f.startsWith(".")) {
|
|
219433
|
+
return false;
|
|
219434
|
+
}
|
|
219435
|
+
fileIndex++;
|
|
219436
|
+
}
|
|
219437
|
+
return partial || null;
|
|
219438
|
+
}
|
|
219439
|
+
#matchOne(file, pattern, partial, fileIndex, patternIndex) {
|
|
219440
|
+
let fi;
|
|
219441
|
+
let pi;
|
|
219442
|
+
let pl;
|
|
219443
|
+
let fl;
|
|
219444
|
+
for (fi = fileIndex, pi = patternIndex, fl = file.length, pl = pattern.length; fi < fl && pi < pl; fi++, pi++) {
|
|
219445
|
+
this.debug("matchOne loop");
|
|
219446
|
+
let p = pattern[pi];
|
|
219447
|
+
let f = file[fi];
|
|
219448
|
+
this.debug(pattern, p, f);
|
|
219449
|
+
if (p === false || p === exports.GLOBSTAR) {
|
|
219169
219450
|
return false;
|
|
219170
219451
|
}
|
|
219171
219452
|
let hit;
|
|
@@ -219250,16 +219531,27 @@ var require_commonjs = __commonJS({
|
|
|
219250
219531
|
pp[i] = twoStar;
|
|
219251
219532
|
}
|
|
219252
219533
|
} else if (next === void 0) {
|
|
219253
|
-
pp[i - 1] = prev + "(
|
|
219534
|
+
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + ")?";
|
|
219254
219535
|
} else if (next !== exports.GLOBSTAR) {
|
|
219255
219536
|
pp[i - 1] = prev + "(?:\\/|\\/" + twoStar + "\\/)" + next;
|
|
219256
219537
|
pp[i + 1] = exports.GLOBSTAR;
|
|
219257
219538
|
}
|
|
219258
219539
|
});
|
|
219259
|
-
|
|
219540
|
+
const filtered = pp.filter((p) => p !== exports.GLOBSTAR);
|
|
219541
|
+
if (this.partial && filtered.length >= 1) {
|
|
219542
|
+
const prefixes = [];
|
|
219543
|
+
for (let i = 1; i <= filtered.length; i++) {
|
|
219544
|
+
prefixes.push(filtered.slice(0, i).join("/"));
|
|
219545
|
+
}
|
|
219546
|
+
return "(?:" + prefixes.join("|") + ")";
|
|
219547
|
+
}
|
|
219548
|
+
return filtered.join("/");
|
|
219260
219549
|
}).join("|");
|
|
219261
219550
|
const [open, close] = set.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
219262
219551
|
re = "^" + open + re + close + "$";
|
|
219552
|
+
if (this.partial) {
|
|
219553
|
+
re = "^(?:\\/|" + open + re.slice(1, -1) + close + ")$";
|
|
219554
|
+
}
|
|
219263
219555
|
if (this.negate)
|
|
219264
219556
|
re = "^(?!" + re + ").+$";
|
|
219265
219557
|
try {
|
|
@@ -222116,6 +222408,7 @@ var require_cache_command = __commonJS({
|
|
|
222116
222408
|
default: await (0, cache_default_value_1.cacheDefaultValue)(arg, respectNoCacheDefault),
|
|
222117
222409
|
description: arg.description,
|
|
222118
222410
|
hidden: arg.hidden,
|
|
222411
|
+
multiple: arg.multiple,
|
|
222119
222412
|
name,
|
|
222120
222413
|
noCacheDefault: arg.noCacheDefault,
|
|
222121
222414
|
options: arg.options,
|
|
@@ -223102,7 +223395,7 @@ var require_plugin_loader = __commonJS({
|
|
|
223102
223395
|
"use strict";
|
|
223103
223396
|
init_cjs_shims();
|
|
223104
223397
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
223105
|
-
var minimatch_1 =
|
|
223398
|
+
var minimatch_1 = require_commonjs3();
|
|
223106
223399
|
var node_path_1 = __require("node:path");
|
|
223107
223400
|
var performance_1 = require_performance();
|
|
223108
223401
|
var fs_1 = require_fs();
|
|
@@ -223443,13 +223736,11 @@ var require_config = __commonJS({
|
|
|
223443
223736
|
if (typeof opts === "string")
|
|
223444
223737
|
opts = { root: opts };
|
|
223445
223738
|
if (isConfig(opts)) {
|
|
223446
|
-
|
|
223447
|
-
|
|
223448
|
-
|
|
223449
|
-
|
|
223450
|
-
|
|
223451
|
-
}
|
|
223452
|
-
return opts;
|
|
223739
|
+
debug(`reloading config from ${opts._base} to ${BASE}`);
|
|
223740
|
+
const pluginMap = new Map(opts.getPluginsList().map((p) => [p.name, p]));
|
|
223741
|
+
const config2 = new _Config({ ...opts.options, plugins: pluginMap });
|
|
223742
|
+
await config2.load();
|
|
223743
|
+
return config2;
|
|
223453
223744
|
}
|
|
223454
223745
|
const config = new _Config(opts);
|
|
223455
223746
|
await config.load();
|
|
@@ -223491,9 +223782,9 @@ var require_config = __commonJS({
|
|
|
223491
223782
|
const SHELL = process.env.SHELL ?? (0, node_os_1.userInfo)().shell?.split(node_path_1.sep)?.pop();
|
|
223492
223783
|
if (SHELL) {
|
|
223493
223784
|
shellPath = SHELL.split("/");
|
|
223494
|
-
} else if (this.windows && process.title.toLowerCase().includes("powershell")) {
|
|
223785
|
+
} else if (this.windows && (process.title.toLowerCase().includes("powershell") || process.title.toLowerCase().includes("pwsh"))) {
|
|
223495
223786
|
shellPath = ["powershell"];
|
|
223496
|
-
} else if (this.windows && process.title.toLowerCase().includes("command prompt")) {
|
|
223787
|
+
} else if (this.windows && (process.title.toLowerCase().includes("command prompt") || process.title.toLowerCase().includes("cmd"))) {
|
|
223497
223788
|
shellPath = ["cmd.exe"];
|
|
223498
223789
|
} else if (this.windows && COMSPEC) {
|
|
223499
223790
|
shellPath = COMSPEC.split(/\\|\//);
|
|
@@ -224181,8 +224472,11 @@ var require_errors2 = __commonJS({
|
|
|
224181
224472
|
exports.CLIParseError = CLIParseError;
|
|
224182
224473
|
var InvalidArgsSpecError = class extends CLIParseError {
|
|
224183
224474
|
args;
|
|
224184
|
-
constructor({ args, exit, parse }) {
|
|
224475
|
+
constructor({ args, exit, parse, reason }) {
|
|
224185
224476
|
let message = "Invalid argument spec";
|
|
224477
|
+
if (reason) {
|
|
224478
|
+
message += `: ${reason}`;
|
|
224479
|
+
}
|
|
224186
224480
|
const namedArgs = Object.values(args).filter((a) => a.name);
|
|
224187
224481
|
if (namedArgs.length > 0) {
|
|
224188
224482
|
const list = (0, list_1.default)(namedArgs.map((a) => [`${a.name} (${a.required ? "required" : "optional"})`, a.description]));
|
|
@@ -224453,41 +224747,86 @@ var require_parse2 = __commonJS({
|
|
|
224453
224747
|
const tokens = this._argTokens;
|
|
224454
224748
|
let stdinRead = false;
|
|
224455
224749
|
const ctx = this.context;
|
|
224456
|
-
|
|
224457
|
-
|
|
224458
|
-
|
|
224459
|
-
|
|
224460
|
-
|
|
224461
|
-
|
|
224462
|
-
|
|
224463
|
-
|
|
224464
|
-
|
|
224465
|
-
|
|
224466
|
-
|
|
224467
|
-
|
|
224468
|
-
|
|
224469
|
-
|
|
224470
|
-
|
|
224471
|
-
|
|
224472
|
-
|
|
224473
|
-
|
|
224474
|
-
|
|
224475
|
-
|
|
224476
|
-
|
|
224477
|
-
|
|
224478
|
-
|
|
224479
|
-
|
|
224480
|
-
|
|
224481
|
-
|
|
224482
|
-
|
|
224483
|
-
|
|
224750
|
+
const parseArgInput = async (name, arg, input) => {
|
|
224751
|
+
if (arg.options && !arg.options.includes(input)) {
|
|
224752
|
+
throw new errors_1.ArgInvalidOptionError(arg, input);
|
|
224753
|
+
}
|
|
224754
|
+
ctx.token = { arg: name, input, type: "arg" };
|
|
224755
|
+
const parsed = await arg.parse(input, ctx, arg);
|
|
224756
|
+
argv.push(parsed);
|
|
224757
|
+
args[name] = parsed;
|
|
224758
|
+
};
|
|
224759
|
+
const applyDefault = async (name, arg) => {
|
|
224760
|
+
if (args[name] !== void 0)
|
|
224761
|
+
return;
|
|
224762
|
+
if (!arg.default && arg.default !== false)
|
|
224763
|
+
return;
|
|
224764
|
+
const value = typeof arg.default === "function" ? await arg.default() : arg.default;
|
|
224765
|
+
if (Array.isArray(value)) {
|
|
224766
|
+
for (const v of value)
|
|
224767
|
+
argv.push(v);
|
|
224768
|
+
} else {
|
|
224769
|
+
argv.push(value);
|
|
224770
|
+
}
|
|
224771
|
+
args[name] = value;
|
|
224772
|
+
};
|
|
224773
|
+
const tryStdin = async (name, arg) => {
|
|
224774
|
+
if (arg.ignoreStdin || stdinRead)
|
|
224775
|
+
return;
|
|
224776
|
+
let stdin = await (0, exports.readStdin)();
|
|
224777
|
+
stdinRead = true;
|
|
224778
|
+
if (!stdin)
|
|
224779
|
+
return;
|
|
224780
|
+
stdin = stdin.trim();
|
|
224781
|
+
await parseArgInput(name, arg, stdin);
|
|
224782
|
+
};
|
|
224783
|
+
const argEntries = Object.entries(this.input.args);
|
|
224784
|
+
const variadicIndex = argEntries.findIndex(([, arg]) => arg.multiple);
|
|
224785
|
+
if (variadicIndex === -1) {
|
|
224786
|
+
for (const [name, arg] of argEntries) {
|
|
224787
|
+
const token = tokens.find((t) => t.arg === name);
|
|
224788
|
+
ctx.token = token;
|
|
224789
|
+
await (token ? parseArgInput(name, arg, token.input) : tryStdin(name, arg));
|
|
224790
|
+
await applyDefault(name, arg);
|
|
224791
|
+
}
|
|
224792
|
+
for (const token of tokens) {
|
|
224793
|
+
if (args[token.arg] !== void 0)
|
|
224794
|
+
continue;
|
|
224795
|
+
argv.push(token.input);
|
|
224796
|
+
}
|
|
224797
|
+
} else {
|
|
224798
|
+
const tokenInputs = tokens.map((t) => t.input);
|
|
224799
|
+
for (let i = 0; i < variadicIndex; i++) {
|
|
224800
|
+
const [name, arg] = argEntries[i];
|
|
224801
|
+
const input = tokenInputs.shift();
|
|
224802
|
+
await (input === void 0 ? tryStdin(name, arg) : parseArgInput(name, arg, input));
|
|
224803
|
+
await applyDefault(name, arg);
|
|
224804
|
+
}
|
|
224805
|
+
const postVariadicParsing = [];
|
|
224806
|
+
for (let i = argEntries.length - 1; i > variadicIndex; i--) {
|
|
224807
|
+
const [name, arg] = argEntries[i];
|
|
224808
|
+
const input = tokenInputs.pop();
|
|
224809
|
+
if (input !== void 0) {
|
|
224810
|
+
postVariadicParsing.unshift({ arg, input, name });
|
|
224484
224811
|
}
|
|
224485
224812
|
}
|
|
224486
|
-
|
|
224487
|
-
|
|
224488
|
-
|
|
224489
|
-
|
|
224490
|
-
|
|
224813
|
+
const [variadicName, variadicArg] = argEntries[variadicIndex];
|
|
224814
|
+
if (tokenInputs.length > 0) {
|
|
224815
|
+
const parsedValues = [];
|
|
224816
|
+
for (const input of tokenInputs) {
|
|
224817
|
+
await parseArgInput(variadicName, variadicArg, input);
|
|
224818
|
+
parsedValues.push(args[variadicName]);
|
|
224819
|
+
}
|
|
224820
|
+
args[variadicName] = parsedValues;
|
|
224821
|
+
}
|
|
224822
|
+
for (const { arg, input, name } of postVariadicParsing) {
|
|
224823
|
+
await parseArgInput(name, arg, input);
|
|
224824
|
+
}
|
|
224825
|
+
await applyDefault(variadicName, variadicArg);
|
|
224826
|
+
for (let i = variadicIndex + 1; i < argEntries.length; i++) {
|
|
224827
|
+
const [name, arg] = argEntries[i];
|
|
224828
|
+
await applyDefault(name, arg);
|
|
224829
|
+
}
|
|
224491
224830
|
}
|
|
224492
224831
|
return { args, argv };
|
|
224493
224832
|
}
|
|
@@ -224715,6 +225054,37 @@ var require_validate = __commonJS({
|
|
|
224715
225054
|
async function validate(parse) {
|
|
224716
225055
|
let cachedResolvedFlags;
|
|
224717
225056
|
function validateArgs() {
|
|
225057
|
+
const argEntries = Object.entries(parse.input.args);
|
|
225058
|
+
const variadicIndex = argEntries.findIndex(([, arg]) => arg.multiple);
|
|
225059
|
+
if (variadicIndex !== -1) {
|
|
225060
|
+
const secondVariadic = argEntries.findIndex(([, arg], i) => i > variadicIndex && arg.multiple);
|
|
225061
|
+
if (secondVariadic !== -1) {
|
|
225062
|
+
throw new errors_1.InvalidArgsSpecError({
|
|
225063
|
+
args: parse.input.args,
|
|
225064
|
+
parse,
|
|
225065
|
+
reason: "only one variadic arg (multiple: true) is allowed"
|
|
225066
|
+
});
|
|
225067
|
+
}
|
|
225068
|
+
for (let i = 0; i < variadicIndex; i++) {
|
|
225069
|
+
if (!argEntries[i][1].required) {
|
|
225070
|
+
throw new errors_1.InvalidArgsSpecError({
|
|
225071
|
+
args: parse.input.args,
|
|
225072
|
+
parse,
|
|
225073
|
+
reason: `args before a variadic arg must be required, but "${argEntries[i][0]}" is optional`
|
|
225074
|
+
});
|
|
225075
|
+
}
|
|
225076
|
+
}
|
|
225077
|
+
for (let i = variadicIndex + 1; i < argEntries.length; i++) {
|
|
225078
|
+
if (!argEntries[i][1].required) {
|
|
225079
|
+
throw new errors_1.InvalidArgsSpecError({
|
|
225080
|
+
args: parse.input.args,
|
|
225081
|
+
parse,
|
|
225082
|
+
reason: `args after a variadic arg must be required, but "${argEntries[i][0]}" is optional`
|
|
225083
|
+
});
|
|
225084
|
+
}
|
|
225085
|
+
}
|
|
225086
|
+
}
|
|
225087
|
+
const variadicArgFound = variadicIndex !== -1;
|
|
224718
225088
|
if (parse.output.nonExistentFlags?.length > 0) {
|
|
224719
225089
|
throw new errors_1.NonExistentFlagsError({
|
|
224720
225090
|
flags: parse.output.nonExistentFlags,
|
|
@@ -224722,7 +225092,8 @@ var require_validate = __commonJS({
|
|
|
224722
225092
|
});
|
|
224723
225093
|
}
|
|
224724
225094
|
const maxArgs = Object.keys(parse.input.args).length;
|
|
224725
|
-
|
|
225095
|
+
const hasVariadicArg = Object.values(parse.input.args).some((arg) => arg.multiple);
|
|
225096
|
+
if (parse.input.strict && !hasVariadicArg && parse.output.argv.length > maxArgs) {
|
|
224726
225097
|
const extras = parse.output.argv.slice(maxArgs);
|
|
224727
225098
|
throw new errors_1.UnexpectedArgsError({
|
|
224728
225099
|
args: extras,
|
|
@@ -224734,7 +225105,7 @@ var require_validate = __commonJS({
|
|
|
224734
225105
|
for (const [name, arg] of Object.entries(parse.input.args)) {
|
|
224735
225106
|
if (!arg.required) {
|
|
224736
225107
|
hasOptional = true;
|
|
224737
|
-
} else if (hasOptional) {
|
|
225108
|
+
} else if (hasOptional && !variadicArgFound) {
|
|
224738
225109
|
throw new errors_1.InvalidArgsSpecError({
|
|
224739
225110
|
args: parse.input.args,
|
|
224740
225111
|
parse
|
|
@@ -225280,7 +225651,7 @@ var require_command2 = __commonJS({
|
|
|
225280
225651
|
}
|
|
225281
225652
|
warnIfCommandDeprecated() {
|
|
225282
225653
|
const [id] = (0, util_1.normalizeArgv)(this.config);
|
|
225283
|
-
if (this.ctor.deprecateAliases && this.ctor.aliases.includes(id)) {
|
|
225654
|
+
if (this.ctor.deprecateAliases && [...this.ctor.aliases, ...this.ctor.hiddenAliases].includes(id)) {
|
|
225284
225655
|
const cmdName = (0, ids_1.toConfiguredId)(this.ctor.id, this.config);
|
|
225285
225656
|
const aliasName = (0, ids_1.toConfiguredId)(id, this.config);
|
|
225286
225657
|
this.warn((0, util_1.formatCommandDeprecationWarning)(aliasName, { to: cmdName }));
|