import type { StoredSnapshot } from "../types.js"; export interface SnapshotFromGitOptions { /** Working directory (default: process.cwd()). Must be a git repository. */ cwd?: string; /** Run `npm install` in the worktree before analysis (for projects with external deps). */ installDeps?: boolean; } /** * Creates a project snapshot from a git ref (branch, tag, or commit SHA) * without modifying the current working tree. * * Uses `git worktree` to create a temporary checkout, analyzes it, then cleans up. * Requires git to be installed and the directory to be a git repository. * * @param tsConfigPath - Path to tsconfig (relative to repo root) * @param gitRef - Git ref to analyze (e.g. `main`, `origin/main`, `v1.0.0`, `abc1234`) * @param options - Working directory and optional npm install * @returns The snapshot with metadata including git ref and SHA * * @example * ```ts * const stored = snapshotFromGitRef("./tsconfig.json", "main"); * const current = analyzeProject("./tsconfig.json"); * const report = compareSnapshots(stored.snapshot, current); * ``` */ export declare function snapshotFromGitRef(tsConfigPath: string, gitRef: string, options?: SnapshotFromGitOptions): StoredSnapshot; /** * Saves a snapshot from a git ref to disk. Convenience for CI workflows. * * @param tsConfigPath - Path to tsconfig (relative to repo root) * @param gitRef - Git ref to analyze * @param outputPath - Where to save (default: `.flowlock/baseline-{ref}.json`) * @param options - Additional options * @returns Path where snapshot was saved */ export declare function saveSnapshotFromGitRef(tsConfigPath: string, gitRef: string, outputPath?: string, options?: SnapshotFromGitOptions): string; //# sourceMappingURL=snapshotFromGit.d.ts.map