From 8ce63182a11e486f2fdc7357a90e81cce32d37ab Mon Sep 17 00:00:00 2001 From: Nathan Flurry Date: Wed, 12 Nov 2025 19:33:20 -0800 Subject: [PATCH] chore(rivetkit): fix type checks --- engine/tests/smoke/src/server/registry.ts | 4 +- .../src/backend/registry.ts | 3 +- .../kitchen-sink/src/backend/actors/demo.ts | 2 +- .../src/backend/actors/websocket.ts | 8 +- examples/kitchen-sink/src/frontend/App.tsx | 6 +- .../frontend/components/ConnectionScreen.tsx | 22 - .../frontend/components/InteractionScreen.tsx | 2 +- .../components/tabs/ConnectionsTab.tsx | 4 - .../raw-fetch-handler/src/backend/registry.ts | 2 +- rivetkit-asyncapi/asyncapi.json | 923 +++++++++--------- .../cloudflare-workers/src/actor-driver.ts | 6 +- .../packages/rivetkit/src/utils/node.ts | 4 +- 12 files changed, 451 insertions(+), 535 deletions(-) diff --git a/engine/tests/smoke/src/server/registry.ts b/engine/tests/smoke/src/server/registry.ts index 0a5987cd3d..c46e139be8 100644 --- a/engine/tests/smoke/src/server/registry.ts +++ b/engine/tests/smoke/src/server/registry.ts @@ -7,10 +7,10 @@ const counter = actor({ state: { count: 0, }, - onStart: async () => { + onWake: async () => { await new Promise((resolve) => setTimeout(resolve, 1000)); }, - onStop: async () => { + onSleep: async () => { await new Promise((resolve) => setTimeout(resolve, 1000)); }, actions: { diff --git a/examples/cursors-raw-websocket/src/backend/registry.ts b/examples/cursors-raw-websocket/src/backend/registry.ts index a7c6a1954a..ede195aa23 100644 --- a/examples/cursors-raw-websocket/src/backend/registry.ts +++ b/examples/cursors-raw-websocket/src/backend/registry.ts @@ -57,7 +57,8 @@ export const cursorRoom = actor({ // Handle WebSocket connections onWebSocket: async (c, websocket: UniversalWebSocket) => { - const url = new URL(request.url); + if (!c.request) throw "Missing request"; + const url = new URL(c.request.url); const sessionId = url.searchParams.get("sessionId"); if (!sessionId) { diff --git a/examples/kitchen-sink/src/backend/actors/demo.ts b/examples/kitchen-sink/src/backend/actors/demo.ts index deb5360bd3..b29887321e 100644 --- a/examples/kitchen-sink/src/backend/actors/demo.ts +++ b/examples/kitchen-sink/src/backend/actors/demo.ts @@ -35,7 +35,7 @@ export const demo = actor({ onDisconnect: (c) => { c.log.info("client disconnected"); }, - onFetch: handleHttpRequest, + onRequest: handleHttpRequest, onWebSocket: handleWebSocket, actions: { // Sync actions diff --git a/examples/kitchen-sink/src/backend/actors/websocket.ts b/examples/kitchen-sink/src/backend/actors/websocket.ts index ebb0d69b78..9ac319ed58 100644 --- a/examples/kitchen-sink/src/backend/actors/websocket.ts +++ b/examples/kitchen-sink/src/backend/actors/websocket.ts @@ -1,10 +1,6 @@ import type { UniversalWebSocket } from "rivetkit"; -export function handleWebSocket( - c: any, - websocket: UniversalWebSocket, - opts: any, -) { +export function handleWebSocket(c: any, websocket: UniversalWebSocket) { const connectionId = `conn-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`; // Initialize WebSocket state if not exists @@ -16,7 +12,7 @@ export function handleWebSocket( c.log.info("websocket connected", { connectionCount: c.state.connectionCount, connectionId, - url: opts.request.url, + url: c.request.url, }); // Send welcome message diff --git a/examples/kitchen-sink/src/frontend/App.tsx b/examples/kitchen-sink/src/frontend/App.tsx index 7bda68bfec..df59ac96c2 100644 --- a/examples/kitchen-sink/src/frontend/App.tsx +++ b/examples/kitchen-sink/src/frontend/App.tsx @@ -6,7 +6,6 @@ import InteractionScreen from "./components/InteractionScreen"; export interface AppState { // Configuration - transport: "websocket" | "sse"; encoding: "json" | "cbor" | "bare"; connectionMode: "handle" | "connection"; @@ -38,16 +37,15 @@ function App() { setState(prev => prev ? { ...prev, ...updates } : null); }; - // Create client with user-selected encoding and transport + // Create client with user-selected encoding const client = useMemo(() => { if (!state) return null; return createClient({ endpoint: "http://localhost:6420", encoding: state.encoding, - transport: state.transport, }); - }, [state?.encoding, state?.transport]); + }, [state?.encoding]); // Create the connection/handle once based on state const [actorHandle, setActorHandle] = useState(null); diff --git a/examples/kitchen-sink/src/frontend/components/ConnectionScreen.tsx b/examples/kitchen-sink/src/frontend/components/ConnectionScreen.tsx index f47bcb970a..f6d5386da1 100644 --- a/examples/kitchen-sink/src/frontend/components/ConnectionScreen.tsx +++ b/examples/kitchen-sink/src/frontend/components/ConnectionScreen.tsx @@ -14,7 +14,6 @@ export default function ConnectionScreen({ onConnect }: ConnectionScreenProps) { const [actorId, setActorId] = useState(""); const [actorRegion, setActorRegion] = useState(""); const [createInput, setCreateInput] = useState(""); - const [transport, setTransport] = useState<"websocket" | "sse">("websocket"); const [encoding, setEncoding] = useState<"json" | "cbor" | "bare">("bare"); const [connectionMode, setConnectionMode] = useState<"connection" | "handle">("handle"); const [isConnecting, setIsConnecting] = useState(false); @@ -29,7 +28,6 @@ export default function ConnectionScreen({ onConnect }: ConnectionScreenProps) { actorId, actorRegion, createInput, - transport, encoding, connectionMode, isConnected: true, @@ -162,26 +160,6 @@ export default function ConnectionScreen({ onConnect }: ConnectionScreenProps) { - {connectionMode === "connection" && ( -
- -
- - -
-
- )} -
diff --git a/examples/kitchen-sink/src/frontend/components/InteractionScreen.tsx b/examples/kitchen-sink/src/frontend/components/InteractionScreen.tsx index ca6f1cca4e..ff64c10e44 100644 --- a/examples/kitchen-sink/src/frontend/components/InteractionScreen.tsx +++ b/examples/kitchen-sink/src/frontend/components/InteractionScreen.tsx @@ -101,7 +101,7 @@ export default function InteractionScreen({
{state.actorName} {state.actorKey && #{state.actorKey}} - {state.transport.toUpperCase()}/{state.encoding.toUpperCase()} + {state.encoding.toUpperCase()} {state.connectionMode === "connection" ? "🔗 Connected" : "🔧 Handle"} diff --git a/examples/kitchen-sink/src/frontend/components/tabs/ConnectionsTab.tsx b/examples/kitchen-sink/src/frontend/components/tabs/ConnectionsTab.tsx index 2567495e8e..5b5bf41c62 100644 --- a/examples/kitchen-sink/src/frontend/components/tabs/ConnectionsTab.tsx +++ b/examples/kitchen-sink/src/frontend/components/tabs/ConnectionsTab.tsx @@ -24,7 +24,6 @@ export default function ConnectionsTab({ state, actorHandle }: TabProps) { setCurrentConnectionInfo({ isConnected: true, connectionId: actorHandle.connectionId || "N/A", - transport: state.transport, encoding: state.encoding, actorName: state.actorName, actorKey: state.actorKey, @@ -87,9 +86,6 @@ export default function ConnectionsTab({ state, actorHandle }: TabProps) { {currentConnectionInfo.connectionId} - Transport: - {currentConnectionInfo.transport.toUpperCase()} - Encoding: {currentConnectionInfo.encoding.toUpperCase()} diff --git a/examples/raw-fetch-handler/src/backend/registry.ts b/examples/raw-fetch-handler/src/backend/registry.ts index 761c1cc3d1..b27d945857 100644 --- a/examples/raw-fetch-handler/src/backend/registry.ts +++ b/examples/raw-fetch-handler/src/backend/registry.ts @@ -9,7 +9,7 @@ export const counter = actor({ // Setup router return { router: createCounterRouter() }; }, - onFetch: (c, request) => { + onRequest: (c, request) => { return c.vars.router.fetch(request, { actor: c }); }, actions: { diff --git a/rivetkit-asyncapi/asyncapi.json b/rivetkit-asyncapi/asyncapi.json index e6074c7754..0d9c7c7f98 100644 --- a/rivetkit-asyncapi/asyncapi.json +++ b/rivetkit-asyncapi/asyncapi.json @@ -1,489 +1,436 @@ { - "asyncapi": "3.0.0", - "info": { - "title": "RivetKit WebSocket Protocol", - "version": "2.0.24-rc.1", - "description": "WebSocket protocol for bidirectional communication between RivetKit clients and actors" - }, - "channels": { - "/gateway/{actorId}/connect": { - "address": "/gateway/{actorId}/connect", - "parameters": { - "actorId": { - "description": "The unique identifier for the actor instance" - } - }, - "messages": { - "toClient": { - "$ref": "#/components/messages/ToClient" - }, - "toServer": { - "$ref": "#/components/messages/ToServer" - } - } - } - }, - "operations": { - "sendToClient": { - "action": "send", - "channel": { - "$ref": "#/channels/~1gateway~1{actorId}~1connect" - }, - "messages": [ - { - "$ref": "#/channels/~1gateway~1{actorId}~1connect/messages/toClient" - } - ], - "summary": "Send messages from server to client", - "description": "Messages sent from the RivetKit actor to connected clients" - }, - "receiveFromClient": { - "action": "receive", - "channel": { - "$ref": "#/channels/~1gateway~1{actorId}~1connect" - }, - "messages": [ - { - "$ref": "#/channels/~1gateway~1{actorId}~1connect/messages/toServer" - } - ], - "summary": "Receive messages from client", - "description": "Messages received by the RivetKit actor from connected clients" - } - }, - "components": { - "messages": { - "ToClient": { - "name": "ToClient", - "title": "Message To Client", - "summary": "A message sent from the server to the client", - "contentType": "application/json", - "payload": { - "type": "object", - "properties": { - "body": { - "anyOf": [ - { - "type": "object", - "properties": { - "tag": { - "type": "string", - "const": "Init" - }, - "val": { - "type": "object", - "properties": { - "actorId": { - "type": "string" - }, - "connectionId": { - "type": "string" - } - }, - "required": [ - "actorId", - "connectionId" - ], - "additionalProperties": false - } - }, - "required": [ - "tag", - "val" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "tag": { - "type": "string", - "const": "Error" - }, - "val": { - "type": "object", - "properties": { - "group": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "metadata": {}, - "actionId": { - "type": [ - "integer", - "null" - ] - } - }, - "required": [ - "group", - "code", - "message", - "actionId" - ], - "additionalProperties": false - } - }, - "required": [ - "tag", - "val" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "tag": { - "type": "string", - "const": "ActionResponse" - }, - "val": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "output": {} - }, - "required": [ - "id" - ], - "additionalProperties": false - } - }, - "required": [ - "tag", - "val" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "tag": { - "type": "string", - "const": "Event" - }, - "val": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "args": {} - }, - "required": [ - "name" - ], - "additionalProperties": false - } - }, - "required": [ - "tag", - "val" - ], - "additionalProperties": false - } - ] - } - }, - "required": [ - "body" - ], - "additionalProperties": false - }, - "examples": [ - { - "name": "Init message", - "summary": "Initial connection message", - "payload": { - "body": { - "tag": "Init", - "val": { - "actorId": "actor_123", - "connectionId": "conn_456" - } - } - } - }, - { - "name": "Error message", - "summary": "Error response", - "payload": { - "body": { - "tag": "Error", - "val": { - "group": "auth", - "code": "unauthorized", - "message": "Authentication failed", - "actionId": null - } - } - } - }, - { - "name": "Action response", - "summary": "Response to an action request", - "payload": { - "body": { - "tag": "ActionResponse", - "val": { - "id": "123", - "output": { - "result": "success" - } - } - } - } - }, - { - "name": "Event", - "summary": "Event broadcast to subscribed clients", - "payload": { - "body": { - "tag": "Event", - "val": { - "name": "stateChanged", - "args": { - "newState": "active" - } - } - } - } - } - ] - }, - "ToServer": { - "name": "ToServer", - "title": "Message To Server", - "summary": "A message sent from the client to the server", - "contentType": "application/json", - "payload": { - "type": "object", - "properties": { - "body": { - "anyOf": [ - { - "type": "object", - "properties": { - "tag": { - "type": "string", - "const": "ActionRequest" - }, - "val": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "args": {} - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false - } - }, - "required": [ - "tag", - "val" - ], - "additionalProperties": false - }, - { - "type": "object", - "properties": { - "tag": { - "type": "string", - "const": "SubscriptionRequest" - }, - "val": { - "type": "object", - "properties": { - "eventName": { - "type": "string" - }, - "subscribe": { - "type": "boolean" - } - }, - "required": [ - "eventName", - "subscribe" - ], - "additionalProperties": false - } - }, - "required": [ - "tag", - "val" - ], - "additionalProperties": false - } - ] - } - }, - "required": [ - "body" - ], - "additionalProperties": false - }, - "examples": [ - { - "name": "Action request", - "summary": "Request to execute an action", - "payload": { - "body": { - "tag": "ActionRequest", - "val": { - "id": "123", - "name": "updateState", - "args": { - "key": "value" - } - } - } - } - }, - { - "name": "Subscription request", - "summary": "Request to subscribe/unsubscribe from an event", - "payload": { - "body": { - "tag": "SubscriptionRequest", - "val": { - "eventName": "stateChanged", - "subscribe": true - } - } - } - } - ] - } - }, - "schemas": { - "Init": { - "type": "object", - "properties": { - "actorId": { - "type": "string" - }, - "connectionId": { - "type": "string" - } - }, - "required": [ - "actorId", - "connectionId" - ], - "additionalProperties": false, - "description": "Initial connection message sent from server to client" - }, - "Error": { - "type": "object", - "properties": { - "group": { - "type": "string" - }, - "code": { - "type": "string" - }, - "message": { - "type": "string" - }, - "metadata": {}, - "actionId": { - "type": [ - "integer", - "null" - ] - } - }, - "required": [ - "group", - "code", - "message", - "actionId" - ], - "additionalProperties": false, - "description": "Error message sent from server to client" - }, - "ActionResponse": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "output": {} - }, - "required": [ - "id" - ], - "additionalProperties": false, - "description": "Response to an action request" - }, - "Event": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "args": {} - }, - "required": [ - "name" - ], - "additionalProperties": false, - "description": "Event broadcast to subscribed clients" - }, - "ActionRequest": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "args": {} - }, - "required": [ - "id", - "name" - ], - "additionalProperties": false, - "description": "Request to execute an action on the actor" - }, - "SubscriptionRequest": { - "type": "object", - "properties": { - "eventName": { - "type": "string" - }, - "subscribe": { - "type": "boolean" - } - }, - "required": [ - "eventName", - "subscribe" - ], - "additionalProperties": false, - "description": "Request to subscribe or unsubscribe from an event" - } - } - } -} \ No newline at end of file + "asyncapi": "3.0.0", + "info": { + "title": "RivetKit WebSocket Protocol", + "version": "2.0.24-rc.1", + "description": "WebSocket protocol for bidirectional communication between RivetKit clients and actors" + }, + "channels": { + "/gateway/{actorId}/connect": { + "address": "/gateway/{actorId}/connect", + "parameters": { + "actorId": { + "description": "The unique identifier for the actor instance" + } + }, + "messages": { + "toClient": { + "$ref": "#/components/messages/ToClient" + }, + "toServer": { + "$ref": "#/components/messages/ToServer" + } + } + } + }, + "operations": { + "sendToClient": { + "action": "send", + "channel": { + "$ref": "#/channels/~1gateway~1{actorId}~1connect" + }, + "messages": [ + { + "$ref": "#/channels/~1gateway~1{actorId}~1connect/messages/toClient" + } + ], + "summary": "Send messages from server to client", + "description": "Messages sent from the RivetKit actor to connected clients" + }, + "receiveFromClient": { + "action": "receive", + "channel": { + "$ref": "#/channels/~1gateway~1{actorId}~1connect" + }, + "messages": [ + { + "$ref": "#/channels/~1gateway~1{actorId}~1connect/messages/toServer" + } + ], + "summary": "Receive messages from client", + "description": "Messages received by the RivetKit actor from connected clients" + } + }, + "components": { + "messages": { + "ToClient": { + "name": "ToClient", + "title": "Message To Client", + "summary": "A message sent from the server to the client", + "contentType": "application/json", + "payload": { + "type": "object", + "properties": { + "body": { + "anyOf": [ + { + "type": "object", + "properties": { + "tag": { + "type": "string", + "const": "Init" + }, + "val": { + "type": "object", + "properties": { + "actorId": { + "type": "string" + }, + "connectionId": { + "type": "string" + } + }, + "required": [ + "actorId", + "connectionId" + ], + "additionalProperties": false + } + }, + "required": ["tag", "val"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "type": "string", + "const": "Error" + }, + "val": { + "type": "object", + "properties": { + "group": { + "type": "string" + }, + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": {}, + "actionId": { + "type": ["integer", "null"] + } + }, + "required": [ + "group", + "code", + "message", + "actionId" + ], + "additionalProperties": false + } + }, + "required": ["tag", "val"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "type": "string", + "const": "ActionResponse" + }, + "val": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "output": {} + }, + "required": ["id"], + "additionalProperties": false + } + }, + "required": ["tag", "val"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "type": "string", + "const": "Event" + }, + "val": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "args": {} + }, + "required": ["name"], + "additionalProperties": false + } + }, + "required": ["tag", "val"], + "additionalProperties": false + } + ] + } + }, + "required": ["body"], + "additionalProperties": false + }, + "examples": [ + { + "name": "Init message", + "summary": "Initial connection message", + "payload": { + "body": { + "tag": "Init", + "val": { + "actorId": "actor_123", + "connectionId": "conn_456" + } + } + } + }, + { + "name": "Error message", + "summary": "Error response", + "payload": { + "body": { + "tag": "Error", + "val": { + "group": "auth", + "code": "unauthorized", + "message": "Authentication failed", + "actionId": null + } + } + } + }, + { + "name": "Action response", + "summary": "Response to an action request", + "payload": { + "body": { + "tag": "ActionResponse", + "val": { + "id": "123", + "output": { + "result": "success" + } + } + } + } + }, + { + "name": "Event", + "summary": "Event broadcast to subscribed clients", + "payload": { + "body": { + "tag": "Event", + "val": { + "name": "stateChanged", + "args": { + "newState": "active" + } + } + } + } + } + ] + }, + "ToServer": { + "name": "ToServer", + "title": "Message To Server", + "summary": "A message sent from the client to the server", + "contentType": "application/json", + "payload": { + "type": "object", + "properties": { + "body": { + "anyOf": [ + { + "type": "object", + "properties": { + "tag": { + "type": "string", + "const": "ActionRequest" + }, + "val": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "args": {} + }, + "required": ["id", "name"], + "additionalProperties": false + } + }, + "required": ["tag", "val"], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "tag": { + "type": "string", + "const": "SubscriptionRequest" + }, + "val": { + "type": "object", + "properties": { + "eventName": { + "type": "string" + }, + "subscribe": { + "type": "boolean" + } + }, + "required": [ + "eventName", + "subscribe" + ], + "additionalProperties": false + } + }, + "required": ["tag", "val"], + "additionalProperties": false + } + ] + } + }, + "required": ["body"], + "additionalProperties": false + }, + "examples": [ + { + "name": "Action request", + "summary": "Request to execute an action", + "payload": { + "body": { + "tag": "ActionRequest", + "val": { + "id": "123", + "name": "updateState", + "args": { + "key": "value" + } + } + } + } + }, + { + "name": "Subscription request", + "summary": "Request to subscribe/unsubscribe from an event", + "payload": { + "body": { + "tag": "SubscriptionRequest", + "val": { + "eventName": "stateChanged", + "subscribe": true + } + } + } + } + ] + } + }, + "schemas": { + "Init": { + "type": "object", + "properties": { + "actorId": { + "type": "string" + }, + "connectionId": { + "type": "string" + } + }, + "required": ["actorId", "connectionId"], + "additionalProperties": false, + "description": "Initial connection message sent from server to client" + }, + "Error": { + "type": "object", + "properties": { + "group": { + "type": "string" + }, + "code": { + "type": "string" + }, + "message": { + "type": "string" + }, + "metadata": {}, + "actionId": { + "type": ["integer", "null"] + } + }, + "required": ["group", "code", "message", "actionId"], + "additionalProperties": false, + "description": "Error message sent from server to client" + }, + "ActionResponse": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "output": {} + }, + "required": ["id"], + "additionalProperties": false, + "description": "Response to an action request" + }, + "Event": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "args": {} + }, + "required": ["name"], + "additionalProperties": false, + "description": "Event broadcast to subscribed clients" + }, + "ActionRequest": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "args": {} + }, + "required": ["id", "name"], + "additionalProperties": false, + "description": "Request to execute an action on the actor" + }, + "SubscriptionRequest": { + "type": "object", + "properties": { + "eventName": { + "type": "string" + }, + "subscribe": { + "type": "boolean" + } + }, + "required": ["eventName", "subscribe"], + "additionalProperties": false, + "description": "Request to subscribe or unsubscribe from an event" + } + } + } +} diff --git a/rivetkit-typescript/packages/cloudflare-workers/src/actor-driver.ts b/rivetkit-typescript/packages/cloudflare-workers/src/actor-driver.ts index eb45792111..e71ba065a1 100644 --- a/rivetkit-typescript/packages/cloudflare-workers/src/actor-driver.ts +++ b/rivetkit-typescript/packages/cloudflare-workers/src/actor-driver.ts @@ -148,10 +148,8 @@ export class CloudflareActorsActorDriver implements ActorDriver { actorState = new ActorGlobalState(); actorState.actorPromise = promiseWithResolvers(); this.#globalState.setActorState(doState.ctx, actorState); - } - - // Another request is already loading this actor, wait for it - if (actorState.actorPromise) { + } else if (actorState.actorPromise) { + // Another request is already loading this actor, wait for it await actorState.actorPromise.promise; if (!actorState.actorInstance) { throw new Error( diff --git a/rivetkit-typescript/packages/rivetkit/src/utils/node.ts b/rivetkit-typescript/packages/rivetkit/src/utils/node.ts index 371443c5e3..d009907014 100644 --- a/rivetkit-typescript/packages/rivetkit/src/utils/node.ts +++ b/rivetkit-typescript/packages/rivetkit/src/utils/node.ts @@ -65,7 +65,9 @@ export function importNodeDependencies(): void { /* webpackIgnore: true */ "node:child_process", ); // @ts-ignore - nodeStream = requireFn(/* webpackIgnore: true */ "node:stream/promises"); + nodeStream = requireFn( + /* webpackIgnore: true */ "node:stream/promises", + ); hasImportedDependencies = true; } catch (err) {