Function
sfcFileNode
(filePath: string, source: string, language: Language)
Source from the content-addressed store, hash-verified
| 434 | |
| 435 | /** The SFC's own file node — the whole file, as the tree-sitter extractor makes one. */ |
| 436 | export function sfcFileNode(filePath: string, source: string, language: Language): Node { |
| 437 | return { |
| 438 | id: `file:${filePath}`, |
| 439 | kind: 'file', |
| 440 | name: path.basename(filePath), |
| 441 | qualifiedName: filePath, |
| 442 | filePath, |
| 443 | language, |
| 444 | startLine: 1, |
| 445 | endLine: source.split('\n').length, |
| 446 | startColumn: 0, |
| 447 | endColumn: 0, |
| 448 | isExported: false, |
| 449 | updatedAt: Date.now(), |
| 450 | }; |
| 451 | } |
| 452 | |
| 453 | export interface ScriptFold { |
| 454 | filePath: string; |
Tested by
no test coverage detected