Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit ea57692

Browse files
NathanFlurryjog1t
authored andcommitted
fix(core): update websocket to use event listeners
1 parent 7550844 commit ea57692

File tree

41 files changed

+175
-161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+175
-161
lines changed

docs/concepts/cors.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { setup } from "rivetkit";
1818
import counter from "./counter";
1919

2020
const registry = setup({
21-
actors: { counter },
21+
use: { counter },
2222
// Change this to match your frontend's origin
2323
cors: { origin: "https://yourdomain.com" }
2424
});

docs/concepts/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import chatRoom from "./chat_room";
5858

5959
// Create the application
6060
const registry = setup({
61-
actors: { chatRoom }
61+
use: { chatRoom }
6262
});
6363

6464
// Start serving on default port

docs/concepts/testing.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const myActor = actor({
5959
});
6060

6161
export const registry = setup({
62-
actors: { myActor }
62+
use: { myActor }
6363
});
6464

6565
export type Registry = typeof registry;
@@ -109,7 +109,7 @@ const counter = actor({
109109
});
110110

111111
export const registry = setup({
112-
actors: { counter }
112+
use: { counter }
113113
});
114114

115115
export type Registry = typeof registry;
@@ -164,7 +164,7 @@ export const chatRoom = actor({
164164

165165
// Create and export the app
166166
export const registry = setup({
167-
actors: { chatRoom }
167+
use: { chatRoom }
168168
});
169169

170170
// Export type for client type checking
@@ -225,7 +225,7 @@ const scheduler = actor({
225225
});
226226

227227
export const registry = setup({
228-
actors: { scheduler }
228+
use: { scheduler }
229229
});
230230

231231
export type Registry = typeof registry;

docs/integrations/better-auth.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export const counter = actor({
8181
});
8282

8383
export const registry = setup({
84-
actors: { counter },
84+
use: { counter },
8585
});
8686
```
8787

docs/integrations/hono.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ When mounting the RivetKit router at a custom path, you **must** specify the sam
1111
```typescript
1212
// Setup the RivetKit app
1313
const registry = setup({
14-
actors: { counter },
14+
use: { counter },
1515
// IMPORTANT: Must specify the same basePath where your router is mounted
1616
basePath: "/my-path"
1717
});
@@ -46,7 +46,7 @@ honoApp.get("/hello", (c) => c.text("Hello, world!"));
4646

4747
// Setup the RivetKit app
4848
const registry = setup({
49-
actors: { counter },
49+
use: { counter },
5050
// IMPORTANT: Must specify the same basePath where your router is mounted
5151
basePath: "/my-path"
5252
});
@@ -122,7 +122,7 @@ honoApp.get("/hello", (c) => c.text("Hello, world!"));
122122

123123
// Setup the RivetKit app
124124
const registry = setup({
125-
actors: { counter },
125+
use: { counter },
126126
// IMPORTANT: Must specify the same basePath where your router is mounted
127127
basePath: "/my-path"
128128
});
@@ -174,7 +174,7 @@ honoApp.get("/hello", (c) => c.text("Hello, world!"));
174174

175175
// Setup the RivetKit app
176176
const registry = setup({
177-
actors: { counter },
177+
use: { counter },
178178
// IMPORTANT: Must specify the same basePath where your router is mounted
179179
basePath: "/my-path"
180180
});

docs/integrations/resend.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ const user = actor({
5151
},
5252
});
5353

54-
export const registry = setup({ actors: { user } });
54+
export const registry = setup({ use: { user } });
5555
export type Registry = typeof registry;
5656
```
5757
</Step>

docs/llm/prompt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ When importing from workspace packages, always check the package's `package.json
134134

135135
## Actor Management
136136

137-
- App is configured with actors using `setup({ actors: { actorName }})` followed by `serve(registry)`
137+
- App is configured with actors using `setup({ use: { actorName }})` followed by `serve(registry)`
138138
- Actors are accessed by client using `client.actorName.get()`
139139
- Actors can pass an ID parameter or object with `client.actorName.get(id)` or `client.actorName.get({key: value})`
140140
- Actors can be shut down with `c.shutdown()` from within the actor

docs/snippets/setup-actor.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const counter = actor({
1515

1616
// Create the application
1717
export const registry = setup({
18-
actors: { counter },
18+
use: { counter },
1919
cors: { origin: "http://localhost:8080" }
2020
});
2121

docs/snippets/step-define-actor.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
// Create the application
2020
export const registry = setup({
21-
actors: { counter },
21+
use: { counter },
2222
cors: { origin: "*" } // Configure CORS for your production domains in production
2323
});
2424

docs/workers/actions.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ const counter = actor({
104104

105105
// Create and export the app
106106
const registry = setup({
107-
actors: { counter }
107+
use: { counter }
108108
});
109109

110110
export type Registry = typeof registry;

0 commit comments

Comments
 (0)