update dependencies and greeting

This commit is contained in:
Philipp Kunz 2017-07-16 13:58:41 +02:00
parent b3d78f8ce5
commit 9176b56035
4 changed files with 680 additions and 293 deletions

View File

@ -28,6 +28,7 @@ npmdockerAnalytics.sendEvent('npm', 'exec', 'git.zone');
let npmdockerCli = new plugins.smartcli.Smartcli(); let npmdockerCli = new plugins.smartcli.Smartcli();
exports.run = () => { exports.run = () => {
npmdockerCli.standardTask().then((argvArg) => __awaiter(this, void 0, void 0, function* () { npmdockerCli.standardTask().then((argvArg) => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.figletSync('npmdocker');
let configArg = yield ConfigModule.run() let configArg = yield ConfigModule.run()
.then(DockerModule.run); .then(DockerModule.run);
if (configArg.exitCode === 0) { if (configArg.exitCode === 0) {
@ -38,6 +39,9 @@ exports.run = () => {
process.exit(1); process.exit(1);
} }
})); }));
/**
* this command is executed inside docker and meant for use from outside docker
*/
npmdockerCli.addCommand('runinside').then((argvArg) => __awaiter(this, void 0, void 0, function* () { npmdockerCli.addCommand('runinside').then((argvArg) => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.ok('Allright. We are now in Docker!'); plugins.beautylog.ok('Allright. We are now in Docker!');
plugins.beautylog.log('now trying to run your specified command'); plugins.beautylog.log('now trying to run your specified command');
@ -66,9 +70,10 @@ exports.run = () => {
plugins.beautylog.ora.endOk('docker environment now is clean!'); plugins.beautylog.ora.endOk('docker environment now is clean!');
})); }));
npmdockerCli.addCommand('speedtest').then((argvArg) => __awaiter(this, void 0, void 0, function* () { npmdockerCli.addCommand('speedtest').then((argvArg) => __awaiter(this, void 0, void 0, function* () {
plugins.beautylog.figletSync('npmdocker');
plugins.beautylog.ok('Starting speedtest'); plugins.beautylog.ok('Starting speedtest');
yield plugins.smartshell.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`); yield plugins.smartshell.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`);
})); }));
npmdockerCli.startParse(); npmdockerCli.startParse();
}; };
//# s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QTtZQUNyRCxNQUFNLE9BQU8sQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLDBEQUEwRCxDQUFDLENBQUE7UUFDM0YsQ0FBQztRQUNELE9BQU8sQ0FBQyxTQUFTLENBQUMsR0FBRyxDQUFDLEtBQUssQ0FBQyxrQ0FBa0MsQ0FBQyxDQUFBO0lBQ2pFLENBQUMsQ0FBQSxDQUFDLENBQUE7SUFFRixZQUFZLENBQUMsVUFBVSxDQUFDLFdBQVcsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFPLE9BQU87UUFDdEQsT0FBTyxDQUFDLFNBQVMsQ0FBQyxVQUFVLENBQUMsV0FBVyxDQUFDLENBQUE7UUFDekMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxFQUFFLENBQUMsb0JBQW9CLENBQUMsQ0FBQTtRQUMxQyxNQUFNLE9BQU8sQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFDLGtFQUFrRSxDQUFDLENBQUE7SUFDbkcsQ0FBQyxDQUFBLENBQUMsQ0FBQTtJQUVGLFlBQVksQ0FBQyxVQUFVLEVBQUUsQ0FBQTtBQUMzQixDQUFDLENBQUEifQ==

View File

@ -35,16 +35,16 @@
"devDependencies": {}, "devDependencies": {},
"dependencies": { "dependencies": {
"@types/shelljs": "0.x.x", "@types/shelljs": "0.x.x",
"beautylog": "^6.1.5", "beautylog": "^6.1.10",
"npmextra": "^2.0.5", "npmextra": "^2.0.7",
"projectinfo": "^3.0.2", "projectinfo": "^3.0.2",
"qenv": "^1.1.3", "qenv": "^1.1.7",
"smartanalytics": "^1.0.6", "smartanalytics": "^1.0.6",
"smartcli": "^2.0.1", "smartcli": "^2.0.7",
"smartfile": "^4.1.9", "smartfile": "^4.2.17",
"smartq": "^1.1.1", "smartq": "^1.1.6",
"smartshell": "^1.0.6", "smartshell": "^1.0.8",
"smartstring": "^2.0.24", "smartstring": "^2.0.24",
"typings-global": "^1.0.14" "typings-global": "^1.0.19"
} }
} }

View File

@ -24,6 +24,7 @@ let npmdockerCli = new plugins.smartcli.Smartcli()
export let run = () => { export let run = () => {
npmdockerCli.standardTask().then(async (argvArg) => { npmdockerCli.standardTask().then(async (argvArg) => {
plugins.beautylog.figletSync('npmdocker')
let configArg = await ConfigModule.run() let configArg = await ConfigModule.run()
.then(DockerModule.run) .then(DockerModule.run)
if (configArg.exitCode === 0) { if (configArg.exitCode === 0) {
@ -34,6 +35,9 @@ export let run = () => {
} }
}) })
/**
* this command is executed inside docker and meant for use from outside docker
*/
npmdockerCli.addCommand('runinside').then(async (argvArg) => { npmdockerCli.addCommand('runinside').then(async (argvArg) => {
plugins.beautylog.ok('Allright. We are now in Docker!') plugins.beautylog.ok('Allright. We are now in Docker!')
plugins.beautylog.log('now trying to run your specified command') plugins.beautylog.log('now trying to run your specified command')
@ -68,6 +72,7 @@ export let run = () => {
}) })
npmdockerCli.addCommand('speedtest').then(async (argvArg) => { npmdockerCli.addCommand('speedtest').then(async (argvArg) => {
plugins.beautylog.figletSync('npmdocker')
plugins.beautylog.ok('Starting speedtest') plugins.beautylog.ok('Starting speedtest')
await plugins.smartshell.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`) await plugins.smartshell.exec(`docker pull tianon/speedtest && docker run --rm tianon/speedtest`)
}) })

945
yarn.lock

File diff suppressed because it is too large Load Diff