@tikoci/centrs
    Preparing search index...

    Interface WriteWinBoxCdbOptions

    interface WriteWinBoxCdbOptions {
        backupRetention?: number;
        encryptWith?: { password: string; salt?: Uint8Array<ArrayBufferLike> };
        expectedRevision?: WinBoxCdbRevision;
        lock?: WinBoxCdbLockOptions;
        now?: Date;
        platform?: Platform;
        skipBackup?: boolean;
    }
    Index
    backupRetention?: number

    Number of *.bak.* snapshots to keep; older ones are pruned.

    encryptWith?: { password: string; salt?: Uint8Array<ArrayBufferLike> }

    When set, the serialized open bytes are wrapped via encryptWinBoxCdb before atomic write. salt is optional — omit to let the codec roll a fresh 32-byte salt per write (the normal path); pin it only in tests that need byte-exact output. The caller is responsible for matching the source password (centrs reads it from the loaded CDB's settings).

    expectedRevision?: WinBoxCdbRevision

    Revision the records were loaded from. When set, the write takes the CDB lock, re-reads the file, and fails cdb/conflict if it changed — so a stale snapshot can never silently drop another writer's change.

    Lock wait/identity options; only used with expectedRevision.

    now?: Date

    Clock injection for deterministic backup timestamps in tests.

    platform?: Platform

    Platform override for the Windows rename retry (tests).

    skipBackup?: boolean

    Skip the backup snapshot entirely (used for first-time creation).