mqtt5-wasm 0.2.1 → 0.2.3

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/mqtt5_wasm.d.ts CHANGED
@@ -92,6 +92,7 @@ export class WasmMqttClient {
92
92
  connect(url: string): Promise<void>;
93
93
  connect_with_options(url: string, config: WasmConnectOptions): Promise<void>;
94
94
  connect_message_port(port: MessagePort): Promise<void>;
95
+ connect_message_port_with_options(port: MessagePort, config: WasmConnectOptions): Promise<void>;
95
96
  connect_broadcast_channel(channel_name: string): Promise<void>;
96
97
  publish(topic: string, payload: Uint8Array): Promise<void>;
97
98
  publish_with_options(topic: string, payload: Uint8Array, options: WasmPublishOptions): Promise<void>;
@@ -219,6 +220,7 @@ export interface InitOutput {
219
220
  readonly wasmmqttclient_connect: (a: number, b: number, c: number) => any;
220
221
  readonly wasmmqttclient_connect_with_options: (a: number, b: number, c: number, d: number) => any;
221
222
  readonly wasmmqttclient_connect_message_port: (a: number, b: any) => any;
223
+ readonly wasmmqttclient_connect_message_port_with_options: (a: number, b: any, c: number) => any;
222
224
  readonly wasmmqttclient_connect_broadcast_channel: (a: number, b: number, c: number) => any;
223
225
  readonly wasmmqttclient_publish: (a: number, b: number, c: number, d: number, e: number) => any;
224
226
  readonly wasmmqttclient_publish_with_options: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
@@ -312,8 +314,8 @@ export interface InitOutput {
312
314
  readonly wasmwillmessage_set_messageExpiryInterval: (a: number, b: number) => void;
313
315
  readonly wasm_bindgen__convert__closures_____invoke__ha8b0b9fe7fac12a4: (a: number, b: number, c: any) => void;
314
316
  readonly wasm_bindgen__closure__destroy__h60ca8c1f3f61ef16: (a: number, b: number) => void;
315
- readonly wasm_bindgen__convert__closures_____invoke__h07efcda49d573328: (a: number, b: number, c: any) => void;
316
- readonly wasm_bindgen__closure__destroy__h2f92eaaa514835eb: (a: number, b: number) => void;
317
+ readonly wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd: (a: number, b: number, c: any) => void;
318
+ readonly wasm_bindgen__closure__destroy__h8e3161c754fbc99b: (a: number, b: number) => void;
317
319
  readonly wasm_bindgen__convert__closures_____invoke__hf8b807ed3211f368: (a: number, b: number) => void;
318
320
  readonly wasm_bindgen__closure__destroy__h41d50b86eff9c0fb: (a: number, b: number) => void;
319
321
  readonly wasm_bindgen__convert__closures_____invoke__h22971f3c49e1e8f1: (a: number, b: number, c: any, d: any) => void;
package/mqtt5_wasm.js CHANGED
@@ -242,8 +242,8 @@ function wasm_bindgen__convert__closures_____invoke__ha8b0b9fe7fac12a4(arg0, arg
242
242
  wasm.wasm_bindgen__convert__closures_____invoke__ha8b0b9fe7fac12a4(arg0, arg1, arg2);
243
243
  }
244
244
 
245
- function wasm_bindgen__convert__closures_____invoke__h07efcda49d573328(arg0, arg1, arg2) {
246
- wasm.wasm_bindgen__convert__closures_____invoke__h07efcda49d573328(arg0, arg1, arg2);
245
+ function wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd(arg0, arg1, arg2) {
246
+ wasm.wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd(arg0, arg1, arg2);
247
247
  }
248
248
 
249
249
  function wasm_bindgen__convert__closures_____invoke__hf8b807ed3211f368(arg0, arg1) {
@@ -886,6 +886,16 @@ export class WasmMqttClient {
886
886
  const ret = wasm.wasmmqttclient_connect_message_port(this.__wbg_ptr, port);
887
887
  return ret;
888
888
  }
889
+ /**
890
+ * @param {MessagePort} port
891
+ * @param {WasmConnectOptions} config
892
+ * @returns {Promise<void>}
893
+ */
894
+ connect_message_port_with_options(port, config) {
895
+ _assertClass(config, WasmConnectOptions);
896
+ const ret = wasm.wasmmqttclient_connect_message_port_with_options(this.__wbg_ptr, port, config.__wbg_ptr);
897
+ return ret;
898
+ }
889
899
  /**
890
900
  * @param {string} channel_name
891
901
  * @returns {Promise<void>}
@@ -1771,23 +1781,23 @@ function __wbg_get_imports() {
1771
1781
  const ret = getStringFromWasm0(arg0, arg1);
1772
1782
  return ret;
1773
1783
  };
1774
- imports.wbg.__wbindgen_cast_50587bdb51ef1517 = function(arg0, arg1) {
1775
- // Cast intrinsic for `Closure(Closure { dtor_idx: 264, function: Function { arguments: [Externref], shim_idx: 265, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1784
+ imports.wbg.__wbindgen_cast_7c91697a8c7f6a55 = function(arg0, arg1) {
1785
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 268, function: Function { arguments: [Externref], shim_idx: 269, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1776
1786
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h60ca8c1f3f61ef16, wasm_bindgen__convert__closures_____invoke__ha8b0b9fe7fac12a4);
1777
1787
  return ret;
1778
1788
  };
1779
1789
  imports.wbg.__wbindgen_cast_841ad4dc62ebec90 = function(arg0, arg1) {
1780
1790
  // Cast intrinsic for `Closure(Closure { dtor_idx: 2, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1781
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2f92eaaa514835eb, wasm_bindgen__convert__closures_____invoke__h07efcda49d573328);
1791
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8e3161c754fbc99b, wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd);
1782
1792
  return ret;
1783
1793
  };
1784
1794
  imports.wbg.__wbindgen_cast_9a4d11962b71bb1d = function(arg0, arg1) {
1785
1795
  // Cast intrinsic for `Closure(Closure { dtor_idx: 2, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1786
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2f92eaaa514835eb, wasm_bindgen__convert__closures_____invoke__h07efcda49d573328);
1796
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8e3161c754fbc99b, wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd);
1787
1797
  return ret;
1788
1798
  };
1789
- imports.wbg.__wbindgen_cast_cb324e6edc0859b7 = function(arg0, arg1) {
1790
- // Cast intrinsic for `Closure(Closure { dtor_idx: 253, function: Function { arguments: [], shim_idx: 254, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1799
+ imports.wbg.__wbindgen_cast_b03fa23b55c812ea = function(arg0, arg1) {
1800
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 257, function: Function { arguments: [], shim_idx: 258, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1791
1801
  const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h41d50b86eff9c0fb, wasm_bindgen__convert__closures_____invoke__hf8b807ed3211f368);
1792
1802
  return ret;
1793
1803
  };
@@ -1798,7 +1808,7 @@ function __wbg_get_imports() {
1798
1808
  };
1799
1809
  imports.wbg.__wbindgen_cast_eee2c0f90882ae61 = function(arg0, arg1) {
1800
1810
  // Cast intrinsic for `Closure(Closure { dtor_idx: 2, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1801
- const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2f92eaaa514835eb, wasm_bindgen__convert__closures_____invoke__h07efcda49d573328);
1811
+ const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h8e3161c754fbc99b, wasm_bindgen__convert__closures_____invoke__h0bd4b722235e32cd);
1802
1812
  return ret;
1803
1813
  };
1804
1814
  imports.wbg.__wbindgen_init_externref_table = function() {
Binary file
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "fabriciobracht <fabricio@bracht.dev>"
6
6
  ],
7
7
  "description": "MQTT v5.0 WebAssembly client and broker for browser environments",
8
- "version": "0.2.1",
8
+ "version": "0.2.3",
9
9
  "license": "MIT OR Apache-2.0",
10
10
  "repository": {
11
11
  "type": "git",