@forsakringskassan/vite-lib-config 4.3.5 → 4.3.7
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/api-extractor.js +180 -173
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/vite.config.cjs +180 -173
- package/dist/vite.config.mjs +182 -175
- package/package.json +2 -2
package/dist/vite.config.cjs
CHANGED
|
@@ -4588,16 +4588,16 @@ var ce = (n7, t) => {
|
|
|
4588
4588
|
return e ? e[0] : null;
|
|
4589
4589
|
};
|
|
4590
4590
|
var ss = (n7, t, e) => {
|
|
4591
|
-
let s, i, r, o, h, a = e.indexOf(n7), l = e.indexOf(t, a + 1),
|
|
4591
|
+
let s, i, r, o, h, a = e.indexOf(n7), l = e.indexOf(t, a + 1), u = a;
|
|
4592
4592
|
if (a >= 0 && l > 0) {
|
|
4593
4593
|
if (n7 === t) return [a, l];
|
|
4594
|
-
for (s = [], r = e.length;
|
|
4595
|
-
if (
|
|
4594
|
+
for (s = [], r = e.length; u >= 0 && !h; ) {
|
|
4595
|
+
if (u === a) s.push(u), a = e.indexOf(n7, u + 1);
|
|
4596
4596
|
else if (s.length === 1) {
|
|
4597
4597
|
let c = s.pop();
|
|
4598
4598
|
c !== void 0 && (h = [c, l]);
|
|
4599
|
-
} else i = s.pop(), i !== void 0 && i < r && (r = i, o = l), l = e.indexOf(t,
|
|
4600
|
-
|
|
4599
|
+
} else i = s.pop(), i !== void 0 && i < r && (r = i, o = l), l = e.indexOf(t, u + 1);
|
|
4600
|
+
u = a < l && a >= 0 ? a : l;
|
|
4601
4601
|
}
|
|
4602
4602
|
s.length && o !== void 0 && (h = [r, o]);
|
|
4603
4603
|
}
|
|
@@ -4663,18 +4663,18 @@ function ht(n7, t, e) {
|
|
|
4663
4663
|
s.push(a);
|
|
4664
4664
|
}
|
|
4665
4665
|
else {
|
|
4666
|
-
let h = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), a = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), l = h || a,
|
|
4667
|
-
if (!l && !
|
|
4666
|
+
let h = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), a = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), l = h || a, u = i.body.indexOf(",") >= 0;
|
|
4667
|
+
if (!l && !u) return i.post.match(/,(?!,).*\}/) ? (n7 = i.pre + "{" + i.body + qt + i.post, ht(n7, t, true)) : [n7];
|
|
4668
4668
|
let c;
|
|
4669
4669
|
if (l) c = i.body.split(/\.\./);
|
|
4670
|
-
else if (c = me(i.body), c.length === 1 && c[0] !== void 0 && (c = ht(c[0], t, false).map(gs), c.length === 1)) return o.map((
|
|
4670
|
+
else if (c = me(i.body), c.length === 1 && c[0] !== void 0 && (c = ht(c[0], t, false).map(gs), c.length === 1)) return o.map((f) => i.pre + c[0] + f);
|
|
4671
4671
|
let d;
|
|
4672
4672
|
if (l && c[0] !== void 0 && c[1] !== void 0) {
|
|
4673
|
-
let
|
|
4674
|
-
m <
|
|
4673
|
+
let f = Ht(c[0]), m = Ht(c[1]), p = Math.max(c[0].length, c[1].length), w = c.length === 3 && c[2] !== void 0 ? Math.abs(Ht(c[2])) : 1, g = ys;
|
|
4674
|
+
m < f && (w *= -1, g = bs);
|
|
4675
4675
|
let E = c.some(ws);
|
|
4676
4676
|
d = [];
|
|
4677
|
-
for (let y =
|
|
4677
|
+
for (let y = f; g(y, m); y += w) {
|
|
4678
4678
|
let b;
|
|
4679
4679
|
if (a) b = String.fromCharCode(y), b === "\\" && (b = "");
|
|
4680
4680
|
else if (b = String(y), E) {
|
|
@@ -4688,10 +4688,10 @@ function ht(n7, t, e) {
|
|
|
4688
4688
|
}
|
|
4689
4689
|
} else {
|
|
4690
4690
|
d = [];
|
|
4691
|
-
for (let
|
|
4691
|
+
for (let f = 0; f < c.length; f++) d.push.apply(d, ht(c[f], t, false));
|
|
4692
4692
|
}
|
|
4693
|
-
for (let
|
|
4694
|
-
let p = r + d[
|
|
4693
|
+
for (let f = 0; f < d.length; f++) for (let m = 0; m < o.length && s.length < t; m++) {
|
|
4694
|
+
let p = r + d[f] + o[m];
|
|
4695
4695
|
(!e || l || p) && s.push(p);
|
|
4696
4696
|
}
|
|
4697
4697
|
}
|
|
@@ -4708,7 +4708,7 @@ var we = (n7) => n7.join("");
|
|
|
4708
4708
|
var ye = (n7, t) => {
|
|
4709
4709
|
let e = t;
|
|
4710
4710
|
if (n7.charAt(e) !== "[") throw new Error("not in a brace expression");
|
|
4711
|
-
let s = [], i = [], r = e + 1, o = false, h = false, a = false, l = false,
|
|
4711
|
+
let s = [], i = [], r = e + 1, o = false, h = false, a = false, l = false, u = e, c = "";
|
|
4712
4712
|
t: for (; r < n7.length; ) {
|
|
4713
4713
|
let p = n7.charAt(r);
|
|
4714
4714
|
if ((p === "!" || p === "^") && r === e + 1) {
|
|
@@ -4716,7 +4716,7 @@ var ye = (n7, t) => {
|
|
|
4716
4716
|
continue;
|
|
4717
4717
|
}
|
|
4718
4718
|
if (p === "]" && o && !a) {
|
|
4719
|
-
|
|
4719
|
+
u = r + 1;
|
|
4720
4720
|
break;
|
|
4721
4721
|
}
|
|
4722
4722
|
if (o = true, p === "\\" && !a) {
|
|
@@ -4744,14 +4744,14 @@ var ye = (n7, t) => {
|
|
|
4744
4744
|
}
|
|
4745
4745
|
s.push(lt(p)), r++;
|
|
4746
4746
|
}
|
|
4747
|
-
if (
|
|
4747
|
+
if (u < r) return ["", false, 0, false];
|
|
4748
4748
|
if (!s.length && !i.length) return ["$.", false, n7.length - e, true];
|
|
4749
4749
|
if (i.length === 0 && s.length === 1 && /^\\?.$/.test(s[0]) && !l) {
|
|
4750
4750
|
let p = s[0].length === 2 ? s[0].slice(-1) : s[0];
|
|
4751
|
-
return [Es(p), false,
|
|
4751
|
+
return [Es(p), false, u - e, false];
|
|
4752
4752
|
}
|
|
4753
|
-
let d = "[" + (l ? "^" : "") + we(s) + "]",
|
|
4754
|
-
return [s.length && i.length ? "(" + d + "|" +
|
|
4753
|
+
let d = "[" + (l ? "^" : "") + we(s) + "]", f = "[" + (l ? "" : "^") + we(i) + "]";
|
|
4754
|
+
return [s.length && i.length ? "(" + d + "|" + f + ")" : s.length ? d : f, h, u - e, true];
|
|
4755
4755
|
};
|
|
4756
4756
|
var W = (n7, { windowsPathsNoEscape: t = false, magicalBraces: e = true } = {}) => e ? t ? n7.replace(/\[([^\/\\])\]/g, "$1") : n7.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1") : t ? n7.replace(/\[([^\/\\{}])\]/g, "$1") : n7.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
|
|
4757
4757
|
var xs = /* @__PURE__ */ new Set(["!", "?", "+", "*", "@"]);
|
|
@@ -4846,56 +4846,56 @@ var Q = class n {
|
|
|
4846
4846
|
static #i(t, e, s, i) {
|
|
4847
4847
|
let r = false, o = false, h = -1, a = false;
|
|
4848
4848
|
if (e.type === null) {
|
|
4849
|
-
let
|
|
4850
|
-
for (;
|
|
4851
|
-
let p = t.charAt(
|
|
4849
|
+
let f = s, m = "";
|
|
4850
|
+
for (; f < t.length; ) {
|
|
4851
|
+
let p = t.charAt(f++);
|
|
4852
4852
|
if (r || p === "\\") {
|
|
4853
4853
|
r = !r, m += p;
|
|
4854
4854
|
continue;
|
|
4855
4855
|
}
|
|
4856
4856
|
if (o) {
|
|
4857
|
-
|
|
4857
|
+
f === h + 1 ? (p === "^" || p === "!") && (a = true) : p === "]" && !(f === h + 2 && a) && (o = false), m += p;
|
|
4858
4858
|
continue;
|
|
4859
4859
|
} else if (p === "[") {
|
|
4860
|
-
o = true, h =
|
|
4860
|
+
o = true, h = f, a = false, m += p;
|
|
4861
4861
|
continue;
|
|
4862
4862
|
}
|
|
4863
|
-
if (!i.noext && be(p) && t.charAt(
|
|
4863
|
+
if (!i.noext && be(p) && t.charAt(f) === "(") {
|
|
4864
4864
|
e.push(m), m = "";
|
|
4865
4865
|
let w = new n(p, e);
|
|
4866
|
-
|
|
4866
|
+
f = n.#i(t, w, f, i), e.push(w);
|
|
4867
4867
|
continue;
|
|
4868
4868
|
}
|
|
4869
4869
|
m += p;
|
|
4870
4870
|
}
|
|
4871
|
-
return e.push(m),
|
|
4871
|
+
return e.push(m), f;
|
|
4872
4872
|
}
|
|
4873
|
-
let l = s + 1,
|
|
4873
|
+
let l = s + 1, u = new n(null, e), c = [], d = "";
|
|
4874
4874
|
for (; l < t.length; ) {
|
|
4875
|
-
let
|
|
4876
|
-
if (r ||
|
|
4877
|
-
r = !r, d +=
|
|
4875
|
+
let f = t.charAt(l++);
|
|
4876
|
+
if (r || f === "\\") {
|
|
4877
|
+
r = !r, d += f;
|
|
4878
4878
|
continue;
|
|
4879
4879
|
}
|
|
4880
4880
|
if (o) {
|
|
4881
|
-
l === h + 1 ? (
|
|
4881
|
+
l === h + 1 ? (f === "^" || f === "!") && (a = true) : f === "]" && !(l === h + 2 && a) && (o = false), d += f;
|
|
4882
4882
|
continue;
|
|
4883
|
-
} else if (
|
|
4884
|
-
o = true, h = l, a = false, d +=
|
|
4883
|
+
} else if (f === "[") {
|
|
4884
|
+
o = true, h = l, a = false, d += f;
|
|
4885
4885
|
continue;
|
|
4886
4886
|
}
|
|
4887
|
-
if (be(
|
|
4888
|
-
|
|
4889
|
-
let m = new n(
|
|
4890
|
-
|
|
4887
|
+
if (be(f) && t.charAt(l) === "(") {
|
|
4888
|
+
u.push(d), d = "";
|
|
4889
|
+
let m = new n(f, u);
|
|
4890
|
+
u.push(m), l = n.#i(t, m, l, i);
|
|
4891
4891
|
continue;
|
|
4892
4892
|
}
|
|
4893
|
-
if (
|
|
4894
|
-
|
|
4893
|
+
if (f === "|") {
|
|
4894
|
+
u.push(d), d = "", c.push(u), u = new n(null, e);
|
|
4895
4895
|
continue;
|
|
4896
4896
|
}
|
|
4897
|
-
if (
|
|
4898
|
-
d +=
|
|
4897
|
+
if (f === ")") return d === "" && e.#r.length === 0 && (e.#f = true), u.push(d), d = "", e.push(...c, u), l;
|
|
4898
|
+
d += f;
|
|
4899
4899
|
}
|
|
4900
4900
|
return e.type = null, e.#s = void 0, e.#r = [t.substring(s - 1)], l;
|
|
4901
4901
|
}
|
|
@@ -4916,16 +4916,16 @@ var Q = class n {
|
|
|
4916
4916
|
toRegExpSource(t) {
|
|
4917
4917
|
let e = t ?? !!this.#h.dot;
|
|
4918
4918
|
if (this.#t === this && this.#a(), !this.type) {
|
|
4919
|
-
let a = this.isStart() && this.isEnd() && !this.#r.some((
|
|
4920
|
-
let [m, p, w, g] = typeof
|
|
4919
|
+
let a = this.isStart() && this.isEnd() && !this.#r.some((f) => typeof f != "string"), l = this.#r.map((f) => {
|
|
4920
|
+
let [m, p, w, g] = typeof f == "string" ? n.#E(f, this.#s, a) : f.toRegExpSource(t);
|
|
4921
4921
|
return this.#s = this.#s || w, this.#n = this.#n || g, m;
|
|
4922
|
-
}).join(""),
|
|
4922
|
+
}).join(""), u = "";
|
|
4923
4923
|
if (this.isStart() && typeof this.#r[0] == "string" && !(this.#r.length === 1 && Ts.has(this.#r[0]))) {
|
|
4924
4924
|
let m = Cs, p = e && m.has(l.charAt(0)) || l.startsWith("\\.") && m.has(l.charAt(2)) || l.startsWith("\\.\\.") && m.has(l.charAt(4)), w = !e && !t && m.has(l.charAt(0));
|
|
4925
|
-
|
|
4925
|
+
u = p ? vs : w ? Ct : "";
|
|
4926
4926
|
}
|
|
4927
4927
|
let c = "";
|
|
4928
|
-
return this.isEnd() && this.#t.#c && this.#o?.type === "!" && (c = "(?:$|\\/)"), [
|
|
4928
|
+
return this.isEnd() && this.#t.#c && this.#o?.type === "!" && (c = "(?:$|\\/)"), [u + l + c, W(l), this.#s = !!this.#s, this.#n];
|
|
4929
4929
|
}
|
|
4930
4930
|
let s = this.type === "*" || this.type === "+", i = this.type === "!" ? "(?:(?!(?:" : "(?:", r = this.#d(e);
|
|
4931
4931
|
if (this.isStart() && this.isEnd() && !r && this.type !== "!") {
|
|
@@ -4950,33 +4950,34 @@ var Q = class n {
|
|
|
4950
4950
|
}).filter((e) => !(this.isStart() && this.isEnd()) || !!e).join("|");
|
|
4951
4951
|
}
|
|
4952
4952
|
static #E(t, e, s = false) {
|
|
4953
|
-
let i = false, r = "", o = false;
|
|
4954
|
-
for (let
|
|
4955
|
-
let
|
|
4953
|
+
let i = false, r = "", o = false, h = false;
|
|
4954
|
+
for (let a = 0; a < t.length; a++) {
|
|
4955
|
+
let l = t.charAt(a);
|
|
4956
4956
|
if (i) {
|
|
4957
|
-
i = false, r += (As.has(
|
|
4957
|
+
i = false, r += (As.has(l) ? "\\" : "") + l;
|
|
4958
4958
|
continue;
|
|
4959
4959
|
}
|
|
4960
|
-
if (
|
|
4961
|
-
h
|
|
4960
|
+
if (l === "*") {
|
|
4961
|
+
if (h) continue;
|
|
4962
|
+
h = true, r += s && /^[*]+$/.test(t) ? Ee : Se, e = true;
|
|
4963
|
+
continue;
|
|
4964
|
+
} else h = false;
|
|
4965
|
+
if (l === "\\") {
|
|
4966
|
+
a === t.length - 1 ? r += "\\\\" : i = true;
|
|
4962
4967
|
continue;
|
|
4963
4968
|
}
|
|
4964
|
-
if (
|
|
4965
|
-
let [
|
|
4966
|
-
if (
|
|
4967
|
-
r +=
|
|
4969
|
+
if (l === "[") {
|
|
4970
|
+
let [u, c, d, f] = ye(t, a);
|
|
4971
|
+
if (d) {
|
|
4972
|
+
r += u, o = o || c, a += d - 1, e = e || f;
|
|
4968
4973
|
continue;
|
|
4969
4974
|
}
|
|
4970
4975
|
}
|
|
4971
|
-
if (
|
|
4972
|
-
r += s && t === "*" ? Ee : Se, e = true;
|
|
4973
|
-
continue;
|
|
4974
|
-
}
|
|
4975
|
-
if (a === "?") {
|
|
4976
|
+
if (l === "?") {
|
|
4976
4977
|
r += Kt, e = true;
|
|
4977
4978
|
continue;
|
|
4978
4979
|
}
|
|
4979
|
-
r += ks(
|
|
4980
|
+
r += ks(l);
|
|
4980
4981
|
}
|
|
4981
4982
|
return [r, W(t), !!e, o];
|
|
4982
4983
|
}
|
|
@@ -5111,8 +5112,8 @@ var D = class {
|
|
|
5111
5112
|
let i = this.globParts.map((r, o, h) => {
|
|
5112
5113
|
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
5113
5114
|
let a = r[0] === "" && r[1] === "" && (r[2] === "?" || !ve.test(r[2])) && !ve.test(r[3]), l = /^[a-z]:/i.test(r[0]);
|
|
5114
|
-
if (a) return [...r.slice(0, 4), ...r.slice(4).map((
|
|
5115
|
-
if (l) return [r[0], ...r.slice(1).map((
|
|
5115
|
+
if (a) return [...r.slice(0, 4), ...r.slice(4).map((u) => this.parse(u))];
|
|
5116
|
+
if (l) return [r[0], ...r.slice(1).map((u) => this.parse(u))];
|
|
5116
5117
|
}
|
|
5117
5118
|
return r.map((a) => this.parse(a));
|
|
5118
5119
|
});
|
|
@@ -5176,8 +5177,8 @@ var D = class {
|
|
|
5176
5177
|
let h = s[i + 1], a = s[i + 2], l = s[i + 3];
|
|
5177
5178
|
if (h !== ".." || !a || a === "." || a === ".." || !l || l === "." || l === "..") continue;
|
|
5178
5179
|
e = true, s.splice(i, 1);
|
|
5179
|
-
let
|
|
5180
|
-
|
|
5180
|
+
let u = s.slice(0);
|
|
5181
|
+
u[i] = "**", t.push(u), i--;
|
|
5181
5182
|
}
|
|
5182
5183
|
if (!this.preserveMultipleSlashes) {
|
|
5183
5184
|
for (let o = 1; o < s.length - 1; o++) {
|
|
@@ -5242,30 +5243,30 @@ var D = class {
|
|
|
5242
5243
|
r >= 2 && (t = this.levelTwoFileOptimize(t)), this.debug("matchOne", this, { file: t, pattern: e }), this.debug("matchOne", t.length, e.length);
|
|
5243
5244
|
for (var o = 0, h = 0, a = t.length, l = e.length; o < a && h < l; o++, h++) {
|
|
5244
5245
|
this.debug("matchOne loop");
|
|
5245
|
-
var
|
|
5246
|
-
if (this.debug(e,
|
|
5247
|
-
if (
|
|
5248
|
-
this.debug("GLOBSTAR", [e,
|
|
5249
|
-
var d = o,
|
|
5250
|
-
if (
|
|
5246
|
+
var u = e[h], c = t[o];
|
|
5247
|
+
if (this.debug(e, u, c), u === false) return false;
|
|
5248
|
+
if (u === A) {
|
|
5249
|
+
this.debug("GLOBSTAR", [e, u, c]);
|
|
5250
|
+
var d = o, f = h + 1;
|
|
5251
|
+
if (f === l) {
|
|
5251
5252
|
for (this.debug("** at the end"); o < a; o++) if (t[o] === "." || t[o] === ".." || !i.dot && t[o].charAt(0) === ".") return false;
|
|
5252
5253
|
return true;
|
|
5253
5254
|
}
|
|
5254
5255
|
for (; d < a; ) {
|
|
5255
5256
|
var m = t[d];
|
|
5256
5257
|
if (this.debug(`
|
|
5257
|
-
globstar while`, t, d, e,
|
|
5258
|
+
globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) return this.debug("globstar found match!", d, a, m), true;
|
|
5258
5259
|
if (m === "." || m === ".." || !i.dot && m.charAt(0) === ".") {
|
|
5259
|
-
this.debug("dot detected!", t, d, e,
|
|
5260
|
+
this.debug("dot detected!", t, d, e, f);
|
|
5260
5261
|
break;
|
|
5261
5262
|
}
|
|
5262
5263
|
this.debug("globstar swallow a segment, and continue"), d++;
|
|
5263
5264
|
}
|
|
5264
5265
|
return !!(s && (this.debug(`
|
|
5265
|
-
>>> no match, partial?`, t, d, e,
|
|
5266
|
+
>>> no match, partial?`, t, d, e, f), d === a));
|
|
5266
5267
|
}
|
|
5267
5268
|
let p;
|
|
5268
|
-
if (typeof
|
|
5269
|
+
if (typeof u == "string" ? (p = c === u, this.debug("string match", u, c, p)) : (p = u.test(c), this.debug("pattern match", u, c, p)), !p) return false;
|
|
5269
5270
|
}
|
|
5270
5271
|
if (o === a && h === l) return true;
|
|
5271
5272
|
if (o === a) return s;
|
|
@@ -5295,16 +5296,16 @@ globstar while`, t, d, e, u, m), this.matchOne(t.slice(d), e.slice(u), s)) retur
|
|
|
5295
5296
|
return typeof c == "string" ? ei(c) : c === A ? A : c._src;
|
|
5296
5297
|
});
|
|
5297
5298
|
l.forEach((c, d) => {
|
|
5298
|
-
let
|
|
5299
|
-
c !== A || m === A || (m === void 0 ?
|
|
5299
|
+
let f = l[d + 1], m = l[d - 1];
|
|
5300
|
+
c !== A || m === A || (m === void 0 ? f !== void 0 && f !== A ? l[d + 1] = "(?:\\/|" + s + "\\/)?" + f : l[d] = s : f === void 0 ? l[d - 1] = m + "(?:\\/|\\/" + s + ")?" : f !== A && (l[d - 1] = m + "(?:\\/|\\/" + s + "\\/)" + f, l[d + 1] = A));
|
|
5300
5301
|
});
|
|
5301
|
-
let
|
|
5302
|
-
if (this.partial &&
|
|
5302
|
+
let u = l.filter((c) => c !== A);
|
|
5303
|
+
if (this.partial && u.length >= 1) {
|
|
5303
5304
|
let c = [];
|
|
5304
|
-
for (let d = 1; d <=
|
|
5305
|
+
for (let d = 1; d <= u.length; d++) c.push(u.slice(0, d).join("/"));
|
|
5305
5306
|
return "(?:" + c.join("|") + ")";
|
|
5306
5307
|
}
|
|
5307
|
-
return
|
|
5308
|
+
return u.join("/");
|
|
5308
5309
|
}).join("|"), [o, h] = t.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
5309
5310
|
r = "^" + o + r + h + "$", this.partial && (r = "^(?:\\/|" + o + r.slice(1, -1) + h + ")$"), this.negate && (r = "^(?!" + r + ").+$");
|
|
5310
5311
|
try {
|
|
@@ -5488,7 +5489,7 @@ var ft = class Me {
|
|
|
5488
5489
|
return this.#o;
|
|
5489
5490
|
}
|
|
5490
5491
|
constructor(t) {
|
|
5491
|
-
let { max: e = 0, ttl: s, ttlResolution: i = 1, ttlAutopurge: r, updateAgeOnGet: o, updateAgeOnHas: h, allowStale: a, dispose: l, onInsert:
|
|
5492
|
+
let { max: e = 0, ttl: s, ttlResolution: i = 1, ttlAutopurge: r, updateAgeOnGet: o, updateAgeOnHas: h, allowStale: a, dispose: l, onInsert: u, disposeAfter: c, noDisposeOnSet: d, noUpdateTTL: f, maxSize: m = 0, maxEntrySize: p = 0, sizeCalculation: w, fetchMethod: g, memoMethod: S, noDeleteOnFetchRejection: E, noDeleteOnStaleGet: y, allowStaleOnFetchRejection: b, allowStaleOnFetchAbort: z, ignoreFetchAbort: $, perf: J } = t;
|
|
5492
5493
|
if (J !== void 0 && typeof J?.now != "function") throw new TypeError("perf option must have a now() method if specified");
|
|
5493
5494
|
if (this.#c = J ?? si, e !== 0 && !q(e)) throw new TypeError("max option must be a nonnegative integer");
|
|
5494
5495
|
let Z = e ? De(e) : Array;
|
|
@@ -5499,7 +5500,7 @@ var ft = class Me {
|
|
|
5499
5500
|
}
|
|
5500
5501
|
if (S !== void 0 && typeof S != "function") throw new TypeError("memoMethod must be a function if defined");
|
|
5501
5502
|
if (this.#w = S, g !== void 0 && typeof g != "function") throw new TypeError("fetchMethod must be a function if specified");
|
|
5502
|
-
if (this.#S = g, this.#A = !!g, this.#f = /* @__PURE__ */ new Map(), this.#a = new Array(e).fill(void 0), this.#i = new Array(e).fill(void 0), this.#d = new Z(e), this.#E = new Z(e), this.#b = 0, this.#p = 0, this.#R = ri.create(e), this.#h = 0, this.#u = 0, typeof l == "function" && (this.#n = l), typeof
|
|
5503
|
+
if (this.#S = g, this.#A = !!g, this.#f = /* @__PURE__ */ new Map(), this.#a = new Array(e).fill(void 0), this.#i = new Array(e).fill(void 0), this.#d = new Z(e), this.#E = new Z(e), this.#b = 0, this.#p = 0, this.#R = ri.create(e), this.#h = 0, this.#u = 0, typeof l == "function" && (this.#n = l), typeof u == "function" && (this.#r = u), typeof c == "function" ? (this.#o = c, this.#m = []) : (this.#o = void 0, this.#m = void 0), this.#x = !!this.#n, this.#_ = !!this.#r, this.#e = !!this.#o, this.noDisposeOnSet = !!d, this.noUpdateTTL = !!f, this.noDeleteOnFetchRejection = !!E, this.allowStaleOnFetchRejection = !!b, this.allowStaleOnFetchAbort = !!z, this.ignoreFetchAbort = !!$, this.maxEntrySize !== 0) {
|
|
5503
5504
|
if (this.#s !== 0 && !q(this.#s)) throw new TypeError("maxSize must be a positive integer if specified");
|
|
5504
5505
|
if (!q(this.maxEntrySize)) throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
5505
5506
|
this.#G();
|
|
@@ -5535,8 +5536,8 @@ var ft = class Me {
|
|
|
5535
5536
|
let a = t[h], l = e[h];
|
|
5536
5537
|
if (!a || !l) return;
|
|
5537
5538
|
o.ttl = a, o.start = l, o.now = i || r();
|
|
5538
|
-
let
|
|
5539
|
-
o.remainingTTL = a -
|
|
5539
|
+
let u = o.now - l;
|
|
5540
|
+
o.remainingTTL = a - u;
|
|
5540
5541
|
}
|
|
5541
5542
|
};
|
|
5542
5543
|
let i = 0, r = () => {
|
|
@@ -5553,8 +5554,8 @@ var ft = class Me {
|
|
|
5553
5554
|
if (h === void 0) return 0;
|
|
5554
5555
|
let a = t[h], l = e[h];
|
|
5555
5556
|
if (!a || !l) return 1 / 0;
|
|
5556
|
-
let
|
|
5557
|
-
return a -
|
|
5557
|
+
let u = (i || r()) - l;
|
|
5558
|
+
return a - u;
|
|
5558
5559
|
}, this.#v = (o) => {
|
|
5559
5560
|
let h = e[o], a = t[o];
|
|
5560
5561
|
return !!a && !!h && (i || r()) - h > a;
|
|
@@ -5696,30 +5697,30 @@ var ft = class Me {
|
|
|
5696
5697
|
}
|
|
5697
5698
|
set(t, e, s = {}) {
|
|
5698
5699
|
if (e === void 0) return this.delete(t), this;
|
|
5699
|
-
let { ttl: i = this.ttl, start: r, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: a } = s, { noUpdateTTL: l = this.noUpdateTTL } = s,
|
|
5700
|
-
if (this.maxEntrySize &&
|
|
5700
|
+
let { ttl: i = this.ttl, start: r, noDisposeOnSet: o = this.noDisposeOnSet, sizeCalculation: h = this.sizeCalculation, status: a } = s, { noUpdateTTL: l = this.noUpdateTTL } = s, u = this.#I(t, e, s.size || 0, h);
|
|
5701
|
+
if (this.maxEntrySize && u > this.maxEntrySize) return a && (a.set = "miss", a.maxEntrySizeExceeded = true), this.#O(t, "set"), this;
|
|
5701
5702
|
let c = this.#h === 0 ? void 0 : this.#f.get(t);
|
|
5702
|
-
if (c === void 0) c = this.#h === 0 ? this.#p : this.#R.length !== 0 ? this.#R.pop() : this.#h === this.#t ? this.#B(false) : this.#h, this.#a[c] = t, this.#i[c] = e, this.#f.set(t, c), this.#d[this.#p] = c, this.#E[c] = this.#p, this.#p = c, this.#h++, this.#L(c,
|
|
5703
|
+
if (c === void 0) c = this.#h === 0 ? this.#p : this.#R.length !== 0 ? this.#R.pop() : this.#h === this.#t ? this.#B(false) : this.#h, this.#a[c] = t, this.#i[c] = e, this.#f.set(t, c), this.#d[this.#p] = c, this.#E[c] = this.#p, this.#p = c, this.#h++, this.#L(c, u, a), a && (a.set = "add"), l = false, this.#_ && this.#r?.(e, t, "add");
|
|
5703
5704
|
else {
|
|
5704
5705
|
this.#W(c);
|
|
5705
5706
|
let d = this.#i[c];
|
|
5706
5707
|
if (e !== d) {
|
|
5707
5708
|
if (this.#A && this.#l(d)) {
|
|
5708
5709
|
d.__abortController.abort(new Error("replaced"));
|
|
5709
|
-
let { __staleWhileFetching:
|
|
5710
|
-
|
|
5710
|
+
let { __staleWhileFetching: f } = d;
|
|
5711
|
+
f !== void 0 && !o && (this.#x && this.#n?.(f, t, "set"), this.#e && this.#m?.push([f, t, "set"]));
|
|
5711
5712
|
} else o || (this.#x && this.#n?.(d, t, "set"), this.#e && this.#m?.push([d, t, "set"]));
|
|
5712
|
-
if (this.#P(c), this.#L(c,
|
|
5713
|
+
if (this.#P(c), this.#L(c, u, a), this.#i[c] = e, a) {
|
|
5713
5714
|
a.set = "replace";
|
|
5714
|
-
let
|
|
5715
|
-
|
|
5715
|
+
let f = d && this.#l(d) ? d.__staleWhileFetching : d;
|
|
5716
|
+
f !== void 0 && (a.oldValue = f);
|
|
5716
5717
|
}
|
|
5717
5718
|
} else a && (a.set = "update");
|
|
5718
5719
|
this.#_ && this.onInsert?.(e, t, e === d ? "update" : "replace");
|
|
5719
5720
|
}
|
|
5720
5721
|
if (i !== 0 && !this.#g && this.#M(), this.#g && (l || this.#j(c, i, r), a && this.#N(a, c)), !o && this.#e && this.#m) {
|
|
5721
|
-
let d = this.#m,
|
|
5722
|
-
for (;
|
|
5722
|
+
let d = this.#m, f;
|
|
5723
|
+
for (; f = d?.shift(); ) this.#o?.(...f);
|
|
5723
5724
|
}
|
|
5724
5725
|
return this;
|
|
5725
5726
|
}
|
|
@@ -5766,11 +5767,11 @@ var ft = class Me {
|
|
|
5766
5767
|
let a = { signal: o.signal, options: s, context: i }, l = (p, w = false) => {
|
|
5767
5768
|
let { aborted: g } = o.signal, S = s.ignoreFetchAbort && p !== void 0, E = s.ignoreFetchAbort || !!(s.allowStaleOnFetchAbort && p !== void 0);
|
|
5768
5769
|
if (s.status && (g && !w ? (s.status.fetchAborted = true, s.status.fetchError = o.signal.reason, S && (s.status.fetchAbortIgnored = true)) : s.status.fetchResolved = true), g && !S && !w) return c(o.signal.reason, E);
|
|
5769
|
-
let y =
|
|
5770
|
-
return (b ===
|
|
5771
|
-
},
|
|
5772
|
-
let { aborted: g } = o.signal, S = g && s.allowStaleOnFetchAbort, E = S || s.allowStaleOnFetchRejection, y = E || s.noDeleteOnFetchRejection, b =
|
|
5773
|
-
if (this.#i[e] ===
|
|
5770
|
+
let y = f, b = this.#i[e];
|
|
5771
|
+
return (b === f || S && w && b === void 0) && (p === void 0 ? y.__staleWhileFetching !== void 0 ? this.#i[e] = y.__staleWhileFetching : this.#O(t, "fetch") : (s.status && (s.status.fetchUpdated = true), this.set(t, p, a.options))), p;
|
|
5772
|
+
}, u = (p) => (s.status && (s.status.fetchRejected = true, s.status.fetchError = p), c(p, false)), c = (p, w) => {
|
|
5773
|
+
let { aborted: g } = o.signal, S = g && s.allowStaleOnFetchAbort, E = S || s.allowStaleOnFetchRejection, y = E || s.noDeleteOnFetchRejection, b = f;
|
|
5774
|
+
if (this.#i[e] === f && (!y || !w && b.__staleWhileFetching === void 0 ? this.#O(t, "fetch") : S || (this.#i[e] = b.__staleWhileFetching)), E) return s.status && b.__staleWhileFetching !== void 0 && (s.status.returnedStale = true), b.__staleWhileFetching;
|
|
5774
5775
|
if (b.__returned === b) throw p;
|
|
5775
5776
|
}, d = (p, w) => {
|
|
5776
5777
|
let g = this.#S?.(t, r, a);
|
|
@@ -5779,7 +5780,7 @@ var ft = class Me {
|
|
|
5779
5780
|
});
|
|
5780
5781
|
};
|
|
5781
5782
|
s.status && (s.status.fetchDispatched = true);
|
|
5782
|
-
let
|
|
5783
|
+
let f = new Promise(d).then(l, u), m = Object.assign(f, { __abortController: o, __staleWhileFetching: r, __returned: void 0 });
|
|
5783
5784
|
return e === void 0 ? (this.set(t, m, { ...a.options, status: void 0 }), e = this.#f.get(t)) : this.#i[e] = m, m;
|
|
5784
5785
|
}
|
|
5785
5786
|
#l(t) {
|
|
@@ -5788,9 +5789,9 @@ var ft = class Me {
|
|
|
5788
5789
|
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof At;
|
|
5789
5790
|
}
|
|
5790
5791
|
async fetch(t, e = {}) {
|
|
5791
|
-
let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL:
|
|
5792
|
+
let { allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: r = this.noDeleteOnStaleGet, ttl: o = this.ttl, noDisposeOnSet: h = this.noDisposeOnSet, size: a = 0, sizeCalculation: l = this.sizeCalculation, noUpdateTTL: u = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: d = this.allowStaleOnFetchRejection, ignoreFetchAbort: f = this.ignoreFetchAbort, allowStaleOnFetchAbort: m = this.allowStaleOnFetchAbort, context: p, forceRefresh: w = false, status: g, signal: S } = e;
|
|
5792
5793
|
if (!this.#A) return g && (g.fetch = "get"), this.get(t, { allowStale: s, updateAgeOnGet: i, noDeleteOnStaleGet: r, status: g });
|
|
5793
|
-
let E = { allowStale: s, updateAgeOnGet: i, noDeleteOnStaleGet: r, ttl: o, noDisposeOnSet: h, size: a, sizeCalculation: l, noUpdateTTL:
|
|
5794
|
+
let E = { allowStale: s, updateAgeOnGet: i, noDeleteOnStaleGet: r, ttl: o, noDisposeOnSet: h, size: a, sizeCalculation: l, noUpdateTTL: u, noDeleteOnFetchRejection: c, allowStaleOnFetchRejection: d, allowStaleOnFetchAbort: m, ignoreFetchAbort: f, status: g, signal: S }, y = this.#f.get(t);
|
|
5794
5795
|
if (y === void 0) {
|
|
5795
5796
|
g && (g.fetch = "miss");
|
|
5796
5797
|
let b = this.#U(t, y, E, p);
|
|
@@ -5946,7 +5947,7 @@ var te = class extends Mt {
|
|
|
5946
5947
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
5947
5948
|
}
|
|
5948
5949
|
constructor(t, e, s) {
|
|
5949
|
-
super(t, e, s), this.proxyErrors = (i) =>
|
|
5950
|
+
super(t, e, s), this.proxyErrors = (i) => this.dest.emit("error", i), t.on("error", this.proxyErrors);
|
|
5950
5951
|
}
|
|
5951
5952
|
};
|
|
5952
5953
|
var di = (n7) => !!n7.objectMode;
|
|
@@ -6187,17 +6188,18 @@ var V = class extends import_node_events.EventEmitter {
|
|
|
6187
6188
|
if (i !== null) return Promise.resolve({ done: false, value: i });
|
|
6188
6189
|
if (this[G]) return e();
|
|
6189
6190
|
let r, o, h = (c) => {
|
|
6190
|
-
this.off("data", a), this.off("end", l), this.off(x,
|
|
6191
|
+
this.off("data", a), this.off("end", l), this.off(x, u), e(), o(c);
|
|
6191
6192
|
}, a = (c) => {
|
|
6192
|
-
this.off("error", h), this.off("end", l), this.off(x,
|
|
6193
|
+
this.off("error", h), this.off("end", l), this.off(x, u), this.pause(), r({ value: c, done: !!this[G] });
|
|
6193
6194
|
}, l = () => {
|
|
6194
|
-
this.off("error", h), this.off("data", a), this.off(x,
|
|
6195
|
-
},
|
|
6195
|
+
this.off("error", h), this.off("data", a), this.off(x, u), e(), r({ done: true, value: void 0 });
|
|
6196
|
+
}, u = () => h(new Error("stream destroyed"));
|
|
6196
6197
|
return new Promise((c, d) => {
|
|
6197
|
-
o = d, r = c, this.once(x,
|
|
6198
|
+
o = d, r = c, this.once(x, u), this.once("error", h), this.once("end", l), this.once("data", a);
|
|
6198
6199
|
});
|
|
6199
6200
|
}, throw: e, return: e, [Symbol.asyncIterator]() {
|
|
6200
6201
|
return this;
|
|
6202
|
+
}, [Symbol.asyncDispose]: async () => {
|
|
6201
6203
|
} };
|
|
6202
6204
|
}
|
|
6203
6205
|
[Symbol.iterator]() {
|
|
@@ -6209,6 +6211,7 @@ var V = class extends import_node_events.EventEmitter {
|
|
|
6209
6211
|
};
|
|
6210
6212
|
return this.once("end", e), this.once(Xt, e), this.once(x, e), { next: s, throw: e, return: e, [Symbol.iterator]() {
|
|
6211
6213
|
return this;
|
|
6214
|
+
}, [Symbol.dispose]: () => {
|
|
6212
6215
|
} };
|
|
6213
6216
|
}
|
|
6214
6217
|
destroy(t) {
|
|
@@ -6579,8 +6582,8 @@ var R = class {
|
|
|
6579
6582
|
}
|
|
6580
6583
|
}
|
|
6581
6584
|
#$(t) {
|
|
6582
|
-
let { atime: e, atimeMs: s, birthtime: i, birthtimeMs: r, blksize: o, blocks: h, ctime: a, ctimeMs: l, dev:
|
|
6583
|
-
this.#b = e, this.#a = s, this.#m = i, this.#E = r, this.#c = o, this.#f = h, this.#R = a, this.#d = l, this.#s =
|
|
6585
|
+
let { atime: e, atimeMs: s, birthtime: i, birthtimeMs: r, blksize: o, blocks: h, ctime: a, ctimeMs: l, dev: u, gid: c, ino: d, mode: f, mtime: m, mtimeMs: p, nlink: w, rdev: g, size: S, uid: E } = t;
|
|
6586
|
+
this.#b = e, this.#a = s, this.#m = i, this.#E = r, this.#c = o, this.#f = h, this.#R = a, this.#d = l, this.#s = u, this.#S = c, this.#h = d, this.#n = f, this.#p = m, this.#i = p, this.#r = w, this.#w = g, this.#u = S, this.#o = E;
|
|
6584
6587
|
let y = ie(t);
|
|
6585
6588
|
this.#e = this.#e & gt | y | je, y !== L && y !== U && y !== X && (this.#e |= yt);
|
|
6586
6589
|
}
|
|
@@ -6736,10 +6739,10 @@ var It = class {
|
|
|
6736
6739
|
let a = h.substring(this.rootPath.length).split(s);
|
|
6737
6740
|
if (a.length === 1 && !a[0] && a.pop(), i === void 0) throw new TypeError("must provide nocase setting to PathScurryBase ctor");
|
|
6738
6741
|
this.nocase = i, this.root = this.newRoot(this.#r), this.roots[this.rootPath] = this.root;
|
|
6739
|
-
let l = this.root,
|
|
6742
|
+
let l = this.root, u = a.length - 1, c = e.sep, d = this.rootPath, f = false;
|
|
6740
6743
|
for (let m of a) {
|
|
6741
|
-
let p =
|
|
6742
|
-
l = l.child(m, { relative: new Array(p).fill("..").join(c), relativePosix: new Array(p).fill("..").join("/"), fullpath: d += (
|
|
6744
|
+
let p = u--;
|
|
6745
|
+
l = l.child(m, { relative: new Array(p).fill("..").join(c), relativePosix: new Array(p).fill("..").join("/"), fullpath: d += (f ? "" : c) + m }), f = true;
|
|
6743
6746
|
}
|
|
6744
6747
|
this.cwd = l;
|
|
6745
6748
|
}
|
|
@@ -6827,8 +6830,8 @@ var It = class {
|
|
|
6827
6830
|
let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = [];
|
|
6828
6831
|
(!r || r(t)) && h.push(s ? t : t.fullpath());
|
|
6829
6832
|
let a = /* @__PURE__ */ new Set(), l = (c, d) => {
|
|
6830
|
-
a.add(c), c.readdirCB((
|
|
6831
|
-
if (
|
|
6833
|
+
a.add(c), c.readdirCB((f, m) => {
|
|
6834
|
+
if (f) return d(f);
|
|
6832
6835
|
let p = m.length;
|
|
6833
6836
|
if (!p) return d();
|
|
6834
6837
|
let w = () => {
|
|
@@ -6836,10 +6839,10 @@ var It = class {
|
|
|
6836
6839
|
};
|
|
6837
6840
|
for (let g of m) (!r || r(g)) && h.push(s ? g : g.fullpath()), i && g.isSymbolicLink() ? g.realpath().then((S) => S?.isUnknown() ? S.lstat() : S).then((S) => S?.shouldWalk(a, o) ? l(S, w) : w()) : g.shouldWalk(a, o) ? l(g, w) : w();
|
|
6838
6841
|
}, true);
|
|
6839
|
-
},
|
|
6842
|
+
}, u = t;
|
|
6840
6843
|
return new Promise((c, d) => {
|
|
6841
|
-
l(
|
|
6842
|
-
if (
|
|
6844
|
+
l(u, (f) => {
|
|
6845
|
+
if (f) return d(f);
|
|
6843
6846
|
c(h);
|
|
6844
6847
|
});
|
|
6845
6848
|
});
|
|
@@ -6850,8 +6853,8 @@ var It = class {
|
|
|
6850
6853
|
(!r || r(t)) && h.push(s ? t : t.fullpath());
|
|
6851
6854
|
let a = /* @__PURE__ */ new Set([t]);
|
|
6852
6855
|
for (let l of a) {
|
|
6853
|
-
let
|
|
6854
|
-
for (let c of
|
|
6856
|
+
let u = l.readdirSync();
|
|
6857
|
+
for (let c of u) {
|
|
6855
6858
|
(!r || r(c)) && h.push(s ? c : c.fullpath());
|
|
6856
6859
|
let d = c;
|
|
6857
6860
|
if (c.isSymbolicLink()) {
|
|
@@ -6879,11 +6882,11 @@ var It = class {
|
|
|
6879
6882
|
let h = /* @__PURE__ */ new Set([t]);
|
|
6880
6883
|
for (let a of h) {
|
|
6881
6884
|
let l = a.readdirSync();
|
|
6882
|
-
for (let
|
|
6883
|
-
(!r || r(
|
|
6884
|
-
let c =
|
|
6885
|
-
if (
|
|
6886
|
-
if (!(i && (c =
|
|
6885
|
+
for (let u of l) {
|
|
6886
|
+
(!r || r(u)) && (yield s ? u : u.fullpath());
|
|
6887
|
+
let c = u;
|
|
6888
|
+
if (u.isSymbolicLink()) {
|
|
6889
|
+
if (!(i && (c = u.realpathSync()))) continue;
|
|
6887
6890
|
c.isUnknown() && c.lstatSync();
|
|
6888
6891
|
}
|
|
6889
6892
|
c.shouldWalk(h, o) && h.add(c);
|
|
@@ -6894,15 +6897,15 @@ var It = class {
|
|
|
6894
6897
|
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
|
|
6895
6898
|
let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = new V({ objectMode: true });
|
|
6896
6899
|
(!r || r(t)) && h.write(s ? t : t.fullpath());
|
|
6897
|
-
let a = /* @__PURE__ */ new Set(), l = [t],
|
|
6900
|
+
let a = /* @__PURE__ */ new Set(), l = [t], u = 0, c = () => {
|
|
6898
6901
|
let d = false;
|
|
6899
6902
|
for (; !d; ) {
|
|
6900
|
-
let
|
|
6901
|
-
if (!
|
|
6902
|
-
|
|
6903
|
+
let f = l.shift();
|
|
6904
|
+
if (!f) {
|
|
6905
|
+
u === 0 && h.end();
|
|
6903
6906
|
return;
|
|
6904
6907
|
}
|
|
6905
|
-
|
|
6908
|
+
u++, a.add(f);
|
|
6906
6909
|
let m = (w, g, S = false) => {
|
|
6907
6910
|
if (w) return h.emit("error", w);
|
|
6908
6911
|
if (i && !S) {
|
|
@@ -6914,14 +6917,14 @@ var It = class {
|
|
|
6914
6917
|
}
|
|
6915
6918
|
}
|
|
6916
6919
|
for (let E of g) E && (!r || r(E)) && (h.write(s ? E : E.fullpath()) || (d = true));
|
|
6917
|
-
|
|
6920
|
+
u--;
|
|
6918
6921
|
for (let E of g) {
|
|
6919
6922
|
let y = E.realpathCached() || E;
|
|
6920
6923
|
y.shouldWalk(a, o) && l.push(y);
|
|
6921
6924
|
}
|
|
6922
6925
|
d && !h.flowing ? h.once("drain", c) : p || c();
|
|
6923
6926
|
}, p = true;
|
|
6924
|
-
|
|
6927
|
+
f.readdirCB(m, true), p = false;
|
|
6925
6928
|
}
|
|
6926
6929
|
};
|
|
6927
6930
|
return c(), h;
|
|
@@ -6930,18 +6933,18 @@ var It = class {
|
|
|
6930
6933
|
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
|
|
6931
6934
|
let { withFileTypes: s = true, follow: i = false, filter: r, walkFilter: o } = e, h = new V({ objectMode: true }), a = /* @__PURE__ */ new Set();
|
|
6932
6935
|
(!r || r(t)) && h.write(s ? t : t.fullpath());
|
|
6933
|
-
let l = [t],
|
|
6936
|
+
let l = [t], u = 0, c = () => {
|
|
6934
6937
|
let d = false;
|
|
6935
6938
|
for (; !d; ) {
|
|
6936
|
-
let
|
|
6937
|
-
if (!
|
|
6938
|
-
|
|
6939
|
+
let f = l.shift();
|
|
6940
|
+
if (!f) {
|
|
6941
|
+
u === 0 && h.end();
|
|
6939
6942
|
return;
|
|
6940
6943
|
}
|
|
6941
|
-
|
|
6942
|
-
let m =
|
|
6944
|
+
u++, a.add(f);
|
|
6945
|
+
let m = f.readdirSync();
|
|
6943
6946
|
for (let p of m) (!r || r(p)) && (h.write(s ? p : p.fullpath()) || (d = true));
|
|
6944
|
-
|
|
6947
|
+
u--;
|
|
6945
6948
|
for (let p of m) {
|
|
6946
6949
|
let w = p;
|
|
6947
6950
|
if (p.isSymbolicLink()) {
|
|
@@ -6999,10 +7002,11 @@ var St = class extends rt {
|
|
|
6999
7002
|
super(t, { ...e, nocase: s });
|
|
7000
7003
|
}
|
|
7001
7004
|
};
|
|
7002
|
-
var
|
|
7005
|
+
var Cr = process.platform === "win32" ? Pt : jt;
|
|
7003
7006
|
var Xe = process.platform === "win32" ? it : process.platform === "darwin" ? St : rt;
|
|
7004
7007
|
var Di = (n7) => n7.length >= 1;
|
|
7005
7008
|
var Mi = (n7) => n7.length >= 1;
|
|
7009
|
+
var Ni = /* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom");
|
|
7006
7010
|
var nt = class n4 {
|
|
7007
7011
|
#t;
|
|
7008
7012
|
#s;
|
|
@@ -7022,18 +7026,21 @@ var nt = class n4 {
|
|
|
7022
7026
|
if (this.length = t.length, s < 0 || s >= this.length) throw new TypeError("index out of range");
|
|
7023
7027
|
if (this.#t = t, this.#s = e, this.#n = s, this.#r = i, this.#n === 0) {
|
|
7024
7028
|
if (this.isUNC()) {
|
|
7025
|
-
let [r, o, h, a, ...l] = this.#t, [
|
|
7029
|
+
let [r, o, h, a, ...l] = this.#t, [u, c, d, f, ...m] = this.#s;
|
|
7026
7030
|
l[0] === "" && (l.shift(), m.shift());
|
|
7027
|
-
let p = [r, o, h, a, ""].join("/"), w = [
|
|
7031
|
+
let p = [r, o, h, a, ""].join("/"), w = [u, c, d, f, ""].join("/");
|
|
7028
7032
|
this.#t = [p, ...l], this.#s = [w, ...m], this.length = this.#t.length;
|
|
7029
7033
|
} else if (this.isDrive() || this.isAbsolute()) {
|
|
7030
7034
|
let [r, ...o] = this.#t, [h, ...a] = this.#s;
|
|
7031
7035
|
o[0] === "" && (o.shift(), a.shift());
|
|
7032
|
-
let l = r + "/",
|
|
7033
|
-
this.#t = [l, ...o], this.#s = [
|
|
7036
|
+
let l = r + "/", u = h + "/";
|
|
7037
|
+
this.#t = [l, ...o], this.#s = [u, ...a], this.length = this.#t.length;
|
|
7034
7038
|
}
|
|
7035
7039
|
}
|
|
7036
7040
|
}
|
|
7041
|
+
[Ni]() {
|
|
7042
|
+
return "Pattern <" + this.#s.slice(this.#n).join("/") + ">";
|
|
7043
|
+
}
|
|
7037
7044
|
pattern() {
|
|
7038
7045
|
return this.#t[this.#n];
|
|
7039
7046
|
}
|
|
@@ -7078,7 +7085,7 @@ var nt = class n4 {
|
|
|
7078
7085
|
return this.#n === 0 || !this.isGlobstar() || !this.#u ? false : (this.#u = false, true);
|
|
7079
7086
|
}
|
|
7080
7087
|
};
|
|
7081
|
-
var
|
|
7088
|
+
var _i = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
|
|
7082
7089
|
var ot = class {
|
|
7083
7090
|
relative;
|
|
7084
7091
|
relativeChildren;
|
|
@@ -7086,7 +7093,7 @@ var ot = class {
|
|
|
7086
7093
|
absoluteChildren;
|
|
7087
7094
|
platform;
|
|
7088
7095
|
mmopts;
|
|
7089
|
-
constructor(t, { nobrace: e, nocase: s, noext: i, noglobstar: r, platform: o =
|
|
7096
|
+
constructor(t, { nobrace: e, nocase: s, noext: i, noglobstar: r, platform: o = _i }) {
|
|
7090
7097
|
this.relative = [], this.absolute = [], this.relativeChildren = [], this.absoluteChildren = [], this.platform = o, this.mmopts = { dot: true, nobrace: e, nocase: s, noext: i, noglobstar: r, optimizationLevel: 2, platform: o, nocomment: true, nonegate: true };
|
|
7091
7098
|
for (let h of t) this.add(h);
|
|
7092
7099
|
}
|
|
@@ -7185,9 +7192,9 @@ var Et = class n6 {
|
|
|
7185
7192
|
}
|
|
7186
7193
|
}
|
|
7187
7194
|
if (i.isENOENT()) continue;
|
|
7188
|
-
let a, l,
|
|
7189
|
-
for (; typeof (a = r.pattern()) == "string" && (l = r.rest()); ) i = i.resolve(a), r = l,
|
|
7190
|
-
if (a = r.pattern(), l = r.rest(),
|
|
7195
|
+
let a, l, u = false;
|
|
7196
|
+
for (; typeof (a = r.pattern()) == "string" && (l = r.rest()); ) i = i.resolve(a), r = l, u = true;
|
|
7197
|
+
if (a = r.pattern(), l = r.rest(), u) {
|
|
7191
7198
|
if (this.hasWalkedCache.hasWalked(i, r)) continue;
|
|
7192
7199
|
this.hasWalkedCache.storeWalked(i, r);
|
|
7193
7200
|
}
|
|
@@ -7200,8 +7207,8 @@ var Et = class n6 {
|
|
|
7200
7207
|
let c = l?.pattern(), d = l?.rest();
|
|
7201
7208
|
if (!l || (c === "" || c === ".") && !d) this.matches.add(i, h, c === "" || c === ".");
|
|
7202
7209
|
else if (c === "..") {
|
|
7203
|
-
let
|
|
7204
|
-
d ? this.hasWalkedCache.hasWalked(
|
|
7210
|
+
let f = i.parent || i;
|
|
7211
|
+
d ? this.hasWalkedCache.hasWalked(f, d) || this.subwalks.add(f, d) : this.matches.add(f, h, true);
|
|
7205
7212
|
}
|
|
7206
7213
|
} else a instanceof RegExp && this.subwalks.add(i, r);
|
|
7207
7214
|
}
|
|
@@ -7238,7 +7245,7 @@ var Et = class n6 {
|
|
|
7238
7245
|
t.isNamed(e) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, false));
|
|
7239
7246
|
}
|
|
7240
7247
|
};
|
|
7241
|
-
var
|
|
7248
|
+
var Li = (n7, t) => typeof n7 == "string" ? new ot([n7], t) : Array.isArray(n7) ? new ot(n7, t) : n7;
|
|
7242
7249
|
var zt = class {
|
|
7243
7250
|
path;
|
|
7244
7251
|
patterns;
|
|
@@ -7253,7 +7260,7 @@ var zt = class {
|
|
|
7253
7260
|
maxDepth;
|
|
7254
7261
|
includeChildMatches;
|
|
7255
7262
|
constructor(t, e, s) {
|
|
7256
|
-
if (this.patterns = t, this.path = e, this.opts = s, this.#n = !s.posix && s.platform === "win32" ? "\\" : "/", this.includeChildMatches = s.includeChildMatches !== false, (s.ignore || !this.includeChildMatches) && (this.#s =
|
|
7263
|
+
if (this.patterns = t, this.path = e, this.opts = s, this.#n = !s.posix && s.platform === "win32" ? "\\" : "/", this.includeChildMatches = s.includeChildMatches !== false, (s.ignore || !this.includeChildMatches) && (this.#s = Li(s.ignore ?? [], s), !this.includeChildMatches && typeof this.#s.add != "function")) {
|
|
7257
7264
|
let i = "cannot ignore child matches, ignore lacks add() method.";
|
|
7258
7265
|
throw new Error(i);
|
|
7259
7266
|
}
|
|
@@ -7354,7 +7361,7 @@ var zt = class {
|
|
|
7354
7361
|
if (this.maxDepth !== 1 / 0 && h.depth() >= this.maxDepth) continue;
|
|
7355
7362
|
r++;
|
|
7356
7363
|
let a = h.readdirCached();
|
|
7357
|
-
h.calledReaddir() ? this.walkCB3(h, a, s, o) : h.readdirCB((l,
|
|
7364
|
+
h.calledReaddir() ? this.walkCB3(h, a, s, o) : h.readdirCB((l, u) => this.walkCB3(h, u, s, o), true);
|
|
7358
7365
|
}
|
|
7359
7366
|
o();
|
|
7360
7367
|
}
|
|
@@ -7440,7 +7447,7 @@ var vt = class extends zt {
|
|
|
7440
7447
|
return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
|
|
7441
7448
|
}
|
|
7442
7449
|
};
|
|
7443
|
-
var
|
|
7450
|
+
var Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
|
|
7444
7451
|
var I = class {
|
|
7445
7452
|
absolute;
|
|
7446
7453
|
cwd;
|
|
@@ -7476,18 +7483,18 @@ var I = class {
|
|
|
7476
7483
|
if (e.noglobstar) throw new TypeError("base matching requires globstar");
|
|
7477
7484
|
t = t.map((a) => a.includes("/") ? a : `./**/${a}`);
|
|
7478
7485
|
}
|
|
7479
|
-
if (this.pattern = t, this.platform = e.platform ||
|
|
7486
|
+
if (this.pattern = t, this.platform = e.platform || Pi, this.opts = { ...e, platform: this.platform }, e.scurry) {
|
|
7480
7487
|
if (this.scurry = e.scurry, e.nocase !== void 0 && e.nocase !== e.scurry.nocase) throw new Error("nocase option contradicts provided scurry option");
|
|
7481
7488
|
} else {
|
|
7482
7489
|
let a = e.platform === "win32" ? it : e.platform === "darwin" ? St : e.platform ? rt : Xe;
|
|
7483
7490
|
this.scurry = new a(this.cwd, { nocase: e.nocase, fs: e.fs });
|
|
7484
7491
|
}
|
|
7485
7492
|
this.nocase = this.scurry.nocase;
|
|
7486
|
-
let s = this.platform === "darwin" || this.platform === "win32", i = { ...e, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, nocase: this.nocase, nocaseMagicOnly: s, nocomment: true, noext: this.noext, nonegate: true, optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, debug: !!this.opts.debug }, r = this.pattern.map((a) => new D(a, i)), [o, h] = r.reduce((a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), [[], []]);
|
|
7493
|
+
let s = this.platform === "darwin" || this.platform === "win32", i = { braceExpandMax: 1e4, ...e, dot: this.dot, matchBase: this.matchBase, nobrace: this.nobrace, nocase: this.nocase, nocaseMagicOnly: s, nocomment: true, noext: this.noext, nonegate: true, optimizationLevel: 2, platform: this.platform, windowsPathsNoEscape: this.windowsPathsNoEscape, debug: !!this.opts.debug }, r = this.pattern.map((a) => new D(a, i)), [o, h] = r.reduce((a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), [[], []]);
|
|
7487
7494
|
this.patterns = o.map((a, l) => {
|
|
7488
|
-
let
|
|
7489
|
-
if (!
|
|
7490
|
-
return new nt(a,
|
|
7495
|
+
let u = h[l];
|
|
7496
|
+
if (!u) throw new Error("invalid pattern object");
|
|
7497
|
+
return new nt(a, u, 0, this.platform);
|
|
7491
7498
|
});
|
|
7492
7499
|
}
|
|
7493
7500
|
async walk() {
|
|
@@ -7538,12 +7545,12 @@ function Ut(n7, t = {}) {
|
|
|
7538
7545
|
function es(n7, t = {}) {
|
|
7539
7546
|
return new I(n7, t).iterate();
|
|
7540
7547
|
}
|
|
7541
|
-
var
|
|
7542
|
-
var
|
|
7543
|
-
var
|
|
7544
|
-
var
|
|
7545
|
-
var
|
|
7546
|
-
var Ze = Object.assign(Je, { glob: Je, globSync: ts, sync:
|
|
7548
|
+
var ji = Bt;
|
|
7549
|
+
var Ii = Object.assign(Qe, { sync: Bt });
|
|
7550
|
+
var zi = Ut;
|
|
7551
|
+
var Bi = Object.assign(es, { sync: Ut });
|
|
7552
|
+
var Ui = Object.assign(ts, { stream: Bt, iterate: Ut });
|
|
7553
|
+
var Ze = Object.assign(Je, { glob: Je, globSync: ts, sync: Ui, globStream: Qe, stream: Ii, globStreamSync: Bt, streamSync: ji, globIterate: es, iterate: Bi, globIterateSync: Ut, iterateSync: zi, Glob: I, hasMagic: le, escape: tt, unescape: W });
|
|
7547
7554
|
Ze.glob = Ze;
|
|
7548
7555
|
|
|
7549
7556
|
// src/vite.config.ts
|
|
@@ -7823,7 +7830,7 @@ function createDedent(options) {
|
|
|
7823
7830
|
result = result.trim();
|
|
7824
7831
|
}
|
|
7825
7832
|
if (escapeSpecialCharacters) {
|
|
7826
|
-
result = result.replace(/\\n/g, "\n");
|
|
7833
|
+
result = result.replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\r/g, "\r").replace(/\\v/g, "\v").replace(/\\b/g, "\b").replace(/\\f/g, "\f").replace(/\\0/g, "\0").replace(/\\x([\da-fA-F]{2})/g, (_2, h) => String.fromCharCode(parseInt(h, 16))).replace(/\\u\{([\da-fA-F]{1,6})\}/g, (_2, h) => String.fromCodePoint(parseInt(h, 16))).replace(/\\u([\da-fA-F]{4})/g, (_2, h) => String.fromCharCode(parseInt(h, 16)));
|
|
7827
7834
|
}
|
|
7828
7835
|
if (typeof Bun !== "undefined") {
|
|
7829
7836
|
result = result.replace(
|