Class VaultInternal

Hierarchy

  • CreateDestroyStartStop
    • VaultInternal

Constructors

  • Parameters

    • __namedParameters: {
          db: DB;
          efs: EncryptedFS;
          keyRing: KeyRing;
          logger: Logger;
          vaultId: VaultId;
          vaultsDbPath: readonly (string | Buffer)[];
      }
      • db: DB
      • efs: EncryptedFS
      • keyRing: KeyRing
      • logger: Logger
      • vaultId: VaultId
      • vaultsDbPath: readonly (string | Buffer)[]

    Returns VaultInternal

Properties

[initLock]: RWLockWriter
db: DB
efs: EncryptedFS
efsVault: EncryptedFS
keyRing: KeyRing
lock: RWLockWriter = ...
logger: Logger
vaultDataDir: string
vaultGitDir: string
vaultId: VaultId
vaultIdEncoded: string
vaultMetadataDbPath: readonly (string | Buffer)[]
vaultsDbPath: readonly (string | Buffer)[]
vaultsNamesPath: readonly (string | Buffer)[]
dirtyKey: string = 'dirty'
nameKey: string = 'key'
remoteKey: string = 'remote'

Accessors

  • get [destroyed](): boolean
  • Returns boolean

  • get [eventHandled](): ReadonlyWeakSet<Event>
  • Returns ReadonlyWeakSet<Event>

  • get [eventHandlers](): ReadonlyMap<string, Set<EventHandlerInfo>>
  • Returns ReadonlyMap<string, Set<EventHandlerInfo>>

  • get [eventTarget](): EventTarget
  • Returns EventTarget

  • get [handleEventError](): ((evt) => void)
  • Returns ((evt) => void)

      • (evt): void
      • Parameters

        • evt: EventError

        Returns void

  • get [running](): boolean
  • Returns boolean

  • get [statusP](): Promise<Status>
  • Returns Promise<Status>

  • get [status](): Status
  • Returns Status

Methods

  • Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | AddEventListenerOptions

    Returns void

  • Cleans the git working directory by checking out the canonicalBranch

    Returns Promise<void>

  • Creates a commit while moving the canonicalBranch reference

    Returns Promise<void>

  • Parameters

    • Optional tran: DBTransaction

    Returns Promise<void>

  • Parameters

    • event: Event

    Returns boolean

  • Deletes any git objects that can't be reached from the canonicalBranch

    Returns Promise<void>

  • Type Parameters

    • T

    • TReturn

    • TNext

    Parameters

    • g: ((fs) => AsyncGenerator<T, TReturn, TNext>)
        • (fs): AsyncGenerator<T, TReturn, TNext>
        • Parameters

          Returns AsyncGenerator<T, TReturn, TNext>

    Returns AsyncGenerator<T, TReturn, TNext>

  • Parameters

    • type: string
    • callback: null | EventListenerOrEventListenerObject
    • Optional options: boolean | EventListenerOptions

    Returns void

  • Setup the vault metadata

    Parameters

    • __namedParameters: {
          tran: DBTransaction;
          vaultName?: string;
      }
      • tran: DBTransaction
      • Optional vaultName?: string

    Returns Promise<void>

  • Parameters

    • __namedParameters: {
          fresh?: boolean;
          tran?: DBTransaction;
          vaultName?: string;
      } = {}
      • Optional fresh?: boolean
      • Optional tran?: DBTransaction
      • Optional vaultName?: string

    Returns Promise<void>

  • Parameters

    • fresh: boolean
    • tran: DBTransaction
    • Optional vaultName: string

    Returns Promise<void>

  • Checks out the vault repository to specific commit ID or special tags This changes the working directory and updates the HEAD reference

    Parameters

    • ref: string = tagLast

    Returns Promise<void>

  • Type Parameters

    • T

    • TReturn

    • TNext

    Parameters

    • g: ((fs) => AsyncGenerator<T, TReturn, TNext>)
        • (fs): AsyncGenerator<T, TReturn, TNext>
        • Parameters

          Returns AsyncGenerator<T, TReturn, TNext>

    • Optional tran: DBTransaction

    Returns AsyncGenerator<T, TReturn, TNext>

  • Parameters

    • __namedParameters: {
          db: DB;
          efs: EncryptedFS;
          fresh?: boolean;
          keyRing: KeyRing;
          logger?: Logger;
          tran?: DBTransaction;
          vaultId: VaultId;
          vaultName?: string;
          vaultsDbPath: readonly (string | Buffer)[];
      }
      • db: DB
      • efs: EncryptedFS
      • Optional fresh?: boolean
      • keyRing: KeyRing
      • Optional logger?: Logger
      • Optional tran?: DBTransaction
      • vaultId: VaultId
      • Optional vaultName?: string
      • vaultsDbPath: readonly (string | Buffer)[]

    Returns Promise<VaultInternal>

Generated using TypeDoc