@ariestools/toolchain 9.0.0 → 9.0.2
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 +94 -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 -1
- package/dist/actions/index.d.ts.map +1 -1
- 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/package-lint-pnpm.d.ts +8 -1
- package/dist/actions/package-lint-pnpm.d.ts.map +1 -1
- package/dist/actions/package-lint.d.ts +16 -1
- package/dist/actions/package-lint.d.ts.map +1 -1
- package/dist/actions/packman/lint.d.ts.map +1 -1
- package/dist/actions/ruleCatalog.d.ts +4 -1
- package/dist/actions/ruleCatalog.d.ts.map +1 -1
- package/dist/actions/ruleRunner.d.ts +2 -1
- package/dist/actions/ruleRunner.d.ts.map +1 -1
- package/dist/actions/secure/dependabot.d.ts +22 -0
- package/dist/actions/secure/dependabot.d.ts.map +1 -0
- package/dist/actions/secure/dependabotRules.d.ts +9 -0
- package/dist/actions/secure/dependabotRules.d.ts.map +1 -0
- package/dist/actions/secure/deps.d.ts +18 -0
- package/dist/actions/secure/deps.d.ts.map +1 -0
- package/dist/actions/secure/index.d.ts +5 -0
- package/dist/actions/secure/index.d.ts.map +1 -0
- package/dist/actions/secure/secure.d.ts +16 -0
- package/dist/actions/secure/secure.d.ts.map +1 -0
- package/dist/actions/work/github.d.ts +3 -8
- package/dist/actions/work/github.d.ts.map +1 -1
- package/dist/bin/package/build.mjs +484 -420
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/clean.mjs +70 -31
- package/dist/bin/package/clean.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +74 -33
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/publint.mjs +429 -370
- package/dist/bin/package/publint.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +76 -32
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/package/sync-layout.mjs +68 -32
- package/dist/bin/package/sync-layout.mjs.map +1 -1
- package/dist/bin/xy.mjs +1676 -787
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/lib/github/index.d.ts +2 -0
- package/dist/lib/github/index.d.ts.map +1 -0
- package/dist/lib/github/runner.d.ts +25 -0
- package/dist/lib/github/runner.d.ts.map +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/ruleCommandRegistry.d.ts +17 -2
- package/dist/lib/ruleCommandRegistry.d.ts.map +1 -1
- package/dist/lib/secure/dependabot/fetchDependabotAlerts.d.ts +12 -0
- package/dist/lib/secure/dependabot/fetchDependabotAlerts.d.ts.map +1 -0
- package/dist/lib/secure/dependabot/index.d.ts +6 -0
- package/dist/lib/secure/dependabot/index.d.ts.map +1 -0
- package/dist/lib/secure/dependabot/interfaces.d.ts +49 -0
- package/dist/lib/secure/dependabot/interfaces.d.ts.map +1 -0
- package/dist/lib/secure/dependabot/renderDependabotAlerts.d.ts +4 -0
- package/dist/lib/secure/dependabot/renderDependabotAlerts.d.ts.map +1 -0
- package/dist/lib/secure/dependabot/summarizeDependabotAlerts.d.ts +5 -0
- package/dist/lib/secure/dependabot/summarizeDependabotAlerts.d.ts.map +1 -0
- package/dist/lib/secure/dependabot/vulnerabilityAlerts.d.ts +21 -0
- package/dist/lib/secure/dependabot/vulnerabilityAlerts.d.ts.map +1 -0
- package/dist/lib/secure/index.d.ts +1 -0
- package/dist/lib/secure/index.d.ts.map +1 -1
- package/dist/lib/secure/renderSecurityAudit.d.ts +4 -0
- package/dist/lib/secure/renderSecurityAudit.d.ts.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/common/secure/dependabotCommand.d.ts +3 -0
- package/dist/xy/common/secure/dependabotCommand.d.ts.map +1 -0
- package/dist/xy/common/secure/depsCommand.d.ts +3 -0
- package/dist/xy/common/secure/depsCommand.d.ts.map +1 -0
- package/dist/xy/common/secure/index.d.ts +5 -0
- package/dist/xy/common/secure/index.d.ts.map +1 -0
- package/dist/xy/install/cleanCommand.d.ts.map +1 -1
- package/dist/xy/xy.d.ts.map +1 -1
- package/package.json +8 -7
|
@@ -13,8 +13,8 @@ import { EventEmitter } from "node:events";
|
|
|
13
13
|
import Pe, { PassThrough } from "node:stream";
|
|
14
14
|
import { StringDecoder } from "node:string_decoder";
|
|
15
15
|
import { spawn } from "node:child_process";
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
16
|
+
import readline from "node:readline";
|
|
17
|
+
import { createJiti } from "jiti";
|
|
18
18
|
import util from "node:util";
|
|
19
19
|
import ts from "typescript";
|
|
20
20
|
import { pipeline } from "node:stream/promises";
|
|
@@ -614,24 +614,24 @@ function ht(n, t, e) {
|
|
|
614
614
|
return s;
|
|
615
615
|
}
|
|
616
616
|
function Bt(n, t = {}) {
|
|
617
|
-
return new I
|
|
617
|
+
return new I(n, t).streamSync();
|
|
618
618
|
}
|
|
619
619
|
function Qe(n, t = {}) {
|
|
620
|
-
return new I
|
|
620
|
+
return new I(n, t).stream();
|
|
621
621
|
}
|
|
622
622
|
function ts$1(n, t = {}) {
|
|
623
|
-
return new I
|
|
623
|
+
return new I(n, t).walkSync();
|
|
624
624
|
}
|
|
625
625
|
async function Je(n, t = {}) {
|
|
626
|
-
return new I
|
|
626
|
+
return new I(n, t).walk();
|
|
627
627
|
}
|
|
628
628
|
function Ut(n, t = {}) {
|
|
629
|
-
return new I
|
|
629
|
+
return new I(n, t).iterateSync();
|
|
630
630
|
}
|
|
631
631
|
function es(n, t = {}) {
|
|
632
|
-
return new I
|
|
632
|
+
return new I(n, t).iterate();
|
|
633
633
|
}
|
|
634
|
-
var Gt, ce, ss, fe, ue, qt, de, pe, is, rs, ns, os$2, hs, as, ls, cs, fs$2, us, ds, at, Ss, lt, Es, we, ye, W, xs, be, vs, Ct, Cs, Ts, As, ks, Kt, Se, Ee, Q, tt, O
|
|
634
|
+
var Gt, ce, ss, fe, ue, qt, de, pe, is, rs, ns, os$2, hs, as, ls, cs, fs$2, us, ds, at, Ss, lt, Es, we, ye, W, xs, be, vs, Ct, Cs, Ts, As, ks, Kt, Se, Ee, Q, tt, O, Rs, Os, Fs, Ds, Ms, Ns, _s, Ls, Ws, Ps, js, Is, zs, Bs, Us, $s, Gs, Hs, Ce, Te, Ae, xe, A, Vs, Ys, Xs, Js, N, Zs, ke, Qs, ti, ve, ei, D, si, Oe, Vt, Fe, At, Re, ii, q, De, Tt, ri, ft, Ne, oi, hi, ai, G, H, K, kt, ut, Rt, _e, Ot, Le, P, et, v, dt, st, C, F, T, Yt, Ft, k, x$1, Xt, Jt, We, Zt, B, Qt, Dt, pt, Y, M, mt, li, ci, fi, ui, Mt, te, di, pi, V, vi, wt, Ue, $e, Ri, Oi, L, Ge, He, U, qe, Ke, X, Ve, _, gt, se, je, yt, j, Nt, Lt, Ie, Fi, ie, ze, bt, Be, _t, Wt, ne, Ye, R, Pt, jt, It, it, rt, St, Xe, Di, Mi, Ni, nt, _i, ot, oe, he, ae, Et, Li, zt, xt, vt, Pi, I, le, ji, Ii, zi, Bi, Ui, Ze;
|
|
635
635
|
var init_index_min = __esmMin((() => {
|
|
636
636
|
Gt = (n, t, e) => {
|
|
637
637
|
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);
|
|
@@ -1035,7 +1035,7 @@ var init_index_min = __esmMin((() => {
|
|
|
1035
1035
|
}
|
|
1036
1036
|
};
|
|
1037
1037
|
tt = (n, { windowsPathsNoEscape: t = !1, magicalBraces: e = !1 } = {}) => e ? t ? n.replace(/[?*()[\]{}]/g, "[$&]") : n.replace(/[?*()[\]\\{}]/g, "\\$&") : t ? n.replace(/[?*()[\]]/g, "[$&]") : n.replace(/[?*()[\]\\]/g, "\\$&");
|
|
1038
|
-
O
|
|
1038
|
+
O = (n, t, e = {}) => (at(t), !e.nocomment && t.charAt(0) === "#" ? !1 : new D(t, e).match(n));
|
|
1039
1039
|
Rs = /^\*+([^+@!?\*\[\(]*)$/;
|
|
1040
1040
|
Os = (n) => (t) => !t.startsWith(".") && t.endsWith(n);
|
|
1041
1041
|
Fs = (n) => (t) => t.endsWith(n);
|
|
@@ -1079,59 +1079,59 @@ var init_index_min = __esmMin((() => {
|
|
|
1079
1079
|
win32: { sep: "\\" },
|
|
1080
1080
|
posix: { sep: "/" }
|
|
1081
1081
|
};
|
|
1082
|
-
O
|
|
1082
|
+
O.sep = Ae === "win32" ? xe.win32.sep : xe.posix.sep;
|
|
1083
1083
|
A = Symbol("globstar **");
|
|
1084
|
-
O
|
|
1084
|
+
O.GLOBSTAR = A;
|
|
1085
1085
|
Vs = "[^/]*?";
|
|
1086
1086
|
Ys = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
1087
1087
|
Xs = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
1088
|
-
Js = (n, t = {}) => (e) => O
|
|
1089
|
-
O
|
|
1090
|
-
N
|
|
1088
|
+
Js = (n, t = {}) => (e) => O(e, n, t);
|
|
1089
|
+
O.filter = Js;
|
|
1090
|
+
N = (n, t = {}) => Object.assign({}, n, t);
|
|
1091
1091
|
Zs = (n) => {
|
|
1092
|
-
if (!n || typeof n != "object" || !Object.keys(n).length) return O
|
|
1093
|
-
let t = O
|
|
1094
|
-
return Object.assign((s, i, r = {}) => t(s, i, N
|
|
1092
|
+
if (!n || typeof n != "object" || !Object.keys(n).length) return O;
|
|
1093
|
+
let t = O;
|
|
1094
|
+
return Object.assign((s, i, r = {}) => t(s, i, N(n, r)), {
|
|
1095
1095
|
Minimatch: class extends t.Minimatch {
|
|
1096
1096
|
constructor(i, r = {}) {
|
|
1097
|
-
super(i, N
|
|
1097
|
+
super(i, N(n, r));
|
|
1098
1098
|
}
|
|
1099
1099
|
static defaults(i) {
|
|
1100
|
-
return t.defaults(N
|
|
1100
|
+
return t.defaults(N(n, i)).Minimatch;
|
|
1101
1101
|
}
|
|
1102
1102
|
},
|
|
1103
1103
|
AST: class extends t.AST {
|
|
1104
1104
|
constructor(i, r, o = {}) {
|
|
1105
|
-
super(i, r, N
|
|
1105
|
+
super(i, r, N(n, o));
|
|
1106
1106
|
}
|
|
1107
1107
|
static fromGlob(i, r = {}) {
|
|
1108
|
-
return t.AST.fromGlob(i, N
|
|
1108
|
+
return t.AST.fromGlob(i, N(n, r));
|
|
1109
1109
|
}
|
|
1110
1110
|
},
|
|
1111
|
-
unescape: (s, i = {}) => t.unescape(s, N
|
|
1112
|
-
escape: (s, i = {}) => t.escape(s, N
|
|
1113
|
-
filter: (s, i = {}) => t.filter(s, N
|
|
1114
|
-
defaults: (s) => t.defaults(N
|
|
1115
|
-
makeRe: (s, i = {}) => t.makeRe(s, N
|
|
1116
|
-
braceExpand: (s, i = {}) => t.braceExpand(s, N
|
|
1117
|
-
match: (s, i, r = {}) => t.match(s, i, N
|
|
1111
|
+
unescape: (s, i = {}) => t.unescape(s, N(n, i)),
|
|
1112
|
+
escape: (s, i = {}) => t.escape(s, N(n, i)),
|
|
1113
|
+
filter: (s, i = {}) => t.filter(s, N(n, i)),
|
|
1114
|
+
defaults: (s) => t.defaults(N(n, s)),
|
|
1115
|
+
makeRe: (s, i = {}) => t.makeRe(s, N(n, i)),
|
|
1116
|
+
braceExpand: (s, i = {}) => t.braceExpand(s, N(n, i)),
|
|
1117
|
+
match: (s, i, r = {}) => t.match(s, i, N(n, r)),
|
|
1118
1118
|
sep: t.sep,
|
|
1119
1119
|
GLOBSTAR: A
|
|
1120
1120
|
});
|
|
1121
1121
|
};
|
|
1122
|
-
O
|
|
1122
|
+
O.defaults = Zs;
|
|
1123
1123
|
ke = (n, t = {}) => (at(n), t.nobrace || !/\{(?:(?!\{).)*\}/.test(n) ? [n] : ge(n, { max: t.braceExpandMax }));
|
|
1124
|
-
O
|
|
1125
|
-
Qs = (n, t = {}) => new D
|
|
1126
|
-
O
|
|
1124
|
+
O.braceExpand = ke;
|
|
1125
|
+
Qs = (n, t = {}) => new D(n, t).makeRe();
|
|
1126
|
+
O.makeRe = Qs;
|
|
1127
1127
|
ti = (n, t, e = {}) => {
|
|
1128
|
-
let s = new D
|
|
1128
|
+
let s = new D(t, e);
|
|
1129
1129
|
return n = n.filter((i) => s.match(i)), s.options.nonull && !n.length && n.push(t), n;
|
|
1130
1130
|
};
|
|
1131
|
-
O
|
|
1131
|
+
O.match = ti;
|
|
1132
1132
|
ve = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
1133
1133
|
ei = (n) => n.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
1134
|
-
D
|
|
1134
|
+
D = class {
|
|
1135
1135
|
options;
|
|
1136
1136
|
set;
|
|
1137
1137
|
pattern;
|
|
@@ -1408,13 +1408,13 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
1408
1408
|
return s.flipNegate ? !1 : this.negate;
|
|
1409
1409
|
}
|
|
1410
1410
|
static defaults(t) {
|
|
1411
|
-
return O
|
|
1411
|
+
return O.defaults(t).Minimatch;
|
|
1412
1412
|
}
|
|
1413
1413
|
};
|
|
1414
|
-
O
|
|
1415
|
-
O
|
|
1416
|
-
O
|
|
1417
|
-
O
|
|
1414
|
+
O.AST = Q;
|
|
1415
|
+
O.Minimatch = D;
|
|
1416
|
+
O.escape = tt;
|
|
1417
|
+
O.unescape = W;
|
|
1418
1418
|
si = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
|
|
1419
1419
|
Oe = /* @__PURE__ */ new Set();
|
|
1420
1420
|
Vt = typeof process == "object" && process ? process : {};
|
|
@@ -2035,17 +2035,17 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
2035
2035
|
_e = Symbol("read");
|
|
2036
2036
|
Ot = Symbol("flush");
|
|
2037
2037
|
Le = Symbol("flushChunk");
|
|
2038
|
-
P
|
|
2038
|
+
P = Symbol("encoding");
|
|
2039
2039
|
et = Symbol("decoder");
|
|
2040
|
-
v
|
|
2040
|
+
v = Symbol("flowing");
|
|
2041
2041
|
dt = Symbol("paused");
|
|
2042
2042
|
st = Symbol("resume");
|
|
2043
|
-
C
|
|
2044
|
-
F
|
|
2045
|
-
T
|
|
2043
|
+
C = Symbol("buffer");
|
|
2044
|
+
F = Symbol("pipes");
|
|
2045
|
+
T = Symbol("bufferLength");
|
|
2046
2046
|
Yt = Symbol("bufferPush");
|
|
2047
2047
|
Ft = Symbol("bufferShift");
|
|
2048
|
-
k
|
|
2048
|
+
k = Symbol("objectMode");
|
|
2049
2049
|
x$1 = Symbol("destroyed");
|
|
2050
2050
|
Xt = Symbol("error");
|
|
2051
2051
|
Jt = Symbol("emitData");
|
|
@@ -2089,12 +2089,12 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
2089
2089
|
di = (n) => !!n.objectMode;
|
|
2090
2090
|
pi = (n) => !n.objectMode && !!n.encoding && n.encoding !== "buffer";
|
|
2091
2091
|
V = class extends EventEmitter {
|
|
2092
|
-
[v
|
|
2092
|
+
[v] = !1;
|
|
2093
2093
|
[dt] = !1;
|
|
2094
|
-
[F
|
|
2095
|
-
[C
|
|
2096
|
-
[k
|
|
2097
|
-
[P
|
|
2094
|
+
[F] = [];
|
|
2095
|
+
[C] = [];
|
|
2096
|
+
[k];
|
|
2097
|
+
[P];
|
|
2098
2098
|
[B];
|
|
2099
2099
|
[et];
|
|
2100
2100
|
[G] = !1;
|
|
@@ -2102,7 +2102,7 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
2102
2102
|
[kt] = !1;
|
|
2103
2103
|
[Rt] = !1;
|
|
2104
2104
|
[ut] = null;
|
|
2105
|
-
[T
|
|
2105
|
+
[T] = 0;
|
|
2106
2106
|
[x$1] = !1;
|
|
2107
2107
|
[pt];
|
|
2108
2108
|
[Dt] = !1;
|
|
@@ -2113,15 +2113,15 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
2113
2113
|
constructor(...t) {
|
|
2114
2114
|
let e = t[0] || {};
|
|
2115
2115
|
if (super(), e.objectMode && typeof e.encoding == "string") throw new TypeError("Encoding and objectMode may not be used together");
|
|
2116
|
-
di(e) ? (this[k
|
|
2116
|
+
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] }), e && e.debugExposePipes === !0 && Object.defineProperty(this, "pipes", { get: () => this[F] });
|
|
2117
2117
|
let { signal: s } = e;
|
|
2118
2118
|
s && (this[pt] = s, s.aborted ? this[Qt]() : s.addEventListener("abort", () => this[Qt]()));
|
|
2119
2119
|
}
|
|
2120
2120
|
get bufferLength() {
|
|
2121
|
-
return this[T
|
|
2121
|
+
return this[T];
|
|
2122
2122
|
}
|
|
2123
2123
|
get encoding() {
|
|
2124
|
-
return this[P
|
|
2124
|
+
return this[P];
|
|
2125
2125
|
}
|
|
2126
2126
|
set encoding(t) {
|
|
2127
2127
|
throw new Error("Encoding must be set at instantiation time");
|
|
@@ -2130,7 +2130,7 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
2130
2130
|
throw new Error("Encoding must be set at instantiation time");
|
|
2131
2131
|
}
|
|
2132
2132
|
get objectMode() {
|
|
2133
|
-
return this[k
|
|
2133
|
+
return this[k];
|
|
2134
2134
|
}
|
|
2135
2135
|
set objectMode(t) {
|
|
2136
2136
|
throw new Error("objectMode must be set at instantiation time");
|
|
@@ -2154,80 +2154,80 @@ globstar while`, t, d, e, f, m), this.matchOne(t.slice(d), e.slice(f), s)) retur
|
|
|
2154
2154
|
if (this[x$1]) return this.emit("error", Object.assign(/* @__PURE__ */ new Error("Cannot call write after a stream was destroyed"), { code: "ERR_STREAM_DESTROYED" })), !0;
|
|
2155
2155
|
typeof e == "function" && (s = e, e = "utf8"), e || (e = "utf8");
|
|
2156
2156
|
let i = this[B] ? mt : li;
|
|
2157
|
-
if (!this[k
|
|
2157
|
+
if (!this[k] && !Buffer.isBuffer(t)) {
|
|
2158
2158
|
if (ui(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
2159
2159
|
else if (fi(t)) t = Buffer.from(t);
|
|
2160
2160
|
else if (typeof t != "string") throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
2161
2161
|
}
|
|
2162
|
-
return this[k
|
|
2162
|
+
return this[k] ? (this[v] && this[T] !== 0 && this[Ot](!0), this[v] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v]) : 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] && this[T] !== 0 && this[Ot](!0), this[v] ? this.emit("data", t) : this[Yt](t), this[T] !== 0 && this.emit("readable"), s && i(s), this[v]) : (this[T] !== 0 && this.emit("readable"), s && i(s), this[v]);
|
|
2163
2163
|
}
|
|
2164
2164
|
read(t) {
|
|
2165
2165
|
if (this[x$1]) return null;
|
|
2166
|
-
if (this[M] = !1, this[T
|
|
2167
|
-
this[k
|
|
2168
|
-
let e = this[_e](t || null, this[C
|
|
2166
|
+
if (this[M] = !1, this[T] === 0 || t === 0 || t && t > this[T]) return this[H](), null;
|
|
2167
|
+
this[k] && (t = null), this[C].length > 1 && !this[k] && (this[C] = [this[P] ? this[C].join("") : Buffer.concat(this[C], this[T])]);
|
|
2168
|
+
let e = this[_e](t || null, this[C][0]);
|
|
2169
2169
|
return this[H](), e;
|
|
2170
2170
|
}
|
|
2171
2171
|
[_e](t, e) {
|
|
2172
|
-
if (this[k
|
|
2172
|
+
if (this[k]) this[Ft]();
|
|
2173
2173
|
else {
|
|
2174
2174
|
let s = e;
|
|
2175
|
-
t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C
|
|
2175
|
+
t === s.length || t === null ? this[Ft]() : typeof s == "string" ? (this[C][0] = s.slice(t), e = s.slice(0, t), this[T] -= t) : (this[C][0] = s.subarray(t), e = s.subarray(0, t), this[T] -= t);
|
|
2176
2176
|
}
|
|
2177
|
-
return this.emit("data", e), !this[C
|
|
2177
|
+
return this.emit("data", e), !this[C].length && !this[G] && this.emit("drain"), e;
|
|
2178
2178
|
}
|
|
2179
2179
|
end(t, e, s) {
|
|
2180
|
-
return typeof t == "function" && (s = t, t = void 0), typeof e == "function" && (s = e, e = "utf8"), t !== void 0 && this.write(t, e), s && this.once("end", s), this[G] = !0, this.writable = !1, (this[v
|
|
2180
|
+
return typeof t == "function" && (s = t, t = void 0), typeof e == "function" && (s = e, e = "utf8"), t !== void 0 && this.write(t, e), s && this.once("end", s), this[G] = !0, this.writable = !1, (this[v] || !this[dt]) && this[H](), this;
|
|
2181
2181
|
}
|
|
2182
2182
|
[st]() {
|
|
2183
|
-
this[x$1] || (!this[Y] && !this[F
|
|
2183
|
+
this[x$1] || (!this[Y] && !this[F].length && (this[M] = !0), this[dt] = !1, this[v] = !0, this.emit("resume"), this[C].length ? this[Ot]() : this[G] ? this[H]() : this.emit("drain"));
|
|
2184
2184
|
}
|
|
2185
2185
|
resume() {
|
|
2186
2186
|
return this[st]();
|
|
2187
2187
|
}
|
|
2188
2188
|
pause() {
|
|
2189
|
-
this[v
|
|
2189
|
+
this[v] = !1, this[dt] = !0, this[M] = !1;
|
|
2190
2190
|
}
|
|
2191
2191
|
get destroyed() {
|
|
2192
2192
|
return this[x$1];
|
|
2193
2193
|
}
|
|
2194
2194
|
get flowing() {
|
|
2195
|
-
return this[v
|
|
2195
|
+
return this[v];
|
|
2196
2196
|
}
|
|
2197
2197
|
get paused() {
|
|
2198
2198
|
return this[dt];
|
|
2199
2199
|
}
|
|
2200
2200
|
[Yt](t) {
|
|
2201
|
-
this[k
|
|
2201
|
+
this[k] ? this[T] += 1 : this[T] += t.length, this[C].push(t);
|
|
2202
2202
|
}
|
|
2203
2203
|
[Ft]() {
|
|
2204
|
-
return this[k
|
|
2204
|
+
return this[k] ? this[T] -= 1 : this[T] -= this[C][0].length, this[C].shift();
|
|
2205
2205
|
}
|
|
2206
2206
|
[Ot](t = !1) {
|
|
2207
2207
|
do ;
|
|
2208
|
-
while (this[Le](this[Ft]()) && this[C
|
|
2209
|
-
!t && !this[C
|
|
2208
|
+
while (this[Le](this[Ft]()) && this[C].length);
|
|
2209
|
+
!t && !this[C].length && !this[G] && this.emit("drain");
|
|
2210
2210
|
}
|
|
2211
2211
|
[Le](t) {
|
|
2212
|
-
return this.emit("data", t), this[v
|
|
2212
|
+
return this.emit("data", t), this[v];
|
|
2213
2213
|
}
|
|
2214
2214
|
pipe(t, e) {
|
|
2215
2215
|
if (this[x$1]) return t;
|
|
2216
2216
|
this[M] = !1;
|
|
2217
2217
|
let s = this[K];
|
|
2218
|
-
return e = e || {}, t === Ne.stdout || t === Ne.stderr ? e.end = !1 : e.end = e.end !== !1, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[F
|
|
2218
|
+
return e = e || {}, t === Ne.stdout || t === Ne.stderr ? e.end = !1 : e.end = e.end !== !1, e.proxyErrors = !!e.proxyErrors, s ? e.end && t.end() : (this[F].push(e.proxyErrors ? new te(this, t, e) : new Mt(this, t, e)), this[B] ? mt(() => this[st]()) : this[st]()), t;
|
|
2219
2219
|
}
|
|
2220
2220
|
unpipe(t) {
|
|
2221
|
-
let e = this[F
|
|
2222
|
-
e && (this[F
|
|
2221
|
+
let e = this[F].find((s) => s.dest === t);
|
|
2222
|
+
e && (this[F].length === 1 ? (this[v] && this[Y] === 0 && (this[v] = !1), this[F] = []) : this[F].splice(this[F].indexOf(e), 1), e.unpipe());
|
|
2223
2223
|
}
|
|
2224
2224
|
addListener(t, e) {
|
|
2225
2225
|
return this.on(t, e);
|
|
2226
2226
|
}
|
|
2227
2227
|
on(t, e) {
|
|
2228
2228
|
let s = super.on(t, e);
|
|
2229
|
-
if (t === "data") this[M] = !1, this[Y]++, !this[F
|
|
2230
|
-
else if (t === "readable" && this[T
|
|
2229
|
+
if (t === "data") this[M] = !1, this[Y]++, !this[F].length && !this[v] && this[st]();
|
|
2230
|
+
else if (t === "readable" && this[T] !== 0) super.emit("readable");
|
|
2231
2231
|
else if (ci(t) && this[K]) super.emit(t), this.removeAllListeners(t);
|
|
2232
2232
|
else if (t === "error" && this[ut]) {
|
|
2233
2233
|
let i = e;
|
|
@@ -2240,22 +2240,22 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2240
2240
|
}
|
|
2241
2241
|
off(t, e) {
|
|
2242
2242
|
let s = super.off(t, e);
|
|
2243
|
-
return t === "data" && (this[Y] = this.listeners("data").length, this[Y] === 0 && !this[M] && !this[F
|
|
2243
|
+
return t === "data" && (this[Y] = this.listeners("data").length, this[Y] === 0 && !this[M] && !this[F].length && (this[v] = !1)), s;
|
|
2244
2244
|
}
|
|
2245
2245
|
removeAllListeners(t) {
|
|
2246
2246
|
let e = super.removeAllListeners(t);
|
|
2247
|
-
return (t === "data" || t === void 0) && (this[Y] = 0, !this[M] && !this[F
|
|
2247
|
+
return (t === "data" || t === void 0) && (this[Y] = 0, !this[M] && !this[F].length && (this[v] = !1)), e;
|
|
2248
2248
|
}
|
|
2249
2249
|
get emittedEnd() {
|
|
2250
2250
|
return this[K];
|
|
2251
2251
|
}
|
|
2252
2252
|
[H]() {
|
|
2253
|
-
!this[kt] && !this[K] && !this[x$1] && this[C
|
|
2253
|
+
!this[kt] && !this[K] && !this[x$1] && this[C].length === 0 && this[G] && (this[kt] = !0, this.emit("end"), this.emit("prefinish"), this.emit("finish"), this[Rt] && this.emit("close"), this[kt] = !1);
|
|
2254
2254
|
}
|
|
2255
2255
|
emit(t, ...e) {
|
|
2256
2256
|
let s = e[0];
|
|
2257
2257
|
if (t !== "error" && t !== "close" && t !== x$1 && this[x$1]) return !1;
|
|
2258
|
-
if (t === "data") return !this[k
|
|
2258
|
+
if (t === "data") return !this[k] && !s ? !1 : this[B] ? (mt(() => this[Jt](s)), !0) : this[Jt](s);
|
|
2259
2259
|
if (t === "end") return this[We]();
|
|
2260
2260
|
if (t === "close") {
|
|
2261
2261
|
if (this[Rt] = !0, !this[K] && !this[x$1]) return !1;
|
|
@@ -2276,7 +2276,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2276
2276
|
return this[H](), i;
|
|
2277
2277
|
}
|
|
2278
2278
|
[Jt](t) {
|
|
2279
|
-
for (let s of this[F
|
|
2279
|
+
for (let s of this[F]) s.dest.write(t) === !1 && this.pause();
|
|
2280
2280
|
let e = this[M] ? !1 : super.emit("data", t);
|
|
2281
2281
|
return this[H](), e;
|
|
2282
2282
|
}
|
|
@@ -2287,26 +2287,26 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2287
2287
|
if (this[et]) {
|
|
2288
2288
|
let e = this[et].end();
|
|
2289
2289
|
if (e) {
|
|
2290
|
-
for (let s of this[F
|
|
2290
|
+
for (let s of this[F]) s.dest.write(e);
|
|
2291
2291
|
this[M] || super.emit("data", e);
|
|
2292
2292
|
}
|
|
2293
2293
|
}
|
|
2294
|
-
for (let e of this[F
|
|
2294
|
+
for (let e of this[F]) e.end();
|
|
2295
2295
|
let t = super.emit("end");
|
|
2296
2296
|
return this.removeAllListeners("end"), t;
|
|
2297
2297
|
}
|
|
2298
2298
|
async collect() {
|
|
2299
2299
|
let t = Object.assign([], { dataLength: 0 });
|
|
2300
|
-
this[k
|
|
2300
|
+
this[k] || (t.dataLength = 0);
|
|
2301
2301
|
let e = this.promise();
|
|
2302
2302
|
return this.on("data", (s) => {
|
|
2303
|
-
t.push(s), this[k
|
|
2303
|
+
t.push(s), this[k] || (t.dataLength += s.length);
|
|
2304
2304
|
}), await e, t;
|
|
2305
2305
|
}
|
|
2306
2306
|
async concat() {
|
|
2307
|
-
if (this[k
|
|
2307
|
+
if (this[k]) throw new Error("cannot concat in objectMode");
|
|
2308
2308
|
let t = await this.collect();
|
|
2309
|
-
return this[P
|
|
2309
|
+
return this[P] ? t.join("") : Buffer.concat(t, t.dataLength);
|
|
2310
2310
|
}
|
|
2311
2311
|
async promise() {
|
|
2312
2312
|
return new Promise((t, e) => {
|
|
@@ -2378,7 +2378,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2378
2378
|
}
|
|
2379
2379
|
destroy(t) {
|
|
2380
2380
|
if (this[x$1]) return t ? this.emit("error", t) : this.emit(x$1), this;
|
|
2381
|
-
this[x$1] = !0, this[M] = !0, this[C
|
|
2381
|
+
this[x$1] = !0, this[M] = !0, this[C].length = 0, this[T] = 0;
|
|
2382
2382
|
let e = this;
|
|
2383
2383
|
return typeof e.close == "function" && !this[Rt] && e.close(), t ? this.emit("error", t) : this.emit(x$1), this;
|
|
2384
2384
|
}
|
|
@@ -2419,15 +2419,15 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2419
2419
|
Ke = 8;
|
|
2420
2420
|
X = 10;
|
|
2421
2421
|
Ve = 12;
|
|
2422
|
-
_
|
|
2423
|
-
gt = ~_
|
|
2422
|
+
_ = 15;
|
|
2423
|
+
gt = ~_;
|
|
2424
2424
|
se = 16;
|
|
2425
2425
|
je = 32;
|
|
2426
2426
|
yt = 64;
|
|
2427
|
-
j
|
|
2427
|
+
j = 128;
|
|
2428
2428
|
Nt = 256;
|
|
2429
2429
|
Lt = 512;
|
|
2430
|
-
Ie = yt | j
|
|
2430
|
+
Ie = yt | j | Lt;
|
|
2431
2431
|
Fi = 1023;
|
|
2432
2432
|
ie = (n) => n.isFile() ? Ke : n.isDirectory() ? U : n.isSymbolicLink() ? X : n.isCharacterDevice() ? He : n.isBlockDevice() ? qe : n.isSocket() ? Ve : n.isFIFO() ? Ge : L;
|
|
2433
2433
|
ze = new ft({ max: 4096 });
|
|
@@ -2458,7 +2458,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2458
2458
|
}
|
|
2459
2459
|
};
|
|
2460
2460
|
Ye = Symbol("PathScurry setAsCwd");
|
|
2461
|
-
R
|
|
2461
|
+
R = class {
|
|
2462
2462
|
name;
|
|
2463
2463
|
root;
|
|
2464
2464
|
roots;
|
|
@@ -2589,7 +2589,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2589
2589
|
parent: this,
|
|
2590
2590
|
fullpath: o
|
|
2591
2591
|
});
|
|
2592
|
-
return this.canReaddir() || (h.#e |= j
|
|
2592
|
+
return this.canReaddir() || (h.#e |= j), s.push(h), h;
|
|
2593
2593
|
}
|
|
2594
2594
|
relative() {
|
|
2595
2595
|
if (this.isCWD) return "";
|
|
@@ -2626,7 +2626,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2626
2626
|
return this.#y = s;
|
|
2627
2627
|
}
|
|
2628
2628
|
isUnknown() {
|
|
2629
|
-
return (this.#e & _
|
|
2629
|
+
return (this.#e & _) === L;
|
|
2630
2630
|
}
|
|
2631
2631
|
isType(t) {
|
|
2632
2632
|
return this[`is${t}`]();
|
|
@@ -2635,22 +2635,22 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2635
2635
|
return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : this.isSocket() ? "Socket" : "Unknown";
|
|
2636
2636
|
}
|
|
2637
2637
|
isFile() {
|
|
2638
|
-
return (this.#e & _
|
|
2638
|
+
return (this.#e & _) === Ke;
|
|
2639
2639
|
}
|
|
2640
2640
|
isDirectory() {
|
|
2641
|
-
return (this.#e & _
|
|
2641
|
+
return (this.#e & _) === U;
|
|
2642
2642
|
}
|
|
2643
2643
|
isCharacterDevice() {
|
|
2644
|
-
return (this.#e & _
|
|
2644
|
+
return (this.#e & _) === He;
|
|
2645
2645
|
}
|
|
2646
2646
|
isBlockDevice() {
|
|
2647
|
-
return (this.#e & _
|
|
2647
|
+
return (this.#e & _) === qe;
|
|
2648
2648
|
}
|
|
2649
2649
|
isFIFO() {
|
|
2650
|
-
return (this.#e & _
|
|
2650
|
+
return (this.#e & _) === Ge;
|
|
2651
2651
|
}
|
|
2652
2652
|
isSocket() {
|
|
2653
|
-
return (this.#e & _
|
|
2653
|
+
return (this.#e & _) === Ve;
|
|
2654
2654
|
}
|
|
2655
2655
|
isSymbolicLink() {
|
|
2656
2656
|
return (this.#e & X) === X;
|
|
@@ -2671,14 +2671,14 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2671
2671
|
canReadlink() {
|
|
2672
2672
|
if (this.#M) return !0;
|
|
2673
2673
|
if (!this.parent) return !1;
|
|
2674
|
-
let t = this.#e & _
|
|
2675
|
-
return !(t !== L && t !== X || this.#e & Nt || this.#e & j
|
|
2674
|
+
let t = this.#e & _;
|
|
2675
|
+
return !(t !== L && t !== X || this.#e & Nt || this.#e & j);
|
|
2676
2676
|
}
|
|
2677
2677
|
calledReaddir() {
|
|
2678
2678
|
return !!(this.#e & se);
|
|
2679
2679
|
}
|
|
2680
2680
|
isENOENT() {
|
|
2681
|
-
return !!(this.#e & j
|
|
2681
|
+
return !!(this.#e & j);
|
|
2682
2682
|
}
|
|
2683
2683
|
isNamed(t) {
|
|
2684
2684
|
return this.nocase ? this.#C === _t(t) : this.#C === bt(t);
|
|
@@ -2713,7 +2713,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2713
2713
|
}
|
|
2714
2714
|
}
|
|
2715
2715
|
#v() {
|
|
2716
|
-
this.#e & j
|
|
2716
|
+
this.#e & j || (this.#e = (this.#e | j) & gt, this.#G());
|
|
2717
2717
|
}
|
|
2718
2718
|
#G() {
|
|
2719
2719
|
let t = this.children();
|
|
@@ -2726,7 +2726,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2726
2726
|
#L() {
|
|
2727
2727
|
if (this.#e & yt) return;
|
|
2728
2728
|
let t = this.#e;
|
|
2729
|
-
(t & _
|
|
2729
|
+
(t & _) === U && (t &= gt), this.#e = t | yt, this.#G();
|
|
2730
2730
|
}
|
|
2731
2731
|
#I(t = "") {
|
|
2732
2732
|
t === "ENOTDIR" || t === "EPERM" ? this.#L() : t === "ENOENT" ? this.#v() : this.children().provisional = 0;
|
|
@@ -2736,13 +2736,13 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2736
2736
|
}
|
|
2737
2737
|
#D(t = "") {
|
|
2738
2738
|
let e = this.#e;
|
|
2739
|
-
e |= Nt, t === "ENOENT" && (e |= j
|
|
2739
|
+
e |= Nt, t === "ENOENT" && (e |= j), (t === "EINVAL" || t === "UNKNOWN") && (e &= gt), this.#e = e, t === "ENOTDIR" && this.parent && this.parent.#L();
|
|
2740
2740
|
}
|
|
2741
2741
|
#z(t, e) {
|
|
2742
2742
|
return this.#U(t, e) || this.#B(t, e);
|
|
2743
2743
|
}
|
|
2744
2744
|
#B(t, e) {
|
|
2745
|
-
let s = ie(t), i = this.newChild(t.name, s, { parent: this }), r = i.#e & _
|
|
2745
|
+
let s = ie(t), i = this.newChild(t.name, s, { parent: this }), r = i.#e & _;
|
|
2746
2746
|
return r !== U && r !== X && r !== L && (i.#e |= yt), e.unshift(i), e.provisional++, i;
|
|
2747
2747
|
}
|
|
2748
2748
|
#U(t, e) {
|
|
@@ -2756,14 +2756,14 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2756
2756
|
return e.#e = e.#e & gt | ie(t), r !== t.name && (e.name = t.name), s !== i.provisional && (s === i.length - 1 ? i.pop() : i.splice(s, 1), i.unshift(e)), i.provisional++, e;
|
|
2757
2757
|
}
|
|
2758
2758
|
async lstat() {
|
|
2759
|
-
if ((this.#e & j
|
|
2759
|
+
if ((this.#e & j) === 0) try {
|
|
2760
2760
|
return this.#$(await this.#t.promises.lstat(this.fullpath())), this;
|
|
2761
2761
|
} catch (t) {
|
|
2762
2762
|
this.#F(t.code);
|
|
2763
2763
|
}
|
|
2764
2764
|
}
|
|
2765
2765
|
lstatSync() {
|
|
2766
|
-
if ((this.#e & j
|
|
2766
|
+
if ((this.#e & j) === 0) try {
|
|
2767
2767
|
return this.#$(this.#t.lstatSync(this.fullpath())), this;
|
|
2768
2768
|
} catch (t) {
|
|
2769
2769
|
this.#F(t.code);
|
|
@@ -2840,7 +2840,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2840
2840
|
}
|
|
2841
2841
|
canReaddir() {
|
|
2842
2842
|
if (this.#e & Ie) return !1;
|
|
2843
|
-
let t = _
|
|
2843
|
+
let t = _ & this.#e;
|
|
2844
2844
|
return t === L || t === U || t === X;
|
|
2845
2845
|
}
|
|
2846
2846
|
shouldWalk(t, e) {
|
|
@@ -2848,7 +2848,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2848
2848
|
}
|
|
2849
2849
|
async realpath() {
|
|
2850
2850
|
if (this.#k) return this.#k;
|
|
2851
|
-
if (!((Lt | Nt | j
|
|
2851
|
+
if (!((Lt | Nt | j) & this.#e)) try {
|
|
2852
2852
|
let t = await this.#t.promises.realpath(this.fullpath());
|
|
2853
2853
|
return this.#k = this.resolve(t);
|
|
2854
2854
|
} catch {
|
|
@@ -2857,7 +2857,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2857
2857
|
}
|
|
2858
2858
|
realpathSync() {
|
|
2859
2859
|
if (this.#k) return this.#k;
|
|
2860
|
-
if (!((Lt | Nt | j
|
|
2860
|
+
if (!((Lt | Nt | j) & this.#e)) try {
|
|
2861
2861
|
let t = this.#t.realpathSync(this.fullpath());
|
|
2862
2862
|
return this.#k = this.resolve(t);
|
|
2863
2863
|
} catch {
|
|
@@ -2872,7 +2872,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2872
2872
|
for (i = t; i && i.parent && !e.has(i);) i.#x = void 0, i.#A = void 0, i = i.parent;
|
|
2873
2873
|
}
|
|
2874
2874
|
};
|
|
2875
|
-
Pt = class n extends R
|
|
2875
|
+
Pt = class n extends R {
|
|
2876
2876
|
sep = "\\";
|
|
2877
2877
|
splitSep = Oi;
|
|
2878
2878
|
constructor(t, e = L, s, i, r, o, h) {
|
|
@@ -2893,7 +2893,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2893
2893
|
return t = t.toUpperCase().replace(/\//g, "\\").replace($e, "$1\\"), t === e;
|
|
2894
2894
|
}
|
|
2895
2895
|
};
|
|
2896
|
-
jt = class n extends R
|
|
2896
|
+
jt = class n extends R {
|
|
2897
2897
|
splitSep = "/";
|
|
2898
2898
|
sep = "/";
|
|
2899
2899
|
constructor(t, e = L, s, i, r, o, h) {
|
|
@@ -2978,7 +2978,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2978
2978
|
return typeof t == "string" && (t = this.cwd.resolve(t)), (t.parent || t).fullpath();
|
|
2979
2979
|
}
|
|
2980
2980
|
async readdir(t = this.cwd, e = { withFileTypes: !0 }) {
|
|
2981
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
2981
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
|
|
2982
2982
|
let { withFileTypes: s } = e;
|
|
2983
2983
|
if (t.canReaddir()) {
|
|
2984
2984
|
let i = await t.readdir();
|
|
@@ -2986,7 +2986,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2986
2986
|
} else return [];
|
|
2987
2987
|
}
|
|
2988
2988
|
readdirSync(t = this.cwd, e = { withFileTypes: !0 }) {
|
|
2989
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
2989
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
|
|
2990
2990
|
let { withFileTypes: s = !0 } = e;
|
|
2991
2991
|
return t.canReaddir() ? s ? t.readdirSync() : t.readdirSync().map((i) => i.name) : [];
|
|
2992
2992
|
}
|
|
@@ -2997,27 +2997,27 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
2997
2997
|
return typeof t == "string" && (t = this.cwd.resolve(t)), t.lstatSync();
|
|
2998
2998
|
}
|
|
2999
2999
|
async readlink(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
|
|
3000
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3000
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
|
|
3001
3001
|
let s = await t.readlink();
|
|
3002
3002
|
return e ? s : s?.fullpath();
|
|
3003
3003
|
}
|
|
3004
3004
|
readlinkSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
|
|
3005
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3005
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
|
|
3006
3006
|
let s = t.readlinkSync();
|
|
3007
3007
|
return e ? s : s?.fullpath();
|
|
3008
3008
|
}
|
|
3009
3009
|
async realpath(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
|
|
3010
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3010
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
|
|
3011
3011
|
let s = await t.realpath();
|
|
3012
3012
|
return e ? s : s?.fullpath();
|
|
3013
3013
|
}
|
|
3014
3014
|
realpathSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
|
|
3015
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3015
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t.withFileTypes, t = this.cwd);
|
|
3016
3016
|
let s = t.realpathSync();
|
|
3017
3017
|
return e ? s : s?.fullpath();
|
|
3018
3018
|
}
|
|
3019
3019
|
async walk(t = this.cwd, e = {}) {
|
|
3020
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3020
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
|
|
3021
3021
|
let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e, h = [];
|
|
3022
3022
|
(!r || r(t)) && h.push(s ? t : t.fullpath());
|
|
3023
3023
|
let a = /* @__PURE__ */ new Set(), l = (c, d) => {
|
|
@@ -3039,7 +3039,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
3039
3039
|
});
|
|
3040
3040
|
}
|
|
3041
3041
|
walkSync(t = this.cwd, e = {}) {
|
|
3042
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3042
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
|
|
3043
3043
|
let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e, h = [];
|
|
3044
3044
|
(!r || r(t)) && h.push(s ? t : t.fullpath());
|
|
3045
3045
|
let a = /* @__PURE__ */ new Set([t]);
|
|
@@ -3061,13 +3061,13 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
3061
3061
|
return this.iterate();
|
|
3062
3062
|
}
|
|
3063
3063
|
iterate(t = this.cwd, e = {}) {
|
|
3064
|
-
return typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3064
|
+
return typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd), this.stream(t, e)[Symbol.asyncIterator]();
|
|
3065
3065
|
}
|
|
3066
3066
|
[Symbol.iterator]() {
|
|
3067
3067
|
return this.iterateSync();
|
|
3068
3068
|
}
|
|
3069
3069
|
*iterateSync(t = this.cwd, e = {}) {
|
|
3070
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3070
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
|
|
3071
3071
|
let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e;
|
|
3072
3072
|
(!r || r(t)) && (yield s ? t : t.fullpath());
|
|
3073
3073
|
let h = /* @__PURE__ */ new Set([t]);
|
|
@@ -3085,7 +3085,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
3085
3085
|
}
|
|
3086
3086
|
}
|
|
3087
3087
|
stream(t = this.cwd, e = {}) {
|
|
3088
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3088
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
|
|
3089
3089
|
let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e, h = new V({ objectMode: !0 });
|
|
3090
3090
|
(!r || r(t)) && h.write(s ? t : t.fullpath());
|
|
3091
3091
|
let a = /* @__PURE__ */ new Set(), l = [t], u = 0, c = () => {
|
|
@@ -3121,7 +3121,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
3121
3121
|
return c(), h;
|
|
3122
3122
|
}
|
|
3123
3123
|
streamSync(t = this.cwd, e = {}) {
|
|
3124
|
-
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R
|
|
3124
|
+
typeof t == "string" ? t = this.cwd.resolve(t) : t instanceof R || (e = t, t = this.cwd);
|
|
3125
3125
|
let { withFileTypes: s = !0, follow: i = !1, filter: r, walkFilter: o } = e, h = new V({ objectMode: !0 }), a = /* @__PURE__ */ new Set();
|
|
3126
3126
|
(!r || r(t)) && h.write(s ? t : t.fullpath());
|
|
3127
3127
|
let l = [t], u = 0, c = () => {
|
|
@@ -3320,12 +3320,12 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
3320
3320
|
for (let h of t) this.add(h);
|
|
3321
3321
|
}
|
|
3322
3322
|
add(t) {
|
|
3323
|
-
let e = new D
|
|
3323
|
+
let e = new D(t, this.mmopts);
|
|
3324
3324
|
for (let s = 0; s < e.set.length; s++) {
|
|
3325
3325
|
let i = e.set[s], r = e.globParts[s];
|
|
3326
3326
|
if (!i || !r) throw new Error("invalid pattern object");
|
|
3327
3327
|
for (; i[0] === "." && r[0] === ".";) i.shift(), r.shift();
|
|
3328
|
-
let o = new nt(i, r, 0, this.platform), h = new D
|
|
3328
|
+
let o = new nt(i, r, 0, this.platform), h = new D(o.globString(), this.mmopts), a = r[r.length - 1] === "**", l = o.isAbsolute();
|
|
3329
3329
|
l ? this.absolute.push(h) : this.relative.push(h), a && (l ? this.absoluteChildren.push(h) : this.relativeChildren.push(h));
|
|
3330
3330
|
}
|
|
3331
3331
|
}
|
|
@@ -3674,7 +3674,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
3674
3674
|
}
|
|
3675
3675
|
};
|
|
3676
3676
|
Pi = typeof process == "object" && process && typeof process.platform == "string" ? process.platform : "linux";
|
|
3677
|
-
I
|
|
3677
|
+
I = class {
|
|
3678
3678
|
absolute;
|
|
3679
3679
|
cwd;
|
|
3680
3680
|
root;
|
|
@@ -3737,7 +3737,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
3737
3737
|
platform: this.platform,
|
|
3738
3738
|
windowsPathsNoEscape: this.windowsPathsNoEscape,
|
|
3739
3739
|
debug: !!this.opts.debug
|
|
3740
|
-
}, [o, h] = this.pattern.map((a) => new D
|
|
3740
|
+
}, [o, h] = this.pattern.map((a) => new D(a, i)).reduce((a, l) => (a[0].push(...l.set), a[1].push(...l.globParts), a), [[], []]);
|
|
3741
3741
|
this.patterns = o.map((a, l) => {
|
|
3742
3742
|
let u = h[l];
|
|
3743
3743
|
if (!u) throw new Error("invalid pattern object");
|
|
@@ -3795,7 +3795,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
3795
3795
|
};
|
|
3796
3796
|
le = (n, t = {}) => {
|
|
3797
3797
|
Array.isArray(n) || (n = [n]);
|
|
3798
|
-
for (let e of n) if (new D
|
|
3798
|
+
for (let e of n) if (new D(e, t).hasMagic()) return !0;
|
|
3799
3799
|
return !1;
|
|
3800
3800
|
};
|
|
3801
3801
|
ji = Bt;
|
|
@@ -3818,7 +3818,7 @@ while (this[Le](this[Ft]()) && this[C$1].length);
|
|
|
3818
3818
|
iterate: Bi,
|
|
3819
3819
|
globIterateSync: Ut,
|
|
3820
3820
|
iterateSync: zi,
|
|
3821
|
-
Glob: I
|
|
3821
|
+
Glob: I,
|
|
3822
3822
|
hasMagic: le,
|
|
3823
3823
|
escape: tt,
|
|
3824
3824
|
unescape: W
|
|
@@ -4711,7 +4711,7 @@ function INIT_CWD() {
|
|
|
4711
4711
|
return process.env.INIT_CWD ?? process.cwd();
|
|
4712
4712
|
}
|
|
4713
4713
|
//#endregion
|
|
4714
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
4714
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/common.js
|
|
4715
4715
|
var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4716
4716
|
function isNothing(subject) {
|
|
4717
4717
|
return typeof subject === "undefined" || subject === null;
|
|
@@ -4750,7 +4750,7 @@ var require_common = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4750
4750
|
module.exports.extend = extend;
|
|
4751
4751
|
}));
|
|
4752
4752
|
//#endregion
|
|
4753
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
4753
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/exception.js
|
|
4754
4754
|
var require_exception = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4755
4755
|
function formatError(exception, compact) {
|
|
4756
4756
|
let where = "";
|
|
@@ -4778,7 +4778,7 @@ var require_exception = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4778
4778
|
module.exports = YAMLException;
|
|
4779
4779
|
}));
|
|
4780
4780
|
//#endregion
|
|
4781
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
4781
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/snippet.js
|
|
4782
4782
|
var require_snippet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4783
4783
|
const common = require_common();
|
|
4784
4784
|
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
@@ -4840,7 +4840,7 @@ var require_snippet = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4840
4840
|
module.exports = makeSnippet;
|
|
4841
4841
|
}));
|
|
4842
4842
|
//#endregion
|
|
4843
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
4843
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type.js
|
|
4844
4844
|
var require_type = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4845
4845
|
const YAMLException = require_exception();
|
|
4846
4846
|
const TYPE_CONSTRUCTOR_OPTIONS = [
|
|
@@ -4895,7 +4895,7 @@ var require_type = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4895
4895
|
module.exports = Type;
|
|
4896
4896
|
}));
|
|
4897
4897
|
//#endregion
|
|
4898
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
4898
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/schema.js
|
|
4899
4899
|
var require_schema = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4900
4900
|
const YAMLException = require_exception();
|
|
4901
4901
|
const Type = require_type();
|
|
@@ -4963,7 +4963,7 @@ var require_schema = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4963
4963
|
module.exports = Schema;
|
|
4964
4964
|
}));
|
|
4965
4965
|
//#endregion
|
|
4966
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
4966
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/str.js
|
|
4967
4967
|
var require_str = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4968
4968
|
module.exports = new (require_type())("tag:yaml.org,2002:str", {
|
|
4969
4969
|
kind: "scalar",
|
|
@@ -4973,7 +4973,7 @@ var require_str = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4973
4973
|
});
|
|
4974
4974
|
}));
|
|
4975
4975
|
//#endregion
|
|
4976
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
4976
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/seq.js
|
|
4977
4977
|
var require_seq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4978
4978
|
module.exports = new (require_type())("tag:yaml.org,2002:seq", {
|
|
4979
4979
|
kind: "sequence",
|
|
@@ -4983,7 +4983,7 @@ var require_seq = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4983
4983
|
});
|
|
4984
4984
|
}));
|
|
4985
4985
|
//#endregion
|
|
4986
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
4986
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/map.js
|
|
4987
4987
|
var require_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4988
4988
|
module.exports = new (require_type())("tag:yaml.org,2002:map", {
|
|
4989
4989
|
kind: "mapping",
|
|
@@ -4993,7 +4993,7 @@ var require_map = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
4993
4993
|
});
|
|
4994
4994
|
}));
|
|
4995
4995
|
//#endregion
|
|
4996
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
4996
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/schema/failsafe.js
|
|
4997
4997
|
var require_failsafe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
4998
4998
|
module.exports = new (require_schema())({ explicit: [
|
|
4999
4999
|
require_str(),
|
|
@@ -5002,7 +5002,7 @@ var require_failsafe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5002
5002
|
] });
|
|
5003
5003
|
}));
|
|
5004
5004
|
//#endregion
|
|
5005
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5005
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/null.js
|
|
5006
5006
|
var require_null = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5007
5007
|
const Type = require_type();
|
|
5008
5008
|
function resolveYamlNull(data) {
|
|
@@ -5042,7 +5042,7 @@ var require_null = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5042
5042
|
});
|
|
5043
5043
|
}));
|
|
5044
5044
|
//#endregion
|
|
5045
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5045
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/bool.js
|
|
5046
5046
|
var require_bool = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5047
5047
|
const Type = require_type();
|
|
5048
5048
|
function resolveYamlBoolean(data) {
|
|
@@ -5076,7 +5076,7 @@ var require_bool = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5076
5076
|
});
|
|
5077
5077
|
}));
|
|
5078
5078
|
//#endregion
|
|
5079
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5079
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/int.js
|
|
5080
5080
|
var require_int = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5081
5081
|
const common = require_common();
|
|
5082
5082
|
const Type = require_type();
|
|
@@ -5185,7 +5185,7 @@ var require_int = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5185
5185
|
});
|
|
5186
5186
|
}));
|
|
5187
5187
|
//#endregion
|
|
5188
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5188
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/float.js
|
|
5189
5189
|
var require_float = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5190
5190
|
const common = require_common();
|
|
5191
5191
|
const Type = require_type();
|
|
@@ -5239,7 +5239,7 @@ var require_float = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5239
5239
|
});
|
|
5240
5240
|
}));
|
|
5241
5241
|
//#endregion
|
|
5242
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5242
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/schema/json.js
|
|
5243
5243
|
var require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5244
5244
|
module.exports = require_failsafe().extend({ implicit: [
|
|
5245
5245
|
require_null(),
|
|
@@ -5249,12 +5249,12 @@ var require_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5249
5249
|
] });
|
|
5250
5250
|
}));
|
|
5251
5251
|
//#endregion
|
|
5252
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5252
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/schema/core.js
|
|
5253
5253
|
var require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5254
5254
|
module.exports = require_json();
|
|
5255
5255
|
}));
|
|
5256
5256
|
//#endregion
|
|
5257
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5257
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/timestamp.js
|
|
5258
5258
|
var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5259
5259
|
const Type = require_type();
|
|
5260
5260
|
const YAML_DATE_REGEXP = /* @__PURE__ */ new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
|
|
@@ -5305,7 +5305,7 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5305
5305
|
});
|
|
5306
5306
|
}));
|
|
5307
5307
|
//#endregion
|
|
5308
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5308
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/merge.js
|
|
5309
5309
|
var require_merge$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5310
5310
|
const Type = require_type();
|
|
5311
5311
|
function resolveYamlMerge(data) {
|
|
@@ -5317,7 +5317,7 @@ var require_merge$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5317
5317
|
});
|
|
5318
5318
|
}));
|
|
5319
5319
|
//#endregion
|
|
5320
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5320
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/binary.js
|
|
5321
5321
|
var require_binary = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5322
5322
|
const Type = require_type();
|
|
5323
5323
|
const BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
@@ -5404,14 +5404,14 @@ var require_binary = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5404
5404
|
});
|
|
5405
5405
|
}));
|
|
5406
5406
|
//#endregion
|
|
5407
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5407
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/omap.js
|
|
5408
5408
|
var require_omap = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5409
5409
|
const Type = require_type();
|
|
5410
5410
|
const _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
5411
5411
|
const _toString = Object.prototype.toString;
|
|
5412
5412
|
function resolveYamlOmap(data) {
|
|
5413
5413
|
if (data === null) return true;
|
|
5414
|
-
const objectKeys =
|
|
5414
|
+
const objectKeys = {};
|
|
5415
5415
|
const object = data;
|
|
5416
5416
|
for (let index = 0, length = object.length; index < length; index += 1) {
|
|
5417
5417
|
const pair = object[index];
|
|
@@ -5423,8 +5423,8 @@ var require_omap = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5423
5423
|
else return false;
|
|
5424
5424
|
}
|
|
5425
5425
|
if (!pairHasKey) return false;
|
|
5426
|
-
if (
|
|
5427
|
-
|
|
5426
|
+
if (_hasOwnProperty.call(objectKeys, pairKey)) return false;
|
|
5427
|
+
Object.defineProperty(objectKeys, pairKey, { value: true });
|
|
5428
5428
|
}
|
|
5429
5429
|
return true;
|
|
5430
5430
|
}
|
|
@@ -5438,7 +5438,7 @@ var require_omap = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5438
5438
|
});
|
|
5439
5439
|
}));
|
|
5440
5440
|
//#endregion
|
|
5441
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5441
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/pairs.js
|
|
5442
5442
|
var require_pairs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5443
5443
|
const Type = require_type();
|
|
5444
5444
|
const _toString = Object.prototype.toString;
|
|
@@ -5473,7 +5473,7 @@ var require_pairs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5473
5473
|
});
|
|
5474
5474
|
}));
|
|
5475
5475
|
//#endregion
|
|
5476
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5476
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/type/set.js
|
|
5477
5477
|
var require_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5478
5478
|
const Type = require_type();
|
|
5479
5479
|
const _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -5495,7 +5495,7 @@ var require_set = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5495
5495
|
});
|
|
5496
5496
|
}));
|
|
5497
5497
|
//#endregion
|
|
5498
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5498
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/schema/default.js
|
|
5499
5499
|
var require_default = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5500
5500
|
module.exports = require_core().extend({
|
|
5501
5501
|
implicit: [require_timestamp(), require_merge$1()],
|
|
@@ -5508,7 +5508,7 @@ var require_default = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
5508
5508
|
});
|
|
5509
5509
|
}));
|
|
5510
5510
|
//#endregion
|
|
5511
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
5511
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/loader.js
|
|
5512
5512
|
var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
5513
5513
|
const common = require_common();
|
|
5514
5514
|
const YAMLException = require_exception();
|
|
@@ -6536,7 +6536,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
6536
6536
|
module.exports.load = load;
|
|
6537
6537
|
}));
|
|
6538
6538
|
//#endregion
|
|
6539
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
6539
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/lib/dumper.js
|
|
6540
6540
|
var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
6541
6541
|
const common = require_common();
|
|
6542
6542
|
const YAMLException = require_exception();
|
|
@@ -7035,7 +7035,7 @@ var require_dumper = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
7035
7035
|
module.exports.dump = dump;
|
|
7036
7036
|
}));
|
|
7037
7037
|
//#endregion
|
|
7038
|
-
//#region ../../node_modules/.pnpm/js-yaml@4.3.
|
|
7038
|
+
//#region ../../node_modules/.pnpm/js-yaml@4.3.1/node_modules/js-yaml/index.js
|
|
7039
7039
|
var require_js_yaml = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
7040
7040
|
const loader = require_loader();
|
|
7041
7041
|
const dumper = require_dumper();
|
|
@@ -7976,6 +7976,39 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7976
7976
|
exports.cosmiconfigSync = cosmiconfigSync;
|
|
7977
7977
|
}));
|
|
7978
7978
|
//#endregion
|
|
7979
|
+
//#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
|
|
7980
|
+
var TypeScriptCompileError = class _TypeScriptCompileError extends Error {
|
|
7981
|
+
constructor(message) {
|
|
7982
|
+
super(message);
|
|
7983
|
+
this.name = this.constructor.name;
|
|
7984
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
7985
|
+
}
|
|
7986
|
+
static fromError(error) {
|
|
7987
|
+
const message = `TypeScriptLoader failed to compile TypeScript:
|
|
7988
|
+
${error.message}`;
|
|
7989
|
+
const newError = new _TypeScriptCompileError(message);
|
|
7990
|
+
newError.stack = error.stack;
|
|
7991
|
+
return newError;
|
|
7992
|
+
}
|
|
7993
|
+
};
|
|
7994
|
+
//#endregion
|
|
7995
|
+
//#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
|
|
7996
|
+
function TypeScriptLoader(options) {
|
|
7997
|
+
const loader = createJiti("", {
|
|
7998
|
+
interopDefault: true,
|
|
7999
|
+
...options
|
|
8000
|
+
});
|
|
8001
|
+
return async (path, _content) => {
|
|
8002
|
+
try {
|
|
8003
|
+
const result = await loader.import(path);
|
|
8004
|
+
return result.default || result;
|
|
8005
|
+
} catch (error) {
|
|
8006
|
+
if (error instanceof Error) throw TypeScriptCompileError.fromError(error);
|
|
8007
|
+
throw error;
|
|
8008
|
+
}
|
|
8009
|
+
};
|
|
8010
|
+
}
|
|
8011
|
+
//#endregion
|
|
7979
8012
|
//#region src/lib/ruleCommandRegistry.ts
|
|
7980
8013
|
const RULE_COMMANDS = {
|
|
7981
8014
|
apiExposure: {
|
|
@@ -7986,7 +8019,7 @@ const RULE_COMMANDS = {
|
|
|
7986
8019
|
},
|
|
7987
8020
|
check: {
|
|
7988
8021
|
command: "check",
|
|
7989
|
-
includeInRoot:
|
|
8022
|
+
includeInRoot: false,
|
|
7990
8023
|
title: "Check Rules"
|
|
7991
8024
|
},
|
|
7992
8025
|
clean: {
|
|
@@ -8006,6 +8039,12 @@ const RULE_COMMANDS = {
|
|
|
8006
8039
|
includeInRoot: true,
|
|
8007
8040
|
title: "Dead Rules"
|
|
8008
8041
|
},
|
|
8042
|
+
dependabot: {
|
|
8043
|
+
command: "secure dependabot",
|
|
8044
|
+
configKey: "dependabot",
|
|
8045
|
+
includeInRoot: true,
|
|
8046
|
+
title: "Dependabot Rules"
|
|
8047
|
+
},
|
|
8009
8048
|
deplint: {
|
|
8010
8049
|
command: "deplint",
|
|
8011
8050
|
configKey: "deplint",
|
|
@@ -8027,7 +8066,7 @@ const RULE_COMMANDS = {
|
|
|
8027
8066
|
lint: {
|
|
8028
8067
|
aliases: ["relint"],
|
|
8029
8068
|
command: "lint",
|
|
8030
|
-
includeInRoot:
|
|
8069
|
+
includeInRoot: false,
|
|
8031
8070
|
title: "Lint Rules"
|
|
8032
8071
|
},
|
|
8033
8072
|
lintLint: {
|
|
@@ -10193,45 +10232,45 @@ function cloneResolvedPublintRules(rules) {
|
|
|
10193
10232
|
};
|
|
10194
10233
|
}
|
|
10195
10234
|
//#endregion
|
|
10196
|
-
//#region ../../node_modules/.pnpm/tinyexec@1.
|
|
10197
|
-
function
|
|
10198
|
-
for (const
|
|
10199
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
10200
|
-
const
|
|
10201
|
-
if (!
|
|
10235
|
+
//#region ../../node_modules/.pnpm/tinyexec@1.3.0/node_modules/tinyexec/dist/main.mjs
|
|
10236
|
+
function getPathFromEnv(env) {
|
|
10237
|
+
for (const key in env) {
|
|
10238
|
+
if (!Object.prototype.hasOwnProperty.call(env, key) || !isPathLikePattern.test(key)) continue;
|
|
10239
|
+
const value = env[key];
|
|
10240
|
+
if (!value) return defaultEnvPathInfo;
|
|
10202
10241
|
return {
|
|
10203
|
-
key
|
|
10204
|
-
value
|
|
10242
|
+
key,
|
|
10243
|
+
value
|
|
10205
10244
|
};
|
|
10206
10245
|
}
|
|
10207
|
-
return
|
|
10246
|
+
return defaultEnvPathInfo;
|
|
10208
10247
|
}
|
|
10209
|
-
function
|
|
10210
|
-
const
|
|
10211
|
-
const
|
|
10212
|
-
let
|
|
10213
|
-
let
|
|
10248
|
+
function addNodeBinToPath(cwd, path) {
|
|
10249
|
+
const parts = path.value.split(delimiter);
|
|
10250
|
+
const nodeBinPaths = [];
|
|
10251
|
+
let currentPath = cwd;
|
|
10252
|
+
let lastPath;
|
|
10214
10253
|
do {
|
|
10215
|
-
|
|
10216
|
-
|
|
10217
|
-
|
|
10218
|
-
} while (
|
|
10219
|
-
|
|
10220
|
-
const
|
|
10254
|
+
nodeBinPaths.push(resolve(currentPath, "node_modules", ".bin"));
|
|
10255
|
+
lastPath = currentPath;
|
|
10256
|
+
currentPath = dirname(currentPath);
|
|
10257
|
+
} while (currentPath !== lastPath);
|
|
10258
|
+
nodeBinPaths.push(dirname(process.execPath));
|
|
10259
|
+
const newPath = nodeBinPaths.concat(parts).join(delimiter);
|
|
10221
10260
|
return {
|
|
10222
|
-
key:
|
|
10223
|
-
value:
|
|
10261
|
+
key: path.key,
|
|
10262
|
+
value: newPath
|
|
10224
10263
|
};
|
|
10225
10264
|
}
|
|
10226
|
-
function
|
|
10227
|
-
const
|
|
10265
|
+
function computeEnv(cwd, env, nodePath = true) {
|
|
10266
|
+
const envWithDefault = {
|
|
10228
10267
|
...process.env,
|
|
10229
|
-
...
|
|
10268
|
+
...env
|
|
10230
10269
|
};
|
|
10231
|
-
if (!
|
|
10232
|
-
const
|
|
10233
|
-
|
|
10234
|
-
return
|
|
10270
|
+
if (!nodePath) return envWithDefault;
|
|
10271
|
+
const envPathInfo = addNodeBinToPath(cwd, getPathFromEnv(envWithDefault));
|
|
10272
|
+
envWithDefault[envPathInfo.key] = envPathInfo.value;
|
|
10273
|
+
return envWithDefault;
|
|
10235
10274
|
}
|
|
10236
10275
|
/**
|
|
10237
10276
|
* Normalizes the command and arguments to work cross-platform.
|
|
@@ -10239,157 +10278,168 @@ function y(e, t, n = true) {
|
|
|
10239
10278
|
* `node_modules/.bin` commands, and escaping meta characters.
|
|
10240
10279
|
* On other platforms, it just returns the command and arguments as-is.
|
|
10241
10280
|
*/
|
|
10242
|
-
function
|
|
10243
|
-
if (
|
|
10244
|
-
command
|
|
10245
|
-
args
|
|
10246
|
-
options
|
|
10247
|
-
};
|
|
10248
|
-
let
|
|
10249
|
-
let
|
|
10250
|
-
if (
|
|
10251
|
-
const
|
|
10252
|
-
const
|
|
10253
|
-
let
|
|
10281
|
+
function normalizeSpawnCommand(command, args = [], options = {}) {
|
|
10282
|
+
if (options.shell === true || !isWindows) return {
|
|
10283
|
+
command,
|
|
10284
|
+
args,
|
|
10285
|
+
options
|
|
10286
|
+
};
|
|
10287
|
+
let file = resolveCommand(command, options);
|
|
10288
|
+
let shebang = null;
|
|
10289
|
+
if (file !== null) {
|
|
10290
|
+
const size = 150;
|
|
10291
|
+
const buffer = Buffer.alloc(size);
|
|
10292
|
+
let fd = null;
|
|
10254
10293
|
try {
|
|
10255
|
-
|
|
10256
|
-
readSync(
|
|
10294
|
+
fd = openSync(file, "r");
|
|
10295
|
+
readSync(fd, buffer, 0, size, 0);
|
|
10257
10296
|
} catch {} finally {
|
|
10258
|
-
if (
|
|
10259
|
-
}
|
|
10260
|
-
const
|
|
10261
|
-
if (
|
|
10262
|
-
const
|
|
10263
|
-
const
|
|
10264
|
-
const
|
|
10265
|
-
const
|
|
10266
|
-
const
|
|
10267
|
-
|
|
10268
|
-
}
|
|
10269
|
-
}
|
|
10270
|
-
if (
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
}
|
|
10275
|
-
if (
|
|
10276
|
-
const
|
|
10277
|
-
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
if (
|
|
10285
|
-
return
|
|
10297
|
+
if (fd !== null) closeSync(fd);
|
|
10298
|
+
}
|
|
10299
|
+
const match = buffer.toString().match(shebangRegExp);
|
|
10300
|
+
if (match !== null) {
|
|
10301
|
+
const line = match[1].trim();
|
|
10302
|
+
const separatorIndex = line.indexOf(" ");
|
|
10303
|
+
const path = separatorIndex !== -1 ? line.slice(0, separatorIndex) : line;
|
|
10304
|
+
const argument = separatorIndex !== -1 ? line.slice(separatorIndex + 1) : "";
|
|
10305
|
+
const binary = basename(path);
|
|
10306
|
+
shebang = binary === "env" ? argument || null : binary;
|
|
10307
|
+
}
|
|
10308
|
+
}
|
|
10309
|
+
if (shebang !== null && file !== null) {
|
|
10310
|
+
args = [file, ...args];
|
|
10311
|
+
command = shebang;
|
|
10312
|
+
file = resolveCommand(command, options);
|
|
10313
|
+
}
|
|
10314
|
+
if (file === null || !isWindowsExecutableRegExp.test(file)) {
|
|
10315
|
+
const needsDoubleEscapeMetaChars = file !== null && isNodeModulesCmdRegExp.test(file);
|
|
10316
|
+
command = normalize(command);
|
|
10317
|
+
command = command.replace(metaCharsRegExp, "^$1");
|
|
10318
|
+
args = args.map((arg) => {
|
|
10319
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
|
|
10320
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
10321
|
+
arg = `"${arg}"`;
|
|
10322
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
10323
|
+
if (needsDoubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, "^$1");
|
|
10324
|
+
return arg;
|
|
10286
10325
|
});
|
|
10287
|
-
|
|
10326
|
+
args = [
|
|
10288
10327
|
"/d",
|
|
10289
10328
|
"/s",
|
|
10290
10329
|
"/c",
|
|
10291
|
-
`"${[
|
|
10330
|
+
`"${[command, ...args].join(" ")}"`
|
|
10292
10331
|
];
|
|
10293
|
-
|
|
10294
|
-
|
|
10295
|
-
...
|
|
10332
|
+
command = options.env?.comspec ?? "cmd.exe";
|
|
10333
|
+
options = {
|
|
10334
|
+
...options,
|
|
10296
10335
|
windowsVerbatimArguments: true
|
|
10297
10336
|
};
|
|
10298
10337
|
}
|
|
10299
10338
|
return {
|
|
10300
|
-
command
|
|
10301
|
-
args
|
|
10302
|
-
options
|
|
10339
|
+
command,
|
|
10340
|
+
args,
|
|
10341
|
+
options
|
|
10303
10342
|
};
|
|
10304
10343
|
}
|
|
10305
10344
|
/**
|
|
10306
10345
|
* Resolves the command to an absolute path if possible.
|
|
10307
10346
|
* Handles things like traversing PATH and adding extensions from PATHEXT
|
|
10308
10347
|
*/
|
|
10309
|
-
function
|
|
10310
|
-
const
|
|
10311
|
-
const
|
|
10312
|
-
const
|
|
10313
|
-
const
|
|
10314
|
-
|
|
10315
|
-
if (
|
|
10316
|
-
for (const
|
|
10317
|
-
const
|
|
10318
|
-
for (const
|
|
10319
|
-
const
|
|
10348
|
+
function resolveCommand(command, options) {
|
|
10349
|
+
const cwd$3 = (options.cwd ?? cwd()).toString();
|
|
10350
|
+
const env = options.env ?? process.env;
|
|
10351
|
+
const PATH = getPathFromEnv(env).value;
|
|
10352
|
+
const pathEnv = command.includes("/") || command.includes("\\") ? [""] : [cwd$3, ...PATH.split(delimiter)];
|
|
10353
|
+
let pathExt = env.PATHEXT ? env.PATHEXT.split(delimiter) : defaultPathExt;
|
|
10354
|
+
if (command.includes(".") && pathExt[0] !== "") pathExt = ["", ...pathExt];
|
|
10355
|
+
for (const extensions of [pathExt, noPathExt]) for (const path of pathEnv) {
|
|
10356
|
+
const dest = resolve(cwd$3, path.startsWith("\"") && path.endsWith("\"") && path.length > 1 ? path.slice(1, -1) : path, command);
|
|
10357
|
+
for (const ext of extensions) {
|
|
10358
|
+
const destWithExt = dest + ext;
|
|
10320
10359
|
try {
|
|
10321
|
-
if (statSync(
|
|
10360
|
+
if (statSync(destWithExt).isFile()) return destWithExt;
|
|
10322
10361
|
} catch {}
|
|
10323
10362
|
}
|
|
10324
10363
|
}
|
|
10325
10364
|
return null;
|
|
10326
10365
|
}
|
|
10327
|
-
function
|
|
10328
|
-
const
|
|
10329
|
-
for (const
|
|
10330
|
-
if (
|
|
10331
|
-
|
|
10332
|
-
return
|
|
10366
|
+
function combineSignals(signals) {
|
|
10367
|
+
const controller = new AbortController();
|
|
10368
|
+
for (const signal of signals) {
|
|
10369
|
+
if (signal.aborted) {
|
|
10370
|
+
controller.abort();
|
|
10371
|
+
return signal;
|
|
10333
10372
|
}
|
|
10334
|
-
const
|
|
10335
|
-
|
|
10373
|
+
const onAbort = () => {
|
|
10374
|
+
controller.abort(signal.reason);
|
|
10336
10375
|
};
|
|
10337
|
-
|
|
10376
|
+
signal.addEventListener("abort", onAbort, { signal: controller.signal });
|
|
10338
10377
|
}
|
|
10339
|
-
return
|
|
10378
|
+
return controller.signal;
|
|
10340
10379
|
}
|
|
10341
|
-
async function
|
|
10342
|
-
let
|
|
10380
|
+
async function readStream(stream) {
|
|
10381
|
+
let output = "";
|
|
10343
10382
|
try {
|
|
10344
|
-
for await (const
|
|
10383
|
+
for await (const chunk of stream) output += chunk.toString();
|
|
10345
10384
|
} catch {}
|
|
10346
|
-
return
|
|
10385
|
+
return output;
|
|
10347
10386
|
}
|
|
10348
|
-
var
|
|
10387
|
+
var isPathLikePattern, defaultEnvPathInfo, combineStreams, metaCharsRegExp, shebangRegExp, isWindowsExecutableRegExp, isNodeModulesCmdRegExp, isWindows, defaultPathExt, noPathExt, NonZeroExitError, defaultOptions, defaultNodeOptions, ExecProcess, x, exec;
|
|
10349
10388
|
var init_main = __esmMin((() => {
|
|
10350
|
-
|
|
10351
|
-
|
|
10389
|
+
isPathLikePattern = /^path$/i;
|
|
10390
|
+
defaultEnvPathInfo = {
|
|
10352
10391
|
key: "PATH",
|
|
10353
10392
|
value: ""
|
|
10354
10393
|
};
|
|
10355
|
-
|
|
10356
|
-
let
|
|
10357
|
-
const
|
|
10358
|
-
const
|
|
10359
|
-
if (--
|
|
10394
|
+
combineStreams = (streams) => {
|
|
10395
|
+
let streamCount = streams.length;
|
|
10396
|
+
const combined = new PassThrough();
|
|
10397
|
+
const maybeEmitEnd = () => {
|
|
10398
|
+
if (--streamCount === 0) combined.end();
|
|
10360
10399
|
};
|
|
10361
|
-
for (const
|
|
10362
|
-
return
|
|
10363
|
-
};
|
|
10364
|
-
|
|
10365
|
-
|
|
10366
|
-
|
|
10367
|
-
|
|
10368
|
-
|
|
10369
|
-
|
|
10400
|
+
for (const stream of streams) pipeline(stream, combined, { end: false }).then(maybeEmitEnd).catch(maybeEmitEnd);
|
|
10401
|
+
return combined;
|
|
10402
|
+
};
|
|
10403
|
+
metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
10404
|
+
shebangRegExp = /^#!\s*(.+)/;
|
|
10405
|
+
isWindowsExecutableRegExp = /\.(?:com|exe)$/i;
|
|
10406
|
+
isNodeModulesCmdRegExp = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
|
|
10407
|
+
isWindows = process.platform === "win32";
|
|
10408
|
+
defaultPathExt = [
|
|
10370
10409
|
".EXE",
|
|
10371
10410
|
".CMD",
|
|
10372
10411
|
".BAT",
|
|
10373
10412
|
".COM"
|
|
10374
10413
|
];
|
|
10375
|
-
|
|
10414
|
+
noPathExt = [""];
|
|
10415
|
+
NonZeroExitError = class extends Error {
|
|
10376
10416
|
result;
|
|
10377
10417
|
output;
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10418
|
+
exitCode;
|
|
10419
|
+
get signalCode() {
|
|
10420
|
+
return this.result.signalCode;
|
|
10421
|
+
}
|
|
10422
|
+
constructor(result, output, command, args) {
|
|
10423
|
+
let target = "The process";
|
|
10424
|
+
if (command) target = `The command \`${args?.length ? `${command} ${args.map((a) => /[ "'`()]/.test(a) ? JSON.stringify(a) : a).join(" ")}` : command}\``;
|
|
10425
|
+
const exitCode = result.exitCode ?? 1;
|
|
10426
|
+
super(result.signalCode !== null ? `${target} was killed by the signal ${result.signalCode}` : `${target} exited with a non-zero status (${exitCode})`);
|
|
10427
|
+
this.result = result;
|
|
10428
|
+
this.output = output;
|
|
10429
|
+
this.exitCode = exitCode;
|
|
10430
|
+
Object.defineProperty(this, "result", {
|
|
10431
|
+
enumerable: false,
|
|
10432
|
+
writable: false,
|
|
10433
|
+
configurable: false
|
|
10434
|
+
});
|
|
10385
10435
|
}
|
|
10386
10436
|
};
|
|
10387
|
-
|
|
10437
|
+
defaultOptions = {
|
|
10388
10438
|
timeout: void 0,
|
|
10389
10439
|
persist: false
|
|
10390
10440
|
};
|
|
10391
|
-
|
|
10392
|
-
|
|
10441
|
+
defaultNodeOptions = { windowsHide: true };
|
|
10442
|
+
ExecProcess = class {
|
|
10393
10443
|
_process;
|
|
10394
10444
|
_aborted = false;
|
|
10395
10445
|
_options;
|
|
@@ -10407,19 +10457,22 @@ var init_main = __esmMin((() => {
|
|
|
10407
10457
|
get exitCode() {
|
|
10408
10458
|
if (this._process && this._process.exitCode !== null) return this._process.exitCode;
|
|
10409
10459
|
}
|
|
10410
|
-
|
|
10460
|
+
get signalCode() {
|
|
10461
|
+
return this._process?.signalCode ?? null;
|
|
10462
|
+
}
|
|
10463
|
+
constructor(command, args, options) {
|
|
10411
10464
|
this._options = {
|
|
10412
|
-
...
|
|
10413
|
-
...
|
|
10465
|
+
...defaultOptions,
|
|
10466
|
+
...options
|
|
10414
10467
|
};
|
|
10415
|
-
this._command =
|
|
10416
|
-
this._args =
|
|
10417
|
-
this._processClosed = new Promise((
|
|
10418
|
-
this._resolveClose =
|
|
10468
|
+
this._command = command;
|
|
10469
|
+
this._args = args ?? [];
|
|
10470
|
+
this._processClosed = new Promise((resolve) => {
|
|
10471
|
+
this._resolveClose = resolve;
|
|
10419
10472
|
});
|
|
10420
10473
|
}
|
|
10421
|
-
kill(
|
|
10422
|
-
return this._process?.kill(
|
|
10474
|
+
kill(signal) {
|
|
10475
|
+
return this._process?.kill(signal) === true;
|
|
10423
10476
|
}
|
|
10424
10477
|
get aborted() {
|
|
10425
10478
|
return this._aborted;
|
|
@@ -10427,99 +10480,99 @@ var init_main = __esmMin((() => {
|
|
|
10427
10480
|
get killed() {
|
|
10428
10481
|
return this._process?.killed === true;
|
|
10429
10482
|
}
|
|
10430
|
-
pipe(
|
|
10431
|
-
return
|
|
10432
|
-
...
|
|
10483
|
+
pipe(command, args, options) {
|
|
10484
|
+
return exec(command, args, {
|
|
10485
|
+
...options,
|
|
10433
10486
|
stdin: this
|
|
10434
10487
|
});
|
|
10435
10488
|
}
|
|
10436
10489
|
async *[Symbol.asyncIterator]() {
|
|
10437
|
-
const
|
|
10438
|
-
if (!
|
|
10439
|
-
const
|
|
10440
|
-
if (this._streamErr)
|
|
10441
|
-
if (this._streamOut)
|
|
10442
|
-
const
|
|
10443
|
-
const
|
|
10444
|
-
for await (const
|
|
10490
|
+
const proc = this._process;
|
|
10491
|
+
if (!proc) return;
|
|
10492
|
+
const streams = [];
|
|
10493
|
+
if (this._streamErr) streams.push(this._streamErr);
|
|
10494
|
+
if (this._streamOut) streams.push(this._streamOut);
|
|
10495
|
+
const streamCombined = combineStreams(streams);
|
|
10496
|
+
const rl = readline.createInterface({ input: streamCombined });
|
|
10497
|
+
for await (const chunk of rl) yield chunk.toString();
|
|
10445
10498
|
await this._processClosed;
|
|
10446
|
-
|
|
10499
|
+
proc.removeAllListeners();
|
|
10447
10500
|
if (this._thrownError) throw this._thrownError;
|
|
10448
|
-
if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new
|
|
10501
|
+
if (this._options?.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, void 0, this._command, this._args);
|
|
10449
10502
|
}
|
|
10450
10503
|
async _waitForOutput() {
|
|
10451
|
-
const
|
|
10452
|
-
if (!
|
|
10453
|
-
const [
|
|
10504
|
+
const proc = this._process;
|
|
10505
|
+
if (!proc) throw new Error("No process was started");
|
|
10506
|
+
const [stdout, stderr] = await Promise.all([this._streamOut ? readStream(this._streamOut) : "", this._streamErr ? readStream(this._streamErr) : ""]);
|
|
10454
10507
|
await this._processClosed;
|
|
10455
|
-
const { stdin
|
|
10456
|
-
if (
|
|
10457
|
-
|
|
10508
|
+
const { stdin } = this._options;
|
|
10509
|
+
if (stdin && typeof stdin !== "string") await stdin;
|
|
10510
|
+
proc.removeAllListeners();
|
|
10458
10511
|
if (this._thrownError) throw this._thrownError;
|
|
10459
|
-
const
|
|
10460
|
-
stderr
|
|
10461
|
-
stdout
|
|
10512
|
+
const result = {
|
|
10513
|
+
stderr,
|
|
10514
|
+
stdout,
|
|
10462
10515
|
exitCode: this.exitCode
|
|
10463
10516
|
};
|
|
10464
|
-
if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new
|
|
10465
|
-
return
|
|
10517
|
+
if (this._options.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, result, this._command, this._args);
|
|
10518
|
+
return result;
|
|
10466
10519
|
}
|
|
10467
|
-
then(
|
|
10468
|
-
return this._waitForOutput().then(
|
|
10520
|
+
then(onfulfilled, onrejected) {
|
|
10521
|
+
return this._waitForOutput().then(onfulfilled, onrejected);
|
|
10469
10522
|
}
|
|
10470
10523
|
_streamOut;
|
|
10471
10524
|
_streamErr;
|
|
10472
10525
|
spawn() {
|
|
10473
|
-
const
|
|
10474
|
-
const
|
|
10475
|
-
const
|
|
10476
|
-
...
|
|
10477
|
-
...
|
|
10526
|
+
const cwd$1 = cwd();
|
|
10527
|
+
const options = this._options;
|
|
10528
|
+
const nodeOptions = {
|
|
10529
|
+
...defaultNodeOptions,
|
|
10530
|
+
...options.nodeOptions
|
|
10478
10531
|
};
|
|
10479
|
-
const
|
|
10532
|
+
const signals = [];
|
|
10480
10533
|
this._resetState();
|
|
10481
|
-
if (
|
|
10482
|
-
if (
|
|
10483
|
-
if (
|
|
10484
|
-
if (
|
|
10485
|
-
|
|
10486
|
-
const
|
|
10487
|
-
const
|
|
10488
|
-
if (
|
|
10489
|
-
if (
|
|
10490
|
-
this._process =
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
if (
|
|
10494
|
-
const { stdin
|
|
10495
|
-
if (typeof
|
|
10496
|
-
else
|
|
10534
|
+
if (options.timeout !== void 0) signals.push(AbortSignal.timeout(options.timeout));
|
|
10535
|
+
if (options.signal !== void 0) signals.push(options.signal);
|
|
10536
|
+
if (options.persist === true) nodeOptions.detached = true;
|
|
10537
|
+
if (signals.length > 0) nodeOptions.signal = combineSignals(signals);
|
|
10538
|
+
nodeOptions.env = computeEnv(cwd$1, nodeOptions.env, options.nodePath);
|
|
10539
|
+
const crossResult = normalizeSpawnCommand(this._command, this._args, nodeOptions);
|
|
10540
|
+
const handle = spawn(crossResult.command, crossResult.args, crossResult.options);
|
|
10541
|
+
if (handle.stderr) this._streamErr = handle.stderr;
|
|
10542
|
+
if (handle.stdout) this._streamOut = handle.stdout;
|
|
10543
|
+
this._process = handle;
|
|
10544
|
+
handle.once("error", this._onError);
|
|
10545
|
+
handle.once("close", this._onClose);
|
|
10546
|
+
if (handle.stdin) {
|
|
10547
|
+
const { stdin } = options;
|
|
10548
|
+
if (typeof stdin === "string") handle.stdin.end(stdin);
|
|
10549
|
+
else stdin?.process?.stdout?.pipe(handle.stdin);
|
|
10497
10550
|
}
|
|
10498
10551
|
}
|
|
10499
10552
|
_resetState() {
|
|
10500
10553
|
this._aborted = false;
|
|
10501
|
-
this._processClosed = new Promise((
|
|
10502
|
-
this._resolveClose =
|
|
10554
|
+
this._processClosed = new Promise((resolve) => {
|
|
10555
|
+
this._resolveClose = resolve;
|
|
10503
10556
|
});
|
|
10504
10557
|
this._thrownError = void 0;
|
|
10505
10558
|
}
|
|
10506
|
-
_onError = (
|
|
10507
|
-
if (
|
|
10559
|
+
_onError = (err) => {
|
|
10560
|
+
if (err.name === "AbortError" && (!(err.cause instanceof Error) || err.cause.name !== "TimeoutError")) {
|
|
10508
10561
|
this._aborted = true;
|
|
10509
10562
|
return;
|
|
10510
10563
|
}
|
|
10511
|
-
this._thrownError =
|
|
10564
|
+
this._thrownError = err;
|
|
10512
10565
|
};
|
|
10513
10566
|
_onClose = () => {
|
|
10514
10567
|
if (this._resolveClose) this._resolveClose();
|
|
10515
10568
|
};
|
|
10516
10569
|
};
|
|
10517
|
-
|
|
10518
|
-
const
|
|
10519
|
-
|
|
10520
|
-
return
|
|
10570
|
+
x = (command, args, userOptions) => {
|
|
10571
|
+
const proc = new ExecProcess(command, args, userOptions);
|
|
10572
|
+
proc.spawn();
|
|
10573
|
+
return proc;
|
|
10521
10574
|
};
|
|
10522
|
-
|
|
10575
|
+
exec = x;
|
|
10523
10576
|
}));
|
|
10524
10577
|
//#endregion
|
|
10525
10578
|
//#region ../../node_modules/.pnpm/@publint+pack@0.1.6/node_modules/@publint/pack/src/node/utils.js
|
|
@@ -10568,7 +10621,7 @@ async function pack(dir, opts) {
|
|
|
10568
10621
|
case "yarn": break;
|
|
10569
10622
|
default: command.push("--ignore-scripts");
|
|
10570
10623
|
}
|
|
10571
|
-
const output = await
|
|
10624
|
+
const output = await exec(command[0], command.slice(1), { nodeOptions: { cwd: dir } });
|
|
10572
10625
|
const tarballFile = await fs$1.readdir(packDestination).then((files) => {
|
|
10573
10626
|
return files.find((file) => file.endsWith(".tgz") && output.stdout.includes(file));
|
|
10574
10627
|
});
|
|
@@ -10605,7 +10658,7 @@ async function packAsJson(dir, opts) {
|
|
|
10605
10658
|
case "yarn": break;
|
|
10606
10659
|
default: command.push("--ignore-scripts");
|
|
10607
10660
|
}
|
|
10608
|
-
let { stdout } = await
|
|
10661
|
+
let { stdout } = await exec(command[0], command.slice(1), { nodeOptions: { cwd: dir } });
|
|
10609
10662
|
try {
|
|
10610
10663
|
stdout = stdout.trim();
|
|
10611
10664
|
if (packageManager === "pnpm") stdout = fixPnpmStdout(stdout);
|
|
@@ -12270,7 +12323,7 @@ function createTarballVfs(files) {
|
|
|
12270
12323
|
}
|
|
12271
12324
|
var init_vfs_tarball = __esmMin((() => {}));
|
|
12272
12325
|
//#endregion
|
|
12273
|
-
//#region ../../node_modules/.pnpm/package-manager-detector@1.
|
|
12326
|
+
//#region ../../node_modules/.pnpm/package-manager-detector@1.8.0/node_modules/package-manager-detector/dist/constants.mjs
|
|
12274
12327
|
var AGENTS, LOCKS, INSTALL_METADATA;
|
|
12275
12328
|
var init_constants = __esmMin((() => {
|
|
12276
12329
|
AGENTS = [
|
|
@@ -12279,6 +12332,7 @@ var init_constants = __esmMin((() => {
|
|
|
12279
12332
|
"yarn@berry",
|
|
12280
12333
|
"pnpm",
|
|
12281
12334
|
"pnpm@6",
|
|
12335
|
+
"pnpm-rush",
|
|
12282
12336
|
"bun",
|
|
12283
12337
|
"deno",
|
|
12284
12338
|
"nub",
|
|
@@ -12290,6 +12344,7 @@ var init_constants = __esmMin((() => {
|
|
|
12290
12344
|
"bun.lock": "bun",
|
|
12291
12345
|
"bun.lockb": "bun",
|
|
12292
12346
|
"deno.lock": "deno",
|
|
12347
|
+
"nub.lock": "nub",
|
|
12293
12348
|
"pnpm-lock.yaml": "pnpm",
|
|
12294
12349
|
"pnpm-workspace.yaml": "pnpm",
|
|
12295
12350
|
"yarn.lock": "yarn",
|
|
@@ -12310,7 +12365,7 @@ var init_constants = __esmMin((() => {
|
|
|
12310
12365
|
};
|
|
12311
12366
|
}));
|
|
12312
12367
|
//#endregion
|
|
12313
|
-
//#region ../../node_modules/.pnpm/package-manager-detector@1.
|
|
12368
|
+
//#region ../../node_modules/.pnpm/package-manager-detector@1.8.0/node_modules/package-manager-detector/dist/detect.mjs
|
|
12314
12369
|
var detect_exports = /* @__PURE__ */ __exportAll({
|
|
12315
12370
|
detect: () => detect,
|
|
12316
12371
|
getUserAgent: () => getUserAgent
|
|
@@ -12355,6 +12410,10 @@ async function detect(options = {}) {
|
|
|
12355
12410
|
for (const directory of lookup(cwd)) {
|
|
12356
12411
|
for (const strategy of strategies) switch (strategy) {
|
|
12357
12412
|
case "lockfile":
|
|
12413
|
+
if (await pathExists(PATH.join(directory, "rush.json"), "file")) return {
|
|
12414
|
+
name: "pnpm",
|
|
12415
|
+
agent: "pnpm-rush"
|
|
12416
|
+
};
|
|
12358
12417
|
for (const lock of Object.keys(LOCKS)) if (await pathExists(PATH.join(directory, lock), "file")) {
|
|
12359
12418
|
const name = LOCKS[lock];
|
|
12360
12419
|
const result = await parsePackageJson(PATH.join(directory, "package.json"), options);
|