phirepass-widgets 0.0.111 → 0.0.113
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/README.md +33 -0
- package/dist/cjs/{index-B8w6l0VL.js → index-CurErEK7.js} +101 -30
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/phirepass-downloader_3.cjs.entry.js +3696 -0
- package/dist/cjs/phirepass-rdp.cjs.entry.js +18 -6
- package/dist/cjs/phirepass-terminal.cjs.entry.js +6 -5
- package/dist/cjs/phirepass-widgets.cjs.js +3 -3
- package/dist/cjs/{protocol-CCD7cbHu.js → protocol-DCBMfc2u.js} +557 -360
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/common/channel.js +21 -1
- package/dist/collection/common/fetch.js +40 -0
- package/dist/collection/components/phirepass-downloader/form.js +69 -0
- package/dist/collection/components/phirepass-downloader/format.js +105 -0
- package/dist/collection/components/phirepass-downloader/jobs.js +370 -0
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.css +1109 -0
- package/dist/collection/components/phirepass-downloader/phirepass-downloader.js +1455 -0
- package/dist/collection/components/phirepass-downloader/source.js +106 -0
- package/dist/collection/components/phirepass-downloader/views/dialogs.js +34 -0
- package/dist/collection/components/phirepass-downloader/views/fetch-form.js +65 -0
- package/dist/collection/components/phirepass-downloader/views/icons.js +33 -0
- package/dist/collection/components/phirepass-downloader/views/job-row.js +91 -0
- package/dist/collection/components/phirepass-downloader/views/notices.js +15 -0
- package/dist/collection/components/phirepass-downloader/views/states.js +19 -0
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.css +216 -0
- package/dist/collection/components/phirepass-media-player/phirepass-media-player.js +473 -0
- package/dist/collection/components/phirepass-media-player/player.js +94 -0
- package/dist/collection/components/phirepass-rdp/phirepass-rdp.js +36 -13
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.css +122 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.fetch.js +35 -0
- package/dist/collection/components/phirepass-sftp-client/phirepass-sftp-client.js +181 -31
- package/dist/collection/components/phirepass-terminal/phirepass-terminal.js +2 -2
- package/dist/collection/phirepass-channel_bg.wasm +0 -0
- package/dist/collection/testing/fixtures.js +219 -0
- package/dist/collection/testing/mock-channel.js +410 -0
- package/dist/components/index.js +1 -1
- package/dist/components/p-C4cmk3bS.js +1 -0
- package/dist/components/p-CsYQJXY2.js +1 -0
- package/dist/components/p-D6Geq8Rn.js +1 -0
- package/dist/components/phirepass-downloader.d.ts +11 -0
- package/dist/components/phirepass-downloader.js +1 -0
- package/dist/components/phirepass-media-player.d.ts +11 -0
- package/dist/components/phirepass-media-player.js +1 -0
- package/dist/components/phirepass-rdp.js +1 -1
- package/dist/components/phirepass-sftp-client.js +1 -1
- package/dist/components/phirepass-terminal.js +2 -2
- package/dist/esm/{index-DGq2b7rM.js → index-B9qUl6FW.js} +101 -30
- package/dist/esm/loader.js +3 -3
- package/dist/esm/phirepass-downloader_3.entry.js +3692 -0
- package/dist/esm/phirepass-rdp.entry.js +18 -6
- package/dist/esm/phirepass-terminal.entry.js +6 -5
- package/dist/esm/phirepass-widgets.js +4 -4
- package/dist/esm/{protocol-D4JeTIHt.js → protocol-CsYQJXY2.js} +556 -359
- package/dist/phirepass-widgets/p-1b84c526.entry.js +1 -0
- package/dist/phirepass-widgets/{p-9eebbf05.entry.js → p-41dd1ac9.entry.js} +2 -2
- package/dist/phirepass-widgets/p-614ab3de.entry.js +1 -0
- package/dist/phirepass-widgets/p-B9qUl6FW.js +3 -0
- package/dist/phirepass-widgets/p-CsYQJXY2.js +1 -0
- package/dist/phirepass-widgets/phirepass-channel_bg.wasm +0 -0
- package/dist/phirepass-widgets/phirepass-widgets.esm.js +1 -1
- package/dist/types/common/channel.d.ts +30 -0
- package/dist/types/common/fetch.d.ts +161 -0
- package/dist/types/components/phirepass-downloader/form.d.ts +54 -0
- package/dist/types/components/phirepass-downloader/format.d.ts +17 -0
- package/dist/types/components/phirepass-downloader/jobs.d.ts +115 -0
- package/dist/types/components/phirepass-downloader/phirepass-downloader.d.ts +231 -0
- package/dist/types/components/phirepass-downloader/source.d.ts +61 -0
- package/dist/types/components/phirepass-downloader/views/dialogs.d.ts +52 -0
- package/dist/types/components/phirepass-downloader/views/fetch-form.d.ts +31 -0
- package/dist/types/components/phirepass-downloader/views/icons.d.ts +5 -0
- package/dist/types/components/phirepass-downloader/views/job-row.d.ts +21 -0
- package/dist/types/components/phirepass-downloader/views/notices.d.ts +18 -0
- package/dist/types/components/phirepass-downloader/views/states.d.ts +38 -0
- package/dist/types/components/phirepass-media-player/phirepass-media-player.d.ts +67 -0
- package/dist/types/components/phirepass-media-player/player.d.ts +43 -0
- package/dist/types/components/phirepass-rdp/phirepass-rdp.d.ts +10 -0
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.d.ts +30 -0
- package/dist/types/components/phirepass-sftp-client/phirepass-sftp-client.fetch.d.ts +40 -0
- package/dist/types/components.d.ts +426 -34
- package/dist/types/stencil-public-runtime.d.ts +1 -1
- package/dist/types/testing/fixtures.d.ts +25 -0
- package/dist/types/testing/mock-channel.d.ts +132 -0
- package/package.json +26 -12
- package/dist/cjs/phirepass-sftp-client.cjs.entry.js +0 -1469
- package/dist/components/p-D4JeTIHt.js +0 -1
- package/dist/esm/phirepass-sftp-client.entry.js +0 -1467
- package/dist/phirepass-widgets/p-401631af.entry.js +0 -1
- package/dist/phirepass-widgets/p-5f27300b.entry.js +0 -1
- package/dist/phirepass-widgets/p-D4JeTIHt.js +0 -1
- package/dist/phirepass-widgets/p-DGq2b7rM.js +0 -3
|
@@ -20,11 +20,19 @@ class Channel {
|
|
|
20
20
|
* @param {number | null} [msg_id]
|
|
21
21
|
*/
|
|
22
22
|
authenticate(token, node_id, msg_id) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
24
|
+
let ptr0, len0, ptr1, len1;
|
|
25
|
+
try {
|
|
26
|
+
ptr0 = passStringToWasm0(token, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
27
|
+
len0 = WASM_VECTOR_LEN;
|
|
28
|
+
ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
29
|
+
len1 = WASM_VECTOR_LEN;
|
|
30
|
+
} catch (e) {
|
|
31
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
32
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
33
|
+
throw e;
|
|
34
|
+
}
|
|
35
|
+
wasm.channel_authenticate(this.__wbg_ptr, ptr0, len0, ptr1, len1, val3);
|
|
28
36
|
}
|
|
29
37
|
connect() {
|
|
30
38
|
wasm.channel_connect(this.__wbg_ptr);
|
|
@@ -41,21 +49,35 @@ class Channel {
|
|
|
41
49
|
* @param {number | null} [msg_id]
|
|
42
50
|
*/
|
|
43
51
|
create_service(node_id, kind, name, host, port, username, password, scheme, msg_id) {
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
52
|
+
const val8 = +port;
|
|
53
|
+
const val9 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
54
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6;
|
|
55
|
+
try {
|
|
56
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
57
|
+
len0 = WASM_VECTOR_LEN;
|
|
58
|
+
ptr1 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
59
|
+
len1 = WASM_VECTOR_LEN;
|
|
60
|
+
ptr2 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
61
|
+
len2 = WASM_VECTOR_LEN;
|
|
62
|
+
ptr3 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
63
|
+
len3 = WASM_VECTOR_LEN;
|
|
64
|
+
ptr4 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
65
|
+
len4 = WASM_VECTOR_LEN;
|
|
66
|
+
ptr5 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
67
|
+
len5 = WASM_VECTOR_LEN;
|
|
68
|
+
ptr6 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
69
|
+
len6 = WASM_VECTOR_LEN;
|
|
70
|
+
} catch (e) {
|
|
71
|
+
if (ptr6) { wasm.__wbindgen_export3(ptr6, len6 * 1, 1); }
|
|
72
|
+
if (ptr5) { wasm.__wbindgen_export3(ptr5, len5 * 1, 1); }
|
|
73
|
+
if (ptr4) { wasm.__wbindgen_export3(ptr4, len4 * 1, 1); }
|
|
74
|
+
if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
|
|
75
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
76
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
77
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
78
|
+
throw e;
|
|
79
|
+
}
|
|
80
|
+
wasm.channel_create_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val8, ptr4, len4, ptr5, len5, ptr6, len6, val9);
|
|
59
81
|
}
|
|
60
82
|
/**
|
|
61
83
|
* @param {string} node_id
|
|
@@ -63,11 +85,19 @@ class Channel {
|
|
|
63
85
|
* @param {number | null} [msg_id]
|
|
64
86
|
*/
|
|
65
87
|
delete_service(node_id, id, msg_id) {
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
88
|
+
const val3 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
89
|
+
let ptr0, len0, ptr1, len1;
|
|
90
|
+
try {
|
|
91
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
92
|
+
len0 = WASM_VECTOR_LEN;
|
|
93
|
+
ptr1 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
94
|
+
len1 = WASM_VECTOR_LEN;
|
|
95
|
+
} catch (e) {
|
|
96
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
97
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
98
|
+
throw e;
|
|
99
|
+
}
|
|
100
|
+
wasm.channel_delete_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, val3);
|
|
71
101
|
}
|
|
72
102
|
disconnect() {
|
|
73
103
|
wasm.channel_disconnect(this.__wbg_ptr);
|
|
@@ -92,12 +122,20 @@ class Channel {
|
|
|
92
122
|
* @param {string | null} [server_id]
|
|
93
123
|
*/
|
|
94
124
|
constructor(endpoint, node_id, server_id) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
125
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
126
|
+
try {
|
|
127
|
+
ptr0 = passStringToWasm0(endpoint, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
128
|
+
len0 = WASM_VECTOR_LEN;
|
|
129
|
+
ptr1 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
130
|
+
len1 = WASM_VECTOR_LEN;
|
|
131
|
+
ptr2 = isLikeNone(server_id) ? 0 : passStringToWasm0(server_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
132
|
+
len2 = WASM_VECTOR_LEN;
|
|
133
|
+
} catch (e) {
|
|
134
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
135
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
136
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
137
|
+
throw e;
|
|
138
|
+
}
|
|
101
139
|
const ret = wasm.channel_new(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
102
140
|
this.__wbg_ptr = ret;
|
|
103
141
|
ChannelFinalization.register(this, this.__wbg_ptr, this);
|
|
@@ -107,31 +145,31 @@ class Channel {
|
|
|
107
145
|
* @param {Function | null} [cb]
|
|
108
146
|
*/
|
|
109
147
|
on_connection_close(cb) {
|
|
110
|
-
wasm.channel_on_connection_close(this.__wbg_ptr, isLikeNone(cb) ? 0 :
|
|
148
|
+
wasm.channel_on_connection_close(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
|
|
111
149
|
}
|
|
112
150
|
/**
|
|
113
151
|
* @param {Function | null} [cb]
|
|
114
152
|
*/
|
|
115
153
|
on_connection_error(cb) {
|
|
116
|
-
wasm.channel_on_connection_error(this.__wbg_ptr, isLikeNone(cb) ? 0 :
|
|
154
|
+
wasm.channel_on_connection_error(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
|
|
117
155
|
}
|
|
118
156
|
/**
|
|
119
157
|
* @param {Function | null} [cb]
|
|
120
158
|
*/
|
|
121
159
|
on_connection_message(cb) {
|
|
122
|
-
wasm.channel_on_connection_message(this.__wbg_ptr, isLikeNone(cb) ? 0 :
|
|
160
|
+
wasm.channel_on_connection_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
|
|
123
161
|
}
|
|
124
162
|
/**
|
|
125
163
|
* @param {Function | null} [cb]
|
|
126
164
|
*/
|
|
127
165
|
on_connection_open(cb) {
|
|
128
|
-
wasm.channel_on_connection_open(this.__wbg_ptr, isLikeNone(cb) ? 0 :
|
|
166
|
+
wasm.channel_on_connection_open(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
|
|
129
167
|
}
|
|
130
168
|
/**
|
|
131
169
|
* @param {Function | null} [cb]
|
|
132
170
|
*/
|
|
133
171
|
on_protocol_message(cb) {
|
|
134
|
-
wasm.channel_on_protocol_message(this.__wbg_ptr, isLikeNone(cb) ? 0 :
|
|
172
|
+
wasm.channel_on_protocol_message(this.__wbg_ptr, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
|
|
135
173
|
}
|
|
136
174
|
/**
|
|
137
175
|
* @param {string} frame_type
|
|
@@ -140,7 +178,7 @@ class Channel {
|
|
|
140
178
|
on_protocol_message_type(frame_type, cb) {
|
|
141
179
|
const ptr0 = passStringToWasm0(frame_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
142
180
|
const len0 = WASM_VECTOR_LEN;
|
|
143
|
-
wasm.channel_on_protocol_message_type(this.__wbg_ptr, ptr0, len0, isLikeNone(cb) ? 0 :
|
|
181
|
+
wasm.channel_on_protocol_message_type(this.__wbg_ptr, ptr0, len0, isLikeNone(cb) ? 0 : addToExternrefTable0(cb));
|
|
144
182
|
}
|
|
145
183
|
/**
|
|
146
184
|
* Requests an RDP tunnel. Credentials are validated by the agent but are
|
|
@@ -159,15 +197,25 @@ class Channel {
|
|
|
159
197
|
* @param {number | null} [msg_id]
|
|
160
198
|
*/
|
|
161
199
|
open_rdp_tunnel(node_id, service_id, username, password, msg_id) {
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
200
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
201
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
202
|
+
try {
|
|
203
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
204
|
+
len0 = WASM_VECTOR_LEN;
|
|
205
|
+
ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
206
|
+
len1 = WASM_VECTOR_LEN;
|
|
207
|
+
ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
208
|
+
len2 = WASM_VECTOR_LEN;
|
|
209
|
+
ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
210
|
+
len3 = WASM_VECTOR_LEN;
|
|
211
|
+
} catch (e) {
|
|
212
|
+
if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
|
|
213
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
214
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
215
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
216
|
+
throw e;
|
|
217
|
+
}
|
|
218
|
+
wasm.channel_open_rdp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
|
|
171
219
|
}
|
|
172
220
|
/**
|
|
173
221
|
* @param {string} node_id
|
|
@@ -177,15 +225,25 @@ class Channel {
|
|
|
177
225
|
* @param {number | null} [msg_id]
|
|
178
226
|
*/
|
|
179
227
|
open_sftp_tunnel(node_id, service_id, username, password, msg_id) {
|
|
180
|
-
const
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
228
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
229
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
230
|
+
try {
|
|
231
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
232
|
+
len0 = WASM_VECTOR_LEN;
|
|
233
|
+
ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
234
|
+
len1 = WASM_VECTOR_LEN;
|
|
235
|
+
ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
236
|
+
len2 = WASM_VECTOR_LEN;
|
|
237
|
+
ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
238
|
+
len3 = WASM_VECTOR_LEN;
|
|
239
|
+
} catch (e) {
|
|
240
|
+
if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
|
|
241
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
242
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
243
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
244
|
+
throw e;
|
|
245
|
+
}
|
|
246
|
+
wasm.channel_open_sftp_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
|
|
189
247
|
}
|
|
190
248
|
/**
|
|
191
249
|
* @param {string} node_id
|
|
@@ -195,15 +253,25 @@ class Channel {
|
|
|
195
253
|
* @param {number | null} [msg_id]
|
|
196
254
|
*/
|
|
197
255
|
open_ssh_tunnel(node_id, service_id, username, password, msg_id) {
|
|
198
|
-
const
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
256
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
257
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3;
|
|
258
|
+
try {
|
|
259
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
260
|
+
len0 = WASM_VECTOR_LEN;
|
|
261
|
+
ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
262
|
+
len1 = WASM_VECTOR_LEN;
|
|
263
|
+
ptr2 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
264
|
+
len2 = WASM_VECTOR_LEN;
|
|
265
|
+
ptr3 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
266
|
+
len3 = WASM_VECTOR_LEN;
|
|
267
|
+
} catch (e) {
|
|
268
|
+
if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
|
|
269
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
270
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
271
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
272
|
+
throw e;
|
|
273
|
+
}
|
|
274
|
+
wasm.channel_open_ssh_tunnel(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, val5);
|
|
207
275
|
}
|
|
208
276
|
/**
|
|
209
277
|
* Set permission bits. The agent masks these to `0o7777`.
|
|
@@ -214,11 +282,21 @@ class Channel {
|
|
|
214
282
|
* @param {number | null} [msg_id]
|
|
215
283
|
*/
|
|
216
284
|
send_sftp_chmod(node_id, sid, path, permissions, msg_id) {
|
|
217
|
-
const
|
|
218
|
-
const
|
|
219
|
-
const
|
|
220
|
-
|
|
221
|
-
|
|
285
|
+
const val3 = +sid;
|
|
286
|
+
const val4 = +permissions;
|
|
287
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
288
|
+
let ptr0, len0, ptr1, len1;
|
|
289
|
+
try {
|
|
290
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
291
|
+
len0 = WASM_VECTOR_LEN;
|
|
292
|
+
ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
293
|
+
len1 = WASM_VECTOR_LEN;
|
|
294
|
+
} catch (e) {
|
|
295
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
296
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
297
|
+
throw e;
|
|
298
|
+
}
|
|
299
|
+
wasm.channel_send_sftp_chmod(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4, val5);
|
|
222
300
|
}
|
|
223
301
|
/**
|
|
224
302
|
* @param {string} node_id
|
|
@@ -228,13 +306,23 @@ class Channel {
|
|
|
228
306
|
* @param {number | null} [msg_id]
|
|
229
307
|
*/
|
|
230
308
|
send_sftp_delete(node_id, sid, path, filename, msg_id) {
|
|
231
|
-
const
|
|
232
|
-
const
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
309
|
+
const val4 = +sid;
|
|
310
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
311
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
312
|
+
try {
|
|
313
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
314
|
+
len0 = WASM_VECTOR_LEN;
|
|
315
|
+
ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
316
|
+
len1 = WASM_VECTOR_LEN;
|
|
317
|
+
ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
318
|
+
len2 = WASM_VECTOR_LEN;
|
|
319
|
+
} catch (e) {
|
|
320
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
321
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
322
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
323
|
+
throw e;
|
|
324
|
+
}
|
|
325
|
+
wasm.channel_send_sftp_delete(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
|
|
238
326
|
}
|
|
239
327
|
/**
|
|
240
328
|
* Send a pipelining ACK to the agent: acknowledges all chunks with index ≤ ack_up_to
|
|
@@ -246,9 +334,12 @@ class Channel {
|
|
|
246
334
|
* @param {number} ack_up_to
|
|
247
335
|
*/
|
|
248
336
|
send_sftp_download_ack(node_id, sid, download_id, ack_up_to) {
|
|
337
|
+
const val2 = +sid;
|
|
338
|
+
const val3 = +download_id;
|
|
339
|
+
const val4 = +ack_up_to;
|
|
249
340
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
250
341
|
const len0 = WASM_VECTOR_LEN;
|
|
251
|
-
wasm.channel_send_sftp_download_ack(this.__wbg_ptr, ptr0, len0,
|
|
342
|
+
wasm.channel_send_sftp_download_ack(this.__wbg_ptr, ptr0, len0, val2, val3, val4);
|
|
252
343
|
}
|
|
253
344
|
/**
|
|
254
345
|
* @param {string} node_id
|
|
@@ -258,9 +349,13 @@ class Channel {
|
|
|
258
349
|
* @param {number | null} [msg_id]
|
|
259
350
|
*/
|
|
260
351
|
send_sftp_download_chunk(node_id, sid, download_id, chunk_index, msg_id) {
|
|
352
|
+
const val2 = +sid;
|
|
353
|
+
const val3 = +download_id;
|
|
354
|
+
const val4 = +chunk_index;
|
|
355
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
261
356
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
262
357
|
const len0 = WASM_VECTOR_LEN;
|
|
263
|
-
wasm.channel_send_sftp_download_chunk(this.__wbg_ptr, ptr0, len0,
|
|
358
|
+
wasm.channel_send_sftp_download_chunk(this.__wbg_ptr, ptr0, len0, val2, val3, val4, val5);
|
|
264
359
|
}
|
|
265
360
|
/**
|
|
266
361
|
* @param {string} node_id
|
|
@@ -270,13 +365,23 @@ class Channel {
|
|
|
270
365
|
* @param {number | null} [msg_id]
|
|
271
366
|
*/
|
|
272
367
|
send_sftp_download_start(node_id, sid, path, filename, msg_id) {
|
|
273
|
-
const
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
368
|
+
const val4 = +sid;
|
|
369
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
370
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
371
|
+
try {
|
|
372
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
373
|
+
len0 = WASM_VECTOR_LEN;
|
|
374
|
+
ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
375
|
+
len1 = WASM_VECTOR_LEN;
|
|
376
|
+
ptr2 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
377
|
+
len2 = WASM_VECTOR_LEN;
|
|
378
|
+
} catch (e) {
|
|
379
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
380
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
381
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
382
|
+
throw e;
|
|
383
|
+
}
|
|
384
|
+
wasm.channel_send_sftp_download_start(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
|
|
280
385
|
}
|
|
281
386
|
/**
|
|
282
387
|
* @param {string} node_id
|
|
@@ -285,11 +390,20 @@ class Channel {
|
|
|
285
390
|
* @param {number | null} [msg_id]
|
|
286
391
|
*/
|
|
287
392
|
send_sftp_list_data(node_id, sid, path, msg_id) {
|
|
288
|
-
const
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
393
|
+
const val3 = +sid;
|
|
394
|
+
const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
395
|
+
let ptr0, len0, ptr1, len1;
|
|
396
|
+
try {
|
|
397
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
398
|
+
len0 = WASM_VECTOR_LEN;
|
|
399
|
+
ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
400
|
+
len1 = WASM_VECTOR_LEN;
|
|
401
|
+
} catch (e) {
|
|
402
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
403
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
404
|
+
throw e;
|
|
405
|
+
}
|
|
406
|
+
wasm.channel_send_sftp_list_data(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
|
|
293
407
|
}
|
|
294
408
|
/**
|
|
295
409
|
* Create one directory. Parents must exist already, as with `mkdir`.
|
|
@@ -299,11 +413,20 @@ class Channel {
|
|
|
299
413
|
* @param {number | null} [msg_id]
|
|
300
414
|
*/
|
|
301
415
|
send_sftp_mkdir(node_id, sid, path, msg_id) {
|
|
302
|
-
const
|
|
303
|
-
const
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
416
|
+
const val3 = +sid;
|
|
417
|
+
const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
418
|
+
let ptr0, len0, ptr1, len1;
|
|
419
|
+
try {
|
|
420
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
421
|
+
len0 = WASM_VECTOR_LEN;
|
|
422
|
+
ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
423
|
+
len1 = WASM_VECTOR_LEN;
|
|
424
|
+
} catch (e) {
|
|
425
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
426
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
427
|
+
throw e;
|
|
428
|
+
}
|
|
429
|
+
wasm.channel_send_sftp_mkdir(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
|
|
307
430
|
}
|
|
308
431
|
/**
|
|
309
432
|
* Read a whole file for the in-page editor. Answered with an
|
|
@@ -315,11 +438,20 @@ class Channel {
|
|
|
315
438
|
* @param {number | null} [msg_id]
|
|
316
439
|
*/
|
|
317
440
|
send_sftp_read_file(node_id, sid, path, msg_id) {
|
|
318
|
-
const
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
441
|
+
const val3 = +sid;
|
|
442
|
+
const val4 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
443
|
+
let ptr0, len0, ptr1, len1;
|
|
444
|
+
try {
|
|
445
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
446
|
+
len0 = WASM_VECTOR_LEN;
|
|
447
|
+
ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
448
|
+
len1 = WASM_VECTOR_LEN;
|
|
449
|
+
} catch (e) {
|
|
450
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
451
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
452
|
+
throw e;
|
|
453
|
+
}
|
|
454
|
+
wasm.channel_send_sftp_read_file(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4);
|
|
323
455
|
}
|
|
324
456
|
/**
|
|
325
457
|
* Remove a file, a symlink, or a directory. Without `recursive` the remote
|
|
@@ -331,11 +463,21 @@ class Channel {
|
|
|
331
463
|
* @param {number | null} [msg_id]
|
|
332
464
|
*/
|
|
333
465
|
send_sftp_remove(node_id, sid, path, recursive, msg_id) {
|
|
334
|
-
const
|
|
335
|
-
const
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
|
|
466
|
+
const val3 = +sid;
|
|
467
|
+
const val4 = +recursive;
|
|
468
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
469
|
+
let ptr0, len0, ptr1, len1;
|
|
470
|
+
try {
|
|
471
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
472
|
+
len0 = WASM_VECTOR_LEN;
|
|
473
|
+
ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
474
|
+
len1 = WASM_VECTOR_LEN;
|
|
475
|
+
} catch (e) {
|
|
476
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
477
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
478
|
+
throw e;
|
|
479
|
+
}
|
|
480
|
+
wasm.channel_send_sftp_remove(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1, val4, val5);
|
|
339
481
|
}
|
|
340
482
|
/**
|
|
341
483
|
* Rename or move. `to` is a full path, so one call covers both.
|
|
@@ -346,13 +488,23 @@ class Channel {
|
|
|
346
488
|
* @param {number | null} [msg_id]
|
|
347
489
|
*/
|
|
348
490
|
send_sftp_rename(node_id, sid, from, to, msg_id) {
|
|
349
|
-
const
|
|
350
|
-
const
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
491
|
+
const val4 = +sid;
|
|
492
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
493
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
494
|
+
try {
|
|
495
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
496
|
+
len0 = WASM_VECTOR_LEN;
|
|
497
|
+
ptr1 = passStringToWasm0(from, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
498
|
+
len1 = WASM_VECTOR_LEN;
|
|
499
|
+
ptr2 = passStringToWasm0(to, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
500
|
+
len2 = WASM_VECTOR_LEN;
|
|
501
|
+
} catch (e) {
|
|
502
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
503
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
504
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
505
|
+
throw e;
|
|
506
|
+
}
|
|
507
|
+
wasm.channel_send_sftp_rename(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
|
|
356
508
|
}
|
|
357
509
|
/**
|
|
358
510
|
* @param {string} node_id
|
|
@@ -360,15 +512,27 @@ class Channel {
|
|
|
360
512
|
* @param {number} upload_id
|
|
361
513
|
* @param {number} chunk_index
|
|
362
514
|
* @param {number} chunk_size
|
|
363
|
-
* @param {Uint8Array} data
|
|
515
|
+
* @param {Uint8Array | number[]} data
|
|
364
516
|
* @param {number | null} [msg_id]
|
|
365
517
|
*/
|
|
366
518
|
send_sftp_upload_chunk(node_id, sid, upload_id, chunk_index, chunk_size, data, msg_id) {
|
|
367
|
-
const
|
|
368
|
-
const
|
|
369
|
-
const
|
|
370
|
-
const
|
|
371
|
-
|
|
519
|
+
const val3 = +sid;
|
|
520
|
+
const val4 = +upload_id;
|
|
521
|
+
const val5 = +chunk_index;
|
|
522
|
+
const val6 = +chunk_size;
|
|
523
|
+
const val7 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
524
|
+
let ptr0, len0, ptr1, len1;
|
|
525
|
+
try {
|
|
526
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
527
|
+
len0 = WASM_VECTOR_LEN;
|
|
528
|
+
ptr1 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
529
|
+
len1 = WASM_VECTOR_LEN;
|
|
530
|
+
} catch (e) {
|
|
531
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
532
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
533
|
+
throw e;
|
|
534
|
+
}
|
|
535
|
+
wasm.channel_send_sftp_upload_chunk(this.__wbg_ptr, ptr0, len0, val3, val4, val5, val6, ptr1, len1, val7);
|
|
372
536
|
}
|
|
373
537
|
/**
|
|
374
538
|
* @param {string} node_id
|
|
@@ -380,30 +544,52 @@ class Channel {
|
|
|
380
544
|
* @param {number | null} [msg_id]
|
|
381
545
|
*/
|
|
382
546
|
send_sftp_upload_start(node_id, sid, filename, remote_path, total_chunks, total_size, msg_id) {
|
|
383
|
-
const
|
|
384
|
-
const
|
|
385
|
-
const
|
|
386
|
-
const
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
547
|
+
const val4 = +sid;
|
|
548
|
+
const val5 = +total_chunks;
|
|
549
|
+
const val6 = BigInt.asIntN(64, total_size);
|
|
550
|
+
const val7 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
551
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
552
|
+
try {
|
|
553
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
554
|
+
len0 = WASM_VECTOR_LEN;
|
|
555
|
+
ptr1 = passStringToWasm0(filename, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
556
|
+
len1 = WASM_VECTOR_LEN;
|
|
557
|
+
ptr2 = passStringToWasm0(remote_path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
558
|
+
len2 = WASM_VECTOR_LEN;
|
|
559
|
+
} catch (e) {
|
|
560
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
561
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
562
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
563
|
+
throw e;
|
|
564
|
+
}
|
|
565
|
+
wasm.channel_send_sftp_upload_start(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5, val6, val7);
|
|
390
566
|
}
|
|
391
567
|
/**
|
|
392
568
|
* Write a whole file back, truncating whatever was there.
|
|
393
569
|
* @param {string} node_id
|
|
394
570
|
* @param {number} sid
|
|
395
571
|
* @param {string} path
|
|
396
|
-
* @param {Uint8Array} contents
|
|
572
|
+
* @param {Uint8Array | number[]} contents
|
|
397
573
|
* @param {number | null} [msg_id]
|
|
398
574
|
*/
|
|
399
575
|
send_sftp_write_file(node_id, sid, path, contents, msg_id) {
|
|
400
|
-
const
|
|
401
|
-
const
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
576
|
+
const val4 = +sid;
|
|
577
|
+
const val5 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
578
|
+
let ptr0, len0, ptr1, len1, ptr2, len2;
|
|
579
|
+
try {
|
|
580
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
581
|
+
len0 = WASM_VECTOR_LEN;
|
|
582
|
+
ptr1 = passStringToWasm0(path, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
583
|
+
len1 = WASM_VECTOR_LEN;
|
|
584
|
+
ptr2 = passArray8ToWasm0(contents, wasm.__wbindgen_export);
|
|
585
|
+
len2 = WASM_VECTOR_LEN;
|
|
586
|
+
} catch (e) {
|
|
587
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
588
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
589
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
590
|
+
throw e;
|
|
591
|
+
}
|
|
592
|
+
wasm.channel_send_sftp_write_file(this.__wbg_ptr, ptr0, len0, val4, ptr1, len1, ptr2, len2, val5);
|
|
407
593
|
}
|
|
408
594
|
/**
|
|
409
595
|
* @param {string} node_id
|
|
@@ -414,9 +600,14 @@ class Channel {
|
|
|
414
600
|
* @param {number} px_height
|
|
415
601
|
*/
|
|
416
602
|
send_ssh_terminal_resize(node_id, sid, cols, rows, px_width, px_height) {
|
|
603
|
+
const val2 = +sid;
|
|
604
|
+
const val3 = +cols;
|
|
605
|
+
const val4 = +rows;
|
|
606
|
+
const val5 = +px_width;
|
|
607
|
+
const val6 = +px_height;
|
|
417
608
|
const ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
418
609
|
const len0 = WASM_VECTOR_LEN;
|
|
419
|
-
wasm.channel_send_ssh_terminal_resize(this.__wbg_ptr, ptr0, len0,
|
|
610
|
+
wasm.channel_send_ssh_terminal_resize(this.__wbg_ptr, ptr0, len0, val2, val3, val4, val5, val6);
|
|
420
611
|
}
|
|
421
612
|
/**
|
|
422
613
|
* @param {string} node_id
|
|
@@ -424,11 +615,19 @@ class Channel {
|
|
|
424
615
|
* @param {string} data
|
|
425
616
|
*/
|
|
426
617
|
send_ssh_tunnel_data(node_id, sid, data) {
|
|
427
|
-
const
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
618
|
+
const val3 = +sid;
|
|
619
|
+
let ptr0, len0, ptr1, len1;
|
|
620
|
+
try {
|
|
621
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
622
|
+
len0 = WASM_VECTOR_LEN;
|
|
623
|
+
ptr1 = passStringToWasm0(data, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
624
|
+
len1 = WASM_VECTOR_LEN;
|
|
625
|
+
} catch (e) {
|
|
626
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
627
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
628
|
+
throw e;
|
|
629
|
+
}
|
|
630
|
+
wasm.channel_send_ssh_tunnel_data(this.__wbg_ptr, ptr0, len0, val3, ptr1, len1);
|
|
432
631
|
}
|
|
433
632
|
/**
|
|
434
633
|
* @param {number} interval_as_millis
|
|
@@ -452,23 +651,38 @@ class Channel {
|
|
|
452
651
|
* @param {number | null} [msg_id]
|
|
453
652
|
*/
|
|
454
653
|
update_service(node_id, service_id, kind, name, host, port, username, password, scheme, msg_id) {
|
|
455
|
-
const
|
|
456
|
-
const
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
654
|
+
const val9 = +port;
|
|
655
|
+
const val10 = +(isLikeNone(msg_id) ? Number.MAX_SAFE_INTEGER : (msg_id) >>> 0);
|
|
656
|
+
let ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7;
|
|
657
|
+
try {
|
|
658
|
+
ptr0 = passStringToWasm0(node_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
659
|
+
len0 = WASM_VECTOR_LEN;
|
|
660
|
+
ptr1 = passStringToWasm0(service_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
661
|
+
len1 = WASM_VECTOR_LEN;
|
|
662
|
+
ptr2 = passStringToWasm0(kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
663
|
+
len2 = WASM_VECTOR_LEN;
|
|
664
|
+
ptr3 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
665
|
+
len3 = WASM_VECTOR_LEN;
|
|
666
|
+
ptr4 = passStringToWasm0(host, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
667
|
+
len4 = WASM_VECTOR_LEN;
|
|
668
|
+
ptr5 = isLikeNone(username) ? 0 : passStringToWasm0(username, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
669
|
+
len5 = WASM_VECTOR_LEN;
|
|
670
|
+
ptr6 = isLikeNone(password) ? 0 : passStringToWasm0(password, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
671
|
+
len6 = WASM_VECTOR_LEN;
|
|
672
|
+
ptr7 = isLikeNone(scheme) ? 0 : passStringToWasm0(scheme, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
673
|
+
len7 = WASM_VECTOR_LEN;
|
|
674
|
+
} catch (e) {
|
|
675
|
+
if (ptr7) { wasm.__wbindgen_export3(ptr7, len7 * 1, 1); }
|
|
676
|
+
if (ptr6) { wasm.__wbindgen_export3(ptr6, len6 * 1, 1); }
|
|
677
|
+
if (ptr5) { wasm.__wbindgen_export3(ptr5, len5 * 1, 1); }
|
|
678
|
+
if (ptr4) { wasm.__wbindgen_export3(ptr4, len4 * 1, 1); }
|
|
679
|
+
if (ptr3) { wasm.__wbindgen_export3(ptr3, len3 * 1, 1); }
|
|
680
|
+
if (ptr2) { wasm.__wbindgen_export3(ptr2, len2 * 1, 1); }
|
|
681
|
+
if (ptr1) { wasm.__wbindgen_export3(ptr1, len1 * 1, 1); }
|
|
682
|
+
if (ptr0) { wasm.__wbindgen_export3(ptr0, len0 * 1, 1); }
|
|
683
|
+
throw e;
|
|
684
|
+
}
|
|
685
|
+
wasm.channel_update_service(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, val9, ptr5, len5, ptr6, len6, ptr7, len7, val10);
|
|
472
686
|
}
|
|
473
687
|
}
|
|
474
688
|
if (Symbol.dispose) Channel.prototype[Symbol.dispose] = Channel.prototype.free;
|
|
@@ -486,193 +700,194 @@ const ErrorType = Object.freeze({
|
|
|
486
700
|
function __wbg_get_imports() {
|
|
487
701
|
const import0 = {
|
|
488
702
|
__proto__: null,
|
|
489
|
-
|
|
703
|
+
__wbg_Error_208446807d0d1e30: function(arg0, arg1) {
|
|
490
704
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
491
|
-
return
|
|
705
|
+
return ret;
|
|
492
706
|
},
|
|
493
707
|
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
494
|
-
const ret = String(
|
|
708
|
+
const ret = String(arg1);
|
|
495
709
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
496
710
|
const len1 = WASM_VECTOR_LEN;
|
|
497
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
498
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
711
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
712
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
499
713
|
},
|
|
500
|
-
|
|
501
|
-
const ret = debugString(
|
|
714
|
+
__wbg___wbindgen_debug_string_f249a2a76caa9a55: function(arg0, arg1) {
|
|
715
|
+
const ret = debugString(arg1);
|
|
502
716
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
503
717
|
const len1 = WASM_VECTOR_LEN;
|
|
504
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
505
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
718
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
719
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
506
720
|
},
|
|
507
|
-
|
|
508
|
-
const obj =
|
|
721
|
+
__wbg___wbindgen_string_get_7ce8eee7fd327545: function(arg0, arg1) {
|
|
722
|
+
const obj = arg1;
|
|
509
723
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
510
724
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
511
725
|
var len1 = WASM_VECTOR_LEN;
|
|
512
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
513
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
726
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 1, len1, true);
|
|
727
|
+
getDataViewMemory0().setInt32((arg0 >>> 0) + 4 * 0, ptr1, true);
|
|
514
728
|
},
|
|
515
|
-
|
|
729
|
+
__wbg___wbindgen_throw_4c88d8bf264fd984: function(arg0, arg1) {
|
|
516
730
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
517
731
|
},
|
|
518
|
-
|
|
519
|
-
|
|
732
|
+
__wbg__wbg_cb_unref_09736879a3f67559: function(arg0) {
|
|
733
|
+
arg0._wbg_cb_unref();
|
|
520
734
|
},
|
|
521
|
-
|
|
522
|
-
const ret =
|
|
523
|
-
return
|
|
735
|
+
__wbg_call_40b008ba32f73991: function() { return handleError(function (arg0, arg1) {
|
|
736
|
+
const ret = arg0.call(arg1);
|
|
737
|
+
return ret;
|
|
524
738
|
}, arguments); },
|
|
525
|
-
|
|
526
|
-
const ret =
|
|
527
|
-
return
|
|
739
|
+
__wbg_call_a410eb4b59ed5965: function() { return handleError(function (arg0, arg1, arg2) {
|
|
740
|
+
const ret = arg0.call(arg1, arg2);
|
|
741
|
+
return ret;
|
|
528
742
|
}, arguments); },
|
|
529
|
-
|
|
530
|
-
const ret =
|
|
531
|
-
return
|
|
743
|
+
__wbg_call_fc92fee6137d452d: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
744
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
745
|
+
return ret;
|
|
532
746
|
}, arguments); },
|
|
533
747
|
__wbg_clearInterval_26ba580547547579: function(arg0) {
|
|
534
|
-
const ret = clearInterval(
|
|
535
|
-
return
|
|
748
|
+
const ret = clearInterval(arg0);
|
|
749
|
+
return ret;
|
|
536
750
|
},
|
|
537
|
-
|
|
538
|
-
|
|
751
|
+
__wbg_close_5ee9c5fe4e8754a4: function() { return handleError(function (arg0) {
|
|
752
|
+
arg0.close();
|
|
539
753
|
}, arguments); },
|
|
540
|
-
|
|
541
|
-
const ret =
|
|
542
|
-
return
|
|
754
|
+
__wbg_data_c7e5e8500f1bca2f: function(arg0) {
|
|
755
|
+
const ret = arg0.data;
|
|
756
|
+
return ret;
|
|
543
757
|
},
|
|
544
|
-
|
|
545
|
-
const ret = Array.from(
|
|
546
|
-
return
|
|
758
|
+
__wbg_from_eac91875c8a5ffa4: function(arg0) {
|
|
759
|
+
const ret = Array.from(arg0);
|
|
760
|
+
return ret;
|
|
547
761
|
},
|
|
548
|
-
|
|
762
|
+
__wbg_getRandomValues_5d8c030b527203a6: function() { return handleError(function (arg0, arg1) {
|
|
549
763
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
550
764
|
}, arguments); },
|
|
551
|
-
|
|
552
|
-
const ret = Reflect.get(
|
|
553
|
-
return
|
|
765
|
+
__wbg_get_2080c49015e35254: function() { return handleError(function (arg0, arg1) {
|
|
766
|
+
const ret = Reflect.get(arg0, arg1);
|
|
767
|
+
return ret;
|
|
554
768
|
}, arguments); },
|
|
555
|
-
|
|
769
|
+
__wbg_info_2b8ee6588e4c6072: function(arg0, arg1) {
|
|
556
770
|
console.info(getStringFromWasm0(arg0, arg1));
|
|
557
771
|
},
|
|
558
|
-
|
|
772
|
+
__wbg_instanceof_ArrayBuffer_12cdaa4161423e6b: function(arg0) {
|
|
559
773
|
let result;
|
|
560
774
|
try {
|
|
561
|
-
result =
|
|
775
|
+
result = arg0 instanceof ArrayBuffer;
|
|
562
776
|
} catch (_) {
|
|
563
777
|
result = false;
|
|
564
778
|
}
|
|
565
779
|
const ret = result;
|
|
566
780
|
return ret;
|
|
567
781
|
},
|
|
568
|
-
|
|
569
|
-
const ret =
|
|
782
|
+
__wbg_length_186163212ffe79c3: function(arg0) {
|
|
783
|
+
const ret = arg0.length;
|
|
570
784
|
return ret;
|
|
571
785
|
},
|
|
572
|
-
|
|
573
|
-
const ret = new Uint8Array(
|
|
574
|
-
return
|
|
575
|
-
},
|
|
576
|
-
__wbg_new_617a8cdb8bb1130e: function() {
|
|
577
|
-
const ret = new Object();
|
|
578
|
-
return addHeapObject(ret);
|
|
786
|
+
__wbg_new_13de428334042d26: function(arg0) {
|
|
787
|
+
const ret = new Uint8Array(arg0);
|
|
788
|
+
return ret;
|
|
579
789
|
},
|
|
580
|
-
|
|
790
|
+
__wbg_new_37eb45aaf5eeb820: function() {
|
|
581
791
|
const ret = new Array();
|
|
582
|
-
return
|
|
792
|
+
return ret;
|
|
583
793
|
},
|
|
584
|
-
|
|
585
|
-
const ret = new
|
|
586
|
-
return
|
|
794
|
+
__wbg_new_cd4348290afae586: function() {
|
|
795
|
+
const ret = new Object();
|
|
796
|
+
return ret;
|
|
797
|
+
},
|
|
798
|
+
__wbg_new_with_str_sequence_75b26d88172889d0: function() { return handleError(function (arg0, arg1, arg2) {
|
|
799
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
|
|
800
|
+
return ret;
|
|
587
801
|
}, arguments); },
|
|
588
|
-
|
|
589
|
-
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1),
|
|
802
|
+
__wbg_prototypesetcall_13162965d1fe7aa3: function(arg0, arg1, arg2) {
|
|
803
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
590
804
|
},
|
|
591
|
-
|
|
592
|
-
const ret =
|
|
805
|
+
__wbg_push_c9f4893fc209f768: function(arg0, arg1) {
|
|
806
|
+
const ret = arg0.push(arg1);
|
|
593
807
|
return ret;
|
|
594
808
|
},
|
|
595
|
-
|
|
596
|
-
const ret =
|
|
809
|
+
__wbg_readyState_039bc047141a5f6d: function(arg0) {
|
|
810
|
+
const ret = arg0.readyState;
|
|
597
811
|
return ret;
|
|
598
812
|
},
|
|
599
|
-
|
|
600
|
-
|
|
813
|
+
__wbg_send_d83d0891cf698779: function() { return handleError(function (arg0, arg1, arg2) {
|
|
814
|
+
arg0.send(getArrayU8FromWasm0(arg1, arg2));
|
|
601
815
|
}, arguments); },
|
|
602
|
-
|
|
603
|
-
const ret = setInterval(
|
|
604
|
-
return
|
|
816
|
+
__wbg_setInterval_d933acbf2578adfa: function() { return handleError(function (arg0, arg1) {
|
|
817
|
+
const ret = setInterval(arg0, arg1);
|
|
818
|
+
return ret;
|
|
605
819
|
}, arguments); },
|
|
606
|
-
|
|
607
|
-
|
|
820
|
+
__wbg_set_binaryType_d5b4dafd0f127fb2: function(arg0, arg1) {
|
|
821
|
+
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
608
822
|
},
|
|
609
|
-
|
|
610
|
-
|
|
823
|
+
__wbg_set_d2d33b52458e984a: function(arg0, arg1, arg2) {
|
|
824
|
+
arg0[arg1 >>> 0] = arg2;
|
|
611
825
|
},
|
|
612
|
-
|
|
613
|
-
|
|
826
|
+
__wbg_set_e4b9a833d288759a: function(arg0, arg1, arg2) {
|
|
827
|
+
arg0[arg1] = arg2;
|
|
614
828
|
},
|
|
615
|
-
|
|
616
|
-
|
|
829
|
+
__wbg_set_onclose_078935cf8d0fb024: function(arg0, arg1) {
|
|
830
|
+
arg0.onclose = arg1;
|
|
617
831
|
},
|
|
618
|
-
|
|
619
|
-
|
|
832
|
+
__wbg_set_onerror_f7f089f7f059501c: function(arg0, arg1) {
|
|
833
|
+
arg0.onerror = arg1;
|
|
620
834
|
},
|
|
621
|
-
|
|
622
|
-
|
|
835
|
+
__wbg_set_onmessage_26abc49cfa5f9ffc: function(arg0, arg1) {
|
|
836
|
+
arg0.onmessage = arg1;
|
|
623
837
|
},
|
|
624
|
-
|
|
625
|
-
|
|
838
|
+
__wbg_set_onopen_757be120cc7b1ea6: function(arg0, arg1) {
|
|
839
|
+
arg0.onopen = arg1;
|
|
626
840
|
},
|
|
627
|
-
|
|
841
|
+
__wbg_warn_b0df9a9e7105e74b: function(arg0, arg1) {
|
|
628
842
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
629
843
|
},
|
|
630
844
|
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
631
845
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
632
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
633
|
-
return
|
|
846
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63);
|
|
847
|
+
return ret;
|
|
634
848
|
},
|
|
635
849
|
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
636
850
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
637
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
638
|
-
return
|
|
851
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63_37);
|
|
852
|
+
return ret;
|
|
639
853
|
},
|
|
640
854
|
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
641
855
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 1, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
642
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
643
|
-
return
|
|
856
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_63_38);
|
|
857
|
+
return ret;
|
|
644
858
|
},
|
|
645
859
|
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
646
860
|
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [], shim_idx: 5, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
647
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
648
|
-
return
|
|
861
|
+
const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_67);
|
|
862
|
+
return ret;
|
|
649
863
|
},
|
|
650
864
|
__wbindgen_generic_0000000000000005: function(arg0) {
|
|
651
865
|
// Cast intrinsic for `F64 -> Externref`.
|
|
652
866
|
const ret = arg0;
|
|
653
|
-
return
|
|
867
|
+
return ret;
|
|
654
868
|
},
|
|
655
869
|
__wbindgen_generic_0000000000000006: function(arg0, arg1) {
|
|
656
870
|
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
657
871
|
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
658
|
-
return
|
|
872
|
+
return ret;
|
|
659
873
|
},
|
|
660
874
|
__wbindgen_generic_0000000000000007: function(arg0, arg1) {
|
|
661
875
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
662
876
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
663
|
-
return
|
|
877
|
+
return ret;
|
|
664
878
|
},
|
|
665
879
|
__wbindgen_generic_0000000000000008: function(arg0) {
|
|
666
880
|
// Cast intrinsic for `U64 -> Externref`.
|
|
667
881
|
const ret = BigInt.asUintN(64, arg0);
|
|
668
|
-
return
|
|
669
|
-
},
|
|
670
|
-
__wbindgen_object_clone_ref: function(arg0) {
|
|
671
|
-
const ret = getObject(arg0);
|
|
672
|
-
return addHeapObject(ret);
|
|
882
|
+
return ret;
|
|
673
883
|
},
|
|
674
|
-
|
|
675
|
-
|
|
884
|
+
__wbindgen_init_externref_table: function() {
|
|
885
|
+
const table = wasm.__wbindgen_externrefs;
|
|
886
|
+
table.set(0, undefined);
|
|
887
|
+
table.set(1024, undefined);
|
|
888
|
+
table.set(1025, null);
|
|
889
|
+
table.set(1026, true);
|
|
890
|
+
table.set(1027, false);
|
|
676
891
|
},
|
|
677
892
|
};
|
|
678
893
|
return {
|
|
@@ -681,20 +896,20 @@ function __wbg_get_imports() {
|
|
|
681
896
|
};
|
|
682
897
|
}
|
|
683
898
|
|
|
684
|
-
function
|
|
685
|
-
wasm.
|
|
899
|
+
function __wasm_bindgen_func_elem_67(arg0, arg1) {
|
|
900
|
+
wasm.__wasm_bindgen_func_elem_67(arg0, arg1);
|
|
686
901
|
}
|
|
687
902
|
|
|
688
|
-
function
|
|
689
|
-
wasm.
|
|
903
|
+
function __wasm_bindgen_func_elem_63(arg0, arg1, arg2) {
|
|
904
|
+
wasm.__wasm_bindgen_func_elem_63(arg0, arg1, arg2);
|
|
690
905
|
}
|
|
691
906
|
|
|
692
|
-
function
|
|
693
|
-
wasm.
|
|
907
|
+
function __wasm_bindgen_func_elem_63_37(arg0, arg1, arg2) {
|
|
908
|
+
wasm.__wasm_bindgen_func_elem_63_37(arg0, arg1, arg2);
|
|
694
909
|
}
|
|
695
910
|
|
|
696
|
-
function
|
|
697
|
-
wasm.
|
|
911
|
+
function __wasm_bindgen_func_elem_63_38(arg0, arg1, arg2) {
|
|
912
|
+
wasm.__wasm_bindgen_func_elem_63_38(arg0, arg1, arg2);
|
|
698
913
|
}
|
|
699
914
|
|
|
700
915
|
|
|
@@ -703,88 +918,72 @@ const ChannelFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
703
918
|
? { register: () => {}, unregister: () => {} }
|
|
704
919
|
: new FinalizationRegistry(ptr => wasm.__wbg_channel_free(ptr, 1));
|
|
705
920
|
|
|
706
|
-
function
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
heap_next = heap[idx];
|
|
710
|
-
|
|
711
|
-
heap[idx] = obj;
|
|
921
|
+
function addToExternrefTable0(obj) {
|
|
922
|
+
const idx = wasm.__wbindgen_export5();
|
|
923
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
712
924
|
return idx;
|
|
713
925
|
}
|
|
714
926
|
|
|
715
927
|
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
716
928
|
? { register: () => {}, unregister: () => {} }
|
|
717
|
-
: new FinalizationRegistry(state => wasm.
|
|
929
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_export6(state.a, state.b));
|
|
718
930
|
|
|
719
931
|
function debugString(val) {
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
return 'Object(' + JSON.stringify(val) + ')';
|
|
772
|
-
} catch (_) {
|
|
773
|
-
return 'Object';
|
|
932
|
+
switch (typeof val) {
|
|
933
|
+
// primitive types
|
|
934
|
+
case 'number':
|
|
935
|
+
case 'boolean':
|
|
936
|
+
case 'undefined':
|
|
937
|
+
return `${val}`;
|
|
938
|
+
case 'string':
|
|
939
|
+
return JSON.stringify(val);
|
|
940
|
+
case 'bigint':
|
|
941
|
+
return `${val}n`;
|
|
942
|
+
case 'symbol':
|
|
943
|
+
return val.description !== undefined
|
|
944
|
+
? `Symbol(${val.description})`
|
|
945
|
+
: 'Symbol';
|
|
946
|
+
case 'function':
|
|
947
|
+
return typeof val.name === 'string' && val.name !== ''
|
|
948
|
+
? `Function(${val.name})`
|
|
949
|
+
: 'Function';
|
|
950
|
+
case 'object': {
|
|
951
|
+
if (val === null) {
|
|
952
|
+
return 'null';
|
|
953
|
+
}
|
|
954
|
+
// objects
|
|
955
|
+
if (Array.isArray(val)) {
|
|
956
|
+
return '[' + Array.from(val, debugString).join(', ') + ']';
|
|
957
|
+
}
|
|
958
|
+
// errors
|
|
959
|
+
if (val instanceof Error) {
|
|
960
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
const toStringOutput = toString.call(val);
|
|
964
|
+
// Test for built-in
|
|
965
|
+
const className = /\[object ([^\]]+)\]/.exec(toStringOutput)?.[1];
|
|
966
|
+
|
|
967
|
+
// Failed to match the standard '[object ClassName]'
|
|
968
|
+
if (className === undefined) {
|
|
969
|
+
return toStringOutput;
|
|
970
|
+
}
|
|
971
|
+
if (className === 'Object') {
|
|
972
|
+
// we're a user defined class or Object
|
|
973
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
974
|
+
// easier than looping through ownProperties of `val`.
|
|
975
|
+
try {
|
|
976
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
977
|
+
} catch (_) {
|
|
978
|
+
return 'Object';
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
982
|
+
return className;
|
|
774
983
|
}
|
|
984
|
+
// Per MDN: 'This list of values is exhaustive.'
|
|
985
|
+
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof#description
|
|
775
986
|
}
|
|
776
|
-
// errors
|
|
777
|
-
if (val instanceof Error) {
|
|
778
|
-
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
779
|
-
}
|
|
780
|
-
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
781
|
-
return className;
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
function dropObject(idx) {
|
|
785
|
-
if (idx < 1028) return;
|
|
786
|
-
heap[idx] = heap_next;
|
|
787
|
-
heap_next = idx;
|
|
788
987
|
}
|
|
789
988
|
|
|
790
989
|
function getArrayU8FromWasm0(ptr, len) {
|
|
@@ -801,7 +1000,8 @@ function getDataViewMemory0() {
|
|
|
801
1000
|
}
|
|
802
1001
|
|
|
803
1002
|
function getStringFromWasm0(ptr, len) {
|
|
804
|
-
|
|
1003
|
+
ptr = ptr >>> 0;
|
|
1004
|
+
return decodeText(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
805
1005
|
}
|
|
806
1006
|
|
|
807
1007
|
let cachedUint8ArrayMemory0 = null;
|
|
@@ -812,21 +1012,15 @@ function getUint8ArrayMemory0() {
|
|
|
812
1012
|
return cachedUint8ArrayMemory0;
|
|
813
1013
|
}
|
|
814
1014
|
|
|
815
|
-
function getObject(idx) { return heap[idx]; }
|
|
816
|
-
|
|
817
1015
|
function handleError(f, args) {
|
|
818
1016
|
try {
|
|
819
1017
|
return f.apply(this, args);
|
|
820
1018
|
} catch (e) {
|
|
821
|
-
|
|
1019
|
+
const idx = addToExternrefTable0(e);
|
|
1020
|
+
wasm.__wbindgen_export4(idx);
|
|
822
1021
|
}
|
|
823
1022
|
}
|
|
824
1023
|
|
|
825
|
-
let heap = new Array(1024).fill(undefined);
|
|
826
|
-
heap.push(undefined, null, true, false);
|
|
827
|
-
|
|
828
|
-
let heap_next = heap.length;
|
|
829
|
-
|
|
830
1024
|
function isLikeNone(x) {
|
|
831
1025
|
return x === undefined || x === null;
|
|
832
1026
|
}
|
|
@@ -850,7 +1044,7 @@ function makeMutClosure(arg0, arg1, f) {
|
|
|
850
1044
|
};
|
|
851
1045
|
real._wbg_cb_unref = () => {
|
|
852
1046
|
if (--state.cnt === 0) {
|
|
853
|
-
wasm.
|
|
1047
|
+
wasm.__wbindgen_export6(state.a, state.b);
|
|
854
1048
|
state.a = 0;
|
|
855
1049
|
CLOSURE_DTORS.unregister(state);
|
|
856
1050
|
}
|
|
@@ -903,24 +1097,18 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
903
1097
|
return ptr;
|
|
904
1098
|
}
|
|
905
1099
|
|
|
906
|
-
|
|
907
|
-
const ret = getObject(idx);
|
|
908
|
-
dropObject(idx);
|
|
909
|
-
return ret;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
1100
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
913
1101
|
cachedTextDecoder.decode();
|
|
914
1102
|
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
915
1103
|
let numBytesDecoded = 0;
|
|
916
|
-
function decodeText(
|
|
917
|
-
numBytesDecoded +=
|
|
1104
|
+
function decodeText(bytes) {
|
|
1105
|
+
numBytesDecoded += bytes.length;
|
|
918
1106
|
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
919
|
-
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true
|
|
1107
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true });
|
|
920
1108
|
cachedTextDecoder.decode();
|
|
921
|
-
numBytesDecoded =
|
|
1109
|
+
numBytesDecoded = bytes.length;
|
|
922
1110
|
}
|
|
923
|
-
return cachedTextDecoder.decode(
|
|
1111
|
+
return cachedTextDecoder.decode(bytes);
|
|
924
1112
|
}
|
|
925
1113
|
|
|
926
1114
|
const cachedTextEncoder = new TextEncoder();
|
|
@@ -943,6 +1131,7 @@ function __wbg_finalize_init(instance, module) {
|
|
|
943
1131
|
wasm = instance.exports;
|
|
944
1132
|
cachedDataViewMemory0 = null;
|
|
945
1133
|
cachedUint8ArrayMemory0 = null;
|
|
1134
|
+
wasm.__wbindgen_start();
|
|
946
1135
|
return wasm;
|
|
947
1136
|
}
|
|
948
1137
|
|
|
@@ -985,9 +1174,17 @@ async function __wbg_load(module, imports) {
|
|
|
985
1174
|
}
|
|
986
1175
|
}
|
|
987
1176
|
|
|
1177
|
+
let __wbg_init_promise;
|
|
988
1178
|
async function __wbg_init(module_or_path) {
|
|
989
1179
|
if (wasm !== undefined) return wasm;
|
|
1180
|
+
if (__wbg_init_promise === undefined) {
|
|
1181
|
+
__wbg_init_promise = __wbg_init_once(module_or_path);
|
|
1182
|
+
__wbg_init_promise.catch(() => { __wbg_init_promise = undefined; });
|
|
1183
|
+
}
|
|
1184
|
+
return __wbg_init_promise;
|
|
1185
|
+
}
|
|
990
1186
|
|
|
1187
|
+
async function __wbg_init_once(module_or_path) {
|
|
991
1188
|
|
|
992
1189
|
if (module_or_path !== undefined) {
|
|
993
1190
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
@@ -998,7 +1195,7 @@ async function __wbg_init(module_or_path) {
|
|
|
998
1195
|
}
|
|
999
1196
|
|
|
1000
1197
|
if (module_or_path === undefined) {
|
|
1001
|
-
module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-
|
|
1198
|
+
module_or_path = new URL('phirepass-channel_bg.wasm', (typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('protocol-DCBMfc2u.js', document.baseURI).href)));
|
|
1002
1199
|
}
|
|
1003
1200
|
const imports = __wbg_get_imports();
|
|
1004
1201
|
|