From 6e3dcc8b7b064589a7fb7e2732f17c603c01b089 Mon Sep 17 00:00:00 2001 From: Miguel Carvajal Date: Sat, 14 Dec 2024 21:08:21 -0500 Subject: [PATCH] fixed crossws 0.3.0 compatibility --- packages/vinxi/lib/nitro-dev.js | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/packages/vinxi/lib/nitro-dev.js b/packages/vinxi/lib/nitro-dev.js index 83b08242..1fe4826e 100644 --- a/packages/vinxi/lib/nitro-dev.js +++ b/packages/vinxi/lib/nitro-dev.js @@ -293,26 +293,7 @@ export async function createDevServer(nitro) { // }), // ); - const adapter = wsAdapter({ - ...wsApp.websocket, - hooks: { - open: (event) => { - event.ctx.node.req.url = event.ctx.node.req.originalUrl; - }, - message: (event) => { - event.ctx.node.req.url = event.ctx.node.req.originalUrl; - }, - close: (event) => { - event.ctx.node.req.url = event.ctx.node.req.originalUrl; - }, - error: (event) => { - event.ctx.node.req.url = event.ctx.node.req.originalUrl; - }, - upgrade: (event) => { - // event.ctx.node.req.url = event.ctx.node.req.originalUrl; - }, - }, - }); + const adapter = wsAdapter(wsApp.websocket); // Listen /** @type {import("@vinxi/listhen").Listener[]} */ let listeners = [];