MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / routeRow

Function routeRow

ui/src/lib/entry-model.ts:130–147  ·  view source on GitHub ↗
(route: WireEntryRoute)

Source from the content-addressed store, hash-verified

128/* ------------------------------------------------------------------ rows -- */
129
130export function routeRow(route: WireEntryRoute): EntryRow {
131 const where = `${basename(route.file)}:${route.line}`;
132 return {
133 id: `route:${route.routeId}`,
134 name: route.path,
135 method: route.method,
136 kind: 'route',
137 // The handler is the answer to "what serves this URL", so it leads the
138 // meta line; the file only says where to find it.
139 meta: route.handlerId ? `${route.handler} · ${where}` : `${route.handler} · not in the index`,
140 target: route.handlerId
141 ? { type: 'symbol', id: route.handlerId, name: route.handler, kind: route.handlerKind }
142 : null,
143 // An inline handler has no name of its own to draw a Flow from.
144 flowFrom: route.handlerId && !route.inline ? route.handler : null,
145 title: `${route.url} → ${route.handler} (${route.file}:${route.line}), registered at ${route.routeFile}:${route.routeLine}`,
146 };
147}
148
149export function fileRow(file: WireEntryFile): EntryRow {
150 return {

Callers 2

buildEntryPanelFunction · 0.85

Calls 1

basenameFunction · 0.90

Tested by

no test coverage detected