mqtt5-wasm 0.1.1 → 0.2.0
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/README.md +2 -1
- package/mqtt5_wasm.d.ts +50 -2
- package/mqtt5_wasm.js +210 -18
- package/mqtt5_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,6 +7,7 @@ MQTT v5.0 WebAssembly client and broker for browser environments.
|
|
|
7
7
|
- **WebSocket transport** - Connect to remote MQTT brokers
|
|
8
8
|
- **In-tab broker** - Run a complete MQTT broker in the browser
|
|
9
9
|
- **MessagePort/BroadcastChannel** - Inter-tab communication
|
|
10
|
+
- **Broker bridging** - Connect multiple in-browser brokers via MessagePort
|
|
10
11
|
- **Full QoS support** - QoS 0, 1, and 2
|
|
11
12
|
- **Automatic keepalive** - Connection health monitoring
|
|
12
13
|
|
|
@@ -22,7 +23,7 @@ npm install mqtt5-wasm
|
|
|
22
23
|
|
|
23
24
|
```toml
|
|
24
25
|
[dependencies]
|
|
25
|
-
mqtt5-wasm = "0.
|
|
26
|
+
mqtt5-wasm = "0.2"
|
|
26
27
|
```
|
|
27
28
|
|
|
28
29
|
Build with wasm-pack:
|
package/mqtt5_wasm.d.ts
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
export enum WasmBridgeDirection {
|
|
4
|
+
In = 0,
|
|
5
|
+
Out = 1,
|
|
6
|
+
Both = 2,
|
|
7
|
+
}
|
|
8
|
+
export class WasmBridgeConfig {
|
|
9
|
+
free(): void;
|
|
10
|
+
[Symbol.dispose](): void;
|
|
11
|
+
constructor(name: string);
|
|
12
|
+
add_topic(mapping: WasmTopicMapping): void;
|
|
13
|
+
validate(): void;
|
|
14
|
+
set client_id(value: string);
|
|
15
|
+
set clean_start(value: boolean);
|
|
16
|
+
set keep_alive_secs(value: number);
|
|
17
|
+
set username(value: string | null | undefined);
|
|
18
|
+
set password(value: string | null | undefined);
|
|
19
|
+
}
|
|
3
20
|
export class WasmBroker {
|
|
4
21
|
free(): void;
|
|
5
22
|
[Symbol.dispose](): void;
|
|
@@ -13,6 +30,10 @@ export class WasmBroker {
|
|
|
13
30
|
set_allow_anonymous(allow: boolean): void;
|
|
14
31
|
static hash_password(password: string): string;
|
|
15
32
|
create_client_port(): MessagePort;
|
|
33
|
+
add_bridge(config: WasmBridgeConfig, remote_port: MessagePort): Promise<void>;
|
|
34
|
+
remove_bridge(name: string): Promise<void>;
|
|
35
|
+
list_bridges(): string[];
|
|
36
|
+
stop_all_bridges(): Promise<void>;
|
|
16
37
|
}
|
|
17
38
|
export class WasmBrokerConfig {
|
|
18
39
|
free(): void;
|
|
@@ -113,6 +134,14 @@ export class WasmSubscribeOptions {
|
|
|
113
134
|
get subscriptionIdentifier(): number | undefined;
|
|
114
135
|
set subscriptionIdentifier(value: number | null | undefined);
|
|
115
136
|
}
|
|
137
|
+
export class WasmTopicMapping {
|
|
138
|
+
free(): void;
|
|
139
|
+
[Symbol.dispose](): void;
|
|
140
|
+
constructor(pattern: string, direction: WasmBridgeDirection);
|
|
141
|
+
set qos(value: number);
|
|
142
|
+
set local_prefix(value: string | null | undefined);
|
|
143
|
+
set remote_prefix(value: string | null | undefined);
|
|
144
|
+
}
|
|
116
145
|
export class WasmWillMessage {
|
|
117
146
|
free(): void;
|
|
118
147
|
[Symbol.dispose](): void;
|
|
@@ -134,6 +163,20 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
134
163
|
|
|
135
164
|
export interface InitOutput {
|
|
136
165
|
readonly memory: WebAssembly.Memory;
|
|
166
|
+
readonly __wbg_wasmtopicmapping_free: (a: number, b: number) => void;
|
|
167
|
+
readonly wasmtopicmapping_new: (a: number, b: number, c: number) => number;
|
|
168
|
+
readonly wasmtopicmapping_set_qos: (a: number, b: number) => void;
|
|
169
|
+
readonly wasmtopicmapping_set_local_prefix: (a: number, b: number, c: number) => void;
|
|
170
|
+
readonly wasmtopicmapping_set_remote_prefix: (a: number, b: number, c: number) => void;
|
|
171
|
+
readonly __wbg_wasmbridgeconfig_free: (a: number, b: number) => void;
|
|
172
|
+
readonly wasmbridgeconfig_new: (a: number, b: number) => number;
|
|
173
|
+
readonly wasmbridgeconfig_set_client_id: (a: number, b: number, c: number) => void;
|
|
174
|
+
readonly wasmbridgeconfig_set_clean_start: (a: number, b: number) => void;
|
|
175
|
+
readonly wasmbridgeconfig_set_keep_alive_secs: (a: number, b: number) => void;
|
|
176
|
+
readonly wasmbridgeconfig_set_username: (a: number, b: number, c: number) => void;
|
|
177
|
+
readonly wasmbridgeconfig_set_password: (a: number, b: number, c: number) => void;
|
|
178
|
+
readonly wasmbridgeconfig_add_topic: (a: number, b: number) => void;
|
|
179
|
+
readonly wasmbridgeconfig_validate: (a: number) => [number, number];
|
|
137
180
|
readonly __wbg_wasmbrokerconfig_free: (a: number, b: number) => void;
|
|
138
181
|
readonly wasmbrokerconfig_new: () => number;
|
|
139
182
|
readonly wasmbrokerconfig_set_max_clients: (a: number, b: number) => void;
|
|
@@ -157,6 +200,10 @@ export interface InitOutput {
|
|
|
157
200
|
readonly wasmbroker_set_allow_anonymous: (a: number, b: number) => void;
|
|
158
201
|
readonly wasmbroker_hash_password: (a: number, b: number) => [number, number, number, number];
|
|
159
202
|
readonly wasmbroker_create_client_port: (a: number) => [number, number, number];
|
|
203
|
+
readonly wasmbroker_add_bridge: (a: number, b: number, c: any) => any;
|
|
204
|
+
readonly wasmbroker_remove_bridge: (a: number, b: number, c: number) => any;
|
|
205
|
+
readonly wasmbroker_list_bridges: (a: number) => [number, number];
|
|
206
|
+
readonly wasmbroker_stop_all_bridges: (a: number) => any;
|
|
160
207
|
readonly __wbg_wasmmqttclient_free: (a: number, b: number) => void;
|
|
161
208
|
readonly wasmmqttclient_new: (a: number, b: number) => number;
|
|
162
209
|
readonly wasmmqttclient_connect: (a: number, b: number, c: number) => any;
|
|
@@ -253,10 +300,10 @@ export interface InitOutput {
|
|
|
253
300
|
readonly wasmwillmessage_willDelayInterval: (a: number) => number;
|
|
254
301
|
readonly wasmwillmessage_messageExpiryInterval: (a: number) => number;
|
|
255
302
|
readonly wasmwillmessage_set_messageExpiryInterval: (a: number, b: number) => void;
|
|
303
|
+
readonly wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333: (a: number, b: number, c: any) => void;
|
|
304
|
+
readonly wasm_bindgen__closure__destroy__h0abe416ead11a3f0: (a: number, b: number) => void;
|
|
256
305
|
readonly wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed: (a: number, b: number) => void;
|
|
257
306
|
readonly wasm_bindgen__closure__destroy__he3a6d52737a61d69: (a: number, b: number) => void;
|
|
258
|
-
readonly wasm_bindgen__convert__closures_____invoke__h510155d1f662caae: (a: number, b: number, c: any) => void;
|
|
259
|
-
readonly wasm_bindgen__closure__destroy__h17a33021d1dc0dec: (a: number, b: number) => void;
|
|
260
307
|
readonly wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0: (a: number, b: number, c: any) => void;
|
|
261
308
|
readonly wasm_bindgen__closure__destroy__h2a5cb8478cd1adb0: (a: number, b: number) => void;
|
|
262
309
|
readonly wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e: (a: number, b: number, c: any, d: any) => void;
|
|
@@ -267,6 +314,7 @@ export interface InitOutput {
|
|
|
267
314
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
268
315
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
269
316
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
317
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
270
318
|
readonly __wbindgen_start: () => void;
|
|
271
319
|
}
|
|
272
320
|
|
package/mqtt5_wasm.js
CHANGED
|
@@ -214,16 +214,27 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
214
214
|
return real;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
+
function _assertClass(instance, klass) {
|
|
218
|
+
if (!(instance instanceof klass)) {
|
|
219
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
217
223
|
function takeFromExternrefTable0(idx) {
|
|
218
224
|
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
219
225
|
wasm.__externref_table_dealloc(idx);
|
|
220
226
|
return value;
|
|
221
227
|
}
|
|
222
228
|
|
|
223
|
-
function
|
|
224
|
-
|
|
225
|
-
|
|
229
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
230
|
+
ptr = ptr >>> 0;
|
|
231
|
+
const mem = getDataViewMemory0();
|
|
232
|
+
const result = [];
|
|
233
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
234
|
+
result.push(wasm.__wbindgen_externrefs.get(mem.getUint32(i, true)));
|
|
226
235
|
}
|
|
236
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
237
|
+
return result;
|
|
227
238
|
}
|
|
228
239
|
|
|
229
240
|
function passArray8ToWasm0(arg, malloc) {
|
|
@@ -232,12 +243,12 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
232
243
|
WASM_VECTOR_LEN = arg.length;
|
|
233
244
|
return ptr;
|
|
234
245
|
}
|
|
235
|
-
function
|
|
236
|
-
wasm.
|
|
246
|
+
function wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333(arg0, arg1, arg2) {
|
|
247
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333(arg0, arg1, arg2);
|
|
237
248
|
}
|
|
238
249
|
|
|
239
|
-
function
|
|
240
|
-
wasm.
|
|
250
|
+
function wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed(arg0, arg1) {
|
|
251
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed(arg0, arg1);
|
|
241
252
|
}
|
|
242
253
|
|
|
243
254
|
function wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0(arg0, arg1, arg2) {
|
|
@@ -248,8 +259,98 @@ function wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e(arg0, arg
|
|
|
248
259
|
wasm.wasm_bindgen__convert__closures_____invoke__hbbb6f9316512cb4e(arg0, arg1, arg2, arg3);
|
|
249
260
|
}
|
|
250
261
|
|
|
262
|
+
/**
|
|
263
|
+
* @enum {0 | 1 | 2}
|
|
264
|
+
*/
|
|
265
|
+
export const WasmBridgeDirection = Object.freeze({
|
|
266
|
+
In: 0, "0": "In",
|
|
267
|
+
Out: 1, "1": "Out",
|
|
268
|
+
Both: 2, "2": "Both",
|
|
269
|
+
});
|
|
270
|
+
|
|
251
271
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
252
272
|
|
|
273
|
+
const WasmBridgeConfigFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
274
|
+
? { register: () => {}, unregister: () => {} }
|
|
275
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmbridgeconfig_free(ptr >>> 0, 1));
|
|
276
|
+
|
|
277
|
+
export class WasmBridgeConfig {
|
|
278
|
+
|
|
279
|
+
__destroy_into_raw() {
|
|
280
|
+
const ptr = this.__wbg_ptr;
|
|
281
|
+
this.__wbg_ptr = 0;
|
|
282
|
+
WasmBridgeConfigFinalization.unregister(this);
|
|
283
|
+
return ptr;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
free() {
|
|
287
|
+
const ptr = this.__destroy_into_raw();
|
|
288
|
+
wasm.__wbg_wasmbridgeconfig_free(ptr, 0);
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* @param {string} name
|
|
292
|
+
*/
|
|
293
|
+
constructor(name) {
|
|
294
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
295
|
+
const len0 = WASM_VECTOR_LEN;
|
|
296
|
+
const ret = wasm.wasmbridgeconfig_new(ptr0, len0);
|
|
297
|
+
this.__wbg_ptr = ret >>> 0;
|
|
298
|
+
WasmBridgeConfigFinalization.register(this, this.__wbg_ptr, this);
|
|
299
|
+
return this;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* @param {string} client_id
|
|
303
|
+
*/
|
|
304
|
+
set client_id(client_id) {
|
|
305
|
+
const ptr0 = passStringToWasm0(client_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
306
|
+
const len0 = WASM_VECTOR_LEN;
|
|
307
|
+
wasm.wasmbridgeconfig_set_client_id(this.__wbg_ptr, ptr0, len0);
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* @param {boolean} clean_start
|
|
311
|
+
*/
|
|
312
|
+
set clean_start(clean_start) {
|
|
313
|
+
wasm.wasmbridgeconfig_set_clean_start(this.__wbg_ptr, clean_start);
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* @param {number} secs
|
|
317
|
+
*/
|
|
318
|
+
set keep_alive_secs(secs) {
|
|
319
|
+
wasm.wasmbridgeconfig_set_keep_alive_secs(this.__wbg_ptr, secs);
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* @param {string | null} [username]
|
|
323
|
+
*/
|
|
324
|
+
set username(username) {
|
|
325
|
+
var ptr0 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
326
|
+
var len0 = WASM_VECTOR_LEN;
|
|
327
|
+
wasm.wasmbridgeconfig_set_username(this.__wbg_ptr, ptr0, len0);
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* @param {string | null} [password]
|
|
331
|
+
*/
|
|
332
|
+
set password(password) {
|
|
333
|
+
var ptr0 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
334
|
+
var len0 = WASM_VECTOR_LEN;
|
|
335
|
+
wasm.wasmbridgeconfig_set_password(this.__wbg_ptr, ptr0, len0);
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* @param {WasmTopicMapping} mapping
|
|
339
|
+
*/
|
|
340
|
+
add_topic(mapping) {
|
|
341
|
+
_assertClass(mapping, WasmTopicMapping);
|
|
342
|
+
var ptr0 = mapping.__destroy_into_raw();
|
|
343
|
+
wasm.wasmbridgeconfig_add_topic(this.__wbg_ptr, ptr0);
|
|
344
|
+
}
|
|
345
|
+
validate() {
|
|
346
|
+
const ret = wasm.wasmbridgeconfig_validate(this.__wbg_ptr);
|
|
347
|
+
if (ret[1]) {
|
|
348
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
if (Symbol.dispose) WasmBridgeConfig.prototype[Symbol.dispose] = WasmBridgeConfig.prototype.free;
|
|
353
|
+
|
|
253
354
|
const WasmBrokerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
254
355
|
? { register: () => {}, unregister: () => {} }
|
|
255
356
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmbroker_free(ptr >>> 0, 1));
|
|
@@ -390,6 +491,43 @@ export class WasmBroker {
|
|
|
390
491
|
}
|
|
391
492
|
return takeFromExternrefTable0(ret[0]);
|
|
392
493
|
}
|
|
494
|
+
/**
|
|
495
|
+
* @param {WasmBridgeConfig} config
|
|
496
|
+
* @param {MessagePort} remote_port
|
|
497
|
+
* @returns {Promise<void>}
|
|
498
|
+
*/
|
|
499
|
+
add_bridge(config, remote_port) {
|
|
500
|
+
_assertClass(config, WasmBridgeConfig);
|
|
501
|
+
var ptr0 = config.__destroy_into_raw();
|
|
502
|
+
const ret = wasm.wasmbroker_add_bridge(this.__wbg_ptr, ptr0, remote_port);
|
|
503
|
+
return ret;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* @param {string} name
|
|
507
|
+
* @returns {Promise<void>}
|
|
508
|
+
*/
|
|
509
|
+
remove_bridge(name) {
|
|
510
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
511
|
+
const len0 = WASM_VECTOR_LEN;
|
|
512
|
+
const ret = wasm.wasmbroker_remove_bridge(this.__wbg_ptr, ptr0, len0);
|
|
513
|
+
return ret;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* @returns {string[]}
|
|
517
|
+
*/
|
|
518
|
+
list_bridges() {
|
|
519
|
+
const ret = wasm.wasmbroker_list_bridges(this.__wbg_ptr);
|
|
520
|
+
var v1 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
521
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
522
|
+
return v1;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* @returns {Promise<void>}
|
|
526
|
+
*/
|
|
527
|
+
stop_all_bridges() {
|
|
528
|
+
const ret = wasm.wasmbroker_stop_all_bridges(this.__wbg_ptr);
|
|
529
|
+
return ret;
|
|
530
|
+
}
|
|
393
531
|
}
|
|
394
532
|
if (Symbol.dispose) WasmBroker.prototype[Symbol.dispose] = WasmBroker.prototype.free;
|
|
395
533
|
|
|
@@ -1153,6 +1291,60 @@ export class WasmSubscribeOptions {
|
|
|
1153
1291
|
}
|
|
1154
1292
|
if (Symbol.dispose) WasmSubscribeOptions.prototype[Symbol.dispose] = WasmSubscribeOptions.prototype.free;
|
|
1155
1293
|
|
|
1294
|
+
const WasmTopicMappingFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1295
|
+
? { register: () => {}, unregister: () => {} }
|
|
1296
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmtopicmapping_free(ptr >>> 0, 1));
|
|
1297
|
+
|
|
1298
|
+
export class WasmTopicMapping {
|
|
1299
|
+
|
|
1300
|
+
__destroy_into_raw() {
|
|
1301
|
+
const ptr = this.__wbg_ptr;
|
|
1302
|
+
this.__wbg_ptr = 0;
|
|
1303
|
+
WasmTopicMappingFinalization.unregister(this);
|
|
1304
|
+
return ptr;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
free() {
|
|
1308
|
+
const ptr = this.__destroy_into_raw();
|
|
1309
|
+
wasm.__wbg_wasmtopicmapping_free(ptr, 0);
|
|
1310
|
+
}
|
|
1311
|
+
/**
|
|
1312
|
+
* @param {string} pattern
|
|
1313
|
+
* @param {WasmBridgeDirection} direction
|
|
1314
|
+
*/
|
|
1315
|
+
constructor(pattern, direction) {
|
|
1316
|
+
const ptr0 = passStringToWasm0(pattern, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1317
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1318
|
+
const ret = wasm.wasmtopicmapping_new(ptr0, len0, direction);
|
|
1319
|
+
this.__wbg_ptr = ret >>> 0;
|
|
1320
|
+
WasmTopicMappingFinalization.register(this, this.__wbg_ptr, this);
|
|
1321
|
+
return this;
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* @param {number} qos
|
|
1325
|
+
*/
|
|
1326
|
+
set qos(qos) {
|
|
1327
|
+
wasm.wasmtopicmapping_set_qos(this.__wbg_ptr, qos);
|
|
1328
|
+
}
|
|
1329
|
+
/**
|
|
1330
|
+
* @param {string | null} [prefix]
|
|
1331
|
+
*/
|
|
1332
|
+
set local_prefix(prefix) {
|
|
1333
|
+
var ptr0 = isLikeNone(prefix) ? 0 : passStringToWasm0(prefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1334
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1335
|
+
wasm.wasmtopicmapping_set_local_prefix(this.__wbg_ptr, ptr0, len0);
|
|
1336
|
+
}
|
|
1337
|
+
/**
|
|
1338
|
+
* @param {string | null} [prefix]
|
|
1339
|
+
*/
|
|
1340
|
+
set remote_prefix(prefix) {
|
|
1341
|
+
var ptr0 = isLikeNone(prefix) ? 0 : passStringToWasm0(prefix, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1342
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1343
|
+
wasm.wasmtopicmapping_set_remote_prefix(this.__wbg_ptr, ptr0, len0);
|
|
1344
|
+
}
|
|
1345
|
+
}
|
|
1346
|
+
if (Symbol.dispose) WasmTopicMapping.prototype[Symbol.dispose] = WasmTopicMapping.prototype.free;
|
|
1347
|
+
|
|
1156
1348
|
const WasmWillMessageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1157
1349
|
? { register: () => {}, unregister: () => {} }
|
|
1158
1350
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmwillmessage_free(ptr >>> 0, 1));
|
|
@@ -1601,29 +1793,29 @@ function __wbg_get_imports() {
|
|
|
1601
1793
|
imports.wbg.__wbg_warn_1d74dddbe2fd1dbb = function(arg0) {
|
|
1602
1794
|
console.warn(arg0);
|
|
1603
1795
|
};
|
|
1604
|
-
imports.wbg.__wbindgen_cast_185aa6d69e66b753 = function(arg0, arg1) {
|
|
1605
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 223, function: Function { arguments: [], shim_idx: 224, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1606
|
-
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he3a6d52737a61d69, wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed);
|
|
1607
|
-
return ret;
|
|
1608
|
-
};
|
|
1609
1796
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
1610
1797
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1611
1798
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1612
1799
|
return ret;
|
|
1613
1800
|
};
|
|
1801
|
+
imports.wbg.__wbindgen_cast_363ab6ba52868a22 = function(arg0, arg1) {
|
|
1802
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 256, function: Function { arguments: [Externref], shim_idx: 257, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1803
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h2a5cb8478cd1adb0, wasm_bindgen__convert__closures_____invoke__hacd56641ea4358f0);
|
|
1804
|
+
return ret;
|
|
1805
|
+
};
|
|
1614
1806
|
imports.wbg.__wbindgen_cast_841ad4dc62ebec90 = function(arg0, arg1) {
|
|
1615
1807
|
// 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`.
|
|
1616
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1808
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0abe416ead11a3f0, wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333);
|
|
1617
1809
|
return ret;
|
|
1618
1810
|
};
|
|
1619
1811
|
imports.wbg.__wbindgen_cast_9a4d11962b71bb1d = function(arg0, arg1) {
|
|
1620
1812
|
// 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`.
|
|
1621
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1813
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0abe416ead11a3f0, wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333);
|
|
1622
1814
|
return ret;
|
|
1623
1815
|
};
|
|
1624
|
-
imports.wbg.
|
|
1625
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
1626
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1816
|
+
imports.wbg.__wbindgen_cast_b695ade0c3644c70 = function(arg0, arg1) {
|
|
1817
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 245, function: Function { arguments: [], shim_idx: 246, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1818
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he3a6d52737a61d69, wasm_bindgen__convert__closures_____invoke__h4c33ce4d986075ed);
|
|
1627
1819
|
return ret;
|
|
1628
1820
|
};
|
|
1629
1821
|
imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
|
|
@@ -1633,7 +1825,7 @@ function __wbg_get_imports() {
|
|
|
1633
1825
|
};
|
|
1634
1826
|
imports.wbg.__wbindgen_cast_eee2c0f90882ae61 = function(arg0, arg1) {
|
|
1635
1827
|
// 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`.
|
|
1636
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
1828
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h0abe416ead11a3f0, wasm_bindgen__convert__closures_____invoke__h6191f7aa5ff34333);
|
|
1637
1829
|
return ret;
|
|
1638
1830
|
};
|
|
1639
1831
|
imports.wbg.__wbindgen_init_externref_table = function() {
|
package/mqtt5_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED