← All procedures
pnpm.install
Install packages using pnpm
CLI- Package
- @procedures/pnpm · README
- Path
["pnpm","install"]- CLI
mark pnpm install- As data
{"$proc":["pnpm","install"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/pnpm"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["pnpm","install"], {});
console.log(JSON.stringify(result));From the command line
$ mark pnpm install
As data, in a program
{ "$proc": ["pnpm", "install"], "input": {} }Input
| Field | Type | Required | Default | Description |
|---|
packages | string[] | no | | Packages to install. If not provided, installs from package.json |
dev | boolean | no | | Save as dev dependency |
frozen | boolean | no | | Use frozen lockfile (--frozen-lockfile) |
cwd | string | no | | Working directory |
timeout | number | no | | Timeout in milliseconds |
Output
| Field | Type | Required | Default | Description |
|---|
exitCode | number | yes | | The exit code of pnpm (0 is success) |
stdout | string | yes | | The standard output of pnpm |
stderr | string | yes | | The standard error of pnpm |
success | boolean | yes | | True when the exit code is 0 |
duration | number | yes | | The time of the command, in milliseconds |
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"packages": {
"description": "Packages to install. If not provided, installs from package.json",
"type": "array",
"items": {
"type": "string"
}
},
"dev": {
"description": "Save as dev dependency",
"type": "boolean"
},
"frozen": {
"description": "Use frozen lockfile (--frozen-lockfile)",
"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"
},
"success": {
"type": "boolean",
"description": "True when the exit code is 0"
},
"duration": {
"type": "number",
"description": "The time of the command, in milliseconds"
}
},
"required": [
"exitCode",
"stdout",
"stderr",
"success",
"duration"
],
"additionalProperties": {}
}
}