@rivetkit/framework-base 0.9.8 → 0.9.9
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/dist/mod.d.ts +5 -4
- package/package.json +2 -2
package/dist/mod.d.ts
CHANGED
|
@@ -96,16 +96,17 @@ export interface ActorOptions<Registry extends AnyActorRegistry, ActorName exten
|
|
|
96
96
|
*/
|
|
97
97
|
enabled?: boolean;
|
|
98
98
|
}
|
|
99
|
+
export type ActorsStateDerived<Registry extends AnyActorRegistry, WorkerName extends keyof ExtractActorsFromRegistry<Registry>> = Derived<Omit<InternalRivetKitStore<Registry, ExtractActorsFromRegistry<Registry>>["actors"][string], "handle" | "connection"> & {
|
|
100
|
+
handle: ActorHandle<ExtractActorsFromRegistry<Registry>[WorkerName]> | null;
|
|
101
|
+
connection: ActorConn<ExtractActorsFromRegistry<Registry>[WorkerName]> | null;
|
|
102
|
+
}>;
|
|
99
103
|
export type AnyActorOptions = ActorOptions<AnyActorRegistry, any>;
|
|
100
104
|
export interface CreateRivetKitOptions<Registry extends AnyActorRegistry> {
|
|
101
105
|
hashFunction?: (opts: ActorOptions<Registry, any>) => string;
|
|
102
106
|
}
|
|
103
107
|
export declare function createRivetKit<Registry extends AnyActorRegistry, Actors extends ExtractActorsFromRegistry<Registry>, ActorNames extends keyof Actors>(client: Client<Registry>, opts?: CreateRivetKitOptions<Registry>): {
|
|
104
108
|
getOrCreateActor: <ActorName extends ActorNames>(opts: ActorOptions<Registry, ActorName>) => {
|
|
105
|
-
state:
|
|
106
|
-
handle: ActorHandle<Actors[ActorName]> | null;
|
|
107
|
-
connection: ActorConn<Actors[ActorName]> | null;
|
|
108
|
-
}>;
|
|
109
|
+
state: ActorsStateDerived<Registry, ActorName>;
|
|
109
110
|
key: string;
|
|
110
111
|
mount: () => void;
|
|
111
112
|
setState: (set: Updater<ActorStateReference<Actors>>) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rivetkit/framework-base",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.9",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"rivetkit",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"stableVersion": "0.8.0",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@tanstack/store": "^0.7.1",
|
|
39
|
-
"@rivetkit/core": "0.9.
|
|
39
|
+
"@rivetkit/core": "0.9.9"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"dev": "vite build --watch",
|