now running async and a lot faster

This commit is contained in:
Philipp Kunz 2017-03-29 01:01:37 +02:00
parent 82f4fcceac
commit d55f7ef7f2
17 changed files with 312 additions and 483 deletions

View File

@ -1,4 +1,4 @@
FROM hosttoday/ht-docker-node:npmts
FROM hosttoday/ht-docker-node:npmci
COPY ./buildContextDir /workspace
WORKDIR /workspace
ENV CI=true

3
dist/index.js vendored
View File

@ -1,4 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const cli = require("./npmdocker.cli");
cli.run();
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQ0EsdUNBQXNDO0FBRXRDLEdBQUcsQ0FBQyxHQUFHLEVBQUUsQ0FBQSJ9
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBLHVDQUFzQztBQUV0QyxHQUFHLENBQUMsR0FBRyxFQUFFLENBQUEifQ==

50
dist/npmdocker.cli.js vendored
View File

@ -1,20 +1,22 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./npmdocker.plugins");
// modules
const ConfigModule = require("./npmdocker.config");
const DockerModule = require("./npmdocker.docker");
let npmdockerCli = new plugins.smartcli.Smartcli();
plugins.beautylog.ora.start();
exports.run = () => {
npmdockerCli.standardTask().then(argvArg => {
let done = plugins.q.defer();
ConfigModule.run()
.then(DockerModule.run)
.then((configArg) => {
done.resolve(configArg);
});
return done.promise;
}).then((configArg) => {
npmdockerCli.standardTask().then((argvArg) => __awaiter(this, void 0, void 0, function* () {
let configArg = yield ConfigModule.run()
.then(DockerModule.run);
if (configArg.exitCode === 0) {
plugins.beautylog.success('container ended all right!');
}
@ -22,28 +24,28 @@ exports.run = () => {
plugins.beautylog.error('container ended with error!');
process.exit(1);
}
});
npmdockerCli.addCommand('clean').then(argvArg => {
}));
npmdockerCli.addCommand('clean').then((argvArg) => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.ora.start();
plugins.beautylog.ora.text('cleaning up docker env...');
if (argvArg.all) {
plugins.beautylog.ora.text('killing any running docker containers...');
plugins.shelljs.exec(`docker kill $(docker ps -q)`);
yield plugins.smartshell.exec(`docker kill $(docker ps -q)`);
plugins.beautylog.ora.text('removing stopped containers...');
plugins.shelljs.exec(`docker rm $(docker ps -a -q)`);
yield plugins.smartshell.exec(`docker rm $(docker ps -a -q)`);
plugins.beautylog.ora.text('removing images...');
plugins.shelljs.exec(`docker rmi $(docker images -q -f dangling=true)`);
yield plugins.smartshell.exec(`docker rmi $(docker images -q -f dangling=true)`);
plugins.beautylog.ora.text('removing all other images...');
plugins.shelljs.exec(`docker rmi $(docker images -a -q)`);
yield plugins.smartshell.exec(`docker rmi $(docker images -a -q)`);
plugins.beautylog.ora.text('removing all volumes...');
plugins.shelljs.exec(`docker volume rm $(docker volume ls -f dangling=true -q)`);
yield plugins.smartshell.exec(`docker volume rm $(docker volume ls -f dangling=true -q)`);
}
plugins.beautylog.ora.endOk('docker environment now is clean!');
});
npmdockerCli.addCommand('speedtest').then(argvArg => {
plugins.beautylog.ora.text('cleaning up docker env...');
plugins.shelljs.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`);
plugins.beautylog.ora.endOk('docker environment now is clean!');
});
}));
npmdockerCli.addCommand('speedtest').then((argvArg) => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.ok('Starting speedtest');
yield plugins.smartshell.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`);
}));
npmdockerCli.startParse();
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLmNsaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWRvY2tlci5jbGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtDQUE4QztBQUc5QyxVQUFVO0FBQ1YsbURBQWtEO0FBQ2xELG1EQUFrRDtBQUVsRCxJQUFJLFlBQVksR0FBRyxJQUFJLE9BQU8sQ0FBQyxRQUFRLENBQUMsUUFBUSxFQUFFLENBQUE7QUFFbEQsT0FBTyxDQUFDLFNBQVMsQ0FBQyxHQUFHLENBQUMsS0FBSyxFQUFFLENBQUE7QUFDbEIsUUFBQSxHQUFHLEdBQUc7SUFDZixZQUFZLENBQUMsWUFBWSxFQUFFLENBQUMsSUFBSSxDQUFDLE9BQU87UUFDdEMsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtRQUM1QixZQUFZLENBQUMsR0FBRyxFQUFFO2FBQ2YsSUFBSSxDQUFDLFlBQVksQ0FBQyxHQUFHLENBQUM7YUFDdEIsSUFBSSxDQUFDLENBQUMsU0FBUztZQUNkLElBQUksQ0FBQyxPQUFPLENBQUMsU0FBUyxDQUFDLENBQUE7UUFDekIsQ0FBQyxDQUFDLENBQUE7UUFDSixNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQTtJQUNyQixDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQyxTQUErQjtRQUN0QyxFQUFFLENBQUMsQ0FBQyxTQUFTLENBQ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BQU0sT0FBTyxDQUFDLFVBQVUsQ0FBQyxJQUFJLENBQUMsa0VBQWtFLENBQUMsQ0FBQTtJQUNuRyxDQUFDLENBQUEsQ0FBQyxDQUFBO0lBRUYsWUFBWSxDQUFDLFVBQVUsRUFBRSxDQUFBO0FBQzNCLENBQUMsQ0FBQSJ9

View File

@ -6,4 +6,4 @@ export interface IConfig {
exitCode?: number;
keyValueObjectArray: IKeyValueObject[];
}
export declare let run: () => Promise<{}>;
export declare let run: () => Promise<IConfig>;

View File

