diff --git a/.publish/ai/package.json b/.publish/ai/package.json index 576e88f1..9dd828ea 100644 --- a/.publish/ai/package.json +++ b/.publish/ai/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/ai", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "Zero-dependency Claude (Anthropic) client for WrNexus apps.", "license": "MIT", diff --git a/.publish/authz/package.json b/.publish/authz/package.json index 05906c51..c81dd159 100644 --- a/.publish/authz/package.json +++ b/.publish/authz/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/authz", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/authz — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/cli/package.json b/.publish/cli/package.json index c9fd61f6..18201694 100644 --- a/.publish/cli/package.json +++ b/.publish/cli/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/cli", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/cli — part of the WrNexus framework.", "license": "MIT", @@ -28,16 +28,16 @@ "wrnexus": "./dist/index.js" }, "dependencies": { - "@wrnexus/core": "^0.2.67", - "@wrnexus/router": "^0.2.67", - "@wrnexus/csr": "^0.2.67", - "@wrnexus/compiler": "^0.2.67", - "@wrnexus/styles": "^0.2.67", - "@wrnexus/dev-server": "^0.2.67", - "@wrnexus/ui": "^0.2.67", - "@wrnexus/validation": "^0.2.67", - "@wrnexus/i18n": "^0.2.67", - "@wrnexus/db": "^0.2.67" + "@wrnexus/core": "^0.2.68", + "@wrnexus/router": "^0.2.68", + "@wrnexus/csr": "^0.2.68", + "@wrnexus/compiler": "^0.2.68", + "@wrnexus/styles": "^0.2.68", + "@wrnexus/dev-server": "^0.2.68", + "@wrnexus/ui": "^0.2.68", + "@wrnexus/validation": "^0.2.68", + "@wrnexus/i18n": "^0.2.68", + "@wrnexus/db": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/compiler/package.json b/.publish/compiler/package.json index 5108bfcb..d280bec8 100644 --- a/.publish/compiler/package.json +++ b/.publish/compiler/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/compiler", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/compiler — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/core/package.json b/.publish/core/package.json index c90f990e..d2b7ed67 100644 --- a/.publish/core/package.json +++ b/.publish/core/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/core", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/core — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/csr/package.json b/.publish/csr/package.json index 7f007a19..74dd68bf 100644 --- a/.publish/csr/package.json +++ b/.publish/csr/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/csr", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/csr — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.67" + "@wrnexus/core": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/db/package.json b/.publish/db/package.json index 12298140..40509482 100644 --- a/.publish/db/package.json +++ b/.publish/db/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/db", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/db — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/dev-server/package.json b/.publish/dev-server/package.json index 58d7c866..afb7a32f 100644 --- a/.publish/dev-server/package.json +++ b/.publish/dev-server/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/dev-server", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/dev-server — part of the WrNexus framework.", "license": "MIT", @@ -25,18 +25,18 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.67", - "@wrnexus/router": "^0.2.67", - "@wrnexus/ssr": "^0.2.67", - "@wrnexus/csr": "^0.2.67", - "@wrnexus/compiler": "^0.2.67", - "@wrnexus/styles": "^0.2.67", - "@wrnexus/ui": "^0.2.67", - "@wrnexus/validation": "^0.2.67", - "@wrnexus/i18n": "^0.2.67", - "@wrnexus/db": "^0.2.67", - "@wrnexus/pubsub": "^0.2.67", - "@wrnexus/uploader": "^0.2.67" + "@wrnexus/core": "^0.2.68", + "@wrnexus/router": "^0.2.68", + "@wrnexus/ssr": "^0.2.68", + "@wrnexus/csr": "^0.2.68", + "@wrnexus/compiler": "^0.2.68", + "@wrnexus/styles": "^0.2.68", + "@wrnexus/ui": "^0.2.68", + "@wrnexus/validation": "^0.2.68", + "@wrnexus/i18n": "^0.2.68", + "@wrnexus/db": "^0.2.68", + "@wrnexus/pubsub": "^0.2.68", + "@wrnexus/uploader": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/encryption/package.json b/.publish/encryption/package.json index f8b7e083..f27bd19c 100644 --- a/.publish/encryption/package.json +++ b/.publish/encryption/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/encryption", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/encryption — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/helpers/package.json b/.publish/helpers/package.json index 8b9c09e2..0ccd9daf 100644 --- a/.publish/helpers/package.json +++ b/.publish/helpers/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/helpers", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "Safe convenience helpers for WrNexus request contexts and common application flows.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.67" + "@wrnexus/core": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/i18n/package.json b/.publish/i18n/package.json index e02f0f6e..e2581db0 100644 --- a/.publish/i18n/package.json +++ b/.publish/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/i18n", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/i18n — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.67" + "@wrnexus/core": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/jwt/package.json b/.publish/jwt/package.json index e612638e..a6930c9d 100644 --- a/.publish/jwt/package.json +++ b/.publish/jwt/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/jwt", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/jwt — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/mobile/package.json b/.publish/mobile/package.json index 6dc73612..3ef65fc8 100644 --- a/.publish/mobile/package.json +++ b/.publish/mobile/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/mobile", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/mobile — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/native": "^0.2.67" + "@wrnexus/native": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/native/package.json b/.publish/native/package.json index aaa87627..317ce957 100644 --- a/.publish/native/package.json +++ b/.publish/native/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/native", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/native — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/oauth/package.json b/.publish/oauth/package.json index 091666ca..bf23b906 100644 --- a/.publish/oauth/package.json +++ b/.publish/oauth/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/oauth", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/oauth — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/pubsub/package.json b/.publish/pubsub/package.json index d89c9acb..c425b826 100644 --- a/.publish/pubsub/package.json +++ b/.publish/pubsub/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/pubsub", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/pubsub — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/queue/package.json b/.publish/queue/package.json index bc9cfddf..2686c599 100644 --- a/.publish/queue/package.json +++ b/.publish/queue/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/queue", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/queue — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/reactive/package.json b/.publish/reactive/package.json index a93c840e..6675a5a7 100644 --- a/.publish/reactive/package.json +++ b/.publish/reactive/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/reactive", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/reactive — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/router/package.json b/.publish/router/package.json index 7b7547b4..850fd7c8 100644 --- a/.publish/router/package.json +++ b/.publish/router/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/router", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/router — part of the WrNexus framework.", "license": "MIT", @@ -21,8 +21,8 @@ } }, "dependencies": { - "@wrnexus/compiler": "^0.2.67", - "@wrnexus/core": "^0.2.67" + "@wrnexus/compiler": "^0.2.68", + "@wrnexus/core": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/ssr/package.json b/.publish/ssr/package.json index 73cac920..4a0b0c42 100644 --- a/.publish/ssr/package.json +++ b/.publish/ssr/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/ssr", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/ssr — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.67" + "@wrnexus/core": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/styles/package.json b/.publish/styles/package.json index 0efd9a5f..1da566b0 100644 --- a/.publish/styles/package.json +++ b/.publish/styles/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/styles", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/styles — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/uploader": "^0.2.67" + "@wrnexus/uploader": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/test/package.json b/.publish/test/package.json index db21f77a..c0664ad5 100644 --- a/.publish/test/package.json +++ b/.publish/test/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/test", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/test — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/tracking/package.json b/.publish/tracking/package.json index fd7cbb81..db24f5e3 100644 --- a/.publish/tracking/package.json +++ b/.publish/tracking/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/tracking", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/tracking — part of the WrNexus framework.", "license": "MIT", diff --git a/.publish/ui/package.json b/.publish/ui/package.json index bcfab30c..b9a7d2c9 100644 --- a/.publish/ui/package.json +++ b/.publish/ui/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/ui", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/ui — part of the WrNexus framework.", "license": "MIT", @@ -25,7 +25,7 @@ "./ui.css": "./ui.css" }, "dependencies": { - "@wrnexus/core": "^0.2.67" + "@wrnexus/core": "^0.2.68" }, "files": [ "dist", diff --git a/.publish/uploader/package.json b/.publish/uploader/package.json index 0f738ece..403f7a28 100644 --- a/.publish/uploader/package.json +++ b/.publish/uploader/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/uploader", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/uploader — part of the WrNexus framework.", "license": "MIT", @@ -21,7 +21,7 @@ } }, "dependencies": { - "@wrnexus/core": "^0.2.67" + "@wrnexus/core": "^0.2.68" }, "files": [ "dist" diff --git a/.publish/validation/package.json b/.publish/validation/package.json index 693d4cec..6cdca404 100644 --- a/.publish/validation/package.json +++ b/.publish/validation/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/validation", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "description": "@wrnexus/validation — part of the WrNexus framework.", "license": "MIT", diff --git a/packages/ai/package.json b/packages/ai/package.json index fdab59b6..6066ee29 100644 --- a/packages/ai/package.json +++ b/packages/ai/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/ai", - "version": "0.2.67", + "version": "0.2.68", "private": true, "type": "module", "description": "Zero-dependency Claude (Anthropic) client for WrNexus apps.", diff --git a/packages/authz/package.json b/packages/authz/package.json index dc5c5ab8..fdb2e5cd 100644 --- a/packages/authz/package.json +++ b/packages/authz/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/authz", - "version": "0.2.67", + "version": "0.2.68", "private": true, "type": "module", "main": "src/index.ts", diff --git a/packages/cli/package.json b/packages/cli/package.json index d9329c4c..58869e9b 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/cli", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "main": "src/index.ts", "exports": { diff --git a/packages/cli/src/update.ts b/packages/cli/src/update.ts index 4b69ffc8..2117dc13 100644 --- a/packages/cli/src/update.ts +++ b/packages/cli/src/update.ts @@ -673,6 +673,15 @@ const MIGRATIONS: Migration[] = [ // Existing workspace configurations remain compatible; new controls are opt-in. }, }, + { + version: "0.2.68", + id: "production-request-error-logging", + description: + "Logs production request exceptions, forward-auth verifier failures, proxy failures, and unexpected app exits with actionable context.", + apply() { + // Runtime diagnostics improve automatically after updating and redeploying. + }, + }, ]; /** Release tooling uses this to require an explicit migration entry per version. */ diff --git a/packages/compiler/package.json b/packages/compiler/package.json index 98037a64..817de731 100644 --- a/packages/compiler/package.json +++ b/packages/compiler/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/compiler", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "main": "src/index.ts", "exports": { diff --git a/packages/core/package.json b/packages/core/package.json index 673cee0b..132d00dc 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/core", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "main": "src/index.ts", "exports": { diff --git a/packages/csr/package.json b/packages/csr/package.json index cee1e490..b09c1148 100644 --- a/packages/csr/package.json +++ b/packages/csr/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/csr", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "main": "src/index.ts", "exports": { diff --git a/packages/db/package.json b/packages/db/package.json index 445f0c59..650c9cc6 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/db", - "version": "0.2.67", + "version": "0.2.68", "private": true, "type": "module", "main": "src/index.ts", diff --git a/packages/dev-server/package.json b/packages/dev-server/package.json index 90fdeafb..423386e8 100644 --- a/packages/dev-server/package.json +++ b/packages/dev-server/package.json @@ -1,6 +1,6 @@ { "name": "@wrnexus/dev-server", - "version": "0.2.67", + "version": "0.2.68", "type": "module", "main": "src/index.ts", "exports": { diff --git a/packages/dev-server/src/gateway.ts b/packages/dev-server/src/gateway.ts index 5d857b19..969e4a62 100644 --- a/packages/dev-server/src/gateway.ts +++ b/packages/dev-server/src/gateway.ts @@ -207,8 +207,20 @@ async function checkAuth( headers: forwardAuthHeaders(req), redirect: "manual", }); - if (!res.ok) return forwardAuthFailure(res, verifyUrl); - } catch { + if (!res.ok) { + if (res.status >= 500) { + const requestUrl = new URL(req.url); + console.error( + `[wrnexus] forward-auth verifier error: ${req.method} ${requestUrl.pathname} via ${verifyUrl} returned ${res.status}`, + ); + } + return forwardAuthFailure(res, verifyUrl); + } + } catch (error) { + console.error( + `[wrnexus] forward-auth verifier unavailable: ${verifyUrl}`, + error instanceof Error ? (error.stack ?? error.message) : error, + ); return new Response("Auth service unavailable", { status: 503 }); } } @@ -373,7 +385,14 @@ export async function startGateway(opts: GatewayOptions): Promise { if (stopping || target.child !== child) return; const delay = gatewayRestartDelay(mode, code, signal); - if (delay === null) return; + if (delay === null) { + if (code !== 0 || signal) { + console.error( + `[wrnexus] app '${target.name}' stopped unexpectedly (${signal ? `signal ${signal}` : `code ${code}`})`, + ); + } + return; + } if (delay > 0) { console.error(`[wrnexus] app '${target.name}' exited (code ${code}); retrying in 1.2s…`); setTimeout(launch, delay); @@ -480,7 +499,11 @@ export async function startGateway(opts: GatewayOptions): Promise