Function
sfcFileNode
(filePath: string, source: string, language: Language)
Source from the content-addressed store, hash-verified
| 93 | |
| 94 | /** The SFC's own file node — the whole file, as the tree-sitter extractor makes one. */ |
| 95 | export function sfcFileNode(filePath: string, source: string, language: Language): Node { |
| 96 | return { |
| 97 | id: `file:${filePath}`, |
| 98 | kind: 'file', |
| 99 | name: path.basename(filePath), |
| 100 | qualifiedName: filePath, |
| 101 | filePath, |
| 102 | language, |
| 103 | startLine: 1, |
| 104 | endLine: source.split('\n').length, |
| 105 | startColumn: 0, |
| 106 | endColumn: 0, |
| 107 | isExported: false, |
| 108 | updatedAt: Date.now(), |
| 109 | }; |
| 110 | } |
| 111 | |
| 112 | export interface ScriptFold { |
| 113 | filePath: string; |
Tested by
no test coverage detected