{"_id":"@cjs-mifi-test/npm-run-path","_rev":"1-06b0b14a6d9d3f9e4c3153aa182ce04f","name":"@cjs-mifi-test/npm-run-path","dist-tags":{"latest":"5.0.1"},"versions":{"5.0.1":{"name":"@cjs-mifi-test/npm-run-path","version":"5.0.1","description":"CJS version: Get your PATH prepended with locally installed binaries","keywords":["npm","run","path","package","bin","binary","binaries","script","cli","command-line","execute","executable"],"license":"MIT","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"main":"./index.js","scripts":{},"engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"dependencies":{"@cjs-mifi-test/path-key":"4.0.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.17.0","xo":"^0.45.0"},"types":"./index.d.ts","_id":"@cjs-mifi-test/npm-run-path@5.0.1","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-+s5rnAU48tXfLLZPmVArs5FXfzUfkiEZAQMBKbUEoXG38Gd5Yq8AK6FuDjrekrI9YMf26ujwrINuW9Tc7UmmJg==","shasum":"198668e719bbec54280db8e157f382f08e9e932f","tarball":"https://registry.npmjs.org/@cjs-mifi-test/npm-run-path/-/npm-run-path-5.0.1.tgz","fileCount":5,"unpackedSize":8364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7lQfCRA9TVsSAnZWagAASTwP/ifiF/3vPn5C8AWcCsUm\nrFWwr953fr8aaOu8msBxG/VGEfmTrWfCZQYXjRuaPc008kqNTP4KWe2dgAvn\nNf+Q+78Wwfh2uGnfkxsMvOLj/5FKoR0uQF+Q8rXNYRz30d5eZb3/ZQGm9I8E\njygptR3EC48SV8sfxS8xaet0ewa7zqQvuQCBEGrft14jD039B9xLdYsTv8zQ\n/wvAmRHsiJwGa1vCL5Iyg1xduuCc1gqCsY8uoDlEEBanFSnGEaEdO7zhTQjW\nLrXQbXEvewC5vn1NKRo+ytFLFuMDwsz8hnCw82po+4HkSgLvP9iogIDFowyE\nZDE0wxE4Z4A6BWfU5u08IrrR4zgd6Frgxtr1CV/pD8GOkMJPqN9jZ9+Oc+lx\nnUy8/n+ZVVXpbb67dtFuj1K9FgRo604soYDaBhFJhbs7n/JU0c8EyS842IRz\ngR8/HEV9A/oX1GgVA0Ob6JrgNV14ejK28FSINx1+K66HvgrLC2R2preP2FxB\nyGVE+FER1wP3Q5vXfOHMJ0Bkt3SRniyKY/LfDzZ6GGSqLOdUyiV9k+AoppfW\n9eYeypFyuSh7+nyD/5KrqjiIZiUvx238sae9oSWVjLRG/alIPUmxynMN5FyF\nyMAq2uMcT6hI59LJ4xDfTqQVe0OqJ1O02BBu0yWzDqQsAGxRfyZ/qnxplQ/9\nE7Nj\r\n=Q4TV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8aKjzcopx/ufmYvwnC6E8giyPT+RRzB96kMizEJGQHwIgId+zOg2YuDW2TMCzIpWicWlAcSZ59Ex4/eQlWXFIK24="}]},"_npmUser":{"name":"mifi","email":"finstaden@gmail.com"},"directories":{},"maintainers":[{"name":"mifi","email":"finstaden@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/npm-run-path_5.0.1_1643009055688_0.7643109892858873"},"_hasShrinkwrap":false}},"time":{"created":"2022-01-24T07:24:15.625Z","5.0.1":"2022-01-24T07:24:15.830Z","modified":"2022-04-04T23:09:36.099Z"},"maintainers":[{"name":"mifi","email":"finstaden@gmail.com"}],"description":"CJS version: Get your PATH prepended with locally installed binaries","keywords":["npm","run","path","package","bin","binary","binaries","script","cli","command-line","execute","executable"],"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# npm-run-path\n\n> Get your [PATH](https://en.wikipedia.org/wiki/PATH_(variable)) prepended with locally installed binaries\n\nIn [npm run scripts](https://docs.npmjs.com/cli/run-script) you can execute locally installed binaries by name. This enables the same outside npm.\n\n## Install\n\n```sh\nnpm install npm-run-path\n```\n\n## Usage\n\n```js\nimport childProcess from 'node:child_process';\nimport {npmRunPath, npmRunPathEnv} from 'npm-run-path';\n\nconsole.log(process.env.PATH);\n//=> '/usr/local/bin'\n\nconsole.log(npmRunPath());\n//=> '/Users/sindresorhus/dev/foo/node_modules/.bin:/Users/sindresorhus/dev/node_modules/.bin:/Users/sindresorhus/node_modules/.bin:/Users/node_modules/.bin:/node_modules/.bin:/usr/local/bin'\n\n// `foo` is a locally installed binary\nchildProcess.execFileSync('foo', {\n\tenv: npmRunPathEnv()\n});\n```\n\n## API\n\n### npmRunPath(options?)\n\nReturns the augmented PATH string.\n\n#### options\n\nType: `object`\n\n##### cwd\n\nType: `string`\\\nDefault: `process.cwd()`\n\nThe working directory.\n\n##### path\n\nType: `string`\\\nDefault: [`PATH`](https://github.com/sindresorhus/path-key)\n\nThe PATH to be appended.\n\nSet it to an empty string to exclude the default PATH.\n\n##### execPath\n\nType: `string`\\\nDefault: `process.execPath`\n\nThe path to the current Node.js executable. Its directory is pushed to the front of PATH.\n\nThis can be either an absolute path or a path relative to the [`cwd` option](#cwd).\n\n### npmRunPathEnv(options?)\n\nReturns the augmented [`process.env`](https://nodejs.org/api/process.html#process_process_env) object.\n\n#### options\n\nType: `object`\n\n##### cwd\n\nType: `string`\\\nDefault: `process.cwd()`\n\nThe working directory.\n\n##### env\n\nType: `object`\n\nAccepts an object of environment variables, like `process.env`, and modifies the PATH using the correct [PATH key](https://github.com/sindresorhus/path-key). Use this if you're modifying the PATH for use in the `child_process` options.\n\n##### execPath\n\nType: `string`\\\nDefault: `process.execPath`\n\nThe path to the Node.js executable to use in child processes if that is different from the current one. Its directory is pushed to the front of PATH.\n\nThis can be either an absolute path or a path relative to the [`cwd` option](#cwd).\n\n## Related\n\n- [npm-run-path-cli](https://github.com/sindresorhus/npm-run-path-cli) - CLI for this module\n- [execa](https://github.com/sindresorhus/execa) - Execute a locally installed binary\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-npm-run-path?utm_source=npm-npm-run-path&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n","readmeFilename":"readme.md"}