import type { ConfigSectionAdded, MigrationItem } from "../types/migration.js"; export interface UpdateOptions { dryRun?: boolean; force?: boolean; skipAll?: boolean; createNew?: boolean; allowDowngrade?: boolean; migrate?: boolean; } /** * Load update.skip paths from .trellis/config.yaml * * Parses simple YAML structure: * update: * skip: * - path1 * - path2 * * @internal Exported for testing only */ export declare function loadUpdateSkipPaths(cwd: string): string[]; /** * Extract a "section" from a config.yaml-style template by sectionHeading. * * A section is delimited by `#---...---` separator lines (the same pattern * used in the bundled `config.yaml` template). The first line inside the * separator block whose `# ` content matches `sectionHeading` identifies the * section; the section spans from that opening separator block through the * line preceding the next `#---` separator block (or EOF). * * Returns the extracted text including its leading separator block, or `null` * when no matching section is found. * * @internal Exported for testing only. */ export declare function extractConfigSection(template: string, sectionHeading: string): string | null; /** * Apply additive config.yaml sections introduced between two versions. * * Walks the supplied entries, dedupes by `file+sentinel`, and for each unique * entry: if the user file exists and lacks the sentinel, extracts the named * section from `templateContent` and appends it. Idempotent — re-running the * step on a file that already contains the sentinel is a no-op. * * @internal Exported for testing only. */ export declare function applyConfigSectionsAdded(entries: ConfigSectionAdded[], cwd: string, bundledTemplates: Map): { appended: number; }; /** * Check if a path should be excluded from backup * @internal Exported for testing only */ export declare function shouldExcludeFromBackup(relativePath: string): boolean; /** * Clean up empty directories after file migration * Recursively removes empty parent directories up to .trellis root */ /** @internal Exported for testing only */ export declare function cleanupEmptyDirs(cwd: string, dirPath: string): void; /** * Sort migrations for safe execution order * - rename-dir with deeper paths first (to handle nested directories) * - rename-dir before rename/delete */ /** @internal Exported for testing only */ export declare function sortMigrationsForExecution(migrations: MigrationItem[]): MigrationItem[]; /** * Main update command */ export declare function update(options: UpdateOptions): Promise; //# sourceMappingURL=update.d.ts.map