mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-29 06:46:49 +08:00
fix(nuxt, astro): a file-routed page is bound to its component (#2267)
A Nuxt pages/x.vue or Astro src/pages/x.astro route linked to nothing, so the viewer's Steps drew a page alone and the routes list never named what serves it. Each page route now references its file's own component (never a same-named one — every index.vue is a component named index), an Astro endpoint its exported verb handlers, and the routing manifest accepts a component as what serves a route, which also lists Vue Router screens. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
41cfc8356f
commit
e12f5bbb92
+3
-2
@@ -1204,7 +1204,8 @@ export class QueryBuilder {
|
||||
if (!this.stmts.getRoutingManifest) {
|
||||
// Edge kind varies across framework resolvers: Spring/Rails/
|
||||
// Laravel/Drupal emit `references`, Express emits `calls`. Accept
|
||||
// both — the semantic is the same (route → its handler).
|
||||
// both — the semantic is the same (route → its handler). A screen in
|
||||
// a Vue / Svelte / Astro app is served by a `component`.
|
||||
this.stmts.getRoutingManifest = this.db.prepare(`
|
||||
SELECT
|
||||
r.name AS url,
|
||||
@@ -1220,7 +1221,7 @@ export class QueryBuilder {
|
||||
JOIN nodes h ON e.target = h.id
|
||||
WHERE r.kind = 'route'
|
||||
AND e.kind IN ('references', 'calls')
|
||||
AND h.kind IN ('function', 'method', 'class', 'constant', 'variable')
|
||||
AND h.kind IN ('function', 'method', 'class', 'constant', 'variable', 'component')
|
||||
ORDER BY r.file_path, r.start_line
|
||||
LIMIT ?
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user