gennady 0.8.4-draft.2 → 0.8.4-draft.3
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/ai/directives/sdd-v2/root.directive.xml +36 -3
- package/ai/directives/sdd-v2/router.directive.xml +22 -1
- package/ai/kit/templates/sdd-v2/root.directive.hbs +11 -3
- package/ai/kit/templates/sdd-v2/router.directive.hbs +22 -1
- package/ai/skills/agent-inbox/SKILL.md +1 -1
- package/ai/skills/sdd/SKILL.md +5 -3
- package/ai/skills/sdd-audit/SKILL.md +5 -2
- package/ai/skills/sdd-check/SKILL.md +2 -2
- package/ai/skills/sdd-code-review/SKILL.md +4 -1
- package/ai/skills/sdd-critic/SKILL.md +5 -2
- package/ai/skills/sdd-execute/SKILL.md +5 -2
- package/ai/skills/sdd-reconcile/SKILL.md +5 -2
- package/ai/skills/sdd-scaffold/SKILL.md +5 -2
- package/dist/ai/directives/sdd-v2/root.directive.xml +36 -3
- package/dist/ai/directives/sdd-v2/router.directive.xml +22 -1
- package/dist/ai/kit/templates/sdd-v2/root.directive.hbs +11 -3
- package/dist/ai/kit/templates/sdd-v2/router.directive.hbs +22 -1
- package/dist/ai/skills/agent-inbox/SKILL.md +1 -1
- package/dist/ai/skills/sdd/SKILL.md +5 -3
- package/dist/ai/skills/sdd-audit/SKILL.md +5 -2
- package/dist/ai/skills/sdd-check/SKILL.md +2 -2
- package/dist/ai/skills/sdd-code-review/SKILL.md +4 -1
- package/dist/ai/skills/sdd-critic/SKILL.md +5 -2
- package/dist/ai/skills/sdd-execute/SKILL.md +5 -2
- package/dist/ai/skills/sdd-reconcile/SKILL.md +5 -2
- package/dist/ai/skills/sdd-scaffold/SKILL.md +5 -2
- package/dist/chunks/{classify-mr-stage.logic-BiCHTmPp.js → classify-mr-stage.logic-CazmQDwZ.js} +2 -2
- package/dist/chunks/{config-index-9VHWSDQD.js → config-index-DU8-FEjq.js} +1 -1
- package/dist/chunks/{devtools-b0DwO1x_.js → devtools-1JmXJjUG.js} +1 -1
- package/dist/chunks/{eval.cmd-CwNPaNJd.js → eval.cmd-CBANnOFG.js} +1 -1
- package/dist/chunks/{help-D5cXtdMI.js → help-DVloaFF5.js} +1 -1
- package/dist/chunks/{index-BVnJEutp.js → index-2xhpqJtd.js} +2 -2
- package/dist/chunks/{index-RR5OUxje.js → index-AxsLBUAx.js} +14 -14
- package/dist/chunks/{index-CUkeTGqM.js → index-B7sydB0W.js} +2 -2
- package/dist/chunks/{index-CMCn9ErF.js → index-BKxk4zOz.js} +2 -2
- package/dist/chunks/{index-Db13NlHh.js → index-BNMmX_Mv.js} +21 -21
- package/dist/chunks/{index-CmQO-RmM.js → index-BPzldG3a.js} +2 -2
- package/dist/chunks/{index-BOQl7F_Z.js → index-BQlFDvKW.js} +2 -2
- package/dist/chunks/{index-RzkvIfJQ.js → index-Baq7RL1L.js} +3 -3
- package/dist/chunks/index-BbPiwvY9.js +2 -0
- package/dist/chunks/{index-ClJLPEUB.js → index-BreGNLJ_.js} +1 -1
- package/dist/chunks/{index-DjSafAkN.js → index-BslPwGtM.js} +2 -2
- package/dist/chunks/{index-DiMFxS0z.js → index-BtCUN2fZ.js} +16 -16
- package/dist/chunks/{index-CS0VbiLD.js → index-C10-EOdB.js} +1 -1
- package/dist/chunks/{index-2BOEcJIa.js → index-C4JmZLaj.js} +2 -2
- package/dist/chunks/index-CA-JKLr4.js +2 -0
- package/dist/chunks/{index-43GiH--T.js → index-CG_jJZVu.js} +2 -2
- package/dist/chunks/{index-BdkFKsMm.js → index-CGyP2uDE.js} +3 -3
- package/dist/chunks/{index-BOKv0b01.js → index-CPl1s9XJ.js} +2 -2
- package/dist/chunks/{index-DIPrBH-4.js → index-CSxE4cEm.js} +9 -9
- package/dist/chunks/{index-Cm7U1-fU.js → index-CWR5EzXx.js} +2 -2
- package/dist/chunks/{index-BwN5llCR.js → index-Camql5kL.js} +2 -2
- package/dist/chunks/{index-Drh-J9O7.js → index-CdUiTipO.js} +7 -7
- package/dist/chunks/{index-Cn029KTN.js → index-Crg61pK5.js} +2 -2
- package/dist/chunks/{index-Dja2O-hV.js → index-Cv9ZYXso.js} +1 -1
- package/dist/chunks/{index-Ck8v_Gv7.js → index-D7ADMlG3.js} +1 -1
- package/dist/chunks/index-DNl2gC8l.js +158 -0
- package/dist/chunks/{index-BYIzl-Ut.js → index-DVJA0qVm.js} +36 -36
- package/dist/chunks/{index-BAEIZVx0.js → index-DcFJhkY1.js} +2 -2
- package/dist/chunks/{index-Dx5_CB2E.js → index-DdEd-L3x.js} +2 -2
- package/dist/chunks/{index-DVmqMmgb.js → index-DkGA1eW_.js} +32 -32
- package/dist/chunks/{index-3k7mPX1e.js → index-Dnwxlti3.js} +1 -1
- package/dist/chunks/{index-CrizvxOJ.js → index-DqdEJDi2.js} +2 -2
- package/dist/chunks/{index-BIPebtDl.js → index-DqiwmBt4.js} +1 -1
- package/dist/chunks/{index-DS4MhAw-.js → index-PfuqBWjY.js} +2 -2
- package/dist/chunks/{index-BmFT1Kx2.js → index-SVP6RfVl.js} +2 -2
- package/dist/chunks/{index-CDxV4b81.js → index-Y8wu48Q0.js} +1 -1
- package/dist/chunks/index-_ewSKppm.js +2 -0
- package/dist/chunks/{index-Ctcr_Qeu.js → index-aBVtCLIJ.js} +2 -2
- package/dist/chunks/index-dNdz9j6d.js +2 -0
- package/dist/chunks/{index-BFUkVkSo.js → index-gskOpu3H.js} +16 -16
- package/dist/chunks/{index-CXpkT25O.js → index-pBSLMn5Q.js} +3 -3
- package/dist/chunks/index-sqPhX5Io.js +2 -0
- package/dist/chunks/{index-BzmR4Es2.js → index-vfrjhUD1.js} +39 -39
- package/dist/chunks/{index-J2NvjjDV.js → index-xGF5XC_i.js} +2 -2
- package/dist/chunks/{run-review-command.logic-CA2Rjymb.js → run-review-command.logic-B9GoCxh-.js} +24 -24
- package/dist/chunks/{serve.cmd-RxYS6WoN.js → serve.cmd-UXkaeaPI.js} +2 -2
- package/dist/chunks/{services-Csd556Tv.js → services-BYCeGBlO.js} +4 -4
- package/dist/chunks/{shared-B5CTGvpG.js → shared-B3cXL2Np.js} +1178 -1117
- package/dist/chunks/{stats-index-BLztvK69.js → stats-index-AIAnnp9S.js} +2 -2
- package/dist/gennady.js +46 -46
- package/dist/index.js +4 -4
- package/dist/shared/sdd/ladder.d.ts +42 -0
- package/dist/shared/sdd/module-specs.d.ts +7 -0
- package/dist/shared/sdd/tracker.d.ts +9 -0
- package/package.json +1 -1
- package/dist/chunks/classify-mr-stage.logic-ClmhzQPQ.js +0 -53
- package/dist/chunks/config-index-RFeqlDWs.js +0 -104
- package/dist/chunks/devtools-p8tmPuLn.js +0 -79
- package/dist/chunks/eval.cmd-ewU5lcUY.js +0 -34
- package/dist/chunks/help-DzGnMNi2.js +0 -7
- package/dist/chunks/index--AXFi0ty.js +0 -89
- package/dist/chunks/index-64TSesTc.js +0 -186
- package/dist/chunks/index-9Gv5trS_.js +0 -125
- package/dist/chunks/index-B1DQIryA.js +0 -2
- package/dist/chunks/index-B1PiBeQ3.js +0 -2
- package/dist/chunks/index-B4rzuhkt.js +0 -183
- package/dist/chunks/index-B97HJjkg.js +0 -159
- package/dist/chunks/index-BF6qypm0.js +0 -131
- package/dist/chunks/index-BK84ZQsh.js +0 -128
- package/dist/chunks/index-BRVIirjj.js +0 -141
- package/dist/chunks/index-BXnryCGW.js +0 -96
- package/dist/chunks/index-BaZm7Otb.js +0 -2
- package/dist/chunks/index-Bhk746A2.js +0 -129
- package/dist/chunks/index-Bi-eY_dY.js +0 -164
- package/dist/chunks/index-BjumU69g.js +0 -2
- package/dist/chunks/index-BkWXcpXU.js +0 -16979
- package/dist/chunks/index-BlY4jQIA.js +0 -168
- package/dist/chunks/index-C0iy7GxD.js +0 -140
- package/dist/chunks/index-CCBTXczb.js +0 -56
- package/dist/chunks/index-CDAfkSrr.js +0 -2
- package/dist/chunks/index-CDHymWzC.js +0 -102
- package/dist/chunks/index-CNfXJAao.js +0 -2
- package/dist/chunks/index-CQsae1nq.js +0 -207
- package/dist/chunks/index-CVmd0prf.js +0 -2
- package/dist/chunks/index-CZuTNeNm.js +0 -2
- package/dist/chunks/index-CasNhhrL.js +0 -96
- package/dist/chunks/index-Ce7GWENF.js +0 -377
- package/dist/chunks/index-Cf-02TAg.js +0 -265
- package/dist/chunks/index-CfjQWSrh.js +0 -52
- package/dist/chunks/index-Chr7gBBz.js +0 -443
- package/dist/chunks/index-Ci875Zlg.js +0 -346
- package/dist/chunks/index-CwA6RzIB.js +0 -3793
- package/dist/chunks/index-D1dI63ej.js +0 -46
- package/dist/chunks/index-DCS32A2i.js +0 -663
- package/dist/chunks/index-DOFoNxvb.js +0 -131
- package/dist/chunks/index-DVkCEuws.js +0 -136
- package/dist/chunks/index-DkadaaXq.js +0 -658
- package/dist/chunks/index-Dn11CLtk.js +0 -7
- package/dist/chunks/index-Do3spFJT.js +0 -340
- package/dist/chunks/index-DrFRZ0Yg.js +0 -2
- package/dist/chunks/index-DvEQhXi2.js +0 -1054
- package/dist/chunks/index-GiS0x6jg.js +0 -90
- package/dist/chunks/index-NacvqeQ5.js +0 -69
- package/dist/chunks/index-RNJhFzdr.js +0 -227
- package/dist/chunks/index-R_vUB6CL.js +0 -2
- package/dist/chunks/index-TQft1s5H.js +0 -20
- package/dist/chunks/index-ZmQRP38W.js +0 -26969
- package/dist/chunks/index-jdOZ4AkD.js +0 -143
- package/dist/chunks/index-kNa21kUI.js +0 -279
- package/dist/chunks/index-v4AV9kAc.js +0 -108
- package/dist/chunks/run-review-command.logic-CU1Slmc_.js +0 -331
- package/dist/chunks/serve.cmd-dWu_k_G_.js +0 -162
- package/dist/chunks/services-CwvXl2MB.js +0 -46832
- package/dist/chunks/shared-DSZTUx5b.js +0 -4509
- package/dist/chunks/stats-index-H6ALcjxy.js +0 -66
|
@@ -1,3793 +0,0 @@
|
|
|
1
|
-
import yt from "node:fs";
|
|
2
|
-
import St from "node:path";
|
|
3
|
-
import { at as Mn, an as Dn, l as xe, au as In, a as Nn, V as qn } from "./services-Csd556Tv.js";
|
|
4
|
-
import Kt from "os";
|
|
5
|
-
import Se from "path";
|
|
6
|
-
import Pn from "util";
|
|
7
|
-
import dt from "stream";
|
|
8
|
-
import Fn from "events";
|
|
9
|
-
import Qt from "fs";
|
|
10
|
-
import { p as Bn, s as ne } from "./shared-B5CTGvpG.js";
|
|
11
|
-
var se = {}, ie = {}, Oe = {}, nr;
|
|
12
|
-
function jn() {
|
|
13
|
-
if (nr) return Oe;
|
|
14
|
-
nr = 1, Object.defineProperty(Oe, "__esModule", { value: !0 }), Oe.splitWhen = Oe.flatten = void 0;
|
|
15
|
-
function o(l) {
|
|
16
|
-
return l.reduce((u, r) => [].concat(u, r), []);
|
|
17
|
-
}
|
|
18
|
-
Oe.flatten = o;
|
|
19
|
-
function a(l, u) {
|
|
20
|
-
const r = [[]];
|
|
21
|
-
let t = 0;
|
|
22
|
-
for (const n of l)
|
|
23
|
-
u(n) ? (t++, r[t] = []) : r[t].push(n);
|
|
24
|
-
return r;
|
|
25
|
-
}
|
|
26
|
-
return Oe.splitWhen = a, Oe;
|
|
27
|
-
}
|
|
28
|
-
var ke = {}, sr;
|
|
29
|
-
function Gn() {
|
|
30
|
-
if (sr) return ke;
|
|
31
|
-
sr = 1, Object.defineProperty(ke, "__esModule", { value: !0 }), ke.isEnoentCodeError = void 0;
|
|
32
|
-
function o(a) {
|
|
33
|
-
return a.code === "ENOENT";
|
|
34
|
-
}
|
|
35
|
-
return ke.isEnoentCodeError = o, ke;
|
|
36
|
-
}
|
|
37
|
-
var He = {}, ir;
|
|
38
|
-
function Un() {
|
|
39
|
-
if (ir) return He;
|
|
40
|
-
ir = 1, Object.defineProperty(He, "__esModule", { value: !0 }), He.createDirentFromStats = void 0;
|
|
41
|
-
class o {
|
|
42
|
-
constructor(u, r) {
|
|
43
|
-
this.name = u, 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);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
function a(l, u) {
|
|
47
|
-
return new o(l, u);
|
|
48
|
-
}
|
|
49
|
-
return He.createDirentFromStats = a, He;
|
|
50
|
-
}
|
|
51
|
-
var ee = {}, ar;
|
|
52
|
-
function Wn() {
|
|
53
|
-
if (ar) return ee;
|
|
54
|
-
ar = 1, Object.defineProperty(ee, "__esModule", { value: !0 }), ee.convertPosixPathToPattern = ee.convertWindowsPathToPattern = ee.convertPathToPattern = ee.escapePosixPath = ee.escapeWindowsPath = ee.escape = ee.removeLeadingDotSegment = ee.makeAbsolute = ee.unixify = void 0;
|
|
55
|
-
const o = Kt, a = Se, l = o.platform() === "win32", u = 2, r = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g, t = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, n = /^\\\\([.?])/, e = /\\(?![!()+@[\]{}])/g;
|
|
56
|
-
function i(C) {
|
|
57
|
-
return C.replace(/\\/g, "/");
|
|
58
|
-
}
|
|
59
|
-
ee.unixify = i;
|
|
60
|
-
function s(C, m) {
|
|
61
|
-
return a.resolve(C, m);
|
|
62
|
-
}
|
|
63
|
-
ee.makeAbsolute = s;
|
|
64
|
-
function p(C) {
|
|
65
|
-
if (C.charAt(0) === ".") {
|
|
66
|
-
const m = C.charAt(1);
|
|
67
|
-
if (m === "/" || m === "\\")
|
|
68
|
-
return C.slice(u);
|
|
69
|
-
}
|
|
70
|
-
return C;
|
|
71
|
-
}
|
|
72
|
-
ee.removeLeadingDotSegment = p, ee.escape = l ? h : d;
|
|
73
|
-
function h(C) {
|
|
74
|
-
return C.replace(t, "\\$2");
|
|
75
|
-
}
|
|
76
|
-
ee.escapeWindowsPath = h;
|
|
77
|
-
function d(C) {
|
|
78
|
-
return C.replace(r, "\\$2");
|
|
79
|
-
}
|
|
80
|
-
ee.escapePosixPath = d, ee.convertPathToPattern = l ? y : T;
|
|
81
|
-
function y(C) {
|
|
82
|
-
return h(C).replace(n, "//$1").replace(e, "/");
|
|
83
|
-
}
|
|
84
|
-
ee.convertWindowsPathToPattern = y;
|
|
85
|
-
function T(C) {
|
|
86
|
-
return d(C);
|
|
87
|
-
}
|
|
88
|
-
return ee.convertPosixPathToPattern = T, ee;
|
|
89
|
-
}
|
|
90
|
-
var I = {};
|
|
91
|
-
/*!
|
|
92
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
93
|
-
*
|
|
94
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
95
|
-
* Licensed under the MIT License.
|
|
96
|
-
*/
|
|
97
|
-
var mt, or;
|
|
98
|
-
function Vn() {
|
|
99
|
-
return or || (or = 1, mt = function(a) {
|
|
100
|
-
if (typeof a != "string" || a === "")
|
|
101
|
-
return !1;
|
|
102
|
-
for (var l; l = /(\\).|([@?!+*]\(.*\))/g.exec(a); ) {
|
|
103
|
-
if (l[2]) return !0;
|
|
104
|
-
a = a.slice(l.index + l[0].length);
|
|
105
|
-
}
|
|
106
|
-
return !1;
|
|
107
|
-
}), mt;
|
|
108
|
-
}
|
|
109
|
-
/*!
|
|
110
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
111
|
-
*
|
|
112
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
113
|
-
* Released under the MIT License.
|
|
114
|
-
*/
|
|
115
|
-
var vt, ur;
|
|
116
|
-
function Kn() {
|
|
117
|
-
if (ur) return vt;
|
|
118
|
-
ur = 1;
|
|
119
|
-
var o = Vn(), a = { "{": "}", "(": ")", "[": "]" }, l = function(r) {
|
|
120
|
-
if (r[0] === "!")
|
|
121
|
-
return !0;
|
|
122
|
-
for (var t = 0, n = -2, e = -2, i = -2, s = -2, p = -2; t < r.length; ) {
|
|
123
|
-
if (r[t] === "*" || r[t + 1] === "?" && /[\].+)]/.test(r[t]) || e !== -1 && r[t] === "[" && r[t + 1] !== "]" && (e < t && (e = r.indexOf("]", t)), e > t && (p === -1 || p > e || (p = r.indexOf("\\", t), p === -1 || p > e))) || i !== -1 && r[t] === "{" && r[t + 1] !== "}" && (i = r.indexOf("}", t), i > t && (p = r.indexOf("\\", t), p === -1 || p > i)) || s !== -1 && r[t] === "(" && r[t + 1] === "?" && /[:!=]/.test(r[t + 2]) && r[t + 3] !== ")" && (s = r.indexOf(")", t), s > t && (p = r.indexOf("\\", t), p === -1 || p > s)) || n !== -1 && r[t] === "(" && r[t + 1] !== "|" && (n < t && (n = r.indexOf("|", t)), n !== -1 && r[n + 1] !== ")" && (s = r.indexOf(")", n), s > n && (p = r.indexOf("\\", n), p === -1 || p > s))))
|
|
124
|
-
return !0;
|
|
125
|
-
if (r[t] === "\\") {
|
|
126
|
-
var h = r[t + 1];
|
|
127
|
-
t += 2;
|
|
128
|
-
var d = a[h];
|
|
129
|
-
if (d) {
|
|
130
|
-
var y = r.indexOf(d, t);
|
|
131
|
-
y !== -1 && (t = y + 1);
|
|
132
|
-
}
|
|
133
|
-
if (r[t] === "!")
|
|
134
|
-
return !0;
|
|
135
|
-
} else
|
|
136
|
-
t++;
|
|
137
|
-
}
|
|
138
|
-
return !1;
|
|
139
|
-
}, u = function(r) {
|
|
140
|
-
if (r[0] === "!")
|
|
141
|
-
return !0;
|
|
142
|
-
for (var t = 0; t < r.length; ) {
|
|
143
|
-
if (/[*?{}()[\]]/.test(r[t]))
|
|
144
|
-
return !0;
|
|
145
|
-
if (r[t] === "\\") {
|
|
146
|
-
var n = r[t + 1];
|
|
147
|
-
t += 2;
|
|
148
|
-
var e = a[n];
|
|
149
|
-
if (e) {
|
|
150
|
-
var i = r.indexOf(e, t);
|
|
151
|
-
i !== -1 && (t = i + 1);
|
|
152
|
-
}
|
|
153
|
-
if (r[t] === "!")
|
|
154
|
-
return !0;
|
|
155
|
-
} else
|
|
156
|
-
t++;
|
|
157
|
-
}
|
|
158
|
-
return !1;
|
|
159
|
-
};
|
|
160
|
-
return vt = function(t, n) {
|
|
161
|
-
if (typeof t != "string" || t === "")
|
|
162
|
-
return !1;
|
|
163
|
-
if (o(t))
|
|
164
|
-
return !0;
|
|
165
|
-
var e = l;
|
|
166
|
-
return n && n.strict === !1 && (e = u), e(t);
|
|
167
|
-
}, vt;
|
|
168
|
-
}
|
|
169
|
-
var Rt, cr;
|
|
170
|
-
function Qn() {
|
|
171
|
-
if (cr) return Rt;
|
|
172
|
-
cr = 1;
|
|
173
|
-
var o = Kn(), a = Se.posix.dirname, l = Kt.platform() === "win32", u = "/", r = /\\/g, t = /[\{\[].*[\}\]]$/, n = /(^|[^\\])([\{\[]|\([^\)]+$)/, e = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
|
|
174
|
-
return Rt = function(s, p) {
|
|
175
|
-
var h = Object.assign({ flipBackslashes: !0 }, p);
|
|
176
|
-
h.flipBackslashes && l && s.indexOf(u) < 0 && (s = s.replace(r, u)), t.test(s) && (s += u), s += "a";
|
|
177
|
-
do
|
|
178
|
-
s = a(s);
|
|
179
|
-
while (o(s) || n.test(s));
|
|
180
|
-
return s.replace(e, "$1");
|
|
181
|
-
}, Rt;
|
|
182
|
-
}
|
|
183
|
-
var Et = {}, lr;
|
|
184
|
-
function Xt() {
|
|
185
|
-
return lr || (lr = 1, (function(o) {
|
|
186
|
-
o.isInteger = (a) => typeof a == "number" ? Number.isInteger(a) : typeof a == "string" && a.trim() !== "" ? Number.isInteger(Number(a)) : !1, o.find = (a, l) => a.nodes.find((u) => u.type === l), o.exceedsLimit = (a, l, u = 1, r) => r === !1 || !o.isInteger(a) || !o.isInteger(l) ? !1 : (Number(l) - Number(a)) / Number(u) >= r, o.escapeNode = (a, l = 0, u) => {
|
|
187
|
-
const r = a.nodes[l];
|
|
188
|
-
r && (u && r.type === u || r.type === "open" || r.type === "close") && r.escaped !== !0 && (r.value = "\\" + r.value, r.escaped = !0);
|
|
189
|
-
}, o.encloseBrace = (a) => a.type !== "brace" ? !1 : a.commas >> 0 + a.ranges >> 0 === 0 ? (a.invalid = !0, !0) : !1, o.isInvalidBrace = (a) => a.type !== "brace" ? !1 : a.invalid === !0 || a.dollar ? !0 : a.commas >> 0 + a.ranges >> 0 === 0 || a.open !== !0 || a.close !== !0 ? (a.invalid = !0, !0) : !1, o.isOpenOrClose = (a) => a.type === "open" || a.type === "close" ? !0 : a.open === !0 || a.close === !0, o.reduce = (a) => a.reduce((l, u) => (u.type === "text" && l.push(u.value), u.type === "range" && (u.type = "text"), l), []), o.flatten = (...a) => {
|
|
190
|
-
const l = [], u = (r) => {
|
|
191
|
-
for (let t = 0; t < r.length; t++) {
|
|
192
|
-
const n = r[t];
|
|
193
|
-
if (Array.isArray(n)) {
|
|
194
|
-
u(n);
|
|
195
|
-
continue;
|
|
196
|
-
}
|
|
197
|
-
n !== void 0 && l.push(n);
|
|
198
|
-
}
|
|
199
|
-
return l;
|
|
200
|
-
};
|
|
201
|
-
return u(a), l;
|
|
202
|
-
};
|
|
203
|
-
})(Et)), Et;
|
|
204
|
-
}
|
|
205
|
-
var At, fr;
|
|
206
|
-
function Yt() {
|
|
207
|
-
if (fr) return At;
|
|
208
|
-
fr = 1;
|
|
209
|
-
const o = Xt();
|
|
210
|
-
return At = (a, l = {}) => {
|
|
211
|
-
const u = (r, t = {}) => {
|
|
212
|
-
const n = l.escapeInvalid && o.isInvalidBrace(t), e = r.invalid === !0 && l.escapeInvalid === !0;
|
|
213
|
-
let i = "";
|
|
214
|
-
if (r.value)
|
|
215
|
-
return (n || e) && o.isOpenOrClose(r) ? "\\" + r.value : r.value;
|
|
216
|
-
if (r.value)
|
|
217
|
-
return r.value;
|
|
218
|
-
if (r.nodes)
|
|
219
|
-
for (const s of r.nodes)
|
|
220
|
-
i += u(s);
|
|
221
|
-
return i;
|
|
222
|
-
};
|
|
223
|
-
return u(a);
|
|
224
|
-
}, At;
|
|
225
|
-
}
|
|
226
|
-
/*!
|
|
227
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
228
|
-
*
|
|
229
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
230
|
-
* Released under the MIT License.
|
|
231
|
-
*/
|
|
232
|
-
var bt, hr;
|
|
233
|
-
function Xn() {
|
|
234
|
-
return hr || (hr = 1, bt = function(o) {
|
|
235
|
-
return typeof o == "number" ? o - o === 0 : typeof o == "string" && o.trim() !== "" ? Number.isFinite ? Number.isFinite(+o) : isFinite(+o) : !1;
|
|
236
|
-
}), bt;
|
|
237
|
-
}
|
|
238
|
-
/*!
|
|
239
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
240
|
-
*
|
|
241
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
242
|
-
* Released under the MIT License.
|
|
243
|
-
*/
|
|
244
|
-
var Pt, pr;
|
|
245
|
-
function Yn() {
|
|
246
|
-
if (pr) return Pt;
|
|
247
|
-
pr = 1;
|
|
248
|
-
const o = Xn(), a = (m, S, _) => {
|
|
249
|
-
if (o(m) === !1)
|
|
250
|
-
throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
251
|
-
if (S === void 0 || m === S)
|
|
252
|
-
return String(m);
|
|
253
|
-
if (o(S) === !1)
|
|
254
|
-
throw new TypeError("toRegexRange: expected the second argument to be a number.");
|
|
255
|
-
let c = { relaxZeros: !0, ..._ };
|
|
256
|
-
typeof c.strictZeros == "boolean" && (c.relaxZeros = c.strictZeros === !1);
|
|
257
|
-
let f = String(c.relaxZeros), g = String(c.shorthand), R = String(c.capture), v = String(c.wrap), P = m + ":" + S + "=" + f + g + R + v;
|
|
258
|
-
if (a.cache.hasOwnProperty(P))
|
|
259
|
-
return a.cache[P].result;
|
|
260
|
-
let O = Math.min(m, S), D = Math.max(m, S);
|
|
261
|
-
if (Math.abs(O - D) === 1) {
|
|
262
|
-
let N = m + "|" + S;
|
|
263
|
-
return c.capture ? `(${N})` : c.wrap === !1 ? N : `(?:${N})`;
|
|
264
|
-
}
|
|
265
|
-
let k = T(m) || T(S), H = { min: m, max: S, a: O, b: D }, x = [], U = [];
|
|
266
|
-
if (k && (H.isPadded = k, H.maxLen = String(H.max).length), O < 0) {
|
|
267
|
-
let N = D < 0 ? Math.abs(D) : 1;
|
|
268
|
-
U = t(N, Math.abs(O), H, c), O = H.a = 0;
|
|
269
|
-
}
|
|
270
|
-
return D >= 0 && (x = t(O, D, H, c)), H.negatives = U, H.positives = x, H.result = l(U, x), c.capture === !0 ? H.result = `(${H.result})` : c.wrap !== !1 && x.length + U.length > 1 && (H.result = `(?:${H.result})`), a.cache[P] = H, H.result;
|
|
271
|
-
};
|
|
272
|
-
function l(m, S, _) {
|
|
273
|
-
let c = n(m, S, "-", !1) || [], f = n(S, m, "", !1) || [], g = n(m, S, "-?", !0) || [];
|
|
274
|
-
return c.concat(g).concat(f).join("|");
|
|
275
|
-
}
|
|
276
|
-
function u(m, S) {
|
|
277
|
-
let _ = 1, c = 1, f = p(m, _), g = /* @__PURE__ */ new Set([S]);
|
|
278
|
-
for (; m <= f && f <= S; )
|
|
279
|
-
g.add(f), _ += 1, f = p(m, _);
|
|
280
|
-
for (f = h(S + 1, c) - 1; m < f && f <= S; )
|
|
281
|
-
g.add(f), c += 1, f = h(S + 1, c) - 1;
|
|
282
|
-
return g = [...g], g.sort(i), g;
|
|
283
|
-
}
|
|
284
|
-
function r(m, S, _) {
|
|
285
|
-
if (m === S)
|
|
286
|
-
return { pattern: m, count: [], digits: 0 };
|
|
287
|
-
let c = e(m, S), f = c.length, g = "", R = 0;
|
|
288
|
-
for (let v = 0; v < f; v++) {
|
|
289
|
-
let [P, O] = c[v];
|
|
290
|
-
P === O ? g += P : P !== "0" || O !== "9" ? g += y(P, O) : R++;
|
|
291
|
-
}
|
|
292
|
-
return R && (g += _.shorthand === !0 ? "\\d" : "[0-9]"), { pattern: g, count: [R], digits: f };
|
|
293
|
-
}
|
|
294
|
-
function t(m, S, _, c) {
|
|
295
|
-
let f = u(m, S), g = [], R = m, v;
|
|
296
|
-
for (let P = 0; P < f.length; P++) {
|
|
297
|
-
let O = f[P], D = r(String(R), String(O), c), k = "";
|
|
298
|
-
if (!_.isPadded && v && v.pattern === D.pattern) {
|
|
299
|
-
v.count.length > 1 && v.count.pop(), v.count.push(D.count[0]), v.string = v.pattern + d(v.count), R = O + 1;
|
|
300
|
-
continue;
|
|
301
|
-
}
|
|
302
|
-
_.isPadded && (k = C(O, _, c)), D.string = k + D.pattern + d(D.count), g.push(D), R = O + 1, v = D;
|
|
303
|
-
}
|
|
304
|
-
return g;
|
|
305
|
-
}
|
|
306
|
-
function n(m, S, _, c, f) {
|
|
307
|
-
let g = [];
|
|
308
|
-
for (let R of m) {
|
|
309
|
-
let { string: v } = R;
|
|
310
|
-
!c && !s(S, "string", v) && g.push(_ + v), c && s(S, "string", v) && g.push(_ + v);
|
|
311
|
-
}
|
|
312
|
-
return g;
|
|
313
|
-
}
|
|
314
|
-
function e(m, S) {
|
|
315
|
-
let _ = [];
|
|
316
|
-
for (let c = 0; c < m.length; c++) _.push([m[c], S[c]]);
|
|
317
|
-
return _;
|
|
318
|
-
}
|
|
319
|
-
function i(m, S) {
|
|
320
|
-
return m > S ? 1 : S > m ? -1 : 0;
|
|
321
|
-
}
|
|
322
|
-
function s(m, S, _) {
|
|
323
|
-
return m.some((c) => c[S] === _);
|
|
324
|
-
}
|
|
325
|
-
function p(m, S) {
|
|
326
|
-
return Number(String(m).slice(0, -S) + "9".repeat(S));
|
|
327
|
-
}
|
|
328
|
-
function h(m, S) {
|
|
329
|
-
return m - m % Math.pow(10, S);
|
|
330
|
-
}
|
|
331
|
-
function d(m) {
|
|
332
|
-
let [S = 0, _ = ""] = m;
|
|
333
|
-
return _ || S > 1 ? `{${S + (_ ? "," + _ : "")}}` : "";
|
|
334
|
-
}
|
|
335
|
-
function y(m, S, _) {
|
|
336
|
-
return `[${m}${S - m === 1 ? "" : "-"}${S}]`;
|
|
337
|
-
}
|
|
338
|
-
function T(m) {
|
|
339
|
-
return /^-?(0+)\d/.test(m);
|
|
340
|
-
}
|
|
341
|
-
function C(m, S, _) {
|
|
342
|
-
if (!S.isPadded)
|
|
343
|
-
return m;
|
|
344
|
-
let c = Math.abs(S.maxLen - String(m).length), f = _.relaxZeros !== !1;
|
|
345
|
-
switch (c) {
|
|
346
|
-
case 0:
|
|
347
|
-
return "";
|
|
348
|
-
case 1:
|
|
349
|
-
return f ? "0?" : "0";
|
|
350
|
-
case 2:
|
|
351
|
-
return f ? "0{0,2}" : "00";
|
|
352
|
-
default:
|
|
353
|
-
return f ? `0{0,${c}}` : `0{${c}}`;
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
return a.cache = {}, a.clearCache = () => a.cache = {}, Pt = a, Pt;
|
|
357
|
-
}
|
|
358
|
-
/*!
|
|
359
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
360
|
-
*
|
|
361
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
362
|
-
* Licensed under the MIT License.
|
|
363
|
-
*/
|
|
364
|
-
var xt, dr;
|
|
365
|
-
function xn() {
|
|
366
|
-
if (dr) return xt;
|
|
367
|
-
dr = 1;
|
|
368
|
-
const o = Pn, a = Yn(), l = (c) => c !== null && typeof c == "object" && !Array.isArray(c), u = (c) => (f) => c === !0 ? Number(f) : String(f), r = (c) => typeof c == "number" || typeof c == "string" && c !== "", t = (c) => Number.isInteger(+c), n = (c) => {
|
|
369
|
-
let f = `${c}`, g = -1;
|
|
370
|
-
if (f[0] === "-" && (f = f.slice(1)), f === "0") return !1;
|
|
371
|
-
for (; f[++g] === "0"; ) ;
|
|
372
|
-
return g > 0;
|
|
373
|
-
}, e = (c, f, g) => typeof c == "string" || typeof f == "string" ? !0 : g.stringify === !0, i = (c, f, g) => {
|
|
374
|
-
if (f > 0) {
|
|
375
|
-
let R = c[0] === "-" ? "-" : "";
|
|
376
|
-
R && (c = c.slice(1)), c = R + c.padStart(R ? f - 1 : f, "0");
|
|
377
|
-
}
|
|
378
|
-
return g === !1 ? String(c) : c;
|
|
379
|
-
}, s = (c, f) => {
|
|
380
|
-
let g = c[0] === "-" ? "-" : "";
|
|
381
|
-
for (g && (c = c.slice(1), f--); c.length < f; ) c = "0" + c;
|
|
382
|
-
return g ? "-" + c : c;
|
|
383
|
-
}, p = (c, f, g) => {
|
|
384
|
-
c.negatives.sort((D, k) => D < k ? -1 : D > k ? 1 : 0), c.positives.sort((D, k) => D < k ? -1 : D > k ? 1 : 0);
|
|
385
|
-
let R = f.capture ? "" : "?:", v = "", P = "", O;
|
|
386
|
-
return c.positives.length && (v = c.positives.map((D) => s(String(D), g)).join("|")), c.negatives.length && (P = `-(${R}${c.negatives.map((D) => s(String(D), g)).join("|")})`), v && P ? O = `${v}|${P}` : O = v || P, f.wrap ? `(${R}${O})` : O;
|
|
387
|
-
}, h = (c, f, g, R) => {
|
|
388
|
-
if (g)
|
|
389
|
-
return a(c, f, { wrap: !1, ...R });
|
|
390
|
-
let v = String.fromCharCode(c);
|
|
391
|
-
if (c === f) return v;
|
|
392
|
-
let P = String.fromCharCode(f);
|
|
393
|
-
return `[${v}-${P}]`;
|
|
394
|
-
}, d = (c, f, g) => {
|
|
395
|
-
if (Array.isArray(c)) {
|
|
396
|
-
let R = g.wrap === !0, v = g.capture ? "" : "?:";
|
|
397
|
-
return R ? `(${v}${c.join("|")})` : c.join("|");
|
|
398
|
-
}
|
|
399
|
-
return a(c, f, g);
|
|
400
|
-
}, y = (...c) => new RangeError("Invalid range arguments: " + o.inspect(...c)), T = (c, f, g) => {
|
|
401
|
-
if (g.strictRanges === !0) throw y([c, f]);
|
|
402
|
-
return [];
|
|
403
|
-
}, C = (c, f) => {
|
|
404
|
-
if (f.strictRanges === !0)
|
|
405
|
-
throw new TypeError(`Expected step "${c}" to be a number`);
|
|
406
|
-
return [];
|
|
407
|
-
}, m = (c, f, g = 1, R = {}) => {
|
|
408
|
-
let v = Number(c), P = Number(f);
|
|
409
|
-
if (!Number.isInteger(v) || !Number.isInteger(P)) {
|
|
410
|
-
if (R.strictRanges === !0) throw y([c, f]);
|
|
411
|
-
return [];
|
|
412
|
-
}
|
|
413
|
-
v === 0 && (v = 0), P === 0 && (P = 0);
|
|
414
|
-
let O = v > P, D = String(c), k = String(f), H = String(g);
|
|
415
|
-
g = Math.max(Math.abs(g), 1);
|
|
416
|
-
let x = n(D) || n(k) || n(H), U = x ? Math.max(D.length, k.length, H.length) : 0, N = x === !1 && e(c, f, R) === !1, q = R.transform || u(N);
|
|
417
|
-
if (R.toRegex && g === 1)
|
|
418
|
-
return h(s(c, U), s(f, U), !0, R);
|
|
419
|
-
let F = { negatives: [], positives: [] }, z = (M) => F[M < 0 ? "negatives" : "positives"].push(Math.abs(M)), ce = [], $ = 0;
|
|
420
|
-
for (; O ? v >= P : v <= P; )
|
|
421
|
-
R.toRegex === !0 && g > 1 ? z(v) : ce.push(i(q(v, $), U, N)), v = O ? v - g : v + g, $++;
|
|
422
|
-
return R.toRegex === !0 ? g > 1 ? p(F, R, U) : d(ce, null, { wrap: !1, ...R }) : ce;
|
|
423
|
-
}, S = (c, f, g = 1, R = {}) => {
|
|
424
|
-
if (!t(c) && c.length > 1 || !t(f) && f.length > 1)
|
|
425
|
-
return T(c, f, R);
|
|
426
|
-
let v = R.transform || ((N) => String.fromCharCode(N)), P = `${c}`.charCodeAt(0), O = `${f}`.charCodeAt(0), D = P > O, k = Math.min(P, O), H = Math.max(P, O);
|
|
427
|
-
if (R.toRegex && g === 1)
|
|
428
|
-
return h(k, H, !1, R);
|
|
429
|
-
let x = [], U = 0;
|
|
430
|
-
for (; D ? P >= O : P <= O; )
|
|
431
|
-
x.push(v(P, U)), P = D ? P - g : P + g, U++;
|
|
432
|
-
return R.toRegex === !0 ? d(x, null, { wrap: !1, options: R }) : x;
|
|
433
|
-
}, _ = (c, f, g, R = {}) => {
|
|
434
|
-
if (f == null && r(c))
|
|
435
|
-
return [c];
|
|
436
|
-
if (!r(c) || !r(f))
|
|
437
|
-
return T(c, f, R);
|
|
438
|
-
if (typeof g == "function")
|
|
439
|
-
return _(c, f, 1, { transform: g });
|
|
440
|
-
if (l(g))
|
|
441
|
-
return _(c, f, 0, g);
|
|
442
|
-
let v = { ...R };
|
|
443
|
-
return v.capture === !0 && (v.wrap = !0), g = g || v.step || 1, t(g) ? t(c) && t(f) ? m(c, f, g, v) : S(c, f, Math.max(Math.abs(g), 1), v) : g != null && !l(g) ? C(g, v) : _(c, f, 1, g);
|
|
444
|
-
};
|
|
445
|
-
return xt = _, xt;
|
|
446
|
-
}
|
|
447
|
-
var Ct, _r;
|
|
448
|
-
function Zn() {
|
|
449
|
-
if (_r) return Ct;
|
|
450
|
-
_r = 1;
|
|
451
|
-
const o = xn(), a = Xt();
|
|
452
|
-
return Ct = (u, r = {}) => {
|
|
453
|
-
const t = (n, e = {}) => {
|
|
454
|
-
const i = a.isInvalidBrace(e), s = n.invalid === !0 && r.escapeInvalid === !0, p = i === !0 || s === !0, h = r.escapeInvalid === !0 ? "\\" : "";
|
|
455
|
-
let d = "";
|
|
456
|
-
if (n.isOpen === !0)
|
|
457
|
-
return h + n.value;
|
|
458
|
-
if (n.isClose === !0)
|
|
459
|
-
return console.log("node.isClose", h, n.value), h + n.value;
|
|
460
|
-
if (n.type === "open")
|
|
461
|
-
return p ? h + n.value : "(";
|
|
462
|
-
if (n.type === "close")
|
|
463
|
-
return p ? h + n.value : ")";
|
|
464
|
-
if (n.type === "comma")
|
|
465
|
-
return n.prev.type === "comma" ? "" : p ? n.value : "|";
|
|
466
|
-
if (n.value)
|
|
467
|
-
return n.value;
|
|
468
|
-
if (n.nodes && n.ranges > 0) {
|
|
469
|
-
const y = a.reduce(n.nodes), T = o(...y, { ...r, wrap: !1, toRegex: !0, strictZeros: !0 });
|
|
470
|
-
if (T.length !== 0)
|
|
471
|
-
return y.length > 1 && T.length > 1 ? `(${T})` : T;
|
|
472
|
-
}
|
|
473
|
-
if (n.nodes)
|
|
474
|
-
for (const y of n.nodes)
|
|
475
|
-
d += t(y, n);
|
|
476
|
-
return d;
|
|
477
|
-
};
|
|
478
|
-
return t(u);
|
|
479
|
-
}, Ct;
|
|
480
|
-
}
|
|
481
|
-
var Tt, gr;
|
|
482
|
-
function zn() {
|
|
483
|
-
if (gr) return Tt;
|
|
484
|
-
gr = 1;
|
|
485
|
-
const o = xn(), a = Yt(), l = Xt(), u = (t = "", n = "", e = !1) => {
|
|
486
|
-
const i = [];
|
|
487
|
-
if (t = [].concat(t), n = [].concat(n), !n.length) return t;
|
|
488
|
-
if (!t.length)
|
|
489
|
-
return e ? l.flatten(n).map((s) => `{${s}}`) : n;
|
|
490
|
-
for (const s of t)
|
|
491
|
-
if (Array.isArray(s))
|
|
492
|
-
for (const p of s)
|
|
493
|
-
i.push(u(p, n, e));
|
|
494
|
-
else
|
|
495
|
-
for (let p of n)
|
|
496
|
-
e === !0 && typeof p == "string" && (p = `{${p}}`), i.push(Array.isArray(p) ? u(s, p, e) : s + p);
|
|
497
|
-
return l.flatten(i);
|
|
498
|
-
};
|
|
499
|
-
return Tt = (t, n = {}) => {
|
|
500
|
-
const e = n.rangeLimit === void 0 ? 1e3 : n.rangeLimit, i = (s, p = {}) => {
|
|
501
|
-
s.queue = [];
|
|
502
|
-
let h = p, d = p.queue;
|
|
503
|
-
for (; h.type !== "brace" && h.type !== "root" && h.parent; )
|
|
504
|
-
h = h.parent, d = h.queue;
|
|
505
|
-
if (s.invalid || s.dollar) {
|
|
506
|
-
d.push(u(d.pop(), a(s, n)));
|
|
507
|
-
return;
|
|
508
|
-
}
|
|
509
|
-
if (s.type === "brace" && s.invalid !== !0 && s.nodes.length === 2) {
|
|
510
|
-
d.push(u(d.pop(), ["{}"]));
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
if (s.nodes && s.ranges > 0) {
|
|
514
|
-
const m = l.reduce(s.nodes);
|
|
515
|
-
if (l.exceedsLimit(...m, n.step, e))
|
|
516
|
-
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
|
|
517
|
-
let S = o(...m, n);
|
|
518
|
-
S.length === 0 && (S = a(s, n)), d.push(u(d.pop(), S)), s.nodes = [];
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
const y = l.encloseBrace(s);
|
|
522
|
-
let T = s.queue, C = s;
|
|
523
|
-
for (; C.type !== "brace" && C.type !== "root" && C.parent; )
|
|
524
|
-
C = C.parent, T = C.queue;
|
|
525
|
-
for (let m = 0; m < s.nodes.length; m++) {
|
|
526
|
-
const S = s.nodes[m];
|
|
527
|
-
if (S.type === "comma" && s.type === "brace") {
|
|
528
|
-
m === 1 && T.push(""), T.push("");
|
|
529
|
-
continue;
|
|
530
|
-
}
|
|
531
|
-
if (S.type === "close") {
|
|
532
|
-
d.push(u(d.pop(), T, y));
|
|
533
|
-
continue;
|
|
534
|
-
}
|
|
535
|
-
if (S.value && S.type !== "open") {
|
|
536
|
-
T.push(u(T.pop(), S.value));
|
|
537
|
-
continue;
|
|
538
|
-
}
|
|
539
|
-
S.nodes && i(S, s);
|
|
540
|
-
}
|
|
541
|
-
return T;
|
|
542
|
-
};
|
|
543
|
-
return l.flatten(i(t));
|
|
544
|
-
}, Tt;
|
|
545
|
-
}
|
|
546
|
-
var Ot, yr;
|
|
547
|
-
function Jn() {
|
|
548
|
-
return yr || (yr = 1, Ot = {
|
|
549
|
-
MAX_LENGTH: 1e4,
|
|
550
|
-
// Digits
|
|
551
|
-
CHAR_0: "0",
|
|
552
|
-
/* 0 */
|
|
553
|
-
CHAR_9: "9",
|
|
554
|
-
/* 9 */
|
|
555
|
-
// Alphabet chars.
|
|
556
|
-
CHAR_UPPERCASE_A: "A",
|
|
557
|
-
/* A */
|
|
558
|
-
CHAR_LOWERCASE_A: "a",
|
|
559
|
-
/* a */
|
|
560
|
-
CHAR_UPPERCASE_Z: "Z",
|
|
561
|
-
/* Z */
|
|
562
|
-
CHAR_LOWERCASE_Z: "z",
|
|
563
|
-
/* z */
|
|
564
|
-
CHAR_LEFT_PARENTHESES: "(",
|
|
565
|
-
/* ( */
|
|
566
|
-
CHAR_RIGHT_PARENTHESES: ")",
|
|
567
|
-
/* ) */
|
|
568
|
-
CHAR_ASTERISK: "*",
|
|
569
|
-
/* * */
|
|
570
|
-
// Non-alphabetic chars.
|
|
571
|
-
CHAR_AMPERSAND: "&",
|
|
572
|
-
/* & */
|
|
573
|
-
CHAR_AT: "@",
|
|
574
|
-
/* @ */
|
|
575
|
-
CHAR_BACKSLASH: "\\",
|
|
576
|
-
/* \ */
|
|
577
|
-
CHAR_BACKTICK: "`",
|
|
578
|
-
/* ` */
|
|
579
|
-
CHAR_CARRIAGE_RETURN: "\r",
|
|
580
|
-
/* \r */
|
|
581
|
-
CHAR_CIRCUMFLEX_ACCENT: "^",
|
|
582
|
-
/* ^ */
|
|
583
|
-
CHAR_COLON: ":",
|
|
584
|
-
/* : */
|
|
585
|
-
CHAR_COMMA: ",",
|
|
586
|
-
/* , */
|
|
587
|
-
CHAR_DOLLAR: "$",
|
|
588
|
-
/* . */
|
|
589
|
-
CHAR_DOT: ".",
|
|
590
|
-
/* . */
|
|
591
|
-
CHAR_DOUBLE_QUOTE: '"',
|
|
592
|
-
/* " */
|
|
593
|
-
CHAR_EQUAL: "=",
|
|
594
|
-
/* = */
|
|
595
|
-
CHAR_EXCLAMATION_MARK: "!",
|
|
596
|
-
/* ! */
|
|
597
|
-
CHAR_FORM_FEED: "\f",
|
|
598
|
-
/* \f */
|
|
599
|
-
CHAR_FORWARD_SLASH: "/",
|
|
600
|
-
/* / */
|
|
601
|
-
CHAR_HASH: "#",
|
|
602
|
-
/* # */
|
|
603
|
-
CHAR_HYPHEN_MINUS: "-",
|
|
604
|
-
/* - */
|
|
605
|
-
CHAR_LEFT_ANGLE_BRACKET: "<",
|
|
606
|
-
/* < */
|
|
607
|
-
CHAR_LEFT_CURLY_BRACE: "{",
|
|
608
|
-
/* { */
|
|
609
|
-
CHAR_LEFT_SQUARE_BRACKET: "[",
|
|
610
|
-
/* [ */
|
|
611
|
-
CHAR_LINE_FEED: `
|
|
612
|
-
`,
|
|
613
|
-
/* \n */
|
|
614
|
-
CHAR_NO_BREAK_SPACE: " ",
|
|
615
|
-
/* \u00A0 */
|
|
616
|
-
CHAR_PERCENT: "%",
|
|
617
|
-
/* % */
|
|
618
|
-
CHAR_PLUS: "+",
|
|
619
|
-
/* + */
|
|
620
|
-
CHAR_QUESTION_MARK: "?",
|
|
621
|
-
/* ? */
|
|
622
|
-
CHAR_RIGHT_ANGLE_BRACKET: ">",
|
|
623
|
-
/* > */
|
|
624
|
-
CHAR_RIGHT_CURLY_BRACE: "}",
|
|
625
|
-
/* } */
|
|
626
|
-
CHAR_RIGHT_SQUARE_BRACKET: "]",
|
|
627
|
-
/* ] */
|
|
628
|
-
CHAR_SEMICOLON: ";",
|
|
629
|
-
/* ; */
|
|
630
|
-
CHAR_SINGLE_QUOTE: "'",
|
|
631
|
-
/* ' */
|
|
632
|
-
CHAR_SPACE: " ",
|
|
633
|
-
/* */
|
|
634
|
-
CHAR_TAB: " ",
|
|
635
|
-
/* \t */
|
|
636
|
-
CHAR_UNDERSCORE: "_",
|
|
637
|
-
/* _ */
|
|
638
|
-
CHAR_VERTICAL_LINE: "|",
|
|
639
|
-
/* | */
|
|
640
|
-
CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
|
|
641
|
-
/* \uFEFF */
|
|
642
|
-
}), Ot;
|
|
643
|
-
}
|
|
644
|
-
var wt, Sr;
|
|
645
|
-
function es() {
|
|
646
|
-
if (Sr) return wt;
|
|
647
|
-
Sr = 1;
|
|
648
|
-
const o = Yt(), {
|
|
649
|
-
MAX_LENGTH: a,
|
|
650
|
-
CHAR_BACKSLASH: l,
|
|
651
|
-
/* \ */
|
|
652
|
-
CHAR_BACKTICK: u,
|
|
653
|
-
/* ` */
|
|
654
|
-
CHAR_COMMA: r,
|
|
655
|
-
/* , */
|
|
656
|
-
CHAR_DOT: t,
|
|
657
|
-
/* . */
|
|
658
|
-
CHAR_LEFT_PARENTHESES: n,
|
|
659
|
-
/* ( */
|
|
660
|
-
CHAR_RIGHT_PARENTHESES: e,
|
|
661
|
-
/* ) */
|
|
662
|
-
CHAR_LEFT_CURLY_BRACE: i,
|
|
663
|
-
/* { */
|
|
664
|
-
CHAR_RIGHT_CURLY_BRACE: s,
|
|
665
|
-
/* } */
|
|
666
|
-
CHAR_LEFT_SQUARE_BRACKET: p,
|
|
667
|
-
/* [ */
|
|
668
|
-
CHAR_RIGHT_SQUARE_BRACKET: h,
|
|
669
|
-
/* ] */
|
|
670
|
-
CHAR_DOUBLE_QUOTE: d,
|
|
671
|
-
/* " */
|
|
672
|
-
CHAR_SINGLE_QUOTE: y,
|
|
673
|
-
/* ' */
|
|
674
|
-
CHAR_NO_BREAK_SPACE: T,
|
|
675
|
-
CHAR_ZERO_WIDTH_NOBREAK_SPACE: C
|
|
676
|
-
} = Jn();
|
|
677
|
-
return wt = (S, _ = {}) => {
|
|
678
|
-
if (typeof S != "string")
|
|
679
|
-
throw new TypeError("Expected a string");
|
|
680
|
-
const c = _ || {}, f = typeof c.maxLength == "number" ? Math.min(a, c.maxLength) : a;
|
|
681
|
-
if (S.length > f)
|
|
682
|
-
throw new SyntaxError(`Input length (${S.length}), exceeds max characters (${f})`);
|
|
683
|
-
const g = { type: "root", input: S, nodes: [] }, R = [g];
|
|
684
|
-
let v = g, P = g, O = 0;
|
|
685
|
-
const D = S.length;
|
|
686
|
-
let k = 0, H = 0, x;
|
|
687
|
-
const U = () => S[k++], N = (q) => {
|
|
688
|
-
if (q.type === "text" && P.type === "dot" && (P.type = "text"), P && P.type === "text" && q.type === "text") {
|
|
689
|
-
P.value += q.value;
|
|
690
|
-
return;
|
|
691
|
-
}
|
|
692
|
-
return v.nodes.push(q), q.parent = v, q.prev = P, P = q, q;
|
|
693
|
-
};
|
|
694
|
-
for (N({ type: "bos" }); k < D; )
|
|
695
|
-
if (v = R[R.length - 1], x = U(), !(x === C || x === T)) {
|
|
696
|
-
if (x === l) {
|
|
697
|
-
N({ type: "text", value: (_.keepEscaping ? x : "") + U() });
|
|
698
|
-
continue;
|
|
699
|
-
}
|
|
700
|
-
if (x === h) {
|
|
701
|
-
N({ type: "text", value: "\\" + x });
|
|
702
|
-
continue;
|
|
703
|
-
}
|
|
704
|
-
if (x === p) {
|
|
705
|
-
O++;
|
|
706
|
-
let q;
|
|
707
|
-
for (; k < D && (q = U()); ) {
|
|
708
|
-
if (x += q, q === p) {
|
|
709
|
-
O++;
|
|
710
|
-
continue;
|
|
711
|
-
}
|
|
712
|
-
if (q === l) {
|
|
713
|
-
x += U();
|
|
714
|
-
continue;
|
|
715
|
-
}
|
|
716
|
-
if (q === h && (O--, O === 0))
|
|
717
|
-
break;
|
|
718
|
-
}
|
|
719
|
-
N({ type: "text", value: x });
|
|
720
|
-
continue;
|
|
721
|
-
}
|
|
722
|
-
if (x === n) {
|
|
723
|
-
v = N({ type: "paren", nodes: [] }), R.push(v), N({ type: "text", value: x });
|
|
724
|
-
continue;
|
|
725
|
-
}
|
|
726
|
-
if (x === e) {
|
|
727
|
-
if (v.type !== "paren") {
|
|
728
|
-
N({ type: "text", value: x });
|
|
729
|
-
continue;
|
|
730
|
-
}
|
|
731
|
-
v = R.pop(), N({ type: "text", value: x }), v = R[R.length - 1];
|
|
732
|
-
continue;
|
|
733
|
-
}
|
|
734
|
-
if (x === d || x === y || x === u) {
|
|
735
|
-
const q = x;
|
|
736
|
-
let F;
|
|
737
|
-
for (_.keepQuotes !== !0 && (x = ""); k < D && (F = U()); ) {
|
|
738
|
-
if (F === l) {
|
|
739
|
-
x += F + U();
|
|
740
|
-
continue;
|
|
741
|
-
}
|
|
742
|
-
if (F === q) {
|
|
743
|
-
_.keepQuotes === !0 && (x += F);
|
|
744
|
-
break;
|
|
745
|
-
}
|
|
746
|
-
x += F;
|
|
747
|
-
}
|
|
748
|
-
N({ type: "text", value: x });
|
|
749
|
-
continue;
|
|
750
|
-
}
|
|
751
|
-
if (x === i) {
|
|
752
|
-
H++;
|
|
753
|
-
const F = {
|
|
754
|
-
type: "brace",
|
|
755
|
-
open: !0,
|
|
756
|
-
close: !1,
|
|
757
|
-
dollar: P.value && P.value.slice(-1) === "$" || v.dollar === !0,
|
|
758
|
-
depth: H,
|
|
759
|
-
commas: 0,
|
|
760
|
-
ranges: 0,
|
|
761
|
-
nodes: []
|
|
762
|
-
};
|
|
763
|
-
v = N(F), R.push(v), N({ type: "open", value: x });
|
|
764
|
-
continue;
|
|
765
|
-
}
|
|
766
|
-
if (x === s) {
|
|
767
|
-
if (v.type !== "brace") {
|
|
768
|
-
N({ type: "text", value: x });
|
|
769
|
-
continue;
|
|
770
|
-
}
|
|
771
|
-
const q = "close";
|
|
772
|
-
v = R.pop(), v.close = !0, N({ type: q, value: x }), H--, v = R[R.length - 1];
|
|
773
|
-
continue;
|
|
774
|
-
}
|
|
775
|
-
if (x === r && H > 0) {
|
|
776
|
-
if (v.ranges > 0) {
|
|
777
|
-
v.ranges = 0;
|
|
778
|
-
const q = v.nodes.shift();
|
|
779
|
-
v.nodes = [q, { type: "text", value: o(v) }];
|
|
780
|
-
}
|
|
781
|
-
N({ type: "comma", value: x }), v.commas++;
|
|
782
|
-
continue;
|
|
783
|
-
}
|
|
784
|
-
if (x === t && H > 0 && v.commas === 0) {
|
|
785
|
-
const q = v.nodes;
|
|
786
|
-
if (H === 0 || q.length === 0) {
|
|
787
|
-
N({ type: "text", value: x });
|
|
788
|
-
continue;
|
|
789
|
-
}
|
|
790
|
-
if (P.type === "dot") {
|
|
791
|
-
if (v.range = [], P.value += x, P.type = "range", v.nodes.length !== 3 && v.nodes.length !== 5) {
|
|
792
|
-
v.invalid = !0, v.ranges = 0, P.type = "text";
|
|
793
|
-
continue;
|
|
794
|
-
}
|
|
795
|
-
v.ranges++, v.args = [];
|
|
796
|
-
continue;
|
|
797
|
-
}
|
|
798
|
-
if (P.type === "range") {
|
|
799
|
-
q.pop();
|
|
800
|
-
const F = q[q.length - 1];
|
|
801
|
-
F.value += P.value + x, P = F, v.ranges--;
|
|
802
|
-
continue;
|
|
803
|
-
}
|
|
804
|
-
N({ type: "dot", value: x });
|
|
805
|
-
continue;
|
|
806
|
-
}
|
|
807
|
-
N({ type: "text", value: x });
|
|
808
|
-
}
|
|
809
|
-
do
|
|
810
|
-
if (v = R.pop(), v.type !== "root") {
|
|
811
|
-
v.nodes.forEach((z) => {
|
|
812
|
-
z.nodes || (z.type === "open" && (z.isOpen = !0), z.type === "close" && (z.isClose = !0), z.nodes || (z.type = "text"), z.invalid = !0);
|
|
813
|
-
});
|
|
814
|
-
const q = R[R.length - 1], F = q.nodes.indexOf(v);
|
|
815
|
-
q.nodes.splice(F, 1, ...v.nodes);
|
|
816
|
-
}
|
|
817
|
-
while (R.length > 0);
|
|
818
|
-
return N({ type: "eos" }), g;
|
|
819
|
-
}, wt;
|
|
820
|
-
}
|
|
821
|
-
var $t, mr;
|
|
822
|
-
function ts() {
|
|
823
|
-
if (mr) return $t;
|
|
824
|
-
mr = 1;
|
|
825
|
-
const o = Yt(), a = Zn(), l = zn(), u = es(), r = (t, n = {}) => {
|
|
826
|
-
let e = [];
|
|
827
|
-
if (Array.isArray(t))
|
|
828
|
-
for (const i of t) {
|
|
829
|
-
const s = r.create(i, n);
|
|
830
|
-
Array.isArray(s) ? e.push(...s) : e.push(s);
|
|
831
|
-
}
|
|
832
|
-
else
|
|
833
|
-
e = [].concat(r.create(t, n));
|
|
834
|
-
return n && n.expand === !0 && n.nodupes === !0 && (e = [...new Set(e)]), e;
|
|
835
|
-
};
|
|
836
|
-
return r.parse = (t, n = {}) => u(t, n), r.stringify = (t, n = {}) => o(typeof t == "string" ? r.parse(t, n) : t, n), r.compile = (t, n = {}) => (typeof t == "string" && (t = r.parse(t, n)), a(t, n)), r.expand = (t, n = {}) => {
|
|
837
|
-
typeof t == "string" && (t = r.parse(t, n));
|
|
838
|
-
let e = l(t, n);
|
|
839
|
-
return n.noempty === !0 && (e = e.filter(Boolean)), n.nodupes === !0 && (e = [...new Set(e)]), e;
|
|
840
|
-
}, r.create = (t, n = {}) => t === "" || t.length < 3 ? [t] : n.expand !== !0 ? r.compile(t, n) : r.expand(t, n), $t = r, $t;
|
|
841
|
-
}
|
|
842
|
-
var Lt = {}, kt, vr;
|
|
843
|
-
function _t() {
|
|
844
|
-
if (vr) return kt;
|
|
845
|
-
vr = 1;
|
|
846
|
-
const o = Se, a = "\\\\/", l = `[^${a}]`, u = 0, r = "\\.", t = "\\+", n = "\\?", e = "\\/", i = "(?=.)", s = "[^/]", p = `(?:${e}|$)`, h = `(?:^|${e})`, d = `${r}{1,2}${p}`, y = `(?!${r})`, T = `(?!${h}${d})`, C = `(?!${r}{0,1}${p})`, m = `(?!${d})`, S = `[^.${e}]`, _ = `${s}*?`, c = {
|
|
847
|
-
DOT_LITERAL: r,
|
|
848
|
-
PLUS_LITERAL: t,
|
|
849
|
-
QMARK_LITERAL: n,
|
|
850
|
-
SLASH_LITERAL: e,
|
|
851
|
-
ONE_CHAR: i,
|
|
852
|
-
QMARK: s,
|
|
853
|
-
END_ANCHOR: p,
|
|
854
|
-
DOTS_SLASH: d,
|
|
855
|
-
NO_DOT: y,
|
|
856
|
-
NO_DOTS: T,
|
|
857
|
-
NO_DOT_SLASH: C,
|
|
858
|
-
NO_DOTS_SLASH: m,
|
|
859
|
-
QMARK_NO_DOT: S,
|
|
860
|
-
STAR: _,
|
|
861
|
-
START_ANCHOR: h
|
|
862
|
-
}, f = {
|
|
863
|
-
...c,
|
|
864
|
-
SLASH_LITERAL: `[${a}]`,
|
|
865
|
-
QMARK: l,
|
|
866
|
-
STAR: `${l}*?`,
|
|
867
|
-
DOTS_SLASH: `${r}{1,2}(?:[${a}]|$)`,
|
|
868
|
-
NO_DOT: `(?!${r})`,
|
|
869
|
-
NO_DOTS: `(?!(?:^|[${a}])${r}{1,2}(?:[${a}]|$))`,
|
|
870
|
-
NO_DOT_SLASH: `(?!${r}{0,1}(?:[${a}]|$))`,
|
|
871
|
-
NO_DOTS_SLASH: `(?!${r}{1,2}(?:[${a}]|$))`,
|
|
872
|
-
QMARK_NO_DOT: `[^.${a}]`,
|
|
873
|
-
START_ANCHOR: `(?:^|[${a}])`,
|
|
874
|
-
END_ANCHOR: `(?:[${a}]|$)`
|
|
875
|
-
}, g = {
|
|
876
|
-
__proto__: null,
|
|
877
|
-
alnum: "a-zA-Z0-9",
|
|
878
|
-
alpha: "a-zA-Z",
|
|
879
|
-
ascii: "\\x00-\\x7F",
|
|
880
|
-
blank: " \\t",
|
|
881
|
-
cntrl: "\\x00-\\x1F\\x7F",
|
|
882
|
-
digit: "0-9",
|
|
883
|
-
graph: "\\x21-\\x7E",
|
|
884
|
-
lower: "a-z",
|
|
885
|
-
print: "\\x20-\\x7E ",
|
|
886
|
-
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
887
|
-
space: " \\t\\r\\n\\v\\f",
|
|
888
|
-
upper: "A-Z",
|
|
889
|
-
word: "A-Za-z0-9_",
|
|
890
|
-
xdigit: "A-Fa-f0-9"
|
|
891
|
-
};
|
|
892
|
-
return kt = {
|
|
893
|
-
DEFAULT_MAX_EXTGLOB_RECURSION: u,
|
|
894
|
-
MAX_LENGTH: 1024 * 64,
|
|
895
|
-
POSIX_REGEX_SOURCE: g,
|
|
896
|
-
// regular expressions
|
|
897
|
-
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
898
|
-
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
899
|
-
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
900
|
-
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
901
|
-
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
902
|
-
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
903
|
-
// Replace globs with equivalent patterns to reduce parsing time.
|
|
904
|
-
REPLACEMENTS: {
|
|
905
|
-
__proto__: null,
|
|
906
|
-
"***": "*",
|
|
907
|
-
"**/**": "**",
|
|
908
|
-
"**/**/**": "**"
|
|
909
|
-
},
|
|
910
|
-
// Digits
|
|
911
|
-
CHAR_0: 48,
|
|
912
|
-
/* 0 */
|
|
913
|
-
CHAR_9: 57,
|
|
914
|
-
/* 9 */
|
|
915
|
-
// Alphabet chars.
|
|
916
|
-
CHAR_UPPERCASE_A: 65,
|
|
917
|
-
/* A */
|
|
918
|
-
CHAR_LOWERCASE_A: 97,
|
|
919
|
-
/* a */
|
|
920
|
-
CHAR_UPPERCASE_Z: 90,
|
|
921
|
-
/* Z */
|
|
922
|
-
CHAR_LOWERCASE_Z: 122,
|
|
923
|
-
/* z */
|
|
924
|
-
CHAR_LEFT_PARENTHESES: 40,
|
|
925
|
-
/* ( */
|
|
926
|
-
CHAR_RIGHT_PARENTHESES: 41,
|
|
927
|
-
/* ) */
|
|
928
|
-
CHAR_ASTERISK: 42,
|
|
929
|
-
/* * */
|
|
930
|
-
// Non-alphabetic chars.
|
|
931
|
-
CHAR_AMPERSAND: 38,
|
|
932
|
-
/* & */
|
|
933
|
-
CHAR_AT: 64,
|
|
934
|
-
/* @ */
|
|
935
|
-
CHAR_BACKWARD_SLASH: 92,
|
|
936
|
-
/* \ */
|
|
937
|
-
CHAR_CARRIAGE_RETURN: 13,
|
|
938
|
-
/* \r */
|
|
939
|
-
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
940
|
-
/* ^ */
|
|
941
|
-
CHAR_COLON: 58,
|
|
942
|
-
/* : */
|
|
943
|
-
CHAR_COMMA: 44,
|
|
944
|
-
/* , */
|
|
945
|
-
CHAR_DOT: 46,
|
|
946
|
-
/* . */
|
|
947
|
-
CHAR_DOUBLE_QUOTE: 34,
|
|
948
|
-
/* " */
|
|
949
|
-
CHAR_EQUAL: 61,
|
|
950
|
-
/* = */
|
|
951
|
-
CHAR_EXCLAMATION_MARK: 33,
|
|
952
|
-
/* ! */
|
|
953
|
-
CHAR_FORM_FEED: 12,
|
|
954
|
-
/* \f */
|
|
955
|
-
CHAR_FORWARD_SLASH: 47,
|
|
956
|
-
/* / */
|
|
957
|
-
CHAR_GRAVE_ACCENT: 96,
|
|
958
|
-
/* ` */
|
|
959
|
-
CHAR_HASH: 35,
|
|
960
|
-
/* # */
|
|
961
|
-
CHAR_HYPHEN_MINUS: 45,
|
|
962
|
-
/* - */
|
|
963
|
-
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
964
|
-
/* < */
|
|
965
|
-
CHAR_LEFT_CURLY_BRACE: 123,
|
|
966
|
-
/* { */
|
|
967
|
-
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
968
|
-
/* [ */
|
|
969
|
-
CHAR_LINE_FEED: 10,
|
|
970
|
-
/* \n */
|
|
971
|
-
CHAR_NO_BREAK_SPACE: 160,
|
|
972
|
-
/* \u00A0 */
|
|
973
|
-
CHAR_PERCENT: 37,
|
|
974
|
-
/* % */
|
|
975
|
-
CHAR_PLUS: 43,
|
|
976
|
-
/* + */
|
|
977
|
-
CHAR_QUESTION_MARK: 63,
|
|
978
|
-
/* ? */
|
|
979
|
-
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
980
|
-
/* > */
|
|
981
|
-
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
982
|
-
/* } */
|
|
983
|
-
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
984
|
-
/* ] */
|
|
985
|
-
CHAR_SEMICOLON: 59,
|
|
986
|
-
/* ; */
|
|
987
|
-
CHAR_SINGLE_QUOTE: 39,
|
|
988
|
-
/* ' */
|
|
989
|
-
CHAR_SPACE: 32,
|
|
990
|
-
/* */
|
|
991
|
-
CHAR_TAB: 9,
|
|
992
|
-
/* \t */
|
|
993
|
-
CHAR_UNDERSCORE: 95,
|
|
994
|
-
/* _ */
|
|
995
|
-
CHAR_VERTICAL_LINE: 124,
|
|
996
|
-
/* | */
|
|
997
|
-
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
998
|
-
/* \uFEFF */
|
|
999
|
-
SEP: o.sep,
|
|
1000
|
-
/**
|
|
1001
|
-
* Create EXTGLOB_CHARS
|
|
1002
|
-
*/
|
|
1003
|
-
extglobChars(R) {
|
|
1004
|
-
return {
|
|
1005
|
-
"!": { type: "negate", open: "(?:(?!(?:", close: `))${R.STAR})` },
|
|
1006
|
-
"?": { type: "qmark", open: "(?:", close: ")?" },
|
|
1007
|
-
"+": { type: "plus", open: "(?:", close: ")+" },
|
|
1008
|
-
"*": { type: "star", open: "(?:", close: ")*" },
|
|
1009
|
-
"@": { type: "at", open: "(?:", close: ")" }
|
|
1010
|
-
};
|
|
1011
|
-
},
|
|
1012
|
-
/**
|
|
1013
|
-
* Create GLOB_CHARS
|
|
1014
|
-
*/
|
|
1015
|
-
globChars(R) {
|
|
1016
|
-
return R === !0 ? f : c;
|
|
1017
|
-
}
|
|
1018
|
-
}, kt;
|
|
1019
|
-
}
|
|
1020
|
-
var Rr;
|
|
1021
|
-
function gt() {
|
|
1022
|
-
return Rr || (Rr = 1, (function(o) {
|
|
1023
|
-
const a = Se, l = process.platform === "win32", {
|
|
1024
|
-
REGEX_BACKSLASH: u,
|
|
1025
|
-
REGEX_REMOVE_BACKSLASH: r,
|
|
1026
|
-
REGEX_SPECIAL_CHARS: t,
|
|
1027
|
-
REGEX_SPECIAL_CHARS_GLOBAL: n
|
|
1028
|
-
} = _t();
|
|
1029
|
-
o.isObject = (e) => e !== null && typeof e == "object" && !Array.isArray(e), o.hasRegexChars = (e) => t.test(e), o.isRegexChar = (e) => e.length === 1 && o.hasRegexChars(e), o.escapeRegex = (e) => e.replace(n, "\\$1"), o.toPosixSlashes = (e) => e.replace(u, "/"), o.removeBackslashes = (e) => e.replace(r, (i) => i === "\\" ? "" : i), o.supportsLookbehinds = () => {
|
|
1030
|
-
const e = process.version.slice(1).split(".").map(Number);
|
|
1031
|
-
return e.length === 3 && e[0] >= 9 || e[0] === 8 && e[1] >= 10;
|
|
1032
|
-
}, o.isWindows = (e) => e && typeof e.windows == "boolean" ? e.windows : l === !0 || a.sep === "\\", o.escapeLast = (e, i, s) => {
|
|
1033
|
-
const p = e.lastIndexOf(i, s);
|
|
1034
|
-
return p === -1 ? e : e[p - 1] === "\\" ? o.escapeLast(e, i, p - 1) : `${e.slice(0, p)}\\${e.slice(p)}`;
|
|
1035
|
-
}, o.removePrefix = (e, i = {}) => {
|
|
1036
|
-
let s = e;
|
|
1037
|
-
return s.startsWith("./") && (s = s.slice(2), i.prefix = "./"), s;
|
|
1038
|
-
}, o.wrapOutput = (e, i = {}, s = {}) => {
|
|
1039
|
-
const p = s.contains ? "" : "^", h = s.contains ? "" : "$";
|
|
1040
|
-
let d = `${p}(?:${e})${h}`;
|
|
1041
|
-
return i.negated === !0 && (d = `(?:^(?!${d}).*$)`), d;
|
|
1042
|
-
};
|
|
1043
|
-
})(Lt)), Lt;
|
|
1044
|
-
}
|
|
1045
|
-
var Ht, Er;
|
|
1046
|
-
function rs() {
|
|
1047
|
-
if (Er) return Ht;
|
|
1048
|
-
Er = 1;
|
|
1049
|
-
const o = gt(), {
|
|
1050
|
-
CHAR_ASTERISK: a,
|
|
1051
|
-
/* * */
|
|
1052
|
-
CHAR_AT: l,
|
|
1053
|
-
/* @ */
|
|
1054
|
-
CHAR_BACKWARD_SLASH: u,
|
|
1055
|
-
/* \ */
|
|
1056
|
-
CHAR_COMMA: r,
|
|
1057
|
-
/* , */
|
|
1058
|
-
CHAR_DOT: t,
|
|
1059
|
-
/* . */
|
|
1060
|
-
CHAR_EXCLAMATION_MARK: n,
|
|
1061
|
-
/* ! */
|
|
1062
|
-
CHAR_FORWARD_SLASH: e,
|
|
1063
|
-
/* / */
|
|
1064
|
-
CHAR_LEFT_CURLY_BRACE: i,
|
|
1065
|
-
/* { */
|
|
1066
|
-
CHAR_LEFT_PARENTHESES: s,
|
|
1067
|
-
/* ( */
|
|
1068
|
-
CHAR_LEFT_SQUARE_BRACKET: p,
|
|
1069
|
-
/* [ */
|
|
1070
|
-
CHAR_PLUS: h,
|
|
1071
|
-
/* + */
|
|
1072
|
-
CHAR_QUESTION_MARK: d,
|
|
1073
|
-
/* ? */
|
|
1074
|
-
CHAR_RIGHT_CURLY_BRACE: y,
|
|
1075
|
-
/* } */
|
|
1076
|
-
CHAR_RIGHT_PARENTHESES: T,
|
|
1077
|
-
/* ) */
|
|
1078
|
-
CHAR_RIGHT_SQUARE_BRACKET: C
|
|
1079
|
-
/* ] */
|
|
1080
|
-
} = _t(), m = (c) => c === e || c === u, S = (c) => {
|
|
1081
|
-
c.isPrefix !== !0 && (c.depth = c.isGlobstar ? 1 / 0 : 1);
|
|
1082
|
-
};
|
|
1083
|
-
return Ht = (c, f) => {
|
|
1084
|
-
const g = f || {}, R = c.length - 1, v = g.parts === !0 || g.scanToEnd === !0, P = [], O = [], D = [];
|
|
1085
|
-
let k = c, H = -1, x = 0, U = 0, N = !1, q = !1, F = !1, z = !1, ce = !1, $ = !1, M = !1, V = !1, oe = !1, ue = !1, ae = 0, fe, B, W = { value: "", depth: 0, isGlob: !1 };
|
|
1086
|
-
const A = () => H >= R, le = () => k.charCodeAt(H + 1), te = () => (fe = B, k.charCodeAt(++H));
|
|
1087
|
-
for (; H < R; ) {
|
|
1088
|
-
B = te();
|
|
1089
|
-
let K;
|
|
1090
|
-
if (B === u) {
|
|
1091
|
-
M = W.backslashes = !0, B = te(), B === i && ($ = !0);
|
|
1092
|
-
continue;
|
|
1093
|
-
}
|
|
1094
|
-
if ($ === !0 || B === i) {
|
|
1095
|
-
for (ae++; A() !== !0 && (B = te()); ) {
|
|
1096
|
-
if (B === u) {
|
|
1097
|
-
M = W.backslashes = !0, te();
|
|
1098
|
-
continue;
|
|
1099
|
-
}
|
|
1100
|
-
if (B === i) {
|
|
1101
|
-
ae++;
|
|
1102
|
-
continue;
|
|
1103
|
-
}
|
|
1104
|
-
if ($ !== !0 && B === t && (B = te()) === t) {
|
|
1105
|
-
if (N = W.isBrace = !0, F = W.isGlob = !0, ue = !0, v === !0)
|
|
1106
|
-
continue;
|
|
1107
|
-
break;
|
|
1108
|
-
}
|
|
1109
|
-
if ($ !== !0 && B === r) {
|
|
1110
|
-
if (N = W.isBrace = !0, F = W.isGlob = !0, ue = !0, v === !0)
|
|
1111
|
-
continue;
|
|
1112
|
-
break;
|
|
1113
|
-
}
|
|
1114
|
-
if (B === y && (ae--, ae === 0)) {
|
|
1115
|
-
$ = !1, N = W.isBrace = !0, ue = !0;
|
|
1116
|
-
break;
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
if (v === !0)
|
|
1120
|
-
continue;
|
|
1121
|
-
break;
|
|
1122
|
-
}
|
|
1123
|
-
if (B === e) {
|
|
1124
|
-
if (P.push(H), O.push(W), W = { value: "", depth: 0, isGlob: !1 }, ue === !0) continue;
|
|
1125
|
-
if (fe === t && H === x + 1) {
|
|
1126
|
-
x += 2;
|
|
1127
|
-
continue;
|
|
1128
|
-
}
|
|
1129
|
-
U = H + 1;
|
|
1130
|
-
continue;
|
|
1131
|
-
}
|
|
1132
|
-
if (g.noext !== !0 && (B === h || B === l || B === a || B === d || B === n) === !0 && le() === s) {
|
|
1133
|
-
if (F = W.isGlob = !0, z = W.isExtglob = !0, ue = !0, B === n && H === x && (oe = !0), v === !0) {
|
|
1134
|
-
for (; A() !== !0 && (B = te()); ) {
|
|
1135
|
-
if (B === u) {
|
|
1136
|
-
M = W.backslashes = !0, B = te();
|
|
1137
|
-
continue;
|
|
1138
|
-
}
|
|
1139
|
-
if (B === T) {
|
|
1140
|
-
F = W.isGlob = !0, ue = !0;
|
|
1141
|
-
break;
|
|
1142
|
-
}
|
|
1143
|
-
}
|
|
1144
|
-
continue;
|
|
1145
|
-
}
|
|
1146
|
-
break;
|
|
1147
|
-
}
|
|
1148
|
-
if (B === a) {
|
|
1149
|
-
if (fe === a && (ce = W.isGlobstar = !0), F = W.isGlob = !0, ue = !0, v === !0)
|
|
1150
|
-
continue;
|
|
1151
|
-
break;
|
|
1152
|
-
}
|
|
1153
|
-
if (B === d) {
|
|
1154
|
-
if (F = W.isGlob = !0, ue = !0, v === !0)
|
|
1155
|
-
continue;
|
|
1156
|
-
break;
|
|
1157
|
-
}
|
|
1158
|
-
if (B === p) {
|
|
1159
|
-
for (; A() !== !0 && (K = te()); ) {
|
|
1160
|
-
if (K === u) {
|
|
1161
|
-
M = W.backslashes = !0, te();
|
|
1162
|
-
continue;
|
|
1163
|
-
}
|
|
1164
|
-
if (K === C) {
|
|
1165
|
-
q = W.isBracket = !0, F = W.isGlob = !0, ue = !0;
|
|
1166
|
-
break;
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
if (v === !0)
|
|
1170
|
-
continue;
|
|
1171
|
-
break;
|
|
1172
|
-
}
|
|
1173
|
-
if (g.nonegate !== !0 && B === n && H === x) {
|
|
1174
|
-
V = W.negated = !0, x++;
|
|
1175
|
-
continue;
|
|
1176
|
-
}
|
|
1177
|
-
if (g.noparen !== !0 && B === s) {
|
|
1178
|
-
if (F = W.isGlob = !0, v === !0) {
|
|
1179
|
-
for (; A() !== !0 && (B = te()); ) {
|
|
1180
|
-
if (B === s) {
|
|
1181
|
-
M = W.backslashes = !0, B = te();
|
|
1182
|
-
continue;
|
|
1183
|
-
}
|
|
1184
|
-
if (B === T) {
|
|
1185
|
-
ue = !0;
|
|
1186
|
-
break;
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
continue;
|
|
1190
|
-
}
|
|
1191
|
-
break;
|
|
1192
|
-
}
|
|
1193
|
-
if (F === !0) {
|
|
1194
|
-
if (ue = !0, v === !0)
|
|
1195
|
-
continue;
|
|
1196
|
-
break;
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
g.noext === !0 && (z = !1, F = !1);
|
|
1200
|
-
let J = k, b = "", E = "";
|
|
1201
|
-
x > 0 && (b = k.slice(0, x), k = k.slice(x), U -= x), J && F === !0 && U > 0 ? (J = k.slice(0, U), E = k.slice(U)) : F === !0 ? (J = "", E = k) : J = k, J && J !== "" && J !== "/" && J !== k && m(J.charCodeAt(J.length - 1)) && (J = J.slice(0, -1)), g.unescape === !0 && (E && (E = o.removeBackslashes(E)), J && M === !0 && (J = o.removeBackslashes(J)));
|
|
1202
|
-
const he = {
|
|
1203
|
-
prefix: b,
|
|
1204
|
-
input: c,
|
|
1205
|
-
start: x,
|
|
1206
|
-
base: J,
|
|
1207
|
-
glob: E,
|
|
1208
|
-
isBrace: N,
|
|
1209
|
-
isBracket: q,
|
|
1210
|
-
isGlob: F,
|
|
1211
|
-
isExtglob: z,
|
|
1212
|
-
isGlobstar: ce,
|
|
1213
|
-
negated: V,
|
|
1214
|
-
negatedExtglob: oe
|
|
1215
|
-
};
|
|
1216
|
-
if (g.tokens === !0 && (he.maxDepth = 0, m(B) || O.push(W), he.tokens = O), g.parts === !0 || g.tokens === !0) {
|
|
1217
|
-
let K;
|
|
1218
|
-
for (let Z = 0; Z < P.length; Z++) {
|
|
1219
|
-
const me = K ? K + 1 : x, pe = P[Z], be = c.slice(me, pe);
|
|
1220
|
-
g.tokens && (Z === 0 && x !== 0 ? (O[Z].isPrefix = !0, O[Z].value = b) : O[Z].value = be, S(O[Z]), he.maxDepth += O[Z].depth), (Z !== 0 || be !== "") && D.push(be), K = pe;
|
|
1221
|
-
}
|
|
1222
|
-
if (K && K + 1 < c.length) {
|
|
1223
|
-
const Z = c.slice(K + 1);
|
|
1224
|
-
D.push(Z), g.tokens && (O[O.length - 1].value = Z, S(O[O.length - 1]), he.maxDepth += O[O.length - 1].depth);
|
|
1225
|
-
}
|
|
1226
|
-
he.slashes = P, he.parts = D;
|
|
1227
|
-
}
|
|
1228
|
-
return he;
|
|
1229
|
-
}, Ht;
|
|
1230
|
-
}
|
|
1231
|
-
var Mt, Ar;
|
|
1232
|
-
function ns() {
|
|
1233
|
-
if (Ar) return Mt;
|
|
1234
|
-
Ar = 1;
|
|
1235
|
-
const o = _t(), a = gt(), {
|
|
1236
|
-
MAX_LENGTH: l,
|
|
1237
|
-
POSIX_REGEX_SOURCE: u,
|
|
1238
|
-
REGEX_NON_SPECIAL_CHARS: r,
|
|
1239
|
-
REGEX_SPECIAL_CHARS_BACKREF: t,
|
|
1240
|
-
REPLACEMENTS: n
|
|
1241
|
-
} = o, e = (_, c) => {
|
|
1242
|
-
if (typeof c.expandRange == "function")
|
|
1243
|
-
return c.expandRange(..._, c);
|
|
1244
|
-
_.sort();
|
|
1245
|
-
const f = `[${_.join("-")}]`;
|
|
1246
|
-
try {
|
|
1247
|
-
new RegExp(f);
|
|
1248
|
-
} catch {
|
|
1249
|
-
return _.map((R) => a.escapeRegex(R)).join("..");
|
|
1250
|
-
}
|
|
1251
|
-
return f;
|
|
1252
|
-
}, i = (_, c) => `Missing ${_}: "${c}" - use "\\\\${c}" to match literal characters`, s = (_) => {
|
|
1253
|
-
const c = [];
|
|
1254
|
-
let f = 0, g = 0, R = 0, v = "", P = !1;
|
|
1255
|
-
for (const O of _) {
|
|
1256
|
-
if (P === !0) {
|
|
1257
|
-
v += O, P = !1;
|
|
1258
|
-
continue;
|
|
1259
|
-
}
|
|
1260
|
-
if (O === "\\") {
|
|
1261
|
-
v += O, P = !0;
|
|
1262
|
-
continue;
|
|
1263
|
-
}
|
|
1264
|
-
if (O === '"') {
|
|
1265
|
-
R = R === 1 ? 0 : 1, v += O;
|
|
1266
|
-
continue;
|
|
1267
|
-
}
|
|
1268
|
-
if (R === 0) {
|
|
1269
|
-
if (O === "[")
|
|
1270
|
-
f++;
|
|
1271
|
-
else if (O === "]" && f > 0)
|
|
1272
|
-
f--;
|
|
1273
|
-
else if (f === 0) {
|
|
1274
|
-
if (O === "(")
|
|
1275
|
-
g++;
|
|
1276
|
-
else if (O === ")" && g > 0)
|
|
1277
|
-
g--;
|
|
1278
|
-
else if (O === "|" && g === 0) {
|
|
1279
|
-
c.push(v), v = "";
|
|
1280
|
-
continue;
|
|
1281
|
-
}
|
|
1282
|
-
}
|
|
1283
|
-
}
|
|
1284
|
-
v += O;
|
|
1285
|
-
}
|
|
1286
|
-
return c.push(v), c;
|
|
1287
|
-
}, p = (_) => {
|
|
1288
|
-
let c = !1;
|
|
1289
|
-
for (const f of _) {
|
|
1290
|
-
if (c === !0) {
|
|
1291
|
-
c = !1;
|
|
1292
|
-
continue;
|
|
1293
|
-
}
|
|
1294
|
-
if (f === "\\") {
|
|
1295
|
-
c = !0;
|
|
1296
|
-
continue;
|
|
1297
|
-
}
|
|
1298
|
-
if (/[?*+@!()[\]{}]/.test(f))
|
|
1299
|
-
return !1;
|
|
1300
|
-
}
|
|
1301
|
-
return !0;
|
|
1302
|
-
}, h = (_) => {
|
|
1303
|
-
let c = _.trim(), f = !0;
|
|
1304
|
-
for (; f === !0; )
|
|
1305
|
-
f = !1, /^@\([^\\()[\]{}|]+\)$/.test(c) && (c = c.slice(2, -1), f = !0);
|
|
1306
|
-
if (p(c))
|
|
1307
|
-
return c.replace(/\\(.)/g, "$1");
|
|
1308
|
-
}, d = (_) => {
|
|
1309
|
-
const c = _.map(h).filter(Boolean);
|
|
1310
|
-
for (let f = 0; f < c.length; f++)
|
|
1311
|
-
for (let g = f + 1; g < c.length; g++) {
|
|
1312
|
-
const R = c[f], v = c[g], P = R[0];
|
|
1313
|
-
if (!(!P || R !== P.repeat(R.length) || v !== P.repeat(v.length)) && (R === v || R.startsWith(v) || v.startsWith(R)))
|
|
1314
|
-
return !0;
|
|
1315
|
-
}
|
|
1316
|
-
return !1;
|
|
1317
|
-
}, y = (_, c = !0) => {
|
|
1318
|
-
if (_[0] !== "+" && _[0] !== "*" || _[1] !== "(")
|
|
1319
|
-
return;
|
|
1320
|
-
let f = 0, g = 0, R = 0, v = !1;
|
|
1321
|
-
for (let P = 1; P < _.length; P++) {
|
|
1322
|
-
const O = _[P];
|
|
1323
|
-
if (v === !0) {
|
|
1324
|
-
v = !1;
|
|
1325
|
-
continue;
|
|
1326
|
-
}
|
|
1327
|
-
if (O === "\\") {
|
|
1328
|
-
v = !0;
|
|
1329
|
-
continue;
|
|
1330
|
-
}
|
|
1331
|
-
if (O === '"') {
|
|
1332
|
-
R = R === 1 ? 0 : 1;
|
|
1333
|
-
continue;
|
|
1334
|
-
}
|
|
1335
|
-
if (R !== 1) {
|
|
1336
|
-
if (O === "[") {
|
|
1337
|
-
f++;
|
|
1338
|
-
continue;
|
|
1339
|
-
}
|
|
1340
|
-
if (O === "]" && f > 0) {
|
|
1341
|
-
f--;
|
|
1342
|
-
continue;
|
|
1343
|
-
}
|
|
1344
|
-
if (!(f > 0)) {
|
|
1345
|
-
if (O === "(") {
|
|
1346
|
-
g++;
|
|
1347
|
-
continue;
|
|
1348
|
-
}
|
|
1349
|
-
if (O === ")" && (g--, g === 0))
|
|
1350
|
-
return c === !0 && P !== _.length - 1 ? void 0 : {
|
|
1351
|
-
type: _[0],
|
|
1352
|
-
body: _.slice(2, P),
|
|
1353
|
-
end: P
|
|
1354
|
-
};
|
|
1355
|
-
}
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
}, T = (_) => {
|
|
1359
|
-
let c = 0;
|
|
1360
|
-
const f = [];
|
|
1361
|
-
for (; c < _.length; ) {
|
|
1362
|
-
const R = y(_.slice(c), !1);
|
|
1363
|
-
if (!R || R.type !== "*")
|
|
1364
|
-
return;
|
|
1365
|
-
const v = s(R.body).map((O) => O.trim());
|
|
1366
|
-
if (v.length !== 1)
|
|
1367
|
-
return;
|
|
1368
|
-
const P = h(v[0]);
|
|
1369
|
-
if (!P || P.length !== 1)
|
|
1370
|
-
return;
|
|
1371
|
-
f.push(P), c += R.end + 1;
|
|
1372
|
-
}
|
|
1373
|
-
return f.length < 1 ? void 0 : `${f.length === 1 ? a.escapeRegex(f[0]) : `[${f.map((R) => a.escapeRegex(R)).join("")}]`}*`;
|
|
1374
|
-
}, C = (_) => {
|
|
1375
|
-
let c = 0, f = _.trim(), g = y(f);
|
|
1376
|
-
for (; g; )
|
|
1377
|
-
c++, f = g.body.trim(), g = y(f);
|
|
1378
|
-
return c;
|
|
1379
|
-
}, m = (_, c) => {
|
|
1380
|
-
if (c.maxExtglobRecursion === !1)
|
|
1381
|
-
return { risky: !1 };
|
|
1382
|
-
const f = typeof c.maxExtglobRecursion == "number" ? c.maxExtglobRecursion : o.DEFAULT_MAX_EXTGLOB_RECURSION, g = s(_).map((R) => R.trim());
|
|
1383
|
-
if (g.length > 1 && (g.some((R) => R === "") || g.some((R) => /^[*?]+$/.test(R)) || d(g)))
|
|
1384
|
-
return { risky: !0 };
|
|
1385
|
-
for (const R of g) {
|
|
1386
|
-
const v = T(R);
|
|
1387
|
-
if (v)
|
|
1388
|
-
return { risky: !0, safeOutput: v };
|
|
1389
|
-
if (C(R) > f)
|
|
1390
|
-
return { risky: !0 };
|
|
1391
|
-
}
|
|
1392
|
-
return { risky: !1 };
|
|
1393
|
-
}, S = (_, c) => {
|
|
1394
|
-
if (typeof _ != "string")
|
|
1395
|
-
throw new TypeError("Expected a string");
|
|
1396
|
-
_ = n[_] || _;
|
|
1397
|
-
const f = { ...c }, g = typeof f.maxLength == "number" ? Math.min(l, f.maxLength) : l;
|
|
1398
|
-
let R = _.length;
|
|
1399
|
-
if (R > g)
|
|
1400
|
-
throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${g}`);
|
|
1401
|
-
const v = { type: "bos", value: "", output: f.prepend || "" }, P = [v], O = f.capture ? "" : "?:", D = a.isWindows(c), k = o.globChars(D), H = o.extglobChars(k), {
|
|
1402
|
-
DOT_LITERAL: x,
|
|
1403
|
-
PLUS_LITERAL: U,
|
|
1404
|
-
SLASH_LITERAL: N,
|
|
1405
|
-
ONE_CHAR: q,
|
|
1406
|
-
DOTS_SLASH: F,
|
|
1407
|
-
NO_DOT: z,
|
|
1408
|
-
NO_DOT_SLASH: ce,
|
|
1409
|
-
NO_DOTS_SLASH: $,
|
|
1410
|
-
QMARK: M,
|
|
1411
|
-
QMARK_NO_DOT: V,
|
|
1412
|
-
STAR: oe,
|
|
1413
|
-
START_ANCHOR: ue
|
|
1414
|
-
} = k, ae = (L) => `(${O}(?:(?!${ue}${L.dot ? F : x}).)*?)`, fe = f.dot ? "" : z, B = f.dot ? M : V;
|
|
1415
|
-
let W = f.bash === !0 ? ae(f) : oe;
|
|
1416
|
-
f.capture && (W = `(${W})`), typeof f.noext == "boolean" && (f.noextglob = f.noext);
|
|
1417
|
-
const A = {
|
|
1418
|
-
input: _,
|
|
1419
|
-
index: -1,
|
|
1420
|
-
start: 0,
|
|
1421
|
-
dot: f.dot === !0,
|
|
1422
|
-
consumed: "",
|
|
1423
|
-
output: "",
|
|
1424
|
-
prefix: "",
|
|
1425
|
-
backtrack: !1,
|
|
1426
|
-
negated: !1,
|
|
1427
|
-
brackets: 0,
|
|
1428
|
-
braces: 0,
|
|
1429
|
-
parens: 0,
|
|
1430
|
-
quotes: 0,
|
|
1431
|
-
globstar: !1,
|
|
1432
|
-
tokens: P
|
|
1433
|
-
};
|
|
1434
|
-
_ = a.removePrefix(_, A), R = _.length;
|
|
1435
|
-
const le = [], te = [], J = [];
|
|
1436
|
-
let b = v, E;
|
|
1437
|
-
const he = () => A.index === R - 1, K = A.peek = (L = 1) => _[A.index + L], Z = A.advance = () => _[++A.index] || "", me = () => _.slice(A.index + 1), pe = (L = "", Y = 0) => {
|
|
1438
|
-
A.consumed += L, A.index += Y;
|
|
1439
|
-
}, be = (L) => {
|
|
1440
|
-
A.output += L.output != null ? L.output : L.value, pe(L.value);
|
|
1441
|
-
}, kn = () => {
|
|
1442
|
-
let L = 1;
|
|
1443
|
-
for (; K() === "!" && (K(2) !== "(" || K(3) === "?"); )
|
|
1444
|
-
Z(), A.start++, L++;
|
|
1445
|
-
return L % 2 === 0 ? !1 : (A.negated = !0, A.start++, !0);
|
|
1446
|
-
}, je = (L) => {
|
|
1447
|
-
A[L]++, J.push(L);
|
|
1448
|
-
}, Pe = (L) => {
|
|
1449
|
-
A[L]--, J.pop();
|
|
1450
|
-
}, G = (L) => {
|
|
1451
|
-
if (b.type === "globstar") {
|
|
1452
|
-
const Y = A.braces > 0 && (L.type === "comma" || L.type === "brace"), w = L.extglob === !0 || le.length && (L.type === "pipe" || L.type === "paren");
|
|
1453
|
-
L.type !== "slash" && L.type !== "paren" && !Y && !w && (A.output = A.output.slice(0, -b.output.length), b.type = "star", b.value = "*", b.output = W, A.output += b.output);
|
|
1454
|
-
}
|
|
1455
|
-
if (le.length && L.type !== "paren" && (le[le.length - 1].inner += L.value), (L.value || L.output) && be(L), b && b.type === "text" && L.type === "text") {
|
|
1456
|
-
b.value += L.value, b.output = (b.output || "") + L.value;
|
|
1457
|
-
return;
|
|
1458
|
-
}
|
|
1459
|
-
L.prev = b, P.push(L), b = L;
|
|
1460
|
-
}, Ge = (L, Y) => {
|
|
1461
|
-
const w = { ...H[Y], conditions: 1, inner: "" };
|
|
1462
|
-
w.prev = b, w.parens = A.parens, w.output = A.output, w.startIndex = A.index, w.tokensIndex = P.length;
|
|
1463
|
-
const j = (f.capture ? "(" : "") + w.open;
|
|
1464
|
-
je("parens"), G({ type: L, value: Y, output: A.output ? "" : q }), G({ type: "paren", extglob: !0, value: Z(), output: j }), le.push(w);
|
|
1465
|
-
}, Hn = (L) => {
|
|
1466
|
-
const Y = _.slice(L.startIndex, A.index + 1), w = _.slice(L.startIndex + 2, A.index), j = m(w, f);
|
|
1467
|
-
if ((L.type === "plus" || L.type === "star") && j.risky) {
|
|
1468
|
-
const Q = j.safeOutput ? (L.output ? "" : q) + (f.capture ? `(${j.safeOutput})` : j.safeOutput) : void 0, ge = P[L.tokensIndex];
|
|
1469
|
-
ge.type = "text", ge.value = Y, ge.output = Q || a.escapeRegex(Y);
|
|
1470
|
-
for (let ye = L.tokensIndex + 1; ye < P.length; ye++)
|
|
1471
|
-
P[ye].value = "", P[ye].output = "", delete P[ye].suffix;
|
|
1472
|
-
A.output = L.output + ge.output, A.backtrack = !0, G({ type: "paren", extglob: !0, value: E, output: "" }), Pe("parens");
|
|
1473
|
-
return;
|
|
1474
|
-
}
|
|
1475
|
-
let X = L.close + (f.capture ? ")" : ""), re;
|
|
1476
|
-
if (L.type === "negate") {
|
|
1477
|
-
let Q = W;
|
|
1478
|
-
if (L.inner && L.inner.length > 1 && L.inner.includes("/") && (Q = ae(f)), (Q !== W || he() || /^\)+$/.test(me())) && (X = L.close = `)$))${Q}`), L.inner.includes("*") && (re = me()) && /^\.[^\\/.]+$/.test(re)) {
|
|
1479
|
-
const ge = S(re, { ...c, fastpaths: !1 }).output;
|
|
1480
|
-
X = L.close = `)${ge})${Q})`;
|
|
1481
|
-
}
|
|
1482
|
-
L.prev.type === "bos" && (A.negatedExtglob = !0);
|
|
1483
|
-
}
|
|
1484
|
-
G({ type: "paren", extglob: !0, value: E, output: X }), Pe("parens");
|
|
1485
|
-
};
|
|
1486
|
-
if (f.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(_)) {
|
|
1487
|
-
let L = !1, Y = _.replace(t, (w, j, X, re, Q, ge) => re === "\\" ? (L = !0, w) : re === "?" ? j ? j + re + (Q ? M.repeat(Q.length) : "") : ge === 0 ? B + (Q ? M.repeat(Q.length) : "") : M.repeat(X.length) : re === "." ? x.repeat(X.length) : re === "*" ? j ? j + re + (Q ? W : "") : W : j ? w : `\\${w}`);
|
|
1488
|
-
return L === !0 && (f.unescape === !0 ? Y = Y.replace(/\\/g, "") : Y = Y.replace(/\\+/g, (w) => w.length % 2 === 0 ? "\\\\" : w ? "\\" : "")), Y === _ && f.contains === !0 ? (A.output = _, A) : (A.output = a.wrapOutput(Y, A, c), A);
|
|
1489
|
-
}
|
|
1490
|
-
for (; !he(); ) {
|
|
1491
|
-
if (E = Z(), E === "\0")
|
|
1492
|
-
continue;
|
|
1493
|
-
if (E === "\\") {
|
|
1494
|
-
const w = K();
|
|
1495
|
-
if (w === "/" && f.bash !== !0 || w === "." || w === ";")
|
|
1496
|
-
continue;
|
|
1497
|
-
if (!w) {
|
|
1498
|
-
E += "\\", G({ type: "text", value: E });
|
|
1499
|
-
continue;
|
|
1500
|
-
}
|
|
1501
|
-
const j = /^\\+/.exec(me());
|
|
1502
|
-
let X = 0;
|
|
1503
|
-
if (j && j[0].length > 2 && (X = j[0].length, A.index += X, X % 2 !== 0 && (E += "\\")), f.unescape === !0 ? E = Z() : E += Z(), A.brackets === 0) {
|
|
1504
|
-
G({ type: "text", value: E });
|
|
1505
|
-
continue;
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
if (A.brackets > 0 && (E !== "]" || b.value === "[" || b.value === "[^")) {
|
|
1509
|
-
if (f.posix !== !1 && E === ":") {
|
|
1510
|
-
const w = b.value.slice(1);
|
|
1511
|
-
if (w.includes("[") && (b.posix = !0, w.includes(":"))) {
|
|
1512
|
-
const j = b.value.lastIndexOf("["), X = b.value.slice(0, j), re = b.value.slice(j + 2), Q = u[re];
|
|
1513
|
-
if (Q) {
|
|
1514
|
-
b.value = X + Q, A.backtrack = !0, Z(), !v.output && P.indexOf(b) === 1 && (v.output = q);
|
|
1515
|
-
continue;
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
}
|
|
1519
|
-
(E === "[" && K() !== ":" || E === "-" && K() === "]") && (E = `\\${E}`), E === "]" && (b.value === "[" || b.value === "[^") && (E = `\\${E}`), f.posix === !0 && E === "!" && b.value === "[" && (E = "^"), b.value += E, be({ value: E });
|
|
1520
|
-
continue;
|
|
1521
|
-
}
|
|
1522
|
-
if (A.quotes === 1 && E !== '"') {
|
|
1523
|
-
E = a.escapeRegex(E), b.value += E, be({ value: E });
|
|
1524
|
-
continue;
|
|
1525
|
-
}
|
|
1526
|
-
if (E === '"') {
|
|
1527
|
-
A.quotes = A.quotes === 1 ? 0 : 1, f.keepQuotes === !0 && G({ type: "text", value: E });
|
|
1528
|
-
continue;
|
|
1529
|
-
}
|
|
1530
|
-
if (E === "(") {
|
|
1531
|
-
je("parens"), G({ type: "paren", value: E });
|
|
1532
|
-
continue;
|
|
1533
|
-
}
|
|
1534
|
-
if (E === ")") {
|
|
1535
|
-
if (A.parens === 0 && f.strictBrackets === !0)
|
|
1536
|
-
throw new SyntaxError(i("opening", "("));
|
|
1537
|
-
const w = le[le.length - 1];
|
|
1538
|
-
if (w && A.parens === w.parens + 1) {
|
|
1539
|
-
Hn(le.pop());
|
|
1540
|
-
continue;
|
|
1541
|
-
}
|
|
1542
|
-
G({ type: "paren", value: E, output: A.parens ? ")" : "\\)" }), Pe("parens");
|
|
1543
|
-
continue;
|
|
1544
|
-
}
|
|
1545
|
-
if (E === "[") {
|
|
1546
|
-
if (f.nobracket === !0 || !me().includes("]")) {
|
|
1547
|
-
if (f.nobracket !== !0 && f.strictBrackets === !0)
|
|
1548
|
-
throw new SyntaxError(i("closing", "]"));
|
|
1549
|
-
E = `\\${E}`;
|
|
1550
|
-
} else
|
|
1551
|
-
je("brackets");
|
|
1552
|
-
G({ type: "bracket", value: E });
|
|
1553
|
-
continue;
|
|
1554
|
-
}
|
|
1555
|
-
if (E === "]") {
|
|
1556
|
-
if (f.nobracket === !0 || b && b.type === "bracket" && b.value.length === 1) {
|
|
1557
|
-
G({ type: "text", value: E, output: `\\${E}` });
|
|
1558
|
-
continue;
|
|
1559
|
-
}
|
|
1560
|
-
if (A.brackets === 0) {
|
|
1561
|
-
if (f.strictBrackets === !0)
|
|
1562
|
-
throw new SyntaxError(i("opening", "["));
|
|
1563
|
-
G({ type: "text", value: E, output: `\\${E}` });
|
|
1564
|
-
continue;
|
|
1565
|
-
}
|
|
1566
|
-
Pe("brackets");
|
|
1567
|
-
const w = b.value.slice(1);
|
|
1568
|
-
if (b.posix !== !0 && w[0] === "^" && !w.includes("/") && (E = `/${E}`), b.value += E, be({ value: E }), f.literalBrackets === !1 || a.hasRegexChars(w))
|
|
1569
|
-
continue;
|
|
1570
|
-
const j = a.escapeRegex(b.value);
|
|
1571
|
-
if (A.output = A.output.slice(0, -b.value.length), f.literalBrackets === !0) {
|
|
1572
|
-
A.output += j, b.value = j;
|
|
1573
|
-
continue;
|
|
1574
|
-
}
|
|
1575
|
-
b.value = `(${O}${j}|${b.value})`, A.output += b.value;
|
|
1576
|
-
continue;
|
|
1577
|
-
}
|
|
1578
|
-
if (E === "{" && f.nobrace !== !0) {
|
|
1579
|
-
je("braces");
|
|
1580
|
-
const w = {
|
|
1581
|
-
type: "brace",
|
|
1582
|
-
value: E,
|
|
1583
|
-
output: "(",
|
|
1584
|
-
outputIndex: A.output.length,
|
|
1585
|
-
tokensIndex: A.tokens.length
|
|
1586
|
-
};
|
|
1587
|
-
te.push(w), G(w);
|
|
1588
|
-
continue;
|
|
1589
|
-
}
|
|
1590
|
-
if (E === "}") {
|
|
1591
|
-
const w = te[te.length - 1];
|
|
1592
|
-
if (f.nobrace === !0 || !w) {
|
|
1593
|
-
G({ type: "text", value: E, output: E });
|
|
1594
|
-
continue;
|
|
1595
|
-
}
|
|
1596
|
-
let j = ")";
|
|
1597
|
-
if (w.dots === !0) {
|
|
1598
|
-
const X = P.slice(), re = [];
|
|
1599
|
-
for (let Q = X.length - 1; Q >= 0 && (P.pop(), X[Q].type !== "brace"); Q--)
|
|
1600
|
-
X[Q].type !== "dots" && re.unshift(X[Q].value);
|
|
1601
|
-
j = e(re, f), A.backtrack = !0;
|
|
1602
|
-
}
|
|
1603
|
-
if (w.comma !== !0 && w.dots !== !0) {
|
|
1604
|
-
const X = A.output.slice(0, w.outputIndex), re = A.tokens.slice(w.tokensIndex);
|
|
1605
|
-
w.value = w.output = "\\{", E = j = "\\}", A.output = X;
|
|
1606
|
-
for (const Q of re)
|
|
1607
|
-
A.output += Q.output || Q.value;
|
|
1608
|
-
}
|
|
1609
|
-
G({ type: "brace", value: E, output: j }), Pe("braces"), te.pop();
|
|
1610
|
-
continue;
|
|
1611
|
-
}
|
|
1612
|
-
if (E === "|") {
|
|
1613
|
-
le.length > 0 && le[le.length - 1].conditions++, G({ type: "text", value: E });
|
|
1614
|
-
continue;
|
|
1615
|
-
}
|
|
1616
|
-
if (E === ",") {
|
|
1617
|
-
let w = E;
|
|
1618
|
-
const j = te[te.length - 1];
|
|
1619
|
-
j && J[J.length - 1] === "braces" && (j.comma = !0, w = "|"), G({ type: "comma", value: E, output: w });
|
|
1620
|
-
continue;
|
|
1621
|
-
}
|
|
1622
|
-
if (E === "/") {
|
|
1623
|
-
if (b.type === "dot" && A.index === A.start + 1) {
|
|
1624
|
-
A.start = A.index + 1, A.consumed = "", A.output = "", P.pop(), b = v;
|
|
1625
|
-
continue;
|
|
1626
|
-
}
|
|
1627
|
-
G({ type: "slash", value: E, output: N });
|
|
1628
|
-
continue;
|
|
1629
|
-
}
|
|
1630
|
-
if (E === ".") {
|
|
1631
|
-
if (A.braces > 0 && b.type === "dot") {
|
|
1632
|
-
b.value === "." && (b.output = x);
|
|
1633
|
-
const w = te[te.length - 1];
|
|
1634
|
-
b.type = "dots", b.output += E, b.value += E, w.dots = !0;
|
|
1635
|
-
continue;
|
|
1636
|
-
}
|
|
1637
|
-
if (A.braces + A.parens === 0 && b.type !== "bos" && b.type !== "slash") {
|
|
1638
|
-
G({ type: "text", value: E, output: x });
|
|
1639
|
-
continue;
|
|
1640
|
-
}
|
|
1641
|
-
G({ type: "dot", value: E, output: x });
|
|
1642
|
-
continue;
|
|
1643
|
-
}
|
|
1644
|
-
if (E === "?") {
|
|
1645
|
-
if (!(b && b.value === "(") && f.noextglob !== !0 && K() === "(" && K(2) !== "?") {
|
|
1646
|
-
Ge("qmark", E);
|
|
1647
|
-
continue;
|
|
1648
|
-
}
|
|
1649
|
-
if (b && b.type === "paren") {
|
|
1650
|
-
const j = K();
|
|
1651
|
-
let X = E;
|
|
1652
|
-
if (j === "<" && !a.supportsLookbehinds())
|
|
1653
|
-
throw new Error("Node.js v10 or higher is required for regex lookbehinds");
|
|
1654
|
-
(b.value === "(" && !/[!=<:]/.test(j) || j === "<" && !/<([!=]|\w+>)/.test(me())) && (X = `\\${E}`), G({ type: "text", value: E, output: X });
|
|
1655
|
-
continue;
|
|
1656
|
-
}
|
|
1657
|
-
if (f.dot !== !0 && (b.type === "slash" || b.type === "bos")) {
|
|
1658
|
-
G({ type: "qmark", value: E, output: V });
|
|
1659
|
-
continue;
|
|
1660
|
-
}
|
|
1661
|
-
G({ type: "qmark", value: E, output: M });
|
|
1662
|
-
continue;
|
|
1663
|
-
}
|
|
1664
|
-
if (E === "!") {
|
|
1665
|
-
if (f.noextglob !== !0 && K() === "(" && (K(2) !== "?" || !/[!=<:]/.test(K(3)))) {
|
|
1666
|
-
Ge("negate", E);
|
|
1667
|
-
continue;
|
|
1668
|
-
}
|
|
1669
|
-
if (f.nonegate !== !0 && A.index === 0) {
|
|
1670
|
-
kn();
|
|
1671
|
-
continue;
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
if (E === "+") {
|
|
1675
|
-
if (f.noextglob !== !0 && K() === "(" && K(2) !== "?") {
|
|
1676
|
-
Ge("plus", E);
|
|
1677
|
-
continue;
|
|
1678
|
-
}
|
|
1679
|
-
if (b && b.value === "(" || f.regex === !1) {
|
|
1680
|
-
G({ type: "plus", value: E, output: U });
|
|
1681
|
-
continue;
|
|
1682
|
-
}
|
|
1683
|
-
if (b && (b.type === "bracket" || b.type === "paren" || b.type === "brace") || A.parens > 0) {
|
|
1684
|
-
G({ type: "plus", value: E });
|
|
1685
|
-
continue;
|
|
1686
|
-
}
|
|
1687
|
-
G({ type: "plus", value: U });
|
|
1688
|
-
continue;
|
|
1689
|
-
}
|
|
1690
|
-
if (E === "@") {
|
|
1691
|
-
if (f.noextglob !== !0 && K() === "(" && K(2) !== "?") {
|
|
1692
|
-
G({ type: "at", extglob: !0, value: E, output: "" });
|
|
1693
|
-
continue;
|
|
1694
|
-
}
|
|
1695
|
-
G({ type: "text", value: E });
|
|
1696
|
-
continue;
|
|
1697
|
-
}
|
|
1698
|
-
if (E !== "*") {
|
|
1699
|
-
(E === "$" || E === "^") && (E = `\\${E}`);
|
|
1700
|
-
const w = r.exec(me());
|
|
1701
|
-
w && (E += w[0], A.index += w[0].length), G({ type: "text", value: E });
|
|
1702
|
-
continue;
|
|
1703
|
-
}
|
|
1704
|
-
if (b && (b.type === "globstar" || b.star === !0)) {
|
|
1705
|
-
b.type = "star", b.star = !0, b.value += E, b.output = W, A.backtrack = !0, A.globstar = !0, pe(E);
|
|
1706
|
-
continue;
|
|
1707
|
-
}
|
|
1708
|
-
let L = me();
|
|
1709
|
-
if (f.noextglob !== !0 && /^\([^?]/.test(L)) {
|
|
1710
|
-
Ge("star", E);
|
|
1711
|
-
continue;
|
|
1712
|
-
}
|
|
1713
|
-
if (b.type === "star") {
|
|
1714
|
-
if (f.noglobstar === !0) {
|
|
1715
|
-
pe(E);
|
|
1716
|
-
continue;
|
|
1717
|
-
}
|
|
1718
|
-
const w = b.prev, j = w.prev, X = w.type === "slash" || w.type === "bos", re = j && (j.type === "star" || j.type === "globstar");
|
|
1719
|
-
if (f.bash === !0 && (!X || L[0] && L[0] !== "/")) {
|
|
1720
|
-
G({ type: "star", value: E, output: "" });
|
|
1721
|
-
continue;
|
|
1722
|
-
}
|
|
1723
|
-
const Q = A.braces > 0 && (w.type === "comma" || w.type === "brace"), ge = le.length && (w.type === "pipe" || w.type === "paren");
|
|
1724
|
-
if (!X && w.type !== "paren" && !Q && !ge) {
|
|
1725
|
-
G({ type: "star", value: E, output: "" });
|
|
1726
|
-
continue;
|
|
1727
|
-
}
|
|
1728
|
-
for (; L.slice(0, 3) === "/**"; ) {
|
|
1729
|
-
const ye = _[A.index + 4];
|
|
1730
|
-
if (ye && ye !== "/")
|
|
1731
|
-
break;
|
|
1732
|
-
L = L.slice(3), pe("/**", 3);
|
|
1733
|
-
}
|
|
1734
|
-
if (w.type === "bos" && he()) {
|
|
1735
|
-
b.type = "globstar", b.value += E, b.output = ae(f), A.output = b.output, A.globstar = !0, pe(E);
|
|
1736
|
-
continue;
|
|
1737
|
-
}
|
|
1738
|
-
if (w.type === "slash" && w.prev.type !== "bos" && !re && he()) {
|
|
1739
|
-
A.output = A.output.slice(0, -(w.output + b.output).length), w.output = `(?:${w.output}`, b.type = "globstar", b.output = ae(f) + (f.strictSlashes ? ")" : "|$)"), b.value += E, A.globstar = !0, A.output += w.output + b.output, pe(E);
|
|
1740
|
-
continue;
|
|
1741
|
-
}
|
|
1742
|
-
if (w.type === "slash" && w.prev.type !== "bos" && L[0] === "/") {
|
|
1743
|
-
const ye = L[1] !== void 0 ? "|$" : "";
|
|
1744
|
-
A.output = A.output.slice(0, -(w.output + b.output).length), w.output = `(?:${w.output}`, b.type = "globstar", b.output = `${ae(f)}${N}|${N}${ye})`, b.value += E, A.output += w.output + b.output, A.globstar = !0, pe(E + Z()), G({ type: "slash", value: "/", output: "" });
|
|
1745
|
-
continue;
|
|
1746
|
-
}
|
|
1747
|
-
if (w.type === "bos" && L[0] === "/") {
|
|
1748
|
-
b.type = "globstar", b.value += E, b.output = `(?:^|${N}|${ae(f)}${N})`, A.output = b.output, A.globstar = !0, pe(E + Z()), G({ type: "slash", value: "/", output: "" });
|
|
1749
|
-
continue;
|
|
1750
|
-
}
|
|
1751
|
-
A.output = A.output.slice(0, -b.output.length), b.type = "globstar", b.output = ae(f), b.value += E, A.output += b.output, A.globstar = !0, pe(E);
|
|
1752
|
-
continue;
|
|
1753
|
-
}
|
|
1754
|
-
const Y = { type: "star", value: E, output: W };
|
|
1755
|
-
if (f.bash === !0) {
|
|
1756
|
-
Y.output = ".*?", (b.type === "bos" || b.type === "slash") && (Y.output = fe + Y.output), G(Y);
|
|
1757
|
-
continue;
|
|
1758
|
-
}
|
|
1759
|
-
if (b && (b.type === "bracket" || b.type === "paren") && f.regex === !0) {
|
|
1760
|
-
Y.output = E, G(Y);
|
|
1761
|
-
continue;
|
|
1762
|
-
}
|
|
1763
|
-
(A.index === A.start || b.type === "slash" || b.type === "dot") && (b.type === "dot" ? (A.output += ce, b.output += ce) : f.dot === !0 ? (A.output += $, b.output += $) : (A.output += fe, b.output += fe), K() !== "*" && (A.output += q, b.output += q)), G(Y);
|
|
1764
|
-
}
|
|
1765
|
-
for (; A.brackets > 0; ) {
|
|
1766
|
-
if (f.strictBrackets === !0) throw new SyntaxError(i("closing", "]"));
|
|
1767
|
-
A.output = a.escapeLast(A.output, "["), Pe("brackets");
|
|
1768
|
-
}
|
|
1769
|
-
for (; A.parens > 0; ) {
|
|
1770
|
-
if (f.strictBrackets === !0) throw new SyntaxError(i("closing", ")"));
|
|
1771
|
-
A.output = a.escapeLast(A.output, "("), Pe("parens");
|
|
1772
|
-
}
|
|
1773
|
-
for (; A.braces > 0; ) {
|
|
1774
|
-
if (f.strictBrackets === !0) throw new SyntaxError(i("closing", "}"));
|
|
1775
|
-
A.output = a.escapeLast(A.output, "{"), Pe("braces");
|
|
1776
|
-
}
|
|
1777
|
-
if (f.strictSlashes !== !0 && (b.type === "star" || b.type === "bracket") && G({ type: "maybe_slash", value: "", output: `${N}?` }), A.backtrack === !0) {
|
|
1778
|
-
A.output = "";
|
|
1779
|
-
for (const L of A.tokens)
|
|
1780
|
-
A.output += L.output != null ? L.output : L.value, L.suffix && (A.output += L.suffix);
|
|
1781
|
-
}
|
|
1782
|
-
return A;
|
|
1783
|
-
};
|
|
1784
|
-
return S.fastpaths = (_, c) => {
|
|
1785
|
-
const f = { ...c }, g = typeof f.maxLength == "number" ? Math.min(l, f.maxLength) : l, R = _.length;
|
|
1786
|
-
if (R > g)
|
|
1787
|
-
throw new SyntaxError(`Input length: ${R}, exceeds maximum allowed length: ${g}`);
|
|
1788
|
-
_ = n[_] || _;
|
|
1789
|
-
const v = a.isWindows(c), {
|
|
1790
|
-
DOT_LITERAL: P,
|
|
1791
|
-
SLASH_LITERAL: O,
|
|
1792
|
-
ONE_CHAR: D,
|
|
1793
|
-
DOTS_SLASH: k,
|
|
1794
|
-
NO_DOT: H,
|
|
1795
|
-
NO_DOTS: x,
|
|
1796
|
-
NO_DOTS_SLASH: U,
|
|
1797
|
-
STAR: N,
|
|
1798
|
-
START_ANCHOR: q
|
|
1799
|
-
} = o.globChars(v), F = f.dot ? x : H, z = f.dot ? U : H, ce = f.capture ? "" : "?:", $ = { negated: !1, prefix: "" };
|
|
1800
|
-
let M = f.bash === !0 ? ".*?" : N;
|
|
1801
|
-
f.capture && (M = `(${M})`);
|
|
1802
|
-
const V = (fe) => fe.noglobstar === !0 ? M : `(${ce}(?:(?!${q}${fe.dot ? k : P}).)*?)`, oe = (fe) => {
|
|
1803
|
-
switch (fe) {
|
|
1804
|
-
case "*":
|
|
1805
|
-
return `${F}${D}${M}`;
|
|
1806
|
-
case ".*":
|
|
1807
|
-
return `${P}${D}${M}`;
|
|
1808
|
-
case "*.*":
|
|
1809
|
-
return `${F}${M}${P}${D}${M}`;
|
|
1810
|
-
case "*/*":
|
|
1811
|
-
return `${F}${M}${O}${D}${z}${M}`;
|
|
1812
|
-
case "**":
|
|
1813
|
-
return F + V(f);
|
|
1814
|
-
case "**/*":
|
|
1815
|
-
return `(?:${F}${V(f)}${O})?${z}${D}${M}`;
|
|
1816
|
-
case "**/*.*":
|
|
1817
|
-
return `(?:${F}${V(f)}${O})?${z}${M}${P}${D}${M}`;
|
|
1818
|
-
case "**/.*":
|
|
1819
|
-
return `(?:${F}${V(f)}${O})?${P}${D}${M}`;
|
|
1820
|
-
default: {
|
|
1821
|
-
const B = /^(.*?)\.(\w+)$/.exec(fe);
|
|
1822
|
-
if (!B) return;
|
|
1823
|
-
const W = oe(B[1]);
|
|
1824
|
-
return W ? W + P + B[2] : void 0;
|
|
1825
|
-
}
|
|
1826
|
-
}
|
|
1827
|
-
}, ue = a.removePrefix(_, $);
|
|
1828
|
-
let ae = oe(ue);
|
|
1829
|
-
return ae && f.strictSlashes !== !0 && (ae += `${O}?`), ae;
|
|
1830
|
-
}, Mt = S, Mt;
|
|
1831
|
-
}
|
|
1832
|
-
var Dt, br;
|
|
1833
|
-
function ss() {
|
|
1834
|
-
if (br) return Dt;
|
|
1835
|
-
br = 1;
|
|
1836
|
-
const o = Se, a = rs(), l = ns(), u = gt(), r = _t(), t = (e) => e && typeof e == "object" && !Array.isArray(e), n = (e, i, s = !1) => {
|
|
1837
|
-
if (Array.isArray(e)) {
|
|
1838
|
-
const S = e.map((c) => n(c, i, s));
|
|
1839
|
-
return (c) => {
|
|
1840
|
-
for (const f of S) {
|
|
1841
|
-
const g = f(c);
|
|
1842
|
-
if (g) return g;
|
|
1843
|
-
}
|
|
1844
|
-
return !1;
|
|
1845
|
-
};
|
|
1846
|
-
}
|
|
1847
|
-
const p = t(e) && e.tokens && e.input;
|
|
1848
|
-
if (e === "" || typeof e != "string" && !p)
|
|
1849
|
-
throw new TypeError("Expected pattern to be a non-empty string");
|
|
1850
|
-
const h = i || {}, d = u.isWindows(i), y = p ? n.compileRe(e, i) : n.makeRe(e, i, !1, !0), T = y.state;
|
|
1851
|
-
delete y.state;
|
|
1852
|
-
let C = () => !1;
|
|
1853
|
-
if (h.ignore) {
|
|
1854
|
-
const S = { ...i, ignore: null, onMatch: null, onResult: null };
|
|
1855
|
-
C = n(h.ignore, S, s);
|
|
1856
|
-
}
|
|
1857
|
-
const m = (S, _ = !1) => {
|
|
1858
|
-
const { isMatch: c, match: f, output: g } = n.test(S, y, i, { glob: e, posix: d }), R = { glob: e, state: T, regex: y, posix: d, input: S, output: g, match: f, isMatch: c };
|
|
1859
|
-
return typeof h.onResult == "function" && h.onResult(R), c === !1 ? (R.isMatch = !1, _ ? R : !1) : C(S) ? (typeof h.onIgnore == "function" && h.onIgnore(R), R.isMatch = !1, _ ? R : !1) : (typeof h.onMatch == "function" && h.onMatch(R), _ ? R : !0);
|
|
1860
|
-
};
|
|
1861
|
-
return s && (m.state = T), m;
|
|
1862
|
-
};
|
|
1863
|
-
return n.test = (e, i, s, { glob: p, posix: h } = {}) => {
|
|
1864
|
-
if (typeof e != "string")
|
|
1865
|
-
throw new TypeError("Expected input to be a string");
|
|
1866
|
-
if (e === "")
|
|
1867
|
-
return { isMatch: !1, output: "" };
|
|
1868
|
-
const d = s || {}, y = d.format || (h ? u.toPosixSlashes : null);
|
|
1869
|
-
let T = e === p, C = T && y ? y(e) : e;
|
|
1870
|
-
return T === !1 && (C = y ? y(e) : e, T = C === p), (T === !1 || d.capture === !0) && (d.matchBase === !0 || d.basename === !0 ? T = n.matchBase(e, i, s, h) : T = i.exec(C)), { isMatch: !!T, match: T, output: C };
|
|
1871
|
-
}, n.matchBase = (e, i, s, p = u.isWindows(s)) => (i instanceof RegExp ? i : n.makeRe(i, s)).test(o.basename(e)), n.isMatch = (e, i, s) => n(i, s)(e), n.parse = (e, i) => Array.isArray(e) ? e.map((s) => n.parse(s, i)) : l(e, { ...i, fastpaths: !1 }), n.scan = (e, i) => a(e, i), n.compileRe = (e, i, s = !1, p = !1) => {
|
|
1872
|
-
if (s === !0)
|
|
1873
|
-
return e.output;
|
|
1874
|
-
const h = i || {}, d = h.contains ? "" : "^", y = h.contains ? "" : "$";
|
|
1875
|
-
let T = `${d}(?:${e.output})${y}`;
|
|
1876
|
-
e && e.negated === !0 && (T = `^(?!${T}).*$`);
|
|
1877
|
-
const C = n.toRegex(T, i);
|
|
1878
|
-
return p === !0 && (C.state = e), C;
|
|
1879
|
-
}, n.makeRe = (e, i = {}, s = !1, p = !1) => {
|
|
1880
|
-
if (!e || typeof e != "string")
|
|
1881
|
-
throw new TypeError("Expected a non-empty string");
|
|
1882
|
-
let h = { negated: !1, fastpaths: !0 };
|
|
1883
|
-
return i.fastpaths !== !1 && (e[0] === "." || e[0] === "*") && (h.output = l.fastpaths(e, i)), h.output || (h = l(e, i)), n.compileRe(h, i, s, p);
|
|
1884
|
-
}, n.toRegex = (e, i) => {
|
|
1885
|
-
try {
|
|
1886
|
-
const s = i || {};
|
|
1887
|
-
return new RegExp(e, s.flags || (s.nocase ? "i" : ""));
|
|
1888
|
-
} catch (s) {
|
|
1889
|
-
if (i && i.debug === !0) throw s;
|
|
1890
|
-
return /$^/;
|
|
1891
|
-
}
|
|
1892
|
-
}, n.constants = r, Dt = n, Dt;
|
|
1893
|
-
}
|
|
1894
|
-
var It, Pr;
|
|
1895
|
-
function is() {
|
|
1896
|
-
return Pr || (Pr = 1, It = ss()), It;
|
|
1897
|
-
}
|
|
1898
|
-
var Nt, xr;
|
|
1899
|
-
function as() {
|
|
1900
|
-
if (xr) return Nt;
|
|
1901
|
-
xr = 1;
|
|
1902
|
-
const o = Pn, a = ts(), l = is(), u = gt(), r = (e) => e === "" || e === "./", t = (e) => {
|
|
1903
|
-
const i = e.indexOf("{");
|
|
1904
|
-
return i > -1 && e.indexOf("}", i) > -1;
|
|
1905
|
-
}, n = (e, i, s) => {
|
|
1906
|
-
i = [].concat(i), e = [].concat(e);
|
|
1907
|
-
let p = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set(), y = 0, T = (S) => {
|
|
1908
|
-
d.add(S.output), s && s.onResult && s.onResult(S);
|
|
1909
|
-
};
|
|
1910
|
-
for (let S = 0; S < i.length; S++) {
|
|
1911
|
-
let _ = l(String(i[S]), { ...s, onResult: T }, !0), c = _.state.negated || _.state.negatedExtglob;
|
|
1912
|
-
c && y++;
|
|
1913
|
-
for (let f of e) {
|
|
1914
|
-
let g = _(f, !0);
|
|
1915
|
-
(c ? !g.isMatch : g.isMatch) && (c ? p.add(g.output) : (p.delete(g.output), h.add(g.output)));
|
|
1916
|
-
}
|
|
1917
|
-
}
|
|
1918
|
-
let m = (y === i.length ? [...d] : [...h]).filter((S) => !p.has(S));
|
|
1919
|
-
if (s && m.length === 0) {
|
|
1920
|
-
if (s.failglob === !0)
|
|
1921
|
-
throw new Error(`No matches found for "${i.join(", ")}"`);
|
|
1922
|
-
if (s.nonull === !0 || s.nullglob === !0)
|
|
1923
|
-
return s.unescape ? i.map((S) => S.replace(/\\/g, "")) : i;
|
|
1924
|
-
}
|
|
1925
|
-
return m;
|
|
1926
|
-
};
|
|
1927
|
-
return n.match = n, n.matcher = (e, i) => l(e, i), n.isMatch = (e, i, s) => l(i, s)(e), n.any = n.isMatch, n.not = (e, i, s = {}) => {
|
|
1928
|
-
i = [].concat(i).map(String);
|
|
1929
|
-
let p = /* @__PURE__ */ new Set(), h = [], d = (T) => {
|
|
1930
|
-
s.onResult && s.onResult(T), h.push(T.output);
|
|
1931
|
-
}, y = new Set(n(e, i, { ...s, onResult: d }));
|
|
1932
|
-
for (let T of h)
|
|
1933
|
-
y.has(T) || p.add(T);
|
|
1934
|
-
return [...p];
|
|
1935
|
-
}, n.contains = (e, i, s) => {
|
|
1936
|
-
if (typeof e != "string")
|
|
1937
|
-
throw new TypeError(`Expected a string: "${o.inspect(e)}"`);
|
|
1938
|
-
if (Array.isArray(i))
|
|
1939
|
-
return i.some((p) => n.contains(e, p, s));
|
|
1940
|
-
if (typeof i == "string") {
|
|
1941
|
-
if (r(e) || r(i))
|
|
1942
|
-
return !1;
|
|
1943
|
-
if (e.includes(i) || e.startsWith("./") && e.slice(2).includes(i))
|
|
1944
|
-
return !0;
|
|
1945
|
-
}
|
|
1946
|
-
return n.isMatch(e, i, { ...s, contains: !0 });
|
|
1947
|
-
}, n.matchKeys = (e, i, s) => {
|
|
1948
|
-
if (!u.isObject(e))
|
|
1949
|
-
throw new TypeError("Expected the first argument to be an object");
|
|
1950
|
-
let p = n(Object.keys(e), i, s), h = {};
|
|
1951
|
-
for (let d of p) h[d] = e[d];
|
|
1952
|
-
return h;
|
|
1953
|
-
}, n.some = (e, i, s) => {
|
|
1954
|
-
let p = [].concat(e);
|
|
1955
|
-
for (let h of [].concat(i)) {
|
|
1956
|
-
let d = l(String(h), s);
|
|
1957
|
-
if (p.some((y) => d(y)))
|
|
1958
|
-
return !0;
|
|
1959
|
-
}
|
|
1960
|
-
return !1;
|
|
1961
|
-
}, n.every = (e, i, s) => {
|
|
1962
|
-
let p = [].concat(e);
|
|
1963
|
-
for (let h of [].concat(i)) {
|
|
1964
|
-
let d = l(String(h), s);
|
|
1965
|
-
if (!p.every((y) => d(y)))
|
|
1966
|
-
return !1;
|
|
1967
|
-
}
|
|
1968
|
-
return !0;
|
|
1969
|
-
}, n.all = (e, i, s) => {
|
|
1970
|
-
if (typeof e != "string")
|
|
1971
|
-
throw new TypeError(`Expected a string: "${o.inspect(e)}"`);
|
|
1972
|
-
return [].concat(i).every((p) => l(p, s)(e));
|
|
1973
|
-
}, n.capture = (e, i, s) => {
|
|
1974
|
-
let p = u.isWindows(s), d = l.makeRe(String(e), { ...s, capture: !0 }).exec(p ? u.toPosixSlashes(i) : i);
|
|
1975
|
-
if (d)
|
|
1976
|
-
return d.slice(1).map((y) => y === void 0 ? "" : y);
|
|
1977
|
-
}, n.makeRe = (...e) => l.makeRe(...e), n.scan = (...e) => l.scan(...e), n.parse = (e, i) => {
|
|
1978
|
-
let s = [];
|
|
1979
|
-
for (let p of [].concat(e || []))
|
|
1980
|
-
for (let h of a(String(p), i))
|
|
1981
|
-
s.push(l.parse(h, i));
|
|
1982
|
-
return s;
|
|
1983
|
-
}, n.braces = (e, i) => {
|
|
1984
|
-
if (typeof e != "string") throw new TypeError("Expected a string");
|
|
1985
|
-
return i && i.nobrace === !0 || !t(e) ? [e] : a(e, i);
|
|
1986
|
-
}, n.braceExpand = (e, i) => {
|
|
1987
|
-
if (typeof e != "string") throw new TypeError("Expected a string");
|
|
1988
|
-
return n.braces(e, { ...i, expand: !0 });
|
|
1989
|
-
}, n.hasBraces = t, Nt = n, Nt;
|
|
1990
|
-
}
|
|
1991
|
-
var Cr;
|
|
1992
|
-
function os() {
|
|
1993
|
-
if (Cr) return I;
|
|
1994
|
-
Cr = 1, Object.defineProperty(I, "__esModule", { value: !0 }), I.isAbsolute = I.partitionAbsoluteAndRelative = I.removeDuplicateSlashes = I.matchAny = I.convertPatternsToRe = I.makeRe = I.getPatternParts = I.expandBraceExpansion = I.expandPatternsWithBraceExpansion = I.isAffectDepthOfReadingPattern = I.endsWithSlashGlobStar = I.hasGlobStar = I.getBaseDirectory = I.isPatternRelatedToParentDirectory = I.getPatternsOutsideCurrentDirectory = I.getPatternsInsideCurrentDirectory = I.getPositivePatterns = I.getNegativePatterns = I.isPositivePattern = I.isNegativePattern = I.convertToNegativePattern = I.convertToPositivePattern = I.isDynamicPattern = I.isStaticPattern = void 0;
|
|
1995
|
-
const o = Se, a = Qn(), l = as(), u = "**", r = "\\", t = /[*?]|^!/, n = /\[[^[]*]/, e = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/, i = /[!*+?@]\([^(]*\)/, s = /,|\.\./, p = /(?!^)\/{2,}/g;
|
|
1996
|
-
function h($, M = {}) {
|
|
1997
|
-
return !d($, M);
|
|
1998
|
-
}
|
|
1999
|
-
I.isStaticPattern = h;
|
|
2000
|
-
function d($, M = {}) {
|
|
2001
|
-
return $ === "" ? !1 : !!(M.caseSensitiveMatch === !1 || $.includes(r) || t.test($) || n.test($) || e.test($) || M.extglob !== !1 && i.test($) || M.braceExpansion !== !1 && y($));
|
|
2002
|
-
}
|
|
2003
|
-
I.isDynamicPattern = d;
|
|
2004
|
-
function y($) {
|
|
2005
|
-
const M = $.indexOf("{");
|
|
2006
|
-
if (M === -1)
|
|
2007
|
-
return !1;
|
|
2008
|
-
const V = $.indexOf("}", M + 1);
|
|
2009
|
-
if (V === -1)
|
|
2010
|
-
return !1;
|
|
2011
|
-
const oe = $.slice(M, V);
|
|
2012
|
-
return s.test(oe);
|
|
2013
|
-
}
|
|
2014
|
-
function T($) {
|
|
2015
|
-
return m($) ? $.slice(1) : $;
|
|
2016
|
-
}
|
|
2017
|
-
I.convertToPositivePattern = T;
|
|
2018
|
-
function C($) {
|
|
2019
|
-
return "!" + $;
|
|
2020
|
-
}
|
|
2021
|
-
I.convertToNegativePattern = C;
|
|
2022
|
-
function m($) {
|
|
2023
|
-
return $.startsWith("!") && $[1] !== "(";
|
|
2024
|
-
}
|
|
2025
|
-
I.isNegativePattern = m;
|
|
2026
|
-
function S($) {
|
|
2027
|
-
return !m($);
|
|
2028
|
-
}
|
|
2029
|
-
I.isPositivePattern = S;
|
|
2030
|
-
function _($) {
|
|
2031
|
-
return $.filter(m);
|
|
2032
|
-
}
|
|
2033
|
-
I.getNegativePatterns = _;
|
|
2034
|
-
function c($) {
|
|
2035
|
-
return $.filter(S);
|
|
2036
|
-
}
|
|
2037
|
-
I.getPositivePatterns = c;
|
|
2038
|
-
function f($) {
|
|
2039
|
-
return $.filter((M) => !R(M));
|
|
2040
|
-
}
|
|
2041
|
-
I.getPatternsInsideCurrentDirectory = f;
|
|
2042
|
-
function g($) {
|
|
2043
|
-
return $.filter(R);
|
|
2044
|
-
}
|
|
2045
|
-
I.getPatternsOutsideCurrentDirectory = g;
|
|
2046
|
-
function R($) {
|
|
2047
|
-
return $.startsWith("..") || $.startsWith("./..");
|
|
2048
|
-
}
|
|
2049
|
-
I.isPatternRelatedToParentDirectory = R;
|
|
2050
|
-
function v($) {
|
|
2051
|
-
return a($, { flipBackslashes: !1 });
|
|
2052
|
-
}
|
|
2053
|
-
I.getBaseDirectory = v;
|
|
2054
|
-
function P($) {
|
|
2055
|
-
return $.includes(u);
|
|
2056
|
-
}
|
|
2057
|
-
I.hasGlobStar = P;
|
|
2058
|
-
function O($) {
|
|
2059
|
-
return $.endsWith("/" + u);
|
|
2060
|
-
}
|
|
2061
|
-
I.endsWithSlashGlobStar = O;
|
|
2062
|
-
function D($) {
|
|
2063
|
-
const M = o.basename($);
|
|
2064
|
-
return O($) || h(M);
|
|
2065
|
-
}
|
|
2066
|
-
I.isAffectDepthOfReadingPattern = D;
|
|
2067
|
-
function k($) {
|
|
2068
|
-
return $.reduce((M, V) => M.concat(H(V)), []);
|
|
2069
|
-
}
|
|
2070
|
-
I.expandPatternsWithBraceExpansion = k;
|
|
2071
|
-
function H($) {
|
|
2072
|
-
const M = l.braces($, { expand: !0, nodupes: !0, keepEscaping: !0 });
|
|
2073
|
-
return M.sort((V, oe) => V.length - oe.length), M.filter((V) => V !== "");
|
|
2074
|
-
}
|
|
2075
|
-
I.expandBraceExpansion = H;
|
|
2076
|
-
function x($, M) {
|
|
2077
|
-
let { parts: V } = l.scan($, Object.assign(Object.assign({}, M), { parts: !0 }));
|
|
2078
|
-
return V.length === 0 && (V = [$]), V[0].startsWith("/") && (V[0] = V[0].slice(1), V.unshift("")), V;
|
|
2079
|
-
}
|
|
2080
|
-
I.getPatternParts = x;
|
|
2081
|
-
function U($, M) {
|
|
2082
|
-
return l.makeRe($, M);
|
|
2083
|
-
}
|
|
2084
|
-
I.makeRe = U;
|
|
2085
|
-
function N($, M) {
|
|
2086
|
-
return $.map((V) => U(V, M));
|
|
2087
|
-
}
|
|
2088
|
-
I.convertPatternsToRe = N;
|
|
2089
|
-
function q($, M) {
|
|
2090
|
-
return M.some((V) => V.test($));
|
|
2091
|
-
}
|
|
2092
|
-
I.matchAny = q;
|
|
2093
|
-
function F($) {
|
|
2094
|
-
return $.replace(p, "/");
|
|
2095
|
-
}
|
|
2096
|
-
I.removeDuplicateSlashes = F;
|
|
2097
|
-
function z($) {
|
|
2098
|
-
const M = [], V = [];
|
|
2099
|
-
for (const oe of $)
|
|
2100
|
-
ce(oe) ? M.push(oe) : V.push(oe);
|
|
2101
|
-
return [M, V];
|
|
2102
|
-
}
|
|
2103
|
-
I.partitionAbsoluteAndRelative = z;
|
|
2104
|
-
function ce($) {
|
|
2105
|
-
return o.isAbsolute($);
|
|
2106
|
-
}
|
|
2107
|
-
return I.isAbsolute = ce, I;
|
|
2108
|
-
}
|
|
2109
|
-
var Me = {}, qt, Tr;
|
|
2110
|
-
function us() {
|
|
2111
|
-
if (Tr) return qt;
|
|
2112
|
-
Tr = 1;
|
|
2113
|
-
const a = dt.PassThrough, l = Array.prototype.slice;
|
|
2114
|
-
qt = u;
|
|
2115
|
-
function u() {
|
|
2116
|
-
const t = [], n = l.call(arguments);
|
|
2117
|
-
let e = !1, i = n[n.length - 1];
|
|
2118
|
-
i && !Array.isArray(i) && i.pipe == null ? n.pop() : i = {};
|
|
2119
|
-
const s = i.end !== !1, p = i.pipeError === !0;
|
|
2120
|
-
i.objectMode == null && (i.objectMode = !0), i.highWaterMark == null && (i.highWaterMark = 64 * 1024);
|
|
2121
|
-
const h = a(i);
|
|
2122
|
-
function d() {
|
|
2123
|
-
for (let C = 0, m = arguments.length; C < m; C++)
|
|
2124
|
-
t.push(r(arguments[C], i));
|
|
2125
|
-
return y(), this;
|
|
2126
|
-
}
|
|
2127
|
-
function y() {
|
|
2128
|
-
if (e)
|
|
2129
|
-
return;
|
|
2130
|
-
e = !0;
|
|
2131
|
-
let C = t.shift();
|
|
2132
|
-
if (!C) {
|
|
2133
|
-
process.nextTick(T);
|
|
2134
|
-
return;
|
|
2135
|
-
}
|
|
2136
|
-
Array.isArray(C) || (C = [C]);
|
|
2137
|
-
let m = C.length + 1;
|
|
2138
|
-
function S() {
|
|
2139
|
-
--m > 0 || (e = !1, y());
|
|
2140
|
-
}
|
|
2141
|
-
function _(c) {
|
|
2142
|
-
function f() {
|
|
2143
|
-
c.removeListener("merge2UnpipeEnd", f), c.removeListener("end", f), p && c.removeListener("error", g), S();
|
|
2144
|
-
}
|
|
2145
|
-
function g(R) {
|
|
2146
|
-
h.emit("error", R);
|
|
2147
|
-
}
|
|
2148
|
-
if (c._readableState.endEmitted)
|
|
2149
|
-
return S();
|
|
2150
|
-
c.on("merge2UnpipeEnd", f), c.on("end", f), p && c.on("error", g), c.pipe(h, { end: !1 }), c.resume();
|
|
2151
|
-
}
|
|
2152
|
-
for (let c = 0; c < C.length; c++)
|
|
2153
|
-
_(C[c]);
|
|
2154
|
-
S();
|
|
2155
|
-
}
|
|
2156
|
-
function T() {
|
|
2157
|
-
e = !1, h.emit("queueDrain"), s && h.end();
|
|
2158
|
-
}
|
|
2159
|
-
return h.setMaxListeners(0), h.add = d, h.on("unpipe", function(C) {
|
|
2160
|
-
C.emit("merge2UnpipeEnd");
|
|
2161
|
-
}), n.length && d.apply(null, n), h;
|
|
2162
|
-
}
|
|
2163
|
-
function r(t, n) {
|
|
2164
|
-
if (Array.isArray(t))
|
|
2165
|
-
for (let e = 0, i = t.length; e < i; e++)
|
|
2166
|
-
t[e] = r(t[e], n);
|
|
2167
|
-
else {
|
|
2168
|
-
if (!t._readableState && t.pipe && (t = t.pipe(a(n))), !t._readableState || !t.pause || !t.pipe)
|
|
2169
|
-
throw new Error("Only readable stream can be merged.");
|
|
2170
|
-
t.pause();
|
|
2171
|
-
}
|
|
2172
|
-
return t;
|
|
2173
|
-
}
|
|
2174
|
-
return qt;
|
|
2175
|
-
}
|
|
2176
|
-
var Or;
|
|
2177
|
-
function cs() {
|
|
2178
|
-
if (Or) return Me;
|
|
2179
|
-
Or = 1, Object.defineProperty(Me, "__esModule", { value: !0 }), Me.merge = void 0;
|
|
2180
|
-
const o = us();
|
|
2181
|
-
function a(u) {
|
|
2182
|
-
const r = o(u);
|
|
2183
|
-
return u.forEach((t) => {
|
|
2184
|
-
t.once("error", (n) => r.emit("error", n));
|
|
2185
|
-
}), r.once("close", () => l(u)), r.once("end", () => l(u)), r;
|
|
2186
|
-
}
|
|
2187
|
-
Me.merge = a;
|
|
2188
|
-
function l(u) {
|
|
2189
|
-
u.forEach((r) => r.emit("close"));
|
|
2190
|
-
}
|
|
2191
|
-
return Me;
|
|
2192
|
-
}
|
|
2193
|
-
var we = {}, wr;
|
|
2194
|
-
function ls() {
|
|
2195
|
-
if (wr) return we;
|
|
2196
|
-
wr = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.isEmpty = we.isString = void 0;
|
|
2197
|
-
function o(l) {
|
|
2198
|
-
return typeof l == "string";
|
|
2199
|
-
}
|
|
2200
|
-
we.isString = o;
|
|
2201
|
-
function a(l) {
|
|
2202
|
-
return l === "";
|
|
2203
|
-
}
|
|
2204
|
-
return we.isEmpty = a, we;
|
|
2205
|
-
}
|
|
2206
|
-
var $r;
|
|
2207
|
-
function Te() {
|
|
2208
|
-
if ($r) return ie;
|
|
2209
|
-
$r = 1, Object.defineProperty(ie, "__esModule", { value: !0 }), ie.string = ie.stream = ie.pattern = ie.path = ie.fs = ie.errno = ie.array = void 0;
|
|
2210
|
-
const o = jn();
|
|
2211
|
-
ie.array = o;
|
|
2212
|
-
const a = Gn();
|
|
2213
|
-
ie.errno = a;
|
|
2214
|
-
const l = Un();
|
|
2215
|
-
ie.fs = l;
|
|
2216
|
-
const u = Wn();
|
|
2217
|
-
ie.path = u;
|
|
2218
|
-
const r = os();
|
|
2219
|
-
ie.pattern = r;
|
|
2220
|
-
const t = cs();
|
|
2221
|
-
ie.stream = t;
|
|
2222
|
-
const n = ls();
|
|
2223
|
-
return ie.string = n, ie;
|
|
2224
|
-
}
|
|
2225
|
-
var Lr;
|
|
2226
|
-
function fs() {
|
|
2227
|
-
if (Lr) return se;
|
|
2228
|
-
Lr = 1, Object.defineProperty(se, "__esModule", { value: !0 }), se.convertPatternGroupToTask = se.convertPatternGroupsToTasks = se.groupPatternsByBaseDirectory = se.getNegativePatternsAsPositive = se.getPositivePatterns = se.convertPatternsToTasks = se.generate = void 0;
|
|
2229
|
-
const o = Te();
|
|
2230
|
-
function a(s, p) {
|
|
2231
|
-
const h = l(s, p), d = l(p.ignore, p), y = r(h), T = t(h, d), C = y.filter((c) => o.pattern.isStaticPattern(c, p)), m = y.filter((c) => o.pattern.isDynamicPattern(c, p)), S = u(
|
|
2232
|
-
C,
|
|
2233
|
-
T,
|
|
2234
|
-
/* dynamic */
|
|
2235
|
-
!1
|
|
2236
|
-
), _ = u(
|
|
2237
|
-
m,
|
|
2238
|
-
T,
|
|
2239
|
-
/* dynamic */
|
|
2240
|
-
!0
|
|
2241
|
-
);
|
|
2242
|
-
return S.concat(_);
|
|
2243
|
-
}
|
|
2244
|
-
se.generate = a;
|
|
2245
|
-
function l(s, p) {
|
|
2246
|
-
let h = s;
|
|
2247
|
-
return p.braceExpansion && (h = o.pattern.expandPatternsWithBraceExpansion(h)), p.baseNameMatch && (h = h.map((d) => d.includes("/") ? d : `**/${d}`)), h.map((d) => o.pattern.removeDuplicateSlashes(d));
|
|
2248
|
-
}
|
|
2249
|
-
function u(s, p, h) {
|
|
2250
|
-
const d = [], y = o.pattern.getPatternsOutsideCurrentDirectory(s), T = o.pattern.getPatternsInsideCurrentDirectory(s), C = n(y), m = n(T);
|
|
2251
|
-
return d.push(...e(C, p, h)), "." in m ? d.push(i(".", T, p, h)) : d.push(...e(m, p, h)), d;
|
|
2252
|
-
}
|
|
2253
|
-
se.convertPatternsToTasks = u;
|
|
2254
|
-
function r(s) {
|
|
2255
|
-
return o.pattern.getPositivePatterns(s);
|
|
2256
|
-
}
|
|
2257
|
-
se.getPositivePatterns = r;
|
|
2258
|
-
function t(s, p) {
|
|
2259
|
-
return o.pattern.getNegativePatterns(s).concat(p).map(o.pattern.convertToPositivePattern);
|
|
2260
|
-
}
|
|
2261
|
-
se.getNegativePatternsAsPositive = t;
|
|
2262
|
-
function n(s) {
|
|
2263
|
-
const p = {};
|
|
2264
|
-
return s.reduce((h, d) => {
|
|
2265
|
-
const y = o.pattern.getBaseDirectory(d);
|
|
2266
|
-
return y in h ? h[y].push(d) : h[y] = [d], h;
|
|
2267
|
-
}, p);
|
|
2268
|
-
}
|
|
2269
|
-
se.groupPatternsByBaseDirectory = n;
|
|
2270
|
-
function e(s, p, h) {
|
|
2271
|
-
return Object.keys(s).map((d) => i(d, s[d], p, h));
|
|
2272
|
-
}
|
|
2273
|
-
se.convertPatternGroupsToTasks = e;
|
|
2274
|
-
function i(s, p, h, d) {
|
|
2275
|
-
return {
|
|
2276
|
-
dynamic: d,
|
|
2277
|
-
positive: p,
|
|
2278
|
-
negative: h,
|
|
2279
|
-
base: s,
|
|
2280
|
-
patterns: [].concat(p, h.map(o.pattern.convertToNegativePattern))
|
|
2281
|
-
};
|
|
2282
|
-
}
|
|
2283
|
-
return se.convertPatternGroupToTask = i, se;
|
|
2284
|
-
}
|
|
2285
|
-
var Ue = {}, We = {}, de = {}, Ve = {}, Ke = {}, ve = {}, Re = {}, Ee = {}, De = {}, kr;
|
|
2286
|
-
function hs() {
|
|
2287
|
-
if (kr) return De;
|
|
2288
|
-
kr = 1, Object.defineProperty(De, "__esModule", { value: !0 }), De.read = void 0;
|
|
2289
|
-
function o(u, r, t) {
|
|
2290
|
-
r.fs.lstat(u, (n, e) => {
|
|
2291
|
-
if (n !== null) {
|
|
2292
|
-
a(t, n);
|
|
2293
|
-
return;
|
|
2294
|
-
}
|
|
2295
|
-
if (!e.isSymbolicLink() || !r.followSymbolicLink) {
|
|
2296
|
-
l(t, e);
|
|
2297
|
-
return;
|
|
2298
|
-
}
|
|
2299
|
-
r.fs.stat(u, (i, s) => {
|
|
2300
|
-
if (i !== null) {
|
|
2301
|
-
if (r.throwErrorOnBrokenSymbolicLink) {
|
|
2302
|
-
a(t, i);
|
|
2303
|
-
return;
|
|
2304
|
-
}
|
|
2305
|
-
l(t, e);
|
|
2306
|
-
return;
|
|
2307
|
-
}
|
|
2308
|
-
r.markSymbolicLink && (s.isSymbolicLink = () => !0), l(t, s);
|
|
2309
|
-
});
|
|
2310
|
-
});
|
|
2311
|
-
}
|
|
2312
|
-
De.read = o;
|
|
2313
|
-
function a(u, r) {
|
|
2314
|
-
u(r);
|
|
2315
|
-
}
|
|
2316
|
-
function l(u, r) {
|
|
2317
|
-
u(null, r);
|
|
2318
|
-
}
|
|
2319
|
-
return De;
|
|
2320
|
-
}
|
|
2321
|
-
var Ie = {}, Hr;
|
|
2322
|
-
function ps() {
|
|
2323
|
-
if (Hr) return Ie;
|
|
2324
|
-
Hr = 1, Object.defineProperty(Ie, "__esModule", { value: !0 }), Ie.read = void 0;
|
|
2325
|
-
function o(a, l) {
|
|
2326
|
-
const u = l.fs.lstatSync(a);
|
|
2327
|
-
if (!u.isSymbolicLink() || !l.followSymbolicLink)
|
|
2328
|
-
return u;
|
|
2329
|
-
try {
|
|
2330
|
-
const r = l.fs.statSync(a);
|
|
2331
|
-
return l.markSymbolicLink && (r.isSymbolicLink = () => !0), r;
|
|
2332
|
-
} catch (r) {
|
|
2333
|
-
if (!l.throwErrorOnBrokenSymbolicLink)
|
|
2334
|
-
return u;
|
|
2335
|
-
throw r;
|
|
2336
|
-
}
|
|
2337
|
-
}
|
|
2338
|
-
return Ie.read = o, Ie;
|
|
2339
|
-
}
|
|
2340
|
-
var Qe = {}, Ft = {}, Mr;
|
|
2341
|
-
function ds() {
|
|
2342
|
-
return Mr || (Mr = 1, (function(o) {
|
|
2343
|
-
Object.defineProperty(o, "__esModule", { value: !0 }), o.createFileSystemAdapter = o.FILE_SYSTEM_ADAPTER = void 0;
|
|
2344
|
-
const a = Qt;
|
|
2345
|
-
o.FILE_SYSTEM_ADAPTER = {
|
|
2346
|
-
lstat: a.lstat,
|
|
2347
|
-
stat: a.stat,
|
|
2348
|
-
lstatSync: a.lstatSync,
|
|
2349
|
-
statSync: a.statSync
|
|
2350
|
-
};
|
|
2351
|
-
function l(u) {
|
|
2352
|
-
return u === void 0 ? o.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, o.FILE_SYSTEM_ADAPTER), u);
|
|
2353
|
-
}
|
|
2354
|
-
o.createFileSystemAdapter = l;
|
|
2355
|
-
})(Ft)), Ft;
|
|
2356
|
-
}
|
|
2357
|
-
var Dr;
|
|
2358
|
-
function _s() {
|
|
2359
|
-
if (Dr) return Qe;
|
|
2360
|
-
Dr = 1, Object.defineProperty(Qe, "__esModule", { value: !0 });
|
|
2361
|
-
const o = ds();
|
|
2362
|
-
class a {
|
|
2363
|
-
constructor(u = {}) {
|
|
2364
|
-
this._options = u, this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, !0), this.fs = o.createFileSystemAdapter(this._options.fs), this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0);
|
|
2365
|
-
}
|
|
2366
|
-
_getValue(u, r) {
|
|
2367
|
-
return u ?? r;
|
|
2368
|
-
}
|
|
2369
|
-
}
|
|
2370
|
-
return Qe.default = a, Qe;
|
|
2371
|
-
}
|
|
2372
|
-
var Ir;
|
|
2373
|
-
function Le() {
|
|
2374
|
-
if (Ir) return Ee;
|
|
2375
|
-
Ir = 1, Object.defineProperty(Ee, "__esModule", { value: !0 }), Ee.statSync = Ee.stat = Ee.Settings = void 0;
|
|
2376
|
-
const o = hs(), a = ps(), l = _s();
|
|
2377
|
-
Ee.Settings = l.default;
|
|
2378
|
-
function u(n, e, i) {
|
|
2379
|
-
if (typeof e == "function") {
|
|
2380
|
-
o.read(n, t(), e);
|
|
2381
|
-
return;
|
|
2382
|
-
}
|
|
2383
|
-
o.read(n, t(e), i);
|
|
2384
|
-
}
|
|
2385
|
-
Ee.stat = u;
|
|
2386
|
-
function r(n, e) {
|
|
2387
|
-
const i = t(e);
|
|
2388
|
-
return a.read(n, i);
|
|
2389
|
-
}
|
|
2390
|
-
Ee.statSync = r;
|
|
2391
|
-
function t(n = {}) {
|
|
2392
|
-
return n instanceof l.default ? n : new l.default(n);
|
|
2393
|
-
}
|
|
2394
|
-
return Ee;
|
|
2395
|
-
}
|
|
2396
|
-
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2397
|
-
var Bt, Nr;
|
|
2398
|
-
function gs() {
|
|
2399
|
-
if (Nr) return Bt;
|
|
2400
|
-
Nr = 1;
|
|
2401
|
-
let o;
|
|
2402
|
-
return Bt = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window < "u" ? window : Mn) : (a) => (o || (o = Promise.resolve())).then(a).catch((l) => setTimeout(() => {
|
|
2403
|
-
throw l;
|
|
2404
|
-
}, 0)), Bt;
|
|
2405
|
-
}
|
|
2406
|
-
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2407
|
-
var jt, qr;
|
|
2408
|
-
function ys() {
|
|
2409
|
-
if (qr) return jt;
|
|
2410
|
-
qr = 1, jt = a;
|
|
2411
|
-
const o = gs();
|
|
2412
|
-
function a(l, u) {
|
|
2413
|
-
let r, t, n, e = !0;
|
|
2414
|
-
Array.isArray(l) ? (r = [], t = l.length) : (n = Object.keys(l), r = {}, t = n.length);
|
|
2415
|
-
function i(p) {
|
|
2416
|
-
function h() {
|
|
2417
|
-
u && u(p, r), u = null;
|
|
2418
|
-
}
|
|
2419
|
-
e ? o(h) : h();
|
|
2420
|
-
}
|
|
2421
|
-
function s(p, h, d) {
|
|
2422
|
-
r[p] = d, (--t === 0 || h) && i(h);
|
|
2423
|
-
}
|
|
2424
|
-
t ? n ? n.forEach(function(p) {
|
|
2425
|
-
l[p](function(h, d) {
|
|
2426
|
-
s(p, h, d);
|
|
2427
|
-
});
|
|
2428
|
-
}) : l.forEach(function(p, h) {
|
|
2429
|
-
p(function(d, y) {
|
|
2430
|
-
s(h, d, y);
|
|
2431
|
-
});
|
|
2432
|
-
}) : i(null), e = !1;
|
|
2433
|
-
}
|
|
2434
|
-
return jt;
|
|
2435
|
-
}
|
|
2436
|
-
var Ne = {}, Fr;
|
|
2437
|
-
function Cn() {
|
|
2438
|
-
if (Fr) return Ne;
|
|
2439
|
-
Fr = 1, Object.defineProperty(Ne, "__esModule", { value: !0 }), Ne.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
|
2440
|
-
const o = process.versions.node.split(".");
|
|
2441
|
-
if (o[0] === void 0 || o[1] === void 0)
|
|
2442
|
-
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
|
|
2443
|
-
const a = Number.parseInt(o[0], 10), l = Number.parseInt(o[1], 10), u = 10, r = 10, t = a > u, n = a === u && l >= r;
|
|
2444
|
-
return Ne.IS_SUPPORT_READDIR_WITH_FILE_TYPES = t || n, Ne;
|
|
2445
|
-
}
|
|
2446
|
-
var qe = {}, Fe = {}, Br;
|
|
2447
|
-
function Ss() {
|
|
2448
|
-
if (Br) return Fe;
|
|
2449
|
-
Br = 1, Object.defineProperty(Fe, "__esModule", { value: !0 }), Fe.createDirentFromStats = void 0;
|
|
2450
|
-
class o {
|
|
2451
|
-
constructor(u, r) {
|
|
2452
|
-
this.name = u, 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);
|
|
2453
|
-
}
|
|
2454
|
-
}
|
|
2455
|
-
function a(l, u) {
|
|
2456
|
-
return new o(l, u);
|
|
2457
|
-
}
|
|
2458
|
-
return Fe.createDirentFromStats = a, Fe;
|
|
2459
|
-
}
|
|
2460
|
-
var jr;
|
|
2461
|
-
function Tn() {
|
|
2462
|
-
if (jr) return qe;
|
|
2463
|
-
jr = 1, Object.defineProperty(qe, "__esModule", { value: !0 }), qe.fs = void 0;
|
|
2464
|
-
const o = Ss();
|
|
2465
|
-
return qe.fs = o, qe;
|
|
2466
|
-
}
|
|
2467
|
-
var Be = {}, Gr;
|
|
2468
|
-
function On() {
|
|
2469
|
-
if (Gr) return Be;
|
|
2470
|
-
Gr = 1, Object.defineProperty(Be, "__esModule", { value: !0 }), Be.joinPathSegments = void 0;
|
|
2471
|
-
function o(a, l, u) {
|
|
2472
|
-
return a.endsWith(u) ? a + l : a + u + l;
|
|
2473
|
-
}
|
|
2474
|
-
return Be.joinPathSegments = o, Be;
|
|
2475
|
-
}
|
|
2476
|
-
var Ur;
|
|
2477
|
-
function ms() {
|
|
2478
|
-
if (Ur) return Re;
|
|
2479
|
-
Ur = 1, Object.defineProperty(Re, "__esModule", { value: !0 }), Re.readdir = Re.readdirWithFileTypes = Re.read = void 0;
|
|
2480
|
-
const o = Le(), a = ys(), l = Cn(), u = Tn(), r = On();
|
|
2481
|
-
function t(h, d, y) {
|
|
2482
|
-
if (!d.stats && l.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
2483
|
-
n(h, d, y);
|
|
2484
|
-
return;
|
|
2485
|
-
}
|
|
2486
|
-
i(h, d, y);
|
|
2487
|
-
}
|
|
2488
|
-
Re.read = t;
|
|
2489
|
-
function n(h, d, y) {
|
|
2490
|
-
d.fs.readdir(h, { withFileTypes: !0 }, (T, C) => {
|
|
2491
|
-
if (T !== null) {
|
|
2492
|
-
s(y, T);
|
|
2493
|
-
return;
|
|
2494
|
-
}
|
|
2495
|
-
const m = C.map((_) => ({
|
|
2496
|
-
dirent: _,
|
|
2497
|
-
name: _.name,
|
|
2498
|
-
path: r.joinPathSegments(h, _.name, d.pathSegmentSeparator)
|
|
2499
|
-
}));
|
|
2500
|
-
if (!d.followSymbolicLinks) {
|
|
2501
|
-
p(y, m);
|
|
2502
|
-
return;
|
|
2503
|
-
}
|
|
2504
|
-
const S = m.map((_) => e(_, d));
|
|
2505
|
-
a(S, (_, c) => {
|
|
2506
|
-
if (_ !== null) {
|
|
2507
|
-
s(y, _);
|
|
2508
|
-
return;
|
|
2509
|
-
}
|
|
2510
|
-
p(y, c);
|
|
2511
|
-
});
|
|
2512
|
-
});
|
|
2513
|
-
}
|
|
2514
|
-
Re.readdirWithFileTypes = n;
|
|
2515
|
-
function e(h, d) {
|
|
2516
|
-
return (y) => {
|
|
2517
|
-
if (!h.dirent.isSymbolicLink()) {
|
|
2518
|
-
y(null, h);
|
|
2519
|
-
return;
|
|
2520
|
-
}
|
|
2521
|
-
d.fs.stat(h.path, (T, C) => {
|
|
2522
|
-
if (T !== null) {
|
|
2523
|
-
if (d.throwErrorOnBrokenSymbolicLink) {
|
|
2524
|
-
y(T);
|
|
2525
|
-
return;
|
|
2526
|
-
}
|
|
2527
|
-
y(null, h);
|
|
2528
|
-
return;
|
|
2529
|
-
}
|
|
2530
|
-
h.dirent = u.fs.createDirentFromStats(h.name, C), y(null, h);
|
|
2531
|
-
});
|
|
2532
|
-
};
|
|
2533
|
-
}
|
|
2534
|
-
function i(h, d, y) {
|
|
2535
|
-
d.fs.readdir(h, (T, C) => {
|
|
2536
|
-
if (T !== null) {
|
|
2537
|
-
s(y, T);
|
|
2538
|
-
return;
|
|
2539
|
-
}
|
|
2540
|
-
const m = C.map((S) => {
|
|
2541
|
-
const _ = r.joinPathSegments(h, S, d.pathSegmentSeparator);
|
|
2542
|
-
return (c) => {
|
|
2543
|
-
o.stat(_, d.fsStatSettings, (f, g) => {
|
|
2544
|
-
if (f !== null) {
|
|
2545
|
-
c(f);
|
|
2546
|
-
return;
|
|
2547
|
-
}
|
|
2548
|
-
const R = {
|
|
2549
|
-
name: S,
|
|
2550
|
-
path: _,
|
|
2551
|
-
dirent: u.fs.createDirentFromStats(S, g)
|
|
2552
|
-
};
|
|
2553
|
-
d.stats && (R.stats = g), c(null, R);
|
|
2554
|
-
});
|
|
2555
|
-
};
|
|
2556
|
-
});
|
|
2557
|
-
a(m, (S, _) => {
|
|
2558
|
-
if (S !== null) {
|
|
2559
|
-
s(y, S);
|
|
2560
|
-
return;
|
|
2561
|
-
}
|
|
2562
|
-
p(y, _);
|
|
2563
|
-
});
|
|
2564
|
-
});
|
|
2565
|
-
}
|
|
2566
|
-
Re.readdir = i;
|
|
2567
|
-
function s(h, d) {
|
|
2568
|
-
h(d);
|
|
2569
|
-
}
|
|
2570
|
-
function p(h, d) {
|
|
2571
|
-
h(null, d);
|
|
2572
|
-
}
|
|
2573
|
-
return Re;
|
|
2574
|
-
}
|
|
2575
|
-
var Ae = {}, Wr;
|
|
2576
|
-
function vs() {
|
|
2577
|
-
if (Wr) return Ae;
|
|
2578
|
-
Wr = 1, Object.defineProperty(Ae, "__esModule", { value: !0 }), Ae.readdir = Ae.readdirWithFileTypes = Ae.read = void 0;
|
|
2579
|
-
const o = Le(), a = Cn(), l = Tn(), u = On();
|
|
2580
|
-
function r(e, i) {
|
|
2581
|
-
return !i.stats && a.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? t(e, i) : n(e, i);
|
|
2582
|
-
}
|
|
2583
|
-
Ae.read = r;
|
|
2584
|
-
function t(e, i) {
|
|
2585
|
-
return i.fs.readdirSync(e, { withFileTypes: !0 }).map((p) => {
|
|
2586
|
-
const h = {
|
|
2587
|
-
dirent: p,
|
|
2588
|
-
name: p.name,
|
|
2589
|
-
path: u.joinPathSegments(e, p.name, i.pathSegmentSeparator)
|
|
2590
|
-
};
|
|
2591
|
-
if (h.dirent.isSymbolicLink() && i.followSymbolicLinks)
|
|
2592
|
-
try {
|
|
2593
|
-
const d = i.fs.statSync(h.path);
|
|
2594
|
-
h.dirent = l.fs.createDirentFromStats(h.name, d);
|
|
2595
|
-
} catch (d) {
|
|
2596
|
-
if (i.throwErrorOnBrokenSymbolicLink)
|
|
2597
|
-
throw d;
|
|
2598
|
-
}
|
|
2599
|
-
return h;
|
|
2600
|
-
});
|
|
2601
|
-
}
|
|
2602
|
-
Ae.readdirWithFileTypes = t;
|
|
2603
|
-
function n(e, i) {
|
|
2604
|
-
return i.fs.readdirSync(e).map((p) => {
|
|
2605
|
-
const h = u.joinPathSegments(e, p, i.pathSegmentSeparator), d = o.statSync(h, i.fsStatSettings), y = {
|
|
2606
|
-
name: p,
|
|
2607
|
-
path: h,
|
|
2608
|
-
dirent: l.fs.createDirentFromStats(p, d)
|
|
2609
|
-
};
|
|
2610
|
-
return i.stats && (y.stats = d), y;
|
|
2611
|
-
});
|
|
2612
|
-
}
|
|
2613
|
-
return Ae.readdir = n, Ae;
|
|
2614
|
-
}
|
|
2615
|
-
var Xe = {}, Gt = {}, Vr;
|
|
2616
|
-
function Rs() {
|
|
2617
|
-
return Vr || (Vr = 1, (function(o) {
|
|
2618
|
-
Object.defineProperty(o, "__esModule", { value: !0 }), o.createFileSystemAdapter = o.FILE_SYSTEM_ADAPTER = void 0;
|
|
2619
|
-
const a = Qt;
|
|
2620
|
-
o.FILE_SYSTEM_ADAPTER = {
|
|
2621
|
-
lstat: a.lstat,
|
|
2622
|
-
stat: a.stat,
|
|
2623
|
-
lstatSync: a.lstatSync,
|
|
2624
|
-
statSync: a.statSync,
|
|
2625
|
-
readdir: a.readdir,
|
|
2626
|
-
readdirSync: a.readdirSync
|
|
2627
|
-
};
|
|
2628
|
-
function l(u) {
|
|
2629
|
-
return u === void 0 ? o.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, o.FILE_SYSTEM_ADAPTER), u);
|
|
2630
|
-
}
|
|
2631
|
-
o.createFileSystemAdapter = l;
|
|
2632
|
-
})(Gt)), Gt;
|
|
2633
|
-
}
|
|
2634
|
-
var Kr;
|
|
2635
|
-
function Es() {
|
|
2636
|
-
if (Kr) return Xe;
|
|
2637
|
-
Kr = 1, Object.defineProperty(Xe, "__esModule", { value: !0 });
|
|
2638
|
-
const o = Se, a = Le(), l = Rs();
|
|
2639
|
-
class u {
|
|
2640
|
-
constructor(t = {}) {
|
|
2641
|
-
this._options = t, this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !1), this.fs = l.createFileSystemAdapter(this._options.fs), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, o.sep), this.stats = this._getValue(this._options.stats, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0), this.fsStatSettings = new a.Settings({
|
|
2642
|
-
followSymbolicLink: this.followSymbolicLinks,
|
|
2643
|
-
fs: this.fs,
|
|
2644
|
-
throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
|
|
2645
|
-
});
|
|
2646
|
-
}
|
|
2647
|
-
_getValue(t, n) {
|
|
2648
|
-
return t ?? n;
|
|
2649
|
-
}
|
|
2650
|
-
}
|
|
2651
|
-
return Xe.default = u, Xe;
|
|
2652
|
-
}
|
|
2653
|
-
var Qr;
|
|
2654
|
-
function Zt() {
|
|
2655
|
-
if (Qr) return ve;
|
|
2656
|
-
Qr = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.Settings = ve.scandirSync = ve.scandir = void 0;
|
|
2657
|
-
const o = ms(), a = vs(), l = Es();
|
|
2658
|
-
ve.Settings = l.default;
|
|
2659
|
-
function u(n, e, i) {
|
|
2660
|
-
if (typeof e == "function") {
|
|
2661
|
-
o.read(n, t(), e);
|
|
2662
|
-
return;
|
|
2663
|
-
}
|
|
2664
|
-
o.read(n, t(e), i);
|
|
2665
|
-
}
|
|
2666
|
-
ve.scandir = u;
|
|
2667
|
-
function r(n, e) {
|
|
2668
|
-
const i = t(e);
|
|
2669
|
-
return a.read(n, i);
|
|
2670
|
-
}
|
|
2671
|
-
ve.scandirSync = r;
|
|
2672
|
-
function t(n = {}) {
|
|
2673
|
-
return n instanceof l.default ? n : new l.default(n);
|
|
2674
|
-
}
|
|
2675
|
-
return ve;
|
|
2676
|
-
}
|
|
2677
|
-
var Ye = { exports: {} }, Ut, Xr;
|
|
2678
|
-
function As() {
|
|
2679
|
-
if (Xr) return Ut;
|
|
2680
|
-
Xr = 1;
|
|
2681
|
-
function o(a) {
|
|
2682
|
-
var l = new a(), u = l;
|
|
2683
|
-
function r() {
|
|
2684
|
-
var n = l;
|
|
2685
|
-
return n.next ? l = n.next : (l = new a(), u = l), n.next = null, n;
|
|
2686
|
-
}
|
|
2687
|
-
function t(n) {
|
|
2688
|
-
u.next = n, u = n;
|
|
2689
|
-
}
|
|
2690
|
-
return {
|
|
2691
|
-
get: r,
|
|
2692
|
-
release: t
|
|
2693
|
-
};
|
|
2694
|
-
}
|
|
2695
|
-
return Ut = o, Ut;
|
|
2696
|
-
}
|
|
2697
|
-
var Yr;
|
|
2698
|
-
function bs() {
|
|
2699
|
-
if (Yr) return Ye.exports;
|
|
2700
|
-
Yr = 1;
|
|
2701
|
-
var o = As();
|
|
2702
|
-
function a(t, n, e) {
|
|
2703
|
-
if (typeof t == "function" && (e = n, n = t, t = null), !(e >= 1))
|
|
2704
|
-
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2705
|
-
var i = o(u), s = null, p = null, h = 0, d = null, y = {
|
|
2706
|
-
push: f,
|
|
2707
|
-
drain: l,
|
|
2708
|
-
saturated: l,
|
|
2709
|
-
pause: C,
|
|
2710
|
-
paused: !1,
|
|
2711
|
-
get concurrency() {
|
|
2712
|
-
return e;
|
|
2713
|
-
},
|
|
2714
|
-
set concurrency(k) {
|
|
2715
|
-
if (!(k >= 1))
|
|
2716
|
-
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2717
|
-
if (e = k, !y.paused)
|
|
2718
|
-
for (; s && h < e; )
|
|
2719
|
-
h++, R();
|
|
2720
|
-
},
|
|
2721
|
-
running: T,
|
|
2722
|
-
resume: _,
|
|
2723
|
-
idle: c,
|
|
2724
|
-
length: m,
|
|
2725
|
-
getQueue: S,
|
|
2726
|
-
unshift: g,
|
|
2727
|
-
empty: l,
|
|
2728
|
-
kill: v,
|
|
2729
|
-
killAndDrain: P,
|
|
2730
|
-
error: D,
|
|
2731
|
-
abort: O
|
|
2732
|
-
};
|
|
2733
|
-
return y;
|
|
2734
|
-
function T() {
|
|
2735
|
-
return h;
|
|
2736
|
-
}
|
|
2737
|
-
function C() {
|
|
2738
|
-
y.paused = !0;
|
|
2739
|
-
}
|
|
2740
|
-
function m() {
|
|
2741
|
-
for (var k = s, H = 0; k; )
|
|
2742
|
-
k = k.next, H++;
|
|
2743
|
-
return H;
|
|
2744
|
-
}
|
|
2745
|
-
function S() {
|
|
2746
|
-
for (var k = s, H = []; k; )
|
|
2747
|
-
H.push(k.value), k = k.next;
|
|
2748
|
-
return H;
|
|
2749
|
-
}
|
|
2750
|
-
function _() {
|
|
2751
|
-
if (y.paused) {
|
|
2752
|
-
if (y.paused = !1, s === null) {
|
|
2753
|
-
h++, R();
|
|
2754
|
-
return;
|
|
2755
|
-
}
|
|
2756
|
-
for (; s && h < e; )
|
|
2757
|
-
h++, R();
|
|
2758
|
-
}
|
|
2759
|
-
}
|
|
2760
|
-
function c() {
|
|
2761
|
-
return h === 0 && y.length() === 0;
|
|
2762
|
-
}
|
|
2763
|
-
function f(k, H) {
|
|
2764
|
-
var x = i.get();
|
|
2765
|
-
x.context = t, x.release = R, x.value = k, x.callback = H || l, x.errorHandler = d, h >= e || y.paused ? p ? (p.next = x, p = x) : (s = x, p = x, y.saturated()) : (h++, n.call(t, x.value, x.worked));
|
|
2766
|
-
}
|
|
2767
|
-
function g(k, H) {
|
|
2768
|
-
var x = i.get();
|
|
2769
|
-
x.context = t, x.release = R, x.value = k, x.callback = H || l, x.errorHandler = d, h >= e || y.paused ? s ? (x.next = s, s = x) : (s = x, p = x, y.saturated()) : (h++, n.call(t, x.value, x.worked));
|
|
2770
|
-
}
|
|
2771
|
-
function R(k) {
|
|
2772
|
-
k && i.release(k);
|
|
2773
|
-
var H = s;
|
|
2774
|
-
H && h <= e ? y.paused ? h-- : (p === s && (p = null), s = H.next, H.next = null, n.call(t, H.value, H.worked), p === null && y.empty()) : --h === 0 && y.drain();
|
|
2775
|
-
}
|
|
2776
|
-
function v() {
|
|
2777
|
-
s = null, p = null, y.drain = l;
|
|
2778
|
-
}
|
|
2779
|
-
function P() {
|
|
2780
|
-
s = null, p = null, y.drain(), y.drain = l;
|
|
2781
|
-
}
|
|
2782
|
-
function O() {
|
|
2783
|
-
var k = s;
|
|
2784
|
-
for (s = null, p = null; k; ) {
|
|
2785
|
-
var H = k.next, x = k.callback, U = k.errorHandler, N = k.value, q = k.context;
|
|
2786
|
-
k.value = null, k.callback = l, k.errorHandler = null, U && U(new Error("abort"), N), x.call(q, new Error("abort")), k.release(k), k = H;
|
|
2787
|
-
}
|
|
2788
|
-
y.drain = l;
|
|
2789
|
-
}
|
|
2790
|
-
function D(k) {
|
|
2791
|
-
d = k;
|
|
2792
|
-
}
|
|
2793
|
-
}
|
|
2794
|
-
function l() {
|
|
2795
|
-
}
|
|
2796
|
-
function u() {
|
|
2797
|
-
this.value = null, this.callback = l, this.next = null, this.release = l, this.context = null, this.errorHandler = null;
|
|
2798
|
-
var t = this;
|
|
2799
|
-
this.worked = function(e, i) {
|
|
2800
|
-
var s = t.callback, p = t.errorHandler, h = t.value;
|
|
2801
|
-
t.value = null, t.callback = l, t.errorHandler && p(e, h), s.call(t.context, e, i), t.release(t);
|
|
2802
|
-
};
|
|
2803
|
-
}
|
|
2804
|
-
function r(t, n, e) {
|
|
2805
|
-
typeof t == "function" && (e = n, n = t, t = null);
|
|
2806
|
-
function i(C, m) {
|
|
2807
|
-
n.call(this, C).then(function(S) {
|
|
2808
|
-
m(null, S);
|
|
2809
|
-
}, m);
|
|
2810
|
-
}
|
|
2811
|
-
var s = a(t, i, e), p = s.push, h = s.unshift;
|
|
2812
|
-
return s.push = d, s.unshift = y, s.drained = T, s;
|
|
2813
|
-
function d(C) {
|
|
2814
|
-
var m = new Promise(function(S, _) {
|
|
2815
|
-
p(C, function(c, f) {
|
|
2816
|
-
if (c) {
|
|
2817
|
-
_(c);
|
|
2818
|
-
return;
|
|
2819
|
-
}
|
|
2820
|
-
S(f);
|
|
2821
|
-
});
|
|
2822
|
-
});
|
|
2823
|
-
return m.catch(l), m;
|
|
2824
|
-
}
|
|
2825
|
-
function y(C) {
|
|
2826
|
-
var m = new Promise(function(S, _) {
|
|
2827
|
-
h(C, function(c, f) {
|
|
2828
|
-
if (c) {
|
|
2829
|
-
_(c);
|
|
2830
|
-
return;
|
|
2831
|
-
}
|
|
2832
|
-
S(f);
|
|
2833
|
-
});
|
|
2834
|
-
});
|
|
2835
|
-
return m.catch(l), m;
|
|
2836
|
-
}
|
|
2837
|
-
function T() {
|
|
2838
|
-
var C = new Promise(function(m) {
|
|
2839
|
-
process.nextTick(function() {
|
|
2840
|
-
if (s.idle())
|
|
2841
|
-
m();
|
|
2842
|
-
else {
|
|
2843
|
-
var S = s.drain;
|
|
2844
|
-
s.drain = function() {
|
|
2845
|
-
typeof S == "function" && S(), m(), s.drain = S;
|
|
2846
|
-
};
|
|
2847
|
-
}
|
|
2848
|
-
});
|
|
2849
|
-
});
|
|
2850
|
-
return C;
|
|
2851
|
-
}
|
|
2852
|
-
}
|
|
2853
|
-
return Ye.exports = a, Ye.exports.promise = r, Ye.exports;
|
|
2854
|
-
}
|
|
2855
|
-
var _e = {}, Zr;
|
|
2856
|
-
function zt() {
|
|
2857
|
-
if (Zr) return _e;
|
|
2858
|
-
Zr = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.joinPathSegments = _e.replacePathSegmentSeparator = _e.isAppliedFilter = _e.isFatalError = void 0;
|
|
2859
|
-
function o(r, t) {
|
|
2860
|
-
return r.errorFilter === null ? !0 : !r.errorFilter(t);
|
|
2861
|
-
}
|
|
2862
|
-
_e.isFatalError = o;
|
|
2863
|
-
function a(r, t) {
|
|
2864
|
-
return r === null || r(t);
|
|
2865
|
-
}
|
|
2866
|
-
_e.isAppliedFilter = a;
|
|
2867
|
-
function l(r, t) {
|
|
2868
|
-
return r.split(/[/\\]/).join(t);
|
|
2869
|
-
}
|
|
2870
|
-
_e.replacePathSegmentSeparator = l;
|
|
2871
|
-
function u(r, t, n) {
|
|
2872
|
-
return r === "" ? t : r.endsWith(n) ? r + t : r + n + t;
|
|
2873
|
-
}
|
|
2874
|
-
return _e.joinPathSegments = u, _e;
|
|
2875
|
-
}
|
|
2876
|
-
var Ze = {}, zr;
|
|
2877
|
-
function wn() {
|
|
2878
|
-
if (zr) return Ze;
|
|
2879
|
-
zr = 1, Object.defineProperty(Ze, "__esModule", { value: !0 });
|
|
2880
|
-
const o = zt();
|
|
2881
|
-
class a {
|
|
2882
|
-
constructor(u, r) {
|
|
2883
|
-
this._root = u, this._settings = r, this._root = o.replacePathSegmentSeparator(u, r.pathSegmentSeparator);
|
|
2884
|
-
}
|
|
2885
|
-
}
|
|
2886
|
-
return Ze.default = a, Ze;
|
|
2887
|
-
}
|
|
2888
|
-
var Jr;
|
|
2889
|
-
function $n() {
|
|
2890
|
-
if (Jr) return Ke;
|
|
2891
|
-
Jr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 });
|
|
2892
|
-
const o = Fn, a = Zt(), l = bs(), u = zt(), r = wn();
|
|
2893
|
-
class t extends r.default {
|
|
2894
|
-
constructor(e, i) {
|
|
2895
|
-
super(e, i), this._settings = i, this._scandir = a.scandir, this._emitter = new o.EventEmitter(), this._queue = l(this._worker.bind(this), this._settings.concurrency), this._isFatalError = !1, this._isDestroyed = !1, this._queue.drain = () => {
|
|
2896
|
-
this._isFatalError || this._emitter.emit("end");
|
|
2897
|
-
};
|
|
2898
|
-
}
|
|
2899
|
-
read() {
|
|
2900
|
-
return this._isFatalError = !1, this._isDestroyed = !1, setImmediate(() => {
|
|
2901
|
-
this._pushToQueue(this._root, this._settings.basePath);
|
|
2902
|
-
}), this._emitter;
|
|
2903
|
-
}
|
|
2904
|
-
get isDestroyed() {
|
|
2905
|
-
return this._isDestroyed;
|
|
2906
|
-
}
|
|
2907
|
-
destroy() {
|
|
2908
|
-
if (this._isDestroyed)
|
|
2909
|
-
throw new Error("The reader is already destroyed");
|
|
2910
|
-
this._isDestroyed = !0, this._queue.killAndDrain();
|
|
2911
|
-
}
|
|
2912
|
-
onEntry(e) {
|
|
2913
|
-
this._emitter.on("entry", e);
|
|
2914
|
-
}
|
|
2915
|
-
onError(e) {
|
|
2916
|
-
this._emitter.once("error", e);
|
|
2917
|
-
}
|
|
2918
|
-
onEnd(e) {
|
|
2919
|
-
this._emitter.once("end", e);
|
|
2920
|
-
}
|
|
2921
|
-
_pushToQueue(e, i) {
|
|
2922
|
-
const s = { directory: e, base: i };
|
|
2923
|
-
this._queue.push(s, (p) => {
|
|
2924
|
-
p !== null && this._handleError(p);
|
|
2925
|
-
});
|
|
2926
|
-
}
|
|
2927
|
-
_worker(e, i) {
|
|
2928
|
-
this._scandir(e.directory, this._settings.fsScandirSettings, (s, p) => {
|
|
2929
|
-
if (s !== null) {
|
|
2930
|
-
i(s, void 0);
|
|
2931
|
-
return;
|
|
2932
|
-
}
|
|
2933
|
-
for (const h of p)
|
|
2934
|
-
this._handleEntry(h, e.base);
|
|
2935
|
-
i(null, void 0);
|
|
2936
|
-
});
|
|
2937
|
-
}
|
|
2938
|
-
_handleError(e) {
|
|
2939
|
-
this._isDestroyed || !u.isFatalError(this._settings, e) || (this._isFatalError = !0, this._isDestroyed = !0, this._emitter.emit("error", e));
|
|
2940
|
-
}
|
|
2941
|
-
_handleEntry(e, i) {
|
|
2942
|
-
if (this._isDestroyed || this._isFatalError)
|
|
2943
|
-
return;
|
|
2944
|
-
const s = e.path;
|
|
2945
|
-
i !== void 0 && (e.path = u.joinPathSegments(i, e.name, this._settings.pathSegmentSeparator)), u.isAppliedFilter(this._settings.entryFilter, e) && this._emitEntry(e), e.dirent.isDirectory() && u.isAppliedFilter(this._settings.deepFilter, e) && this._pushToQueue(s, i === void 0 ? void 0 : e.path);
|
|
2946
|
-
}
|
|
2947
|
-
_emitEntry(e) {
|
|
2948
|
-
this._emitter.emit("entry", e);
|
|
2949
|
-
}
|
|
2950
|
-
}
|
|
2951
|
-
return Ke.default = t, Ke;
|
|
2952
|
-
}
|
|
2953
|
-
var en;
|
|
2954
|
-
function Ps() {
|
|
2955
|
-
if (en) return Ve;
|
|
2956
|
-
en = 1, Object.defineProperty(Ve, "__esModule", { value: !0 });
|
|
2957
|
-
const o = $n();
|
|
2958
|
-
class a {
|
|
2959
|
-
constructor(t, n) {
|
|
2960
|
-
this._root = t, this._settings = n, this._reader = new o.default(this._root, this._settings), this._storage = [];
|
|
2961
|
-
}
|
|
2962
|
-
read(t) {
|
|
2963
|
-
this._reader.onError((n) => {
|
|
2964
|
-
l(t, n);
|
|
2965
|
-
}), this._reader.onEntry((n) => {
|
|
2966
|
-
this._storage.push(n);
|
|
2967
|
-
}), this._reader.onEnd(() => {
|
|
2968
|
-
u(t, this._storage);
|
|
2969
|
-
}), this._reader.read();
|
|
2970
|
-
}
|
|
2971
|
-
}
|
|
2972
|
-
Ve.default = a;
|
|
2973
|
-
function l(r, t) {
|
|
2974
|
-
r(t);
|
|
2975
|
-
}
|
|
2976
|
-
function u(r, t) {
|
|
2977
|
-
r(null, t);
|
|
2978
|
-
}
|
|
2979
|
-
return Ve;
|
|
2980
|
-
}
|
|
2981
|
-
var ze = {}, tn;
|
|
2982
|
-
function xs() {
|
|
2983
|
-
if (tn) return ze;
|
|
2984
|
-
tn = 1, Object.defineProperty(ze, "__esModule", { value: !0 });
|
|
2985
|
-
const o = dt, a = $n();
|
|
2986
|
-
class l {
|
|
2987
|
-
constructor(r, t) {
|
|
2988
|
-
this._root = r, this._settings = t, this._reader = new a.default(this._root, this._settings), this._stream = new o.Readable({
|
|
2989
|
-
objectMode: !0,
|
|
2990
|
-
read: () => {
|
|
2991
|
-
},
|
|
2992
|
-
destroy: () => {
|
|
2993
|
-
this._reader.isDestroyed || this._reader.destroy();
|
|
2994
|
-
}
|
|
2995
|
-
});
|
|
2996
|
-
}
|
|
2997
|
-
read() {
|
|
2998
|
-
return this._reader.onError((r) => {
|
|
2999
|
-
this._stream.emit("error", r);
|
|
3000
|
-
}), this._reader.onEntry((r) => {
|
|
3001
|
-
this._stream.push(r);
|
|
3002
|
-
}), this._reader.onEnd(() => {
|
|
3003
|
-
this._stream.push(null);
|
|
3004
|
-
}), this._reader.read(), this._stream;
|
|
3005
|
-
}
|
|
3006
|
-
}
|
|
3007
|
-
return ze.default = l, ze;
|
|
3008
|
-
}
|
|
3009
|
-
var Je = {}, et = {}, rn;
|
|
3010
|
-
function Cs() {
|
|
3011
|
-
if (rn) return et;
|
|
3012
|
-
rn = 1, Object.defineProperty(et, "__esModule", { value: !0 });
|
|
3013
|
-
const o = Zt(), a = zt(), l = wn();
|
|
3014
|
-
class u extends l.default {
|
|
3015
|
-
constructor() {
|
|
3016
|
-
super(...arguments), this._scandir = o.scandirSync, this._storage = [], this._queue = /* @__PURE__ */ new Set();
|
|
3017
|
-
}
|
|
3018
|
-
read() {
|
|
3019
|
-
return this._pushToQueue(this._root, this._settings.basePath), this._handleQueue(), this._storage;
|
|
3020
|
-
}
|
|
3021
|
-
_pushToQueue(t, n) {
|
|
3022
|
-
this._queue.add({ directory: t, base: n });
|
|
3023
|
-
}
|
|
3024
|
-
_handleQueue() {
|
|
3025
|
-
for (const t of this._queue.values())
|
|
3026
|
-
this._handleDirectory(t.directory, t.base);
|
|
3027
|
-
}
|
|
3028
|
-
_handleDirectory(t, n) {
|
|
3029
|
-
try {
|
|
3030
|
-
const e = this._scandir(t, this._settings.fsScandirSettings);
|
|
3031
|
-
for (const i of e)
|
|
3032
|
-
this._handleEntry(i, n);
|
|
3033
|
-
} catch (e) {
|
|
3034
|
-
this._handleError(e);
|
|
3035
|
-
}
|
|
3036
|
-
}
|
|
3037
|
-
_handleError(t) {
|
|
3038
|
-
if (a.isFatalError(this._settings, t))
|
|
3039
|
-
throw t;
|
|
3040
|
-
}
|
|
3041
|
-
_handleEntry(t, n) {
|
|
3042
|
-
const e = t.path;
|
|
3043
|
-
n !== void 0 && (t.path = a.joinPathSegments(n, t.name, this._settings.pathSegmentSeparator)), a.isAppliedFilter(this._settings.entryFilter, t) && this._pushToStorage(t), t.dirent.isDirectory() && a.isAppliedFilter(this._settings.deepFilter, t) && this._pushToQueue(e, n === void 0 ? void 0 : t.path);
|
|
3044
|
-
}
|
|
3045
|
-
_pushToStorage(t) {
|
|
3046
|
-
this._storage.push(t);
|
|
3047
|
-
}
|
|
3048
|
-
}
|
|
3049
|
-
return et.default = u, et;
|
|
3050
|
-
}
|
|
3051
|
-
var nn;
|
|
3052
|
-
function Ts() {
|
|
3053
|
-
if (nn) return Je;
|
|
3054
|
-
nn = 1, Object.defineProperty(Je, "__esModule", { value: !0 });
|
|
3055
|
-
const o = Cs();
|
|
3056
|
-
class a {
|
|
3057
|
-
constructor(u, r) {
|
|
3058
|
-
this._root = u, this._settings = r, this._reader = new o.default(this._root, this._settings);
|
|
3059
|
-
}
|
|
3060
|
-
read() {
|
|
3061
|
-
return this._reader.read();
|
|
3062
|
-
}
|
|
3063
|
-
}
|
|
3064
|
-
return Je.default = a, Je;
|
|
3065
|
-
}
|
|
3066
|
-
var tt = {}, sn;
|
|
3067
|
-
function Os() {
|
|
3068
|
-
if (sn) return tt;
|
|
3069
|
-
sn = 1, Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
3070
|
-
const o = Se, a = Zt();
|
|
3071
|
-
class l {
|
|
3072
|
-
constructor(r = {}) {
|
|
3073
|
-
this._options = r, 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, o.sep), this.fsScandirSettings = new a.Settings({
|
|
3074
|
-
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
3075
|
-
fs: this._options.fs,
|
|
3076
|
-
pathSegmentSeparator: this._options.pathSegmentSeparator,
|
|
3077
|
-
stats: this._options.stats,
|
|
3078
|
-
throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
|
|
3079
|
-
});
|
|
3080
|
-
}
|
|
3081
|
-
_getValue(r, t) {
|
|
3082
|
-
return r ?? t;
|
|
3083
|
-
}
|
|
3084
|
-
}
|
|
3085
|
-
return tt.default = l, tt;
|
|
3086
|
-
}
|
|
3087
|
-
var an;
|
|
3088
|
-
function Jt() {
|
|
3089
|
-
if (an) return de;
|
|
3090
|
-
an = 1, Object.defineProperty(de, "__esModule", { value: !0 }), de.Settings = de.walkStream = de.walkSync = de.walk = void 0;
|
|
3091
|
-
const o = Ps(), a = xs(), l = Ts(), u = Os();
|
|
3092
|
-
de.Settings = u.default;
|
|
3093
|
-
function r(i, s, p) {
|
|
3094
|
-
if (typeof s == "function") {
|
|
3095
|
-
new o.default(i, e()).read(s);
|
|
3096
|
-
return;
|
|
3097
|
-
}
|
|
3098
|
-
new o.default(i, e(s)).read(p);
|
|
3099
|
-
}
|
|
3100
|
-
de.walk = r;
|
|
3101
|
-
function t(i, s) {
|
|
3102
|
-
const p = e(s);
|
|
3103
|
-
return new l.default(i, p).read();
|
|
3104
|
-
}
|
|
3105
|
-
de.walkSync = t;
|
|
3106
|
-
function n(i, s) {
|
|
3107
|
-
const p = e(s);
|
|
3108
|
-
return new a.default(i, p).read();
|
|
3109
|
-
}
|
|
3110
|
-
de.walkStream = n;
|
|
3111
|
-
function e(i = {}) {
|
|
3112
|
-
return i instanceof u.default ? i : new u.default(i);
|
|
3113
|
-
}
|
|
3114
|
-
return de;
|
|
3115
|
-
}
|
|
3116
|
-
var rt = {}, on;
|
|
3117
|
-
function er() {
|
|
3118
|
-
if (on) return rt;
|
|
3119
|
-
on = 1, Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
3120
|
-
const o = Se, a = Le(), l = Te();
|
|
3121
|
-
class u {
|
|
3122
|
-
constructor(t) {
|
|
3123
|
-
this._settings = t, this._fsStatSettings = new a.Settings({
|
|
3124
|
-
followSymbolicLink: this._settings.followSymbolicLinks,
|
|
3125
|
-
fs: this._settings.fs,
|
|
3126
|
-
throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
|
|
3127
|
-
});
|
|
3128
|
-
}
|
|
3129
|
-
_getFullEntryPath(t) {
|
|
3130
|
-
return o.resolve(this._settings.cwd, t);
|
|
3131
|
-
}
|
|
3132
|
-
_makeEntry(t, n) {
|
|
3133
|
-
const e = {
|
|
3134
|
-
name: n,
|
|
3135
|
-
path: n,
|
|
3136
|
-
dirent: l.fs.createDirentFromStats(n, t)
|
|
3137
|
-
};
|
|
3138
|
-
return this._settings.stats && (e.stats = t), e;
|
|
3139
|
-
}
|
|
3140
|
-
_isFatalError(t) {
|
|
3141
|
-
return !l.errno.isEnoentCodeError(t) && !this._settings.suppressErrors;
|
|
3142
|
-
}
|
|
3143
|
-
}
|
|
3144
|
-
return rt.default = u, rt;
|
|
3145
|
-
}
|
|
3146
|
-
var nt = {}, un;
|
|
3147
|
-
function Ln() {
|
|
3148
|
-
if (un) return nt;
|
|
3149
|
-
un = 1, Object.defineProperty(nt, "__esModule", { value: !0 });
|
|
3150
|
-
const o = dt, a = Le(), l = Jt(), u = er();
|
|
3151
|
-
class r extends u.default {
|
|
3152
|
-
constructor() {
|
|
3153
|
-
super(...arguments), this._walkStream = l.walkStream, this._stat = a.stat;
|
|
3154
|
-
}
|
|
3155
|
-
dynamic(n, e) {
|
|
3156
|
-
return this._walkStream(n, e);
|
|
3157
|
-
}
|
|
3158
|
-
static(n, e) {
|
|
3159
|
-
const i = n.map(this._getFullEntryPath, this), s = new o.PassThrough({ objectMode: !0 });
|
|
3160
|
-
s._write = (p, h, d) => this._getEntry(i[p], n[p], e).then((y) => {
|
|
3161
|
-
y !== null && e.entryFilter(y) && s.push(y), p === i.length - 1 && s.end(), d();
|
|
3162
|
-
}).catch(d);
|
|
3163
|
-
for (let p = 0; p < i.length; p++)
|
|
3164
|
-
s.write(p);
|
|
3165
|
-
return s;
|
|
3166
|
-
}
|
|
3167
|
-
_getEntry(n, e, i) {
|
|
3168
|
-
return this._getStat(n).then((s) => this._makeEntry(s, e)).catch((s) => {
|
|
3169
|
-
if (i.errorFilter(s))
|
|
3170
|
-
return null;
|
|
3171
|
-
throw s;
|
|
3172
|
-
});
|
|
3173
|
-
}
|
|
3174
|
-
_getStat(n) {
|
|
3175
|
-
return new Promise((e, i) => {
|
|
3176
|
-
this._stat(n, this._fsStatSettings, (s, p) => s === null ? e(p) : i(s));
|
|
3177
|
-
});
|
|
3178
|
-
}
|
|
3179
|
-
}
|
|
3180
|
-
return nt.default = r, nt;
|
|
3181
|
-
}
|
|
3182
|
-
var cn;
|
|
3183
|
-
function ws() {
|
|
3184
|
-
if (cn) return We;
|
|
3185
|
-
cn = 1, Object.defineProperty(We, "__esModule", { value: !0 });
|
|
3186
|
-
const o = Jt(), a = er(), l = Ln();
|
|
3187
|
-
class u extends a.default {
|
|
3188
|
-
constructor() {
|
|
3189
|
-
super(...arguments), this._walkAsync = o.walk, this._readerStream = new l.default(this._settings);
|
|
3190
|
-
}
|
|
3191
|
-
dynamic(t, n) {
|
|
3192
|
-
return new Promise((e, i) => {
|
|
3193
|
-
this._walkAsync(t, n, (s, p) => {
|
|
3194
|
-
s === null ? e(p) : i(s);
|
|
3195
|
-
});
|
|
3196
|
-
});
|
|
3197
|
-
}
|
|
3198
|
-
async static(t, n) {
|
|
3199
|
-
const e = [], i = this._readerStream.static(t, n);
|
|
3200
|
-
return new Promise((s, p) => {
|
|
3201
|
-
i.once("error", p), i.on("data", (h) => e.push(h)), i.once("end", () => s(e));
|
|
3202
|
-
});
|
|
3203
|
-
}
|
|
3204
|
-
}
|
|
3205
|
-
return We.default = u, We;
|
|
3206
|
-
}
|
|
3207
|
-
var st = {}, it = {}, at = {}, ot = {}, ln;
|
|
3208
|
-
function $s() {
|
|
3209
|
-
if (ln) return ot;
|
|
3210
|
-
ln = 1, Object.defineProperty(ot, "__esModule", { value: !0 });
|
|
3211
|
-
const o = Te();
|
|
3212
|
-
class a {
|
|
3213
|
-
constructor(u, r, t) {
|
|
3214
|
-
this._patterns = u, this._settings = r, this._micromatchOptions = t, this._storage = [], this._fillStorage();
|
|
3215
|
-
}
|
|
3216
|
-
_fillStorage() {
|
|
3217
|
-
for (const u of this._patterns) {
|
|
3218
|
-
const r = this._getPatternSegments(u), t = this._splitSegmentsIntoSections(r);
|
|
3219
|
-
this._storage.push({
|
|
3220
|
-
complete: t.length <= 1,
|
|
3221
|
-
pattern: u,
|
|
3222
|
-
segments: r,
|
|
3223
|
-
sections: t
|
|
3224
|
-
});
|
|
3225
|
-
}
|
|
3226
|
-
}
|
|
3227
|
-
_getPatternSegments(u) {
|
|
3228
|
-
return o.pattern.getPatternParts(u, this._micromatchOptions).map((t) => o.pattern.isDynamicPattern(t, this._settings) ? {
|
|
3229
|
-
dynamic: !0,
|
|
3230
|
-
pattern: t,
|
|
3231
|
-
patternRe: o.pattern.makeRe(t, this._micromatchOptions)
|
|
3232
|
-
} : {
|
|
3233
|
-
dynamic: !1,
|
|
3234
|
-
pattern: t
|
|
3235
|
-
});
|
|
3236
|
-
}
|
|
3237
|
-
_splitSegmentsIntoSections(u) {
|
|
3238
|
-
return o.array.splitWhen(u, (r) => r.dynamic && o.pattern.hasGlobStar(r.pattern));
|
|
3239
|
-
}
|
|
3240
|
-
}
|
|
3241
|
-
return ot.default = a, ot;
|
|
3242
|
-
}
|
|
3243
|
-
var fn;
|
|
3244
|
-
function Ls() {
|
|
3245
|
-
if (fn) return at;
|
|
3246
|
-
fn = 1, Object.defineProperty(at, "__esModule", { value: !0 });
|
|
3247
|
-
const o = $s();
|
|
3248
|
-
class a extends o.default {
|
|
3249
|
-
match(u) {
|
|
3250
|
-
const r = u.split("/"), t = r.length, n = this._storage.filter((e) => !e.complete || e.segments.length > t);
|
|
3251
|
-
for (const e of n) {
|
|
3252
|
-
const i = e.sections[0];
|
|
3253
|
-
if (!e.complete && t > i.length || r.every((p, h) => {
|
|
3254
|
-
const d = e.segments[h];
|
|
3255
|
-
return !!(d.dynamic && d.patternRe.test(p) || !d.dynamic && d.pattern === p);
|
|
3256
|
-
}))
|
|
3257
|
-
return !0;
|
|
3258
|
-
}
|
|
3259
|
-
return !1;
|
|
3260
|
-
}
|
|
3261
|
-
}
|
|
3262
|
-
return at.default = a, at;
|
|
3263
|
-
}
|
|
3264
|
-
var hn;
|
|
3265
|
-
function ks() {
|
|
3266
|
-
if (hn) return it;
|
|
3267
|
-
hn = 1, Object.defineProperty(it, "__esModule", { value: !0 });
|
|
3268
|
-
const o = Te(), a = Ls();
|
|
3269
|
-
class l {
|
|
3270
|
-
constructor(r, t) {
|
|
3271
|
-
this._settings = r, this._micromatchOptions = t;
|
|
3272
|
-
}
|
|
3273
|
-
getFilter(r, t, n) {
|
|
3274
|
-
const e = this._getMatcher(t), i = this._getNegativePatternsRe(n);
|
|
3275
|
-
return (s) => this._filter(r, s, e, i);
|
|
3276
|
-
}
|
|
3277
|
-
_getMatcher(r) {
|
|
3278
|
-
return new a.default(r, this._settings, this._micromatchOptions);
|
|
3279
|
-
}
|
|
3280
|
-
_getNegativePatternsRe(r) {
|
|
3281
|
-
const t = r.filter(o.pattern.isAffectDepthOfReadingPattern);
|
|
3282
|
-
return o.pattern.convertPatternsToRe(t, this._micromatchOptions);
|
|
3283
|
-
}
|
|
3284
|
-
_filter(r, t, n, e) {
|
|
3285
|
-
if (this._isSkippedByDeep(r, t.path) || this._isSkippedSymbolicLink(t))
|
|
3286
|
-
return !1;
|
|
3287
|
-
const i = o.path.removeLeadingDotSegment(t.path);
|
|
3288
|
-
return this._isSkippedByPositivePatterns(i, n) ? !1 : this._isSkippedByNegativePatterns(i, e);
|
|
3289
|
-
}
|
|
3290
|
-
_isSkippedByDeep(r, t) {
|
|
3291
|
-
return this._settings.deep === 1 / 0 ? !1 : this._getEntryLevel(r, t) >= this._settings.deep;
|
|
3292
|
-
}
|
|
3293
|
-
_getEntryLevel(r, t) {
|
|
3294
|
-
const n = t.split("/").length;
|
|
3295
|
-
if (r === "")
|
|
3296
|
-
return n;
|
|
3297
|
-
const e = r.split("/").length;
|
|
3298
|
-
return n - e;
|
|
3299
|
-
}
|
|
3300
|
-
_isSkippedSymbolicLink(r) {
|
|
3301
|
-
return !this._settings.followSymbolicLinks && r.dirent.isSymbolicLink();
|
|
3302
|
-
}
|
|
3303
|
-
_isSkippedByPositivePatterns(r, t) {
|
|
3304
|
-
return !this._settings.baseNameMatch && !t.match(r);
|
|
3305
|
-
}
|
|
3306
|
-
_isSkippedByNegativePatterns(r, t) {
|
|
3307
|
-
return !o.pattern.matchAny(r, t);
|
|
3308
|
-
}
|
|
3309
|
-
}
|
|
3310
|
-
return it.default = l, it;
|
|
3311
|
-
}
|
|
3312
|
-
var ut = {}, pn;
|
|
3313
|
-
function Hs() {
|
|
3314
|
-
if (pn) return ut;
|
|
3315
|
-
pn = 1, Object.defineProperty(ut, "__esModule", { value: !0 });
|
|
3316
|
-
const o = Te();
|
|
3317
|
-
class a {
|
|
3318
|
-
constructor(u, r) {
|
|
3319
|
-
this._settings = u, this._micromatchOptions = r, this.index = /* @__PURE__ */ new Map();
|
|
3320
|
-
}
|
|
3321
|
-
getFilter(u, r) {
|
|
3322
|
-
const [t, n] = o.pattern.partitionAbsoluteAndRelative(r), e = {
|
|
3323
|
-
positive: {
|
|
3324
|
-
all: o.pattern.convertPatternsToRe(u, this._micromatchOptions)
|
|
3325
|
-
},
|
|
3326
|
-
negative: {
|
|
3327
|
-
absolute: o.pattern.convertPatternsToRe(t, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 })),
|
|
3328
|
-
relative: o.pattern.convertPatternsToRe(n, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 }))
|
|
3329
|
-
}
|
|
3330
|
-
};
|
|
3331
|
-
return (i) => this._filter(i, e);
|
|
3332
|
-
}
|
|
3333
|
-
_filter(u, r) {
|
|
3334
|
-
const t = o.path.removeLeadingDotSegment(u.path);
|
|
3335
|
-
if (this._settings.unique && this._isDuplicateEntry(t) || this._onlyFileFilter(u) || this._onlyDirectoryFilter(u))
|
|
3336
|
-
return !1;
|
|
3337
|
-
const n = this._isMatchToPatternsSet(t, r, u.dirent.isDirectory());
|
|
3338
|
-
return this._settings.unique && n && this._createIndexRecord(t), n;
|
|
3339
|
-
}
|
|
3340
|
-
_isDuplicateEntry(u) {
|
|
3341
|
-
return this.index.has(u);
|
|
3342
|
-
}
|
|
3343
|
-
_createIndexRecord(u) {
|
|
3344
|
-
this.index.set(u, void 0);
|
|
3345
|
-
}
|
|
3346
|
-
_onlyFileFilter(u) {
|
|
3347
|
-
return this._settings.onlyFiles && !u.dirent.isFile();
|
|
3348
|
-
}
|
|
3349
|
-
_onlyDirectoryFilter(u) {
|
|
3350
|
-
return this._settings.onlyDirectories && !u.dirent.isDirectory();
|
|
3351
|
-
}
|
|
3352
|
-
_isMatchToPatternsSet(u, r, t) {
|
|
3353
|
-
return !(!this._isMatchToPatterns(u, r.positive.all, t) || this._isMatchToPatterns(u, r.negative.relative, t) || this._isMatchToAbsoluteNegative(u, r.negative.absolute, t));
|
|
3354
|
-
}
|
|
3355
|
-
_isMatchToAbsoluteNegative(u, r, t) {
|
|
3356
|
-
if (r.length === 0)
|
|
3357
|
-
return !1;
|
|
3358
|
-
const n = o.path.makeAbsolute(this._settings.cwd, u);
|
|
3359
|
-
return this._isMatchToPatterns(n, r, t);
|
|
3360
|
-
}
|
|
3361
|
-
_isMatchToPatterns(u, r, t) {
|
|
3362
|
-
if (r.length === 0)
|
|
3363
|
-
return !1;
|
|
3364
|
-
const n = o.pattern.matchAny(u, r);
|
|
3365
|
-
return !n && t ? o.pattern.matchAny(u + "/", r) : n;
|
|
3366
|
-
}
|
|
3367
|
-
}
|
|
3368
|
-
return ut.default = a, ut;
|
|
3369
|
-
}
|
|
3370
|
-
var ct = {}, dn;
|
|
3371
|
-
function Ms() {
|
|
3372
|
-
if (dn) return ct;
|
|
3373
|
-
dn = 1, Object.defineProperty(ct, "__esModule", { value: !0 });
|
|
3374
|
-
const o = Te();
|
|
3375
|
-
class a {
|
|
3376
|
-
constructor(u) {
|
|
3377
|
-
this._settings = u;
|
|
3378
|
-
}
|
|
3379
|
-
getFilter() {
|
|
3380
|
-
return (u) => this._isNonFatalError(u);
|
|
3381
|
-
}
|
|
3382
|
-
_isNonFatalError(u) {
|
|
3383
|
-
return o.errno.isEnoentCodeError(u) || this._settings.suppressErrors;
|
|
3384
|
-
}
|
|
3385
|
-
}
|
|
3386
|
-
return ct.default = a, ct;
|
|
3387
|
-
}
|
|
3388
|
-
var lt = {}, _n;
|
|
3389
|
-
function Ds() {
|
|
3390
|
-
if (_n) return lt;
|
|
3391
|
-
_n = 1, Object.defineProperty(lt, "__esModule", { value: !0 });
|
|
3392
|
-
const o = Te();
|
|
3393
|
-
class a {
|
|
3394
|
-
constructor(u) {
|
|
3395
|
-
this._settings = u;
|
|
3396
|
-
}
|
|
3397
|
-
getTransformer() {
|
|
3398
|
-
return (u) => this._transform(u);
|
|
3399
|
-
}
|
|
3400
|
-
_transform(u) {
|
|
3401
|
-
let r = u.path;
|
|
3402
|
-
return this._settings.absolute && (r = o.path.makeAbsolute(this._settings.cwd, r), r = o.path.unixify(r)), this._settings.markDirectories && u.dirent.isDirectory() && (r += "/"), this._settings.objectMode ? Object.assign(Object.assign({}, u), { path: r }) : r;
|
|
3403
|
-
}
|
|
3404
|
-
}
|
|
3405
|
-
return lt.default = a, lt;
|
|
3406
|
-
}
|
|
3407
|
-
var gn;
|
|
3408
|
-
function tr() {
|
|
3409
|
-
if (gn) return st;
|
|
3410
|
-
gn = 1, Object.defineProperty(st, "__esModule", { value: !0 });
|
|
3411
|
-
const o = Se, a = ks(), l = Hs(), u = Ms(), r = Ds();
|
|
3412
|
-
class t {
|
|
3413
|
-
constructor(e) {
|
|
3414
|
-
this._settings = e, this.errorFilter = new u.default(this._settings), this.entryFilter = new l.default(this._settings, this._getMicromatchOptions()), this.deepFilter = new a.default(this._settings, this._getMicromatchOptions()), this.entryTransformer = new r.default(this._settings);
|
|
3415
|
-
}
|
|
3416
|
-
_getRootDirectory(e) {
|
|
3417
|
-
return o.resolve(this._settings.cwd, e.base);
|
|
3418
|
-
}
|
|
3419
|
-
_getReaderOptions(e) {
|
|
3420
|
-
const i = e.base === "." ? "" : e.base;
|
|
3421
|
-
return {
|
|
3422
|
-
basePath: i,
|
|
3423
|
-
pathSegmentSeparator: "/",
|
|
3424
|
-
concurrency: this._settings.concurrency,
|
|
3425
|
-
deepFilter: this.deepFilter.getFilter(i, e.positive, e.negative),
|
|
3426
|
-
entryFilter: this.entryFilter.getFilter(e.positive, e.negative),
|
|
3427
|
-
errorFilter: this.errorFilter.getFilter(),
|
|
3428
|
-
followSymbolicLinks: this._settings.followSymbolicLinks,
|
|
3429
|
-
fs: this._settings.fs,
|
|
3430
|
-
stats: this._settings.stats,
|
|
3431
|
-
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
|
|
3432
|
-
transform: this.entryTransformer.getTransformer()
|
|
3433
|
-
};
|
|
3434
|
-
}
|
|
3435
|
-
_getMicromatchOptions() {
|
|
3436
|
-
return {
|
|
3437
|
-
dot: this._settings.dot,
|
|
3438
|
-
matchBase: this._settings.baseNameMatch,
|
|
3439
|
-
nobrace: !this._settings.braceExpansion,
|
|
3440
|
-
nocase: !this._settings.caseSensitiveMatch,
|
|
3441
|
-
noext: !this._settings.extglob,
|
|
3442
|
-
noglobstar: !this._settings.globstar,
|
|
3443
|
-
posix: !0,
|
|
3444
|
-
strictSlashes: !1
|
|
3445
|
-
};
|
|
3446
|
-
}
|
|
3447
|
-
}
|
|
3448
|
-
return st.default = t, st;
|
|
3449
|
-
}
|
|
3450
|
-
var yn;
|
|
3451
|
-
function Is() {
|
|
3452
|
-
if (yn) return Ue;
|
|
3453
|
-
yn = 1, Object.defineProperty(Ue, "__esModule", { value: !0 });
|
|
3454
|
-
const o = ws(), a = tr();
|
|
3455
|
-
class l extends a.default {
|
|
3456
|
-
constructor() {
|
|
3457
|
-
super(...arguments), this._reader = new o.default(this._settings);
|
|
3458
|
-
}
|
|
3459
|
-
async read(r) {
|
|
3460
|
-
const t = this._getRootDirectory(r), n = this._getReaderOptions(r);
|
|
3461
|
-
return (await this.api(t, r, n)).map((i) => n.transform(i));
|
|
3462
|
-
}
|
|
3463
|
-
api(r, t, n) {
|
|
3464
|
-
return t.dynamic ? this._reader.dynamic(r, n) : this._reader.static(t.patterns, n);
|
|
3465
|
-
}
|
|
3466
|
-
}
|
|
3467
|
-
return Ue.default = l, Ue;
|
|
3468
|
-
}
|
|
3469
|
-
var ft = {}, Sn;
|
|
3470
|
-
function Ns() {
|
|
3471
|
-
if (Sn) return ft;
|
|
3472
|
-
Sn = 1, Object.defineProperty(ft, "__esModule", { value: !0 });
|
|
3473
|
-
const o = dt, a = Ln(), l = tr();
|
|
3474
|
-
class u extends l.default {
|
|
3475
|
-
constructor() {
|
|
3476
|
-
super(...arguments), this._reader = new a.default(this._settings);
|
|
3477
|
-
}
|
|
3478
|
-
read(t) {
|
|
3479
|
-
const n = this._getRootDirectory(t), e = this._getReaderOptions(t), i = this.api(n, t, e), s = new o.Readable({ objectMode: !0, read: () => {
|
|
3480
|
-
} });
|
|
3481
|
-
return i.once("error", (p) => s.emit("error", p)).on("data", (p) => s.emit("data", e.transform(p))).once("end", () => s.emit("end")), s.once("close", () => i.destroy()), s;
|
|
3482
|
-
}
|
|
3483
|
-
api(t, n, e) {
|
|
3484
|
-
return n.dynamic ? this._reader.dynamic(t, e) : this._reader.static(n.patterns, e);
|
|
3485
|
-
}
|
|
3486
|
-
}
|
|
3487
|
-
return ft.default = u, ft;
|
|
3488
|
-
}
|
|
3489
|
-
var ht = {}, pt = {}, mn;
|
|
3490
|
-
function qs() {
|
|
3491
|
-
if (mn) return pt;
|
|
3492
|
-
mn = 1, Object.defineProperty(pt, "__esModule", { value: !0 });
|
|
3493
|
-
const o = Le(), a = Jt(), l = er();
|
|
3494
|
-
class u extends l.default {
|
|
3495
|
-
constructor() {
|
|
3496
|
-
super(...arguments), this._walkSync = a.walkSync, this._statSync = o.statSync;
|
|
3497
|
-
}
|
|
3498
|
-
dynamic(t, n) {
|
|
3499
|
-
return this._walkSync(t, n);
|
|
3500
|
-
}
|
|
3501
|
-
static(t, n) {
|
|
3502
|
-
const e = [];
|
|
3503
|
-
for (const i of t) {
|
|
3504
|
-
const s = this._getFullEntryPath(i), p = this._getEntry(s, i, n);
|
|
3505
|
-
p === null || !n.entryFilter(p) || e.push(p);
|
|
3506
|
-
}
|
|
3507
|
-
return e;
|
|
3508
|
-
}
|
|
3509
|
-
_getEntry(t, n, e) {
|
|
3510
|
-
try {
|
|
3511
|
-
const i = this._getStat(t);
|
|
3512
|
-
return this._makeEntry(i, n);
|
|
3513
|
-
} catch (i) {
|
|
3514
|
-
if (e.errorFilter(i))
|
|
3515
|
-
return null;
|
|
3516
|
-
throw i;
|
|
3517
|
-
}
|
|
3518
|
-
}
|
|
3519
|
-
_getStat(t) {
|
|
3520
|
-
return this._statSync(t, this._fsStatSettings);
|
|
3521
|
-
}
|
|
3522
|
-
}
|
|
3523
|
-
return pt.default = u, pt;
|
|
3524
|
-
}
|
|
3525
|
-
var vn;
|
|
3526
|
-
function Fs() {
|
|
3527
|
-
if (vn) return ht;
|
|
3528
|
-
vn = 1, Object.defineProperty(ht, "__esModule", { value: !0 });
|
|
3529
|
-
const o = qs(), a = tr();
|
|
3530
|
-
class l extends a.default {
|
|
3531
|
-
constructor() {
|
|
3532
|
-
super(...arguments), this._reader = new o.default(this._settings);
|
|
3533
|
-
}
|
|
3534
|
-
read(r) {
|
|
3535
|
-
const t = this._getRootDirectory(r), n = this._getReaderOptions(r);
|
|
3536
|
-
return this.api(t, r, n).map(n.transform);
|
|
3537
|
-
}
|
|
3538
|
-
api(r, t, n) {
|
|
3539
|
-
return t.dynamic ? this._reader.dynamic(r, n) : this._reader.static(t.patterns, n);
|
|
3540
|
-
}
|
|
3541
|
-
}
|
|
3542
|
-
return ht.default = l, ht;
|
|
3543
|
-
}
|
|
3544
|
-
var Wt = {}, Rn;
|
|
3545
|
-
function Bs() {
|
|
3546
|
-
return Rn || (Rn = 1, (function(o) {
|
|
3547
|
-
Object.defineProperty(o, "__esModule", { value: !0 }), o.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
3548
|
-
const a = Qt, u = Math.max(Kt.cpus().length, 1);
|
|
3549
|
-
o.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
3550
|
-
lstat: a.lstat,
|
|
3551
|
-
lstatSync: a.lstatSync,
|
|
3552
|
-
stat: a.stat,
|
|
3553
|
-
statSync: a.statSync,
|
|
3554
|
-
readdir: a.readdir,
|
|
3555
|
-
readdirSync: a.readdirSync
|
|
3556
|
-
};
|
|
3557
|
-
class r {
|
|
3558
|
-
constructor(n = {}) {
|
|
3559
|
-
this._options = n, this.absolute = this._getValue(this._options.absolute, !1), this.baseNameMatch = this._getValue(this._options.baseNameMatch, !1), this.braceExpansion = this._getValue(this._options.braceExpansion, !0), this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, !0), this.concurrency = this._getValue(this._options.concurrency, u), this.cwd = this._getValue(this._options.cwd, process.cwd()), this.deep = this._getValue(this._options.deep, 1 / 0), this.dot = this._getValue(this._options.dot, !1), this.extglob = this._getValue(this._options.extglob, !0), this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !0), this.fs = this._getFileSystemMethods(this._options.fs), this.globstar = this._getValue(this._options.globstar, !0), this.ignore = this._getValue(this._options.ignore, []), this.markDirectories = this._getValue(this._options.markDirectories, !1), this.objectMode = this._getValue(this._options.objectMode, !1), this.onlyDirectories = this._getValue(this._options.onlyDirectories, !1), this.onlyFiles = this._getValue(this._options.onlyFiles, !0), this.stats = this._getValue(this._options.stats, !1), this.suppressErrors = this._getValue(this._options.suppressErrors, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !1), this.unique = this._getValue(this._options.unique, !0), this.onlyDirectories && (this.onlyFiles = !1), this.stats && (this.objectMode = !0), this.ignore = [].concat(this.ignore);
|
|
3560
|
-
}
|
|
3561
|
-
_getValue(n, e) {
|
|
3562
|
-
return n === void 0 ? e : n;
|
|
3563
|
-
}
|
|
3564
|
-
_getFileSystemMethods(n = {}) {
|
|
3565
|
-
return Object.assign(Object.assign({}, o.DEFAULT_FILE_SYSTEM_ADAPTER), n);
|
|
3566
|
-
}
|
|
3567
|
-
}
|
|
3568
|
-
o.default = r;
|
|
3569
|
-
})(Wt)), Wt;
|
|
3570
|
-
}
|
|
3571
|
-
var Vt, En;
|
|
3572
|
-
function js() {
|
|
3573
|
-
if (En) return Vt;
|
|
3574
|
-
En = 1;
|
|
3575
|
-
const o = fs(), a = Is(), l = Ns(), u = Fs(), r = Bs(), t = Te();
|
|
3576
|
-
async function n(s, p) {
|
|
3577
|
-
i(s);
|
|
3578
|
-
const h = e(s, a.default, p), d = await Promise.all(h);
|
|
3579
|
-
return t.array.flatten(d);
|
|
3580
|
-
}
|
|
3581
|
-
(function(s) {
|
|
3582
|
-
s.glob = s, s.globSync = p, s.globStream = h, s.async = s;
|
|
3583
|
-
function p(m, S) {
|
|
3584
|
-
i(m);
|
|
3585
|
-
const _ = e(m, u.default, S);
|
|
3586
|
-
return t.array.flatten(_);
|
|
3587
|
-
}
|
|
3588
|
-
s.sync = p;
|
|
3589
|
-
function h(m, S) {
|
|
3590
|
-
i(m);
|
|
3591
|
-
const _ = e(m, l.default, S);
|
|
3592
|
-
return t.stream.merge(_);
|
|
3593
|
-
}
|
|
3594
|
-
s.stream = h;
|
|
3595
|
-
function d(m, S) {
|
|
3596
|
-
i(m);
|
|
3597
|
-
const _ = [].concat(m), c = new r.default(S);
|
|
3598
|
-
return o.generate(_, c);
|
|
3599
|
-
}
|
|
3600
|
-
s.generateTasks = d;
|
|
3601
|
-
function y(m, S) {
|
|
3602
|
-
i(m);
|
|
3603
|
-
const _ = new r.default(S);
|
|
3604
|
-
return t.pattern.isDynamicPattern(m, _);
|
|
3605
|
-
}
|
|
3606
|
-
s.isDynamicPattern = y;
|
|
3607
|
-
function T(m) {
|
|
3608
|
-
return i(m), t.path.escape(m);
|
|
3609
|
-
}
|
|
3610
|
-
s.escapePath = T;
|
|
3611
|
-
function C(m) {
|
|
3612
|
-
return i(m), t.path.convertPathToPattern(m);
|
|
3613
|
-
}
|
|
3614
|
-
s.convertPathToPattern = C, (function(m) {
|
|
3615
|
-
function S(c) {
|
|
3616
|
-
return i(c), t.path.escapePosixPath(c);
|
|
3617
|
-
}
|
|
3618
|
-
m.escapePath = S;
|
|
3619
|
-
function _(c) {
|
|
3620
|
-
return i(c), t.path.convertPosixPathToPattern(c);
|
|
3621
|
-
}
|
|
3622
|
-
m.convertPathToPattern = _;
|
|
3623
|
-
})(s.posix || (s.posix = {})), (function(m) {
|
|
3624
|
-
function S(c) {
|
|
3625
|
-
return i(c), t.path.escapeWindowsPath(c);
|
|
3626
|
-
}
|
|
3627
|
-
m.escapePath = S;
|
|
3628
|
-
function _(c) {
|
|
3629
|
-
return i(c), t.path.convertWindowsPathToPattern(c);
|
|
3630
|
-
}
|
|
3631
|
-
m.convertPathToPattern = _;
|
|
3632
|
-
})(s.win32 || (s.win32 = {}));
|
|
3633
|
-
})(n || (n = {}));
|
|
3634
|
-
function e(s, p, h) {
|
|
3635
|
-
const d = [].concat(s), y = new r.default(h), T = o.generate(d, y), C = new p(y);
|
|
3636
|
-
return T.map(C.read, C);
|
|
3637
|
-
}
|
|
3638
|
-
function i(s) {
|
|
3639
|
-
if (![].concat(s).every((d) => t.string.isString(d) && !t.string.isEmpty(d)))
|
|
3640
|
-
throw new TypeError("Patterns must be a string (non empty) or an array of strings");
|
|
3641
|
-
}
|
|
3642
|
-
return Vt = n, Vt;
|
|
3643
|
-
}
|
|
3644
|
-
var Gs = js();
|
|
3645
|
-
const Us = /* @__PURE__ */ Dn(Gs), Ws = [".md", ".mdc", ".js", ".ts", ".tsx", ".go", ".sh", ".puml", "."], Vs = (o, a = {}) => {
|
|
3646
|
-
const { extensions: l = Ws, exclude: u = [], ignoreDefaultExcludes: r = !1 } = a, n = (Array.isArray(u) ? u : [u]).map((y) => /[*{}!]/.test(y) ? y : `**/*${y}`);
|
|
3647
|
-
r || n.push("**/node_modules/**");
|
|
3648
|
-
const i = (Array.isArray(o) ? o : [o]).map((y) => {
|
|
3649
|
-
try {
|
|
3650
|
-
if (yt.existsSync(y) && yt.statSync(y).isDirectory())
|
|
3651
|
-
return St.join(y, "**/*");
|
|
3652
|
-
} catch (T) {
|
|
3653
|
-
xe.debug(`[catGen] [paths → glob] Treating as glob: ${y}`, { cause: T });
|
|
3654
|
-
}
|
|
3655
|
-
return y;
|
|
3656
|
-
}), s = {
|
|
3657
|
-
ignore: n,
|
|
3658
|
-
onlyFiles: !0,
|
|
3659
|
-
absolute: !0,
|
|
3660
|
-
dot: r,
|
|
3661
|
-
suppressErrors: !0
|
|
3662
|
-
};
|
|
3663
|
-
let p = Us.sync(i, s);
|
|
3664
|
-
const h = new Set(Array.isArray(l) ? l : [l]);
|
|
3665
|
-
return h.has("*") || (p = p.filter((y) => h.has(St.extname(y).toLowerCase()))), p.map((y) => {
|
|
3666
|
-
try {
|
|
3667
|
-
const T = yt.readFileSync(y, "utf8"), C = St.relative(process.cwd(), y);
|
|
3668
|
-
return { absPath: y, relativePath: C, contents: T };
|
|
3669
|
-
} catch (T) {
|
|
3670
|
-
return xe.warn(`[catGen] [reading → skip] ${y}`, { cause: T }), null;
|
|
3671
|
-
}
|
|
3672
|
-
}).filter((y) => y !== null);
|
|
3673
|
-
};
|
|
3674
|
-
async function Ks(o, a = {}) {
|
|
3675
|
-
const l = In(o);
|
|
3676
|
-
if (!l)
|
|
3677
|
-
return {
|
|
3678
|
-
ok: !1,
|
|
3679
|
-
error: `Не удалось распознать URL: ${o}. Ожидается GitLab MR или GitHub PR.`
|
|
3680
|
-
};
|
|
3681
|
-
let u, r;
|
|
3682
|
-
if (l.provider === "gitlab") {
|
|
3683
|
-
if (u = process.env.GITLAB_PERSONAL_TOKEN ?? "", !u) return { ok: !1, error: "GITLAB_PERSONAL_TOKEN не установлен." };
|
|
3684
|
-
r = `https://${l.host}${process.env.GITLAB_API_PATH ?? "/api/v4"}`;
|
|
3685
|
-
} else {
|
|
3686
|
-
if (u = process.env.GITHUB_PERSONAL_TOKEN ?? process.env.GITHUB_TOKEN ?? "", !u)
|
|
3687
|
-
return { ok: !1, error: "GITHUB_PERSONAL_TOKEN или GITHUB_TOKEN не установлен." };
|
|
3688
|
-
r = l.host === "github.com" ? "https://api.github.com" : `https://${l.host}/api/v3`;
|
|
3689
|
-
}
|
|
3690
|
-
xe.info(
|
|
3691
|
-
`[cat --url] provider=${l.provider} repo=${l.repository} iid=${l.iid}`
|
|
3692
|
-
);
|
|
3693
|
-
const t = l.provider === "gitlab" ? new Nn({ baseUrl: r, token: u }) : new qn({ baseUrl: r, token: u });
|
|
3694
|
-
let n;
|
|
3695
|
-
try {
|
|
3696
|
-
n = await t.MergeRequests.getChanges({
|
|
3697
|
-
repository: l.repository,
|
|
3698
|
-
iid: l.iid
|
|
3699
|
-
});
|
|
3700
|
-
} catch (h) {
|
|
3701
|
-
return {
|
|
3702
|
-
ok: !1,
|
|
3703
|
-
error: `Ошибка получения изменений: ${h instanceof Error ? h.message : String(h)}`
|
|
3704
|
-
};
|
|
3705
|
-
}
|
|
3706
|
-
if (n.length === 0)
|
|
3707
|
-
return { ok: !1, error: "MR/PR не содержит изменённых файлов." };
|
|
3708
|
-
let e = n.filter((h) => h.status !== "deleted");
|
|
3709
|
-
if (a.exclude) {
|
|
3710
|
-
const h = Array.isArray(a.exclude) ? a.exclude : [a.exclude];
|
|
3711
|
-
e = e.filter((d) => !h.some((y) => d.path.includes(y.replace(/\*/g, ""))));
|
|
3712
|
-
}
|
|
3713
|
-
if (a.extensions && a.extensions.length > 0) {
|
|
3714
|
-
const h = new Set(a.extensions.map((d) => d.toLowerCase()));
|
|
3715
|
-
e = e.filter((d) => {
|
|
3716
|
-
const y = d.path.includes(".") ? "." + (d.path.split(".").pop() ?? "").toLowerCase() : ".";
|
|
3717
|
-
return h.has(y);
|
|
3718
|
-
});
|
|
3719
|
-
}
|
|
3720
|
-
if (e.length === 0)
|
|
3721
|
-
return { ok: !1, error: "После фильтрации не осталось файлов для вывода." };
|
|
3722
|
-
const i = e.length > 0 ? e[0].ref : "N/A";
|
|
3723
|
-
xe.info(`[cat --url] total=${n.length} filtered=${e.length} ref=${i}`);
|
|
3724
|
-
const s = [];
|
|
3725
|
-
let p = 0;
|
|
3726
|
-
for (const h of e) {
|
|
3727
|
-
let d;
|
|
3728
|
-
try {
|
|
3729
|
-
if (d = await t.RepositoryFiles?.getFileContent({
|
|
3730
|
-
repository: l.repository,
|
|
3731
|
-
path: h.path,
|
|
3732
|
-
ref: h.ref
|
|
3733
|
-
}), !d) {
|
|
3734
|
-
p++, xe.warn(`[cat --url] skip ${h.path}: 404 (ref=${h.ref}, repo=${l.repository})`);
|
|
3735
|
-
continue;
|
|
3736
|
-
}
|
|
3737
|
-
if (d.encoding === "base64") {
|
|
3738
|
-
p++, xe.warn(`[cat --url] skip ${h.path}: binary`);
|
|
3739
|
-
continue;
|
|
3740
|
-
}
|
|
3741
|
-
} catch (y) {
|
|
3742
|
-
p++, xe.warn(`[cat --url] skip ${h.path}: error: ${y.message}`);
|
|
3743
|
-
continue;
|
|
3744
|
-
}
|
|
3745
|
-
s.push({
|
|
3746
|
-
absPath: `vcs://${l.host}/${l.repository}/${h.path}?ref=${h.ref}`,
|
|
3747
|
-
relativePath: h.path,
|
|
3748
|
-
contents: d.content
|
|
3749
|
-
});
|
|
3750
|
-
}
|
|
3751
|
-
return p > 0 && xe.info(`[cat --url] skipped ${p} files`), { ok: !0, files: s };
|
|
3752
|
-
}
|
|
3753
|
-
const Ce = Bn(process.argv, {
|
|
3754
|
-
plain: ["plain"],
|
|
3755
|
-
exclude: ["exclude", "e"],
|
|
3756
|
-
extensions: ["ext"],
|
|
3757
|
-
output: ["o"],
|
|
3758
|
-
url: ["url"]
|
|
3759
|
-
}), An = (o) => {
|
|
3760
|
-
console.log(ne.blue("## CODEBASE:")), o.forEach(({ relativePath: a, contents: l }) => {
|
|
3761
|
-
console.log(ne.blue(`### SOURCE: ${a}`)), console.log(ne.gray("```" + (a.split(".").pop() ?? ""))), console.log(l), console.log(ne.gray("```")), console.log("");
|
|
3762
|
-
});
|
|
3763
|
-
}, bn = (o) => {
|
|
3764
|
-
console.log(ne.blue("<Codebase>")), o.forEach(({ relativePath: a, contents: l }) => {
|
|
3765
|
-
const u = [
|
|
3766
|
-
`${ne.yellow("type")}=${ne.green('"file"')}`,
|
|
3767
|
-
`${ne.yellow("path")}=${ne.green(`"${a}"`)}`
|
|
3768
|
-
].join(" ");
|
|
3769
|
-
console.log(` ${ne.blue("<Source")} ${u}${ne.blue(">")}`), console.log(l), console.log(` ${ne.blue("</Source>")}`);
|
|
3770
|
-
}), console.log(ne.blue("</Codebase>")), console.log("");
|
|
3771
|
-
}, $e = Ce.url, rr = Ce._.filter((o) => !(o === "cat" || o.endsWith(".ts") || o.endsWith(".js") || o.endsWith(".mjs") || o.startsWith("/") || o.startsWith("./") || o.startsWith("../")));
|
|
3772
|
-
rr.length === 0 && !$e && (console.error(
|
|
3773
|
-
ne.yellow(
|
|
3774
|
-
"Usage: npx gennady cat <path/to/glob> [--plain] [--exclude=<glob>] [--ext=<exts>] [--output=<xml|md>] [--url=<MR/PR URL>]"
|
|
3775
|
-
)
|
|
3776
|
-
), console.error(ne.yellow(" npx gennady cat --help (see all options)")), process.exit(1));
|
|
3777
|
-
$e && rr.length > 0 && (console.error(ne.red("Error: --url and positional arguments are mutually exclusive.")), process.exit(1));
|
|
3778
|
-
if ($e) {
|
|
3779
|
-
const o = Ce.extensions, a = o ? Array.isArray(o) ? o : o.split(",").map((u) => u.trim()) : void 0, l = await Ks($e, {
|
|
3780
|
-
exclude: Ce.exclude,
|
|
3781
|
-
extensions: a
|
|
3782
|
-
});
|
|
3783
|
-
l.ok || (console.error(ne.red(l.error)), process.exit(1)), Ce.output === "md" ? An(l.files) : bn(l.files);
|
|
3784
|
-
} else {
|
|
3785
|
-
const o = Vs(rr, Ce);
|
|
3786
|
-
Ce.output === "md" ? An(o) : bn(o);
|
|
3787
|
-
}
|
|
3788
|
-
if (!Ce.plain) {
|
|
3789
|
-
console.log(ne.green("^".repeat(40)));
|
|
3790
|
-
const o = $e ? `npx gennady cat --url="${$e}" --plain | pbcopy` : `npx gennady cat ${process.argv.slice(3).join(" ")} --plain | pbcopy`;
|
|
3791
|
-
console.log(ne.italic.gray(`Hint: ${o}`));
|
|
3792
|
-
}
|
|
3793
|
-
console.log("");
|