rolldown 1.0.0-beta.43 → 1.0.0-beta.44
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/bin/cli.mjs +1 -0
- package/dist/cli-setup.d.mts +1 -0
- package/dist/cli-setup.mjs +16 -0
- package/dist/cli.mjs +1049 -75
- package/dist/config.d.mts +2 -2
- package/dist/config.mjs +5 -4
- package/dist/experimental-index.d.mts +20 -5
- package/dist/experimental-index.mjs +39 -15
- package/dist/filter-index.d.mts +2 -2
- package/dist/filter-index.mjs +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +4 -3
- package/dist/parallel-plugin-worker.mjs +4 -3
- 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/shared/{parse-ast-index-DkUtf7vl.mjs → binding-DkR1uPxc.mjs} +97 -360
- package/dist/shared/{binding-BkaKdpud.d.mts → binding-QBosa6N8.d.mts} +89 -14
- package/dist/shared/{define-config-BGtNx9V_.d.mts → define-config-D9LwN_tW.d.mts} +193 -87
- package/dist/shared/{load-config-CLB1MN5j.mjs → load-config-BwIN-FIB.mjs} +2 -2
- package/dist/shared/{misc-CQeo-AFx.mjs → misc-usdOVIou.mjs} +1 -1
- package/dist/shared/parse-ast-index-Dee9Dv5S.mjs +297 -0
- package/dist/shared/{prompt-B4e-jZUR.mjs → prompt-YGfbLmz5.mjs} +1 -1
- package/dist/shared/{src-DucjDcdj.mjs → src-DY4_vVWu.mjs} +85 -88
- package/package.json +19 -20
- package/dist/shared/logger-B83ocDok.mjs +0 -985
|
@@ -37,13 +37,13 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
37
37
|
function getPostMessage(options) {
|
|
38
38
|
return typeof (options === null || options === void 0 ? void 0 : options.postMessage) === "function" ? options.postMessage : typeof postMessage === "function" ? postMessage : void 0;
|
|
39
39
|
}
|
|
40
|
-
function serizeErrorToBuffer(sab, code, error
|
|
40
|
+
function serizeErrorToBuffer(sab, code, error) {
|
|
41
41
|
var i32array = new Int32Array(sab);
|
|
42
42
|
Atomics.store(i32array, 0, code);
|
|
43
|
-
if (code > 1 && error
|
|
44
|
-
var name_1 = error
|
|
45
|
-
var message = error
|
|
46
|
-
var stack = error
|
|
43
|
+
if (code > 1 && error) {
|
|
44
|
+
var name_1 = error.name;
|
|
45
|
+
var message = error.message;
|
|
46
|
+
var stack = error.stack;
|
|
47
47
|
var nameBuffer = new TextEncoder().encode(name_1);
|
|
48
48
|
var messageBuffer = new TextEncoder().encode(message);
|
|
49
49
|
var stackBuffer = new TextEncoder().encode(stack);
|
|
@@ -70,14 +70,14 @@ function deserizeErrorFromBuffer(sab) {
|
|
|
70
70
|
var name = new TextDecoder().decode(nameBuffer);
|
|
71
71
|
var message = new TextDecoder().decode(messageBuffer);
|
|
72
72
|
var stack = new TextDecoder().decode(stackBuffer);
|
|
73
|
-
var error
|
|
74
|
-
Object.defineProperty(error
|
|
73
|
+
var error = new ((_a = globalThis[name]) !== null && _a !== void 0 ? _a : name === "RuntimeError" ? (_b = _WebAssembly$2.RuntimeError) !== null && _b !== void 0 ? _b : Error : Error)(message);
|
|
74
|
+
Object.defineProperty(error, "stack", {
|
|
75
75
|
value: stack,
|
|
76
76
|
writable: true,
|
|
77
77
|
enumerable: false,
|
|
78
78
|
configurable: true
|
|
79
79
|
});
|
|
80
|
-
return error
|
|
80
|
+
return error;
|
|
81
81
|
}
|
|
82
82
|
/** @public */
|
|
83
83
|
function isSharedArrayBuffer(value) {
|
|
@@ -222,9 +222,9 @@ function setupInstance(wasi, instance) {
|
|
|
222
222
|
wasi[kInstance$1] = instance;
|
|
223
223
|
wasi[kSetMemory$1](instance.exports.memory);
|
|
224
224
|
}
|
|
225
|
-
function notifyPthreadCreateResult(sab, result, error
|
|
225
|
+
function notifyPthreadCreateResult(sab, result, error) {
|
|
226
226
|
if (sab) {
|
|
227
|
-
serizeErrorToBuffer(sab.buffer, result, error
|
|
227
|
+
serizeErrorToBuffer(sab.buffer, result, error);
|
|
228
228
|
Atomics.notify(sab, 0);
|
|
229
229
|
}
|
|
230
230
|
}
|
|
@@ -4641,7 +4641,7 @@ function createNapiModule(options) {
|
|
|
4641
4641
|
HEAP_DATA_VIEW.setUint32(engine_reserved, engineReserved, true);
|
|
4642
4642
|
}
|
|
4643
4643
|
/** @__sig ipp */
|
|
4644
|
-
function napi_throw(env, error
|
|
4644
|
+
function napi_throw(env, error) {
|
|
4645
4645
|
if (!env) return 1;
|
|
4646
4646
|
var envObject = emnapiCtx.envStore.get(env);
|
|
4647
4647
|
envObject.checkGCAccess();
|
|
@@ -4649,8 +4649,8 @@ function createNapiModule(options) {
|
|
|
4649
4649
|
if (!envObject.canCallIntoJs()) return envObject.setLastError(envObject.moduleApiVersion >= 10 ? 23 : 10);
|
|
4650
4650
|
envObject.clearLastError();
|
|
4651
4651
|
try {
|
|
4652
|
-
if (!error
|
|
4653
|
-
envObject.tryCatch.setError(emnapiCtx.handleStore.get(error
|
|
4652
|
+
if (!error) return envObject.setLastError(1);
|
|
4653
|
+
envObject.tryCatch.setError(emnapiCtx.handleStore.get(error).value);
|
|
4654
4654
|
return envObject.clearLastError();
|
|
4655
4655
|
} catch (err$1) {
|
|
4656
4656
|
envObject.tryCatch.setError(err$1);
|
|
@@ -4667,9 +4667,9 @@ function createNapiModule(options) {
|
|
|
4667
4667
|
envObject.clearLastError();
|
|
4668
4668
|
try {
|
|
4669
4669
|
if (!msg) return envObject.setLastError(1);
|
|
4670
|
-
var error
|
|
4671
|
-
if (code) error
|
|
4672
|
-
envObject.tryCatch.setError(error
|
|
4670
|
+
var error = new Error(emnapiString.UTF8ToString(msg, -1));
|
|
4671
|
+
if (code) error.code = emnapiString.UTF8ToString(code, -1);
|
|
4672
|
+
envObject.tryCatch.setError(error);
|
|
4673
4673
|
return envObject.clearLastError();
|
|
4674
4674
|
} catch (err$1) {
|
|
4675
4675
|
envObject.tryCatch.setError(err$1);
|
|
@@ -4686,9 +4686,9 @@ function createNapiModule(options) {
|
|
|
4686
4686
|
envObject.clearLastError();
|
|
4687
4687
|
try {
|
|
4688
4688
|
if (!msg) return envObject.setLastError(1);
|
|
4689
|
-
var error
|
|
4690
|
-
if (code) error
|
|
4691
|
-
envObject.tryCatch.setError(error
|
|
4689
|
+
var error = new TypeError(emnapiString.UTF8ToString(msg, -1));
|
|
4690
|
+
if (code) error.code = emnapiString.UTF8ToString(code, -1);
|
|
4691
|
+
envObject.tryCatch.setError(error);
|
|
4692
4692
|
return envObject.clearLastError();
|
|
4693
4693
|
} catch (err$1) {
|
|
4694
4694
|
envObject.tryCatch.setError(err$1);
|
|
@@ -4705,9 +4705,9 @@ function createNapiModule(options) {
|
|
|
4705
4705
|
envObject.clearLastError();
|
|
4706
4706
|
try {
|
|
4707
4707
|
if (!msg) return envObject.setLastError(1);
|
|
4708
|
-
var error
|
|
4709
|
-
if (code) error
|
|
4710
|
-
envObject.tryCatch.setError(error
|
|
4708
|
+
var error = new RangeError(emnapiString.UTF8ToString(msg, -1));
|
|
4709
|
+
if (code) error.code = emnapiString.UTF8ToString(code, -1);
|
|
4710
|
+
envObject.tryCatch.setError(error);
|
|
4711
4711
|
return envObject.clearLastError();
|
|
4712
4712
|
} catch (err$1) {
|
|
4713
4713
|
envObject.tryCatch.setError(err$1);
|
|
@@ -4724,9 +4724,9 @@ function createNapiModule(options) {
|
|
|
4724
4724
|
envObject.clearLastError();
|
|
4725
4725
|
try {
|
|
4726
4726
|
if (!msg) return envObject.setLastError(1);
|
|
4727
|
-
var error
|
|
4728
|
-
if (code) error
|
|
4729
|
-
envObject.tryCatch.setError(error
|
|
4727
|
+
var error = new SyntaxError(emnapiString.UTF8ToString(msg, -1));
|
|
4728
|
+
if (code) error.code = emnapiString.UTF8ToString(code, -1);
|
|
4729
|
+
envObject.tryCatch.setError(error);
|
|
4730
4730
|
return envObject.clearLastError();
|
|
4731
4731
|
} catch (err$1) {
|
|
4732
4732
|
envObject.tryCatch.setError(err$1);
|
|
@@ -4752,13 +4752,13 @@ function createNapiModule(options) {
|
|
|
4752
4752
|
if (!result) return envObject.setLastError(1);
|
|
4753
4753
|
var msgValue = emnapiCtx.handleStore.get(msg).value;
|
|
4754
4754
|
if (typeof msgValue !== "string") return envObject.setLastError(3);
|
|
4755
|
-
var error
|
|
4755
|
+
var error = new Error(msgValue);
|
|
4756
4756
|
if (code) {
|
|
4757
4757
|
var codeValue = emnapiCtx.handleStore.get(code).value;
|
|
4758
4758
|
if (typeof codeValue !== "string") return envObject.setLastError(3);
|
|
4759
|
-
error
|
|
4759
|
+
error.code = codeValue;
|
|
4760
4760
|
}
|
|
4761
|
-
var value = emnapiCtx.addToCurrentScope(error
|
|
4761
|
+
var value = emnapiCtx.addToCurrentScope(error).id;
|
|
4762
4762
|
new DataView(wasmMemory.buffer).setUint32(result, value, true);
|
|
4763
4763
|
return envObject.clearLastError();
|
|
4764
4764
|
}
|
|
@@ -4771,13 +4771,13 @@ function createNapiModule(options) {
|
|
|
4771
4771
|
if (!result) return envObject.setLastError(1);
|
|
4772
4772
|
var msgValue = emnapiCtx.handleStore.get(msg).value;
|
|
4773
4773
|
if (typeof msgValue !== "string") return envObject.setLastError(3);
|
|
4774
|
-
var error
|
|
4774
|
+
var error = new TypeError(msgValue);
|
|
4775
4775
|
if (code) {
|
|
4776
4776
|
var codeValue = emnapiCtx.handleStore.get(code).value;
|
|
4777
4777
|
if (typeof codeValue !== "string") return envObject.setLastError(3);
|
|
4778
|
-
error
|
|
4778
|
+
error.code = codeValue;
|
|
4779
4779
|
}
|
|
4780
|
-
var value = emnapiCtx.addToCurrentScope(error
|
|
4780
|
+
var value = emnapiCtx.addToCurrentScope(error).id;
|
|
4781
4781
|
new DataView(wasmMemory.buffer).setUint32(result, value, true);
|
|
4782
4782
|
return envObject.clearLastError();
|
|
4783
4783
|
}
|
|
@@ -4790,13 +4790,13 @@ function createNapiModule(options) {
|
|
|
4790
4790
|
if (!result) return envObject.setLastError(1);
|
|
4791
4791
|
var msgValue = emnapiCtx.handleStore.get(msg).value;
|
|
4792
4792
|
if (typeof msgValue !== "string") return envObject.setLastError(3);
|
|
4793
|
-
var error
|
|
4793
|
+
var error = new RangeError(msgValue);
|
|
4794
4794
|
if (code) {
|
|
4795
4795
|
var codeValue = emnapiCtx.handleStore.get(code).value;
|
|
4796
4796
|
if (typeof codeValue !== "string") return envObject.setLastError(3);
|
|
4797
|
-
error
|
|
4797
|
+
error.code = codeValue;
|
|
4798
4798
|
}
|
|
4799
|
-
var value = emnapiCtx.addToCurrentScope(error
|
|
4799
|
+
var value = emnapiCtx.addToCurrentScope(error).id;
|
|
4800
4800
|
new DataView(wasmMemory.buffer).setUint32(result, value, true);
|
|
4801
4801
|
return envObject.clearLastError();
|
|
4802
4802
|
}
|
|
@@ -4809,13 +4809,13 @@ function createNapiModule(options) {
|
|
|
4809
4809
|
if (!result) return envObject.setLastError(1);
|
|
4810
4810
|
var msgValue = emnapiCtx.handleStore.get(msg).value;
|
|
4811
4811
|
if (typeof msgValue !== "string") return envObject.setLastError(3);
|
|
4812
|
-
var error
|
|
4812
|
+
var error = new SyntaxError(msgValue);
|
|
4813
4813
|
if (code) {
|
|
4814
4814
|
var codeValue = emnapiCtx.handleStore.get(code).value;
|
|
4815
4815
|
if (typeof codeValue !== "string") return envObject.setLastError(3);
|
|
4816
|
-
error
|
|
4816
|
+
error.code = codeValue;
|
|
4817
4817
|
}
|
|
4818
|
-
var value = emnapiCtx.addToCurrentScope(error
|
|
4818
|
+
var value = emnapiCtx.addToCurrentScope(error).id;
|
|
4819
4819
|
new DataView(wasmMemory.buffer).setUint32(result, value, true);
|
|
4820
4820
|
return envObject.clearLastError();
|
|
4821
4821
|
}
|
|
@@ -4854,9 +4854,9 @@ function createNapiModule(options) {
|
|
|
4854
4854
|
envObject.clearLastError();
|
|
4855
4855
|
try {
|
|
4856
4856
|
if (!err$1) return envObject.setLastError(1);
|
|
4857
|
-
var error
|
|
4857
|
+
var error = envObject.ctx.handleStore.get(err$1);
|
|
4858
4858
|
try {
|
|
4859
|
-
envObject.triggerFatalException(error
|
|
4859
|
+
envObject.triggerFatalException(error.value);
|
|
4860
4860
|
} catch (_) {
|
|
4861
4861
|
return envObject.setLastError(9);
|
|
4862
4862
|
}
|
|
@@ -6873,16 +6873,16 @@ var init_emnapi_esm_bundler = __esm({ "../../node_modules/.pnpm/@emnapi+runtime@
|
|
|
6873
6873
|
};
|
|
6874
6874
|
TrackedFinalizer$1.prototype.finalize = function() {
|
|
6875
6875
|
this.unlink();
|
|
6876
|
-
var error
|
|
6876
|
+
var error;
|
|
6877
6877
|
var caught = false;
|
|
6878
6878
|
try {
|
|
6879
6879
|
this._finalizer.callFinalizer();
|
|
6880
6880
|
} catch (err) {
|
|
6881
6881
|
caught = true;
|
|
6882
|
-
error
|
|
6882
|
+
error = err;
|
|
6883
6883
|
}
|
|
6884
6884
|
this.dispose();
|
|
6885
|
-
if (caught) throw error
|
|
6885
|
+
if (caught) throw error;
|
|
6886
6886
|
};
|
|
6887
6887
|
return TrackedFinalizer$1;
|
|
6888
6888
|
}(RefTracker);
|
|
@@ -8223,9 +8223,9 @@ function validateOptions(options) {
|
|
|
8223
8223
|
_WASI
|
|
8224
8224
|
};
|
|
8225
8225
|
}
|
|
8226
|
-
function initWASI(setMemory, wrap
|
|
8226
|
+
function initWASI(setMemory, wrap) {
|
|
8227
8227
|
this[kSetMemory] = setMemory;
|
|
8228
|
-
this.wasiImport = wrap
|
|
8228
|
+
this.wasiImport = wrap;
|
|
8229
8229
|
this[kStarted] = false;
|
|
8230
8230
|
this[kExitCode] = 0;
|
|
8231
8231
|
this[kInstance] = void 0;
|
|
@@ -8242,11 +8242,11 @@ async function createAsyncWASI(options = kEmptyObject) {
|
|
|
8242
8242
|
validateObject(options.asyncify, "options.asyncify");
|
|
8243
8243
|
validateFunction(options.asyncify.wrapImportFunction, "options.asyncify.wrapImportFunction");
|
|
8244
8244
|
}
|
|
8245
|
-
const wrap
|
|
8246
|
-
const setMemory = wrap
|
|
8247
|
-
delete wrap
|
|
8248
|
-
initWASI.call(_this, setMemory, wrap
|
|
8249
|
-
if (options.returnOnExit) wrap
|
|
8245
|
+
const wrap = await _WASI.createAsync(args, env, preopens, stdio, options.fs, options.print, options.printErr, options.asyncify);
|
|
8246
|
+
const setMemory = wrap._setMemory;
|
|
8247
|
+
delete wrap._setMemory;
|
|
8248
|
+
initWASI.call(_this, setMemory, wrap);
|
|
8249
|
+
if (options.returnOnExit) wrap.proc_exit = wasiReturnOnProcExit.bind(_this);
|
|
8250
8250
|
return _this;
|
|
8251
8251
|
}
|
|
8252
8252
|
var _WebAssembly, ignoreNames, Asyncify, CHAR_DOT, CHAR_FORWARD_SLASH, WasiRights, WasiError, RIGHTS_ALL, BLOCK_DEVICE_BASE, BLOCK_DEVICE_INHERITING, CHARACTER_DEVICE_BASE, CHARACTER_DEVICE_INHERITING, REGULAR_FILE_BASE, REGULAR_FILE_INHERITING, DIRECTORY_BASE, DIRECTORY_INHERITING, SOCKET_BASE, SOCKET_INHERITING, TTY_BASE, TTY_INHERITING, FileDescriptor, StandardOutput, FileDescriptorTable, SyncTable, AsyncTable, WebAssemblyMemory, Memory, _memory, _wasi, _fs, encoder, decoder, INT64_MAX, WASI$1, kEmptyObject, kExitCode, kSetMemory, kStarted, kInstance, kBindingName, WASI$2;
|
|
@@ -8475,9 +8475,9 @@ var init_wasm_util_esm_bundler = __esm({ "../../node_modules/.pnpm/@tybys+wasm-u
|
|
|
8475
8475
|
insertStdio(fd, expected, name) {
|
|
8476
8476
|
const type = 2;
|
|
8477
8477
|
const { base, inheriting } = getRights(this.stdio, fd, 2, type);
|
|
8478
|
-
const wrap
|
|
8479
|
-
if (wrap
|
|
8480
|
-
return wrap
|
|
8478
|
+
const wrap = this.insert(fd, name, name, type, base, inheriting, 0);
|
|
8479
|
+
if (wrap.id !== expected) throw new WasiError(`id: ${wrap.id} !== expected: ${expected}`, 8);
|
|
8480
|
+
return wrap;
|
|
8481
8481
|
}
|
|
8482
8482
|
insert(fd, mappedPath, realPath, type, rightsBase, rightsInheriting, preopen) {
|
|
8483
8483
|
var _a, _b;
|
|
@@ -9526,13 +9526,13 @@ var init_wasm_util_esm_bundler = __esm({ "../../node_modules/.pnpm/@tybys+wasm-u
|
|
|
9526
9526
|
const filetype = wasi.fds.getFileTypeByFd(r);
|
|
9527
9527
|
if (filetype !== 3 && ((o_flags & 2) !== 0 || resolved_path.endsWith("/"))) return 54;
|
|
9528
9528
|
const { base: max_base, inheriting: max_inheriting } = getRights(wasi.fds.stdio, r, flagsRes, filetype);
|
|
9529
|
-
const wrap
|
|
9529
|
+
const wrap = wasi.fds.insert(r, resolved_path, resolved_path, filetype, fs_rights_base & max_base, fs_rights_inheriting & max_inheriting, 0);
|
|
9530
9530
|
const stat = fs$2.fstatSync(r, { bigint: true });
|
|
9531
9531
|
if (stat.isFile()) {
|
|
9532
|
-
wrap
|
|
9533
|
-
if ((flagsRes & 1024) !== 0) wrap
|
|
9532
|
+
wrap.size = stat.size;
|
|
9533
|
+
if ((flagsRes & 1024) !== 0) wrap.pos = stat.size;
|
|
9534
9534
|
}
|
|
9535
|
-
memory.view.setInt32(fd, wrap
|
|
9535
|
+
memory.view.setInt32(fd, wrap.id, true);
|
|
9536
9536
|
return 0;
|
|
9537
9537
|
}, async function path_open(dirfd, dirflags, path, path_len, o_flags, fs_rights_base, fs_rights_inheriting, fs_flags, fd) {
|
|
9538
9538
|
path = Number(path);
|
|
@@ -9553,13 +9553,13 @@ var init_wasm_util_esm_bundler = __esm({ "../../node_modules/.pnpm/@tybys+wasm-u
|
|
|
9553
9553
|
const filetype = await wasi.fds.getFileTypeByFd(r);
|
|
9554
9554
|
if ((o_flags & 2) !== 0 && filetype !== 3) return 54;
|
|
9555
9555
|
const { base: max_base, inheriting: max_inheriting } = getRights(wasi.fds.stdio, r.fd, flagsRes, filetype);
|
|
9556
|
-
const wrap
|
|
9556
|
+
const wrap = wasi.fds.insert(r, resolved_path, resolved_path, filetype, fs_rights_base & max_base, fs_rights_inheriting & max_inheriting, 0);
|
|
9557
9557
|
const stat = await r.stat({ bigint: true });
|
|
9558
9558
|
if (stat.isFile()) {
|
|
9559
|
-
wrap
|
|
9560
|
-
if ((flagsRes & 1024) !== 0) wrap
|
|
9559
|
+
wrap.size = stat.size;
|
|
9560
|
+
if ((flagsRes & 1024) !== 0) wrap.pos = stat.size;
|
|
9561
9561
|
}
|
|
9562
|
-
memory.view.setInt32(fd, wrap
|
|
9562
|
+
memory.view.setInt32(fd, wrap.id, true);
|
|
9563
9563
|
return 0;
|
|
9564
9564
|
}, [
|
|
9565
9565
|
"i32",
|
|
@@ -9799,11 +9799,11 @@ var init_wasm_util_esm_bundler = __esm({ "../../node_modules/.pnpm/@tybys+wasm-u
|
|
|
9799
9799
|
WASI$2 = class {
|
|
9800
9800
|
constructor(options = kEmptyObject) {
|
|
9801
9801
|
const { args, env, preopens, stdio, _WASI } = validateOptions.call(this, options);
|
|
9802
|
-
const wrap
|
|
9803
|
-
const setMemory = wrap
|
|
9804
|
-
delete wrap
|
|
9805
|
-
initWASI.call(this, setMemory, wrap
|
|
9806
|
-
if (options.returnOnExit) wrap
|
|
9802
|
+
const wrap = _WASI.createSync(args, env, preopens, stdio, options.fs, options.print, options.printErr);
|
|
9803
|
+
const setMemory = wrap._setMemory;
|
|
9804
|
+
delete wrap._setMemory;
|
|
9805
|
+
initWASI.call(this, setMemory, wrap);
|
|
9806
|
+
if (options.returnOnExit) wrap.proc_exit = wasiReturnOnProcExit.bind(this);
|
|
9807
9807
|
}
|
|
9808
9808
|
finalizeBindings(instance, _a) {
|
|
9809
9809
|
var _b;
|
|
@@ -10164,6 +10164,7 @@ var require_rolldown_binding_wasi = /* @__PURE__ */ __commonJS({ "src/rolldown-b
|
|
|
10164
10164
|
module.exports.BindingRenderedChunkMeta = __napiModule.exports.BindingRenderedChunkMeta;
|
|
10165
10165
|
module.exports.BindingRenderedModule = __napiModule.exports.BindingRenderedModule;
|
|
10166
10166
|
module.exports.BindingTransformPluginContext = __napiModule.exports.BindingTransformPluginContext;
|
|
10167
|
+
module.exports.BindingUrlResolver = __napiModule.exports.BindingUrlResolver;
|
|
10167
10168
|
module.exports.BindingWatcher = __napiModule.exports.BindingWatcher;
|
|
10168
10169
|
module.exports.BindingWatcherChangeData = __napiModule.exports.BindingWatcherChangeData;
|
|
10169
10170
|
module.exports.BindingWatcherEvent = __napiModule.exports.BindingWatcherEvent;
|
|
@@ -10173,7 +10174,6 @@ var require_rolldown_binding_wasi = /* @__PURE__ */ __commonJS({ "src/rolldown-b
|
|
|
10173
10174
|
module.exports.BindingAttachDebugInfo = __napiModule.exports.BindingAttachDebugInfo;
|
|
10174
10175
|
module.exports.BindingBuiltinPluginName = __napiModule.exports.BindingBuiltinPluginName;
|
|
10175
10176
|
module.exports.BindingChunkModuleOrderBy = __napiModule.exports.BindingChunkModuleOrderBy;
|
|
10176
|
-
module.exports.BindingJsx = __napiModule.exports.BindingJsx;
|
|
10177
10177
|
module.exports.BindingLogLevel = __napiModule.exports.BindingLogLevel;
|
|
10178
10178
|
module.exports.BindingPluginOrder = __napiModule.exports.BindingPluginOrder;
|
|
10179
10179
|
module.exports.BindingPropertyReadSideEffects = __napiModule.exports.BindingPropertyReadSideEffects;
|
|
@@ -10269,7 +10269,7 @@ function requireNative() {
|
|
|
10269
10269
|
try {
|
|
10270
10270
|
const binding = __require("@rolldown/binding-android-arm64");
|
|
10271
10271
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm64/package.json").version;
|
|
10272
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10272
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10273
10273
|
return binding;
|
|
10274
10274
|
} catch (e) {
|
|
10275
10275
|
loadErrors.push(e);
|
|
@@ -10283,7 +10283,7 @@ function requireNative() {
|
|
|
10283
10283
|
try {
|
|
10284
10284
|
const binding = __require("@rolldown/binding-android-arm-eabi");
|
|
10285
10285
|
const bindingPackageVersion = __require("@rolldown/binding-android-arm-eabi/package.json").version;
|
|
10286
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10286
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10287
10287
|
return binding;
|
|
10288
10288
|
} catch (e) {
|
|
10289
10289
|
loadErrors.push(e);
|
|
@@ -10298,7 +10298,7 @@ function requireNative() {
|
|
|
10298
10298
|
try {
|
|
10299
10299
|
const binding = __require("@rolldown/binding-win32-x64-gnu");
|
|
10300
10300
|
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-gnu/package.json").version;
|
|
10301
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10301
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10302
10302
|
return binding;
|
|
10303
10303
|
} catch (e) {
|
|
10304
10304
|
loadErrors.push(e);
|
|
@@ -10312,7 +10312,7 @@ function requireNative() {
|
|
|
10312
10312
|
try {
|
|
10313
10313
|
const binding = __require("@rolldown/binding-win32-x64-msvc");
|
|
10314
10314
|
const bindingPackageVersion = __require("@rolldown/binding-win32-x64-msvc/package.json").version;
|
|
10315
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10315
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10316
10316
|
return binding;
|
|
10317
10317
|
} catch (e) {
|
|
10318
10318
|
loadErrors.push(e);
|
|
@@ -10327,7 +10327,7 @@ function requireNative() {
|
|
|
10327
10327
|
try {
|
|
10328
10328
|
const binding = __require("@rolldown/binding-win32-ia32-msvc");
|
|
10329
10329
|
const bindingPackageVersion = __require("@rolldown/binding-win32-ia32-msvc/package.json").version;
|
|
10330
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10330
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10331
10331
|
return binding;
|
|
10332
10332
|
} catch (e) {
|
|
10333
10333
|
loadErrors.push(e);
|
|
@@ -10341,7 +10341,7 @@ function requireNative() {
|
|
|
10341
10341
|
try {
|
|
10342
10342
|
const binding = __require("@rolldown/binding-win32-arm64-msvc");
|
|
10343
10343
|
const bindingPackageVersion = __require("@rolldown/binding-win32-arm64-msvc/package.json").version;
|
|
10344
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10344
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10345
10345
|
return binding;
|
|
10346
10346
|
} catch (e) {
|
|
10347
10347
|
loadErrors.push(e);
|
|
@@ -10356,7 +10356,7 @@ function requireNative() {
|
|
|
10356
10356
|
try {
|
|
10357
10357
|
const binding = __require("@rolldown/binding-darwin-universal");
|
|
10358
10358
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-universal/package.json").version;
|
|
10359
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10359
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10360
10360
|
return binding;
|
|
10361
10361
|
} catch (e) {
|
|
10362
10362
|
loadErrors.push(e);
|
|
@@ -10370,7 +10370,7 @@ function requireNative() {
|
|
|
10370
10370
|
try {
|
|
10371
10371
|
const binding = __require("@rolldown/binding-darwin-x64");
|
|
10372
10372
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-x64/package.json").version;
|
|
10373
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10373
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10374
10374
|
return binding;
|
|
10375
10375
|
} catch (e) {
|
|
10376
10376
|
loadErrors.push(e);
|
|
@@ -10384,7 +10384,7 @@ function requireNative() {
|
|
|
10384
10384
|
try {
|
|
10385
10385
|
const binding = __require("@rolldown/binding-darwin-arm64");
|
|
10386
10386
|
const bindingPackageVersion = __require("@rolldown/binding-darwin-arm64/package.json").version;
|
|
10387
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10387
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10388
10388
|
return binding;
|
|
10389
10389
|
} catch (e) {
|
|
10390
10390
|
loadErrors.push(e);
|
|
@@ -10399,7 +10399,7 @@ function requireNative() {
|
|
|
10399
10399
|
try {
|
|
10400
10400
|
const binding = __require("@rolldown/binding-freebsd-x64");
|
|
10401
10401
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-x64/package.json").version;
|
|
10402
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10402
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10403
10403
|
return binding;
|
|
10404
10404
|
} catch (e) {
|
|
10405
10405
|
loadErrors.push(e);
|
|
@@ -10413,7 +10413,7 @@ function requireNative() {
|
|
|
10413
10413
|
try {
|
|
10414
10414
|
const binding = __require("@rolldown/binding-freebsd-arm64");
|
|
10415
10415
|
const bindingPackageVersion = __require("@rolldown/binding-freebsd-arm64/package.json").version;
|
|
10416
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10416
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10417
10417
|
return binding;
|
|
10418
10418
|
} catch (e) {
|
|
10419
10419
|
loadErrors.push(e);
|
|
@@ -10428,7 +10428,7 @@ function requireNative() {
|
|
|
10428
10428
|
try {
|
|
10429
10429
|
const binding = __require("@rolldown/binding-linux-x64-musl");
|
|
10430
10430
|
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-musl/package.json").version;
|
|
10431
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10431
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10432
10432
|
return binding;
|
|
10433
10433
|
} catch (e) {
|
|
10434
10434
|
loadErrors.push(e);
|
|
@@ -10442,7 +10442,7 @@ function requireNative() {
|
|
|
10442
10442
|
try {
|
|
10443
10443
|
const binding = __require("@rolldown/binding-linux-x64-gnu");
|
|
10444
10444
|
const bindingPackageVersion = __require("@rolldown/binding-linux-x64-gnu/package.json").version;
|
|
10445
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10445
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10446
10446
|
return binding;
|
|
10447
10447
|
} catch (e) {
|
|
10448
10448
|
loadErrors.push(e);
|
|
@@ -10457,7 +10457,7 @@ function requireNative() {
|
|
|
10457
10457
|
try {
|
|
10458
10458
|
const binding = __require("@rolldown/binding-linux-arm64-musl");
|
|
10459
10459
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-musl/package.json").version;
|
|
10460
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10460
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10461
10461
|
return binding;
|
|
10462
10462
|
} catch (e) {
|
|
10463
10463
|
loadErrors.push(e);
|
|
@@ -10471,7 +10471,7 @@ function requireNative() {
|
|
|
10471
10471
|
try {
|
|
10472
10472
|
const binding = __require("@rolldown/binding-linux-arm64-gnu");
|
|
10473
10473
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm64-gnu/package.json").version;
|
|
10474
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10474
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10475
10475
|
return binding;
|
|
10476
10476
|
} catch (e) {
|
|
10477
10477
|
loadErrors.push(e);
|
|
@@ -10486,7 +10486,7 @@ function requireNative() {
|
|
|
10486
10486
|
try {
|
|
10487
10487
|
const binding = __require("@rolldown/binding-linux-arm-musleabihf");
|
|
10488
10488
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-musleabihf/package.json").version;
|
|
10489
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10489
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10490
10490
|
return binding;
|
|
10491
10491
|
} catch (e) {
|
|
10492
10492
|
loadErrors.push(e);
|
|
@@ -10500,7 +10500,7 @@ function requireNative() {
|
|
|
10500
10500
|
try {
|
|
10501
10501
|
const binding = __require("@rolldown/binding-linux-arm-gnueabihf");
|
|
10502
10502
|
const bindingPackageVersion = __require("@rolldown/binding-linux-arm-gnueabihf/package.json").version;
|
|
10503
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10503
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10504
10504
|
return binding;
|
|
10505
10505
|
} catch (e) {
|
|
10506
10506
|
loadErrors.push(e);
|
|
@@ -10515,7 +10515,7 @@ function requireNative() {
|
|
|
10515
10515
|
try {
|
|
10516
10516
|
const binding = __require("@rolldown/binding-linux-loong64-musl");
|
|
10517
10517
|
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-musl/package.json").version;
|
|
10518
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10518
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10519
10519
|
return binding;
|
|
10520
10520
|
} catch (e) {
|
|
10521
10521
|
loadErrors.push(e);
|
|
@@ -10529,7 +10529,7 @@ function requireNative() {
|
|
|
10529
10529
|
try {
|
|
10530
10530
|
const binding = __require("@rolldown/binding-linux-loong64-gnu");
|
|
10531
10531
|
const bindingPackageVersion = __require("@rolldown/binding-linux-loong64-gnu/package.json").version;
|
|
10532
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10532
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10533
10533
|
return binding;
|
|
10534
10534
|
} catch (e) {
|
|
10535
10535
|
loadErrors.push(e);
|
|
@@ -10544,7 +10544,7 @@ function requireNative() {
|
|
|
10544
10544
|
try {
|
|
10545
10545
|
const binding = __require("@rolldown/binding-linux-riscv64-musl");
|
|
10546
10546
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-musl/package.json").version;
|
|
10547
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10547
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10548
10548
|
return binding;
|
|
10549
10549
|
} catch (e) {
|
|
10550
10550
|
loadErrors.push(e);
|
|
@@ -10558,7 +10558,7 @@ function requireNative() {
|
|
|
10558
10558
|
try {
|
|
10559
10559
|
const binding = __require("@rolldown/binding-linux-riscv64-gnu");
|
|
10560
10560
|
const bindingPackageVersion = __require("@rolldown/binding-linux-riscv64-gnu/package.json").version;
|
|
10561
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10561
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10562
10562
|
return binding;
|
|
10563
10563
|
} catch (e) {
|
|
10564
10564
|
loadErrors.push(e);
|
|
@@ -10573,7 +10573,7 @@ function requireNative() {
|
|
|
10573
10573
|
try {
|
|
10574
10574
|
const binding = __require("@rolldown/binding-linux-ppc64-gnu");
|
|
10575
10575
|
const bindingPackageVersion = __require("@rolldown/binding-linux-ppc64-gnu/package.json").version;
|
|
10576
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10576
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10577
10577
|
return binding;
|
|
10578
10578
|
} catch (e) {
|
|
10579
10579
|
loadErrors.push(e);
|
|
@@ -10587,7 +10587,7 @@ function requireNative() {
|
|
|
10587
10587
|
try {
|
|
10588
10588
|
const binding = __require("@rolldown/binding-linux-s390x-gnu");
|
|
10589
10589
|
const bindingPackageVersion = __require("@rolldown/binding-linux-s390x-gnu/package.json").version;
|
|
10590
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10590
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10591
10591
|
return binding;
|
|
10592
10592
|
} catch (e) {
|
|
10593
10593
|
loadErrors.push(e);
|
|
@@ -10602,7 +10602,7 @@ function requireNative() {
|
|
|
10602
10602
|
try {
|
|
10603
10603
|
const binding = __require("@rolldown/binding-openharmony-arm64");
|
|
10604
10604
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm64/package.json").version;
|
|
10605
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10605
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10606
10606
|
return binding;
|
|
10607
10607
|
} catch (e) {
|
|
10608
10608
|
loadErrors.push(e);
|
|
@@ -10616,7 +10616,7 @@ function requireNative() {
|
|
|
10616
10616
|
try {
|
|
10617
10617
|
const binding = __require("@rolldown/binding-openharmony-x64");
|
|
10618
10618
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-x64/package.json").version;
|
|
10619
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10619
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10620
10620
|
return binding;
|
|
10621
10621
|
} catch (e) {
|
|
10622
10622
|
loadErrors.push(e);
|
|
@@ -10630,7 +10630,7 @@ function requireNative() {
|
|
|
10630
10630
|
try {
|
|
10631
10631
|
const binding = __require("@rolldown/binding-openharmony-arm");
|
|
10632
10632
|
const bindingPackageVersion = __require("@rolldown/binding-openharmony-arm/package.json").version;
|
|
10633
|
-
if (bindingPackageVersion !== "1.0.0-beta.
|
|
10633
|
+
if (bindingPackageVersion !== "1.0.0-beta.44" && 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.44 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
10634
10634
|
return binding;
|
|
10635
10635
|
} catch (e) {
|
|
10636
10636
|
loadErrors.push(e);
|
|
@@ -10658,9 +10658,9 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
|
|
|
10658
10658
|
}
|
|
10659
10659
|
}
|
|
10660
10660
|
if (process.env.NAPI_RS_FORCE_WASI === "error" && !wasiBinding) {
|
|
10661
|
-
const error
|
|
10662
|
-
error
|
|
10663
|
-
throw error
|
|
10661
|
+
const error = /* @__PURE__ */ new Error("WASI binding not found and NAPI_RS_FORCE_WASI is set to error");
|
|
10662
|
+
error.cause = wasiBindingError;
|
|
10663
|
+
throw error;
|
|
10664
10664
|
}
|
|
10665
10665
|
}
|
|
10666
10666
|
if (!nativeBinding && globalThis.process?.versions?.["webcontainer"]) try {
|
|
@@ -10675,270 +10675,7 @@ if (!nativeBinding) {
|
|
|
10675
10675
|
}) });
|
|
10676
10676
|
throw new Error(`Failed to load native binding`);
|
|
10677
10677
|
}
|
|
10678
|
-
const { minify, Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, transformAsync, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingDevEngine, BindingMagicString, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, ScheduledBuild, TraceSubscriberGuard, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingChunkModuleOrderBy,
|
|
10678
|
+
const { minify, Severity, ParseResult, ExportExportNameKind, ExportImportNameKind, ExportLocalNameKind, ImportNameKind, parseAsync, parseSync, rawTransferSupported, ResolverFactory, EnforceExtension, ModuleType, sync, HelperMode, isolatedDeclaration, moduleRunnerTransform, transform, transformAsync, BindingBundleEndEventData, BindingBundleErrorEventData, BindingBundler, BindingBundlerImpl, BindingCallableBuiltinPlugin, BindingChunkingContext, BindingDevEngine, BindingMagicString, BindingModuleInfo, BindingNormalizedOptions, BindingOutputAsset, BindingOutputChunk, BindingOutputs, BindingPluginContext, BindingRenderedChunk, BindingRenderedChunkMeta, BindingRenderedModule, BindingTransformPluginContext, BindingUrlResolver, BindingWatcher, BindingWatcherChangeData, BindingWatcherEvent, ParallelJsPluginRegistry, ScheduledBuild, TraceSubscriberGuard, BindingAttachDebugInfo, BindingBuiltinPluginName, BindingChunkModuleOrderBy, BindingLogLevel, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, BindingRebuildStrategy, createTokioRuntime, FilterTokenKind, initTraceSubscriber, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime } = nativeBinding;
|
|
10679
10679
|
|
|
10680
10680
|
//#endregion
|
|
10681
|
-
|
|
10682
|
-
function spaces(index) {
|
|
10683
|
-
let result = "";
|
|
10684
|
-
while (index--) result += " ";
|
|
10685
|
-
return result;
|
|
10686
|
-
}
|
|
10687
|
-
function tabsToSpaces(value) {
|
|
10688
|
-
return value.replace(/^\t+/, (match) => match.split(" ").join(" "));
|
|
10689
|
-
}
|
|
10690
|
-
const LINE_TRUNCATE_LENGTH = 120;
|
|
10691
|
-
const MIN_CHARACTERS_SHOWN_AFTER_LOCATION = 10;
|
|
10692
|
-
const ELLIPSIS = "...";
|
|
10693
|
-
function getCodeFrame(source, line, column) {
|
|
10694
|
-
let lines = source.split("\n");
|
|
10695
|
-
if (line > lines.length) return "";
|
|
10696
|
-
const maxLineLength = Math.max(tabsToSpaces(lines[line - 1].slice(0, column)).length + MIN_CHARACTERS_SHOWN_AFTER_LOCATION + 3, LINE_TRUNCATE_LENGTH);
|
|
10697
|
-
const frameStart = Math.max(0, line - 3);
|
|
10698
|
-
let frameEnd = Math.min(line + 2, lines.length);
|
|
10699
|
-
lines = lines.slice(frameStart, frameEnd);
|
|
10700
|
-
while (!/\S/.test(lines[lines.length - 1])) {
|
|
10701
|
-
lines.pop();
|
|
10702
|
-
frameEnd -= 1;
|
|
10703
|
-
}
|
|
10704
|
-
const digits = String(frameEnd).length;
|
|
10705
|
-
return lines.map((sourceLine, index) => {
|
|
10706
|
-
const isErrorLine = frameStart + index + 1 === line;
|
|
10707
|
-
let lineNumber = String(index + frameStart + 1);
|
|
10708
|
-
while (lineNumber.length < digits) lineNumber = ` ${lineNumber}`;
|
|
10709
|
-
let displayedLine = tabsToSpaces(sourceLine);
|
|
10710
|
-
if (displayedLine.length > maxLineLength) displayedLine = `${displayedLine.slice(0, maxLineLength - 3)}${ELLIPSIS}`;
|
|
10711
|
-
if (isErrorLine) {
|
|
10712
|
-
const indicator = spaces(digits + 2 + tabsToSpaces(sourceLine.slice(0, column)).length) + "^";
|
|
10713
|
-
return `${lineNumber}: ${displayedLine}\n${indicator}`;
|
|
10714
|
-
}
|
|
10715
|
-
return `${lineNumber}: ${displayedLine}`;
|
|
10716
|
-
}).join("\n");
|
|
10717
|
-
}
|
|
10718
|
-
|
|
10719
|
-
//#endregion
|
|
10720
|
-
//#region src/log/locate-character/index.js
|
|
10721
|
-
/** @typedef {import('./types').Location} Location */
|
|
10722
|
-
/**
|
|
10723
|
-
* @param {import('./types').Range} range
|
|
10724
|
-
* @param {number} index
|
|
10725
|
-
*/
|
|
10726
|
-
function rangeContains(range, index) {
|
|
10727
|
-
return range.start <= index && index < range.end;
|
|
10728
|
-
}
|
|
10729
|
-
/**
|
|
10730
|
-
* @param {string} source
|
|
10731
|
-
* @param {import('./types').Options} [options]
|
|
10732
|
-
*/
|
|
10733
|
-
function getLocator(source, options = {}) {
|
|
10734
|
-
const { offsetLine = 0, offsetColumn = 0 } = options;
|
|
10735
|
-
let start = 0;
|
|
10736
|
-
const ranges = source.split("\n").map((line, i$1) => {
|
|
10737
|
-
const end = start + line.length + 1;
|
|
10738
|
-
/** @type {import('./types').Range} */
|
|
10739
|
-
const range = {
|
|
10740
|
-
start,
|
|
10741
|
-
end,
|
|
10742
|
-
line: i$1
|
|
10743
|
-
};
|
|
10744
|
-
start = end;
|
|
10745
|
-
return range;
|
|
10746
|
-
});
|
|
10747
|
-
let i = 0;
|
|
10748
|
-
/**
|
|
10749
|
-
* @param {string | number} search
|
|
10750
|
-
* @param {number} [index]
|
|
10751
|
-
* @returns {Location | undefined}
|
|
10752
|
-
*/
|
|
10753
|
-
function locator(search, index) {
|
|
10754
|
-
if (typeof search === "string") search = source.indexOf(search, index ?? 0);
|
|
10755
|
-
if (search === -1) return void 0;
|
|
10756
|
-
let range = ranges[i];
|
|
10757
|
-
const d = search >= range.end ? 1 : -1;
|
|
10758
|
-
while (range) {
|
|
10759
|
-
if (rangeContains(range, search)) return {
|
|
10760
|
-
line: offsetLine + range.line,
|
|
10761
|
-
column: offsetColumn + search - range.start,
|
|
10762
|
-
character: search
|
|
10763
|
-
};
|
|
10764
|
-
i += d;
|
|
10765
|
-
range = ranges[i];
|
|
10766
|
-
}
|
|
10767
|
-
}
|
|
10768
|
-
return locator;
|
|
10769
|
-
}
|
|
10770
|
-
/**
|
|
10771
|
-
* @param {string} source
|
|
10772
|
-
* @param {string | number} search
|
|
10773
|
-
* @param {import('./types').Options} [options]
|
|
10774
|
-
* @returns {Location | undefined}
|
|
10775
|
-
*/
|
|
10776
|
-
function locate(source, search, options) {
|
|
10777
|
-
return getLocator(source, options)(search, options && options.startIndex);
|
|
10778
|
-
}
|
|
10779
|
-
|
|
10780
|
-
//#endregion
|
|
10781
|
-
//#region src/log/logs.ts
|
|
10782
|
-
const INVALID_LOG_POSITION = "INVALID_LOG_POSITION", PLUGIN_ERROR = "PLUGIN_ERROR", INPUT_HOOK_IN_OUTPUT_PLUGIN = "INPUT_HOOK_IN_OUTPUT_PLUGIN", CYCLE_LOADING = "CYCLE_LOADING", MULTIPLY_NOTIFY_OPTION = "MULTIPLY_NOTIFY_OPTION", PARSE_ERROR = "PARSE_ERROR", DUPLICATE_JSX_CONFIG = "DUPLICATE_JSX_CONFIG", NO_FS_IN_BROWSER = "NO_FS_IN_BROWSER";
|
|
10783
|
-
function logParseError(message) {
|
|
10784
|
-
return {
|
|
10785
|
-
code: PARSE_ERROR,
|
|
10786
|
-
message
|
|
10787
|
-
};
|
|
10788
|
-
}
|
|
10789
|
-
function logInvalidLogPosition(pluginName) {
|
|
10790
|
-
return {
|
|
10791
|
-
code: INVALID_LOG_POSITION,
|
|
10792
|
-
message: `Plugin "${pluginName}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`
|
|
10793
|
-
};
|
|
10794
|
-
}
|
|
10795
|
-
function logInputHookInOutputPlugin(pluginName, hookName) {
|
|
10796
|
-
return {
|
|
10797
|
-
code: INPUT_HOOK_IN_OUTPUT_PLUGIN,
|
|
10798
|
-
message: `The "${hookName}" hook used by the output plugin ${pluginName} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`
|
|
10799
|
-
};
|
|
10800
|
-
}
|
|
10801
|
-
function logCycleLoading(pluginName, moduleId) {
|
|
10802
|
-
return {
|
|
10803
|
-
code: CYCLE_LOADING,
|
|
10804
|
-
message: `Found the module "${moduleId}" cycle loading at ${pluginName} plugin, it maybe blocking fetching modules.`
|
|
10805
|
-
};
|
|
10806
|
-
}
|
|
10807
|
-
function logMultiplyNotifyOption() {
|
|
10808
|
-
return {
|
|
10809
|
-
code: MULTIPLY_NOTIFY_OPTION,
|
|
10810
|
-
message: `Found multiply notify option at watch options, using first one to start notify watcher.`
|
|
10811
|
-
};
|
|
10812
|
-
}
|
|
10813
|
-
function logDuplicateJsxConfig() {
|
|
10814
|
-
return {
|
|
10815
|
-
code: DUPLICATE_JSX_CONFIG,
|
|
10816
|
-
message: "Both `options.jsx` and `options.transform.jsx` are set so `options.jsx` is ignored"
|
|
10817
|
-
};
|
|
10818
|
-
}
|
|
10819
|
-
function logPluginError(error$1, plugin, { hook, id } = {}) {
|
|
10820
|
-
try {
|
|
10821
|
-
const code = error$1.code;
|
|
10822
|
-
if (!error$1.pluginCode && code != null && (typeof code !== "string" || !code.startsWith("PLUGIN_"))) error$1.pluginCode = code;
|
|
10823
|
-
error$1.code = PLUGIN_ERROR;
|
|
10824
|
-
error$1.plugin = plugin;
|
|
10825
|
-
if (hook) error$1.hook = hook;
|
|
10826
|
-
if (id) error$1.id = id;
|
|
10827
|
-
} catch (_) {} finally {
|
|
10828
|
-
return error$1;
|
|
10829
|
-
}
|
|
10830
|
-
}
|
|
10831
|
-
function error(base) {
|
|
10832
|
-
if (!(base instanceof Error)) {
|
|
10833
|
-
base = Object.assign(new Error(base.message), base);
|
|
10834
|
-
Object.defineProperty(base, "name", {
|
|
10835
|
-
value: "RollupError",
|
|
10836
|
-
writable: true
|
|
10837
|
-
});
|
|
10838
|
-
}
|
|
10839
|
-
throw base;
|
|
10840
|
-
}
|
|
10841
|
-
function augmentCodeLocation(properties, pos, source, id) {
|
|
10842
|
-
if (typeof pos === "object") {
|
|
10843
|
-
const { line, column } = pos;
|
|
10844
|
-
properties.loc = {
|
|
10845
|
-
column,
|
|
10846
|
-
file: id,
|
|
10847
|
-
line
|
|
10848
|
-
};
|
|
10849
|
-
} else {
|
|
10850
|
-
properties.pos = pos;
|
|
10851
|
-
const location = locate(source, pos, { offsetLine: 1 });
|
|
10852
|
-
if (!location) return;
|
|
10853
|
-
const { line, column } = location;
|
|
10854
|
-
properties.loc = {
|
|
10855
|
-
column,
|
|
10856
|
-
file: id,
|
|
10857
|
-
line
|
|
10858
|
-
};
|
|
10859
|
-
}
|
|
10860
|
-
if (properties.frame === void 0) {
|
|
10861
|
-
const { line, column } = properties.loc;
|
|
10862
|
-
properties.frame = getCodeFrame(source, line, column);
|
|
10863
|
-
}
|
|
10864
|
-
}
|
|
10865
|
-
|
|
10866
|
-
//#endregion
|
|
10867
|
-
//#region ../../node_modules/.pnpm/oxc-parser@0.94.0/node_modules/oxc-parser/src-js/wrap.js
|
|
10868
|
-
function wrap$1(result) {
|
|
10869
|
-
let program, module$1, comments, errors;
|
|
10870
|
-
return {
|
|
10871
|
-
get program() {
|
|
10872
|
-
if (!program) program = jsonParseAst(result.program);
|
|
10873
|
-
return program;
|
|
10874
|
-
},
|
|
10875
|
-
get module() {
|
|
10876
|
-
if (!module$1) module$1 = result.module;
|
|
10877
|
-
return module$1;
|
|
10878
|
-
},
|
|
10879
|
-
get comments() {
|
|
10880
|
-
if (!comments) comments = result.comments;
|
|
10881
|
-
return comments;
|
|
10882
|
-
},
|
|
10883
|
-
get errors() {
|
|
10884
|
-
if (!errors) errors = result.errors;
|
|
10885
|
-
return errors;
|
|
10886
|
-
}
|
|
10887
|
-
};
|
|
10888
|
-
}
|
|
10889
|
-
function jsonParseAst(programJson) {
|
|
10890
|
-
const { node: program, fixes } = JSON.parse(programJson);
|
|
10891
|
-
for (const fixPath of fixes) applyFix(program, fixPath);
|
|
10892
|
-
return program;
|
|
10893
|
-
}
|
|
10894
|
-
function applyFix(program, fixPath) {
|
|
10895
|
-
let node = program;
|
|
10896
|
-
for (const key of fixPath) node = node[key];
|
|
10897
|
-
if (node.bigint) node.value = BigInt(node.bigint);
|
|
10898
|
-
else try {
|
|
10899
|
-
node.value = RegExp(node.regex.pattern, node.regex.flags);
|
|
10900
|
-
} catch (_err) {}
|
|
10901
|
-
}
|
|
10902
|
-
|
|
10903
|
-
//#endregion
|
|
10904
|
-
//#region src/parse-ast-index.ts
|
|
10905
|
-
function wrap(result, sourceText) {
|
|
10906
|
-
result = wrap$1(result);
|
|
10907
|
-
if (result.errors.length > 0) return normalizeParseError(sourceText, result.errors);
|
|
10908
|
-
return result.program;
|
|
10909
|
-
}
|
|
10910
|
-
function normalizeParseError(sourceText, errors) {
|
|
10911
|
-
let message = `Parse failed with ${errors.length} error${errors.length < 2 ? "" : "s"}:\n`;
|
|
10912
|
-
for (let i = 0; i < errors.length; i++) {
|
|
10913
|
-
if (i >= 5) {
|
|
10914
|
-
message += "\n...";
|
|
10915
|
-
break;
|
|
10916
|
-
}
|
|
10917
|
-
const e = errors[i];
|
|
10918
|
-
message += e.message + "\n" + e.labels.map((label) => {
|
|
10919
|
-
const location = locate(sourceText, label.start, { offsetLine: 1 });
|
|
10920
|
-
if (!location) return;
|
|
10921
|
-
return getCodeFrame(sourceText, location.line, location.column);
|
|
10922
|
-
}).filter(Boolean).join("\n");
|
|
10923
|
-
}
|
|
10924
|
-
return error(logParseError(message));
|
|
10925
|
-
}
|
|
10926
|
-
const defaultParserOptions = {
|
|
10927
|
-
lang: "js",
|
|
10928
|
-
preserveParens: false
|
|
10929
|
-
};
|
|
10930
|
-
function parseAst(sourceText, options, filename) {
|
|
10931
|
-
return wrap(parseSync(filename ?? "file.js", sourceText, {
|
|
10932
|
-
...defaultParserOptions,
|
|
10933
|
-
...options
|
|
10934
|
-
}), sourceText);
|
|
10935
|
-
}
|
|
10936
|
-
async function parseAstAsync(sourceText, options, filename) {
|
|
10937
|
-
return wrap(await parseAsync(filename ?? "file.js", sourceText, {
|
|
10938
|
-
...defaultParserOptions,
|
|
10939
|
-
...options
|
|
10940
|
-
}), sourceText);
|
|
10941
|
-
}
|
|
10942
|
-
|
|
10943
|
-
//#endregion
|
|
10944
|
-
export { BindingAttachDebugInfo, BindingBundler, BindingCallableBuiltinPlugin, BindingChunkModuleOrderBy, BindingDevEngine, BindingJsx, BindingLogLevel, BindingMagicString, BindingPluginOrder, BindingPropertyReadSideEffects, BindingPropertyWriteSideEffects, BindingRebuildStrategy, BindingWatcher, ParallelJsPluginRegistry, ResolverFactory, augmentCodeLocation, createTokioRuntime, error, initTraceSubscriber, isolatedDeclaration, logCycleLoading, logDuplicateJsxConfig, logInputHookInOutputPlugin, logInvalidLogPosition, logMultiplyNotifyOption, logPluginError, moduleRunnerTransform, parseAst, parseAstAsync, registerPlugins, shutdownAsyncRuntime, startAsyncRuntime, transform };
|
|
10681
|
+
export { startAsyncRuntime as C, shutdownAsyncRuntime as S, isolatedDeclaration as _, BindingDevEngine as a, parseSync as b, BindingPluginOrder as c, BindingRebuildStrategy as d, BindingWatcher as f, initTraceSubscriber as g, createTokioRuntime as h, BindingChunkModuleOrderBy as i, BindingPropertyReadSideEffects as l, ResolverFactory as m, BindingBundler as n, BindingLogLevel as o, ParallelJsPluginRegistry as p, BindingCallableBuiltinPlugin as r, BindingMagicString as s, BindingAttachDebugInfo as t, BindingPropertyWriteSideEffects as u, moduleRunnerTransform as v, transform as w, registerPlugins as x, parseAsync as y };
|