mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-18 21:27:54 +00:00
Move to resin-lint 3 and fix lint errors
This is a massive commit, but nothing related to runtime has actually changed, only the lint errors have changed. Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
465bf465d5
commit
2a27b1d51f
245
package-lock.json
generated
245
package-lock.json
generated
@ -4,6 +4,63 @@
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz",
|
||||
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/highlight": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"@babel/highlight": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz",
|
||||
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^2.0.0",
|
||||
"esutils": "^2.0.2",
|
||||
"js-tokens": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
}
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"@iamstarkov/listr-update-renderer": {
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/@iamstarkov/listr-update-renderer/-/listr-update-renderer-0.4.1.tgz",
|
||||
@ -269,14 +326,14 @@
|
||||
},
|
||||
"@types/optimist": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "http://registry.npmjs.org/@types/optimist/-/optimist-0.0.29.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@types/optimist/-/optimist-0.0.29.tgz",
|
||||
"integrity": "sha1-qIc1gLOoS2msHmhzI7Ffu+uQR5o=",
|
||||
"dev": true
|
||||
},
|
||||
"@types/prettier": {
|
||||
"version": "1.15.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-1.15.2.tgz",
|
||||
"integrity": "sha512-XIB0ZCaFZmWUHAa9dBqP5UKXXHwuukmVlP+XcyU94dui2k+l2lG+CHAbt2ffenHPUqoIs5Beh8Pdf2YEq/CZ7A==",
|
||||
"version": "1.16.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-1.16.4.tgz",
|
||||
"integrity": "sha512-MG7ExKBo7AQ5UrL1awyYLNinNM/kyXgE4iP4Ul9fB+T7n768Z5Xem8IZeP6Bna0xze8gkDly49Rgge2HOEw4xA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/range-parser": {
|
||||
@ -1881,18 +1938,6 @@
|
||||
"string-width": "^1.0.1",
|
||||
"strip-ansi": "^3.0.1",
|
||||
"wrap-ansi": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"wrap-ansi": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
||||
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"string-width": "^1.0.1",
|
||||
"strip-ansi": "^3.0.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"clone": {
|
||||
@ -1931,7 +1976,7 @@
|
||||
"dependencies": {
|
||||
"coffee-script": {
|
||||
"version": "1.11.1",
|
||||
"resolved": "http://registry.npmjs.org/coffee-script/-/coffee-script-1.11.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.11.1.tgz",
|
||||
"integrity": "sha1-vxxHrWREOg2V0S3ysUfMCk2q1uk=",
|
||||
"dev": true
|
||||
},
|
||||
@ -3731,14 +3776,12 @@
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@ -3753,20 +3796,17 @@
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
@ -3883,8 +3923,7 @@
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
@ -3896,7 +3935,6 @@
|
||||
"version": "1.0.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
@ -3911,7 +3949,6 @@
|
||||
"version": "3.0.4",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@ -3919,14 +3956,12 @@
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.3.5",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.0"
|
||||
@ -3945,7 +3980,6 @@
|
||||
"version": "0.5.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
}
|
||||
@ -4026,8 +4060,7 @@
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true
|
||||
"dev": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
@ -4039,7 +4072,6 @@
|
||||
"version": "1.4.0",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
@ -4161,7 +4193,6 @@
|
||||
"version": "1.0.2",
|
||||
"bundled": true,
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
@ -6302,7 +6333,7 @@
|
||||
},
|
||||
"load-json-file": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
|
||||
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -6323,7 +6354,7 @@
|
||||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
}
|
||||
@ -7524,7 +7555,7 @@
|
||||
},
|
||||
"get-stream": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "http://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz",
|
||||
"integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=",
|
||||
"dev": true
|
||||
}
|
||||
@ -8189,7 +8220,7 @@
|
||||
},
|
||||
"pify": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "http://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
|
||||
"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
|
||||
"dev": true
|
||||
},
|
||||
@ -8323,7 +8354,7 @@
|
||||
},
|
||||
"require-npm4-to-publish": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "http://registry.npmjs.org/require-npm4-to-publish/-/require-npm4-to-publish-1.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/require-npm4-to-publish/-/require-npm4-to-publish-1.0.0.tgz",
|
||||
"integrity": "sha1-5Z7D5ikQFT3Fu90MpA20IrLE2ec=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -8436,18 +8467,18 @@
|
||||
}
|
||||
},
|
||||
"resin-lint": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/resin-lint/-/resin-lint-2.0.1.tgz",
|
||||
"integrity": "sha512-gH+HZyK9ctksCX7xt4g86+sl2ae/5SPS0H81ukbYAy8eNuDuOeCHuspF66CDtxi607xE13d/ei7opcBkIK8/LA==",
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/resin-lint/-/resin-lint-3.0.4.tgz",
|
||||
"integrity": "sha512-TVxY7SaJqQRZcLubJn5yO49db/M4eRXRr7FbA4xwqSYxQSqujNql8ThMoNMoRrx+1F7NrfSdhIsLEaMqCea4VA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/bluebird": "^3.5.20",
|
||||
"@types/bluebird": "^3.5.26",
|
||||
"@types/depcheck": "^0.6.0",
|
||||
"@types/glob": "^5.0.35",
|
||||
"@types/node": "^8.5.2",
|
||||
"@types/node": "^8.10.45",
|
||||
"@types/optimist": "0.0.29",
|
||||
"@types/prettier": "^1.13.2",
|
||||
"bluebird": "^3.5.0",
|
||||
"@types/prettier": "^1.16.1",
|
||||
"bluebird": "^3.5.4",
|
||||
"coffee-script": "^1.10.0",
|
||||
"coffeelint": "^1.15.0",
|
||||
"coffeescope2": "^0.4.5",
|
||||
@ -8455,16 +8486,29 @@
|
||||
"glob": "^7.0.3",
|
||||
"merge": "^1.2.0",
|
||||
"optimist": "^0.6.1",
|
||||
"prettier": "^1.14.2",
|
||||
"tslint": "^5.8.0",
|
||||
"tslint-config-prettier": "^1.15.0",
|
||||
"typescript": "^2.6.2"
|
||||
"prettier": "^1.16.4",
|
||||
"tslint": "^5.15.0",
|
||||
"tslint-config-prettier": "^1.18.0",
|
||||
"tslint-no-unused-expression-chai": "^0.1.4",
|
||||
"typescript": "^3.4.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/bluebird": {
|
||||
"version": "3.5.27",
|
||||
"resolved": "https://registry.npmjs.org/@types/bluebird/-/bluebird-3.5.27.tgz",
|
||||
"integrity": "sha512-6BmYWSBea18+tSjjSC3QIyV93ZKAeNWGM7R6aYt1ryTZXrlHF+QLV0G2yV0viEGVyRkyQsWfMoJ0k/YghBX5sQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "8.10.38",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.38.tgz",
|
||||
"integrity": "sha512-EibsnbJerd0hBFaDjJStFrVbVBAtOy4dgL8zZFw0uOvPqzBAX59Ci8cgjg3+RgJIWhsB5A4c+pi+D4P9tQQh/A==",
|
||||
"version": "8.10.48",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.48.tgz",
|
||||
"integrity": "sha512-c35YEBTkL4rzXY2ucpSKy+UYHjUBIIkuJbWYbsGIrKLEWU5dgJMmLkkIb3qeC3O3Tpb1ZQCwecscvJTDjDjkRw==",
|
||||
"dev": true
|
||||
},
|
||||
"bluebird": {
|
||||
"version": "3.5.5",
|
||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz",
|
||||
"integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==",
|
||||
"dev": true
|
||||
},
|
||||
"coffee-script": {
|
||||
@ -8473,10 +8517,16 @@
|
||||
"integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw==",
|
||||
"dev": true
|
||||
},
|
||||
"prettier": {
|
||||
"version": "1.17.1",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-1.17.1.tgz",
|
||||
"integrity": "sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "2.9.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
|
||||
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
|
||||
"version": "3.4.5",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.4.5.tgz",
|
||||
"integrity": "sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
@ -9897,23 +9947,24 @@
|
||||
"dev": true
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.11.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.11.0.tgz",
|
||||
"integrity": "sha1-mPMMAurjzecAYgHkwzywi0hYHu0=",
|
||||
"version": "5.16.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint/-/tslint-5.16.0.tgz",
|
||||
"integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"babel-code-frame": "^6.22.0",
|
||||
"@babel/code-frame": "^7.0.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",
|
||||
"js-yaml": "^3.13.0",
|
||||
"minimatch": "^3.0.4",
|
||||
"mkdirp": "^0.5.1",
|
||||
"resolve": "^1.3.2",
|
||||
"semver": "^5.3.0",
|
||||
"tslib": "^1.8.0",
|
||||
"tsutils": "^2.27.2"
|
||||
"tsutils": "^2.29.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-styles": {
|
||||
@ -9926,9 +9977,9 @@
|
||||
}
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.1",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
|
||||
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
|
||||
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
@ -9936,13 +9987,23 @@
|
||||
"supports-color": "^5.3.0"
|
||||
}
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz",
|
||||
"integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==",
|
||||
"js-yaml": {
|
||||
"version": "3.13.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
|
||||
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.5"
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.11.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz",
|
||||
"integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
@ -9957,11 +10018,31 @@
|
||||
}
|
||||
},
|
||||
"tslint-config-prettier": {
|
||||
"version": "1.17.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.17.0.tgz",
|
||||
"integrity": "sha512-NKWNkThwqE4Snn4Cm6SZB7lV5RMDDFsBwz6fWUkTxOKGjMx8ycOHnjIbhn7dZd5XmssW3CwqUjlANR6EhP9YQw==",
|
||||
"version": "1.18.0",
|
||||
"resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz",
|
||||
"integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
|
||||
"dev": true
|
||||
},
|
||||
"tslint-no-unused-expression-chai": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/tslint-no-unused-expression-chai/-/tslint-no-unused-expression-chai-0.1.4.tgz",
|
||||
"integrity": "sha512-frEWKNTcq7VsaWKgUxMDOB2N/cmQadVkUtUGIut+2K4nv/uFXPfgJyPjuNC/cHyfUVqIkHMAvHOCL+d/McU3nQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tsutils": "^3.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tsutils": {
|
||||
"version": "3.10.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.10.0.tgz",
|
||||
"integrity": "sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "2.29.0",
|
||||
"resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz",
|
||||
@ -11316,6 +11397,16 @@
|
||||
"errno": "~0.1.7"
|
||||
}
|
||||
},
|
||||
"wrap-ansi": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
|
||||
"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"string-width": "^1.0.1",
|
||||
"strip-ansi": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
|
@ -22,7 +22,7 @@
|
||||
"test:debug": "npm run test:build && mocha --inspect-brk",
|
||||
"coverage": "istanbul report text && istanbul report html"
|
||||
},
|
||||
"private": "true",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"sqlite3": "^4.0.8"
|
||||
},
|
||||
@ -89,7 +89,7 @@
|
||||
"prettier": "^1.15.3",
|
||||
"pretty-ms": "^4.0.0",
|
||||
"request": "^2.51.0",
|
||||
"resin-lint": "^2.0.1",
|
||||
"resin-lint": "^3.0.0",
|
||||
"resin-register-device": "^3.0.0",
|
||||
"resumable-request": "^2.0.0",
|
||||
"rimraf": "^2.6.2",
|
||||
|
@ -737,13 +737,13 @@ export class APIBinder {
|
||||
// If we have an existing device key we first check if it's
|
||||
// valid, becaise of it is we can just use that
|
||||
if (opts.deviceApiKey != null) {
|
||||
const device = await this.fetchDevice(
|
||||
const deviceFromApi = await this.fetchDevice(
|
||||
uuid,
|
||||
opts.deviceApiKey,
|
||||
apiTimeout,
|
||||
);
|
||||
if (device != null) {
|
||||
return device;
|
||||
if (deviceFromApi != null) {
|
||||
return deviceFromApi;
|
||||
}
|
||||
}
|
||||
|
||||
|
6
src/application-manager.d.ts
vendored
6
src/application-manager.d.ts
vendored
@ -2,17 +2,17 @@ import * as Bluebird from 'bluebird';
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
import { ServiceAction } from './device-api/common';
|
||||
import { DeviceApplicationState } from './types/state';
|
||||
import { Logger } from './logger';
|
||||
import { EventTracker } from './event-tracker';
|
||||
import { Logger } from './logger';
|
||||
import { DeviceApplicationState } from './types/state';
|
||||
|
||||
import Images from './compose/images';
|
||||
import ServiceManager from './compose/service-manager';
|
||||
import DB from './db';
|
||||
|
||||
import { APIBinder } from './api-binder';
|
||||
import { Service } from './compose/service';
|
||||
import Config from './config';
|
||||
import { APIBinder } from './api-binder';
|
||||
|
||||
declare interface Options {
|
||||
force?: boolean;
|
||||
|
@ -60,9 +60,7 @@ type NormalisedDockerImage = Docker.ImageInfo & {
|
||||
NormalisedRepoTags: string[];
|
||||
};
|
||||
|
||||
export class Images extends (EventEmitter as {
|
||||
new (): ImageEventEmitter;
|
||||
}) {
|
||||
export class Images extends (EventEmitter as new () => ImageEventEmitter) {
|
||||
private docker: DockerUtils;
|
||||
private logger: Logger;
|
||||
private db: Database;
|
||||
|
@ -41,9 +41,7 @@ interface KillOpts {
|
||||
wait?: boolean;
|
||||
}
|
||||
|
||||
export class ServiceManager extends (EventEmitter as {
|
||||
new (): ServiceManagerEventEmitter;
|
||||
}) {
|
||||
export class ServiceManager extends (EventEmitter as new () => ServiceManagerEventEmitter) {
|
||||
private docker: Docker;
|
||||
private logger: Logger;
|
||||
private config: Config;
|
||||
|
@ -654,8 +654,8 @@ export class Service {
|
||||
sameConfig &&
|
||||
_.every(Service.configArrayFields, (field: keyof ServiceConfig) => {
|
||||
const eq = _.isEqual(
|
||||
_.sortBy(this.config[field] as Array<unknown>),
|
||||
_.sortBy(service.config[field] as Array<unknown>),
|
||||
_.sortBy(this.config[field] as unknown[]),
|
||||
_.sortBy(service.config[field] as unknown[]),
|
||||
);
|
||||
if (!eq) {
|
||||
differentArrayFields.push(field);
|
||||
|
@ -26,7 +26,7 @@ export function camelCaseConfig(
|
||||
if (!_.isArray(config.networks)) {
|
||||
const networksTmp = _.cloneDeep(config.networks);
|
||||
_.each(networksTmp, (v, k) => {
|
||||
config.networks[k] = _.mapKeys(v, (_v, k) => _.camelCase(k));
|
||||
config.networks[k] = _.mapKeys(v, (_v, key) => _.camelCase(key));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -37,9 +37,7 @@ interface ConfigEvents {
|
||||
|
||||
type ConfigEventEmitter = StrictEventEmitter<EventEmitter, ConfigEvents>;
|
||||
|
||||
export class Config extends (EventEmitter as {
|
||||
new (): ConfigEventEmitter;
|
||||
}) {
|
||||
export class Config extends (EventEmitter as new () => ConfigEventEmitter) {
|
||||
private db: DB;
|
||||
private configJsonBackend: ConfigJsonConfigBackend;
|
||||
|
||||
@ -76,10 +74,12 @@ export class Config extends (EventEmitter as {
|
||||
// schema key is for the meta nullOrUndefined value. We check this
|
||||
// by first decoding the value undefined with the default type, and
|
||||
// then return undefined
|
||||
const decoded = (defaultValue as t.Type<any>).decode(undefined);
|
||||
const maybeDecoded = (defaultValue as t.Type<any>).decode(
|
||||
undefined,
|
||||
);
|
||||
|
||||
this.checkValueDecode(decoded, key, undefined);
|
||||
return decoded.value;
|
||||
this.checkValueDecode(maybeDecoded, key, undefined);
|
||||
return maybeDecoded.value;
|
||||
}
|
||||
return defaultValue as SchemaReturn<T>;
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ export const PermissiveNumber = new t.Type<number, string | number>(
|
||||
|
||||
// Define this differently, so that we can add a generic to it
|
||||
export class StringJSON<T> extends t.Type<T, string> {
|
||||
readonly _tag: 'StringJSON' = 'StringJSON';
|
||||
public readonly _tag: 'StringJSON' = 'StringJSON';
|
||||
constructor(type: t.InterfaceType<any>) {
|
||||
super(
|
||||
'StringJSON',
|
||||
@ -102,12 +102,6 @@ export class StringJSON<T> extends t.Type<T, string> {
|
||||
);
|
||||
},
|
||||
);
|
||||
// super(
|
||||
// 'string',
|
||||
// (m): m is string => typeof m === 'string',
|
||||
// (m, c) => (this.is(m) ? t.success(m) : t.failure(m, c)),
|
||||
// t.identity,
|
||||
// );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,8 +198,8 @@ export function createV2Api(router: Router, applications: ApplicationManager) {
|
||||
return;
|
||||
}
|
||||
|
||||
const svc = _.find(services, (svc: Service) => {
|
||||
return svc.imageId === img.imageId;
|
||||
const svc = _.find(services, (service: Service) => {
|
||||
return service.imageId === img.imageId;
|
||||
});
|
||||
|
||||
let status: string;
|
||||
|
@ -131,7 +131,7 @@ export class DeviceConfig {
|
||||
},
|
||||
};
|
||||
|
||||
static validKeys = [
|
||||
public static validKeys = [
|
||||
'SUPERVISOR_VPN_CONTROL',
|
||||
'OVERRIDE_LOCK',
|
||||
..._.map(DeviceConfig.configKeys, 'envVarName'),
|
||||
@ -292,7 +292,7 @@ export class DeviceConfig {
|
||||
SUPERVISOR_VPN_CONTROL: vpnStatus != null ? vpnStatus.toString() : 'true',
|
||||
};
|
||||
|
||||
for (const key in DeviceConfig.configKeys) {
|
||||
for (const key of _.keys(DeviceConfig.configKeys)) {
|
||||
const { envVarName } = DeviceConfig.configKeys[key];
|
||||
const confValue = conf[key as SchemaTypeKey];
|
||||
currentConf[envVarName] = confValue != null ? confValue.toString() : '';
|
||||
|
@ -17,7 +17,7 @@ export function envArrayToObject(env: string[]): EnvVarObject {
|
||||
|
||||
return _(env)
|
||||
.map(toPair)
|
||||
.filter(([_, v]) => v != null)
|
||||
.filter(([_k, v]) => v != null)
|
||||
.fromPairs()
|
||||
.value();
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
import * as Bluebird from 'bluebird';
|
||||
import { fs } from 'mz';
|
||||
import * as path from 'path';
|
||||
import * as Path from 'path';
|
||||
import * as constants from './constants';
|
||||
import { ENOENT } from './errors';
|
||||
|
||||
@ -20,13 +20,13 @@ export function writeFileAtomic(path: string, data: string): Bluebird<void> {
|
||||
|
||||
export function safeRename(src: string, dest: string): Bluebird<void> {
|
||||
return Bluebird.resolve(fs.rename(src, dest))
|
||||
.then(() => fs.open(path.dirname(dest), 'r'))
|
||||
.then(() => fs.open(Path.dirname(dest), 'r'))
|
||||
.tap(fs.fsync)
|
||||
.then(fs.close);
|
||||
}
|
||||
|
||||
export function pathExistsOnHost(p: string): Bluebird<boolean> {
|
||||
return Bluebird.resolve(fs.stat(path.join(constants.rootMountPoint, p)))
|
||||
return Bluebird.resolve(fs.stat(Path.join(constants.rootMountPoint, p)))
|
||||
.return(true)
|
||||
.catchReturn(ENOENT, false);
|
||||
}
|
||||
|
@ -26,14 +26,14 @@ export class LocalModeManager {
|
||||
// Setup a listener to catch state changes relating to local mode
|
||||
this.config.on('change', changed => {
|
||||
if (changed.localMode != null) {
|
||||
const localMode = changed.localMode || false;
|
||||
const local = changed.localMode || false;
|
||||
|
||||
// First switch the logger to it's correct state
|
||||
this.logger.switchBackend(localMode);
|
||||
this.logger.switchBackend(local);
|
||||
|
||||
// If we're leaving local mode, make sure to remove all of the
|
||||
// leftover artifacts
|
||||
if (!localMode) {
|
||||
if (!local) {
|
||||
this.removeLocalModeArtifacts();
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ export class BalenaLogBackend extends LogBackend {
|
||||
private gzip: zlib.Gzip | null = null;
|
||||
private opts: Options;
|
||||
private stream: stream.PassThrough;
|
||||
timeout: NodeJS.Timer;
|
||||
private timeout: NodeJS.Timer;
|
||||
|
||||
public constructor(apiEndpoint: string, uuid: string, deviceApiKey: string) {
|
||||
super();
|
||||
|
@ -20,9 +20,7 @@ interface LogsEvents {
|
||||
|
||||
type LogsEventEmitter = StrictEventEmitter<EventEmitter, LogsEvents>;
|
||||
|
||||
export class ContainerLogs extends (EventEmitter as {
|
||||
new (): LogsEventEmitter;
|
||||
}) {
|
||||
export class ContainerLogs extends (EventEmitter as new () => LogsEventEmitter) {
|
||||
public constructor(public containerId: string, private docker: Docker) {
|
||||
super();
|
||||
}
|
||||
|
@ -36,10 +36,10 @@ export class LocalLogBackend extends LogBackend {
|
||||
return message;
|
||||
}
|
||||
})
|
||||
.then((message: LogMessage | null) => {
|
||||
if (message != null) {
|
||||
.then((msg: LogMessage | null) => {
|
||||
if (msg != null) {
|
||||
_.each(this.globalListeners, listener => {
|
||||
listener.push(`${JSON.stringify(message)}\n`);
|
||||
listener.push(`${JSON.stringify(msg)}\n`);
|
||||
});
|
||||
}
|
||||
})
|
||||
|
3
tslint.json
Normal file
3
tslint.json
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": ["resin-lint/config/tslint-prettier.json"]
|
||||
}
|
4
typings/dbus-native.d.ts
vendored
4
typings/dbus-native.d.ts
vendored
@ -1,4 +1,6 @@
|
||||
// Adapted from: https://gist.github.com/TianyiLi/a231afa2f804d8fa0805baa4830f9242
|
||||
// Adapted from:
|
||||
// https://gist.github.com/TianyiLi/a231afa2f804d8fa0805baa4830f9242
|
||||
// tslint:disable
|
||||
declare module 'dbus-native' {
|
||||
import * as net from 'net';
|
||||
import * as events from 'events';
|
||||
|
2
typings/docker-delta.d.ts
vendored
2
typings/docker-delta.d.ts
vendored
@ -1,7 +1,7 @@
|
||||
declare module 'docker-delta' {
|
||||
// Incomplete type definitions
|
||||
import TypedError = require('typed-error');
|
||||
import { Duplex } from 'stream';
|
||||
import TypedError = require('typed-error');
|
||||
|
||||
export class OutOfSyncError extends TypedError {}
|
||||
|
||||
|
1
typings/duration-js.d.ts
vendored
1
typings/duration-js.d.ts
vendored
@ -1,5 +1,6 @@
|
||||
// From: https://github.com/icholy/Duration.js/pull/15
|
||||
// Once the above is merged, use the inbuilt module types
|
||||
// tslint:disable
|
||||
declare module 'duration-js' {
|
||||
type DurationLike = Duration | string | number;
|
||||
type DateLike = Date | number;
|
||||
|
4
typings/global.d.ts
vendored
4
typings/global.d.ts
vendored
@ -2,8 +2,6 @@ interface Dictionary<T> {
|
||||
[key: string]: T;
|
||||
}
|
||||
|
||||
interface Callback<T> {
|
||||
(err?: Error, res?: T): void;
|
||||
}
|
||||
type Callback<T> = (err?: Error, res?: T) => void;
|
||||
|
||||
type Nullable<T> = T | null | undefined;
|
||||
|
Loading…
Reference in New Issue
Block a user