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