@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.
Files changed (106) hide show
  1. package/dist/actions/api-exposure/config.d.ts.map +1 -1
  2. package/dist/actions/deplint/packageJsonEditor.d.ts +1 -1
  3. package/dist/actions/deplint/ruleConfig.d.ts.map +1 -1
  4. package/dist/actions/deplint/types.d.ts +1 -1
  5. package/dist/actions/gitlint.d.ts +2 -0
  6. package/dist/actions/gitlint.d.ts.map +1 -1
  7. package/dist/actions/license.d.ts +4 -0
  8. package/dist/actions/license.d.ts.map +1 -1
  9. package/dist/actions/lint.d.ts +11 -2
  10. package/dist/actions/lint.d.ts.map +1 -1
  11. package/dist/actions/lintNext.d.ts +22 -1
  12. package/dist/actions/lintNext.d.ts.map +1 -1
  13. package/dist/actions/lintNextRun.d.ts +36 -0
  14. package/dist/actions/lintNextRun.d.ts.map +1 -0
  15. package/dist/actions/lintNextWorker.d.ts +70 -3
  16. package/dist/actions/lintNextWorker.d.ts.map +1 -1
  17. package/dist/actions/lintPackageFilter.d.ts +44 -0
  18. package/dist/actions/lintPackageFilter.d.ts.map +1 -0
  19. package/dist/actions/lintlint.d.ts +31 -0
  20. package/dist/actions/lintlint.d.ts.map +1 -1
  21. package/dist/actions/node-lint.d.ts +7 -0
  22. package/dist/actions/node-lint.d.ts.map +1 -1
  23. package/dist/actions/package/compile/MonolithConfig.d.ts +23 -4
  24. package/dist/actions/package/compile/MonolithConfig.d.ts.map +1 -1
  25. package/dist/actions/package/compile/PublintConfig.d.ts +4 -2
  26. package/dist/actions/package/compile/PublintConfig.d.ts.map +1 -1
  27. package/dist/actions/package/compile/XyConfig.d.ts +18 -6
  28. package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
  29. package/dist/actions/package/compile/index.d.ts +1 -0
  30. package/dist/actions/package/compile/index.d.ts.map +1 -1
  31. package/dist/actions/package/compile/monolithCompileEntries.d.ts +8 -6
  32. package/dist/actions/package/compile/monolithCompileEntries.d.ts.map +1 -1
  33. package/dist/actions/package/compile/monolithCompileLayout.d.ts +2 -0
  34. package/dist/actions/package/compile/monolithCompileLayout.d.ts.map +1 -1
  35. package/dist/actions/package/compile/monolithReexport.d.ts +45 -0
  36. package/dist/actions/package/compile/monolithReexport.d.ts.map +1 -0
  37. package/dist/actions/package/compile/packageCompileMonolith.d.ts.map +1 -1
  38. package/dist/actions/package/publintRules.d.ts +4 -1
  39. package/dist/actions/package/publintRules.d.ts.map +1 -1
  40. package/dist/actions/package-lint.d.ts.map +1 -1
  41. package/dist/actions/packman/lint.d.ts +14 -0
  42. package/dist/actions/packman/lint.d.ts.map +1 -1
  43. package/dist/actions/ruleCatalog.d.ts +4 -2
  44. package/dist/actions/ruleCatalog.d.ts.map +1 -1
  45. package/dist/actions/ruleRunner.d.ts +4 -1
  46. package/dist/actions/ruleRunner.d.ts.map +1 -1
  47. package/dist/actions/skills/lint.d.ts +13 -0
  48. package/dist/actions/skills/lint.d.ts.map +1 -1
  49. package/dist/bin/package/build.mjs +708 -138
  50. package/dist/bin/package/build.mjs.map +1 -1
  51. package/dist/bin/package/clean.mjs +214 -47
  52. package/dist/bin/package/clean.mjs.map +1 -1
  53. package/dist/bin/package/compile.mjs +545 -104
  54. package/dist/bin/package/compile.mjs.map +1 -1
  55. package/dist/bin/package/copy-assets-cjs.mjs +214 -47
  56. package/dist/bin/package/copy-assets-cjs.mjs.map +1 -1
  57. package/dist/bin/package/copy-assets-esm.mjs +214 -47
  58. package/dist/bin/package/copy-assets-esm.mjs.map +1 -1
  59. package/dist/bin/package/publint.mjs +387 -84
  60. package/dist/bin/package/publint.mjs.map +1 -1
  61. package/dist/bin/package/recompile.mjs +545 -104
  62. package/dist/bin/package/recompile.mjs.map +1 -1
  63. package/dist/bin/package/sync-layout.mjs +57 -10
  64. package/dist/bin/package/sync-layout.mjs.map +1 -1
  65. package/dist/bin/skills.mjs +135 -91
  66. package/dist/bin/skills.mjs.map +1 -1
  67. package/dist/bin/source-map-explorer.mjs +7 -2
  68. package/dist/bin/source-map-explorer.mjs.map +1 -1
  69. package/dist/bin/xy.mjs +8001 -893
  70. package/dist/bin/xy.mjs.map +1 -1
  71. package/dist/lib/index.d.ts +2 -0
  72. package/dist/lib/index.d.ts.map +1 -1
  73. package/dist/lib/licenseCheck/checkLicenses.d.ts +23 -0
  74. package/dist/lib/licenseCheck/checkLicenses.d.ts.map +1 -0
  75. package/dist/lib/licenseCheck/collectProductionLicenses.d.ts +21 -0
  76. package/dist/lib/licenseCheck/collectProductionLicenses.d.ts.map +1 -0
  77. package/dist/lib/licenseCheck/index.d.ts +4 -0
  78. package/dist/lib/licenseCheck/index.d.ts.map +1 -0
  79. package/dist/lib/licenseCheck/readPackageLicense.d.ts +25 -0
  80. package/dist/lib/licenseCheck/readPackageLicense.d.ts.map +1 -0
  81. package/dist/lib/loadConfig.d.ts +1 -0
  82. package/dist/lib/loadConfig.d.ts.map +1 -1
  83. package/dist/lib/ruleCommandRegistry.d.ts +100 -0
  84. package/dist/lib/ruleCommandRegistry.d.ts.map +1 -0
  85. package/dist/xy/common/gitCommand.d.ts +3 -0
  86. package/dist/xy/common/gitCommand.d.ts.map +1 -0
  87. package/dist/xy/common/gitlintCommand.d.ts +2 -0
  88. package/dist/xy/common/gitlintCommand.d.ts.map +1 -1
  89. package/dist/xy/common/index.d.ts.map +1 -1
  90. package/dist/xy/common/licenseCommand.d.ts.map +1 -1
  91. package/dist/xy/deprecatedCommand.d.ts +2 -0
  92. package/dist/xy/deprecatedCommand.d.ts.map +1 -0
  93. package/dist/xy/lint/cycleCommand.d.ts.map +1 -1
  94. package/dist/xy/lint/index.d.ts.map +1 -1
  95. package/dist/xy/lint/lint/index.d.ts.map +1 -1
  96. package/dist/xy/lint/lint/runCommand.d.ts.map +1 -1
  97. package/dist/xy/lint/lintlintCommand.d.ts +2 -0
  98. package/dist/xy/lint/lintlintCommand.d.ts.map +1 -1
  99. package/dist/xy/lint/nodeCommand.d.ts +3 -0
  100. package/dist/xy/lint/nodeCommand.d.ts.map +1 -0
  101. package/dist/xy/lint/nodeLintCommand.d.ts +2 -0
  102. package/dist/xy/lint/nodeLintCommand.d.ts.map +1 -1
  103. package/dist/xy/lint/publintCommand.d.ts.map +1 -1
  104. package/dist/xy/lint/relintCommand.d.ts.map +1 -1
  105. package/dist/xy/lint/republintCommand.d.ts.map +1 -1
  106. package/package.json +8 -8
