Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
b99b55a05b | |||
133bf0abe5 | |||
df260bbab9 | |||
080bd2bc48 | |||
a0032b8168 | |||
a09efd1125 | |||
4ce28c7979 | |||
415eaea56e | |||
bde4597dd9 | |||
80946d4f0c | |||
2155e886ef | |||
8b61a90b5f | |||
f48eadc814 | |||
9bdaaa0c30 | |||
5f681ff237 |
29
.gitignore
vendored
29
.gitignore
vendored
@ -1,8 +1,23 @@
|
|||||||
node_modules/
|
|
||||||
coverage/
|
|
||||||
pages/
|
|
||||||
public/
|
|
||||||
|
|
||||||
test/
|
|
||||||
assets/
|
|
||||||
.nogit/
|
.nogit/
|
||||||
|
|
||||||
|
# artifacts
|
||||||
|
coverage/
|
||||||
|
public/
|
||||||
|
pages/
|
||||||
|
|
||||||
|
# installs
|
||||||
|
node_modules/
|
||||||
|
|
||||||
|
# caches
|
||||||
|
.yarn/
|
||||||
|
.cache/
|
||||||
|
.rpt2_cache
|
||||||
|
|
||||||
|
# builds
|
||||||
|
dist/
|
||||||
|
dist_web/
|
||||||
|
dist_serve/
|
||||||
|
dist_ts_web/
|
||||||
|
|
||||||
|
# custom
|
||||||
|
test
|
||||||
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"typescript.tsdk": "node_modules/typescript/lib"
|
||||||
|
}
|
45
README.md
45
README.md
@ -1,25 +1,20 @@
|
|||||||
# npmdocker
|
# @gitzone/npmdocker
|
||||||
|
|
||||||
develop npm modules cross platform with docker
|
develop npm modules cross platform with docker
|
||||||
|
|
||||||
## Availabililty
|
## Availabililty and Links
|
||||||
|
* [npmjs.org (npm package)](https://www.npmjs.com/package/@gitzone/npmdocker)
|
||||||
[](https://www.npmjs.com/package/npmdocker)
|
* [gitlab.com (source)](https://gitlab.com/gitzone/npmdocker)
|
||||||
[](https://GitLab.com/gitzone/npmdocker)
|
* [github.com (source mirror)](https://github.com/gitzone/npmdocker)
|
||||||
[](https://github.com/gitzone/npmdocker)
|
* [docs (typedoc)](https://gitzone.gitlab.io/npmdocker/)
|
||||||
[](https://gitzone.gitlab.io/npmdocker/)
|
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
|
[](https://gitlab.com/gitzone/npmdocker/commits/master)
|
||||||
[](https://GitLab.com/gitzone/npmdocker/commits/master)
|
[](https://gitlab.com/gitzone/npmdocker/commits/master)
|
||||||
[](https://GitLab.com/gitzone/npmdocker/commits/master)
|
[](https://www.npmjs.com/package/@gitzone/npmdocker)
|
||||||
[](https://www.npmjs.com/package/npmdocker)
|
[](https://snyk.io/test/npm/@gitzone/npmdocker)
|
||||||
[](https://david-dm.org/gitzonetools/npmdocker)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://www.bithound.io/github/gitzonetools/npmdocker/master/dependencies/npm)
|
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||||
[](https://www.bithound.io/github/gitzonetools/npmdocker)
|
[](https://prettier.io/)
|
||||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
|
||||||
[](http://standardjs.com/)
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@ -34,10 +29,10 @@ Usually this is the default i CI, but locally behaviour tends to defer.
|
|||||||
|
|
||||||
The npmdocker package works in everywhere where the docker cli is available. e.g.:
|
The npmdocker package works in everywhere where the docker cli is available. e.g.:
|
||||||
|
|
||||||
* docker toolbox
|
- docker toolbox
|
||||||
* native docker application
|
- native docker application
|
||||||
* docker in docker
|
- docker in docker
|
||||||
* mounted docker.sock
|
- mounted docker.sock
|
||||||
|
|
||||||
### How do I use it?
|
### How do I use it?
|
||||||
|
|
||||||
@ -59,9 +54,9 @@ create a npmextra.json in the project's root directory
|
|||||||
| command | the cli command to run within the the project's directory inside the docker container |
|
| 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 |
|
| 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.
|
For further information read the linked docs at the top of this readme.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
[](https://git.zone)
|
[](https://maintainedby.lossless.com)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
FROM hosttoday/ht-docker-node:npmci
|
FROM hosttoday/ht-docker-node:npmci
|
||||||
RUN yarn global add npmdocker
|
RUN yarn global add @gitzone/tsdocker
|
||||||
COPY ./ /workspace
|
COPY ./ /workspace
|
||||||
WORKDIR /workspace
|
WORKDIR /workspace
|
||||||
ENV CI=true
|
ENV CI=true
|
||||||
CMD ["npmdocker","runinside"];
|
CMD ["tsdocker","runinside"];
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Docs for npmpage coming soon.
|
|
@ -6,5 +6,15 @@
|
|||||||
"npmci": {
|
"npmci": {
|
||||||
"npmGlobalTools": [],
|
"npmGlobalTools": [],
|
||||||
"npmAccessLevel": "public"
|
"npmAccessLevel": "public"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"module": {
|
||||||
|
"githost": "gitlab.com",
|
||||||
|
"gitscope": "gitzone",
|
||||||
|
"gitrepo": "npmdocker",
|
||||||
|
"shortDescription": "develop npm modules cross platform with docker",
|
||||||
|
"npmPackagename": "@gitzone/npmdocker",
|
||||||
|
"license": "MIT"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
383
package-lock.json
generated
383
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/npmdocker",
|
"name": "@gitzone/tsdocker",
|
||||||
"version": "1.2.28",
|
"version": "1.2.35",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -114,7 +114,6 @@
|
|||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/consolecolor/-/consolecolor-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/consolecolor/-/consolecolor-2.0.1.tgz",
|
||||||
"integrity": "sha512-iOFCHVeFZ2OywbdwSxVI4/wokkcLrXVdHLgvMmkNhJ220eeLgjNZWx3EJo3vNW3zq5ybCSCUIq0878djBxrWpw==",
|
"integrity": "sha512-iOFCHVeFZ2OywbdwSxVI4/wokkcLrXVdHLgvMmkNhJ220eeLgjNZWx3EJo3vNW3zq5ybCSCUIq0878djBxrWpw==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-256-colors": "^1.1.0"
|
"ansi-256-colors": "^1.1.0"
|
||||||
}
|
}
|
||||||
@ -138,14 +137,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/lik": {
|
"@pushrocks/lik": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/lik/-/lik-3.0.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2flik/-/lik-3.0.5.tgz",
|
||||||
"integrity": "sha512-6dwRg7WMdY9drlqfo6NzOcw5ubVWYvIOSSMZz4Jsojpa8aDVwXd2VkD7sxO/PJRrbZzHkx/JXoY/epcWRjngUw==",
|
"integrity": "sha512-pc5Nq0WUysS34qPpyiZXiX254kL3vyRVbt3D36Q5QU+eHhxAThHofSzgOdyVHUZU2WFoaMlKowIVsyUFzIkfdw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
"@pushrocks/smartdelay": "^2.0.2",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
"@types/lodash": "^4.14.112",
|
"@pushrocks/smartrx": "^2.0.3",
|
||||||
|
"@pushrocks/smarttime": "^3.0.5",
|
||||||
"@types/minimatch": "^3.0.3",
|
"@types/minimatch": "^3.0.3",
|
||||||
"lodash": "^4.17.10",
|
|
||||||
"minimatch": "^3.0.4",
|
"minimatch": "^3.0.4",
|
||||||
"symbol-tree": "^3.2.2"
|
"symbol-tree": "^3.2.2"
|
||||||
},
|
},
|
||||||
@ -154,80 +154,19 @@
|
|||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
||||||
},
|
|
||||||
"@types/lodash": {
|
|
||||||
"version": "4.14.116",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz",
|
|
||||||
"integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg=="
|
|
||||||
},
|
|
||||||
"@types/minimatch": {
|
|
||||||
"version": "3.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
|
||||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
|
||||||
},
|
|
||||||
"lodash": {
|
|
||||||
"version": "4.17.11",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
|
||||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/npmextra": {
|
"@pushrocks/npmextra": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/npmextra/-/npmextra-3.0.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fnpmextra/-/npmextra-3.0.5.tgz",
|
||||||
"integrity": "sha512-BEqmVD1a9qzMkJJiNlRVqWxM553F3aAjOIr9eOFNG8rtXPhEdHowXiLRDHctwBISLeNkA0qe6vjUvOtixkXEWA==",
|
"integrity": "sha512-ZMx6zf4LxwsNVqIAi2Z4xa2FKfhhyxWIVepLBTXZA9Eu8VXWoqgZ6uTyE3cTqgdfa8WNwn9TT930LeroamO+Mw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartfile": "^6.0.8",
|
"@pushrocks/smartfile": "^7.0.2",
|
||||||
"@pushrocks/smartlog": "^2.0.1",
|
"@pushrocks/smartlog": "^2.0.19",
|
||||||
"@pushrocks/smartpath": "^4.0.1",
|
"@pushrocks/smartpath": "^4.0.1",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/taskbuffer": "^2.0.5",
|
"@pushrocks/taskbuffer": "^2.0.7"
|
||||||
"smartlodash": "^1.0.1"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@pushrocks/smartfile": {
|
|
||||||
"version": "6.0.12",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-6.0.12.tgz",
|
|
||||||
"integrity": "sha512-89abBQgZ/90YWTjVD2ZMkgO4Em4XM0xLf1wPBG4s1yVCdwBSrVX/Eg1EvHyNEk7lbule0NoBmCAvHcIb95FRXQ==",
|
|
||||||
"requires": {
|
|
||||||
"@pushrocks/smartpath": "^4.0.1",
|
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
|
||||||
"@pushrocks/smartrequest": "^1.1.14",
|
|
||||||
"@types/fs-extra": "^5.0.4",
|
|
||||||
"@types/vinyl": "^2.0.2",
|
|
||||||
"fs-extra": "^7.0.1",
|
|
||||||
"glob": "^7.1.3",
|
|
||||||
"js-yaml": "^3.12.1",
|
|
||||||
"vinyl-file": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"@pushrocks/smartpromise": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
|
||||||
},
|
|
||||||
"glob": {
|
|
||||||
"version": "7.1.4",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/glob/-/glob-7.1.4.tgz",
|
|
||||||
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
|
|
||||||
"requires": {
|
|
||||||
"fs.realpath": "^1.0.0",
|
|
||||||
"inflight": "^1.0.4",
|
|
||||||
"inherits": "2",
|
|
||||||
"minimatch": "^3.0.4",
|
|
||||||
"once": "^1.3.0",
|
|
||||||
"path-is-absolute": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"js-yaml": {
|
|
||||||
"version": "3.13.1",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.13.1.tgz",
|
|
||||||
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
|
|
||||||
"requires": {
|
|
||||||
"argparse": "^1.0.7",
|
|
||||||
"esprima": "^4.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/projectinfo": {
|
"@pushrocks/projectinfo": {
|
||||||
@ -447,6 +386,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@pushrocks/smartexit": {
|
||||||
|
"version": "1.0.7",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartexit/-/smartexit-1.0.7.tgz",
|
||||||
|
"integrity": "sha512-G/gBbYWRAZs/O7YPUKTeEpCFvvfH7fayYvP3jqeHbZFFwILmaweLXDw/ns6R3bkI5w+lnlCoj26aXCtUWfqMtA==",
|
||||||
|
"requires": {
|
||||||
|
"@pushrocks/lik": "^3.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@pushrocks/smartfile": {
|
"@pushrocks/smartfile": {
|
||||||
"version": "7.0.2",
|
"version": "7.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-7.0.2.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-7.0.2.tgz",
|
||||||
@ -488,17 +435,54 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartlog": {
|
"@pushrocks/smartlog": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.19",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog/-/smartlog-2.0.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog/-/smartlog-2.0.19.tgz",
|
||||||
"integrity": "sha512-GtsDTGIUF3VuWPyF8FV5dF31ZCEIcaJ56ZlvJsWxjnyJq57X25mk5/K0QAaRE9IIeHg6fORcukFomb5C+AOQrg==",
|
"integrity": "sha512-I2mDx7WcUlADYWxu5nNP3NSJv95YrCZoG/rarbEqovK7pJQ9a0aINmIcCHkQeL1VSWvxgvhXwHyV/yNEJ4zh3Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartlog-interfaces": "^1.0.9"
|
"@pushrocks/smartlog-interfaces": "^2.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@pushrocks/smartlog-destination-local": {
|
||||||
|
"version": "7.0.5",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-destination-local/-/smartlog-destination-local-7.0.5.tgz",
|
||||||
|
"integrity": "sha512-++SVz8hkCtqmMdK74YaooHUyrijxEmUy2XehAi2aoV8AZKo7wi/oke84vEG3Zc+4t6tnfujnnGhJTp6J2scMbA==",
|
||||||
|
"requires": {
|
||||||
|
"@pushrocks/consolecolor": "^2.0.1",
|
||||||
|
"@pushrocks/smartlog-interfaces": "^2.0.2",
|
||||||
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
|
"ora": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@pushrocks/smartpromise": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
||||||
|
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartlog-interfaces": {
|
"@pushrocks/smartlog-interfaces": {
|
||||||
"version": "1.0.9",
|
"version": "2.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog-interfaces/-/smartlog-interfaces-1.0.9.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-interfaces/-/smartlog-interfaces-2.0.5.tgz",
|
||||||
"integrity": "sha512-0qwpomrRN0kFjmhR9m1iHYXoISoNuXtRP0Wr+JtkYyURLwKHMaW8Xoznf8MzXJptRfqufJi3Fxh5HodpPrIZUA=="
|
"integrity": "sha512-eLNlRpDwy3E+6v/B6fo/NiAo+UxBO3SxKgIIsgUGbWfVpsyUi0PG2xfVCdhJlhL1AsRRvKglfHSOB8qKE+XCLw=="
|
||||||
|
},
|
||||||
|
"@pushrocks/smartlog-source-ora": {
|
||||||
|
"version": "1.0.7",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-source-ora/-/smartlog-source-ora-1.0.7.tgz",
|
||||||
|
"integrity": "sha512-lgpZ2rBLt9UGIdMb43cB9rxwtbu4RaNmdQnAYfNGxizGPuNtXw3WAzdHyS5tEJFZAbvMOiwNguQ6Bk1i2gaedw==",
|
||||||
|
"requires": {
|
||||||
|
"@pushrocks/smartlog-interfaces": "^2.0.5",
|
||||||
|
"ora": "^3.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@pushrocks/smartopen": {
|
||||||
|
"version": "1.0.8",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartopen/-/smartopen-1.0.8.tgz",
|
||||||
|
"integrity": "sha512-EQ4QXKkCoFGxjuiacRGoVyNSIdl2bibsgV0RsoSrJm3e/Yl8xDLqx2/t+A3cogYBU992E4Ngktja5BXvItTYfQ==",
|
||||||
|
"requires": {
|
||||||
|
"@types/open": "^0.0.29",
|
||||||
|
"@types/opn": "^5.1.0",
|
||||||
|
"opn": "^5.3.0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartparam": {
|
"@pushrocks/smartparam": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
@ -577,20 +561,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartshell": {
|
"@pushrocks/smartshell": {
|
||||||
"version": "2.0.13",
|
"version": "2.0.15",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartshell/-/smartshell-2.0.13.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartshell/-/smartshell-2.0.15.tgz",
|
||||||
"integrity": "sha512-jLfAhLxMVKAScKdln1QrQqBI7A7INhMNHIq28fJEBi0BNDUS0eerw4yMAnR4CRmcrh4xFp1z+ju1kaPO3I/4MA==",
|
"integrity": "sha512-yLkNRYiQTyTamQl3N8bXAiFkew1VK1IJusVfy+OLp456amY8byAg6JI89HHzsSJkK7QnK0+4hcK4fUbkijevsA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartexit": "^1.0.7",
|
||||||
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@types/which": "^1.3.1",
|
"@types/which": "^1.3.1",
|
||||||
"which": "^1.3.1"
|
"which": "^1.3.1"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@pushrocks/smartpromise": {
|
|
||||||
"version": "2.0.5",
|
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartstring": {
|
"@pushrocks/smartstring": {
|
||||||
@ -661,31 +639,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/taskbuffer": {
|
"@pushrocks/taskbuffer": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/taskbuffer/-/taskbuffer-2.0.5.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2ftaskbuffer/-/taskbuffer-2.0.7.tgz",
|
||||||
"integrity": "sha512-frzuSoz7Lhlt4y+5vP513BJ/blSalkLH1A4Es0QtxQ6258ekxP/FWC7Bq0Hy7XnNDIlws0WDvd1KN2prSIKZDg==",
|
"integrity": "sha512-raFDtJqfn4ugb4R+tJ3Dx1dXTav6Wu9KQgaAV5leftXdKU7DKMzk0YeDPOmgvWvqUzqs0njZl1K/6QpAljfd/A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^3.0.1",
|
"@pushrocks/lik": "^3.0.4",
|
||||||
"@pushrocks/smartdelay": "^2.0.1",
|
"@pushrocks/smartdelay": "^2.0.2",
|
||||||
"@pushrocks/smartlog": "^2.0.1",
|
"@pushrocks/smartlog": "^2.0.9",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
"@types/cron": "^1.3.0",
|
"@types/cron": "^1.3.0",
|
||||||
"cron": "^1.3.0",
|
"cron": "^1.6.0",
|
||||||
"rxjs": "^6.2.2"
|
"rxjs": "^6.3.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/smartpromise": {
|
"@pushrocks/smartpromise": {
|
||||||
"version": "2.0.5",
|
"version": "2.0.5",
|
||||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpromise/-/smartpromise-2.0.5.tgz",
|
||||||
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
"integrity": "sha512-9j/chLtIiNkR0MDw7Mpxg9slxAVvAQwUZuiaPYX5KpHdKxQaHLI1VZ8IN0vPhwlfgNO4i4vGXV0wB8BvSDj03g=="
|
||||||
},
|
|
||||||
"rxjs": {
|
|
||||||
"version": "6.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.2.tgz",
|
|
||||||
"integrity": "sha512-hV7criqbR0pe7EeL3O66UYVg92IR0XsA97+9y+BWTePK9SKmEI5Qd3Zj6uPnGkNzXsBywBQWTvujPl+1Kn9Zjw==",
|
|
||||||
"requires": {
|
|
||||||
"tslib": "^1.9.0"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -714,9 +684,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/cron": {
|
"@types/cron": {
|
||||||
"version": "1.3.0",
|
"version": "1.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/@types/cron/-/cron-1.3.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fcron/-/cron-1.7.1.tgz",
|
||||||
"integrity": "sha512-RNJ6Hbxs9CbUw+Bxt8kpN8/yNlYG1xli0JZSO1xTJJxFjgD2KWctFSkJeJpjf9iLJU0jeNPoJ5LEru7eBN3xuA=="
|
"integrity": "sha512-48brwgU18DqA0mQX1As5OcJEo1yNjaXMM6Mk4r8K1dOzLJRQ37FE/kCivKx7ClKEHfhX2FdcxKzJ1B744a+V3A==",
|
||||||
|
"requires": {
|
||||||
|
"@types/node": "*",
|
||||||
|
"moment": ">=2.14.0"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"@types/events": {
|
"@types/events": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
@ -755,11 +729,6 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/lodash": {
|
|
||||||
"version": "4.14.77",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.77.tgz",
|
|
||||||
"integrity": "sha512-sRCTcVQkIiQqRoQcazgN2PvRLS7d9BnSl8elRZR5UYlpm6XgU8F4j/0csz8WoaKKTUqa6rSuOy3Vph7AHfX7KQ=="
|
|
||||||
},
|
|
||||||
"@types/luxon": {
|
"@types/luxon": {
|
||||||
"version": "1.12.0",
|
"version": "1.12.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fluxon/-/luxon-1.12.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fluxon/-/luxon-1.12.0.tgz",
|
||||||
@ -771,9 +740,22 @@
|
|||||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "12.0.0",
|
"version": "12.0.2",
|
||||||
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.0.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.0.2.tgz",
|
||||||
"integrity": "sha512-Jrb/x3HT4PTJp6a4avhmJCDEVrPdqLfl3e8GGMbpkGGdwAV5UGlIs4vVEfsHHfylZVOKZWpOqmqFH8CbfOZ6kg=="
|
"integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA=="
|
||||||
|
},
|
||||||
|
"@types/open": {
|
||||||
|
"version": "0.0.29",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@types%2fopen/-/open-0.0.29.tgz",
|
||||||
|
"integrity": "sha1-PekQASZ0kJ2xTWCNH95E/6ep7Oo="
|
||||||
|
},
|
||||||
|
"@types/opn": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/@types%2fopn/-/opn-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-rfEmrSa/x0vArY1aFnVTBAmy6b2I0oNHONL59qR+vnsHfD5xacM40O4PSiVisERq/GmROjmS3Xo/ptp8fx823g==",
|
||||||
|
"requires": {
|
||||||
|
"opn": "*"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"@types/shelljs": {
|
"@types/shelljs": {
|
||||||
"version": "0.8.5",
|
"version": "0.8.5",
|
||||||
@ -805,8 +787,7 @@
|
|||||||
"ansi-256-colors": {
|
"ansi-256-colors": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz",
|
||||||
"integrity": "sha1-kQ3lDvzHwJ49gvL4er1rcAwYgYo=",
|
"integrity": "sha1-kQ3lDvzHwJ49gvL4er1rcAwYgYo="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"ansi-regex": {
|
"ansi-regex": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
@ -817,7 +798,6 @@
|
|||||||
"version": "3.2.1",
|
"version": "3.2.1",
|
||||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"color-convert": "^1.9.0"
|
"color-convert": "^1.9.0"
|
||||||
}
|
}
|
||||||
@ -920,7 +900,6 @@
|
|||||||
"version": "2.4.1",
|
"version": "2.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
|
||||||
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
|
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"ansi-styles": "^3.2.1",
|
"ansi-styles": "^3.2.1",
|
||||||
"escape-string-regexp": "^1.0.5",
|
"escape-string-regexp": "^1.0.5",
|
||||||
@ -933,6 +912,19 @@
|
|||||||
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
|
"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"cli-cursor": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/cli-cursor/-/cli-cursor-2.1.0.tgz",
|
||||||
|
"integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=",
|
||||||
|
"requires": {
|
||||||
|
"restore-cursor": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"cli-spinners": {
|
||||||
|
"version": "2.1.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/cli-spinners/-/cli-spinners-2.1.0.tgz",
|
||||||
|
"integrity": "sha512-8B00fJOEh1HPrx4fo5eW16XmE1PcL1tGpGrxy63CXGP9nHdPBN63X75hA1zhvQuhVztJWLqV58Roj2qlNM7cAA=="
|
||||||
|
},
|
||||||
"cliui": {
|
"cliui": {
|
||||||
"version": "4.1.0",
|
"version": "4.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
|
||||||
@ -977,7 +969,6 @@
|
|||||||
"version": "1.9.2",
|
"version": "1.9.2",
|
||||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz",
|
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.2.tgz",
|
||||||
"integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==",
|
"integrity": "sha512-3NUJZdhMhcdPn8vJ9v2UQJoH0qqoGUkYTgFEPZaPjEtwmmKUfNV46zZmgB2M5M4DCEQHMaCfWHCxiBflLm04Tg==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"color-name": "1.1.1"
|
"color-name": "1.1.1"
|
||||||
}
|
}
|
||||||
@ -985,8 +976,7 @@
|
|||||||
"color-name": {
|
"color-name": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.1.tgz",
|
||||||
"integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok=",
|
"integrity": "sha1-SxQVMEz1ACjqgWQ2Q72C6gWANok="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"combined-stream": {
|
"combined-stream": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
@ -1013,9 +1003,9 @@
|
|||||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
|
||||||
},
|
},
|
||||||
"cron": {
|
"cron": {
|
||||||
"version": "1.3.0",
|
"version": "1.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/cron/-/cron-1.3.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/cron/-/cron-1.7.1.tgz",
|
||||||
"integrity": "sha512-K/SF7JlgMmNjcThWxkKvsHhey2EDB4CeOEWJ9aXWj3fbQJppsvTPIeyLdHfNq5IbbsMUUjRW1nr5dSO95f2E4w==",
|
"integrity": "sha512-gmMB/pJcqUVs/NklR1sCGlNYM7TizEw+1gebz20BMc/8bTm/r7QUp3ZPSPlG8Z5XRlvb7qhjEjq/+bdIfUCL2A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"moment-timezone": "^0.5.x"
|
"moment-timezone": "^0.5.x"
|
||||||
}
|
}
|
||||||
@ -1051,6 +1041,21 @@
|
|||||||
"type-detect": "^4.0.0"
|
"type-detect": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"defaults": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/defaults/-/defaults-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
|
||||||
|
"requires": {
|
||||||
|
"clone": "^1.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"clone": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/clone/-/clone-1.0.4.tgz",
|
||||||
|
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"delayed-stream": {
|
"delayed-stream": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
|
||||||
@ -1079,8 +1084,7 @@
|
|||||||
"escape-string-regexp": {
|
"escape-string-regexp": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
|
||||||
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
|
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"esprima": {
|
"esprima": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
@ -1204,8 +1208,7 @@
|
|||||||
"has-flag": {
|
"has-flag": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
|
||||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"inflight": {
|
"inflight": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
@ -1251,6 +1254,11 @@
|
|||||||
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
|
||||||
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
|
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
|
||||||
},
|
},
|
||||||
|
"is-wsl": {
|
||||||
|
"version": "1.1.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/is-wsl/-/is-wsl-1.1.0.tgz",
|
||||||
|
"integrity": "sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0="
|
||||||
|
},
|
||||||
"isarray": {
|
"isarray": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||||
@ -1331,10 +1339,13 @@
|
|||||||
"path-exists": "^3.0.0"
|
"path-exists": "^3.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lodash": {
|
"log-symbols": {
|
||||||
"version": "4.17.4",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
|
"resolved": "https://verdaccio.lossless.one/log-symbols/-/log-symbols-2.2.0.tgz",
|
||||||
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
|
"integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^2.0.1"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"luxon": {
|
"luxon": {
|
||||||
"version": "1.13.1",
|
"version": "1.13.1",
|
||||||
@ -1390,6 +1401,11 @@
|
|||||||
"mime-db": "~1.35.0"
|
"mime-db": "~1.35.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"mimic-fn": {
|
||||||
|
"version": "1.2.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/mimic-fn/-/mimic-fn-1.2.0.tgz",
|
||||||
|
"integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ=="
|
||||||
|
},
|
||||||
"minimatch": {
|
"minimatch": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||||
@ -1471,6 +1487,60 @@
|
|||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"onetime": {
|
||||||
|
"version": "2.0.1",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/onetime/-/onetime-2.0.1.tgz",
|
||||||
|
"integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=",
|
||||||
|
"requires": {
|
||||||
|
"mimic-fn": "^1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"opn": {
|
||||||
|
"version": "5.5.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/opn/-/opn-5.5.0.tgz",
|
||||||
|
"integrity": "sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA==",
|
||||||
|
"requires": {
|
||||||
|
"is-wsl": "^1.1.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ora": {
|
||||||
|
"version": "3.4.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/ora/-/ora-3.4.0.tgz",
|
||||||
|
"integrity": "sha512-eNwHudNbO1folBP3JsZ19v9azXWtQZjICdr3Q0TDPIaeBQ3mXLrh54wM+er0+hSp+dWKf+Z8KM58CYzEyIYxYg==",
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^2.4.2",
|
||||||
|
"cli-cursor": "^2.1.0",
|
||||||
|
"cli-spinners": "^2.0.0",
|
||||||
|
"log-symbols": "^2.2.0",
|
||||||
|
"strip-ansi": "^5.2.0",
|
||||||
|
"wcwidth": "^1.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "4.1.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/ansi-regex/-/ansi-regex-4.1.0.tgz",
|
||||||
|
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "2.4.2",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/chalk/-/chalk-2.4.2.tgz",
|
||||||
|
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^3.2.1",
|
||||||
|
"escape-string-regexp": "^1.0.5",
|
||||||
|
"supports-color": "^5.3.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "5.2.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/strip-ansi/-/strip-ansi-5.2.0.tgz",
|
||||||
|
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "^4.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"os-locale": {
|
"os-locale": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://verdaccio.lossless.one/os-locale/-/os-locale-3.1.0.tgz",
|
"resolved": "https://verdaccio.lossless.one/os-locale/-/os-locale-3.1.0.tgz",
|
||||||
@ -1622,6 +1692,15 @@
|
|||||||
"path-parse": "^1.0.5"
|
"path-parse": "^1.0.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"restore-cursor": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=",
|
||||||
|
"requires": {
|
||||||
|
"onetime": "^2.0.0",
|
||||||
|
"signal-exit": "^3.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"rxjs": {
|
"rxjs": {
|
||||||
"version": "6.5.1",
|
"version": "6.5.1",
|
||||||
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.5.1.tgz",
|
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.5.1.tgz",
|
||||||
@ -1677,23 +1756,6 @@
|
|||||||
"chai-string": "^1.4.0"
|
"chai-string": "^1.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"smartlodash": {
|
|
||||||
"version": "1.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/smartlodash/-/smartlodash-1.0.1.tgz",
|
|
||||||
"integrity": "sha512-pXy7CD1jrRJ4JKCPiamFb+uqOgqqItJbksF6djqW/83ZG7ChLYPLkQOX/9D5FzU5JylHVs+xdQ6bSprcNQfEng==",
|
|
||||||
"requires": {
|
|
||||||
"@types/lodash": "^4.14.68",
|
|
||||||
"@types/node": "^8.0.10",
|
|
||||||
"lodash": "^4.17.4"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@types/node": {
|
|
||||||
"version": "8.10.29",
|
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.29.tgz",
|
|
||||||
"integrity": "sha512-zbteaWZ2mdduacm0byELwtRyhYE40aK+pAanQk415gr1eRuu67x7QGOLmn8jz5zI8LDK7d0WI/oT6r5Trz4rzQ=="
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.6.1",
|
"version": "0.6.1",
|
||||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
@ -1779,7 +1841,6 @@
|
|||||||
"version": "5.4.0",
|
"version": "5.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz",
|
||||||
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
|
"integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"has-flag": "^3.0.0"
|
"has-flag": "^3.0.0"
|
||||||
}
|
}
|
||||||
@ -1890,6 +1951,14 @@
|
|||||||
"vinyl": "^2.0.1"
|
"vinyl": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"wcwidth": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://verdaccio.lossless.one/wcwidth/-/wcwidth-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=",
|
||||||
|
"requires": {
|
||||||
|
"defaults": "^1.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
"which": {
|
"which": {
|
||||||
"version": "1.3.1",
|
"version": "1.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
|
||||||
|
17
package.json
17
package.json
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "@gitzone/npmdocker",
|
"name": "@gitzone/tsdocker",
|
||||||
"version": "1.2.28",
|
"version": "1.2.35",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "develop npm modules cross platform with docker",
|
"description": "develop npm modules cross platform with docker",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
"bin": {
|
"bin": {
|
||||||
"npmdocker": "cli.js"
|
"tsdocker": "cli.js"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "(npm run clean && npm run setupCheck && npm run testStandard && npm run testSpeed)",
|
"test": "(npm run clean && npm run setupCheck && npm run testStandard && npm run testSpeed)",
|
||||||
@ -14,6 +14,7 @@
|
|||||||
"testStandard": "(cd test/ && node ../cli.ts.js)",
|
"testStandard": "(cd test/ && node ../cli.ts.js)",
|
||||||
"testSpeed": "(cd test/ && node ../cli.ts.js speedtest)",
|
"testSpeed": "(cd test/ && node ../cli.ts.js speedtest)",
|
||||||
"testClean": "(cd test/ && node ../cli.ts.js clean --all)",
|
"testClean": "(cd test/ && node ../cli.ts.js clean --all)",
|
||||||
|
"testVscode": "(cd test/ && node ../cli.ts.js vscode)",
|
||||||
"clean": "(rm -rf test/)",
|
"clean": "(rm -rf test/)",
|
||||||
"compile": "(npmts --notest)",
|
"compile": "(npmts --notest)",
|
||||||
"setupCheck": "(git clone https://gitlab.com/sandboxzone/sandbox-npmts.git test/)"
|
"setupCheck": "(git clone https://gitlab.com/sandboxzone/sandbox-npmts.git test/)"
|
||||||
@ -36,19 +37,23 @@
|
|||||||
"@gitzone/tsrun": "^1.2.6",
|
"@gitzone/tsrun": "^1.2.6",
|
||||||
"@gitzone/tstest": "^1.0.20",
|
"@gitzone/tstest": "^1.0.20",
|
||||||
"@pushrocks/tapbundle": "^3.0.9",
|
"@pushrocks/tapbundle": "^3.0.9",
|
||||||
"@types/node": "^12.0.0",
|
"@types/node": "^12.0.2",
|
||||||
"tslint": "^5.16.0",
|
"tslint": "^5.16.0",
|
||||||
"tslint-config-prettier": "^1.18.0"
|
"tslint-config-prettier": "^1.18.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/npmextra": "^3.0.1",
|
"@pushrocks/npmextra": "^3.0.5",
|
||||||
"@pushrocks/projectinfo": "^4.0.2",
|
"@pushrocks/projectinfo": "^4.0.2",
|
||||||
"@pushrocks/qenv": "^4.0.0",
|
"@pushrocks/qenv": "^4.0.0",
|
||||||
"@pushrocks/smartanalytics": "^2.0.15",
|
"@pushrocks/smartanalytics": "^2.0.15",
|
||||||
"@pushrocks/smartcli": "^3.0.7",
|
"@pushrocks/smartcli": "^3.0.7",
|
||||||
"@pushrocks/smartfile": "^7.0.2",
|
"@pushrocks/smartfile": "^7.0.2",
|
||||||
|
"@pushrocks/smartlog": "^2.0.19",
|
||||||
|
"@pushrocks/smartlog-destination-local": "^7.0.5",
|
||||||
|
"@pushrocks/smartlog-source-ora": "^1.0.7",
|
||||||
|
"@pushrocks/smartopen": "^1.0.8",
|
||||||
"@pushrocks/smartpromise": "^3.0.2",
|
"@pushrocks/smartpromise": "^3.0.2",
|
||||||
"@pushrocks/smartshell": "^2.0.13",
|
"@pushrocks/smartshell": "^2.0.15",
|
||||||
"@pushrocks/smartstring": "^3.0.10",
|
"@pushrocks/smartstring": "^3.0.10",
|
||||||
"@types/shelljs": "^0.8.5"
|
"@types/shelljs": "^0.8.5"
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
import * as smartanalytics from '@pushrocks/smartanalytics';
|
import * as smartanalytics from '@pushrocks/smartanalytics';
|
||||||
const npmdockerAnalytics = new smartanalytics.Analytics({
|
const npmdockerAnalytics = new smartanalytics.Analytics({
|
||||||
apiEndPoint: 'https://pubapi.lossless.one',
|
apiEndPoint: 'https://pubapi.lossless.one',
|
||||||
appName: 'npmdocker',
|
appName: 'tsdocker',
|
||||||
projectId: 'gitzone'
|
projectId: 'gitzone'
|
||||||
});
|
});
|
||||||
npmdockerAnalytics.recordEvent('npmtoolexecution', {
|
npmdockerAnalytics.recordEvent('npmtoolexecution', {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import './analytics';
|
import './analytics';
|
||||||
import * as plugins from './npmdocker.plugins';
|
import * as plugins from './tsdocker.plugins';
|
||||||
import * as cli from './npmdocker.cli';
|
import * as cli from './tsdocker.cli';
|
||||||
|
|
||||||
cli.run();
|
cli.run();
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
import * as plugins from './npmdocker.plugins';
|
|
||||||
import * as paths from './npmdocker.paths';
|
|
||||||
|
|
||||||
// modules
|
|
||||||
import * as ConfigModule from './npmdocker.config';
|
|
||||||
import * as DockerModule from './npmdocker.docker';
|
|
||||||
|
|
||||||
let npmdockerCli = new plugins.smartcli.Smartcli();
|
|
||||||
|
|
||||||
export let run = () => {
|
|
||||||
npmdockerCli.standardTask().subscribe(async argvArg => {
|
|
||||||
let configArg = await ConfigModule.run().then(DockerModule.run);
|
|
||||||
if (configArg.exitCode === 0) {
|
|
||||||
plugins.beautylog.success('container ended all right!');
|
|
||||||
} else {
|
|
||||||
plugins.beautylog.error(`container ended with error! Exit Code is ${configArg.exitCode}`);
|
|
||||||
process.exit(1);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* this command is executed inside docker and meant for use from outside docker
|
|
||||||
*/
|
|
||||||
npmdockerCli.addCommand('runinside').subscribe(async argvArg => {
|
|
||||||
plugins.beautylog.ok('Allright. We are now in Docker!');
|
|
||||||
plugins.beautylog.log('now trying to run your specified command');
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
npmdockerCli.addCommand('clean').subscribe(async argvArg => {
|
|
||||||
plugins.beautylog.ora.start();
|
|
||||||
plugins.beautylog.ora.text('cleaning up docker env...');
|
|
||||||
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)`);
|
|
||||||
|
|
||||||
plugins.beautylog.ora.text('removing stopped containers...');
|
|
||||||
await smartshellInstance.exec(`docker rm $(docker ps -a -q)`);
|
|
||||||
|
|
||||||
plugins.beautylog.ora.text('removing images...');
|
|
||||||
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)`);
|
|
||||||
|
|
||||||
plugins.beautylog.ora.text('removing all volumes...');
|
|
||||||
await smartshellInstance.exec(`docker volume rm $(docker volume ls -f dangling=true -q)`);
|
|
||||||
}
|
|
||||||
plugins.beautylog.ora.endOk('docker environment now is clean!');
|
|
||||||
});
|
|
||||||
|
|
||||||
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(
|
|
||||||
`docker pull tianon/speedtest && docker run --rm tianon/speedtest`
|
|
||||||
);
|
|
||||||
});
|
|
||||||
|
|
||||||
npmdockerCli.startParse();
|
|
||||||
};
|
|
@ -1,40 +0,0 @@
|
|||||||
import * as plugins from './npmdocker.plugins';
|
|
||||||
import * as paths from './npmdocker.paths';
|
|
||||||
|
|
||||||
// interfaces
|
|
||||||
import { IKeyValueObject } from '@pushrocks/qenv';
|
|
||||||
|
|
||||||
export interface IConfig {
|
|
||||||
baseImage: string;
|
|
||||||
command: string;
|
|
||||||
dockerSock: boolean;
|
|
||||||
exitCode?: number;
|
|
||||||
keyValueObjectArray: IKeyValueObject[];
|
|
||||||
}
|
|
||||||
|
|
||||||
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 = [];
|
|
||||||
}
|
|
||||||
return qenvKeyValueObjectArray;
|
|
||||||
};
|
|
||||||
|
|
||||||
let buildConfig = async (qenvKeyValueObjectArrayArg: IKeyValueObject[]) => {
|
|
||||||
let npmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
|
||||||
let config = npmextra.dataFor<IConfig>('npmdocker', {
|
|
||||||
baseImage: 'hosttoday/ht-docker-node:npmdocker',
|
|
||||||
init: 'rm -rf node_nodules/ && yarn install',
|
|
||||||
command: 'npmci npm test',
|
|
||||||
dockerSock: false,
|
|
||||||
keyValueObjectArray: qenvKeyValueObjectArrayArg
|
|
||||||
});
|
|
||||||
return config;
|
|
||||||
};
|
|
||||||
|
|
||||||
export let run = async (): Promise<IConfig> => {
|
|
||||||
let config = await getQenvKeyValueObject().then(buildConfig);
|
|
||||||
return config;
|
|
||||||
};
|
|
90
ts/tsdocker.cli.ts
Normal file
90
ts/tsdocker.cli.ts
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
import * as plugins from './tsdocker.plugins';
|
||||||
|
import * as paths from './tsdocker.paths';
|
||||||
|
|
||||||
|
// modules
|
||||||
|
import * as ConfigModule from './tsdocker.config';
|
||||||
|
import * as DockerModule from './tsdocker.docker';
|
||||||
|
|
||||||
|
import { logger, ora } from './tsdocker.logging';
|
||||||
|
|
||||||
|
const tsdockerCli = new plugins.smartcli.Smartcli();
|
||||||
|
|
||||||
|
export let run = () => {
|
||||||
|
tsdockerCli.standardTask().subscribe(async argvArg => {
|
||||||
|
let configArg = await ConfigModule.run().then(DockerModule.run);
|
||||||
|
if (configArg.exitCode === 0) {
|
||||||
|
logger.log('success', 'container ended all right!');
|
||||||
|
} else {
|
||||||
|
logger.log('error', `container ended with error! Exit Code is ${configArg.exitCode}`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this command is executed inside docker and meant for use from outside docker
|
||||||
|
*/
|
||||||
|
tsdockerCli.addCommand('runinside').subscribe(async argvArg => {
|
||||||
|
logger.log('ok', 'Allright. We are now in Docker!');
|
||||||
|
ora.text('now trying to run your specified command');
|
||||||
|
const configArg = await ConfigModule.run();
|
||||||
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
|
executor: 'bash'
|
||||||
|
});
|
||||||
|
ora.stop();
|
||||||
|
await smartshellInstance.exec(configArg.command).then(response => {
|
||||||
|
if (response.exitCode !== 0) {
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
tsdockerCli.addCommand('clean').subscribe(async argvArg => {
|
||||||
|
ora.text('cleaning up docker env...');
|
||||||
|
if (argvArg.all) {
|
||||||
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
|
executor: 'bash'
|
||||||
|
});
|
||||||
|
ora.text('killing any running docker containers...');
|
||||||
|
await smartshellInstance.exec(`docker kill $(docker ps -q)`);
|
||||||
|
|
||||||
|
ora.text('removing stopped containers...');
|
||||||
|
await smartshellInstance.exec(`docker rm $(docker ps -a -q)`);
|
||||||
|
|
||||||
|
ora.text('removing images...');
|
||||||
|
await smartshellInstance.exec(`docker rmi -f $(docker images -q -f dangling=true)`);
|
||||||
|
|
||||||
|
ora.text('removing all other images...');
|
||||||
|
await smartshellInstance.exec(`docker rmi $(docker images -a -q)`);
|
||||||
|
|
||||||
|
ora.text('removing all volumes...');
|
||||||
|
await smartshellInstance.exec(`docker volume rm $(docker volume ls -f dangling=true -q)`);
|
||||||
|
}
|
||||||
|
ora.finishSuccess('docker environment now is clean!');
|
||||||
|
});
|
||||||
|
|
||||||
|
tsdockerCli.addCommand('speedtest').subscribe(async argvArg => {
|
||||||
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
|
executor: 'bash'
|
||||||
|
});
|
||||||
|
logger.log('ok', 'Starting speedtest');
|
||||||
|
await smartshellInstance.exec(
|
||||||
|
`docker pull tianon/speedtest && docker run --rm tianon/speedtest`
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
tsdockerCli.addCommand('vscode').subscribe(async argvArg => {
|
||||||
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
|
executor: 'bash'
|
||||||
|
});
|
||||||
|
logger.log('ok', `Starting vscode in cwd ${paths.cwd}`);
|
||||||
|
await smartshellInstance.execAndWaitForLine(
|
||||||
|
`docker run -p 127.0.0.1:8443:8443 -v "${
|
||||||
|
paths.cwd
|
||||||
|
}:/home/coder/project" registry.gitlab.com/hosttoday/ht-docker-vscode --allow-http --no-auth`,
|
||||||
|
/Connected to shared process/
|
||||||
|
);
|
||||||
|
await plugins.smartopen.openUrl('testing-vscode.git.zone:8443');
|
||||||
|
});
|
||||||
|
|
||||||
|
tsdockerCli.startParse();
|
||||||
|
};
|
37
ts/tsdocker.config.ts
Normal file
37
ts/tsdocker.config.ts
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import * as plugins from './tsdocker.plugins';
|
||||||
|
import * as paths from './tsdocker.paths';
|
||||||
|
|
||||||
|
export interface IConfig {
|
||||||
|
baseImage: string;
|
||||||
|
command: string;
|
||||||
|
dockerSock: boolean;
|
||||||
|
exitCode?: number;
|
||||||
|
keyValueObject: any[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const getQenvKeyValueObject = async () => {
|
||||||
|
let qenvKeyValueObjectArray: { [key: string]: string | number };
|
||||||
|
if (plugins.smartfile.fs.fileExistsSync(plugins.path.join(paths.cwd, 'qenv.yml'))) {
|
||||||
|
qenvKeyValueObjectArray = new plugins.qenv.Qenv(paths.cwd, '.nogit/').keyValueObject;
|
||||||
|
} else {
|
||||||
|
qenvKeyValueObjectArray = {};
|
||||||
|
}
|
||||||
|
return qenvKeyValueObjectArray;
|
||||||
|
};
|
||||||
|
|
||||||
|
const buildConfig = async (qenvKeyValueObjectArg: { [key: string]: string | number }) => {
|
||||||
|
const npmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
||||||
|
const config = npmextra.dataFor<IConfig>('npmdocker', {
|
||||||
|
baseImage: 'hosttoday/ht-docker-node:npmdocker',
|
||||||
|
init: 'rm -rf node_nodules/ && yarn install',
|
||||||
|
command: 'npmci npm test',
|
||||||
|
dockerSock: false,
|
||||||
|
keyValueObject: qenvKeyValueObjectArg
|
||||||
|
});
|
||||||
|
return config;
|
||||||
|
};
|
||||||
|
|
||||||
|
export let run = async (): Promise<IConfig> => {
|
||||||
|
const config = await getQenvKeyValueObject().then(buildConfig);
|
||||||
|
return config;
|
||||||
|
};
|
@ -1,20 +1,22 @@
|
|||||||
import * as plugins from './npmdocker.plugins';
|
import * as plugins from './tsdocker.plugins';
|
||||||
import * as paths from './npmdocker.paths';
|
import * as paths from './tsdocker.paths';
|
||||||
import * as snippets from './npmdocker.snippets';
|
import * as snippets from './tsdocker.snippets';
|
||||||
|
|
||||||
|
import { logger, ora } from './tsdocker.logging';
|
||||||
|
|
||||||
const smartshellInstance = new plugins.smartshell.Smartshell({
|
const smartshellInstance = new plugins.smartshell.Smartshell({
|
||||||
executor: 'bash'
|
executor: 'bash'
|
||||||
});
|
});
|
||||||
|
|
||||||
// interfaces
|
// interfaces
|
||||||
import { IConfig } from './npmdocker.config';
|
import { IConfig } from './tsdocker.config';
|
||||||
|
|
||||||
let config: IConfig;
|
let config: IConfig;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the docker data used to build the internal testing container
|
* the docker data used to build the internal testing container
|
||||||
*/
|
*/
|
||||||
let dockerData = {
|
const dockerData = {
|
||||||
imageTag: 'npmdocker-temp-image:latest',
|
imageTag: 'npmdocker-temp-image:latest',
|
||||||
containerName: 'npmdocker-temp-container',
|
containerName: 'npmdocker-temp-container',
|
||||||
dockerProjectMountString: '',
|
dockerProjectMountString: '',
|
||||||
@ -25,12 +27,12 @@ let dockerData = {
|
|||||||
/**
|
/**
|
||||||
* check if docker is available
|
* check if docker is available
|
||||||
*/
|
*/
|
||||||
let checkDocker = () => {
|
const checkDocker = () => {
|
||||||
let done = plugins.smartpromise.defer();
|
const done = plugins.smartpromise.defer();
|
||||||
plugins.beautylog.ora.text('checking docker...');
|
ora.text('checking docker...');
|
||||||
|
|
||||||
if (smartshellInstance.exec('which docker')) {
|
if (smartshellInstance.exec('which docker')) {
|
||||||
plugins.beautylog.ok('Docker found!');
|
logger.log('ok', 'Docker found!');
|
||||||
done.resolve();
|
done.resolve();
|
||||||
} else {
|
} else {
|
||||||
done.reject(new Error('docker not found on this machine'));
|
done.reject(new Error('docker not found on this machine'));
|
||||||
@ -41,18 +43,18 @@ let checkDocker = () => {
|
|||||||
/**
|
/**
|
||||||
* builds the Dockerfile according to the config in the project
|
* builds the Dockerfile according to the config in the project
|
||||||
*/
|
*/
|
||||||
let buildDockerFile = () => {
|
const buildDockerFile = () => {
|
||||||
let done = plugins.smartpromise.defer();
|
const done = plugins.smartpromise.defer();
|
||||||
plugins.beautylog.ora.text('building Dockerfile...');
|
ora.text('building Dockerfile...');
|
||||||
let dockerfile: string = snippets.dockerfileSnippet({
|
const dockerfile: string = snippets.dockerfileSnippet({
|
||||||
baseImage: config.baseImage,
|
baseImage: config.baseImage,
|
||||||
command: config.command
|
command: config.command
|
||||||
});
|
});
|
||||||
plugins.beautylog.info(`Base image is: ${config.baseImage}`);
|
logger.log('info', `Base image is: ${config.baseImage}`);
|
||||||
plugins.beautylog.info(`Command is: ${config.command}`);
|
logger.log('info', `Command is: ${config.command}`);
|
||||||
plugins.smartfile.memory.toFsSync(dockerfile, plugins.path.join(paths.cwd, 'npmdocker'));
|
plugins.smartfile.memory.toFsSync(dockerfile, plugins.path.join(paths.cwd, 'npmdocker'));
|
||||||
plugins.beautylog.ok('Dockerfile created!');
|
logger.log('ok', 'Dockerfile created!');
|
||||||
plugins.beautylog.ora.stop();
|
ora.stop();
|
||||||
done.resolve();
|
done.resolve();
|
||||||
return done.promise;
|
return done.promise;
|
||||||
};
|
};
|
||||||
@ -60,18 +62,18 @@ let buildDockerFile = () => {
|
|||||||
/**
|
/**
|
||||||
* builds the Dockerimage from the built Dockerfile
|
* builds the Dockerimage from the built Dockerfile
|
||||||
*/
|
*/
|
||||||
let buildDockerImage = async () => {
|
const buildDockerImage = async () => {
|
||||||
plugins.beautylog.info('pulling latest base image from registry...');
|
logger.log('info', 'pulling latest base image from registry...');
|
||||||
await smartshellInstance.exec(`docker pull ${config.baseImage}`);
|
await smartshellInstance.exec(`docker pull ${config.baseImage}`);
|
||||||
plugins.beautylog.ora.text('building Dockerimage...');
|
ora.text('building Dockerimage...');
|
||||||
let execResult = await smartshellInstance.execSilent(
|
const execResult = await smartshellInstance.execSilent(
|
||||||
`docker build -f npmdocker -t ${dockerData.imageTag} ${paths.cwd}`
|
`docker build -f npmdocker -t ${dockerData.imageTag} ${paths.cwd}`
|
||||||
);
|
);
|
||||||
if (execResult.exitCode !== 0) {
|
if (execResult.exitCode !== 0) {
|
||||||
console.log(execResult.stdout);
|
console.log(execResult.stdout);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
plugins.beautylog.ok('Dockerimage built!');
|
logger.log('ok', 'Dockerimage built!');
|
||||||
};
|
};
|
||||||
|
|
||||||
const buildDockerProjectMountString = async () => {
|
const buildDockerProjectMountString = async () => {
|
||||||
@ -84,9 +86,9 @@ const buildDockerProjectMountString = async () => {
|
|||||||
* builds an environment string that docker cli understands
|
* builds an environment string that docker cli understands
|
||||||
*/
|
*/
|
||||||
const buildDockerEnvString = async () => {
|
const buildDockerEnvString = async () => {
|
||||||
for (let keyValueObjectArg of config.keyValueObjectArray) {
|
for (const key of Object.keys(config.keyValueObject)) {
|
||||||
let envString = (dockerData.dockerEnvString =
|
const envString = (dockerData.dockerEnvString =
|
||||||
dockerData.dockerEnvString + `-e ${keyValueObjectArg.key}=${keyValueObjectArg.value} `);
|
dockerData.dockerEnvString + `-e ${key}=${config.keyValueObject[key]} `);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -102,11 +104,11 @@ const buildDockerSockString = async () => {
|
|||||||
/**
|
/**
|
||||||
* creates a container by running the built Dockerimage
|
* creates a container by running the built Dockerimage
|
||||||
*/
|
*/
|
||||||
let runDockerImage = async () => {
|
const runDockerImage = async () => {
|
||||||
let done = plugins.smartpromise.defer();
|
const done = plugins.smartpromise.defer();
|
||||||
plugins.beautylog.ora.text('starting Container...');
|
ora.text('starting Container...');
|
||||||
plugins.beautylog.ora.end();
|
ora.stop();
|
||||||
plugins.beautylog.log('now running Dockerimage');
|
logger.log('info', 'now running Dockerimage');
|
||||||
config.exitCode = (await smartshellInstance.exec(
|
config.exitCode = (await smartshellInstance.exec(
|
||||||
`docker run ${dockerData.dockerProjectMountString} ${dockerData.dockerSockString} ${
|
`docker run ${dockerData.dockerProjectMountString} ${dockerData.dockerSockString} ${
|
||||||
dockerData.dockerEnvString
|
dockerData.dockerEnvString
|
||||||
@ -117,14 +119,14 @@ let runDockerImage = async () => {
|
|||||||
/**
|
/**
|
||||||
* cleans up: deletes the test container
|
* cleans up: deletes the test container
|
||||||
*/
|
*/
|
||||||
let deleteDockerContainer = async () => {
|
const deleteDockerContainer = async () => {
|
||||||
await smartshellInstance.execSilent(`docker rm -f ${dockerData.containerName}`);
|
await smartshellInstance.execSilent(`docker rm -f ${dockerData.containerName}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cleans up deletes the test image
|
* cleans up deletes the test image
|
||||||
*/
|
*/
|
||||||
let deleteDockerImage = async () => {
|
const deleteDockerImage = async () => {
|
||||||
await smartshellInstance.execSilent(`docker rmi ${dockerData.imageTag}`).then(async response => {
|
await smartshellInstance.execSilent(`docker rmi ${dockerData.imageTag}`).then(async response => {
|
||||||
if (response.exitCode !== 0) {
|
if (response.exitCode !== 0) {
|
||||||
console.log(response.stdout);
|
console.log(response.stdout);
|
||||||
@ -132,27 +134,26 @@ let deleteDockerImage = async () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
let preClean = async () => {
|
const preClean = async () => {
|
||||||
await deleteDockerImage()
|
await deleteDockerImage()
|
||||||
.then(deleteDockerContainer)
|
.then(deleteDockerContainer)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
plugins.beautylog.ok('ensured clean Docker environment!');
|
logger.log('ok', 'ensured clean Docker environment!');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
let postClean = async () => {
|
const postClean = async () => {
|
||||||
await deleteDockerContainer()
|
await deleteDockerContainer()
|
||||||
.then(deleteDockerImage)
|
.then(deleteDockerImage)
|
||||||
.then(async () => {
|
.then(async () => {
|
||||||
plugins.beautylog.ok('cleaned up!');
|
logger.log('ok', 'cleaned up!');
|
||||||
});
|
});
|
||||||
plugins.smartfile.fs.removeSync(paths.npmdockerFile);
|
plugins.smartfile.fs.removeSync(paths.npmdockerFile);
|
||||||
};
|
};
|
||||||
|
|
||||||
export let run = async (configArg: IConfig): Promise<IConfig> => {
|
export let run = async (configArg: IConfig): Promise<IConfig> => {
|
||||||
plugins.beautylog.ora.start();
|
|
||||||
config = configArg;
|
config = configArg;
|
||||||
let resultConfig = await checkDocker()
|
const resultConfig = await checkDocker()
|
||||||
.then(preClean)
|
.then(preClean)
|
||||||
.then(buildDockerFile)
|
.then(buildDockerFile)
|
||||||
.then(buildDockerImage)
|
.then(buildDockerImage)
|
17
ts/tsdocker.logging.ts
Normal file
17
ts/tsdocker.logging.ts
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import * as plugins from './tsdocker.plugins';
|
||||||
|
|
||||||
|
export const logger = new plugins.smartlog.Smartlog({
|
||||||
|
logContext: {
|
||||||
|
company: 'Some Company',
|
||||||
|
companyunit: 'Some CompanyUnit',
|
||||||
|
containerName: 'Some Containername',
|
||||||
|
environment: 'local',
|
||||||
|
runtime: 'node',
|
||||||
|
zone: 'gitzone'
|
||||||
|
},
|
||||||
|
minimumLogLevel: 'silly'
|
||||||
|
});
|
||||||
|
|
||||||
|
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());
|
||||||
|
|
||||||
|
export const ora = new plugins.smartlogSouceOra.SmartlogSourceOra();
|
@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './npmdocker.plugins';
|
import * as plugins from './tsdocker.plugins';
|
||||||
|
|
||||||
// directories
|
// directories
|
||||||
export let cwd = process.cwd();
|
export let cwd = process.cwd();
|
@ -1,4 +1,4 @@
|
|||||||
import * as beautylog from 'beautylog';
|
// pushrocks scope
|
||||||
import * as npmextra from '@pushrocks/npmextra';
|
import * as npmextra from '@pushrocks/npmextra';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as projectinfo from '@pushrocks/projectinfo';
|
import * as projectinfo from '@pushrocks/projectinfo';
|
||||||
@ -6,11 +6,14 @@ import * as smartpromise from '@pushrocks/smartpromise';
|
|||||||
import * as qenv from '@pushrocks/qenv';
|
import * as qenv from '@pushrocks/qenv';
|
||||||
import * as smartcli from '@pushrocks/smartcli';
|
import * as smartcli from '@pushrocks/smartcli';
|
||||||
import * as smartfile from '@pushrocks/smartfile';
|
import * as smartfile from '@pushrocks/smartfile';
|
||||||
|
import * as smartlog from '@pushrocks/smartlog';
|
||||||
|
import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local';
|
||||||
|
import * as smartlogSouceOra from '@pushrocks/smartlog-source-ora';
|
||||||
|
import * as smartopen from '@pushrocks/smartopen';
|
||||||
import * as smartshell from '@pushrocks/smartshell';
|
import * as smartshell from '@pushrocks/smartshell';
|
||||||
import * as smartstring from '@pushrocks/smartstring';
|
import * as smartstring from '@pushrocks/smartstring';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
beautylog,
|
|
||||||
npmextra,
|
npmextra,
|
||||||
path,
|
path,
|
||||||
projectinfo,
|
projectinfo,
|
||||||
@ -18,6 +21,10 @@ export {
|
|||||||
qenv,
|
qenv,
|
||||||
smartcli,
|
smartcli,
|
||||||
smartfile,
|
smartfile,
|
||||||
|
smartlog,
|
||||||
|
smartlogDestinationLocal,
|
||||||
|
smartlogSouceOra,
|
||||||
|
smartopen,
|
||||||
smartshell,
|
smartshell,
|
||||||
smartstring
|
smartstring
|
||||||
};
|
};
|
@ -1,4 +1,4 @@
|
|||||||
import * as plugins from './npmdocker.plugins';
|
import * as plugins from './tsdocker.plugins';
|
||||||
|
|
||||||
export interface IDockerfileSnippet {
|
export interface IDockerfileSnippet {
|
||||||
baseImage: string;
|
baseImage: string;
|
@ -4,7 +4,14 @@
|
|||||||
"semicolon": [true, "always"],
|
"semicolon": [true, "always"],
|
||||||
"no-console": false,
|
"no-console": false,
|
||||||
"ordered-imports": false,
|
"ordered-imports": false,
|
||||||
"object-literal-sort-keys": false
|
"object-literal-sort-keys": false,
|
||||||
|
"member-ordering": {
|
||||||
|
"options":{
|
||||||
|
"order": [
|
||||||
|
"static-method"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"defaultSeverity": "warning"
|
"defaultSeverity": "warning"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user