phirepass-channel 0.1.276 → 0.1.278
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 +6 -4
- package/phirepass-channel.js +43 -15
- 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, 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, kind: string, host: string, port: number, username?: string | null, password?: string | null, 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, kind: string, 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) => void;
|
|
65
|
+
readonly channel_delete_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;
|
|
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,6 +86,7 @@ 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) => void;
|
|
88
90
|
readonly version: (a: number) => void;
|
|
89
91
|
readonly __wasm_bindgen_func_elem_42: (a: number, b: number, c: number) => void;
|
|
90
92
|
readonly __wasm_bindgen_func_elem_42_1: (a: number, b: number, c: number) => void;
|
package/phirepass-channel.js
CHANGED
|
@@ -33,9 +33,11 @@ export class Channel {
|
|
|
33
33
|
* @param {number} port
|
|
34
34
|
* @param {string | null} [username]
|
|
35
35
|
* @param {string | null} [password]
|
|
36
|
+
* @param {string | null} [visibility]
|
|
37
|
+
* @param {string | null} [scheme]
|
|
36
38
|
* @param {number | null} [msg_id]
|
|
37
39
|
*/
|
|
38
|
-
|
|
40
|
+
create_service(node_id, kind, host, port, username, password, visibility, scheme, msg_id) {
|
|
39
41
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
40
42
|
const len0 = WASM_VECTOR_LEN;
|
|
41
43
|
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -46,10 +48,11 @@ export class Channel {
|
|
|
46
48
|
var len3 = WASM_VECTOR_LEN;
|
|
47
49
|
var ptr4 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
48
50
|
var len4 = WASM_VECTOR_LEN;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
var ptr5 = isLikeNone(visibility) ? 0 : passStringToWasm0(visibility, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
52
|
+
var len5 = WASM_VECTOR_LEN;
|
|
53
|
+
var ptr6 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
54
|
+
var len6 = WASM_VECTOR_LEN;
|
|
55
|
+
wasm.channel_create_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);
|
|
53
56
|
}
|
|
54
57
|
/**
|
|
55
58
|
* @param {string} node_id
|
|
@@ -58,11 +61,9 @@ export class Channel {
|
|
|
58
61
|
* @param {number} port
|
|
59
62
|
* @param {string | null} [username]
|
|
60
63
|
* @param {string | null} [password]
|
|
61
|
-
* @param {string | null} [visibility]
|
|
62
|
-
* @param {string | null} [scheme]
|
|
63
64
|
* @param {number | null} [msg_id]
|
|
64
65
|
*/
|
|
65
|
-
|
|
66
|
+
delete_service(node_id, kind, host, port, username, password, msg_id) {
|
|
66
67
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
67
68
|
const len0 = WASM_VECTOR_LEN;
|
|
68
69
|
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -73,11 +74,10 @@ export class Channel {
|
|
|
73
74
|
var len3 = WASM_VECTOR_LEN;
|
|
74
75
|
var ptr4 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
75
76
|
var len4 = WASM_VECTOR_LEN;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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);
|
|
77
|
+
wasm.channel_delete_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);
|
|
78
|
+
}
|
|
79
|
+
disconnect() {
|
|
80
|
+
wasm.channel_disconnect(this.__wbg_ptr);
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
83
|
* @returns {boolean}
|
|
@@ -318,6 +318,34 @@ export class Channel {
|
|
|
318
318
|
stop_heartbeat() {
|
|
319
319
|
wasm.channel_stop_heartbeat(this.__wbg_ptr);
|
|
320
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* @param {string} node_id
|
|
323
|
+
* @param {string} kind
|
|
324
|
+
* @param {string} host
|
|
325
|
+
* @param {number} port
|
|
326
|
+
* @param {string | null} [username]
|
|
327
|
+
* @param {string | null} [password]
|
|
328
|
+
* @param {string | null} [visibility]
|
|
329
|
+
* @param {string | null} [scheme]
|
|
330
|
+
* @param {number | null} [msg_id]
|
|
331
|
+
*/
|
|
332
|
+
update_service(node_id, kind, host, port, username, password, visibility, scheme, msg_id) {
|
|
333
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
334
|
+
const len0 = WASM_VECTOR_LEN;
|
|
335
|
+
const ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
336
|
+
const len1 = WASM_VECTOR_LEN;
|
|
337
|
+
const ptr2 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
338
|
+
const len2 = WASM_VECTOR_LEN;
|
|
339
|
+
var ptr3 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
340
|
+
var len3 = WASM_VECTOR_LEN;
|
|
341
|
+
var ptr4 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
342
|
+
var len4 = WASM_VECTOR_LEN;
|
|
343
|
+
var ptr5 = isLikeNone(visibility) ? 0 : passStringToWasm0(visibility, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
344
|
+
var len5 = WASM_VECTOR_LEN;
|
|
345
|
+
var ptr6 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
346
|
+
var len6 = WASM_VECTOR_LEN;
|
|
347
|
+
wasm.channel_update_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);
|
|
348
|
+
}
|
|
321
349
|
}
|
|
322
350
|
if (Symbol.dispose) Channel.prototype[Symbol.dispose] = Channel.prototype.free;
|
|
323
351
|
|
|
@@ -425,7 +453,7 @@ function __wbg_get_imports() {
|
|
|
425
453
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
426
454
|
return addHeapObject(ret);
|
|
427
455
|
}, arguments); },
|
|
428
|
-
|
|
456
|
+
__wbg_info_29ff7ce08299fff3: function(arg0, arg1) {
|
|
429
457
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
430
458
|
},
|
|
431
459
|
__wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
|
|
@@ -497,7 +525,7 @@ function __wbg_get_imports() {
|
|
|
497
525
|
__wbg_set_onopen_ca8d311fe5282041: function(arg0, arg1) {
|
|
498
526
|
getObject(arg0).onopen = getObject(arg1);
|
|
499
527
|
},
|
|
500
|
-
|
|
528
|
+
__wbg_warn_08a33546b00b7ae5: function(arg0, arg1) {
|
|
501
529
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
502
530
|
},
|
|
503
531
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
Binary file
|