@voidzero-dev/vite-plus-core 0.0.0-4d2367587d11c412d283847253d95e4e36ace419

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