diff --git a/packages/lix-sdk/src/server-protocol-handler/create-lsp-handler.ts b/packages/lix-sdk/src/server-protocol-handler/create-lsp-handler.ts index beda5bc200..9103221f28 100644 --- a/packages/lix-sdk/src/server-protocol-handler/create-lsp-handler.ts +++ b/packages/lix-sdk/src/server-protocol-handler/create-lsp-handler.ts @@ -1,14 +1,14 @@ import type { Storage } from "./storage/storage.js"; import { route } from "./routes/new.js"; -export type LixServerProtocolHandler = (request: Request) => Promise; +export type LspHandler = (request: Request) => Promise; -export type LixiumContext = { +export type LspHandlerContext = { request: Request; storage: Storage; }; -export type RouteHandler = (context: LixiumContext) => Promise; +export type LspRouteHandler = (context: LspHandlerContext) => Promise; /** * The handler for the lix server protocol. @@ -48,7 +48,7 @@ export type RouteHandler = (context: LixiumContext) => Promise; */ export async function createLspHandler(args: { storage: Storage; -}): Promise { +}): Promise { const context = { storage: args.storage }; return async (request) => { diff --git a/packages/lix-sdk/src/server-protocol-handler/index.ts b/packages/lix-sdk/src/server-protocol-handler/index.ts index cc448ab993..6a65ce80de 100644 --- a/packages/lix-sdk/src/server-protocol-handler/index.ts +++ b/packages/lix-sdk/src/server-protocol-handler/index.ts @@ -1,5 +1,2 @@ -export { - createLspHandler, - type LixServerProtocolHandler, -} from "./create-lsp-handler.js"; +export { createLspHandler, type LspHandler } from "./create-lsp-handler.js"; export { createInMemoryLspHandlerStorage } from "./storage/create-in-memory-storage.js"; diff --git a/packages/lix-sdk/src/server-protocol-handler/routes/new.ts b/packages/lix-sdk/src/server-protocol-handler/routes/new.ts index faaa8bc734..dce8812c83 100644 --- a/packages/lix-sdk/src/server-protocol-handler/routes/new.ts +++ b/packages/lix-sdk/src/server-protocol-handler/routes/new.ts @@ -1,6 +1,6 @@ -import type { RouteHandler } from "../create-lsp-handler.js"; +import type { LspRouteHandler } from "../create-lsp-handler.js"; -export const route: RouteHandler = async () => { +export const route: LspRouteHandler = async () => { // const body = await context.request.blob(); return new Response("hello world", {