@rolldown/browser 1.0.0-beta.45 → 1.0.0-beta.46
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/cli-setup.mjs +4 -3
- package/dist/cli.mjs +7 -6
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +5 -4
- package/dist/experimental-index.browser.mjs +57 -7
- package/dist/experimental-index.d.mts +3 -3
- package/dist/experimental-index.mjs +60 -9
- package/dist/experimental-runtime-types.d.ts +16 -5
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/index.browser.mjs +2 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +5 -3
- package/dist/parallel-plugin-worker.mjs +6 -5
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +2 -1
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/binding-BeWSOIj5.mjs +578 -0
- package/dist/shared/{binding-DRegrFdE.d.mts → binding-CCMrV5an.d.mts} +37 -22
- package/dist/shared/{define-config-C6-goOPh.d.mts → define-config-Bj-neIhz.d.mts} +59 -5
- package/dist/shared/{load-config-Z2MWPLZO.mjs → load-config-DnUAKl9P.mjs} +2 -2
- package/dist/shared/{parse-ast-index-Ck5SwMSC.mjs → parse-ast-index-DMI5m8Lk.mjs} +11 -5
- package/dist/shared/{src-B4ZmdjD5.mjs → src-B8saaB3b.mjs} +278 -126
- package/dist/{src-CLWy1Uip.js → src-B-7Hrt6w.js} +834 -128
- package/package.json +1 -1
- /package/dist/shared/{composable-filters-D_PY7Qa7.mjs → composable-filters-CgRsnfr3.mjs} +0 -0
- /package/dist/shared/{prompt-BDwA3jSr.mjs → prompt-YGfbLmz5.mjs} +0 -0
|
@@ -1,7 +1,558 @@
|
|
|
1
|
-
|
|
1
|
+
//#region rolldown:runtime
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n$1 = keys.length, key; i < n$1; i++) {
|
|
13
|
+
key = keys[i];
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
|
+
get: ((k) => from[k]).bind(null, key),
|
|
16
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
+
value: mod,
|
|
23
|
+
enumerable: true
|
|
24
|
+
}) : target, mod));
|
|
25
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] }) : x)(function(x) {
|
|
26
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
27
|
+
throw Error("Calling `require` for \"" + x + "\" in an environment that doesn't expose the `require` function.");
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/binding.cjs
|
|
32
|
+
var require_binding = /* @__PURE__ */ __commonJS({ "src/binding.cjs": ((exports, module) => {
|
|
33
|
+
const { readFileSync } = __require("node:fs");
|
|
34
|
+
let nativeBinding = null;
|
|
35
|
+
const loadErrors = [];
|
|
36
|
+
const isMusl = () => {
|
|
37
|
+
let musl = false;
|
|
38
|
+
if (process.platform === "linux") {
|
|
39
|
+
musl = isMuslFromFilesystem();
|
|
40
|
+
if (musl === null) musl = isMuslFromReport();
|
|
41
|
+
if (musl === null) musl = isMuslFromChildProcess();
|
|
42
|
+
}
|
|
43
|
+
return musl;
|
|
44
|
+
};
|
|
45
|
+
const isFileMusl = (f) => f.includes("libc.musl-") || f.includes("ld-musl-");
|
|
46
|
+
const isMuslFromFilesystem = () => {
|
|
47
|
+
try {
|
|
48
|
+
return readFileSync("/usr/bin/ldd", "utf-8").includes("musl");
|
|
49
|
+
} catch {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const isMuslFromReport = () => {
|
|
54
|
+
let report = null;
|
|
55
|
+
if (typeof process.report?.getReport === "function") {
|
|
56
|
+
process.report.excludeNetwork = true;
|
|
57
|
+
report = process.report.getReport();
|
|
58
|
+
}
|
|
59
|
+
if (!report) return null;
|
|
60
|
+
if (report.header && report.header.glibcVersionRuntime) return false;
|
|
61
|
+
if (Array.isArray(report.sharedObjects)) {
|
|
62
|
+
if (report.sharedObjects.some(isFileMusl)) return true;
|
|
63
|
+
}
|
|
64
|
+
return false;
|
|
65
|
+
};
|
|
66
|
+
const isMuslFromChildProcess = () => {
|
|
67
|
+
try {
|
|
68
|
+
return __require("child_process").execSync("ldd --version", { encoding: "utf8" }).includes("musl");
|
|
69
|
+
} catch (e$1) {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
function requireNative() {
|
|
74
|
+
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) try {
|
|
75
|
+
return __require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
|
|
76
|
+
} catch (err) {
|
|
77
|
+
loadErrors.push(err);
|
|
78
|
+
}
|
|
79
|
+
else if (process.platform === "android") if (process.arch === "arm64") {
|
|
80
|
+
try {
|
|
81
|
+
return __require("./rolldown-binding.android-arm64.node");
|
|
82
|
+
} catch (e$1) {
|
|
83
|
+
loadErrors.push(e$1);
|
|
84
|
+
}
|
|
85
|
+
try {
|
|
86
|
+
const binding = __require("@rolldown/binding-android-arm64");
|
|
87
|
+
const bindingPackageVersion = __require("@rolldown/binding-android-arm64/package.json").version;
|
|
88
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
89
|
+
return binding;
|
|
90
|
+
} catch (e$1) {
|
|
91
|
+
loadErrors.push(e$1);
|
|
92
|
+
}
|
|
93
|
+
} else if (process.arch === "arm") {
|
|
94
|
+
try {
|
|
95
|
+
return __require("./rolldown-binding.android-arm-eabi.node");
|
|
96
|
+
} catch (e$1) {
|
|
97
|
+
loadErrors.push(e$1);
|
|
98
|
+
}
|
|
99
|
+
try {
|
|
100
|
+
const binding = __require("@rolldown/binding-android-arm-eabi");
|
|
101
|
+
const bindingPackageVersion = __require("@rolldown/binding-android-arm-eabi/package.json").version;
|
|
102
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
103
|
+
return binding;
|
|
104
|
+
} catch (e$1) {
|
|
105
|
+
loadErrors.push(e$1);
|
|
106
|
+
}
|
|
107
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Android ${process.arch}`));
|
|
108
|
+
else if (process.platform === "win32") if (process.arch === "x64") if (process.config?.variables?.shlib_suffix === "dll.a" || process.config?.variables?.node_target_type === "shared_library") {
|
|
109
|
+
try {
|
|
110
|
+
return __require("./rolldown-binding.win32-x64-gnu.node");
|
|
111
|
+
} catch (e$1) {
|
|
112
|
+
loadErrors.push(e$1);
|
|
113
|
+
}
|
|
114
|
+
try {
|
|
115
|
+
const binding = __require("@rolldown/binding-win32-x64-gnu");
|
|
116
|
+
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-gnu/package.json").version;
|
|
117
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
118
|
+
return binding;
|
|
119
|
+
} catch (e$1) {
|
|
120
|
+
loadErrors.push(e$1);
|
|
121
|
+
}
|
|
122
|
+
} else {
|
|
123
|
+
try {
|
|
124
|
+
return __require("./rolldown-binding.win32-x64-msvc.node");
|
|
125
|
+
} catch (e$1) {
|
|
126
|
+
loadErrors.push(e$1);
|
|
127
|
+
}
|
|
128
|
+
try {
|
|
129
|
+
const binding = __require("@rolldown/binding-win32-x64-msvc");
|
|
130
|
+
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-msvc/package.json").version;
|
|
131
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
132
|
+
return binding;
|
|
133
|
+
} catch (e$1) {
|
|
134
|
+
loadErrors.push(e$1);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
else if (process.arch === "ia32") {
|
|
138
|
+
try {
|
|
139
|
+
return __require("./rolldown-binding.win32-ia32-msvc.node");
|
|
140
|
+
} catch (e$1) {
|
|
141
|
+
loadErrors.push(e$1);
|
|
142
|
+
}
|
|
143
|
+
try {
|
|
144
|
+
const binding = __require("@rolldown/binding-win32-ia32-msvc");
|
|
145
|
+
const bindingPackageVersion = __require("@rolldown/binding-win32-ia32-msvc/package.json").version;
|
|
146
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
147
|
+
return binding;
|
|
148
|
+
} catch (e$1) {
|
|
149
|
+
loadErrors.push(e$1);
|
|
150
|
+
}
|
|
151
|
+
} else if (process.arch === "arm64") {
|
|
152
|
+
try {
|
|
153
|
+
return __require("./rolldown-binding.win32-arm64-msvc.node");
|
|
154
|
+
} catch (e$1) {
|
|
155
|
+
loadErrors.push(e$1);
|
|
156
|
+
}
|
|
157
|
+
try {
|
|
158
|
+
const binding = __require("@rolldown/binding-win32-arm64-msvc");
|
|
159
|
+
const bindingPackageVersion = __require("@rolldown/binding-win32-arm64-msvc/package.json").version;
|
|
160
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
161
|
+
return binding;
|
|
162
|
+
} catch (e$1) {
|
|
163
|
+
loadErrors.push(e$1);
|
|
164
|
+
}
|
|
165
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Windows: ${process.arch}`));
|
|
166
|
+
else if (process.platform === "darwin") {
|
|
167
|
+
try {
|
|
168
|
+
return __require("./rolldown-binding.darwin-universal.node");
|
|
169
|
+
} catch (e$1) {
|
|
170
|
+
loadErrors.push(e$1);
|
|
171
|
+
}
|
|
172
|
+
try {
|
|
173
|
+
const binding = __require("@rolldown/binding-darwin-universal");
|
|
174
|
+
const bindingPackageVersion = __require("@rolldown/binding-darwin-universal/package.json").version;
|
|
175
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
176
|
+
return binding;
|
|
177
|
+
} catch (e$1) {
|
|
178
|
+
loadErrors.push(e$1);
|
|
179
|
+
}
|
|
180
|
+
if (process.arch === "x64") {
|
|
181
|
+
try {
|
|
182
|
+
return __require("./rolldown-binding.darwin-x64.node");
|
|
183
|
+
} catch (e$1) {
|
|
184
|
+
loadErrors.push(e$1);
|
|
185
|
+
}
|
|
186
|
+
try {
|
|
187
|
+
const binding = __require("@rolldown/binding-darwin-x64");
|
|
188
|
+
const bindingPackageVersion = __require("@rolldown/binding-darwin-x64/package.json").version;
|
|
189
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
190
|
+
return binding;
|
|
191
|
+
} catch (e$1) {
|
|
192
|
+
loadErrors.push(e$1);
|
|
193
|
+
}
|
|
194
|
+
} else if (process.arch === "arm64") {
|
|
195
|
+
try {
|
|
196
|
+
return __require("./rolldown-binding.darwin-arm64.node");
|
|
197
|
+
} catch (e$1) {
|
|
198
|
+
loadErrors.push(e$1);
|
|
199
|
+
}
|
|
200
|
+
try {
|
|
201
|
+
const binding = __require("@rolldown/binding-darwin-arm64");
|
|
202
|
+
const bindingPackageVersion = __require("@rolldown/binding-darwin-arm64/package.json").version;
|
|
203
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
204
|
+
return binding;
|
|
205
|
+
} catch (e$1) {
|
|
206
|
+
loadErrors.push(e$1);
|
|
207
|
+
}
|
|
208
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on macOS: ${process.arch}`));
|
|
209
|
+
} else if (process.platform === "freebsd") if (process.arch === "x64") {
|
|
210
|
+
try {
|
|
211
|
+
return __require("./rolldown-binding.freebsd-x64.node");
|
|
212
|
+
} catch (e$1) {
|
|
213
|
+
loadErrors.push(e$1);
|
|
214
|
+
}
|
|
215
|
+
try {
|
|
216
|
+
const binding = __require("@rolldown/binding-freebsd-x64");
|
|
217
|
+
const bindingPackageVersion = __require("@rolldown/binding-freebsd-x64/package.json").version;
|
|
218
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
219
|
+
return binding;
|
|
220
|
+
} catch (e$1) {
|
|
221
|
+
loadErrors.push(e$1);
|
|
222
|
+
}
|
|
223
|
+
} else if (process.arch === "arm64") {
|
|
224
|
+
try {
|
|
225
|
+
return __require("./rolldown-binding.freebsd-arm64.node");
|
|
226
|
+
} catch (e$1) {
|
|
227
|
+
loadErrors.push(e$1);
|
|
228
|
+
}
|
|
229
|
+
try {
|
|
230
|
+
const binding = __require("@rolldown/binding-freebsd-arm64");
|
|
231
|
+
const bindingPackageVersion = __require("@rolldown/binding-freebsd-arm64/package.json").version;
|
|
232
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
233
|
+
return binding;
|
|
234
|
+
} catch (e$1) {
|
|
235
|
+
loadErrors.push(e$1);
|
|
236
|
+
}
|
|
237
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on FreeBSD: ${process.arch}`));
|
|
238
|
+
else if (process.platform === "linux") if (process.arch === "x64") if (isMusl()) {
|
|
239
|
+
try {
|
|
240
|
+
return __require("./rolldown-binding.linux-x64-musl.node");
|
|
241
|
+
} catch (e$1) {
|
|
242
|
+
loadErrors.push(e$1);
|
|
243
|
+
}
|
|
244
|
+
try {
|
|
245
|
+
const binding = __require("@rolldown/binding-linux-x64-musl");
|
|
246
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-musl/package.json").version;
|
|
247
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
248
|
+
return binding;
|
|
249
|
+
} catch (e$1) {
|
|
250
|
+
loadErrors.push(e$1);
|
|
251
|
+
}
|
|
252
|
+
} else {
|
|
253
|
+
try {
|
|
254
|
+
return __require("./rolldown-binding.linux-x64-gnu.node");
|
|
255
|
+
} catch (e$1) {
|
|
256
|
+
loadErrors.push(e$1);
|
|
257
|
+
}
|
|
258
|
+
try {
|
|
259
|
+
const binding = __require("@rolldown/binding-linux-x64-gnu");
|
|
260
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-gnu/package.json").version;
|
|
261
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
262
|
+
return binding;
|
|
263
|
+
} catch (e$1) {
|
|
264
|
+
loadErrors.push(e$1);
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
else if (process.arch === "arm64") if (isMusl()) {
|
|
268
|
+
try {
|
|
269
|
+
return __require("./rolldown-binding.linux-arm64-musl.node");
|
|
270
|
+
} catch (e$1) {
|
|
271
|
+
loadErrors.push(e$1);
|
|
272
|
+
}
|
|
273
|
+
try {
|
|
274
|
+
const binding = __require("@rolldown/binding-linux-arm64-musl");
|
|
275
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-musl/package.json").version;
|
|
276
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
277
|
+
return binding;
|
|
278
|
+
} catch (e$1) {
|
|
279
|
+
loadErrors.push(e$1);
|
|
280
|
+
}
|
|
281
|
+
} else {
|
|
282
|
+
try {
|
|
283
|
+
return __require("./rolldown-binding.linux-arm64-gnu.node");
|
|
284
|
+
} catch (e$1) {
|
|
285
|
+
loadErrors.push(e$1);
|
|
286
|
+
}
|
|
287
|
+
try {
|
|
288
|
+
const binding = __require("@rolldown/binding-linux-arm64-gnu");
|
|
289
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-gnu/package.json").version;
|
|
290
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
291
|
+
return binding;
|
|
292
|
+
} catch (e$1) {
|
|
293
|
+
loadErrors.push(e$1);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
else if (process.arch === "arm") if (isMusl()) {
|
|
297
|
+
try {
|
|
298
|
+
return __require("./rolldown-binding.linux-arm-musleabihf.node");
|
|
299
|
+
} catch (e$1) {
|
|
300
|
+
loadErrors.push(e$1);
|
|
301
|
+
}
|
|
302
|
+
try {
|
|
303
|
+
const binding = __require("@rolldown/binding-linux-arm-musleabihf");
|
|
304
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-musleabihf/package.json").version;
|
|
305
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
306
|
+
return binding;
|
|
307
|
+
} catch (e$1) {
|
|
308
|
+
loadErrors.push(e$1);
|
|
309
|
+
}
|
|
310
|
+
} else {
|
|
311
|
+
try {
|
|
312
|
+
return __require("./rolldown-binding.linux-arm-gnueabihf.node");
|
|
313
|
+
} catch (e$1) {
|
|
314
|
+
loadErrors.push(e$1);
|
|
315
|
+
}
|
|
316
|
+
try {
|
|
317
|
+
const binding = __require("@rolldown/binding-linux-arm-gnueabihf");
|
|
318
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-gnueabihf/package.json").version;
|
|
319
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
320
|
+
return binding;
|
|
321
|
+
} catch (e$1) {
|
|
322
|
+
loadErrors.push(e$1);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
else if (process.arch === "loong64") if (isMusl()) {
|
|
326
|
+
try {
|
|
327
|
+
return __require("./rolldown-binding.linux-loong64-musl.node");
|
|
328
|
+
} catch (e$1) {
|
|
329
|
+
loadErrors.push(e$1);
|
|
330
|
+
}
|
|
331
|
+
try {
|
|
332
|
+
const binding = __require("@rolldown/binding-linux-loong64-musl");
|
|
333
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-musl/package.json").version;
|
|
334
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
335
|
+
return binding;
|
|
336
|
+
} catch (e$1) {
|
|
337
|
+
loadErrors.push(e$1);
|
|
338
|
+
}
|
|
339
|
+
} else {
|
|
340
|
+
try {
|
|
341
|
+
return __require("./rolldown-binding.linux-loong64-gnu.node");
|
|
342
|
+
} catch (e$1) {
|
|
343
|
+
loadErrors.push(e$1);
|
|
344
|
+
}
|
|
345
|
+
try {
|
|
346
|
+
const binding = __require("@rolldown/binding-linux-loong64-gnu");
|
|
347
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-gnu/package.json").version;
|
|
348
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
349
|
+
return binding;
|
|
350
|
+
} catch (e$1) {
|
|
351
|
+
loadErrors.push(e$1);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
else if (process.arch === "riscv64") if (isMusl()) {
|
|
355
|
+
try {
|
|
356
|
+
return __require("./rolldown-binding.linux-riscv64-musl.node");
|
|
357
|
+
} catch (e$1) {
|
|
358
|
+
loadErrors.push(e$1);
|
|
359
|
+
}
|
|
360
|
+
try {
|
|
361
|
+
const binding = __require("@rolldown/binding-linux-riscv64-musl");
|
|
362
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-musl/package.json").version;
|
|
363
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
364
|
+
return binding;
|
|
365
|
+
} catch (e$1) {
|
|
366
|
+
loadErrors.push(e$1);
|
|
367
|
+
}
|
|
368
|
+
} else {
|
|
369
|
+
try {
|
|
370
|
+
return __require("./rolldown-binding.linux-riscv64-gnu.node");
|
|
371
|
+
} catch (e$1) {
|
|
372
|
+
loadErrors.push(e$1);
|
|
373
|
+
}
|
|
374
|
+
try {
|
|
375
|
+
const binding = __require("@rolldown/binding-linux-riscv64-gnu");
|
|
376
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-gnu/package.json").version;
|
|
377
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
378
|
+
return binding;
|
|
379
|
+
} catch (e$1) {
|
|
380
|
+
loadErrors.push(e$1);
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
else if (process.arch === "ppc64") {
|
|
384
|
+
try {
|
|
385
|
+
return __require("./rolldown-binding.linux-ppc64-gnu.node");
|
|
386
|
+
} catch (e$1) {
|
|
387
|
+
loadErrors.push(e$1);
|
|
388
|
+
}
|
|
389
|
+
try {
|
|
390
|
+
const binding = __require("@rolldown/binding-linux-ppc64-gnu");
|
|
391
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-ppc64-gnu/package.json").version;
|
|
392
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
393
|
+
return binding;
|
|
394
|
+
} catch (e$1) {
|
|
395
|
+
loadErrors.push(e$1);
|
|
396
|
+
}
|
|
397
|
+
} else if (process.arch === "s390x") {
|
|
398
|
+
try {
|
|
399
|
+
return __require("./rolldown-binding.linux-s390x-gnu.node");
|
|
400
|
+
} catch (e$1) {
|
|
401
|
+
loadErrors.push(e$1);
|
|
402
|
+
}
|
|
403
|
+
try {
|
|
404
|
+
const binding = __require("@rolldown/binding-linux-s390x-gnu");
|
|
405
|
+
const bindingPackageVersion = __require("@rolldown/binding-linux-s390x-gnu/package.json").version;
|
|
406
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
407
|
+
return binding;
|
|
408
|
+
} catch (e$1) {
|
|
409
|
+
loadErrors.push(e$1);
|
|
410
|
+
}
|
|
411
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on Linux: ${process.arch}`));
|
|
412
|
+
else if (process.platform === "openharmony") if (process.arch === "arm64") {
|
|
413
|
+
try {
|
|
414
|
+
return __require("./rolldown-binding.openharmony-arm64.node");
|
|
415
|
+
} catch (e$1) {
|
|
416
|
+
loadErrors.push(e$1);
|
|
417
|
+
}
|
|
418
|
+
try {
|
|
419
|
+
const binding = __require("@rolldown/binding-openharmony-arm64");
|
|
420
|
+
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm64/package.json").version;
|
|
421
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
422
|
+
return binding;
|
|
423
|
+
} catch (e$1) {
|
|
424
|
+
loadErrors.push(e$1);
|
|
425
|
+
}
|
|
426
|
+
} else if (process.arch === "x64") {
|
|
427
|
+
try {
|
|
428
|
+
return __require("./rolldown-binding.openharmony-x64.node");
|
|
429
|
+
} catch (e$1) {
|
|
430
|
+
loadErrors.push(e$1);
|
|
431
|
+
}
|
|
432
|
+
try {
|
|
433
|
+
const binding = __require("@rolldown/binding-openharmony-x64");
|
|
434
|
+
const bindingPackageVersion = __require("@rolldown/binding-openharmony-x64/package.json").version;
|
|
435
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
436
|
+
return binding;
|
|
437
|
+
} catch (e$1) {
|
|
438
|
+
loadErrors.push(e$1);
|
|
439
|
+
}
|
|
440
|
+
} else if (process.arch === "arm") {
|
|
441
|
+
try {
|
|
442
|
+
return __require("./rolldown-binding.openharmony-arm.node");
|
|
443
|
+
} catch (e$1) {
|
|
444
|
+
loadErrors.push(e$1);
|
|
445
|
+
}
|
|
446
|
+
try {
|
|
447
|
+
const binding = __require("@rolldown/binding-openharmony-arm");
|
|
448
|
+
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm/package.json").version;
|
|
449
|
+
if (bindingPackageVersion !== "1.0.0-beta.46" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 1.0.0-beta.46 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
450
|
+
return binding;
|
|
451
|
+
} catch (e$1) {
|
|
452
|
+
loadErrors.push(e$1);
|
|
453
|
+
}
|
|
454
|
+
} else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`));
|
|
455
|
+
else loadErrors.push(/* @__PURE__ */ new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`));
|
|
456
|
+
}
|
|
457
|
+
nativeBinding = requireNative();
|
|
458
|
+
if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
459
|
+
let wasiBinding = null;
|
|
460
|
+
let wasiBindingError = null;
|
|
461
|
+
try {
|
|
462
|
+
wasiBinding = __require("./rolldown-binding.wasi.cjs");
|
|
463
|
+
nativeBinding = wasiBinding;
|
|
464
|
+
} catch (err) {
|
|
465
|
+
if (process.env.NAPI_RS_FORCE_WASI) wasiBindingError = err;
|
|
466
|
+
}
|
|
467
|
+
if (!nativeBinding) try {
|
|
468
|
+
wasiBinding = __require("@rolldown/binding-wasm32-wasi");
|
|
469
|
+
nativeBinding = wasiBinding;
|
|
470
|
+
} catch (err) {
|
|
471
|
+
if (process.env.NAPI_RS_FORCE_WASI) {
|
|
472
|
+
wasiBindingError.cause = err;
|
|
473
|
+
loadErrors.push(err);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
if (process.env.NAPI_RS_FORCE_WASI === "error" && !wasiBinding) {
|
|
477
|
+
const error$1 = /* @__PURE__ */ new Error("WASI binding not found and NAPI_RS_FORCE_WASI is set to error");
|
|
478
|
+
error$1.cause = wasiBindingError;
|
|
479
|
+
throw error$1;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
if (!nativeBinding) {
|
|
483
|
+
if (loadErrors.length > 0) throw new Error("Cannot find native binding. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.", { cause: loadErrors.reduce((err, cur) => {
|
|
484
|
+
cur.cause = err;
|
|
485
|
+
return cur;
|
|
486
|
+
}) });
|
|
487
|
+
throw new Error(`Failed to load native binding`);
|
|
488
|
+
}
|
|
489
|
+
module.exports = nativeBinding;
|
|
490
|
+
module.exports.minify = nativeBinding.minify;
|
|
491
|
+
module.exports.Severity = nativeBinding.Severity;
|
|
492
|
+
module.exports.ParseResult = nativeBinding.ParseResult;
|
|
493
|
+
module.exports.ExportExportNameKind = nativeBinding.ExportExportNameKind;
|
|
494
|
+
module.exports.ExportImportNameKind = nativeBinding.ExportImportNameKind;
|
|
495
|
+
module.exports.ExportLocalNameKind = nativeBinding.ExportLocalNameKind;
|
|
496
|
+
module.exports.ImportNameKind = nativeBinding.ImportNameKind;
|
|
497
|
+
module.exports.parseAsync = nativeBinding.parseAsync;
|
|
498
|
+
module.exports.parseSync = nativeBinding.parseSync;
|
|
499
|
+
module.exports.rawTransferSupported = nativeBinding.rawTransferSupported;
|
|
500
|
+
module.exports.ResolverFactory = nativeBinding.ResolverFactory;
|
|
501
|
+
module.exports.EnforceExtension = nativeBinding.EnforceExtension;
|
|
502
|
+
module.exports.ModuleType = nativeBinding.ModuleType;
|
|
503
|
+
module.exports.sync = nativeBinding.sync;
|
|
504
|
+
module.exports.HelperMode = nativeBinding.HelperMode;
|
|
505
|
+
module.exports.isolatedDeclaration = nativeBinding.isolatedDeclaration;
|
|
506
|
+
module.exports.moduleRunnerTransform = nativeBinding.moduleRunnerTransform;
|
|
507
|
+
module.exports.transform = nativeBinding.transform;
|
|
508
|
+
module.exports.transformAsync = nativeBinding.transformAsync;
|
|
509
|
+
module.exports.BindingBundleEndEventData = nativeBinding.BindingBundleEndEventData;
|
|
510
|
+
module.exports.BindingBundleErrorEventData = nativeBinding.BindingBundleErrorEventData;
|
|
511
|
+
module.exports.BindingBundler = nativeBinding.BindingBundler;
|
|
512
|
+
module.exports.BindingBundlerImpl = nativeBinding.BindingBundlerImpl;
|
|
513
|
+
module.exports.BindingCallableBuiltinPlugin = nativeBinding.BindingCallableBuiltinPlugin;
|
|
514
|
+
module.exports.BindingChunkingContext = nativeBinding.BindingChunkingContext;
|
|
515
|
+
module.exports.BindingDevEngine = nativeBinding.BindingDevEngine;
|
|
516
|
+
module.exports.BindingMagicString = nativeBinding.BindingMagicString;
|
|
517
|
+
module.exports.BindingModuleInfo = nativeBinding.BindingModuleInfo;
|
|
518
|
+
module.exports.BindingNormalizedOptions = nativeBinding.BindingNormalizedOptions;
|
|
519
|
+
module.exports.BindingOutputAsset = nativeBinding.BindingOutputAsset;
|
|
520
|
+
module.exports.BindingOutputChunk = nativeBinding.BindingOutputChunk;
|
|
521
|
+
module.exports.BindingPluginContext = nativeBinding.BindingPluginContext;
|
|
522
|
+
module.exports.BindingRenderedChunk = nativeBinding.BindingRenderedChunk;
|
|
523
|
+
module.exports.BindingRenderedChunkMeta = nativeBinding.BindingRenderedChunkMeta;
|
|
524
|
+
module.exports.BindingRenderedModule = nativeBinding.BindingRenderedModule;
|
|
525
|
+
module.exports.BindingTransformPluginContext = nativeBinding.BindingTransformPluginContext;
|
|
526
|
+
module.exports.BindingUrlResolver = nativeBinding.BindingUrlResolver;
|
|
527
|
+
module.exports.BindingWatcher = nativeBinding.BindingWatcher;
|
|
528
|
+
module.exports.BindingWatcherChangeData = nativeBinding.BindingWatcherChangeData;
|
|
529
|
+
module.exports.BindingWatcherEvent = nativeBinding.BindingWatcherEvent;
|
|
530
|
+
module.exports.ParallelJsPluginRegistry = nativeBinding.ParallelJsPluginRegistry;
|
|
531
|
+
module.exports.ScheduledBuild = nativeBinding.ScheduledBuild;
|
|
532
|
+
module.exports.TraceSubscriberGuard = nativeBinding.TraceSubscriberGuard;
|
|
533
|
+
module.exports.BindingAttachDebugInfo = nativeBinding.BindingAttachDebugInfo;
|
|
534
|
+
module.exports.BindingBuiltinPluginName = nativeBinding.BindingBuiltinPluginName;
|
|
535
|
+
module.exports.BindingChunkModuleOrderBy = nativeBinding.BindingChunkModuleOrderBy;
|
|
536
|
+
module.exports.BindingLogLevel = nativeBinding.BindingLogLevel;
|
|
537
|
+
module.exports.BindingPluginOrder = nativeBinding.BindingPluginOrder;
|
|
538
|
+
module.exports.BindingPropertyReadSideEffects = nativeBinding.BindingPropertyReadSideEffects;
|
|
539
|
+
module.exports.BindingPropertyWriteSideEffects = nativeBinding.BindingPropertyWriteSideEffects;
|
|
540
|
+
module.exports.BindingRebuildStrategy = nativeBinding.BindingRebuildStrategy;
|
|
541
|
+
module.exports.createTokioRuntime = nativeBinding.createTokioRuntime;
|
|
542
|
+
module.exports.FilterTokenKind = nativeBinding.FilterTokenKind;
|
|
543
|
+
module.exports.initTraceSubscriber = nativeBinding.initTraceSubscriber;
|
|
544
|
+
module.exports.registerPlugins = nativeBinding.registerPlugins;
|
|
545
|
+
module.exports.shutdownAsyncRuntime = nativeBinding.shutdownAsyncRuntime;
|
|
546
|
+
module.exports.startAsyncRuntime = nativeBinding.startAsyncRuntime;
|
|
547
|
+
}) });
|
|
548
|
+
|
|
549
|
+
//#endregion
|
|
550
|
+
//#region src/setup.ts
|
|
551
|
+
var import_binding$9 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
2
552
|
|
|
553
|
+
//#endregion
|
|
3
554
|
//#region package.json
|
|
4
|
-
var version = "1.0.0-beta.
|
|
555
|
+
var version = "1.0.0-beta.46";
|
|
5
556
|
|
|
6
557
|
//#endregion
|
|
7
558
|
//#region src/utils/code-frame.ts
|
|
@@ -227,6 +778,7 @@ function augmentCodeLocation(properties, pos, source, id$1) {
|
|
|
227
778
|
|
|
228
779
|
//#endregion
|
|
229
780
|
//#region src/builtin-plugin/utils.ts
|
|
781
|
+
var import_binding$8 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
230
782
|
var BuiltinPlugin = class {
|
|
231
783
|
constructor(name, _options) {
|
|
232
784
|
this.name = name;
|
|
@@ -234,7 +786,7 @@ var BuiltinPlugin = class {
|
|
|
234
786
|
}
|
|
235
787
|
};
|
|
236
788
|
function makeBuiltinPluginCallable(plugin) {
|
|
237
|
-
let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
|
|
789
|
+
let callablePlugin = new import_binding$8.BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
|
|
238
790
|
const wrappedPlugin = plugin;
|
|
239
791
|
for (const key in callablePlugin) wrappedPlugin[key] = async function(...args$1) {
|
|
240
792
|
try {
|
|
@@ -2504,19 +3056,63 @@ function validateOption(key, options) {
|
|
|
2504
3056
|
}
|
|
2505
3057
|
|
|
2506
3058
|
//#endregion
|
|
2507
|
-
//#region src/
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
3059
|
+
//#region src/decorators/lazy.ts
|
|
3060
|
+
const LAZY_FIELDS_KEY = Symbol("__lazy_fields__");
|
|
3061
|
+
const LAZY_CACHE_PREFIX = "__cached_";
|
|
3062
|
+
/**
|
|
3063
|
+
* Legacy decorator that makes a getter lazy-evaluated and cached.
|
|
3064
|
+
* Also auto-registers the field for batch prefetching.
|
|
3065
|
+
*
|
|
3066
|
+
* @example
|
|
3067
|
+
* ```typescript
|
|
3068
|
+
* class MyClass {
|
|
3069
|
+
* @lazy
|
|
3070
|
+
* get expensiveValue() {
|
|
3071
|
+
* return someExpensiveComputation();
|
|
3072
|
+
* }
|
|
3073
|
+
* }
|
|
3074
|
+
* ```
|
|
3075
|
+
*/
|
|
3076
|
+
function lazy(target, propertyKey, descriptor) {
|
|
3077
|
+
if (!target.constructor[LAZY_FIELDS_KEY]) target.constructor[LAZY_FIELDS_KEY] = /* @__PURE__ */ new Set();
|
|
3078
|
+
target.constructor[LAZY_FIELDS_KEY].add(propertyKey);
|
|
3079
|
+
const originalGetter = descriptor.get;
|
|
3080
|
+
const cacheKey = LAZY_CACHE_PREFIX + propertyKey;
|
|
3081
|
+
descriptor.get = function() {
|
|
3082
|
+
if (!(cacheKey in this)) this[cacheKey] = originalGetter.call(this);
|
|
3083
|
+
return this[cacheKey];
|
|
3084
|
+
};
|
|
3085
|
+
return descriptor;
|
|
3086
|
+
}
|
|
3087
|
+
/**
|
|
3088
|
+
* Get all lazy field names from a class instance.
|
|
3089
|
+
*
|
|
3090
|
+
* @param instance - Instance to inspect
|
|
3091
|
+
* @returns Set of lazy property names
|
|
3092
|
+
*/
|
|
3093
|
+
function getLazyFields(instance$1) {
|
|
3094
|
+
return instance$1.constructor[LAZY_FIELDS_KEY] || /* @__PURE__ */ new Set();
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
//#endregion
|
|
3098
|
+
//#region src/decorators/non-enumerable.ts
|
|
3099
|
+
/**
|
|
3100
|
+
* Decorator that makes a property or method non-enumerable.
|
|
3101
|
+
* This hides the property from enumeration (e.g., Object.keys(), for...in loops).
|
|
3102
|
+
*
|
|
3103
|
+
* @example
|
|
3104
|
+
* ```typescript
|
|
3105
|
+
* class MyClass {
|
|
3106
|
+
* @nonEnumerable
|
|
3107
|
+
* hiddenMethod() {
|
|
3108
|
+
* return 'This method will not show up in Object.keys()';
|
|
3109
|
+
* }
|
|
3110
|
+
* }
|
|
3111
|
+
* ```
|
|
3112
|
+
*/
|
|
3113
|
+
function nonEnumerable(target, propertyKey, descriptor) {
|
|
3114
|
+
descriptor.enumerable = false;
|
|
3115
|
+
return descriptor;
|
|
2520
3116
|
}
|
|
2521
3117
|
|
|
2522
3118
|
//#endregion
|
|
@@ -2528,6 +3124,56 @@ function bindingAssetSource(source) {
|
|
|
2528
3124
|
return { inner: source };
|
|
2529
3125
|
}
|
|
2530
3126
|
|
|
3127
|
+
//#endregion
|
|
3128
|
+
//#region \0@oxc-project+runtime@0.96.0/helpers/decorate.js
|
|
3129
|
+
function __decorate(decorators, target, key, desc) {
|
|
3130
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3131
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3132
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
3133
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3134
|
+
}
|
|
3135
|
+
|
|
3136
|
+
//#endregion
|
|
3137
|
+
//#region src/types/output-asset-impl.ts
|
|
3138
|
+
var OutputAssetImpl = class {
|
|
3139
|
+
type = "asset";
|
|
3140
|
+
constructor(bindingAsset) {
|
|
3141
|
+
this.bindingAsset = bindingAsset;
|
|
3142
|
+
}
|
|
3143
|
+
get fileName() {
|
|
3144
|
+
return this.bindingAsset.getFileName();
|
|
3145
|
+
}
|
|
3146
|
+
get originalFileName() {
|
|
3147
|
+
return this.bindingAsset.getOriginalFileName() || null;
|
|
3148
|
+
}
|
|
3149
|
+
get originalFileNames() {
|
|
3150
|
+
return this.bindingAsset.getOriginalFileNames();
|
|
3151
|
+
}
|
|
3152
|
+
get name() {
|
|
3153
|
+
return this.bindingAsset.getName() ?? void 0;
|
|
3154
|
+
}
|
|
3155
|
+
get names() {
|
|
3156
|
+
return this.bindingAsset.getNames();
|
|
3157
|
+
}
|
|
3158
|
+
get source() {
|
|
3159
|
+
return transformAssetSource(this.bindingAsset.getSource());
|
|
3160
|
+
}
|
|
3161
|
+
__rolldown_external_memory_handle__(keepDataAlive) {
|
|
3162
|
+
if (keepDataAlive) this.#evaluateAllLazyFields();
|
|
3163
|
+
return this.bindingAsset.dropInner();
|
|
3164
|
+
}
|
|
3165
|
+
#evaluateAllLazyFields() {
|
|
3166
|
+
for (const field of getLazyFields(this)) this[field];
|
|
3167
|
+
}
|
|
3168
|
+
};
|
|
3169
|
+
__decorate([lazy], OutputAssetImpl.prototype, "fileName", null);
|
|
3170
|
+
__decorate([lazy], OutputAssetImpl.prototype, "originalFileName", null);
|
|
3171
|
+
__decorate([lazy], OutputAssetImpl.prototype, "originalFileNames", null);
|
|
3172
|
+
__decorate([lazy], OutputAssetImpl.prototype, "name", null);
|
|
3173
|
+
__decorate([lazy], OutputAssetImpl.prototype, "names", null);
|
|
3174
|
+
__decorate([lazy], OutputAssetImpl.prototype, "source", null);
|
|
3175
|
+
__decorate([nonEnumerable], OutputAssetImpl.prototype, "__rolldown_external_memory_handle__", null);
|
|
3176
|
+
|
|
2531
3177
|
//#endregion
|
|
2532
3178
|
//#region src/utils/transform-rendered-module.ts
|
|
2533
3179
|
function transformToRenderedModule(bindingRenderedModule) {
|
|
@@ -2593,6 +3239,96 @@ function transformChunkModules(modules) {
|
|
|
2593
3239
|
return result;
|
|
2594
3240
|
}
|
|
2595
3241
|
|
|
3242
|
+
//#endregion
|
|
3243
|
+
//#region src/types/output-chunk-impl.ts
|
|
3244
|
+
var OutputChunkImpl = class {
|
|
3245
|
+
type = "chunk";
|
|
3246
|
+
constructor(bindingChunk) {
|
|
3247
|
+
this.bindingChunk = bindingChunk;
|
|
3248
|
+
}
|
|
3249
|
+
get fileName() {
|
|
3250
|
+
return this.bindingChunk.getFileName();
|
|
3251
|
+
}
|
|
3252
|
+
get name() {
|
|
3253
|
+
return this.bindingChunk.getName();
|
|
3254
|
+
}
|
|
3255
|
+
get exports() {
|
|
3256
|
+
return this.bindingChunk.getExports();
|
|
3257
|
+
}
|
|
3258
|
+
get isEntry() {
|
|
3259
|
+
return this.bindingChunk.getIsEntry();
|
|
3260
|
+
}
|
|
3261
|
+
get facadeModuleId() {
|
|
3262
|
+
return this.bindingChunk.getFacadeModuleId() || null;
|
|
3263
|
+
}
|
|
3264
|
+
get isDynamicEntry() {
|
|
3265
|
+
return this.bindingChunk.getIsDynamicEntry();
|
|
3266
|
+
}
|
|
3267
|
+
get sourcemapFileName() {
|
|
3268
|
+
return this.bindingChunk.getSourcemapFileName() || null;
|
|
3269
|
+
}
|
|
3270
|
+
get preliminaryFileName() {
|
|
3271
|
+
return this.bindingChunk.getPreliminaryFileName();
|
|
3272
|
+
}
|
|
3273
|
+
get code() {
|
|
3274
|
+
return this.bindingChunk.getCode();
|
|
3275
|
+
}
|
|
3276
|
+
get modules() {
|
|
3277
|
+
return transformChunkModules(this.bindingChunk.getModules());
|
|
3278
|
+
}
|
|
3279
|
+
get imports() {
|
|
3280
|
+
return this.bindingChunk.getImports();
|
|
3281
|
+
}
|
|
3282
|
+
get dynamicImports() {
|
|
3283
|
+
return this.bindingChunk.getDynamicImports();
|
|
3284
|
+
}
|
|
3285
|
+
get moduleIds() {
|
|
3286
|
+
return this.bindingChunk.getModuleIds();
|
|
3287
|
+
}
|
|
3288
|
+
get map() {
|
|
3289
|
+
const mapString = this.bindingChunk.getMap();
|
|
3290
|
+
return mapString ? transformToRollupSourceMap(mapString) : null;
|
|
3291
|
+
}
|
|
3292
|
+
__rolldown_external_memory_handle__(keepDataAlive) {
|
|
3293
|
+
if (keepDataAlive) this.#evaluateAllLazyFields();
|
|
3294
|
+
return this.bindingChunk.dropInner();
|
|
3295
|
+
}
|
|
3296
|
+
#evaluateAllLazyFields() {
|
|
3297
|
+
for (const field of getLazyFields(this)) this[field];
|
|
3298
|
+
}
|
|
3299
|
+
};
|
|
3300
|
+
__decorate([lazy], OutputChunkImpl.prototype, "fileName", null);
|
|
3301
|
+
__decorate([lazy], OutputChunkImpl.prototype, "name", null);
|
|
3302
|
+
__decorate([lazy], OutputChunkImpl.prototype, "exports", null);
|
|
3303
|
+
__decorate([lazy], OutputChunkImpl.prototype, "isEntry", null);
|
|
3304
|
+
__decorate([lazy], OutputChunkImpl.prototype, "facadeModuleId", null);
|
|
3305
|
+
__decorate([lazy], OutputChunkImpl.prototype, "isDynamicEntry", null);
|
|
3306
|
+
__decorate([lazy], OutputChunkImpl.prototype, "sourcemapFileName", null);
|
|
3307
|
+
__decorate([lazy], OutputChunkImpl.prototype, "preliminaryFileName", null);
|
|
3308
|
+
__decorate([lazy], OutputChunkImpl.prototype, "code", null);
|
|
3309
|
+
__decorate([lazy], OutputChunkImpl.prototype, "modules", null);
|
|
3310
|
+
__decorate([lazy], OutputChunkImpl.prototype, "imports", null);
|
|
3311
|
+
__decorate([lazy], OutputChunkImpl.prototype, "dynamicImports", null);
|
|
3312
|
+
__decorate([lazy], OutputChunkImpl.prototype, "moduleIds", null);
|
|
3313
|
+
__decorate([lazy], OutputChunkImpl.prototype, "map", null);
|
|
3314
|
+
__decorate([nonEnumerable], OutputChunkImpl.prototype, "__rolldown_external_memory_handle__", null);
|
|
3315
|
+
|
|
3316
|
+
//#endregion
|
|
3317
|
+
//#region src/types/sourcemap.ts
|
|
3318
|
+
function bindingifySourcemap$1(map) {
|
|
3319
|
+
if (map == null) return;
|
|
3320
|
+
return { inner: typeof map === "string" ? map : {
|
|
3321
|
+
file: map.file ?? void 0,
|
|
3322
|
+
mappings: map.mappings,
|
|
3323
|
+
sourceRoot: "sourceRoot" in map ? map.sourceRoot ?? void 0 : void 0,
|
|
3324
|
+
sources: map.sources?.map((s) => s ?? void 0),
|
|
3325
|
+
sourcesContent: map.sourcesContent?.map((s) => s ?? void 0),
|
|
3326
|
+
names: map.names,
|
|
3327
|
+
x_google_ignoreList: map.x_google_ignoreList,
|
|
3328
|
+
debugId: "debugId" in map ? map.debugId : void 0
|
|
3329
|
+
} };
|
|
3330
|
+
}
|
|
3331
|
+
|
|
2596
3332
|
//#endregion
|
|
2597
3333
|
//#region src/utils/transform-to-rollup-output.ts
|
|
2598
3334
|
function transformToRollupSourceMap(map) {
|
|
@@ -2608,78 +3344,38 @@ function transformToRollupSourceMap(map) {
|
|
|
2608
3344
|
return obj;
|
|
2609
3345
|
}
|
|
2610
3346
|
function transformToRollupOutputChunk(bindingChunk) {
|
|
2611
|
-
|
|
2612
|
-
type: "chunk",
|
|
2613
|
-
get code() {
|
|
2614
|
-
return bindingChunk.code;
|
|
2615
|
-
},
|
|
2616
|
-
fileName: bindingChunk.fileName,
|
|
2617
|
-
name: bindingChunk.name,
|
|
2618
|
-
get modules() {
|
|
2619
|
-
return transformChunkModules(bindingChunk.modules);
|
|
2620
|
-
},
|
|
2621
|
-
get imports() {
|
|
2622
|
-
return bindingChunk.imports;
|
|
2623
|
-
},
|
|
2624
|
-
get dynamicImports() {
|
|
2625
|
-
return bindingChunk.dynamicImports;
|
|
2626
|
-
},
|
|
2627
|
-
exports: bindingChunk.exports,
|
|
2628
|
-
isEntry: bindingChunk.isEntry,
|
|
2629
|
-
facadeModuleId: bindingChunk.facadeModuleId || null,
|
|
2630
|
-
isDynamicEntry: bindingChunk.isDynamicEntry,
|
|
2631
|
-
get moduleIds() {
|
|
2632
|
-
return bindingChunk.moduleIds;
|
|
2633
|
-
},
|
|
2634
|
-
get map() {
|
|
2635
|
-
return bindingChunk.map ? transformToRollupSourceMap(bindingChunk.map) : null;
|
|
2636
|
-
},
|
|
2637
|
-
sourcemapFileName: bindingChunk.sourcemapFileName || null,
|
|
2638
|
-
preliminaryFileName: bindingChunk.preliminaryFileName
|
|
2639
|
-
};
|
|
2640
|
-
const cache = {};
|
|
2641
|
-
return new Proxy(chunk, {
|
|
2642
|
-
get(target, p) {
|
|
2643
|
-
if (p in cache) return cache[p];
|
|
2644
|
-
const value = target[p];
|
|
2645
|
-
cache[p] = value;
|
|
2646
|
-
return value;
|
|
2647
|
-
},
|
|
2648
|
-
has(target, p) {
|
|
2649
|
-
if (p in cache) return true;
|
|
2650
|
-
return p in target;
|
|
2651
|
-
}
|
|
2652
|
-
});
|
|
3347
|
+
return new OutputChunkImpl(bindingChunk);
|
|
2653
3348
|
}
|
|
2654
3349
|
function transformToMutableRollupOutputChunk(bindingChunk, changed) {
|
|
2655
3350
|
const chunk = {
|
|
2656
3351
|
type: "chunk",
|
|
2657
3352
|
get code() {
|
|
2658
|
-
return bindingChunk.
|
|
3353
|
+
return bindingChunk.getCode();
|
|
2659
3354
|
},
|
|
2660
|
-
fileName: bindingChunk.
|
|
2661
|
-
name: bindingChunk.
|
|
3355
|
+
fileName: bindingChunk.getFileName(),
|
|
3356
|
+
name: bindingChunk.getName(),
|
|
2662
3357
|
get modules() {
|
|
2663
|
-
return transformChunkModules(bindingChunk.
|
|
3358
|
+
return transformChunkModules(bindingChunk.getModules());
|
|
2664
3359
|
},
|
|
2665
3360
|
get imports() {
|
|
2666
|
-
return bindingChunk.
|
|
3361
|
+
return bindingChunk.getImports();
|
|
2667
3362
|
},
|
|
2668
3363
|
get dynamicImports() {
|
|
2669
|
-
return bindingChunk.
|
|
3364
|
+
return bindingChunk.getDynamicImports();
|
|
2670
3365
|
},
|
|
2671
|
-
exports: bindingChunk.
|
|
2672
|
-
isEntry: bindingChunk.
|
|
2673
|
-
facadeModuleId: bindingChunk.
|
|
2674
|
-
isDynamicEntry: bindingChunk.
|
|
3366
|
+
exports: bindingChunk.getExports(),
|
|
3367
|
+
isEntry: bindingChunk.getIsEntry(),
|
|
3368
|
+
facadeModuleId: bindingChunk.getFacadeModuleId() || null,
|
|
3369
|
+
isDynamicEntry: bindingChunk.getIsDynamicEntry(),
|
|
2675
3370
|
get moduleIds() {
|
|
2676
|
-
return bindingChunk.
|
|
3371
|
+
return bindingChunk.getModuleIds();
|
|
2677
3372
|
},
|
|
2678
3373
|
get map() {
|
|
2679
|
-
|
|
3374
|
+
const map = bindingChunk.getMap();
|
|
3375
|
+
return map ? transformToRollupSourceMap(map) : null;
|
|
2680
3376
|
},
|
|
2681
|
-
sourcemapFileName: bindingChunk.
|
|
2682
|
-
preliminaryFileName: bindingChunk.
|
|
3377
|
+
sourcemapFileName: bindingChunk.getSourcemapFileName() || null,
|
|
3378
|
+
preliminaryFileName: bindingChunk.getPreliminaryFileName()
|
|
2683
3379
|
};
|
|
2684
3380
|
const cache = {};
|
|
2685
3381
|
return new Proxy(chunk, {
|
|
@@ -2691,7 +3387,7 @@ function transformToMutableRollupOutputChunk(bindingChunk, changed) {
|
|
|
2691
3387
|
},
|
|
2692
3388
|
set(_target, p, newValue) {
|
|
2693
3389
|
cache[p] = newValue;
|
|
2694
|
-
changed.updated.add(bindingChunk.
|
|
3390
|
+
changed.updated.add(bindingChunk.getFileName());
|
|
2695
3391
|
return true;
|
|
2696
3392
|
},
|
|
2697
3393
|
has(target, p) {
|
|
@@ -2701,36 +3397,19 @@ function transformToMutableRollupOutputChunk(bindingChunk, changed) {
|
|
|
2701
3397
|
});
|
|
2702
3398
|
}
|
|
2703
3399
|
function transformToRollupOutputAsset(bindingAsset) {
|
|
2704
|
-
|
|
2705
|
-
type: "asset",
|
|
2706
|
-
fileName: bindingAsset.fileName,
|
|
2707
|
-
originalFileName: bindingAsset.originalFileName || null,
|
|
2708
|
-
originalFileNames: bindingAsset.originalFileNames,
|
|
2709
|
-
get source() {
|
|
2710
|
-
return transformAssetSource(bindingAsset.source);
|
|
2711
|
-
},
|
|
2712
|
-
name: bindingAsset.name ?? void 0,
|
|
2713
|
-
names: bindingAsset.names
|
|
2714
|
-
};
|
|
2715
|
-
const cache = {};
|
|
2716
|
-
return new Proxy(asset, { get(target, p) {
|
|
2717
|
-
if (p in cache) return cache[p];
|
|
2718
|
-
const value = target[p];
|
|
2719
|
-
cache[p] = value;
|
|
2720
|
-
return value;
|
|
2721
|
-
} });
|
|
3400
|
+
return new OutputAssetImpl(bindingAsset);
|
|
2722
3401
|
}
|
|
2723
3402
|
function transformToMutableRollupOutputAsset(bindingAsset, changed) {
|
|
2724
3403
|
const asset = {
|
|
2725
3404
|
type: "asset",
|
|
2726
|
-
fileName: bindingAsset.
|
|
2727
|
-
originalFileName: bindingAsset.
|
|
2728
|
-
originalFileNames: bindingAsset.
|
|
3405
|
+
fileName: bindingAsset.getFileName(),
|
|
3406
|
+
originalFileName: bindingAsset.getOriginalFileName() || null,
|
|
3407
|
+
originalFileNames: bindingAsset.getOriginalFileNames(),
|
|
2729
3408
|
get source() {
|
|
2730
|
-
return transformAssetSource(bindingAsset.
|
|
3409
|
+
return transformAssetSource(bindingAsset.getSource());
|
|
2731
3410
|
},
|
|
2732
|
-
name: bindingAsset.
|
|
2733
|
-
names: bindingAsset.
|
|
3411
|
+
name: bindingAsset.getName() ?? void 0,
|
|
3412
|
+
names: bindingAsset.getNames()
|
|
2734
3413
|
};
|
|
2735
3414
|
const cache = {};
|
|
2736
3415
|
return new Proxy(asset, {
|
|
@@ -2742,7 +3421,7 @@ function transformToMutableRollupOutputAsset(bindingAsset, changed) {
|
|
|
2742
3421
|
},
|
|
2743
3422
|
set(_target, p, newValue) {
|
|
2744
3423
|
cache[p] = newValue;
|
|
2745
|
-
changed.updated.add(bindingAsset.
|
|
3424
|
+
changed.updated.add(bindingAsset.getFileName());
|
|
2746
3425
|
return true;
|
|
2747
3426
|
}
|
|
2748
3427
|
});
|
|
@@ -2819,20 +3498,33 @@ var RolldownOutputImpl = class {
|
|
|
2819
3498
|
get output() {
|
|
2820
3499
|
return transformToRollupOutput(this.bindingOutputs).output;
|
|
2821
3500
|
}
|
|
3501
|
+
__rolldown_external_memory_handle__(keepDataAlive) {
|
|
3502
|
+
const results = this.output.map((item) => item.__rolldown_external_memory_handle__(keepDataAlive));
|
|
3503
|
+
if (!results.every((r) => r.freed)) {
|
|
3504
|
+
const reasons = results.filter((r) => !r.freed).map((r) => r.reason).filter(Boolean);
|
|
3505
|
+
return {
|
|
3506
|
+
freed: false,
|
|
3507
|
+
reason: `Failed to free ${reasons.length} item(s): ${reasons.join("; ")}`
|
|
3508
|
+
};
|
|
3509
|
+
}
|
|
3510
|
+
return { freed: true };
|
|
3511
|
+
}
|
|
2822
3512
|
};
|
|
3513
|
+
__decorate([lazy], RolldownOutputImpl.prototype, "output", null);
|
|
3514
|
+
__decorate([nonEnumerable], RolldownOutputImpl.prototype, "__rolldown_external_memory_handle__", null);
|
|
2823
3515
|
|
|
2824
3516
|
//#endregion
|
|
2825
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.
|
|
3517
|
+
//#region ../../node_modules/.pnpm/oxc-parser@0.96.0/node_modules/oxc-parser/src-js/wrap.js
|
|
2826
3518
|
function wrap$1(result) {
|
|
2827
|
-
let program, module, comments, errors;
|
|
3519
|
+
let program, module$1, comments, errors;
|
|
2828
3520
|
return {
|
|
2829
3521
|
get program() {
|
|
2830
3522
|
if (!program) program = jsonParseAst(result.program);
|
|
2831
3523
|
return program;
|
|
2832
3524
|
},
|
|
2833
3525
|
get module() {
|
|
2834
|
-
if (!module) module = result.module;
|
|
2835
|
-
return module;
|
|
3526
|
+
if (!module$1) module$1 = result.module;
|
|
3527
|
+
return module$1;
|
|
2836
3528
|
},
|
|
2837
3529
|
get comments() {
|
|
2838
3530
|
if (!comments) comments = result.comments;
|
|
@@ -2855,11 +3547,12 @@ function applyFix(program, fixPath) {
|
|
|
2855
3547
|
if (node.bigint) node.value = BigInt(node.bigint);
|
|
2856
3548
|
else try {
|
|
2857
3549
|
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
2858
|
-
} catch
|
|
3550
|
+
} catch {}
|
|
2859
3551
|
}
|
|
2860
3552
|
|
|
2861
3553
|
//#endregion
|
|
2862
3554
|
//#region src/parse-ast-index.ts
|
|
3555
|
+
var import_binding$7 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
2863
3556
|
function wrap(result, sourceText) {
|
|
2864
3557
|
result = wrap$1(result);
|
|
2865
3558
|
if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
|
|
@@ -2886,7 +3579,7 @@ const defaultParserOptions = {
|
|
|
2886
3579
|
preserveParens: false
|
|
2887
3580
|
};
|
|
2888
3581
|
function parseAst(sourceText, options, filename) {
|
|
2889
|
-
return wrap(parseSync(filename ?? "file.js", sourceText, {
|
|
3582
|
+
return wrap((0, import_binding$7.parseSync)(filename ?? "file.js", sourceText, {
|
|
2890
3583
|
...defaultParserOptions,
|
|
2891
3584
|
...options
|
|
2892
3585
|
}), sourceText);
|
|
@@ -3243,13 +3936,14 @@ function bindingifyRenderChunkFilter(filterOption) {
|
|
|
3243
3936
|
|
|
3244
3937
|
//#endregion
|
|
3245
3938
|
//#region src/plugin/bindingify-plugin-hook-meta.ts
|
|
3939
|
+
var import_binding$6 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
3246
3940
|
function bindingifyPluginHookMeta(options) {
|
|
3247
3941
|
return { order: bindingPluginOrder(options.order) };
|
|
3248
3942
|
}
|
|
3249
3943
|
function bindingPluginOrder(order) {
|
|
3250
3944
|
switch (order) {
|
|
3251
|
-
case "post": return BindingPluginOrder.Post;
|
|
3252
|
-
case "pre": return BindingPluginOrder.Pre;
|
|
3945
|
+
case "post": return import_binding$6.BindingPluginOrder.Post;
|
|
3946
|
+
case "pre": return import_binding$6.BindingPluginOrder.Pre;
|
|
3253
3947
|
case null:
|
|
3254
3948
|
case void 0: return;
|
|
3255
3949
|
default: throw new Error(`Unknown plugin order: ${order}`);
|
|
@@ -3415,6 +4109,7 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
3415
4109
|
|
|
3416
4110
|
//#endregion
|
|
3417
4111
|
//#region src/plugin/bindingify-build-hooks.ts
|
|
4112
|
+
var import_binding$5 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
3418
4113
|
function bindingifyBuildStart(args$1) {
|
|
3419
4114
|
const hook = args$1.plugin.buildStart;
|
|
3420
4115
|
if (!hook) return {};
|
|
@@ -3512,7 +4207,7 @@ function bindingifyTransform(args$1) {
|
|
|
3512
4207
|
plugin: async (ctx, code$1, id$1, meta$1) => {
|
|
3513
4208
|
Object.defineProperties(meta$1, {
|
|
3514
4209
|
magicString: { get() {
|
|
3515
|
-
return new BindingMagicString(code$1);
|
|
4210
|
+
return new import_binding$5.BindingMagicString(code$1);
|
|
3516
4211
|
} },
|
|
3517
4212
|
ast: { get() {
|
|
3518
4213
|
let lang = "js";
|
|
@@ -3543,7 +4238,7 @@ function bindingifyTransform(args$1) {
|
|
|
3543
4238
|
let normalizedCode = void 0;
|
|
3544
4239
|
let map = ret.map;
|
|
3545
4240
|
if (typeof ret.code === "string") normalizedCode = ret.code;
|
|
3546
|
-
else if (ret.code instanceof BindingMagicString) {
|
|
4241
|
+
else if (ret.code instanceof import_binding$5.BindingMagicString) {
|
|
3547
4242
|
let magicString = ret.code;
|
|
3548
4243
|
normalizedCode = magicString.toString();
|
|
3549
4244
|
let fallbackSourcemap = ctx.sendMagicString(magicString);
|
|
@@ -4272,6 +4967,7 @@ function normalizeTransformOptions(inputOptions, onLog) {
|
|
|
4272
4967
|
|
|
4273
4968
|
//#endregion
|
|
4274
4969
|
//#region src/utils/bindingify-input-options.ts
|
|
4970
|
+
var import_binding$4 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
4275
4971
|
function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
|
|
4276
4972
|
const pluginContextData = new PluginContextData(onLog, outputOptions, normalizedOutputPlugins);
|
|
4277
4973
|
const plugins = rawPlugins.map((plugin) => {
|
|
@@ -4341,9 +5037,9 @@ function bindingifyHmr(hmr) {
|
|
|
4341
5037
|
function bindingifyAttachDebugInfo(attachDebugInfo) {
|
|
4342
5038
|
switch (attachDebugInfo) {
|
|
4343
5039
|
case void 0: return;
|
|
4344
|
-
case "full": return BindingAttachDebugInfo.Full;
|
|
4345
|
-
case "simple": return BindingAttachDebugInfo.Simple;
|
|
4346
|
-
case "none": return BindingAttachDebugInfo.None;
|
|
5040
|
+
case "full": return import_binding$4.BindingAttachDebugInfo.Full;
|
|
5041
|
+
case "simple": return import_binding$4.BindingAttachDebugInfo.Simple;
|
|
5042
|
+
case "none": return import_binding$4.BindingAttachDebugInfo.None;
|
|
4347
5043
|
}
|
|
4348
5044
|
}
|
|
4349
5045
|
function bindingifyExternal(external) {
|
|
@@ -4356,13 +5052,13 @@ function bindingifyExternal(external) {
|
|
|
4356
5052
|
}
|
|
4357
5053
|
}
|
|
4358
5054
|
function bindingifyExperimental(experimental) {
|
|
4359
|
-
let chunkModulesOrder = BindingChunkModuleOrderBy.ExecOrder;
|
|
5055
|
+
let chunkModulesOrder = import_binding$4.BindingChunkModuleOrderBy.ExecOrder;
|
|
4360
5056
|
if (experimental?.chunkModulesOrder) switch (experimental.chunkModulesOrder) {
|
|
4361
5057
|
case "exec-order":
|
|
4362
|
-
chunkModulesOrder = BindingChunkModuleOrderBy.ExecOrder;
|
|
5058
|
+
chunkModulesOrder = import_binding$4.BindingChunkModuleOrderBy.ExecOrder;
|
|
4363
5059
|
break;
|
|
4364
5060
|
case "module-id":
|
|
4365
|
-
chunkModulesOrder = BindingChunkModuleOrderBy.ModuleId;
|
|
5061
|
+
chunkModulesOrder = import_binding$4.BindingChunkModuleOrderBy.ModuleId;
|
|
4366
5062
|
break;
|
|
4367
5063
|
default: throw new Error(`Unexpected chunkModulesOrder: ${experimental.chunkModulesOrder}`);
|
|
4368
5064
|
}
|
|
@@ -4422,10 +5118,10 @@ function bindingifyInject(inject) {
|
|
|
4422
5118
|
}
|
|
4423
5119
|
function bindingifyLogLevel(logLevel) {
|
|
4424
5120
|
switch (logLevel) {
|
|
4425
|
-
case "silent": return BindingLogLevel.Silent;
|
|
4426
|
-
case "debug": return BindingLogLevel.Debug;
|
|
4427
|
-
case "warn": return BindingLogLevel.Warn;
|
|
4428
|
-
case "info": return BindingLogLevel.Info;
|
|
5121
|
+
case "silent": return import_binding$4.BindingLogLevel.Silent;
|
|
5122
|
+
case "debug": return import_binding$4.BindingLogLevel.Debug;
|
|
5123
|
+
case "warn": return import_binding$4.BindingLogLevel.Warn;
|
|
5124
|
+
case "info": return import_binding$4.BindingLogLevel.Info;
|
|
4429
5125
|
default: throw new Error(`Unexpected log level: ${logLevel}`);
|
|
4430
5126
|
}
|
|
4431
5127
|
}
|
|
@@ -4461,19 +5157,19 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
4461
5157
|
};
|
|
4462
5158
|
switch (config.propertyReadSideEffects) {
|
|
4463
5159
|
case "always":
|
|
4464
|
-
normalizedConfig.propertyReadSideEffects = BindingPropertyReadSideEffects.Always;
|
|
5160
|
+
normalizedConfig.propertyReadSideEffects = import_binding$4.BindingPropertyReadSideEffects.Always;
|
|
4465
5161
|
break;
|
|
4466
5162
|
case false:
|
|
4467
|
-
normalizedConfig.propertyReadSideEffects = BindingPropertyReadSideEffects.False;
|
|
5163
|
+
normalizedConfig.propertyReadSideEffects = import_binding$4.BindingPropertyReadSideEffects.False;
|
|
4468
5164
|
break;
|
|
4469
5165
|
default:
|
|
4470
5166
|
}
|
|
4471
5167
|
switch (config.propertyWriteSideEffects) {
|
|
4472
5168
|
case "always":
|
|
4473
|
-
normalizedConfig.propertyWriteSideEffects = BindingPropertyWriteSideEffects.Always;
|
|
5169
|
+
normalizedConfig.propertyWriteSideEffects = import_binding$4.BindingPropertyWriteSideEffects.Always;
|
|
4474
5170
|
break;
|
|
4475
5171
|
case false:
|
|
4476
|
-
normalizedConfig.propertyWriteSideEffects = BindingPropertyWriteSideEffects.False;
|
|
5172
|
+
normalizedConfig.propertyWriteSideEffects = import_binding$4.BindingPropertyWriteSideEffects.False;
|
|
4477
5173
|
break;
|
|
4478
5174
|
default:
|
|
4479
5175
|
}
|
|
@@ -4631,6 +5327,10 @@ function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
|
4631
5327
|
};
|
|
4632
5328
|
}
|
|
4633
5329
|
|
|
5330
|
+
//#endregion
|
|
5331
|
+
//#region src/utils/initialize-parallel-plugins.ts
|
|
5332
|
+
var import_binding$3 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
5333
|
+
|
|
4634
5334
|
//#endregion
|
|
4635
5335
|
//#region src/utils/create-bundler-option.ts
|
|
4636
5336
|
async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
@@ -4661,6 +5361,7 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
|
4661
5361
|
|
|
4662
5362
|
//#endregion
|
|
4663
5363
|
//#region src/api/rolldown/rolldown-build.ts
|
|
5364
|
+
var import_binding$2 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
4664
5365
|
Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
|
|
4665
5366
|
var RolldownBuild = class RolldownBuild {
|
|
4666
5367
|
#inputOptions;
|
|
@@ -4669,7 +5370,7 @@ var RolldownBuild = class RolldownBuild {
|
|
|
4669
5370
|
static asyncRuntimeShutdown = false;
|
|
4670
5371
|
constructor(inputOptions) {
|
|
4671
5372
|
this.#inputOptions = inputOptions;
|
|
4672
|
-
this.#bundler = new BindingBundler();
|
|
5373
|
+
this.#bundler = new import_binding$2.BindingBundler();
|
|
4673
5374
|
}
|
|
4674
5375
|
get closed() {
|
|
4675
5376
|
return this.#bundlerImpl?.impl.closed ?? true;
|
|
@@ -4677,13 +5378,13 @@ var RolldownBuild = class RolldownBuild {
|
|
|
4677
5378
|
async #getBundlerWithStopWorker(outputOptions) {
|
|
4678
5379
|
if (this.#bundlerImpl) await this.#bundlerImpl.stopWorkers?.();
|
|
4679
5380
|
const option = await createBundlerOptions(this.#inputOptions, outputOptions, false);
|
|
4680
|
-
if (RolldownBuild.asyncRuntimeShutdown) startAsyncRuntime();
|
|
5381
|
+
if (RolldownBuild.asyncRuntimeShutdown) (0, import_binding$2.startAsyncRuntime)();
|
|
4681
5382
|
try {
|
|
4682
5383
|
return this.#bundlerImpl = {
|
|
4683
5384
|
impl: this.#bundler.createImpl(option.bundlerOptions),
|
|
4684
5385
|
stopWorkers: option.stopWorkers,
|
|
4685
5386
|
shutdown: () => {
|
|
4686
|
-
shutdownAsyncRuntime();
|
|
5387
|
+
(0, import_binding$2.shutdownAsyncRuntime)();
|
|
4687
5388
|
RolldownBuild.asyncRuntimeShutdown = true;
|
|
4688
5389
|
}
|
|
4689
5390
|
};
|
|
@@ -4706,6 +5407,9 @@ var RolldownBuild = class RolldownBuild {
|
|
|
4706
5407
|
const { impl } = await this.#getBundlerWithStopWorker(outputOptions);
|
|
4707
5408
|
return new RolldownOutputImpl(unwrapBindingResult(await impl.write()));
|
|
4708
5409
|
}
|
|
5410
|
+
/**
|
|
5411
|
+
* Close the build and free resources.
|
|
5412
|
+
*/
|
|
4709
5413
|
async close() {
|
|
4710
5414
|
if (this.#bundlerImpl) {
|
|
4711
5415
|
await this.#bundlerImpl.stopWorkers?.();
|
|
@@ -4820,6 +5524,7 @@ var WatcherEmitter = class {
|
|
|
4820
5524
|
|
|
4821
5525
|
//#endregion
|
|
4822
5526
|
//#region src/api/watch/watcher.ts
|
|
5527
|
+
var import_binding$1 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
4823
5528
|
var Watcher = class {
|
|
4824
5529
|
closed;
|
|
4825
5530
|
inner;
|
|
@@ -4841,7 +5546,7 @@ var Watcher = class {
|
|
|
4841
5546
|
this.closed = true;
|
|
4842
5547
|
for (const stop of this.stopWorkers) await stop?.();
|
|
4843
5548
|
await this.inner.close();
|
|
4844
|
-
shutdownAsyncRuntime();
|
|
5549
|
+
(0, import_binding$1.shutdownAsyncRuntime)();
|
|
4845
5550
|
}
|
|
4846
5551
|
start() {
|
|
4847
5552
|
process.nextTick(() => this.inner.start(this.emitter.onEvent.bind(this.emitter)));
|
|
@@ -4853,7 +5558,7 @@ async function createWatcher(emitter, input) {
|
|
|
4853
5558
|
return createBundlerOptions(await PluginDriver.callOptionsHook(option, true), output, true);
|
|
4854
5559
|
})).flat());
|
|
4855
5560
|
const notifyOptions = getValidNotifyOption(bundlerOptions);
|
|
4856
|
-
new Watcher(emitter, new BindingWatcher(bundlerOptions.map((option) => option.bundlerOptions), notifyOptions), bundlerOptions.map((option) => option.stopWorkers)).start();
|
|
5561
|
+
new Watcher(emitter, new import_binding$1.BindingWatcher(bundlerOptions.map((option) => option.bundlerOptions), notifyOptions), bundlerOptions.map((option) => option.stopWorkers)).start();
|
|
4857
5562
|
}
|
|
4858
5563
|
function getValidNotifyOption(bundlerOptions) {
|
|
4859
5564
|
let result;
|
|
@@ -4882,7 +5587,8 @@ function defineConfig(config) {
|
|
|
4882
5587
|
|
|
4883
5588
|
//#endregion
|
|
4884
5589
|
//#region src/index.ts
|
|
5590
|
+
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
4885
5591
|
const VERSION = version;
|
|
4886
5592
|
|
|
4887
5593
|
//#endregion
|
|
4888
|
-
export { build as a, createBundlerOptions as c, transformToRollupOutput as d, bindingifySourcemap$1 as f, makeBuiltinPluginCallable as h, watch as i, normalizedStringOrRegex as l, BuiltinPlugin as m,
|
|
5594
|
+
export { __toESM as _, build as a, createBundlerOptions as c, transformToRollupOutput as d, bindingifySourcemap$1 as f, require_binding as g, makeBuiltinPluginCallable as h, watch as i, normalizedStringOrRegex as l, BuiltinPlugin as m, import_binding as n, rolldown as o, PluginDriver as p, defineConfig as r, RolldownBuild as s, VERSION as t, normalizeBindingResult as u };
|