{"_id":"spawncommand","_rev":"299696","name":"spawncommand","description":"Spawn or fork a child process with a promise property resolved on exit with stdout, stderr and code.","dist-tags":{"latest":"2.2.0"},"maintainers":[{"name":"zvr","email":""}],"time":{"modified":"2024-01-31T16:04:02.000Z","created":"2017-02-04T21:54:21.179Z","2.2.0":"2019-04-25T17:25:52.262Z","2.1.2":"2019-04-04T20:11:03.384Z","2.1.1":"2019-03-11T12:42:07.272Z","2.1.0":"2018-09-20T06:23:07.938Z","2.0.1":"2018-05-17T04:52:26.077Z","2.0.0":"2018-05-14T23:34:22.315Z","1.1.0":"2017-04-18T23:24:00.854Z","1.0.1":"2017-02-04T21:54:21.179Z"},"users":{},"author":{"name":"anton","email":"anton@adc.sh"},"repository":{"type":"git","url":"git://github.com/artdecocode/spawncommand.git"},"versions":{"2.2.0":{"name":"spawncommand","version":"2.2.0","description":"Spawn or fork a child process with a promise property resolved on exit with stdout, stderr and code.","main":"build/index.js","module":"src/index.js","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","b":"alamode src -o build -s","build":"yarn-s d b doc","doc":"NODE_DEBUG=doc doc -o README.md","test-build":"ALAMODE_ENV=test-build yarn test","example/spawncommand.js":"node example example/spawncommand","example/fork.js":"node example example/fork","example/pipe.js":"node example example/pipe","e":"alanode","d":"yarn-s d1 externs","d1":"typal src -c","externs":"typal externs.js -e"},"externs":"externs.js","repository":{"type":"git","url":"git://github.com/artdecocode/spawncommand.git"},"keywords":["spawn","fork","async","child_process","child process","ChildProcess","promise","stdout","stderr","stdio"],"author":{"name":"anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/spawncommand/issues"},"homepage":"https://github.com/artdecocode/spawncommand#readme","devDependencies":{"alamode":"^2.0.0","documentary":"^1.26.0","yarn-s":"1.1.0","zoroaster":"^3.13.0"},"dependencies":{"catchment":"^3.3.0"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"spawncommand@2.2.0","dist":{"shasum":"545791d135482bd5428c9de1e889305abde42889","size":4721,"noattachment":false,"key":"/spawncommand/-/spawncommand-2.2.0.tgz","tarball":"http://name.csiicloud.com:7001/spawncommand/download/spawncommand-2.2.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/spawncommand_2.2.0_1556213152140_0.1927227015976214"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:13.604Z","publish_time":1556213152262,"_cnpm_publish_time":1556213152262},"2.1.2":{"name":"spawncommand","version":"2.1.2","description":"Spawn or fork a child process with a promise property resolved on exit with stdout, stderr and code.","main":"build","module":"src","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","b":"alamode src -o build -s","build":"yarn-s d b doc","d":"doc src/index.js -g","doc":"NODE_DEBUG=doc doc documentary -o README.md","test-build":"ALAMODE_ENV=test-build yarn test","example/spawncommand.js":"node example example/spawncommand","example/fork.js":"node example example/fork","example/pipe.js":"node example example/pipe","e":"alanode"},"repository":{"type":"git","url":"git+https://github.com/artdecocode/spawncommand.git"},"keywords":["spawn","fork","async","child_process","child process","ChildProcess","promise","stdout","stderr","stdio"],"author":{"name":"anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/spawncommand/issues"},"homepage":"https://github.com/artdecocode/spawncommand#readme","devDependencies":{"alamode":"^1.9.2","documentary":"^1.23.4","yarn-s":"1.1.0","zoroaster":"^3.11.4"},"dependencies":{"catchment":"^3.2.3"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"spawncommand@2.1.2","dist":{"shasum":"37b878bcf5c2b091c70f8c8afb9c2144342c118a","size":4142,"noattachment":false,"key":"/spawncommand/-/spawncommand-2.1.2.tgz","tarball":"http://name.csiicloud.com:7001/spawncommand/download/spawncommand-2.1.2.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/spawncommand_2.1.2_1554408663222_0.6358563124386485"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:12.726Z","publish_time":1554408663384,"_cnpm_publish_time":1554408663384},"2.1.1":{"name":"spawncommand","version":"2.1.1","description":"Spawn or fork a child process with a promise property resolved on exit with stdout, stderr and code.","main":"build","module":"src","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","b":"alamode src -o build -s","build":"yarn-s d b doc","d":"doc src/index.js -g","doc":"NODE_DEBUG=doc doc documentary -o README.md","test-build":"ALAMODE_ENV=test-build yarn test","example/spawncommand.js":"node example example/spawncommand","example/fork.js":"node example example/fork","example/pipe.js":"node example example/pipe"},"repository":{"type":"git","url":"git+https://github.com/artdecocode/spawncommand.git"},"keywords":["spawn","fork","async","child_process","child process","ChildProcess","promise","stdout","stderr","stdio"],"author":{"name":"anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/spawncommand/issues"},"homepage":"https://github.com/artdecocode/spawncommand#readme","devDependencies":{"alamode":"1.8.4","documentary":"1.21.5","yarn-s":"1.1.0","zoroaster":"3.8.2"},"dependencies":{"catchment":"3.2.2"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"spawncommand@2.1.1","dist":{"shasum":"297393c728c236d2ef11925cdf6795e44479a71e","size":4060,"noattachment":false,"key":"/spawncommand/-/spawncommand-2.1.1.tgz","tarball":"http://name.csiicloud.com:7001/spawncommand/download/spawncommand-2.1.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/spawncommand_2.1.1_1552308127001_0.39833872363432454"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:11.861Z","publish_time":1552308127272,"_cnpm_publish_time":1552308127272},"2.1.0":{"name":"spawncommand","version":"2.1.0","description":"Spawn or fork a child process with a promise property resolved on exit with stdout, stderr and code.","main":"build","scripts":{"t":"zoroaster -a","test":"yarn t test/spec","b":"alamode src -o build","build":"yarn-s d b doc","d":"doc src/index.js -g","doc":"NODE_DEBUG=doc doc documentary -o README.md","test-build":"ALAMODE_ENV=test-build yarn test","example/spawncommand.js":"node example example/spawncommand","example/fork.js":"node example example/fork","example/pipe.js":"node example example/pipe"},"repository":{"type":"git","url":"git+https://github.com/artdecocode/spawncommand.git"},"keywords":["spawn","fork","async","child_process","child process","ChildProcess","promise","stdout","stderr","stdio"],"author":{"name":"anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/spawncommand/issues"},"homepage":"https://github.com/artdecocode/spawncommand#readme","devDependencies":{"alamode":"1.5.0","documentary":"1.18.0","yarn-s":"1.1.0","zoroaster":"3.4.1"},"dependencies":{"catchment":"3.1.1"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"spawncommand@2.1.0","dist":{"shasum":"a5ef60ae7892e8718a9c717fc52fe5f54521e0de","size":4624,"noattachment":false,"key":"/spawncommand/-/spawncommand-2.1.0.tgz","tarball":"http://name.csiicloud.com:7001/spawncommand/download/spawncommand-2.1.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/spawncommand_2.1.0_1537424587726_0.32906500263456273"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:10.986Z","publish_time":1537424587938,"_cnpm_publish_time":1537424587938},"2.0.1":{"name":"spawncommand","version":"2.0.1","description":"Spawn a child process with a promise property resolved on exit with stdout, stderr and code","main":"build","files":["build"],"scripts":{"t":"zoroaster --babel","build":"babel src --out-dir build","test":"zoroaster test/spec --babel","test-build":"BABEL_ENV=test-build zoroaster test/spec --babel","test-all":"yarn-s test test-build","example/spawncommand.js":"node example example/spawncommand","example/fork.js":"node example example/fork","example/pipe.js":"node example example/pipe"},"repository":{"type":"git","url":"git+https://github.com/artdecocode/spawncommand.git"},"keywords":["spawn","child_process","promise","stdout","stderr","ChildProcess","stdio"],"author":{"name":"anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/spawncommand/issues"},"homepage":"https://github.com/artdecocode/spawncommand#readme","devDependencies":{"@babel/cli":"7.0.0-beta.47","@babel/core":"7.0.0-beta.47","@babel/plugin-syntax-object-rest-spread":"7.0.0-beta.47","@babel/plugin-transform-modules-commonjs":"7.0.0-beta.47","@babel/register":"7.0.0-beta.47","babel-plugin-transform-rename-import":"2.2.0","yarn-s":"1.1.0","zoroaster":"1.1.0"},"dependencies":{"catchment":"2.0.1"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"spawncommand@2.0.1","dist":{"shasum":"088476fd8aa3c63932309ce0e76a8924d51a34ab","size":3227,"noattachment":false,"key":"/spawncommand/-/spawncommand-2.0.1.tgz","tarball":"http://name.csiicloud.com:7001/spawncommand/download/spawncommand-2.0.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/spawncommand_2.0.1_1526532745977_0.3111246626552553"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:10.135Z","publish_time":1526532746077,"_cnpm_publish_time":1526532746077},"2.0.0":{"name":"spawncommand","version":"2.0.0","description":"Spawn a child process with a promise property resolved on exit with stdout, stderr and code","main":"build","files":["build"],"scripts":{"t":"zoroaster --babel","build":"babel src --out-dir build","test":"zoroaster test/spec --babel","test-build":"BABEL_ENV=test-build zoroaster test/spec --babel","test-all":"yarn-s test test-build","example/spawncommand.js":"node example example/spawncommand","example/fork.js":"node example example/fork","example/pipe.js":"node example example/pipe"},"repository":{"type":"git","url":"git+https://github.com/artdecocode/spawncommand.git"},"keywords":["spawn","child_process","promise","stdout","stderr","ChildProcess","stdio"],"author":{"name":"anton","email":"anton@adc.sh"},"license":"MIT","bugs":{"url":"https://github.com/artdecocode/spawncommand/issues"},"homepage":"https://github.com/artdecocode/spawncommand#readme","devDependencies":{"@babel/cli":"7.0.0-beta.46","@babel/core":"7.0.0-beta.46","@babel/plugin-syntax-object-rest-spread":"7.0.0-beta.46","@babel/plugin-transform-modules-commonjs":"7.0.0-beta.46","@babel/register":"7.0.0-beta.46","yarn-s":"1.1.0","zoroaster":"1.1.0"},"dependencies":{"babel-plugin-transform-rename-import":"2.2.0","catchment":"2.0.1"},"licenseText":"MIT License\n\nCopyright (c) 2018 Art Deco Code Limited\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"spawncommand@2.0.0","dist":{"shasum":"257c9116d1eabbb0edbffd3ca796fa6cddf386e3","size":3181,"noattachment":false,"key":"/spawncommand/-/spawncommand-2.0.0.tgz","tarball":"http://name.csiicloud.com:7001/spawncommand/download/spawncommand-2.0.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmUser":{"name":"zvr","email":"anton@adc.sh"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/spawncommand_2.0.0_1526340862225_0.45630048873957185"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2021-12-19T19:18:09.277Z","publish_time":1526340862315,"_cnpm_publish_time":1526340862315},"1.1.0":{"name":"spawncommand","version":"1.1.0","description":"spawn which returns a process with a promise property, fulfilled with { code, stdout, stderr }","main":"src/index","files":["src/"],"scripts":{"test":"zoroaster test/spec"},"repository":{"type":"git","url":"git+https://github.com/Sobesednik/spawncommand.git"},"keywords":["spawn","child_process","promise","stdout","stderr"],"author":{"name":"anton","email":"anton@sobes.io"},"license":"MIT","bugs":{"url":"https://github.com/Sobesednik/spawncommand/issues"},"homepage":"https://github.com/Sobesednik/spawncommand#readme","devDependencies":{"zoroaster":"^0.3.0"},"dependencies":{"catchment":"^1.0.0"},"gitHead":"dce0c7aa470381e93baf60f2e1a4117b1706ccd5","_id":"spawncommand@1.1.0","_shasum":"80a56ed3c06ab3b91643cf3f6cef38bf582fdb15","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"zvr","email":"anton@sobesednik.media"},"dist":{"shasum":"80a56ed3c06ab3b91643cf3f6cef38bf582fdb15","size":2165,"noattachment":false,"key":"/spawncommand/-/spawncommand-1.1.0.tgz","tarball":"http://name.csiicloud.com:7001/spawncommand/download/spawncommand-1.1.0.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/spawncommand-1.1.0.tgz_1492557840092_0.40235621528699994"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:18:08.383Z","publish_time":1492557840854,"_cnpm_publish_time":1492557840854},"1.0.1":{"name":"spawncommand","version":"1.0.1","description":"spawn which returns a process with a promise property, fulfilled with { code, stdout, stderr }","main":"src/index","files":["src/"],"scripts":{"test":"zoroaster test/spec"},"repository":{"type":"git","url":"git+https://github.com/Sobesednik/spawncommand.git"},"keywords":["spawn","child_process","promise","stdout","stderr"],"author":{"name":"anton","email":"anton@sobes.io"},"license":"MIT","bugs":{"url":"https://github.com/Sobesednik/spawncommand/issues"},"homepage":"https://github.com/Sobesednik/spawncommand#readme","devDependencies":{"zoroaster":"^0.2.0"},"gitHead":"4a0695c41397fce8b3b2015689cf77c012fd1df4","_id":"spawncommand@1.0.1","_shasum":"edd84f98f81f86ef62de90c909c813c4a4403fe6","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.2.0","_npmUser":{"name":"zvr","email":"anton@sobesednik.media"},"dist":{"shasum":"edd84f98f81f86ef62de90c909c813c4a4403fe6","size":2191,"noattachment":false,"key":"/spawncommand/-/spawncommand-1.0.1.tgz","tarball":"http://name.csiicloud.com:7001/spawncommand/download/spawncommand-1.0.1.tgz"},"maintainers":[{"name":"zvr","email":""}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/spawncommand-1.0.1.tgz_1486245260494_0.11235867929644883"},"directories":{},"_cnpmcore_publish_time":"2021-12-19T19:18:07.526Z","publish_time":1486245261179,"_cnpm_publish_time":1486245261179}},"readme":"# spawnCommand\n\n[![npm version](https://badge.fury.io/js/spawncommand.svg)](https://npmjs.org/package/spawncommand)\n\n_SpawnCommand_ will run the `spawn` or `fork` methods from the `child_process` module, and add a `promise` property to the returned process instance. The promise will be resolved on process exit with an object consisting of `code`, `stdout` and `stderr` properties.\n\n```\nyarn add spawncommand\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/0.svg?sanitize=true\"></a></p>\n\n## Table Of Contents\n\n- [Table Of Contents](#table-of-contents)\n- [API](#api)\n  * [Types](#types)\n    * [`_spawncommand.ChildProcessWithPromise`](#type-_spawncommandchildprocesswithpromise)\n    * [`_spawncommand.PromiseResult`](#type-_spawncommandpromiseresult)\n  * [`spawn(module: string, args: string[], options?: SpawnOptions): ChildProcessWithPromise`](#spawnmodule-stringargs-stringoptions-spawnoptions-childprocesswithpromise)\n  * [`fork(module: string, args: string[], options?: ForkOptions): ChildProcessWithPromise`](#forkmodule-stringargs-stringoptions-forkoptions-childprocesswithpromise)\n- [Copyright](#copyright)\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/1.svg?sanitize=true\"></a></p>\n\n## API\n\n_SpawnCommand_ can be used by importing the default `spawn` and named `fork` exports.\n\n```js\nimport spawn, { fork } from 'spawncommand'\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/2.svg?sanitize=true\" width=\"15\"></a></p>\n\n### Types\n\nThe package's main type is _ChildProcessWithPromise_ which enriches the standard _ChildProcess_ with a `promise` property.\n\n[`import('child_process').ChildProcess`](https://nodejs.org/api/child_process.html#child_process_class_childprocess) __<a name=\"type-child_processchildprocess\">`child_process.ChildProcess`</a>__\n\n__<a name=\"type-_spawncommandchildprocesswithpromise\">`_spawncommand.ChildProcessWithPromise`</a>__: A child process with an extra `promise` property.\n\n|       Name        |                         Type                          |                Description                 |\n| ----------------- | ----------------------------------------------------- | ------------------------------------------ |\n| __promise*__      | <em>!Promise&lt;!_spawncommand.PromiseResult&gt;</em> | A promise resolved when the process exits. |\n| __spawnCommand*__ | <em>string</em>                                       | The spawn arguments joined by whitespace.  |\n\n__<a name=\"type-_spawncommandpromiseresult\">`_spawncommand.PromiseResult`</a>__\n\n|    Name     |      Type       |                  Description                   |\n| ----------- | --------------- | ---------------------------------------------- |\n| __stdout*__ | <em>string</em> | The accumulated result of the `stdout` stream. |\n| __stderr*__ | <em>string</em> | The accumulated result of the `stderr` stream. |\n| __code*__   | <em>number</em> | The code with which the process exited.        |\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/3.svg?sanitize=true\" width=\"15\"></a></p>\n\n### `spawn(`<br/>&nbsp;&nbsp;`module: string,`<br/>&nbsp;&nbsp;`args: string[],`<br/>&nbsp;&nbsp;`options?: SpawnOptions,`<br/>`): ChildProcessWithPromise`\n\nSpawns a command and returns a _ChildProcess_ instance with the `promise` property resolved on exit. The promise will be rejected if an error was encountered when trying to spawn the process.\n\n`import('child_process').SpawnOptions` __<a name=\"type-child_processspawnoptions\">`child_process.SpawnOptions`</a>__\n\n```js\nimport spawn from 'spawncommand'\n\n(async () => {\n  const { promise } = spawn('echo', ['hello world'])\n  const { stderr, stdout, code } =  await promise\n  console.log(JSON.stringify({\n    stderr, stdout, code,\n  }, null, 2))\n})()\n```\n```json5\n{\n  \"stderr\": \"\",\n  \"stdout\": \"hello world\\n\",\n  \"code\": 0\n}\n```\n\nThe returned object is a `ChildProcess` and all of its properties can be accessed in the standard way.\n\n```js\nimport spawnCommand from 'spawncommand'\n\n(async () => {\n  const { stdout, promise } = spawnCommand('echo', ['hello world'])\n\n  stdout.pipe(process.stdout)\n  await promise\n})()\n```\n```\nhello world\n```\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/4.svg?sanitize=true\" width=\"15\"></a></p>\n\n### `fork(`<br/>&nbsp;&nbsp;`module: string,`<br/>&nbsp;&nbsp;`args: string[],`<br/>&nbsp;&nbsp;`options?: ForkOptions,`<br/>`): ChildProcessWithPromise`\n\nForks a Node.js module and adds a `promise` property to the returned _ChildProcess_.\n\n`import('child_process').ForkOptions` __<a name=\"type-child_processforkoptions\">`child_process.ForkOptions`</a>__\n\n```js\nimport { fork } from 'spawncommand'\n\n(async () => {\n  const { promise } = fork('node_modules/.bin/alanode',\n    ['example/spawn.js'], {\n      stdio: 'pipe',\n    })\n  const { stdout } =  await promise\n  console.log(stdout)\n})()\n```\n```json5\n{\n  \"stderr\": \"\",\n  \"stdout\": \"hello world\\n\",\n  \"code\": 0\n}\n```\n\nThe `pipe` option needs to be set in order to gather the output of the `stderr` and `stdout` streams (or an array for older versions of Node.js when [this does not work][2]).\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/5.svg?sanitize=true\"></a></p>\n\n## Copyright\n\n<table>\n  <tr>\n    <th>\n      <a href=\"https://artd.eco\">\n        <img src=\"https://raw.githubusercontent.com/wrote/wrote/master/images/artdeco.png\" alt=\"Art Deco\" />\n      </a>\n    </th>\n    <th>© <a href=\"https://artd.eco\">Art Deco</a>   2019</th>\n    <th>\n      <a href=\"https://www.technation.sucks\" title=\"Tech Nation Visa\">\n        <img src=\"https://raw.githubusercontent.com/artdecoweb/www.technation.sucks/master/anim.gif\"\n          alt=\"Tech Nation Visa\" />\n      </a>\n    </th>\n    <th><a href=\"https://www.technation.sucks\">Tech Nation Visa Sucks</a></th>\n  </tr>\n</table>\n\n[2]: https://github.com/nodejs/node/pull/10866\n\n<p align=\"center\"><a href=\"#table-of-contents\"><img src=\".documentary/section-breaks/-1.svg?sanitize=true\"></a></p>","_attachments":{},"homepage":"https://github.com/artdecocode/spawncommand#readme","bugs":{"url":"https://github.com/artdecocode/spawncommand/issues"},"license":"MIT"}