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