Skip to content

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

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

arg0?
optional arg0: string;

Full path to the inferred default binary for the dependency if it exists.

name
name: string

name of the package that is being run

path
path: string

path to the synthetic project for non-local installs, or to the current projectRoot if the resolution is local.

resolved
resolved: string

resolution of the package installed, for non-local installs, or a file URL into the node_modules for project local installs.

version?
optional version: string;

version of the package being run


VlxManifest

type VlxManifest = Manifest & object

Defined in: vlx/src/index.ts:10

Type declaration

vlx?
optional vlx: object;
vlx.integrity?
optional vlx.integrity: Integrity;
vlx.signatures?
optional vlx.signatures: Resolution["signatures"];

VlxOptions

type VlxOptions = SpecOptions &
PackageInfoClientOptions &
PackageInfoClientRequestOptions &
InstallOptions &
object

Defined in: vlx/src/index.ts:55

Type declaration

package?
optional package: string;
yes?
optional yes: boolean;

Functions

delete()

function delete(
keys,
remover,
options): Promise<string[]>

Defined in: vlx/src/delete.ts:15

Parameters

keys

string[]

remover

RollbackRemove

options

VlxOptions

Returns

Promise<string[]>


info()

function info(path, options, manifest?): object & object

Defined in: vlx/src/info.ts:10

Parameters

path

string

options

VlxOptions

manifest?

Manifest

Returns

object & object


install()

function install(spec, options, promptFn?): Promise<object & object>

Defined in: vlx/src/install.ts:19

Install a given package spec in the appropriate folder, if it’s not already present.

Parameters

spec

string | Spec

options

VlxOptions

promptFn?

PromptFn

Returns

Promise<object & object>


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

positionals

string[]

options

VlxOptions

promptFn?

PromptFn

Returns

Promise<undefined | string>