import { type PartialWithUndefined } from '@augment-vir/common'; import { PackageJsonDependencyKey } from '@augment-vir/node'; import { type NpmPackage } from './get-npm-packages.js'; import { type PackagesGraph } from './print-tree.js'; import { type TreeNode } from './string-tree/string-tree.js'; /** * Creates a package tree represented in various formats. * * @category Internal */ export declare function createPackageTree(cwd: string, exclude?: ReadonlyArray): Promise<{ packagesTree: TreeNode[]; packagesGraph: PackagesGraph; packagesByName: Readonly>; /** * All direct and transitive inter-workspace dependencies for each package, grouped by * dependency type. */ allDependenciesByPackage: Record>>; }>; /** All transitive dependencies for a package, grouped by dependency type. */ export type AllDependenciesByType = PartialWithUndefined>; /** * Computes all direct and transitive inter-workspace dependencies for each package, grouped by * dependency type. * * @category Internal */ export declare function computeAllTransitiveDependencies(packagesByName: Readonly>, directDeps: Readonly>>): Record; /** * Converts a package tree array to a graph. * * @category Internal */ export declare function createPackagesGraph(tree: ReadonlyArray>): PackagesGraph; /** * Calculates all internal mono repo package dependencies for the given repo path (`cwd`) and saves * it as a direct graph SVG. * * @category Main */ export declare function writePackageDepsToFile({ cwd, exclude, filePath, }: { cwd: string; } & PartialWithUndefined<{ exclude: ReadonlyArray; /** Defaults to `join(cwd, 'packages-graph.svg')`. */ filePath: string; }>): Promise<{ filePath: string; svg: string; }>;