Skip to content

@kekkai/blueprint / runDeps

Function: runDeps()

runDeps(root, options?): Promise<{ modules: ModuleDeps[]; ok: boolean; }>

Defined in: inspect/deps.ts:36

Run blueprint deps in root. Read-only. With a target, answers "who gets hit if I change this module" (reverse deps + own imports); without one, prints the blast-radius leaderboard — every module sorted by fan-in.

Parameters

root

string

options?

DepsOptions = {}

Returns

Promise<{ modules: ModuleDeps[]; ok: boolean; }>

Example

ts
const { modules } = await runDeps(process.cwd(), { target: 'hooks/useCart' });

console.log(modules[0].importedBy); // who gets hit if I change it