Reference
Type Aliases
PromptFn()
type PromptFn = (pkgSpec, path, resolution) => Promise<string>;Defined in: vlx/src/index.ts:23
Provide a promptFn which is ()=>Promise<string> if you want to confirm
before installing things. If it returns a string that does not start with
the letter 'y', then operation will be aborted. If not provided, consent is
assumed.
Parameters
| Parameter | Type |
|---|---|
pkgSpec | Spec |
path | string |
resolution | string |
Returns
Promise<string>
VlxInfo
type VlxInfo = VlxManifest["vlx"] & object;Defined in: vlx/src/index.ts:30
The info about a given vlx installation
Type declaration
| Name | Type | Description |
|---|---|---|
arg0? | string | Full path to the inferred default binary for the dependency if it exists. |
name | string | name of the package that is being run |
path | string | path to the synthetic project for non-local installs, or to the current projectRoot if the resolution is local. |
resolved | string | resolution of the package installed, for non-local installs, or a file URL into the node_modules for project local installs. |
version? | string | version of the package being run |
VlxManifest
type VlxManifest = NormalizedManifest & object;Defined in: vlx/src/index.ts:10
Type declaration
| Name | Type |
|---|---|
vlx? | object |
vlx.integrity? | Integrity |
vlx.signatures? | Resolution["signatures"] |
VlxOptions
type VlxOptions = SpecOptions & PackageInfoClientOptions & PackageInfoClientRequestOptions & InstallOptions & object;Defined in: vlx/src/index.ts:55
Type declaration
| Name | Type |
|---|---|
package? | string |
yes? | boolean |
Functions
delete()
function delete(
keys,
remover,
options): Promise<string[]>Defined in: vlx/src/delete.ts:15
Parameters
| Parameter | Type |
|---|---|
keys | string[] |
remover | RollbackRemove |
options | VlxOptions |
Returns
Promise<string[]>
info()
function info(
path,
options,
manifest?): …Defined in: vlx/src/info.ts:10
Parameters
| Parameter | Type |
|---|---|
path | string |
options | VlxOptions |
manifest? | Override<Manifest, NormalizedFields> |
Returns
…
install()
function install(
spec,
options,
promptFn?): Promise<…>Defined in: vlx/src/install.ts:20
Install a given package spec in the appropriate folder, if it's not already present.
Parameters
| Parameter | Type |
|---|---|
spec | string | Spec |
options | VlxOptions |
promptFn? | PromptFn |
Returns
Promise<…>
list()
function list(): AsyncGenerator<string, void, unknown>Defined in: vlx/src/list.ts:5
Returns
AsyncGenerator<string, void, unknown>
resolve()
function resolve(
positionals,
options,
promptFn?): Promise<undefined | string>Defined in: vlx/src/resolve.ts:16
Figure out the arg0 to use for an exec command.
If undefined is returned, then the caller should spawn an interactive
shell, or in multi-workspace mode, raise an error.
Parameters
| Parameter | Type |
|---|---|
positionals | string[] |
options | VlxOptions |
promptFn? | PromptFn |
Returns
Promise<undefined | string>