Skip to content
API Referencecli-sdkindex

@vltpkg/cli-sdk

Type Aliases

Command<T>

type Command<T> = object

Defined in: src/cli-sdk/src/load-command.ts:16

Type Parameters

T

Type declaration

command
command: CommandFn<T>
needsNpmRegistry?
optional needsNpmRegistry: boolean;

Set to true by commands that install packages (install, update, uninstall, ci, exec/vlx). outputCommand() fails early with an ECONFIG error when the alias bare specs resolve through (registries.npm, or the alias named by default-registry-alias) is not configured.

needsRegistry?
optional needsRegistry: boolean;

Set to true by commands that hit a registry or resolve registry specs. There is no default registry, so outputCommand() fails early with an ECONFIG error when one of these runs unconfigured.

usage
usage: CommandUsage
views
views: Views<T>

CommandFn()<T>

type CommandFn<T> = (conf) => Promise<T>

Defined in: src/cli-sdk/src/load-command.ts:12

A command function that may return a result of T. If the result is undefined, no final output will be displayed by default.

Type Parameters

T = unknown

Parameters

conf

LoadedConfig

Returns

Promise<T>


CommandUsage()

type CommandUsage = () => Jack

Defined in: src/cli-sdk/src/load-command.ts:6

Returns

Jack

Functions

default()

function default(): Promise<void>

Defined in: src/cli-sdk/src/index.ts:70

Returns

Promise<void>