@bitwarden/sdk-internal 0.1.4 → 0.1.6
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/bitwarden_wasm_internal.d.ts +4 -0
- package/bitwarden_wasm_internal_bg.js +23 -7
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +1 -0
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +4 -0
- package/node/bitwarden_wasm_internal.js +23 -8
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
let imports = {};
|
|
2
2
|
imports["__wbindgen_placeholder__"] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
|
-
const { WasmError } = require(
|
|
5
|
-
String.raw`./snippets/bitwarden-wasm-internal-4c2122daf2564d19/src/error.js`,
|
|
6
|
-
);
|
|
7
4
|
const { TextEncoder, TextDecoder } = require(`util`);
|
|
8
5
|
|
|
9
6
|
const heap = new Array(128).fill(undefined);
|
|
@@ -242,7 +239,7 @@ function handleError(f, args) {
|
|
|
242
239
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
243
240
|
}
|
|
244
241
|
}
|
|
245
|
-
function
|
|
242
|
+
function __wbg_adapter_99(arg0, arg1, arg2, arg3) {
|
|
246
243
|
wasm.wasm_bindgen__convert__closures__invoke2_mut__h6a4d43ef1f8d92b4(
|
|
247
244
|
arg0,
|
|
248
245
|
arg1,
|
|
@@ -321,6 +318,24 @@ class BitwardenClient {
|
|
|
321
318
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
322
319
|
}
|
|
323
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* @param {string} msg
|
|
323
|
+
*/
|
|
324
|
+
throw(msg) {
|
|
325
|
+
try {
|
|
326
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
327
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
328
|
+
const len0 = WASM_VECTOR_LEN;
|
|
329
|
+
wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
|
|
330
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
331
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
332
|
+
if (r1) {
|
|
333
|
+
throw takeObject(r0);
|
|
334
|
+
}
|
|
335
|
+
} finally {
|
|
336
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
324
339
|
/**
|
|
325
340
|
* Test method, calls http endpoint
|
|
326
341
|
* @param {string} url
|
|
@@ -551,13 +566,13 @@ module.exports.__wbindgen_object_clone_ref = function (arg0) {
|
|
|
551
566
|
return addHeapObject(ret);
|
|
552
567
|
};
|
|
553
568
|
|
|
554
|
-
module.exports.
|
|
569
|
+
module.exports.__wbg_new_9e4189bc41732bbc = function (arg0, arg1) {
|
|
555
570
|
let deferred0_0;
|
|
556
571
|
let deferred0_1;
|
|
557
572
|
try {
|
|
558
573
|
deferred0_0 = arg0;
|
|
559
574
|
deferred0_1 = arg1;
|
|
560
|
-
const ret = new
|
|
575
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
561
576
|
return addHeapObject(ret);
|
|
562
577
|
} finally {
|
|
563
578
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
@@ -714,7 +729,7 @@ module.exports.__wbg_new_1073970097e5a420 = function (arg0, arg1) {
|
|
|
714
729
|
const a = state0.a;
|
|
715
730
|
state0.a = 0;
|
|
716
731
|
try {
|
|
717
|
-
return
|
|
732
|
+
return __wbg_adapter_99(a, state0.b, arg0, arg1);
|
|
718
733
|
} finally {
|
|
719
734
|
state0.a = a;
|
|
720
735
|
}
|
|
@@ -1031,7 +1046,7 @@ module.exports.__wbg_warn_2e2787d40aad9a81 = function (arg0, arg1, arg2, arg3) {
|
|
|
1031
1046
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1032
1047
|
};
|
|
1033
1048
|
|
|
1034
|
-
module.exports.
|
|
1049
|
+
module.exports.__wbindgen_closure_wrapper1608 = function (arg0, arg1, arg2) {
|
|
1035
1050
|
const ret = makeMutClosure(arg0, arg1, 425, __wbg_adapter_38);
|
|
1036
1051
|
return addHeapObject(ret);
|
|
1037
1052
|
};
|
|
Binary file
|
|
@@ -4,6 +4,7 @@ export const memory: WebAssembly.Memory;
|
|
|
4
4
|
export function __wbg_bitwardenclient_free(a: number, b: number): void;
|
|
5
5
|
export function bitwardenclient_new(a: number, b: number): number;
|
|
6
6
|
export function bitwardenclient_echo(a: number, b: number, c: number, d: number): void;
|
|
7
|
+
export function bitwardenclient_throw(a: number, b: number, c: number, d: number): void;
|
|
7
8
|
export function bitwardenclient_http_get(a: number, b: number, c: number): number;
|
|
8
9
|
export function bitwardenclient_crypto(a: number): number;
|
|
9
10
|
export function clientcrypto_initialize_user_crypto(a: number, b: number): number;
|