phirepass-channel 0.1.218 → 0.1.219
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.js +48 -48
- package/phirepass-channel_bg.wasm +0 -0
package/package.json
CHANGED
package/phirepass-channel.js
CHANGED
|
@@ -21,7 +21,7 @@ export class Channel {
|
|
|
21
21
|
const len0 = WASM_VECTOR_LEN;
|
|
22
22
|
const ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
23
23
|
const len1 = WASM_VECTOR_LEN;
|
|
24
|
-
wasm.channel_authenticate(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(msg_id) ?
|
|
24
|
+
wasm.channel_authenticate(this.__wbg_ptr, ptr0, len0, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
25
25
|
}
|
|
26
26
|
connect() {
|
|
27
27
|
wasm.channel_connect(this.__wbg_ptr);
|
|
@@ -56,7 +56,7 @@ export class Channel {
|
|
|
56
56
|
var ptr2 = isLikeNone(server_id) ? 0 : passStringToWasm0(server_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
57
57
|
var len2 = WASM_VECTOR_LEN;
|
|
58
58
|
const ret = wasm.channel_new(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
59
|
-
this.__wbg_ptr = ret
|
|
59
|
+
this.__wbg_ptr = ret;
|
|
60
60
|
ChannelFinalization.register(this, this.__wbg_ptr, this);
|
|
61
61
|
return this;
|
|
62
62
|
}
|
|
@@ -103,7 +103,7 @@ export class Channel {
|
|
|
103
103
|
var len1 = WASM_VECTOR_LEN;
|
|
104
104
|
var ptr2 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
105
105
|
var len2 = WASM_VECTOR_LEN;
|
|
106
|
-
wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ?
|
|
106
|
+
wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
109
|
* @param {string} node_id
|
|
@@ -118,7 +118,7 @@ export class Channel {
|
|
|
118
118
|
var len1 = WASM_VECTOR_LEN;
|
|
119
119
|
var ptr2 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
120
120
|
var len2 = WASM_VECTOR_LEN;
|
|
121
|
-
wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ?
|
|
121
|
+
wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
124
|
* @param {string} node_id
|
|
@@ -134,7 +134,7 @@ export class Channel {
|
|
|
134
134
|
const len1 = WASM_VECTOR_LEN;
|
|
135
135
|
const ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
136
136
|
const len2 = WASM_VECTOR_LEN;
|
|
137
|
-
wasm.channel_send_sftp_delete(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ?
|
|
137
|
+
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);
|
|
138
138
|
}
|
|
139
139
|
/**
|
|
140
140
|
* @param {string} node_id
|
|
@@ -146,7 +146,7 @@ export class Channel {
|
|
|
146
146
|
send_sftp_download_chunk(node_id, sid, download_id, chunk_index, msg_id) {
|
|
147
147
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
148
148
|
const len0 = WASM_VECTOR_LEN;
|
|
149
|
-
wasm.channel_send_sftp_download_chunk(this.__wbg_ptr, ptr0, len0, sid, download_id, chunk_index, isLikeNone(msg_id) ?
|
|
149
|
+
wasm.channel_send_sftp_download_chunk(this.__wbg_ptr, ptr0, len0, sid, download_id, chunk_index, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
152
|
* @param {string} node_id
|
|
@@ -162,7 +162,7 @@ export class Channel {
|
|
|
162
162
|
const len1 = WASM_VECTOR_LEN;
|
|
163
163
|
const ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
164
164
|
const len2 = WASM_VECTOR_LEN;
|
|
165
|
-
wasm.channel_send_sftp_download_start(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ?
|
|
165
|
+
wasm.channel_send_sftp_download_start(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
168
|
* @param {string} node_id
|
|
@@ -175,7 +175,7 @@ export class Channel {
|
|
|
175
175
|
const len0 = WASM_VECTOR_LEN;
|
|
176
176
|
const ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
177
177
|
const len1 = WASM_VECTOR_LEN;
|
|
178
|
-
wasm.channel_send_sftp_list_data(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, isLikeNone(msg_id) ?
|
|
178
|
+
wasm.channel_send_sftp_list_data(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
179
179
|
}
|
|
180
180
|
/**
|
|
181
181
|
* @param {string} node_id
|
|
@@ -191,7 +191,7 @@ export class Channel {
|
|
|
191
191
|
const len0 = WASM_VECTOR_LEN;
|
|
192
192
|
const ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
193
193
|
const len1 = WASM_VECTOR_LEN;
|
|
194
|
-
wasm.channel_send_sftp_upload_chunk(this.__wbg_ptr, ptr0, len0, sid, upload_id, chunk_index, chunk_size, ptr1, len1, isLikeNone(msg_id) ?
|
|
194
|
+
wasm.channel_send_sftp_upload_chunk(this.__wbg_ptr, ptr0, len0, sid, upload_id, chunk_index, chunk_size, ptr1, len1, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
195
195
|
}
|
|
196
196
|
/**
|
|
197
197
|
* @param {string} node_id
|
|
@@ -209,7 +209,7 @@ export class Channel {
|
|
|
209
209
|
const len1 = WASM_VECTOR_LEN;
|
|
210
210
|
const ptr2 = passStringToWasm0(remote_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
211
211
|
const len2 = WASM_VECTOR_LEN;
|
|
212
|
-
wasm.channel_send_sftp_upload_start(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, total_chunks, total_size, isLikeNone(msg_id) ?
|
|
212
|
+
wasm.channel_send_sftp_upload_start(this.__wbg_ptr, ptr0, len0, sid, ptr1, len1, ptr2, len2, total_chunks, total_size, isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
213
213
|
}
|
|
214
214
|
/**
|
|
215
215
|
* @param {string} node_id
|
|
@@ -289,7 +289,7 @@ export function version() {
|
|
|
289
289
|
function __wbg_get_imports() {
|
|
290
290
|
const import0 = {
|
|
291
291
|
__proto__: null,
|
|
292
|
-
|
|
292
|
+
__wbg_Error_3639a60ed15f87e7: function(arg0, arg1) {
|
|
293
293
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
294
294
|
return addHeapObject(ret);
|
|
295
295
|
},
|
|
@@ -300,14 +300,14 @@ function __wbg_get_imports() {
|
|
|
300
300
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
301
301
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
302
302
|
},
|
|
303
|
-
|
|
303
|
+
__wbg___wbindgen_debug_string_07cb72cfcc952e2b: function(arg0, arg1) {
|
|
304
304
|
const ret = debugString(getObject(arg1));
|
|
305
305
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
306
306
|
const len1 = WASM_VECTOR_LEN;
|
|
307
307
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
308
308
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
309
309
|
},
|
|
310
|
-
|
|
310
|
+
__wbg___wbindgen_string_get_965592073e5d848c: function(arg0, arg1) {
|
|
311
311
|
const obj = getObject(arg1);
|
|
312
312
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
313
313
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -315,39 +315,39 @@ function __wbg_get_imports() {
|
|
|
315
315
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
316
316
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
317
317
|
},
|
|
318
|
-
|
|
318
|
+
__wbg___wbindgen_throw_9c75d47bf9e7731e: function(arg0, arg1) {
|
|
319
319
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
320
320
|
},
|
|
321
|
-
|
|
321
|
+
__wbg__wbg_cb_unref_158e43e869788cdc: function(arg0) {
|
|
322
322
|
getObject(arg0)._wbg_cb_unref();
|
|
323
323
|
},
|
|
324
|
-
|
|
325
|
-
const ret = getObject(arg0).call(getObject(arg1));
|
|
324
|
+
__wbg_call_a41d6421b30a32c5: function() { return handleError(function (arg0, arg1, arg2) {
|
|
325
|
+
const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
|
|
326
326
|
return addHeapObject(ret);
|
|
327
327
|
}, arguments); },
|
|
328
|
-
|
|
329
|
-
const ret = getObject(arg0).call(getObject(arg1)
|
|
328
|
+
__wbg_call_add9e5a76382e668: function() { return handleError(function (arg0, arg1) {
|
|
329
|
+
const ret = getObject(arg0).call(getObject(arg1));
|
|
330
330
|
return addHeapObject(ret);
|
|
331
331
|
}, arguments); },
|
|
332
332
|
__wbg_clearInterval_26ba580547547579: function(arg0) {
|
|
333
333
|
const ret = clearInterval(takeObject(arg0));
|
|
334
334
|
return addHeapObject(ret);
|
|
335
335
|
},
|
|
336
|
-
|
|
336
|
+
__wbg_close_931d0c62e2aab92c: function() { return handleError(function (arg0) {
|
|
337
337
|
getObject(arg0).close();
|
|
338
338
|
}, arguments); },
|
|
339
|
-
|
|
339
|
+
__wbg_data_4a14fad4c5f216c4: function(arg0) {
|
|
340
340
|
const ret = getObject(arg0).data;
|
|
341
341
|
return addHeapObject(ret);
|
|
342
342
|
},
|
|
343
|
-
|
|
343
|
+
__wbg_from_ff141b1e4c69b979: function(arg0) {
|
|
344
344
|
const ret = Array.from(getObject(arg0));
|
|
345
345
|
return addHeapObject(ret);
|
|
346
346
|
},
|
|
347
|
-
|
|
347
|
+
__wbg_info_f2d28a5abf44abaa: function(arg0, arg1) {
|
|
348
348
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
349
349
|
},
|
|
350
|
-
|
|
350
|
+
__wbg_instanceof_ArrayBuffer_eab9f28fbec23477: function(arg0) {
|
|
351
351
|
let result;
|
|
352
352
|
try {
|
|
353
353
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -357,66 +357,66 @@ function __wbg_get_imports() {
|
|
|
357
357
|
const ret = result;
|
|
358
358
|
return ret;
|
|
359
359
|
},
|
|
360
|
-
|
|
360
|
+
__wbg_length_ba3c032602efe310: function(arg0) {
|
|
361
361
|
const ret = getObject(arg0).length;
|
|
362
362
|
return ret;
|
|
363
363
|
},
|
|
364
|
-
|
|
365
|
-
const ret = new
|
|
364
|
+
__wbg_new_2fad8ca02fd00684: function() {
|
|
365
|
+
const ret = new Object();
|
|
366
366
|
return addHeapObject(ret);
|
|
367
367
|
},
|
|
368
|
-
|
|
368
|
+
__wbg_new_3baa8d9866155c79: function() {
|
|
369
369
|
const ret = new Array();
|
|
370
370
|
return addHeapObject(ret);
|
|
371
371
|
},
|
|
372
|
-
|
|
373
|
-
const ret = new
|
|
372
|
+
__wbg_new_8454eee672b2ba6e: function(arg0) {
|
|
373
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
374
374
|
return addHeapObject(ret);
|
|
375
375
|
},
|
|
376
|
-
|
|
376
|
+
__wbg_new_with_str_sequence_d90cb07368a00c61: function() { return handleError(function (arg0, arg1, arg2) {
|
|
377
377
|
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), getObject(arg2));
|
|
378
378
|
return addHeapObject(ret);
|
|
379
379
|
}, arguments); },
|
|
380
|
-
|
|
380
|
+
__wbg_prototypesetcall_fd4050e806e1d519: function(arg0, arg1, arg2) {
|
|
381
381
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
382
382
|
},
|
|
383
|
-
|
|
383
|
+
__wbg_push_60a5366c0bb22a7d: function(arg0, arg1) {
|
|
384
384
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
385
385
|
return ret;
|
|
386
386
|
},
|
|
387
|
-
|
|
387
|
+
__wbg_readyState_be3cc9403da6c6ae: function(arg0) {
|
|
388
388
|
const ret = getObject(arg0).readyState;
|
|
389
389
|
return ret;
|
|
390
390
|
},
|
|
391
|
-
|
|
391
|
+
__wbg_send_c422d0aa0cb71d09: function() { return handleError(function (arg0, arg1, arg2) {
|
|
392
392
|
getObject(arg0).send(getArrayU8FromWasm0(arg1, arg2));
|
|
393
393
|
}, arguments); },
|
|
394
394
|
__wbg_setInterval_cbf1c35c6a692d37: function() { return handleError(function (arg0, arg1) {
|
|
395
395
|
const ret = setInterval(getObject(arg0), arg1);
|
|
396
396
|
return addHeapObject(ret);
|
|
397
397
|
}, arguments); },
|
|
398
|
-
__wbg_set_3bf1de9fab0cd644: function(arg0, arg1, arg2) {
|
|
399
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
400
|
-
},
|
|
401
398
|
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
402
399
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
403
400
|
},
|
|
404
|
-
|
|
401
|
+
__wbg_set_binaryType_8564bdba0fbec720: function(arg0, arg1) {
|
|
405
402
|
getObject(arg0).binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
406
403
|
},
|
|
407
|
-
|
|
404
|
+
__wbg_set_f614f6a0608d1d1d: function(arg0, arg1, arg2) {
|
|
405
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
406
|
+
},
|
|
407
|
+
__wbg_set_onclose_f756840519cd20b5: function(arg0, arg1) {
|
|
408
408
|
getObject(arg0).onclose = getObject(arg1);
|
|
409
409
|
},
|
|
410
|
-
|
|
410
|
+
__wbg_set_onerror_02f33de339f1fa31: function(arg0, arg1) {
|
|
411
411
|
getObject(arg0).onerror = getObject(arg1);
|
|
412
412
|
},
|
|
413
|
-
|
|
413
|
+
__wbg_set_onmessage_d2ff0c1d20584625: function(arg0, arg1) {
|
|
414
414
|
getObject(arg0).onmessage = getObject(arg1);
|
|
415
415
|
},
|
|
416
|
-
|
|
416
|
+
__wbg_set_onopen_1da8a4f65e6180d2: function(arg0, arg1) {
|
|
417
417
|
getObject(arg0).onopen = getObject(arg1);
|
|
418
418
|
},
|
|
419
|
-
|
|
419
|
+
__wbg_warn_37e2dc03ef418333: function(arg0, arg1) {
|
|
420
420
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
421
421
|
},
|
|
422
422
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
@@ -493,7 +493,7 @@ function __wasm_bindgen_func_elem_40_2(arg0, arg1, arg2) {
|
|
|
493
493
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
494
494
|
const ChannelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
495
495
|
? { register: () => {}, unregister: () => {} }
|
|
496
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_channel_free(ptr
|
|
496
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_channel_free(ptr, 1));
|
|
497
497
|
|
|
498
498
|
function addHeapObject(obj) {
|
|
499
499
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
@@ -593,8 +593,7 @@ function getDataViewMemory0() {
|
|
|
593
593
|
}
|
|
594
594
|
|
|
595
595
|
function getStringFromWasm0(ptr, len) {
|
|
596
|
-
|
|
597
|
-
return decodeText(ptr, len);
|
|
596
|
+
return decodeText(ptr >>> 0, len);
|
|
598
597
|
}
|
|
599
598
|
|
|
600
599
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -731,8 +730,9 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
731
730
|
|
|
732
731
|
let WASM_VECTOR_LEN = 0;
|
|
733
732
|
|
|
734
|
-
let wasmModule, wasm;
|
|
733
|
+
let wasmModule, wasmInstance, wasm;
|
|
735
734
|
function __wbg_finalize_init(instance, module) {
|
|
735
|
+
wasmInstance = instance;
|
|
736
736
|
wasm = instance.exports;
|
|
737
737
|
wasmModule = module;
|
|
738
738
|
cachedDataViewMemory0 = null;
|
|
Binary file
|