@nextclaw/server 0.5.9 → 0.5.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/ui/server.ts
|
|
2
2
|
import { Hono as Hono2 } from "hono";
|
|
3
|
+
import { compress } from "hono/compress";
|
|
3
4
|
import { cors } from "hono/cors";
|
|
4
5
|
import { serve } from "@hono/node-server";
|
|
5
6
|
import { WebSocketServer, WebSocket } from "ws";
|
|
@@ -1441,6 +1442,7 @@ var DEFAULT_CORS_ORIGINS = (origin) => {
|
|
|
1441
1442
|
};
|
|
1442
1443
|
function startUiServer(options) {
|
|
1443
1444
|
const app = new Hono2();
|
|
1445
|
+
app.use("/*", compress());
|
|
1444
1446
|
const origin = options.corsOrigins ?? DEFAULT_CORS_ORIGINS;
|
|
1445
1447
|
app.use("/api/*", cors({ origin }));
|
|
1446
1448
|
const clients = /* @__PURE__ */ new Set();
|