Skip to content

Modules | @vltpkg/package-info

Classes

PackageInfoClient

Constructors

new PackageInfoClient()
new PackageInfoClient(options): PackageInfoClient
Parameters

options: PackageInfoClientOptions = {}

Returns

PackageInfoClient

Defined in

index.ts:133

Properties

monorepo?
optional monorepo: Monorepo;
Defined in

index.ts:119

options
options: PackageInfoClientOptions
Defined in

index.ts:116

packageJson
packageJson: PackageJson
Defined in

index.ts:118

Accessors

registryClient
get registryClient(): RegistryClient
Returns

RegistryClient

Defined in

index.ts:121

tarPool
get tarPool(): Pool
Returns

Pool

Defined in

index.ts:128

Methods

extract()
extract(
spec,
target,
options): Promise<Resolution>
Parameters

spec: string | Spec

target: string

options: PackageInfoClientRequestOptions = {}

Returns

Promise<Resolution>

Defined in

index.ts:151

manifest()
manifest(spec, options): Promise<Manifest>
Parameters

spec: string | Spec

options: PackageInfoClientRequestOptions = {}

Returns

Promise<Manifest>

Defined in

index.ts:414

packument()
packument(spec, options): Promise<Packument>
Parameters

spec: string | Spec

options: PackageInfoClientRequestOptions = {}

Returns

Promise<Packument>

Defined in

index.ts:519

resolve()
resolve(spec, options): Promise<Resolution>
Parameters

spec: string | Spec

options: PackageInfoClientRequestOptions = {}

Returns

Promise<Resolution>

Defined in

index.ts:582

tarball()
tarball(spec, options): Promise<Buffer>
Parameters

spec: string | Spec

options: PackageInfoClientRequestOptions = {}

Returns

Promise<Buffer>

Defined in

index.ts:298

Type Aliases

PackageInfoClientAllOptions

type PackageInfoClientAllOptions: PackageInfoClientOptions & PackageInfoClientRequestOptions;

Defined in

index.ts:63


PackageInfoClientOptions

type PackageInfoClientOptions: RegistryClientOptions & SpecOptions & object;

Type declaration

monorepo?
optional monorepo: Monorepo;
packageJson?
optional packageJson: PackageJson;

PackageJson object

projectRoot?
optional projectRoot: string;

root of the project. Defaults to process.cwd()

workspace?
optional workspace: string[];

workspace paths to load, irrelevant if Monorepo provided

workspace-group?
optional workspace-group: string[];

workspace groups to load, irrelevant if Monorepo provided

Defined in

index.ts:42


PackageInfoClientRequestOptions

type PackageInfoClientRequestOptions: PickManifestOptions & object;

Type declaration

from?
optional from: string;

dir to resolve file:// specifiers against. Defaults to projectRoot.

Defined in

index.ts:58


Resolution

type Resolution: object;

Type declaration

integrity?
optional integrity: Integrity;
resolved
resolved: string
signatures?
optional signatures: Exclude<Manifest["dist"], undefined>["signatures"];
spec
spec: Spec

Defined in

index.ts:35

Functions

extract()

function extract(spec, target, options): Promise<Resolution>

Parameters

spec: string | Spec

target: string

options: PackageInfoClientAllOptions = {}

Returns

Promise<Resolution>

Defined in

index.ts:105


manifest()

function manifest(spec, options): Promise<Manifest>

Parameters

spec: string | Spec

options: PackageInfoClientAllOptions = {}

Returns

Promise<Manifest>

Defined in

index.ts:90


packument()

function packument(spec, options): Promise<Packument>

Parameters

spec: string | Spec

options: PackageInfoClientAllOptions = {}

Returns

Promise<Packument>

Defined in

index.ts:85


resolve()

function resolve(spec, options): Promise<Resolution>

Parameters

spec: string | Spec

options: PackageInfoClientAllOptions = {}

Returns

Promise<Resolution>

Defined in

index.ts:95


tarball()

function tarball(spec, options): Promise<Buffer>

Parameters

spec: string | Spec

options: PackageInfoClientAllOptions = {}

Returns

Promise<Buffer>

Defined in

index.ts:100