Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
889a3fdc5a | |||
565c002127 | |||
6fec1a00ea | |||
e1f2c28718 | |||
9efab07424 | |||
18d16feaa9 | |||
df09ff0f9b | |||
7b50ceb69f |
@ -4,10 +4,7 @@
|
||||
"cli": true
|
||||
},
|
||||
"npmci": {
|
||||
"npmGlobalTools": [
|
||||
"@gitzone/npmts",
|
||||
"ts-node"
|
||||
],
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
}
|
||||
}
|
1387
package-lock.json
generated
1387
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
33
package.json
33
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@gitzone/npmdocker",
|
||||
"version": "1.2.24",
|
||||
"version": "1.2.28",
|
||||
"private": false,
|
||||
"description": "develop npm modules cross platform with docker",
|
||||
"main": "dist/index.js",
|
||||
@ -10,7 +10,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "(npm run clean && npm run setupCheck && npm run testStandard && npm run testSpeed)",
|
||||
"build": "tsbuild",
|
||||
"build": "(tsbuild)",
|
||||
"testStandard": "(cd test/ && node ../cli.ts.js)",
|
||||
"testSpeed": "(cd test/ && node ../cli.ts.js speedtest)",
|
||||
"testClean": "(cd test/ && node ../cli.ts.js clean --all)",
|
||||
@ -32,23 +32,24 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/gitzone/npmdocker#README",
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.0.22",
|
||||
"@gitzone/tsrun": "^1.1.12",
|
||||
"@gitzone/tstest": "^1.0.15",
|
||||
"@pushrocks/tapbundle": "^3.0.7",
|
||||
"@types/node": "^10.9.4"
|
||||
"@gitzone/tsbuild": "^2.1.11",
|
||||
"@gitzone/tsrun": "^1.2.6",
|
||||
"@gitzone/tstest": "^1.0.20",
|
||||
"@pushrocks/tapbundle": "^3.0.9",
|
||||
"@types/node": "^12.0.0",
|
||||
"tslint": "^5.16.0",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@pushrocks/npmextra": "^3.0.1",
|
||||
"@pushrocks/projectinfo": "^4.0.2",
|
||||
"@pushrocks/qenv": "^2.0.2",
|
||||
"@pushrocks/smartcli": "^3.0.4",
|
||||
"@pushrocks/smartfile": "^6.0.8",
|
||||
"@pushrocks/smartpromise": "^2.0.5",
|
||||
"@pushrocks/smartshell": "^2.0.6",
|
||||
"@pushrocks/smartstring": "^3.0.4",
|
||||
"@types/shelljs": "^0.8.0",
|
||||
"beautylog": "^6.1.10",
|
||||
"smartanalytics": "^2.0.9"
|
||||
"@pushrocks/qenv": "^4.0.0",
|
||||
"@pushrocks/smartanalytics": "^2.0.15",
|
||||
"@pushrocks/smartcli": "^3.0.7",
|
||||
"@pushrocks/smartfile": "^7.0.2",
|
||||
"@pushrocks/smartpromise": "^3.0.2",
|
||||
"@pushrocks/smartshell": "^2.0.13",
|
||||
"@pushrocks/smartstring": "^3.0.10",
|
||||
"@types/shelljs": "^0.8.5"
|
||||
}
|
||||
}
|
||||
|
@ -9,8 +9,8 @@
|
||||
* Have a nice day and regards
|
||||
* Your Open Source team at Lossless GmbH :)
|
||||
*/
|
||||
import * as smartanalytics from 'smartanalytics';
|
||||
let npmdockerAnalytics = new smartanalytics.Analytics({
|
||||
import * as smartanalytics from '@pushrocks/smartanalytics';
|
||||
const npmdockerAnalytics = new smartanalytics.Analytics({
|
||||
apiEndPoint: 'https://pubapi.lossless.one',
|
||||
appName: 'npmdocker',
|
||||
projectId: 'gitzone'
|
||||
|
@ -9,7 +9,6 @@ let npmdockerCli = new plugins.smartcli.Smartcli();
|
||||
|
||||
export let run = () => {
|
||||
npmdockerCli.standardTask().subscribe(async argvArg => {
|
||||
plugins.beautylog.figletSync('npmdocker');
|
||||
let configArg = await ConfigModule.run().then(DockerModule.run);
|
||||
if (configArg.exitCode === 0) {
|
||||
plugins.beautylog.success('container ended all right!');
|
||||
@ -28,7 +27,7 @@ export let run = () => {
|
||||
let configArg = await ConfigModule.run();
|
||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
executor: 'bash'
|
||||
})
|
||||
});
|
||||
await smartshellInstance.exec(configArg.command).then(response => {
|
||||
if (response.exitCode !== 0) {
|
||||
process.exit(1);
|
||||
@ -42,7 +41,7 @@ export let run = () => {
|
||||
if (argvArg.all) {
|
||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
executor: 'bash'
|
||||
})
|
||||
});
|
||||
plugins.beautylog.ora.text('killing any running docker containers...');
|
||||
await smartshellInstance.exec(`docker kill $(docker ps -q)`);
|
||||
|
||||
@ -50,7 +49,7 @@ export let run = () => {
|
||||
await smartshellInstance.exec(`docker rm $(docker ps -a -q)`);
|
||||
|
||||
plugins.beautylog.ora.text('removing images...');
|
||||
await smartshellInstance.exec(`docker rmi $(docker images -q -f dangling=true)`);
|
||||
await smartshellInstance.exec(`docker rmi -f $(docker images -q -f dangling=true)`);
|
||||
|
||||
plugins.beautylog.ora.text('removing all other images...');
|
||||
await smartshellInstance.exec(`docker rmi $(docker images -a -q)`);
|
||||
@ -64,7 +63,7 @@ export let run = () => {
|
||||
npmdockerCli.addCommand('speedtest').subscribe(async argvArg => {
|
||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
executor: 'bash'
|
||||
})
|
||||
});
|
||||
plugins.beautylog.figletSync('npmdocker');
|
||||
plugins.beautylog.ok('Starting speedtest');
|
||||
await smartshellInstance.exec(
|
||||
|
@ -4,7 +4,7 @@ import * as snippets from './npmdocker.snippets';
|
||||
|
||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||
executor: 'bash'
|
||||
})
|
||||
});
|
||||
|
||||
// interfaces
|
||||
import { IConfig } from './npmdocker.config';
|
||||
@ -74,7 +74,7 @@ let buildDockerImage = async () => {
|
||||
plugins.beautylog.ok('Dockerimage built!');
|
||||
};
|
||||
|
||||
let buildDockerProjectMountString = async () => {
|
||||
const buildDockerProjectMountString = async () => {
|
||||
if (process.env.CI !== 'true') {
|
||||
dockerData.dockerProjectMountString = `-v ${paths.cwd}:/workspace`;
|
||||
}
|
||||
@ -83,7 +83,7 @@ let buildDockerProjectMountString = async () => {
|
||||
/**
|
||||
* builds an environment string that docker cli understands
|
||||
*/
|
||||
let buildDockerEnvString = async () => {
|
||||
const buildDockerEnvString = async () => {
|
||||
for (let keyValueObjectArg of config.keyValueObjectArray) {
|
||||
let envString = (dockerData.dockerEnvString =
|
||||
dockerData.dockerEnvString + `-e ${keyValueObjectArg.key}=${keyValueObjectArg.value} `);
|
||||
@ -93,7 +93,7 @@ let buildDockerEnvString = async () => {
|
||||
/**
|
||||
* creates string to mount the docker.sock inside the testcontainer
|
||||
*/
|
||||
let buildDockerSockString = async () => {
|
||||
const buildDockerSockString = async () => {
|
||||
if (config.dockerSock) {
|
||||
dockerData.dockerSockString = `-v /var/run/docker.sock:/var/run/docker.sock`;
|
||||
}
|
||||
|
0
ts/npmdocker.logging.ts
Normal file
0
ts/npmdocker.logging.ts
Normal file
@ -1,3 +1,10 @@
|
||||
{
|
||||
"extends": "tslint-config-standard"
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
||||
|
Reference in New Issue
Block a user