feat(dev-server): load the authz catalog at boot

Adds loadAppAuthzCatalog(appDir) to @wrnexus/dev-server: discovers
app/authz/*.ts declarations via buildRouter, imports and merges them
into an AuthzCatalog, returning an empty catalog when the app has no
declarations. A declaration with no default export is skipped with a
warning; a genuine conflict between two declarations throws
WRN-AUTHZ-CONFLICT naming both source files.

Declared the missing @wrnexus/authz workspace dependency in
dev-server's package.json.
This commit is contained in:
2026-08-04 22:03:28 +05:30
parent bc5437063d
commit daea59cf5d
3 changed files with 94 additions and 0 deletions
+1
View File
@@ -8,6 +8,7 @@
"./serve-entry": "./src/serve-entry.ts"
},
"dependencies": {
"@wrnexus/authz": "workspace:*",
"@wrnexus/core": "workspace:*",
"@wrnexus/dev-toolbar": "workspace:*",
"@wrnexus/router": "workspace:*",