teen_process
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -0,6 +1,6 @@ | ||
require('source-map-support').install(); | ||
'use strict'; | ||
var _Object$defineProperty = require('babel-runtime/core-js/object/define-property')['default']; | ||
_Object$defineProperty(exports, '__esModule', { | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
@@ -11,7 +11,5 @@ }); | ||
require('source-map-support').install(); | ||
exports.exec = _libTeen_process.exec; | ||
exports.spawn = _libTeen_process.spawn; | ||
exports.SubProcess = _libTeen_process.SubProcess; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OytCQUV3QyxvQkFBb0I7O0FBRjVELE9BQU8sQ0FBQyxvQkFBb0IsQ0FBQyxDQUFDLE9BQU8sRUFBRSxDQUFDOztRQUkvQixJQUFJLG9CQUZKLElBQUk7UUFFRSxLQUFLLG9CQUZMLEtBQUs7UUFFRSxVQUFVLG9CQUZWLFVBQVUiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyJyZXF1aXJlKCdzb3VyY2UtbWFwLXN1cHBvcnQnKS5pbnN0YWxsKCk7XG5cbmltcG9ydCB7IGV4ZWMsIHNwYXduLCBTdWJQcm9jZXNzIH0gZnJvbSAnLi9saWIvdGVlbl9wcm9jZXNzJztcblxuZXhwb3J0IHsgZXhlYywgc3Bhd24sIFN1YlByb2Nlc3MgfTtcblxuIl19 | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7OytCQUV3QyxvQkFBb0I7O1FBRW5ELElBQUk7UUFBRSxLQUFLO1FBQUUsVUFBVSIsImZpbGUiOiJpbmRleC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8vIHRyYW5zcGlsZTptYWluXG5cbmltcG9ydCB7IGV4ZWMsIHNwYXduLCBTdWJQcm9jZXNzIH0gZnJvbSAnLi9saWIvdGVlbl9wcm9jZXNzJztcblxuZXhwb3J0IHsgZXhlYywgc3Bhd24sIFN1YlByb2Nlc3MgfTtcblxuIl19 |
'use strict'; | ||
var _get = require('babel-runtime/helpers/get')['default']; | ||
var _inherits = require('babel-runtime/helpers/inherits')['default']; | ||
var _get = require('babel-runtime/helpers/get')['default']; | ||
var _createClass = require('babel-runtime/helpers/create-class')['default']; | ||
@@ -11,4 +11,2 @@ | ||
var _Object$defineProperty = require('babel-runtime/core-js/object/define-property')['default']; | ||
var _Object$assign = require('babel-runtime/core-js/object/assign')['default']; | ||
@@ -22,3 +20,3 @@ | ||
_Object$defineProperty(exports, '__esModule', { | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true | ||
@@ -42,7 +40,7 @@ }); | ||
function exec(cmd) { | ||
var args = arguments[1] === undefined ? [] : arguments[1]; | ||
var opts = arguments[2] === undefined ? {} : arguments[2]; | ||
var args = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; | ||
var opts = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
// get a quoted representation of the command for error strings | ||
var rep = _shellQuote.quote([cmd].concat(args)); | ||
var rep = (0, _shellQuote.quote)([cmd].concat(args)); | ||
@@ -64,5 +62,5 @@ // extend default options; we're basically re-implementing exec's options | ||
// the other 'spawn' options through the API | ||
var proc = _child_process.spawn(cmd, args, { cwd: opts.cwd, env: opts.env }); | ||
var stdout = '', | ||
stderr = '', | ||
var proc = (0, _child_process.spawn)(cmd, args, { cwd: opts.cwd, env: opts.env }); | ||
var stdout = "", | ||
stderr = "", | ||
timer = null; | ||
@@ -122,4 +120,6 @@ | ||
var SubProcess = (function (_EventEmitter) { | ||
_inherits(SubProcess, _EventEmitter); | ||
function SubProcess(cmd) { | ||
var args = arguments[1] === undefined ? [] : arguments[1]; | ||
var args = arguments.length <= 1 || arguments[1] === undefined ? [] : arguments[1]; | ||
@@ -129,5 +129,5 @@ _classCallCheck(this, SubProcess); | ||
_get(Object.getPrototypeOf(SubProcess.prototype), 'constructor', this).call(this); | ||
if (!cmd) throw new Error('Command is required'); | ||
if (typeof cmd !== 'string') throw new Error('Command must be a string'); | ||
if (!(args instanceof Array)) throw new Error('Args must be an array'); | ||
if (!cmd) throw new Error("Command is required"); | ||
if (typeof cmd !== "string") throw new Error("Command must be a string"); | ||
if (!(args instanceof Array)) throw new Error("Args must be an array"); | ||
this.cmd = cmd; | ||
@@ -138,3 +138,4 @@ this.args = args; | ||
_inherits(SubProcess, _EventEmitter); | ||
// spawn the subprocess and return control whenever we deem that it has fully | ||
// "started" | ||
@@ -144,4 +145,4 @@ _createClass(SubProcess, [{ | ||
value: function start() { | ||
var startDetector = arguments[0] === undefined ? null : arguments[0]; | ||
var timeoutMs = arguments[1] === undefined ? null : arguments[1]; | ||
var startDetector = arguments.length <= 0 || arguments[0] === undefined ? null : arguments[0]; | ||
var timeoutMs = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; | ||
var startDelay; | ||
@@ -155,3 +156,3 @@ return _regeneratorRuntime.async(function start$(context$2$0) { | ||
// the default start detector is that we get any output | ||
// the default start detector simply returns true when we get any output | ||
if (startDetector === null) { | ||
@@ -164,3 +165,3 @@ startDetector = function (stdout, stderr) { | ||
// if the user passes a number, then we simply delay a certain amount of | ||
// time before returning control | ||
// time before returning control, rather than waiting for a condition | ||
if (typeof startDetector === 'number') { | ||
@@ -171,11 +172,8 @@ startDelay = startDetector; | ||
// return a promise so we can wrap the async behavior | ||
return context$2$0.abrupt('return', new _Promise(function (resolve, reject) { | ||
if (typeof timeoutMs === 'number') { | ||
setTimeout(function () { | ||
reject(new Error('The process did not start in the allotted time ' + ('(' + timeoutMs + 'ms)'))); | ||
}, timeoutMs); | ||
} | ||
try { | ||
_this.proc = _child_process.spawn(_this.cmd, _this.args); | ||
// actually spawn the subproc | ||
_this.proc = (0, _child_process.spawn)(_this.cmd, _this.args); | ||
} catch (e) { | ||
@@ -186,5 +184,8 @@ reject(e); | ||
_this.proc.stderr.setEncoding('utf8'); | ||
_this.lastLinePortion = { stdout: '', stderr: '' }; | ||
_this.lastLinePortion = { stdout: "", stderr: "" }; | ||
// this function handles output that we collect from the subproc | ||
var handleOutput = function handleOutput(data) { | ||
// if we have a startDetector, run it on the output so we can resolve/ | ||
// reject and move on from start | ||
try { | ||
@@ -197,3 +198,10 @@ if (startDetector && startDetector(data.stdout, data.stderr)) { | ||
} | ||
// emit the actual output for whomever's listening | ||
_this.emit('output', data.stdout, data.stderr); | ||
// we also want to emit lines, but it's more complex since output | ||
// comes in chunks and a line could come in two different chunks, so | ||
// we have logic to handle that case (using this.lastLinePortion to | ||
// remember a line that started but did not finish in the last chunk) | ||
var _arr = ['stdout', 'stderr']; | ||
@@ -203,3 +211,3 @@ for (var _i = 0; _i < _arr.length; _i++) { | ||
if (!data[stream]) continue; | ||
var lines = data[stream].split('\n'); | ||
var lines = data[stream].split("\n"); | ||
if (lines.length > 1) { | ||
@@ -216,2 +224,3 @@ var retLines = lines.slice(0, -1); | ||
// if we get an error spawning the proc, reject and clean up the proc | ||
_this.proc.on('error', function (err) { | ||
@@ -223,10 +232,13 @@ _this.proc.removeAllListeners('exit'); | ||
_this.proc.stdout.pipe(_through2['default'](function (stdout) { | ||
_this.proc.stdout.pipe((0, _through2['default'])(function (stdout) { | ||
handleOutput({ stdout: stdout, stderr: '' }); | ||
})); | ||
_this.proc.stderr.pipe(_through2['default'](function (stderr) { | ||
_this.proc.stderr.pipe((0, _through2['default'])(function (stderr) { | ||
handleOutput({ stdout: '', stderr: stderr }); | ||
})); | ||
// when the proc exits, we might still have a buffer of lines we were | ||
// waiting on more chunks to complete. Go ahead and emit those, then | ||
// re-emit the exit so a listener can handle the possibly-unexpected exit | ||
_this.proc.on('exit', function (code, signal) { | ||
@@ -238,2 +250,4 @@ _this.handleLastLines(); | ||
// if the user hasn't given us a startDetector, instead just resolve | ||
// when startDelay ms have passed | ||
if (!startDetector) { | ||
@@ -244,2 +258,10 @@ setTimeout(function () { | ||
} | ||
// if the user has given us a timeout, start the clock for rejecting | ||
// the promise if we take too long to start | ||
if (typeof timeoutMs === "number") { | ||
setTimeout(function () { | ||
reject(new Error("The process did not start in the allotted time " + ('(' + timeoutMs + 'ms)'))); | ||
}, timeoutMs); | ||
} | ||
})); | ||
@@ -269,4 +291,4 @@ | ||
value: function stop() { | ||
var signal = arguments[0] === undefined ? 'SIGTERM' : arguments[0]; | ||
var timeout = arguments[1] === undefined ? 10000 : arguments[1]; | ||
var signal = arguments.length <= 0 || arguments[0] === undefined ? 'SIGTERM' : arguments[0]; | ||
var timeout = arguments.length <= 1 || arguments[1] === undefined ? 10000 : arguments[1]; | ||
return _regeneratorRuntime.async(function stop$(context$2$0) { | ||
@@ -282,5 +304,7 @@ var _this2 = this; | ||
throw new Error('Can\'t stop process; it\'s not currently running'); | ||
throw new Error("Can't stop process; it's not currently running"); | ||
case 2: | ||
// make sure to emit any data in our lines buffer whenever we're done with | ||
// the proc | ||
this.handleLastLines(); | ||
@@ -309,2 +333,2 @@ return context$2$0.abrupt('return', new _Promise(function (resolve, reject) { | ||
exports.SubProcess = SubProcess; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxpYi90ZWVuX3Byb2Nlc3MuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzZCQUFzQixlQUFlOzswQkFDZixhQUFhOztzQkFDaEIsUUFBUTs7Ozt1QkFDUCxTQUFTOzs7O0lBQ3JCLFlBQVksdUJBQVosWUFBWTs7QUFFcEIsU0FBUyxJQUFJLENBQUUsR0FBRyxFQUF3QjtNQUF0QixJQUFJLGdDQUFHLEVBQUU7TUFBRSxJQUFJLGdDQUFHLEVBQUU7OztBQUV0QyxNQUFJLEdBQUcsR0FBRyxZQV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uc3RkZXJyKTtcbiAgICAgICAgZm9yIChsZXQgc3RyZWFtIG9mIFsnc3Rkb3V0JywgJ3N0ZGVyciddKSB7XG4gICAgICAgICAgaWYgKCFkYXRhW3N0cmVhbV0pIGNvbnRpbnVlO1xuICAgICAgICAgIGxldCBsaW5lcyA9IGRhdGFbc3RyZWFtXS5zcGxpdChcIlxcblwiKTtcbiAgICAgICAgICBpZiAobGluZXMubGVuZ3RoID4gMSkge1xuICAgICAgICAgICAgbGV0IHJldExpbmVzID0gbGluZXMuc2xpY2UoMCwgLTEpO1xuICAgICAgICAgICAgcmV0TGluZXNbMF0gPSB0aGlzLmxhc3RMaW5lUG9ydGlvbltzdHJlYW1dICsgcmV0TGluZXNbMF07XG4gICAgICAgICAgICB0aGlzLmxhc3RMaW5lUG9ydGlvbltzdHJlYW1dID0gbGluZXNbbGluZXMubGVuZ3RoIC0gMV07XG4gICAgICAgICAgICB0aGlzLmVtaXQoYGxpbmVzLSR7c3RyZWFtfWAsIHJldExpbmVzKTtcbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5sYXN0TGluZVBvcnRpb25bc3RyZWFtXSArPSBsaW5lc1swXTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH07XG5cbiAgICAgIHRoaXMucHJvYy5vbignZXJyb3InLCBlcnIgPT4ge1xuICAgICAgICB0aGlzLnByb2MucmVtb3ZlQWxsTGlzdGVuZXJzKCdleGl0Jyk7XG4gICAgICAgIHRoaXMucHJvYy5raWxsKCdTSUdJTlQnKTtcbiAgICAgICAgcmVqZWN0KGVycik7XG4gICAgICB9KTtcblxuICAgICAgdGhpcy5wcm9jLnN0ZG91dC5waXBlKHRocm91Z2goc3Rkb3V0ID0+IHtcbiAgICAgICAgaGFuZGxlT3V0cHV0KHtzdGRvdXQsIHN0ZGVycjogJyd9KTtcbiAgICAgIH0pKTtcblxuICAgICAgdGhpcy5wcm9jLnN0ZGVyci5waXBlKHRocm91Z2goc3RkZX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0ke3N0cmVhbX1gLCBbdGhpcy5sYXN0TGluZVBvcnRpb25bc3RyZWFtXV0pO1xuICAgICAgICB0aGlzLmxhc3RMaW5lUG9ydGlvbltzdHJlYW1dID0gJyc7XG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgYXN5bmMgc3RvcCAoc2lnbmFsID0gJ1NJR1RFUk0nLCB0aW1lb3V0ID0gMTAwMDApIHtcbiAgICBpZiAoIXRoaXMucHJvYykge1xuICAgICAgdGhyb3cgbmV3IEVycm9yKFwiQ2FuJ3Qgc3RvcCBwcm9jZXNzOyBpdCdzIG5vdCBjdXJyZW50bHkgcnVubmluZ1wiKTtcbiAgICB9XG4gICAgLy8gbWFrZSBzdXJlIHRvIGVtaXQgYW55IGRhdGEgaW4gb3VyIGxpbmVzIGJ1ZmZlciB3aGVuZXZlciB3ZSdyZSBkb25lIHdpdGhcbiAgICAvLyB0aGUgcHJvY1xuICAgIHRoaXMuaGFuZGxlTGFzdExpbmVzKCk7XG4gICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHtcbiAgICAgIHRoaXMucHJvYy5vbignY2xvc2UnLCByZXNvbHZlKTtcbiAgICAgIHRoaXMucHJvYy5raWxsKHNpZ25hbCk7XG4gICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgcmVqZWN0KG5ldyBFcnJvcihgUHJvY2VzcyBkaWRuJ3QgZW5kIGFmdGVyICR7dGltZW91dH1tc2ApKTtcbiAgICAgIH0sIHRpbWVvdXQpO1xuICAgIH0pO1xuICB9XG59XG5cbmV4cG9ydCB7IGV4ZWMsIHNwYXduLCBTdWJQcm9jZXNzIH07XG4iXX0= |
@@ -0,1 +1,3 @@ | ||
require('source-map-support').install(); | ||
'use strict'; | ||
@@ -27,4 +29,2 @@ | ||
require('source-map-support').install(); | ||
var should = _chai2['default'].should(); | ||
@@ -43,3 +43,3 @@ _chai2['default'].use(_chaiAsPromised2['default']); | ||
context$2$0.next = 4; | ||
return _.exec(cmd, args); | ||
return _regeneratorRuntime.awrap((0, _.exec)(cmd, args)); | ||
@@ -52,4 +52,4 @@ case 4: | ||
stdout.should.contain('exec-specs.js'); | ||
stderr.should.equal(''); | ||
stdout.should.contain("exec-specs.js"); | ||
stderr.should.equal(""); | ||
code.should.equal(0); | ||
@@ -64,12 +64,12 @@ | ||
it('should throw an error with a bad exit code', function callee$1$1() { | ||
it('should throw an error with a bad exit code', function callee$1$0() { | ||
var cmd, err; | ||
return _regeneratorRuntime.async(function callee$1$1$(context$2$0) { | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
cmd = _helpers.getFixture('bad_exit.sh'); | ||
cmd = (0, _helpers.getFixture)("bad_exit.sh"); | ||
err = undefined; | ||
context$2$0.prev = 2; | ||
context$2$0.next = 5; | ||
return _.exec(cmd); | ||
return _regeneratorRuntime.awrap((0, _.exec)(cmd)); | ||
@@ -88,4 +88,4 @@ case 5: | ||
should.exist(err); | ||
err.stdout.trim().should.equal('foo'); | ||
err.stderr.trim().should.equal('bar'); | ||
err.stdout.trim().should.equal("foo"); | ||
err.stderr.trim().should.equal("bar"); | ||
err.code.should.equal(1); | ||
@@ -100,13 +100,13 @@ | ||
it('should work with spaces in arguments', function callee$1$2() { | ||
it('should work with spaces in arguments', function callee$1$0() { | ||
var cmd, echo1, echo2, _ref2, stdout, stderr, code; | ||
return _regeneratorRuntime.async(function callee$1$2$(context$2$0) { | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
cmd = _helpers.getFixture('echo.sh'); | ||
echo1 = 'my name is bob'; | ||
echo2 = 'lol'; | ||
cmd = (0, _helpers.getFixture)("echo.sh"); | ||
echo1 = "my name is bob"; | ||
echo2 = "lol"; | ||
context$2$0.next = 5; | ||
return _.exec(cmd, [echo1, echo2]); | ||
return _regeneratorRuntime.awrap((0, _.exec)(cmd, [echo1, echo2])); | ||
@@ -130,13 +130,13 @@ case 5: | ||
it('should work with backslashes in arguments', function callee$1$3() { | ||
it('should work with backslashes in arguments', function callee$1$0() { | ||
var cmd, echo1, echo2, _ref3, stdout, stderr, code; | ||
return _regeneratorRuntime.async(function callee$1$3$(context$2$0) { | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
cmd = _helpers.getFixture('echo.sh'); | ||
echo1 = 'my\\ name\\ is\\ bob'; | ||
echo2 = 'lol'; | ||
cmd = (0, _helpers.getFixture)("echo.sh"); | ||
echo1 = "my\\ name\\ is\\ bob"; | ||
echo2 = "lol"; | ||
context$2$0.next = 5; | ||
return _.exec(cmd, [echo1, echo2]); | ||
return _regeneratorRuntime.awrap((0, _.exec)(cmd, [echo1, echo2])); | ||
@@ -160,13 +160,13 @@ case 5: | ||
it('should work with spaces in commands', function callee$1$4() { | ||
it('should work with spaces in commands', function callee$1$0() { | ||
var cmd, echo1, echo2, _ref4, stdout, stderr, code; | ||
return _regeneratorRuntime.async(function callee$1$4$(context$2$0) { | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
cmd = _helpers.getFixture('echo with space.sh'); | ||
echo1 = 'my name is bob'; | ||
echo2 = 'lol'; | ||
cmd = (0, _helpers.getFixture)("echo with space.sh"); | ||
echo1 = "my name is bob"; | ||
echo2 = "lol"; | ||
context$2$0.next = 5; | ||
return _.exec(cmd, [echo1, echo2]); | ||
return _regeneratorRuntime.awrap((0, _.exec)(cmd, [echo1, echo2])); | ||
@@ -190,14 +190,14 @@ case 5: | ||
it('should respect cwd', function callee$1$5() { | ||
it('should respect cwd', function callee$1$0() { | ||
var cmd, echo1, echo2, cwd, _ref5, stdout, stderr, code; | ||
return _regeneratorRuntime.async(function callee$1$5$(context$2$0) { | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
cmd = './echo.sh'; | ||
echo1 = 'my name is bob'; | ||
echo2 = 'lol'; | ||
cwd = _path2['default'].dirname(_helpers.getFixture('echo.sh')); | ||
cmd = "./echo.sh"; | ||
echo1 = "my name is bob"; | ||
echo2 = "lol"; | ||
cwd = _path2['default'].dirname((0, _helpers.getFixture)("echo.sh")); | ||
context$2$0.next = 6; | ||
return _.exec(cmd, [echo1, echo2], { cwd: cwd }); | ||
return _regeneratorRuntime.awrap((0, _.exec)(cmd, [echo1, echo2], { cwd: cwd })); | ||
@@ -221,12 +221,12 @@ case 6: | ||
it('should respect env', function callee$1$6() { | ||
it('should respect env', function callee$1$0() { | ||
var cmd, env, _ref6, stdout, code; | ||
return _regeneratorRuntime.async(function callee$1$6$(context$2$0) { | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
cmd = _helpers.getFixture('env.sh'); | ||
env = { FOO: 'lolol' }; | ||
cmd = (0, _helpers.getFixture)("env.sh"); | ||
env = { FOO: "lolol" }; | ||
context$2$0.next = 4; | ||
return _.exec(cmd, [], { env: env }); | ||
return _regeneratorRuntime.awrap((0, _.exec)(cmd, [], { env: env })); | ||
@@ -238,3 +238,3 @@ case 4: | ||
stdout.trim().should.equal('' + env.FOO + ' ' + env.FOO); | ||
stdout.trim().should.equal(env.FOO + ' ' + env.FOO); | ||
code.should.equal(0); | ||
@@ -249,13 +249,13 @@ | ||
it('should allow a timeout parameter', function callee$1$7() { | ||
it('should allow a timeout parameter', function callee$1$0() { | ||
var cmd, args, err; | ||
return _regeneratorRuntime.async(function callee$1$7$(context$2$0) { | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
cmd = 'sleep'; | ||
args = ['10']; | ||
cmd = "sleep"; | ||
args = ["10"]; | ||
err = undefined; | ||
context$2$0.prev = 3; | ||
context$2$0.next = 6; | ||
return _.exec(cmd, args, { timeout: 500 }); | ||
return _regeneratorRuntime.awrap((0, _.exec)(cmd, args, { timeout: 500 })); | ||
@@ -268,9 +268,9 @@ case 6: | ||
context$2$0.prev = 8; | ||
context$2$0.t1 = context$2$0['catch'](3); | ||
context$2$0.t0 = context$2$0['catch'](3); | ||
err = context$2$0.t1; | ||
err = context$2$0.t0; | ||
case 11: | ||
should.exist(err); | ||
err.message.should.contain('timed out'); | ||
err.message.should.contain("timed out"); | ||
err.message.should.contain(cmd); | ||
@@ -285,10 +285,10 @@ | ||
it('should allow large amounts of output', function callee$1$8() { | ||
it('should allow large amounts of output', function callee$1$0() { | ||
var _ref7, stdout; | ||
return _regeneratorRuntime.async(function callee$1$8$(context$2$0) { | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
context$2$0.next = 2; | ||
return _.exec(_helpers.getFixture('bigbuffer.js')); | ||
return _regeneratorRuntime.awrap((0, _.exec)((0, _helpers.getFixture)("bigbuffer.js"))); | ||
@@ -308,12 +308,12 @@ case 2: | ||
it('should ignore output if requested', function callee$1$9() { | ||
it('should ignore output if requested', function callee$1$0() { | ||
var cmd, echo1, _ref8, stdout, code; | ||
return _regeneratorRuntime.async(function callee$1$9$(context$2$0) { | ||
return _regeneratorRuntime.async(function callee$1$0$(context$2$0) { | ||
while (1) switch (context$2$0.prev = context$2$0.next) { | ||
case 0: | ||
cmd = _helpers.getFixture('echo.sh'); | ||
echo1 = 'my name is bob'; | ||
cmd = (0, _helpers.getFixture)("echo.sh"); | ||
echo1 = "my name is bob"; | ||
context$2$0.next = 4; | ||
return _.exec(cmd, [echo1], { ignoreOutput: true }); | ||
return _regeneratorRuntime.awrap((0, _.exec)(cmd, [echo1], { ignoreOutput: true })); | ||
@@ -325,3 +325,3 @@ case 4: | ||
stdout.should.equal(''); |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O1xuICAgIGxldCBhcmdzID0gW1wiMTBcIl07XG4gICAgbGV0IGVycjtcbiAgICB0cnkge1xuICAgICAgYXdhaXQgZXhlYyhjbWQsIGFyZ3MsIHt0aW1lb3V0OiA1MDB9KTtcbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICBlcnIgPSBlO1xuICAgIH1cbiAgICBzaG91bGQuZXhpc3QoZXJyKTtcbiAgICBlcnIubWVzc2FnZS5zaG91bGQuY29udGFpbihcInRpbWVkIG91dFwiKTtcbiAgICBlcnIubWVzc2FnZS5zaG91bGQuY29udGFpbihjbWQpO1xuICB9KTtcblxuICBpdCgnc2hvdWxkIGFsbG93IGxhcmdlIGFtb3VudHMgb2Ygb3V0cHV0JywgYXN5bmMgKCkgPT4ge1xuICAgIGxldCB7c3Rkb3V0fSA9IGF3YWl0IGV4ZWMoZ2V0Rml4dHVyZShcImJpZ2J1ZmZlci5qc1wiKSk7XG4gICAgc3Rkb3V0Lmxlbmd0aC5zaG91bGQuYmUuYWJvdmUoNTEyICogMTAyNCk7XG4gIH0pO1xuXG4gIGl0KCdzaG91bGQgaWdub3JlIG91dHB1dCBpZiByZXF1ZXN0ZWQnLCBhc3luYyAoKSA9PiB7XG4gICAgbGV0IGNtZCA9IGdldEZpeHR1cmUoXCJlY2hvLnNoXCIpO1xuICAgIGxldCBlY2hvMSA9IFwibXkgbmFtZSBpcyBib2JcIjtcbiAgICBsZXQge3N0ZG91dCwgY29kZX0gPSBhd2FpdCBleGVjKGNtZCwgW2VjaG8xXSwge2lnbm9yZU91dHB1dDogdHJ1ZX0pO1xuICAgIHN0ZG91dC5zaG91bGQuZXF1YWwoXCJcIik7XG4gICAgY29kZS5zaG91bGQuZXF1YWwoMCk7XG4gIH0pO1xufSk7XG5cbiJdfQ== |
"use strict"; | ||
var _Object$defineProperty = require("babel-runtime/core-js/object/define-property")["default"]; | ||
var _interopRequireDefault = require("babel-runtime/helpers/interop-require-default")["default"]; | ||
_Object$defineProperty(exports, "__esModule", { | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _path = require("path"); | ||
var _path = require('path'); | ||
@@ -20,2 +18,2 @@ var _path2 = _interopRequireDefault(_path); | ||
exports.getFixture = getFixture; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvaGVscGVycy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O29CQUFpQixNQUFNOzs7O0FBRXZCLFNBQVMsVUFBVSxDQUFFLEdBQUcsRUFBRTtBQUN4QixTQUFPLGtCQUFLLE9BQU8sQ0FBQyxTQUFTLEVBQUUsSUFBSSxFQUFFLElBQUksRUFBRSxNQUFNLEVBQUUsVUFBVSxFQUFFLEdBQUcsQ0FBQyxDQUFDO0NBQ3JFOztRQUVRLFVBQVUsR0FBVixVQUFVIiwiZmlsZSI6InRlc3QvaGVscGVycy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBwYXRoIGZyb20gJ3BhdGgnO1xuXG5mdW5jdGlvbiBnZXRGaXh0dXJlIChmaXgpIHtcbiAgcmV0dXJuIHBhdGgucmVzb2x2ZShfX2Rpcm5hbWUsIFwiLi5cIiwgXCIuLlwiLCBcInRlc3RcIiwgXCJmaXh0dXJlc1wiLCBmaXgpO1xufVxuXG5leHBvcnQgeyBnZXRGaXh0dXJlIH07XG5cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QvaGVscGVycy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7OztvQkFBaUIsTUFBTTs7OztBQUV2QixTQUFTLFVBQVUsQ0FBRSxHQUFHLEVBQUU7QUFDeEIsU0FBTyxrQkFBSyxPQUFPLENBQUMsU0FBUyxFQUFFLElBQUksRUFBRSxJQUFJLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxHQUFHLENBQUMsQ0FBQztDQUNyRTs7UUFFUSxVQUFVLEdBQVYsVUFBVSIsImZpbGUiOiJ0ZXN0L2hlbHBlcnMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGF0aCBmcm9tICdwYXRoJztcblxuZnVuY3Rpb24gZ2V0Rml4dHVyZSAoZml4KSB7XG4gIHJldHVybiBwYXRoLnJlc29sdmUoX19kaXJuYW1lLCBcIi4uXCIsIFwiLi5cIiwgXCJ0ZXN0XCIsIFwiZml4dHVyZXNcIiwgZml4KTtcbn1cblxuZXhwb3J0IHsgZ2V0Rml4dHVyZSB9O1xuXG4iXX0= |
@@ -0,7 +1,9 @@ | ||
require('source-map-support').install(); | ||
'use strict'; | ||
var _regeneratorRuntime = require('babel-runtime/regenerator')['default']; | ||
var _Promise = require('babel-runtime/core-js/promise')['default']; | ||
var _regeneratorRuntime = require('babel-runtime/regenerator')['default']; | ||
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default']; | ||
@@ -33,4 +35,2 @@ | ||
require('source-map-support').install(); | ||
var should = _chai2['default'].should(); | ||
@@ -77,3 +77,3 @@ _chai2['default'].use(_chaiAsPromised2['default']); | ||
context$3$0.next = 3; | ||
return s.start().should.eventually.be.rejectedWith(/ENOENT/); | ||
return _regeneratorRuntime.awrap(s.start().should.eventually.be.rejectedWith(/ENOENT/)); | ||
@@ -86,5 +86,5 @@ case 3: | ||
}); | ||
it('should have a default startDetector of waiting for output', function callee$2$1() { | ||
it('should have a default startDetector of waiting for output', function callee$2$0() { | ||
var hasData, s; | ||
return _regeneratorRuntime.async(function callee$2$1$(context$3$0) { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
@@ -101,3 +101,3 @@ case 0: | ||
context$3$0.next = 5; | ||
return s.start(); | ||
return _regeneratorRuntime.awrap(s.start()); | ||
@@ -113,9 +113,9 @@ case 5: | ||
}); | ||
it('should interpret a numeric startDetector as a start timeout', function callee$2$2() { | ||
it('should interpret a numeric startDetector as a start timeout', function callee$2$0() { | ||
var hasData, s; | ||
return _regeneratorRuntime.async(function callee$2$2$(context$3$0) { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
hasData = false; | ||
s = new _.SubProcess(_helpers.getFixture('sleepyproc.sh'), ['ls']); | ||
s = new _.SubProcess((0, _helpers.getFixture)('sleepyproc.sh'), ['ls']); | ||
@@ -128,3 +128,3 @@ s.on('output', function (stdout) { | ||
context$3$0.next = 5; | ||
return s.start(0); | ||
return _regeneratorRuntime.awrap(s.start(0)); | ||
@@ -134,3 +134,3 @@ case 5: | ||
context$3$0.next = 8; | ||
return _bluebird2['default'].delay(1200); | ||
return _regeneratorRuntime.awrap(_bluebird2['default'].delay(1200)); | ||
@@ -146,5 +146,5 @@ case 8: | ||
}); | ||
it('should fail even with a start timeout of 0 when command is bad', function callee$2$3() { | ||
it('should fail even with a start timeout of 0 when command is bad', function callee$2$0() { | ||
var s; | ||
return _regeneratorRuntime.async(function callee$2$3$(context$3$0) { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
@@ -154,3 +154,3 @@ case 0: | ||
context$3$0.next = 3; | ||
return s.start(0).should.eventually.be.rejectedWith(/ENOENT/); | ||
return _regeneratorRuntime.awrap(s.start(0).should.eventually.be.rejectedWith(/ENOENT/)); | ||
@@ -163,5 +163,5 @@ case 3: | ||
}); | ||
it('should be able to provide a custom startDetector function', function callee$2$4() { | ||
it('should be able to provide a custom startDetector function', function callee$2$0() { | ||
var sd, hasData, s; | ||
return _regeneratorRuntime.async(function callee$2$4$(context$3$0) { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
@@ -182,3 +182,3 @@ case 0: | ||
context$3$0.next = 6; | ||
return s.start(sd); | ||
return _regeneratorRuntime.awrap(s.start(sd)); | ||
@@ -194,5 +194,5 @@ case 6: | ||
}); | ||
it('should pass on custom errors from startDetector', function callee$2$5() { | ||
it('should pass on custom errors from startDetector', function callee$2$0() { | ||
var sd, s; | ||
return _regeneratorRuntime.async(function callee$2$5$(context$3$0) { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
@@ -206,3 +206,3 @@ case 0: | ||
context$3$0.next = 4; | ||
return s.start(sd).should.eventually.be.rejectedWith(/foo/); | ||
return _regeneratorRuntime.awrap(s.start(sd).should.eventually.be.rejectedWith(/foo/)); | ||
@@ -215,5 +215,5 @@ case 4: | ||
}); | ||
it('should time out starts that take longer than specified ms', function callee$2$6() { | ||
it('should time out starts that take longer than specified ms', function callee$2$0() { | ||
var sd, s, start; | ||
return _regeneratorRuntime.async(function callee$2$6$(context$3$0) { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
@@ -228,3 +228,3 @@ case 0: | ||
context$3$0.next = 5; | ||
return s.start(sd, 500).should.eventually.be.rejectedWith(/did not start.+time/i); | ||
return _regeneratorRuntime.awrap(s.start(sd, 500).should.eventually.be.rejectedWith(/did not start.+time/i)); | ||
@@ -251,7 +251,7 @@ case 5: | ||
context$3$0.next = 2; | ||
return new _Promise(function callee$3$0(resolve) { | ||
return _regeneratorRuntime.awrap(new _Promise(function callee$3$0(resolve) { | ||
return _regeneratorRuntime.async(function callee$3$0$(context$4$0) { | ||
while (1) switch (context$4$0.prev = context$4$0.next) { | ||
case 0: | ||
subproc = new _.SubProcess(_helpers.getFixture('sleepyproc.sh'), ['ls', _path2['default'].resolve(__dirname)]); | ||
subproc = new _.SubProcess((0, _helpers.getFixture)('sleepyproc.sh'), ['ls', _path2['default'].resolve(__dirname)]); | ||
subproc.on('output', function (stdout) { | ||
@@ -263,3 +263,3 @@ if (stdout && stdout.indexOf('subproc-specs') !== -1) { | ||
context$4$0.next = 4; | ||
return subproc.start(); | ||
return _regeneratorRuntime.awrap(subproc.start()); | ||
@@ -271,15 +271,15 @@ case 4: | ||
}, null, _this2); | ||
}); | ||
})); | ||
case 2: | ||
context$3$0.next = 4; | ||
return subproc.stop(); | ||
return _regeneratorRuntime.awrap(subproc.stop()); | ||
case 4: | ||
context$3$0.next = 6; | ||
return new _Promise(function callee$3$1(resolve) { | ||
return _regeneratorRuntime.async(function callee$3$1$(context$4$0) { | ||
return _regeneratorRuntime.awrap(new _Promise(function callee$3$0(resolve) { | ||
return _regeneratorRuntime.async(function callee$3$0$(context$4$0) { | ||
while (1) switch (context$4$0.prev = context$4$0.next) { | ||
case 0: | ||
subproc = new _.SubProcess(_helpers.getFixture('echo.sh'), ['foo', 'bar']); | ||
subproc = new _.SubProcess((0, _helpers.getFixture)('echo.sh'), ['foo', 'bar']); | ||
subproc.on('output', function (stdout, stderr) { | ||
@@ -291,3 +291,3 @@ if (stderr && stderr.indexOf('bar') !== -1) { | ||
context$4$0.next = 4; | ||
return subproc.start(); | ||
return _regeneratorRuntime.awrap(subproc.start()); | ||
@@ -299,7 +299,7 @@ case 4: | ||
}, null, _this2); | ||
}); | ||
})); | ||
case 6: | ||
context$3$0.next = 8; | ||
return subproc.stop(); | ||
return _regeneratorRuntime.awrap(subproc.stop()); | ||
@@ -313,5 +313,5 @@ case 8: | ||
it('should get output by lines', function callee$2$1() { | ||
it('should get output by lines', function callee$2$0() { | ||
var lines; | ||
return _regeneratorRuntime.async(function callee$2$1$(context$3$0) { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
@@ -326,7 +326,7 @@ case 0: | ||
context$3$0.next = 5; | ||
return subproc.start(0); | ||
return _regeneratorRuntime.awrap(subproc.start(0)); | ||
case 5: | ||
context$3$0.next = 7; | ||
return _bluebird2['default'].delay(50); | ||
return _regeneratorRuntime.awrap(_bluebird2['default'].delay(50)); | ||
@@ -358,3 +358,3 @@ case 7: | ||
context$4$0.next = 3; | ||
return subproc.start(); | ||
return _regeneratorRuntime.awrap(subproc.start()); | ||
@@ -371,3 +371,3 @@ case 3: | ||
context$4$0.next = 6; | ||
return subproc.stop('SIGHUP'); | ||
return _regeneratorRuntime.awrap(subproc.stop('SIGHUP')); | ||
@@ -388,14 +388,14 @@ case 6: | ||
it('should time out if stop doesnt complete fast enough', function callee$2$1() { | ||
it('should time out if stop doesnt complete fast enough', function callee$2$0() { | ||
var subproc; | ||
return _regeneratorRuntime.async(function callee$2$1$(context$3$0) { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
case 0: | ||
subproc = new _.SubProcess(_helpers.getFixture('traphup.sh'), ['tail', '-f', _path2['default'].resolve(__filename)]); | ||
subproc = new _.SubProcess((0, _helpers.getFixture)('traphup.sh'), ['tail', '-f', _path2['default'].resolve(__filename)]); | ||
context$3$0.next = 3; | ||
return subproc.start(); | ||
return _regeneratorRuntime.awrap(subproc.start()); | ||
case 3: | ||
context$3$0.next = 5; | ||
return subproc.stop('SIGHUP', 10).should.eventually.be.rejectedWith(/Process didn't end/); | ||
return _regeneratorRuntime.awrap(subproc.stop('SIGHUP', 10).should.eventually.be.rejectedWith(/Process didn't end/)); | ||
@@ -409,5 +409,5 @@ case 5: | ||
it('should error if there is no process to stop', function callee$2$2() { | ||
it('should error if there is no process to stop', function callee$2$0() { | ||
var subproc; | ||
return _regeneratorRuntime.async(function callee$2$2$(context$3$0) { | ||
return _regeneratorRuntime.async(function callee$2$0$(context$3$0) { | ||
while (1) switch (context$3$0.prev = context$3$0.next) { | ||
@@ -417,15 +417,15 @@ case 0: | ||
context$3$0.next = 3; | ||
return subproc.stop().should.eventually.be.rejectedWith(/Can't stop/); | ||
return _regeneratorRuntime.awrap(subproc.stop().should.eventually.be.rejectedWith(/Can't stop/)); | ||
case 3: | ||
context$3$0.next = 5; | ||
return subproc.start(); | ||
return _regeneratorRuntime.awrap(subproc.start()); | ||
case 5: | ||
context$3$0.next = 7; | ||
return _bluebird2['default'].delay(10); | ||
return _regeneratorRuntime.awrap(_bluebird2['default'].delay(10)); | ||
case 7: | ||
context$3$0.next = 9; | ||
return subproc.stop().should.eventually.be.rejectedWith(/Can't stop/); | ||
return _regeneratorRuntime.awrap(subproc.stop().should.eventually.be.rejectedWith(/Can't stop/)); | ||
@@ -440,2 +440,2 @@ case 9: | ||
}); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3Qvc3VicHJvYy1zcGVjcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O3dCQUVjLFVBQVU7Ozs7b0JBQ1AsTUFBTTs7OztnQkFDSSxPQUFPOztvQkFDakIsTUFBTTs7Ozs4QkFDSSxrQkFBa0I7Ozs7UUFDdEMsV0FBVzs7dUJBQ1MsV0FBVzs7QUFSdEMsT0FBTyxDQUFDLG9CQUFvQixDQUFDLENBQUMsT0FBTyxFQUFFLENBQUM7O0FBVXhDLElBQU0sTUFBTSxHQUFHLGtCQUFLLE1BQU0sRUFBRSxDQUFDO0FBQzdCLGtCQUFLLEdBQUcsNkJBQWdCLENBQUM7O0FBRXpCLFFBQVEsQ0FBQyxZQUFZLEVBQUUsWUFBTTtBQUMzQixJQUFFLENBQUMsd0RBQXdELEVBQUUsWUFBTTtBQUNqRSxVQUFNLFNBQU0sQ0FBQyxZQUFNO0FBQ2pCLFlBWkcsVUFBVSxFQVlHLENBQUM7S0FDbEIsQ0FBQyxDQUFDO0dBQ0osQ0FBQyxDQUFDO0FBQ0gsSUFBRSxDQUFDLHlEQUF5RCxFQUFFLFlBQU07QUFDbEUsVUFBTSxTQUFNLENBQUMsWUFBTTtBQUNqQixZQWpCRyxVQUFVLENBaUJFLEVBQUMsR0FBRyxFQUFFLElBQUksRUFBQyxDQUFDLENBQUM7S0FDN0IsQ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mUucmVqZWN0ZWRXaXRoKC9DYW4ndCBzdG9wLyk7XG4gICAgfSk7XG4gIH0pO1xufSk7XG4iXX0= |
@@ -92,6 +92,8 @@ import { spawn } from 'child_process'; | ||
// spawn the subprocess and return control whenever we deem that it has fully | ||
// "started" | ||
async start (startDetector = null, timeoutMs = null) { | ||
let startDelay = 10; | ||
// the default start detector is that we get any output | ||
// the default start detector simply returns true when we get any output | ||
if (startDetector === null) { | ||
@@ -104,3 +106,3 @@ startDetector = (stdout, stderr) => { | ||
// if the user passes a number, then we simply delay a certain amount of | ||
// time before returning control | ||
// time before returning control, rather than waiting for a condition | ||
if (typeof startDetector === 'number') { | ||
@@ -111,11 +113,7 @@ startDelay = startDetector; | ||
// return a promise so we can wrap the async behavior | ||
return new Promise((resolve, reject) => { | ||
if (typeof timeoutMs === "number") { | ||
setTimeout(() => { | ||
reject(new Error("The process did not start in the allotted time " + | ||
`(${timeoutMs}ms)`)); | ||
}, timeoutMs); | ||
} | ||
try { | ||
// actually spawn the subproc | ||
this.proc = spawn(this.cmd, this.args); | ||
@@ -129,3 +127,6 @@ } catch (e) { | ||
// this function handles output that we collect from the subproc | ||
const handleOutput = (data) => { | ||
// if we have a startDetector, run it on the output so we can resolve/ | ||
// reject and move on from start | ||
try { | ||
@@ -138,3 +139,10 @@ if (startDetector && startDetector(data.stdout, data.stderr)) { | ||
} | ||
// emit the actual output for whomever's listening | ||
this.emit('output', data.stdout, data.stderr); | ||
// we also want to emit lines, but it's more complex since output | ||
// comes in chunks and a line could come in two different chunks, so | ||
// we have logic to handle that case (using this.lastLinePortion to | ||
// remember a line that started but did not finish in the last chunk) | ||
for (let stream of ['stdout', 'stderr']) { | ||
@@ -154,2 +162,3 @@ if (!data[stream]) continue; | ||
// if we get an error spawning the proc, reject and clean up the proc | ||
this.proc.on('error', err => { | ||
@@ -169,2 +178,5 @@ this.proc.removeAllListeners('exit'); | ||
// when the proc exits, we might still have a buffer of lines we were | ||
// waiting on more chunks to complete. Go ahead and emit those, then | ||
// re-emit the exit so a listener can handle the possibly-unexpected exit | ||
this.proc.on('exit', (code, signal) => { | ||
@@ -176,2 +188,4 @@ this.handleLastLines(); | ||
// if the user hasn't given us a startDetector, instead just resolve | ||
// when startDelay ms have passed | ||
if (!startDetector) { | ||
@@ -182,2 +196,11 @@ setTimeout(() => { | ||
} | ||
// if the user has given us a timeout, start the clock for rejecting | ||
// the promise if we take too long to start | ||
if (typeof timeoutMs === "number") { | ||
setTimeout(() => { | ||
reject(new Error("The process did not start in the allotted time " + | ||
`(${timeoutMs}ms)`)); | ||
}, timeoutMs); | ||
} | ||
}); | ||
@@ -199,2 +222,4 @@ } | ||
} | ||
// make sure to emit any data in our lines buffer whenever we're done with | ||
// the proc | ||
this.handleLastLines(); | ||
@@ -201,0 +226,0 @@ return new Promise((resolve, reject) => { |
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"author": "appium", | ||
@@ -28,3 +28,3 @@ "license": "Apache License 2.0", | ||
"dependencies": { | ||
"babel-runtime": "^5.1.9", | ||
"babel-runtime": "=5.5.5", | ||
"bluebird": "^2.9.25", | ||
@@ -31,0 +31,0 @@ "shell-quote": "^1.4.3", |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 15 instances in 1 package
1380
3
119210
27
- Removedbabel-runtime@5.8.38(transitive)
- Removedcore-js@1.2.7(transitive)
Updatedbabel-runtime@=5.5.5