@rivetkit/rivetkit-wasm 2.3.3-rc.1 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -120,6 +120,7 @@ export class Queue {
120
120
  waitForNamesAvailable(names: any, options: any): Promise<void>;
121
121
  send(name: string, body: Uint8Array): Promise<QueueMessage>;
122
122
  maxSize(): number;
123
+ reset(): Promise<void>;
123
124
  }
124
125
 
125
126
  export class QueueMessage {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/rivetkit-wasm",
3
- "version": "2.3.3-rc.1",
3
+ "version": "2.3.3",
4
4
  "description": "WebAssembly bindings for RivetKit core on edge JavaScript runtimes",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -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
3
  export function awaitPromise(promise: Promise<any>): Promise<any>;
4
+ export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
6
5
  export function start(): void;
7
6
  export function roundTripBytes(bytes: Uint8Array): Uint8Array;
7
+ export function bridgeRivetErrorPrefix(): string;
8
8
  export class ActorContext {
9
9
  free(): void;
10
10
  keepAwake(promise: Promise<any>): void;
@@ -98,6 +98,7 @@ export class Queue {
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
+ reset(): Promise<void>;
101
102
  maxSize(): number;
102
103
  }
103
104
  export class QueueMessage {
@@ -213,6 +214,7 @@ export interface InitOutput {
213
214
  readonly queue_inspectMessages: (a: number) => any;
214
215
  readonly queue_maxSize: (a: number) => number;
215
216
  readonly queue_nextBatch: (a: number, b: any, c: number) => any;
217
+ readonly queue_reset: (a: number) => any;
216
218
  readonly queue_send: (a: number, b: number, c: number, d: number, e: number) => any;
217
219
  readonly queue_tryNextBatch: (a: number, b: any) => [number, number, number];
218
220
  readonly queue_waitForNames: (a: number, b: any, c: any, d: number) => any;
@@ -238,8 +240,8 @@ export interface InitOutput {
238
240
  readonly start: () => void;
239
241
  readonly actorcontext_queue: (a: number) => number;
240
242
  readonly actorcontext_schedule: (a: number) => number;
241
- readonly __wbg_queue_free: (a: number, b: number) => void;
242
243
  readonly __wbg_schedule_free: (a: number, b: number) => void;
244
+ readonly __wbg_queue_free: (a: number, b: number) => void;
243
245
  readonly __wbindgen_malloc: (a: number, b: number) => number;
244
246
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
245
247
  readonly __wbindgen_exn_store: (a: number) => void;
@@ -248,9 +250,9 @@ export interface InitOutput {
248
250
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
249
251
  readonly __wbindgen_export_6: WebAssembly.Table;
250
252
  readonly __externref_table_dealloc: (a: number) => void;
251
- readonly closure1598_externref_shim: (a: number, b: number, c: any) => void;
252
- readonly closure1950_externref_shim: (a: number, b: number, c: any) => void;
253
- readonly closure2181_externref_shim: (a: number, b: number, c: any, d: any) => void;
253
+ readonly closure1607_externref_shim: (a: number, b: number, c: any) => void;
254
+ readonly closure1959_externref_shim: (a: number, b: number, c: any) => void;
255
+ readonly closure2190_externref_shim: (a: number, b: number, c: any, d: any) => void;
254
256
  readonly __wbindgen_start: () => void;
255
257
  }
256
258
 
@@ -222,19 +222,12 @@ function _assertClass(instance, klass) {
222
222
  }
223
223
  }
224
224
  /**
225
- * @returns {string}
225
+ * @param {Promise<any>} promise
226
+ * @returns {Promise<any>}
226
227
  */
227
- export function bridgeRivetErrorPrefix() {
228
- let deferred1_0;
229
- let deferred1_1;
230
- try {
231
- const ret = wasm.bridgeRivetErrorPrefix();
232
- deferred1_0 = ret[0];
233
- deferred1_1 = ret[1];
234
- return getStringFromWasm0(ret[0], ret[1]);
235
- } finally {
236
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
237
- }
228
+ export function awaitPromise(promise) {
229
+ const ret = wasm.awaitPromise(promise);
230
+ return ret;
238
231
  }
239
232
 
240
233
  /**
@@ -248,15 +241,6 @@ export function uint8ArrayFromBytes(bytes) {
248
241
  return ret;
249
242
  }
250
243
 
251
- /**
252
- * @param {Promise<any>} promise
253
- * @returns {Promise<any>}
254
- */
255
- export function awaitPromise(promise) {
256
- const ret = wasm.awaitPromise(promise);
257
- return ret;
258
- }
259
-
260
244
  export function start() {
261
245
  wasm.start();
262
246
  }
@@ -274,16 +258,32 @@ export function roundTripBytes(bytes) {
274
258
  return v2;
275
259
  }
276
260
 
261
+ /**
262
+ * @returns {string}
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
+ }
275
+ }
276
+
277
277
  function __wbg_adapter_46(arg0, arg1, arg2) {
278
- wasm.closure1598_externref_shim(arg0, arg1, arg2);
278
+ wasm.closure1607_externref_shim(arg0, arg1, arg2);
279
279
  }
280
280
 
281
281
  function __wbg_adapter_55(arg0, arg1, arg2) {
282
- wasm.closure1950_externref_shim(arg0, arg1, arg2);
282
+ wasm.closure1959_externref_shim(arg0, arg1, arg2);
283
283
  }
284
284
 
285
- function __wbg_adapter_276(arg0, arg1, arg2, arg3) {
286
- wasm.closure2181_externref_shim(arg0, arg1, arg2, arg3);
285
+ function __wbg_adapter_239(arg0, arg1, arg2, arg3) {
286
+ wasm.closure2190_externref_shim(arg0, arg1, arg2, arg3);
287
287
  }
288
288
 
289
289
  const __wbindgen_enum_BinaryType = ["blob", "arraybuffer"];
@@ -1076,6 +1076,13 @@ export class Queue {
1076
1076
  const ret = wasm.queue_send(this.__wbg_ptr, ptr0, len0, ptr1, len1);
1077
1077
  return ret;
1078
1078
  }
1079
+ /**
1080
+ * @returns {Promise<void>}
1081
+ */
1082
+ reset() {
1083
+ const ret = wasm.queue_reset(this.__wbg_ptr);
1084
+ return ret;
1085
+ }
1079
1086
  /**
1080
1087
  * @returns {number}
1081
1088
  */
@@ -1569,7 +1576,7 @@ function __wbg_get_imports() {
1569
1576
  const a = state0.a;
1570
1577
  state0.a = 0;
1571
1578
  try {
1572
- return __wbg_adapter_276(a, state0.b, arg0, arg1);
1579
+ return __wbg_adapter_239(a, state0.b, arg0, arg1);
1573
1580
  } finally {
1574
1581
  state0.a = a;
1575
1582
  }
@@ -1781,24 +1788,24 @@ function __wbg_get_imports() {
1781
1788
  const ret = false;
1782
1789
  return ret;
1783
1790
  };
1784
- imports.wbg.__wbindgen_closure_wrapper3728 = function(arg0, arg1, arg2) {
1785
- const ret = makeMutClosure(arg0, arg1, 1599, __wbg_adapter_46);
1791
+ imports.wbg.__wbindgen_closure_wrapper3769 = function(arg0, arg1, arg2) {
1792
+ const ret = makeMutClosure(arg0, arg1, 1608, __wbg_adapter_46);
1786
1793
  return ret;
1787
1794
  };
1788
- imports.wbg.__wbindgen_closure_wrapper3730 = function(arg0, arg1, arg2) {
1789
- const ret = makeMutClosure(arg0, arg1, 1599, __wbg_adapter_46);
1795
+ imports.wbg.__wbindgen_closure_wrapper3771 = function(arg0, arg1, arg2) {
1796
+ const ret = makeMutClosure(arg0, arg1, 1608, __wbg_adapter_46);
1790
1797
  return ret;
1791
1798
  };
1792
- imports.wbg.__wbindgen_closure_wrapper3732 = function(arg0, arg1, arg2) {
1793
- const ret = makeMutClosure(arg0, arg1, 1599, __wbg_adapter_46);
1799
+ imports.wbg.__wbindgen_closure_wrapper3773 = function(arg0, arg1, arg2) {
1800
+ const ret = makeMutClosure(arg0, arg1, 1608, __wbg_adapter_46);
1794
1801
  return ret;
1795
1802
  };
1796
- imports.wbg.__wbindgen_closure_wrapper3734 = function(arg0, arg1, arg2) {
1797
- const ret = makeMutClosure(arg0, arg1, 1599, __wbg_adapter_46);
1803
+ imports.wbg.__wbindgen_closure_wrapper3775 = function(arg0, arg1, arg2) {
1804
+ const ret = makeMutClosure(arg0, arg1, 1608, __wbg_adapter_46);
1798
1805
  return ret;
1799
1806
  };
1800
- imports.wbg.__wbindgen_closure_wrapper4575 = function(arg0, arg1, arg2) {
1801
- const ret = makeMutClosure(arg0, arg1, 1951, __wbg_adapter_55);
1807
+ imports.wbg.__wbindgen_closure_wrapper4617 = function(arg0, arg1, arg2) {
1808
+ const ret = makeMutClosure(arg0, arg1, 1960, __wbg_adapter_55);
1802
1809
  return ret;
1803
1810
  };
1804
1811
  imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
Binary file
@@ -77,6 +77,7 @@ export const queue_enqueueAndWait: (a: number, b: number, c: number, d: number,
77
77
  export const queue_inspectMessages: (a: number) => any;
78
78
  export const queue_maxSize: (a: number) => number;
79
79
  export const queue_nextBatch: (a: number, b: any, c: number) => any;
80
+ export const queue_reset: (a: number) => any;
80
81
  export const queue_send: (a: number, b: number, c: number, d: number, e: number) => any;
81
82
  export const queue_tryNextBatch: (a: number, b: any) => [number, number, number];
82
83
  export const queue_waitForNames: (a: number, b: any, c: any, d: number) => any;
@@ -102,8 +103,8 @@ export const websockethandle_setEventCallback: (a: number, b: any) => void;
102
103
  export const start: () => void;
103
104
  export const actorcontext_queue: (a: number) => number;
104
105
  export const actorcontext_schedule: (a: number) => number;
105
- export const __wbg_queue_free: (a: number, b: number) => void;
106
106
  export const __wbg_schedule_free: (a: number, b: number) => void;
107
+ export const __wbg_queue_free: (a: number, b: number) => void;
107
108
  export const __wbindgen_malloc: (a: number, b: number) => number;
108
109
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
109
110
  export const __wbindgen_exn_store: (a: number) => void;
@@ -112,7 +113,7 @@ export const __wbindgen_export_4: WebAssembly.Table;
112
113
  export const __wbindgen_free: (a: number, b: number, c: number) => void;
113
114
  export const __wbindgen_export_6: WebAssembly.Table;
114
115
  export const __externref_table_dealloc: (a: number) => void;
115
- export const closure1598_externref_shim: (a: number, b: number, c: any) => void;
116
- export const closure1950_externref_shim: (a: number, b: number, c: any) => void;
117
- export const closure2181_externref_shim: (a: number, b: number, c: any, d: any) => void;
116
+ export const closure1607_externref_shim: (a: number, b: number, c: any) => void;
117
+ export const closure1959_externref_shim: (a: number, b: number, c: any) => void;
118
+ export const closure2190_externref_shim: (a: number, b: number, c: any, d: any) => void;
118
119
  export const __wbindgen_start: () => void;