@rivetkit/rivetkit-wasm 2.3.26 → 2.3.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pkg/package.json +1 -1
- package/pkg/rivetkit_wasm.d.ts +22 -22
- package/pkg/rivetkit_wasm.js +170 -169
- package/pkg/rivetkit_wasm_bg.wasm +0 -0
- package/pkg/rivetkit_wasm_bg.wasm.d.ts +5 -5
package/package.json
CHANGED
package/pkg/package.json
CHANGED
package/pkg/rivetkit_wasm.d.ts
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function start(): void;
|
|
4
|
-
export function bridgeRivetErrorPrefix(): string;
|
|
5
|
-
export function roundTripBytes(bytes: Uint8Array): Uint8Array;
|
|
6
3
|
export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
|
|
4
|
+
export function bridgeRivetErrorPrefix(): string;
|
|
5
|
+
export function start(): void;
|
|
7
6
|
export function awaitPromise(promise: Promise<any>): Promise<any>;
|
|
7
|
+
export function roundTripBytes(bytes: Uint8Array): Uint8Array;
|
|
8
8
|
export class ActorContext {
|
|
9
9
|
free(): void;
|
|
10
|
-
saveState(payload: any): Promise<void>;
|
|
11
|
-
connectConn(params: Uint8Array, request: any): Promise<ConnHandle>;
|
|
12
|
-
setRunWakeAt(timestamp_ms?: number | null): Promise<void>;
|
|
13
|
-
requestSaveAndWait(opts: any): Promise<void>;
|
|
14
|
-
verifyInspectorAuth(bearer_token?: string | null): Promise<void>;
|
|
15
|
-
beginStateTransaction(timeout_ms?: number | null): Promise<ActorStateTransaction>;
|
|
16
|
-
saveStateAndWorkflowBatch(writes: any): Promise<void>;
|
|
17
|
-
waitForTrackedShutdownWork(): Promise<boolean>;
|
|
18
|
-
waitForTrackedShutdownWorkUnbounded(): Promise<void>;
|
|
19
10
|
keepAwake(promise: Promise<any>): void;
|
|
11
|
+
saveState(payload: any): Promise<void>;
|
|
20
12
|
waitUntil(promise: Promise<any>): void;
|
|
21
13
|
abortSignal(): any;
|
|
14
|
+
connectConn(params: Uint8Array, request: any): Promise<ConnHandle>;
|
|
22
15
|
requestSave(opts: any): void;
|
|
23
16
|
registerTask(promise: Promise<any>): void;
|
|
24
17
|
runtimeState(): any;
|
|
25
18
|
endKeepAwake(region_id: number): void;
|
|
19
|
+
setRunWakeAt(timestamp_ms?: number | null): Promise<void>;
|
|
26
20
|
beginKeepAwake(): number;
|
|
27
21
|
inspectorSnapshot(): object;
|
|
28
22
|
endOnStateChange(): void;
|
|
29
23
|
restartRunHandler(): void;
|
|
30
24
|
beginOnStateChange(): void;
|
|
25
|
+
requestSaveAndWait(opts: any): Promise<void>;
|
|
26
|
+
verifyInspectorAuth(bearer_token?: string | null): Promise<void>;
|
|
31
27
|
endWebsocketCallback(region_id: number): void;
|
|
28
|
+
beginStateTransaction(timeout_ms?: number | null): Promise<ActorStateTransaction>;
|
|
32
29
|
beginWebsocketCallback(): number;
|
|
33
30
|
dirtyHibernatableConns(): Array<any>;
|
|
31
|
+
saveStateAndWorkflowBatch(writes: any): Promise<void>;
|
|
34
32
|
kv(): Kv;
|
|
33
|
+
waitForTrackedShutdownWork(): Promise<boolean>;
|
|
35
34
|
takePendingHibernationChanges(): Array<any>;
|
|
36
35
|
key(): any;
|
|
37
36
|
constructor();
|
|
38
37
|
sql(): SqliteDb;
|
|
38
|
+
waitForTrackedShutdownWorkUnbounded(): Promise<void>;
|
|
39
39
|
name(): string;
|
|
40
40
|
conns(): Array<any>;
|
|
41
41
|
queue(): Queue;
|
|
@@ -80,10 +80,10 @@ export class ConnHandle {
|
|
|
80
80
|
export class CoreRegistry {
|
|
81
81
|
free(): void;
|
|
82
82
|
handleServerlessRequest(req: any, on_stream_event: Function, cancel_token: CancellationToken, config: any): Promise<any>;
|
|
83
|
-
serve(config: any): Promise<void>;
|
|
84
|
-
shutdown(): Promise<void>;
|
|
85
83
|
constructor();
|
|
84
|
+
serve(config: any): Promise<void>;
|
|
86
85
|
register(name: string, factory: ActorFactory): void;
|
|
86
|
+
shutdown(): Promise<void>;
|
|
87
87
|
}
|
|
88
88
|
export class Kv {
|
|
89
89
|
private constructor();
|
|
@@ -102,6 +102,7 @@ export class Queue {
|
|
|
102
102
|
private constructor();
|
|
103
103
|
free(): void;
|
|
104
104
|
nextBatch(options: any, signal?: CancellationToken | null): Promise<Array<any>>;
|
|
105
|
+
tryNextBatch(options: any): Array<any>;
|
|
105
106
|
waitForNames(names: any, options: any, signal?: CancellationToken | null): Promise<QueueMessage>;
|
|
106
107
|
enqueueAndWait(name: string, body: Uint8Array, options: any, signal?: CancellationToken | null): Promise<Uint8Array | undefined>;
|
|
107
108
|
inspectMessages(): Promise<Array<any>>;
|
|
@@ -109,18 +110,17 @@ export class Queue {
|
|
|
109
110
|
waitForNamesAvailable(names: any, options: any): Promise<void>;
|
|
110
111
|
send(name: string, body: Uint8Array): Promise<QueueMessage>;
|
|
111
112
|
reset(): Promise<void>;
|
|
112
|
-
tryNextBatch(options: any): Array<any>;
|
|
113
113
|
maxSize(): number;
|
|
114
114
|
}
|
|
115
115
|
export class QueueMessage {
|
|
116
116
|
private constructor();
|
|
117
117
|
free(): void;
|
|
118
|
-
complete(response: any): Promise<void>;
|
|
119
118
|
createdAt(): number;
|
|
120
119
|
isCompletable(): boolean;
|
|
121
120
|
id(): bigint;
|
|
122
121
|
body(): Uint8Array;
|
|
123
122
|
name(): string;
|
|
123
|
+
complete(response: any): Promise<void>;
|
|
124
124
|
}
|
|
125
125
|
export class Schedule {
|
|
126
126
|
private constructor();
|
|
@@ -159,9 +159,9 @@ export class SqliteTransaction {
|
|
|
159
159
|
export class WebSocketHandle {
|
|
160
160
|
private constructor();
|
|
161
161
|
free(): void;
|
|
162
|
-
close(code?: number | null, reason?: string | null): Promise<void>;
|
|
163
162
|
setEventCallback(callback: Function): void;
|
|
164
163
|
send(data: Uint8Array, binary: boolean): void;
|
|
164
|
+
close(code?: number | null, reason?: string | null): Promise<void>;
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -291,11 +291,11 @@ export interface InitOutput {
|
|
|
291
291
|
readonly websockethandle_close: (a: number, b: number, c: number, d: number) => any;
|
|
292
292
|
readonly websockethandle_send: (a: number, b: number, c: number, d: number) => [number, number];
|
|
293
293
|
readonly websockethandle_setEventCallback: (a: number, b: any) => void;
|
|
294
|
+
readonly start: () => void;
|
|
294
295
|
readonly actorcontext_queue: (a: number) => number;
|
|
295
296
|
readonly actorcontext_schedule: (a: number) => number;
|
|
296
|
-
readonly __wbg_queue_free: (a: number, b: number) => void;
|
|
297
297
|
readonly __wbg_schedule_free: (a: number, b: number) => void;
|
|
298
|
-
readonly
|
|
298
|
+
readonly __wbg_queue_free: (a: number, b: number) => void;
|
|
299
299
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
300
300
|
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
301
301
|
readonly __wbindgen_exn_store: (a: number) => void;
|
|
@@ -304,9 +304,9 @@ export interface InitOutput {
|
|
|
304
304
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
305
305
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
306
306
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
307
|
-
readonly
|
|
308
|
-
readonly
|
|
309
|
-
readonly
|
|
307
|
+
readonly closure1975_externref_shim: (a: number, b: number, c: any) => void;
|
|
308
|
+
readonly closure2334_externref_shim: (a: number, b: number, c: any) => void;
|
|
309
|
+
readonly closure2571_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
310
310
|
readonly __wbindgen_start: () => void;
|
|
311
311
|
}
|
|
312
312
|
|
package/pkg/rivetkit_wasm.js
CHANGED
|
@@ -203,8 +203,33 @@ function debugString(val) {
|
|
|
203
203
|
return className;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
207
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
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}`);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* @param {Uint8Array} bytes
|
|
226
|
+
* @returns {Uint8Array}
|
|
227
|
+
*/
|
|
228
|
+
export function uint8ArrayFromBytes(bytes) {
|
|
229
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
230
|
+
const len0 = WASM_VECTOR_LEN;
|
|
231
|
+
const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
|
|
232
|
+
return ret;
|
|
208
233
|
}
|
|
209
234
|
|
|
210
235
|
/**
|
|
@@ -223,12 +248,19 @@ export function bridgeRivetErrorPrefix() {
|
|
|
223
248
|
}
|
|
224
249
|
}
|
|
225
250
|
|
|
226
|
-
function
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
251
|
+
export function start() {
|
|
252
|
+
wasm.start();
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @param {Promise<any>} promise
|
|
257
|
+
* @returns {Promise<any>}
|
|
258
|
+
*/
|
|
259
|
+
export function awaitPromise(promise) {
|
|
260
|
+
const ret = wasm.awaitPromise(promise);
|
|
261
|
+
return ret;
|
|
231
262
|
}
|
|
263
|
+
|
|
232
264
|
/**
|
|
233
265
|
* @param {Uint8Array} bytes
|
|
234
266
|
* @returns {Uint8Array}
|
|
@@ -242,47 +274,16 @@ export function roundTripBytes(bytes) {
|
|
|
242
274
|
return v2;
|
|
243
275
|
}
|
|
244
276
|
|
|
245
|
-
/**
|
|
246
|
-
* @param {Uint8Array} bytes
|
|
247
|
-
* @returns {Uint8Array}
|
|
248
|
-
*/
|
|
249
|
-
export function uint8ArrayFromBytes(bytes) {
|
|
250
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
251
|
-
const len0 = WASM_VECTOR_LEN;
|
|
252
|
-
const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
|
|
253
|
-
return ret;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
/**
|
|
257
|
-
* @param {Promise<any>} promise
|
|
258
|
-
* @returns {Promise<any>}
|
|
259
|
-
*/
|
|
260
|
-
export function awaitPromise(promise) {
|
|
261
|
-
const ret = wasm.awaitPromise(promise);
|
|
262
|
-
return ret;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
function _assertClass(instance, klass) {
|
|
266
|
-
if (!(instance instanceof klass)) {
|
|
267
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
function takeFromExternrefTable0(idx) {
|
|
272
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
273
|
-
wasm.__externref_table_dealloc(idx);
|
|
274
|
-
return value;
|
|
275
|
-
}
|
|
276
277
|
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
277
|
-
wasm.
|
|
278
|
+
wasm.closure1975_externref_shim(arg0, arg1, arg2);
|
|
278
279
|
}
|
|
279
280
|
|
|
280
281
|
function __wbg_adapter_59(arg0, arg1, arg2) {
|
|
281
|
-
wasm.
|
|
282
|
+
wasm.closure2334_externref_shim(arg0, arg1, arg2);
|
|
282
283
|
}
|
|
283
284
|
|
|
284
|
-
function
|
|
285
|
-
wasm.
|
|
285
|
+
function __wbg_adapter_273(arg0, arg1, arg2, arg3) {
|
|
286
|
+
wasm.closure2571_externref_shim(arg0, arg1, arg2, arg3);
|
|
286
287
|
}
|
|
287
288
|
|
|
288
289
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
@@ -313,86 +314,19 @@ export class ActorContext {
|
|
|
313
314
|
wasm.__wbg_actorcontext_free(ptr, 0);
|
|
314
315
|
}
|
|
315
316
|
/**
|
|
316
|
-
* @param {any}
|
|
317
|
-
* @returns {Promise<void>}
|
|
318
|
-
*/
|
|
319
|
-
saveState(payload) {
|
|
320
|
-
const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
|
|
321
|
-
return ret;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* @param {Uint8Array} params
|
|
325
|
-
* @param {any} request
|
|
326
|
-
* @returns {Promise<ConnHandle>}
|
|
327
|
-
*/
|
|
328
|
-
connectConn(params, request) {
|
|
329
|
-
const ptr0 = passArray8ToWasm0(params, wasm.__wbindgen_malloc);
|
|
330
|
-
const len0 = WASM_VECTOR_LEN;
|
|
331
|
-
const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
|
|
332
|
-
return ret;
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* @param {number | null} [timestamp_ms]
|
|
336
|
-
* @returns {Promise<void>}
|
|
337
|
-
*/
|
|
338
|
-
setRunWakeAt(timestamp_ms) {
|
|
339
|
-
const ret = wasm.actorcontext_setRunWakeAt(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
|
|
340
|
-
return ret;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* @param {any} opts
|
|
344
|
-
* @returns {Promise<void>}
|
|
345
|
-
*/
|
|
346
|
-
requestSaveAndWait(opts) {
|
|
347
|
-
const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
|
|
348
|
-
return ret;
|
|
349
|
-
}
|
|
350
|
-
/**
|
|
351
|
-
* @param {string | null} [bearer_token]
|
|
352
|
-
* @returns {Promise<void>}
|
|
353
|
-
*/
|
|
354
|
-
verifyInspectorAuth(bearer_token) {
|
|
355
|
-
var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
356
|
-
var len0 = WASM_VECTOR_LEN;
|
|
357
|
-
const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
|
|
358
|
-
return ret;
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* @param {number | null} [timeout_ms]
|
|
362
|
-
* @returns {Promise<ActorStateTransaction>}
|
|
363
|
-
*/
|
|
364
|
-
beginStateTransaction(timeout_ms) {
|
|
365
|
-
const ret = wasm.actorcontext_beginStateTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
|
|
366
|
-
return ret;
|
|
367
|
-
}
|
|
368
|
-
/**
|
|
369
|
-
* @param {any} writes
|
|
370
|
-
* @returns {Promise<void>}
|
|
371
|
-
*/
|
|
372
|
-
saveStateAndWorkflowBatch(writes) {
|
|
373
|
-
const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
|
|
374
|
-
return ret;
|
|
375
|
-
}
|
|
376
|
-
/**
|
|
377
|
-
* @returns {Promise<boolean>}
|
|
317
|
+
* @param {Promise<any>} promise
|
|
378
318
|
*/
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
return ret;
|
|
319
|
+
keepAwake(promise) {
|
|
320
|
+
wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
|
|
382
321
|
}
|
|
383
322
|
/**
|
|
323
|
+
* @param {any} payload
|
|
384
324
|
* @returns {Promise<void>}
|
|
385
325
|
*/
|
|
386
|
-
|
|
387
|
-
const ret = wasm.
|
|
326
|
+
saveState(payload) {
|
|
327
|
+
const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
|
|
388
328
|
return ret;
|
|
389
329
|
}
|
|
390
|
-
/**
|
|
391
|
-
* @param {Promise<any>} promise
|
|
392
|
-
*/
|
|
393
|
-
keepAwake(promise) {
|
|
394
|
-
wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
|
|
395
|
-
}
|
|
396
330
|
/**
|
|
397
331
|
* @param {Promise<any>} promise
|
|
398
332
|
*/
|
|
@@ -409,6 +343,17 @@ export class ActorContext {
|
|
|
409
343
|
}
|
|
410
344
|
return takeFromExternrefTable0(ret[0]);
|
|
411
345
|
}
|
|
346
|
+
/**
|
|
347
|
+
* @param {Uint8Array} params
|
|
348
|
+
* @param {any} request
|
|
349
|
+
* @returns {Promise<ConnHandle>}
|
|
350
|
+
*/
|
|
351
|
+
connectConn(params, request) {
|
|
352
|
+
const ptr0 = passArray8ToWasm0(params, wasm.__wbindgen_malloc);
|
|
353
|
+
const len0 = WASM_VECTOR_LEN;
|
|
354
|
+
const ret = wasm.actorcontext_connectConn(this.__wbg_ptr, ptr0, len0, request);
|
|
355
|
+
return ret;
|
|
356
|
+
}
|
|
412
357
|
/**
|
|
413
358
|
* @param {any} opts
|
|
414
359
|
*/
|
|
@@ -434,6 +379,14 @@ export class ActorContext {
|
|
|
434
379
|
endKeepAwake(region_id) {
|
|
435
380
|
wasm.actorcontext_endKeepAwake(this.__wbg_ptr, region_id);
|
|
436
381
|
}
|
|
382
|
+
/**
|
|
383
|
+
* @param {number | null} [timestamp_ms]
|
|
384
|
+
* @returns {Promise<void>}
|
|
385
|
+
*/
|
|
386
|
+
setRunWakeAt(timestamp_ms) {
|
|
387
|
+
const ret = wasm.actorcontext_setRunWakeAt(this.__wbg_ptr, !isLikeNone(timestamp_ms), isLikeNone(timestamp_ms) ? 0 : timestamp_ms);
|
|
388
|
+
return ret;
|
|
389
|
+
}
|
|
437
390
|
/**
|
|
438
391
|
* @returns {number}
|
|
439
392
|
*/
|
|
@@ -463,12 +416,38 @@ export class ActorContext {
|
|
|
463
416
|
beginOnStateChange() {
|
|
464
417
|
wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
|
|
465
418
|
}
|
|
419
|
+
/**
|
|
420
|
+
* @param {any} opts
|
|
421
|
+
* @returns {Promise<void>}
|
|
422
|
+
*/
|
|
423
|
+
requestSaveAndWait(opts) {
|
|
424
|
+
const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
|
|
425
|
+
return ret;
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* @param {string | null} [bearer_token]
|
|
429
|
+
* @returns {Promise<void>}
|
|
430
|
+
*/
|
|
431
|
+
verifyInspectorAuth(bearer_token) {
|
|
432
|
+
var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
433
|
+
var len0 = WASM_VECTOR_LEN;
|
|
434
|
+
const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
|
|
435
|
+
return ret;
|
|
436
|
+
}
|
|
466
437
|
/**
|
|
467
438
|
* @param {number} region_id
|
|
468
439
|
*/
|
|
469
440
|
endWebsocketCallback(region_id) {
|
|
470
441
|
wasm.actorcontext_endWebsocketCallback(this.__wbg_ptr, region_id);
|
|
471
442
|
}
|
|
443
|
+
/**
|
|
444
|
+
* @param {number | null} [timeout_ms]
|
|
445
|
+
* @returns {Promise<ActorStateTransaction>}
|
|
446
|
+
*/
|
|
447
|
+
beginStateTransaction(timeout_ms) {
|
|
448
|
+
const ret = wasm.actorcontext_beginStateTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
|
|
449
|
+
return ret;
|
|
450
|
+
}
|
|
472
451
|
/**
|
|
473
452
|
* @returns {number}
|
|
474
453
|
*/
|
|
@@ -483,6 +462,14 @@ export class ActorContext {
|
|
|
483
462
|
const ret = wasm.actorcontext_dirtyHibernatableConns(this.__wbg_ptr);
|
|
484
463
|
return ret;
|
|
485
464
|
}
|
|
465
|
+
/**
|
|
466
|
+
* @param {any} writes
|
|
467
|
+
* @returns {Promise<void>}
|
|
468
|
+
*/
|
|
469
|
+
saveStateAndWorkflowBatch(writes) {
|
|
470
|
+
const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
|
|
471
|
+
return ret;
|
|
472
|
+
}
|
|
486
473
|
/**
|
|
487
474
|
* @returns {Kv}
|
|
488
475
|
*/
|
|
@@ -490,6 +477,13 @@ export class ActorContext {
|
|
|
490
477
|
const ret = wasm.actorcontext_kv(this.__wbg_ptr);
|
|
491
478
|
return Kv.__wrap(ret);
|
|
492
479
|
}
|
|
480
|
+
/**
|
|
481
|
+
* @returns {Promise<boolean>}
|
|
482
|
+
*/
|
|
483
|
+
waitForTrackedShutdownWork() {
|
|
484
|
+
const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
|
|
485
|
+
return ret;
|
|
486
|
+
}
|
|
493
487
|
/**
|
|
494
488
|
* @returns {Array<any>}
|
|
495
489
|
*/
|
|
@@ -523,6 +517,13 @@ export class ActorContext {
|
|
|
523
517
|
const ret = wasm.actorcontext_sql(this.__wbg_ptr);
|
|
524
518
|
return SqliteDb.__wrap(ret);
|
|
525
519
|
}
|
|
520
|
+
/**
|
|
521
|
+
* @returns {Promise<void>}
|
|
522
|
+
*/
|
|
523
|
+
waitForTrackedShutdownWorkUnbounded() {
|
|
524
|
+
const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
|
|
525
|
+
return ret;
|
|
526
|
+
}
|
|
526
527
|
/**
|
|
527
528
|
* @returns {string}
|
|
528
529
|
*/
|
|
@@ -891,6 +892,12 @@ export class CoreRegistry {
|
|
|
891
892
|
const ret = wasm.coreregistry_handleServerlessRequest(this.__wbg_ptr, req, on_stream_event, cancel_token.__wbg_ptr, config);
|
|
892
893
|
return ret;
|
|
893
894
|
}
|
|
895
|
+
constructor() {
|
|
896
|
+
const ret = wasm.coreregistry_new();
|
|
897
|
+
this.__wbg_ptr = ret >>> 0;
|
|
898
|
+
CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
|
|
899
|
+
return this;
|
|
900
|
+
}
|
|
894
901
|
/**
|
|
895
902
|
* @param {any} config
|
|
896
903
|
* @returns {Promise<void>}
|
|
@@ -899,19 +906,6 @@ export class CoreRegistry {
|
|
|
899
906
|
const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
|
|
900
907
|
return ret;
|
|
901
908
|
}
|
|
902
|
-
/**
|
|
903
|
-
* @returns {Promise<void>}
|
|
904
|
-
*/
|
|
905
|
-
shutdown() {
|
|
906
|
-
const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
|
|
907
|
-
return ret;
|
|
908
|
-
}
|
|
909
|
-
constructor() {
|
|
910
|
-
const ret = wasm.coreregistry_new();
|
|
911
|
-
this.__wbg_ptr = ret >>> 0;
|
|
912
|
-
CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
|
|
913
|
-
return this;
|
|
914
|
-
}
|
|
915
909
|
/**
|
|
916
910
|
* @param {string} name
|
|
917
911
|
* @param {ActorFactory} factory
|
|
@@ -925,6 +919,13 @@ export class CoreRegistry {
|
|
|
925
919
|
throw takeFromExternrefTable0(ret[0]);
|
|
926
920
|
}
|
|
927
921
|
}
|
|
922
|
+
/**
|
|
923
|
+
* @returns {Promise<void>}
|
|
924
|
+
*/
|
|
925
|
+
shutdown() {
|
|
926
|
+
const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
|
|
927
|
+
return ret;
|
|
928
|
+
}
|
|
928
929
|
}
|
|
929
930
|
|
|
930
931
|
const KvFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1088,6 +1089,17 @@ export class Queue {
|
|
|
1088
1089
|
const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
|
|
1089
1090
|
return ret;
|
|
1090
1091
|
}
|
|
1092
|
+
/**
|
|
1093
|
+
* @param {any} options
|
|
1094
|
+
* @returns {Array<any>}
|
|
1095
|
+
*/
|
|
1096
|
+
tryNextBatch(options) {
|
|
1097
|
+
const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
|
|
1098
|
+
if (ret[2]) {
|
|
1099
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1100
|
+
}
|
|
1101
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1102
|
+
}
|
|
1091
1103
|
/**
|
|
1092
1104
|
* @param {any} names
|
|
1093
1105
|
* @param {any} options
|
|
@@ -1173,17 +1185,6 @@ export class Queue {
|
|
|
1173
1185
|
const ret = wasm.queue_reset(this.__wbg_ptr);
|
|
1174
1186
|
return ret;
|
|
1175
1187
|
}
|
|
1176
|
-
/**
|
|
1177
|
-
* @param {any} options
|
|
1178
|
-
* @returns {Array<any>}
|
|
1179
|
-
*/
|
|
1180
|
-
tryNextBatch(options) {
|
|
1181
|
-
const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
|
|
1182
|
-
if (ret[2]) {
|
|
1183
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1184
|
-
}
|
|
1185
|
-
return takeFromExternrefTable0(ret[0]);
|
|
1186
|
-
}
|
|
1187
1188
|
/**
|
|
1188
1189
|
* @returns {number}
|
|
1189
1190
|
*/
|
|
@@ -1218,14 +1219,6 @@ export class QueueMessage {
|
|
|
1218
1219
|
const ptr = this.__destroy_into_raw();
|
|
1219
1220
|
wasm.__wbg_queuemessage_free(ptr, 0);
|
|
1220
1221
|
}
|
|
1221
|
-
/**
|
|
1222
|
-
* @param {any} response
|
|
1223
|
-
* @returns {Promise<void>}
|
|
1224
|
-
*/
|
|
1225
|
-
complete(response) {
|
|
1226
|
-
const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
|
|
1227
|
-
return ret;
|
|
1228
|
-
}
|
|
1229
1222
|
/**
|
|
1230
1223
|
* @returns {number}
|
|
1231
1224
|
*/
|
|
@@ -1271,6 +1264,14 @@ export class QueueMessage {
|
|
|
1271
1264
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1272
1265
|
}
|
|
1273
1266
|
}
|
|
1267
|
+
/**
|
|
1268
|
+
* @param {any} response
|
|
1269
|
+
* @returns {Promise<void>}
|
|
1270
|
+
*/
|
|
1271
|
+
complete(response) {
|
|
1272
|
+
const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
|
|
1273
|
+
return ret;
|
|
1274
|
+
}
|
|
1274
1275
|
}
|
|
1275
1276
|
|
|
1276
1277
|
const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1617,17 +1618,6 @@ export class WebSocketHandle {
|
|
|
1617
1618
|
const ptr = this.__destroy_into_raw();
|
|
1618
1619
|
wasm.__wbg_websockethandle_free(ptr, 0);
|
|
1619
1620
|
}
|
|
1620
|
-
/**
|
|
1621
|
-
* @param {number | null} [code]
|
|
1622
|
-
* @param {string | null} [reason]
|
|
1623
|
-
* @returns {Promise<void>}
|
|
1624
|
-
*/
|
|
1625
|
-
close(code, reason) {
|
|
1626
|
-
var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1627
|
-
var len0 = WASM_VECTOR_LEN;
|
|
1628
|
-
const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
|
|
1629
|
-
return ret;
|
|
1630
|
-
}
|
|
1631
1621
|
/**
|
|
1632
1622
|
* @param {Function} callback
|
|
1633
1623
|
*/
|
|
@@ -1646,6 +1636,17 @@ export class WebSocketHandle {
|
|
|
1646
1636
|
throw takeFromExternrefTable0(ret[0]);
|
|
1647
1637
|
}
|
|
1648
1638
|
}
|
|
1639
|
+
/**
|
|
1640
|
+
* @param {number | null} [code]
|
|
1641
|
+
* @param {string | null} [reason]
|
|
1642
|
+
* @returns {Promise<void>}
|
|
1643
|
+
*/
|
|
1644
|
+
close(code, reason) {
|
|
1645
|
+
var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1646
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1647
|
+
const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
|
|
1648
|
+
return ret;
|
|
1649
|
+
}
|
|
1649
1650
|
}
|
|
1650
1651
|
|
|
1651
1652
|
async function __wbg_load(module, imports) {
|
|
@@ -1880,7 +1881,7 @@ function __wbg_get_imports() {
|
|
|
1880
1881
|
const a = state0.a;
|
|
1881
1882
|
state0.a = 0;
|
|
1882
1883
|
try {
|
|
1883
|
-
return
|
|
1884
|
+
return __wbg_adapter_273(a, state0.b, arg0, arg1);
|
|
1884
1885
|
} finally {
|
|
1885
1886
|
state0.a = a;
|
|
1886
1887
|
}
|
|
@@ -2112,24 +2113,24 @@ function __wbg_get_imports() {
|
|
|
2112
2113
|
const ret = false;
|
|
2113
2114
|
return ret;
|
|
2114
2115
|
};
|
|
2115
|
-
imports.wbg.
|
|
2116
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2116
|
+
imports.wbg.__wbindgen_closure_wrapper4736 = function(arg0, arg1, arg2) {
|
|
2117
|
+
const ret = makeMutClosure(arg0, arg1, 1976, __wbg_adapter_50);
|
|
2117
2118
|
return ret;
|
|
2118
2119
|
};
|
|
2119
|
-
imports.wbg.
|
|
2120
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2120
|
+
imports.wbg.__wbindgen_closure_wrapper4738 = function(arg0, arg1, arg2) {
|
|
2121
|
+
const ret = makeMutClosure(arg0, arg1, 1976, __wbg_adapter_50);
|
|
2121
2122
|
return ret;
|
|
2122
2123
|
};
|
|
2123
|
-
imports.wbg.
|
|
2124
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2124
|
+
imports.wbg.__wbindgen_closure_wrapper4740 = function(arg0, arg1, arg2) {
|
|
2125
|
+
const ret = makeMutClosure(arg0, arg1, 1976, __wbg_adapter_50);
|
|
2125
2126
|
return ret;
|
|
2126
2127
|
};
|
|
2127
|
-
imports.wbg.
|
|
2128
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2128
|
+
imports.wbg.__wbindgen_closure_wrapper4742 = function(arg0, arg1, arg2) {
|
|
2129
|
+
const ret = makeMutClosure(arg0, arg1, 1976, __wbg_adapter_50);
|
|
2129
2130
|
return ret;
|
|
2130
2131
|
};
|
|
2131
|
-
imports.wbg.
|
|
2132
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2132
|
+
imports.wbg.__wbindgen_closure_wrapper5706 = function(arg0, arg1, arg2) {
|
|
2133
|
+
const ret = makeMutClosure(arg0, arg1, 2335, __wbg_adapter_59);
|
|
2133
2134
|
return ret;
|
|
2134
2135
|
};
|
|
2135
2136
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|
|
@@ -124,11 +124,11 @@ export const uint8ArrayFromBytes: (a: number, b: number) => any;
|
|
|
124
124
|
export const websockethandle_close: (a: number, b: number, c: number, d: number) => any;
|
|
125
125
|
export const websockethandle_send: (a: number, b: number, c: number, d: number) => [number, number];
|
|
126
126
|
export const websockethandle_setEventCallback: (a: number, b: any) => void;
|
|
127
|
+
export const start: () => void;
|
|
127
128
|
export const actorcontext_queue: (a: number) => number;
|
|
128
129
|
export const actorcontext_schedule: (a: number) => number;
|
|
129
|
-
export const __wbg_queue_free: (a: number, b: number) => void;
|
|
130
130
|
export const __wbg_schedule_free: (a: number, b: number) => void;
|
|
131
|
-
export const
|
|
131
|
+
export const __wbg_queue_free: (a: number, b: number) => void;
|
|
132
132
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
133
133
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
134
134
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
@@ -137,7 +137,7 @@ export const __wbindgen_export_4: WebAssembly.Table;
|
|
|
137
137
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
138
138
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
139
139
|
export const __externref_table_dealloc: (a: number) => void;
|
|
140
|
-
export const
|
|
141
|
-
export const
|
|
142
|
-
export const
|
|
140
|
+
export const closure1975_externref_shim: (a: number, b: number, c: any) => void;
|
|
141
|
+
export const closure2334_externref_shim: (a: number, b: number, c: any) => void;
|
|
142
|
+
export const closure2571_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
143
143
|
export const __wbindgen_start: () => void;
|