@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,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);
|
|
@@ -228,7 +225,7 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
228
225
|
return real;
|
|
229
226
|
}
|
|
230
227
|
function __wbg_adapter_38(arg0, arg1, arg2) {
|
|
231
|
-
wasm.
|
|
228
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hec6c9a85ed863308(
|
|
232
229
|
arg0,
|
|
233
230
|
arg1,
|
|
234
231
|
addHeapObject(arg2),
|
|
@@ -242,8 +239,8 @@ function handleError(f, args) {
|
|
|
242
239
|
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
243
240
|
}
|
|
244
241
|
}
|
|
245
|
-
function
|
|
246
|
-
wasm.
|
|
242
|
+
function __wbg_adapter_100(arg0, arg1, arg2, arg3) {
|
|
243
|
+
wasm.wasm_bindgen__convert__closures__invoke2_mut__h29c3505e35b3c82d(
|
|
247
244
|
arg0,
|
|
248
245
|
arg1,
|
|
249
246
|
addHeapObject(arg2),
|
|
@@ -321,6 +318,43 @@ class BitwardenClient {
|
|
|
321
318
|
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
322
319
|
}
|
|
323
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* @returns {string}
|
|
323
|
+
*/
|
|
324
|
+
version() {
|
|
325
|
+
let deferred1_0;
|
|
326
|
+
let deferred1_1;
|
|
327
|
+
try {
|
|
328
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
329
|
+
wasm.bitwardenclient_version(retptr, this.__wbg_ptr);
|
|
330
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
331
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
332
|
+
deferred1_0 = r0;
|
|
333
|
+
deferred1_1 = r1;
|
|
334
|
+
return getStringFromWasm0(r0, r1);
|
|
335
|
+
} finally {
|
|
336
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
337
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* @param {string} msg
|
|
342
|
+
*/
|
|
343
|
+
throw(msg) {
|
|
344
|
+
try {
|
|
345
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
346
|
+
const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
347
|
+
const len0 = WASM_VECTOR_LEN;
|
|
348
|
+
wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
|
|
349
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
350
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
351
|
+
if (r1) {
|
|
352
|
+
throw takeObject(r0);
|
|
353
|
+
}
|
|
354
|
+
} finally {
|
|
355
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
324
358
|
/**
|
|
325
359
|
* Test method, calls http endpoint
|
|
326
360
|
* @param {string} url
|
|
@@ -551,13 +585,30 @@ module.exports.__wbindgen_object_clone_ref = function (arg0) {
|
|
|
551
585
|
return addHeapObject(ret);
|
|
552
586
|
};
|
|
553
587
|
|
|
554
|
-
module.exports.
|
|
588
|
+
module.exports.__wbg_next_b06e115d1b01e10b = function () {
|
|
589
|
+
return handleError(function (arg0) {
|
|
590
|
+
const ret = getObject(arg0).next();
|
|
591
|
+
return addHeapObject(ret);
|
|
592
|
+
}, arguments);
|
|
593
|
+
};
|
|
594
|
+
|
|
595
|
+
module.exports.__wbg_done_983b5ffcaec8c583 = function (arg0) {
|
|
596
|
+
const ret = getObject(arg0).done;
|
|
597
|
+
return ret;
|
|
598
|
+
};
|
|
599
|
+
|
|
600
|
+
module.exports.__wbg_value_2ab8a198c834c26a = function (arg0) {
|
|
601
|
+
const ret = getObject(arg0).value;
|
|
602
|
+
return addHeapObject(ret);
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
module.exports.__wbg_new_97e630adfc58d1e5 = function (arg0, arg1) {
|
|
555
606
|
let deferred0_0;
|
|
556
607
|
let deferred0_1;
|
|
557
608
|
try {
|
|
558
609
|
deferred0_0 = arg0;
|
|
559
610
|
deferred0_1 = arg1;
|
|
560
|
-
const ret = new
|
|
611
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
561
612
|
return addHeapObject(ret);
|
|
562
613
|
} finally {
|
|
563
614
|
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
@@ -647,23 +698,6 @@ module.exports.__wbg_headers_1b9bf90c73fae600 = function (arg0) {
|
|
|
647
698
|
return addHeapObject(ret);
|
|
648
699
|
};
|
|
649
700
|
|
|
650
|
-
module.exports.__wbg_next_b06e115d1b01e10b = function () {
|
|
651
|
-
return handleError(function (arg0) {
|
|
652
|
-
const ret = getObject(arg0).next();
|
|
653
|
-
return addHeapObject(ret);
|
|
654
|
-
}, arguments);
|
|
655
|
-
};
|
|
656
|
-
|
|
657
|
-
module.exports.__wbg_done_983b5ffcaec8c583 = function (arg0) {
|
|
658
|
-
const ret = getObject(arg0).done;
|
|
659
|
-
return ret;
|
|
660
|
-
};
|
|
661
|
-
|
|
662
|
-
module.exports.__wbg_value_2ab8a198c834c26a = function (arg0) {
|
|
663
|
-
const ret = getObject(arg0).value;
|
|
664
|
-
return addHeapObject(ret);
|
|
665
|
-
};
|
|
666
|
-
|
|
667
701
|
module.exports.__wbg_stringify_eead5648c09faaf8 = function () {
|
|
668
702
|
return handleError(function (arg0) {
|
|
669
703
|
const ret = JSON.stringify(getObject(arg0));
|
|
@@ -714,7 +748,7 @@ module.exports.__wbg_new_1073970097e5a420 = function (arg0, arg1) {
|
|
|
714
748
|
const a = state0.a;
|
|
715
749
|
state0.a = 0;
|
|
716
750
|
try {
|
|
717
|
-
return
|
|
751
|
+
return __wbg_adapter_100(a, state0.b, arg0, arg1);
|
|
718
752
|
} finally {
|
|
719
753
|
state0.a = a;
|
|
720
754
|
}
|
|
@@ -1031,7 +1065,7 @@ module.exports.__wbg_warn_2e2787d40aad9a81 = function (arg0, arg1, arg2, arg3) {
|
|
|
1031
1065
|
console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
|
|
1032
1066
|
};
|
|
1033
1067
|
|
|
1034
|
-
module.exports.
|
|
1068
|
+
module.exports.__wbindgen_closure_wrapper1610 = function (arg0, arg1, arg2) {
|
|
1035
1069
|
const ret = makeMutClosure(arg0, arg1, 425, __wbg_adapter_38);
|
|
1036
1070
|
return addHeapObject(ret);
|
|
1037
1071
|
};
|
|
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,
|