@reallyme/jose 0.4.4 → 0.4.5

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.
@@ -22,31 +22,30 @@ export function executeOperationJson(request) {
22
22
  function __wbg_get_imports() {
23
23
  const import0 = {
24
24
  __proto__: null,
25
- __wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
25
+ __wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
26
26
  throw new Error(getStringFromWasm0(arg0, arg1));
27
27
  },
28
- __wbg_getRandomValues_436a51d0629d84e1: function() { return handleError(function (arg0, arg1) {
28
+ __wbg_getRandomValues_8b6f1f663e6f188d: function() { return handleError(function (arg0, arg1) {
29
29
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
30
30
  }, arguments); },
31
- __wbg_length_7f3c00c40364105e: function(arg0) {
31
+ __wbg_length_186163212ffe79c3: function(arg0) {
32
32
  const ret = arg0.length;
33
33
  return ret;
34
34
  },
35
- __wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
35
+ __wbg_new_from_slice_b8daf545a41c6aa0: function(arg0, arg1) {
36
36
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
37
37
  return ret;
38
38
  },
39
- __wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
39
+ __wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
40
40
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
41
41
  },
42
42
  __wbindgen_init_externref_table: function() {
43
43
  const table = wasm.__wbindgen_externrefs;
44
- const offset = table.grow(4);
45
44
  table.set(0, undefined);
46
- table.set(offset + 0, undefined);
47
- table.set(offset + 1, null);
48
- table.set(offset + 2, true);
49
- table.set(offset + 3, false);
45
+ table.set(1024, undefined);
46
+ table.set(1025, null);
47
+ table.set(1026, true);
48
+ table.set(1027, false);
50
49
  },
51
50
  };
52
51
  return {
@@ -67,7 +66,8 @@ function getArrayU8FromWasm0(ptr, len) {
67
66
  }
68
67
 
69
68
  function getStringFromWasm0(ptr, len) {
70
- return decodeText(ptr >>> 0, len);
69
+ ptr = ptr >>> 0;
70
+ return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
71
71
  }
72
72
 
73
73
  let cachedUint8ArrayMemory0 = null;
@@ -87,18 +87,18 @@ function handleError(f, args) {
87
87
  }
88
88
  }
89
89
 
90
- let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
90
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
91
91
  cachedTextDecoder.decode();
92
92
  const MAX_SAFARI_DECODE_BYTES = 2146435072;
93
93
  let numBytesDecoded = 0;
94
- function decodeText(ptr, len) {
95
- numBytesDecoded += len;
94
+ function decodeText(bytes) {
95
+ numBytesDecoded += bytes.length;
96
96
  if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
97
- cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
97
+ cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
98
98
  cachedTextDecoder.decode();
99
- numBytesDecoded = len;
99
+ numBytesDecoded = bytes.length;
100
100
  }
101
- return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
101
+ return cachedTextDecoder.decode(bytes);
102
102
  }
103
103
 
104
104
  let wasmModule, wasmInstance, wasm;
@@ -170,9 +170,17 @@ function initSync(module) {
170
170
  return __wbg_finalize_init(instance, module);
171
171
  }
172
172
 
173
+ let __wbg_init_promise;
173
174
  async function __wbg_init(module_or_path) {
174
175
  if (wasm !== undefined) return wasm;
176
+ if (__wbg_init_promise === undefined) {
177
+ __wbg_init_promise = __wbg_init_once(module_or_path);
178
+ __wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
179
+ }
180
+ return __wbg_init_promise;
181
+ }
175
182
 
183
+ async function __wbg_init_once(module_or_path) {
176
184
 
177
185
  if (module_or_path !== undefined) {
178
186
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reallyme/jose",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Strict JOSE, JWT, JWS, and JWE for TypeScript through the canonical ReallyMe Rust/WASM operation contract.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "repository": {