RemoteRepoRegistry
@Js
const mixin RemoteRepoRegistry
RemoteRepoRegistry manages the configured remote lib repositories for a given XetoEnv. RemoteRepos must be configure with a programmatic name and URI before use. By default they are stored in "etc/xeto/config.props" using the props "repo.{name}.*".
Add a new repo to the registry
Get the default repo (always first in list if available)
Get remote repo by name
Get remote repo by URI
List configured repos sorted by name, but first is always default
Remove an existing repo from registry
Save an authentication token to fan.props for the given remote name or remote type
abstract RemoteRepo add(Str name, Uri uri, Dict meta, Dict? opts := null)
Add a new repo to the registry. The name must a valid tag name. Options:
- pathDir: dir in XetoEnv.path as alternative to workDir for configuration
abstract RemoteRepo? def(Bool checked := true)
Get the default repo (always first in list if available)
abstract RemoteRepo? get(Str name, Bool checked := true)
Get remote repo by name
abstract RemoteRepo? getByUri(Uri uri, Bool checked := true)
Get remote repo by URI
abstract RemoteRepo[] list()
List configured repos sorted by name, but first is always default
abstract Void remove(Str name, Dict? opts := null)
Remove an existing repo from registry. By default this operation will only remove a repo configured in the workDir (use anyPathkDir to remove from any dir in XetoEnv.path). Options:
- anyPathDir: marker tag to remove from any dir in path
abstract Str saveAuthToken(Str name, Str? token)
Save an authentication token to fan.props for the given remote name or remote type. Return the env var name which is always formatted as "XETO_REPO_{name}". If token is null, then the remove the token