Class: GitRegistry¶
Defined in: resolver/src/git-registry.ts:117
Git-based registry implementation.
Implements¶
Constructors¶
Constructor¶
new GitRegistry(
options):GitRegistry
Defined in: resolver/src/git-registry.ts:128
Parameters¶
options¶
Returns¶
GitRegistry
Methods¶
exists()¶
exists(
path):Promise\<boolean>
Defined in: resolver/src/git-registry.ts:176
Check if a file exists in the registry.
Parameters¶
path¶
string
Path to check (may include version tag)
Returns¶
Promise\<boolean>
True if the file exists
Implementation of¶
fetch()¶
fetch(
path):Promise\<string>
Defined in: resolver/src/git-registry.ts:151
Fetch the content of a file from the registry.
Parameters¶
path¶
string
Path to the file (may include version tag)
Returns¶
Promise\<string>
File content as string
Throws¶
FileNotFoundError if the file doesn't exist
Throws¶
GitCloneError if cloning fails
Throws¶
GitRefNotFoundError if the ref doesn't exist
Implementation of¶
getCommitHash()¶
getCommitHash(
ref?):Promise\<string>
Defined in: resolver/src/git-registry.ts:232
Get the current commit hash for a ref.
Parameters¶
ref?¶
string
Git ref (defaults to defaultRef)
Returns¶
Promise\<string>
Commit hash
list()¶
list(
path):Promise\<string[]>
Defined in: resolver/src/git-registry.ts:196
List files in a directory.
Parameters¶
path¶
string
Directory path (may include version tag)
Returns¶
Promise\<string[]>
Array of file/directory names
Implementation of¶
refresh()¶
refresh(
ref?):Promise\<void>
Defined in: resolver/src/git-registry.ts:220
Force refresh the cache for a specific ref.
Parameters¶
ref?¶
string
Git ref to refresh (defaults to defaultRef)
Returns¶
Promise\<void>