@rivetkit/rivetkit-wasm 2.3.9 → 2.3.10
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/rivetkit_wasm.d.ts +17 -17
- package/pkg/rivetkit_wasm.js +142 -153
- package/pkg/rivetkit_wasm_bg.wasm +0 -0
- package/pkg/rivetkit_wasm_bg.wasm.d.ts +3 -3
- package/pkg/package.json +0 -19
package/package.json
CHANGED
package/pkg/rivetkit_wasm.d.ts
CHANGED
|
@@ -1,22 +1,17 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function start(): void;
|
|
4
3
|
export function bridgeRivetErrorPrefix(): string;
|
|
5
4
|
export function roundTripBytes(bytes: Uint8Array): Uint8Array;
|
|
6
|
-
export function
|
|
5
|
+
export function start(): void;
|
|
7
6
|
export function awaitPromise(promise: Promise<any>): Promise<any>;
|
|
7
|
+
export function uint8ArrayFromBytes(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
|
-
requestSaveAndWait(opts: any): Promise<void>;
|
|
13
|
-
verifyInspectorAuth(bearer_token?: string | null): Promise<void>;
|
|
14
|
-
saveStateAndWorkflowBatch(writes: any): Promise<void>;
|
|
15
|
-
waitForTrackedShutdownWork(): Promise<boolean>;
|
|
16
|
-
waitForTrackedShutdownWorkUnbounded(): Promise<void>;
|
|
17
10
|
keepAwake(promise: Promise<any>): void;
|
|
11
|
+
saveState(payload: any): Promise<void>;
|
|
18
12
|
waitUntil(promise: Promise<any>): void;
|
|
19
13
|
abortSignal(): any;
|
|
14
|
+
connectConn(params: Uint8Array, request: any): Promise<ConnHandle>;
|
|
20
15
|
requestSave(opts: any): void;
|
|
21
16
|
registerTask(promise: Promise<any>): void;
|
|
22
17
|
runtimeState(): any;
|
|
@@ -26,14 +21,19 @@ export class ActorContext {
|
|
|
26
21
|
endOnStateChange(): void;
|
|
27
22
|
restartRunHandler(): void;
|
|
28
23
|
beginOnStateChange(): void;
|
|
24
|
+
requestSaveAndWait(opts: any): Promise<void>;
|
|
25
|
+
verifyInspectorAuth(bearer_token?: string | null): Promise<void>;
|
|
29
26
|
endWebsocketCallback(region_id: number): void;
|
|
30
27
|
beginWebsocketCallback(): number;
|
|
31
28
|
dirtyHibernatableConns(): Array<any>;
|
|
29
|
+
saveStateAndWorkflowBatch(writes: any): Promise<void>;
|
|
32
30
|
kv(): Kv;
|
|
31
|
+
waitForTrackedShutdownWork(): Promise<boolean>;
|
|
33
32
|
takePendingHibernationChanges(): Array<any>;
|
|
34
33
|
key(): any;
|
|
35
34
|
constructor();
|
|
36
35
|
sql(): SqliteDb;
|
|
36
|
+
waitForTrackedShutdownWorkUnbounded(): Promise<void>;
|
|
37
37
|
name(): string;
|
|
38
38
|
conns(): Array<any>;
|
|
39
39
|
queue(): Queue;
|
|
@@ -71,10 +71,10 @@ export class ConnHandle {
|
|
|
71
71
|
export class CoreRegistry {
|
|
72
72
|
free(): void;
|
|
73
73
|
handleServerlessRequest(req: any, on_stream_event: Function, cancel_token: CancellationToken, config: any): Promise<any>;
|
|
74
|
-
serve(config: any): Promise<void>;
|
|
75
|
-
shutdown(): Promise<void>;
|
|
76
74
|
constructor();
|
|
75
|
+
serve(config: any): Promise<void>;
|
|
77
76
|
register(name: string, factory: ActorFactory): void;
|
|
77
|
+
shutdown(): Promise<void>;
|
|
78
78
|
}
|
|
79
79
|
export class Kv {
|
|
80
80
|
private constructor();
|
|
@@ -93,24 +93,24 @@ export class Queue {
|
|
|
93
93
|
private constructor();
|
|
94
94
|
free(): void;
|
|
95
95
|
nextBatch(options: any, signal?: CancellationToken | null): Promise<Array<any>>;
|
|
96
|
+
tryNextBatch(options: any): Array<any>;
|
|
96
97
|
waitForNames(names: any, options: any, signal?: CancellationToken | null): Promise<QueueMessage>;
|
|
97
98
|
enqueueAndWait(name: string, body: Uint8Array, options: any, signal?: CancellationToken | null): Promise<Uint8Array | undefined>;
|
|
98
99
|
inspectMessages(): Promise<Array<any>>;
|
|
99
100
|
waitForNamesAvailable(names: any, options: any): Promise<void>;
|
|
100
101
|
send(name: string, body: Uint8Array): Promise<QueueMessage>;
|
|
101
102
|
reset(): Promise<void>;
|
|
102
|
-
tryNextBatch(options: any): Array<any>;
|
|
103
103
|
maxSize(): number;
|
|
104
104
|
}
|
|
105
105
|
export class QueueMessage {
|
|
106
106
|
private constructor();
|
|
107
107
|
free(): void;
|
|
108
|
-
complete(response: any): Promise<void>;
|
|
109
108
|
createdAt(): number;
|
|
110
109
|
isCompletable(): boolean;
|
|
111
110
|
id(): bigint;
|
|
112
111
|
body(): Uint8Array;
|
|
113
112
|
name(): string;
|
|
113
|
+
complete(response: any): Promise<void>;
|
|
114
114
|
}
|
|
115
115
|
export class Schedule {
|
|
116
116
|
private constructor();
|
|
@@ -149,9 +149,9 @@ export class SqliteTransaction {
|
|
|
149
149
|
export class WebSocketHandle {
|
|
150
150
|
private constructor();
|
|
151
151
|
free(): void;
|
|
152
|
-
close(code?: number | null, reason?: string | null): Promise<void>;
|
|
153
152
|
setEventCallback(callback: Function): void;
|
|
154
153
|
send(data: Uint8Array, binary: boolean): void;
|
|
154
|
+
close(code?: number | null, reason?: string | null): Promise<void>;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -287,9 +287,9 @@ export interface InitOutput {
|
|
|
287
287
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
288
288
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
289
289
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
290
|
-
readonly
|
|
291
|
-
readonly
|
|
292
|
-
readonly
|
|
290
|
+
readonly closure1925_externref_shim: (a: number, b: number, c: any) => void;
|
|
291
|
+
readonly closure2298_externref_shim: (a: number, b: number, c: any) => void;
|
|
292
|
+
readonly closure2531_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
293
293
|
readonly __wbindgen_start: () => void;
|
|
294
294
|
}
|
|
295
295
|
|
package/pkg/rivetkit_wasm.js
CHANGED
|
@@ -203,10 +203,24 @@ 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;
|
|
208
211
|
}
|
|
209
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
|
+
}
|
|
210
224
|
/**
|
|
211
225
|
* @returns {string}
|
|
212
226
|
*/
|
|
@@ -223,12 +237,6 @@ export function bridgeRivetErrorPrefix() {
|
|
|
223
237
|
}
|
|
224
238
|
}
|
|
225
239
|
|
|
226
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
227
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
228
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
229
|
-
WASM_VECTOR_LEN = arg.length;
|
|
230
|
-
return ptr;
|
|
231
|
-
}
|
|
232
240
|
/**
|
|
233
241
|
* @param {Uint8Array} bytes
|
|
234
242
|
* @returns {Uint8Array}
|
|
@@ -242,15 +250,8 @@ export function roundTripBytes(bytes) {
|
|
|
242
250
|
return v2;
|
|
243
251
|
}
|
|
244
252
|
|
|
245
|
-
|
|
246
|
-
|
|
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;
|
|
253
|
+
export function start() {
|
|
254
|
+
wasm.start();
|
|
254
255
|
}
|
|
255
256
|
|
|
256
257
|
/**
|
|
@@ -262,27 +263,27 @@ export function awaitPromise(promise) {
|
|
|
262
263
|
return ret;
|
|
263
264
|
}
|
|
264
265
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
266
|
+
/**
|
|
267
|
+
* @param {Uint8Array} bytes
|
|
268
|
+
* @returns {Uint8Array}
|
|
269
|
+
*/
|
|
270
|
+
export function uint8ArrayFromBytes(bytes) {
|
|
271
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
272
|
+
const len0 = WASM_VECTOR_LEN;
|
|
273
|
+
const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
|
|
274
|
+
return ret;
|
|
269
275
|
}
|
|
270
276
|
|
|
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.closure1925_externref_shim(arg0, arg1, arg2);
|
|
278
279
|
}
|
|
279
280
|
|
|
280
281
|
function __wbg_adapter_59(arg0, arg1, arg2) {
|
|
281
|
-
wasm.
|
|
282
|
+
wasm.closure2298_externref_shim(arg0, arg1, arg2);
|
|
282
283
|
}
|
|
283
284
|
|
|
284
|
-
function
|
|
285
|
-
wasm.
|
|
285
|
+
function __wbg_adapter_261(arg0, arg1, arg2, arg3) {
|
|
286
|
+
wasm.closure2531_externref_shim(arg0, arg1, arg2, arg3);
|
|
286
287
|
}
|
|
287
288
|
|
|
288
289
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
@@ -313,70 +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 {any} opts
|
|
336
|
-
* @returns {Promise<void>}
|
|
337
|
-
*/
|
|
338
|
-
requestSaveAndWait(opts) {
|
|
339
|
-
const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
|
|
340
|
-
return ret;
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* @param {string | null} [bearer_token]
|
|
344
|
-
* @returns {Promise<void>}
|
|
345
|
-
*/
|
|
346
|
-
verifyInspectorAuth(bearer_token) {
|
|
347
|
-
var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
348
|
-
var len0 = WASM_VECTOR_LEN;
|
|
349
|
-
const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
|
|
350
|
-
return ret;
|
|
351
|
-
}
|
|
352
|
-
/**
|
|
353
|
-
* @param {any} writes
|
|
354
|
-
* @returns {Promise<void>}
|
|
355
|
-
*/
|
|
356
|
-
saveStateAndWorkflowBatch(writes) {
|
|
357
|
-
const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
|
|
358
|
-
return ret;
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* @returns {Promise<boolean>}
|
|
317
|
+
* @param {Promise<any>} promise
|
|
362
318
|
*/
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
return ret;
|
|
319
|
+
keepAwake(promise) {
|
|
320
|
+
wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
|
|
366
321
|
}
|
|
367
322
|
/**
|
|
323
|
+
* @param {any} payload
|
|
368
324
|
* @returns {Promise<void>}
|
|
369
325
|
*/
|
|
370
|
-
|
|
371
|
-
const ret = wasm.
|
|
326
|
+
saveState(payload) {
|
|
327
|
+
const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
|
|
372
328
|
return ret;
|
|
373
329
|
}
|
|
374
|
-
/**
|
|
375
|
-
* @param {Promise<any>} promise
|
|
376
|
-
*/
|
|
377
|
-
keepAwake(promise) {
|
|
378
|
-
wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
|
|
379
|
-
}
|
|
380
330
|
/**
|
|
381
331
|
* @param {Promise<any>} promise
|
|
382
332
|
*/
|
|
@@ -393,6 +343,17 @@ export class ActorContext {
|
|
|
393
343
|
}
|
|
394
344
|
return takeFromExternrefTable0(ret[0]);
|
|
395
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
|
+
}
|
|
396
357
|
/**
|
|
397
358
|
* @param {any} opts
|
|
398
359
|
*/
|
|
@@ -444,6 +405,24 @@ export class ActorContext {
|
|
|
444
405
|
beginOnStateChange() {
|
|
445
406
|
wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
|
|
446
407
|
}
|
|
408
|
+
/**
|
|
409
|
+
* @param {any} opts
|
|
410
|
+
* @returns {Promise<void>}
|
|
411
|
+
*/
|
|
412
|
+
requestSaveAndWait(opts) {
|
|
413
|
+
const ret = wasm.actorcontext_requestSaveAndWait(this.__wbg_ptr, opts);
|
|
414
|
+
return ret;
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* @param {string | null} [bearer_token]
|
|
418
|
+
* @returns {Promise<void>}
|
|
419
|
+
*/
|
|
420
|
+
verifyInspectorAuth(bearer_token) {
|
|
421
|
+
var ptr0 = isLikeNone(bearer_token) ? 0 : passStringToWasm0(bearer_token, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
422
|
+
var len0 = WASM_VECTOR_LEN;
|
|
423
|
+
const ret = wasm.actorcontext_verifyInspectorAuth(this.__wbg_ptr, ptr0, len0);
|
|
424
|
+
return ret;
|
|
425
|
+
}
|
|
447
426
|
/**
|
|
448
427
|
* @param {number} region_id
|
|
449
428
|
*/
|
|
@@ -464,6 +443,14 @@ export class ActorContext {
|
|
|
464
443
|
const ret = wasm.actorcontext_dirtyHibernatableConns(this.__wbg_ptr);
|
|
465
444
|
return ret;
|
|
466
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* @param {any} writes
|
|
448
|
+
* @returns {Promise<void>}
|
|
449
|
+
*/
|
|
450
|
+
saveStateAndWorkflowBatch(writes) {
|
|
451
|
+
const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
|
|
452
|
+
return ret;
|
|
453
|
+
}
|
|
467
454
|
/**
|
|
468
455
|
* @returns {Kv}
|
|
469
456
|
*/
|
|
@@ -471,6 +458,13 @@ export class ActorContext {
|
|
|
471
458
|
const ret = wasm.actorcontext_kv(this.__wbg_ptr);
|
|
472
459
|
return Kv.__wrap(ret);
|
|
473
460
|
}
|
|
461
|
+
/**
|
|
462
|
+
* @returns {Promise<boolean>}
|
|
463
|
+
*/
|
|
464
|
+
waitForTrackedShutdownWork() {
|
|
465
|
+
const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
|
|
466
|
+
return ret;
|
|
467
|
+
}
|
|
474
468
|
/**
|
|
475
469
|
* @returns {Array<any>}
|
|
476
470
|
*/
|
|
@@ -504,6 +498,13 @@ export class ActorContext {
|
|
|
504
498
|
const ret = wasm.actorcontext_sql(this.__wbg_ptr);
|
|
505
499
|
return SqliteDb.__wrap(ret);
|
|
506
500
|
}
|
|
501
|
+
/**
|
|
502
|
+
* @returns {Promise<void>}
|
|
503
|
+
*/
|
|
504
|
+
waitForTrackedShutdownWorkUnbounded() {
|
|
505
|
+
const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
|
|
506
|
+
return ret;
|
|
507
|
+
}
|
|
507
508
|
/**
|
|
508
509
|
* @returns {string}
|
|
509
510
|
*/
|
|
@@ -651,14 +652,6 @@ const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefine
|
|
|
651
652
|
|
|
652
653
|
export class CancellationToken {
|
|
653
654
|
|
|
654
|
-
static __wrap(ptr) {
|
|
655
|
-
ptr = ptr >>> 0;
|
|
656
|
-
const obj = Object.create(CancellationToken.prototype);
|
|
657
|
-
obj.__wbg_ptr = ptr;
|
|
658
|
-
CancellationTokenFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
659
|
-
return obj;
|
|
660
|
-
}
|
|
661
|
-
|
|
662
655
|
__destroy_into_raw() {
|
|
663
656
|
const ptr = this.__wbg_ptr;
|
|
664
657
|
this.__wbg_ptr = 0;
|
|
@@ -819,6 +812,12 @@ export class CoreRegistry {
|
|
|
819
812
|
const ret = wasm.coreregistry_handleServerlessRequest(this.__wbg_ptr, req, on_stream_event, cancel_token.__wbg_ptr, config);
|
|
820
813
|
return ret;
|
|
821
814
|
}
|
|
815
|
+
constructor() {
|
|
816
|
+
const ret = wasm.coreregistry_new();
|
|
817
|
+
this.__wbg_ptr = ret >>> 0;
|
|
818
|
+
CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
|
|
819
|
+
return this;
|
|
820
|
+
}
|
|
822
821
|
/**
|
|
823
822
|
* @param {any} config
|
|
824
823
|
* @returns {Promise<void>}
|
|
@@ -827,19 +826,6 @@ export class CoreRegistry {
|
|
|
827
826
|
const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
|
|
828
827
|
return ret;
|
|
829
828
|
}
|
|
830
|
-
/**
|
|
831
|
-
* @returns {Promise<void>}
|
|
832
|
-
*/
|
|
833
|
-
shutdown() {
|
|
834
|
-
const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
|
|
835
|
-
return ret;
|
|
836
|
-
}
|
|
837
|
-
constructor() {
|
|
838
|
-
const ret = wasm.coreregistry_new();
|
|
839
|
-
this.__wbg_ptr = ret >>> 0;
|
|
840
|
-
CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
|
|
841
|
-
return this;
|
|
842
|
-
}
|
|
843
829
|
/**
|
|
844
830
|
* @param {string} name
|
|
845
831
|
* @param {ActorFactory} factory
|
|
@@ -853,6 +839,13 @@ export class CoreRegistry {
|
|
|
853
839
|
throw takeFromExternrefTable0(ret[0]);
|
|
854
840
|
}
|
|
855
841
|
}
|
|
842
|
+
/**
|
|
843
|
+
* @returns {Promise<void>}
|
|
844
|
+
*/
|
|
845
|
+
shutdown() {
|
|
846
|
+
const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
|
|
847
|
+
return ret;
|
|
848
|
+
}
|
|
856
849
|
}
|
|
857
850
|
|
|
858
851
|
const KvFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1016,6 +1009,17 @@ export class Queue {
|
|
|
1016
1009
|
const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
|
|
1017
1010
|
return ret;
|
|
1018
1011
|
}
|
|
1012
|
+
/**
|
|
1013
|
+
* @param {any} options
|
|
1014
|
+
* @returns {Array<any>}
|
|
1015
|
+
*/
|
|
1016
|
+
tryNextBatch(options) {
|
|
1017
|
+
const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
|
|
1018
|
+
if (ret[2]) {
|
|
1019
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1020
|
+
}
|
|
1021
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1022
|
+
}
|
|
1019
1023
|
/**
|
|
1020
1024
|
* @param {any} names
|
|
1021
1025
|
* @param {any} options
|
|
@@ -1087,17 +1091,6 @@ export class Queue {
|
|
|
1087
1091
|
const ret = wasm.queue_reset(this.__wbg_ptr);
|
|
1088
1092
|
return ret;
|
|
1089
1093
|
}
|
|
1090
|
-
/**
|
|
1091
|
-
* @param {any} options
|
|
1092
|
-
* @returns {Array<any>}
|
|
1093
|
-
*/
|
|
1094
|
-
tryNextBatch(options) {
|
|
1095
|
-
const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
|
|
1096
|
-
if (ret[2]) {
|
|
1097
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1098
|
-
}
|
|
1099
|
-
return takeFromExternrefTable0(ret[0]);
|
|
1100
|
-
}
|
|
1101
1094
|
/**
|
|
1102
1095
|
* @returns {number}
|
|
1103
1096
|
*/
|
|
@@ -1132,14 +1125,6 @@ export class QueueMessage {
|
|
|
1132
1125
|
const ptr = this.__destroy_into_raw();
|
|
1133
1126
|
wasm.__wbg_queuemessage_free(ptr, 0);
|
|
1134
1127
|
}
|
|
1135
|
-
/**
|
|
1136
|
-
* @param {any} response
|
|
1137
|
-
* @returns {Promise<void>}
|
|
1138
|
-
*/
|
|
1139
|
-
complete(response) {
|
|
1140
|
-
const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
|
|
1141
|
-
return ret;
|
|
1142
|
-
}
|
|
1143
1128
|
/**
|
|
1144
1129
|
* @returns {number}
|
|
1145
1130
|
*/
|
|
@@ -1185,6 +1170,14 @@ export class QueueMessage {
|
|
|
1185
1170
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1186
1171
|
}
|
|
1187
1172
|
}
|
|
1173
|
+
/**
|
|
1174
|
+
* @param {any} response
|
|
1175
|
+
* @returns {Promise<void>}
|
|
1176
|
+
*/
|
|
1177
|
+
complete(response) {
|
|
1178
|
+
const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
|
|
1179
|
+
return ret;
|
|
1180
|
+
}
|
|
1188
1181
|
}
|
|
1189
1182
|
|
|
1190
1183
|
const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1528,17 +1521,6 @@ export class WebSocketHandle {
|
|
|
1528
1521
|
const ptr = this.__destroy_into_raw();
|
|
1529
1522
|
wasm.__wbg_websockethandle_free(ptr, 0);
|
|
1530
1523
|
}
|
|
1531
|
-
/**
|
|
1532
|
-
* @param {number | null} [code]
|
|
1533
|
-
* @param {string | null} [reason]
|
|
1534
|
-
* @returns {Promise<void>}
|
|
1535
|
-
*/
|
|
1536
|
-
close(code, reason) {
|
|
1537
|
-
var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1538
|
-
var len0 = WASM_VECTOR_LEN;
|
|
1539
|
-
const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
|
|
1540
|
-
return ret;
|
|
1541
|
-
}
|
|
1542
1524
|
/**
|
|
1543
1525
|
* @param {Function} callback
|
|
1544
1526
|
*/
|
|
@@ -1557,6 +1539,17 @@ export class WebSocketHandle {
|
|
|
1557
1539
|
throw takeFromExternrefTable0(ret[0]);
|
|
1558
1540
|
}
|
|
1559
1541
|
}
|
|
1542
|
+
/**
|
|
1543
|
+
* @param {number | null} [code]
|
|
1544
|
+
* @param {string | null} [reason]
|
|
1545
|
+
* @returns {Promise<void>}
|
|
1546
|
+
*/
|
|
1547
|
+
close(code, reason) {
|
|
1548
|
+
var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1549
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1550
|
+
const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
|
|
1551
|
+
return ret;
|
|
1552
|
+
}
|
|
1560
1553
|
}
|
|
1561
1554
|
|
|
1562
1555
|
async function __wbg_load(module, imports) {
|
|
@@ -1624,10 +1617,6 @@ function __wbg_get_imports() {
|
|
|
1624
1617
|
const ret = arg0.call(arg1, arg2, arg3);
|
|
1625
1618
|
return ret;
|
|
1626
1619
|
}, arguments) };
|
|
1627
|
-
imports.wbg.__wbg_cancellationtoken_new = function(arg0) {
|
|
1628
|
-
const ret = CancellationToken.__wrap(arg0);
|
|
1629
|
-
return ret;
|
|
1630
|
-
};
|
|
1631
1620
|
imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
|
|
1632
1621
|
arg0.close();
|
|
1633
1622
|
}, arguments) };
|
|
@@ -1783,7 +1772,7 @@ function __wbg_get_imports() {
|
|
|
1783
1772
|
const a = state0.a;
|
|
1784
1773
|
state0.a = 0;
|
|
1785
1774
|
try {
|
|
1786
|
-
return
|
|
1775
|
+
return __wbg_adapter_261(a, state0.b, arg0, arg1);
|
|
1787
1776
|
} finally {
|
|
1788
1777
|
state0.a = a;
|
|
1789
1778
|
}
|
|
@@ -2015,24 +2004,24 @@ function __wbg_get_imports() {
|
|
|
2015
2004
|
const ret = false;
|
|
2016
2005
|
return ret;
|
|
2017
2006
|
};
|
|
2018
|
-
imports.wbg.
|
|
2019
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2007
|
+
imports.wbg.__wbindgen_closure_wrapper4460 = function(arg0, arg1, arg2) {
|
|
2008
|
+
const ret = makeMutClosure(arg0, arg1, 1926, __wbg_adapter_50);
|
|
2020
2009
|
return ret;
|
|
2021
2010
|
};
|
|
2022
|
-
imports.wbg.
|
|
2023
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2011
|
+
imports.wbg.__wbindgen_closure_wrapper4462 = function(arg0, arg1, arg2) {
|
|
2012
|
+
const ret = makeMutClosure(arg0, arg1, 1926, __wbg_adapter_50);
|
|
2024
2013
|
return ret;
|
|
2025
2014
|
};
|
|
2026
|
-
imports.wbg.
|
|
2027
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2015
|
+
imports.wbg.__wbindgen_closure_wrapper4464 = function(arg0, arg1, arg2) {
|
|
2016
|
+
const ret = makeMutClosure(arg0, arg1, 1926, __wbg_adapter_50);
|
|
2028
2017
|
return ret;
|
|
2029
2018
|
};
|
|
2030
|
-
imports.wbg.
|
|
2031
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2019
|
+
imports.wbg.__wbindgen_closure_wrapper4466 = function(arg0, arg1, arg2) {
|
|
2020
|
+
const ret = makeMutClosure(arg0, arg1, 1926, __wbg_adapter_50);
|
|
2032
2021
|
return ret;
|
|
2033
2022
|
};
|
|
2034
|
-
imports.wbg.
|
|
2035
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2023
|
+
imports.wbg.__wbindgen_closure_wrapper5337 = function(arg0, arg1, arg2) {
|
|
2024
|
+
const ret = makeMutClosure(arg0, arg1, 2299, __wbg_adapter_59);
|
|
2036
2025
|
return ret;
|
|
2037
2026
|
};
|
|
2038
2027
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|
|
@@ -130,7 +130,7 @@ export const __wbindgen_export_4: WebAssembly.Table;
|
|
|
130
130
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
131
131
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
132
132
|
export const __externref_table_dealloc: (a: number) => void;
|
|
133
|
-
export const
|
|
134
|
-
export const
|
|
135
|
-
export const
|
|
133
|
+
export const closure1925_externref_shim: (a: number, b: number, c: any) => void;
|
|
134
|
+
export const closure2298_externref_shim: (a: number, b: number, c: any) => void;
|
|
135
|
+
export const closure2531_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
136
136
|
export const __wbindgen_start: () => void;
|
package/pkg/package.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "rivetkit-wasm",
|
|
3
|
-
"type": "module",
|
|
4
|
-
"collaborators": [
|
|
5
|
-
"Rivet Gaming, LLC <developer@rivet.dev>"
|
|
6
|
-
],
|
|
7
|
-
"version": "2.3.7",
|
|
8
|
-
"license": "Apache-2.0",
|
|
9
|
-
"files": [
|
|
10
|
-
"rivetkit_wasm_bg.wasm",
|
|
11
|
-
"rivetkit_wasm.js",
|
|
12
|
-
"rivetkit_wasm.d.ts"
|
|
13
|
-
],
|
|
14
|
-
"main": "rivetkit_wasm.js",
|
|
15
|
-
"types": "rivetkit_wasm.d.ts",
|
|
16
|
-
"sideEffects": [
|
|
17
|
-
"./snippets/*"
|
|
18
|
-
]
|
|
19
|
-
}
|