/** * Plugin Migration Chain Resolution * * Parses migration filenames, builds a version graph, and finds * the shortest migration path between two versions using BFS. */ import { MigrationDescriptor } from "./types"; /** * Parses a migration filename into its constituent version parts. * Returns undefined if the filename does not match the expected pattern. * * @param filename - The migration filename to parse */ export declare function parseMigrationFilename(filename: string): MigrationDescriptor | undefined; /** * Lists all migration descriptors found in a migrations directory. * Ignores files that do not match the expected naming pattern. * * @param migrationsDir - Absolute path to the migrations directory */ export declare function listMigrations(migrationsDir: string): Promise; /** * Builds a directed adjacency list from version to version, * keyed by "from" version, with edges pointing to "to" versions. * * @param migrations - Array of migration descriptors */ export declare function buildMigrationGraph(migrations: MigrationDescriptor[]): Map; /** * Finds the shortest migration path from one version to another using BFS. * Returns the ordered list of migration descriptors, or undefined if no path exists. * * @param migrations - All available migration descriptors * @param fromVersion - Starting version * @param toVersion - Target version */ export declare function findMigrationPath(migrations: MigrationDescriptor[], fromVersion: string, toVersion: string): MigrationDescriptor[] | undefined; /** * Full migration resolution flow: lists migrations from a package directory, * finds the shortest path, and returns the migration descriptors with their * file contents loaded. * * @param packageDir - Absolute path to the plugin package directory (containing migrations/ subdir) * @param fromVersion - Current installed version * @param toVersion - Target version to migrate to * @returns Array of objects with descriptor and content, or undefined if no path exists */ export declare function resolveMigrationChain(packageDir: string, fromVersion: string, toVersion: string): Promise | undefined>; //# sourceMappingURL=migrations.d.ts.map