{"_id":"git-spawned-stream","_rev":"440093","name":"git-spawned-stream","description":"Create a readable stream from a spawned git process.","dist-tags":{"latest":"1.0.1"},"maintainers":[{"name":"alessioalex","email":"alexandru.vladutu@gmail.com"}],"time":{"modified":"2021-08-05T06:31:56.000Z","created":"2014-05-25T10:31:55.900Z","1.0.1":"2018-10-12T10:00:28.003Z","1.0.0":"2017-05-02T08:25:02.936Z","0.1.1":"2015-10-30T12:31:03.927Z","0.1.0":"2014-05-25T10:31:55.900Z"},"users":{"dypsilon":true},"author":{"name":"Alexandru Vladutu","email":"alexandru.vladutu@gmail.com","url":"http://careers.stackoverflow.com/alessioalex"},"repository":{"type":"git","url":"git+https://github.com/alessioalex/git-spawned-stream.git"},"versions":{"1.0.1":{"name":"git-spawned-stream","version":"1.0.1","description":"Create a readable stream from a spawned git process.","main":"index.js","dependencies":{"debug":"^4.1.0","spawn-to-readstream":"~0.1.3"},"devDependencies":{"mocha":"^5.2.0","proxyquire":"~1.0.0","should":"~3.3.2"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/alessioalex/git-spawned-stream.git"},"keywords":["spawned","git","stream"],"author":{"name":"Alexandru Vladutu","email":"alexandru.vladutu@gmail.com","url":"http://careers.stackoverflow.com/alessioalex"},"license":"MIT","bugs":{"url":"https://github.com/alessioalex/git-spawned-stream/issues"},"homepage":"https://github.com/alessioalex/git-spawned-stream","gitHead":"97f1d37151a253296f5b1595a0a9044ba4ae9383","_id":"git-spawned-stream@1.0.1","_npmVersion":"5.5.1","_nodeVersion":"8.9.2","_npmUser":{"name":"alessioalex","email":"npm@services.alessioalex.com"},"dist":{"shasum":"841cda93d106eeb2c71a3c1af44ec484b440248b","size":1726,"noattachment":false,"key":"/git-spawned-stream/-/git-spawned-stream-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-spawned-stream/download/git-spawned-stream-1.0.1.tgz"},"maintainers":[{"name":"alessioalex","email":"alexandru.vladutu@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/git-spawned-stream_1.0.1_1539338427845_0.5678771909935845"},"_hasShrinkwrap":false,"publish_time":1539338428003,"_cnpm_publish_time":1539338428003},"1.0.0":{"name":"git-spawned-stream","version":"1.0.0","description":"Create a readable stream from a spawned git process.","main":"index.js","dependencies":{"spawn-to-readstream":"~0.1.3","debug":"~0.8.1"},"devDependencies":{"mocha":"~1.19.0","proxyquire":"~1.0.0","should":"~3.3.2"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/alessioalex/git-spawned-stream.git"},"keywords":["spawned","git","stream"],"author":{"name":"Alexandru Vladutu","email":"alexandru.vladutu@gmail.com","url":"http://careers.stackoverflow.com/alessioalex"},"license":"MIT","bugs":{"url":"https://github.com/alessioalex/git-spawned-stream/issues"},"homepage":"https://github.com/alessioalex/git-spawned-stream","gitHead":"169682d98fc1668772200ac0458ab830f92bcb03","_id":"git-spawned-stream@1.0.0","_shasum":"abffaf1dab1bf2a612926d5fed1c9f35ef4e3111","_from":".","_npmVersion":"4.0.5","_nodeVersion":"6.9.4","_npmUser":{"name":"alessioalex","email":"npm@services.alessioalex.com"},"dist":{"shasum":"abffaf1dab1bf2a612926d5fed1c9f35ef4e3111","size":1774,"noattachment":false,"key":"/git-spawned-stream/-/git-spawned-stream-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-spawned-stream/download/git-spawned-stream-1.0.0.tgz"},"maintainers":[{"name":"alessioalex","email":"alexandru.vladutu@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/git-spawned-stream-1.0.0.tgz_1493713502304_0.22975589684210718"},"directories":{},"publish_time":1493713502936,"_hasShrinkwrap":false,"_cnpm_publish_time":1493713502936},"0.1.1":{"name":"git-spawned-stream","version":"0.1.1","description":"Create a readable stream from a spawned git process.","main":"index.js","dependencies":{"spawn-to-readstream":"~0.1.3","debug":"~0.8.1"},"devDependencies":{"mocha":"~1.19.0","proxyquire":"~1.0.0","should":"~3.3.2"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/alessioalex/git-spawned-stream.git"},"keywords":["spawned","git","stream"],"author":{"name":"Alexandru Vladutu","email":"alexandru.vladutu@gmail.com","url":"http://careers.stackoverflow.com/alessioalex"},"license":"MIT","bugs":{"url":"https://github.com/alessioalex/git-spawned-stream/issues"},"homepage":"https://github.com/alessioalex/git-spawned-stream","gitHead":"c8bdd61ab3c9f086b4f29ddc49d2c06ee80a068d","_id":"git-spawned-stream@0.1.1","_shasum":"38927da02e52d862396861bf996557452643802b","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.1","_npmUser":{"name":"alessioalex","email":"alexandru.vladutu@gmail.com"},"dist":{"shasum":"38927da02e52d862396861bf996557452643802b","size":1604,"noattachment":false,"key":"/git-spawned-stream/-/git-spawned-stream-0.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-spawned-stream/download/git-spawned-stream-0.1.1.tgz"},"maintainers":[{"name":"alessioalex","email":"alexandru.vladutu@gmail.com"}],"directories":{},"publish_time":1446208263927,"_cnpm_publish_time":1446208263927,"_hasShrinkwrap":false},"0.1.0":{"name":"git-spawned-stream","version":"0.1.0","description":"Create a readable stream from a spawned git process.","main":"index.js","dependencies":{"spawn-to-readstream":"~0.1.3","debug":"~0.8.1"},"devDependencies":{"mocha":"~1.19.0","proxyquire":"~1.0.0","should":"~3.3.2"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"https://github.com/alessioalex/git-spawned-stream"},"keywords":["spawned","git","stream"],"author":{"name":"Alexandru Vladutu","email":"alexandru.vladutu@gmail.com","url":"http://careers.stackoverflow.com/alessioalex"},"license":"MIT","bugs":{"url":"https://github.com/alessioalex/spawned-git-stream/issues"},"homepage":"https://github.com/alessioalex/spawned-git-stream","_id":"git-spawned-stream@0.1.0","dist":{"shasum":"b02d2a7b408e74fbdf53690453201122f09c0642","size":1646,"noattachment":false,"key":"/git-spawned-stream/-/git-spawned-stream-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/git-spawned-stream/download/git-spawned-stream-0.1.0.tgz"},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"alessioalex","email":"alexandru.vladutu@gmail.com"},"maintainers":[{"name":"alessioalex","email":"alexandru.vladutu@gmail.com"}],"directories":{},"publish_time":1401013915900,"_cnpm_publish_time":1401013915900,"_hasShrinkwrap":false}},"readme":"# git-spawned-stream\n\nCreate a readable stream from a spawned git process.\n\n## Usage\n\n```js\ngitSpawnedStream(repoPath, spawnArguments, limitInBytes, gitBinary)\n```\n\nArguments:\n\n- `repoPath` - the path to the repo, ex: /home/alex/node/.git (or the path to the git bare repo)\n- `spawnArguments` - the arguments that will be passed to the `child_process.spawn` function\n- `limitInBytes` - kill the process if it exceeds the imposed limit (sends more data than allowed)\n- `gitBinary` - path to the git binary to use (use the one in `PATH` by default)\n\nExample:\n\n```js\nvar gitSpawnedStream = require('git-spawned-stream');\nvar path = require('path');\nvar repoPath = process.env.REPO || path.join(__dirname, '.git');\nrepoPath = path.resolve(repoPath);\nvar byteLimit = 5 * 1024 * 1024; // 5 Mb\n\n// sort of a git log -n 2\nvar stream = gitSpawnedStream(repoPath, [\n  'rev-list',\n  '--max-count=2',\n  '--header',\n  'HEAD'\n], byteLimit);\n\nstream.on('data', function(data) {\n  console.log('DATA', data.toString('utf8'));\n}).on('error', function(err) {\n  console.error('An error occurred:');\n  console.error('-----------------\\n');\n  console.error(err.message);\n  process.exit(1);\n}).on('end', function(killed) {\n  // when the stream is cut, killed === true\n  console.log(\"\\n±±±±±±±±±±±±±±±±±\\nThat's all folks!\");\n});\n```\n\n## License\n\nMIT\n","_attachments":{},"homepage":"https://github.com/alessioalex/git-spawned-stream","bugs":{"url":"https://github.com/alessioalex/git-spawned-stream/issues"},"license":"MIT"}