phirepass-channel 0.1.277 → 0.1.279
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 +10 -8
- package/phirepass-channel.js +74 -44
- package/phirepass-channel_bg.wasm +0 -0
package/package.json
CHANGED
package/phirepass-channel.d.ts
CHANGED
|
@@ -6,9 +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
|
-
|
|
9
|
+
create_service(node_id: string, kind: string, name: string | null | undefined, host: string, port: number, username?: string | null, password?: string | null, visibility?: string | null, scheme?: string | null, msg_id?: number | null): void;
|
|
10
|
+
delete_service(node_id: string, id: string, msg_id?: number | null): void;
|
|
10
11
|
disconnect(): void;
|
|
11
|
-
enable_service(node_id: string, kind: string, host: string, port: number, username?: string | null, password?: string | null, visibility?: string | null, scheme?: string | null, msg_id?: number | null): void;
|
|
12
12
|
is_connected(): boolean;
|
|
13
13
|
is_disconnected(): boolean;
|
|
14
14
|
constructor(endpoint: string, node_id: string, server_id?: string | null);
|
|
@@ -36,6 +36,7 @@ export class Channel {
|
|
|
36
36
|
send_ssh_tunnel_data(node_id: string, sid: number, data: string): void;
|
|
37
37
|
start_heartbeat(interval_as_millis: number): void;
|
|
38
38
|
stop_heartbeat(): void;
|
|
39
|
+
update_service(node_id: string, id: string, kind: string, name: string | null | undefined, host: string, port: number, username?: string | null, password?: string | null, visibility?: string | null, scheme?: string | null, msg_id?: number | null): void;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
export enum ErrorType {
|
|
@@ -60,9 +61,9 @@ export interface InitOutput {
|
|
|
60
61
|
readonly __wbg_channel_free: (a: number, b: number) => void;
|
|
61
62
|
readonly channel_authenticate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
62
63
|
readonly channel_connect: (a: number) => void;
|
|
63
|
-
readonly
|
|
64
|
+
readonly channel_create_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, n: number, o: number, p: number, q: number, r: number, s: number) => void;
|
|
65
|
+
readonly channel_delete_service: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
64
66
|
readonly channel_disconnect: (a: number) => void;
|
|
65
|
-
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, n: number, o: number, p: number, q: number) => void;
|
|
66
67
|
readonly channel_is_connected: (a: number) => number;
|
|
67
68
|
readonly channel_is_disconnected: (a: number) => number;
|
|
68
69
|
readonly channel_new: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
@@ -85,11 +86,12 @@ export interface InitOutput {
|
|
|
85
86
|
readonly channel_send_ssh_tunnel_data: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
86
87
|
readonly channel_start_heartbeat: (a: number, b: number) => void;
|
|
87
88
|
readonly channel_stop_heartbeat: (a: number) => void;
|
|
89
|
+
readonly channel_update_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, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number) => void;
|
|
88
90
|
readonly version: (a: number) => void;
|
|
89
|
-
readonly
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
92
|
-
readonly
|
|
91
|
+
readonly __wasm_bindgen_func_elem_43: (a: number, b: number, c: number) => void;
|
|
92
|
+
readonly __wasm_bindgen_func_elem_43_1: (a: number, b: number, c: number) => void;
|
|
93
|
+
readonly __wasm_bindgen_func_elem_43_2: (a: number, b: number, c: number) => void;
|
|
94
|
+
readonly __wasm_bindgen_func_elem_45: (a: number, b: number) => void;
|
|
93
95
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
94
96
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
95
97
|
readonly __wbindgen_export3: (a: number) => void;
|
package/phirepass-channel.js
CHANGED
|
@@ -29,55 +29,48 @@ export class Channel {
|
|
|
29
29
|
/**
|
|
30
30
|
* @param {string} node_id
|
|
31
31
|
* @param {string} kind
|
|
32
|
+
* @param {string | null | undefined} name
|
|
32
33
|
* @param {string} host
|
|
33
34
|
* @param {number} port
|
|
34
35
|
* @param {string | null} [username]
|
|
35
36
|
* @param {string | null} [password]
|
|
37
|
+
* @param {string | null} [visibility]
|
|
38
|
+
* @param {string | null} [scheme]
|
|
36
39
|
* @param {number | null} [msg_id]
|
|
37
40
|
*/
|
|
38
|
-
|
|
41
|
+
create_service(node_id, kind, name, host, port, username, password, visibility, scheme, msg_id) {
|
|
39
42
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
40
43
|
const len0 = WASM_VECTOR_LEN;
|
|
41
44
|
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
42
45
|
const len1 = WASM_VECTOR_LEN;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
var ptr4 = isLikeNone(
|
|
46
|
+
var ptr2 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
47
|
+
var len2 = WASM_VECTOR_LEN;
|
|
48
|
+
const ptr3 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
49
|
+
const len3 = WASM_VECTOR_LEN;
|
|
50
|
+
var ptr4 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
48
51
|
var len4 = WASM_VECTOR_LEN;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
var ptr5 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
53
|
+
var len5 = WASM_VECTOR_LEN;
|
|
54
|
+
var ptr6 = isLikeNone(visibility) ? 0 : passStringToWasm0(visibility, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
55
|
+
var len6 = WASM_VECTOR_LEN;
|
|
56
|
+
var ptr7 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
57
|
+
var len7 = WASM_VECTOR_LEN;
|
|
58
|
+
wasm.channel_create_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, port, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
53
59
|
}
|
|
54
60
|
/**
|
|
55
61
|
* @param {string} node_id
|
|
56
|
-
* @param {string}
|
|
57
|
-
* @param {string} host
|
|
58
|
-
* @param {number} port
|
|
59
|
-
* @param {string | null} [username]
|
|
60
|
-
* @param {string | null} [password]
|
|
61
|
-
* @param {string | null} [visibility]
|
|
62
|
-
* @param {string | null} [scheme]
|
|
62
|
+
* @param {string} id
|
|
63
63
|
* @param {number | null} [msg_id]
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
delete_service(node_id, id, msg_id) {
|
|
66
66
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
67
67
|
const len0 = WASM_VECTOR_LEN;
|
|
68
|
-
const ptr1 = passStringToWasm0(
|
|
68
|
+
const ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
69
69
|
const len1 = WASM_VECTOR_LEN;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var ptr4 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
75
|
-
var len4 = WASM_VECTOR_LEN;
|
|
76
|
-
var ptr5 = isLikeNone(visibility) ? 0 : passStringToWasm0(visibility, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
77
|
-
var len5 = WASM_VECTOR_LEN;
|
|
78
|
-
var ptr6 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
79
|
-
var len6 = WASM_VECTOR_LEN;
|
|
80
|
-
wasm.channel_enable_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, port, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
70
|
+
wasm.channel_delete_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
71
|
+
}
|
|
72
|
+
disconnect() {
|
|
73
|
+
wasm.channel_disconnect(this.__wbg_ptr);
|
|
81
74
|
}
|
|
82
75
|
/**
|
|
83
76
|
* @returns {boolean}
|
|
@@ -318,6 +311,40 @@ export class Channel {
|
|
|
318
311
|
stop_heartbeat() {
|
|
319
312
|
wasm.channel_stop_heartbeat(this.__wbg_ptr);
|
|
320
313
|
}
|
|
314
|
+
/**
|
|
315
|
+
* @param {string} node_id
|
|
316
|
+
* @param {string} id
|
|
317
|
+
* @param {string} kind
|
|
318
|
+
* @param {string | null | undefined} name
|
|
319
|
+
* @param {string} host
|
|
320
|
+
* @param {number} port
|
|
321
|
+
* @param {string | null} [username]
|
|
322
|
+
* @param {string | null} [password]
|
|
323
|
+
* @param {string | null} [visibility]
|
|
324
|
+
* @param {string | null} [scheme]
|
|
325
|
+
* @param {number | null} [msg_id]
|
|
326
|
+
*/
|
|
327
|
+
update_service(node_id, id, kind, name, host, port, username, password, visibility, scheme, msg_id) {
|
|
328
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
329
|
+
const len0 = WASM_VECTOR_LEN;
|
|
330
|
+
const ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
331
|
+
const len1 = WASM_VECTOR_LEN;
|
|
332
|
+
const ptr2 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
333
|
+
const len2 = WASM_VECTOR_LEN;
|
|
334
|
+
var ptr3 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
335
|
+
var len3 = WASM_VECTOR_LEN;
|
|
336
|
+
const ptr4 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
337
|
+
const len4 = WASM_VECTOR_LEN;
|
|
338
|
+
var ptr5 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
339
|
+
var len5 = WASM_VECTOR_LEN;
|
|
340
|
+
var ptr6 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
341
|
+
var len6 = WASM_VECTOR_LEN;
|
|
342
|
+
var ptr7 = isLikeNone(visibility) ? 0 : passStringToWasm0(visibility, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
343
|
+
var len7 = WASM_VECTOR_LEN;
|
|
344
|
+
var ptr8 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
345
|
+
var len8 = WASM_VECTOR_LEN;
|
|
346
|
+
wasm.channel_update_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, port, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
347
|
+
}
|
|
321
348
|
}
|
|
322
349
|
if (Symbol.dispose) Channel.prototype[Symbol.dispose] = Channel.prototype.free;
|
|
323
350
|
|
|
@@ -421,11 +448,14 @@ function __wbg_get_imports() {
|
|
|
421
448
|
const ret = Array.from(getObject(arg0));
|
|
422
449
|
return addHeapObject(ret);
|
|
423
450
|
},
|
|
451
|
+
__wbg_getRandomValues_a697888e9ba1eee3: function() { return handleError(function (arg0, arg1) {
|
|
452
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
453
|
+
}, arguments); },
|
|
424
454
|
__wbg_get_dddb90ff5d27a080: function() { return handleError(function (arg0, arg1) {
|
|
425
455
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
426
456
|
return addHeapObject(ret);
|
|
427
457
|
}, arguments); },
|
|
428
|
-
|
|
458
|
+
__wbg_info_ab46ef99b3cad323: function(arg0, arg1) {
|
|
429
459
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
430
460
|
},
|
|
431
461
|
__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
|
|
@@ -497,27 +527,27 @@ function __wbg_get_imports() {
|
|
|
497
527
|
__wbg_set_onopen_ca8d311fe5282041: function(arg0, arg1) {
|
|
498
528
|
getObject(arg0).onopen = getObject(arg1);
|
|
499
529
|
},
|
|
500
|
-
|
|
530
|
+
__wbg_warn_badc1c53b8d95dbd: function(arg0, arg1) {
|
|
501
531
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
502
532
|
},
|
|
503
533
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
504
534
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
505
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
535
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43);
|
|
506
536
|
return addHeapObject(ret);
|
|
507
537
|
},
|
|
508
538
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
509
539
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
510
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
540
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43_1);
|
|
511
541
|
return addHeapObject(ret);
|
|
512
542
|
},
|
|
513
543
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
514
544
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
515
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
545
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43_2);
|
|
516
546
|
return addHeapObject(ret);
|
|
517
547
|
},
|
|
518
548
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
519
549
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
520
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
550
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_45);
|
|
521
551
|
return addHeapObject(ret);
|
|
522
552
|
},
|
|
523
553
|
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
@@ -554,20 +584,20 @@ function __wbg_get_imports() {
|
|
|
554
584
|
};
|
|
555
585
|
}
|
|
556
586
|
|
|
557
|
-
function
|
|
558
|
-
wasm.
|
|
587
|
+
function __wasm_bindgen_func_elem_45(arg0, arg1) {
|
|
588
|
+
wasm.__wasm_bindgen_func_elem_45(arg0, arg1);
|
|
559
589
|
}
|
|
560
590
|
|
|
561
|
-
function
|
|
562
|
-
wasm.
|
|
591
|
+
function __wasm_bindgen_func_elem_43(arg0, arg1, arg2) {
|
|
592
|
+
wasm.__wasm_bindgen_func_elem_43(arg0, arg1, addHeapObject(arg2));
|
|
563
593
|
}
|
|
564
594
|
|
|
565
|
-
function
|
|
566
|
-
wasm.
|
|
595
|
+
function __wasm_bindgen_func_elem_43_1(arg0, arg1, arg2) {
|
|
596
|
+
wasm.__wasm_bindgen_func_elem_43_1(arg0, arg1, addHeapObject(arg2));
|
|
567
597
|
}
|
|
568
598
|
|
|
569
|
-
function
|
|
570
|
-
wasm.
|
|
599
|
+
function __wasm_bindgen_func_elem_43_2(arg0, arg1, arg2) {
|
|
600
|
+
wasm.__wasm_bindgen_func_elem_43_2(arg0, arg1, addHeapObject(arg2));
|
|
571
601
|
}
|
|
572
602
|
|
|
573
603
|
|
|
Binary file
|