import type { BuildSoftwareGraphOptions, BuildSoftwareGraphResult, InMemorySources, SourceProvider } from "../types"; /** * Default root used to label and root in-memory builds. Node ids are always * repository-relative, so this value only appears in `repository.root` and * absolute-path metadata, never in graph identity. */ export declare const DEFAULT_MEMORY_ROOT: string; /** * How {@link buildSoftwareGraphFromMemory} turns in-memory source into a graph. * * - `materialize` (default): write the sources into a private scratch directory, * run the standard on-disk pipeline, then remove the directory. Highest * fidelity because it reuses the exact filesystem-backed toolchain. * - `zero-disk`: serve the sources from memory end to end. Nothing from the * provided source set is written to disk. TypeScript library declarations may * still be read from the installed compiler. */ export type InMemoryBuildStrategy = "materialize" | "zero-disk"; export interface BuildSoftwareGraphFromMemoryOptions extends Omit { /** Repository-relative path -> UTF-8 contents. */ readonly files: InMemorySources; /** Build strategy. Defaults to `materialize`. */ readonly strategy?: InMemoryBuildStrategy | undefined; } export declare class InvalidInMemorySourcePathError extends Error { readonly sourcePath: string; readonly code = "INVALID_IN_MEMORY_SOURCE_PATH"; constructor(sourcePath: string, reason: string); } /** * Normalize an in-memory source map into a {@link SourceProvider}. * * Keys are normalized to POSIX-style repository-relative paths (forward * slashes, no leading `./`). Later keys win on collision after normalization. */ export declare function createInMemorySourceProvider(files: InMemorySources): SourceProvider; /** Validate and canonicalize a repository-relative in-memory source path. */ export declare function normalizeInMemorySourcePath(rawPath: string): string; /** * Build a Software Graph from source held entirely in memory. * * @example * ```ts * const result = await buildSoftwareGraphFromMemory({ * files: { "src/index.ts": "export const answer = 42;\n" }, * }); * ``` */ export declare function buildSoftwareGraphFromMemory(options: BuildSoftwareGraphFromMemoryOptions): Promise; //# sourceMappingURL=index.d.ts.map