@rivetkit/rivetkit-wasm 2.3.3 → 2.3.5-rc.1
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/rivetkit_wasm.d.ts +46 -9
- package/pkg/rivetkit_wasm.js +251 -35
- 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
package/pkg/rivetkit_wasm.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export function awaitPromise(promise: Promise<any>): Promise<any>;
|
|
4
4
|
export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
|
|
5
|
-
export function start(): void;
|
|
6
|
-
export function roundTripBytes(bytes: Uint8Array): Uint8Array;
|
|
7
5
|
export function bridgeRivetErrorPrefix(): string;
|
|
6
|
+
export function roundTripBytes(bytes: Uint8Array): Uint8Array;
|
|
7
|
+
export function start(): void;
|
|
8
8
|
export class ActorContext {
|
|
9
9
|
free(): void;
|
|
10
10
|
keepAwake(promise: Promise<any>): void;
|
|
@@ -26,6 +26,7 @@ export class ActorContext {
|
|
|
26
26
|
endWebsocketCallback(region_id: number): void;
|
|
27
27
|
beginWebsocketCallback(): number;
|
|
28
28
|
dirtyHibernatableConns(): Array<any>;
|
|
29
|
+
saveStateAndWorkflowBatch(writes: any): Promise<void>;
|
|
29
30
|
kv(): Kv;
|
|
30
31
|
waitForTrackedShutdownWork(): Promise<boolean>;
|
|
31
32
|
takePendingHibernationChanges(): Array<any>;
|
|
@@ -114,18 +115,37 @@ export class QueueMessage {
|
|
|
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;
|
|
@@ -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 closure1925_externref_shim: (a: number, b: number, c: any) => void;
|
|
291
|
+
readonly closure2298_externref_shim: (a: number, b: number, c: any) => void;
|
|
292
|
+
readonly closure2531_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
256
293
|
readonly __wbindgen_start: () => void;
|
|
257
294
|
}
|
|
258
295
|
|
package/pkg/rivetkit_wasm.js
CHANGED
|
@@ -241,8 +241,20 @@ export function uint8ArrayFromBytes(bytes) {
|
|
|
241
241
|
return ret;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
/**
|
|
245
|
+
* @returns {string}
|
|
246
|
+
*/
|
|
247
|
+
export function bridgeRivetErrorPrefix() {
|
|
248
|
+
let deferred1_0;
|
|
249
|
+
let deferred1_1;
|
|
250
|
+
try {
|
|
251
|
+
const ret = wasm.bridgeRivetErrorPrefix();
|
|
252
|
+
deferred1_0 = ret[0];
|
|
253
|
+
deferred1_1 = ret[1];
|
|
254
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
255
|
+
} finally {
|
|
256
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
257
|
+
}
|
|
246
258
|
}
|
|
247
259
|
|
|
248
260
|
/**
|
|
@@ -258,32 +270,20 @@ export function roundTripBytes(bytes) {
|
|
|
258
270
|
return v2;
|
|
259
271
|
}
|
|
260
272
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
*/
|
|
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);
|
|
274
|
-
}
|
|
273
|
+
export function start() {
|
|
274
|
+
wasm.start();
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
function
|
|
278
|
-
wasm.
|
|
277
|
+
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
278
|
+
wasm.closure1925_externref_shim(arg0, arg1, arg2);
|
|
279
279
|
}
|
|
280
280
|
|
|
281
|
-
function
|
|
282
|
-
wasm.
|
|
281
|
+
function __wbg_adapter_59(arg0, arg1, arg2) {
|
|
282
|
+
wasm.closure2298_externref_shim(arg0, arg1, arg2);
|
|
283
283
|
}
|
|
284
284
|
|
|
285
|
-
function
|
|
286
|
-
wasm.
|
|
285
|
+
function __wbg_adapter_261(arg0, arg1, arg2, arg3) {
|
|
286
|
+
wasm.closure2531_externref_shim(arg0, arg1, arg2, arg3);
|
|
287
287
|
}
|
|
288
288
|
|
|
289
289
|
const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
|
|
@@ -443,6 +443,14 @@ export class ActorContext {
|
|
|
443
443
|
const ret = wasm.actorcontext_dirtyHibernatableConns(this.__wbg_ptr);
|
|
444
444
|
return ret;
|
|
445
445
|
}
|
|
446
|
+
/**
|
|
447
|
+
* @param {any} writes
|
|
448
|
+
* @returns {Promise<void>}
|
|
449
|
+
*/
|
|
450
|
+
saveStateAndWorkflowBatch(writes) {
|
|
451
|
+
const ret = wasm.actorcontext_saveStateAndWorkflowBatch(this.__wbg_ptr, writes);
|
|
452
|
+
return ret;
|
|
453
|
+
}
|
|
446
454
|
/**
|
|
447
455
|
* @returns {Kv}
|
|
448
456
|
*/
|
|
@@ -1197,29 +1205,139 @@ export class Schedule {
|
|
|
1197
1205
|
const ptr = this.__destroy_into_raw();
|
|
1198
1206
|
wasm.__wbg_schedule_free(ptr, 0);
|
|
1199
1207
|
}
|
|
1208
|
+
/**
|
|
1209
|
+
* @param {string} name
|
|
1210
|
+
* @param {number} interval_ms
|
|
1211
|
+
* @param {string} action_name
|
|
1212
|
+
* @param {Uint8Array} args
|
|
1213
|
+
* @param {number | null} [max_history]
|
|
1214
|
+
* @returns {Promise<void>}
|
|
1215
|
+
*/
|
|
1216
|
+
cronEvery(name, interval_ms, action_name, args, max_history) {
|
|
1217
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1218
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1219
|
+
const ptr1 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1220
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1221
|
+
const ptr2 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1222
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1223
|
+
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);
|
|
1224
|
+
return ret;
|
|
1225
|
+
}
|
|
1226
|
+
/**
|
|
1227
|
+
* @param {string} name
|
|
1228
|
+
* @returns {Promise<boolean>}
|
|
1229
|
+
*/
|
|
1230
|
+
cronDelete(name) {
|
|
1231
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1232
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1233
|
+
const ret = wasm.schedule_cronDelete(this.__wbg_ptr, ptr0, len0);
|
|
1234
|
+
return ret;
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* @param {string} name
|
|
1238
|
+
* @param {number | null} [limit]
|
|
1239
|
+
* @returns {Promise<any>}
|
|
1240
|
+
*/
|
|
1241
|
+
cronHistory(name, limit) {
|
|
1242
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1243
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1244
|
+
const ret = wasm.schedule_cronHistory(this.__wbg_ptr, ptr0, len0, !isLikeNone(limit), isLikeNone(limit) ? 0 : limit);
|
|
1245
|
+
return ret;
|
|
1246
|
+
}
|
|
1200
1247
|
/**
|
|
1201
1248
|
* @param {number} timestamp_ms
|
|
1202
1249
|
* @param {string} action_name
|
|
1203
1250
|
* @param {Uint8Array} args
|
|
1251
|
+
* @returns {Promise<string>}
|
|
1204
1252
|
*/
|
|
1205
1253
|
at(timestamp_ms, action_name, args) {
|
|
1206
1254
|
const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1207
1255
|
const len0 = WASM_VECTOR_LEN;
|
|
1208
1256
|
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1209
1257
|
const len1 = WASM_VECTOR_LEN;
|
|
1210
|
-
wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
|
|
1258
|
+
const ret = wasm.schedule_at(this.__wbg_ptr, timestamp_ms, ptr0, len0, ptr1, len1);
|
|
1259
|
+
return ret;
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* @param {string} id
|
|
1263
|
+
* @returns {Promise<any>}
|
|
1264
|
+
*/
|
|
1265
|
+
get(id) {
|
|
1266
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1267
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1268
|
+
const ret = wasm.schedule_get(this.__wbg_ptr, ptr0, len0);
|
|
1269
|
+
return ret;
|
|
1270
|
+
}
|
|
1271
|
+
/**
|
|
1272
|
+
* @returns {Promise<any>}
|
|
1273
|
+
*/
|
|
1274
|
+
list() {
|
|
1275
|
+
const ret = wasm.schedule_list(this.__wbg_ptr);
|
|
1276
|
+
return ret;
|
|
1211
1277
|
}
|
|
1212
1278
|
/**
|
|
1213
1279
|
* @param {number} duration_ms
|
|
1214
1280
|
* @param {string} action_name
|
|
1215
1281
|
* @param {Uint8Array} args
|
|
1282
|
+
* @returns {Promise<string>}
|
|
1216
1283
|
*/
|
|
1217
1284
|
after(duration_ms, action_name, args) {
|
|
1218
1285
|
const ptr0 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1219
1286
|
const len0 = WASM_VECTOR_LEN;
|
|
1220
1287
|
const ptr1 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1221
1288
|
const len1 = WASM_VECTOR_LEN;
|
|
1222
|
-
wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
|
|
1289
|
+
const ret = wasm.schedule_after(this.__wbg_ptr, duration_ms, ptr0, len0, ptr1, len1);
|
|
1290
|
+
return ret;
|
|
1291
|
+
}
|
|
1292
|
+
/**
|
|
1293
|
+
* @param {string} id
|
|
1294
|
+
* @returns {Promise<boolean>}
|
|
1295
|
+
*/
|
|
1296
|
+
cancel(id) {
|
|
1297
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1298
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1299
|
+
const ret = wasm.schedule_cancel(this.__wbg_ptr, ptr0, len0);
|
|
1300
|
+
return ret;
|
|
1301
|
+
}
|
|
1302
|
+
/**
|
|
1303
|
+
* @param {string} name
|
|
1304
|
+
* @returns {Promise<any>}
|
|
1305
|
+
*/
|
|
1306
|
+
cronGet(name) {
|
|
1307
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1308
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1309
|
+
const ret = wasm.schedule_cronGet(this.__wbg_ptr, ptr0, len0);
|
|
1310
|
+
return ret;
|
|
1311
|
+
}
|
|
1312
|
+
/**
|
|
1313
|
+
* @param {string} name
|
|
1314
|
+
* @param {string} expression
|
|
1315
|
+
* @param {string | null | undefined} timezone
|
|
1316
|
+
* @param {string} action_name
|
|
1317
|
+
* @param {Uint8Array} args
|
|
1318
|
+
* @param {number | null} [max_history]
|
|
1319
|
+
* @returns {Promise<void>}
|
|
1320
|
+
*/
|
|
1321
|
+
cronSet(name, expression, timezone, action_name, args, max_history) {
|
|
1322
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1323
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1324
|
+
const ptr1 = passStringToWasm0(expression, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1325
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1326
|
+
var ptr2 = isLikeNone(timezone) ? 0 : passStringToWasm0(timezone, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1327
|
+
var len2 = WASM_VECTOR_LEN;
|
|
1328
|
+
const ptr3 = passStringToWasm0(action_name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1329
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1330
|
+
const ptr4 = passArray8ToWasm0(args, wasm.__wbindgen_malloc);
|
|
1331
|
+
const len4 = WASM_VECTOR_LEN;
|
|
1332
|
+
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);
|
|
1333
|
+
return ret;
|
|
1334
|
+
}
|
|
1335
|
+
/**
|
|
1336
|
+
* @returns {Promise<any>}
|
|
1337
|
+
*/
|
|
1338
|
+
cronList() {
|
|
1339
|
+
const ret = wasm.schedule_cronList(this.__wbg_ptr);
|
|
1340
|
+
return ret;
|
|
1223
1341
|
}
|
|
1224
1342
|
}
|
|
1225
1343
|
|
|
@@ -1248,6 +1366,22 @@ export class SqliteDb {
|
|
|
1248
1366
|
const ptr = this.__destroy_into_raw();
|
|
1249
1367
|
wasm.__wbg_sqlitedb_free(ptr, 0);
|
|
1250
1368
|
}
|
|
1369
|
+
/**
|
|
1370
|
+
* @param {any} statements
|
|
1371
|
+
* @returns {Promise<any>}
|
|
1372
|
+
*/
|
|
1373
|
+
executeBatch(statements) {
|
|
1374
|
+
const ret = wasm.sqlitedb_executeBatch(this.__wbg_ptr, statements);
|
|
1375
|
+
return ret;
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* @param {number | null} [timeout_ms]
|
|
1379
|
+
* @returns {Promise<SqliteTransaction>}
|
|
1380
|
+
*/
|
|
1381
|
+
beginTransaction(timeout_ms) {
|
|
1382
|
+
const ret = wasm.sqlitedb_beginTransaction(this.__wbg_ptr, !isLikeNone(timeout_ms), isLikeNone(timeout_ms) ? 0 : timeout_ms);
|
|
1383
|
+
return ret;
|
|
1384
|
+
}
|
|
1251
1385
|
/**
|
|
1252
1386
|
* @param {string} sql
|
|
1253
1387
|
* @param {any} params
|
|
@@ -1300,6 +1434,68 @@ export class SqliteDb {
|
|
|
1300
1434
|
}
|
|
1301
1435
|
}
|
|
1302
1436
|
|
|
1437
|
+
const SqliteTransactionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1438
|
+
? { register: () => {}, unregister: () => {} }
|
|
1439
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_sqlitetransaction_free(ptr >>> 0, 1));
|
|
1440
|
+
|
|
1441
|
+
export class SqliteTransaction {
|
|
1442
|
+
|
|
1443
|
+
static __wrap(ptr) {
|
|
1444
|
+
ptr = ptr >>> 0;
|
|
1445
|
+
const obj = Object.create(SqliteTransaction.prototype);
|
|
1446
|
+
obj.__wbg_ptr = ptr;
|
|
1447
|
+
SqliteTransactionFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1448
|
+
return obj;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
__destroy_into_raw() {
|
|
1452
|
+
const ptr = this.__wbg_ptr;
|
|
1453
|
+
this.__wbg_ptr = 0;
|
|
1454
|
+
SqliteTransactionFinalization.unregister(this);
|
|
1455
|
+
return ptr;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
free() {
|
|
1459
|
+
const ptr = this.__destroy_into_raw();
|
|
1460
|
+
wasm.__wbg_sqlitetransaction_free(ptr, 0);
|
|
1461
|
+
}
|
|
1462
|
+
/**
|
|
1463
|
+
* @param {string} sql
|
|
1464
|
+
* @returns {Promise<any>}
|
|
1465
|
+
*/
|
|
1466
|
+
exec(sql) {
|
|
1467
|
+
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1468
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1469
|
+
const ret = wasm.sqlitetransaction_exec(this.__wbg_ptr, ptr0, len0);
|
|
1470
|
+
return ret;
|
|
1471
|
+
}
|
|
1472
|
+
/**
|
|
1473
|
+
* @returns {Promise<void>}
|
|
1474
|
+
*/
|
|
1475
|
+
commit() {
|
|
1476
|
+
const ret = wasm.sqlitetransaction_commit(this.__wbg_ptr);
|
|
1477
|
+
return ret;
|
|
1478
|
+
}
|
|
1479
|
+
/**
|
|
1480
|
+
* @param {string} sql
|
|
1481
|
+
* @param {any} params
|
|
1482
|
+
* @returns {Promise<any>}
|
|
1483
|
+
*/
|
|
1484
|
+
execute(sql, params) {
|
|
1485
|
+
const ptr0 = passStringToWasm0(sql, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1486
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1487
|
+
const ret = wasm.sqlitetransaction_execute(this.__wbg_ptr, ptr0, len0, params);
|
|
1488
|
+
return ret;
|
|
1489
|
+
}
|
|
1490
|
+
/**
|
|
1491
|
+
* @returns {Promise<void>}
|
|
1492
|
+
*/
|
|
1493
|
+
rollback() {
|
|
1494
|
+
const ret = wasm.sqlitetransaction_rollback(this.__wbg_ptr);
|
|
1495
|
+
return ret;
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1303
1499
|
const WebSocketHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1304
1500
|
? { register: () => {}, unregister: () => {} }
|
|
1305
1501
|
: new FinalizationRegistry(ptr => wasm.__wbg_websockethandle_free(ptr >>> 0, 1));
|
|
@@ -1576,7 +1772,7 @@ function __wbg_get_imports() {
|
|
|
1576
1772
|
const a = state0.a;
|
|
1577
1773
|
state0.a = 0;
|
|
1578
1774
|
try {
|
|
1579
|
-
return
|
|
1775
|
+
return __wbg_adapter_261(a, state0.b, arg0, arg1);
|
|
1580
1776
|
} finally {
|
|
1581
1777
|
state0.a = a;
|
|
1582
1778
|
}
|
|
@@ -1591,6 +1787,10 @@ function __wbg_get_imports() {
|
|
|
1591
1787
|
const ret = new Object();
|
|
1592
1788
|
return ret;
|
|
1593
1789
|
};
|
|
1790
|
+
imports.wbg.__wbg_new_5e0be73521bc8c17 = function() {
|
|
1791
|
+
const ret = new Map();
|
|
1792
|
+
return ret;
|
|
1793
|
+
};
|
|
1594
1794
|
imports.wbg.__wbg_new_78feb108b6472713 = function() {
|
|
1595
1795
|
const ret = new Array();
|
|
1596
1796
|
return ret;
|
|
@@ -1700,6 +1900,10 @@ function __wbg_get_imports() {
|
|
|
1700
1900
|
imports.wbg.__wbg_set_65595bdd868b3009 = function(arg0, arg1, arg2) {
|
|
1701
1901
|
arg0.set(arg1, arg2 >>> 0);
|
|
1702
1902
|
};
|
|
1903
|
+
imports.wbg.__wbg_set_8fc6bf8a5b1071d1 = function(arg0, arg1, arg2) {
|
|
1904
|
+
const ret = arg0.set(arg1, arg2);
|
|
1905
|
+
return ret;
|
|
1906
|
+
};
|
|
1703
1907
|
imports.wbg.__wbg_set_bb8cecf6a62b9f46 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
1704
1908
|
const ret = Reflect.set(arg0, arg1, arg2);
|
|
1705
1909
|
return ret;
|
|
@@ -1719,6 +1923,10 @@ function __wbg_get_imports() {
|
|
|
1719
1923
|
imports.wbg.__wbg_setonopen_2da654e1f39745d5 = function(arg0, arg1) {
|
|
1720
1924
|
arg0.onopen = arg1;
|
|
1721
1925
|
};
|
|
1926
|
+
imports.wbg.__wbg_sqlitetransaction_new = function(arg0) {
|
|
1927
|
+
const ret = SqliteTransaction.__wrap(arg0);
|
|
1928
|
+
return ret;
|
|
1929
|
+
};
|
|
1722
1930
|
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
1723
1931
|
const ret = arg1.stack;
|
|
1724
1932
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
@@ -1774,6 +1982,14 @@ function __wbg_get_imports() {
|
|
|
1774
1982
|
const ret = +arg0;
|
|
1775
1983
|
return ret;
|
|
1776
1984
|
};
|
|
1985
|
+
imports.wbg.__wbindgen_bigint_from_i64 = function(arg0) {
|
|
1986
|
+
const ret = arg0;
|
|
1987
|
+
return ret;
|
|
1988
|
+
};
|
|
1989
|
+
imports.wbg.__wbindgen_bigint_from_u64 = function(arg0) {
|
|
1990
|
+
const ret = BigInt.asUintN(64, arg0);
|
|
1991
|
+
return ret;
|
|
1992
|
+
};
|
|
1777
1993
|
imports.wbg.__wbindgen_boolean_get = function(arg0) {
|
|
1778
1994
|
const v = arg0;
|
|
1779
1995
|
const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
|
|
@@ -1788,24 +2004,24 @@ function __wbg_get_imports() {
|
|
|
1788
2004
|
const ret = false;
|
|
1789
2005
|
return ret;
|
|
1790
2006
|
};
|
|
1791
|
-
imports.wbg.
|
|
1792
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2007
|
+
imports.wbg.__wbindgen_closure_wrapper4459 = function(arg0, arg1, arg2) {
|
|
2008
|
+
const ret = makeMutClosure(arg0, arg1, 1926, __wbg_adapter_50);
|
|
1793
2009
|
return ret;
|
|
1794
2010
|
};
|
|
1795
|
-
imports.wbg.
|
|
1796
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2011
|
+
imports.wbg.__wbindgen_closure_wrapper4461 = function(arg0, arg1, arg2) {
|
|
2012
|
+
const ret = makeMutClosure(arg0, arg1, 1926, __wbg_adapter_50);
|
|
1797
2013
|
return ret;
|
|
1798
2014
|
};
|
|
1799
|
-
imports.wbg.
|
|
1800
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2015
|
+
imports.wbg.__wbindgen_closure_wrapper4463 = function(arg0, arg1, arg2) {
|
|
2016
|
+
const ret = makeMutClosure(arg0, arg1, 1926, __wbg_adapter_50);
|
|
1801
2017
|
return ret;
|
|
1802
2018
|
};
|
|
1803
|
-
imports.wbg.
|
|
1804
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2019
|
+
imports.wbg.__wbindgen_closure_wrapper4465 = function(arg0, arg1, arg2) {
|
|
2020
|
+
const ret = makeMutClosure(arg0, arg1, 1926, __wbg_adapter_50);
|
|
1805
2021
|
return ret;
|
|
1806
2022
|
};
|
|
1807
|
-
imports.wbg.
|
|
1808
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
2023
|
+
imports.wbg.__wbindgen_closure_wrapper5336 = function(arg0, arg1, arg2) {
|
|
2024
|
+
const ret = makeMutClosure(arg0, arg1, 2299, __wbg_adapter_59);
|
|
1809
2025
|
return ret;
|
|
1810
2026
|
};
|
|
1811
2027
|
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 closure1925_externref_shim: (a: number, b: number, c: any) => void;
|
|
134
|
+
export const closure2298_externref_shim: (a: number, b: number, c: any) => void;
|
|
135
|
+
export const closure2531_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
119
136
|
export const __wbindgen_start: () => void;
|