import { type DepPath, type HoistedDependencies, type ProjectId, type DependenciesField } from '@pnpm/types'; export interface DependenciesGraphNode { dir: string; children: Record; optionalDependencies: Set; hasBin: boolean; name: string; depPath: DepPath; } export type DependenciesGraph = Record>; export interface DirectDependenciesByImporterId { [importerId: string]: Map; } export interface HoistOpts extends GetHoistedDependenciesOpts { extraNodePath?: string[]; preferSymlinkedExecutables?: boolean; virtualStoreDir: string; virtualStoreDirMaxLength: number; } export declare function hoist(opts: HoistOpts): Promise; export interface GetHoistedDependenciesOpts { graph: DependenciesGraph; skipped: Set; directDepsByImporterId: DirectDependenciesByImporterId; importerIds?: ProjectId[]; privateHoistPattern: string[]; privateHoistedModulesDir: string; publicHoistPattern: string[]; publicHoistedModulesDir: string; hoistedWorkspacePackages?: Record; } export interface HoistedWorkspaceProject { name: string; dir: string; } export declare function getHoistedDependencies(opts: GetHoistedDependenciesOpts): HoistGraphResult | null; export interface Dependency { children: Record; nodeId: T; depth: number; } interface HoistGraphResult { hoistedDependencies: HoistedDependencies; hoistedDependenciesByNodeId: HoistedDependenciesByNodeId; hoistedAliasesWithBins: string[]; } type HoistedDependenciesByNodeId = Map>; export declare function graphWalker(graph: DependenciesGraph, directDepsByImporterId: DirectDependenciesByImporterId, opts?: { include?: { [dependenciesField in DependenciesField]: boolean; }; skipped?: Set; }): GraphWalker; export interface GraphWalker { directDeps: Array<{ alias: string; nodeId: T; }>; step: GraphWalkerStep; } export interface GraphWalkerStep { dependencies: Array>; links: string[]; missing: string[]; } export interface GraphDependency { nodeId: T; node: DependenciesGraphNode; next: () => GraphWalkerStep; } export {};