@oxidezap/whatsapp-rust-bridge 0.23.0 → 0.23.1

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.
@@ -44,10 +44,9 @@ export interface JsTransportHandle {
44
44
 
45
45
  /**
46
46
  * Every Promise handed back to the bridge must settle, including on failure:
47
- * reject rather than leaving it pending. The bridge awaits it through a
48
- * wasm-bindgen `JsFuture`, whose resolve/reject pair is only released when the
49
- * promise settles, so a promise that never settles retains two JS handles for
50
- * the life of the process.
47
+ * reject rather than leaving it pending. The bridge awaits them through a
48
+ * wasm-bindgen `JsFuture`; an overlapping teardown cancels only the wait that
49
+ * would otherwise form a callback/teardown cycle.
51
50
  */
52
51
  export interface JsTransportCallbacks {
53
52
  connect(handle: JsTransportHandle): void | Promise<void>;
@@ -3768,6 +3767,13 @@ export class WasmWhatsAppClient {
3768
3767
  deleteQuickReply(id: string): Promise<void>;
3769
3768
  /**
3770
3769
  * Disconnect the client and flush pending state to storage.
3770
+ *
3771
+ * This is an explicit teardown barrier: the promise does not resolve until
3772
+ * the core has flushed persistence and the bridge-owned background tasks
3773
+ * have been stopped. The shared gate makes concurrent `disconnect()` and
3774
+ * `logout()` calls idempotent instead of entering the core teardown paths
3775
+ * together. If a host disconnect callback re-enters teardown, the callback
3776
+ * wait is cancelled so the two teardown operations cannot wait on each other.
3771
3777
  */
3772
3778
  disconnect(): Promise<void>;
3773
3779
  /**
@@ -5005,12 +5011,12 @@ export interface InitOutput {
5005
5011
  readonly intounderlyingsink_write: (a: number, b: number) => number;
5006
5012
  readonly intounderlyingsource_cancel: (a: number) => void;
5007
5013
  readonly intounderlyingsource_pull: (a: number, b: number) => number;
5008
- readonly __wasm_bindgen_func_elem_4671: (a: number, b: number, c: number) => void;
5009
- readonly __wasm_bindgen_func_elem_28645: (a: number, b: number, c: number, d: number) => void;
5010
- readonly __wasm_bindgen_func_elem_28647: (a: number, b: number, c: number, d: number) => void;
5011
- readonly __wasm_bindgen_func_elem_9915: (a: number, b: number, c: number) => void;
5012
- readonly __wasm_bindgen_func_elem_4670: (a: number, b: number, c: number) => void;
5013
- readonly __wasm_bindgen_func_elem_4669: (a: number, b: number) => void;
5014
+ readonly __wasm_bindgen_func_elem_4655: (a: number, b: number, c: number) => void;
5015
+ readonly __wasm_bindgen_func_elem_28615: (a: number, b: number, c: number, d: number) => void;
5016
+ readonly __wasm_bindgen_func_elem_28617: (a: number, b: number, c: number, d: number) => void;
5017
+ readonly __wasm_bindgen_func_elem_9885: (a: number, b: number, c: number) => void;
5018
+ readonly __wasm_bindgen_func_elem_4654: (a: number, b: number, c: number) => void;
5019
+ readonly __wasm_bindgen_func_elem_4653: (a: number, b: number) => void;
5014
5020
  readonly __wbindgen_export: (a: number, b: number) => number;
5015
5021
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
5016
5022
  readonly __wbindgen_export3: (a: number) => void;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxidezap/whatsapp-rust-bridge",
3
- "version": "0.23.0",
3
+ "version": "0.23.1",
4
4
  "description": "A high-performance utilities for WhatsApp, powered by Rust and WebAssembly.",
5
5
  "author": "João Lucas <jlucaso@hotmail.com>",
6
6
  "license": "MIT",