packall
Reference

JSON output

The shape --json writes to stdout.

--json writes one JSON object to stdout when the run succeeds. Progress and warnings keep going to stderr, so redirecting stdout gives you clean JSON.

packall --file package.json --json > report.json
packall ms@2.1.3 --dry-run --json
{
	"ok": true,
	"dryRun": true,
	"elapsedMs": 388,
	"outDir": ".",
	"layout": "per-spec",
	"totals": {
		"packages": 1,
		"downloadedBytes": 0,
		"artifacts": 0,
		"artifactBytes": 0
	},
	"roots": [{ "name": "ms", "raw": "ms@2.1.3", "versions": ["2.1.3"], "closureSize": 1 }],
	"artifacts": [],
	"packages": [
		{
			"name": "ms",
			"version": "2.1.3",
			"integrity": "sha512-6Flzub…",
			"tarball": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz"
		}
	],
	"unverified": [],
	"warnings": []
}

Fields

Field
okAlways true. A failed run writes nothing to stdout and exits 1.
dryRunWhether anything was downloaded.
outDir, layoutThe options the run used.
totalsPackage count, bytes downloaded, artifact count, total artifact bytes.
rootsOne entry per requested spec: the name, the spec as written, the versions it resolved to, and the size of its closure.
artifactsThe files written — kind, path, bytes, packageCount, and the spec/version for per-spec. Empty on a dry run.
packagesEvery package in the closure, with the integrity string and tarball URL it came from. integrity is null when the registry advertised none.
unverifiedPackages the registry advertised no usable checksum for.
warningsAnything the run reported but did not fail on — skipped workspace: entries, unreachable optional platforms.

--json implies --quiet and turns off prompting, so a run with --json never blocks and never mixes a progress line into the output.

Failures

There is no JSON error object. A failed run writes a human-readable message to stderr and exits 1 — so a script should test the exit code, not parse for ok.

The manifest is not this

bundle-manifest.json inside each bundle is a different document with a different job: it travels with the bundle and records provenance for a security review. --json reports on the run. See Importing a bundle.

On this page