@rivetkit/rivetkit-wasm 0.0.0-sqlite-uds.37f9e48 → 0.0.0-sqlite-sync-3x-release.a00b07f

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
@@ -1,176 +1,2 @@
1
- export function start(): void;
2
- export function awaitPromise(promise: Promise<any>): Promise<any>;
3
- export function uint8ArrayFromBytes(bytes: Uint8Array): Uint8Array;
4
- export function bridgeRivetErrorPrefix(): string;
5
- export function roundTripBytes(bytes: Uint8Array): Uint8Array;
6
-
7
- export class ActorContext {
8
- free(): void;
9
- keepAwake(promise: Promise<any>): void;
10
- saveState(payload: any): Promise<void>;
11
- waitUntil(promise: Promise<any>): void;
12
- abortSignal(): any;
13
- connectConn(params: Uint8Array, request: any): Promise<ConnHandle>;
14
- requestSave(opts: any): void;
15
- registerTask(promise: Promise<any>): void;
16
- runtimeState(): any;
17
- endKeepAwake(region_id: number): void;
18
- beginKeepAwake(): number;
19
- inspectorSnapshot(): object;
20
- endOnStateChange(): void;
21
- restartRunHandler(): void;
22
- beginOnStateChange(): void;
23
- requestSaveAndWait(opts: any): Promise<void>;
24
- verifyInspectorAuth(bearer_token?: string | null): Promise<void>;
25
- endWebsocketCallback(region_id: number): void;
26
- beginWebsocketCallback(): number;
27
- dirtyHibernatableConns(): Array<any>;
28
- kv(): Kv;
29
- waitForTrackedShutdownWork(): Promise<boolean>;
30
- takePendingHibernationChanges(): Array<any>;
31
- key(): any;
32
- constructor();
33
- sql(): SqliteDb;
34
- name(): string;
35
- conns(): Array<any>;
36
- queue(): Queue;
37
- sleep(): void;
38
- state(): Uint8Array;
39
- region(): string;
40
- destroy(): void;
41
- actorId(): string;
42
- schedule(): Schedule;
43
- broadcast(name: string, args: Uint8Array): void;
44
- setAlarm(timestamp_ms?: number | null): void;
45
- }
46
-
47
- export class ActorFactory {
48
- free(): void;
49
- constructor(callbacks: any, config: any);
50
- }
51
-
52
- export class CancellationToken {
53
- free(): void;
54
- onCancelled(callback: Function): void;
55
- constructor();
56
- cancel(): void;
57
- aborted(): boolean;
58
- }
59
-
60
- export class ConnHandle {
61
- private constructor();
62
- free(): void;
63
- disconnect(reason?: string | null): Promise<void>;
64
- isHibernatable(): boolean;
65
- id(): string;
66
- send(name: string, args: Uint8Array): void;
67
- state(): Uint8Array;
68
- params(): Uint8Array;
69
- setState(state: Uint8Array): void;
70
- }
71
-
72
- export class CoreRegistry {
73
- free(): void;
74
- handleServerlessRequest(
75
- req: any,
76
- on_stream_event: Function,
77
- cancel_token: CancellationToken,
78
- config: any,
79
- ): Promise<any>;
80
- constructor();
81
- serve(config: any): Promise<void>;
82
- register(name: string, factory: ActorFactory): void;
83
- shutdown(): Promise<void>;
84
- }
85
-
86
- export class Kv {
87
- private constructor();
88
- free(): void;
89
- delete(key: Uint8Array): Promise<void>;
90
- listRange(start: Uint8Array, end: Uint8Array, options: any): Promise<any>;
91
- listPrefix(prefix: Uint8Array, options: any): Promise<any>;
92
- batchDelete(keys: Array<any>): Promise<void>;
93
- deleteRange(start: Uint8Array, end: Uint8Array): Promise<void>;
94
- get(key: Uint8Array): Promise<any>;
95
- put(key: Uint8Array, value: Uint8Array): Promise<void>;
96
- batchGet(keys: Array<any>): Promise<any>;
97
- batchPut(entries: Array<any>): Promise<void>;
98
- }
99
-
100
- export class Queue {
101
- private constructor();
102
- free(): void;
103
- nextBatch(
104
- options: any,
105
- signal?: CancellationToken | null,
106
- ): Promise<Array<any>>;
107
- tryNextBatch(options: any): Array<any>;
108
- waitForNames(
109
- names: any,
110
- options: any,
111
- signal?: CancellationToken | null,
112
- ): Promise<QueueMessage>;
113
- enqueueAndWait(
114
- name: string,
115
- body: Uint8Array,
116
- options: any,
117
- signal?: CancellationToken | null,
118
- ): Promise<Uint8Array | undefined>;
119
- inspectMessages(): Promise<Array<any>>;
120
- waitForNamesAvailable(names: any, options: any): Promise<void>;
121
- send(name: string, body: Uint8Array): Promise<QueueMessage>;
122
- maxSize(): number;
123
- reset(): Promise<void>;
124
- }
125
-
126
- export class QueueMessage {
127
- private constructor();
128
- free(): void;
129
- createdAt(): number;
130
- isCompletable(): boolean;
131
- id(): bigint;
132
- body(): Uint8Array;
133
- name(): string;
134
- complete(response: any): Promise<void>;
135
- }
136
-
137
- export class Schedule {
138
- private constructor();
139
- free(): void;
140
- at(timestamp_ms: number, action_name: string, args: Uint8Array): void;
141
- after(duration_ms: number, action_name: string, args: Uint8Array): void;
142
- }
143
-
144
- export class SqliteDb {
145
- private constructor();
146
- free(): void;
147
- run(sql: string, params: any): Promise<any>;
148
- exec(sql: string): Promise<any>;
149
- close(): Promise<void>;
150
- query(sql: string, params: any): Promise<any>;
151
- execute(sql: string, params: any): Promise<any>;
152
- }
153
-
154
- export class WebSocketHandle {
155
- private constructor();
156
- free(): void;
157
- setEventCallback(callback: Function): void;
158
- send(data: Uint8Array, binary: boolean): void;
159
- close(code?: number | null, reason?: string | null): Promise<void>;
160
- }
161
-
162
- export type InitInput =
163
- | RequestInfo
164
- | URL
165
- | Response
166
- | BufferSource
167
- | WebAssembly.Module;
168
- export type SyncInitInput = BufferSource | WebAssembly.Module;
169
- export interface InitOutput {
170
- readonly memory: WebAssembly.Memory;
171
- }
172
-
173
- declare function init(
174
- module_or_path?: InitInput | Promise<InitInput>,
175
- ): Promise<InitOutput>;
176
- export default init;
1
+ export * from "./pkg/rivetkit_wasm.js";
2
+ export { default } from "./pkg/rivetkit_wasm.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/rivetkit-wasm",
3
- "version": "0.0.0-sqlite-uds.37f9e48",
3
+ "version": "0.0.0-sqlite-sync-3x-release.a00b07f",
4
4
  "description": "WebAssembly bindings for RivetKit core on edge JavaScript runtimes",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -32,12 +32,17 @@
