basalt / http/src / isRouteVisible
Function: isRouteVisible()
> isRouteVisible(route, context, container): Promise<boolean>
Defined in: http/src/route-visibility.ts:47
True unless the caller statically cannot pass this route's guards, judged only by pure checks:
- built in: a route declaring
meta.authis hidden from a caller with nocontext.user— but only when a registered guard claimedauth(under an edge-auth waiver no user ever appears in the context, and hiding every route would be wrong); - every RouteVisibilityCheck registered in ROUTE_VISIBILITY_BUCKET (e.g. teamsPlugin's
meta.teamRolecheck). A check that throws hides the route (fail closed).
Keys no plugin registered a check for are NOT filtered — the route stays visible and its guards decide on the call.
Parameters
route
context
Record<string, unknown>
container
Returns
Promise<boolean>