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

Function readRoutes

graph-ui/src/provider/route-reader.ts:112–121  ·  view source on GitHub ↗
(source: string, filePath: string)

Source from the content-addressed store, hash-verified

110 * that means anything.
111 */
112export function readRoutes(source: string, filePath: string): SourceRoute[] {
113 if (!isRouteSource(filePath)) {
114 return [];
115 }
116 const lower = filePath.toLowerCase();
117 const found = ANNOTATION_EXTENSIONS.some(extension => lower.endsWith(extension))
118 ? readAnnotationRoutes(source)
119 : readScriptRoutes(source);
120 return dedupe(found).slice(0, MAX_ROUTES_PER_FILE);
121}
122
123/** Method calls and decorators, which is how JavaScript, TypeScript and Python register. */
124function readScriptRoutes(source: string): SourceRoute[] {

Callers 2

scanRoutesFunction · 0.90
scanRoutesMethod · 0.90

Calls 4

isRouteSourceFunction · 0.85
readAnnotationRoutesFunction · 0.85
readScriptRoutesFunction · 0.85
dedupeFunction · 0.85

Tested by

no test coverage detected