import { type PathBuilderLike } from "path-ts"; /** * Options for {@link listInputChanges}. */ export interface InputChangesOptions { /** * The corpus `MANIFEST.json` whose files are compared. */ manifestPath: PathBuilderLike; /** * The manifest source whose files are compared, such as `wof-admin`. */ source: string; /** * The directory holding the checkouts, as the build read it, such * as `$MAILWOMAN_CACHE_ROOT/sources/wof-repos`. */ inputRoot: PathBuilderLike; /** * The time the rows were read, for files whose records store no commits. * * Each checkout's base is then its last commit before this time. * A file merged from an earlier build records its own `builtAt`, which is later * than the read, so the caller states the read time. */ at?: string; } /** * How a checkout's base commit was found. */ export declare const BaseCommitOrigin: { /** * The file records stored the commit. */ readonly Recorded: "recorded"; /** * The commit is the checkout's last commit before {@linkcode InputChangesOptions.at}. */ readonly LastBeforeAt: "last-before-at"; }; export type BaseCommitOrigin = (typeof BaseCommitOrigin)[keyof typeof BaseCommitOrigin]; /** * One input file that differs from the state the corpus files were built from. */ export interface ChangedInputFile { checkout: string; path: string; /** * `committed` for a file a commit after the base changed, `uncommitted` for * a file `git status` reports now. */ change: "committed" | "uncommitted"; /** * The WOF id at the start of the file name, or `null` for a file that's no WOF record, * such as a directory `git status` collapses or a `LICENSE.md`. */ wofID: number | null; } /** * One checkout's comparison. */ export interface CheckoutComparison { checkout: string; /** * The commit the rows were read from, or `null` when the checkout held no commit before `at`. */ base: string | null; origin: BaseCommitOrigin; head: string; /** * The uncommitted-file count the records stored for the checkout, or `null` when they stored none. */ uncommittedAtBuild: number | null; changed: ChangedInputFile[]; } /** * The comparison of one manifest source against the current checkouts. */ export interface InputChanges { source: string; files: number; origin: BaseCommitOrigin; checkouts: CheckoutComparison[]; /** * Checkouts the records store that the input root no longer holds. */ missing: string[]; } /** * The WOF id in a path's file name, or `null`. */ export declare function geojsonFileWOFID(path: string): number | null; /** * Compare the commits a manifest source's files were built from with the checkouts under `inputRoot` now. * * @throws When the source has no files in the manifest, when a file has no readable record, when the * records store no commits and `at` is absent, or when some records store commits and others do not. */ export declare function listInputChanges(options: InputChangesOptions): Promise; //# sourceMappingURL=input-changes.d.ts.map