{"name":"@zkochan/cmd-shim","version":"8.0.1","author":{"url":"http://kochan.io","name":"Zoltan Kochan","email":"zoltan.kochan@gmail.com"},"license":"BSD-2-Clause","_id":"@zkochan/cmd-shim@8.0.1","maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"homepage":"https://github.com/pnpm/cmd-shim#readme","bugs":{"url":"https://github.com/pnpm/cmd-shim/issues"},"mos":{"plugins":["readme"]},"dist":{"shasum":"47124a074dde64092dd205e62b3e5638a2ddccca","tarball":"http://registry-npm.ywwl.com/@zkochan/cmd-shim/download/@zkochan/cmd-shim-8.0.1.tgz","fileCount":7,"integrity":"sha512-fz72az47CZQE5vD+NWd51VBq8II6FAebp+SXRsS0b+sNHUXNFA3/F1dgBSkNQO6/BClomsV4WaRFqAkLdUe1zw==","signatures":[{"sig":"MEYCIQDaPjx9bySGhwJhCfY4a1zk94Dv6+fIWxZML0vuvdyMRwIhAJRjw0AcFKoEeAA4YrDeXbOZd4cz+dcv4A3/84jxi+pC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38351,"size":10540,"noattachment":false,"key":"/@zkochan/cmd-shim/-/@zkochan/cmd-shim-8.0.1.tgz"},"jest":{"testEnvironment":"node"},"_from":"file:zkochan-cmd-shim-8.0.1.tgz","types":"./index.d.ts","engines":{"node":">=22.13"},"scripts":{"md":"mos","test":"pnpm run build && standard && pnpm run test:unit && mos test","build":"tsc --build --verbose --listEmittedFiles","clean":"tsc --build --clean","test:unit":"jest","pretest:unit":"tsc --build test --verbose --listEmittedFiles"},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"standard":{"env":{"jest":true}},"_resolved":"/private/var/folders/g7/5ygp0ncd6qx5g4fn5hpsqq5c0000gn/T/7f6bff05340e8870065c93aac772a854/zkochan-cmd-shim-8.0.1.tgz","_integrity":"sha512-fz72az47CZQE5vD+NWd51VBq8II6FAebp+SXRsS0b+sNHUXNFA3/F1dgBSkNQO6/BClomsV4WaRFqAkLdUe1zw==","repository":{"url":"git+https://github.com/pnpm/cmd-shim.git","type":"git"},"_npmVersion":"11.6.2","description":"Used in pnpm for command line application support","directories":{},"_nodeVersion":"24.13.1","dependencies":{"is-windows":"^1.0.2","graceful-fs":"^4.2.11","cmd-extension":"^1.0.2"},"_hasShrinkwrap":false,"devDependencies":{"mos":"^1.3.1","jest":"^29.7.0","memfs":"^3.5.3","tempy":"^1.0.1","mock-fs":"^5.5.0","standard":"^14.3.4","typescript":"^4.9.5","@types/jest":"^29.5.14","@types/node":"^18.19.87","@types/is-windows":"^1.0.2","mos-plugin-readme":"^1.0.4"},"_npmOperationalInternal":{"tmp":"tmp/cmd-shim_8.0.1_1771858250058_0.5798181742089377","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":1771858250213,"_cnpm_publish_time":1771858250213,"dist-tags":{"latest":"9.0.8","next":"5.0.0"}}