feat(logging): use smartlog
This commit is contained in:
parent
8604c63d37
commit
0079addfc5
@ -135,13 +135,3 @@ pages:
|
|||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
windowsCompatibility:
|
|
||||||
image: stefanscherer/node-windows:10-build-tools
|
|
||||||
stage: metadata
|
|
||||||
script:
|
|
||||||
- npm install & npm test
|
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
|
||||||
tags:
|
|
||||||
- windows
|
|
||||||
allow_failure: true
|
|
||||||
|
413
package-lock.json
generated
413
package-lock.json
generated
@ -28,9 +28,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@gitzone/tsrun": {
|
"@gitzone/tsrun": {
|
||||||
"version": "1.1.12",
|
"version": "1.1.13",
|
||||||
"resolved": "https://registry.npmjs.org/@gitzone/tsrun/-/tsrun-1.1.12.tgz",
|
"resolved": "https://registry.npmjs.org/@gitzone/tsrun/-/tsrun-1.1.13.tgz",
|
||||||
"integrity": "sha512-DOxqOg+evoxhgbzhzH4u6LaPF+6bpMsnBVl1QQaHzKPGBlNjaIY4yJ0RsGnWMgX1hlNLvbgHtl0Ky4A2MDvyrg==",
|
"integrity": "sha512-yJLXfqu33zGc1hBX4HGxzlBvb5DU2zs80MUd8UsULJvkgOBofb3XR7eyV7iZfP097sd+ABj17yoeqJcRRjOZTg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"@gitzone/tsbuild": "^2.0.22",
|
"@gitzone/tsbuild": "^2.0.22",
|
||||||
@ -59,7 +59,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"
|
||||||
}
|
}
|
||||||
@ -75,14 +74,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/lik": {
|
"@pushrocks/lik": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/lik/-/lik-3.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/lik/-/lik-3.0.2.tgz",
|
||||||
"integrity": "sha512-6dwRg7WMdY9drlqfo6NzOcw5ubVWYvIOSSMZz4Jsojpa8aDVwXd2VkD7sxO/PJRrbZzHkx/JXoY/epcWRjngUw==",
|
"integrity": "sha512-E2kI0jmPBGVfvXpmGEZOiv7amZrAIBpI49WL/gIdMy9MVeo6+k2VLDvYtdjzayVviE+LEt3//Xe08xE74FbP1A==",
|
||||||
"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.2",
|
||||||
|
"@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"
|
||||||
}
|
}
|
||||||
@ -112,17 +112,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartcli": {
|
"@pushrocks/smartcli": {
|
||||||
"version": "3.0.4",
|
"version": "3.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/smartcli/-/smartcli-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartcli/-/smartcli-3.0.6.tgz",
|
||||||
"integrity": "sha512-ZuCPIZD+vPHmNP6BLdhP+GTptZEnLeGhUsykWss47MbZ0FvGeXm1r939qsx/wwijGT3F1rQIHkDA74VdQ2VDmw==",
|
"integrity": "sha512-fCggmQXiu1URqMmzIta/8eBkBEfeWHwoErzQNTPFGpyVHw2Yhb5HBsatXUZUX5rBB+1o9xny9IzkLGyjI0lCww==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/lik": "^3.0.1",
|
"@pushrocks/lik": "^3.0.1",
|
||||||
"@pushrocks/smartlog": "^2.0.1",
|
"@pushrocks/smartlog": "^2.0.1",
|
||||||
|
"@pushrocks/smartparam": "^1.0.4",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
"@types/yargs": "^11.1.1",
|
"@types/yargs": "^11.1.1",
|
||||||
"rxjs": "^6.3.0",
|
"rxjs": "^6.3.2",
|
||||||
"smartparam": "1.0.2",
|
"yargs": "^12.0.2"
|
||||||
"yargs": "^12.0.1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartdelay": {
|
"@pushrocks/smartdelay": {
|
||||||
@ -134,33 +134,71 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartfile": {
|
"@pushrocks/smartfile": {
|
||||||
"version": "6.0.8",
|
"version": "6.0.11",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/smartfile/-/smartfile-6.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartfile/-/smartfile-6.0.11.tgz",
|
||||||
"integrity": "sha512-YkAovvQ0pcVphXLynlQ1D4nhEoUqALqqUn2pRXc2vXNy0RDSU22puLlLVhoXT0NPAqYNMazhqc4OAixgEOpdFw==",
|
"integrity": "sha512-qITfYEUtSN478CFyYX0KatIYLV28u/KdO3ClOcKjx1epagpuYhkwfVELhyIDRvapMjuesoVgZcrXUhcvq0o9+w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartpath": "^4.0.1",
|
"@pushrocks/smartpath": "^4.0.1",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
"@pushrocks/smartrequest": "^1.1.14",
|
"@pushrocks/smartrequest": "^1.1.14",
|
||||||
"@types/fs-extra": "^5.0.4",
|
"@types/fs-extra": "^5.0.4",
|
||||||
"@types/vinyl": "^2.0.2",
|
"@types/vinyl": "^2.0.2",
|
||||||
"fs-extra": "^7.0.0",
|
"fs-extra": "^7.0.1",
|
||||||
"glob": "^7.1.2",
|
"glob": "^7.1.3",
|
||||||
"js-yaml": "^3.10.0",
|
"js-yaml": "^3.10.0",
|
||||||
"vinyl-file": "^3.0.0"
|
"vinyl-file": "^3.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"fs-extra": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
|
||||||
|
"requires": {
|
||||||
|
"graceful-fs": "^4.1.2",
|
||||||
|
"jsonfile": "^4.0.0",
|
||||||
|
"universalify": "^0.1.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@pushrocks/smartlog": {
|
"@pushrocks/smartlog": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.9",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog/-/smartlog-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog/-/smartlog-2.0.9.tgz",
|
||||||
"integrity": "sha512-GtsDTGIUF3VuWPyF8FV5dF31ZCEIcaJ56ZlvJsWxjnyJq57X25mk5/K0QAaRE9IIeHg6fORcukFomb5C+AOQrg==",
|
"integrity": "sha512-F2u3O8OOQ7QXgg9o0lI7HnqEhSQZo2A8u0EuNbQH+Kj2oL62xDwjAg6KkINwH7ObSWpaldZ+I28prG0JxaRzvg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartlog-interfaces": "^1.0.9"
|
"@pushrocks/smartlog-interfaces": "^2.0.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"@pushrocks/smartlog-destination-local": {
|
||||||
|
"version": "7.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog-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": {
|
||||||
|
"ora": {
|
||||||
|
"version": "3.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ora/-/ora-3.0.0.tgz",
|
||||||
|
"integrity": "sha512-LBS97LFe2RV6GJmXBi6OKcETKyklHNMV0xw7BtsVn2MlsgsydyZetSCbCANr+PFLmDyv4KV88nn0eCKza665Mg==",
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^2.3.1",
|
||||||
|
"cli-cursor": "^2.1.0",
|
||||||
|
"cli-spinners": "^1.1.0",
|
||||||
|
"log-symbols": "^2.2.0",
|
||||||
|
"strip-ansi": "^4.0.0",
|
||||||
|
"wcwidth": "^1.0.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@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://registry.npmjs.org/@pushrocks/smartlog-interfaces/-/smartlog-interfaces-2.0.5.tgz",
|
||||||
"integrity": "sha512-0qwpomrRN0kFjmhR9m1iHYXoISoNuXtRP0Wr+JtkYyURLwKHMaW8Xoznf8MzXJptRfqufJi3Fxh5HodpPrIZUA=="
|
"integrity": "sha512-eLNlRpDwy3E+6v/B6fo/NiAo+UxBO3SxKgIIsgUGbWfVpsyUi0PG2xfVCdhJlhL1AsRRvKglfHSOB8qKE+XCLw=="
|
||||||
},
|
},
|
||||||
"@pushrocks/smartparam": {
|
"@pushrocks/smartparam": {
|
||||||
"version": "1.0.4",
|
"version": "1.0.4",
|
||||||
@ -192,10 +230,31 @@
|
|||||||
"form-data": "^2.3.2"
|
"form-data": "^2.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@pushrocks/smartrx": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartrx/-/smartrx-2.0.2.tgz",
|
||||||
|
"integrity": "sha512-3lQONWp/Q/al8O6Cm9v6aSamNAzJimGHNFgHBKKmyBOVZaYrvhd6OMgDDicHE6vkYHXNtltXj5q3aIunz+bKwQ==",
|
||||||
|
"requires": {
|
||||||
|
"@pushrocks/lik": "^3.0.1",
|
||||||
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
|
"rxjs": "^6.3.3",
|
||||||
|
"smartevent": "^1.0.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"rxjs": {
|
||||||
|
"version": "6.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz",
|
||||||
|
"integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==",
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.9.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"@pushrocks/smartshell": {
|
"@pushrocks/smartshell": {
|
||||||
"version": "2.0.6",
|
"version": "2.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/smartshell/-/smartshell-2.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/smartshell/-/smartshell-2.0.8.tgz",
|
||||||
"integrity": "sha512-D48KB3DDqLfMjOXGEutqJi+v3Z4RcWacu5BJXxUwrecvd6oetbKobfmNGxeHSQPmNGb7U3ISfKwV6c5T5EZkJg==",
|
"integrity": "sha512-OeGrJez0vSHe/E0auHNUqf7r0B3yS+pkVe6BuxdJemJx5LBRtcHuZnJCxU5pSLL8igzlTfR+jVpjKJXUMzCsrA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
"@types/which": "^1.3.1",
|
"@types/which": "^1.3.1",
|
||||||
@ -269,6 +328,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"@pushrocks/smarttime": {
|
||||||
|
"version": "3.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@pushrocks/smarttime/-/smarttime-3.0.5.tgz",
|
||||||
|
"integrity": "sha512-nHjJ8xRZ87OE8tBBIAOgjHJmJrc3MaPZtEZ5JDY2U9gjaED6JdRcdQ+vhSaLJT+U2u8YzXOuA6LfNN+X4jZm6A==",
|
||||||
|
"requires": {
|
||||||
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
|
"@types/luxon": "^1.4.1",
|
||||||
|
"luxon": "^1.8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"@pushrocks/tapbundle": {
|
"@pushrocks/tapbundle": {
|
||||||
"version": "3.0.7",
|
"version": "3.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/@pushrocks/tapbundle/-/tapbundle-3.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/@pushrocks/tapbundle/-/tapbundle-3.0.7.tgz",
|
||||||
@ -363,9 +432,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@types/lodash": {
|
"@types/lodash": {
|
||||||
"version": "4.14.116",
|
"version": "4.14.118",
|
||||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.116.tgz",
|
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.118.tgz",
|
||||||
"integrity": "sha512-lRnAtKnxMXcYYXqOiotTmJd74uawNWuPnsnPrrO7HiFuE3npE2iQhfABatbYDyxTNqZNuXzcKGhw37R7RjBFLg=="
|
"integrity": "sha512-iiJbKLZbhSa6FYRip/9ZDX6HXhayXLDGY2Fqws9cOkEQ6XeKfaxB0sC541mowZJueYyMnVUmmG+al5/4fCDrgw=="
|
||||||
|
},
|
||||||
|
"@types/luxon": {
|
||||||
|
"version": "1.4.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-1.4.1.tgz",
|
||||||
|
"integrity": "sha512-mYv/gbkOJ40CDgR8st5sosfFNrJncdlkpdzQSNRdU86UQg3oWWmll4AO/7B8F5FlBC6YrIXqXDSnkoCBqo+uMA=="
|
||||||
},
|
},
|
||||||
"@types/minimatch": {
|
"@types/minimatch": {
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
@ -373,9 +447,9 @@
|
|||||||
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA=="
|
||||||
},
|
},
|
||||||
"@types/node": {
|
"@types/node": {
|
||||||
"version": "10.10.3",
|
"version": "10.12.10",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.10.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.10.tgz",
|
||||||
"integrity": "sha512-dWk7F3b0m6uDLHero7tsnpAi9r2RGPQHGbb0/VCv7DPJRMFtk3RonY1/29vfJKnheRMBa7+uF+vunlg/mBGlxg=="
|
"integrity": "sha512-8xZEYckCbUVgK8Eg7lf5Iy4COKJ5uXlnIOnePN0WUwSQggy9tolM+tDJf7wMOnT/JT/W9xDYIaYggt3mRV2O5w=="
|
||||||
},
|
},
|
||||||
"@types/shelljs": {
|
"@types/shelljs": {
|
||||||
"version": "0.8.0",
|
"version": "0.8.0",
|
||||||
@ -497,6 +571,59 @@
|
|||||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||||
},
|
},
|
||||||
|
"babel-code-frame": {
|
||||||
|
"version": "6.26.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz",
|
||||||
|
"integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"chalk": "^1.1.3",
|
||||||
|
"esutils": "^2.0.2",
|
||||||
|
"js-tokens": "^3.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"ansi-styles": {
|
||||||
|
"version": "2.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
|
||||||
|
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"chalk": {
|
||||||
|
"version": "1.1.3",
|
||||||
|
"resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
|
||||||
|
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-styles": "^2.2.1",
|
||||||
|
"escape-string-regexp": "^1.0.2",
|
||||||
|
"has-ansi": "^2.0.0",
|
||||||
|
"strip-ansi": "^3.0.0",
|
||||||
|
"supports-color": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"strip-ansi": {
|
||||||
|
"version": "3.0.1",
|
||||||
|
"resolved": "http://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||||
|
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "^2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"supports-color": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"backo2": {
|
"backo2": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz",
|
||||||
@ -575,15 +702,21 @@
|
|||||||
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"builtin-modules": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"callsite": {
|
"callsite": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz",
|
||||||
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA="
|
"integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA="
|
||||||
},
|
},
|
||||||
"camelcase": {
|
"camelcase": {
|
||||||
"version": "4.1.0",
|
"version": "5.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz",
|
||||||
"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0="
|
"integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA=="
|
||||||
},
|
},
|
||||||
"cflare": {
|
"cflare": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.5",
|
||||||
@ -718,6 +851,12 @@
|
|||||||
"delayed-stream": "~1.0.0"
|
"delayed-stream": "~1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"commander": {
|
||||||
|
"version": "2.19.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
|
||||||
|
"integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"component-bind": {
|
"component-bind": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz",
|
||||||
@ -782,12 +921,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"decamelize": {
|
"decamelize": {
|
||||||
"version": "2.0.0",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
||||||
"integrity": "sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg==",
|
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
|
||||||
"requires": {
|
|
||||||
"xregexp": "4.0.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"deep-eql": {
|
"deep-eql": {
|
||||||
"version": "3.0.1",
|
"version": "3.0.1",
|
||||||
@ -798,6 +934,21 @@
|
|||||||
"type-detect": "^4.0.0"
|
"type-detect": "^4.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"defaults": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=",
|
||||||
|
"requires": {
|
||||||
|
"clone": "^1.0.2"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"clone": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
|
||||||
|
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"define-properties": {
|
"define-properties": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz",
|
||||||
@ -899,6 +1050,12 @@
|
|||||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||||
},
|
},
|
||||||
|
"esutils": {
|
||||||
|
"version": "2.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
|
||||||
|
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"execa": {
|
"execa": {
|
||||||
"version": "0.10.0",
|
"version": "0.10.0",
|
||||||
"resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz",
|
"resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz",
|
||||||
@ -1020,6 +1177,23 @@
|
|||||||
"function-bind": "^1.1.1"
|
"function-bind": "^1.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"has-ansi": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"ansi-regex": "^2.0.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ansi-regex": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||||
|
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||||
|
"dev": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"has-binary2": {
|
"has-binary2": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/has-binary2/-/has-binary2-1.0.3.tgz",
|
||||||
@ -1150,6 +1324,12 @@
|
|||||||
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.5.tgz",
|
"resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.5.tgz",
|
||||||
"integrity": "sha512-aUnNwqMOXw3yvErjMPSQu6qIIzUmT1e5KcU1OZxRDU1g/am6mzBvcrmLAYwzmB59BHPrh5/tKaiF4OPhqRWESQ=="
|
"integrity": "sha512-aUnNwqMOXw3yvErjMPSQu6qIIzUmT1e5KcU1OZxRDU1g/am6mzBvcrmLAYwzmB59BHPrh5/tKaiF4OPhqRWESQ=="
|
||||||
},
|
},
|
||||||
|
"js-tokens": {
|
||||||
|
"version": "3.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz",
|
||||||
|
"integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"js-yaml": {
|
"js-yaml": {
|
||||||
"version": "3.12.0",
|
"version": "3.12.0",
|
||||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
|
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz",
|
||||||
@ -1237,6 +1417,11 @@
|
|||||||
"chalk": "^2.0.1"
|
"chalk": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"luxon": {
|
||||||
|
"version": "1.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/luxon/-/luxon-1.8.0.tgz",
|
||||||
|
"integrity": "sha512-F742cYUYB7X+LXY3cIn6THZUBqRBjeAvF+CWE2i3+eKcv2bzsCsnRsBYL8Qrqzp1dfs6HsVcSjfKt2RcrtUElw=="
|
||||||
|
},
|
||||||
"make-error": {
|
"make-error": {
|
||||||
"version": "1.3.5",
|
"version": "1.3.5",
|
||||||
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz",
|
"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz",
|
||||||
@ -1244,9 +1429,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"map-age-cleaner": {
|
"map-age-cleaner": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
|
||||||
"integrity": "sha512-UN1dNocxQq44IhJyMI4TU8phc2m9BddacHRPRjKGLYaF0jqd3xLz0jS0skpAU9WgYyoR4gHtUpzytNBS385FWQ==",
|
"integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"p-defer": "^1.0.0"
|
"p-defer": "^1.0.0"
|
||||||
}
|
}
|
||||||
@ -1294,13 +1479,13 @@
|
|||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
"version": "0.5.1",
|
"version": "0.5.1",
|
||||||
"resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -1309,7 +1494,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
@ -1373,6 +1558,15 @@
|
|||||||
"requires": {
|
"requires": {
|
||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"through2": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
|
||||||
|
"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
|
||||||
|
"requires": {
|
||||||
|
"readable-stream": "~2.3.6",
|
||||||
|
"xtend": "~4.0.1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1517,6 +1711,12 @@
|
|||||||
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
|
||||||
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
|
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A="
|
||||||
},
|
},
|
||||||
|
"path-parse": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
|
||||||
|
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"pathval": {
|
"pathval": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
|
||||||
@ -1587,6 +1787,15 @@
|
|||||||
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
|
||||||
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
|
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE="
|
||||||
},
|
},
|
||||||
|
"resolve": {
|
||||||
|
"version": "1.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz",
|
||||||
|
"integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"path-parse": "^1.0.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"restore-cursor": {
|
"restore-cursor": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz",
|
||||||
@ -1610,9 +1819,9 @@
|
|||||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
},
|
},
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.5.1",
|
"version": "5.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
|
||||||
"integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw=="
|
"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg=="
|
||||||
},
|
},
|
||||||
"set-blocking": {
|
"set-blocking": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
@ -1685,6 +1894,15 @@
|
|||||||
"typings-global": "^1.0.14"
|
"typings-global": "^1.0.14"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"smartevent": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/smartevent/-/smartevent-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-E9K/LPCU698XgT+g1GBB+BejAqo=",
|
||||||
|
"requires": {
|
||||||
|
"smartq": "^1.1.1",
|
||||||
|
"typings-global": "^1.0.16"
|
||||||
|
}
|
||||||
|
},
|
||||||
"smartlodash": {
|
"smartlodash": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/smartlodash/-/smartlodash-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/smartlodash/-/smartlodash-1.0.1.tgz",
|
||||||
@ -1702,18 +1920,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"smartparam": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/smartparam/-/smartparam-1.0.2.tgz",
|
|
||||||
"integrity": "sha512-Q09m98X6+WG9q0Wpj6LXXSqGdYUItLAsj5ypJ8pRkGtry2V4zZzhimv4xviViLIfrgIBn5uTfbjNU0is7+WRTA==",
|
|
||||||
"requires": {
|
|
||||||
"beautylog": "6.1.10",
|
|
||||||
"is-promise": "^2.1.0",
|
|
||||||
"minimatch": "^3.0.4",
|
|
||||||
"smartq": "^1.1.6",
|
|
||||||
"typings-global": "^1.0.20"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"smartq": {
|
"smartq": {
|
||||||
"version": "1.1.8",
|
"version": "1.1.8",
|
||||||
"resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.8.tgz",
|
"resolved": "https://registry.npmjs.org/smartq/-/smartq-1.1.8.tgz",
|
||||||
@ -1912,11 +2118,11 @@
|
|||||||
"integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY="
|
"integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY="
|
||||||
},
|
},
|
||||||
"through2": {
|
"through2": {
|
||||||
"version": "2.0.3",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/through2/-/through2-3.0.0.tgz",
|
||||||
"integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=",
|
"integrity": "sha512-8B+sevlqP4OiCjonI1Zw03Sf8PuV1eRsYQgLad5eonILOdyeRsY27A/2Ze8IlvlMvq31OH+3fz/styI7Ya62yQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"readable-stream": "^2.1.5",
|
"readable-stream": "2 || 3",
|
||||||
"xtend": "~4.0.1"
|
"xtend": "~4.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1951,6 +2157,41 @@
|
|||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
|
||||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||||
},
|
},
|
||||||
|
"tslint": {
|
||||||
|
"version": "5.11.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz",
|
||||||
|
"integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"babel-code-frame": "^6.22.0",
|
||||||
|
"builtin-modules": "^1.1.1",
|
||||||
|
"chalk": "^2.3.0",
|
||||||
|
"commander": "^2.12.1",
|
||||||
|
"diff": "^3.2.0",
|
||||||
|
"glob": "^7.1.1",
|
||||||
|
"js-yaml": "^3.7.0",
|
||||||
|
"minimatch": "^3.0.4",
|
||||||
|
"resolve": "^1.3.2",
|
||||||
|
"semver": "^5.3.0",
|
||||||
|
"tslib": "^1.8.0",
|
||||||
|
"tsutils": "^2.27.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tslint-config-prettier": {
|
||||||
|
"version": "1.16.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.16.0.tgz",
|
||||||
|
"integrity": "sha512-zu6RAcpBtqdvhT6KpBh9kRPYATjOf9BnRi718kNqVKFjEgSE4rFrPprFju1YJrkOa3RbtbWI1ZSuLd2NBX1MDw==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"tsutils": {
|
||||||
|
"version": "2.29.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
|
||||||
|
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||||
|
"dev": true,
|
||||||
|
"requires": {
|
||||||
|
"tslib": "^1.8.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"type-detect": {
|
"type-detect": {
|
||||||
"version": "4.0.8",
|
"version": "4.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
|
||||||
@ -2017,6 +2258,14 @@
|
|||||||
"vinyl": "^2.0.1"
|
"vinyl": "^2.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"wcwidth": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/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",
|
||||||
@ -2092,11 +2341,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
|
"resolved": "https://registry.npmjs.org/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz",
|
||||||
"integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
|
"integrity": "sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4="
|
||||||
},
|
},
|
||||||
"xregexp": {
|
|
||||||
"version": "4.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-4.0.0.tgz",
|
|
||||||
"integrity": "sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg=="
|
|
||||||
},
|
|
||||||
"xtend": {
|
"xtend": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
|
||||||
@ -2108,12 +2352,12 @@
|
|||||||
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
|
"integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
|
||||||
},
|
},
|
||||||
"yargs": {
|
"yargs": {
|
||||||
"version": "12.0.2",
|
"version": "12.0.5",
|
||||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
|
||||||
"integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==",
|
"integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"cliui": "^4.0.0",
|
"cliui": "^4.0.0",
|
||||||
"decamelize": "^2.0.0",
|
"decamelize": "^1.2.0",
|
||||||
"find-up": "^3.0.0",
|
"find-up": "^3.0.0",
|
||||||
"get-caller-file": "^1.0.1",
|
"get-caller-file": "^1.0.1",
|
||||||
"os-locale": "^3.0.0",
|
"os-locale": "^3.0.0",
|
||||||
@ -2123,15 +2367,16 @@
|
|||||||
"string-width": "^2.0.0",
|
"string-width": "^2.0.0",
|
||||||
"which-module": "^2.0.0",
|
"which-module": "^2.0.0",
|
||||||
"y18n": "^3.2.1 || ^4.0.0",
|
"y18n": "^3.2.1 || ^4.0.0",
|
||||||
"yargs-parser": "^10.1.0"
|
"yargs-parser": "^11.1.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yargs-parser": {
|
"yargs-parser": {
|
||||||
"version": "10.1.0",
|
"version": "11.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
|
||||||
"integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
|
"integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"camelcase": "^4.1.0"
|
"camelcase": "^5.0.0",
|
||||||
|
"decamelize": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"yeast": {
|
"yeast": {
|
||||||
|
21
package.json
21
package.json
@ -24,33 +24,36 @@
|
|||||||
"homepage": "https://gitlab.com/gitzone/npmci#README",
|
"homepage": "https://gitlab.com/gitzone/npmci#README",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.0.22",
|
"@gitzone/tsbuild": "^2.0.22",
|
||||||
"@gitzone/tsrun": "^1.1.12",
|
"@gitzone/tsrun": "^1.1.13",
|
||||||
"@gitzone/tstest": "^1.0.15",
|
"@gitzone/tstest": "^1.0.15",
|
||||||
"@pushrocks/tapbundle": "^3.0.7",
|
"@pushrocks/tapbundle": "^3.0.7",
|
||||||
"@types/node": "^10.10.3"
|
"@types/node": "^10.12.10",
|
||||||
|
"tslint": "^5.11.0",
|
||||||
|
"tslint-config-prettier": "^1.16.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@pushrocks/lik": "^3.0.1",
|
"@pushrocks/lik": "^3.0.2",
|
||||||
"@pushrocks/npmextra": "^3.0.1",
|
"@pushrocks/npmextra": "^3.0.1",
|
||||||
"@pushrocks/projectinfo": "^4.0.2",
|
"@pushrocks/projectinfo": "^4.0.2",
|
||||||
"@pushrocks/smartcli": "^3.0.4",
|
"@pushrocks/smartcli": "^3.0.6",
|
||||||
"@pushrocks/smartdelay": "^2.0.2",
|
"@pushrocks/smartdelay": "^2.0.2",
|
||||||
"@pushrocks/smartfile": "^6.0.8",
|
"@pushrocks/smartfile": "^6.0.11",
|
||||||
|
"@pushrocks/smartlog": "^2.0.9",
|
||||||
|
"@pushrocks/smartlog-destination-local": "^7.0.5",
|
||||||
"@pushrocks/smartparam": "^1.0.4",
|
"@pushrocks/smartparam": "^1.0.4",
|
||||||
"@pushrocks/smartpromise": "^2.0.5",
|
"@pushrocks/smartpromise": "^2.0.5",
|
||||||
"@pushrocks/smartrequest": "^1.1.14",
|
"@pushrocks/smartrequest": "^1.1.14",
|
||||||
"@pushrocks/smartshell": "^2.0.6",
|
"@pushrocks/smartshell": "^2.0.8",
|
||||||
"@pushrocks/smartssh": "^1.2.3",
|
"@pushrocks/smartssh": "^1.2.3",
|
||||||
"@pushrocks/smartstring": "^3.0.4",
|
"@pushrocks/smartstring": "^3.0.4",
|
||||||
"@types/lodash": "^4.14.116",
|
"@types/lodash": "^4.14.118",
|
||||||
"@types/shelljs": "^0.8.0",
|
"@types/shelljs": "^0.8.0",
|
||||||
"@types/through2": "^2.0.34",
|
"@types/through2": "^2.0.34",
|
||||||
"beautylog": "^6.1.10",
|
|
||||||
"cflare": "^1.0.5",
|
"cflare": "^1.0.5",
|
||||||
"lodash": "^4.17.11",
|
"lodash": "^4.17.11",
|
||||||
"smartanalytics": "^2.0.9",
|
"smartanalytics": "^2.0.9",
|
||||||
"smartsocket": "^1.1.19",
|
"smartsocket": "^1.1.19",
|
||||||
"through2": "^2.0.3"
|
"through2": "^3.0.0"
|
||||||
},
|
},
|
||||||
"private": false
|
"private": false
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { logger } from '../npmci.logging';
|
||||||
import * as plugins from './mod.plugins';
|
import * as plugins from './mod.plugins';
|
||||||
import * as paths from '../npmci.paths';
|
import * as paths from '../npmci.paths';
|
||||||
import { bash } from '../npmci.bash';
|
import { bash } from '../npmci.bash';
|
||||||
@ -10,7 +11,7 @@ import { DockerRegistry } from './mod.classes.dockerregistry';
|
|||||||
import { RegistryStorage } from './mod.classes.registrystorage';
|
import { RegistryStorage } from './mod.classes.registrystorage';
|
||||||
|
|
||||||
// instances
|
// instances
|
||||||
let npmciRegistryStorage = new RegistryStorage();
|
const npmciRegistryStorage = new RegistryStorage();
|
||||||
|
|
||||||
export { Dockerfile, helpers };
|
export { Dockerfile, helpers };
|
||||||
|
|
||||||
@ -23,7 +24,7 @@ export let modArgvArg; // will be set through the build command
|
|||||||
export let handleCli = async argvArg => {
|
export let handleCli = async argvArg => {
|
||||||
modArgvArg = argvArg;
|
modArgvArg = argvArg;
|
||||||
if (argvArg._.length >= 2) {
|
if (argvArg._.length >= 2) {
|
||||||
let action: string = argvArg._[1];
|
const action: string = argvArg._[1];
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'build':
|
case 'build':
|
||||||
await build();
|
await build();
|
||||||
@ -42,10 +43,11 @@ export let handleCli = async argvArg => {
|
|||||||
await pull(argvArg);
|
await pull(argvArg);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
plugins.beautylog.error(`>>npmci docker ...<< action >>${action}<< not supported`);
|
logger.log('error', `>>npmci docker ...<< action >>${action}<< not supported`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.log(
|
logger.log(
|
||||||
|
'info',
|
||||||
`>>npmci docker ...<< cli arguments invalid... Please read the documentation.`
|
`>>npmci docker ...<< cli arguments invalid... Please read the documentation.`
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -56,7 +58,7 @@ export let handleCli = async argvArg => {
|
|||||||
*/
|
*/
|
||||||
export let build = async () => {
|
export let build = async () => {
|
||||||
await prepare();
|
await prepare();
|
||||||
plugins.beautylog.log('now building Dockerfiles...');
|
logger.log('info', 'now building Dockerfiles...');
|
||||||
await helpers
|
await helpers
|
||||||
.readDockerfiles()
|
.readDockerfiles()
|
||||||
.then(helpers.sortDockerfiles)
|
.then(helpers.sortDockerfiles)
|
||||||
@ -78,7 +80,7 @@ export let login = async () => {
|
|||||||
export let prepare = async () => {
|
export let prepare = async () => {
|
||||||
// Always login to GitLab Registry
|
// Always login to GitLab Registry
|
||||||
if (!process.env.CI_BUILD_TOKEN || process.env.CI_BUILD_TOKEN === '') {
|
if (!process.env.CI_BUILD_TOKEN || process.env.CI_BUILD_TOKEN === '') {
|
||||||
plugins.beautylog.error('No registry token specified by gitlab!');
|
logger.log('error', 'No registry token specified by gitlab!');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
npmciRegistryStorage.addRegistry(
|
npmciRegistryStorage.addRegistry(
|
||||||
@ -98,40 +100,41 @@ export let prepare = async () => {
|
|||||||
|
|
||||||
export let push = async argvArg => {
|
export let push = async argvArg => {
|
||||||
await prepare();
|
await prepare();
|
||||||
let registryUrlArg = argvArg._[2];
|
const registryUrlArg = argvArg._[2];
|
||||||
let suffix = null;
|
let suffix = null;
|
||||||
if (argvArg._.length >= 4) {
|
if (argvArg._.length >= 4) {
|
||||||
suffix = argvArg._[3];
|
suffix = argvArg._[3];
|
||||||
}
|
}
|
||||||
let dockerfileArray = await helpers
|
const dockerfileArray = await helpers
|
||||||
.readDockerfiles()
|
.readDockerfiles()
|
||||||
.then(helpers.sortDockerfiles)
|
.then(helpers.sortDockerfiles)
|
||||||
.then(helpers.mapDockerfiles);
|
.then(helpers.mapDockerfiles);
|
||||||
let localDockerRegistry = npmciRegistryStorage.getRegistryByUrl(registryUrlArg);
|
const localDockerRegistry = npmciRegistryStorage.getRegistryByUrl(registryUrlArg);
|
||||||
if (!localDockerRegistry) {
|
if (!localDockerRegistry) {
|
||||||
plugins.beautylog.error(
|
logger.log(
|
||||||
|
'error',
|
||||||
`Cannot push to registry ${registryUrlArg}, because it was not found in the authenticated registry list.`
|
`Cannot push to registry ${registryUrlArg}, because it was not found in the authenticated registry list.`
|
||||||
);
|
);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
for (let dockerfile of dockerfileArray) {
|
for (const dockerfile of dockerfileArray) {
|
||||||
await dockerfile.push(localDockerRegistry, suffix);
|
await dockerfile.push(localDockerRegistry, suffix);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export let pull = async argvArg => {
|
export let pull = async argvArg => {
|
||||||
await prepare();
|
await prepare();
|
||||||
let registryUrlArg = argvArg._[2];
|
const registryUrlArg = argvArg._[2];
|
||||||
let suffix = null;
|
let suffix = null;
|
||||||
if (argvArg._.length >= 4) {
|
if (argvArg._.length >= 4) {
|
||||||
suffix = argvArg._[3];
|
suffix = argvArg._[3];
|
||||||
}
|
}
|
||||||
let localDockerRegistry = npmciRegistryStorage.getRegistryByUrl(registryUrlArg);
|
const localDockerRegistry = npmciRegistryStorage.getRegistryByUrl(registryUrlArg);
|
||||||
let dockerfileArray = await helpers
|
const dockerfileArray = await helpers
|
||||||
.readDockerfiles()
|
.readDockerfiles()
|
||||||
.then(helpers.sortDockerfiles)
|
.then(helpers.sortDockerfiles)
|
||||||
.then(helpers.mapDockerfiles);
|
.then(helpers.mapDockerfiles);
|
||||||
for (let dockerfile of dockerfileArray) {
|
for (const dockerfile of dockerfileArray) {
|
||||||
await dockerfile.pull(localDockerRegistry, suffix);
|
await dockerfile.pull(localDockerRegistry, suffix);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { logger } from '../npmci.logging';
|
||||||
import * as plugins from './mod.plugins';
|
import * as plugins from './mod.plugins';
|
||||||
import * as NpmciEnv from '../npmci.env';
|
import * as NpmciEnv from '../npmci.env';
|
||||||
import { bash } from '../npmci.bash';
|
import { bash } from '../npmci.bash';
|
||||||
@ -10,16 +11,16 @@ import * as helpers from './mod.helpers';
|
|||||||
* class Dockerfile represents a Dockerfile on disk in npmci
|
* class Dockerfile represents a Dockerfile on disk in npmci
|
||||||
*/
|
*/
|
||||||
export class Dockerfile {
|
export class Dockerfile {
|
||||||
filePath: string;
|
public filePath: string;
|
||||||
repo: string;
|
public repo: string;
|
||||||
version: string;
|
public version: string;
|
||||||
cleanTag: string;
|
public cleanTag: string;
|
||||||
buildTag: string;
|
public buildTag: string;
|
||||||
containerName: string;
|
public containerName: string;
|
||||||
content: string;
|
public content: string;
|
||||||
baseImage: string;
|
public baseImage: string;
|
||||||
localBaseImageDependent: boolean;
|
public localBaseImageDependent: boolean;
|
||||||
localBaseDockerfile: Dockerfile;
|
public localBaseDockerfile: Dockerfile;
|
||||||
constructor(options: { filePath?: string; fileContents?: string | Buffer; read?: boolean }) {
|
constructor(options: { filePath?: string; fileContents?: string | Buffer; read?: boolean }) {
|
||||||
this.filePath = options.filePath;
|
this.filePath = options.filePath;
|
||||||
this.repo = NpmciEnv.repo.user + '/' + NpmciEnv.repo.repo;
|
this.repo = NpmciEnv.repo.user + '/' + NpmciEnv.repo.repo;
|
||||||
@ -38,10 +39,10 @@ export class Dockerfile {
|
|||||||
/**
|
/**
|
||||||
* builds the Dockerfile
|
* builds the Dockerfile
|
||||||
*/
|
*/
|
||||||
async build() {
|
public async build() {
|
||||||
plugins.beautylog.info('now building Dockerfile for ' + this.cleanTag);
|
logger.log('info', 'now building Dockerfile for ' + this.cleanTag);
|
||||||
let buildArgsString = await helpers.getDockerBuildArgs();
|
const buildArgsString = await helpers.getDockerBuildArgs();
|
||||||
let buildCommand = `docker build -t ${this.buildTag} -f ${this.filePath} ${buildArgsString} .`;
|
const buildCommand = `docker build -t ${this.buildTag} -f ${this.filePath} ${buildArgsString} .`;
|
||||||
await bash(buildCommand);
|
await bash(buildCommand);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -49,8 +50,8 @@ export class Dockerfile {
|
|||||||
/**
|
/**
|
||||||
* pushes the Dockerfile to a registry
|
* pushes the Dockerfile to a registry
|
||||||
*/
|
*/
|
||||||
async push(dockerRegistryArg: DockerRegistry, versionSuffix: string = null) {
|
public async push(dockerRegistryArg: DockerRegistry, versionSuffix: string = null) {
|
||||||
let pushTag = helpers.getDockerTagString(
|
const pushTag = helpers.getDockerTagString(
|
||||||
dockerRegistryArg.registryUrl,
|
dockerRegistryArg.registryUrl,
|
||||||
this.repo,
|
this.repo,
|
||||||
this.version,
|
this.version,
|
||||||
@ -63,8 +64,8 @@ export class Dockerfile {
|
|||||||
/**
|
/**
|
||||||
* pulls the Dockerfile from a registry
|
* pulls the Dockerfile from a registry
|
||||||
*/
|
*/
|
||||||
async pull(registryArg: DockerRegistry, versionSuffixArg: string = null) {
|
public async pull(registryArg: DockerRegistry, versionSuffixArg: string = null) {
|
||||||
let pullTag = helpers.getDockerTagString(
|
const pullTag = helpers.getDockerTagString(
|
||||||
registryArg.registryUrl,
|
registryArg.registryUrl,
|
||||||
this.repo,
|
this.repo,
|
||||||
this.version,
|
this.version,
|
||||||
@ -77,9 +78,9 @@ export class Dockerfile {
|
|||||||
/**
|
/**
|
||||||
* tests the Dockerfile;
|
* tests the Dockerfile;
|
||||||
*/
|
*/
|
||||||
async test() {
|
public async test() {
|
||||||
let testFile: string = plugins.path.join(paths.NpmciTestDir, 'test_' + this.version + '.sh');
|
const testFile: string = plugins.path.join(paths.NpmciTestDir, 'test_' + this.version + '.sh');
|
||||||
let testFileExists: boolean = plugins.smartfile.fs.fileExistsSync(testFile);
|
const testFileExists: boolean = plugins.smartfile.fs.fileExistsSync(testFile);
|
||||||
if (testFileExists) {
|
if (testFileExists) {
|
||||||
// run tests
|
// run tests
|
||||||
await bash(
|
await bash(
|
||||||
@ -93,17 +94,15 @@ export class Dockerfile {
|
|||||||
await bash(`docker rm npmci_test_container`);
|
await bash(`docker rm npmci_test_container`);
|
||||||
await bash(`docker rmi --force npmci_test_image`);
|
await bash(`docker rmi --force npmci_test_image`);
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.warn(
|
logger.log('warn', 'skipping tests for ' + this.cleanTag + ' because no testfile was found!');
|
||||||
'skipping tests for ' + this.cleanTag + ' because no testfile was found!'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets the id of a Dockerfile
|
* gets the id of a Dockerfile
|
||||||
*/
|
*/
|
||||||
async getId() {
|
public async getId() {
|
||||||
let containerId = await bash('docker inspect --type=image --format="{{.Id}}" ' + this.buildTag);
|
const containerId = await bash('docker inspect --type=image --format="{{.Id}}" ' + this.buildTag);
|
||||||
return containerId;
|
return containerId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { logger } from '../npmci.logging';
|
||||||
import * as plugins from './mod.plugins';
|
import * as plugins from './mod.plugins';
|
||||||
import { bash } from '../npmci.bash';
|
import { bash } from '../npmci.bash';
|
||||||
|
|
||||||
@ -8,26 +9,26 @@ export interface IDockerRegistryConstructorOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class DockerRegistry {
|
export class DockerRegistry {
|
||||||
registryUrl: string;
|
public registryUrl: string;
|
||||||
username: string;
|
public username: string;
|
||||||
password: string;
|
public password: string;
|
||||||
constructor(optionsArg: IDockerRegistryConstructorOptions) {
|
constructor(optionsArg: IDockerRegistryConstructorOptions) {
|
||||||
this.registryUrl = optionsArg.registryUrl;
|
this.registryUrl = optionsArg.registryUrl;
|
||||||
this.username = optionsArg.username;
|
this.username = optionsArg.username;
|
||||||
this.password = optionsArg.password;
|
this.password = optionsArg.password;
|
||||||
plugins.beautylog.info(`created DockerRegistry for ${this.registryUrl}`);
|
logger.log('info', `created DockerRegistry for ${this.registryUrl}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
static fromEnvString(envString: string): DockerRegistry {
|
public static fromEnvString(envString: string): DockerRegistry {
|
||||||
let dockerRegexResultArray = envString.split('|');
|
const dockerRegexResultArray = envString.split('|');
|
||||||
if (dockerRegexResultArray.length !== 3) {
|
if (dockerRegexResultArray.length !== 3) {
|
||||||
plugins.beautylog.error('malformed docker env var...');
|
logger.log('error', 'malformed docker env var...');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let registryUrl = dockerRegexResultArray[0];
|
const registryUrl = dockerRegexResultArray[0];
|
||||||
let username = dockerRegexResultArray[1];
|
const username = dockerRegexResultArray[1];
|
||||||
let password = dockerRegexResultArray[2];
|
const password = dockerRegexResultArray[2];
|
||||||
return new DockerRegistry({
|
return new DockerRegistry({
|
||||||
registryUrl: registryUrl,
|
registryUrl: registryUrl,
|
||||||
username: username,
|
username: username,
|
||||||
@ -35,13 +36,13 @@ export class DockerRegistry {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async login() {
|
public async login() {
|
||||||
if (this.registryUrl === 'docker.io') {
|
if (this.registryUrl === 'docker.io') {
|
||||||
await bash(`docker login -u ${this.username} -p ${this.password}`);
|
await bash(`docker login -u ${this.username} -p ${this.password}`);
|
||||||
plugins.beautylog.info('Logged in to standard docker hub');
|
logger.log('info', 'Logged in to standard docker hub');
|
||||||
} else {
|
} else {
|
||||||
await bash(`docker login -u ${this.username} -p ${this.password} ${this.registryUrl}`);
|
await bash(`docker login -u ${this.username} -p ${this.password} ${this.registryUrl}`);
|
||||||
}
|
}
|
||||||
plugins.beautylog.ok(`docker authenticated for ${this.registryUrl}!`);
|
logger.log('ok', `docker authenticated for ${this.registryUrl}!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
import { logger } from '../npmci.logging';
|
||||||
import * as plugins from './mod.plugins';
|
import * as plugins from './mod.plugins';
|
||||||
import { Objectmap } from 'lik';
|
import { Objectmap } from '@pushrocks/lik';
|
||||||
|
|
||||||
import { DockerRegistry } from './mod.classes.dockerregistry';
|
import { DockerRegistry } from './mod.classes.dockerregistry';
|
||||||
|
|
||||||
@ -23,6 +24,6 @@ export class RegistryStorage {
|
|||||||
await this.objectMap.forEach(async registryArg => {
|
await this.objectMap.forEach(async registryArg => {
|
||||||
await registryArg.login();
|
await registryArg.login();
|
||||||
});
|
});
|
||||||
plugins.beautylog.success('logged in successfully into all available DockerRegistries!');
|
logger.log('success', 'logged in successfully into all available DockerRegistries!');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { logger } from '../npmci.logging';
|
||||||
import * as plugins from './mod.plugins';
|
import * as plugins from './mod.plugins';
|
||||||
import * as paths from '../npmci.paths';
|
import * as paths from '../npmci.paths';
|
||||||
import * as NpmciEnv from '../npmci.env';
|
import * as NpmciEnv from '../npmci.env';
|
||||||
@ -11,14 +12,14 @@ import { Dockerfile } from './mod.classes.dockerfile';
|
|||||||
* @returns Promise<Dockerfile[]>
|
* @returns Promise<Dockerfile[]>
|
||||||
*/
|
*/
|
||||||
export let readDockerfiles = async (): Promise<Dockerfile[]> => {
|
export let readDockerfiles = async (): Promise<Dockerfile[]> => {
|
||||||
let fileTree = await plugins.smartfile.fs.listFileTree(paths.cwd, 'Dockerfile*');
|
const fileTree = await plugins.smartfile.fs.listFileTree(paths.cwd, 'Dockerfile*');
|
||||||
|
|
||||||
// create the Dockerfile array
|
// create the Dockerfile array
|
||||||
let readDockerfilesArray: Dockerfile[] = [];
|
const readDockerfilesArray: Dockerfile[] = [];
|
||||||
plugins.beautylog.info(`found ${fileTree.length} Dockerfiles:`);
|
logger.log('info', `found ${fileTree.length} Dockerfiles:`);
|
||||||
console.log(fileTree);
|
console.log(fileTree);
|
||||||
for (let dockerfilePath of fileTree) {
|
for (const dockerfilePath of fileTree) {
|
||||||
let myDockerfile = new Dockerfile({
|
const myDockerfile = new Dockerfile({
|
||||||
filePath: dockerfilePath,
|
filePath: dockerfilePath,
|
||||||
read: true
|
read: true
|
||||||
});
|
});
|
||||||
@ -34,14 +35,14 @@ export let readDockerfiles = async (): Promise<Dockerfile[]> => {
|
|||||||
* @returns Promise<Dockerfile[]>
|
* @returns Promise<Dockerfile[]>
|
||||||
*/
|
*/
|
||||||
export let sortDockerfiles = (sortableArrayArg: Dockerfile[]): Promise<Dockerfile[]> => {
|
export let sortDockerfiles = (sortableArrayArg: Dockerfile[]): Promise<Dockerfile[]> => {
|
||||||
let done = plugins.smartpromise.defer<Dockerfile[]>();
|
const done = plugins.smartpromise.defer<Dockerfile[]>();
|
||||||
plugins.beautylog.info('sorting Dockerfiles:');
|
logger.log('info', 'sorting Dockerfiles:');
|
||||||
let sortedArray: Dockerfile[] = [];
|
const sortedArray: Dockerfile[] = [];
|
||||||
let cleanTagsOriginal = cleanTagsArrayFunction(sortableArrayArg, sortedArray);
|
const cleanTagsOriginal = cleanTagsArrayFunction(sortableArrayArg, sortedArray);
|
||||||
let sorterFunctionCounter: number = 0;
|
let sorterFunctionCounter: number = 0;
|
||||||
let sorterFunction = function() {
|
const sorterFunction = () => {
|
||||||
sortableArrayArg.forEach(dockerfileArg => {
|
sortableArrayArg.forEach(dockerfileArg => {
|
||||||
let cleanTags = cleanTagsArrayFunction(sortableArrayArg, sortedArray);
|
const cleanTags = cleanTagsArrayFunction(sortableArrayArg, sortedArray);
|
||||||
if (
|
if (
|
||||||
cleanTags.indexOf(dockerfileArg.baseImage) === -1 &&
|
cleanTags.indexOf(dockerfileArg.baseImage) === -1 &&
|
||||||
sortedArray.indexOf(dockerfileArg) === -1
|
sortedArray.indexOf(dockerfileArg) === -1
|
||||||
@ -54,8 +55,8 @@ export let sortDockerfiles = (sortableArrayArg: Dockerfile[]): Promise<Dockerfil
|
|||||||
});
|
});
|
||||||
if (sortableArrayArg.length === sortedArray.length) {
|
if (sortableArrayArg.length === sortedArray.length) {
|
||||||
let counter = 1;
|
let counter = 1;
|
||||||
for (let dockerfile of sortedArray) {
|
for (const dockerfile of sortedArray) {
|
||||||
plugins.beautylog.log(`tag ${counter}: -> ${dockerfile.cleanTag}`);
|
logger.log('info', `tag ${counter}: -> ${dockerfile.cleanTag}`);
|
||||||
counter++;
|
counter++;
|
||||||
}
|
}
|
||||||
done.resolve(sortedArray);
|
done.resolve(sortedArray);
|
||||||
@ -88,7 +89,7 @@ export let mapDockerfiles = async (sortedArray: Dockerfile[]): Promise<Dockerfil
|
|||||||
* builds the correspoding real docker image for each Dockerfile class instance
|
* builds the correspoding real docker image for each Dockerfile class instance
|
||||||
*/
|
*/
|
||||||
export let buildDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
|
export let buildDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
|
||||||
for (let dockerfileArg of sortedArrayArg) {
|
for (const dockerfileArg of sortedArrayArg) {
|
||||||
await dockerfileArg.build();
|
await dockerfileArg.build();
|
||||||
}
|
}
|
||||||
return sortedArrayArg;
|
return sortedArrayArg;
|
||||||
@ -99,7 +100,7 @@ export let buildDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
|
|||||||
* @param sortedArrayArg Dockerfile[] that contains all Dockerfiles in cwd
|
* @param sortedArrayArg Dockerfile[] that contains all Dockerfiles in cwd
|
||||||
*/
|
*/
|
||||||
export let testDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
|
export let testDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
|
||||||
for (let dockerfileArg of sortedArrayArg) {
|
for (const dockerfileArg of sortedArrayArg) {
|
||||||
await dockerfileArg.test();
|
await dockerfileArg.test();
|
||||||
}
|
}
|
||||||
return sortedArrayArg;
|
return sortedArrayArg;
|
||||||
@ -111,8 +112,8 @@ export let testDockerfiles = async (sortedArrayArg: Dockerfile[]) => {
|
|||||||
*/
|
*/
|
||||||
export let dockerFileVersion = (dockerfileNameArg: string): string => {
|
export let dockerFileVersion = (dockerfileNameArg: string): string => {
|
||||||
let versionString: string;
|
let versionString: string;
|
||||||
let versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/;
|
const versionRegex = /Dockerfile_([a-zA-Z0-9\.]*)$/;
|
||||||
let regexResultArray = versionRegex.exec(dockerfileNameArg);
|
const regexResultArray = versionRegex.exec(dockerfileNameArg);
|
||||||
if (regexResultArray && regexResultArray.length === 2) {
|
if (regexResultArray && regexResultArray.length === 2) {
|
||||||
versionString = regexResultArray[1];
|
versionString = regexResultArray[1];
|
||||||
} else {
|
} else {
|
||||||
@ -124,9 +125,9 @@ export let dockerFileVersion = (dockerfileNameArg: string): string => {
|
|||||||
/**
|
/**
|
||||||
* returns the docker base image for a Dockerfile
|
* returns the docker base image for a Dockerfile
|
||||||
*/
|
*/
|
||||||
export let dockerBaseImage = function(dockerfileContentArg: string) {
|
export let dockerBaseImage = (dockerfileContentArg: string) => {
|
||||||
let baseImageRegex = /FROM\s([a-zA-z0-9\/\-\:]*)\n?/;
|
const baseImageRegex = /FROM\s([a-zA-z0-9\/\-\:]*)\n?/;
|
||||||
let regexResultArray = baseImageRegex.exec(dockerfileContentArg);
|
const regexResultArray = baseImageRegex.exec(dockerfileContentArg);
|
||||||
return regexResultArray[1];
|
return regexResultArray[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -140,8 +141,8 @@ export let getDockerTagString = (
|
|||||||
suffixArg?: string
|
suffixArg?: string
|
||||||
): string => {
|
): string => {
|
||||||
// determine wether the repo should be mapped accordingly to the registry
|
// determine wether the repo should be mapped accordingly to the registry
|
||||||
let mappedRepo = NpmciConfig.configObject.dockerRegistryRepoMap[registryArg];
|
const mappedRepo = NpmciConfig.configObject.dockerRegistryRepoMap[registryArg];
|
||||||
let repo = (() => {
|
const repo = (() => {
|
||||||
if (mappedRepo) {
|
if (mappedRepo) {
|
||||||
return mappedRepo;
|
return mappedRepo;
|
||||||
} else {
|
} else {
|
||||||
@ -155,15 +156,15 @@ export let getDockerTagString = (
|
|||||||
version = versionArg + '_' + suffixArg;
|
version = versionArg + '_' + suffixArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
let tagString = `${registryArg}/${repo}:${version}`;
|
const tagString = `${registryArg}/${repo}:${version}`;
|
||||||
return tagString;
|
return tagString;
|
||||||
};
|
};
|
||||||
|
|
||||||
export let getDockerBuildArgs = async (): Promise<string> => {
|
export let getDockerBuildArgs = async (): Promise<string> => {
|
||||||
plugins.beautylog.info('checking for env vars to be supplied to the docker build');
|
logger.log('info', 'checking for env vars to be supplied to the docker build');
|
||||||
let buildArgsString: string = '';
|
let buildArgsString: string = '';
|
||||||
for (let key in NpmciConfig.configObject.dockerBuildargEnvMap) {
|
for (const key in NpmciConfig.configObject.dockerBuildargEnvMap) {
|
||||||
let targetValue = process.env[NpmciConfig.configObject.dockerBuildargEnvMap[key]];
|
const targetValue = process.env[NpmciConfig.configObject.dockerBuildargEnvMap[key]];
|
||||||
buildArgsString = `${buildArgsString} --build-arg ${key}=${targetValue}`;
|
buildArgsString = `${buildArgsString} --build-arg ${key}=${targetValue}`;
|
||||||
}
|
}
|
||||||
return buildArgsString;
|
return buildArgsString;
|
||||||
@ -172,12 +173,12 @@ export let getDockerBuildArgs = async (): Promise<string> => {
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export let cleanTagsArrayFunction = function(
|
export let cleanTagsArrayFunction = (
|
||||||
dockerfileArrayArg: Dockerfile[],
|
dockerfileArrayArg: Dockerfile[],
|
||||||
trackingArrayArg: Dockerfile[]
|
trackingArrayArg: Dockerfile[]
|
||||||
): string[] {
|
): string[] => {
|
||||||
let cleanTagsArray: string[] = [];
|
const cleanTagsArray: string[] = [];
|
||||||
dockerfileArrayArg.forEach(function(dockerfileArg) {
|
dockerfileArrayArg.forEach((dockerfileArg) => {
|
||||||
if (trackingArrayArg.indexOf(dockerfileArg) === -1) {
|
if (trackingArrayArg.indexOf(dockerfileArg) === -1) {
|
||||||
cleanTagsArray.push(dockerfileArg.cleanTag);
|
cleanTagsArray.push(dockerfileArg.cleanTag);
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { logger } from '../npmci.logging';
|
||||||
import * as plugins from './mod.plugins';
|
import * as plugins from './mod.plugins';
|
||||||
import { bash } from '../npmci.bash';
|
import { bash } from '../npmci.bash';
|
||||||
import { repo } from '../npmci.env';
|
import { repo } from '../npmci.env';
|
||||||
@ -8,38 +9,36 @@ import { repo } from '../npmci.env';
|
|||||||
*/
|
*/
|
||||||
export let handleCli = async argvArg => {
|
export let handleCli = async argvArg => {
|
||||||
if (argvArg._.length >= 2) {
|
if (argvArg._.length >= 2) {
|
||||||
let action: string = argvArg._[1];
|
const action: string = argvArg._[1];
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'mirror':
|
case 'mirror':
|
||||||
await mirror();
|
await mirror();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
plugins.beautylog.error(`>>npmci git ...<< action >>${action}<< not supported`);
|
logger.log('error', `>>npmci git ...<< action >>${action}<< not supported`);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.log(
|
logger.log('info', `>>npmci git ...<< cli arguments invalid... Please read the documentation.`);
|
||||||
`>>npmci git ...<< cli arguments invalid... Please read the documentation.`
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export let mirror = async () => {
|
export let mirror = async () => {
|
||||||
let githubToken = process.env.NPMCI_GIT_GITHUBTOKEN;
|
const githubToken = process.env.NPMCI_GIT_GITHUBTOKEN;
|
||||||
let githubUser = process.env.NPMCI_GIT_GITHUBGROUP || repo.user;
|
const githubUser = process.env.NPMCI_GIT_GITHUBGROUP || repo.user;
|
||||||
let githubRepo = process.env.NPMCI_GIT_GITHUB || repo.repo;
|
const githubRepo = process.env.NPMCI_GIT_GITHUB || repo.repo;
|
||||||
if (githubToken) {
|
if (githubToken) {
|
||||||
plugins.beautylog.info('found github token.');
|
logger.log('info', 'found github token.');
|
||||||
plugins.beautylog.log('attempting the mirror the repository to GitHub');
|
logger.log('info', 'attempting the mirror the repository to GitHub');
|
||||||
// add the mirror
|
// add the mirror
|
||||||
await bash(
|
await bash(
|
||||||
`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`
|
`git remote add mirror https://${githubToken}@github.com/${githubUser}/${githubRepo}.git`
|
||||||
);
|
);
|
||||||
await bash(`git push mirror --all`);
|
await bash(`git push mirror --all`);
|
||||||
plugins.beautylog.ok('pushed all branches to mirror!');
|
logger.log('ok', 'pushed all branches to mirror!');
|
||||||
await bash(`git push mirror --tags`);
|
await bash(`git push mirror --tags`);
|
||||||
plugins.beautylog.ok('pushed all tags to mirror!');
|
logger.log('ok', 'pushed all tags to mirror!');
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.error(`cannot find NPMCI_GIT_GITHUBTOKEN env var!`);
|
logger.log('error', `cannot find NPMCI_GIT_GITHUBTOKEN env var!`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { logger } from '../npmci.logging';
|
||||||
import * as plugins from '../npmci.plugins';
|
import * as plugins from '../npmci.plugins';
|
||||||
import * as paths from '../npmci.paths';
|
import * as paths from '../npmci.paths';
|
||||||
import * as npmciConfig from '../npmci.config';
|
import * as npmciConfig from '../npmci.config';
|
||||||
@ -9,17 +10,18 @@ import { bash, bashNoError, nvmAvailable } from '../npmci.bash';
|
|||||||
*/
|
*/
|
||||||
export let handleCli = async argvArg => {
|
export let handleCli = async argvArg => {
|
||||||
if (argvArg._.length >= 3) {
|
if (argvArg._.length >= 3) {
|
||||||
let action: string = argvArg._[1];
|
const action: string = argvArg._[1];
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'install':
|
case 'install':
|
||||||
await install(argvArg._[2]);
|
await install(argvArg._[2]);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
plugins.beautylog.error(`>>npmci node ...<< action >>${action}<< not supported`);
|
logger.log('error', `>>npmci node ...<< action >>${action}<< not supported`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.error(
|
logger.log(
|
||||||
|
'error',
|
||||||
`>>npmci node ...<< cli arguments invalid... Please read the documentation.`
|
`>>npmci node ...<< cli arguments invalid... Please read the documentation.`
|
||||||
);
|
);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
@ -31,7 +33,7 @@ export let handleCli = async argvArg => {
|
|||||||
* @param versionArg
|
* @param versionArg
|
||||||
*/
|
*/
|
||||||
export let install = async versionArg => {
|
export let install = async versionArg => {
|
||||||
plugins.beautylog.log(`now installing node version ${versionArg}`);
|
logger.log('info', `now installing node version ${versionArg}`);
|
||||||
let version: string;
|
let version: string;
|
||||||
if (versionArg === 'stable') {
|
if (versionArg === 'stable') {
|
||||||
version = '10';
|
version = '10';
|
||||||
@ -44,27 +46,27 @@ export let install = async versionArg => {
|
|||||||
}
|
}
|
||||||
if (await nvmAvailable.promise) {
|
if (await nvmAvailable.promise) {
|
||||||
await bash(`nvm install ${version} && nvm alias default ${version}`);
|
await bash(`nvm install ${version} && nvm alias default ${version}`);
|
||||||
plugins.beautylog.success(`Node version ${version} successfully installed!`);
|
logger.log('success', `Node version ${version} successfully installed!`);
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.warn('Nvm not in path so staying at installed node version!');
|
logger.log('warn', 'Nvm not in path so staying at installed node version!');
|
||||||
}
|
}
|
||||||
await bash('node -v');
|
await bash('node -v');
|
||||||
await bash('npm -v');
|
await bash('npm -v');
|
||||||
await bash(`npm config set cache ${paths.NpmciCacheDir} --global `);
|
await bash(`npm config set cache ${paths.NpmciCacheDir} --global `);
|
||||||
// lets look for further config
|
// lets look for further config
|
||||||
await npmciConfig.getConfig().then(async configArg => {
|
await npmciConfig.getConfig().then(async configArg => {
|
||||||
plugins.beautylog.log('Now checking for needed global npm tools...');
|
logger.log('info', 'Now checking for needed global npm tools...');
|
||||||
for (let npmTool of configArg.npmGlobalTools) {
|
for (const npmTool of configArg.npmGlobalTools) {
|
||||||
plugins.beautylog.info(`Checking for global "${npmTool}"`);
|
logger.log('info', `Checking for global "${npmTool}"`);
|
||||||
let whichOutput: string = await bashNoError(`which ${npmTool}`);
|
const whichOutput: string = await bashNoError(`which ${npmTool}`);
|
||||||
let toolAvailable: boolean = !(/not\sfound/.test(whichOutput) || whichOutput === '');
|
const toolAvailable: boolean = !(/not\sfound/.test(whichOutput) || whichOutput === '');
|
||||||
if (toolAvailable) {
|
if (toolAvailable) {
|
||||||
plugins.beautylog.log(`Tool ${npmTool} is available`);
|
logger.log('info', `Tool ${npmTool} is available`);
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.info(`globally installing ${npmTool} from npm`);
|
logger.log('info', `globally installing ${npmTool} from npm`);
|
||||||
await bash(`npm install ${npmTool} -q -g`);
|
await bash(`npm install ${npmTool} -q -g`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
plugins.beautylog.success('all global npm tools specified in npmextra.json are now available!');
|
logger.log('success', 'all global npm tools specified in npmextra.json are now available!');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { logger } from '../npmci.logging';
|
||||||
import * as plugins from './mod.plugins';
|
import * as plugins from './mod.plugins';
|
||||||
import * as configModule from '../npmci.config';
|
import * as configModule from '../npmci.config';
|
||||||
import { bash, bashNoError, nvmAvailable } from '../npmci.bash';
|
import { bash, bashNoError, nvmAvailable } from '../npmci.bash';
|
||||||
@ -8,7 +9,7 @@ import { bash, bashNoError, nvmAvailable } from '../npmci.bash';
|
|||||||
*/
|
*/
|
||||||
export let handleCli = async argvArg => {
|
export let handleCli = async argvArg => {
|
||||||
if (argvArg._.length >= 2) {
|
if (argvArg._.length >= 2) {
|
||||||
let action: string = argvArg._[1];
|
const action: string = argvArg._[1];
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'install':
|
case 'install':
|
||||||
await install();
|
await install();
|
||||||
@ -23,13 +24,11 @@ export let handleCli = async argvArg => {
|
|||||||
await publish();
|
await publish();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
plugins.beautylog.error(`>>npmci npm ...<< action >>${action}<< not supported`);
|
logger.log('error', `>>npmci npm ...<< action >>${action}<< not supported`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.log(
|
logger.log('info', `>>npmci npm ...<< cli arguments invalid... Please read the documentation.`);
|
||||||
`>>npmci npm ...<< cli arguments invalid... Please read the documentation.`
|
|
||||||
);
|
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -37,14 +36,14 @@ export let handleCli = async argvArg => {
|
|||||||
/**
|
/**
|
||||||
* authenticates npm with token from env var
|
* authenticates npm with token from env var
|
||||||
*/
|
*/
|
||||||
let prepare = async () => {
|
const prepare = async () => {
|
||||||
let npmrcPrefix: string = '//registry.npmjs.org/:_authToken=';
|
const npmrcPrefix: string = '//registry.npmjs.org/:_authToken=';
|
||||||
let npmToken: string = process.env.NPMCI_TOKEN_NPM;
|
const npmToken: string = process.env.NPMCI_TOKEN_NPM;
|
||||||
let npmrcFileString: string = npmrcPrefix + npmToken;
|
const npmrcFileString: string = npmrcPrefix + npmToken;
|
||||||
if (npmToken) {
|
if (npmToken) {
|
||||||
plugins.beautylog.info('found access token');
|
logger.log('info', 'found access token');
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.error('no access token found! Exiting!');
|
logger.log('error', 'no access token found! Exiting!');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
plugins.smartfile.memory.toFsSync(npmrcFileString, '/root/.npmrc');
|
plugins.smartfile.memory.toFsSync(npmrcFileString, '/root/.npmrc');
|
||||||
@ -54,7 +53,7 @@ let prepare = async () => {
|
|||||||
/**
|
/**
|
||||||
* publish a package to npm
|
* publish a package to npm
|
||||||
*/
|
*/
|
||||||
let publish = async () => {
|
const publish = async () => {
|
||||||
let npmAccessCliString = ``;
|
let npmAccessCliString = ``;
|
||||||
const config = await configModule.getConfig();
|
const config = await configModule.getConfig();
|
||||||
|
|
||||||
@ -67,7 +66,7 @@ let publish = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// -> preparing
|
// -> preparing
|
||||||
plugins.beautylog.log(`now preparing environment:`);
|
logger.log('info', `now preparing environment:`);
|
||||||
prepare();
|
prepare();
|
||||||
await bash(`npm -v`);
|
await bash(`npm -v`);
|
||||||
|
|
||||||
@ -75,26 +74,26 @@ let publish = async () => {
|
|||||||
await bash(`npm install`);
|
await bash(`npm install`);
|
||||||
await bash(`npm run build`);
|
await bash(`npm run build`);
|
||||||
|
|
||||||
plugins.beautylog.success(`Nice!!! The build for the publication was successfull!`);
|
logger.log('success', `Nice!!! The build for the publication was successfull!`);
|
||||||
plugins.beautylog.log(`Lets clean up so we don't publish any packages that don't belong to us:`);
|
logger.log('info', `Lets clean up so we don't publish any packages that don't belong to us:`);
|
||||||
// -> clean up before we publish stuff
|
// -> clean up before we publish stuff
|
||||||
await bashNoError(`rm -r ./.npmci_cache`);
|
await bashNoError(`rm -r ./.npmci_cache`);
|
||||||
await bash(`rm -r ./node_modules`);
|
await bash(`rm -r ./node_modules`);
|
||||||
|
|
||||||
plugins.beautylog.success(`Cleaned up!:`);
|
logger.log('success', `Cleaned up!:`);
|
||||||
|
|
||||||
// -> publish it
|
// -> publish it
|
||||||
plugins.beautylog.log(`now invoking npm to publish the package!`);
|
logger.log('info', `now invoking npm to publish the package!`);
|
||||||
await bash(`npm publish ${npmAccessCliString}`);
|
await bash(`npm publish ${npmAccessCliString}`);
|
||||||
plugins.beautylog.success(`Package was successfully published!`);
|
logger.log('success', `Package was successfully published!`);
|
||||||
};
|
};
|
||||||
|
|
||||||
let install = async (): Promise<void> => {
|
const install = async (): Promise<void> => {
|
||||||
plugins.beautylog.info('now installing dependencies:');
|
logger.log('info', 'now installing dependencies:');
|
||||||
await bash('npm install');
|
await bash('npm install');
|
||||||
};
|
};
|
||||||
|
|
||||||
export let test = async (): Promise<void> => {
|
export let test = async (): Promise<void> => {
|
||||||
plugins.beautylog.info('now starting tests:');
|
logger.log('info', 'now starting tests:');
|
||||||
await bash('npm test');
|
await bash('npm test');
|
||||||
};
|
};
|
||||||
|
@ -1,19 +1,20 @@
|
|||||||
|
import { logger } from '../npmci.logging';
|
||||||
import * as plugins from './mod.plugins';
|
import * as plugins from './mod.plugins';
|
||||||
let sshInstance: plugins.smartssh.SshInstance;
|
let sshInstance: plugins.smartssh.SshInstance;
|
||||||
|
|
||||||
export let handleCli = async argvArg => {
|
export let handleCli = async argvArg => {
|
||||||
if (argvArg._.length >= 2) {
|
if (argvArg._.length >= 2) {
|
||||||
let action: string = argvArg._[1];
|
const action: string = argvArg._[1];
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'prepare':
|
case 'prepare':
|
||||||
await prepare();
|
await prepare();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
plugins.beautylog.error(`action >>${action}<< not supported`);
|
logger.log('error', `action >>${action}<< not supported`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.error(`>>npmci ssh ...<< please specify an action!`);
|
logger.log('error', `>>npmci ssh ...<< please specify an action!`);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -21,7 +22,7 @@ export let handleCli = async argvArg => {
|
|||||||
/**
|
/**
|
||||||
* checks if not undefined
|
* checks if not undefined
|
||||||
*/
|
*/
|
||||||
let notUndefined = (stringArg: string) => {
|
const notUndefined = (stringArg: string) => {
|
||||||
return stringArg && stringArg !== 'undefined' && stringArg !== '##';
|
return stringArg && stringArg !== 'undefined' && stringArg !== '##';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -34,27 +35,27 @@ export let prepare = async () => {
|
|||||||
if (!process.env.NPMTS_TEST) {
|
if (!process.env.NPMTS_TEST) {
|
||||||
sshInstance.writeToDisk();
|
sshInstance.writeToDisk();
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.log('In test mode, so not storing SSH keys to disk!');
|
logger.log('info', 'In test mode, so not storing SSH keys to disk!');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gets called for each found SSH ENV Var and deploys it
|
* gets called for each found SSH ENV Var and deploys it
|
||||||
*/
|
*/
|
||||||
let evaluateSshEnv = async (sshkeyEnvVarArg: string) => {
|
const evaluateSshEnv = async (sshkeyEnvVarArg: string) => {
|
||||||
let sshEnvArray = sshkeyEnvVarArg.split('|');
|
const sshEnvArray = sshkeyEnvVarArg.split('|');
|
||||||
let sshKey = new plugins.smartssh.SshKey();
|
const sshKey = new plugins.smartssh.SshKey();
|
||||||
plugins.beautylog.info('Found SSH identity for ' + sshEnvArray[1]);
|
logger.log('info', 'Found SSH identity for ' + sshEnvArray[1]);
|
||||||
if (notUndefined(sshEnvArray[0])) {
|
if (notUndefined(sshEnvArray[0])) {
|
||||||
plugins.beautylog.log('---> host defined!');
|
logger.log('info', '---> host defined!');
|
||||||
sshKey.host = sshEnvArray[0];
|
sshKey.host = sshEnvArray[0];
|
||||||
}
|
}
|
||||||
if (notUndefined(sshEnvArray[1])) {
|
if (notUndefined(sshEnvArray[1])) {
|
||||||
plugins.beautylog.log('---> privKey defined!');
|
logger.log('info', '---> privKey defined!');
|
||||||
sshKey.privKeyBase64 = sshEnvArray[1];
|
sshKey.privKeyBase64 = sshEnvArray[1];
|
||||||
}
|
}
|
||||||
if (notUndefined(sshEnvArray[2])) {
|
if (notUndefined(sshEnvArray[2])) {
|
||||||
plugins.beautylog.log('---> pubKey defined!');
|
logger.log('info', '---> pubKey defined!');
|
||||||
sshKey.pubKeyBase64 = sshEnvArray[2];
|
sshKey.pubKeyBase64 = sshEnvArray[2];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,28 +1,29 @@
|
|||||||
import * as plugins from './mod.plugins';
|
import * as plugins from './mod.plugins';
|
||||||
import { bash } from '../npmci.bash';
|
import { bash } from '../npmci.bash';
|
||||||
|
import { logger } from '../npmci.logging';
|
||||||
|
|
||||||
let triggerValueRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|?([a-zA-Z0-9\.\-\/]*)/;
|
const triggerValueRegex = /^([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|([a-zA-Z0-9\.]*)\|?([a-zA-Z0-9\.\-\/]*)/;
|
||||||
|
|
||||||
export let trigger = async () => {
|
export let trigger = async () => {
|
||||||
plugins.beautylog.info('now running triggers');
|
logger.log('info', 'now running triggers');
|
||||||
plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TRIGGER_*', evaluateTrigger);
|
plugins.smartparam.forEachMinimatch(process.env, 'NPMCI_TRIGGER_*', evaluateTrigger);
|
||||||
};
|
};
|
||||||
|
|
||||||
let evaluateTrigger = async triggerEnvVarArg => {
|
const evaluateTrigger = async triggerEnvVarArg => {
|
||||||
let triggerRegexResultArray = triggerValueRegex.exec(triggerEnvVarArg);
|
const triggerRegexResultArray = triggerValueRegex.exec(triggerEnvVarArg);
|
||||||
let regexDomain = triggerRegexResultArray[1];
|
const regexDomain = triggerRegexResultArray[1];
|
||||||
let regexProjectId = triggerRegexResultArray[2];
|
const regexProjectId = triggerRegexResultArray[2];
|
||||||
let regexProjectTriggerToken = triggerRegexResultArray[3];
|
const regexProjectTriggerToken = triggerRegexResultArray[3];
|
||||||
let regexRefName = triggerRegexResultArray[4];
|
const regexRefName = triggerRegexResultArray[4];
|
||||||
let regexTriggerName;
|
let regexTriggerName;
|
||||||
if (triggerRegexResultArray.length === 6) {
|
if (triggerRegexResultArray.length === 6) {
|
||||||
regexTriggerName = triggerRegexResultArray[5];
|
regexTriggerName = triggerRegexResultArray[5];
|
||||||
} else {
|
} else {
|
||||||
regexTriggerName = 'Unnamed Trigger';
|
regexTriggerName = 'Unnamed Trigger';
|
||||||
}
|
}
|
||||||
plugins.beautylog.info('Found Trigger!');
|
logger.log('info', 'Found Trigger!');
|
||||||
plugins.beautylog.log('triggering build for ref ' + regexRefName + ' of ' + regexTriggerName);
|
logger.log('info', 'triggering build for ref ' + regexRefName + ' of ' + regexTriggerName);
|
||||||
plugins.request.postFormData(
|
plugins.smartrequest.postFormData(
|
||||||
'https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds',
|
'https://gitlab.com/api/v3/projects/' + regexProjectId + '/trigger/builds',
|
||||||
{},
|
{},
|
||||||
[
|
[
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { logger } from './npmci.logging';
|
||||||
import * as plugins from './npmci.plugins';
|
import * as plugins from './npmci.plugins';
|
||||||
import * as paths from './npmci.paths';
|
import * as paths from './npmci.paths';
|
||||||
|
|
||||||
@ -10,7 +11,7 @@ export let nvmAvailable = smartpromise.defer<boolean>();
|
|||||||
/**
|
/**
|
||||||
* the smartshell instance for npmci
|
* the smartshell instance for npmci
|
||||||
*/
|
*/
|
||||||
let npmciSmartshell = new plugins.smartshell.Smartshell({
|
const npmciSmartshell = new plugins.smartshell.Smartshell({
|
||||||
executor: 'bash',
|
executor: 'bash',
|
||||||
sourceFilePaths: []
|
sourceFilePaths: []
|
||||||
});
|
});
|
||||||
@ -18,7 +19,7 @@ let npmciSmartshell = new plugins.smartshell.Smartshell({
|
|||||||
/**
|
/**
|
||||||
* check for tools.
|
* check for tools.
|
||||||
*/
|
*/
|
||||||
let checkToolsAvailable = async () => {
|
const checkToolsAvailable = async () => {
|
||||||
// check for nvm
|
// check for nvm
|
||||||
if (!process.env.NPMTS_TEST) {
|
if (!process.env.NPMTS_TEST) {
|
||||||
if (
|
if (
|
||||||
@ -68,21 +69,19 @@ export let bash = async (commandArg: string, retryArg: number = 2): Promise<stri
|
|||||||
if (execResult.exitCode !== 0 && i === retryArg) {
|
if (execResult.exitCode !== 0 && i === retryArg) {
|
||||||
// something went wrong and retries are exhausted
|
// something went wrong and retries are exhausted
|
||||||
if (failOnError) {
|
if (failOnError) {
|
||||||
plugins.beautylog.error('something went wrong and retries are exhausted');
|
logger.log('error', 'something went wrong and retries are exhausted');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
} else if (execResult.exitCode === 0) {
|
} else if (execResult.exitCode === 0) {
|
||||||
// everything went fine, or no error wanted
|
// everything went fine, or no error wanted
|
||||||
i = retryArg + 1; // retry +1 breaks for loop, if everything works out ok retrials are not wanted
|
i = retryArg + 1; // retry +1 breaks for loop, if everything works out ok retrials are not wanted
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.warn(
|
logger.log('warn', 'Something went wrong! Exit Code: ' + execResult.exitCode.toString());
|
||||||
'Something went wrong! Exit Code: ' + execResult.exitCode.toString()
|
logger.log('info', 'Retry ' + (i + 1).toString() + ' of ' + retryArg.toString());
|
||||||
);
|
|
||||||
plugins.beautylog.info('Retry ' + (i + 1).toString() + ' of ' + retryArg.toString());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.log('ShellExec would be: ' + commandArg);
|
logger.log('info', 'ShellExec would be: ' + commandArg);
|
||||||
execResult = {
|
execResult = {
|
||||||
exitCode: 0,
|
exitCode: 0,
|
||||||
stdout: 'testOutput'
|
stdout: 'testOutput'
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
|
import { logger } from './npmci.logging';
|
||||||
import * as plugins from './npmci.plugins';
|
import * as plugins from './npmci.plugins';
|
||||||
import * as paths from './npmci.paths';
|
import * as paths from './npmci.paths';
|
||||||
import * as npmciMonitor from './npmci.monitor';
|
import * as npmciMonitor from './npmci.monitor';
|
||||||
npmciMonitor.run();
|
npmciMonitor.run();
|
||||||
|
|
||||||
// Get Info about npmci itself
|
// Get Info about npmci itself
|
||||||
let npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
|
const npmciInfo = new plugins.projectinfo.ProjectinfoNpm(paths.NpmciPackageRoot);
|
||||||
plugins.beautylog.log('npmci version: ' + npmciInfo.version);
|
logger.log('info', 'npmci version: ' + npmciInfo.version);
|
||||||
|
|
||||||
import * as NpmciEnv from './npmci.env';
|
import * as NpmciEnv from './npmci.env';
|
||||||
|
|
||||||
@ -15,7 +16,7 @@ npmciSmartcli.addVersion(npmciInfo.version);
|
|||||||
// clean
|
// clean
|
||||||
npmciSmartcli.addCommand('clean').subscribe(
|
npmciSmartcli.addCommand('clean').subscribe(
|
||||||
async argv => {
|
async argv => {
|
||||||
let modClean = await import('./mod_clean/index');
|
const modClean = await import('./mod_clean/index');
|
||||||
await modClean.clean();
|
await modClean.clean();
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
@ -27,7 +28,7 @@ npmciSmartcli.addCommand('clean').subscribe(
|
|||||||
// command
|
// command
|
||||||
npmciSmartcli.addCommand('command').subscribe(
|
npmciSmartcli.addCommand('command').subscribe(
|
||||||
async argv => {
|
async argv => {
|
||||||
let modCommand = await import('./mod_command/index');
|
const modCommand = await import('./mod_command/index');
|
||||||
await modCommand.command();
|
await modCommand.command();
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
@ -39,7 +40,7 @@ npmciSmartcli.addCommand('command').subscribe(
|
|||||||
// command
|
// command
|
||||||
npmciSmartcli.addCommand('git').subscribe(
|
npmciSmartcli.addCommand('git').subscribe(
|
||||||
async argvArg => {
|
async argvArg => {
|
||||||
let modGit = await import('./mod_git/index');
|
const modGit = await import('./mod_git/index');
|
||||||
await modGit.handleCli(argvArg);
|
await modGit.handleCli(argvArg);
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
@ -51,7 +52,7 @@ npmciSmartcli.addCommand('git').subscribe(
|
|||||||
// build
|
// build
|
||||||
npmciSmartcli.addCommand('docker').subscribe(
|
npmciSmartcli.addCommand('docker').subscribe(
|
||||||
async argvArg => {
|
async argvArg => {
|
||||||
let modDocker = await import('./mod_docker/index');
|
const modDocker = await import('./mod_docker/index');
|
||||||
await modDocker.handleCli(argvArg);
|
await modDocker.handleCli(argvArg);
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
@ -63,7 +64,7 @@ npmciSmartcli.addCommand('docker').subscribe(
|
|||||||
// node
|
// node
|
||||||
npmciSmartcli.addCommand('node').subscribe(
|
npmciSmartcli.addCommand('node').subscribe(
|
||||||
async argvArg => {
|
async argvArg => {
|
||||||
let modNode = await import('./mod_node/index');
|
const modNode = await import('./mod_node/index');
|
||||||
await modNode.handleCli(argvArg);
|
await modNode.handleCli(argvArg);
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
@ -75,7 +76,7 @@ npmciSmartcli.addCommand('node').subscribe(
|
|||||||
// npm
|
// npm
|
||||||
npmciSmartcli.addCommand('npm').subscribe(
|
npmciSmartcli.addCommand('npm').subscribe(
|
||||||
async argvArg => {
|
async argvArg => {
|
||||||
let modNpm = await import('./mod_npm/index');
|
const modNpm = await import('./mod_npm/index');
|
||||||
await modNpm.handleCli(argvArg);
|
await modNpm.handleCli(argvArg);
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
@ -86,7 +87,7 @@ npmciSmartcli.addCommand('npm').subscribe(
|
|||||||
// trigger
|
// trigger
|
||||||
npmciSmartcli.addCommand('ssh').subscribe(
|
npmciSmartcli.addCommand('ssh').subscribe(
|
||||||
async argvArg => {
|
async argvArg => {
|
||||||
let modSsh = await import('./mod_ssh/index');
|
const modSsh = await import('./mod_ssh/index');
|
||||||
await modSsh.handleCli(argvArg);
|
await modSsh.handleCli(argvArg);
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
@ -98,7 +99,7 @@ npmciSmartcli.addCommand('ssh').subscribe(
|
|||||||
// trigger
|
// trigger
|
||||||
npmciSmartcli.addCommand('trigger').subscribe(
|
npmciSmartcli.addCommand('trigger').subscribe(
|
||||||
async argv => {
|
async argv => {
|
||||||
let modTrigger = await import('./mod_trigger/index');
|
const modTrigger = await import('./mod_trigger/index');
|
||||||
await modTrigger.trigger();
|
await modTrigger.trigger();
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
import * as q from 'q';
|
|
||||||
|
|
||||||
import * as plugins from './npmci.plugins';
|
import * as plugins from './npmci.plugins';
|
||||||
import * as paths from './npmci.paths';
|
import * as paths from './npmci.paths';
|
||||||
|
|
||||||
@ -18,8 +16,8 @@ export interface INpmciOptions {
|
|||||||
export let kvStorage = new KeyValueStore('custom', `${repo.user}_${repo.repo}`);
|
export let kvStorage = new KeyValueStore('custom', `${repo.user}_${repo.repo}`);
|
||||||
|
|
||||||
// handle config retrival
|
// handle config retrival
|
||||||
let npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
const npmciNpmextra = new plugins.npmextra.Npmextra(paths.cwd);
|
||||||
let defaultConfig: INpmciOptions = {
|
const defaultConfig: INpmciOptions = {
|
||||||
npmGlobalTools: [],
|
npmGlobalTools: [],
|
||||||
dockerRegistryRepoMap: {},
|
dockerRegistryRepoMap: {},
|
||||||
dockerBuildargEnvMap: {}
|
dockerBuildargEnvMap: {}
|
||||||
|
14
ts/npmci.logging.ts
Normal file
14
ts/npmci.logging.ts
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import * as plugins from './npmci.plugins';
|
||||||
|
|
||||||
|
export const logger = new plugins.smartlog.Smartlog({
|
||||||
|
logContext: {
|
||||||
|
company: 'Some Company',
|
||||||
|
companyunit: 'Some Unit',
|
||||||
|
containerName: 'Some ContainerName',
|
||||||
|
environment: 'test',
|
||||||
|
runtime: 'node',
|
||||||
|
zone: 'Some Zone'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());
|
@ -1,3 +1,4 @@
|
|||||||
|
import { logger } from './npmci.logging';
|
||||||
import * as plugins from './npmci.plugins';
|
import * as plugins from './npmci.plugins';
|
||||||
import * as env from './npmci.env';
|
import * as env from './npmci.env';
|
||||||
|
|
||||||
@ -17,6 +18,6 @@ export let run = async () => {
|
|||||||
repo: env.repo.repo
|
repo: env.repo.repo
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
plugins.beautylog.warn('Lossless Analytics API not available...');
|
logger.log('warn', 'Lossless Analytics API not available...');
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -1,21 +1,43 @@
|
|||||||
// node native
|
// node native
|
||||||
export import path = require('path');
|
import * as path from 'path';
|
||||||
|
|
||||||
|
export { path };
|
||||||
|
|
||||||
// @pushrocks
|
// @pushrocks
|
||||||
export import beautylog = require('beautylog');
|
import * as projectinfo from '@pushrocks/projectinfo';
|
||||||
export import projectinfo = require('@pushrocks/projectinfo');
|
import * as npmextra from '@pushrocks/npmextra';
|
||||||
export import npmextra = require('@pushrocks/npmextra');
|
import * as smartdelay from '@pushrocks/smartdelay';
|
||||||
export import smartdelay = require('@pushrocks/smartdelay');
|
import * as smartfile from '@pushrocks/smartfile';
|
||||||
export import smartfile = require('@pushrocks/smartfile');
|
import * as smartcli from '@pushrocks/smartcli';
|
||||||
export import smartcli = require('@pushrocks/smartcli');
|
import * as smartlog from '@pushrocks/smartlog';
|
||||||
export import smartparam = require('smartparam');
|
import * as smartlogDestinationLocal from '@pushrocks/smartlog-destination-local';
|
||||||
export import smartpromise = require('@pushrocks/smartpromise');
|
import * as smartparam from '@pushrocks/smartparam';
|
||||||
export import smartshell = require('@pushrocks/smartshell');
|
import * as smartpromise from '@pushrocks/smartpromise';
|
||||||
export import smartsocket = require('smartsocket');
|
import * as smartrequest from '@pushrocks/smartrequest';
|
||||||
export import smartssh = require('@pushrocks/smartssh');
|
import * as smartshell from '@pushrocks/smartshell';
|
||||||
export import smartstring = require('@pushrocks/smartstring');
|
import * as smartsocket from 'smartsocket';
|
||||||
|
import * as smartssh from '@pushrocks/smartssh';
|
||||||
|
import * as smartstring from '@pushrocks/smartstring';
|
||||||
|
|
||||||
|
export {
|
||||||
|
projectinfo,
|
||||||
|
npmextra,
|
||||||
|
smartdelay,
|
||||||
|
smartfile,
|
||||||
|
smartcli,
|
||||||
|
smartlog,
|
||||||
|
smartlogDestinationLocal,
|
||||||
|
smartparam,
|
||||||
|
smartpromise,
|
||||||
|
smartrequest,
|
||||||
|
smartshell,
|
||||||
|
smartsocket,
|
||||||
|
smartssh,
|
||||||
|
smartstring
|
||||||
|
};
|
||||||
|
|
||||||
// third party
|
// third party
|
||||||
export import lodash = require('lodash');
|
import * as lodash from 'lodash';
|
||||||
export import through2 = require('through2');
|
import * as through2 from 'through2';
|
||||||
export import request = require('@pushrocks/smartrequest');
|
|
||||||
|
export { lodash, through2 };
|
||||||
|
16
tslint.json
16
tslint.json
@ -1,3 +1,17 @@
|
|||||||
{
|
{
|
||||||
"extends": "tslint-config-standard"
|
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||||
|
"rules": {
|
||||||
|
"semicolon": [true, "always"],
|
||||||
|
"no-console": false,
|
||||||
|
"ordered-imports": false,
|
||||||
|
"object-literal-sort-keys": false,
|
||||||
|
"member-ordering": {
|
||||||
|
"options":{
|
||||||
|
"order": [
|
||||||
|
"static-method"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultSeverity": "warning"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user