* The routing manifest, trimmed to a starting-points list. * * `buildRoutes` is reused rather than re-derived so a route row means exactly * the same thing here as on the routes endpoint — including its handler id and * its registration site, which are what make the row navigable and groupable.
(cg: CodeGraph, limit: number)
| 215 | * its registration site, which are what make the row navigable and groupable. |
| 216 | */ |
| 217 | function routeEntries(cg: CodeGraph, limit: number): WireEntryPoints['routes'] { |
| 218 | const manifest = buildRoutes(cg, new URLSearchParams([['limit', String(limit)]])); |
| 219 | return { |
| 220 | routed: manifest.routed, |
| 221 | routeCount: manifest.routeCount, |
| 222 | // `shown` counts the rows; `truncated` is the manifest's own verdict on |
| 223 | // whether the window cut anything, and it is more trustworthy than |
| 224 | // comparing against `routeCount` (which counts URLs whose handler never |
| 225 | // resolved as well). |
| 226 | items: { |
| 227 | total: manifest.truncated ? Math.max(manifest.shown + 1, manifest.routeCount) : manifest.shown, |
| 228 | shown: manifest.shown, |
| 229 | truncated: manifest.truncated, |
| 230 | items: manifest.entries, |
| 231 | }, |
| 232 | }; |
| 233 | } |
| 234 | |
| 235 | /** |
| 236 | * Files that do something on the way down, most first. |
no test coverage detected