@rivetkit/rivetkit-wasm 0.0.0-main.b81dab2 → 0.0.0-nathan-2-3-0-rc.9bfd2bc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/rivetkit-wasm",
3
- "version": "0.0.0-main.b81dab2",
3
+ "version": "0.0.0-nathan-2-3-0-rc.9bfd2bc",
4
4
  "description": "WebAssembly bindings for RivetKit core on edge JavaScript runtimes",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -1,13 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function awaitPromise(promise: Promise<any>): Promise<any>;
4
3
  export function roundTripBytes(bytes: Uint8Array): Uint8Array;
5
4
  export function start(): void;
6
- export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
5
+ export function awaitPromise(promise: Promise<any>): Promise<any>;
7
6
  export function bridgeRivetErrorPrefix(): string;
7
+ export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
8
8
  export class ActorContext {
9
9
  free(): void;
10
- keepAwake(promise: Promise<any>): Promise<any>;
10
+ keepAwake(promise: Promise<any>): void;
11
11
  saveState(payload: any): Promise<void>;
12
12
  waitUntil(promise: Promise<any>): void;
13
13
  abortSignal(): any;
@@ -15,6 +15,8 @@ export class ActorContext {
15
15
  requestSave(opts: any): void;
16
16
  registerTask(promise: Promise<any>): void;
17
17
  runtimeState(): any;
18
+ endKeepAwake(region_id: number): void;
19
+ beginKeepAwake(): number;
18
20
  inspectorSnapshot(): object;
19
21
  endOnStateChange(): void;
20
22
  restartRunHandler(): void;
@@ -25,6 +27,7 @@ export class ActorContext {
25
27
  beginWebsocketCallback(): number;
26
28
  dirtyHibernatableConns(): Array<any>;
27
29
  kv(): Kv;
30
+ waitForTrackedShutdownWork(): Promise<boolean>;
28
31
  takePendingHibernationChanges(): Array<any>;
29
32
  key(): any;
30
33
  constructor();
@@ -144,6 +147,7 @@ export interface InitOutput {
144
147
  readonly __wbg_websockethandle_free: (a: number, b: number) => void;
145
148
  readonly actorcontext_abortSignal: (a: number) => [number, number, number];
146
149
  readonly actorcontext_actorId: (a: number) => [number, number];
150
+ readonly actorcontext_beginKeepAwake: (a: number) => number;
147
151
  readonly actorcontext_beginOnStateChange: (a: number) => void;
148
152
  readonly actorcontext_beginWebsocketCallback: (a: number) => number;
149
153
  readonly actorcontext_broadcast: (a: number, b: number, c: number, d: number, e: number) => void;
@@ -151,10 +155,11 @@ export interface InitOutput {
151
155
  readonly actorcontext_conns: (a: number) => any;
152
156
  readonly actorcontext_destroy: (a: number) => [number, number];
153
157
  readonly actorcontext_dirtyHibernatableConns: (a: number) => any;
158
+ readonly actorcontext_endKeepAwake: (a: number, b: number) => void;
154
159
  readonly actorcontext_endOnStateChange: (a: number) => void;
155
160
  readonly actorcontext_endWebsocketCallback: (a: number, b: number) => void;
156
161
  readonly actorcontext_inspectorSnapshot: (a: number) => [number, number, number];
157
- readonly actorcontext_keepAwake: (a: number, b: any) => any;
162
+ readonly actorcontext_keepAwake: (a: number, b: any) => void;
158
163
  readonly actorcontext_key: (a: number) => [number, number, number];
159
164
  readonly actorcontext_kv: (a: number) => number;
160
165
  readonly actorcontext_name: (a: number) => [number, number];
@@ -172,6 +177,7 @@ export interface InitOutput {
172
177
  readonly actorcontext_state: (a: number) => [number, number];
173
178
  readonly actorcontext_takePendingHibernationChanges: (a: number) => any;
174
179
  readonly actorcontext_verifyInspectorAuth: (a: number, b: number, c: number) => any;
180
+ readonly actorcontext_waitForTrackedShutdownWork: (a: number) => any;
175
181
  readonly actorcontext_waitUntil: (a: number, b: any) => void;
176
182
  readonly actorfactory_new: (a: any, b: any) => [number, number, number];
177
183
  readonly awaitPromise: (a: any) => any;
@@ -240,9 +246,9 @@ export interface InitOutput {
240
246
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
241
247
  readonly __wbindgen_export_6: WebAssembly.Table;
242
248
  readonly __externref_table_dealloc: (a: number) => void;
243
- readonly closure1601_externref_shim: (a: number, b: number, c: any) => void;
244
- readonly closure1804_externref_shim: (a: number, b: number, c: any) => void;
245
- readonly closure2017_externref_shim: (a: number, b: number, c: any, d: any) => void;
249
+ readonly closure1688_externref_shim: (a: number, b: number, c: any) => void;
250
+ readonly closure1892_externref_shim: (a: number, b: number, c: any) => void;
251
+ readonly closure2115_externref_shim: (a: number, b: number, c: any, d: any) => void;
246
252
  readonly __wbindgen_start: () => void;
247
253
  }
248
254
 
@@ -221,15 +221,6 @@ function _assertClass(instance, klass) {
221
221
  throw new Error(`expected instance of ${klass.name}`);
222
222
  }
223
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
224
  /**
234
225
  * @param {Uint8Array} bytes
235
226
  * @returns {Uint8Array}
@@ -248,13 +239,11 @@ export function start() {
248
239
  }
249
240
 
250
241
  /**
251
- * @param {Uint8Array} bytes
252
- * @returns {Uint8Array}
242
+ * @param {Promise<any>} promise
243
+ * @returns {Promise<any>}
253
244
  */
254
- export function uint8ArrayFromBytes(bytes) {
255
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
256
- const len0 = WASM_VECTOR_LEN;
257
- const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
245
+ export function awaitPromise(promise) {
246
+ const ret = wasm.awaitPromise(promise);
258
247
  return ret;
259
248
  }
260
249
 
@@ -274,16 +263,27 @@ export function bridgeRivetErrorPrefix() {
274
263
  }
275
264
  }
276
265
 
266
+ /**
267
+ * @param {Uint8Array} bytes
268
+ * @returns {Uint8Array}
269
+ */
270
+ export function uint8ArrayFromBytes(bytes) {
271
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
272
+ const len0 = WASM_VECTOR_LEN;
273
+ const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
274
+ return ret;
275
+ }
276
+
277
277
  function __wbg_adapter_46(arg0, arg1, arg2) {
278
- wasm.closure1601_externref_shim(arg0, arg1, arg2);
278
+ wasm.closure1688_externref_shim(arg0, arg1, arg2);
279
279
  }
280
280
 
281
281
  function __wbg_adapter_55(arg0, arg1, arg2) {
282
- wasm.closure1804_externref_shim(arg0, arg1, arg2);
282
+ wasm.closure1892_externref_shim(arg0, arg1, arg2);
283
283
  }
284
284
 
285
- function __wbg_adapter_222(arg0, arg1, arg2, arg3) {
286
- wasm.closure2017_externref_shim(arg0, arg1, arg2, arg3);
285
+ function __wbg_adapter_225(arg0, arg1, arg2, arg3) {
286
+ wasm.closure2115_externref_shim(arg0, arg1, arg2, arg3);
287
287
  }
288
288
 
289
289
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -315,11 +315,9 @@ export class ActorContext {
315
315
  }
316
316
  /**
317
317
  * @param {Promise<any>} promise
318
- * @returns {Promise<any>}
319
318
  */
320
319
  keepAwake(promise) {
321
- const ret = wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
322
- return ret;
320
+ wasm.actorcontext_keepAwake(this.__wbg_ptr, promise);
323
321
  }
324
322
  /**
325
323
  * @param {any} payload
@@ -375,6 +373,19 @@ export class ActorContext {
375
373
  const ret = wasm.actorcontext_runtimeState(this.__wbg_ptr);
376
374
  return ret;
377
375
  }
376
+ /**
377
+ * @param {number} region_id
378
+ */
379
+ endKeepAwake(region_id) {
380
+ wasm.actorcontext_endKeepAwake(this.__wbg_ptr, region_id);
381
+ }
382
+ /**
383
+ * @returns {number}
384
+ */
385
+ beginKeepAwake() {
386
+ const ret = wasm.actorcontext_beginKeepAwake(this.__wbg_ptr);
387
+ return ret >>> 0;
388
+ }
378
389
  /**
379
390
  * @returns {object}
380
391
  */
@@ -439,6 +450,13 @@ export class ActorContext {
439
450
  const ret = wasm.actorcontext_kv(this.__wbg_ptr);
440
451
  return Kv.__wrap(ret);
441
452
  }
453
+ /**
454
+ * @returns {Promise<boolean>}
455
+ */
456
+ waitForTrackedShutdownWork() {
457
+ const ret = wasm.actorcontext_waitForTrackedShutdownWork(this.__wbg_ptr);
458
+ return ret;
459
+ }
442
460
  /**
443
461
  * @returns {Array<any>}
444
462
  */
@@ -1544,7 +1562,7 @@ function __wbg_get_imports() {
1544
1562
  const a = state0.a;
1545
1563
  state0.a = 0;
1546
1564
  try {
1547
- return __wbg_adapter_222(a, state0.b, arg0, arg1);
1565
+ return __wbg_adapter_225(a, state0.b, arg0, arg1);
1548
1566
  } finally {
1549
1567
  state0.a = a;
1550
1568
  }
@@ -1756,24 +1774,24 @@ function __wbg_get_imports() {
1756
1774
  const ret = false;
1757
1775
  return ret;
1758
1776
  };
1759
- imports.wbg.__wbindgen_closure_wrapper3766 = function(arg0, arg1, arg2) {
1760
- const ret = makeMutClosure(arg0, arg1, 1602, __wbg_adapter_46);
1777
+ imports.wbg.__wbindgen_closure_wrapper3861 = function(arg0, arg1, arg2) {
1778
+ const ret = makeMutClosure(arg0, arg1, 1689, __wbg_adapter_46);
1761
1779
  return ret;
1762
1780
  };
1763
- imports.wbg.__wbindgen_closure_wrapper3768 = function(arg0, arg1, arg2) {
1764
- const ret = makeMutClosure(arg0, arg1, 1602, __wbg_adapter_46);
1781
+ imports.wbg.__wbindgen_closure_wrapper3863 = function(arg0, arg1, arg2) {
1782
+ const ret = makeMutClosure(arg0, arg1, 1689, __wbg_adapter_46);
1765
1783
  return ret;
1766
1784
  };
1767
- imports.wbg.__wbindgen_closure_wrapper3770 = function(arg0, arg1, arg2) {
1768
- const ret = makeMutClosure(arg0, arg1, 1602, __wbg_adapter_46);
1785
+ imports.wbg.__wbindgen_closure_wrapper3865 = function(arg0, arg1, arg2) {
1786
+ const ret = makeMutClosure(arg0, arg1, 1689, __wbg_adapter_46);
1769
1787
  return ret;
1770
1788
  };
1771
- imports.wbg.__wbindgen_closure_wrapper3772 = function(arg0, arg1, arg2) {
1772
- const ret = makeMutClosure(arg0, arg1, 1602, __wbg_adapter_46);
1789
+ imports.wbg.__wbindgen_closure_wrapper3867 = function(arg0, arg1, arg2) {
1790
+ const ret = makeMutClosure(arg0, arg1, 1689, __wbg_adapter_46);
1773
1791
  return ret;
1774
1792
  };
1775
- imports.wbg.__wbindgen_closure_wrapper4370 = function(arg0, arg1, arg2) {
1776
- const ret = makeMutClosure(arg0, arg1, 1805, __wbg_adapter_55);
1793
+ imports.wbg.__wbindgen_closure_wrapper4467 = function(arg0, arg1, arg2) {
1794
+ const ret = makeMutClosure(arg0, arg1, 1893, __wbg_adapter_55);
1777
1795
  return ret;
1778
1796
  };
1779
1797
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file
@@ -12,6 +12,7 @@ export const __wbg_sqlitedb_free: (a: number, b: number) => void;
12
12
  export const __wbg_websockethandle_free: (a: number, b: number) => void;
13
13
  export const actorcontext_abortSignal: (a: number) => [number, number, number];
14
14
  export const actorcontext_actorId: (a: number) => [number, number];
15
+ export const actorcontext_beginKeepAwake: (a: number) => number;
15
16
  export const actorcontext_beginOnStateChange: (a: number) => void;
16
17
  export const actorcontext_beginWebsocketCallback: (a: number) => number;
17
18
  export const actorcontext_broadcast: (a: number, b: number, c: number, d: number, e: number) => void;
@@ -19,10 +20,11 @@ export const actorcontext_connectConn: (a: number, b: number, c: number, d: any)
19
20
  export const actorcontext_conns: (a: number) => any;
20
21
  export const actorcontext_destroy: (a: number) => [number, number];
21
22
  export const actorcontext_dirtyHibernatableConns: (a: number) => any;
23
+ export const actorcontext_endKeepAwake: (a: number, b: number) => void;
22
24
  export const actorcontext_endOnStateChange: (a: number) => void;
23
25
  export const actorcontext_endWebsocketCallback: (a: number, b: number) => void;
24
26
  export const actorcontext_inspectorSnapshot: (a: number) => [number, number, number];
25
- export const actorcontext_keepAwake: (a: number, b: any) => any;
27
+ export const actorcontext_keepAwake: (a: number, b: any) => void;
26
28
  export const actorcontext_key: (a: number) => [number, number, number];
27
29
  export const actorcontext_kv: (a: number) => number;
28
30
  export const actorcontext_name: (a: number) => [number, number];
@@ -40,6 +42,7 @@ export const actorcontext_sql: (a: number) => number;
40
42
  export const actorcontext_state: (a: number) => [number, number];
41
43
  export const actorcontext_takePendingHibernationChanges: (a: number) => any;
42
44
  export const actorcontext_verifyInspectorAuth: (a: number, b: number, c: number) => any;
45
+ export const actorcontext_waitForTrackedShutdownWork: (a: number) => any;
43
46
  export const actorcontext_waitUntil: (a: number, b: any) => void;
44
47
  export const actorfactory_new: (a: any, b: any) => [number, number, number];
45
48
  export const awaitPromise: (a: any) => any;
@@ -108,7 +111,7 @@ export const __wbindgen_export_4: WebAssembly.Table;
108
111
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
109
112
  export const __wbindgen_export_6: WebAssembly.Table;
110
113
  export const __externref_table_dealloc: (a: number) => void;
111
- export const closure1601_externref_shim: (a: number, b: number, c: any) => void;
112
- export const closure1804_externref_shim: (a: number, b: number, c: any) => void;
113
- export const closure2017_externref_shim: (a: number, b: number, c: any, d: any) => void;
114
+ export const closure1688_externref_shim: (a: number, b: number, c: any) => void;
115
+ export const closure1892_externref_shim: (a: number, b: number, c: any) => void;
116
+ export const closure2115_externref_shim: (a: number, b: number, c: any, d: any) => void;
114
117
  export const __wbindgen_start: () => void;