@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
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as toArray, r as importWithError, s as resolveComma, u as styleText$1 } from "./style-DiMP8pYv-DIC5PXeH.js";
|
|
2
|
+
import { n as x, r as createDebug } from "./main-CyNcZUzu.js";
|
|
3
|
+
import { a as GREATER_LESS_THAN, c as LOOSE_PLAIN, d as compareParsed, f as formatComparableVersion, g as tryParse, h as safeRegex, i as FULL_PLAIN, l as XRANGE_PLAIN, m as parse$1, n as normalize$1, o as LONE_CARET, p as isGreaterOrEqual, r as BUILD, s as LONE_TILDE, u as XRANGE_PLAIN_LOOSE, v as RE_DTS } from "./version-CQ98ZBpL-D6GAHapk.js";
|
|
2
4
|
import process from "node:process";
|
|
3
5
|
import path from "node:path";
|
|
4
|
-
import { RUNTIME_MODULE_ID } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
5
6
|
import { access, cp, mkdir, mkdtemp, rm, stat, writeFile } from "node:fs/promises";
|
|
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.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.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_322c16727ed86a15fb2ecef349e911e9/node_modules/tsdown/dist/format-DLxyxnif.mjs
|
|
9
9
|
function fsExists(path) {
|
|
10
10
|
return access(path).then(() => true, () => false);
|
|
11
11
|
}
|
|
@@ -53,146 +53,6 @@ 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.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
|
-
const RE_JS = /\.([cm]?)jsx?$/;
|
|
58
|
-
const RE_TS = /\.([cm]?)tsx?$/;
|
|
59
|
-
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
60
|
-
const RE_DTS_MAP = /\.d\.([cm]?)ts\.map$/;
|
|
61
|
-
const RE_NODE_MODULES = /[\\/]node_modules[\\/]/;
|
|
62
|
-
const RE_CSS = /\.(?:css|scss|sass|less|styl|stylus)$/;
|
|
63
|
-
const RE_JSON = /\.json$/;
|
|
64
|
-
const RE_ROLLDOWN_RUNTIME = exactRegex(RUNTIME_MODULE_ID);
|
|
65
|
-
function filename_js_to_dts(id) {
|
|
66
|
-
return id.replace(RE_JS, ".d.$1ts");
|
|
67
|
-
}
|
|
68
|
-
function filename_to_dts(id, languageContext) {
|
|
69
|
-
id = languageContext?.toTsFilename?.(id) ?? id;
|
|
70
|
-
return id.replace(RE_TS, ".d.$1ts").replace(RE_JS, ".d.$1ts").replace(RE_JSON, ".json.d.ts");
|
|
71
|
-
}
|
|
72
|
-
function filename_dts_to(id, ext) {
|
|
73
|
-
return id.replace(RE_DTS, `.$1${ext}`);
|
|
74
|
-
}
|
|
75
|
-
function resolveTemplateFn(fn, chunk) {
|
|
76
|
-
return typeof fn === "function" ? fn(chunk) : fn;
|
|
77
|
-
}
|
|
78
|
-
function replaceTemplateName(template, name) {
|
|
79
|
-
return template.replaceAll("[name]", name);
|
|
80
|
-
}
|
|
81
|
-
//#endregion
|
|
82
|
-
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.js
|
|
83
|
-
const LETTER_DASH_NUMBER = "[a-zA-Z0-9-]";
|
|
84
|
-
const NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`;
|
|
85
|
-
const NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`;
|
|
86
|
-
const NON_NUMERIC_IDENTIFIER = String.raw`\d*[a-zA-Z-]${LETTER_DASH_NUMBER}*`;
|
|
87
|
-
const MAIN_VERSION = String.raw`(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})`;
|
|
88
|
-
const MAIN_VERSION_LOOSE = String.raw`(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
89
|
-
const PRERELEASE_IDENTIFIER = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER})`;
|
|
90
|
-
const PRERELEASE_IDENTIFIER_LOOSE = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
91
|
-
const PRERELEASE = String.raw`(?:-(${PRERELEASE_IDENTIFIER}(?:\.${PRERELEASE_IDENTIFIER})*))`;
|
|
92
|
-
const PRERELEASE_LOOSE = String.raw`(?:-?(${PRERELEASE_IDENTIFIER_LOOSE}(?:\.${PRERELEASE_IDENTIFIER_LOOSE})*))`;
|
|
93
|
-
const BUILD_IDENTIFIER = `${LETTER_DASH_NUMBER}+`;
|
|
94
|
-
const BUILD = String.raw`(?:\+(${BUILD_IDENTIFIER}(?:\.${BUILD_IDENTIFIER})*))`;
|
|
95
|
-
const FULL_PLAIN = `v?${MAIN_VERSION}${PRERELEASE}?${BUILD}?`;
|
|
96
|
-
const LOOSE_PLAIN = String.raw`[v=\s]*${MAIN_VERSION_LOOSE}${PRERELEASE_LOOSE}?${BUILD}?`;
|
|
97
|
-
const GREATER_LESS_THAN = "((?:<|>)?=?)";
|
|
98
|
-
const XRANGE_IDENTIFIER = String.raw`${NUMERIC_IDENTIFIER}|x|X|\*`;
|
|
99
|
-
const XRANGE_IDENTIFIER_LOOSE = String.raw`${NUMERIC_IDENTIFIER_LOOSE}|x|X|\*`;
|
|
100
|
-
const XRANGE_PLAIN = String.raw`[v=\s]*(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:${PRERELEASE})?${BUILD}?)?)?`;
|
|
101
|
-
const XRANGE_PLAIN_LOOSE = String.raw`[v=\s]*(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:${PRERELEASE_LOOSE})?${BUILD}?)?)?`;
|
|
102
|
-
const LONE_TILDE = "(?:~>?)";
|
|
103
|
-
const LONE_CARET = String.raw`(?:\^)`;
|
|
104
|
-
const COERCE_PLAIN = String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`;
|
|
105
|
-
const COERCE = String.raw`${COERCE_PLAIN}(?:$|[^\d])`;
|
|
106
|
-
const COERCE_FULL = String.raw`${COERCE_PLAIN}(?:${PRERELEASE})?(?:${BUILD})?(?:$|[^\d])`;
|
|
107
|
-
function makeSafeRegexSource(source) {
|
|
108
|
-
const replacements = [
|
|
109
|
-
[String.raw`\s`, 1],
|
|
110
|
-
[String.raw`\d`, 256],
|
|
111
|
-
[LETTER_DASH_NUMBER, 250]
|
|
112
|
-
];
|
|
113
|
-
for (const [token, maximum] of replacements) source = source.split(`${token}*`).join(`${token}{0,${maximum}}`).split(`${token}+`).join(`${token}{1,${maximum}}`);
|
|
114
|
-
return source;
|
|
115
|
-
}
|
|
116
|
-
function safeRegex(source, flags) {
|
|
117
|
-
return new RegExp(makeSafeRegexSource(source), flags);
|
|
118
|
-
}
|
|
119
|
-
const FULL = safeRegex(`^${FULL_PLAIN}$`);
|
|
120
|
-
const LOOSE = safeRegex(`^${LOOSE_PLAIN}$`);
|
|
121
|
-
const NUMERIC$1 = /^\d+$/;
|
|
122
|
-
function formatComparableVersion(version) {
|
|
123
|
-
const base = `${version.major}.${version.minor}.${version.patch}`;
|
|
124
|
-
return version.prerelease?.length ? `${base}-${version.prerelease.join(".")}` : base;
|
|
125
|
-
}
|
|
126
|
-
function parse$1(version, options = {}) {
|
|
127
|
-
if (typeof version !== "string") return version;
|
|
128
|
-
if (version.length > 256) throw new TypeError(`Version exceeds the maximum length of 256 characters`);
|
|
129
|
-
const match = version.trim().match(options.loose ? LOOSE : FULL);
|
|
130
|
-
if (!match) throw new TypeError(`Invalid version syntax: ${version}`);
|
|
131
|
-
const major = Number(match[1]);
|
|
132
|
-
const minor = Number(match[2]);
|
|
133
|
-
const patch = Number(match[3]);
|
|
134
|
-
if (major > Number.MAX_SAFE_INTEGER || major < 0) throw new TypeError(`Invalid major version: ${match[1]}`);
|
|
135
|
-
if (minor > Number.MAX_SAFE_INTEGER || minor < 0) throw new TypeError(`Invalid minor version: ${match[2]}`);
|
|
136
|
-
if (patch > Number.MAX_SAFE_INTEGER || patch < 0) throw new TypeError(`Invalid patch version: ${match[3]}`);
|
|
137
|
-
const prerelease = match[4] ? match[4].split(".").map((identifier) => {
|
|
138
|
-
if (NUMERIC$1.test(identifier)) {
|
|
139
|
-
const numeric = Number(identifier);
|
|
140
|
-
if (numeric >= 0 && numeric < Number.MAX_SAFE_INTEGER) return numeric;
|
|
141
|
-
}
|
|
142
|
-
return identifier;
|
|
143
|
-
}) : void 0;
|
|
144
|
-
return {
|
|
145
|
-
build: match[5]?.split("."),
|
|
146
|
-
major,
|
|
147
|
-
minor,
|
|
148
|
-
patch,
|
|
149
|
-
prerelease
|
|
150
|
-
};
|
|
151
|
-
}
|
|
152
|
-
function tryParse(version, options = {}) {
|
|
153
|
-
try {
|
|
154
|
-
return parse$1(version, options);
|
|
155
|
-
} catch {
|
|
156
|
-
return null;
|
|
157
|
-
}
|
|
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
|
-
}
|
|
168
|
-
function compareMainParsed(left, right) {
|
|
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;
|
|
170
|
-
}
|
|
171
|
-
function comparePrereleaseParsed(left, right) {
|
|
172
|
-
const leftPrerelease = left.prerelease;
|
|
173
|
-
const rightPrerelease = right.prerelease;
|
|
174
|
-
if (leftPrerelease?.length && !rightPrerelease?.length) return -1;
|
|
175
|
-
if (!leftPrerelease?.length && rightPrerelease?.length) return 1;
|
|
176
|
-
if (!leftPrerelease?.length && !rightPrerelease?.length) return 0;
|
|
177
|
-
for (let index = 0;; index++) {
|
|
178
|
-
const leftIdentifier = leftPrerelease?.[index];
|
|
179
|
-
const rightIdentifier = rightPrerelease?.[index];
|
|
180
|
-
if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0;
|
|
181
|
-
if (rightIdentifier === void 0) return 1;
|
|
182
|
-
if (leftIdentifier === void 0) return -1;
|
|
183
|
-
if (leftIdentifier !== rightIdentifier) return compareIdentifiers(leftIdentifier, rightIdentifier);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
function compareParsed(left, right) {
|
|
187
|
-
return compareMainParsed(left, right) || comparePrereleaseParsed(left, right);
|
|
188
|
-
}
|
|
189
|
-
function compare(left, right, options = {}) {
|
|
190
|
-
return compareParsed(parse$1(left, options), parse$1(right, options));
|
|
191
|
-
}
|
|
192
|
-
function isGreaterOrEqual(left, right, options = {}) {
|
|
193
|
-
return compare(left, right, options) >= 0;
|
|
194
|
-
}
|
|
195
|
-
//#endregion
|
|
196
56
|
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.js
|
|
197
57
|
const STRICT_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${FULL_PLAIN})$|^$`);
|
|
198
58
|
const LOOSE_COMPARATOR$1 = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${LOOSE_PLAIN})$|^$`);
|
|
@@ -430,33 +290,7 @@ function findMinimumForRange(range, options = {}) {
|
|
|
430
290
|
return minimum && testParsedRange(parsedRange, minimum) ? minimum : null;
|
|
431
291
|
}
|
|
432
292
|
//#endregion
|
|
433
|
-
//#region ../../node_modules/.pnpm/
|
|
434
|
-
const COERCE_EXACT = safeRegex(COERCE);
|
|
435
|
-
const COERCE_FULL_EXACT = safeRegex(COERCE_FULL);
|
|
436
|
-
safeRegex(`^${PRERELEASE}$`);
|
|
437
|
-
safeRegex(`^${PRERELEASE_LOOSE}$`);
|
|
438
|
-
function normalize$1(version, options = {}) {
|
|
439
|
-
const parsed = tryParse(version, options);
|
|
440
|
-
return parsed ? formatComparableVersion(parsed) : null;
|
|
441
|
-
}
|
|
442
|
-
function coerce(value, options = {}) {
|
|
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);
|
|
457
|
-
}
|
|
458
|
-
//#endregion
|
|
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
|
|
293
|
+
//#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/target-DgdLrXba.mjs
|
|
460
294
|
const NODE_SEA_MIN_VERSION = "25.7.0";
|
|
461
295
|
const NODE_SEA_MIN_VERSION_PARSED = {
|
|
462
296
|
major: 25,
|
|
@@ -583,4 +417,4 @@ function resolvePackageTarget(pkg) {
|
|
|
583
417
|
return `node${normalized}`;
|
|
584
418
|
}
|
|
585
419
|
//#endregion
|
|
586
|
-
export {
|
|
420
|
+
export { parseRange as a, fsCopy as c, fsStat as d, lowestCommonAncestor as f, validateSea as i, fsExists as l, expandBaselineTarget as n, satisfies as o, stripExtname as p, resolveTarget as r, formatBytes as s, buildExe as t, fsRemove as u };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { v as RE_DTS, y as RE_DTS_MAP } from "./version-CQ98ZBpL-D6GAHapk.js";
|
|
2
|
+
import { a as createDebug, r as requireTSApi } from "./require-BbBF8Ii0-BDaWJgzA.js";
|
|
3
|
+
import { t as globalContext } from "./dist-VDcV1Qyy.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
|
-
//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.28.
|
|
6
|
+
//#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/tsc-CJA_TTZv.mjs
|
|
7
7
|
const debug$3 = createDebug("rolldown-plugin-dts:tsc-system");
|
|
8
8
|
const ts$3 = requireTSApi();
|
|
9
9
|
/**
|
|
@@ -155,7 +155,8 @@ function buildProjects(fsSystem, tsconfig, force, sourcemap) {
|
|
|
155
155
|
const host = ts$1.createSolutionBuilderHost(fsSystem, createProgramWithPatchedCompilerOptions({
|
|
156
156
|
force,
|
|
157
157
|
sourcemap,
|
|
158
|
-
|
|
158
|
+
/** we don't need to print warning here because we have done this in {@link collectProjectGraph} */
|
|
159
|
+
tsconfigPath: null
|
|
159
160
|
}));
|
|
160
161
|
const exitStatus = ts$1.createSolutionBuilder(host, [tsconfig], {
|
|
161
162
|
force,
|
|
@@ -184,9 +185,9 @@ function collectProjectGraph(rootTsconfigPath, fsSystem, force, sourcemap) {
|
|
|
184
185
|
const parsedConfig = parseTsconfig(tsconfigPath, fsSystem);
|
|
185
186
|
if (!parsedConfig) continue;
|
|
186
187
|
parsedConfig.options = patchCompilerOptions(parsedConfig.options, {
|
|
187
|
-
tsconfigPath,
|
|
188
|
+
tsconfigPath: parsedConfig.fileNames.length > 0 ? tsconfigPath : null,
|
|
188
189
|
force,
|
|
189
|
-
sourcemap
|
|
190
|
+
sourcemap
|
|
190
191
|
});
|
|
191
192
|
projects.push({
|
|
192
193
|
tsconfigPath,
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { i as __toESM } from "./rolldown-runtime-B4iAMlE-.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "./internal-DTYQdXId.js";
|
|
2
|
+
import { d as toArray, r as importWithError, s as resolveComma } from "./style-DiMP8pYv-DIC5PXeH.js";
|
|
3
|
+
import { n as expandBaselineTarget } from "./target-DgdLrXba-DpO9JXxB.js";
|
|
5
4
|
import path from "node:path";
|
|
6
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
7
6
|
import { readFileSync } from "node:fs";
|
|
8
7
|
import { readFile } from "node:fs/promises";
|
|
9
8
|
import { ResolverFactory } from "@voidzero-dev/vite-plus-core/rolldown/experimental";
|
|
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.
|
|
9
|
+
//#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_9eb8cb267bbbb73fcfb5dbe1e056f9b1/node_modules/@tsdown/css/dist/index.mjs
|
|
11
10
|
const defaultCssBundleName = "style.css";
|
|
12
11
|
function resolveCssOptions(options = {}, topLevelTarget, unbundle) {
|
|
13
12
|
let cssTarget;
|
|
@@ -610,7 +609,7 @@ async function loadFileConfig(searchPath) {
|
|
|
610
609
|
if (cached !== void 0) return cached;
|
|
611
610
|
const promise = (async () => {
|
|
612
611
|
try {
|
|
613
|
-
const postcssrc = (await import("./src-
|
|
612
|
+
const postcssrc = (await import("./src-pN7Bl6zo.js").then((m) => /* @__PURE__ */ __toESM(m.default, 1))).default;
|
|
614
613
|
const result = await postcssrc({}, searchPath);
|
|
615
614
|
return {
|
|
616
615
|
options: result.options,
|
|
@@ -1,14 +1,51 @@
|
|
|
1
|
-
import { n as x, r as createDebug } from "./main-
|
|
2
|
-
import {
|
|
3
|
-
import "
|
|
1
|
+
import { n as x, r as createDebug } from "./main-CyNcZUzu.js";
|
|
2
|
+
import { g as tryParse, n as normalize$1, p as isGreaterOrEqual } from "./version-CQ98ZBpL-D6GAHapk.js";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
4
|
import process from "node:process";
|
|
5
|
+
import { styleText } from "node:util";
|
|
5
6
|
import path from "node:path";
|
|
6
7
|
import { pipeline } from "node:stream/promises";
|
|
7
8
|
import { Readable } from "node:stream";
|
|
8
9
|
import { createReadStream, createWriteStream } from "node:fs";
|
|
9
|
-
import { chmod, mkdir, rename } from "node:fs/promises";
|
|
10
|
+
import { access, chmod, mkdir, rename, rm } from "node:fs/promises";
|
|
10
11
|
import os from "node:os";
|
|
11
12
|
import { createHash } from "node:crypto";
|
|
13
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_540e13d22e6879071cae9cd3610e4dea/node_modules/tsdown/dist/format-DLxyxnif.mjs
|
|
14
|
+
function fsExists(path) {
|
|
15
|
+
return access(path).then(() => true, () => false);
|
|
16
|
+
}
|
|
17
|
+
function fsRemove(path) {
|
|
18
|
+
return rm(path, {
|
|
19
|
+
force: true,
|
|
20
|
+
recursive: true
|
|
21
|
+
}).catch(() => {});
|
|
22
|
+
}
|
|
23
|
+
createRequire(import.meta.url)("./npm_entry_picomatch.cjs");
|
|
24
|
+
let supportRGB = !!process.stdout.hasColors?.(2 ** 24);
|
|
25
|
+
if (supportRGB) try {
|
|
26
|
+
styleText("#000", "");
|
|
27
|
+
} catch {
|
|
28
|
+
supportRGB = false;
|
|
29
|
+
}
|
|
30
|
+
const factory = (...formats) => new Proxy(styleText.bind(void 0, formats), { get: (_, format) => {
|
|
31
|
+
if (format[0] === "#") {
|
|
32
|
+
const [color, fallback] = format.split(",", 2);
|
|
33
|
+
if (!supportRGB) return fallback ? factory(...formats, fallback) : factory(...formats);
|
|
34
|
+
return factory(...formats, color);
|
|
35
|
+
}
|
|
36
|
+
return factory(...formats, format);
|
|
37
|
+
} });
|
|
38
|
+
factory();
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region ../../node_modules/.pnpm/tsdown@0.23.0_@arethetypeswrong+core@0.18.2_@tsdown+css@0.23.0_@tsdown+exe@0.23.0_@type_540e13d22e6879071cae9cd3610e4dea/node_modules/tsdown/dist/target-DgdLrXba.mjs
|
|
41
|
+
const NODE_SEA_MIN_VERSION = "25.7.0";
|
|
42
|
+
const NODE_SEA_MIN_VERSION_PARSED = {
|
|
43
|
+
major: 25,
|
|
44
|
+
minor: 7,
|
|
45
|
+
patch: 0
|
|
46
|
+
};
|
|
47
|
+
createDebug("tsdown:exe");
|
|
48
|
+
//#endregion
|
|
12
49
|
//#region ../../node_modules/.pnpm/@tsdown+exe@0.23.0_tsdown@0.23.0/node_modules/@tsdown/exe/dist/index.mjs
|
|
13
50
|
function getCacheDir() {
|
|
14
51
|
const home = os.homedir();
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { RUNTIME_MODULE_ID } from "@voidzero-dev/vite-plus-core/rolldown";
|
|
2
|
+
import { exactRegex } from "@voidzero-dev/vite-plus-core/rolldown/filter";
|
|
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/filename-BFg1q_t3.mjs
|
|
4
|
+
const RE_JS = /\.([cm]?)jsx?$/;
|
|
5
|
+
const RE_TS = /\.([cm]?)tsx?$/;
|
|
6
|
+
const RE_DTS = /\.d\.([cm]?)ts$/;
|
|
7
|
+
const RE_DTS_MAP = /\.d\.([cm]?)ts\.map$/;
|
|
8
|
+
const RE_NODE_MODULES = /[\\/]node_modules[\\/]/;
|
|
9
|
+
const RE_CSS = /\.(?:css|scss|sass|less|styl|stylus)$/;
|
|
10
|
+
const RE_JSON = /\.json$/;
|
|
11
|
+
const RE_ROLLDOWN_RUNTIME = exactRegex(RUNTIME_MODULE_ID);
|
|
12
|
+
function filename_js_to_dts(id) {
|
|
13
|
+
return id.replace(RE_JS, ".d.$1ts");
|
|
14
|
+
}
|
|
15
|
+
function filename_to_dts(id, languageContext) {
|
|
16
|
+
id = languageContext?.toTsFilename?.(id) ?? id;
|
|
17
|
+
return id.replace(RE_TS, ".d.$1ts").replace(RE_JS, ".d.$1ts").replace(RE_JSON, ".json.d.ts");
|
|
18
|
+
}
|
|
19
|
+
function filename_dts_to(id, ext) {
|
|
20
|
+
return id.replace(RE_DTS, `.$1${ext}`);
|
|
21
|
+
}
|
|
22
|
+
function resolveTemplateFn(fn, chunk) {
|
|
23
|
+
return typeof fn === "function" ? fn(chunk) : fn;
|
|
24
|
+
}
|
|
25
|
+
function replaceTemplateName(template, name) {
|
|
26
|
+
return template.replaceAll("[name]", name);
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/comparison-DenM3wCn.js
|
|
30
|
+
const LETTER_DASH_NUMBER = "[a-zA-Z0-9-]";
|
|
31
|
+
const NUMERIC_IDENTIFIER = String.raw`0|[1-9]\d*`;
|
|
32
|
+
const NUMERIC_IDENTIFIER_LOOSE = String.raw`\d+`;
|
|
33
|
+
const NON_NUMERIC_IDENTIFIER = String.raw`\d*[a-zA-Z-]${LETTER_DASH_NUMBER}*`;
|
|
34
|
+
const MAIN_VERSION = String.raw`(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})\.(${NUMERIC_IDENTIFIER})`;
|
|
35
|
+
const MAIN_VERSION_LOOSE = String.raw`(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})\.(${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
36
|
+
const PRERELEASE_IDENTIFIER = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER})`;
|
|
37
|
+
const PRERELEASE_IDENTIFIER_LOOSE = `(?:${NON_NUMERIC_IDENTIFIER}|${NUMERIC_IDENTIFIER_LOOSE})`;
|
|
38
|
+
const PRERELEASE = String.raw`(?:-(${PRERELEASE_IDENTIFIER}(?:\.${PRERELEASE_IDENTIFIER})*))`;
|
|
39
|
+
const PRERELEASE_LOOSE = String.raw`(?:-?(${PRERELEASE_IDENTIFIER_LOOSE}(?:\.${PRERELEASE_IDENTIFIER_LOOSE})*))`;
|
|
40
|
+
const BUILD_IDENTIFIER = `${LETTER_DASH_NUMBER}+`;
|
|
41
|
+
const BUILD = String.raw`(?:\+(${BUILD_IDENTIFIER}(?:\.${BUILD_IDENTIFIER})*))`;
|
|
42
|
+
const FULL_PLAIN = `v?${MAIN_VERSION}${PRERELEASE}?${BUILD}?`;
|
|
43
|
+
const LOOSE_PLAIN = String.raw`[v=\s]*${MAIN_VERSION_LOOSE}${PRERELEASE_LOOSE}?${BUILD}?`;
|
|
44
|
+
const GREATER_LESS_THAN = "((?:<|>)?=?)";
|
|
45
|
+
const XRANGE_IDENTIFIER = String.raw`${NUMERIC_IDENTIFIER}|x|X|\*`;
|
|
46
|
+
const XRANGE_IDENTIFIER_LOOSE = String.raw`${NUMERIC_IDENTIFIER_LOOSE}|x|X|\*`;
|
|
47
|
+
const XRANGE_PLAIN = String.raw`[v=\s]*(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:\.(${XRANGE_IDENTIFIER})(?:${PRERELEASE})?${BUILD}?)?)?`;
|
|
48
|
+
const XRANGE_PLAIN_LOOSE = String.raw`[v=\s]*(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:\.(${XRANGE_IDENTIFIER_LOOSE})(?:${PRERELEASE_LOOSE})?${BUILD}?)?)?`;
|
|
49
|
+
const LONE_TILDE = "(?:~>?)";
|
|
50
|
+
const LONE_CARET = String.raw`(?:\^)`;
|
|
51
|
+
const COERCE_PLAIN = String.raw`(^|[^\d])(\d{1,${16}})(?:\.(\d{1,${16}}))?(?:\.(\d{1,${16}}))?`;
|
|
52
|
+
const COERCE = String.raw`${COERCE_PLAIN}(?:$|[^\d])`;
|
|
53
|
+
const COERCE_FULL = String.raw`${COERCE_PLAIN}(?:${PRERELEASE})?(?:${BUILD})?(?:$|[^\d])`;
|
|
54
|
+
function makeSafeRegexSource(source) {
|
|
55
|
+
const replacements = [
|
|
56
|
+
[String.raw`\s`, 1],
|
|
57
|
+
[String.raw`\d`, 256],
|
|
58
|
+
[LETTER_DASH_NUMBER, 250]
|
|
59
|
+
];
|
|
60
|
+
for (const [token, maximum] of replacements) source = source.split(`${token}*`).join(`${token}{0,${maximum}}`).split(`${token}+`).join(`${token}{1,${maximum}}`);
|
|
61
|
+
return source;
|
|
62
|
+
}
|
|
63
|
+
function safeRegex(source, flags) {
|
|
64
|
+
return new RegExp(makeSafeRegexSource(source), flags);
|
|
65
|
+
}
|
|
66
|
+
const FULL = safeRegex(`^${FULL_PLAIN}$`);
|
|
67
|
+
const LOOSE = safeRegex(`^${LOOSE_PLAIN}$`);
|
|
68
|
+
const NUMERIC$1 = /^\d+$/;
|
|
69
|
+
function formatComparableVersion(version) {
|
|
70
|
+
const base = `${version.major}.${version.minor}.${version.patch}`;
|
|
71
|
+
return version.prerelease?.length ? `${base}-${version.prerelease.join(".")}` : base;
|
|
72
|
+
}
|
|
73
|
+
function parse(version, options = {}) {
|
|
74
|
+
if (typeof version !== "string") return version;
|
|
75
|
+
if (version.length > 256) throw new TypeError(`Version exceeds the maximum length of 256 characters`);
|
|
76
|
+
const match = version.trim().match(options.loose ? LOOSE : FULL);
|
|
77
|
+
if (!match) throw new TypeError(`Invalid version syntax: ${version}`);
|
|
78
|
+
const major = Number(match[1]);
|
|
79
|
+
const minor = Number(match[2]);
|
|
80
|
+
const patch = Number(match[3]);
|
|
81
|
+
if (major > Number.MAX_SAFE_INTEGER || major < 0) throw new TypeError(`Invalid major version: ${match[1]}`);
|
|
82
|
+
if (minor > Number.MAX_SAFE_INTEGER || minor < 0) throw new TypeError(`Invalid minor version: ${match[2]}`);
|
|
83
|
+
if (patch > Number.MAX_SAFE_INTEGER || patch < 0) throw new TypeError(`Invalid patch version: ${match[3]}`);
|
|
84
|
+
const prerelease = match[4] ? match[4].split(".").map((identifier) => {
|
|
85
|
+
if (NUMERIC$1.test(identifier)) {
|
|
86
|
+
const numeric = Number(identifier);
|
|
87
|
+
if (numeric >= 0 && numeric < Number.MAX_SAFE_INTEGER) return numeric;
|
|
88
|
+
}
|
|
89
|
+
return identifier;
|
|
90
|
+
}) : void 0;
|
|
91
|
+
return {
|
|
92
|
+
build: match[5]?.split("."),
|
|
93
|
+
major,
|
|
94
|
+
minor,
|
|
95
|
+
patch,
|
|
96
|
+
prerelease
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function tryParse(version, options = {}) {
|
|
100
|
+
try {
|
|
101
|
+
return parse(version, options);
|
|
102
|
+
} catch {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
const NUMERIC = /^\d+$/;
|
|
107
|
+
function compareIdentifiers(left, right) {
|
|
108
|
+
if (typeof left === "number" && typeof right === "number") return left === right ? 0 : left < right ? -1 : 1;
|
|
109
|
+
const leftNumeric = NUMERIC.test(String(left));
|
|
110
|
+
const rightNumeric = NUMERIC.test(String(right));
|
|
111
|
+
const normalizedLeft = leftNumeric ? Number(left) : left;
|
|
112
|
+
const normalizedRight = rightNumeric ? Number(right) : right;
|
|
113
|
+
return normalizedLeft === normalizedRight ? 0 : leftNumeric && !rightNumeric ? -1 : rightNumeric && !leftNumeric ? 1 : normalizedLeft < normalizedRight ? -1 : 1;
|
|
114
|
+
}
|
|
115
|
+
function compareMainParsed(left, right) {
|
|
116
|
+
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;
|
|
117
|
+
}
|
|
118
|
+
function comparePrereleaseParsed(left, right) {
|
|
119
|
+
const leftPrerelease = left.prerelease;
|
|
120
|
+
const rightPrerelease = right.prerelease;
|
|
121
|
+
if (leftPrerelease?.length && !rightPrerelease?.length) return -1;
|
|
122
|
+
if (!leftPrerelease?.length && rightPrerelease?.length) return 1;
|
|
123
|
+
if (!leftPrerelease?.length && !rightPrerelease?.length) return 0;
|
|
124
|
+
for (let index = 0;; index++) {
|
|
125
|
+
const leftIdentifier = leftPrerelease?.[index];
|
|
126
|
+
const rightIdentifier = rightPrerelease?.[index];
|
|
127
|
+
if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0;
|
|
128
|
+
if (rightIdentifier === void 0) return 1;
|
|
129
|
+
if (leftIdentifier === void 0) return -1;
|
|
130
|
+
if (leftIdentifier !== rightIdentifier) return compareIdentifiers(leftIdentifier, rightIdentifier);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function compareParsed(left, right) {
|
|
134
|
+
return compareMainParsed(left, right) || comparePrereleaseParsed(left, right);
|
|
135
|
+
}
|
|
136
|
+
function compare(left, right, options = {}) {
|
|
137
|
+
return compareParsed(parse(left, options), parse(right, options));
|
|
138
|
+
}
|
|
139
|
+
function isGreaterOrEqual(left, right, options = {}) {
|
|
140
|
+
return compare(left, right, options) >= 0;
|
|
141
|
+
}
|
|
142
|
+
//#endregion
|
|
143
|
+
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/version-CQ98ZBpL.js
|
|
144
|
+
const COERCE_EXACT = safeRegex(COERCE);
|
|
145
|
+
const COERCE_FULL_EXACT = safeRegex(COERCE_FULL);
|
|
146
|
+
safeRegex(`^${PRERELEASE}$`);
|
|
147
|
+
safeRegex(`^${PRERELEASE_LOOSE}$`);
|
|
148
|
+
function normalize(version, options = {}) {
|
|
149
|
+
const parsed = tryParse(version, options);
|
|
150
|
+
return parsed ? formatComparableVersion(parsed) : null;
|
|
151
|
+
}
|
|
152
|
+
function coerce(value, options = {}) {
|
|
153
|
+
if (typeof value === "object") return value;
|
|
154
|
+
const input = typeof value === "number" ? String(value) : value;
|
|
155
|
+
let match = null;
|
|
156
|
+
if (options.rtl) {
|
|
157
|
+
const expression = safeRegex(options.includePrerelease ? COERCE_FULL : COERCE, "g");
|
|
158
|
+
let next;
|
|
159
|
+
while ((next = expression.exec(input)) && (!match || match.index + match[0].length !== input.length)) {
|
|
160
|
+
if (!match || next.index + next[0].length !== match.index + match[0].length) match = next;
|
|
161
|
+
expression.lastIndex = next.index + next[1].length + next[2].length;
|
|
162
|
+
}
|
|
163
|
+
} else match = (options.includePrerelease ? COERCE_FULL_EXACT : COERCE_EXACT).exec(input);
|
|
164
|
+
if (!match) return null;
|
|
165
|
+
const major = match[2];
|
|
166
|
+
return tryParse(`${major}.${match[3] || "0"}.${match[4] || "0"}${options.includePrerelease && match[5] ? `-${match[5]}` : ""}${options.includePrerelease && match[6] ? `+${match[6]}` : ""}`, options);
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
export { RE_ROLLDOWN_RUNTIME as C, filename_to_dts as D, filename_js_to_dts as E, replaceTemplateName as O, RE_NODE_MODULES as S, filename_dts_to as T, RE_CSS as _, GREATER_LESS_THAN as a, RE_JS as b, LOOSE_PLAIN as c, compareParsed as d, formatComparableVersion as f, tryParse as g, safeRegex as h, FULL_PLAIN as i, resolveTemplateFn as k, XRANGE_PLAIN as l, parse as m, normalize as n, LONE_CARET as o, isGreaterOrEqual as p, BUILD as r, LONE_TILDE as s, coerce as t, XRANGE_PLAIN_LOOSE as u, RE_DTS as v, RE_TS as w, RE_JSON as x, RE_DTS_MAP as y };
|
|
@@ -41,7 +41,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
41
41
|
}) : target, mod));
|
|
42
42
|
var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
43
43
|
//#endregion
|
|
44
|
-
//#region \0@oxc-project+runtime@0.
|
|
44
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/typeof.js
|
|
45
45
|
function _typeof(o) {
|
|
46
46
|
"@babel/helpers - typeof";
|
|
47
47
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -51,7 +51,7 @@ function _typeof(o) {
|
|
|
51
51
|
}, _typeof(o);
|
|
52
52
|
}
|
|
53
53
|
//#endregion
|
|
54
|
-
//#region \0@oxc-project+runtime@0.
|
|
54
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/toPrimitive.js
|
|
55
55
|
function toPrimitive(t, r) {
|
|
56
56
|
if ("object" != _typeof(t) || !t) return t;
|
|
57
57
|
var e = t[Symbol.toPrimitive];
|
|
@@ -63,13 +63,13 @@ function toPrimitive(t, r) {
|
|
|
63
63
|
return ("string" === r ? String : Number)(t);
|
|
64
64
|
}
|
|
65
65
|
//#endregion
|
|
66
|
-
//#region \0@oxc-project+runtime@0.
|
|
66
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/toPropertyKey.js
|
|
67
67
|
function toPropertyKey(t) {
|
|
68
68
|
var i = toPrimitive(t, "string");
|
|
69
69
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
70
70
|
}
|
|
71
71
|
//#endregion
|
|
72
|
-
//#region \0@oxc-project+runtime@0.
|
|
72
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/defineProperty.js
|
|
73
73
|
function _defineProperty(e, r, t) {
|
|
74
74
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
75
75
|
value: t,
|
|
@@ -193,7 +193,7 @@ var DevRuntime = class {
|
|
|
193
193
|
/**
|
|
194
194
|
* Re-runnable factories from HMR patches and lazy chunks. The initial bundle stays
|
|
195
195
|
* scope-hoisted and contributes none.
|
|
196
|
-
* @type {Map<string,
|
|
196
|
+
* @type {Map<string, (id: string) => void>}
|
|
197
197
|
*/
|
|
198
198
|
"factories",
|
|
199
199
|
/* @__PURE__ */ new Map()
|
|
@@ -208,12 +208,6 @@ var DevRuntime = class {
|
|
|
208
208
|
"hooks",
|
|
209
209
|
null
|
|
210
210
|
);
|
|
211
|
-
_defineProperty(
|
|
212
|
-
this,
|
|
213
|
-
/** @type {Map<string, Promise<any>>} */
|
|
214
|
-
"lazyRequests",
|
|
215
|
-
/* @__PURE__ */ new Map()
|
|
216
|
-
);
|
|
217
211
|
_defineProperty(
|
|
218
212
|
this,
|
|
219
213
|
/** @internal */
|
|
@@ -282,14 +276,10 @@ var DevRuntime = class {
|
|
|
282
276
|
}
|
|
283
277
|
/**
|
|
284
278
|
* @param {string} id
|
|
285
|
-
* @param {'esm' | 'cjs'} kind
|
|
286
279
|
* @param {(id: string) => void} fn
|
|
287
280
|
*/
|
|
288
|
-
registerFactory(id,
|
|
289
|
-
this.factories.set(id,
|
|
290
|
-
kind,
|
|
291
|
-
fn
|
|
292
|
-
});
|
|
281
|
+
registerFactory(id, fn) {
|
|
282
|
+
this.factories.set(id, fn);
|
|
293
283
|
}
|
|
294
284
|
/**
|
|
295
285
|
* @param {string} id
|
|
@@ -328,7 +318,6 @@ var DevRuntime = class {
|
|
|
328
318
|
*/
|
|
329
319
|
removeModuleCache(id) {
|
|
330
320
|
this.moduleCache.delete(id);
|
|
331
|
-
this.lazyRequests.delete(id);
|
|
332
321
|
this.hooks?.onModuleCacheRemoval(id);
|
|
333
322
|
}
|
|
334
323
|
/**
|
|
@@ -340,7 +329,7 @@ var DevRuntime = class {
|
|
|
340
329
|
if (this.moduleCache.has(id)) return this.loadExports(id);
|
|
341
330
|
const factory = this.factories.get(id);
|
|
342
331
|
if (!factory) throw new MissingFactoryError(id);
|
|
343
|
-
factory
|
|
332
|
+
factory(id);
|
|
344
333
|
return this.loadExports(id);
|
|
345
334
|
}
|
|
346
335
|
/**
|
|
@@ -355,29 +344,6 @@ var DevRuntime = class {
|
|
|
355
344
|
}
|
|
356
345
|
}
|
|
357
346
|
/**
|
|
358
|
-
* The entry point for a lazy `import()`. `id` is the module the boundary stands for; the
|
|
359
|
-
* boundary's own id appears only inside `fetchChunk`'s URL.
|
|
360
|
-
*
|
|
361
|
-
* Nothing is registered under the boundary id, deliberately. A cache entry with no factory
|
|
362
|
-
* behind it reads as "executed" to the HMR boundary walk, and `applyUpdate` turns an
|
|
363
|
-
* updated-but-factory-less module into a full page reload.
|
|
364
|
-
*
|
|
365
|
-
* A rejection is memoized like any other outcome, matching `import()` of a module that
|
|
366
|
-
* threw. Retrying could not work anyway: a factory registers its module before running its
|
|
367
|
-
* body, so re-running `initModule` would return half-initialized exports as success.
|
|
368
|
-
*
|
|
369
|
-
* @param {string} id
|
|
370
|
-
* @param {() => Promise<unknown>} fetchChunk
|
|
371
|
-
* @returns {Promise<any>}
|
|
372
|
-
*/
|
|
373
|
-
requestLazy(id, fetchChunk) {
|
|
374
|
-
const pending = this.lazyRequests.get(id);
|
|
375
|
-
if (pending) return pending;
|
|
376
|
-
const promise = this.moduleCache.has(id) || this.factories.has(id) ? Promise.resolve().then(() => this.initModule(id)) : Promise.resolve().then(fetchChunk).then(() => this.initModule(id));
|
|
377
|
-
this.lazyRequests.set(id, promise);
|
|
378
|
-
return promise;
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
347
|
* @param {string} moduleId
|
|
382
348
|
*/
|
|
383
349
|
createModuleHotContext(moduleId) {
|
|
@@ -381,7 +381,7 @@ function stringifyConsoleArg(value) {
|
|
|
381
381
|
}
|
|
382
382
|
}
|
|
383
383
|
//#endregion
|
|
384
|
-
//#region \0@oxc-project+runtime@0.
|
|
384
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/typeof.js
|
|
385
385
|
function _typeof(o) {
|
|
386
386
|
"@babel/helpers - typeof";
|
|
387
387
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -391,7 +391,7 @@ function _typeof(o) {
|
|
|
391
391
|
}, _typeof(o);
|
|
392
392
|
}
|
|
393
393
|
//#endregion
|
|
394
|
-
//#region \0@oxc-project+runtime@0.
|
|
394
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/toPrimitive.js
|
|
395
395
|
function toPrimitive(t, r) {
|
|
396
396
|
if ("object" != _typeof(t) || !t) return t;
|
|
397
397
|
var e = t[Symbol.toPrimitive];
|
|
@@ -403,13 +403,13 @@ function toPrimitive(t, r) {
|
|
|
403
403
|
return ("string" === r ? String : Number)(t);
|
|
404
404
|
}
|
|
405
405
|
//#endregion
|
|
406
|
-
//#region \0@oxc-project+runtime@0.
|
|
406
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/toPropertyKey.js
|
|
407
407
|
function toPropertyKey(t) {
|
|
408
408
|
var i = toPrimitive(t, "string");
|
|
409
409
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
410
410
|
}
|
|
411
411
|
//#endregion
|
|
412
|
-
//#region \0@oxc-project+runtime@0.
|
|
412
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/defineProperty.js
|
|
413
413
|
function _defineProperty(e, r, t) {
|
|
414
414
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
415
415
|
value: t,
|