@rivetkit/rivetkit-wasm 0.0.0-pr.4860.2a8ccdf

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.
Binary file
@@ -0,0 +1,115 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const __wbg_actorcontext_free: (a: number, b: number) => void;
5
+ export const __wbg_actorfactory_free: (a: number, b: number) => void;
6
+ export const __wbg_cancellationtoken_free: (a: number, b: number) => void;
7
+ export const __wbg_connhandle_free: (a: number, b: number) => void;
8
+ export const __wbg_coreregistry_free: (a: number, b: number) => void;
9
+ export const __wbg_kv_free: (a: number, b: number) => void;
10
+ export const __wbg_queuemessage_free: (a: number, b: number) => void;
11
+ export const __wbg_sqlitedb_free: (a: number, b: number) => void;
12
+ export const __wbg_websockethandle_free: (a: number, b: number) => void;
13
+ export const actorcontext_abortSignal: (a: number) => [number, number, number];
14
+ export const actorcontext_actorId: (a: number) => [number, number];
15
+ export const actorcontext_beginOnStateChange: (a: number) => void;
16
+ export const actorcontext_beginWebsocketCallback: (a: number) => number;
17
+ export const actorcontext_broadcast: (a: number, b: number, c: number, d: number, e: number) => void;
18
+ export const actorcontext_connectConn: (a: number, b: number, c: number, d: any) => any;
19
+ export const actorcontext_conns: (a: number) => any;
20
+ export const actorcontext_destroy: (a: number) => [number, number];
21
+ export const actorcontext_dirtyHibernatableConns: (a: number) => any;
22
+ export const actorcontext_endOnStateChange: (a: number) => void;
23
+ export const actorcontext_endWebsocketCallback: (a: number, b: number) => void;
24
+ export const actorcontext_inspectorSnapshot: (a: number) => [number, number, number];
25
+ export const actorcontext_keepAwake: (a: number, b: any) => any;
26
+ export const actorcontext_key: (a: number) => [number, number, number];
27
+ export const actorcontext_kv: (a: number) => number;
28
+ export const actorcontext_name: (a: number) => [number, number];
29
+ export const actorcontext_new: () => [number, number, number];
30
+ export const actorcontext_region: (a: number) => [number, number];
31
+ export const actorcontext_registerTask: (a: number, b: any) => void;
32
+ export const actorcontext_requestSave: (a: number, b: any) => void;
33
+ export const actorcontext_requestSaveAndWait: (a: number, b: any) => any;
34
+ export const actorcontext_restartRunHandler: (a: number) => void;
35
+ export const actorcontext_runtimeState: (a: number) => any;
36
+ export const actorcontext_saveState: (a: number, b: any) => any;
37
+ export const actorcontext_setAlarm: (a: number, b: number, c: number) => [number, number];
38
+ export const actorcontext_sleep: (a: number) => [number, number];
39
+ export const actorcontext_sql: (a: number) => number;
40
+ export const actorcontext_state: (a: number) => [number, number];
41
+ export const actorcontext_takePendingHibernationChanges: (a: number) => any;
42
+ export const actorcontext_verifyInspectorAuth: (a: number, b: number, c: number) => any;
43
+ export const actorfactory_new: (a: any, b: any) => [number, number, number];
44
+ export const awaitPromise: (a: any) => any;
45
+ export const bridgeRivetErrorPrefix: () => [number, number];
46
+ export const cancellationtoken_aborted: (a: number) => number;
47
+ export const cancellationtoken_cancel: (a: number) => void;
48
+ export const cancellationtoken_new: () => number;
49
+ export const cancellationtoken_onCancelled: (a: number, b: any) => void;
50
+ export const connhandle_disconnect: (a: number, b: number, c: number) => any;
51
+ export const connhandle_id: (a: number) => [number, number];
52
+ export const connhandle_isHibernatable: (a: number) => number;
53
+ export const connhandle_params: (a: number) => [number, number];
54
+ export const connhandle_send: (a: number, b: number, c: number, d: number, e: number) => void;
55
+ export const connhandle_setState: (a: number, b: number, c: number) => void;
56
+ export const connhandle_state: (a: number) => [number, number];
57
+ export const coreregistry_handleServerlessRequest: (a: number, b: any, c: any, d: number, e: any) => any;
58
+ export const coreregistry_new: () => number;
59
+ export const coreregistry_register: (a: number, b: number, c: number, d: number) => [number, number];
60
+ export const coreregistry_serve: (a: number, b: any) => any;
61
+ export const coreregistry_shutdown: (a: number) => any;
62
+ export const kv_batchDelete: (a: number, b: any) => any;
63
+ export const kv_batchGet: (a: number, b: any) => any;
64
+ export const kv_batchPut: (a: number, b: any) => any;
65
+ export const kv_delete: (a: number, b: number, c: number) => any;
66
+ export const kv_deleteRange: (a: number, b: number, c: number, d: number, e: number) => any;
67
+ export const kv_get: (a: number, b: number, c: number) => any;
68
+ export const kv_listPrefix: (a: number, b: number, c: number, d: any) => any;
69
+ export const kv_listRange: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
70
+ export const kv_put: (a: number, b: number, c: number, d: number, e: number) => any;
71
+ export const queue_enqueueAndWait: (a: number, b: number, c: number, d: number, e: number, f: any, g: number) => any;
72
+ export const queue_inspectMessages: (a: number) => any;
73
+ export const queue_maxSize: (a: number) => number;
74
+ export const queue_nextBatch: (a: number, b: any, c: number) => any;
75
+ export const queue_send: (a: number, b: number, c: number, d: number, e: number) => any;
76
+ export const queue_tryNextBatch: (a: number, b: any) => [number, number, number];
77
+ export const queue_waitForNames: (a: number, b: any, c: any, d: number) => any;
78
+ export const queue_waitForNamesAvailable: (a: number, b: any, c: any) => any;
79
+ export const queuemessage_body: (a: number) => [number, number];
80
+ export const queuemessage_complete: (a: number, b: any) => any;
81
+ export const queuemessage_createdAt: (a: number) => number;
82
+ export const queuemessage_id: (a: number) => bigint;
83
+ export const queuemessage_isCompletable: (a: number) => number;
84
+ export const queuemessage_name: (a: number) => [number, number];
85
+ export const roundTripBytes: (a: number, b: number) => [number, number];
86
+ export const schedule_after: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
87
+ export const schedule_at: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
88
+ export const sqlitedb_close: (a: number) => any;
89
+ export const sqlitedb_exec: (a: number, b: number, c: number) => any;
90
+ export const sqlitedb_execute: (a: number, b: number, c: number, d: any) => any;
91
+ export const sqlitedb_executeWrite: (a: number, b: number, c: number, d: any) => any;
92
+ export const sqlitedb_query: (a: number, b: number, c: number, d: any) => any;
93
+ export const sqlitedb_run: (a: number, b: number, c: number, d: any) => any;
94
+ export const uint8ArrayFromBytes: (a: number, b: number) => any;
95
+ export const websockethandle_close: (a: number, b: number, c: number, d: number) => any;
96
+ export const websockethandle_send: (a: number, b: number, c: number, d: number) => [number, number];
97
+ export const websockethandle_setEventCallback: (a: number, b: any) => void;
98
+ export const start: () => void;
99
+ export const actorcontext_waitUntil: (a: number, b: any) => void;
100
+ export const actorcontext_queue: (a: number) => number;
101
+ export const actorcontext_schedule: (a: number) => number;
102
+ export const __wbg_schedule_free: (a: number, b: number) => void;
103
+ export const __wbg_queue_free: (a: number, b: number) => void;
104
+ export const __wbindgen_malloc: (a: number, b: number) => number;
105
+ export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
106
+ export const __wbindgen_exn_store: (a: number) => void;
107
+ export const __externref_table_alloc: () => number;
108
+ export const __wbindgen_export_4: WebAssembly.Table;
109
+ export const __wbindgen_free: (a: number, b: number, c: number) => void;
110
+ export const __wbindgen_export_6: WebAssembly.Table;
111
+ export const __externref_table_dealloc: (a: number) => void;
112
+ export const closure1552_externref_shim: (a: number, b: number, c: any) => void;
113
+ export const closure1755_externref_shim: (a: number, b: number, c: any) => void;
114
+ export const closure1974_externref_shim: (a: number, b: number, c: any, d: any) => void;
115
+ export const __wbindgen_start: () => void;
@@ -0,0 +1,47 @@
1
+ #!/usr/bin/env node
2
+ import { execFileSync } from "node:child_process";
3
+ import { existsSync } from "node:fs";
4
+ import { dirname, join } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ const packageDir = dirname(dirname(fileURLToPath(import.meta.url)));
8
+ const pkgDir = join(packageDir, "pkg");
9
+
10
+ if (["1", "true"].includes(process.env.SKIP_WASM_BUILD ?? "")) {
11
+ const hasPkg = existsSync(join(pkgDir, "rivetkit_wasm.js"));
12
+ console.log(
13
+ hasPkg
14
+ ? "[rivetkit-wasm/build] using existing pkg artifact"
15
+ : "[rivetkit-wasm/build] skipped",
16
+ );
17
+ process.exit(0);
18
+ }
19
+
20
+ const args = process.argv.slice(2);
21
+ const targetIndex = args.indexOf("--target");
22
+ const outDirIndex = args.indexOf("--out-dir");
23
+
24
+ const target = targetIndex >= 0 ? args[targetIndex + 1] : "web";
25
+ const outDir = outDirIndex >= 0 ? args[outDirIndex + 1] : "pkg";
26
+
27
+ if (!target) {
28
+ throw new Error("--target requires a value");
29
+ }
30
+
31
+ if (!outDir) {
32
+ throw new Error("--out-dir requires a value");
33
+ }
34
+
35
+ const cmd = [
36
+ "wasm-pack",
37
+ "build",
38
+ "--target",
39
+ target,
40
+ "--out-dir",
41
+ outDir,
42
+ "--out-name",
43
+ "rivetkit_wasm",
44
+ ];
45
+
46
+ console.log(`[rivetkit-wasm/build] running: ${cmd.join(" ")}`);
47
+ execFileSync("npx", ["-y", ...cmd], { stdio: "inherit" });
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env node
2
+ import { execFileSync } from "node:child_process";
3
+
4
+ const requiredFiles = new Set([
5
+ "index.js",
6
+ "index.d.ts",
7
+ "pkg/rivetkit_wasm.js",
8
+ "pkg/rivetkit_wasm.d.ts",
9
+ "pkg/rivetkit_wasm_bg.wasm",
10
+ "pkg/rivetkit_wasm_bg.wasm.d.ts",
11
+ "package.json",
12
+ ]);
13
+
14
+ const output = execFileSync(
15
+ "npm",
16
+ ["pack", "--json", "--dry-run", "--ignore-scripts"],
17
+ {
18
+ encoding: "utf8",
19
+ stdio: ["ignore", "pipe", "pipe"],
20
+ },
21
+ );
22
+ const [pack] = JSON.parse(output);
23
+ const publishedFiles = new Set(
24
+ pack.files.map((file) => file.path.replace(/\\/g, "/")),
25
+ );
26
+ const missingFiles = [...requiredFiles].filter((file) => !publishedFiles.has(file));
27
+
28
+ if (missingFiles.length > 0) {
29
+ throw new Error(
30
+ `@rivetkit/rivetkit-wasm package is missing required files: ${missingFiles.join(", ")}`,
31
+ );
32
+ }