phirepass-channel 0.1.240 → 0.1.241
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 +3 -1
- package/phirepass-channel.js +26 -9
- package/phirepass-channel_bg.wasm +0 -0
package/package.json
CHANGED
package/phirepass-channel.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export class Channel {
|
|
|
17
17
|
on_connection_message(cb?: Function | null): void;
|
|
18
18
|
on_connection_open(cb?: Function | null): void;
|
|
19
19
|
on_protocol_message(cb?: Function | null): void;
|
|
20
|
+
on_protocol_message_type(frame_type: string, cb?: Function | null): void;
|
|
20
21
|
open_sftp_tunnel(node_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
21
22
|
open_ssh_tunnel(node_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
22
23
|
send_sftp_delete(node_id: string, sid: number, path: string, filename: string, msg_id?: number | null): void;
|
|
@@ -64,6 +65,7 @@ export interface InitOutput {
|
|
|
64
65
|
readonly channel_on_connection_message: (a: number, b: number) => void;
|
|
65
66
|
readonly channel_on_connection_open: (a: number, b: number) => void;
|
|
66
67
|
readonly channel_on_protocol_message: (a: number, b: number) => void;
|
|
68
|
+
readonly channel_on_protocol_message_type: (a: number, b: number, c: number, d: number) => void;
|
|
67
69
|
readonly channel_open_sftp_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
68
70
|
readonly channel_open_ssh_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
69
71
|
readonly channel_send_sftp_delete: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
@@ -80,7 +82,7 @@ export interface InitOutput {
|
|
|
80
82
|
readonly __wasm_bindgen_func_elem_42: (a: number, b: number, c: number) => void;
|
|
81
83
|
readonly __wasm_bindgen_func_elem_42_1: (a: number, b: number, c: number) => void;
|
|
82
84
|
readonly __wasm_bindgen_func_elem_42_2: (a: number, b: number, c: number) => void;
|
|
83
|
-
readonly
|
|
85
|
+
readonly __wasm_bindgen_func_elem_45: (a: number, b: number) => void;
|
|
84
86
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
85
87
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
86
88
|
readonly __wbindgen_export3: (a: number) => void;
|
package/phirepass-channel.js
CHANGED
|
@@ -134,6 +134,15 @@ export class Channel {
|
|
|
134
134
|
on_protocol_message(cb) {
|
|
135
135
|
wasm.channel_on_protocol_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addHeapObject(cb));
|
|
136
136
|
}
|
|
137
|
+
/**
|
|
138
|
+
* @param {string} frame_type
|
|
139
|
+
* @param {Function | null} [cb]
|
|
140
|
+
*/
|
|
141
|
+
on_protocol_message_type(frame_type, cb) {
|
|
142
|
+
const ptr0 = passStringToWasm0(frame_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
143
|
+
const len0 = WASM_VECTOR_LEN;
|
|
144
|
+
wasm.channel_on_protocol_message_type(this.__wbg_ptr, ptr0, len0, isLikeNone(cb) ? 0 : addHeapObject(cb));
|
|
145
|
+
}
|
|
137
146
|
/**
|
|
138
147
|
* @param {string} node_id
|
|
139
148
|
* @param {string | null} [username]
|
|
@@ -373,6 +382,10 @@ function __wbg_get_imports() {
|
|
|
373
382
|
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
374
383
|
return addHeapObject(ret);
|
|
375
384
|
}, arguments); },
|
|
385
|
+
__wbg_call_faa0a261f288f846: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
386
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2), getObject(arg3));
|
|
387
|
+
return addHeapObject(ret);
|
|
388
|
+
}, arguments); },
|
|
376
389
|
__wbg_clearInterval_26ba580547547579: function(arg0) {
|
|
377
390
|
const ret = clearInterval(takeObject(arg0));
|
|
378
391
|
return addHeapObject(ret);
|
|
@@ -388,7 +401,11 @@ function __wbg_get_imports() {
|
|
|
388
401
|
const ret = Array.from(getObject(arg0));
|
|
389
402
|
return addHeapObject(ret);
|
|
390
403
|
},
|
|
391
|
-
|
|
404
|
+
__wbg_get_dcf82ab8aad1a593: function() { return handleError(function (arg0, arg1) {
|
|
405
|
+
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
406
|
+
return addHeapObject(ret);
|
|
407
|
+
}, arguments); },
|
|
408
|
+
__wbg_info_2ac4a673066fabd2: function(arg0, arg1) {
|
|
392
409
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
393
410
|
},
|
|
394
411
|
__wbg_instanceof_ArrayBuffer_53db37b06f6b9afe: function(arg0) {
|
|
@@ -460,27 +477,27 @@ function __wbg_get_imports() {
|
|
|
460
477
|
__wbg_set_onopen_6f3fc5e2ad3144f1: function(arg0, arg1) {
|
|
461
478
|
getObject(arg0).onopen = getObject(arg1);
|
|
462
479
|
},
|
|
463
|
-
|
|
480
|
+
__wbg_warn_d49b74062745f56d: function(arg0, arg1) {
|
|
464
481
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
465
482
|
},
|
|
466
483
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
467
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
484
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
468
485
|
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42);
|
|
469
486
|
return addHeapObject(ret);
|
|
470
487
|
},
|
|
471
488
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
472
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx:
|
|
489
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
473
490
|
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42_1);
|
|
474
491
|
return addHeapObject(ret);
|
|
475
492
|
},
|
|
476
493
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
477
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
494
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
478
495
|
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42_2);
|
|
479
496
|
return addHeapObject(ret);
|
|
480
497
|
},
|
|
481
498
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
482
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
483
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
499
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 4, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
500
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_45);
|
|
484
501
|
return addHeapObject(ret);
|
|
485
502
|
},
|
|
486
503
|
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
@@ -517,8 +534,8 @@ function __wbg_get_imports() {
|
|
|
517
534
|
};
|
|
518
535
|
}
|
|
519
536
|
|
|
520
|
-
function
|
|
521
|
-
wasm.
|
|
537
|
+
function __wasm_bindgen_func_elem_45(arg0, arg1) {
|
|
538
|
+
wasm.__wasm_bindgen_func_elem_45(arg0, arg1);
|
|
522
539
|
}
|
|
523
540
|
|
|
524
541
|
function __wasm_bindgen_func_elem_42(arg0, arg1, arg2) {
|
|
Binary file
|