@rolldown/browser 1.0.0-beta.46 → 1.0.0-beta.47
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 +3 -4
- package/dist/cli.mjs +5 -6
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +4 -5
- package/dist/experimental-index.browser.mjs +5 -14
- package/dist/experimental-index.d.mts +3 -3
- package/dist/experimental-index.mjs +7 -17
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/index.browser.mjs +1 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -5
- package/dist/parallel-plugin-worker.mjs +5 -6
- package/dist/parallel-plugin.d.mts +2 -2
- package/dist/parse-ast-index.d.mts +1 -1
- package/dist/parse-ast-index.mjs +1 -2
- package/dist/rolldown-binding.wasm32-wasi.wasm +0 -0
- package/dist/shared/{binding-CCMrV5an.d.mts → binding-CRSqCQIK.d.mts} +31 -10
- package/dist/shared/{define-config-Bj-neIhz.d.mts → define-config-pfDd6Le4.d.mts} +1 -1
- package/dist/shared/{load-config-DnUAKl9P.mjs → load-config-D508WsWM.mjs} +2 -2
- package/dist/shared/{parse-ast-index-DMI5m8Lk.mjs → parse-ast-index-BiBzSGZe.mjs} +3 -4
- package/dist/shared/{src-B8saaB3b.mjs → src-DE7RBSfl.mjs} +37 -41
- package/dist/{src-B-7Hrt6w.js → src-Deywlnh0.js} +37 -595
- package/package.json +1 -1
- package/dist/shared/binding-BeWSOIj5.mjs +0 -578
- /package/dist/shared/{composable-filters-CgRsnfr3.mjs → composable-filters-D_PY7Qa7.mjs} +0 -0
- /package/dist/shared/{prompt-YGfbLmz5.mjs → prompt-BDwA3jSr.mjs} +0 -0
|
@@ -1,558 +1,7 @@
|
|
|
1
|
-
|
|
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);
|
|
1
|
+
import { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingLogLevel, BindingMagicString, BindingMagicString as BindingMagicString$1, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, BindingWatcher, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
|
|
552
2
|
|
|
553
|
-
//#endregion
|
|
554
3
|
//#region package.json
|
|
555
|
-
var version = "1.0.0-beta.
|
|
4
|
+
var version = "1.0.0-beta.47";
|
|
556
5
|
|
|
557
6
|
//#endregion
|
|
558
7
|
//#region src/utils/code-frame.ts
|
|
@@ -778,7 +227,6 @@ function augmentCodeLocation(properties, pos, source, id$1) {
|
|
|
778
227
|
|
|
779
228
|
//#endregion
|
|
780
229
|
//#region src/builtin-plugin/utils.ts
|
|
781
|
-
var import_binding$8 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
782
230
|
var BuiltinPlugin = class {
|
|
783
231
|
constructor(name, _options) {
|
|
784
232
|
this.name = name;
|
|
@@ -786,7 +234,7 @@ var BuiltinPlugin = class {
|
|
|
786
234
|
}
|
|
787
235
|
};
|
|
788
236
|
function makeBuiltinPluginCallable(plugin) {
|
|
789
|
-
let callablePlugin = new
|
|
237
|
+
let callablePlugin = new BindingCallableBuiltinPlugin(bindingifyBuiltInPlugin(plugin));
|
|
790
238
|
const wrappedPlugin = plugin;
|
|
791
239
|
for (const key in callablePlugin) wrappedPlugin[key] = async function(...args$1) {
|
|
792
240
|
try {
|
|
@@ -3516,15 +2964,15 @@ __decorate([nonEnumerable], RolldownOutputImpl.prototype, "__rolldown_external_m
|
|
|
3516
2964
|
//#endregion
|
|
3517
2965
|
//#region ../../node_modules/.pnpm/oxc-parser@0.96.0/node_modules/oxc-parser/src-js/wrap.js
|
|
3518
2966
|
function wrap$1(result) {
|
|
3519
|
-
let program, module
|
|
2967
|
+
let program, module, comments, errors;
|
|
3520
2968
|
return {
|
|
3521
2969
|
get program() {
|
|
3522
2970
|
if (!program) program = jsonParseAst(result.program);
|
|
3523
2971
|
return program;
|
|
3524
2972
|
},
|
|
3525
2973
|
get module() {
|
|
3526
|
-
if (!module
|
|
3527
|
-
return module
|
|
2974
|
+
if (!module) module = result.module;
|
|
2975
|
+
return module;
|
|
3528
2976
|
},
|
|
3529
2977
|
get comments() {
|
|
3530
2978
|
if (!comments) comments = result.comments;
|
|
@@ -3552,7 +3000,6 @@ function applyFix(program, fixPath) {
|
|
|
3552
3000
|
|
|
3553
3001
|
//#endregion
|
|
3554
3002
|
//#region src/parse-ast-index.ts
|
|
3555
|
-
var import_binding$7 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
3556
3003
|
function wrap(result, sourceText) {
|
|
3557
3004
|
result = wrap$1(result);
|
|
3558
3005
|
if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
|
|
@@ -3579,7 +3026,7 @@ const defaultParserOptions = {
|
|
|
3579
3026
|
preserveParens: false
|
|
3580
3027
|
};
|
|
3581
3028
|
function parseAst(sourceText, options, filename) {
|
|
3582
|
-
return wrap(
|
|
3029
|
+
return wrap(parseSync(filename ?? "file.js", sourceText, {
|
|
3583
3030
|
...defaultParserOptions,
|
|
3584
3031
|
...options
|
|
3585
3032
|
}), sourceText);
|
|
@@ -3936,14 +3383,13 @@ function bindingifyRenderChunkFilter(filterOption) {
|
|
|
3936
3383
|
|
|
3937
3384
|
//#endregion
|
|
3938
3385
|
//#region src/plugin/bindingify-plugin-hook-meta.ts
|
|
3939
|
-
var import_binding$6 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
3940
3386
|
function bindingifyPluginHookMeta(options) {
|
|
3941
3387
|
return { order: bindingPluginOrder(options.order) };
|
|
3942
3388
|
}
|
|
3943
3389
|
function bindingPluginOrder(order) {
|
|
3944
3390
|
switch (order) {
|
|
3945
|
-
case "post": return
|
|
3946
|
-
case "pre": return
|
|
3391
|
+
case "post": return BindingPluginOrder.Post;
|
|
3392
|
+
case "pre": return BindingPluginOrder.Pre;
|
|
3947
3393
|
case null:
|
|
3948
3394
|
case void 0: return;
|
|
3949
3395
|
default: throw new Error(`Unknown plugin order: ${order}`);
|
|
@@ -4109,7 +3555,6 @@ var TransformPluginContextImpl = class extends PluginContextImpl {
|
|
|
4109
3555
|
|
|
4110
3556
|
//#endregion
|
|
4111
3557
|
//#region src/plugin/bindingify-build-hooks.ts
|
|
4112
|
-
var import_binding$5 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
4113
3558
|
function bindingifyBuildStart(args$1) {
|
|
4114
3559
|
const hook = args$1.plugin.buildStart;
|
|
4115
3560
|
if (!hook) return {};
|
|
@@ -4205,11 +3650,15 @@ function bindingifyTransform(args$1) {
|
|
|
4205
3650
|
const { handler, meta, options } = normalizeHook(hook);
|
|
4206
3651
|
return {
|
|
4207
3652
|
plugin: async (ctx, code$1, id$1, meta$1) => {
|
|
3653
|
+
let magicStringInstance, astInstance;
|
|
4208
3654
|
Object.defineProperties(meta$1, {
|
|
4209
3655
|
magicString: { get() {
|
|
4210
|
-
|
|
3656
|
+
if (magicStringInstance) return magicStringInstance;
|
|
3657
|
+
magicStringInstance = new BindingMagicString(code$1);
|
|
3658
|
+
return magicStringInstance;
|
|
4211
3659
|
} },
|
|
4212
3660
|
ast: { get() {
|
|
3661
|
+
if (astInstance) return astInstance;
|
|
4213
3662
|
let lang = "js";
|
|
4214
3663
|
switch (meta$1.moduleType) {
|
|
4215
3664
|
case "js":
|
|
@@ -4220,10 +3669,11 @@ function bindingifyTransform(args$1) {
|
|
|
4220
3669
|
break;
|
|
4221
3670
|
default: break;
|
|
4222
3671
|
}
|
|
4223
|
-
|
|
3672
|
+
astInstance = parseAst(code$1, {
|
|
4224
3673
|
astType: meta$1.moduleType.includes("ts") ? "ts" : "js",
|
|
4225
3674
|
lang
|
|
4226
3675
|
});
|
|
3676
|
+
return astInstance;
|
|
4227
3677
|
} }
|
|
4228
3678
|
});
|
|
4229
3679
|
const transformCtx = new TransformPluginContextImpl(args$1.outputOptions, ctx.inner(), args$1.plugin, args$1.pluginContextData, ctx, id$1, code$1, args$1.onLog, args$1.logLevel, args$1.watchMode);
|
|
@@ -4238,7 +3688,7 @@ function bindingifyTransform(args$1) {
|
|
|
4238
3688
|
let normalizedCode = void 0;
|
|
4239
3689
|
let map = ret.map;
|
|
4240
3690
|
if (typeof ret.code === "string") normalizedCode = ret.code;
|
|
4241
|
-
else if (ret.code instanceof
|
|
3691
|
+
else if (ret.code instanceof BindingMagicString) {
|
|
4242
3692
|
let magicString = ret.code;
|
|
4243
3693
|
normalizedCode = magicString.toString();
|
|
4244
3694
|
let fallbackSourcemap = ctx.sendMagicString(magicString);
|
|
@@ -4967,7 +4417,6 @@ function normalizeTransformOptions(inputOptions, onLog) {
|
|
|
4967
4417
|
|
|
4968
4418
|
//#endregion
|
|
4969
4419
|
//#region src/utils/bindingify-input-options.ts
|
|
4970
|
-
var import_binding$4 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
4971
4420
|
function bindingifyInputOptions(rawPlugins, inputOptions, outputOptions, normalizedOutputPlugins, onLog, logLevel, watchMode) {
|
|
4972
4421
|
const pluginContextData = new PluginContextData(onLog, outputOptions, normalizedOutputPlugins);
|
|
4973
4422
|
const plugins = rawPlugins.map((plugin) => {
|
|
@@ -5037,9 +4486,9 @@ function bindingifyHmr(hmr) {
|
|
|
5037
4486
|
function bindingifyAttachDebugInfo(attachDebugInfo) {
|
|
5038
4487
|
switch (attachDebugInfo) {
|
|
5039
4488
|
case void 0: return;
|
|
5040
|
-
case "full": return
|
|
5041
|
-
case "simple": return
|
|
5042
|
-
case "none": return
|
|
4489
|
+
case "full": return BindingAttachDebugInfo.Full;
|
|
4490
|
+
case "simple": return BindingAttachDebugInfo.Simple;
|
|
4491
|
+
case "none": return BindingAttachDebugInfo.None;
|
|
5043
4492
|
}
|
|
5044
4493
|
}
|
|
5045
4494
|
function bindingifyExternal(external) {
|
|
@@ -5052,13 +4501,13 @@ function bindingifyExternal(external) {
|
|
|
5052
4501
|
}
|
|
5053
4502
|
}
|
|
5054
4503
|
function bindingifyExperimental(experimental) {
|
|
5055
|
-
let chunkModulesOrder =
|
|
4504
|
+
let chunkModulesOrder = BindingChunkModuleOrderBy.ExecOrder;
|
|
5056
4505
|
if (experimental?.chunkModulesOrder) switch (experimental.chunkModulesOrder) {
|
|
5057
4506
|
case "exec-order":
|
|
5058
|
-
chunkModulesOrder =
|
|
4507
|
+
chunkModulesOrder = BindingChunkModuleOrderBy.ExecOrder;
|
|
5059
4508
|
break;
|
|
5060
4509
|
case "module-id":
|
|
5061
|
-
chunkModulesOrder =
|
|
4510
|
+
chunkModulesOrder = BindingChunkModuleOrderBy.ModuleId;
|
|
5062
4511
|
break;
|
|
5063
4512
|
default: throw new Error(`Unexpected chunkModulesOrder: ${experimental.chunkModulesOrder}`);
|
|
5064
4513
|
}
|
|
@@ -5118,10 +4567,10 @@ function bindingifyInject(inject) {
|
|
|
5118
4567
|
}
|
|
5119
4568
|
function bindingifyLogLevel(logLevel) {
|
|
5120
4569
|
switch (logLevel) {
|
|
5121
|
-
case "silent": return
|
|
5122
|
-
case "debug": return
|
|
5123
|
-
case "warn": return
|
|
5124
|
-
case "info": return
|
|
4570
|
+
case "silent": return BindingLogLevel.Silent;
|
|
4571
|
+
case "debug": return BindingLogLevel.Debug;
|
|
4572
|
+
case "warn": return BindingLogLevel.Warn;
|
|
4573
|
+
case "info": return BindingLogLevel.Info;
|
|
5125
4574
|
default: throw new Error(`Unexpected log level: ${logLevel}`);
|
|
5126
4575
|
}
|
|
5127
4576
|
}
|
|
@@ -5157,19 +4606,19 @@ function bindingifyTreeshakeOptions(config) {
|
|
|
5157
4606
|
};
|
|
5158
4607
|
switch (config.propertyReadSideEffects) {
|
|
5159
4608
|
case "always":
|
|
5160
|
-
normalizedConfig.propertyReadSideEffects =
|
|
4609
|
+
normalizedConfig.propertyReadSideEffects = BindingPropertyReadSideEffects.Always;
|
|
5161
4610
|
break;
|
|
5162
4611
|
case false:
|
|
5163
|
-
normalizedConfig.propertyReadSideEffects =
|
|
4612
|
+
normalizedConfig.propertyReadSideEffects = BindingPropertyReadSideEffects.False;
|
|
5164
4613
|
break;
|
|
5165
4614
|
default:
|
|
5166
4615
|
}
|
|
5167
4616
|
switch (config.propertyWriteSideEffects) {
|
|
5168
4617
|
case "always":
|
|
5169
|
-
normalizedConfig.propertyWriteSideEffects =
|
|
4618
|
+
normalizedConfig.propertyWriteSideEffects = BindingPropertyWriteSideEffects.Always;
|
|
5170
4619
|
break;
|
|
5171
4620
|
case false:
|
|
5172
|
-
normalizedConfig.propertyWriteSideEffects =
|
|
4621
|
+
normalizedConfig.propertyWriteSideEffects = BindingPropertyWriteSideEffects.False;
|
|
5173
4622
|
break;
|
|
5174
4623
|
default:
|
|
5175
4624
|
}
|
|
@@ -5327,10 +4776,6 @@ function bindingifyAdvancedChunks(advancedChunks, manualChunks) {
|
|
|
5327
4776
|
};
|
|
5328
4777
|
}
|
|
5329
4778
|
|
|
5330
|
-
//#endregion
|
|
5331
|
-
//#region src/utils/initialize-parallel-plugins.ts
|
|
5332
|
-
var import_binding$3 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
5333
|
-
|
|
5334
4779
|
//#endregion
|
|
5335
4780
|
//#region src/utils/create-bundler-option.ts
|
|
5336
4781
|
async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
@@ -5361,7 +4806,6 @@ async function createBundlerOptions(inputOptions, outputOptions, watchMode) {
|
|
|
5361
4806
|
|
|
5362
4807
|
//#endregion
|
|
5363
4808
|
//#region src/api/rolldown/rolldown-build.ts
|
|
5364
|
-
var import_binding$2 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
5365
4809
|
Symbol.asyncDispose ??= Symbol("Symbol.asyncDispose");
|
|
5366
4810
|
var RolldownBuild = class RolldownBuild {
|
|
5367
4811
|
#inputOptions;
|
|
@@ -5370,7 +4814,7 @@ var RolldownBuild = class RolldownBuild {
|
|
|
5370
4814
|
static asyncRuntimeShutdown = false;
|
|
5371
4815
|
constructor(inputOptions) {
|
|
5372
4816
|
this.#inputOptions = inputOptions;
|
|
5373
|
-
this.#bundler = new
|
|
4817
|
+
this.#bundler = new BindingBundler();
|
|
5374
4818
|
}
|
|
5375
4819
|
get closed() {
|
|
5376
4820
|
return this.#bundlerImpl?.impl.closed ?? true;
|
|
@@ -5378,13 +4822,13 @@ var RolldownBuild = class RolldownBuild {
|
|
|
5378
4822
|
async #getBundlerWithStopWorker(outputOptions) {
|
|
5379
4823
|
if (this.#bundlerImpl) await this.#bundlerImpl.stopWorkers?.();
|
|
5380
4824
|
const option = await createBundlerOptions(this.#inputOptions, outputOptions, false);
|
|
5381
|
-
if (RolldownBuild.asyncRuntimeShutdown)
|
|
4825
|
+
if (RolldownBuild.asyncRuntimeShutdown) startAsyncRuntime();
|
|
5382
4826
|
try {
|
|
5383
4827
|
return this.#bundlerImpl = {
|
|
5384
4828
|
impl: this.#bundler.createImpl(option.bundlerOptions),
|
|
5385
4829
|
stopWorkers: option.stopWorkers,
|
|
5386
4830
|
shutdown: () => {
|
|
5387
|
-
|
|
4831
|
+
shutdownAsyncRuntime();
|
|
5388
4832
|
RolldownBuild.asyncRuntimeShutdown = true;
|
|
5389
4833
|
}
|
|
5390
4834
|
};
|
|
@@ -5524,7 +4968,6 @@ var WatcherEmitter = class {
|
|
|
5524
4968
|
|
|
5525
4969
|
//#endregion
|
|
5526
4970
|
//#region src/api/watch/watcher.ts
|
|
5527
|
-
var import_binding$1 = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
5528
4971
|
var Watcher = class {
|
|
5529
4972
|
closed;
|
|
5530
4973
|
inner;
|
|
@@ -5546,7 +4989,7 @@ var Watcher = class {
|
|
|
5546
4989
|
this.closed = true;
|
|
5547
4990
|
for (const stop of this.stopWorkers) await stop?.();
|
|
5548
4991
|
await this.inner.close();
|
|
5549
|
-
|
|
4992
|
+
shutdownAsyncRuntime();
|
|
5550
4993
|
}
|
|
5551
4994
|
start() {
|
|
5552
4995
|
process.nextTick(() => this.inner.start(this.emitter.onEvent.bind(this.emitter)));
|
|
@@ -5558,7 +5001,7 @@ async function createWatcher(emitter, input) {
|
|
|
5558
5001
|
return createBundlerOptions(await PluginDriver.callOptionsHook(option, true), output, true);
|
|
5559
5002
|
})).flat());
|
|
5560
5003
|
const notifyOptions = getValidNotifyOption(bundlerOptions);
|
|
5561
|
-
new Watcher(emitter, new
|
|
5004
|
+
new Watcher(emitter, new BindingWatcher(bundlerOptions.map((option) => option.bundlerOptions), notifyOptions), bundlerOptions.map((option) => option.stopWorkers)).start();
|
|
5562
5005
|
}
|
|
5563
5006
|
function getValidNotifyOption(bundlerOptions) {
|
|
5564
5007
|
let result;
|
|
@@ -5587,8 +5030,7 @@ function defineConfig(config) {
|
|
|
5587
5030
|
|
|
5588
5031
|
//#endregion
|
|
5589
5032
|
//#region src/index.ts
|
|
5590
|
-
var import_binding = /* @__PURE__ */ __toESM(require_binding(), 1);
|
|
5591
5033
|
const VERSION = version;
|
|
5592
5034
|
|
|
5593
5035
|
//#endregion
|
|
5594
|
-
export {
|
|
5036
|
+
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, VERSION as n, rolldown as o, PluginDriver as p, defineConfig as r, RolldownBuild as s, BindingMagicString$1 as t, normalizeBindingResult as u };
|