export interface SyncedBlock { /** Replacement text including both sentinels, pre-indented. */ block: string; /** Top-level keys excluded because the user has already set them. */ omittedKeys: string[]; } export interface SyncResult { changed: boolean; /** True if the file pre-dated the sentinel convention and we just inserted them. */ inserted: boolean; /** Reason the file couldn't be synced (file missing, no defineConfig, etc.). */ skippedReason?: string; /** Top-level keys the user has already set (from server). */ omittedKeys: string[]; } export declare function syncConfigFile(filePath: string, synced: SyncedBlock): Promise; interface ApplyResult { text: string; inserted: boolean; skippedReason?: string; } /** * Pure string transform — exported for unit tests. */ export declare function applySync(original: string, blockText: string): ApplyResult; /** * Returns the line index of the first line whose trimmed content starts * with `sentinel`, or -1 if not found. * * Trimmed start match (not strict equality) tolerates trailing comments * / whitespace the user may have added — e.g. * `// [quickback:options-start] <- regenerated each compile`. */ declare function findSentinelLine(text: string, sentinel: string): number; /** * Find the position to insert the block when no sentinels are present: * the line containing `})` (or `});`) that closes `defineConfig(`. * * Heuristic: locate the first `defineConfig(` and walk forward, tracking * paren depth. When depth returns to zero we've found the matching `)`, * and the block goes on the line of that `)`. * * Skips parens inside string literals and line/block comments. */ declare function findDefineConfigInsertionPoint(text: string): { index: number; } | null; export declare const _internal: { START_SENTINEL: string; END_SENTINEL: string; findSentinelLine: typeof findSentinelLine; findDefineConfigInsertionPoint: typeof findDefineConfigInsertionPoint; }; export {}; //# sourceMappingURL=config-sync.d.ts.map