@voidzero-dev/vite-plus-core 1.0.0-rc.0 → 1.0.0-rc.1
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/dist/rolldown/cli.mjs +6 -6
- package/dist/rolldown/config.d.mts +1 -1
- package/dist/rolldown/config.mjs +2 -2
- package/dist/rolldown/experimental-index.d.mts +8 -5
- package/dist/rolldown/experimental-index.mjs +14 -11
- package/dist/rolldown/experimental-runtime-types.d.ts +3 -26
- package/dist/rolldown/experimental-runtime.d.ts +3 -26
- package/dist/rolldown/experimental-runtime.mjs +4 -47
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/index.d.mts +1 -1
- package/dist/rolldown/index.mjs +4 -4
- package/dist/rolldown/parallel-plugin-worker.mjs +2 -2
- package/dist/rolldown/parallel-plugin.d.mts +1 -1
- package/dist/rolldown/parse-ast-index.mjs +2 -2
- package/dist/rolldown/plugins-index.d.mts +2 -2
- package/dist/rolldown/plugins-index.mjs +2 -2
- package/dist/rolldown/shared/{binding-BbrDfv1x.mjs → binding-BY0qR5iS.mjs} +28 -27
- package/dist/rolldown/shared/{bindingify-input-options-CbBAjvu6.mjs → bindingify-input-options-B8JHmN6_.mjs} +10 -8
- package/dist/rolldown/shared/{constructors-CmDKpWIU.d.mts → constructors-DuOq7MqW.d.mts} +1 -1
- package/dist/rolldown/shared/{constructors-D9jwEbE4.mjs → constructors-xEvVj3lN.mjs} +1 -1
- package/dist/rolldown/shared/{create-bundler-option-wxuQPB7F.mjs → create-bundler-option-COco-7P6.mjs} +93 -19
- package/dist/rolldown/shared/{define-config-BFdLpVut.d.mts → define-config-C7HCoqY8.d.mts} +11 -1
- package/dist/rolldown/shared/{error-CGhV1ebk.mjs → error-C7pxws0W.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-DOMKIWz0.mjs → load-config-DkUBnDsI.mjs} +1 -1
- package/dist/rolldown/shared/{logs-DmYCAKcW.mjs → logs-D6uA606S.mjs} +8 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-zc1bUto6.mjs → normalize-string-or-regex-F14uvr6D.mjs} +2 -2
- package/dist/rolldown/shared/{parse-6TJ5OMPh.mjs → parse-BWeE7Vr9.mjs} +1 -1
- package/dist/rolldown/shared/{resolve-tsconfig-Bf6oL9fm.mjs → resolve-tsconfig-DHwpIs5e.mjs} +2 -2
- package/dist/rolldown/shared/{rolldown-DZGaRc5R.mjs → rolldown-Bue0gNT5.mjs} +4 -4
- package/dist/rolldown/shared/{watch-CUKYWzxY.mjs → watch-RXhXN1aG.mjs} +5 -5
- package/dist/rolldown/utils-index.mjs +2 -2
- package/dist/tsdown/{build-JVmLFaZt-BN9yuB6k.js → build-JVmLFaZt-DRlLhpV3.js} +10 -8
- package/dist/tsdown/{debug-CpC4hV25-BeCITV83.js → debug-CpC4hV25-C-OYr2iI.js} +4 -3
- package/dist/tsdown/{detect-Bg-d8iUV-Cr_BRLVW.js → detect-Bg-d8iUV-Du8LljhG.js} +1 -1
- package/dist/tsdown/{dist-ByW_jJfv.js → dist-VDcV1Qyy.js} +19 -49
- package/dist/tsdown/index-types.d.ts +209 -209
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/{main-bgV9NlwM.js → main-CyNcZUzu.js} +3 -88
- package/dist/tsdown/require-BbBF8Ii0-BDaWJgzA.js +320 -0
- package/dist/tsdown/{resolver-DE0_sy8o-UMsN-SXx.js → resolver-DE0_sy8o-Bi3xbRxi.js} +2 -3
- package/dist/tsdown/run.js +5 -4
- package/dist/tsdown/{src-D5xv98Iu.js → src-pN7Bl6zo.js} +4 -4
- package/dist/tsdown/style-DiMP8pYv-DIC5PXeH.js +88 -0
- package/dist/tsdown/{target-DgdLrXba-DaJJ11xX.js → target-DgdLrXba-DpO9JXxB.js} +6 -172
- package/dist/tsdown/{tsc-BFDF_Im9.js → tsc-BLb4pSBY.js} +8 -7
- package/dist/tsdown/tsdown-css.js +4 -5
- package/dist/tsdown/tsdown-exe.js +41 -4
- package/dist/tsdown/version-CQ98ZBpL-D6GAHapk.js +169 -0
- package/dist/vite/client/bundledDevClient.mjs +8 -42
- package/dist/vite/client/client.mjs +4 -4
- package/dist/vite/node/chunks/dist2.js +107 -104
- package/dist/vite/node/chunks/node.js +303 -100
- package/dist/vite/node/index.d.ts +4 -3
- package/package.json +14 -14
- package/dist/tsdown/internal-DTYQdXId.js +0 -3
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { formatWithOptions, inspect } from "node:util";
|
|
3
|
+
import { isatty } from "node:tty";
|
|
4
|
+
//#region ../../node_modules/.pnpm/obug@3.0.0/node_modules/obug/dist/core.js
|
|
5
|
+
/**
|
|
6
|
+
* Coerce `value`.
|
|
7
|
+
*/
|
|
8
|
+
function coerce(value) {
|
|
9
|
+
if (value instanceof Error) return value.stack || value.message;
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Selects a color for a debug namespace
|
|
14
|
+
* @return An ANSI color code for the given namespace
|
|
15
|
+
*/
|
|
16
|
+
function selectColor(colors, namespace) {
|
|
17
|
+
let hash = 0;
|
|
18
|
+
for (let i = 0; i < namespace.length; i++) {
|
|
19
|
+
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
|
20
|
+
hash |= 0;
|
|
21
|
+
}
|
|
22
|
+
return colors[Math.abs(hash) % colors.length];
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Checks if the given string matches a namespace template, honoring
|
|
26
|
+
* asterisks as wildcards.
|
|
27
|
+
*/
|
|
28
|
+
function matchesTemplate(search, template) {
|
|
29
|
+
let searchIndex = 0;
|
|
30
|
+
let templateIndex = 0;
|
|
31
|
+
let starIndex = -1;
|
|
32
|
+
let matchIndex = 0;
|
|
33
|
+
while (searchIndex < search.length) if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
|
34
|
+
if (template[templateIndex] === "*") {
|
|
35
|
+
starIndex = templateIndex;
|
|
36
|
+
matchIndex = searchIndex;
|
|
37
|
+
templateIndex++;
|
|
38
|
+
} else {
|
|
39
|
+
searchIndex++;
|
|
40
|
+
templateIndex++;
|
|
41
|
+
}
|
|
42
|
+
} else if (starIndex !== -1) {
|
|
43
|
+
templateIndex = starIndex + 1;
|
|
44
|
+
matchIndex++;
|
|
45
|
+
searchIndex = matchIndex;
|
|
46
|
+
} else return false;
|
|
47
|
+
while (templateIndex < template.length && template[templateIndex] === "*") templateIndex++;
|
|
48
|
+
return templateIndex === template.length;
|
|
49
|
+
}
|
|
50
|
+
function humanize(value) {
|
|
51
|
+
if (value >= 1e3) return `${(value / 1e3).toFixed(1)}s`;
|
|
52
|
+
return `${value}ms`;
|
|
53
|
+
}
|
|
54
|
+
let globalNamespaces = "";
|
|
55
|
+
function createDebug$1(namespace, options) {
|
|
56
|
+
let prevTime;
|
|
57
|
+
let enableOverride;
|
|
58
|
+
let namespacesCache;
|
|
59
|
+
let enabledCache;
|
|
60
|
+
const debug = ((...args) => {
|
|
61
|
+
if (!debug.enabled) return;
|
|
62
|
+
const curr = Date.now();
|
|
63
|
+
const diff = curr - (prevTime || curr);
|
|
64
|
+
prevTime = curr;
|
|
65
|
+
args[0] = coerce(args[0]);
|
|
66
|
+
if (typeof args[0] !== "string") args.unshift("%O");
|
|
67
|
+
let index = 0;
|
|
68
|
+
args[0] = args[0].replace(/%([a-z%])/gi, (match, format) => {
|
|
69
|
+
if (match === "%%") return "%";
|
|
70
|
+
index++;
|
|
71
|
+
const formatter = options.formatters[format];
|
|
72
|
+
if (typeof formatter === "function") {
|
|
73
|
+
const value = args[index];
|
|
74
|
+
match = formatter.call(debug, value);
|
|
75
|
+
args.splice(index, 1);
|
|
76
|
+
index--;
|
|
77
|
+
}
|
|
78
|
+
return match;
|
|
79
|
+
});
|
|
80
|
+
options.formatArgs.call(debug, diff, args);
|
|
81
|
+
debug.log(...args);
|
|
82
|
+
});
|
|
83
|
+
debug.extend = function(namespace, delimiter = ":") {
|
|
84
|
+
return createDebug$1(this.namespace + delimiter + namespace, {
|
|
85
|
+
useColors: this.useColors,
|
|
86
|
+
color: this.color,
|
|
87
|
+
formatArgs: this.formatArgs,
|
|
88
|
+
formatters: this.formatters,
|
|
89
|
+
inspectOpts: this.inspectOpts,
|
|
90
|
+
log: this.log,
|
|
91
|
+
humanize: this.humanize
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
Object.assign(debug, options);
|
|
95
|
+
debug.namespace = namespace;
|
|
96
|
+
Object.defineProperty(debug, "enabled", {
|
|
97
|
+
enumerable: true,
|
|
98
|
+
configurable: false,
|
|
99
|
+
get: () => {
|
|
100
|
+
if (enableOverride != null) return enableOverride;
|
|
101
|
+
if (namespacesCache !== globalNamespaces) {
|
|
102
|
+
namespacesCache = globalNamespaces;
|
|
103
|
+
enabledCache = enabled(namespace);
|
|
104
|
+
}
|
|
105
|
+
return enabledCache;
|
|
106
|
+
},
|
|
107
|
+
set: (v) => {
|
|
108
|
+
enableOverride = v;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
return debug;
|
|
112
|
+
}
|
|
113
|
+
let names = [];
|
|
114
|
+
let skips = [];
|
|
115
|
+
function enable(namespaces) {
|
|
116
|
+
globalNamespaces = namespaces;
|
|
117
|
+
names = [];
|
|
118
|
+
skips = [];
|
|
119
|
+
const split = globalNamespaces.trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
|
120
|
+
for (const ns of split) if (ns[0] === "-") skips.push(ns.slice(1));
|
|
121
|
+
else names.push(ns);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Returns true if the given mode name is enabled, false otherwise.
|
|
125
|
+
*/
|
|
126
|
+
function enabled(name) {
|
|
127
|
+
for (const skip of skips) if (matchesTemplate(name, skip)) return false;
|
|
128
|
+
for (const ns of names) if (matchesTemplate(name, ns)) return true;
|
|
129
|
+
return false;
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region ../../node_modules/.pnpm/obug@3.0.0/node_modules/obug/dist/ansi.js
|
|
133
|
+
let env = {};
|
|
134
|
+
try {
|
|
135
|
+
process.env.DEBUG;
|
|
136
|
+
env = process.env;
|
|
137
|
+
} catch (_unused) {}
|
|
138
|
+
const colors = process.stderr.getColorDepth && process.stderr.getColorDepth(env) > 2 ? [
|
|
139
|
+
20,
|
|
140
|
+
21,
|
|
141
|
+
26,
|
|
142
|
+
27,
|
|
143
|
+
32,
|
|
144
|
+
33,
|
|
145
|
+
38,
|
|
146
|
+
39,
|
|
147
|
+
40,
|
|
148
|
+
41,
|
|
149
|
+
42,
|
|
150
|
+
43,
|
|
151
|
+
44,
|
|
152
|
+
45,
|
|
153
|
+
56,
|
|
154
|
+
57,
|
|
155
|
+
62,
|
|
156
|
+
63,
|
|
157
|
+
68,
|
|
158
|
+
69,
|
|
159
|
+
74,
|
|
160
|
+
75,
|
|
161
|
+
76,
|
|
162
|
+
77,
|
|
163
|
+
78,
|
|
164
|
+
79,
|
|
165
|
+
80,
|
|
166
|
+
81,
|
|
167
|
+
92,
|
|
168
|
+
93,
|
|
169
|
+
98,
|
|
170
|
+
99,
|
|
171
|
+
112,
|
|
172
|
+
113,
|
|
173
|
+
128,
|
|
174
|
+
129,
|
|
175
|
+
134,
|
|
176
|
+
135,
|
|
177
|
+
148,
|
|
178
|
+
149,
|
|
179
|
+
160,
|
|
180
|
+
161,
|
|
181
|
+
162,
|
|
182
|
+
163,
|
|
183
|
+
164,
|
|
184
|
+
165,
|
|
185
|
+
166,
|
|
186
|
+
167,
|
|
187
|
+
168,
|
|
188
|
+
169,
|
|
189
|
+
170,
|
|
190
|
+
171,
|
|
191
|
+
172,
|
|
192
|
+
173,
|
|
193
|
+
178,
|
|
194
|
+
179,
|
|
195
|
+
184,
|
|
196
|
+
185,
|
|
197
|
+
196,
|
|
198
|
+
197,
|
|
199
|
+
198,
|
|
200
|
+
199,
|
|
201
|
+
200,
|
|
202
|
+
201,
|
|
203
|
+
202,
|
|
204
|
+
203,
|
|
205
|
+
204,
|
|
206
|
+
205,
|
|
207
|
+
206,
|
|
208
|
+
207,
|
|
209
|
+
208,
|
|
210
|
+
209,
|
|
211
|
+
214,
|
|
212
|
+
215,
|
|
213
|
+
220,
|
|
214
|
+
221
|
|
215
|
+
] : [
|
|
216
|
+
6,
|
|
217
|
+
2,
|
|
218
|
+
3,
|
|
219
|
+
4,
|
|
220
|
+
5,
|
|
221
|
+
1
|
|
222
|
+
];
|
|
223
|
+
const inspectOpts = Object.keys(env).filter((key) => /^debug_/i.test(key)).reduce((obj, key) => {
|
|
224
|
+
const prop = key.slice(6).toLowerCase().replace(/_([a-z])/g, (_, k) => k.toUpperCase());
|
|
225
|
+
let value = env[key];
|
|
226
|
+
const lowerCase = typeof value === "string" && value.toLowerCase();
|
|
227
|
+
if (value === "null") value = null;
|
|
228
|
+
else if (lowerCase === "yes" || lowerCase === "on" || lowerCase === "true" || lowerCase === "enabled") value = true;
|
|
229
|
+
else if (lowerCase === "no" || lowerCase === "off" || lowerCase === "false" || lowerCase === "disabled") value = false;
|
|
230
|
+
else value = Number(value);
|
|
231
|
+
obj[prop] = value;
|
|
232
|
+
return obj;
|
|
233
|
+
}, Object.create(null));
|
|
234
|
+
/**
|
|
235
|
+
* Is stdout a TTY? Colored output is enabled when `true`.
|
|
236
|
+
*/
|
|
237
|
+
function useColors() {
|
|
238
|
+
return "colors" in inspectOpts ? Boolean(inspectOpts.colors) : isatty(process.stderr.fd);
|
|
239
|
+
}
|
|
240
|
+
function getDate() {
|
|
241
|
+
if (inspectOpts.hideDate) return "";
|
|
242
|
+
return `${(/* @__PURE__ */ new Date()).toISOString()} `;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Adds ANSI color escape codes if enabled.
|
|
246
|
+
*/
|
|
247
|
+
function formatArgs(diff, args) {
|
|
248
|
+
const { namespace: name, useColors } = this;
|
|
249
|
+
if (useColors) {
|
|
250
|
+
const c = this.color;
|
|
251
|
+
const colorCode = `\u{1B}[3${c < 8 ? c : `8;5;${c}`}`;
|
|
252
|
+
const prefix = ` ${colorCode};1m${name} \u{1B}[0m`;
|
|
253
|
+
args[0] = prefix + args[0].split("\n").join(`\n${prefix}`);
|
|
254
|
+
args.push(`${colorCode}m+${this.humanize(diff)}\u{1B}[0m`);
|
|
255
|
+
} else args[0] = `${getDate()}${name} ${args[0]}`;
|
|
256
|
+
}
|
|
257
|
+
function log(...args) {
|
|
258
|
+
process.stderr.write(`${formatWithOptions(this.inspectOpts, ...args)}\n`);
|
|
259
|
+
}
|
|
260
|
+
const defaultOptions = {
|
|
261
|
+
useColors: useColors(),
|
|
262
|
+
formatArgs,
|
|
263
|
+
formatters: {
|
|
264
|
+
/**
|
|
265
|
+
* Map %o to `util.inspect()`, all on a single line.
|
|
266
|
+
*/
|
|
267
|
+
o(v) {
|
|
268
|
+
this.inspectOpts.colors = this.useColors;
|
|
269
|
+
return inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
|
270
|
+
},
|
|
271
|
+
/**
|
|
272
|
+
* Map %O to `util.inspect()`, allowing multiple lines if needed.
|
|
273
|
+
*/
|
|
274
|
+
O(v) {
|
|
275
|
+
this.inspectOpts.colors = this.useColors;
|
|
276
|
+
return inspect(v, this.inspectOpts);
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
inspectOpts,
|
|
280
|
+
log,
|
|
281
|
+
humanize
|
|
282
|
+
};
|
|
283
|
+
function createDebug(namespace, options) {
|
|
284
|
+
var _ref;
|
|
285
|
+
const color = (_ref = options && options.color) !== null && _ref !== void 0 ? _ref : selectColor(colors, namespace);
|
|
286
|
+
return createDebug$1(namespace, Object.assign(defaultOptions, { color }, options));
|
|
287
|
+
}
|
|
288
|
+
enable(env.DEBUG || "");
|
|
289
|
+
//#endregion
|
|
290
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.6_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_d7b1f0f9db662f38e672c8f14bf9ba00/node_modules/rolldown-plugin-dts/dist/require-BbBF8Ii0.mjs
|
|
291
|
+
const require = createRequire(import.meta.url);
|
|
292
|
+
const debug = createDebug("rolldown-plugin-dts:utils");
|
|
293
|
+
function tryRequire(moduleName) {
|
|
294
|
+
try {
|
|
295
|
+
return require(moduleName);
|
|
296
|
+
} catch {}
|
|
297
|
+
}
|
|
298
|
+
function tryResolve(id) {
|
|
299
|
+
try {
|
|
300
|
+
return require.resolve(id);
|
|
301
|
+
} catch {}
|
|
302
|
+
}
|
|
303
|
+
let _ts;
|
|
304
|
+
function isTS70Installed() {
|
|
305
|
+
return tryRequire("typescript/package.json")?.version.slice(0, 3) === "7.0";
|
|
306
|
+
}
|
|
307
|
+
function requireTSApi(mode = "tsc", message = ".") {
|
|
308
|
+
if (_ts) return _ts;
|
|
309
|
+
if (isTS70Installed()) throw new Error(`TypeScript 7.0 is not supported when using ${mode}. Please use TypeScript 6.0 or below${message}`);
|
|
310
|
+
let ts;
|
|
311
|
+
try {
|
|
312
|
+
ts = require("typescript");
|
|
313
|
+
} catch (cause) {
|
|
314
|
+
throw new Error(`TypeScript is not installed. Please install the \`typescript\` package (v7.0 is not yet supported)${message}`, { cause });
|
|
315
|
+
}
|
|
316
|
+
if (debug.enabled) debug(`Loaded TypeScript version ${ts.version} from ${require.resolve("typescript")}`);
|
|
317
|
+
return _ts = ts;
|
|
318
|
+
}
|
|
319
|
+
//#endregion
|
|
320
|
+
export { createDebug as a, tryResolve as i, require as n, requireTSApi as r, isTS70Installed as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as requireTSApi } from "./dist-ByW_jJfv.js";
|
|
1
|
+
import { a as createDebug, r as requireTSApi } from "./require-BbBF8Ii0-BDaWJgzA.js";
|
|
3
2
|
import path from "node:path";
|
|
4
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.
|
|
3
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.6_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_d7b1f0f9db662f38e672c8f14bf9ba00/node_modules/rolldown-plugin-dts/dist/resolver-DE0_sy8o.mjs
|
|
5
4
|
const debug = createDebug("rolldown-plugin-dts:tsc-resolver");
|
|
6
5
|
const ts = requireTSApi();
|
|
7
6
|
function tscResolve(id, importer, cwd, tsconfig, tsconfigRaw, reference) {
|
package/dist/tsdown/run.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { c as globalLogger, n as version, t as enableDebug } from "./debug-CpC4hV25-
|
|
2
|
+
import { u as styleText$1 } from "./style-DiMP8pYv-DIC5PXeH.js";
|
|
3
|
+
import { c as globalLogger, n as version, t as enableDebug } from "./debug-CpC4hV25-C-OYr2iI.js";
|
|
4
|
+
import { n as x } from "./main-CyNcZUzu.js";
|
|
4
5
|
import module from "node:module";
|
|
5
6
|
import process$1 from "node:process";
|
|
6
7
|
import { VERSION } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
@@ -622,7 +623,7 @@ var CAC = class extends EventTarget {
|
|
|
622
623
|
*/
|
|
623
624
|
const cac = (name = "") => new CAC(name);
|
|
624
625
|
//#endregion
|
|
625
|
-
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@
|
|
626
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_322c16727ed86a15fb2ecef349e911e9/node_modules/tsdown/dist/run.mjs
|
|
626
627
|
const cli = cac("tsdown");
|
|
627
628
|
cli.help().version(version);
|
|
628
629
|
cli.command("[...files]", "Bundle files", {
|
|
@@ -631,7 +632,7 @@ cli.command("[...files]", "Bundle files", {
|
|
|
631
632
|
}).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("--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("--concurrency <count>", "Maximum number of Rolldown builds to run in parallel").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) => {
|
|
632
633
|
globalLogger.level = flags.logLevel || "info";
|
|
633
634
|
globalLogger.info(`${styleText$1.blue(`tsdown v${version}`)} powered by ${styleText$1["#ff7e17,yellow"](`rolldown v${VERSION}`)}`);
|
|
634
|
-
const { build } = await import("./build-JVmLFaZt-
|
|
635
|
+
const { build } = await import("./build-JVmLFaZt-DRlLhpV3.js").then((n) => n.r).then((n) => n.r);
|
|
635
636
|
if (input.length > 0) flags.entry = input;
|
|
636
637
|
await build(flags);
|
|
637
638
|
});
|
|
@@ -345,7 +345,7 @@ var require_src$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
345
345
|
};
|
|
346
346
|
}));
|
|
347
347
|
//#endregion
|
|
348
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.
|
|
348
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.15_yaml@2.9.1/node_modules/postcss-load-config/src/req.js
|
|
349
349
|
var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
350
350
|
const { createRequire } = __require("node:module");
|
|
351
351
|
const { pathToFileURL } = __require("node:url");
|
|
@@ -387,7 +387,7 @@ var require_req = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
387
387
|
module.exports = req;
|
|
388
388
|
}));
|
|
389
389
|
//#endregion
|
|
390
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.
|
|
390
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.15_yaml@2.9.1/node_modules/postcss-load-config/src/options.js
|
|
391
391
|
var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
392
392
|
const req = require_req();
|
|
393
393
|
/**
|
|
@@ -421,7 +421,7 @@ var require_options = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
421
421
|
module.exports = options;
|
|
422
422
|
}));
|
|
423
423
|
//#endregion
|
|
424
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.
|
|
424
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.15_yaml@2.9.1/node_modules/postcss-load-config/src/plugins.js
|
|
425
425
|
var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
426
426
|
const req = require_req();
|
|
427
427
|
/**
|
|
@@ -475,7 +475,7 @@ var require_plugins = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
475
475
|
module.exports = plugins;
|
|
476
476
|
}));
|
|
477
477
|
//#endregion
|
|
478
|
-
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.
|
|
478
|
+
//#region ../../node_modules/.pnpm/postcss-load-config@6.0.1_jiti@2.7.0_postcss@8.5.28_tsx@4.23.15_yaml@2.9.1/node_modules/postcss-load-config/src/index.js
|
|
479
479
|
var require_src = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
480
480
|
const { resolve } = __require("node:path");
|
|
481
481
|
const config = require_src$1();
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import process from "node:process";
|
|
3
|
+
import { styleText } from "node:util";
|
|
4
|
+
const picomatch = createRequire(import.meta.url)("./npm_entry_picomatch.cjs");
|
|
5
|
+
function toArray(val, defaultValue) {
|
|
6
|
+
if (Array.isArray(val)) return val;
|
|
7
|
+
else if (val == null) {
|
|
8
|
+
if (defaultValue) return [defaultValue];
|
|
9
|
+
return [];
|
|
10
|
+
} else return [val];
|
|
11
|
+
}
|
|
12
|
+
function resolveComma(arr) {
|
|
13
|
+
return arr.flatMap((format) => format.split(","));
|
|
14
|
+
}
|
|
15
|
+
function resolveRegex(str) {
|
|
16
|
+
if (typeof str === "string" && str.length > 2 && str[0] === "/" && str.at(-1) === "/") return new RegExp(str.slice(1, -1));
|
|
17
|
+
return str;
|
|
18
|
+
}
|
|
19
|
+
function slash(string) {
|
|
20
|
+
return string.replaceAll("\\", "/");
|
|
21
|
+
}
|
|
22
|
+
const noop = (v) => v;
|
|
23
|
+
function matchPattern(id, patterns) {
|
|
24
|
+
return patterns.some((pattern) => {
|
|
25
|
+
if (pattern instanceof RegExp) {
|
|
26
|
+
pattern.lastIndex = 0;
|
|
27
|
+
return pattern.test(id);
|
|
28
|
+
}
|
|
29
|
+
return id === pattern || picomatch(pattern)(id);
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function pkgExists(moduleName) {
|
|
33
|
+
try {
|
|
34
|
+
import.meta.resolve(moduleName);
|
|
35
|
+
return true;
|
|
36
|
+
} catch {}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
async function importWithError(moduleName) {
|
|
40
|
+
try {
|
|
41
|
+
return await import(moduleName);
|
|
42
|
+
} catch (error) {
|
|
43
|
+
throw new Error(`Failed to import module "${moduleName}". Please ensure it is installed.`, { cause: error });
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function createConcurrencyExecutor(concurrency) {
|
|
47
|
+
if (concurrency == null) return (task) => task();
|
|
48
|
+
if (!Number.isInteger(concurrency) || concurrency < 1) throw new TypeError("`--concurrency` must be a positive integer");
|
|
49
|
+
const queue = [];
|
|
50
|
+
let active = 0;
|
|
51
|
+
return async (task) => {
|
|
52
|
+
if (active >= concurrency) await new Promise((resolve) => queue.push(resolve));
|
|
53
|
+
else active++;
|
|
54
|
+
try {
|
|
55
|
+
return await task();
|
|
56
|
+
} finally {
|
|
57
|
+
const next = queue.shift();
|
|
58
|
+
if (next) next();
|
|
59
|
+
else active--;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
function debounce(fn, delay) {
|
|
64
|
+
let timer;
|
|
65
|
+
const debounced = (...args) => {
|
|
66
|
+
clearTimeout(timer);
|
|
67
|
+
timer = setTimeout(() => fn(...args), delay);
|
|
68
|
+
};
|
|
69
|
+
debounced.cancel = () => clearTimeout(timer);
|
|
70
|
+
return debounced;
|
|
71
|
+
}
|
|
72
|
+
let supportRGB = !!process.stdout.hasColors?.(2 ** 24);
|
|
73
|
+
if (supportRGB) try {
|
|
74
|
+
styleText("#000", "");
|
|
75
|
+
} catch {
|
|
76
|
+
supportRGB = false;
|
|
77
|
+
}
|
|
78
|
+
const factory = (...formats) => new Proxy(styleText.bind(void 0, formats), { get: (_, format) => {
|
|
79
|
+
if (format[0] === "#") {
|
|
80
|
+
const [color, fallback] = format.split(",", 2);
|
|
81
|
+
if (!supportRGB) return fallback ? factory(...formats, fallback) : factory(...formats);
|
|
82
|
+
return factory(...formats, color);
|
|
83
|
+
}
|
|
84
|
+
return factory(...formats, format);
|
|
85
|
+
} });
|
|
86
|
+
const styleText$1 = factory();
|
|
87
|
+
//#endregion
|
|
88
|
+
export { noop as a, resolveRegex as c, toArray as d, matchPattern as i, slash as l, debounce as n, pkgExists as o, importWithError as r, resolveComma as s, createConcurrencyExecutor as t, styleText$1 as u };
|