32
32
  "build:cloudflare": "node scripts/build.mjs --target bundler --out-dir pkg-cloudflare",
33
33
  "build:deno": "node scripts/build.mjs --target web --out-dir pkg-deno",
34
34
  "check:package": "node scripts/check-package.mjs",
35
- "check-types": "tsc --noEmit",
35
+ "check-types": "pnpm run build && tsc --noEmit",
36
36
  "check:wasm": "cargo check -p rivetkit-wasm --target wasm32-unknown-unknown",
37
37
  "prepack": "node scripts/build.mjs"
38
38
  },
39
39
  "devDependencies": {
40
40
  "typescript": "^5.9.2",
41
41
  "wasm-pack": "0.15.0"
42
+ },
43
+ "repository": {
44
+ "type": "git",
45
+ "url": "https://github.com/rivet-dev/rivet.git",
46
+ "directory": "rivetkit-typescript/packages/rivetkit-wasm"
42
47
  }
43
48
  }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "rivetkit-wasm",
3
+ "type": "module",
4
+ "collaborators": [
5
+ "Rivet Gaming, LLC <developer@rivet.dev>"
6
+ ],
7
+ "version": "3.0.0-preview.3",
8
+ "license": "Apache-2.0",
9
+ "files": [
10
+ "rivetkit_wasm_bg.wasm",
11
+ "rivetkit_wasm.js",
12
+ "rivetkit_wasm.d.ts"
13
+ ],
14
+ "main": "rivetkit_wasm.js",
15
+ "types": "rivetkit_wasm.d.ts",
16
+ "sideEffects": [
17
+ "./snippets/*"
18
+ ]
19
+ }