RemoteRepoSession
@Js
abstract class RemoteRepoSession : Obj
RemoteRepoSession is a connected session to a RemoteRepo. The repo is the named configuration; the session is the connection: it owns the authentication state for its lifetime and its method surface mirrors the "sys.repo" wire operations. Sessions are owned by the caller: open one for a batch of calls and close it when complete.
Close the session and release any resources
Download the xetolib zip for given name and version
Get the latest version of the library name available
Get the latest version that matches the given dependency
Ping the remote repo and return metadata
Publish a xetolib zip file to the repo and return its published version
Repo this session is connected to
Perform search request on the remote repo
Get the info for a specific library name and version
List the verions available for given library name
virtual Void close()
Close the session and release any resources
abstract Buf fetch(Str name, Version version)
Download the xetolib zip for given name and version
abstract LibVersion? latest(Str name, Bool checked := true)
Get the latest version of the library name available. If no versions are available then raise exception or return null based on check flag.
abstract LibVersion? latestMatch(LibDepend depend, Bool checked := true)
Get the latest version that matches the given dependency. If no matches are available, then raise exception or return null based on check flag.
abstract Dict? ping(Bool checked := true)
Ping the remote repo and return metadata; if not reachable raise an exception or return null based on checked flag.
virtual LibVersion publish(File file)
Publish a xetolib zip file to the repo and return its published version. Requires authentication with publish permission. Repos which do not support publishing raise UnsupportedErr.
abstract RemoteRepo repo()
Repo this session is connected to
abstract RemoteRepoSearchRes search(RemoteRepoSearchReq req)
Perform search request on the remote repo
abstract LibVersion? version(Str name, Version version, Bool checked := true)
Get the info for a specific library name and version. If the given library or version is not available then raise exception or return null based on the checked flag.
abstract LibVersion[] versions(Str name, Dict? opts := null)
List the verions available for given library name. The library versions are sorted from latest to oldest. If the library is not available always return empty list.
Options:
- limit: max number to return
- versions: constraints as LibDependVersions instance