@next/swc-wasm-nodejs 14.1.2-canary.6 → 14.1.2

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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/wasm.js +70 -87
  3. package/wasm_bg.wasm +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/swc-wasm-nodejs",
3
- "version": "14.1.2-canary.6",
3
+ "version": "14.1.2",
4
4
  "files": [
5
5
  "wasm_bg.wasm",
6
6
  "wasm.js",
package/wasm.js CHANGED
@@ -53,14 +53,14 @@ function passStringToWasm0(arg, malloc, realloc) {
53
53
 
54
54
  if (realloc === undefined) {
55
55
  const buf = cachedTextEncoder.encode(arg);
56
- const ptr = malloc(buf.length, 1) >>> 0;
56
+ const ptr = malloc(buf.length);
57
57
  getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf);
58
58
  WASM_VECTOR_LEN = buf.length;
59
59
  return ptr;
60
60
  }
61
61
 
62
62
  let len = arg.length;
63
- let ptr = malloc(len, 1) >>> 0;
63
+ let ptr = malloc(len);
64
64
 
65
65
  const mem = getUint8Memory0();
66
66
 
@@ -76,12 +76,11 @@ function passStringToWasm0(arg, malloc, realloc) {
76
76
  if (offset !== 0) {
77
77
  arg = arg.slice(offset);
78
78
  }
79
- ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
79
+ ptr = realloc(ptr, len, len = offset + arg.length * 3);
80
80
  const view = getUint8Memory0().subarray(ptr + offset, ptr + len);
81
81
  const ret = encodeString(arg, view);
82
82
 
83
83
  offset += ret.written;
84
- ptr = realloc(ptr, len, offset, 1) >>> 0;
85
84
  }
86
85
 
87
86
  WASM_VECTOR_LEN = offset;
@@ -124,7 +123,6 @@ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true
124
123
  cachedTextDecoder.decode();
125
124
 
126
125
  function getStringFromWasm0(ptr, len) {
127
- ptr = ptr >>> 0;
128
126
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
129
127
  }
130
128
 
@@ -202,12 +200,6 @@ function debugString(val) {
202
200
  return className;
203
201
  }
204
202
 
205
- const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
206
- ? { register: () => {}, unregister: () => {} }
207
- : new FinalizationRegistry(state => {
208
- wasm.__wbindgen_export_2.get(state.dtor)(state.a, state.b)
209
- });
210
-
211
203
  function makeMutClosure(arg0, arg1, dtor, f) {
212
204
  const state = { a: arg0, b: arg1, cnt: 1, dtor };
213
205
  const real = (...args) => {
@@ -222,18 +214,18 @@ function makeMutClosure(arg0, arg1, dtor, f) {
222
214
  } finally {
223
215
  if (--state.cnt === 0) {
224
216
  wasm.__wbindgen_export_2.get(state.dtor)(a, state.b);
225
- CLOSURE_DTORS.unregister(state);
217
+
226
218
  } else {
227
219
  state.a = a;
228
220
  }
229
221
  }
230
222
  };
231
223
  real.original = state;
232
- CLOSURE_DTORS.register(real, state, state);
224
+
233
225
  return real;
234
226
  }
235
227
  function __wbg_adapter_48(arg0, arg1, arg2) {
236
- wasm._dyn_core_80dd73c7ef3d55e5___ops__function__FnMut_______Output______as_wasm_bindgen_19194eebc680be5___closure__WasmClosure___describe__invoke___wasm_bindgen_19194eebc680be5___JsValue_____(arg0, arg1, addHeapObject(arg2));
228
+ wasm.wasm_bindgen_3fb300003f18f35c___convert__closures__invoke1_mut___wasm_bindgen_3fb300003f18f35c___JsValue_____(arg0, arg1, addHeapObject(arg2));
237
229
  }
238
230
 
239
231
  /**
@@ -375,8 +367,8 @@ function handleError(f, args) {
375
367
  wasm.__wbindgen_exn_store(addHeapObject(e));
376
368
  }
377
369
  }
378
- function __wbg_adapter_125(arg0, arg1, arg2, arg3) {
379
- wasm.wasm_bindgen_19194eebc680be5___convert__closures__invoke2_mut___wasm_bindgen_19194eebc680be5___JsValue__wasm_bindgen_19194eebc680be5___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
370
+ function __wbg_adapter_121(arg0, arg1, arg2, arg3) {
371
+ wasm.wasm_bindgen_3fb300003f18f35c___convert__closures__invoke2_mut___wasm_bindgen_3fb300003f18f35c___JsValue__wasm_bindgen_3fb300003f18f35c___JsValue_____(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
380
372
  }
381
373
 
382
374
  module.exports.__wbindgen_object_drop_ref = function(arg0) {
@@ -386,10 +378,10 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
386
378
  module.exports.__wbindgen_string_get = function(arg0, arg1) {
387
379
  const obj = getObject(arg1);
388
380
  const ret = typeof(obj) === 'string' ? obj : undefined;
389
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
390
- var len1 = WASM_VECTOR_LEN;
391
- getInt32Memory0()[arg0 / 4 + 1] = len1;
392
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
381
+ var ptr0 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
382
+ var len0 = WASM_VECTOR_LEN;
383
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
384
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
393
385
  };
394
386
 
395
387
  module.exports.__wbindgen_boolean_get = function(arg0) {
@@ -446,13 +438,13 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
446
438
  return ret;
447
439
  };
448
440
 
449
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
450
- const ret = new Error(getStringFromWasm0(arg0, arg1));
441
+ module.exports.__wbindgen_string_new = function(arg0, arg1) {
442
+ const ret = getStringFromWasm0(arg0, arg1);
451
443
  return addHeapObject(ret);
452
444
  };
453
445
 
454
- module.exports.__wbindgen_string_new = function(arg0, arg1) {
455
- const ret = getStringFromWasm0(arg0, arg1);
446
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
447
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
456
448
  return addHeapObject(ret);
457
449
  };
458
450
 
@@ -463,28 +455,18 @@ module.exports.__wbg_new_abda76e883ba8a5f = function() {
463
455
 
464
456
  module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
465
457
  const ret = getObject(arg1).stack;
466
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
467
- const len1 = WASM_VECTOR_LEN;
468
- getInt32Memory0()[arg0 / 4 + 1] = len1;
469
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
458
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
459
+ const len0 = WASM_VECTOR_LEN;
460
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
461
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
470
462
  };
471
463
 
472
464
  module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
473
465
  var v0 = getCachedStringFromWasm0(arg0, arg1);
474
- if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1, 1); }
466
+ if (arg0 !== 0) { wasm.__wbindgen_free(arg0, arg1); }
475
467
  console.error(v0);
476
468
  };
477
469
 
478
- module.exports.__wbg_queueMicrotask_f82fc5d1e8f816ae = function(arg0) {
479
- const ret = getObject(arg0).queueMicrotask;
480
- return addHeapObject(ret);
481
- };
482
-
483
- module.exports.__wbindgen_is_function = function(arg0) {
484
- const ret = typeof(getObject(arg0)) === 'function';
485
- return ret;
486
- };
487
-
488
470
  module.exports.__wbindgen_cb_drop = function(arg0) {
489
471
  const obj = takeObject(arg0).original;
490
472
  if (obj.cnt-- == 1) {
@@ -495,10 +477,6 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
495
477
  return ret;
496
478
  };
497
479
 
498
- module.exports.__wbg_queueMicrotask_f61ee94ee663068b = function(arg0) {
499
- queueMicrotask(getObject(arg0));
500
- };
501
-
502
480
  module.exports.__wbindgen_object_clone_ref = function(arg0) {
503
481
  const ret = getObject(arg0);
504
482
  return addHeapObject(ret);
@@ -561,141 +539,146 @@ module.exports.__wbg_getRandomValues_37fa2ca9e4e07fab = function() { return hand
561
539
  getObject(arg0).getRandomValues(getObject(arg1));
562
540
  }, arguments) };
563
541
 
564
- module.exports.__wbg_get_0ee8ea3c7c984c45 = function(arg0, arg1) {
542
+ module.exports.__wbg_get_27fe3dac1c4d0224 = function(arg0, arg1) {
565
543
  const ret = getObject(arg0)[arg1 >>> 0];
566
544
  return addHeapObject(ret);
567
545
  };
568
546
 
569
- module.exports.__wbg_length_161c0d89c6535c1d = function(arg0) {
547
+ module.exports.__wbg_length_e498fbc24f9c1d4f = function(arg0) {
570
548
  const ret = getObject(arg0).length;
571
549
  return ret;
572
550
  };
573
551
 
574
- module.exports.__wbg_newnoargs_cfecb3965268594c = function(arg0, arg1) {
552
+ module.exports.__wbindgen_is_function = function(arg0) {
553
+ const ret = typeof(getObject(arg0)) === 'function';
554
+ return ret;
555
+ };
556
+
557
+ module.exports.__wbg_newnoargs_2b8b6bd7753c76ba = function(arg0, arg1) {
575
558
  var v0 = getCachedStringFromWasm0(arg0, arg1);
576
559
  const ret = new Function(v0);
577
560
  return addHeapObject(ret);
578
561
  };
579
562
 
580
- module.exports.__wbg_next_586204376d2ed373 = function(arg0) {
563
+ module.exports.__wbg_next_b7d530c04fd8b217 = function(arg0) {
581
564
  const ret = getObject(arg0).next;
582
565
  return addHeapObject(ret);
583
566
  };
584
567
 
585
- module.exports.__wbg_next_b2d3366343a208b3 = function() { return handleError(function (arg0) {
568
+ module.exports.__wbg_next_88560ec06a094dea = function() { return handleError(function (arg0) {
586
569
  const ret = getObject(arg0).next();
587
570
  return addHeapObject(ret);
588
571
  }, arguments) };
589
572
 
590
- module.exports.__wbg_done_90b14d6f6eacc42f = function(arg0) {
573
+ module.exports.__wbg_done_1ebec03bbd919843 = function(arg0) {
591
574
  const ret = getObject(arg0).done;
592
575
  return ret;
593
576
  };
594
577
 
595
- module.exports.__wbg_value_3158be908c80a75e = function(arg0) {
578
+ module.exports.__wbg_value_6ac8da5cc5b3efda = function(arg0) {
596
579
  const ret = getObject(arg0).value;
597
580
  return addHeapObject(ret);
598
581
  };
599
582
 
600
- module.exports.__wbg_iterator_40027cdd598da26b = function() {
583
+ module.exports.__wbg_iterator_55f114446221aa5a = function() {
601
584
  const ret = Symbol.iterator;
602
585
  return addHeapObject(ret);
603
586
  };
604
587
 
605
- module.exports.__wbg_get_3fddfed2c83f434c = function() { return handleError(function (arg0, arg1) {
588
+ module.exports.__wbg_get_baf4855f9a986186 = function() { return handleError(function (arg0, arg1) {
606
589
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
607
590
  return addHeapObject(ret);
608
591
  }, arguments) };
609
592
 
610
- module.exports.__wbg_call_3f093dd26d5569f8 = function() { return handleError(function (arg0, arg1) {
593
+ module.exports.__wbg_call_95d1ea488d03e4e8 = function() { return handleError(function (arg0, arg1) {
611
594
  const ret = getObject(arg0).call(getObject(arg1));
612
595
  return addHeapObject(ret);
613
596
  }, arguments) };
614
597
 
615
- module.exports.__wbg_self_05040bd9523805b9 = function() { return handleError(function () {
598
+ module.exports.__wbg_self_e7c1f827057f6584 = function() { return handleError(function () {
616
599
  const ret = self.self;
617
600
  return addHeapObject(ret);
618
601
  }, arguments) };
619
602
 
620
- module.exports.__wbg_window_adc720039f2cb14f = function() { return handleError(function () {
603
+ module.exports.__wbg_window_a09ec664e14b1b81 = function() { return handleError(function () {
621
604
  const ret = window.window;
622
605
  return addHeapObject(ret);
623
606
  }, arguments) };
624
607
 
625
- module.exports.__wbg_globalThis_622105db80c1457d = function() { return handleError(function () {
608
+ module.exports.__wbg_globalThis_87cbb8506fecf3a9 = function() { return handleError(function () {
626
609
  const ret = globalThis.globalThis;
627
610
  return addHeapObject(ret);
628
611
  }, arguments) };
629
612
 
630
- module.exports.__wbg_global_f56b013ed9bcf359 = function() { return handleError(function () {
613
+ module.exports.__wbg_global_c85a9259e621f3db = function() { return handleError(function () {
631
614
  const ret = global.global;
632
615
  return addHeapObject(ret);
633
616
  }, arguments) };
634
617
 
635
- module.exports.__wbg_isArray_e783c41d0dd19b44 = function(arg0) {
618
+ module.exports.__wbg_isArray_39d28997bf6b96b4 = function(arg0) {
636
619
  const ret = Array.isArray(getObject(arg0));
637
620
  return ret;
638
621
  };
639
622
 
640
- module.exports.__wbg_instanceof_ArrayBuffer_9221fa854ffb71b5 = function(arg0) {
623
+ module.exports.__wbg_instanceof_ArrayBuffer_a69f02ee4c4f5065 = function(arg0) {
641
624
  let result;
642
625
  try {
643
626
  result = getObject(arg0) instanceof ArrayBuffer;
644
- } catch (_) {
627
+ } catch {
645
628
  result = false;
646
629
  }
647
630
  const ret = result;
648
631
  return ret;
649
632
  };
650
633
 
651
- module.exports.__wbg_call_67f2111acd2dfdb6 = function() { return handleError(function (arg0, arg1, arg2) {
634
+ module.exports.__wbg_call_9495de66fdbe016b = function() { return handleError(function (arg0, arg1, arg2) {
652
635
  const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
653
636
  return addHeapObject(ret);
654
637
  }, arguments) };
655
638
 
656
- module.exports.__wbg_isSafeInteger_a23a66ee7c41b273 = function(arg0) {
639
+ module.exports.__wbg_isSafeInteger_8c4789029e885159 = function(arg0) {
657
640
  const ret = Number.isSafeInteger(getObject(arg0));
658
641
  return ret;
659
642
  };
660
643
 
661
- module.exports.__wbg_getTime_0e03c3f524be31ef = function(arg0) {
644
+ module.exports.__wbg_getTime_7c59072d1651a3cf = function(arg0) {
662
645
  const ret = getObject(arg0).getTime();
663
646
  return ret;
664
647
  };
665
648
 
666
- module.exports.__wbg_getTimezoneOffset_840b552f34917133 = function(arg0) {
649
+ module.exports.__wbg_getTimezoneOffset_2a6b27fb18493a56 = function(arg0) {
667
650
  const ret = getObject(arg0).getTimezoneOffset();
668
651
  return ret;
669
652
  };
670
653
 
671
- module.exports.__wbg_new_a9d80688888b4894 = function(arg0) {
654
+ module.exports.__wbg_new_f127e324c1313064 = function(arg0) {
672
655
  const ret = new Date(getObject(arg0));
673
656
  return addHeapObject(ret);
674
657
  };
675
658
 
676
- module.exports.__wbg_new0_7a6141101f2206da = function() {
659
+ module.exports.__wbg_new0_25059e40b1c02766 = function() {
677
660
  const ret = new Date();
678
661
  return addHeapObject(ret);
679
662
  };
680
663
 
681
- module.exports.__wbg_entries_488960b196cfb6a5 = function(arg0) {
664
+ module.exports.__wbg_entries_4e1315b774245952 = function(arg0) {
682
665
  const ret = Object.entries(getObject(arg0));
683
666
  return addHeapObject(ret);
684
667
  };
685
668
 
686
- module.exports.__wbg_new_632630b5cec17f21 = function() {
669
+ module.exports.__wbg_new_f9876326328f45ed = function() {
687
670
  const ret = new Object();
688
671
  return addHeapObject(ret);
689
672
  };
690
673
 
691
- module.exports.__wbg_new_70828a4353259d4b = function(arg0, arg1) {
674
+ module.exports.__wbg_new_9d3a9ce4282a18a8 = function(arg0, arg1) {
692
675
  try {
693
676
  var state0 = {a: arg0, b: arg1};
694
677
  var cb0 = (arg0, arg1) => {
695
678
  const a = state0.a;
696
679
  state0.a = 0;
697
680
  try {
698
- return __wbg_adapter_125(a, state0.b, arg0, arg1);
681
+ return __wbg_adapter_121(a, state0.b, arg0, arg1);
699
682
  } finally {
700
683
  state0.a = a;
701
684
  }
@@ -707,57 +690,57 @@ module.exports.__wbg_new_70828a4353259d4b = function(arg0, arg1) {
707
690
  }
708
691
  };
709
692
 
710
- module.exports.__wbg_resolve_5da6faf2c96fd1d5 = function(arg0) {
693
+ module.exports.__wbg_resolve_fd40f858d9db1a04 = function(arg0) {
711
694
  const ret = Promise.resolve(getObject(arg0));
712
695
  return addHeapObject(ret);
713
696
  };
714
697
 
715
- module.exports.__wbg_then_f9e58f5a50f43eae = function(arg0, arg1) {
698
+ module.exports.__wbg_then_ec5db6d509eb475f = function(arg0, arg1) {
716
699
  const ret = getObject(arg0).then(getObject(arg1));
717
700
  return addHeapObject(ret);
718
701
  };
719
702
 
720
- module.exports.__wbg_buffer_b914fb8b50ebbc3e = function(arg0) {
703
+ module.exports.__wbg_buffer_cf65c07de34b9a08 = function(arg0) {
721
704
  const ret = getObject(arg0).buffer;
722
705
  return addHeapObject(ret);
723
706
  };
724
707
 
725
- module.exports.__wbg_newwithbyteoffsetandlength_0de9ee56e9f6ee6e = function(arg0, arg1, arg2) {
708
+ module.exports.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5 = function(arg0, arg1, arg2) {
726
709
  const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
727
710
  return addHeapObject(ret);
728
711
  };
729
712
 
730
- module.exports.__wbg_new_b1f2d6842d615181 = function(arg0) {
713
+ module.exports.__wbg_new_537b7341ce90bb31 = function(arg0) {
731
714
  const ret = new Uint8Array(getObject(arg0));
732
715
  return addHeapObject(ret);
733
716
  };
734
717
 
735
- module.exports.__wbg_set_7d988c98e6ced92d = function(arg0, arg1, arg2) {
718
+ module.exports.__wbg_set_17499e8aa4003ebd = function(arg0, arg1, arg2) {
736
719
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
737
720
  };
738
721
 
739
- module.exports.__wbg_length_21c4b0ae73cba59d = function(arg0) {
722
+ module.exports.__wbg_length_27a2afe8ab42b09f = function(arg0) {
740
723
  const ret = getObject(arg0).length;
741
724
  return ret;
742
725
  };
743
726
 
744
- module.exports.__wbg_instanceof_Uint8Array_c299a4ee232e76ba = function(arg0) {
727
+ module.exports.__wbg_instanceof_Uint8Array_01cebe79ca606cca = function(arg0) {
745
728
  let result;
746
729
  try {
747
730
  result = getObject(arg0) instanceof Uint8Array;
748
- } catch (_) {
731
+ } catch {
749
732
  result = false;
750
733
  }
751
734
  const ret = result;
752
735
  return ret;
753
736
  };
754
737
 
755
- module.exports.__wbg_newwithlength_0d03cef43b68a530 = function(arg0) {
738
+ module.exports.__wbg_newwithlength_b56c882b57805732 = function(arg0) {
756
739
  const ret = new Uint8Array(arg0 >>> 0);
757
740
  return addHeapObject(ret);
758
741
  };
759
742
 
760
- module.exports.__wbg_subarray_adc418253d76e2f1 = function(arg0, arg1, arg2) {
743
+ module.exports.__wbg_subarray_7526649b91a252a6 = function(arg0, arg1, arg2) {
761
744
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
762
745
  return addHeapObject(ret);
763
746
  };
@@ -771,10 +754,10 @@ module.exports.__wbindgen_bigint_get_as_i64 = function(arg0, arg1) {
771
754
 
772
755
  module.exports.__wbindgen_debug_string = function(arg0, arg1) {
773
756
  const ret = debugString(getObject(arg1));
774
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
775
- const len1 = WASM_VECTOR_LEN;
776
- getInt32Memory0()[arg0 / 4 + 1] = len1;
777
- getInt32Memory0()[arg0 / 4 + 0] = ptr1;
757
+ const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
758
+ const len0 = WASM_VECTOR_LEN;
759
+ getInt32Memory0()[arg0 / 4 + 1] = len0;
760
+ getInt32Memory0()[arg0 / 4 + 0] = ptr0;
778
761
  };
779
762
 
780
763
  module.exports.__wbindgen_throw = function(arg0, arg1) {
@@ -786,8 +769,8 @@ module.exports.__wbindgen_memory = function() {
786
769
  return addHeapObject(ret);
787
770
  };
788
771
 
789
- module.exports.__wbindgen_closure_wrapper15367 = function(arg0, arg1, arg2) {
790
- const ret = makeMutClosure(arg0, arg1, 3593, __wbg_adapter_48);
772
+ module.exports.__wbindgen_closure_wrapper14454 = function(arg0, arg1, arg2) {
773
+ const ret = makeMutClosure(arg0, arg1, 3210, __wbg_adapter_48);
791
774
  return addHeapObject(ret);
792
775
  };
793
776
 
package/wasm_bg.wasm CHANGED
Binary file