@ariestools/toolchain 8.6.12 → 8.7.1
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/actions/api-exposure/config.d.ts.map +1 -1
- package/dist/actions/deplint/packageJsonEditor.d.ts +1 -1
- package/dist/actions/deplint/ruleConfig.d.ts.map +1 -1
- package/dist/actions/deplint/types.d.ts +1 -1
- package/dist/actions/gitlint.d.ts +2 -0
- package/dist/actions/gitlint.d.ts.map +1 -1
- package/dist/actions/license.d.ts +4 -0
- package/dist/actions/license.d.ts.map +1 -1
- package/dist/actions/lint.d.ts +11 -2
- package/dist/actions/lint.d.ts.map +1 -1
- package/dist/actions/lintNext.d.ts +22 -1
- package/dist/actions/lintNext.d.ts.map +1 -1
- package/dist/actions/lintNextRun.d.ts +36 -0
- package/dist/actions/lintNextRun.d.ts.map +1 -0
- package/dist/actions/lintNextWorker.d.ts +70 -3
- package/dist/actions/lintNextWorker.d.ts.map +1 -1
- package/dist/actions/lintPackageFilter.d.ts +44 -0
- package/dist/actions/lintPackageFilter.d.ts.map +1 -0
- package/dist/actions/lintlint.d.ts +31 -0
- package/dist/actions/lintlint.d.ts.map +1 -1
- package/dist/actions/node-lint.d.ts +7 -0
- package/dist/actions/node-lint.d.ts.map +1 -1
- package/dist/actions/package/compile/MonolithConfig.d.ts +23 -4
- package/dist/actions/package/compile/MonolithConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/PublintConfig.d.ts +4 -2
- package/dist/actions/package/compile/PublintConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/XyConfig.d.ts +18 -6
- package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/index.d.ts +1 -0
- package/dist/actions/package/compile/index.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithCompileEntries.d.ts +8 -6
- package/dist/actions/package/compile/monolithCompileEntries.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithCompileLayout.d.ts +2 -0
- package/dist/actions/package/compile/monolithCompileLayout.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithReexport.d.ts +45 -0
- package/dist/actions/package/compile/monolithReexport.d.ts.map +1 -0
- package/dist/actions/package/compile/packageCompileMonolith.d.ts.map +1 -1
- package/dist/actions/package/publintRules.d.ts +4 -1
- package/dist/actions/package/publintRules.d.ts.map +1 -1
- package/dist/actions/package-lint.d.ts.map +1 -1
- package/dist/actions/packman/lint.d.ts +14 -0
- package/dist/actions/packman/lint.d.ts.map +1 -1
- package/dist/actions/ruleCatalog.d.ts +4 -2
- package/dist/actions/ruleCatalog.d.ts.map +1 -1
- package/dist/actions/ruleRunner.d.ts +4 -1
- package/dist/actions/ruleRunner.d.ts.map +1 -1
- package/dist/actions/skills/lint.d.ts +13 -0
- package/dist/actions/skills/lint.d.ts.map +1 -1
- package/dist/bin/package/build.mjs +708 -138
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +214 -47
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +545 -104
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/copy-assets-cjs.mjs +214 -47
- package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
- package/dist/bin/package/copy-assets-esm.mjs +214 -47
- package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +387 -84
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +545 -104
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/sync-layout.mjs +57 -10
- package/dist/bin/package/sync-layout.mjs.map +1 -1
- package/dist/bin/skills.mjs +135 -91
- package/dist/bin/skills.mjs.map +1 -1
- package/dist/bin/source-map-explorer.mjs +7 -2
- package/dist/bin/source-map-explorer.mjs.map +1 -1
- package/dist/bin/xy.mjs +8001 -893
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/lib/index.d.ts +2 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/licenseCheck/checkLicenses.d.ts +23 -0
- package/dist/lib/licenseCheck/checkLicenses.d.ts.map +1 -0
- package/dist/lib/licenseCheck/collectProductionLicenses.d.ts +21 -0
- package/dist/lib/licenseCheck/collectProductionLicenses.d.ts.map +1 -0
- package/dist/lib/licenseCheck/index.d.ts +4 -0
- package/dist/lib/licenseCheck/index.d.ts.map +1 -0
- package/dist/lib/licenseCheck/readPackageLicense.d.ts +25 -0
- package/dist/lib/licenseCheck/readPackageLicense.d.ts.map +1 -0
- package/dist/lib/loadConfig.d.ts +1 -0
- package/dist/lib/loadConfig.d.ts.map +1 -1
- package/dist/lib/ruleCommandRegistry.d.ts +100 -0
- package/dist/lib/ruleCommandRegistry.d.ts.map +1 -0
- package/dist/xy/common/gitCommand.d.ts +3 -0
- package/dist/xy/common/gitCommand.d.ts.map +1 -0
- package/dist/xy/common/gitlintCommand.d.ts +2 -0
- package/dist/xy/common/gitlintCommand.d.ts.map +1 -1
- package/dist/xy/common/index.d.ts.map +1 -1
- package/dist/xy/common/licenseCommand.d.ts.map +1 -1
- package/dist/xy/deprecatedCommand.d.ts +2 -0
- package/dist/xy/deprecatedCommand.d.ts.map +1 -0
- package/dist/xy/lint/cycleCommand.d.ts.map +1 -1
- package/dist/xy/lint/index.d.ts.map +1 -1
- package/dist/xy/lint/lint/index.d.ts.map +1 -1
- package/dist/xy/lint/lint/runCommand.d.ts.map +1 -1
- package/dist/xy/lint/lintlintCommand.d.ts +2 -0
- package/dist/xy/lint/lintlintCommand.d.ts.map +1 -1
- package/dist/xy/lint/nodeCommand.d.ts +3 -0
- package/dist/xy/lint/nodeCommand.d.ts.map +1 -0
- package/dist/xy/lint/nodeLintCommand.d.ts +2 -0
- package/dist/xy/lint/nodeLintCommand.d.ts.map +1 -1
- package/dist/xy/lint/publintCommand.d.ts.map +1 -1
- package/dist/xy/lint/relintCommand.d.ts.map +1 -1
- package/dist/xy/lint/republintCommand.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -548,7 +548,7 @@ function Ut(n, t = {}) {
|
|
|
548
548
|
function es(n, t = {}) {
|
|
549
549
|
return new I$1(n, t).iterate();
|
|
550
550
|
}
|
|
551
|
-
var Gt, ce, ss, fe$1, ue$1, qt, de$1, pe$1, is, rs, ns, os$2, hs, as, ls, cs, fs$5, us, ds, at, Ss, lt, Es, we$1, ye$1, W, xs, be$1, vs, Ct, Cs, Ts, As, ks, Kt, Se$1, Ee$1, Q$1, tt, O$2, Rs, Os, Fs, Ds, Ms, Ns, _s, Ls, Ws, Ps, js, Is, zs, Bs, Us, $s, Gs, Hs, Ce$1, Te$1, Ae$1, xe$1, A$1, Vs, Ys, Xs, Js, N$1, Zs, ke$1, Qs, ti, ve$1, ei, D, si, Oe, Vt, Fe$1, At, Re$1, ii, q$1, De$1, Tt, ri, ft, Ne$1, oi, hi, ai, G, H$1, K$1, kt, ut, Rt, _e$1, Ot, Le$1, P
|
|
551
|
+
var Gt, ce, ss, fe$1, ue$1, qt, de$1, pe$1, is, rs, ns, os$2, hs, as, ls, cs, fs$5, us, ds, at, Ss, lt, Es, we$1, ye$1, W, xs, be$1, vs, Ct, Cs, Ts, As, ks, Kt, Se$1, Ee$1, Q$1, tt, O$2, Rs, Os, Fs, Ds, Ms, Ns, _s, Ls, Ws, Ps, js, Is, zs, Bs, Us, $s, Gs, Hs, Ce$1, Te$1, Ae$1, xe$1, A$1, Vs, Ys, Xs, Js, N$1, Zs, ke$1, Qs, ti, ve$1, ei, D, si, Oe, Vt, Fe$1, At, Re$1, ii, q$1, De$1, Tt, ri, ft, Ne$1, oi, hi, ai, G, H$1, K$1, kt, ut, Rt, _e$1, Ot, Le$1, P, et, v$1, dt, st, C$1, F, T, Yt, Ft, k, x$1, Xt, Jt, We$1, Zt, B, Qt, Dt, pt, Y$1, M, mt, li, ci, fi, ui, Mt, te$1, di, pi, V, wt, Ue$1, $e$1, Ri, Oi, L, Ge$1, He$1, U, qe$1, Ke$1, X$1, Ve$1, _$1, gt, se$1, je$1, yt, j, Nt, Lt, Ie, Fi, ie$1, ze$1, bt, Be$1, _t, Wt, ne$1, Ye$1, R$2, Pt, jt, It, it, rt, St, Xe$1, Di, Mi, Ni, nt, _i, ot, oe$1, he$1, ae$1, Et, Li, zt, xt, vt, Pi, I$1, le$1, ji, Ii, zi, Bi, Ui, Ze$1;
|
|
552
552
|
var init_index_min = __esmMin((() => {
|
|
553
553
|
Gt = (n, t, e) => {
|
|
554
554
|
let s = n instanceof RegExp ? ce(n, e) : n, i = t instanceof RegExp ? ce(t, e) : t, r = s !== null && i != null && ss(s, i, e);
|
|
@@ -559,10 +559,12 @@ var init_index_min = __esmMin((() => {
|
|
|
559
559
|
body: e.slice(r[0] + s.length, r[1]),
|
|
560
560
|
post: e.slice(r[1] + i.length)
|
|
561
561
|
};
|
|
562
|
-
}
|
|
562
|
+
};
|
|
563
|
+
ce = (n, t) => {
|
|
563
564
|
let e = t.match(n);
|
|
564
565
|
return e ? e[0] : null;
|
|
565
|
-
}
|
|
566
|
+
};
|
|
567
|
+
ss = (n, t, e) => {
|
|
566
568
|
let s, i, r, o, h, a = e.indexOf(n), l = e.indexOf(t, a + 1), u = a;
|
|
567
569
|
if (a >= 0 && l > 0) {
|
|
568
570
|
if (n === t) return [a, l];
|
|
@@ -578,7 +580,22 @@ var init_index_min = __esmMin((() => {
|
|
|
578
580
|
}
|
|
579
581
|
return h;
|
|
580
582
|
};
|
|
581
|
-
fe$1 = "\0SLASH" + Math.random() + "\0"
|
|
583
|
+
fe$1 = "\0SLASH" + Math.random() + "\0";
|
|
584
|
+
ue$1 = "\0OPEN" + Math.random() + "\0";
|
|
585
|
+
qt = "\0CLOSE" + Math.random() + "\0";
|
|
586
|
+
de$1 = "\0COMMA" + Math.random() + "\0";
|
|
587
|
+
pe$1 = "\0PERIOD" + Math.random() + "\0";
|
|
588
|
+
is = new RegExp(fe$1, "g");
|
|
589
|
+
rs = new RegExp(ue$1, "g");
|
|
590
|
+
ns = new RegExp(qt, "g");
|
|
591
|
+
os$2 = new RegExp(de$1, "g");
|
|
592
|
+
hs = new RegExp(pe$1, "g");
|
|
593
|
+
as = /\\\\/g;
|
|
594
|
+
ls = /\\{/g;
|
|
595
|
+
cs = /\\}/g;
|
|
596
|
+
fs$5 = /\\,/g;
|
|
597
|
+
us = /\\./g;
|
|
598
|
+
ds = 1e5;
|
|
582
599
|
at = (n) => {
|
|
583
600
|
if (typeof n != "string") throw new TypeError("invalid pattern");
|
|
584
601
|
if (n.length > 65536) throw new TypeError("pattern is too long");
|
|
@@ -602,7 +619,11 @@ var init_index_min = __esmMin((() => {
|
|
|
602
619
|
"[:upper:]": ["\\p{Lu}", !0],
|
|
603
620
|
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
|
|
604
621
|
"[:xdigit:]": ["A-Fa-f0-9", !1]
|
|
605
|
-
}
|
|
622
|
+
};
|
|
623
|
+
lt = (n) => n.replace(/[[\]\\-]/g, "\\$&");
|
|
624
|
+
Es = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
625
|
+
we$1 = (n) => n.join("");
|
|
626
|
+
ye$1 = (n, t) => {
|
|
606
627
|
let e = t;
|
|
607
628
|
if (n.charAt(e) !== "[") throw new Error("not in a brace expression");
|
|
608
629
|
let s = [], i = [], r = e + 1, o = !1, h = !1, a = !1, l = !1, u = e, c = "";
|
|
@@ -679,7 +700,18 @@ var init_index_min = __esmMin((() => {
|
|
|
679
700
|
"+",
|
|
680
701
|
"*",
|
|
681
702
|
"@"
|
|
682
|
-
])
|
|
703
|
+
]);
|
|
704
|
+
be$1 = (n) => xs.has(n);
|
|
705
|
+
vs = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
706
|
+
Ct = "(?!\\.)";
|
|
707
|
+
Cs = /* @__PURE__ */ new Set(["[", "."]);
|
|
708
|
+
Ts = /* @__PURE__ */ new Set(["..", "."]);
|
|
709
|
+
As = /* @__PURE__ */ new Set("().*{}+?[]^$\\!");
|
|
710
|
+
ks = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
711
|
+
Kt = "[^/]";
|
|
712
|
+
Se$1 = Kt + "*?";
|
|
713
|
+
Ee$1 = Kt + "+?";
|
|
714
|
+
Q$1 = class n {
|
|
683
715
|
type;
|
|
684
716
|
#t;
|
|
685
717
|
#s;
|
|
@@ -920,34 +952,60 @@ var init_index_min = __esmMin((() => {
|
|
|
920
952
|
}
|
|
921
953
|
};
|
|
922
954
|
tt = (n, { windowsPathsNoEscape: t = !1, magicalBraces: e = !1 } = {}) => e ? t ? n.replace(/[?*()[\]{}]/g, "[$&]") : n.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n.replace(/[?*()[\]]/g, "[$&]") : n.replace(/[?*()[\]\\]/g, "\\$&");
|
|
923
|
-
O$2 = (n, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new D(t, e).match(n))
|
|
955
|
+
O$2 = (n, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new D(t, e).match(n));
|
|
956
|
+
Rs = /^\*+([^+@!?\*\[\(]*)$/;
|
|
957
|
+
Os = (n) => (t) => !t.startsWith(".") && t.endsWith(n);
|
|
958
|
+
Fs = (n) => (t) => t.endsWith(n);
|
|
959
|
+
Ds = (n) => (n = n.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(n));
|
|
960
|
+
Ms = (n) => (n = n.toLowerCase(), (t) => t.toLowerCase().endsWith(n));
|
|
961
|
+
Ns = /^\*+\.\*+$/;
|
|
962
|
+
_s = (n) => !n.startsWith(".") && n.includes(".");
|
|
963
|
+
Ls = (n) => n !== "." && n !== ".." && n.includes(".");
|
|
964
|
+
Ws = /^\.\*+$/;
|
|
965
|
+
Ps = (n) => n !== "." && n !== ".." && n.startsWith(".");
|
|
966
|
+
js = /^\*+$/;
|
|
967
|
+
Is = (n) => n.length !== 0 && !n.startsWith(".");
|
|
968
|
+
zs = (n) => n.length !== 0 && n !== "." && n !== "..";
|
|
969
|
+
Bs = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
970
|
+
Us = ([n, t = ""]) => {
|
|
924
971
|
let e = Ce$1([n]);
|
|
925
972
|
return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
|
|
926
|
-
}
|
|
973
|
+
};
|
|
974
|
+
$s = ([n, t = ""]) => {
|
|
927
975
|
let e = Te$1([n]);
|
|
928
976
|
return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
|
|
929
|
-
}
|
|
977
|
+
};
|
|
978
|
+
Gs = ([n, t = ""]) => {
|
|
930
979
|
let e = Te$1([n]);
|
|
931
980
|
return t ? (s) => e(s) && s.endsWith(t) : e;
|
|
932
|
-
}
|
|
981
|
+
};
|
|
982
|
+
Hs = ([n, t = ""]) => {
|
|
933
983
|
let e = Ce$1([n]);
|
|
934
984
|
return t ? (s) => e(s) && s.endsWith(t) : e;
|
|
935
|
-
}
|
|
985
|
+
};
|
|
986
|
+
Ce$1 = ([n]) => {
|
|
936
987
|
let t = n.length;
|
|
937
988
|
return (e) => e.length === t && !e.startsWith(".");
|
|
938
|
-
}
|
|
989
|
+
};
|
|
990
|
+
Te$1 = ([n]) => {
|
|
939
991
|
let t = n.length;
|
|
940
992
|
return (e) => e.length === t && e !== "." && e !== "..";
|
|
941
|
-
}
|
|
993
|
+
};
|
|
994
|
+
Ae$1 = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
995
|
+
xe$1 = {
|
|
942
996
|
win32: { sep: "\\" },
|
|
943
997
|
posix: { sep: "/" }
|
|
944
998
|
};
|
|
945
999
|
O$2.sep = Ae$1 === "win32" ? xe$1.win32.sep : xe$1.posix.sep;
|
|
946
1000
|
A$1 = Symbol("globstar **");
|
|
947
1001
|
O$2.GLOBSTAR = A$1;
|
|
948
|
-
Vs = "[^/]*?"
|
|
1002
|
+
Vs = "[^/]*?";
|
|
1003
|
+
Ys = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1004
|
+
Xs = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1005
|
+
Js = (n, t = {}) => (e) => O$2(e, n, t);
|
|
949
1006
|
O$2.filter = Js;
|
|
950
|
-
N$1 = (n, t = {}) => Object.assign({}, n, t)
|
|
1007
|
+
N$1 = (n, t = {}) => Object.assign({}, n, t);
|
|
1008
|
+
Zs = (n) => {
|
|
951
1009
|
if (!n || typeof n != "object" || !Object.keys(n).length) return O$2;
|
|
952
1010
|
let t = O$2;
|
|
953
1011
|
return Object.assign((s, i, r = {}) => t(s, i, N$1(n, r)), {
|
|
@@ -988,7 +1046,9 @@ var init_index_min = __esmMin((() => {
|
|
|
988
1046
|
return n = n.filter((i) => s.match(i)), s.options.nonull && !n.length && n.push(t), n;
|
|
989
1047
|
};
|
|
990
1048
|
O$2.match = ti;
|
|
991
|
-
ve$1 = /[?*]|[+@!]\(.*?\)|\[|\]
|
|
1049
|
+
ve$1 = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1050
|
+
ei = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1051
|
+
D = class {
|
|
992
1052
|
options;
|
|
993
1053
|
set;
|
|
994
1054
|
pattern;
|
|
@@ -1272,9 +1332,14 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1272
1332
|
O$2.Minimatch = D;
|
|
1273
1333
|
O$2.escape = tt;
|
|
1274
1334
|
O$2.unescape = W;
|
|
1275
|
-
si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date
|
|
1335
|
+
si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
|
|
1336
|
+
Oe = /* @__PURE__ */ new Set();
|
|
1337
|
+
Vt = typeof process == "object" && process ? process : {};
|
|
1338
|
+
Fe$1 = (n, t, e, s) => {
|
|
1276
1339
|
typeof Vt.emitWarning == "function" ? Vt.emitWarning(n, t, e, s) : console.error(`[${e}] ${t}: ${n}`);
|
|
1277
|
-
}
|
|
1340
|
+
};
|
|
1341
|
+
At = globalThis.AbortController;
|
|
1342
|
+
Re$1 = globalThis.AbortSignal;
|
|
1278
1343
|
if (typeof At > "u") {
|
|
1279
1344
|
Re$1 = class {
|
|
1280
1345
|
onabort;
|
|
@@ -1302,11 +1367,14 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1302
1367
|
};
|
|
1303
1368
|
}
|
|
1304
1369
|
ii = (n) => !Oe.has(n);
|
|
1305
|
-
q$1 = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n)
|
|
1370
|
+
q$1 = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
|
|
1371
|
+
De$1 = (n) => q$1(n) ? n <= Math.pow(2, 8) ? Uint8Array : n <= Math.pow(2, 16) ? Uint16Array : n <= Math.pow(2, 32) ? Uint32Array : n <= Number.MAX_SAFE_INTEGER ? Tt : null : null;
|
|
1372
|
+
Tt = class extends Array {
|
|
1306
1373
|
constructor(n) {
|
|
1307
1374
|
super(n), this.fill(0);
|
|
1308
1375
|
}
|
|
1309
|
-
}
|
|
1376
|
+
};
|
|
1377
|
+
ri = class ct {
|
|
1310
1378
|
heap;
|
|
1311
1379
|
length;
|
|
1312
1380
|
static #t = !1;
|
|
@@ -1327,7 +1395,8 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1327
1395
|
pop() {
|
|
1328
1396
|
return this.heap[--this.length];
|
|
1329
1397
|
}
|
|
1330
|
-
}
|
|
1398
|
+
};
|
|
1399
|
+
ft = class Me {
|
|
1331
1400
|
#t;
|
|
1332
1401
|
#s;
|
|
1333
1402
|
#n;
|
|
@@ -1870,7 +1939,47 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1870
1939
|
Ne$1 = typeof process == "object" && process ? process : {
|
|
1871
1940
|
stdout: null,
|
|
1872
1941
|
stderr: null
|
|
1873
|
-
}
|
|
1942
|
+
};
|
|
1943
|
+
oi = (n) => !!n && typeof n == "object" && (n instanceof V || n instanceof Pe || hi(n) || ai(n));
|
|
1944
|
+
hi = (n) => !!n && typeof n == "object" && n instanceof EventEmitter && typeof n.pipe == "function" && n.pipe !== Pe.Writable.prototype.pipe;
|
|
1945
|
+
ai = (n) => !!n && typeof n == "object" && n instanceof EventEmitter && typeof n.write == "function" && typeof n.end == "function";
|
|
1946
|
+
G = Symbol("EOF");
|
|
1947
|
+
H$1 = Symbol("maybeEmitEnd");
|
|
1948
|
+
K$1 = Symbol("emittedEnd");
|
|
1949
|
+
kt = Symbol("emittingEnd");
|
|
1950
|
+
ut = Symbol("emittedError");
|
|
1951
|
+
Rt = Symbol("closed");
|
|
1952
|
+
_e$1 = Symbol("read");
|
|
1953
|
+
Ot = Symbol("flush");
|
|
1954
|
+
Le$1 = Symbol("flushChunk");
|
|
1955
|
+
P = Symbol("encoding");
|
|
1956
|
+
et = Symbol("decoder");
|
|
1957
|
+
v$1 = Symbol("flowing");
|
|
1958
|
+
dt = Symbol("paused");
|
|
1959
|
+
st = Symbol("resume");
|
|
1960
|
+
C$1 = Symbol("buffer");
|
|
1961
|
+
F = Symbol("pipes");
|
|
1962
|
+
T = Symbol("bufferLength");
|
|
1963
|
+
Yt = Symbol("bufferPush");
|
|
1964
|
+
Ft = Symbol("bufferShift");
|
|
1965
|
+
k = Symbol("objectMode");
|
|
1966
|
+
x$1 = Symbol("destroyed");
|
|
1967
|
+
Xt = Symbol("error");
|
|
1968
|
+
Jt = Symbol("emitData");
|
|
1969
|
+
We$1 = Symbol("emitEnd");
|
|
1970
|
+
Zt = Symbol("emitEnd2");
|
|
1971
|
+
B = Symbol("async");
|
|
1972
|
+
Qt = Symbol("abort");
|
|
1973
|
+
Dt = Symbol("aborted");
|
|
1974
|
+
pt = Symbol("signal");
|
|
1975
|
+
Y$1 = Symbol("dataListeners");
|
|
1976
|
+
M = Symbol("discarded");
|
|
1977
|
+
mt = (n) => Promise.resolve().then(n);
|
|
1978
|
+
li = (n) => n();
|
|
1979
|
+
ci = (n) => n === "end" || n === "finish" || n === "prefinish";
|
|
1980
|
+
fi = (n) => n instanceof ArrayBuffer || !!n && typeof n == "object" && n.constructor && n.constructor.name === "ArrayBuffer" && n.byteLength >= 0;
|
|
1981
|
+
ui = (n) => !Buffer.isBuffer(n) && ArrayBuffer.isView(n);
|
|
1982
|
+
Mt = class {
|
|
1874
1983
|
src;
|
|
1875
1984
|
dest;
|
|
1876
1985
|
opts;
|
|
@@ -1885,20 +1994,24 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1885
1994
|
end() {
|
|
1886
1995
|
this.unpipe(), this.opts.end && this.dest.end();
|
|
1887
1996
|
}
|
|
1888
|
-
}
|
|
1997
|
+
};
|
|
1998
|
+
te$1 = class extends Mt {
|
|
1889
1999
|
unpipe() {
|
|
1890
2000
|
this.src.removeListener("error", this.proxyErrors), super.unpipe();
|
|
1891
2001
|
}
|
|
1892
2002
|
constructor(t, e, s) {
|
|
1893
2003
|
super(t, e, s), this.proxyErrors = (i) => this.dest.emit("error", i), t.on("error", this.proxyErrors);
|
|
1894
2004
|
}
|
|
1895
|
-
}
|
|
2005
|
+
};
|
|
2006
|
+
di = (n) => !!n.objectMode;
|
|
2007
|
+
pi = (n) => !n.objectMode && !!n.encoding && n.encoding !== "buffer";
|
|
2008
|
+
V = class extends EventEmitter {
|
|
1896
2009
|
[v$1] = !1;
|
|
1897
2010
|
[dt] = !1;
|
|
1898
2011
|
[F] = [];
|
|
1899
2012
|
[C$1] = [];
|
|
1900
2013
|
[k];
|
|
1901
|
-
[P
|
|
2014
|
+
[P];
|
|
1902
2015
|
[B];
|
|
1903
2016
|
[et];
|
|
1904
2017
|
[G] = !1;
|
|
@@ -1906,7 +2019,7 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1906
2019
|
[kt] = !1;
|
|
1907
2020
|
[Rt] = !1;
|
|
1908
2021
|
[ut] = null;
|
|
1909
|
-
[T
|
|
2022
|
+
[T] = 0;
|
|
1910
2023
|
[x$1] = !1;
|
|
1911
2024
|
[pt];
|
|
1912
2025
|
[Dt] = !1;
|
|
@@ -1917,15 +2030,15 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1917
2030
|
constructor(...t) {
|
|
1918
2031
|
let e = t[0] || {};
|
|
1919
2032
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
1920
|
-
di(e) ? (this[k] = !0, this[P
|
|
2033
|
+
di(e) ? (this[k] = !0, this[P] = null) : pi(e) ? (this[P] = e.encoding, this[k] = !1) : (this[k] = !1, this[P] = null), this[B] = !!e.async, this[et] = this[P] ? new StringDecoder(this[P]) : null, e && e.debugExposeBuffer === !0 && Object.defineProperty(this, "buffer", { get: () => this[C$1] }), e && e.debugExposePipes === !0 && Object.defineProperty(this, "pipes", { get: () => this[F] });
|
|
1921
2034
|
let { signal: s } = e;
|
|
1922
2035
|
s && (this[pt] = s, s.aborted ? this[Qt]() : s.addEventListener("abort", () => this[Qt]()));
|
|
1923
2036
|
}
|
|
1924
2037
|
get bufferLength() {
|
|
1925
|
-
return this[T
|
|
2038
|
+
return this[T];
|
|
1926
2039
|
}
|
|
1927
2040
|
get encoding() {
|
|
1928
|
-
return this[P
|
|
2041
|
+
return this[P];
|
|
1929
2042
|
}
|
|
1930
2043
|
set encoding(t) {
|
|
1931
2044
|
throw new Error("Encoding must be set at instantiation time");
|
|
@@ -1963,12 +2076,12 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1963
2076
|
else if (fi(t)) t = Buffer.from(t);
|
|
1964
2077
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
1965
2078
|
}
|
|
1966
|
-
return this[k] ? (this[v$1] && this[T
|
|
2079
|
+
return this[k] ? (this[v$1] && this[T] !== 0 && this[Ot](!0), this[v$1] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v$1]) : t.length ? (typeof t == "string" && !(e === this[P] && !this[et]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[P] && (t = this[et].write(t)), this[v$1] && this[T] !== 0 && this[Ot](!0), this[v$1] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v$1]) : (this[T] !== 0 && this.emit("readable"), s && i(s), this[v$1]);
|
|
1967
2080
|
}
|
|
1968
2081
|
read(t) {
|
|
1969
2082
|
if (this[x$1]) return null;
|
|
1970
|
-
if (this[M] = !1, this[T
|
|
1971
|
-
this[k] && (t = null), this[C$1].length > 1 && !this[k] && (this[C$1] = [this[P
|
|
2083
|
+
if (this[M] = !1, this[T] === 0 || t === 0 || t && t > this[T]) return this[H$1](), null;
|
|
2084
|
+
this[k] && (t = null), this[C$1].length > 1 && !this[k] && (this[C$1] = [this[P] ? this[C$1].join("") : Buffer.concat(this[C$1], this[T])]);
|
|
1972
2085
|
let e = this[_e$1](t || null, this[C$1][0]);
|
|
1973
2086
|
return this[H$1](), e;
|
|
1974
2087
|
}
|
|
@@ -1976,7 +2089,7 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1976
2089
|
if (this[k]) this[Ft]();
|
|
1977
2090
|
else {
|
|
1978
2091
|
let s = e;
|
|
1979
|
-
t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C$1][0] = s.slice(t), e = s.slice(0, t), this[T
|
|
2092
|
+
t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C$1][0] = s.slice(t), e = s.slice(0, t), this[T] -= t) : (this[C$1][0] = s.subarray(t), e = s.subarray(0, t), this[T] -= t);
|
|
1980
2093
|
}
|
|
1981
2094
|
return this.emit("data", e), !this[C$1].length && !this[G] && this.emit("drain"), e;
|
|
1982
2095
|
}
|
|
@@ -2002,10 +2115,10 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
2002
2115
|
return this[dt];
|
|
2003
2116
|
}
|
|
2004
2117
|
[Yt](t) {
|
|
2005
|
-
this[k] ? this[T
|
|
2118
|
+
this[k] ? this[T] += 1 : this[T] += t.length, this[C$1].push(t);
|
|
2006
2119
|
}
|
|
2007
2120
|
[Ft]() {
|
|
2008
|
-
return this[k] ? this[T
|
|
2121
|
+
return this[k] ? this[T] -= 1 : this[T] -= this[C$1][0].length, this[C$1].shift();
|
|
2009
2122
|
}
|
|
2010
2123
|
[Ot](t = !1) {
|
|
2011
2124
|
do ;
|
|
@@ -2031,7 +2144,7 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2031
2144
|
on(t, e) {
|
|
2032
2145
|
let s = super.on(t, e);
|
|
2033
2146
|
if (t === "data") this[M] = !1, this[Y$1]++, !this[F].length && !this[v$1] && this[st]();
|
|
2034
|
-
else if (t === "readable" && this[T
|
|
2147
|
+
else if (t === "readable" && this[T] !== 0) super.emit("readable");
|
|
2035
2148
|
else if (ci(t) && this[K$1]) super.emit(t), this.removeAllListeners(t);
|
|
2036
2149
|
else if (t === "error" && this[ut]) {
|
|
2037
2150
|
let i = e;
|
|
@@ -2110,7 +2223,7 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2110
2223
|
async concat() {
|
|
2111
2224
|
if (this[k]) throw new Error("cannot concat in objectMode");
|
|
2112
2225
|
let t = await this.collect();
|
|
2113
|
-
return this[P
|
|
2226
|
+
return this[P] ? t.join("") : Buffer.concat(t, t.dataLength);
|
|
2114
2227
|
}
|
|
2115
2228
|
async promise() {
|
|
2116
2229
|
return new Promise((t, e) => {
|
|
@@ -2182,14 +2295,15 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2182
2295
|
}
|
|
2183
2296
|
destroy(t) {
|
|
2184
2297
|
if (this[x$1]) return t ? this.emit("error", t) : this.emit(x$1), this;
|
|
2185
|
-
this[x$1] = !0, this[M] = !0, this[C$1].length = 0, this[T
|
|
2298
|
+
this[x$1] = !0, this[M] = !0, this[C$1].length = 0, this[T] = 0;
|
|
2186
2299
|
let e = this;
|
|
2187
2300
|
return typeof e.close == "function" && !this[Rt] && e.close(), t ? this.emit("error", t) : this.emit(x$1), this;
|
|
2188
2301
|
}
|
|
2189
2302
|
static get isStream() {
|
|
2190
2303
|
return oi;
|
|
2191
2304
|
}
|
|
2192
|
-
}
|
|
2305
|
+
};
|
|
2306
|
+
wt = {
|
|
2193
2307
|
lstatSync,
|
|
2194
2308
|
readdir,
|
|
2195
2309
|
readdirSync,
|
|
@@ -2201,35 +2315,66 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2201
2315
|
readlink,
|
|
2202
2316
|
realpath
|
|
2203
2317
|
}
|
|
2204
|
-
}
|
|
2318
|
+
};
|
|
2319
|
+
Ue$1 = (n) => !n || n === wt || n === xi ? wt : {
|
|
2205
2320
|
...wt,
|
|
2206
2321
|
...n,
|
|
2207
2322
|
promises: {
|
|
2208
2323
|
...wt.promises,
|
|
2209
2324
|
...n.promises || {}
|
|
2210
2325
|
}
|
|
2211
|
-
}
|
|
2326
|
+
};
|
|
2327
|
+
$e$1 = /^\\\\\?\\([a-z]:)\\?$/i;
|
|
2328
|
+
Ri = (n) => n.replace(/\//g, "\\").replace($e$1, "$1\\");
|
|
2329
|
+
Oi = /[\\\/]/;
|
|
2330
|
+
L = 0;
|
|
2331
|
+
Ge$1 = 1;
|
|
2332
|
+
He$1 = 2;
|
|
2333
|
+
U = 4;
|
|
2334
|
+
qe$1 = 6;
|
|
2335
|
+
Ke$1 = 8;
|
|
2336
|
+
X$1 = 10;
|
|
2337
|
+
Ve$1 = 12;
|
|
2338
|
+
_$1 = 15;
|
|
2339
|
+
gt = ~_$1;
|
|
2340
|
+
se$1 = 16;
|
|
2341
|
+
je$1 = 32;
|
|
2342
|
+
yt = 64;
|
|
2343
|
+
j = 128;
|
|
2344
|
+
Nt = 256;
|
|
2345
|
+
Lt = 512;
|
|
2346
|
+
Ie = yt | j | Lt;
|
|
2347
|
+
Fi = 1023;
|
|
2348
|
+
ie$1 = (n) => n.isFile() ? Ke$1 : n.isDirectory() ? U : n.isSymbolicLink() ? X$1 : n.isCharacterDevice() ? He$1 : n.isBlockDevice() ? qe$1 : n.isSocket() ? Ve$1 : n.isFIFO() ? Ge$1 : L;
|
|
2349
|
+
ze$1 = new ft({ max: 2 ** 12 });
|
|
2350
|
+
bt = (n) => {
|
|
2212
2351
|
let t = ze$1.get(n);
|
|
2213
2352
|
if (t) return t;
|
|
2214
2353
|
let e = n.normalize("NFKD");
|
|
2215
2354
|
return ze$1.set(n, e), e;
|
|
2216
|
-
}
|
|
2355
|
+
};
|
|
2356
|
+
Be$1 = new ft({ max: 2 ** 12 });
|
|
2357
|
+
_t = (n) => {
|
|
2217
2358
|
let t = Be$1.get(n);
|
|
2218
2359
|
if (t) return t;
|
|
2219
2360
|
let e = bt(n.toLowerCase());
|
|
2220
2361
|
return Be$1.set(n, e), e;
|
|
2221
|
-
}
|
|
2362
|
+
};
|
|
2363
|
+
Wt = class extends ft {
|
|
2222
2364
|
constructor() {
|
|
2223
2365
|
super({ max: 256 });
|
|
2224
2366
|
}
|
|
2225
|
-
}
|
|
2367
|
+
};
|
|
2368
|
+
ne$1 = class extends ft {
|
|
2226
2369
|
constructor(t = 16 * 1024) {
|
|
2227
2370
|
super({
|
|
2228
2371
|
maxSize: t,
|
|
2229
2372
|
sizeCalculation: (e) => e.length + 1
|
|
2230
2373
|
});
|
|
2231
2374
|
}
|
|
2232
|
-
}
|
|
2375
|
+
};
|
|
2376
|
+
Ye$1 = Symbol("PathScurry setAsCwd");
|
|
2377
|
+
R$2 = class {
|
|
2233
2378
|
name;
|
|
2234
2379
|
root;
|
|
2235
2380
|
roots;
|
|
@@ -2642,7 +2787,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2642
2787
|
for (; i && i.parent;) e.add(i), i.#x = s.join(this.sep), i.#A = s.join("/"), i = i.parent, s.push("..");
|
|
2643
2788
|
for (i = t; i && i.parent && !e.has(i);) i.#x = void 0, i.#A = void 0, i = i.parent;
|
|
2644
2789
|
}
|
|
2645
|
-
}
|
|
2790
|
+
};
|
|
2791
|
+
Pt = class n extends R$2 {
|
|
2646
2792
|
sep = "\\";
|
|
2647
2793
|
splitSep = Oi;
|
|
2648
2794
|
constructor(t, e = L, s, i, r, o, h) {
|
|
@@ -2662,7 +2808,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2662
2808
|
sameRoot(t, e = this.root.name) {
|
|
2663
2809
|
return t = t.toUpperCase().replace(/\//g, "\\").replace($e$1, "$1\\"), t === e;
|
|
2664
2810
|
}
|
|
2665
|
-
}
|
|
2811
|
+
};
|
|
2812
|
+
jt = class n extends R$2 {
|
|
2666
2813
|
splitSep = "/";
|
|
2667
2814
|
sep = "/";
|
|
2668
2815
|
constructor(t, e = L, s, i, r, o, h) {
|
|
@@ -2677,7 +2824,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2677
2824
|
newChild(t, e = L, s = {}) {
|
|
2678
2825
|
return new n(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
|
|
2679
2826
|
}
|
|
2680
|
-
}
|
|
2827
|
+
};
|
|
2828
|
+
It = class {
|
|
2681
2829
|
root;
|
|
2682
2830
|
rootPath;
|
|
2683
2831
|
roots;
|
|
@@ -2921,7 +3069,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2921
3069
|
let e = this.cwd;
|
|
2922
3070
|
this.cwd = typeof t == "string" ? this.cwd.resolve(t) : t, this.cwd[Ye$1](e);
|
|
2923
3071
|
}
|
|
2924
|
-
}
|
|
3072
|
+
};
|
|
3073
|
+
it = class extends It {
|
|
2925
3074
|
sep = "\\";
|
|
2926
3075
|
constructor(t = process.cwd(), e = {}) {
|
|
2927
3076
|
let { nocase: s = !0 } = e;
|
|
@@ -2940,7 +3089,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2940
3089
|
isAbsolute(t) {
|
|
2941
3090
|
return t.startsWith("/") || t.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(t);
|
|
2942
3091
|
}
|
|
2943
|
-
}
|
|
3092
|
+
};
|
|
3093
|
+
rt = class extends It {
|
|
2944
3094
|
sep = "/";
|
|
2945
3095
|
constructor(t = process.cwd(), e = {}) {
|
|
2946
3096
|
let { nocase: s = !1 } = e;
|
|
@@ -2958,7 +3108,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2958
3108
|
isAbsolute(t) {
|
|
2959
3109
|
return t.startsWith("/");
|
|
2960
3110
|
}
|
|
2961
|
-
}
|
|
3111
|
+
};
|
|
3112
|
+
St = class extends rt {
|
|
2962
3113
|
constructor(t = process.cwd(), e = {}) {
|
|
2963
3114
|
let { nocase: s = !0 } = e;
|
|
2964
3115
|
super(t, {
|
|
@@ -2969,7 +3120,10 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2969
3120
|
};
|
|
2970
3121
|
process.platform;
|
|
2971
3122
|
Xe$1 = process.platform === "win32" ? it : process.platform === "darwin" ? St : rt;
|
|
2972
|
-
Di = (n) => n.length >= 1
|
|
3123
|
+
Di = (n) => n.length >= 1;
|
|
3124
|
+
Mi = (n) => n.length >= 1;
|
|
3125
|
+
Ni = Symbol.for("nodejs.util.inspect.custom");
|
|
3126
|
+
nt = class n {
|
|
2973
3127
|
#t;
|
|
2974
3128
|
#s;
|
|
2975
3129
|
#n;
|
|
@@ -3059,7 +3213,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
3059
3213
|
return this.#n === 0 || !this.isGlobstar() || !this.#u ? !1 : (this.#u = !1, !0);
|
|
3060
3214
|
}
|
|
3061
3215
|
};
|
|
3062
|
-
_i = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux"
|
|
3216
|
+
_i = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
|
|
3217
|
+
ot = class {
|
|
3063
3218
|
relative;
|
|
3064
3219
|
relativeChildren;
|
|
3065
3220
|
absolute;
|
|
@@ -3118,7 +3273,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
3118
3273
|
let s = t.fullpath(), i = this.store.get(s);
|
|
3119
3274
|
i ? i.add(e.globString()) : this.store.set(s, /* @__PURE__ */ new Set([e.globString()]));
|
|
3120
3275
|
}
|
|
3121
|
-
}
|
|
3276
|
+
};
|
|
3277
|
+
he$1 = class {
|
|
3122
3278
|
store = /* @__PURE__ */ new Map();
|
|
3123
3279
|
add(t, e, s) {
|
|
3124
3280
|
let i = (e ? 2 : 0) | (s ? 1 : 0), r = this.store.get(t);
|
|
@@ -3131,7 +3287,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
3131
3287
|
!!(e & 1)
|
|
3132
3288
|
]);
|
|
3133
3289
|
}
|
|
3134
|
-
}
|
|
3290
|
+
};
|
|
3291
|
+
ae$1 = class {
|
|
3135
3292
|
store = /* @__PURE__ */ new Map();
|
|
3136
3293
|
add(t, e) {
|
|
3137
3294
|
if (!t.canReaddir()) return;
|
|
@@ -3149,7 +3306,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
3149
3306
|
keys() {
|
|
3150
3307
|
return [...this.store.keys()].filter((t) => t.canReaddir());
|
|
3151
3308
|
}
|
|
3152
|
-
}
|
|
3309
|
+
};
|
|
3310
|
+
Et = class n {
|
|
3153
3311
|
hasWalkedCache;
|
|
3154
3312
|
matches = new he$1();
|
|
3155
3313
|
subwalks = new ae$1();
|
|
@@ -3229,7 +3387,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
3229
3387
|
t.isNamed(e) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, !1));
|
|
3230
3388
|
}
|
|
3231
3389
|
};
|
|
3232
|
-
Li = (n, t) => typeof n == "string" ? new ot([n], t) : Array.isArray(n) ? new ot(n, t) : n
|
|
3390
|
+
Li = (n, t) => typeof n == "string" ? new ot([n], t) : Array.isArray(n) ? new ot(n, t) : n;
|
|
3391
|
+
zt = class {
|
|
3233
3392
|
path;
|
|
3234
3393
|
patterns;
|
|
3235
3394
|
opts;
|
|
@@ -3385,7 +3544,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
3385
3544
|
for (let [h, a] of s.subwalks.entries()) r++, this.walkCB2Sync(h, a, s.child(), o);
|
|
3386
3545
|
o();
|
|
3387
3546
|
}
|
|
3388
|
-
}
|
|
3547
|
+
};
|
|
3548
|
+
xt = class extends zt {
|
|
3389
3549
|
matches = /* @__PURE__ */ new Set();
|
|
3390
3550
|
constructor(t, e, s) {
|
|
3391
3551
|
super(t, e, s);
|
|
@@ -3407,7 +3567,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
3407
3567
|
if (this.signal?.aborted) throw this.signal.reason;
|
|
3408
3568
|
}), this.matches;
|
|
3409
3569
|
}
|
|
3410
|
-
}
|
|
3570
|
+
};
|
|
3571
|
+
vt = class extends zt {
|
|
3411
3572
|
results;
|
|
3412
3573
|
constructor(t, e, s) {
|
|
3413
3574
|
super(t, e, s), this.results = new V({
|
|
@@ -3428,7 +3589,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
3428
3589
|
return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
|
|
3429
3590
|
}
|
|
3430
3591
|
};
|
|
3431
|
-
Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux"
|
|
3592
|
+
Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
|
|
3593
|
+
I$1 = class {
|
|
3432
3594
|
absolute;
|
|
3433
3595
|
cwd;
|
|
3434
3596
|
root;
|
|
@@ -3552,10 +3714,15 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
3552
3714
|
for (let e of n) if (new D(e, t).hasMagic()) return !0;
|
|
3553
3715
|
return !1;
|
|
3554
3716
|
};
|
|
3555
|
-
ji = Bt
|
|
3717
|
+
ji = Bt;
|
|
3718
|
+
Ii = Object.assign(Qe$1, { sync: Bt });
|
|
3719
|
+
zi = Ut;
|
|
3720
|
+
Bi = Object.assign(es, { sync: Ut });
|
|
3721
|
+
Ui = Object.assign(ts$1, {
|
|
3556
3722
|
stream: Bt,
|
|
3557
3723
|
iterate: Ut
|
|
3558
|
-
})
|
|
3724
|
+
});
|
|
3725
|
+
Ze$1 = Object.assign(Je$1, {
|
|
3559
3726
|
glob: Je$1,
|
|
3560
3727
|
globSync: ts$1,
|
|
3561
3728
|
sync: Ui,
|
|
@@ -4438,7 +4605,9 @@ var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
4438
4605
|
//#endregion
|
|
4439
4606
|
//#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
|
|
4440
4607
|
var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4441
|
-
let p = process || {}
|
|
4608
|
+
let p = process || {};
|
|
4609
|
+
let argv = p.argv || [];
|
|
4610
|
+
let env = p.env || {};
|
|
4442
4611
|
let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
|
|
4443
4612
|
let formatter = (open, close, replace = open) => (input) => {
|
|
4444
4613
|
let string = "" + input, index = string.indexOf(close, open.length);
|
|
@@ -7608,7 +7777,8 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7608
7777
|
} else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");
|
|
7609
7778
|
return "\\" + handle + common.repeat("0", length - string.length) + string;
|
|
7610
7779
|
}
|
|
7611
|
-
var QUOTING_TYPE_SINGLE = 1
|
|
7780
|
+
var QUOTING_TYPE_SINGLE = 1;
|
|
7781
|
+
var QUOTING_TYPE_DOUBLE = 2;
|
|
7612
7782
|
function State(options) {
|
|
7613
7783
|
this.schema = options["schema"] || DEFAULT_SCHEMA;
|
|
7614
7784
|
this.indent = Math.max(1, options["indent"] || 2);
|
|
@@ -7689,7 +7859,11 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7689
7859
|
function needIndentIndicator(string) {
|
|
7690
7860
|
return /^\n* /.test(string);
|
|
7691
7861
|
}
|
|
7692
|
-
var STYLE_PLAIN = 1
|
|
7862
|
+
var STYLE_PLAIN = 1;
|
|
7863
|
+
var STYLE_SINGLE = 2;
|
|
7864
|
+
var STYLE_LITERAL = 3;
|
|
7865
|
+
var STYLE_FOLDED = 4;
|
|
7866
|
+
var STYLE_DOUBLE = 5;
|
|
7693
7867
|
function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
|
|
7694
7868
|
var i;
|
|
7695
7869
|
var char = 0;
|
|
@@ -10626,7 +10800,17 @@ const customEntryOutputName = (entry) => {
|
|
|
10626
10800
|
const withoutExtension = PATH.posix.join(parsed.dir, parsed.name);
|
|
10627
10801
|
const segments = withoutExtension.split("/");
|
|
10628
10802
|
return segments.length > 1 && platformSourceSegments.has(segments[0]) ? segments.slice(1).join("/") : withoutExtension;
|
|
10629
|
-
}
|
|
10803
|
+
};
|
|
10804
|
+
//#endregion
|
|
10805
|
+
//#region ../../node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.mjs
|
|
10806
|
+
const A = (r) => r !== null && typeof r == "object";
|
|
10807
|
+
const a = (r, t) => Object.assign(/* @__PURE__ */ new Error(`[${r}]: ${t}`), { code: r });
|
|
10808
|
+
const _ = "ERR_INVALID_PACKAGE_CONFIG";
|
|
10809
|
+
const E$1 = "ERR_INVALID_PACKAGE_TARGET";
|
|
10810
|
+
const I = "ERR_PACKAGE_PATH_NOT_EXPORTED";
|
|
10811
|
+
const R$1 = /^\d+$/;
|
|
10812
|
+
const O$1 = /^(\.{1,2}|node_modules)$/i;
|
|
10813
|
+
const w = /\/|\\/;
|
|
10630
10814
|
var h$1 = ((r) => (r.Export = "exports", r.Import = "imports", r))(h$1 || {});
|
|
10631
10815
|
const f = (r, t, e, o, c) => {
|
|
10632
10816
|
if (t == null) return [];
|
|
@@ -10644,7 +10828,9 @@ const f = (r, t, e, o, c) => {
|
|
|
10644
10828
|
return [];
|
|
10645
10829
|
}
|
|
10646
10830
|
throw a(E$1, `Invalid "${r}" target "${t}"`);
|
|
10647
|
-
}
|
|
10831
|
+
};
|
|
10832
|
+
const s = "*";
|
|
10833
|
+
const m = (r, t) => {
|
|
10648
10834
|
const e = r.indexOf(s), o = t.indexOf(s);
|
|
10649
10835
|
return e === o ? t.length > r.length : o > e;
|
|
10650
10836
|
};
|
|
@@ -10664,7 +10850,9 @@ const p = (r) => Object.keys(r).reduce((t, e) => {
|
|
|
10664
10850
|
const o = e === "" || e[0] !== ".";
|
|
10665
10851
|
if (t === void 0 || t === o) return o;
|
|
10666
10852
|
throw a(_, "\"exports\" cannot contain some keys starting with \".\" and some not");
|
|
10667
|
-
}, void 0)
|
|
10853
|
+
}, void 0);
|
|
10854
|
+
const u = /^\w+:/;
|
|
10855
|
+
const v = (r, t, e) => {
|
|
10668
10856
|
if (!r) throw new Error("\"exports\" is required");
|
|
10669
10857
|
t = t === "" ? "." : `./${t}`, (typeof r == "string" || Array.isArray(r) || A(r) && p(r)) && (r = { ".": r });
|
|
10670
10858
|
const [o, c] = d(r, t), n = f(h$1.Export, r[o], t, e, c);
|
|
@@ -10690,7 +10878,11 @@ const K = r((e) => {
|
|
|
10690
10878
|
let l = s == null ? void 0 : s.get(o);
|
|
10691
10879
|
return l === void 0 && (l = Reflect.apply(t, fs, n), s?.set(o, l)), l;
|
|
10692
10880
|
};
|
|
10693
|
-
}, "cacheFs")
|
|
10881
|
+
}, "cacheFs");
|
|
10882
|
+
const x = K("existsSync");
|
|
10883
|
+
const Se = K("readFileSync");
|
|
10884
|
+
const Q = K("statSync");
|
|
10885
|
+
const O = r((e, t, s) => {
|
|
10694
10886
|
for (;;) {
|
|
10695
10887
|
const n = PATH.posix.join(e, t);
|
|
10696
10888
|
if (x(s, n)) return n;
|
|
@@ -10698,7 +10890,9 @@ const K = r((e) => {
|
|
|
10698
10890
|
if (o === e) return;
|
|
10699
10891
|
e = o;
|
|
10700
10892
|
}
|
|
10701
|
-
}, "findUp")
|
|
10893
|
+
}, "findUp");
|
|
10894
|
+
const C = /^\.{1,2}(\/.*)?$/;
|
|
10895
|
+
const H = r((e) => {
|
|
10702
10896
|
const t = h(e);
|
|
10703
10897
|
return C.test(t) ? t : `./${t}`;
|
|
10704
10898
|
}, "normalizeRelativePath");
|
|
@@ -11116,10 +11310,14 @@ var de;
|
|
|
11116
11310
|
(function(e) {
|
|
11117
11311
|
e[e.InvalidSymbol = 1] = "InvalidSymbol", e[e.InvalidNumberFormat = 2] = "InvalidNumberFormat", e[e.PropertyNameExpected = 3] = "PropertyNameExpected", e[e.ValueExpected = 4] = "ValueExpected", e[e.ColonExpected = 5] = "ColonExpected", e[e.CommaExpected = 6] = "CommaExpected", e[e.CloseBraceExpected = 7] = "CloseBraceExpected", e[e.CloseBracketExpected = 8] = "CloseBracketExpected", e[e.EndOfFileExpected = 9] = "EndOfFileExpected", e[e.InvalidCommentToken = 10] = "InvalidCommentToken", e[e.UnexpectedEndOfComment = 11] = "UnexpectedEndOfComment", e[e.UnexpectedEndOfString = 12] = "UnexpectedEndOfString", e[e.UnexpectedEndOfNumber = 13] = "UnexpectedEndOfNumber", e[e.InvalidUnicode = 14] = "InvalidUnicode", e[e.InvalidEscapeCharacter = 15] = "InvalidEscapeCharacter", e[e.InvalidCharacter = 16] = "InvalidCharacter";
|
|
11118
11312
|
})(de || (de = {}));
|
|
11119
|
-
const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc")
|
|
11313
|
+
const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc");
|
|
11314
|
+
const ne = Symbol("implicitBaseUrl");
|
|
11315
|
+
const E = "${configDir}";
|
|
11316
|
+
const Me = r(() => {
|
|
11120
11317
|
const { findPnpApi: e } = Be;
|
|
11121
11318
|
return e && e(process.cwd());
|
|
11122
|
-
}, "getPnpApi")
|
|
11319
|
+
}, "getPnpApi");
|
|
11320
|
+
const te = r((e, t, s, n) => {
|
|
11123
11321
|
const o = `resolveFromPackageJsonPath:${e}:${t}:${s}`;
|
|
11124
11322
|
if (n != null && n.has(o)) return n.get(o);
|
|
11125
11323
|
const l = we(e, n);
|
|
@@ -11133,7 +11331,10 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
|
|
|
11133
11331
|
}
|
|
11134
11332
|
else !t && l.tsconfig && (i = l.tsconfig);
|
|
11135
11333
|
return i = PATH.join(e, "..", i), n?.set(o, i), i;
|
|
11136
|
-
}, "resolveFromPackageJsonPath")
|
|
11334
|
+
}, "resolveFromPackageJsonPath");
|
|
11335
|
+
const se = "package.json";
|
|
11336
|
+
const le = "tsconfig.json";
|
|
11337
|
+
const Ve = r((e, t, s) => {
|
|
11137
11338
|
let n = e;
|
|
11138
11339
|
if (e === ".." && (n = PATH.join(n, le)), e[0] === "." && (n = PATH.resolve(t, n)), PATH.isAbsolute(n)) {
|
|
11139
11340
|
if (x(s, n)) {
|
|
@@ -11189,18 +11390,23 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
|
|
|
11189
11390
|
if (x(s, p)) return p;
|
|
11190
11391
|
} else if (_) return d;
|
|
11191
11392
|
}
|
|
11192
|
-
}, "resolveExtendsPath")
|
|
11393
|
+
}, "resolveExtendsPath");
|
|
11394
|
+
const oe = r((e, t) => H(PATH.relative(e, t)), "pathRelative");
|
|
11395
|
+
const be = [
|
|
11193
11396
|
"files",
|
|
11194
11397
|
"include",
|
|
11195
11398
|
"exclude"
|
|
11196
|
-
]
|
|
11399
|
+
];
|
|
11400
|
+
const N = r((e, t, s) => {
|
|
11197
11401
|
const n = PATH.join(t, s);
|
|
11198
11402
|
return h(PATH.relative(e, n)) || "./";
|
|
11199
|
-
}, "resolveAndRelativize")
|
|
11403
|
+
}, "resolveAndRelativize");
|
|
11404
|
+
const ze = r((e, t, s) => {
|
|
11200
11405
|
const n = PATH.relative(e, t);
|
|
11201
11406
|
if (!n) return s;
|
|
11202
11407
|
return h(`${n}/${s.startsWith("./") ? s.slice(2) : s}`);
|
|
11203
|
-
}, "prefixPattern")
|
|
11408
|
+
}, "prefixPattern");
|
|
11409
|
+
const Ge = r((e, t, s, n) => {
|
|
11204
11410
|
const o = Ve(e, t, n);
|
|
11205
11411
|
if (!o) throw new Error(`File '${e}' not found.`);
|
|
11206
11412
|
if (s.has(o)) throw new Error(`Circularity detected while resolving configuration: ${o}`);
|
|
@@ -11227,7 +11433,9 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
|
|
|
11227
11433
|
g && (i[u] = g.map((w) => w.startsWith(E) ? w : ze(t, l, w)));
|
|
11228
11434
|
}
|
|
11229
11435
|
return i;
|
|
11230
|
-
}, "resolveExtends")
|
|
11436
|
+
}, "resolveExtends");
|
|
11437
|
+
const ve = ["outDir", "declarationDir"];
|
|
11438
|
+
const pe = r((e, t, s = /* @__PURE__ */ new Set()) => {
|
|
11231
11439
|
let n;
|
|
11232
11440
|
try {
|
|
11233
11441
|
n = we(e, t) || {};
|
|
@@ -11277,16 +11485,19 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
|
|
|
11277
11485
|
l.excludeDirectories && (l.excludeDirectories = l.excludeDirectories.map((i) => h(PATH.resolve(o, i)))), l.excludeFiles && (l.excludeFiles = l.excludeFiles.map((i) => h(PATH.resolve(o, i)))), l.watchFile && (l.watchFile = l.watchFile.toLowerCase()), l.watchDirectory && (l.watchDirectory = l.watchDirectory.toLowerCase()), l.fallbackPolling && (l.fallbackPolling = l.fallbackPolling.toLowerCase());
|
|
11278
11486
|
}
|
|
11279
11487
|
return n;
|
|
11280
|
-
}, "_parseTsconfig")
|
|
11488
|
+
}, "_parseTsconfig");
|
|
11489
|
+
const Y = r((e, t) => {
|
|
11281
11490
|
if (e.startsWith(E)) return h(PATH.join(t, e.slice(12)));
|
|
11282
|
-
}, "interpolateConfigDir")
|
|
11491
|
+
}, "interpolateConfigDir");
|
|
11492
|
+
const Qe = [
|
|
11283
11493
|
"outDir",
|
|
11284
11494
|
"declarationDir",
|
|
11285
11495
|
"outFile",
|
|
11286
11496
|
"rootDir",
|
|
11287
11497
|
"baseUrl",
|
|
11288
11498
|
"tsBuildInfoFile"
|
|
11289
|
-
]
|
|
11499
|
+
];
|
|
11500
|
+
const He = r((e) => {
|
|
11290
11501
|
if (e.strict) for (const I of [
|
|
11291
11502
|
"noImplicitAny",
|
|
11292
11503
|
"noImplicitThis",
|
|
@@ -11315,7 +11526,8 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
|
|
|
11315
11526
|
a === "node" && (a = "node10"), e.moduleResolution = a, (a === "node16" || a === "nodenext" || a === "bundler") && (e.resolvePackageJsonExports ??= !0, e.resolvePackageJsonImports ??= !0), a === "bundler" && (e.allowSyntheticDefaultImports ??= !0, e.resolveJsonModule ??= !0);
|
|
11316
11527
|
}
|
|
11317
11528
|
e.jsx && (e.jsx = e.jsx.toLowerCase()), e.moduleDetection && (e.moduleDetection = e.moduleDetection.toLowerCase()), e.importsNotUsedAsValues && (e.importsNotUsedAsValues = e.importsNotUsedAsValues.toLowerCase()), e.newLine && (e.newLine = e.newLine.toLowerCase()), e.esModuleInterop && (e.allowSyntheticDefaultImports ??= !0), e.verbatimModuleSyntax && (e.isolatedModules ??= !0, e.preserveConstEnums ??= !0), e.isolatedModules && (e.preserveConstEnums ??= !0), e.rewriteRelativeImportExtensions && (e.allowImportingTsExtensions ??= !0), e.lib && (e.lib = e.lib.map((a) => a.toLowerCase())), e.checkJs && (e.allowJs ??= !0);
|
|
11318
|
-
}, "normalizeCompilerOptions")
|
|
11529
|
+
}, "normalizeCompilerOptions");
|
|
11530
|
+
const ie = r((e, t = /* @__PURE__ */ new Map()) => {
|
|
11319
11531
|
const s = PATH.resolve(e), n = pe(s, t), o = PATH.dirname(s), { compilerOptions: l } = n;
|
|
11320
11532
|
if (l) {
|
|
11321
11533
|
for (const f of Qe) {
|
|
@@ -11348,7 +11560,8 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
|
|
|
11348
11560
|
}
|
|
11349
11561
|
return n;
|
|
11350
11562
|
}, "parseTsconfig");
|
|
11351
|
-
var Xe = Object.defineProperty
|
|
11563
|
+
var Xe = Object.defineProperty;
|
|
11564
|
+
var Z = r((e, t) => Xe(e, "name", {
|
|
11352
11565
|
value: t,
|
|
11353
11566
|
configurable: !0
|
|
11354
11567
|
}), "s");
|
|
@@ -12143,6 +12356,230 @@ const packageCompileEsbuild = async (config, mode = {}) => {
|
|
|
12143
12356
|
return nodeErrors + browserErrors + neutralErrors;
|
|
12144
12357
|
};
|
|
12145
12358
|
//#endregion
|
|
12359
|
+
//#region src/actions/package/compile/monolithReexport.ts
|
|
12360
|
+
function normalizeReexportTargets(value) {
|
|
12361
|
+
if (value === void 0) return [];
|
|
12362
|
+
return Array.isArray(value) ? value : [value];
|
|
12363
|
+
}
|
|
12364
|
+
/** Package-like specifier: not a hash alias and not a relative/absolute path. */
|
|
12365
|
+
function isPackageLikeSpecifier(spec) {
|
|
12366
|
+
return !spec.startsWith("#") && !spec.startsWith(".") && !spec.startsWith("/");
|
|
12367
|
+
}
|
|
12368
|
+
/** Configured `reexport` targets for a module, if any. */
|
|
12369
|
+
function moduleReexportTargets(mod) {
|
|
12370
|
+
return normalizeReexportTargets(mod.reexport);
|
|
12371
|
+
}
|
|
12372
|
+
function moduleHasReexport(mod) {
|
|
12373
|
+
return moduleReexportTargets(mod).length > 0;
|
|
12374
|
+
}
|
|
12375
|
+
/**
|
|
12376
|
+
* Master-barrel re-export targets for a module: explicit `barrelFrom`, else
|
|
12377
|
+
* `reexport`, else `#<name>`.
|
|
12378
|
+
*/
|
|
12379
|
+
function moduleBarrelTargets(mod) {
|
|
12380
|
+
const fromBarrel = normalizeReexportTargets(mod.barrelFrom);
|
|
12381
|
+
if (fromBarrel.length > 0) return fromBarrel;
|
|
12382
|
+
const fromReexport = moduleReexportTargets(mod);
|
|
12383
|
+
if (fromReexport.length > 0) return fromReexport;
|
|
12384
|
+
return [`#${mod.name}`];
|
|
12385
|
+
}
|
|
12386
|
+
/**
|
|
12387
|
+
* Subpath shim re-export targets: explicit `shimFrom`, else `reexport`, else
|
|
12388
|
+
* `#<name>`.
|
|
12389
|
+
*/
|
|
12390
|
+
function moduleShimTargets(mod) {
|
|
12391
|
+
const fromShim = normalizeReexportTargets(mod.shimFrom);
|
|
12392
|
+
if (fromShim.length > 0) return fromShim;
|
|
12393
|
+
const fromReexport = moduleReexportTargets(mod);
|
|
12394
|
+
if (fromReexport.length > 0) return fromReexport;
|
|
12395
|
+
return [`#${mod.name}`];
|
|
12396
|
+
}
|
|
12397
|
+
/** Builds a pure star-reexport TypeScript (or mjs) source body (no header). */
|
|
12398
|
+
function buildStarReexportLines(targets, options = {}) {
|
|
12399
|
+
const semi = options.semi === false ? "" : ";";
|
|
12400
|
+
return `${targets.map((target) => `export * from '${target}'${semi}`).join("\n")}\n`;
|
|
12401
|
+
}
|
|
12402
|
+
const starExportLineRe = /^export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?\s*$/;
|
|
12403
|
+
function isSkippableSourceLine(line) {
|
|
12404
|
+
if (line.length === 0) return true;
|
|
12405
|
+
if (line.startsWith("//")) return true;
|
|
12406
|
+
if (line.startsWith("/*") || line.startsWith("*") || line.startsWith("*/")) return true;
|
|
12407
|
+
return false;
|
|
12408
|
+
}
|
|
12409
|
+
/**
|
|
12410
|
+
* If `source` is only star re-exports (plus blank lines / `//` comments /
|
|
12411
|
+
* generated header), returns the targets in order. Otherwise `null`.
|
|
12412
|
+
*/
|
|
12413
|
+
function parsePureStarReexports(source) {
|
|
12414
|
+
const targets = [];
|
|
12415
|
+
for (const rawLine of source.split("\n")) {
|
|
12416
|
+
const line = rawLine.trim();
|
|
12417
|
+
if (isSkippableSourceLine(line)) continue;
|
|
12418
|
+
const match = starExportLineRe.exec(line);
|
|
12419
|
+
if (match === null) return null;
|
|
12420
|
+
targets.push(match[1]);
|
|
12421
|
+
}
|
|
12422
|
+
return targets.length > 0 ? targets : null;
|
|
12423
|
+
}
|
|
12424
|
+
function moduleIndexSourcePath(packageDir, moduleName) {
|
|
12425
|
+
return PATH.join(packageDir, "src", "modules", moduleName, "index.ts");
|
|
12426
|
+
}
|
|
12427
|
+
function hashModuleParts(spec) {
|
|
12428
|
+
const [modName, sub] = spec.slice(1).split("/", 2);
|
|
12429
|
+
return {
|
|
12430
|
+
modName,
|
|
12431
|
+
sub
|
|
12432
|
+
};
|
|
12433
|
+
}
|
|
12434
|
+
function resolveHashToModuleFile(packageDir, spec, config) {
|
|
12435
|
+
const { modName, sub } = hashModuleParts(spec);
|
|
12436
|
+
if (config.aliasImports?.[spec] !== void 0) {
|
|
12437
|
+
const alias = config.aliasImports[spec].replace(/^\.\//, "");
|
|
12438
|
+
return PATH.join(packageDir, alias);
|
|
12439
|
+
}
|
|
12440
|
+
if (sub === void 0) return moduleIndexSourcePath(packageDir, modName);
|
|
12441
|
+
if (sub === "model") return PATH.join(packageDir, "src", "modules", modName, "model.ts");
|
|
12442
|
+
return PATH.join(packageDir, "src", "modules", modName, `${sub}.ts`);
|
|
12443
|
+
}
|
|
12444
|
+
function expandNestedSource(file, packageDir, config, seen) {
|
|
12445
|
+
if (!fs.existsSync(file)) return null;
|
|
12446
|
+
const nested = parsePureStarReexports(fs.readFileSync(file, "utf8"));
|
|
12447
|
+
if (nested === null) return null;
|
|
12448
|
+
return expandToPackageReexportTargets(nested, packageDir, config, seen);
|
|
12449
|
+
}
|
|
12450
|
+
function expandHashTarget(target, packageDir, config, seen) {
|
|
12451
|
+
const { modName, sub } = hashModuleParts(target);
|
|
12452
|
+
const mod = config.modules.find((candidate) => candidate.name === modName);
|
|
12453
|
+
if (mod !== void 0 && moduleHasReexport(mod) && sub === void 0) return expandToPackageReexportTargets(moduleReexportTargets(mod), packageDir, config, seen);
|
|
12454
|
+
const file = resolveHashToModuleFile(packageDir, target, config);
|
|
12455
|
+
if (file === null) return null;
|
|
12456
|
+
return expandNestedSource(file, packageDir, config, seen);
|
|
12457
|
+
}
|
|
12458
|
+
function expandRelativeTarget(target, packageDir, config, seen) {
|
|
12459
|
+
const base = PATH.resolve(packageDir, "src", target.replace(/^\.\//, ""));
|
|
12460
|
+
const existing = [
|
|
12461
|
+
base,
|
|
12462
|
+
`${base}.ts`,
|
|
12463
|
+
`${base}.tsx`,
|
|
12464
|
+
PATH.join(base, "index.ts")
|
|
12465
|
+
].find((candidate) => fs.existsSync(candidate));
|
|
12466
|
+
if (existing === void 0) return null;
|
|
12467
|
+
return expandNestedSource(existing, packageDir, config, seen);
|
|
12468
|
+
}
|
|
12469
|
+
/**
|
|
12470
|
+
* Expands pure star-reexport targets until only package-like specifiers remain.
|
|
12471
|
+
* Returns `null` if any hop has local implementation or unreadable sources.
|
|
12472
|
+
*/
|
|
12473
|
+
function expandToPackageReexportTargets(targets, packageDir, config, seen = /* @__PURE__ */ new Set()) {
|
|
12474
|
+
const out = [];
|
|
12475
|
+
for (const target of targets) {
|
|
12476
|
+
if (seen.has(target)) continue;
|
|
12477
|
+
seen.add(target);
|
|
12478
|
+
if (isPackageLikeSpecifier(target)) {
|
|
12479
|
+
out.push(target);
|
|
12480
|
+
continue;
|
|
12481
|
+
}
|
|
12482
|
+
const expanded = target.startsWith("#") ? expandHashTarget(target, packageDir, config, seen) : target.startsWith(".") ? expandRelativeTarget(target, packageDir, config, seen) : null;
|
|
12483
|
+
if (expanded === null) return null;
|
|
12484
|
+
out.push(...expanded);
|
|
12485
|
+
}
|
|
12486
|
+
return out;
|
|
12487
|
+
}
|
|
12488
|
+
/**
|
|
12489
|
+
* Resolves pure package reexport targets for a module from config and/or source.
|
|
12490
|
+
*/
|
|
12491
|
+
function resolveModulePackageReexports(mod, packageDir, config) {
|
|
12492
|
+
if (moduleHasReexport(mod)) return expandToPackageReexportTargets(moduleReexportTargets(mod), packageDir, config);
|
|
12493
|
+
const file = moduleIndexSourcePath(packageDir, mod.name);
|
|
12494
|
+
if (!fs.existsSync(file)) return null;
|
|
12495
|
+
const targets = parsePureStarReexports(fs.readFileSync(file, "utf8"));
|
|
12496
|
+
if (targets === null) return null;
|
|
12497
|
+
return expandToPackageReexportTargets(targets, packageDir, config);
|
|
12498
|
+
}
|
|
12499
|
+
function walkMjs$1(dir, out = []) {
|
|
12500
|
+
if (!fs.existsSync(dir)) return out;
|
|
12501
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
12502
|
+
for (const entry of entries) {
|
|
12503
|
+
const fp = PATH.join(dir, entry.name);
|
|
12504
|
+
if (entry.isDirectory()) walkMjs$1(fp, out);
|
|
12505
|
+
else if (entry.name.endsWith(".mjs")) out.push(fp);
|
|
12506
|
+
}
|
|
12507
|
+
return out;
|
|
12508
|
+
}
|
|
12509
|
+
function writePureReexportMjs(filePath, targets) {
|
|
12510
|
+
fs.mkdirSync(PATH.dirname(filePath), { recursive: true });
|
|
12511
|
+
fs.writeFileSync(filePath, buildStarReexportLines(targets, { semi: true }));
|
|
12512
|
+
}
|
|
12513
|
+
function collectPackageTargetsByModule(packageDir, config) {
|
|
12514
|
+
const packageTargetsByModule = /* @__PURE__ */ new Map();
|
|
12515
|
+
for (const mod of config.modules) {
|
|
12516
|
+
if (!(mod.export ?? false) && !(mod.barrel ?? false)) continue;
|
|
12517
|
+
const targets = resolveModulePackageReexports(mod, packageDir, config);
|
|
12518
|
+
if (targets !== null && targets.length > 0) packageTargetsByModule.set(mod.name, targets);
|
|
12519
|
+
}
|
|
12520
|
+
return packageTargetsByModule;
|
|
12521
|
+
}
|
|
12522
|
+
function resolveBarrelModuleTargets(mod, packageDir, config, packageTargetsByModule) {
|
|
12523
|
+
const fromBarrel = normalizeReexportTargets(mod.barrelFrom);
|
|
12524
|
+
if (fromBarrel.length > 0) return expandToPackageReexportTargets(fromBarrel, packageDir, config);
|
|
12525
|
+
return packageTargetsByModule.get(mod.name) ?? null;
|
|
12526
|
+
}
|
|
12527
|
+
function resolveIndexPackageTargets(packageDir, config, packageTargetsByModule) {
|
|
12528
|
+
const barrelModules = config.modules.filter((mod) => mod.barrel ?? false).toSorted((a, b) => a.name.localeCompare(b.name));
|
|
12529
|
+
const indexTargets = [...config.barrelImports ?? []];
|
|
12530
|
+
for (const mod of barrelModules) {
|
|
12531
|
+
const moduleTargets = resolveBarrelModuleTargets(mod, packageDir, config, packageTargetsByModule);
|
|
12532
|
+
if (moduleTargets === null) return null;
|
|
12533
|
+
indexTargets.push(...moduleTargets);
|
|
12534
|
+
}
|
|
12535
|
+
return indexTargets;
|
|
12536
|
+
}
|
|
12537
|
+
function rewriteModuleReexportMjs(distDir, modulesPlatform, packageTargetsByModule) {
|
|
12538
|
+
let rewritten = 0;
|
|
12539
|
+
for (const [name, targets] of packageTargetsByModule) {
|
|
12540
|
+
const file = PATH.join(distDir, modulesPlatform, `${name}.mjs`);
|
|
12541
|
+
if (!fs.existsSync(file)) continue;
|
|
12542
|
+
writePureReexportMjs(file, targets);
|
|
12543
|
+
rewritten++;
|
|
12544
|
+
}
|
|
12545
|
+
return rewritten;
|
|
12546
|
+
}
|
|
12547
|
+
function rewriteIndexReexportMjs(distDir, platforms, indexTargets) {
|
|
12548
|
+
let rewritten = 0;
|
|
12549
|
+
for (const platform of platforms) {
|
|
12550
|
+
const file = PATH.join(distDir, platform, "index.mjs");
|
|
12551
|
+
if (!fs.existsSync(file)) continue;
|
|
12552
|
+
writePureReexportMjs(file, indexTargets);
|
|
12553
|
+
rewritten++;
|
|
12554
|
+
}
|
|
12555
|
+
for (const file of walkMjs$1(distDir)) {
|
|
12556
|
+
const base = PATH.basename(file);
|
|
12557
|
+
if (!base.startsWith("index") || !base.endsWith(".mjs") || base === "index.mjs") continue;
|
|
12558
|
+
writePureReexportMjs(file, indexTargets);
|
|
12559
|
+
rewritten++;
|
|
12560
|
+
}
|
|
12561
|
+
return rewritten;
|
|
12562
|
+
}
|
|
12563
|
+
/**
|
|
12564
|
+
* After esbuild, rewrite known pure package-facade entries to `export * from`
|
|
12565
|
+
* form. esbuild preserves star re-exports only on the entry file; multi-hop
|
|
12566
|
+
* `#module` chains become `__reExport` helpers that break Storybook/Vite
|
|
12567
|
+
* analysis. Returns the number of files rewritten.
|
|
12568
|
+
*/
|
|
12569
|
+
function flattenPurePackageReexportMjs(distDir, packageDir, config) {
|
|
12570
|
+
const modulesPlatform = config.modulesPlatform ?? "neutral";
|
|
12571
|
+
const platforms = config.platforms ?? [
|
|
12572
|
+
"neutral",
|
|
12573
|
+
"node",
|
|
12574
|
+
"browser"
|
|
12575
|
+
];
|
|
12576
|
+
const packageTargetsByModule = collectPackageTargetsByModule(packageDir, config);
|
|
12577
|
+
let rewritten = rewriteModuleReexportMjs(distDir, modulesPlatform, packageTargetsByModule);
|
|
12578
|
+
const indexTargets = resolveIndexPackageTargets(packageDir, config, packageTargetsByModule);
|
|
12579
|
+
if (indexTargets !== null && indexTargets.length > 0) rewritten += rewriteIndexReexportMjs(distDir, platforms, indexTargets);
|
|
12580
|
+
return rewritten;
|
|
12581
|
+
}
|
|
12582
|
+
//#endregion
|
|
12146
12583
|
//#region src/actions/package/compile/monolithCompileLayout.ts
|
|
12147
12584
|
/**
|
|
12148
12585
|
* Layout generation for `compile.mode: 'monolith'` — a 1:1 port of the
|
|
@@ -12249,10 +12686,7 @@ function buildIndexTs(modules, config) {
|
|
|
12249
12686
|
const hasConditional = Object.keys(config.conditionalImports ?? {}).length > 0;
|
|
12250
12687
|
const barrelModules = modules.filter((mod) => mod.barrel ?? false).toSorted((a, b) => a.name.localeCompare(b.name));
|
|
12251
12688
|
const lines = (config.barrelImports ?? []).map((spec) => `export * from '${spec}'`);
|
|
12252
|
-
for (const mod of barrelModules) {
|
|
12253
|
-
const target = mod.barrelFrom ?? `#${mod.name}`;
|
|
12254
|
-
lines.push(`export * from '${target}'`);
|
|
12255
|
-
}
|
|
12689
|
+
for (const mod of barrelModules) for (const target of moduleBarrelTargets(mod)) lines.push(`export * from '${target}'`);
|
|
12256
12690
|
return `${GENERATED_HEADER}${hasConditional ? "/* eslint-disable @typescript-eslint/ban-ts-comment -- conditional package imports */\n// @ts-nocheck\n" : ""}${lines.join("\n")}
|
|
12257
12691
|
`;
|
|
12258
12692
|
}
|
|
@@ -12262,9 +12696,11 @@ function buildModelTs(modules) {
|
|
|
12262
12696
|
`;
|
|
12263
12697
|
}
|
|
12264
12698
|
function buildModuleShim(mod) {
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12699
|
+
return `${GENERATED_HEADER}${buildStarReexportLines(moduleShimTargets(mod), { semi: false })}`;
|
|
12700
|
+
}
|
|
12701
|
+
/** Generated module body for facade modules with `reexport` targets. */
|
|
12702
|
+
function buildModuleReexportIndex(mod) {
|
|
12703
|
+
return `${GENERATED_HEADER}${buildStarReexportLines(moduleReexportTargets(mod), { semi: false })}`;
|
|
12268
12704
|
}
|
|
12269
12705
|
function buildModelShim(mod) {
|
|
12270
12706
|
return `${GENERATED_HEADER}export type * from '#${mod.name}/model'
|
|
@@ -12329,6 +12765,7 @@ function syncMonolithLayout(packageDir, config, options = {}) {
|
|
|
12329
12765
|
if (!(config.index?.custom ?? false)) writeOrCheck(PATH.join(packageDir, "src/index.ts"), buildIndexTs(modules, config));
|
|
12330
12766
|
if (monolithHasModelBarrel(config)) writeOrCheck(PATH.join(packageDir, "src/model.ts"), buildModelTs(modules));
|
|
12331
12767
|
for (const mod of modules) {
|
|
12768
|
+
if (moduleHasReexport(mod)) writeOrCheck(PATH.join(packageDir, "src", "modules", mod.name, "index.ts"), buildModuleReexportIndex(mod));
|
|
12332
12769
|
if (!(mod.export ?? false)) continue;
|
|
12333
12770
|
writeOrCheck(PATH.join(packageDir, `src/${mod.name}.ts`), buildModuleShim(mod));
|
|
12334
12771
|
if (mod.model ?? false) writeOrCheck(PATH.join(packageDir, `src/${mod.name}.model.ts`), buildModelShim(mod));
|
|
@@ -12491,15 +12928,14 @@ function moduleShimEntries(mod, isDirectIndex, isExternal) {
|
|
|
12491
12928
|
return shims;
|
|
12492
12929
|
}
|
|
12493
12930
|
/**
|
|
12494
|
-
*
|
|
12495
|
-
*
|
|
12496
|
-
*
|
|
12497
|
-
*
|
|
12498
|
-
* re-export its own output — compile the default source directly instead.
|
|
12931
|
+
* Prefer compiling `modules/<name>/index.ts` directly when star re-exports
|
|
12932
|
+
* must stay as `export * from` on the entry (esbuild lowers multi-hop stars
|
|
12933
|
+
* into `__reExport` helpers). Used for external linkage, facade `reexport`
|
|
12934
|
+
* modules, and pure package facades that would otherwise hop through shims.
|
|
12499
12935
|
*/
|
|
12500
12936
|
function modulesPlatformEntries(mod, config, isExternal, modulesPlatform) {
|
|
12501
12937
|
const conditional = config.conditionalImports?.[mod.name];
|
|
12502
|
-
let isDirectIndex = isExternal && conditional === void 0;
|
|
12938
|
+
let isDirectIndex = (isExternal || moduleHasReexport(mod)) && conditional === void 0;
|
|
12503
12939
|
let directIn = `./modules/${mod.name}/index.ts`;
|
|
12504
12940
|
if (isExternal && conditional?.distImports?.default === `./dist/${modulesPlatform}/${mod.name}.mjs`) {
|
|
12505
12941
|
isDirectIndex = true;
|
|
@@ -12537,12 +12973,14 @@ function platformShimEntry(platform, name, target, isExternal) {
|
|
|
12537
12973
|
* a conditional `#import` skip the modules-platform entry — the subpath
|
|
12538
12974
|
* shim already resolves the default condition.
|
|
12539
12975
|
*
|
|
12540
|
-
* With `moduleLinkage: 'external'`
|
|
12541
|
-
* the generated one-line shims and target the module files
|
|
12542
|
-
* `{in, out}` pairs: esbuild only preserves
|
|
12543
|
-
* when it appears in the entry file itself — routed
|
|
12544
|
-
* re-export
|
|
12545
|
-
* remain the tsc declaration sources for the same dist names.
|
|
12976
|
+
* With `moduleLinkage: 'external'` or module `reexport` facades, subpath
|
|
12977
|
+
* entries bypass the generated one-line shims and target the module files
|
|
12978
|
+
* directly via `{in, out}` pairs: esbuild only preserves
|
|
12979
|
+
* `export * from '…'` when it appears in the entry file itself — routed
|
|
12980
|
+
* through an intermediate re-export the star is lowered to `__reExport`
|
|
12981
|
+
* helpers. Shims remain the tsc declaration sources for the same dist names.
|
|
12982
|
+
* After esbuild, pure package-facade graphs are also flattened in
|
|
12983
|
+
* {@link flattenPurePackageReexportMjs} so multi-hop barrels stay clean.
|
|
12546
12984
|
*/
|
|
12547
12985
|
function buildMonolithEntries(config) {
|
|
12548
12986
|
const { conditionalImports = {}, modules, platformEntries = {} } = config;
|
|
@@ -12650,9 +13088,12 @@ const packageCompileMonolith = async (config, mode = {}) => {
|
|
|
12650
13088
|
if (!shouldEmit) return 0;
|
|
12651
13089
|
const compileResult = await packageCompileEsbuild(deriveEsbuildConfig(config, compile, monolith), { emitOnly: true });
|
|
12652
13090
|
if (compileResult !== 0) return compileResult;
|
|
12653
|
-
const
|
|
13091
|
+
const distDir = PATH.join(packageDir, "dist");
|
|
13092
|
+
const flattened = flattenPurePackageReexportMjs(distDir, packageDir, monolith);
|
|
13093
|
+
if (isVerbose && flattened > 0) console.log(chalk.gray(`monolith pure reexport flatten: ${flattened} files`));
|
|
13094
|
+
const rewritten = fixMonolithDeclarations(distDir, monolith);
|
|
12654
13095
|
if (isVerbose) console.log(chalk.gray(`monolith declaration fixups: ${rewritten} files`));
|
|
12655
|
-
const specifierProblems = verifyMonolithRuntimeSpecifiers(
|
|
13096
|
+
const specifierProblems = verifyMonolithRuntimeSpecifiers(distDir, monolith);
|
|
12656
13097
|
if (specifierProblems.length > 0) {
|
|
12657
13098
|
for (const problem of specifierProblems) console.error(chalk.red(problem));
|
|
12658
13099
|
return 1;
|