fix(core): update

This commit is contained in:
Philipp Kunz 2019-05-10 11:45:20 +02:00
parent 889a3fdc5a
commit 5f681ff237
20 changed files with 418 additions and 192 deletions

25
.gitignore vendored
View File

@ -1,8 +1,19 @@
node_modules/
coverage/
pages/
public/
test/
assets/
.nogit/ .nogit/
# artifacts
coverage/
public/
pages/
# installs
node_modules/
# caches and builds
.yarn/
.cache/
dist/
dist_web/
dist_serve/
dist_ts_web/
# custom

View File

@ -59,7 +59,7 @@ 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)

View File

@ -1 +0,0 @@
Docs for npmpage coming soon.

View File

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

200
package-lock.json generated
View File

@ -1,5 +1,5 @@
{ {
"name": "@gitzone/npmdocker", "name": "@gitzone/tsdocker",
"version": "1.2.28", "version": "1.2.28",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
@ -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"
} }
@ -488,17 +487,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.4",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartlog-source-ora/-/smartlog-source-ora-1.0.4.tgz",
"integrity": "sha512-xpn9xYO5qA+qsmc8LN+C2huQlwUtB+wQMBBTMEgAsbr6RQVy3JBL5zepPk7ftvrixAnsfGM0lVVdXwYmbz9dTA==",
"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",
@ -775,6 +811,19 @@
"resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.0.0.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fnode/-/node-12.0.0.tgz",
"integrity": "sha512-Jrb/x3HT4PTJp6a4avhmJCDEVrPdqLfl3e8GGMbpkGGdwAV5UGlIs4vVEfsHHfylZVOKZWpOqmqFH8CbfOZ6kg==" "integrity": "sha512-Jrb/x3HT4PTJp6a4avhmJCDEVrPdqLfl3e8GGMbpkGGdwAV5UGlIs4vVEfsHHfylZVOKZWpOqmqFH8CbfOZ6kg=="
}, },
"@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",
"resolved": "https://verdaccio.lossless.one/@types%2fshelljs/-/shelljs-0.8.5.tgz", "resolved": "https://verdaccio.lossless.one/@types%2fshelljs/-/shelljs-0.8.5.tgz",
@ -805,8 +854,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 +865,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 +967,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 +979,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 +1036,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 +1043,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",
@ -1051,6 +1108,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 +1151,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 +1275,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 +1321,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",
@ -1336,6 +1411,14 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz",
"integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4="
}, },
"log-symbols": {
"version": "2.2.0",
"resolved": "https://verdaccio.lossless.one/log-symbols/-/log-symbols-2.2.0.tgz",
"integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
"requires": {
"chalk": "^2.0.1"
}
},
"luxon": { "luxon": {
"version": "1.13.1", "version": "1.13.1",
"resolved": "https://verdaccio.lossless.one/luxon/-/luxon-1.13.1.tgz", "resolved": "https://verdaccio.lossless.one/luxon/-/luxon-1.13.1.tgz",
@ -1390,6 +1473,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 +1559,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 +1764,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",
@ -1779,7 +1930,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 +2040,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",

View File

@ -1,5 +1,5 @@
{ {
"name": "@gitzone/npmdocker", "name": "@gitzone/tsdocker",
"version": "1.2.28", "version": "1.2.28",
"private": false, "private": false,
"description": "develop npm modules cross platform with docker", "description": "develop npm modules cross platform with docker",
@ -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/)"
@ -47,6 +48,10 @@
"@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.4",
"@pushrocks/smartopen": "^1.0.8",
"@pushrocks/smartpromise": "^3.0.2", "@pushrocks/smartpromise": "^3.0.2",
"@pushrocks/smartshell": "^2.0.13", "@pushrocks/smartshell": "^2.0.13",
"@pushrocks/smartstring": "^3.0.10", "@pushrocks/smartstring": "^3.0.10",

1
test Submodule

@ -0,0 +1 @@
Subproject commit 0d623adeab09ca0861da5b669454aaa24d8f3669

View File

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

View File

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

View File

@ -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();
};

View File

@ -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;
};

88
ts/tsdocker.cli.ts Normal file
View File

@ -0,0 +1,88 @@
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
View 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;
};

View File

@ -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
View 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();

View File

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

View File

@ -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
}; };

View File

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

View File

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