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

Function flushRoute

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

Source from the content-addressed store, hash-verified

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

Callers 1

extractDrupalRoutesFunction · 0.85

Calls 2

pushMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected