@rivetkit/rivetkit-wasm 0.0.0-sqlite-uds.37f9e48 → 0.0.0-sqlite-sync-3x-release.a00b07f
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/index.d.ts +2 -176
- package/package.json +7 -2
- package/pkg/package.json +19 -0
- package/pkg/rivetkit_wasm.d.ts +351 -242
- package/pkg/rivetkit_wasm.js +1916 -1561
- package/pkg/rivetkit_wasm_bg.wasm +0 -0
- package/pkg/rivetkit_wasm_bg.wasm.d.ts +43 -14
package/pkg/rivetkit_wasm.js
CHANGED
|
@@ -1,734 +1,956 @@
|
|
|
1
|
-
|
|
1
|
+
/* @ts-self-types="./rivetkit_wasm.d.ts" */
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
3
|
+
export class ActorContext {
|
|
4
|
+
static __wrap(ptr) {
|
|
5
|
+
const obj = Object.create(ActorContext.prototype);
|
|
6
|
+
obj.__wbg_ptr = ptr;
|
|
7
|
+
ActorContextFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
8
|
+
return obj;
|
|
10
9
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
17
|
-
? function (arg, view) {
|
|
18
|
-
return cachedTextEncoder.encodeInto(arg, view);
|
|
19
|
-
}
|
|
20
|
-
: function (arg, view) {
|
|
21
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
22
|
-
view.set(buf);
|
|
23
|
-
return {
|
|
24
|
-
read: arg.length,
|
|
25
|
-
written: buf.length
|
|
26
|
-
};
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
function passStringToWasm0(arg, malloc, realloc) {
|
|
30
|
-
|
|
31
|
-
if (realloc === undefined) {
|
|
32
|
-
const buf = cachedTextEncoder.encode(arg);
|
|
33
|
-
const ptr = malloc(buf.length, 1) >>> 0;
|
|
34
|
-
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
35
|
-
WASM_VECTOR_LEN = buf.length;
|
|
10
|
+
__destroy_into_raw() {
|
|
11
|
+
const ptr = this.__wbg_ptr;
|
|
12
|
+
this.__wbg_ptr = 0;
|
|
13
|
+
ActorContextFinalization.unregister(this);
|
|
36
14
|
return ptr;
|
|
37
15
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
const mem = getUint8ArrayMemory0();
|
|
43
|
-
|
|
44
|
-
let offset = 0;
|
|
45
|
-
|
|
46
|
-
for (; offset < len; offset++) {
|
|
47
|
-
const code = arg.charCodeAt(offset);
|
|
48
|
-
if (code > 0x7F) break;
|
|
49
|
-
mem[ptr + offset] = code;
|
|
16
|
+
free() {
|
|
17
|
+
const ptr = this.__destroy_into_raw();
|
|
18
|
+
wasm.__wbg_actorcontext_free(ptr, 0);
|
|
50
19
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
20
|
+
/**
|
|
21
|
+
* @returns {any}
|
|
22
|
+
*/
|
|
23
|
+
abortSignal() {
|
|
24
|
+
const ret = wasm.actorcontext_abortSignal(this.__wbg_ptr);
|
|
25
|
+
if (ret[2]) {
|
|
26
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
55
27
|
}
|
|
56
|
-
|
|
57
|
-
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
58
|
-
const ret = encodeString(arg, view);
|
|
59
|
-
|
|
60
|
-
offset += ret.written;
|
|
61
|
-
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
28
|
+
return takeFromExternrefTable0(ret[0]);
|
|
62
29
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
let
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
30
|
+
/**
|
|
31
|
+
* @returns {string}
|
|
32
|
+
*/
|
|
33
|
+
actorId() {
|
|
34
|
+
let deferred1_0;
|
|
35
|
+
let deferred1_1;
|
|
36
|
+
try {
|
|
37
|
+
const ret = wasm.actorcontext_actorId(this.__wbg_ptr);
|
|
38
|
+
deferred1_0 = ret[0];
|
|
39
|
+
deferred1_1 = ret[1];
|
|
40
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
41
|
+
} finally {
|
|
42
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
43
|
+
}
|
|
73
44
|
}
|
|
74
|
-
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return idx;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function handleError(f, args) {
|
|
84
|
-
try {
|
|
85
|
-
return f.apply(this, args);
|
|
86
|
-
} catch (e) {
|
|
87
|
-
const idx = addToExternrefTable0(e);
|
|
88
|
-
wasm.__wbindgen_exn_store(idx);
|
|
45
|
+
/**
|
|
46
|
+
* @returns {number}
|
|
47
|
+
*/
|
|
48
|
+
beginKeepAwake() {
|
|
49
|
+
const ret = wasm.actorcontext_beginKeepAwake(this.__wbg_ptr);
|
|
50
|
+
return ret >>> 0;
|
|
89
51
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
52
|
+
beginOnStateChange() {
|
|
53
|
+
wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @param {number | null} [timeout_ms]
|
|
57
|
+
* @returns {Promise<ActorStateTransaction>}
|
|
58
|
+
*/
|
|
59
|
+
beginStateTransaction(timeout_ms) {
|
|
60
|
+
const ret = wasm.actorcontext_beginStateTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
|
|
61
|
+
return ret;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @returns {number}
|
|
65
|
+
*/
|
|
66
|
+
beginWebsocketCallback() {
|
|
67
|
+
const ret = wasm.actorcontext_beginWebsocketCallback(this.__wbg_ptr);
|
|
68
|
+
return ret >>> 0;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* @param {string} name
|
|
72
|
+
* @param {Uint8Array} args
|
|
73
|
+
*/
|
|
74
|
+
broadcast(name, args) {
|
|
75
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
76
|
+
const len0 = WASM_VECTOR_LEN;
|
|
77
|
+
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
78
|
+
const len1 = WASM_VECTOR_LEN;
|
|
79
|
+
wasm.actorcontext_broadcast(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @param {Uint8Array} params
|
|
83
|
+
* @param {any} request
|
|
84
|
+
* @returns {Promise<ConnHandle>}
|
|
85
|
+
*/
|
|
86
|
+
connectConn(params, request) {
|
|
87
|
+
const ptr0 = passArray8ToWasm0(params, wasm.__wbindgen_malloc);
|
|
88
|
+
const len0 = WASM_VECTOR_LEN;
|
|
89
|
+
const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
|
|
90
|
+
return ret;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* @returns {Array<any>}
|
|
94
|
+
*/
|
|
95
|
+
conns() {
|
|
96
|
+
const ret = wasm.actorcontext_conns(this.__wbg_ptr);
|
|
97
|
+
return ret;
|
|
98
|
+
}
|
|
99
|
+
destroy() {
|
|
100
|
+
const ret = wasm.actorcontext_destroy(this.__wbg_ptr);
|
|
101
|
+
if (ret[1]) {
|
|
102
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* @returns {Array<any>}
|
|
107
|
+
*/
|
|
108
|
+
dirtyHibernatableConns() {
|
|
109
|
+
const ret = wasm.actorcontext_dirtyHibernatableConns(this.__wbg_ptr);
|
|
110
|
+
return ret;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @param {number} region_id
|
|
114
|
+
*/
|
|
115
|
+
endKeepAwake(region_id) {
|
|
116
|
+
wasm.actorcontext_endKeepAwake(this.__wbg_ptr, region_id);
|
|
117
|
+
}
|
|
118
|
+
endOnStateChange() {
|
|
119
|
+
wasm.actorcontext_endOnStateChange(this.__wbg_ptr);
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @param {number} region_id
|
|
123
|
+
*/
|
|
124
|
+
endWebsocketCallback(region_id) {
|
|
125
|
+
wasm.actorcontext_endWebsocketCallback(this.__wbg_ptr, region_id);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* @returns {object}
|
|
129
|
+
*/
|
|
130
|
+
inspectorSnapshot() {
|
|
131
|
+
const ret = wasm.actorcontext_inspectorSnapshot(this.__wbg_ptr);
|
|
132
|
+
if (ret[2]) {
|
|
133
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
134
|
+
}
|
|
135
|
+
return takeFromExternrefTable0(ret[0]);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* @param {Promise<any>} promise
|
|
139
|
+
*/
|
|
140
|
+
keepAwake(promise) {
|
|
141
|
+
wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* @returns {any}
|
|
145
|
+
*/
|
|
146
|
+
key() {
|
|
147
|
+
const ret = wasm.actorcontext_key(this.__wbg_ptr);
|
|
148
|
+
if (ret[2]) {
|
|
149
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
150
|
+
}
|
|
151
|
+
return takeFromExternrefTable0(ret[0]);
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @returns {Kv}
|
|
155
|
+
*/
|
|
156
|
+
kv() {
|
|
157
|
+
const ret = wasm.actorcontext_kv(this.__wbg_ptr);
|
|
158
|
+
return Kv.__wrap(ret);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* @returns {string}
|
|
162
|
+
*/
|
|
163
|
+
name() {
|
|
164
|
+
let deferred1_0;
|
|
165
|
+
let deferred1_1;
|
|
125
166
|
try {
|
|
126
|
-
|
|
167
|
+
const ret = wasm.actorcontext_name(this.__wbg_ptr);
|
|
168
|
+
deferred1_0 = ret[0];
|
|
169
|
+
deferred1_1 = ret[1];
|
|
170
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
127
171
|
} finally {
|
|
128
|
-
|
|
129
|
-
wasm.__wbindgen_export_6.get(state.dtor)(a, state.b);
|
|
130
|
-
CLOSURE_DTORS.unregister(state);
|
|
131
|
-
} else {
|
|
132
|
-
state.a = a;
|
|
133
|
-
}
|
|
172
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
134
173
|
}
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
174
|
+
}
|
|
175
|
+
constructor() {
|
|
176
|
+
const ret = wasm.actorcontext_new();
|
|
177
|
+
if (ret[2]) {
|
|
178
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
179
|
+
}
|
|
180
|
+
this.__wbg_ptr = ret[0];
|
|
181
|
+
ActorContextFinalization.register(this, this.__wbg_ptr, this);
|
|
182
|
+
return this;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* @returns {Queue}
|
|
186
|
+
*/
|
|
187
|
+
queue() {
|
|
188
|
+
const ret = wasm.actorcontext_queue(this.__wbg_ptr);
|
|
189
|
+
return Queue.__wrap(ret);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @returns {string}
|
|
193
|
+
*/
|
|
194
|
+
region() {
|
|
195
|
+
let deferred1_0;
|
|
196
|
+
let deferred1_1;
|
|
197
|
+
try {
|
|
198
|
+
const ret = wasm.actorcontext_region(this.__wbg_ptr);
|
|
199
|
+
deferred1_0 = ret[0];
|
|
200
|
+
deferred1_1 = ret[1];
|
|
201
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
202
|
+
} finally {
|
|
203
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* @param {Promise<any>} promise
|
|
208
|
+
*/
|
|
209
|
+
registerTask(promise) {
|
|
210
|
+
wasm.actorcontext_registerTask(this.__wbg_ptr, promise);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* @param {any} opts
|
|
214
|
+
* @returns {Promise<void>}
|
|
215
|
+
*/
|
|
216
|
+
requestSaveAndWait(opts) {
|
|
217
|
+
const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
|
|
218
|
+
return ret;
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* @param {any} opts
|
|
222
|
+
*/
|
|
223
|
+
requestSave(opts) {
|
|
224
|
+
wasm.actorcontext_requestSave(this.__wbg_ptr, opts);
|
|
225
|
+
}
|
|
226
|
+
restartRunHandler() {
|
|
227
|
+
const ret = wasm.actorcontext_restartRunHandler(this.__wbg_ptr);
|
|
228
|
+
if (ret[1]) {
|
|
229
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* @returns {any}
|
|
234
|
+
*/
|
|
235
|
+
runtimeState() {
|
|
236
|
+
const ret = wasm.actorcontext_runtimeState(this.__wbg_ptr);
|
|
237
|
+
return ret;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* @param {any} writes
|
|
241
|
+
* @returns {Promise<void>}
|
|
242
|
+
*/
|
|
243
|
+
saveStateAndWorkflowBatch(writes) {
|
|
244
|
+
const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
|
|
245
|
+
return ret;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* @param {any} payload
|
|
249
|
+
* @returns {Promise<void>}
|
|
250
|
+
*/
|
|
251
|
+
saveState(payload) {
|
|
252
|
+
const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
|
|
253
|
+
return ret;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* @returns {Schedule}
|
|
257
|
+
*/
|
|
258
|
+
schedule() {
|
|
259
|
+
const ret = wasm.actorcontext_schedule(this.__wbg_ptr);
|
|
260
|
+
return Schedule.__wrap(ret);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* @param {number | null} [timestamp_ms]
|
|
264
|
+
*/
|
|
265
|
+
setAlarm(timestamp_ms) {
|
|
266
|
+
const ret = wasm.actorcontext_setAlarm(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
|
|
267
|
+
if (ret[1]) {
|
|
268
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* @param {number | null} [timestamp_ms]
|
|
273
|
+
* @returns {Promise<void>}
|
|
274
|
+
*/
|
|
275
|
+
setRunWakeAt(timestamp_ms) {
|
|
276
|
+
const ret = wasm.actorcontext_setRunWakeAt(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
|
|
277
|
+
return ret;
|
|
278
|
+
}
|
|
279
|
+
sleep() {
|
|
280
|
+
const ret = wasm.actorcontext_sleep(this.__wbg_ptr);
|
|
281
|
+
if (ret[1]) {
|
|
282
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* @returns {SqliteDb}
|
|
287
|
+
*/
|
|
288
|
+
sql() {
|
|
289
|
+
const ret = wasm.actorcontext_sql(this.__wbg_ptr);
|
|
290
|
+
return SqliteDb.__wrap(ret);
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @returns {Uint8Array}
|
|
294
|
+
*/
|
|
295
|
+
state() {
|
|
296
|
+
const ret = wasm.actorcontext_state(this.__wbg_ptr);
|
|
297
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
298
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
299
|
+
return v1;
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* @returns {Array<any>}
|
|
303
|
+
*/
|
|
304
|
+
takePendingHibernationChanges() {
|
|
305
|
+
const ret = wasm.actorcontext_takePendingHibernationChanges(this.__wbg_ptr);
|
|
306
|
+
return ret;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* @param {string | null} [bearer_token]
|
|
310
|
+
* @returns {Promise<void>}
|
|
311
|
+
*/
|
|
312
|
+
verifyInspectorAuth(bearer_token) {
|
|
313
|
+
var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
314
|
+
var len0 = WASM_VECTOR_LEN;
|
|
315
|
+
const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
|
|
316
|
+
return ret;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* @returns {Promise<void>}
|
|
320
|
+
*/
|
|
321
|
+
waitForTrackedShutdownWorkUnbounded() {
|
|
322
|
+
const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
|
|
323
|
+
return ret;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* @returns {Promise<boolean>}
|
|
327
|
+
*/
|
|
328
|
+
waitForTrackedShutdownWork() {
|
|
329
|
+
const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
|
|
330
|
+
return ret;
|
|
331
|
+
}
|
|
332
|
+
/**
|
|
333
|
+
* @param {Promise<any>} promise
|
|
334
|
+
*/
|
|
335
|
+
waitUntil(promise) {
|
|
336
|
+
wasm.actorcontext_waitUntil(this.__wbg_ptr, promise);
|
|
337
|
+
}
|
|
139
338
|
}
|
|
339
|
+
if (Symbol.dispose) ActorContext.prototype[Symbol.dispose] = ActorContext.prototype.free;
|
|
140
340
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
341
|
+
export class ActorFactory {
|
|
342
|
+
__destroy_into_raw() {
|
|
343
|
+
const ptr = this.__wbg_ptr;
|
|
344
|
+
this.__wbg_ptr = 0;
|
|
345
|
+
ActorFactoryFinalization.unregister(this);
|
|
346
|
+
return ptr;
|
|
146
347
|
}
|
|
147
|
-
|
|
148
|
-
|
|
348
|
+
free() {
|
|
349
|
+
const ptr = this.__destroy_into_raw();
|
|
350
|
+
wasm.__wbg_actorfactory_free(ptr, 0);
|
|
149
351
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
352
|
+
/**
|
|
353
|
+
* @param {any} callbacks
|
|
354
|
+
* @param {any} config
|
|
355
|
+
*/
|
|
356
|
+
constructor(callbacks, config) {
|
|
357
|
+
const ret = wasm.actorfactory_new(callbacks, config);
|
|
358
|
+
if (ret[2]) {
|
|
359
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
156
360
|
}
|
|
361
|
+
this.__wbg_ptr = ret[0];
|
|
362
|
+
ActorFactoryFinalization.register(this, this.__wbg_ptr, this);
|
|
363
|
+
return this;
|
|
157
364
|
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
365
|
+
}
|
|
366
|
+
if (Symbol.dispose) ActorFactory.prototype[Symbol.dispose] = ActorFactory.prototype.free;
|
|
367
|
+
|
|
368
|
+
export class ActorStateTransaction {
|
|
369
|
+
static __wrap(ptr) {
|
|
370
|
+
const obj = Object.create(ActorStateTransaction.prototype);
|
|
371
|
+
obj.__wbg_ptr = ptr;
|
|
372
|
+
ActorStateTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
373
|
+
return obj;
|
|
165
374
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
debug += debugString(val[0]);
|
|
172
|
-
}
|
|
173
|
-
for(let i = 1; i < length; i++) {
|
|
174
|
-
debug += ', ' + debugString(val[i]);
|
|
175
|
-
}
|
|
176
|
-
debug += ']';
|
|
177
|
-
return debug;
|
|
375
|
+
__destroy_into_raw() {
|
|
376
|
+
const ptr = this.__wbg_ptr;
|
|
377
|
+
this.__wbg_ptr = 0;
|
|
378
|
+
ActorStateTransactionFinalization.unregister(this);
|
|
379
|
+
return ptr;
|
|
178
380
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if (builtInMatches && builtInMatches.length > 1) {
|
|
183
|
-
className = builtInMatches[1];
|
|
184
|
-
} else {
|
|
185
|
-
// Failed to match the standard '[object ClassName]'
|
|
186
|
-
return toString.call(val);
|
|
381
|
+
free() {
|
|
382
|
+
const ptr = this.__destroy_into_raw();
|
|
383
|
+
wasm.__wbg_actorstatetransaction_free(ptr, 0);
|
|
187
384
|
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return 'Object';
|
|
196
|
-
}
|
|
385
|
+
/**
|
|
386
|
+
* @param {any} payload
|
|
387
|
+
* @returns {Promise<void>}
|
|
388
|
+
*/
|
|
389
|
+
commit(payload) {
|
|
390
|
+
const ret = wasm.actorstatetransaction_commit(this.__wbg_ptr, payload);
|
|
391
|
+
return ret;
|
|
197
392
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
393
|
+
/**
|
|
394
|
+
* @param {string} sql
|
|
395
|
+
* @param {any} params
|
|
396
|
+
* @returns {Promise<any>}
|
|
397
|
+
*/
|
|
398
|
+
execute(sql, params) {
|
|
399
|
+
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
400
|
+
const len0 = WASM_VECTOR_LEN;
|
|
401
|
+
const ret = wasm.actorstatetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
|
|
402
|
+
return ret;
|
|
201
403
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
209
|
-
WASM_VECTOR_LEN = arg.length;
|
|
210
|
-
return ptr;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
function takeFromExternrefTable0(idx) {
|
|
214
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
215
|
-
wasm.__externref_table_dealloc(idx);
|
|
216
|
-
return value;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
function _assertClass(instance, klass) {
|
|
220
|
-
if (!(instance instanceof klass)) {
|
|
221
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
404
|
+
/**
|
|
405
|
+
* @returns {Promise<void>}
|
|
406
|
+
*/
|
|
407
|
+
rollback() {
|
|
408
|
+
const ret = wasm.actorstatetransaction_rollback(this.__wbg_ptr);
|
|
409
|
+
return ret;
|
|
222
410
|
}
|
|
223
411
|
}
|
|
224
|
-
|
|
225
|
-
* @param {Promise<any>} promise
|
|
226
|
-
* @returns {Promise<any>}
|
|
227
|
-
*/
|
|
228
|
-
export function awaitPromise(promise) {
|
|
229
|
-
const ret = wasm.awaitPromise(promise);
|
|
230
|
-
return ret;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* @param {Uint8Array} bytes
|
|
235
|
-
* @returns {Uint8Array}
|
|
236
|
-
*/
|
|
237
|
-
export function roundTripBytes(bytes) {
|
|
238
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
239
|
-
const len0 = WASM_VECTOR_LEN;
|
|
240
|
-
const ret = wasm.roundTripBytes(ptr0, len0);
|
|
241
|
-
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
242
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
243
|
-
return v2;
|
|
244
|
-
}
|
|
412
|
+
if (Symbol.dispose) ActorStateTransaction.prototype[Symbol.dispose] = ActorStateTransaction.prototype.free;
|
|
245
413
|
|
|
246
414
|
/**
|
|
247
|
-
*
|
|
415
|
+
* Registration returned by `CancellationToken.onCancelled`.
|
|
248
416
|
*/
|
|
249
|
-
export
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
417
|
+
export class CancellationListener {
|
|
418
|
+
static __wrap(ptr) {
|
|
419
|
+
const obj = Object.create(CancellationListener.prototype);
|
|
420
|
+
obj.__wbg_ptr = ptr;
|
|
421
|
+
CancellationListenerFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
422
|
+
return obj;
|
|
423
|
+
}
|
|
424
|
+
__destroy_into_raw() {
|
|
425
|
+
const ptr = this.__wbg_ptr;
|
|
426
|
+
this.__wbg_ptr = 0;
|
|
427
|
+
CancellationListenerFinalization.unregister(this);
|
|
428
|
+
return ptr;
|
|
429
|
+
}
|
|
430
|
+
free() {
|
|
431
|
+
const ptr = this.__destroy_into_raw();
|
|
432
|
+
wasm.__wbg_cancellationlistener_free(ptr, 0);
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Stops waiting for cancellation without calling the callback.
|
|
436
|
+
*/
|
|
437
|
+
release() {
|
|
438
|
+
wasm.cancellationlistener_release(this.__wbg_ptr);
|
|
259
439
|
}
|
|
260
440
|
}
|
|
441
|
+
if (Symbol.dispose) CancellationListener.prototype[Symbol.dispose] = CancellationListener.prototype.free;
|
|
261
442
|
|
|
262
|
-
export
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
443
|
+
export class CancellationToken {
|
|
444
|
+
static __wrap(ptr) {
|
|
445
|
+
const obj = Object.create(CancellationToken.prototype);
|
|
446
|
+
obj.__wbg_ptr = ptr;
|
|
447
|
+
CancellationTokenFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
448
|
+
return obj;
|
|
449
|
+
}
|
|
450
|
+
__destroy_into_raw() {
|
|
451
|
+
const ptr = this.__wbg_ptr;
|
|
452
|
+
this.__wbg_ptr = 0;
|
|
453
|
+
CancellationTokenFinalization.unregister(this);
|
|
454
|
+
return ptr;
|
|
455
|
+
}
|
|
456
|
+
free() {
|
|
457
|
+
const ptr = this.__destroy_into_raw();
|
|
458
|
+
wasm.__wbg_cancellationtoken_free(ptr, 0);
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* @returns {boolean}
|
|
462
|
+
*/
|
|
463
|
+
aborted() {
|
|
464
|
+
const ret = wasm.cancellationtoken_aborted(this.__wbg_ptr);
|
|
465
|
+
return ret !== 0;
|
|
466
|
+
}
|
|
467
|
+
cancel() {
|
|
468
|
+
wasm.cancellationtoken_cancel(this.__wbg_ptr);
|
|
469
|
+
}
|
|
470
|
+
constructor() {
|
|
471
|
+
const ret = wasm.cancellationtoken_new();
|
|
472
|
+
this.__wbg_ptr = ret;
|
|
473
|
+
CancellationTokenFinalization.register(this, this.__wbg_ptr, this);
|
|
474
|
+
return this;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* Calls `callback` once when the token is cancelled. Release the returned
|
|
478
|
+
* listener when cancellation no longer matters; otherwise the waiting task
|
|
479
|
+
* and the callback stay alive until the token is cancelled.
|
|
480
|
+
* @param {Function} callback
|
|
481
|
+
* @returns {CancellationListener}
|
|
482
|
+
*/
|
|
483
|
+
onCancelled(callback) {
|
|
484
|
+
const ret = wasm.cancellationtoken_onCancelled(this.__wbg_ptr, callback);
|
|
485
|
+
return CancellationListener.__wrap(ret);
|
|
486
|
+
}
|
|
287
487
|
}
|
|
488
|
+
if (Symbol.dispose) CancellationToken.prototype[Symbol.dispose] = CancellationToken.prototype.free;
|
|
288
489
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
const ActorContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
292
|
-
? { register: () => {}, unregister: () => {} }
|
|
293
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_actorcontext_free(ptr >>> 0, 1));
|
|
294
|
-
|
|
295
|
-
export class ActorContext {
|
|
296
|
-
|
|
490
|
+
export class ConnHandle {
|
|
297
491
|
static __wrap(ptr) {
|
|
298
|
-
|
|
299
|
-
const obj = Object.create(ActorContext.prototype);
|
|
492
|
+
const obj = Object.create(ConnHandle.prototype);
|
|
300
493
|
obj.__wbg_ptr = ptr;
|
|
301
|
-
|
|
494
|
+
ConnHandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
302
495
|
return obj;
|
|
303
496
|
}
|
|
304
|
-
|
|
305
497
|
__destroy_into_raw() {
|
|
306
498
|
const ptr = this.__wbg_ptr;
|
|
307
499
|
this.__wbg_ptr = 0;
|
|
308
|
-
|
|
500
|
+
ConnHandleFinalization.unregister(this);
|
|
309
501
|
return ptr;
|
|
310
502
|
}
|
|
311
|
-
|
|
312
503
|
free() {
|
|
313
504
|
const ptr = this.__destroy_into_raw();
|
|
314
|
-
wasm.
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* @param {Promise<any>} promise
|
|
318
|
-
*/
|
|
319
|
-
keepAwake(promise) {
|
|
320
|
-
wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
|
|
505
|
+
wasm.__wbg_connhandle_free(ptr, 0);
|
|
321
506
|
}
|
|
322
507
|
/**
|
|
323
|
-
* @param {
|
|
508
|
+
* @param {string | null} [reason]
|
|
324
509
|
* @returns {Promise<void>}
|
|
325
510
|
*/
|
|
326
|
-
|
|
327
|
-
|
|
511
|
+
disconnect(reason) {
|
|
512
|
+
var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
513
|
+
var len0 = WASM_VECTOR_LEN;
|
|
514
|
+
const ret = wasm.connhandle_disconnect(this.__wbg_ptr, ptr0, len0);
|
|
328
515
|
return ret;
|
|
329
516
|
}
|
|
330
517
|
/**
|
|
331
|
-
* @
|
|
332
|
-
*/
|
|
333
|
-
waitUntil(promise) {
|
|
334
|
-
wasm.actorcontext_waitUntil(this.__wbg_ptr, promise);
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* @returns {any}
|
|
518
|
+
* @returns {string}
|
|
338
519
|
*/
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
520
|
+
id() {
|
|
521
|
+
let deferred1_0;
|
|
522
|
+
let deferred1_1;
|
|
523
|
+
try {
|
|
524
|
+
const ret = wasm.connhandle_id(this.__wbg_ptr);
|
|
525
|
+
deferred1_0 = ret[0];
|
|
526
|
+
deferred1_1 = ret[1];
|
|
527
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
528
|
+
} finally {
|
|
529
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
343
530
|
}
|
|
344
|
-
return takeFromExternrefTable0(ret[0]);
|
|
345
531
|
}
|
|
346
532
|
/**
|
|
347
|
-
* @
|
|
348
|
-
* @param {any} request
|
|
349
|
-
* @returns {Promise<ConnHandle>}
|
|
533
|
+
* @returns {boolean}
|
|
350
534
|
*/
|
|
351
|
-
|
|
352
|
-
const
|
|
353
|
-
|
|
354
|
-
const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
|
|
355
|
-
return ret;
|
|
535
|
+
isHibernatable() {
|
|
536
|
+
const ret = wasm.connhandle_isHibernatable(this.__wbg_ptr);
|
|
537
|
+
return ret !== 0;
|
|
356
538
|
}
|
|
357
539
|
/**
|
|
358
|
-
* @
|
|
540
|
+
* @returns {Uint8Array}
|
|
359
541
|
*/
|
|
360
|
-
|
|
361
|
-
wasm.
|
|
542
|
+
params() {
|
|
543
|
+
const ret = wasm.connhandle_params(this.__wbg_ptr);
|
|
544
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
545
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
546
|
+
return v1;
|
|
362
547
|
}
|
|
363
548
|
/**
|
|
364
|
-
* @param {
|
|
549
|
+
* @param {string} name
|
|
550
|
+
* @param {Uint8Array} args
|
|
365
551
|
*/
|
|
366
|
-
|
|
367
|
-
wasm.
|
|
552
|
+
send(name, args) {
|
|
553
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
554
|
+
const len0 = WASM_VECTOR_LEN;
|
|
555
|
+
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
556
|
+
const len1 = WASM_VECTOR_LEN;
|
|
557
|
+
wasm.connhandle_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
368
558
|
}
|
|
369
559
|
/**
|
|
370
|
-
* @
|
|
560
|
+
* @param {Uint8Array} state
|
|
371
561
|
*/
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
|
|
562
|
+
setState(state) {
|
|
563
|
+
const ptr0 = passArray8ToWasm0(state, wasm.__wbindgen_malloc);
|
|
564
|
+
const len0 = WASM_VECTOR_LEN;
|
|
565
|
+
wasm.connhandle_setState(this.__wbg_ptr, ptr0, len0);
|
|
375
566
|
}
|
|
376
567
|
/**
|
|
377
|
-
* @
|
|
568
|
+
* @returns {Uint8Array}
|
|
378
569
|
*/
|
|
379
|
-
|
|
380
|
-
wasm.
|
|
570
|
+
state() {
|
|
571
|
+
const ret = wasm.connhandle_state(this.__wbg_ptr);
|
|
572
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
573
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
574
|
+
return v1;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
if (Symbol.dispose) ConnHandle.prototype[Symbol.dispose] = ConnHandle.prototype.free;
|
|
578
|
+
|
|
579
|
+
export class CoreRegistry {
|
|
580
|
+
__destroy_into_raw() {
|
|
581
|
+
const ptr = this.__wbg_ptr;
|
|
582
|
+
this.__wbg_ptr = 0;
|
|
583
|
+
CoreRegistryFinalization.unregister(this);
|
|
584
|
+
return ptr;
|
|
585
|
+
}
|
|
586
|
+
free() {
|
|
587
|
+
const ptr = this.__destroy_into_raw();
|
|
588
|
+
wasm.__wbg_coreregistry_free(ptr, 0);
|
|
381
589
|
}
|
|
382
590
|
/**
|
|
383
|
-
* @
|
|
591
|
+
* @param {any} req
|
|
592
|
+
* @param {Function} on_stream_event
|
|
593
|
+
* @param {CancellationToken} cancel_token
|
|
594
|
+
* @param {any} config
|
|
595
|
+
* @returns {Promise<any>}
|
|
384
596
|
*/
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
597
|
+
handleServerlessRequest(req, on_stream_event, cancel_token, config) {
|
|
598
|
+
_assertClass(cancel_token, CancellationToken);
|
|
599
|
+
const ret = wasm.coreregistry_handleServerlessRequest(this.__wbg_ptr, req, on_stream_event, cancel_token.__wbg_ptr, config);
|
|
600
|
+
return ret;
|
|
601
|
+
}
|
|
602
|
+
constructor() {
|
|
603
|
+
const ret = wasm.coreregistry_new();
|
|
604
|
+
this.__wbg_ptr = ret;
|
|
605
|
+
CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
|
|
606
|
+
return this;
|
|
388
607
|
}
|
|
389
608
|
/**
|
|
390
|
-
* @
|
|
609
|
+
* @param {string} name
|
|
610
|
+
* @param {ActorFactory} factory
|
|
391
611
|
*/
|
|
392
|
-
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
|
|
612
|
+
register(name, factory) {
|
|
613
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
614
|
+
const len0 = WASM_VECTOR_LEN;
|
|
615
|
+
_assertClass(factory, ActorFactory);
|
|
616
|
+
const ret = wasm.coreregistry_register(this.__wbg_ptr, ptr0, len0, factory.__wbg_ptr);
|
|
617
|
+
if (ret[1]) {
|
|
618
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
396
619
|
}
|
|
397
|
-
return takeFromExternrefTable0(ret[0]);
|
|
398
|
-
}
|
|
399
|
-
endOnStateChange() {
|
|
400
|
-
wasm.actorcontext_endOnStateChange(this.__wbg_ptr);
|
|
401
|
-
}
|
|
402
|
-
restartRunHandler() {
|
|
403
|
-
wasm.actorcontext_restartRunHandler(this.__wbg_ptr);
|
|
404
|
-
}
|
|
405
|
-
beginOnStateChange() {
|
|
406
|
-
wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
|
|
407
620
|
}
|
|
408
621
|
/**
|
|
409
|
-
* @param {any}
|
|
622
|
+
* @param {any} config
|
|
410
623
|
* @returns {Promise<void>}
|
|
411
624
|
*/
|
|
412
|
-
|
|
413
|
-
const ret = wasm.
|
|
625
|
+
serve(config) {
|
|
626
|
+
const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
|
|
414
627
|
return ret;
|
|
415
628
|
}
|
|
416
629
|
/**
|
|
417
|
-
* @param {string | null} [bearer_token]
|
|
418
630
|
* @returns {Promise<void>}
|
|
419
631
|
*/
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
var len0 = WASM_VECTOR_LEN;
|
|
423
|
-
const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
|
|
632
|
+
shutdown() {
|
|
633
|
+
const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
|
|
424
634
|
return ret;
|
|
425
635
|
}
|
|
636
|
+
}
|
|
637
|
+
if (Symbol.dispose) CoreRegistry.prototype[Symbol.dispose] = CoreRegistry.prototype.free;
|
|
638
|
+
|
|
639
|
+
export class Kv {
|
|
640
|
+
static __wrap(ptr) {
|
|
641
|
+
const obj = Object.create(Kv.prototype);
|
|
642
|
+
obj.__wbg_ptr = ptr;
|
|
643
|
+
KvFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
644
|
+
return obj;
|
|
645
|
+
}
|
|
646
|
+
__destroy_into_raw() {
|
|
647
|
+
const ptr = this.__wbg_ptr;
|
|
648
|
+
this.__wbg_ptr = 0;
|
|
649
|
+
KvFinalization.unregister(this);
|
|
650
|
+
return ptr;
|
|
651
|
+
}
|
|
652
|
+
free() {
|
|
653
|
+
const ptr = this.__destroy_into_raw();
|
|
654
|
+
wasm.__wbg_kv_free(ptr, 0);
|
|
655
|
+
}
|
|
426
656
|
/**
|
|
427
|
-
* @param {
|
|
657
|
+
* @param {Array<any>} keys
|
|
658
|
+
* @returns {Promise<void>}
|
|
428
659
|
*/
|
|
429
|
-
|
|
430
|
-
wasm.
|
|
660
|
+
batchDelete(keys) {
|
|
661
|
+
const ret = wasm.kv_batchDelete(this.__wbg_ptr, keys);
|
|
662
|
+
return ret;
|
|
431
663
|
}
|
|
432
664
|
/**
|
|
433
|
-
* @
|
|
665
|
+
* @param {Array<any>} keys
|
|
666
|
+
* @returns {Promise<any>}
|
|
434
667
|
*/
|
|
435
|
-
|
|
436
|
-
const ret = wasm.
|
|
437
|
-
return ret
|
|
668
|
+
batchGet(keys) {
|
|
669
|
+
const ret = wasm.kv_batchGet(this.__wbg_ptr, keys);
|
|
670
|
+
return ret;
|
|
438
671
|
}
|
|
439
672
|
/**
|
|
440
|
-
* @
|
|
673
|
+
* @param {Array<any>} entries
|
|
674
|
+
* @returns {Promise<void>}
|
|
441
675
|
*/
|
|
442
|
-
|
|
443
|
-
const ret = wasm.
|
|
676
|
+
batchPut(entries) {
|
|
677
|
+
const ret = wasm.kv_batchPut(this.__wbg_ptr, entries);
|
|
444
678
|
return ret;
|
|
445
679
|
}
|
|
446
680
|
/**
|
|
447
|
-
* @
|
|
681
|
+
* @param {Uint8Array} start
|
|
682
|
+
* @param {Uint8Array} end
|
|
683
|
+
* @returns {Promise<void>}
|
|
448
684
|
*/
|
|
449
|
-
|
|
450
|
-
const
|
|
451
|
-
|
|
685
|
+
deleteRange(start, end) {
|
|
686
|
+
const ptr0 = passArray8ToWasm0(start, wasm.__wbindgen_malloc);
|
|
687
|
+
const len0 = WASM_VECTOR_LEN;
|
|
688
|
+
const ptr1 = passArray8ToWasm0(end, wasm.__wbindgen_malloc);
|
|
689
|
+
const len1 = WASM_VECTOR_LEN;
|
|
690
|
+
const ret = wasm.kv_deleteRange(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
691
|
+
return ret;
|
|
452
692
|
}
|
|
453
693
|
/**
|
|
454
|
-
* @
|
|
694
|
+
* @param {Uint8Array} key
|
|
695
|
+
* @returns {Promise<void>}
|
|
455
696
|
*/
|
|
456
|
-
|
|
457
|
-
const
|
|
697
|
+
delete(key) {
|
|
698
|
+
const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
699
|
+
const len0 = WASM_VECTOR_LEN;
|
|
700
|
+
const ret = wasm.kv_delete(this.__wbg_ptr, ptr0, len0);
|
|
458
701
|
return ret;
|
|
459
702
|
}
|
|
460
703
|
/**
|
|
461
|
-
* @
|
|
704
|
+
* @param {Uint8Array} key
|
|
705
|
+
* @returns {Promise<any>}
|
|
462
706
|
*/
|
|
463
|
-
|
|
464
|
-
const
|
|
707
|
+
get(key) {
|
|
708
|
+
const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
709
|
+
const len0 = WASM_VECTOR_LEN;
|
|
710
|
+
const ret = wasm.kv_get(this.__wbg_ptr, ptr0, len0);
|
|
465
711
|
return ret;
|
|
466
712
|
}
|
|
467
713
|
/**
|
|
468
|
-
* @
|
|
714
|
+
* @param {Uint8Array} prefix
|
|
715
|
+
* @param {any} options
|
|
716
|
+
* @returns {Promise<any>}
|
|
469
717
|
*/
|
|
470
|
-
|
|
471
|
-
const
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
return takeFromExternrefTable0(ret[0]);
|
|
476
|
-
}
|
|
477
|
-
constructor() {
|
|
478
|
-
const ret = wasm.actorcontext_new();
|
|
479
|
-
if (ret[2]) {
|
|
480
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
481
|
-
}
|
|
482
|
-
this.__wbg_ptr = ret[0] >>> 0;
|
|
483
|
-
ActorContextFinalization.register(this, this.__wbg_ptr, this);
|
|
484
|
-
return this;
|
|
718
|
+
listPrefix(prefix, options) {
|
|
719
|
+
const ptr0 = passArray8ToWasm0(prefix, wasm.__wbindgen_malloc);
|
|
720
|
+
const len0 = WASM_VECTOR_LEN;
|
|
721
|
+
const ret = wasm.kv_listPrefix(this.__wbg_ptr, ptr0, len0, options);
|
|
722
|
+
return ret;
|
|
485
723
|
}
|
|
486
724
|
/**
|
|
487
|
-
* @
|
|
725
|
+
* @param {Uint8Array} start
|
|
726
|
+
* @param {Uint8Array} end
|
|
727
|
+
* @param {any} options
|
|
728
|
+
* @returns {Promise<any>}
|
|
488
729
|
*/
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
|
|
730
|
+
listRange(start, end, options) {
|
|
731
|
+
const ptr0 = passArray8ToWasm0(start, wasm.__wbindgen_malloc);
|
|
732
|
+
const len0 = WASM_VECTOR_LEN;
|
|
733
|
+
const ptr1 = passArray8ToWasm0(end, wasm.__wbindgen_malloc);
|
|
734
|
+
const len1 = WASM_VECTOR_LEN;
|
|
735
|
+
const ret = wasm.kv_listRange(this.__wbg_ptr, ptr0, len0, ptr1, len1, options);
|
|
736
|
+
return ret;
|
|
492
737
|
}
|
|
493
738
|
/**
|
|
739
|
+
* @param {Uint8Array} key
|
|
740
|
+
* @param {Uint8Array} value
|
|
494
741
|
* @returns {Promise<void>}
|
|
495
742
|
*/
|
|
496
|
-
|
|
497
|
-
const
|
|
743
|
+
put(key, value) {
|
|
744
|
+
const ptr0 = passArray8ToWasm0(key, wasm.__wbindgen_malloc);
|
|
745
|
+
const len0 = WASM_VECTOR_LEN;
|
|
746
|
+
const ptr1 = passArray8ToWasm0(value, wasm.__wbindgen_malloc);
|
|
747
|
+
const len1 = WASM_VECTOR_LEN;
|
|
748
|
+
const ret = wasm.kv_put(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
498
749
|
return ret;
|
|
499
750
|
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
751
|
+
}
|
|
752
|
+
if (Symbol.dispose) Kv.prototype[Symbol.dispose] = Kv.prototype.free;
|
|
753
|
+
|
|
754
|
+
export class Queue {
|
|
755
|
+
static __wrap(ptr) {
|
|
756
|
+
const obj = Object.create(Queue.prototype);
|
|
757
|
+
obj.__wbg_ptr = ptr;
|
|
758
|
+
QueueFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
759
|
+
return obj;
|
|
760
|
+
}
|
|
761
|
+
__destroy_into_raw() {
|
|
762
|
+
const ptr = this.__wbg_ptr;
|
|
763
|
+
this.__wbg_ptr = 0;
|
|
764
|
+
QueueFinalization.unregister(this);
|
|
765
|
+
return ptr;
|
|
766
|
+
}
|
|
767
|
+
free() {
|
|
768
|
+
const ptr = this.__destroy_into_raw();
|
|
769
|
+
wasm.__wbg_queue_free(ptr, 0);
|
|
514
770
|
}
|
|
515
771
|
/**
|
|
516
|
-
* @
|
|
772
|
+
* @param {bigint} message_id
|
|
773
|
+
* @param {string} expected_name
|
|
774
|
+
* @param {Uint8Array | null} [response]
|
|
775
|
+
* @returns {Promise<boolean>}
|
|
517
776
|
*/
|
|
518
|
-
|
|
519
|
-
const
|
|
777
|
+
completePersisted(message_id, expected_name, response) {
|
|
778
|
+
const ptr0 = passStringToWasm0(expected_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
779
|
+
const len0 = WASM_VECTOR_LEN;
|
|
780
|
+
var ptr1 = isLikeNone(response) ? 0 : passArray8ToWasm0(response, wasm.__wbindgen_malloc);
|
|
781
|
+
var len1 = WASM_VECTOR_LEN;
|
|
782
|
+
const ret = wasm.queue_completePersisted(this.__wbg_ptr, message_id, ptr0, len0, ptr1, len1);
|
|
520
783
|
return ret;
|
|
521
784
|
}
|
|
522
785
|
/**
|
|
523
|
-
* @
|
|
786
|
+
* @param {string} name
|
|
787
|
+
* @param {Uint8Array} body
|
|
788
|
+
* @param {any} options
|
|
789
|
+
* @param {CancellationToken | null} [signal]
|
|
790
|
+
* @returns {Promise<Uint8Array | undefined>}
|
|
524
791
|
*/
|
|
525
|
-
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
if (
|
|
532
|
-
|
|
792
|
+
enqueueAndWait(name, body, options, signal) {
|
|
793
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
794
|
+
const len0 = WASM_VECTOR_LEN;
|
|
795
|
+
const ptr1 = passArray8ToWasm0(body, wasm.__wbindgen_malloc);
|
|
796
|
+
const len1 = WASM_VECTOR_LEN;
|
|
797
|
+
let ptr2 = 0;
|
|
798
|
+
if (!isLikeNone(signal)) {
|
|
799
|
+
_assertClass(signal, CancellationToken);
|
|
800
|
+
ptr2 = signal.__destroy_into_raw();
|
|
533
801
|
}
|
|
802
|
+
const ret = wasm.queue_enqueueAndWait(this.__wbg_ptr, ptr0, len0, ptr1, len1, options, ptr2);
|
|
803
|
+
return ret;
|
|
534
804
|
}
|
|
535
805
|
/**
|
|
536
|
-
* @returns {
|
|
806
|
+
* @returns {Promise<Array<any>>}
|
|
537
807
|
*/
|
|
538
|
-
|
|
539
|
-
const ret = wasm.
|
|
540
|
-
|
|
541
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
542
|
-
return v1;
|
|
808
|
+
inspectMessages() {
|
|
809
|
+
const ret = wasm.queue_inspectMessages(this.__wbg_ptr);
|
|
810
|
+
return ret;
|
|
543
811
|
}
|
|
544
812
|
/**
|
|
545
|
-
* @returns {
|
|
813
|
+
* @returns {number}
|
|
546
814
|
*/
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
try {
|
|
551
|
-
const ret = wasm.actorcontext_region(this.__wbg_ptr);
|
|
552
|
-
deferred1_0 = ret[0];
|
|
553
|
-
deferred1_1 = ret[1];
|
|
554
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
555
|
-
} finally {
|
|
556
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
destroy() {
|
|
560
|
-
const ret = wasm.actorcontext_destroy(this.__wbg_ptr);
|
|
561
|
-
if (ret[1]) {
|
|
562
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
563
|
-
}
|
|
815
|
+
maxSize() {
|
|
816
|
+
const ret = wasm.queue_maxSize(this.__wbg_ptr);
|
|
817
|
+
return ret >>> 0;
|
|
564
818
|
}
|
|
565
819
|
/**
|
|
566
|
-
* @
|
|
820
|
+
* @param {any} options
|
|
821
|
+
* @param {CancellationToken | null} [signal]
|
|
822
|
+
* @returns {Promise<Array<any>>}
|
|
567
823
|
*/
|
|
568
|
-
|
|
569
|
-
let
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
deferred1_0 = ret[0];
|
|
574
|
-
deferred1_1 = ret[1];
|
|
575
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
576
|
-
} finally {
|
|
577
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
824
|
+
nextBatch(options, signal) {
|
|
825
|
+
let ptr0 = 0;
|
|
826
|
+
if (!isLikeNone(signal)) {
|
|
827
|
+
_assertClass(signal, CancellationToken);
|
|
828
|
+
ptr0 = signal.__destroy_into_raw();
|
|
578
829
|
}
|
|
830
|
+
const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
|
|
831
|
+
return ret;
|
|
579
832
|
}
|
|
580
833
|
/**
|
|
581
|
-
* @returns {
|
|
834
|
+
* @returns {Promise<void>}
|
|
582
835
|
*/
|
|
583
|
-
|
|
584
|
-
const ret = wasm.
|
|
585
|
-
return
|
|
836
|
+
reset() {
|
|
837
|
+
const ret = wasm.queue_reset(this.__wbg_ptr);
|
|
838
|
+
return ret;
|
|
586
839
|
}
|
|
587
840
|
/**
|
|
588
841
|
* @param {string} name
|
|
589
|
-
* @param {Uint8Array}
|
|
842
|
+
* @param {Uint8Array} body
|
|
843
|
+
* @returns {Promise<QueueMessage>}
|
|
590
844
|
*/
|
|
591
|
-
|
|
845
|
+
send(name, body) {
|
|
592
846
|
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
593
847
|
const len0 = WASM_VECTOR_LEN;
|
|
594
|
-
const ptr1 = passArray8ToWasm0(
|
|
848
|
+
const ptr1 = passArray8ToWasm0(body, wasm.__wbindgen_malloc);
|
|
595
849
|
const len1 = WASM_VECTOR_LEN;
|
|
596
|
-
wasm.
|
|
597
|
-
|
|
598
|
-
/**
|
|
599
|
-
* @param {number | null} [timestamp_ms]
|
|
600
|
-
*/
|
|
601
|
-
setAlarm(timestamp_ms) {
|
|
602
|
-
const ret = wasm.actorcontext_setAlarm(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
|
|
603
|
-
if (ret[1]) {
|
|
604
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
605
|
-
}
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
const ActorFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
610
|
-
? { register: () => {}, unregister: () => {} }
|
|
611
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_actorfactory_free(ptr >>> 0, 1));
|
|
612
|
-
|
|
613
|
-
export class ActorFactory {
|
|
614
|
-
|
|
615
|
-
__destroy_into_raw() {
|
|
616
|
-
const ptr = this.__wbg_ptr;
|
|
617
|
-
this.__wbg_ptr = 0;
|
|
618
|
-
ActorFactoryFinalization.unregister(this);
|
|
619
|
-
return ptr;
|
|
620
|
-
}
|
|
621
|
-
|
|
622
|
-
free() {
|
|
623
|
-
const ptr = this.__destroy_into_raw();
|
|
624
|
-
wasm.__wbg_actorfactory_free(ptr, 0);
|
|
850
|
+
const ret = wasm.queue_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
851
|
+
return ret;
|
|
625
852
|
}
|
|
626
853
|
/**
|
|
627
|
-
* @param {any}
|
|
628
|
-
* @
|
|
854
|
+
* @param {any} options
|
|
855
|
+
* @returns {Array<any>}
|
|
629
856
|
*/
|
|
630
|
-
|
|
631
|
-
const ret = wasm.
|
|
857
|
+
tryNextBatch(options) {
|
|
858
|
+
const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
|
|
632
859
|
if (ret[2]) {
|
|
633
860
|
throw takeFromExternrefTable0(ret[1]);
|
|
634
861
|
}
|
|
635
|
-
|
|
636
|
-
ActorFactoryFinalization.register(this, this.__wbg_ptr, this);
|
|
637
|
-
return this;
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
642
|
-
? { register: () => {}, unregister: () => {} }
|
|
643
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_cancellationtoken_free(ptr >>> 0, 1));
|
|
644
|
-
|
|
645
|
-
export class CancellationToken {
|
|
646
|
-
|
|
647
|
-
__destroy_into_raw() {
|
|
648
|
-
const ptr = this.__wbg_ptr;
|
|
649
|
-
this.__wbg_ptr = 0;
|
|
650
|
-
CancellationTokenFinalization.unregister(this);
|
|
651
|
-
return ptr;
|
|
652
|
-
}
|
|
653
|
-
|
|
654
|
-
free() {
|
|
655
|
-
const ptr = this.__destroy_into_raw();
|
|
656
|
-
wasm.__wbg_cancellationtoken_free(ptr, 0);
|
|
862
|
+
return takeFromExternrefTable0(ret[0]);
|
|
657
863
|
}
|
|
658
864
|
/**
|
|
659
|
-
* @param {
|
|
865
|
+
* @param {any} names
|
|
866
|
+
* @param {any} options
|
|
867
|
+
* @returns {Promise<void>}
|
|
660
868
|
*/
|
|
661
|
-
|
|
662
|
-
wasm.
|
|
663
|
-
|
|
664
|
-
constructor() {
|
|
665
|
-
const ret = wasm.cancellationtoken_new();
|
|
666
|
-
this.__wbg_ptr = ret >>> 0;
|
|
667
|
-
CancellationTokenFinalization.register(this, this.__wbg_ptr, this);
|
|
668
|
-
return this;
|
|
669
|
-
}
|
|
670
|
-
cancel() {
|
|
671
|
-
wasm.cancellationtoken_cancel(this.__wbg_ptr);
|
|
869
|
+
waitForNamesAvailable(names, options) {
|
|
870
|
+
const ret = wasm.queue_waitForNamesAvailable(this.__wbg_ptr, names, options);
|
|
871
|
+
return ret;
|
|
672
872
|
}
|
|
673
873
|
/**
|
|
674
|
-
* @
|
|
874
|
+
* @param {any} names
|
|
875
|
+
* @param {any} options
|
|
876
|
+
* @param {CancellationToken | null} [signal]
|
|
877
|
+
* @returns {Promise<QueueMessage>}
|
|
675
878
|
*/
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
879
|
+
waitForNames(names, options, signal) {
|
|
880
|
+
let ptr0 = 0;
|
|
881
|
+
if (!isLikeNone(signal)) {
|
|
882
|
+
_assertClass(signal, CancellationToken);
|
|
883
|
+
ptr0 = signal.__destroy_into_raw();
|
|
884
|
+
}
|
|
885
|
+
const ret = wasm.queue_waitForNames(this.__wbg_ptr, names, options, ptr0);
|
|
886
|
+
return ret;
|
|
679
887
|
}
|
|
680
|
-
}
|
|
681
|
-
|
|
682
|
-
const ConnHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
683
|
-
? { register: () => {}, unregister: () => {} }
|
|
684
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_connhandle_free(ptr >>> 0, 1));
|
|
685
|
-
|
|
686
|
-
export class ConnHandle {
|
|
888
|
+
}
|
|
889
|
+
if (Symbol.dispose) Queue.prototype[Symbol.dispose] = Queue.prototype.free;
|
|
687
890
|
|
|
891
|
+
export class QueueMessage {
|
|
688
892
|
static __wrap(ptr) {
|
|
689
|
-
|
|
690
|
-
const obj = Object.create(ConnHandle.prototype);
|
|
893
|
+
const obj = Object.create(QueueMessage.prototype);
|
|
691
894
|
obj.__wbg_ptr = ptr;
|
|
692
|
-
|
|
895
|
+
QueueMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
693
896
|
return obj;
|
|
694
897
|
}
|
|
695
|
-
|
|
696
898
|
__destroy_into_raw() {
|
|
697
899
|
const ptr = this.__wbg_ptr;
|
|
698
900
|
this.__wbg_ptr = 0;
|
|
699
|
-
|
|
901
|
+
QueueMessageFinalization.unregister(this);
|
|
700
902
|
return ptr;
|
|
701
903
|
}
|
|
702
|
-
|
|
703
904
|
free() {
|
|
704
905
|
const ptr = this.__destroy_into_raw();
|
|
705
|
-
wasm.
|
|
906
|
+
wasm.__wbg_queuemessage_free(ptr, 0);
|
|
706
907
|
}
|
|
707
908
|
/**
|
|
708
|
-
* @
|
|
909
|
+
* @returns {Uint8Array}
|
|
910
|
+
*/
|
|
911
|
+
body() {
|
|
912
|
+
const ret = wasm.queuemessage_body(this.__wbg_ptr);
|
|
913
|
+
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
914
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
915
|
+
return v1;
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* @param {any} response
|
|
709
919
|
* @returns {Promise<void>}
|
|
710
920
|
*/
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
921
|
+
complete(response) {
|
|
922
|
+
const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
|
|
923
|
+
return ret;
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* @returns {number}
|
|
927
|
+
*/
|
|
928
|
+
createdAt() {
|
|
929
|
+
const ret = wasm.queuemessage_createdAt(this.__wbg_ptr);
|
|
715
930
|
return ret;
|
|
716
931
|
}
|
|
932
|
+
/**
|
|
933
|
+
* @returns {bigint}
|
|
934
|
+
*/
|
|
935
|
+
id() {
|
|
936
|
+
const ret = wasm.queuemessage_id(this.__wbg_ptr);
|
|
937
|
+
return BigInt.asUintN(64, ret);
|
|
938
|
+
}
|
|
717
939
|
/**
|
|
718
940
|
* @returns {boolean}
|
|
719
941
|
*/
|
|
720
|
-
|
|
721
|
-
const ret = wasm.
|
|
942
|
+
isCompletable() {
|
|
943
|
+
const ret = wasm.queuemessage_isCompletable(this.__wbg_ptr);
|
|
722
944
|
return ret !== 0;
|
|
723
945
|
}
|
|
724
946
|
/**
|
|
725
947
|
* @returns {string}
|
|
726
948
|
*/
|
|
727
|
-
|
|
949
|
+
name() {
|
|
728
950
|
let deferred1_0;
|
|
729
951
|
let deferred1_1;
|
|
730
952
|
try {
|
|
731
|
-
const ret = wasm.
|
|
953
|
+
const ret = wasm.queuemessage_name(this.__wbg_ptr);
|
|
732
954
|
deferred1_0 = ret[0];
|
|
733
955
|
deferred1_1 = ret[1];
|
|
734
956
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -736,1187 +958,1328 @@ export class ConnHandle {
|
|
|
736
958
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
737
959
|
}
|
|
738
960
|
}
|
|
961
|
+
}
|
|
962
|
+
if (Symbol.dispose) QueueMessage.prototype[Symbol.dispose] = QueueMessage.prototype.free;
|
|
963
|
+
|
|
964
|
+
export class Schedule {
|
|
965
|
+
static __wrap(ptr) {
|
|
966
|
+
const obj = Object.create(Schedule.prototype);
|
|
967
|
+
obj.__wbg_ptr = ptr;
|
|
968
|
+
ScheduleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
969
|
+
return obj;
|
|
970
|
+
}
|
|
971
|
+
__destroy_into_raw() {
|
|
972
|
+
const ptr = this.__wbg_ptr;
|
|
973
|
+
this.__wbg_ptr = 0;
|
|
974
|
+
ScheduleFinalization.unregister(this);
|
|
975
|
+
return ptr;
|
|
976
|
+
}
|
|
977
|
+
free() {
|
|
978
|
+
const ptr = this.__destroy_into_raw();
|
|
979
|
+
wasm.__wbg_schedule_free(ptr, 0);
|
|
980
|
+
}
|
|
981
|
+
/**
|
|
982
|
+
* @param {number} duration_ms
|
|
983
|
+
* @param {string} action_name
|
|
984
|
+
* @param {Uint8Array} args
|
|
985
|
+
* @returns {Promise<string>}
|
|
986
|
+
*/
|
|
987
|
+
after(duration_ms, action_name, args) {
|
|
988
|
+
const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
989
|
+
const len0 = WASM_VECTOR_LEN;
|
|
990
|
+
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
991
|
+
const len1 = WASM_VECTOR_LEN;
|
|
992
|
+
const ret = wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
|
|
993
|
+
return ret;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* @param {number} timestamp_ms
|
|
997
|
+
* @param {string} action_name
|
|
998
|
+
* @param {Uint8Array} args
|
|
999
|
+
* @returns {Promise<string>}
|
|
1000
|
+
*/
|
|
1001
|
+
at(timestamp_ms, action_name, args) {
|
|
1002
|
+
const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1003
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1004
|
+
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1005
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1006
|
+
const ret = wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
|
|
1007
|
+
return ret;
|
|
1008
|
+
}
|
|
1009
|
+
/**
|
|
1010
|
+
* @param {string} id
|
|
1011
|
+
* @returns {Promise<boolean>}
|
|
1012
|
+
*/
|
|
1013
|
+
cancel(id) {
|
|
1014
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1015
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1016
|
+
const ret = wasm.schedule_cancel(this.__wbg_ptr, ptr0, len0);
|
|
1017
|
+
return ret;
|
|
1018
|
+
}
|
|
1019
|
+
/**
|
|
1020
|
+
* @param {string} name
|
|
1021
|
+
* @returns {Promise<boolean>}
|
|
1022
|
+
*/
|
|
1023
|
+
cronDelete(name) {
|
|
1024
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1025
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1026
|
+
const ret = wasm.schedule_cronDelete(this.__wbg_ptr, ptr0, len0);
|
|
1027
|
+
return ret;
|
|
1028
|
+
}
|
|
739
1029
|
/**
|
|
740
1030
|
* @param {string} name
|
|
1031
|
+
* @param {number} interval_ms
|
|
1032
|
+
* @param {string} action_name
|
|
741
1033
|
* @param {Uint8Array} args
|
|
1034
|
+
* @param {number | null} [max_history]
|
|
1035
|
+
* @returns {Promise<void>}
|
|
742
1036
|
*/
|
|
743
|
-
|
|
1037
|
+
cronEvery(name, interval_ms, action_name, args, max_history) {
|
|
744
1038
|
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
745
1039
|
const len0 = WASM_VECTOR_LEN;
|
|
746
|
-
const ptr1 =
|
|
1040
|
+
const ptr1 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
747
1041
|
const len1 = WASM_VECTOR_LEN;
|
|
748
|
-
|
|
1042
|
+
const ptr2 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1043
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1044
|
+
const ret = wasm.schedule_cronEvery(this.__wbg_ptr, ptr0, len0, interval_ms, ptr1, len1, ptr2, len2, !isLikeNone(max_history), isLikeNone(max_history) ? 0 : max_history);
|
|
1045
|
+
return ret;
|
|
749
1046
|
}
|
|
750
1047
|
/**
|
|
751
|
-
* @
|
|
1048
|
+
* @param {string} name
|
|
1049
|
+
* @returns {Promise<any>}
|
|
752
1050
|
*/
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
|
|
756
|
-
wasm.
|
|
757
|
-
return
|
|
1051
|
+
cronGet(name) {
|
|
1052
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1053
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1054
|
+
const ret = wasm.schedule_cronGet(this.__wbg_ptr, ptr0, len0);
|
|
1055
|
+
return ret;
|
|
758
1056
|
}
|
|
759
1057
|
/**
|
|
760
|
-
* @
|
|
1058
|
+
* @param {string} name
|
|
1059
|
+
* @param {number | null} [limit]
|
|
1060
|
+
* @returns {Promise<any>}
|
|
761
1061
|
*/
|
|
762
|
-
|
|
763
|
-
const
|
|
764
|
-
|
|
765
|
-
wasm.
|
|
766
|
-
return
|
|
1062
|
+
cronHistory(name, limit) {
|
|
1063
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1064
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1065
|
+
const ret = wasm.schedule_cronHistory(this.__wbg_ptr, ptr0, len0, !isLikeNone(limit), isLikeNone(limit) ? 0 : limit);
|
|
1066
|
+
return ret;
|
|
767
1067
|
}
|
|
768
1068
|
/**
|
|
769
|
-
* @
|
|
1069
|
+
* @returns {Promise<any>}
|
|
770
1070
|
*/
|
|
771
|
-
|
|
772
|
-
const
|
|
1071
|
+
cronList() {
|
|
1072
|
+
const ret = wasm.schedule_cronList(this.__wbg_ptr);
|
|
1073
|
+
return ret;
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* @param {string} name
|
|
1077
|
+
* @param {string} expression
|
|
1078
|
+
* @param {string | null | undefined} timezone
|
|
1079
|
+
* @param {string} action_name
|
|
1080
|
+
* @param {Uint8Array} args
|
|
1081
|
+
* @param {number | null} [max_history]
|
|
1082
|
+
* @returns {Promise<void>}
|
|
1083
|
+
*/
|
|
1084
|
+
cronSet(name, expression, timezone, action_name, args, max_history) {
|
|
1085
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
773
1086
|
const len0 = WASM_VECTOR_LEN;
|
|
774
|
-
|
|
1087
|
+
const ptr1 = passStringToWasm0(expression, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1088
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1089
|
+
var ptr2 = isLikeNone(timezone) ? 0 : passStringToWasm0(timezone, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1090
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1091
|
+
const ptr3 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1092
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1093
|
+
const ptr4 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1094
|
+
const len4 = WASM_VECTOR_LEN;
|
|
1095
|
+
const ret = wasm.schedule_cronSet(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, !isLikeNone(max_history), isLikeNone(max_history) ? 0 : max_history);
|
|
1096
|
+
return ret;
|
|
1097
|
+
}
|
|
1098
|
+
/**
|
|
1099
|
+
* @param {string} id
|
|
1100
|
+
* @returns {Promise<any>}
|
|
1101
|
+
*/
|
|
1102
|
+
get(id) {
|
|
1103
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1104
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1105
|
+
const ret = wasm.schedule_get(this.__wbg_ptr, ptr0, len0);
|
|
1106
|
+
return ret;
|
|
1107
|
+
}
|
|
1108
|
+
/**
|
|
1109
|
+
* @returns {Promise<any>}
|
|
1110
|
+
*/
|
|
1111
|
+
list() {
|
|
1112
|
+
const ret = wasm.schedule_list(this.__wbg_ptr);
|
|
1113
|
+
return ret;
|
|
775
1114
|
}
|
|
776
1115
|
}
|
|
1116
|
+
if (Symbol.dispose) Schedule.prototype[Symbol.dispose] = Schedule.prototype.free;
|
|
777
1117
|
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
1118
|
+
export class SqliteDb {
|
|
1119
|
+
static __wrap(ptr) {
|
|
1120
|
+
const obj = Object.create(SqliteDb.prototype);
|
|
1121
|
+
obj.__wbg_ptr = ptr;
|
|
1122
|
+
SqliteDbFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1123
|
+
return obj;
|
|
1124
|
+
}
|
|
784
1125
|
__destroy_into_raw() {
|
|
785
1126
|
const ptr = this.__wbg_ptr;
|
|
786
1127
|
this.__wbg_ptr = 0;
|
|
787
|
-
|
|
1128
|
+
SqliteDbFinalization.unregister(this);
|
|
788
1129
|
return ptr;
|
|
789
1130
|
}
|
|
790
|
-
|
|
791
1131
|
free() {
|
|
792
1132
|
const ptr = this.__destroy_into_raw();
|
|
793
|
-
wasm.
|
|
1133
|
+
wasm.__wbg_sqlitedb_free(ptr, 0);
|
|
794
1134
|
}
|
|
795
1135
|
/**
|
|
796
|
-
* @param {
|
|
797
|
-
* @param {
|
|
798
|
-
* @
|
|
799
|
-
|
|
1136
|
+
* @param {number | null} [timeout_ms]
|
|
1137
|
+
* @param {string | null} [name]
|
|
1138
|
+
* @returns {Promise<SqliteTransaction>}
|
|
1139
|
+
*/
|
|
1140
|
+
beginTransaction(timeout_ms, name) {
|
|
1141
|
+
var ptr0 = isLikeNone(name) ? 0 : passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1142
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1143
|
+
const ret = wasm.sqlitedb_beginTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms, ptr0, len0);
|
|
1144
|
+
return ret;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* @returns {Promise<void>}
|
|
1148
|
+
*/
|
|
1149
|
+
close() {
|
|
1150
|
+
const ret = wasm.sqlitedb_close(this.__wbg_ptr);
|
|
1151
|
+
return ret;
|
|
1152
|
+
}
|
|
1153
|
+
/**
|
|
1154
|
+
* @param {string} sql
|
|
800
1155
|
* @returns {Promise<any>}
|
|
801
1156
|
*/
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
const
|
|
1157
|
+
exec(sql) {
|
|
1158
|
+
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1159
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1160
|
+
const ret = wasm.sqlitedb_exec(this.__wbg_ptr, ptr0, len0);
|
|
805
1161
|
return ret;
|
|
806
1162
|
}
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
1163
|
+
/**
|
|
1164
|
+
* @param {any} statements
|
|
1165
|
+
* @returns {Promise<any>}
|
|
1166
|
+
*/
|
|
1167
|
+
executeBatch(statements) {
|
|
1168
|
+
const ret = wasm.sqlitedb_executeBatch(this.__wbg_ptr, statements);
|
|
1169
|
+
return ret;
|
|
812
1170
|
}
|
|
813
1171
|
/**
|
|
814
|
-
* @param {
|
|
815
|
-
* @
|
|
1172
|
+
* @param {string} sql
|
|
1173
|
+
* @param {any} params
|
|
1174
|
+
* @returns {Promise<any>}
|
|
816
1175
|
*/
|
|
817
|
-
|
|
818
|
-
const
|
|
1176
|
+
execute(sql, params) {
|
|
1177
|
+
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1178
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1179
|
+
const ret = wasm.sqlitedb_execute(this.__wbg_ptr, ptr0, len0, params);
|
|
819
1180
|
return ret;
|
|
820
1181
|
}
|
|
821
1182
|
/**
|
|
822
|
-
* @param {string}
|
|
823
|
-
* @param {
|
|
1183
|
+
* @param {string} sql
|
|
1184
|
+
* @param {any} params
|
|
1185
|
+
* @returns {Promise<any>}
|
|
824
1186
|
*/
|
|
825
|
-
|
|
826
|
-
const ptr0 = passStringToWasm0(
|
|
1187
|
+
query(sql, params) {
|
|
1188
|
+
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
827
1189
|
const len0 = WASM_VECTOR_LEN;
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
if (ret[1]) {
|
|
831
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
832
|
-
}
|
|
1190
|
+
const ret = wasm.sqlitedb_query(this.__wbg_ptr, ptr0, len0, params);
|
|
1191
|
+
return ret;
|
|
833
1192
|
}
|
|
834
1193
|
/**
|
|
835
|
-
* @
|
|
1194
|
+
* @param {string} sql
|
|
1195
|
+
* @param {any} params
|
|
1196
|
+
* @returns {Promise<any>}
|
|
836
1197
|
*/
|
|
837
|
-
|
|
838
|
-
const
|
|
1198
|
+
run(sql, params) {
|
|
1199
|
+
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1200
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1201
|
+
const ret = wasm.sqlitedb_run(this.__wbg_ptr, ptr0, len0, params);
|
|
839
1202
|
return ret;
|
|
840
1203
|
}
|
|
841
1204
|
}
|
|
1205
|
+
if (Symbol.dispose) SqliteDb.prototype[Symbol.dispose] = SqliteDb.prototype.free;
|
|
842
1206
|
|
|
843
|
-
|
|
844
|
-
? { register: () => {}, unregister: () => {} }
|
|
845
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_kv_free(ptr >>> 0, 1));
|
|
846
|
-
|
|
847
|
-
export class Kv {
|
|
848
|
-
|
|
1207
|
+
export class SqliteTransaction {
|
|
849
1208
|
static __wrap(ptr) {
|
|
850
|
-
|
|
851
|
-
const obj = Object.create(Kv.prototype);
|
|
1209
|
+
const obj = Object.create(SqliteTransaction.prototype);
|
|
852
1210
|
obj.__wbg_ptr = ptr;
|
|
853
|
-
|
|
1211
|
+
SqliteTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
854
1212
|
return obj;
|
|
855
1213
|
}
|
|
856
|
-
|
|
857
1214
|
__destroy_into_raw() {
|
|
858
1215
|
const ptr = this.__wbg_ptr;
|
|
859
1216
|
this.__wbg_ptr = 0;
|
|
860
|
-
|
|
1217
|
+
SqliteTransactionFinalization.unregister(this);
|
|
861
1218
|
return ptr;
|
|
862
1219
|
}
|
|
863
|
-
|
|
864
1220
|
free() {
|
|
865
1221
|
const ptr = this.__destroy_into_raw();
|
|
866
|
-
wasm.
|
|
1222
|
+
wasm.__wbg_sqlitetransaction_free(ptr, 0);
|
|
867
1223
|
}
|
|
868
1224
|
/**
|
|
869
|
-
* @param {Uint8Array} key
|
|
870
1225
|
* @returns {Promise<void>}
|
|
871
1226
|
*/
|
|
872
|
-
|
|
873
|
-
const
|
|
874
|
-
const len0 = WASM_VECTOR_LEN;
|
|
875
|
-
const ret = wasm.kv_delete(this.__wbg_ptr, ptr0, len0);
|
|
1227
|
+
commit() {
|
|
1228
|
+
const ret = wasm.sqlitetransaction_commit(this.__wbg_ptr);
|
|
876
1229
|
return ret;
|
|
877
1230
|
}
|
|
878
1231
|
/**
|
|
879
|
-
* @param {
|
|
880
|
-
* @param {Uint8Array} end
|
|
881
|
-
* @param {any} options
|
|
1232
|
+
* @param {string} sql
|
|
882
1233
|
* @returns {Promise<any>}
|
|
883
1234
|
*/
|
|
884
|
-
|
|
885
|
-
const ptr0 =
|
|
1235
|
+
exec(sql) {
|
|
1236
|
+
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
886
1237
|
const len0 = WASM_VECTOR_LEN;
|
|
887
|
-
const
|
|
888
|
-
const len1 = WASM_VECTOR_LEN;
|
|
889
|
-
const ret = wasm.kv_listRange(this.__wbg_ptr, ptr0, len0, ptr1, len1, options);
|
|
1238
|
+
const ret = wasm.sqlitetransaction_exec(this.__wbg_ptr, ptr0, len0);
|
|
890
1239
|
return ret;
|
|
891
1240
|
}
|
|
892
1241
|
/**
|
|
893
|
-
* @param {
|
|
894
|
-
* @param {any}
|
|
1242
|
+
* @param {string} sql
|
|
1243
|
+
* @param {any} params
|
|
895
1244
|
* @returns {Promise<any>}
|
|
896
1245
|
*/
|
|
897
|
-
|
|
898
|
-
const ptr0 =
|
|
1246
|
+
execute(sql, params) {
|
|
1247
|
+
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
899
1248
|
const len0 = WASM_VECTOR_LEN;
|
|
900
|
-
const ret = wasm.
|
|
1249
|
+
const ret = wasm.sqlitetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
|
|
901
1250
|
return ret;
|
|
902
1251
|
}
|
|
903
1252
|
/**
|
|
904
|
-
* @param {Array<any>} keys
|
|
905
1253
|
* @returns {Promise<void>}
|
|
906
1254
|
*/
|
|
907
|
-
|
|
908
|
-
const ret = wasm.
|
|
1255
|
+
rollback() {
|
|
1256
|
+
const ret = wasm.sqlitetransaction_rollback(this.__wbg_ptr);
|
|
909
1257
|
return ret;
|
|
910
1258
|
}
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
const len1 = WASM_VECTOR_LEN;
|
|
921
|
-
const ret = wasm.kv_deleteRange(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
922
|
-
return ret;
|
|
1259
|
+
}
|
|
1260
|
+
if (Symbol.dispose) SqliteTransaction.prototype[Symbol.dispose] = SqliteTransaction.prototype.free;
|
|
1261
|
+
|
|
1262
|
+
export class WebSocketHandle {
|
|
1263
|
+
static __wrap(ptr) {
|
|
1264
|
+
const obj = Object.create(WebSocketHandle.prototype);
|
|
1265
|
+
obj.__wbg_ptr = ptr;
|
|
1266
|
+
WebSocketHandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1267
|
+
return obj;
|
|
923
1268
|
}
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
const
|
|
932
|
-
|
|
1269
|
+
__destroy_into_raw() {
|
|
1270
|
+
const ptr = this.__wbg_ptr;
|
|
1271
|
+
this.__wbg_ptr = 0;
|
|
1272
|
+
WebSocketHandleFinalization.unregister(this);
|
|
1273
|
+
return ptr;
|
|
1274
|
+
}
|
|
1275
|
+
free() {
|
|
1276
|
+
const ptr = this.__destroy_into_raw();
|
|
1277
|
+
wasm.__wbg_websockethandle_free(ptr, 0);
|
|
933
1278
|
}
|
|
934
1279
|
/**
|
|
935
|
-
* @param {
|
|
936
|
-
* @param {
|
|
1280
|
+
* @param {number | null} [code]
|
|
1281
|
+
* @param {string | null} [reason]
|
|
937
1282
|
* @returns {Promise<void>}
|
|
938
1283
|
*/
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
const
|
|
943
|
-
const len1 = WASM_VECTOR_LEN;
|
|
944
|
-
const ret = wasm.kv_put(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1284
|
+
close(code, reason) {
|
|
1285
|
+
var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1286
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1287
|
+
const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
|
|
945
1288
|
return ret;
|
|
946
1289
|
}
|
|
947
1290
|
/**
|
|
948
|
-
* @param {
|
|
949
|
-
* @
|
|
1291
|
+
* @param {Uint8Array} data
|
|
1292
|
+
* @param {boolean} binary
|
|
950
1293
|
*/
|
|
951
|
-
|
|
952
|
-
const
|
|
953
|
-
|
|
1294
|
+
send(data, binary) {
|
|
1295
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1296
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1297
|
+
const ret = wasm.websockethandle_send(this.__wbg_ptr, ptr0, len0, binary);
|
|
1298
|
+
if (ret[1]) {
|
|
1299
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1300
|
+
}
|
|
954
1301
|
}
|
|
955
1302
|
/**
|
|
956
|
-
* @param {
|
|
957
|
-
* @returns {Promise<void>}
|
|
1303
|
+
* @param {Function} callback
|
|
958
1304
|
*/
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
1305
|
+
setEventCallback(callback) {
|
|
1306
|
+
wasm.websockethandle_setEventCallback(this.__wbg_ptr, callback);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
if (Symbol.dispose) WebSocketHandle.prototype[Symbol.dispose] = WebSocketHandle.prototype.free;
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* @param {Promise<any>} promise
|
|
1313
|
+
* @returns {Promise<any>}
|
|
1314
|
+
*/
|
|
1315
|
+
export function awaitPromise(promise) {
|
|
1316
|
+
const ret = wasm.awaitPromise(promise);
|
|
1317
|
+
return ret;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
/**
|
|
1321
|
+
* @returns {string}
|
|
1322
|
+
*/
|
|
1323
|
+
export function bridgeRivetErrorPrefix() {
|
|
1324
|
+
let deferred1_0;
|
|
1325
|
+
let deferred1_1;
|
|
1326
|
+
try {
|
|
1327
|
+
const ret = wasm.bridgeRivetErrorPrefix();
|
|
1328
|
+
deferred1_0 = ret[0];
|
|
1329
|
+
deferred1_1 = ret[1];
|
|
1330
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1331
|
+
} finally {
|
|
1332
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
962
1333
|
}
|
|
963
1334
|
}
|
|
964
1335
|
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
1336
|
+
/**
|
|
1337
|
+
* @param {Uint8Array} bytes
|
|
1338
|
+
* @returns {Uint8Array}
|
|
1339
|
+
*/
|
|
1340
|
+
export function roundTripBytes(bytes) {
|
|
1341
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1342
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1343
|
+
const ret = wasm.roundTripBytes(ptr0, len0);
|
|
1344
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
1345
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1346
|
+
return v2;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
export function start() {
|
|
1350
|
+
wasm.start();
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* @param {Uint8Array} bytes
|
|
1355
|
+
* @returns {Uint8Array}
|
|
1356
|
+
*/
|
|
1357
|
+
export function uint8ArrayFromBytes(bytes) {
|
|
1358
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1359
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1360
|
+
const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
|
|
1361
|
+
return ret;
|
|
1362
|
+
}
|
|
1363
|
+
function __wbg_get_imports() {
|
|
1364
|
+
const import0 = {
|
|
1365
|
+
__proto__: null,
|
|
1366
|
+
__wbg_Error_30c8987f7c2ed4e2: function(arg0, arg1) {
|
|
1367
|
+
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1368
|
+
return ret;
|
|
1369
|
+
},
|
|
1370
|
+
__wbg_Number_14af1003b8dd5ead: function(arg0) {
|
|
1371
|
+
const ret = Number(arg0);
|
|
1372
|
+
return ret;
|
|
1373
|
+
},
|
|
1374
|
+
__wbg_String_8564e559799eccda: function(arg0, arg1) {
|
|
1375
|
+
const ret = String(arg1);
|
|
1376
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1377
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1378
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1379
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1380
|
+
},
|
|
1381
|
+
__wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
|
|
1382
|
+
const v = arg0;
|
|
1383
|
+
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1384
|
+
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1385
|
+
},
|
|
1386
|
+
__wbg___wbindgen_debug_string_4687d8d8c2017d52: function(arg0, arg1) {
|
|
1387
|
+
const ret = debugString(arg1);
|
|
1388
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1389
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1390
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1391
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1392
|
+
},
|
|
1393
|
+
__wbg___wbindgen_in_92f62ee1427d9e49: function(arg0, arg1) {
|
|
1394
|
+
const ret = arg0 in arg1;
|
|
1395
|
+
return ret;
|
|
1396
|
+
},
|
|
1397
|
+
__wbg___wbindgen_is_function_1f9d30630b8b1d3d: function(arg0) {
|
|
1398
|
+
const ret = typeof(arg0) === 'function';
|
|
1399
|
+
return ret;
|
|
1400
|
+
},
|
|
1401
|
+
__wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
|
|
1402
|
+
const ret = arg0 === null;
|
|
1403
|
+
return ret;
|
|
1404
|
+
},
|
|
1405
|
+
__wbg___wbindgen_is_object_3c45d4f2dde4e749: function(arg0) {
|
|
1406
|
+
const val = arg0;
|
|
1407
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
1408
|
+
return ret;
|
|
1409
|
+
},
|
|
1410
|
+
__wbg___wbindgen_is_string_90b56bc79aad6f6c: function(arg0) {
|
|
1411
|
+
const ret = typeof(arg0) === 'string';
|
|
1412
|
+
return ret;
|
|
1413
|
+
},
|
|
1414
|
+
__wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
|
|
1415
|
+
const ret = arg0 === undefined;
|
|
1416
|
+
return ret;
|
|
1417
|
+
},
|
|
1418
|
+
__wbg___wbindgen_jsval_loose_eq_677f21e468d6b461: function(arg0, arg1) {
|
|
1419
|
+
const ret = arg0 == arg1;
|
|
1420
|
+
return ret;
|
|
1421
|
+
},
|
|
1422
|
+
__wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
|
|
1423
|
+
const obj = arg1;
|
|
1424
|
+
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1425
|
+
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1426
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1427
|
+
},
|
|
1428
|
+
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
|
|
1429
|
+
const obj = arg1;
|
|
1430
|
+
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1431
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1432
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1433
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1434
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1435
|
+
},
|
|
1436
|
+
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
|
|
1437
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1438
|
+
},
|
|
1439
|
+
__wbg__wbg_cb_unref_dcc1a90847f04c41: function(arg0) {
|
|
1440
|
+
arg0._wbg_cb_unref();
|
|
1441
|
+
},
|
|
1442
|
+
__wbg_actorcontext_new: function(arg0) {
|
|
1443
|
+
const ret = ActorContext.__wrap(arg0);
|
|
1444
|
+
return ret;
|
|
1445
|
+
},
|
|
1446
|
+
__wbg_actorstatetransaction_new: function(arg0) {
|
|
1447
|
+
const ret = ActorStateTransaction.__wrap(arg0);
|
|
1448
|
+
return ret;
|
|
1449
|
+
},
|
|
1450
|
+
__wbg_buffer_56ec2905a66f58b9: function(arg0) {
|
|
1451
|
+
const ret = arg0.buffer;
|
|
1452
|
+
return ret;
|
|
1453
|
+
},
|
|
1454
|
+
__wbg_bufferedAmount_64b8a4229f549d4b: function(arg0) {
|
|
1455
|
+
const ret = arg0.bufferedAmount;
|
|
1456
|
+
return ret;
|
|
1457
|
+
},
|
|
1458
|
+
__wbg_call_1875a20c43a36133: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1459
|
+
const ret = arg0.call(arg1, arg2, arg3);
|
|
1460
|
+
return ret;
|
|
1461
|
+
}, arguments); },
|
|
1462
|
+
__wbg_call_187d372bd5fdd4aa: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1463
|
+
const ret = arg0.call(arg1, arg2);
|
|
1464
|
+
return ret;
|
|
1465
|
+
}, arguments); },
|
|
1466
|
+
__wbg_call_6137034ef55c9d0f: function() { return handleError(function (arg0, arg1) {
|
|
1467
|
+
const ret = arg0.call(arg1);
|
|
1468
|
+
return ret;
|
|
1469
|
+
}, arguments); },
|
|
1470
|
+
__wbg_cancellationtoken_new: function(arg0) {
|
|
1471
|
+
const ret = CancellationToken.__wrap(arg0);
|
|
1472
|
+
return ret;
|
|
1473
|
+
},
|
|
1474
|
+
__wbg_close_150f701b1a60e0ac: function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1475
|
+
arg0.close(arg1, getStringFromWasm0(arg2, arg3));
|
|
1476
|
+
}, arguments); },
|
|
1477
|
+
__wbg_close_d3ed56b5763be5ae: function() { return handleError(function (arg0) {
|
|
1478
|
+
arg0.close();
|
|
1479
|
+
}, arguments); },
|
|
1480
|
+
__wbg_code_4cb6dbcfceec1eac: function(arg0) {
|
|
1481
|
+
const ret = arg0.code;
|
|
1482
|
+
return ret;
|
|
1483
|
+
},
|
|
1484
|
+
__wbg_connhandle_new: function(arg0) {
|
|
1485
|
+
const ret = ConnHandle.__wrap(arg0);
|
|
1486
|
+
return ret;
|
|
1487
|
+
},
|
|
1488
|
+
__wbg_construct_2cc135b78387ed16: function() { return handleError(function (arg0, arg1) {
|
|
1489
|
+
const ret = Reflect.construct(arg0, arg1);
|
|
1490
|
+
return ret;
|
|
1491
|
+
}, arguments); },
|
|
1492
|
+
__wbg_crypto_38df2bab126b63dc: function(arg0) {
|
|
1493
|
+
const ret = arg0.crypto;
|
|
1494
|
+
return ret;
|
|
1495
|
+
},
|
|
1496
|
+
__wbg_data_522f7abc70721269: function(arg0) {
|
|
1497
|
+
const ret = arg0.data;
|
|
1498
|
+
return ret;
|
|
1499
|
+
},
|
|
1500
|
+
__wbg_done_b41a1d26cdb37fb6: function(arg0) {
|
|
1501
|
+
const ret = arg0.done;
|
|
1502
|
+
return ret;
|
|
1503
|
+
},
|
|
1504
|
+
__wbg_error_757e9472f8410341: function(arg0, arg1) {
|
|
1505
|
+
let deferred0_0;
|
|
1506
|
+
let deferred0_1;
|
|
1507
|
+
try {
|
|
1508
|
+
deferred0_0 = arg0;
|
|
1509
|
+
deferred0_1 = arg1;
|
|
1510
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1511
|
+
} finally {
|
|
1512
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1513
|
+
}
|
|
1514
|
+
},
|
|
1515
|
+
__wbg_getRandomValues_973dabfb0ad1769f: function() { return handleError(function (arg0, arg1) {
|
|
1516
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1517
|
+
}, arguments); },
|
|
1518
|
+
__wbg_getRandomValues_c44a50d8cfdaebeb: function() { return handleError(function (arg0, arg1) {
|
|
1519
|
+
arg0.getRandomValues(arg1);
|
|
1520
|
+
}, arguments); },
|
|
1521
|
+
__wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
|
|
1522
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1523
|
+
return ret;
|
|
1524
|
+
}, arguments); },
|
|
1525
|
+
__wbg_get_658f6698067d9515: function() { return handleError(function (arg0, arg1) {
|
|
1526
|
+
const ret = Reflect.get(arg0, arg1);
|
|
1527
|
+
return ret;
|
|
1528
|
+
}, arguments); },
|
|
1529
|
+
__wbg_get_6c896e0571ddae51: function(arg0, arg1) {
|
|
1530
|
+
const ret = arg0[arg1 >>> 0];
|
|
1531
|
+
return ret;
|
|
1532
|
+
},
|
|
1533
|
+
__wbg_get_unchecked_288889d017702237: function(arg0, arg1) {
|
|
1534
|
+
const ret = arg0[arg1 >>> 0];
|
|
1535
|
+
return ret;
|
|
1536
|
+
},
|
|
1537
|
+
__wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
|
|
1538
|
+
const ret = arg0[arg1];
|
|
1539
|
+
return ret;
|
|
1540
|
+
},
|
|
1541
|
+
__wbg_instanceof_ArrayBuffer_a99f175873e5d9b8: function(arg0) {
|
|
1542
|
+
let result;
|
|
1543
|
+
try {
|
|
1544
|
+
result = arg0 instanceof ArrayBuffer;
|
|
1545
|
+
} catch (_) {
|
|
1546
|
+
result = false;
|
|
1547
|
+
}
|
|
1548
|
+
const ret = result;
|
|
1549
|
+
return ret;
|
|
1550
|
+
},
|
|
1551
|
+
__wbg_instanceof_Error_80a725f81f2e102d: function(arg0) {
|
|
1552
|
+
let result;
|
|
1553
|
+
try {
|
|
1554
|
+
result = arg0 instanceof Error;
|
|
1555
|
+
} catch (_) {
|
|
1556
|
+
result = false;
|
|
1557
|
+
}
|
|
1558
|
+
const ret = result;
|
|
1559
|
+
return ret;
|
|
1560
|
+
},
|
|
1561
|
+
__wbg_instanceof_Object_67a83cdc00c5d141: function(arg0) {
|
|
1562
|
+
let result;
|
|
1563
|
+
try {
|
|
1564
|
+
result = arg0 instanceof Object;
|
|
1565
|
+
} catch (_) {
|
|
1566
|
+
result = false;
|
|
1567
|
+
}
|
|
1568
|
+
const ret = result;
|
|
1569
|
+
return ret;
|
|
1570
|
+
},
|
|
1571
|
+
__wbg_instanceof_Promise_e1dc6893aa1ece28: function(arg0) {
|
|
1572
|
+
let result;
|
|
1573
|
+
try {
|
|
1574
|
+
result = arg0 instanceof Promise;
|
|
1575
|
+
} catch (_) {
|
|
1576
|
+
result = false;
|
|
1577
|
+
}
|
|
1578
|
+
const ret = result;
|
|
1579
|
+
return ret;
|
|
1580
|
+
},
|
|
1581
|
+
__wbg_instanceof_Uint8Array_828cef2aaacafc31: function(arg0) {
|
|
1582
|
+
let result;
|
|
1583
|
+
try {
|
|
1584
|
+
result = arg0 instanceof Uint8Array;
|
|
1585
|
+
} catch (_) {
|
|
1586
|
+
result = false;
|
|
1587
|
+
}
|
|
1588
|
+
const ret = result;
|
|
1589
|
+
return ret;
|
|
1590
|
+
},
|
|
1591
|
+
__wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
|
|
1592
|
+
const ret = Array.isArray(arg0);
|
|
1593
|
+
return ret;
|
|
1594
|
+
},
|
|
1595
|
+
__wbg_isSafeInteger_717808ad6a54bd9e: function(arg0) {
|
|
1596
|
+
const ret = Number.isSafeInteger(arg0);
|
|
1597
|
+
return ret;
|
|
1598
|
+
},
|
|
1599
|
+
__wbg_iterator_e3c31c892080e444: function() {
|
|
1600
|
+
const ret = Symbol.iterator;
|
|
1601
|
+
return ret;
|
|
1602
|
+
},
|
|
1603
|
+
__wbg_keys_440be172f17c0265: function(arg0) {
|
|
1604
|
+
const ret = Object.keys(arg0);
|
|
1605
|
+
return ret;
|
|
1606
|
+
},
|
|
1607
|
+
__wbg_length_7f3c00c40364105e: function(arg0) {
|
|
1608
|
+
const ret = arg0.length;
|
|
1609
|
+
return ret;
|
|
1610
|
+
},
|
|
1611
|
+
__wbg_length_d4bdea10311bd9cf: function(arg0) {
|
|
1612
|
+
const ret = arg0.length;
|
|
1613
|
+
return ret;
|
|
1614
|
+
},
|
|
1615
|
+
__wbg_message_49f5412048473de5: function(arg0, arg1) {
|
|
1616
|
+
const ret = arg1.message;
|
|
1617
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1618
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1619
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1620
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1621
|
+
},
|
|
1622
|
+
__wbg_message_5f8387f0c32b90a7: function(arg0) {
|
|
1623
|
+
const ret = arg0.message;
|
|
1624
|
+
return ret;
|
|
1625
|
+
},
|
|
1626
|
+
__wbg_msCrypto_bd5a034af96bcba6: function(arg0) {
|
|
1627
|
+
const ret = arg0.msCrypto;
|
|
1628
|
+
return ret;
|
|
1629
|
+
},
|
|
1630
|
+
__wbg_new_1dbf7428bba60a42: function(arg0) {
|
|
1631
|
+
const ret = new Uint8Array(arg0);
|
|
1632
|
+
return ret;
|
|
1633
|
+
},
|
|
1634
|
+
__wbg_new_227d7c05414eb861: function() {
|
|
1635
|
+
const ret = new Error();
|
|
1636
|
+
return ret;
|
|
1637
|
+
},
|
|
1638
|
+
__wbg_new_28744009d011f847: function() {
|
|
1639
|
+
const ret = new Map();
|
|
1640
|
+
return ret;
|
|
1641
|
+
},
|
|
1642
|
+
__wbg_new_343a093a3c2ffb4e: function(arg0, arg1) {
|
|
1643
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1644
|
+
return ret;
|
|
1645
|
+
},
|
|
1646
|
+
__wbg_new_5502aad30c185fc8: function(arg0, arg1) {
|
|
1647
|
+
try {
|
|
1648
|
+
var state0 = {a: arg0, b: arg1};
|
|
1649
|
+
var cb0 = (arg0, arg1) => {
|
|
1650
|
+
const a = state0.a;
|
|
1651
|
+
state0.a = 0;
|
|
1652
|
+
try {
|
|
1653
|
+
return wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
1654
|
+
} finally {
|
|
1655
|
+
state0.a = a;
|
|
1656
|
+
}
|
|
1657
|
+
};
|
|
1658
|
+
const ret = new Promise(cb0);
|
|
1659
|
+
return ret;
|
|
1660
|
+
} finally {
|
|
1661
|
+
state0.a = 0;
|
|
1662
|
+
}
|
|
1663
|
+
},
|
|
1664
|
+
__wbg_new_617a8cdb8bb1130e: function() {
|
|
1665
|
+
const ret = new Object();
|
|
1666
|
+
return ret;
|
|
1667
|
+
},
|
|
1668
|
+
__wbg_new_ee2291f50781bf1d: function() {
|
|
1669
|
+
const ret = new Array();
|
|
1670
|
+
return ret;
|
|
1671
|
+
},
|
|
1672
|
+
__wbg_new_from_slice_9a868026ffa4208a: function(arg0, arg1) {
|
|
1673
|
+
const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
|
|
1674
|
+
return ret;
|
|
1675
|
+
},
|
|
1676
|
+
__wbg_new_typed_b01cb72a8af741a3: function(arg0, arg1) {
|
|
1677
|
+
try {
|
|
1678
|
+
var state0 = {a: arg0, b: arg1};
|
|
1679
|
+
var cb0 = (arg0, arg1) => {
|
|
1680
|
+
const a = state0.a;
|
|
1681
|
+
state0.a = 0;
|
|
1682
|
+
try {
|
|
1683
|
+
return wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined_______true_(a, state0.b, arg0, arg1);
|
|
1684
|
+
} finally {
|
|
1685
|
+
state0.a = a;
|
|
1686
|
+
}
|
|
1687
|
+
};
|
|
1688
|
+
const ret = new Promise(cb0);
|
|
1689
|
+
return ret;
|
|
1690
|
+
} finally {
|
|
1691
|
+
state0.a = 0;
|
|
1692
|
+
}
|
|
1693
|
+
},
|
|
1694
|
+
__wbg_new_with_length_3da0ad195f6f63ba: function(arg0) {
|
|
1695
|
+
const ret = new Uint8Array(arg0 >>> 0);
|
|
1696
|
+
return ret;
|
|
1697
|
+
},
|
|
1698
|
+
__wbg_new_with_str_sequence_f79e461d58fdeacc: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1699
|
+
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
|
|
1700
|
+
return ret;
|
|
1701
|
+
}, arguments); },
|
|
1702
|
+
__wbg_next_33784799010f1bbe: function(arg0) {
|
|
1703
|
+
const ret = arg0.next;
|
|
1704
|
+
return ret;
|
|
1705
|
+
},
|
|
1706
|
+
__wbg_next_f4aac29c42af995c: function() { return handleError(function (arg0) {
|
|
1707
|
+
const ret = arg0.next();
|
|
1708
|
+
return ret;
|
|
1709
|
+
}, arguments); },
|
|
1710
|
+
__wbg_node_84ea875411254db1: function(arg0) {
|
|
1711
|
+
const ret = arg0.node;
|
|
1712
|
+
return ret;
|
|
1713
|
+
},
|
|
1714
|
+
__wbg_now_aa4ccb83129e9e55: function() {
|
|
1715
|
+
const ret = Date.now();
|
|
1716
|
+
return ret;
|
|
1717
|
+
},
|
|
1718
|
+
__wbg_now_e7c6795a7f81e10f: function(arg0) {
|
|
1719
|
+
const ret = arg0.now();
|
|
1720
|
+
return ret;
|
|
1721
|
+
},
|
|
1722
|
+
__wbg_performance_3fcf6e32a7e1ed0a: function(arg0) {
|
|
1723
|
+
const ret = arg0.performance;
|
|
1724
|
+
return ret;
|
|
1725
|
+
},
|
|
1726
|
+
__wbg_process_44c7a14e11e9f69e: function(arg0) {
|
|
1727
|
+
const ret = arg0.process;
|
|
1728
|
+
return ret;
|
|
1729
|
+
},
|
|
1730
|
+
__wbg_prototypesetcall_bc27214492979395: function(arg0, arg1, arg2) {
|
|
1731
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
1732
|
+
},
|
|
1733
|
+
__wbg_push_2baf45db356cf468: function(arg0, arg1) {
|
|
1734
|
+
const ret = arg0.push(arg1);
|
|
1735
|
+
return ret;
|
|
1736
|
+
},
|
|
1737
|
+
__wbg_queueMicrotask_9833f9a49df95a49: function(arg0) {
|
|
1738
|
+
const ret = arg0.queueMicrotask;
|
|
1739
|
+
return ret;
|
|
1740
|
+
},
|
|
1741
|
+
__wbg_queueMicrotask_a72f977e97f23c5f: function(arg0) {
|
|
1742
|
+
queueMicrotask(arg0);
|
|
1743
|
+
},
|
|
1744
|
+
__wbg_queuemessage_new: function(arg0) {
|
|
1745
|
+
const ret = QueueMessage.__wrap(arg0);
|
|
1746
|
+
return ret;
|
|
1747
|
+
},
|
|
1748
|
+
__wbg_randomFillSync_6c25eac9869eb53c: function() { return handleError(function (arg0, arg1) {
|
|
1749
|
+
arg0.randomFillSync(arg1);
|
|
1750
|
+
}, arguments); },
|
|
1751
|
+
__wbg_readyState_d8514376867e415b: function(arg0) {
|
|
1752
|
+
const ret = arg0.readyState;
|
|
1753
|
+
return ret;
|
|
1754
|
+
},
|
|
1755
|
+
__wbg_reason_832acaf5f4083b7b: function(arg0, arg1) {
|
|
1756
|
+
const ret = arg1.reason;
|
|
1757
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1758
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1759
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1760
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1761
|
+
},
|
|
1762
|
+
__wbg_require_b4edbdcf3e2a1ef0: function() { return handleError(function () {
|
|
1763
|
+
const ret = module.require;
|
|
1764
|
+
return ret;
|
|
1765
|
+
}, arguments); },
|
|
1766
|
+
__wbg_resolve_0076e10020304ede: function(arg0) {
|
|
1767
|
+
const ret = Promise.resolve(arg0);
|
|
1768
|
+
return ret;
|
|
1769
|
+
},
|
|
1770
|
+
__wbg_send_797960c7a6a0270d: function() { return handleError(function (arg0, arg1) {
|
|
1771
|
+
arg0.send(arg1);
|
|
1772
|
+
}, arguments); },
|
|
1773
|
+
__wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
|
|
1774
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1775
|
+
return ret;
|
|
1776
|
+
}, arguments); },
|
|
1777
|
+
__wbg_set_6ae97e73113c4f0b: function(arg0, arg1, arg2) {
|
|
1778
|
+
const ret = arg0.set(arg1, arg2);
|
|
1779
|
+
return ret;
|
|
1780
|
+
},
|
|
1781
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
1782
|
+
arg0[arg1] = arg2;
|
|
1783
|
+
},
|
|
1784
|
+
__wbg_set_bea140a88be9b277: function(arg0, arg1, arg2) {
|
|
1785
|
+
arg0[arg1 >>> 0] = arg2;
|
|
1786
|
+
},
|
|
1787
|
+
__wbg_set_binaryType_21835bf0df8f70aa: function(arg0, arg1) {
|
|
1788
|
+
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
1789
|
+
},
|
|
1790
|
+
__wbg_set_onclose_a84370531f3d2948: function(arg0, arg1) {
|
|
1791
|
+
arg0.onclose = arg1;
|
|
1792
|
+
},
|
|
1793
|
+
__wbg_set_onerror_94ee307653399172: function(arg0, arg1) {
|
|
1794
|
+
arg0.onerror = arg1;
|
|
1795
|
+
},
|
|
1796
|
+
__wbg_set_onmessage_cb6f77d2d8e0402a: function(arg0, arg1) {
|
|
1797
|
+
arg0.onmessage = arg1;
|
|
1798
|
+
},
|
|
1799
|
+
__wbg_set_onopen_c914147e8a2db4b0: function(arg0, arg1) {
|
|
1800
|
+
arg0.onopen = arg1;
|
|
1801
|
+
},
|
|
1802
|
+
__wbg_sqlitetransaction_new: function(arg0) {
|
|
1803
|
+
const ret = SqliteTransaction.__wrap(arg0);
|
|
1804
|
+
return ret;
|
|
1805
|
+
},
|
|
1806
|
+
__wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
|
|
1807
|
+
const ret = arg1.stack;
|
|
1808
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1809
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1810
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1811
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1812
|
+
},
|
|
1813
|
+
__wbg_static_accessor_GLOBAL_266715b9d96ba635: function() {
|
|
1814
|
+
const ret = typeof global === 'undefined' ? null : global;
|
|
1815
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1816
|
+
},
|
|
1817
|
+
__wbg_static_accessor_GLOBAL_THIS_10fb7dc1ae063179: function() {
|
|
1818
|
+
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1819
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1820
|
+
},
|
|
1821
|
+
__wbg_static_accessor_SELF_0b583911f537483a: function() {
|
|
1822
|
+
const ret = typeof self === 'undefined' ? null : self;
|
|
1823
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1824
|
+
},
|
|
1825
|
+
__wbg_static_accessor_WINDOW_d7f903d1508cbdc4: function() {
|
|
1826
|
+
const ret = typeof window === 'undefined' ? null : window;
|
|
1827
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1828
|
+
},
|
|
1829
|
+
__wbg_stringify_52ff602c1cc4fbb6: function() { return handleError(function (arg0) {
|
|
1830
|
+
const ret = JSON.stringify(arg0);
|
|
1831
|
+
return ret;
|
|
1832
|
+
}, arguments); },
|
|
1833
|
+
__wbg_subarray_002b94d5e13d1411: function(arg0, arg1, arg2) {
|
|
1834
|
+
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1835
|
+
return ret;
|
|
1836
|
+
},
|
|
1837
|
+
__wbg_then_c949d5a25a4e78f8: function(arg0, arg1, arg2) {
|
|
1838
|
+
const ret = arg0.then(arg1, arg2);
|
|
1839
|
+
return ret;
|
|
1840
|
+
},
|
|
1841
|
+
__wbg_then_e71170d78fcf8954: function(arg0, arg1) {
|
|
1842
|
+
const ret = arg0.then(arg1);
|
|
1843
|
+
return ret;
|
|
1844
|
+
},
|
|
1845
|
+
__wbg_value_f3c585ee8f5ba40c: function(arg0) {
|
|
1846
|
+
const ret = arg0.value;
|
|
1847
|
+
return ret;
|
|
1848
|
+
},
|
|
1849
|
+
__wbg_versions_276b2795b1c6a219: function(arg0) {
|
|
1850
|
+
const ret = arg0.versions;
|
|
1851
|
+
return ret;
|
|
1852
|
+
},
|
|
1853
|
+
__wbg_websockethandle_new: function(arg0) {
|
|
1854
|
+
const ret = WebSocketHandle.__wrap(arg0);
|
|
1855
|
+
return ret;
|
|
1856
|
+
},
|
|
1857
|
+
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
1858
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 2665, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
|
|
1859
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___wasm_bindgen_13e07d6143bb6034___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_13e07d6143bb6034___JsError___true_);
|
|
1860
|
+
return ret;
|
|
1861
|
+
},
|
|
1862
|
+
__wbindgen_generic_0000000000000002: function(arg0, arg1) {
|
|
1863
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("CloseEvent")], shim_idx: 2079, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1864
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true_);
|
|
1865
|
+
return ret;
|
|
1866
|
+
},
|
|
1867
|
+
__wbindgen_generic_0000000000000003: function(arg0, arg1) {
|
|
1868
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("ErrorEvent")], shim_idx: 2079, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1869
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__119);
|
|
1870
|
+
return ret;
|
|
1871
|
+
},
|
|
1872
|
+
__wbindgen_generic_0000000000000004: function(arg0, arg1) {
|
|
1873
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("Event")], shim_idx: 2079, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1874
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__120);
|
|
1875
|
+
return ret;
|
|
1876
|
+
},
|
|
1877
|
+
__wbindgen_generic_0000000000000005: function(arg0, arg1) {
|
|
1878
|
+
// Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [NamedExternref("MessageEvent")], shim_idx: 2079, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
1879
|
+
const ret = makeMutClosure(arg0, arg1, wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__121);
|
|
1880
|
+
return ret;
|
|
1881
|
+
},
|
|
1882
|
+
__wbindgen_generic_0000000000000006: function(arg0) {
|
|
1883
|
+
// Cast intrinsic for `F64 -> Externref`.
|
|
1884
|
+
const ret = arg0;
|
|
1885
|
+
return ret;
|
|
1886
|
+
},
|
|
1887
|
+
__wbindgen_generic_0000000000000007: function(arg0) {
|
|
1888
|
+
// Cast intrinsic for `I64 -> Externref`.
|
|
1889
|
+
const ret = arg0;
|
|
1890
|
+
return ret;
|
|
1891
|
+
},
|
|
1892
|
+
__wbindgen_generic_0000000000000008: function(arg0, arg1) {
|
|
1893
|
+
// Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
|
|
1894
|
+
const ret = getArrayU8FromWasm0(arg0, arg1);
|
|
1895
|
+
return ret;
|
|
1896
|
+
},
|
|
1897
|
+
__wbindgen_generic_0000000000000009: function(arg0, arg1) {
|
|
1898
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1899
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1900
|
+
return ret;
|
|
1901
|
+
},
|
|
1902
|
+
__wbindgen_generic_000000000000000a: function(arg0) {
|
|
1903
|
+
// Cast intrinsic for `U64 -> Externref`.
|
|
1904
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1905
|
+
return ret;
|
|
1906
|
+
},
|
|
1907
|
+
__wbindgen_generic_000000000000000b: function(arg0, arg1) {
|
|
1908
|
+
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
1909
|
+
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
1910
|
+
// Cast intrinsic for `Vector(U8) -> Externref`.
|
|
1911
|
+
const ret = v0;
|
|
1912
|
+
return ret;
|
|
1913
|
+
},
|
|
1914
|
+
__wbindgen_init_externref_table: function() {
|
|
1915
|
+
const table = wasm.__wbindgen_externrefs;
|
|
1916
|
+
const offset = table.grow(4);
|
|
1917
|
+
table.set(0, undefined);
|
|
1918
|
+
table.set(offset + 0, undefined);
|
|
1919
|
+
table.set(offset + 1, null);
|
|
1920
|
+
table.set(offset + 2, true);
|
|
1921
|
+
table.set(offset + 3, false);
|
|
1922
|
+
},
|
|
1923
|
+
};
|
|
1924
|
+
return {
|
|
1925
|
+
__proto__: null,
|
|
1926
|
+
"./rivetkit_wasm_bg.js": import0,
|
|
1927
|
+
};
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2) {
|
|
1931
|
+
wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true_(arg0, arg1, arg2);
|
|
1932
|
+
}
|
|
968
1933
|
|
|
969
|
-
|
|
1934
|
+
function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__119(arg0, arg1, arg2) {
|
|
1935
|
+
wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__119(arg0, arg1, arg2);
|
|
1936
|
+
}
|
|
970
1937
|
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
obj.__wbg_ptr = ptr;
|
|
975
|
-
QueueFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
976
|
-
return obj;
|
|
977
|
-
}
|
|
1938
|
+
function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__120(arg0, arg1, arg2) {
|
|
1939
|
+
wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__120(arg0, arg1, arg2);
|
|
1940
|
+
}
|
|
978
1941
|
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
QueueFinalization.unregister(this);
|
|
983
|
-
return ptr;
|
|
984
|
-
}
|
|
1942
|
+
function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__121(arg0, arg1, arg2) {
|
|
1943
|
+
wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___web_sys_dc46127b9b0284ed___features__gen_CloseEvent__CloseEvent______true__121(arg0, arg1, arg2);
|
|
1944
|
+
}
|
|
985
1945
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
/**
|
|
991
|
-
* @param {any} options
|
|
992
|
-
* @param {CancellationToken | null} [signal]
|
|
993
|
-
* @returns {Promise<Array<any>>}
|
|
994
|
-
*/
|
|
995
|
-
nextBatch(options, signal) {
|
|
996
|
-
let ptr0 = 0;
|
|
997
|
-
if (!isLikeNone(signal)) {
|
|
998
|
-
_assertClass(signal, CancellationToken);
|
|
999
|
-
ptr0 = signal.__destroy_into_raw();
|
|
1000
|
-
}
|
|
1001
|
-
const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
|
|
1002
|
-
return ret;
|
|
1003
|
-
}
|
|
1004
|
-
/**
|
|
1005
|
-
* @param {any} options
|
|
1006
|
-
* @returns {Array<any>}
|
|
1007
|
-
*/
|
|
1008
|
-
tryNextBatch(options) {
|
|
1009
|
-
const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
|
|
1010
|
-
if (ret[2]) {
|
|
1011
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1012
|
-
}
|
|
1013
|
-
return takeFromExternrefTable0(ret[0]);
|
|
1014
|
-
}
|
|
1015
|
-
/**
|
|
1016
|
-
* @param {any} names
|
|
1017
|
-
* @param {any} options
|
|
1018
|
-
* @param {CancellationToken | null} [signal]
|
|
1019
|
-
* @returns {Promise<QueueMessage>}
|
|
1020
|
-
*/
|
|
1021
|
-
waitForNames(names, options, signal) {
|
|
1022
|
-
let ptr0 = 0;
|
|
1023
|
-
if (!isLikeNone(signal)) {
|
|
1024
|
-
_assertClass(signal, CancellationToken);
|
|
1025
|
-
ptr0 = signal.__destroy_into_raw();
|
|
1026
|
-
}
|
|
1027
|
-
const ret = wasm.queue_waitForNames(this.__wbg_ptr, names, options, ptr0);
|
|
1028
|
-
return ret;
|
|
1029
|
-
}
|
|
1030
|
-
/**
|
|
1031
|
-
* @param {string} name
|
|
1032
|
-
* @param {Uint8Array} body
|
|
1033
|
-
* @param {any} options
|
|
1034
|
-
* @param {CancellationToken | null} [signal]
|
|
1035
|
-
* @returns {Promise<Uint8Array | undefined>}
|
|
1036
|
-
*/
|
|
1037
|
-
enqueueAndWait(name, body, options, signal) {
|
|
1038
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1039
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1040
|
-
const ptr1 = passArray8ToWasm0(body, wasm.__wbindgen_malloc);
|
|
1041
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1042
|
-
let ptr2 = 0;
|
|
1043
|
-
if (!isLikeNone(signal)) {
|
|
1044
|
-
_assertClass(signal, CancellationToken);
|
|
1045
|
-
ptr2 = signal.__destroy_into_raw();
|
|
1046
|
-
}
|
|
1047
|
-
const ret = wasm.queue_enqueueAndWait(this.__wbg_ptr, ptr0, len0, ptr1, len1, options, ptr2);
|
|
1048
|
-
return ret;
|
|
1049
|
-
}
|
|
1050
|
-
/**
|
|
1051
|
-
* @returns {Promise<Array<any>>}
|
|
1052
|
-
*/
|
|
1053
|
-
inspectMessages() {
|
|
1054
|
-
const ret = wasm.queue_inspectMessages(this.__wbg_ptr);
|
|
1055
|
-
return ret;
|
|
1056
|
-
}
|
|
1057
|
-
/**
|
|
1058
|
-
* @param {any} names
|
|
1059
|
-
* @param {any} options
|
|
1060
|
-
* @returns {Promise<void>}
|
|
1061
|
-
*/
|
|
1062
|
-
waitForNamesAvailable(names, options) {
|
|
1063
|
-
const ret = wasm.queue_waitForNamesAvailable(this.__wbg_ptr, names, options);
|
|
1064
|
-
return ret;
|
|
1065
|
-
}
|
|
1066
|
-
/**
|
|
1067
|
-
* @param {string} name
|
|
1068
|
-
* @param {Uint8Array} body
|
|
1069
|
-
* @returns {Promise<QueueMessage>}
|
|
1070
|
-
*/
|
|
1071
|
-
send(name, body) {
|
|
1072
|
-
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1073
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1074
|
-
const ptr1 = passArray8ToWasm0(body, wasm.__wbindgen_malloc);
|
|
1075
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1076
|
-
const ret = wasm.queue_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
1077
|
-
return ret;
|
|
1078
|
-
}
|
|
1079
|
-
/**
|
|
1080
|
-
* @returns {Promise<void>}
|
|
1081
|
-
*/
|
|
1082
|
-
reset() {
|
|
1083
|
-
const ret = wasm.queue_reset(this.__wbg_ptr);
|
|
1084
|
-
return ret;
|
|
1085
|
-
}
|
|
1086
|
-
/**
|
|
1087
|
-
* @returns {number}
|
|
1088
|
-
*/
|
|
1089
|
-
maxSize() {
|
|
1090
|
-
const ret = wasm.queue_maxSize(this.__wbg_ptr);
|
|
1091
|
-
return ret >>> 0;
|
|
1946
|
+
function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___wasm_bindgen_13e07d6143bb6034___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_13e07d6143bb6034___JsError___true_(arg0, arg1, arg2) {
|
|
1947
|
+
const ret = wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___wasm_bindgen_13e07d6143bb6034___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_13e07d6143bb6034___JsError___true_(arg0, arg1, arg2);
|
|
1948
|
+
if (ret[1]) {
|
|
1949
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
1092
1950
|
}
|
|
1093
1951
|
}
|
|
1094
1952
|
|
|
1953
|
+
function wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined_______true_(arg0, arg1, arg2, arg3) {
|
|
1954
|
+
wasm.wasm_bindgen_13e07d6143bb6034___convert__closures_____invoke___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined___js_sys_5398293dff02b043___Function_fn_wasm_bindgen_13e07d6143bb6034___JsValue_____wasm_bindgen_13e07d6143bb6034___sys__Undefined_______true_(arg0, arg1, arg2, arg3);
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
|
|
1958
|
+
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
1959
|
+
const ActorContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1960
|
+
? { register: () => {}, unregister: () => {} }
|
|
1961
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_actorcontext_free(ptr, 1));
|
|
1962
|
+
const ActorFactoryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1963
|
+
? { register: () => {}, unregister: () => {} }
|
|
1964
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_actorfactory_free(ptr, 1));
|
|
1965
|
+
const ActorStateTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1966
|
+
? { register: () => {}, unregister: () => {} }
|
|
1967
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_actorstatetransaction_free(ptr, 1));
|
|
1968
|
+
const CancellationListenerFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1969
|
+
? { register: () => {}, unregister: () => {} }
|
|
1970
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cancellationlistener_free(ptr, 1));
|
|
1971
|
+
const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1972
|
+
? { register: () => {}, unregister: () => {} }
|
|
1973
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_cancellationtoken_free(ptr, 1));
|
|
1974
|
+
const ConnHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1975
|
+
? { register: () => {}, unregister: () => {} }
|
|
1976
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_connhandle_free(ptr, 1));
|
|
1977
|
+
const CoreRegistryFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1978
|
+
? { register: () => {}, unregister: () => {} }
|
|
1979
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_coreregistry_free(ptr, 1));
|
|
1980
|
+
const KvFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1981
|
+
? { register: () => {}, unregister: () => {} }
|
|
1982
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_kv_free(ptr, 1));
|
|
1983
|
+
const QueueFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1984
|
+
? { register: () => {}, unregister: () => {} }
|
|
1985
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_queue_free(ptr, 1));
|
|
1095
1986
|
const QueueMessageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1096
1987
|
? { register: () => {}, unregister: () => {} }
|
|
1097
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_queuemessage_free(ptr
|
|
1988
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_queuemessage_free(ptr, 1));
|
|
1989
|
+
const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1990
|
+
? { register: () => {}, unregister: () => {} }
|
|
1991
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_schedule_free(ptr, 1));
|
|
1992
|
+
const SqliteDbFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1993
|
+
? { register: () => {}, unregister: () => {} }
|
|
1994
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sqlitedb_free(ptr, 1));
|
|
1995
|
+
const SqliteTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1996
|
+
? { register: () => {}, unregister: () => {} }
|
|
1997
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sqlitetransaction_free(ptr, 1));
|
|
1998
|
+
const WebSocketHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1999
|
+
? { register: () => {}, unregister: () => {} }
|
|
2000
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_websockethandle_free(ptr, 1));
|
|
1098
2001
|
|
|
1099
|
-
|
|
2002
|
+
function addToExternrefTable0(obj) {
|
|
2003
|
+
const idx = wasm.__externref_table_alloc();
|
|
2004
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
2005
|
+
return idx;
|
|
2006
|
+
}
|
|
1100
2007
|
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
obj.__wbg_ptr = ptr;
|
|
1105
|
-
QueueMessageFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1106
|
-
return obj;
|
|
2008
|
+
function _assertClass(instance, klass) {
|
|
2009
|
+
if (!(instance instanceof klass)) {
|
|
2010
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
1107
2011
|
}
|
|
2012
|
+
}
|
|
1108
2013
|
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
QueueMessageFinalization.unregister(this);
|
|
1113
|
-
return ptr;
|
|
1114
|
-
}
|
|
2014
|
+
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
|
|
2015
|
+
? { register: () => {}, unregister: () => {} }
|
|
2016
|
+
: new FinalizationRegistry(state => wasm.__wbindgen_destroy_closure(state.a, state.b));
|
|
1115
2017
|
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
2018
|
+
function debugString(val) {
|
|
2019
|
+
// primitive types
|
|
2020
|
+
const type = typeof val;
|
|
2021
|
+
if (type == 'number' || type == 'boolean' || val == null) {
|
|
2022
|
+
return `${val}`;
|
|
1119
2023
|
}
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
*/
|
|
1123
|
-
createdAt() {
|
|
1124
|
-
const ret = wasm.queuemessage_createdAt(this.__wbg_ptr);
|
|
1125
|
-
return ret;
|
|
2024
|
+
if (type == 'string') {
|
|
2025
|
+
return `"${val}"`;
|
|
1126
2026
|
}
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
2027
|
+
if (type == 'symbol') {
|
|
2028
|
+
const description = val.description;
|
|
2029
|
+
if (description == null) {
|
|
2030
|
+
return 'Symbol';
|
|
2031
|
+
} else {
|
|
2032
|
+
return `Symbol(${description})`;
|
|
2033
|
+
}
|
|
1133
2034
|
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
2035
|
+
if (type == 'function') {
|
|
2036
|
+
const name = val.name;
|
|
2037
|
+
if (typeof name == 'string' && name.length > 0) {
|
|
2038
|
+
return `Function(${name})`;
|
|
2039
|
+
} else {
|
|
2040
|
+
return 'Function';
|
|
2041
|
+
}
|
|
1140
2042
|
}
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
2043
|
+
// objects
|
|
2044
|
+
if (Array.isArray(val)) {
|
|
2045
|
+
const length = val.length;
|
|
2046
|
+
let debug = '[';
|
|
2047
|
+
if (length > 0) {
|
|
2048
|
+
debug += debugString(val[0]);
|
|
2049
|
+
}
|
|
2050
|
+
for(let i = 1; i < length; i++) {
|
|
2051
|
+
debug += ', ' + debugString(val[i]);
|
|
2052
|
+
}
|
|
2053
|
+
debug += ']';
|
|
2054
|
+
return debug;
|
|
1149
2055
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
2056
|
+
// Test for built-in
|
|
2057
|
+
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
|
|
2058
|
+
let className;
|
|
2059
|
+
if (builtInMatches && builtInMatches.length > 1) {
|
|
2060
|
+
className = builtInMatches[1];
|
|
2061
|
+
} else {
|
|
2062
|
+
// Failed to match the standard '[object ClassName]'
|
|
2063
|
+
return toString.call(val);
|
|
2064
|
+
}
|
|
2065
|
+
if (className == 'Object') {
|
|
2066
|
+
// we're a user defined class or Object
|
|
2067
|
+
// JSON.stringify avoids problems with cycles, and is generally much
|
|
2068
|
+
// easier than looping through ownProperties of `val`.
|
|
1156
2069
|
try {
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
1161
|
-
} finally {
|
|
1162
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
2070
|
+
return 'Object(' + JSON.stringify(val) + ')';
|
|
2071
|
+
} catch (_) {
|
|
2072
|
+
return 'Object';
|
|
1163
2073
|
}
|
|
1164
2074
|
}
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
*/
|
|
1169
|
-
complete(response) {
|
|
1170
|
-
const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
|
|
1171
|
-
return ret;
|
|
2075
|
+
// errors
|
|
2076
|
+
if (val instanceof Error) {
|
|
2077
|
+
return `${val.name}: ${val.message}\n${val.stack}`;
|
|
1172
2078
|
}
|
|
2079
|
+
// TODO we could test for more things here, like `Set`s and `Map`s.
|
|
2080
|
+
return className;
|
|
1173
2081
|
}
|
|
1174
2082
|
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
export class Schedule {
|
|
1180
|
-
|
|
1181
|
-
static __wrap(ptr) {
|
|
1182
|
-
ptr = ptr >>> 0;
|
|
1183
|
-
const obj = Object.create(Schedule.prototype);
|
|
1184
|
-
obj.__wbg_ptr = ptr;
|
|
1185
|
-
ScheduleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1186
|
-
return obj;
|
|
1187
|
-
}
|
|
1188
|
-
|
|
1189
|
-
__destroy_into_raw() {
|
|
1190
|
-
const ptr = this.__wbg_ptr;
|
|
1191
|
-
this.__wbg_ptr = 0;
|
|
1192
|
-
ScheduleFinalization.unregister(this);
|
|
1193
|
-
return ptr;
|
|
1194
|
-
}
|
|
2083
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
2084
|
+
ptr = ptr >>> 0;
|
|
2085
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
2086
|
+
}
|
|
1195
2087
|
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
/**
|
|
1201
|
-
* @param {number} timestamp_ms
|
|
1202
|
-
* @param {string} action_name
|
|
1203
|
-
* @param {Uint8Array} args
|
|
1204
|
-
*/
|
|
1205
|
-
at(timestamp_ms, action_name, args) {
|
|
1206
|
-
const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1207
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1208
|
-
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1209
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1210
|
-
wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
|
|
1211
|
-
}
|
|
1212
|
-
/**
|
|
1213
|
-
* @param {number} duration_ms
|
|
1214
|
-
* @param {string} action_name
|
|
1215
|
-
* @param {Uint8Array} args
|
|
1216
|
-
*/
|
|
1217
|
-
after(duration_ms, action_name, args) {
|
|
1218
|
-
const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1219
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1220
|
-
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1221
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1222
|
-
wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
|
|
2088
|
+
let cachedDataViewMemory0 = null;
|
|
2089
|
+
function getDataViewMemory0() {
|
|
2090
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
2091
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
1223
2092
|
}
|
|
2093
|
+
return cachedDataViewMemory0;
|
|
1224
2094
|
}
|
|
1225
2095
|
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
export class SqliteDb {
|
|
2096
|
+
function getStringFromWasm0(ptr, len) {
|
|
2097
|
+
return decodeText(ptr >>> 0, len);
|
|
2098
|
+
}
|
|
1231
2099
|
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
SqliteDbFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1237
|
-
return obj;
|
|
2100
|
+
let cachedUint8ArrayMemory0 = null;
|
|
2101
|
+
function getUint8ArrayMemory0() {
|
|
2102
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
2103
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
1238
2104
|
}
|
|
2105
|
+
return cachedUint8ArrayMemory0;
|
|
2106
|
+
}
|
|
1239
2107
|
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
this
|
|
1243
|
-
|
|
1244
|
-
|
|
2108
|
+
function handleError(f, args) {
|
|
2109
|
+
try {
|
|
2110
|
+
return f.apply(this, args);
|
|
2111
|
+
} catch (e) {
|
|
2112
|
+
const idx = addToExternrefTable0(e);
|
|
2113
|
+
wasm.__wbindgen_exn_store(idx);
|
|
1245
2114
|
}
|
|
2115
|
+
}
|
|
1246
2116
|
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
wasm.__wbg_sqlitedb_free(ptr, 0);
|
|
1250
|
-
}
|
|
1251
|
-
/**
|
|
1252
|
-
* @param {string} sql
|
|
1253
|
-
* @param {any} params
|
|
1254
|
-
* @returns {Promise<any>}
|
|
1255
|
-
*/
|
|
1256
|
-
run(sql, params) {
|
|
1257
|
-
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1258
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1259
|
-
const ret = wasm.sqlitedb_run(this.__wbg_ptr, ptr0, len0, params);
|
|
1260
|
-
return ret;
|
|
1261
|
-
}
|
|
1262
|
-
/**
|
|
1263
|
-
* @param {string} sql
|
|
1264
|
-
* @returns {Promise<any>}
|
|
1265
|
-
*/
|
|
1266
|
-
exec(sql) {
|
|
1267
|
-
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1268
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1269
|
-
const ret = wasm.sqlitedb_exec(this.__wbg_ptr, ptr0, len0);
|
|
1270
|
-
return ret;
|
|
1271
|
-
}
|
|
1272
|
-
/**
|
|
1273
|
-
* @returns {Promise<void>}
|
|
1274
|
-
*/
|
|
1275
|
-
close() {
|
|
1276
|
-
const ret = wasm.sqlitedb_close(this.__wbg_ptr);
|
|
1277
|
-
return ret;
|
|
1278
|
-
}
|
|
1279
|
-
/**
|
|
1280
|
-
* @param {string} sql
|
|
1281
|
-
* @param {any} params
|
|
1282
|
-
* @returns {Promise<any>}
|
|
1283
|
-
*/
|
|
1284
|
-
query(sql, params) {
|
|
1285
|
-
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1286
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1287
|
-
const ret = wasm.sqlitedb_query(this.__wbg_ptr, ptr0, len0, params);
|
|
1288
|
-
return ret;
|
|
1289
|
-
}
|
|
1290
|
-
/**
|
|
1291
|
-
* @param {string} sql
|
|
1292
|
-
* @param {any} params
|
|
1293
|
-
* @returns {Promise<any>}
|
|
1294
|
-
*/
|
|
1295
|
-
execute(sql, params) {
|
|
1296
|
-
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1297
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1298
|
-
const ret = wasm.sqlitedb_execute(this.__wbg_ptr, ptr0, len0, params);
|
|
1299
|
-
return ret;
|
|
1300
|
-
}
|
|
2117
|
+
function isLikeNone(x) {
|
|
2118
|
+
return x === undefined || x === null;
|
|
1301
2119
|
}
|
|
1302
2120
|
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
2121
|
+
function makeMutClosure(arg0, arg1, f) {
|
|
2122
|
+
const state = { a: arg0, b: arg1, cnt: 1 };
|
|
2123
|
+
const real = (...args) => {
|
|
1306
2124
|
|
|
1307
|
-
|
|
2125
|
+
// First up with a closure we increment the internal reference
|
|
2126
|
+
// count. This ensures that the Rust closure environment won't
|
|
2127
|
+
// be deallocated while we're invoking it.
|
|
2128
|
+
state.cnt++;
|
|
2129
|
+
const a = state.a;
|
|
2130
|
+
state.a = 0;
|
|
2131
|
+
try {
|
|
2132
|
+
return f(a, state.b, ...args);
|
|
2133
|
+
} finally {
|
|
2134
|
+
state.a = a;
|
|
2135
|
+
real._wbg_cb_unref();
|
|
2136
|
+
}
|
|
2137
|
+
};
|
|
2138
|
+
real._wbg_cb_unref = () => {
|
|
2139
|
+
if (--state.cnt === 0) {
|
|
2140
|
+
wasm.__wbindgen_destroy_closure(state.a, state.b);
|
|
2141
|
+
state.a = 0;
|
|
2142
|
+
CLOSURE_DTORS.unregister(state);
|
|
2143
|
+
}
|
|
2144
|
+
};
|
|
2145
|
+
CLOSURE_DTORS.register(real, state, state);
|
|
2146
|
+
return real;
|
|
2147
|
+
}
|
|
1308
2148
|
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
}
|
|
2149
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
2150
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
2151
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
2152
|
+
WASM_VECTOR_LEN = arg.length;
|
|
2153
|
+
return ptr;
|
|
2154
|
+
}
|
|
1316
2155
|
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
2156
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
2157
|
+
if (realloc === undefined) {
|
|
2158
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2159
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
2160
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
2161
|
+
WASM_VECTOR_LEN = buf.length;
|
|
1321
2162
|
return ptr;
|
|
1322
2163
|
}
|
|
1323
2164
|
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
2165
|
+
let len = arg.length;
|
|
2166
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
2167
|
+
|
|
2168
|
+
const mem = getUint8ArrayMemory0();
|
|
2169
|
+
|
|
2170
|
+
let offset = 0;
|
|
2171
|
+
|
|
2172
|
+
for (; offset < len; offset++) {
|
|
2173
|
+
const code = arg.charCodeAt(offset);
|
|
2174
|
+
if (code > 0x7F) break;
|
|
2175
|
+
mem[ptr + offset] = code;
|
|
1333
2176
|
}
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
*/
|
|
1338
|
-
send(data, binary) {
|
|
1339
|
-
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
|
|
1340
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1341
|
-
const ret = wasm.websockethandle_send(this.__wbg_ptr, ptr0, len0, binary);
|
|
1342
|
-
if (ret[1]) {
|
|
1343
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
2177
|
+
if (offset !== len) {
|
|
2178
|
+
if (offset !== 0) {
|
|
2179
|
+
arg = arg.slice(offset);
|
|
1344
2180
|
}
|
|
2181
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
2182
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
2183
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
2184
|
+
|
|
2185
|
+
offset += ret.written;
|
|
2186
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
WASM_VECTOR_LEN = offset;
|
|
2190
|
+
return ptr;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
function takeFromExternrefTable0(idx) {
|
|
2194
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
2195
|
+
wasm.__externref_table_dealloc(idx);
|
|
2196
|
+
return value;
|
|
2197
|
+
}
|
|
2198
|
+
|
|
2199
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2200
|
+
cachedTextDecoder.decode();
|
|
2201
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
2202
|
+
let numBytesDecoded = 0;
|
|
2203
|
+
function decodeText(ptr, len) {
|
|
2204
|
+
numBytesDecoded += len;
|
|
2205
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
2206
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
2207
|
+
cachedTextDecoder.decode();
|
|
2208
|
+
numBytesDecoded = len;
|
|
1345
2209
|
}
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
return
|
|
1356
|
-
|
|
2210
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
2211
|
+
}
|
|
2212
|
+
|
|
2213
|
+
const cachedTextEncoder = new TextEncoder();
|
|
2214
|
+
|
|
2215
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
2216
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
2217
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
2218
|
+
view.set(buf);
|
|
2219
|
+
return {
|
|
2220
|
+
read: arg.length,
|
|
2221
|
+
written: buf.length
|
|
2222
|
+
};
|
|
2223
|
+
};
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
let WASM_VECTOR_LEN = 0;
|
|
2227
|
+
|
|
2228
|
+
let wasmModule, wasmInstance, wasm;
|
|
2229
|
+
function __wbg_finalize_init(instance, module) {
|
|
2230
|
+
wasmInstance = instance;
|
|
2231
|
+
wasm = instance.exports;
|
|
2232
|
+
wasmModule = module;
|
|
2233
|
+
cachedDataViewMemory0 = null;
|
|
2234
|
+
cachedUint8ArrayMemory0 = null;
|
|
2235
|
+
wasm.__wbindgen_start();
|
|
2236
|
+
return wasm;
|
|
1357
2237
|
}
|
|
1358
2238
|
|
|
1359
2239
|
async function __wbg_load(module, imports) {
|
|
1360
2240
|
if (typeof Response === 'function' && module instanceof Response) {
|
|
2241
|
+
if (!module.ok) {
|
|
2242
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
2243
|
+
}
|
|
2244
|
+
|
|
1361
2245
|
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
1362
2246
|
try {
|
|
1363
2247
|
return await WebAssembly.instantiateStreaming(module, imports);
|
|
1364
|
-
|
|
1365
2248
|
} catch (e) {
|
|
1366
|
-
|
|
2249
|
+
const validResponse = expectedResponseType(module.type);
|
|
2250
|
+
|
|
2251
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
1367
2252
|
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
1368
2253
|
|
|
1369
|
-
} else {
|
|
1370
|
-
throw e;
|
|
1371
|
-
}
|
|
2254
|
+
} else { throw e; }
|
|
1372
2255
|
}
|
|
1373
2256
|
}
|
|
1374
2257
|
|
|
1375
2258
|
const bytes = await module.arrayBuffer();
|
|
1376
2259
|
return await WebAssembly.instantiate(bytes, imports);
|
|
1377
|
-
|
|
1378
2260
|
} else {
|
|
1379
2261
|
const instance = await WebAssembly.instantiate(module, imports);
|
|
1380
2262
|
|
|
1381
2263
|
if (instance instanceof WebAssembly.Instance) {
|
|
1382
2264
|
return { instance, module };
|
|
1383
|
-
|
|
1384
2265
|
} else {
|
|
1385
2266
|
return instance;
|
|
1386
2267
|
}
|
|
1387
2268
|
}
|
|
1388
|
-
}
|
|
1389
2269
|
|
|
1390
|
-
function
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
1394
|
-
const ret = String(arg1);
|
|
1395
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1396
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1397
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1398
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1399
|
-
};
|
|
1400
|
-
imports.wbg.__wbg_actorcontext_new = function(arg0) {
|
|
1401
|
-
const ret = ActorContext.__wrap(arg0);
|
|
1402
|
-
return ret;
|
|
1403
|
-
};
|
|
1404
|
-
imports.wbg.__wbg_buffer_09165b52af8c5237 = function(arg0) {
|
|
1405
|
-
const ret = arg0.buffer;
|
|
1406
|
-
return ret;
|
|
1407
|
-
};
|
|
1408
|
-
imports.wbg.__wbg_buffer_609cc3eee51ed158 = function(arg0) {
|
|
1409
|
-
const ret = arg0.buffer;
|
|
1410
|
-
return ret;
|
|
1411
|
-
};
|
|
1412
|
-
imports.wbg.__wbg_call_672a4d21634d4a24 = function() { return handleError(function (arg0, arg1) {
|
|
1413
|
-
const ret = arg0.call(arg1);
|
|
1414
|
-
return ret;
|
|
1415
|
-
}, arguments) };
|
|
1416
|
-
imports.wbg.__wbg_call_7cccdd69e0791ae2 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1417
|
-
const ret = arg0.call(arg1, arg2);
|
|
1418
|
-
return ret;
|
|
1419
|
-
}, arguments) };
|
|
1420
|
-
imports.wbg.__wbg_call_833bed5770ea2041 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1421
|
-
const ret = arg0.call(arg1, arg2, arg3);
|
|
1422
|
-
return ret;
|
|
1423
|
-
}, arguments) };
|
|
1424
|
-
imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
|
|
1425
|
-
arg0.close();
|
|
1426
|
-
}, arguments) };
|
|
1427
|
-
imports.wbg.__wbg_close_e1253d480ed93ce3 = function() { return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1428
|
-
arg0.close(arg1, getStringFromWasm0(arg2, arg3));
|
|
1429
|
-
}, arguments) };
|
|
1430
|
-
imports.wbg.__wbg_code_f4ec1e6e2e1b0417 = function(arg0) {
|
|
1431
|
-
const ret = arg0.code;
|
|
1432
|
-
return ret;
|
|
1433
|
-
};
|
|
1434
|
-
imports.wbg.__wbg_connhandle_new = function(arg0) {
|
|
1435
|
-
const ret = ConnHandle.__wrap(arg0);
|
|
1436
|
-
return ret;
|
|
1437
|
-
};
|
|
1438
|
-
imports.wbg.__wbg_construct_b91ff0e53b60c0c3 = function() { return handleError(function (arg0, arg1) {
|
|
1439
|
-
const ret = Reflect.construct(arg0, arg1);
|
|
1440
|
-
return ret;
|
|
1441
|
-
}, arguments) };
|
|
1442
|
-
imports.wbg.__wbg_crypto_574e78ad8b13b65f = function(arg0) {
|
|
1443
|
-
const ret = arg0.crypto;
|
|
1444
|
-
return ret;
|
|
1445
|
-
};
|
|
1446
|
-
imports.wbg.__wbg_data_432d9c3df2630942 = function(arg0) {
|
|
1447
|
-
const ret = arg0.data;
|
|
1448
|
-
return ret;
|
|
1449
|
-
};
|
|
1450
|
-
imports.wbg.__wbg_done_769e5ede4b31c67b = function(arg0) {
|
|
1451
|
-
const ret = arg0.done;
|
|
1452
|
-
return ret;
|
|
1453
|
-
};
|
|
1454
|
-
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
1455
|
-
let deferred0_0;
|
|
1456
|
-
let deferred0_1;
|
|
1457
|
-
try {
|
|
1458
|
-
deferred0_0 = arg0;
|
|
1459
|
-
deferred0_1 = arg1;
|
|
1460
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
1461
|
-
} finally {
|
|
1462
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1463
|
-
}
|
|
1464
|
-
};
|
|
1465
|
-
imports.wbg.__wbg_getRandomValues_6c498bf966d88108 = function() { return handleError(function (arg0, arg1) {
|
|
1466
|
-
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
1467
|
-
}, arguments) };
|
|
1468
|
-
imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
1469
|
-
arg0.getRandomValues(arg1);
|
|
1470
|
-
}, arguments) };
|
|
1471
|
-
imports.wbg.__wbg_get_67b2ba62fc30de12 = function() { return handleError(function (arg0, arg1) {
|
|
1472
|
-
const ret = Reflect.get(arg0, arg1);
|
|
1473
|
-
return ret;
|
|
1474
|
-
}, arguments) };
|
|
1475
|
-
imports.wbg.__wbg_get_b9b93047fe3cf45b = function(arg0, arg1) {
|
|
1476
|
-
const ret = arg0[arg1 >>> 0];
|
|
1477
|
-
return ret;
|
|
1478
|
-
};
|
|
1479
|
-
imports.wbg.__wbg_getwithrefkey_1dc361bd10053bfe = function(arg0, arg1) {
|
|
1480
|
-
const ret = arg0[arg1];
|
|
1481
|
-
return ret;
|
|
1482
|
-
};
|
|
1483
|
-
imports.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc = function(arg0) {
|
|
1484
|
-
let result;
|
|
1485
|
-
try {
|
|
1486
|
-
result = arg0 instanceof ArrayBuffer;
|
|
1487
|
-
} catch (_) {
|
|
1488
|
-
result = false;
|
|
1489
|
-
}
|
|
1490
|
-
const ret = result;
|
|
1491
|
-
return ret;
|
|
1492
|
-
};
|
|
1493
|
-
imports.wbg.__wbg_instanceof_Error_4d54113b22d20306 = function(arg0) {
|
|
1494
|
-
let result;
|
|
1495
|
-
try {
|
|
1496
|
-
result = arg0 instanceof Error;
|
|
1497
|
-
} catch (_) {
|
|
1498
|
-
result = false;
|
|
1499
|
-
}
|
|
1500
|
-
const ret = result;
|
|
1501
|
-
return ret;
|
|
1502
|
-
};
|
|
1503
|
-
imports.wbg.__wbg_instanceof_Object_7f2dcef8f78644a4 = function(arg0) {
|
|
1504
|
-
let result;
|
|
1505
|
-
try {
|
|
1506
|
-
result = arg0 instanceof Object;
|
|
1507
|
-
} catch (_) {
|
|
1508
|
-
result = false;
|
|
1509
|
-
}
|
|
1510
|
-
const ret = result;
|
|
1511
|
-
return ret;
|
|
1512
|
-
};
|
|
1513
|
-
imports.wbg.__wbg_instanceof_Promise_935168b8f4b49db3 = function(arg0) {
|
|
1514
|
-
let result;
|
|
1515
|
-
try {
|
|
1516
|
-
result = arg0 instanceof Promise;
|
|
1517
|
-
} catch (_) {
|
|
1518
|
-
result = false;
|
|
1519
|
-
}
|
|
1520
|
-
const ret = result;
|
|
1521
|
-
return ret;
|
|
1522
|
-
};
|
|
1523
|
-
imports.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9 = function(arg0) {
|
|
1524
|
-
let result;
|
|
1525
|
-
try {
|
|
1526
|
-
result = arg0 instanceof Uint8Array;
|
|
1527
|
-
} catch (_) {
|
|
1528
|
-
result = false;
|
|
1529
|
-
}
|
|
1530
|
-
const ret = result;
|
|
1531
|
-
return ret;
|
|
1532
|
-
};
|
|
1533
|
-
imports.wbg.__wbg_isArray_a1eab7e0d067391b = function(arg0) {
|
|
1534
|
-
const ret = Array.isArray(arg0);
|
|
1535
|
-
return ret;
|
|
1536
|
-
};
|
|
1537
|
-
imports.wbg.__wbg_isSafeInteger_343e2beeeece1bb0 = function(arg0) {
|
|
1538
|
-
const ret = Number.isSafeInteger(arg0);
|
|
1539
|
-
return ret;
|
|
1540
|
-
};
|
|
1541
|
-
imports.wbg.__wbg_iterator_9a24c88df860dc65 = function() {
|
|
1542
|
-
const ret = Symbol.iterator;
|
|
1543
|
-
return ret;
|
|
1544
|
-
};
|
|
1545
|
-
imports.wbg.__wbg_keys_5c77a08ddc2fb8a6 = function(arg0) {
|
|
1546
|
-
const ret = Object.keys(arg0);
|
|
1547
|
-
return ret;
|
|
1548
|
-
};
|
|
1549
|
-
imports.wbg.__wbg_length_a446193dc22c12f8 = function(arg0) {
|
|
1550
|
-
const ret = arg0.length;
|
|
1551
|
-
return ret;
|
|
1552
|
-
};
|
|
1553
|
-
imports.wbg.__wbg_length_e2d2a49132c1b256 = function(arg0) {
|
|
1554
|
-
const ret = arg0.length;
|
|
1555
|
-
return ret;
|
|
1556
|
-
};
|
|
1557
|
-
imports.wbg.__wbg_message_97a2af9b89d693a3 = function(arg0) {
|
|
1558
|
-
const ret = arg0.message;
|
|
1559
|
-
return ret;
|
|
1560
|
-
};
|
|
1561
|
-
imports.wbg.__wbg_message_d1685a448ba00178 = function(arg0, arg1) {
|
|
1562
|
-
const ret = arg1.message;
|
|
1563
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1564
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1565
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1566
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1567
|
-
};
|
|
1568
|
-
imports.wbg.__wbg_msCrypto_a61aeb35a24c1329 = function(arg0) {
|
|
1569
|
-
const ret = arg0.msCrypto;
|
|
1570
|
-
return ret;
|
|
1571
|
-
};
|
|
1572
|
-
imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
|
|
1573
|
-
try {
|
|
1574
|
-
var state0 = {a: arg0, b: arg1};
|
|
1575
|
-
var cb0 = (arg0, arg1) => {
|
|
1576
|
-
const a = state0.a;
|
|
1577
|
-
state0.a = 0;
|
|
1578
|
-
try {
|
|
1579
|
-
return __wbg_adapter_239(a, state0.b, arg0, arg1);
|
|
1580
|
-
} finally {
|
|
1581
|
-
state0.a = a;
|
|
1582
|
-
}
|
|
1583
|
-
};
|
|
1584
|
-
const ret = new Promise(cb0);
|
|
1585
|
-
return ret;
|
|
1586
|
-
} finally {
|
|
1587
|
-
state0.a = state0.b = 0;
|
|
1588
|
-
}
|
|
1589
|
-
};
|
|
1590
|
-
imports.wbg.__wbg_new_405e22f390576ce2 = function() {
|
|
1591
|
-
const ret = new Object();
|
|
1592
|
-
return ret;
|
|
1593
|
-
};
|
|
1594
|
-
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
1595
|
-
const ret = new Array();
|
|
1596
|
-
return ret;
|
|
1597
|
-
};
|
|
1598
|
-
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
|
|
1599
|
-
const ret = new Error();
|
|
1600
|
-
return ret;
|
|
1601
|
-
};
|
|
1602
|
-
imports.wbg.__wbg_new_a12002a7f91c75be = function(arg0) {
|
|
1603
|
-
const ret = new Uint8Array(arg0);
|
|
1604
|
-
return ret;
|
|
1605
|
-
};
|
|
1606
|
-
imports.wbg.__wbg_new_c68d7209be747379 = function(arg0, arg1) {
|
|
1607
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1608
|
-
return ret;
|
|
1609
|
-
};
|
|
1610
|
-
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
|
|
1611
|
-
const ret = new Function(getStringFromWasm0(arg0, arg1));
|
|
1612
|
-
return ret;
|
|
1613
|
-
};
|
|
1614
|
-
imports.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a = function(arg0, arg1, arg2) {
|
|
1615
|
-
const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
|
|
1616
|
-
return ret;
|
|
1617
|
-
};
|
|
1618
|
-
imports.wbg.__wbg_newwithlength_a381634e90c276d4 = function(arg0) {
|
|
1619
|
-
const ret = new Uint8Array(arg0 >>> 0);
|
|
1620
|
-
return ret;
|
|
1621
|
-
};
|
|
1622
|
-
imports.wbg.__wbg_newwithstrsequence_6e9d6479e1cf978d = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1623
|
-
const ret = new WebSocket(getStringFromWasm0(arg0, arg1), arg2);
|
|
1624
|
-
return ret;
|
|
1625
|
-
}, arguments) };
|
|
1626
|
-
imports.wbg.__wbg_next_25feadfc0913fea9 = function(arg0) {
|
|
1627
|
-
const ret = arg0.next;
|
|
1628
|
-
return ret;
|
|
1629
|
-
};
|
|
1630
|
-
imports.wbg.__wbg_next_6574e1a8a62d1055 = function() { return handleError(function (arg0) {
|
|
1631
|
-
const ret = arg0.next();
|
|
1632
|
-
return ret;
|
|
1633
|
-
}, arguments) };
|
|
1634
|
-
imports.wbg.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
1635
|
-
const ret = arg0.node;
|
|
1636
|
-
return ret;
|
|
1637
|
-
};
|
|
1638
|
-
imports.wbg.__wbg_now_2c95c9de01293173 = function(arg0) {
|
|
1639
|
-
const ret = arg0.now();
|
|
1640
|
-
return ret;
|
|
1641
|
-
};
|
|
1642
|
-
imports.wbg.__wbg_now_807e54c39636c349 = function() {
|
|
1643
|
-
const ret = Date.now();
|
|
1644
|
-
return ret;
|
|
1645
|
-
};
|
|
1646
|
-
imports.wbg.__wbg_performance_7a3ffd0b17f663ad = function(arg0) {
|
|
1647
|
-
const ret = arg0.performance;
|
|
1648
|
-
return ret;
|
|
1649
|
-
};
|
|
1650
|
-
imports.wbg.__wbg_process_dc0fbacc7c1c06f7 = function(arg0) {
|
|
1651
|
-
const ret = arg0.process;
|
|
1652
|
-
return ret;
|
|
1653
|
-
};
|
|
1654
|
-
imports.wbg.__wbg_push_737cfc8c1432c2c6 = function(arg0, arg1) {
|
|
1655
|
-
const ret = arg0.push(arg1);
|
|
1656
|
-
return ret;
|
|
1657
|
-
};
|
|
1658
|
-
imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
|
|
1659
|
-
queueMicrotask(arg0);
|
|
1660
|
-
};
|
|
1661
|
-
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
|
|
1662
|
-
const ret = arg0.queueMicrotask;
|
|
1663
|
-
return ret;
|
|
1664
|
-
};
|
|
1665
|
-
imports.wbg.__wbg_queuemessage_new = function(arg0) {
|
|
1666
|
-
const ret = QueueMessage.__wrap(arg0);
|
|
1667
|
-
return ret;
|
|
1668
|
-
};
|
|
1669
|
-
imports.wbg.__wbg_randomFillSync_ac0988aba3254290 = function() { return handleError(function (arg0, arg1) {
|
|
1670
|
-
arg0.randomFillSync(arg1);
|
|
1671
|
-
}, arguments) };
|
|
1672
|
-
imports.wbg.__wbg_readyState_7ef6e63c349899ed = function(arg0) {
|
|
1673
|
-
const ret = arg0.readyState;
|
|
1674
|
-
return ret;
|
|
1675
|
-
};
|
|
1676
|
-
imports.wbg.__wbg_reason_49f1cede8bcf23dd = function(arg0, arg1) {
|
|
1677
|
-
const ret = arg1.reason;
|
|
1678
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1679
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1680
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1681
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1682
|
-
};
|
|
1683
|
-
imports.wbg.__wbg_require_60cc747a6bc5215a = function() { return handleError(function () {
|
|
1684
|
-
const ret = module.require;
|
|
1685
|
-
return ret;
|
|
1686
|
-
}, arguments) };
|
|
1687
|
-
imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
|
|
1688
|
-
const ret = Promise.resolve(arg0);
|
|
1689
|
-
return ret;
|
|
1690
|
-
};
|
|
1691
|
-
imports.wbg.__wbg_send_7c4769e24cf1d784 = function() { return handleError(function (arg0, arg1) {
|
|
1692
|
-
arg0.send(arg1);
|
|
1693
|
-
}, arguments) };
|
|
1694
|
-
imports.wbg.__wbg_set_37837023f3d740e8 = function(arg0, arg1, arg2) {
|
|
1695
|
-
arg0[arg1 >>> 0] = arg2;
|
|
1696
|
-
};
|
|
1697
|
-
imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {
|
|
1698
|
-
arg0[arg1] = arg2;
|
|
1699
|
-
};
|
|
1700
|
-
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
1701
|
-
arg0.set(arg1, arg2 >>> 0);
|
|
1702
|
-
};
|
|
1703
|
-
imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1704
|
-
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1705
|
-
return ret;
|
|
1706
|
-
}, arguments) };
|
|
1707
|
-
imports.wbg.__wbg_setbinaryType_92fa1ffd873b327c = function(arg0, arg1) {
|
|
1708
|
-
arg0.binaryType = __wbindgen_enum_BinaryType[arg1];
|
|
1709
|
-
};
|
|
1710
|
-
imports.wbg.__wbg_setonclose_14fc475a49d488fc = function(arg0, arg1) {
|
|
1711
|
-
arg0.onclose = arg1;
|
|
1712
|
-
};
|
|
1713
|
-
imports.wbg.__wbg_setonerror_8639efe354b947cd = function(arg0, arg1) {
|
|
1714
|
-
arg0.onerror = arg1;
|
|
1715
|
-
};
|
|
1716
|
-
imports.wbg.__wbg_setonmessage_6eccab530a8fb4c7 = function(arg0, arg1) {
|
|
1717
|
-
arg0.onmessage = arg1;
|
|
1718
|
-
};
|
|
1719
|
-
imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
|
|
1720
|
-
arg0.onopen = arg1;
|
|
1721
|
-
};
|
|
1722
|
-
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
1723
|
-
const ret = arg1.stack;
|
|
1724
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1725
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1726
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1727
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1728
|
-
};
|
|
1729
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
|
|
1730
|
-
const ret = typeof global === 'undefined' ? null : global;
|
|
1731
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1732
|
-
};
|
|
1733
|
-
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
|
|
1734
|
-
const ret = typeof globalThis === 'undefined' ? null : globalThis;
|
|
1735
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1736
|
-
};
|
|
1737
|
-
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
|
|
1738
|
-
const ret = typeof self === 'undefined' ? null : self;
|
|
1739
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1740
|
-
};
|
|
1741
|
-
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
|
|
1742
|
-
const ret = typeof window === 'undefined' ? null : window;
|
|
1743
|
-
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1744
|
-
};
|
|
1745
|
-
imports.wbg.__wbg_stringify_f7ed6987935b4a24 = function() { return handleError(function (arg0) {
|
|
1746
|
-
const ret = JSON.stringify(arg0);
|
|
1747
|
-
return ret;
|
|
1748
|
-
}, arguments) };
|
|
1749
|
-
imports.wbg.__wbg_subarray_aa9065fa9dc5df96 = function(arg0, arg1, arg2) {
|
|
1750
|
-
const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
|
|
1751
|
-
return ret;
|
|
1752
|
-
};
|
|
1753
|
-
imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
|
|
1754
|
-
const ret = arg0.then(arg1);
|
|
1755
|
-
return ret;
|
|
1756
|
-
};
|
|
1757
|
-
imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
|
|
1758
|
-
const ret = arg0.then(arg1, arg2);
|
|
1759
|
-
return ret;
|
|
1760
|
-
};
|
|
1761
|
-
imports.wbg.__wbg_value_cd1ffa7b1ab794f1 = function(arg0) {
|
|
1762
|
-
const ret = arg0.value;
|
|
1763
|
-
return ret;
|
|
1764
|
-
};
|
|
1765
|
-
imports.wbg.__wbg_versions_c01dfd4722a88165 = function(arg0) {
|
|
1766
|
-
const ret = arg0.versions;
|
|
1767
|
-
return ret;
|
|
1768
|
-
};
|
|
1769
|
-
imports.wbg.__wbg_websockethandle_new = function(arg0) {
|
|
1770
|
-
const ret = WebSocketHandle.__wrap(arg0);
|
|
1771
|
-
return ret;
|
|
1772
|
-
};
|
|
1773
|
-
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
1774
|
-
const ret = +arg0;
|
|
1775
|
-
return ret;
|
|
1776
|
-
};
|
|
1777
|
-
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
1778
|
-
const v = arg0;
|
|
1779
|
-
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
1780
|
-
return ret;
|
|
1781
|
-
};
|
|
1782
|
-
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1783
|
-
const obj = arg0.original;
|
|
1784
|
-
if (obj.cnt-- == 1) {
|
|
1785
|
-
obj.a = 0;
|
|
1786
|
-
return true;
|
|
2270
|
+
function expectedResponseType(type) {
|
|
2271
|
+
switch (type) {
|
|
2272
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
1787
2273
|
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
};
|
|
1791
|
-
imports.wbg.__wbindgen_closure_wrapper3780 = function(arg0, arg1, arg2) {
|
|
1792
|
-
const ret = makeMutClosure(arg0, arg1, 1609, __wbg_adapter_46);
|
|
1793
|
-
return ret;
|
|
1794
|
-
};
|
|
1795
|
-
imports.wbg.__wbindgen_closure_wrapper3782 = function(arg0, arg1, arg2) {
|
|
1796
|
-
const ret = makeMutClosure(arg0, arg1, 1609, __wbg_adapter_46);
|
|
1797
|
-
return ret;
|
|
1798
|
-
};
|
|
1799
|
-
imports.wbg.__wbindgen_closure_wrapper3784 = function(arg0, arg1, arg2) {
|
|
1800
|
-
const ret = makeMutClosure(arg0, arg1, 1609, __wbg_adapter_46);
|
|
1801
|
-
return ret;
|
|
1802
|
-
};
|
|
1803
|
-
imports.wbg.__wbindgen_closure_wrapper3786 = function(arg0, arg1, arg2) {
|
|
1804
|
-
const ret = makeMutClosure(arg0, arg1, 1609, __wbg_adapter_46);
|
|
1805
|
-
return ret;
|
|
1806
|
-
};
|
|
1807
|
-
imports.wbg.__wbindgen_closure_wrapper4627 = function(arg0, arg1, arg2) {
|
|
1808
|
-
const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_55);
|
|
1809
|
-
return ret;
|
|
1810
|
-
};
|
|
1811
|
-
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
1812
|
-
const ret = debugString(arg1);
|
|
1813
|
-
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1814
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1815
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1816
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1817
|
-
};
|
|
1818
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
1819
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1820
|
-
return ret;
|
|
1821
|
-
};
|
|
1822
|
-
imports.wbg.__wbindgen_in = function(arg0, arg1) {
|
|
1823
|
-
const ret = arg0 in arg1;
|
|
1824
|
-
return ret;
|
|
1825
|
-
};
|
|
1826
|
-
imports.wbg.__wbindgen_init_externref_table = function() {
|
|
1827
|
-
const table = wasm.__wbindgen_export_4;
|
|
1828
|
-
const offset = table.grow(4);
|
|
1829
|
-
table.set(0, undefined);
|
|
1830
|
-
table.set(offset + 0, undefined);
|
|
1831
|
-
table.set(offset + 1, null);
|
|
1832
|
-
table.set(offset + 2, true);
|
|
1833
|
-
table.set(offset + 3, false);
|
|
1834
|
-
;
|
|
1835
|
-
};
|
|
1836
|
-
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
1837
|
-
const ret = typeof(arg0) === 'function';
|
|
1838
|
-
return ret;
|
|
1839
|
-
};
|
|
1840
|
-
imports.wbg.__wbindgen_is_null = function(arg0) {
|
|
1841
|
-
const ret = arg0 === null;
|
|
1842
|
-
return ret;
|
|
1843
|
-
};
|
|
1844
|
-
imports.wbg.__wbindgen_is_object = function(arg0) {
|
|
1845
|
-
const val = arg0;
|
|
1846
|
-
const ret = typeof(val) === 'object' && val !== null;
|
|
1847
|
-
return ret;
|
|
1848
|
-
};
|
|
1849
|
-
imports.wbg.__wbindgen_is_string = function(arg0) {
|
|
1850
|
-
const ret = typeof(arg0) === 'string';
|
|
1851
|
-
return ret;
|
|
1852
|
-
};
|
|
1853
|
-
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
1854
|
-
const ret = arg0 === undefined;
|
|
1855
|
-
return ret;
|
|
1856
|
-
};
|
|
1857
|
-
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
1858
|
-
const ret = arg0 == arg1;
|
|
1859
|
-
return ret;
|
|
1860
|
-
};
|
|
1861
|
-
imports.wbg.__wbindgen_memory = function() {
|
|
1862
|
-
const ret = wasm.memory;
|
|
1863
|
-
return ret;
|
|
1864
|
-
};
|
|
1865
|
-
imports.wbg.__wbindgen_number_get = function(arg0, arg1) {
|
|
1866
|
-
const obj = arg1;
|
|
1867
|
-
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1868
|
-
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1869
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1870
|
-
};
|
|
1871
|
-
imports.wbg.__wbindgen_number_new = function(arg0) {
|
|
1872
|
-
const ret = arg0;
|
|
1873
|
-
return ret;
|
|
1874
|
-
};
|
|
1875
|
-
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {
|
|
1876
|
-
const obj = arg1;
|
|
1877
|
-
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1878
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1879
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1880
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1881
|
-
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1882
|
-
};
|
|
1883
|
-
imports.wbg.__wbindgen_string_new = function(arg0, arg1) {
|
|
1884
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
1885
|
-
return ret;
|
|
1886
|
-
};
|
|
1887
|
-
imports.wbg.__wbindgen_throw = function(arg0, arg1) {
|
|
1888
|
-
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1889
|
-
};
|
|
1890
|
-
imports.wbg.__wbindgen_uint8_array_new = function(arg0, arg1) {
|
|
1891
|
-
var v0 = getArrayU8FromWasm0(arg0, arg1).slice();
|
|
1892
|
-
wasm.__wbindgen_free(arg0, arg1 * 1, 1);
|
|
1893
|
-
const ret = v0;
|
|
1894
|
-
return ret;
|
|
1895
|
-
};
|
|
1896
|
-
|
|
1897
|
-
return imports;
|
|
1898
|
-
}
|
|
1899
|
-
|
|
1900
|
-
function __wbg_init_memory(imports, memory) {
|
|
1901
|
-
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
function __wbg_finalize_init(instance, module) {
|
|
1905
|
-
wasm = instance.exports;
|
|
1906
|
-
__wbg_init.__wbindgen_wasm_module = module;
|
|
1907
|
-
cachedDataViewMemory0 = null;
|
|
1908
|
-
cachedUint8ArrayMemory0 = null;
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
wasm.__wbindgen_start();
|
|
1912
|
-
return wasm;
|
|
2274
|
+
return false;
|
|
2275
|
+
}
|
|
1913
2276
|
}
|
|
1914
2277
|
|
|
1915
2278
|
function initSync(module) {
|
|
1916
2279
|
if (wasm !== undefined) return wasm;
|
|
1917
2280
|
|
|
1918
2281
|
|
|
1919
|
-
if (
|
|
2282
|
+
if (module !== undefined) {
|
|
1920
2283
|
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
1921
2284
|
({module} = module)
|
|
1922
2285
|
} else {
|
|
@@ -1925,15 +2288,10 @@ function initSync(module) {
|
|
|
1925
2288
|
}
|
|
1926
2289
|
|
|
1927
2290
|
const imports = __wbg_get_imports();
|
|
1928
|
-
|
|
1929
|
-
__wbg_init_memory(imports);
|
|
1930
|
-
|
|
1931
2291
|
if (!(module instanceof WebAssembly.Module)) {
|
|
1932
2292
|
module = new WebAssembly.Module(module);
|
|
1933
2293
|
}
|
|
1934
|
-
|
|
1935
2294
|
const instance = new WebAssembly.Instance(module, imports);
|
|
1936
|
-
|
|
1937
2295
|
return __wbg_finalize_init(instance, module);
|
|
1938
2296
|
}
|
|
1939
2297
|
|
|
@@ -1941,7 +2299,7 @@ async function __wbg_init(module_or_path) {
|
|
|
1941
2299
|
if (wasm !== undefined) return wasm;
|
|
1942
2300
|
|
|
1943
2301
|
|
|
1944
|
-
if (
|
|
2302
|
+
if (module_or_path !== undefined) {
|
|
1945
2303
|
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
1946
2304
|
({module_or_path} = module_or_path)
|
|
1947
2305
|
} else {
|
|
@@ -1949,7 +2307,7 @@ async function __wbg_init(module_or_path) {
|
|
|
1949
2307
|
}
|
|
1950
2308
|
}
|
|
1951
2309
|
|
|
1952
|
-
if (
|
|
2310
|
+
if (module_or_path === undefined) {
|
|
1953
2311
|
module_or_path = new URL('rivetkit_wasm_bg.wasm', import.meta.url);
|
|
1954
2312
|
}
|
|
1955
2313
|
const imports = __wbg_get_imports();
|
|
@@ -1958,12 +2316,9 @@ async function __wbg_init(module_or_path) {
|
|
|
1958
2316
|
module_or_path = fetch(module_or_path);
|
|
1959
2317
|
}
|
|
1960
2318
|
|
|
1961
|
-
__wbg_init_memory(imports);
|
|
1962
|
-
|
|
1963
2319
|
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
1964
2320
|
|
|
1965
2321
|
return __wbg_finalize_init(instance, module);
|
|
1966
2322
|
}
|
|
1967
2323
|
|
|
1968
|
-
export { initSync };
|
|
1969
|
-
export default __wbg_init;
|
|
2324
|
+
export { initSync, __wbg_init as default };
|