@voidzero-dev/vite-plus-core 0.3.0 → 0.3.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 +0 -29
- 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 +38 -4
- package/dist/rolldown/experimental-index.mjs +35 -9
- package/dist/rolldown/experimental-runtime-types.d.ts +2 -2
- package/dist/rolldown/experimental-runtime.d.ts +2 -2
- package/dist/rolldown/experimental-runtime.mjs +2 -2
- package/dist/rolldown/filter-index.d.mts +1 -1
- package/dist/rolldown/filter-index.mjs +1 -3
- package/dist/rolldown/index.d.mts +3 -3
- 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.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-C__LJDBG.mjs → binding-DH95uVkp.mjs} +27 -27
- package/dist/rolldown/shared/{binding-Bvw14S3g.d.mts → binding-DZuNHVw4.d.mts} +19 -5
- package/dist/rolldown/shared/{bindingify-input-options-V9YvAjrr.mjs → bindingify-input-options-BL4xrXys.mjs} +11 -9
- package/dist/rolldown/shared/{constructors-CRumnw21.d.mts → constructors-BnIg8feC.d.mts} +2 -2
- package/dist/rolldown/shared/{constructors-DklcHr18.mjs → constructors-CrhQ-yy_.mjs} +1 -1
- package/dist/rolldown/shared/{create-bundler-option-DbV2ud0B.mjs → create-bundler-option-Dk9AZBn_.mjs} +72 -6
- package/dist/rolldown/shared/{define-config-DwTNhgWB.d.mts → define-config-DjHYbH6S.d.mts} +40 -3
- package/dist/rolldown/shared/{error-NcRuXAVN.mjs → error-CRNyaqoL.mjs} +1 -1
- package/dist/rolldown/shared/{load-config-Dd7jKGUy.mjs → load-config-CKqTUKwB.mjs} +1 -1
- package/dist/rolldown/shared/{normalize-string-or-regex-CFtim40S.mjs → normalize-string-or-regex-BgP6W4eD.mjs} +1 -1
- package/dist/rolldown/shared/{parse-rvxTD36n.mjs → parse-DYyNe0IU.mjs} +2 -2
- package/dist/rolldown/shared/{resolve-tsconfig-D2vSIIkR.mjs → resolve-tsconfig-jh43hFM_.mjs} +10 -6
- package/dist/rolldown/shared/{rolldown-Bblizyw1.mjs → rolldown-BpXK1q5_.mjs} +5 -4
- package/dist/rolldown/shared/{transform--WSMLt1x.d.mts → transform-CVse9_mH.d.mts} +8 -4
- package/dist/rolldown/shared/{watch-DPvOlccK.mjs → watch-Due6uYkS.mjs} +4 -4
- package/dist/rolldown/utils-index.d.mts +3 -3
- package/dist/rolldown/utils-index.mjs +5 -5
- package/dist/tsdown/{build-D_enfyvD-tOzhITac.js → build-JVmLFaZt-BN9yuB6k.js} +683 -682
- package/dist/tsdown/{debug-CKcBYQLP-By_AQqN8.js → debug-CpC4hV25-BeCITV83.js} +18 -14
- package/dist/tsdown/{detect-DGhJGEqb-LL52mV6u.js → detect-Bg-d8iUV-Cr_BRLVW.js} +10 -12
- package/dist/tsdown/{dist-BsS7BOcb.js → dist-ByW_jJfv.js} +1226 -893
- package/dist/tsdown/index-types.d.ts +239 -317
- package/dist/tsdown/index.js +4 -4
- package/dist/tsdown/internal-DTYQdXId.js +3 -0
- package/dist/tsdown/{main-Bcv7jU2b.js → main-bgV9NlwM.js} +24 -145
- package/dist/tsdown/{resolver-cwLsPb2o-Bb9SDBm6.js → resolver-DE0_sy8o-UMsN-SXx.js} +4 -4
- package/dist/tsdown/rolldown-runtime-B4iAMlE-.js +35 -0
- package/dist/tsdown/run.js +44 -8
- package/dist/tsdown/{src-JVSpR8xt.js → src-D5xv98Iu.js} +5 -5
- package/dist/tsdown/{target-Bab3CUeB-8PBzMh3p.js → target-DgdLrXba-DaJJ11xX.js} +78 -74
- package/dist/tsdown/{tsc-B8FD48Oc.js → tsc-BFDF_Im9.js} +26 -20
- package/dist/tsdown/tsdown-css.js +19 -11
- package/dist/tsdown/tsdown-exe.js +4 -4
- package/dist/vite/client/bundledDevClient.mjs +77 -42
- package/dist/vite/client/client.mjs +288 -260
- package/dist/vite/node/chunks/build.js +21 -21
- package/dist/vite/node/chunks/lib.js +2 -2
- package/dist/vite/node/chunks/node.js +32781 -32305
- package/dist/vite/node/chunks/postcss-import.js +10 -10
- package/dist/vite/node/cli.js +12 -8
- package/dist/vite/node/index.d.ts +1568 -1577
- package/dist/vite/node/index.js +1 -1
- package/dist/vite/node/module-runner.d.ts +1 -1
- package/dist/vite/node/module-runner.js +201 -202
- package/dist/vite/types/customEvent.d.ts +2 -0
- package/dist/vite/types/hmrPayload.d.ts +2 -0
- package/dist/vite/types/internal/cssPreprocessorOptions.d.ts +2 -2
- package/dist/vite/types/internal/devtoolsOptions.d.ts +9 -0
- package/package.json +28 -31
- package/dist/tsdown/internal-DSmmwu4u.js +0 -3
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as importWithError, f as resolveComma, g as toArray, h as styleText$1, n as x, r as createDebug } from "./main-bgV9NlwM.js";
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import { RUNTIME_MODULE_ID } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
5
5
|
import { access, cp, mkdir, mkdtemp, rm, stat, writeFile } from "node:fs/promises";
|
|
6
6
|
import { exactRegex } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
7
7
|
import { tmpdir } from "node:os";
|
|
8
|
-
//#region ../../node_modules/.pnpm/tsdown@0.
|
|
8
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/format-DLxyxnif.mjs
|
|
9
9
|
function fsExists(path) {
|
|
10
10
|
return access(path).then(() => true, () => false);
|
|
11
11
|
}
|
|
@@ -53,7 +53,7 @@ function formatBytes(bytes) {
|
|
|
53
53
|
return `${(bytes / 1e3).toFixed(2)} kB`;
|
|
54
54
|
}
|
|
55
55
|
//#endregion
|
|
56
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.
|
|
56
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.5_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_395c84c3f0e463da1bb9023138bdcb2e/node_modules/rolldown-plugin-dts/dist/filename-BFg1q_t3.mjs
|
|
57
57
|
const RE_JS = /\.([cm]?)jsx?$/;
|
|
58
58
|
const RE_TS = /\.([cm]?)tsx?$/;
|
|
59
59
|
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
@@ -65,8 +65,8 @@ const RE_ROLLDOWN_RUNTIME = exactRegex(RUNTIME_MODULE_ID);
|
|
|
65
65
|
function filename_js_to_dts(id) {
|
|
66
66
|
return id.replace(RE_JS, ".d.$1ts");
|
|
67
67
|
}
|
|
68
|
-
function filename_to_dts(id,
|
|
69
|
-
id =
|
|
68
|
+
function filename_to_dts(id, languageContext) {
|
|
69
|
+
id = languageContext?.toTsFilename?.(id) ?? id;
|
|
70
70
|
return id.replace(RE_TS, ".d.$1ts").replace(RE_JS, ".d.$1ts").replace(RE_JSON, ".json.d.ts");
|
|
71
71
|
}
|
|
72
72
|
function filename_dts_to(id, ext) {
|
|
@@ -79,7 +79,7 @@ function replaceTemplateName(template, name) {
|
|
|
79
79
|
return template.replaceAll("[name]", name);
|
|
80
80
|
}
|
|
81
81
|
//#endregion
|
|
82
|
-
//#region ../../node_modules/.pnpm/verkit@0.
|
|
82
|
+
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.js
|
|
83
83
|
const LETTER_DASH_NUMBER = "[a-zA-Z0-9-]";
|
|
84
84
|
const NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`;
|
|
85
85
|
const NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`;
|
|
@@ -116,30 +116,13 @@ function makeSafeRegexSource(source) {
|
|
|
116
116
|
function safeRegex(source, flags) {
|
|
117
117
|
return new RegExp(makeSafeRegexSource(source), flags);
|
|
118
118
|
}
|
|
119
|
-
const NUMERIC$1 = /^\d+$/;
|
|
120
|
-
function compareIdentifiers(left, right) {
|
|
121
|
-
if (typeof left === "number" && typeof right === "number") return left === right ? 0 : left < right ? -1 : 1;
|
|
122
|
-
const leftNumeric = NUMERIC$1.test(String(left));
|
|
123
|
-
const rightNumeric = NUMERIC$1.test(String(right));
|
|
124
|
-
const normalizedLeft = leftNumeric ? Number(left) : left;
|
|
125
|
-
const normalizedRight = rightNumeric ? Number(right) : right;
|
|
126
|
-
return normalizedLeft === normalizedRight ? 0 : leftNumeric && !rightNumeric ? -1 : rightNumeric && !leftNumeric ? 1 : normalizedLeft < normalizedRight ? -1 : 1;
|
|
127
|
-
}
|
|
128
119
|
const FULL = safeRegex(`^${FULL_PLAIN}$`);
|
|
129
120
|
const LOOSE = safeRegex(`^${LOOSE_PLAIN}$`);
|
|
130
|
-
|
|
131
|
-
safeRegex(`^${PRERELEASE_LOOSE}$`);
|
|
132
|
-
const COERCE_EXACT = safeRegex(COERCE);
|
|
133
|
-
const COERCE_FULL_EXACT = safeRegex(COERCE_FULL);
|
|
134
|
-
const NUMERIC = /^\d+$/;
|
|
121
|
+
const NUMERIC$1 = /^\d+$/;
|
|
135
122
|
function formatComparableVersion(version) {
|
|
136
123
|
const base = `${version.major}.${version.minor}.${version.patch}`;
|
|
137
124
|
return version.prerelease?.length ? `${base}-${version.prerelease.join(".")}` : base;
|
|
138
125
|
}
|
|
139
|
-
function formatFullVersion(version) {
|
|
140
|
-
const comparable = formatComparableVersion(version);
|
|
141
|
-
return version.build?.length ? `${comparable}+${version.build.join(".")}` : comparable;
|
|
142
|
-
}
|
|
143
126
|
function parse$1(version, options = {}) {
|
|
144
127
|
if (typeof version !== "string") return version;
|
|
145
128
|
if (version.length > 256) throw new TypeError(`Version exceeds the maximum length of 256 characters`);
|
|
@@ -152,7 +135,7 @@ function parse$1(version, options = {}) {
|
|
|
152
135
|
if (minor > Number.MAX_SAFE_INTEGER || minor < 0) throw new TypeError(`Invalid minor version: ${match[2]}`);
|
|
153
136
|
if (patch > Number.MAX_SAFE_INTEGER || patch < 0) throw new TypeError(`Invalid patch version: ${match[3]}`);
|
|
154
137
|
const prerelease = match[4] ? match[4].split(".").map((identifier) => {
|
|
155
|
-
if (NUMERIC.test(identifier)) {
|
|
138
|
+
if (NUMERIC$1.test(identifier)) {
|
|
156
139
|
const numeric = Number(identifier);
|
|
157
140
|
if (numeric >= 0 && numeric < Number.MAX_SAFE_INTEGER) return numeric;
|
|
158
141
|
}
|
|
@@ -173,6 +156,15 @@ function tryParse(version, options = {}) {
|
|
|
173
156
|
return null;
|
|
174
157
|
}
|
|
175
158
|
}
|
|
159
|
+
const NUMERIC = /^\d+$/;
|
|
160
|
+
function compareIdentifiers(left, right) {
|
|
161
|
+
if (typeof left === "number" && typeof right === "number") return left === right ? 0 : left < right ? -1 : 1;
|
|
162
|
+
const leftNumeric = NUMERIC.test(String(left));
|
|
163
|
+
const rightNumeric = NUMERIC.test(String(right));
|
|
164
|
+
const normalizedLeft = leftNumeric ? Number(left) : left;
|
|
165
|
+
const normalizedRight = rightNumeric ? Number(right) : right;
|
|
166
|
+
return normalizedLeft === normalizedRight ? 0 : leftNumeric && !rightNumeric ? -1 : rightNumeric && !leftNumeric ? 1 : normalizedLeft < normalizedRight ? -1 : 1;
|
|
167
|
+
}
|
|
176
168
|
function compareMainParsed(left, right) {
|
|
177
169
|
return left.major === right.major ? left.minor === right.minor ? left.patch === right.patch ? 0 : left.patch < right.patch ? -1 : 1 : left.minor < right.minor ? -1 : 1 : left.major < right.major ? -1 : 1;
|
|
178
170
|
}
|
|
@@ -194,26 +186,18 @@ function comparePrereleaseParsed(left, right) {
|
|
|
194
186
|
function compareParsed(left, right) {
|
|
195
187
|
return compareMainParsed(left, right) || comparePrereleaseParsed(left, right);
|
|
196
188
|
}
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
-
const input = typeof value === "number" ? String(value) : value;
|
|
200
|
-
if (typeof input !== "string") return null;
|
|
201
|
-
let match = null;
|
|
202
|
-
if (options.rtl) {
|
|
203
|
-
const expression = safeRegex(options.includePrerelease ? COERCE_FULL : COERCE, "g");
|
|
204
|
-
let next;
|
|
205
|
-
while ((next = expression.exec(input)) && (!match || match.index + match[0].length !== input.length)) {
|
|
206
|
-
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
207
|
-
expression.lastIndex = next.index + next[1].length + next[2].length;
|
|
208
|
-
}
|
|
209
|
-
} else match = (options.includePrerelease ? COERCE_FULL_EXACT : COERCE_EXACT).exec(input);
|
|
210
|
-
if (!match) return null;
|
|
211
|
-
const major = match[2];
|
|
212
|
-
return tryParse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
189
|
+
function compare(left, right, options = {}) {
|
|
190
|
+
return compareParsed(parse$1(left, options), parse$1(right, options));
|
|
213
191
|
}
|
|
192
|
+
function isGreaterOrEqual(left, right, options = {}) {
|
|
193
|
+
return compare(left, right, options) >= 0;
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.js
|
|
214
197
|
const STRICT_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${FULL_PLAIN})$|^$`);
|
|
215
198
|
const LOOSE_COMPARATOR$1 = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN})$|^$`);
|
|
216
199
|
function parseComparator(comparator, options = {}) {
|
|
200
|
+
if (typeof comparator !== "string") return comparator;
|
|
217
201
|
const normalized = comparator.trim().replaceAll(/\s+/g, " ");
|
|
218
202
|
const match = normalized.match(options.loose ? LOOSE_COMPARATOR$1 : STRICT_COMPARATOR);
|
|
219
203
|
if (!match) throw new TypeError(`Invalid comparator: ${normalized}`);
|
|
@@ -237,12 +221,16 @@ function testParsedComparator(comparator, version) {
|
|
|
237
221
|
case "<=": return comparison <= 0;
|
|
238
222
|
}
|
|
239
223
|
}
|
|
240
|
-
function
|
|
241
|
-
|
|
224
|
+
function comparatorAllowsPrerelease(comparator, version) {
|
|
225
|
+
const allowed = comparator.version;
|
|
226
|
+
return allowed !== null && !!allowed.prerelease?.length && allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch;
|
|
242
227
|
}
|
|
243
|
-
function
|
|
244
|
-
|
|
228
|
+
function testComparatorSet(set, version, options) {
|
|
229
|
+
if (set.some((comparator) => !testParsedComparator(comparator, version))) return false;
|
|
230
|
+
return !version.prerelease?.length || !!options.includePrerelease || set.some((comparator) => comparatorAllowsPrerelease(comparator, version));
|
|
245
231
|
}
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.js
|
|
246
234
|
const BUILD_STRIP = new RegExp(BUILD, "g");
|
|
247
235
|
const BUILD_SAFE = safeRegex(BUILD);
|
|
248
236
|
const STRICT_HYPHEN = safeRegex(String.raw`^\s*(${XRANGE_PLAIN})\s+-\s+(${XRANGE_PLAIN})\s*$`);
|
|
@@ -368,9 +356,9 @@ function parseSimpleRange(input, options) {
|
|
|
368
356
|
function parseRange(range, options = {}) {
|
|
369
357
|
if (typeof range !== "string") return range;
|
|
370
358
|
const parsedOptions = { ...options };
|
|
371
|
-
const
|
|
372
|
-
let sets =
|
|
373
|
-
if (!sets.length) throw new TypeError(`Range contains no valid comparator sets: ${
|
|
359
|
+
const normalizedRange = range.trim().replaceAll(/\s+/g, " ");
|
|
360
|
+
let sets = normalizedRange.split("||").map((part) => parseSimpleRange(part.trim(), parsedOptions)).filter((set) => set.length);
|
|
361
|
+
if (!sets.length) throw new TypeError(`Range contains no valid comparator sets: ${normalizedRange}`);
|
|
374
362
|
if (sets.length > 1) {
|
|
375
363
|
const first = sets[0];
|
|
376
364
|
sets = sets.filter((set) => set[0]?.value !== "<0.0.0-0");
|
|
@@ -381,9 +369,7 @@ function parseRange(range, options = {}) {
|
|
|
381
369
|
}
|
|
382
370
|
}
|
|
383
371
|
return {
|
|
384
|
-
normalized: sets.map((set) => set.map((comparator) => comparator.value).join(" ")).join("||"),
|
|
385
372
|
options: parsedOptions,
|
|
386
|
-
raw,
|
|
387
373
|
sets
|
|
388
374
|
};
|
|
389
375
|
}
|
|
@@ -394,14 +380,6 @@ function tryParseRange(range, options = {}) {
|
|
|
394
380
|
return null;
|
|
395
381
|
}
|
|
396
382
|
}
|
|
397
|
-
function testComparatorSet(set, version, options) {
|
|
398
|
-
if (set.some((comparator) => !testParsedComparator(comparator, version))) return false;
|
|
399
|
-
if (!version.prerelease?.length || options.includePrerelease) return true;
|
|
400
|
-
return set.some((comparator) => {
|
|
401
|
-
const allowed = comparator.version;
|
|
402
|
-
return allowed !== null && allowed.prerelease?.length && allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch;
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
383
|
function testParsedRange(range, version) {
|
|
406
384
|
return range.sets.some((set) => testComparatorSet(set, version, range.options));
|
|
407
385
|
}
|
|
@@ -415,7 +393,7 @@ function satisfies(version, range, options = {}) {
|
|
|
415
393
|
}
|
|
416
394
|
function nextVersionAfter(version) {
|
|
417
395
|
const { prerelease } = version;
|
|
418
|
-
return
|
|
396
|
+
return prerelease?.length ? {
|
|
419
397
|
major: version.major,
|
|
420
398
|
minor: version.minor,
|
|
421
399
|
patch: version.patch,
|
|
@@ -424,36 +402,61 @@ function nextVersionAfter(version) {
|
|
|
424
402
|
major: version.major,
|
|
425
403
|
minor: version.minor,
|
|
426
404
|
patch: version.patch + 1
|
|
427
|
-
}
|
|
405
|
+
};
|
|
428
406
|
}
|
|
429
407
|
function findMinimumForRange(range, options = {}) {
|
|
430
408
|
const parsedRange = parseRange(range, options);
|
|
431
|
-
const zero =
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
409
|
+
const zero = {
|
|
410
|
+
major: 0,
|
|
411
|
+
minor: 0,
|
|
412
|
+
patch: 0
|
|
413
|
+
};
|
|
414
|
+
if (testParsedRange(parsedRange, zero)) return zero;
|
|
415
|
+
const zeroPrerelease = {
|
|
416
|
+
...zero,
|
|
417
|
+
prerelease: [0]
|
|
418
|
+
};
|
|
419
|
+
if (testParsedRange(parsedRange, zeroPrerelease)) return zeroPrerelease;
|
|
435
420
|
let minimum = null;
|
|
436
421
|
for (const set of parsedRange.sets) {
|
|
437
422
|
let setMinimum = null;
|
|
438
423
|
for (const comparator of set) {
|
|
439
424
|
if (!comparator.version) continue;
|
|
440
|
-
const candidate = comparator.operator === ">" ? nextVersionAfter(comparator.version) : comparator.operator === "" || comparator.operator === ">=" ? comparator.version : null;
|
|
425
|
+
const candidate = comparator.operator === ">" ? nextVersionAfter(comparator.version) : comparator.operator === "" || comparator.operator === ">=" ? structuredClone(comparator.version) : null;
|
|
441
426
|
if (candidate && (!setMinimum || compareParsed(candidate, setMinimum) > 0)) setMinimum = candidate;
|
|
442
427
|
}
|
|
443
428
|
if (setMinimum && (!minimum || compareParsed(minimum, setMinimum) > 0)) minimum = setMinimum;
|
|
444
429
|
}
|
|
445
|
-
return minimum && testParsedRange(parsedRange, minimum) ?
|
|
430
|
+
return minimum && testParsedRange(parsedRange, minimum) ? minimum : null;
|
|
446
431
|
}
|
|
432
|
+
//#endregion
|
|
433
|
+
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.js
|
|
434
|
+
const COERCE_EXACT = safeRegex(COERCE);
|
|
435
|
+
const COERCE_FULL_EXACT = safeRegex(COERCE_FULL);
|
|
436
|
+
safeRegex(`^${PRERELEASE}$`);
|
|
437
|
+
safeRegex(`^${PRERELEASE_LOOSE}$`);
|
|
447
438
|
function normalize$1(version, options = {}) {
|
|
448
439
|
const parsed = tryParse(version, options);
|
|
449
440
|
return parsed ? formatComparableVersion(parsed) : null;
|
|
450
441
|
}
|
|
451
442
|
function coerce(value, options = {}) {
|
|
452
|
-
|
|
453
|
-
|
|
443
|
+
if (typeof value === "object") return value;
|
|
444
|
+
const input = typeof value === "number" ? String(value) : value;
|
|
445
|
+
let match = null;
|
|
446
|
+
if (options.rtl) {
|
|
447
|
+
const expression = safeRegex(options.includePrerelease ? COERCE_FULL : COERCE, "g");
|
|
448
|
+
let next;
|
|
449
|
+
while ((next = expression.exec(input)) && (!match || match.index + match[0].length !== input.length)) {
|
|
450
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
451
|
+
expression.lastIndex = next.index + next[1].length + next[2].length;
|
|
452
|
+
}
|
|
453
|
+
} else match = (options.includePrerelease ? COERCE_FULL_EXACT : COERCE_EXACT).exec(input);
|
|
454
|
+
if (!match) return null;
|
|
455
|
+
const major = match[2];
|
|
456
|
+
return tryParse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
454
457
|
}
|
|
455
458
|
//#endregion
|
|
456
|
-
//#region ../../node_modules/.pnpm/tsdown@0.
|
|
459
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_298964156353ef75a02894ab80b3a2e6/node_modules/tsdown/dist/target-DgdLrXba.mjs
|
|
457
460
|
const NODE_SEA_MIN_VERSION = "25.7.0";
|
|
458
461
|
const NODE_SEA_MIN_VERSION_PARSED = {
|
|
459
462
|
major: 25,
|
|
@@ -544,9 +547,9 @@ async function buildSingleExe(config, bundledFile, outputFile, executable, targe
|
|
|
544
547
|
const stat = await fsStat(outputPath);
|
|
545
548
|
if (stat) {
|
|
546
549
|
const sizeText = formatBytes(stat.size);
|
|
547
|
-
config.logger.info(config.nameLabel, bold(path.relative(config.cwd, outputPath)), ` ${dim(sizeText)}`);
|
|
550
|
+
config.logger.info(config.nameLabel, styleText$1.bold(path.relative(config.cwd, outputPath)), ` ${styleText$1.dim(sizeText)}`);
|
|
548
551
|
}
|
|
549
|
-
config.logger.success(config.nameLabel, `Built executable: ${red(path.relative(config.cwd, outputPath))}`, dim`(${Math.round(performance.now() - t)}ms)`);
|
|
552
|
+
config.logger.success(config.nameLabel, `Built executable: ${styleText$1.red(path.relative(config.cwd, outputPath))}`, styleText$1.dim(`(${Math.round(performance.now() - t)}ms)`));
|
|
550
553
|
}
|
|
551
554
|
const BASELINE_WIDELY_AVAILABLE_TARGET = [
|
|
552
555
|
"chrome111",
|
|
@@ -575,8 +578,9 @@ function resolvePackageTarget(pkg) {
|
|
|
575
578
|
if (!nodeVersion) return;
|
|
576
579
|
const nodeMinVersion = findMinimumForRange(nodeVersion);
|
|
577
580
|
if (!nodeMinVersion) return;
|
|
578
|
-
|
|
579
|
-
return
|
|
581
|
+
const normalized = normalize$1(nodeMinVersion);
|
|
582
|
+
if (normalized === "0.0.0") return;
|
|
583
|
+
return `node${normalized}`;
|
|
580
584
|
}
|
|
581
585
|
//#endregion
|
|
582
|
-
export { fsStat as A, filename_to_dts as C, fsCopy as D, formatBytes as E, stripExtname as M, fsExists as O, filename_js_to_dts as S, resolveTemplateFn as T, RE_JSON as _, resolveTarget as a, RE_TS as b,
|
|
586
|
+
export { fsStat as A, filename_to_dts as C, fsCopy as D, formatBytes as E, stripExtname as M, fsExists as O, filename_js_to_dts as S, resolveTemplateFn as T, RE_JSON as _, resolveTarget as a, RE_TS as b, normalize$1 as c, isGreaterOrEqual as d, tryParse as f, RE_JS as g, RE_DTS_MAP as h, expandBaselineTarget as i, lowestCommonAncestor as j, fsRemove as k, parseRange as l, RE_DTS as m, NODE_SEA_MIN_VERSION_PARSED as n, validateSea as o, RE_CSS as p, buildExe as r, coerce as s, NODE_SEA_MIN_VERSION as t, satisfies as u, RE_NODE_MODULES as v, replaceTemplateName as w, filename_dts_to as x, RE_ROLLDOWN_RUNTIME as y };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { r as createDebug } from "./main-
|
|
2
|
-
import { h as RE_DTS_MAP, m as RE_DTS } from "./target-
|
|
3
|
-
import { n as globalContext, t as
|
|
1
|
+
import { r as createDebug } from "./main-bgV9NlwM.js";
|
|
2
|
+
import { h as RE_DTS_MAP, m as RE_DTS } from "./target-DgdLrXba-DaJJ11xX.js";
|
|
3
|
+
import { n as globalContext, t as requireTSApi } from "./dist-ByW_jJfv.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.
|
|
6
|
+
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.5_@typescript+native-preview@7.0.0-dev.20260605.1_oxc-resolver_395c84c3f0e463da1bb9023138bdcb2e/node_modules/rolldown-plugin-dts/dist/tsc-9-3lXpbY.mjs
|
|
7
7
|
const debug$3 = createDebug("rolldown-plugin-dts:tsc-system");
|
|
8
|
-
const ts$3 =
|
|
8
|
+
const ts$3 = requireTSApi();
|
|
9
9
|
/**
|
|
10
10
|
* A system that writes files to both memory and disk. It will try read files
|
|
11
11
|
* from memory firstly and fallback to disk if not found.
|
|
@@ -21,7 +21,7 @@ function createFsSystem(files) {
|
|
|
21
21
|
return ts$3.sys.resolvePath(path);
|
|
22
22
|
},
|
|
23
23
|
directoryExists(directory) {
|
|
24
|
-
if (
|
|
24
|
+
if (files.keys().some((path) => path.startsWith(directory))) return true;
|
|
25
25
|
return ts$3.sys.directoryExists(directory);
|
|
26
26
|
},
|
|
27
27
|
fileExists(fileName) {
|
|
@@ -53,7 +53,7 @@ function createMemorySystem(files) {
|
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
const ts$2 =
|
|
56
|
+
const ts$2 = requireTSApi();
|
|
57
57
|
const formatHost = {
|
|
58
58
|
getCurrentDirectory: () => ts$2.sys.getCurrentDirectory(),
|
|
59
59
|
getNewLine: () => ts$2.sys.newLine,
|
|
@@ -81,7 +81,7 @@ function setSourceMapRoot(map, originalFilePath, finalFilePath) {
|
|
|
81
81
|
const finalDir = path.posix.dirname(pathToFileURL(finalFilePath).pathname);
|
|
82
82
|
if (originalDir !== finalDir) map.sourceRoot = path.posix.relative(finalDir, originalDir);
|
|
83
83
|
}
|
|
84
|
-
const ts$1 =
|
|
84
|
+
const ts$1 = requireTSApi();
|
|
85
85
|
const debug$2 = createDebug("rolldown-plugin-dts:tsc-build");
|
|
86
86
|
function tscEmitBuild(tscOptions) {
|
|
87
87
|
const { id, tsconfig, incremental, context = globalContext, sourcemap } = tscOptions;
|
|
@@ -152,7 +152,11 @@ function buildProjects(fsSystem, tsconfig, force, sourcemap) {
|
|
|
152
152
|
debug$2(`start building projects for ${tsconfig}`);
|
|
153
153
|
const projects = collectProjectGraph(tsconfig, fsSystem, force, sourcemap);
|
|
154
154
|
debug$2("collected %d projects: %j", projects.length, projects.map((project) => project.tsconfigPath));
|
|
155
|
-
const host = ts$1.createSolutionBuilderHost(fsSystem, createProgramWithPatchedCompilerOptions
|
|
155
|
+
const host = ts$1.createSolutionBuilderHost(fsSystem, createProgramWithPatchedCompilerOptions({
|
|
156
|
+
force,
|
|
157
|
+
sourcemap,
|
|
158
|
+
tsconfigPath: tsconfig
|
|
159
|
+
}));
|
|
156
160
|
const exitStatus = ts$1.createSolutionBuilder(host, [tsconfig], {
|
|
157
161
|
force,
|
|
158
162
|
verbose: true
|
|
@@ -182,7 +186,7 @@ function collectProjectGraph(rootTsconfigPath, fsSystem, force, sourcemap) {
|
|
|
182
186
|
parsedConfig.options = patchCompilerOptions(parsedConfig.options, {
|
|
183
187
|
tsconfigPath,
|
|
184
188
|
force,
|
|
185
|
-
sourcemap
|
|
189
|
+
sourcemap: sourcemap && parsedConfig.fileNames.length > 0
|
|
186
190
|
});
|
|
187
191
|
projects.push({
|
|
188
192
|
tsconfigPath,
|
|
@@ -231,11 +235,13 @@ function patchCompilerOptions(options, extraOptions) {
|
|
|
231
235
|
}
|
|
232
236
|
return options;
|
|
233
237
|
}
|
|
234
|
-
|
|
235
|
-
return
|
|
236
|
-
};
|
|
238
|
+
function createProgramWithPatchedCompilerOptions(patchOptions) {
|
|
239
|
+
return (rootNames, options, ...args) => {
|
|
240
|
+
return ts$1.createEmitAndSemanticDiagnosticsBuilderProgram(rootNames, patchCompilerOptions(options ?? {}, patchOptions), ...args);
|
|
241
|
+
};
|
|
242
|
+
}
|
|
237
243
|
const debug$1 = createDebug("rolldown-plugin-dts:tsc-compiler");
|
|
238
|
-
const ts =
|
|
244
|
+
const ts = requireTSApi();
|
|
239
245
|
const defaultCompilerOptions = {
|
|
240
246
|
declaration: true,
|
|
241
247
|
noEmit: false,
|
|
@@ -268,10 +274,10 @@ function createOrGetTsModule(options) {
|
|
|
268
274
|
context.programs.push(module.program);
|
|
269
275
|
return module;
|
|
270
276
|
}
|
|
271
|
-
function createTsProgram({ entries, id, tsconfig, tsconfigRaw,
|
|
277
|
+
function createTsProgram({ entries, id, tsconfig, tsconfigRaw, languageContext, cwd, context = globalContext }) {
|
|
272
278
|
const fsSystem = createFsSystem(context.files);
|
|
273
279
|
const baseDir = tsconfig ? path.dirname(tsconfig) : cwd;
|
|
274
|
-
const parsedConfig = ts.parseJsonConfigFileContent(tsconfigRaw, fsSystem, baseDir, void 0, void 0, void 0,
|
|
280
|
+
const parsedConfig = ts.parseJsonConfigFileContent(tsconfigRaw, fsSystem, baseDir, void 0, void 0, void 0, languageContext.getExtraFileExtensions());
|
|
275
281
|
debug$1(`creating program for root project: ${baseDir}`);
|
|
276
282
|
return createTsProgramFromParsedConfig({
|
|
277
283
|
parsedConfig,
|
|
@@ -279,20 +285,20 @@ function createTsProgram({ entries, id, tsconfig, tsconfigRaw, volarContext, cwd
|
|
|
279
285
|
baseDir,
|
|
280
286
|
id,
|
|
281
287
|
entries,
|
|
282
|
-
|
|
288
|
+
languageContext
|
|
283
289
|
});
|
|
284
290
|
}
|
|
285
|
-
function createTsProgramFromParsedConfig({ parsedConfig, fsSystem, baseDir, id, entries,
|
|
291
|
+
function createTsProgramFromParsedConfig({ parsedConfig, fsSystem, baseDir, id, entries, languageContext }) {
|
|
286
292
|
const compilerOptions = {
|
|
287
293
|
...defaultCompilerOptions,
|
|
288
294
|
...parsedConfig.options,
|
|
289
295
|
$configRaw: parsedConfig.raw,
|
|
290
296
|
$rootDir: baseDir,
|
|
291
|
-
...
|
|
297
|
+
...languageContext.languages.length ? { allowNonTsExtensions: true } : void 0
|
|
292
298
|
};
|
|
293
299
|
const rootNames = [...new Set([id, ...entries || parsedConfig.fileNames].map((f) => fsSystem.resolvePath(f)))];
|
|
294
300
|
const host = ts.createCompilerHost(compilerOptions, true);
|
|
295
|
-
const program =
|
|
301
|
+
const program = languageContext.getCreateProgram(ts)({
|
|
296
302
|
rootNames,
|
|
297
303
|
options: compilerOptions,
|
|
298
304
|
host,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
1
|
+
import { i as __toESM } from "./rolldown-runtime-B4iAMlE-.js";
|
|
2
|
+
import { c as importWithError, f as resolveComma, g as toArray } from "./main-bgV9NlwM.js";
|
|
3
|
+
import { i as expandBaselineTarget } from "./target-DgdLrXba-DaJJ11xX.js";
|
|
4
|
+
import "./internal-DTYQdXId.js";
|
|
4
5
|
import path from "node:path";
|
|
6
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
5
7
|
import { readFileSync } from "node:fs";
|
|
6
8
|
import { readFile } from "node:fs/promises";
|
|
7
|
-
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
8
9
|
import { ResolverFactory } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
9
|
-
//#region ../../node_modules/.pnpm/@tsdown+css@0.
|
|
10
|
+
//#region ../../node_modules/.pnpm/@tsdown+css@0.23.0_jiti@2.7.0_postcss-import@16.2.0_postcss@8.5.28__postcss-modules@9.0_e1d5b637aa455af0c2e0c072fcd26c64/node_modules/@tsdown/css/dist/index.mjs
|
|
10
11
|
const defaultCssBundleName = "style.css";
|
|
11
12
|
function resolveCssOptions(options = {}, topLevelTarget, unbundle) {
|
|
12
13
|
let cssTarget;
|
|
@@ -40,9 +41,13 @@ function modulesToEsm(modules) {
|
|
|
40
41
|
function dashToCamel(str) {
|
|
41
42
|
return str.replaceAll(/-([a-z])/g, (_, c) => c.toUpperCase());
|
|
42
43
|
}
|
|
43
|
-
function applyLocalsConvention(modules, convention) {
|
|
44
|
+
function applyLocalsConvention(modules, convention, inputFile) {
|
|
44
45
|
const result = {};
|
|
45
46
|
for (const [key, value] of Object.entries(modules)) {
|
|
47
|
+
if (typeof convention === "function") {
|
|
48
|
+
result[convention(key, value, inputFile)] = value;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
46
51
|
const camelized = dashToCamel(key);
|
|
47
52
|
switch (convention) {
|
|
48
53
|
case "camelCase":
|
|
@@ -426,6 +431,7 @@ async function bundleWithLightningCSS(filename, options, code) {
|
|
|
426
431
|
sourceMap: options.sourceMap,
|
|
427
432
|
resolver: {
|
|
428
433
|
async read(filePath) {
|
|
434
|
+
if (filePath !== filename) deps.push(filePath);
|
|
429
435
|
let fileCode;
|
|
430
436
|
if (code != null && filePath === filename) fileCode = code;
|
|
431
437
|
else fileCode = readFileSync(filePath, "utf8");
|
|
@@ -604,7 +610,7 @@ async function loadFileConfig(searchPath) {
|
|
|
604
610
|
if (cached !== void 0) return cached;
|
|
605
611
|
const promise = (async () => {
|
|
606
612
|
try {
|
|
607
|
-
const postcssrc = (await import("./src-
|
|
613
|
+
const postcssrc = (await import("./src-D5xv98Iu.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1))).default;
|
|
608
614
|
const result = await postcssrc({}, searchPath);
|
|
609
615
|
return {
|
|
610
616
|
options: result.options,
|
|
@@ -636,9 +642,9 @@ async function processWithPostCSS$1(code, filename, postcssOption, cwd, injectIm
|
|
|
636
642
|
let modules;
|
|
637
643
|
if (modulesOptions?.isModule) {
|
|
638
644
|
const postcssModules = await importWithError("postcss-modules");
|
|
639
|
-
const
|
|
645
|
+
const userGetJSON = modulesOptions.config?.getJSON;
|
|
640
646
|
plugins.push((postcssModules.default ?? postcssModules)({
|
|
641
|
-
...
|
|
647
|
+
...modulesOptions.config,
|
|
642
648
|
getJSON(cssFileName, json, outputFileName) {
|
|
643
649
|
modules = json;
|
|
644
650
|
userGetJSON?.(cssFileName, json, outputFileName);
|
|
@@ -751,8 +757,10 @@ function CssPlugin(config, { logger }) {
|
|
|
751
757
|
if (code.length && !code.endsWith("\n")) code += "\n";
|
|
752
758
|
if (modules) {
|
|
753
759
|
const modulesConfig = typeof cssConfig.css.modules === "object" ? cssConfig.css.modules : void 0;
|
|
754
|
-
if (
|
|
755
|
-
|
|
760
|
+
if (cssConfig.css.transformer === "lightningcss") {
|
|
761
|
+
if (modulesConfig?.localsConvention) modules = applyLocalsConvention(modules, modulesConfig.localsConvention, cleanId);
|
|
762
|
+
modulesConfig?.getJSON?.(cleanId, modules, cleanId);
|
|
763
|
+
}
|
|
756
764
|
modulesMap.set(id, modules);
|
|
757
765
|
}
|
|
758
766
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as x, r as createDebug } from "./main-
|
|
2
|
-
import { O as fsExists, c as isGreaterOrEqual, f as tryParse, k as fsRemove,
|
|
3
|
-
import "./internal-
|
|
1
|
+
import { n as x, r as createDebug } from "./main-bgV9NlwM.js";
|
|
2
|
+
import { O as fsExists, c as normalize$1, d as isGreaterOrEqual, f as tryParse, k as fsRemove, n as NODE_SEA_MIN_VERSION_PARSED, t as NODE_SEA_MIN_VERSION } from "./target-DgdLrXba-DaJJ11xX.js";
|
|
3
|
+
import "./internal-DTYQdXId.js";
|
|
4
4
|
import process from "node:process";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { pipeline } from "node:stream/promises";
|
|
@@ -9,7 +9,7 @@ import { createReadStream, createWriteStream } from "node:fs";
|
|
|
9
9
|
import { chmod, mkdir, rename } from "node:fs/promises";
|
|
10
10
|
import os from "node:os";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
|
-
//#region ../../node_modules/.pnpm/@tsdown+exe@0.
|
|
12
|
+
//#region ../../node_modules/.pnpm/@tsdown+exe@0.23.0_tsdown@0.23.0/node_modules/@tsdown/exe/dist/index.mjs
|
|
13
13
|
function getCacheDir() {
|
|
14
14
|
const home = os.homedir();
|
|
15
15
|
if (process.platform === "win32") {
|