@voidzero-dev/vite-plus-core 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +175 -30
- package/dist/rolldown/cli.mjs +25 -14
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +15 -5
- package/dist/rolldown/experimental-index.mjs +23 -17
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +2 -2
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +5 -4
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +1 -1
- package/dist/rolldown/plugins-index.d.mts +3 -3
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-DgGsNpT9.d.mts → binding-B1q9aYT-.d.mts} +65 -142
- package/dist/rolldown/shared/{binding-CfwqjDbP.mjs → binding-BmkJW3Wy.mjs} +39 -35
- package/dist/rolldown/shared/{bindingify-input-options--chmbDhw.mjs → bindingify-input-options-Cmm60vfj.mjs} +1330 -1331
- package/dist/rolldown/shared/{constructors-Bx1tSad6.d.mts → constructors-2i1T9YcF.d.mts} +3 -4
- package/dist/rolldown/shared/{constructors-DnT9y_13.mjs → constructors-CE6zZSUt.mjs} +2 -5
- package/dist/rolldown/shared/{define-config-ChOOV2QZ.d.mts → define-config-BBz954-q.d.mts} +2 -2
- package/dist/rolldown/shared/{error-C0TrL0_H.mjs → error-BlQ0-ek7.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-BXgGQtnA.mjs → load-config-CVVMWSlg.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-DGbe3BlX.mjs → normalize-string-or-regex-BYkbbGqQ.mjs} +1 -1
- package/dist/rolldown/shared/{parse-26ORR8fZ.mjs → parse-Dphnedsw.mjs} +2 -2
- package/dist/rolldown/shared/{prompt-DV1XbtjC.mjs → prompt-Bgj-uEyc.mjs} +5 -5
- package/dist/rolldown/shared/{resolve-tsconfig-D3YLh9ff.mjs → resolve-tsconfig-CdIAR1Eb.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-DpXXI00f.mjs → rolldown-Bnp916iM.mjs} +1 -1
- package/dist/rolldown/shared/{rolldown-build-D8R4Zzfy.mjs → rolldown-build-Cs2iVJuw.mjs} +24 -56
- package/dist/rolldown/shared/{transform-C-XSNVrd.d.mts → transform-CEmFsvJW.d.mts} +1 -1
- package/dist/rolldown/shared/{watch-D5Zm0Vsz.mjs → watch-ECGr-_QS.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +6 -6
- package/dist/tsdown/{build-B_nvJe4A-BkmlHYK-.js → build-B_nvJe4A-CcOht0gr.js} +30 -96
- package/dist/tsdown/debug-DLdR-9XB-CDf7D82m.js +250 -0
- package/dist/tsdown/{detect-B97OSl92-B5bcx_Ya.js → detect-B97OSl92-kGHGL-qU.js} +1 -1
- package/dist/tsdown/{dist-4h5bgYzo.js → dist-580owkGv.js} +30 -25
- package/dist/tsdown/general-Cp4NiJNK-BYPTHEzb.js +97 -0
- package/dist/tsdown/index-types.d.ts +197 -7
- package/dist/tsdown/index.js +3 -3
- package/dist/tsdown/internal-CUXleGMS.js +3 -0
- package/dist/tsdown/{main-BMtwTklr.js → main-BlTcyuFi.js} +2 -341
- package/dist/tsdown/npm_entry_picomatch.cjs +4 -2
- package/dist/tsdown/npm_entry_semver_functions_coerce.cjs +5 -1
- package/dist/tsdown/{resolver-DtsKFXi2-DQOmVgSY.js → resolver-DtsKFXi2-B8Z3WwZh.js} +1 -1
- package/dist/tsdown/run.js +4 -3
- package/dist/tsdown/src-njF8VL4a.js +622 -0
- package/dist/tsdown/target-CqeSqtms-ZU1Gv6-M.js +79 -0
- package/dist/tsdown/{tsc-15OYetCl.js → tsc-CsN85f7a.js} +3 -3
- package/dist/tsdown/{tsc-context-DfwSQt2q.js → tsc-context-CX_GXdyS.js} +2 -2
- package/dist/tsdown/tsdown-css.js +874 -0
- package/dist/tsdown/tsdown-exe.js +949 -0
- package/dist/vite/client/client.mjs +7 -9
- package/dist/vite/client.d.ts +3 -0
- package/dist/vite/node/chunks/build.js +27 -34
- package/dist/vite/node/chunks/dist.js +23 -23
- package/dist/vite/node/chunks/dist2.js +3 -3
- package/dist/vite/node/chunks/logger.js +4 -4
- package/dist/vite/node/chunks/node.js +12354 -11629
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +3 -3
- package/dist/vite/node/index.d.ts +139 -14
- package/dist/vite/node/index.js +1 -1
- package/dist/vite/node/module-runner.js +4 -4
- package/dist/vite/types/importGlob.d.ts +48 -6
- package/package.json +14 -20
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import process$1, { cwd } from "node:process";
|
|
1
|
+
import { cwd } from "node:process";
|
|
3
2
|
import readline from "node:readline";
|
|
4
3
|
import { isatty } from "node:tty";
|
|
5
4
|
import { formatWithOptions, inspect } from "node:util";
|
|
@@ -8,330 +7,6 @@ import { basename, delimiter, dirname, normalize, resolve } from "node:path";
|
|
|
8
7
|
import { pipeline } from "node:stream/promises";
|
|
9
8
|
import { PassThrough } from "node:stream";
|
|
10
9
|
import { closeSync, openSync, readSync, statSync } from "node:fs";
|
|
11
|
-
//#region \0rolldown/runtime.js
|
|
12
|
-
var __create = Object.create;
|
|
13
|
-
var __defProp = Object.defineProperty;
|
|
14
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
15
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
17
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
-
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
19
|
-
var __exportAll = (all, no_symbols) => {
|
|
20
|
-
let target = {};
|
|
21
|
-
for (var name in all) __defProp(target, name, {
|
|
22
|
-
get: all[name],
|
|
23
|
-
enumerable: true
|
|
24
|
-
});
|
|
25
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
26
|
-
return target;
|
|
27
|
-
};
|
|
28
|
-
var __copyProps = (to, from, except, desc) => {
|
|
29
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
30
|
-
key = keys[i];
|
|
31
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
32
|
-
get: ((k) => from[k]).bind(null, key),
|
|
33
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
return to;
|
|
37
|
-
};
|
|
38
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
39
|
-
value: mod,
|
|
40
|
-
enumerable: true
|
|
41
|
-
}) : target, mod));
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/general-Cp4NiJNK.mjs
|
|
44
|
-
const picomatch = createRequire(import.meta.url)("./npm_entry_picomatch.cjs");
|
|
45
|
-
function toArray(val, defaultValue) {
|
|
46
|
-
if (Array.isArray(val)) return val;
|
|
47
|
-
else if (val == null) {
|
|
48
|
-
if (defaultValue) return [defaultValue];
|
|
49
|
-
return [];
|
|
50
|
-
} else return [val];
|
|
51
|
-
}
|
|
52
|
-
function resolveComma(arr) {
|
|
53
|
-
return arr.flatMap((format) => format.split(","));
|
|
54
|
-
}
|
|
55
|
-
function resolveRegex(str) {
|
|
56
|
-
if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
|
|
57
|
-
return str;
|
|
58
|
-
}
|
|
59
|
-
function slash(string) {
|
|
60
|
-
return string.replaceAll("\\", "/");
|
|
61
|
-
}
|
|
62
|
-
const noop = (v) => v;
|
|
63
|
-
function matchPattern(id, patterns) {
|
|
64
|
-
return patterns.some((pattern) => {
|
|
65
|
-
if (pattern instanceof RegExp) {
|
|
66
|
-
pattern.lastIndex = 0;
|
|
67
|
-
return pattern.test(id);
|
|
68
|
-
}
|
|
69
|
-
return id === pattern || picomatch(pattern)(id);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
function pkgExists(moduleName) {
|
|
73
|
-
try {
|
|
74
|
-
import.meta.resolve(moduleName);
|
|
75
|
-
return true;
|
|
76
|
-
} catch {}
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
async function importWithError(moduleName) {
|
|
80
|
-
try {
|
|
81
|
-
return await import(moduleName);
|
|
82
|
-
} catch (error) {
|
|
83
|
-
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
function promiseWithResolvers() {
|
|
87
|
-
let resolve;
|
|
88
|
-
return {
|
|
89
|
-
promise: new Promise((res) => {
|
|
90
|
-
resolve = res;
|
|
91
|
-
}),
|
|
92
|
-
resolve
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
function debounce(fn, delay) {
|
|
96
|
-
let timer;
|
|
97
|
-
const debounced = (...args) => {
|
|
98
|
-
clearTimeout(timer);
|
|
99
|
-
timer = setTimeout(() => fn(...args), delay);
|
|
100
|
-
};
|
|
101
|
-
debounced.cancel = () => clearTimeout(timer);
|
|
102
|
-
return debounced;
|
|
103
|
-
}
|
|
104
|
-
const { Ansis, fg, bg, rgb, bgRgb, hex, bgHex, reset, inverse, hidden, visible, link, 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 } = (/* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
105
|
-
let e, { defineProperty: r, getPrototypeOf: t, setPrototypeOf: n, create: o, keys: l } = Object, i = "", { round: f, max: s } = Math, u = (e) => {
|
|
106
|
-
let r = /([a-f\d]{3,6})/i.exec(e)?.[0], t = r?.length, n = "0x" + (6 ^ t ? 3 ^ t ? "0" : r[0] + r[0] + r[1] + r[1] + r[2] + r[2] : r) | 0;
|
|
107
|
-
return [
|
|
108
|
-
n >> 16,
|
|
109
|
-
n >> 8 & 255,
|
|
110
|
-
255 & n
|
|
111
|
-
];
|
|
112
|
-
}, a = (e) => {
|
|
113
|
-
if (8 > e) return 30 + e;
|
|
114
|
-
if (16 > e) return 82 + e;
|
|
115
|
-
if (e > 231) return e > 243 ? 37 : 30;
|
|
116
|
-
let r = (e -= 16) % 36, t = e / 36 | 0, n = r / 6 | 0, o = r % 6;
|
|
117
|
-
return 30 + (t > 2 | (n > 2) << 1 | (o > 2) << 2) + (s(t, n, o) > 4 ? 60 : 0);
|
|
118
|
-
}, c = {
|
|
119
|
-
open: i,
|
|
120
|
-
close: i
|
|
121
|
-
}, g = (e, { open: r = "", close: o = "", f: l }) => {
|
|
122
|
-
let f = (e.open || i) + r, s = o + (e.close || i), u = (e, ...t) => {
|
|
123
|
-
if (!e) {
|
|
124
|
-
if (!o) return r;
|
|
125
|
-
if ((e ?? i) === i) return i;
|
|
126
|
-
}
|
|
127
|
-
let n, a = l ? l(e, ...t) : e.raw ? String.raw({ raw: e }, ...t) : i + e, c = u;
|
|
128
|
-
if (a.includes("\x1B")) for (; c = c.p;) {
|
|
129
|
-
let { t: e, o: r } = c, t = r.length, o = i, l = 0;
|
|
130
|
-
if (t) for (; ~(n = a.indexOf(r, l)); l = n + t) o += a.slice(l, n) + e;
|
|
131
|
-
a = o + a.slice(l);
|
|
132
|
-
}
|
|
133
|
-
return f + (a.includes("\n") ? a.replace(/(\r?\n)/g, s + "$1" + f) : a) + s;
|
|
134
|
-
};
|
|
135
|
-
return n(u, t(e)).p = {
|
|
136
|
-
t: r,
|
|
137
|
-
o,
|
|
138
|
-
p: e.p
|
|
139
|
-
}, u.open = f, u.close = s, u;
|
|
140
|
-
};
|
|
141
|
-
const d = new function t(s = globalThis) {
|
|
142
|
-
let d = "number" == typeof s ? s : ((r) => {
|
|
143
|
-
let t = r.process ?? {}, n = t.argv ?? [], o = t.env ?? {}, i = 0;
|
|
144
|
-
try {
|
|
145
|
-
i = ((r, t, n) => (e = t.TERM, {
|
|
146
|
-
"24bit": 3,
|
|
147
|
-
truecolor: 3,
|
|
148
|
-
ansi256: 2,
|
|
149
|
-
ansi: 1
|
|
150
|
-
}[t.COLORTERM] || (t.CI ? /,GITHUB/.test(n) ? 3 : 1 : (t.PM2_HOME || /edge/.test(t.NEXT_RUNTIME) || r.stdout?.isTTY) && "dumb" !== e ? "win32" === r.platform ? 3 : /-256/.test(e) ? 2 : 1 : 0)))(t, o, "," + l(o).join(","));
|
|
151
|
-
} catch (e) {
|
|
152
|
-
o = {};
|
|
153
|
-
}
|
|
154
|
-
let f, s = i || 1, u = "FORCE_COLOR", a = {
|
|
155
|
-
false: 0,
|
|
156
|
-
0: 0,
|
|
157
|
-
1: 1,
|
|
158
|
-
2: 2,
|
|
159
|
-
3: 3
|
|
160
|
-
}[o[u]] ?? s, c = -1;
|
|
161
|
-
for (f of n) /^--color=?(true|always)?$/.test(f) && (c = s), /^--(no-color|color=(false|never))$/.test(f) && (c = 0);
|
|
162
|
-
return r.window?.chrome ? 3 : u in o ? a : ~c ? c : o.NO_COLOR ? 0 : i;
|
|
163
|
-
})(s), b = {}, p = {
|
|
164
|
-
Ansis: t,
|
|
165
|
-
level: d,
|
|
166
|
-
isSupported: () => m,
|
|
167
|
-
strip: (e) => e.replace(/][^]*|[][[()#;?]*(?:\d+(?:;\d*)*)?[\dA-ORZcf-nqry=><]/g, i),
|
|
168
|
-
extend(e) {
|
|
169
|
-
for (let r in e) {
|
|
170
|
-
let t = e[r];
|
|
171
|
-
"s" === (typeof t)[0] && (h(w(r), A(...u(t))), t = P(...u(t))), h(r, t);
|
|
172
|
-
}
|
|
173
|
-
return n(p, o({}, b));
|
|
174
|
-
}
|
|
175
|
-
}, h = (e, t) => {
|
|
176
|
-
b[e] = { get() {
|
|
177
|
-
return r(this, e, { value: t.call ? (...e) => g(this, t(...e)) : g(this, t) })[e];
|
|
178
|
-
} };
|
|
179
|
-
}, y = 1 ^ d, $ = d > 2, m = d > 0, O = (e, r) => m ? {
|
|
180
|
-
open: `[${e}m`,
|
|
181
|
-
close: r ? `[${r}m` : i
|
|
182
|
-
} : c, w = (e) => "bg" + e[0].toUpperCase() + e.slice(1), v = (e) => (r) => e(...u(r)), x = (e, r) => (t, n, o) => O(`${e}8;2;${t};${n};${o}`, r), _ = (e) => (r, t, n) => e(((e, r, t) => e ^ r | r ^ t ? 16 + 36 * f(e / 51) + 6 * f(r / 51) + f(t / 51) : 8 > e ? 16 : e > 248 ? 231 : f(24 * (e - 8) / 247) + 232)(r, t, n)), k = (e) => O(y ? "38;5;" + e : a(e), 39), R = (e) => O(y ? "48;5;" + e : a(e) + 10, 49), P = $ ? x(3, 39) : _(k), A = $ ? x(4, 49) : _(R), B = {
|
|
183
|
-
fg: k,
|
|
184
|
-
bg: R,
|
|
185
|
-
rgb: P,
|
|
186
|
-
bgRgb: A,
|
|
187
|
-
hex: v(P),
|
|
188
|
-
bgHex: v(A),
|
|
189
|
-
visible: c,
|
|
190
|
-
reset: O(0, i),
|
|
191
|
-
bold: O(1, 22),
|
|
192
|
-
dim: O(2, 22),
|
|
193
|
-
italic: O(3, 23),
|
|
194
|
-
underline: O(4, 24),
|
|
195
|
-
inverse: O(7, 27),
|
|
196
|
-
hidden: O(8, 28),
|
|
197
|
-
strikethrough: O(9, 29),
|
|
198
|
-
link: { f: (e, r = e) => m ? `]8;;${e}${r}]8;;` : r != e ? r + ` (${e})` : e }
|
|
199
|
-
}, C = (e, r) => {
|
|
200
|
-
B[e] = O(r, 39), B[w(e)] = O(r + 10, 49);
|
|
201
|
-
};
|
|
202
|
-
return "gray,black,red,green,yellow,blue,magenta,cyan,white".split(",").map(((e, r) => {
|
|
203
|
-
r ? C(e + "Bright", 89 + r) : r = 61, C(e, 29 + r);
|
|
204
|
-
})), p.extend(B);
|
|
205
|
-
}();
|
|
206
|
-
module.exports = d.default = d;
|
|
207
|
-
})))(), 1)).default;
|
|
208
|
-
//#endregion
|
|
209
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/logger-BxuhTmAE.mjs
|
|
210
|
-
const LogLevels = {
|
|
211
|
-
silent: 0,
|
|
212
|
-
error: 1,
|
|
213
|
-
warn: 2,
|
|
214
|
-
info: 3
|
|
215
|
-
};
|
|
216
|
-
function format(msgs) {
|
|
217
|
-
return msgs.filter((arg) => arg !== void 0 && arg !== false).join(" ");
|
|
218
|
-
}
|
|
219
|
-
function clearScreen() {
|
|
220
|
-
const repeatCount = process$1.stdout.rows - 2;
|
|
221
|
-
const blank = repeatCount > 0 ? "\n".repeat(repeatCount) : "";
|
|
222
|
-
console.info(blank);
|
|
223
|
-
readline.cursorTo(process$1.stdout, 0, 0);
|
|
224
|
-
readline.clearScreenDown(process$1.stdout);
|
|
225
|
-
}
|
|
226
|
-
const warnedMessages = /* @__PURE__ */ new Set();
|
|
227
|
-
function createLogger(level = "info", options = {}) {
|
|
228
|
-
const resolvedOptions = {
|
|
229
|
-
allowClearScreen: true,
|
|
230
|
-
failOnWarn: false,
|
|
231
|
-
console: globalThis.console,
|
|
232
|
-
...options
|
|
233
|
-
};
|
|
234
|
-
const { allowClearScreen, console, customLogger, failOnWarn } = resolvedOptions;
|
|
235
|
-
if (customLogger) return customLogger;
|
|
236
|
-
function output(type, msg) {
|
|
237
|
-
if (LogLevels[logger.level] < LogLevels[type]) return;
|
|
238
|
-
console[type === "info" ? "log" : type](msg);
|
|
239
|
-
}
|
|
240
|
-
const clear = allowClearScreen && process$1.stdout.isTTY && !process$1.env.CI ? clearScreen : () => {};
|
|
241
|
-
const isWindowsTerminal = !!process$1.env.WT_SESSION;
|
|
242
|
-
const emojiDivier = " ".repeat(isWindowsTerminal ? 2 : 1);
|
|
243
|
-
const logger = {
|
|
244
|
-
level,
|
|
245
|
-
options: resolvedOptions,
|
|
246
|
-
info(...msgs) {
|
|
247
|
-
output("info", `${blue`ℹ`}${emojiDivier}${format(msgs)}`);
|
|
248
|
-
},
|
|
249
|
-
warn(...msgs) {
|
|
250
|
-
if (failOnWarn) return this.error(...msgs);
|
|
251
|
-
const message = format(msgs);
|
|
252
|
-
warnedMessages.add(message);
|
|
253
|
-
output("warn", `${bold(yellow`warn:`)} ${message}`);
|
|
254
|
-
},
|
|
255
|
-
warnOnce(...msgs) {
|
|
256
|
-
const message = format(msgs);
|
|
257
|
-
if (failOnWarn) return this.error(...msgs);
|
|
258
|
-
if (warnedMessages.has(message)) return;
|
|
259
|
-
warnedMessages.add(message);
|
|
260
|
-
output("warn", `${bold(yellow`warn:`)} ${message}`);
|
|
261
|
-
},
|
|
262
|
-
error(...msgs) {
|
|
263
|
-
output("error", `${bold(red`error:`)} ${format(msgs).replace(/^([A-Za-z]*Error):\s*/, "")}`);
|
|
264
|
-
process$1.exitCode = 1;
|
|
265
|
-
},
|
|
266
|
-
success(...msgs) {
|
|
267
|
-
output("info", `${green`✔`}${emojiDivier}${format(msgs)}`);
|
|
268
|
-
},
|
|
269
|
-
clearScreen(type) {
|
|
270
|
-
if (LogLevels[logger.level] >= LogLevels[type]) clear();
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
return logger;
|
|
274
|
-
}
|
|
275
|
-
const globalLogger = createLogger();
|
|
276
|
-
function getNameLabel(ansis, name) {
|
|
277
|
-
if (!name) return void 0;
|
|
278
|
-
return ansis(`[${name}]`);
|
|
279
|
-
}
|
|
280
|
-
function prettyFormat(format) {
|
|
281
|
-
const formatColor = format === "es" ? blue : format === "cjs" ? yellow : noop;
|
|
282
|
-
let formatText;
|
|
283
|
-
switch (format) {
|
|
284
|
-
case "es":
|
|
285
|
-
formatText = "ESM";
|
|
286
|
-
break;
|
|
287
|
-
default:
|
|
288
|
-
formatText = format.toUpperCase();
|
|
289
|
-
break;
|
|
290
|
-
}
|
|
291
|
-
return formatColor(`[${formatText}]`);
|
|
292
|
-
}
|
|
293
|
-
const colors$1 = /* @__PURE__ */ new Map();
|
|
294
|
-
function generateColor(name = "default") {
|
|
295
|
-
if (colors$1.has(name)) return colors$1.get(name);
|
|
296
|
-
let color;
|
|
297
|
-
if (name === "default") color = blue;
|
|
298
|
-
else {
|
|
299
|
-
let hash = 0;
|
|
300
|
-
for (let i = 0; i < name.length; i++) hash = name.charCodeAt(i) + ((hash << 5) - hash);
|
|
301
|
-
color = rgb(...hslToRgb(hash % 360, 35, 55));
|
|
302
|
-
}
|
|
303
|
-
colors$1.set(name, color);
|
|
304
|
-
return color;
|
|
305
|
-
}
|
|
306
|
-
function hslToRgb(h, s, l) {
|
|
307
|
-
h = h % 360;
|
|
308
|
-
h /= 360;
|
|
309
|
-
s /= 100;
|
|
310
|
-
l /= 100;
|
|
311
|
-
let r, g, b;
|
|
312
|
-
if (s === 0) r = g = b = l;
|
|
313
|
-
else {
|
|
314
|
-
const q = l < .5 ? l * (1 + s) : l + s - l * s;
|
|
315
|
-
const p = 2 * l - q;
|
|
316
|
-
r = hue2rgb(p, q, h + 1 / 3);
|
|
317
|
-
g = hue2rgb(p, q, h);
|
|
318
|
-
b = hue2rgb(p, q, h - 1 / 3);
|
|
319
|
-
}
|
|
320
|
-
return [
|
|
321
|
-
Math.max(0, Math.round(r * 255)),
|
|
322
|
-
Math.max(0, Math.round(g * 255)),
|
|
323
|
-
Math.max(0, Math.round(b * 255))
|
|
324
|
-
];
|
|
325
|
-
}
|
|
326
|
-
function hue2rgb(p, q, t) {
|
|
327
|
-
if (t < 0) t += 1;
|
|
328
|
-
if (t > 1) t -= 1;
|
|
329
|
-
if (t < 1 / 6) return p + (q - p) * 6 * t;
|
|
330
|
-
if (t < 1 / 2) return q;
|
|
331
|
-
if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
|
|
332
|
-
return p;
|
|
333
|
-
}
|
|
334
|
-
//#endregion
|
|
335
10
|
//#region ../../node_modules/.pnpm/obug@2.1.3/node_modules/obug/dist/core.js
|
|
336
11
|
/**
|
|
337
12
|
* Coerce `value`.
|
|
@@ -630,20 +305,6 @@ function enable(namespaces) {
|
|
|
630
305
|
}
|
|
631
306
|
enable$1(process.env.DEBUG || "");
|
|
632
307
|
//#endregion
|
|
633
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_701dbb346589e2d965113664da5ac600/node_modules/tsdown/dist/debug-DLdR-9XB.mjs
|
|
634
|
-
var version = "0.22.3";
|
|
635
|
-
const debugLog = createDebug("tsdown:debug");
|
|
636
|
-
function enableDebug(debug) {
|
|
637
|
-
if (!debug) return;
|
|
638
|
-
let namespace;
|
|
639
|
-
if (debug === true) namespace = "tsdown:*";
|
|
640
|
-
else namespace = resolveComma(toArray(debug)).map((v) => `tsdown:${v}`).join(",");
|
|
641
|
-
const ns = namespaces();
|
|
642
|
-
if (ns) namespace += `,${ns}`;
|
|
643
|
-
enable(namespace);
|
|
644
|
-
debugLog("Debugging enabled", namespace);
|
|
645
|
-
}
|
|
646
|
-
//#endregion
|
|
647
308
|
//#region ../../node_modules/.pnpm/tinyexec@1.2.4/node_modules/tinyexec/dist/main.mjs
|
|
648
309
|
const h = /^path$/i;
|
|
649
310
|
const g = {
|
|
@@ -970,4 +631,4 @@ const R = (e, t, n) => {
|
|
|
970
631
|
};
|
|
971
632
|
const z = R;
|
|
972
633
|
//#endregion
|
|
973
|
-
export {
|
|
634
|
+
export { namespaces as a, enable as i, z as n, createDebug as r, R as t };
|
|
@@ -850,7 +850,8 @@ var require_parse = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exp
|
|
|
850
850
|
};
|
|
851
851
|
const extglobClose = (token) => {
|
|
852
852
|
const literal = input.slice(token.startIndex, state.index + 1);
|
|
853
|
-
const
|
|
853
|
+
const body = input.slice(token.startIndex + 2, state.index);
|
|
854
|
+
const analysis = analyzeRepeatedExtglob(body, opts);
|
|
854
855
|
if ((token.type === "plus" || token.type === "star") && analysis.risky) {
|
|
855
856
|
const safeOutput = analysis.safeOutput ? (token.output ? "" : ONE_CHAR) + (opts.capture ? `(${analysis.safeOutput})` : analysis.safeOutput) : void 0;
|
|
856
857
|
const open = tokens[token.tokensIndex];
|
|
@@ -976,7 +977,8 @@ var require_parse = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((exp
|
|
|
976
977
|
if (inner.includes(":")) {
|
|
977
978
|
const idx = prev.value.lastIndexOf("[");
|
|
978
979
|
const pre = prev.value.slice(0, idx);
|
|
979
|
-
const
|
|
980
|
+
const rest = prev.value.slice(idx + 2);
|
|
981
|
+
const posix = POSIX_REGEX_SOURCE[rest];
|
|
980
982
|
if (posix) {
|
|
981
983
|
prev.value = pre + posix;
|
|
982
984
|
state.backtrack = true;
|
|
@@ -38,7 +38,11 @@ var require_coerce = /* @__PURE__ */ require_rolldown_runtime.__commonJSMin(((ex
|
|
|
38
38
|
}
|
|
39
39
|
if (match === null) return null;
|
|
40
40
|
const major = match[2];
|
|
41
|
-
|
|
41
|
+
const minor = match[3] || "0";
|
|
42
|
+
const patch = match[4] || "0";
|
|
43
|
+
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
44
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
45
|
+
return parse(`${major}.${minor}.${patch}${prerelease}${build}`, options);
|
|
42
46
|
};
|
|
43
47
|
module.exports = coerce;
|
|
44
48
|
}));
|
package/dist/tsdown/run.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { l as blue, n as version, p as hex, s as globalLogger, t as enableDebug } from "./debug-DLdR-9XB-CDf7D82m.js";
|
|
3
|
+
import { t as R } from "./main-BlTcyuFi.js";
|
|
3
4
|
import module from "node:module";
|
|
4
5
|
import process$1 from "node:process";
|
|
5
6
|
import { VERSION } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
@@ -621,7 +622,7 @@ var CAC = class extends EventTarget {
|
|
|
621
622
|
*/
|
|
622
623
|
const cac = (name = "") => new CAC(name);
|
|
623
624
|
//#endregion
|
|
624
|
-
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@
|
|
625
|
+
//#region ../../node_modules/.pnpm/tsdown@0.22.3_@arethetypeswrong+core@0.18.2_@tsdown+css@0.22.3_@tsdown+exe@0.22.3_@type_7ab537c68b19946c2da2ea6b389f768f/node_modules/tsdown/dist/run.mjs
|
|
625
626
|
const cli = cac("tsdown");
|
|
626
627
|
cli.help().version(version);
|
|
627
628
|
cli.command("[...files]", "Bundle files", {
|
|
@@ -630,7 +631,7 @@ cli.command("[...files]", "Bundle files", {
|
|
|
630
631
|
}).option("-c, --config <filename>", "Use a custom config file").option("--config-loader <loader>", "Config loader to use: auto, native, tsx, unrun", { default: "auto" }).option("--no-config", "Disable config file").option("-f, --format <format>", "Bundle format: esm, cjs, iife, umd", { default: "esm" }).option("--clean", "Clean output directory, --no-clean to disable").option("--deps.never-bundle <module>", "Mark dependencies as external").option("--minify", "Minify output").option("--devtools", "Enable devtools integration").option("--debug [feat]", "Show debug logs").option("--target <target>", "Bundle target, e.g \"es2015\", \"esnext\"").option("-l, --logLevel <level>", "Set log level: info, warn, error, silent").option("--fail-on-warn", "Fail on warnings", { default: true }).option("--no-write", "Disable writing files to disk, incompatible with watch mode").option("-d, --out-dir <dir>", "Output directory", { default: "dist" }).option("--treeshake", "Tree-shake bundle", { default: true }).option("--sourcemap", "Generate source map", { default: false }).option("--shims", "Enable cjs and esm shims ", { default: false }).option("--platform <platform>", "Target platform", { default: "node" }).option("--dts", "Generate dts files").option("--publint", "Enable publint", { default: false }).option("--attw", "Enable Are the types wrong integration", { default: false }).option("--unused", "Enable unused dependencies check", { default: false }).option("-w, --watch [path]", "Watch mode").option("--ignore-watch <path>", "Ignore custom paths in watch mode").option("--from-vite [vitest]", "Reuse config from Vite or Vitest").option("--report", "Size report", { default: true }).option("--env.* <value>", "Define compile-time env variables").option("--env-file <file>", "Load environment variables from a file, when used together with --env, variables in --env take precedence").option("--env-prefix <prefix>", "Prefix for env variables to inject into the bundle", { default: "TSDOWN_" }).option("--on-success <command>", "Command to run on success").option("--copy <dir>", "Copy files to output dir").option("--public-dir <dir>", "Alias for --copy, deprecated").option("--tsconfig <tsconfig>", "Set tsconfig path").option("--unbundle", "Unbundle mode").option("--root <dir>", "Root directory of input files").option("--exe", "Bundle as executable").option("-W, --workspace [dir]", "Enable workspace mode").option("-F, --filter <pattern>", "Filter configs (cwd or name), e.g. /pkg-name$/ or pkg-name").option("--exports", "Generate package exports for package.json").action(async (input, flags) => {
|
|
631
632
|
globalLogger.level = flags.logLevel || "info";
|
|
632
633
|
globalLogger.info(`${blue`tsdown v${version}`} powered by ${hex("#ff7e17")`rolldown v${VERSION}`}`);
|
|
633
|
-
const { build } = await import("./build-B_nvJe4A-
|
|
634
|
+
const { build } = await import("./build-B_nvJe4A-CcOht0gr.js").then((n) => n.r).then((n) => n.r);
|
|
634
635
|
if (input.length > 0) flags.entry = input;
|
|
635
636
|
await build(flags);
|
|
636
637
|
});
|