@bitwarden/sdk-internal 0.1.5 → 0.1.7
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 +8 -0
- package/bitwarden_wasm_internal_bg.js +61 -26
- package/bitwarden_wasm_internal_bg.wasm +0 -0
- package/bitwarden_wasm_internal_bg.wasm.d.ts +4 -2
- package/bitwarden_wasm_internal_bg.wasm.js +1 -1
- package/node/bitwarden_wasm_internal.d.ts +8 -0
- package/node/bitwarden_wasm_internal.js +61 -27
- package/node/bitwarden_wasm_internal_bg.wasm +0 -0
- package/node/bitwarden_wasm_internal_bg.wasm.d.ts +4 -2
- package/package.json +2 -2
|
@@ -172,6 +172,14 @@ export class BitwardenClient {
|
|
|
172
172
|
* @returns {string}
|
|
173
173
|
*/
|
|
174
174
|
echo(msg: string): string;
|
|
175
|
+
/**
|
|
176
|
+
* @returns {string}
|
|
177
|
+
*/
|
|
178
|
+
version(): string;
|
|
179
|
+
/**
|
|
180
|
+
* @param {string} msg
|
|
181
|
+
*/
|
|
182
|
+
throw(msg: string): void;
|
|
175
183
|
/**
|
|
176
184
|
* Test method, calls http endpoint
|
|
177
185
|
* @param {string} url
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { WasmError } from "./snippets/bitwarden-wasm-internal-4c2122daf2564d19/src/error.js";
|
|
2
|
-
|
|
3
1
|
let wasm;
|
|
4
2
|
export function __wbg_set_wasm(val) {
|
|
5
3
|
wasm = val;
|
|
@@ -233,7 +231,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
233
231
|
return real;
|
|
234
232
|
}
|
|
235
233
|
function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
236
|
-
wasm.
|
|
234
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hec6c9a85ed863308(
|
|
237
235
|
arg0,
|
|
238
236
|
arg1,
|
|
239
237
|
addHeapObject(arg2),
|
|
@@ -247,8 +245,8 @@ function handleError(f, args) {
|
|
|
247
245
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
248
246
|
}
|
|
249
247
|
}
|
|
250
|
-
function
|
|
251
|
-
wasm.
|
|
248
|
+
function __wbg_adapter_100(arg0, arg1, arg2, arg3) {
|
|
249
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h29c3505e35b3c82d(
|
|
252
250
|
arg0,
|
|
253
251
|
arg1,
|
|
254
252
|
addHeapObject(arg2),
|
|
@@ -326,6 +324,43 @@ export class BitwardenClient {
|
|
|
326
324
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
327
325
|
}
|
|
328
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* @returns {string}
|
|
329
|
+
*/
|
|
330
|
+
version() {
|
|
331
|
+
let deferred1_0;
|
|
332
|
+
let deferred1_1;
|
|
333
|
+
try {
|
|
334
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
335
|
+
wasm.bitwardenclient_version(retptr, this.__wbg_ptr);
|
|
336
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
337
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
338
|
+
deferred1_0 = r0;
|
|
339
|
+
deferred1_1 = r1;
|
|
340
|
+
return getStringFromWasm0(r0, r1);
|
|
341
|
+
} finally {
|
|
342
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
343
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* @param {string} msg
|
|
348
|
+
*/
|
|
349
|
+
throw(msg) {
|
|
350
|
+
try {
|
|
351
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
352
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
353
|
+
const len0 = WASM_VECTOR_LEN;
|
|
354
|
+
wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
|
|
355
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
356
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
357
|
+
if (r1) {
|
|
358
|
+
throw takeObject(r0);
|
|
359
|
+
}
|
|
360
|
+
} finally {
|
|
361
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
329
364
|
/**
|
|
330
365
|
* Test method, calls http endpoint
|
|
331
366
|
* @param {string} url
|
|
@@ -552,13 +587,30 @@ export function __wbindgen_object_clone_ref(arg0) {
|
|
|
552
587
|
return addHeapObject(ret);
|
|
553
588
|
}
|
|
554
589
|
|
|
555
|
-
export function
|
|
590
|
+
export function __wbg_next_b06e115d1b01e10b() {
|
|
591
|
+
return handleError(function (arg0) {
|
|
592
|
+
const ret = getObject(arg0).next();
|
|
593
|
+
return addHeapObject(ret);
|
|
594
|
+
}, arguments);
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
export function __wbg_done_983b5ffcaec8c583(arg0) {
|
|
598
|
+
const ret = getObject(arg0).done;
|
|
599
|
+
return ret;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
export function __wbg_value_2ab8a198c834c26a(arg0) {
|
|
603
|
+
const ret = getObject(arg0).value;
|
|
604
|
+
return addHeapObject(ret);
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
export function __wbg_new_97e630adfc58d1e5(arg0, arg1) {
|
|
556
608
|
let deferred0_0;
|
|
557
609
|
let deferred0_1;
|
|
558
610
|
try {
|
|
559
611
|
deferred0_0 = arg0;
|
|
560
612
|
deferred0_1 = arg1;
|
|
561
|
-
const ret = new
|
|
613
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
562
614
|
return addHeapObject(ret);
|
|
563
615
|
} finally {
|
|
564
616
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
@@ -648,23 +700,6 @@ export function __wbg_headers_1b9bf90c73fae600(arg0) {
|
|
|
648
700
|
return addHeapObject(ret);
|
|
649
701
|
}
|
|
650
702
|
|
|
651
|
-
export function __wbg_next_b06e115d1b01e10b() {
|
|
652
|
-
return handleError(function (arg0) {
|
|
653
|
-
const ret = getObject(arg0).next();
|
|
654
|
-
return addHeapObject(ret);
|
|
655
|
-
}, arguments);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
export function __wbg_done_983b5ffcaec8c583(arg0) {
|
|
659
|
-
const ret = getObject(arg0).done;
|
|
660
|
-
return ret;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
export function __wbg_value_2ab8a198c834c26a(arg0) {
|
|
664
|
-
const ret = getObject(arg0).value;
|
|
665
|
-
return addHeapObject(ret);
|
|
666
|
-
}
|
|
667
|
-
|
|
668
703
|
export function __wbg_stringify_eead5648c09faaf8() {
|
|
669
704
|
return handleError(function (arg0) {
|
|
670
705
|
const ret = JSON.stringify(getObject(arg0));
|
|
@@ -715,7 +750,7 @@ export function __wbg_new_1073970097e5a420(arg0, arg1) {
|
|
|
715
750
|
const a = state0.a;
|
|
716
751
|
state0.a = 0;
|
|
717
752
|
try {
|
|
718
|
-
return
|
|
753
|
+
return __wbg_adapter_100(a, state0.b, arg0, arg1);
|
|
719
754
|
} finally {
|
|
720
755
|
state0.a = a;
|
|
721
756
|
}
|
|
@@ -1032,7 +1067,7 @@ export function __wbg_warn_2e2787d40aad9a81(arg0, arg1, arg2, arg3) {
|
|
|
1032
1067
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1033
1068
|
}
|
|
1034
1069
|
|
|
1035
|
-
export function
|
|
1070
|
+
export function __wbindgen_closure_wrapper1610(arg0, arg1, arg2) {
|
|
1036
1071
|
const ret = makeMutClosure(arg0, arg1, 425, __wbg_adapter_38);
|
|
1037
1072
|
return addHeapObject(ret);
|
|
1038
1073
|
}
|
|
Binary file
|
|
@@ -4,6 +4,8 @@ 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_version(a: number, b: number): void;
|
|
8
|
+
export function bitwardenclient_throw(a: number, b: number, c: number, d: number): void;
|
|
7
9
|
export function bitwardenclient_http_get(a: number, b: number, c: number): number;
|
|
8
10
|
export function bitwardenclient_crypto(a: number): number;
|
|
9
11
|
export function clientcrypto_initialize_user_crypto(a: number, b: number): number;
|
|
@@ -17,7 +19,7 @@ export function clientvault_folders(a: number): number;
|
|
|
17
19
|
export function __wbindgen_malloc(a: number, b: number): number;
|
|
18
20
|
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
|
|
19
21
|
export const __wbindgen_export_2: WebAssembly.Table;
|
|
20
|
-
export function
|
|
22
|
+
export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hec6c9a85ed863308(
|
|
21
23
|
a: number,
|
|
22
24
|
b: number,
|
|
23
25
|
c: number,
|
|
@@ -25,7 +27,7 @@ export function _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen
|
|
|
25
27
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|
|
26
28
|
export function __wbindgen_free(a: number, b: number, c: number): void;
|
|
27
29
|
export function __wbindgen_exn_store(a: number): void;
|
|
28
|
-
export function
|
|
30
|
+
export function wasm_bindgen__convert__closures__invoke2_mut__h29c3505e35b3c82d(
|
|
29
31
|
a: number,
|
|
30
32
|
b: number,
|
|
31
33
|
c: number,
|