Chungus 2.0

This commit is contained in:
Owen
2025-10-10 11:27:15 -07:00
parent f64a477c3d
commit d92b87b7c8
224 changed files with 1507 additions and 1586 deletions

View File

@@ -1,24 +1,2 @@
import { build } from "@server/build";
// Import both modules
import * as wsModule from "./ws";
import * as privateWsModule from "./privateWs";
// Conditionally export WebSocket implementation based on build type
const wsImplementation = build === "oss" ? wsModule : privateWsModule;
// Re-export all items from the selected implementation
export const {
router,
handleWSUpgrade,
sendToClient,
broadcastToAllExcept,
connectedClients,
hasActiveConnections,
getActiveNodes,
NODE_ID,
cleanup
} = wsImplementation;
// Re-export the MessageHandler type (both modules have the same type signature)
export type { MessageHandler } from "./privateWs";
export * from "./ws";
export * from "./types";