Readonly [initProtected dbProtected efsProtected efsProtected keyProtected lockProtected loggerReadonly vaultReadonly vaultReadonly vaultReadonly vaultProtected vaultProtected vaultsProtected vaultsStatic dirtyStatic nameStatic remoteAcquire a read-write lock on this vault.
Protected cleanCleans the git working directory by checking out the canonical branch. This will remove any un-committed changes since any untracked or modified files outside a commit is dirty state. Dirty state should only happen if the usual commit procedure was interrupted ungracefully.
Protected createCreates a commit while moving the canonicalBranch reference to that new commit. If the commit creates a branch from the canonical history. Then the new commit becomes the new canonical history and the old history is removed from the old canonical head to the branch point. This is to maintain the strict non-branching linear history.
Protected destroy_Protected garbageProtected garbageThis will walk from the startId to the StopId deleting objects as it
goes. This is smarter since it only walks over the old history and not
everything.
Pulls changes to a vault from the vault's default remote. If pullNodeId
and pullVaultNameOrId it uses that for the remote instead.
Optional pullOptional pullOptional tran: DBTransactionOptional ctx: Partial<ContextTimedInput>With context handler for using a vault in a read-only context for a generator.
Protected requestCreates a request arrow function that implements an API that isomorphic-git
expects to use when making a HTTP request. It makes RPC calls to
vaultsGitInfoGet for the ref advertisement phase and vaultsGitPackGet
for the git pack phase.
vaultsGitInfoGet wraps a call to gitHttp.advertiseRefGenerator and
vaultsGitPackGet to gitHttp.generatePackRequest.
┌─────────┐ ┌───────────────────────────┐
│ │ │ │
┌──────────────────────┐ │ RPC │ │ │
│ │ │ │ │ *advertiseRefGenerator() │
│ ├────────┼─────────┼────▶ │
│ vault.request() │ │ │ │ │
│ │ │ │ └────┬──────────────────────┘
│ ├──┐ │ │ │
│ │ │ │ │ ┌────▼──────────────────────┐
└──────────────────────┘ │ │ │ │ │
│ │ │ │ *referenceListGenerator() │
│ │ │ │ │
│ │ │ └───────────────────────────┘
│ │ │
│ │ │ ┌───────────────────────────┐
└─────┼─────────┼────┤ │
│ │ │ *generatePackRequest() │
│ │ │ │
│ │ └────┬──────────────────────┘
└─────────┘ │
┌────▼──────────────────────┐
│ │
│ *generatePackData() │
│ │
└───────────────────────────┘
Protected setupDoes an idempotent initialization of the git repository for the vault. If the vault is in a dirty state then we clean up the working directory or any history not part of the canonical branch.
Protected setupSets up the vault metadata.
Creates a dirty boolean in the database to track dirty state of the vault.
Also adds the vault's name to the database.
Optional vaultProtected start_We use a protected start method to avoid the async-init lifecycle
deadlocking when doing the recursive call to create a DBTransaction.
Optional vaultOptional ctx: Partial<ContextTimedInput>With context handler for using a vault in a writable context for a generator.
Optional tran: DBTransactionOptional ctx: Partial<ContextTimedInput>Static cloneWill create a new vault by cloning the vault from a remote node.
Optional logger?: LoggerOptional tran: DBTransactionOptional ctx: Partial<ContextTimedInput>Static createCreates a VaultInternal.
If no state already exists then a new state for the vault is initialized.
If state already exists then this just creates the VaultInternal
instance for managing that state.
Generated using TypeDoc
Acquire a read-only lock on this vault.