Compare commits

...

10 Commits

Author SHA1 Message Date
889a3fdc5a 1.2.28 2019-05-09 10:06:59 +02:00
565c002127 fix(core): update 2019-05-09 10:06:59 +02:00
6fec1a00ea 1.2.27 2018-10-29 01:09:46 +01:00
e1f2c28718 fix(ci): remove npmts from build process 2018-10-29 01:09:45 +01:00
9efab07424 1.2.26 2018-10-29 01:07:40 +01:00
18d16feaa9 fix(core): update 2018-10-29 01:07:39 +01:00
df09ff0f9b 1.2.25 2018-10-28 21:40:32 +01:00
7b50ceb69f fix(clean): images are now cleaned in a more thorough way 2018-10-28 21:40:31 +01:00
d1fd76e8d0 1.2.24 2018-09-16 23:14:33 +02:00
b71fa1bc36 fix(core): update 2018-09-16 23:14:33 +02:00
8 changed files with 775 additions and 686 deletions

View File

@ -4,10 +4,7 @@
"cli": true
},
"npmci": {
"npmGlobalTools": [
"@gitzone/npmts",
"ts-node"
],
"npmGlobalTools": [],
"npmAccessLevel": "public"
}
}

1387
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,7 @@
{
"name": "@gitzone/npmdocker",
"version": "1.2.23",
"version": "1.2.28",
"private": false,
"description": "develop npm modules cross platform with docker",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
@ -9,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)",
@ -31,24 +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"
},
"private": true
"@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"
}
}

View File

@ -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'

View File

@ -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(

View File

@ -4,7 +4,7 @@ import * as snippets from './npmdocker.snippets';
const smartshellInstance = new plugins.smartshell.Smartshell({
executor: 'bash'
})
});
// interfaces
import { IConfig } from './npmdocker.config';
@ -28,7 +28,7 @@ let dockerData = {
let checkDocker = () => {
let done = plugins.smartpromise.defer();
plugins.beautylog.ora.text('checking docker...');
if (smartshellInstance.exec('which docker')) {
plugins.beautylog.ok('Docker found!');
done.resolve();
@ -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
View File

View 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"
}