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