@ -1,9 +1,17 @@
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./npmdocker.plugins");
const paths = require("./npmdocker.paths");
;
let getQenvKeyValueObject = () => {
let done = plugins.q.defer();
let getQenvKeyValueObject = () => __awaiter(this, void 0, void 0, function* () {
let qenvKeyValueObjectArray;
if (plugins.smartfile.fs.fileExistsSync(plugins.path.join(paths.cwd, 'qenv.yml'))) {
qenvKeyValueObjectArray = new plugins.qenv.Qenv(paths.cwd, '.nogit/').keyValueObjectArray;
@ -12,11 +20,9 @@ let getQenvKeyValueObject = () => {
qenvKeyValueObjectArray = [];
}
;
done.resolve(qenvKeyValueObjectArray);
return done.promise;
};
let buildConfig = (qenvKeyValueObjectArrayArg) => {
let done = plugins.q.defer();
return qenvKeyValueObjectArray;
});
let buildConfig = (qenvKeyValueObjectArrayArg) => __awaiter(this, void 0, void 0, function* () {
let npmextra = new plugins.npmextra.Npmextra(paths.cwd);
let config = npmextra.dataFor('npmdocker', {
baseImage: 'hosttoday/ht-docker-node:npmts',
@ -24,14 +30,10 @@ let buildConfig = (qenvKeyValueObjectArrayArg) => {
dockerSock: false,
keyValueObjectArray: qenvKeyValueObjectArrayArg
});
done.resolve(config);
return done.promise;
};
exports.run = () => {
let done = plugins.q.defer();
getQenvKeyValueObject()
.then(buildConfig)
.then(done.resolve);
return done.promise;
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL25wbWRvY2tlci5jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLCtDQUE4QztBQUM5QywyQ0FBMEM7QUFXekMsQ0FBQztBQUVGLElBQUkscUJBQXFCLEdBQUc7SUFDMUIsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtJQUM1QixJQUFJLHVCQUEwQyxDQUFBO0lBQzlDLEVBQUUsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxTQUFTLENBQUMsRUFBRSxDQUFDLGNBQWMsQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQUMsR0FBRyxFQUFFLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2xGLHVCQUF1QixHQUFHLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsS0FBSyxDQUFDLEdBQUcsRUFBRSxTQUFTLENBQUMsQ0FBQyxtQkFBbUIsQ0FBQTtJQUMzRixDQUFDO0lBQUMsSUFBSSxDQUFDLENBQUM7UUFDTix1QkFBdUIsR0FBRyxFQUFFLENBQUE7SUFDOUIsQ0FBQztJQUFBLENBQUM7SUFDRixJQUFJLENBQUMsT0FBTyxDQUFDLHVCQUF1QixDQUFDLENBQUE7SUFDckMsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUE7QUFDckIsQ0FBQyxDQUFBO0FBRUQsSUFBSSxXQUFXLEdBQUcsQ0FBQywwQkFBMkM7SUFDNUQsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtJQUM1QixJQUFJLFFBQVEsR0FBRyxJQUFJLE9BQU8sQ0FBQyxRQUFRLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQTtJQUN2RCxJQUFJLE1BQU0sR0FBRyxRQUFRLENBQUMsT0FBTyxDQUMzQixXQUFXLEVBQ1g7UUFDRSxTQUFTLEVBQUUsZ0NBQWdDO1FBQzNDLE9BQU8sRUFBRSxVQUFVO1FBQ25CLFVBQVUsRUFBRSxLQUFLO1FBQ2pCLG1CQUFtQixFQUFFLDBCQUEwQjtLQUNoRCxDQUNGLENBQUE7SUFDRCxJQUFJLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFBO0lBQ3BCLE1BQU0sQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFBO0FBQ3JCLENBQUMsQ0FBQTtBQUVVLFFBQUEsR0FBRyxHQUFHO0lBQ2YsSUFBSSxJQUFJLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtJQUM1QixxQkFBcUIsRUFBRTtTQUNwQixJQUFJLENBQUMsV0FBVyxDQUFDO1NBQ2pCLElBQUksQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUE7SUFDckIsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUE7QUFDckIsQ0FBQyxDQUFBIn0=
return config;
});
exports.run = () => __awaiter(this, void 0, void 0, function* () {
let config = yield getQenvKeyValueObject().then(buildConfig);
return config;
});
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiI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sQ0FDRixDQUFBO0lBQ0QsTUFBTSxDQUFDLE1BQU0sQ0FBQTtBQUNmLENBQUMsQ0FBQSxDQUFBO0FBRVUsUUFBQSxHQUFHLEdBQUc7SUFDZixJQUFJLE1BQU0sR0FBRyxNQUFNLHFCQUFxQixFQUFFLENBQUMsSUFBSSxDQUFDLFdBQVcsQ0FBQyxDQUFBO0lBQzVELE1BQU0sQ0FBQyxNQUFNLENBQUE7QUFDZixDQUFDLENBQUEsQ0FBQSJ9

View File

@ -1 +1,2 @@
export declare let run: (configArg: any) => Promise<{}>;
import { IConfig } from './npmdocker.config';
export declare let run: (configArg: IConfig) => Promise<IConfig>;

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./npmdocker.plugins");
// directories
exports.cwd = process.cwd();
@ -9,4 +10,4 @@ exports.buildContextDir = plugins.path.join(exports.assets, "buildContextDir");
plugins.smartfile.fs.ensureDirSync(exports.buildContextDir);
// files
exports.dockerfile = plugins.path.join(exports.assets, "Dockerfile");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLnBhdGhzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtZG9ja2VyLnBhdGhzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSwrQ0FBK0M7QUFFL0MsY0FBYztBQUNILFFBQUEsR0FBRyxHQUFHLE9BQU8sQ0FBQyxHQUFHLEVBQUUsQ0FBQztBQUNwQixRQUFBLFdBQVcsR0FBRyxPQUFPLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxTQUFTLEVBQUUsS0FBSyxDQUFDLENBQUM7QUFDbEQsUUFBQSxNQUFNLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsbUJBQVcsRUFBRSxTQUFTLENBQUMsQ0FBQztBQUM5RC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Q3pFLE9BQU8sQ0FBQyxTQUFTLENBQUMsRUFBRSxDQUFDLGFBQWEsQ0FBQyx1QkFBZSxDQUFDLENBQUM7QUFFcEQsUUFBUTtBQUNHLFFBQUEsVUFBVSxHQUFHLE9BQU8sQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFDLGNBQU0sRUFBRSxZQUFZLENBQUMsQ0FBQyJ9

View File

@ -5,8 +5,8 @@ import * as path from 'path';
import * as projectinfo from 'projectinfo';
import * as q from 'smartq';
import * as qenv from 'qenv';
import * as shelljs from 'shelljs';
import * as smartcli from 'smartcli';
import * as smartfile from 'smartfile';
import * as smartshell from 'smartshell';
import * as smartstring from 'smartstring';
export { beautylog, npmextra, path, projectinfo, q, qenv, shelljs, smartcli, smartfile, smartstring };
export { beautylog, npmextra, path, projectinfo, q, qenv, smartcli, smartfile, smartshell, smartstring };

View File

@ -1,4 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("typings-global");
const beautylog = require("beautylog");
exports.beautylog = beautylog;
@ -12,12 +13,12 @@ const q = require("smartq");
exports.q = q;
const qenv = require("qenv");
exports.qenv = qenv;
const shelljs = require("shelljs");
exports.shelljs = shelljs;
const smartcli = require("smartcli");
exports.smartcli = smartcli;
const smartfile = require("smartfile");
exports.smartfile = smartfile;
const smartshell = require("smartshell");
exports.smartshell = smartshell;
const smartstring = require("smartstring");
exports.smartstring = smartstring;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9ucG1kb2NrZXIucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLHVDQUFzQztBQVlwQyw4QkFBUztBQVhYLHFDQUFvQztBQVlsQyw0QkFBUTtBQVhWLDZCQUE0QjtBQVkxQixvQkFBSTtBQVhOLDJDQUEwQztBQVl4QyxrQ0FBVztBQVhiLDRCQUEyQjtBQVl6QixjQUFDO0FBWEgsNkJBQTRCO0FBWTFCLG9CQUFJO0FBWE4sbUNBQWtDO0FBWWhDLDBCQUFPO0FBWFQscUNBQW9DO0FBWWxDLDRCQUFRO0FBWFYsdUNBQXNDO0FBWXBDLDhCQUFTO0FBWFgsMkNBQTBDO0FBWXhDLGtDQUFXIn0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9ucG1kb2NrZXIucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix1Q0FBc0M7QUFZcEMsOEJBQVM7QUFYWCxxQ0FBb0M7QUFZbEMsNEJBQVE7QUFYViw2QkFBNEI7QUFZMUIsb0JBQUk7QUFYTiwyQ0FBMEM7QUFZeEMsa0NBQVc7QUFYYiw0QkFBMkI7QUFZekIsY0FBQztBQVhILDZCQUE0QjtBQVkxQixvQkFBSTtBQVhOLHFDQUFvQztBQVlsQyw0QkFBUTtBQVhWLHVDQUFzQztBQVlwQyw4QkFBUztBQVhYLHlDQUF3QztBQVl0QyxnQ0FBVTtBQVhaLDJDQUEwQztBQVl4QyxrQ0FBVyJ9

View File

@ -1,4 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./npmdocker.plugins");
exports.dockerfileSnippet = (optionsArg) => {
let commandArray = optionsArg.command.split(/\s/);
@ -18,4 +19,4 @@ exports.dockerfileSnippet = (optionsArg) => {
CMD [${commandString}];
`);
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibnBtZG9ja2VyLnNuaXBwZXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvbnBtZG9ja2VyLnNu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QUssQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNsRCxJQUFJLGFBQWEsR0FBVSxFQUFFLENBQUM7SUFDOUIsR0FBRyxDQUFBLENBQUMsSUFBSSxVQUFVLElBQUksWUFBWSxDQUFDLENBQUEsQ0FBQztRQUNoQyxFQUFFLENBQUEsQ0FBQyxDQUFDLENBQUMsYUFBYSxJQUFJLEVBQUUsQ0FBQyxDQUFDLENBQUEsQ0FBQztZQUN2QixhQUFhLEdBQUcsYUFBYSxHQUFHLEdBQUcsQ0FBQztRQUN4QyxDQUFDO1FBQ0QsYUFBYSxHQUFHLGFBQWEsR0FBRyxHQUFHLEdBQUcsVUFBVSxHQUFHLEdBQUcsQ0FBQztJQUMzRCxDQUFDO0lBQUEsQ0FBQztJQUNGLE1BQU0sQ0FBQyxPQUFPLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUM7ZUFDakMsVUFBVSxDQUFDLFNBQVM7Ozs7ZUFJcEIsYUFBYTtLQUN2QixDQUFDLENBQUM7QUFDUCxDQUFDLENBQUEifQ==

View File

@ -33,19 +33,18 @@
},
"homepage": "https://gitlab.com/gitzone/npmdocker#README",
"devDependencies": {
"npmts-g": "^6.0.0"
},
"dependencies": {
"@types/shelljs": "0.x.x",
"beautylog": "^6.1.1",
"npmextra": "^2.0.3",
"projectinfo": "^3.0.1",
"beautylog": "^6.1.5",
"npmextra": "^2.0.5",
"projectinfo": "^3.0.2",
"qenv": "^1.1.3",
"shelljs": "^0.7.6",
"smartcli": "^2.0.1",
"smartfile": "^4.1.5",
"smartq": "^1.1.0",
"smartstring": "^2.0.22",
"smartfile": "^4.1.9",
"smartq": "^1.1.1",
"smartshell": "^1.0.6",
"smartstring": "^2.0.24",
"typings-global": "^1.0.14"
}
}

View File

@ -7,17 +7,10 @@ import * as DockerModule from './npmdocker.docker'
let npmdockerCli = new plugins.smartcli.Smartcli()
plugins.beautylog.ora.start()
export let run = () => {
npmdockerCli.standardTask().then(argvArg => {
let done = plugins.q.defer()
ConfigModule.run()
npmdockerCli.standardTask().then(async (argvArg) => {
let configArg = await ConfigModule.run()
.then(DockerModule.run)
.then((configArg) => {
done.resolve(configArg)
})
return done.promise
}).then((configArg: ConfigModule.IConfig) => {
if (configArg.exitCode === 0) {
plugins.beautylog.success('container ended all right!')
} else {
@ -26,31 +19,31 @@ export let run = () => {
}
})
npmdockerCli.addCommand('clean').then(argvArg => {
npmdockerCli.addCommand('clean').then(async (argvArg) => {
plugins.beautylog.ora.start()
plugins.beautylog.ora.text('cleaning up docker env...')
if (argvArg.all) {
plugins.beautylog.ora.text('killing any running docker containers...')
plugins.shelljs.exec(`docker kill $(docker ps -q)`)
await plugins.smartshell.exec(`docker kill $(docker ps -q)`)
plugins.beautylog.ora.text('removing stopped containers...')
plugins.shelljs.exec(`docker rm $(docker ps -a -q)`)
await plugins.smartshell.exec(`docker rm $(docker ps -a -q)`)
plugins.beautylog.ora.text('removing images...')
plugins.shelljs.exec(`docker rmi $(docker images -q -f dangling=true)`)
await plugins.smartshell.exec(`docker rmi $(docker images -q -f dangling=true)`)
plugins.beautylog.ora.text('removing all other images...')
plugins.shelljs.exec(`docker rmi $(docker images -a -q)`)
await plugins.smartshell.exec(`docker rmi $(docker images -a -q)`)
plugins.beautylog.ora.text('removing all volumes...')
plugins.shelljs.exec(`docker volume rm $(docker volume ls -f dangling=true -q)`)
await plugins.smartshell.exec(`docker volume rm $(docker volume ls -f dangling=true -q)`)
}
plugins.beautylog.ora.endOk('docker environment now is clean!')
})
npmdockerCli.addCommand('speedtest').then(argvArg => {
plugins.beautylog.ora.text('cleaning up docker env...')
plugins.shelljs.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`)
plugins.beautylog.ora.endOk('docker environment now is clean!')
npmdockerCli.addCommand('speedtest').then(async (argvArg) => {
plugins.beautylog.ok('Starting speedtest')
await plugins.smartshell.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`)
})
npmdockerCli.startParse()

View File

@ -12,20 +12,17 @@ export interface IConfig {
keyValueObjectArray: IKeyValueObject[]
};
let getQenvKeyValueObject = () => {
let done = plugins.q.defer()
let getQenvKeyValueObject = async () => {
let qenvKeyValueObjectArray: IKeyValueObject[]
if (plugins.smartfile.fs.fileExistsSync(plugins.path.join(paths.cwd, 'qenv.yml'))) {
qenvKeyValueObjectArray = new plugins.qenv.Qenv(paths.cwd, '.nogit/').keyValueObjectArray
} else {
qenvKeyValueObjectArray = []
};
done.resolve(qenvKeyValueObjectArray)
return done.promise
return qenvKeyValueObjectArray
}
let buildConfig = (qenvKeyValueObjectArrayArg: IKeyValueObject) => {
let done = plugins.q.defer()
let buildConfig = async (qenvKeyValueObjectArrayArg: IKeyValueObject[]) => {
let npmextra = new plugins.npmextra.Npmextra(paths.cwd)
let config = npmextra.dataFor<IConfig>(
'npmdocker',
@ -36,14 +33,10 @@ let buildConfig = (qenvKeyValueObjectArrayArg: IKeyValueObject) => {
keyValueObjectArray: qenvKeyValueObjectArrayArg
}
)
done.resolve(config)
return done.promise
return config
}
export let run = () => {
let done = plugins.q.defer()
getQenvKeyValueObject()
.then(buildConfig)
.then(done.resolve)
return done.promise
export let run = async (): Promise<IConfig> => {
let config = await getQenvKeyValueObject().then(buildConfig)
return config
}

View File

@ -24,7 +24,7 @@ let dockerData = {
let checkDocker = () => {
let done = plugins.q.defer()
plugins.beautylog.ora.text('checking docker...')
if (plugins.shelljs.which('docker')) {
if (plugins.smartshell.which('docker')) {
plugins.beautylog.ok('Docker found!')
done.resolve()
} else {
@ -54,145 +54,104 @@ let buildDockerFile = () => {
/**
* builds the Dockerimage from the built Dockerfile
*/
let buildDockerImage = () => {
let done = plugins.q.defer()
let buildDockerImage = async () => {
plugins.beautylog.ora.text('pulling latest base image from registry...')
plugins.shelljs.exec(
`docker pull ${config.baseImage}`,
{
silent: true
},
() => {
await plugins.smartshell.execSilent(
`docker pull ${config.baseImage}`
).then(async () => {
plugins.beautylog.ora.text('building Dockerimage...')
// are we creating a build context form project ?
if (process.env.CI === 'true') {
plugins.beautylog.ora.text('creating build context...')
plugins.smartfile.fs.copySync(paths.cwd, paths.buildContextDir)
}
plugins.shelljs.exec(
`docker build -f ${paths.dockerfile} -t ${dockerData.imageTag} ${paths.assets}`,
{
silent: true
},
() => {
await plugins.smartshell.execSilent(
`docker build -f ${paths.dockerfile} -t ${dockerData.imageTag} ${paths.assets}`
).then(async () => {
plugins.beautylog.ok('Dockerimage built!')
done.resolve()
}
)
}
) // first pull latest version of baseImage
return done.promise
})
})
}
let buildDockerProjectMountString = () => {
let done = plugins.q.defer()
let buildDockerProjectMountString = async () => {
if (process.env.CI !== 'true') {
dockerData.dockerProjectMountString = `-v ${paths.cwd}:/workspace`
};
done.resolve()
return done.promise
}
/**
* builds an environment string that docker cli understands
*/
let buildDockerEnvString = () => {
let done = plugins.q.defer()
let buildDockerEnvString = async () => {
for (let keyValueObjectArg of config.keyValueObjectArray) {
let envString = dockerData.dockerEnvString = dockerData.dockerEnvString + `-e ${keyValueObjectArg.key}=${keyValueObjectArg.value} `
};
done.resolve()
return done.promise
}
/**
* creates string to mount the docker.sock inside the testcontainer
*/
let buildDockerSockString = () => {
let done = plugins.q.defer()
let buildDockerSockString = async () => {
if (config.dockerSock) {
dockerData.dockerSockString = `-v /var/run/docker.sock:/var/run/docker.sock`
};
done.resolve()
return done
}
/**
* creates a container by running the built Dockerimage
*/
let runDockerImage = () => {
let runDockerImage = async () => {
let done = plugins.q.defer()
plugins.beautylog.ora.text('starting Container...')
plugins.beautylog.ora.end()
plugins.beautylog.log('now running Dockerimage')
config.exitCode = plugins.shelljs.exec(`docker run ${dockerData.dockerProjectMountString} ${dockerData.dockerSockString} ${dockerData.dockerEnvString} --name ${dockerData.containerName} ${dockerData.imageTag}`).code
done.resolve()
return done.promise
config.exitCode = (await plugins.smartshell.exec(`docker run ${dockerData.dockerProjectMountString} ${dockerData.dockerSockString} ${dockerData.dockerEnvString} --name ${dockerData.containerName} ${dockerData.imageTag}`)).exitCode
}
/**
* cleans up: deletes the test container
*/
let deleteDockerContainer = () => {
let done = plugins.q.defer()
plugins.shelljs.exec(`docker rm -f ${dockerData.containerName}`, {
silent: true
})
done.resolve()
return done.promise
let deleteDockerContainer = async () => {
await plugins.smartshell.execSilent(`docker rm -f ${dockerData.containerName}`)
}
/**
* cleans up deletes the test image
*/
let deleteDockerImage = () => {
let done = plugins.q.defer()
plugins.shelljs.exec(`docker rmi ${dockerData.imageTag}`, {
silent: true
})
done.resolve()
return done.promise
let deleteDockerImage = async () => {
await plugins.smartshell.exec(`docker rmi ${dockerData.imageTag}`)
}
/**
* cleans up, deletes the build context
*/
let deleteBuildContext = () => {
let done = plugins.q.defer()
plugins.smartfile.fs.remove(paths.buildContextDir)
.then(() => {
done.resolve()
})
return done.promise
let deleteBuildContext = async () => {
await plugins.smartfile.fs.remove(paths.buildContextDir)
}
let preClean = () => {
let done = plugins.q.defer()
deleteDockerImage()
let preClean = async () => {
await deleteDockerImage()
.then(deleteDockerContainer)
.then(() => {
.then(async () => {
plugins.beautylog.ok('ensured clean Docker environment!')
done.resolve()
})
}
let postClean = () => {
let done = plugins.q.defer()
deleteDockerContainer()
let postClean = async () => {
await deleteDockerContainer()
.then(deleteDockerImage)
.then(deleteBuildContext)
.then(() => {
.then(async () => {
plugins.beautylog.ok('cleaned up!')
done.resolve()
})
}
export let run = (configArg) => {
let done = plugins.q.defer()
export let run = async (configArg: IConfig): Promise<IConfig> => {
plugins.beautylog.ora.start()
config = configArg
checkDocker()
let resultConfig = await checkDocker()
.then(preClean)
.then(buildDockerFile)
.then(buildDockerImage)
@ -201,8 +160,6 @@ export let run = (configArg) => {
.then(buildDockerSockString)
.then(runDockerImage)
.then(postClean)
.then(() => {
done.resolve(config);
}).catch(err => { console.log(err) })
return done.promise
.catch(err => { console.log(err) })
return config
}

View File

@ -5,9 +5,9 @@ import * as path from 'path'
import * as projectinfo from 'projectinfo'
import * as q from 'smartq'
import * as qenv from 'qenv'
import * as shelljs from 'shelljs'
import * as smartcli from 'smartcli'
import * as smartfile from 'smartfile'
import * as smartshell from 'smartshell'
import * as smartstring from 'smartstring'
export {
@ -17,8 +17,8 @@ export {
projectinfo,
q,
qenv,
shelljs,
smartcli,
smartfile,
smartshell,
smartstring
}

356
yarn.lock
View File

@ -2,10 +2,6 @@
# yarn lockfile v1
"@types/colors@0.x.x":
version "0.6.33"
resolved "https://registry.yarnpkg.com/@types/colors/-/colors-0.6.33.tgz#17dada5971c395259490d6c83d7c182cf6e9ce55"
"@types/fs-extra@0.x.x":
version "0.0.37"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-0.0.37.tgz#195f11bcd9a1b97d9e412c6b66899b545471a1f7"
@ -16,9 +12,9 @@
version "4.14.52"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.52.tgz#de5c7ab14da1289733233c9b0ec6f9e377db90f5"
"@types/loggly@1.x.x":
version "1.1.30"
resolved "https://registry.yarnpkg.com/@types/loggly/-/loggly-1.1.30.tgz#a6658432314cbf0ec0350d33e7df9f4c0b76b3d0"
"@types/lodash@^4.14.55":
version "4.14.58"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.58.tgz#18d45863b6119c1ffffe935c1f51fe044c8c4102"
"@types/minimatch@2.x.x":
version "2.0.29"
@ -28,34 +24,30 @@
version "7.0.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-7.0.5.tgz#96a0f0a618b7b606f1ec547403c00650210bfbb7"
"@types/q@0.0.32", "@types/q@0.x.x", "@types/q@^0.x.x":
"@types/q@0.0.32", "@types/q@0.x.x":
version "0.0.32"
resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5"
"@types/shelljs@0.x.x":
"@types/q@^1.x.x":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.0.tgz#57e5465d665b370d4217e69b344b20faa6b724f5"
"@types/shelljs@0.x.x", "@types/shelljs@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.6.0.tgz#090b705c102ce7fc5c0c5ea9b524418ff15840df"
dependencies:
"@types/node" "*"
"@types/shelljs@^0.3.33":
version "0.3.33"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.3.33.tgz#df613bddb88225ed09ce5c835f620dcaaf155e6b"
dependencies:
"@types/node" "*"
"@types/vinyl@^1.1.29":
version "1.2.30"
resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-1.2.30.tgz#9115c0c45c40c575738906be9fb4df6f5b9e5013"
dependencies:
"@types/node" "*"
"@types/vinyl@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.0.tgz#fd213bf7f4136dde21fe1895500b12c186f8c268"
dependencies:
"@types/node" "*"
"@types/which@^1.0.28":
version "1.0.28"
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
"@types/yargs@6.x.x":
version "6.6.0"
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-6.6.0.tgz#91f8e2580a8083049f78311c059aa57d6949df6b"
@ -112,7 +104,7 @@ bcrypt-pbkdf@^1.0.0:
dependencies:
tweetnacl "^0.14.3"
beautycolor@^1.0.5:
beautycolor@^1.0.5, beautycolor@^1.0.7:
version "1.0.7"
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.7.tgz#a4715738ac4c8221371e9cbeb5a6cc6d11ecbf7c"
dependencies:
@ -146,26 +138,7 @@ beautylog@^4.1.2:
q "^1.4.1"
smartenv "^1.2.2"
beautylog@^5.0.23:
version "5.0.23"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-5.0.23.tgz#db0161b063be4ff40cee812c066582da2e599bf1"
dependencies:
"@types/colors" "0.x.x"
"@types/lodash" "4.x.x"
"@types/loggly" "1.x.x"
"@types/q" "0.x.x"
cli-color "^1.1.0"
cli-table2 "^0.2.0"
colors "1.1.2"
figlet "^1.1.2"
lodash "^4.15.0"
loggly "^1.1.0"
ora "^0.3.0"
q "^1.4.1"
smartenv "^1.2.5"
typings-global "^1.0.13"
beautylog@^6.0.0, beautylog@^6.1.1:
beautylog@^6.0.0:
version "6.1.1"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-6.1.1.tgz#2a83603ad7e2a0a09701ac63d7d3064a588dc779"
dependencies:
@ -178,11 +151,18 @@ beautylog@^6.0.0, beautylog@^6.1.1:
smartq "^1.0.4"
typings-global "^1.0.14"
bl@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398"
beautylog@^6.1.5:
version "6.1.5"
resolved "https://registry.yarnpkg.com/beautylog/-/beautylog-6.1.5.tgz#5d1eca8d32ca9ed49954a1622134b03ed904c44f"
dependencies:
readable-stream "~2.0.5"
"@types/lodash" "^4.14.55"
beautycolor "^1.0.7"
figlet "^1.2.0"
lodash "^4.17.4"
ora "^1.1.0"
smartenv "^2.0.0"
smartq "^1.1.1"
typings-global "^1.0.14"
boom@2.x.x:
version "2.10.1"
@ -250,10 +230,6 @@ cli-spinners@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c"
cli-spinners@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.2.0.tgz#85078737913b880f6ec9ffe7b65e83ec7776284f"
cli-spinners@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.0.0.tgz#ef987ed3d48391ac3dab9180b406a742180d6e6a"
@ -279,10 +255,6 @@ clone-buffer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
clone-stats@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
clone-stats@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
@ -459,14 +431,6 @@ forever-agent@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
form-data@~2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.0.0.tgz#6f0aebadcc5da16c13e1ecc11137d85f9b883b25"
dependencies:
asynckit "^0.4.0"
combined-stream "^1.0.5"
mime-types "^2.1.11"
form-data@~2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4"
@ -475,16 +439,6 @@ form-data@~2.1.1:
combined-stream "^1.0.5"
mime-types "^2.1.12"
fs-extra@^0.30.0:
version "0.30.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0"
dependencies:
graceful-fs "^4.1.2"
jsonfile "^2.1.0"
klaw "^1.0.0"
path-is-absolute "^1.0.0"
rimraf "^2.2.8"
fs-extra@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.0.0.tgz#337352bded4a0b714f3eb84de8cea765e9d37600"
@ -516,7 +470,7 @@ getpass@^0.1.1:
dependencies:
assert-plus "^1.0.0"
glob@^7.0.0, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1:
glob@^7.0.0, glob@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
dependencies:
@ -527,7 +481,7 @@ glob@^7.0.0, glob@^7.0.5, glob@^7.1.0, glob@^7.1.1:
once "^1.3.0"
path-is-absolute "^1.0.0"
graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
graceful-fs@^4.1.2, graceful-fs@^4.1.6:
version "4.1.11"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
@ -649,6 +603,10 @@ isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
@ -663,13 +621,20 @@ js-base64@^2.1.9:
version "2.1.9"
resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce"
js-yaml@^3.6.1, js-yaml@^3.7.0:
js-yaml@^3.7.0:
version "3.8.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.1.tgz#782ba50200be7b9e5a8537001b7804db3ad02628"
dependencies:
argparse "^1.0.7"
esprima "^3.1.1"
js-yaml@^3.8.2:
version "3.8.2"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.2.tgz#02d3e2c0f6beab20248d412c352203827d786721"
dependencies:
argparse "^1.0.7"
esprima "^3.1.1"
jsbn@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd"
@ -678,7 +643,7 @@ json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
json-stringify-safe@5.0.x, json-stringify-safe@~5.0.1:
json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
@ -700,12 +665,6 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.3.6"
klaw@^1.0.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
optionalDependencies:
graceful-fs "^4.1.9"
lcid@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835"
@ -739,7 +698,7 @@ lodash@^3.10.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
lodash@^4.11.1, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.16.1, lodash@^4.17.2, lodash@^4.17.4:
lodash@^4.11.1, lodash@^4.13.1, lodash@^4.16.1, lodash@^4.17.2, lodash@^4.17.4:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
@ -749,14 +708,6 @@ log-symbols@^1.0.2:
dependencies:
chalk "^1.0.0"
loggly@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/loggly/-/loggly-1.1.1.tgz#0a0fc1d3fa3a5ec44fdc7b897beba2a4695cebee"
dependencies:
json-stringify-safe "5.0.x"
request "2.75.x"
timespan "2.3.x"
lru-queue@0.1:
version "0.1.0"
resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3"
@ -779,7 +730,7 @@ mime-db@~1.26.0:
version "1.26.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.26.0.tgz#eaffcd0e4fc6935cf8134da246e2e6c35305adff"
mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7:
mime-types@^2.1.12, mime-types@~2.1.7:
version "2.1.14"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.14.tgz#f7ef7d97583fcaf3b7d282b6f8b5679dab1e94ee"
dependencies:
@ -799,10 +750,6 @@ next-tick@~0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-0.2.2.tgz#75da4a927ee5887e39065880065b7336413b310d"
node-uuid@~1.4.7:
version "1.4.7"
resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f"
normalize-package-data@^2.3.2:
version "2.3.5"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df"
@ -812,24 +759,16 @@ normalize-package-data@^2.3.2:
semver "2 || 3 || 4 || 5"
validate-npm-package-license "^3.0.1"
npmextra@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/npmextra/-/npmextra-2.0.3.tgz#03ca33e82e7ebf9e9a215173f5a737b9d4c51254"
npmextra@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/npmextra/-/npmextra-2.0.5.tgz#6f84f8604578dbd0fe678ea5c0413173979aa3e0"
dependencies:
"@types/q" "^0.x.x"
beautylog "^5.0.23"
lodash "^4.16.1"
"@types/q" "^1.x.x"
beautylog "^6.1.5"
lodash "^4.17.4"
q "^1.4.1"
smartfile "^4.0.21"
typings-global "^1.0.14"
npmts-g@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/npmts-g/-/npmts-g-6.0.0.tgz#491fd50f110967f1b68f14237e7ea5157bf4ddb3"
dependencies:
"@types/shelljs" "^0.3.33"
semver "^5.3.0"
shelljs "^0.7.5"
smartfile "^4.1.9"
smartq "^1.1.1"
typings-global "^1.0.14"
number-is-nan@^1.0.0:
@ -869,15 +808,6 @@ ora@^0.2.1, ora@^0.2.3:
cli-spinners "^0.1.2"
object-assign "^4.0.1"
ora@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/ora/-/ora-0.3.0.tgz#367a078ad25cfb096da501115eb5b401e07d7495"
dependencies:
chalk "^1.1.1"
cli-cursor "^1.0.2"
cli-spinners "^0.2.0"
log-symbols "^1.0.2"
ora@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/ora/-/ora-1.1.0.tgz#69aaa4a209630e43b142c5f7ff41820da87e2faf"
@ -939,15 +869,15 @@ process-nextick-args@^1.0.6, process-nextick-args@~1.0.6:
version "1.0.7"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
projectinfo@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/projectinfo/-/projectinfo-3.0.1.tgz#3d78c2f28676c93216ed30c962e9d8f81ef13b23"
projectinfo@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/projectinfo/-/projectinfo-3.0.2.tgz#87edb5ccab792481226c558151b81ccfa9e070df"
dependencies:
"@types/q" "0.0.32"
q "^1.4.1"
smartfile "4.1.0"
smartpath "^3.2.6"
smartstring "2.0.22"
smartfile "4.1.6"
smartpath "^3.2.8"
smartstring "2.0.24"
typings-global "^1.0.14"
punycode@^1.4.1:
@ -966,10 +896,6 @@ qenv@^1.1.3:
smartfile "^4.1.3"
typings-global "^1.0.14"
qs@~6.2.0:
version "6.2.1"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.1.tgz#ce03c5ff0935bc1d9d69a9f14cbd18e568d67625"
qs@~6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442"
@ -989,18 +915,7 @@ read-pkg@^1.0.0:
normalize-package-data "^2.3.2"
path-type "^1.0.0"
readable-stream@^2.0.2, readable-stream@~2.0.5:
version "2.0.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
dependencies:
core-util-is "~1.0.0"
inherits "~2.0.1"
isarray "~1.0.0"
process-nextick-args "~1.0.6"
string_decoder "~0.10.x"
util-deprecate "~1.0.1"
readable-stream@^2.1.5:
readable-stream@^2.0.2, readable-stream@^2.1.5:
version "2.2.2"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e"
dependencies:
@ -1022,41 +937,11 @@ remove-trailing-separator@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4"
replace-ext@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
replace-ext@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
request@2.75.x:
version "2.75.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.75.0.tgz#d2b8268a286da13eaa5d01adf5d18cc90f657d93"
dependencies:
aws-sign2 "~0.6.0"
aws4 "^1.2.1"
bl "~1.1.2"
caseless "~0.11.0"
combined-stream "~1.0.5"
extend "~3.0.0"
forever-agent "~0.6.1"
form-data "~2.0.0"
har-validator "~2.0.6"
hawk "~3.1.3"
http-signature "~1.1.0"
is-typedarray "~1.0.0"
isstream "~0.1.2"
json-stringify-safe "~5.0.1"
mime-types "~2.1.7"
node-uuid "~1.4.7"
oauth-sign "~0.8.1"
qs "~6.2.0"
stringstream "~0.0.4"
tough-cookie "~2.3.0"
tunnel-agent "~0.4.1"
request@^2.75.0, request@^2.79.0:
request@^2.79.0:
version "2.79.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de"
dependencies:
@ -1111,12 +996,6 @@ restore-cursor@^2.0.0:
onetime "^2.0.0"
signal-exit "^3.0.2"
rimraf@^2.2.8:
version "2.5.4"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04"
dependencies:
glob "^7.0.5"
rxjs@^5.0.0-beta.12, rxjs@^5.0.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.1.0.tgz#0aa9018b7f440b505fa42bd742b6738be550e720"
@ -1131,7 +1010,7 @@ set-blocking@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7"
shelljs@^0.7.4, shelljs@^0.7.5, shelljs@^0.7.6:
shelljs@^0.7.4, shelljs@^0.7.6:
version "0.7.6"
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
dependencies:
@ -1174,26 +1053,24 @@ smartenv@^2.0.0:
q "^1.4.1"
typings-global "^1.0.14"
smartfile@4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.1.0.tgz#c7fcd881cdab1d35779cbc30f4a38824d54787dc"
smartfile@4.1.6:
version "4.1.6"
resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.1.6.tgz#d71026aefef99233c56766c3c6c11afc41a19b3a"
dependencies:
"@types/fs-extra" "0.x.x"
"@types/q" "0.x.x"
"@types/vinyl" "^1.1.29"
beautylog "^5.0.23"
fs-extra "^0.30.0"
glob "^7.1.0"
js-yaml "^3.6.1"
q "^1.4.1"
request "^2.75.0"
"@types/vinyl" "^2.0.0"
fs-extra "^2.0.0"
glob "^7.1.1"
js-yaml "^3.7.0"
require-reload "0.2.2"
smartpath "^3.2.2"
smartpath "^3.2.7"
smartq "^1.0.4"
smartrequest "^1.0.4"
typings-global "^1.0.14"
vinyl "^1.2.0"
vinyl-file "^2.0.0"
vinyl "^2.0.1"
vinyl-file "^3.0.0"
smartfile@^4.0.21, smartfile@^4.1.3, smartfile@^4.1.5:
smartfile@^4.1.3:
version "4.1.5"
resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.1.5.tgz#a1c9023a4a28e82a55e939a664200d9b0a1c3b44"
dependencies:
@ -1210,6 +1087,23 @@ smartfile@^4.0.21, smartfile@^4.1.3, smartfile@^4.1.5:
vinyl "^2.0.1"
vinyl-file "^3.0.0"
smartfile@^4.1.9:
version "4.1.9"
resolved "https://registry.yarnpkg.com/smartfile/-/smartfile-4.1.9.tgz#d789032193a45493607b8b37ff5811942f832008"
dependencies:
"@types/fs-extra" "0.x.x"
"@types/vinyl" "^2.0.0"
fs-extra "^2.0.0"
glob "^7.1.1"
js-yaml "^3.8.2"
require-reload "0.2.2"
smartpath "^3.2.8"
smartq "^1.1.1"
smartrequest "^1.0.4"
typings-global "^1.0.14"
vinyl "^2.0.1"
vinyl-file "^3.0.0"
smartparam@0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/smartparam/-/smartparam-0.1.1.tgz#51c526bf38b0965007b21edd3e96c7e179c93591"
@ -1220,13 +1114,20 @@ smartparam@0.1.1:
q "^1.4.1"
typings-global "^1.0.3"
smartpath@^3.2.2, smartpath@^3.2.6, smartpath@^3.2.7:
smartpath@^3.2.7:
version "3.2.7"
resolved "https://registry.yarnpkg.com/smartpath/-/smartpath-3.2.7.tgz#01688f01f9abbaa418dc2be561d9b0eaef3e5782"
dependencies:
home "^1.0.1"
typings-global "^1.0.14"
smartpath@^3.2.8:
version "3.2.8"
resolved "https://registry.yarnpkg.com/smartpath/-/smartpath-3.2.8.tgz#4834bd3a8bae2295baacadba23c87a501952f940"
dependencies:
home "^1.0.1"
typings-global "^1.0.14"
smartq@^1.0.4, smartq@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.0.tgz#d9887b20de663ab8d2032d2e6e82817633ead12a"
@ -1234,9 +1135,33 @@ smartq@^1.0.4, smartq@^1.1.0:
typed-promisify "^0.3.0"
typings-global "^1.0.14"
smartstring@2.0.22, smartstring@^2.0.22:
version "2.0.22"
resolved "https://registry.yarnpkg.com/smartstring/-/smartstring-2.0.22.tgz#6b55904f527457546dd414cc4dadbfe0203257d9"
smartq@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
dependencies:
typed-promisify "^0.3.0"
typings-global "^1.0.14"
smartrequest@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/smartrequest/-/smartrequest-1.0.4.tgz#86af2163ae28f1031b01c2d8ad8c429733920611"
dependencies:
smartq "^1.1.0"
typings-global "^1.0.14"
smartshell@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.6.tgz#27b1c79029784abe72ac7e91fe698b7ebecc6629"
dependencies:
"@types/shelljs" "^0.6.0"
"@types/which" "^1.0.28"
shelljs "^0.7.6"
smartq "^1.1.0"
which "^1.2.12"
smartstring@2.0.24, smartstring@^2.0.24:
version "2.0.24"
resolved "https://registry.yarnpkg.com/smartstring/-/smartstring-2.0.24.tgz#dc1c5efb738c10a2d7daeea3d800ad2ecc65a26c"
dependencies:
js-base64 "^2.1.9"
typings-global "^1.0.14"
@ -1343,10 +1268,6 @@ timers-ext@0.1:
es5-ext "~0.10.2"
next-tick "~0.2.2"
timespan@2.3.x:
version "2.3.0"
resolved "https://registry.yarnpkg.com/timespan/-/timespan-2.3.0.tgz#4902ce040bd13d845c8f59b27e9d59bad6f39929"
tough-cookie@~2.3.0:
version "2.3.2"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a"
@ -1365,7 +1286,7 @@ typed-promisify@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
typings-global@^1.0.13, typings-global@^1.0.14, typings-global@^1.0.3:
typings-global@^1.0.14, typings-global@^1.0.3:
version "1.0.14"
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.14.tgz#ab682720a03d6b9278869fb5c30c30d7dc61d12c"
dependencies:
@ -1393,17 +1314,6 @@ verror@1.3.6:
dependencies:
extsprintf "1.0.2"
vinyl-file@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-2.0.0.tgz#a7ebf5ffbefda1b7d18d140fcb07b223efb6751a"
dependencies:
graceful-fs "^4.1.2"
pify "^2.3.0"
pinkie-promise "^2.0.0"
strip-bom "^2.0.0"
strip-bom-stream "^2.0.0"
vinyl "^1.1.0"
vinyl-file@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/vinyl-file/-/vinyl-file-3.0.0.tgz#b104d9e4409ffa325faadd520642d0a3b488b365"
@ -1414,14 +1324,6 @@ vinyl-file@^3.0.0:
strip-bom-stream "^2.0.0"
vinyl "^2.0.1"
vinyl@^1.1.0, vinyl@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
dependencies:
clone "^1.0.0"
clone-stats "^0.0.1"
replace-ext "0.0.1"
vinyl@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.0.1.tgz#1c3b4931e7ac4c1efee743f3b91a74c094407bb6"
@ -1438,6 +1340,12 @@ which-module@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
which@^1.2.12:
version "1.2.14"
resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
dependencies:
isexe "^2.0.0"
wrap-ansi@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85"