@rivetkit/rivetkit-wasm 0.0.0-stack-docs-deploy-add-container-runner-page-mqospzuu.cc74539 → 0.0.0-stack-feat-cli-support-multiple-compute-pools-uqzuxkqy.9411557
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 +38 -2
- package/package.json +1 -1
- package/pkg/package.json +19 -0
- package/pkg/rivetkit_wasm.d.ts +58 -21
- package/pkg/rivetkit_wasm.js +378 -151
- package/pkg/rivetkit_wasm_bg.wasm +0 -0
- package/pkg/rivetkit_wasm_bg.wasm.d.ts +22 -5
package/index.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export class ActorContext {
|
|
|
8
8
|
free(): void;
|
|
9
9
|
keepAwake(promise: Promise<any>): void;
|
|
10
10
|
saveState(payload: any): Promise<void>;
|
|
11
|
+
saveStateAndWorkflowBatch(
|
|
12
|
+
writes: Array<{ key: Uint8Array; value: Uint8Array }>,
|
|
13
|
+
): Promise<void>;
|
|
11
14
|
waitUntil(promise: Promise<any>): void;
|
|
12
15
|
abortSignal(): any;
|
|
13
16
|
connectConn(params: Uint8Array, request: any): Promise<ConnHandle>;
|
|
@@ -137,8 +140,30 @@ export class QueueMessage {
|
|
|
137
140
|
export class Schedule {
|
|
138
141
|
private constructor();
|
|
139
142
|
free(): void;
|
|
140
|
-
|
|
141
|
-
|
|
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>;
|
|
142
167
|
}
|
|
143
168
|
|
|
144
169
|
export class SqliteDb {
|
|
@@ -149,6 +174,17 @@ export class SqliteDb {
|
|
|
149
174
|
close(): Promise<void>;
|
|
150
175
|
query(sql: string, params: any): Promise<any>;
|
|
151
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>;
|
|
152
188
|
}
|
|
153
189
|
|
|
154
190
|
export class WebSocketHandle {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/rivetkit-wasm",
|
|
3
|
-
"version": "0.0.0-stack-
|
|
3
|
+
"version": "0.0.0-stack-feat-cli-support-multiple-compute-pools-uqzuxkqy.9411557",
|
|
4
4
|
"description": "WebAssembly bindings for RivetKit core on edge JavaScript runtimes",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
package/pkg/package.json
ADDED
|
@@ -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
|
+
}
|
package/pkg/rivetkit_wasm.d.ts
CHANGED
|
@@ -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
|
-
export function bridgeRivetErrorPrefix(): string;
|
|
6
3
|
export function start(): void;
|
|
4
|
+
export function bridgeRivetErrorPrefix(): string;
|
|
5
|
+
export function roundTripBytes(bytes: Uint8Array): Uint8Array;
|
|
7
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,18 +26,14 @@ 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>;
|
|
29
32
|
kv(): Kv;
|
|
30
|
-
waitForTrackedShutdownWork(): Promise<boolean>;
|
|
31
33
|
takePendingHibernationChanges(): Array<any>;
|
|
32
34
|
key(): any;
|
|
33
35
|
constructor();
|
|
34
36
|
sql(): SqliteDb;
|
|
35
|
-
waitForTrackedShutdownWorkUnbounded(): Promise<void>;
|
|
36
37
|
name(): string;
|
|
37
38
|
conns(): Array<any>;
|
|
38
39
|
queue(): Queue;
|
|
@@ -70,10 +71,10 @@ export class ConnHandle {
|
|
|
70
71
|
export class CoreRegistry {
|
|
71
72
|
free(): void;
|
|
72
73
|
handleServerlessRequest(req: any, on_stream_event: Function, cancel_token: CancellationToken, config: any): Promise<any>;
|
|
73
|
-
constructor();
|
|
74
74
|
serve(config: any): Promise<void>;
|
|
75
|
-
register(name: string, factory: ActorFactory): void;
|
|
76
75
|
shutdown(): Promise<void>;
|
|
76
|
+
constructor();
|
|
77
|
+
register(name: string, factory: ActorFactory): void;
|
|
77
78
|
}
|
|
78
79
|
export class Kv {
|
|
79
80
|
private constructor();
|
|
@@ -92,46 +93,65 @@ export class Queue {
|
|
|
92
93
|
private constructor();
|
|
93
94
|
free(): void;
|
|
94
95
|
nextBatch(options: any, signal?: CancellationToken | null): Promise<Array<any>>;
|
|
95
|
-
tryNextBatch(options: any): Array<any>;
|
|
96
96
|
waitForNames(names: any, options: any, signal?: CancellationToken | null): Promise<QueueMessage>;
|
|
97
97
|
enqueueAndWait(name: string, body: Uint8Array, options: any, signal?: CancellationToken | null): Promise<Uint8Array | undefined>;
|
|
98
98
|
inspectMessages(): Promise<Array<any>>;
|
|
99
99
|
waitForNamesAvailable(names: any, options: any): Promise<void>;
|
|
100
100
|
send(name: string, body: Uint8Array): Promise<QueueMessage>;
|
|
101
101
|
reset(): Promise<void>;
|
|
102
|
+
tryNextBatch(options: any): Array<any>;
|
|
102
103
|
maxSize(): number;
|
|
103
104
|
}
|
|
104
105
|
export class QueueMessage {
|
|
105
106
|
private constructor();
|
|
106
107
|
free(): void;
|
|
108
|
+
complete(response: any): Promise<void>;
|
|
107
109
|
createdAt(): number;
|
|
108
110
|
isCompletable(): boolean;
|
|
109
111
|
id(): bigint;
|
|
110
112
|
body(): Uint8Array;
|
|
111
113
|
name(): string;
|
|
112
|
-
complete(response: any): Promise<void>;
|
|
113
114
|
}
|
|
114
115
|
export class Schedule {
|
|
115
116
|
private constructor();
|
|
116
117
|
free(): void;
|
|
117
|
-
|
|
118
|
-
|
|
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>;
|
|
119
129
|
}
|
|
120
130
|
export class SqliteDb {
|
|
121
131
|
private constructor();
|
|
122
132
|
free(): void;
|
|
133
|
+
executeBatch(statements: any): Promise<any>;
|
|
134
|
+
beginTransaction(timeout_ms?: number | null): Promise<SqliteTransaction>;
|
|
123
135
|
run(sql: string, params: any): Promise<any>;
|
|
124
136
|
exec(sql: string): Promise<any>;
|
|
125
137
|
close(): Promise<void>;
|
|
126
138
|
query(sql: string, params: any): Promise<any>;
|
|
127
139
|
execute(sql: string, params: any): Promise<any>;
|
|
128
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
|
+
}
|
|
129
149
|
export class WebSocketHandle {
|
|
130
150
|
private constructor();
|
|
131
151
|
free(): void;
|
|
152
|
+
close(code?: number | null, reason?: string | null): Promise<void>;
|
|
132
153
|
setEventCallback(callback: Function): void;
|
|
133
154
|
send(data: Uint8Array, binary: boolean): void;
|
|
134
|
-
close(code?: number | null, reason?: string | null): Promise<void>;
|
|
135
155
|
}
|
|
136
156
|
|
|
137
157
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -146,6 +166,7 @@ export interface InitOutput {
|
|
|
146
166
|
readonly __wbg_kv_free: (a: number, b: number) => void;
|
|
147
167
|
readonly __wbg_queuemessage_free: (a: number, b: number) => void;
|
|
148
168
|
readonly __wbg_sqlitedb_free: (a: number, b: number) => void;
|
|
169
|
+
readonly __wbg_sqlitetransaction_free: (a: number, b: number) => void;
|
|
149
170
|
readonly __wbg_websockethandle_free: (a: number, b: number) => void;
|
|
150
171
|
readonly actorcontext_abortSignal: (a: number) => [number, number, number];
|
|
151
172
|
readonly actorcontext_actorId: (a: number) => [number, number];
|
|
@@ -173,6 +194,7 @@ export interface InitOutput {
|
|
|
173
194
|
readonly actorcontext_restartRunHandler: (a: number) => void;
|
|
174
195
|
readonly actorcontext_runtimeState: (a: number) => any;
|
|
175
196
|
readonly actorcontext_saveState: (a: number, b: any) => any;
|
|
197
|
+
readonly actorcontext_saveStateAndWorkflowBatch: (a: number, b: any) => any;
|
|
176
198
|
readonly actorcontext_setAlarm: (a: number, b: number, c: number) => [number, number];
|
|
177
199
|
readonly actorcontext_sleep: (a: number) => [number, number];
|
|
178
200
|
readonly actorcontext_sql: (a: number) => number;
|
|
@@ -226,13 +248,28 @@ export interface InitOutput {
|
|
|
226
248
|
readonly queuemessage_isCompletable: (a: number) => number;
|
|
227
249
|
readonly queuemessage_name: (a: number) => [number, number];
|
|
228
250
|
readonly roundTripBytes: (a: number, b: number) => [number, number];
|
|
229
|
-
readonly schedule_after: (a: number, b: number, c: number, d: number, e: number, f: number) =>
|
|
230
|
-
readonly schedule_at: (a: number, b: number, c: number, d: number, e: number, f: number) =>
|
|
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;
|
|
231
263
|
readonly sqlitedb_close: (a: number) => any;
|
|
232
264
|
readonly sqlitedb_exec: (a: number, b: number, c: number) => any;
|
|
233
265
|
readonly sqlitedb_execute: (a: number, b: number, c: number, d: any) => any;
|
|
266
|
+
readonly sqlitedb_executeBatch: (a: number, b: any) => any;
|
|
234
267
|
readonly sqlitedb_query: (a: number, b: number, c: number, d: any) => any;
|
|
235
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;
|
|
236
273
|
readonly uint8ArrayFromBytes: (a: number, b: number) => any;
|
|
237
274
|
readonly websockethandle_close: (a: number, b: number, c: number, d: number) => any;
|
|
238
275
|
readonly websockethandle_send: (a: number, b: number, c: number, d: number) => [number, number];
|
|
@@ -250,9 +287,9 @@ export interface InitOutput {
|
|
|
250
287
|
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
251
288
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
252
289
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
253
|
-
readonly
|
|
254
|
-
readonly
|
|
255
|
-
readonly
|
|
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;
|
|
256
293
|
readonly __wbindgen_start: () => void;
|
|
257
294
|
}
|
|
258
295
|
|
package/pkg/rivetkit_wasm.js
CHANGED
|
@@ -203,44 +203,8 @@ function debugString(val) {
|
|
|
203
203
|
return className;
|
|
204
204
|
}
|
|
205
205
|
|
|
206
|
-
function
|
|
207
|
-
|
|
208
|
-
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
209
|
-
WASM_VECTOR_LEN = arg.length;
|
|
210
|
-
return ptr;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
function takeFromExternrefTable0(idx) {
|
|
214
|
-
const value = wasm.__wbindgen_export_4.get(idx);
|
|
215
|
-
wasm.__externref_table_dealloc(idx);
|
|
216
|
-
return value;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
function _assertClass(instance, klass) {
|
|
220
|
-
if (!(instance instanceof klass)) {
|
|
221
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* @param {Promise<any>} promise
|
|
226
|
-
* @returns {Promise<any>}
|
|
227
|
-
*/
|
|
228
|
-
export function awaitPromise(promise) {
|
|
229
|
-
const ret = wasm.awaitPromise(promise);
|
|
230
|
-
return ret;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* @param {Uint8Array} bytes
|
|
235
|
-
* @returns {Uint8Array}
|
|
236
|
-
*/
|
|
237
|
-
export function roundTripBytes(bytes) {
|
|
238
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
239
|
-
const len0 = WASM_VECTOR_LEN;
|
|
240
|
-
const ret = wasm.roundTripBytes(ptr0, len0);
|
|
241
|
-
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
242
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
243
|
-
return v2;
|
|
206
|
+
export function start() {
|
|
207
|
+
wasm.start();
|
|
244
208
|
}
|
|
245
209
|
|
|
246
210
|
/**
|
|
@@ -259,8 +223,23 @@ export function bridgeRivetErrorPrefix() {
|
|
|
259
223
|
}
|
|
260
224
|
}
|
|
261
225
|
|
|
262
|
-
|
|
263
|
-
|
|
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
|
+
/**
|
|
233
|
+
* @param {Uint8Array} bytes
|
|
234
|
+
* @returns {Uint8Array}
|
|
235
|
+
*/
|
|
236
|
+
export function roundTripBytes(bytes) {
|
|
237
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
238
|
+
const len0 = WASM_VECTOR_LEN;
|
|
239
|
+
const ret = wasm.roundTripBytes(ptr0, len0);
|
|
240
|
+
var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
241
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
242
|
+
return v2;
|
|
264
243
|
}
|
|
265
244
|
|
|
266
245
|
/**
|
|
@@ -274,16 +253,36 @@ export function uint8ArrayFromBytes(bytes) {
|
|
|
274
253
|
return ret;
|
|
275
254
|
}
|
|
276
255
|
|
|
277
|
-
|
|
278
|
-
|
|
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
|
+
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
277
|
+
wasm.closure1960_externref_shim(arg0, arg1, arg2);
|
|
279
278
|
}
|
|
280
279
|
|
|
281
|
-
function
|
|
282
|
-
wasm.
|
|
280
|
+
function __wbg_adapter_59(arg0, arg1, arg2) {
|
|
281
|
+
wasm.closure2339_externref_shim(arg0, arg1, arg2);
|
|
283
282
|
}
|
|
284
283
|
|
|
285
|
-
function
|
|
286
|
-
wasm.
|
|
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
|
*/
|
|
@@ -450,13 +471,6 @@ export class ActorContext {
|
|
|
450
471
|
const ret = wasm.actorcontext_kv(this.__wbg_ptr);
|
|
451
472
|
return Kv.__wrap(ret);
|
|
452
473
|
}
|
|
453
|
-
/**
|
|
454
|
-
* @returns {Promise<boolean>}
|
|
455
|
-
*/
|
|
456
|
-
waitForTrackedShutdownWork() {
|
|
457
|
-
const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
|
|
458
|
-
return ret;
|
|
459
|
-
}
|
|
460
474
|
/**
|
|
461
475
|
* @returns {Array<any>}
|
|
462
476
|
*/
|
|
@@ -490,13 +504,6 @@ export class ActorContext {
|
|
|
490
504
|
const ret = wasm.actorcontext_sql(this.__wbg_ptr);
|
|
491
505
|
return SqliteDb.__wrap(ret);
|
|
492
506
|
}
|
|
493
|
-
/**
|
|
494
|
-
* @returns {Promise<void>}
|
|
495
|
-
*/
|
|
496
|
-
waitForTrackedShutdownWorkUnbounded() {
|
|
497
|
-
const ret = wasm.actorcontext_waitForTrackedShutdownWorkUnbounded(this.__wbg_ptr);
|
|
498
|
-
return ret;
|
|
499
|
-
}
|
|
500
507
|
/**
|
|
501
508
|
* @returns {string}
|
|
502
509
|
*/
|
|
@@ -644,6 +651,14 @@ const CancellationTokenFinalization = (typeof FinalizationRegistry === 'undefine
|
|
|
644
651
|
|
|
645
652
|
export class CancellationToken {
|
|
646
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
|
+
|
|
647
662
|
__destroy_into_raw() {
|
|
648
663
|
const ptr = this.__wbg_ptr;
|
|
649
664
|
this.__wbg_ptr = 0;
|
|
@@ -804,12 +819,6 @@ export class CoreRegistry {
|
|
|
804
819
|
const ret = wasm.coreregistry_handleServerlessRequest(this.__wbg_ptr, req, on_stream_event, cancel_token.__wbg_ptr, config);
|
|
805
820
|
return ret;
|
|
806
821
|
}
|
|
807
|
-
constructor() {
|
|
808
|
-
const ret = wasm.coreregistry_new();
|
|
809
|
-
this.__wbg_ptr = ret >>> 0;
|
|
810
|
-
CoreRegistryFinalization.register(this, this.__wbg_ptr, this);
|
|
811
|
-
return this;
|
|
812
|
-
}
|
|
813
822
|
/**
|
|
814
823
|
* @param {any} config
|
|
815
824
|
* @returns {Promise<void>}
|
|
@@ -818,6 +827,19 @@ export class CoreRegistry {
|
|
|
818
827
|
const ret = wasm.coreregistry_serve(this.__wbg_ptr, config);
|
|
819
828
|
return ret;
|
|
820
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
|
+
}
|
|
821
843
|
/**
|
|
822
844
|
* @param {string} name
|
|
823
845
|
* @param {ActorFactory} factory
|
|
@@ -831,13 +853,6 @@ export class CoreRegistry {
|
|
|
831
853
|
throw takeFromExternrefTable0(ret[0]);
|
|
832
854
|
}
|
|
833
855
|
}
|
|
834
|
-
/**
|
|
835
|
-
* @returns {Promise<void>}
|
|
836
|
-
*/
|
|
837
|
-
shutdown() {
|
|
838
|
-
const ret = wasm.coreregistry_shutdown(this.__wbg_ptr);
|
|
839
|
-
return ret;
|
|
840
|
-
}
|
|
841
856
|
}
|
|
842
857
|
|
|
843
858
|
const KvFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1001,17 +1016,6 @@ export class Queue {
|
|
|
1001
1016
|
const ret = wasm.queue_nextBatch(this.__wbg_ptr, options, ptr0);
|
|
1002
1017
|
return ret;
|
|
1003
1018
|
}
|
|
1004
|
-
/**
|
|
1005
|
-
* @param {any} options
|
|
1006
|
-
* @returns {Array<any>}
|
|
1007
|
-
*/
|
|
1008
|
-
tryNextBatch(options) {
|
|
1009
|
-
const ret = wasm.queue_tryNextBatch(this.__wbg_ptr, options);
|
|
1010
|
-
if (ret[2]) {
|
|
1011
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1012
|
-
}
|
|
1013
|
-
return takeFromExternrefTable0(ret[0]);
|
|
1014
|
-
}
|
|
1015
1019
|
/**
|
|
1016
1020
|
* @param {any} names
|
|
1017
1021
|
* @param {any} options
|
|
@@ -1083,6 +1087,17 @@ export class Queue {
|
|
|
1083
1087
|
const ret = wasm.queue_reset(this.__wbg_ptr);
|
|
1084
1088
|
return ret;
|
|
1085
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
|
+
}
|
|
1086
1101
|
/**
|
|
1087
1102
|
* @returns {number}
|
|
1088
1103
|
*/
|
|
@@ -1117,6 +1132,14 @@ export class QueueMessage {
|
|
|
1117
1132
|
const ptr = this.__destroy_into_raw();
|
|
1118
1133
|
wasm.__wbg_queuemessage_free(ptr, 0);
|
|
1119
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
|
+
}
|
|
1120
1143
|
/**
|
|
1121
1144
|
* @returns {number}
|
|
1122
1145
|
*/
|
|
@@ -1162,14 +1185,6 @@ export class QueueMessage {
|
|
|
1162
1185
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1163
1186
|
}
|
|
1164
1187
|
}
|
|
1165
|
-
/**
|
|
1166
|
-
* @param {any} response
|
|
1167
|
-
* @returns {Promise<void>}
|
|
1168
|
-
*/
|
|
1169
|
-
complete(response) {
|
|
1170
|
-
const ret = wasm.queuemessage_complete(this.__wbg_ptr, response);
|
|
1171
|
-
return ret;
|
|
1172
|
-
}
|
|
1173
1188
|
}
|
|
1174
1189
|
|
|
1175
1190
|
const ScheduleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -1197,29 +1212,139 @@ export class Schedule {
|
|
|
1197
1212
|
const ptr = this.__destroy_into_raw();
|
|
1198
1213
|
wasm.__wbg_schedule_free(ptr, 0);
|
|
1199
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
|
+
}
|
|
1200
1254
|
/**
|
|
1201
1255
|
* @param {number} timestamp_ms
|
|
1202
1256
|
* @param {string} action_name
|
|
1203
1257
|
* @param {Uint8Array} args
|
|
1258
|
+
* @returns {Promise<string>}
|
|
1204
1259
|
*/
|
|
1205
1260
|
at(timestamp_ms, action_name, args) {
|
|
1206
1261
|
const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1207
1262
|
const len0 = WASM_VECTOR_LEN;
|
|
1208
1263
|
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1209
1264
|
const len1 = WASM_VECTOR_LEN;
|
|
1210
|
-
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;
|
|
1211
1284
|
}
|
|
1212
1285
|
/**
|
|
1213
1286
|
* @param {number} duration_ms
|
|
1214
1287
|
* @param {string} action_name
|
|
1215
1288
|
* @param {Uint8Array} args
|
|
1289
|
+
* @returns {Promise<string>}
|
|
1216
1290
|
*/
|
|
1217
1291
|
after(duration_ms, action_name, args) {
|
|
1218
1292
|
const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1219
1293
|
const len0 = WASM_VECTOR_LEN;
|
|
1220
1294
|
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1221
1295
|
const len1 = WASM_VECTOR_LEN;
|
|
1222
|
-
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;
|
|
1223
1348
|
}
|
|
1224
1349
|
}
|
|
1225
1350
|
|
|
@@ -1248,6 +1373,22 @@ export class SqliteDb {
|
|
|
1248
1373
|
const ptr = this.__destroy_into_raw();
|
|
1249
1374
|
wasm.__wbg_sqlitedb_free(ptr, 0);
|
|
1250
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
|
+
}
|
|
1251
1392
|
/**
|
|
1252
1393
|
* @param {string} sql
|
|
1253
1394
|
* @param {any} params
|
|
@@ -1300,6 +1441,68 @@ export class SqliteDb {
|
|
|
1300
1441
|
}
|
|
1301
1442
|
}
|
|
1302
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
|
+
|
|
1303
1506
|
const WebSocketHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1304
1507
|
? { register: () => {}, unregister: () => {} }
|
|
1305
1508
|
: new FinalizationRegistry(ptr => wasm.__wbg_websockethandle_free(ptr >>> 0, 1));
|
|
@@ -1325,6 +1528,17 @@ export class WebSocketHandle {
|
|
|
1325
1528
|
const ptr = this.__destroy_into_raw();
|
|
1326
1529
|
wasm.__wbg_websockethandle_free(ptr, 0);
|
|
1327
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
|
+
}
|
|
1328
1542
|
/**
|
|
1329
1543
|
* @param {Function} callback
|
|
1330
1544
|
*/
|
|
@@ -1343,17 +1557,6 @@ export class WebSocketHandle {
|
|
|
1343
1557
|
throw takeFromExternrefTable0(ret[0]);
|
|
1344
1558
|
}
|
|
1345
1559
|
}
|
|
1346
|
-
/**
|
|
1347
|
-
* @param {number | null} [code]
|
|
1348
|
-
* @param {string | null} [reason]
|
|
1349
|
-
* @returns {Promise<void>}
|
|
1350
|
-
*/
|
|
1351
|
-
close(code, reason) {
|
|
1352
|
-
var ptr0 = isLikeNone(reason) ? 0 : passStringToWasm0(reason, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1353
|
-
var len0 = WASM_VECTOR_LEN;
|
|
1354
|
-
const ret = wasm.websockethandle_close(this.__wbg_ptr, isLikeNone(code) ? 0xFFFFFF : code, ptr0, len0);
|
|
1355
|
-
return ret;
|
|
1356
|
-
}
|
|
1357
1560
|
}
|
|
1358
1561
|
|
|
1359
1562
|
async function __wbg_load(module, imports) {
|
|
@@ -1421,6 +1624,10 @@ function __wbg_get_imports() {
|
|
|
1421
1624
|
const ret = arg0.call(arg1, arg2, arg3);
|
|
1422
1625
|
return ret;
|
|
1423
1626
|
}, arguments) };
|
|
1627
|
+
imports.wbg.__wbg_cancellationtoken_new = function(arg0) {
|
|
1628
|
+
const ret = CancellationToken.__wrap(arg0);
|
|
1629
|
+
return ret;
|
|
1630
|
+
};
|
|
1424
1631
|
imports.wbg.__wbg_close_2893b7d056a0627d = function() { return handleError(function (arg0) {
|
|
1425
1632
|
arg0.close();
|
|
1426
1633
|
}, arguments) };
|
|
@@ -1576,7 +1783,7 @@ function __wbg_get_imports() {
|
|
|
1576
1783
|
const a = state0.a;
|
|
1577
1784
|
state0.a = 0;
|
|
1578
1785
|
try {
|
|
1579
|
-
return
|
|
1786
|
+
return __wbg_adapter_287(a, state0.b, arg0, arg1);
|
|
1580
1787
|
} finally {
|
|
1581
1788
|
state0.a = a;
|
|
1582
1789
|
}
|
|
@@ -1591,6 +1798,10 @@ function __wbg_get_imports() {
|
|
|
1591
1798
|
const ret = new Object();
|
|
1592
1799
|
return ret;
|
|
1593
1800
|
};
|
|
1801
|
+
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
1802
|
+
const ret = new Map();
|
|
1803
|
+
return ret;
|
|
1804
|
+
};
|
|
1594
1805
|
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
1595
1806
|
const ret = new Array();
|
|
1596
1807
|
return ret;
|
|
@@ -1700,6 +1911,10 @@ function __wbg_get_imports() {
|
|
|
1700
1911
|
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
1701
1912
|
arg0.set(arg1, arg2 >>> 0);
|
|
1702
1913
|
};
|
|
1914
|
+
imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
1915
|
+
const ret = arg0.set(arg1, arg2);
|
|
1916
|
+
return ret;
|
|
1917
|
+
};
|
|
1703
1918
|
imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1704
1919
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1705
1920
|
return ret;
|
|
@@ -1719,6 +1934,10 @@ function __wbg_get_imports() {
|
|
|
1719
1934
|
imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
|
|
1720
1935
|
arg0.onopen = arg1;
|
|
1721
1936
|
};
|
|
1937
|
+
imports.wbg.__wbg_sqlitetransaction_new = function(arg0) {
|
|
1938
|
+
const ret = SqliteTransaction.__wrap(arg0);
|
|
1939
|
+
return ret;
|
|
1940
|
+
};
|
|
1722
1941
|
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
1723
1942
|
const ret = arg1.stack;
|
|
1724
1943
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1774,6 +1993,14 @@ function __wbg_get_imports() {
|
|
|
1774
1993
|
const ret = +arg0;
|
|
1775
1994
|
return ret;
|
|
1776
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
|
+
};
|
|
1777
2004
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
1778
2005
|
const v = arg0;
|
|
1779
2006
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
@@ -1788,24 +2015,24 @@ function __wbg_get_imports() {
|
|
|
1788
2015
|
const ret = false;
|
|
1789
2016
|
return ret;
|
|
1790
2017
|
};
|
|
1791
|
-
imports.wbg.
|
|
1792
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2018
|
+
imports.wbg.__wbindgen_closure_wrapper4808 = function(arg0, arg1, arg2) {
|
|
2019
|
+
const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_50);
|
|
1793
2020
|
return ret;
|
|
1794
2021
|
};
|
|
1795
|
-
imports.wbg.
|
|
1796
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2022
|
+
imports.wbg.__wbindgen_closure_wrapper4810 = function(arg0, arg1, arg2) {
|
|
2023
|
+
const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_50);
|
|
1797
2024
|
return ret;
|
|
1798
2025
|
};
|
|
1799
|
-
imports.wbg.
|
|
1800
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2026
|
+
imports.wbg.__wbindgen_closure_wrapper4812 = function(arg0, arg1, arg2) {
|
|
2027
|
+
const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_50);
|
|
1801
2028
|
return ret;
|
|
1802
2029
|
};
|
|
1803
|
-
imports.wbg.
|
|
1804
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2030
|
+
imports.wbg.__wbindgen_closure_wrapper4814 = function(arg0, arg1, arg2) {
|
|
2031
|
+
const ret = makeMutClosure(arg0, arg1, 1961, __wbg_adapter_50);
|
|
1805
2032
|
return ret;
|
|
1806
2033
|
};
|
|
1807
|
-
imports.wbg.
|
|
1808
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2034
|
+
imports.wbg.__wbindgen_closure_wrapper5411 = function(arg0, arg1, arg2) {
|
|
2035
|
+
const ret = makeMutClosure(arg0, arg1, 2340, __wbg_adapter_59);
|
|
1809
2036
|
return ret;
|
|
1810
2037
|
};
|
|
1811
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,6 +37,7 @@ 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;
|
|
@@ -89,13 +91,28 @@ export const queuemessage_id: (a: number) => bigint;
|
|
|
89
91
|
export const queuemessage_isCompletable: (a: number) => number;
|
|
90
92
|
export const queuemessage_name: (a: number) => [number, number];
|
|
91
93
|
export const roundTripBytes: (a: number, b: number) => [number, number];
|
|
92
|
-
export const schedule_after: (a: number, b: number, c: number, d: number, e: number, f: number) =>
|
|
93
|
-
export const schedule_at: (a: number, b: number, c: number, d: number, e: number, f: number) =>
|
|
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;
|
|
94
106
|
export const sqlitedb_close: (a: number) => any;
|
|
95
107
|
export const sqlitedb_exec: (a: number, b: number, c: number) => any;
|
|
96
108
|
export const sqlitedb_execute: (a: number, b: number, c: number, d: any) => any;
|
|
109
|
+
export const sqlitedb_executeBatch: (a: number, b: any) => any;
|
|
97
110
|
export const sqlitedb_query: (a: number, b: number, c: number, d: any) => any;
|
|
98
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;
|
|
99
116
|
export const uint8ArrayFromBytes: (a: number, b: number) => any;
|
|
100
117
|
export const websockethandle_close: (a: number, b: number, c: number, d: number) => any;
|
|
101
118
|
export const websockethandle_send: (a: number, b: number, c: number, d: number) => [number, number];
|
|
@@ -113,7 +130,7 @@ export const __wbindgen_export_4: WebAssembly.Table;
|
|
|
113
130
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
114
131
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
115
132
|
export const __externref_table_dealloc: (a: number) => void;
|
|
116
|
-
export const
|
|
117
|
-
export const
|
|
118
|
-
export const
|
|
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;
|
|
119
136
|
export const __wbindgen_start: () => void;
|