import { type ImportState } from './import-state.js'; import { type MigrationReportData } from './migration-report.js'; import { type CloneAndStackPushResult } from '../util/clone-and-stack-push.js'; import { type ValidationResult } from '../verify/validate.js'; import type { CoercedSentinelSummary, DroppedOverrideSummary, DuplicateResolutionSummary, LegacyChange, MigrationSource, SkippedConfigSummary } from './source.js'; /** * Thrown when the migrator's freshly-written workspace fails the same checks * that the Gitea pre-receive `qfg-verify` hook will run server-side. We raise * this client-side after the commit's `apply` writes files but before commit + * push, so the customer sees the failure locally rather than after a full push * round-trip is rejected (qfg-52qg). */ export declare class MigratorVerifyError extends Error { readonly result: ValidationResult; constructor(result: ValidationResult); } export interface PushMigrationToCloudOptions { branch?: string; changes: LegacyChange[]; /** * Source-side environments (slugified). Additively merged into the target * workspace's quonfig.json so flag files that reference these envs verify * cleanly. Existing target-only envs are preserved. */ environments?: string[]; /** * qfg-wbkj: when true, produce one git commit per change (audit-log mode) — * each commit authored as the original Launch user with their `changedAt` as * GIT_AUTHOR_DATE and `summary` as the message. One final state-file commit * (migrator identity, now) lands on top carrying .qf/import-state.json + * .qf/MIGRATION_REPORT.md so the audit-log commits aren't polluted by * bookkeeping churn. Requires that `source.getCommitMeta` be defined. */ fullHistory?: boolean; importState: ImportState; localDir: string; remoteUrl: string; /** * Base report data. The migrator overrides `counts` after writing files, * since counts must reflect what was actually written to disk (qfg-7eig). */ reportData: MigrationReportData; source: MigrationSource; /** qfg-6na9.3: `--strict-keys` — refuse to migrate if any key would be rewritten. */ strictKeys?: boolean; } export interface PushMigrationToCloudResult extends CloneAndStackPushResult { coercedSentinels: CoercedSentinelSummary | null; droppedOverrides: DroppedOverrideSummary | null; duplicateResolutions: DuplicateResolutionSummary | null; skippedConfigs: SkippedConfigSummary | null; } export declare const pushMigrationToCloud: (opts: PushMigrationToCloudOptions) => Promise;