{"name":"@zkochan/cmd-shim","version":"9.0.6","author":{"url":"http://kochan.io","name":"Zoltan Kochan","email":"zoltan.kochan@gmail.com"},"license":"BSD-2-Clause","_id":"@zkochan/cmd-shim@9.0.6","maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"dist":{"shasum":"03443f68a0fc5c0a308cd78c30d8c45f701f3ced","tarball":"http://registry-npm.ywwl.com/@zkochan/cmd-shim/download/@zkochan/cmd-shim-9.0.6.tgz","fileCount":7,"integrity":"sha512-Anjtn1GHeHMpG8jndikUt/eMb1BVHS8RnYPrXxcvP7FZjKXS1JoQilD7Ympyz7WI/p1gTQzXME4z6CKpY5Jghg==","signatures":[{"sig":"MEUCIDbsx323GeEtFpalmZr82DUeMlHJFQ/5GusM8OV1RzG2AiEAueri8fKNj3CHvFwi9xktz0RMCDOdU0ms3gMKHazCjQM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44675,"size":12422,"noattachment":false,"key":"/@zkochan/cmd-shim/-/@zkochan/cmd-shim-9.0.6.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.6_1781482128555_0.5974752752668144","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":1781482128726,"_cnpm_publish_time":1781482128726,"dist-tags":{"latest":"9.0.8","next":"5.0.0"}}