@ariestools/toolchain 9.0.1 → 9.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -0
- package/dist/actions/enable/editXyConfigCompile.d.ts +32 -0
- package/dist/actions/enable/editXyConfigCompile.d.ts.map +1 -0
- package/dist/actions/enable/index.d.ts +3 -0
- package/dist/actions/enable/index.d.ts.map +1 -0
- package/dist/actions/enable/tsNative.d.ts +36 -0
- package/dist/actions/enable/tsNative.d.ts.map +1 -0
- package/dist/actions/index.d.ts +2 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/lint.d.ts +10 -1
- package/dist/actions/lint.d.ts.map +1 -1
- package/dist/actions/lintMode.d.ts +18 -0
- package/dist/actions/lintMode.d.ts.map +1 -0
- package/dist/actions/lintNext.d.ts +7 -1
- package/dist/actions/lintNext.d.ts.map +1 -1
- package/dist/actions/lintNextRun.d.ts +3 -1
- package/dist/actions/lintNextRun.d.ts.map +1 -1
- package/dist/actions/lintNextWorker.d.ts +6 -0
- package/dist/actions/lintNextWorker.d.ts.map +1 -1
- package/dist/actions/lintSharedTypecheck.d.ts +10 -0
- package/dist/actions/lintSharedTypecheck.d.ts.map +1 -0
- package/dist/actions/lintSharedTypecheckRules.d.ts +24 -0
- package/dist/actions/lintSharedTypecheckRules.d.ts.map +1 -0
- package/dist/actions/package/compile/XyConfig.d.ts +7 -2
- package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/resolveTscBin.d.ts +10 -0
- package/dist/actions/package/compile/resolveTscBin.d.ts.map +1 -1
- package/dist/actions/package/compile/runTsc.d.ts.map +1 -1
- package/dist/actions/relint.d.ts +10 -1
- package/dist/actions/relint.d.ts.map +1 -1
- package/dist/actions/tsc-validate/sharedValidate.d.ts +18 -0
- package/dist/actions/tsc-validate/sharedValidate.d.ts.map +1 -1
- package/dist/bin/package/build.mjs +127 -86
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +34 -1
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +133 -89
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +34 -1
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +127 -86
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/sync-layout.mjs +40 -4
- package/dist/bin/package/sync-layout.mjs.map +1 -1
- package/dist/bin/xy.mjs +962 -120
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/xy/common/enable/index.d.ts +3 -0
- package/dist/xy/common/enable/index.d.ts.map +1 -0
- package/dist/xy/common/index.d.ts.map +1 -1
- package/dist/xy/lint/lint/runCommand.d.ts.map +1 -1
- package/dist/xy/lint/relintCommand.d.ts.map +1 -1
- package/package.json +10 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
2
|
+
import $e, { createRequire } from "node:module";
|
|
3
3
|
import process$1, { cwd, execPath } from "node:process";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import tty from "node:tty";
|
|
@@ -14,7 +14,7 @@ import Pe from "node:stream";
|
|
|
14
14
|
import { StringDecoder } from "node:string_decoder";
|
|
15
15
|
import Re from "path";
|
|
16
16
|
import Ue from "os";
|
|
17
|
-
import {
|
|
17
|
+
import { createJiti } from "jiti";
|
|
18
18
|
import ts, { formatDiagnosticsWithColorAndContext, sys } from "typescript";
|
|
19
19
|
import { build } from "esbuild";
|
|
20
20
|
//#region \0rolldown/runtime.js
|
|
@@ -620,7 +620,7 @@ function Ut(n, t = {}) {
|
|
|
620
620
|
function es(n, t = {}) {
|
|
621
621
|
return new I$1(n, t).iterate();
|
|
622
622
|
}
|
|
623
|
-
var Gt, ce, ss, fe$1, ue$1, qt, de$1, pe$1, is, rs, ns, os$2, hs, as, ls, cs, fs$4, 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$1, 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, vi, wt, Ue$1, $e, Ri, Oi, L$1, Ge$1, He$1, U, qe$1, Ke$1, X$1, Ve$1, _$1, gt, se$1, je$1, yt, j, Nt, Lt, Ie$1, Fi, ie$1, ze$1, bt, Be
|
|
623
|
+
var Gt, ce, ss, fe$1, ue$1, qt, de$1, pe$1, is, rs, ns, os$2, hs, as, ls, cs, fs$4, 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$1, 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, vi, wt, Ue$1, $e$1, Ri, Oi, L$1, Ge$1, He$1, U, qe$1, Ke$1, X$1, Ve$1, _$1, gt, se$1, je$1, yt, j, Nt, Lt, Ie$1, Fi, ie$1, ze$1, bt, Be, _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;
|
|
624
624
|
var init_index_min = __esmMin((() => {
|
|
625
625
|
Gt = (n, t, e) => {
|
|
626
626
|
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);
|
|
@@ -2397,8 +2397,8 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2397
2397
|
...n.promises || {}
|
|
2398
2398
|
}
|
|
2399
2399
|
};
|
|
2400
|
-
$e = /^\\\\\?\\([a-z]:)\\?$/i;
|
|
2401
|
-
Ri = (n) => n.replace(/\//g, "\\").replace($e, "$1\\");
|
|
2400
|
+
$e$1 = /^\\\\\?\\([a-z]:)\\?$/i;
|
|
2401
|
+
Ri = (n) => n.replace(/\//g, "\\").replace($e$1, "$1\\");
|
|
2402
2402
|
Oi = /[\\\/]/;
|
|
2403
2403
|
L$1 = 0;
|
|
2404
2404
|
Ge$1 = 1;
|
|
@@ -2426,12 +2426,12 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2426
2426
|
let e = n.normalize("NFKD");
|
|
2427
2427
|
return ze$1.set(n, e), e;
|
|
2428
2428
|
};
|
|
2429
|
-
Be
|
|
2429
|
+
Be = new ft({ max: 4096 });
|
|
2430
2430
|
_t = (n) => {
|
|
2431
|
-
let t = Be
|
|
2431
|
+
let t = Be.get(n);
|
|
2432
2432
|
if (t) return t;
|
|
2433
2433
|
let e = bt(n.toLowerCase());
|
|
2434
|
-
return Be
|
|
2434
|
+
return Be.set(n, e), e;
|
|
2435
2435
|
};
|
|
2436
2436
|
Wt = class extends ft {
|
|
2437
2437
|
constructor() {
|
|
@@ -2879,7 +2879,7 @@ while (this[Le$1](this[Ft]()) && this[C$1].length);
|
|
|
2879
2879
|
return this.roots[t] = new it(t, this).root;
|
|
2880
2880
|
}
|
|
2881
2881
|
sameRoot(t, e = this.root.name) {
|
|
2882
|
-
return t = t.toUpperCase().replace(/\//g, "\\").replace($e, "$1\\"), t === e;
|
|
2882
|
+
return t = t.toUpperCase().replace(/\//g, "\\").replace($e$1, "$1\\"), t === e;
|
|
2883
2883
|
}
|
|
2884
2884
|
};
|
|
2885
2885
|
jt = class n extends R$2 {
|
|
@@ -7452,8 +7452,8 @@ var require_ExplorerSync = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7452
7452
|
exports.ExplorerSync = ExplorerSync;
|
|
7453
7453
|
}));
|
|
7454
7454
|
//#endregion
|
|
7455
|
-
//#region
|
|
7456
|
-
var
|
|
7455
|
+
//#region ../../node_modules/.pnpm/cosmiconfig@10.0.0/node_modules/cosmiconfig/dist/index.js
|
|
7456
|
+
var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
7457
7457
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7458
7458
|
exports.defaultLoadersSync = exports.defaultLoaders = exports.globalConfigSearchPlacesSync = exports.globalConfigSearchPlaces = exports.getDefaultSearchPlacesSync = exports.getDefaultSearchPlaces = exports.cosmiconfigSync = exports.cosmiconfig = void 0;
|
|
7459
7459
|
const defaults_1 = require_defaults();
|
|
@@ -7613,7 +7613,43 @@ var import_dist = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7613
7613
|
};
|
|
7614
7614
|
}
|
|
7615
7615
|
exports.cosmiconfigSync = cosmiconfigSync;
|
|
7616
|
-
}))
|
|
7616
|
+
}));
|
|
7617
|
+
//#endregion
|
|
7618
|
+
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.2.0_cosmiconfig@10.0.0_typescript@6.0.3/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs
|
|
7619
|
+
var TypeScriptCompileError = class _TypeScriptCompileError extends Error {
|
|
7620
|
+
constructor(message) {
|
|
7621
|
+
super(message);
|
|
7622
|
+
this.name = this.constructor.name;
|
|
7623
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
7624
|
+
}
|
|
7625
|
+
static fromError(error) {
|
|
7626
|
+
const message = `TypeScriptLoader failed to compile TypeScript:
|
|
7627
|
+
${error.message}`;
|
|
7628
|
+
const newError = new _TypeScriptCompileError(message);
|
|
7629
|
+
newError.stack = error.stack;
|
|
7630
|
+
return newError;
|
|
7631
|
+
}
|
|
7632
|
+
};
|
|
7633
|
+
//#endregion
|
|
7634
|
+
//#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.2.0_cosmiconfig@10.0.0_typescript@6.0.3/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
|
|
7635
|
+
function TypeScriptLoader(options) {
|
|
7636
|
+
const loader = createJiti("", {
|
|
7637
|
+
interopDefault: true,
|
|
7638
|
+
...options
|
|
7639
|
+
});
|
|
7640
|
+
return async (path, _content) => {
|
|
7641
|
+
try {
|
|
7642
|
+
const result = await loader.import(path);
|
|
7643
|
+
return result.default || result;
|
|
7644
|
+
} catch (error) {
|
|
7645
|
+
if (error instanceof Error) throw TypeScriptCompileError.fromError(error);
|
|
7646
|
+
throw error;
|
|
7647
|
+
}
|
|
7648
|
+
};
|
|
7649
|
+
}
|
|
7650
|
+
//#endregion
|
|
7651
|
+
//#region src/lib/loadConfig.ts
|
|
7652
|
+
var import_dist = require_dist();
|
|
7617
7653
|
const configState = {
|
|
7618
7654
|
config: void 0,
|
|
7619
7655
|
/**
|
|
@@ -9342,7 +9378,7 @@ const v = (r, t, e) => {
|
|
|
9342
9378
|
return n;
|
|
9343
9379
|
};
|
|
9344
9380
|
//#endregion
|
|
9345
|
-
//#region ../../node_modules/.pnpm/get-tsconfig@4.14.
|
|
9381
|
+
//#region ../../node_modules/.pnpm/get-tsconfig@4.14.2/node_modules/get-tsconfig/dist/index.mjs
|
|
9346
9382
|
var xe = Object.defineProperty;
|
|
9347
9383
|
var i = (e, t) => xe(e, "name", {
|
|
9348
9384
|
value: t,
|
|
@@ -9385,7 +9421,7 @@ const X = i((e) => {
|
|
|
9385
9421
|
}, "normalizeRelativePath");
|
|
9386
9422
|
function We(e, t = !1) {
|
|
9387
9423
|
const s = e.length;
|
|
9388
|
-
let n = 0, o = "", l = 0, r = 16, f = 0, u = 0, g = 0,
|
|
9424
|
+
let n = 0, o = "", l = 0, r = 16, f = 0, u = 0, g = 0, w = 0, b = 0;
|
|
9389
9425
|
function _(c, j) {
|
|
9390
9426
|
let y = 0, A = 0;
|
|
9391
9427
|
for (; y < c;) {
|
|
@@ -9478,8 +9514,8 @@ function We(e, t = !1) {
|
|
|
9478
9514
|
return c;
|
|
9479
9515
|
}
|
|
9480
9516
|
i(T, "scanString");
|
|
9481
|
-
function
|
|
9482
|
-
if (o = "", b = 0, l = n, u = f,
|
|
9517
|
+
function d() {
|
|
9518
|
+
if (o = "", b = 0, l = n, u = f, w = g, n >= s) return l = s, r = 17;
|
|
9483
9519
|
let c = e.charCodeAt(n);
|
|
9484
9520
|
if (ee(c)) {
|
|
9485
9521
|
do
|
|
@@ -9542,7 +9578,7 @@ function We(e, t = !1) {
|
|
|
9542
9578
|
return o += String.fromCharCode(c), n++, r = 16;
|
|
9543
9579
|
}
|
|
9544
9580
|
}
|
|
9545
|
-
i(
|
|
9581
|
+
i(d, "scanNext");
|
|
9546
9582
|
function v(c) {
|
|
9547
9583
|
if (ee(c) || J(c)) return !1;
|
|
9548
9584
|
switch (c) {
|
|
@@ -9558,23 +9594,23 @@ function We(e, t = !1) {
|
|
|
9558
9594
|
return !0;
|
|
9559
9595
|
}
|
|
9560
9596
|
i(v, "isUnknownContentCharacter");
|
|
9561
|
-
function
|
|
9597
|
+
function $() {
|
|
9562
9598
|
let c;
|
|
9563
9599
|
do
|
|
9564
|
-
c =
|
|
9600
|
+
c = d();
|
|
9565
9601
|
while (c >= 12 && c <= 15);
|
|
9566
9602
|
return c;
|
|
9567
9603
|
}
|
|
9568
|
-
return i(
|
|
9604
|
+
return i($, "scanNextNonTrivia"), {
|
|
9569
9605
|
setPosition: h,
|
|
9570
9606
|
getPosition: i(() => n, "getPosition"),
|
|
9571
|
-
scan: t ?
|
|
9607
|
+
scan: t ? $ : d,
|
|
9572
9608
|
getToken: i(() => r, "getToken"),
|
|
9573
9609
|
getTokenValue: i(() => o, "getTokenValue"),
|
|
9574
9610
|
getTokenOffset: i(() => l, "getTokenOffset"),
|
|
9575
9611
|
getTokenLength: i(() => n - l, "getTokenLength"),
|
|
9576
9612
|
getTokenStartLine: i(() => u, "getTokenStartLine"),
|
|
9577
|
-
getTokenStartCharacter: i(() => l -
|
|
9613
|
+
getTokenStartCharacter: i(() => l - w, "getTokenStartCharacter"),
|
|
9578
9614
|
getTokenError: i(() => b, "getTokenError")
|
|
9579
9615
|
};
|
|
9580
9616
|
}
|
|
@@ -9630,11 +9666,11 @@ function Je(e, t = [], s = Y.DEFAULT) {
|
|
|
9630
9666
|
o = l.pop();
|
|
9631
9667
|
}, "onArrayEnd"),
|
|
9632
9668
|
onLiteralValue: r,
|
|
9633
|
-
onError: i((u, g,
|
|
9669
|
+
onError: i((u, g, w) => {
|
|
9634
9670
|
t.push({
|
|
9635
9671
|
error: u,
|
|
9636
9672
|
offset: g,
|
|
9637
|
-
length:
|
|
9673
|
+
length: w
|
|
9638
9674
|
});
|
|
9639
9675
|
}, "onError")
|
|
9640
9676
|
}, s), o[0];
|
|
@@ -9661,13 +9697,13 @@ function Me(e, t, s = Y.DEFAULT) {
|
|
|
9661
9697
|
} : () => !0;
|
|
9662
9698
|
}
|
|
9663
9699
|
i(g, "toBeginVisit");
|
|
9664
|
-
function
|
|
9700
|
+
function w(p) {
|
|
9665
9701
|
return p ? () => {
|
|
9666
9702
|
l > 0 && l--, l === 0 && p(n.getTokenOffset(), n.getTokenLength(), n.getTokenStartLine(), n.getTokenStartCharacter());
|
|
9667
9703
|
} : () => !0;
|
|
9668
9704
|
}
|
|
9669
|
-
i(
|
|
9670
|
-
const b = g(t.onObjectBegin), _ = u(t.onObjectProperty), h =
|
|
9705
|
+
i(w, "toEndVisit");
|
|
9706
|
+
const b = g(t.onObjectBegin), _ = u(t.onObjectProperty), h = w(t.onObjectEnd), D = g(t.onArrayBegin), T = w(t.onArrayEnd), d = u(t.onLiteralValue), v = f(t.onSeparator), $ = r(t.onComment), c = f(t.onError), j = s && s.disallowComments, y = s && s.allowTrailingComma;
|
|
9671
9707
|
function A() {
|
|
9672
9708
|
for (;;) {
|
|
9673
9709
|
const p = n.scan();
|
|
@@ -9692,7 +9728,7 @@ function Me(e, t, s = Y.DEFAULT) {
|
|
|
9692
9728
|
switch (p) {
|
|
9693
9729
|
case 12:
|
|
9694
9730
|
case 13:
|
|
9695
|
-
j ? k(10) :
|
|
9731
|
+
j ? k(10) : $();
|
|
9696
9732
|
break;
|
|
9697
9733
|
case 16:
|
|
9698
9734
|
k(1);
|
|
@@ -9719,7 +9755,7 @@ function Me(e, t, s = Y.DEFAULT) {
|
|
|
9719
9755
|
i(k, "handleError");
|
|
9720
9756
|
function P(p) {
|
|
9721
9757
|
const F = n.getTokenValue();
|
|
9722
|
-
return p ?
|
|
9758
|
+
return p ? d(F) : (_(F), o.push(F)), A(), !0;
|
|
9723
9759
|
}
|
|
9724
9760
|
i(P, "parseString");
|
|
9725
9761
|
function M() {
|
|
@@ -9727,16 +9763,16 @@ function Me(e, t, s = Y.DEFAULT) {
|
|
|
9727
9763
|
case 11:
|
|
9728
9764
|
const p = n.getTokenValue();
|
|
9729
9765
|
let F = Number(p);
|
|
9730
|
-
isNaN(F) && (k(2), F = 0),
|
|
9766
|
+
isNaN(F) && (k(2), F = 0), d(F);
|
|
9731
9767
|
break;
|
|
9732
9768
|
case 7:
|
|
9733
|
-
|
|
9769
|
+
d(null);
|
|
9734
9770
|
break;
|
|
9735
9771
|
case 8:
|
|
9736
|
-
|
|
9772
|
+
d(!0);
|
|
9737
9773
|
break;
|
|
9738
9774
|
case 9:
|
|
9739
|
-
|
|
9775
|
+
d(!1);
|
|
9740
9776
|
break;
|
|
9741
9777
|
default: return !1;
|
|
9742
9778
|
}
|
|
@@ -9791,21 +9827,21 @@ var me;
|
|
|
9791
9827
|
e[e.OpenBraceToken = 1] = "OpenBraceToken", e[e.CloseBraceToken = 2] = "CloseBraceToken", e[e.OpenBracketToken = 3] = "OpenBracketToken", e[e.CloseBracketToken = 4] = "CloseBracketToken", e[e.CommaToken = 5] = "CommaToken", e[e.ColonToken = 6] = "ColonToken", e[e.NullKeyword = 7] = "NullKeyword", e[e.TrueKeyword = 8] = "TrueKeyword", e[e.FalseKeyword = 9] = "FalseKeyword", e[e.StringLiteral = 10] = "StringLiteral", e[e.NumericLiteral = 11] = "NumericLiteral", e[e.LineCommentTrivia = 12] = "LineCommentTrivia", e[e.BlockCommentTrivia = 13] = "BlockCommentTrivia", e[e.LineBreakTrivia = 14] = "LineBreakTrivia", e[e.Trivia = 15] = "Trivia", e[e.Unknown = 16] = "Unknown", e[e.EOF = 17] = "EOF";
|
|
9792
9828
|
})(me || (me = {}));
|
|
9793
9829
|
const Ve = Je;
|
|
9794
|
-
var
|
|
9830
|
+
var de;
|
|
9795
9831
|
(function(e) {
|
|
9796
9832
|
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";
|
|
9797
|
-
})(
|
|
9798
|
-
const
|
|
9833
|
+
})(de || (de = {}));
|
|
9834
|
+
const we = i((e, t) => Ve(Se(t, e, "utf8")), "readJsonc");
|
|
9799
9835
|
const ne = Symbol("implicitBaseUrl");
|
|
9800
9836
|
const E = "${configDir}";
|
|
9801
9837
|
const ze = i(() => {
|
|
9802
|
-
const { findPnpApi: e } =
|
|
9838
|
+
const { findPnpApi: e } = $e;
|
|
9803
9839
|
return e && e(process.cwd());
|
|
9804
9840
|
}, "getPnpApi");
|
|
9805
9841
|
const te = i((e, t, s, n) => {
|
|
9806
9842
|
const o = `resolveFromPackageJsonPath:${e}:${t}:${s}`;
|
|
9807
9843
|
if (n != null && n.has(o)) return n.get(o);
|
|
9808
|
-
const l =
|
|
9844
|
+
const l = we(e, n);
|
|
9809
9845
|
if (!l) return;
|
|
9810
9846
|
let r = t || "tsconfig.json";
|
|
9811
9847
|
if (!s && l.exports) try {
|
|
@@ -9836,25 +9872,25 @@ const Ge = i((e, t, s) => {
|
|
|
9836
9872
|
const { resolveRequest: T } = g;
|
|
9837
9873
|
try {
|
|
9838
9874
|
if (f === e) {
|
|
9839
|
-
const
|
|
9840
|
-
if (
|
|
9841
|
-
const v = te(
|
|
9875
|
+
const d = T(PATH.join(f, se), t);
|
|
9876
|
+
if (d) {
|
|
9877
|
+
const v = te(d, u, !1, s);
|
|
9842
9878
|
if (v && x(s, v)) return v;
|
|
9843
9879
|
}
|
|
9844
9880
|
} else {
|
|
9845
|
-
let
|
|
9881
|
+
let d;
|
|
9846
9882
|
try {
|
|
9847
|
-
|
|
9883
|
+
d = T(e, t, { extensions: [".json"] });
|
|
9848
9884
|
} catch {
|
|
9849
|
-
|
|
9885
|
+
d = T(PATH.join(e, le), t);
|
|
9850
9886
|
}
|
|
9851
|
-
if (
|
|
9887
|
+
if (d) return d;
|
|
9852
9888
|
}
|
|
9853
9889
|
} catch {}
|
|
9854
9890
|
}
|
|
9855
|
-
const
|
|
9856
|
-
if (!
|
|
9857
|
-
const b = Pe$1(s,
|
|
9891
|
+
const w = O(PATH.resolve(t), PATH.join("node_modules", f), s);
|
|
9892
|
+
if (!w || !((n = H(s, w)) != null && n.isDirectory())) return;
|
|
9893
|
+
const b = Pe$1(s, w), _ = PATH.join(b, se);
|
|
9858
9894
|
if (x(s, _)) {
|
|
9859
9895
|
const T = te(_, u, !1, s);
|
|
9860
9896
|
if (T === !1) return;
|
|
@@ -9872,8 +9908,8 @@ const Ge = i((e, t, s) => {
|
|
|
9872
9908
|
const v = te(T, "", !0, s);
|
|
9873
9909
|
if (v && x(s, v)) return v;
|
|
9874
9910
|
}
|
|
9875
|
-
const
|
|
9876
|
-
if (x(s,
|
|
9911
|
+
const d = PATH.join(h, le);
|
|
9912
|
+
if (x(s, d)) return d;
|
|
9877
9913
|
} else if (D) return h;
|
|
9878
9914
|
}
|
|
9879
9915
|
}, "resolveExtendsPath");
|
|
@@ -9905,8 +9941,8 @@ const He = i((e, t, s, n) => {
|
|
|
9905
9941
|
u && !u.startsWith(E) && (f.baseUrl = N(t, l, u));
|
|
9906
9942
|
const { outDir: g } = f;
|
|
9907
9943
|
g && !g.startsWith(E) && (f.outDir = N(t, l, g));
|
|
9908
|
-
const { declarationDir:
|
|
9909
|
-
|
|
9944
|
+
const { declarationDir: w } = f;
|
|
9945
|
+
w && !w.startsWith(E) && (f.declarationDir = N(t, l, w));
|
|
9910
9946
|
const { rootDir: b } = f;
|
|
9911
9947
|
b && !b.startsWith(E) && (f.rootDir = N(t, l, b));
|
|
9912
9948
|
const { rootDirs: _ } = f;
|
|
@@ -9916,7 +9952,7 @@ const He = i((e, t, s, n) => {
|
|
|
9916
9952
|
}
|
|
9917
9953
|
for (const u of pe) {
|
|
9918
9954
|
const g = r[u];
|
|
9919
|
-
g && (r[u] = g.map((
|
|
9955
|
+
g && (r[u] = g.map((w) => w.startsWith(E) ? w : Qe(t, l, w)));
|
|
9920
9956
|
}
|
|
9921
9957
|
return r;
|
|
9922
9958
|
}, "resolveExtends");
|
|
@@ -9924,7 +9960,7 @@ const be = ["outDir", "declarationDir"];
|
|
|
9924
9960
|
const ve = i((e, t, s = /* @__PURE__ */ new Set()) => {
|
|
9925
9961
|
let n;
|
|
9926
9962
|
try {
|
|
9927
|
-
n =
|
|
9963
|
+
n = we(e, t) || {};
|
|
9928
9964
|
} catch {
|
|
9929
9965
|
throw new Error(`Cannot resolve tsconfig at path: ${e}`);
|
|
9930
9966
|
}
|
|
@@ -9984,7 +10020,7 @@ const Xe = [
|
|
|
9984
10020
|
"tsBuildInfoFile"
|
|
9985
10021
|
];
|
|
9986
10022
|
const Ye = i((e) => {
|
|
9987
|
-
if (e.strict) for (const
|
|
10023
|
+
if (e.strict) for (const B of [
|
|
9988
10024
|
"noImplicitAny",
|
|
9989
10025
|
"noImplicitThis",
|
|
9990
10026
|
"strictNullChecks",
|
|
@@ -9994,7 +10030,7 @@ const Ye = i((e) => {
|
|
|
9994
10030
|
"strictBuiltinIteratorReturn",
|
|
9995
10031
|
"alwaysStrict",
|
|
9996
10032
|
"useUnknownInCatchVariables"
|
|
9997
|
-
]) e[
|
|
10033
|
+
]) e[B] === void 0 && (e[B] = !0);
|
|
9998
10034
|
if (e.composite && (e.declaration ??= !0, e.incremental ??= !0), e.target) {
|
|
9999
10035
|
let a = e.target.toLowerCase();
|
|
10000
10036
|
a === "es2015" && (a = "es6"), e.target = a, a === "esnext" && (e.module ??= "es6", e.useDefineForClassFields ??= !0), (a === "es6" || a === "es2016" || a === "es2017" || a === "es2018" || a === "es2019" || a === "es2020" || a === "es2021" || a === "es2022" || a === "es2023" || a === "es2024") && (e.module ??= "es6"), (a === "es2022" || a === "es2023" || a === "es2024") && (e.useDefineForClassFields ??= !0);
|
|
@@ -10002,8 +10038,8 @@ const Ye = i((e) => {
|
|
|
10002
10038
|
if (e.module) {
|
|
10003
10039
|
let a = e.module.toLowerCase();
|
|
10004
10040
|
if (a === "es2015" && (a = "es6"), e.module = a, (a === "es6" || a === "es2020" || a === "es2022" || a === "esnext" || a === "none" || a === "system" || a === "umd" || a === "amd") && (e.moduleResolution ??= "classic"), a === "system" && (e.allowSyntheticDefaultImports ??= !0), (a === "node16" || a === "node18" || a === "node20" || a === "nodenext" || a === "preserve") && (e.esModuleInterop ??= !0, e.allowSyntheticDefaultImports ??= !0), (a === "node16" || a === "node18" || a === "node20" || a === "nodenext") && (e.moduleDetection ??= "force"), a === "node16" && (e.target ??= "es2022", e.moduleResolution ??= "node16"), a === "node18" && (e.target ??= "es2022", e.moduleResolution ??= "node16"), a === "node20" && (e.target ??= "es2023", e.moduleResolution ??= "node16", e.resolveJsonModule ??= !0), a === "nodenext" && (e.target ??= "esnext", e.moduleResolution ??= "nodenext", e.resolveJsonModule ??= !0), a === "node16" || a === "node18" || a === "node20" || a === "nodenext") {
|
|
10005
|
-
const
|
|
10006
|
-
(
|
|
10041
|
+
const B = e.target;
|
|
10042
|
+
(B === "es3" || B === "es2022" || B === "es2023" || B === "es2024" || B === "esnext") && (e.useDefineForClassFields ??= !0);
|
|
10007
10043
|
}
|
|
10008
10044
|
a === "preserve" && (e.moduleResolution ??= "bundler");
|
|
10009
10045
|
}
|
|
@@ -10026,8 +10062,8 @@ const ie = i((e, t = /* @__PURE__ */ new Map()) => {
|
|
|
10026
10062
|
for (const f of ["rootDirs", "typeRoots"]) {
|
|
10027
10063
|
const u = l[f];
|
|
10028
10064
|
u && (l[f] = u.map((g) => {
|
|
10029
|
-
const
|
|
10030
|
-
return
|
|
10065
|
+
const w = Z(g, o);
|
|
10066
|
+
return w ? oe(o, w) : X(g);
|
|
10031
10067
|
}));
|
|
10032
10068
|
}
|
|
10033
10069
|
const { paths: r } = l;
|
|
@@ -10080,7 +10116,10 @@ const Te = q((e) => {
|
|
|
10080
10116
|
let o;
|
|
10081
10117
|
const l = Te(n);
|
|
10082
10118
|
return l !== n && t.existsSync(n) ? o = !t.existsSync(l) : o = qe(n, e, t), s && re.set(n, o), o;
|
|
10083
|
-
}, "isFsCaseSensitive"), { join:
|
|
10119
|
+
}, "isFsCaseSensitive"), { join: Oe } = PATH.posix, _e = i((e, t) => {
|
|
10120
|
+
const s = Oe(e, t);
|
|
10121
|
+
return e.startsWith("//") && !s.startsWith("//") ? `/${s}` : s;
|
|
10122
|
+
}, "pathJoin"), ue = {
|
|
10084
10123
|
ts: [
|
|
10085
10124
|
".ts",
|
|
10086
10125
|
".tsx",
|
|
@@ -10088,14 +10127,14 @@ const Te = q((e) => {
|
|
|
10088
10127
|
],
|
|
10089
10128
|
cts: [".cts", ".d.cts"],
|
|
10090
10129
|
mts: [".mts", ".d.mts"]
|
|
10091
|
-
},
|
|
10130
|
+
}, Ce = i((e) => {
|
|
10092
10131
|
const t = [...ue.ts], s = [...ue.cts], n = [...ue.mts];
|
|
10093
10132
|
return e != null && e.allowJs && (t.push(".js", ".jsx"), s.push(".cjs"), n.push(".mjs")), [
|
|
10094
10133
|
...t,
|
|
10095
10134
|
...s,
|
|
10096
10135
|
...n
|
|
10097
10136
|
];
|
|
10098
|
-
}, "getSupportedExtensions"),
|
|
10137
|
+
}, "getSupportedExtensions"), en = i((e) => {
|
|
10099
10138
|
const t = [];
|
|
10100
10139
|
if (!e) return t;
|
|
10101
10140
|
const { outDir: s, declarationDir: n } = e;
|
|
@@ -10104,29 +10143,29 @@ const Te = q((e) => {
|
|
|
10104
10143
|
"node_modules",
|
|
10105
10144
|
"bower_components",
|
|
10106
10145
|
"jspm_packages"
|
|
10107
|
-
].join("|")})(/|$))`,
|
|
10146
|
+
].join("|")})(/|$))`, tn = /(?:^|\/)[^.*?]+$/, je = "**/*", K = "[^/]", ae = "[^./]", Fe = process.platform === "win32", De = i(({ config: e, path: t }, s = Ke()) => {
|
|
10108
10147
|
if ("extends" in e) throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");
|
|
10109
10148
|
if (!PATH.isAbsolute(t)) throw new Error("The tsconfig path must be absolute");
|
|
10110
10149
|
Fe && (t = L(t));
|
|
10111
|
-
const n = PATH.dirname(t), { files: o, include: l, exclude: r, compilerOptions: f } = e, u = i((
|
|
10112
|
-
const v = u(
|
|
10113
|
-
return new RegExp(`^${
|
|
10114
|
-
}), D = o || l ? l : [je], T = D ? D.map((
|
|
10115
|
-
let v = u(
|
|
10116
|
-
|
|
10117
|
-
const
|
|
10150
|
+
const n = PATH.dirname(t), { files: o, include: l, exclude: r, compilerOptions: f } = e, u = i((d) => PATH.isAbsolute(d) ? d : _e(n, d), "resolvePattern"), g = o == null ? void 0 : o.map(u), w = Ce(f), b = s ? "" : "i", h = (r || en(f)).map((d) => {
|
|
10151
|
+
const v = u(d), $ = ye(v).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${K}*`).replaceAll(String.raw`\?`, K);
|
|
10152
|
+
return new RegExp(`^${$}($|/)`, b);
|
|
10153
|
+
}), D = o || l ? l : [je], T = D ? D.map((d) => {
|
|
10154
|
+
let v = u(d);
|
|
10155
|
+
tn.test(v) && (v = _e(v, je));
|
|
10156
|
+
const $ = ye(v).replaceAll(String.raw`/\*\*`, `(/${fe}${ae}${K}*)*?`).replaceAll(/(\/)?\\\*/g, (c, j) => {
|
|
10118
10157
|
const y = `(${ae}|(\\.(?!min\\.js$))?)*`;
|
|
10119
10158
|
return j ? `/${fe}${ae}${y}` : y;
|
|
10120
10159
|
}).replaceAll(/(\/)?\\\?/g, (c, j) => {
|
|
10121
10160
|
const y = K;
|
|
10122
10161
|
return j ? `/${fe}${y}` : y;
|
|
10123
10162
|
});
|
|
10124
|
-
return new RegExp(`^${
|
|
10163
|
+
return new RegExp(`^${$}$`, b);
|
|
10125
10164
|
}) : void 0;
|
|
10126
|
-
return (
|
|
10127
|
-
if (!PATH.isAbsolute(
|
|
10128
|
-
if (Fe && (
|
|
10129
|
-
if (!(!
|
|
10165
|
+
return (d) => {
|
|
10166
|
+
if (!PATH.isAbsolute(d)) throw new Error("filePath must be absolute");
|
|
10167
|
+
if (Fe && (d = L(d)), g != null && g.includes(d)) return e;
|
|
10168
|
+
if (!(!w.some((v) => d.endsWith(v)) || h.some((v) => v.test(d))) && T && T.some((v) => v.test(d))) return e;
|
|
10130
10169
|
};
|
|
10131
10170
|
}, "createFilesMatcher"), he = i((e, t, s) => {
|
|
10132
10171
|
const n = PATH.resolve(e);
|
|
@@ -10139,14 +10178,14 @@ const Te = q((e) => {
|
|
|
10139
10178
|
config: f
|
|
10140
10179
|
};
|
|
10141
10180
|
if (De(u)(n)) return u;
|
|
10142
|
-
const
|
|
10143
|
-
if (b ===
|
|
10181
|
+
const w = PATH.dirname(l), b = PATH.dirname(w);
|
|
10182
|
+
if (b === w) return;
|
|
10144
10183
|
o = b;
|
|
10145
10184
|
}
|
|
10146
10185
|
}, "findConfigApplicable"), Le = i((e = process.cwd(), t = "tsconfig.json", s = /* @__PURE__ */ new Map(), n = !1) => {
|
|
10147
10186
|
var o;
|
|
10148
10187
|
return n ? (o = he(e, t, s)) == null ? void 0 : o.path : O(L(e), t, s);
|
|
10149
|
-
}, "findTsconfig"),
|
|
10188
|
+
}, "findTsconfig"), sn = i((e = process.cwd(), t = "tsconfig.json", s = /* @__PURE__ */ new Map(), n = !1) => {
|
|
10150
10189
|
var o;
|
|
10151
10190
|
if (!n) {
|
|
10152
10191
|
const l = Le(e, t, s);
|
|
@@ -10157,10 +10196,10 @@ const Te = q((e) => {
|
|
|
10157
10196
|
};
|
|
10158
10197
|
}
|
|
10159
10198
|
return (o = he(e, t, s)) != null ? o : null;
|
|
10160
|
-
}, "getTsconfig"),
|
|
10161
|
-
const s = e.match(
|
|
10199
|
+
}, "getTsconfig"), ln = /\*/g, Ee = i((e, t) => {
|
|
10200
|
+
const s = e.match(ln);
|
|
10162
10201
|
if (s && s.length > 1) throw new Error(t);
|
|
10163
|
-
}, "assertStarCount"),
|
|
10202
|
+
}, "assertStarCount"), on = i((e) => {
|
|
10164
10203
|
if (e.includes("*")) {
|
|
10165
10204
|
const [t, s] = e.split("*");
|
|
10166
10205
|
return {
|
|
@@ -10169,8 +10208,8 @@ const Te = q((e) => {
|
|
|
10169
10208
|
};
|
|
10170
10209
|
}
|
|
10171
10210
|
return e;
|
|
10172
|
-
}, "parsePattern"),
|
|
10173
|
-
pattern:
|
|
10211
|
+
}, "parsePattern"), rn = i(({ prefix: e, suffix: t }, s) => s.startsWith(e) && s.endsWith(t), "isPatternMatch"), un = i((e, t, s) => Object.entries(e).map(([n, o]) => (Ee(n, `Pattern '${n}' can have at most one '*' character.`), {
|
|
10212
|
+
pattern: on(n),
|
|
10174
10213
|
substitutions: o.map((l) => {
|
|
10175
10214
|
if (Ee(l, `Substitution '${l}' in pattern '${n}' can have at most one '*' character.`), !t && !C.test(l) && !PATH.isAbsolute(l)) throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");
|
|
10176
10215
|
return PATH.resolve(s, l);
|
|
@@ -10181,7 +10220,7 @@ i((e) => {
|
|
|
10181
10220
|
if (!t) return null;
|
|
10182
10221
|
const { baseUrl: s, paths: n } = t;
|
|
10183
10222
|
if (!s && !n) return null;
|
|
10184
|
-
const o = ne in t && t[ne], l = PATH.resolve(PATH.dirname(e.path), s || o || "."), r = n ?
|
|
10223
|
+
const o = ne in t && t[ne], l = PATH.resolve(PATH.dirname(e.path), s || o || "."), r = n ? un(n, s, l) : [];
|
|
10185
10224
|
return (f) => {
|
|
10186
10225
|
if (C.test(f)) return [];
|
|
10187
10226
|
const u = [];
|
|
@@ -10189,8 +10228,8 @@ i((e) => {
|
|
|
10189
10228
|
if (_.pattern === f) return _.substitutions.map(L);
|
|
10190
10229
|
typeof _.pattern != "string" && u.push(_);
|
|
10191
10230
|
}
|
|
10192
|
-
let g,
|
|
10193
|
-
for (const _ of u)
|
|
10231
|
+
let g, w = -1;
|
|
10232
|
+
for (const _ of u) rn(_.pattern, f) && _.pattern.prefix.length > w && (w = _.pattern.prefix.length, g = _);
|
|
10194
10233
|
if (!g) return s ? [L(PATH.join(l, f))] : [];
|
|
10195
10234
|
const b = f.slice(g.pattern.prefix.length, f.length - g.pattern.suffix.length);
|
|
10196
10235
|
return g.substitutions.map((_) => L(_.replace("*", b)));
|
|
@@ -10205,7 +10244,7 @@ const readRootTsconfigModule = (pkg) => {
|
|
|
10205
10244
|
return typeof module === "string" ? module : void 0;
|
|
10206
10245
|
};
|
|
10207
10246
|
const readResolvedTsconfigTypes = (pkg) => {
|
|
10208
|
-
const compilerOptions =
|
|
10247
|
+
const compilerOptions = sn(PATH.resolve(pkg), "tsconfig.json")?.config?.compilerOptions;
|
|
10209
10248
|
if (!compilerOptions || !("types" in compilerOptions)) return;
|
|
10210
10249
|
const { types } = compilerOptions;
|
|
10211
10250
|
if (!Array.isArray(types)) return;
|
|
@@ -10453,6 +10492,10 @@ const warnDeprecatedEmptyObjectTargets = (targets) => {
|
|
|
10453
10492
|
* `compile.nativePackage`.
|
|
10454
10493
|
*/
|
|
10455
10494
|
const DEFAULT_NATIVE_PACKAGE = "typescript-native";
|
|
10495
|
+
/**
|
|
10496
|
+
* Full `package.json` alias spec for {@link DEFAULT_NATIVE_PACKAGE}.
|
|
10497
|
+
*/
|
|
10498
|
+
const DEFAULT_NATIVE_ALIAS_SPEC = `npm:typescript@~7.0.2`;
|
|
10456
10499
|
const readTscBinEntry = (packageJsonPath) => {
|
|
10457
10500
|
const { bin } = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
10458
10501
|
if (typeof bin === "string") return bin;
|
|
@@ -10494,7 +10537,8 @@ const resolveCached = (packageName, fromDir) => {
|
|
|
10494
10537
|
const missingNativeMessage = (packageName) => [
|
|
10495
10538
|
`Compile: compile.compiler is "native" but "${packageName}" is not installed.`,
|
|
10496
10539
|
" Add it as an alias so it does not collide with the compiler API package:",
|
|
10497
|
-
` "${packageName}": "
|
|
10540
|
+
` "${packageName}": "${DEFAULT_NATIVE_ALIAS_SPEC}"`,
|
|
10541
|
+
" Or run: xy enable ts-native",
|
|
10498
10542
|
" Keep \"typescript\" pinned to 6.x — ESLint and the xy analyzers load the compiler API from it."
|
|
10499
10543
|
].join("\n");
|
|
10500
10544
|
/**
|