@voidzero-dev/vite-plus-core 0.0.0-0bfcc90f.20260209-0731

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