phirepass-channel 0.1.256 → 0.1.258
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 +11 -4
- package/phirepass-channel.js +32 -18
- package/phirepass-channel_bg.wasm +0 -0
package/package.json
CHANGED
package/phirepass-channel.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ export class Channel {
|
|
|
21
21
|
open_sftp_tunnel(node_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
22
22
|
open_ssh_tunnel(node_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
|
|
23
23
|
send_sftp_delete(node_id: string, sid: number, path: string, filename: string, msg_id?: number | null): void;
|
|
24
|
+
/**
|
|
25
|
+
* Send a pipelining ACK to the agent: acknowledges all chunks with index ≤ ack_up_to
|
|
26
|
+
* so the agent's sliding window advances and it can push the next batch.
|
|
27
|
+
* Call this after processing each received SFTPDownloadChunk (or every N chunks).
|
|
28
|
+
*/
|
|
29
|
+
send_sftp_download_ack(node_id: string, sid: number, download_id: number, ack_up_to: number): void;
|
|
24
30
|
send_sftp_download_chunk(node_id: string, sid: number, download_id: number, chunk_index: number, msg_id?: number | null): void;
|
|
25
31
|
send_sftp_download_start(node_id: string, sid: number, path: string, filename: string, msg_id?: number | null): void;
|
|
26
32
|
send_sftp_list_data(node_id: string, sid: number, path: string, msg_id?: number | null): void;
|
|
@@ -69,6 +75,7 @@ export interface InitOutput {
|
|
|
69
75
|
readonly channel_open_sftp_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
70
76
|
readonly channel_open_ssh_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
71
77
|
readonly channel_send_sftp_delete: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
78
|
+
readonly channel_send_sftp_download_ack: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
72
79
|
readonly channel_send_sftp_download_chunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
73
80
|
readonly channel_send_sftp_download_start: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
74
81
|
readonly channel_send_sftp_list_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
@@ -79,10 +86,10 @@ export interface InitOutput {
|
|
|
79
86
|
readonly channel_start_heartbeat: (a: number, b: number) => void;
|
|
80
87
|
readonly channel_stop_heartbeat: (a: number) => void;
|
|
81
88
|
readonly version: (a: number) => void;
|
|
82
|
-
readonly
|
|
83
|
-
readonly
|
|
84
|
-
readonly
|
|
85
|
-
readonly
|
|
89
|
+
readonly __wasm_bindgen_func_elem_42: (a: number, b: number, c: number) => void;
|
|
90
|
+
readonly __wasm_bindgen_func_elem_42_1: (a: number, b: number, c: number) => void;
|
|
91
|
+
readonly __wasm_bindgen_func_elem_42_2: (a: number, b: number, c: number) => void;
|
|
92
|
+
readonly __wasm_bindgen_func_elem_44: (a: number, b: number) => void;
|
|
86
93
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
87
94
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
88
95
|
readonly __wbindgen_export3: (a: number) => void;
|
package/phirepass-channel.js
CHANGED
|
@@ -189,6 +189,20 @@ export class Channel {
|
|
|
189
189
|
const len2 = WASM_VECTOR_LEN;
|
|
190
190
|
wasm.channel_send_sftp_delete(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
191
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Send a pipelining ACK to the agent: acknowledges all chunks with index ≤ ack_up_to
|
|
194
|
+
* so the agent's sliding window advances and it can push the next batch.
|
|
195
|
+
* Call this after processing each received SFTPDownloadChunk (or every N chunks).
|
|
196
|
+
* @param {string} node_id
|
|
197
|
+
* @param {number} sid
|
|
198
|
+
* @param {number} download_id
|
|
199
|
+
* @param {number} ack_up_to
|
|
200
|
+
*/
|
|
201
|
+
send_sftp_download_ack(node_id, sid, download_id, ack_up_to) {
|
|
202
|
+
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
203
|
+
const len0 = WASM_VECTOR_LEN;
|
|
204
|
+
wasm.channel_send_sftp_download_ack(this.__wbg_ptr, ptr0, len0, sid, download_id, ack_up_to);
|
|
205
|
+
}
|
|
192
206
|
/**
|
|
193
207
|
* @param {string} node_id
|
|
194
208
|
* @param {number} sid
|
|
@@ -405,7 +419,7 @@ function __wbg_get_imports() {
|
|
|
405
419
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
406
420
|
return addHeapObject(ret);
|
|
407
421
|
}, arguments); },
|
|
408
|
-
|
|
422
|
+
__wbg_info_7d0cb7276297fc0b: function(arg0, arg1) {
|
|
409
423
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
410
424
|
},
|
|
411
425
|
__wbg_instanceof_ArrayBuffer_8f49811467741499: function(arg0) {
|
|
@@ -477,27 +491,27 @@ function __wbg_get_imports() {
|
|
|
477
491
|
__wbg_set_onopen_db452f4233e99d7d: function(arg0, arg1) {
|
|
478
492
|
getObject(arg0).onopen = getObject(arg1);
|
|
479
493
|
},
|
|
480
|
-
|
|
494
|
+
__wbg_warn_7d8597031f2c57e5: function(arg0, arg1) {
|
|
481
495
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
482
496
|
},
|
|
483
497
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
484
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx:
|
|
485
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
498
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
499
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42);
|
|
486
500
|
return addHeapObject(ret);
|
|
487
501
|
},
|
|
488
502
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
489
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx:
|
|
490
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
503
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
504
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42_1);
|
|
491
505
|
return addHeapObject(ret);
|
|
492
506
|
},
|
|
493
507
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
494
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx:
|
|
495
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
508
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
509
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42_2);
|
|
496
510
|
return addHeapObject(ret);
|
|
497
511
|
},
|
|
498
512
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
499
|
-
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx:
|
|
500
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
513
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
514
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_44);
|
|
501
515
|
return addHeapObject(ret);
|
|
502
516
|
},
|
|
503
517
|
__wbindgen_cast_0000000000000005: function(arg0) {
|
|
@@ -534,20 +548,20 @@ function __wbg_get_imports() {
|
|
|
534
548
|
};
|
|
535
549
|
}
|
|
536
550
|
|
|
537
|
-
function
|
|
538
|
-
wasm.
|
|
551
|
+
function __wasm_bindgen_func_elem_44(arg0, arg1) {
|
|
552
|
+
wasm.__wasm_bindgen_func_elem_44(arg0, arg1);
|
|
539
553
|
}
|
|
540
554
|
|
|
541
|
-
function
|
|
542
|
-
wasm.
|
|
555
|
+
function __wasm_bindgen_func_elem_42(arg0, arg1, arg2) {
|
|
556
|
+
wasm.__wasm_bindgen_func_elem_42(arg0, arg1, addHeapObject(arg2));
|
|
543
557
|
}
|
|
544
558
|
|
|
545
|
-
function
|
|
546
|
-
wasm.
|
|
559
|
+
function __wasm_bindgen_func_elem_42_1(arg0, arg1, arg2) {
|
|
560
|
+
wasm.__wasm_bindgen_func_elem_42_1(arg0, arg1, addHeapObject(arg2));
|
|
547
561
|
}
|
|
548
562
|
|
|
549
|
-
function
|
|
550
|
-
wasm.
|
|
563
|
+
function __wasm_bindgen_func_elem_42_2(arg0, arg1, arg2) {
|
|
564
|
+
wasm.__wasm_bindgen_func_elem_42_2(arg0, arg1, addHeapObject(arg2));
|
|
551
565
|
}
|
|
552
566
|
|
|
553
567
|
|
|
Binary file
|