|
|
@ -3,8 +3,8 @@
|
|
|
|
const Promise = require("bluebird");
|
|
|
|
const Promise = require("bluebird");
|
|
|
|
const propagateAbort = require("@ppstreams/propagate-abort");
|
|
|
|
const propagateAbort = require("@ppstreams/propagate-abort");
|
|
|
|
const propagatePeek = require("@ppstreams/propagate-peek");
|
|
|
|
const propagatePeek = require("@ppstreams/propagate-peek");
|
|
|
|
const { isEndOfStream } = require("@ppstreams/end-of-stream-marker");
|
|
|
|
const isEndOfStream = require("@ppstreams/is-end-of-stream");
|
|
|
|
const { isAborted } = require("@ppstreams/aborted-marker");
|
|
|
|
const isAborted = require("@ppstreams/is-aborted");
|
|
|
|
|
|
|
|
|
|
|
|
const { validateOptions } = require("@validatem/core");
|
|
|
|
const { validateOptions } = require("@validatem/core");
|
|
|
|
const required = require("@validatem/required");
|
|
|
|
const required = require("@validatem/required");
|
|
|
@ -47,6 +47,11 @@ module.exports = function simpleSinkStream(_options) {
|
|
|
|
}).then((result) => {
|
|
|
|
}).then((result) => {
|
|
|
|
lastResult = result;
|
|
|
|
lastResult = result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return attemptRead();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Promise.try(() => {
|
|
|
|
return attemptRead();
|
|
|
|
return attemptRead();
|
|
|
|
}).catch(isEndOfStream, () => {
|
|
|
|
}).catch(isEndOfStream, () => {
|
|
|
|
/* Don't attempt to do another read, we're done. */
|
|
|
|
/* Don't attempt to do another read, we're done. */
|
|
|
@ -98,8 +103,5 @@ module.exports = function simpleSinkStream(_options) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return attemptRead();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|