@reallyme/codec 0.2.1 → 0.2.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.
@@ -422,7 +422,7 @@ export function validateKeyBinding(binding_type, algorithm, multikey) {
422
422
  function __wbg_get_imports() {
423
423
  const import0 = {
424
424
  __proto__: null,
425
- __wbg___wbindgen_string_get_b0ca35b86a603356: function(arg0, arg1) {
425
+ __wbg___wbindgen_string_get_d154f1e671052120: function(arg0, arg1) {
426
426
  const obj = arg1;
427
427
  const ret = typeof(obj) === 'string' ? obj : undefined;
428
428
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -430,40 +430,40 @@ function __wbg_get_imports() {
430
430
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
431
431
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
432
432
  },
433
- __wbg___wbindgen_throw_344f42d3211c4765: function(arg0, arg1) {
433
+ __wbg___wbindgen_throw_bb96b2010945f0bc: function(arg0, arg1) {
434
434
  throw new Error(getStringFromWasm0(arg0, arg1));
435
435
  },
436
- __wbg_charCodeAt_2a30bc7c17474cc6: function(arg0, arg1) {
436
+ __wbg_charCodeAt_ee49a2dd698e4f66: function(arg0, arg1) {
437
437
  const ret = arg0.charCodeAt(arg1 >>> 0);
438
438
  return ret;
439
439
  },
440
- __wbg_fill_5663f5c647107cce: function(arg0, arg1, arg2, arg3) {
440
+ __wbg_fill_36c70ae56a83e4f3: function(arg0, arg1, arg2, arg3) {
441
441
  const ret = arg0.fill(arg1, arg2 >>> 0, arg3 >>> 0);
442
442
  return ret;
443
443
  },
444
- __wbg_length_02c64e687322fa34: function(arg0) {
444
+ __wbg_length_36bd29c6848c2144: function(arg0) {
445
445
  const ret = arg0.length;
446
446
  return ret;
447
447
  },
448
- __wbg_length_1f0964f4a5e2c6d8: function(arg0) {
448
+ __wbg_length_7afd83ae4ddf324f: function(arg0) {
449
449
  const ret = arg0.length;
450
450
  return ret;
451
451
  },
452
- __wbg_new_from_slice_77cdfb7977362f3c: function(arg0, arg1) {
452
+ __wbg_new_from_slice_3eea173078478cfe: function(arg0, arg1) {
453
453
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
454
454
  return ret;
455
455
  },
456
- __wbg_new_with_length_e6785c33c8e4cce8: function(arg0) {
456
+ __wbg_new_with_length_3ffc1c56427c525c: function(arg0) {
457
457
  const ret = new Uint8Array(arg0 >>> 0);
458
458
  return ret;
459
459
  },
460
- __wbg_prototypesetcall_4770620bbe4688a0: function(arg0, arg1, arg2) {
460
+ __wbg_prototypesetcall_de8e0d9553586985: function(arg0, arg1, arg2) {
461
461
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
462
462
  },
463
- __wbg_set_61e45ae8061eca11: function(arg0, arg1, arg2) {
463
+ __wbg_set_862c439a342a8818: function(arg0, arg1, arg2) {
464
464
  arg0.set(arg1, arg2 >>> 0);
465
465
  },
466
- __wbg_subarray_3ed232c8a6baee09: function(arg0, arg1, arg2) {
466
+ __wbg_subarray_a4cc58201c7359fd: function(arg0, arg1, arg2) {
467
467
  const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
468
468
  return ret;
469
469
  },
@@ -608,11 +608,15 @@ function __wbg_finalize_init(instance, module) {
608
608
 
609
609
  async function __wbg_load(module, imports) {
610
610
  if (typeof Response === 'function' && module instanceof Response) {
611
+ if (!module.ok) {
612
+ throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
613
+ }
614
+
611
615
  if (typeof WebAssembly.instantiateStreaming === 'function') {
612
616
  try {
613
617
  return await WebAssembly.instantiateStreaming(module, imports);
614
618
  } catch (e) {
615
- const validResponse = module.ok && expectedResponseType(module.type);
619
+ const validResponse = expectedResponseType(module.type);
616
620
 
617
621
  if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
618
622
  console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reallyme/codec",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "TypeScript facade for the ReallyMe codec WASM package.",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -39,7 +39,7 @@
39
39
  "test": "npm run build && node --test \"test/*.test.mjs\""
40
40
  },
41
41
  "dependencies": {
42
- "@bufbuild/protobuf": "2.13.0"
42
+ "@bufbuild/protobuf": "2.14.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "fast-check": "4.9.0",