(node: GraphNode)
| 7 | |
| 8 | /** Labels are navigation heuristics; they do not promote a name into a verified entry point. */ |
| 9 | export function entryRole(node: GraphNode): EntryRole { |
| 10 | const path = node.file_path ?? ''; |
| 11 | if (node.status === 'test' || /(^|\/)(tests?|fixtures?|verification|eval)(\/|\.)|\.(test|spec)\./i.test(path)) return 'Tests'; |
| 12 | if (/(^|\/)(scripts?|tools?|hooks?|examples?|benchmarks?)(\/|\.)/i.test(path) |
| 13 | || /(^|\/)(install|uninstall|setup)\.[^/]+$/i.test(path)) return 'Tools'; |
| 14 | if (/\.(tsx|jsx|vue|svelte)$/.test(path)) return 'Frontend'; |
| 15 | return 'Application'; |
| 16 | } |
| 17 | |
| 18 | export function entryCandidates(nodes: GraphNode[]): GraphNode[] { |
| 19 | return nodes.filter(node => node.file_path && node.status === 'entry') |
no outgoing calls
no test coverage detected