phirepass-channel 0.1.238 → 0.1.240
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/package.json +1 -1
- package/phirepass-channel.d.ts +8 -4
- package/phirepass-channel.js +62 -18
- package/phirepass-channel_bg.wasm +0 -0
package/package.json
CHANGED
package/phirepass-channel.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ export class Channel {
|
|
|
6
6
|
[Symbol.dispose](): void;
|
|
7
7
|
authenticate(token: string, node_id: string, msg_id?: number | null): void;
|
|
8
8
|
connect(): void;
|
|
9
|
+
disable_service(node_id: string, kind: string, host: string, port: number, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
9
10
|
disconnect(): void;
|
|
11
|
+
enable_service(node_id: string, kind: string, host: string, port: number, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
10
12
|
is_connected(): boolean;
|
|
11
13
|
is_disconnected(): boolean;
|
|
12
14
|
constructor(endpoint: string, node_id: string, server_id?: string | null);
|
|
@@ -51,7 +53,9 @@ export interface InitOutput {
|
|
|
51
53
|
readonly __wbg_channel_free: (a: number, b: number) => void;
|
|
52
54
|
readonly channel_authenticate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
53
55
|
readonly channel_connect: (a: number) => void;
|
|
56
|
+
readonly channel_disable_service: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
54
57
|
readonly channel_disconnect: (a: number) => void;
|
|
58
|
+
readonly channel_enable_service: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
55
59
|
readonly channel_is_connected: (a: number) => number;
|
|
56
60
|
readonly channel_is_disconnected: (a: number) => number;
|
|
57
61
|
readonly channel_new: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
@@ -73,10 +77,10 @@ export interface InitOutput {
|
|
|
73
77
|
readonly channel_start_heartbeat: (a: number, b: number) => void;
|
|
74
78
|
readonly channel_stop_heartbeat: (a: number) => void;
|
|
75
79
|
readonly version: (a: number) => void;
|
|
76
|
-
readonly
|
|
77
|
-
readonly
|
|
78
|
-
readonly
|
|
79
|
-
readonly
|
|
80
|
+
readonly __wasm_bindgen_func_elem_42: (a: number, b: number, c: number) => void;
|
|
81
|
+
readonly __wasm_bindgen_func_elem_42_1: (a: number, b: number, c: number) => void;
|
|
82
|
+
readonly __wasm_bindgen_func_elem_42_2: (a: number, b: number, c: number) => void;
|
|
83
|
+
readonly __wasm_bindgen_func_elem_40: (a: number, b: number) => void;
|
|
80
84
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
81
85
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
82
86
|
readonly __wbindgen_export3: (a: number) => void;
|
package/phirepass-channel.js
CHANGED
|
@@ -26,9 +26,53 @@ export class Channel {
|
|
|
26
26
|
connect() {
|
|
27
27
|
wasm.channel_connect(this.__wbg_ptr);
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* @param {string} node_id
|
|
31
|
+
* @param {string} kind
|
|
32
|
+
* @param {string} host
|
|
33
|
+
* @param {number} port
|
|
34
|
+
* @param {string | null} [username]
|
|
35
|
+
* @param {string | null} [password]
|
|
36
|
+
* @param {number | null} [msg_id]
|
|
37
|
+
*/
|
|
38
|
+
disable_service(node_id, kind, host, port, username, password, msg_id) {
|
|
39
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
40
|
+
const len0 = WASM_VECTOR_LEN;
|
|
41
|
+
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
42
|
+
const len1 = WASM_VECTOR_LEN;
|
|
43
|
+
const ptr2 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
44
|
+
const len2 = WASM_VECTOR_LEN;
|
|
45
|
+
var ptr3 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
46
|
+
var len3 = WASM_VECTOR_LEN;
|
|
47
|
+
var ptr4 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
48
|
+
var len4 = WASM_VECTOR_LEN;
|
|
49
|
+
wasm.channel_disable_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, port, ptr3, len3, ptr4, len4, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
50
|
+
}
|
|
29
51
|
disconnect() {
|
|
30
52
|
wasm.channel_disconnect(this.__wbg_ptr);
|
|
31
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* @param {string} node_id
|
|
56
|
+
* @param {string} kind
|
|
57
|
+
* @param {string} host
|
|
58
|
+
* @param {number} port
|
|
59
|
+
* @param {string | null} [username]
|
|
60
|
+
* @param {string | null} [password]
|
|
61
|
+
* @param {number | null} [msg_id]
|
|
62
|
+
*/
|
|
63
|
+
enable_service(node_id, kind, host, port, username, password, msg_id) {
|
|
64
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
65
|
+
const len0 = WASM_VECTOR_LEN;
|
|
66
|
+
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
67
|
+
const len1 = WASM_VECTOR_LEN;
|
|
68
|
+
const ptr2 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
69
|
+
const len2 = WASM_VECTOR_LEN;
|
|
70
|
+
var ptr3 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
71
|
+
var len3 = WASM_VECTOR_LEN;
|
|
72
|
+
var ptr4 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
73
|
+
var len4 = WASM_VECTOR_LEN;
|
|
74
|
+
wasm.channel_enable_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, port, ptr3, len3, ptr4, len4, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
75
|
+
}
|
|
32
76
|
/**
|
|
33
77
|
* @returns {boolean}
|
|
34
78
|
*/
|
|
@@ -344,7 +388,7 @@ function __wbg_get_imports() {
|
|
|
344
388
|
const ret = Array.from(getObject(arg0));
|
|
345
389
|
return addHeapObject(ret);
|
|
346
390
|
},
|
|
347
|
-
|
|
391
|
+
__wbg_info_8e9260b2f4e84021: function(arg0, arg1) {
|
|
348
392
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
349
393
|
},
|
|
350
394
|
__wbg_instanceof_ArrayBuffer_53db37b06f6b9afe: function(arg0) {
|
|
@@ -416,27 +460,27 @@ function __wbg_get_imports() {
|
|
|
416
460
|
__wbg_set_onopen_6f3fc5e2ad3144f1: function(arg0, arg1) {
|
|
417
461
|
getObject(arg0).onopen = getObject(arg1);
|
|
418
462
|
},
|
|
419
|
-
|
|
463
|
+
__wbg_warn_c05378286ffa64b8: function(arg0, arg1) {
|
|
420
464
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
421
465
|
},
|
|
422
466
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
423
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
424
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
467
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
468
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42);
|
|
425
469
|
return addHeapObject(ret);
|
|
426
470
|
},
|
|
427
471
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
428
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx:
|
|
429
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
472
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
473
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42_1);
|
|
430
474
|
return addHeapObject(ret);
|
|
431
475
|
},
|
|
432
476
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
433
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
434
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
477
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
478
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42_2);
|
|
435
479
|
return addHeapObject(ret);
|
|
436
480
|
},
|
|
437
481
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
438
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
439
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
482
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
483
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_40);
|
|
440
484
|
return addHeapObject(ret);
|
|
441
485
|
},
|
|
442
486
|
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
@@ -473,20 +517,20 @@ function __wbg_get_imports() {
|
|
|
473
517
|
};
|
|
474
518
|
}
|
|
475
519
|
|
|
476
|
-
function
|
|
477
|
-
wasm.
|
|
520
|
+
function __wasm_bindgen_func_elem_40(arg0, arg1) {
|
|
521
|
+
wasm.__wasm_bindgen_func_elem_40(arg0, arg1);
|
|
478
522
|
}
|
|
479
523
|
|
|
480
|
-
function
|
|
481
|
-
wasm.
|
|
524
|
+
function __wasm_bindgen_func_elem_42(arg0, arg1, arg2) {
|
|
525
|
+
wasm.__wasm_bindgen_func_elem_42(arg0, arg1, addHeapObject(arg2));
|
|
482
526
|
}
|
|
483
527
|
|
|
484
|
-
function
|
|
485
|
-
wasm.
|
|
528
|
+
function __wasm_bindgen_func_elem_42_1(arg0, arg1, arg2) {
|
|
529
|
+
wasm.__wasm_bindgen_func_elem_42_1(arg0, arg1, addHeapObject(arg2));
|
|
486
530
|
}
|
|
487
531
|
|
|
488
|
-
function
|
|
489
|
-
wasm.
|
|
532
|
+
function __wasm_bindgen_func_elem_42_2(arg0, arg1, arg2) {
|
|
533
|
+
wasm.__wasm_bindgen_func_elem_42_2(arg0, arg1, addHeapObject(arg2));
|
|
490
534
|
}
|
|
491
535
|
|
|
492
536
|
|
|
Binary file
|