@rivetkit/rivetkit-wasm 0.0.0-main.337772d → 0.0.0-main.4994268

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 CHANGED
@@ -1,2 +1,212 @@
1
- export * from "./pkg/rivetkit_wasm.js";
2
- export { default } from "./pkg/rivetkit_wasm.js";
1
+ export function start(): void;
2
+ export function awaitPromise(promise: Promise<any>): Promise<any>;
3
+ export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
4
+ export function bridgeRivetErrorPrefix(): string;
5
+ export function roundTripBytes(bytes: Uint8Array): Uint8Array;
6
+
7
+ export class ActorContext {
8
+ free(): void;
9
+ keepAwake(promise: Promise<any>): void;
10
+ saveState(payload: any): Promise<void>;
11
+ saveStateAndWorkflowBatch(
12
+ writes: Array<{ key: Uint8Array; value: Uint8Array }>,
13
+ ): Promise<void>;
14
+ waitUntil(promise: Promise<any>): void;
15
+ abortSignal(): any;
16
+ connectConn(params: Uint8Array, request: any): Promise<ConnHandle>;
17
+ requestSave(opts: any): void;
18
+ registerTask(promise: Promise<any>): void;
19
+ runtimeState(): any;
20
+ endKeepAwake(region_id: number): void;
21
+ beginKeepAwake(): number;
22
+ inspectorSnapshot(): object;
23
+ endOnStateChange(): void;
24
+ restartRunHandler(): void;
25
+ beginOnStateChange(): void;
26
+ requestSaveAndWait(opts: any): Promise<void>;
27
+ verifyInspectorAuth(bearer_token?: string | null): Promise<void>;
28
+ endWebsocketCallback(region_id: number): void;
29
+ beginWebsocketCallback(): number;
30
+ dirtyHibernatableConns(): Array<any>;
31
+ kv(): Kv;
32
+ waitForTrackedShutdownWork(): Promise<boolean>;
33
+ takePendingHibernationChanges(): Array<any>;
34
+ key(): any;
35
+ constructor();
36
+ sql(): SqliteDb;
37
+ name(): string;
38
+ conns(): Array<any>;
39
+ queue(): Queue;
40
+ sleep(): void;
41
+ state(): Uint8Array;
42
+ region(): string;
43
+ destroy(): void;
44
+ actorId(): string;
45
+ schedule(): Schedule;
46
+ broadcast(name: string, args: Uint8Array): void;
47
+ setAlarm(timestamp_ms?: number | null): void;
48
+ }
49
+
50
+ export class ActorFactory {
51
+ free(): void;
52
+ constructor(callbacks: any, config: any);
53
+ }
54
+
55
+ export class CancellationToken {
56
+ free(): void;
57
+ onCancelled(callback: Function): void;
58
+ constructor();
59
+ cancel(): void;
60
+ aborted(): boolean;
61
+ }
62
+
63
+ export class ConnHandle {
64
+ private constructor();
65
+ free(): void;
66
+ disconnect(reason?: string | null): Promise<void>;
67
+ isHibernatable(): boolean;
68
+ id(): string;
69
+ send(name: string, args: Uint8Array): void;
70
+ state(): Uint8Array;
71
+ params(): Uint8Array;
72
+ setState(state: Uint8Array): void;
73
+ }
74
+
75
+ export class CoreRegistry {
76
+ free(): void;
77
+ handleServerlessRequest(
78
+ req: any,
79
+ on_stream_event: Function,
80
+ cancel_token: CancellationToken,
81
+ config: any,
82
+ ): Promise<any>;
83
+ constructor();
84
+ serve(config: any): Promise<void>;
85
+ register(name: string, factory: ActorFactory): void;
86
+ shutdown(): Promise<void>;
87
+ }
88
+
89
+ export class Kv {
90
+ private constructor();
91
+ free(): void;
92
+ delete(key: Uint8Array): Promise<void>;
93
+ listRange(start: Uint8Array, end: Uint8Array, options: any): Promise<any>;
94
+ listPrefix(prefix: Uint8Array, options: any): Promise<any>;
95
+ batchDelete(keys: Array<any>): Promise<void>;
96
+ deleteRange(start: Uint8Array, end: Uint8Array): Promise<void>;
97
+ get(key: Uint8Array): Promise<any>;
98
+ put(key: Uint8Array, value: Uint8Array): Promise<void>;
99
+ batchGet(keys: Array<any>): Promise<any>;
100
+ batchPut(entries: Array<any>): Promise<void>;
101
+ }
102
+
103
+ export class Queue {
104
+ private constructor();
105
+ free(): void;
106
+ nextBatch(
107
+ options: any,
108
+ signal?: CancellationToken | null,
109
+ ): Promise<Array<any>>;
110
+ tryNextBatch(options: any): Array<any>;
111
+ waitForNames(
112
+ names: any,
113
+ options: any,
114
+ signal?: CancellationToken | null,
115
+ ): Promise<QueueMessage>;
116
+ enqueueAndWait(
117
+ name: string,
118
+ body: Uint8Array,
119
+ options: any,
120
+ signal?: CancellationToken | null,
121
+ ): Promise<Uint8Array | undefined>;
122
+ inspectMessages(): Promise<Array<any>>;
123
+ waitForNamesAvailable(names: any, options: any): Promise<void>;
124
+ send(name: string, body: Uint8Array): Promise<QueueMessage>;
125
+ maxSize(): number;
126
+ reset(): Promise<void>;
127
+ }
128
+
129
+ export class QueueMessage {
130
+ private constructor();
131
+ free(): void;
132
+ createdAt(): number;
133
+ isCompletable(): boolean;
134
+ id(): bigint;
135
+ body(): Uint8Array;
136
+ name(): string;
137
+ complete(response: any): Promise<void>;
138
+ }
139
+
140
+ export class Schedule {
141
+ private constructor();
142
+ free(): void;
143
+ after(duration_ms: number, action_name: string, args: Uint8Array): Promise<string>;
144
+ at(timestamp_ms: number, action_name: string, args: Uint8Array): Promise<string>;
145
+ cancel(id: string): Promise<boolean>;
146
+ get(id: string): Promise<any>;
147
+ list(): Promise<any>;
148
+ cronSet(
149
+ name: string,
150
+ expression: string,
151
+ timezone: string | null | undefined,
152
+ action_name: string,
153
+ args: Uint8Array,
154
+ max_history?: number | null,
155
+ ): Promise<void>;
156
+ cronEvery(
157
+ name: string,
158
+ interval_ms: number,
159
+ action_name: string,
160
+ args: Uint8Array,
161
+ max_history?: number | null,
162
+ ): Promise<void>;
163
+ cronGet(name: string): Promise<any>;
164
+ cronList(): Promise<any>;
165
+ cronDelete(name: string): Promise<boolean>;
166
+ cronHistory(name: string, limit?: number | null): Promise<any>;
167
+ }
168
+
169
+ export class SqliteDb {
170
+ private constructor();
171
+ free(): void;
172
+ run(sql: string, params: any): Promise<any>;
173
+ exec(sql: string): Promise<any>;
174
+ close(): Promise<void>;
175
+ query(sql: string, params: any): Promise<any>;
176
+ execute(sql: string, params: any): Promise<any>;
177
+ executeBatch(statements: Array<any>): Promise<Array<any>>;
178
+ beginTransaction(timeout_ms?: number | null): Promise<SqliteTransaction>;
179
+ }
180
+
181
+ export class SqliteTransaction {
182
+ private constructor();
183
+ free(): void;
184
+ exec(sql: string): Promise<any>;
185
+ execute(sql: string, params: any): Promise<any>;
186
+ commit(): Promise<void>;
187
+ rollback(): Promise<void>;
188
+ }
189
+
190
+ export class WebSocketHandle {
191
+ private constructor();
192
+ free(): void;
193
+ setEventCallback(callback: Function): void;
194
+ send(data: Uint8Array, binary: boolean): void;
195
+ close(code?: number | null, reason?: string | null): Promise<void>;
196
+ }
197
+
198
+ export type InitInput =
199
+ | RequestInfo
200
+ | URL
201
+ | Response
202
+ | BufferSource
203
+ | WebAssembly.Module;
204
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
205
+ export interface InitOutput {
206
+ readonly memory: WebAssembly.Memory;
207
+ }
208
+
209
+ declare function init(
210
+ module_or_path?: InitInput | Promise<InitInput>,
211
+ ): Promise<InitOutput>;
212
+ export default init;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/rivetkit-wasm",
3
- "version": "0.0.0-main.337772d",
3
+ "version": "0.0.0-main.4994268",
4
4
  "description": "WebAssembly bindings for RivetKit core on edge JavaScript runtimes",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -28,6 +28,7 @@
