cmd-sync-servers - v1.0.0
    Preparing search index...

    Class SyncPlan

    What a synchronization would do: one row per path with a difference, each with an action and a checkbox, built from both scans and the records. Transfers nothing; SyncSession.execute runs the checked rows.

    Index
    createdAt: string

    When the plan was built, as an ISO 8601 time.

    deleteOrphans: boolean

    Whether files missing on the other side are offered for deletion.

    direction: Direction

    Put, get or both.

    fingerprint: string

    A digest of the scans the plan came from; a saved plan runs only while it still matches.

    localDirs: ReadonlySet<string>

    The local folders the scan found, for creating them on the other side.

    localFiles: number

    How many local files the scan found.

    remoteDirs: ReadonlySet<string>

    The remote folders the scan found.

    remoteFiles: number

    How many remote files the scan found.

    scope: Scope

    The whole site, or some paths of it.

    serverId: string

    The server the plan was built for.

    silent: readonly SilentUpdate[]

    Record changes that need no transfer.

    siteId: string

    The site the plan was built for.

    unlisted: number

    Files compared but not listed: in sync, or not part of this direction.

    • The actions a row can take: Put needs a local copy, Get a remote one, Synchronized both.

      Parameters

      • ref: string | number

      Returns Action[]

    • Copies the choices of a saved plan onto this fresh one, after checking that both were built from the same scan. A plan whose scan no longer matches is refused, and so is a saved row this plan does not hold or an action its file cannot take; every row is checked before any is applied, so a refused plan leaves this one as it was.

      Parameters

      Returns void

    • The row with this number, or with this site-relative path.

      Parameters

      • ref: string | number

      Returns PlanItem | undefined

    • Changes a row's action; any chosen action except Skip checks the row.

      Parameters

      • ref: string | number
      • action: Action

      Returns void

    • Checks or unchecks a row; only checked rows run.

      Parameters

      • ref: string | number
      • checked: boolean

      Returns void

      SyncError E_PLAN_INVALID for a problem row, or a Resolve row before an action is chosen.

    • Files: 37 will be updated, 169 will be skipped, 12 need a decision.

      Returns string

    • The plan as JSON for --plan-out. Never contains a secret.

      Returns Record<string, unknown>