← All procedures
pnpm.list
List the installed packages: data is the JSON of pnpm list --json
CLI- Package
- @procedures/pnpm · README
- Path
["pnpm","list"]- CLI
mark pnpm list- As data
{"$proc":["pnpm","list"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/pnpm/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["pnpm","list"], {});
console.log(JSON.stringify(result));From the command line
$ mark pnpm list
As data, in a program
{ "$proc": ["pnpm", "list"], "input": {} }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"packages": {
"description": "List only these packages (names or patterns)",
"type": "array",
"items": {
"type": "string"
}
},
"depth": {
"description": "The depth of the dependency tree (default: 0, the direct dependencies)",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"prod": {
"description": "Only the dependencies, not the dev dependencies (--prod)",
"type": "boolean"
},
"dev": {
"description": "Only the dev dependencies (--dev)",
"type": "boolean"
},
"filter": {
"description": "Run in the workspace packages that these pnpm selectors match, for example @scope/app or ./packages/** (--filter)",
"type": "array",
"items": {
"type": "string"
}
},
"recursive": {
"description": "Run in each package of the workspace (--recursive)",
"type": "boolean"
},
"cwd": {
"description": "Working directory",
"type": "string"
},
"timeout": {
"description": "Timeout in milliseconds",
"type": "number"
}
}
},
"output": {
"type": "object",
"properties": {
"exitCode": {
"type": "number",
"description": "The exit code of pnpm (0 is success)"
},
"stdout": {
"type": "string",
"description": "The standard output of pnpm"
},
"stderr": {
"type": "string",
"description": "The standard error of pnpm, or the error message when pnpm did not start"
},
"success": {
"type": "boolean",
"description": "True when the exit code is 0"
},
"duration": {
"type": "number",
"description": "The time of the command, in milliseconds"
},
"data": {
"description": "The parsed JSON of the standard output, when it is JSON"
}
},
"required": [
"exitCode",
"stdout",
"stderr",
"success",
"duration"
],
"additionalProperties": {}
}
}