Skip to content
Français

inspectRecovery

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

Inventory recovery state without deleting anything. Local mode scans the .outpost directory of the Git checkout, and optionally worktrees, locks and sandbox activity records; with transporter it lists that transport’s objects and can read activity records, whose ownership stays unknown. git or locks with a transporter, or an invalid maxEntries, reject with code configuration.

Complete example and detailed rules.

  • optionsOptional
    RecoveryInspectionOptions | undefined
    Local repository or transport inventory selection, entry limit and optional resource inspection. Git and process-lock checks require local mode.
  • options.transporterOptional
    Transport | undefined
    Inventory this transport’s objects instead of a local repository. Pass the transport given as activityTransport to read its activity records; git or locks then reject with code configuration.
  • options.repositoryOptional
    string | undefined
    Git checkout to inspect, default the current directory, resolved to its top-level root. In transport mode, only echoed back as a label.
  • options.maxEntriesOptional
    number | undefined
    Maximum entries scanned before the inventory is marked incomplete, default 100000. Local resource inspection also stops at 10000 records; a non-positive value rejects with code configuration.
  • options.gitOptional
    boolean | undefined
    Adds the Git state of each workspace under .outpost: registration, HEAD, branch, dirty and locked flags. Local mode only.
  • options.locksOptional
    boolean | undefined
    Adds operation lock files with their owner’s status. Local mode only.
  • options.resourcesOptional
    boolean | undefined
    Adds sandbox activity records with their ownership verdicts, read from .outpost/storage or, with transporter, from that transport.

Promise<RecoveryInspection>

export declare function inspectRecovery(
  options?: RecoveryInspectionOptions,
): Promise<RecoveryInspection>;