now removing readline correcctly
This commit is contained in:
parent
24cce5d9b2
commit
03dfdda812
@ -4,6 +4,13 @@ stages:
|
||||
- test
|
||||
- release
|
||||
|
||||
testLEGACY:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test legacy
|
||||
tags:
|
||||
- docker
|
||||
|
||||
testLTS:
|
||||
stage: test
|
||||
script:
|
||||
|
3
dist/early.child.js
vendored
3
dist/early.child.js
vendored
@ -45,6 +45,7 @@ process.on('SIGINT', function () {
|
||||
logEarlyAbort = true;
|
||||
rl.write(null, { ctrl: true, name: 'u' });
|
||||
rl.close();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVhcmx5LmNoaWxkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUFnQixDQUFDLENBQUE7QUFDeEIsSUFBSSxNQUFNLEdBQUcsT0FBTyxDQUFDLFFBQVEsQ0FBQyxDQUFDO0FBQy9CLElBQU8sUUFBUSxXQUFXLFVBQVUsQ0FBQyxDQUFDO0FBQ3RDLElBQUksRUFBRSxHQUFHLFFBQVEsQ0FBQyxlQUFlLENBQUM7SUFDOUIsS0FBSyxFQUFFLE9BQU8sQ0FBQyxLQUFLO0lBQ3BCLE1BQU0sRUFBRSxPQUFPLENBQUMsTUFBTTtDQUN6QixDQUFDLENBQUM7QUFFSCxJQUFJLFVBQWlCLENBQUM7QUFDdEIsSUFBSSxZQUFtQixDQUFDO0FBQ3hCLElBQUksWUFBWSxHQUFVLENBQUMsQ0FBQztBQUU1QixJQUFJLFNBQVMsR0FBRztJQUNaLElBQUksWUFBWSxHQUFVLEdBQUc7VUFDdkIsR0FBRyxDQUFDLEtBQUssQ0FBQyxNQUFNLENBQUMsWUFBWSxDQUFDO1VBQzlCLEdBQUcsQ0FBQyxNQUFNLENBQUMsWUFBWSxHQUFHLFlBQVksQ0FBQztVQUN2Q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m9ydCkgbG9nRWFybHkoKTtcbiAgICB9LDgwKTtcbn07XG5cbmxldCBzdGFydCA9IGZ1bmN0aW9uKG1vZHVsZU5hbWVBcmc6c3RyaW5nID0gXCJcIixsb2FkZXJMZW5ndGhBcmc6c3RyaW5nID0gXCIxMFwiKXtcbiAgICBtb2R1bGVOYW1lID0gbW9kdWxlTmFtZUFyZztcbiAgICBsb2FkZXJMZW5ndGggPSBwYXJzZUludChsb2FkZXJMZW5ndGhBcmcpO1xuICAgIGxvZ0Vhcmx5KCk7XG59O1xuXG5zdGFydChwcm9jZXNzLmVudi5tb2R1bGVOYW1lQXJnLHByb2Nlc3MuZW52LmxvYWRlckxlbmd0aEFyZyk7XG5cbnByb2Nlc3Mub24oJ1NJR0lOVCcsICgpID0+IHtcbiAgICBsb2dFYXJseUFib3J0ID0gdHJ1ZTtcbiAgICBybC53cml0ZShudWxsLCB7Y3RybDogdHJ1ZSwgbmFtZTogJ3UnfSk7XG4gICAgcmwuY2xvc2UoKTtcbiAgICBwcm9jZXNzLmV4aXQoMCk7XG59KTsiXX0=
|
||||
|
2
dist/index.d.ts
vendored
2
dist/index.d.ts
vendored
@ -1,3 +1,3 @@
|
||||
import "typings-global";
|
||||
export declare let start: (moduleNameArg?: string, loaderLengthArg?: string) => void;
|
||||
export declare let stop: () => void;
|
||||
export declare let stop: () => any;
|
||||
|
14
dist/index.js
vendored
14
dist/index.js
vendored
@ -1,6 +1,7 @@
|
||||
"use strict";
|
||||
require("typings-global");
|
||||
var path = require("path");
|
||||
var q = require("q");
|
||||
var readline = require("readline");
|
||||
var childProcess = require("child_process");
|
||||
var earlyChild;
|
||||
@ -31,6 +32,7 @@ exports.start = function (moduleNameArg, loaderLengthArg) {
|
||||
};
|
||||
exports.stop = function () {
|
||||
if (doAnimation) {
|
||||
var done_1 = q.defer();
|
||||
earlyChild.kill();
|
||||
var rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
@ -38,7 +40,17 @@ exports.stop = function () {
|
||||
});
|
||||
rl.write(null, { ctrl: true, name: 'u' });
|
||||
rl.close();
|
||||
earlyChild.on("close", function () {
|
||||
var rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
rl.write(null, { ctrl: true, name: 'u' });
|
||||
rl.close();
|
||||
done_1.resolve();
|
||||
});
|
||||
return done_1.promise;
|
||||
}
|
||||
};
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxRQUFPLGdCQUNQLENBQUMsQ0FEc0I7QUFFdkIsSUFBTyxJQUFJLFdBQVcsTUFBTSxDQUFDLENBQUM7QUFDOUIsSUFBTyxRQUFRLFdBQVcsVUFBVSxDQUFDLENBQUM7QUFDdEMsSUFBTyxZQUFZLFdBQVcsZUFBZSxDQUFDLENBQUM7QUFDL0MsSUFBSSxVQUFVLENBQUM7QUFFZixJQUFJLFdBQVcsR0FBVyxJQUFJLENBQUM7QUFDL0IsSUFBSSxNQUFNLEdBQVcsS0FBSyxDQUFDO0FBQzNCLEVBQUUsQ0FBQSxDQUFDLE9BQU8sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLENBQUEsQ0FBQztJQUNuRCxXQUFXLEdBQUcsS0FBSyxDQUFDO0FBQ3hCLENBQUM7QUFBQyxJQUFJLENBQUMsRUFBRSxDQUFBLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUMsQ0FBQSxDQUFDO0lBQ3hDLE1BQU0sR0FBRyxJQUFJLENBQUM7QUFDbEIsQ0FBQztBQUVELFVBQVU7QUFDQyxhQUFLLEdBQUcsVUFBUyxhQU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mUucmVzb2x2ZSgpO1xuICAgICAgICB9KVxuICAgICAgICByZXR1cm4gZG9uZS5wcm9taXNlO1xuICAgIH1cbn07XG5cbiJdfQ==
|
||||
|
@ -21,11 +21,12 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/early#readme",
|
||||
"devDependencies": {
|
||||
"npmts": "^5.2.5",
|
||||
"npmts-g": "^5.2.6",
|
||||
"typings-test": "^1.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"colors": "^1.1.2",
|
||||
"q": "^1.4.1",
|
||||
"typings-global": "^1.0.3"
|
||||
}
|
||||
}
|
||||
|
@ -7,9 +7,10 @@ describe("early", function () {
|
||||
early.start("early");
|
||||
setTimeout(done, 5000);
|
||||
});
|
||||
it(".stop()", function () {
|
||||
early.stop();
|
||||
it(".stop()", function (done) {
|
||||
early.stop()
|
||||
.then(done);
|
||||
});
|
||||
});
|
||||
|
||||
//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLFFBQU8sY0FBYyxDQUFDLENBQUE7QUFDdEIsSUFBTyxLQUFLLFdBQVcsZUFBZSxDQUFDLENBQUM7QUFFeEMsUUFBUSxDQUFDLE9BQU8sRUFBQztJQUNiLEVBQUUsQ0FBQyxVQUFVLEVBQUMsVUFBUyxJQUFJO1FBQ3ZCLElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLENBQUM7UUFDcEIsS0FBSyxDQUFDLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQUNyQixVQUFVLENBQUMsSUFBSSxFQUFDLElBQUksQ0FBQyxDQUFDO0lBQzFCLENBQUMsQ0FBQyxDQUFDO0lBQ0gsRUFBRSxDQUFDLFNBQVMsRUFBQztRQUNULEtBQUssQ0FBQyxJQUFJLEVBQUUsQ0FBQztJQUNqQixDQUFDLENBQUMsQ0FBQTtB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0FBQztJQUNwQixDQUFDLENBQUMsQ0FBQTtBQUNOLENBQUMsQ0FBQyxDQUFBIiwiZmlsZSI6InRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgXCJ0eXBpbmdzLXRlc3RcIjtcbmltcG9ydCBlYXJseSA9IHJlcXVpcmUoXCIuLi9kaXN0L2luZGV4XCIpO1xuXG5kZXNjcmliZShcImVhcmx5XCIsZnVuY3Rpb24oKXtcbiAgICBpdChcIi5zdGFydCgpXCIsZnVuY3Rpb24oZG9uZSl7XG4gICAgICAgIHRoaXMudGltZW91dCgxMDAwMCk7XG4gICAgICAgIGVhcmx5LnN0YXJ0KFwiZWFybHlcIik7XG4gICAgICAgIHNldFRpbWVvdXQoZG9uZSw1MDAwKTtcbiAgICB9KTtcbiAgICBpdChcIi5zdG9wKClcIixmdW5jdGlvbihkb25lKXtcbiAgICAgICAgZWFybHkuc3RvcCgpXG4gICAgICAgICAgICAudGhlbihkb25lKTtcbiAgICB9KVxufSkiXX0=
|
||||
|
@ -7,7 +7,8 @@ describe("early",function(){
|
||||
early.start("early");
|
||||
setTimeout(done,5000);
|
||||
});
|
||||
it(".stop()",function(){
|
||||
early.stop();
|
||||
it(".stop()",function(done){
|
||||
early.stop()
|
||||
.then(done);
|
||||
})
|
||||
})
|
@ -47,4 +47,5 @@ process.on('SIGINT', () => {
|
||||
logEarlyAbort = true;
|
||||
rl.write(null, {ctrl: true, name: 'u'});
|
||||
rl.close();
|
||||
process.exit(0);
|
||||
});
|
12
ts/index.ts
12
ts/index.ts
@ -1,6 +1,7 @@
|
||||
import "typings-global"
|
||||
import colors = require("colors");
|
||||
import path = require("path");
|
||||
let q = require("q");
|
||||
import readline = require("readline");
|
||||
import childProcess = require("child_process");
|
||||
let earlyChild;
|
||||
@ -30,6 +31,7 @@ export let start = function(moduleNameArg:string = "",loaderLengthArg:string = "
|
||||
|
||||
export let stop = function(){
|
||||
if(doAnimation){
|
||||
let done = q.defer();
|
||||
earlyChild.kill();
|
||||
let rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
@ -37,6 +39,16 @@ export let stop = function(){
|
||||
});
|
||||
rl.write(null, {ctrl: true, name: 'u'});
|
||||
rl.close();
|
||||
earlyChild.on("close",function(){
|
||||
let rl = readline.createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
rl.write(null, {ctrl: true, name: 'u'});
|
||||
rl.close();
|
||||
done.resolve();
|
||||
})
|
||||
return done.promise;
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user