1 line
9.2 KiB
Plaintext
1 line
9.2 KiB
Plaintext
{"_id":"exit-on-epipe","_rev":"8-770c37b0c8b05d39d94c0d629d6e7644","name":"exit-on-epipe","description":"Cleanly exit process on EPIPE","dist-tags":{"latest":"1.0.1"},"versions":{"0.0.1":{"name":"exit-on-epipe","version":"0.0.1","author":{"name":"sheetjs"},"description":"Cleanly exit process on EPIPE","keywords":["epipe","pipe","error","exit"],"main":"./exit-on-epipe","dependencies":{},"devDependencies":{"mocha":""},"repository":{"type":"git","url":"git://github.com/SheetJS/node-exit-on-epipe.git"},"scripts":{"test":"make test"},"bugs":{"url":"https://github.com/SheetJS/node-exit-on-epipe/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"gitHead":"0361485fdd5684416534b97834f47c147e0597b7","homepage":"https://github.com/SheetJS/node-exit-on-epipe","_id":"exit-on-epipe@0.0.1","_shasum":"ea41650007098c8444519a5d48958170c4ad929b","_from":".","_npmVersion":"3.3.12","_nodeVersion":"5.1.0","_npmUser":{"name":"sheetjs","email":"dev@sheetjs.com"},"maintainers":[{"name":"sheetjs","email":"dev@sheetjs.com"}],"dist":{"shasum":"ea41650007098c8444519a5d48958170c4ad929b","tarball":"https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-0.0.1.tgz","integrity":"sha512-7XJR5NLMMsDXWCKXGZRQn84cDvfeRlJiPTh7v0Jz8Lf3v1aRhcabEoDMlaJv668Pu75okH9IN+aieVqAf4aZQg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEjHfVeNlmsDHf1uoPN79/igtkpKXpuTA6zsSr0SN/EwIgeaeMNwoBgcEIqQQiYDtLwRIYHjg7seiNSnNrZG6NCJE="}]}},"0.1.0":{"name":"exit-on-epipe","version":"0.1.0","author":{"name":"sheetjs"},"description":"Cleanly exit process on EPIPE","keywords":["epipe","pipe","error","exit"],"main":"./exit-on-epipe","dependencies":{},"devDependencies":{"mocha":""},"repository":{"type":"git","url":"git://github.com/SheetJS/node-exit-on-epipe.git"},"scripts":{"test":"make test"},"files":["exit-on-epipe.js","LICENSE","README.md"],"bugs":{"url":"https://github.com/SheetJS/node-exit-on-epipe/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"gitHead":"4e0faedd65b13709a494a3bbbff87fa71cbc308c","_id":"exit-on-epipe@0.1.0","_shasum":"aa2f0155b78b34fe60dd2b462e84637ba5ed0697","_from":".","_npmVersion":"3.10.8","_nodeVersion":"7.0.0","_npmUser":{"name":"sheetjs","email":"dev@sheetjs.com"},"dist":{"shasum":"aa2f0155b78b34fe60dd2b462e84637ba5ed0697","tarball":"https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-0.1.0.tgz","integrity":"sha512-8rokwsDPjYCDchbiWJyIGNGG5SoAxzQmaPZKO0tO+9So6kRNHrayd8LRt1f62jLJZ6ECn1WrjcKWnie7NX9OKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCFYNjRsXYuSEhQAw/mWDvdtZTFiqgjA3P9UkemqloLPgIgTZY2cvt1P0Xo3mUX3+Cbe3qrXWcYuQcPjFpke6zVbyE="}]},"maintainers":[{"name":"sheetjs","email":"dev@sheetjs.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/exit-on-epipe-0.1.0.tgz_1478110895407_0.9486721574794501"}},"1.0.0":{"name":"exit-on-epipe","version":"1.0.0","author":{"name":"sheetjs"},"description":"Cleanly exit process on EPIPE","keywords":["epipe","pipe","error","exit"],"main":"./exit-on-epipe","dependencies":{},"devDependencies":{"mocha":""},"repository":{"type":"git","url":"git://github.com/SheetJS/node-exit-on-epipe.git"},"scripts":{"test":"make test"},"files":["exit-on-epipe.js","LICENSE","README.md"],"bugs":{"url":"https://github.com/SheetJS/node-exit-on-epipe/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"gitHead":"de59f185c239d9200d6af77ae525fd5dd3f673a9","_id":"exit-on-epipe@1.0.0","_shasum":"f6e0579c8214d33a08109fd6e2e5c1dbc70463fc","_from":".","_npmVersion":"4.0.5","_nodeVersion":"7.4.0","_npmUser":{"name":"sheetjs","email":"dev@sheetjs.com"},"dist":{"shasum":"f6e0579c8214d33a08109fd6e2e5c1dbc70463fc","tarball":"https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.0.tgz","integrity":"sha512-RNJtmdnTsdnmuWREq/HW4ByZVAAUF8mUSn9gVKiaveVYhH+ODPLZSDVjveUQMs9DSAmiDNuv5AmvonXj7eGlpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCNCdVzND2bl+gT+Ryqs45ZF0C/yXHpwSNpYViomxBcuQIhAOFNm6IRLFTEXd8+pqpk9BjsZaHh6VsvvOpDQrxHJ9TL"}]},"maintainers":[{"name":"sheetjs","email":"dev@sheetjs.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/exit-on-epipe-1.0.0.tgz_1483635602858_0.6134407066274434"}},"1.0.1":{"name":"exit-on-epipe","version":"1.0.1","author":{"name":"sheetjs"},"description":"Cleanly exit process on EPIPE","keywords":["epipe","pipe","error","exit"],"main":"./exit-on-epipe","dependencies":{},"devDependencies":{"mocha":"~2.5.3"},"repository":{"type":"git","url":"git://github.com/SheetJS/node-exit-on-epipe.git"},"scripts":{"test":"make test"},"files":["exit-on-epipe.js","LICENSE","README.md"],"bugs":{"url":"https://github.com/SheetJS/node-exit-on-epipe/issues"},"license":"Apache-2.0","engines":{"node":">=0.8"},"homepage":"https://github.com/SheetJS/node-exit-on-epipe#readme","_id":"exit-on-epipe@1.0.1","_npmVersion":"5.3.0","_nodeVersion":"8.2.1","_npmUser":{"name":"sheetjs","email":"dev@sheetjs.com"},"dist":{"integrity":"sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw==","shasum":"0bdd92e87d5285d267daa8171d0eb06159689692","tarball":"https://registry.npmjs.org/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBjILg/scmgpodxL0RYE53xR+xCI0ogduHTxW374r8gnAiAgOE2W8UUww7ByELIw58Yw4SkEBQzeEkjoX0caiJ7gJw=="}]},"maintainers":[{"name":"sheetjs","email":"dev@sheetjs.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/exit-on-epipe-1.0.1.tgz_1500833970573_0.5011294030118734"}}},"readme":"# exit-on-epipe\n\nCleanly exit on pipe errors in NodeJS scripts.\n\nNOTE: The underlying problem was addressed in 8.x NodeJS versions but the fix\nwas not backported to 6.x and other versions of NodeJS.\n\nThese errors are common in pipelines that involve NodeJS scripts. For example,\ntake a simple script that prints out 10 lines:\n\n```js\nfor(var i = 0; i < 10; ++i) console.log(i)\n```\n\nNodeJS will print an error message if the output is truncated:\n\n```bash\n$ cat t.js\nfor(var i = 0; i < 10; ++i) console.log(i)\n$ node --version\nv6.11.1\n$ node t.js | head -n 1\n0\nevents.js:160\n throw er; // Unhandled 'error' event\n ^\n\nError: write EPIPE\n at exports._errnoException (util.js:1018:11)\n at WriteWrap.afterWrite (net.js:800:14)\n```\n\nThe process will cleanly exit if you require the module:\n\n```bash\n$ cat t.js\nrequire(\"exit-on-epipe\");\nfor(var i = 0; i < 10; ++i) console.log(i)\n$ node t.js | head -n 1\n0\n```\n\n## Installation\n\nWith [npm](https://www.npmjs.org/package/exit-on-epipe):\n\n```bash\n$ npm install exit-on-epipe\n```\n\n## Usage\n\nFor basic scripts, requiring at the top of the source file suffices:\n\n```js\nrequire('exit-on-epipe');\n// ... rest of source\n```\n\nFor more advanced situations (e.g. handing other streams), call the module:\n\n```js\nvar eoepipe = require('exit-on-epipe');\neoepipe(stream); // will exit process on an EPIPE error on stream\neoepipe(stream, handler); // will call handler() instead of process.exit\n```\n\n## Interface\n\nThe module exports a single function (exposed as the variable `eoepipe`).\n\n`eoepipe(stream, bail)` will attach an error handler to `stream` which will:\n\n- call the `bail` function if the error `.code` is `\"EPIPE\"` or `.errno` is `32`\n- defer to the default behavior if there are no other error handlers\n- noop if the error is not `EPIPE` and if there are other error handlers\n\nIf the `bail` function is not specified, `process.exit` is used.\n\nIf the `stream` parameter is not specified, no action will be taken\n\n## Notes\n\nThe script will not perform any action if `process` or `process.stdout` are not\navailable. It is safe to use in a web page.\n\n## License\n\nPlease consult the attached LICENSE file for details. All rights not explicitly\ngranted by the Apache 2.0 license are reserved by the Original Author.\n\n## Badges\n\n[](https://travis-ci.org/SheetJS/node-exit-on-epipe)\n\n[](https://npmjs.org/package/exit-on-epipe)\n\n[](https://npmjs.org/package/exit-on-epipe)\n\n[](https://david-dm.org/sheetjs/node-exit-on-epipe)\n\n[](https://ghit.me/repo/sheetjs/node-exit-on-epipe)\n\n[](https://github.com/SheetJS/node-exit-on-epipe)\n","maintainers":[{"name":"sheetjs","email":"dev@sheetjs.com"}],"time":{"modified":"2022-06-17T21:57:08.686Z","created":"2015-11-20T19:00:54.319Z","0.0.1":"2015-11-20T19:00:54.319Z","0.1.0":"2016-11-02T18:21:35.944Z","1.0.0":"2017-01-05T17:00:03.466Z","1.0.1":"2017-07-23T18:19:31.532Z"},"keywords":["epipe","pipe","error","exit"],"repository":{"type":"git","url":"git://github.com/SheetJS/node-exit-on-epipe.git"},"author":{"name":"sheetjs"},"bugs":{"url":"https://github.com/SheetJS/node-exit-on-epipe/issues"},"license":"Apache-2.0","readmeFilename":"README.md","homepage":"https://github.com/SheetJS/node-exit-on-epipe#readme","users":{"blackburro":true}} |