{"_id":"@zkochan/cmd-shim@9.0.8","dist":{"shasum":"6de85d894cf2d648c02e2d604a9808a342abb536","tarball":"http://registry-npm.ywwl.com/@zkochan/cmd-shim/download/@zkochan/cmd-shim-9.0.8.tgz","fileCount":7,"integrity":"sha512-PfbYtsZwUMs7YleBJ1XD+BaKQ99MGHxAw0XZCDiUId9Yok4zNg60N3hCALnh8KsjBI/ocMstjDDTFThNweIJAw==","signatures":[{"sig":"MEUCIQD3dpKpKyobjNvdHAyO7Sm3/p+XyJ7/TBL6+R7drIpFLQIgBWp1vYjtHpJ/LekfMBkgUXoxissaDDtNMu+g6fW9q0s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCMkAfcQFqsH07DctkbLizj0fH3TJnBOZp2gTuccujfQgIhALXDLh3fCjLJRbUKQ/3AgBAKHyE73mBcdrHz3bYDP9YV"}],"unpackedSize":47042,"size":12882,"noattachment":false,"key":"/@zkochan/cmd-shim/-/@zkochan/cmd-shim-9.0.8.tgz"},"name":"@zkochan/cmd-shim","type":"module","author":{"url":"http://kochan.io","name":"Zoltan Kochan","email":"zoltan.kochan@gmail.com"},"engines":{"node":">=22.13"},"exports":{".":"./index.js"},"license":"BSD-2-Clause","scripts":{"test":"pnpm run build && pnpm run test:unit","build":"tsc --build --verbose --listEmittedFiles","clean":"tsc --build --clean","test:unit":"node --test test/test.js test/e2e.test.js"},"version":"9.0.8","_npmUser":{"name":"zkochan","email":"z@kochan.io"},"repository":{"url":"https://github.com/pnpm/cmd-shim.git","type":"git"},"description":"Used in pnpm for command line application support","directories":{},"maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"dependencies":{"graceful-fs":"^4.2.11","cmd-extension":"^1.0.2"},"_hasShrinkwrap":false,"devDependencies":{"memfs":"^3.5.3","tempy":"^1.0.1","typescript":"^4.9.5","@types/node":"^18.19.87","@types/graceful-fs":"^4.1.9"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cmd-shim_9.0.8_1789298604826_0.9137685908405764"},"readme":"# @zkochan/cmd-shim\n\n> Used in pnpm for command line application support\n\n<!--@shields('travis', 'appveyor', 'npm')-->\n[![Build Status](https://img.shields.io/travis/pnpm/cmd-shim/master.svg)](https://travis-ci.org/pnpm/cmd-shim) [![Build Status on Windows](https://img.shields.io/appveyor/ci/zkochan/cmd-shim-8ah3a/master.svg)](https://ci.appveyor.com/project/zkochan/cmd-shim-8ah3a/branch/master) [![npm version](https://img.shields.io/npm/v/@zkochan/cmd-shim.svg)](https://www.npmjs.com/package/@zkochan/cmd-shim)\n<!--/@-->\n\nThe cmd-shim used in [pnpm](https://github.com/rstacruz/pnpm) to create executable scripts.\n\n## Installation\n\n```sh\nnpm install --save @zkochan/cmd-shim\n```\n\n## API\n\n### `cmdShim(src, to, opts?): Promise<void>`\n\nCreate a cmd shim at `to` for the command line program at `from`.\ne.g.\n\n```javascript\nconst cmdShim = require('@zkochan/cmd-shim')\ncmdShim(__dirname + '/cli.js', '/usr/bin/command-name')\n  .catch(err => console.error(err))\n```\n\n### `cmdShim.ifExists(src, to, opts?): Promise<void>`\n\nThe same as above, but will just continue if the file does not exist.\n\n#### Arguments:\n\n- `opts.preserveSymlinks` - _Boolean_ - if true, `--preserve-symlinks` is added to the options passed to NodeJS.\n- `opts.nodePath` - _String_ - sets the [NODE_PATH](https://nodejs.org/api/cli.html#cli_node_path_path) env variable.\n- `opts.prependToPath` - _String_ - prepends the passed path to PATH before executing the Node.js program.\n- `opts.nodeExecPath` - _String_ - sets the path to the Node.js executable.\n- `opts.createCmdFile` - _Boolean_ - is `true` on Windows by default. If true, creates a cmd file.\n- `opts.createPwshFile` - _Boolean_ - is `true` by default. If true, creates a powershell file.\n- `opts.progArgs` - String - optional arguments that will be prepend to any CLI arguments\n\n```javascript\nconst cmdShim = require('@zkochan/cmd-shim')\ncmdShim(__dirname + '/cli.js', '/usr/bin/command-name', { preserveSymlinks: true })\n  .catch(err => console.error(err))\n```\n\n## License\n\n[BSD-2-Clause](./LICENSE) © [Zoltan Kochan](http://kochan.io)\n","publish_time":1789298604942,"_cnpm_publish_time":1789298604942,"dist-tags":{"latest":"9.0.8","next":"5.0.0"}}