@netlify/edge-bundler 9.4.1 → 9.5.0
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/deno/lib/common.ts +2 -2
- package/deno/lib/stage2.ts +1 -1
- package/deno/vendor/deno.land/x/dir@1.5.1/data_local_dir/mod.ts +34 -0
- package/deno/vendor/deno.land/x/{eszip@v0.40.0 → eszip@v0.55.2}/eszip_wasm.generated.js +136 -179
- package/deno/vendor/deno.land/x/eszip@v0.55.2/eszip_wasm_bg.wasm +0 -0
- package/deno/vendor/deno.land/x/wasmbuild@0.15.1/cache.ts +157 -0
- package/deno/vendor/deno.land/x/wasmbuild@0.15.1/loader.ts +126 -0
- package/dist/node/bridge.d.ts +1 -1
- package/dist/node/bridge.js +1 -1
- package/dist/node/bundler.js +1 -4
- package/dist/node/bundler.test.js +23 -48
- package/dist/node/feature_flags.d.ts +2 -8
- package/dist/node/feature_flags.js +1 -4
- package/dist/node/formats/eszip.d.ts +1 -1
- package/dist/node/formats/eszip.js +2 -2
- package/dist/node/formats/javascript.js +1 -2
- package/dist/node/manifest.d.ts +1 -1
- package/dist/node/manifest.js +7 -16
- package/dist/node/manifest.test.js +2 -19
- package/dist/node/npm_dependencies.d.ts +1 -0
- package/dist/node/npm_dependencies.js +2 -0
- package/dist/node/npm_import_error.d.ts +2 -2
- package/dist/node/npm_import_error.js +5 -9
- package/dist/node/server/server.js +29 -15
- package/dist/node/server/server.test.js +0 -3
- package/dist/test/util.js +1 -1
- package/package.json +1 -1
- package/deno/vendor/deno.land/x/eszip@v0.40.0/eszip_wasm_bg.wasm +0 -0
- /package/deno/vendor/deno.land/x/{eszip@v0.40.0 → eszip@v0.55.2}/loader.ts +0 -0
- /package/deno/vendor/deno.land/x/{eszip@v0.40.0 → eszip@v0.55.2}/mod.ts +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @generated file from wasmbuild -- do not edit
|
|
2
2
|
// deno-lint-ignore-file
|
|
3
3
|
// deno-fmt-ignore-file
|
|
4
|
-
// source-hash:
|
|
4
|
+
// source-hash: 42cde0d0cd8911472f447996379441f664c820a5
|
|
5
5
|
let wasm;
|
|
6
6
|
|
|
7
7
|
const heap = new Array(128).fill(undefined);
|
|
@@ -45,7 +45,13 @@ function getUint8Memory0() {
|
|
|
45
45
|
return cachedUint8Memory0;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
const cachedTextEncoder =
|
|
48
|
+
const cachedTextEncoder = typeof TextEncoder !== "undefined"
|
|
49
|
+
? new TextEncoder("utf-8")
|
|
50
|
+
: {
|
|
51
|
+
encode: () => {
|
|
52
|
+
throw Error("TextEncoder not available");
|
|
53
|
+
},
|
|
54
|
+
};
|
|
49
55
|
|
|
50
56
|
const encodeString = function (arg, view) {
|
|
51
57
|
return cachedTextEncoder.encodeInto(arg, view);
|
|
@@ -54,14 +60,14 @@ const encodeString = function (arg, view) {
|
|
|
54
60
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
55
61
|
if (realloc === undefined) {
|
|
56
62
|
const buf = cachedTextEncoder.encode(arg);
|
|
57
|
-
const ptr = malloc(buf.length);
|
|
63
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
58
64
|
getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
59
65
|
WASM_VECTOR_LEN = buf.length;
|
|
60
66
|
return ptr;
|
|
61
67
|
}
|
|
62
68
|
|
|
63
69
|
let len = arg.length;
|
|
64
|
-
let ptr = malloc(len);
|
|
70
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
65
71
|
|
|
66
72
|
const mem = getUint8Memory0();
|
|
67
73
|
|
|
@@ -77,7 +83,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
77
83
|
if (offset !== 0) {
|
|
78
84
|
arg = arg.slice(offset);
|
|
79
85
|
}
|
|
80
|
-
ptr = realloc(ptr, len, len = offset + arg.length * 3);
|
|
86
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
81
87
|
const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
|
|
82
88
|
const ret = encodeString(arg, view);
|
|
83
89
|
|
|
@@ -99,14 +105,18 @@ function addHeapObject(obj) {
|
|
|
99
105
|
return idx;
|
|
100
106
|
}
|
|
101
107
|
|
|
102
|
-
const cachedTextDecoder =
|
|
103
|
-
ignoreBOM: true,
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
const cachedTextDecoder = typeof TextDecoder !== "undefined"
|
|
109
|
+
? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true })
|
|
110
|
+
: {
|
|
111
|
+
decode: () => {
|
|
112
|
+
throw Error("TextDecoder not available");
|
|
113
|
+
},
|
|
114
|
+
};
|
|
106
115
|
|
|
107
|
-
cachedTextDecoder.decode();
|
|
116
|
+
if (typeof TextDecoder !== "undefined") cachedTextDecoder.decode();
|
|
108
117
|
|
|
109
118
|
function getStringFromWasm0(ptr, len) {
|
|
119
|
+
ptr = ptr >>> 0;
|
|
110
120
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
111
121
|
}
|
|
112
122
|
|
|
@@ -227,16 +237,15 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
227
237
|
return real;
|
|
228
238
|
}
|
|
229
239
|
function __wbg_adapter_40(arg0, arg1, arg2) {
|
|
230
|
-
wasm
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
);
|
|
240
|
+
wasm.wasm_bindgen__convert__closures__invoke1_mut__h91735af6e275c7ce(
|
|
241
|
+
arg0,
|
|
242
|
+
arg1,
|
|
243
|
+
addHeapObject(arg2),
|
|
244
|
+
);
|
|
236
245
|
}
|
|
237
246
|
|
|
238
247
|
function passArray8ToWasm0(arg, malloc) {
|
|
239
|
-
const ptr = malloc(arg.length * 1);
|
|
248
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
240
249
|
getUint8Memory0().set(arg, ptr / 1);
|
|
241
250
|
WASM_VECTOR_LEN = arg.length;
|
|
242
251
|
return ptr;
|
|
@@ -264,8 +273,8 @@ function handleError(f, args) {
|
|
|
264
273
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
265
274
|
}
|
|
266
275
|
}
|
|
267
|
-
function
|
|
268
|
-
wasm.
|
|
276
|
+
function __wbg_adapter_100(arg0, arg1, arg2, arg3) {
|
|
277
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__hd032087bb158572e(
|
|
269
278
|
arg0,
|
|
270
279
|
arg1,
|
|
271
280
|
addHeapObject(arg2),
|
|
@@ -274,20 +283,21 @@ function __wbg_adapter_98(arg0, arg1, arg2, arg3) {
|
|
|
274
283
|
}
|
|
275
284
|
|
|
276
285
|
const ParserFinalization = new FinalizationRegistry((ptr) =>
|
|
277
|
-
wasm.__wbg_parser_free(ptr)
|
|
286
|
+
wasm.__wbg_parser_free(ptr >>> 0)
|
|
278
287
|
);
|
|
279
288
|
/** */
|
|
280
289
|
export class Parser {
|
|
281
290
|
static __wrap(ptr) {
|
|
291
|
+
ptr = ptr >>> 0;
|
|
282
292
|
const obj = Object.create(Parser.prototype);
|
|
283
|
-
obj.
|
|
284
|
-
ParserFinalization.register(obj, obj.
|
|
293
|
+
obj.__wbg_ptr = ptr;
|
|
294
|
+
ParserFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
285
295
|
return obj;
|
|
286
296
|
}
|
|
287
297
|
|
|
288
298
|
__destroy_into_raw() {
|
|
289
|
-
const ptr = this.
|
|
290
|
-
this.
|
|
299
|
+
const ptr = this.__wbg_ptr;
|
|
300
|
+
this.__wbg_ptr = 0;
|
|
291
301
|
ParserFinalization.unregister(this);
|
|
292
302
|
return ptr;
|
|
293
303
|
}
|
|
@@ -307,7 +317,7 @@ export class Parser {
|
|
|
307
317
|
* @returns {Promise<any>}
|
|
308
318
|
*/
|
|
309
319
|
parse(stream) {
|
|
310
|
-
const ret = wasm.parser_parse(this.
|
|
320
|
+
const ret = wasm.parser_parse(this.__wbg_ptr, addHeapObject(stream));
|
|
311
321
|
return takeObject(ret);
|
|
312
322
|
}
|
|
313
323
|
/**
|
|
@@ -318,7 +328,7 @@ export class Parser {
|
|
|
318
328
|
parseBytes(buffer) {
|
|
319
329
|
const ptr0 = passArray8ToWasm0(buffer, wasm.__wbindgen_malloc);
|
|
320
330
|
const len0 = WASM_VECTOR_LEN;
|
|
321
|
-
const ret = wasm.parser_parseBytes(this.
|
|
331
|
+
const ret = wasm.parser_parseBytes(this.__wbg_ptr, ptr0, len0);
|
|
322
332
|
return takeObject(ret);
|
|
323
333
|
}
|
|
324
334
|
/**
|
|
@@ -326,7 +336,7 @@ export class Parser {
|
|
|
326
336
|
* @returns {Promise<any>}
|
|
327
337
|
*/
|
|
328
338
|
load() {
|
|
329
|
-
const ret = wasm.parser_load(this.
|
|
339
|
+
const ret = wasm.parser_load(this.__wbg_ptr);
|
|
330
340
|
return takeObject(ret);
|
|
331
341
|
}
|
|
332
342
|
/**
|
|
@@ -341,7 +351,7 @@ export class Parser {
|
|
|
341
351
|
wasm.__wbindgen_realloc,
|
|
342
352
|
);
|
|
343
353
|
const len0 = WASM_VECTOR_LEN;
|
|
344
|
-
const ret = wasm.parser_getModuleSource(this.
|
|
354
|
+
const ret = wasm.parser_getModuleSource(this.__wbg_ptr, ptr0, len0);
|
|
345
355
|
return takeObject(ret);
|
|
346
356
|
}
|
|
347
357
|
/**
|
|
@@ -356,7 +366,7 @@ export class Parser {
|
|
|
356
366
|
wasm.__wbindgen_realloc,
|
|
357
367
|
);
|
|
358
368
|
const len0 = WASM_VECTOR_LEN;
|
|
359
|
-
const ret = wasm.parser_getModuleSourceMap(this.
|
|
369
|
+
const ret = wasm.parser_getModuleSourceMap(this.__wbg_ptr, ptr0, len0);
|
|
360
370
|
return takeObject(ret);
|
|
361
371
|
}
|
|
362
372
|
}
|
|
@@ -369,28 +379,28 @@ const imports = {
|
|
|
369
379
|
},
|
|
370
380
|
__wbindgen_number_get: function (arg0, arg1) {
|
|
371
381
|
const obj = getObject(arg1);
|
|
372
|
-
const ret = typeof
|
|
382
|
+
const ret = typeof obj === "number" ? obj : undefined;
|
|
373
383
|
getFloat64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? 0 : ret;
|
|
374
384
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
375
385
|
},
|
|
376
386
|
__wbindgen_boolean_get: function (arg0) {
|
|
377
387
|
const v = getObject(arg0);
|
|
378
|
-
const ret = typeof
|
|
388
|
+
const ret = typeof v === "boolean" ? (v ? 1 : 0) : 2;
|
|
379
389
|
return ret;
|
|
380
390
|
},
|
|
381
391
|
__wbindgen_string_get: function (arg0, arg1) {
|
|
382
392
|
const obj = getObject(arg1);
|
|
383
|
-
const ret = typeof
|
|
384
|
-
var
|
|
393
|
+
const ret = typeof obj === "string" ? obj : undefined;
|
|
394
|
+
var ptr1 = isLikeNone(ret)
|
|
385
395
|
? 0
|
|
386
396
|
: passStringToWasm0(
|
|
387
397
|
ret,
|
|
388
398
|
wasm.__wbindgen_malloc,
|
|
389
399
|
wasm.__wbindgen_realloc,
|
|
390
400
|
);
|
|
391
|
-
var
|
|
392
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
393
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
401
|
+
var len1 = WASM_VECTOR_LEN;
|
|
402
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
403
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
394
404
|
},
|
|
395
405
|
__wbindgen_is_bigint: function (arg0) {
|
|
396
406
|
const ret = typeof (getObject(arg0)) === "bigint";
|
|
@@ -398,7 +408,7 @@ const imports = {
|
|
|
398
408
|
},
|
|
399
409
|
__wbindgen_is_object: function (arg0) {
|
|
400
410
|
const val = getObject(arg0);
|
|
401
|
-
const ret = typeof
|
|
411
|
+
const ret = typeof val === "object" && val !== null;
|
|
402
412
|
return ret;
|
|
403
413
|
},
|
|
404
414
|
__wbindgen_bigint_from_i64: function (arg0) {
|
|
@@ -409,11 +419,27 @@ const imports = {
|
|
|
409
419
|
const ret = BigInt.asUintN(64, arg0);
|
|
410
420
|
return addHeapObject(ret);
|
|
411
421
|
},
|
|
412
|
-
|
|
422
|
+
__wbg_new_0d7da8e129c00c84: function (arg0, arg1) {
|
|
423
|
+
const ret = new TypeError(getStringFromWasm0(arg0, arg1));
|
|
424
|
+
return addHeapObject(ret);
|
|
425
|
+
},
|
|
426
|
+
__wbg_new_898a68150f225f2e: function () {
|
|
427
|
+
const ret = new Array();
|
|
428
|
+
return addHeapObject(ret);
|
|
429
|
+
},
|
|
430
|
+
__wbindgen_string_new: function (arg0, arg1) {
|
|
431
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
432
|
+
return addHeapObject(ret);
|
|
433
|
+
},
|
|
434
|
+
__wbg_push_ca1c26067ef907ac: function (arg0, arg1) {
|
|
435
|
+
const ret = getObject(arg0).push(getObject(arg1));
|
|
436
|
+
return ret;
|
|
437
|
+
},
|
|
438
|
+
__wbg_length_fff51ee6522a1a18: function (arg0) {
|
|
413
439
|
const ret = getObject(arg0).length;
|
|
414
440
|
return ret;
|
|
415
441
|
},
|
|
416
|
-
|
|
442
|
+
__wbg_new_d258248ed531ff54: function (arg0, arg1) {
|
|
417
443
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
418
444
|
return addHeapObject(ret);
|
|
419
445
|
},
|
|
@@ -421,11 +447,11 @@ const imports = {
|
|
|
421
447
|
const ret = wasm.memory;
|
|
422
448
|
return addHeapObject(ret);
|
|
423
449
|
},
|
|
424
|
-
|
|
450
|
+
__wbg_buffer_085ec1f694018c4f: function (arg0) {
|
|
425
451
|
const ret = getObject(arg0).buffer;
|
|
426
452
|
return addHeapObject(ret);
|
|
427
453
|
},
|
|
428
|
-
|
|
454
|
+
__wbg_newwithbyteoffsetandlength_6da8e527659b86aa: function (
|
|
429
455
|
arg0,
|
|
430
456
|
arg1,
|
|
431
457
|
arg2,
|
|
@@ -433,32 +459,20 @@ const imports = {
|
|
|
433
459
|
const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
|
|
434
460
|
return addHeapObject(ret);
|
|
435
461
|
},
|
|
436
|
-
|
|
462
|
+
__wbg_new_8125e318e6245eed: function (arg0) {
|
|
437
463
|
const ret = new Uint8Array(getObject(arg0));
|
|
438
464
|
return addHeapObject(ret);
|
|
439
465
|
},
|
|
440
|
-
__wbg_new_b525de17f44a8943: function () {
|
|
441
|
-
const ret = new Array();
|
|
442
|
-
return addHeapObject(ret);
|
|
443
|
-
},
|
|
444
|
-
__wbindgen_string_new: function (arg0, arg1) {
|
|
445
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
446
|
-
return addHeapObject(ret);
|
|
447
|
-
},
|
|
448
|
-
__wbg_push_49c286f04dd3bf59: function (arg0, arg1) {
|
|
449
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
450
|
-
return ret;
|
|
451
|
-
},
|
|
452
466
|
__wbg_String_88810dfeb4021902: function (arg0, arg1) {
|
|
453
467
|
const ret = String(getObject(arg1));
|
|
454
|
-
const
|
|
468
|
+
const ptr1 = passStringToWasm0(
|
|
455
469
|
ret,
|
|
456
470
|
wasm.__wbindgen_malloc,
|
|
457
471
|
wasm.__wbindgen_realloc,
|
|
458
472
|
);
|
|
459
|
-
const
|
|
460
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
461
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
473
|
+
const len1 = WASM_VECTOR_LEN;
|
|
474
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
475
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
462
476
|
},
|
|
463
477
|
__wbindgen_jsval_eq: function (arg0, arg1) {
|
|
464
478
|
const ret = getObject(arg0) === getObject(arg1);
|
|
@@ -468,15 +482,15 @@ const imports = {
|
|
|
468
482
|
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
469
483
|
return addHeapObject(ret);
|
|
470
484
|
},
|
|
471
|
-
|
|
485
|
+
__wbg_iterator_97f0c81209c6c35a: function () {
|
|
472
486
|
const ret = Symbol.iterator;
|
|
473
487
|
return addHeapObject(ret);
|
|
474
488
|
},
|
|
475
|
-
|
|
489
|
+
__wbg_newwithlength_e5d69174d6984cd7: function (arg0) {
|
|
476
490
|
const ret = new Uint8Array(arg0 >>> 0);
|
|
477
491
|
return addHeapObject(ret);
|
|
478
492
|
},
|
|
479
|
-
|
|
493
|
+
__wbg_read_d8bf6d1f877af2a5: function (arg0, arg1) {
|
|
480
494
|
const ret = getObject(arg0).read(getObject(arg1));
|
|
481
495
|
return addHeapObject(ret);
|
|
482
496
|
},
|
|
@@ -484,7 +498,7 @@ const imports = {
|
|
|
484
498
|
const ret = getObject(arg0).done;
|
|
485
499
|
return ret;
|
|
486
500
|
},
|
|
487
|
-
|
|
501
|
+
__wbg_toString_a8e343996af880e9: function (arg0) {
|
|
488
502
|
const ret = getObject(arg0).toString();
|
|
489
503
|
return addHeapObject(ret);
|
|
490
504
|
},
|
|
@@ -492,36 +506,37 @@ const imports = {
|
|
|
492
506
|
const ret = getObject(arg0).value;
|
|
493
507
|
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
494
508
|
},
|
|
495
|
-
|
|
509
|
+
__wbg_byteLength_47d11fa79875dee3: function (arg0) {
|
|
496
510
|
const ret = getObject(arg0).byteLength;
|
|
497
511
|
return ret;
|
|
498
512
|
},
|
|
499
|
-
|
|
513
|
+
__wbg_length_72e2208bbc0efc61: function (arg0) {
|
|
500
514
|
const ret = getObject(arg0).length;
|
|
501
515
|
return ret;
|
|
502
516
|
},
|
|
503
|
-
|
|
504
|
-
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
517
|
+
__wbg_call_776890ca77946e2f: function () {
|
|
518
|
+
return handleError(function (arg0, arg1, arg2, arg3, arg4) {
|
|
505
519
|
const ret = getObject(arg0).call(
|
|
506
520
|
getObject(arg1),
|
|
507
521
|
getObject(arg2),
|
|
508
522
|
getObject(arg3),
|
|
523
|
+
getObject(arg4),
|
|
509
524
|
);
|
|
510
525
|
return addHeapObject(ret);
|
|
511
526
|
}, arguments);
|
|
512
527
|
},
|
|
513
|
-
|
|
528
|
+
__wbg_resolve_53698b95aaf7fcf8: function (arg0) {
|
|
514
529
|
const ret = Promise.resolve(getObject(arg0));
|
|
515
530
|
return addHeapObject(ret);
|
|
516
531
|
},
|
|
517
|
-
|
|
532
|
+
__wbg_new_43f1b47c28813cbd: function (arg0, arg1) {
|
|
518
533
|
try {
|
|
519
534
|
var state0 = { a: arg0, b: arg1 };
|
|
520
535
|
var cb0 = (arg0, arg1) => {
|
|
521
536
|
const a = state0.a;
|
|
522
537
|
state0.a = 0;
|
|
523
538
|
try {
|
|
524
|
-
return
|
|
539
|
+
return __wbg_adapter_100(a, state0.b, arg0, arg1);
|
|
525
540
|
} finally {
|
|
526
541
|
state0.a = a;
|
|
527
542
|
}
|
|
@@ -538,20 +553,24 @@ const imports = {
|
|
|
538
553
|
},
|
|
539
554
|
__wbg_stack_658279fe44541cf6: function (arg0, arg1) {
|
|
540
555
|
const ret = getObject(arg1).stack;
|
|
541
|
-
const
|
|
556
|
+
const ptr1 = passStringToWasm0(
|
|
542
557
|
ret,
|
|
543
558
|
wasm.__wbindgen_malloc,
|
|
544
559
|
wasm.__wbindgen_realloc,
|
|
545
560
|
);
|
|
546
|
-
const
|
|
547
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
548
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
561
|
+
const len1 = WASM_VECTOR_LEN;
|
|
562
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
563
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
549
564
|
},
|
|
550
565
|
__wbg_error_f851667af71bcfc6: function (arg0, arg1) {
|
|
566
|
+
let deferred0_0;
|
|
567
|
+
let deferred0_1;
|
|
551
568
|
try {
|
|
569
|
+
deferred0_0 = arg0;
|
|
570
|
+
deferred0_1 = arg1;
|
|
552
571
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
553
572
|
} finally {
|
|
554
|
-
wasm.__wbindgen_free(
|
|
573
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
555
574
|
}
|
|
556
575
|
},
|
|
557
576
|
__wbindgen_object_drop_ref: function (arg0) {
|
|
@@ -561,62 +580,62 @@ const imports = {
|
|
|
561
580
|
const ret = typeof (getObject(arg0)) === "function";
|
|
562
581
|
return ret;
|
|
563
582
|
},
|
|
564
|
-
|
|
583
|
+
__wbg_get_44be0491f933a435: function (arg0, arg1) {
|
|
565
584
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
566
585
|
return addHeapObject(ret);
|
|
567
586
|
},
|
|
568
|
-
|
|
587
|
+
__wbg_next_ddb3312ca1c4e32a: function () {
|
|
569
588
|
return handleError(function (arg0) {
|
|
570
589
|
const ret = getObject(arg0).next();
|
|
571
590
|
return addHeapObject(ret);
|
|
572
591
|
}, arguments);
|
|
573
592
|
},
|
|
574
|
-
|
|
593
|
+
__wbg_done_5c1f01fb660d73b5: function (arg0) {
|
|
575
594
|
const ret = getObject(arg0).done;
|
|
576
595
|
return ret;
|
|
577
596
|
},
|
|
578
|
-
|
|
597
|
+
__wbg_value_1695675138684bd5: function (arg0) {
|
|
579
598
|
const ret = getObject(arg0).value;
|
|
580
599
|
return addHeapObject(ret);
|
|
581
600
|
},
|
|
582
|
-
|
|
601
|
+
__wbg_get_97b561fb56f034b5: function () {
|
|
583
602
|
return handleError(function (arg0, arg1) {
|
|
584
603
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
585
604
|
return addHeapObject(ret);
|
|
586
605
|
}, arguments);
|
|
587
606
|
},
|
|
588
|
-
|
|
607
|
+
__wbg_call_cb65541d95d71282: function () {
|
|
589
608
|
return handleError(function (arg0, arg1) {
|
|
590
609
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
591
610
|
return addHeapObject(ret);
|
|
592
611
|
}, arguments);
|
|
593
612
|
},
|
|
594
|
-
|
|
613
|
+
__wbg_next_526fc47e980da008: function (arg0) {
|
|
595
614
|
const ret = getObject(arg0).next;
|
|
596
615
|
return addHeapObject(ret);
|
|
597
616
|
},
|
|
598
|
-
|
|
617
|
+
__wbg_isArray_4c24b343cb13cfb1: function (arg0) {
|
|
599
618
|
const ret = Array.isArray(getObject(arg0));
|
|
600
619
|
return ret;
|
|
601
620
|
},
|
|
602
|
-
|
|
621
|
+
__wbg_call_01734de55d61e11d: function () {
|
|
603
622
|
return handleError(function (arg0, arg1, arg2) {
|
|
604
623
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
605
624
|
return addHeapObject(ret);
|
|
606
625
|
}, arguments);
|
|
607
626
|
},
|
|
608
|
-
|
|
627
|
+
__wbg_isSafeInteger_bb8e18dd21c97288: function (arg0) {
|
|
609
628
|
const ret = Number.isSafeInteger(getObject(arg0));
|
|
610
629
|
return ret;
|
|
611
630
|
},
|
|
612
|
-
|
|
631
|
+
__wbg_set_5cf90238115182c3: function (arg0, arg1, arg2) {
|
|
613
632
|
getObject(arg0).set(getObject(arg1), arg2 >>> 0);
|
|
614
633
|
},
|
|
615
634
|
__wbindgen_jsval_loose_eq: function (arg0, arg1) {
|
|
616
635
|
const ret = getObject(arg0) == getObject(arg1);
|
|
617
636
|
return ret;
|
|
618
637
|
},
|
|
619
|
-
|
|
638
|
+
__wbg_instanceof_Uint8Array_d8d9cb2b8e8ac1d4: function (arg0) {
|
|
620
639
|
let result;
|
|
621
640
|
try {
|
|
622
641
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -626,7 +645,7 @@ const imports = {
|
|
|
626
645
|
const ret = result;
|
|
627
646
|
return ret;
|
|
628
647
|
},
|
|
629
|
-
|
|
648
|
+
__wbg_instanceof_ArrayBuffer_39ac22089b74fddb: function (arg0) {
|
|
630
649
|
let result;
|
|
631
650
|
try {
|
|
632
651
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -636,26 +655,26 @@ const imports = {
|
|
|
636
655
|
const ret = result;
|
|
637
656
|
return ret;
|
|
638
657
|
},
|
|
639
|
-
|
|
658
|
+
__wbg_entries_e51f29c7bba0c054: function (arg0) {
|
|
640
659
|
const ret = Object.entries(getObject(arg0));
|
|
641
660
|
return addHeapObject(ret);
|
|
642
661
|
},
|
|
643
662
|
__wbindgen_bigint_get_as_i64: function (arg0, arg1) {
|
|
644
663
|
const v = getObject(arg1);
|
|
645
|
-
const ret = typeof
|
|
664
|
+
const ret = typeof v === "bigint" ? v : undefined;
|
|
646
665
|
getBigInt64Memory0()[arg0 / 8 + 1] = isLikeNone(ret) ? BigInt(0) : ret;
|
|
647
666
|
getInt32Memory0()[arg0 / 4 + 0] = !isLikeNone(ret);
|
|
648
667
|
},
|
|
649
668
|
__wbindgen_debug_string: function (arg0, arg1) {
|
|
650
669
|
const ret = debugString(getObject(arg1));
|
|
651
|
-
const
|
|
670
|
+
const ptr1 = passStringToWasm0(
|
|
652
671
|
ret,
|
|
653
672
|
wasm.__wbindgen_malloc,
|
|
654
673
|
wasm.__wbindgen_realloc,
|
|
655
674
|
);
|
|
656
|
-
const
|
|
657
|
-
getInt32Memory0()[arg0 / 4 + 1] =
|
|
658
|
-
getInt32Memory0()[arg0 / 4 + 0] =
|
|
675
|
+
const len1 = WASM_VECTOR_LEN;
|
|
676
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
677
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
659
678
|
},
|
|
660
679
|
__wbindgen_throw: function (arg0, arg1) {
|
|
661
680
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
@@ -669,21 +688,28 @@ const imports = {
|
|
|
669
688
|
const ret = false;
|
|
670
689
|
return ret;
|
|
671
690
|
},
|
|
672
|
-
|
|
691
|
+
__wbg_then_f7e06ee3c11698eb: function (arg0, arg1) {
|
|
673
692
|
const ret = getObject(arg0).then(getObject(arg1));
|
|
674
693
|
return addHeapObject(ret);
|
|
675
694
|
},
|
|
676
|
-
|
|
695
|
+
__wbg_then_b2267541e2a73865: function (arg0, arg1, arg2) {
|
|
677
696
|
const ret = getObject(arg0).then(getObject(arg1), getObject(arg2));
|
|
678
697
|
return addHeapObject(ret);
|
|
679
698
|
},
|
|
680
|
-
|
|
681
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
699
|
+
__wbindgen_closure_wrapper8999: function (arg0, arg1, arg2) {
|
|
700
|
+
const ret = makeMutClosure(arg0, arg1, 312, __wbg_adapter_40);
|
|
682
701
|
return addHeapObject(ret);
|
|
683
702
|
},
|
|
684
703
|
},
|
|
685
704
|
};
|
|
686
705
|
|
|
706
|
+
import { Loader } from "https://deno.land/x/wasmbuild@0.15.1/loader.ts";
|
|
707
|
+
import { cacheToLocalDir } from "https://deno.land/x/wasmbuild@0.15.1/cache.ts";
|
|
708
|
+
|
|
709
|
+
const loader = new Loader({
|
|
710
|
+
imports,
|
|
711
|
+
cache: cacheToLocalDir,
|
|
712
|
+
});
|
|
687
713
|
/**
|
|
688
714
|
* Decompression callback
|
|
689
715
|
*
|
|
@@ -709,9 +735,6 @@ export async function instantiate(opts) {
|
|
|
709
735
|
return (await instantiateWithInstance(opts)).exports;
|
|
710
736
|
}
|
|
711
737
|
|
|
712
|
-
let instanceWithExports;
|
|
713
|
-
let lastLoadPromise;
|
|
714
|
-
|
|
715
738
|
/** Instantiates an instance of the Wasm module along with its exports.
|
|
716
739
|
* @remarks It is safe to call this multiple times and once successfully
|
|
717
740
|
* loaded it will always return a reference to the same object.
|
|
@@ -721,28 +744,18 @@ let lastLoadPromise;
|
|
|
721
744
|
* exports: { build: typeof build; Parser : typeof Parser }
|
|
722
745
|
* }>}
|
|
723
746
|
*/
|
|
724
|
-
export function instantiateWithInstance(opts) {
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
instance,
|
|
737
|
-
exports: getWasmInstanceExports(),
|
|
738
|
-
};
|
|
739
|
-
return instanceWithExports;
|
|
740
|
-
} finally {
|
|
741
|
-
lastLoadPromise = null;
|
|
742
|
-
}
|
|
743
|
-
})();
|
|
744
|
-
}
|
|
745
|
-
return lastLoadPromise;
|
|
747
|
+
export async function instantiateWithInstance(opts) {
|
|
748
|
+
const { instance } = await loader.load(
|
|
749
|
+
opts?.url ?? new URL("eszip_wasm_bg.wasm", import.meta.url),
|
|
750
|
+
opts?.decompress,
|
|
751
|
+
);
|
|
752
|
+
wasm = wasm ?? instance.exports;
|
|
753
|
+
cachedInt32Memory0 = cachedInt32Memory0 ?? new Int32Array(wasm.memory.buffer);
|
|
754
|
+
cachedUint8Memory0 = cachedUint8Memory0 ?? new Uint8Array(wasm.memory.buffer);
|
|
755
|
+
return {
|
|
756
|
+
instance,
|
|
757
|
+
exports: getWasmInstanceExports(),
|
|
758
|
+
};
|
|
746
759
|
}
|
|
747
760
|
|
|
748
761
|
function getWasmInstanceExports() {
|
|
@@ -751,61 +764,5 @@ function getWasmInstanceExports() {
|
|
|
751
764
|
|
|
752
765
|
/** Gets if the Wasm module has been instantiated. */
|
|
753
766
|
export function isInstantiated() {
|
|
754
|
-
return
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
/**
|
|
758
|
-
* @param {InstantiateOptions} opts
|
|
759
|
-
*/
|
|
760
|
-
async function instantiateModule(opts) {
|
|
761
|
-
const wasmUrl = opts.url ?? new URL("eszip_wasm_bg.wasm", import.meta.url);
|
|
762
|
-
const decompress = opts.decompress;
|
|
763
|
-
const isFile = wasmUrl.protocol === "file:";
|
|
764
|
-
|
|
765
|
-
// make file urls work in Node via dnt
|
|
766
|
-
const isNode = globalThis.process?.versions?.node != null;
|
|
767
|
-
if (isNode && isFile) {
|
|
768
|
-
// the deno global will be shimmed by dnt
|
|
769
|
-
const wasmCode = await Deno.readFile(wasmUrl);
|
|
770
|
-
return WebAssembly.instantiate(
|
|
771
|
-
decompress ? decompress(wasmCode) : wasmCode,
|
|
772
|
-
imports,
|
|
773
|
-
);
|
|
774
|
-
}
|
|
775
|
-
|
|
776
|
-
switch (wasmUrl.protocol) {
|
|
777
|
-
case "file:":
|
|
778
|
-
case "https:":
|
|
779
|
-
case "http:": {
|
|
780
|
-
if (isFile) {
|
|
781
|
-
if (typeof Deno !== "object") {
|
|
782
|
-
throw new Error("file urls are not supported in this environment");
|
|
783
|
-
}
|
|
784
|
-
if ("permissions" in Deno) {
|
|
785
|
-
await Deno.permissions.request({ name: "read", path: wasmUrl });
|
|
786
|
-
}
|
|
787
|
-
} else if (typeof Deno === "object" && "permissions" in Deno) {
|
|
788
|
-
await Deno.permissions.request({ name: "net", host: wasmUrl.host });
|
|
789
|
-
}
|
|
790
|
-
const wasmResponse = await fetch(wasmUrl);
|
|
791
|
-
if (decompress) {
|
|
792
|
-
const wasmCode = new Uint8Array(await wasmResponse.arrayBuffer());
|
|
793
|
-
return WebAssembly.instantiate(decompress(wasmCode), imports);
|
|
794
|
-
}
|
|
795
|
-
if (
|
|
796
|
-
isFile ||
|
|
797
|
-
wasmResponse.headers.get("content-type")?.toLowerCase()
|
|
798
|
-
.startsWith("application/wasm")
|
|
799
|
-
) {
|
|
800
|
-
return WebAssembly.instantiateStreaming(wasmResponse, imports);
|
|
801
|
-
} else {
|
|
802
|
-
return WebAssembly.instantiate(
|
|
803
|
-
await wasmResponse.arrayBuffer(),
|
|
804
|
-
imports,
|
|
805
|
-
);
|
|
806
|
-
}
|
|
807
|
-
}
|
|
808
|
-
default:
|
|
809
|
-
throw new Error(`Unsupported protocol: ${wasmUrl.protocol}`);
|
|
810
|
-
}
|
|
767
|
+
return loader.instance != null;
|
|
811
768
|
}
|
|
Binary file
|