← All procedures
npm.pack
List the files of the tarball of the package (a dry run), or with dryRun: false make the tarball
CLI- Package
- @procedures/npm · README
- Path
["npm","pack"]- CLI
mark npm pack- As data
{"$proc":["npm","pack"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/npm/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["npm","pack"], {});
console.log(JSON.stringify(result));From the command line
$ mark npm pack
As data, in a program
{ "$proc": ["npm", "pack"], "input": {} }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"dryRun": {
"default": true,
"description": "Only list the files of the tarball, and write no tarball (default: true)",
"type": "boolean"
},
"destination": {
"description": "The folder of the tarball (default: the folder of the package)",
"type": "string"
},
"cwd": {
"description": "The folder of the package",
"type": "string"
},
"timeout": {
"description": "Timeout in milliseconds",
"type": "number"
}
}
},
"output": {
"type": "object",
"properties": {
"exitCode": {
"type": "number",
"description": "The exit code of npm (0 is success)"
},
"stdout": {
"type": "string",
"description": "The standard output of npm"
},
"stderr": {
"type": "string",
"description": "The standard error of npm, or the error message when npm 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": {}
}
}