fix(core): update

This commit is contained in:
Philipp Kunz 2021-09-30 11:14:43 +02:00
parent f930f3a6a7
commit 08ead4258f
7 changed files with 27178 additions and 1271 deletions

View File

@ -1,62 +0,0 @@
# @gitzone/npmdocker
develop npm modules cross platform with docker
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@gitzone/npmdocker)
* [gitlab.com (source)](https://gitlab.com/gitzone/npmdocker)
* [github.com (source mirror)](https://github.com/gitzone/npmdocker)
* [docs (typedoc)](https://gitzone.gitlab.io/npmdocker/)
## Status for master
[![build status](https://gitlab.com/gitzone/npmdocker/badges/master/build.svg)](https://gitlab.com/gitzone/npmdocker/commits/master)
[![coverage report](https://gitlab.com/gitzone/npmdocker/badges/master/coverage.svg)](https://gitlab.com/gitzone/npmdocker/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/@gitzone/npmdocker.svg)](https://www.npmjs.com/package/@gitzone/npmdocker)
[![Known Vulnerabilities](https://snyk.io/test/npm/@gitzone/npmdocker/badge.svg)](https://snyk.io/test/npm/@gitzone/npmdocker)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
## Usage
Use TypeScript for best in class instellisense.
### Why does this package exist?
Sometimes you want a clean and fresh linux environment everytime you test your package.
Usually this is the default i CI, but locally behaviour tends to defer.
### Where does it work
The npmdocker package works in everywhere where the docker cli is available. e.g.:
- docker toolbox
- native docker application
- docker in docker
- mounted docker.sock
### How do I use it?
create a npmextra.json in the project's root directory
```json
{
"npmdocker": {
"baseImage": "hosttoday/ht-docker-node:npmts",
"command": "npmci test stable",
"dockerSock": false
}
}
```
| option | description |
| ----------- | ------------------------------------------------------------------------------------- |
| baseImage | the base image that is the context for your project |
| command | the cli command to run within the the project's directory inside the docker container |
| dockersSock | wether or not the testcontainer will have access to the docker.sock of the host |
For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
[![repo-footer](https://gitzone.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)

28328
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -33,28 +33,28 @@
}, },
"homepage": "https://gitlab.com/gitzone/npmdocker#README", "homepage": "https://gitlab.com/gitzone/npmdocker#README",
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.11", "@gitzone/tsbuild": "^2.1.27",
"@gitzone/tsrun": "^1.2.6", "@gitzone/tsrun": "^1.2.17",
"@gitzone/tstest": "^1.0.23", "@gitzone/tstest": "^1.0.57",
"@pushrocks/tapbundle": "^3.0.9", "@pushrocks/tapbundle": "^3.2.14",
"@types/node": "^12.0.2", "@types/node": "^16.10.1",
"tslint": "^5.16.0", "tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0" "tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@pushrocks/npmextra": "^3.0.5", "@pushrocks/npmextra": "^3.0.9",
"@pushrocks/projectinfo": "^4.0.2", "@pushrocks/projectinfo": "^4.0.5",
"@pushrocks/qenv": "^4.0.0", "@pushrocks/qenv": "^4.0.10",
"@pushrocks/smartanalytics": "^2.0.15", "@pushrocks/smartanalytics": "^2.0.15",
"@pushrocks/smartcli": "^3.0.7", "@pushrocks/smartcli": "^3.0.14",
"@pushrocks/smartfile": "^7.0.2", "@pushrocks/smartfile": "^8.0.10",
"@pushrocks/smartlog": "^2.0.19", "@pushrocks/smartlog": "^2.0.44",
"@pushrocks/smartlog-destination-local": "^7.0.5", "@pushrocks/smartlog-destination-local": "^8.0.8",
"@pushrocks/smartlog-source-ora": "^1.0.7", "@pushrocks/smartlog-source-ora": "^1.0.9",
"@pushrocks/smartopen": "^1.0.8", "@pushrocks/smartopen": "^1.0.22",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.1.6",
"@pushrocks/smartshell": "^2.0.22", "@pushrocks/smartshell": "^2.0.28",
"@pushrocks/smartstring": "^3.0.10", "@pushrocks/smartstring": "^3.0.24",
"@types/shelljs": "^0.8.5" "@types/shelljs": "^0.8.9"
} }
} }

View File

@ -1,20 +0,0 @@
/**
* smartanalytics:
* We count executions of this tool to keep track which of our tools are really used.
* This insight is used to plan spending our limited resources for improving them.
* Any submitted analytics data is fully anonymized (no Ips or any other personal information is tracked).
* Feel free to dig into the smartanalytics package, if you are interested in how it works.
* Our privacy policy can be found here: https://lossless.gmbh/privacy.html
* The privacy policy is also linked in the readme, so we hope this behaviour does not come as a surprise to you.
* Have a nice day and regards
* Your Open Source team at Lossless GmbH :)
*/
import * as smartanalytics from '@pushrocks/smartanalytics';
const npmdockerAnalytics = new smartanalytics.Analytics({
apiEndPoint: 'https://pubapi.lossless.one',
appName: 'tsdocker',
projectId: 'gitzone'
});
npmdockerAnalytics.recordEvent('npmtoolexecution', {
somedata: 'somedata'
});

View File

@ -1,4 +1,3 @@
import './analytics';
import * as plugins from './tsdocker.plugins'; import * as plugins from './tsdocker.plugins';
import * as cli from './tsdocker.cli'; import * as cli from './tsdocker.cli';

View File

@ -11,7 +11,7 @@ const tsdockerCli = new plugins.smartcli.Smartcli();
export let run = () => { export let run = () => {
tsdockerCli.standardTask().subscribe(async argvArg => { tsdockerCli.standardTask().subscribe(async argvArg => {
let configArg = await ConfigModule.run().then(DockerModule.run); const configArg = await ConfigModule.run().then(DockerModule.run);
if (configArg.exitCode === 0) { if (configArg.exitCode === 0) {
logger.log('success', 'container ended all right!'); logger.log('success', 'container ended all right!');
} else { } else {
@ -68,7 +68,7 @@ export let run = () => {
}); });
logger.log('ok', 'Starting speedtest'); logger.log('ok', 'Starting speedtest');
await smartshellInstance.exec( await smartshellInstance.exec(
`docker pull tianon/speedtest && docker run --rm tianon/speedtest` `docker pull tianon/speedtest && docker run --rm tianon/speedtest --accept-license --accept-gdpr`
); );
}); });

View File

@ -6,7 +6,7 @@ export interface IConfig {
command: string; command: string;
dockerSock: boolean; dockerSock: boolean;
exitCode?: number; exitCode?: number;
keyValueObject: any[]; keyValueObject: {[key: string]: any};
} }
const getQenvKeyValueObject = async () => { const getQenvKeyValueObject = async () => {