@rivetkit/rivetkit-wasm 2.3.1 → 2.3.2

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": "2.3.1",
3
+ "version": "2.3.2",
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 uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
4
- export function bridgeRivetErrorPrefix(): string;
5
3
  export function awaitPromise(promise: Promise<any>): Promise<any>;
6
- export function start(): void;
7
4
  export function roundTripBytes(bytes: Uint8Array): Uint8Array;
5
+ export function bridgeRivetErrorPrefix(): string;
6
+ export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
7
+ export function start(): void;
8
8
  export class ActorContext {
9
9
  free(): void;
10
10
  keepAwake(promise: Promise<any>): void;
@@ -238,8 +238,8 @@ export interface InitOutput {
238
238
  readonly start: () => void;
239
239
  readonly actorcontext_queue: (a: number) => number;
240
240
  readonly actorcontext_schedule: (a: number) => number;
241
- readonly __wbg_schedule_free: (a: number, b: number) => void;
242
241
  readonly __wbg_queue_free: (a: number, b: number) => void;
242
+ readonly __wbg_schedule_free: (a: number, b: number) => void;
243
243
  readonly __wbindgen_malloc: (a: number, b: number) => number;
244
244
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
245
245
  readonly __wbindgen_exn_store: (a: number) => void;
@@ -221,15 +221,26 @@ 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
+
224
233
  /**
225
234
  * @param {Uint8Array} bytes
226
235
  * @returns {Uint8Array}
227
236
  */
228
- export function uint8ArrayFromBytes(bytes) {
237
+ export function roundTripBytes(bytes) {
229
238
  const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
230
239
  const len0 = WASM_VECTOR_LEN;
231
- const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
232
- return ret;
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;
233
244
  }
234
245
 
235
246
  /**
@@ -249,11 +260,13 @@ export function bridgeRivetErrorPrefix() {
249
260
  }
250
261
 
251
262
  /**
252
- * @param {Promise<any>} promise
253
- * @returns {Promise<any>}
263
+ * @param {Uint8Array} bytes
264
+ * @returns {Uint8Array}
254
265
  */
255
- export function awaitPromise(promise) {
256
- const ret = wasm.awaitPromise(promise);
266
+ export function uint8ArrayFromBytes(bytes) {
267
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
268
+ const len0 = WASM_VECTOR_LEN;
269
+ const ret = wasm.uint8ArrayFromBytes(ptr0, len0);
257
270
  return ret;
258
271
  }
259
272
 
@@ -261,19 +274,6 @@ export function start() {
261
274
  wasm.start();
262
275
  }
263
276
 
264
- /**
265
- * @param {Uint8Array} bytes
266
- * @returns {Uint8Array}
267
- */
268
- export function roundTripBytes(bytes) {
269
- const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
270
- const len0 = WASM_VECTOR_LEN;
271
- const ret = wasm.roundTripBytes(ptr0, len0);
272
- var v2 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
273
- wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
274
- return v2;
275
- }
276
-
277
277
  function __wbg_adapter_46(arg0, arg1, arg2) {
278
278
  wasm.closure1598_externref_shim(arg0, arg1, arg2);
279
279
  }
Binary file
@@ -102,8 +102,8 @@ export const websockethandle_setEventCallback: (a: number, b: any) => void;
102
102
  export const start: () => void;
103
103
  export const actorcontext_queue: (a: number) => number;
104
104
  export const actorcontext_schedule: (a: number) => number;
105
- export const __wbg_schedule_free: (a: number, b: number) => void;
106
105
  export const __wbg_queue_free: (a: number, b: number) => void;
106
+ export const __wbg_schedule_free: (a: number, b: number) => void;
107
107
  export const __wbindgen_malloc: (a: number, b: number) => number;
108
108
  export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
109
109
  export const __wbindgen_exn_store: (a: number) => void;