bun-ws-router
Version:
Lightweight client/server WebSocket router for Bun with type-safe Zod/Valibot validation.
23 lines (21 loc) • 607 B
text/typescript
// SPDX-FileCopyrightText: 2025-present Kriasoft
// SPDX-License-Identifier: MIT
export { publish } from "./publish";
export { WebSocketRouter } from "./router";
export { createMessageSchema } from "./schema";
export type { AnyMessageSchema, MessageSchema } from "./schema";
export type {
CloseHandler,
CloseHandlerContext,
MessageContext,
MessageHandler,
MessageHandlerEntry,
MessageSchemaType,
OpenHandler,
OpenHandlerContext,
SendFunction,
UpgradeOptions,
WebSocketData,
WebSocketRouterOptions,
} from "./types";
export { formatValidationError, getErrorContext } from "./utils";