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

Method createFileNode

src/extraction/mybatis-extractor.ts:106–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104 }
105
106 private createFileNode(): Node {
107 const lines = this.source.split('\n');
108 const id = generateNodeId(this.filePath, 'file', this.filePath, 1);
109 const node: Node = {
110 id,
111 kind: 'file',
112 name: this.filePath.split('/').pop() || this.filePath,
113 qualifiedName: this.filePath,
114 filePath: this.filePath,
115 language: 'xml',
116 startLine: 1,
117 endLine: lines.length || 1,
118 startColumn: 0,
119 endColumn: lines[lines.length - 1]?.length ?? 0,
120 updatedAt: Date.now(),
121 };
122 this.nodes.push(node);
123 return node;
124 }
125
126 /**
127 * Find the mapper root and its dialect. Two shapes are recognized:

Callers 1

extractMethod · 0.95

Calls 1

generateNodeIdFunction · 0.90

Tested by

no test coverage detected