{
  "version": 3,
  "sources": ["../../../src/cmd/help.ts"],
  "sourcesContent": ["import {\n  packageManager,\n  detectIfCurrentPkgIsExecutable,\n} from '../packages/cli-meta/index.ts';\nimport renderHelp from 'render-help';\n\nexport function createHelp(\n  helpByCommandName: Record<string, () => string>\n): (opts: unknown, params: string[]) => string {\n  return (_opts: unknown, params: string[]): string => {\n    let helpText: string | undefined;\n\n    if (params.length === 0) {\n      helpText = getHelpText();\n    } else if (typeof helpByCommandName[params[0] ?? ''] === 'function') {\n      helpText = helpByCommandName[params[0] ?? '']?.();\n    } else {\n      helpText = `No results for \"${params[0] ?? ''}\"`;\n    }\n    return `Version ${packageManager.version}\\\n${detectIfCurrentPkgIsExecutable() === true ? ` (compiled to binary; bundled Node.js ${process.version})` : ''}\\\n\\n${helpText}\\n`;\n  };\n}\n\nfunction getHelpText(): string {\n  return renderHelp({\n    descriptionLists: [\n      {\n        title: 'Manage your dependencies',\n\n        list: [\n          {\n            description: 'Install all dependencies for a project',\n            name: 'install',\n            shortAlias: 'i',\n          },\n          {\n            description:\n              'Installs a package and any packages that it depends on. By default, any new package is installed as a prod dependency',\n            name: 'add',\n          },\n          {\n            description:\n              'Updates packages to their latest version based on the specified range',\n            name: 'update',\n            shortAlias: 'up',\n          },\n          {\n            description:\n              \"Removes packages from node_modules and from the project's package.json\",\n            name: 'remove',\n            shortAlias: 'rm',\n          },\n          {\n            description: 'Connect the local project to another one',\n            name: 'link',\n            shortAlias: 'ln',\n          },\n          {\n            description:\n              'Unlinks a package. Like yarn unlink but pnpm re-installs the dependency after removing the external link',\n            name: 'unlink',\n          },\n          {\n            description:\n              'Generates a pnpm-lock.yaml from an npm package-lock.json (or npm-shrinkwrap.json) file',\n            name: 'import',\n          },\n          {\n            description:\n              'Runs a pnpm install followed immediately by a pnpm test',\n            name: 'install-test',\n            shortAlias: 'it',\n          },\n          {\n            description: 'Rebuild a package',\n            name: 'rebuild',\n            shortAlias: 'rb',\n          },\n          {\n            description: 'Removes extraneous packages',\n            name: 'prune',\n          },\n        ],\n      },\n      {\n        title: 'Review your dependencies',\n\n        list: [\n          {\n            description:\n              'Checks for known security issues with the installed packages',\n            name: 'audit',\n          },\n          {\n            description:\n              'Print all the versions of packages that are installed, as well as their dependencies, in a tree-structure',\n            name: 'list',\n            shortAlias: 'ls',\n          },\n          {\n            description: 'Check for outdated packages',\n            name: 'outdated',\n          },\n          {\n            description: 'Check licenses in consumed packages',\n            name: 'licenses',\n          },\n        ],\n      },\n      {\n        title: 'Run your scripts',\n\n        list: [\n          {\n            description: 'Executes a shell command in scope of a project',\n            name: 'exec',\n          },\n          {\n            description: 'Runs a defined package script',\n            name: 'run',\n          },\n          {\n            description: 'Runs a package\\'s \"test\" script, if one was provided',\n            name: 'test',\n            shortAlias: 't',\n          },\n          {\n            description:\n              'Runs an arbitrary command specified in the package\\'s \"start\" property of its \"scripts\" object',\n            name: 'start',\n          },\n        ],\n      },\n      {\n        title: 'Other',\n\n        list: [\n          {\n            description: 'Create a tarball from a package',\n            name: 'pack',\n          },\n          {\n            description: 'Publishes a package to the registry',\n            name: 'publish',\n          },\n          {\n            description: 'Prints the effective modules directory',\n            name: 'root',\n          },\n          {\n            description:\n              'Prints the index file of a specific package from the store',\n            name: 'cat-index',\n          },\n          {\n            description:\n              'Prints the contents of a file based on the hash value stored in the index file',\n            name: 'cat-file',\n          },\n          {\n            description:\n              'Experimental! Lists the packages that include the file with the specified hash.',\n            name: 'find-hash',\n          },\n        ],\n      },\n      {\n        title: 'Manage your store',\n\n        list: [\n          {\n            description:\n              'Adds new packages to the pnpm store directly. Does not modify any projects or files outside the store',\n            name: 'store add',\n          },\n          {\n            description: 'Prints the path to the active store directory',\n            name: 'store path',\n          },\n          {\n            description:\n              'Removes unreferenced (extraneous, orphan) packages from the store',\n            name: 'store prune',\n          },\n          {\n            description: 'Checks for modified packages in the store',\n            name: 'store status',\n          },\n        ],\n      },\n      {\n        title: 'Options',\n\n        list: [\n          {\n            description: 'Run the command for each project in the workspace.',\n            name: '--recursive',\n            shortAlias: '-r',\n          },\n        ],\n      },\n    ],\n    usages: ['pnpm [command] [flags]', 'pnpm [ -h | --help | -v | --version ]'],\n  });\n}\n"],
  "mappings": "AAAA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,OAAO,gBAAgB;AAEhB,SAAS,WACd,mBAC6C;AAC7C,SAAO,CAAC,OAAgB,WAA6B;AACnD,QAAI;AAEJ,QAAI,OAAO,WAAW,GAAG;AACvB,iBAAW,YAAY;AAAA,IACzB,WAAW,OAAO,kBAAkB,OAAO,CAAC,KAAK,EAAE,MAAM,YAAY;AACnE,iBAAW,kBAAkB,OAAO,CAAC,KAAK,EAAE,IAAI;AAAA,IAClD,OAAO;AACL,iBAAW,mBAAmB,OAAO,CAAC,KAAK,EAAE;AAAA,IAC/C;AACA,WAAO,WAAW,eAAe,OAAO,GAC1C,+BAA+B,MAAM,OAAO,yCAAyC,QAAQ,OAAO,MAAM,EAAE;AAAA,EAC1G,QAAQ;AAAA;AAAA,EACV;AACF;AAEA,SAAS,cAAsB;AAC7B,SAAO,WAAW;AAAA,IAChB,kBAAkB;AAAA,MAChB;AAAA,QACE,OAAO;AAAA,QAEP,MAAM;AAAA,UACJ;AAAA,YACE,aAAa;AAAA,YACb,MAAM;AAAA,YACN,YAAY;AAAA,UACd;AAAA,UACA;AAAA,YACE,aACE;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,aACE;AAAA,YACF,MAAM;AAAA,YACN,YAAY;AAAA,UACd;AAAA,UACA;AAAA,YACE,aACE;AAAA,YACF,MAAM;AAAA,YACN,YAAY;AAAA,UACd;AAAA,UACA;AAAA,YACE,aAAa;AAAA,YACb,MAAM;AAAA,YACN,YAAY;AAAA,UACd;AAAA,UACA;AAAA,YACE,aACE;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,aACE;AAAA,YACF,MAAM;AAAA,UACR;AAAA,UACA;AAAA,YACE,aACE;AAAA,YACF,MAAM;AAA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