/**
 * Migration registry that maps version transitions to migration functions.
 *
 * To add a new migration:
 * 1. Create a new migration file (e.g., v2-to-v3.ts)
 * 2. Export the migration object with fromVersion, toVersion, and migrate
 * 3. Add it to the migrations array below
 */
import { v1ToV2Migration } from "./v1-to-v2.js";
const migrations = [v1ToV2Migration];
export function getMigration(fromVersion, toVersion) {
    return migrations.find((m) => m.fromVersion === fromVersion && m.toVersion === toVersion);
}
/**
 * Check if a migration path exists from one version to another.
 *
 * @param fromVersion - Source version
 * @param toVersion - Target version
 * @returns true if all migrations exist for the path
 */
export function hasMigrationPath(fromVersion, toVersion) {
    if (fromVersion >= toVersion) {
        return fromVersion === toVersion;
    }
    for (let v = fromVersion; v < toVersion; v++) {
        if (!getMigration(v, v + 1)) {
            return false;
        }
    }
    return true;
}
//# sourceMappingURL=registry.js.map