Class: NullVcsAdapter
Defined in: packages/core/src/infrastructure/null/vcs-adapter.ts:9
Null implementation of the VcsAdapter port.
Used when no VCS is detected. rootDir() throws because there is no
repository root to return. Other methods return safe defaults.
Implements
Constructors
Constructor
new NullVcsAdapter():
NullVcsAdapter
Returns
NullVcsAdapter
Methods
branch()
branch():
Promise<string>
Defined in: packages/core/src/infrastructure/null/vcs-adapter.ts:16
Returns the name of the currently checked-out branch.
Returns "HEAD" (git) or an equivalent in detached/unknown state.
Returns
Promise<string>
Current branch name
Throws
When the current working directory is not inside a VCS repository
Implementation of
isClean()
isClean():
Promise<boolean>
Defined in: packages/core/src/infrastructure/null/vcs-adapter.ts:21
Returns true when the working tree has no uncommitted changes.
Returns
Promise<boolean>
true if working tree is clean, false if there are uncommitted changes
Throws
When the current working directory is not inside a VCS repository
Implementation of
ref()
ref():
Promise<string|null>
Defined in: packages/core/src/infrastructure/null/vcs-adapter.ts:26
Returns the short revision identifier for the current commit/changeset.
Returns null when VCS is unavailable or the repository has no commits.
Returns
Promise<string | null>
Short revision hash/id, or null
Implementation of
rootDir()
rootDir():
Promise<string>
Defined in: packages/core/src/infrastructure/null/vcs-adapter.ts:11
Returns the absolute path to the root of the current repository.
Useful for resolving all other project-relative paths (specs, changes, archive, schemas).
Returns
Promise<string>
Absolute path to the repository root
Throws
When the current working directory is not inside a VCS repository
Implementation of
show()
show(
ref,filePath):Promise<string|null>
Defined in: packages/core/src/infrastructure/null/vcs-adapter.ts:32
Returns the content of a file at a given revision.
Returns null when the revision or file path does not exist.
Parameters
ref
string
Revision identifier (e.g. commit hash, branch name)
filePath
string
Repository-relative path to the file
Returns
Promise<string | null>
File content as a string, or null