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