@storm-software/linting-tools 1.132.135 → 1.132.136
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/bin/lint.cjs +493 -28
- package/bin/lint.js +493 -28
- package/package.json +2 -2
- package/taplo/config.toml +24 -0
package/bin/lint.cjs
CHANGED
|
@@ -4034,14 +4034,15 @@ var require_braces = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4034
4034
|
}
|
|
4035
4035
|
});
|
|
4036
4036
|
|
|
4037
|
-
// ../../node_modules/.pnpm/picomatch@2.3.
|
|
4037
|
+
// ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js
|
|
4038
4038
|
var require_constants2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
4039
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
4039
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
4040
4040
|
"use strict";
|
|
4041
4041
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
4042
4042
|
var path32 = _chunkF4C4LJYKcjs.__require.call(void 0, "path");
|
|
4043
4043
|
var WIN_SLASH = "\\\\/";
|
|
4044
4044
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
4045
|
+
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
4045
4046
|
var DOT_LITERAL = "\\.";
|
|
4046
4047
|
var PLUS_LITERAL = "\\+";
|
|
4047
4048
|
var QMARK_LITERAL = "\\?";
|
|
@@ -4089,6 +4090,7 @@ var require_constants2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4089
4090
|
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
|
|
4090
4091
|
};
|
|
4091
4092
|
var POSIX_REGEX_SOURCE = {
|
|
4093
|
+
__proto__: null,
|
|
4092
4094
|
alnum: "a-zA-Z0-9",
|
|
4093
4095
|
alpha: "a-zA-Z",
|
|
4094
4096
|
ascii: "\\x00-\\x7F",
|
|
@@ -4105,6 +4107,7 @@ var require_constants2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4105
4107
|
xdigit: "A-Fa-f0-9"
|
|
4106
4108
|
};
|
|
4107
4109
|
module.exports = {
|
|
4110
|
+
DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
4108
4111
|
MAX_LENGTH: 1024 * 64,
|
|
4109
4112
|
POSIX_REGEX_SOURCE,
|
|
4110
4113
|
// regular expressions
|
|
@@ -4116,6 +4119,7 @@ var require_constants2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4116
4119
|
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
4117
4120
|
// Replace globs with equivalent patterns to reduce parsing time.
|
|
4118
4121
|
REPLACEMENTS: {
|
|
4122
|
+
__proto__: null,
|
|
4119
4123
|
"***": "*",
|
|
4120
4124
|
"**/**": "**",
|
|
4121
4125
|
"**/**/**": "**"
|
|
@@ -4232,9 +4236,9 @@ var require_constants2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4232
4236
|
}
|
|
4233
4237
|
});
|
|
4234
4238
|
|
|
4235
|
-
// ../../node_modules/.pnpm/picomatch@2.3.
|
|
4239
|
+
// ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js
|
|
4236
4240
|
var require_utils2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
4237
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
4241
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/utils.js"(exports) {
|
|
4238
4242
|
"use strict";
|
|
4239
4243
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
4240
4244
|
var path32 = _chunkF4C4LJYKcjs.__require.call(void 0, "path");
|
|
@@ -4294,9 +4298,9 @@ var require_utils2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4294
4298
|
}
|
|
4295
4299
|
});
|
|
4296
4300
|
|
|
4297
|
-
// ../../node_modules/.pnpm/picomatch@2.3.
|
|
4301
|
+
// ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/scan.js
|
|
4298
4302
|
var require_scan = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
4299
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
4303
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/scan.js"(exports, module) {
|
|
4300
4304
|
"use strict";
|
|
4301
4305
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
4302
4306
|
var utils = require_utils2();
|
|
@@ -4625,9 +4629,9 @@ var require_scan = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4625
4629
|
}
|
|
4626
4630
|
});
|
|
4627
4631
|
|
|
4628
|
-
// ../../node_modules/.pnpm/picomatch@2.3.
|
|
4632
|
+
// ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/parse.js
|
|
4629
4633
|
var require_parse2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
4630
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
4634
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/parse.js"(exports, module) {
|
|
4631
4635
|
"use strict";
|
|
4632
4636
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
4633
4637
|
var constants = require_constants2();
|
|
@@ -4655,6 +4659,213 @@ var require_parse2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4655
4659
|
var syntaxError = (type2, char) => {
|
|
4656
4660
|
return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
4657
4661
|
};
|
|
4662
|
+
var splitTopLevel = (input) => {
|
|
4663
|
+
const parts = [];
|
|
4664
|
+
let bracket = 0;
|
|
4665
|
+
let paren = 0;
|
|
4666
|
+
let quote = 0;
|
|
4667
|
+
let value = "";
|
|
4668
|
+
let escaped = false;
|
|
4669
|
+
for (const ch of input) {
|
|
4670
|
+
if (escaped === true) {
|
|
4671
|
+
value += ch;
|
|
4672
|
+
escaped = false;
|
|
4673
|
+
continue;
|
|
4674
|
+
}
|
|
4675
|
+
if (ch === "\\") {
|
|
4676
|
+
value += ch;
|
|
4677
|
+
escaped = true;
|
|
4678
|
+
continue;
|
|
4679
|
+
}
|
|
4680
|
+
if (ch === '"') {
|
|
4681
|
+
quote = quote === 1 ? 0 : 1;
|
|
4682
|
+
value += ch;
|
|
4683
|
+
continue;
|
|
4684
|
+
}
|
|
4685
|
+
if (quote === 0) {
|
|
4686
|
+
if (ch === "[") {
|
|
4687
|
+
bracket++;
|
|
4688
|
+
} else if (ch === "]" && bracket > 0) {
|
|
4689
|
+
bracket--;
|
|
4690
|
+
} else if (bracket === 0) {
|
|
4691
|
+
if (ch === "(") {
|
|
4692
|
+
paren++;
|
|
4693
|
+
} else if (ch === ")" && paren > 0) {
|
|
4694
|
+
paren--;
|
|
4695
|
+
} else if (ch === "|" && paren === 0) {
|
|
4696
|
+
parts.push(value);
|
|
4697
|
+
value = "";
|
|
4698
|
+
continue;
|
|
4699
|
+
}
|
|
4700
|
+
}
|
|
4701
|
+
}
|
|
4702
|
+
value += ch;
|
|
4703
|
+
}
|
|
4704
|
+
parts.push(value);
|
|
4705
|
+
return parts;
|
|
4706
|
+
};
|
|
4707
|
+
var isPlainBranch = (branch) => {
|
|
4708
|
+
let escaped = false;
|
|
4709
|
+
for (const ch of branch) {
|
|
4710
|
+
if (escaped === true) {
|
|
4711
|
+
escaped = false;
|
|
4712
|
+
continue;
|
|
4713
|
+
}
|
|
4714
|
+
if (ch === "\\") {
|
|
4715
|
+
escaped = true;
|
|
4716
|
+
continue;
|
|
4717
|
+
}
|
|
4718
|
+
if (/[?*+@!()[\]{}]/.test(ch)) {
|
|
4719
|
+
return false;
|
|
4720
|
+
}
|
|
4721
|
+
}
|
|
4722
|
+
return true;
|
|
4723
|
+
};
|
|
4724
|
+
var normalizeSimpleBranch = (branch) => {
|
|
4725
|
+
let value = branch.trim();
|
|
4726
|
+
let changed = true;
|
|
4727
|
+
while (changed === true) {
|
|
4728
|
+
changed = false;
|
|
4729
|
+
if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
|
|
4730
|
+
value = value.slice(2, -1);
|
|
4731
|
+
changed = true;
|
|
4732
|
+
}
|
|
4733
|
+
}
|
|
4734
|
+
if (!isPlainBranch(value)) {
|
|
4735
|
+
return;
|
|
4736
|
+
}
|
|
4737
|
+
return value.replace(/\\(.)/g, "$1");
|
|
4738
|
+
};
|
|
4739
|
+
var hasRepeatedCharPrefixOverlap = (branches) => {
|
|
4740
|
+
const values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
4741
|
+
for (let i = 0; i < values.length; i++) {
|
|
4742
|
+
for (let j = i + 1; j < values.length; j++) {
|
|
4743
|
+
const a = values[i];
|
|
4744
|
+
const b = values[j];
|
|
4745
|
+
const char = a[0];
|
|
4746
|
+
if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
|
|
4747
|
+
continue;
|
|
4748
|
+
}
|
|
4749
|
+
if (a === b || a.startsWith(b) || b.startsWith(a)) {
|
|
4750
|
+
return true;
|
|
4751
|
+
}
|
|
4752
|
+
}
|
|
4753
|
+
}
|
|
4754
|
+
return false;
|
|
4755
|
+
};
|
|
4756
|
+
var parseRepeatedExtglob = (pattern, requireEnd = true) => {
|
|
4757
|
+
if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
|
|
4758
|
+
return;
|
|
4759
|
+
}
|
|
4760
|
+
let bracket = 0;
|
|
4761
|
+
let paren = 0;
|
|
4762
|
+
let quote = 0;
|
|
4763
|
+
let escaped = false;
|
|
4764
|
+
for (let i = 1; i < pattern.length; i++) {
|
|
4765
|
+
const ch = pattern[i];
|
|
4766
|
+
if (escaped === true) {
|
|
4767
|
+
escaped = false;
|
|
4768
|
+
continue;
|
|
4769
|
+
}
|
|
4770
|
+
if (ch === "\\") {
|
|
4771
|
+
escaped = true;
|
|
4772
|
+
continue;
|
|
4773
|
+
}
|
|
4774
|
+
if (ch === '"') {
|
|
4775
|
+
quote = quote === 1 ? 0 : 1;
|
|
4776
|
+
continue;
|
|
4777
|
+
}
|
|
4778
|
+
if (quote === 1) {
|
|
4779
|
+
continue;
|
|
4780
|
+
}
|
|
4781
|
+
if (ch === "[") {
|
|
4782
|
+
bracket++;
|
|
4783
|
+
continue;
|
|
4784
|
+
}
|
|
4785
|
+
if (ch === "]" && bracket > 0) {
|
|
4786
|
+
bracket--;
|
|
4787
|
+
continue;
|
|
4788
|
+
}
|
|
4789
|
+
if (bracket > 0) {
|
|
4790
|
+
continue;
|
|
4791
|
+
}
|
|
4792
|
+
if (ch === "(") {
|
|
4793
|
+
paren++;
|
|
4794
|
+
continue;
|
|
4795
|
+
}
|
|
4796
|
+
if (ch === ")") {
|
|
4797
|
+
paren--;
|
|
4798
|
+
if (paren === 0) {
|
|
4799
|
+
if (requireEnd === true && i !== pattern.length - 1) {
|
|
4800
|
+
return;
|
|
4801
|
+
}
|
|
4802
|
+
return {
|
|
4803
|
+
type: pattern[0],
|
|
4804
|
+
body: pattern.slice(2, i),
|
|
4805
|
+
end: i
|
|
4806
|
+
};
|
|
4807
|
+
}
|
|
4808
|
+
}
|
|
4809
|
+
}
|
|
4810
|
+
};
|
|
4811
|
+
var getStarExtglobSequenceOutput = (pattern) => {
|
|
4812
|
+
let index2 = 0;
|
|
4813
|
+
const chars = [];
|
|
4814
|
+
while (index2 < pattern.length) {
|
|
4815
|
+
const match4 = parseRepeatedExtglob(pattern.slice(index2), false);
|
|
4816
|
+
if (!match4 || match4.type !== "*") {
|
|
4817
|
+
return;
|
|
4818
|
+
}
|
|
4819
|
+
const branches = splitTopLevel(match4.body).map((branch2) => branch2.trim());
|
|
4820
|
+
if (branches.length !== 1) {
|
|
4821
|
+
return;
|
|
4822
|
+
}
|
|
4823
|
+
const branch = normalizeSimpleBranch(branches[0]);
|
|
4824
|
+
if (!branch || branch.length !== 1) {
|
|
4825
|
+
return;
|
|
4826
|
+
}
|
|
4827
|
+
chars.push(branch);
|
|
4828
|
+
index2 += match4.end + 1;
|
|
4829
|
+
}
|
|
4830
|
+
if (chars.length < 1) {
|
|
4831
|
+
return;
|
|
4832
|
+
}
|
|
4833
|
+
const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
|
|
4834
|
+
return `${source}*`;
|
|
4835
|
+
};
|
|
4836
|
+
var repeatedExtglobRecursion = (pattern) => {
|
|
4837
|
+
let depth2 = 0;
|
|
4838
|
+
let value = pattern.trim();
|
|
4839
|
+
let match4 = parseRepeatedExtglob(value);
|
|
4840
|
+
while (match4) {
|
|
4841
|
+
depth2++;
|
|
4842
|
+
value = match4.body.trim();
|
|
4843
|
+
match4 = parseRepeatedExtglob(value);
|
|
4844
|
+
}
|
|
4845
|
+
return depth2;
|
|
4846
|
+
};
|
|
4847
|
+
var analyzeRepeatedExtglob = (body, options) => {
|
|
4848
|
+
if (options.maxExtglobRecursion === false) {
|
|
4849
|
+
return { risky: false };
|
|
4850
|
+
}
|
|
4851
|
+
const max4 = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
|
|
4852
|
+
const branches = splitTopLevel(body).map((branch) => branch.trim());
|
|
4853
|
+
if (branches.length > 1) {
|
|
4854
|
+
if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
|
|
4855
|
+
return { risky: true };
|
|
4856
|
+
}
|
|
4857
|
+
}
|
|
4858
|
+
for (const branch of branches) {
|
|
4859
|
+
const safeOutput = getStarExtglobSequenceOutput(branch);
|
|
4860
|
+
if (safeOutput) {
|
|
4861
|
+
return { risky: true, safeOutput };
|
|
4862
|
+
}
|
|
4863
|
+
if (repeatedExtglobRecursion(branch) > max4) {
|
|
4864
|
+
return { risky: true };
|
|
4865
|
+
}
|
|
4866
|
+
}
|
|
4867
|
+
return { risky: false };
|
|
4868
|
+
};
|
|
4658
4869
|
var parse8 = (input, options) => {
|
|
4659
4870
|
if (typeof input !== "string") {
|
|
4660
4871
|
throw new TypeError("Expected a string");
|
|
@@ -4786,6 +4997,8 @@ var require_parse2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4786
4997
|
token.prev = prev;
|
|
4787
4998
|
token.parens = state.parens;
|
|
4788
4999
|
token.output = state.output;
|
|
5000
|
+
token.startIndex = state.index;
|
|
5001
|
+
token.tokensIndex = tokens.length;
|
|
4789
5002
|
const output = (opts.capture ? "(" : "") + token.open;
|
|
4790
5003
|
increment("parens");
|
|
4791
5004
|
push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR });
|
|
@@ -4793,6 +5006,26 @@ var require_parse2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
4793
5006
|
extglobs.push(token);
|
|
4794
5007
|
};
|
|
4795
5008
|
const extglobClose = (token) => {
|
|
5009
|
+
const literal2 = input.slice(token.startIndex, state.index + 1);
|
|
5010
|
+
const body = input.slice(token.startIndex + 2, state.index);
|
|
5011
|
+
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
5012
|
+
if ((token.type === "plus" || token.type === "star") && analysis.risky) {
|
|
5013
|
+
const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
|
|
5014
|
+
const open2 = tokens[token.tokensIndex];
|
|
5015
|
+
open2.type = "text";
|
|
5016
|
+
open2.value = literal2;
|
|
5017
|
+
open2.output = safeOutput || utils.escapeRegex(literal2);
|
|
5018
|
+
for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
|
|
5019
|
+
tokens[i].value = "";
|
|
5020
|
+
tokens[i].output = "";
|
|
5021
|
+
delete tokens[i].suffix;
|
|
5022
|
+
}
|
|
5023
|
+
state.output = token.output + open2.output;
|
|
5024
|
+
state.backtrack = true;
|
|
5025
|
+
push({ type: "paren", extglob: true, value, output: "" });
|
|
5026
|
+
decrement("parens");
|
|
5027
|
+
return;
|
|
5028
|
+
}
|
|
4796
5029
|
let output = token.close + (opts.capture ? ")" : "");
|
|
4797
5030
|
let rest;
|
|
4798
5031
|
if (token.type === "negate") {
|
|
@@ -5399,9 +5632,9 @@ var require_parse2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
5399
5632
|
}
|
|
5400
5633
|
});
|
|
5401
5634
|
|
|
5402
|
-
// ../../node_modules/.pnpm/picomatch@2.3.
|
|
5635
|
+
// ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js
|
|
5403
5636
|
var require_picomatch = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
5404
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
5637
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
5405
5638
|
"use strict";
|
|
5406
5639
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
5407
5640
|
var path32 = _chunkF4C4LJYKcjs.__require.call(void 0, "path");
|
|
@@ -5541,9 +5774,9 @@ var require_picomatch = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
5541
5774
|
}
|
|
5542
5775
|
});
|
|
5543
5776
|
|
|
5544
|
-
// ../../node_modules/.pnpm/picomatch@2.3.
|
|
5777
|
+
// ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/index.js
|
|
5545
5778
|
var require_picomatch2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
5546
|
-
"../../node_modules/.pnpm/picomatch@2.3.
|
|
5779
|
+
"../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/index.js"(exports, module) {
|
|
5547
5780
|
"use strict";
|
|
5548
5781
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
5549
5782
|
module.exports = require_picomatch();
|
|
@@ -16503,13 +16736,14 @@ var require_resolve_from = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
16503
16736
|
}
|
|
16504
16737
|
});
|
|
16505
16738
|
|
|
16506
|
-
// ../../node_modules/.pnpm/picomatch@4.0.
|
|
16739
|
+
// ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js
|
|
16507
16740
|
var require_constants4 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
16508
|
-
"../../node_modules/.pnpm/picomatch@4.0.
|
|
16741
|
+
"../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
16509
16742
|
"use strict";
|
|
16510
16743
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
16511
16744
|
var WIN_SLASH = "\\\\/";
|
|
16512
16745
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
16746
|
+
var DEFAULT_MAX_EXTGLOB_RECURSION = 0;
|
|
16513
16747
|
var DOT_LITERAL = "\\.";
|
|
16514
16748
|
var PLUS_LITERAL = "\\+";
|
|
16515
16749
|
var QMARK_LITERAL = "\\?";
|
|
@@ -16560,6 +16794,7 @@ var require_constants4 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
16560
16794
|
SEP: "\\"
|
|
16561
16795
|
};
|
|
16562
16796
|
var POSIX_REGEX_SOURCE = {
|
|
16797
|
+
__proto__: null,
|
|
16563
16798
|
alnum: "a-zA-Z0-9",
|
|
16564
16799
|
alpha: "a-zA-Z",
|
|
16565
16800
|
ascii: "\\x00-\\x7F",
|
|
@@ -16576,6 +16811,7 @@ var require_constants4 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
16576
16811
|
xdigit: "A-Fa-f0-9"
|
|
16577
16812
|
};
|
|
16578
16813
|
module.exports = {
|
|
16814
|
+
DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
16579
16815
|
MAX_LENGTH: 1024 * 64,
|
|
16580
16816
|
POSIX_REGEX_SOURCE,
|
|
16581
16817
|
// regular expressions
|
|
@@ -16703,9 +16939,9 @@ var require_constants4 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
16703
16939
|
}
|
|
16704
16940
|
});
|
|
16705
16941
|
|
|
16706
|
-
// ../../node_modules/.pnpm/picomatch@4.0.
|
|
16942
|
+
// ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js
|
|
16707
16943
|
var require_utils6 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
16708
|
-
"../../node_modules/.pnpm/picomatch@4.0.
|
|
16944
|
+
"../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/utils.js"(exports) {
|
|
16709
16945
|
"use strict";
|
|
16710
16946
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
16711
16947
|
var {
|
|
@@ -16768,9 +17004,9 @@ var require_utils6 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
16768
17004
|
}
|
|
16769
17005
|
});
|
|
16770
17006
|
|
|
16771
|
-
// ../../node_modules/.pnpm/picomatch@4.0.
|
|
17007
|
+
// ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/scan.js
|
|
16772
17008
|
var require_scan2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
16773
|
-
"../../node_modules/.pnpm/picomatch@4.0.
|
|
17009
|
+
"../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/scan.js"(exports, module) {
|
|
16774
17010
|
"use strict";
|
|
16775
17011
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
16776
17012
|
var utils = require_utils6();
|
|
@@ -17099,9 +17335,9 @@ var require_scan2 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
17099
17335
|
}
|
|
17100
17336
|
});
|
|
17101
17337
|
|
|
17102
|
-
// ../../node_modules/.pnpm/picomatch@4.0.
|
|
17338
|
+
// ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/parse.js
|
|
17103
17339
|
var require_parse3 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
17104
|
-
"../../node_modules/.pnpm/picomatch@4.0.
|
|
17340
|
+
"../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/parse.js"(exports, module) {
|
|
17105
17341
|
"use strict";
|
|
17106
17342
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
17107
17343
|
var constants = require_constants4();
|
|
@@ -17129,6 +17365,213 @@ var require_parse3 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
17129
17365
|
var syntaxError = (type2, char) => {
|
|
17130
17366
|
return `Missing ${type2}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
17131
17367
|
};
|
|
17368
|
+
var splitTopLevel = (input) => {
|
|
17369
|
+
const parts = [];
|
|
17370
|
+
let bracket = 0;
|
|
17371
|
+
let paren = 0;
|
|
17372
|
+
let quote = 0;
|
|
17373
|
+
let value = "";
|
|
17374
|
+
let escaped = false;
|
|
17375
|
+
for (const ch of input) {
|
|
17376
|
+
if (escaped === true) {
|
|
17377
|
+
value += ch;
|
|
17378
|
+
escaped = false;
|
|
17379
|
+
continue;
|
|
17380
|
+
}
|
|
17381
|
+
if (ch === "\\") {
|
|
17382
|
+
value += ch;
|
|
17383
|
+
escaped = true;
|
|
17384
|
+
continue;
|
|
17385
|
+
}
|
|
17386
|
+
if (ch === '"') {
|
|
17387
|
+
quote = quote === 1 ? 0 : 1;
|
|
17388
|
+
value += ch;
|
|
17389
|
+
continue;
|
|
17390
|
+
}
|
|
17391
|
+
if (quote === 0) {
|
|
17392
|
+
if (ch === "[") {
|
|
17393
|
+
bracket++;
|
|
17394
|
+
} else if (ch === "]" && bracket > 0) {
|
|
17395
|
+
bracket--;
|
|
17396
|
+
} else if (bracket === 0) {
|
|
17397
|
+
if (ch === "(") {
|
|
17398
|
+
paren++;
|
|
17399
|
+
} else if (ch === ")" && paren > 0) {
|
|
17400
|
+
paren--;
|
|
17401
|
+
} else if (ch === "|" && paren === 0) {
|
|
17402
|
+
parts.push(value);
|
|
17403
|
+
value = "";
|
|
17404
|
+
continue;
|
|
17405
|
+
}
|
|
17406
|
+
}
|
|
17407
|
+
}
|
|
17408
|
+
value += ch;
|
|
17409
|
+
}
|
|
17410
|
+
parts.push(value);
|
|
17411
|
+
return parts;
|
|
17412
|
+
};
|
|
17413
|
+
var isPlainBranch = (branch) => {
|
|
17414
|
+
let escaped = false;
|
|
17415
|
+
for (const ch of branch) {
|
|
17416
|
+
if (escaped === true) {
|
|
17417
|
+
escaped = false;
|
|
17418
|
+
continue;
|
|
17419
|
+
}
|
|
17420
|
+
if (ch === "\\") {
|
|
17421
|
+
escaped = true;
|
|
17422
|
+
continue;
|
|
17423
|
+
}
|
|
17424
|
+
if (/[?*+@!()[\]{}]/.test(ch)) {
|
|
17425
|
+
return false;
|
|
17426
|
+
}
|
|
17427
|
+
}
|
|
17428
|
+
return true;
|
|
17429
|
+
};
|
|
17430
|
+
var normalizeSimpleBranch = (branch) => {
|
|
17431
|
+
let value = branch.trim();
|
|
17432
|
+
let changed = true;
|
|
17433
|
+
while (changed === true) {
|
|
17434
|
+
changed = false;
|
|
17435
|
+
if (/^@\([^\\()[\]{}|]+\)$/.test(value)) {
|
|
17436
|
+
value = value.slice(2, -1);
|
|
17437
|
+
changed = true;
|
|
17438
|
+
}
|
|
17439
|
+
}
|
|
17440
|
+
if (!isPlainBranch(value)) {
|
|
17441
|
+
return;
|
|
17442
|
+
}
|
|
17443
|
+
return value.replace(/\\(.)/g, "$1");
|
|
17444
|
+
};
|
|
17445
|
+
var hasRepeatedCharPrefixOverlap = (branches) => {
|
|
17446
|
+
const values = branches.map(normalizeSimpleBranch).filter(Boolean);
|
|
17447
|
+
for (let i = 0; i < values.length; i++) {
|
|
17448
|
+
for (let j = i + 1; j < values.length; j++) {
|
|
17449
|
+
const a = values[i];
|
|
17450
|
+
const b = values[j];
|
|
17451
|
+
const char = a[0];
|
|
17452
|
+
if (!char || a !== char.repeat(a.length) || b !== char.repeat(b.length)) {
|
|
17453
|
+
continue;
|
|
17454
|
+
}
|
|
17455
|
+
if (a === b || a.startsWith(b) || b.startsWith(a)) {
|
|
17456
|
+
return true;
|
|
17457
|
+
}
|
|
17458
|
+
}
|
|
17459
|
+
}
|
|
17460
|
+
return false;
|
|
17461
|
+
};
|
|
17462
|
+
var parseRepeatedExtglob = (pattern, requireEnd = true) => {
|
|
17463
|
+
if (pattern[0] !== "+" && pattern[0] !== "*" || pattern[1] !== "(") {
|
|
17464
|
+
return;
|
|
17465
|
+
}
|
|
17466
|
+
let bracket = 0;
|
|
17467
|
+
let paren = 0;
|
|
17468
|
+
let quote = 0;
|
|
17469
|
+
let escaped = false;
|
|
17470
|
+
for (let i = 1; i < pattern.length; i++) {
|
|
17471
|
+
const ch = pattern[i];
|
|
17472
|
+
if (escaped === true) {
|
|
17473
|
+
escaped = false;
|
|
17474
|
+
continue;
|
|
17475
|
+
}
|
|
17476
|
+
if (ch === "\\") {
|
|
17477
|
+
escaped = true;
|
|
17478
|
+
continue;
|
|
17479
|
+
}
|
|
17480
|
+
if (ch === '"') {
|
|
17481
|
+
quote = quote === 1 ? 0 : 1;
|
|
17482
|
+
continue;
|
|
17483
|
+
}
|
|
17484
|
+
if (quote === 1) {
|
|
17485
|
+
continue;
|
|
17486
|
+
}
|
|
17487
|
+
if (ch === "[") {
|
|
17488
|
+
bracket++;
|
|
17489
|
+
continue;
|
|
17490
|
+
}
|
|
17491
|
+
if (ch === "]" && bracket > 0) {
|
|
17492
|
+
bracket--;
|
|
17493
|
+
continue;
|
|
17494
|
+
}
|
|
17495
|
+
if (bracket > 0) {
|
|
17496
|
+
continue;
|
|
17497
|
+
}
|
|
17498
|
+
if (ch === "(") {
|
|
17499
|
+
paren++;
|
|
17500
|
+
continue;
|
|
17501
|
+
}
|
|
17502
|
+
if (ch === ")") {
|
|
17503
|
+
paren--;
|
|
17504
|
+
if (paren === 0) {
|
|
17505
|
+
if (requireEnd === true && i !== pattern.length - 1) {
|
|
17506
|
+
return;
|
|
17507
|
+
}
|
|
17508
|
+
return {
|
|
17509
|
+
type: pattern[0],
|
|
17510
|
+
body: pattern.slice(2, i),
|
|
17511
|
+
end: i
|
|
17512
|
+
};
|
|
17513
|
+
}
|
|
17514
|
+
}
|
|
17515
|
+
}
|
|
17516
|
+
};
|
|
17517
|
+
var getStarExtglobSequenceOutput = (pattern) => {
|
|
17518
|
+
let index2 = 0;
|
|
17519
|
+
const chars = [];
|
|
17520
|
+
while (index2 < pattern.length) {
|
|
17521
|
+
const match4 = parseRepeatedExtglob(pattern.slice(index2), false);
|
|
17522
|
+
if (!match4 || match4.type !== "*") {
|
|
17523
|
+
return;
|
|
17524
|
+
}
|
|
17525
|
+
const branches = splitTopLevel(match4.body).map((branch2) => branch2.trim());
|
|
17526
|
+
if (branches.length !== 1) {
|
|
17527
|
+
return;
|
|
17528
|
+
}
|
|
17529
|
+
const branch = normalizeSimpleBranch(branches[0]);
|
|
17530
|
+
if (!branch || branch.length !== 1) {
|
|
17531
|
+
return;
|
|
17532
|
+
}
|
|
17533
|
+
chars.push(branch);
|
|
17534
|
+
index2 += match4.end + 1;
|
|
17535
|
+
}
|
|
17536
|
+
if (chars.length < 1) {
|
|
17537
|
+
return;
|
|
17538
|
+
}
|
|
17539
|
+
const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
|
|
17540
|
+
return `${source}*`;
|
|
17541
|
+
};
|
|
17542
|
+
var repeatedExtglobRecursion = (pattern) => {
|
|
17543
|
+
let depth2 = 0;
|
|
17544
|
+
let value = pattern.trim();
|
|
17545
|
+
let match4 = parseRepeatedExtglob(value);
|
|
17546
|
+
while (match4) {
|
|
17547
|
+
depth2++;
|
|
17548
|
+
value = match4.body.trim();
|
|
17549
|
+
match4 = parseRepeatedExtglob(value);
|
|
17550
|
+
}
|
|
17551
|
+
return depth2;
|
|
17552
|
+
};
|
|
17553
|
+
var analyzeRepeatedExtglob = (body, options) => {
|
|
17554
|
+
if (options.maxExtglobRecursion === false) {
|
|
17555
|
+
return { risky: false };
|
|
17556
|
+
}
|
|
17557
|
+
const max4 = typeof options.maxExtglobRecursion === "number" ? options.maxExtglobRecursion : constants.DEFAULT_MAX_EXTGLOB_RECURSION;
|
|
17558
|
+
const branches = splitTopLevel(body).map((branch) => branch.trim());
|
|
17559
|
+
if (branches.length > 1) {
|
|
17560
|
+
if (branches.some((branch) => branch === "") || branches.some((branch) => /^[*?]+$/.test(branch)) || hasRepeatedCharPrefixOverlap(branches)) {
|
|
17561
|
+
return { risky: true };
|
|
17562
|
+
}
|
|
17563
|
+
}
|
|
17564
|
+
for (const branch of branches) {
|
|
17565
|
+
const safeOutput = getStarExtglobSequenceOutput(branch);
|
|
17566
|
+
if (safeOutput) {
|
|
17567
|
+
return { risky: true, safeOutput };
|
|
17568
|
+
}
|
|
17569
|
+
if (repeatedExtglobRecursion(branch) > max4) {
|
|
17570
|
+
return { risky: true };
|
|
17571
|
+
}
|
|
17572
|
+
}
|
|
17573
|
+
return { risky: false };
|
|
17574
|
+
};
|
|
17132
17575
|
var parse8 = (input, options) => {
|
|
17133
17576
|
if (typeof input !== "string") {
|
|
17134
17577
|
throw new TypeError("Expected a string");
|
|
@@ -17259,6 +17702,8 @@ var require_parse3 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
17259
17702
|
token.prev = prev;
|
|
17260
17703
|
token.parens = state.parens;
|
|
17261
17704
|
token.output = state.output;
|
|
17705
|
+
token.startIndex = state.index;
|
|
17706
|
+
token.tokensIndex = tokens.length;
|
|
17262
17707
|
const output = (opts.capture ? "(" : "") + token.open;
|
|
17263
17708
|
increment("parens");
|
|
17264
17709
|
push({ type: type2, value: value2, output: state.output ? "" : ONE_CHAR });
|
|
@@ -17266,6 +17711,26 @@ var require_parse3 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
17266
17711
|
extglobs.push(token);
|
|
17267
17712
|
};
|
|
17268
17713
|
const extglobClose = (token) => {
|
|
17714
|
+
const literal2 = input.slice(token.startIndex, state.index + 1);
|
|
17715
|
+
const body = input.slice(token.startIndex + 2, state.index);
|
|
17716
|
+
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
17717
|
+
if ((token.type === "plus" || token.type === "star") && analysis.risky) {
|
|
17718
|
+
const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
|
|
17719
|
+
const open2 = tokens[token.tokensIndex];
|
|
17720
|
+
open2.type = "text";
|
|
17721
|
+
open2.value = literal2;
|
|
17722
|
+
open2.output = safeOutput || utils.escapeRegex(literal2);
|
|
17723
|
+
for (let i = token.tokensIndex + 1; i < tokens.length; i++) {
|
|
17724
|
+
tokens[i].value = "";
|
|
17725
|
+
tokens[i].output = "";
|
|
17726
|
+
delete tokens[i].suffix;
|
|
17727
|
+
}
|
|
17728
|
+
state.output = token.output + open2.output;
|
|
17729
|
+
state.backtrack = true;
|
|
17730
|
+
push({ type: "paren", extglob: true, value, output: "" });
|
|
17731
|
+
decrement("parens");
|
|
17732
|
+
return;
|
|
17733
|
+
}
|
|
17269
17734
|
let output = token.close + (opts.capture ? ")" : "");
|
|
17270
17735
|
let rest;
|
|
17271
17736
|
if (token.type === "negate") {
|
|
@@ -17868,9 +18333,9 @@ var require_parse3 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
17868
18333
|
}
|
|
17869
18334
|
});
|
|
17870
18335
|
|
|
17871
|
-
// ../../node_modules/.pnpm/picomatch@4.0.
|
|
18336
|
+
// ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/picomatch.js
|
|
17872
18337
|
var require_picomatch3 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
17873
|
-
"../../node_modules/.pnpm/picomatch@4.0.
|
|
18338
|
+
"../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
17874
18339
|
"use strict";
|
|
17875
18340
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
17876
18341
|
var scan3 = require_scan2();
|
|
@@ -18009,9 +18474,9 @@ var require_picomatch3 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
|
18009
18474
|
}
|
|
18010
18475
|
});
|
|
18011
18476
|
|
|
18012
|
-
// ../../node_modules/.pnpm/picomatch@4.0.
|
|
18477
|
+
// ../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/index.js
|
|
18013
18478
|
var require_picomatch4 = _chunkF4C4LJYKcjs.__commonJS.call(void 0, {
|
|
18014
|
-
"../../node_modules/.pnpm/picomatch@4.0.
|
|
18479
|
+
"../../node_modules/.pnpm/picomatch@4.0.4/node_modules/picomatch/index.js"(exports, module) {
|
|
18015
18480
|
"use strict";
|
|
18016
18481
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
18017
18482
|
var pico = require_picomatch3();
|
|
@@ -313165,7 +313630,7 @@ _chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
|
313165
313630
|
|
|
313166
313631
|
|
|
313167
313632
|
|
|
313168
|
-
// ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.
|
|
313633
|
+
// ../../node_modules/.pnpm/fdir@6.5.0_picomatch@4.0.4/node_modules/fdir/dist/index.mjs
|
|
313169
313634
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
313170
313635
|
|
|
313171
313636
|
|
|
@@ -336631,7 +337096,7 @@ _chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
|
336631
337096
|
// ../../node_modules/.pnpm/minimatch@10.2.4/node_modules/minimatch/dist/esm/index.js
|
|
336632
337097
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
336633
337098
|
|
|
336634
|
-
// ../../node_modules/.pnpm/brace-expansion@5.0.
|
|
337099
|
+
// ../../node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js
|
|
336635
337100
|
_chunkF4C4LJYKcjs.init_cjs_shims.call(void 0, );
|
|
336636
337101
|
|
|
336637
337102
|
// ../../node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js
|
|
@@ -336688,7 +337153,7 @@ var range = (a, b, str2) => {
|
|
|
336688
337153
|
return result;
|
|
336689
337154
|
};
|
|
336690
337155
|
|
|
336691
|
-
// ../../node_modules/.pnpm/brace-expansion@5.0.
|
|
337156
|
+
// ../../node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js
|
|
336692
337157
|
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
336693
337158
|
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
336694
337159
|
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
@@ -336798,7 +337263,7 @@ function expand_(str2, max4, isTop) {
|
|
|
336798
337263
|
const x2 = numeric(n[0]);
|
|
336799
337264
|
const y2 = numeric(n[1]);
|
|
336800
337265
|
const width = Math.max(n[0].length, n[1].length);
|
|
336801
|
-
let incr = n.length === 3 && n[2] !== void 0 ? Math.abs(numeric(n[2])) : 1;
|
|
337266
|
+
let incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
|
|
336802
337267
|
let test2 = lte;
|
|
336803
337268
|
const reverse = y2 < x2;
|
|
336804
337269
|
if (reverse) {
|