feat: restore gateway HMR and add WRN formatting

This commit is contained in:
2026-07-13 14:54:03 +05:30
parent 3b46c69601
commit cff420a29e
71 changed files with 727 additions and 119 deletions
+1 -1
View File
@@ -142,7 +142,7 @@ interface ProdOptions {
### `startGateway(opts)` — multi-app gateway
Serves several apps behind one port and routes each request to the right app by its `Host` header. Each app runs as its own child process (full isolation); the gateway is a thin host-based reverse proxy for HTTP and WebSocket. Apps communicate at runtime via `@wrnexus/pubsub` (use the Redis driver so messages cross processes).
Serves several apps behind one port and routes each request to the right app by its `Host` header. Each app runs as its own child process (full isolation); the gateway is a thin host-based reverse proxy for HTTP and WebSocket. In development, the gateway supervises every child: editing a page, component, API, or middleware restarts only that app and the HMR client reconnects to display the latest page. Apps communicate at runtime via `@wrnexus/pubsub` (use the Redis driver so messages cross processes).
```ts
interface GatewayOptions {
+13 -13
View File
@@ -1,6 +1,6 @@
{
"name": "@wrnexus/dev-server",
"version": "0.2.18",
"version": "0.2.19",
"type": "module",
"description": "@wrnexus/dev-server — part of the WrNexus framework.",
"license": "MIT",
@@ -25,18 +25,18 @@
}
},
"dependencies": {
"@wrnexus/core": "^0.2.18",
"@wrnexus/router": "^0.2.18",
"@wrnexus/ssr": "^0.2.18",
"@wrnexus/csr": "^0.2.18",
"@wrnexus/compiler": "^0.2.18",
"@wrnexus/styles": "^0.2.18",
"@wrnexus/ui": "^0.2.18",
"@wrnexus/validation": "^0.2.18",
"@wrnexus/i18n": "^0.2.18",
"@wrnexus/db": "^0.2.18",
"@wrnexus/pubsub": "^0.2.18",
"@wrnexus/uploader": "^0.2.18"
"@wrnexus/core": "^0.2.19",
"@wrnexus/router": "^0.2.19",
"@wrnexus/ssr": "^0.2.19",
"@wrnexus/csr": "^0.2.19",
"@wrnexus/compiler": "^0.2.19",
"@wrnexus/styles": "^0.2.19",
"@wrnexus/ui": "^0.2.19",
"@wrnexus/validation": "^0.2.19",
"@wrnexus/i18n": "^0.2.19",
"@wrnexus/db": "^0.2.19",
"@wrnexus/pubsub": "^0.2.19",
"@wrnexus/uploader": "^0.2.19"
},
"files": [
"dist"