@storybook/addon-vitest 10.1.0-alpha.8 → 10.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_browser-chunks/chunk-TJXI7EIW.js +61 -0
- package/dist/_node-chunks/chunk-4GXXLLOJ.js +61 -0
- package/dist/_node-chunks/chunk-AP5IIXAM.js +339 -0
- package/dist/_node-chunks/chunk-BGBUUVQU.js +45 -0
- package/dist/_node-chunks/chunk-EDXFFK3M.js +38 -0
- package/dist/_node-chunks/chunk-ERO7LVWY.js +71 -0
- package/dist/_node-chunks/{chunk-E2BHHDMM.js → chunk-J7YOLKRX.js} +15 -24
- package/dist/_node-chunks/chunk-KJQIXLJD.js +138 -0
- package/dist/_node-chunks/chunk-LZHFU3IY.js +44 -0
- package/dist/_node-chunks/chunk-NTUEKICW.js +158 -0
- package/dist/index.js +1 -5
- package/dist/manager.js +274 -491
- package/dist/node/coverage-reporter.js +319 -864
- package/dist/node/vitest.js +201 -456
- package/dist/postinstall.js +497 -1502
- package/dist/preset.js +166 -349
- package/dist/vitest-plugin/global-setup.js +50 -106
- package/dist/vitest-plugin/index.js +1163 -2378
- package/dist/vitest-plugin/setup-file.js +6 -12
- package/dist/vitest-plugin/test-utils.js +31 -71
- package/package.json +3 -7
- package/dist/_browser-chunks/chunk-CAYLRBRX.js +0 -77
- package/dist/_browser-chunks/chunk-JK72E6FR.js +0 -6
- package/dist/_node-chunks/chunk-37QBGOBL.js +0 -2574
- package/dist/_node-chunks/chunk-4EU2HFAD.js +0 -37
- package/dist/_node-chunks/chunk-6S4X4RWE.js +0 -247
- package/dist/_node-chunks/chunk-CZTTZYY4.js +0 -481
- package/dist/_node-chunks/chunk-KKAUWLBT.js +0 -98
- package/dist/_node-chunks/chunk-OYLANTK3.js +0 -105
- package/dist/_node-chunks/chunk-QAVSDLTJ.js +0 -50
|
@@ -1,109 +1,61 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_2cm23o1mqpi from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_2cm23o1mqpi from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_2cm23o1mqpi from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_2cm23o1mqpi.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_2cm23o1mqpi.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_2cm23o1mqpi.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
require_picocolors
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-J7YOLKRX.js";
|
|
15
|
+
import {
|
|
16
|
+
require_dist
|
|
17
|
+
} from "../_node-chunks/chunk-4GXXLLOJ.js";
|
|
15
18
|
import {
|
|
16
19
|
join,
|
|
17
20
|
normalize,
|
|
18
21
|
relative,
|
|
19
22
|
resolve,
|
|
20
23
|
sep
|
|
21
|
-
} from "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-KJQIXLJD.js";
|
|
22
25
|
import {
|
|
23
26
|
__commonJS,
|
|
24
|
-
__name,
|
|
25
27
|
__require,
|
|
26
28
|
__toESM
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
29
|
+
} from "../_node-chunks/chunk-BGBUUVQU.js";
|
|
28
30
|
|
|
29
31
|
// ../../node_modules/braces/lib/utils.js
|
|
30
32
|
var require_utils = __commonJS({
|
|
31
33
|
"../../node_modules/braces/lib/utils.js"(exports) {
|
|
32
34
|
"use strict";
|
|
33
|
-
exports.isInteger = (num) =>
|
|
34
|
-
if (typeof num === "number") {
|
|
35
|
-
return Number.isInteger(num);
|
|
36
|
-
}
|
|
37
|
-
if (typeof num === "string" && num.trim() !== "") {
|
|
38
|
-
return Number.isInteger(Number(num));
|
|
39
|
-
}
|
|
40
|
-
return false;
|
|
41
|
-
};
|
|
35
|
+
exports.isInteger = (num) => typeof num == "number" ? Number.isInteger(num) : typeof num == "string" && num.trim() !== "" ? Number.isInteger(Number(num)) : !1;
|
|
42
36
|
exports.find = (node, type) => node.nodes.find((node2) => node2.type === type);
|
|
43
|
-
exports.exceedsLimit = (min, max, step = 1, limit) =>
|
|
44
|
-
if (limit === false) return false;
|
|
45
|
-
if (!exports.isInteger(min) || !exports.isInteger(max)) return false;
|
|
46
|
-
return (Number(max) - Number(min)) / Number(step) >= limit;
|
|
47
|
-
};
|
|
37
|
+
exports.exceedsLimit = (min, max, step = 1, limit) => limit === !1 || !exports.isInteger(min) || !exports.isInteger(max) ? !1 : (Number(max) - Number(min)) / Number(step) >= limit;
|
|
48
38
|
exports.escapeNode = (block, n = 0, type) => {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
if (type && node.type === type || node.type === "open" || node.type === "close") {
|
|
52
|
-
if (node.escaped !== true) {
|
|
53
|
-
node.value = "\\" + node.value;
|
|
54
|
-
node.escaped = true;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
exports.encloseBrace = (node) => {
|
|
59
|
-
if (node.type !== "brace") return false;
|
|
60
|
-
if (node.commas >> 0 + node.ranges >> 0 === 0) {
|
|
61
|
-
node.invalid = true;
|
|
62
|
-
return true;
|
|
63
|
-
}
|
|
64
|
-
return false;
|
|
65
|
-
};
|
|
66
|
-
exports.isInvalidBrace = (block) => {
|
|
67
|
-
if (block.type !== "brace") return false;
|
|
68
|
-
if (block.invalid === true || block.dollar) return true;
|
|
69
|
-
if (block.commas >> 0 + block.ranges >> 0 === 0) {
|
|
70
|
-
block.invalid = true;
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
if (block.open !== true || block.close !== true) {
|
|
74
|
-
block.invalid = true;
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return false;
|
|
78
|
-
};
|
|
79
|
-
exports.isOpenOrClose = (node) => {
|
|
80
|
-
if (node.type === "open" || node.type === "close") {
|
|
81
|
-
return true;
|
|
82
|
-
}
|
|
83
|
-
return node.open === true || node.close === true;
|
|
39
|
+
let node = block.nodes[n];
|
|
40
|
+
node && (type && node.type === type || node.type === "open" || node.type === "close") && node.escaped !== !0 && (node.value = "\\" + node.value, node.escaped = !0);
|
|
84
41
|
};
|
|
85
|
-
exports.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}, []);
|
|
42
|
+
exports.encloseBrace = (node) => node.type !== "brace" ? !1 : node.commas >> 0 + node.ranges >> 0 === 0 ? (node.invalid = !0, !0) : !1;
|
|
43
|
+
exports.isInvalidBrace = (block) => block.type !== "brace" ? !1 : block.invalid === !0 || block.dollar ? !0 : block.commas >> 0 + block.ranges >> 0 === 0 || block.open !== !0 || block.close !== !0 ? (block.invalid = !0, !0) : !1;
|
|
44
|
+
exports.isOpenOrClose = (node) => node.type === "open" || node.type === "close" ? !0 : node.open === !0 || node.close === !0;
|
|
45
|
+
exports.reduce = (nodes) => nodes.reduce((acc, node) => (node.type === "text" && acc.push(node.value), node.type === "range" && (node.type = "text"), acc), []);
|
|
90
46
|
exports.flatten = (...args) => {
|
|
91
|
-
|
|
92
|
-
const flat = /* @__PURE__ */ __name((arr) => {
|
|
47
|
+
let result = [], flat = (arr) => {
|
|
93
48
|
for (let i = 0; i < arr.length; i++) {
|
|
94
|
-
|
|
49
|
+
let ele = arr[i];
|
|
95
50
|
if (Array.isArray(ele)) {
|
|
96
51
|
flat(ele);
|
|
97
52
|
continue;
|
|
98
53
|
}
|
|
99
|
-
|
|
100
|
-
result.push(ele);
|
|
101
|
-
}
|
|
54
|
+
ele !== void 0 && result.push(ele);
|
|
102
55
|
}
|
|
103
56
|
return result;
|
|
104
|
-
}
|
|
105
|
-
flat(args);
|
|
106
|
-
return result;
|
|
57
|
+
};
|
|
58
|
+
return flat(args), result;
|
|
107
59
|
};
|
|
108
60
|
}
|
|
109
61
|
});
|
|
@@ -114,26 +66,17 @@ var require_stringify = __commonJS({
|
|
|
114
66
|
"use strict";
|
|
115
67
|
var utils = require_utils();
|
|
116
68
|
module.exports = (ast, options = {}) => {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
if (node.value)
|
|
122
|
-
if ((invalidBlock || invalidNode) && utils.isOpenOrClose(node)) {
|
|
123
|
-
return "\\" + node.value;
|
|
124
|
-
}
|
|
125
|
-
return node.value;
|
|
126
|
-
}
|
|
127
|
-
if (node.value) {
|
|
69
|
+
let stringify = (node, parent = {}) => {
|
|
70
|
+
let invalidBlock = options.escapeInvalid && utils.isInvalidBrace(parent), invalidNode = node.invalid === !0 && options.escapeInvalid === !0, output = "";
|
|
71
|
+
if (node.value)
|
|
72
|
+
return (invalidBlock || invalidNode) && utils.isOpenOrClose(node) ? "\\" + node.value : node.value;
|
|
73
|
+
if (node.value)
|
|
128
74
|
return node.value;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
for (const child of node.nodes) {
|
|
75
|
+
if (node.nodes)
|
|
76
|
+
for (let child of node.nodes)
|
|
132
77
|
output += stringify(child);
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
78
|
return output;
|
|
136
|
-
}
|
|
79
|
+
};
|
|
137
80
|
return stringify(ast);
|
|
138
81
|
};
|
|
139
82
|
}
|
|
@@ -144,13 +87,7 @@ var require_is_number = __commonJS({
|
|
|
144
87
|
"../../node_modules/is-number/index.js"(exports, module) {
|
|
145
88
|
"use strict";
|
|
146
89
|
module.exports = function(num) {
|
|
147
|
-
|
|
148
|
-
return num - num === 0;
|
|
149
|
-
}
|
|
150
|
-
if (typeof num === "string" && num.trim() !== "") {
|
|
151
|
-
return Number.isFinite ? Number.isFinite(+num) : isFinite(+num);
|
|
152
|
-
}
|
|
153
|
-
return false;
|
|
90
|
+
return typeof num == "number" ? num - num === 0 : typeof num == "string" && num.trim() !== "" ? Number.isFinite ? Number.isFinite(+num) : isFinite(+num) : !1;
|
|
154
91
|
};
|
|
155
92
|
}
|
|
156
93
|
});
|
|
@@ -159,208 +96,103 @@ var require_is_number = __commonJS({
|
|
|
159
96
|
var require_to_regex_range = __commonJS({
|
|
160
97
|
"../../node_modules/to-regex-range/index.js"(exports, module) {
|
|
161
98
|
"use strict";
|
|
162
|
-
var isNumber = require_is_number()
|
|
163
|
-
|
|
164
|
-
if (isNumber(min) === false) {
|
|
99
|
+
var isNumber = require_is_number(), toRegexRange = (min, max, options) => {
|
|
100
|
+
if (isNumber(min) === !1)
|
|
165
101
|
throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
166
|
-
|
|
167
|
-
if (max === void 0 || min === max) {
|
|
102
|
+
if (max === void 0 || min === max)
|
|
168
103
|
return String(min);
|
|
169
|
-
|
|
170
|
-
if (isNumber(max) === false) {
|
|
104
|
+
if (isNumber(max) === !1)
|
|
171
105
|
throw new TypeError("toRegexRange: expected the second argument to be a number.");
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}
|
|
177
|
-
let relax = String(opts.relaxZeros);
|
|
178
|
-
let shorthand = String(opts.shorthand);
|
|
179
|
-
let capture = String(opts.capture);
|
|
180
|
-
let wrap = String(opts.wrap);
|
|
181
|
-
let cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
|
|
182
|
-
if (toRegexRange.cache.hasOwnProperty(cacheKey)) {
|
|
106
|
+
let opts = { relaxZeros: !0, ...options };
|
|
107
|
+
typeof opts.strictZeros == "boolean" && (opts.relaxZeros = opts.strictZeros === !1);
|
|
108
|
+
let relax = String(opts.relaxZeros), shorthand = String(opts.shorthand), capture = String(opts.capture), wrap = String(opts.wrap), cacheKey = min + ":" + max + "=" + relax + shorthand + capture + wrap;
|
|
109
|
+
if (toRegexRange.cache.hasOwnProperty(cacheKey))
|
|
183
110
|
return toRegexRange.cache[cacheKey].result;
|
|
184
|
-
|
|
185
|
-
let a = Math.min(min, max);
|
|
186
|
-
let b = Math.max(min, max);
|
|
111
|
+
let a = Math.min(min, max), b = Math.max(min, max);
|
|
187
112
|
if (Math.abs(a - b) === 1) {
|
|
188
113
|
let result = min + "|" + max;
|
|
189
|
-
|
|
190
|
-
return `(${result})`;
|
|
191
|
-
}
|
|
192
|
-
if (opts.wrap === false) {
|
|
193
|
-
return result;
|
|
194
|
-
}
|
|
195
|
-
return `(?:${result})`;
|
|
114
|
+
return opts.capture ? `(${result})` : opts.wrap === !1 ? result : `(?:${result})`;
|
|
196
115
|
}
|
|
197
|
-
let isPadded = hasPadding(min) || hasPadding(max);
|
|
198
|
-
|
|
199
|
-
let positives = [];
|
|
200
|
-
let negatives = [];
|
|
201
|
-
if (isPadded) {
|
|
202
|
-
state.isPadded = isPadded;
|
|
203
|
-
state.maxLen = String(state.max).length;
|
|
204
|
-
}
|
|
205
|
-
if (a < 0) {
|
|
116
|
+
let isPadded = hasPadding(min) || hasPadding(max), state = { min, max, a, b }, positives = [], negatives = [];
|
|
117
|
+
if (isPadded && (state.isPadded = isPadded, state.maxLen = String(state.max).length), a < 0) {
|
|
206
118
|
let newMin = b < 0 ? Math.abs(b) : 1;
|
|
207
|
-
negatives = splitToPatterns(newMin, Math.abs(a), state, opts);
|
|
208
|
-
a = state.a = 0;
|
|
209
|
-
}
|
|
210
|
-
if (b >= 0) {
|
|
211
|
-
positives = splitToPatterns(a, b, state, opts);
|
|
212
|
-
}
|
|
213
|
-
state.negatives = negatives;
|
|
214
|
-
state.positives = positives;
|
|
215
|
-
state.result = collatePatterns(negatives, positives, opts);
|
|
216
|
-
if (opts.capture === true) {
|
|
217
|
-
state.result = `(${state.result})`;
|
|
218
|
-
} else if (opts.wrap !== false && positives.length + negatives.length > 1) {
|
|
219
|
-
state.result = `(?:${state.result})`;
|
|
119
|
+
negatives = splitToPatterns(newMin, Math.abs(a), state, opts), a = state.a = 0;
|
|
220
120
|
}
|
|
221
|
-
toRegexRange.cache[cacheKey] = state;
|
|
222
|
-
|
|
223
|
-
}, "toRegexRange");
|
|
121
|
+
return b >= 0 && (positives = splitToPatterns(a, b, state, opts)), state.negatives = negatives, state.positives = positives, state.result = collatePatterns(negatives, positives, opts), opts.capture === !0 ? state.result = `(${state.result})` : opts.wrap !== !1 && positives.length + negatives.length > 1 && (state.result = `(?:${state.result})`), toRegexRange.cache[cacheKey] = state, state.result;
|
|
122
|
+
};
|
|
224
123
|
function collatePatterns(neg, pos, options) {
|
|
225
|
-
let onlyNegative = filterPatterns(neg, pos, "-",
|
|
226
|
-
|
|
227
|
-
let intersected = filterPatterns(neg, pos, "-?", true, options) || [];
|
|
228
|
-
let subpatterns = onlyNegative.concat(intersected).concat(onlyPositive);
|
|
229
|
-
return subpatterns.join("|");
|
|
124
|
+
let onlyNegative = filterPatterns(neg, pos, "-", !1, options) || [], onlyPositive = filterPatterns(pos, neg, "", !1, options) || [], intersected = filterPatterns(neg, pos, "-?", !0, options) || [];
|
|
125
|
+
return onlyNegative.concat(intersected).concat(onlyPositive).join("|");
|
|
230
126
|
}
|
|
231
|
-
__name(collatePatterns, "collatePatterns");
|
|
232
127
|
function splitToRanges(min, max) {
|
|
233
|
-
let nines = 1;
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
nines += 1;
|
|
240
|
-
stop = countNines(min, nines);
|
|
241
|
-
}
|
|
242
|
-
stop = countZeros(max + 1, zeros) - 1;
|
|
243
|
-
while (min < stop && stop <= max) {
|
|
244
|
-
stops.add(stop);
|
|
245
|
-
zeros += 1;
|
|
246
|
-
stop = countZeros(max + 1, zeros) - 1;
|
|
247
|
-
}
|
|
248
|
-
stops = [...stops];
|
|
249
|
-
stops.sort(compare);
|
|
250
|
-
return stops;
|
|
128
|
+
let nines = 1, zeros = 1, stop = countNines(min, nines), stops = /* @__PURE__ */ new Set([max]);
|
|
129
|
+
for (; min <= stop && stop <= max; )
|
|
130
|
+
stops.add(stop), nines += 1, stop = countNines(min, nines);
|
|
131
|
+
for (stop = countZeros(max + 1, zeros) - 1; min < stop && stop <= max; )
|
|
132
|
+
stops.add(stop), zeros += 1, stop = countZeros(max + 1, zeros) - 1;
|
|
133
|
+
return stops = [...stops], stops.sort(compare), stops;
|
|
251
134
|
}
|
|
252
|
-
__name(splitToRanges, "splitToRanges");
|
|
253
135
|
function rangeToPattern(start, stop, options) {
|
|
254
|
-
if (start === stop)
|
|
136
|
+
if (start === stop)
|
|
255
137
|
return { pattern: start, count: [], digits: 0 };
|
|
256
|
-
|
|
257
|
-
let zipped = zip(start, stop);
|
|
258
|
-
let digits = zipped.length;
|
|
259
|
-
let pattern = "";
|
|
260
|
-
let count = 0;
|
|
138
|
+
let zipped = zip(start, stop), digits = zipped.length, pattern = "", count = 0;
|
|
261
139
|
for (let i = 0; i < digits; i++) {
|
|
262
140
|
let [startDigit, stopDigit] = zipped[i];
|
|
263
|
-
|
|
264
|
-
pattern += startDigit;
|
|
265
|
-
} else if (startDigit !== "0" || stopDigit !== "9") {
|
|
266
|
-
pattern += toCharacterClass(startDigit, stopDigit, options);
|
|
267
|
-
} else {
|
|
268
|
-
count++;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
if (count) {
|
|
272
|
-
pattern += options.shorthand === true ? "\\d" : "[0-9]";
|
|
141
|
+
startDigit === stopDigit ? pattern += startDigit : startDigit !== "0" || stopDigit !== "9" ? pattern += toCharacterClass(startDigit, stopDigit, options) : count++;
|
|
273
142
|
}
|
|
274
|
-
return { pattern, count: [count], digits };
|
|
143
|
+
return count && (pattern += options.shorthand === !0 ? "\\d" : "[0-9]"), { pattern, count: [count], digits };
|
|
275
144
|
}
|
|
276
|
-
__name(rangeToPattern, "rangeToPattern");
|
|
277
145
|
function splitToPatterns(min, max, tok, options) {
|
|
278
|
-
let ranges = splitToRanges(min, max);
|
|
279
|
-
let tokens = [];
|
|
280
|
-
let start = min;
|
|
281
|
-
let prev;
|
|
146
|
+
let ranges = splitToRanges(min, max), tokens = [], start = min, prev;
|
|
282
147
|
for (let i = 0; i < ranges.length; i++) {
|
|
283
|
-
let max2 = ranges[i];
|
|
284
|
-
let obj = rangeToPattern(String(start), String(max2), options);
|
|
285
|
-
let zeros = "";
|
|
148
|
+
let max2 = ranges[i], obj = rangeToPattern(String(start), String(max2), options), zeros = "";
|
|
286
149
|
if (!tok.isPadded && prev && prev.pattern === obj.pattern) {
|
|
287
|
-
|
|
288
|
-
prev.count.pop();
|
|
289
|
-
}
|
|
290
|
-
prev.count.push(obj.count[0]);
|
|
291
|
-
prev.string = prev.pattern + toQuantifier(prev.count);
|
|
292
|
-
start = max2 + 1;
|
|
150
|
+
prev.count.length > 1 && prev.count.pop(), prev.count.push(obj.count[0]), prev.string = prev.pattern + toQuantifier(prev.count), start = max2 + 1;
|
|
293
151
|
continue;
|
|
294
152
|
}
|
|
295
|
-
|
|
296
|
-
zeros = padZeros(max2, tok, options);
|
|
297
|
-
}
|
|
298
|
-
obj.string = zeros + obj.pattern + toQuantifier(obj.count);
|
|
299
|
-
tokens.push(obj);
|
|
300
|
-
start = max2 + 1;
|
|
301
|
-
prev = obj;
|
|
153
|
+
tok.isPadded && (zeros = padZeros(max2, tok, options)), obj.string = zeros + obj.pattern + toQuantifier(obj.count), tokens.push(obj), start = max2 + 1, prev = obj;
|
|
302
154
|
}
|
|
303
155
|
return tokens;
|
|
304
156
|
}
|
|
305
|
-
__name(splitToPatterns, "splitToPatterns");
|
|
306
157
|
function filterPatterns(arr, comparison, prefix, intersection, options) {
|
|
307
158
|
let result = [];
|
|
308
159
|
for (let ele of arr) {
|
|
309
160
|
let { string } = ele;
|
|
310
|
-
|
|
311
|
-
result.push(prefix + string);
|
|
312
|
-
}
|
|
313
|
-
if (intersection && contains(comparison, "string", string)) {
|
|
314
|
-
result.push(prefix + string);
|
|
315
|
-
}
|
|
161
|
+
!intersection && !contains(comparison, "string", string) && result.push(prefix + string), intersection && contains(comparison, "string", string) && result.push(prefix + string);
|
|
316
162
|
}
|
|
317
163
|
return result;
|
|
318
164
|
}
|
|
319
|
-
__name(filterPatterns, "filterPatterns");
|
|
320
165
|
function zip(a, b) {
|
|
321
166
|
let arr = [];
|
|
322
167
|
for (let i = 0; i < a.length; i++) arr.push([a[i], b[i]]);
|
|
323
168
|
return arr;
|
|
324
169
|
}
|
|
325
|
-
__name(zip, "zip");
|
|
326
170
|
function compare(a, b) {
|
|
327
171
|
return a > b ? 1 : b > a ? -1 : 0;
|
|
328
172
|
}
|
|
329
|
-
__name(compare, "compare");
|
|
330
173
|
function contains(arr, key, val) {
|
|
331
174
|
return arr.some((ele) => ele[key] === val);
|
|
332
175
|
}
|
|
333
|
-
__name(contains, "contains");
|
|
334
176
|
function countNines(min, len) {
|
|
335
177
|
return Number(String(min).slice(0, -len) + "9".repeat(len));
|
|
336
178
|
}
|
|
337
|
-
__name(countNines, "countNines");
|
|
338
179
|
function countZeros(integer, zeros) {
|
|
339
180
|
return integer - integer % Math.pow(10, zeros);
|
|
340
181
|
}
|
|
341
|
-
__name(countZeros, "countZeros");
|
|
342
182
|
function toQuantifier(digits) {
|
|
343
183
|
let [start = 0, stop = ""] = digits;
|
|
344
|
-
|
|
345
|
-
return `{${start + (stop ? "," + stop : "")}}`;
|
|
346
|
-
}
|
|
347
|
-
return "";
|
|
184
|
+
return stop || start > 1 ? `{${start + (stop ? "," + stop : "")}}` : "";
|
|
348
185
|
}
|
|
349
|
-
__name(toQuantifier, "toQuantifier");
|
|
350
186
|
function toCharacterClass(a, b, options) {
|
|
351
187
|
return `[${a}${b - a === 1 ? "" : "-"}${b}]`;
|
|
352
188
|
}
|
|
353
|
-
__name(toCharacterClass, "toCharacterClass");
|
|
354
189
|
function hasPadding(str) {
|
|
355
190
|
return /^-?(0+)\d/.test(str);
|
|
356
191
|
}
|
|
357
|
-
__name(hasPadding, "hasPadding");
|
|
358
192
|
function padZeros(value, tok, options) {
|
|
359
|
-
if (!tok.isPadded)
|
|
193
|
+
if (!tok.isPadded)
|
|
360
194
|
return value;
|
|
361
|
-
|
|
362
|
-
let diff = Math.abs(tok.maxLen - String(value).length);
|
|
363
|
-
let relax = options.relaxZeros !== false;
|
|
195
|
+
let diff = Math.abs(tok.maxLen - String(value).length), relax = options.relaxZeros !== !1;
|
|
364
196
|
switch (diff) {
|
|
365
197
|
case 0:
|
|
366
198
|
return "";
|
|
@@ -368,12 +200,10 @@ var require_to_regex_range = __commonJS({
|
|
|
368
200
|
return relax ? "0?" : "0";
|
|
369
201
|
case 2:
|
|
370
202
|
return relax ? "0{0,2}" : "00";
|
|
371
|
-
default:
|
|
203
|
+
default:
|
|
372
204
|
return relax ? `0{0,${diff}}` : `0{${diff}}`;
|
|
373
|
-
}
|
|
374
205
|
}
|
|
375
206
|
}
|
|
376
|
-
__name(padZeros, "padZeros");
|
|
377
207
|
toRegexRange.cache = {};
|
|
378
208
|
toRegexRange.clearCache = () => toRegexRange.cache = {};
|
|
379
209
|
module.exports = toRegexRange;
|
|
@@ -384,192 +214,83 @@ var require_to_regex_range = __commonJS({
|
|
|
384
214
|
var require_fill_range = __commonJS({
|
|
385
215
|
"../../node_modules/fill-range/index.js"(exports, module) {
|
|
386
216
|
"use strict";
|
|
387
|
-
var util = __require("util")
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
return (value) => toNumber === true ? Number(value) : String(value);
|
|
392
|
-
}, "transform");
|
|
393
|
-
var isValidValue = /* @__PURE__ */ __name((value) => {
|
|
394
|
-
return typeof value === "number" || typeof value === "string" && value !== "";
|
|
395
|
-
}, "isValidValue");
|
|
396
|
-
var isNumber = /* @__PURE__ */ __name((num) => Number.isInteger(+num), "isNumber");
|
|
397
|
-
var zeros = /* @__PURE__ */ __name((input) => {
|
|
398
|
-
let value = `${input}`;
|
|
399
|
-
let index = -1;
|
|
400
|
-
if (value[0] === "-") value = value.slice(1);
|
|
401
|
-
if (value === "0") return false;
|
|
402
|
-
while (value[++index] === "0") ;
|
|
217
|
+
var util = __require("util"), toRegexRange = require_to_regex_range(), isObject = (val) => val !== null && typeof val == "object" && !Array.isArray(val), transform = (toNumber) => (value) => toNumber === !0 ? Number(value) : String(value), isValidValue = (value) => typeof value == "number" || typeof value == "string" && value !== "", isNumber = (num) => Number.isInteger(+num), zeros = (input) => {
|
|
218
|
+
let value = `${input}`, index = -1;
|
|
219
|
+
if (value[0] === "-" && (value = value.slice(1)), value === "0") return !1;
|
|
220
|
+
for (; value[++index] === "0"; ) ;
|
|
403
221
|
return index > 0;
|
|
404
|
-
}, "
|
|
405
|
-
var stringify = /* @__PURE__ */ __name((start, end, options) => {
|
|
406
|
-
if (typeof start === "string" || typeof end === "string") {
|
|
407
|
-
return true;
|
|
408
|
-
}
|
|
409
|
-
return options.stringify === true;
|
|
410
|
-
}, "stringify");
|
|
411
|
-
var pad = /* @__PURE__ */ __name((input, maxLength, toNumber) => {
|
|
222
|
+
}, stringify = (start, end, options) => typeof start == "string" || typeof end == "string" ? !0 : options.stringify === !0, pad = (input, maxLength, toNumber) => {
|
|
412
223
|
if (maxLength > 0) {
|
|
413
224
|
let dash = input[0] === "-" ? "-" : "";
|
|
414
|
-
|
|
415
|
-
input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
|
|
416
|
-
}
|
|
417
|
-
if (toNumber === false) {
|
|
418
|
-
return String(input);
|
|
225
|
+
dash && (input = input.slice(1)), input = dash + input.padStart(dash ? maxLength - 1 : maxLength, "0");
|
|
419
226
|
}
|
|
420
|
-
return input;
|
|
421
|
-
},
|
|
422
|
-
var toMaxLen = /* @__PURE__ */ __name((input, maxLength) => {
|
|
227
|
+
return toNumber === !1 ? String(input) : input;
|
|
228
|
+
}, toMaxLen = (input, maxLength) => {
|
|
423
229
|
let negative = input[0] === "-" ? "-" : "";
|
|
424
|
-
|
|
425
|
-
input = input.slice(1);
|
|
426
|
-
maxLength--;
|
|
427
|
-
}
|
|
428
|
-
while (input.length < maxLength) input = "0" + input;
|
|
230
|
+
for (negative && (input = input.slice(1), maxLength--); input.length < maxLength; ) input = "0" + input;
|
|
429
231
|
return negative ? "-" + input : input;
|
|
430
|
-
},
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
parts.positives.
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
let result;
|
|
438
|
-
if (parts.positives.length) {
|
|
439
|
-
positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|");
|
|
440
|
-
}
|
|
441
|
-
if (parts.negatives.length) {
|
|
442
|
-
negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`;
|
|
443
|
-
}
|
|
444
|
-
if (positives && negatives) {
|
|
445
|
-
result = `${positives}|${negatives}`;
|
|
446
|
-
} else {
|
|
447
|
-
result = positives || negatives;
|
|
448
|
-
}
|
|
449
|
-
if (options.wrap) {
|
|
450
|
-
return `(${prefix}${result})`;
|
|
451
|
-
}
|
|
452
|
-
return result;
|
|
453
|
-
}, "toSequence");
|
|
454
|
-
var toRange = /* @__PURE__ */ __name((a, b, isNumbers, options) => {
|
|
455
|
-
if (isNumbers) {
|
|
456
|
-
return toRegexRange(a, b, { wrap: false, ...options });
|
|
457
|
-
}
|
|
232
|
+
}, toSequence = (parts, options, maxLen) => {
|
|
233
|
+
parts.negatives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0), parts.positives.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
|
|
234
|
+
let prefix = options.capture ? "" : "?:", positives = "", negatives = "", result;
|
|
235
|
+
return parts.positives.length && (positives = parts.positives.map((v) => toMaxLen(String(v), maxLen)).join("|")), parts.negatives.length && (negatives = `-(${prefix}${parts.negatives.map((v) => toMaxLen(String(v), maxLen)).join("|")})`), positives && negatives ? result = `${positives}|${negatives}` : result = positives || negatives, options.wrap ? `(${prefix}${result})` : result;
|
|
236
|
+
}, toRange = (a, b, isNumbers, options) => {
|
|
237
|
+
if (isNumbers)
|
|
238
|
+
return toRegexRange(a, b, { wrap: !1, ...options });
|
|
458
239
|
let start = String.fromCharCode(a);
|
|
459
240
|
if (a === b) return start;
|
|
460
241
|
let stop = String.fromCharCode(b);
|
|
461
242
|
return `[${start}-${stop}]`;
|
|
462
|
-
},
|
|
463
|
-
var toRegex = /* @__PURE__ */ __name((start, end, options) => {
|
|
243
|
+
}, toRegex = (start, end, options) => {
|
|
464
244
|
if (Array.isArray(start)) {
|
|
465
|
-
let wrap = options.wrap ===
|
|
466
|
-
let prefix = options.capture ? "" : "?:";
|
|
245
|
+
let wrap = options.wrap === !0, prefix = options.capture ? "" : "?:";
|
|
467
246
|
return wrap ? `(${prefix}${start.join("|")})` : start.join("|");
|
|
468
247
|
}
|
|
469
248
|
return toRegexRange(start, end, options);
|
|
470
|
-
}, "
|
|
471
|
-
|
|
472
|
-
return new RangeError("Invalid range arguments: " + util.inspect(...args));
|
|
473
|
-
}, "rangeError");
|
|
474
|
-
var invalidRange = /* @__PURE__ */ __name((start, end, options) => {
|
|
475
|
-
if (options.strictRanges === true) throw rangeError([start, end]);
|
|
249
|
+
}, rangeError = (...args) => new RangeError("Invalid range arguments: " + util.inspect(...args)), invalidRange = (start, end, options) => {
|
|
250
|
+
if (options.strictRanges === !0) throw rangeError([start, end]);
|
|
476
251
|
return [];
|
|
477
|
-
},
|
|
478
|
-
|
|
479
|
-
if (options.strictRanges === true) {
|
|
252
|
+
}, invalidStep = (step, options) => {
|
|
253
|
+
if (options.strictRanges === !0)
|
|
480
254
|
throw new TypeError(`Expected step "${step}" to be a number`);
|
|
481
|
-
}
|
|
482
255
|
return [];
|
|
483
|
-
},
|
|
484
|
-
|
|
485
|
-
let a = Number(start);
|
|
486
|
-
let b = Number(end);
|
|
256
|
+
}, fillNumbers = (start, end, step = 1, options = {}) => {
|
|
257
|
+
let a = Number(start), b = Number(end);
|
|
487
258
|
if (!Number.isInteger(a) || !Number.isInteger(b)) {
|
|
488
|
-
if (options.strictRanges ===
|
|
259
|
+
if (options.strictRanges === !0) throw rangeError([start, end]);
|
|
489
260
|
return [];
|
|
490
261
|
}
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
let descending = a > b;
|
|
494
|
-
let startString = String(start);
|
|
495
|
-
let endString = String(end);
|
|
496
|
-
let stepString = String(step);
|
|
262
|
+
a === 0 && (a = 0), b === 0 && (b = 0);
|
|
263
|
+
let descending = a > b, startString = String(start), endString = String(end), stepString = String(step);
|
|
497
264
|
step = Math.max(Math.abs(step), 1);
|
|
498
|
-
let padded = zeros(startString) || zeros(endString) || zeros(stepString);
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
let
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
let range = [];
|
|
508
|
-
let index = 0;
|
|
509
|
-
while (descending ? a >= b : a <= b) {
|
|
510
|
-
if (options.toRegex === true && step > 1) {
|
|
511
|
-
push(a);
|
|
512
|
-
} else {
|
|
513
|
-
range.push(pad(format(a, index), maxLen, toNumber));
|
|
514
|
-
}
|
|
515
|
-
a = descending ? a - step : a + step;
|
|
516
|
-
index++;
|
|
517
|
-
}
|
|
518
|
-
if (options.toRegex === true) {
|
|
519
|
-
return step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: false, ...options });
|
|
520
|
-
}
|
|
521
|
-
return range;
|
|
522
|
-
}, "fillNumbers");
|
|
523
|
-
var fillLetters = /* @__PURE__ */ __name((start, end, step = 1, options = {}) => {
|
|
524
|
-
if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1) {
|
|
265
|
+
let padded = zeros(startString) || zeros(endString) || zeros(stepString), maxLen = padded ? Math.max(startString.length, endString.length, stepString.length) : 0, toNumber = padded === !1 && stringify(start, end, options) === !1, format = options.transform || transform(toNumber);
|
|
266
|
+
if (options.toRegex && step === 1)
|
|
267
|
+
return toRange(toMaxLen(start, maxLen), toMaxLen(end, maxLen), !0, options);
|
|
268
|
+
let parts = { negatives: [], positives: [] }, push = (num) => parts[num < 0 ? "negatives" : "positives"].push(Math.abs(num)), range = [], index = 0;
|
|
269
|
+
for (; descending ? a >= b : a <= b; )
|
|
270
|
+
options.toRegex === !0 && step > 1 ? push(a) : range.push(pad(format(a, index), maxLen, toNumber)), a = descending ? a - step : a + step, index++;
|
|
271
|
+
return options.toRegex === !0 ? step > 1 ? toSequence(parts, options, maxLen) : toRegex(range, null, { wrap: !1, ...options }) : range;
|
|
272
|
+
}, fillLetters = (start, end, step = 1, options = {}) => {
|
|
273
|
+
if (!isNumber(start) && start.length > 1 || !isNumber(end) && end.length > 1)
|
|
525
274
|
return invalidRange(start, end, options);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
let
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
}
|
|
536
|
-
let range = [];
|
|
537
|
-
let index = 0;
|
|
538
|
-
while (descending ? a >= b : a <= b) {
|
|
539
|
-
range.push(format(a, index));
|
|
540
|
-
a = descending ? a - step : a + step;
|
|
541
|
-
index++;
|
|
542
|
-
}
|
|
543
|
-
if (options.toRegex === true) {
|
|
544
|
-
return toRegex(range, null, { wrap: false, options });
|
|
545
|
-
}
|
|
546
|
-
return range;
|
|
547
|
-
}, "fillLetters");
|
|
548
|
-
var fill = /* @__PURE__ */ __name((start, end, step, options = {}) => {
|
|
549
|
-
if (end == null && isValidValue(start)) {
|
|
275
|
+
let format = options.transform || ((val) => String.fromCharCode(val)), a = `${start}`.charCodeAt(0), b = `${end}`.charCodeAt(0), descending = a > b, min = Math.min(a, b), max = Math.max(a, b);
|
|
276
|
+
if (options.toRegex && step === 1)
|
|
277
|
+
return toRange(min, max, !1, options);
|
|
278
|
+
let range = [], index = 0;
|
|
279
|
+
for (; descending ? a >= b : a <= b; )
|
|
280
|
+
range.push(format(a, index)), a = descending ? a - step : a + step, index++;
|
|
281
|
+
return options.toRegex === !0 ? toRegex(range, null, { wrap: !1, options }) : range;
|
|
282
|
+
}, fill = (start, end, step, options = {}) => {
|
|
283
|
+
if (end == null && isValidValue(start))
|
|
550
284
|
return [start];
|
|
551
|
-
|
|
552
|
-
if (!isValidValue(start) || !isValidValue(end)) {
|
|
285
|
+
if (!isValidValue(start) || !isValidValue(end))
|
|
553
286
|
return invalidRange(start, end, options);
|
|
554
|
-
|
|
555
|
-
if (typeof step === "function") {
|
|
287
|
+
if (typeof step == "function")
|
|
556
288
|
return fill(start, end, 1, { transform: step });
|
|
557
|
-
|
|
558
|
-
if (isObject(step)) {
|
|
289
|
+
if (isObject(step))
|
|
559
290
|
return fill(start, end, 0, step);
|
|
560
|
-
}
|
|
561
291
|
let opts = { ...options };
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
if (!isNumber(step)) {
|
|
565
|
-
if (step != null && !isObject(step)) return invalidStep(step, opts);
|
|
566
|
-
return fill(start, end, 1, step);
|
|
567
|
-
}
|
|
568
|
-
if (isNumber(start) && isNumber(end)) {
|
|
569
|
-
return fillNumbers(start, end, step, opts);
|
|
570
|
-
}
|
|
571
|
-
return fillLetters(start, end, Math.max(Math.abs(step), 1), opts);
|
|
572
|
-
}, "fill");
|
|
292
|
+
return opts.capture === !0 && (opts.wrap = !0), step = step || opts.step || 1, isNumber(step) ? isNumber(start) && isNumber(end) ? fillNumbers(start, end, step, opts) : fillLetters(start, end, Math.max(Math.abs(step), 1), opts) : step != null && !isObject(step) ? invalidStep(step, opts) : fill(start, end, 1, step);
|
|
293
|
+
};
|
|
573
294
|
module.exports = fill;
|
|
574
295
|
}
|
|
575
296
|
});
|
|
@@ -578,50 +299,33 @@ var require_fill_range = __commonJS({
|
|
|
578
299
|
var require_compile = __commonJS({
|
|
579
300
|
"../../node_modules/braces/lib/compile.js"(exports, module) {
|
|
580
301
|
"use strict";
|
|
581
|
-
var fill = require_fill_range()
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
const invalidBlock = utils.isInvalidBrace(parent);
|
|
586
|
-
const invalidNode = node.invalid === true && options.escapeInvalid === true;
|
|
587
|
-
const invalid = invalidBlock === true || invalidNode === true;
|
|
588
|
-
const prefix = options.escapeInvalid === true ? "\\" : "";
|
|
589
|
-
let output = "";
|
|
590
|
-
if (node.isOpen === true) {
|
|
591
|
-
return prefix + node.value;
|
|
592
|
-
}
|
|
593
|
-
if (node.isClose === true) {
|
|
594
|
-
console.log("node.isClose", prefix, node.value);
|
|
302
|
+
var fill = require_fill_range(), utils = require_utils(), compile = (ast, options = {}) => {
|
|
303
|
+
let walk = (node, parent = {}) => {
|
|
304
|
+
let invalidBlock = utils.isInvalidBrace(parent), invalidNode = node.invalid === !0 && options.escapeInvalid === !0, invalid = invalidBlock === !0 || invalidNode === !0, prefix = options.escapeInvalid === !0 ? "\\" : "", output = "";
|
|
305
|
+
if (node.isOpen === !0)
|
|
595
306
|
return prefix + node.value;
|
|
596
|
-
|
|
597
|
-
|
|
307
|
+
if (node.isClose === !0)
|
|
308
|
+
return console.log("node.isClose", prefix, node.value), prefix + node.value;
|
|
309
|
+
if (node.type === "open")
|
|
598
310
|
return invalid ? prefix + node.value : "(";
|
|
599
|
-
|
|
600
|
-
if (node.type === "close") {
|
|
311
|
+
if (node.type === "close")
|
|
601
312
|
return invalid ? prefix + node.value : ")";
|
|
602
|
-
|
|
603
|
-
if (node.type === "comma") {
|
|
313
|
+
if (node.type === "comma")
|
|
604
314
|
return node.prev.type === "comma" ? "" : invalid ? node.value : "|";
|
|
605
|
-
|
|
606
|
-
if (node.value) {
|
|
315
|
+
if (node.value)
|
|
607
316
|
return node.value;
|
|
608
|
-
}
|
|
609
317
|
if (node.nodes && node.ranges > 0) {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
if (range.length !== 0) {
|
|
318
|
+
let args = utils.reduce(node.nodes), range = fill(...args, { ...options, wrap: !1, toRegex: !0, strictZeros: !0 });
|
|
319
|
+
if (range.length !== 0)
|
|
613
320
|
return args.length > 1 && range.length > 1 ? `(${range})` : range;
|
|
614
|
-
}
|
|
615
321
|
}
|
|
616
|
-
if (node.nodes)
|
|
617
|
-
for (
|
|
322
|
+
if (node.nodes)
|
|
323
|
+
for (let child of node.nodes)
|
|
618
324
|
output += walk(child, node);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
325
|
return output;
|
|
622
|
-
}
|
|
326
|
+
};
|
|
623
327
|
return walk(ast);
|
|
624
|
-
}
|
|
328
|
+
};
|
|
625
329
|
module.exports = compile;
|
|
626
330
|
}
|
|
627
331
|
});
|
|
@@ -630,74 +334,48 @@ var require_compile = __commonJS({
|
|
|
630
334
|
var require_expand = __commonJS({
|
|
631
335
|
"../../node_modules/braces/lib/expand.js"(exports, module) {
|
|
632
336
|
"use strict";
|
|
633
|
-
var fill = require_fill_range()
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
const result = [];
|
|
638
|
-
queue = [].concat(queue);
|
|
639
|
-
stash = [].concat(stash);
|
|
640
|
-
if (!stash.length) return queue;
|
|
641
|
-
if (!queue.length) {
|
|
337
|
+
var fill = require_fill_range(), stringify = require_stringify(), utils = require_utils(), append = (queue = "", stash = "", enclose = !1) => {
|
|
338
|
+
let result = [];
|
|
339
|
+
if (queue = [].concat(queue), stash = [].concat(stash), !stash.length) return queue;
|
|
340
|
+
if (!queue.length)
|
|
642
341
|
return enclose ? utils.flatten(stash).map((ele) => `{${ele}}`) : stash;
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
for (const value of item) {
|
|
342
|
+
for (let item of queue)
|
|
343
|
+
if (Array.isArray(item))
|
|
344
|
+
for (let value of item)
|
|
647
345
|
result.push(append(value, stash, enclose));
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
if (enclose === true && typeof ele === "string") ele = `{${ele}}`;
|
|
652
|
-
result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
}
|
|
346
|
+
else
|
|
347
|
+
for (let ele of stash)
|
|
348
|
+
enclose === !0 && typeof ele == "string" && (ele = `{${ele}}`), result.push(Array.isArray(ele) ? append(item, ele, enclose) : item + ele);
|
|
656
349
|
return utils.flatten(result);
|
|
657
|
-
},
|
|
658
|
-
|
|
659
|
-
const rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit;
|
|
660
|
-
const walk = /* @__PURE__ */ __name((node, parent = {}) => {
|
|
350
|
+
}, expand = (ast, options = {}) => {
|
|
351
|
+
let rangeLimit = options.rangeLimit === void 0 ? 1e3 : options.rangeLimit, walk = (node, parent = {}) => {
|
|
661
352
|
node.queue = [];
|
|
662
|
-
let p = parent;
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
p = p.parent;
|
|
666
|
-
q = p.queue;
|
|
667
|
-
}
|
|
353
|
+
let p = parent, q = parent.queue;
|
|
354
|
+
for (; p.type !== "brace" && p.type !== "root" && p.parent; )
|
|
355
|
+
p = p.parent, q = p.queue;
|
|
668
356
|
if (node.invalid || node.dollar) {
|
|
669
357
|
q.push(append(q.pop(), stringify(node, options)));
|
|
670
358
|
return;
|
|
671
359
|
}
|
|
672
|
-
if (node.type === "brace" && node.invalid !==
|
|
360
|
+
if (node.type === "brace" && node.invalid !== !0 && node.nodes.length === 2) {
|
|
673
361
|
q.push(append(q.pop(), ["{}"]));
|
|
674
362
|
return;
|
|
675
363
|
}
|
|
676
364
|
if (node.nodes && node.ranges > 0) {
|
|
677
|
-
|
|
678
|
-
if (utils.exceedsLimit(...args, options.step, rangeLimit))
|
|
365
|
+
let args = utils.reduce(node.nodes);
|
|
366
|
+
if (utils.exceedsLimit(...args, options.step, rangeLimit))
|
|
679
367
|
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
|
|
680
|
-
}
|
|
681
368
|
let range = fill(...args, options);
|
|
682
|
-
|
|
683
|
-
range = stringify(node, options);
|
|
684
|
-
}
|
|
685
|
-
q.push(append(q.pop(), range));
|
|
686
|
-
node.nodes = [];
|
|
369
|
+
range.length === 0 && (range = stringify(node, options)), q.push(append(q.pop(), range)), node.nodes = [];
|
|
687
370
|
return;
|
|
688
371
|
}
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
while (block.type !== "brace" && block.type !== "root" && block.parent) {
|
|
693
|
-
block = block.parent;
|
|
694
|
-
queue = block.queue;
|
|
695
|
-
}
|
|
372
|
+
let enclose = utils.encloseBrace(node), queue = node.queue, block = node;
|
|
373
|
+
for (; block.type !== "brace" && block.type !== "root" && block.parent; )
|
|
374
|
+
block = block.parent, queue = block.queue;
|
|
696
375
|
for (let i = 0; i < node.nodes.length; i++) {
|
|
697
|
-
|
|
376
|
+
let child = node.nodes[i];
|
|
698
377
|
if (child.type === "comma" && node.type === "brace") {
|
|
699
|
-
|
|
700
|
-
queue.push("");
|
|
378
|
+
i === 1 && queue.push(""), queue.push("");
|
|
701
379
|
continue;
|
|
702
380
|
}
|
|
703
381
|
if (child.type === "close") {
|
|
@@ -708,14 +386,12 @@ var require_expand = __commonJS({
|
|
|
708
386
|
queue.push(append(queue.pop(), child.value));
|
|
709
387
|
continue;
|
|
710
388
|
}
|
|
711
|
-
|
|
712
|
-
walk(child, node);
|
|
713
|
-
}
|
|
389
|
+
child.nodes && walk(child, node);
|
|
714
390
|
}
|
|
715
391
|
return queue;
|
|
716
|
-
}
|
|
392
|
+
};
|
|
717
393
|
return utils.flatten(walk(ast));
|
|
718
|
-
}
|
|
394
|
+
};
|
|
719
395
|
module.exports = expand;
|
|
720
396
|
}
|
|
721
397
|
});
|
|
@@ -787,7 +463,8 @@ var require_constants = __commonJS({
|
|
|
787
463
|
/* { */
|
|
788
464
|
CHAR_LEFT_SQUARE_BRACKET: "[",
|
|
789
465
|
/* [ */
|
|
790
|
-
CHAR_LINE_FEED:
|
|
466
|
+
CHAR_LINE_FEED: `
|
|
467
|
+
`,
|
|
791
468
|
/* \n */
|
|
792
469
|
CHAR_NO_BREAK_SPACE: "\xA0",
|
|
793
470
|
/* \u00A0 */
|
|
@@ -825,8 +502,7 @@ var require_constants = __commonJS({
|
|
|
825
502
|
var require_parse = __commonJS({
|
|
826
503
|
"../../node_modules/braces/lib/parse.js"(exports, module) {
|
|
827
504
|
"use strict";
|
|
828
|
-
var stringify = require_stringify()
|
|
829
|
-
var {
|
|
505
|
+
var stringify = require_stringify(), {
|
|
830
506
|
MAX_LENGTH,
|
|
831
507
|
CHAR_BACKSLASH,
|
|
832
508
|
/* \ */
|
|
@@ -854,207 +530,144 @@ var require_parse = __commonJS({
|
|
|
854
530
|
/* ' */
|
|
855
531
|
CHAR_NO_BREAK_SPACE,
|
|
856
532
|
CHAR_ZERO_WIDTH_NOBREAK_SPACE
|
|
857
|
-
} = require_constants()
|
|
858
|
-
|
|
859
|
-
if (typeof input !== "string") {
|
|
533
|
+
} = require_constants(), parse = (input, options = {}) => {
|
|
534
|
+
if (typeof input != "string")
|
|
860
535
|
throw new TypeError("Expected a string");
|
|
861
|
-
}
|
|
862
|
-
|
|
863
|
-
const max = typeof opts.maxLength === "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
864
|
-
if (input.length > max) {
|
|
536
|
+
let opts = options || {}, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH;
|
|
537
|
+
if (input.length > max)
|
|
865
538
|
throw new SyntaxError(`Input length (${input.length}), exceeds max characters (${max})`);
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
const stack = [ast];
|
|
869
|
-
let block = ast;
|
|
870
|
-
let prev = ast;
|
|
871
|
-
let brackets = 0;
|
|
872
|
-
const length = input.length;
|
|
873
|
-
let index = 0;
|
|
874
|
-
let depth = 0;
|
|
875
|
-
let value;
|
|
876
|
-
const advance = /* @__PURE__ */ __name(() => input[index++], "advance");
|
|
877
|
-
const push = /* @__PURE__ */ __name((node) => {
|
|
878
|
-
if (node.type === "text" && prev.type === "dot") {
|
|
879
|
-
prev.type = "text";
|
|
880
|
-
}
|
|
881
|
-
if (prev && prev.type === "text" && node.type === "text") {
|
|
539
|
+
let ast = { type: "root", input, nodes: [] }, stack = [ast], block = ast, prev = ast, brackets = 0, length = input.length, index = 0, depth = 0, value, advance = () => input[index++], push = (node) => {
|
|
540
|
+
if (node.type === "text" && prev.type === "dot" && (prev.type = "text"), prev && prev.type === "text" && node.type === "text") {
|
|
882
541
|
prev.value += node.value;
|
|
883
542
|
return;
|
|
884
543
|
}
|
|
885
|
-
block.nodes.push(node);
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
continue;
|
|
905
|
-
}
|
|
906
|
-
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
|
907
|
-
brackets++;
|
|
908
|
-
let next;
|
|
909
|
-
while (index < length && (next = advance())) {
|
|
910
|
-
value += next;
|
|
911
|
-
if (next === CHAR_LEFT_SQUARE_BRACKET) {
|
|
912
|
-
brackets++;
|
|
913
|
-
continue;
|
|
914
|
-
}
|
|
915
|
-
if (next === CHAR_BACKSLASH) {
|
|
916
|
-
value += advance();
|
|
917
|
-
continue;
|
|
918
|
-
}
|
|
919
|
-
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
920
|
-
brackets--;
|
|
921
|
-
if (brackets === 0) {
|
|
922
|
-
break;
|
|
544
|
+
return block.nodes.push(node), node.parent = block, node.prev = prev, prev = node, node;
|
|
545
|
+
};
|
|
546
|
+
for (push({ type: "bos" }); index < length; )
|
|
547
|
+
if (block = stack[stack.length - 1], value = advance(), !(value === CHAR_ZERO_WIDTH_NOBREAK_SPACE || value === CHAR_NO_BREAK_SPACE)) {
|
|
548
|
+
if (value === CHAR_BACKSLASH) {
|
|
549
|
+
push({ type: "text", value: (options.keepEscaping ? value : "") + advance() });
|
|
550
|
+
continue;
|
|
551
|
+
}
|
|
552
|
+
if (value === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
553
|
+
push({ type: "text", value: "\\" + value });
|
|
554
|
+
continue;
|
|
555
|
+
}
|
|
556
|
+
if (value === CHAR_LEFT_SQUARE_BRACKET) {
|
|
557
|
+
brackets++;
|
|
558
|
+
let next;
|
|
559
|
+
for (; index < length && (next = advance()); ) {
|
|
560
|
+
if (value += next, next === CHAR_LEFT_SQUARE_BRACKET) {
|
|
561
|
+
brackets++;
|
|
562
|
+
continue;
|
|
923
563
|
}
|
|
564
|
+
if (next === CHAR_BACKSLASH) {
|
|
565
|
+
value += advance();
|
|
566
|
+
continue;
|
|
567
|
+
}
|
|
568
|
+
if (next === CHAR_RIGHT_SQUARE_BRACKET && (brackets--, brackets === 0))
|
|
569
|
+
break;
|
|
924
570
|
}
|
|
925
|
-
}
|
|
926
|
-
push({ type: "text", value });
|
|
927
|
-
continue;
|
|
928
|
-
}
|
|
929
|
-
if (value === CHAR_LEFT_PARENTHESES) {
|
|
930
|
-
block = push({ type: "paren", nodes: [] });
|
|
931
|
-
stack.push(block);
|
|
932
|
-
push({ type: "text", value });
|
|
933
|
-
continue;
|
|
934
|
-
}
|
|
935
|
-
if (value === CHAR_RIGHT_PARENTHESES) {
|
|
936
|
-
if (block.type !== "paren") {
|
|
937
571
|
push({ type: "text", value });
|
|
938
572
|
continue;
|
|
939
573
|
}
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
continue;
|
|
944
|
-
}
|
|
945
|
-
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
946
|
-
const open = value;
|
|
947
|
-
let next;
|
|
948
|
-
if (options.keepQuotes !== true) {
|
|
949
|
-
value = "";
|
|
574
|
+
if (value === CHAR_LEFT_PARENTHESES) {
|
|
575
|
+
block = push({ type: "paren", nodes: [] }), stack.push(block), push({ type: "text", value });
|
|
576
|
+
continue;
|
|
950
577
|
}
|
|
951
|
-
|
|
952
|
-
if (
|
|
953
|
-
|
|
578
|
+
if (value === CHAR_RIGHT_PARENTHESES) {
|
|
579
|
+
if (block.type !== "paren") {
|
|
580
|
+
push({ type: "text", value });
|
|
954
581
|
continue;
|
|
955
582
|
}
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
break;
|
|
959
|
-
}
|
|
960
|
-
value += next;
|
|
583
|
+
block = stack.pop(), push({ type: "text", value }), block = stack[stack.length - 1];
|
|
584
|
+
continue;
|
|
961
585
|
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
ranges: 0,
|
|
976
|
-
nodes: []
|
|
977
|
-
};
|
|
978
|
-
block = push(brace);
|
|
979
|
-
stack.push(block);
|
|
980
|
-
push({ type: "open", value });
|
|
981
|
-
continue;
|
|
982
|
-
}
|
|
983
|
-
if (value === CHAR_RIGHT_CURLY_BRACE) {
|
|
984
|
-
if (block.type !== "brace") {
|
|
586
|
+
if (value === CHAR_DOUBLE_QUOTE || value === CHAR_SINGLE_QUOTE || value === CHAR_BACKTICK) {
|
|
587
|
+
let open = value, next;
|
|
588
|
+
for (options.keepQuotes !== !0 && (value = ""); index < length && (next = advance()); ) {
|
|
589
|
+
if (next === CHAR_BACKSLASH) {
|
|
590
|
+
value += next + advance();
|
|
591
|
+
continue;
|
|
592
|
+
}
|
|
593
|
+
if (next === open) {
|
|
594
|
+
options.keepQuotes === !0 && (value += next);
|
|
595
|
+
break;
|
|
596
|
+
}
|
|
597
|
+
value += next;
|
|
598
|
+
}
|
|
985
599
|
push({ type: "text", value });
|
|
986
600
|
continue;
|
|
987
601
|
}
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
block
|
|
602
|
+
if (value === CHAR_LEFT_CURLY_BRACE) {
|
|
603
|
+
depth++;
|
|
604
|
+
let brace = {
|
|
605
|
+
type: "brace",
|
|
606
|
+
open: !0,
|
|
607
|
+
close: !1,
|
|
608
|
+
dollar: prev.value && prev.value.slice(-1) === "$" || block.dollar === !0,
|
|
609
|
+
depth,
|
|
610
|
+
commas: 0,
|
|
611
|
+
ranges: 0,
|
|
612
|
+
nodes: []
|
|
613
|
+
};
|
|
614
|
+
block = push(brace), stack.push(block), push({ type: "open", value });
|
|
615
|
+
continue;
|
|
1001
616
|
}
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
push({ type: "text", value });
|
|
617
|
+
if (value === CHAR_RIGHT_CURLY_BRACE) {
|
|
618
|
+
if (block.type !== "brace") {
|
|
619
|
+
push({ type: "text", value });
|
|
620
|
+
continue;
|
|
621
|
+
}
|
|
622
|
+
let type = "close";
|
|
623
|
+
block = stack.pop(), block.close = !0, push({ type, value }), depth--, block = stack[stack.length - 1];
|
|
1010
624
|
continue;
|
|
1011
625
|
}
|
|
1012
|
-
if (
|
|
1013
|
-
block.
|
|
1014
|
-
prev.value += value;
|
|
1015
|
-
prev.type = "range";
|
|
1016
|
-
if (block.nodes.length !== 3 && block.nodes.length !== 5) {
|
|
1017
|
-
block.invalid = true;
|
|
626
|
+
if (value === CHAR_COMMA && depth > 0) {
|
|
627
|
+
if (block.ranges > 0) {
|
|
1018
628
|
block.ranges = 0;
|
|
1019
|
-
|
|
1020
|
-
|
|
629
|
+
let open = block.nodes.shift();
|
|
630
|
+
block.nodes = [open, { type: "text", value: stringify(block) }];
|
|
1021
631
|
}
|
|
1022
|
-
block.
|
|
1023
|
-
block.args = [];
|
|
632
|
+
push({ type: "comma", value }), block.commas++;
|
|
1024
633
|
continue;
|
|
1025
634
|
}
|
|
1026
|
-
if (
|
|
1027
|
-
siblings.
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
635
|
+
if (value === CHAR_DOT && depth > 0 && block.commas === 0) {
|
|
636
|
+
let siblings = block.nodes;
|
|
637
|
+
if (depth === 0 || siblings.length === 0) {
|
|
638
|
+
push({ type: "text", value });
|
|
639
|
+
continue;
|
|
640
|
+
}
|
|
641
|
+
if (prev.type === "dot") {
|
|
642
|
+
if (block.range = [], prev.value += value, prev.type = "range", block.nodes.length !== 3 && block.nodes.length !== 5) {
|
|
643
|
+
block.invalid = !0, block.ranges = 0, prev.type = "text";
|
|
644
|
+
continue;
|
|
645
|
+
}
|
|
646
|
+
block.ranges++, block.args = [];
|
|
647
|
+
continue;
|
|
648
|
+
}
|
|
649
|
+
if (prev.type === "range") {
|
|
650
|
+
siblings.pop();
|
|
651
|
+
let before = siblings[siblings.length - 1];
|
|
652
|
+
before.value += prev.value + value, prev = before, block.ranges--;
|
|
653
|
+
continue;
|
|
654
|
+
}
|
|
655
|
+
push({ type: "dot", value });
|
|
1032
656
|
continue;
|
|
1033
657
|
}
|
|
1034
|
-
push({ type: "
|
|
1035
|
-
continue;
|
|
658
|
+
push({ type: "text", value });
|
|
1036
659
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
do {
|
|
1040
|
-
block = stack.pop();
|
|
1041
|
-
if (block.type !== "root") {
|
|
660
|
+
do
|
|
661
|
+
if (block = stack.pop(), block.type !== "root") {
|
|
1042
662
|
block.nodes.forEach((node) => {
|
|
1043
|
-
|
|
1044
|
-
if (node.type === "open") node.isOpen = true;
|
|
1045
|
-
if (node.type === "close") node.isClose = true;
|
|
1046
|
-
if (!node.nodes) node.type = "text";
|
|
1047
|
-
node.invalid = true;
|
|
1048
|
-
}
|
|
663
|
+
node.nodes || (node.type === "open" && (node.isOpen = !0), node.type === "close" && (node.isClose = !0), node.nodes || (node.type = "text"), node.invalid = !0);
|
|
1049
664
|
});
|
|
1050
|
-
|
|
1051
|
-
const index2 = parent.nodes.indexOf(block);
|
|
665
|
+
let parent = stack[stack.length - 1], index2 = parent.nodes.indexOf(block);
|
|
1052
666
|
parent.nodes.splice(index2, 1, ...block.nodes);
|
|
1053
667
|
}
|
|
1054
|
-
|
|
1055
|
-
push({ type: "eos" });
|
|
1056
|
-
|
|
1057
|
-
}, "parse");
|
|
668
|
+
while (stack.length > 0);
|
|
669
|
+
return push({ type: "eos" }), ast;
|
|
670
|
+
};
|
|
1058
671
|
module.exports = parse;
|
|
1059
672
|
}
|
|
1060
673
|
});
|
|
@@ -1063,61 +676,26 @@ var require_parse = __commonJS({
|
|
|
1063
676
|
var require_braces = __commonJS({
|
|
1064
677
|
"../../node_modules/braces/index.js"(exports, module) {
|
|
1065
678
|
"use strict";
|
|
1066
|
-
var stringify = require_stringify()
|
|
1067
|
-
var compile = require_compile();
|
|
1068
|
-
var expand = require_expand();
|
|
1069
|
-
var parse = require_parse();
|
|
1070
|
-
var braces = /* @__PURE__ */ __name((input, options = {}) => {
|
|
679
|
+
var stringify = require_stringify(), compile = require_compile(), expand = require_expand(), parse = require_parse(), braces = (input, options = {}) => {
|
|
1071
680
|
let output = [];
|
|
1072
|
-
if (Array.isArray(input))
|
|
1073
|
-
for (
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
output.push(...result);
|
|
1077
|
-
} else {
|
|
1078
|
-
output.push(result);
|
|
1079
|
-
}
|
|
681
|
+
if (Array.isArray(input))
|
|
682
|
+
for (let pattern of input) {
|
|
683
|
+
let result = braces.create(pattern, options);
|
|
684
|
+
Array.isArray(result) ? output.push(...result) : output.push(result);
|
|
1080
685
|
}
|
|
1081
|
-
|
|
686
|
+
else
|
|
1082
687
|
output = [].concat(braces.create(input, options));
|
|
1083
|
-
|
|
1084
|
-
if (options && options.expand === true && options.nodupes === true) {
|
|
1085
|
-
output = [...new Set(output)];
|
|
1086
|
-
}
|
|
1087
|
-
return output;
|
|
1088
|
-
}, "braces");
|
|
1089
|
-
braces.parse = (input, options = {}) => parse(input, options);
|
|
1090
|
-
braces.stringify = (input, options = {}) => {
|
|
1091
|
-
if (typeof input === "string") {
|
|
1092
|
-
return stringify(braces.parse(input, options), options);
|
|
1093
|
-
}
|
|
1094
|
-
return stringify(input, options);
|
|
1095
|
-
};
|
|
1096
|
-
braces.compile = (input, options = {}) => {
|
|
1097
|
-
if (typeof input === "string") {
|
|
1098
|
-
input = braces.parse(input, options);
|
|
1099
|
-
}
|
|
1100
|
-
return compile(input, options);
|
|
688
|
+
return options && options.expand === !0 && options.nodupes === !0 && (output = [...new Set(output)]), output;
|
|
1101
689
|
};
|
|
690
|
+
braces.parse = (input, options = {}) => parse(input, options);
|
|
691
|
+
braces.stringify = (input, options = {}) => stringify(typeof input == "string" ? braces.parse(input, options) : input, options);
|
|
692
|
+
braces.compile = (input, options = {}) => (typeof input == "string" && (input = braces.parse(input, options)), compile(input, options));
|
|
1102
693
|
braces.expand = (input, options = {}) => {
|
|
1103
|
-
|
|
1104
|
-
input = braces.parse(input, options);
|
|
1105
|
-
}
|
|
694
|
+
typeof input == "string" && (input = braces.parse(input, options));
|
|
1106
695
|
let result = expand(input, options);
|
|
1107
|
-
|
|
1108
|
-
result = result.filter(Boolean);
|
|
1109
|
-
}
|
|
1110
|
-
if (options.nodupes === true) {
|
|
1111
|
-
result = [...new Set(result)];
|
|
1112
|
-
}
|
|
1113
|
-
return result;
|
|
1114
|
-
};
|
|
1115
|
-
braces.create = (input, options = {}) => {
|
|
1116
|
-
if (input === "" || input.length < 3) {
|
|
1117
|
-
return [input];
|
|
1118
|
-
}
|
|
1119
|
-
return options.expand !== true ? braces.compile(input, options) : braces.expand(input, options);
|
|
696
|
+
return options.noempty === !0 && (result = result.filter(Boolean)), options.nodupes === !0 && (result = [...new Set(result)]), result;
|
|
1120
697
|
};
|
|
698
|
+
braces.create = (input, options = {}) => input === "" || input.length < 3 ? [input] : options.expand !== !0 ? braces.compile(input, options) : braces.expand(input, options);
|
|
1121
699
|
module.exports = braces;
|
|
1122
700
|
}
|
|
1123
701
|
});
|
|
@@ -1126,25 +704,7 @@ var require_braces = __commonJS({
|
|
|
1126
704
|
var require_constants2 = __commonJS({
|
|
1127
705
|
"../../node_modules/picomatch/lib/constants.js"(exports, module) {
|
|
1128
706
|
"use strict";
|
|
1129
|
-
var path = __require("path")
|
|
1130
|
-
var WIN_SLASH = "\\\\/";
|
|
1131
|
-
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
1132
|
-
var DOT_LITERAL = "\\.";
|
|
1133
|
-
var PLUS_LITERAL = "\\+";
|
|
1134
|
-
var QMARK_LITERAL = "\\?";
|
|
1135
|
-
var SLASH_LITERAL = "\\/";
|
|
1136
|
-
var ONE_CHAR = "(?=.)";
|
|
1137
|
-
var QMARK = "[^/]";
|
|
1138
|
-
var END_ANCHOR = `(?:${SLASH_LITERAL}|$)`;
|
|
1139
|
-
var START_ANCHOR = `(?:^|${SLASH_LITERAL})`;
|
|
1140
|
-
var DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`;
|
|
1141
|
-
var NO_DOT = `(?!${DOT_LITERAL})`;
|
|
1142
|
-
var NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`;
|
|
1143
|
-
var NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`;
|
|
1144
|
-
var NO_DOTS_SLASH = `(?!${DOTS_SLASH})`;
|
|
1145
|
-
var QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`;
|
|
1146
|
-
var STAR = `${QMARK}*?`;
|
|
1147
|
-
var POSIX_CHARS = {
|
|
707
|
+
var path = __require("path"), WIN_SLASH = "\\\\/", WIN_NO_SLASH = `[^${WIN_SLASH}]`, DOT_LITERAL = "\\.", PLUS_LITERAL = "\\+", QMARK_LITERAL = "\\?", SLASH_LITERAL = "\\/", ONE_CHAR = "(?=.)", QMARK = "[^/]", END_ANCHOR = `(?:${SLASH_LITERAL}|$)`, START_ANCHOR = `(?:^|${SLASH_LITERAL})`, DOTS_SLASH = `${DOT_LITERAL}{1,2}${END_ANCHOR}`, NO_DOT = `(?!${DOT_LITERAL})`, NO_DOTS = `(?!${START_ANCHOR}${DOTS_SLASH})`, NO_DOT_SLASH = `(?!${DOT_LITERAL}{0,1}${END_ANCHOR})`, NO_DOTS_SLASH = `(?!${DOTS_SLASH})`, QMARK_NO_DOT = `[^.${SLASH_LITERAL}]`, STAR = `${QMARK}*?`, POSIX_CHARS = {
|
|
1148
708
|
DOT_LITERAL,
|
|
1149
709
|
PLUS_LITERAL,
|
|
1150
710
|
QMARK_LITERAL,
|
|
@@ -1160,8 +720,7 @@ var require_constants2 = __commonJS({
|
|
|
1160
720
|
QMARK_NO_DOT,
|
|
1161
721
|
STAR,
|
|
1162
722
|
START_ANCHOR
|
|
1163
|
-
}
|
|
1164
|
-
var WINDOWS_CHARS = {
|
|
723
|
+
}, WINDOWS_CHARS = {
|
|
1165
724
|
...POSIX_CHARS,
|
|
1166
725
|
SLASH_LITERAL: `[${WIN_SLASH}]`,
|
|
1167
726
|
QMARK: WIN_NO_SLASH,
|
|
@@ -1174,8 +733,7 @@ var require_constants2 = __commonJS({
|
|
|
1174
733
|
QMARK_NO_DOT: `[^.${WIN_SLASH}]`,
|
|
1175
734
|
START_ANCHOR: `(?:^|[${WIN_SLASH}])`,
|
|
1176
735
|
END_ANCHOR: `(?:[${WIN_SLASH}]|$)`
|
|
1177
|
-
}
|
|
1178
|
-
var POSIX_REGEX_SOURCE = {
|
|
736
|
+
}, POSIX_REGEX_SOURCE = {
|
|
1179
737
|
alnum: "a-zA-Z0-9",
|
|
1180
738
|
alpha: "a-zA-Z",
|
|
1181
739
|
ascii: "\\x00-\\x7F",
|
|
@@ -1313,7 +871,7 @@ var require_constants2 = __commonJS({
|
|
|
1313
871
|
* Create GLOB_CHARS
|
|
1314
872
|
*/
|
|
1315
873
|
globChars(win32) {
|
|
1316
|
-
return win32 ===
|
|
874
|
+
return win32 === !0 ? WINDOWS_CHARS : POSIX_CHARS;
|
|
1317
875
|
}
|
|
1318
876
|
};
|
|
1319
877
|
}
|
|
@@ -1323,59 +881,34 @@ var require_constants2 = __commonJS({
|
|
|
1323
881
|
var require_utils2 = __commonJS({
|
|
1324
882
|
"../../node_modules/picomatch/lib/utils.js"(exports) {
|
|
1325
883
|
"use strict";
|
|
1326
|
-
var path = __require("path")
|
|
1327
|
-
var win32 = process.platform === "win32";
|
|
1328
|
-
var {
|
|
884
|
+
var path = __require("path"), win32 = process.platform === "win32", {
|
|
1329
885
|
REGEX_BACKSLASH,
|
|
1330
886
|
REGEX_REMOVE_BACKSLASH,
|
|
1331
887
|
REGEX_SPECIAL_CHARS,
|
|
1332
888
|
REGEX_SPECIAL_CHARS_GLOBAL
|
|
1333
889
|
} = require_constants2();
|
|
1334
|
-
exports.isObject = (val) => val !== null && typeof val
|
|
890
|
+
exports.isObject = (val) => val !== null && typeof val == "object" && !Array.isArray(val);
|
|
1335
891
|
exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
|
|
1336
892
|
exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
|
|
1337
893
|
exports.escapeRegex = (str) => str.replace(REGEX_SPECIAL_CHARS_GLOBAL, "\\$1");
|
|
1338
894
|
exports.toPosixSlashes = (str) => str.replace(REGEX_BACKSLASH, "/");
|
|
1339
|
-
exports.removeBackslashes = (str) =>
|
|
1340
|
-
return str.replace(REGEX_REMOVE_BACKSLASH, (match2) => {
|
|
1341
|
-
return match2 === "\\" ? "" : match2;
|
|
1342
|
-
});
|
|
1343
|
-
};
|
|
895
|
+
exports.removeBackslashes = (str) => str.replace(REGEX_REMOVE_BACKSLASH, (match2) => match2 === "\\" ? "" : match2);
|
|
1344
896
|
exports.supportsLookbehinds = () => {
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
return true;
|
|
1348
|
-
}
|
|
1349
|
-
return false;
|
|
1350
|
-
};
|
|
1351
|
-
exports.isWindows = (options) => {
|
|
1352
|
-
if (options && typeof options.windows === "boolean") {
|
|
1353
|
-
return options.windows;
|
|
1354
|
-
}
|
|
1355
|
-
return win32 === true || path.sep === "\\";
|
|
897
|
+
let segs = process.version.slice(1).split(".").map(Number);
|
|
898
|
+
return segs.length === 3 && segs[0] >= 9 || segs[0] === 8 && segs[1] >= 10;
|
|
1356
899
|
};
|
|
900
|
+
exports.isWindows = (options) => options && typeof options.windows == "boolean" ? options.windows : win32 === !0 || path.sep === "\\";
|
|
1357
901
|
exports.escapeLast = (input, char, lastIdx) => {
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
if (input[idx - 1] === "\\") return exports.escapeLast(input, char, idx - 1);
|
|
1361
|
-
return `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
902
|
+
let idx = input.lastIndexOf(char, lastIdx);
|
|
903
|
+
return idx === -1 ? input : input[idx - 1] === "\\" ? exports.escapeLast(input, char, idx - 1) : `${input.slice(0, idx)}\\${input.slice(idx)}`;
|
|
1362
904
|
};
|
|
1363
905
|
exports.removePrefix = (input, state = {}) => {
|
|
1364
906
|
let output = input;
|
|
1365
|
-
|
|
1366
|
-
output = output.slice(2);
|
|
1367
|
-
state.prefix = "./";
|
|
1368
|
-
}
|
|
1369
|
-
return output;
|
|
907
|
+
return output.startsWith("./") && (output = output.slice(2), state.prefix = "./"), output;
|
|
1370
908
|
};
|
|
1371
909
|
exports.wrapOutput = (input, state = {}, options = {}) => {
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
let output = `${prepend}(?:${input})${append}`;
|
|
1375
|
-
if (state.negated === true) {
|
|
1376
|
-
output = `(?:^(?!${output}).*$)`;
|
|
1377
|
-
}
|
|
1378
|
-
return output;
|
|
910
|
+
let prepend = options.contains ? "" : "^", append = options.contains ? "" : "$", output = `${prepend}(?:${input})${append}`;
|
|
911
|
+
return state.negated === !0 && (output = `(?:^(?!${output}).*$)`), output;
|
|
1379
912
|
};
|
|
1380
913
|
}
|
|
1381
914
|
});
|
|
@@ -1384,8 +917,7 @@ var require_utils2 = __commonJS({
|
|
|
1384
917
|
var require_scan = __commonJS({
|
|
1385
918
|
"../../node_modules/picomatch/lib/scan.js"(exports, module) {
|
|
1386
919
|
"use strict";
|
|
1387
|
-
var utils = require_utils2()
|
|
1388
|
-
var {
|
|
920
|
+
var utils = require_utils2(), {
|
|
1389
921
|
CHAR_ASTERISK,
|
|
1390
922
|
/* * */
|
|
1391
923
|
CHAR_AT,
|
|
@@ -1416,107 +948,48 @@ var require_scan = __commonJS({
|
|
|
1416
948
|
/* ) */
|
|
1417
949
|
CHAR_RIGHT_SQUARE_BRACKET
|
|
1418
950
|
/* ] */
|
|
1419
|
-
} = require_constants2()
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
if (token.isPrefix !== true) {
|
|
1425
|
-
token.depth = token.isGlobstar ? Infinity : 1;
|
|
1426
|
-
}
|
|
1427
|
-
}, "depth");
|
|
1428
|
-
var scan = /* @__PURE__ */ __name((input, options) => {
|
|
1429
|
-
const opts = options || {};
|
|
1430
|
-
const length = input.length - 1;
|
|
1431
|
-
const scanToEnd = opts.parts === true || opts.scanToEnd === true;
|
|
1432
|
-
const slashes = [];
|
|
1433
|
-
const tokens = [];
|
|
1434
|
-
const parts = [];
|
|
1435
|
-
let str = input;
|
|
1436
|
-
let index = -1;
|
|
1437
|
-
let start = 0;
|
|
1438
|
-
let lastIndex = 0;
|
|
1439
|
-
let isBrace = false;
|
|
1440
|
-
let isBracket = false;
|
|
1441
|
-
let isGlob = false;
|
|
1442
|
-
let isExtglob = false;
|
|
1443
|
-
let isGlobstar = false;
|
|
1444
|
-
let braceEscaped = false;
|
|
1445
|
-
let backslashes = false;
|
|
1446
|
-
let negated = false;
|
|
1447
|
-
let negatedExtglob = false;
|
|
1448
|
-
let finished = false;
|
|
1449
|
-
let braces = 0;
|
|
1450
|
-
let prev;
|
|
1451
|
-
let code;
|
|
1452
|
-
let token = { value: "", depth: 0, isGlob: false };
|
|
1453
|
-
const eos = /* @__PURE__ */ __name(() => index >= length, "eos");
|
|
1454
|
-
const peek = /* @__PURE__ */ __name(() => str.charCodeAt(index + 1), "peek");
|
|
1455
|
-
const advance = /* @__PURE__ */ __name(() => {
|
|
1456
|
-
prev = code;
|
|
1457
|
-
return str.charCodeAt(++index);
|
|
1458
|
-
}, "advance");
|
|
1459
|
-
while (index < length) {
|
|
951
|
+
} = require_constants2(), isPathSeparator = (code) => code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH, depth = (token) => {
|
|
952
|
+
token.isPrefix !== !0 && (token.depth = token.isGlobstar ? 1 / 0 : 1);
|
|
953
|
+
}, scan = (input, options) => {
|
|
954
|
+
let opts = options || {}, length = input.length - 1, scanToEnd = opts.parts === !0 || opts.scanToEnd === !0, slashes = [], tokens = [], parts = [], str = input, index = -1, start = 0, lastIndex = 0, isBrace = !1, isBracket = !1, isGlob = !1, isExtglob = !1, isGlobstar = !1, braceEscaped = !1, backslashes = !1, negated = !1, negatedExtglob = !1, finished = !1, braces = 0, prev, code, token = { value: "", depth: 0, isGlob: !1 }, eos = () => index >= length, peek = () => str.charCodeAt(index + 1), advance = () => (prev = code, str.charCodeAt(++index));
|
|
955
|
+
for (; index < length; ) {
|
|
1460
956
|
code = advance();
|
|
1461
957
|
let next;
|
|
1462
958
|
if (code === CHAR_BACKWARD_SLASH) {
|
|
1463
|
-
backslashes = token.backslashes =
|
|
1464
|
-
code = advance();
|
|
1465
|
-
if (code === CHAR_LEFT_CURLY_BRACE) {
|
|
1466
|
-
braceEscaped = true;
|
|
1467
|
-
}
|
|
959
|
+
backslashes = token.backslashes = !0, code = advance(), code === CHAR_LEFT_CURLY_BRACE && (braceEscaped = !0);
|
|
1468
960
|
continue;
|
|
1469
961
|
}
|
|
1470
|
-
if (braceEscaped ===
|
|
1471
|
-
braces++;
|
|
1472
|
-
while (eos() !== true && (code = advance())) {
|
|
962
|
+
if (braceEscaped === !0 || code === CHAR_LEFT_CURLY_BRACE) {
|
|
963
|
+
for (braces++; eos() !== !0 && (code = advance()); ) {
|
|
1473
964
|
if (code === CHAR_BACKWARD_SLASH) {
|
|
1474
|
-
backslashes = token.backslashes =
|
|
1475
|
-
advance();
|
|
965
|
+
backslashes = token.backslashes = !0, advance();
|
|
1476
966
|
continue;
|
|
1477
967
|
}
|
|
1478
968
|
if (code === CHAR_LEFT_CURLY_BRACE) {
|
|
1479
969
|
braces++;
|
|
1480
970
|
continue;
|
|
1481
971
|
}
|
|
1482
|
-
if (braceEscaped !==
|
|
1483
|
-
isBrace = token.isBrace =
|
|
1484
|
-
isGlob = token.isGlob = true;
|
|
1485
|
-
finished = true;
|
|
1486
|
-
if (scanToEnd === true) {
|
|
972
|
+
if (braceEscaped !== !0 && code === CHAR_DOT && (code = advance()) === CHAR_DOT) {
|
|
973
|
+
if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
|
|
1487
974
|
continue;
|
|
1488
|
-
}
|
|
1489
975
|
break;
|
|
1490
976
|
}
|
|
1491
|
-
if (braceEscaped !==
|
|
1492
|
-
isBrace = token.isBrace =
|
|
1493
|
-
isGlob = token.isGlob = true;
|
|
1494
|
-
finished = true;
|
|
1495
|
-
if (scanToEnd === true) {
|
|
977
|
+
if (braceEscaped !== !0 && code === CHAR_COMMA) {
|
|
978
|
+
if (isBrace = token.isBrace = !0, isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
|
|
1496
979
|
continue;
|
|
1497
|
-
}
|
|
1498
980
|
break;
|
|
1499
981
|
}
|
|
1500
|
-
if (code === CHAR_RIGHT_CURLY_BRACE) {
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
braceEscaped = false;
|
|
1504
|
-
isBrace = token.isBrace = true;
|
|
1505
|
-
finished = true;
|
|
1506
|
-
break;
|
|
1507
|
-
}
|
|
982
|
+
if (code === CHAR_RIGHT_CURLY_BRACE && (braces--, braces === 0)) {
|
|
983
|
+
braceEscaped = !1, isBrace = token.isBrace = !0, finished = !0;
|
|
984
|
+
break;
|
|
1508
985
|
}
|
|
1509
986
|
}
|
|
1510
|
-
if (scanToEnd ===
|
|
987
|
+
if (scanToEnd === !0)
|
|
1511
988
|
continue;
|
|
1512
|
-
}
|
|
1513
989
|
break;
|
|
1514
990
|
}
|
|
1515
991
|
if (code === CHAR_FORWARD_SLASH) {
|
|
1516
|
-
slashes.push(index);
|
|
1517
|
-
tokens.push(token);
|
|
1518
|
-
token = { value: "", depth: 0, isGlob: false };
|
|
1519
|
-
if (finished === true) continue;
|
|
992
|
+
if (slashes.push(index), tokens.push(token), token = { value: "", depth: 0, isGlob: !1 }, finished === !0) continue;
|
|
1520
993
|
if (prev === CHAR_DOT && index === start + 1) {
|
|
1521
994
|
start += 2;
|
|
1522
995
|
continue;
|
|
@@ -1524,85 +997,60 @@ var require_scan = __commonJS({
|
|
|
1524
997
|
lastIndex = index + 1;
|
|
1525
998
|
continue;
|
|
1526
999
|
}
|
|
1527
|
-
if (opts.noext !==
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
while (eos() !== true && (code = advance())) {
|
|
1538
|
-
if (code === CHAR_BACKWARD_SLASH) {
|
|
1539
|
-
backslashes = token.backslashes = true;
|
|
1540
|
-
code = advance();
|
|
1541
|
-
continue;
|
|
1542
|
-
}
|
|
1543
|
-
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
1544
|
-
isGlob = token.isGlob = true;
|
|
1545
|
-
finished = true;
|
|
1546
|
-
break;
|
|
1547
|
-
}
|
|
1000
|
+
if (opts.noext !== !0 && (code === CHAR_PLUS || code === CHAR_AT || code === CHAR_ASTERISK || code === CHAR_QUESTION_MARK || code === CHAR_EXCLAMATION_MARK) === !0 && peek() === CHAR_LEFT_PARENTHESES) {
|
|
1001
|
+
if (isGlob = token.isGlob = !0, isExtglob = token.isExtglob = !0, finished = !0, code === CHAR_EXCLAMATION_MARK && index === start && (negatedExtglob = !0), scanToEnd === !0) {
|
|
1002
|
+
for (; eos() !== !0 && (code = advance()); ) {
|
|
1003
|
+
if (code === CHAR_BACKWARD_SLASH) {
|
|
1004
|
+
backslashes = token.backslashes = !0, code = advance();
|
|
1005
|
+
continue;
|
|
1006
|
+
}
|
|
1007
|
+
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
1008
|
+
isGlob = token.isGlob = !0, finished = !0;
|
|
1009
|
+
break;
|
|
1548
1010
|
}
|
|
1549
|
-
continue;
|
|
1550
1011
|
}
|
|
1551
|
-
|
|
1012
|
+
continue;
|
|
1552
1013
|
}
|
|
1014
|
+
break;
|
|
1553
1015
|
}
|
|
1554
1016
|
if (code === CHAR_ASTERISK) {
|
|
1555
|
-
if (prev === CHAR_ASTERISK
|
|
1556
|
-
isGlob = token.isGlob = true;
|
|
1557
|
-
finished = true;
|
|
1558
|
-
if (scanToEnd === true) {
|
|
1017
|
+
if (prev === CHAR_ASTERISK && (isGlobstar = token.isGlobstar = !0), isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
|
|
1559
1018
|
continue;
|
|
1560
|
-
}
|
|
1561
1019
|
break;
|
|
1562
1020
|
}
|
|
1563
1021
|
if (code === CHAR_QUESTION_MARK) {
|
|
1564
|
-
isGlob = token.isGlob =
|
|
1565
|
-
finished = true;
|
|
1566
|
-
if (scanToEnd === true) {
|
|
1022
|
+
if (isGlob = token.isGlob = !0, finished = !0, scanToEnd === !0)
|
|
1567
1023
|
continue;
|
|
1568
|
-
}
|
|
1569
1024
|
break;
|
|
1570
1025
|
}
|
|
1571
1026
|
if (code === CHAR_LEFT_SQUARE_BRACKET) {
|
|
1572
|
-
|
|
1027
|
+
for (; eos() !== !0 && (next = advance()); ) {
|
|
1573
1028
|
if (next === CHAR_BACKWARD_SLASH) {
|
|
1574
|
-
backslashes = token.backslashes =
|
|
1575
|
-
advance();
|
|
1029
|
+
backslashes = token.backslashes = !0, advance();
|
|
1576
1030
|
continue;
|
|
1577
1031
|
}
|
|
1578
1032
|
if (next === CHAR_RIGHT_SQUARE_BRACKET) {
|
|
1579
|
-
isBracket = token.isBracket =
|
|
1580
|
-
isGlob = token.isGlob = true;
|
|
1581
|
-
finished = true;
|
|
1033
|
+
isBracket = token.isBracket = !0, isGlob = token.isGlob = !0, finished = !0;
|
|
1582
1034
|
break;
|
|
1583
1035
|
}
|
|
1584
1036
|
}
|
|
1585
|
-
if (scanToEnd ===
|
|
1037
|
+
if (scanToEnd === !0)
|
|
1586
1038
|
continue;
|
|
1587
|
-
}
|
|
1588
1039
|
break;
|
|
1589
1040
|
}
|
|
1590
|
-
if (opts.nonegate !==
|
|
1591
|
-
negated = token.negated =
|
|
1592
|
-
start++;
|
|
1041
|
+
if (opts.nonegate !== !0 && code === CHAR_EXCLAMATION_MARK && index === start) {
|
|
1042
|
+
negated = token.negated = !0, start++;
|
|
1593
1043
|
continue;
|
|
1594
1044
|
}
|
|
1595
|
-
if (opts.noparen !==
|
|
1596
|
-
isGlob = token.isGlob =
|
|
1597
|
-
|
|
1598
|
-
while (eos() !== true && (code = advance())) {
|
|
1045
|
+
if (opts.noparen !== !0 && code === CHAR_LEFT_PARENTHESES) {
|
|
1046
|
+
if (isGlob = token.isGlob = !0, scanToEnd === !0) {
|
|
1047
|
+
for (; eos() !== !0 && (code = advance()); ) {
|
|
1599
1048
|
if (code === CHAR_LEFT_PARENTHESES) {
|
|
1600
|
-
backslashes = token.backslashes =
|
|
1601
|
-
code = advance();
|
|
1049
|
+
backslashes = token.backslashes = !0, code = advance();
|
|
1602
1050
|
continue;
|
|
1603
1051
|
}
|
|
1604
1052
|
if (code === CHAR_RIGHT_PARENTHESES) {
|
|
1605
|
-
finished =
|
|
1053
|
+
finished = !0;
|
|
1606
1054
|
break;
|
|
1607
1055
|
}
|
|
1608
1056
|
}
|
|
@@ -1610,47 +1058,16 @@ var require_scan = __commonJS({
|
|
|
1610
1058
|
}
|
|
1611
1059
|
break;
|
|
1612
1060
|
}
|
|
1613
|
-
if (isGlob ===
|
|
1614
|
-
finished =
|
|
1615
|
-
if (scanToEnd === true) {
|
|
1061
|
+
if (isGlob === !0) {
|
|
1062
|
+
if (finished = !0, scanToEnd === !0)
|
|
1616
1063
|
continue;
|
|
1617
|
-
}
|
|
1618
1064
|
break;
|
|
1619
1065
|
}
|
|
1620
1066
|
}
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
let base = str;
|
|
1626
|
-
let prefix = "";
|
|
1627
|
-
let glob = "";
|
|
1628
|
-
if (start > 0) {
|
|
1629
|
-
prefix = str.slice(0, start);
|
|
1630
|
-
str = str.slice(start);
|
|
1631
|
-
lastIndex -= start;
|
|
1632
|
-
}
|
|
1633
|
-
if (base && isGlob === true && lastIndex > 0) {
|
|
1634
|
-
base = str.slice(0, lastIndex);
|
|
1635
|
-
glob = str.slice(lastIndex);
|
|
1636
|
-
} else if (isGlob === true) {
|
|
1637
|
-
base = "";
|
|
1638
|
-
glob = str;
|
|
1639
|
-
} else {
|
|
1640
|
-
base = str;
|
|
1641
|
-
}
|
|
1642
|
-
if (base && base !== "" && base !== "/" && base !== str) {
|
|
1643
|
-
if (isPathSeparator(base.charCodeAt(base.length - 1))) {
|
|
1644
|
-
base = base.slice(0, -1);
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
if (opts.unescape === true) {
|
|
1648
|
-
if (glob) glob = utils.removeBackslashes(glob);
|
|
1649
|
-
if (base && backslashes === true) {
|
|
1650
|
-
base = utils.removeBackslashes(base);
|
|
1651
|
-
}
|
|
1652
|
-
}
|
|
1653
|
-
const state = {
|
|
1067
|
+
opts.noext === !0 && (isExtglob = !1, isGlob = !1);
|
|
1068
|
+
let base = str, prefix = "", glob = "";
|
|
1069
|
+
start > 0 && (prefix = str.slice(0, start), str = str.slice(start), lastIndex -= start), base && isGlob === !0 && lastIndex > 0 ? (base = str.slice(0, lastIndex), glob = str.slice(lastIndex)) : isGlob === !0 ? (base = "", glob = str) : base = str, base && base !== "" && base !== "/" && base !== str && isPathSeparator(base.charCodeAt(base.length - 1)) && (base = base.slice(0, -1)), opts.unescape === !0 && (glob && (glob = utils.removeBackslashes(glob)), base && backslashes === !0 && (base = utils.removeBackslashes(base)));
|
|
1070
|
+
let state = {
|
|
1654
1071
|
prefix,
|
|
1655
1072
|
input,
|
|
1656
1073
|
start,
|
|
@@ -1664,48 +1081,20 @@ var require_scan = __commonJS({
|
|
|
1664
1081
|
negated,
|
|
1665
1082
|
negatedExtglob
|
|
1666
1083
|
};
|
|
1667
|
-
if (opts.tokens ===
|
|
1668
|
-
state.maxDepth = 0;
|
|
1669
|
-
if (!isPathSeparator(code)) {
|
|
1670
|
-
tokens.push(token);
|
|
1671
|
-
}
|
|
1672
|
-
state.tokens = tokens;
|
|
1673
|
-
}
|
|
1674
|
-
if (opts.parts === true || opts.tokens === true) {
|
|
1084
|
+
if (opts.tokens === !0 && (state.maxDepth = 0, isPathSeparator(code) || tokens.push(token), state.tokens = tokens), opts.parts === !0 || opts.tokens === !0) {
|
|
1675
1085
|
let prevIndex;
|
|
1676
1086
|
for (let idx = 0; idx < slashes.length; idx++) {
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
const value = input.slice(n, i);
|
|
1680
|
-
if (opts.tokens) {
|
|
1681
|
-
if (idx === 0 && start !== 0) {
|
|
1682
|
-
tokens[idx].isPrefix = true;
|
|
1683
|
-
tokens[idx].value = prefix;
|
|
1684
|
-
} else {
|
|
1685
|
-
tokens[idx].value = value;
|
|
1686
|
-
}
|
|
1687
|
-
depth(tokens[idx]);
|
|
1688
|
-
state.maxDepth += tokens[idx].depth;
|
|
1689
|
-
}
|
|
1690
|
-
if (idx !== 0 || value !== "") {
|
|
1691
|
-
parts.push(value);
|
|
1692
|
-
}
|
|
1693
|
-
prevIndex = i;
|
|
1087
|
+
let n = prevIndex ? prevIndex + 1 : start, i = slashes[idx], value = input.slice(n, i);
|
|
1088
|
+
opts.tokens && (idx === 0 && start !== 0 ? (tokens[idx].isPrefix = !0, tokens[idx].value = prefix) : tokens[idx].value = value, depth(tokens[idx]), state.maxDepth += tokens[idx].depth), (idx !== 0 || value !== "") && parts.push(value), prevIndex = i;
|
|
1694
1089
|
}
|
|
1695
1090
|
if (prevIndex && prevIndex + 1 < input.length) {
|
|
1696
|
-
|
|
1697
|
-
parts.push(value);
|
|
1698
|
-
if (opts.tokens) {
|
|
1699
|
-
tokens[tokens.length - 1].value = value;
|
|
1700
|
-
depth(tokens[tokens.length - 1]);
|
|
1701
|
-
state.maxDepth += tokens[tokens.length - 1].depth;
|
|
1702
|
-
}
|
|
1091
|
+
let value = input.slice(prevIndex + 1);
|
|
1092
|
+
parts.push(value), opts.tokens && (tokens[tokens.length - 1].value = value, depth(tokens[tokens.length - 1]), state.maxDepth += tokens[tokens.length - 1].depth);
|
|
1703
1093
|
}
|
|
1704
|
-
state.slashes = slashes;
|
|
1705
|
-
state.parts = parts;
|
|
1094
|
+
state.slashes = slashes, state.parts = parts;
|
|
1706
1095
|
}
|
|
1707
1096
|
return state;
|
|
1708
|
-
}
|
|
1097
|
+
};
|
|
1709
1098
|
module.exports = scan;
|
|
1710
1099
|
}
|
|
1711
1100
|
});
|
|
@@ -1714,49 +1103,31 @@ var require_scan = __commonJS({
|
|
|
1714
1103
|
var require_parse2 = __commonJS({
|
|
1715
1104
|
"../../node_modules/picomatch/lib/parse.js"(exports, module) {
|
|
1716
1105
|
"use strict";
|
|
1717
|
-
var constants = require_constants2()
|
|
1718
|
-
var utils = require_utils2();
|
|
1719
|
-
var {
|
|
1106
|
+
var constants = require_constants2(), utils = require_utils2(), {
|
|
1720
1107
|
MAX_LENGTH,
|
|
1721
1108
|
POSIX_REGEX_SOURCE,
|
|
1722
1109
|
REGEX_NON_SPECIAL_CHARS,
|
|
1723
1110
|
REGEX_SPECIAL_CHARS_BACKREF,
|
|
1724
1111
|
REPLACEMENTS
|
|
1725
|
-
} = constants
|
|
1726
|
-
|
|
1727
|
-
if (typeof options.expandRange === "function") {
|
|
1112
|
+
} = constants, expandRange = (args, options) => {
|
|
1113
|
+
if (typeof options.expandRange == "function")
|
|
1728
1114
|
return options.expandRange(...args, options);
|
|
1729
|
-
}
|
|
1730
1115
|
args.sort();
|
|
1731
|
-
|
|
1116
|
+
let value = `[${args.join("-")}]`;
|
|
1732
1117
|
try {
|
|
1733
1118
|
new RegExp(value);
|
|
1734
|
-
} catch
|
|
1119
|
+
} catch {
|
|
1735
1120
|
return args.map((v) => utils.escapeRegex(v)).join("..");
|
|
1736
1121
|
}
|
|
1737
1122
|
return value;
|
|
1738
|
-
}, "
|
|
1739
|
-
|
|
1740
|
-
return `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`;
|
|
1741
|
-
}, "syntaxError");
|
|
1742
|
-
var parse = /* @__PURE__ */ __name((input, options) => {
|
|
1743
|
-
if (typeof input !== "string") {
|
|
1123
|
+
}, syntaxError = (type, char) => `Missing ${type}: "${char}" - use "\\\\${char}" to match literal characters`, parse = (input, options) => {
|
|
1124
|
+
if (typeof input != "string")
|
|
1744
1125
|
throw new TypeError("Expected a string");
|
|
1745
|
-
}
|
|
1746
1126
|
input = REPLACEMENTS[input] || input;
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
let len = input.length;
|
|
1750
|
-
if (len > max) {
|
|
1127
|
+
let opts = { ...options }, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
|
|
1128
|
+
if (len > max)
|
|
1751
1129
|
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
1752
|
-
}
|
|
1753
|
-
const bos = { type: "bos", value: "", output: opts.prepend || "" };
|
|
1754
|
-
const tokens = [bos];
|
|
1755
|
-
const capture = opts.capture ? "" : "?:";
|
|
1756
|
-
const win32 = utils.isWindows(options);
|
|
1757
|
-
const PLATFORM_CHARS = constants.globChars(win32);
|
|
1758
|
-
const EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS);
|
|
1759
|
-
const {
|
|
1130
|
+
let bos = { type: "bos", value: "", output: opts.prepend || "" }, tokens = [bos], capture = opts.capture ? "" : "?:", win32 = utils.isWindows(options), PLATFORM_CHARS = constants.globChars(win32), EXTGLOB_CHARS = constants.extglobChars(PLATFORM_CHARS), {
|
|
1760
1131
|
DOT_LITERAL,
|
|
1761
1132
|
PLUS_LITERAL,
|
|
1762
1133
|
SLASH_LITERAL,
|
|
@@ -1769,400 +1140,203 @@ var require_parse2 = __commonJS({
|
|
|
1769
1140
|
QMARK_NO_DOT,
|
|
1770
1141
|
STAR,
|
|
1771
1142
|
START_ANCHOR
|
|
1772
|
-
} = PLATFORM_CHARS;
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
}, "globstar");
|
|
1776
|
-
const nodot = opts.dot ? "" : NO_DOT;
|
|
1777
|
-
const qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT;
|
|
1778
|
-
let star = opts.bash === true ? globstar(opts) : STAR;
|
|
1779
|
-
if (opts.capture) {
|
|
1780
|
-
star = `(${star})`;
|
|
1781
|
-
}
|
|
1782
|
-
if (typeof opts.noext === "boolean") {
|
|
1783
|
-
opts.noextglob = opts.noext;
|
|
1784
|
-
}
|
|
1785
|
-
const state = {
|
|
1143
|
+
} = PLATFORM_CHARS, globstar = (opts2) => `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, nodot = opts.dot ? "" : NO_DOT, qmarkNoDot = opts.dot ? QMARK : QMARK_NO_DOT, star = opts.bash === !0 ? globstar(opts) : STAR;
|
|
1144
|
+
opts.capture && (star = `(${star})`), typeof opts.noext == "boolean" && (opts.noextglob = opts.noext);
|
|
1145
|
+
let state = {
|
|
1786
1146
|
input,
|
|
1787
1147
|
index: -1,
|
|
1788
1148
|
start: 0,
|
|
1789
|
-
dot: opts.dot ===
|
|
1149
|
+
dot: opts.dot === !0,
|
|
1790
1150
|
consumed: "",
|
|
1791
1151
|
output: "",
|
|
1792
1152
|
prefix: "",
|
|
1793
|
-
backtrack:
|
|
1794
|
-
negated:
|
|
1153
|
+
backtrack: !1,
|
|
1154
|
+
negated: !1,
|
|
1795
1155
|
brackets: 0,
|
|
1796
1156
|
braces: 0,
|
|
1797
1157
|
parens: 0,
|
|
1798
1158
|
quotes: 0,
|
|
1799
|
-
globstar:
|
|
1159
|
+
globstar: !1,
|
|
1800
1160
|
tokens
|
|
1801
1161
|
};
|
|
1802
|
-
input = utils.removePrefix(input, state);
|
|
1803
|
-
len = input.
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
let value;
|
|
1809
|
-
const eos = /* @__PURE__ */ __name(() => state.index === len - 1, "eos");
|
|
1810
|
-
const peek = state.peek = (n = 1) => input[state.index + n];
|
|
1811
|
-
const advance = state.advance = () => input[++state.index] || "";
|
|
1812
|
-
const remaining = /* @__PURE__ */ __name(() => input.slice(state.index + 1), "remaining");
|
|
1813
|
-
const consume = /* @__PURE__ */ __name((value2 = "", num = 0) => {
|
|
1814
|
-
state.consumed += value2;
|
|
1815
|
-
state.index += num;
|
|
1816
|
-
}, "consume");
|
|
1817
|
-
const append = /* @__PURE__ */ __name((token) => {
|
|
1818
|
-
state.output += token.output != null ? token.output : token.value;
|
|
1819
|
-
consume(token.value);
|
|
1820
|
-
}, "append");
|
|
1821
|
-
const negate = /* @__PURE__ */ __name(() => {
|
|
1162
|
+
input = utils.removePrefix(input, state), len = input.length;
|
|
1163
|
+
let extglobs = [], braces = [], stack = [], prev = bos, value, eos = () => state.index === len - 1, peek = state.peek = (n = 1) => input[state.index + n], advance = state.advance = () => input[++state.index] || "", remaining = () => input.slice(state.index + 1), consume = (value2 = "", num = 0) => {
|
|
1164
|
+
state.consumed += value2, state.index += num;
|
|
1165
|
+
}, append = (token) => {
|
|
1166
|
+
state.output += token.output != null ? token.output : token.value, consume(token.value);
|
|
1167
|
+
}, negate = () => {
|
|
1822
1168
|
let count = 1;
|
|
1823
|
-
|
|
1824
|
-
advance()
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
state.negated = true;
|
|
1832
|
-
state.start++;
|
|
1833
|
-
return true;
|
|
1834
|
-
}, "negate");
|
|
1835
|
-
const increment = /* @__PURE__ */ __name((type) => {
|
|
1836
|
-
state[type]++;
|
|
1837
|
-
stack.push(type);
|
|
1838
|
-
}, "increment");
|
|
1839
|
-
const decrement = /* @__PURE__ */ __name((type) => {
|
|
1840
|
-
state[type]--;
|
|
1841
|
-
stack.pop();
|
|
1842
|
-
}, "decrement");
|
|
1843
|
-
const push = /* @__PURE__ */ __name((tok) => {
|
|
1169
|
+
for (; peek() === "!" && (peek(2) !== "(" || peek(3) === "?"); )
|
|
1170
|
+
advance(), state.start++, count++;
|
|
1171
|
+
return count % 2 === 0 ? !1 : (state.negated = !0, state.start++, !0);
|
|
1172
|
+
}, increment = (type) => {
|
|
1173
|
+
state[type]++, stack.push(type);
|
|
1174
|
+
}, decrement = (type) => {
|
|
1175
|
+
state[type]--, stack.pop();
|
|
1176
|
+
}, push = (tok) => {
|
|
1844
1177
|
if (prev.type === "globstar") {
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
if (tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob) {
|
|
1848
|
-
state.output = state.output.slice(0, -prev.output.length);
|
|
1849
|
-
prev.type = "star";
|
|
1850
|
-
prev.value = "*";
|
|
1851
|
-
prev.output = star;
|
|
1852
|
-
state.output += prev.output;
|
|
1853
|
-
}
|
|
1178
|
+
let isBrace = state.braces > 0 && (tok.type === "comma" || tok.type === "brace"), isExtglob = tok.extglob === !0 || extglobs.length && (tok.type === "pipe" || tok.type === "paren");
|
|
1179
|
+
tok.type !== "slash" && tok.type !== "paren" && !isBrace && !isExtglob && (state.output = state.output.slice(0, -prev.output.length), prev.type = "star", prev.value = "*", prev.output = star, state.output += prev.output);
|
|
1854
1180
|
}
|
|
1855
|
-
if (extglobs.length && tok.type !== "paren") {
|
|
1856
|
-
|
|
1857
|
-
}
|
|
1858
|
-
if (tok.value || tok.output) append(tok);
|
|
1859
|
-
if (prev && prev.type === "text" && tok.type === "text") {
|
|
1860
|
-
prev.value += tok.value;
|
|
1861
|
-
prev.output = (prev.output || "") + tok.value;
|
|
1181
|
+
if (extglobs.length && tok.type !== "paren" && (extglobs[extglobs.length - 1].inner += tok.value), (tok.value || tok.output) && append(tok), prev && prev.type === "text" && tok.type === "text") {
|
|
1182
|
+
prev.value += tok.value, prev.output = (prev.output || "") + tok.value;
|
|
1862
1183
|
return;
|
|
1863
1184
|
}
|
|
1864
|
-
tok.prev = prev;
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
token.
|
|
1872
|
-
token.output = state.output;
|
|
1873
|
-
const output = (opts.capture ? "(" : "") + token.open;
|
|
1874
|
-
increment("parens");
|
|
1875
|
-
push({ type, value: value2, output: state.output ? "" : ONE_CHAR });
|
|
1876
|
-
push({ type: "paren", extglob: true, value: advance(), output });
|
|
1877
|
-
extglobs.push(token);
|
|
1878
|
-
}, "extglobOpen");
|
|
1879
|
-
const extglobClose = /* @__PURE__ */ __name((token) => {
|
|
1880
|
-
let output = token.close + (opts.capture ? ")" : "");
|
|
1881
|
-
let rest;
|
|
1185
|
+
tok.prev = prev, tokens.push(tok), prev = tok;
|
|
1186
|
+
}, extglobOpen = (type, value2) => {
|
|
1187
|
+
let token = { ...EXTGLOB_CHARS[value2], conditions: 1, inner: "" };
|
|
1188
|
+
token.prev = prev, token.parens = state.parens, token.output = state.output;
|
|
1189
|
+
let output = (opts.capture ? "(" : "") + token.open;
|
|
1190
|
+
increment("parens"), push({ type, value: value2, output: state.output ? "" : ONE_CHAR }), push({ type: "paren", extglob: !0, value: advance(), output }), extglobs.push(token);
|
|
1191
|
+
}, extglobClose = (token) => {
|
|
1192
|
+
let output = token.close + (opts.capture ? ")" : ""), rest;
|
|
1882
1193
|
if (token.type === "negate") {
|
|
1883
1194
|
let extglobStar = star;
|
|
1884
|
-
if (token.inner && token.inner.length > 1 && token.inner.includes("/")) {
|
|
1885
|
-
|
|
1886
|
-
}
|
|
1887
|
-
if (extglobStar !== star || eos() || /^\)+$/.test(remaining())) {
|
|
1888
|
-
output = token.close = `)$))${extglobStar}`;
|
|
1889
|
-
}
|
|
1890
|
-
if (token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
1891
|
-
const expression = parse(rest, { ...options, fastpaths: false }).output;
|
|
1195
|
+
if (token.inner && token.inner.length > 1 && token.inner.includes("/") && (extglobStar = globstar(opts)), (extglobStar !== star || eos() || /^\)+$/.test(remaining())) && (output = token.close = `)$))${extglobStar}`), token.inner.includes("*") && (rest = remaining()) && /^\.[^\\/.]+$/.test(rest)) {
|
|
1196
|
+
let expression = parse(rest, { ...options, fastpaths: !1 }).output;
|
|
1892
1197
|
output = token.close = `)${expression})${extglobStar})`;
|
|
1893
1198
|
}
|
|
1894
|
-
|
|
1895
|
-
state.negatedExtglob = true;
|
|
1896
|
-
}
|
|
1897
|
-
}
|
|
1898
|
-
push({ type: "paren", extglob: true, value, output });
|
|
1899
|
-
decrement("parens");
|
|
1900
|
-
}, "extglobClose");
|
|
1901
|
-
if (opts.fastpaths !== false && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
1902
|
-
let backslashes = false;
|
|
1903
|
-
let output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => {
|
|
1904
|
-
if (first === "\\") {
|
|
1905
|
-
backslashes = true;
|
|
1906
|
-
return m;
|
|
1907
|
-
}
|
|
1908
|
-
if (first === "?") {
|
|
1909
|
-
if (esc) {
|
|
1910
|
-
return esc + first + (rest ? QMARK.repeat(rest.length) : "");
|
|
1911
|
-
}
|
|
1912
|
-
if (index === 0) {
|
|
1913
|
-
return qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "");
|
|
1914
|
-
}
|
|
1915
|
-
return QMARK.repeat(chars.length);
|
|
1916
|
-
}
|
|
1917
|
-
if (first === ".") {
|
|
1918
|
-
return DOT_LITERAL.repeat(chars.length);
|
|
1919
|
-
}
|
|
1920
|
-
if (first === "*") {
|
|
1921
|
-
if (esc) {
|
|
1922
|
-
return esc + first + (rest ? star : "");
|
|
1923
|
-
}
|
|
1924
|
-
return star;
|
|
1925
|
-
}
|
|
1926
|
-
return esc ? m : `\\${m}`;
|
|
1927
|
-
});
|
|
1928
|
-
if (backslashes === true) {
|
|
1929
|
-
if (opts.unescape === true) {
|
|
1930
|
-
output = output.replace(/\\/g, "");
|
|
1931
|
-
} else {
|
|
1932
|
-
output = output.replace(/\\+/g, (m) => {
|
|
1933
|
-
return m.length % 2 === 0 ? "\\\\" : m ? "\\" : "";
|
|
1934
|
-
});
|
|
1935
|
-
}
|
|
1936
|
-
}
|
|
1937
|
-
if (output === input && opts.contains === true) {
|
|
1938
|
-
state.output = input;
|
|
1939
|
-
return state;
|
|
1199
|
+
token.prev.type === "bos" && (state.negatedExtglob = !0);
|
|
1940
1200
|
}
|
|
1941
|
-
|
|
1942
|
-
|
|
1201
|
+
push({ type: "paren", extglob: !0, value, output }), decrement("parens");
|
|
1202
|
+
};
|
|
1203
|
+
if (opts.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(input)) {
|
|
1204
|
+
let backslashes = !1, output = input.replace(REGEX_SPECIAL_CHARS_BACKREF, (m, esc, chars, first, rest, index) => first === "\\" ? (backslashes = !0, m) : first === "?" ? esc ? esc + first + (rest ? QMARK.repeat(rest.length) : "") : index === 0 ? qmarkNoDot + (rest ? QMARK.repeat(rest.length) : "") : QMARK.repeat(chars.length) : first === "." ? DOT_LITERAL.repeat(chars.length) : first === "*" ? esc ? esc + first + (rest ? star : "") : star : esc ? m : `\\${m}`);
|
|
1205
|
+
return backslashes === !0 && (opts.unescape === !0 ? output = output.replace(/\\/g, "") : output = output.replace(/\\+/g, (m) => m.length % 2 === 0 ? "\\\\" : m ? "\\" : "")), output === input && opts.contains === !0 ? (state.output = input, state) : (state.output = utils.wrapOutput(output, state, options), state);
|
|
1943
1206
|
}
|
|
1944
|
-
|
|
1945
|
-
value = advance()
|
|
1946
|
-
if (value === "\0") {
|
|
1207
|
+
for (; !eos(); ) {
|
|
1208
|
+
if (value = advance(), value === "\0")
|
|
1947
1209
|
continue;
|
|
1948
|
-
}
|
|
1949
1210
|
if (value === "\\") {
|
|
1950
|
-
|
|
1951
|
-
if (next === "/" && opts.bash !==
|
|
1952
|
-
continue;
|
|
1953
|
-
}
|
|
1954
|
-
if (next === "." || next === ";") {
|
|
1211
|
+
let next = peek();
|
|
1212
|
+
if (next === "/" && opts.bash !== !0 || next === "." || next === ";")
|
|
1955
1213
|
continue;
|
|
1956
|
-
}
|
|
1957
1214
|
if (!next) {
|
|
1958
|
-
value += "\\";
|
|
1959
|
-
push({ type: "text", value });
|
|
1215
|
+
value += "\\", push({ type: "text", value });
|
|
1960
1216
|
continue;
|
|
1961
1217
|
}
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
if (match2 && match2[0].length > 2) {
|
|
1965
|
-
slashes = match2[0].length;
|
|
1966
|
-
state.index += slashes;
|
|
1967
|
-
if (slashes % 2 !== 0) {
|
|
1968
|
-
value += "\\";
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
if (opts.unescape === true) {
|
|
1972
|
-
value = advance();
|
|
1973
|
-
} else {
|
|
1974
|
-
value += advance();
|
|
1975
|
-
}
|
|
1976
|
-
if (state.brackets === 0) {
|
|
1218
|
+
let match2 = /^\\+/.exec(remaining()), slashes = 0;
|
|
1219
|
+
if (match2 && match2[0].length > 2 && (slashes = match2[0].length, state.index += slashes, slashes % 2 !== 0 && (value += "\\")), opts.unescape === !0 ? value = advance() : value += advance(), state.brackets === 0) {
|
|
1977
1220
|
push({ type: "text", value });
|
|
1978
1221
|
continue;
|
|
1979
1222
|
}
|
|
1980
1223
|
}
|
|
1981
1224
|
if (state.brackets > 0 && (value !== "]" || prev.value === "[" || prev.value === "[^")) {
|
|
1982
|
-
if (opts.posix !==
|
|
1983
|
-
|
|
1984
|
-
if (inner.includes("[")) {
|
|
1985
|
-
prev.posix =
|
|
1986
|
-
if (
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
const rest2 = prev.value.slice(idx + 2);
|
|
1990
|
-
const posix = POSIX_REGEX_SOURCE[rest2];
|
|
1991
|
-
if (posix) {
|
|
1992
|
-
prev.value = pre + posix;
|
|
1993
|
-
state.backtrack = true;
|
|
1994
|
-
advance();
|
|
1995
|
-
if (!bos.output && tokens.indexOf(prev) === 1) {
|
|
1996
|
-
bos.output = ONE_CHAR;
|
|
1997
|
-
}
|
|
1998
|
-
continue;
|
|
1999
|
-
}
|
|
1225
|
+
if (opts.posix !== !1 && value === ":") {
|
|
1226
|
+
let inner = prev.value.slice(1);
|
|
1227
|
+
if (inner.includes("[") && (prev.posix = !0, inner.includes(":"))) {
|
|
1228
|
+
let idx = prev.value.lastIndexOf("["), pre = prev.value.slice(0, idx), rest2 = prev.value.slice(idx + 2), posix = POSIX_REGEX_SOURCE[rest2];
|
|
1229
|
+
if (posix) {
|
|
1230
|
+
prev.value = pre + posix, state.backtrack = !0, advance(), !bos.output && tokens.indexOf(prev) === 1 && (bos.output = ONE_CHAR);
|
|
1231
|
+
continue;
|
|
2000
1232
|
}
|
|
2001
1233
|
}
|
|
2002
1234
|
}
|
|
2003
|
-
|
|
2004
|
-
value = `\\${value}`;
|
|
2005
|
-
}
|
|
2006
|
-
if (value === "]" && (prev.value === "[" || prev.value === "[^")) {
|
|
2007
|
-
value = `\\${value}`;
|
|
2008
|
-
}
|
|
2009
|
-
if (opts.posix === true && value === "!" && prev.value === "[") {
|
|
2010
|
-
value = "^";
|
|
2011
|
-
}
|
|
2012
|
-
prev.value += value;
|
|
2013
|
-
append({ value });
|
|
1235
|
+
(value === "[" && peek() !== ":" || value === "-" && peek() === "]") && (value = `\\${value}`), value === "]" && (prev.value === "[" || prev.value === "[^") && (value = `\\${value}`), opts.posix === !0 && value === "!" && prev.value === "[" && (value = "^"), prev.value += value, append({ value });
|
|
2014
1236
|
continue;
|
|
2015
1237
|
}
|
|
2016
1238
|
if (state.quotes === 1 && value !== '"') {
|
|
2017
|
-
value = utils.escapeRegex(value);
|
|
2018
|
-
prev.value += value;
|
|
2019
|
-
append({ value });
|
|
1239
|
+
value = utils.escapeRegex(value), prev.value += value, append({ value });
|
|
2020
1240
|
continue;
|
|
2021
1241
|
}
|
|
2022
1242
|
if (value === '"') {
|
|
2023
|
-
state.quotes = state.quotes === 1 ? 0 : 1;
|
|
2024
|
-
if (opts.keepQuotes === true) {
|
|
2025
|
-
push({ type: "text", value });
|
|
2026
|
-
}
|
|
1243
|
+
state.quotes = state.quotes === 1 ? 0 : 1, opts.keepQuotes === !0 && push({ type: "text", value });
|
|
2027
1244
|
continue;
|
|
2028
1245
|
}
|
|
2029
1246
|
if (value === "(") {
|
|
2030
|
-
increment("parens");
|
|
2031
|
-
push({ type: "paren", value });
|
|
1247
|
+
increment("parens"), push({ type: "paren", value });
|
|
2032
1248
|
continue;
|
|
2033
1249
|
}
|
|
2034
1250
|
if (value === ")") {
|
|
2035
|
-
if (state.parens === 0 && opts.strictBrackets ===
|
|
1251
|
+
if (state.parens === 0 && opts.strictBrackets === !0)
|
|
2036
1252
|
throw new SyntaxError(syntaxError("opening", "("));
|
|
2037
|
-
|
|
2038
|
-
const extglob = extglobs[extglobs.length - 1];
|
|
1253
|
+
let extglob = extglobs[extglobs.length - 1];
|
|
2039
1254
|
if (extglob && state.parens === extglob.parens + 1) {
|
|
2040
1255
|
extglobClose(extglobs.pop());
|
|
2041
1256
|
continue;
|
|
2042
1257
|
}
|
|
2043
|
-
push({ type: "paren", value, output: state.parens ? ")" : "\\)" });
|
|
2044
|
-
decrement("parens");
|
|
1258
|
+
push({ type: "paren", value, output: state.parens ? ")" : "\\)" }), decrement("parens");
|
|
2045
1259
|
continue;
|
|
2046
1260
|
}
|
|
2047
1261
|
if (value === "[") {
|
|
2048
|
-
if (opts.nobracket ===
|
|
2049
|
-
if (opts.nobracket !==
|
|
1262
|
+
if (opts.nobracket === !0 || !remaining().includes("]")) {
|
|
1263
|
+
if (opts.nobracket !== !0 && opts.strictBrackets === !0)
|
|
2050
1264
|
throw new SyntaxError(syntaxError("closing", "]"));
|
|
2051
|
-
}
|
|
2052
1265
|
value = `\\${value}`;
|
|
2053
|
-
} else
|
|
1266
|
+
} else
|
|
2054
1267
|
increment("brackets");
|
|
2055
|
-
}
|
|
2056
1268
|
push({ type: "bracket", value });
|
|
2057
1269
|
continue;
|
|
2058
1270
|
}
|
|
2059
1271
|
if (value === "]") {
|
|
2060
|
-
if (opts.nobracket ===
|
|
1272
|
+
if (opts.nobracket === !0 || prev && prev.type === "bracket" && prev.value.length === 1) {
|
|
2061
1273
|
push({ type: "text", value, output: `\\${value}` });
|
|
2062
1274
|
continue;
|
|
2063
1275
|
}
|
|
2064
1276
|
if (state.brackets === 0) {
|
|
2065
|
-
if (opts.strictBrackets ===
|
|
1277
|
+
if (opts.strictBrackets === !0)
|
|
2066
1278
|
throw new SyntaxError(syntaxError("opening", "["));
|
|
2067
|
-
}
|
|
2068
1279
|
push({ type: "text", value, output: `\\${value}` });
|
|
2069
1280
|
continue;
|
|
2070
1281
|
}
|
|
2071
1282
|
decrement("brackets");
|
|
2072
|
-
|
|
2073
|
-
if (prev.posix !==
|
|
2074
|
-
value = `/${value}`;
|
|
2075
|
-
}
|
|
2076
|
-
prev.value += value;
|
|
2077
|
-
append({ value });
|
|
2078
|
-
if (opts.literalBrackets === false || utils.hasRegexChars(prevValue)) {
|
|
1283
|
+
let prevValue = prev.value.slice(1);
|
|
1284
|
+
if (prev.posix !== !0 && prevValue[0] === "^" && !prevValue.includes("/") && (value = `/${value}`), prev.value += value, append({ value }), opts.literalBrackets === !1 || utils.hasRegexChars(prevValue))
|
|
2079
1285
|
continue;
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
if (opts.literalBrackets === true) {
|
|
2084
|
-
state.output += escaped;
|
|
2085
|
-
prev.value = escaped;
|
|
1286
|
+
let escaped = utils.escapeRegex(prev.value);
|
|
1287
|
+
if (state.output = state.output.slice(0, -prev.value.length), opts.literalBrackets === !0) {
|
|
1288
|
+
state.output += escaped, prev.value = escaped;
|
|
2086
1289
|
continue;
|
|
2087
1290
|
}
|
|
2088
|
-
prev.value = `(${capture}${escaped}|${prev.value})
|
|
2089
|
-
state.output += prev.value;
|
|
1291
|
+
prev.value = `(${capture}${escaped}|${prev.value})`, state.output += prev.value;
|
|
2090
1292
|
continue;
|
|
2091
1293
|
}
|
|
2092
|
-
if (value === "{" && opts.nobrace !==
|
|
1294
|
+
if (value === "{" && opts.nobrace !== !0) {
|
|
2093
1295
|
increment("braces");
|
|
2094
|
-
|
|
1296
|
+
let open = {
|
|
2095
1297
|
type: "brace",
|
|
2096
1298
|
value,
|
|
2097
1299
|
output: "(",
|
|
2098
1300
|
outputIndex: state.output.length,
|
|
2099
1301
|
tokensIndex: state.tokens.length
|
|
2100
1302
|
};
|
|
2101
|
-
braces.push(open);
|
|
2102
|
-
push(open);
|
|
1303
|
+
braces.push(open), push(open);
|
|
2103
1304
|
continue;
|
|
2104
1305
|
}
|
|
2105
1306
|
if (value === "}") {
|
|
2106
|
-
|
|
2107
|
-
if (opts.nobrace ===
|
|
1307
|
+
let brace = braces[braces.length - 1];
|
|
1308
|
+
if (opts.nobrace === !0 || !brace) {
|
|
2108
1309
|
push({ type: "text", value, output: value });
|
|
2109
1310
|
continue;
|
|
2110
1311
|
}
|
|
2111
1312
|
let output = ")";
|
|
2112
|
-
if (brace.dots ===
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
output = expandRange(range, opts);
|
|
2125
|
-
state.backtrack = true;
|
|
2126
|
-
}
|
|
2127
|
-
if (brace.comma !== true && brace.dots !== true) {
|
|
2128
|
-
const out = state.output.slice(0, brace.outputIndex);
|
|
2129
|
-
const toks = state.tokens.slice(brace.tokensIndex);
|
|
2130
|
-
brace.value = brace.output = "\\{";
|
|
2131
|
-
value = output = "\\}";
|
|
2132
|
-
state.output = out;
|
|
2133
|
-
for (const t of toks) {
|
|
1313
|
+
if (brace.dots === !0) {
|
|
1314
|
+
let arr = tokens.slice(), range = [];
|
|
1315
|
+
for (let i = arr.length - 1; i >= 0 && (tokens.pop(), arr[i].type !== "brace"); i--)
|
|
1316
|
+
arr[i].type !== "dots" && range.unshift(arr[i].value);
|
|
1317
|
+
output = expandRange(range, opts), state.backtrack = !0;
|
|
1318
|
+
}
|
|
1319
|
+
if (brace.comma !== !0 && brace.dots !== !0) {
|
|
1320
|
+
let out = state.output.slice(0, brace.outputIndex), toks = state.tokens.slice(brace.tokensIndex);
|
|
1321
|
+
brace.value = brace.output = "\\{", value = output = "\\}", state.output = out;
|
|
1322
|
+
for (let t of toks)
|
|
2134
1323
|
state.output += t.output || t.value;
|
|
2135
|
-
}
|
|
2136
1324
|
}
|
|
2137
|
-
push({ type: "brace", value, output });
|
|
2138
|
-
decrement("braces");
|
|
2139
|
-
braces.pop();
|
|
1325
|
+
push({ type: "brace", value, output }), decrement("braces"), braces.pop();
|
|
2140
1326
|
continue;
|
|
2141
1327
|
}
|
|
2142
1328
|
if (value === "|") {
|
|
2143
|
-
|
|
2144
|
-
extglobs[extglobs.length - 1].conditions++;
|
|
2145
|
-
}
|
|
2146
|
-
push({ type: "text", value });
|
|
1329
|
+
extglobs.length > 0 && extglobs[extglobs.length - 1].conditions++, push({ type: "text", value });
|
|
2147
1330
|
continue;
|
|
2148
1331
|
}
|
|
2149
1332
|
if (value === ",") {
|
|
2150
|
-
let output = value;
|
|
2151
|
-
|
|
2152
|
-
if (brace && stack[stack.length - 1] === "braces") {
|
|
2153
|
-
brace.comma = true;
|
|
2154
|
-
output = "|";
|
|
2155
|
-
}
|
|
2156
|
-
push({ type: "comma", value, output });
|
|
1333
|
+
let output = value, brace = braces[braces.length - 1];
|
|
1334
|
+
brace && stack[stack.length - 1] === "braces" && (brace.comma = !0, output = "|"), push({ type: "comma", value, output });
|
|
2157
1335
|
continue;
|
|
2158
1336
|
}
|
|
2159
1337
|
if (value === "/") {
|
|
2160
1338
|
if (prev.type === "dot" && state.index === state.start + 1) {
|
|
2161
|
-
state.start = state.index + 1;
|
|
2162
|
-
state.consumed = "";
|
|
2163
|
-
state.output = "";
|
|
2164
|
-
tokens.pop();
|
|
2165
|
-
prev = bos;
|
|
1339
|
+
state.start = state.index + 1, state.consumed = "", state.output = "", tokens.pop(), prev = bos;
|
|
2166
1340
|
continue;
|
|
2167
1341
|
}
|
|
2168
1342
|
push({ type: "slash", value, output: SLASH_LITERAL });
|
|
@@ -2170,12 +1344,9 @@ var require_parse2 = __commonJS({
|
|
|
2170
1344
|
}
|
|
2171
1345
|
if (value === ".") {
|
|
2172
1346
|
if (state.braces > 0 && prev.type === "dot") {
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
prev.type = "dots";
|
|
2176
|
-
prev.output += value;
|
|
2177
|
-
prev.value += value;
|
|
2178
|
-
brace.dots = true;
|
|
1347
|
+
prev.value === "." && (prev.output = DOT_LITERAL);
|
|
1348
|
+
let brace = braces[braces.length - 1];
|
|
1349
|
+
prev.type = "dots", prev.output += value, prev.value += value, brace.dots = !0;
|
|
2179
1350
|
continue;
|
|
2180
1351
|
}
|
|
2181
1352
|
if (state.braces + state.parens === 0 && prev.type !== "bos" && prev.type !== "slash") {
|
|
@@ -2186,24 +1357,18 @@ var require_parse2 = __commonJS({
|
|
|
2186
1357
|
continue;
|
|
2187
1358
|
}
|
|
2188
1359
|
if (value === "?") {
|
|
2189
|
-
|
|
2190
|
-
if (!isGroup && opts.noextglob !== true && peek() === "(" && peek(2) !== "?") {
|
|
1360
|
+
if (!(prev && prev.value === "(") && opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
|
|
2191
1361
|
extglobOpen("qmark", value);
|
|
2192
1362
|
continue;
|
|
2193
1363
|
}
|
|
2194
1364
|
if (prev && prev.type === "paren") {
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
if (next === "<" && !utils.supportsLookbehinds()) {
|
|
1365
|
+
let next = peek(), output = value;
|
|
1366
|
+
if (next === "<" && !utils.supportsLookbehinds())
|
|
2198
1367
|
throw new Error("Node.js v10 or higher is required for regex lookbehinds");
|
|
2199
|
-
}
|
|
2200
|
-
if (prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) {
|
|
2201
|
-
output = `\\${value}`;
|
|
2202
|
-
}
|
|
2203
|
-
push({ type: "text", value, output });
|
|
1368
|
+
(prev.value === "(" && !/[!=<:]/.test(next) || next === "<" && !/<([!=]|\w+>)/.test(remaining())) && (output = `\\${value}`), push({ type: "text", value, output });
|
|
2204
1369
|
continue;
|
|
2205
1370
|
}
|
|
2206
|
-
if (opts.dot !==
|
|
1371
|
+
if (opts.dot !== !0 && (prev.type === "slash" || prev.type === "bos")) {
|
|
2207
1372
|
push({ type: "qmark", value, output: QMARK_NO_DOT });
|
|
2208
1373
|
continue;
|
|
2209
1374
|
}
|
|
@@ -2211,23 +1376,21 @@ var require_parse2 = __commonJS({
|
|
|
2211
1376
|
continue;
|
|
2212
1377
|
}
|
|
2213
1378
|
if (value === "!") {
|
|
2214
|
-
if (opts.noextglob !==
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
continue;
|
|
2218
|
-
}
|
|
1379
|
+
if (opts.noextglob !== !0 && peek() === "(" && (peek(2) !== "?" || !/[!=<:]/.test(peek(3)))) {
|
|
1380
|
+
extglobOpen("negate", value);
|
|
1381
|
+
continue;
|
|
2219
1382
|
}
|
|
2220
|
-
if (opts.nonegate !==
|
|
1383
|
+
if (opts.nonegate !== !0 && state.index === 0) {
|
|
2221
1384
|
negate();
|
|
2222
1385
|
continue;
|
|
2223
1386
|
}
|
|
2224
1387
|
}
|
|
2225
1388
|
if (value === "+") {
|
|
2226
|
-
if (opts.noextglob !==
|
|
1389
|
+
if (opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
|
|
2227
1390
|
extglobOpen("plus", value);
|
|
2228
1391
|
continue;
|
|
2229
1392
|
}
|
|
2230
|
-
if (prev && prev.value === "(" || opts.regex ===
|
|
1393
|
+
if (prev && prev.value === "(" || opts.regex === !1) {
|
|
2231
1394
|
push({ type: "plus", value, output: PLUS_LITERAL });
|
|
2232
1395
|
continue;
|
|
2233
1396
|
}
|
|
@@ -2239,190 +1402,105 @@ var require_parse2 = __commonJS({
|
|
|
2239
1402
|
continue;
|
|
2240
1403
|
}
|
|
2241
1404
|
if (value === "@") {
|
|
2242
|
-
if (opts.noextglob !==
|
|
2243
|
-
push({ type: "at", extglob:
|
|
1405
|
+
if (opts.noextglob !== !0 && peek() === "(" && peek(2) !== "?") {
|
|
1406
|
+
push({ type: "at", extglob: !0, value, output: "" });
|
|
2244
1407
|
continue;
|
|
2245
1408
|
}
|
|
2246
1409
|
push({ type: "text", value });
|
|
2247
1410
|
continue;
|
|
2248
1411
|
}
|
|
2249
1412
|
if (value !== "*") {
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
}
|
|
2253
|
-
const match2 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
|
|
2254
|
-
if (match2) {
|
|
2255
|
-
value += match2[0];
|
|
2256
|
-
state.index += match2[0].length;
|
|
2257
|
-
}
|
|
2258
|
-
push({ type: "text", value });
|
|
1413
|
+
(value === "$" || value === "^") && (value = `\\${value}`);
|
|
1414
|
+
let match2 = REGEX_NON_SPECIAL_CHARS.exec(remaining());
|
|
1415
|
+
match2 && (value += match2[0], state.index += match2[0].length), push({ type: "text", value });
|
|
2259
1416
|
continue;
|
|
2260
1417
|
}
|
|
2261
|
-
if (prev && (prev.type === "globstar" || prev.star ===
|
|
2262
|
-
prev.type = "star";
|
|
2263
|
-
prev.star = true;
|
|
2264
|
-
prev.value += value;
|
|
2265
|
-
prev.output = star;
|
|
2266
|
-
state.backtrack = true;
|
|
2267
|
-
state.globstar = true;
|
|
2268
|
-
consume(value);
|
|
1418
|
+
if (prev && (prev.type === "globstar" || prev.star === !0)) {
|
|
1419
|
+
prev.type = "star", prev.star = !0, prev.value += value, prev.output = star, state.backtrack = !0, state.globstar = !0, consume(value);
|
|
2269
1420
|
continue;
|
|
2270
1421
|
}
|
|
2271
1422
|
let rest = remaining();
|
|
2272
|
-
if (opts.noextglob !==
|
|
1423
|
+
if (opts.noextglob !== !0 && /^\([^?]/.test(rest)) {
|
|
2273
1424
|
extglobOpen("star", value);
|
|
2274
1425
|
continue;
|
|
2275
1426
|
}
|
|
2276
1427
|
if (prev.type === "star") {
|
|
2277
|
-
if (opts.noglobstar ===
|
|
1428
|
+
if (opts.noglobstar === !0) {
|
|
2278
1429
|
consume(value);
|
|
2279
1430
|
continue;
|
|
2280
1431
|
}
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
const isStart = prior.type === "slash" || prior.type === "bos";
|
|
2284
|
-
const afterStar = before && (before.type === "star" || before.type === "globstar");
|
|
2285
|
-
if (opts.bash === true && (!isStart || rest[0] && rest[0] !== "/")) {
|
|
1432
|
+
let prior = prev.prev, before = prior.prev, isStart = prior.type === "slash" || prior.type === "bos", afterStar = before && (before.type === "star" || before.type === "globstar");
|
|
1433
|
+
if (opts.bash === !0 && (!isStart || rest[0] && rest[0] !== "/")) {
|
|
2286
1434
|
push({ type: "star", value, output: "" });
|
|
2287
1435
|
continue;
|
|
2288
1436
|
}
|
|
2289
|
-
|
|
2290
|
-
const isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
|
|
1437
|
+
let isBrace = state.braces > 0 && (prior.type === "comma" || prior.type === "brace"), isExtglob = extglobs.length && (prior.type === "pipe" || prior.type === "paren");
|
|
2291
1438
|
if (!isStart && prior.type !== "paren" && !isBrace && !isExtglob) {
|
|
2292
1439
|
push({ type: "star", value, output: "" });
|
|
2293
1440
|
continue;
|
|
2294
1441
|
}
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
if (after && after !== "/")
|
|
1442
|
+
for (; rest.slice(0, 3) === "/**"; ) {
|
|
1443
|
+
let after = input[state.index + 4];
|
|
1444
|
+
if (after && after !== "/")
|
|
2298
1445
|
break;
|
|
2299
|
-
|
|
2300
|
-
rest = rest.slice(3);
|
|
2301
|
-
consume("/**", 3);
|
|
1446
|
+
rest = rest.slice(3), consume("/**", 3);
|
|
2302
1447
|
}
|
|
2303
1448
|
if (prior.type === "bos" && eos()) {
|
|
2304
|
-
prev.type = "globstar";
|
|
2305
|
-
prev.value += value;
|
|
2306
|
-
prev.output = globstar(opts);
|
|
2307
|
-
state.output = prev.output;
|
|
2308
|
-
state.globstar = true;
|
|
2309
|
-
consume(value);
|
|
1449
|
+
prev.type = "globstar", prev.value += value, prev.output = globstar(opts), state.output = prev.output, state.globstar = !0, consume(value);
|
|
2310
1450
|
continue;
|
|
2311
1451
|
}
|
|
2312
1452
|
if (prior.type === "slash" && prior.prev.type !== "bos" && !afterStar && eos()) {
|
|
2313
|
-
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
2314
|
-
prior.output = `(?:${prior.output}`;
|
|
2315
|
-
prev.type = "globstar";
|
|
2316
|
-
prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)");
|
|
2317
|
-
prev.value += value;
|
|
2318
|
-
state.globstar = true;
|
|
2319
|
-
state.output += prior.output + prev.output;
|
|
2320
|
-
consume(value);
|
|
1453
|
+
state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = "globstar", prev.output = globstar(opts) + (opts.strictSlashes ? ")" : "|$)"), prev.value += value, state.globstar = !0, state.output += prior.output + prev.output, consume(value);
|
|
2321
1454
|
continue;
|
|
2322
1455
|
}
|
|
2323
1456
|
if (prior.type === "slash" && prior.prev.type !== "bos" && rest[0] === "/") {
|
|
2324
|
-
|
|
2325
|
-
state.output = state.output.slice(0, -(prior.output + prev.output).length);
|
|
2326
|
-
prior.output = `(?:${prior.output}`;
|
|
2327
|
-
prev.type = "globstar";
|
|
2328
|
-
prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`;
|
|
2329
|
-
prev.value += value;
|
|
2330
|
-
state.output += prior.output + prev.output;
|
|
2331
|
-
state.globstar = true;
|
|
2332
|
-
consume(value + advance());
|
|
2333
|
-
push({ type: "slash", value: "/", output: "" });
|
|
1457
|
+
let end = rest[1] !== void 0 ? "|$" : "";
|
|
1458
|
+
state.output = state.output.slice(0, -(prior.output + prev.output).length), prior.output = `(?:${prior.output}`, prev.type = "globstar", prev.output = `${globstar(opts)}${SLASH_LITERAL}|${SLASH_LITERAL}${end})`, prev.value += value, state.output += prior.output + prev.output, state.globstar = !0, consume(value + advance()), push({ type: "slash", value: "/", output: "" });
|
|
2334
1459
|
continue;
|
|
2335
1460
|
}
|
|
2336
1461
|
if (prior.type === "bos" && rest[0] === "/") {
|
|
2337
|
-
prev.type = "globstar";
|
|
2338
|
-
prev.value += value;
|
|
2339
|
-
prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`;
|
|
2340
|
-
state.output = prev.output;
|
|
2341
|
-
state.globstar = true;
|
|
2342
|
-
consume(value + advance());
|
|
2343
|
-
push({ type: "slash", value: "/", output: "" });
|
|
1462
|
+
prev.type = "globstar", prev.value += value, prev.output = `(?:^|${SLASH_LITERAL}|${globstar(opts)}${SLASH_LITERAL})`, state.output = prev.output, state.globstar = !0, consume(value + advance()), push({ type: "slash", value: "/", output: "" });
|
|
2344
1463
|
continue;
|
|
2345
1464
|
}
|
|
2346
|
-
state.output = state.output.slice(0, -prev.output.length);
|
|
2347
|
-
prev.type = "globstar";
|
|
2348
|
-
prev.output = globstar(opts);
|
|
2349
|
-
prev.value += value;
|
|
2350
|
-
state.output += prev.output;
|
|
2351
|
-
state.globstar = true;
|
|
2352
|
-
consume(value);
|
|
1465
|
+
state.output = state.output.slice(0, -prev.output.length), prev.type = "globstar", prev.output = globstar(opts), prev.value += value, state.output += prev.output, state.globstar = !0, consume(value);
|
|
2353
1466
|
continue;
|
|
2354
1467
|
}
|
|
2355
|
-
|
|
2356
|
-
if (opts.bash ===
|
|
2357
|
-
token.output = ".*?";
|
|
2358
|
-
if (prev.type === "bos" || prev.type === "slash") {
|
|
2359
|
-
token.output = nodot + token.output;
|
|
2360
|
-
}
|
|
2361
|
-
push(token);
|
|
1468
|
+
let token = { type: "star", value, output: star };
|
|
1469
|
+
if (opts.bash === !0) {
|
|
1470
|
+
token.output = ".*?", (prev.type === "bos" || prev.type === "slash") && (token.output = nodot + token.output), push(token);
|
|
2362
1471
|
continue;
|
|
2363
1472
|
}
|
|
2364
|
-
if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex ===
|
|
2365
|
-
token.output = value;
|
|
2366
|
-
push(token);
|
|
1473
|
+
if (prev && (prev.type === "bracket" || prev.type === "paren") && opts.regex === !0) {
|
|
1474
|
+
token.output = value, push(token);
|
|
2367
1475
|
continue;
|
|
2368
1476
|
}
|
|
2369
|
-
|
|
2370
|
-
if (prev.type === "dot") {
|
|
2371
|
-
state.output += NO_DOT_SLASH;
|
|
2372
|
-
prev.output += NO_DOT_SLASH;
|
|
2373
|
-
} else if (opts.dot === true) {
|
|
2374
|
-
state.output += NO_DOTS_SLASH;
|
|
2375
|
-
prev.output += NO_DOTS_SLASH;
|
|
2376
|
-
} else {
|
|
2377
|
-
state.output += nodot;
|
|
2378
|
-
prev.output += nodot;
|
|
2379
|
-
}
|
|
2380
|
-
if (peek() !== "*") {
|
|
2381
|
-
state.output += ONE_CHAR;
|
|
2382
|
-
prev.output += ONE_CHAR;
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
push(token);
|
|
2386
|
-
}
|
|
2387
|
-
while (state.brackets > 0) {
|
|
2388
|
-
if (opts.strictBrackets === true) throw new SyntaxError(syntaxError("closing", "]"));
|
|
2389
|
-
state.output = utils.escapeLast(state.output, "[");
|
|
2390
|
-
decrement("brackets");
|
|
1477
|
+
(state.index === state.start || prev.type === "slash" || prev.type === "dot") && (prev.type === "dot" ? (state.output += NO_DOT_SLASH, prev.output += NO_DOT_SLASH) : opts.dot === !0 ? (state.output += NO_DOTS_SLASH, prev.output += NO_DOTS_SLASH) : (state.output += nodot, prev.output += nodot), peek() !== "*" && (state.output += ONE_CHAR, prev.output += ONE_CHAR)), push(token);
|
|
2391
1478
|
}
|
|
2392
|
-
|
|
2393
|
-
if (opts.strictBrackets ===
|
|
2394
|
-
state.output = utils.escapeLast(state.output, "(");
|
|
2395
|
-
decrement("parens");
|
|
1479
|
+
for (; state.brackets > 0; ) {
|
|
1480
|
+
if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", "]"));
|
|
1481
|
+
state.output = utils.escapeLast(state.output, "["), decrement("brackets");
|
|
2396
1482
|
}
|
|
2397
|
-
|
|
2398
|
-
if (opts.strictBrackets ===
|
|
2399
|
-
state.output = utils.escapeLast(state.output, "
|
|
2400
|
-
decrement("braces");
|
|
1483
|
+
for (; state.parens > 0; ) {
|
|
1484
|
+
if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", ")"));
|
|
1485
|
+
state.output = utils.escapeLast(state.output, "("), decrement("parens");
|
|
2401
1486
|
}
|
|
2402
|
-
|
|
2403
|
-
|
|
1487
|
+
for (; state.braces > 0; ) {
|
|
1488
|
+
if (opts.strictBrackets === !0) throw new SyntaxError(syntaxError("closing", "}"));
|
|
1489
|
+
state.output = utils.escapeLast(state.output, "{"), decrement("braces");
|
|
2404
1490
|
}
|
|
2405
|
-
if (state.backtrack ===
|
|
1491
|
+
if (opts.strictSlashes !== !0 && (prev.type === "star" || prev.type === "bracket") && push({ type: "maybe_slash", value: "", output: `${SLASH_LITERAL}?` }), state.backtrack === !0) {
|
|
2406
1492
|
state.output = "";
|
|
2407
|
-
for (
|
|
2408
|
-
state.output += token.output != null ? token.output : token.value;
|
|
2409
|
-
if (token.suffix) {
|
|
2410
|
-
state.output += token.suffix;
|
|
2411
|
-
}
|
|
2412
|
-
}
|
|
1493
|
+
for (let token of state.tokens)
|
|
1494
|
+
state.output += token.output != null ? token.output : token.value, token.suffix && (state.output += token.suffix);
|
|
2413
1495
|
}
|
|
2414
1496
|
return state;
|
|
2415
|
-
}
|
|
1497
|
+
};
|
|
2416
1498
|
parse.fastpaths = (input, options) => {
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
const len = input.length;
|
|
2420
|
-
if (len > max) {
|
|
1499
|
+
let opts = { ...options }, max = typeof opts.maxLength == "number" ? Math.min(MAX_LENGTH, opts.maxLength) : MAX_LENGTH, len = input.length;
|
|
1500
|
+
if (len > max)
|
|
2421
1501
|
throw new SyntaxError(`Input length: ${len}, exceeds maximum allowed length: ${max}`);
|
|
2422
|
-
}
|
|
2423
1502
|
input = REPLACEMENTS[input] || input;
|
|
2424
|
-
|
|
2425
|
-
const {
|
|
1503
|
+
let win32 = utils.isWindows(options), {
|
|
2426
1504
|
DOT_LITERAL,
|
|
2427
1505
|
SLASH_LITERAL,
|
|
2428
1506
|
ONE_CHAR,
|
|
@@ -2432,20 +1510,9 @@ var require_parse2 = __commonJS({
|
|
|
2432
1510
|
NO_DOTS_SLASH,
|
|
2433
1511
|
STAR,
|
|
2434
1512
|
START_ANCHOR
|
|
2435
|
-
} = constants.globChars(win32);
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
const capture = opts.capture ? "" : "?:";
|
|
2439
|
-
const state = { negated: false, prefix: "" };
|
|
2440
|
-
let star = opts.bash === true ? ".*?" : STAR;
|
|
2441
|
-
if (opts.capture) {
|
|
2442
|
-
star = `(${star})`;
|
|
2443
|
-
}
|
|
2444
|
-
const globstar = /* @__PURE__ */ __name((opts2) => {
|
|
2445
|
-
if (opts2.noglobstar === true) return star;
|
|
2446
|
-
return `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`;
|
|
2447
|
-
}, "globstar");
|
|
2448
|
-
const create = /* @__PURE__ */ __name((str) => {
|
|
1513
|
+
} = constants.globChars(win32), nodot = opts.dot ? NO_DOTS : NO_DOT, slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT, capture = opts.capture ? "" : "?:", state = { negated: !1, prefix: "" }, star = opts.bash === !0 ? ".*?" : STAR;
|
|
1514
|
+
opts.capture && (star = `(${star})`);
|
|
1515
|
+
let globstar = (opts2) => opts2.noglobstar === !0 ? star : `(${capture}(?:(?!${START_ANCHOR}${opts2.dot ? DOTS_SLASH : DOT_LITERAL}).)*?)`, create = (str) => {
|
|
2449
1516
|
switch (str) {
|
|
2450
1517
|
case "*":
|
|
2451
1518
|
return `${nodot}${ONE_CHAR}${star}`;
|
|
@@ -2464,20 +1531,14 @@ var require_parse2 = __commonJS({
|
|
|
2464
1531
|
case "**/.*":
|
|
2465
1532
|
return `(?:${nodot}${globstar(opts)}${SLASH_LITERAL})?${DOT_LITERAL}${ONE_CHAR}${star}`;
|
|
2466
1533
|
default: {
|
|
2467
|
-
|
|
1534
|
+
let match2 = /^(.*?)\.(\w+)$/.exec(str);
|
|
2468
1535
|
if (!match2) return;
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
return source2 + DOT_LITERAL + match2[2];
|
|
1536
|
+
let source2 = create(match2[1]);
|
|
1537
|
+
return source2 ? source2 + DOT_LITERAL + match2[2] : void 0;
|
|
2472
1538
|
}
|
|
2473
1539
|
}
|
|
2474
|
-
},
|
|
2475
|
-
|
|
2476
|
-
let source = create(output);
|
|
2477
|
-
if (source && opts.strictSlashes !== true) {
|
|
2478
|
-
source += `${SLASH_LITERAL}?`;
|
|
2479
|
-
}
|
|
2480
|
-
return source;
|
|
1540
|
+
}, output = utils.removePrefix(input, state), source = create(output);
|
|
1541
|
+
return source && opts.strictSlashes !== !0 && (source += `${SLASH_LITERAL}?`), source;
|
|
2481
1542
|
};
|
|
2482
1543
|
module.exports = parse;
|
|
2483
1544
|
}
|
|
@@ -2487,135 +1548,65 @@ var require_parse2 = __commonJS({
|
|
|
2487
1548
|
var require_picomatch = __commonJS({
|
|
2488
1549
|
"../../node_modules/picomatch/lib/picomatch.js"(exports, module) {
|
|
2489
1550
|
"use strict";
|
|
2490
|
-
var path = __require("path")
|
|
2491
|
-
var scan = require_scan();
|
|
2492
|
-
var parse = require_parse2();
|
|
2493
|
-
var utils = require_utils2();
|
|
2494
|
-
var constants = require_constants2();
|
|
2495
|
-
var isObject = /* @__PURE__ */ __name((val) => val && typeof val === "object" && !Array.isArray(val), "isObject");
|
|
2496
|
-
var picomatch = /* @__PURE__ */ __name((glob, options, returnState = false) => {
|
|
1551
|
+
var path = __require("path"), scan = require_scan(), parse = require_parse2(), utils = require_utils2(), constants = require_constants2(), isObject = (val) => val && typeof val == "object" && !Array.isArray(val), picomatch = (glob, options, returnState = !1) => {
|
|
2497
1552
|
if (Array.isArray(glob)) {
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
for (
|
|
2501
|
-
|
|
1553
|
+
let fns = glob.map((input) => picomatch(input, options, returnState));
|
|
1554
|
+
return (str) => {
|
|
1555
|
+
for (let isMatch of fns) {
|
|
1556
|
+
let state2 = isMatch(str);
|
|
2502
1557
|
if (state2) return state2;
|
|
2503
1558
|
}
|
|
2504
|
-
return
|
|
2505
|
-
}
|
|
2506
|
-
return arrayMatcher;
|
|
1559
|
+
return !1;
|
|
1560
|
+
};
|
|
2507
1561
|
}
|
|
2508
|
-
|
|
2509
|
-
if (glob === "" || typeof glob
|
|
1562
|
+
let isState = isObject(glob) && glob.tokens && glob.input;
|
|
1563
|
+
if (glob === "" || typeof glob != "string" && !isState)
|
|
2510
1564
|
throw new TypeError("Expected pattern to be a non-empty string");
|
|
2511
|
-
}
|
|
2512
|
-
const opts = options || {};
|
|
2513
|
-
const posix = utils.isWindows(options);
|
|
2514
|
-
const regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, false, true);
|
|
2515
|
-
const state = regex.state;
|
|
1565
|
+
let opts = options || {}, posix = utils.isWindows(options), regex = isState ? picomatch.compileRe(glob, options) : picomatch.makeRe(glob, options, !1, !0), state = regex.state;
|
|
2516
1566
|
delete regex.state;
|
|
2517
|
-
let isIgnored =
|
|
1567
|
+
let isIgnored = () => !1;
|
|
2518
1568
|
if (opts.ignore) {
|
|
2519
|
-
|
|
1569
|
+
let ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
|
|
2520
1570
|
isIgnored = picomatch(opts.ignore, ignoreOpts, returnState);
|
|
2521
1571
|
}
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
if (isMatch === false) {
|
|
2529
|
-
result.isMatch = false;
|
|
2530
|
-
return returnObject ? result : false;
|
|
2531
|
-
}
|
|
2532
|
-
if (isIgnored(input)) {
|
|
2533
|
-
if (typeof opts.onIgnore === "function") {
|
|
2534
|
-
opts.onIgnore(result);
|
|
2535
|
-
}
|
|
2536
|
-
result.isMatch = false;
|
|
2537
|
-
return returnObject ? result : false;
|
|
2538
|
-
}
|
|
2539
|
-
if (typeof opts.onMatch === "function") {
|
|
2540
|
-
opts.onMatch(result);
|
|
2541
|
-
}
|
|
2542
|
-
return returnObject ? result : true;
|
|
2543
|
-
}, "matcher");
|
|
2544
|
-
if (returnState) {
|
|
2545
|
-
matcher.state = state;
|
|
2546
|
-
}
|
|
2547
|
-
return matcher;
|
|
2548
|
-
}, "picomatch");
|
|
1572
|
+
let matcher = (input, returnObject = !1) => {
|
|
1573
|
+
let { isMatch, match: match2, output } = picomatch.test(input, regex, options, { glob, posix }), result = { glob, state, regex, posix, input, output, match: match2, isMatch };
|
|
1574
|
+
return typeof opts.onResult == "function" && opts.onResult(result), isMatch === !1 ? (result.isMatch = !1, returnObject ? result : !1) : isIgnored(input) ? (typeof opts.onIgnore == "function" && opts.onIgnore(result), result.isMatch = !1, returnObject ? result : !1) : (typeof opts.onMatch == "function" && opts.onMatch(result), returnObject ? result : !0);
|
|
1575
|
+
};
|
|
1576
|
+
return returnState && (matcher.state = state), matcher;
|
|
1577
|
+
};
|
|
2549
1578
|
picomatch.test = (input, regex, options, { glob, posix } = {}) => {
|
|
2550
|
-
if (typeof input
|
|
1579
|
+
if (typeof input != "string")
|
|
2551
1580
|
throw new TypeError("Expected input to be a string");
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
}
|
|
2556
|
-
const opts = options || {};
|
|
2557
|
-
const format = opts.format || (posix ? utils.toPosixSlashes : null);
|
|
2558
|
-
let match2 = input === glob;
|
|
2559
|
-
let output = match2 && format ? format(input) : input;
|
|
2560
|
-
if (match2 === false) {
|
|
2561
|
-
output = format ? format(input) : input;
|
|
2562
|
-
match2 = output === glob;
|
|
2563
|
-
}
|
|
2564
|
-
if (match2 === false || opts.capture === true) {
|
|
2565
|
-
if (opts.matchBase === true || opts.basename === true) {
|
|
2566
|
-
match2 = picomatch.matchBase(input, regex, options, posix);
|
|
2567
|
-
} else {
|
|
2568
|
-
match2 = regex.exec(output);
|
|
2569
|
-
}
|
|
2570
|
-
}
|
|
2571
|
-
return { isMatch: Boolean(match2), match: match2, output };
|
|
2572
|
-
};
|
|
2573
|
-
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => {
|
|
2574
|
-
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
2575
|
-
return regex.test(path.basename(input));
|
|
1581
|
+
if (input === "")
|
|
1582
|
+
return { isMatch: !1, output: "" };
|
|
1583
|
+
let opts = options || {}, format = opts.format || (posix ? utils.toPosixSlashes : null), match2 = input === glob, output = match2 && format ? format(input) : input;
|
|
1584
|
+
return match2 === !1 && (output = format ? format(input) : input, match2 = output === glob), (match2 === !1 || opts.capture === !0) && (opts.matchBase === !0 || opts.basename === !0 ? match2 = picomatch.matchBase(input, regex, options, posix) : match2 = regex.exec(output)), { isMatch: !!match2, match: match2, output };
|
|
2576
1585
|
};
|
|
1586
|
+
picomatch.matchBase = (input, glob, options, posix = utils.isWindows(options)) => (glob instanceof RegExp ? glob : picomatch.makeRe(glob, options)).test(path.basename(input));
|
|
2577
1587
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
2578
|
-
picomatch.parse = (pattern, options) => {
|
|
2579
|
-
if (Array.isArray(pattern)) return pattern.map((p) => picomatch.parse(p, options));
|
|
2580
|
-
return parse(pattern, { ...options, fastpaths: false });
|
|
2581
|
-
};
|
|
1588
|
+
picomatch.parse = (pattern, options) => Array.isArray(pattern) ? pattern.map((p) => picomatch.parse(p, options)) : parse(pattern, { ...options, fastpaths: !1 });
|
|
2582
1589
|
picomatch.scan = (input, options) => scan(input, options);
|
|
2583
|
-
picomatch.compileRe = (state, options, returnOutput =
|
|
2584
|
-
if (returnOutput ===
|
|
1590
|
+
picomatch.compileRe = (state, options, returnOutput = !1, returnState = !1) => {
|
|
1591
|
+
if (returnOutput === !0)
|
|
2585
1592
|
return state.output;
|
|
2586
|
-
}
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
let source = `${prepend}(?:${state.output})${append}`;
|
|
2591
|
-
if (state && state.negated === true) {
|
|
2592
|
-
source = `^(?!${source}).*$`;
|
|
2593
|
-
}
|
|
2594
|
-
const regex = picomatch.toRegex(source, options);
|
|
2595
|
-
if (returnState === true) {
|
|
2596
|
-
regex.state = state;
|
|
2597
|
-
}
|
|
2598
|
-
return regex;
|
|
1593
|
+
let opts = options || {}, prepend = opts.contains ? "" : "^", append = opts.contains ? "" : "$", source = `${prepend}(?:${state.output})${append}`;
|
|
1594
|
+
state && state.negated === !0 && (source = `^(?!${source}).*$`);
|
|
1595
|
+
let regex = picomatch.toRegex(source, options);
|
|
1596
|
+
return returnState === !0 && (regex.state = state), regex;
|
|
2599
1597
|
};
|
|
2600
|
-
picomatch.makeRe = (input, options = {}, returnOutput =
|
|
2601
|
-
if (!input || typeof input
|
|
1598
|
+
picomatch.makeRe = (input, options = {}, returnOutput = !1, returnState = !1) => {
|
|
1599
|
+
if (!input || typeof input != "string")
|
|
2602
1600
|
throw new TypeError("Expected a non-empty string");
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2605
|
-
if (options.fastpaths !== false && (input[0] === "." || input[0] === "*")) {
|
|
2606
|
-
parsed.output = parse.fastpaths(input, options);
|
|
2607
|
-
}
|
|
2608
|
-
if (!parsed.output) {
|
|
2609
|
-
parsed = parse(input, options);
|
|
2610
|
-
}
|
|
2611
|
-
return picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
1601
|
+
let parsed = { negated: !1, fastpaths: !0 };
|
|
1602
|
+
return options.fastpaths !== !1 && (input[0] === "." || input[0] === "*") && (parsed.output = parse.fastpaths(input, options)), parsed.output || (parsed = parse(input, options)), picomatch.compileRe(parsed, options, returnOutput, returnState);
|
|
2612
1603
|
};
|
|
2613
1604
|
picomatch.toRegex = (source, options) => {
|
|
2614
1605
|
try {
|
|
2615
|
-
|
|
1606
|
+
let opts = options || {};
|
|
2616
1607
|
return new RegExp(source, opts.flags || (opts.nocase ? "i" : ""));
|
|
2617
1608
|
} catch (err) {
|
|
2618
|
-
if (options && options.debug ===
|
|
1609
|
+
if (options && options.debug === !0) throw err;
|
|
2619
1610
|
return /$^/;
|
|
2620
1611
|
}
|
|
2621
1612
|
};
|
|
@@ -2636,99 +1627,61 @@ var require_picomatch2 = __commonJS({
|
|
|
2636
1627
|
var require_micromatch = __commonJS({
|
|
2637
1628
|
"../../node_modules/micromatch/index.js"(exports, module) {
|
|
2638
1629
|
"use strict";
|
|
2639
|
-
var util = __require("util")
|
|
2640
|
-
|
|
2641
|
-
var picomatch = require_picomatch2();
|
|
2642
|
-
var utils = require_utils2();
|
|
2643
|
-
var isEmptyString = /* @__PURE__ */ __name((v) => v === "" || v === "./", "isEmptyString");
|
|
2644
|
-
var hasBraces = /* @__PURE__ */ __name((v) => {
|
|
2645
|
-
const index = v.indexOf("{");
|
|
1630
|
+
var util = __require("util"), braces = require_braces(), picomatch = require_picomatch2(), utils = require_utils2(), isEmptyString = (v) => v === "" || v === "./", hasBraces = (v) => {
|
|
1631
|
+
let index = v.indexOf("{");
|
|
2646
1632
|
return index > -1 && v.indexOf("}", index) > -1;
|
|
2647
|
-
},
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
let keep = /* @__PURE__ */ new Set();
|
|
2653
|
-
let items = /* @__PURE__ */ new Set();
|
|
2654
|
-
let negatives = 0;
|
|
2655
|
-
let onResult = /* @__PURE__ */ __name((state) => {
|
|
2656
|
-
items.add(state.output);
|
|
2657
|
-
if (options && options.onResult) {
|
|
2658
|
-
options.onResult(state);
|
|
2659
|
-
}
|
|
2660
|
-
}, "onResult");
|
|
1633
|
+
}, micromatch = (list, patterns, options) => {
|
|
1634
|
+
patterns = [].concat(patterns), list = [].concat(list);
|
|
1635
|
+
let omit = /* @__PURE__ */ new Set(), keep = /* @__PURE__ */ new Set(), items = /* @__PURE__ */ new Set(), negatives = 0, onResult = (state) => {
|
|
1636
|
+
items.add(state.output), options && options.onResult && options.onResult(state);
|
|
1637
|
+
};
|
|
2661
1638
|
for (let i = 0; i < patterns.length; i++) {
|
|
2662
|
-
let isMatch = picomatch(String(patterns[i]), { ...options, onResult },
|
|
2663
|
-
|
|
2664
|
-
if (negated) negatives++;
|
|
1639
|
+
let isMatch = picomatch(String(patterns[i]), { ...options, onResult }, !0), negated = isMatch.state.negated || isMatch.state.negatedExtglob;
|
|
1640
|
+
negated && negatives++;
|
|
2665
1641
|
for (let item of list) {
|
|
2666
|
-
let matched = isMatch(item,
|
|
2667
|
-
|
|
2668
|
-
if (!match2) continue;
|
|
2669
|
-
if (negated) {
|
|
2670
|
-
omit.add(matched.output);
|
|
2671
|
-
} else {
|
|
2672
|
-
omit.delete(matched.output);
|
|
2673
|
-
keep.add(matched.output);
|
|
2674
|
-
}
|
|
1642
|
+
let matched = isMatch(item, !0);
|
|
1643
|
+
(negated ? !matched.isMatch : matched.isMatch) && (negated ? omit.add(matched.output) : (omit.delete(matched.output), keep.add(matched.output)));
|
|
2675
1644
|
}
|
|
2676
1645
|
}
|
|
2677
|
-
let
|
|
2678
|
-
let matches = result.filter((item) => !omit.has(item));
|
|
1646
|
+
let matches = (negatives === patterns.length ? [...items] : [...keep]).filter((item) => !omit.has(item));
|
|
2679
1647
|
if (options && matches.length === 0) {
|
|
2680
|
-
if (options.failglob ===
|
|
1648
|
+
if (options.failglob === !0)
|
|
2681
1649
|
throw new Error(`No matches found for "${patterns.join(", ")}"`);
|
|
2682
|
-
|
|
2683
|
-
if (options.nonull === true || options.nullglob === true) {
|
|
1650
|
+
if (options.nonull === !0 || options.nullglob === !0)
|
|
2684
1651
|
return options.unescape ? patterns.map((p) => p.replace(/\\/g, "")) : patterns;
|
|
2685
|
-
}
|
|
2686
1652
|
}
|
|
2687
1653
|
return matches;
|
|
2688
|
-
}
|
|
1654
|
+
};
|
|
2689
1655
|
micromatch.match = micromatch;
|
|
2690
1656
|
micromatch.matcher = (pattern, options) => picomatch(pattern, options);
|
|
2691
1657
|
micromatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
2692
1658
|
micromatch.any = micromatch.isMatch;
|
|
2693
1659
|
micromatch.not = (list, patterns, options = {}) => {
|
|
2694
1660
|
patterns = [].concat(patterns).map(String);
|
|
2695
|
-
let result = /* @__PURE__ */ new Set()
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
}, "onResult");
|
|
2701
|
-
let matches = new Set(micromatch(list, patterns, { ...options, onResult }));
|
|
2702
|
-
for (let item of items) {
|
|
2703
|
-
if (!matches.has(item)) {
|
|
2704
|
-
result.add(item);
|
|
2705
|
-
}
|
|
2706
|
-
}
|
|
1661
|
+
let result = /* @__PURE__ */ new Set(), items = [], onResult = (state) => {
|
|
1662
|
+
options.onResult && options.onResult(state), items.push(state.output);
|
|
1663
|
+
}, matches = new Set(micromatch(list, patterns, { ...options, onResult }));
|
|
1664
|
+
for (let item of items)
|
|
1665
|
+
matches.has(item) || result.add(item);
|
|
2707
1666
|
return [...result];
|
|
2708
1667
|
};
|
|
2709
1668
|
micromatch.contains = (str, pattern, options) => {
|
|
2710
|
-
if (typeof str
|
|
1669
|
+
if (typeof str != "string")
|
|
2711
1670
|
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
2712
|
-
|
|
2713
|
-
if (Array.isArray(pattern)) {
|
|
1671
|
+
if (Array.isArray(pattern))
|
|
2714
1672
|
return pattern.some((p) => micromatch.contains(str, p, options));
|
|
1673
|
+
if (typeof pattern == "string") {
|
|
1674
|
+
if (isEmptyString(str) || isEmptyString(pattern))
|
|
1675
|
+
return !1;
|
|
1676
|
+
if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern))
|
|
1677
|
+
return !0;
|
|
2715
1678
|
}
|
|
2716
|
-
|
|
2717
|
-
if (isEmptyString(str) || isEmptyString(pattern)) {
|
|
2718
|
-
return false;
|
|
2719
|
-
}
|
|
2720
|
-
if (str.includes(pattern) || str.startsWith("./") && str.slice(2).includes(pattern)) {
|
|
2721
|
-
return true;
|
|
2722
|
-
}
|
|
2723
|
-
}
|
|
2724
|
-
return micromatch.isMatch(str, pattern, { ...options, contains: true });
|
|
1679
|
+
return micromatch.isMatch(str, pattern, { ...options, contains: !0 });
|
|
2725
1680
|
};
|
|
2726
1681
|
micromatch.matchKeys = (obj, patterns, options) => {
|
|
2727
|
-
if (!utils.isObject(obj))
|
|
1682
|
+
if (!utils.isObject(obj))
|
|
2728
1683
|
throw new TypeError("Expected the first argument to be an object");
|
|
2729
|
-
}
|
|
2730
|
-
let keys = micromatch(Object.keys(obj), patterns, options);
|
|
2731
|
-
let res = {};
|
|
1684
|
+
let keys = micromatch(Object.keys(obj), patterns, options), res = {};
|
|
2732
1685
|
for (let key of keys) res[key] = obj[key];
|
|
2733
1686
|
return res;
|
|
2734
1687
|
};
|
|
@@ -2736,57 +1689,46 @@ var require_micromatch = __commonJS({
|
|
|
2736
1689
|
let items = [].concat(list);
|
|
2737
1690
|
for (let pattern of [].concat(patterns)) {
|
|
2738
1691
|
let isMatch = picomatch(String(pattern), options);
|
|
2739
|
-
if (items.some((item) => isMatch(item)))
|
|
2740
|
-
return
|
|
2741
|
-
}
|
|
1692
|
+
if (items.some((item) => isMatch(item)))
|
|
1693
|
+
return !0;
|
|
2742
1694
|
}
|
|
2743
|
-
return
|
|
1695
|
+
return !1;
|
|
2744
1696
|
};
|
|
2745
1697
|
micromatch.every = (list, patterns, options) => {
|
|
2746
1698
|
let items = [].concat(list);
|
|
2747
1699
|
for (let pattern of [].concat(patterns)) {
|
|
2748
1700
|
let isMatch = picomatch(String(pattern), options);
|
|
2749
|
-
if (!items.every((item) => isMatch(item)))
|
|
2750
|
-
return
|
|
2751
|
-
}
|
|
1701
|
+
if (!items.every((item) => isMatch(item)))
|
|
1702
|
+
return !1;
|
|
2752
1703
|
}
|
|
2753
|
-
return
|
|
1704
|
+
return !0;
|
|
2754
1705
|
};
|
|
2755
1706
|
micromatch.all = (str, patterns, options) => {
|
|
2756
|
-
if (typeof str
|
|
1707
|
+
if (typeof str != "string")
|
|
2757
1708
|
throw new TypeError(`Expected a string: "${util.inspect(str)}"`);
|
|
2758
|
-
}
|
|
2759
1709
|
return [].concat(patterns).every((p) => picomatch(p, options)(str));
|
|
2760
1710
|
};
|
|
2761
1711
|
micromatch.capture = (glob, input, options) => {
|
|
2762
|
-
let posix = utils.isWindows(options);
|
|
2763
|
-
|
|
2764
|
-
let match2 = regex.exec(posix ? utils.toPosixSlashes(input) : input);
|
|
2765
|
-
if (match2) {
|
|
1712
|
+
let posix = utils.isWindows(options), match2 = picomatch.makeRe(String(glob), { ...options, capture: !0 }).exec(posix ? utils.toPosixSlashes(input) : input);
|
|
1713
|
+
if (match2)
|
|
2766
1714
|
return match2.slice(1).map((v) => v === void 0 ? "" : v);
|
|
2767
|
-
}
|
|
2768
1715
|
};
|
|
2769
1716
|
micromatch.makeRe = (...args) => picomatch.makeRe(...args);
|
|
2770
1717
|
micromatch.scan = (...args) => picomatch.scan(...args);
|
|
2771
1718
|
micromatch.parse = (patterns, options) => {
|
|
2772
1719
|
let res = [];
|
|
2773
|
-
for (let pattern of [].concat(patterns || []))
|
|
2774
|
-
for (let str of braces(String(pattern), options))
|
|
1720
|
+
for (let pattern of [].concat(patterns || []))
|
|
1721
|
+
for (let str of braces(String(pattern), options))
|
|
2775
1722
|
res.push(picomatch.parse(str, options));
|
|
2776
|
-
}
|
|
2777
|
-
}
|
|
2778
1723
|
return res;
|
|
2779
1724
|
};
|
|
2780
1725
|
micromatch.braces = (pattern, options) => {
|
|
2781
|
-
if (typeof pattern
|
|
2782
|
-
|
|
2783
|
-
return [pattern];
|
|
2784
|
-
}
|
|
2785
|
-
return braces(pattern, options);
|
|
1726
|
+
if (typeof pattern != "string") throw new TypeError("Expected a string");
|
|
1727
|
+
return options && options.nobrace === !0 || !hasBraces(pattern) ? [pattern] : braces(pattern, options);
|
|
2786
1728
|
};
|
|
2787
1729
|
micromatch.braceExpand = (pattern, options) => {
|
|
2788
|
-
if (typeof pattern
|
|
2789
|
-
return micromatch.braces(pattern, { ...options, expand:
|
|
1730
|
+
if (typeof pattern != "string") throw new TypeError("Expected a string");
|
|
1731
|
+
return micromatch.braces(pattern, { ...options, expand: !0 });
|
|
2790
1732
|
};
|
|
2791
1733
|
micromatch.hasBraces = hasBraces;
|
|
2792
1734
|
module.exports = micromatch;
|
|
@@ -2796,19 +1738,13 @@ var require_micromatch = __commonJS({
|
|
|
2796
1738
|
// ../../node_modules/totalist/sync/index.js
|
|
2797
1739
|
var require_sync = __commonJS({
|
|
2798
1740
|
"../../node_modules/totalist/sync/index.js"(exports) {
|
|
2799
|
-
var { join: join2, resolve: resolve2 } = __require("path");
|
|
2800
|
-
var { readdirSync, statSync } = __require("fs");
|
|
1741
|
+
var { join: join2, resolve: resolve2 } = __require("path"), { readdirSync, statSync } = __require("fs");
|
|
2801
1742
|
function totalist(dir, callback, pre = "") {
|
|
2802
1743
|
dir = resolve2(".", dir);
|
|
2803
|
-
let arr = readdirSync(dir);
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
abs = join2(dir, arr[i]);
|
|
2807
|
-
stats = statSync(abs);
|
|
2808
|
-
stats.isDirectory() ? totalist(abs, callback, join2(pre, arr[i])) : callback(join2(pre, arr[i]), abs, stats);
|
|
2809
|
-
}
|
|
1744
|
+
let arr = readdirSync(dir), i = 0, abs, stats;
|
|
1745
|
+
for (; i < arr.length; i++)
|
|
1746
|
+
abs = join2(dir, arr[i]), stats = statSync(abs), stats.isDirectory() ? totalist(abs, callback, join2(pre, arr[i])) : callback(join2(pre, arr[i]), abs, stats);
|
|
2810
1747
|
}
|
|
2811
|
-
__name(totalist, "totalist");
|
|
2812
1748
|
exports.totalist = totalist;
|
|
2813
1749
|
}
|
|
2814
1750
|
});
|
|
@@ -2825,22 +1761,10 @@ var require_build = __commonJS({
|
|
|
2825
1761
|
let pathname = raw, search = "", query, hash;
|
|
2826
1762
|
if (raw.length > 1) {
|
|
2827
1763
|
let idx = raw.indexOf("#", 1);
|
|
2828
|
-
|
|
2829
|
-
hash = raw.substring(idx);
|
|
2830
|
-
pathname = raw.substring(0, idx);
|
|
2831
|
-
}
|
|
2832
|
-
idx = pathname.indexOf("?", 1);
|
|
2833
|
-
if (idx !== -1) {
|
|
2834
|
-
search = pathname.substring(idx);
|
|
2835
|
-
pathname = pathname.substring(0, idx);
|
|
2836
|
-
if (search.length > 1) {
|
|
2837
|
-
query = qs.parse(search.substring(1));
|
|
2838
|
-
}
|
|
2839
|
-
}
|
|
1764
|
+
idx !== -1 && (hash = raw.substring(idx), pathname = raw.substring(0, idx)), idx = pathname.indexOf("?", 1), idx !== -1 && (search = pathname.substring(idx), pathname = pathname.substring(0, idx), search.length > 1 && (query = qs.parse(search.substring(1))));
|
|
2840
1765
|
}
|
|
2841
1766
|
return req._parsedUrl = { pathname, search, query, hash, raw };
|
|
2842
1767
|
}
|
|
2843
|
-
__name(parse, "parse");
|
|
2844
1768
|
exports.parse = parse;
|
|
2845
1769
|
}
|
|
2846
1770
|
});
|
|
@@ -2853,447 +1777,445 @@ var require_mrmime = __commonJS({
|
|
|
2853
1777
|
"3gp": "video/3gpp",
|
|
2854
1778
|
"3gpp": "video/3gpp",
|
|
2855
1779
|
"3mf": "model/3mf",
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
1780
|
+
aac: "audio/aac",
|
|
1781
|
+
ac: "application/pkix-attr-cert",
|
|
1782
|
+
adp: "audio/adpcm",
|
|
1783
|
+
adts: "audio/aac",
|
|
1784
|
+
ai: "application/postscript",
|
|
1785
|
+
aml: "application/automationml-aml+xml",
|
|
1786
|
+
amlx: "application/automationml-amlx+zip",
|
|
1787
|
+
amr: "audio/amr",
|
|
1788
|
+
apng: "image/apng",
|
|
1789
|
+
appcache: "text/cache-manifest",
|
|
1790
|
+
appinstaller: "application/appinstaller",
|
|
1791
|
+
appx: "application/appx",
|
|
1792
|
+
appxbundle: "application/appxbundle",
|
|
1793
|
+
asc: "application/pgp-keys",
|
|
1794
|
+
atom: "application/atom+xml",
|
|
1795
|
+
atomcat: "application/atomcat+xml",
|
|
1796
|
+
atomdeleted: "application/atomdeleted+xml",
|
|
1797
|
+
atomsvc: "application/atomsvc+xml",
|
|
1798
|
+
au: "audio/basic",
|
|
1799
|
+
avci: "image/avci",
|
|
1800
|
+
avcs: "image/avcs",
|
|
1801
|
+
avif: "image/avif",
|
|
1802
|
+
aw: "application/applixware",
|
|
1803
|
+
bdoc: "application/bdoc",
|
|
1804
|
+
bin: "application/octet-stream",
|
|
1805
|
+
bmp: "image/bmp",
|
|
1806
|
+
bpk: "application/octet-stream",
|
|
1807
|
+
btf: "image/prs.btif",
|
|
1808
|
+
btif: "image/prs.btif",
|
|
1809
|
+
buffer: "application/octet-stream",
|
|
1810
|
+
ccxml: "application/ccxml+xml",
|
|
1811
|
+
cdfx: "application/cdfx+xml",
|
|
1812
|
+
cdmia: "application/cdmi-capability",
|
|
1813
|
+
cdmic: "application/cdmi-container",
|
|
1814
|
+
cdmid: "application/cdmi-domain",
|
|
1815
|
+
cdmio: "application/cdmi-object",
|
|
1816
|
+
cdmiq: "application/cdmi-queue",
|
|
1817
|
+
cer: "application/pkix-cert",
|
|
1818
|
+
cgm: "image/cgm",
|
|
1819
|
+
cjs: "application/node",
|
|
1820
|
+
class: "application/java-vm",
|
|
1821
|
+
coffee: "text/coffeescript",
|
|
1822
|
+
conf: "text/plain",
|
|
1823
|
+
cpl: "application/cpl+xml",
|
|
1824
|
+
cpt: "application/mac-compactpro",
|
|
1825
|
+
crl: "application/pkix-crl",
|
|
1826
|
+
css: "text/css",
|
|
1827
|
+
csv: "text/csv",
|
|
1828
|
+
cu: "application/cu-seeme",
|
|
1829
|
+
cwl: "application/cwl",
|
|
1830
|
+
cww: "application/prs.cww",
|
|
1831
|
+
davmount: "application/davmount+xml",
|
|
1832
|
+
dbk: "application/docbook+xml",
|
|
1833
|
+
deb: "application/octet-stream",
|
|
1834
|
+
def: "text/plain",
|
|
1835
|
+
deploy: "application/octet-stream",
|
|
1836
|
+
dib: "image/bmp",
|
|
2913
1837
|
"disposition-notification": "message/disposition-notification",
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
1838
|
+
dist: "application/octet-stream",
|
|
1839
|
+
distz: "application/octet-stream",
|
|
1840
|
+
dll: "application/octet-stream",
|
|
1841
|
+
dmg: "application/octet-stream",
|
|
1842
|
+
dms: "application/octet-stream",
|
|
1843
|
+
doc: "application/msword",
|
|
1844
|
+
dot: "application/msword",
|
|
1845
|
+
dpx: "image/dpx",
|
|
1846
|
+
drle: "image/dicom-rle",
|
|
1847
|
+
dsc: "text/prs.lines.tag",
|
|
1848
|
+
dssc: "application/dssc+der",
|
|
1849
|
+
dtd: "application/xml-dtd",
|
|
1850
|
+
dump: "application/octet-stream",
|
|
1851
|
+
dwd: "application/atsc-dwd+xml",
|
|
1852
|
+
ear: "application/java-archive",
|
|
1853
|
+
ecma: "application/ecmascript",
|
|
1854
|
+
elc: "application/octet-stream",
|
|
1855
|
+
emf: "image/emf",
|
|
1856
|
+
eml: "message/rfc822",
|
|
1857
|
+
emma: "application/emma+xml",
|
|
1858
|
+
emotionml: "application/emotionml+xml",
|
|
1859
|
+
eps: "application/postscript",
|
|
1860
|
+
epub: "application/epub+zip",
|
|
1861
|
+
exe: "application/octet-stream",
|
|
1862
|
+
exi: "application/exi",
|
|
1863
|
+
exp: "application/express",
|
|
1864
|
+
exr: "image/aces",
|
|
1865
|
+
ez: "application/andrew-inset",
|
|
1866
|
+
fdf: "application/fdf",
|
|
1867
|
+
fdt: "application/fdt+xml",
|
|
1868
|
+
fits: "image/fits",
|
|
1869
|
+
g3: "image/g3fax",
|
|
1870
|
+
gbr: "application/rpki-ghostbusters",
|
|
1871
|
+
geojson: "application/geo+json",
|
|
1872
|
+
gif: "image/gif",
|
|
1873
|
+
glb: "model/gltf-binary",
|
|
1874
|
+
gltf: "model/gltf+json",
|
|
1875
|
+
gml: "application/gml+xml",
|
|
1876
|
+
gpx: "application/gpx+xml",
|
|
1877
|
+
gram: "application/srgs",
|
|
1878
|
+
grxml: "application/srgs+xml",
|
|
1879
|
+
gxf: "application/gxf",
|
|
1880
|
+
gz: "application/gzip",
|
|
1881
|
+
h261: "video/h261",
|
|
1882
|
+
h263: "video/h263",
|
|
1883
|
+
h264: "video/h264",
|
|
1884
|
+
heic: "image/heic",
|
|
1885
|
+
heics: "image/heic-sequence",
|
|
1886
|
+
heif: "image/heif",
|
|
1887
|
+
heifs: "image/heif-sequence",
|
|
1888
|
+
hej2: "image/hej2k",
|
|
1889
|
+
held: "application/atsc-held+xml",
|
|
1890
|
+
hjson: "application/hjson",
|
|
1891
|
+
hlp: "application/winhlp",
|
|
1892
|
+
hqx: "application/mac-binhex40",
|
|
1893
|
+
hsj2: "image/hsj2",
|
|
1894
|
+
htm: "text/html",
|
|
1895
|
+
html: "text/html",
|
|
1896
|
+
ics: "text/calendar",
|
|
1897
|
+
ief: "image/ief",
|
|
1898
|
+
ifb: "text/calendar",
|
|
1899
|
+
iges: "model/iges",
|
|
1900
|
+
igs: "model/iges",
|
|
1901
|
+
img: "application/octet-stream",
|
|
1902
|
+
in: "text/plain",
|
|
1903
|
+
ini: "text/plain",
|
|
1904
|
+
ink: "application/inkml+xml",
|
|
1905
|
+
inkml: "application/inkml+xml",
|
|
1906
|
+
ipfix: "application/ipfix",
|
|
1907
|
+
iso: "application/octet-stream",
|
|
1908
|
+
its: "application/its+xml",
|
|
1909
|
+
jade: "text/jade",
|
|
1910
|
+
jar: "application/java-archive",
|
|
1911
|
+
jhc: "image/jphc",
|
|
1912
|
+
jls: "image/jls",
|
|
1913
|
+
jp2: "image/jp2",
|
|
1914
|
+
jpe: "image/jpeg",
|
|
1915
|
+
jpeg: "image/jpeg",
|
|
1916
|
+
jpf: "image/jpx",
|
|
1917
|
+
jpg: "image/jpeg",
|
|
1918
|
+
jpg2: "image/jp2",
|
|
1919
|
+
jpgm: "image/jpm",
|
|
1920
|
+
jpgv: "video/jpeg",
|
|
1921
|
+
jph: "image/jph",
|
|
1922
|
+
jpm: "image/jpm",
|
|
1923
|
+
jpx: "image/jpx",
|
|
1924
|
+
js: "text/javascript",
|
|
1925
|
+
json: "application/json",
|
|
1926
|
+
json5: "application/json5",
|
|
1927
|
+
jsonld: "application/ld+json",
|
|
1928
|
+
jsonml: "application/jsonml+json",
|
|
1929
|
+
jsx: "text/jsx",
|
|
1930
|
+
jt: "model/jt",
|
|
1931
|
+
jxl: "image/jxl",
|
|
1932
|
+
jxr: "image/jxr",
|
|
1933
|
+
jxra: "image/jxra",
|
|
1934
|
+
jxrs: "image/jxrs",
|
|
1935
|
+
jxs: "image/jxs",
|
|
1936
|
+
jxsc: "image/jxsc",
|
|
1937
|
+
jxsi: "image/jxsi",
|
|
1938
|
+
jxss: "image/jxss",
|
|
1939
|
+
kar: "audio/midi",
|
|
1940
|
+
ktx: "image/ktx",
|
|
1941
|
+
ktx2: "image/ktx2",
|
|
1942
|
+
less: "text/less",
|
|
1943
|
+
lgr: "application/lgr+xml",
|
|
1944
|
+
list: "text/plain",
|
|
1945
|
+
litcoffee: "text/coffeescript",
|
|
1946
|
+
log: "text/plain",
|
|
1947
|
+
lostxml: "application/lost+xml",
|
|
1948
|
+
lrf: "application/octet-stream",
|
|
1949
|
+
m1v: "video/mpeg",
|
|
1950
|
+
m21: "application/mp21",
|
|
1951
|
+
m2a: "audio/mpeg",
|
|
1952
|
+
m2t: "video/mp2t",
|
|
1953
|
+
m2ts: "video/mp2t",
|
|
1954
|
+
m2v: "video/mpeg",
|
|
1955
|
+
m3a: "audio/mpeg",
|
|
1956
|
+
m4a: "audio/mp4",
|
|
1957
|
+
m4p: "application/mp4",
|
|
1958
|
+
m4s: "video/iso.segment",
|
|
1959
|
+
ma: "application/mathematica",
|
|
1960
|
+
mads: "application/mads+xml",
|
|
1961
|
+
maei: "application/mmt-aei+xml",
|
|
1962
|
+
man: "text/troff",
|
|
1963
|
+
manifest: "text/cache-manifest",
|
|
1964
|
+
map: "application/json",
|
|
1965
|
+
mar: "application/octet-stream",
|
|
1966
|
+
markdown: "text/markdown",
|
|
1967
|
+
mathml: "application/mathml+xml",
|
|
1968
|
+
mb: "application/mathematica",
|
|
1969
|
+
mbox: "application/mbox",
|
|
1970
|
+
md: "text/markdown",
|
|
1971
|
+
mdx: "text/mdx",
|
|
1972
|
+
me: "text/troff",
|
|
1973
|
+
mesh: "model/mesh",
|
|
1974
|
+
meta4: "application/metalink4+xml",
|
|
1975
|
+
metalink: "application/metalink+xml",
|
|
1976
|
+
mets: "application/mets+xml",
|
|
1977
|
+
mft: "application/rpki-manifest",
|
|
1978
|
+
mid: "audio/midi",
|
|
1979
|
+
midi: "audio/midi",
|
|
1980
|
+
mime: "message/rfc822",
|
|
1981
|
+
mj2: "video/mj2",
|
|
1982
|
+
mjp2: "video/mj2",
|
|
1983
|
+
mjs: "text/javascript",
|
|
1984
|
+
mml: "text/mathml",
|
|
1985
|
+
mods: "application/mods+xml",
|
|
1986
|
+
mov: "video/quicktime",
|
|
1987
|
+
mp2: "audio/mpeg",
|
|
1988
|
+
mp21: "application/mp21",
|
|
1989
|
+
mp2a: "audio/mpeg",
|
|
1990
|
+
mp3: "audio/mpeg",
|
|
1991
|
+
mp4: "video/mp4",
|
|
1992
|
+
mp4a: "audio/mp4",
|
|
1993
|
+
mp4s: "application/mp4",
|
|
1994
|
+
mp4v: "video/mp4",
|
|
1995
|
+
mpd: "application/dash+xml",
|
|
1996
|
+
mpe: "video/mpeg",
|
|
1997
|
+
mpeg: "video/mpeg",
|
|
1998
|
+
mpf: "application/media-policy-dataset+xml",
|
|
1999
|
+
mpg: "video/mpeg",
|
|
2000
|
+
mpg4: "video/mp4",
|
|
2001
|
+
mpga: "audio/mpeg",
|
|
2002
|
+
mpp: "application/dash-patch+xml",
|
|
2003
|
+
mrc: "application/marc",
|
|
2004
|
+
mrcx: "application/marcxml+xml",
|
|
2005
|
+
ms: "text/troff",
|
|
2006
|
+
mscml: "application/mediaservercontrol+xml",
|
|
2007
|
+
msh: "model/mesh",
|
|
2008
|
+
msi: "application/octet-stream",
|
|
2009
|
+
msix: "application/msix",
|
|
2010
|
+
msixbundle: "application/msixbundle",
|
|
2011
|
+
msm: "application/octet-stream",
|
|
2012
|
+
msp: "application/octet-stream",
|
|
2013
|
+
mtl: "model/mtl",
|
|
2014
|
+
mts: "video/mp2t",
|
|
2015
|
+
musd: "application/mmt-usd+xml",
|
|
2016
|
+
mxf: "application/mxf",
|
|
2017
|
+
mxmf: "audio/mobile-xmf",
|
|
2018
|
+
mxml: "application/xv+xml",
|
|
2019
|
+
n3: "text/n3",
|
|
2020
|
+
nb: "application/mathematica",
|
|
2021
|
+
nq: "application/n-quads",
|
|
2022
|
+
nt: "application/n-triples",
|
|
2023
|
+
obj: "model/obj",
|
|
2024
|
+
oda: "application/oda",
|
|
2025
|
+
oga: "audio/ogg",
|
|
2026
|
+
ogg: "audio/ogg",
|
|
2027
|
+
ogv: "video/ogg",
|
|
2028
|
+
ogx: "application/ogg",
|
|
2029
|
+
omdoc: "application/omdoc+xml",
|
|
2030
|
+
onepkg: "application/onenote",
|
|
2031
|
+
onetmp: "application/onenote",
|
|
2032
|
+
onetoc: "application/onenote",
|
|
2033
|
+
onetoc2: "application/onenote",
|
|
2034
|
+
opf: "application/oebps-package+xml",
|
|
2035
|
+
opus: "audio/ogg",
|
|
2036
|
+
otf: "font/otf",
|
|
2037
|
+
owl: "application/rdf+xml",
|
|
2038
|
+
oxps: "application/oxps",
|
|
2039
|
+
p10: "application/pkcs10",
|
|
2040
|
+
p7c: "application/pkcs7-mime",
|
|
2041
|
+
p7m: "application/pkcs7-mime",
|
|
2042
|
+
p7s: "application/pkcs7-signature",
|
|
2043
|
+
p8: "application/pkcs8",
|
|
2044
|
+
pdf: "application/pdf",
|
|
2045
|
+
pfr: "application/font-tdpfr",
|
|
2046
|
+
pgp: "application/pgp-encrypted",
|
|
2047
|
+
pkg: "application/octet-stream",
|
|
2048
|
+
pki: "application/pkixcmp",
|
|
2049
|
+
pkipath: "application/pkix-pkipath",
|
|
2050
|
+
pls: "application/pls+xml",
|
|
2051
|
+
png: "image/png",
|
|
2052
|
+
prc: "model/prc",
|
|
2053
|
+
prf: "application/pics-rules",
|
|
2054
|
+
provx: "application/provenance+xml",
|
|
2055
|
+
ps: "application/postscript",
|
|
2056
|
+
pskcxml: "application/pskc+xml",
|
|
2057
|
+
pti: "image/prs.pti",
|
|
2058
|
+
qt: "video/quicktime",
|
|
2059
|
+
raml: "application/raml+yaml",
|
|
2060
|
+
rapd: "application/route-apd+xml",
|
|
2061
|
+
rdf: "application/rdf+xml",
|
|
2062
|
+
relo: "application/p2p-overlay+xml",
|
|
2063
|
+
rif: "application/reginfo+xml",
|
|
2064
|
+
rl: "application/resource-lists+xml",
|
|
2065
|
+
rld: "application/resource-lists-diff+xml",
|
|
2066
|
+
rmi: "audio/midi",
|
|
2067
|
+
rnc: "application/relax-ng-compact-syntax",
|
|
2068
|
+
rng: "application/xml",
|
|
2069
|
+
roa: "application/rpki-roa",
|
|
2070
|
+
roff: "text/troff",
|
|
2071
|
+
rq: "application/sparql-query",
|
|
2072
|
+
rs: "application/rls-services+xml",
|
|
2073
|
+
rsat: "application/atsc-rsat+xml",
|
|
2074
|
+
rsd: "application/rsd+xml",
|
|
2075
|
+
rsheet: "application/urc-ressheet+xml",
|
|
2076
|
+
rss: "application/rss+xml",
|
|
2077
|
+
rtf: "text/rtf",
|
|
2078
|
+
rtx: "text/richtext",
|
|
2079
|
+
rusd: "application/route-usd+xml",
|
|
2080
|
+
s3m: "audio/s3m",
|
|
2081
|
+
sbml: "application/sbml+xml",
|
|
2082
|
+
scq: "application/scvp-cv-request",
|
|
2083
|
+
scs: "application/scvp-cv-response",
|
|
2084
|
+
sdp: "application/sdp",
|
|
2085
|
+
senmlx: "application/senml+xml",
|
|
2086
|
+
sensmlx: "application/sensml+xml",
|
|
2087
|
+
ser: "application/java-serialized-object",
|
|
2088
|
+
setpay: "application/set-payment-initiation",
|
|
2089
|
+
setreg: "application/set-registration-initiation",
|
|
2090
|
+
sgi: "image/sgi",
|
|
2091
|
+
sgm: "text/sgml",
|
|
2092
|
+
sgml: "text/sgml",
|
|
2093
|
+
shex: "text/shex",
|
|
2094
|
+
shf: "application/shf+xml",
|
|
2095
|
+
shtml: "text/html",
|
|
2096
|
+
sieve: "application/sieve",
|
|
2097
|
+
sig: "application/pgp-signature",
|
|
2098
|
+
sil: "audio/silk",
|
|
2099
|
+
silo: "model/mesh",
|
|
2100
|
+
siv: "application/sieve",
|
|
2101
|
+
slim: "text/slim",
|
|
2102
|
+
slm: "text/slim",
|
|
2103
|
+
sls: "application/route-s-tsid+xml",
|
|
2104
|
+
smi: "application/smil+xml",
|
|
2105
|
+
smil: "application/smil+xml",
|
|
2106
|
+
snd: "audio/basic",
|
|
2107
|
+
so: "application/octet-stream",
|
|
2108
|
+
spdx: "text/spdx",
|
|
2109
|
+
spp: "application/scvp-vp-response",
|
|
2110
|
+
spq: "application/scvp-vp-request",
|
|
2111
|
+
spx: "audio/ogg",
|
|
2112
|
+
sql: "application/sql",
|
|
2113
|
+
sru: "application/sru+xml",
|
|
2114
|
+
srx: "application/sparql-results+xml",
|
|
2115
|
+
ssdl: "application/ssdl+xml",
|
|
2116
|
+
ssml: "application/ssml+xml",
|
|
2117
|
+
stk: "application/hyperstudio",
|
|
2118
|
+
stl: "model/stl",
|
|
2119
|
+
stpx: "model/step+xml",
|
|
2120
|
+
stpxz: "model/step-xml+zip",
|
|
2121
|
+
stpz: "model/step+zip",
|
|
2122
|
+
styl: "text/stylus",
|
|
2123
|
+
stylus: "text/stylus",
|
|
2124
|
+
svg: "image/svg+xml",
|
|
2125
|
+
svgz: "image/svg+xml",
|
|
2126
|
+
swidtag: "application/swid+xml",
|
|
2127
|
+
t: "text/troff",
|
|
2128
|
+
t38: "image/t38",
|
|
2129
|
+
td: "application/urc-targetdesc+xml",
|
|
2130
|
+
tei: "application/tei+xml",
|
|
2131
|
+
teicorpus: "application/tei+xml",
|
|
2132
|
+
text: "text/plain",
|
|
2133
|
+
tfi: "application/thraud+xml",
|
|
2134
|
+
tfx: "image/tiff-fx",
|
|
2135
|
+
tif: "image/tiff",
|
|
2136
|
+
tiff: "image/tiff",
|
|
2137
|
+
toml: "application/toml",
|
|
2138
|
+
tr: "text/troff",
|
|
2139
|
+
trig: "application/trig",
|
|
2140
|
+
ts: "video/mp2t",
|
|
2141
|
+
tsd: "application/timestamped-data",
|
|
2142
|
+
tsv: "text/tab-separated-values",
|
|
2143
|
+
ttc: "font/collection",
|
|
2144
|
+
ttf: "font/ttf",
|
|
2145
|
+
ttl: "text/turtle",
|
|
2146
|
+
ttml: "application/ttml+xml",
|
|
2147
|
+
txt: "text/plain",
|
|
2148
|
+
u3d: "model/u3d",
|
|
2149
|
+
u8dsn: "message/global-delivery-status",
|
|
2150
|
+
u8hdr: "message/global-headers",
|
|
2151
|
+
u8mdn: "message/global-disposition-notification",
|
|
2152
|
+
u8msg: "message/global",
|
|
2153
|
+
ubj: "application/ubjson",
|
|
2154
|
+
uri: "text/uri-list",
|
|
2155
|
+
uris: "text/uri-list",
|
|
2156
|
+
urls: "text/uri-list",
|
|
2157
|
+
vcard: "text/vcard",
|
|
2158
|
+
vrml: "model/vrml",
|
|
2159
|
+
vtt: "text/vtt",
|
|
2160
|
+
vxml: "application/voicexml+xml",
|
|
2161
|
+
war: "application/java-archive",
|
|
2162
|
+
wasm: "application/wasm",
|
|
2163
|
+
wav: "audio/wav",
|
|
2164
|
+
weba: "audio/webm",
|
|
2165
|
+
webm: "video/webm",
|
|
2166
|
+
webmanifest: "application/manifest+json",
|
|
2167
|
+
webp: "image/webp",
|
|
2168
|
+
wgsl: "text/wgsl",
|
|
2169
|
+
wgt: "application/widget",
|
|
2170
|
+
wif: "application/watcherinfo+xml",
|
|
2171
|
+
wmf: "image/wmf",
|
|
2172
|
+
woff: "font/woff",
|
|
2173
|
+
woff2: "font/woff2",
|
|
2174
|
+
wrl: "model/vrml",
|
|
2175
|
+
wsdl: "application/wsdl+xml",
|
|
2176
|
+
wspolicy: "application/wspolicy+xml",
|
|
2177
|
+
x3d: "model/x3d+xml",
|
|
2178
|
+
x3db: "model/x3d+fastinfoset",
|
|
2179
|
+
x3dbz: "model/x3d+binary",
|
|
2180
|
+
x3dv: "model/x3d-vrml",
|
|
2181
|
+
x3dvz: "model/x3d+vrml",
|
|
2182
|
+
x3dz: "model/x3d+xml",
|
|
2183
|
+
xaml: "application/xaml+xml",
|
|
2184
|
+
xav: "application/xcap-att+xml",
|
|
2185
|
+
xca: "application/xcap-caps+xml",
|
|
2186
|
+
xcs: "application/calendar+xml",
|
|
2187
|
+
xdf: "application/xcap-diff+xml",
|
|
2188
|
+
xdssc: "application/dssc+xml",
|
|
2189
|
+
xel: "application/xcap-el+xml",
|
|
2190
|
+
xenc: "application/xenc+xml",
|
|
2191
|
+
xer: "application/patch-ops-error+xml",
|
|
2192
|
+
xfdf: "application/xfdf",
|
|
2193
|
+
xht: "application/xhtml+xml",
|
|
2194
|
+
xhtml: "application/xhtml+xml",
|
|
2195
|
+
xhvml: "application/xv+xml",
|
|
2196
|
+
xlf: "application/xliff+xml",
|
|
2197
|
+
xm: "audio/xm",
|
|
2198
|
+
xml: "text/xml",
|
|
2199
|
+
xns: "application/xcap-ns+xml",
|
|
2200
|
+
xop: "application/xop+xml",
|
|
2201
|
+
xpl: "application/xproc+xml",
|
|
2202
|
+
xsd: "application/xml",
|
|
2203
|
+
xsf: "application/prs.xsf+xml",
|
|
2204
|
+
xsl: "application/xml",
|
|
2205
|
+
xslt: "application/xml",
|
|
2206
|
+
xspf: "application/xspf+xml",
|
|
2207
|
+
xvm: "application/xv+xml",
|
|
2208
|
+
xvml: "application/xv+xml",
|
|
2209
|
+
yaml: "text/yaml",
|
|
2210
|
+
yang: "application/yang",
|
|
2211
|
+
yin: "application/yin+xml",
|
|
2212
|
+
yml: "text/yaml",
|
|
2213
|
+
zip: "application/zip"
|
|
3290
2214
|
};
|
|
3291
2215
|
function lookup(extn) {
|
|
3292
|
-
let tmp = ("" + extn).trim().toLowerCase();
|
|
3293
|
-
|
|
3294
|
-
return mimes[!~idx ? tmp : tmp.substring(++idx)];
|
|
2216
|
+
let tmp = ("" + extn).trim().toLowerCase(), idx = tmp.lastIndexOf(".");
|
|
2217
|
+
return mimes[~idx ? tmp.substring(++idx) : tmp];
|
|
3295
2218
|
}
|
|
3296
|
-
__name(lookup, "lookup");
|
|
3297
2219
|
exports.mimes = mimes;
|
|
3298
2220
|
exports.lookup = lookup;
|
|
3299
2221
|
}
|
|
@@ -3302,169 +2224,96 @@ var require_mrmime = __commonJS({
|
|
|
3302
2224
|
// ../../node_modules/sirv/build.js
|
|
3303
2225
|
var require_build2 = __commonJS({
|
|
3304
2226
|
"../../node_modules/sirv/build.js"(exports, module) {
|
|
3305
|
-
var fs = __require("fs")
|
|
3306
|
-
|
|
3307
|
-
var { totalist } = require_sync();
|
|
3308
|
-
var { parse } = require_build();
|
|
3309
|
-
var { lookup } = require_mrmime();
|
|
3310
|
-
var noop = /* @__PURE__ */ __name(() => {
|
|
3311
|
-
}, "noop");
|
|
2227
|
+
var fs = __require("fs"), { join: join2, normalize: normalize2, resolve: resolve2 } = __require("path"), { totalist } = require_sync(), { parse } = require_build(), { lookup } = require_mrmime(), noop = () => {
|
|
2228
|
+
};
|
|
3312
2229
|
function isMatch(uri, arr) {
|
|
3313
|
-
for (let i = 0; i < arr.length; i++)
|
|
3314
|
-
if (arr[i].test(uri)) return
|
|
3315
|
-
}
|
|
2230
|
+
for (let i = 0; i < arr.length; i++)
|
|
2231
|
+
if (arr[i].test(uri)) return !0;
|
|
3316
2232
|
}
|
|
3317
|
-
__name(isMatch, "isMatch");
|
|
3318
2233
|
function toAssume(uri, extns) {
|
|
3319
2234
|
let i = 0, x, len = uri.length - 1;
|
|
3320
|
-
|
|
3321
|
-
uri = uri.substring(0, len);
|
|
3322
|
-
}
|
|
2235
|
+
uri.charCodeAt(len) === 47 && (uri = uri.substring(0, len));
|
|
3323
2236
|
let arr = [], tmp = `${uri}/index`;
|
|
3324
|
-
for (; i < extns.length; i++)
|
|
3325
|
-
x = extns[i] ? `.${extns[i]}` : "";
|
|
3326
|
-
if (uri) arr.push(uri + x);
|
|
3327
|
-
arr.push(tmp + x);
|
|
3328
|
-
}
|
|
2237
|
+
for (; i < extns.length; i++)
|
|
2238
|
+
x = extns[i] ? `.${extns[i]}` : "", uri && arr.push(uri + x), arr.push(tmp + x);
|
|
3329
2239
|
return arr;
|
|
3330
2240
|
}
|
|
3331
|
-
__name(toAssume, "toAssume");
|
|
3332
2241
|
function viaCache(cache, uri, extns) {
|
|
3333
2242
|
let i = 0, data, arr = toAssume(uri, extns);
|
|
3334
|
-
for (; i < arr.length; i++)
|
|
2243
|
+
for (; i < arr.length; i++)
|
|
3335
2244
|
if (data = cache[arr[i]]) return data;
|
|
3336
|
-
}
|
|
3337
2245
|
}
|
|
3338
|
-
__name(viaCache, "viaCache");
|
|
3339
2246
|
function viaLocal(dir, isEtag, uri, extns) {
|
|
3340
|
-
let i = 0, arr = toAssume(uri, extns);
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
stats = fs.statSync(abs);
|
|
3346
|
-
if (stats.isDirectory()) continue;
|
|
3347
|
-
headers = toHeaders(name, stats, isEtag);
|
|
3348
|
-
headers["Cache-Control"] = isEtag ? "no-cache" : "no-store";
|
|
3349
|
-
return { abs, stats, headers };
|
|
2247
|
+
let i = 0, arr = toAssume(uri, extns), abs, stats, name, headers;
|
|
2248
|
+
for (; i < arr.length; i++)
|
|
2249
|
+
if (abs = normalize2(join2(dir, name = arr[i])), abs.startsWith(dir) && fs.existsSync(abs)) {
|
|
2250
|
+
if (stats = fs.statSync(abs), stats.isDirectory()) continue;
|
|
2251
|
+
return headers = toHeaders(name, stats, isEtag), headers["Cache-Control"] = isEtag ? "no-cache" : "no-store", { abs, stats, headers };
|
|
3350
2252
|
}
|
|
3351
|
-
}
|
|
3352
2253
|
}
|
|
3353
|
-
__name(viaLocal, "viaLocal");
|
|
3354
2254
|
function is404(req, res) {
|
|
3355
2255
|
return res.statusCode = 404, res.end();
|
|
3356
2256
|
}
|
|
3357
|
-
__name(is404, "is404");
|
|
3358
2257
|
function send(req, res, file, stats, headers) {
|
|
3359
2258
|
let code = 200, tmp, opts = {};
|
|
3360
2259
|
headers = { ...headers };
|
|
3361
|
-
for (let key in headers)
|
|
3362
|
-
tmp = res.getHeader(key);
|
|
3363
|
-
|
|
3364
|
-
}
|
|
3365
|
-
if (tmp = res.getHeader("content-type")) {
|
|
3366
|
-
headers["Content-Type"] = tmp;
|
|
3367
|
-
}
|
|
3368
|
-
if (req.headers.range) {
|
|
2260
|
+
for (let key in headers)
|
|
2261
|
+
tmp = res.getHeader(key), tmp && (headers[key] = tmp);
|
|
2262
|
+
if ((tmp = res.getHeader("content-type")) && (headers["Content-Type"] = tmp), req.headers.range) {
|
|
3369
2263
|
code = 206;
|
|
3370
|
-
let [x, y] = req.headers.range.replace("bytes=", "").split("-");
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
end = stats.size - 1;
|
|
3375
|
-
}
|
|
3376
|
-
if (start >= stats.size) {
|
|
3377
|
-
res.setHeader("Content-Range", `bytes */${stats.size}`);
|
|
3378
|
-
res.statusCode = 416;
|
|
3379
|
-
return res.end();
|
|
3380
|
-
}
|
|
3381
|
-
headers["Content-Range"] = `bytes ${start}-${end}/${stats.size}`;
|
|
3382
|
-
headers["Content-Length"] = end - start + 1;
|
|
3383
|
-
headers["Accept-Ranges"] = "bytes";
|
|
2264
|
+
let [x, y] = req.headers.range.replace("bytes=", "").split("-"), end = opts.end = parseInt(y, 10) || stats.size - 1, start = opts.start = parseInt(x, 10) || 0;
|
|
2265
|
+
if (end >= stats.size && (end = stats.size - 1), start >= stats.size)
|
|
2266
|
+
return res.setHeader("Content-Range", `bytes */${stats.size}`), res.statusCode = 416, res.end();
|
|
2267
|
+
headers["Content-Range"] = `bytes ${start}-${end}/${stats.size}`, headers["Content-Length"] = end - start + 1, headers["Accept-Ranges"] = "bytes";
|
|
3384
2268
|
}
|
|
3385
|
-
res.writeHead(code, headers);
|
|
3386
|
-
fs.createReadStream(file, opts).pipe(res);
|
|
2269
|
+
res.writeHead(code, headers), fs.createReadStream(file, opts).pipe(res);
|
|
3387
2270
|
}
|
|
3388
|
-
__name(send, "send");
|
|
3389
2271
|
var ENCODING = {
|
|
3390
2272
|
".br": "br",
|
|
3391
2273
|
".gz": "gzip"
|
|
3392
2274
|
};
|
|
3393
2275
|
function toHeaders(name, stats, isEtag) {
|
|
3394
|
-
let enc = ENCODING[name.slice(-3)];
|
|
3395
|
-
|
|
3396
|
-
if (ctype === "text/html") ctype += ";charset=utf-8";
|
|
2276
|
+
let enc = ENCODING[name.slice(-3)], ctype = lookup(name.slice(0, enc && -3)) || "";
|
|
2277
|
+
ctype === "text/html" && (ctype += ";charset=utf-8");
|
|
3397
2278
|
let headers = {
|
|
3398
2279
|
"Content-Length": stats.size,
|
|
3399
2280
|
"Content-Type": ctype,
|
|
3400
2281
|
"Last-Modified": stats.mtime.toUTCString()
|
|
3401
2282
|
};
|
|
3402
|
-
|
|
3403
|
-
if (isEtag) headers["ETag"] = `W/"${stats.size}-${stats.mtime.getTime()}"`;
|
|
3404
|
-
return headers;
|
|
2283
|
+
return enc && (headers["Content-Encoding"] = enc), isEtag && (headers.ETag = `W/"${stats.size}-${stats.mtime.getTime()}"`), headers;
|
|
3405
2284
|
}
|
|
3406
|
-
__name(toHeaders, "toHeaders");
|
|
3407
2285
|
module.exports = function(dir, opts = {}) {
|
|
3408
2286
|
dir = resolve2(dir || ".");
|
|
3409
|
-
let isNotFound = opts.onNoMatch || is404;
|
|
3410
|
-
|
|
3411
|
-
let extensions = opts.extensions || ["html", "htm"];
|
|
3412
|
-
let gzips = opts.gzip && extensions.map((x) => `${x}.gz`).concat("gz");
|
|
3413
|
-
let brots = opts.brotli && extensions.map((x) => `${x}.br`).concat("br");
|
|
3414
|
-
const FILES = {};
|
|
3415
|
-
let fallback = "/";
|
|
3416
|
-
let isEtag = !!opts.etag;
|
|
3417
|
-
let isSPA = !!opts.single;
|
|
3418
|
-
if (typeof opts.single === "string") {
|
|
2287
|
+
let isNotFound = opts.onNoMatch || is404, setHeaders = opts.setHeaders || noop, extensions = opts.extensions || ["html", "htm"], gzips = opts.gzip && extensions.map((x) => `${x}.gz`).concat("gz"), brots = opts.brotli && extensions.map((x) => `${x}.br`).concat("br"), FILES = {}, fallback = "/", isEtag = !!opts.etag, isSPA = !!opts.single;
|
|
2288
|
+
if (typeof opts.single == "string") {
|
|
3419
2289
|
let idx = opts.single.lastIndexOf(".");
|
|
3420
|
-
fallback +=
|
|
2290
|
+
fallback += ~idx ? opts.single.substring(0, idx) : opts.single;
|
|
3421
2291
|
}
|
|
3422
2292
|
let ignores = [];
|
|
3423
|
-
|
|
3424
|
-
ignores.push(
|
|
3425
|
-
|
|
3426
|
-
else ignores.push(/\/\.well-known/);
|
|
3427
|
-
[].concat(opts.ignores || []).forEach((x) => {
|
|
3428
|
-
ignores.push(new RegExp(x, "i"));
|
|
3429
|
-
});
|
|
3430
|
-
}
|
|
2293
|
+
opts.ignores !== !1 && (ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/), opts.dotfiles ? ignores.push(/\/\.\w/) : ignores.push(/\/\.well-known/), [].concat(opts.ignores || []).forEach((x) => {
|
|
2294
|
+
ignores.push(new RegExp(x, "i"));
|
|
2295
|
+
}));
|
|
3431
2296
|
let cc = opts.maxAge != null && `public,max-age=${opts.maxAge}`;
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
if (cc) headers["Cache-Control"] = cc;
|
|
3440
|
-
FILES["/" + name.normalize().replace(/\\+/g, "/")] = { abs, stats, headers };
|
|
3441
|
-
});
|
|
3442
|
-
}
|
|
2297
|
+
cc && opts.immutable ? cc += ",immutable" : cc && opts.maxAge === 0 && (cc += ",must-revalidate"), opts.dev || totalist(dir, (name, abs, stats) => {
|
|
2298
|
+
if (!/\.well-known[\\+\/]/.test(name)) {
|
|
2299
|
+
if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name)) return;
|
|
2300
|
+
}
|
|
2301
|
+
let headers = toHeaders(name, stats, isEtag);
|
|
2302
|
+
cc && (headers["Cache-Control"] = cc), FILES["/" + name.normalize().replace(/\\+/g, "/")] = { abs, stats, headers };
|
|
2303
|
+
});
|
|
3443
2304
|
let lookup2 = opts.dev ? viaLocal.bind(0, dir, isEtag) : viaCache.bind(0, FILES);
|
|
3444
2305
|
return function(req, res, next) {
|
|
3445
|
-
let extns = [""];
|
|
3446
|
-
|
|
3447
|
-
let val = req.headers["accept-encoding"] || "";
|
|
3448
|
-
if (gzips && val.includes("gzip")) extns.unshift(...gzips);
|
|
3449
|
-
if (brots && /(br|brotli)/i.test(val)) extns.unshift(...brots);
|
|
3450
|
-
extns.push(...extensions);
|
|
3451
|
-
if (pathname.indexOf("%") !== -1) {
|
|
2306
|
+
let extns = [""], pathname = parse(req).pathname, val = req.headers["accept-encoding"] || "";
|
|
2307
|
+
if (gzips && val.includes("gzip") && extns.unshift(...gzips), brots && /(br|brotli)/i.test(val) && extns.unshift(...brots), extns.push(...extensions), pathname.indexOf("%") !== -1)
|
|
3452
2308
|
try {
|
|
3453
2309
|
pathname = decodeURI(pathname);
|
|
3454
|
-
} catch
|
|
2310
|
+
} catch {
|
|
3455
2311
|
}
|
|
3456
|
-
}
|
|
3457
2312
|
let data = lookup2(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup2(fallback, extns);
|
|
3458
2313
|
if (!data) return next ? next() : isNotFound(req, res);
|
|
3459
|
-
if (isEtag && req.headers["if-none-match"] === data.headers
|
|
3460
|
-
res.writeHead(304);
|
|
3461
|
-
|
|
3462
|
-
}
|
|
3463
|
-
if (gzips || brots) {
|
|
3464
|
-
res.setHeader("Vary", "Accept-Encoding");
|
|
3465
|
-
}
|
|
3466
|
-
setHeaders(res, pathname, data.stats);
|
|
3467
|
-
send(req, res, data.abs, data.stats, data.headers);
|
|
2314
|
+
if (isEtag && req.headers["if-none-match"] === data.headers.ETag)
|
|
2315
|
+
return res.writeHead(304), res.end();
|
|
2316
|
+
(gzips || brots) && res.setHeader("Vary", "Accept-Encoding"), setHeaders(res, pathname, data.stats), send(req, res, data.abs, data.stats, data.headers);
|
|
3468
2317
|
};
|
|
3469
2318
|
};
|
|
3470
2319
|
}
|
|
@@ -3491,47 +2340,30 @@ import { readConfig, vitestTransform } from "storybook/internal/csf-tools";
|
|
|
3491
2340
|
import { MainFileMissingError } from "storybook/internal/server-errors";
|
|
3492
2341
|
import { telemetry } from "storybook/internal/telemetry";
|
|
3493
2342
|
import { oneWayHash } from "storybook/internal/telemetry";
|
|
3494
|
-
var import_picocolors = __toESM(require_picocolors(), 1);
|
|
3495
|
-
var import_sirv = __toESM(require_build2(), 1);
|
|
3496
|
-
import { dedent } from "ts-dedent";
|
|
2343
|
+
var import_picocolors = __toESM(require_picocolors(), 1), import_sirv = __toESM(require_build2(), 1), import_ts_dedent = __toESM(require_dist(), 1);
|
|
3497
2344
|
|
|
3498
2345
|
// ../../builders/builder-vite/src/utils/without-vite-plugins.ts
|
|
3499
|
-
var withoutVitePlugins =
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
if (Array.isArray(plugin)) {
|
|
3504
|
-
result.push(await withoutVitePlugins(plugin, namesToRemove));
|
|
3505
|
-
} else if (plugin && typeof plugin === "object" && "name" in plugin && typeof plugin.name === "string" && !namesToRemove.includes(plugin.name)) {
|
|
3506
|
-
result.push(plugin);
|
|
3507
|
-
}
|
|
3508
|
-
}
|
|
2346
|
+
var withoutVitePlugins = async (plugins = [], namesToRemove) => {
|
|
2347
|
+
let result = [], resolvedPlugins = await Promise.all(plugins);
|
|
2348
|
+
for (let plugin of resolvedPlugins)
|
|
2349
|
+
Array.isArray(plugin) ? result.push(await withoutVitePlugins(plugin, namesToRemove)) : plugin && typeof plugin == "object" && "name" in plugin && typeof plugin.name == "string" && !namesToRemove.includes(plugin.name) && result.push(plugin);
|
|
3509
2350
|
return result;
|
|
3510
|
-
}
|
|
2351
|
+
};
|
|
3511
2352
|
|
|
3512
2353
|
// src/vitest-plugin/index.ts
|
|
3513
|
-
var WORKING_DIR = process.cwd()
|
|
3514
|
-
var defaultOptions = {
|
|
2354
|
+
var WORKING_DIR = process.cwd(), defaultOptions = {
|
|
3515
2355
|
storybookScript: void 0,
|
|
3516
2356
|
configDir: resolve(join(WORKING_DIR, ".storybook")),
|
|
3517
2357
|
storybookUrl: "http://localhost:6006",
|
|
3518
|
-
disableAddonDocs:
|
|
3519
|
-
}
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
}
|
|
3525
|
-
const previewConfig = await readConfig(previewConfigPath);
|
|
3526
|
-
return previewConfig.getFieldValue(["tags"]) ?? [];
|
|
3527
|
-
}, "extractTagsFromPreview");
|
|
3528
|
-
var getStoryGlobsAndFiles = /* @__PURE__ */ __name(async (presets, directories) => {
|
|
3529
|
-
const stories = await presets.apply("stories", []);
|
|
3530
|
-
const normalizedStories = normalizeStories(stories, {
|
|
2358
|
+
disableAddonDocs: !0
|
|
2359
|
+
}, extractTagsFromPreview = async (configDir) => {
|
|
2360
|
+
let previewConfigPath = getInterpretedFile(join(resolve(configDir), "preview"));
|
|
2361
|
+
return previewConfigPath ? (await readConfig(previewConfigPath)).getFieldValue(["tags"]) ?? [] : [];
|
|
2362
|
+
}, getStoryGlobsAndFiles = async (presets, directories) => {
|
|
2363
|
+
let stories = await presets.apply("stories", []), normalizedStories = normalizeStories(stories, {
|
|
3531
2364
|
configDir: directories.configDir,
|
|
3532
2365
|
workingDir: directories.workingDir
|
|
3533
|
-
})
|
|
3534
|
-
const matchingStoryFiles = await StoryIndexGenerator.findMatchingFilesForSpecifiers(
|
|
2366
|
+
}), matchingStoryFiles = await StoryIndexGenerator.findMatchingFilesForSpecifiers(
|
|
3535
2367
|
normalizedStories,
|
|
3536
2368
|
directories.workingDir
|
|
3537
2369
|
);
|
|
@@ -3541,25 +2373,17 @@ var getStoryGlobsAndFiles = /* @__PURE__ */ __name(async (presets, directories)
|
|
|
3541
2373
|
new Map(matchingStoryFiles.map(([specifier, cache]) => [specifier, cache]))
|
|
3542
2374
|
)
|
|
3543
2375
|
};
|
|
3544
|
-
},
|
|
3545
|
-
var mdxStubPlugin = {
|
|
2376
|
+
}, mdxStubPlugin = {
|
|
3546
2377
|
name: "storybook:stub-mdx-plugin",
|
|
3547
2378
|
enforce: "pre",
|
|
3548
2379
|
resolveId(id) {
|
|
3549
|
-
|
|
3550
|
-
return id;
|
|
3551
|
-
}
|
|
3552
|
-
return null;
|
|
2380
|
+
return id.endsWith(".mdx") ? id : null;
|
|
3553
2381
|
},
|
|
3554
2382
|
load(id) {
|
|
3555
|
-
|
|
3556
|
-
return `export default {};`;
|
|
3557
|
-
}
|
|
3558
|
-
return null;
|
|
2383
|
+
return id.endsWith(".mdx") ? "export default {};" : null;
|
|
3559
2384
|
}
|
|
3560
|
-
}
|
|
3561
|
-
|
|
3562
|
-
const finalOptions = {
|
|
2385
|
+
}, storybookTest = async (options) => {
|
|
2386
|
+
let finalOptions = {
|
|
3563
2387
|
...defaultOptions,
|
|
3564
2388
|
...options,
|
|
3565
2389
|
configDir: options?.configDir ? resolve(WORKING_DIR, options.configDir) : defaultOptions.configDir,
|
|
@@ -3569,22 +2393,14 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
|
|
|
3569
2393
|
skip: options?.tags?.skip ?? []
|
|
3570
2394
|
}
|
|
3571
2395
|
};
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
}
|
|
3575
|
-
process.env.__STORYBOOK_URL__ = finalOptions.storybookUrl;
|
|
3576
|
-
process.env.__STORYBOOK_SCRIPT__ = finalOptions.storybookScript;
|
|
3577
|
-
const isVitestStorybook = optionalEnvToBoolean(process.env.VITEST_STORYBOOK);
|
|
3578
|
-
const directories = {
|
|
2396
|
+
optionalEnvToBoolean(process.env.DEBUG) && (finalOptions.debug = !0), process.env.__STORYBOOK_URL__ = finalOptions.storybookUrl, process.env.__STORYBOOK_SCRIPT__ = finalOptions.storybookScript;
|
|
2397
|
+
let isVitestStorybook = optionalEnvToBoolean(process.env.VITEST_STORYBOOK), directories = {
|
|
3579
2398
|
configDir: finalOptions.configDir,
|
|
3580
2399
|
workingDir: WORKING_DIR
|
|
3581
|
-
}
|
|
3582
|
-
const { presets } = await experimental_loadStorybook({
|
|
2400
|
+
}, { presets } = await experimental_loadStorybook({
|
|
3583
2401
|
configDir: finalOptions.configDir,
|
|
3584
2402
|
packageJson: {}
|
|
3585
|
-
})
|
|
3586
|
-
const stories = await presets.apply("stories", []);
|
|
3587
|
-
const [
|
|
2403
|
+
}), stories = await presets.apply("stories", []), [
|
|
3588
2404
|
{ storiesGlobs },
|
|
3589
2405
|
framework,
|
|
3590
2406
|
storybookEnv,
|
|
@@ -3604,25 +2420,20 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
|
|
|
3604
2420
|
presets.apply("core"),
|
|
3605
2421
|
presets.apply("optimizeViteDeps", []),
|
|
3606
2422
|
presets.apply("features", {})
|
|
3607
|
-
])
|
|
3608
|
-
const pluginsToIgnore = [
|
|
2423
|
+
]), pluginsToIgnore = [
|
|
3609
2424
|
"storybook:react-docgen-plugin",
|
|
3610
2425
|
"vite:react-docgen-typescript",
|
|
3611
2426
|
// aka @joshwooding/vite-plugin-react-docgen-typescript
|
|
3612
2427
|
"storybook:svelte-docgen-plugin",
|
|
3613
2428
|
"storybook:vue-component-meta-plugin"
|
|
3614
2429
|
];
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
if (finalOptions.disableAddonDocs) {
|
|
3620
|
-
plugins.push(mdxStubPlugin);
|
|
3621
|
-
}
|
|
3622
|
-
const storybookTestPlugin = {
|
|
2430
|
+
finalOptions.disableAddonDocs && pluginsToIgnore.push("storybook:package-deduplication", "storybook:mdx-plugin");
|
|
2431
|
+
let plugins = await withoutVitePlugins(viteConfigFromStorybook.plugins ?? [], pluginsToIgnore);
|
|
2432
|
+
finalOptions.disableAddonDocs && plugins.push(mdxStubPlugin);
|
|
2433
|
+
let storybookTestPlugin = {
|
|
3623
2434
|
name: "vite-plugin-storybook-test",
|
|
3624
2435
|
async transformIndexHtml(html) {
|
|
3625
|
-
|
|
2436
|
+
let [headHtmlSnippet, bodyHtmlSnippet] = await Promise.all([
|
|
3626
2437
|
presets.apply("previewHead"),
|
|
3627
2438
|
presets.apply("previewBody")
|
|
3628
2439
|
]);
|
|
@@ -3631,35 +2442,26 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
|
|
|
3631
2442
|
async config(nonMutableInputConfig) {
|
|
3632
2443
|
try {
|
|
3633
2444
|
await validateConfigurationFiles(finalOptions.configDir);
|
|
3634
|
-
} catch
|
|
2445
|
+
} catch {
|
|
3635
2446
|
throw new MainFileMissingError({
|
|
3636
2447
|
location: finalOptions.configDir,
|
|
3637
2448
|
source: "vitest"
|
|
3638
2449
|
});
|
|
3639
2450
|
}
|
|
3640
|
-
|
|
3641
|
-
const testConfig = nonMutableInputConfig.test;
|
|
2451
|
+
let frameworkName = typeof framework == "string" ? framework : framework.name, testConfig = nonMutableInputConfig.test;
|
|
3642
2452
|
finalOptions.vitestRoot = testConfig?.dir || testConfig?.root || nonMutableInputConfig.root || process.cwd();
|
|
3643
|
-
|
|
2453
|
+
let includeStories = stories.map((story) => {
|
|
3644
2454
|
let storyPath;
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
} else {
|
|
3648
|
-
storyPath = `${story.directory}/${story.files ?? DEFAULT_FILES_PATTERN}`;
|
|
3649
|
-
}
|
|
3650
|
-
return join(finalOptions.configDir, storyPath);
|
|
3651
|
-
}).map((story) => {
|
|
3652
|
-
return relative(finalOptions.vitestRoot, story);
|
|
3653
|
-
});
|
|
2455
|
+
return typeof story == "string" ? storyPath = story : storyPath = `${story.directory}/${story.files ?? DEFAULT_FILES_PATTERN}`, join(finalOptions.configDir, storyPath);
|
|
2456
|
+
}).map((story) => relative(finalOptions.vitestRoot, story));
|
|
3654
2457
|
finalOptions.includeStories = includeStories;
|
|
3655
|
-
|
|
3656
|
-
const baseConfig = {
|
|
2458
|
+
let projectId = oneWayHash(finalOptions.configDir), baseConfig = {
|
|
3657
2459
|
cacheDir: resolvePathInStorybookCache("sb-vitest", projectId),
|
|
3658
2460
|
test: {
|
|
3659
2461
|
setupFiles: [
|
|
3660
2462
|
fileURLToPath(import.meta.resolve("@storybook/addon-vitest/internal/setup-file")),
|
|
3661
2463
|
// if the existing setupFiles is a string, we have to include it otherwise we're overwriting it
|
|
3662
|
-
typeof nonMutableInputConfig.test?.setupFiles
|
|
2464
|
+
typeof nonMutableInputConfig.test?.setupFiles == "string" && nonMutableInputConfig.test?.setupFiles
|
|
3663
2465
|
].filter(Boolean),
|
|
3664
2466
|
...finalOptions.storybookScript ? {
|
|
3665
2467
|
globalSetup: [
|
|
@@ -3684,7 +2486,7 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
|
|
|
3684
2486
|
],
|
|
3685
2487
|
// if the existing deps.inline is true, we keep it as-is, because it will inline everything
|
|
3686
2488
|
// TODO: Remove the check once we don't support Vitest 3 anymore
|
|
3687
|
-
...nonMutableInputConfig.test?.server?.deps?.inline !==
|
|
2489
|
+
...nonMutableInputConfig.test?.server?.deps?.inline !== !0 ? {
|
|
3688
2490
|
server: {
|
|
3689
2491
|
deps: {
|
|
3690
2492
|
inline: ["@storybook/addon-vitest"]
|
|
@@ -3693,19 +2495,18 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
|
|
|
3693
2495
|
} : {},
|
|
3694
2496
|
browser: {
|
|
3695
2497
|
commands: {
|
|
3696
|
-
getInitialGlobals:
|
|
3697
|
-
|
|
3698
|
-
const shouldRunA11yTests = isVitestStorybook ? envConfig.a11y ?? false : true;
|
|
2498
|
+
getInitialGlobals: () => {
|
|
2499
|
+
let envConfig = JSON.parse(process.env.VITEST_STORYBOOK_CONFIG ?? "{}");
|
|
3699
2500
|
return {
|
|
3700
2501
|
a11y: {
|
|
3701
|
-
manual: !
|
|
2502
|
+
manual: !(isVitestStorybook ? envConfig.a11y ?? !1 : !0)
|
|
3702
2503
|
}
|
|
3703
2504
|
};
|
|
3704
|
-
}
|
|
2505
|
+
}
|
|
3705
2506
|
},
|
|
3706
2507
|
// if there is a test.browser config AND test.browser.screenshotFailures is not explicitly set, we set it to false
|
|
3707
2508
|
...nonMutableInputConfig.test?.browser && nonMutableInputConfig.test.browser.screenshotFailures === void 0 ? {
|
|
3708
|
-
screenshotFailures:
|
|
2509
|
+
screenshotFailures: !1
|
|
3709
2510
|
} : {}
|
|
3710
2511
|
}
|
|
3711
2512
|
},
|
|
@@ -3737,64 +2538,53 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
|
|
|
3737
2538
|
...frameworkName?.includes("vue3") ? { __VUE_PROD_HYDRATION_MISMATCH_DETAILS__: "false" } : {},
|
|
3738
2539
|
FEATURES: JSON.stringify(features)
|
|
3739
2540
|
}
|
|
3740
|
-
}
|
|
3741
|
-
const config = mergeConfig(
|
|
2541
|
+
}, config = mergeConfig(
|
|
3742
2542
|
baseConfig,
|
|
3743
2543
|
viteConfigFromStorybook
|
|
3744
2544
|
);
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
console.log(
|
|
3748
|
-
import_picocolors.default.yellow(dedent`
|
|
2545
|
+
return (nonMutableInputConfig.test?.include?.length ?? 0) > 0 && (nonMutableInputConfig.test.include = [], console.log(
|
|
2546
|
+
import_picocolors.default.yellow(import_ts_dedent.dedent`
|
|
3749
2547
|
Warning: Starting in Storybook 8.5.0-alpha.18, the "test.include" option in Vitest is discouraged in favor of just using the "stories" field in your Storybook configuration.
|
|
3750
2548
|
|
|
3751
2549
|
The values you passed to "test.include" will be ignored, please remove them from your Vitest configuration where the Storybook plugin is applied.
|
|
3752
2550
|
|
|
3753
2551
|
More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#addon-test-indexing-behavior-of-storybookaddon-test-is-changed
|
|
3754
2552
|
`)
|
|
3755
|
-
|
|
3756
|
-
}
|
|
3757
|
-
return config;
|
|
2553
|
+
)), config;
|
|
3758
2554
|
},
|
|
3759
2555
|
configureVitest(context) {
|
|
3760
|
-
context.vitest.config.coverage.exclude.push("storybook-static")
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
"
|
|
3764
|
-
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
{ configDir: finalOptions.configDir }
|
|
3770
|
-
);
|
|
3771
|
-
}
|
|
2556
|
+
context.vitest.config.coverage.exclude.push("storybook-static"), !core?.disableTelemetry && !optionalEnvToBoolean(process.env.STORYBOOK_DISABLE_TELEMETRY) && telemetry(
|
|
2557
|
+
"test-run",
|
|
2558
|
+
{
|
|
2559
|
+
runner: "vitest",
|
|
2560
|
+
watch: context.vitest.config.watch,
|
|
2561
|
+
coverage: !!context.vitest.config.coverage?.enabled
|
|
2562
|
+
},
|
|
2563
|
+
{ configDir: finalOptions.configDir }
|
|
2564
|
+
);
|
|
3772
2565
|
},
|
|
3773
2566
|
async configureServer(server) {
|
|
3774
|
-
if (staticDirs)
|
|
3775
|
-
for (
|
|
2567
|
+
if (staticDirs)
|
|
2568
|
+
for (let staticDir of staticDirs)
|
|
3776
2569
|
try {
|
|
3777
|
-
|
|
2570
|
+
let { staticPath, targetEndpoint } = mapStaticDir(staticDir, directories.configDir);
|
|
3778
2571
|
server.middlewares.use(
|
|
3779
2572
|
targetEndpoint,
|
|
3780
2573
|
(0, import_sirv.default)(staticPath, {
|
|
3781
|
-
dev:
|
|
3782
|
-
etag:
|
|
2574
|
+
dev: !0,
|
|
2575
|
+
etag: !0,
|
|
3783
2576
|
extensions: []
|
|
3784
2577
|
})
|
|
3785
2578
|
);
|
|
3786
2579
|
} catch (e) {
|
|
3787
2580
|
console.warn(e);
|
|
3788
2581
|
}
|
|
3789
|
-
}
|
|
3790
|
-
}
|
|
3791
2582
|
},
|
|
3792
2583
|
async transform(code, id) {
|
|
3793
|
-
if (!optionalEnvToBoolean(process.env.VITEST))
|
|
2584
|
+
if (!optionalEnvToBoolean(process.env.VITEST))
|
|
3794
2585
|
return code;
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
if ((0, import_micromatch.match)([relativeId], finalOptions.includeStories).length > 0) {
|
|
2586
|
+
let relativeId = relative(finalOptions.vitestRoot, id);
|
|
2587
|
+
if ((0, import_micromatch.match)([relativeId], finalOptions.includeStories).length > 0)
|
|
3798
2588
|
return vitestTransform({
|
|
3799
2589
|
code,
|
|
3800
2590
|
fileName: id,
|
|
@@ -3803,29 +2593,24 @@ var storybookTest = /* @__PURE__ */ __name(async (options) => {
|
|
|
3803
2593
|
stories: storiesGlobs,
|
|
3804
2594
|
previewLevelTags
|
|
3805
2595
|
});
|
|
3806
|
-
}
|
|
3807
2596
|
}
|
|
3808
2597
|
};
|
|
3809
|
-
plugins.push(storybookTestPlugin)
|
|
3810
|
-
|
|
3811
|
-
const projectName = `storybook:${normalize(finalOptions.configDir)}`;
|
|
2598
|
+
if (plugins.push(storybookTestPlugin), isVitestStorybook) {
|
|
2599
|
+
let projectName = `storybook:${normalize(finalOptions.configDir)}`;
|
|
3812
2600
|
plugins.push({
|
|
3813
2601
|
name: "storybook:workspace-name-override",
|
|
3814
2602
|
config: {
|
|
3815
2603
|
order: "pre",
|
|
3816
|
-
handler:
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
};
|
|
3822
|
-
}, "handler")
|
|
2604
|
+
handler: () => ({
|
|
2605
|
+
test: {
|
|
2606
|
+
name: projectName
|
|
2607
|
+
}
|
|
2608
|
+
})
|
|
3823
2609
|
}
|
|
3824
2610
|
});
|
|
3825
2611
|
}
|
|
3826
2612
|
return plugins;
|
|
3827
|
-
},
|
|
3828
|
-
var vitest_plugin_default = storybookTest;
|
|
2613
|
+
}, vitest_plugin_default = storybookTest;
|
|
3829
2614
|
export {
|
|
3830
2615
|
vitest_plugin_default as default,
|
|
3831
2616
|
storybookTest
|