import type { CorpusAdapter } from "#types"; /** * The runtime import graph of the reached workspace modules, keyed by repository-relative path. */ export interface ModuleGraph { /** * Runtime edges from each workspace module to the workspace modules it imports. */ readonly edges: ReadonlyMap; /** * The third-party package directories each workspace module imports at runtime, repository-relative. */ readonly packages: ReadonlyMap; } /** * The repository root this module reads, overridable for a fixture. */ export declare function defaultRepositoryRoot(): string; /** * Cruise the graph from `roots`, which are absolute paths or paths relative to `repositoryRoot`. * * @throws When a root lies outside `packages/` or an import doesn't resolve, because a hash * over a graph with a missing edge would leave an edit to the unresolved module unseen. */ export declare function cruiseModuleGraph(roots: readonly string[], repositoryRoot: string): Promise; /** * The workspace modules and third-party package directories `roots` reach * through runtime edges, each sorted. */ export declare function reachableModules(graph: ModuleGraph, roots: readonly string[]): { modules: string[]; packages: string[]; }; /** * The code hash for each root set, identified by its key, from one cruise over every root. * * @param rootSets Each key's roots are repository-relative or absolute module paths. */ export declare function moduleGraphHashes(rootSets: Readonly>, repositoryRoot?: string): Promise>; /** * The code hash of one root set. */ export declare function moduleGraphHash(roots: readonly string[], repositoryRoot?: string): Promise; /** * Import the adapter with `adapterID` from its module, as {@linkcode adapterModules} found it. * * A parallel build's worker loads its one adapter this way rather than through the registration module. * The registration module imports every adapter. * * @throws When the module exports no adapter with that id. */ export declare function loadAdapterFromModule(module: string, adapterID: string, repositoryRoot?: string): Promise; /** * The module of this package that registers every built-in adapter, repository-relative. */ export declare const ADAPTER_REGISTRATION_MODULE = "packages/corpus/lib/adapters.ts"; /** * The module that exports each adapter, read from the imports of {@linkcode ADAPTER_REGISTRATION_MODULE}. * * @throws When an adapter is exported by no module it imports. */ export declare function adapterModules(adapters: readonly CorpusAdapter[], repositoryRoot?: string): Promise>; //# sourceMappingURL=code-hash.d.ts.map