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

Function flushRoute

src/resolution/frameworks/drupal.ts:113–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111 let methods: string[] = [];
112
113 const flushRoute = () => {
114 if (!pending || !currentPath) return;
115
116 const methodTag = methods.length > 0 ? ` [${methods.join(',')}]` : '';
117 const routeNode: Node = {
118 id: `route:${filePath}:${pending.lineNum}:${currentPath}`,
119 kind: 'route',
120 name: `${currentPath}${methodTag}`,
121 qualifiedName: `${filePath}::${pending.name}`,
122 filePath,
123 startLine: pending.lineNum,
124 endLine: pending.lineNum,
125 startColumn: 0,
126 endColumn: 0,
127 language: 'yaml',
128 updatedAt: now,
129 };
130 nodes.push(routeNode);
131
132 for (const handler of handlerRefs) {
133 references.push({
134 fromNodeId: routeNode.id,
135 referenceName: handler,
136 referenceKind: 'references',
137 line: pending.lineNum,
138 column: 0,
139 filePath,
140 language: 'yaml',
141 });
142 }
143 };
144
145 for (let i = 0; i < lines.length; i++) {
146 const line = lines[i]!;

Callers 1

extractDrupalRoutesFunction · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected