← All procedures

pnpm.pack

Make a tarball of the package: data gives its file name and files

CLI
Package
@procedures/pnpm · README
Path
["pnpm","pack"]
CLI
mark pnpm pack
As data
{"$proc":["pnpm","pack"],"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","pack"], {});
console.log(JSON.stringify(result));

From the command line

$ mark pnpm pack

As data, in a program

{ "$proc": ["pnpm", "pack"], "input": {} }

Input

FieldTypeRequiredDefaultDescription
destinationstringnoThe folder of the tarball (default: the folder of the package)
dryRunbooleannoGive the files of the tarball, and write no tarball (--dry-run, default: false)
cwdstringnoThe folder of the package
timeoutnumbernoTimeout in milliseconds

Output

FieldTypeRequiredDefaultDescription
exitCodenumberyesThe exit code of pnpm (0 is success)
stdoutstringyesThe standard output of pnpm
stderrstringyesThe standard error of pnpm, or the error message when pnpm did not start
successbooleanyesTrue when the exit code is 0
durationnumberyesThe time of the command, in milliseconds
dataanynoThe parsed JSON of the standard output, when it is JSON
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "destination": {
        "description": "The folder of the tarball (default: the folder of the package)",
        "type": "string"
      },
      "dryRun": {
        "description": "Give the files of the tarball, and write no tarball (--dry-run, default: false)",
        "type": "boolean"
      },
      "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 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": {}
  }
}