@@ -560,7 +560,7 @@ function Ut(n, t = {}) {
560
560
  function es(n, t = {}) {
561
561
  return new I$1(n, t).iterate();
562
562
  }
563
- var Gt, ce, ss, fe$1, ue$1, qt, de$1, pe$1, is, rs, ns, os$2, hs, as, ls, cs, fs$6, 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$1, et, v$1, dt, st, C$1, F, T$1, 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;
563
+ var Gt, ce, ss, fe$1, ue$1, qt, de$1, pe$1, is, rs, ns, os$2, hs, as, ls, cs, fs$6, 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;
564
564
  var init_index_min = __esmMin((() => {
565
565
  Gt = (n, t, e) => {
566
566
  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);
@@ -571,10 +571,12 @@ var init_index_min = __esmMin((() => {
571
571
  body: e.slice(r[0] + s.length, r[1]),
572
572
  post: e.slice(r[1] + i.length)
573
573
  };
574
- }, ce = (n, t) => {
574
+ };
575
+ ce = (n, t) => {
575
576
  let e = t.match(n);
576
577
  return e ? e[0] : null;
577
- }, ss = (n, t, e) => {
578
+ };
579
+ ss = (n, t, e) => {
578
580
  let s, i, r, o, h, a = e.indexOf(n), l = e.indexOf(t, a + 1), u = a;
579
581
  if (a >= 0 && l > 0) {
580
582
  if (n === t) return [a, l];
@@ -590,7 +592,22 @@ var init_index_min = __esmMin((() => {
590
592
  }
591
593
  return h;
592
594
  };
593
- fe$1 = "\0SLASH" + Math.random() + "\0", ue$1 = "\0OPEN" + Math.random() + "\0", qt = "\0CLOSE" + Math.random() + "\0", de$1 = "\0COMMA" + Math.random() + "\0", pe$1 = "\0PERIOD" + Math.random() + "\0", is = new RegExp(fe$1, "g"), rs = new RegExp(ue$1, "g"), ns = new RegExp(qt, "g"), os$2 = new RegExp(de$1, "g"), hs = new RegExp(pe$1, "g"), as = /\\\\/g, ls = /\\{/g, cs = /\\}/g, fs$6 = /\\,/g, us = /\\./g, ds = 1e5;
595
+ fe$1 = "\0SLASH" + Math.random() + "\0";
596
+ ue$1 = "\0OPEN" + Math.random() + "\0";
597
+ qt = "\0CLOSE" + Math.random() + "\0";
598
+ de$1 = "\0COMMA" + Math.random() + "\0";
599
+ pe$1 = "\0PERIOD" + Math.random() + "\0";
600
+ is = new RegExp(fe$1, "g");
601
+ rs = new RegExp(ue$1, "g");
602
+ ns = new RegExp(qt, "g");
603
+ os$2 = new RegExp(de$1, "g");
604
+ hs = new RegExp(pe$1, "g");
605
+ as = /\\\\/g;
606
+ ls = /\\{/g;
607
+ cs = /\\}/g;
608
+ fs$6 = /\\,/g;
609
+ us = /\\./g;
610
+ ds = 1e5;
594
611
  at = (n) => {
595
612
  if (typeof n != "string") throw new TypeError("invalid pattern");
596
613
  if (n.length > 65536) throw new TypeError("pattern is too long");
@@ -614,7 +631,11 @@ var init_index_min = __esmMin((() => {
614
631
  "[:upper:]": ["\\p{Lu}", !0],
615
632
  "[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
616
633
  "[:xdigit:]": ["A-Fa-f0-9", !1]
617
- }, lt = (n) => n.replace(/[[\]\\-]/g, "\\$&"), Es = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), we$1 = (n) => n.join(""), ye$1 = (n, t) => {
634
+ };
635
+ lt = (n) => n.replace(/[[\]\\-]/g, "\\$&");
636
+ Es = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
637
+ we$1 = (n) => n.join("");
638
+ ye$1 = (n, t) => {
618
639
  let e = t;
619
640
  if (n.charAt(e) !== "[") throw new Error("not in a brace expression");
620
641
  let s = [], i = [], r = e + 1, o = !1, h = !1, a = !1, l = !1, u = e, c = "";
@@ -691,7 +712,18 @@ var init_index_min = __esmMin((() => {
691
712
  "+",
692
713
  "*",
693
714
  "@"
694
- ]), be$1 = (n) => xs.has(n), vs = "(?!(?:^|/)\\.\\.?(?:$|/))", Ct = "(?!\\.)", Cs = /* @__PURE__ */ new Set(["[", "."]), Ts = /* @__PURE__ */ new Set(["..", "."]), As = /* @__PURE__ */ new Set("().*{}+?[]^$\\!"), ks = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), Kt = "[^/]", Se$1 = Kt + "*?", Ee$1 = Kt + "+?", Q$1 = class n {
715
+ ]);
716
+ be$1 = (n) => xs.has(n);
717
+ vs = "(?!(?:^|/)\\.\\.?(?:$|/))";
718
+ Ct = "(?!\\.)";
719
+ Cs = /* @__PURE__ */ new Set(["[", "."]);
720
+ Ts = /* @__PURE__ */ new Set(["..", "."]);
721
+ As = /* @__PURE__ */ new Set("().*{}+?[]^$\\!");
722
+ ks = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
723
+ Kt = "[^/]";
724
+ Se$1 = Kt + "*?";
725
+ Ee$1 = Kt + "+?";
726
+ Q$1 = class n {
695
727
  type;
696
728
  #t;
697
729
  #s;
@@ -932,34 +964,60 @@ var init_index_min = __esmMin((() => {
932
964
  }
933
965
  };
934
966
  tt = (n, { windowsPathsNoEscape: t = !1, magicalBraces: e = !1 } = {}) => e ? t ? n.replace(/[?*()[\]{}]/g, "[$&]") : n.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n.replace(/[?*()[\]]/g, "[$&]") : n.replace(/[?*()[\]\\]/g, "\\$&");
935
- O$2 = (n, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new D(t, e).match(n)), Rs = /^\*+([^+@!?\*\[\(]*)$/, Os = (n) => (t) => !t.startsWith(".") && t.endsWith(n), Fs = (n) => (t) => t.endsWith(n), Ds = (n) => (n = n.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(n)), Ms = (n) => (n = n.toLowerCase(), (t) => t.toLowerCase().endsWith(n)), Ns = /^\*+\.\*+$/, _s = (n) => !n.startsWith(".") && n.includes("."), Ls = (n) => n !== "." && n !== ".." && n.includes("."), Ws = /^\.\*+$/, Ps = (n) => n !== "." && n !== ".." && n.startsWith("."), js = /^\*+$/, Is = (n) => n.length !== 0 && !n.startsWith("."), zs = (n) => n.length !== 0 && n !== "." && n !== "..", Bs = /^\?+([^+@!?\*\[\(]*)?$/, Us = ([n, t = ""]) => {
967
+ O$2 = (n, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new D(t, e).match(n));
968
+ Rs = /^\*+([^+@!?\*\[\(]*)$/;
969
+ Os = (n) => (t) => !t.startsWith(".") && t.endsWith(n);
970
+ Fs = (n) => (t) => t.endsWith(n);
971
+ Ds = (n) => (n = n.toLowerCase(), (t) => !t.startsWith(".") && t.toLowerCase().endsWith(n));
972
+ Ms = (n) => (n = n.toLowerCase(), (t) => t.toLowerCase().endsWith(n));
973
+ Ns = /^\*+\.\*+$/;
974
+ _s = (n) => !n.startsWith(".") && n.includes(".");
975
+ Ls = (n) => n !== "." && n !== ".." && n.includes(".");
976
+ Ws = /^\.\*+$/;
977
+ Ps = (n) => n !== "." && n !== ".." && n.startsWith(".");
978
+ js = /^\*+$/;
979
+ Is = (n) => n.length !== 0 && !n.startsWith(".");
980
+ zs = (n) => n.length !== 0 && n !== "." && n !== "..";
981
+ Bs = /^\?+([^+@!?\*\[\(]*)?$/;
982
+ Us = ([n, t = ""]) => {
936
983
  let e = Ce$1([n]);
937
984
  return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
938
- }, $s = ([n, t = ""]) => {
985
+ };
986
+ $s = ([n, t = ""]) => {
939
987
  let e = Te$1([n]);
940
988
  return t ? (t = t.toLowerCase(), (s) => e(s) && s.toLowerCase().endsWith(t)) : e;
941
- }, Gs = ([n, t = ""]) => {
989
+ };
990
+ Gs = ([n, t = ""]) => {
942
991
  let e = Te$1([n]);
943
992
  return t ? (s) => e(s) && s.endsWith(t) : e;
944
- }, Hs = ([n, t = ""]) => {
993
+ };
994
+ Hs = ([n, t = ""]) => {
945
995
  let e = Ce$1([n]);
946
996
  return t ? (s) => e(s) && s.endsWith(t) : e;
947
- }, Ce$1 = ([n]) => {
997
+ };
998
+ Ce$1 = ([n]) => {
948
999
  let t = n.length;
949
1000
  return (e) => e.length === t && !e.startsWith(".");
950
- }, Te$1 = ([n]) => {
1001
+ };
1002
+ Te$1 = ([n]) => {
951
1003
  let t = n.length;
952
1004
  return (e) => e.length === t && e !== "." && e !== "..";
953
- }, Ae$1 = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix", xe$1 = {
1005
+ };
1006
+ Ae$1 = typeof process == "object" && process ? typeof process.env == "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
1007
+ xe$1 = {
954
1008
  win32: { sep: "\\" },
955
1009
  posix: { sep: "/" }
956
1010
  };
957
1011
  O$2.sep = Ae$1 === "win32" ? xe$1.win32.sep : xe$1.posix.sep;
958
1012
  A$1 = Symbol("globstar **");
959
1013
  O$2.GLOBSTAR = A$1;
960
- Vs = "[^/]*?", Ys = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", Xs = "(?:(?!(?:\\/|^)\\.).)*?", Js = (n, t = {}) => (e) => O$2(e, n, t);
1014
+ Vs = "[^/]*?";
1015
+ Ys = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
1016
+ Xs = "(?:(?!(?:\\/|^)\\.).)*?";
1017
+ Js = (n, t = {}) => (e) => O$2(e, n, t);
961
1018
  O$2.filter = Js;
962
- N$1 = (n, t = {}) => Object.assign({}, n, t), Zs = (n) => {
1019
+ N$1 = (n, t = {}) => Object.assign({}, n, t);
1020
+ Zs = (n) => {
963
1021
  if (!n || typeof n != "object" || !Object.keys(n).length) return O$2;
964
1022
  let t = O$2;
965
1023
  return Object.assign((s, i, r = {}) => t(s, i, N$1(n, r)), {
@@ -1000,7 +1058,9 @@ var init_index_min = __esmMin((() => {
1000
1058
  return n = n.filter((i) => s.match(i)), s.options.nonull && !n.length && n.push(t), n;
1001
1059
  };
1002
1060
  O$2.match = ti;
1003
- ve$1 = /[?*]|[+@!]\(.*?\)|\[|\]/, ei = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), D = class {
1061
+ ve$1 = /[?*]|[+@!]\(.*?\)|\[|\]/;
1062
+ ei = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1063
+ D = class {
1004
1064
  options;
1005
1065
  set;
1006
1066
  pattern;
@@ -1284,9 +1344,14 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1284
1344
  O$2.Minimatch = D;
1285
1345
  O$2.escape = tt;
1286
1346
  O$2.unescape = W;
1287
- si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, Oe = /* @__PURE__ */ new Set(), Vt = typeof process == "object" && process ? process : {}, Fe$1 = (n, t, e, s) => {
1347
+ si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
1348
+ Oe = /* @__PURE__ */ new Set();
1349
+ Vt = typeof process == "object" && process ? process : {};
1350
+ Fe$1 = (n, t, e, s) => {
1288
1351
  typeof Vt.emitWarning == "function" ? Vt.emitWarning(n, t, e, s) : console.error(`[${e}] ${t}: ${n}`);
1289
- }, At = globalThis.AbortController, Re$1 = globalThis.AbortSignal;
1352
+ };
1353
+ At = globalThis.AbortController;
1354
+ Re$1 = globalThis.AbortSignal;
1290
1355
  if (typeof At > "u") {
1291
1356
  Re$1 = class {
1292
1357
  onabort;
@@ -1314,11 +1379,14 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1314
1379
  };
1315
1380
  }
1316
1381
  ii = (n) => !Oe.has(n);
1317
- q$1 = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n), 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, Tt = class extends Array {
1382
+ q$1 = (n) => n && n === Math.floor(n) && n > 0 && isFinite(n);
1383
+ 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;
1384
+ Tt = class extends Array {
1318
1385
  constructor(n) {
1319
1386
  super(n), this.fill(0);
1320
1387
  }
1321
- }, ri = class ct {
1388
+ };
1389
+ ri = class ct {
1322
1390
  heap;
1323
1391
  length;
1324
1392
  static #t = !1;
@@ -1339,7 +1407,8 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1339
1407
  pop() {
1340
1408
  return this.heap[--this.length];
1341
1409
  }
1342
- }, ft = class Me {
1410
+ };
1411
+ ft = class Me {
1343
1412
  #t;
1344
1413
  #s;
1345
1414
  #n;
@@ -1882,7 +1951,47 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1882
1951
  Ne$1 = typeof process == "object" && process ? process : {
1883
1952
  stdout: null,
1884
1953
  stderr: null
1885
- }, oi = (n) => !!n && typeof n == "object" && (n instanceof V || n instanceof Pe || hi(n) || ai(n)), hi = (n) => !!n && typeof n == "object" && n instanceof EventEmitter && typeof n.pipe == "function" && n.pipe !== Pe.Writable.prototype.pipe, ai = (n) => !!n && typeof n == "object" && n instanceof EventEmitter && typeof n.write == "function" && typeof n.end == "function", G = Symbol("EOF"), H$1 = Symbol("maybeEmitEnd"), K$1 = Symbol("emittedEnd"), kt = Symbol("emittingEnd"), ut = Symbol("emittedError"), Rt = Symbol("closed"), _e$1 = Symbol("read"), Ot = Symbol("flush"), Le$1 = Symbol("flushChunk"), P$1 = Symbol("encoding"), et = Symbol("decoder"), v$1 = Symbol("flowing"), dt = Symbol("paused"), st = Symbol("resume"), C$1 = Symbol("buffer"), F = Symbol("pipes"), T$1 = Symbol("bufferLength"), Yt = Symbol("bufferPush"), Ft = Symbol("bufferShift"), k = Symbol("objectMode"), x$1 = Symbol("destroyed"), Xt = Symbol("error"), Jt = Symbol("emitData"), We$1 = Symbol("emitEnd"), Zt = Symbol("emitEnd2"), B = Symbol("async"), Qt = Symbol("abort"), Dt = Symbol("aborted"), pt = Symbol("signal"), Y$1 = Symbol("dataListeners"), M = Symbol("discarded"), mt = (n) => Promise.resolve().then(n), li = (n) => n(), ci = (n) => n === "end" || n === "finish" || n === "prefinish", fi = (n) => n instanceof ArrayBuffer || !!n && typeof n == "object" && n.constructor && n.constructor.name === "ArrayBuffer" && n.byteLength >= 0, ui = (n) => !Buffer.isBuffer(n) && ArrayBuffer.isView(n), Mt = class {
1954
+ };
1955
+ oi = (n) => !!n && typeof n == "object" && (n instanceof V || n instanceof Pe || hi(n) || ai(n));
1956
+ hi = (n) => !!n && typeof n == "object" && n instanceof EventEmitter && typeof n.pipe == "function" && n.pipe !== Pe.Writable.prototype.pipe;
1957
+ ai = (n) => !!n && typeof n == "object" && n instanceof EventEmitter && typeof n.write == "function" && typeof n.end == "function";
1958
+ G = Symbol("EOF");
1959
+ H$1 = Symbol("maybeEmitEnd");
1960
+ K$1 = Symbol("emittedEnd");
1961
+ kt = Symbol("emittingEnd");
1962
+ ut = Symbol("emittedError");
1963
+ Rt = Symbol("closed");
1964
+ _e$1 = Symbol("read");
1965
+ Ot = Symbol("flush");
1966
+ Le$1 = Symbol("flushChunk");
1967
+ P = Symbol("encoding");
1968
+ et = Symbol("decoder");
1969
+ v$1 = Symbol("flowing");
1970
+ dt = Symbol("paused");
1971
+ st = Symbol("resume");
1972
+ C$1 = Symbol("buffer");
1973
+ F = Symbol("pipes");
1974
+ T = Symbol("bufferLength");
1975
+ Yt = Symbol("bufferPush");
1976
+ Ft = Symbol("bufferShift");
1977
+ k = Symbol("objectMode");
1978
+ x$1 = Symbol("destroyed");
1979
+ Xt = Symbol("error");
1980
+ Jt = Symbol("emitData");
1981
+ We$1 = Symbol("emitEnd");
1982
+ Zt = Symbol("emitEnd2");
1983
+ B = Symbol("async");
1984
+ Qt = Symbol("abort");
1985
+ Dt = Symbol("aborted");
1986
+ pt = Symbol("signal");
1987
+ Y$1 = Symbol("dataListeners");
1988
+ M = Symbol("discarded");
1989
+ mt = (n) => Promise.resolve().then(n);
1990
+ li = (n) => n();
1991
+ ci = (n) => n === "end" || n === "finish" || n === "prefinish";
1992
+ fi = (n) => n instanceof ArrayBuffer || !!n && typeof n == "object" && n.constructor && n.constructor.name === "ArrayBuffer" && n.byteLength >= 0;
1993
+ ui = (n) => !Buffer.isBuffer(n) && ArrayBuffer.isView(n);
1994
+ Mt = class {
1886
1995
  src;
1887
1996
  dest;
1888
1997
  opts;
@@ -1897,20 +2006,24 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1897
2006
  end() {
1898
2007
  this.unpipe(), this.opts.end && this.dest.end();
1899
2008
  }
1900
- }, te$1 = class extends Mt {
2009
+ };
2010
+ te$1 = class extends Mt {
1901
2011
  unpipe() {
1902
2012
  this.src.removeListener("error", this.proxyErrors), super.unpipe();
1903
2013
  }
1904
2014
  constructor(t, e, s) {
1905
2015
  super(t, e, s), this.proxyErrors = (i) => this.dest.emit("error", i), t.on("error", this.proxyErrors);
1906
2016
  }
1907
- }, di = (n) => !!n.objectMode, pi = (n) => !n.objectMode && !!n.encoding && n.encoding !== "buffer", V = class extends EventEmitter {
2017
+ };
2018
+ di = (n) => !!n.objectMode;
2019
+ pi = (n) => !n.objectMode && !!n.encoding && n.encoding !== "buffer";
2020
+ V = class extends EventEmitter {
1908
2021
  [v$1] = !1;
1909
2022
  [dt] = !1;
1910
2023
  [F] = [];
1911
2024
  [C$1] = [];
1912
2025
  [k];
1913
- [P$1];
2026
+ [P];
1914
2027
  [B];
1915
2028
  [et];
1916
2029
  [G] = !1;
@@ -1918,7 +2031,7 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1918
2031
  [kt] = !1;
1919
2032
  [Rt] = !1;
1920
2033
  [ut] = null;
1921
- [T$1] = 0;
2034
+ [T] = 0;
1922
2035
  [x$1] = !1;
1923
2036
  [pt];
1924
2037
  [Dt] = !1;
@@ -1929,15 +2042,15 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1929
2042
  constructor(...t) {
1930
2043
  let e = t[0] || {};
1931
2044
  if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
1932
- di(e) ? (this[k] = !0, this[P$1] = null) : pi(e) ? (this[P$1] = e.encoding, this[k] = !1) : (this[k] = !1, this[P$1] = null), this[B] = !!e.async, this[et] = this[P$1] ? new StringDecoder(this[P$1]) : null, e && e.debugExposeBuffer === !0 && Object.defineProperty(this, "buffer", { get: () => this[C$1] }), e && e.debugExposePipes === !0 && Object.defineProperty(this, "pipes", { get: () => this[F] });
2045
+ 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] });
1933
2046
  let { signal: s } = e;
1934
2047
  s && (this[pt] = s, s.aborted ? this[Qt]() : s.addEventListener("abort", () => this[Qt]()));
1935
2048
  }
1936
2049
  get bufferLength() {
1937
- return this[T$1];
2050
+ return this[T];
1938
2051
  }
1939
2052
  get encoding() {
1940
- return this[P$1];
2053
+ return this[P];
1941
2054
  }
1942
2055
  set encoding(t) {
1943
2056
  throw new Error("Encoding must be set at instantiation time");
@@ -1975,12 +2088,12 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1975
2088
  else if (fi(t)) t = Buffer.from(t);
1976
2089
  else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
1977
2090
  }
1978
- return this[k] ? (this[v$1] && this[T$1] !== 0 && this[Ot](!0), this[v$1] ? this.emit("data", t) : this[Yt](t), this[T$1] !== 0 && this.emit("readable"), s && i(s), this[v$1]) : t.length ? (typeof t == "string" && !(e === this[P$1] && !this[et]?.lastNeed) && (t = Buffer.from(t, e)), Buffer.isBuffer(t) && this[P$1] && (t = this[et].write(t)), this[v$1] && this[T$1] !== 0 && this[Ot](!0), this[v$1] ? this.emit("data", t) : this[Yt](t), this[T$1] !== 0 && this.emit("readable"), s && i(s), this[v$1]) : (this[T$1] !== 0 && this.emit("readable"), s && i(s), this[v$1]);
2091
+ 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]);
1979
2092
  }
1980
2093
  read(t) {
1981
2094
  if (this[x$1]) return null;
1982
- if (this[M] = !1, this[T$1] === 0 || t === 0 || t && t > this[T$1]) return this[H$1](), null;
1983
- this[k] && (t = null), this[C$1].length > 1 && !this[k] && (this[C$1] = [this[P$1] ? this[C$1].join("") : Buffer.concat(this[C$1], this[T$1])]);
2095
+ if (this[M] = !1, this[T] === 0 || t === 0 || t && t > this[T]) return this[H$1](), null;
2096
+ 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])]);
1984
2097
  let e = this[_e$1](t || null, this[C$1][0]);
1985
2098
  return this[H$1](), e;
1986
2099
  }
@@ -1988,7 +2101,7 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
1988
2101
  if (this[k]) this[Ft]();
1989
2102
  else {
1990
2103
  let s = e;
1991
- t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C$1][0] = s.slice(t), e = s.slice(0, t), this[T$1] -= t) : (this[C$1][0] = s.subarray(t), e = s.subarray(0, t), this[T$1] -= t);
2104
+ 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);
1992
2105
  }
1993
2106
  return this.emit("data", e), !this[C$1].length && !this[G] && this.emit("drain"), e;
1994
2107
  }
@@ -2014,10 +2127,10 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
2014
2127
  return this[dt];
2015
2128
  }
2016
2129
  [Yt](t) {
2017
- this[k] ? this[T$1] += 1 : this[T$1] += t.length, this[C$1].push(t);
2130
+ this[k] ? this[T] += 1 : this[T] += t.length, this[C$1].push(t);
2018
2131
  }
2019
2132
  [Ft]() {
2020
- return this[k] ? this[T$1] -= 1 : this[T$1] -= this[C$1][0].length, this[C$1].shift();
2133
+ return this[k] ? this[T] -= 1 : this[T] -= this[C$1][0].length, this[C$1].shift();
2021
2134
  }
2022
2135
  [Ot](t = !1) {
2023
2136
  do ;
@@ -2043,7 +2156,7 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2043
2156
  on(t, e) {
2044
2157
  let s = super.on(t, e);
2045
2158
  if (t === "data") this[M] = !1, this[Y$1]++, !this[F].length && !this[v$1] && this[st]();
2046
- else if (t === "readable" && this[T$1] !== 0) super.emit("readable");
2159
+ else if (t === "readable" && this[T] !== 0) super.emit("readable");
2047
2160
  else if (ci(t) && this[K$1]) super.emit(t), this.removeAllListeners(t);
2048
2161
  else if (t === "error" && this[ut]) {
2049
2162
  let i = e;
@@ -2122,7 +2235,7 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2122
2235
  async concat() {
2123
2236
  if (this[k]) throw new Error("cannot concat in objectMode");
2124
2237
  let t = await this.collect();
2125
- return this[P$1] ? t.join("") : Buffer.concat(t, t.dataLength);
2238
+ return this[P] ? t.join("") : Buffer.concat(t, t.dataLength);
2126
2239
  }
2127
2240
  async promise() {
2128
2241
  return new Promise((t, e) => {
@@ -2194,14 +2307,15 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2194
2307
  }
2195
2308
  destroy(t) {
2196
2309
  if (this[x$1]) return t ? this.emit("error", t) : this.emit(x$1), this;
2197
- this[x$1] = !0, this[M] = !0, this[C$1].length = 0, this[T$1] = 0;
2310
+ this[x$1] = !0, this[M] = !0, this[C$1].length = 0, this[T] = 0;
2198
2311
  let e = this;
2199
2312
  return typeof e.close == "function" && !this[Rt] && e.close(), t ? this.emit("error", t) : this.emit(x$1), this;
2200
2313
  }
2201
2314
  static get isStream() {
2202
2315
  return oi;
2203
2316
  }
2204
- }, wt = {
2317
+ };
2318
+ wt = {
2205
2319
  lstatSync,
2206
2320
  readdir,
2207
2321
  readdirSync,
@@ -2213,35 +2327,66 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2213
2327
  readlink,
2214
2328
  realpath
2215
2329
  }
2216
- }, Ue$1 = (n) => !n || n === wt || n === xi ? wt : {
2330
+ };
2331
+ Ue$1 = (n) => !n || n === wt || n === xi ? wt : {
2217
2332
  ...wt,
2218
2333
  ...n,
2219
2334
  promises: {
2220
2335
  ...wt.promises,
2221
2336
  ...n.promises || {}
2222
2337
  }
2223
- }, $e$1 = /^\\\\\?\\([a-z]:)\\?$/i, Ri = (n) => n.replace(/\//g, "\\").replace($e$1, "$1\\"), Oi = /[\\\/]/, L = 0, Ge$1 = 1, He$1 = 2, U = 4, qe$1 = 6, Ke$1 = 8, X$1 = 10, Ve$1 = 12, _$1 = 15, gt = ~_$1, se$1 = 16, je$1 = 32, yt = 64, j = 128, Nt = 256, Lt = 512, Ie = yt | j | Lt, Fi = 1023, 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, ze$1 = new ft({ max: 2 ** 12 }), bt = (n) => {
2338
+ };
2339
+ $e$1 = /^\\\\\?\\([a-z]:)\\?$/i;
2340
+ Ri = (n) => n.replace(/\//g, "\\").replace($e$1, "$1\\");
2341
+ Oi = /[\\\/]/;
2342
+ L = 0;
2343
+ Ge$1 = 1;
2344
+ He$1 = 2;
2345
+ U = 4;
2346
+ qe$1 = 6;
2347
+ Ke$1 = 8;
2348
+ X$1 = 10;
2349
+ Ve$1 = 12;
2350
+ _$1 = 15;
2351
+ gt = ~_$1;
2352
+ se$1 = 16;
2353
+ je$1 = 32;
2354
+ yt = 64;
2355
+ j = 128;
2356
+ Nt = 256;
2357
+ Lt = 512;
2358
+ Ie = yt | j | Lt;
2359
+ Fi = 1023;
2360
+ 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;
2361
+ ze$1 = new ft({ max: 2 ** 12 });
2362
+ bt = (n) => {
2224
2363
  let t = ze$1.get(n);
2225
2364
  if (t) return t;
2226
2365
  let e = n.normalize("NFKD");
2227
2366
  return ze$1.set(n, e), e;
2228
- }, Be$1 = new ft({ max: 2 ** 12 }), _t = (n) => {
2367
+ };
2368
+ Be$1 = new ft({ max: 2 ** 12 });
2369
+ _t = (n) => {
2229
2370
  let t = Be$1.get(n);
2230
2371
  if (t) return t;
2231
2372
  let e = bt(n.toLowerCase());
2232
2373
  return Be$1.set(n, e), e;
2233
- }, Wt = class extends ft {
2374
+ };
2375
+ Wt = class extends ft {
2234
2376
  constructor() {
2235
2377
  super({ max: 256 });
2236
2378
  }
2237
- }, ne$1 = class extends ft {
2379
+ };
2380
+ ne$1 = class extends ft {
2238
2381
  constructor(t = 16 * 1024) {
2239
2382
  super({
2240
2383
  maxSize: t,
2241
2384
  sizeCalculation: (e) => e.length + 1
2242
2385
  });
2243
2386
  }
2244
- }, Ye$1 = Symbol("PathScurry setAsCwd"), R$2 = class {
2387
+ };
2388
+ Ye$1 = Symbol("PathScurry setAsCwd");
2389
+ R$2 = class {
2245
2390
  name;
2246
2391
  root;
2247
2392
  roots;
@@ -2654,7 +2799,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2654
2799
  for (; i && i.parent;) e.add(i), i.#x = s.join(this.sep), i.#A = s.join("/"), i = i.parent, s.push("..");
2655
2800
  for (i = t; i && i.parent && !e.has(i);) i.#x = void 0, i.#A = void 0, i = i.parent;
2656
2801
  }
2657
- }, Pt = class n extends R$2 {
2802
+ };
2803
+ Pt = class n extends R$2 {
2658
2804
  sep = "\\";
2659
2805
  splitSep = Oi;
2660
2806
  constructor(t, e = L, s, i, r, o, h) {
@@ -2674,7 +2820,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2674
2820
  sameRoot(t, e = this.root.name) {
2675
2821
  return t = t.toUpperCase().replace(/\//g, "\\").replace($e$1, "$1\\"), t === e;
2676
2822
  }
2677
- }, jt = class n extends R$2 {
2823
+ };
2824
+ jt = class n extends R$2 {
2678
2825
  splitSep = "/";
2679
2826
  sep = "/";
2680
2827
  constructor(t, e = L, s, i, r, o, h) {
@@ -2689,7 +2836,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2689
2836
  newChild(t, e = L, s = {}) {
2690
2837
  return new n(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
2691
2838
  }
2692
- }, It = class {
2839
+ };
2840
+ It = class {
2693
2841
  root;
2694
2842
  rootPath;
2695
2843
  roots;
@@ -2933,7 +3081,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2933
3081
  let e = this.cwd;
2934
3082
  this.cwd = typeof t == "string" ? this.cwd.resolve(t) : t, this.cwd[Ye$1](e);
2935
3083
  }
2936
- }, it = class extends It {
3084
+ };
3085
+ it = class extends It {
2937
3086
  sep = "\\";
2938
3087
  constructor(t = process.cwd(), e = {}) {
2939
3088
  let { nocase: s = !0 } = e;
@@ -2952,7 +3101,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2952
3101
  isAbsolute(t) {
2953
3102
  return t.startsWith("/") || t.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(t);
2954
3103
  }
2955
- }, rt = class extends It {
3104
+ };
3105
+ rt = class extends It {
2956
3106
  sep = "/";
2957
3107
  constructor(t = process.cwd(), e = {}) {
2958
3108
  let { nocase: s = !1 } = e;
@@ -2970,7 +3120,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2970
3120
  isAbsolute(t) {
2971
3121
  return t.startsWith("/");
2972
3122
  }
2973
- }, St = class extends rt {
3123
+ };
3124
+ St = class extends rt {
2974
3125
  constructor(t = process.cwd(), e = {}) {
2975
3126
  let { nocase: s = !0 } = e;
2976
3127
  super(t, {
@@ -2981,7 +3132,10 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
2981
3132
  };
2982
3133
  process.platform;
2983
3134
  Xe$1 = process.platform === "win32" ? it : process.platform === "darwin" ? St : rt;
2984
- Di = (n) => n.length >= 1, Mi = (n) => n.length >= 1, Ni = Symbol.for("nodejs.util.inspect.custom"), nt = class n {
3135
+ Di = (n) => n.length >= 1;
3136
+ Mi = (n) => n.length >= 1;
3137
+ Ni = Symbol.for("nodejs.util.inspect.custom");
3138
+ nt = class n {
2985
3139
  #t;
2986
3140
  #s;
2987
3141
  #n;
@@ -3071,7 +3225,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
3071
3225
  return this.#n === 0 || !this.isGlobstar() || !this.#u ? !1 : (this.#u = !1, !0);
3072
3226
  }
3073
3227
  };
3074
- _i = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", ot = class {
3228
+ _i = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
3229
+ ot = class {
3075
3230
  relative;
3076
3231
  relativeChildren;
3077
3232
  absolute;
@@ -3130,7 +3285,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
3130
3285
  let s = t.fullpath(), i = this.store.get(s);
3131
3286
  i ? i.add(e.globString()) : this.store.set(s, /* @__PURE__ */ new Set([e.globString()]));
3132
3287
  }
3133
- }, he$1 = class {
3288
+ };
3289
+ he$1 = class {
3134
3290
  store = /* @__PURE__ */ new Map();
3135
3291
  add(t, e, s) {
3136
3292
  let i = (e ? 2 : 0) | (s ? 1 : 0), r = this.store.get(t);
@@ -3143,7 +3299,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
3143
3299
  !!(e & 1)
3144
3300
  ]);
3145
3301
  }
3146
- }, ae$1 = class {
3302
+ };
3303
+ ae$1 = class {
3147
3304
  store = /* @__PURE__ */ new Map();
3148
3305
  add(t, e) {
3149
3306
  if (!t.canReaddir()) return;
@@ -3161,7 +3318,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
3161
3318
  keys() {
3162
3319
  return [...this.store.keys()].filter((t) => t.canReaddir());
3163
3320
  }
3164
- }, Et = class n {
3321
+ };
3322
+ Et = class n {
3165
3323
  hasWalkedCache;
3166
3324
  matches = new he$1();
3167
3325
  subwalks = new ae$1();
@@ -3241,7 +3399,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
3241
3399
  t.isNamed(e) && (s ? this.subwalks.add(t, s) : this.matches.add(t, i, !1));
3242
3400
  }
3243
3401
  };
3244
- Li = (n, t) => typeof n == "string" ? new ot([n], t) : Array.isArray(n) ? new ot(n, t) : n, zt = class {
3402
+ Li = (n, t) => typeof n == "string" ? new ot([n], t) : Array.isArray(n) ? new ot(n, t) : n;
3403
+ zt = class {
3245
3404
  path;
3246
3405
  patterns;
3247
3406
  opts;
@@ -3397,7 +3556,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
3397
3556
  for (let [h, a] of s.subwalks.entries()) r++, this.walkCB2Sync(h, a, s.child(), o);
3398
3557
  o();
3399
3558
  }
3400
- }, xt = class extends zt {
3559
+ };
3560
+ xt = class extends zt {
3401
3561
  matches = /* @__PURE__ */ new Set();
3402
3562
  constructor(t, e, s) {
3403
3563
  super(t, e, s);
@@ -3419,7 +3579,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
3419
3579
  if (this.signal?.aborted) throw this.signal.reason;
3420
3580
  }), this.matches;
3421
3581
  }
3422
- }, vt = class extends zt {
3582
+ };
3583
+ vt = class extends zt {
3423
3584
  results;
3424
3585
  constructor(t, e, s) {
3425
3586
  super(t, e, s), this.results = new V({
@@ -3440,7 +3601,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
3440
3601
  return this.path.isUnknown() && this.path.lstatSync(), this.walkCBSync(this.path, this.patterns, () => this.results.end()), this.results;
3441
3602
  }
3442
3603
  };
3443
- Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux", I$1 = class {
3604
+ Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
3605
+ I$1 = class {
3444
3606
  absolute;
3445
3607
  cwd;
3446
3608
  root;
@@ -3564,10 +3726,15 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
3564
3726
  for (let e of n) if (new D(e, t).hasMagic()) return !0;
3565
3727
  return !1;
3566
3728
  };
3567
- ji = Bt, Ii = Object.assign(Qe$1, { sync: Bt }), zi = Ut, Bi = Object.assign(es, { sync: Ut }), Ui = Object.assign(ts$1, {
3729
+ ji = Bt;
3730
+ Ii = Object.assign(Qe$1, { sync: Bt });
3731
+ zi = Ut;
3732
+ Bi = Object.assign(es, { sync: Ut });
3733
+ Ui = Object.assign(ts$1, {
3568
3734
  stream: Bt,
3569
3735
  iterate: Ut
3570
- }), Ze$1 = Object.assign(Je$1, {
3736
+ });
3737
+ Ze$1 = Object.assign(Je$1, {
3571
3738
  glob: Je$1,
3572
3739
  globSync: ts$1,
3573
3740
  sync: Ui,
@@ -5267,7 +5434,9 @@ var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
5267
5434
  //#endregion
5268
5435
  //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
5269
5436
  var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5270
- let p = process || {}, argv = p.argv || [], env = p.env || {};
5437
+ let p = process || {};
5438
+ let argv = p.argv || [];
5439
+ let env = p.env || {};
5271
5440
  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);
5272
5441
  let formatter = (open, close, replace = open) => (input) => {
5273
5442
  let string = "" + input, index = string.indexOf(close, open.length);
@@ -8437,7 +8606,8 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8437
8606
  } else throw new YAMLException("code point within a string may not be greater than 0xFFFFFFFF");
8438
8607
  return "\\" + handle + common.repeat("0", length - string.length) + string;
8439
8608
  }
8440
- var QUOTING_TYPE_SINGLE = 1, QUOTING_TYPE_DOUBLE = 2;
8609
+ var QUOTING_TYPE_SINGLE = 1;
8610
+ var QUOTING_TYPE_DOUBLE = 2;
8441
8611
  function State(options) {
8442
8612
  this.schema = options["schema"] || DEFAULT_SCHEMA;
8443
8613
  this.indent = Math.max(1, options["indent"] || 2);
@@ -8518,7 +8688,11 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
8518
8688
  function needIndentIndicator(string) {
8519
8689
  return /^\n* /.test(string);
8520
8690
  }
8521
- var STYLE_PLAIN = 1, STYLE_SINGLE = 2, STYLE_LITERAL = 3, STYLE_FOLDED = 4, STYLE_DOUBLE = 5;
8691
+ var STYLE_PLAIN = 1;
8692
+ var STYLE_SINGLE = 2;
8693
+ var STYLE_LITERAL = 3;
8694
+ var STYLE_FOLDED = 4;
8695
+ var STYLE_DOUBLE = 5;
8522
8696
  function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
8523
8697
  var i;
8524
8698
  var char = 0;
@@ -9661,8 +9835,8 @@ var require_ExplorerSync = /* @__PURE__ */ __commonJSMin(((exports) => {
9661
9835
  exports.ExplorerSync = ExplorerSync;
9662
9836
  }));
9663
9837
  //#endregion
9664
- //#region src/lib/loadConfig.ts
9665
- var import_dist = (/* @__PURE__ */ __commonJSMin(((exports) => {
9838
+ //#region ../../node_modules/.pnpm/cosmiconfig@9.0.2_typescript@6.0.3/node_modules/cosmiconfig/dist/index.js
9839
+ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
9666
9840
  Object.defineProperty(exports, "__esModule", { value: true });
9667
9841
  exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = void 0;
9668
9842
  exports.cosmiconfig = cosmiconfig;
@@ -9794,7 +9968,111 @@ var import_dist = (/* @__PURE__ */ __commonJSMin(((exports) => {
9794
9968
  clearCaches: explorer.clearCaches.bind(explorer)
9795
9969
  };
9796
9970
  }
9797
- })))();
9971
+ }));
9972
+ //#endregion
9973
+ //#region src/lib/ruleCommandRegistry.ts
9974
+ const RULE_COMMANDS = {
9975
+ apiExposure: {
9976
+ command: "api-exposure",
9977
+ configKey: "apiExposure",
9978
+ includeInRoot: true,
9979
+ title: "API Exposure Rules"
9980
+ },
9981
+ check: {
9982
+ command: "check",
9983
+ includeInRoot: true,
9984
+ title: "Check Rules"
9985
+ },
9986
+ cycle: {
9987
+ command: "cycle",
9988
+ includeInRoot: true,
9989
+ title: "Cycle Rules"
9990
+ },
9991
+ dead: {
9992
+ command: "dead",
9993
+ configKey: "dead",
9994
+ includeInRoot: true,
9995
+ title: "Dead Rules"
9996
+ },
9997
+ deplint: {
9998
+ command: "deplint",
9999
+ configKey: "deplint",
10000
+ includeInRoot: true,
10001
+ title: "Deplint Rules"
10002
+ },
10003
+ fix: {
10004
+ command: "fix",
10005
+ includeInRoot: false,
10006
+ title: "Fix Rules"
10007
+ },
10008
+ gitLint: {
10009
+ aliases: ["gitlint"],
10010
+ command: "git lint",
10011
+ configKey: "gitLint",
10012
+ includeInRoot: true,
10013
+ title: "Git Lint Rules"
10014
+ },
10015
+ lint: {
10016
+ aliases: ["relint"],
10017
+ command: "lint",
10018
+ includeInRoot: true,
10019
+ title: "Lint Rules"
10020
+ },
10021
+ lintLint: {
10022
+ aliases: ["lintlint"],
10023
+ command: "lint lint",
10024
+ configKey: "lintLint",
10025
+ includeInRoot: true,
10026
+ title: "Lint Lint Rules"
10027
+ },
10028
+ nodeLint: {
10029
+ aliases: ["node-lint"],
10030
+ command: "node lint",
10031
+ configKey: "nodeLint",
10032
+ includeInRoot: true,
10033
+ title: "Node Lint Rules"
10034
+ },
10035
+ packman: {
10036
+ command: "packman lint",
10037
+ configKey: "packman",
10038
+ includeInRoot: true,
10039
+ title: "Packman Lint Rules"
10040
+ },
10041
+ publint: {
10042
+ aliases: ["republint"],
10043
+ command: "publint",
10044
+ configKey: "publint",
10045
+ includeInRoot: true,
10046
+ title: "Publint Rules"
10047
+ },
10048
+ repoLint: {
10049
+ command: "repo lint",
10050
+ configKey: "repoLint",
10051
+ includeInRoot: true,
10052
+ title: "Repo Lint Rules"
10053
+ },
10054
+ skillsLint: {
10055
+ command: "skills lint",
10056
+ configKey: "skillsLint",
10057
+ includeInRoot: true,
10058
+ title: "Skills Lint Rules"
10059
+ }
10060
+ };
10061
+ const DEPRECATED_CONFIG_KEY_ALIASES = {
10062
+ gitLint: ["gitlint"],
10063
+ lintLint: ["lintlint"]
10064
+ };
10065
+ const CONFIG_ALIAS_TO_CANONICAL = new Map(Object.entries(DEPRECATED_CONFIG_KEY_ALIASES).flatMap(([canonical, aliases]) => aliases.map((alias) => [alias, canonical])));
10066
+ const RULE_CONFIG_COMMAND_KEYS = new Set(Object.values(RULE_COMMANDS).flatMap((command) => "configKey" in command ? [command.configKey] : []));
10067
+ function canonicalRuleConfigKey(commandName) {
10068
+ return CONFIG_ALIAS_TO_CANONICAL.get(commandName) ?? commandName;
10069
+ }
10070
+ function deprecatedRuleConfigAliases(configKey) {
10071
+ return Object.entries(DEPRECATED_CONFIG_KEY_ALIASES).find(([canonical]) => canonical === configKey)?.[1] ?? [];
10072
+ }
10073
+ //#endregion
10074
+ //#region src/lib/loadConfig.ts
10075
+ var import_dist = require_dist();
9798
10076
  const configState = {
9799
10077
  config: void 0,
9800
10078
  rootConfigPath: void 0
@@ -9842,21 +10120,30 @@ async function loadWorkspaceConfig(workspaceDir) {
9842
10120
  }
9843
10121
  /** Deprecated top-level fields that should be under `commands`. */
9844
10122
  const DEPRECATED_COMMAND_FIELDS = /* @__PURE__ */ new Set(["deplint", "publint"]);
10123
+ function warnOnce(key, message) {
10124
+ if (deprecationWarned.has(key)) return;
10125
+ deprecationWarned.add(key);
10126
+ console.warn(chalk.yellow(message));
10127
+ }
9845
10128
  /**
9846
10129
  * Resolves a command's config field from a config object.
9847
10130
  * Prefers `commands.[name]` over top-level `[name]`.
9848
10131
  * Warns once per config file when a deprecated top-level field is used.
9849
10132
  */
9850
10133
  function resolveCommandField(cfg, commandName, configPath) {
9851
- const fromCommands = cfg.commands?.[commandName];
9852
- if (fromCommands !== void 0 && typeof fromCommands === "object") return fromCommands;
9853
- const fromTopLevel = cfg[commandName];
9854
- if (fromTopLevel !== void 0 && typeof fromTopLevel === "object" && DEPRECATED_COMMAND_FIELDS.has(commandName)) {
9855
- const key = `${configPath ?? "unknown"}:${commandName}`;
9856
- if (!deprecationWarned.has(key)) {
9857
- deprecationWarned.add(key);
9858
- console.warn(chalk.yellow(`[xy] Deprecated: top-level "${commandName}" in ${configPath ?? "xy.config"} — move to "commands.${commandName}"`));
9859
- }
10134
+ const configKey = canonicalRuleConfigKey(commandName);
10135
+ const commands = isRecord$1(cfg.commands) ? cfg.commands : void 0;
10136
+ const fromCommands = commands?.[configKey];
10137
+ if (isRecord$1(fromCommands)) return fromCommands;
10138
+ for (const alias of deprecatedRuleConfigAliases(configKey)) {
10139
+ const fromAlias = commands?.[alias];
10140
+ if (!isRecord$1(fromAlias)) continue;
10141
+ warnOnce(`${configPath ?? "unknown"}:commands.${alias}`, `[xy] Deprecated: "commands.${alias}" in ${configPath ?? "xy.config"} — use "commands.${configKey}"`);
10142
+ return fromAlias;
10143
+ }
10144
+ const fromTopLevel = cfg[configKey];
10145
+ if (fromTopLevel !== void 0 && typeof fromTopLevel === "object" && DEPRECATED_COMMAND_FIELDS.has(configKey)) {
10146
+ warnOnce(`${configPath ?? "unknown"}:${configKey}`, `[xy] Deprecated: top-level "${configKey}" in ${configPath ?? "xy.config"} — move to "commands.${configKey}"`);
9860
10147
  return fromTopLevel;
9861
10148
  }
9862
10149
  return {};
@@ -9868,20 +10155,9 @@ function mergeRuleConfigs(target, source) {
9868
10155
  };
9869
10156
  return source;
9870
10157
  }
9871
- const RULE_CONFIG_COMMANDS = /* @__PURE__ */ new Set([
9872
- "apiExposure",
9873
- "dead",
9874
- "deplint",
9875
- "gitlint",
9876
- "lintlint",
9877
- "nodeLint",
9878
- "packman",
9879
- "publint",
9880
- "repoLint",
9881
- "skillsLint"
9882
- ]);
9883
10158
  function mergeCommandConfig(rootCmd, workspaceCmd, commandName) {
9884
- return deepMerge$1(rootCmd, workspaceCmd, { customMerge: (key) => RULE_CONFIG_COMMANDS.has(commandName) && key === "rules" ? mergeRuleConfigs : void 0 });
10159
+ const configKey = canonicalRuleConfigKey(commandName);
10160
+ return deepMerge$1(rootCmd, workspaceCmd, { customMerge: (key) => RULE_CONFIG_COMMAND_KEYS.has(configKey) && key === "rules" ? mergeRuleConfigs : void 0 });
9885
10161
  }
9886
10162
  /**
9887
10163
  * Loads a command-specific config merged from root and workspace levels.
@@ -9904,8 +10180,9 @@ function isWorkspaceUnderRootConfig(workspaceDir) {
9904
10180
  return relative === "" || !relative.startsWith("..") && !PATH.isAbsolute(relative);
9905
10181
  }
9906
10182
  async function loadWorkspaceCommandConfig(workspaceDir, commandName) {
10183
+ const configKey = canonicalRuleConfigKey(commandName);
9907
10184
  const root = await loadConfig();
9908
- return mergeCommandConfig(isWorkspaceUnderRootConfig(workspaceDir) ? resolveCommandField(root, commandName, configState.rootConfigPath) : {}, resolveCommandField(await loadWorkspaceConfig(workspaceDir), commandName, workspaceConfigCache.has(workspaceDir) ? workspaceDir : void 0), commandName);
10185
+ return mergeCommandConfig(isWorkspaceUnderRootConfig(workspaceDir) ? resolveCommandField(root, configKey, configState.rootConfigPath) : {}, resolveCommandField(await loadWorkspaceConfig(workspaceDir), configKey, workspaceConfigCache.has(workspaceDir) ? workspaceDir : void 0), configKey);
9909
10186
  }
9910
10187
  //#endregion
9911
10188
  //#region ../../node_modules/.pnpm/balanced-match@4.0.4/node_modules/balanced-match/dist/esm/index.js
@@ -12257,7 +12534,17 @@ const customEntryOutputName = (entry) => {
12257
12534
  const entryOutputBasename = (entry, entryMode) => {
12258
12535
  if (entryMode === "custom") return customEntryOutputName(entry);
12259
12536
  return PATH.posix.parse(normalizeEntryPath(entry)).name;
12260
- }, A = (r) => r !== null && typeof r == "object", a = (r, t) => Object.assign(/* @__PURE__ */ new Error(`[${r}]: ${t}`), { code: r }), _ = "ERR_INVALID_PACKAGE_CONFIG", E$1 = "ERR_INVALID_PACKAGE_TARGET", I = "ERR_PACKAGE_PATH_NOT_EXPORTED", R$1 = /^\d+$/, O$1 = /^(\.{1,2}|node_modules)$/i, w = /\/|\\/;
12537
+ };
12538
+ //#endregion
12539
+ //#region ../../node_modules/.pnpm/resolve-pkg-maps@1.0.0/node_modules/resolve-pkg-maps/dist/index.mjs
12540
+ const A = (r) => r !== null && typeof r == "object";
12541
+ const a = (r, t) => Object.assign(/* @__PURE__ */ new Error(`[${r}]: ${t}`), { code: r });
12542
+ const _ = "ERR_INVALID_PACKAGE_CONFIG";
12543
+ const E$1 = "ERR_INVALID_PACKAGE_TARGET";
12544
+ const I = "ERR_PACKAGE_PATH_NOT_EXPORTED";
12545
+ const R$1 = /^\d+$/;
12546
+ const O$1 = /^(\.{1,2}|node_modules)$/i;
12547
+ const w = /\/|\\/;
12261
12548
  var h$1 = ((r) => (r.Export = "exports", r.Import = "imports", r))(h$1 || {});
12262
12549
  const f = (r, t, e, o, c) => {
12263
12550
  if (t == null) return [];
@@ -12275,7 +12562,9 @@ const f = (r, t, e, o, c) => {
12275
12562
  return [];
12276
12563
  }
12277
12564
  throw a(E$1, `Invalid "${r}" target "${t}"`);
12278
- }, s = "*", m = (r, t) => {
12565
+ };
12566
+ const s = "*";
12567
+ const m = (r, t) => {
12279
12568
  const e = r.indexOf(s), o = t.indexOf(s);
12280
12569
  return e === o ? t.length > r.length : o > e;
12281
12570
  };
@@ -12295,7 +12584,9 @@ const p = (r) => Object.keys(r).reduce((t, e) => {
12295
12584
  const o = e === "" || e[0] !== ".";
12296
12585
  if (t === void 0 || t === o) return o;
12297
12586
  throw a(_, "\"exports\" cannot contain some keys starting with \".\" and some not");
12298
- }, void 0), u = /^\w+:/, v = (r, t, e) => {
12587
+ }, void 0);
12588
+ const u = /^\w+:/;
12589
+ const v = (r, t, e) => {
12299
12590
  if (!r) throw new Error("\"exports\" is required");
12300
12591
  t = t === "" ? "." : `./${t}`, (typeof r == "string" || Array.isArray(r) || A(r) && p(r)) && (r = { ".": r });
12301
12592
  const [o, c] = d(r, t), n = f(h$1.Export, r[o], t, e, c);
@@ -12321,7 +12612,11 @@ const K = r((e) => {
12321
12612
  let l = s == null ? void 0 : s.get(o);
12322
12613
  return l === void 0 && (l = Reflect.apply(t, fs, n), s?.set(o, l)), l;
12323
12614
  };
12324
- }, "cacheFs"), x = K("existsSync"), Se = K("readFileSync"), Q = K("statSync"), O = r((e, t, s) => {
12615
+ }, "cacheFs");
12616
+ const x = K("existsSync");
12617
+ const Se = K("readFileSync");
12618
+ const Q = K("statSync");
12619
+ const O = r((e, t, s) => {
12325
12620
  for (;;) {
12326
12621
  const n = PATH.posix.join(e, t);
12327
12622
  if (x(s, n)) return n;
@@ -12329,7 +12624,9 @@ const K = r((e) => {
12329
12624
  if (o === e) return;
12330
12625
  e = o;
12331
12626
  }
12332
- }, "findUp"), C = /^\.{1,2}(\/.*)?$/, H = r((e) => {
12627
+ }, "findUp");
12628
+ const C = /^\.{1,2}(\/.*)?$/;
12629
+ const H = r((e) => {
12333
12630
  const t = h(e);
12334
12631
  return C.test(t) ? t : `./${t}`;
12335
12632
  }, "normalizeRelativePath");
@@ -12747,10 +13044,14 @@ var de;
12747
13044
  (function(e) {
12748
13045
  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";
12749
13046
  })(de || (de = {}));
12750
- const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicitBaseUrl"), E = "${configDir}", Me = r(() => {
13047
+ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc");
13048
+ const ne = Symbol("implicitBaseUrl");
13049
+ const E = "${configDir}";
13050
+ const Me = r(() => {
12751
13051
  const { findPnpApi: e } = Be;
12752
13052
  return e && e(process.cwd());
12753
- }, "getPnpApi"), te = r((e, t, s, n) => {
13053
+ }, "getPnpApi");
13054
+ const te = r((e, t, s, n) => {
12754
13055
  const o = `resolveFromPackageJsonPath:${e}:${t}:${s}`;
12755
13056
  if (n != null && n.has(o)) return n.get(o);
12756
13057
  const l = we(e, n);
@@ -12764,7 +13065,10 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
12764
13065
  }
12765
13066
  else !t && l.tsconfig && (i = l.tsconfig);
12766
13067
  return i = PATH.join(e, "..", i), n?.set(o, i), i;
12767
- }, "resolveFromPackageJsonPath"), se = "package.json", le = "tsconfig.json", Ve = r((e, t, s) => {
13068
+ }, "resolveFromPackageJsonPath");
13069
+ const se = "package.json";
13070
+ const le = "tsconfig.json";
13071
+ const Ve = r((e, t, s) => {
12768
13072
  let n = e;
12769
13073
  if (e === ".." && (n = PATH.join(n, le)), e[0] === "." && (n = PATH.resolve(t, n)), PATH.isAbsolute(n)) {
12770
13074
  if (x(s, n)) {
@@ -12820,18 +13124,23 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
12820
13124
  if (x(s, p)) return p;
12821
13125
  } else if (_) return d;
12822
13126
  }
12823
- }, "resolveExtendsPath"), oe = r((e, t) => H(PATH.relative(e, t)), "pathRelative"), be = [
13127
+ }, "resolveExtendsPath");
13128
+ const oe = r((e, t) => H(PATH.relative(e, t)), "pathRelative");
13129
+ const be = [
12824
13130
  "files",
12825
13131
  "include",
12826
13132
  "exclude"
12827
- ], N = r((e, t, s) => {
13133
+ ];
13134
+ const N = r((e, t, s) => {
12828
13135
  const n = PATH.join(t, s);
12829
13136
  return h(PATH.relative(e, n)) || "./";
12830
- }, "resolveAndRelativize"), ze = r((e, t, s) => {
13137
+ }, "resolveAndRelativize");
13138
+ const ze = r((e, t, s) => {
12831
13139
  const n = PATH.relative(e, t);
12832
13140
  if (!n) return s;
12833
13141
  return h(`${n}/${s.startsWith("./") ? s.slice(2) : s}`);
12834
- }, "prefixPattern"), Ge = r((e, t, s, n) => {
13142
+ }, "prefixPattern");
13143
+ const Ge = r((e, t, s, n) => {
12835
13144
  const o = Ve(e, t, n);
12836
13145
  if (!o) throw new Error(`File '${e}' not found.`);
12837
13146
  if (s.has(o)) throw new Error(`Circularity detected while resolving configuration: ${o}`);
@@ -12858,7 +13167,9 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
12858
13167
  g && (i[u] = g.map((w) => w.startsWith(E) ? w : ze(t, l, w)));
12859
13168
  }
12860
13169
  return i;
12861
- }, "resolveExtends"), ve = ["outDir", "declarationDir"], pe = r((e, t, s = /* @__PURE__ */ new Set()) => {
13170
+ }, "resolveExtends");
13171
+ const ve = ["outDir", "declarationDir"];
13172
+ const pe = r((e, t, s = /* @__PURE__ */ new Set()) => {
12862
13173
  let n;
12863
13174
  try {
12864
13175
  n = we(e, t) || {};
@@ -12908,16 +13219,19 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
12908
13219
  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());
12909
13220
  }
12910
13221
  return n;
12911
- }, "_parseTsconfig"), Y = r((e, t) => {
13222
+ }, "_parseTsconfig");
13223
+ const Y = r((e, t) => {
12912
13224
  if (e.startsWith(E)) return h(PATH.join(t, e.slice(12)));
12913
- }, "interpolateConfigDir"), Qe = [
13225
+ }, "interpolateConfigDir");
13226
+ const Qe = [
12914
13227
  "outDir",
12915
13228
  "declarationDir",
12916
13229
  "outFile",
12917
13230
  "rootDir",
12918
13231
  "baseUrl",
12919
13232
  "tsBuildInfoFile"
12920
- ], He = r((e) => {
13233
+ ];
13234
+ const He = r((e) => {
12921
13235
  if (e.strict) for (const I of [
12922
13236
  "noImplicitAny",
12923
13237
  "noImplicitThis",
@@ -12946,7 +13260,8 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
12946
13260
  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);
12947
13261
  }
12948
13262
  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);
12949
- }, "normalizeCompilerOptions"), ie = r((e, t = /* @__PURE__ */ new Map()) => {
13263
+ }, "normalizeCompilerOptions");
13264
+ const ie = r((e, t = /* @__PURE__ */ new Map()) => {
12950
13265
  const s = PATH.resolve(e), n = pe(s, t), o = PATH.dirname(s), { compilerOptions: l } = n;
12951
13266
  if (l) {
12952
13267
  for (const f of Qe) {
@@ -12979,7 +13294,8 @@ const we = r((e, t) => Je(Se(t, e, "utf8")), "readJsonc"), ne = Symbol("implicit
12979
13294
  }
12980
13295
  return n;
12981
13296
  }, "parseTsconfig");
12982
- var Xe = Object.defineProperty, Z = r((e, t) => Xe(e, "name", {
13297
+ var Xe = Object.defineProperty;
13298
+ var Z = r((e, t) => Xe(e, "name", {
12983
13299
  value: t,
12984
13300
  configurable: !0
12985
13301
  }), "s");
@@ -13774,6 +14090,230 @@ const packageCompileEsbuild = async (config, mode = {}) => {
13774
14090
  return nodeErrors + browserErrors + neutralErrors;
13775
14091
  };
13776
14092
  //#endregion
14093
+ //#region src/actions/package/compile/monolithReexport.ts
14094
+ function normalizeReexportTargets(value) {
14095
+ if (value === void 0) return [];
14096
+ return Array.isArray(value) ? value : [value];
14097
+ }
14098
+ /** Package-like specifier: not a hash alias and not a relative/absolute path. */
14099
+ function isPackageLikeSpecifier(spec) {
14100
+ return !spec.startsWith("#") && !spec.startsWith(".") && !spec.startsWith("/");
14101
+ }
14102
+ /** Configured `reexport` targets for a module, if any. */
14103
+ function moduleReexportTargets(mod) {
14104
+ return normalizeReexportTargets(mod.reexport);
14105
+ }
14106
+ function moduleHasReexport(mod) {
14107
+ return moduleReexportTargets(mod).length > 0;
14108
+ }
14109
+ /**
14110
+ * Master-barrel re-export targets for a module: explicit `barrelFrom`, else
14111
+ * `reexport`, else `#<name>`.
14112
+ */
14113
+ function moduleBarrelTargets(mod) {
14114
+ const fromBarrel = normalizeReexportTargets(mod.barrelFrom);
14115
+ if (fromBarrel.length > 0) return fromBarrel;
14116
+ const fromReexport = moduleReexportTargets(mod);
14117
+ if (fromReexport.length > 0) return fromReexport;
14118
+ return [`#${mod.name}`];
14119
+ }
14120
+ /**
14121
+ * Subpath shim re-export targets: explicit `shimFrom`, else `reexport`, else
14122
+ * `#<name>`.
14123
+ */
14124
+ function moduleShimTargets(mod) {
14125
+ const fromShim = normalizeReexportTargets(mod.shimFrom);
14126
+ if (fromShim.length > 0) return fromShim;
14127
+ const fromReexport = moduleReexportTargets(mod);
14128
+ if (fromReexport.length > 0) return fromReexport;
14129
+ return [`#${mod.name}`];
14130
+ }
14131
+ /** Builds a pure star-reexport TypeScript (or mjs) source body (no header). */
14132
+ function buildStarReexportLines(targets, options = {}) {
14133
+ const semi = options.semi === false ? "" : ";";
14134
+ return `${targets.map((target) => `export * from '${target}'${semi}`).join("\n")}\n`;
14135
+ }
14136
+ const starExportLineRe = /^export\s+\*\s+from\s+['"]([^'"]+)['"]\s*;?\s*$/;
14137
+ function isSkippableSourceLine(line) {
14138
+ if (line.length === 0) return true;
14139
+ if (line.startsWith("//")) return true;
14140
+ if (line.startsWith("/*") || line.startsWith("*") || line.startsWith("*/")) return true;
14141
+ return false;
14142
+ }
14143
+ /**
14144
+ * If `source` is only star re-exports (plus blank lines / `//` comments /
14145
+ * generated header), returns the targets in order. Otherwise `null`.
14146
+ */
14147
+ function parsePureStarReexports(source) {
14148
+ const targets = [];
14149
+ for (const rawLine of source.split("\n")) {
14150
+ const line = rawLine.trim();
14151
+ if (isSkippableSourceLine(line)) continue;
14152
+ const match = starExportLineRe.exec(line);
14153
+ if (match === null) return null;
14154
+ targets.push(match[1]);
14155
+ }
14156
+ return targets.length > 0 ? targets : null;
14157
+ }
14158
+ function moduleIndexSourcePath(packageDir, moduleName) {
14159
+ return PATH.join(packageDir, "src", "modules", moduleName, "index.ts");
14160
+ }
14161
+ function hashModuleParts(spec) {
14162
+ const [modName, sub] = spec.slice(1).split("/", 2);
14163
+ return {
14164
+ modName,
14165
+ sub
14166
+ };
14167
+ }
14168
+ function resolveHashToModuleFile(packageDir, spec, config) {
14169
+ const { modName, sub } = hashModuleParts(spec);
14170
+ if (config.aliasImports?.[spec] !== void 0) {
14171
+ const alias = config.aliasImports[spec].replace(/^\.\//, "");
14172
+ return PATH.join(packageDir, alias);
14173
+ }
14174
+ if (sub === void 0) return moduleIndexSourcePath(packageDir, modName);
14175
+ if (sub === "model") return PATH.join(packageDir, "src", "modules", modName, "model.ts");
14176
+ return PATH.join(packageDir, "src", "modules", modName, `${sub}.ts`);
14177
+ }
14178
+ function expandNestedSource(file, packageDir, config, seen) {
14179
+ if (!fs.existsSync(file)) return null;
14180
+ const nested = parsePureStarReexports(fs.readFileSync(file, "utf8"));
14181
+ if (nested === null) return null;
14182
+ return expandToPackageReexportTargets(nested, packageDir, config, seen);
14183
+ }
14184
+ function expandHashTarget(target, packageDir, config, seen) {
14185
+ const { modName, sub } = hashModuleParts(target);
14186
+ const mod = config.modules.find((candidate) => candidate.name === modName);
14187
+ if (mod !== void 0 && moduleHasReexport(mod) && sub === void 0) return expandToPackageReexportTargets(moduleReexportTargets(mod), packageDir, config, seen);
14188
+ const file = resolveHashToModuleFile(packageDir, target, config);
14189
+ if (file === null) return null;
14190
+ return expandNestedSource(file, packageDir, config, seen);
14191
+ }
14192
+ function expandRelativeTarget(target, packageDir, config, seen) {
14193
+ const base = PATH.resolve(packageDir, "src", target.replace(/^\.\//, ""));
14194
+ const existing = [
14195
+ base,
14196
+ `${base}.ts`,
14197
+ `${base}.tsx`,
14198
+ PATH.join(base, "index.ts")
14199
+ ].find((candidate) => fs.existsSync(candidate));
14200
+ if (existing === void 0) return null;
14201
+ return expandNestedSource(existing, packageDir, config, seen);
14202
+ }
14203
+ /**
14204
+ * Expands pure star-reexport targets until only package-like specifiers remain.
14205
+ * Returns `null` if any hop has local implementation or unreadable sources.
14206
+ */
14207
+ function expandToPackageReexportTargets(targets, packageDir, config, seen = /* @__PURE__ */ new Set()) {
14208
+ const out = [];
14209
+ for (const target of targets) {
14210
+ if (seen.has(target)) continue;
14211
+ seen.add(target);
14212
+ if (isPackageLikeSpecifier(target)) {
14213
+ out.push(target);
14214
+ continue;
14215
+ }
14216
+ const expanded = target.startsWith("#") ? expandHashTarget(target, packageDir, config, seen) : target.startsWith(".") ? expandRelativeTarget(target, packageDir, config, seen) : null;
14217
+ if (expanded === null) return null;
14218
+ out.push(...expanded);
14219
+ }
14220
+ return out;
14221
+ }
14222
+ /**
14223
+ * Resolves pure package reexport targets for a module from config and/or source.
14224
+ */
14225
+ function resolveModulePackageReexports(mod, packageDir, config) {
14226
+ if (moduleHasReexport(mod)) return expandToPackageReexportTargets(moduleReexportTargets(mod), packageDir, config);
14227
+ const file = moduleIndexSourcePath(packageDir, mod.name);
14228
+ if (!fs.existsSync(file)) return null;
14229
+ const targets = parsePureStarReexports(fs.readFileSync(file, "utf8"));
14230
+ if (targets === null) return null;
14231
+ return expandToPackageReexportTargets(targets, packageDir, config);
14232
+ }
14233
+ function walkMjs$1(dir, out = []) {
14234
+ if (!fs.existsSync(dir)) return out;
14235
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
14236
+ for (const entry of entries) {
14237
+ const fp = PATH.join(dir, entry.name);
14238
+ if (entry.isDirectory()) walkMjs$1(fp, out);
14239
+ else if (entry.name.endsWith(".mjs")) out.push(fp);
14240
+ }
14241
+ return out;
14242
+ }
14243
+ function writePureReexportMjs(filePath, targets) {
14244
+ fs.mkdirSync(PATH.dirname(filePath), { recursive: true });
14245
+ fs.writeFileSync(filePath, buildStarReexportLines(targets, { semi: true }));
14246
+ }
14247
+ function collectPackageTargetsByModule(packageDir, config) {
14248
+ const packageTargetsByModule = /* @__PURE__ */ new Map();
14249
+ for (const mod of config.modules) {
14250
+ if (!(mod.export ?? false) && !(mod.barrel ?? false)) continue;
14251
+ const targets = resolveModulePackageReexports(mod, packageDir, config);
14252
+ if (targets !== null && targets.length > 0) packageTargetsByModule.set(mod.name, targets);
14253
+ }
14254
+ return packageTargetsByModule;
14255
+ }
14256
+ function resolveBarrelModuleTargets(mod, packageDir, config, packageTargetsByModule) {
14257
+ const fromBarrel = normalizeReexportTargets(mod.barrelFrom);
14258
+ if (fromBarrel.length > 0) return expandToPackageReexportTargets(fromBarrel, packageDir, config);
14259
+ return packageTargetsByModule.get(mod.name) ?? null;
14260
+ }
14261
+ function resolveIndexPackageTargets(packageDir, config, packageTargetsByModule) {
14262
+ const barrelModules = config.modules.filter((mod) => mod.barrel ?? false).toSorted((a, b) => a.name.localeCompare(b.name));
14263
+ const indexTargets = [...config.barrelImports ?? []];
14264
+ for (const mod of barrelModules) {
14265
+ const moduleTargets = resolveBarrelModuleTargets(mod, packageDir, config, packageTargetsByModule);
14266
+ if (moduleTargets === null) return null;
14267
+ indexTargets.push(...moduleTargets);
14268
+ }
14269
+ return indexTargets;
14270
+ }
14271
+ function rewriteModuleReexportMjs(distDir, modulesPlatform, packageTargetsByModule) {
14272
+ let rewritten = 0;
14273
+ for (const [name, targets] of packageTargetsByModule) {
14274
+ const file = PATH.join(distDir, modulesPlatform, `${name}.mjs`);
14275
+ if (!fs.existsSync(file)) continue;
14276
+ writePureReexportMjs(file, targets);
14277
+ rewritten++;
14278
+ }
14279
+ return rewritten;
14280
+ }
14281
+ function rewriteIndexReexportMjs(distDir, platforms, indexTargets) {
14282
+ let rewritten = 0;
14283
+ for (const platform of platforms) {
14284
+ const file = PATH.join(distDir, platform, "index.mjs");
14285
+ if (!fs.existsSync(file)) continue;
14286
+ writePureReexportMjs(file, indexTargets);
14287
+ rewritten++;
14288
+ }
14289
+ for (const file of walkMjs$1(distDir)) {
14290
+ const base = PATH.basename(file);
14291
+ if (!base.startsWith("index") || !base.endsWith(".mjs") || base === "index.mjs") continue;
14292
+ writePureReexportMjs(file, indexTargets);
14293
+ rewritten++;
14294
+ }
14295
+ return rewritten;
14296
+ }
14297
+ /**
14298
+ * After esbuild, rewrite known pure package-facade entries to `export * from`
14299
+ * form. esbuild preserves star re-exports only on the entry file; multi-hop
14300
+ * `#module` chains become `__reExport` helpers that break Storybook/Vite
14301
+ * analysis. Returns the number of files rewritten.
14302
+ */
14303
+ function flattenPurePackageReexportMjs(distDir, packageDir, config) {
14304
+ const modulesPlatform = config.modulesPlatform ?? "neutral";
14305
+ const platforms = config.platforms ?? [
14306
+ "neutral",
14307
+ "node",
14308
+ "browser"
14309
+ ];
14310
+ const packageTargetsByModule = collectPackageTargetsByModule(packageDir, config);
14311
+ let rewritten = rewriteModuleReexportMjs(distDir, modulesPlatform, packageTargetsByModule);
14312
+ const indexTargets = resolveIndexPackageTargets(packageDir, config, packageTargetsByModule);
14313
+ if (indexTargets !== null && indexTargets.length > 0) rewritten += rewriteIndexReexportMjs(distDir, platforms, indexTargets);
14314
+ return rewritten;
14315
+ }
14316
+ //#endregion
13777
14317
  //#region src/actions/package/compile/monolithCompileLayout.ts
13778
14318
  /**
13779
14319
  * Layout generation for `compile.mode: 'monolith'` — a 1:1 port of the
@@ -13880,10 +14420,7 @@ function buildIndexTs(modules, config) {
13880
14420
  const hasConditional = Object.keys(config.conditionalImports ?? {}).length > 0;
13881
14421
  const barrelModules = modules.filter((mod) => mod.barrel ?? false).toSorted((a, b) => a.name.localeCompare(b.name));
13882
14422
  const lines = (config.barrelImports ?? []).map((spec) => `export * from '${spec}'`);
13883
- for (const mod of barrelModules) {
13884
- const target = mod.barrelFrom ?? `#${mod.name}`;
13885
- lines.push(`export * from '${target}'`);
13886
- }
14423
+ for (const mod of barrelModules) for (const target of moduleBarrelTargets(mod)) lines.push(`export * from '${target}'`);
13887
14424
  return `${GENERATED_HEADER}${hasConditional ? "/* eslint-disable @typescript-eslint/ban-ts-comment -- conditional package imports */\n// @ts-nocheck\n" : ""}${lines.join("\n")}
13888
14425
  `;
13889
14426
  }
@@ -13893,9 +14430,11 @@ function buildModelTs(modules) {
13893
14430
  `;
13894
14431
  }
13895
14432
  function buildModuleShim(mod) {
13896
- const target = mod.shimFrom ?? `#${mod.name}`;
13897
- return `${GENERATED_HEADER}export * from '${target}'
13898
- `;
14433
+ return `${GENERATED_HEADER}${buildStarReexportLines(moduleShimTargets(mod), { semi: false })}`;
14434
+ }
14435
+ /** Generated module body for facade modules with `reexport` targets. */
14436
+ function buildModuleReexportIndex(mod) {
14437
+ return `${GENERATED_HEADER}${buildStarReexportLines(moduleReexportTargets(mod), { semi: false })}`;
13899
14438
  }
13900
14439
  function buildModelShim(mod) {
13901
14440
  return `${GENERATED_HEADER}export type * from '#${mod.name}/model'
@@ -13960,6 +14499,7 @@ function syncMonolithLayout(packageDir, config, options = {}) {
13960
14499
  if (!(config.index?.custom ?? false)) writeOrCheck(PATH.join(packageDir, "src/index.ts"), buildIndexTs(modules, config));
13961
14500
  if (monolithHasModelBarrel(config)) writeOrCheck(PATH.join(packageDir, "src/model.ts"), buildModelTs(modules));
13962
14501
  for (const mod of modules) {
14502
+ if (moduleHasReexport(mod)) writeOrCheck(PATH.join(packageDir, "src", "modules", mod.name, "index.ts"), buildModuleReexportIndex(mod));
13963
14503
  if (!(mod.export ?? false)) continue;
13964
14504
  writeOrCheck(PATH.join(packageDir, `src/${mod.name}.ts`), buildModuleShim(mod));
13965
14505
  if (mod.model ?? false) writeOrCheck(PATH.join(packageDir, `src/${mod.name}.model.ts`), buildModelShim(mod));
@@ -14122,15 +14662,14 @@ function moduleShimEntries(mod, isDirectIndex, isExternal) {
14122
14662
  return shims;
14123
14663
  }
14124
14664
  /**
14125
- * Modules-platform entries for one exported module. Conditional modules
14126
- * normally keep the shim entry in external mode: the shim's retained `#`
14127
- * re-export funnels through distImports. But when the conditional's default
14128
- * condition targets the modules-platform file itself, that shim would
14129
- * re-export its own output — compile the default source directly instead.
14665
+ * Prefer compiling `modules/<name>/index.ts` directly when star re-exports
14666
+ * must stay as `export * from` on the entry (esbuild lowers multi-hop stars
14667
+ * into `__reExport` helpers). Used for external linkage, facade `reexport`
14668
+ * modules, and pure package facades that would otherwise hop through shims.
14130
14669
  */
14131
14670
  function modulesPlatformEntries(mod, config, isExternal, modulesPlatform) {
14132
14671
  const conditional = config.conditionalImports?.[mod.name];
14133
- let isDirectIndex = isExternal && conditional === void 0;
14672
+ let isDirectIndex = (isExternal || moduleHasReexport(mod)) && conditional === void 0;
14134
14673
  let directIn = `./modules/${mod.name}/index.ts`;
14135
14674
  if (isExternal && conditional?.distImports?.default === `./dist/${modulesPlatform}/${mod.name}.mjs`) {
14136
14675
  isDirectIndex = true;
@@ -14168,12 +14707,14 @@ function platformShimEntry(platform, name, target, isExternal) {
14168
14707
  * a conditional `#import` skip the modules-platform entry — the subpath
14169
14708
  * shim already resolves the default condition.
14170
14709
  *
14171
- * With `moduleLinkage: 'external'` the subpath and platform entries bypass
14172
- * the generated one-line shims and target the module files directly via
14173
- * `{in, out}` pairs: esbuild only preserves `export * from '#external'`
14174
- * when it appears in the entry file itself — routed through an intermediate
14175
- * re-export file the star export is silently lost in ESM output. The shims
14176
- * remain the tsc declaration sources for the same dist names.
14710
+ * With `moduleLinkage: 'external'` or module `reexport` facades, subpath
14711
+ * entries bypass the generated one-line shims and target the module files
14712
+ * directly via `{in, out}` pairs: esbuild only preserves
14713
+ * `export * from '…'` when it appears in the entry file itself — routed
14714
+ * through an intermediate re-export the star is lowered to `__reExport`
14715
+ * helpers. Shims remain the tsc declaration sources for the same dist names.
14716
+ * After esbuild, pure package-facade graphs are also flattened in
14717
+ * {@link flattenPurePackageReexportMjs} so multi-hop barrels stay clean.
14177
14718
  */
14178
14719
  function buildMonolithEntries(config) {
14179
14720
  const { conditionalImports = {}, modules, platformEntries = {} } = config;
@@ -14281,9 +14822,12 @@ const packageCompileMonolith = async (config, mode = {}) => {
14281
14822
  if (!shouldEmit) return 0;
14282
14823
  const compileResult = await packageCompileEsbuild(deriveEsbuildConfig(config, compile, monolith), { emitOnly: true });
14283
14824
  if (compileResult !== 0) return compileResult;
14284
- const rewritten = fixMonolithDeclarations(PATH.join(packageDir, "dist"), monolith);
14825
+ const distDir = PATH.join(packageDir, "dist");
14826
+ const flattened = flattenPurePackageReexportMjs(distDir, packageDir, monolith);
14827
+ if (isVerbose && flattened > 0) console.log(chalk.gray(`monolith pure reexport flatten: ${flattened} files`));
14828
+ const rewritten = fixMonolithDeclarations(distDir, monolith);
14285
14829
  if (isVerbose) console.log(chalk.gray(`monolith declaration fixups: ${rewritten} files`));
14286
- const specifierProblems = verifyMonolithRuntimeSpecifiers(PATH.join(packageDir, "dist"), monolith);
14830
+ const specifierProblems = verifyMonolithRuntimeSpecifiers(distDir, monolith);
14287
14831
  if (specifierProblems.length > 0) {
14288
14832
  for (const problem of specifierProblems) console.error(chalk.red(problem));
14289
14833
  return 1;
@@ -14865,6 +15409,10 @@ const ALL_PUBLINT_CHECKS = [
14865
15409
  "source",
14866
15410
  "types"
14867
15411
  ];
15412
+ function publintRuleId$1(check) {
15413
+ return `pub.${check}`;
15414
+ }
15415
+ ALL_PUBLINT_CHECKS.map(publintRuleId$1);
14868
15416
  /** Checks that only apply to published (non-private) packages */
14869
15417
  const PUBLISH_ONLY_CHECKS = [
14870
15418
  "defaultExportOrder",
@@ -15755,9 +16303,19 @@ const PUBLINT_RULE_LEVELS = /* @__PURE__ */ new Set([
15755
16303
  "off",
15756
16304
  "warn"
15757
16305
  ]);
16306
+ const PUBLINT_RULE_PREFIX = "pub.";
16307
+ const deprecatedPublintRuleWarnings = /* @__PURE__ */ new Set();
15758
16308
  function defaultPublintLevel(check) {
15759
16309
  return check === "platform" || check === "publint" ? "error" : "warn";
15760
16310
  }
16311
+ function publintRuleId(check) {
16312
+ return `${PUBLINT_RULE_PREFIX}${check}`;
16313
+ }
16314
+ function warnDeprecatedPublintRuleName(ruleName) {
16315
+ if (deprecatedPublintRuleWarnings.has(ruleName)) return;
16316
+ deprecatedPublintRuleWarnings.add(ruleName);
16317
+ console.warn(`Deprecated: commands.publint.rules["${ruleName}"] is deprecated; use commands.publint.rules["${publintRuleId(ruleName)}"] instead.`);
16318
+ }
15761
16319
  function normalizePublintConfig$2(value) {
15762
16320
  if (typeof value === "object") return value;
15763
16321
  return {};
@@ -15765,6 +16323,11 @@ function normalizePublintConfig$2(value) {
15765
16323
  function isPublintCheckName(value) {
15766
16324
  return ALL_PUBLINT_CHECKS.includes(value);
15767
16325
  }
16326
+ function normalizePublintRuleName(location, value) {
16327
+ const bareName = value.startsWith(PUBLINT_RULE_PREFIX) ? value.slice(4) : value;
16328
+ if (!isPublintCheckName(bareName)) throw new TypeError(`Unknown publint rule "${value}" in ${location}`);
16329
+ return bareName;
16330
+ }
15768
16331
  function isRuleLevel(value) {
15769
16332
  return typeof value === "string" && PUBLINT_RULE_LEVELS.has(value);
15770
16333
  }
@@ -15784,10 +16347,7 @@ function parseRuleLevel(location, value) {
15784
16347
  throw new TypeError(`${location} must be "error", "warn", "off", boolean, [level, options], or { level?, enabled? }`);
15785
16348
  }
15786
16349
  function normalizePublintRuleNames(location, values) {
15787
- return (values ?? []).map((value) => {
15788
- if (!isPublintCheckName(value)) throw new TypeError(`Unknown publint check "${value}" in ${location}`);
15789
- return value;
15790
- });
16350
+ return (values ?? []).map((value) => normalizePublintRuleName(location, value));
15791
16351
  }
15792
16352
  function defaultLevels() {
15793
16353
  return new Map(ALL_PUBLINT_CHECKS.map((check) => [check, defaultPublintLevel(check)]));
@@ -15808,9 +16368,19 @@ function applyExcluded(levels, explicit, exclude) {
15808
16368
  for (const check of exclude) setRuleLevel(levels, explicit, check, "off");
15809
16369
  }
15810
16370
  function applyConfiguredRules(levels, explicit, rules) {
15811
- for (const [check, setting] of Object.entries(rules ?? {})) {
15812
- if (!isPublintCheckName(check)) throw new TypeError(`Unknown publint check "${check}" in commands.publint.rules`);
15813
- setRuleLevel(levels, explicit, check, parseRuleLevel(`commands.publint.rules["${check}"]`, setting));
16371
+ const configuredRules = Object.entries(rules ?? {});
16372
+ const canonicalRuleIds = new Set(configuredRules.map(([ruleId]) => ruleId).filter((ruleId) => ruleId.startsWith(PUBLINT_RULE_PREFIX)));
16373
+ for (const [check, setting] of configuredRules) {
16374
+ if (check.startsWith(PUBLINT_RULE_PREFIX)) continue;
16375
+ const ruleName = normalizePublintRuleName("commands.publint.rules", check);
16376
+ if (canonicalRuleIds.has(publintRuleId(ruleName))) continue;
16377
+ warnDeprecatedPublintRuleName(ruleName);
16378
+ setRuleLevel(levels, explicit, ruleName, parseRuleLevel(`commands.publint.rules["${publintRuleId(ruleName)}"]`, setting));
16379
+ }
16380
+ for (const [ruleId, setting] of configuredRules) {
16381
+ if (!ruleId.startsWith(PUBLINT_RULE_PREFIX)) continue;
16382
+ const check = normalizePublintRuleName("commands.publint.rules", ruleId);
16383
+ setRuleLevel(levels, explicit, check, parseRuleLevel(`commands.publint.rules["${publintRuleId(check)}"]`, setting));
15814
16384
  }
15815
16385
  }
15816
16386
  function resolvePublintRules(value, cliExclude, cliInclude) {
@@ -15819,9 +16389,9 @@ function resolvePublintRules(value, cliExclude, cliInclude) {
15819
16389
  const configInclude = normalizePublintRuleNames("commands.publint.include", config.include);
15820
16390
  const normalizedCliExclude = normalizePublintRuleNames("--exclude", cliExclude);
15821
16391
  const normalizedCliInclude = normalizePublintRuleNames("--include", cliInclude);
16392
+ if ((configExclude.length > 0 || normalizedCliExclude.length > 0) && (configInclude.length > 0 || normalizedCliInclude.length > 0)) throw new TypeError("Publint: --include and --exclude cannot be used together");
15822
16393
  const levels = defaultLevels();
15823
16394
  const explicit = /* @__PURE__ */ new Set();
15824
- if ((configExclude.length > 0 || normalizedCliExclude.length > 0) && (configInclude.length > 0 || normalizedCliInclude.length > 0)) throw new TypeError("Publint: --include and --exclude cannot be used together");
15825
16395
  applyIncludedOnly(levels, explicit, configInclude);
15826
16396
  applyExcluded(levels, explicit, configExclude);
15827
16397
  applyConfiguredRules(levels, explicit, config.rules);