Skip to content

Repository script API / utils/tool-packages / packAndInspect

Function: packAndInspect() ​

packAndInspect(packageDirectory, destination, packageManager?): object

Defined in: utils/tool-packages.mjs:120

Packs one package with pnpm and reads what the tarball contains.

Parameters ​

packageDirectory ​

string

Directory holding the package's package.json.

destination ​

string

Directory that receives the tarball; other files in it are ignored.

packageManager? ​

How to start pnpm, for callers that run a specific pnpm binary.

args ​

string[]

command ​

string

Returns ​

object

The tarball path, its entries with the package/ prefix, the packed and embedded manifests, and the tarball's sha512 SRI.

embeddedPackageJsons ​

embeddedPackageJsons: Record<string, unknown>[]

entries ​

entries: string[]

integrity ​

integrity: string

packageJson ​

packageJson: Record<string, unknown>

tarballPath ​

tarballPath: string

Throws ​

When pnpm, tar or a packed manifest fails.

pumpkin-plugins documentation