phirepass-channel 0.1.279 → 0.1.281

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "phirepass-channel",
3
3
  "type": "module",
4
- "version": "0.1.279",
4
+ "version": "0.1.281",
5
5
  "license": "SEE LICENSE IN ../LICENCE",
6
6
  "repository": {
7
7
  "type": "git",
@@ -18,8 +18,8 @@ export class Channel {
18
18
  on_connection_open(cb?: Function | null): void;
19
19
  on_protocol_message(cb?: Function | null): void;
20
20
  on_protocol_message_type(frame_type: string, cb?: Function | null): void;
21
- open_sftp_tunnel(node_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
22
- open_ssh_tunnel(node_id: string, username?: string | null, password?: string | null, msg_id?: number | null): void;
21
+ open_sftp_tunnel(node_id: string, username: string | null | undefined, password: string | null | undefined, msg_id: number | null | undefined, service_id: string): void;
22
+ open_ssh_tunnel(node_id: string, username: string | null | undefined, password: string | null | undefined, msg_id: number | null | undefined, service_id: string): void;
23
23
  send_sftp_delete(node_id: string, sid: number, path: string, filename: string, msg_id?: number | null): void;
24
24
  /**
25
25
  * Send a pipelining ACK to the agent: acknowledges all chunks with index ≤ ack_up_to
@@ -73,8 +73,8 @@ export interface InitOutput {
73
73
  readonly channel_on_connection_open: (a: number, b: number) => void;
74
74
  readonly channel_on_protocol_message: (a: number, b: number) => void;
75
75
  readonly channel_on_protocol_message_type: (a: number, b: number, c: number, d: number) => void;
76
- readonly channel_open_sftp_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
77
- readonly channel_open_ssh_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
76
+ readonly channel_open_sftp_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
77
+ readonly channel_open_ssh_tunnel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
78
78
  readonly channel_send_sftp_delete: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
79
79
  readonly channel_send_sftp_download_ack: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
80
80
  readonly channel_send_sftp_download_chunk: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
@@ -88,10 +88,10 @@ export interface InitOutput {
88
88
  readonly channel_stop_heartbeat: (a: number) => void;
89
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;
90
90
  readonly version: (a: number) => void;
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;
91
+ readonly __wasm_bindgen_func_elem_44: (a: number, b: number, c: number) => void;
92
+ readonly __wasm_bindgen_func_elem_44_1: (a: number, b: number, c: number) => void;
93
+ readonly __wasm_bindgen_func_elem_44_2: (a: number, b: number, c: number) => void;
94
+ readonly __wasm_bindgen_func_elem_42: (a: number, b: number) => void;
95
95
  readonly __wbindgen_export: (a: number, b: number) => number;
96
96
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
97
97
  readonly __wbindgen_export3: (a: number) => void;
@@ -144,33 +144,39 @@ export class Channel {
144
144
  }
145
145
  /**
146
146
  * @param {string} node_id
147
- * @param {string | null} [username]
148
- * @param {string | null} [password]
149
- * @param {number | null} [msg_id]
147
+ * @param {string | null | undefined} username
148
+ * @param {string | null | undefined} password
149
+ * @param {number | null | undefined} msg_id
150
+ * @param {string} service_id
150
151
  */
151
- open_sftp_tunnel(node_id, username, password, msg_id) {
152
+ open_sftp_tunnel(node_id, username, password, msg_id, service_id) {
152
153
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
153
154
  const len0 = WASM_VECTOR_LEN;
154
155
  var ptr1 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
155
156
  var len1 = WASM_VECTOR_LEN;
156
157
  var ptr2 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
157
158
  var len2 = WASM_VECTOR_LEN;
158
- wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
159
+ const ptr3 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
160
+ const len3 = WASM_VECTOR_LEN;
161
+ wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0, ptr3, len3);
159
162
  }
160
163
  /**
161
164
  * @param {string} node_id
162
- * @param {string | null} [username]
163
- * @param {string | null} [password]
164
- * @param {number | null} [msg_id]
165
+ * @param {string | null | undefined} username
166
+ * @param {string | null | undefined} password
167
+ * @param {number | null | undefined} msg_id
168
+ * @param {string} service_id
165
169
  */
166
- open_ssh_tunnel(node_id, username, password, msg_id) {
170
+ open_ssh_tunnel(node_id, username, password, msg_id, service_id) {
167
171
  const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
168
172
  const len0 = WASM_VECTOR_LEN;
169
173
  var ptr1 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
170
174
  var len1 = WASM_VECTOR_LEN;
171
175
  var ptr2 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
172
176
  var len2 = WASM_VECTOR_LEN;
173
- wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
177
+ const ptr3 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
178
+ const len3 = WASM_VECTOR_LEN;
179
+ wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0, ptr3, len3);
174
180
  }
175
181
  /**
176
182
  * @param {string} node_id
@@ -448,14 +454,11 @@ function __wbg_get_imports() {
448
454
  const ret = Array.from(getObject(arg0));
449
455
  return addHeapObject(ret);
450
456
  },
451
- __wbg_getRandomValues_a697888e9ba1eee3: function() { return handleError(function (arg0, arg1) {
452
- globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
453
- }, arguments); },
454
457
  __wbg_get_dddb90ff5d27a080: function() { return handleError(function (arg0, arg1) {
455
458
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
456
459
  return addHeapObject(ret);
457
460
  }, arguments); },
458
- __wbg_info_ab46ef99b3cad323: function(arg0, arg1) {
461
+ __wbg_info_44b30285408a1889: function(arg0, arg1) {
459
462
  console.info(getStringFromWasm0(arg0, arg1));
460
463
  },
461
464
  __wbg_instanceof_ArrayBuffer_2a7bb09fee70c2da: function(arg0) {
@@ -527,27 +530,27 @@ function __wbg_get_imports() {
527
530
  __wbg_set_onopen_ca8d311fe5282041: function(arg0, arg1) {
528
531
  getObject(arg0).onopen = getObject(arg1);
529
532
  },
530
- __wbg_warn_badc1c53b8d95dbd: function(arg0, arg1) {
533
+ __wbg_warn_9f049c9dbec481ea: function(arg0, arg1) {
531
534
  console.warn(getStringFromWasm0(arg0, arg1));
532
535
  },
533
536
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
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`.
535
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43);
537
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
538
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_44);
536
539
  return addHeapObject(ret);
537
540
  },
538
541
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
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`.
540
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43_1);
542
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
543
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_44_1);
541
544
  return addHeapObject(ret);
542
545
  },
543
546
  __wbindgen_cast_0000000000000003: function(arg0, arg1) {
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`.
545
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_43_2);
547
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
548
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_44_2);
546
549
  return addHeapObject(ret);
547
550
  },
548
551
  __wbindgen_cast_0000000000000004: function(arg0, arg1) {
549
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
550
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_45);
552
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
553
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_42);
551
554
  return addHeapObject(ret);
552
555
  },
553
556
  __wbindgen_cast_0000000000000005: function(arg0) {
@@ -584,20 +587,20 @@ function __wbg_get_imports() {
584
587
  };
585
588
  }
586
589
 
587
- function __wasm_bindgen_func_elem_45(arg0, arg1) {
588
- wasm.__wasm_bindgen_func_elem_45(arg0, arg1);
590
+ function __wasm_bindgen_func_elem_42(arg0, arg1) {
591
+ wasm.__wasm_bindgen_func_elem_42(arg0, arg1);
589
592
  }
590
593
 
591
- function __wasm_bindgen_func_elem_43(arg0, arg1, arg2) {
592
- wasm.__wasm_bindgen_func_elem_43(arg0, arg1, addHeapObject(arg2));
594
+ function __wasm_bindgen_func_elem_44(arg0, arg1, arg2) {
595
+ wasm.__wasm_bindgen_func_elem_44(arg0, arg1, addHeapObject(arg2));
593
596
  }
594
597
 
595
- function __wasm_bindgen_func_elem_43_1(arg0, arg1, arg2) {
596
- wasm.__wasm_bindgen_func_elem_43_1(arg0, arg1, addHeapObject(arg2));
598
+ function __wasm_bindgen_func_elem_44_1(arg0, arg1, arg2) {
599
+ wasm.__wasm_bindgen_func_elem_44_1(arg0, arg1, addHeapObject(arg2));
597
600
  }
598
601
 
599
- function __wasm_bindgen_func_elem_43_2(arg0, arg1, arg2) {
600
- wasm.__wasm_bindgen_func_elem_43_2(arg0, arg1, addHeapObject(arg2));
602
+ function __wasm_bindgen_func_elem_44_2(arg0, arg1, arg2) {
603
+ wasm.__wasm_bindgen_func_elem_44_2(arg0, arg1, addHeapObject(arg2));
601
604
  }
602
605
 
603
606
 
Binary file