phirepass-channel 0.1.357 → 0.1.358
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 +8 -1
- package/phirepass-channel.js +33 -8
- package/phirepass-channel_bg.wasm +0 -0
package/package.json
CHANGED
package/phirepass-channel.d.ts
CHANGED
|
@@ -62,6 +62,12 @@ export class Channel {
|
|
|
62
62
|
* Create one directory. Parents must exist already, as with `mkdir`.
|
|
63
63
|
*/
|
|
64
64
|
send_sftp_mkdir(node_id: string, sid: number, path: string, msg_id?: number | null): void;
|
|
65
|
+
/**
|
|
66
|
+
* Ask the node to let a player read `path` through this SFTP session.
|
|
67
|
+
* Answered with `SFTPOpResult::Stream { token, size, mime }`; the player
|
|
68
|
+
* then reads `/api/web/stream/{node_id}/t/{token}`.
|
|
69
|
+
*/
|
|
70
|
+
send_sftp_open_stream(node_id: string, sid: number, path: string, msg_id?: number | null): void;
|
|
65
71
|
/**
|
|
66
72
|
* Read a whole file for the in-page editor. Answered with an
|
|
67
73
|
* `SFTPOpResult` carrying `FileContents`, or an `Error` if the file is
|
|
@@ -144,6 +150,7 @@ export interface InitOutput {
|
|
|
144
150
|
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;
|
|
145
151
|
readonly channel_send_sftp_list_data: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
146
152
|
readonly channel_send_sftp_mkdir: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
153
|
+
readonly channel_send_sftp_open_stream: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
147
154
|
readonly channel_send_sftp_read_file: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
148
155
|
readonly channel_send_sftp_remove: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
149
156
|
readonly channel_send_sftp_rename: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
@@ -157,8 +164,8 @@ export interface InitOutput {
|
|
|
157
164
|
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) => void;
|
|
158
165
|
readonly version: (a: number) => void;
|
|
159
166
|
readonly __wasm_bindgen_func_elem_96: (a: number, b: number, c: any) => void;
|
|
160
|
-
readonly __wasm_bindgen_func_elem_96_46: (a: number, b: number, c: any) => void;
|
|
161
167
|
readonly __wasm_bindgen_func_elem_96_47: (a: number, b: number, c: any) => void;
|
|
168
|
+
readonly __wasm_bindgen_func_elem_96_48: (a: number, b: number, c: any) => void;
|
|
162
169
|
readonly __wasm_bindgen_func_elem_100: (a: number, b: number) => void;
|
|
163
170
|
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
164
171
|
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
package/phirepass-channel.js
CHANGED
|
@@ -536,6 +536,31 @@ export class Channel {
|
|
|
536
536
|
}
|
|
537
537
|
wasm.channel_send_sftp_mkdir(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
|
|
538
538
|
}
|
|
539
|
+
/**
|
|
540
|
+
* Ask the node to let a player read `path` through this SFTP session.
|
|
541
|
+
* Answered with `SFTPOpResult::Stream { token, size, mime }`; the player
|
|
542
|
+
* then reads `/api/web/stream/{node_id}/t/{token}`.
|
|
543
|
+
* @param {string} node_id
|
|
544
|
+
* @param {number} sid
|
|
545
|
+
* @param {string} path
|
|
546
|
+
* @param {number | null} [msg_id]
|
|
547
|
+
*/
|
|
548
|
+
send_sftp_open_stream(node_id, sid, path, msg_id) {
|
|
549
|
+
const val3 = +sid;
|
|
550
|
+
const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
551
|
+
let ptr0, len0, ptr1, len1;
|
|
552
|
+
try {
|
|
553
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
554
|
+
len0 = WASM_VECTOR_LEN;
|
|
555
|
+
ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
556
|
+
len1 = WASM_VECTOR_LEN;
|
|
557
|
+
} catch (e) {
|
|
558
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
559
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
560
|
+
throw e;
|
|
561
|
+
}
|
|
562
|
+
wasm.channel_send_sftp_open_stream(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
|
|
563
|
+
}
|
|
539
564
|
/**
|
|
540
565
|
* Read a whole file for the in-page editor. Answered with an
|
|
541
566
|
* `SFTPOpResult` carrying `FileContents`, or an `Error` if the file is
|
|
@@ -985,7 +1010,7 @@ function __wbg_get_imports() {
|
|
|
985
1010
|
const ret = arg0[arg1];
|
|
986
1011
|
return ret;
|
|
987
1012
|
},
|
|
988
|
-
|
|
1013
|
+
__wbg_info_386f00b314475db5: function(arg0, arg1) {
|
|
989
1014
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
990
1015
|
},
|
|
991
1016
|
__wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
|
|
@@ -1095,7 +1120,7 @@ function __wbg_get_imports() {
|
|
|
1095
1120
|
const ret = arg0.value;
|
|
1096
1121
|
return ret;
|
|
1097
1122
|
},
|
|
1098
|
-
|
|
1123
|
+
__wbg_warn_4f0851b2fd19b28b: function(arg0, arg1) {
|
|
1099
1124
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
1100
1125
|
},
|
|
1101
1126
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
@@ -1105,12 +1130,12 @@ function __wbg_get_imports() {
|
|
|
1105
1130
|
},
|
|
1106
1131
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
1107
1132
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1108
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1133
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_96_47);
|
|
1109
1134
|
return ret;
|
|
1110
1135
|
},
|
|
1111
1136
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
1112
1137
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 3, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1113
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1138
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_96_48);
|
|
1114
1139
|
return ret;
|
|
1115
1140
|
},
|
|
1116
1141
|
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
@@ -1161,14 +1186,14 @@ function __wasm_bindgen_func_elem_96(arg0, arg1, arg2) {
|
|
|
1161
1186
|
wasm.__wasm_bindgen_func_elem_96(arg0, arg1, arg2);
|
|
1162
1187
|
}
|
|
1163
1188
|
|
|
1164
|
-
function __wasm_bindgen_func_elem_96_46(arg0, arg1, arg2) {
|
|
1165
|
-
wasm.__wasm_bindgen_func_elem_96_46(arg0, arg1, arg2);
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
1189
|
function __wasm_bindgen_func_elem_96_47(arg0, arg1, arg2) {
|
|
1169
1190
|
wasm.__wasm_bindgen_func_elem_96_47(arg0, arg1, arg2);
|
|
1170
1191
|
}
|
|
1171
1192
|
|
|
1193
|
+
function __wasm_bindgen_func_elem_96_48(arg0, arg1, arg2) {
|
|
1194
|
+
wasm.__wasm_bindgen_func_elem_96_48(arg0, arg1, arg2);
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1172
1197
|
|
|
1173
1198
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
1174
1199
|
const ChannelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
Binary file
|