{"name":"libnpmexec","version":"10.3.5","keywords":["npm","npmcli","libnpm","cli","workspaces","libnpmexec"],"author":{"name":"GitHub Inc."},"license":"ISC","_id":"libnpmexec@10.3.5","maintainers":[{"name":"saquibkhan","email":"saquibkhan@github.com"},{"name":"npm-cli-ops","email":"npm-cli+bot@github.com"},{"name":"reggi","email":"reggi@github.com"},{"name":"martinrrm","email":"martin.ruiz.mares@gmail.com"}],"contributors":[{"url":"https://ruyadorno.com","name":"Ruy Adorno"}],"homepage":"https://github.com/npm/cli#readme","bugs":{"url":"https://github.com/npm/cli/issues"},"tap":{"files":"test/*.js","nyc-arg":["--exclude","tap-snapshots/**"]},"dist":{"shasum":"c607c8016a07c6b92a217cc7b5efc5eb0ebfb9e4","tarball":"http://registry-npm.ywwl.com/libnpmexec/download/libnpmexec-10.3.5.tgz","fileCount":11,"integrity":"sha512-DgVduJ0dFovrqCdSSbfQMGGAWF0Ske6HLJsEXdbjRgC5AO2m9xxB3kk9daEp6p6p2m/m89c4fiZmUVRxco0EGw==","signatures":[{"sig":"MEUCIQDcffcnXv7XvtlpesSucx9OilCUHS3tBniiOuMdruiQkQIgYTZ7GHYkFe6Jtym0eNbt5mkCSX6O2vtKySkWfs0Xv7k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIG5Ov5B/gcUo8u7lvUJSE5D0KTF5xfortsLz7a1NLnPhAiEA//jyjUmCvU7GPWhEv9gj/E5TwJghq3AUyhfurpS7RIg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":28435,"size":10371,"noattachment":false,"key":"/libnpmexec/-/libnpmexec-10.3.5.tgz"},"main":"lib/index.js","engines":{"node":"^20.17.0 || >=22.9.0"},"gitHead":"a97776b5453204b99d3b28ff676a5e00d5822770","scripts":{"lint":"npm run eslint","snap":"tap","test":"tap","eslint":"eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"","lintfix":"npm run eslint -- --fix","postlint":"template-oss-check","posttest":"npm run lint","template-oss-apply":"template-oss-apply --force"},"_npmUser":{"name":"martinrrm","email":"martin.ruiz.mares@gmail.com"},"repository":{"url":"git+https://github.com/npm/cli.git","type":"git","directory":"workspaces/libnpmexec"},"_npmVersion":"11.21.2","description":"npm exec (npx) programmatic API","directories":{},"templateOSS":{"content":"../../scripts/template-oss/index.js","version":"4.29.0","//@npmcli/template-oss":"This file is partially managed by @npmcli/template-oss. Edits may be overwritten."},"_nodeVersion":"24.15.0","dependencies":{"read":"^5.0.1","pacote":"^21.0.2","semver":"^7.3.7","ci-info":"^4.0.0","proc-log":"^6.0.0","signal-exit":"^4.1.0","walk-up-path":"^4.0.0","npm-package-arg":"^13.0.0","@npmcli/arborist":"^9.9.3","@gar/promise-retry":"^1.0.0","@npmcli/run-script":"^10.0.0","@npmcli/package-json":"^7.0.0"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"tap":"^16.3.8","chalk":"^5.2.0","bin-links":"^6.0.0","just-extend":"^6.2.0","just-safe-set":"^4.2.1","@npmcli/template-oss":"4.29.0","@npmcli/eslint-config":"^5.0.1","@npmcli/mock-registry":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/libnpmexec_10.3.5_1793830622873_0.43442507526918794","host":"s3://npm-registry-packages-npm-production"},"readme":"# libnpmexec\n\n[![npm version](https://img.shields.io/npm/v/libnpmexec.svg)](https://npm.im/libnpmexec)\n[![license](https://img.shields.io/npm/l/libnpmexec.svg)](https://npm.im/libnpmexec)\n[![CI - libnpmexec](https://github.com/npm/cli/actions/workflows/ci-libnpmexec.yml/badge.svg)](https://github.com/npm/cli/actions/workflows/ci-libnpmexec.yml)\n\nThe `npm exec` (`npx`) Programmatic API\n\n## Install\n\n`npm install libnpmexec`\n\n## Usage:\n\n```js\nconst libexec = require('libnpmexec')\nawait libexec({\n  args: ['yosay', 'Bom dia!'],\n  cache: '~/.npm/_cacache',\n  npxCache: '~/.npm/_npx',\n  yes: true,\n})\n```\n\n## API:\n\n### `libexec(opts)`\n\n- `opts`:\n  - `args`: List of pkgs to execute **Array<String>**, defaults to `[]`\n  - `call`: An alternative shell script to run when using `packages` option **String**, defaults to empty string. Unlike an executable selected from `args` or a package's `bin`, this is intentionally interpreted as shell syntax.\n  - `cache`: The path location to where the npm cache folder is placed **String**\n  - `npxCache`: The path location to where the npx cache folder is placed **String**\n  - `chalk`: Chalk instance to use for colors? **Required**\n  - `localBin`: Location to the `node_modules/.bin` folder of the local project to start scanning for bin files **String**, defaults to `./node_modules/.bin`. **libexec** will walk up the directory structure looking for `node_modules/.bin` folders in parent folders that might satisfy the current `arg` and will use that bin if found.\n  - `locationMsg`: Overrides \"at location\" message when entering interactive mode **String**\n  - `globalBin`: Location to the global space bin folder, same as: `$(npm bin -g)` **String**, defaults to empty string.\n  - `packages`: A list of packages to be used (possibly fetch from the registry) **Array<String>**, defaults to `[]`\n  - `path`: Location to where to read local project info (`package.json`) **String**, defaults to `.`\n  - `runPath`: Location to where to execute the script **String**, defaults to `.`\n  - `scriptShell`: Default shell to be used **String**, defaults to `sh` on POSIX systems, `process.env.ComSpec` OR `cmd` on Windows\n  - `yes`: Should skip download confirmation prompt when fetching missing packages from the registry? **Boolean**\n  - `registry`, `cache`, and more options that are forwarded to [@npmcli/arborist](https://github.com/npm/cli/blob/latest/workspaces/arborist/README.md) and [pacote](https://github.com/npm/pacote/#options) **Object**\n\n  Executable names are escaped for the selected shell, including POSIX shells and\n  PowerShell used on Windows. For inferred PowerShell invocations, arguments are\n  also escaped as literal strings. With `cmd.exe`, executable names containing double\n  quotes, percent signs, exclamation marks, or control characters are rejected\n  with `EINVALIDCOMMAND`. Use a bin name without these characters. On a matching\n  npx-cache hit, command selection uses the installed package's `bin` rather than\n  the registry's bin metadata.\n\n## LICENSE\n\n[ISC](./LICENSE)\n","publish_time":1793830622974,"_cnpm_publish_time":1793830622974,"dist-tags":{"backport":"10.3.5","latest":"11.0.5","prerelease":"11.0.0-pre.1"}}