MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / rowOfRoute

Function rowOfRoute

graph-ui/src/entry/entry-model.ts:110–128  ·  view source on GitHub ↗

One recovered route as a row, with the strength of the reading on it.

(route: RouteRef)

Source from the content-addressed store, hash-verified

108
109/** One recovered route as a row, with the strength of the reading on it. */
110function rowOfRoute(route: RouteRef): EntryRow {
111 const label = `${route.method === undefined ? '' : `${route.method} `}${route.path}`;
112 return {
113 key: `route:${label}`,
114 name: route.handler === undefined || route.handler.length === 0 ? label : `${label} -> ${route.handler}`,
115 where: whereOf(route.filePath, route.line),
116 origin: route.origin === 'index' ? 'route (from the index)' : 'route (read from the source)',
117 ...(route.filePath === undefined || route.filePath.length === 0
118 ? {}
119 : {
120 target: {
121 name: route.handler === undefined || route.handler.length === 0 ? label : route.handler,
122 kind: 'route',
123 filePath: route.filePath,
124 startLine: route.line,
125 } satisfies DeclarationTarget,
126 }),
127 };
128}
129
130/**
131 * The offered rows, entry points first and routes after them.

Callers

nothing calls this directly

Calls 1

whereOfFunction · 0.70

Tested by

no test coverage detected