Mount plugin routes via the router (todo §2); match method+path under /<id>, resolve :params, permission gate, RouteResult→response

This commit is contained in:
2026-06-16 12:22:15 +02:00
parent ca3f6ba8ce
commit 9b6684c653
9 changed files with 282 additions and 27 deletions

View File

@@ -183,8 +183,9 @@ function collectNavIds(nodes: NavNode[] | undefined, push: (id: string) => void)
}
}
// A route's full path = the plugin's mount path `/<id>` + the route path.
function fullPath(id: string, path: string): string {
// A route's full path = the plugin's mount path `/<id>` + the route path. The single source of
// truth for both conflict detection (here) and the §2 router, so they can't disagree.
export function fullPath(id: string, path: string): string {
return `/${id}${path.startsWith("/") ? path : `/${path}`}`;
}