Skip to content

Commit 164c0eb

Browse files
committed
chore(example): update examples to use srvx
1 parent 0fc738b commit 164c0eb

File tree

7 files changed

+56
-32
lines changed

7 files changed

+56
-32
lines changed

examples/chat-room/frontend/App.tsx

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/chat-room/package.json

Lines changed: 4 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/chat-room/vite.config.ts

Lines changed: 3 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-lock.yaml

Lines changed: 31 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rivetkit-typescript/packages/rivetkit/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,23 +165,23 @@
165165
"dump-asyncapi": "tsx scripts/dump-asyncapi.ts"
166166
},
167167
"dependencies": {
168-
"@rivetkit/virtual-websocket": "workspace:*",
169-
"@rivetkit/bare-ts": "^0.6.2",
170168
"@hono/standard-validator": "^0.1.3",
171169
"@hono/zod-openapi": "^1.1.5",
170+
"@rivetkit/bare-ts": "^0.6.2",
172171
"@rivetkit/engine-runner": "workspace:*",
173172
"@rivetkit/fast-json-patch": "^3.1.2",
173+
"@rivetkit/on-change": "^6.0.2-rc.1",
174+
"@rivetkit/virtual-websocket": "workspace:*",
174175
"cbor-x": "^1.6.0",
175176
"get-port": "^7.1.0",
176177
"hono": "^4.7.0",
177178
"invariant": "^2.2.4",
178179
"nanoevents": "^9.1.0",
179-
"@rivetkit/on-change": "^6.0.2-rc.1",
180180
"p-retry": "^6.2.1",
181181
"pino": "^9.5.0",
182182
"uuid": "^12.0.0",
183-
"zod": "^4.1.0",
184-
"vbare": "^0.0.4"
183+
"vbare": "^0.0.4",
184+
"zod": "^4.1.0"
185185
},
186186
"devDependencies": {
187187
"@bare-ts/tools": "^0.13.0",
@@ -194,6 +194,7 @@
194194
"@vitest/ui": "3.1.1",
195195
"commander": "^12.1.0",
196196
"eventsource": "^4.0.0",
197+
"local-pkg": "^0.5.1",
197198
"tsup": "^8.4.0",
198199
"tsx": "^4.19.4",
199200
"typescript": "^5.7.3",

rivetkit-typescript/packages/rivetkit/src/registry/serve.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@ import { detectRuntime, stringifyError } from "../utils";
33
import { logger } from "./log";
44
import { RegistryConfig } from "./config";
55

6+
// TODO: Go back to dynamic import for this
7+
import getPort from "get-port";
8+
69
const DEFAULT_PORT = 6420;
710

811
/**
912
* Finds a free port starting from the given port.
1013
*
1114
* Tries ports incrementally until a free one is found.
1215
*/
13-
export async function findFreePort(startPort: number = DEFAULT_PORT): Promise<number> {
14-
const getPortModule = "get-port";
15-
const { default: getPort } = await import(/* webpackIgnore: true */ getPortModule);
16+
export async function findFreePort(
17+
startPort: number = DEFAULT_PORT,
18+
): Promise<number> {
19+
// TODO: Fix this
20+
// const getPortModule = "get-port";
21+
// const { default: getPort } = await import(/* webpackIgnore: true */ getPortModule);
1622

1723
// Create an iterable of ports starting from startPort
1824
function* portRange(start: number, count: number = 100): Iterable<number> {

0 commit comments

Comments
 (0)