28
28
  ],
29
29
  "scripts": {
30
30
  "build": "node scripts/build.mjs",
31
+ "build:embed": "node scripts/build.mjs",
31
32
  "build:cloudflare": "node scripts/build.mjs --target bundler --out-dir pkg-cloudflare",
32
33
  "build:deno": "node scripts/build.mjs --target web --out-dir pkg-deno",
33
34
  "check:package": "node scripts/check-package.mjs",
@@ -37,6 +38,6 @@
37
38
  },
38
39
  "devDependencies": {
39
40
  "typescript": "^5.9.2",
40
- "wasm-pack": "0.14.0"
41
+ "wasm-pack": "0.15.0"
41
42
  }
42
43
  }
@@ -0,0 +1,19 @@
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
+ }
@@ -1,17 +1,22 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function awaitPromise(promise: Promise<any>): Promise<any>;
4
- export function roundTripBytes(bytes: Uint8Array): Uint8Array;
5
3
  export function start(): void;
6
- export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
7
4
  export function bridgeRivetErrorPrefix(): string;
5
+ export function roundTripBytes(bytes: Uint8Array): Uint8Array;
6
+ export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
7
+ export function awaitPromise(promise: Promise<any>): Promise<any>;
8
8
  export class ActorContext {
9
9
  free(): void;
10
- keepAwake(promise: Promise<any>): void;
11
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
+ keepAwake(promise: Promise<any>): void;
12
18
  waitUntil(promise: Promise<any>): void;
13
19
  abortSignal(): any;
14
- connectConn(params: Uint8Array, request: any): Promise<ConnHandle>;
15
20
  requestSave(opts: any): void;
16
21
  registerTask(promise: Promise<any>): void;
17
22
  runtimeState(): any;
@@ -21,8 +26,6 @@ export class ActorContext {
21
26
  endOnStateChange(): void;
22
27
  restartRunHandler(): void;
23
28
  beginOnStateChange(): void;
24
- requestSaveAndWait(opts: any): Promise<void>;
25
- verifyInspectorAuth(bearer_token?: string | null): Promise<void>;
26
29
  endWebsocketCallback(region_id: number): void;
27
30
  beginWebsocketCallback(): number;
28
31
  dirtyHibernatableConns(): Array<any>;
@@ -68,10 +71,10 @@ export class ConnHandle {
68
71
  export class CoreRegistry {
69
72
  free(): void;
70
73
  handleServerlessRequest(req: any, on_stream_event: Function, cancel_token: CancellationToken, config: any): Promise<any>;
71
- constructor();
72
74
  serve(config: any): Promise<void>;
73
- register(name: string, factory: ActorFactory): void;
74
75
  shutdown(): Promise<void>;
76
+ constructor();
77
+ register(name: string, factory: ActorFactory): void;
75
78
  }
76
79
  export class Kv {
77
80
  private constructor();
@@ -90,45 +93,65 @@ export class Queue {
90
93
  private constructor();
91
94
  free(): void;
92
95
  nextBatch(options: any, signal?: CancellationToken | null): Promise<Array<any>>;
93
- tryNextBatch(options: any): Array<any>;
94
96
  waitForNames(names: any, options: any, signal?: CancellationToken | null): Promise<QueueMessage>;
95
97
  enqueueAndWait(name: string, body: Uint8Array, options: any, signal?: CancellationToken | null): Promise<Uint8Array | undefined>;
96
98
  inspectMessages(): Promise<Array<any>>;
97
99
  waitForNamesAvailable(names: any, options: any): Promise<void>;
98
100
  send(name: string, body: Uint8Array): Promise<QueueMessage>;
101
+ reset(): Promise<void>;
102
+ tryNextBatch(options: any): Array<any>;
99
103
  maxSize(): number;
100
104
  }
101
105
  export class QueueMessage {
102
106
  private constructor();
103
107
  free(): void;
108
+ complete(response: any): Promise<void>;
104
109
  createdAt(): number;
105
110
  isCompletable(): boolean;
106
111
  id(): bigint;
107
112
  body(): Uint8Array;
108
113
  name(): string;
109
- complete(response: any): Promise<void>;
110
114
  }
111
115
  export class Schedule {
112
116
  private constructor();
113
117
  free(): void;
114
- at(timestamp_ms: number, action_name: string, args: Uint8Array): void;
115
- after(duration_ms: number, action_name: string, args: Uint8Array): void;
118
+ cronEvery(name: string, interval_ms: number, action_name: string, args: Uint8Array, max_history?: number | null): Promise<void>;
119
+ cronDelete(name: string): Promise<boolean>;
120
+ cronHistory(name: string, limit?: number | null): Promise<any>;
121
+ at(timestamp_ms: number, action_name: string, args: Uint8Array): Promise<string>;
122
+ get(id: string): Promise<any>;
123
+ list(): Promise<any>;
124
+ after(duration_ms: number, action_name: string, args: Uint8Array): Promise<string>;
125
+ cancel(id: string): Promise<boolean>;
126
+ cronGet(name: string): Promise<any>;
127
+ cronSet(name: string, expression: string, timezone: string | null | undefined, action_name: string, args: Uint8Array, max_history?: number | null): Promise<void>;
128
+ cronList(): Promise<any>;
116
129
  }
117
130
  export class SqliteDb {
118
131
  private constructor();
119
132
  free(): void;
133
+ executeBatch(statements: any): Promise<any>;
134
+ beginTransaction(timeout_ms?: number | null): Promise<SqliteTransaction>;
120
135
  run(sql: string, params: any): Promise<any>;
121
136
  exec(sql: string): Promise<any>;
122
137
  close(): Promise<void>;
123
138
  query(sql: string, params: any): Promise<any>;
124
139
  execute(sql: string, params: any): Promise<any>;
125
140
  }
141
+ export class SqliteTransaction {
142
+ private constructor();
143
+ free(): void;
144
+ exec(sql: string): Promise<any>;
145
+ commit(): Promise<void>;
146
+ execute(sql: string, params: any): Promise<any>;
147
+ rollback(): Promise<void>;
148
+ }
126
149
  export class WebSocketHandle {
127
150
  private constructor();
128
151
  free(): void;
152
+ close(code?: number | null, reason?: string | null): Promise<void>;
129
153
  setEventCallback(callback: Function): void;
130
154
  send(data: Uint8Array, binary: boolean): void;
131
- close(code?: number | null, reason?: string | null): Promise<void>;
132
155
  }
133
156
 
134
157
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
@@ -143,6 +166,7 @@ export interface InitOutput {
143
166
  readonly __wbg_kv_free: (a: number, b: number) => void;
144
167
  readonly __wbg_queuemessage_free: (a: number, b: number) => void;
145
168
  readonly __wbg_sqlitedb_free: (a: number, b: number) => void;
169
+ readonly __wbg_sqlitetransaction_free: (a: number, b: number) => void;
146
170
  readonly __wbg_websockethandle_free: (a: number, b: number) => void;
147
171
  readonly actorcontext_abortSignal: (a: number) => [number, number, number];
148
172
  readonly actorcontext_actorId: (a: number) => [number, number];
@@ -170,12 +194,15 @@ export interface InitOutput {
170
194
  readonly actorcontext_restartRunHandler: (a: number) => void;
171
195
  readonly actorcontext_runtimeState: (a: number) => any;
172
196
  readonly actorcontext_saveState: (a: number, b: any) => any;
197
+ readonly actorcontext_saveStateAndWorkflowBatch: (a: number, b: any) => any;
173
198
  readonly actorcontext_setAlarm: (a: number, b: number, c: number) => [number, number];
174
199
  readonly actorcontext_sleep: (a: number) => [number, number];
175
200
  readonly actorcontext_sql: (a: number) => number;
176
201
  readonly actorcontext_state: (a: number) => [number, number];
177
202
  readonly actorcontext_takePendingHibernationChanges: (a: number) => any;
178
203
  readonly actorcontext_verifyInspectorAuth: (a: number, b: number, c: number) => any;
204
+ readonly actorcontext_waitForTrackedShutdownWork: (a: number) => any;
205
+ readonly actorcontext_waitForTrackedShutdownWorkUnbounded: (a: number) => any;
179
206
  readonly actorcontext_waitUntil: (a: number, b: any) => void;
180
207
  readonly actorfactory_new: (a: any, b: any) => [number, number, number];
181
208
  readonly awaitPromise: (a: any) => any;
@@ -209,6 +236,7 @@ export interface InitOutput {
209
236
  readonly queue_inspectMessages: (a: number) => any;
210
237
  readonly queue_maxSize: (a: number) => number;
211
238
  readonly queue_nextBatch: (a: number, b: any, c: number) => any;
239
+ readonly queue_reset: (a: number) => any;
212
240
  readonly queue_send: (a: number, b: number, c: number, d: number, e: number) => any;
213
241
  readonly queue_tryNextBatch: (a: number, b: any) => [number, number, number];
214
242
  readonly queue_waitForNames: (a: number, b: any, c: any, d: number) => any;
@@ -220,13 +248,28 @@ export interface InitOutput {
220
248
  readonly queuemessage_isCompletable: (a: number) => number;
221
249
  readonly queuemessage_name: (a: number) => [number, number];
222
250
  readonly roundTripBytes: (a: number, b: number) => [number, number];
223
- readonly schedule_after: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
224
- readonly schedule_at: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
251
+ readonly schedule_after: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
252
+ readonly schedule_at: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
253
+ readonly schedule_cancel: (a: number, b: number, c: number) => any;
254
+ readonly schedule_cronDelete: (a: number, b: number, c: number) => any;
255
+ readonly schedule_cronEvery: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => any;
256
+ readonly schedule_cronGet: (a: number, b: number, c: number) => any;
257
+ readonly schedule_cronHistory: (a: number, b: number, c: number, d: number, e: number) => any;
258
+ readonly schedule_cronList: (a: number) => any;
259
+ readonly schedule_cronSet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => any;
260
+ readonly schedule_get: (a: number, b: number, c: number) => any;
261
+ readonly schedule_list: (a: number) => any;
262
+ readonly sqlitedb_beginTransaction: (a: number, b: number, c: number) => any;
225
263
  readonly sqlitedb_close: (a: number) => any;
226
264
  readonly sqlitedb_exec: (a: number, b: number, c: number) => any;
227
265
  readonly sqlitedb_execute: (a: number, b: number, c: number, d: any) => any;
266
+ readonly sqlitedb_executeBatch: (a: number, b: any) => any;
228
267
  readonly sqlitedb_query: (a: number, b: number, c: number, d: any) => any;
229
268
  readonly sqlitedb_run: (a: number, b: number, c: number, d: any) => any;
269
+ readonly sqlitetransaction_commit: (a: number) => any;
270
+ readonly sqlitetransaction_exec: (a: number, b: number, c: number) => any;
271
+ readonly sqlitetransaction_execute: (a: number, b: number, c: number, d: any) => any;
272
+ readonly sqlitetransaction_rollback: (a: number) => any;
230
273
  readonly uint8ArrayFromBytes: (a: number, b: number) => any;
231
274
  readonly websockethandle_close: (a: number, b: number, c: number, d: number) => any;
232
275
  readonly websockethandle_send: (a: number, b: number, c: number, d: number) => [number, number];
@@ -244,9 +287,9 @@ export interface InitOutput {
244
287
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
245
288
  readonly __wbindgen_export_6: WebAssembly.Table;
246
289
  readonly __externref_table_dealloc: (a: number) => void;
247
- readonly closure1602_externref_shim: (a: number, b: number, c: any) => void;
248
- readonly closure1805_externref_shim: (a: number, b: number, c: any) => void;
249
- readonly closure2018_externref_shim: (a: number, b: number, c: any, d: any) => void;
290
+ readonly closure1960_externref_shim: (a: number, b: number, c: any) => void;
291
+ readonly closure2339_externref_shim: (a: number, b: number, c: any) => void;
292
+ readonly closure2576_externref_shim: (a: number, b: number, c: any, d: any) => void;
250
293
  readonly __wbindgen_start: () => void;
251
294
  }
252
295
 
@@ -203,33 +203,32 @@ function debugString(val) {
203
203
  return className;
204
204
  }
205
205
 
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;
206
+ export function start() {
207
+ wasm.start();
217
208
  }
218
209
 
219
- function _assertClass(instance, klass) {
220
- if (!(instance instanceof klass)) {
221
- throw new Error(`expected instance of ${klass.name}`);
222
- }
223
- }
224
210
  /**
225
- * @param {Promise<any>} promise
226
- * @returns {Promise<any>}
211
+ * @returns {string}
227
212
  */
228
- export function awaitPromise(promise) {
229
- const ret = wasm.awaitPromise(promise);
230
- return ret;
213
+ export function bridgeRivetErrorPrefix() {
214
+ let deferred1_0;
215
+ let deferred1_1;
216
+ try {
217
+ const ret = wasm.bridgeRivetErrorPrefix();
218
+ deferred1_0 = ret[0];
219
+ deferred1_1 = ret[1];
220
+ return getStringFromWasm0(ret[0], ret[1]);
221
+ } finally {
222
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
223
+ }
231
224
  }
232
225
 
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
+ }
233
232
  /**
234
233
  * @param {Uint8Array} bytes
235
234
  * @returns {Uint8Array}
@@ -243,10 +242,6 @@ export function roundTripBytes(bytes) {
243
242
  return v2;
244
243
  }
245
244
 
246
- export function start() {
247
- wasm.start();
248
- }
249
-
250
245
  /**
251
246
  * @param {Uint8Array} bytes
252
247
  * @returns {Uint8Array}
@@ -259,31 +254,35 @@ export function uint8ArrayFromBytes(bytes) {
259
254
  }
260
255
 
261
256
  /**
262
- * @returns {string}
257
+ * @param {Promise<any>} promise
258
+ * @returns {Promise<any>}
263
259
  */
264
- export function bridgeRivetErrorPrefix() {
265
- let deferred1_0;
266
- let deferred1_1;
267
- try {
268
- const ret = wasm.bridgeRivetErrorPrefix();
269
- deferred1_0 = ret[0];
270
- deferred1_1 = ret[1];
271
- return getStringFromWasm0(ret[0], ret[1]);
272
- } finally {
273
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
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}`);
274
268
  }
275
269
  }
276
270
 
277
- function __wbg_adapter_46(arg0, arg1, arg2) {
278
- wasm.closure1602_externref_shim(arg0, arg1, arg2);
271
+ function takeFromExternrefTable0(idx) {
272
+ const value = wasm.__wbindgen_export_4.get(idx);
273
+ wasm.__externref_table_dealloc(idx);
274
+ return value;
275
+ }
276
+ function __wbg_adapter_50(arg0, arg1, arg2) {
277
+ wasm.closure1960_externref_shim(arg0, arg1, arg2);
279
278
  }
280
279
 
281
- function __wbg_adapter_55(arg0, arg1, arg2) {
282
- wasm.closure1805_externref_shim(arg0, arg1, arg2);
280
+ function __wbg_adapter_59(arg0, arg1, arg2) {
281
+ wasm.closure2339_externref_shim(arg0, arg1, arg2);
283
282
  }
284
283
 
285
- function __wbg_adapter_224(arg0, arg1, arg2, arg3) {
286
- wasm.closure2018_externref_shim(arg0, arg1, arg2, arg3);
284
+ function __wbg_adapter_287(arg0, arg1, arg2, arg3) {
285
+ wasm.closure2576_externref_shim(arg0, arg1, arg2, arg3);
287
286
  }
288
287
 
289
288
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -313,12 +312,6 @@ export class ActorContext {
313
312
  const ptr = this.__destroy_into_raw();
314
313
  wasm.__wbg_actorcontext_free(ptr, 0);
315
314
  }
316
- /**
317
- * @param {Promise<any>} promise
318
- */
319
- keepAwake(promise) {
320
- wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
321
- }
322
315
  /**
323
316
  * @param {any} payload
324
317
  * @returns {Promise<void>}
@@ -327,6 +320,63 @@ export class ActorContext {
327
320
  const ret = wasm.actorcontext_saveState(this.__wbg_ptr, payload);
328
321
  return ret;
329
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>}
362
+ */
363
+ waitForTrackedShutdownWork() {
364
+ const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
365
+ return ret;
366
+ }
367
+ /**
368
+ * @returns {Promise<void>}
369
+ */
370
+ waitForTrackedShutdownWorkUnbounded() {
371
+ const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
372
+ return ret;
373
+ }
374
+ /**
375
+ * @param {Promise<any>} promise
376
+ */
377
+ keepAwake(promise) {
378
+ wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
379
+ }
330
380
  /**
331
381
  * @param {Promise<any>} promise
332
382
  */
@@ -343,17 +393,6 @@ export class ActorContext {
343
393
  }
344
394
  return takeFromExternrefTable0(ret[0]);
345
395
  }
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
- }
357
396
  /**
358
397
  * @param {any} opts
359
398
  */
@@ -405,24 +444,6 @@ export class ActorContext {
405
444
  beginOnStateChange() {
406
445
  wasm.actorcontext_beginOnStateChange(this.__wbg_ptr);
407
446
  }
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
- }
426
447
  /**
427
448
  * @param {number} region_id
428
449
  */
@@ -630,6 +651,14 @@ const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefine
630
651
 
631
652
  export class CancellationToken {
632
653
 
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
+
633
662
  __destroy_into_raw() {
634
663
  const ptr = this.__wbg_ptr;
635
664
  this.__wbg_ptr = 0;
@@ -790,12 +819,6 @@ export class CoreRegistry {
790
819
  const ret = wasm.coreregistry_handleServerlessRequest(this.__wbg_ptr, req, on_stream_event, cancel_token.__wbg_ptr, config);
791
820
  return ret;
792
821
  }
793
- constructor() {
794
- const ret = wasm.coreregistry_new();
795
- this.__wbg_ptr = ret >>> 0;
796
- CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
797
- return this;
798
- }
799
822
  /**
800
823
  * @param {any} config
801
824
  * @returns {Promise<void>}
@@ -804,6 +827,19 @@ export class CoreRegistry {
804
827
  const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
805
828
  return ret;
806
829
  }
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
+ }
807
843
  /**
808
844
  * @param {string} name
809
845
  * @param {ActorFactory} factory
@@ -817,13 +853,6 @@ export class CoreRegistry {
817
853
  throw takeFromExternrefTable0(ret[0]);
818
854
  }
819
855
  }
820
- /**
821
- * @returns {Promise<void>}
822
- */
823
- shutdown() {
824
- const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
825
- return ret;
826
- }
827
856
  }
828
857
 
829
858
  const KvFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -987,17 +1016,6 @@ export class Queue {
987
1016
  const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
988
1017
  return ret;
989
1018
  }
990
- /**
991
- * @param {any} options
992
- * @returns {Array<any>}
993
- */
994
- tryNextBatch(options) {
995
- const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
996
- if (ret[2]) {
997
- throw takeFromExternrefTable0(ret[1]);
998
- }
999
- return takeFromExternrefTable0(ret[0]);
1000
- }
1001
1019
  /**
1002
1020
  * @param {any} names
1003
1021
  * @param {any} options
@@ -1062,6 +1080,24 @@ export class Queue {
1062
1080
  const ret = wasm.queue_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1063
1081
  return ret;
1064
1082
  }
1083
+ /**
1084
+ * @returns {Promise<void>}
1085
+ */
1086
+ reset() {
1087
+ const ret = wasm.queue_reset(this.__wbg_ptr);
1088
+ return ret;
1089
+ }
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
+ }
1065
1101
  /**
1066
1102
  * @returns {number}
1067
1103
  */
@@ -1096,6 +1132,14 @@ export class QueueMessage {
1096
1132
  const ptr = this.__destroy_into_raw();
1097
1133
  wasm.__wbg_queuemessage_free(ptr, 0);
1098
1134
  }
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
+ }
1099
1143
  /**
1100
1144
  * @returns {number}
1101
1145
  */
@@ -1141,14 +1185,6 @@ export class QueueMessage {
1141
1185
  wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1142
1186
  }
1143
1187
  }
1144
- /**
1145
- * @param {any} response
1146
- * @returns {Promise<void>}
1147
- */
1148
- complete(response) {
1149
- const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
1150
- return ret;
1151
- }
1152
1188
  }
1153
1189
 
1154
1190
  const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -1176,29 +1212,139 @@ export class Schedule {
1176
1212
  const ptr = this.__destroy_into_raw();
1177
1213
  wasm.__wbg_schedule_free(ptr, 0);
1178
1214
  }
1215
+ /**
1216
+ * @param {string} name
1217
+ * @param {number} interval_ms
1218
+ * @param {string} action_name
1219
+ * @param {Uint8Array} args
1220
+ * @param {number | null} [max_history]
1221
+ * @returns {Promise<void>}
1222
+ */
1223
+ cronEvery(name, interval_ms, action_name, args, max_history) {
1224
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1225
+ const len0 = WASM_VECTOR_LEN;
1226
+ const ptr1 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1227
+ const len1 = WASM_VECTOR_LEN;
1228
+ const ptr2 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1229
+ const len2 = WASM_VECTOR_LEN;
1230
+ 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);
1231
+ return ret;
1232
+ }
1233
+ /**
1234
+ * @param {string} name
1235
+ * @returns {Promise<boolean>}
1236
+ */
1237
+ cronDelete(name) {
1238
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1239
+ const len0 = WASM_VECTOR_LEN;
1240
+ const ret = wasm.schedule_cronDelete(this.__wbg_ptr, ptr0, len0);
1241
+ return ret;
1242
+ }
1243
+ /**
1244
+ * @param {string} name
1245
+ * @param {number | null} [limit]
1246
+ * @returns {Promise<any>}
1247
+ */
1248
+ cronHistory(name, limit) {
1249
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1250
+ const len0 = WASM_VECTOR_LEN;
1251
+ const ret = wasm.schedule_cronHistory(this.__wbg_ptr, ptr0, len0, !isLikeNone(limit), isLikeNone(limit) ? 0 : limit);
1252
+ return ret;
1253
+ }
1179
1254
  /**
1180
1255
  * @param {number} timestamp_ms
1181
1256
  * @param {string} action_name
1182
1257
  * @param {Uint8Array} args
1258
+ * @returns {Promise<string>}
1183
1259
  */
1184
1260
  at(timestamp_ms, action_name, args) {
1185
1261
  const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1186
1262
  const len0 = WASM_VECTOR_LEN;
1187
1263
  const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1188
1264
  const len1 = WASM_VECTOR_LEN;
1189
- wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
1265
+ const ret = wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
1266
+ return ret;
1267
+ }
1268
+ /**
1269
+ * @param {string} id
1270
+ * @returns {Promise<any>}
1271
+ */
1272
+ get(id) {
1273
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1274
+ const len0 = WASM_VECTOR_LEN;
1275
+ const ret = wasm.schedule_get(this.__wbg_ptr, ptr0, len0);
1276
+ return ret;
1277
+ }
1278
+ /**
1279
+ * @returns {Promise<any>}
1280
+ */
1281
+ list() {
1282
+ const ret = wasm.schedule_list(this.__wbg_ptr);
1283
+ return ret;
1190
1284
  }
1191
1285
  /**
1192
1286
  * @param {number} duration_ms
1193
1287
  * @param {string} action_name
1194
1288
  * @param {Uint8Array} args
1289
+ * @returns {Promise<string>}
1195
1290
  */
1196
1291
  after(duration_ms, action_name, args) {
1197
1292
  const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1198
1293
  const len0 = WASM_VECTOR_LEN;
1199
1294
  const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1200
1295
  const len1 = WASM_VECTOR_LEN;
1201
- wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
1296
+ const ret = wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
1297
+ return ret;
1298
+ }
1299
+ /**
1300
+ * @param {string} id
1301
+ * @returns {Promise<boolean>}
1302
+ */
1303
+ cancel(id) {
1304
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1305
+ const len0 = WASM_VECTOR_LEN;
1306
+ const ret = wasm.schedule_cancel(this.__wbg_ptr, ptr0, len0);
1307
+ return ret;
1308
+ }
1309
+ /**
1310
+ * @param {string} name
1311
+ * @returns {Promise<any>}
1312
+ */
1313
+ cronGet(name) {
1314
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1315
+ const len0 = WASM_VECTOR_LEN;
1316
+ const ret = wasm.schedule_cronGet(this.__wbg_ptr, ptr0, len0);
1317
+ return ret;
1318
+ }
1319
+ /**
1320
+ * @param {string} name
1321
+ * @param {string} expression
1322
+ * @param {string | null | undefined} timezone
1323
+ * @param {string} action_name
1324
+ * @param {Uint8Array} args
1325
+ * @param {number | null} [max_history]
1326
+ * @returns {Promise<void>}
1327
+ */
1328
+ cronSet(name, expression, timezone, action_name, args, max_history) {
1329
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1330
+ const len0 = WASM_VECTOR_LEN;
1331
+ const ptr1 = passStringToWasm0(expression, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1332
+ const len1 = WASM_VECTOR_LEN;
1333
+ var ptr2 = isLikeNone(timezone) ? 0 : passStringToWasm0(timezone, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1334
+ var len2 = WASM_VECTOR_LEN;
1335
+ const ptr3 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1336
+ const len3 = WASM_VECTOR_LEN;
1337
+ const ptr4 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
1338
+ const len4 = WASM_VECTOR_LEN;
1339
+ 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);
1340
+ return ret;
1341
+ }
1342
+ /**
1343
+ * @returns {Promise<any>}
1344
+ */
1345
+ cronList() {
1346
+ const ret = wasm.schedule_cronList(this.__wbg_ptr);
1347
+ return ret;
1202
1348
  }
1203
1349
  }
1204
1350
 
@@ -1227,6 +1373,22 @@ export class SqliteDb {
1227
1373
  const ptr = this.__destroy_into_raw();
1228
1374
  wasm.__wbg_sqlitedb_free(ptr, 0);
1229
1375
  }
1376
+ /**
1377
+ * @param {any} statements
1378
+ * @returns {Promise<any>}
1379
+ */
1380
+ executeBatch(statements) {
1381
+ const ret = wasm.sqlitedb_executeBatch(this.__wbg_ptr, statements);
1382
+ return ret;
1383
+ }
1384
+ /**
1385
+ * @param {number | null} [timeout_ms]
1386
+ * @returns {Promise<SqliteTransaction>}
1387
+ */
1388
+ beginTransaction(timeout_ms) {
1389
+ const ret = wasm.sqlitedb_beginTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
1390
+ return ret;
1391
+ }
1230
1392
  /**
1231
1393
  * @param {string} sql
1232
1394
  * @param {any} params
@@ -1279,6 +1441,68 @@ export class SqliteDb {
1279
1441
  }
1280
1442
  }
1281
1443
 
1444
+ const SqliteTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
1445
+ ? { register: () => {}, unregister: () => {} }
1446
+ : new FinalizationRegistry(ptr => wasm.__wbg_sqlitetransaction_free(ptr >>> 0, 1));
1447
+
1448
+ export class SqliteTransaction {
1449
+
1450
+ static __wrap(ptr) {
1451
+ ptr = ptr >>> 0;
1452
+ const obj = Object.create(SqliteTransaction.prototype);
1453
+ obj.__wbg_ptr = ptr;
1454
+ SqliteTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
1455
+ return obj;
1456
+ }
1457
+
1458
+ __destroy_into_raw() {
1459
+ const ptr = this.__wbg_ptr;
1460
+ this.__wbg_ptr = 0;
1461
+ SqliteTransactionFinalization.unregister(this);
1462
+ return ptr;
1463
+ }
1464
+
1465
+ free() {
1466
+ const ptr = this.__destroy_into_raw();
1467
+ wasm.__wbg_sqlitetransaction_free(ptr, 0);
1468
+ }
1469
+ /**
1470
+ * @param {string} sql
1471
+ * @returns {Promise<any>}
1472
+ */
1473
+ exec(sql) {
1474
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1475
+ const len0 = WASM_VECTOR_LEN;
1476
+ const ret = wasm.sqlitetransaction_exec(this.__wbg_ptr, ptr0, len0);
1477
+ return ret;
1478
+ }
1479
+ /**
1480
+ * @returns {Promise<void>}
1481
+ */
1482
+ commit() {
1483
+ const ret = wasm.sqlitetransaction_commit(this.__wbg_ptr);
1484
+ return ret;
1485
+ }
1486
+ /**
1487
+ * @param {string} sql
1488
+ * @param {any} params
1489
+ * @returns {Promise<any>}
1490
+ */
1491
+ execute(sql, params) {
1492
+ const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1493
+ const len0 = WASM_VECTOR_LEN;
1494
+ const ret = wasm.sqlitetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
1495
+ return ret;
1496
+ }
1497
+ /**
1498
+ * @returns {Promise<void>}
1499
+ */
1500
+ rollback() {
1501
+ const ret = wasm.sqlitetransaction_rollback(this.__wbg_ptr);
1502
+ return ret;
1503
+ }
1504
+ }
1505
+
1282
1506
  const WebSocketHandleFinalization = (typeof FinalizationRegistry === 'undefined')
1283
1507
  ? { register: () => {}, unregister: () => {} }
1284
1508
  : new FinalizationRegistry(ptr => wasm.__wbg_websockethandle_free(ptr >>> 0, 1));
@@ -1304,6 +1528,17 @@ export class WebSocketHandle {
1304
1528
  const ptr = this.__destroy_into_raw();
1305
1529
  wasm.__wbg_websockethandle_free(ptr, 0);
1306
1530
  }
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
+ }
1307
1542
  /**
1308
1543
  * @param {Function} callback
1309
1544
  */
@@ -1322,17 +1557,6 @@ export class WebSocketHandle {
1322
1557
  throw takeFromExternrefTable0(ret[0]);
1323
1558
  }
1324
1559
  }
1325
- /**
1326
- * @param {number | null} [code]
1327
- * @param {string | null} [reason]
1328
- * @returns {Promise<void>}
1329
- */
1330
- close(code, reason) {
1331
- var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1332
- var len0 = WASM_VECTOR_LEN;
1333
- const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
1334
- return ret;
1335
- }
1336
1560
  }
1337
1561
 
1338
1562
  async function __wbg_load(module, imports) {
@@ -1400,6 +1624,10 @@ function __wbg_get_imports() {
1400
1624
  const ret = arg0.call(arg1, arg2, arg3);
1401
1625
  return ret;
1402
1626
  }, arguments) };
1627
+ imports.wbg.__wbg_cancellationtoken_new = function(arg0) {
1628
+ const ret = CancellationToken.__wrap(arg0);
1629
+ return ret;
1630
+ };
1403
1631
  imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
1404
1632
  arg0.close();
1405
1633
  }, arguments) };
@@ -1441,7 +1669,7 @@ function __wbg_get_imports() {
1441
1669
  wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
1442
1670
  }
1443
1671
  };
1444
- imports.wbg.__wbg_getRandomValues_38097e921c2494c3 = function() { return handleError(function (arg0, arg1) {
1672
+ imports.wbg.__wbg_getRandomValues_6c498bf966d88108 = function() { return handleError(function (arg0, arg1) {
1445
1673
  globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
1446
1674
  }, arguments) };
1447
1675
  imports.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
@@ -1555,7 +1783,7 @@ function __wbg_get_imports() {
1555
1783
  const a = state0.a;
1556
1784
  state0.a = 0;
1557
1785
  try {
1558
- return __wbg_adapter_224(a, state0.b, arg0, arg1);
1786
+ return __wbg_adapter_287(a, state0.b, arg0, arg1);
1559
1787
  } finally {
1560
1788
  state0.a = a;
1561
1789
  }
@@ -1570,6 +1798,10 @@ function __wbg_get_imports() {
1570
1798
  const ret = new Object();
1571
1799
  return ret;
1572
1800
  };
1801
+ imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
1802
+ const ret = new Map();
1803
+ return ret;
1804
+ };
1573
1805
  imports.wbg.__wbg_new_78feb108b6472713 = function() {
1574
1806
  const ret = new Array();
1575
1807
  return ret;
@@ -1679,6 +1911,10 @@ function __wbg_get_imports() {
1679
1911
  imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
1680
1912
  arg0.set(arg1, arg2 >>> 0);
1681
1913
  };
1914
+ imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
1915
+ const ret = arg0.set(arg1, arg2);
1916
+ return ret;
1917
+ };
1682
1918
  imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
1683
1919
  const ret = Reflect.set(arg0, arg1, arg2);
1684
1920
  return ret;
@@ -1698,6 +1934,10 @@ function __wbg_get_imports() {
1698
1934
  imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
1699
1935
  arg0.onopen = arg1;
1700
1936
  };
1937
+ imports.wbg.__wbg_sqlitetransaction_new = function(arg0) {
1938
+ const ret = SqliteTransaction.__wrap(arg0);
1939
+ return ret;
1940
+ };
1701
1941
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
1702
1942
  const ret = arg1.stack;
1703
1943
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
@@ -1753,6 +1993,14 @@ function __wbg_get_imports() {
1753
1993
  const ret = +arg0;
1754
1994
  return ret;
1755
1995
  };
1996
+ imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
1997
+ const ret = arg0;
1998
+ return ret;
1999
+ };
2000
+ imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
2001
+ const ret = BigInt.asUintN(64, arg0);
2002
+ return ret;
2003
+ };
1756
2004
  imports.wbg.__wbindgen_boolean_get = function(arg0) {
1757
2005
  const v = arg0;
1758
2006
  const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
@@ -1767,24 +2015,24 @@ function __wbg_get_imports() {
1767
2015
  const ret = false;
1768
2016
  return ret;
1769
2017
  };
1770
- imports.wbg.__wbindgen_closure_wrapper3797 = function(arg0, arg1, arg2) {
1771
- const ret = makeMutClosure(arg0, arg1, 1603, __wbg_adapter_46);
2018
+ imports.wbg.__wbindgen_closure_wrapper4808 = function(arg0, arg1, arg2) {
2019
+ const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_50);
1772
2020
  return ret;
1773
2021
  };
1774
- imports.wbg.__wbindgen_closure_wrapper3799 = function(arg0, arg1, arg2) {
1775
- const ret = makeMutClosure(arg0, arg1, 1603, __wbg_adapter_46);
2022
+ imports.wbg.__wbindgen_closure_wrapper4810 = function(arg0, arg1, arg2) {
2023
+ const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_50);
1776
2024
  return ret;
1777
2025
  };
1778
- imports.wbg.__wbindgen_closure_wrapper3801 = function(arg0, arg1, arg2) {
1779
- const ret = makeMutClosure(arg0, arg1, 1603, __wbg_adapter_46);
2026
+ imports.wbg.__wbindgen_closure_wrapper4812 = function(arg0, arg1, arg2) {
2027
+ const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_50);
1780
2028
  return ret;
1781
2029
  };
1782
- imports.wbg.__wbindgen_closure_wrapper3803 = function(arg0, arg1, arg2) {
1783
- const ret = makeMutClosure(arg0, arg1, 1603, __wbg_adapter_46);
2030
+ imports.wbg.__wbindgen_closure_wrapper4814 = function(arg0, arg1, arg2) {
2031
+ const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_50);
1784
2032
  return ret;
1785
2033
  };
1786
- imports.wbg.__wbindgen_closure_wrapper4401 = function(arg0, arg1, arg2) {
1787
- const ret = makeMutClosure(arg0, arg1, 1806, __wbg_adapter_55);
2034
+ imports.wbg.__wbindgen_closure_wrapper5411 = function(arg0, arg1, arg2) {
2035
+ const ret = makeMutClosure(arg0, arg1, 2340, __wbg_adapter_59);
1788
2036
  return ret;
1789
2037
  };
1790
2038
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file
@@ -9,6 +9,7 @@ export const __wbg_coreregistry_free: (a: number, b: number) => void;
9
9
  export const __wbg_kv_free: (a: number, b: number) => void;
10
10
  export const __wbg_queuemessage_free: (a: number, b: number) => void;
11
11
  export const __wbg_sqlitedb_free: (a: number, b: number) => void;
12
+ export const __wbg_sqlitetransaction_free: (a: number, b: number) => void;
12
13
  export const __wbg_websockethandle_free: (a: number, b: number) => void;
13
14
  export const actorcontext_abortSignal: (a: number) => [number, number, number];
14
15
  export const actorcontext_actorId: (a: number) => [number, number];
@@ -36,12 +37,15 @@ export const actorcontext_requestSaveAndWait: (a: number, b: any) => any;
36
37
  export const actorcontext_restartRunHandler: (a: number) => void;
37
38
  export const actorcontext_runtimeState: (a: number) => any;
38
39
  export const actorcontext_saveState: (a: number, b: any) => any;
40
+ export const actorcontext_saveStateAndWorkflowBatch: (a: number, b: any) => any;
39
41
  export const actorcontext_setAlarm: (a: number, b: number, c: number) => [number, number];
40
42
  export const actorcontext_sleep: (a: number) => [number, number];
41
43
  export const actorcontext_sql: (a: number) => number;
42
44
  export const actorcontext_state: (a: number) => [number, number];
43
45
  export const actorcontext_takePendingHibernationChanges: (a: number) => any;
44
46
  export const actorcontext_verifyInspectorAuth: (a: number, b: number, c: number) => any;
47
+ export const actorcontext_waitForTrackedShutdownWork: (a: number) => any;
48
+ export const actorcontext_waitForTrackedShutdownWorkUnbounded: (a: number) => any;
45
49
  export const actorcontext_waitUntil: (a: number, b: any) => void;
46
50
  export const actorfactory_new: (a: any, b: any) => [number, number, number];
47
51
  export const awaitPromise: (a: any) => any;
@@ -75,6 +79,7 @@ export const queue_enqueueAndWait: (a: number, b: number, c: number, d: number,
75
79
  export const queue_inspectMessages: (a: number) => any;
76
80
  export const queue_maxSize: (a: number) => number;
77
81
  export const queue_nextBatch: (a: number, b: any, c: number) => any;
82
+ export const queue_reset: (a: number) => any;
78
83
  export const queue_send: (a: number, b: number, c: number, d: number, e: number) => any;
79
84
  export const queue_tryNextBatch: (a: number, b: any) => [number, number, number];
80
85
  export const queue_waitForNames: (a: number, b: any, c: any, d: number) => any;
@@ -86,13 +91,28 @@ export const queuemessage_id: (a: number) => bigint;
86
91
  export const queuemessage_isCompletable: (a: number) => number;
87
92
  export const queuemessage_name: (a: number) => [number, number];
88
93
  export const roundTripBytes: (a: number, b: number) => [number, number];
89
- export const schedule_after: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
90
- export const schedule_at: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
94
+ export const schedule_after: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
95
+ export const schedule_at: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
96
+ export const schedule_cancel: (a: number, b: number, c: number) => any;
97
+ export const schedule_cronDelete: (a: number, b: number, c: number) => any;
98
+ export const schedule_cronEvery: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => any;
99
+ export const schedule_cronGet: (a: number, b: number, c: number) => any;
100
+ export const schedule_cronHistory: (a: number, b: number, c: number, d: number, e: number) => any;
101
+ export const schedule_cronList: (a: number) => any;
102
+ export const schedule_cronSet: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => any;
103
+ export const schedule_get: (a: number, b: number, c: number) => any;
104
+ export const schedule_list: (a: number) => any;
105
+ export const sqlitedb_beginTransaction: (a: number, b: number, c: number) => any;
91
106
  export const sqlitedb_close: (a: number) => any;
92
107
  export const sqlitedb_exec: (a: number, b: number, c: number) => any;
93
108
  export const sqlitedb_execute: (a: number, b: number, c: number, d: any) => any;
109
+ export const sqlitedb_executeBatch: (a: number, b: any) => any;
94
110
  export const sqlitedb_query: (a: number, b: number, c: number, d: any) => any;
95
111
  export const sqlitedb_run: (a: number, b: number, c: number, d: any) => any;
112
+ export const sqlitetransaction_commit: (a: number) => any;
113
+ export const sqlitetransaction_exec: (a: number, b: number, c: number) => any;
114
+ export const sqlitetransaction_execute: (a: number, b: number, c: number, d: any) => any;
115
+ export const sqlitetransaction_rollback: (a: number) => any;
96
116
  export const uint8ArrayFromBytes: (a: number, b: number) => any;
97
117
  export const websockethandle_close: (a: number, b: number, c: number, d: number) => any;
98
118
  export const websockethandle_send: (a: number, b: number, c: number, d: number) => [number, number];
@@ -110,7 +130,7 @@ export const __wbindgen_export_4: WebAssembly.Table;
110
130
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
111
131
  export const __wbindgen_export_6: WebAssembly.Table;
112
132
  export const __externref_table_dealloc: (a: number) => void;
113
- export const closure1602_externref_shim: (a: number, b: number, c: any) => void;
114
- export const closure1805_externref_shim: (a: number, b: number, c: any) => void;
115
- export const closure2018_externref_shim: (a: number, b: number, c: any, d: any) => void;
133
+ export const closure1960_externref_shim: (a: number, b: number, c: any) => void;
134
+ export const closure2339_externref_shim: (a: number, b: number, c: any) => void;
135
+ export const closure2576_externref_shim: (a: number, b: number, c: any, d: any) => void;
116
136
  export const __wbindgen_start: () => void;