import type { MigrationBlockConfig, MigrationEntry, MigrationProjectPaths, MigrationProjectState, ResolvedMigrationBlockTarget, RuleMetadata } from './migration-types.js'; /** * Resolves the canonical migration workspace paths for a project directory. * * @param projectDir Project directory containing the migration workspace. * @returns Absolute filesystem paths for config, generated, fixture, rule, and snapshot roots. */ export declare function getProjectPaths(projectDir: string): MigrationProjectPaths; /** * Resolves the snapshot root for a block target and migration version. * * @param projectDir Project directory containing the migration workspace. * @param block Block target or resolved block target. * @param version Migration version label. * @returns The absolute snapshot root directory for the requested block/version pair. */ export declare function getSnapshotRoot(projectDir: string, block: MigrationBlockConfig | ResolvedMigrationBlockTarget, version: string): string; /** * Resolves the snapshot `block.json` path for a block target and migration version. * * @param projectDir Project directory containing the migration workspace. * @param block Block target or resolved block target. * @param version Migration version label. * @returns The absolute snapshot `block.json` path. */ export declare function getSnapshotBlockJsonPath(projectDir: string, block: MigrationBlockConfig | ResolvedMigrationBlockTarget, version: string): string; /** * Resolves the snapshot manifest path for a block target and migration version. * * @param projectDir Project directory containing the migration workspace. * @param block Block target or resolved block target. * @param version Migration version label. * @returns The absolute snapshot manifest path. */ export declare function getSnapshotManifestPath(projectDir: string, block: MigrationBlockConfig | ResolvedMigrationBlockTarget, version: string): string; /** * Lists the snapshot versions currently present for a specific block target. * * Returns the sorted subset of supported migration versions that have a manifest on disk * for the provided block, or an empty array when none exist. */ export declare function getAvailableSnapshotVersionsForBlock(projectDir: string, supportedMigrationVersions: string[], block: MigrationBlockConfig | ResolvedMigrationBlockTarget): string[]; /** * Formats the standard missing-snapshot guidance for a block target. * * Returns a user-facing message that either lists the available snapshot * versions or explains that no snapshots exist yet for the block. */ export declare function createMissingBlockSnapshotMessage(blockName: string, fromVersion: string, availableSnapshotVersions: string[]): string; /** * Resolves the snapshot save source path for a block target and migration version. * * @param projectDir Project directory containing the migration workspace. * @param block Block target or resolved block target. * @param version Migration version label. * @returns The absolute snapshot `save.tsx` path. */ export declare function getSnapshotSavePath(projectDir: string, block: MigrationBlockConfig | ResolvedMigrationBlockTarget, version: string): string; /** * Resolves the generated directory used for a block's migration output. * * @param paths Resolved migration project paths. * @param block Block target or resolved block target. * @returns The absolute generated directory for the block. */ export declare function getGeneratedDirForBlock(paths: MigrationProjectPaths, block: MigrationBlockConfig | ResolvedMigrationBlockTarget): string; /** * Resolves the migration rule file path for a block version edge. * * @param paths Resolved migration project paths. * @param block Block target or resolved block target. * @param fromVersion Source migration version. * @param toVersion Destination migration version. * @returns The absolute migration rule file path. */ export declare function getRuleFilePath(paths: MigrationProjectPaths, block: MigrationBlockConfig | ResolvedMigrationBlockTarget, fromVersion: string, toVersion: string): string; /** * Resolves the migration fixture path for a block version edge. * * @param paths Resolved migration project paths. * @param block Block target or resolved block target. * @param fromVersion Source migration version. * @param toVersion Destination migration version. * @returns The absolute migration fixture file path. */ export declare function getFixtureFilePath(paths: MigrationProjectPaths, block: MigrationBlockConfig | ResolvedMigrationBlockTarget, fromVersion: string, toVersion: string): string; /** * Resolves the validators import path for generated migration artifacts. * * @param projectDir Project directory containing the migration workspace. * @param block Block target or resolved block target. * @param fromDir Directory that will import the validators module. * @returns A relative module import path without a file extension. */ export declare function getValidatorsImportPath(projectDir: string, block: MigrationBlockConfig | ResolvedMigrationBlockTarget, fromDir: string): string; /** * Ensures the migration fixture, generated, rule, and snapshot directories exist. * * @param projectDir Project directory containing the migration workspace. * @param blocks Optional block targets whose scoped rule/fixture directories should be created. * @returns Nothing. */ export declare function ensureMigrationDirectories(projectDir: string, blocks?: MigrationBlockConfig[]): void; /** * Discovers the generated migration registry entries for a loaded project state. * * @param state Loaded migration project state. * @returns Sorted migration registry entries for every available block/version edge. */ export declare function discoverMigrationEntries(state: MigrationProjectState): MigrationEntry[]; /** * Verifies that a migration rule file exists and no TODO markers remain in it. * * @param projectDir Project directory containing the migration workspace. * @param block Block target or resolved block target. * @param fromMigrationVersion Source migration version. * @param toMigrationVersion Destination migration version. * @returns Nothing. * @throws Error When the rule file is missing or still contains TODO markers. */ export declare function assertRuleHasNoTodos(projectDir: string, block: MigrationBlockConfig | ResolvedMigrationBlockTarget, fromMigrationVersion: string, toMigrationVersion: string): void; /** * Reads lightweight metadata from a migration rule source file. * * @param rulePath Absolute path to the migration rule source file. * @returns Parsed unresolved paths, rename mappings, and transform keys. */ export declare function readRuleMetadata(rulePath: string): RuleMetadata; /** * Normalizes a migration block config against the current working directory. * * @param block Migration block config with project-relative file paths. * @returns A normalized migration block config with ensured relative paths. */ export declare function createMigrationBlockConfig(block: MigrationBlockConfig): MigrationBlockConfig;