stream-to-pull-stream
Advanced tools
Comparing version 1.6.3 to 1.6.4
13
index.js
@@ -25,5 +25,10 @@ var pull = require('pull-core') | ||
} | ||
stream.on('drain', function () { | ||
console.error('DRAIN') | ||
}) | ||
function onClose () { | ||
if(closed) return | ||
closed = true | ||
console.error('close') | ||
cleanup() | ||
@@ -48,4 +53,10 @@ if(!ended) read(ended = true, done) | ||
ended = ended || end | ||
//you can't "end" a stdout stream, so this needs to be handled specially. | ||
//I noticed a problem streaming to the terminal: | ||
//sometimes the end got cut off, creating invalid output. | ||
//it seems that stdout always emits "drain" when it ends. | ||
//so this seems to work, but i have been unable to reproduce this test | ||
//automatically, so you need to run ./test/stdout.js a few times and the end is valid json. | ||
if(end === true) | ||
return stream._isStdio ? done() : stream.end() | ||
return stream._isStdio ? stream.once('drain', done) : stream.end() | ||
@@ -52,0 +63,0 @@ if(ended = ended || end) { |
{ | ||
"name": "stream-to-pull-stream", | ||
"description": "convert a stream1 or streams2 stream into a pull-stream", | ||
"version": "1.6.3", | ||
"version": "1.6.4", | ||
"homepage": "https://github.com/dominictarr/stream-to-pull-stream", | ||
@@ -6,0 +6,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
156530
16
421
2