Skip to content
Français

restoreRecoveryTransfer

import { restoreRecoveryTransfer } from "@elie-laloum/outpost";

Recheck a plan, then clone the repository into its destination, detach at the plan’s commit and apply the side’s patches and untracked files. The repository and the transfer stay unchanged. A plan or transfer changed since planning rejects with code configuration; a failure after the destination is created rejects with code workspace and keeps the partial destination.

Complete example and detailed rules.

  • planRequired
    RecoveryRestorePlan
    Plan returned by planRecoveryRestore(). Any edited field fails its fingerprint check with code configuration.
  • observationOptional
    ObservationHub | undefined
    Hub that receives the recovery operation restore.apply when it starts, finishes or fails.

Promise<RecoveryRestoreResult>

export declare function restoreRecoveryTransfer(
  plan: RecoveryRestorePlan,
  observation?: ObservationHub,
): Promise<RecoveryRestoreResult>;