@bitwarden/sdk-internal 0.2.0-main.42 → 0.2.0-main.43

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.
@@ -258,7 +258,7 @@ export class BitwardenClient {
258
258
  */
259
259
  echo(msg: string): string;
260
260
  version(): string;
261
- throw(msg: string): Promise<void>;
261
+ throw(msg: string): void;
262
262
  /**
263
263
  * Test method, calls http endpoint
264
264
  */
@@ -423,13 +423,21 @@ class BitwardenClient {
423
423
  }
424
424
  /**
425
425
  * @param {string} msg
426
- * @returns {Promise<void>}
427
426
  */
428
427
  throw(msg) {
429
- const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
430
- const len0 = WASM_VECTOR_LEN;
431
- const ret = wasm.bitwardenclient_throw(this.__wbg_ptr, ptr0, len0);
432
- return takeObject(ret);
428
+ try {
429
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
430
+ const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
431
+ const len0 = WASM_VECTOR_LEN;
432
+ wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
433
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
434
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
435
+ if (r1) {
436
+ throw takeObject(r0);
437
+ }
438
+ } finally {
439
+ wasm.__wbindgen_add_to_stack_pointer(16);
440
+ }
433
441
  }
434
442
  /**
435
443
  * Test method, calls http endpoint
@@ -1171,8 +1179,8 @@ module.exports.__wbindgen_cb_drop = function (arg0) {
1171
1179
  return ret;
1172
1180
  };
1173
1181
 
1174
- module.exports.__wbindgen_closure_wrapper1933 = function (arg0, arg1, arg2) {
1175
- const ret = makeMutClosure(arg0, arg1, 549, __wbg_adapter_38);
1182
+ module.exports.__wbindgen_closure_wrapper1929 = function (arg0, arg1, arg2) {
1183
+ const ret = makeMutClosure(arg0, arg1, 545, __wbg_adapter_38);
1176
1184
  return addHeapObject(ret);
1177
1185
  };
1178
1186
 
@@ -8,7 +8,7 @@ export const __wbg_bitwardenclient_free: (a: number, b: number) => void;
8
8
  export const bitwardenclient_new: (a: number, b: number) => number;
9
9
  export const bitwardenclient_echo: (a: number, b: number, c: number, d: number) => void;
10
10
  export const bitwardenclient_version: (a: number, b: number) => void;
11
- export const bitwardenclient_throw: (a: number, b: number, c: number) => number;
11
+ export const bitwardenclient_throw: (a: number, b: number, c: number, d: number) => void;
12
12
  export const bitwardenclient_http_get: (a: number, b: number, c: number) => number;
13
13
  export const bitwardenclient_crypto: (a: number) => number;
14
14
  export const isTestError: (a: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitwarden/sdk-internal",
3
- "version": "0.2.0-main.42",
3
+ "version": "0.2.0-main.43",
4
4
  "license": "GPL-3.0",
5
5
  "files": [
6
6
  "bitwarden_wasm_internal_bg.js",