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

Function flushRoute

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

Source from the content-addressed store, hash-verified

123 let methods: string[] = [];
124
125 const flushRoute = () => {
126 if (!pending || !currentPath) return;
127
128 const methodTag = methods.length > 0 ? ` [${methods.join(',')}]` : '';
129 const routeNode: Node = {
130 id: `route:${filePath}:${pending.lineNum}:${currentPath}`,
131 kind: 'route',
132 name: `${currentPath}${methodTag}`,
133 qualifiedName: `${filePath}::${pending.name}`,
134 filePath,
135 startLine: pending.lineNum,
136 endLine: pending.lineNum,
137 startColumn: 0,
138 endColumn: 0,
139 language: 'yaml',
140 updatedAt: now,
141 };
142 nodes.push(routeNode);
143
144 for (const handler of handlerRefs) {
145 references.push({
146 fromNodeId: routeNode.id,
147 referenceName: handler,
148 referenceKind: 'references',
149 line: pending.lineNum,
150 column: 0,
151 filePath,
152 language: 'yaml',
153 });
154 }
155 };
156
157 for (let i = 0; i < lines.length; i++) {
158 const line = lines[i]!;

Callers 1

extractDrupalRoutesFunction · 0.85

Calls 2

pushMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected