`kind:name@file` of every target of an `imports` edge from `fromFile`'s file node, sorted.
(fromFile: string)
| 26 | |
| 27 | /** `kind:name@file` of every target of an `imports` edge from `fromFile`'s file node, sorted. */ |
| 28 | function importEdges(fromFile: string): string[] { |
| 29 | const file = cg!.getNodesByKind('file').find((n) => n.filePath === fromFile)!; |
| 30 | expect(file).toBeDefined(); |
| 31 | return cg! |
| 32 | .getOutgoingEdges(file.id) |
| 33 | .filter((e) => e.kind === 'imports') |
| 34 | .map((e) => cg!.getNode(e.target)) |
| 35 | .filter((n): n is NonNullable<typeof n> => !!n) |
| 36 | .map((n) => `${n.kind}:${n.name}@${n.filePath}`) |
| 37 | .sort(); |
| 38 | } |
| 39 | |
| 40 | async function indexed(files: Record<string, string>): Promise<void> { |
| 41 | tempDir = fs.mkdtempSync(path.join(os.tmpdir(), 'codegraph-from-module-')); |
no test coverage detected