vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
    • Overview
    • Reference
  • Type Aliases
  • PromptFn()
  • VlxInfo
  • VlxManifest
  • VlxOptions
  • Functions
  • delete()
  • info()
  • install()
  • list()
  • resolve()
  1. Client
  2. /
  3. API Reference
  4. /
  5. @vltpkg/vlx
  6. /
  7. Reference

Reference

Type Aliases

PromptFn()

TypeScript
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

ParameterType
pkgSpecSpec
pathstring
resolutionstring

Returns

Promise<string>


VlxInfo

TypeScript
type VlxInfo = VlxManifest["vlx"] & object;

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

The info about a given vlx installation

Type declaration

NameTypeDescription
arg0?stringFull path to the inferred default binary for the dependency if it exists.
namestringname of the package that is being run
pathstringpath to the synthetic project for non-local installs, or to the current projectRoot if the resolution is local.
resolvedstringresolution of the package installed, for non-local installs, or a file URL into the node_modules for project local installs.
version?stringversion of the package being run

VlxManifest

TypeScript
type VlxManifest = NormalizedManifest & object;

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

Type declaration

NameType
vlx?object
vlx.integrity?Integrity
vlx.signatures?Resolution["signatures"]

VlxOptions

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

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

Type declaration

NameType
package?string
yes?boolean

Functions

delete()

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

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

Parameters

ParameterType
keysstring[]
removerRollbackRemove
optionsVlxOptions

Returns

Promise<string[]>


info()

TypeScript
function info(
   path, 
   options, 
   manifest?): …

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

Parameters

ParameterType
pathstring
optionsVlxOptions
manifest?Override<Manifest, NormalizedFields>

Returns

…


install()

TypeScript
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

ParameterType
specstring | Spec
optionsVlxOptions
promptFn?PromptFn

Returns

Promise<…>


list()

TypeScript
function list(): AsyncGenerator<string, void, unknown>

Defined in: vlx/src/list.ts:5

Returns

AsyncGenerator<string, void, unknown>


resolve()

TypeScript
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

ParameterType
positionalsstring[]
optionsVlxOptions
promptFn?PromptFn

Returns

Promise<undefined | string>


Previous@vltpkg/vlxNext@vltpkg/which

On this page

  • Type Aliases
  • PromptFn()
  • VlxInfo
  • VlxManifest
  • VlxOptions
  • Functions
  • delete()
  • info()
  • install()
  • list()
  • resolve()

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now