1 | ;
|
2 |
|
3 | let cli = require('heroku-cli-util');
|
4 |
|
5 | let Stream = function (url) {
|
6 | return new Promise(function (resolve, reject) {
|
7 | let stream = cli.got.stream(url);
|
8 | stream.on('error', reject);
|
9 | stream.on('end', resolve);
|
10 | let piped = stream.pipe(process.stdout);
|
11 | piped.on('error', reject);
|
12 | });
|
13 | };
|
14 |
|
15 | module.exports = {
|
16 | Stream
|
17 | }; |
\ | No newline at end of file |