Funcs
Funcs : Funcs
Debug dump of the server side XetoEnv including its resolution mode, search path, and build vars
List configured remote repos as a grid
Add a new remote repo configuration
Remove a remote repo configuration by name
Ping a remote repo and return metadata
Save an authentication token for a remote repo
Remove the authentication token for a remote repo
Search a remote repo for libs matching the query string
List available versions for a lib from a remote repo
Install one or more libs from a remote repo to disk
Update one or more installed libs from their origin repo
Uninstall one or more libs from disk
Fetch a xetolib zip for a specific lib and version from a remote repo and write it to an I/O handle
() => Str <su>
Debug dump of the server side XetoEnv including its resolution mode, search path, and build vars
() => Grid <su>
List configured remote repos as a grid. The result grid includes the following columns:
name: programmatic name of the repouri: URI endpoint for the repoauthToken: env var name if auth token is configured
Examples:
libRepos()
(name: Str, uri: Uri) => Obj? <su>
Add a new remote repo configuration. The name must be a valid tag name and the uri must be a valid URI for the repo endpoint.
Examples:
libRepoAdd("myrepo", `https://example.com/xeto`)
(name: Str) => Obj? <su>
Remove a remote repo configuration by name.
Examples:
libRepoRemove("myrepo")
(repo: Str?) => Dict <su>
Ping a remote repo and return metadata. If repo is null then the default repo is used.
Examples:
libRepoPing(null)
libRepoPing("xetodev")
(repo: Str?, token: Str) => Obj? <su>
Save an authentication token for a remote repo. The token is persisted to fan.props as an environment variable. If repo is null then the default repo is used.
Examples:
libRepoLogin("xetodev", "my-secret-token")
(repo: Str?) => Obj? <su>
Remove the authentication token for a remote repo. If repo is null then the default repo is used.
Examples:
libRepoLogout("xetodev")
(repo: Str?, query: Str) => Grid <su>
Search a remote repo for libs matching the query string. If repo is null then the default repo is used.
Examples:
libSearch(null, "*")
libSearch("xetodev", "ph")
(repo: Str?, lib: Str, opts: Dict?) => Grid <su>
List available versions for a lib from a remote repo.
If repo is null then the default repo is used. Options
include limit and versions for version constraints.
Examples:
libVersions(null, "ph")
libVersions("xetodev", "ph", {limit: 5})
libVersions(null, "ph", {versions: "4.x.x"})
(repo: Str?, libs: Obj, opts: Dict?) => Grid <su>
Install one or more libs from a remote repo to disk. The libs
argument accepts a single lib name or a list of lib names. Use
the format "lib-version" to specify version constraints, for
example "ph-5.0.6" or "ph-5.x.x". If no version constraint is
specified, the latest available version is used. If repo is null
then the default repo is used. Pass {preview} in opts to
return the plan without executing.
Examples:
libInstall(null, "acme.widgets")
libInstall(null, "acme.widgets-1.x.x")
libInstall(null, ["acme.widgets", "acme.core"])
libInstall(null, "acme.widgets", {preview})
(libs: Obj, opts: Dict?) => Grid <su>
Update one or more installed libs from their origin repo.
The libs argument accepts a single lib name or a list of
lib names. Use the format "lib-version" to specify version
constraints, for example "ph-5.x.x". If no version constraint
is specified, the latest available version is used. Pass
{preview} in opts to return the plan without executing.
Examples:
libUpdate("ph")
libUpdate("ph-5.x.x")
libUpdate(["ph", "ph.points"])
libUpdate("ph", {preview})
(libs: Obj) => Grid <su>
Uninstall one or more libs from disk. The libs argument accepts a single lib name or a list of lib names. Raises an exception if any of the libs are currently enabled in the runtime.
Examples:
libUninstall("acme.widgets")
libUninstall(["acme.widgets", "acme.core"])
(repo: Str?, lib: Str, version: Str, handle: Obj) => Dict <su>
Fetch a xetolib zip for a specific lib and version from a remote
repo and write it to an I/O handle. If repo is null then the
default repo is used. The handle follows the same conventions
as ioWriteStr. Returns a Dict with lib, version, size,
and uri of the written file.
Examples:
libFetch(null, "ph", "4.0.5", `io/ph.xetolib`)