{"name":"@zkochan/cmd-shim","version":"9.0.5","author":{"url":"http://kochan.io","name":"Zoltan Kochan","email":"zoltan.kochan@gmail.com"},"license":"BSD-2-Clause","_id":"@zkochan/cmd-shim@9.0.5","maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"dist":{"shasum":"70e171b4b1d54d372a3e147bb9eee9e053665a39","tarball":"http://registry-npm.ywwl.com/@zkochan/cmd-shim/download/@zkochan/cmd-shim-9.0.5.tgz","fileCount":7,"integrity":"sha512-PnTzz95+zgs5TPl5jBNcheqWN8YmTbtmPfdbFDANZfKRtmkh9YP9ZZhMat4r/ETpWHu/LrnJ5/v06ueRM5M6KQ==","signatures":[{"sig":"MEUCIQDx54mTRuoteAQCB6XTY+YrwFFHJNEWmtwX8KOCoNRtKAIgN9jNwpYkYHxodpxiatUG8uWWpZC+UMTXDMCX0TJSFnI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44214,"size":12381,"noattachment":false,"key":"/@zkochan/cmd-shim/-/@zkochan/cmd-shim-9.0.5.tgz"},"type":"module","engines":{"node":">=22.13"},"exports":{".":"./index.js"},"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"},"_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":{},"_nodeVersion":"26.0.0","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":{"tmp":"tmp/cmd-shim_9.0.5_1781480937750_0.8592863089026477","host":"s3://npm-registry-packages-npm-production"},"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":1781480937922,"_cnpm_publish_time":1781480937922,"dist-tags":{"latest":"9.0.8","next":"5.0.0"}}