soonjs 0.0.22 → 0.0.23
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/deps/{acorn-tklbyr11e.js → acorn-1oc5bnxht.js} +10 -10
- package/dist/deps/acorn-8dcdyq2ew.js +2895 -0
- package/dist/deps/angular-46ezrk1u4.js +1 -0
- package/dist/deps/angular-s1xz11ikt.js +1448 -0
- package/dist/deps/babel-0wg32lzwx.js +6844 -0
- package/dist/deps/{babel-48ei1aig4.js → babel-ukpqzojf5.js} +10 -10
- package/dist/deps/estree-kdvyujfa4.js +4265 -0
- package/dist/deps/{estree-4o5bj9gvd.js → estree-keanyt70z.js} +23 -23
- package/dist/deps/flow-0bur80d37.js +26221 -0
- package/dist/deps/{flow-xlruu7boa.js → flow-ugrhj6801.js} +15 -15
- package/dist/deps/glimmer-fj2j8ttlo.js +2756 -0
- package/dist/deps/{glimmer-kyfivr6g7.js → glimmer-g89edvgvf.js} +18 -18
- package/dist/deps/{graphql-xojtytb2p.js → graphql-amtjbpo5r.js} +12 -12
- package/dist/deps/graphql-y9qq36k5p.js +1212 -0
- package/dist/deps/html-2g2e1kuqu.js +2623 -0
- package/dist/deps/{html-jal5w2b1p.js → html-flg3eek30.js} +17 -17
- package/dist/deps/markdown-4jfu7be9n.js +3058 -0
- package/dist/deps/{markdown-qhqqns7vp.js → markdown-7x2u7akwf.js} +40 -40
- package/dist/deps/meriyah-3gk7mqup6.js +2320 -0
- package/dist/deps/meriyah-6mdlkd9e4.js +4 -0
- package/dist/deps/{postcss-vq400h6ym.js → postcss-2wa48tg1s.js} +21 -21
- package/dist/deps/postcss-zmmc2gk0l.js +4664 -0
- package/dist/deps/soon-id-4bhrd5e6a.js +30 -0
- package/dist/deps/soon-id-exfiforio.js +1 -0
- package/dist/deps/typescript-bgdn0fi0y.js +12794 -0
- package/dist/deps/{typescript-jihynpl9y.js → typescript-q1t5ixgyo.js} +11 -11
- package/dist/deps/yaml-ajia8oazz.js +4088 -0
- package/dist/deps/{yaml-auqgv4vnk.js → yaml-wpxyjc78l.js} +26 -26
- package/dist/index.cjs +15 -0
- package/dist/index.js +2217 -9
- package/dist/vite-plugin-soon-client.cjs +249 -0
- package/dist/vite-plugin-soon-client.js +48725 -152
- package/dist/vite-plugin-soon-server.cjs +272 -0
- package/dist/vite-plugin-soon-server.d.ts +1 -0
- package/dist/vite-plugin-soon-server.js +3276 -19
- package/package.json +18 -1
- package/dist/deps/angular-m17t0gdsi.js +0 -1
- package/dist/deps/meriyah-sl495y757.js +0 -4
- package/dist/deps/soon-id-gmzr57ufv.js +0 -1
|
@@ -1,30 +1,3221 @@
|
|
|
1
|
-
import Lt,{existsSync as Hn,rmSync as Mn
|
|
1
|
+
import Lt, { existsSync as Hn, rmSync as Mn } from "fs";
|
|
2
|
+
import k from "path";
|
|
3
|
+
import { c as In, g as Nn, u as Fn } from "./deps/soon-id-4bhrd5e6a.js";
|
|
4
|
+
import Dt from "os";
|
|
5
|
+
import jr from "util";
|
|
6
|
+
import Ke from "stream";
|
|
7
|
+
import Bn from "events";
|
|
8
|
+
var V = {}, F = {}, Se = {};
|
|
9
|
+
Object.defineProperty(Se, "__esModule", { value: !0 });
|
|
10
|
+
Se.splitWhen = Se.flatten = void 0;
|
|
11
|
+
function jn(t) {
|
|
12
|
+
return t.reduce((e, r) => [].concat(e, r), []);
|
|
13
|
+
}
|
|
14
|
+
Se.flatten = jn;
|
|
15
|
+
function Gn(t, e) {
|
|
16
|
+
const r = [[]];
|
|
17
|
+
let n = 0;
|
|
18
|
+
for (const s of t)
|
|
19
|
+
e(s) ? (n++, r[n] = []) : r[n].push(s);
|
|
20
|
+
return r;
|
|
21
|
+
}
|
|
22
|
+
Se.splitWhen = Gn;
|
|
23
|
+
var qe = {};
|
|
24
|
+
Object.defineProperty(qe, "__esModule", { value: !0 });
|
|
25
|
+
qe.isEnoentCodeError = void 0;
|
|
26
|
+
function Un(t) {
|
|
27
|
+
return t.code === "ENOENT";
|
|
28
|
+
}
|
|
29
|
+
qe.isEnoentCodeError = Un;
|
|
30
|
+
var Qe = {};
|
|
31
|
+
Object.defineProperty(Qe, "__esModule", { value: !0 });
|
|
32
|
+
Qe.createDirentFromStats = void 0;
|
|
33
|
+
let Wn = class {
|
|
34
|
+
constructor(e, r) {
|
|
35
|
+
this.name = e, this.isBlockDevice = r.isBlockDevice.bind(r), this.isCharacterDevice = r.isCharacterDevice.bind(r), this.isDirectory = r.isDirectory.bind(r), this.isFIFO = r.isFIFO.bind(r), this.isFile = r.isFile.bind(r), this.isSocket = r.isSocket.bind(r), this.isSymbolicLink = r.isSymbolicLink.bind(r);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
function Vn(t, e) {
|
|
39
|
+
return new Wn(t, e);
|
|
40
|
+
}
|
|
41
|
+
Qe.createDirentFromStats = Vn;
|
|
42
|
+
var G = {};
|
|
43
|
+
Object.defineProperty(G, "__esModule", { value: !0 });
|
|
44
|
+
G.convertPosixPathToPattern = G.convertWindowsPathToPattern = G.convertPathToPattern = G.escapePosixPath = G.escapeWindowsPath = G.escape = G.removeLeadingDotSegment = G.makeAbsolute = G.unixify = void 0;
|
|
45
|
+
const Kn = Dt, qn = k, Gr = Kn.platform() === "win32", Qn = 2, Yn = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g, Xn = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, Zn = /^\\\\([.?])/, zn = /\\(?![!()+@[\]{}])/g;
|
|
46
|
+
function Jn(t) {
|
|
47
|
+
return t.replace(/\\/g, "/");
|
|
48
|
+
}
|
|
49
|
+
G.unixify = Jn;
|
|
50
|
+
function es(t, e) {
|
|
51
|
+
return qn.resolve(t, e);
|
|
52
|
+
}
|
|
53
|
+
G.makeAbsolute = es;
|
|
54
|
+
function ts(t) {
|
|
55
|
+
if (t.charAt(0) === ".") {
|
|
56
|
+
const e = t.charAt(1);
|
|
57
|
+
if (e === "/" || e === "\\")
|
|
58
|
+
return t.slice(Qn);
|
|
59
|
+
}
|
|
60
|
+
return t;
|
|
61
|
+
}
|
|
62
|
+
G.removeLeadingDotSegment = ts;
|
|
63
|
+
G.escape = Gr ? Ht : Mt;
|
|
64
|
+
function Ht(t) {
|
|
65
|
+
return t.replace(Xn, "\\$2");
|
|
66
|
+
}
|
|
67
|
+
G.escapeWindowsPath = Ht;
|
|
68
|
+
function Mt(t) {
|
|
69
|
+
return t.replace(Yn, "\\$2");
|
|
70
|
+
}
|
|
71
|
+
G.escapePosixPath = Mt;
|
|
72
|
+
G.convertPathToPattern = Gr ? Ur : Wr;
|
|
73
|
+
function Ur(t) {
|
|
74
|
+
return Ht(t).replace(Zn, "//$1").replace(zn, "/");
|
|
75
|
+
}
|
|
76
|
+
G.convertWindowsPathToPattern = Ur;
|
|
77
|
+
function Wr(t) {
|
|
78
|
+
return Mt(t);
|
|
79
|
+
}
|
|
80
|
+
G.convertPosixPathToPattern = Wr;
|
|
81
|
+
var E = {};
|
|
82
|
+
/*!
|
|
2
83
|
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
3
84
|
*
|
|
4
85
|
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
5
86
|
* Licensed under the MIT License.
|
|
6
|
-
*/
|
|
87
|
+
*/
|
|
88
|
+
var rs = function(e) {
|
|
89
|
+
if (typeof e != "string" || e === "")
|
|
90
|
+
return !1;
|
|
91
|
+
for (var r; r = /(\\).|([@?!+*]\(.*\))/g.exec(e); ) {
|
|
92
|
+
if (r[2]) return !0;
|
|
93
|
+
e = e.slice(r.index + r[0].length);
|
|
94
|
+
}
|
|
95
|
+
return !1;
|
|
96
|
+
};
|
|
97
|
+
/*!
|
|
7
98
|
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
8
99
|
*
|
|
9
100
|
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
10
101
|
* Released under the MIT License.
|
|
11
|
-
*/
|
|
102
|
+
*/
|
|
103
|
+
var ns = rs, Vr = { "{": "}", "(": ")", "[": "]" }, ss = function(t) {
|
|
104
|
+
if (t[0] === "!")
|
|
105
|
+
return !0;
|
|
106
|
+
for (var e = 0, r = -2, n = -2, s = -2, a = -2, i = -2; e < t.length; ) {
|
|
107
|
+
if (t[e] === "*" || t[e + 1] === "?" && /[\].+)]/.test(t[e]) || n !== -1 && t[e] === "[" && t[e + 1] !== "]" && (n < e && (n = t.indexOf("]", e)), n > e && (i === -1 || i > n || (i = t.indexOf("\\", e), i === -1 || i > n))) || s !== -1 && t[e] === "{" && t[e + 1] !== "}" && (s = t.indexOf("}", e), s > e && (i = t.indexOf("\\", e), i === -1 || i > s)) || a !== -1 && t[e] === "(" && t[e + 1] === "?" && /[:!=]/.test(t[e + 2]) && t[e + 3] !== ")" && (a = t.indexOf(")", e), a > e && (i = t.indexOf("\\", e), i === -1 || i > a)) || r !== -1 && t[e] === "(" && t[e + 1] !== "|" && (r < e && (r = t.indexOf("|", e)), r !== -1 && t[r + 1] !== ")" && (a = t.indexOf(")", r), a > r && (i = t.indexOf("\\", r), i === -1 || i > a))))
|
|
108
|
+
return !0;
|
|
109
|
+
if (t[e] === "\\") {
|
|
110
|
+
var o = t[e + 1];
|
|
111
|
+
e += 2;
|
|
112
|
+
var u = Vr[o];
|
|
113
|
+
if (u) {
|
|
114
|
+
var h = t.indexOf(u, e);
|
|
115
|
+
h !== -1 && (e = h + 1);
|
|
116
|
+
}
|
|
117
|
+
if (t[e] === "!")
|
|
118
|
+
return !0;
|
|
119
|
+
} else
|
|
120
|
+
e++;
|
|
121
|
+
}
|
|
122
|
+
return !1;
|
|
123
|
+
}, is = function(t) {
|
|
124
|
+
if (t[0] === "!")
|
|
125
|
+
return !0;
|
|
126
|
+
for (var e = 0; e < t.length; ) {
|
|
127
|
+
if (/[*?{}()[\]]/.test(t[e]))
|
|
128
|
+
return !0;
|
|
129
|
+
if (t[e] === "\\") {
|
|
130
|
+
var r = t[e + 1];
|
|
131
|
+
e += 2;
|
|
132
|
+
var n = Vr[r];
|
|
133
|
+
if (n) {
|
|
134
|
+
var s = t.indexOf(n, e);
|
|
135
|
+
s !== -1 && (e = s + 1);
|
|
136
|
+
}
|
|
137
|
+
if (t[e] === "!")
|
|
138
|
+
return !0;
|
|
139
|
+
} else
|
|
140
|
+
e++;
|
|
141
|
+
}
|
|
142
|
+
return !1;
|
|
143
|
+
}, as = function(e, r) {
|
|
144
|
+
if (typeof e != "string" || e === "")
|
|
145
|
+
return !1;
|
|
146
|
+
if (ns(e))
|
|
147
|
+
return !0;
|
|
148
|
+
var n = ss;
|
|
149
|
+
return r && r.strict === !1 && (n = is), n(e);
|
|
150
|
+
}, os = as, us = k.posix.dirname, cs = Dt.platform() === "win32", ot = "/", ls = /\\/g, fs = /[\{\[].*[\}\]]$/, ps = /(^|[^\\])([\{\[]|\([^\)]+$)/, hs = /\\([\!\*\?\|\[\]\(\)\{\}])/g, ds = function(e, r) {
|
|
151
|
+
var n = Object.assign({ flipBackslashes: !0 }, r);
|
|
152
|
+
n.flipBackslashes && cs && e.indexOf(ot) < 0 && (e = e.replace(ls, ot)), fs.test(e) && (e += ot), e += "a";
|
|
153
|
+
do
|
|
154
|
+
e = us(e);
|
|
155
|
+
while (os(e) || ps.test(e));
|
|
156
|
+
return e.replace(hs, "$1");
|
|
157
|
+
}, Ye = {};
|
|
158
|
+
(function(t) {
|
|
159
|
+
t.isInteger = (e) => typeof e == "number" ? Number.isInteger(e) : typeof e == "string" && e.trim() !== "" ? Number.isInteger(Number(e)) : !1, t.find = (e, r) => e.nodes.find((n) => n.type === r), t.exceedsLimit = (e, r, n = 1, s) => s === !1 || !t.isInteger(e) || !t.isInteger(r) ? !1 : (Number(r) - Number(e)) / Number(n) >= s, t.escapeNode = (e, r = 0, n) => {
|
|
160
|
+
const s = e.nodes[r];
|
|
161
|
+
s && (n && s.type === n || s.type === "open" || s.type === "close") && s.escaped !== !0 && (s.value = "\\" + s.value, s.escaped = !0);
|
|
162
|
+
}, t.encloseBrace = (e) => e.type !== "brace" || e.commas >> 0 + e.ranges >> 0 ? !1 : (e.invalid = !0, !0), t.isInvalidBrace = (e) => e.type !== "brace" ? !1 : e.invalid === !0 || e.dollar ? !0 : !(e.commas >> 0 + e.ranges >> 0) || e.open !== !0 || e.close !== !0 ? (e.invalid = !0, !0) : !1, t.isOpenOrClose = (e) => e.type === "open" || e.type === "close" ? !0 : e.open === !0 || e.close === !0, t.reduce = (e) => e.reduce((r, n) => (n.type === "text" && r.push(n.value), n.type === "range" && (n.type = "text"), r), []), t.flatten = (...e) => {
|
|
163
|
+
const r = [], n = (s) => {
|
|
164
|
+
for (let a = 0; a < s.length; a++) {
|
|
165
|
+
const i = s[a];
|
|
166
|
+
if (Array.isArray(i)) {
|
|
167
|
+
n(i);
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
i !== void 0 && r.push(i);
|
|
171
|
+
}
|
|
172
|
+
return r;
|
|
173
|
+
};
|
|
174
|
+
return n(e), r;
|
|
175
|
+
};
|
|
176
|
+
})(Ye);
|
|
177
|
+
const lr = Ye;
|
|
178
|
+
var It = (t, e = {}) => {
|
|
179
|
+
const r = (n, s = {}) => {
|
|
180
|
+
const a = e.escapeInvalid && lr.isInvalidBrace(s), i = n.invalid === !0 && e.escapeInvalid === !0;
|
|
181
|
+
let o = "";
|
|
182
|
+
if (n.value)
|
|
183
|
+
return (a || i) && lr.isOpenOrClose(n) ? "\\" + n.value : n.value;
|
|
184
|
+
if (n.value)
|
|
185
|
+
return n.value;
|
|
186
|
+
if (n.nodes)
|
|
187
|
+
for (const u of n.nodes)
|
|
188
|
+
o += r(u);
|
|
189
|
+
return o;
|
|
190
|
+
};
|
|
191
|
+
return r(t);
|
|
192
|
+
};
|
|
193
|
+
/*!
|
|
12
194
|
* is-number <https://github.com/jonschlinkert/is-number>
|
|
13
195
|
*
|
|
14
196
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
15
197
|
* Released under the MIT License.
|
|
16
|
-
*/
|
|
198
|
+
*/
|
|
199
|
+
var _s = function(t) {
|
|
200
|
+
return typeof t == "number" ? t - t === 0 : typeof t == "string" && t.trim() !== "" ? Number.isFinite ? Number.isFinite(+t) : isFinite(+t) : !1;
|
|
201
|
+
};
|
|
202
|
+
/*!
|
|
17
203
|
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
18
204
|
*
|
|
19
205
|
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
20
206
|
* Released under the MIT License.
|
|
21
|
-
*/
|
|
207
|
+
*/
|
|
208
|
+
const fr = _s, ye = (t, e, r) => {
|
|
209
|
+
if (fr(t) === !1)
|
|
210
|
+
throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
211
|
+
if (e === void 0 || t === e)
|
|
212
|
+
return String(t);
|
|
213
|
+
if (fr(e) === !1)
|
|
214
|
+
throw new TypeError("toRegexRange: expected the second argument to be a number.");
|
|
215
|
+
let n = { relaxZeros: !0, ...r };
|
|
216
|
+
typeof n.strictZeros == "boolean" && (n.relaxZeros = n.strictZeros === !1);
|
|
217
|
+
let s = String(n.relaxZeros), a = String(n.shorthand), i = String(n.capture), o = String(n.wrap), u = t + ":" + e + "=" + s + a + i + o;
|
|
218
|
+
if (ye.cache.hasOwnProperty(u))
|
|
219
|
+
return ye.cache[u].result;
|
|
220
|
+
let h = Math.min(t, e), c = Math.max(t, e);
|
|
221
|
+
if (Math.abs(h - c) === 1) {
|
|
222
|
+
let m = t + "|" + e;
|
|
223
|
+
return n.capture ? `(${m})` : n.wrap === !1 ? m : `(?:${m})`;
|
|
224
|
+
}
|
|
225
|
+
let _ = yr(t) || yr(e), f = { min: t, max: e, a: h, b: c }, $ = [], g = [];
|
|
226
|
+
if (_ && (f.isPadded = _, f.maxLen = String(f.max).length), h < 0) {
|
|
227
|
+
let m = c < 0 ? Math.abs(c) : 1;
|
|
228
|
+
g = pr(m, Math.abs(h), f, n), h = f.a = 0;
|
|
229
|
+
}
|
|
230
|
+
return c >= 0 && ($ = pr(h, c, f, n)), f.negatives = g, f.positives = $, f.result = gs(g, $), n.capture === !0 ? f.result = `(${f.result})` : n.wrap !== !1 && $.length + g.length > 1 && (f.result = `(?:${f.result})`), ye.cache[u] = f, f.result;
|
|
231
|
+
};
|
|
232
|
+
function gs(t, e, r) {
|
|
233
|
+
let n = ut(t, e, "-", !1) || [], s = ut(e, t, "", !1) || [], a = ut(t, e, "-?", !0) || [];
|
|
234
|
+
return n.concat(a).concat(s).join("|");
|
|
235
|
+
}
|
|
236
|
+
function ys(t, e) {
|
|
237
|
+
let r = 1, n = 1, s = dr(t, r), a = /* @__PURE__ */ new Set([e]);
|
|
238
|
+
for (; t <= s && s <= e; )
|
|
239
|
+
a.add(s), r += 1, s = dr(t, r);
|
|
240
|
+
for (s = _r(e + 1, n) - 1; t < s && s <= e; )
|
|
241
|
+
a.add(s), n += 1, s = _r(e + 1, n) - 1;
|
|
242
|
+
return a = [...a], a.sort(Ss), a;
|
|
243
|
+
}
|
|
244
|
+
function ms(t, e, r) {
|
|
245
|
+
if (t === e)
|
|
246
|
+
return { pattern: t, count: [], digits: 0 };
|
|
247
|
+
let n = vs(t, e), s = n.length, a = "", i = 0;
|
|
248
|
+
for (let o = 0; o < s; o++) {
|
|
249
|
+
let [u, h] = n[o];
|
|
250
|
+
u === h ? a += u : u !== "0" || h !== "9" ? a += As(u, h) : i++;
|
|
251
|
+
}
|
|
252
|
+
return i && (a += r.shorthand === !0 ? "\\d" : "[0-9]"), { pattern: a, count: [i], digits: s };
|
|
253
|
+
}
|
|
254
|
+
function pr(t, e, r, n) {
|
|
255
|
+
let s = ys(t, e), a = [], i = t, o;
|
|
256
|
+
for (let u = 0; u < s.length; u++) {
|
|
257
|
+
let h = s[u], c = ms(String(i), String(h), n), _ = "";
|
|
258
|
+
if (!r.isPadded && o && o.pattern === c.pattern) {
|
|
259
|
+
o.count.length > 1 && o.count.pop(), o.count.push(c.count[0]), o.string = o.pattern + gr(o.count), i = h + 1;
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
r.isPadded && (_ = Es(h, r, n)), c.string = _ + c.pattern + gr(c.count), a.push(c), i = h + 1, o = c;
|
|
263
|
+
}
|
|
264
|
+
return a;
|
|
265
|
+
}
|
|
266
|
+
function ut(t, e, r, n, s) {
|
|
267
|
+
let a = [];
|
|
268
|
+
for (let i of t) {
|
|
269
|
+
let { string: o } = i;
|
|
270
|
+
!n && !hr(e, "string", o) && a.push(r + o), n && hr(e, "string", o) && a.push(r + o);
|
|
271
|
+
}
|
|
272
|
+
return a;
|
|
273
|
+
}
|
|
274
|
+
function vs(t, e) {
|
|
275
|
+
let r = [];
|
|
276
|
+
for (let n = 0; n < t.length; n++) r.push([t[n], e[n]]);
|
|
277
|
+
return r;
|
|
278
|
+
}
|
|
279
|
+
function Ss(t, e) {
|
|
280
|
+
return t > e ? 1 : e > t ? -1 : 0;
|
|
281
|
+
}
|
|
282
|
+
function hr(t, e, r) {
|
|
283
|
+
return t.some((n) => n[e] === r);
|
|
284
|
+
}
|
|
285
|
+
function dr(t, e) {
|
|
286
|
+
return Number(String(t).slice(0, -e) + "9".repeat(e));
|
|
287
|
+
}
|
|
288
|
+
function _r(t, e) {
|
|
289
|
+
return t - t % Math.pow(10, e);
|
|
290
|
+
}
|
|
291
|
+
function gr(t) {
|
|
292
|
+
let [e = 0, r = ""] = t;
|
|
293
|
+
return r || e > 1 ? `{${e + (r ? "," + r : "")}}` : "";
|
|
294
|
+
}
|
|
295
|
+
function As(t, e, r) {
|
|
296
|
+
return `[${t}${e - t === 1 ? "" : "-"}${e}]`;
|
|
297
|
+
}
|
|
298
|
+
function yr(t) {
|
|
299
|
+
return /^-?(0+)\d/.test(t);
|
|
300
|
+
}
|
|
301
|
+
function Es(t, e, r) {
|
|
302
|
+
if (!e.isPadded)
|
|
303
|
+
return t;
|
|
304
|
+
let n = Math.abs(e.maxLen - String(t).length), s = r.relaxZeros !== !1;
|
|
305
|
+
switch (n) {
|
|
306
|
+
case 0:
|
|
307
|
+
return "";
|
|
308
|
+
case 1:
|
|
309
|
+
return s ? "0?" : "0";
|
|
310
|
+
case 2:
|
|
311
|
+
return s ? "0{0,2}" : "00";
|
|
312
|
+
default:
|
|
313
|
+
return s ? `0{0,${n}}` : `0{${n}}`;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
ye.cache = {};
|
|
317
|
+
ye.clearCache = () => ye.cache = {};
|
|
318
|
+
var Rs = ye;
|
|
319
|
+
/*!
|
|
22
320
|
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
23
321
|
*
|
|
24
322
|
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
25
323
|
* Licensed under the MIT License.
|
|
26
|
-
*/
|
|
27
|
-
`,CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"};const Fs=It,{MAX_LENGTH:Ar,CHAR_BACKSLASH:ft,CHAR_BACKTICK:Bs,CHAR_COMMA:js,CHAR_DOT:Gs,CHAR_LEFT_PARENTHESES:Us,CHAR_RIGHT_PARENTHESES:Ws,CHAR_LEFT_CURLY_BRACE:Vs,CHAR_RIGHT_CURLY_BRACE:Ks,CHAR_LEFT_SQUARE_BRACKET:Er,CHAR_RIGHT_SQUARE_BRACKET:Rr,CHAR_DOUBLE_QUOTE:qs,CHAR_SINGLE_QUOTE:Qs,CHAR_NO_BREAK_SPACE:Ys,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Xs}=Ns,Zs=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");const r=e||{},n=typeof r.maxLength=="number"?Math.min(Ar,r.maxLength):Ar;if(t.length>n)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);const s={type:"root",input:t,nodes:[]},a=[s];let i=s,o=s,u=0;const h=t.length;let c=0,_=0,f;const $=()=>t[c++],g=m=>{if(m.type==="text"&&o.type==="dot"&&(o.type="text"),o&&o.type==="text"&&m.type==="text"){o.value+=m.value;return}return i.nodes.push(m),m.parent=i,m.prev=o,o=m,m};for(g({type:"bos"});c<h;)if(i=a[a.length-1],f=$(),!(f===Xs||f===Ys)){if(f===ft){g({type:"text",value:(e.keepEscaping?f:"")+$()});continue}if(f===Rr){g({type:"text",value:"\\"+f});continue}if(f===Er){u++;let m;for(;c<h&&(m=$());){if(f+=m,m===Er){u++;continue}if(m===ft){f+=$();continue}if(m===Rr&&(u--,u===0))break}g({type:"text",value:f});continue}if(f===Us){i=g({type:"paren",nodes:[]}),a.push(i),g({type:"text",value:f});continue}if(f===Ws){if(i.type!=="paren"){g({type:"text",value:f});continue}i=a.pop(),g({type:"text",value:f}),i=a[a.length-1];continue}if(f===qs||f===Qs||f===Bs){const m=f;let P;for(e.keepQuotes!==!0&&(f="");c<h&&(P=$());){if(P===ft){f+=P+$();continue}if(P===m){e.keepQuotes===!0&&(f+=P);break}f+=P}g({type:"text",value:f});continue}if(f===Vs){_++;const P={type:"brace",open:!0,close:!1,dollar:o.value&&o.value.slice(-1)==="$"||i.dollar===!0,depth:_,commas:0,ranges:0,nodes:[]};i=g(P),a.push(i),g({type:"open",value:f});continue}if(f===Ks){if(i.type!=="brace"){g({type:"text",value:f});continue}const m="close";i=a.pop(),i.close=!0,g({type:m,value:f}),_--,i=a[a.length-1];continue}if(f===js&&_>0){if(i.ranges>0){i.ranges=0;const m=i.nodes.shift();i.nodes=[m,{type:"text",value:Fs(i)}]}g({type:"comma",value:f}),i.commas++;continue}if(f===Gs&&_>0&&i.commas===0){const m=i.nodes;if(_===0||m.length===0){g({type:"text",value:f});continue}if(o.type==="dot"){if(i.range=[],o.value+=f,o.type="range",i.nodes.length!==3&&i.nodes.length!==5){i.invalid=!0,i.ranges=0,o.type="text";continue}i.ranges++,i.args=[];continue}if(o.type==="range"){m.pop();const P=m[m.length-1];P.value+=o.value+f,o=P,i.ranges--;continue}g({type:"dot",value:f});continue}g({type:"text",value:f})}do if(i=a.pop(),i.type!=="root"){i.nodes.forEach(A=>{A.nodes||(A.type==="open"&&(A.isOpen=!0),A.type==="close"&&(A.isClose=!0),A.nodes||(A.type="text"),A.invalid=!0)});const m=a[a.length-1],P=m.nodes.indexOf(i);m.nodes.splice(P,1,...i.nodes)}while(a.length>0);return g({type:"eos"}),s};var zs=Zs;const $r=It,Js=Ds,ei=Is,ti=zs,X=(t,e={})=>{let r=[];if(Array.isArray(t))for(const n of t){const s=X.create(n,e);Array.isArray(s)?r.push(...s):r.push(s)}else r=[].concat(X.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};X.parse=(t,e={})=>ti(t,e);X.stringify=(t,e={})=>$r(typeof t=="string"?X.parse(t,e):t,e);X.compile=(t,e={})=>(typeof t=="string"&&(t=X.parse(t,e)),Js(t,e));X.expand=(t,e={})=>{typeof t=="string"&&(t=X.parse(t,e));let r=ei(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};X.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?X.compile(t,e):X.expand(t,e);var ri=X,Pe={};const ni=k,oe="\\\\/",Pr=`[^${oe}]`,le="\\.",si="\\+",ii="\\?",Xe="\\/",ai="(?=.)",zr="[^/]",Nt=`(?:${Xe}|$)`,Jr=`(?:^|${Xe})`,Ft=`${le}{1,2}${Nt}`,oi=`(?!${le})`,ui=`(?!${Jr}${Ft})`,ci=`(?!${le}{0,1}${Nt})`,li=`(?!${Ft})`,fi=`[^.${Xe}]`,pi=`${zr}*?`,en={DOT_LITERAL:le,PLUS_LITERAL:si,QMARK_LITERAL:ii,SLASH_LITERAL:Xe,ONE_CHAR:ai,QMARK:zr,END_ANCHOR:Nt,DOTS_SLASH:Ft,NO_DOT:oi,NO_DOTS:ui,NO_DOT_SLASH:ci,NO_DOTS_SLASH:li,QMARK_NO_DOT:fi,STAR:pi,START_ANCHOR:Jr},hi={...en,SLASH_LITERAL:`[${oe}]`,QMARK:Pr,STAR:`${Pr}*?`,DOTS_SLASH:`${le}{1,2}(?:[${oe}]|$)`,NO_DOT:`(?!${le})`,NO_DOTS:`(?!(?:^|[${oe}])${le}{1,2}(?:[${oe}]|$))`,NO_DOT_SLASH:`(?!${le}{0,1}(?:[${oe}]|$))`,NO_DOTS_SLASH:`(?!${le}{1,2}(?:[${oe}]|$))`,QMARK_NO_DOT:`[^.${oe}]`,START_ANCHOR:`(?:^|[${oe}])`,END_ANCHOR:`(?:[${oe}]|$)`},di={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Ze={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:di,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:ni.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?hi:en}};(function(t){const e=k,r=process.platform==="win32",{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:s,REGEX_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_GLOBAL:i}=Ze;t.isObject=o=>o!==null&&typeof o=="object"&&!Array.isArray(o),t.hasRegexChars=o=>a.test(o),t.isRegexChar=o=>o.length===1&&t.hasRegexChars(o),t.escapeRegex=o=>o.replace(i,"\\$1"),t.toPosixSlashes=o=>o.replace(n,"/"),t.removeBackslashes=o=>o.replace(s,u=>u==="\\"?"":u),t.supportsLookbehinds=()=>{const o=process.version.slice(1).split(".").map(Number);return o.length===3&&o[0]>=9||o[0]===8&&o[1]>=10},t.isWindows=o=>o&&typeof o.windows=="boolean"?o.windows:r===!0||e.sep==="\\",t.escapeLast=(o,u,h)=>{const c=o.lastIndexOf(u,h);return c===-1?o:o[c-1]==="\\"?t.escapeLast(o,u,c-1):`${o.slice(0,c)}\\${o.slice(c)}`},t.removePrefix=(o,u={})=>{let h=o;return h.startsWith("./")&&(h=h.slice(2),u.prefix="./"),h},t.wrapOutput=(o,u={},h={})=>{const c=h.contains?"":"^",_=h.contains?"":"$";let f=`${c}(?:${o})${_}`;return u.negated===!0&&(f=`(?:^(?!${f}).*$)`),f}})(Pe);const br=Pe,{CHAR_ASTERISK:pt,CHAR_AT:_i,CHAR_BACKWARD_SLASH:Re,CHAR_COMMA:gi,CHAR_DOT:ht,CHAR_EXCLAMATION_MARK:dt,CHAR_FORWARD_SLASH:tn,CHAR_LEFT_CURLY_BRACE:_t,CHAR_LEFT_PARENTHESES:gt,CHAR_LEFT_SQUARE_BRACKET:yi,CHAR_PLUS:mi,CHAR_QUESTION_MARK:Cr,CHAR_RIGHT_CURLY_BRACE:vi,CHAR_RIGHT_PARENTHESES:xr,CHAR_RIGHT_SQUARE_BRACKET:Si}=Ze,Tr=t=>t===tn||t===Re,wr=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},Ai=(t,e)=>{const r=e||{},n=t.length-1,s=r.parts===!0||r.scanToEnd===!0,a=[],i=[],o=[];let u=t,h=-1,c=0,_=0,f=!1,$=!1,g=!1,m=!1,P=!1,A=!1,B=!1,v=!1,z=!1,x=!1,H=0,b,R,O={value:"",depth:0,isGlob:!1};const W=()=>h>=n,d=()=>u.charCodeAt(h+1),M=()=>(b=R,u.charCodeAt(++h));for(;h<n;){R=M();let K;if(R===Re){B=O.backslashes=!0,R=M(),R===_t&&(A=!0);continue}if(A===!0||R===_t){for(H++;W()!==!0&&(R=M());){if(R===Re){B=O.backslashes=!0,M();continue}if(R===_t){H++;continue}if(A!==!0&&R===ht&&(R=M())===ht){if(f=O.isBrace=!0,g=O.isGlob=!0,x=!0,s===!0)continue;break}if(A!==!0&&R===gi){if(f=O.isBrace=!0,g=O.isGlob=!0,x=!0,s===!0)continue;break}if(R===vi&&(H--,H===0)){A=!1,f=O.isBrace=!0,x=!0;break}}if(s===!0)continue;break}if(R===tn){if(a.push(h),i.push(O),O={value:"",depth:0,isGlob:!1},x===!0)continue;if(b===ht&&h===c+1){c+=2;continue}_=h+1;continue}if(r.noext!==!0&&(R===mi||R===_i||R===pt||R===Cr||R===dt)===!0&&d()===gt){if(g=O.isGlob=!0,m=O.isExtglob=!0,x=!0,R===dt&&h===c&&(z=!0),s===!0){for(;W()!==!0&&(R=M());){if(R===Re){B=O.backslashes=!0,R=M();continue}if(R===xr){g=O.isGlob=!0,x=!0;break}}continue}break}if(R===pt){if(b===pt&&(P=O.isGlobstar=!0),g=O.isGlob=!0,x=!0,s===!0)continue;break}if(R===Cr){if(g=O.isGlob=!0,x=!0,s===!0)continue;break}if(R===yi){for(;W()!==!0&&(K=M());){if(K===Re){B=O.backslashes=!0,M();continue}if(K===Si){$=O.isBracket=!0,g=O.isGlob=!0,x=!0;break}}if(s===!0)continue;break}if(r.nonegate!==!0&&R===dt&&h===c){v=O.negated=!0,c++;continue}if(r.noparen!==!0&&R===gt){if(g=O.isGlob=!0,s===!0){for(;W()!==!0&&(R=M());){if(R===gt){B=O.backslashes=!0,R=M();continue}if(R===xr){x=!0;break}}continue}break}if(g===!0){if(x=!0,s===!0)continue;break}}r.noext===!0&&(m=!1,g=!1);let L=u,fe="",l="";c>0&&(fe=u.slice(0,c),u=u.slice(c),_-=c),L&&g===!0&&_>0?(L=u.slice(0,_),l=u.slice(_)):g===!0?(L="",l=u):L=u,L&&L!==""&&L!=="/"&&L!==u&&Tr(L.charCodeAt(L.length-1))&&(L=L.slice(0,-1)),r.unescape===!0&&(l&&(l=br.removeBackslashes(l)),L&&B===!0&&(L=br.removeBackslashes(L)));const p={prefix:fe,input:t,start:c,base:L,glob:l,isBrace:f,isBracket:$,isGlob:g,isExtglob:m,isGlobstar:P,negated:v,negatedExtglob:z};if(r.tokens===!0&&(p.maxDepth=0,Tr(R)||i.push(O),p.tokens=i),r.parts===!0||r.tokens===!0){let K;for(let w=0;w<a.length;w++){const ie=K?K+1:c,ae=a[w],Q=t.slice(ie,ae);r.tokens&&(w===0&&c!==0?(i[w].isPrefix=!0,i[w].value=fe):i[w].value=Q,wr(i[w]),p.maxDepth+=i[w].depth),(w!==0||Q!=="")&&o.push(Q),K=ae}if(K&&K+1<t.length){const w=t.slice(K+1);o.push(w),r.tokens&&(i[i.length-1].value=w,wr(i[i.length-1]),p.maxDepth+=i[i.length-1].depth)}p.slashes=a,p.parts=o}return p};var Ei=Ai;const je=Ze,Y=Pe,{MAX_LENGTH:Ge,POSIX_REGEX_SOURCE:Ri,REGEX_NON_SPECIAL_CHARS:$i,REGEX_SPECIAL_CHARS_BACKREF:Pi,REPLACEMENTS:rn}=je,bi=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();const r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(s=>Y.escapeRegex(s)).join("..")}return r},me=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,Bt=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=rn[t]||t;const r={...e},n=typeof r.maxLength=="number"?Math.min(Ge,r.maxLength):Ge;let s=t.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);const a={type:"bos",value:"",output:r.prepend||""},i=[a],o=r.capture?"":"?:",u=Y.isWindows(e),h=je.globChars(u),c=je.extglobChars(h),{DOT_LITERAL:_,PLUS_LITERAL:f,SLASH_LITERAL:$,ONE_CHAR:g,DOTS_SLASH:m,NO_DOT:P,NO_DOT_SLASH:A,NO_DOTS_SLASH:B,QMARK:v,QMARK_NO_DOT:z,STAR:x,START_ANCHOR:H}=h,b=S=>`(${o}(?:(?!${H}${S.dot?m:_}).)*?)`,R=r.dot?"":P,O=r.dot?v:z;let W=r.bash===!0?b(r):x;r.capture&&(W=`(${W})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);const d={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:i};t=Y.removePrefix(t,d),s=t.length;const M=[],L=[],fe=[];let l=a,p;const K=()=>d.index===s-1,w=d.peek=(S=1)=>t[d.index+S],ie=d.advance=()=>t[++d.index]||"",ae=()=>t.slice(d.index+1),Q=(S="",D=0)=>{d.consumed+=S,d.index+=D},Oe=S=>{d.output+=S.output!=null?S.output:S.value,Q(S.value)},Ln=()=>{let S=1;for(;w()==="!"&&(w(2)!=="("||w(3)==="?");)ie(),d.start++,S++;return S%2===0?!1:(d.negated=!0,d.start++,!0)},ke=S=>{d[S]++,fe.push(S)},de=S=>{d[S]--,fe.pop()},T=S=>{if(l.type==="globstar"){const D=d.braces>0&&(S.type==="comma"||S.type==="brace"),y=S.extglob===!0||M.length&&(S.type==="pipe"||S.type==="paren");S.type!=="slash"&&S.type!=="paren"&&!D&&!y&&(d.output=d.output.slice(0,-l.output.length),l.type="star",l.value="*",l.output=W,d.output+=l.output)}if(M.length&&S.type!=="paren"&&(M[M.length-1].inner+=S.value),(S.value||S.output)&&Oe(S),l&&l.type==="text"&&S.type==="text"){l.value+=S.value,l.output=(l.output||"")+S.value;return}S.prev=l,i.push(S),l=S},Le=(S,D)=>{const y={...c[D],conditions:1,inner:""};y.prev=l,y.parens=d.parens,y.output=d.output;const C=(r.capture?"(":"")+y.open;ke("parens"),T({type:S,value:D,output:d.output?"":g}),T({type:"paren",extglob:!0,value:ie(),output:C}),M.push(y)},Dn=S=>{let D=S.close+(r.capture?")":""),y;if(S.type==="negate"){let C=W;if(S.inner&&S.inner.length>1&&S.inner.includes("/")&&(C=b(r)),(C!==W||K()||/^\)+$/.test(ae()))&&(D=S.close=`)$))${C}`),S.inner.includes("*")&&(y=ae())&&/^\.[^\\/.]+$/.test(y)){const N=Bt(y,{...e,fastpaths:!1}).output;D=S.close=`)${N})${C})`}S.prev.type==="bos"&&(d.negatedExtglob=!0)}T({type:"paren",extglob:!0,value:p,output:D}),de("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let S=!1,D=t.replace(Pi,(y,C,N,q,U,at)=>q==="\\"?(S=!0,y):q==="?"?C?C+q+(U?v.repeat(U.length):""):at===0?O+(U?v.repeat(U.length):""):v.repeat(N.length):q==="."?_.repeat(N.length):q==="*"?C?C+q+(U?W:""):W:C?y:`\\${y}`);return S===!0&&(r.unescape===!0?D=D.replace(/\\/g,""):D=D.replace(/\\+/g,y=>y.length%2===0?"\\\\":y?"\\":"")),D===t&&r.contains===!0?(d.output=t,d):(d.output=Y.wrapOutput(D,d,e),d)}for(;!K();){if(p=ie(),p==="\0")continue;if(p==="\\"){const y=w();if(y==="/"&&r.bash!==!0||y==="."||y===";")continue;if(!y){p+="\\",T({type:"text",value:p});continue}const C=/^\\+/.exec(ae());let N=0;if(C&&C[0].length>2&&(N=C[0].length,d.index+=N,N%2!==0&&(p+="\\")),r.unescape===!0?p=ie():p+=ie(),d.brackets===0){T({type:"text",value:p});continue}}if(d.brackets>0&&(p!=="]"||l.value==="["||l.value==="[^")){if(r.posix!==!1&&p===":"){const y=l.value.slice(1);if(y.includes("[")&&(l.posix=!0,y.includes(":"))){const C=l.value.lastIndexOf("["),N=l.value.slice(0,C),q=l.value.slice(C+2),U=Ri[q];if(U){l.value=N+U,d.backtrack=!0,ie(),!a.output&&i.indexOf(l)===1&&(a.output=g);continue}}}(p==="["&&w()!==":"||p==="-"&&w()==="]")&&(p=`\\${p}`),p==="]"&&(l.value==="["||l.value==="[^")&&(p=`\\${p}`),r.posix===!0&&p==="!"&&l.value==="["&&(p="^"),l.value+=p,Oe({value:p});continue}if(d.quotes===1&&p!=='"'){p=Y.escapeRegex(p),l.value+=p,Oe({value:p});continue}if(p==='"'){d.quotes=d.quotes===1?0:1,r.keepQuotes===!0&&T({type:"text",value:p});continue}if(p==="("){ke("parens"),T({type:"paren",value:p});continue}if(p===")"){if(d.parens===0&&r.strictBrackets===!0)throw new SyntaxError(me("opening","("));const y=M[M.length-1];if(y&&d.parens===y.parens+1){Dn(M.pop());continue}T({type:"paren",value:p,output:d.parens?")":"\\)"}),de("parens");continue}if(p==="["){if(r.nobracket===!0||!ae().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(me("closing","]"));p=`\\${p}`}else ke("brackets");T({type:"bracket",value:p});continue}if(p==="]"){if(r.nobracket===!0||l&&l.type==="bracket"&&l.value.length===1){T({type:"text",value:p,output:`\\${p}`});continue}if(d.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(me("opening","["));T({type:"text",value:p,output:`\\${p}`});continue}de("brackets");const y=l.value.slice(1);if(l.posix!==!0&&y[0]==="^"&&!y.includes("/")&&(p=`/${p}`),l.value+=p,Oe({value:p}),r.literalBrackets===!1||Y.hasRegexChars(y))continue;const C=Y.escapeRegex(l.value);if(d.output=d.output.slice(0,-l.value.length),r.literalBrackets===!0){d.output+=C,l.value=C;continue}l.value=`(${o}${C}|${l.value})`,d.output+=l.value;continue}if(p==="{"&&r.nobrace!==!0){ke("braces");const y={type:"brace",value:p,output:"(",outputIndex:d.output.length,tokensIndex:d.tokens.length};L.push(y),T(y);continue}if(p==="}"){const y=L[L.length-1];if(r.nobrace===!0||!y){T({type:"text",value:p,output:p});continue}let C=")";if(y.dots===!0){const N=i.slice(),q=[];for(let U=N.length-1;U>=0&&(i.pop(),N[U].type!=="brace");U--)N[U].type!=="dots"&&q.unshift(N[U].value);C=bi(q,r),d.backtrack=!0}if(y.comma!==!0&&y.dots!==!0){const N=d.output.slice(0,y.outputIndex),q=d.tokens.slice(y.tokensIndex);y.value=y.output="\\{",p=C="\\}",d.output=N;for(const U of q)d.output+=U.output||U.value}T({type:"brace",value:p,output:C}),de("braces"),L.pop();continue}if(p==="|"){M.length>0&&M[M.length-1].conditions++,T({type:"text",value:p});continue}if(p===","){let y=p;const C=L[L.length-1];C&&fe[fe.length-1]==="braces"&&(C.comma=!0,y="|"),T({type:"comma",value:p,output:y});continue}if(p==="/"){if(l.type==="dot"&&d.index===d.start+1){d.start=d.index+1,d.consumed="",d.output="",i.pop(),l=a;continue}T({type:"slash",value:p,output:$});continue}if(p==="."){if(d.braces>0&&l.type==="dot"){l.value==="."&&(l.output=_);const y=L[L.length-1];l.type="dots",l.output+=p,l.value+=p,y.dots=!0;continue}if(d.braces+d.parens===0&&l.type!=="bos"&&l.type!=="slash"){T({type:"text",value:p,output:_});continue}T({type:"dot",value:p,output:_});continue}if(p==="?"){if(!(l&&l.value==="(")&&r.noextglob!==!0&&w()==="("&&w(2)!=="?"){Le("qmark",p);continue}if(l&&l.type==="paren"){const C=w();let N=p;if(C==="<"&&!Y.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(l.value==="("&&!/[!=<:]/.test(C)||C==="<"&&!/<([!=]|\w+>)/.test(ae()))&&(N=`\\${p}`),T({type:"text",value:p,output:N});continue}if(r.dot!==!0&&(l.type==="slash"||l.type==="bos")){T({type:"qmark",value:p,output:z});continue}T({type:"qmark",value:p,output:v});continue}if(p==="!"){if(r.noextglob!==!0&&w()==="("&&(w(2)!=="?"||!/[!=<:]/.test(w(3)))){Le("negate",p);continue}if(r.nonegate!==!0&&d.index===0){Ln();continue}}if(p==="+"){if(r.noextglob!==!0&&w()==="("&&w(2)!=="?"){Le("plus",p);continue}if(l&&l.value==="("||r.regex===!1){T({type:"plus",value:p,output:f});continue}if(l&&(l.type==="bracket"||l.type==="paren"||l.type==="brace")||d.parens>0){T({type:"plus",value:p});continue}T({type:"plus",value:f});continue}if(p==="@"){if(r.noextglob!==!0&&w()==="("&&w(2)!=="?"){T({type:"at",extglob:!0,value:p,output:""});continue}T({type:"text",value:p});continue}if(p!=="*"){(p==="$"||p==="^")&&(p=`\\${p}`);const y=$i.exec(ae());y&&(p+=y[0],d.index+=y[0].length),T({type:"text",value:p});continue}if(l&&(l.type==="globstar"||l.star===!0)){l.type="star",l.star=!0,l.value+=p,l.output=W,d.backtrack=!0,d.globstar=!0,Q(p);continue}let S=ae();if(r.noextglob!==!0&&/^\([^?]/.test(S)){Le("star",p);continue}if(l.type==="star"){if(r.noglobstar===!0){Q(p);continue}const y=l.prev,C=y.prev,N=y.type==="slash"||y.type==="bos",q=C&&(C.type==="star"||C.type==="globstar");if(r.bash===!0&&(!N||S[0]&&S[0]!=="/")){T({type:"star",value:p,output:""});continue}const U=d.braces>0&&(y.type==="comma"||y.type==="brace"),at=M.length&&(y.type==="pipe"||y.type==="paren");if(!N&&y.type!=="paren"&&!U&&!at){T({type:"star",value:p,output:""});continue}for(;S.slice(0,3)==="/**";){const De=t[d.index+4];if(De&&De!=="/")break;S=S.slice(3),Q("/**",3)}if(y.type==="bos"&&K()){l.type="globstar",l.value+=p,l.output=b(r),d.output=l.output,d.globstar=!0,Q(p);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&!q&&K()){d.output=d.output.slice(0,-(y.output+l.output).length),y.output=`(?:${y.output}`,l.type="globstar",l.output=b(r)+(r.strictSlashes?")":"|$)"),l.value+=p,d.globstar=!0,d.output+=y.output+l.output,Q(p);continue}if(y.type==="slash"&&y.prev.type!=="bos"&&S[0]==="/"){const De=S[1]!==void 0?"|$":"";d.output=d.output.slice(0,-(y.output+l.output).length),y.output=`(?:${y.output}`,l.type="globstar",l.output=`${b(r)}${$}|${$}${De})`,l.value+=p,d.output+=y.output+l.output,d.globstar=!0,Q(p+ie()),T({type:"slash",value:"/",output:""});continue}if(y.type==="bos"&&S[0]==="/"){l.type="globstar",l.value+=p,l.output=`(?:^|${$}|${b(r)}${$})`,d.output=l.output,d.globstar=!0,Q(p+ie()),T({type:"slash",value:"/",output:""});continue}d.output=d.output.slice(0,-l.output.length),l.type="globstar",l.output=b(r),l.value+=p,d.output+=l.output,d.globstar=!0,Q(p);continue}const D={type:"star",value:p,output:W};if(r.bash===!0){D.output=".*?",(l.type==="bos"||l.type==="slash")&&(D.output=R+D.output),T(D);continue}if(l&&(l.type==="bracket"||l.type==="paren")&&r.regex===!0){D.output=p,T(D);continue}(d.index===d.start||l.type==="slash"||l.type==="dot")&&(l.type==="dot"?(d.output+=A,l.output+=A):r.dot===!0?(d.output+=B,l.output+=B):(d.output+=R,l.output+=R),w()!=="*"&&(d.output+=g,l.output+=g)),T(D)}for(;d.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(me("closing","]"));d.output=Y.escapeLast(d.output,"["),de("brackets")}for(;d.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(me("closing",")"));d.output=Y.escapeLast(d.output,"("),de("parens")}for(;d.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(me("closing","}"));d.output=Y.escapeLast(d.output,"{"),de("braces")}if(r.strictSlashes!==!0&&(l.type==="star"||l.type==="bracket")&&T({type:"maybe_slash",value:"",output:`${$}?`}),d.backtrack===!0){d.output="";for(const S of d.tokens)d.output+=S.output!=null?S.output:S.value,S.suffix&&(d.output+=S.suffix)}return d};Bt.fastpaths=(t,e)=>{const r={...e},n=typeof r.maxLength=="number"?Math.min(Ge,r.maxLength):Ge,s=t.length;if(s>n)throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);t=rn[t]||t;const a=Y.isWindows(e),{DOT_LITERAL:i,SLASH_LITERAL:o,ONE_CHAR:u,DOTS_SLASH:h,NO_DOT:c,NO_DOTS:_,NO_DOTS_SLASH:f,STAR:$,START_ANCHOR:g}=je.globChars(a),m=r.dot?_:c,P=r.dot?f:c,A=r.capture?"":"?:",B={negated:!1,prefix:""};let v=r.bash===!0?".*?":$;r.capture&&(v=`(${v})`);const z=R=>R.noglobstar===!0?v:`(${A}(?:(?!${g}${R.dot?h:i}).)*?)`,x=R=>{switch(R){case"*":return`${m}${u}${v}`;case".*":return`${i}${u}${v}`;case"*.*":return`${m}${v}${i}${u}${v}`;case"*/*":return`${m}${v}${o}${u}${P}${v}`;case"**":return m+z(r);case"**/*":return`(?:${m}${z(r)}${o})?${P}${u}${v}`;case"**/*.*":return`(?:${m}${z(r)}${o})?${P}${v}${i}${u}${v}`;case"**/.*":return`(?:${m}${z(r)}${o})?${i}${u}${v}`;default:{const O=/^(.*?)\.(\w+)$/.exec(R);if(!O)return;const W=x(O[1]);return W?W+i+O[2]:void 0}}},H=Y.removePrefix(t,B);let b=x(H);return b&&r.strictSlashes!==!0&&(b+=`${o}?`),b};var Ci=Bt;const xi=k,Ti=Ei,vt=Ci,jt=Pe,wi=Ze,Oi=t=>t&&typeof t=="object"&&!Array.isArray(t),j=(t,e,r=!1)=>{if(Array.isArray(t)){const c=t.map(f=>j(f,e,r));return f=>{for(const $ of c){const g=$(f);if(g)return g}return!1}}const n=Oi(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!n)throw new TypeError("Expected pattern to be a non-empty string");const s=e||{},a=jt.isWindows(e),i=n?j.compileRe(t,e):j.makeRe(t,e,!1,!0),o=i.state;delete i.state;let u=()=>!1;if(s.ignore){const c={...e,ignore:null,onMatch:null,onResult:null};u=j(s.ignore,c,r)}const h=(c,_=!1)=>{const{isMatch:f,match:$,output:g}=j.test(c,i,e,{glob:t,posix:a}),m={glob:t,state:o,regex:i,posix:a,input:c,output:g,match:$,isMatch:f};return typeof s.onResult=="function"&&s.onResult(m),f===!1?(m.isMatch=!1,_?m:!1):u(c)?(typeof s.onIgnore=="function"&&s.onIgnore(m),m.isMatch=!1,_?m:!1):(typeof s.onMatch=="function"&&s.onMatch(m),_?m:!0)};return r&&(h.state=o),h};j.test=(t,e,r,{glob:n,posix:s}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};const a=r||{},i=a.format||(s?jt.toPosixSlashes:null);let o=t===n,u=o&&i?i(t):t;return o===!1&&(u=i?i(t):t,o=u===n),(o===!1||a.capture===!0)&&(a.matchBase===!0||a.basename===!0?o=j.matchBase(t,e,r,s):o=e.exec(u)),{isMatch:!!o,match:o,output:u}};j.matchBase=(t,e,r,n=jt.isWindows(r))=>(e instanceof RegExp?e:j.makeRe(e,r)).test(xi.basename(t));j.isMatch=(t,e,r)=>j(e,r)(t);j.parse=(t,e)=>Array.isArray(t)?t.map(r=>j.parse(r,e)):vt(t,{...e,fastpaths:!1});j.scan=(t,e)=>Ti(t,e);j.compileRe=(t,e,r=!1,n=!1)=>{if(r===!0)return t.output;const s=e||{},a=s.contains?"":"^",i=s.contains?"":"$";let o=`${a}(?:${t.output})${i}`;t&&t.negated===!0&&(o=`^(?!${o}).*$`);const u=j.toRegex(o,e);return n===!0&&(u.state=t),u};j.makeRe=(t,e={},r=!1,n=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let s={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(s.output=vt.fastpaths(t,e)),s.output||(s=vt(t,e)),j.compileRe(s,e,r,n)};j.toRegex=(t,e)=>{try{const r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};j.constants=wi;var ki=j,Li=ki;const nn=jr,sn=ri,ce=Li,St=Pe,Or=t=>t===""||t==="./",I=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let n=new Set,s=new Set,a=new Set,i=0,o=c=>{a.add(c.output),r&&r.onResult&&r.onResult(c)};for(let c=0;c<e.length;c++){let _=ce(String(e[c]),{...r,onResult:o},!0),f=_.state.negated||_.state.negatedExtglob;f&&i++;for(let $ of t){let g=_($,!0);(f?!g.isMatch:g.isMatch)&&(f?n.add(g.output):(n.delete(g.output),s.add(g.output)))}}let h=(i===e.length?[...a]:[...s]).filter(c=>!n.has(c));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(c=>c.replace(/\\/g,"")):e}return h};I.match=I;I.matcher=(t,e)=>ce(t,e);I.isMatch=(t,e,r)=>ce(e,r)(t);I.any=I.isMatch;I.not=(t,e,r={})=>{e=[].concat(e).map(String);let n=new Set,s=[],a=o=>{r.onResult&&r.onResult(o),s.push(o.output)},i=new Set(I(t,e,{...r,onResult:a}));for(let o of s)i.has(o)||n.add(o);return[...n]};I.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${nn.inspect(t)}"`);if(Array.isArray(e))return e.some(n=>I.contains(t,n,r));if(typeof e=="string"){if(Or(t)||Or(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return I.isMatch(t,e,{...r,contains:!0})};I.matchKeys=(t,e,r)=>{if(!St.isObject(t))throw new TypeError("Expected the first argument to be an object");let n=I(Object.keys(t),e,r),s={};for(let a of n)s[a]=t[a];return s};I.some=(t,e,r)=>{let n=[].concat(t);for(let s of[].concat(e)){let a=ce(String(s),r);if(n.some(i=>a(i)))return!0}return!1};I.every=(t,e,r)=>{let n=[].concat(t);for(let s of[].concat(e)){let a=ce(String(s),r);if(!n.every(i=>a(i)))return!1}return!0};I.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${nn.inspect(t)}"`);return[].concat(e).every(n=>ce(n,r)(t))};I.capture=(t,e,r)=>{let n=St.isWindows(r),a=ce.makeRe(String(t),{...r,capture:!0}).exec(n?St.toPosixSlashes(e):e);if(a)return a.slice(1).map(i=>i===void 0?"":i)};I.makeRe=(...t)=>ce.makeRe(...t);I.scan=(...t)=>ce.scan(...t);I.parse=(t,e)=>{let r=[];for(let n of[].concat(t||[]))for(let s of sn(String(n),e))r.push(ce.parse(s,e));return r};I.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:sn(t,e)};I.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return I.braces(t,{...e,expand:!0})};var Di=I;Object.defineProperty(E,"__esModule",{value:!0});E.removeDuplicateSlashes=E.matchAny=E.convertPatternsToRe=E.makeRe=E.getPatternParts=E.expandBraceExpansion=E.expandPatternsWithBraceExpansion=E.isAffectDepthOfReadingPattern=E.endsWithSlashGlobStar=E.hasGlobStar=E.getBaseDirectory=E.isPatternRelatedToParentDirectory=E.getPatternsOutsideCurrentDirectory=E.getPatternsInsideCurrentDirectory=E.getPositivePatterns=E.getNegativePatterns=E.isPositivePattern=E.isNegativePattern=E.convertToNegativePattern=E.convertToPositivePattern=E.isDynamicPattern=E.isStaticPattern=void 0;const Hi=k,Mi=ds,Gt=Di,an="**",Ii="\\",Ni=/[*?]|^!/,Fi=/\[[^[]*]/,Bi=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,ji=/[!*+?@]\([^(]*\)/,Gi=/,|\.\./,Ui=/(?!^)\/{2,}/g;function on(t,e={}){return!un(t,e)}E.isStaticPattern=on;function un(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(Ii)||Ni.test(t)||Fi.test(t)||Bi.test(t)||e.extglob!==!1&&ji.test(t)||e.braceExpansion!==!1&&Wi(t))}E.isDynamicPattern=un;function Wi(t){const e=t.indexOf("{");if(e===-1)return!1;const r=t.indexOf("}",e+1);if(r===-1)return!1;const n=t.slice(e,r);return Gi.test(n)}function Vi(t){return ze(t)?t.slice(1):t}E.convertToPositivePattern=Vi;function Ki(t){return"!"+t}E.convertToNegativePattern=Ki;function ze(t){return t.startsWith("!")&&t[1]!=="("}E.isNegativePattern=ze;function cn(t){return!ze(t)}E.isPositivePattern=cn;function qi(t){return t.filter(ze)}E.getNegativePatterns=qi;function Qi(t){return t.filter(cn)}E.getPositivePatterns=Qi;function Yi(t){return t.filter(e=>!Ut(e))}E.getPatternsInsideCurrentDirectory=Yi;function Xi(t){return t.filter(Ut)}E.getPatternsOutsideCurrentDirectory=Xi;function Ut(t){return t.startsWith("..")||t.startsWith("./..")}E.isPatternRelatedToParentDirectory=Ut;function Zi(t){return Mi(t,{flipBackslashes:!1})}E.getBaseDirectory=Zi;function zi(t){return t.includes(an)}E.hasGlobStar=zi;function ln(t){return t.endsWith("/"+an)}E.endsWithSlashGlobStar=ln;function Ji(t){const e=Hi.basename(t);return ln(t)||on(e)}E.isAffectDepthOfReadingPattern=Ji;function ea(t){return t.reduce((e,r)=>e.concat(fn(r)),[])}E.expandPatternsWithBraceExpansion=ea;function fn(t){const e=Gt.braces(t,{expand:!0,nodupes:!0,keepEscaping:!0});return e.sort((r,n)=>r.length-n.length),e.filter(r=>r!=="")}E.expandBraceExpansion=fn;function ta(t,e){let{parts:r}=Gt.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}E.getPatternParts=ta;function pn(t,e){return Gt.makeRe(t,e)}E.makeRe=pn;function ra(t,e){return t.map(r=>pn(r,e))}E.convertPatternsToRe=ra;function na(t,e){return e.some(r=>r.test(t))}E.matchAny=na;function sa(t){return t.replace(Ui,"/")}E.removeDuplicateSlashes=sa;var Je={};const ia=Ke,hn=ia.PassThrough,aa=Array.prototype.slice;var oa=ua;function ua(){const t=[],e=aa.call(arguments);let r=!1,n=e[e.length-1];n&&!Array.isArray(n)&&n.pipe==null?e.pop():n={};const s=n.end!==!1,a=n.pipeError===!0;n.objectMode==null&&(n.objectMode=!0),n.highWaterMark==null&&(n.highWaterMark=64*1024);const i=hn(n);function o(){for(let c=0,_=arguments.length;c<_;c++)t.push(dn(arguments[c],n));return u(),this}function u(){if(r)return;r=!0;let c=t.shift();if(!c){process.nextTick(h);return}Array.isArray(c)||(c=[c]);let _=c.length+1;function f(){--_>0||(r=!1,u())}function $(g){function m(){g.removeListener("merge2UnpipeEnd",m),g.removeListener("end",m),a&&g.removeListener("error",P),f()}function P(A){i.emit("error",A)}if(g._readableState.endEmitted)return f();g.on("merge2UnpipeEnd",m),g.on("end",m),a&&g.on("error",P),g.pipe(i,{end:!1}),g.resume()}for(let g=0;g<c.length;g++)$(c[g]);f()}function h(){r=!1,i.emit("queueDrain"),s&&i.end()}return i.setMaxListeners(0),i.add=o,i.on("unpipe",function(c){c.emit("merge2UnpipeEnd")}),e.length&&o.apply(null,e),i}function dn(t,e){if(Array.isArray(t))for(let r=0,n=t.length;r<n;r++)t[r]=dn(t[r],e);else{if(!t._readableState&&t.pipe&&(t=t.pipe(hn(e))),!t._readableState||!t.pause||!t.pipe)throw new Error("Only readable stream can be merged.");t.pause()}return t}Object.defineProperty(Je,"__esModule",{value:!0});Je.merge=void 0;const ca=oa;function la(t){const e=ca(t);return t.forEach(r=>{r.once("error",n=>e.emit("error",n))}),e.once("close",()=>kr(t)),e.once("end",()=>kr(t)),e}Je.merge=la;function kr(t){t.forEach(e=>e.emit("close"))}var Ae={};Object.defineProperty(Ae,"__esModule",{value:!0});Ae.isEmpty=Ae.isString=void 0;function fa(t){return typeof t=="string"}Ae.isString=fa;function pa(t){return t===""}Ae.isEmpty=pa;Object.defineProperty(F,"__esModule",{value:!0});F.string=F.stream=F.pattern=F.path=F.fs=F.errno=F.array=void 0;const ha=Se;F.array=ha;const da=qe;F.errno=da;const _a=Qe;F.fs=_a;const ga=G;F.path=ga;const ya=E;F.pattern=ya;const ma=Je;F.stream=ma;const va=Ae;F.string=va;Object.defineProperty(V,"__esModule",{value:!0});V.convertPatternGroupToTask=V.convertPatternGroupsToTasks=V.groupPatternsByBaseDirectory=V.getNegativePatternsAsPositive=V.getPositivePatterns=V.convertPatternsToTasks=V.generate=void 0;const se=F;function Sa(t,e){const r=Lr(t,e),n=Lr(e.ignore,e),s=_n(r),a=gn(r,n),i=s.filter(c=>se.pattern.isStaticPattern(c,e)),o=s.filter(c=>se.pattern.isDynamicPattern(c,e)),u=At(i,a,!1),h=At(o,a,!0);return u.concat(h)}V.generate=Sa;function Lr(t,e){let r=t;return e.braceExpansion&&(r=se.pattern.expandPatternsWithBraceExpansion(r)),e.baseNameMatch&&(r=r.map(n=>n.includes("/")?n:`**/${n}`)),r.map(n=>se.pattern.removeDuplicateSlashes(n))}function At(t,e,r){const n=[],s=se.pattern.getPatternsOutsideCurrentDirectory(t),a=se.pattern.getPatternsInsideCurrentDirectory(t),i=Et(s),o=Et(a);return n.push(...Rt(i,e,r)),"."in o?n.push(Wt(".",a,e,r)):n.push(...Rt(o,e,r)),n}V.convertPatternsToTasks=At;function _n(t){return se.pattern.getPositivePatterns(t)}V.getPositivePatterns=_n;function gn(t,e){return se.pattern.getNegativePatterns(t).concat(e).map(se.pattern.convertToPositivePattern)}V.getNegativePatternsAsPositive=gn;function Et(t){const e={};return t.reduce((r,n)=>{const s=se.pattern.getBaseDirectory(n);return s in r?r[s].push(n):r[s]=[n],r},e)}V.groupPatternsByBaseDirectory=Et;function Rt(t,e,r){return Object.keys(t).map(n=>Wt(n,t[n],e,r))}V.convertPatternGroupsToTasks=Rt;function Wt(t,e,r,n){return{dynamic:n,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(se.pattern.convertToNegativePattern))}}V.convertPatternGroupToTask=Wt;var Vt={},Kt={},te={},qt={},et={},ue={},pe={},Z={},tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.read=void 0;function Aa(t,e,r){e.fs.lstat(t,(n,s)=>{if(n!==null){Dr(r,n);return}if(!s.isSymbolicLink()||!e.followSymbolicLink){yt(r,s);return}e.fs.stat(t,(a,i)=>{if(a!==null){if(e.throwErrorOnBrokenSymbolicLink){Dr(r,a);return}yt(r,s);return}e.markSymbolicLink&&(i.isSymbolicLink=()=>!0),yt(r,i)})})}tt.read=Aa;function Dr(t,e){t(e)}function yt(t,e){t(null,e)}var rt={};Object.defineProperty(rt,"__esModule",{value:!0});rt.read=void 0;function Ea(t,e){const r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{const n=e.fs.statSync(t);return e.markSymbolicLink&&(n.isSymbolicLink=()=>!0),n}catch(n){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw n}}rt.read=Ea;var Qt={},yn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=Lt;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync};function r(n){return n===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),n)}t.createFileSystemAdapter=r})(yn);Object.defineProperty(Qt,"__esModule",{value:!0});const Ra=yn;let $a=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=Ra.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};Qt.default=$a;Object.defineProperty(Z,"__esModule",{value:!0});Z.statSync=Z.stat=Z.Settings=void 0;const Hr=tt,Pa=rt,$t=Qt;Z.Settings=$t.default;function ba(t,e,r){if(typeof e=="function"){Hr.read(t,Pt(),e);return}Hr.read(t,Pt(e),r)}Z.stat=ba;function Ca(t,e){const r=Pt(e);return Pa.read(t,r)}Z.statSync=Ca;function Pt(t={}){return t instanceof $t.default?t:new $t.default(t)}/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */let Mr;var xa=typeof queueMicrotask=="function"?queueMicrotask.bind(typeof window<"u"?window:In):t=>(Mr||(Mr=Promise.resolve())).then(t).catch(e=>setTimeout(()=>{throw e},0));/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var Ta=Oa;const wa=xa;function Oa(t,e){let r,n,s,a=!0;Array.isArray(t)?(r=[],n=t.length):(s=Object.keys(t),r={},n=s.length);function i(u){function h(){e&&e(u,r),e=null}a?wa(h):h()}function o(u,h,c){r[u]=c,(--n===0||h)&&i(h)}n?s?s.forEach(function(u){t[u](function(h,c){o(u,h,c)})}):t.forEach(function(u,h){u(function(c,_){o(h,c,_)})}):i(null),a=!1}var be={};Object.defineProperty(be,"__esModule",{value:!0});be.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const Ue=process.versions.node.split(".");if(Ue[0]===void 0||Ue[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);const mn=Number.parseInt(Ue[0],10),ka=Number.parseInt(Ue[1],10),vn=10,La=10,Da=mn>vn,Ha=mn===vn&&ka>=La;be.IS_SUPPORT_READDIR_WITH_FILE_TYPES=Da||Ha;var Ce={},nt={};Object.defineProperty(nt,"__esModule",{value:!0});nt.createDirentFromStats=void 0;class Ma{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function Ia(t,e){return new Ma(t,e)}nt.createDirentFromStats=Ia;Object.defineProperty(Ce,"__esModule",{value:!0});Ce.fs=void 0;const Na=nt;Ce.fs=Na;var xe={};Object.defineProperty(xe,"__esModule",{value:!0});xe.joinPathSegments=void 0;function Fa(t,e,r){return t.endsWith(r)?t+e:t+r+e}xe.joinPathSegments=Fa;Object.defineProperty(pe,"__esModule",{value:!0});pe.readdir=pe.readdirWithFileTypes=pe.read=void 0;const Ba=Z,Sn=Ta,ja=be,An=Ce,En=xe;function Ga(t,e,r){if(!e.stats&&ja.IS_SUPPORT_READDIR_WITH_FILE_TYPES){Rn(t,e,r);return}$n(t,e,r)}pe.read=Ga;function Rn(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(n,s)=>{if(n!==null){We(r,n);return}const a=s.map(o=>({dirent:o,name:o.name,path:En.joinPathSegments(t,o.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){bt(r,a);return}const i=a.map(o=>Ua(o,e));Sn(i,(o,u)=>{if(o!==null){We(r,o);return}bt(r,u)})})}pe.readdirWithFileTypes=Rn;function Ua(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(n,s)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){r(n);return}r(null,t);return}t.dirent=An.fs.createDirentFromStats(t.name,s),r(null,t)})}}function $n(t,e,r){e.fs.readdir(t,(n,s)=>{if(n!==null){We(r,n);return}const a=s.map(i=>{const o=En.joinPathSegments(t,i,e.pathSegmentSeparator);return u=>{Ba.stat(o,e.fsStatSettings,(h,c)=>{if(h!==null){u(h);return}const _={name:i,path:o,dirent:An.fs.createDirentFromStats(i,c)};e.stats&&(_.stats=c),u(null,_)})}});Sn(a,(i,o)=>{if(i!==null){We(r,i);return}bt(r,o)})})}pe.readdir=$n;function We(t,e){t(e)}function bt(t,e){t(null,e)}var he={};Object.defineProperty(he,"__esModule",{value:!0});he.readdir=he.readdirWithFileTypes=he.read=void 0;const Wa=Z,Va=be,Pn=Ce,bn=xe;function Ka(t,e){return!e.stats&&Va.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Cn(t,e):xn(t,e)}he.read=Ka;function Cn(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(n=>{const s={dirent:n,name:n.name,path:bn.joinPathSegments(t,n.name,e.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{const a=e.fs.statSync(s.path);s.dirent=Pn.fs.createDirentFromStats(s.name,a)}catch(a){if(e.throwErrorOnBrokenSymbolicLink)throw a}return s})}he.readdirWithFileTypes=Cn;function xn(t,e){return e.fs.readdirSync(t).map(n=>{const s=bn.joinPathSegments(t,n,e.pathSegmentSeparator),a=Wa.statSync(s,e.fsStatSettings),i={name:n,path:s,dirent:Pn.fs.createDirentFromStats(n,a)};return e.stats&&(i.stats=a),i})}he.readdir=xn;var Yt={},Tn={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.createFileSystemAdapter=t.FILE_SYSTEM_ADAPTER=void 0;const e=Lt;t.FILE_SYSTEM_ADAPTER={lstat:e.lstat,stat:e.stat,lstatSync:e.lstatSync,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};function r(n){return n===void 0?t.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},t.FILE_SYSTEM_ADAPTER),n)}t.createFileSystemAdapter=r})(Tn);Object.defineProperty(Yt,"__esModule",{value:!0});const qa=k,Qa=Z,Ya=Tn;let Xa=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=Ya.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,qa.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new Qa.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};Yt.default=Xa;Object.defineProperty(ue,"__esModule",{value:!0});ue.Settings=ue.scandirSync=ue.scandir=void 0;const Ir=pe,Za=he,Ct=Yt;ue.Settings=Ct.default;function za(t,e,r){if(typeof e=="function"){Ir.read(t,xt(),e);return}Ir.read(t,xt(e),r)}ue.scandir=za;function Ja(t,e){const r=xt(e);return Za.read(t,r)}ue.scandirSync=Ja;function xt(t={}){return t instanceof Ct.default?t:new Ct.default(t)}var Xt={exports:{}};function eo(t){var e=new t,r=e;function n(){var a=e;return a.next?e=a.next:(e=new t,r=e),a.next=null,a}function s(a){r.next=a,r=a}return{get:n,release:s}}var to=eo,ro=to;function wn(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),!(r>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");var n=ro(no),s=null,a=null,i=0,o=null,u={push:m,drain:ee,saturated:ee,pause:c,paused:!1,get concurrency(){return r},set concurrency(x){if(!(x>=1))throw new Error("fastqueue concurrency must be equal to or greater than 1");if(r=x,!u.paused)for(;s&&i<r;)i++,A()},running:h,resume:$,idle:g,length:_,getQueue:f,unshift:P,empty:ee,kill:B,killAndDrain:v,error:z};return u;function h(){return i}function c(){u.paused=!0}function _(){for(var x=s,H=0;x;)x=x.next,H++;return H}function f(){for(var x=s,H=[];x;)H.push(x.value),x=x.next;return H}function $(){if(u.paused){if(u.paused=!1,s===null){i++,A();return}for(;s&&i<r;)i++,A()}}function g(){return i===0&&u.length()===0}function m(x,H){var b=n.get();b.context=t,b.release=A,b.value=x,b.callback=H||ee,b.errorHandler=o,i>=r||u.paused?a?(a.next=b,a=b):(s=b,a=b,u.saturated()):(i++,e.call(t,b.value,b.worked))}function P(x,H){var b=n.get();b.context=t,b.release=A,b.value=x,b.callback=H||ee,b.errorHandler=o,i>=r||u.paused?s?(b.next=s,s=b):(s=b,a=b,u.saturated()):(i++,e.call(t,b.value,b.worked))}function A(x){x&&n.release(x);var H=s;H&&i<=r?u.paused?i--:(a===s&&(a=null),s=H.next,H.next=null,e.call(t,H.value,H.worked),a===null&&u.empty()):--i===0&&u.drain()}function B(){s=null,a=null,u.drain=ee}function v(){s=null,a=null,u.drain(),u.drain=ee}function z(x){o=x}}function ee(){}function no(){this.value=null,this.callback=ee,this.next=null,this.release=ee,this.context=null,this.errorHandler=null;var t=this;this.worked=function(r,n){var s=t.callback,a=t.errorHandler,i=t.value;t.value=null,t.callback=ee,t.errorHandler&&a(r,i),s.call(t.context,r,n),t.release(t)}}function so(t,e,r){typeof t=="function"&&(r=e,e=t,t=null);function n(c,_){e.call(this,c).then(function(f){_(null,f)},_)}var s=wn(t,n,r),a=s.push,i=s.unshift;return s.push=o,s.unshift=u,s.drained=h,s;function o(c){var _=new Promise(function(f,$){a(c,function(g,m){if(g){$(g);return}f(m)})});return _.catch(ee),_}function u(c){var _=new Promise(function(f,$){i(c,function(g,m){if(g){$(g);return}f(m)})});return _.catch(ee),_}function h(){if(s.idle())return new Promise(function(f){f()});var c=s.drain,_=new Promise(function(f){s.drain=function(){c(),f()}});return _}}Xt.exports=wn;Xt.exports.promise=so;var io=Xt.exports,re={};Object.defineProperty(re,"__esModule",{value:!0});re.joinPathSegments=re.replacePathSegmentSeparator=re.isAppliedFilter=re.isFatalError=void 0;function ao(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}re.isFatalError=ao;function oo(t,e){return t===null||t(e)}re.isAppliedFilter=oo;function uo(t,e){return t.split(/[/\\]/).join(e)}re.replacePathSegmentSeparator=uo;function co(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}re.joinPathSegments=co;var st={};Object.defineProperty(st,"__esModule",{value:!0});const lo=re;let fo=class{constructor(e,r){this._root=e,this._settings=r,this._root=lo.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};st.default=fo;Object.defineProperty(et,"__esModule",{value:!0});const po=Bn,ho=ue,_o=io,He=re,go=st;class yo extends go.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=ho.scandir,this._emitter=new po.EventEmitter,this._queue=_o(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){const n={directory:e,base:r};this._queue.push(n,s=>{s!==null&&this._handleError(s)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(n,s)=>{if(n!==null){r(n,void 0);return}for(const a of s)this._handleEntry(a,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!He.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;const n=e.path;r!==void 0&&(e.path=He.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),He.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&He.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}}et.default=yo;Object.defineProperty(qt,"__esModule",{value:!0});const mo=et;class vo{constructor(e,r){this._root=e,this._settings=r,this._reader=new mo.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{So(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Ao(e,this._storage)}),this._reader.read()}}qt.default=vo;function So(t,e){t(e)}function Ao(t,e){t(null,e)}var Zt={};Object.defineProperty(Zt,"__esModule",{value:!0});const Eo=Ke,Ro=et;class $o{constructor(e,r){this._root=e,this._settings=r,this._reader=new Ro.default(this._root,this._settings),this._stream=new Eo.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}}Zt.default=$o;var zt={},Jt={};Object.defineProperty(Jt,"__esModule",{value:!0});const Po=ue,Me=re,bo=st;class Co extends bo.default{constructor(){super(...arguments),this._scandir=Po.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(const e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{const n=this._scandir(e,this._settings.fsScandirSettings);for(const s of n)this._handleEntry(s,r)}catch(n){this._handleError(n)}}_handleError(e){if(Me.isFatalError(this._settings,e))throw e}_handleEntry(e,r){const n=e.path;r!==void 0&&(e.path=Me.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),Me.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&Me.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(n,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}}Jt.default=Co;Object.defineProperty(zt,"__esModule",{value:!0});const xo=Jt;class To{constructor(e,r){this._root=e,this._settings=r,this._reader=new xo.default(this._root,this._settings)}read(){return this._reader.read()}}zt.default=To;var er={};Object.defineProperty(er,"__esModule",{value:!0});const wo=k,Oo=ue;class ko{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,wo.sep),this.fsScandirSettings=new Oo.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}}er.default=ko;Object.defineProperty(te,"__esModule",{value:!0});te.Settings=te.walkStream=te.walkSync=te.walk=void 0;const Nr=qt,Lo=Zt,Do=zt,Tt=er;te.Settings=Tt.default;function Ho(t,e,r){if(typeof e=="function"){new Nr.default(t,Ve()).read(e);return}new Nr.default(t,Ve(e)).read(r)}te.walk=Ho;function Mo(t,e){const r=Ve(e);return new Do.default(t,r).read()}te.walkSync=Mo;function Io(t,e){const r=Ve(e);return new Lo.default(t,r).read()}te.walkStream=Io;function Ve(t={}){return t instanceof Tt.default?t:new Tt.default(t)}var Te={};Object.defineProperty(Te,"__esModule",{value:!0});const No=k,Fo=Z,Fr=F;class Bo{constructor(e){this._settings=e,this._fsStatSettings=new Fo.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return No.resolve(this._settings.cwd,e)}_makeEntry(e,r){const n={name:r,path:r,dirent:Fr.fs.createDirentFromStats(r,e)};return this._settings.stats&&(n.stats=e),n}_isFatalError(e){return!Fr.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}}Te.default=Bo;var it={};Object.defineProperty(it,"__esModule",{value:!0});const jo=Ke,Go=Z,Uo=te,Wo=Te;class Vo extends Wo.default{constructor(){super(...arguments),this._walkStream=Uo.walkStream,this._stat=Go.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){const n=e.map(this._getFullEntryPath,this),s=new jo.PassThrough({objectMode:!0});s._write=(a,i,o)=>this._getEntry(n[a],e[a],r).then(u=>{u!==null&&r.entryFilter(u)&&s.push(u),a===n.length-1&&s.end(),o()}).catch(o);for(let a=0;a<n.length;a++)s.write(a);return s}_getEntry(e,r,n){return this._getStat(e).then(s=>this._makeEntry(s,r)).catch(s=>{if(n.errorFilter(s))return null;throw s})}_getStat(e){return new Promise((r,n)=>{this._stat(e,this._fsStatSettings,(s,a)=>s===null?r(a):n(s))})}}it.default=Vo;Object.defineProperty(Kt,"__esModule",{value:!0});const Ko=te,qo=Te,Qo=it;class Yo extends qo.default{constructor(){super(...arguments),this._walkAsync=Ko.walk,this._readerStream=new Qo.default(this._settings)}dynamic(e,r){return new Promise((n,s)=>{this._walkAsync(e,r,(a,i)=>{a===null?n(i):s(a)})})}async static(e,r){const n=[],s=this._readerStream.static(e,r);return new Promise((a,i)=>{s.once("error",i),s.on("data",o=>n.push(o)),s.once("end",()=>a(n))})}}Kt.default=Yo;var we={},tr={},rr={},nr={};Object.defineProperty(nr,"__esModule",{value:!0});const Ee=F;class Xo{constructor(e,r,n){this._patterns=e,this._settings=r,this._micromatchOptions=n,this._storage=[],this._fillStorage()}_fillStorage(){for(const e of this._patterns){const r=this._getPatternSegments(e),n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:e,segments:r,sections:n})}}_getPatternSegments(e){return Ee.pattern.getPatternParts(e,this._micromatchOptions).map(n=>Ee.pattern.isDynamicPattern(n,this._settings)?{dynamic:!0,pattern:n,patternRe:Ee.pattern.makeRe(n,this._micromatchOptions)}:{dynamic:!1,pattern:n})}_splitSegmentsIntoSections(e){return Ee.array.splitWhen(e,r=>r.dynamic&&Ee.pattern.hasGlobStar(r.pattern))}}nr.default=Xo;Object.defineProperty(rr,"__esModule",{value:!0});const Zo=nr;class zo extends Zo.default{match(e){const r=e.split("/"),n=r.length,s=this._storage.filter(a=>!a.complete||a.segments.length>n);for(const a of s){const i=a.sections[0];if(!a.complete&&n>i.length||r.every((u,h)=>{const c=a.segments[h];return!!(c.dynamic&&c.patternRe.test(u)||!c.dynamic&&c.pattern===u)}))return!0}return!1}}rr.default=zo;Object.defineProperty(tr,"__esModule",{value:!0});const Ie=F,Jo=rr;class eu{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,n){const s=this._getMatcher(r),a=this._getNegativePatternsRe(n);return i=>this._filter(e,i,s,a)}_getMatcher(e){return new Jo.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){const r=e.filter(Ie.pattern.isAffectDepthOfReadingPattern);return Ie.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,n,s){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;const a=Ie.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(a,n)?!1:this._isSkippedByNegativePatterns(a,s)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){const n=r.split("/").length;if(e==="")return n;const s=e.split("/").length;return n-s}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!Ie.pattern.matchAny(e,r)}}tr.default=eu;var sr={};Object.defineProperty(sr,"__esModule",{value:!0});const _e=F;class tu{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){const n=_e.pattern.convertPatternsToRe(e,this._micromatchOptions),s=_e.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:!0}));return a=>this._filter(a,n,s)}_filter(e,r,n){const s=_e.path.removeLeadingDotSegment(e.path);if(this._settings.unique&&this._isDuplicateEntry(s)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(s,n))return!1;const a=e.dirent.isDirectory(),i=this._isMatchToPatterns(s,r,a)&&!this._isMatchToPatterns(s,n,a);return this._settings.unique&&i&&this._createIndexRecord(s),i}_isDuplicateEntry(e){return this.index.has(e)}_createIndexRecord(e){this.index.set(e,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;const n=_e.path.makeAbsolute(this._settings.cwd,e);return _e.pattern.matchAny(n,r)}_isMatchToPatterns(e,r,n){const s=_e.pattern.matchAny(e,r);return!s&&n?_e.pattern.matchAny(e+"/",r):s}}sr.default=tu;var ir={};Object.defineProperty(ir,"__esModule",{value:!0});const ru=F;class nu{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return ru.errno.isEnoentCodeError(e)||this._settings.suppressErrors}}ir.default=nu;var ar={};Object.defineProperty(ar,"__esModule",{value:!0});const Br=F;class su{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Br.path.makeAbsolute(this._settings.cwd,r),r=Br.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}}ar.default=su;Object.defineProperty(we,"__esModule",{value:!0});const iu=k,au=tr,ou=sr,uu=ir,cu=ar;class lu{constructor(e){this._settings=e,this.errorFilter=new uu.default(this._settings),this.entryFilter=new ou.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new au.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new cu.default(this._settings)}_getRootDirectory(e){return iu.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){const r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}}we.default=lu;Object.defineProperty(Vt,"__esModule",{value:!0});const fu=Kt,pu=we;class hu extends pu.default{constructor(){super(...arguments),this._reader=new fu.default(this._settings)}async read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e);return(await this.api(r,e,n)).map(a=>n.transform(a))}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}}Vt.default=hu;var or={};Object.defineProperty(or,"__esModule",{value:!0});const du=Ke,_u=it,gu=we;class yu extends gu.default{constructor(){super(...arguments),this._reader=new _u.default(this._settings)}read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e),s=this.api(r,e,n),a=new du.Readable({objectMode:!0,read:()=>{}});return s.once("error",i=>a.emit("error",i)).on("data",i=>a.emit("data",n.transform(i))).once("end",()=>a.emit("end")),a.once("close",()=>s.destroy()),a}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}}or.default=yu;var ur={},cr={};Object.defineProperty(cr,"__esModule",{value:!0});const mu=Z,vu=te,Su=Te;class Au extends Su.default{constructor(){super(...arguments),this._walkSync=vu.walkSync,this._statSync=mu.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){const n=[];for(const s of e){const a=this._getFullEntryPath(s),i=this._getEntry(a,s,r);i===null||!r.entryFilter(i)||n.push(i)}return n}_getEntry(e,r,n){try{const s=this._getStat(e);return this._makeEntry(s,r)}catch(s){if(n.errorFilter(s))return null;throw s}}_getStat(e){return this._statSync(e,this._fsStatSettings)}}cr.default=Au;Object.defineProperty(ur,"__esModule",{value:!0});const Eu=cr,Ru=we;class $u extends Ru.default{constructor(){super(...arguments),this._reader=new Eu.default(this._settings)}read(e){const r=this._getRootDirectory(e),n=this._getReaderOptions(e);return this.api(r,e,n).map(n.transform)}api(e,r,n){return r.dynamic?this._reader.dynamic(e,n):this._reader.static(r.patterns,n)}}ur.default=$u;var On={};(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const e=Lt,n=Math.max(Dt.cpus().length,1);t.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:e.lstat,lstatSync:e.lstatSync,stat:e.stat,statSync:e.statSync,readdir:e.readdir,readdirSync:e.readdirSync};class s{constructor(i={}){this._options=i,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,n),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0),this.ignore=[].concat(this.ignore)}_getValue(i,o){return i===void 0?o:i}_getFileSystemMethods(i={}){return Object.assign(Object.assign({},t.DEFAULT_FILE_SYSTEM_ADAPTER),i)}}t.default=s})(On);const kn=V,Pu=Vt,bu=or,Cu=ur,wt=On,J=F;async function Ot(t,e){ne(t);const r=kt(t,Pu.default,e),n=await Promise.all(r);return J.array.flatten(n)}(function(t){t.glob=t,t.globSync=e,t.globStream=r,t.async=t;function e(o,u){ne(o);const h=kt(o,Cu.default,u);return J.array.flatten(h)}t.sync=e;function r(o,u){ne(o);const h=kt(o,bu.default,u);return J.stream.merge(h)}t.stream=r;function n(o,u){ne(o);const h=[].concat(o),c=new wt.default(u);return kn.generate(h,c)}t.generateTasks=n;function s(o,u){ne(o);const h=new wt.default(u);return J.pattern.isDynamicPattern(o,h)}t.isDynamicPattern=s;function a(o){return ne(o),J.path.escape(o)}t.escapePath=a;function i(o){return ne(o),J.path.convertPathToPattern(o)}t.convertPathToPattern=i,function(o){function u(c){return ne(c),J.path.escapePosixPath(c)}o.escapePath=u;function h(c){return ne(c),J.path.convertPosixPathToPattern(c)}o.convertPathToPattern=h}(t.posix||(t.posix={})),function(o){function u(c){return ne(c),J.path.escapeWindowsPath(c)}o.escapePath=u;function h(c){return ne(c),J.path.convertWindowsPathToPattern(c)}o.convertPathToPattern=h}(t.win32||(t.win32={}))})(Ot||(Ot={}));function kt(t,e,r){const n=[].concat(t),s=new wt.default(r),a=kn.generate(n,s),i=new e(s);return a.map(i.read,i)}function ne(t){if(![].concat(t).every(n=>J.string.isString(n)&&!J.string.isEmpty(n)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}var Fe=Ot;const mt=Nn(Fe),xu=`declare module 'soonjs/auto/client' {
|
|
324
|
+
*/
|
|
325
|
+
const $s = jr, Kr = Rs, mr = (t) => t !== null && typeof t == "object" && !Array.isArray(t), Ps = (t) => (e) => t === !0 ? Number(e) : String(e), ct = (t) => typeof t == "number" || typeof t == "string" && t !== "", $e = (t) => Number.isInteger(+t), lt = (t) => {
|
|
326
|
+
let e = `${t}`, r = -1;
|
|
327
|
+
if (e[0] === "-" && (e = e.slice(1)), e === "0") return !1;
|
|
328
|
+
for (; e[++r] === "0"; ) ;
|
|
329
|
+
return r > 0;
|
|
330
|
+
}, bs = (t, e, r) => typeof t == "string" || typeof e == "string" ? !0 : r.stringify === !0, Cs = (t, e, r) => {
|
|
331
|
+
if (e > 0) {
|
|
332
|
+
let n = t[0] === "-" ? "-" : "";
|
|
333
|
+
n && (t = t.slice(1)), t = n + t.padStart(n ? e - 1 : e, "0");
|
|
334
|
+
}
|
|
335
|
+
return r === !1 ? String(t) : t;
|
|
336
|
+
}, Be = (t, e) => {
|
|
337
|
+
let r = t[0] === "-" ? "-" : "";
|
|
338
|
+
for (r && (t = t.slice(1), e--); t.length < e; ) t = "0" + t;
|
|
339
|
+
return r ? "-" + t : t;
|
|
340
|
+
}, xs = (t, e, r) => {
|
|
341
|
+
t.negatives.sort((o, u) => o < u ? -1 : o > u ? 1 : 0), t.positives.sort((o, u) => o < u ? -1 : o > u ? 1 : 0);
|
|
342
|
+
let n = e.capture ? "" : "?:", s = "", a = "", i;
|
|
343
|
+
return t.positives.length && (s = t.positives.map((o) => Be(String(o), r)).join("|")), t.negatives.length && (a = `-(${n}${t.negatives.map((o) => Be(String(o), r)).join("|")})`), s && a ? i = `${s}|${a}` : i = s || a, e.wrap ? `(${n}${i})` : i;
|
|
344
|
+
}, qr = (t, e, r, n) => {
|
|
345
|
+
if (r)
|
|
346
|
+
return Kr(t, e, { wrap: !1, ...n });
|
|
347
|
+
let s = String.fromCharCode(t);
|
|
348
|
+
if (t === e) return s;
|
|
349
|
+
let a = String.fromCharCode(e);
|
|
350
|
+
return `[${s}-${a}]`;
|
|
351
|
+
}, Qr = (t, e, r) => {
|
|
352
|
+
if (Array.isArray(t)) {
|
|
353
|
+
let n = r.wrap === !0, s = r.capture ? "" : "?:";
|
|
354
|
+
return n ? `(${s}${t.join("|")})` : t.join("|");
|
|
355
|
+
}
|
|
356
|
+
return Kr(t, e, r);
|
|
357
|
+
}, Yr = (...t) => new RangeError("Invalid range arguments: " + $s.inspect(...t)), Xr = (t, e, r) => {
|
|
358
|
+
if (r.strictRanges === !0) throw Yr([t, e]);
|
|
359
|
+
return [];
|
|
360
|
+
}, Ts = (t, e) => {
|
|
361
|
+
if (e.strictRanges === !0)
|
|
362
|
+
throw new TypeError(`Expected step "${t}" to be a number`);
|
|
363
|
+
return [];
|
|
364
|
+
}, ws = (t, e, r = 1, n = {}) => {
|
|
365
|
+
let s = Number(t), a = Number(e);
|
|
366
|
+
if (!Number.isInteger(s) || !Number.isInteger(a)) {
|
|
367
|
+
if (n.strictRanges === !0) throw Yr([t, e]);
|
|
368
|
+
return [];
|
|
369
|
+
}
|
|
370
|
+
s === 0 && (s = 0), a === 0 && (a = 0);
|
|
371
|
+
let i = s > a, o = String(t), u = String(e), h = String(r);
|
|
372
|
+
r = Math.max(Math.abs(r), 1);
|
|
373
|
+
let c = lt(o) || lt(u) || lt(h), _ = c ? Math.max(o.length, u.length, h.length) : 0, f = c === !1 && bs(t, e, n) === !1, $ = n.transform || Ps(f);
|
|
374
|
+
if (n.toRegex && r === 1)
|
|
375
|
+
return qr(Be(t, _), Be(e, _), !0, n);
|
|
376
|
+
let g = { negatives: [], positives: [] }, m = (B) => g[B < 0 ? "negatives" : "positives"].push(Math.abs(B)), P = [], A = 0;
|
|
377
|
+
for (; i ? s >= a : s <= a; )
|
|
378
|
+
n.toRegex === !0 && r > 1 ? m(s) : P.push(Cs($(s, A), _, f)), s = i ? s - r : s + r, A++;
|
|
379
|
+
return n.toRegex === !0 ? r > 1 ? xs(g, n, _) : Qr(P, null, { wrap: !1, ...n }) : P;
|
|
380
|
+
}, Os = (t, e, r = 1, n = {}) => {
|
|
381
|
+
if (!$e(t) && t.length > 1 || !$e(e) && e.length > 1)
|
|
382
|
+
return Xr(t, e, n);
|
|
383
|
+
let s = n.transform || ((f) => String.fromCharCode(f)), a = `${t}`.charCodeAt(0), i = `${e}`.charCodeAt(0), o = a > i, u = Math.min(a, i), h = Math.max(a, i);
|
|
384
|
+
if (n.toRegex && r === 1)
|
|
385
|
+
return qr(u, h, !1, n);
|
|
386
|
+
let c = [], _ = 0;
|
|
387
|
+
for (; o ? a >= i : a <= i; )
|
|
388
|
+
c.push(s(a, _)), a = o ? a - r : a + r, _++;
|
|
389
|
+
return n.toRegex === !0 ? Qr(c, null, { wrap: !1, options: n }) : c;
|
|
390
|
+
}, Ne = (t, e, r, n = {}) => {
|
|
391
|
+
if (e == null && ct(t))
|
|
392
|
+
return [t];
|
|
393
|
+
if (!ct(t) || !ct(e))
|
|
394
|
+
return Xr(t, e, n);
|
|
395
|
+
if (typeof r == "function")
|
|
396
|
+
return Ne(t, e, 1, { transform: r });
|
|
397
|
+
if (mr(r))
|
|
398
|
+
return Ne(t, e, 0, r);
|
|
399
|
+
let s = { ...n };
|
|
400
|
+
return s.capture === !0 && (s.wrap = !0), r = r || s.step || 1, $e(r) ? $e(t) && $e(e) ? ws(t, e, r, s) : Os(t, e, Math.max(Math.abs(r), 1), s) : r != null && !mr(r) ? Ts(r, s) : Ne(t, e, 1, r);
|
|
401
|
+
};
|
|
402
|
+
var Zr = Ne;
|
|
403
|
+
const ks = Zr, vr = Ye, Ls = (t, e = {}) => {
|
|
404
|
+
const r = (n, s = {}) => {
|
|
405
|
+
const a = vr.isInvalidBrace(s), i = n.invalid === !0 && e.escapeInvalid === !0, o = a === !0 || i === !0, u = e.escapeInvalid === !0 ? "\\" : "";
|
|
406
|
+
let h = "";
|
|
407
|
+
if (n.isOpen === !0)
|
|
408
|
+
return u + n.value;
|
|
409
|
+
if (n.isClose === !0)
|
|
410
|
+
return console.log("node.isClose", u, n.value), u + n.value;
|
|
411
|
+
if (n.type === "open")
|
|
412
|
+
return o ? u + n.value : "(";
|
|
413
|
+
if (n.type === "close")
|
|
414
|
+
return o ? u + n.value : ")";
|
|
415
|
+
if (n.type === "comma")
|
|
416
|
+
return n.prev.type === "comma" ? "" : o ? n.value : "|";
|
|
417
|
+
if (n.value)
|
|
418
|
+
return n.value;
|
|
419
|
+
if (n.nodes && n.ranges > 0) {
|
|
420
|
+
const c = vr.reduce(n.nodes), _ = ks(...c, { ...e, wrap: !1, toRegex: !0, strictZeros: !0 });
|
|
421
|
+
if (_.length !== 0)
|
|
422
|
+
return c.length > 1 && _.length > 1 ? `(${_})` : _;
|
|
423
|
+
}
|
|
424
|
+
if (n.nodes)
|
|
425
|
+
for (const c of n.nodes)
|
|
426
|
+
h += r(c, n);
|
|
427
|
+
return h;
|
|
428
|
+
};
|
|
429
|
+
return r(t);
|
|
430
|
+
};
|
|
431
|
+
var Ds = Ls;
|
|
432
|
+
const Hs = Zr, Sr = It, ve = Ye, ge = (t = "", e = "", r = !1) => {
|
|
433
|
+
const n = [];
|
|
434
|
+
if (t = [].concat(t), e = [].concat(e), !e.length) return t;
|
|
435
|
+
if (!t.length)
|
|
436
|
+
return r ? ve.flatten(e).map((s) => `{${s}}`) : e;
|
|
437
|
+
for (const s of t)
|
|
438
|
+
if (Array.isArray(s))
|
|
439
|
+
for (const a of s)
|
|
440
|
+
n.push(ge(a, e, r));
|
|
441
|
+
else
|
|
442
|
+
for (let a of e)
|
|
443
|
+
r === !0 && typeof a == "string" && (a = `{${a}}`), n.push(Array.isArray(a) ? ge(s, a, r) : s + a);
|
|
444
|
+
return ve.flatten(n);
|
|
445
|
+
}, Ms = (t, e = {}) => {
|
|
446
|
+
const r = e.rangeLimit === void 0 ? 1e3 : e.rangeLimit, n = (s, a = {}) => {
|
|
447
|
+
s.queue = [];
|
|
448
|
+
let i = a, o = a.queue;
|
|
449
|
+
for (; i.type !== "brace" && i.type !== "root" && i.parent; )
|
|
450
|
+
i = i.parent, o = i.queue;
|
|
451
|
+
if (s.invalid || s.dollar) {
|
|
452
|
+
o.push(ge(o.pop(), Sr(s, e)));
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
if (s.type === "brace" && s.invalid !== !0 && s.nodes.length === 2) {
|
|
456
|
+
o.push(ge(o.pop(), ["{}"]));
|
|
457
|
+
return;
|
|
458
|
+
}
|
|
459
|
+
if (s.nodes && s.ranges > 0) {
|
|
460
|
+
const _ = ve.reduce(s.nodes);
|
|
461
|
+
if (ve.exceedsLimit(..._, e.step, r))
|
|
462
|
+
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
|
|
463
|
+
let f = Hs(..._, e);
|
|
464
|
+
f.length === 0 && (f = Sr(s, e)), o.push(ge(o.pop(), f)), s.nodes = [];
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
const u = ve.encloseBrace(s);
|
|
468
|
+
let h = s.queue, c = s;
|
|
469
|
+
for (; c.type !== "brace" && c.type !== "root" && c.parent; )
|
|
470
|
+
c = c.parent, h = c.queue;
|
|
471
|
+
for (let _ = 0; _ < s.nodes.length; _++) {
|
|
472
|
+
const f = s.nodes[_];
|
|
473
|
+
if (f.type === "comma" && s.type === "brace") {
|
|
474
|
+
_ === 1 && h.push(""), h.push("");
|
|
475
|
+
continue;
|
|
476
|
+
}
|
|
477
|
+
if (f.type === "close") {
|
|
478
|
+
o.push(ge(o.pop(), h, u));
|
|
479
|
+
continue;
|
|
480
|
+
}
|
|
481
|
+
if (f.value && f.type !== "open") {
|
|
482
|
+
h.push(ge(h.pop(), f.value));
|
|
483
|
+
continue;
|
|
484
|
+
}
|
|
485
|
+
f.nodes && n(f, s);
|
|
486
|
+
}
|
|
487
|
+
return h;
|
|
488
|
+
};
|
|
489
|
+
return ve.flatten(n(t));
|
|
490
|
+
};
|
|
491
|
+
var Is = Ms, Ns = {
|
|
492
|
+
MAX_LENGTH: 1e4,
|
|
493
|
+
// Digits
|
|
494
|
+
CHAR_0: "0",
|
|
495
|
+
/* 0 */
|
|
496
|
+
CHAR_9: "9",
|
|
497
|
+
/* 9 */
|
|
498
|
+
// Alphabet chars.
|
|
499
|
+
CHAR_UPPERCASE_A: "A",
|
|
500
|
+
/* A */
|
|
501
|
+
CHAR_LOWERCASE_A: "a",
|
|
502
|
+
/* a */
|
|
503
|
+
CHAR_UPPERCASE_Z: "Z",
|
|
504
|
+
/* Z */
|
|
505
|
+
CHAR_LOWERCASE_Z: "z",
|
|
506
|
+
/* z */
|
|
507
|
+
CHAR_LEFT_PARENTHESES: "(",
|
|
508
|
+
/* ( */
|
|
509
|
+
CHAR_RIGHT_PARENTHESES: ")",
|
|
510
|
+
/* ) */
|
|
511
|
+
CHAR_ASTERISK: "*",
|
|
512
|
+
/* * */
|
|
513
|
+
// Non-alphabetic chars.
|
|
514
|
+
CHAR_AMPERSAND: "&",
|
|
515
|
+
/* & */
|
|
516
|
+
CHAR_AT: "@",
|
|
517
|
+
/* @ */
|
|
518
|
+
CHAR_BACKSLASH: "\\",
|
|
519
|
+
/* \ */
|
|
520
|
+
CHAR_BACKTICK: "`",
|
|
521
|
+
/* ` */
|
|
522
|
+
CHAR_CARRIAGE_RETURN: "\r",
|
|
523
|
+
/* \r */
|
|
524
|
+
CHAR_CIRCUMFLEX_ACCENT: "^",
|
|
525
|
+
/* ^ */
|
|
526
|
+
CHAR_COLON: ":",
|
|
527
|
+
/* : */
|
|
528
|
+
CHAR_COMMA: ",",
|
|
529
|
+
/* , */
|
|
530
|
+
CHAR_DOLLAR: "$",
|
|
531
|
+
/* . */
|
|
532
|
+
CHAR_DOT: ".",
|
|
533
|
+
/* . */
|
|
534
|
+
CHAR_DOUBLE_QUOTE: '"',
|
|
535
|
+
/* " */
|
|
536
|
+
CHAR_EQUAL: "=",
|
|
537
|
+
/* = */
|
|
538
|
+
CHAR_EXCLAMATION_MARK: "!",
|
|
539
|
+
/* ! */
|
|
540
|
+
CHAR_FORM_FEED: "\f",
|
|
541
|
+
/* \f */
|
|
542
|
+
CHAR_FORWARD_SLASH: "/",
|
|
543
|
+
/* / */
|
|
544
|
+
CHAR_HASH: "#",
|
|
545
|
+
/* # */
|
|
546
|
+
CHAR_HYPHEN_MINUS: "-",
|
|
547
|
+
/* - */
|
|
548
|
+
CHAR_LEFT_ANGLE_BRACKET: "<",
|
|
549
|
+
/* < */
|
|
550
|
+
CHAR_LEFT_CURLY_BRACE: "{",
|
|
551
|
+
/* { */
|
|
552
|
+
CHAR_LEFT_SQUARE_BRACKET: "[",
|
|
553
|
+
/* [ */
|
|
554
|
+
CHAR_LINE_FEED: `
|
|
555
|
+
`,
|
|
556
|
+
/* \n */
|
|
557
|
+
CHAR_NO_BREAK_SPACE: " ",
|
|
558
|
+
/* \u00A0 */
|
|
559
|
+
CHAR_PERCENT: "%",
|
|
560
|
+
/* % */
|
|
561
|
+
CHAR_PLUS: "+",
|
|
562
|
+
/* + */
|
|
563
|
+
CHAR_QUESTION_MARK: "?",
|
|
564
|
+
/* ? */
|
|
565
|
+
CHAR_RIGHT_ANGLE_BRACKET: ">",
|
|
566
|
+
/* > */
|
|
567
|
+
CHAR_RIGHT_CURLY_BRACE: "}",
|
|
568
|
+
/* } */
|
|
569
|
+
CHAR_RIGHT_SQUARE_BRACKET: "]",
|
|
570
|
+
/* ] */
|
|
571
|
+
CHAR_SEMICOLON: ";",
|
|
572
|
+
/* ; */
|
|
573
|
+
CHAR_SINGLE_QUOTE: "'",
|
|
574
|
+
/* ' */
|
|
575
|
+
CHAR_SPACE: " ",
|
|
576
|
+
/* */
|
|
577
|
+
CHAR_TAB: " ",
|
|
578
|
+
/* \t */
|
|
579
|
+
CHAR_UNDERSCORE: "_",
|
|
580
|
+
/* _ */
|
|
581
|
+
CHAR_VERTICAL_LINE: "|",
|
|
582
|
+
/* | */
|
|
583
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
|
|
584
|
+
/* \uFEFF */
|
|
585
|
+
};
|
|
586
|
+
const Fs = It, {
|
|
587
|
+
MAX_LENGTH: Ar,
|
|
588
|
+
CHAR_BACKSLASH: ft,
|
|
589
|
+
/* \ */
|
|
590
|
+
CHAR_BACKTICK: Bs,
|
|
591
|
+
/* ` */
|
|
592
|
+
CHAR_COMMA: js,
|
|
593
|
+
/* , */
|
|
594
|
+
CHAR_DOT: Gs,
|
|
595
|
+
/* . */
|
|
596
|
+
CHAR_LEFT_PARENTHESES: Us,
|
|
597
|
+
/* ( */
|
|
598
|
+
CHAR_RIGHT_PARENTHESES: Ws,
|
|
599
|
+
/* ) */
|
|
600
|
+
CHAR_LEFT_CURLY_BRACE: Vs,
|
|
601
|
+
/* { */
|
|
602
|
+
CHAR_RIGHT_CURLY_BRACE: Ks,
|
|
603
|
+
/* } */
|
|
604
|
+
CHAR_LEFT_SQUARE_BRACKET: Er,
|
|
605
|
+
/* [ */
|
|
606
|
+
CHAR_RIGHT_SQUARE_BRACKET: Rr,
|
|
607
|
+
/* ] */
|
|
608
|
+
CHAR_DOUBLE_QUOTE: qs,
|
|
609
|
+
/* " */
|
|
610
|
+
CHAR_SINGLE_QUOTE: Qs,
|
|
611
|
+
/* ' */
|
|
612
|
+
CHAR_NO_BREAK_SPACE: Ys,
|
|
613
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: Xs
|
|
614
|
+
} = Ns, Zs = (t, e = {}) => {
|
|
615
|
+
if (typeof t != "string")
|
|
616
|
+
throw new TypeError("Expected a string");
|
|
617
|
+
const r = e || {}, n = typeof r.maxLength == "number" ? Math.min(Ar, r.maxLength) : Ar;
|
|
618
|
+
if (t.length > n)
|
|
619
|
+
throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${n})`);
|
|
620
|
+
const s = { type: "root", input: t, nodes: [] }, a = [s];
|
|
621
|
+
let i = s, o = s, u = 0;
|
|
622
|
+
const h = t.length;
|
|
623
|
+
let c = 0, _ = 0, f;
|
|
624
|
+
const $ = () => t[c++], g = (m) => {
|
|
625
|
+
if (m.type === "text" && o.type === "dot" && (o.type = "text"), o && o.type === "text" && m.type === "text") {
|
|
626
|
+
o.value += m.value;
|
|
627
|
+
return;
|
|
628
|
+
}
|
|
629
|
+
return i.nodes.push(m), m.parent = i, m.prev = o, o = m, m;
|
|
630
|
+
};
|
|
631
|
+
for (g({ type: "bos" }); c < h; )
|
|
632
|
+
if (i = a[a.length - 1], f = $(), !(f === Xs || f === Ys)) {
|
|
633
|
+
if (f === ft) {
|
|
634
|
+
g({ type: "text", value: (e.keepEscaping ? f : "") + $() });
|
|
635
|
+
continue;
|
|
636
|
+
}
|
|
637
|
+
if (f === Rr) {
|
|
638
|
+
g({ type: "text", value: "\\" + f });
|
|
639
|
+
continue;
|
|
640
|
+
}
|
|
641
|
+
if (f === Er) {
|
|
642
|
+
u++;
|
|
643
|
+
let m;
|
|
644
|
+
for (; c < h && (m = $()); ) {
|
|
645
|
+
if (f += m, m === Er) {
|
|
646
|
+
u++;
|
|
647
|
+
continue;
|
|
648
|
+
}
|
|
649
|
+
if (m === ft) {
|
|
650
|
+
f += $();
|
|
651
|
+
continue;
|
|
652
|
+
}
|
|
653
|
+
if (m === Rr && (u--, u === 0))
|
|
654
|
+
break;
|
|
655
|
+
}
|
|
656
|
+
g({ type: "text", value: f });
|
|
657
|
+
continue;
|
|
658
|
+
}
|
|
659
|
+
if (f === Us) {
|
|
660
|
+
i = g({ type: "paren", nodes: [] }), a.push(i), g({ type: "text", value: f });
|
|
661
|
+
continue;
|
|
662
|
+
}
|
|
663
|
+
if (f === Ws) {
|
|
664
|
+
if (i.type !== "paren") {
|
|
665
|
+
g({ type: "text", value: f });
|
|
666
|
+
continue;
|
|
667
|
+
}
|
|
668
|
+
i = a.pop(), g({ type: "text", value: f }), i = a[a.length - 1];
|
|
669
|
+
continue;
|
|
670
|
+
}
|
|
671
|
+
if (f === qs || f === Qs || f === Bs) {
|
|
672
|
+
const m = f;
|
|
673
|
+
let P;
|
|
674
|
+
for (e.keepQuotes !== !0 && (f = ""); c < h && (P = $()); ) {
|
|
675
|
+
if (P === ft) {
|
|
676
|
+
f += P + $();
|
|
677
|
+
continue;
|
|
678
|
+
}
|
|
679
|
+
if (P === m) {
|
|
680
|
+
e.keepQuotes === !0 && (f += P);
|
|
681
|
+
break;
|
|
682
|
+
}
|
|
683
|
+
f += P;
|
|
684
|
+
}
|
|
685
|
+
g({ type: "text", value: f });
|
|
686
|
+
continue;
|
|
687
|
+
}
|
|
688
|
+
if (f === Vs) {
|
|
689
|
+
_++;
|
|
690
|
+
const P = {
|
|
691
|
+
type: "brace",
|
|
692
|
+
open: !0,
|
|
693
|
+
close: !1,
|
|
694
|
+
dollar: o.value && o.value.slice(-1) === "$" || i.dollar === !0,
|
|
695
|
+
depth: _,
|
|
696
|
+
commas: 0,
|
|
697
|
+
ranges: 0,
|
|
698
|
+
nodes: []
|
|
699
|
+
};
|
|
700
|
+
i = g(P), a.push(i), g({ type: "open", value: f });
|
|
701
|
+
continue;
|
|
702
|
+
}
|
|
703
|
+
if (f === Ks) {
|
|
704
|
+
if (i.type !== "brace") {
|
|
705
|
+
g({ type: "text", value: f });
|
|
706
|
+
continue;
|
|
707
|
+
}
|
|
708
|
+
const m = "close";
|
|
709
|
+
i = a.pop(), i.close = !0, g({ type: m, value: f }), _--, i = a[a.length - 1];
|
|
710
|
+
continue;
|
|
711
|
+
}
|
|
712
|
+
if (f === js && _ > 0) {
|
|
713
|
+
if (i.ranges > 0) {
|
|
714
|
+
i.ranges = 0;
|
|
715
|
+
const m = i.nodes.shift();
|
|
716
|
+
i.nodes = [m, { type: "text", value: Fs(i) }];
|
|
717
|
+
}
|
|
718
|
+
g({ type: "comma", value: f }), i.commas++;
|
|
719
|
+
continue;
|
|
720
|
+
}
|
|
721
|
+
if (f === Gs && _ > 0 && i.commas === 0) {
|
|
722
|
+
const m = i.nodes;
|
|
723
|
+
if (_ === 0 || m.length === 0) {
|
|
724
|
+
g({ type: "text", value: f });
|
|
725
|
+
continue;
|
|
726
|
+
}
|
|
727
|
+
if (o.type === "dot") {
|
|
728
|
+
if (i.range = [], o.value += f, o.type = "range", i.nodes.length !== 3 && i.nodes.length !== 5) {
|
|
729
|
+
i.invalid = !0, i.ranges = 0, o.type = "text";
|
|
730
|
+
continue;
|
|
731
|
+
}
|
|
732
|
+
i.ranges++, i.args = [];
|
|
733
|
+
continue;
|
|
734
|
+
}
|
|
735
|
+
if (o.type === "range") {
|
|
736
|
+
m.pop();
|
|
737
|
+
const P = m[m.length - 1];
|
|
738
|
+
P.value += o.value + f, o = P, i.ranges--;
|
|
739
|
+
continue;
|
|
740
|
+
}
|
|
741
|
+
g({ type: "dot", value: f });
|
|
742
|
+
continue;
|
|
743
|
+
}
|
|
744
|
+
g({ type: "text", value: f });
|
|
745
|
+
}
|
|
746
|
+
do
|
|
747
|
+
if (i = a.pop(), i.type !== "root") {
|
|
748
|
+
i.nodes.forEach((A) => {
|
|
749
|
+
A.nodes || (A.type === "open" && (A.isOpen = !0), A.type === "close" && (A.isClose = !0), A.nodes || (A.type = "text"), A.invalid = !0);
|
|
750
|
+
});
|
|
751
|
+
const m = a[a.length - 1], P = m.nodes.indexOf(i);
|
|
752
|
+
m.nodes.splice(P, 1, ...i.nodes);
|
|
753
|
+
}
|
|
754
|
+
while (a.length > 0);
|
|
755
|
+
return g({ type: "eos" }), s;
|
|
756
|
+
};
|
|
757
|
+
var zs = Zs;
|
|
758
|
+
const $r = It, Js = Ds, ei = Is, ti = zs, X = (t, e = {}) => {
|
|
759
|
+
let r = [];
|
|
760
|
+
if (Array.isArray(t))
|
|
761
|
+
for (const n of t) {
|
|
762
|
+
const s = X.create(n, e);
|
|
763
|
+
Array.isArray(s) ? r.push(...s) : r.push(s);
|
|
764
|
+
}
|
|
765
|
+
else
|
|
766
|
+
r = [].concat(X.create(t, e));
|
|
767
|
+
return e && e.expand === !0 && e.nodupes === !0 && (r = [...new Set(r)]), r;
|
|
768
|
+
};
|
|
769
|
+
X.parse = (t, e = {}) => ti(t, e);
|
|
770
|
+
X.stringify = (t, e = {}) => $r(typeof t == "string" ? X.parse(t, e) : t, e);
|
|
771
|
+
X.compile = (t, e = {}) => (typeof t == "string" && (t = X.parse(t, e)), Js(t, e));
|
|
772
|
+
X.expand = (t, e = {}) => {
|
|
773
|
+
typeof t == "string" && (t = X.parse(t, e));
|
|
774
|
+
let r = ei(t, e);
|
|
775
|
+
return e.noempty === !0 && (r = r.filter(Boolean)), e.nodupes === !0 && (r = [...new Set(r)]), r;
|
|
776
|
+
};
|
|
777
|
+
X.create = (t, e = {}) => t === "" || t.length < 3 ? [t] : e.expand !== !0 ? X.compile(t, e) : X.expand(t, e);
|
|
778
|
+
var ri = X, Pe = {};
|
|
779
|
+
const ni = k, oe = "\\\\/", Pr = `[^${oe}]`, le = "\\.", si = "\\+", ii = "\\?", Xe = "\\/", ai = "(?=.)", zr = "[^/]", Nt = `(?:${Xe}|$)`, Jr = `(?:^|${Xe})`, Ft = `${le}{1,2}${Nt}`, oi = `(?!${le})`, ui = `(?!${Jr}${Ft})`, ci = `(?!${le}{0,1}${Nt})`, li = `(?!${Ft})`, fi = `[^.${Xe}]`, pi = `${zr}*?`, en = {
|
|
780
|
+
DOT_LITERAL: le,
|
|
781
|
+
PLUS_LITERAL: si,
|
|
782
|
+
QMARK_LITERAL: ii,
|
|
783
|
+
SLASH_LITERAL: Xe,
|
|
784
|
+
ONE_CHAR: ai,
|
|
785
|
+
QMARK: zr,
|
|
786
|
+
END_ANCHOR: Nt,
|
|
787
|
+
DOTS_SLASH: Ft,
|
|
788
|
+
NO_DOT: oi,
|
|
789
|
+
NO_DOTS: ui,
|
|
790
|
+
NO_DOT_SLASH: ci,
|
|
791
|
+
NO_DOTS_SLASH: li,
|
|
792
|
+
QMARK_NO_DOT: fi,
|
|
793
|
+
STAR: pi,
|
|
794
|
+
START_ANCHOR: Jr
|
|
795
|
+
}, hi = {
|
|
796
|
+
...en,
|
|
797
|
+
SLASH_LITERAL: `[${oe}]`,
|
|
798
|
+
QMARK: Pr,
|
|
799
|
+
STAR: `${Pr}*?`,
|
|
800
|
+
DOTS_SLASH: `${le}{1,2}(?:[${oe}]|$)`,
|
|
801
|
+
NO_DOT: `(?!${le})`,
|
|
802
|
+
NO_DOTS: `(?!(?:^|[${oe}])${le}{1,2}(?:[${oe}]|$))`,
|
|
803
|
+
NO_DOT_SLASH: `(?!${le}{0,1}(?:[${oe}]|$))`,
|
|
804
|
+
NO_DOTS_SLASH: `(?!${le}{1,2}(?:[${oe}]|$))`,
|
|
805
|
+
QMARK_NO_DOT: `[^.${oe}]`,
|
|
806
|
+
START_ANCHOR: `(?:^|[${oe}])`,
|
|
807
|
+
END_ANCHOR: `(?:[${oe}]|$)`
|
|
808
|
+
}, di = {
|
|
809
|
+
alnum: "a-zA-Z0-9",
|
|
810
|
+
alpha: "a-zA-Z",
|
|
811
|
+
ascii: "\\x00-\\x7F",
|
|
812
|
+
blank: " \\t",
|
|
813
|
+
cntrl: "\\x00-\\x1F\\x7F",
|
|
814
|
+
digit: "0-9",
|
|
815
|
+
graph: "\\x21-\\x7E",
|
|
816
|
+
lower: "a-z",
|
|
817
|
+
print: "\\x20-\\x7E ",
|
|
818
|
+
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
819
|
+
space: " \\t\\r\\n\\v\\f",
|
|
820
|
+
upper: "A-Z",
|
|
821
|
+
word: "A-Za-z0-9_",
|
|
822
|
+
xdigit: "A-Fa-f0-9"
|
|
823
|
+
};
|
|
824
|
+
var Ze = {
|
|
825
|
+
MAX_LENGTH: 1024 * 64,
|
|
826
|
+
POSIX_REGEX_SOURCE: di,
|
|
827
|
+
// regular expressions
|
|
828
|
+
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
829
|
+
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
830
|
+
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
831
|
+
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
832
|
+
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
833
|
+
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
834
|
+
// Replace globs with equivalent patterns to reduce parsing time.
|
|
835
|
+
REPLACEMENTS: {
|
|
836
|
+
"***": "*",
|
|
837
|
+
"**/**": "**",
|
|
838
|
+
"**/**/**": "**"
|
|
839
|
+
},
|
|
840
|
+
// Digits
|
|
841
|
+
CHAR_0: 48,
|
|
842
|
+
/* 0 */
|
|
843
|
+
CHAR_9: 57,
|
|
844
|
+
/* 9 */
|
|
845
|
+
// Alphabet chars.
|
|
846
|
+
CHAR_UPPERCASE_A: 65,
|
|
847
|
+
/* A */
|
|
848
|
+
CHAR_LOWERCASE_A: 97,
|
|
849
|
+
/* a */
|
|
850
|
+
CHAR_UPPERCASE_Z: 90,
|
|
851
|
+
/* Z */
|
|
852
|
+
CHAR_LOWERCASE_Z: 122,
|
|
853
|
+
/* z */
|
|
854
|
+
CHAR_LEFT_PARENTHESES: 40,
|
|
855
|
+
/* ( */
|
|
856
|
+
CHAR_RIGHT_PARENTHESES: 41,
|
|
857
|
+
/* ) */
|
|
858
|
+
CHAR_ASTERISK: 42,
|
|
859
|
+
/* * */
|
|
860
|
+
// Non-alphabetic chars.
|
|
861
|
+
CHAR_AMPERSAND: 38,
|
|
862
|
+
/* & */
|
|
863
|
+
CHAR_AT: 64,
|
|
864
|
+
/* @ */
|
|
865
|
+
CHAR_BACKWARD_SLASH: 92,
|
|
866
|
+
/* \ */
|
|
867
|
+
CHAR_CARRIAGE_RETURN: 13,
|
|
868
|
+
/* \r */
|
|
869
|
+
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
870
|
+
/* ^ */
|
|
871
|
+
CHAR_COLON: 58,
|
|
872
|
+
/* : */
|
|
873
|
+
CHAR_COMMA: 44,
|
|
874
|
+
/* , */
|
|
875
|
+
CHAR_DOT: 46,
|
|
876
|
+
/* . */
|
|
877
|
+
CHAR_DOUBLE_QUOTE: 34,
|
|
878
|
+
/* " */
|
|
879
|
+
CHAR_EQUAL: 61,
|
|
880
|
+
/* = */
|
|
881
|
+
CHAR_EXCLAMATION_MARK: 33,
|
|
882
|
+
/* ! */
|
|
883
|
+
CHAR_FORM_FEED: 12,
|
|
884
|
+
/* \f */
|
|
885
|
+
CHAR_FORWARD_SLASH: 47,
|
|
886
|
+
/* / */
|
|
887
|
+
CHAR_GRAVE_ACCENT: 96,
|
|
888
|
+
/* ` */
|
|
889
|
+
CHAR_HASH: 35,
|
|
890
|
+
/* # */
|
|
891
|
+
CHAR_HYPHEN_MINUS: 45,
|
|
892
|
+
/* - */
|
|
893
|
+
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
894
|
+
/* < */
|
|
895
|
+
CHAR_LEFT_CURLY_BRACE: 123,
|
|
896
|
+
/* { */
|
|
897
|
+
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
898
|
+
/* [ */
|
|
899
|
+
CHAR_LINE_FEED: 10,
|
|
900
|
+
/* \n */
|
|
901
|
+
CHAR_NO_BREAK_SPACE: 160,
|
|
902
|
+
/* \u00A0 */
|
|
903
|
+
CHAR_PERCENT: 37,
|
|
904
|
+
/* % */
|
|
905
|
+
CHAR_PLUS: 43,
|
|
906
|
+
/* + */
|
|
907
|
+
CHAR_QUESTION_MARK: 63,
|
|
908
|
+
/* ? */
|
|
909
|
+
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
910
|
+
/* > */
|
|
911
|
+
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
912
|
+
/* } */
|
|
913
|
+
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
914
|
+
/* ] */
|
|
915
|
+
CHAR_SEMICOLON: 59,
|
|
916
|
+
/* ; */
|
|
917
|
+
CHAR_SINGLE_QUOTE: 39,
|
|
918
|
+
/* ' */
|
|
919
|
+
CHAR_SPACE: 32,
|
|
920
|
+
/* */
|
|
921
|
+
CHAR_TAB: 9,
|
|
922
|
+
/* \t */
|
|
923
|
+
CHAR_UNDERSCORE: 95,
|
|
924
|
+
/* _ */
|
|
925
|
+
CHAR_VERTICAL_LINE: 124,
|
|
926
|
+
/* | */
|
|
927
|
+
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
928
|
+
/* \uFEFF */
|
|
929
|
+
SEP: ni.sep,
|
|
930
|
+
/**
|
|
931
|
+
* Create EXTGLOB_CHARS
|
|
932
|
+
*/
|
|
933
|
+
extglobChars(t) {
|
|
934
|
+
return {
|
|
935
|
+
"!": { type: "negate", open: "(?:(?!(?:", close: `))${t.STAR})` },
|
|
936
|
+
"?": { type: "qmark", open: "(?:", close: ")?" },
|
|
937
|
+
"+": { type: "plus", open: "(?:", close: ")+" },
|
|
938
|
+
"*": { type: "star", open: "(?:", close: ")*" },
|
|
939
|
+
"@": { type: "at", open: "(?:", close: ")" }
|
|
940
|
+
};
|
|
941
|
+
},
|
|
942
|
+
/**
|
|
943
|
+
* Create GLOB_CHARS
|
|
944
|
+
*/
|
|
945
|
+
globChars(t) {
|
|
946
|
+
return t === !0 ? hi : en;
|
|
947
|
+
}
|
|
948
|
+
};
|
|
949
|
+
(function(t) {
|
|
950
|
+
const e = k, r = process.platform === "win32", {
|
|
951
|
+
REGEX_BACKSLASH: n,
|
|
952
|
+
REGEX_REMOVE_BACKSLASH: s,
|
|
953
|
+
REGEX_SPECIAL_CHARS: a,
|
|
954
|
+
REGEX_SPECIAL_CHARS_GLOBAL: i
|
|
955
|
+
} = Ze;
|
|
956
|
+
t.isObject = (o) => o !== null && typeof o == "object" && !Array.isArray(o), t.hasRegexChars = (o) => a.test(o), t.isRegexChar = (o) => o.length === 1 && t.hasRegexChars(o), t.escapeRegex = (o) => o.replace(i, "\\$1"), t.toPosixSlashes = (o) => o.replace(n, "/"), t.removeBackslashes = (o) => o.replace(s, (u) => u === "\\" ? "" : u), t.supportsLookbehinds = () => {
|
|
957
|
+
const o = process.version.slice(1).split(".").map(Number);
|
|
958
|
+
return o.length === 3 && o[0] >= 9 || o[0] === 8 && o[1] >= 10;
|
|
959
|
+
}, t.isWindows = (o) => o && typeof o.windows == "boolean" ? o.windows : r === !0 || e.sep === "\\", t.escapeLast = (o, u, h) => {
|
|
960
|
+
const c = o.lastIndexOf(u, h);
|
|
961
|
+
return c === -1 ? o : o[c - 1] === "\\" ? t.escapeLast(o, u, c - 1) : `${o.slice(0, c)}\\${o.slice(c)}`;
|
|
962
|
+
}, t.removePrefix = (o, u = {}) => {
|
|
963
|
+
let h = o;
|
|
964
|
+
return h.startsWith("./") && (h = h.slice(2), u.prefix = "./"), h;
|
|
965
|
+
}, t.wrapOutput = (o, u = {}, h = {}) => {
|
|
966
|
+
const c = h.contains ? "" : "^", _ = h.contains ? "" : "$";
|
|
967
|
+
let f = `${c}(?:${o})${_}`;
|
|
968
|
+
return u.negated === !0 && (f = `(?:^(?!${f}).*$)`), f;
|
|
969
|
+
};
|
|
970
|
+
})(Pe);
|
|
971
|
+
const br = Pe, {
|
|
972
|
+
CHAR_ASTERISK: pt,
|
|
973
|
+
/* * */
|
|
974
|
+
CHAR_AT: _i,
|
|
975
|
+
/* @ */
|
|
976
|
+
CHAR_BACKWARD_SLASH: Re,
|
|
977
|
+
/* \ */
|
|
978
|
+
CHAR_COMMA: gi,
|
|
979
|
+
/* , */
|
|
980
|
+
CHAR_DOT: ht,
|
|
981
|
+
/* . */
|
|
982
|
+
CHAR_EXCLAMATION_MARK: dt,
|
|
983
|
+
/* ! */
|
|
984
|
+
CHAR_FORWARD_SLASH: tn,
|
|
985
|
+
/* / */
|
|
986
|
+
CHAR_LEFT_CURLY_BRACE: _t,
|
|
987
|
+
/* { */
|
|
988
|
+
CHAR_LEFT_PARENTHESES: gt,
|
|
989
|
+
/* ( */
|
|
990
|
+
CHAR_LEFT_SQUARE_BRACKET: yi,
|
|
991
|
+
/* [ */
|
|
992
|
+
CHAR_PLUS: mi,
|
|
993
|
+
/* + */
|
|
994
|
+
CHAR_QUESTION_MARK: Cr,
|
|
995
|
+
/* ? */
|
|
996
|
+
CHAR_RIGHT_CURLY_BRACE: vi,
|
|
997
|
+
/* } */
|
|
998
|
+
CHAR_RIGHT_PARENTHESES: xr,
|
|
999
|
+
/* ) */
|
|
1000
|
+
CHAR_RIGHT_SQUARE_BRACKET: Si
|
|
1001
|
+
/* ] */
|
|
1002
|
+
} = Ze, Tr = (t) => t === tn || t === Re, wr = (t) => {
|
|
1003
|
+
t.isPrefix !== !0 && (t.depth = t.isGlobstar ? 1 / 0 : 1);
|
|
1004
|
+
}, Ai = (t, e) => {
|
|
1005
|
+
const r = e || {}, n = t.length - 1, s = r.parts === !0 || r.scanToEnd === !0, a = [], i = [], o = [];
|
|
1006
|
+
let u = t, h = -1, c = 0, _ = 0, f = !1, $ = !1, g = !1, m = !1, P = !1, A = !1, B = !1, v = !1, z = !1, x = !1, H = 0, b, R, O = { value: "", depth: 0, isGlob: !1 };
|
|
1007
|
+
const W = () => h >= n, d = () => u.charCodeAt(h + 1), M = () => (b = R, u.charCodeAt(++h));
|
|
1008
|
+
for (; h < n; ) {
|
|
1009
|
+
R = M();
|
|
1010
|
+
let K;
|
|
1011
|
+
if (R === Re) {
|
|
1012
|
+
B = O.backslashes = !0, R = M(), R === _t && (A = !0);
|
|
1013
|
+
continue;
|
|
1014
|
+
}
|
|
1015
|
+
if (A === !0 || R === _t) {
|
|
1016
|
+
for (H++; W() !== !0 && (R = M()); ) {
|
|
1017
|
+
if (R === Re) {
|
|
1018
|
+
B = O.backslashes = !0, M();
|
|
1019
|
+
continue;
|
|
1020
|
+
}
|
|
1021
|
+
if (R === _t) {
|
|
1022
|
+
H++;
|
|
1023
|
+
continue;
|
|
1024
|
+
}
|
|
1025
|
+
if (A !== !0 && R === ht && (R = M()) === ht) {
|
|
1026
|
+
if (f = O.isBrace = !0, g = O.isGlob = !0, x = !0, s === !0)
|
|
1027
|
+
continue;
|
|
1028
|
+
break;
|
|
1029
|
+
}
|
|
1030
|
+
if (A !== !0 && R === gi) {
|
|
1031
|
+
if (f = O.isBrace = !0, g = O.isGlob = !0, x = !0, s === !0)
|
|
1032
|
+
continue;
|
|
1033
|
+
break;
|
|
1034
|
+
}
|
|
1035
|
+
if (R === vi && (H--, H === 0)) {
|
|
1036
|
+
A = !1, f = O.isBrace = !0, x = !0;
|
|
1037
|
+
break;
|
|
1038
|
+
}
|
|
1039
|
+
}
|
|
1040
|
+
if (s === !0)
|
|
1041
|
+
continue;
|
|
1042
|
+
break;
|
|
1043
|
+
}
|
|
1044
|
+
if (R === tn) {
|
|
1045
|
+
if (a.push(h), i.push(O), O = { value: "", depth: 0, isGlob: !1 }, x === !0) continue;
|
|
1046
|
+
if (b === ht && h === c + 1) {
|
|
1047
|
+
c += 2;
|
|
1048
|
+
continue;
|
|
1049
|
+
}
|
|
1050
|
+
_ = h + 1;
|
|
1051
|
+
continue;
|
|
1052
|
+
}
|
|
1053
|
+
if (r.noext !== !0 && (R === mi || R === _i || R === pt || R === Cr || R === dt) === !0 && d() === gt) {
|
|
1054
|
+
if (g = O.isGlob = !0, m = O.isExtglob = !0, x = !0, R === dt && h === c && (z = !0), s === !0) {
|
|
1055
|
+
for (; W() !== !0 && (R = M()); ) {
|
|
1056
|
+
if (R === Re) {
|
|
1057
|
+
B = O.backslashes = !0, R = M();
|
|
1058
|
+
continue;
|
|
1059
|
+
}
|
|
1060
|
+
if (R === xr) {
|
|
1061
|
+
g = O.isGlob = !0, x = !0;
|
|
1062
|
+
break;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
continue;
|
|
1066
|
+
}
|
|
1067
|
+
break;
|
|
1068
|
+
}
|
|
1069
|
+
if (R === pt) {
|
|
1070
|
+
if (b === pt && (P = O.isGlobstar = !0), g = O.isGlob = !0, x = !0, s === !0)
|
|
1071
|
+
continue;
|
|
1072
|
+
break;
|
|
1073
|
+
}
|
|
1074
|
+
if (R === Cr) {
|
|
1075
|
+
if (g = O.isGlob = !0, x = !0, s === !0)
|
|
1076
|
+
continue;
|
|
1077
|
+
break;
|
|
1078
|
+
}
|
|
1079
|
+
if (R === yi) {
|
|
1080
|
+
for (; W() !== !0 && (K = M()); ) {
|
|
1081
|
+
if (K === Re) {
|
|
1082
|
+
B = O.backslashes = !0, M();
|
|
1083
|
+
continue;
|
|
1084
|
+
}
|
|
1085
|
+
if (K === Si) {
|
|
1086
|
+
$ = O.isBracket = !0, g = O.isGlob = !0, x = !0;
|
|
1087
|
+
break;
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
if (s === !0)
|
|
1091
|
+
continue;
|
|
1092
|
+
break;
|
|
1093
|
+
}
|
|
1094
|
+
if (r.nonegate !== !0 && R === dt && h === c) {
|
|
1095
|
+
v = O.negated = !0, c++;
|
|
1096
|
+
continue;
|
|
1097
|
+
}
|
|
1098
|
+
if (r.noparen !== !0 && R === gt) {
|
|
1099
|
+
if (g = O.isGlob = !0, s === !0) {
|
|
1100
|
+
for (; W() !== !0 && (R = M()); ) {
|
|
1101
|
+
if (R === gt) {
|
|
1102
|
+
B = O.backslashes = !0, R = M();
|
|
1103
|
+
continue;
|
|
1104
|
+
}
|
|
1105
|
+
if (R === xr) {
|
|
1106
|
+
x = !0;
|
|
1107
|
+
break;
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
continue;
|
|
1111
|
+
}
|
|
1112
|
+
break;
|
|
1113
|
+
}
|
|
1114
|
+
if (g === !0) {
|
|
1115
|
+
if (x = !0, s === !0)
|
|
1116
|
+
continue;
|
|
1117
|
+
break;
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
r.noext === !0 && (m = !1, g = !1);
|
|
1121
|
+
let L = u, fe = "", l = "";
|
|
1122
|
+
c > 0 && (fe = u.slice(0, c), u = u.slice(c), _ -= c), L && g === !0 && _ > 0 ? (L = u.slice(0, _), l = u.slice(_)) : g === !0 ? (L = "", l = u) : L = u, L && L !== "" && L !== "/" && L !== u && Tr(L.charCodeAt(L.length - 1)) && (L = L.slice(0, -1)), r.unescape === !0 && (l && (l = br.removeBackslashes(l)), L && B === !0 && (L = br.removeBackslashes(L)));
|
|
1123
|
+
const p = {
|
|
1124
|
+
prefix: fe,
|
|
1125
|
+
input: t,
|
|
1126
|
+
start: c,
|
|
1127
|
+
base: L,
|
|
1128
|
+
glob: l,
|
|
1129
|
+
isBrace: f,
|
|
1130
|
+
isBracket: $,
|
|
1131
|
+
isGlob: g,
|
|
1132
|
+
isExtglob: m,
|
|
1133
|
+
isGlobstar: P,
|
|
1134
|
+
negated: v,
|
|
1135
|
+
negatedExtglob: z
|
|
1136
|
+
};
|
|
1137
|
+
if (r.tokens === !0 && (p.maxDepth = 0, Tr(R) || i.push(O), p.tokens = i), r.parts === !0 || r.tokens === !0) {
|
|
1138
|
+
let K;
|
|
1139
|
+
for (let w = 0; w < a.length; w++) {
|
|
1140
|
+
const ie = K ? K + 1 : c, ae = a[w], Q = t.slice(ie, ae);
|
|
1141
|
+
r.tokens && (w === 0 && c !== 0 ? (i[w].isPrefix = !0, i[w].value = fe) : i[w].value = Q, wr(i[w]), p.maxDepth += i[w].depth), (w !== 0 || Q !== "") && o.push(Q), K = ae;
|
|
1142
|
+
}
|
|
1143
|
+
if (K && K + 1 < t.length) {
|
|
1144
|
+
const w = t.slice(K + 1);
|
|
1145
|
+
o.push(w), r.tokens && (i[i.length - 1].value = w, wr(i[i.length - 1]), p.maxDepth += i[i.length - 1].depth);
|
|
1146
|
+
}
|
|
1147
|
+
p.slashes = a, p.parts = o;
|
|
1148
|
+
}
|
|
1149
|
+
return p;
|
|
1150
|
+
};
|
|
1151
|
+
var Ei = Ai;
|
|
1152
|
+
const je = Ze, Y = Pe, {
|
|
1153
|
+
MAX_LENGTH: Ge,
|
|
1154
|
+
POSIX_REGEX_SOURCE: Ri,
|
|
1155
|
+
REGEX_NON_SPECIAL_CHARS: $i,
|
|
1156
|
+
REGEX_SPECIAL_CHARS_BACKREF: Pi,
|
|
1157
|
+
REPLACEMENTS: rn
|
|
1158
|
+
} = je, bi = (t, e) => {
|
|
1159
|
+
if (typeof e.expandRange == "function")
|
|
1160
|
+
return e.expandRange(...t, e);
|
|
1161
|
+
t.sort();
|
|
1162
|
+
const r = `[${t.join("-")}]`;
|
|
1163
|
+
try {
|
|
1164
|
+
new RegExp(r);
|
|
1165
|
+
} catch {
|
|
1166
|
+
return t.map((s) => Y.escapeRegex(s)).join("..");
|
|
1167
|
+
}
|
|
1168
|
+
return r;
|
|
1169
|
+
}, me = (t, e) => `Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`, Bt = (t, e) => {
|
|
1170
|
+
if (typeof t != "string")
|
|
1171
|
+
throw new TypeError("Expected a string");
|
|
1172
|
+
t = rn[t] || t;
|
|
1173
|
+
const r = { ...e }, n = typeof r.maxLength == "number" ? Math.min(Ge, r.maxLength) : Ge;
|
|
1174
|
+
let s = t.length;
|
|
1175
|
+
if (s > n)
|
|
1176
|
+
throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);
|
|
1177
|
+
const a = { type: "bos", value: "", output: r.prepend || "" }, i = [a], o = r.capture ? "" : "?:", u = Y.isWindows(e), h = je.globChars(u), c = je.extglobChars(h), {
|
|
1178
|
+
DOT_LITERAL: _,
|
|
1179
|
+
PLUS_LITERAL: f,
|
|
1180
|
+
SLASH_LITERAL: $,
|
|
1181
|
+
ONE_CHAR: g,
|
|
1182
|
+
DOTS_SLASH: m,
|
|
1183
|
+
NO_DOT: P,
|
|
1184
|
+
NO_DOT_SLASH: A,
|
|
1185
|
+
NO_DOTS_SLASH: B,
|
|
1186
|
+
QMARK: v,
|
|
1187
|
+
QMARK_NO_DOT: z,
|
|
1188
|
+
STAR: x,
|
|
1189
|
+
START_ANCHOR: H
|
|
1190
|
+
} = h, b = (S) => `(${o}(?:(?!${H}${S.dot ? m : _}).)*?)`, R = r.dot ? "" : P, O = r.dot ? v : z;
|
|
1191
|
+
let W = r.bash === !0 ? b(r) : x;
|
|
1192
|
+
r.capture && (W = `(${W})`), typeof r.noext == "boolean" && (r.noextglob = r.noext);
|
|
1193
|
+
const d = {
|
|
1194
|
+
input: t,
|
|
1195
|
+
index: -1,
|
|
1196
|
+
start: 0,
|
|
1197
|
+
dot: r.dot === !0,
|
|
1198
|
+
consumed: "",
|
|
1199
|
+
output: "",
|
|
1200
|
+
prefix: "",
|
|
1201
|
+
backtrack: !1,
|
|
1202
|
+
negated: !1,
|
|
1203
|
+
brackets: 0,
|
|
1204
|
+
braces: 0,
|
|
1205
|
+
parens: 0,
|
|
1206
|
+
quotes: 0,
|
|
1207
|
+
globstar: !1,
|
|
1208
|
+
tokens: i
|
|
1209
|
+
};
|
|
1210
|
+
t = Y.removePrefix(t, d), s = t.length;
|
|
1211
|
+
const M = [], L = [], fe = [];
|
|
1212
|
+
let l = a, p;
|
|
1213
|
+
const K = () => d.index === s - 1, w = d.peek = (S = 1) => t[d.index + S], ie = d.advance = () => t[++d.index] || "", ae = () => t.slice(d.index + 1), Q = (S = "", D = 0) => {
|
|
1214
|
+
d.consumed += S, d.index += D;
|
|
1215
|
+
}, Oe = (S) => {
|
|
1216
|
+
d.output += S.output != null ? S.output : S.value, Q(S.value);
|
|
1217
|
+
}, Ln = () => {
|
|
1218
|
+
let S = 1;
|
|
1219
|
+
for (; w() === "!" && (w(2) !== "(" || w(3) === "?"); )
|
|
1220
|
+
ie(), d.start++, S++;
|
|
1221
|
+
return S % 2 === 0 ? !1 : (d.negated = !0, d.start++, !0);
|
|
1222
|
+
}, ke = (S) => {
|
|
1223
|
+
d[S]++, fe.push(S);
|
|
1224
|
+
}, de = (S) => {
|
|
1225
|
+
d[S]--, fe.pop();
|
|
1226
|
+
}, T = (S) => {
|
|
1227
|
+
if (l.type === "globstar") {
|
|
1228
|
+
const D = d.braces > 0 && (S.type === "comma" || S.type === "brace"), y = S.extglob === !0 || M.length && (S.type === "pipe" || S.type === "paren");
|
|
1229
|
+
S.type !== "slash" && S.type !== "paren" && !D && !y && (d.output = d.output.slice(0, -l.output.length), l.type = "star", l.value = "*", l.output = W, d.output += l.output);
|
|
1230
|
+
}
|
|
1231
|
+
if (M.length && S.type !== "paren" && (M[M.length - 1].inner += S.value), (S.value || S.output) && Oe(S), l && l.type === "text" && S.type === "text") {
|
|
1232
|
+
l.value += S.value, l.output = (l.output || "") + S.value;
|
|
1233
|
+
return;
|
|
1234
|
+
}
|
|
1235
|
+
S.prev = l, i.push(S), l = S;
|
|
1236
|
+
}, Le = (S, D) => {
|
|
1237
|
+
const y = { ...c[D], conditions: 1, inner: "" };
|
|
1238
|
+
y.prev = l, y.parens = d.parens, y.output = d.output;
|
|
1239
|
+
const C = (r.capture ? "(" : "") + y.open;
|
|
1240
|
+
ke("parens"), T({ type: S, value: D, output: d.output ? "" : g }), T({ type: "paren", extglob: !0, value: ie(), output: C }), M.push(y);
|
|
1241
|
+
}, Dn = (S) => {
|
|
1242
|
+
let D = S.close + (r.capture ? ")" : ""), y;
|
|
1243
|
+
if (S.type === "negate") {
|
|
1244
|
+
let C = W;
|
|
1245
|
+
if (S.inner && S.inner.length > 1 && S.inner.includes("/") && (C = b(r)), (C !== W || K() || /^\)+$/.test(ae())) && (D = S.close = `)$))${C}`), S.inner.includes("*") && (y = ae()) && /^\.[^\\/.]+$/.test(y)) {
|
|
1246
|
+
const N = Bt(y, { ...e, fastpaths: !1 }).output;
|
|
1247
|
+
D = S.close = `)${N})${C})`;
|
|
1248
|
+
}
|
|
1249
|
+
S.prev.type === "bos" && (d.negatedExtglob = !0);
|
|
1250
|
+
}
|
|
1251
|
+
T({ type: "paren", extglob: !0, value: p, output: D }), de("parens");
|
|
1252
|
+
};
|
|
1253
|
+
if (r.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(t)) {
|
|
1254
|
+
let S = !1, D = t.replace(Pi, (y, C, N, q, U, at) => q === "\\" ? (S = !0, y) : q === "?" ? C ? C + q + (U ? v.repeat(U.length) : "") : at === 0 ? O + (U ? v.repeat(U.length) : "") : v.repeat(N.length) : q === "." ? _.repeat(N.length) : q === "*" ? C ? C + q + (U ? W : "") : W : C ? y : `\\${y}`);
|
|
1255
|
+
return S === !0 && (r.unescape === !0 ? D = D.replace(/\\/g, "") : D = D.replace(/\\+/g, (y) => y.length % 2 === 0 ? "\\\\" : y ? "\\" : "")), D === t && r.contains === !0 ? (d.output = t, d) : (d.output = Y.wrapOutput(D, d, e), d);
|
|
1256
|
+
}
|
|
1257
|
+
for (; !K(); ) {
|
|
1258
|
+
if (p = ie(), p === "\0")
|
|
1259
|
+
continue;
|
|
1260
|
+
if (p === "\\") {
|
|
1261
|
+
const y = w();
|
|
1262
|
+
if (y === "/" && r.bash !== !0 || y === "." || y === ";")
|
|
1263
|
+
continue;
|
|
1264
|
+
if (!y) {
|
|
1265
|
+
p += "\\", T({ type: "text", value: p });
|
|
1266
|
+
continue;
|
|
1267
|
+
}
|
|
1268
|
+
const C = /^\\+/.exec(ae());
|
|
1269
|
+
let N = 0;
|
|
1270
|
+
if (C && C[0].length > 2 && (N = C[0].length, d.index += N, N % 2 !== 0 && (p += "\\")), r.unescape === !0 ? p = ie() : p += ie(), d.brackets === 0) {
|
|
1271
|
+
T({ type: "text", value: p });
|
|
1272
|
+
continue;
|
|
1273
|
+
}
|
|
1274
|
+
}
|
|
1275
|
+
if (d.brackets > 0 && (p !== "]" || l.value === "[" || l.value === "[^")) {
|
|
1276
|
+
if (r.posix !== !1 && p === ":") {
|
|
1277
|
+
const y = l.value.slice(1);
|
|
1278
|
+
if (y.includes("[") && (l.posix = !0, y.includes(":"))) {
|
|
1279
|
+
const C = l.value.lastIndexOf("["), N = l.value.slice(0, C), q = l.value.slice(C + 2), U = Ri[q];
|
|
1280
|
+
if (U) {
|
|
1281
|
+
l.value = N + U, d.backtrack = !0, ie(), !a.output && i.indexOf(l) === 1 && (a.output = g);
|
|
1282
|
+
continue;
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
}
|
|
1286
|
+
(p === "[" && w() !== ":" || p === "-" && w() === "]") && (p = `\\${p}`), p === "]" && (l.value === "[" || l.value === "[^") && (p = `\\${p}`), r.posix === !0 && p === "!" && l.value === "[" && (p = "^"), l.value += p, Oe({ value: p });
|
|
1287
|
+
continue;
|
|
1288
|
+
}
|
|
1289
|
+
if (d.quotes === 1 && p !== '"') {
|
|
1290
|
+
p = Y.escapeRegex(p), l.value += p, Oe({ value: p });
|
|
1291
|
+
continue;
|
|
1292
|
+
}
|
|
1293
|
+
if (p === '"') {
|
|
1294
|
+
d.quotes = d.quotes === 1 ? 0 : 1, r.keepQuotes === !0 && T({ type: "text", value: p });
|
|
1295
|
+
continue;
|
|
1296
|
+
}
|
|
1297
|
+
if (p === "(") {
|
|
1298
|
+
ke("parens"), T({ type: "paren", value: p });
|
|
1299
|
+
continue;
|
|
1300
|
+
}
|
|
1301
|
+
if (p === ")") {
|
|
1302
|
+
if (d.parens === 0 && r.strictBrackets === !0)
|
|
1303
|
+
throw new SyntaxError(me("opening", "("));
|
|
1304
|
+
const y = M[M.length - 1];
|
|
1305
|
+
if (y && d.parens === y.parens + 1) {
|
|
1306
|
+
Dn(M.pop());
|
|
1307
|
+
continue;
|
|
1308
|
+
}
|
|
1309
|
+
T({ type: "paren", value: p, output: d.parens ? ")" : "\\)" }), de("parens");
|
|
1310
|
+
continue;
|
|
1311
|
+
}
|
|
1312
|
+
if (p === "[") {
|
|
1313
|
+
if (r.nobracket === !0 || !ae().includes("]")) {
|
|
1314
|
+
if (r.nobracket !== !0 && r.strictBrackets === !0)
|
|
1315
|
+
throw new SyntaxError(me("closing", "]"));
|
|
1316
|
+
p = `\\${p}`;
|
|
1317
|
+
} else
|
|
1318
|
+
ke("brackets");
|
|
1319
|
+
T({ type: "bracket", value: p });
|
|
1320
|
+
continue;
|
|
1321
|
+
}
|
|
1322
|
+
if (p === "]") {
|
|
1323
|
+
if (r.nobracket === !0 || l && l.type === "bracket" && l.value.length === 1) {
|
|
1324
|
+
T({ type: "text", value: p, output: `\\${p}` });
|
|
1325
|
+
continue;
|
|
1326
|
+
}
|
|
1327
|
+
if (d.brackets === 0) {
|
|
1328
|
+
if (r.strictBrackets === !0)
|
|
1329
|
+
throw new SyntaxError(me("opening", "["));
|
|
1330
|
+
T({ type: "text", value: p, output: `\\${p}` });
|
|
1331
|
+
continue;
|
|
1332
|
+
}
|
|
1333
|
+
de("brackets");
|
|
1334
|
+
const y = l.value.slice(1);
|
|
1335
|
+
if (l.posix !== !0 && y[0] === "^" && !y.includes("/") && (p = `/${p}`), l.value += p, Oe({ value: p }), r.literalBrackets === !1 || Y.hasRegexChars(y))
|
|
1336
|
+
continue;
|
|
1337
|
+
const C = Y.escapeRegex(l.value);
|
|
1338
|
+
if (d.output = d.output.slice(0, -l.value.length), r.literalBrackets === !0) {
|
|
1339
|
+
d.output += C, l.value = C;
|
|
1340
|
+
continue;
|
|
1341
|
+
}
|
|
1342
|
+
l.value = `(${o}${C}|${l.value})`, d.output += l.value;
|
|
1343
|
+
continue;
|
|
1344
|
+
}
|
|
1345
|
+
if (p === "{" && r.nobrace !== !0) {
|
|
1346
|
+
ke("braces");
|
|
1347
|
+
const y = {
|
|
1348
|
+
type: "brace",
|
|
1349
|
+
value: p,
|
|
1350
|
+
output: "(",
|
|
1351
|
+
outputIndex: d.output.length,
|
|
1352
|
+
tokensIndex: d.tokens.length
|
|
1353
|
+
};
|
|
1354
|
+
L.push(y), T(y);
|
|
1355
|
+
continue;
|
|
1356
|
+
}
|
|
1357
|
+
if (p === "}") {
|
|
1358
|
+
const y = L[L.length - 1];
|
|
1359
|
+
if (r.nobrace === !0 || !y) {
|
|
1360
|
+
T({ type: "text", value: p, output: p });
|
|
1361
|
+
continue;
|
|
1362
|
+
}
|
|
1363
|
+
let C = ")";
|
|
1364
|
+
if (y.dots === !0) {
|
|
1365
|
+
const N = i.slice(), q = [];
|
|
1366
|
+
for (let U = N.length - 1; U >= 0 && (i.pop(), N[U].type !== "brace"); U--)
|
|
1367
|
+
N[U].type !== "dots" && q.unshift(N[U].value);
|
|
1368
|
+
C = bi(q, r), d.backtrack = !0;
|
|
1369
|
+
}
|
|
1370
|
+
if (y.comma !== !0 && y.dots !== !0) {
|
|
1371
|
+
const N = d.output.slice(0, y.outputIndex), q = d.tokens.slice(y.tokensIndex);
|
|
1372
|
+
y.value = y.output = "\\{", p = C = "\\}", d.output = N;
|
|
1373
|
+
for (const U of q)
|
|
1374
|
+
d.output += U.output || U.value;
|
|
1375
|
+
}
|
|
1376
|
+
T({ type: "brace", value: p, output: C }), de("braces"), L.pop();
|
|
1377
|
+
continue;
|
|
1378
|
+
}
|
|
1379
|
+
if (p === "|") {
|
|
1380
|
+
M.length > 0 && M[M.length - 1].conditions++, T({ type: "text", value: p });
|
|
1381
|
+
continue;
|
|
1382
|
+
}
|
|
1383
|
+
if (p === ",") {
|
|
1384
|
+
let y = p;
|
|
1385
|
+
const C = L[L.length - 1];
|
|
1386
|
+
C && fe[fe.length - 1] === "braces" && (C.comma = !0, y = "|"), T({ type: "comma", value: p, output: y });
|
|
1387
|
+
continue;
|
|
1388
|
+
}
|
|
1389
|
+
if (p === "/") {
|
|
1390
|
+
if (l.type === "dot" && d.index === d.start + 1) {
|
|
1391
|
+
d.start = d.index + 1, d.consumed = "", d.output = "", i.pop(), l = a;
|
|
1392
|
+
continue;
|
|
1393
|
+
}
|
|
1394
|
+
T({ type: "slash", value: p, output: $ });
|
|
1395
|
+
continue;
|
|
1396
|
+
}
|
|
1397
|
+
if (p === ".") {
|
|
1398
|
+
if (d.braces > 0 && l.type === "dot") {
|
|
1399
|
+
l.value === "." && (l.output = _);
|
|
1400
|
+
const y = L[L.length - 1];
|
|
1401
|
+
l.type = "dots", l.output += p, l.value += p, y.dots = !0;
|
|
1402
|
+
continue;
|
|
1403
|
+
}
|
|
1404
|
+
if (d.braces + d.parens === 0 && l.type !== "bos" && l.type !== "slash") {
|
|
1405
|
+
T({ type: "text", value: p, output: _ });
|
|
1406
|
+
continue;
|
|
1407
|
+
}
|
|
1408
|
+
T({ type: "dot", value: p, output: _ });
|
|
1409
|
+
continue;
|
|
1410
|
+
}
|
|
1411
|
+
if (p === "?") {
|
|
1412
|
+
if (!(l && l.value === "(") && r.noextglob !== !0 && w() === "(" && w(2) !== "?") {
|
|
1413
|
+
Le("qmark", p);
|
|
1414
|
+
continue;
|
|
1415
|
+
}
|
|
1416
|
+
if (l && l.type === "paren") {
|
|
1417
|
+
const C = w();
|
|
1418
|
+
let N = p;
|
|
1419
|
+
if (C === "<" && !Y.supportsLookbehinds())
|
|
1420
|
+
throw new Error("Node.js v10 or higher is required for regex lookbehinds");
|
|
1421
|
+
(l.value === "(" && !/[!=<:]/.test(C) || C === "<" && !/<([!=]|\w+>)/.test(ae())) && (N = `\\${p}`), T({ type: "text", value: p, output: N });
|
|
1422
|
+
continue;
|
|
1423
|
+
}
|
|
1424
|
+
if (r.dot !== !0 && (l.type === "slash" || l.type === "bos")) {
|
|
1425
|
+
T({ type: "qmark", value: p, output: z });
|
|
1426
|
+
continue;
|
|
1427
|
+
}
|
|
1428
|
+
T({ type: "qmark", value: p, output: v });
|
|
1429
|
+
continue;
|
|
1430
|
+
}
|
|
1431
|
+
if (p === "!") {
|
|
1432
|
+
if (r.noextglob !== !0 && w() === "(" && (w(2) !== "?" || !/[!=<:]/.test(w(3)))) {
|
|
1433
|
+
Le("negate", p);
|
|
1434
|
+
continue;
|
|
1435
|
+
}
|
|
1436
|
+
if (r.nonegate !== !0 && d.index === 0) {
|
|
1437
|
+
Ln();
|
|
1438
|
+
continue;
|
|
1439
|
+
}
|
|
1440
|
+
}
|
|
1441
|
+
if (p === "+") {
|
|
1442
|
+
if (r.noextglob !== !0 && w() === "(" && w(2) !== "?") {
|
|
1443
|
+
Le("plus", p);
|
|
1444
|
+
continue;
|
|
1445
|
+
}
|
|
1446
|
+
if (l && l.value === "(" || r.regex === !1) {
|
|
1447
|
+
T({ type: "plus", value: p, output: f });
|
|
1448
|
+
continue;
|
|
1449
|
+
}
|
|
1450
|
+
if (l && (l.type === "bracket" || l.type === "paren" || l.type === "brace") || d.parens > 0) {
|
|
1451
|
+
T({ type: "plus", value: p });
|
|
1452
|
+
continue;
|
|
1453
|
+
}
|
|
1454
|
+
T({ type: "plus", value: f });
|
|
1455
|
+
continue;
|
|
1456
|
+
}
|
|
1457
|
+
if (p === "@") {
|
|
1458
|
+
if (r.noextglob !== !0 && w() === "(" && w(2) !== "?") {
|
|
1459
|
+
T({ type: "at", extglob: !0, value: p, output: "" });
|
|
1460
|
+
continue;
|
|
1461
|
+
}
|
|
1462
|
+
T({ type: "text", value: p });
|
|
1463
|
+
continue;
|
|
1464
|
+
}
|
|
1465
|
+
if (p !== "*") {
|
|
1466
|
+
(p === "$" || p === "^") && (p = `\\${p}`);
|
|
1467
|
+
const y = $i.exec(ae());
|
|
1468
|
+
y && (p += y[0], d.index += y[0].length), T({ type: "text", value: p });
|
|
1469
|
+
continue;
|
|
1470
|
+
}
|
|
1471
|
+
if (l && (l.type === "globstar" || l.star === !0)) {
|
|
1472
|
+
l.type = "star", l.star = !0, l.value += p, l.output = W, d.backtrack = !0, d.globstar = !0, Q(p);
|
|
1473
|
+
continue;
|
|
1474
|
+
}
|
|
1475
|
+
let S = ae();
|
|
1476
|
+
if (r.noextglob !== !0 && /^\([^?]/.test(S)) {
|
|
1477
|
+
Le("star", p);
|
|
1478
|
+
continue;
|
|
1479
|
+
}
|
|
1480
|
+
if (l.type === "star") {
|
|
1481
|
+
if (r.noglobstar === !0) {
|
|
1482
|
+
Q(p);
|
|
1483
|
+
continue;
|
|
1484
|
+
}
|
|
1485
|
+
const y = l.prev, C = y.prev, N = y.type === "slash" || y.type === "bos", q = C && (C.type === "star" || C.type === "globstar");
|
|
1486
|
+
if (r.bash === !0 && (!N || S[0] && S[0] !== "/")) {
|
|
1487
|
+
T({ type: "star", value: p, output: "" });
|
|
1488
|
+
continue;
|
|
1489
|
+
}
|
|
1490
|
+
const U = d.braces > 0 && (y.type === "comma" || y.type === "brace"), at = M.length && (y.type === "pipe" || y.type === "paren");
|
|
1491
|
+
if (!N && y.type !== "paren" && !U && !at) {
|
|
1492
|
+
T({ type: "star", value: p, output: "" });
|
|
1493
|
+
continue;
|
|
1494
|
+
}
|
|
1495
|
+
for (; S.slice(0, 3) === "/**"; ) {
|
|
1496
|
+
const De = t[d.index + 4];
|
|
1497
|
+
if (De && De !== "/")
|
|
1498
|
+
break;
|
|
1499
|
+
S = S.slice(3), Q("/**", 3);
|
|
1500
|
+
}
|
|
1501
|
+
if (y.type === "bos" && K()) {
|
|
1502
|
+
l.type = "globstar", l.value += p, l.output = b(r), d.output = l.output, d.globstar = !0, Q(p);
|
|
1503
|
+
continue;
|
|
1504
|
+
}
|
|
1505
|
+
if (y.type === "slash" && y.prev.type !== "bos" && !q && K()) {
|
|
1506
|
+
d.output = d.output.slice(0, -(y.output + l.output).length), y.output = `(?:${y.output}`, l.type = "globstar", l.output = b(r) + (r.strictSlashes ? ")" : "|$)"), l.value += p, d.globstar = !0, d.output += y.output + l.output, Q(p);
|
|
1507
|
+
continue;
|
|
1508
|
+
}
|
|
1509
|
+
if (y.type === "slash" && y.prev.type !== "bos" && S[0] === "/") {
|
|
1510
|
+
const De = S[1] !== void 0 ? "|$" : "";
|
|
1511
|
+
d.output = d.output.slice(0, -(y.output + l.output).length), y.output = `(?:${y.output}`, l.type = "globstar", l.output = `${b(r)}${$}|${$}${De})`, l.value += p, d.output += y.output + l.output, d.globstar = !0, Q(p + ie()), T({ type: "slash", value: "/", output: "" });
|
|
1512
|
+
continue;
|
|
1513
|
+
}
|
|
1514
|
+
if (y.type === "bos" && S[0] === "/") {
|
|
1515
|
+
l.type = "globstar", l.value += p, l.output = `(?:^|${$}|${b(r)}${$})`, d.output = l.output, d.globstar = !0, Q(p + ie()), T({ type: "slash", value: "/", output: "" });
|
|
1516
|
+
continue;
|
|
1517
|
+
}
|
|
1518
|
+
d.output = d.output.slice(0, -l.output.length), l.type = "globstar", l.output = b(r), l.value += p, d.output += l.output, d.globstar = !0, Q(p);
|
|
1519
|
+
continue;
|
|
1520
|
+
}
|
|
1521
|
+
const D = { type: "star", value: p, output: W };
|
|
1522
|
+
if (r.bash === !0) {
|
|
1523
|
+
D.output = ".*?", (l.type === "bos" || l.type === "slash") && (D.output = R + D.output), T(D);
|
|
1524
|
+
continue;
|
|
1525
|
+
}
|
|
1526
|
+
if (l && (l.type === "bracket" || l.type === "paren") && r.regex === !0) {
|
|
1527
|
+
D.output = p, T(D);
|
|
1528
|
+
continue;
|
|
1529
|
+
}
|
|
1530
|
+
(d.index === d.start || l.type === "slash" || l.type === "dot") && (l.type === "dot" ? (d.output += A, l.output += A) : r.dot === !0 ? (d.output += B, l.output += B) : (d.output += R, l.output += R), w() !== "*" && (d.output += g, l.output += g)), T(D);
|
|
1531
|
+
}
|
|
1532
|
+
for (; d.brackets > 0; ) {
|
|
1533
|
+
if (r.strictBrackets === !0) throw new SyntaxError(me("closing", "]"));
|
|
1534
|
+
d.output = Y.escapeLast(d.output, "["), de("brackets");
|
|
1535
|
+
}
|
|
1536
|
+
for (; d.parens > 0; ) {
|
|
1537
|
+
if (r.strictBrackets === !0) throw new SyntaxError(me("closing", ")"));
|
|
1538
|
+
d.output = Y.escapeLast(d.output, "("), de("parens");
|
|
1539
|
+
}
|
|
1540
|
+
for (; d.braces > 0; ) {
|
|
1541
|
+
if (r.strictBrackets === !0) throw new SyntaxError(me("closing", "}"));
|
|
1542
|
+
d.output = Y.escapeLast(d.output, "{"), de("braces");
|
|
1543
|
+
}
|
|
1544
|
+
if (r.strictSlashes !== !0 && (l.type === "star" || l.type === "bracket") && T({ type: "maybe_slash", value: "", output: `${$}?` }), d.backtrack === !0) {
|
|
1545
|
+
d.output = "";
|
|
1546
|
+
for (const S of d.tokens)
|
|
1547
|
+
d.output += S.output != null ? S.output : S.value, S.suffix && (d.output += S.suffix);
|
|
1548
|
+
}
|
|
1549
|
+
return d;
|
|
1550
|
+
};
|
|
1551
|
+
Bt.fastpaths = (t, e) => {
|
|
1552
|
+
const r = { ...e }, n = typeof r.maxLength == "number" ? Math.min(Ge, r.maxLength) : Ge, s = t.length;
|
|
1553
|
+
if (s > n)
|
|
1554
|
+
throw new SyntaxError(`Input length: ${s}, exceeds maximum allowed length: ${n}`);
|
|
1555
|
+
t = rn[t] || t;
|
|
1556
|
+
const a = Y.isWindows(e), {
|
|
1557
|
+
DOT_LITERAL: i,
|
|
1558
|
+
SLASH_LITERAL: o,
|
|
1559
|
+
ONE_CHAR: u,
|
|
1560
|
+
DOTS_SLASH: h,
|
|
1561
|
+
NO_DOT: c,
|
|
1562
|
+
NO_DOTS: _,
|
|
1563
|
+
NO_DOTS_SLASH: f,
|
|
1564
|
+
STAR: $,
|
|
1565
|
+
START_ANCHOR: g
|
|
1566
|
+
} = je.globChars(a), m = r.dot ? _ : c, P = r.dot ? f : c, A = r.capture ? "" : "?:", B = { negated: !1, prefix: "" };
|
|
1567
|
+
let v = r.bash === !0 ? ".*?" : $;
|
|
1568
|
+
r.capture && (v = `(${v})`);
|
|
1569
|
+
const z = (R) => R.noglobstar === !0 ? v : `(${A}(?:(?!${g}${R.dot ? h : i}).)*?)`, x = (R) => {
|
|
1570
|
+
switch (R) {
|
|
1571
|
+
case "*":
|
|
1572
|
+
return `${m}${u}${v}`;
|
|
1573
|
+
case ".*":
|
|
1574
|
+
return `${i}${u}${v}`;
|
|
1575
|
+
case "*.*":
|
|
1576
|
+
return `${m}${v}${i}${u}${v}`;
|
|
1577
|
+
case "*/*":
|
|
1578
|
+
return `${m}${v}${o}${u}${P}${v}`;
|
|
1579
|
+
case "**":
|
|
1580
|
+
return m + z(r);
|
|
1581
|
+
case "**/*":
|
|
1582
|
+
return `(?:${m}${z(r)}${o})?${P}${u}${v}`;
|
|
1583
|
+
case "**/*.*":
|
|
1584
|
+
return `(?:${m}${z(r)}${o})?${P}${v}${i}${u}${v}`;
|
|
1585
|
+
case "**/.*":
|
|
1586
|
+
return `(?:${m}${z(r)}${o})?${i}${u}${v}`;
|
|
1587
|
+
default: {
|
|
1588
|
+
const O = /^(.*?)\.(\w+)$/.exec(R);
|
|
1589
|
+
if (!O) return;
|
|
1590
|
+
const W = x(O[1]);
|
|
1591
|
+
return W ? W + i + O[2] : void 0;
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
}, H = Y.removePrefix(t, B);
|
|
1595
|
+
let b = x(H);
|
|
1596
|
+
return b && r.strictSlashes !== !0 && (b += `${o}?`), b;
|
|
1597
|
+
};
|
|
1598
|
+
var Ci = Bt;
|
|
1599
|
+
const xi = k, Ti = Ei, vt = Ci, jt = Pe, wi = Ze, Oi = (t) => t && typeof t == "object" && !Array.isArray(t), j = (t, e, r = !1) => {
|
|
1600
|
+
if (Array.isArray(t)) {
|
|
1601
|
+
const c = t.map((f) => j(f, e, r));
|
|
1602
|
+
return (f) => {
|
|
1603
|
+
for (const $ of c) {
|
|
1604
|
+
const g = $(f);
|
|
1605
|
+
if (g) return g;
|
|
1606
|
+
}
|
|
1607
|
+
return !1;
|
|
1608
|
+
};
|
|
1609
|
+
}
|
|
1610
|
+
const n = Oi(t) && t.tokens && t.input;
|
|
1611
|
+
if (t === "" || typeof t != "string" && !n)
|
|
1612
|
+
throw new TypeError("Expected pattern to be a non-empty string");
|
|
1613
|
+
const s = e || {}, a = jt.isWindows(e), i = n ? j.compileRe(t, e) : j.makeRe(t, e, !1, !0), o = i.state;
|
|
1614
|
+
delete i.state;
|
|
1615
|
+
let u = () => !1;
|
|
1616
|
+
if (s.ignore) {
|
|
1617
|
+
const c = { ...e, ignore: null, onMatch: null, onResult: null };
|
|
1618
|
+
u = j(s.ignore, c, r);
|
|
1619
|
+
}
|
|
1620
|
+
const h = (c, _ = !1) => {
|
|
1621
|
+
const { isMatch: f, match: $, output: g } = j.test(c, i, e, { glob: t, posix: a }), m = { glob: t, state: o, regex: i, posix: a, input: c, output: g, match: $, isMatch: f };
|
|
1622
|
+
return typeof s.onResult == "function" && s.onResult(m), f === !1 ? (m.isMatch = !1, _ ? m : !1) : u(c) ? (typeof s.onIgnore == "function" && s.onIgnore(m), m.isMatch = !1, _ ? m : !1) : (typeof s.onMatch == "function" && s.onMatch(m), _ ? m : !0);
|
|
1623
|
+
};
|
|
1624
|
+
return r && (h.state = o), h;
|
|
1625
|
+
};
|
|
1626
|
+
j.test = (t, e, r, { glob: n, posix: s } = {}) => {
|
|
1627
|
+
if (typeof t != "string")
|
|
1628
|
+
throw new TypeError("Expected input to be a string");
|
|
1629
|
+
if (t === "")
|
|
1630
|
+
return { isMatch: !1, output: "" };
|
|
1631
|
+
const a = r || {}, i = a.format || (s ? jt.toPosixSlashes : null);
|
|
1632
|
+
let o = t === n, u = o && i ? i(t) : t;
|
|
1633
|
+
return o === !1 && (u = i ? i(t) : t, o = u === n), (o === !1 || a.capture === !0) && (a.matchBase === !0 || a.basename === !0 ? o = j.matchBase(t, e, r, s) : o = e.exec(u)), { isMatch: !!o, match: o, output: u };
|
|
1634
|
+
};
|
|
1635
|
+
j.matchBase = (t, e, r, n = jt.isWindows(r)) => (e instanceof RegExp ? e : j.makeRe(e, r)).test(xi.basename(t));
|
|
1636
|
+
j.isMatch = (t, e, r) => j(e, r)(t);
|
|
1637
|
+
j.parse = (t, e) => Array.isArray(t) ? t.map((r) => j.parse(r, e)) : vt(t, { ...e, fastpaths: !1 });
|
|
1638
|
+
j.scan = (t, e) => Ti(t, e);
|
|
1639
|
+
j.compileRe = (t, e, r = !1, n = !1) => {
|
|
1640
|
+
if (r === !0)
|
|
1641
|
+
return t.output;
|
|
1642
|
+
const s = e || {}, a = s.contains ? "" : "^", i = s.contains ? "" : "$";
|
|
1643
|
+
let o = `${a}(?:${t.output})${i}`;
|
|
1644
|
+
t && t.negated === !0 && (o = `^(?!${o}).*$`);
|
|
1645
|
+
const u = j.toRegex(o, e);
|
|
1646
|
+
return n === !0 && (u.state = t), u;
|
|
1647
|
+
};
|
|
1648
|
+
j.makeRe = (t, e = {}, r = !1, n = !1) => {
|
|
1649
|
+
if (!t || typeof t != "string")
|
|
1650
|
+
throw new TypeError("Expected a non-empty string");
|
|
1651
|
+
let s = { negated: !1, fastpaths: !0 };
|
|
1652
|
+
return e.fastpaths !== !1 && (t[0] === "." || t[0] === "*") && (s.output = vt.fastpaths(t, e)), s.output || (s = vt(t, e)), j.compileRe(s, e, r, n);
|
|
1653
|
+
};
|
|
1654
|
+
j.toRegex = (t, e) => {
|
|
1655
|
+
try {
|
|
1656
|
+
const r = e || {};
|
|
1657
|
+
return new RegExp(t, r.flags || (r.nocase ? "i" : ""));
|
|
1658
|
+
} catch (r) {
|
|
1659
|
+
if (e && e.debug === !0) throw r;
|
|
1660
|
+
return /$^/;
|
|
1661
|
+
}
|
|
1662
|
+
};
|
|
1663
|
+
j.constants = wi;
|
|
1664
|
+
var ki = j, Li = ki;
|
|
1665
|
+
const nn = jr, sn = ri, ce = Li, St = Pe, Or = (t) => t === "" || t === "./", I = (t, e, r) => {
|
|
1666
|
+
e = [].concat(e), t = [].concat(t);
|
|
1667
|
+
let n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), i = 0, o = (c) => {
|
|
1668
|
+
a.add(c.output), r && r.onResult && r.onResult(c);
|
|
1669
|
+
};
|
|
1670
|
+
for (let c = 0; c < e.length; c++) {
|
|
1671
|
+
let _ = ce(String(e[c]), { ...r, onResult: o }, !0), f = _.state.negated || _.state.negatedExtglob;
|
|
1672
|
+
f && i++;
|
|
1673
|
+
for (let $ of t) {
|
|
1674
|
+
let g = _($, !0);
|
|
1675
|
+
(f ? !g.isMatch : g.isMatch) && (f ? n.add(g.output) : (n.delete(g.output), s.add(g.output)));
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
let h = (i === e.length ? [...a] : [...s]).filter((c) => !n.has(c));
|
|
1679
|
+
if (r && h.length === 0) {
|
|
1680
|
+
if (r.failglob === !0)
|
|
1681
|
+
throw new Error(`No matches found for "${e.join(", ")}"`);
|
|
1682
|
+
if (r.nonull === !0 || r.nullglob === !0)
|
|
1683
|
+
return r.unescape ? e.map((c) => c.replace(/\\/g, "")) : e;
|
|
1684
|
+
}
|
|
1685
|
+
return h;
|
|
1686
|
+
};
|
|
1687
|
+
I.match = I;
|
|
1688
|
+
I.matcher = (t, e) => ce(t, e);
|
|
1689
|
+
I.isMatch = (t, e, r) => ce(e, r)(t);
|
|
1690
|
+
I.any = I.isMatch;
|
|
1691
|
+
I.not = (t, e, r = {}) => {
|
|
1692
|
+
e = [].concat(e).map(String);
|
|
1693
|
+
let n = /* @__PURE__ */ new Set(), s = [], a = (o) => {
|
|
1694
|
+
r.onResult && r.onResult(o), s.push(o.output);
|
|
1695
|
+
}, i = new Set(I(t, e, { ...r, onResult: a }));
|
|
1696
|
+
for (let o of s)
|
|
1697
|
+
i.has(o) || n.add(o);
|
|
1698
|
+
return [...n];
|
|
1699
|
+
};
|
|
1700
|
+
I.contains = (t, e, r) => {
|
|
1701
|
+
if (typeof t != "string")
|
|
1702
|
+
throw new TypeError(`Expected a string: "${nn.inspect(t)}"`);
|
|
1703
|
+
if (Array.isArray(e))
|
|
1704
|
+
return e.some((n) => I.contains(t, n, r));
|
|
1705
|
+
if (typeof e == "string") {
|
|
1706
|
+
if (Or(t) || Or(e))
|
|
1707
|
+
return !1;
|
|
1708
|
+
if (t.includes(e) || t.startsWith("./") && t.slice(2).includes(e))
|
|
1709
|
+
return !0;
|
|
1710
|
+
}
|
|
1711
|
+
return I.isMatch(t, e, { ...r, contains: !0 });
|
|
1712
|
+
};
|
|
1713
|
+
I.matchKeys = (t, e, r) => {
|
|
1714
|
+
if (!St.isObject(t))
|
|
1715
|
+
throw new TypeError("Expected the first argument to be an object");
|
|
1716
|
+
let n = I(Object.keys(t), e, r), s = {};
|
|
1717
|
+
for (let a of n) s[a] = t[a];
|
|
1718
|
+
return s;
|
|
1719
|
+
};
|
|
1720
|
+
I.some = (t, e, r) => {
|
|
1721
|
+
let n = [].concat(t);
|
|
1722
|
+
for (let s of [].concat(e)) {
|
|
1723
|
+
let a = ce(String(s), r);
|
|
1724
|
+
if (n.some((i) => a(i)))
|
|
1725
|
+
return !0;
|
|
1726
|
+
}
|
|
1727
|
+
return !1;
|
|
1728
|
+
};
|
|
1729
|
+
I.every = (t, e, r) => {
|
|
1730
|
+
let n = [].concat(t);
|
|
1731
|
+
for (let s of [].concat(e)) {
|
|
1732
|
+
let a = ce(String(s), r);
|
|
1733
|
+
if (!n.every((i) => a(i)))
|
|
1734
|
+
return !1;
|
|
1735
|
+
}
|
|
1736
|
+
return !0;
|
|
1737
|
+
};
|
|
1738
|
+
I.all = (t, e, r) => {
|
|
1739
|
+
if (typeof t != "string")
|
|
1740
|
+
throw new TypeError(`Expected a string: "${nn.inspect(t)}"`);
|
|
1741
|
+
return [].concat(e).every((n) => ce(n, r)(t));
|
|
1742
|
+
};
|
|
1743
|
+
I.capture = (t, e, r) => {
|
|
1744
|
+
let n = St.isWindows(r), a = ce.makeRe(String(t), { ...r, capture: !0 }).exec(n ? St.toPosixSlashes(e) : e);
|
|
1745
|
+
if (a)
|
|
1746
|
+
return a.slice(1).map((i) => i === void 0 ? "" : i);
|
|
1747
|
+
};
|
|
1748
|
+
I.makeRe = (...t) => ce.makeRe(...t);
|
|
1749
|
+
I.scan = (...t) => ce.scan(...t);
|
|
1750
|
+
I.parse = (t, e) => {
|
|
1751
|
+
let r = [];
|
|
1752
|
+
for (let n of [].concat(t || []))
|
|
1753
|
+
for (let s of sn(String(n), e))
|
|
1754
|
+
r.push(ce.parse(s, e));
|
|
1755
|
+
return r;
|
|
1756
|
+
};
|
|
1757
|
+
I.braces = (t, e) => {
|
|
1758
|
+
if (typeof t != "string") throw new TypeError("Expected a string");
|
|
1759
|
+
return e && e.nobrace === !0 || !/\{.*\}/.test(t) ? [t] : sn(t, e);
|
|
1760
|
+
};
|
|
1761
|
+
I.braceExpand = (t, e) => {
|
|
1762
|
+
if (typeof t != "string") throw new TypeError("Expected a string");
|
|
1763
|
+
return I.braces(t, { ...e, expand: !0 });
|
|
1764
|
+
};
|
|
1765
|
+
var Di = I;
|
|
1766
|
+
Object.defineProperty(E, "__esModule", { value: !0 });
|
|
1767
|
+
E.removeDuplicateSlashes = E.matchAny = E.convertPatternsToRe = E.makeRe = E.getPatternParts = E.expandBraceExpansion = E.expandPatternsWithBraceExpansion = E.isAffectDepthOfReadingPattern = E.endsWithSlashGlobStar = E.hasGlobStar = E.getBaseDirectory = E.isPatternRelatedToParentDirectory = E.getPatternsOutsideCurrentDirectory = E.getPatternsInsideCurrentDirectory = E.getPositivePatterns = E.getNegativePatterns = E.isPositivePattern = E.isNegativePattern = E.convertToNegativePattern = E.convertToPositivePattern = E.isDynamicPattern = E.isStaticPattern = void 0;
|
|
1768
|
+
const Hi = k, Mi = ds, Gt = Di, an = "**", Ii = "\\", Ni = /[*?]|^!/, Fi = /\[[^[]*]/, Bi = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/, ji = /[!*+?@]\([^(]*\)/, Gi = /,|\.\./, Ui = /(?!^)\/{2,}/g;
|
|
1769
|
+
function on(t, e = {}) {
|
|
1770
|
+
return !un(t, e);
|
|
1771
|
+
}
|
|
1772
|
+
E.isStaticPattern = on;
|
|
1773
|
+
function un(t, e = {}) {
|
|
1774
|
+
return t === "" ? !1 : !!(e.caseSensitiveMatch === !1 || t.includes(Ii) || Ni.test(t) || Fi.test(t) || Bi.test(t) || e.extglob !== !1 && ji.test(t) || e.braceExpansion !== !1 && Wi(t));
|
|
1775
|
+
}
|
|
1776
|
+
E.isDynamicPattern = un;
|
|
1777
|
+
function Wi(t) {
|
|
1778
|
+
const e = t.indexOf("{");
|
|
1779
|
+
if (e === -1)
|
|
1780
|
+
return !1;
|
|
1781
|
+
const r = t.indexOf("}", e + 1);
|
|
1782
|
+
if (r === -1)
|
|
1783
|
+
return !1;
|
|
1784
|
+
const n = t.slice(e, r);
|
|
1785
|
+
return Gi.test(n);
|
|
1786
|
+
}
|
|
1787
|
+
function Vi(t) {
|
|
1788
|
+
return ze(t) ? t.slice(1) : t;
|
|
1789
|
+
}
|
|
1790
|
+
E.convertToPositivePattern = Vi;
|
|
1791
|
+
function Ki(t) {
|
|
1792
|
+
return "!" + t;
|
|
1793
|
+
}
|
|
1794
|
+
E.convertToNegativePattern = Ki;
|
|
1795
|
+
function ze(t) {
|
|
1796
|
+
return t.startsWith("!") && t[1] !== "(";
|
|
1797
|
+
}
|
|
1798
|
+
E.isNegativePattern = ze;
|
|
1799
|
+
function cn(t) {
|
|
1800
|
+
return !ze(t);
|
|
1801
|
+
}
|
|
1802
|
+
E.isPositivePattern = cn;
|
|
1803
|
+
function qi(t) {
|
|
1804
|
+
return t.filter(ze);
|
|
1805
|
+
}
|
|
1806
|
+
E.getNegativePatterns = qi;
|
|
1807
|
+
function Qi(t) {
|
|
1808
|
+
return t.filter(cn);
|
|
1809
|
+
}
|
|
1810
|
+
E.getPositivePatterns = Qi;
|
|
1811
|
+
function Yi(t) {
|
|
1812
|
+
return t.filter((e) => !Ut(e));
|
|
1813
|
+
}
|
|
1814
|
+
E.getPatternsInsideCurrentDirectory = Yi;
|
|
1815
|
+
function Xi(t) {
|
|
1816
|
+
return t.filter(Ut);
|
|
1817
|
+
}
|
|
1818
|
+
E.getPatternsOutsideCurrentDirectory = Xi;
|
|
1819
|
+
function Ut(t) {
|
|
1820
|
+
return t.startsWith("..") || t.startsWith("./..");
|
|
1821
|
+
}
|
|
1822
|
+
E.isPatternRelatedToParentDirectory = Ut;
|
|
1823
|
+
function Zi(t) {
|
|
1824
|
+
return Mi(t, { flipBackslashes: !1 });
|
|
1825
|
+
}
|
|
1826
|
+
E.getBaseDirectory = Zi;
|
|
1827
|
+
function zi(t) {
|
|
1828
|
+
return t.includes(an);
|
|
1829
|
+
}
|
|
1830
|
+
E.hasGlobStar = zi;
|
|
1831
|
+
function ln(t) {
|
|
1832
|
+
return t.endsWith("/" + an);
|
|
1833
|
+
}
|
|
1834
|
+
E.endsWithSlashGlobStar = ln;
|
|
1835
|
+
function Ji(t) {
|
|
1836
|
+
const e = Hi.basename(t);
|
|
1837
|
+
return ln(t) || on(e);
|
|
1838
|
+
}
|
|
1839
|
+
E.isAffectDepthOfReadingPattern = Ji;
|
|
1840
|
+
function ea(t) {
|
|
1841
|
+
return t.reduce((e, r) => e.concat(fn(r)), []);
|
|
1842
|
+
}
|
|
1843
|
+
E.expandPatternsWithBraceExpansion = ea;
|
|
1844
|
+
function fn(t) {
|
|
1845
|
+
const e = Gt.braces(t, { expand: !0, nodupes: !0, keepEscaping: !0 });
|
|
1846
|
+
return e.sort((r, n) => r.length - n.length), e.filter((r) => r !== "");
|
|
1847
|
+
}
|
|
1848
|
+
E.expandBraceExpansion = fn;
|
|
1849
|
+
function ta(t, e) {
|
|
1850
|
+
let { parts: r } = Gt.scan(t, Object.assign(Object.assign({}, e), { parts: !0 }));
|
|
1851
|
+
return r.length === 0 && (r = [t]), r[0].startsWith("/") && (r[0] = r[0].slice(1), r.unshift("")), r;
|
|
1852
|
+
}
|
|
1853
|
+
E.getPatternParts = ta;
|
|
1854
|
+
function pn(t, e) {
|
|
1855
|
+
return Gt.makeRe(t, e);
|
|
1856
|
+
}
|
|
1857
|
+
E.makeRe = pn;
|
|
1858
|
+
function ra(t, e) {
|
|
1859
|
+
return t.map((r) => pn(r, e));
|
|
1860
|
+
}
|
|
1861
|
+
E.convertPatternsToRe = ra;
|
|
1862
|
+
function na(t, e) {
|
|
1863
|
+
return e.some((r) => r.test(t));
|
|
1864
|
+
}
|
|
1865
|
+
E.matchAny = na;
|
|
1866
|
+
function sa(t) {
|
|
1867
|
+
return t.replace(Ui, "/");
|
|
1868
|
+
}
|
|
1869
|
+
E.removeDuplicateSlashes = sa;
|
|
1870
|
+
var Je = {};
|
|
1871
|
+
const ia = Ke, hn = ia.PassThrough, aa = Array.prototype.slice;
|
|
1872
|
+
var oa = ua;
|
|
1873
|
+
function ua() {
|
|
1874
|
+
const t = [], e = aa.call(arguments);
|
|
1875
|
+
let r = !1, n = e[e.length - 1];
|
|
1876
|
+
n && !Array.isArray(n) && n.pipe == null ? e.pop() : n = {};
|
|
1877
|
+
const s = n.end !== !1, a = n.pipeError === !0;
|
|
1878
|
+
n.objectMode == null && (n.objectMode = !0), n.highWaterMark == null && (n.highWaterMark = 64 * 1024);
|
|
1879
|
+
const i = hn(n);
|
|
1880
|
+
function o() {
|
|
1881
|
+
for (let c = 0, _ = arguments.length; c < _; c++)
|
|
1882
|
+
t.push(dn(arguments[c], n));
|
|
1883
|
+
return u(), this;
|
|
1884
|
+
}
|
|
1885
|
+
function u() {
|
|
1886
|
+
if (r)
|
|
1887
|
+
return;
|
|
1888
|
+
r = !0;
|
|
1889
|
+
let c = t.shift();
|
|
1890
|
+
if (!c) {
|
|
1891
|
+
process.nextTick(h);
|
|
1892
|
+
return;
|
|
1893
|
+
}
|
|
1894
|
+
Array.isArray(c) || (c = [c]);
|
|
1895
|
+
let _ = c.length + 1;
|
|
1896
|
+
function f() {
|
|
1897
|
+
--_ > 0 || (r = !1, u());
|
|
1898
|
+
}
|
|
1899
|
+
function $(g) {
|
|
1900
|
+
function m() {
|
|
1901
|
+
g.removeListener("merge2UnpipeEnd", m), g.removeListener("end", m), a && g.removeListener("error", P), f();
|
|
1902
|
+
}
|
|
1903
|
+
function P(A) {
|
|
1904
|
+
i.emit("error", A);
|
|
1905
|
+
}
|
|
1906
|
+
if (g._readableState.endEmitted)
|
|
1907
|
+
return f();
|
|
1908
|
+
g.on("merge2UnpipeEnd", m), g.on("end", m), a && g.on("error", P), g.pipe(i, { end: !1 }), g.resume();
|
|
1909
|
+
}
|
|
1910
|
+
for (let g = 0; g < c.length; g++)
|
|
1911
|
+
$(c[g]);
|
|
1912
|
+
f();
|
|
1913
|
+
}
|
|
1914
|
+
function h() {
|
|
1915
|
+
r = !1, i.emit("queueDrain"), s && i.end();
|
|
1916
|
+
}
|
|
1917
|
+
return i.setMaxListeners(0), i.add = o, i.on("unpipe", function(c) {
|
|
1918
|
+
c.emit("merge2UnpipeEnd");
|
|
1919
|
+
}), e.length && o.apply(null, e), i;
|
|
1920
|
+
}
|
|
1921
|
+
function dn(t, e) {
|
|
1922
|
+
if (Array.isArray(t))
|
|
1923
|
+
for (let r = 0, n = t.length; r < n; r++)
|
|
1924
|
+
t[r] = dn(t[r], e);
|
|
1925
|
+
else {
|
|
1926
|
+
if (!t._readableState && t.pipe && (t = t.pipe(hn(e))), !t._readableState || !t.pause || !t.pipe)
|
|
1927
|
+
throw new Error("Only readable stream can be merged.");
|
|
1928
|
+
t.pause();
|
|
1929
|
+
}
|
|
1930
|
+
return t;
|
|
1931
|
+
}
|
|
1932
|
+
Object.defineProperty(Je, "__esModule", { value: !0 });
|
|
1933
|
+
Je.merge = void 0;
|
|
1934
|
+
const ca = oa;
|
|
1935
|
+
function la(t) {
|
|
1936
|
+
const e = ca(t);
|
|
1937
|
+
return t.forEach((r) => {
|
|
1938
|
+
r.once("error", (n) => e.emit("error", n));
|
|
1939
|
+
}), e.once("close", () => kr(t)), e.once("end", () => kr(t)), e;
|
|
1940
|
+
}
|
|
1941
|
+
Je.merge = la;
|
|
1942
|
+
function kr(t) {
|
|
1943
|
+
t.forEach((e) => e.emit("close"));
|
|
1944
|
+
}
|
|
1945
|
+
var Ae = {};
|
|
1946
|
+
Object.defineProperty(Ae, "__esModule", { value: !0 });
|
|
1947
|
+
Ae.isEmpty = Ae.isString = void 0;
|
|
1948
|
+
function fa(t) {
|
|
1949
|
+
return typeof t == "string";
|
|
1950
|
+
}
|
|
1951
|
+
Ae.isString = fa;
|
|
1952
|
+
function pa(t) {
|
|
1953
|
+
return t === "";
|
|
1954
|
+
}
|
|
1955
|
+
Ae.isEmpty = pa;
|
|
1956
|
+
Object.defineProperty(F, "__esModule", { value: !0 });
|
|
1957
|
+
F.string = F.stream = F.pattern = F.path = F.fs = F.errno = F.array = void 0;
|
|
1958
|
+
const ha = Se;
|
|
1959
|
+
F.array = ha;
|
|
1960
|
+
const da = qe;
|
|
1961
|
+
F.errno = da;
|
|
1962
|
+
const _a = Qe;
|
|
1963
|
+
F.fs = _a;
|
|
1964
|
+
const ga = G;
|
|
1965
|
+
F.path = ga;
|
|
1966
|
+
const ya = E;
|
|
1967
|
+
F.pattern = ya;
|
|
1968
|
+
const ma = Je;
|
|
1969
|
+
F.stream = ma;
|
|
1970
|
+
const va = Ae;
|
|
1971
|
+
F.string = va;
|
|
1972
|
+
Object.defineProperty(V, "__esModule", { value: !0 });
|
|
1973
|
+
V.convertPatternGroupToTask = V.convertPatternGroupsToTasks = V.groupPatternsByBaseDirectory = V.getNegativePatternsAsPositive = V.getPositivePatterns = V.convertPatternsToTasks = V.generate = void 0;
|
|
1974
|
+
const se = F;
|
|
1975
|
+
function Sa(t, e) {
|
|
1976
|
+
const r = Lr(t, e), n = Lr(e.ignore, e), s = _n(r), a = gn(r, n), i = s.filter((c) => se.pattern.isStaticPattern(c, e)), o = s.filter((c) => se.pattern.isDynamicPattern(c, e)), u = At(
|
|
1977
|
+
i,
|
|
1978
|
+
a,
|
|
1979
|
+
/* dynamic */
|
|
1980
|
+
!1
|
|
1981
|
+
), h = At(
|
|
1982
|
+
o,
|
|
1983
|
+
a,
|
|
1984
|
+
/* dynamic */
|
|
1985
|
+
!0
|
|
1986
|
+
);
|
|
1987
|
+
return u.concat(h);
|
|
1988
|
+
}
|
|
1989
|
+
V.generate = Sa;
|
|
1990
|
+
function Lr(t, e) {
|
|
1991
|
+
let r = t;
|
|
1992
|
+
return e.braceExpansion && (r = se.pattern.expandPatternsWithBraceExpansion(r)), e.baseNameMatch && (r = r.map((n) => n.includes("/") ? n : `**/${n}`)), r.map((n) => se.pattern.removeDuplicateSlashes(n));
|
|
1993
|
+
}
|
|
1994
|
+
function At(t, e, r) {
|
|
1995
|
+
const n = [], s = se.pattern.getPatternsOutsideCurrentDirectory(t), a = se.pattern.getPatternsInsideCurrentDirectory(t), i = Et(s), o = Et(a);
|
|
1996
|
+
return n.push(...Rt(i, e, r)), "." in o ? n.push(Wt(".", a, e, r)) : n.push(...Rt(o, e, r)), n;
|
|
1997
|
+
}
|
|
1998
|
+
V.convertPatternsToTasks = At;
|
|
1999
|
+
function _n(t) {
|
|
2000
|
+
return se.pattern.getPositivePatterns(t);
|
|
2001
|
+
}
|
|
2002
|
+
V.getPositivePatterns = _n;
|
|
2003
|
+
function gn(t, e) {
|
|
2004
|
+
return se.pattern.getNegativePatterns(t).concat(e).map(se.pattern.convertToPositivePattern);
|
|
2005
|
+
}
|
|
2006
|
+
V.getNegativePatternsAsPositive = gn;
|
|
2007
|
+
function Et(t) {
|
|
2008
|
+
const e = {};
|
|
2009
|
+
return t.reduce((r, n) => {
|
|
2010
|
+
const s = se.pattern.getBaseDirectory(n);
|
|
2011
|
+
return s in r ? r[s].push(n) : r[s] = [n], r;
|
|
2012
|
+
}, e);
|
|
2013
|
+
}
|
|
2014
|
+
V.groupPatternsByBaseDirectory = Et;
|
|
2015
|
+
function Rt(t, e, r) {
|
|
2016
|
+
return Object.keys(t).map((n) => Wt(n, t[n], e, r));
|
|
2017
|
+
}
|
|
2018
|
+
V.convertPatternGroupsToTasks = Rt;
|
|
2019
|
+
function Wt(t, e, r, n) {
|
|
2020
|
+
return {
|
|
2021
|
+
dynamic: n,
|
|
2022
|
+
positive: e,
|
|
2023
|
+
negative: r,
|
|
2024
|
+
base: t,
|
|
2025
|
+
patterns: [].concat(e, r.map(se.pattern.convertToNegativePattern))
|
|
2026
|
+
};
|
|
2027
|
+
}
|
|
2028
|
+
V.convertPatternGroupToTask = Wt;
|
|
2029
|
+
var Vt = {}, Kt = {}, te = {}, qt = {}, et = {}, ue = {}, pe = {}, Z = {}, tt = {};
|
|
2030
|
+
Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
2031
|
+
tt.read = void 0;
|
|
2032
|
+
function Aa(t, e, r) {
|
|
2033
|
+
e.fs.lstat(t, (n, s) => {
|
|
2034
|
+
if (n !== null) {
|
|
2035
|
+
Dr(r, n);
|
|
2036
|
+
return;
|
|
2037
|
+
}
|
|
2038
|
+
if (!s.isSymbolicLink() || !e.followSymbolicLink) {
|
|
2039
|
+
yt(r, s);
|
|
2040
|
+
return;
|
|
2041
|
+
}
|
|
2042
|
+
e.fs.stat(t, (a, i) => {
|
|
2043
|
+
if (a !== null) {
|
|
2044
|
+
if (e.throwErrorOnBrokenSymbolicLink) {
|
|
2045
|
+
Dr(r, a);
|
|
2046
|
+
return;
|
|
2047
|
+
}
|
|
2048
|
+
yt(r, s);
|
|
2049
|
+
return;
|
|
2050
|
+
}
|
|
2051
|
+
e.markSymbolicLink && (i.isSymbolicLink = () => !0), yt(r, i);
|
|
2052
|
+
});
|
|
2053
|
+
});
|
|
2054
|
+
}
|
|
2055
|
+
tt.read = Aa;
|
|
2056
|
+
function Dr(t, e) {
|
|
2057
|
+
t(e);
|
|
2058
|
+
}
|
|
2059
|
+
function yt(t, e) {
|
|
2060
|
+
t(null, e);
|
|
2061
|
+
}
|
|
2062
|
+
var rt = {};
|
|
2063
|
+
Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
2064
|
+
rt.read = void 0;
|
|
2065
|
+
function Ea(t, e) {
|
|
2066
|
+
const r = e.fs.lstatSync(t);
|
|
2067
|
+
if (!r.isSymbolicLink() || !e.followSymbolicLink)
|
|
2068
|
+
return r;
|
|
2069
|
+
try {
|
|
2070
|
+
const n = e.fs.statSync(t);
|
|
2071
|
+
return e.markSymbolicLink && (n.isSymbolicLink = () => !0), n;
|
|
2072
|
+
} catch (n) {
|
|
2073
|
+
if (!e.throwErrorOnBrokenSymbolicLink)
|
|
2074
|
+
return r;
|
|
2075
|
+
throw n;
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
rt.read = Ea;
|
|
2079
|
+
var Qt = {}, yn = {};
|
|
2080
|
+
(function(t) {
|
|
2081
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.createFileSystemAdapter = t.FILE_SYSTEM_ADAPTER = void 0;
|
|
2082
|
+
const e = Lt;
|
|
2083
|
+
t.FILE_SYSTEM_ADAPTER = {
|
|
2084
|
+
lstat: e.lstat,
|
|
2085
|
+
stat: e.stat,
|
|
2086
|
+
lstatSync: e.lstatSync,
|
|
2087
|
+
statSync: e.statSync
|
|
2088
|
+
};
|
|
2089
|
+
function r(n) {
|
|
2090
|
+
return n === void 0 ? t.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, t.FILE_SYSTEM_ADAPTER), n);
|
|
2091
|
+
}
|
|
2092
|
+
t.createFileSystemAdapter = r;
|
|
2093
|
+
})(yn);
|
|
2094
|
+
Object.defineProperty(Qt, "__esModule", { value: !0 });
|
|
2095
|
+
const Ra = yn;
|
|
2096
|
+
let $a = class {
|
|
2097
|
+
constructor(e = {}) {
|
|
2098
|
+
this._options = e, this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, !0), this.fs = Ra.createFileSystemAdapter(this._options.fs), this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0);
|
|
2099
|
+
}
|
|
2100
|
+
_getValue(e, r) {
|
|
2101
|
+
return e ?? r;
|
|
2102
|
+
}
|
|
2103
|
+
};
|
|
2104
|
+
Qt.default = $a;
|
|
2105
|
+
Object.defineProperty(Z, "__esModule", { value: !0 });
|
|
2106
|
+
Z.statSync = Z.stat = Z.Settings = void 0;
|
|
2107
|
+
const Hr = tt, Pa = rt, $t = Qt;
|
|
2108
|
+
Z.Settings = $t.default;
|
|
2109
|
+
function ba(t, e, r) {
|
|
2110
|
+
if (typeof e == "function") {
|
|
2111
|
+
Hr.read(t, Pt(), e);
|
|
2112
|
+
return;
|
|
2113
|
+
}
|
|
2114
|
+
Hr.read(t, Pt(e), r);
|
|
2115
|
+
}
|
|
2116
|
+
Z.stat = ba;
|
|
2117
|
+
function Ca(t, e) {
|
|
2118
|
+
const r = Pt(e);
|
|
2119
|
+
return Pa.read(t, r);
|
|
2120
|
+
}
|
|
2121
|
+
Z.statSync = Ca;
|
|
2122
|
+
function Pt(t = {}) {
|
|
2123
|
+
return t instanceof $t.default ? t : new $t.default(t);
|
|
2124
|
+
}
|
|
2125
|
+
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2126
|
+
let Mr;
|
|
2127
|
+
var xa = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window < "u" ? window : In) : (t) => (Mr || (Mr = Promise.resolve())).then(t).catch((e) => setTimeout(() => {
|
|
2128
|
+
throw e;
|
|
2129
|
+
}, 0));
|
|
2130
|
+
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2131
|
+
var Ta = Oa;
|
|
2132
|
+
const wa = xa;
|
|
2133
|
+
function Oa(t, e) {
|
|
2134
|
+
let r, n, s, a = !0;
|
|
2135
|
+
Array.isArray(t) ? (r = [], n = t.length) : (s = Object.keys(t), r = {}, n = s.length);
|
|
2136
|
+
function i(u) {
|
|
2137
|
+
function h() {
|
|
2138
|
+
e && e(u, r), e = null;
|
|
2139
|
+
}
|
|
2140
|
+
a ? wa(h) : h();
|
|
2141
|
+
}
|
|
2142
|
+
function o(u, h, c) {
|
|
2143
|
+
r[u] = c, (--n === 0 || h) && i(h);
|
|
2144
|
+
}
|
|
2145
|
+
n ? s ? s.forEach(function(u) {
|
|
2146
|
+
t[u](function(h, c) {
|
|
2147
|
+
o(u, h, c);
|
|
2148
|
+
});
|
|
2149
|
+
}) : t.forEach(function(u, h) {
|
|
2150
|
+
u(function(c, _) {
|
|
2151
|
+
o(h, c, _);
|
|
2152
|
+
});
|
|
2153
|
+
}) : i(null), a = !1;
|
|
2154
|
+
}
|
|
2155
|
+
var be = {};
|
|
2156
|
+
Object.defineProperty(be, "__esModule", { value: !0 });
|
|
2157
|
+
be.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
|
2158
|
+
const Ue = process.versions.node.split(".");
|
|
2159
|
+
if (Ue[0] === void 0 || Ue[1] === void 0)
|
|
2160
|
+
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
|
|
2161
|
+
const mn = Number.parseInt(Ue[0], 10), ka = Number.parseInt(Ue[1], 10), vn = 10, La = 10, Da = mn > vn, Ha = mn === vn && ka >= La;
|
|
2162
|
+
be.IS_SUPPORT_READDIR_WITH_FILE_TYPES = Da || Ha;
|
|
2163
|
+
var Ce = {}, nt = {};
|
|
2164
|
+
Object.defineProperty(nt, "__esModule", { value: !0 });
|
|
2165
|
+
nt.createDirentFromStats = void 0;
|
|
2166
|
+
class Ma {
|
|
2167
|
+
constructor(e, r) {
|
|
2168
|
+
this.name = e, this.isBlockDevice = r.isBlockDevice.bind(r), this.isCharacterDevice = r.isCharacterDevice.bind(r), this.isDirectory = r.isDirectory.bind(r), this.isFIFO = r.isFIFO.bind(r), this.isFile = r.isFile.bind(r), this.isSocket = r.isSocket.bind(r), this.isSymbolicLink = r.isSymbolicLink.bind(r);
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
function Ia(t, e) {
|
|
2172
|
+
return new Ma(t, e);
|
|
2173
|
+
}
|
|
2174
|
+
nt.createDirentFromStats = Ia;
|
|
2175
|
+
Object.defineProperty(Ce, "__esModule", { value: !0 });
|
|
2176
|
+
Ce.fs = void 0;
|
|
2177
|
+
const Na = nt;
|
|
2178
|
+
Ce.fs = Na;
|
|
2179
|
+
var xe = {};
|
|
2180
|
+
Object.defineProperty(xe, "__esModule", { value: !0 });
|
|
2181
|
+
xe.joinPathSegments = void 0;
|
|
2182
|
+
function Fa(t, e, r) {
|
|
2183
|
+
return t.endsWith(r) ? t + e : t + r + e;
|
|
2184
|
+
}
|
|
2185
|
+
xe.joinPathSegments = Fa;
|
|
2186
|
+
Object.defineProperty(pe, "__esModule", { value: !0 });
|
|
2187
|
+
pe.readdir = pe.readdirWithFileTypes = pe.read = void 0;
|
|
2188
|
+
const Ba = Z, Sn = Ta, ja = be, An = Ce, En = xe;
|
|
2189
|
+
function Ga(t, e, r) {
|
|
2190
|
+
if (!e.stats && ja.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
2191
|
+
Rn(t, e, r);
|
|
2192
|
+
return;
|
|
2193
|
+
}
|
|
2194
|
+
$n(t, e, r);
|
|
2195
|
+
}
|
|
2196
|
+
pe.read = Ga;
|
|
2197
|
+
function Rn(t, e, r) {
|
|
2198
|
+
e.fs.readdir(t, { withFileTypes: !0 }, (n, s) => {
|
|
2199
|
+
if (n !== null) {
|
|
2200
|
+
We(r, n);
|
|
2201
|
+
return;
|
|
2202
|
+
}
|
|
2203
|
+
const a = s.map((o) => ({
|
|
2204
|
+
dirent: o,
|
|
2205
|
+
name: o.name,
|
|
2206
|
+
path: En.joinPathSegments(t, o.name, e.pathSegmentSeparator)
|
|
2207
|
+
}));
|
|
2208
|
+
if (!e.followSymbolicLinks) {
|
|
2209
|
+
bt(r, a);
|
|
2210
|
+
return;
|
|
2211
|
+
}
|
|
2212
|
+
const i = a.map((o) => Ua(o, e));
|
|
2213
|
+
Sn(i, (o, u) => {
|
|
2214
|
+
if (o !== null) {
|
|
2215
|
+
We(r, o);
|
|
2216
|
+
return;
|
|
2217
|
+
}
|
|
2218
|
+
bt(r, u);
|
|
2219
|
+
});
|
|
2220
|
+
});
|
|
2221
|
+
}
|
|
2222
|
+
pe.readdirWithFileTypes = Rn;
|
|
2223
|
+
function Ua(t, e) {
|
|
2224
|
+
return (r) => {
|
|
2225
|
+
if (!t.dirent.isSymbolicLink()) {
|
|
2226
|
+
r(null, t);
|
|
2227
|
+
return;
|
|
2228
|
+
}
|
|
2229
|
+
e.fs.stat(t.path, (n, s) => {
|
|
2230
|
+
if (n !== null) {
|
|
2231
|
+
if (e.throwErrorOnBrokenSymbolicLink) {
|
|
2232
|
+
r(n);
|
|
2233
|
+
return;
|
|
2234
|
+
}
|
|
2235
|
+
r(null, t);
|
|
2236
|
+
return;
|
|
2237
|
+
}
|
|
2238
|
+
t.dirent = An.fs.createDirentFromStats(t.name, s), r(null, t);
|
|
2239
|
+
});
|
|
2240
|
+
};
|
|
2241
|
+
}
|
|
2242
|
+
function $n(t, e, r) {
|
|
2243
|
+
e.fs.readdir(t, (n, s) => {
|
|
2244
|
+
if (n !== null) {
|
|
2245
|
+
We(r, n);
|
|
2246
|
+
return;
|
|
2247
|
+
}
|
|
2248
|
+
const a = s.map((i) => {
|
|
2249
|
+
const o = En.joinPathSegments(t, i, e.pathSegmentSeparator);
|
|
2250
|
+
return (u) => {
|
|
2251
|
+
Ba.stat(o, e.fsStatSettings, (h, c) => {
|
|
2252
|
+
if (h !== null) {
|
|
2253
|
+
u(h);
|
|
2254
|
+
return;
|
|
2255
|
+
}
|
|
2256
|
+
const _ = {
|
|
2257
|
+
name: i,
|
|
2258
|
+
path: o,
|
|
2259
|
+
dirent: An.fs.createDirentFromStats(i, c)
|
|
2260
|
+
};
|
|
2261
|
+
e.stats && (_.stats = c), u(null, _);
|
|
2262
|
+
});
|
|
2263
|
+
};
|
|
2264
|
+
});
|
|
2265
|
+
Sn(a, (i, o) => {
|
|
2266
|
+
if (i !== null) {
|
|
2267
|
+
We(r, i);
|
|
2268
|
+
return;
|
|
2269
|
+
}
|
|
2270
|
+
bt(r, o);
|
|
2271
|
+
});
|
|
2272
|
+
});
|
|
2273
|
+
}
|
|
2274
|
+
pe.readdir = $n;
|
|
2275
|
+
function We(t, e) {
|
|
2276
|
+
t(e);
|
|
2277
|
+
}
|
|
2278
|
+
function bt(t, e) {
|
|
2279
|
+
t(null, e);
|
|
2280
|
+
}
|
|
2281
|
+
var he = {};
|
|
2282
|
+
Object.defineProperty(he, "__esModule", { value: !0 });
|
|
2283
|
+
he.readdir = he.readdirWithFileTypes = he.read = void 0;
|
|
2284
|
+
const Wa = Z, Va = be, Pn = Ce, bn = xe;
|
|
2285
|
+
function Ka(t, e) {
|
|
2286
|
+
return !e.stats && Va.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? Cn(t, e) : xn(t, e);
|
|
2287
|
+
}
|
|
2288
|
+
he.read = Ka;
|
|
2289
|
+
function Cn(t, e) {
|
|
2290
|
+
return e.fs.readdirSync(t, { withFileTypes: !0 }).map((n) => {
|
|
2291
|
+
const s = {
|
|
2292
|
+
dirent: n,
|
|
2293
|
+
name: n.name,
|
|
2294
|
+
path: bn.joinPathSegments(t, n.name, e.pathSegmentSeparator)
|
|
2295
|
+
};
|
|
2296
|
+
if (s.dirent.isSymbolicLink() && e.followSymbolicLinks)
|
|
2297
|
+
try {
|
|
2298
|
+
const a = e.fs.statSync(s.path);
|
|
2299
|
+
s.dirent = Pn.fs.createDirentFromStats(s.name, a);
|
|
2300
|
+
} catch (a) {
|
|
2301
|
+
if (e.throwErrorOnBrokenSymbolicLink)
|
|
2302
|
+
throw a;
|
|
2303
|
+
}
|
|
2304
|
+
return s;
|
|
2305
|
+
});
|
|
2306
|
+
}
|
|
2307
|
+
he.readdirWithFileTypes = Cn;
|
|
2308
|
+
function xn(t, e) {
|
|
2309
|
+
return e.fs.readdirSync(t).map((n) => {
|
|
2310
|
+
const s = bn.joinPathSegments(t, n, e.pathSegmentSeparator), a = Wa.statSync(s, e.fsStatSettings), i = {
|
|
2311
|
+
name: n,
|
|
2312
|
+
path: s,
|
|
2313
|
+
dirent: Pn.fs.createDirentFromStats(n, a)
|
|
2314
|
+
};
|
|
2315
|
+
return e.stats && (i.stats = a), i;
|
|
2316
|
+
});
|
|
2317
|
+
}
|
|
2318
|
+
he.readdir = xn;
|
|
2319
|
+
var Yt = {}, Tn = {};
|
|
2320
|
+
(function(t) {
|
|
2321
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.createFileSystemAdapter = t.FILE_SYSTEM_ADAPTER = void 0;
|
|
2322
|
+
const e = Lt;
|
|
2323
|
+
t.FILE_SYSTEM_ADAPTER = {
|
|
2324
|
+
lstat: e.lstat,
|
|
2325
|
+
stat: e.stat,
|
|
2326
|
+
lstatSync: e.lstatSync,
|
|
2327
|
+
statSync: e.statSync,
|
|
2328
|
+
readdir: e.readdir,
|
|
2329
|
+
readdirSync: e.readdirSync
|
|
2330
|
+
};
|
|
2331
|
+
function r(n) {
|
|
2332
|
+
return n === void 0 ? t.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, t.FILE_SYSTEM_ADAPTER), n);
|
|
2333
|
+
}
|
|
2334
|
+
t.createFileSystemAdapter = r;
|
|
2335
|
+
})(Tn);
|
|
2336
|
+
Object.defineProperty(Yt, "__esModule", { value: !0 });
|
|
2337
|
+
const qa = k, Qa = Z, Ya = Tn;
|
|
2338
|
+
let Xa = class {
|
|
2339
|
+
constructor(e = {}) {
|
|
2340
|
+
this._options = e, this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !1), this.fs = Ya.createFileSystemAdapter(this._options.fs), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, qa.sep), this.stats = this._getValue(this._options.stats, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0), this.fsStatSettings = new Qa.Settings({
|
|
2341
|
+
followSymbolicLink: this.followSymbolicLinks,
|
|
2342
|
+
fs: this.fs,
|
|
2343
|
+
throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
|
|
2344
|
+
});
|
|
2345
|
+
}
|
|
2346
|
+
_getValue(e, r) {
|
|
2347
|
+
return e ?? r;
|
|
2348
|
+
}
|
|
2349
|
+
};
|
|
2350
|
+
Yt.default = Xa;
|
|
2351
|
+
Object.defineProperty(ue, "__esModule", { value: !0 });
|
|
2352
|
+
ue.Settings = ue.scandirSync = ue.scandir = void 0;
|
|
2353
|
+
const Ir = pe, Za = he, Ct = Yt;
|
|
2354
|
+
ue.Settings = Ct.default;
|
|
2355
|
+
function za(t, e, r) {
|
|
2356
|
+
if (typeof e == "function") {
|
|
2357
|
+
Ir.read(t, xt(), e);
|
|
2358
|
+
return;
|
|
2359
|
+
}
|
|
2360
|
+
Ir.read(t, xt(e), r);
|
|
2361
|
+
}
|
|
2362
|
+
ue.scandir = za;
|
|
2363
|
+
function Ja(t, e) {
|
|
2364
|
+
const r = xt(e);
|
|
2365
|
+
return Za.read(t, r);
|
|
2366
|
+
}
|
|
2367
|
+
ue.scandirSync = Ja;
|
|
2368
|
+
function xt(t = {}) {
|
|
2369
|
+
return t instanceof Ct.default ? t : new Ct.default(t);
|
|
2370
|
+
}
|
|
2371
|
+
var Xt = { exports: {} };
|
|
2372
|
+
function eo(t) {
|
|
2373
|
+
var e = new t(), r = e;
|
|
2374
|
+
function n() {
|
|
2375
|
+
var a = e;
|
|
2376
|
+
return a.next ? e = a.next : (e = new t(), r = e), a.next = null, a;
|
|
2377
|
+
}
|
|
2378
|
+
function s(a) {
|
|
2379
|
+
r.next = a, r = a;
|
|
2380
|
+
}
|
|
2381
|
+
return {
|
|
2382
|
+
get: n,
|
|
2383
|
+
release: s
|
|
2384
|
+
};
|
|
2385
|
+
}
|
|
2386
|
+
var to = eo, ro = to;
|
|
2387
|
+
function wn(t, e, r) {
|
|
2388
|
+
if (typeof t == "function" && (r = e, e = t, t = null), !(r >= 1))
|
|
2389
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2390
|
+
var n = ro(no), s = null, a = null, i = 0, o = null, u = {
|
|
2391
|
+
push: m,
|
|
2392
|
+
drain: ee,
|
|
2393
|
+
saturated: ee,
|
|
2394
|
+
pause: c,
|
|
2395
|
+
paused: !1,
|
|
2396
|
+
get concurrency() {
|
|
2397
|
+
return r;
|
|
2398
|
+
},
|
|
2399
|
+
set concurrency(x) {
|
|
2400
|
+
if (!(x >= 1))
|
|
2401
|
+
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2402
|
+
if (r = x, !u.paused)
|
|
2403
|
+
for (; s && i < r; )
|
|
2404
|
+
i++, A();
|
|
2405
|
+
},
|
|
2406
|
+
running: h,
|
|
2407
|
+
resume: $,
|
|
2408
|
+
idle: g,
|
|
2409
|
+
length: _,
|
|
2410
|
+
getQueue: f,
|
|
2411
|
+
unshift: P,
|
|
2412
|
+
empty: ee,
|
|
2413
|
+
kill: B,
|
|
2414
|
+
killAndDrain: v,
|
|
2415
|
+
error: z
|
|
2416
|
+
};
|
|
2417
|
+
return u;
|
|
2418
|
+
function h() {
|
|
2419
|
+
return i;
|
|
2420
|
+
}
|
|
2421
|
+
function c() {
|
|
2422
|
+
u.paused = !0;
|
|
2423
|
+
}
|
|
2424
|
+
function _() {
|
|
2425
|
+
for (var x = s, H = 0; x; )
|
|
2426
|
+
x = x.next, H++;
|
|
2427
|
+
return H;
|
|
2428
|
+
}
|
|
2429
|
+
function f() {
|
|
2430
|
+
for (var x = s, H = []; x; )
|
|
2431
|
+
H.push(x.value), x = x.next;
|
|
2432
|
+
return H;
|
|
2433
|
+
}
|
|
2434
|
+
function $() {
|
|
2435
|
+
if (u.paused) {
|
|
2436
|
+
if (u.paused = !1, s === null) {
|
|
2437
|
+
i++, A();
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
for (; s && i < r; )
|
|
2441
|
+
i++, A();
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
function g() {
|
|
2445
|
+
return i === 0 && u.length() === 0;
|
|
2446
|
+
}
|
|
2447
|
+
function m(x, H) {
|
|
2448
|
+
var b = n.get();
|
|
2449
|
+
b.context = t, b.release = A, b.value = x, b.callback = H || ee, b.errorHandler = o, i >= r || u.paused ? a ? (a.next = b, a = b) : (s = b, a = b, u.saturated()) : (i++, e.call(t, b.value, b.worked));
|
|
2450
|
+
}
|
|
2451
|
+
function P(x, H) {
|
|
2452
|
+
var b = n.get();
|
|
2453
|
+
b.context = t, b.release = A, b.value = x, b.callback = H || ee, b.errorHandler = o, i >= r || u.paused ? s ? (b.next = s, s = b) : (s = b, a = b, u.saturated()) : (i++, e.call(t, b.value, b.worked));
|
|
2454
|
+
}
|
|
2455
|
+
function A(x) {
|
|
2456
|
+
x && n.release(x);
|
|
2457
|
+
var H = s;
|
|
2458
|
+
H && i <= r ? u.paused ? i-- : (a === s && (a = null), s = H.next, H.next = null, e.call(t, H.value, H.worked), a === null && u.empty()) : --i === 0 && u.drain();
|
|
2459
|
+
}
|
|
2460
|
+
function B() {
|
|
2461
|
+
s = null, a = null, u.drain = ee;
|
|
2462
|
+
}
|
|
2463
|
+
function v() {
|
|
2464
|
+
s = null, a = null, u.drain(), u.drain = ee;
|
|
2465
|
+
}
|
|
2466
|
+
function z(x) {
|
|
2467
|
+
o = x;
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
function ee() {
|
|
2471
|
+
}
|
|
2472
|
+
function no() {
|
|
2473
|
+
this.value = null, this.callback = ee, this.next = null, this.release = ee, this.context = null, this.errorHandler = null;
|
|
2474
|
+
var t = this;
|
|
2475
|
+
this.worked = function(r, n) {
|
|
2476
|
+
var s = t.callback, a = t.errorHandler, i = t.value;
|
|
2477
|
+
t.value = null, t.callback = ee, t.errorHandler && a(r, i), s.call(t.context, r, n), t.release(t);
|
|
2478
|
+
};
|
|
2479
|
+
}
|
|
2480
|
+
function so(t, e, r) {
|
|
2481
|
+
typeof t == "function" && (r = e, e = t, t = null);
|
|
2482
|
+
function n(c, _) {
|
|
2483
|
+
e.call(this, c).then(function(f) {
|
|
2484
|
+
_(null, f);
|
|
2485
|
+
}, _);
|
|
2486
|
+
}
|
|
2487
|
+
var s = wn(t, n, r), a = s.push, i = s.unshift;
|
|
2488
|
+
return s.push = o, s.unshift = u, s.drained = h, s;
|
|
2489
|
+
function o(c) {
|
|
2490
|
+
var _ = new Promise(function(f, $) {
|
|
2491
|
+
a(c, function(g, m) {
|
|
2492
|
+
if (g) {
|
|
2493
|
+
$(g);
|
|
2494
|
+
return;
|
|
2495
|
+
}
|
|
2496
|
+
f(m);
|
|
2497
|
+
});
|
|
2498
|
+
});
|
|
2499
|
+
return _.catch(ee), _;
|
|
2500
|
+
}
|
|
2501
|
+
function u(c) {
|
|
2502
|
+
var _ = new Promise(function(f, $) {
|
|
2503
|
+
i(c, function(g, m) {
|
|
2504
|
+
if (g) {
|
|
2505
|
+
$(g);
|
|
2506
|
+
return;
|
|
2507
|
+
}
|
|
2508
|
+
f(m);
|
|
2509
|
+
});
|
|
2510
|
+
});
|
|
2511
|
+
return _.catch(ee), _;
|
|
2512
|
+
}
|
|
2513
|
+
function h() {
|
|
2514
|
+
if (s.idle())
|
|
2515
|
+
return new Promise(function(f) {
|
|
2516
|
+
f();
|
|
2517
|
+
});
|
|
2518
|
+
var c = s.drain, _ = new Promise(function(f) {
|
|
2519
|
+
s.drain = function() {
|
|
2520
|
+
c(), f();
|
|
2521
|
+
};
|
|
2522
|
+
});
|
|
2523
|
+
return _;
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
Xt.exports = wn;
|
|
2527
|
+
Xt.exports.promise = so;
|
|
2528
|
+
var io = Xt.exports, re = {};
|
|
2529
|
+
Object.defineProperty(re, "__esModule", { value: !0 });
|
|
2530
|
+
re.joinPathSegments = re.replacePathSegmentSeparator = re.isAppliedFilter = re.isFatalError = void 0;
|
|
2531
|
+
function ao(t, e) {
|
|
2532
|
+
return t.errorFilter === null ? !0 : !t.errorFilter(e);
|
|
2533
|
+
}
|
|
2534
|
+
re.isFatalError = ao;
|
|
2535
|
+
function oo(t, e) {
|
|
2536
|
+
return t === null || t(e);
|
|
2537
|
+
}
|
|
2538
|
+
re.isAppliedFilter = oo;
|
|
2539
|
+
function uo(t, e) {
|
|
2540
|
+
return t.split(/[/\\]/).join(e);
|
|
2541
|
+
}
|
|
2542
|
+
re.replacePathSegmentSeparator = uo;
|
|
2543
|
+
function co(t, e, r) {
|
|
2544
|
+
return t === "" ? e : t.endsWith(r) ? t + e : t + r + e;
|
|
2545
|
+
}
|
|
2546
|
+
re.joinPathSegments = co;
|
|
2547
|
+
var st = {};
|
|
2548
|
+
Object.defineProperty(st, "__esModule", { value: !0 });
|
|
2549
|
+
const lo = re;
|
|
2550
|
+
let fo = class {
|
|
2551
|
+
constructor(e, r) {
|
|
2552
|
+
this._root = e, this._settings = r, this._root = lo.replacePathSegmentSeparator(e, r.pathSegmentSeparator);
|
|
2553
|
+
}
|
|
2554
|
+
};
|
|
2555
|
+
st.default = fo;
|
|
2556
|
+
Object.defineProperty(et, "__esModule", { value: !0 });
|
|
2557
|
+
const po = Bn, ho = ue, _o = io, He = re, go = st;
|
|
2558
|
+
class yo extends go.default {
|
|
2559
|
+
constructor(e, r) {
|
|
2560
|
+
super(e, r), this._settings = r, this._scandir = ho.scandir, this._emitter = new po.EventEmitter(), this._queue = _o(this._worker.bind(this), this._settings.concurrency), this._isFatalError = !1, this._isDestroyed = !1, this._queue.drain = () => {
|
|
2561
|
+
this._isFatalError || this._emitter.emit("end");
|
|
2562
|
+
};
|
|
2563
|
+
}
|
|
2564
|
+
read() {
|
|
2565
|
+
return this._isFatalError = !1, this._isDestroyed = !1, setImmediate(() => {
|
|
2566
|
+
this._pushToQueue(this._root, this._settings.basePath);
|
|
2567
|
+
}), this._emitter;
|
|
2568
|
+
}
|
|
2569
|
+
get isDestroyed() {
|
|
2570
|
+
return this._isDestroyed;
|
|
2571
|
+
}
|
|
2572
|
+
destroy() {
|
|
2573
|
+
if (this._isDestroyed)
|
|
2574
|
+
throw new Error("The reader is already destroyed");
|
|
2575
|
+
this._isDestroyed = !0, this._queue.killAndDrain();
|
|
2576
|
+
}
|
|
2577
|
+
onEntry(e) {
|
|
2578
|
+
this._emitter.on("entry", e);
|
|
2579
|
+
}
|
|
2580
|
+
onError(e) {
|
|
2581
|
+
this._emitter.once("error", e);
|
|
2582
|
+
}
|
|
2583
|
+
onEnd(e) {
|
|
2584
|
+
this._emitter.once("end", e);
|
|
2585
|
+
}
|
|
2586
|
+
_pushToQueue(e, r) {
|
|
2587
|
+
const n = { directory: e, base: r };
|
|
2588
|
+
this._queue.push(n, (s) => {
|
|
2589
|
+
s !== null && this._handleError(s);
|
|
2590
|
+
});
|
|
2591
|
+
}
|
|
2592
|
+
_worker(e, r) {
|
|
2593
|
+
this._scandir(e.directory, this._settings.fsScandirSettings, (n, s) => {
|
|
2594
|
+
if (n !== null) {
|
|
2595
|
+
r(n, void 0);
|
|
2596
|
+
return;
|
|
2597
|
+
}
|
|
2598
|
+
for (const a of s)
|
|
2599
|
+
this._handleEntry(a, e.base);
|
|
2600
|
+
r(null, void 0);
|
|
2601
|
+
});
|
|
2602
|
+
}
|
|
2603
|
+
_handleError(e) {
|
|
2604
|
+
this._isDestroyed || !He.isFatalError(this._settings, e) || (this._isFatalError = !0, this._isDestroyed = !0, this._emitter.emit("error", e));
|
|
2605
|
+
}
|
|
2606
|
+
_handleEntry(e, r) {
|
|
2607
|
+
if (this._isDestroyed || this._isFatalError)
|
|
2608
|
+
return;
|
|
2609
|
+
const n = e.path;
|
|
2610
|
+
r !== void 0 && (e.path = He.joinPathSegments(r, e.name, this._settings.pathSegmentSeparator)), He.isAppliedFilter(this._settings.entryFilter, e) && this._emitEntry(e), e.dirent.isDirectory() && He.isAppliedFilter(this._settings.deepFilter, e) && this._pushToQueue(n, r === void 0 ? void 0 : e.path);
|
|
2611
|
+
}
|
|
2612
|
+
_emitEntry(e) {
|
|
2613
|
+
this._emitter.emit("entry", e);
|
|
2614
|
+
}
|
|
2615
|
+
}
|
|
2616
|
+
et.default = yo;
|
|
2617
|
+
Object.defineProperty(qt, "__esModule", { value: !0 });
|
|
2618
|
+
const mo = et;
|
|
2619
|
+
class vo {
|
|
2620
|
+
constructor(e, r) {
|
|
2621
|
+
this._root = e, this._settings = r, this._reader = new mo.default(this._root, this._settings), this._storage = [];
|
|
2622
|
+
}
|
|
2623
|
+
read(e) {
|
|
2624
|
+
this._reader.onError((r) => {
|
|
2625
|
+
So(e, r);
|
|
2626
|
+
}), this._reader.onEntry((r) => {
|
|
2627
|
+
this._storage.push(r);
|
|
2628
|
+
}), this._reader.onEnd(() => {
|
|
2629
|
+
Ao(e, this._storage);
|
|
2630
|
+
}), this._reader.read();
|
|
2631
|
+
}
|
|
2632
|
+
}
|
|
2633
|
+
qt.default = vo;
|
|
2634
|
+
function So(t, e) {
|
|
2635
|
+
t(e);
|
|
2636
|
+
}
|
|
2637
|
+
function Ao(t, e) {
|
|
2638
|
+
t(null, e);
|
|
2639
|
+
}
|
|
2640
|
+
var Zt = {};
|
|
2641
|
+
Object.defineProperty(Zt, "__esModule", { value: !0 });
|
|
2642
|
+
const Eo = Ke, Ro = et;
|
|
2643
|
+
class $o {
|
|
2644
|
+
constructor(e, r) {
|
|
2645
|
+
this._root = e, this._settings = r, this._reader = new Ro.default(this._root, this._settings), this._stream = new Eo.Readable({
|
|
2646
|
+
objectMode: !0,
|
|
2647
|
+
read: () => {
|
|
2648
|
+
},
|
|
2649
|
+
destroy: () => {
|
|
2650
|
+
this._reader.isDestroyed || this._reader.destroy();
|
|
2651
|
+
}
|
|
2652
|
+
});
|
|
2653
|
+
}
|
|
2654
|
+
read() {
|
|
2655
|
+
return this._reader.onError((e) => {
|
|
2656
|
+
this._stream.emit("error", e);
|
|
2657
|
+
}), this._reader.onEntry((e) => {
|
|
2658
|
+
this._stream.push(e);
|
|
2659
|
+
}), this._reader.onEnd(() => {
|
|
2660
|
+
this._stream.push(null);
|
|
2661
|
+
}), this._reader.read(), this._stream;
|
|
2662
|
+
}
|
|
2663
|
+
}
|
|
2664
|
+
Zt.default = $o;
|
|
2665
|
+
var zt = {}, Jt = {};
|
|
2666
|
+
Object.defineProperty(Jt, "__esModule", { value: !0 });
|
|
2667
|
+
const Po = ue, Me = re, bo = st;
|
|
2668
|
+
class Co extends bo.default {
|
|
2669
|
+
constructor() {
|
|
2670
|
+
super(...arguments), this._scandir = Po.scandirSync, this._storage = [], this._queue = /* @__PURE__ */ new Set();
|
|
2671
|
+
}
|
|
2672
|
+
read() {
|
|
2673
|
+
return this._pushToQueue(this._root, this._settings.basePath), this._handleQueue(), this._storage;
|
|
2674
|
+
}
|
|
2675
|
+
_pushToQueue(e, r) {
|
|
2676
|
+
this._queue.add({ directory: e, base: r });
|
|
2677
|
+
}
|
|
2678
|
+
_handleQueue() {
|
|
2679
|
+
for (const e of this._queue.values())
|
|
2680
|
+
this._handleDirectory(e.directory, e.base);
|
|
2681
|
+
}
|
|
2682
|
+
_handleDirectory(e, r) {
|
|
2683
|
+
try {
|
|
2684
|
+
const n = this._scandir(e, this._settings.fsScandirSettings);
|
|
2685
|
+
for (const s of n)
|
|
2686
|
+
this._handleEntry(s, r);
|
|
2687
|
+
} catch (n) {
|
|
2688
|
+
this._handleError(n);
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
_handleError(e) {
|
|
2692
|
+
if (Me.isFatalError(this._settings, e))
|
|
2693
|
+
throw e;
|
|
2694
|
+
}
|
|
2695
|
+
_handleEntry(e, r) {
|
|
2696
|
+
const n = e.path;
|
|
2697
|
+
r !== void 0 && (e.path = Me.joinPathSegments(r, e.name, this._settings.pathSegmentSeparator)), Me.isAppliedFilter(this._settings.entryFilter, e) && this._pushToStorage(e), e.dirent.isDirectory() && Me.isAppliedFilter(this._settings.deepFilter, e) && this._pushToQueue(n, r === void 0 ? void 0 : e.path);
|
|
2698
|
+
}
|
|
2699
|
+
_pushToStorage(e) {
|
|
2700
|
+
this._storage.push(e);
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2703
|
+
Jt.default = Co;
|
|
2704
|
+
Object.defineProperty(zt, "__esModule", { value: !0 });
|
|
2705
|
+
const xo = Jt;
|
|
2706
|
+
class To {
|
|
2707
|
+
constructor(e, r) {
|
|
2708
|
+
this._root = e, this._settings = r, this._reader = new xo.default(this._root, this._settings);
|
|
2709
|
+
}
|
|
2710
|
+
read() {
|
|
2711
|
+
return this._reader.read();
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
zt.default = To;
|
|
2715
|
+
var er = {};
|
|
2716
|
+
Object.defineProperty(er, "__esModule", { value: !0 });
|
|
2717
|
+
const wo = k, Oo = ue;
|
|
2718
|
+
class ko {
|
|
2719
|
+
constructor(e = {}) {
|
|
2720
|
+
this._options = e, this.basePath = this._getValue(this._options.basePath, void 0), this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY), this.deepFilter = this._getValue(this._options.deepFilter, null), this.entryFilter = this._getValue(this._options.entryFilter, null), this.errorFilter = this._getValue(this._options.errorFilter, null), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, wo.sep), this.fsScandirSettings = new Oo.Settings({
|
|
2721
|
+
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
2722
|
+
fs: this._options.fs,
|
|
2723
|
+
pathSegmentSeparator: this._options.pathSegmentSeparator,
|
|
2724
|
+
stats: this._options.stats,
|
|
2725
|
+
throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
|
|
2726
|
+
});
|
|
2727
|
+
}
|
|
2728
|
+
_getValue(e, r) {
|
|
2729
|
+
return e ?? r;
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
er.default = ko;
|
|
2733
|
+
Object.defineProperty(te, "__esModule", { value: !0 });
|
|
2734
|
+
te.Settings = te.walkStream = te.walkSync = te.walk = void 0;
|
|
2735
|
+
const Nr = qt, Lo = Zt, Do = zt, Tt = er;
|
|
2736
|
+
te.Settings = Tt.default;
|
|
2737
|
+
function Ho(t, e, r) {
|
|
2738
|
+
if (typeof e == "function") {
|
|
2739
|
+
new Nr.default(t, Ve()).read(e);
|
|
2740
|
+
return;
|
|
2741
|
+
}
|
|
2742
|
+
new Nr.default(t, Ve(e)).read(r);
|
|
2743
|
+
}
|
|
2744
|
+
te.walk = Ho;
|
|
2745
|
+
function Mo(t, e) {
|
|
2746
|
+
const r = Ve(e);
|
|
2747
|
+
return new Do.default(t, r).read();
|
|
2748
|
+
}
|
|
2749
|
+
te.walkSync = Mo;
|
|
2750
|
+
function Io(t, e) {
|
|
2751
|
+
const r = Ve(e);
|
|
2752
|
+
return new Lo.default(t, r).read();
|
|
2753
|
+
}
|
|
2754
|
+
te.walkStream = Io;
|
|
2755
|
+
function Ve(t = {}) {
|
|
2756
|
+
return t instanceof Tt.default ? t : new Tt.default(t);
|
|
2757
|
+
}
|
|
2758
|
+
var Te = {};
|
|
2759
|
+
Object.defineProperty(Te, "__esModule", { value: !0 });
|
|
2760
|
+
const No = k, Fo = Z, Fr = F;
|
|
2761
|
+
class Bo {
|
|
2762
|
+
constructor(e) {
|
|
2763
|
+
this._settings = e, this._fsStatSettings = new Fo.Settings({
|
|
2764
|
+
followSymbolicLink: this._settings.followSymbolicLinks,
|
|
2765
|
+
fs: this._settings.fs,
|
|
2766
|
+
throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
|
|
2767
|
+
});
|
|
2768
|
+
}
|
|
2769
|
+
_getFullEntryPath(e) {
|
|
2770
|
+
return No.resolve(this._settings.cwd, e);
|
|
2771
|
+
}
|
|
2772
|
+
_makeEntry(e, r) {
|
|
2773
|
+
const n = {
|
|
2774
|
+
name: r,
|
|
2775
|
+
path: r,
|
|
2776
|
+
dirent: Fr.fs.createDirentFromStats(r, e)
|
|
2777
|
+
};
|
|
2778
|
+
return this._settings.stats && (n.stats = e), n;
|
|
2779
|
+
}
|
|
2780
|
+
_isFatalError(e) {
|
|
2781
|
+
return !Fr.errno.isEnoentCodeError(e) && !this._settings.suppressErrors;
|
|
2782
|
+
}
|
|
2783
|
+
}
|
|
2784
|
+
Te.default = Bo;
|
|
2785
|
+
var it = {};
|
|
2786
|
+
Object.defineProperty(it, "__esModule", { value: !0 });
|
|
2787
|
+
const jo = Ke, Go = Z, Uo = te, Wo = Te;
|
|
2788
|
+
class Vo extends Wo.default {
|
|
2789
|
+
constructor() {
|
|
2790
|
+
super(...arguments), this._walkStream = Uo.walkStream, this._stat = Go.stat;
|
|
2791
|
+
}
|
|
2792
|
+
dynamic(e, r) {
|
|
2793
|
+
return this._walkStream(e, r);
|
|
2794
|
+
}
|
|
2795
|
+
static(e, r) {
|
|
2796
|
+
const n = e.map(this._getFullEntryPath, this), s = new jo.PassThrough({ objectMode: !0 });
|
|
2797
|
+
s._write = (a, i, o) => this._getEntry(n[a], e[a], r).then((u) => {
|
|
2798
|
+
u !== null && r.entryFilter(u) && s.push(u), a === n.length - 1 && s.end(), o();
|
|
2799
|
+
}).catch(o);
|
|
2800
|
+
for (let a = 0; a < n.length; a++)
|
|
2801
|
+
s.write(a);
|
|
2802
|
+
return s;
|
|
2803
|
+
}
|
|
2804
|
+
_getEntry(e, r, n) {
|
|
2805
|
+
return this._getStat(e).then((s) => this._makeEntry(s, r)).catch((s) => {
|
|
2806
|
+
if (n.errorFilter(s))
|
|
2807
|
+
return null;
|
|
2808
|
+
throw s;
|
|
2809
|
+
});
|
|
2810
|
+
}
|
|
2811
|
+
_getStat(e) {
|
|
2812
|
+
return new Promise((r, n) => {
|
|
2813
|
+
this._stat(e, this._fsStatSettings, (s, a) => s === null ? r(a) : n(s));
|
|
2814
|
+
});
|
|
2815
|
+
}
|
|
2816
|
+
}
|
|
2817
|
+
it.default = Vo;
|
|
2818
|
+
Object.defineProperty(Kt, "__esModule", { value: !0 });
|
|
2819
|
+
const Ko = te, qo = Te, Qo = it;
|
|
2820
|
+
class Yo extends qo.default {
|
|
2821
|
+
constructor() {
|
|
2822
|
+
super(...arguments), this._walkAsync = Ko.walk, this._readerStream = new Qo.default(this._settings);
|
|
2823
|
+
}
|
|
2824
|
+
dynamic(e, r) {
|
|
2825
|
+
return new Promise((n, s) => {
|
|
2826
|
+
this._walkAsync(e, r, (a, i) => {
|
|
2827
|
+
a === null ? n(i) : s(a);
|
|
2828
|
+
});
|
|
2829
|
+
});
|
|
2830
|
+
}
|
|
2831
|
+
async static(e, r) {
|
|
2832
|
+
const n = [], s = this._readerStream.static(e, r);
|
|
2833
|
+
return new Promise((a, i) => {
|
|
2834
|
+
s.once("error", i), s.on("data", (o) => n.push(o)), s.once("end", () => a(n));
|
|
2835
|
+
});
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
Kt.default = Yo;
|
|
2839
|
+
var we = {}, tr = {}, rr = {}, nr = {};
|
|
2840
|
+
Object.defineProperty(nr, "__esModule", { value: !0 });
|
|
2841
|
+
const Ee = F;
|
|
2842
|
+
class Xo {
|
|
2843
|
+
constructor(e, r, n) {
|
|
2844
|
+
this._patterns = e, this._settings = r, this._micromatchOptions = n, this._storage = [], this._fillStorage();
|
|
2845
|
+
}
|
|
2846
|
+
_fillStorage() {
|
|
2847
|
+
for (const e of this._patterns) {
|
|
2848
|
+
const r = this._getPatternSegments(e), n = this._splitSegmentsIntoSections(r);
|
|
2849
|
+
this._storage.push({
|
|
2850
|
+
complete: n.length <= 1,
|
|
2851
|
+
pattern: e,
|
|
2852
|
+
segments: r,
|
|
2853
|
+
sections: n
|
|
2854
|
+
});
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
_getPatternSegments(e) {
|
|
2858
|
+
return Ee.pattern.getPatternParts(e, this._micromatchOptions).map((n) => Ee.pattern.isDynamicPattern(n, this._settings) ? {
|
|
2859
|
+
dynamic: !0,
|
|
2860
|
+
pattern: n,
|
|
2861
|
+
patternRe: Ee.pattern.makeRe(n, this._micromatchOptions)
|
|
2862
|
+
} : {
|
|
2863
|
+
dynamic: !1,
|
|
2864
|
+
pattern: n
|
|
2865
|
+
});
|
|
2866
|
+
}
|
|
2867
|
+
_splitSegmentsIntoSections(e) {
|
|
2868
|
+
return Ee.array.splitWhen(e, (r) => r.dynamic && Ee.pattern.hasGlobStar(r.pattern));
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
nr.default = Xo;
|
|
2872
|
+
Object.defineProperty(rr, "__esModule", { value: !0 });
|
|
2873
|
+
const Zo = nr;
|
|
2874
|
+
class zo extends Zo.default {
|
|
2875
|
+
match(e) {
|
|
2876
|
+
const r = e.split("/"), n = r.length, s = this._storage.filter((a) => !a.complete || a.segments.length > n);
|
|
2877
|
+
for (const a of s) {
|
|
2878
|
+
const i = a.sections[0];
|
|
2879
|
+
if (!a.complete && n > i.length || r.every((u, h) => {
|
|
2880
|
+
const c = a.segments[h];
|
|
2881
|
+
return !!(c.dynamic && c.patternRe.test(u) || !c.dynamic && c.pattern === u);
|
|
2882
|
+
}))
|
|
2883
|
+
return !0;
|
|
2884
|
+
}
|
|
2885
|
+
return !1;
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
rr.default = zo;
|
|
2889
|
+
Object.defineProperty(tr, "__esModule", { value: !0 });
|
|
2890
|
+
const Ie = F, Jo = rr;
|
|
2891
|
+
class eu {
|
|
2892
|
+
constructor(e, r) {
|
|
2893
|
+
this._settings = e, this._micromatchOptions = r;
|
|
2894
|
+
}
|
|
2895
|
+
getFilter(e, r, n) {
|
|
2896
|
+
const s = this._getMatcher(r), a = this._getNegativePatternsRe(n);
|
|
2897
|
+
return (i) => this._filter(e, i, s, a);
|
|
2898
|
+
}
|
|
2899
|
+
_getMatcher(e) {
|
|
2900
|
+
return new Jo.default(e, this._settings, this._micromatchOptions);
|
|
2901
|
+
}
|
|
2902
|
+
_getNegativePatternsRe(e) {
|
|
2903
|
+
const r = e.filter(Ie.pattern.isAffectDepthOfReadingPattern);
|
|
2904
|
+
return Ie.pattern.convertPatternsToRe(r, this._micromatchOptions);
|
|
2905
|
+
}
|
|
2906
|
+
_filter(e, r, n, s) {
|
|
2907
|
+
if (this._isSkippedByDeep(e, r.path) || this._isSkippedSymbolicLink(r))
|
|
2908
|
+
return !1;
|
|
2909
|
+
const a = Ie.path.removeLeadingDotSegment(r.path);
|
|
2910
|
+
return this._isSkippedByPositivePatterns(a, n) ? !1 : this._isSkippedByNegativePatterns(a, s);
|
|
2911
|
+
}
|
|
2912
|
+
_isSkippedByDeep(e, r) {
|
|
2913
|
+
return this._settings.deep === 1 / 0 ? !1 : this._getEntryLevel(e, r) >= this._settings.deep;
|
|
2914
|
+
}
|
|
2915
|
+
_getEntryLevel(e, r) {
|
|
2916
|
+
const n = r.split("/").length;
|
|
2917
|
+
if (e === "")
|
|
2918
|
+
return n;
|
|
2919
|
+
const s = e.split("/").length;
|
|
2920
|
+
return n - s;
|
|
2921
|
+
}
|
|
2922
|
+
_isSkippedSymbolicLink(e) {
|
|
2923
|
+
return !this._settings.followSymbolicLinks && e.dirent.isSymbolicLink();
|
|
2924
|
+
}
|
|
2925
|
+
_isSkippedByPositivePatterns(e, r) {
|
|
2926
|
+
return !this._settings.baseNameMatch && !r.match(e);
|
|
2927
|
+
}
|
|
2928
|
+
_isSkippedByNegativePatterns(e, r) {
|
|
2929
|
+
return !Ie.pattern.matchAny(e, r);
|
|
2930
|
+
}
|
|
2931
|
+
}
|
|
2932
|
+
tr.default = eu;
|
|
2933
|
+
var sr = {};
|
|
2934
|
+
Object.defineProperty(sr, "__esModule", { value: !0 });
|
|
2935
|
+
const _e = F;
|
|
2936
|
+
class tu {
|
|
2937
|
+
constructor(e, r) {
|
|
2938
|
+
this._settings = e, this._micromatchOptions = r, this.index = /* @__PURE__ */ new Map();
|
|
2939
|
+
}
|
|
2940
|
+
getFilter(e, r) {
|
|
2941
|
+
const n = _e.pattern.convertPatternsToRe(e, this._micromatchOptions), s = _e.pattern.convertPatternsToRe(r, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 }));
|
|
2942
|
+
return (a) => this._filter(a, n, s);
|
|
2943
|
+
}
|
|
2944
|
+
_filter(e, r, n) {
|
|
2945
|
+
const s = _e.path.removeLeadingDotSegment(e.path);
|
|
2946
|
+
if (this._settings.unique && this._isDuplicateEntry(s) || this._onlyFileFilter(e) || this._onlyDirectoryFilter(e) || this._isSkippedByAbsoluteNegativePatterns(s, n))
|
|
2947
|
+
return !1;
|
|
2948
|
+
const a = e.dirent.isDirectory(), i = this._isMatchToPatterns(s, r, a) && !this._isMatchToPatterns(s, n, a);
|
|
2949
|
+
return this._settings.unique && i && this._createIndexRecord(s), i;
|
|
2950
|
+
}
|
|
2951
|
+
_isDuplicateEntry(e) {
|
|
2952
|
+
return this.index.has(e);
|
|
2953
|
+
}
|
|
2954
|
+
_createIndexRecord(e) {
|
|
2955
|
+
this.index.set(e, void 0);
|
|
2956
|
+
}
|
|
2957
|
+
_onlyFileFilter(e) {
|
|
2958
|
+
return this._settings.onlyFiles && !e.dirent.isFile();
|
|
2959
|
+
}
|
|
2960
|
+
_onlyDirectoryFilter(e) {
|
|
2961
|
+
return this._settings.onlyDirectories && !e.dirent.isDirectory();
|
|
2962
|
+
}
|
|
2963
|
+
_isSkippedByAbsoluteNegativePatterns(e, r) {
|
|
2964
|
+
if (!this._settings.absolute)
|
|
2965
|
+
return !1;
|
|
2966
|
+
const n = _e.path.makeAbsolute(this._settings.cwd, e);
|
|
2967
|
+
return _e.pattern.matchAny(n, r);
|
|
2968
|
+
}
|
|
2969
|
+
_isMatchToPatterns(e, r, n) {
|
|
2970
|
+
const s = _e.pattern.matchAny(e, r);
|
|
2971
|
+
return !s && n ? _e.pattern.matchAny(e + "/", r) : s;
|
|
2972
|
+
}
|
|
2973
|
+
}
|
|
2974
|
+
sr.default = tu;
|
|
2975
|
+
var ir = {};
|
|
2976
|
+
Object.defineProperty(ir, "__esModule", { value: !0 });
|
|
2977
|
+
const ru = F;
|
|
2978
|
+
class nu {
|
|
2979
|
+
constructor(e) {
|
|
2980
|
+
this._settings = e;
|
|
2981
|
+
}
|
|
2982
|
+
getFilter() {
|
|
2983
|
+
return (e) => this._isNonFatalError(e);
|
|
2984
|
+
}
|
|
2985
|
+
_isNonFatalError(e) {
|
|
2986
|
+
return ru.errno.isEnoentCodeError(e) || this._settings.suppressErrors;
|
|
2987
|
+
}
|
|
2988
|
+
}
|
|
2989
|
+
ir.default = nu;
|
|
2990
|
+
var ar = {};
|
|
2991
|
+
Object.defineProperty(ar, "__esModule", { value: !0 });
|
|
2992
|
+
const Br = F;
|
|
2993
|
+
class su {
|
|
2994
|
+
constructor(e) {
|
|
2995
|
+
this._settings = e;
|
|
2996
|
+
}
|
|
2997
|
+
getTransformer() {
|
|
2998
|
+
return (e) => this._transform(e);
|
|
2999
|
+
}
|
|
3000
|
+
_transform(e) {
|
|
3001
|
+
let r = e.path;
|
|
3002
|
+
return this._settings.absolute && (r = Br.path.makeAbsolute(this._settings.cwd, r), r = Br.path.unixify(r)), this._settings.markDirectories && e.dirent.isDirectory() && (r += "/"), this._settings.objectMode ? Object.assign(Object.assign({}, e), { path: r }) : r;
|
|
3003
|
+
}
|
|
3004
|
+
}
|
|
3005
|
+
ar.default = su;
|
|
3006
|
+
Object.defineProperty(we, "__esModule", { value: !0 });
|
|
3007
|
+
const iu = k, au = tr, ou = sr, uu = ir, cu = ar;
|
|
3008
|
+
class lu {
|
|
3009
|
+
constructor(e) {
|
|
3010
|
+
this._settings = e, this.errorFilter = new uu.default(this._settings), this.entryFilter = new ou.default(this._settings, this._getMicromatchOptions()), this.deepFilter = new au.default(this._settings, this._getMicromatchOptions()), this.entryTransformer = new cu.default(this._settings);
|
|
3011
|
+
}
|
|
3012
|
+
_getRootDirectory(e) {
|
|
3013
|
+
return iu.resolve(this._settings.cwd, e.base);
|
|
3014
|
+
}
|
|
3015
|
+
_getReaderOptions(e) {
|
|
3016
|
+
const r = e.base === "." ? "" : e.base;
|
|
3017
|
+
return {
|
|
3018
|
+
basePath: r,
|
|
3019
|
+
pathSegmentSeparator: "/",
|
|
3020
|
+
concurrency: this._settings.concurrency,
|
|
3021
|
+
deepFilter: this.deepFilter.getFilter(r, e.positive, e.negative),
|
|
3022
|
+
entryFilter: this.entryFilter.getFilter(e.positive, e.negative),
|
|
3023
|
+
errorFilter: this.errorFilter.getFilter(),
|
|
3024
|
+
followSymbolicLinks: this._settings.followSymbolicLinks,
|
|
3025
|
+
fs: this._settings.fs,
|
|
3026
|
+
stats: this._settings.stats,
|
|
3027
|
+
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
|
|
3028
|
+
transform: this.entryTransformer.getTransformer()
|
|
3029
|
+
};
|
|
3030
|
+
}
|
|
3031
|
+
_getMicromatchOptions() {
|
|
3032
|
+
return {
|
|
3033
|
+
dot: this._settings.dot,
|
|
3034
|
+
matchBase: this._settings.baseNameMatch,
|
|
3035
|
+
nobrace: !this._settings.braceExpansion,
|
|
3036
|
+
nocase: !this._settings.caseSensitiveMatch,
|
|
3037
|
+
noext: !this._settings.extglob,
|
|
3038
|
+
noglobstar: !this._settings.globstar,
|
|
3039
|
+
posix: !0,
|
|
3040
|
+
strictSlashes: !1
|
|
3041
|
+
};
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
we.default = lu;
|
|
3045
|
+
Object.defineProperty(Vt, "__esModule", { value: !0 });
|
|
3046
|
+
const fu = Kt, pu = we;
|
|
3047
|
+
class hu extends pu.default {
|
|
3048
|
+
constructor() {
|
|
3049
|
+
super(...arguments), this._reader = new fu.default(this._settings);
|
|
3050
|
+
}
|
|
3051
|
+
async read(e) {
|
|
3052
|
+
const r = this._getRootDirectory(e), n = this._getReaderOptions(e);
|
|
3053
|
+
return (await this.api(r, e, n)).map((a) => n.transform(a));
|
|
3054
|
+
}
|
|
3055
|
+
api(e, r, n) {
|
|
3056
|
+
return r.dynamic ? this._reader.dynamic(e, n) : this._reader.static(r.patterns, n);
|
|
3057
|
+
}
|
|
3058
|
+
}
|
|
3059
|
+
Vt.default = hu;
|
|
3060
|
+
var or = {};
|
|
3061
|
+
Object.defineProperty(or, "__esModule", { value: !0 });
|
|
3062
|
+
const du = Ke, _u = it, gu = we;
|
|
3063
|
+
class yu extends gu.default {
|
|
3064
|
+
constructor() {
|
|
3065
|
+
super(...arguments), this._reader = new _u.default(this._settings);
|
|
3066
|
+
}
|
|
3067
|
+
read(e) {
|
|
3068
|
+
const r = this._getRootDirectory(e), n = this._getReaderOptions(e), s = this.api(r, e, n), a = new du.Readable({ objectMode: !0, read: () => {
|
|
3069
|
+
} });
|
|
3070
|
+
return s.once("error", (i) => a.emit("error", i)).on("data", (i) => a.emit("data", n.transform(i))).once("end", () => a.emit("end")), a.once("close", () => s.destroy()), a;
|
|
3071
|
+
}
|
|
3072
|
+
api(e, r, n) {
|
|
3073
|
+
return r.dynamic ? this._reader.dynamic(e, n) : this._reader.static(r.patterns, n);
|
|
3074
|
+
}
|
|
3075
|
+
}
|
|
3076
|
+
or.default = yu;
|
|
3077
|
+
var ur = {}, cr = {};
|
|
3078
|
+
Object.defineProperty(cr, "__esModule", { value: !0 });
|
|
3079
|
+
const mu = Z, vu = te, Su = Te;
|
|
3080
|
+
class Au extends Su.default {
|
|
3081
|
+
constructor() {
|
|
3082
|
+
super(...arguments), this._walkSync = vu.walkSync, this._statSync = mu.statSync;
|
|
3083
|
+
}
|
|
3084
|
+
dynamic(e, r) {
|
|
3085
|
+
return this._walkSync(e, r);
|
|
3086
|
+
}
|
|
3087
|
+
static(e, r) {
|
|
3088
|
+
const n = [];
|
|
3089
|
+
for (const s of e) {
|
|
3090
|
+
const a = this._getFullEntryPath(s), i = this._getEntry(a, s, r);
|
|
3091
|
+
i === null || !r.entryFilter(i) || n.push(i);
|
|
3092
|
+
}
|
|
3093
|
+
return n;
|
|
3094
|
+
}
|
|
3095
|
+
_getEntry(e, r, n) {
|
|
3096
|
+
try {
|
|
3097
|
+
const s = this._getStat(e);
|
|
3098
|
+
return this._makeEntry(s, r);
|
|
3099
|
+
} catch (s) {
|
|
3100
|
+
if (n.errorFilter(s))
|
|
3101
|
+
return null;
|
|
3102
|
+
throw s;
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
_getStat(e) {
|
|
3106
|
+
return this._statSync(e, this._fsStatSettings);
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
cr.default = Au;
|
|
3110
|
+
Object.defineProperty(ur, "__esModule", { value: !0 });
|
|
3111
|
+
const Eu = cr, Ru = we;
|
|
3112
|
+
class $u extends Ru.default {
|
|
3113
|
+
constructor() {
|
|
3114
|
+
super(...arguments), this._reader = new Eu.default(this._settings);
|
|
3115
|
+
}
|
|
3116
|
+
read(e) {
|
|
3117
|
+
const r = this._getRootDirectory(e), n = this._getReaderOptions(e);
|
|
3118
|
+
return this.api(r, e, n).map(n.transform);
|
|
3119
|
+
}
|
|
3120
|
+
api(e, r, n) {
|
|
3121
|
+
return r.dynamic ? this._reader.dynamic(e, n) : this._reader.static(r.patterns, n);
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
ur.default = $u;
|
|
3125
|
+
var On = {};
|
|
3126
|
+
(function(t) {
|
|
3127
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
3128
|
+
const e = Lt, n = Math.max(Dt.cpus().length, 1);
|
|
3129
|
+
t.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
3130
|
+
lstat: e.lstat,
|
|
3131
|
+
lstatSync: e.lstatSync,
|
|
3132
|
+
stat: e.stat,
|
|
3133
|
+
statSync: e.statSync,
|
|
3134
|
+
readdir: e.readdir,
|
|
3135
|
+
readdirSync: e.readdirSync
|
|
3136
|
+
};
|
|
3137
|
+
class s {
|
|
3138
|
+
constructor(i = {}) {
|
|
3139
|
+
this._options = i, this.absolute = this._getValue(this._options.absolute, !1), this.baseNameMatch = this._getValue(this._options.baseNameMatch, !1), this.braceExpansion = this._getValue(this._options.braceExpansion, !0), this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, !0), this.concurrency = this._getValue(this._options.concurrency, n), this.cwd = this._getValue(this._options.cwd, process.cwd()), this.deep = this._getValue(this._options.deep, 1 / 0), this.dot = this._getValue(this._options.dot, !1), this.extglob = this._getValue(this._options.extglob, !0), this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !0), this.fs = this._getFileSystemMethods(this._options.fs), this.globstar = this._getValue(this._options.globstar, !0), this.ignore = this._getValue(this._options.ignore, []), this.markDirectories = this._getValue(this._options.markDirectories, !1), this.objectMode = this._getValue(this._options.objectMode, !1), this.onlyDirectories = this._getValue(this._options.onlyDirectories, !1), this.onlyFiles = this._getValue(this._options.onlyFiles, !0), this.stats = this._getValue(this._options.stats, !1), this.suppressErrors = this._getValue(this._options.suppressErrors, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !1), this.unique = this._getValue(this._options.unique, !0), this.onlyDirectories && (this.onlyFiles = !1), this.stats && (this.objectMode = !0), this.ignore = [].concat(this.ignore);
|
|
3140
|
+
}
|
|
3141
|
+
_getValue(i, o) {
|
|
3142
|
+
return i === void 0 ? o : i;
|
|
3143
|
+
}
|
|
3144
|
+
_getFileSystemMethods(i = {}) {
|
|
3145
|
+
return Object.assign(Object.assign({}, t.DEFAULT_FILE_SYSTEM_ADAPTER), i);
|
|
3146
|
+
}
|
|
3147
|
+
}
|
|
3148
|
+
t.default = s;
|
|
3149
|
+
})(On);
|
|
3150
|
+
const kn = V, Pu = Vt, bu = or, Cu = ur, wt = On, J = F;
|
|
3151
|
+
async function Ot(t, e) {
|
|
3152
|
+
ne(t);
|
|
3153
|
+
const r = kt(t, Pu.default, e), n = await Promise.all(r);
|
|
3154
|
+
return J.array.flatten(n);
|
|
3155
|
+
}
|
|
3156
|
+
(function(t) {
|
|
3157
|
+
t.glob = t, t.globSync = e, t.globStream = r, t.async = t;
|
|
3158
|
+
function e(o, u) {
|
|
3159
|
+
ne(o);
|
|
3160
|
+
const h = kt(o, Cu.default, u);
|
|
3161
|
+
return J.array.flatten(h);
|
|
3162
|
+
}
|
|
3163
|
+
t.sync = e;
|
|
3164
|
+
function r(o, u) {
|
|
3165
|
+
ne(o);
|
|
3166
|
+
const h = kt(o, bu.default, u);
|
|
3167
|
+
return J.stream.merge(h);
|
|
3168
|
+
}
|
|
3169
|
+
t.stream = r;
|
|
3170
|
+
function n(o, u) {
|
|
3171
|
+
ne(o);
|
|
3172
|
+
const h = [].concat(o), c = new wt.default(u);
|
|
3173
|
+
return kn.generate(h, c);
|
|
3174
|
+
}
|
|
3175
|
+
t.generateTasks = n;
|
|
3176
|
+
function s(o, u) {
|
|
3177
|
+
ne(o);
|
|
3178
|
+
const h = new wt.default(u);
|
|
3179
|
+
return J.pattern.isDynamicPattern(o, h);
|
|
3180
|
+
}
|
|
3181
|
+
t.isDynamicPattern = s;
|
|
3182
|
+
function a(o) {
|
|
3183
|
+
return ne(o), J.path.escape(o);
|
|
3184
|
+
}
|
|
3185
|
+
t.escapePath = a;
|
|
3186
|
+
function i(o) {
|
|
3187
|
+
return ne(o), J.path.convertPathToPattern(o);
|
|
3188
|
+
}
|
|
3189
|
+
t.convertPathToPattern = i, function(o) {
|
|
3190
|
+
function u(c) {
|
|
3191
|
+
return ne(c), J.path.escapePosixPath(c);
|
|
3192
|
+
}
|
|
3193
|
+
o.escapePath = u;
|
|
3194
|
+
function h(c) {
|
|
3195
|
+
return ne(c), J.path.convertPosixPathToPattern(c);
|
|
3196
|
+
}
|
|
3197
|
+
o.convertPathToPattern = h;
|
|
3198
|
+
}(t.posix || (t.posix = {})), function(o) {
|
|
3199
|
+
function u(c) {
|
|
3200
|
+
return ne(c), J.path.escapeWindowsPath(c);
|
|
3201
|
+
}
|
|
3202
|
+
o.escapePath = u;
|
|
3203
|
+
function h(c) {
|
|
3204
|
+
return ne(c), J.path.convertWindowsPathToPattern(c);
|
|
3205
|
+
}
|
|
3206
|
+
o.convertPathToPattern = h;
|
|
3207
|
+
}(t.win32 || (t.win32 = {}));
|
|
3208
|
+
})(Ot || (Ot = {}));
|
|
3209
|
+
function kt(t, e, r) {
|
|
3210
|
+
const n = [].concat(t), s = new wt.default(r), a = kn.generate(n, s), i = new e(s);
|
|
3211
|
+
return a.map(i.read, i);
|
|
3212
|
+
}
|
|
3213
|
+
function ne(t) {
|
|
3214
|
+
if (![].concat(t).every((n) => J.string.isString(n) && !J.string.isEmpty(n)))
|
|
3215
|
+
throw new TypeError("Patterns must be a string (non empty) or an array of strings");
|
|
3216
|
+
}
|
|
3217
|
+
var Fe = Ot;
|
|
3218
|
+
const mt = /* @__PURE__ */ Nn(Fe), xu = `declare module 'soonjs:auto/client' {
|
|
28
3219
|
import '.soonjs/src/types';
|
|
29
3220
|
import type { Context, SoonFetchOptions, Meta } from '.soonjs/node_modules/soonjs';
|
|
30
3221
|
import { z, ZodType } from 'zod';
|
|
@@ -119,34 +3310,94 @@ import Lt,{existsSync as Hn,rmSync as Mn}from"fs";import k from"path";import{c a
|
|
|
119
3310
|
useApi,
|
|
120
3311
|
}
|
|
121
3312
|
}
|
|
122
|
-
`,Tu
|
|
3313
|
+
`, Tu = `declare module 'soonjs:auto/server' {
|
|
123
3314
|
export const apis: any[];
|
|
124
3315
|
export const middleware: any;
|
|
125
3316
|
export const baseUrl: string;
|
|
126
3317
|
export const init: any;
|
|
127
3318
|
}
|
|
128
|
-
`,wu
|
|
3319
|
+
`, wu = `$$$services-imports$$$
|
|
129
3320
|
|
|
130
3321
|
declare module 'soonjs' {
|
|
131
3322
|
interface ServiceContext {
|
|
132
3323
|
$$$services-content$$$
|
|
133
3324
|
}
|
|
134
|
-
}`;
|
|
3325
|
+
}`;
|
|
3326
|
+
function Gu(t) {
|
|
3327
|
+
let e = !1;
|
|
3328
|
+
const r = process.cwd(), n = (t == null ? void 0 : t.apisDir) || "./src/api", s = k.join(r, n);
|
|
3329
|
+
let a = [];
|
|
3330
|
+
const i = "./auto", o = k.join(r, i);
|
|
3331
|
+
let u = [];
|
|
3332
|
+
const h = (t == null ? void 0 : t.servicesDir) || "./src/service", c = k.join(r, h);
|
|
3333
|
+
let _ = [];
|
|
3334
|
+
const f = (t == null ? void 0 : t.importDirResolve) ?? ((A) => A.replace(/^(\.\/src\/|src\/)/, "~/")), $ = "soonjs:auto/server", g = "\0" + $, m = Fn();
|
|
3335
|
+
let P;
|
|
3336
|
+
return {
|
|
3337
|
+
name: "vite-plugin-soon-server",
|
|
3338
|
+
configureServer(A) {
|
|
3339
|
+
P = A;
|
|
3340
|
+
},
|
|
3341
|
+
config(A, B) {
|
|
3342
|
+
B.command === "build" && (e = !0);
|
|
3343
|
+
},
|
|
3344
|
+
closeBundle() {
|
|
3345
|
+
try {
|
|
3346
|
+
const A = (t == null ? void 0 : t.entryPath) || "./dist/entry.js";
|
|
3347
|
+
t != null && t.removeEntry && e && Hn(A) && Mn(A);
|
|
3348
|
+
} catch {
|
|
3349
|
+
}
|
|
3350
|
+
},
|
|
3351
|
+
watchChange(A, B) {
|
|
3352
|
+
(B.event === "create" || B.event === "delete") && (!k.relative(s, A).startsWith("..") || !k.relative(c, A).startsWith("..") || !k.relative(o, A).startsWith("..")) && (P == null || P.moduleGraph.invalidateModule(P == null ? void 0 : P.moduleGraph.getModuleById(g)), P == null || P.ws.send({
|
|
3353
|
+
type: "full-reload"
|
|
3354
|
+
}));
|
|
3355
|
+
},
|
|
3356
|
+
resolveId(A) {
|
|
3357
|
+
if (A === $)
|
|
3358
|
+
return g;
|
|
3359
|
+
},
|
|
3360
|
+
async load(A) {
|
|
3361
|
+
if (A === g)
|
|
3362
|
+
return t != null && t.disableApis ? "export const apis = [];" : (a = (await mt([Fe.convertPathToPattern(k.join(n, "/**/*.ts"))], { ignore: (t == null ? void 0 : t.exclude) ?? [] })).map((v) => ({
|
|
3363
|
+
id: "__api__" + m() + "_",
|
|
3364
|
+
importPath: f(v == null ? void 0 : v.replace(/\.ts$/, "")),
|
|
3365
|
+
file: v,
|
|
3366
|
+
fullPath: k.join(r, v),
|
|
3367
|
+
apiPath: "/" + k.relative(n, v).replace(/\.ts$/, "").replace(/\\/g, "/"),
|
|
3368
|
+
clientDtsImportPath: k.join(".soonjs", v == null ? void 0 : v.replace(/\.ts$/, "")).replace(/\\/g, "/")
|
|
3369
|
+
})), u = (await mt([Fe.convertPathToPattern(k.join(i, "/**/*.ts"))])).map((v) => ({
|
|
3370
|
+
id: "__auto__" + m() + "_",
|
|
3371
|
+
importPath: ".soonjs/" + (v == null ? void 0 : v.replace(/\.ts$/, "")),
|
|
3372
|
+
file: v,
|
|
3373
|
+
fullPath: k.join(r, v),
|
|
3374
|
+
apiPath: "/" + k.relative(i, v).replace(/\.ts$/, "").replace(/\\/g, "/"),
|
|
3375
|
+
clientDtsImportPath: k.join(".soonjs", v == null ? void 0 : v.replace(/\.ts$/, "")).replace(/\\/g, "/")
|
|
3376
|
+
})), _ = (await mt([Fe.convertPathToPattern(k.join(h, "/**/*.ts"))], { ignore: (t == null ? void 0 : t.exclude) ?? [] })).map(
|
|
3377
|
+
(v) => ({
|
|
3378
|
+
id: "__service__" + m() + "_",
|
|
3379
|
+
importPath: f(v == null ? void 0 : v.replace(/\.ts$/, "")),
|
|
3380
|
+
file: v,
|
|
3381
|
+
fullPath: k.join(r, v),
|
|
3382
|
+
servicePath: "/" + k.relative(h, v).replace(/\.ts$/, "").replace(/\\/g, "/"),
|
|
3383
|
+
clientDtsImportPath: k.join(".soonjs", v == null ? void 0 : v.replace(/\.ts$/, "")).replace(/\\/g, "/")
|
|
3384
|
+
})
|
|
3385
|
+
), `import { soonApiSymbol, soonServiceSymbol, defineMiddleware } from 'soonjs';
|
|
135
3386
|
import { exists, mkdir, writeFile } from 'fs';
|
|
136
3387
|
import path from 'path';
|
|
137
3388
|
|
|
138
|
-
${a.map(v
|
|
3389
|
+
${a.map((v) => `import * as ${v.id} from "${v.importPath}";`).join(`
|
|
139
3390
|
`)}
|
|
140
3391
|
|
|
141
|
-
${u.map(v
|
|
3392
|
+
${u.map((v) => `import * as ${v.id} from "${v.importPath}";`).join(`
|
|
142
3393
|
`)}
|
|
143
3394
|
|
|
144
|
-
${_.map(v
|
|
3395
|
+
${_.map((v) => `import * as ${v.id} from "${v.importPath}";`).join(`
|
|
145
3396
|
`)}
|
|
146
3397
|
|
|
147
3398
|
const exportedApis = [];
|
|
148
3399
|
const autoApis = [
|
|
149
|
-
${a.map(v
|
|
3400
|
+
${a.map((v) => `{ module: ${v.id}, path: '${v.apiPath}', importPath: '${v.clientDtsImportPath}', id: '${v.id}' }`).join(",")}
|
|
150
3401
|
].reduce((acc, cur) => {
|
|
151
3402
|
const module = cur.module;
|
|
152
3403
|
const exported = { importPath: cur.importPath, id: cur.id, apis: [] };
|
|
@@ -166,7 +3417,7 @@ $$$services-content$$$
|
|
|
166
3417
|
return acc;
|
|
167
3418
|
}, []);
|
|
168
3419
|
const autoApisFromClient = [
|
|
169
|
-
${u.map(v
|
|
3420
|
+
${u.map((v) => `{ module: ${v.id} }`).join(",")}
|
|
170
3421
|
].reduce((acc, cur) => {
|
|
171
3422
|
const module = cur.module;
|
|
172
3423
|
for (const key in module) {
|
|
@@ -192,7 +3443,7 @@ $$$services-content$$$
|
|
|
192
3443
|
|
|
193
3444
|
const autoInjectServices = [];
|
|
194
3445
|
const exportedServices = [];
|
|
195
|
-
const serviceFiltered = [${_.map(v
|
|
3446
|
+
const serviceFiltered = [${_.map((v) => `{ module: ${v.id}, importPath: '${v.clientDtsImportPath}', id: '${v.id}' }`).join(",")}].reduce((acc, cur) => {
|
|
196
3447
|
const module = cur.module;
|
|
197
3448
|
const exported = { importPath: cur.importPath, id: cur.id, services: [] };
|
|
198
3449
|
const autoInjected = { importPath: cur.importPath, id: cur.id, services: [] };
|
|
@@ -228,7 +3479,7 @@ $$$services-content$$$
|
|
|
228
3479
|
await Promise.all(serviceFiltered.map(v => v()));
|
|
229
3480
|
}
|
|
230
3481
|
|
|
231
|
-
export const baseUrl = '${(t==null?void 0:t.baseUrl)||""}';
|
|
3482
|
+
export const baseUrl = '${(t == null ? void 0 : t.baseUrl) || ""}';
|
|
232
3483
|
|
|
233
3484
|
// 生成types
|
|
234
3485
|
function generate() {
|
|
@@ -258,7 +3509,7 @@ $$$services-content$$$
|
|
|
258
3509
|
writeFile(path.join(generatedAutoPath, 'auto-server.d.ts'), contentServerDts, err => { if (err) throw err; });
|
|
259
3510
|
writeFile(path.join(generatedAutoPath, 'auto-server.types.ts'), contentServerTypes, err => { if (err) throw err; });
|
|
260
3511
|
}
|
|
261
|
-
const generatedAutoPath = path.join('${r.replace(/\\/g,"/")}', 'generated/auto');
|
|
3512
|
+
const generatedAutoPath = path.join('${r.replace(/\\/g, "/")}', 'generated/auto');
|
|
262
3513
|
exists(generatedAutoPath, (exists) => {
|
|
263
3514
|
if (!exists) {
|
|
264
3515
|
mkdir(generatedAutoPath, { recursive: true }, (err) => {
|
|
@@ -269,4 +3520,10 @@ $$$services-content$$$
|
|
|
269
3520
|
generate();
|
|
270
3521
|
}
|
|
271
3522
|
})
|
|
272
|
-
`)
|
|
3523
|
+
`);
|
|
3524
|
+
}
|
|
3525
|
+
};
|
|
3526
|
+
}
|
|
3527
|
+
export {
|
|
3528
|
+
Gu as vitePluginSoonServer
|
|
3529
|
+
};
|