@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 {
|
|
@@ -7630,6 +7630,39 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7630
7630
|
exports.cosmiconfigSync = cosmiconfigSync;
|
|
7631
7631
|
}));
|
|
7632
7632
|
//#endregion
|
|
7633
|
+
//#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
|
|
7634
|
+
var TypeScriptCompileError = class _TypeScriptCompileError extends Error {
|
|
7635
|
+
constructor(message) {
|
|
7636
|
+
super(message);
|
|
7637
|
+
this.name = this.constructor.name;
|
|
7638
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
7639
|
+
}
|
|
7640
|
+
static fromError(error) {
|
|
7641
|
+
const message = `TypeScriptLoader failed to compile TypeScript:
|
|
7642
|
+
${error.message}`;
|
|
7643
|
+
const newError = new _TypeScriptCompileError(message);
|
|
7644
|
+
newError.stack = error.stack;
|
|
7645
|
+
return newError;
|
|
7646
|
+
}
|
|
7647
|
+
};
|
|
7648
|
+
//#endregion
|
|
7649
|
+
//#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
|
|
7650
|
+
function TypeScriptLoader(options) {
|
|
7651
|
+
const loader = createJiti("", {
|
|
7652
|
+
interopDefault: true,
|
|
7653
|
+
...options
|
|
7654
|
+
});
|
|
7655
|
+
return async (path, _content) => {
|
|
7656
|
+
try {
|
|
7657
|
+
const result = await loader.import(path);
|
|
7658
|
+
return result.default || result;
|
|
7659
|
+
} catch (error) {
|
|
7660
|
+
if (error instanceof Error) throw TypeScriptCompileError.fromError(error);
|
|
7661
|
+
throw error;
|
|
7662
|
+
}
|
|
7663
|
+
};
|
|
7664
|
+
}
|
|
7665
|
+
//#endregion
|
|
7633
7666
|
//#region src/lib/ruleCommandRegistry.ts
|
|
7634
7667
|
const RULE_COMMANDS = {
|
|
7635
7668
|
apiExposure: {
|
|
@@ -10045,7 +10078,7 @@ const v = (r, t, e) => {
|
|
|
10045
10078
|
return n;
|
|
10046
10079
|
};
|
|
10047
10080
|
//#endregion
|
|
10048
|
-
//#region ../../node_modules/.pnpm/get-tsconfig@4.14.
|
|
10081
|
+
//#region ../../node_modules/.pnpm/get-tsconfig@4.14.2/node_modules/get-tsconfig/dist/index.mjs
|
|
10049
10082
|
var xe = Object.defineProperty;
|
|
10050
10083
|
var i = (e, t) => xe(e, "name", {
|
|
10051
10084
|
value: t,
|
|
@@ -10088,7 +10121,7 @@ const X = i((e) => {
|
|
|
10088
10121
|
}, "normalizeRelativePath");
|
|
10089
10122
|
function We(e, t = !1) {
|
|
10090
10123
|
const s = e.length;
|
|
10091
|
-
let n = 0, o = "", l = 0, r = 16, f = 0, u = 0, g = 0,
|
|
10124
|
+
let n = 0, o = "", l = 0, r = 16, f = 0, u = 0, g = 0, w = 0, b = 0;
|
|
10092
10125
|
function _(c, j) {
|
|
10093
10126
|
let y = 0, A = 0;
|
|
10094
10127
|
for (; y < c;) {
|
|
@@ -10181,8 +10214,8 @@ function We(e, t = !1) {
|
|
|
10181
10214
|
return c;
|
|
10182
10215
|
}
|
|
10183
10216
|
i(T, "scanString");
|
|
10184
|
-
function
|
|
10185
|
-
if (o = "", b = 0, l = n, u = f,
|
|
10217
|
+
function d() {
|
|
10218
|
+
if (o = "", b = 0, l = n, u = f, w = g, n >= s) return l = s, r = 17;
|
|
10186
10219
|
let c = e.charCodeAt(n);
|
|
10187
10220
|
if (ee(c)) {
|
|
10188
10221
|
do
|
|
@@ -10245,7 +10278,7 @@ function We(e, t = !1) {
|
|
|
10245
10278
|
return o += String.fromCharCode(c), n++, r = 16;
|
|
10246
10279
|
}
|
|
10247
10280
|
}
|
|
10248
|
-
i(
|
|
10281
|
+
i(d, "scanNext");
|
|
10249
10282
|
function v(c) {
|
|
10250
10283
|
if (ee(c) || J(c)) return !1;
|
|
10251
10284
|
switch (c) {
|
|
@@ -10261,23 +10294,23 @@ function We(e, t = !1) {
|
|
|
10261
10294
|
return !0;
|
|
10262
10295
|
}
|
|
10263
10296
|
i(v, "isUnknownContentCharacter");
|
|
10264
|
-
function
|
|
10297
|
+
function $() {
|
|
10265
10298
|
let c;
|
|
10266
10299
|
do
|
|
10267
|
-
c =
|
|
10300
|
+
c = d();
|
|
10268
10301
|
while (c >= 12 && c <= 15);
|
|
10269
10302
|
return c;
|
|
10270
10303
|
}
|
|
10271
|
-
return i(
|
|
10304
|
+
return i($, "scanNextNonTrivia"), {
|
|
10272
10305
|
setPosition: h,
|
|
10273
10306
|
getPosition: i(() => n, "getPosition"),
|
|
10274
|
-
scan: t ?
|
|
10307
|
+
scan: t ? $ : d,
|
|
10275
10308
|
getToken: i(() => r, "getToken"),
|
|
10276
10309
|
getTokenValue: i(() => o, "getTokenValue"),
|
|
10277
10310
|
getTokenOffset: i(() => l, "getTokenOffset"),
|
|
10278
10311
|
getTokenLength: i(() => n - l, "getTokenLength"),
|
|
10279
10312
|
getTokenStartLine: i(() => u, "getTokenStartLine"),
|
|
10280
|
-
getTokenStartCharacter: i(() => l -
|
|
10313
|
+
getTokenStartCharacter: i(() => l - w, "getTokenStartCharacter"),
|
|
10281
10314
|
getTokenError: i(() => b, "getTokenError")
|
|
10282
10315
|
};
|
|
10283
10316
|
}
|
|
@@ -10333,11 +10366,11 @@ function Je(e, t = [], s = Y.DEFAULT) {
|
|
|
10333
10366
|
o = l.pop();
|
|
10334
10367
|
}, "onArrayEnd"),
|
|
10335
10368
|
onLiteralValue: r,
|
|
10336
|
-
onError: i((u, g,
|
|
10369
|
+
onError: i((u, g, w) => {
|
|
10337
10370
|
t.push({
|
|
10338
10371
|
error: u,
|
|
10339
10372
|
offset: g,
|
|
10340
|
-
length:
|
|
10373
|
+
length: w
|
|
10341
10374
|
});
|
|
10342
10375
|
}, "onError")
|
|
10343
10376
|
}, s), o[0];
|
|
@@ -10364,13 +10397,13 @@ function Me(e, t, s = Y.DEFAULT) {
|
|
|
10364
10397
|
} : () => !0;
|
|
10365
10398
|
}
|
|
10366
10399
|
i(g, "toBeginVisit");
|
|
10367
|
-
function
|
|
10400
|
+
function w(p) {
|
|
10368
10401
|
return p ? () => {
|
|
10369
10402
|
l > 0 && l--, l === 0 && p(n.getTokenOffset(), n.getTokenLength(), n.getTokenStartLine(), n.getTokenStartCharacter());
|
|
10370
10403
|
} : () => !0;
|
|
10371
10404
|
}
|
|
10372
|
-
i(
|
|
10373
|
-
const b = g(t.onObjectBegin), _ = u(t.onObjectProperty), h =
|
|
10405
|
+
i(w, "toEndVisit");
|
|
10406
|
+
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;
|
|
10374
10407
|
function A() {
|
|
10375
10408
|
for (;;) {
|
|
10376
10409
|
const p = n.scan();
|
|
@@ -10395,7 +10428,7 @@ function Me(e, t, s = Y.DEFAULT) {
|
|
|
10395
10428
|
switch (p) {
|
|
10396
10429
|
case 12:
|
|
10397
10430
|
case 13:
|
|
10398
|
-
j ? k(10) :
|
|
10431
|
+
j ? k(10) : $();
|
|
10399
10432
|
break;
|
|
10400
10433
|
case 16:
|
|
10401
10434
|
k(1);
|
|
@@ -10422,7 +10455,7 @@ function Me(e, t, s = Y.DEFAULT) {
|
|
|
10422
10455
|
i(k, "handleError");
|
|
10423
10456
|
function P(p) {
|
|
10424
10457
|
const F = n.getTokenValue();
|
|
10425
|
-
return p ?
|
|
10458
|
+
return p ? d(F) : (_(F), o.push(F)), A(), !0;
|
|
10426
10459
|
}
|
|
10427
10460
|
i(P, "parseString");
|
|
10428
10461
|
function M() {
|
|
@@ -10430,16 +10463,16 @@ function Me(e, t, s = Y.DEFAULT) {
|
|
|
10430
10463
|
case 11:
|
|
10431
10464
|
const p = n.getTokenValue();
|
|
10432
10465
|
let F = Number(p);
|
|
10433
|
-
isNaN(F) && (k(2), F = 0),
|
|
10466
|
+
isNaN(F) && (k(2), F = 0), d(F);
|
|
10434
10467
|
break;
|
|
10435
10468
|
case 7:
|
|
10436
|
-
|
|
10469
|
+
d(null);
|
|
10437
10470
|
break;
|
|
10438
10471
|
case 8:
|
|
10439
|
-
|
|
10472
|
+
d(!0);
|
|
10440
10473
|
break;
|
|
10441
10474
|
case 9:
|
|
10442
|
-
|
|
10475
|
+
d(!1);
|
|
10443
10476
|
break;
|
|
10444
10477
|
default: return !1;
|
|
10445
10478
|
}
|
|
@@ -10494,21 +10527,21 @@ var me;
|
|
|
10494
10527
|
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";
|
|
10495
10528
|
})(me || (me = {}));
|
|
10496
10529
|
const Ve = Je;
|
|
10497
|
-
var
|
|
10530
|
+
var de;
|
|
10498
10531
|
(function(e) {
|
|
10499
10532
|
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";
|
|
10500
|
-
})(
|
|
10501
|
-
const
|
|
10533
|
+
})(de || (de = {}));
|
|
10534
|
+
const we = i((e, t) => Ve(Se(t, e, "utf8")), "readJsonc");
|
|
10502
10535
|
const ne = Symbol("implicitBaseUrl");
|
|
10503
10536
|
const E = "${configDir}";
|
|
10504
10537
|
const ze = i(() => {
|
|
10505
|
-
const { findPnpApi: e } =
|
|
10538
|
+
const { findPnpApi: e } = $e;
|
|
10506
10539
|
return e && e(process.cwd());
|
|
10507
10540
|
}, "getPnpApi");
|
|
10508
10541
|
const te = i((e, t, s, n) => {
|
|
10509
10542
|
const o = `resolveFromPackageJsonPath:${e}:${t}:${s}`;
|
|
10510
10543
|
if (n != null && n.has(o)) return n.get(o);
|
|
10511
|
-
const l =
|
|
10544
|
+
const l = we(e, n);
|
|
10512
10545
|
if (!l) return;
|
|
10513
10546
|
let r = t || "tsconfig.json";
|
|
10514
10547
|
if (!s && l.exports) try {
|
|
@@ -10539,25 +10572,25 @@ const Ge = i((e, t, s) => {
|
|
|
10539
10572
|
const { resolveRequest: T } = g;
|
|
10540
10573
|
try {
|
|
10541
10574
|
if (f === e) {
|
|
10542
|
-
const
|
|
10543
|
-
if (
|
|
10544
|
-
const v = te(
|
|
10575
|
+
const d = T(PATH.join(f, se), t);
|
|
10576
|
+
if (d) {
|
|
10577
|
+
const v = te(d, u, !1, s);
|
|
10545
10578
|
if (v && x(s, v)) return v;
|
|
10546
10579
|
}
|
|
10547
10580
|
} else {
|
|
10548
|
-
let
|
|
10581
|
+
let d;
|
|
10549
10582
|
try {
|
|
10550
|
-
|
|
10583
|
+
d = T(e, t, { extensions: [".json"] });
|
|
10551
10584
|
} catch {
|
|
10552
|
-
|
|
10585
|
+
d = T(PATH.join(e, le), t);
|
|
10553
10586
|
}
|
|
10554
|
-
if (
|
|
10587
|
+
if (d) return d;
|
|
10555
10588
|
}
|
|
10556
10589
|
} catch {}
|
|
10557
10590
|
}
|
|
10558
|
-
const
|
|
10559
|
-
if (!
|
|
10560
|
-
const b = Pe$1(s,
|
|
10591
|
+
const w = O(PATH.resolve(t), PATH.join("node_modules", f), s);
|
|
10592
|
+
if (!w || !((n = H(s, w)) != null && n.isDirectory())) return;
|
|
10593
|
+
const b = Pe$1(s, w), _ = PATH.join(b, se);
|
|
10561
10594
|
if (x(s, _)) {
|
|
10562
10595
|
const T = te(_, u, !1, s);
|
|
10563
10596
|
if (T === !1) return;
|
|
@@ -10575,8 +10608,8 @@ const Ge = i((e, t, s) => {
|
|
|
10575
10608
|
const v = te(T, "", !0, s);
|
|
10576
10609
|
if (v && x(s, v)) return v;
|
|
10577
10610
|
}
|
|
10578
|
-
const
|
|
10579
|
-
if (x(s,
|
|
10611
|
+
const d = PATH.join(h, le);
|
|
10612
|
+
if (x(s, d)) return d;
|
|
10580
10613
|
} else if (D) return h;
|
|
10581
10614
|
}
|
|
10582
10615
|
}, "resolveExtendsPath");
|
|
@@ -10608,8 +10641,8 @@ const He = i((e, t, s, n) => {
|
|
|
10608
10641
|
u && !u.startsWith(E) && (f.baseUrl = N(t, l, u));
|
|
10609
10642
|
const { outDir: g } = f;
|
|
10610
10643
|
g && !g.startsWith(E) && (f.outDir = N(t, l, g));
|
|
10611
|
-
const { declarationDir:
|
|
10612
|
-
|
|
10644
|
+
const { declarationDir: w } = f;
|
|
10645
|
+
w && !w.startsWith(E) && (f.declarationDir = N(t, l, w));
|
|
10613
10646
|
const { rootDir: b } = f;
|
|
10614
10647
|
b && !b.startsWith(E) && (f.rootDir = N(t, l, b));
|
|
10615
10648
|
const { rootDirs: _ } = f;
|
|
@@ -10619,7 +10652,7 @@ const He = i((e, t, s, n) => {
|
|
|
10619
10652
|
}
|
|
10620
10653
|
for (const u of pe) {
|
|
10621
10654
|
const g = r[u];
|
|
10622
|
-
g && (r[u] = g.map((
|
|
10655
|
+
g && (r[u] = g.map((w) => w.startsWith(E) ? w : Qe(t, l, w)));
|
|
10623
10656
|
}
|
|
10624
10657
|
return r;
|
|
10625
10658
|
}, "resolveExtends");
|
|
@@ -10627,7 +10660,7 @@ const be = ["outDir", "declarationDir"];
|
|
|
10627
10660
|
const ve = i((e, t, s = /* @__PURE__ */ new Set()) => {
|
|
10628
10661
|
let n;
|
|
10629
10662
|
try {
|
|
10630
|
-
n =
|
|
10663
|
+
n = we(e, t) || {};
|
|
10631
10664
|
} catch {
|
|
10632
10665
|
throw new Error(`Cannot resolve tsconfig at path: ${e}`);
|
|
10633
10666
|
}
|
|
@@ -10687,7 +10720,7 @@ const Xe = [
|
|
|
10687
10720
|
"tsBuildInfoFile"
|
|
10688
10721
|
];
|
|
10689
10722
|
const Ye = i((e) => {
|
|
10690
|
-
if (e.strict) for (const
|
|
10723
|
+
if (e.strict) for (const B of [
|
|
10691
10724
|
"noImplicitAny",
|
|
10692
10725
|
"noImplicitThis",
|
|
10693
10726
|
"strictNullChecks",
|
|
@@ -10697,7 +10730,7 @@ const Ye = i((e) => {
|
|
|
10697
10730
|
"strictBuiltinIteratorReturn",
|
|
10698
10731
|
"alwaysStrict",
|
|
10699
10732
|
"useUnknownInCatchVariables"
|
|
10700
|
-
]) e[
|
|
10733
|
+
]) e[B] === void 0 && (e[B] = !0);
|
|
10701
10734
|
if (e.composite && (e.declaration ??= !0, e.incremental ??= !0), e.target) {
|
|
10702
10735
|
let a = e.target.toLowerCase();
|
|
10703
10736
|
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);
|
|
@@ -10705,8 +10738,8 @@ const Ye = i((e) => {
|
|
|
10705
10738
|
if (e.module) {
|
|
10706
10739
|
let a = e.module.toLowerCase();
|
|
10707
10740
|
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") {
|
|
10708
|
-
const
|
|
10709
|
-
(
|
|
10741
|
+
const B = e.target;
|
|
10742
|
+
(B === "es3" || B === "es2022" || B === "es2023" || B === "es2024" || B === "esnext") && (e.useDefineForClassFields ??= !0);
|
|
10710
10743
|
}
|
|
10711
10744
|
a === "preserve" && (e.moduleResolution ??= "bundler");
|
|
10712
10745
|
}
|
|
@@ -10729,8 +10762,8 @@ const ie = i((e, t = /* @__PURE__ */ new Map()) => {
|
|
|
10729
10762
|
for (const f of ["rootDirs", "typeRoots"]) {
|
|
10730
10763
|
const u = l[f];
|
|
10731
10764
|
u && (l[f] = u.map((g) => {
|
|
10732
|
-
const
|
|
10733
|
-
return
|
|
10765
|
+
const w = Z(g, o);
|
|
10766
|
+
return w ? oe(o, w) : X(g);
|
|
10734
10767
|
}));
|
|
10735
10768
|
}
|
|
10736
10769
|
const { paths: r } = l;
|
|
@@ -10783,7 +10816,10 @@ const Te = q((e) => {
|
|
|
10783
10816
|
let o;
|
|
10784
10817
|
const l = Te(n);
|
|
10785
10818
|
return l !== n && t.existsSync(n) ? o = !t.existsSync(l) : o = qe(n, e, t), s && re.set(n, o), o;
|
|
10786
|
-
}, "isFsCaseSensitive"), { join:
|
|
10819
|
+
}, "isFsCaseSensitive"), { join: Oe } = PATH.posix, _e = i((e, t) => {
|
|
10820
|
+
const s = Oe(e, t);
|
|
10821
|
+
return e.startsWith("//") && !s.startsWith("//") ? `/${s}` : s;
|
|
10822
|
+
}, "pathJoin"), ue = {
|
|
10787
10823
|
ts: [
|
|
10788
10824
|
".ts",
|
|
10789
10825
|
".tsx",
|
|
@@ -10791,14 +10827,14 @@ const Te = q((e) => {
|
|
|
10791
10827
|
],
|
|
10792
10828
|
cts: [".cts", ".d.cts"],
|
|
10793
10829
|
mts: [".mts", ".d.mts"]
|
|
10794
|
-
},
|
|
10830
|
+
}, Ce = i((e) => {
|
|
10795
10831
|
const t = [...ue.ts], s = [...ue.cts], n = [...ue.mts];
|
|
10796
10832
|
return e != null && e.allowJs && (t.push(".js", ".jsx"), s.push(".cjs"), n.push(".mjs")), [
|
|
10797
10833
|
...t,
|
|
10798
10834
|
...s,
|
|
10799
10835
|
...n
|
|
10800
10836
|
];
|
|
10801
|
-
}, "getSupportedExtensions"),
|
|
10837
|
+
}, "getSupportedExtensions"), en = i((e) => {
|
|
10802
10838
|
const t = [];
|
|
10803
10839
|
if (!e) return t;
|
|
10804
10840
|
const { outDir: s, declarationDir: n } = e;
|
|
@@ -10807,29 +10843,29 @@ const Te = q((e) => {
|
|
|
10807
10843
|
"node_modules",
|
|
10808
10844
|
"bower_components",
|
|
10809
10845
|
"jspm_packages"
|
|
10810
|
-
].join("|")})(/|$))`,
|
|
10846
|
+
].join("|")})(/|$))`, tn = /(?:^|\/)[^.*?]+$/, je = "**/*", K = "[^/]", ae = "[^./]", Fe = process.platform === "win32", De = i(({ config: e, path: t }, s = Ke()) => {
|
|
10811
10847
|
if ("extends" in e) throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");
|
|
10812
10848
|
if (!PATH.isAbsolute(t)) throw new Error("The tsconfig path must be absolute");
|
|
10813
10849
|
Fe && (t = L(t));
|
|
10814
|
-
const n = PATH.dirname(t), { files: o, include: l, exclude: r, compilerOptions: f } = e, u = i((
|
|
10815
|
-
const v = u(
|
|
10816
|
-
return new RegExp(`^${
|
|
10817
|
-
}), D = o || l ? l : [je], T = D ? D.map((
|
|
10818
|
-
let v = u(
|
|
10819
|
-
|
|
10820
|
-
const
|
|
10850
|
+
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) => {
|
|
10851
|
+
const v = u(d), $ = ye(v).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${K}*`).replaceAll(String.raw`\?`, K);
|
|
10852
|
+
return new RegExp(`^${$}($|/)`, b);
|
|
10853
|
+
}), D = o || l ? l : [je], T = D ? D.map((d) => {
|
|
10854
|
+
let v = u(d);
|
|
10855
|
+
tn.test(v) && (v = _e(v, je));
|
|
10856
|
+
const $ = ye(v).replaceAll(String.raw`/\*\*`, `(/${fe}${ae}${K}*)*?`).replaceAll(/(\/)?\\\*/g, (c, j) => {
|
|
10821
10857
|
const y = `(${ae}|(\\.(?!min\\.js$))?)*`;
|
|
10822
10858
|
return j ? `/${fe}${ae}${y}` : y;
|
|
10823
10859
|
}).replaceAll(/(\/)?\\\?/g, (c, j) => {
|
|
10824
10860
|
const y = K;
|
|
10825
10861
|
return j ? `/${fe}${y}` : y;
|
|
10826
10862
|
});
|
|
10827
|
-
return new RegExp(`^${
|
|
10863
|
+
return new RegExp(`^${$}$`, b);
|
|
10828
10864
|
}) : void 0;
|
|
10829
|
-
return (
|
|
10830
|
-
if (!PATH.isAbsolute(
|
|
10831
|
-
if (Fe && (
|
|
10832
|
-
if (!(!
|
|
10865
|
+
return (d) => {
|
|
10866
|
+
if (!PATH.isAbsolute(d)) throw new Error("filePath must be absolute");
|
|
10867
|
+
if (Fe && (d = L(d)), g != null && g.includes(d)) return e;
|
|
10868
|
+
if (!(!w.some((v) => d.endsWith(v)) || h.some((v) => v.test(d))) && T && T.some((v) => v.test(d))) return e;
|
|
10833
10869
|
};
|
|
10834
10870
|
}, "createFilesMatcher"), he = i((e, t, s) => {
|
|
10835
10871
|
const n = PATH.resolve(e);
|
|
@@ -10842,14 +10878,14 @@ const Te = q((e) => {
|
|
|
10842
10878
|
config: f
|
|
10843
10879
|
};
|
|
10844
10880
|
if (De(u)(n)) return u;
|
|
10845
|
-
const
|
|
10846
|
-
if (b ===
|
|
10881
|
+
const w = PATH.dirname(l), b = PATH.dirname(w);
|
|
10882
|
+
if (b === w) return;
|
|
10847
10883
|
o = b;
|
|
10848
10884
|
}
|
|
10849
10885
|
}, "findConfigApplicable"), Le = i((e = process.cwd(), t = "tsconfig.json", s = /* @__PURE__ */ new Map(), n = !1) => {
|
|
10850
10886
|
var o;
|
|
10851
10887
|
return n ? (o = he(e, t, s)) == null ? void 0 : o.path : O(L(e), t, s);
|
|
10852
|
-
}, "findTsconfig"),
|
|
10888
|
+
}, "findTsconfig"), sn = i((e = process.cwd(), t = "tsconfig.json", s = /* @__PURE__ */ new Map(), n = !1) => {
|
|
10853
10889
|
var o;
|
|
10854
10890
|
if (!n) {
|
|
10855
10891
|
const l = Le(e, t, s);
|
|
@@ -10860,10 +10896,10 @@ const Te = q((e) => {
|
|
|
10860
10896
|
};
|
|
10861
10897
|
}
|
|
10862
10898
|
return (o = he(e, t, s)) != null ? o : null;
|
|
10863
|
-
}, "getTsconfig"),
|
|
10864
|
-
const s = e.match(
|
|
10899
|
+
}, "getTsconfig"), ln = /\*/g, Ee = i((e, t) => {
|
|
10900
|
+
const s = e.match(ln);
|
|
10865
10901
|
if (s && s.length > 1) throw new Error(t);
|
|
10866
|
-
}, "assertStarCount"),
|
|
10902
|
+
}, "assertStarCount"), on = i((e) => {
|
|
10867
10903
|
if (e.includes("*")) {
|
|
10868
10904
|
const [t, s] = e.split("*");
|
|
10869
10905
|
return {
|
|
@@ -10872,8 +10908,8 @@ const Te = q((e) => {
|
|
|
10872
10908
|
};
|
|
10873
10909
|
}
|
|
10874
10910
|
return e;
|
|
10875
|
-
}, "parsePattern"),
|
|
10876
|
-
pattern:
|
|
10911
|
+
}, "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.`), {
|
|
10912
|
+
pattern: on(n),
|
|
10877
10913
|
substitutions: o.map((l) => {
|
|
10878
10914
|
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 './'?");
|
|
10879
10915
|
return PATH.resolve(s, l);
|
|
@@ -10884,7 +10920,7 @@ i((e) => {
|
|
|
10884
10920
|
if (!t) return null;
|
|
10885
10921
|
const { baseUrl: s, paths: n } = t;
|
|
10886
10922
|
if (!s && !n) return null;
|
|
10887
|
-
const o = ne in t && t[ne], l = PATH.resolve(PATH.dirname(e.path), s || o || "."), r = n ?
|
|
10923
|
+
const o = ne in t && t[ne], l = PATH.resolve(PATH.dirname(e.path), s || o || "."), r = n ? un(n, s, l) : [];
|
|
10888
10924
|
return (f) => {
|
|
10889
10925
|
if (C.test(f)) return [];
|
|
10890
10926
|
const u = [];
|
|
@@ -10892,8 +10928,8 @@ i((e) => {
|
|
|
10892
10928
|
if (_.pattern === f) return _.substitutions.map(L);
|
|
10893
10929
|
typeof _.pattern != "string" && u.push(_);
|
|
10894
10930
|
}
|
|
10895
|
-
let g,
|
|
10896
|
-
for (const _ of u)
|
|
10931
|
+
let g, w = -1;
|
|
10932
|
+
for (const _ of u) rn(_.pattern, f) && _.pattern.prefix.length > w && (w = _.pattern.prefix.length, g = _);
|
|
10897
10933
|
if (!g) return s ? [L(PATH.join(l, f))] : [];
|
|
10898
10934
|
const b = f.slice(g.pattern.prefix.length, f.length - g.pattern.suffix.length);
|
|
10899
10935
|
return g.substitutions.map((_) => L(_.replace("*", b)));
|
|
@@ -10908,7 +10944,7 @@ const readRootTsconfigModule = (pkg) => {
|
|
|
10908
10944
|
return typeof module === "string" ? module : void 0;
|
|
10909
10945
|
};
|
|
10910
10946
|
const readResolvedTsconfigTypes = (pkg) => {
|
|
10911
|
-
const compilerOptions =
|
|
10947
|
+
const compilerOptions = sn(PATH.resolve(pkg), "tsconfig.json")?.config?.compilerOptions;
|
|
10912
10948
|
if (!compilerOptions || !("types" in compilerOptions)) return;
|
|
10913
10949
|
const { types } = compilerOptions;
|
|
10914
10950
|
if (!Array.isArray(types)) return;
|
|
@@ -11156,6 +11192,10 @@ const warnDeprecatedEmptyObjectTargets = (targets) => {
|
|
|
11156
11192
|
* `compile.nativePackage`.
|
|
11157
11193
|
*/
|
|
11158
11194
|
const DEFAULT_NATIVE_PACKAGE = "typescript-native";
|
|
11195
|
+
/**
|
|
11196
|
+
* Full `package.json` alias spec for {@link DEFAULT_NATIVE_PACKAGE}.
|
|
11197
|
+
*/
|
|
11198
|
+
const DEFAULT_NATIVE_ALIAS_SPEC = `npm:typescript@~7.0.2`;
|
|
11159
11199
|
const readTscBinEntry = (packageJsonPath) => {
|
|
11160
11200
|
const { bin } = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
11161
11201
|
if (typeof bin === "string") return bin;
|
|
@@ -11197,7 +11237,8 @@ const resolveCached = (packageName, fromDir) => {
|
|
|
11197
11237
|
const missingNativeMessage = (packageName) => [
|
|
11198
11238
|
`Compile: compile.compiler is "native" but "${packageName}" is not installed.`,
|
|
11199
11239
|
" Add it as an alias so it does not collide with the compiler API package:",
|
|
11200
|
-
` "${packageName}": "
|
|
11240
|
+
` "${packageName}": "${DEFAULT_NATIVE_ALIAS_SPEC}"`,
|
|
11241
|
+
" Or run: xy enable ts-native",
|
|
11201
11242
|
" Keep \"typescript\" pinned to 6.x — ESLint and the xy analyzers load the compiler API from it."
|
|
11202
11243
|
].join("\n");
|
|
11203
11244
|
/**
|