@voidzero-dev/vite-plus-core 0.0.0-6bf6b4c1b360fa4f7f1cee975103c16c21053c72
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/LICENSE +41 -0
- package/dist/pluginutils/filter/composable-filters.d.ts +90 -0
- package/dist/pluginutils/filter/composable-filters.js +256 -0
- package/dist/pluginutils/filter/filter-vite-plugins.d.ts +28 -0
- package/dist/pluginutils/filter/filter-vite-plugins.js +75 -0
- package/dist/pluginutils/filter/index.d.ts +3 -0
- package/dist/pluginutils/filter/index.js +3 -0
- package/dist/pluginutils/filter/simple-filters.d.ts +71 -0
- package/dist/pluginutils/filter/simple-filters.js +70 -0
- package/dist/pluginutils/index.d.ts +1 -0
- package/dist/pluginutils/index.js +1 -0
- package/dist/pluginutils/utils.d.ts +2 -0
- package/dist/pluginutils/utils.js +17 -0
- package/dist/rolldown/cli-setup.d.mts +1 -0
- package/dist/rolldown/cli-setup.mjs +17 -0
- package/dist/rolldown/cli.d.mts +1 -0
- package/dist/rolldown/cli.mjs +1581 -0
- package/dist/rolldown/config.d.mts +10 -0
- package/dist/rolldown/config.mjs +14 -0
- package/dist/rolldown/experimental-index.d.mts +181 -0
- package/dist/rolldown/experimental-index.mjs +266 -0
- package/dist/rolldown/experimental-runtime-types.d.ts +92 -0
- package/dist/rolldown/filter-index.d.mts +4 -0
- package/dist/rolldown/filter-index.mjs +369 -0
- package/dist/rolldown/get-log-filter.d.mts +7 -0
- package/dist/rolldown/get-log-filter.mjs +48 -0
- package/dist/rolldown/index.d.mts +4 -0
- package/dist/rolldown/index.mjs +38 -0
- package/dist/rolldown/parallel-plugin-worker.d.mts +1 -0
- package/dist/rolldown/parallel-plugin-worker.mjs +32 -0
- package/dist/rolldown/parallel-plugin.d.mts +14 -0
- package/dist/rolldown/parallel-plugin.mjs +7 -0
- package/dist/rolldown/parse-ast-index.d.mts +8 -0
- package/dist/rolldown/parse-ast-index.mjs +4 -0
- package/dist/rolldown/plugins-index.d.mts +31 -0
- package/dist/rolldown/plugins-index.mjs +40 -0
- package/dist/rolldown/shared/binding-C9YdqoUG.d.mts +1657 -0
- package/dist/rolldown/shared/binding-Duj6W4V2.mjs +583 -0
- package/dist/rolldown/shared/bindingify-input-options-BUoJEsim.mjs +2174 -0
- package/dist/rolldown/shared/constructors-D3qJVJZC.d.mts +28 -0
- package/dist/rolldown/shared/constructors-DPqxrdwc.mjs +61 -0
- package/dist/rolldown/shared/define-config-BF4P-Pum.mjs +7 -0
- package/dist/rolldown/shared/define-config-BgCyRzGF.d.mts +2567 -0
- package/dist/rolldown/shared/load-config-wTAikb0B.mjs +114 -0
- package/dist/rolldown/shared/logging-DsnCZi19.d.mts +42 -0
- package/dist/rolldown/shared/logs-cyjC0SDv.mjs +183 -0
- package/dist/rolldown/shared/misc-0HsaOsAX.mjs +22 -0
- package/dist/rolldown/shared/normalize-string-or-regex-DJvwOt-n.mjs +61 -0
- package/dist/rolldown/shared/parse-ast-index-Dl7ZEpwn.mjs +99 -0
- package/dist/rolldown/shared/prompt-DAAykJcI.mjs +847 -0
- package/dist/rolldown/shared/rolldown-DW_XGtck.mjs +11 -0
- package/dist/rolldown/shared/rolldown-build-C9jjlbjh.mjs +2293 -0
- package/dist/rolldown/shared/watch-VW0ga4wx.mjs +351 -0
- package/dist/tsdown/build-BZayr9FB-DuBaxvMc.js +4879 -0
- package/dist/tsdown/build-DN921Mon-D-Xc-FOd.js +5 -0
- package/dist/tsdown/chunk-Dj_d7TT4.js +31 -0
- package/dist/tsdown/context-9CkpILzL-Dxr4aDmA.js +25 -0
- package/dist/tsdown/debug-Baqdx6K3-BCCVGT5l.js +18 -0
- package/dist/tsdown/dist-BLKjHOaA.js +201 -0
- package/dist/tsdown/dist-Cn3OG_Bk.js +9565 -0
- package/dist/tsdown/dist-qCTl7w0O.js +741 -0
- package/dist/tsdown/filename-B5CNWw1o.js +27 -0
- package/dist/tsdown/index-types.d.ts +1066 -0
- package/dist/tsdown/index.js +13 -0
- package/dist/tsdown/main-DgFBiQqX.js +905 -0
- package/dist/tsdown/node-BpqHh3bo.js +271 -0
- package/dist/tsdown/npm_cjs_chunk_chunk.cjs +11 -0
- package/dist/tsdown/npm_cjs_chunk_lib.cjs +14151 -0
- package/dist/tsdown/npm_cjs_chunk_range.cjs +484 -0
- package/dist/tsdown/npm_cjs_chunk_semver.cjs +362 -0
- package/dist/tsdown/npm_entry_@babel_generator.cjs +6239 -0
- package/dist/tsdown/npm_entry_@babel_parser.cjs +12573 -0
- package/dist/tsdown/npm_entry_@babel_types.cjs +6 -0
- package/dist/tsdown/npm_entry_picomatch.cjs +1676 -0
- package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +52 -0
- package/dist/tsdown/npm_entry_semver_functions_satisfies.cjs +23 -0
- package/dist/tsdown/npm_entry_semver_ranges_min-version.cjs +48 -0
- package/dist/tsdown/npm_entry_tree-kill.cjs +103 -0
- package/dist/tsdown/resolver-CyVXxlZv-Crx1948k.js +17 -0
- package/dist/tsdown/run.js +537 -0
- package/dist/tsdown/tsc-CEqo7Xcn.js +408 -0
- package/dist/vite/client/client.mjs +1140 -0
- package/dist/vite/client/env.mjs +19 -0
- package/dist/vite/client.d.ts +279 -0
- package/dist/vite/misc/false.d.ts +2 -0
- package/dist/vite/misc/false.js +1 -0
- package/dist/vite/misc/true.d.ts +2 -0
- package/dist/vite/misc/true.js +1 -0
- package/dist/vite/node/chunks/build.js +4 -0
- package/dist/vite/node/chunks/build2.js +5538 -0
- package/dist/vite/node/chunks/chunk.js +32 -0
- package/dist/vite/node/chunks/config.js +4 -0
- package/dist/vite/node/chunks/dist.js +6758 -0
- package/dist/vite/node/chunks/dist2.js +6653 -0
- package/dist/vite/node/chunks/lib.js +377 -0
- package/dist/vite/node/chunks/logger.js +332 -0
- package/dist/vite/node/chunks/moduleRunnerTransport.d.ts +96 -0
- package/dist/vite/node/chunks/node.js +41593 -0
- package/dist/vite/node/chunks/optimizer.js +4 -0
- package/dist/vite/node/chunks/postcss-import.js +479 -0
- package/dist/vite/node/chunks/preview.js +4 -0
- package/dist/vite/node/chunks/server.js +4 -0
- package/dist/vite/node/cli.js +699 -0
- package/dist/vite/node/index.d.ts +3867 -0
- package/dist/vite/node/index.js +4 -0
- package/dist/vite/node/internal.d.ts +2 -0
- package/dist/vite/node/internal.js +3 -0
- package/dist/vite/node/module-runner.d.ts +311 -0
- package/dist/vite/node/module-runner.js +1160 -0
- package/dist/vite/types/customEvent.d.ts +52 -0
- package/dist/vite/types/hmrPayload.d.ts +80 -0
- package/dist/vite/types/hot.d.ts +39 -0
- package/dist/vite/types/import-meta.d.ts +5 -0
- package/dist/vite/types/importGlob.d.ts +89 -0
- package/dist/vite/types/importMeta.d.ts +30 -0
- package/dist/vite/types/internal/cssPreprocessorOptions.d.ts +44 -0
- package/dist/vite/types/internal/esbuildOptions.d.ts +28 -0
- package/dist/vite/types/internal/lightningcssOptions.d.ts +18 -0
- package/dist/vite/types/internal/rollupTypeCompat.d.ts +24 -0
- package/dist/vite/types/internal/terserOptions.d.ts +11 -0
- package/dist/vite/types/metadata.d.ts +38 -0
- package/package.json +198 -0
|
@@ -0,0 +1,905 @@
|
|
|
1
|
+
import { n as __toESM, t as __commonJSMin } from "./chunk-Dj_d7TT4.js";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import process$1, { cwd } from "node:process";
|
|
4
|
+
import { pathToFileURL } from "node:url";
|
|
5
|
+
import { createRequire as createRequire$1 } from "module";
|
|
6
|
+
import { spawn } from "node:child_process";
|
|
7
|
+
import { delimiter, dirname, normalize, resolve } from "node:path";
|
|
8
|
+
import { PassThrough } from "node:stream";
|
|
9
|
+
import readline from "node:readline";
|
|
10
|
+
|
|
11
|
+
//#region ../../node_modules/.pnpm/ansis@4.2.0/node_modules/ansis/index.cjs
|
|
12
|
+
var require_ansis = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13
|
+
let e, t, r, { defineProperty: l, setPrototypeOf: n, create: o, keys: s } = Object, i = "", { round: c, max: a } = Math, p = (e) => {
|
|
14
|
+
let t = /([a-f\d]{3,6})/i.exec(e)?.[1], r = t?.length, l$1 = parseInt(6 ^ r ? 3 ^ r ? "0" : t[0] + t[0] + t[1] + t[1] + t[2] + t[2] : t, 16);
|
|
15
|
+
return [
|
|
16
|
+
l$1 >> 16 & 255,
|
|
17
|
+
l$1 >> 8 & 255,
|
|
18
|
+
255 & l$1
|
|
19
|
+
];
|
|
20
|
+
}, u = (e, t, r) => e ^ t || t ^ r ? 16 + 36 * c(e / 51) + 6 * c(t / 51) + c(r / 51) : 8 > e ? 16 : e > 248 ? 231 : c(24 * (e - 8) / 247) + 232, d = (e) => {
|
|
21
|
+
let t, r, l$1, n, o;
|
|
22
|
+
return 8 > e ? 30 + e : 16 > e ? e - 8 + 90 : (232 > e ? (o = (e -= 16) % 36, t = (e / 36 | 0) / 5, r = (o / 6 | 0) / 5, l$1 = o % 6 / 5) : t = r = l$1 = (10 * (e - 232) + 8) / 255, n = 2 * a(t, r, l$1), n ? 30 + (c(l$1) << 2 | c(r) << 1 | c(t)) + (2 ^ n ? 0 : 60) : 30);
|
|
23
|
+
}, f = (() => {
|
|
24
|
+
let r = (e) => o.some(((t) => e.test(t))), l$1 = globalThis, n = l$1.process ?? {}, o = n.argv ?? [], i = n.env ?? {}, c = -1;
|
|
25
|
+
try {
|
|
26
|
+
e = "," + s(i).join(",");
|
|
27
|
+
} catch (e) {
|
|
28
|
+
i = {}, c = 0;
|
|
29
|
+
}
|
|
30
|
+
let a$1 = "FORCE_COLOR", p$1 = {
|
|
31
|
+
false: 0,
|
|
32
|
+
0: 0,
|
|
33
|
+
1: 1,
|
|
34
|
+
2: 2,
|
|
35
|
+
3: 3
|
|
36
|
+
}[i[a$1]] ?? -1, u$1 = a$1 in i && p$1 || r(/^--color=?(true|always)?$/);
|
|
37
|
+
return u$1 && (c = p$1), ~c || (c = ((r$1, l$2, n$1) => (t = r$1.TERM, {
|
|
38
|
+
"24bit": 3,
|
|
39
|
+
truecolor: 3,
|
|
40
|
+
ansi256: 2,
|
|
41
|
+
ansi: 1
|
|
42
|
+
}[r$1.COLORTERM] || (r$1.CI ? /,GITHUB/.test(e) ? 3 : 1 : l$2 && "dumb" !== t ? n$1 ? 3 : /-256/.test(t) ? 2 : 1 : 0)))(i, !!i.PM2_HOME || i.NEXT_RUNTIME?.includes("edge") || !!n.stdout?.isTTY, "win32" === n.platform)), !p$1 || i.NO_COLOR || r(/^--(no-color|color=(false|never))$/) ? 0 : l$1.window?.chrome || u$1 && !c ? 3 : c;
|
|
43
|
+
})(), g = {
|
|
44
|
+
open: i,
|
|
45
|
+
close: i
|
|
46
|
+
}, h = 39, b = 49, O = {}, m = ({ p: e }, { open: t, close: l$1 }) => {
|
|
47
|
+
let o = (e$1, ...r) => {
|
|
48
|
+
if (!e$1) {
|
|
49
|
+
if (t && t === l$1) return t;
|
|
50
|
+
if ((e$1 ?? i) === i) return i;
|
|
51
|
+
}
|
|
52
|
+
let n, s$1 = e$1.raw ? String.raw({ raw: e$1 }, ...r) : i + e$1, c$1 = o.p, a$1 = c$1.o, p$1 = c$1.c;
|
|
53
|
+
if (s$1.includes("\x1B")) for (; c$1; c$1 = c$1.p) {
|
|
54
|
+
let { open: e$2, close: t$1 } = c$1, r$1 = t$1.length, l$2 = i, o$1 = 0;
|
|
55
|
+
if (r$1) for (; ~(n = s$1.indexOf(t$1, o$1)); o$1 = n + r$1) l$2 += s$1.slice(o$1, n) + e$2;
|
|
56
|
+
s$1 = l$2 + s$1.slice(o$1);
|
|
57
|
+
}
|
|
58
|
+
return a$1 + (s$1.includes("\n") ? s$1.replace(/(\r?\n)/g, p$1 + "$1" + a$1) : s$1) + p$1;
|
|
59
|
+
}, s = t, c = l$1;
|
|
60
|
+
return e && (s = e.o + t, c = l$1 + e.c), n(o, r), o.p = {
|
|
61
|
+
open: t,
|
|
62
|
+
close: l$1,
|
|
63
|
+
o: s,
|
|
64
|
+
c,
|
|
65
|
+
p: e
|
|
66
|
+
}, o.open = s, o.close = c, o;
|
|
67
|
+
};
|
|
68
|
+
const w = new function e(t = f) {
|
|
69
|
+
let s = {
|
|
70
|
+
Ansis: e,
|
|
71
|
+
level: t,
|
|
72
|
+
isSupported: () => a$1,
|
|
73
|
+
strip: (e$1) => e$1.replace(/[][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, i),
|
|
74
|
+
extend(e$1) {
|
|
75
|
+
for (let t$1 in e$1) {
|
|
76
|
+
let r = e$1[t$1], l$1 = (typeof r)[0];
|
|
77
|
+
"s" === l$1 ? (c(t$1, T$1(...p(r))), c(_$1(t$1), v$1(...p(r)))) : c(t$1, r, "f" === l$1);
|
|
78
|
+
}
|
|
79
|
+
return r = o({}, O), n(s, r), s;
|
|
80
|
+
}
|
|
81
|
+
}, c = (e$1, t$1, r) => {
|
|
82
|
+
O[e$1] = { get() {
|
|
83
|
+
let n = r ? (...e$2) => m(this, t$1(...e$2)) : m(this, t$1);
|
|
84
|
+
return l(this, e$1, { value: n }), n;
|
|
85
|
+
} };
|
|
86
|
+
}, a$1 = t > 0, w$1 = (e$1, t$1) => a$1 ? {
|
|
87
|
+
open: `[${e$1}m`,
|
|
88
|
+
close: `[${t$1}m`
|
|
89
|
+
} : g, y$1 = (e$1) => (t$1) => e$1(...p(t$1)), R$1 = (e$1, t$1) => (r, l$1, n) => w$1(`${e$1}8;2;${r};${l$1};${n}`, t$1), $ = (e$1, t$1) => (r, l$1, n) => w$1(((e$2, t$2, r$1) => d(u(e$2, t$2, r$1)))(r, l$1, n) + e$1, t$1), x$1 = (e$1) => (t$1, r, l$1) => e$1(u(t$1, r, l$1)), T$1 = R$1(3, h), v$1 = R$1(4, b), C$1 = (e$1) => w$1("38;5;" + e$1, h), E$1 = (e$1) => w$1("48;5;" + e$1, b);
|
|
90
|
+
2 === t ? (T$1 = x$1(C$1), v$1 = x$1(E$1)) : 1 === t && (T$1 = $(0, h), v$1 = $(10, b), C$1 = (e$1) => w$1(d(e$1), h), E$1 = (e$1) => w$1(d(e$1) + 10, b));
|
|
91
|
+
let M$1, I$1 = {
|
|
92
|
+
fg: C$1,
|
|
93
|
+
bg: E$1,
|
|
94
|
+
rgb: T$1,
|
|
95
|
+
bgRgb: v$1,
|
|
96
|
+
hex: y$1(T$1),
|
|
97
|
+
bgHex: y$1(v$1),
|
|
98
|
+
visible: g,
|
|
99
|
+
reset: w$1(0, 0),
|
|
100
|
+
bold: w$1(1, 22),
|
|
101
|
+
dim: w$1(2, 22),
|
|
102
|
+
italic: w$1(3, 23),
|
|
103
|
+
underline: w$1(4, 24),
|
|
104
|
+
inverse: w$1(7, 27),
|
|
105
|
+
hidden: w$1(8, 28),
|
|
106
|
+
strikethrough: w$1(9, 29)
|
|
107
|
+
}, _$1 = (e$1) => "bg" + e$1[0].toUpperCase() + e$1.slice(1), k$1 = "Bright";
|
|
108
|
+
return "black,red,green,yellow,blue,magenta,cyan,white,gray".split(",").map(((e$1, t$1) => {
|
|
109
|
+
M$1 = _$1(e$1), 8 > t$1 ? (I$1[e$1 + k$1] = w$1(90 + t$1, h), I$1[M$1 + k$1] = w$1(100 + t$1, b)) : t$1 = 60, I$1[e$1] = w$1(30 + t$1, h), I$1[M$1] = w$1(40 + t$1, b);
|
|
110
|
+
})), s.extend(I$1);
|
|
111
|
+
}();
|
|
112
|
+
module.exports = w, w.default = w;
|
|
113
|
+
}));
|
|
114
|
+
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region ../../node_modules/.pnpm/ansis@4.2.0/node_modules/ansis/index.mjs
|
|
117
|
+
var import_ansis = /* @__PURE__ */ __toESM(require_ansis(), 1);
|
|
118
|
+
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, bold, dim, italic, underline, strikethrough, black, red, green, yellow, blue, magenta, cyan, white, gray, redBright, greenBright, yellowBright, blueBright, magentaBright, cyanBright, whiteBright, bgBlack, bgRed, bgGreen, bgYellow, bgBlue, bgMagenta, bgCyan, bgWhite, bgGray, bgRedBright, bgGreenBright, bgYellowBright, bgBlueBright, bgMagentaBright, bgCyanBright, bgWhiteBright } = import_ansis.default;
|
|
119
|
+
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region ../../node_modules/.pnpm/tsdown@0.19.0-beta.5_@arethetypeswrong+core@0.18.2_@vitejs+devtools@0.0.0-alpha.24_@pnp_381121c80975625236d82ed1b131ce23/node_modules/tsdown/dist/logger-D_2uXZBG.mjs
|
|
122
|
+
const __cjs_require = createRequire(import.meta.url);
|
|
123
|
+
const picomatch = __cjs_require("./npm_entry_picomatch.cjs");
|
|
124
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
125
|
+
function toArray(val, defaultValue) {
|
|
126
|
+
if (Array.isArray(val)) return val;
|
|
127
|
+
else if (val == null) {
|
|
128
|
+
if (defaultValue) return [defaultValue];
|
|
129
|
+
return [];
|
|
130
|
+
} else return [val];
|
|
131
|
+
}
|
|
132
|
+
function resolveComma(arr) {
|
|
133
|
+
return arr.flatMap((format$1) => format$1.split(","));
|
|
134
|
+
}
|
|
135
|
+
function resolveRegex(str) {
|
|
136
|
+
if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
|
|
137
|
+
return str;
|
|
138
|
+
}
|
|
139
|
+
function slash(string) {
|
|
140
|
+
return string.replaceAll("\\", "/");
|
|
141
|
+
}
|
|
142
|
+
const noop = (v$1) => v$1;
|
|
143
|
+
function matchPattern(id, patterns) {
|
|
144
|
+
return patterns.some((pattern) => {
|
|
145
|
+
if (pattern instanceof RegExp) {
|
|
146
|
+
pattern.lastIndex = 0;
|
|
147
|
+
return pattern.test(id);
|
|
148
|
+
}
|
|
149
|
+
return id === pattern || picomatch(pattern)(id);
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function pkgExists(moduleName) {
|
|
153
|
+
try {
|
|
154
|
+
import.meta.resolve(moduleName);
|
|
155
|
+
return true;
|
|
156
|
+
} catch {}
|
|
157
|
+
return false;
|
|
158
|
+
}
|
|
159
|
+
async function importWithError(moduleName, resolvePaths) {
|
|
160
|
+
let resolved;
|
|
161
|
+
if (resolvePaths) resolved = pathToFileURL(__require.resolve(moduleName, { paths: resolvePaths })).href;
|
|
162
|
+
try {
|
|
163
|
+
return await import(resolved || moduleName);
|
|
164
|
+
} catch (error) {
|
|
165
|
+
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
function promiseWithResolvers() {
|
|
169
|
+
let resolve$1;
|
|
170
|
+
return {
|
|
171
|
+
promise: new Promise((res) => {
|
|
172
|
+
resolve$1 = res;
|
|
173
|
+
}),
|
|
174
|
+
resolve: resolve$1
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
const LogLevels = {
|
|
178
|
+
silent: 0,
|
|
179
|
+
error: 1,
|
|
180
|
+
warn: 2,
|
|
181
|
+
info: 3
|
|
182
|
+
};
|
|
183
|
+
function format(msgs) {
|
|
184
|
+
return msgs.filter((arg) => arg !== void 0 && arg !== false).join(" ");
|
|
185
|
+
}
|
|
186
|
+
const warnedMessages = /* @__PURE__ */ new Set();
|
|
187
|
+
function createLogger(level = "info", { customLogger, console = globalThis.console, failOnWarn = false } = {}) {
|
|
188
|
+
if (customLogger) return customLogger;
|
|
189
|
+
function output(type, msg) {
|
|
190
|
+
if (LogLevels[logger.level] < LogLevels[type]) return;
|
|
191
|
+
console[type === "info" ? "log" : type](msg);
|
|
192
|
+
}
|
|
193
|
+
const logger = {
|
|
194
|
+
level,
|
|
195
|
+
info(...msgs) {
|
|
196
|
+
output("info", `${blue`ℹ`} ${format(msgs)}`);
|
|
197
|
+
},
|
|
198
|
+
warn(...msgs) {
|
|
199
|
+
if (failOnWarn) return this.error(...msgs);
|
|
200
|
+
const message = format(msgs);
|
|
201
|
+
warnedMessages.add(message);
|
|
202
|
+
output("warn", `\n${bgYellow` WARN `} ${message}\n`);
|
|
203
|
+
},
|
|
204
|
+
warnOnce(...msgs) {
|
|
205
|
+
const message = format(msgs);
|
|
206
|
+
if (warnedMessages.has(message)) return;
|
|
207
|
+
if (failOnWarn) return this.error(...msgs);
|
|
208
|
+
warnedMessages.add(message);
|
|
209
|
+
output("warn", `\n${bgYellow` WARN `} ${message}\n`);
|
|
210
|
+
},
|
|
211
|
+
error(...msgs) {
|
|
212
|
+
output("error", `\n${bgRed` ERROR `} ${format(msgs)}\n`);
|
|
213
|
+
process$1.exitCode = 1;
|
|
214
|
+
},
|
|
215
|
+
success(...msgs) {
|
|
216
|
+
output("info", `${green`✔`} ${format(msgs)}`);
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
return logger;
|
|
220
|
+
}
|
|
221
|
+
const globalLogger = createLogger();
|
|
222
|
+
function getNameLabel(ansis, name) {
|
|
223
|
+
if (!name) return void 0;
|
|
224
|
+
return ansis(`[${name}]`);
|
|
225
|
+
}
|
|
226
|
+
function prettyFormat(format$1) {
|
|
227
|
+
const formatColor = format$1 === "es" ? blue : format$1 === "cjs" ? yellow : noop;
|
|
228
|
+
let formatText;
|
|
229
|
+
switch (format$1) {
|
|
230
|
+
case "es":
|
|
231
|
+
formatText = "ESM";
|
|
232
|
+
break;
|
|
233
|
+
default:
|
|
234
|
+
formatText = format$1.toUpperCase();
|
|
235
|
+
break;
|
|
236
|
+
}
|
|
237
|
+
return formatColor(`[${formatText}]`);
|
|
238
|
+
}
|
|
239
|
+
const colors = /* @__PURE__ */ new Map();
|
|
240
|
+
function generateColor(name = "default") {
|
|
241
|
+
if (colors.has(name)) return colors.get(name);
|
|
242
|
+
let color;
|
|
243
|
+
if (name === "default") color = blue;
|
|
244
|
+
else {
|
|
245
|
+
let hash = 0;
|
|
246
|
+
for (let i = 0; i < name.length; i++) hash = name.charCodeAt(i) + ((hash << 5) - hash);
|
|
247
|
+
color = rgb(...hslToRgb(hash % 360, 35, 55));
|
|
248
|
+
}
|
|
249
|
+
colors.set(name, color);
|
|
250
|
+
return color;
|
|
251
|
+
}
|
|
252
|
+
function hslToRgb(h$1, s, l$1) {
|
|
253
|
+
h$1 = h$1 % 360;
|
|
254
|
+
h$1 /= 360;
|
|
255
|
+
s /= 100;
|
|
256
|
+
l$1 /= 100;
|
|
257
|
+
let r, g$1, b$1;
|
|
258
|
+
if (s === 0) r = g$1 = b$1 = l$1;
|
|
259
|
+
else {
|
|
260
|
+
const q$1 = l$1 < .5 ? l$1 * (1 + s) : l$1 + s - l$1 * s;
|
|
261
|
+
const p$1 = 2 * l$1 - q$1;
|
|
262
|
+
r = hue2rgb(p$1, q$1, h$1 + 1 / 3);
|
|
263
|
+
g$1 = hue2rgb(p$1, q$1, h$1);
|
|
264
|
+
b$1 = hue2rgb(p$1, q$1, h$1 - 1 / 3);
|
|
265
|
+
}
|
|
266
|
+
return [
|
|
267
|
+
Math.max(0, Math.round(r * 255)),
|
|
268
|
+
Math.max(0, Math.round(g$1 * 255)),
|
|
269
|
+
Math.max(0, Math.round(b$1 * 255))
|
|
270
|
+
];
|
|
271
|
+
}
|
|
272
|
+
function hue2rgb(p$1, q$1, t) {
|
|
273
|
+
if (t < 0) t += 1;
|
|
274
|
+
if (t > 1) t -= 1;
|
|
275
|
+
if (t < 1 / 6) return p$1 + (q$1 - p$1) * 6 * t;
|
|
276
|
+
if (t < 1 / 2) return q$1;
|
|
277
|
+
if (t < 2 / 3) return p$1 + (q$1 - p$1) * (2 / 3 - t) * 6;
|
|
278
|
+
return p$1;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
//#endregion
|
|
282
|
+
//#region ../../node_modules/.pnpm/tsdown@0.19.0-beta.5_@arethetypeswrong+core@0.18.2_@vitejs+devtools@0.0.0-alpha.24_@pnp_381121c80975625236d82ed1b131ce23/node_modules/tsdown/dist/package-C6IsJEnG.mjs
|
|
283
|
+
var version = "0.19.0-beta.5";
|
|
284
|
+
|
|
285
|
+
//#endregion
|
|
286
|
+
//#region ../../node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.js
|
|
287
|
+
var l = Object.create;
|
|
288
|
+
var u = Object.defineProperty;
|
|
289
|
+
var d = Object.getOwnPropertyDescriptor;
|
|
290
|
+
var f = Object.getOwnPropertyNames;
|
|
291
|
+
var p = Object.getPrototypeOf;
|
|
292
|
+
var m = Object.prototype.hasOwnProperty;
|
|
293
|
+
var h = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports);
|
|
294
|
+
var g = (e, t, n, r) => {
|
|
295
|
+
if (t && typeof t === "object" || typeof t === "function") for (var i = f(t), a$1 = 0, o = i.length, s; a$1 < o; a$1++) {
|
|
296
|
+
s = i[a$1];
|
|
297
|
+
if (!m.call(e, s) && s !== n) u(e, s, {
|
|
298
|
+
get: ((e$1) => t[e$1]).bind(null, s),
|
|
299
|
+
enumerable: !(r = d(t, s)) || r.enumerable
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
return e;
|
|
303
|
+
};
|
|
304
|
+
var _ = (e, t, n) => (n = e != null ? l(p(e)) : {}, g(t || !e || !e.__esModule ? u(n, "default", {
|
|
305
|
+
value: e,
|
|
306
|
+
enumerable: true
|
|
307
|
+
}) : n, e));
|
|
308
|
+
var v = /* @__PURE__ */ createRequire$1(import.meta.url);
|
|
309
|
+
const y = /^path$/i;
|
|
310
|
+
const b = {
|
|
311
|
+
key: "PATH",
|
|
312
|
+
value: ""
|
|
313
|
+
};
|
|
314
|
+
function x(e) {
|
|
315
|
+
for (const t in e) {
|
|
316
|
+
if (!Object.prototype.hasOwnProperty.call(e, t) || !y.test(t)) continue;
|
|
317
|
+
const n = e[t];
|
|
318
|
+
if (!n) return b;
|
|
319
|
+
return {
|
|
320
|
+
key: t,
|
|
321
|
+
value: n
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
return b;
|
|
325
|
+
}
|
|
326
|
+
function S(e, t) {
|
|
327
|
+
const i = t.value.split(delimiter);
|
|
328
|
+
let o = e;
|
|
329
|
+
let s;
|
|
330
|
+
do {
|
|
331
|
+
i.push(resolve(o, "node_modules", ".bin"));
|
|
332
|
+
s = o;
|
|
333
|
+
o = dirname(o);
|
|
334
|
+
} while (o !== s);
|
|
335
|
+
return {
|
|
336
|
+
key: t.key,
|
|
337
|
+
value: i.join(delimiter)
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
function C(e, t) {
|
|
341
|
+
const n = {
|
|
342
|
+
...process.env,
|
|
343
|
+
...t
|
|
344
|
+
};
|
|
345
|
+
const r = S(e, x(n));
|
|
346
|
+
n[r.key] = r.value;
|
|
347
|
+
return n;
|
|
348
|
+
}
|
|
349
|
+
const w = (e) => {
|
|
350
|
+
let t = e.length;
|
|
351
|
+
const n = new PassThrough();
|
|
352
|
+
const r = () => {
|
|
353
|
+
if (--t === 0) n.emit("end");
|
|
354
|
+
};
|
|
355
|
+
for (const t$1 of e) {
|
|
356
|
+
t$1.pipe(n, { end: false });
|
|
357
|
+
t$1.on("end", r);
|
|
358
|
+
}
|
|
359
|
+
return n;
|
|
360
|
+
};
|
|
361
|
+
var T = h((exports, t) => {
|
|
362
|
+
t.exports = a$1;
|
|
363
|
+
a$1.sync = o;
|
|
364
|
+
var n = v("fs");
|
|
365
|
+
function r(e, t$1) {
|
|
366
|
+
var n$1 = t$1.pathExt !== void 0 ? t$1.pathExt : process.env.PATHEXT;
|
|
367
|
+
if (!n$1) return true;
|
|
368
|
+
n$1 = n$1.split(";");
|
|
369
|
+
if (n$1.indexOf("") !== -1) return true;
|
|
370
|
+
for (var r$1 = 0; r$1 < n$1.length; r$1++) {
|
|
371
|
+
var i$1 = n$1[r$1].toLowerCase();
|
|
372
|
+
if (i$1 && e.substr(-i$1.length).toLowerCase() === i$1) return true;
|
|
373
|
+
}
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
function i(e, t$1, n$1) {
|
|
377
|
+
if (!e.isSymbolicLink() && !e.isFile()) return false;
|
|
378
|
+
return r(t$1, n$1);
|
|
379
|
+
}
|
|
380
|
+
function a$1(e, t$1, r$1) {
|
|
381
|
+
n.stat(e, function(n$1, a$2) {
|
|
382
|
+
r$1(n$1, n$1 ? false : i(a$2, e, t$1));
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
function o(e, t$1) {
|
|
386
|
+
return i(n.statSync(e), e, t$1);
|
|
387
|
+
}
|
|
388
|
+
});
|
|
389
|
+
var E = h((exports, t) => {
|
|
390
|
+
t.exports = r;
|
|
391
|
+
r.sync = i;
|
|
392
|
+
var n = v("fs");
|
|
393
|
+
function r(e, t$1, r$1) {
|
|
394
|
+
n.stat(e, function(e$1, n$1) {
|
|
395
|
+
r$1(e$1, e$1 ? false : a$1(n$1, t$1));
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
function i(e, t$1) {
|
|
399
|
+
return a$1(n.statSync(e), t$1);
|
|
400
|
+
}
|
|
401
|
+
function a$1(e, t$1) {
|
|
402
|
+
return e.isFile() && o(e, t$1);
|
|
403
|
+
}
|
|
404
|
+
function o(e, t$1) {
|
|
405
|
+
var n$1 = e.mode;
|
|
406
|
+
var r$1 = e.uid;
|
|
407
|
+
var i$1 = e.gid;
|
|
408
|
+
var a$2 = t$1.uid !== void 0 ? t$1.uid : process.getuid && process.getuid();
|
|
409
|
+
var o$1 = t$1.gid !== void 0 ? t$1.gid : process.getgid && process.getgid();
|
|
410
|
+
var s = parseInt("100", 8);
|
|
411
|
+
var c = parseInt("010", 8);
|
|
412
|
+
var l = parseInt("001", 8);
|
|
413
|
+
var u = s | c;
|
|
414
|
+
return n$1 & l || n$1 & c && i$1 === o$1 || n$1 & s && r$1 === a$2 || n$1 & u && a$2 === 0;
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
var D = h((exports, t) => {
|
|
418
|
+
v("fs");
|
|
419
|
+
var r;
|
|
420
|
+
if (process.platform === "win32" || global.TESTING_WINDOWS) r = T();
|
|
421
|
+
else r = E();
|
|
422
|
+
t.exports = i;
|
|
423
|
+
i.sync = a$1;
|
|
424
|
+
function i(e, t$1, n) {
|
|
425
|
+
if (typeof t$1 === "function") {
|
|
426
|
+
n = t$1;
|
|
427
|
+
t$1 = {};
|
|
428
|
+
}
|
|
429
|
+
if (!n) {
|
|
430
|
+
if (typeof Promise !== "function") throw new TypeError("callback not provided");
|
|
431
|
+
return new Promise(function(n$1, r$1) {
|
|
432
|
+
i(e, t$1 || {}, function(e$1, t$2) {
|
|
433
|
+
if (e$1) r$1(e$1);
|
|
434
|
+
else n$1(t$2);
|
|
435
|
+
});
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
r(e, t$1 || {}, function(e$1, r$1) {
|
|
439
|
+
if (e$1) {
|
|
440
|
+
if (e$1.code === "EACCES" || t$1 && t$1.ignoreErrors) {
|
|
441
|
+
e$1 = null;
|
|
442
|
+
r$1 = false;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
n(e$1, r$1);
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
function a$1(e, t$1) {
|
|
449
|
+
try {
|
|
450
|
+
return r.sync(e, t$1 || {});
|
|
451
|
+
} catch (e$1) {
|
|
452
|
+
if (t$1 && t$1.ignoreErrors || e$1.code === "EACCES") return false;
|
|
453
|
+
else throw e$1;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
var O = h((exports, t) => {
|
|
458
|
+
const n = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
459
|
+
const r = v("path");
|
|
460
|
+
const i = n ? ";" : ":";
|
|
461
|
+
const a$1 = D();
|
|
462
|
+
const o = (e) => Object.assign(/* @__PURE__ */ new Error(`not found: ${e}`), { code: "ENOENT" });
|
|
463
|
+
const s = (e, t$1) => {
|
|
464
|
+
const r$1 = t$1.colon || i;
|
|
465
|
+
const a$2 = e.match(/\//) || n && e.match(/\\/) ? [""] : [...n ? [process.cwd()] : [], ...(t$1.path || process.env.PATH || "").split(r$1)];
|
|
466
|
+
const o$1 = n ? t$1.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
467
|
+
const s$1 = n ? o$1.split(r$1) : [""];
|
|
468
|
+
if (n) {
|
|
469
|
+
if (e.indexOf(".") !== -1 && s$1[0] !== "") s$1.unshift("");
|
|
470
|
+
}
|
|
471
|
+
return {
|
|
472
|
+
pathEnv: a$2,
|
|
473
|
+
pathExt: s$1,
|
|
474
|
+
pathExtExe: o$1
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
const c = (e, t$1, n$1) => {
|
|
478
|
+
if (typeof t$1 === "function") {
|
|
479
|
+
n$1 = t$1;
|
|
480
|
+
t$1 = {};
|
|
481
|
+
}
|
|
482
|
+
if (!t$1) t$1 = {};
|
|
483
|
+
const { pathEnv: i$1, pathExt: c$1, pathExtExe: l$1 } = s(e, t$1);
|
|
484
|
+
const u = [];
|
|
485
|
+
const d = (n$2) => new Promise((a$2, s$1) => {
|
|
486
|
+
if (n$2 === i$1.length) return t$1.all && u.length ? a$2(u) : s$1(o(e));
|
|
487
|
+
const c$2 = i$1[n$2];
|
|
488
|
+
const l$2 = /^".*"$/.test(c$2) ? c$2.slice(1, -1) : c$2;
|
|
489
|
+
const d$1 = r.join(l$2, e);
|
|
490
|
+
a$2(f(!l$2 && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d$1 : d$1, n$2, 0));
|
|
491
|
+
});
|
|
492
|
+
const f = (e$1, n$2, r$1) => new Promise((i$2, o$1) => {
|
|
493
|
+
if (r$1 === c$1.length) return i$2(d(n$2 + 1));
|
|
494
|
+
const s$1 = c$1[r$1];
|
|
495
|
+
a$1(e$1 + s$1, { pathExt: l$1 }, (a$2, o$2) => {
|
|
496
|
+
if (!a$2 && o$2) if (t$1.all) u.push(e$1 + s$1);
|
|
497
|
+
else return i$2(e$1 + s$1);
|
|
498
|
+
return i$2(f(e$1, n$2, r$1 + 1));
|
|
499
|
+
});
|
|
500
|
+
});
|
|
501
|
+
return n$1 ? d(0).then((e$1) => n$1(null, e$1), n$1) : d(0);
|
|
502
|
+
};
|
|
503
|
+
const l = (e, t$1) => {
|
|
504
|
+
t$1 = t$1 || {};
|
|
505
|
+
const { pathEnv: n$1, pathExt: i$1, pathExtExe: c$1 } = s(e, t$1);
|
|
506
|
+
const l$1 = [];
|
|
507
|
+
for (let o$1 = 0; o$1 < n$1.length; o$1++) {
|
|
508
|
+
const s$1 = n$1[o$1];
|
|
509
|
+
const u = /^".*"$/.test(s$1) ? s$1.slice(1, -1) : s$1;
|
|
510
|
+
const d = r.join(u, e);
|
|
511
|
+
const f = !u && /^\.[\\\/]/.test(e) ? e.slice(0, 2) + d : d;
|
|
512
|
+
for (let e$1 = 0; e$1 < i$1.length; e$1++) {
|
|
513
|
+
const n$2 = f + i$1[e$1];
|
|
514
|
+
try {
|
|
515
|
+
if (a$1.sync(n$2, { pathExt: c$1 })) if (t$1.all) l$1.push(n$2);
|
|
516
|
+
else return n$2;
|
|
517
|
+
} catch (e$2) {}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
if (t$1.all && l$1.length) return l$1;
|
|
521
|
+
if (t$1.nothrow) return null;
|
|
522
|
+
throw o(e);
|
|
523
|
+
};
|
|
524
|
+
t.exports = c;
|
|
525
|
+
c.sync = l;
|
|
526
|
+
});
|
|
527
|
+
var k = h((exports, t) => {
|
|
528
|
+
const n = (e = {}) => {
|
|
529
|
+
const t$1 = e.env || process.env;
|
|
530
|
+
if ((e.platform || process.platform) !== "win32") return "PATH";
|
|
531
|
+
return Object.keys(t$1).reverse().find((e$1) => e$1.toUpperCase() === "PATH") || "Path";
|
|
532
|
+
};
|
|
533
|
+
t.exports = n;
|
|
534
|
+
t.exports.default = n;
|
|
535
|
+
});
|
|
536
|
+
var A = h((exports, t) => {
|
|
537
|
+
const n = v("path");
|
|
538
|
+
const r = O();
|
|
539
|
+
const i = k();
|
|
540
|
+
function a$1(e, t$1) {
|
|
541
|
+
const a$2 = e.options.env || process.env;
|
|
542
|
+
const o$1 = process.cwd();
|
|
543
|
+
const s = e.options.cwd != null;
|
|
544
|
+
const c = s && process.chdir !== void 0 && !process.chdir.disabled;
|
|
545
|
+
if (c) try {
|
|
546
|
+
process.chdir(e.options.cwd);
|
|
547
|
+
} catch (e$1) {}
|
|
548
|
+
let l;
|
|
549
|
+
try {
|
|
550
|
+
l = r.sync(e.command, {
|
|
551
|
+
path: a$2[i({ env: a$2 })],
|
|
552
|
+
pathExt: t$1 ? n.delimiter : void 0
|
|
553
|
+
});
|
|
554
|
+
} catch (e$1) {} finally {
|
|
555
|
+
if (c) process.chdir(o$1);
|
|
556
|
+
}
|
|
557
|
+
if (l) l = n.resolve(s ? e.options.cwd : "", l);
|
|
558
|
+
return l;
|
|
559
|
+
}
|
|
560
|
+
function o(e) {
|
|
561
|
+
return a$1(e) || a$1(e, true);
|
|
562
|
+
}
|
|
563
|
+
t.exports = o;
|
|
564
|
+
});
|
|
565
|
+
var j = h((exports, t) => {
|
|
566
|
+
const n = /([()\][%!^"`<>&|;, *?])/g;
|
|
567
|
+
function r(e) {
|
|
568
|
+
e = e.replace(n, "^$1");
|
|
569
|
+
return e;
|
|
570
|
+
}
|
|
571
|
+
function i(e, t$1) {
|
|
572
|
+
e = `${e}`;
|
|
573
|
+
e = e.replace(/(\\*)"/g, "$1$1\\\"");
|
|
574
|
+
e = e.replace(/(\\*)$/, "$1$1");
|
|
575
|
+
e = `"${e}"`;
|
|
576
|
+
e = e.replace(n, "^$1");
|
|
577
|
+
if (t$1) e = e.replace(n, "^$1");
|
|
578
|
+
return e;
|
|
579
|
+
}
|
|
580
|
+
t.exports.command = r;
|
|
581
|
+
t.exports.argument = i;
|
|
582
|
+
});
|
|
583
|
+
var M = h((exports, t) => {
|
|
584
|
+
t.exports = /^#!(.*)/;
|
|
585
|
+
});
|
|
586
|
+
var N = h((exports, t) => {
|
|
587
|
+
const n = M();
|
|
588
|
+
t.exports = (e = "") => {
|
|
589
|
+
const t$1 = e.match(n);
|
|
590
|
+
if (!t$1) return null;
|
|
591
|
+
const [r, i] = t$1[0].replace(/#! ?/, "").split(" ");
|
|
592
|
+
const a$1 = r.split("/").pop();
|
|
593
|
+
if (a$1 === "env") return i;
|
|
594
|
+
return i ? `${a$1} ${i}` : a$1;
|
|
595
|
+
};
|
|
596
|
+
});
|
|
597
|
+
var P = h((exports, t) => {
|
|
598
|
+
const n = v("fs");
|
|
599
|
+
const r = N();
|
|
600
|
+
function i(e) {
|
|
601
|
+
const t$1 = 150;
|
|
602
|
+
const i$1 = Buffer.alloc(t$1);
|
|
603
|
+
let a$1;
|
|
604
|
+
try {
|
|
605
|
+
a$1 = n.openSync(e, "r");
|
|
606
|
+
n.readSync(a$1, i$1, 0, t$1, 0);
|
|
607
|
+
n.closeSync(a$1);
|
|
608
|
+
} catch (e$1) {}
|
|
609
|
+
return r(i$1.toString());
|
|
610
|
+
}
|
|
611
|
+
t.exports = i;
|
|
612
|
+
});
|
|
613
|
+
var F = h((exports, t) => {
|
|
614
|
+
const n = v("path");
|
|
615
|
+
const r = A();
|
|
616
|
+
const i = j();
|
|
617
|
+
const a$1 = P();
|
|
618
|
+
const o = process.platform === "win32";
|
|
619
|
+
const s = /\.(?:com|exe)$/i;
|
|
620
|
+
const c = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
|
|
621
|
+
function l(e) {
|
|
622
|
+
e.file = r(e);
|
|
623
|
+
const t$1 = e.file && a$1(e.file);
|
|
624
|
+
if (t$1) {
|
|
625
|
+
e.args.unshift(e.file);
|
|
626
|
+
e.command = t$1;
|
|
627
|
+
return r(e);
|
|
628
|
+
}
|
|
629
|
+
return e.file;
|
|
630
|
+
}
|
|
631
|
+
function u(e) {
|
|
632
|
+
if (!o) return e;
|
|
633
|
+
const t$1 = l(e);
|
|
634
|
+
const r$1 = !s.test(t$1);
|
|
635
|
+
if (e.options.forceShell || r$1) {
|
|
636
|
+
const r$2 = c.test(t$1);
|
|
637
|
+
e.command = n.normalize(e.command);
|
|
638
|
+
e.command = i.command(e.command);
|
|
639
|
+
e.args = e.args.map((e$1) => i.argument(e$1, r$2));
|
|
640
|
+
e.args = [
|
|
641
|
+
"/d",
|
|
642
|
+
"/s",
|
|
643
|
+
"/c",
|
|
644
|
+
`"${[e.command].concat(e.args).join(" ")}"`
|
|
645
|
+
];
|
|
646
|
+
e.command = process.env.comspec || "cmd.exe";
|
|
647
|
+
e.options.windowsVerbatimArguments = true;
|
|
648
|
+
}
|
|
649
|
+
return e;
|
|
650
|
+
}
|
|
651
|
+
function d(e, t$1, n$1) {
|
|
652
|
+
if (t$1 && !Array.isArray(t$1)) {
|
|
653
|
+
n$1 = t$1;
|
|
654
|
+
t$1 = null;
|
|
655
|
+
}
|
|
656
|
+
t$1 = t$1 ? t$1.slice(0) : [];
|
|
657
|
+
n$1 = Object.assign({}, n$1);
|
|
658
|
+
const r$1 = {
|
|
659
|
+
command: e,
|
|
660
|
+
args: t$1,
|
|
661
|
+
options: n$1,
|
|
662
|
+
file: void 0,
|
|
663
|
+
original: {
|
|
664
|
+
command: e,
|
|
665
|
+
args: t$1
|
|
666
|
+
}
|
|
667
|
+
};
|
|
668
|
+
return n$1.shell ? r$1 : u(r$1);
|
|
669
|
+
}
|
|
670
|
+
t.exports = d;
|
|
671
|
+
});
|
|
672
|
+
var I = h((exports, t) => {
|
|
673
|
+
const n = process.platform === "win32";
|
|
674
|
+
function r(e, t$1) {
|
|
675
|
+
return Object.assign(/* @__PURE__ */ new Error(`${t$1} ${e.command} ENOENT`), {
|
|
676
|
+
code: "ENOENT",
|
|
677
|
+
errno: "ENOENT",
|
|
678
|
+
syscall: `${t$1} ${e.command}`,
|
|
679
|
+
path: e.command,
|
|
680
|
+
spawnargs: e.args
|
|
681
|
+
});
|
|
682
|
+
}
|
|
683
|
+
function i(e, t$1) {
|
|
684
|
+
if (!n) return;
|
|
685
|
+
const r$1 = e.emit;
|
|
686
|
+
e.emit = function(n$1, i$1) {
|
|
687
|
+
if (n$1 === "exit") {
|
|
688
|
+
const n$2 = a$1(i$1, t$1, "spawn");
|
|
689
|
+
if (n$2) return r$1.call(e, "error", n$2);
|
|
690
|
+
}
|
|
691
|
+
return r$1.apply(e, arguments);
|
|
692
|
+
};
|
|
693
|
+
}
|
|
694
|
+
function a$1(e, t$1) {
|
|
695
|
+
if (n && e === 1 && !t$1.file) return r(t$1.original, "spawn");
|
|
696
|
+
return null;
|
|
697
|
+
}
|
|
698
|
+
function o(e, t$1) {
|
|
699
|
+
if (n && e === 1 && !t$1.file) return r(t$1.original, "spawnSync");
|
|
700
|
+
return null;
|
|
701
|
+
}
|
|
702
|
+
t.exports = {
|
|
703
|
+
hookChildProcess: i,
|
|
704
|
+
verifyENOENT: a$1,
|
|
705
|
+
verifyENOENTSync: o,
|
|
706
|
+
notFoundError: r
|
|
707
|
+
};
|
|
708
|
+
});
|
|
709
|
+
var R = _(h((exports, t) => {
|
|
710
|
+
const n = v("child_process");
|
|
711
|
+
const r = F();
|
|
712
|
+
const i = I();
|
|
713
|
+
function a$1(e, t$1, a$2) {
|
|
714
|
+
const o$1 = r(e, t$1, a$2);
|
|
715
|
+
const s = n.spawn(o$1.command, o$1.args, o$1.options);
|
|
716
|
+
i.hookChildProcess(s, o$1);
|
|
717
|
+
return s;
|
|
718
|
+
}
|
|
719
|
+
function o(e, t$1, a$2) {
|
|
720
|
+
const o$1 = r(e, t$1, a$2);
|
|
721
|
+
const s = n.spawnSync(o$1.command, o$1.args, o$1.options);
|
|
722
|
+
s.error = s.error || i.verifyENOENTSync(s.status, o$1);
|
|
723
|
+
return s;
|
|
724
|
+
}
|
|
725
|
+
t.exports = a$1;
|
|
726
|
+
t.exports.spawn = a$1;
|
|
727
|
+
t.exports.sync = o;
|
|
728
|
+
t.exports._parse = r;
|
|
729
|
+
t.exports._enoent = i;
|
|
730
|
+
})(), 1);
|
|
731
|
+
var z = class extends Error {
|
|
732
|
+
result;
|
|
733
|
+
output;
|
|
734
|
+
get exitCode() {
|
|
735
|
+
if (this.result.exitCode !== null) return this.result.exitCode;
|
|
736
|
+
}
|
|
737
|
+
constructor(e, t) {
|
|
738
|
+
super(`Process exited with non-zero status (${e.exitCode})`);
|
|
739
|
+
this.result = e;
|
|
740
|
+
this.output = t;
|
|
741
|
+
}
|
|
742
|
+
};
|
|
743
|
+
const B = {
|
|
744
|
+
timeout: void 0,
|
|
745
|
+
persist: false
|
|
746
|
+
};
|
|
747
|
+
const V = { windowsHide: true };
|
|
748
|
+
function H(e, t) {
|
|
749
|
+
return {
|
|
750
|
+
command: normalize(e),
|
|
751
|
+
args: t ?? []
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
function U(e) {
|
|
755
|
+
const t = new AbortController();
|
|
756
|
+
for (const n of e) {
|
|
757
|
+
if (n.aborted) {
|
|
758
|
+
t.abort();
|
|
759
|
+
return n;
|
|
760
|
+
}
|
|
761
|
+
const e$1 = () => {
|
|
762
|
+
t.abort(n.reason);
|
|
763
|
+
};
|
|
764
|
+
n.addEventListener("abort", e$1, { signal: t.signal });
|
|
765
|
+
}
|
|
766
|
+
return t.signal;
|
|
767
|
+
}
|
|
768
|
+
async function W(e) {
|
|
769
|
+
let t = "";
|
|
770
|
+
for await (const n of e) t += n.toString();
|
|
771
|
+
return t;
|
|
772
|
+
}
|
|
773
|
+
var G = class {
|
|
774
|
+
_process;
|
|
775
|
+
_aborted = false;
|
|
776
|
+
_options;
|
|
777
|
+
_command;
|
|
778
|
+
_args;
|
|
779
|
+
_resolveClose;
|
|
780
|
+
_processClosed;
|
|
781
|
+
_thrownError;
|
|
782
|
+
get process() {
|
|
783
|
+
return this._process;
|
|
784
|
+
}
|
|
785
|
+
get pid() {
|
|
786
|
+
return this._process?.pid;
|
|
787
|
+
}
|
|
788
|
+
get exitCode() {
|
|
789
|
+
if (this._process && this._process.exitCode !== null) return this._process.exitCode;
|
|
790
|
+
}
|
|
791
|
+
constructor(e, t, n) {
|
|
792
|
+
this._options = {
|
|
793
|
+
...B,
|
|
794
|
+
...n
|
|
795
|
+
};
|
|
796
|
+
this._command = e;
|
|
797
|
+
this._args = t ?? [];
|
|
798
|
+
this._processClosed = new Promise((e$1) => {
|
|
799
|
+
this._resolveClose = e$1;
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
kill(e) {
|
|
803
|
+
return this._process?.kill(e) === true;
|
|
804
|
+
}
|
|
805
|
+
get aborted() {
|
|
806
|
+
return this._aborted;
|
|
807
|
+
}
|
|
808
|
+
get killed() {
|
|
809
|
+
return this._process?.killed === true;
|
|
810
|
+
}
|
|
811
|
+
pipe(e, t, n) {
|
|
812
|
+
return q(e, t, {
|
|
813
|
+
...n,
|
|
814
|
+
stdin: this
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
async *[Symbol.asyncIterator]() {
|
|
818
|
+
const e = this._process;
|
|
819
|
+
if (!e) return;
|
|
820
|
+
const t = [];
|
|
821
|
+
if (this._streamErr) t.push(this._streamErr);
|
|
822
|
+
if (this._streamOut) t.push(this._streamOut);
|
|
823
|
+
const n = w(t);
|
|
824
|
+
const r = readline.createInterface({ input: n });
|
|
825
|
+
for await (const e$1 of r) yield e$1.toString();
|
|
826
|
+
await this._processClosed;
|
|
827
|
+
e.removeAllListeners();
|
|
828
|
+
if (this._thrownError) throw this._thrownError;
|
|
829
|
+
if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z(this);
|
|
830
|
+
}
|
|
831
|
+
async _waitForOutput() {
|
|
832
|
+
const e = this._process;
|
|
833
|
+
if (!e) throw new Error("No process was started");
|
|
834
|
+
const [t, n] = await Promise.all([this._streamOut ? W(this._streamOut) : "", this._streamErr ? W(this._streamErr) : ""]);
|
|
835
|
+
await this._processClosed;
|
|
836
|
+
if (this._options?.stdin) await this._options.stdin;
|
|
837
|
+
e.removeAllListeners();
|
|
838
|
+
if (this._thrownError) throw this._thrownError;
|
|
839
|
+
const r = {
|
|
840
|
+
stderr: n,
|
|
841
|
+
stdout: t,
|
|
842
|
+
exitCode: this.exitCode
|
|
843
|
+
};
|
|
844
|
+
if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new z(this, r);
|
|
845
|
+
return r;
|
|
846
|
+
}
|
|
847
|
+
then(e, t) {
|
|
848
|
+
return this._waitForOutput().then(e, t);
|
|
849
|
+
}
|
|
850
|
+
_streamOut;
|
|
851
|
+
_streamErr;
|
|
852
|
+
spawn() {
|
|
853
|
+
const e = cwd();
|
|
854
|
+
const n = this._options;
|
|
855
|
+
const r = {
|
|
856
|
+
...V,
|
|
857
|
+
...n.nodeOptions
|
|
858
|
+
};
|
|
859
|
+
const i = [];
|
|
860
|
+
this._resetState();
|
|
861
|
+
if (n.timeout !== void 0) i.push(AbortSignal.timeout(n.timeout));
|
|
862
|
+
if (n.signal !== void 0) i.push(n.signal);
|
|
863
|
+
if (n.persist === true) r.detached = true;
|
|
864
|
+
if (i.length > 0) r.signal = U(i);
|
|
865
|
+
r.env = C(e, r.env);
|
|
866
|
+
const { command: a$1, args: s } = H(this._command, this._args);
|
|
867
|
+
const c = (0, R._parse)(a$1, s, r);
|
|
868
|
+
const l = spawn(c.command, c.args, c.options);
|
|
869
|
+
if (l.stderr) this._streamErr = l.stderr;
|
|
870
|
+
if (l.stdout) this._streamOut = l.stdout;
|
|
871
|
+
this._process = l;
|
|
872
|
+
l.once("error", this._onError);
|
|
873
|
+
l.once("close", this._onClose);
|
|
874
|
+
if (n.stdin !== void 0 && l.stdin && n.stdin.process) {
|
|
875
|
+
const { stdout: e$1 } = n.stdin.process;
|
|
876
|
+
if (e$1) e$1.pipe(l.stdin);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
_resetState() {
|
|
880
|
+
this._aborted = false;
|
|
881
|
+
this._processClosed = new Promise((e) => {
|
|
882
|
+
this._resolveClose = e;
|
|
883
|
+
});
|
|
884
|
+
this._thrownError = void 0;
|
|
885
|
+
}
|
|
886
|
+
_onError = (e) => {
|
|
887
|
+
if (e.name === "AbortError" && (!(e.cause instanceof Error) || e.cause.name !== "TimeoutError")) {
|
|
888
|
+
this._aborted = true;
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
891
|
+
this._thrownError = e;
|
|
892
|
+
};
|
|
893
|
+
_onClose = () => {
|
|
894
|
+
if (this._resolveClose) this._resolveClose();
|
|
895
|
+
};
|
|
896
|
+
};
|
|
897
|
+
const K = (e, t, n) => {
|
|
898
|
+
const r = new G(e, t, n);
|
|
899
|
+
r.spawn();
|
|
900
|
+
return r;
|
|
901
|
+
};
|
|
902
|
+
const q = K;
|
|
903
|
+
|
|
904
|
+
//#endregion
|
|
905
|
+
export { underline as C, green as S, slash as _, createLogger as a, bold as b, globalLogger as c, noop as d, pkgExists as f, resolveRegex as g, resolveComma as h, LogLevels as i, importWithError as l, promiseWithResolvers as m, q as n, generateColor as o, prettyFormat as p, version as r, getNameLabel as s, K as t, matchPattern as u, toArray as v, dim as x, blue as y };
|