@opendesign-plus-test/plugins 0.0.1-rc.25 → 0.0.1-rc.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -8
- package/dist/nuxt/sitemap/index.js +181 -178
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as B, o as K, v as O } from "./plugin-lvjNLBe-.js";
|
|
2
|
-
const
|
|
2
|
+
const g = {}, L = `
|
|
3
3
|
(function () {
|
|
4
4
|
function getCookie(key) {
|
|
5
5
|
const name = encodeURIComponent(key) + '=';
|
|
@@ -36,7 +36,7 @@ function R(e) {
|
|
|
36
36
|
classLightValue: w = t,
|
|
37
37
|
classDarkValue: p = r,
|
|
38
38
|
filename: l = "check-theme.js"
|
|
39
|
-
} = e,
|
|
39
|
+
} = e, f = L.replace(/\$COOKIE_KEY/g, n).replace(/\$LIGHT_VALUE/g, t).replace(/\$DARK_VALUE/g, r).replace(/\$CLASS_LIGHT_VALUE/g, w).replace(/\$CLASS_DARK_VALUE/g, p).replace(/\$ATTRIBUTE_NAME/g, a).replace(/\$ATTRIBUTE_LIGHT_VALUE/g, s).replace(/\$ATTRIBUTE_DARK_VALUE/g, c);
|
|
40
40
|
let d = "", h = !1, u = "", m = !1;
|
|
41
41
|
return {
|
|
42
42
|
name: "vite-check-theme-plugin",
|
|
@@ -56,11 +56,11 @@ function R(e) {
|
|
|
56
56
|
]);
|
|
57
57
|
},
|
|
58
58
|
generateBundle() {
|
|
59
|
-
h ||
|
|
59
|
+
h || g.existsSync(g.join(u, l)) || (g.existsSync(u) || g.mkdirSync(u, { recursive: !0 }), g.writeFileSync(g.join(u, l), f, "utf-8"));
|
|
60
60
|
},
|
|
61
61
|
configureServer(o) {
|
|
62
62
|
o.middlewares.use(`${d}${l}`, (k, x) => {
|
|
63
|
-
x.setHeader("Content-Type", "application/javascript"), x.end(
|
|
63
|
+
x.setHeader("Content-Type", "application/javascript"), x.end(f);
|
|
64
64
|
});
|
|
65
65
|
},
|
|
66
66
|
transformIndexHtml(o) {
|
|
@@ -127,10 +127,10 @@ function C(e, n, t) {
|
|
|
127
127
|
`, document.body.appendChild(i));
|
|
128
128
|
const s = i.querySelector(".elg-title"), c = i.querySelector(".elg-message"), w = i.querySelector(".elg-url"), p = i.querySelector(".elg-cancel"), l = i.querySelector(".elg-confirm");
|
|
129
129
|
s.textContent = r.title, c.textContent = r.message(t), w.textContent = n, i.style.display = "flex";
|
|
130
|
-
const
|
|
130
|
+
const f = (m) => {
|
|
131
131
|
i && (i.style.display = "none", i.removeEventListener("click", u), p.removeEventListener("click", d), l.removeEventListener("click", h), v = !1, a(m));
|
|
132
|
-
}, d = () =>
|
|
133
|
-
m.target === i &&
|
|
132
|
+
}, d = () => f(!1), h = () => f(!0), u = (m) => {
|
|
133
|
+
m.target === i && f(!1);
|
|
134
134
|
};
|
|
135
135
|
i.addEventListener("click", u), p.addEventListener("click", d), l.addEventListener("click", h);
|
|
136
136
|
});
|
|
@@ -300,7 +300,7 @@ function S(e) {
|
|
|
300
300
|
function I(e = {}) {
|
|
301
301
|
return {
|
|
302
302
|
install() {
|
|
303
|
-
typeof window > "u" || (U(e), S(e));
|
|
303
|
+
typeof window > "u" || typeof document > "u" || (U(e), S(e));
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
306
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Kt = Object.defineProperty;
|
|
2
2
|
var bt = (n) => {
|
|
3
3
|
throw TypeError(n);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var O = (n, t, e) =>
|
|
7
|
-
var o = (n, t, e) => (ht(n, t, "read from private field"), e ? e.call(n) : t.get(n)),
|
|
5
|
+
var Qt = (n, t, e) => t in n ? Kt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
6
|
+
var O = (n, t, e) => Qt(n, typeof t != "symbol" ? t + "" : t, e), ht = (n, t, e) => t.has(n) || bt("Cannot " + e);
|
|
7
|
+
var o = (n, t, e) => (ht(n, t, "read from private field"), e ? e.call(n) : t.get(n)), T = (n, t, e) => t.has(n) ? bt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), E = (n, t, e, s) => (ht(n, t, "write to private field"), s ? s.call(n, e) : t.set(n, e), e), P = (n, t, e) => (ht(n, t, "access private method"), e);
|
|
8
8
|
var ft = (n, t, e, s) => ({
|
|
9
9
|
set _(i) {
|
|
10
10
|
E(n, t, i, e);
|
|
@@ -13,14 +13,14 @@ var ft = (n, t, e, s) => ({
|
|
|
13
13
|
return o(n, t, s);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { defineNuxtModule as
|
|
17
|
-
import { writeFileSync as
|
|
18
|
-
import
|
|
19
|
-
import { pipeline as
|
|
20
|
-
import { exec as
|
|
21
|
-
import { promisify as
|
|
22
|
-
const
|
|
23
|
-
const s = n instanceof RegExp ?
|
|
16
|
+
import { defineNuxtModule as Yt, addVitePlugin as te } from "nuxt/kit";
|
|
17
|
+
import { writeFileSync as Wt, existsSync as Et, readFileSync as ee, createWriteStream as se, readdirSync as ne } from "node:fs";
|
|
18
|
+
import ie, { resolve as re, join as Y, relative as oe } from "node:path";
|
|
19
|
+
import { pipeline as ae } from "node:stream/promises";
|
|
20
|
+
import { exec as le } from "node:child_process";
|
|
21
|
+
import { promisify as ce } from "node:util";
|
|
22
|
+
const Rt = (n, t, e) => {
|
|
23
|
+
const s = n instanceof RegExp ? Mt(n, e) : n, i = t instanceof RegExp ? Mt(t, e) : t, r = s !== null && i != null && he(s, i, e);
|
|
24
24
|
return r && {
|
|
25
25
|
start: r[0],
|
|
26
26
|
end: r[1],
|
|
@@ -28,10 +28,10 @@ const Wt = (n, t, e) => {
|
|
|
28
28
|
body: e.slice(r[0] + s.length, r[1]),
|
|
29
29
|
post: e.slice(r[1] + i.length)
|
|
30
30
|
};
|
|
31
|
-
},
|
|
31
|
+
}, Mt = (n, t) => {
|
|
32
32
|
const e = t.match(n);
|
|
33
33
|
return e ? e[0] : null;
|
|
34
|
-
},
|
|
34
|
+
}, he = (n, t, e) => {
|
|
35
35
|
let s, i, r, a, h, p = e.indexOf(n), c = e.indexOf(t, p + 1), f = p;
|
|
36
36
|
if (p >= 0 && c > 0) {
|
|
37
37
|
if (n === t)
|
|
@@ -49,47 +49,47 @@ const Wt = (n, t, e) => {
|
|
|
49
49
|
s.length && a !== void 0 && (h = [r, a]);
|
|
50
50
|
}
|
|
51
51
|
return h;
|
|
52
|
-
},
|
|
52
|
+
}, Ct = "\0SLASH" + Math.random() + "\0", Dt = "\0OPEN" + Math.random() + "\0", wt = "\0CLOSE" + Math.random() + "\0", kt = "\0COMMA" + Math.random() + "\0", Lt = "\0PERIOD" + Math.random() + "\0", fe = new RegExp(Ct, "g"), ue = new RegExp(Dt, "g"), pe = new RegExp(wt, "g"), ge = new RegExp(kt, "g"), de = new RegExp(Lt, "g"), me = /\\\\/g, ye = /\\{/g, we = /\\}/g, xe = /\\,/g, Se = /\\\./g, be = 1e5;
|
|
53
53
|
function ut(n) {
|
|
54
54
|
return isNaN(n) ? n.charCodeAt(0) : parseInt(n, 10);
|
|
55
55
|
}
|
|
56
|
-
function be(n) {
|
|
57
|
-
return n.replace(de, Rt).replace(me, Ct).replace(ye, wt).replace(we, Dt).replace(xe, kt);
|
|
58
|
-
}
|
|
59
56
|
function Ee(n) {
|
|
60
|
-
return n.replace(
|
|
57
|
+
return n.replace(me, Ct).replace(ye, Dt).replace(we, wt).replace(xe, kt).replace(Se, Lt);
|
|
58
|
+
}
|
|
59
|
+
function Me(n) {
|
|
60
|
+
return n.replace(fe, "\\").replace(ue, "{").replace(pe, "}").replace(ge, ",").replace(de, ".");
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function qt(n) {
|
|
63
63
|
if (!n)
|
|
64
64
|
return [""];
|
|
65
|
-
const t = [], e =
|
|
65
|
+
const t = [], e = Rt("{", "}", n);
|
|
66
66
|
if (!e)
|
|
67
67
|
return n.split(",");
|
|
68
68
|
const { pre: s, body: i, post: r } = e, a = s.split(",");
|
|
69
69
|
a[a.length - 1] += "{" + i + "}";
|
|
70
|
-
const h =
|
|
70
|
+
const h = qt(r);
|
|
71
71
|
return r.length && (a[a.length - 1] += h.shift(), a.push.apply(a, h)), t.push.apply(t, a), t;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function $e(n, t = {}) {
|
|
74
74
|
if (!n)
|
|
75
75
|
return [];
|
|
76
|
-
const { max: e =
|
|
77
|
-
return n.slice(0, 2) === "{}" && (n = "\\{\\}" + n.slice(2)), et(
|
|
76
|
+
const { max: e = be } = t;
|
|
77
|
+
return n.slice(0, 2) === "{}" && (n = "\\{\\}" + n.slice(2)), et(Ee(n), e, !0).map(Me);
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function Pe(n) {
|
|
80
80
|
return "{" + n + "}";
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Ae(n) {
|
|
83
83
|
return /^-?0\d/.test(n);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Ne(n, t) {
|
|
86
86
|
return n <= t;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Oe(n, t) {
|
|
89
89
|
return n >= t;
|
|
90
90
|
}
|
|
91
91
|
function et(n, t, e) {
|
|
92
|
-
const s = [], i =
|
|
92
|
+
const s = [], i = Rt("{", "}", n);
|
|
93
93
|
if (!i)
|
|
94
94
|
return [n];
|
|
95
95
|
const r = i.pre, a = i.post.length ? et(i.post, t, !1) : [""];
|
|
@@ -105,14 +105,14 @@ function et(n, t, e) {
|
|
|
105
105
|
let l;
|
|
106
106
|
if (c)
|
|
107
107
|
l = i.body.split(/\.\./);
|
|
108
|
-
else if (l =
|
|
108
|
+
else if (l = qt(i.body), l.length === 1 && l[0] !== void 0 && (l = et(l[0], t, !1).map(Pe), l.length === 1))
|
|
109
109
|
return a.map((m) => i.pre + l[0] + m);
|
|
110
110
|
let u;
|
|
111
111
|
if (c && l[0] !== void 0 && l[1] !== void 0) {
|
|
112
112
|
const m = ut(l[0]), y = ut(l[1]), S = Math.max(l[0].length, l[1].length);
|
|
113
|
-
let g = l.length === 3 && l[2] !== void 0 ? Math.max(Math.abs(ut(l[2])), 1) : 1, x =
|
|
114
|
-
y < m && (g *= -1, x =
|
|
115
|
-
const d = l.some(
|
|
113
|
+
let g = l.length === 3 && l[2] !== void 0 ? Math.max(Math.abs(ut(l[2])), 1) : 1, x = Ne;
|
|
114
|
+
y < m && (g *= -1, x = Oe);
|
|
115
|
+
const d = l.some(Ae);
|
|
116
116
|
u = [];
|
|
117
117
|
for (let $ = m; x($, y); $ += g) {
|
|
118
118
|
let b;
|
|
@@ -140,12 +140,12 @@ function et(n, t, e) {
|
|
|
140
140
|
}
|
|
141
141
|
return s;
|
|
142
142
|
}
|
|
143
|
-
const
|
|
143
|
+
const ve = 1024 * 64, at = (n) => {
|
|
144
144
|
if (typeof n != "string")
|
|
145
145
|
throw new TypeError("invalid pattern");
|
|
146
|
-
if (n.length >
|
|
146
|
+
if (n.length > ve)
|
|
147
147
|
throw new TypeError("pattern is too long");
|
|
148
|
-
},
|
|
148
|
+
}, Te = {
|
|
149
149
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
|
|
150
150
|
"[:alpha:]": ["\\p{L}\\p{Nl}", !0],
|
|
151
151
|
"[:ascii:]": ["\\x00-\\x7f", !1],
|
|
@@ -160,7 +160,7 @@ const Oe = 1024 * 64, at = (n) => {
|
|
|
160
160
|
"[:upper:]": ["\\p{Lu}", !0],
|
|
161
161
|
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
|
|
162
162
|
"[:xdigit:]": ["A-Fa-f0-9", !1]
|
|
163
|
-
}, tt = (n) => n.replace(/[[\]\\-]/g, "\\$&"), je = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"),
|
|
163
|
+
}, tt = (n) => n.replace(/[[\]\\-]/g, "\\$&"), je = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), $t = (n) => n.join(""), We = (n, t) => {
|
|
164
164
|
const e = t;
|
|
165
165
|
if (n.charAt(e) !== "[")
|
|
166
166
|
throw new Error("not in a brace expression");
|
|
@@ -181,7 +181,7 @@ const Oe = 1024 * 64, at = (n) => {
|
|
|
181
181
|
continue;
|
|
182
182
|
}
|
|
183
183
|
if (S === "[" && !p) {
|
|
184
|
-
for (const [g, [x, M, d]] of Object.entries(
|
|
184
|
+
for (const [g, [x, M, d]] of Object.entries(Te))
|
|
185
185
|
if (n.startsWith(g, r)) {
|
|
186
186
|
if (l)
|
|
187
187
|
return ["$.", !1, n.length - e, !0];
|
|
@@ -211,27 +211,27 @@ const Oe = 1024 * 64, at = (n) => {
|
|
|
211
211
|
const S = s[0].length === 2 ? s[0].slice(-1) : s[0];
|
|
212
212
|
return [je(S), !1, f - e, !1];
|
|
213
213
|
}
|
|
214
|
-
const u = "[" + (c ? "^" : "") +
|
|
214
|
+
const u = "[" + (c ? "^" : "") + $t(s) + "]", m = "[" + (c ? "" : "^") + $t(i) + "]";
|
|
215
215
|
return [s.length && i.length ? "(" + u + "|" + m + ")" : s.length ? u : m, h, f - e, !0];
|
|
216
216
|
}, st = (n, { windowsPathsNoEscape: t = !1, magicalBraces: e = !0 } = {}) => e ? t ? n.replace(/\[([^/\\])\]/g, "$1") : n.replace(/((?!\\).|^)\[([^/\\])\]/g, "$1$2").replace(/\\([^/])/g, "$1") : t ? n.replace(/\[([^/\\{}])\]/g, "$1") : n.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
|
|
217
217
|
var C;
|
|
218
|
-
const
|
|
218
|
+
const Re = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), pt = (n) => Re.has(n), Pt = (n) => pt(n.type), Ce = /* @__PURE__ */ new Map([
|
|
219
219
|
["!", ["@"]],
|
|
220
220
|
["?", ["?", "@"]],
|
|
221
221
|
["@", ["@"]],
|
|
222
222
|
["*", ["*", "+", "?", "@"]],
|
|
223
223
|
["+", ["+", "@"]]
|
|
224
|
-
]),
|
|
224
|
+
]), De = /* @__PURE__ */ new Map([
|
|
225
225
|
["!", ["?"]],
|
|
226
226
|
["@", ["?"]],
|
|
227
227
|
["+", ["?", "*"]]
|
|
228
|
-
]),
|
|
228
|
+
]), ke = /* @__PURE__ */ new Map([
|
|
229
229
|
["!", ["?", "@"]],
|
|
230
230
|
["?", ["?", "@"]],
|
|
231
231
|
["@", ["?", "@"]],
|
|
232
232
|
["*", ["*", "+", "?", "@"]],
|
|
233
233
|
["+", ["+", "@", "?", "*"]]
|
|
234
|
-
]),
|
|
234
|
+
]), At = /* @__PURE__ */ new Map([
|
|
235
235
|
["!", /* @__PURE__ */ new Map([["!", "@"]])],
|
|
236
236
|
[
|
|
237
237
|
"?",
|
|
@@ -257,28 +257,28 @@ const We = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]), pt = (n) => We.ha
|
|
|
257
257
|
["*", "*"]
|
|
258
258
|
])
|
|
259
259
|
]
|
|
260
|
-
]),
|
|
261
|
-
let
|
|
262
|
-
var v,
|
|
260
|
+
]), Le = "(?!(?:^|/)\\.\\.?(?:$|/))", nt = "(?!\\.)", qe = /* @__PURE__ */ new Set(["[", "."]), ze = /* @__PURE__ */ new Set(["..", "."]), _e = new Set("().*{}+?[]^$\\!"), Ge = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), xt = "[^/]", Nt = xt + "*?", Ot = xt + "+?";
|
|
261
|
+
let Fe = 0;
|
|
262
|
+
var v, j, F, w, N, B, Z, I, z, _, Q, A, zt, J, it, _t, gt, rt, Gt, dt, Ft, Bt, It, ot, mt, Ut;
|
|
263
263
|
class lt {
|
|
264
264
|
constructor(t, e, s = {}) {
|
|
265
|
-
|
|
265
|
+
T(this, A);
|
|
266
266
|
O(this, "type");
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
267
|
+
T(this, v);
|
|
268
|
+
T(this, j);
|
|
269
|
+
T(this, F, !1);
|
|
270
|
+
T(this, w, []);
|
|
271
|
+
T(this, N);
|
|
272
|
+
T(this, B);
|
|
273
|
+
T(this, Z);
|
|
274
|
+
T(this, I, !1);
|
|
275
|
+
T(this, z);
|
|
276
|
+
T(this, _);
|
|
277
277
|
// set to true if it's an extglob with no children
|
|
278
278
|
// (which really means one child of '')
|
|
279
|
-
|
|
280
|
-
O(this, "id", ++
|
|
281
|
-
this.type = t, t && E(this,
|
|
279
|
+
T(this, Q, !1);
|
|
280
|
+
O(this, "id", ++Fe);
|
|
281
|
+
this.type = t, t && E(this, j, !0), E(this, N, e), E(this, v, o(this, N) ? o(o(this, N), v) : this), E(this, z, o(this, v) === this ? s : o(o(this, v), z)), E(this, Z, o(this, v) === this ? [] : o(o(this, v), Z)), t === "!" && !o(o(this, v), I) && o(this, Z).push(this), E(this, B, o(this, N) ? o(o(this, N), w).length : 0);
|
|
282
282
|
}
|
|
283
283
|
get depth() {
|
|
284
284
|
var t;
|
|
@@ -298,12 +298,12 @@ class lt {
|
|
|
298
298
|
};
|
|
299
299
|
}
|
|
300
300
|
get hasMagic() {
|
|
301
|
-
if (o(this,
|
|
302
|
-
return o(this,
|
|
301
|
+
if (o(this, j) !== void 0)
|
|
302
|
+
return o(this, j);
|
|
303
303
|
for (const t of o(this, w))
|
|
304
304
|
if (typeof t != "string" && (t.type || t.hasMagic))
|
|
305
|
-
return E(this,
|
|
306
|
-
return o(this,
|
|
305
|
+
return E(this, j, !0);
|
|
306
|
+
return o(this, j);
|
|
307
307
|
}
|
|
308
308
|
// reconstructs the pattern
|
|
309
309
|
toString() {
|
|
@@ -369,7 +369,7 @@ class lt {
|
|
|
369
369
|
if (this !== o(this, v))
|
|
370
370
|
return o(this, v).toMMPattern();
|
|
371
371
|
const t = this.toString(), [e, s, i, r] = this.toRegExpSource();
|
|
372
|
-
if (!(i || o(this,
|
|
372
|
+
if (!(i || o(this, j) || o(this, z).nocase && !o(this, z).nocaseMagicOnly && t.toUpperCase() !== t.toLowerCase()))
|
|
373
373
|
return s;
|
|
374
374
|
const h = (o(this, z).nocase ? "i" : "") + (r ? "u" : "");
|
|
375
375
|
return Object.assign(new RegExp(`^${e}$`, h), {
|
|
@@ -452,27 +452,27 @@ class lt {
|
|
|
452
452
|
toRegExpSource(t) {
|
|
453
453
|
var p;
|
|
454
454
|
const e = t ?? !!o(this, z).dot;
|
|
455
|
-
if (o(this, v) === this && (P(this, A, ot).call(this), P(this, A,
|
|
455
|
+
if (o(this, v) === this && (P(this, A, ot).call(this), P(this, A, zt).call(this)), !Pt(this)) {
|
|
456
456
|
const c = this.isStart() && this.isEnd() && !o(this, w).some((y) => typeof y != "string"), f = o(this, w).map((y) => {
|
|
457
457
|
var d;
|
|
458
|
-
const [S, g, x, M] = typeof y == "string" ? P(d = C, J,
|
|
459
|
-
return E(this,
|
|
458
|
+
const [S, g, x, M] = typeof y == "string" ? P(d = C, J, Ut).call(d, y, o(this, j), c) : y.toRegExpSource(t);
|
|
459
|
+
return E(this, j, o(this, j) || x), E(this, F, o(this, F) || M), S;
|
|
460
460
|
}).join("");
|
|
461
461
|
let l = "";
|
|
462
|
-
if (this.isStart() && typeof o(this, w)[0] == "string" && !(o(this, w).length === 1 &&
|
|
463
|
-
const S =
|
|
462
|
+
if (this.isStart() && typeof o(this, w)[0] == "string" && !(o(this, w).length === 1 && ze.has(o(this, w)[0]))) {
|
|
463
|
+
const S = qe, g = (
|
|
464
464
|
// dots are allowed, and the pattern starts with [ or .
|
|
465
465
|
e && S.has(f.charAt(0)) || // the pattern starts with \., and then [ or .
|
|
466
466
|
f.startsWith("\\.") && S.has(f.charAt(2)) || // the pattern starts with \.\., and then [ or .
|
|
467
467
|
f.startsWith("\\.\\.") && S.has(f.charAt(4))
|
|
468
468
|
), x = !e && !t && S.has(f.charAt(0));
|
|
469
|
-
l = g ?
|
|
469
|
+
l = g ? Le : x ? nt : "";
|
|
470
470
|
}
|
|
471
471
|
let u = "";
|
|
472
472
|
return this.isEnd() && o(o(this, v), I) && ((p = o(this, N)) == null ? void 0 : p.type) === "!" && (u = "(?:$|\\/)"), [
|
|
473
473
|
l + f + u,
|
|
474
474
|
st(f),
|
|
475
|
-
E(this,
|
|
475
|
+
E(this, j, !!o(this, j)),
|
|
476
476
|
o(this, F)
|
|
477
477
|
];
|
|
478
478
|
}
|
|
@@ -480,29 +480,29 @@ class lt {
|
|
|
480
480
|
let r = P(this, A, mt).call(this, e);
|
|
481
481
|
if (this.isStart() && this.isEnd() && !r && this.type !== "!") {
|
|
482
482
|
const c = this.toString(), f = this;
|
|
483
|
-
return E(f, w, [c]), f.type = null, E(f,
|
|
483
|
+
return E(f, w, [c]), f.type = null, E(f, j, void 0), [c, st(this.toString()), !1, !1];
|
|
484
484
|
}
|
|
485
485
|
let a = !s || t || e || !nt ? "" : P(this, A, mt).call(this, !0);
|
|
486
486
|
a === r && (a = ""), a && (r = `(?:${r})(?:${a})*?`);
|
|
487
487
|
let h = "";
|
|
488
|
-
if (this.type === "!" && o(this,
|
|
489
|
-
h = (this.isStart() && !e ? nt : "") +
|
|
488
|
+
if (this.type === "!" && o(this, Q))
|
|
489
|
+
h = (this.isStart() && !e ? nt : "") + Ot;
|
|
490
490
|
else {
|
|
491
491
|
const c = this.type === "!" ? (
|
|
492
492
|
// !() must match something,but !(x) can match ''
|
|
493
|
-
"))" + (this.isStart() && !e && !t ? nt : "") +
|
|
493
|
+
"))" + (this.isStart() && !e && !t ? nt : "") + Nt + ")"
|
|
494
494
|
) : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && a ? ")" : this.type === "*" && a ? ")?" : `)${this.type}`;
|
|
495
495
|
h = i + r + c;
|
|
496
496
|
}
|
|
497
497
|
return [
|
|
498
498
|
h,
|
|
499
499
|
st(r),
|
|
500
|
-
E(this,
|
|
500
|
+
E(this, j, !!o(this, j)),
|
|
501
501
|
o(this, F)
|
|
502
502
|
];
|
|
503
503
|
}
|
|
504
504
|
}
|
|
505
|
-
v = new WeakMap(),
|
|
505
|
+
v = new WeakMap(), j = new WeakMap(), F = new WeakMap(), w = new WeakMap(), N = new WeakMap(), B = new WeakMap(), Z = new WeakMap(), I = new WeakMap(), z = new WeakMap(), _ = new WeakMap(), Q = new WeakMap(), A = new WeakSet(), zt = function() {
|
|
506
506
|
if (this !== o(this, v))
|
|
507
507
|
throw new Error("should only call on root");
|
|
508
508
|
if (o(this, I))
|
|
@@ -582,21 +582,21 @@ v = new WeakMap(), T = new WeakMap(), F = new WeakMap(), w = new WeakMap(), N =
|
|
|
582
582
|
continue;
|
|
583
583
|
}
|
|
584
584
|
if (d === ")")
|
|
585
|
-
return y === "" && o(e, w).length === 0 && E(e,
|
|
585
|
+
return y === "" && o(e, w).length === 0 && E(e, Q, !0), u.push(y), y = "", e.push(...m, u), l;
|
|
586
586
|
y += d;
|
|
587
587
|
}
|
|
588
|
-
return e.type = null, E(e,
|
|
589
|
-
},
|
|
590
|
-
return P(this, A, gt).call(this, t,
|
|
591
|
-
}, gt = function(t, e =
|
|
588
|
+
return e.type = null, E(e, j, void 0), E(e, w, [t.substring(s - 1)]), l;
|
|
589
|
+
}, _t = function(t) {
|
|
590
|
+
return P(this, A, gt).call(this, t, De);
|
|
591
|
+
}, gt = function(t, e = Ce) {
|
|
592
592
|
if (!t || typeof t != "object" || t.type !== null || o(t, w).length !== 1 || this.type === null)
|
|
593
593
|
return !1;
|
|
594
594
|
const s = o(t, w)[0];
|
|
595
595
|
return !s || typeof s != "object" || s.type === null ? !1 : P(this, A, rt).call(this, s.type, e);
|
|
596
|
-
}, rt = function(t, e =
|
|
596
|
+
}, rt = function(t, e = ke) {
|
|
597
597
|
var s;
|
|
598
598
|
return !!((s = e.get(this.type)) != null && s.includes(t));
|
|
599
|
-
},
|
|
599
|
+
}, Gt = function(t, e) {
|
|
600
600
|
const s = o(t, w)[0], i = new C(null, s, this.options);
|
|
601
601
|
o(i, w).push(""), s.push(i), P(this, A, dt).call(this, t, e);
|
|
602
602
|
}, dt = function(t, e) {
|
|
@@ -605,31 +605,31 @@ v = new WeakMap(), T = new WeakMap(), F = new WeakMap(), w = new WeakMap(), N =
|
|
|
605
605
|
for (const i of o(s, w))
|
|
606
606
|
typeof i == "object" && E(i, N, this);
|
|
607
607
|
E(this, _, void 0);
|
|
608
|
-
}, Gt = function(t) {
|
|
609
|
-
const e = Pt.get(this.type);
|
|
610
|
-
return !!(e != null && e.has(t));
|
|
611
608
|
}, Ft = function(t) {
|
|
609
|
+
const e = At.get(this.type);
|
|
610
|
+
return !!(e != null && e.has(t));
|
|
611
|
+
}, Bt = function(t) {
|
|
612
612
|
if (!t || typeof t != "object" || t.type !== null || o(t, w).length !== 1 || this.type === null || o(this, w).length !== 1)
|
|
613
613
|
return !1;
|
|
614
614
|
const e = o(t, w)[0];
|
|
615
|
-
return !e || typeof e != "object" || e.type === null ? !1 : P(this, A,
|
|
616
|
-
},
|
|
617
|
-
const e =
|
|
615
|
+
return !e || typeof e != "object" || e.type === null ? !1 : P(this, A, Ft).call(this, e.type);
|
|
616
|
+
}, It = function(t) {
|
|
617
|
+
const e = At.get(this.type), s = o(t, w)[0], i = e == null ? void 0 : e.get(s.type);
|
|
618
618
|
if (!i)
|
|
619
619
|
return !1;
|
|
620
620
|
E(this, w, o(s, w));
|
|
621
621
|
for (const r of o(this, w))
|
|
622
622
|
typeof r == "object" && E(r, N, this);
|
|
623
|
-
this.type = i, E(this, _, void 0), E(this,
|
|
623
|
+
this.type = i, E(this, _, void 0), E(this, Q, !1);
|
|
624
624
|
}, ot = function() {
|
|
625
625
|
var t, e;
|
|
626
|
-
if (
|
|
626
|
+
if (Pt(this)) {
|
|
627
627
|
let s = 0, i = !1;
|
|
628
628
|
do {
|
|
629
629
|
i = !0;
|
|
630
630
|
for (let r = 0; r < o(this, w).length; r++) {
|
|
631
631
|
const a = o(this, w)[r];
|
|
632
|
-
typeof a == "object" && (P(e = a, A, ot).call(e), P(this, A, gt).call(this, a) ? (i = !1, P(this, A, dt).call(this, a, r)) : P(this, A,
|
|
632
|
+
typeof a == "object" && (P(e = a, A, ot).call(e), P(this, A, gt).call(this, a) ? (i = !1, P(this, A, dt).call(this, a, r)) : P(this, A, _t).call(this, a) ? (i = !1, P(this, A, Gt).call(this, a, r)) : P(this, A, Bt).call(this, a) && (i = !1, P(this, A, It).call(this, a)));
|
|
633
633
|
}
|
|
634
634
|
} while (!i && ++s < 10);
|
|
635
635
|
} else
|
|
@@ -643,18 +643,18 @@ v = new WeakMap(), T = new WeakMap(), F = new WeakMap(), w = new WeakMap(), N =
|
|
|
643
643
|
const [s, i, r, a] = e.toRegExpSource(t);
|
|
644
644
|
return E(this, F, o(this, F) || a), s;
|
|
645
645
|
}).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|");
|
|
646
|
-
},
|
|
646
|
+
}, Ut = function(t, e, s = !1) {
|
|
647
647
|
let i = !1, r = "", a = !1, h = !1;
|
|
648
648
|
for (let p = 0; p < t.length; p++) {
|
|
649
649
|
const c = t.charAt(p);
|
|
650
650
|
if (i) {
|
|
651
|
-
i = !1, r += (
|
|
651
|
+
i = !1, r += (_e.has(c) ? "\\" : "") + c;
|
|
652
652
|
continue;
|
|
653
653
|
}
|
|
654
654
|
if (c === "*") {
|
|
655
655
|
if (h)
|
|
656
656
|
continue;
|
|
657
|
-
h = !0, r += s && /^[*]+$/.test(t) ?
|
|
657
|
+
h = !0, r += s && /^[*]+$/.test(t) ? Ot : Nt, e = !0;
|
|
658
658
|
continue;
|
|
659
659
|
} else
|
|
660
660
|
h = !1;
|
|
@@ -663,7 +663,7 @@ v = new WeakMap(), T = new WeakMap(), F = new WeakMap(), w = new WeakMap(), N =
|
|
|
663
663
|
continue;
|
|
664
664
|
}
|
|
665
665
|
if (c === "[") {
|
|
666
|
-
const [f, l, u, m] =
|
|
666
|
+
const [f, l, u, m] = We(t, p);
|
|
667
667
|
if (u) {
|
|
668
668
|
r += f, a = a || l, p += u - 1, e = e || m;
|
|
669
669
|
continue;
|
|
@@ -673,39 +673,39 @@ v = new WeakMap(), T = new WeakMap(), F = new WeakMap(), w = new WeakMap(), N =
|
|
|
673
673
|
r += xt, e = !0;
|
|
674
674
|
continue;
|
|
675
675
|
}
|
|
676
|
-
r +=
|
|
676
|
+
r += Ge(c);
|
|
677
677
|
}
|
|
678
678
|
return [r, st(t), !!e, a];
|
|
679
|
-
},
|
|
679
|
+
}, T(lt, J);
|
|
680
680
|
C = lt;
|
|
681
|
-
const
|
|
682
|
-
const e = Ut([n]);
|
|
683
|
-
return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
|
|
684
|
-
}, is = ([n, t = ""]) => {
|
|
681
|
+
const Be = (n, { windowsPathsNoEscape: t = !1, magicalBraces: e = !1 } = {}) => e ? t ? n.replace(/[?*()[\]{}]/g, "[$&]") : n.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n.replace(/[?*()[\]]/g, "[$&]") : n.replace(/[?*()[\]\\]/g, "\\$&"), W = (n, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new ct(t, e).match(n)), Ie = /^\*+([^+@!?*[(]*)$/, Ue = (n) => (t) => !t.startsWith(".") && t.endsWith(n), Je = (n) => (t) => t.endsWith(n), He = (n) => (n = n.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(n)), Ve = (n) => (n = n.toLowerCase(), (t) => t.toLowerCase().endsWith(n)), Ze = /^\*+\.\*+$/, Xe = (n) => !n.startsWith(".") && n.includes("."), Ke = (n) => n !== "." && n !== ".." && n.includes("."), Qe = /^\.\*+$/, Ye = (n) => n !== "." && n !== ".." && n.startsWith("."), ts = /^\*+$/, es = (n) => n.length !== 0 && !n.startsWith("."), ss = (n) => n.length !== 0 && n !== "." && n !== "..", ns = /^\?+([^+@!?*[(]*)?$/, is = ([n, t = ""]) => {
|
|
685
682
|
const e = Jt([n]);
|
|
686
683
|
return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
|
|
687
684
|
}, rs = ([n, t = ""]) => {
|
|
688
|
-
const e =
|
|
689
|
-
return t ? (s) => e(s) && s.endsWith(t) : e;
|
|
685
|
+
const e = Ht([n]);
|
|
686
|
+
return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
|
|
690
687
|
}, os = ([n, t = ""]) => {
|
|
691
|
-
const e =
|
|
688
|
+
const e = Ht([n]);
|
|
692
689
|
return t ? (s) => e(s) && s.endsWith(t) : e;
|
|
693
|
-
},
|
|
690
|
+
}, as = ([n, t = ""]) => {
|
|
691
|
+
const e = Jt([n]);
|
|
692
|
+
return t ? (s) => e(s) && s.endsWith(t) : e;
|
|
693
|
+
}, Jt = ([n]) => {
|
|
694
694
|
const t = n.length;
|
|
695
695
|
return (e) => e.length === t && !e.startsWith(".");
|
|
696
|
-
},
|
|
696
|
+
}, Ht = ([n]) => {
|
|
697
697
|
const t = n.length;
|
|
698
698
|
return (e) => e.length === t && e !== "." && e !== "..";
|
|
699
|
-
},
|
|
699
|
+
}, Vt = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", vt = {
|
|
700
700
|
win32: { sep: "\\" },
|
|
701
701
|
posix: { sep: "/" }
|
|
702
|
-
},
|
|
703
|
-
W.sep =
|
|
702
|
+
}, ls = Vt === "win32" ? vt.win32.sep : vt.posix.sep;
|
|
703
|
+
W.sep = ls;
|
|
704
704
|
const R = Symbol("globstar **");
|
|
705
705
|
W.GLOBSTAR = R;
|
|
706
|
-
const
|
|
707
|
-
W.filter =
|
|
708
|
-
const q = (n, t = {}) => Object.assign({}, n, t),
|
|
706
|
+
const cs = "[^/]", hs = cs + "*?", fs = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", us = "(?:(?!(?:\\/|^)\\.).)*?", ps = (n, t = {}) => (e) => W(e, n, t);
|
|
707
|
+
W.filter = ps;
|
|
708
|
+
const q = (n, t = {}) => Object.assign({}, n, t), gs = (n) => {
|
|
709
709
|
if (!n || typeof n != "object" || !Object.keys(n).length)
|
|
710
710
|
return W;
|
|
711
711
|
const t = W;
|
|
@@ -739,21 +739,21 @@ const q = (n, t = {}) => Object.assign({}, n, t), ps = (n) => {
|
|
|
739
739
|
GLOBSTAR: R
|
|
740
740
|
});
|
|
741
741
|
};
|
|
742
|
-
W.defaults =
|
|
743
|
-
const
|
|
744
|
-
W.braceExpand =
|
|
745
|
-
const
|
|
746
|
-
W.makeRe =
|
|
747
|
-
const
|
|
742
|
+
W.defaults = gs;
|
|
743
|
+
const Zt = (n, t = {}) => (at(n), t.nobrace || !/\{(?:(?!\{).)*\}/.test(n) ? [n] : $e(n, { max: t.braceExpandMax }));
|
|
744
|
+
W.braceExpand = Zt;
|
|
745
|
+
const ds = (n, t = {}) => new ct(n, t).makeRe();
|
|
746
|
+
W.makeRe = ds;
|
|
747
|
+
const ms = (n, t, e = {}) => {
|
|
748
748
|
const s = new ct(t, e);
|
|
749
749
|
return n = n.filter((i) => s.match(i)), s.options.nonull && !n.length && n.push(t), n;
|
|
750
750
|
};
|
|
751
|
-
W.match =
|
|
752
|
-
const
|
|
753
|
-
var L,
|
|
751
|
+
W.match = ms;
|
|
752
|
+
const Tt = /[?*]|[+@!]\(.*?\)|\[|\]/, ys = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
753
|
+
var L, Xt, yt, K;
|
|
754
754
|
class ct {
|
|
755
755
|
constructor(t, e = {}) {
|
|
756
|
-
|
|
756
|
+
T(this, L);
|
|
757
757
|
O(this, "options");
|
|
758
758
|
O(this, "set");
|
|
759
759
|
O(this, "pattern");
|
|
@@ -772,7 +772,7 @@ class ct {
|
|
|
772
772
|
O(this, "windowsNoMagicRoot");
|
|
773
773
|
O(this, "maxGlobstarRecursion");
|
|
774
774
|
O(this, "regexp");
|
|
775
|
-
at(t), e = e || {}, this.options = e, this.maxGlobstarRecursion = e.maxGlobstarRecursion ?? 200, this.pattern = t, this.platform = e.platform ||
|
|
775
|
+
at(t), e = e || {}, this.options = e, this.maxGlobstarRecursion = e.maxGlobstarRecursion ?? 200, this.pattern = t, this.platform = e.platform || Vt, this.isWindows = this.platform === "win32";
|
|
776
776
|
const s = "allowWindowsEscape";
|
|
777
777
|
this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e[s] === !1, this.windowsPathsNoEscape && (this.pattern = this.pattern.replace(/\\/g, "/")), this.preserveMultipleSlashes = !!e.preserveMultipleSlashes, this.regexp = null, this.negate = !1, this.nonegate = !!e.nonegate, this.comment = !1, this.empty = !1, this.partial = !!e.partial, this.nocase = !!this.options.nocase, this.windowsNoMagicRoot = e.windowsNoMagicRoot !== void 0 ? e.windowsNoMagicRoot : !!(this.isWindows && this.nocase), this.globSet = [], this.globParts = [], this.set = [], this.make();
|
|
778
778
|
}
|
|
@@ -802,7 +802,7 @@ class ct {
|
|
|
802
802
|
this.globParts = this.preprocess(s), this.debug(this.pattern, this.globParts);
|
|
803
803
|
let i = this.globParts.map((r, a, h) => {
|
|
804
804
|
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
805
|
-
const p = r[0] === "" && r[1] === "" && (r[2] === "?" || !
|
|
805
|
+
const p = r[0] === "" && r[1] === "" && (r[2] === "?" || !Tt.test(r[2])) && !Tt.test(r[3]), c = /^[a-z]:/i.test(r[0]);
|
|
806
806
|
if (p)
|
|
807
807
|
return [
|
|
808
808
|
...r.slice(0, 4),
|
|
@@ -995,10 +995,10 @@ class ct {
|
|
|
995
995
|
}
|
|
996
996
|
}
|
|
997
997
|
const { optimizationLevel: a = 1 } = this.options;
|
|
998
|
-
return a >= 2 && (t = this.levelTwoFileOptimize(t)), e.includes(R) ? P(this, L,
|
|
998
|
+
return a >= 2 && (t = this.levelTwoFileOptimize(t)), e.includes(R) ? P(this, L, Xt).call(this, t, e, s, i, r) : P(this, L, K).call(this, t, e, s, i, r);
|
|
999
999
|
}
|
|
1000
1000
|
braceExpand() {
|
|
1001
|
-
return
|
|
1001
|
+
return Zt(this.pattern, this.options);
|
|
1002
1002
|
}
|
|
1003
1003
|
parse(t) {
|
|
1004
1004
|
at(t);
|
|
@@ -1008,7 +1008,7 @@ class ct {
|
|
|
1008
1008
|
if (t === "")
|
|
1009
1009
|
return "";
|
|
1010
1010
|
let s, i = null;
|
|
1011
|
-
(s = t.match(
|
|
1011
|
+
(s = t.match(ts)) ? i = e.dot ? ss : es : (s = t.match(Ie)) ? i = (e.nocase ? e.dot ? Ve : He : e.dot ? Je : Ue)(s[1]) : (s = t.match(ns)) ? i = (e.nocase ? e.dot ? rs : is : e.dot ? os : as)(s) : (s = t.match(Ze)) ? i = e.dot ? Ke : Xe : (s = t.match(Qe)) && (i = Ye);
|
|
1012
1012
|
const r = lt.fromGlob(t, this.options).toMMPattern();
|
|
1013
1013
|
return i && typeof r == "object" && Reflect.defineProperty(r, "test", { value: i }), r;
|
|
1014
1014
|
}
|
|
@@ -1018,13 +1018,13 @@ class ct {
|
|
|
1018
1018
|
const t = this.set;
|
|
1019
1019
|
if (!t.length)
|
|
1020
1020
|
return this.regexp = !1, this.regexp;
|
|
1021
|
-
const e = this.options, s = e.noglobstar ?
|
|
1021
|
+
const e = this.options, s = e.noglobstar ? hs : e.dot ? fs : us, i = new Set(e.nocase ? ["i"] : []);
|
|
1022
1022
|
let r = t.map((p) => {
|
|
1023
1023
|
const c = p.map((l) => {
|
|
1024
1024
|
if (l instanceof RegExp)
|
|
1025
1025
|
for (const u of l.flags.split(""))
|
|
1026
1026
|
i.add(u);
|
|
1027
|
-
return typeof l == "string" ?
|
|
1027
|
+
return typeof l == "string" ? ys(l) : l === R ? R : l._src;
|
|
1028
1028
|
});
|
|
1029
1029
|
c.forEach((l, u) => {
|
|
1030
1030
|
const m = c[u + 1], y = c[u - 1];
|
|
@@ -1079,7 +1079,7 @@ class ct {
|
|
|
1079
1079
|
return W.defaults(t).Minimatch;
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
|
-
L = new WeakSet(),
|
|
1082
|
+
L = new WeakSet(), Xt = function(t, e, s, i, r) {
|
|
1083
1083
|
const a = e.indexOf(R, r), h = e.lastIndexOf(R), [p, c, f] = s ? [
|
|
1084
1084
|
e.slice(r, a),
|
|
1085
1085
|
e.slice(a + 1),
|
|
@@ -1091,7 +1091,7 @@ L = new WeakSet(), Zt = function(t, e, s, i, r) {
|
|
|
1091
1091
|
];
|
|
1092
1092
|
if (p.length) {
|
|
1093
1093
|
const M = t.slice(i, i + p.length);
|
|
1094
|
-
if (!P(this, L,
|
|
1094
|
+
if (!P(this, L, K).call(this, M, p, s, 0, 0))
|
|
1095
1095
|
return !1;
|
|
1096
1096
|
i += p.length, r += p.length;
|
|
1097
1097
|
}
|
|
@@ -1100,10 +1100,10 @@ L = new WeakSet(), Zt = function(t, e, s, i, r) {
|
|
|
1100
1100
|
if (f.length + i > t.length)
|
|
1101
1101
|
return !1;
|
|
1102
1102
|
let M = t.length - f.length;
|
|
1103
|
-
if (P(this, L,
|
|
1103
|
+
if (P(this, L, K).call(this, t, f, s, M, 0))
|
|
1104
1104
|
l = f.length;
|
|
1105
1105
|
else {
|
|
1106
|
-
if (t[t.length - 1] !== "" || i + f.length === t.length || (M--, !P(this, L,
|
|
1106
|
+
if (t[t.length - 1] !== "" || i + f.length === t.length || (M--, !P(this, L, K).call(this, t, f, s, M, 0)))
|
|
1107
1107
|
return !1;
|
|
1108
1108
|
l = f.length + 1;
|
|
1109
1109
|
}
|
|
@@ -1142,7 +1142,7 @@ yt = function(t, e, s, i, r, a, h) {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
const [c, f] = p;
|
|
1144
1144
|
for (; s <= f; ) {
|
|
1145
|
-
if (P(this, L,
|
|
1145
|
+
if (P(this, L, K).call(this, t.slice(0, s + c.length), c, r, s, 0) && a < this.maxGlobstarRecursion) {
|
|
1146
1146
|
const m = P(this, L, yt).call(this, t, e, s + c.length, i + 1, r, a + 1, h);
|
|
1147
1147
|
if (m !== !1)
|
|
1148
1148
|
return m;
|
|
@@ -1153,7 +1153,7 @@ yt = function(t, e, s, i, r, a, h) {
|
|
|
1153
1153
|
s++;
|
|
1154
1154
|
}
|
|
1155
1155
|
return r || null;
|
|
1156
|
-
},
|
|
1156
|
+
}, K = function(t, e, s, i, r) {
|
|
1157
1157
|
let a, h, p, c;
|
|
1158
1158
|
for (a = i, h = r, c = t.length, p = e.length; a < c && h < p; a++, h++) {
|
|
1159
1159
|
this.debug("matchOne loop");
|
|
@@ -1174,9 +1174,9 @@ yt = function(t, e, s, i, r, a, h) {
|
|
|
1174
1174
|
};
|
|
1175
1175
|
W.AST = lt;
|
|
1176
1176
|
W.Minimatch = ct;
|
|
1177
|
-
W.escape =
|
|
1177
|
+
W.escape = Be;
|
|
1178
1178
|
W.unescape = st;
|
|
1179
|
-
class
|
|
1179
|
+
class ws {
|
|
1180
1180
|
constructor(t) {
|
|
1181
1181
|
O(this, "value");
|
|
1182
1182
|
O(this, "next");
|
|
@@ -1184,15 +1184,15 @@ class ys {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
1186
1186
|
var D, U, X;
|
|
1187
|
-
class
|
|
1187
|
+
class xs {
|
|
1188
1188
|
constructor() {
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1189
|
+
T(this, D);
|
|
1190
|
+
T(this, U);
|
|
1191
|
+
T(this, X);
|
|
1192
1192
|
this.clear();
|
|
1193
1193
|
}
|
|
1194
1194
|
enqueue(t) {
|
|
1195
|
-
const e = new
|
|
1195
|
+
const e = new ws(t);
|
|
1196
1196
|
o(this, D) ? (o(this, U).next = e, E(this, U, e)) : (E(this, D, e), E(this, U, e)), ft(this, X)._++;
|
|
1197
1197
|
}
|
|
1198
1198
|
dequeue() {
|
|
@@ -1221,11 +1221,11 @@ class ws {
|
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
1223
|
D = new WeakMap(), U = new WeakMap(), X = new WeakMap();
|
|
1224
|
-
function
|
|
1224
|
+
function Ss(n) {
|
|
1225
1225
|
let t = !1;
|
|
1226
1226
|
if (typeof n == "object" && ({ concurrency: n, rejectOnClear: t = !1 } = n), jt(n), typeof t != "boolean")
|
|
1227
1227
|
throw new TypeError("Expected `rejectOnClear` to be a boolean");
|
|
1228
|
-
const e = new
|
|
1228
|
+
const e = new xs();
|
|
1229
1229
|
let s = 0;
|
|
1230
1230
|
const i = () => {
|
|
1231
1231
|
s < n && e.size > 0 && (s++, e.dequeue().run());
|
|
@@ -1286,8 +1286,8 @@ function jt(n) {
|
|
|
1286
1286
|
if (!((Number.isInteger(n) || n === Number.POSITIVE_INFINITY) && n > 0))
|
|
1287
1287
|
throw new TypeError("Expected `concurrency` to be a number from 1 and up");
|
|
1288
1288
|
}
|
|
1289
|
-
const
|
|
1290
|
-
function
|
|
1289
|
+
const bs = ce(le);
|
|
1290
|
+
function Es(n) {
|
|
1291
1291
|
if (n.length < 2) return "never";
|
|
1292
1292
|
const t = [...n].sort((i, r) => i - r);
|
|
1293
1293
|
let e = 0;
|
|
@@ -1296,7 +1296,7 @@ function bs(n) {
|
|
|
1296
1296
|
const s = e / (t.length - 1) / 864e5;
|
|
1297
1297
|
return s <= 1 ? "daily" : s <= 7 ? "weekly" : s <= 30 ? "monthly" : s <= 365 ? "yearly" : "never";
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function Ms(n) {
|
|
1300
1300
|
const t = n.pageEntryPattern;
|
|
1301
1301
|
let e = n.rootDir ?? "", s = n.outputFile ?? "";
|
|
1302
1302
|
const i = n.concurrency ?? 20, r = n.commitCount ?? 10, a = n.ignoreDeps ? Array.isArray(n.ignoreDeps) ? n.ignoreDeps : [n.ignoreDeps] : [], h = {};
|
|
@@ -1304,17 +1304,17 @@ function Es(n) {
|
|
|
1304
1304
|
return {
|
|
1305
1305
|
name: "vite-last-modified",
|
|
1306
1306
|
async configResolved(c) {
|
|
1307
|
-
p = c.build.ssr, e || (e = c.root), s || (s =
|
|
1307
|
+
p = c.build.ssr, e || (e = c.root), s || (s = re(e, "last-modified.json"));
|
|
1308
1308
|
},
|
|
1309
1309
|
async buildEnd() {
|
|
1310
1310
|
if (p || process.env.NODE_ENV !== "production")
|
|
1311
1311
|
return;
|
|
1312
|
-
const c = /* @__PURE__ */ new Map(), f =
|
|
1312
|
+
const c = /* @__PURE__ */ new Map(), f = Ss(i), l = (g) => {
|
|
1313
1313
|
if (c.has(g))
|
|
1314
1314
|
return c.get(g);
|
|
1315
1315
|
const x = f(async () => {
|
|
1316
1316
|
try {
|
|
1317
|
-
const M = g.includes("?") ? g.slice(0, g.indexOf("?")) : g, d =
|
|
1317
|
+
const M = g.includes("?") ? g.slice(0, g.indexOf("?")) : g, d = ie.relative(e, M).replace(/\\/g, "/"), { stdout: $ } = await bs(`git log --follow -n ${r} --format=%at -- "${d}"`, { cwd: e });
|
|
1318
1318
|
return $.trim() ? $.trim().split(`
|
|
1319
1319
|
`).map((b) => parseInt(b, 10) * 1e3) : [];
|
|
1320
1320
|
} catch {
|
|
@@ -1359,7 +1359,7 @@ function Es(n) {
|
|
|
1359
1359
|
S.add(x);
|
|
1360
1360
|
await Promise.all([...S].map(l));
|
|
1361
1361
|
for (const [g, x] of y) {
|
|
1362
|
-
const M = g.slice(e.length).replace(/^\//, ""), d = (await Promise.all([...x].map(l))).flat(), $ = d.length > 0 ? Math.max(...d) : 0, b =
|
|
1362
|
+
const M = g.slice(e.length).replace(/^\//, ""), d = (await Promise.all([...x].map(l))).flat(), $ = d.length > 0 ? Math.max(...d) : 0, b = Es(d);
|
|
1363
1363
|
h[M] = { lastmod: $, changefreq: b };
|
|
1364
1364
|
}
|
|
1365
1365
|
},
|
|
@@ -1367,19 +1367,19 @@ function Es(n) {
|
|
|
1367
1367
|
if (p || process.env.NODE_ENV !== "production")
|
|
1368
1368
|
return;
|
|
1369
1369
|
const c = Object.fromEntries(Object.entries(h).sort(([f], [l]) => f.localeCompare(l)));
|
|
1370
|
-
|
|
1370
|
+
Wt(s, JSON.stringify(c, null, 2), "utf8"), console.log(`[lastModifiedPlugin] Written ${s}`);
|
|
1371
1371
|
}
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
1374
|
-
const
|
|
1374
|
+
const Rs = Yt({
|
|
1375
1375
|
meta: {
|
|
1376
1376
|
name: "sitemap",
|
|
1377
1377
|
configKey: "sitemap"
|
|
1378
1378
|
},
|
|
1379
1379
|
setup(n, t) {
|
|
1380
1380
|
var i;
|
|
1381
|
-
|
|
1382
|
-
|
|
1381
|
+
te(
|
|
1382
|
+
Ms({
|
|
1383
1383
|
rootDir: ((i = n.nuxtAppRoot) == null ? void 0 : i.replace(/\\/g, "/")) || t.options.dir.app,
|
|
1384
1384
|
// @ts-ignore
|
|
1385
1385
|
pageEntryPattern: "**/pages/**/*.vue",
|
|
@@ -1389,45 +1389,48 @@ const Ws = Qt({
|
|
|
1389
1389
|
const e = Array.isArray(n.ignore) ? n.ignore : typeof n.ignore == "string" ? [n.ignore] : [], s = n.hostname.endsWith("/") ? n.hostname.slice(0, -1) : n.hostname;
|
|
1390
1390
|
t.hook("close", async () => {
|
|
1391
1391
|
var f, l, u, m, y, S;
|
|
1392
|
-
const r =
|
|
1393
|
-
if (!
|
|
1392
|
+
const r = Y(t.options.rootDir, ".output", "public");
|
|
1393
|
+
if (!Et(r))
|
|
1394
|
+
return;
|
|
1395
|
+
const a = ((f = n.lastmodAndChangefreqOptions) == null ? void 0 : f.outputFile) || Y(n.nuxtAppRoot || t.options.dir.app, "last-modified.json");
|
|
1396
|
+
if (!Et(a))
|
|
1394
1397
|
return;
|
|
1395
|
-
const
|
|
1396
|
-
if ((
|
|
1398
|
+
const h = {};
|
|
1399
|
+
if ((l = n.index) != null && l.items)
|
|
1397
1400
|
for (const g of n.index.items)
|
|
1398
|
-
g.pathPrefix && (
|
|
1401
|
+
g.pathPrefix && (h[g.pathPrefix.startsWith("/") ? g.pathPrefix : `/${g.pathPrefix}`] = /* @__PURE__ */ new Set());
|
|
1399
1402
|
else
|
|
1400
|
-
|
|
1401
|
-
const
|
|
1403
|
+
h["/"] = /* @__PURE__ */ new Set();
|
|
1404
|
+
const p = (g) => {
|
|
1402
1405
|
const x = ne(g, {
|
|
1403
1406
|
withFileTypes: !0,
|
|
1404
1407
|
encoding: "utf-8"
|
|
1405
1408
|
});
|
|
1406
1409
|
for (const M of x) {
|
|
1407
1410
|
if (M.isDirectory()) {
|
|
1408
|
-
|
|
1411
|
+
p(Y(g, M.name));
|
|
1409
1412
|
continue;
|
|
1410
1413
|
}
|
|
1411
1414
|
if (M.name === "index.html") {
|
|
1412
|
-
const d = `/${
|
|
1415
|
+
const d = `/${oe(r, g).replace(/\\/g, "/")}`;
|
|
1413
1416
|
for (const $ of e)
|
|
1414
1417
|
W(d, $);
|
|
1415
|
-
for (const $ in
|
|
1416
|
-
d.startsWith($) &&
|
|
1418
|
+
for (const $ in h)
|
|
1419
|
+
d.startsWith($) && h[$].add(d);
|
|
1417
1420
|
}
|
|
1418
1421
|
}
|
|
1419
1422
|
};
|
|
1420
|
-
|
|
1421
|
-
const
|
|
1423
|
+
p(r), console.log("[module:generate-sitemap] collect html done");
|
|
1424
|
+
const c = JSON.parse(ee(a, "utf-8"));
|
|
1422
1425
|
await Promise.all(
|
|
1423
1426
|
(((u = n.index) == null ? void 0 : u.items) ?? [{ pathPrefix: "/", filename: "sitemap.xml" }]).filter((g) => g.pathPrefix && g.filename).map(async (g) => {
|
|
1424
|
-
const x = g.pathPrefix.startsWith("/") ? g.pathPrefix : `/${g.pathPrefix}`, M = g.filename.endsWith(".xml") ? g.filename : `${g.filename}.xml`, d = se(
|
|
1427
|
+
const x = g.pathPrefix.startsWith("/") ? g.pathPrefix : `/${g.pathPrefix}`, M = g.filename.endsWith(".xml") ? g.filename : `${g.filename}.xml`, d = se(Y(r, x, M), "utf-8");
|
|
1425
1428
|
try {
|
|
1426
|
-
await
|
|
1429
|
+
await ae(function* () {
|
|
1427
1430
|
yield `<?xml version="1.0" encoding="UTF-8"?>
|
|
1428
1431
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
|
|
1429
1432
|
`;
|
|
1430
|
-
const $ =
|
|
1433
|
+
const $ = h[x];
|
|
1431
1434
|
for (const b of $) {
|
|
1432
1435
|
if (!b.startsWith("/"))
|
|
1433
1436
|
continue;
|
|
@@ -1458,8 +1461,8 @@ ${St.map((V) => ` ${V}`).join(`
|
|
|
1458
1461
|
return;
|
|
1459
1462
|
}
|
|
1460
1463
|
})
|
|
1461
|
-
), (m = n.index) != null && m.indexFilename && ((S = (y = n.index) == null ? void 0 : y.items) != null && S.length) &&
|
|
1462
|
-
|
|
1464
|
+
), (m = n.index) != null && m.indexFilename && ((S = (y = n.index) == null ? void 0 : y.items) != null && S.length) && Wt(
|
|
1465
|
+
Y(r, n.index.indexFilename),
|
|
1463
1466
|
`<?xml version="1.0" encoding="UTF-8"?>
|
|
1464
1467
|
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
1465
1468
|
${n.index.items.filter((g) => g.loc || g.filename).map((g) => {
|
|
@@ -1476,5 +1479,5 @@ ${St.map((V) => ` ${V}`).join(`
|
|
|
1476
1479
|
}
|
|
1477
1480
|
});
|
|
1478
1481
|
export {
|
|
1479
|
-
|
|
1482
|
+
Rs as default
|
|
1480
1483
|
};
|