vaultmd / CreateVaultConfig
Type Alias: CreateVaultConfig
CreateVaultConfig =
VaultIoConfig&object
Defined in: src/vault/models/create-vault-config.ts:9
Configuration passed to createVault. Extends VaultIoConfig with index, link-resolution, and lifecycle settings.
Type Declaration
crossProcessWriterLock?
optionalcrossProcessWriterLock?:boolean
When true (default), serialise writes via a cross-process advisory lock stored next to the index file. Set to false for single-process scenarios to avoid the lock-file overhead.
indexPath
indexPath:
string
Absolute path to the SQLite index file (created automatically if absent).
lazyReconcile?
optionallazyReconcile?:boolean
When true (default), the first read after each TTL window kicks a background reconcile sweep instead of blocking. Set to false to disable background reconciliation entirely.
linkResolution?
optionallinkResolution?:LinkResolution
How outbound links are resolved when building the index. 'wikilink' (default) resolves [[Target]] by filename; 'relative' resolves standard [text](./path.md) markdown links.
onCommit?
optionalonCommit?: (e) =>void|Promise<void>
Optional callback invoked after each committed file operation. Receives a CommitEvent describing the op, path, and (for writes) the new content. Errors thrown here are wrapped in MdVaultError('COMMIT_FAILED').
Parameters
e
Returns
void | Promise<void>
reconcileTtlMs?
optionalreconcileTtlMs?:number
Minimum time in milliseconds between lazy reconcile sweeps (default 2000). Has no effect when lazyReconcile is false.
sqliteBusyTimeoutMs?
optionalsqliteBusyTimeoutMs?:number
Milliseconds to wait for a busy SQLite lock before throwing (default 5000). Applies to both read and write operations.