diff --git a/build-utils/fix-jsonstream.js b/build-utils/fix-jsonstream.js index a5018593..d5e5af2b 100644 --- a/build-utils/fix-jsonstream.js +++ b/build-utils/fix-jsonstream.js @@ -4,6 +4,6 @@ // Also, JSONStream starts a pipe between stdin and stdout if module.parent is undefined. // This pipe can fail throwing an uncaught exception, so we fake a module.parent to prevent this. // See https://github.com/dominictarr/JSONStream/issues/129 -module.exports = function(source) { +module.exports = function (source) { return 'module.parent = {};\n' + source.toString().replace(/^#! .*\n/, ''); }; diff --git a/build-utils/hardcode-migrations.js b/build-utils/hardcode-migrations.js index 9bd4998f..10267250 100644 --- a/build-utils/hardcode-migrations.js +++ b/build-utils/hardcode-migrations.js @@ -1,7 +1,7 @@ // knex migrations use dynamic requires which break with webpack. // This hack makes the migrations directory a constant so that at least we can use webpack contexts for the // require. -module.exports = function(source) { +module.exports = function (source) { return source .toString() .replace( diff --git a/package-lock.json b/package-lock.json index 7c5d5608..c7f94723 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,53 @@ "@babel/highlight": "^7.8.3" } }, + "@babel/generator": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.6.tgz", + "integrity": "sha512-+htwWKJbH2bL72HRluF8zumBxzuX0ZZUFl3JLNyoUjM/Ho8wnVpPXM6aUz8cfKDqQ/h7zHqKt4xzJteUosckqQ==", + "dev": true, + "requires": { + "@babel/types": "^7.9.6", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-function-name": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.9.5.tgz", + "integrity": "sha512-JVcQZeXM59Cd1qanDUxv9fgJpt3NeKUaqBqUEvfmQ+BCOKq2xUgaWZW2hr0dkbyJgezYuplEoh5knmrnS68efw==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.9.5" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz", + "integrity": "sha512-/8arLKUFq882w4tWGj9JYzRpAlZgiWUJ+dtteNTDqrRBz9Iguck9Rn3ykuBDoUwh2TO4tSAJlrxDUOXWklJe4g==", + "dev": true + }, "@babel/highlight": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz", @@ -32,6 +79,12 @@ } } }, + "@babel/parser": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.6.tgz", + "integrity": "sha512-AoeIEJn8vt+d/6+PXDRPaksYhnlbMIiejioBZvvMQsOjW/JYK6k/0dKnvvP3EhK5GfMBWDPtrxRtegWdAcdq9Q==", + "dev": true + }, "@babel/runtime": { "version": "7.8.7", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.8.7.tgz", @@ -39,16 +92,70 @@ "dev": true, "requires": { "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/traverse": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.6.tgz", + "integrity": "sha512-b3rAHSjbxy6VEAvlxM8OV/0X4XrG72zoxme6q1MOoe2vd0bEc+TwayhuC1+Dfgqh1QEG+pj7atQqvUprHIccsg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.6", + "@babel/helper-function-name": "^7.9.5", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.9.6", + "@babel/types": "^7.9.6", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" }, "dependencies": { - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true } } }, + "@babel/types": { + "version": "7.9.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.6.tgz", + "integrity": "sha512-qxXzvBO//jO9ZnoasKF1uJzHd2+M6Q2ZPIVfnFps8JJvXy0ZBbwbNOmE6SGIY5XOY6d1Bo5lb9d9RJ8nv3WSeA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.5", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, "@balena/contrato": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/@balena/contrato/-/contrato-0.2.1.tgz", @@ -83,35 +190,40 @@ } }, "@balena/lint": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@balena/lint/-/lint-4.1.0.tgz", - "integrity": "sha512-5db6EhVYblBh70J8k9LZYww1ntd3xwL/4hkysyB70itS/wBQLIMqGIVaiqfpayN61mYdbs24Fm5ijgDkhT4OLQ==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@balena/lint/-/lint-5.1.0.tgz", + "integrity": "sha512-ktyLx8bi2PwhED7KYKyi93RhpS9mI5X2KHA076hcpr/fD8W+XQF5DBga8Y40oNrt+qG8ZjVyMMXA3vvuVAslRA==", "dev": true, "requires": { - "@types/depcheck": "^0.6.0", "@types/glob": "^7.1.1", - "@types/lodash": "^4.14.149", - "@types/node": "^8.10.59", + "@types/lodash": "^4.14.150", + "@types/node": "^10.17.21", "@types/optimist": "0.0.29", - "@types/prettier": "^1.18.3", + "@types/prettier": "^2.0.0", "coffee-script": "^1.10.0", "coffeelint": "^1.15.0", "coffeescope2": "^0.4.5", - "depcheck": "^0.6.7", + "depcheck": "^0.9.2", "glob": "^7.1.6", "lodash": "^4.17.15", "optimist": "^0.6.1", - "prettier": "^1.19.1", - "tslint": "^5.20.1", + "prettier": "^2.0.5", + "tslint": "^6.1.2", "tslint-config-prettier": "^1.18.0", "tslint-no-unused-expression-chai": "^0.1.4", - "typescript": "^3.7.5" + "typescript": "^3.9.2" }, "dependencies": { + "@types/lodash": { + "version": "4.14.151", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.151.tgz", + "integrity": "sha512-Zst90IcBX5wnwSu7CAS0vvJkTjTELY4ssKbHiTnGcJgi170uiS8yQDdc3v6S77bRqYQIN1App5a1Pc2lceE5/g==", + "dev": true + }, "@types/node": { - "version": "8.10.59", - "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.59.tgz", - "integrity": "sha512-8RkBivJrDCyPpBXhVZcjh7cQxVBSmRk9QM7hOketZzp6Tg79c0N8kkpAIito9bnJ3HCVCHVYz+KHTEbfQNfeVQ==", + "version": "10.17.21", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.21.tgz", + "integrity": "sha512-PQKsydPxYxF1DsAFWmunaxd3sOi3iMt6Zmx/tgaagHYmwJ/9cRH91hQkeJZaUGWbvn0K5HlSVEXkn5U/llWPpQ==", "dev": true }, "coffee-script": { @@ -133,6 +245,12 @@ "once": "^1.3.0", "path-is-absolute": "^1.0.0" } + }, + "typescript": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.9.2.tgz", + "integrity": "sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==", + "dev": true } } }, @@ -259,12 +377,6 @@ "integrity": "sha512-Xv91WkykQZDcU04SZSQNPOGPKShnamVw0qhBVOuCQNiSCWRa4piu2wvkNlxX9G3F6Lx6gHWV0IgSNTH6S7nU8w==", "dev": true }, - "@types/depcheck": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@types/depcheck/-/depcheck-0.6.0.tgz", - "integrity": "sha512-l/1wJTM4G+aWVzonZJ8vx/xJp3flBLWgZMUrCWBaGysiCutl+q3Eu1lKPq6GYFasP7L19KZ3L/y1kv3X08R71w==", - "dev": true - }, "@types/dockerode": { "version": "2.5.25", "resolved": "https://registry.npmjs.org/@types/dockerode/-/dockerode-2.5.25.tgz", @@ -449,9 +561,9 @@ "dev": true }, "@types/prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-5qOlnZscTn4xxM5MeGXAMOsIOIKIbh9e85zJWfBRVPlRMEVawzoPhINYbRGkBZCI8LxvBe7tJCdWiarA99OZfQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.0.0.tgz", + "integrity": "sha512-/rM+sWiuOZ5dvuVzV37sUuklsbg+JPOP8d+nNFlo2ZtfpzPiPvh1/gc8liWOLBqe+sR+ZM7guPaIcTt6UZTo7Q==", "dev": true }, "@types/range-parser": { @@ -1168,7 +1280,6 @@ "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" } @@ -1278,6 +1389,12 @@ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", "dev": true }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", + "dev": true + }, "array-from": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", @@ -1391,6 +1508,15 @@ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, + "async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", + "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", + "dev": true, + "requires": { + "lodash": "^4.17.11" + } + }, "async-each": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", @@ -1474,68 +1600,6 @@ } } }, - "babel-messages": { - "version": "6.23.0", - "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", - "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", - "dev": true, - "requires": { - "babel-runtime": "^6.22.0" - } - }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "dev": true, - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, - "babel-traverse": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", - "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", - "dev": true, - "requires": { - "babel-code-frame": "^6.26.0", - "babel-messages": "^6.23.0", - "babel-runtime": "^6.26.0", - "babel-types": "^6.26.0", - "babylon": "^6.18.0", - "debug": "^2.6.8", - "globals": "^9.18.0", - "invariant": "^2.2.2", - "lodash": "^4.17.4" - }, - "dependencies": { - "globals": { - "version": "9.18.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", - "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==", - "dev": true - } - } - }, - "babel-types": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", - "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", - "dev": true, - "requires": { - "babel-runtime": "^6.26.0", - "esutils": "^2.0.2", - "lodash": "^4.17.4", - "to-fast-properties": "^1.0.3" - } - }, - "babylon": { - "version": "6.18.0", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", - "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==", - "dev": true - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1563,15 +1627,6 @@ "semver": "^7.1.3" }, "dependencies": { - "@types/semver": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.1.0.tgz", - "integrity": "sha512-pOKLaubrAEMUItGNpgwl0HMFPrSAFic8oSVIvfu1UwcgGNmNyK9gyhBHKmBnUTwwVvpZfkzUC0GaMgnL6P86uA==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, "semver": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz", @@ -1988,9 +2043,9 @@ "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=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.1.0.tgz", + "integrity": "sha512-k0KL0aWZuBt2lrxrcASWDfwOLMnodeQjodT/1SxEQAXsHANgo6ZC/VEaSEHCXt7aSTZ4/4H5LKa+tBXmW7Vtvw==", "dev": true }, "builtin-status-codes": { @@ -2069,6 +2124,32 @@ "unset-value": "^1.0.0" } }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + }, + "dependencies": { + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + } + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -2299,24 +2380,63 @@ "dev": true }, "cliui": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", - "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wrap-ansi": "^2.0.0" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" }, "dependencies": { - "wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" } } } @@ -2734,30 +2854,9 @@ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true } } }, - "core-js": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.0.tgz", - "integrity": "sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw==", - "dev": true - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -2955,6 +3054,12 @@ "nan": "^2.14.0" } }, + "de-indent": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", + "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=", + "dev": true + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -3091,80 +3196,90 @@ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, "depcheck": { - "version": "0.6.11", - "resolved": "https://registry.npmjs.org/depcheck/-/depcheck-0.6.11.tgz", - "integrity": "sha512-wTVJ8cNilB8NfkzoBblcYqsB8LRfbjqKEwAOLD3YXIRigktSM7/lS9xQfVkAVujhjstmiQMZR0hkdHSnQxzb9A==", + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/depcheck/-/depcheck-0.9.2.tgz", + "integrity": "sha512-w5f+lSZqLJJkk58s44eOd0Vor7hLZot4PlFL0y2JsIX5LuHQ2eAjHlDVeGBD4Mj6ZQSKakvKWRRCcPlvrdU2Sg==", "dev": true, "requires": { - "babel-traverse": "^6.7.3", - "babylon": "^6.1.21", - "builtin-modules": "^1.1.1", - "deprecate": "^1.0.0", + "@babel/parser": "^7.7.7", + "@babel/traverse": "^7.7.4", + "builtin-modules": "^3.0.0", + "camelcase": "^5.3.1", + "cosmiconfig": "^5.2.1", + "debug": "^4.1.1", "deps-regex": "^0.1.4", "js-yaml": "^3.4.2", - "lodash": "^4.5.1", + "lodash": "^4.17.15", "minimatch": "^3.0.2", + "node-sass-tilde-importer": "^1.0.2", + "please-upgrade-node": "^3.2.0", "require-package-name": "^2.0.1", - "walkdir": "0.0.11", - "yargs": "^8.0.2" + "resolve": "^1.14.1", + "vue-template-compiler": "^2.6.11", + "walkdir": "^0.4.1", + "yargs": "^15.0.2" }, "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "is-fullwidth-code-point": { + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "import-fresh": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" } }, - "strip-ansi": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "parse-json": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, - "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", - "dev": true - }, - "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", "dev": true, "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", - "decamelize": "^1.1.1", - "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" + "path-parse": "^1.0.6" } } } @@ -3175,12 +3290,6 @@ "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", "dev": true }, - "deprecate": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deprecate/-/deprecate-1.1.1.tgz", - "integrity": "sha512-ZGDXefq1xknT292LnorMY5s8UVU08/WKdzDZCUT6t9JzsiMSP4uzUhgpqugffNVcT5WC6wMBiSQ+LFjlv3v7iQ==", - "dev": true - }, "deps-regex": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deps-regex/-/deps-regex-0.1.4.tgz", @@ -3268,10 +3377,8 @@ }, "dependencies": { "JSONStream": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", + "version": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.2.tgz", "integrity": "sha1-wQI3G27Dp887hHygDCC7D85Mbeo=", - "dev": true, "requires": { "jsonparse": "^1.2.0", "through": ">=2.2.7 <3" @@ -3287,72 +3394,13 @@ "safe-buffer": "^5.1.1" } }, - "bluebird": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz", - "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==", - "dev": true - }, "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "version": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, "requires": { "ms": "^2.1.1" } }, - "docker-modem": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-1.0.9.tgz", - "integrity": "sha512-lVjqCSCIAUDZPAZIeyM125HXfNvOmYYInciphNrLrylUtKyW66meAjSPXWchKVzoIYZx69TPnAepVSSkeawoIw==", - "dev": true, - "requires": { - "JSONStream": "1.3.2", - "debug": "^3.2.6", - "readable-stream": "~1.0.26-4", - "split-ca": "^1.0.0" - }, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - } - } - }, - "dockerode": { - "version": "2.5.8", - "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-2.5.8.tgz", - "integrity": "sha512-+7iOUYBeDTScmOmQqpUYQaE7F4vvIt6+gIZNHWhqAQEI887tiPFB9OvXI/HzQYqfUNvukMK+9myLW63oTJPZpw==", - "dev": true, - "requires": { - "concat-stream": "~1.6.2", - "docker-modem": "^1.0.8", - "tar-fs": "~1.16.3" - }, - "dependencies": { - "tar-fs": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", - "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", - "dev": true, - "requires": { - "chownr": "^1.0.1", - "mkdirp": "^0.5.1", - "pump": "^1.0.0", - "tar-stream": "^1.1.2" - } - } - } - }, "event-stream": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.5.tgz", @@ -3368,10 +3416,8 @@ } }, "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true + "version": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "map-stream": { "version": "0.0.7", @@ -3381,14 +3427,12 @@ "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, "pump": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", - "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -3418,10 +3462,8 @@ } }, "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true + "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "tar-stream": { "version": "1.6.2", @@ -3549,25 +3591,6 @@ "tar-stream": "^2.1.0" }, "dependencies": { - "bl": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz", - "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - } - } - }, "event-stream": { "version": "3.3.5", "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.5.tgz", @@ -3593,7 +3616,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -3618,19 +3640,6 @@ "duplexer": "~0.1.1", "through": "~2.3.4" } - }, - "tar-stream": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", - "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==", - "dev": true, - "requires": { - "bl": "^4.0.1", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - } } } }, @@ -3649,7 +3658,6 @@ "version": "1.2.2", "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", - "dev": true, "requires": { "readable-stream": "^2.3.5", "safe-buffer": "^5.1.1" @@ -3659,40 +3667,10 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", - "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" } - }, - "tar-fs": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", - "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", - "dev": true, - "requires": { - "chownr": "^1.0.1", - "mkdirp": "^0.5.1", - "pump": "^1.0.0", - "tar-stream": "^1.1.2" - }, - "dependencies": { - "tar-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", - "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", - "dev": true, - "requires": { - "bl": "^1.0.0", - "buffer-alloc": "^1.2.0", - "end-of-stream": "^1.0.0", - "fs-constants": "^1.0.0", - "readable-stream": "^2.3.0", - "to-buffer": "^1.1.1", - "xtend": "^4.0.0" - } - } - } } } }, @@ -3738,12 +3716,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true - }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true } } }, @@ -3843,7 +3815,6 @@ "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", - "dev": true, "requires": { "once": "^1.4.0" } @@ -3973,14 +3944,6 @@ "requires": { "esrecurse": "^4.1.0", "estraverse": "^4.1.1" - }, - "dependencies": { - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } } }, "esm": { @@ -4002,16 +3965,14 @@ "dev": true, "requires": { "estraverse": "^4.1.0" - }, - "dependencies": { - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } } }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -4232,12 +4193,6 @@ "vary": "~1.1.2" }, "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -4412,13 +4367,6 @@ "object-assign": "^4.1.0" } }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -4466,14 +4414,6 @@ "pkg-dir": "^3.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==", - "requires": { - "color-convert": "^1.9.0" - } - }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", @@ -4539,22 +4479,26 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "optional": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "optional": true, "requires": { "delegates": "^1.0.0", @@ -4563,12 +4507,14 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "optional": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": false, + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "optional": true, "requires": { "balanced-match": "^1.0.0", @@ -4577,32 +4523,38 @@ }, "chownr": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "optional": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "optional": true }, "debug": { "version": "4.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "optional": true, "requires": { "ms": "^2.1.1" @@ -4610,22 +4562,26 @@ }, "deep-extend": { "version": "0.6.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "optional": true, "requires": { "minipass": "^2.2.1" @@ -4633,12 +4589,14 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "optional": true, "requires": { "aproba": "^1.0.3", @@ -4653,7 +4611,8 @@ }, "glob": { "version": "7.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "optional": true, "requires": { "fs.realpath": "^1.0.0", @@ -4666,12 +4625,14 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "optional": true }, "iconv-lite": { "version": "0.4.24", - "bundled": true, + "resolved": false, + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -4679,7 +4640,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "optional": true, "requires": { "minimatch": "^3.0.4" @@ -4687,7 +4649,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "optional": true, "requires": { "once": "^1.3.0", @@ -4696,17 +4659,20 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "optional": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "optional": true, "requires": { "number-is-nan": "^1.0.0" @@ -4714,12 +4680,14 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "optional": true, "requires": { "brace-expansion": "^1.1.7" @@ -4727,12 +4695,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": false, + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "optional": true }, "minipass": { "version": "2.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "optional": true, "requires": { "safe-buffer": "^5.1.2", @@ -4741,7 +4711,8 @@ }, "minizlib": { "version": "1.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "optional": true, "requires": { "minipass": "^2.2.1" @@ -4749,7 +4720,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "optional": true, "requires": { "minimist": "0.0.8" @@ -4757,12 +4729,14 @@ }, "ms": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "optional": true }, "needle": { "version": "2.3.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", "optional": true, "requires": { "debug": "^4.1.0", @@ -4772,7 +4746,8 @@ }, "node-pre-gyp": { "version": "0.12.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", + "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", "optional": true, "requires": { "detect-libc": "^1.0.2", @@ -4789,7 +4764,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "optional": true, "requires": { "abbrev": "1", @@ -4798,12 +4774,14 @@ }, "npm-bundled": { "version": "1.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "optional": true }, "npm-packlist": { "version": "1.4.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "optional": true, "requires": { "ignore-walk": "^3.0.1", @@ -4812,7 +4790,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "optional": true, "requires": { "are-we-there-yet": "~1.1.2", @@ -4823,17 +4802,20 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "optional": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "optional": true, "requires": { "wrappy": "1" @@ -4841,17 +4823,20 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "optional": true, "requires": { "os-homedir": "^1.0.0", @@ -4860,17 +4845,20 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "optional": true }, "rc": { "version": "1.2.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "optional": true, "requires": { "deep-extend": "^0.6.0", @@ -4881,14 +4869,16 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "optional": true } } }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "optional": true, "requires": { "core-util-is": "~1.0.0", @@ -4902,7 +4892,8 @@ }, "rimraf": { "version": "2.6.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "optional": true, "requires": { "glob": "^7.1.3" @@ -4910,37 +4901,44 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "optional": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "optional": true }, "semver": { "version": "5.7.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "optional": true, "requires": { "code-point-at": "^1.0.0", @@ -4950,7 +4948,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "optional": true, "requires": { "safe-buffer": "~5.1.0" @@ -4958,7 +4957,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "optional": true, "requires": { "ansi-regex": "^2.0.0" @@ -4966,12 +4966,14 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "optional": true }, "tar": { "version": "4.4.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "optional": true, "requires": { "chownr": "^1.1.1", @@ -4985,12 +4987,14 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "optional": true }, "wide-align": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "optional": true, "requires": { "string-width": "^1.0.2 || 2" @@ -4998,12 +5002,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "optional": true } } @@ -5045,12 +5051,6 @@ "semver": "^5.6.0" } }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "optional": true - }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", @@ -5069,13 +5069,28 @@ } } }, + "find-parent-dir": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/find-parent-dir/-/find-parent-dir-0.3.0.tgz", + "integrity": "sha1-M8RLQpqysvBkYpnF+fcY83b/jVQ=", + "dev": true + }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "dependencies": { + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } } }, "find-versions": { @@ -5232,6 +5247,25 @@ "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=", "dev": true }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + }, + "dependencies": { + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + } + } + }, "fs-write-stream-atomic": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz", @@ -5269,22 +5303,12 @@ "string-width": "^1.0.1", "strip-ansi": "^3.0.1", "wide-align": "^1.1.0" - }, - "dependencies": { - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - } } }, "get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, "get-object": { @@ -5336,18 +5360,6 @@ "dev": true, "requires": { "pump": "^3.0.0" - }, - "dependencies": { - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - } } }, "get-value": { @@ -5791,12 +5803,6 @@ "parse-passwd": "^1.0.0" } }, - "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", - "dev": true - }, "html-tag": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/html-tag/-/html-tag-2.0.0.tgz", @@ -5922,60 +5928,16 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "pkg-dir": { "version": "4.2.0", @@ -6081,7 +6043,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -6090,44 +6051,18 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, "requires": { "p-limit": "^2.0.0" } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } } } }, @@ -6328,19 +6263,10 @@ "integrity": "sha512-e0/LknJ8wpMMhTiWcjivB+ESwIuvHnBSlBbmP/pSb8CQJldoj1p2qv7xGZ/+BtbTziYRFSz8OsvdbiX45LtYQA==", "dev": true }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } - }, "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, "io-ts": { @@ -6357,20 +6283,6 @@ "requires": { "fp-ts": "^2.0.2", "io-ts": "^2.0.0" - }, - "dependencies": { - "fp-ts": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/fp-ts/-/fp-ts-2.0.5.tgz", - "integrity": "sha512-opI5r+rVlpZE7Rhk0YtqsrmxGkbIw0dRNqGca8FEAMMnjomXotG+R9QkLQg20onx7R8qhepAn4CCOP8usma/Xw==", - "dev": true - }, - "io-ts": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/io-ts/-/io-ts-2.0.1.tgz", - "integrity": "sha512-RezD+WcCfW4VkMkEcQWL/Nmy/nqsWTvTYg7oUmTGzglvSSV2P9h2z1PVeREPFf0GWNzruYleAt1XCMQZSg1xxQ==", - "dev": true - } } }, "ipaddr.js": { @@ -6479,6 +6391,12 @@ } } }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, "is-even": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-even/-/is-even-1.0.0.tgz", @@ -6634,8 +6552,7 @@ "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-typedarray": { "version": "1.0.0", @@ -6670,8 +6587,7 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", @@ -6737,6 +6653,12 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true + }, "json-mask": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/json-mask/-/json-mask-0.3.9.tgz", @@ -6793,8 +6715,7 @@ "jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=" }, "jsprim": { "version": "1.4.1", @@ -6913,12 +6834,12 @@ } }, "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "^2.0.0" } }, "liftoff": { @@ -7206,35 +7127,6 @@ } } }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, "loader-runner": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", @@ -7253,13 +7145,12 @@ } }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" + "p-locate": "^4.1.0" } }, "lockfile": { @@ -7405,15 +7296,6 @@ "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", "dev": true }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "lowercase-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", @@ -7523,12 +7405,22 @@ "dev": true }, "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + } } }, "memoizee": { @@ -7668,6 +7560,23 @@ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, + "minipass": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", + "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + }, + "dependencies": { + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, "minipass-collect": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", @@ -7677,20 +7586,10 @@ "minipass": "^3.0.0" }, "dependencies": { - "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, @@ -7703,20 +7602,10 @@ "minipass": "^3.0.0" }, "dependencies": { - "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, @@ -7729,20 +7618,29 @@ "minipass": "^3.0.0" }, "dependencies": { - "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + } + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + }, + "dependencies": { + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } } } }, @@ -8021,8 +7919,7 @@ "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "nise": { "version": "1.5.3", @@ -8139,14 +8036,6 @@ "tar": "^4" }, "dependencies": { - "fs-minipass": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", - "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", - "requires": { - "minipass": "^2.6.0" - } - }, "minipass": { "version": "2.9.0", "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", @@ -8155,31 +8044,18 @@ "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } - }, - "minizlib": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", - "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", - "requires": { - "minipass": "^2.9.0" - } - }, - "tar": { - "version": "4.4.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", - "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } } } }, + "node-sass-tilde-importer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/node-sass-tilde-importer/-/node-sass-tilde-importer-1.0.2.tgz", + "integrity": "sha512-Swcmr38Y7uB78itQeBm3mThjxBy9/Ah/ykPIaURY/L6Nec9AyRoL/jJ7ECfMR+oZeCTVQNxVMu/aHU+TLRVbdg==", + "dev": true, + "requires": { + "find-parent-dir": "^0.3.0" + } + }, "node-watch": { "version": "0.5.9", "resolved": "https://registry.npmjs.org/node-watch/-/node-watch-0.5.9.tgz", @@ -8251,29 +8127,6 @@ "osenv": "^0.1.4" } }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - } - } - }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -8297,7 +8150,6 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, "requires": { "path-key": "^2.0.0" } @@ -8474,24 +8326,37 @@ "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" }, "dependencies": { - "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "cross-spawn": "^5.0.1", - "get-stream": "^3.0.0", + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", "p-finally": "^1.0.0", @@ -8500,10 +8365,13 @@ } }, "get-stream": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", - "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } } } }, @@ -8530,8 +8398,7 @@ "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" }, "p-is-promise": { "version": "2.1.0", @@ -8540,21 +8407,20 @@ "dev": true }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "requires": { - "p-try": "^1.0.0" + "p-try": "^2.0.0" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "^2.2.0" } }, "p-map": { @@ -8564,10 +8430,9 @@ "dev": true }, "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" }, "package-json": { "version": "4.0.1", @@ -8681,8 +8546,7 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", @@ -8698,8 +8562,7 @@ "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "path-parse": { "version": "1.0.6", @@ -8835,15 +8698,6 @@ "path-exists": "^3.0.0" } }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", @@ -8852,12 +8706,6 @@ "requires": { "p-limit": "^2.0.0" } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true } } }, @@ -8898,25 +8746,6 @@ "which-pm-runs": "^1.0.0" }, "dependencies": { - "bl": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz", - "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - } - } - }, "decompress-response": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", @@ -8938,21 +8767,10 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -8981,19 +8799,6 @@ "pump": "^3.0.0", "tar-stream": "^2.0.0" } - }, - "tar-stream": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", - "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==", - "dev": true, - "requires": { - "bl": "^4.0.1", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - } } } }, @@ -9004,9 +8809,9 @@ "dev": true }, "prettier": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", - "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", + "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", "dev": true }, "pretty-ms": { @@ -9092,7 +8897,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.1" @@ -9207,44 +9011,6 @@ } } }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "dev": true, - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - }, - "dependencies": { - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, "readable-stream": { "version": "2.3.6", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -9278,9 +9044,9 @@ } }, "regenerator-runtime": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", - "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==", + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", "dev": true }, "regex-not": { @@ -9402,9 +9168,9 @@ "dev": true }, "require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, "require-npm4-to-publish": { @@ -9478,36 +9244,6 @@ "integrity": "sha512-46/xThm3zvvc9t9/7M3AaLEqtOpqlYYYcCZbpYVAQHG20+oMZBkae/VMrn4BTi6AJ8cpack0mEXhGiKmDNbLrQ==", "dev": true }, - "bl": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz", - "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -9559,32 +9295,6 @@ "duplexer": "~0.1.1", "through": "~2.3.4" } - }, - "tar-stream": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", - "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==", - "dev": true, - "requires": { - "bl": "^4.0.1", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } } } }, @@ -9887,7 +9597,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, "requires": { "shebang-regex": "^1.0.0" } @@ -9895,8 +9604,7 @@ "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "shell-escape": { "version": "0.2.0", @@ -10037,11 +9745,6 @@ "requires": { "is-extendable": "^0.1.0" } - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, @@ -10115,6 +9818,11 @@ "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", "dev": true }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + }, "source-map-resolve": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", @@ -10150,38 +9858,6 @@ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true - }, "split": { "version": "0.3.3", "resolved": "http://registry.npmjs.org/split/-/split-0.3.3.tgz", @@ -10219,13 +9895,6 @@ "nan": "^2.12.1", "node-pre-gyp": "^0.11.0", "request": "^2.87.0" - }, - "dependencies": { - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==" - } } }, "sshpk": { @@ -10352,16 +10021,6 @@ "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "requires": { - "ansi-regex": "^2.0.0" - } - } } }, "string_decoder": { @@ -10387,22 +10046,14 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, "requires": { "ansi-regex": "^2.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, "strip-eof": { "version": "1.0.0", "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, "strip-final-newline": { "version": "2.0.0", @@ -10492,6 +10143,80 @@ "integrity": "sha512-9I2ydhj8Z9veORCw5PRm4u9uebCn0mcCa6scWoNcbZ6dAtoo2618u9UUzxgmsCOreJpqDDuv61LvwofW7hLcBA==", "dev": true }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + }, + "dependencies": { + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + } + } + }, + "tar-fs": { + "version": "1.16.3", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-1.16.3.tgz", + "integrity": "sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==", + "dev": true, + "requires": { + "chownr": "^1.0.1", + "mkdirp": "^0.5.1", + "pump": "^1.0.0", + "tar-stream": "^1.1.2" + }, + "dependencies": { + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "dev": true, + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "pump": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pump/-/pump-1.0.3.tgz", + "integrity": "sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "tar-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.2.tgz", + "integrity": "sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==", + "dev": true, + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.2.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.1", + "xtend": "^4.0.0" + } + } + } + }, "tar-stream": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", @@ -10556,6 +10281,31 @@ } } }, + "terser": { + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.7.tgz", + "integrity": "sha512-fmr7M1f7DBly5cX2+rFDvmGBAaaZyPrHYK4mMdHEDAdNTqXSZgSOfqsfGq2HqPGT/1V0foZZuCZFx8CHKgAk3g==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.6.1", + "source-map-support": "~0.5.12" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "terser-webpack-plugin": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.3.5.tgz", @@ -10626,8 +10376,7 @@ "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "find-cache-dir": { "version": "3.3.1", @@ -10640,16 +10389,6 @@ "pkg-dir": "^4.1.0" } }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, "fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", @@ -10679,15 +10418,6 @@ "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "dev": true }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -10714,33 +10444,6 @@ "semver": "^6.0.0" } }, - "minipass": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.1.tgz", - "integrity": "sha512-UFqVihv6PQgwj8/yTGvl9kPz7xIAY+R5z6XYjRInD3Gk3qx6QGSD6zEcpeG4Dy/lQnv1J6zv8ejV90hyYIKf3w==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, "p-map": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", @@ -10750,17 +10453,10 @@ "aggregate-error": "^3.0.0" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "pkg-dir": { "version": "4.2.0", @@ -10787,12 +10483,6 @@ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true }, - "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", - "dev": true - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -10809,22 +10499,10 @@ "minipass": "^3.1.1" } }, - "terser": { - "version": "4.6.7", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.7.tgz", - "integrity": "sha512-fmr7M1f7DBly5cX2+rFDvmGBAaaZyPrHYK4mMdHEDAdNTqXSZgSOfqsfGq2HqPGT/1V0foZZuCZFx8CHKgAk3g==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - } - }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } }, @@ -10911,17 +10589,6 @@ "dev": true, "requires": { "rimraf": "^2.6.3" - }, - "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - } } }, "to-arraybuffer": { @@ -10937,9 +10604,9 @@ "dev": true }, "to-fast-properties": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", - "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, "to-gfm-code-block": { @@ -11119,9 +10786,9 @@ "dev": true }, "tslint": { - "version": "5.20.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", - "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.2.tgz", + "integrity": "sha512-UyNrLdK3E0fQG/xWNqAFAC5ugtFyPO4JJR1KyyfQAyzR8W0fTRrC91A8Wej4BntFzcvETdCSDa/4PnNYJQLYiA==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -11132,13 +10799,19 @@ "glob": "^7.1.1", "js-yaml": "^3.13.1", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", + "mkdirp": "^0.5.3", "resolve": "^1.3.2", "semver": "^5.3.0", - "tslib": "^1.8.0", + "tslib": "^1.10.0", "tsutils": "^2.29.0" }, "dependencies": { + "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 + }, "diff": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", @@ -11146,13 +10819,19 @@ "dev": true }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", "dev": true, "requires": { "path-parse": "^1.0.6" } + }, + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true } } }, @@ -11538,16 +11217,6 @@ "homedir-polyfill": "^1.0.1" } }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, "validate.io-array": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", @@ -11607,10 +11276,20 @@ "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", "dev": true }, + "vue-template-compiler": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz", + "integrity": "sha512-KIq15bvQDrcCjpGjrAhx4mUlyyHfdmTaoNfeoATHLAiWB+MU3cx4lOzMwrnUh9cCxy0Lt1T11hAFY6TQgroUAA==", + "dev": true, + "requires": { + "de-indent": "^1.0.2", + "he": "^1.1.0" + } + }, "walkdir": { - "version": "0.0.11", - "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.0.11.tgz", - "integrity": "sha1-oW0CXrkxvQO1LzCMrtD0D86+lTI=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/walkdir/-/walkdir-0.4.1.tgz", + "integrity": "sha512-3eBwRyEln6E1MSzcxcVpQIhRG8Q1jLvEqRmCZqS3dsfXEDR/AhOF4d+jHg1qvDCpYaVRZjENPQyrVxAkQqxPgQ==", "dev": true }, "warning-symbol": { @@ -11657,16 +11336,6 @@ "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, "chokidar": { "version": "2.1.8", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", @@ -11688,554 +11357,13 @@ } }, "fsevents": { - "version": "1.2.12", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.12.tgz", - "integrity": "sha512-Ggd/Ktt7E7I8pxZRbGIs7vwqAPscSESMrCSkx2FtWeqmheJgCo2R74fTsZFCifr0VTPwqRpPv17+6b8Zp7th0Q==", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, "optional": true, "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.4", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.5", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1", - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "readable-stream": { - "version": "2.3.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } + "nan": "^2.12.1" } }, "glob-parent": { @@ -12268,13 +11396,6 @@ "binary-extensions": "^1.0.0" } }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true, - "optional": true - }, "readdirp": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", @@ -12352,34 +11473,10 @@ "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, - "cacache": { - "version": "12.0.4", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-12.0.4.tgz", - "integrity": "sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ==", - "dev": true, - "requires": { - "bluebird": "^3.5.5", - "chownr": "^1.1.1", - "figgy-pudding": "^3.5.1", - "glob": "^7.1.4", - "graceful-fs": "^4.1.15", - "infer-owner": "^1.0.3", - "lru-cache": "^5.1.1", - "mississippi": "^3.0.0", - "mkdirp": "^0.5.1", - "move-concurrently": "^1.0.1", - "promise-inflight": "^1.0.1", - "rimraf": "^2.6.3", - "ssri": "^6.0.1", - "unique-filename": "^1.1.1", - "y18n": "^4.0.0" - } - }, "commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, "emojis-list": { "version": "3.0.0", @@ -12387,22 +11484,10 @@ "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", "dev": true }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } - }, "find-up": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, "requires": { "locate-path": "^3.0.0" } @@ -12411,7 +11496,6 @@ "version": "7.1.6", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -12445,7 +11529,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, "requires": { "p-locate": "^3.0.0", "path-exists": "^3.0.0" @@ -12455,7 +11538,6 @@ "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, "requires": { "yallist": "^3.0.2" } @@ -12464,7 +11546,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, "requires": { "pify": "^4.0.1", "semver": "^5.6.0" @@ -12476,84 +11557,24 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "mississippi": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mississippi/-/mississippi-3.0.0.tgz", - "integrity": "sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA==", - "dev": true, - "requires": { - "concat-stream": "^1.5.0", - "duplexify": "^3.4.2", - "end-of-stream": "^1.1.0", - "flush-write-stream": "^1.0.0", - "from2": "^2.1.0", - "parallel-transform": "^1.1.0", - "pump": "^3.0.0", - "pumpify": "^1.3.3", - "stream-each": "^1.1.0", - "through2": "^2.0.0" - } - }, "neo-async": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.1.tgz", "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, "requires": { "p-limit": "^2.0.0" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "serialize-javascript": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.2.tgz", - "integrity": "sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==", - "dev": true + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" }, "source-map": { "version": "0.6.1", @@ -12561,32 +11582,12 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, - "ssri": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-6.0.1.tgz", - "integrity": "sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA==", - "dev": true, - "requires": { - "figgy-pudding": "^3.5.1" - } - }, "tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==", "dev": true }, - "terser": { - "version": "4.6.7", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.6.7.tgz", - "integrity": "sha512-fmr7M1f7DBly5cX2+rFDvmGBAaaZyPrHYK4mMdHEDAdNTqXSZgSOfqsfGq2HqPGT/1V0foZZuCZFx8CHKgAk3g==", - "dev": true, - "requires": { - "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" - } - }, "terser-webpack-plugin": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.3.tgz", @@ -12628,8 +11629,7 @@ "ansi-regex": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", - "dev": true + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, "big.js": { "version": "5.2.2", @@ -12640,25 +11640,12 @@ "camelcase": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - } + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, "requires": { "nice-try": "^1.0.4", "path-key": "^2.0.1", @@ -12670,14 +11657,12 @@ "emoji-regex": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" }, "execa": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, "requires": { "cross-spawn": "^6.0.0", "get-stream": "^4.0.0", @@ -12697,29 +11682,10 @@ "locate-path": "^3.0.0" } }, - "findup-sync": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", - "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^3.0.4", - "resolve-dir": "^1.0.1" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, "requires": { "pump": "^3.0.0" } @@ -12750,17 +11716,10 @@ "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", "dev": true }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, "json5": { "version": "1.0.1", @@ -12771,15 +11730,6 @@ "minimist": "^1.2.0" } }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, "loader-utils": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", @@ -12801,22 +11751,10 @@ "path-exists": "^3.0.0" } }, - "mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - } - }, "mimic-fn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==" }, "minimist": { "version": "1.2.5", @@ -12824,26 +11762,6 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, "p-locate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", @@ -12853,33 +11771,10 @@ "p-limit": "^2.0.0" } }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, "string-width": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, "requires": { "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", @@ -12890,7 +11785,6 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -12908,7 +11802,6 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, "requires": { "ansi-styles": "^3.2.0", "string-width": "^3.0.0", @@ -12933,16 +11826,6 @@ "y18n": "^4.0.0", "yargs-parser": "^13.1.0" } - }, - "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, @@ -12986,7 +11869,6 @@ "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, "requires": { "isexe": "^2.0.0" } @@ -13070,15 +11952,6 @@ "winston-transport": "^4.3.0" }, "dependencies": { - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, "readable-stream": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", @@ -13284,72 +12157,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.2.tgz", - "integrity": "sha512-WGR+xHecKTr7EbUEhyLSh5Dube9JtdiG78ufaeLxTgpudf/20KqyMioIUZJAezlTIi6evxuoUs9YXc11cU+yzQ==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true + "version": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "string-width": { "version": "4.2.0", @@ -13395,12 +12211,21 @@ } }, "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } } }, "year": { diff --git a/package.json b/package.json index 1fe5263c..9fadd619 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "test:build": "npm run typescript:test-build && npm run coffeescript:test && npm run testitems:copy && npm run packagejson:copy", "test:fast": "TEST=1 mocha --opts test/fast-mocha.opts", "test:debug": "npm run test:build && TEST=1 mocha --inspect-brk", - "prettify": "balena-lint -e ts -e js --typescript --fix src/ test/ typings/", + "prettify": "balena-lint -e ts -e js --typescript --fix src/ test/ typings/ build-utils/", "typescript:test-build": "tsc --project tsconfig.json", "typescript:release": "tsc --project tsconfig.release.json && cp -r build/src/* build && rm -rf build/src", "coffeescript:test": "coffee -m -c -o build .", @@ -38,7 +38,7 @@ }, "devDependencies": { "@balena/contrato": "^0.2.1", - "@balena/lint": "^4.1.0", + "@balena/lint": "^5.1.0", "@types/bluebird": "^3.5.30", "@types/chai": "^4.2.11", "@types/chai-as-promised": "^7.1.2", diff --git a/src/api-binder.ts b/src/api-binder.ts index 0720e4b8..f64ec3e8 100644 --- a/src/api-binder.ts +++ b/src/api-binder.ts @@ -206,7 +206,7 @@ export class APIBinder { // When we've provisioned, try to load the backup. We // must wait for the provisioning because we need a // target state on which to apply the backup - globalEventBus.getInstance().once('targetStateChanged', async state => { + globalEventBus.getInstance().once('targetStateChanged', async (state) => { await loadBackupFromMigration( this.deviceState, state, @@ -394,7 +394,7 @@ export class APIBinder { }, })) as Array>; - return tags.map(tag => { + return tags.map((tag) => { // Do some type safe decoding and throw if we get an unexpected value const id = t.number.decode(tag.id); const name = t.string.decode(tag.tag_key); @@ -577,7 +577,7 @@ export class APIBinder { this.deviceState.triggerApplyTarget({ force, isFromApi }); } }) - .tapCatch(ContractValidationError, ContractViolationError, e => { + .tapCatch(ContractValidationError, ContractViolationError, (e) => { log.error(`Could not store target state for device: ${e}`); // the dashboard does not display lines correctly, // split them explcitly here @@ -593,7 +593,7 @@ export class APIBinder { e instanceof ContractValidationError || e instanceof ContractViolationError ), - err => { + (err) => { log.error(`Failed to get target state for device: ${err}`); }, ) @@ -944,7 +944,7 @@ export class APIBinder { } private lockGetTarget() { - return writeLock('getTarget').disposer(release => { + return writeLock('getTarget').disposer((release) => { release(); }); } @@ -960,7 +960,7 @@ export class APIBinder { if (apiBinder.readyForUpdates) { this.config .get('instantUpdates') - .then(instantUpdates => { + .then((instantUpdates) => { if (instantUpdates) { apiBinder .getAndSetTargetState(req.body.force, true) diff --git a/src/application-manager.js b/src/application-manager.js index 3f5fee48..bba6c254 100644 --- a/src/application-manager.js +++ b/src/application-manager.js @@ -42,7 +42,7 @@ import { serviceAction } from './device-api/common'; const readFileAsync = Promise.promisify(fs.readFile); // TODO: move this to an Image class? -const imageForService = service => ({ +const imageForService = (service) => ({ name: service.imageName, appId: service.appId, serviceId: service.serviceId, @@ -52,7 +52,7 @@ const imageForService = service => ({ dependent: 0, }); -const fetchAction = service => ({ +const fetchAction = (service) => ({ action: 'fetch', image: imageForService(service), serviceId: service.serviceId, @@ -61,7 +61,7 @@ const fetchAction = service => ({ // TODO: implement additional v2 endpoints // Some v1 endpoins only work for single-container apps as they assume the app has a single service. -const createApplicationManagerRouter = function(applications) { +const createApplicationManagerRouter = function (applications) { const router = express.Router(); router.use(bodyParser.urlencoded({ extended: true, limit: '10mb' })); router.use(bodyParser.json({ limit: '10mb' })); @@ -216,7 +216,7 @@ export class ApplicationManager extends EventEmitter { this.db, ); - this.config.on('change', changedConfig => { + this.config.on('change', (changedConfig) => { if (changedConfig.appUpdatePollInterval) { this.images.appUpdatePollInterval = changedConfig.appUpdatePollInterval; } @@ -231,10 +231,10 @@ export class ApplicationManager extends EventEmitter { images: this.images, config: this.config, callbacks: { - containerStarted: id => { + containerStarted: (id) => { this._containerStarted[id] = true; }, - containerKilled: id => { + containerKilled: (id) => { delete this._containerStarted[id]; }, fetchStart: () => { @@ -243,10 +243,10 @@ export class ApplicationManager extends EventEmitter { fetchEnd: () => { this.fetchesInProgress -= 1; }, - fetchTime: time => { + fetchTime: (time) => { this.timeSpentFetching += time; }, - stateReport: state => this.reportCurrentState(state), + stateReport: (state) => this.reportCurrentState(state), bestDeltaSource: this.bestDeltaSource, }, }); @@ -265,15 +265,17 @@ export class ApplicationManager extends EventEmitter { init() { return this.config .get('appUpdatePollInterval') - .then(interval => { + .then((interval) => { this.images.appUpdatePollInterval = interval; return this.images.cleanupDatabase(); }) .then(() => { const cleanup = () => { - return this.docker.listContainers({ all: true }).then(containers => { - return this.logger.clearOutOfDateDBLogs(_.map(containers, 'Id')); - }); + return this.docker + .listContainers({ all: true }) + .then((containers) => { + return this.logger.clearOutOfDateDBLogs(_.map(containers, 'Id')); + }); }; // Rather than relying on removing out of date database entries when we're no // longer using them, set a task that runs periodically to clear out the database @@ -302,7 +304,7 @@ export class ApplicationManager extends EventEmitter { this.services.getStatus(), this.images.getStatus(), this.config.get('currentCommit'), - function(services, images, currentCommit) { + function (services, images, currentCommit) { const apps = {}; const dependent = {}; let releaseId = null; @@ -422,7 +424,7 @@ export class ApplicationManager extends EventEmitter { // multi-app warning! // This is just wrong on every level - _.each(apps, app => { + _.each(apps, (app) => { app.commit = currentCommit; }); @@ -450,7 +452,7 @@ export class ApplicationManager extends EventEmitter { } getTargetApp(appId) { - return this.targetStateWrapper.getTargetApp(appId).then(app => { + return this.targetStateWrapper.getTargetApp(appId).then((app) => { if (app == null) { return; } @@ -524,7 +526,7 @@ export class ApplicationManager extends EventEmitter { // Returns true if a service matches its target except it should be running and it is not, but we've // already started it before. In this case it means it just exited so we don't want to start it again. - const alreadyStarted = serviceId => { + const alreadyStarted = (serviceId) => { return ( currentServicesPerId[serviceId].isEqualExceptForRunningState( targetServicesPerId[serviceId], @@ -537,7 +539,7 @@ export class ApplicationManager extends EventEmitter { const needUpdate = _.filter( toBeMaybeUpdated, - serviceId => + (serviceId) => !currentServicesPerId[serviceId].isEqual( targetServicesPerId[serviceId], containerIds, @@ -572,7 +574,7 @@ export class ApplicationManager extends EventEmitter { const toBeUpdated = _.filter( _.intersection(targetNames, currentNames), - name => !current[name].isEqualConfig(target[name]), + (name) => !current[name].isEqualConfig(target[name]), ); for (const name of toBeUpdated) { outputPairs.push({ @@ -605,16 +607,17 @@ export class ApplicationManager extends EventEmitter { } const hasNetwork = _.some( networkPairs, - pair => `${service.appId}_${pair.current?.name}` === service.networkMode, + (pair) => + `${service.appId}_${pair.current?.name}` === service.networkMode, ); if (hasNetwork) { return true; } - const hasVolume = _.some(service.volumes, function(volume) { + const hasVolume = _.some(service.volumes, function (volume) { const name = _.split(volume, ':')[0]; return _.some( volumePairs, - pair => `${service.appId}_${pair.current?.name}` === name, + (pair) => `${service.appId}_${pair.current?.name}` === name, ); }); return hasVolume; @@ -629,8 +632,8 @@ export class ApplicationManager extends EventEmitter { pendingPairs, ) { // for dependsOn, check no install or update pairs have that service - const dependencyUnmet = _.some(target.dependsOn, dependency => - _.some(pendingPairs, pair => pair.target?.serviceName === dependency), + const dependencyUnmet = _.some(target.dependsOn, (dependency) => + _.some(pendingPairs, (pair) => pair.target?.serviceName === dependency), ); if (dependencyUnmet) { return false; @@ -639,12 +642,12 @@ export class ApplicationManager extends EventEmitter { if ( _.some( networkPairs, - pair => `${target.appId}_${pair.target?.name}` === target.networkMode, + (pair) => `${target.appId}_${pair.target?.name}` === target.networkMode, ) ) { return false; } - const volumeUnmet = _.some(target.volumes, function(volumeDefinition) { + const volumeUnmet = _.some(target.volumes, function (volumeDefinition) { const [sourceName, destName] = volumeDefinition.split(':'); if (destName == null) { // If this is not a named volume, ignore it @@ -652,7 +655,7 @@ export class ApplicationManager extends EventEmitter { } return _.some( volumePairs, - pair => `${target.appId}_${pair.target?.name}` === sourceName, + (pair) => `${target.appId}_${pair.target?.name}` === sourceName, ); }); return !volumeUnmet; @@ -681,7 +684,7 @@ export class ApplicationManager extends EventEmitter { if ( !_.some( availableImages, - image => + (image) => image.dockerImageId === dependencyService.image || Images.isSameImage(image, { name: dependencyService.imageName }), ) @@ -702,7 +705,7 @@ export class ApplicationManager extends EventEmitter { ) { // Check none of the currentApp.services use this network or volume if (current != null) { - const dependencies = _.filter(currentApp.services, service => + const dependencies = _.filter(currentApp.services, (service) => dependencyComparisonFn(service, current), ); if (_.isEmpty(dependencies)) { @@ -746,7 +749,7 @@ export class ApplicationManager extends EventEmitter { _nextStepsForVolume({ current, target }, currentApp, changingPairs) { // Check none of the currentApp.services use this network or volume const dependencyComparisonFn = (service, curr) => - _.some(service.config.volumes, function(volumeDefinition) { + _.some(service.config.volumes, function (volumeDefinition) { const [sourceName, destName] = volumeDefinition.split(':'); return ( destName != null && sourceName === `${service.appId}_${curr?.name}` @@ -815,7 +818,7 @@ export class ApplicationManager extends EventEmitter { if (!localMode) { needsDownload = !_.some( availableImages, - image => + (image) => image.dockerImageId === target?.config.image || Images.isSameImage(image, { name: target.imageName }), ); @@ -1021,11 +1024,11 @@ export class ApplicationManager extends EventEmitter { } const appId = targetApp.appId ?? currentApp.appId; - return _.map(steps, step => _.assign({}, step, { appId })); + return _.map(steps, (step) => _.assign({}, step, { appId })); } normaliseAppForDB(app) { - const services = _.map(app.services, function(s, serviceId) { + const services = _.map(app.services, function (s, serviceId) { const service = _.clone(s); service.appId = app.appId; service.releaseId = app.releaseId; @@ -1033,10 +1036,10 @@ export class ApplicationManager extends EventEmitter { service.commit = app.commit; return service; }); - return Promise.map(services, service => { + return Promise.map(services, (service) => { service.image = this.images.normalise(service.image); return Promise.props(service); - }).then(function($services) { + }).then(function ($services) { const dbApp = { appId: app.appId, commit: app.commit, @@ -1056,7 +1059,7 @@ export class ApplicationManager extends EventEmitter { // this in a bluebird promise until we convert this to typescript return Promise.resolve(this.images.inspectByName(service.image)) .catchReturn(NotFoundError, undefined) - .then(function(imageInfo) { + .then(function (imageInfo) { const serviceOpts = { serviceName: service.serviceName, imageInfo, @@ -1134,9 +1137,9 @@ export class ApplicationManager extends EventEmitter { }, ); - return Promise.map(JSON.parse(app.services), service => + return Promise.map(JSON.parse(app.services), (service) => this.createTargetService(service, configOpts), - ).then(services => { + ).then((services) => { // If a named volume is defined in a service but NOT in the volumes of the compose file, we add it app-wide so that we can track it and purge it // !! DEPRECATED, WILL BE REMOVED IN NEXT MAJOR RELEASE !! for (const s of services) { @@ -1167,14 +1170,14 @@ export class ApplicationManager extends EventEmitter { setTarget(apps, dependent, source, maybeTrx) { const setInTransaction = (filtered, trx) => { return Promise.try(() => { - const appsArray = _.map(filtered, function(app, appId) { + const appsArray = _.map(filtered, function (app, appId) { const appClone = _.clone(app); appClone.appId = checkInt(appId); appClone.source = source; return appClone; }); return Promise.map(appsArray, this.normaliseAppForDB) - .then(appsForDB => { + .then((appsForDB) => { return this.targetStateWrapper.setTargetApps(appsForDB, trx); }) .then(() => @@ -1243,7 +1246,7 @@ export class ApplicationManager extends EventEmitter { .then(() => { this._targetVolatilePerImageId = {}; }) - .finally(function() { + .finally(function () { if (!_.isEmpty(contractViolators)) { throw new ContractViolationError(contractViolators); } @@ -1259,7 +1262,7 @@ export class ApplicationManager extends EventEmitter { clearTargetVolatileForServices(imageIds) { return imageIds.map( - imageId => (this._targetVolatilePerImageId[imageId] = {}), + (imageId) => (this._targetVolatilePerImageId[imageId] = {}), ); } @@ -1268,9 +1271,9 @@ export class ApplicationManager extends EventEmitter { this.targetStateWrapper.getTargetApps(), this.normaliseAndExtendAppFromDB, ) - .map(app => { + .map((app) => { if (!_.isEmpty(app.services)) { - app.services = _.map(app.services, service => { + app.services = _.map(app.services, (service) => { if (this._targetVolatilePerImageId[service.imageId] != null) { _.merge(service, this._targetVolatilePerImageId[service.imageId]); } @@ -1279,7 +1282,7 @@ export class ApplicationManager extends EventEmitter { } return app; }) - .then(apps => _.keyBy(apps, 'appId')); + .then((apps) => _.keyBy(apps, 'appId')); } getDependentTargets() { @@ -1314,9 +1317,9 @@ export class ApplicationManager extends EventEmitter { // - are locally available (i.e. an image with the same digest exists) // - are not saved to the DB with all their metadata (serviceId, serviceName, etc) _compareImages(current, target, available, localMode) { - const allImagesForTargetApp = app => _.map(app.services, imageForService); - const allImagesForCurrentApp = app => - _.map(app.services, function(service) { + const allImagesForTargetApp = (app) => _.map(app.services, imageForService); + const allImagesForCurrentApp = (app) => + _.map(app.services, function (service) { const img = _.find(available, { dockerImageId: service.config.image, @@ -1324,13 +1327,13 @@ export class ApplicationManager extends EventEmitter { }) ?? _.find(available, { dockerImageId: service.config.image }); return _.omit(img, ['dockerImageId', 'id']); }); - const allImageDockerIdsForTargetApp = app => + const allImageDockerIdsForTargetApp = (app) => _(app.services) - .map(svc => [svc.imageName, svc.config.image]) - .filter(img => img[1] != null) + .map((svc) => [svc.imageName, svc.config.image]) + .filter((img) => img[1] != null) .value(); - const availableWithoutIds = _.map(available, image => + const availableWithoutIds = _.map(available, (image) => _.omit(image, ['dockerImageId', 'id']), ); const currentImages = _.flatMap(current.local.apps, allImagesForCurrentApp); @@ -1341,16 +1344,16 @@ export class ApplicationManager extends EventEmitter { const availableAndUnused = _.filter( availableWithoutIds, - image => - !_.some(currentImages.concat(targetImages), imageInUse => + (image) => + !_.some(currentImages.concat(targetImages), (imageInUse) => _.isEqual(image, imageInUse), ), ); const imagesToDownload = _.filter( targetImages, - targetImage => - !_.some(available, availableImage => + (targetImage) => + !_.some(available, (availableImage) => Images.isSameImage(availableImage, targetImage), ), ); @@ -1358,8 +1361,10 @@ export class ApplicationManager extends EventEmitter { // Images that are available but we don't have them in the DB with the exact metadata: let imagesToSave = []; if (!localMode) { - imagesToSave = _.filter(targetImages, function(targetImage) { - const isActuallyAvailable = _.some(available, function(availableImage) { + imagesToSave = _.filter(targetImages, function (targetImage) { + const isActuallyAvailable = _.some(available, function ( + availableImage, + ) { if (Images.isSameImage(availableImage, targetImage)) { return true; } @@ -1371,31 +1376,33 @@ export class ApplicationManager extends EventEmitter { } return false; }); - const isNotSaved = !_.some(availableWithoutIds, img => + const isNotSaved = !_.some(availableWithoutIds, (img) => _.isEqual(img, targetImage), ); return isActuallyAvailable && isNotSaved; }); } - const deltaSources = _.map(imagesToDownload, image => { + const deltaSources = _.map(imagesToDownload, (image) => { return this.bestDeltaSource(image, available); }); const proxyvisorImages = this.proxyvisor.imagesInUse(current, target); const potentialDeleteThenDownload = _.filter( current.local.apps.services, - svc => + (svc) => svc.config.labels['io.balena.update.strategy'] === 'delete-then-download' && svc.status === 'Stopped', ); const imagesToRemove = _.filter( availableAndUnused.concat(potentialDeleteThenDownload), - function(image) { + function (image) { const notUsedForDelta = !_.includes(deltaSources, image.name); - const notUsedByProxyvisor = !_.some(proxyvisorImages, proxyvisorImage => - Images.isSameImage(image, { name: proxyvisorImage }), + const notUsedByProxyvisor = !_.some( + proxyvisorImages, + (proxyvisorImage) => + Images.isSameImage(image, { name: proxyvisorImage }), ); return notUsedForDelta && notUsedByProxyvisor; }, @@ -1437,8 +1444,10 @@ export class ApplicationManager extends EventEmitter { // multi-app warning: this will break let appsForVolumeRemoval; if (!localMode) { - const currentAppIds = _.keys(current.local.apps).map(n => checkInt(n)); - const targetAppIds = _.keys(target.local.apps).map(n => checkInt(n)); + const currentAppIds = _.keys(current.local.apps).map((n) => + checkInt(n), + ); + const targetAppIds = _.keys(target.local.apps).map((n) => checkInt(n)); appsForVolumeRemoval = _.difference(currentAppIds, targetAppIds); } @@ -1519,7 +1528,7 @@ export class ApplicationManager extends EventEmitter { } } } - const newDownloads = nextSteps.filter(s => s.action === 'fetch').length; + const newDownloads = nextSteps.filter((s) => s.action === 'fetch').length; if (!ignoreImages && delta && newDownloads > 0) { // Check that this is not the first pull for an @@ -1530,7 +1539,7 @@ export class ApplicationManager extends EventEmitter { let downloadsToBlock = downloading.length + newDownloads - constants.maxDeltaDownloads; - nextSteps = nextSteps.filter(function(step) { + nextSteps = nextSteps.filter(function (step) { if (step.action === 'fetch' && downloadsToBlock > 0) { const imagesForThisApp = appImages[step.image.appId]; if (imagesForThisApp == null || imagesForThisApp.length === 0) { @@ -1551,8 +1560,8 @@ export class ApplicationManager extends EventEmitter { nextSteps.push({ action: 'noop' }); } return _.uniqWith(nextSteps, _.isEqual); - }).then(nextSteps => - Promise.all(volumePromises).then(function(volSteps) { + }).then((nextSteps) => + Promise.all(volumePromises).then(function (volSteps) { nextSteps = nextSteps.concat(_.flatten(volSteps)); return nextSteps; }), @@ -1561,7 +1570,7 @@ export class ApplicationManager extends EventEmitter { stopAll({ force = false, skipLock = false } = {}) { return Promise.resolve(this.services.getAll()) - .map(service => { + .map((service) => { return this._lockingIfNecessary( service.appId, { force, skipLock }, @@ -1583,8 +1592,8 @@ export class ApplicationManager extends EventEmitter { } return this.config .get('lockOverride') - .then(lockOverride => lockOverride || force) - .then(lockOverridden => + .then((lockOverride) => lockOverride || force) + .then((lockOverridden) => updateLock.lock(appId, { force: lockOverridden }, fn), ); } @@ -1607,7 +1616,7 @@ export class ApplicationManager extends EventEmitter { .keys() .concat(_.keys(targetState.local.apps)) .uniq() - .each(id => { + .each((id) => { const intId = checkInt(id); if (intId == null) { throw new Error(`Invalid id: ${id}`); @@ -1615,7 +1624,7 @@ export class ApplicationManager extends EventEmitter { containerIdsByAppId[intId] = this.services.getContainerIdMap(intId); }); - return this.config.get('localMode').then(localMode => { + return this.config.get('localMode').then((localMode) => { return Promise.props({ cleanupNeeded: this.images.isCleanupNeeded(), availableImages: this.images.getAvailable(), @@ -1656,7 +1665,7 @@ export class ApplicationManager extends EventEmitter { ignoreImages, conf, containerIds, - ).then(nextSteps => { + ).then((nextSteps) => { if (ignoreImages && _.some(nextSteps, { action: 'fetch' })) { throw new Error('Cannot fetch images while executing an API action'); } @@ -1668,12 +1677,12 @@ export class ApplicationManager extends EventEmitter { targetState, nextSteps, ) - .then(proxyvisorSteps => nextSteps.concat(proxyvisorSteps)); + .then((proxyvisorSteps) => nextSteps.concat(proxyvisorSteps)); }); } serviceNameFromId(serviceId) { - return this.getTargetApps().then(function(apps) { + return this.getTargetApps().then(function (apps) { // Multi-app warning! // We assume here that there will only be a single // application @@ -1681,7 +1690,7 @@ export class ApplicationManager extends EventEmitter { const app = apps[appId]; const service = _.find( app.services, - svc => svc.serviceId === serviceId, + (svc) => svc.serviceId === serviceId, ); if (service?.serviceName == null) { throw new InternalInconsistencyError( @@ -1697,8 +1706,8 @@ export class ApplicationManager extends EventEmitter { } removeAllVolumesForApp(appId) { - return this.volumes.getAllByAppId(appId).then(volumes => - volumes.map(v => ({ + return this.volumes.getAllByAppId(appId).then((volumes) => + volumes.map((v) => ({ action: 'removeVolume', current: v, })), diff --git a/src/compose/composition-steps.ts b/src/compose/composition-steps.ts index f7b03d13..76708409 100644 --- a/src/compose/composition-steps.ts +++ b/src/compose/composition-steps.ts @@ -144,7 +144,7 @@ export function getExecutors(app: { callbacks: CompositionCallbacks; }) { const executors: Executors = { - stop: step => { + stop: (step) => { return app.lockFn( step.current.appId, { @@ -161,7 +161,7 @@ export function getExecutors(app: { }, ); }, - kill: step => { + kill: (step) => { return app.lockFn( step.current.appId, { @@ -177,12 +177,12 @@ export function getExecutors(app: { }, ); }, - remove: async step => { + remove: async (step) => { // Only called for dead containers, so no need to // take locks await app.services.remove(step.current); }, - updateMetadata: step => { + updateMetadata: (step) => { const skipLock = step.skipLock || checkTruthy(step.current.config.labels['io.balena.legacy-container']); @@ -197,7 +197,7 @@ export function getExecutors(app: { }, ); }, - restart: step => { + restart: (step) => { return app.lockFn( step.current.appId, { @@ -212,20 +212,20 @@ export function getExecutors(app: { }, ); }, - stopAll: async step => { + stopAll: async (step) => { await app.applications.stopAll({ force: step.force, skipLock: step.skipLock, }); }, - start: async step => { + start: async (step) => { const container = await app.services.start(step.target); app.callbacks.containerStarted(container.id); }, - updateCommit: async step => { + updateCommit: async (step) => { await app.config.set({ currentCommit: step.target }); }, - handover: step => { + handover: (step) => { return app.lockFn( step.current.appId, { @@ -237,7 +237,7 @@ export function getExecutors(app: { }, ); }, - fetch: async step => { + fetch: async (step) => { const startTime = process.hrtime(); app.callbacks.fetchStart(); const [fetchOpts, availableImages] = await Promise.all([ @@ -253,7 +253,7 @@ export function getExecutors(app: { await app.images.triggerFetch( step.image, opts, - async success => { + async (success) => { app.callbacks.fetchEnd(); const elapsed = process.hrtime(startTime); const elapsedMs = elapsed[0] * 1000 + elapsed[1] / 1e6; @@ -269,10 +269,10 @@ export function getExecutors(app: { step.serviceName, ); }, - removeImage: async step => { + removeImage: async (step) => { await app.images.remove(step.image); }, - saveImage: async step => { + saveImage: async (step) => { await app.images.save(step.image); }, cleanup: async () => { @@ -281,16 +281,16 @@ export function getExecutors(app: { await app.images.cleanup(); } }, - createNetwork: async step => { + createNetwork: async (step) => { await app.networks.create(step.target); }, - createVolume: async step => { + createVolume: async (step) => { await app.volumes.create(step.target); }, - removeNetwork: async step => { + removeNetwork: async (step) => { await app.networks.remove(step.current); }, - removeVolume: async step => { + removeVolume: async (step) => { await app.volumes.remove(step.current); }, ensureSupervisorNetwork: async () => { diff --git a/src/compose/images.ts b/src/compose/images.ts index 97abea4c..9e6e1a75 100644 --- a/src/compose/images.ts +++ b/src/compose/images.ts @@ -194,10 +194,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { } public async getByDockerId(id: string): Promise { - return await this.db - .models('image') - .where({ dockerImageId: id }) - .first(); + return await this.db.models('image').where({ dockerImageId: id }).first(); } public async removeByDockerId(id: string): Promise { @@ -216,7 +213,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { cb: (dockerImages: NormalisedDockerImage[], composeImages: Image[]) => T, ) { const [normalisedImages, dbImages] = await Promise.all([ - Bluebird.map(this.docker.listImages({ digests: true }), async image => { + Bluebird.map(this.docker.listImages({ digests: true }), async (image) => { const newImage = _.clone(image) as NormalisedDockerImage; newImage.NormalisedRepoTags = await this.getNormalisedTags(image); return newImage; @@ -240,7 +237,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { ): boolean { return ( _.includes(dockerImage.NormalisedRepoTags, image.name) || - _.some(dockerImage.RepoDigests, digest => + _.some(dockerImage.RepoDigests, (digest) => Images.hasSameDigest(image.name, digest), ) ); @@ -252,7 +249,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { ): boolean { return _.some( dockerImages, - dockerImage => + (dockerImage) => this.matchesTagOrDigest(image, dockerImage) || image.dockerImageId === dockerImage.Id, ); @@ -261,7 +258,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { public async getAvailable(): Promise { const images = await this.withImagesFromDockerAndDB( (dockerImages, supervisedImages) => - _.filter(supervisedImages, image => + _.filter(supervisedImages, (image) => this.isAvailableInDocker(image, dockerImages), ), ); @@ -288,7 +285,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { // some entries in the db might need to have the dockerImageId populated if (supervisedImage.dockerImageId == null) { const id = _.get( - _.find(dockerImages, dockerImage => + _.find(dockerImages, (dockerImage) => this.matchesTagOrDigest(supervisedImage, dockerImage), ), 'Id', @@ -303,20 +300,14 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { } } } - return _.reject(supervisedImages, image => + return _.reject(supervisedImages, (image) => this.isAvailableInDocker(image, dockerImages), ); }, ); - const ids = _(imagesToRemove) - .map('id') - .compact() - .value(); - await this.db - .models('image') - .del() - .whereIn('id', ids); + const ids = _(imagesToRemove).map('id').compact().value(); + await this.db.models('image').del().whereIn('id', ids); } public async getStatus() { @@ -362,7 +353,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { this.db .models('image') .select('dockerImageId') - .then(vals => vals.map((img: Image) => img.dockerImageId)), + .then((vals) => vals.map((img: Image) => img.dockerImageId)), ]); const supervisorRepos = [supervisorImageInfo.imageName]; @@ -381,7 +372,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { tagName: string; }) => { return ( - _.some(supervisorRepos, repo => imageName === repo) && + _.some(supervisorRepos, (repo) => imageName === repo) && tagName !== supervisorImageInfo.tagName ); }; @@ -408,7 +399,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { return _(images) .uniq() .filter( - image => + (image) => this.imageCleanupFailures[image] == null || Date.now() - this.imageCleanupFailures[image] > constants.imageCleanupErrorIgnoreTimeout, @@ -505,10 +496,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { // We first fetch the image from the DB to ensure it exists, // and get the dockerImageId and any other missing fields - const images = await this.db - .models('image') - .select() - .where(image); + const images = await this.db.models('image').select().where(image); if (images.length === 0) { removed = false; @@ -547,7 +535,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { if ( dockerImage.RepoTags.length > 1 && _.includes(dockerImage.RepoTags, img.name) && - _.some(dockerImage.RepoTags, t => + _.some(dockerImage.RepoTags, (t) => _.some(differentTags, { name: t }), ) ) { @@ -568,10 +556,7 @@ export class Images extends (EventEmitter as new () => ImageEventEmitter) { this.reportChange(image.imageId); } - await this.db - .models('image') - .del() - .where({ id: img.id }); + await this.db.models('image').del().where({ id: img.id }); if (removed) { this.logger.logSystemEvent(LogTypes.deleteImageSuccess, { image }); diff --git a/src/compose/network-manager.ts b/src/compose/network-manager.ts index 850662ac..724b14af 100644 --- a/src/compose/network-manager.ts +++ b/src/compose/network-manager.ts @@ -26,7 +26,7 @@ export class NetworkManager { return this.docker .getNetwork(network.Name) .inspect() - .then(net => { + .then((net) => { return Network.fromDockerNetwork( { docker: this.docker, @@ -93,7 +93,7 @@ export class NetworkManager { .getNetwork(constants.supervisorNetworkInterface) .inspect(); }) - .then(network => { + .then((network) => { return ( network.Options['com.docker.network.bridge.name'] === constants.supervisorNetworkInterface && @@ -119,7 +119,7 @@ export class NetworkManager { return Bluebird.resolve( this.docker.getNetwork(constants.supervisorNetworkInterface).inspect(), ) - .then(net => { + .then((net) => { if ( net.Options['com.docker.network.bridge.name'] !== constants.supervisorNetworkInterface || diff --git a/src/compose/network.ts b/src/compose/network.ts index a4cbf264..5d9df333 100644 --- a/src/compose/network.ts +++ b/src/compose/network.ts @@ -60,7 +60,7 @@ export class Network { driver: network.Driver, ipam: { driver: network.IPAM.Driver, - config: _.map(network.IPAM.Config, conf => { + config: _.map(network.IPAM.Config, (conf) => { const newConf: NetworkConfig['ipam']['config'][0] = {}; if (conf.Subnet != null) { @@ -155,7 +155,7 @@ export class Network { CheckDuplicate: true, IPAM: { Driver: this.config.ipam.driver, - Config: _.map(this.config.ipam.config, conf => { + Config: _.map(this.config.ipam.config, (conf) => { const ipamConf: DockerIPAMConfig = {}; if (conf.subnet != null) { ipamConf.Subnet = conf.subnet; @@ -194,7 +194,7 @@ export class Network { this.docker .getNetwork(Network.generateDockerName(this.appId, this.name)) .remove(), - ).tapCatch(error => { + ).tapCatch((error) => { this.logger.logSystemEvent(logTypes.removeNetworkError, { network: { name: this.name, appId: this.appId }, error, diff --git a/src/compose/ports.ts b/src/compose/ports.ts index 59f855b3..915e79b0 100644 --- a/src/compose/ports.ts +++ b/src/compose/ports.ts @@ -70,7 +70,7 @@ export class PortMap { this.ports.internalStart, this.ports.internalEnd, ); - return _.map(internalRange, internal => { + return _.map(internalRange, (internal) => { return `${internal}/${this.ports.protocol}`; }); } @@ -118,9 +118,9 @@ export class PortMap { public static normalisePortMaps(portMaps: PortMap[]): PortMap[] { // Fold any ranges into each other if possible return _(portMaps) - .sortBy(p => p.ports.protocol) - .sortBy(p => p.ports.host) - .sortBy(p => p.ports.internalStart) + .sortBy((p) => p.ports.protocol) + .sortBy((p) => p.ports.host) + .sortBy((p) => p.ports.internalStart) .reduce((res: PortMap[], p: PortMap) => { const last = _.last(res); @@ -141,7 +141,7 @@ export class PortMap { } public static fromComposePorts(ports: string[]): PortMap[] { - return PortMap.normalisePortMaps(ports.map(p => new PortMap(p))); + return PortMap.normalisePortMaps(ports.map((p) => new PortMap(p))); } private parsePortString(portStr: string): void { diff --git a/src/compose/service-manager.ts b/src/compose/service-manager.ts index e34162df..1c2bc102 100644 --- a/src/compose/service-manager.ts +++ b/src/compose/service-manager.ts @@ -69,7 +69,7 @@ export class ServiceManager extends (EventEmitter as new () => ServiceManagerEve const filterLabels = ['supervised'].concat(extraLabelFilters); const containers = await this.listWithBothLabels(filterLabels); - const services = await Bluebird.map(containers, async container => { + const services = await Bluebird.map(containers, async (container) => { try { const serviceInspect = await this.docker .getContainer(container.Id) @@ -90,7 +90,7 @@ export class ServiceManager extends (EventEmitter as new () => ServiceManagerEve } }); - return services.filter(s => s != null) as Service[]; + return services.filter((s) => s != null) as Service[]; } public async get(service: Service) { @@ -98,7 +98,7 @@ export class ServiceManager extends (EventEmitter as new () => ServiceManagerEve const containerIds = await this.getContainerIdMap(service.appId!); const services = ( await this.getAll(`service-id=${service.serviceId}`) - ).filter(currentService => + ).filter((currentService) => currentService.isEqualConfig(service, containerIds), ); @@ -399,7 +399,7 @@ export class ServiceManager extends (EventEmitter as new () => ServiceManagerEve filters: { type: ['container'] } as any, }); - stream.on('error', e => { + stream.on('error', (e) => { log.error(`Error on docker events stream:`, e); }); const parser = JSONStream.parse(); @@ -462,7 +462,7 @@ export class ServiceManager extends (EventEmitter as new () => ServiceManagerEve }; Bluebird.resolve(listen()) - .catch(e => { + .catch((e) => { log.error('Error listening to events:', e, e.stack); }) .finally(() => { @@ -554,7 +554,7 @@ export class ServiceManager extends (EventEmitter as new () => ServiceManagerEve return containerObj.remove({ v: true }); } }) - .catch(e => { + .catch((e) => { // Get the statusCode from the original cause and make sure it's // definitely an int for comparison reasons const maybeStatusCode = PermissiveNumber.decode(e.statusCode); @@ -585,7 +585,7 @@ export class ServiceManager extends (EventEmitter as new () => ServiceManagerEve delete this.containerHasDied[containerId]; this.logger.logSystemEvent(LogTypes.stopServiceSuccess, { service }); }) - .catch(e => { + .catch((e) => { this.logger.logSystemEvent(LogTypes.stopServiceError, { service, error: e, @@ -611,7 +611,7 @@ export class ServiceManager extends (EventEmitter as new () => ServiceManagerEve this.docker.listContainers({ all: true, filters: { - label: _.map(labelList, v => `${prefix}${v}`), + label: _.map(labelList, (v) => `${prefix}${v}`), }, }); @@ -646,7 +646,7 @@ export class ServiceManager extends (EventEmitter as new () => ServiceManagerEve const wait = (): Bluebird => Bluebird.any( - handoverCompletePaths.map(file => + handoverCompletePaths.map((file) => fs.stat(file).then(() => fs.unlink(file).catch(_.noop)), ), ).catch(async () => { diff --git a/src/compose/service.ts b/src/compose/service.ts index fba67d96..b6ce0ae1 100644 --- a/src/compose/service.ts +++ b/src/compose/service.ts @@ -130,7 +130,7 @@ export class Service { // First process the networks correctly let networks: ServiceConfig['networks'] = {}; if (_.isArray(config.networks)) { - _.each(config.networks, name => { + _.each(config.networks, (name) => { networks[name] = {}; }); } else if (_.isObject(config.networks)) { @@ -139,7 +139,7 @@ export class Service { // Prefix the network entries with the app id networks = _.mapKeys(networks, (_v, k) => `${service.appId}_${k}`); // Ensure that we add an alias of the service name - networks = _.mapValues(networks, v => { + networks = _.mapValues(networks, (v) => { if (v.aliases == null) { v.aliases = []; } @@ -305,7 +305,7 @@ export class Service { ); expose = expose.concat(_.keys(imageExposedPorts)); // Also add any exposed ports which are implied from the portMaps - const exposedFromPortMappings = _.flatMap(portMaps, port => + const exposedFromPortMappings = _.flatMap(portMaps, (port) => port.toExposedPortArray(), ); expose = expose.concat(exposedFromPortMappings); @@ -326,11 +326,13 @@ export class Service { } if (_.isArray(config.sysctls)) { - config.sysctls = _.fromPairs(_.map(config.sysctls, v => _.split(v, '='))); + config.sysctls = _.fromPairs( + _.map(config.sysctls, (v) => _.split(v, '=')), + ); } config.sysctls = _.mapValues(config.sysctls, String); - _.each(['cpuShares', 'cpuQuota', 'oomScoreAdj'], key => { + _.each(['cpuShares', 'cpuQuota', 'oomScoreAdj'], (key) => { const numVal = checkInt(config[key]); if (numVal) { config[key] = numVal; @@ -458,7 +460,7 @@ export class Service { const portMaps = PortMap.fromDockerOpts(container.HostConfig.PortBindings); let expose = _.flatMap( - _.flatMap(portMaps, p => p.toDockerOpts().exposedPorts), + _.flatMap(portMaps, (p) => p.toDockerOpts().exposedPorts), _.keys, ); if (container.Config.ExposedPorts != null) { @@ -578,7 +580,7 @@ export class Service { const { exposedPorts, portBindings } = this.generateExposeAndPorts(); const tmpFs: Dictionary<''> = {}; - _.each(this.config.tmpfs, tmp => { + _.each(this.config.tmpfs, (tmp) => { tmpFs[tmp] = ''; }); @@ -814,7 +816,7 @@ export class Service { this.appId || 0, this.serviceName || '', ); - const validVolumes = _.map(this.config.volumes, volume => { + const validVolumes = _.map(this.config.volumes, (volume) => { if (_.includes(defaults, volume) || !_.includes(volume, ':')) { return null; } @@ -855,7 +857,7 @@ export class Service { } { const binds: string[] = []; const volumes: { [volName: string]: {} } = {}; - _.each(this.config.volumes, volume => { + _.each(this.config.volumes, (volume) => { if (_.includes(volume, ':')) { binds.push(volume); } else { @@ -870,7 +872,7 @@ export class Service { const exposed: DockerPortOptions['exposedPorts'] = {}; const ports: DockerPortOptions['portBindings'] = {}; - _.each(this.config.portMaps, pmap => { + _.each(this.config.portMaps, (pmap) => { const { exposedPorts, portBindings } = pmap.toDockerOpts(); _.merge(exposed, exposedPorts); _.mergeWith(ports, portBindings, (destVal, srcVal) => { @@ -884,7 +886,7 @@ export class Service { // We also want to merge the compose and image exposedPorts // into the list of exposedPorts const composeExposed: DockerPortOptions['exposedPorts'] = {}; - _.each(this.config.expose, port => { + _.each(this.config.expose, (port) => { composeExposed[port] = {}; }); _.merge(exposed, composeExposed); @@ -948,9 +950,9 @@ export class Service { const [currentAliases, targetAliases] = [ current.aliases, target.aliases, - ].map(aliases => + ].map((aliases) => _.sortBy( - aliases.filter(a => !_.startsWith(this.containerId || '', a)), + aliases.filter((a) => !_.startsWith(this.containerId || '', a)), ), ); @@ -1006,7 +1008,7 @@ export class Service { ): ServiceConfig['volumes'] { let volumes: ServiceConfig['volumes'] = []; - _.each(composeVolumes, volume => { + _.each(composeVolumes, (volume) => { const isBind = _.includes(volume, ':'); if (isBind) { const [bindSource, bindDest, mode] = volume.split(':'); diff --git a/src/compose/utils.ts b/src/compose/utils.ts index ffafe845..2cb30ded 100644 --- a/src/compose/utils.ts +++ b/src/compose/utils.ts @@ -316,7 +316,7 @@ export function addFeaturesFromLabels( service: Service, options: DeviceMetadata, ): void { - const setEnvVariables = function(key: string, val: string) { + const setEnvVariables = function (key: string, val: string) { service.config.environment[`RESIN_${key}`] = val; service.config.environment[`BALENA_${key}`] = val; }; diff --git a/src/compose/volume-manager.ts b/src/compose/volume-manager.ts index dc43aff9..65c87295 100644 --- a/src/compose/volume-manager.ts +++ b/src/compose/volume-manager.ts @@ -41,7 +41,7 @@ export class VolumeManager { public async getAll(): Promise { const volumeInspect = await this.listWithBothLabels(); - return volumeInspect.map(inspect => + return volumeInspect.map((inspect) => Volume.fromDockerVolume( { logger: this.logger, docker: this.docker }, inspect, @@ -144,11 +144,11 @@ export class VolumeManager { ]); const containerVolumes = _(dockerContainers) - .flatMap(c => c.Mounts) - .filter(m => m.Type === 'volume') + .flatMap((c) => c.Mounts) + .filter((m) => m.Type === 'volume') // We know that the name must be set, if the mount is // a volume - .map(m => m.Name as string) + .map((m) => m.Name as string) .uniq() .value(); const volumeNames = _.map(dockerVolumes.Volumes, 'Name'); @@ -161,7 +161,7 @@ export class VolumeManager { referencedVolumes, ); await Promise.all( - volumesToRemove.map(v => this.docker.getVolume(v).remove()), + volumesToRemove.map((v) => this.docker.getVolume(v).remove()), ); } diff --git a/src/config/backend.ts b/src/config/backend.ts index 7da5a310..3802c8a4 100644 --- a/src/config/backend.ts +++ b/src/config/backend.ts @@ -175,7 +175,7 @@ export class RPiConfigBackend extends DeviceConfigBackend { confStatements.push(`${key} ${value}`); } else if (_.isArray(value)) { confStatements = confStatements.concat( - _.map(value, entry => `${key}=${entry}`), + _.map(value, (entry) => `${key}=${entry}`), ); } else { confStatements.push(`${key}=${value}`); @@ -334,7 +334,7 @@ export class ExtlinuxConfigBackend extends DeviceConfigBackend { ); } - const appendLine = _.filter(defaultEntry.APPEND.split(' '), entry => { + const appendLine = _.filter(defaultEntry.APPEND.split(' '), (entry) => { const lhs = entry.split('='); return !this.isSupportedConfig(lhs[0]); }); @@ -384,7 +384,7 @@ export class ExtlinuxConfigBackend extends DeviceConfigBackend { // Firstly split by line and filter any comments and empty lines let lines = confStr.split(/\r?\n/); - lines = _.filter(lines, l => { + lines = _.filter(lines, (l) => { const trimmed = _.trimStart(l); return trimmed !== '' && !_.startsWith(trimmed, '#'); }); @@ -647,7 +647,7 @@ export class ConfigfsConfigBackend extends DeviceConfigBackend { return [value]; } else { // or, it could be parsable as the content of a JSON array; "value" | "value1","value2" - return value.split(',').map(v => v.replace('"', '').trim()); + return value.split(',').map((v) => v.replace('"', '').trim()); } default: return value; diff --git a/src/config/configJson.ts b/src/config/configJson.ts index 0e472581..0b2a45a3 100644 --- a/src/config/configJson.ts +++ b/src/config/configJson.ts @@ -30,9 +30,9 @@ export default class ConfigJsonConfigBackend { this.schema = schema; this.writeLockConfigJson = () => - writeLock('config.json').disposer(release => release()); + writeLock('config.json').disposer((release) => release()); this.readLockConfigJson = () => - readLock('config.json').disposer(release => release()); + readLock('config.json').disposer((release) => release()); } public async set( @@ -94,12 +94,12 @@ export default class ConfigJsonConfigBackend { private write(): Promise { let atomicWritePossible = true; return this.pathOnHost() - .catch(err => { + .catch((err) => { log.error('There was an error detecting the config.json path', err); atomicWritePossible = false; return constants.configJsonNonAtomicPath; }) - .then(configPath => { + .then((configPath) => { if (atomicWritePossible) { return writeFileAtomic(configPath, JSON.stringify(this.cache)); } else { diff --git a/src/config/functions.ts b/src/config/functions.ts index 0d4c643a..2d0c52ce 100644 --- a/src/config/functions.ts +++ b/src/config/functions.ts @@ -24,7 +24,7 @@ export const fnSchema = { provisioned: (config: Config) => { return config .getMany(['uuid', 'apiEndpoint', 'registered_at', 'deviceId']) - .then(requiredValues => { + .then((requiredValues) => { return _.every(_.values(requiredValues)); }); }, @@ -64,7 +64,7 @@ export const fnSchema = { 'registered_at', 'deviceId', ]) - .then(conf => { + .then((conf) => { return { uuid: conf.uuid, applicationId: conf.applicationId, @@ -80,7 +80,7 @@ export const fnSchema = { }); }, mixpanelHost: (config: Config) => { - return config.get('apiEndpoint').then(apiEndpoint => { + return config.get('apiEndpoint').then((apiEndpoint) => { if (!apiEndpoint) { return null; } @@ -117,7 +117,7 @@ export const fnSchema = { ]); }, unmanaged: (config: Config) => { - return config.get('apiEndpoint').then(apiEndpoint => { + return config.get('apiEndpoint').then((apiEndpoint) => { return !apiEndpoint; }); }, diff --git a/src/config/index.ts b/src/config/index.ts index 0e9ee433..4afdc33a 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -70,7 +70,7 @@ export class Config extends (EventEmitter as new () => ConfigEventEmitter) { if (Schema.schema.hasOwnProperty(key)) { const schemaKey = key as Schema.SchemaKey; - return this.getSchema(schemaKey, db).then(value => { + return this.getSchema(schemaKey, db).then((value) => { if (value == null) { const defaultValue = schemaTypes[key].default; if (defaultValue instanceof t.Type) { @@ -118,7 +118,7 @@ export class Config extends (EventEmitter as new () => ConfigEventEmitter) { keys: T[], trx?: Transaction, ): Bluebird<{ [key in T]: SchemaReturn }> { - return Bluebird.map(keys, (key: T) => this.get(key, trx)).then(values => { + return Bluebird.map(keys, (key: T) => this.get(key, trx)).then((values) => { return _.zipObject(keys, values); }) as Bluebird<{ [key in T]: SchemaReturn }>; } @@ -198,10 +198,7 @@ export class Config extends (EventEmitter as new () => ConfigEventEmitter) { if (Schema.schema[key].source === 'config.json') { return this.configJsonBackend.remove(key); } else if (Schema.schema[key].source === 'db') { - await this.db - .models('config') - .del() - .where({ key }); + await this.db.models('config').del().where({ key }); } else { throw new Error( `Unknown or unsupported config backend: ${Schema.schema[key].source}`, @@ -247,9 +244,7 @@ export class Config extends (EventEmitter as new () => ConfigEventEmitter) { value = await this.configJsonBackend.get(key); break; case 'db': - const [conf] = await db('config') - .select('value') - .where({ key }); + const [conf] = await db('config').select('value').where({ key }); if (conf != null) { return conf.value; } diff --git a/src/config/types.ts b/src/config/types.ts index 1190a062..b0a6e60b 100644 --- a/src/config/types.ts +++ b/src/config/types.ts @@ -18,7 +18,7 @@ export const PermissiveBoolean = new t.Type>( 'PermissiveBoolean', _.isBoolean, (m, c) => - either.chain(permissiveValue.validate(m, c), v => { + either.chain(permissiveValue.validate(m, c), (v) => { switch (typeof v) { case 'string': case 'boolean': @@ -51,7 +51,7 @@ export const PermissiveNumber = new t.Type( 'PermissiveNumber', _.isNumber, (m, c) => - either.chain(t.union([t.string, t.number]).validate(m, c), v => { + either.chain(t.union([t.string, t.number]).validate(m, c), (v) => { switch (typeof v) { case 'number': return t.success(v); @@ -82,7 +82,7 @@ export class StringJSON extends t.Type { (m, c) => // Accept either an object, or a string which represents the // object - either.chain(t.union([t.string, type]).validate(m, c), v => { + either.chain(t.union([t.string, type]).validate(m, c), (v) => { let obj: T; if (typeof v === 'string') { obj = JSON.parse(v); diff --git a/src/config/utils.ts b/src/config/utils.ts index 550ccbad..271d36b0 100644 --- a/src/config/utils.ts +++ b/src/config/utils.ts @@ -28,7 +28,7 @@ export const initialiseConfigBackend = async ( }; function getConfigBackend(deviceType: string): DeviceConfigBackend | undefined { - return _.find(configBackends, backend => backend.matches(deviceType)); + return _.find(configBackends, (backend) => backend.matches(deviceType)); } export function envToBootConfig( @@ -54,7 +54,7 @@ export function bootConfigToEnv( ): EnvVarObject { return _(config) .mapKeys((_val, key) => configBackend.createConfigVarName(key)) - .mapValues(val => { + .mapValues((val) => { if (_.isArray(val)) { return JSON.stringify(val).replace(/^\[(.*)\]$/, '$1'); } diff --git a/src/db.ts b/src/db.ts index 18c3dbb8..2bbd83b8 100644 --- a/src/db.ts +++ b/src/db.ts @@ -49,9 +49,7 @@ export class DB { ): Promise { const knex = trx || this.knex; - const n = await knex(modelName) - .update(obj) - .where(id); + const n = await knex(modelName).update(obj).where(id); if (n === 0) { return knex(modelName).insert(obj); } diff --git a/src/device-api/common.js b/src/device-api/common.js index a8197033..1336a8d0 100644 --- a/src/device-api/common.js +++ b/src/device-api/common.js @@ -6,7 +6,7 @@ export function doRestart(applications, appId, force) { const { _lockingIfNecessary, deviceState } = applications; return _lockingIfNecessary(appId, { force }, () => - deviceState.getCurrentForComparison().then(function(currentState) { + deviceState.getCurrentForComparison().then(function (currentState) { const app = currentState.local.apps[appId]; const imageIds = _.map(app.services, 'imageId'); applications.clearTargetVolatileForServices(imageIds); @@ -17,7 +17,7 @@ export function doRestart(applications, appId, force) { .pausingApply(() => deviceState .applyIntermediateTarget(currentState, { skipLock: true }) - .then(function() { + .then(function () { currentState.local.apps[appId] = app; return deviceState.applyIntermediateTarget(currentState, { skipLock: true, @@ -38,7 +38,7 @@ export function doPurge(applications, appId, force) { 'Purge data', ); return _lockingIfNecessary(appId, { force }, () => - deviceState.getCurrentForComparison().then(function(currentState) { + deviceState.getCurrentForComparison().then(function (currentState) { const app = currentState.local.apps[appId]; if (app == null) { throw new Error(appNotFoundMessage); @@ -56,11 +56,11 @@ export function doPurge(applications, appId, force) { // remove the volumes, we must do this here, as the // application-manager will not remove any volumes // which are part of an active application - return Bluebird.each(volumes.getAllByAppId(appId), vol => + return Bluebird.each(volumes.getAllByAppId(appId), (vol) => vol.remove(), ); }) - .then(function() { + .then(function () { currentState.local.apps[appId] = app; return deviceState.applyIntermediateTarget(currentState, { skipLock: true, @@ -73,7 +73,7 @@ export function doPurge(applications, appId, force) { .tap(() => logger.logSystemMessage('Purged data', { appId }, 'Purge data success'), ) - .tapCatch(err => + .tapCatch((err) => logger.logSystemMessage( `Error purging data: ${err}`, { appId, error: err }, diff --git a/src/device-api/v1.js b/src/device-api/v1.js index 0e9fcb55..4d73a8af 100644 --- a/src/device-api/v1.js +++ b/src/device-api/v1.js @@ -4,10 +4,10 @@ import * as constants from '../lib/constants'; import { checkInt, checkTruthy } from '../lib/validation'; import { doRestart, doPurge, serviceAction } from './common'; -export const createV1Api = function(router, applications) { +export const createV1Api = function (router, applications) { const { eventTracker } = applications; - router.post('/v1/restart', function(req, res, next) { + router.post('/v1/restart', function (req, res, next) { const appId = checkInt(req.body.appId); const force = checkTruthy(req.body.force) ?? false; eventTracker.track('Restart container (v1)', { appId }); @@ -19,7 +19,7 @@ export const createV1Api = function(router, applications) { .catch(next); }); - const v1StopOrStart = function(req, res, next, action) { + const v1StopOrStart = function (req, res, next, action) { const appId = checkInt(req.params.appId); const force = checkTruthy(req.body.force) ?? false; if (appId == null) { @@ -27,7 +27,7 @@ export const createV1Api = function(router, applications) { } return applications .getCurrentApp(appId) - .then(function(app) { + .then(function (app) { let service = app?.app.services?.[0]; if (service == null) { return res.status(400).send('App not found'); @@ -49,12 +49,12 @@ export const createV1Api = function(router, applications) { }), { force }, ) - .then(function() { + .then(function () { if (action === 'stop') { return service; } // We refresh the container id in case we were starting an app with no container yet - return applications.getCurrentApp(appId).then(function(app2) { + return applications.getCurrentApp(appId).then(function (app2) { service = app2?.services?.[0]; if (service == null) { throw new Error('App not found after running action'); @@ -62,20 +62,20 @@ export const createV1Api = function(router, applications) { return service; }); }) - .then(service2 => + .then((service2) => res.status(200).json({ containerId: service2.containerId }), ); }) .catch(next); }; - const createV1StopOrStartHandler = action => + const createV1StopOrStartHandler = (action) => _.partial(v1StopOrStart, _, _, _, action); router.post('/v1/apps/:appId/stop', createV1StopOrStartHandler('stop')); router.post('/v1/apps/:appId/start', createV1StopOrStartHandler('start')); - router.get('/v1/apps/:appId', function(req, res, next) { + router.get('/v1/apps/:appId', function (req, res, next) { const appId = checkInt(req.params.appId); eventTracker.track('GET app (v1)', { appId }); if (appId == null) { @@ -84,7 +84,7 @@ export const createV1Api = function(router, applications) { return Promise.join( applications.getCurrentApp(appId), applications.getStatus(), - function(app, status) { + function (app, status) { const service = app?.services?.[0]; if (service == null) { return res.status(400).send('App not found'); @@ -112,7 +112,7 @@ export const createV1Api = function(router, applications) { ).catch(next); }); - router.post('/v1/purge', function(req, res, next) { + router.post('/v1/purge', function (req, res, next) { const appId = checkInt(req.body.appId); const force = checkTruthy(req.body.force) ?? false; if (appId == null) { diff --git a/src/device-api/v2.ts b/src/device-api/v2.ts index 61c969cf..7d121127 100644 --- a/src/device-api/v2.ts +++ b/src/device-api/v2.ts @@ -39,7 +39,7 @@ export function createV2Api(router: Router, applications: ApplicationManager) { return _lockingIfNecessary(appId, { force }, () => { return applications .getCurrentApp(appId) - .then(app => { + .then((app) => { if (app == null) { res.status(404).send(appNotFoundMessage); return; @@ -54,11 +54,11 @@ export function createV2Api(router: Router, applications: ApplicationManager) { let service: Service | undefined; if (imageId != null) { - service = _.find(app.services, svc => svc.imageId === imageId); + service = _.find(app.services, (svc) => svc.imageId === imageId); } else { service = _.find( app.services, - svc => svc.serviceName === serviceName, + (svc) => svc.serviceName === serviceName, ); } if (service == null) { @@ -173,7 +173,7 @@ export function createV2Api(router: Router, applications: ApplicationManager) { const appNameById: { [id: number]: string } = {}; - apps.forEach(app => { + apps.forEach((app) => { const appId = parseInt(app.appId, 10); response[app.name] = { appId, @@ -184,7 +184,7 @@ export function createV2Api(router: Router, applications: ApplicationManager) { appNameById[appId] = app.name; }); - images.forEach(img => { + images.forEach((img) => { const appName = appNameById[img.appId]; if (appName == null) { log.warn( @@ -224,7 +224,7 @@ export function createV2Api(router: Router, applications: ApplicationManager) { // Get all services and their statuses, and return it applications .getStatus() - .then(apps => { + .then((apps) => { res.status(200).json(apps); }) .catch(next); @@ -258,14 +258,14 @@ export function createV2Api(router: Router, applications: ApplicationManager) { target.local = { name: targetState.local.name, config: _.cloneDeep(targetState.local.config), - apps: _.mapValues(targetState.local.apps, app => ({ + apps: _.mapValues(targetState.local.apps, (app) => ({ appId: app.appId, name: app.name, commit: app.commit, releaseId: app.releaseId, - services: _.map(app.services, s => s.toComposeObject()), - volumes: _.mapValues(app.volumes, v => v.toComposeObject()), - networks: _.mapValues(app.networks, n => n.toComposeObject()), + services: _.map(app.services, (s) => s.toComposeObject()), + volumes: _.mapValues(app.volumes, (v) => v.toComposeObject()), + networks: _.mapValues(app.networks, (n) => n.toComposeObject()), })), }; } @@ -369,7 +369,10 @@ export function createV2Api(router: Router, applications: ApplicationManager) { if (req.query.serviceName != null || req.query.service != null) { const serviceName = req.query.serviceName || req.query.service; - const service = _.find(services, svc => svc.serviceName === serviceName); + const service = _.find( + services, + (svc) => svc.serviceName === serviceName, + ); if (service != null) { res.status(200).json({ status: 'success', @@ -396,7 +399,7 @@ export function createV2Api(router: Router, applications: ApplicationManager) { const currentRelease = await applications.config.get('currentCommit'); const pending = applications.deviceState.applyInProgress; - const containerStates = (await applications.services.getAll()).map(svc => + const containerStates = (await applications.services.getAll()).map((svc) => _.pick( svc, 'status', @@ -411,7 +414,7 @@ export function createV2Api(router: Router, applications: ApplicationManager) { let downloadProgressTotal = 0; let downloads = 0; - const imagesStates = (await applications.images.getStatus()).map(img => { + const imagesStates = (await applications.images.getStatus()).map((img) => { if (img.downloadProgress != null) { downloadProgressTotal += img.downloadProgress; downloads += 1; @@ -483,8 +486,8 @@ export function createV2Api(router: Router, applications: ApplicationManager) { router.get('/v2/cleanup-volumes', async (_req, res) => { const targetState = await applications.getTargetApps(); const referencedVolumes: string[] = []; - _.each(targetState, app => { - _.each(app.volumes, vol => { + _.each(targetState, (app) => { + _.each(app.volumes, (vol) => { referencedVolumes.push(Volume.generateDockerName(vol.appId, vol.name)); }); }); diff --git a/src/device-config.ts b/src/device-config.ts index a4000af2..98f2081b 100644 --- a/src/device-config.ts +++ b/src/device-config.ts @@ -156,7 +156,7 @@ export class DeviceConfig { this.logger = logger; this.actionExecutors = { - changeConfig: async step => { + changeConfig: async (step) => { try { if (step.humanReadableTarget) { this.logger.logConfigChange(step.humanReadableTarget); @@ -203,7 +203,7 @@ export class DeviceConfig { throw err; } }, - setBootConfig: async step => { + setBootConfig: async (step) => { const configBackend = await this.getConfigBackend(); if (!_.isObject(step.target)) { throw new Error( @@ -330,7 +330,7 @@ export class DeviceConfig { } public resetRateLimits() { - _.each(this.rateLimits, action => { + _.each(this.rateLimits, (action) => { action.lastAttempt = null; }); } @@ -468,7 +468,7 @@ export class DeviceConfig { } const now = Date.now(); - steps = _.map(steps, step => { + steps = _.map(steps, (step) => { const action = step.action; if (action in this.rateLimits) { const lastAttempt = this.rateLimits[action].lastAttempt; @@ -640,7 +640,7 @@ export class DeviceConfig { if (!_.includes(conf.dtoverlay, field)) { conf.dtoverlay.push(field); } - conf.dtoverlay = conf.dtoverlay.filter(s => !_.isEmpty(s)); + conf.dtoverlay = conf.dtoverlay.filter((s) => !_.isEmpty(s)); return conf; } diff --git a/src/device-state.ts b/src/device-state.ts index 1db45e18..4aceae83 100644 --- a/src/device-state.ts +++ b/src/device-state.ts @@ -121,8 +121,8 @@ function createDeviceStateRouter(deviceState: DeviceState) { router.get('/v1/device/host-config', (_req, res) => hostConfig .get() - .then(conf => res.json(conf)) - .catch(err => + .then((conf) => res.json(conf)) + .catch((err) => res.status(503).send(err?.message ?? err ?? 'Unknown error'), ), ); @@ -131,7 +131,7 @@ function createDeviceStateRouter(deviceState: DeviceState) { hostConfig .patch(req.body, deviceState.config) .then(() => res.status(200).send('OK')) - .catch(err => + .catch((err) => res.status(503).send(err?.message ?? err ?? 'Unknown error'), ), ); @@ -271,8 +271,8 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit apiBinder, }); - this.on('error', err => log.error('deviceState error: ', err)); - this.on('apply-target-state-end', function(err) { + this.on('error', (err) => log.error('deviceState error: ', err)); + this.on('apply-target-state-end', function (err) { if (err != null) { if (!(err instanceof UpdatesLockedError)) { return log.error('Device state apply error', err); @@ -285,7 +285,7 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit return this.deviceConfig.resetRateLimits(); } }); - this.applications.on('change', d => this.reportCurrentState(d)); + this.applications.on('change', (d) => this.reportCurrentState(d)); this.router = createDeviceStateRouter(this); } @@ -307,7 +307,7 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit } public async init() { - this.config.on('change', changedConfig => { + this.config.on('change', (changedConfig) => { if (changedConfig.loggingEnabled != null) { this.logger.enable(changedConfig.loggingEnabled); } @@ -389,11 +389,11 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit network.startConnectivityCheck( apiEndpoint, connectivityCheckEnabled, - connected => { + (connected) => { return (this.connected = connected); }, ); - this.config.on('change', function(changedConfig) { + this.config.on('change', function (changedConfig) { if (changedConfig.connectivityCheckEnabled != null) { return network.enableConnectivityCheck( changedConfig.connectivityCheckEnabled, @@ -402,7 +402,7 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit }); log.debug('Starting periodic check for IP addresses'); - await network.startIPAddressUpdate()(async addresses => { + await network.startIPAddressUpdate()(async (addresses) => { await this.reportCurrentState({ ip_address: addresses.join(' '), }); @@ -433,11 +433,11 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit } private readLockTarget = () => - this.readLock('target').disposer(release => release()); + this.readLock('target').disposer((release) => release()); private writeLockTarget = () => - this.writeLock('target').disposer(release => release()); + this.writeLock('target').disposer((release) => release()); private inferStepsLock = () => - this.writeLock('inferSteps').disposer(release => release()); + this.writeLock('inferSteps').disposer((release) => release()); private usingReadLockTarget(fn: () => any) { return Bluebird.using(this.readLockTarget, () => fn()); } @@ -463,7 +463,7 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit const apiEndpoint = await this.config.get('apiEndpoint'); await this.usingWriteLockTarget(async () => { - await this.db.transaction(async trx => { + await this.db.transaction(async (trx) => { await this.config.set({ name: target.local.name }, trx); await this.deviceConfig.setTarget(target.local.config, trx); @@ -762,7 +762,7 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit if (!intermediate) { this.reportCurrentState({ update_pending: true }); } - if (_.every(steps, step => step.action === 'noop')) { + if (_.every(steps, (step) => step.action === 'noop')) { if (backoff) { retryCount += 1; // Backoff to a maximum of 10 minutes @@ -774,7 +774,7 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit try { await Promise.all( - steps.map(s => this.applyStep(s, { force, initial, skipLock })), + steps.map((s) => this.applyStep(s, { force, initial, skipLock })), ); await Bluebird.delay(nextDelay); @@ -798,20 +798,20 @@ export class DeviceState extends (EventEmitter as new () => DeviceStateEventEmit JSON.stringify(_.map(steps, 'action')), ); } - }).catch(err => { + }).catch((err) => { return this.applyError(err, { force, initial, intermediate }); }); } public pausingApply(fn: () => any) { const lock = () => { - return this.writeLock('pause').disposer(release => release()); + return this.writeLock('pause').disposer((release) => release()); }; // TODO: This function is a bit of a mess const pause = () => { return Bluebird.try(() => { let res; - this.applyBlocker = new Promise(resolve => { + this.applyBlocker = new Promise((resolve) => { res = resolve; }); return res; diff --git a/src/event-tracker.ts b/src/event-tracker.ts index a4e27d0b..91f316a2 100644 --- a/src/event-tracker.ts +++ b/src/event-tracker.ts @@ -92,7 +92,7 @@ export class EventTracker { (event: string) => { // Call this function at maximum once every minute return _.throttle( - properties => { + (properties) => { if (this.client != null) { this.client.track(event, properties); } diff --git a/src/host-config.ts b/src/host-config.ts index 665d561a..92fdee46 100644 --- a/src/host-config.ts +++ b/src/host-config.ts @@ -61,7 +61,7 @@ const memoizedAuthRegex = _.memoize( ); const memoizedRegex = _.memoize( - proxyField => new RegExp(proxyField + '\\s*=\\s*([^;\\s]*)\\s*;'), + (proxyField) => new RegExp(proxyField + '\\s*=\\s*([^;\\s]*)\\s*;'), ); async function readProxy(): Promise { diff --git a/src/lib/contracts.ts b/src/lib/contracts.ts index 582875bd..e010af2b 100644 --- a/src/lib/contracts.ts +++ b/src/lib/contracts.ts @@ -63,10 +63,7 @@ function isValidRequirementType( export function containerContractsFulfilled( serviceContracts: ServiceContracts, ): ApplicationContractResult { - const containers = _(serviceContracts) - .map('contract') - .compact() - .value(); + const containers = _(serviceContracts).map('contract').compact().value(); const blueprintMembership: Dictionary = {}; for (const component of _.keys(contractRequirementVersions)) { @@ -91,7 +88,7 @@ export function containerContractsFulfilled( [ ...getContractsFromVersions(contractRequirementVersions), ...containers, - ].map(c => new Contract(c)), + ].map((c) => new Contract(c)), ); const solution = blueprint.reproduce(universe); @@ -132,13 +129,13 @@ export function containerContractsFulfilled( const [fulfilledServices, unfulfilledServices] = _.partition( _.keys(serviceContracts), - serviceName => { + (serviceName) => { const { contract } = serviceContracts[serviceName]; if (!contract) { return true; } // Did we find the contract in the generated state? - return _.some(children, child => + return _.some(children, (child) => _.isEqual((child as any).raw, contract), ); }, @@ -146,7 +143,7 @@ export function containerContractsFulfilled( const [unmetAndRequired, unmetAndOptional] = _.partition( unfulfilledServices, - serviceName => { + (serviceName) => { return !serviceContracts[serviceName].optional; }, ); diff --git a/src/lib/docker-utils.ts b/src/lib/docker-utils.ts index db9d4332..c05c9699 100644 --- a/src/lib/docker-utils.ts +++ b/src/lib/docker-utils.ts @@ -281,7 +281,7 @@ export class DockerUtils extends DockerToolbelt { .on('progress', onProgress) .on('retry', onProgress) .on('error', reject) - .on('response', res => { + .on('response', (res) => { if (res.statusCode !== 200) { reject( new Error( @@ -297,8 +297,8 @@ export class DockerUtils extends DockerToolbelt { }); res .pipe(deltaStream) - .on('id', id => resolve(`sha256:${id}`)) - .on('error', err => { + .on('id', (id) => resolve(`sha256:${id}`)) + .on('error', (err) => { logFn(`Delta stream emitted error: ${err}`); req.abort(); reject(err); diff --git a/src/lib/fs-utils.ts b/src/lib/fs-utils.ts index d598b195..523f9e4d 100644 --- a/src/lib/fs-utils.ts +++ b/src/lib/fs-utils.ts @@ -5,7 +5,7 @@ import * as constants from './constants'; import { ENOENT } from './errors'; export function writeAndSyncFile(path: string, data: string): Bluebird { - return Bluebird.resolve(fs.open(path, 'w')).then(fd => { + return Bluebird.resolve(fs.open(path, 'w')).then((fd) => { fs.write(fd, data, 0, 'utf8') .then(() => fs.fsync(fd)) .then(() => fs.close(fd)); diff --git a/src/lib/iptables.ts b/src/lib/iptables.ts index 1fd45da6..42de4a88 100644 --- a/src/lib/iptables.ts +++ b/src/lib/iptables.ts @@ -11,8 +11,8 @@ function applyIptablesArgs(args: string): Bluebird { // We want to run both commands regardless, but also rethrow an error // if one of them fails return execAsync(`iptables ${args}`) - .catch(e => (err = e)) - .then(() => execAsync(`ip6tables ${args}`).catch(e => (err = e))) + .catch((e) => (err = e)) + .then(() => execAsync(`ip6tables ${args}`).catch((e) => (err = e))) .then(() => { if (err != null) { throw err; @@ -42,7 +42,7 @@ export function rejectOnAllInterfacesExcept( ): Bluebird { // We delete each rule and create it again to ensure ordering (all ACCEPTs before the REJECT/DROP). // This is especially important after a supervisor update. - return Bluebird.each(allowedInterfaces, iface => + return Bluebird.each(allowedInterfaces, (iface) => clearAndInsertIptablesRule( `INPUT -p tcp --dport ${port} -i ${iface} -j ACCEPT`, ), diff --git a/src/lib/migration.ts b/src/lib/migration.ts index 2cd50224..32af7c7b 100644 --- a/src/lib/migration.ts +++ b/src/lib/migration.ts @@ -166,10 +166,7 @@ export async function normaliseLegacyDatabase( log.warn( `No compatible releases found in API, removing ${app.appId} from target state`, ); - await db - .models('app') - .where({ appId: app.appId }) - .del(); + await db.models('app').where({ appId: app.appId }).del(); } // We need to get the release.id, serviceId, image.id and updated imageUrl @@ -187,7 +184,7 @@ export async function normaliseLegacyDatabase( const imageFromDocker = await application.docker .getImage(service.image) .inspect() - .catch(error => { + .catch((error) => { if (error instanceof NotFoundError) { return; } @@ -203,9 +200,7 @@ export async function normaliseLegacyDatabase( try { if (imagesFromDatabase.length > 0) { log.debug('Deleting existing image entry in db'); - await trx('image') - .where({ name: service.image }) - .del(); + await trx('image').where({ name: service.image }).del(); } else { log.debug('No image in db to delete'); } @@ -243,9 +238,7 @@ export async function normaliseLegacyDatabase( log.debug('Updating app entry in db'); log.success('Successfully migrated legacy application'); - await trx('app') - .update(app) - .where({ appId: app.appId }); + await trx('app').update(app).where({ appId: app.appId }); } }); } @@ -312,10 +305,10 @@ export async function loadBackupFromMigration( // If the volume exists (from a previous incomplete run of this restoreBackup), we delete it first await deviceState.applications.volumes .get({ appId, name: volumeName }) - .then(volume => { + .then((volume) => { return volume.remove(); }) - .catch(error => { + .catch((error) => { if (error instanceof NotFoundError) { return; } diff --git a/src/lib/supervisor-console.ts b/src/lib/supervisor-console.ts index 3fcf9be9..1f7a2a17 100644 --- a/src/lib/supervisor-console.ts +++ b/src/lib/supervisor-console.ts @@ -30,7 +30,7 @@ const maxLevelLength = _(levels) const uncolorize = winston.format.uncolorize(); -const formatter = winston.format.printf(args => { +const formatter = winston.format.printf((args) => { const { level, message } = args; const { level: strippedLevel } = uncolorize.transform(args, { level: true, @@ -64,7 +64,7 @@ winston.addColors(colors); const messageFormatter = (printFn: (message: string) => void) => { return (...parts: any[]) => { parts - .map(p => { + .map((p) => { if (p instanceof Error) { return p.stack; } diff --git a/src/lib/update-lock.ts b/src/lib/update-lock.ts index 0386f58a..ce9e9335 100644 --- a/src/lib/update-lock.ts +++ b/src/lib/update-lock.ts @@ -28,7 +28,7 @@ export function lockPath(appId: number, serviceName: string): string { } function lockFilesOnHost(appId: number, serviceName: string): string[] { - return ['updates.lock', 'resin-updates.lock'].map(filename => + return ['updates.lock', 'resin-updates.lock'].map((filename) => path.join(constants.rootMountPoint, lockPath(appId, serviceName), filename), ); } @@ -56,7 +56,7 @@ export const readLock: LockFn = Bluebird.promisify(locker.async.readLock, { }); function dispose(release: () => void): Bluebird { - return Bluebird.map(_.keys(locksTaken), lockName => { + return Bluebird.map(_.keys(locksTaken), (lockName) => { delete locksTaken[lockName]; return lockFile.unlockAsync(lockName); }) @@ -82,10 +82,10 @@ export function lock( return Bluebird.resolve(fs.readdir(lockDir)) .catchReturn(ENOENT, []) - .mapSeries(serviceName => { + .mapSeries((serviceName) => { return Bluebird.mapSeries( lockFilesOnHost(appId, serviceName), - tmpLockName => { + (tmpLockName) => { return Bluebird.try(() => { if (force) { return lockFile.unlockAsync(tmpLockName); @@ -97,7 +97,7 @@ export function lock( }) .catchReturn(ENOENT, undefined); }, - ).catch(err => { + ).catch((err) => { return dispose(release).throw( new UpdatesLockedError(`Updates are locked: ${err.message}`), ); diff --git a/src/lib/validation.ts b/src/lib/validation.ts index 72cc7440..83e248f9 100644 --- a/src/lib/validation.ts +++ b/src/lib/validation.ts @@ -479,7 +479,7 @@ export function isValidDependentDevicesObject(devices: any): boolean { return _.every( a as TargetState['dependent']['devices'][any]['apps'], - app => { + (app) => { app = _.defaults(_.clone(app), { config: undefined, environment: undefined, diff --git a/src/local-mode.ts b/src/local-mode.ts index c4d58df7..499f3d00 100644 --- a/src/local-mode.ts +++ b/src/local-mode.ts @@ -83,7 +83,7 @@ export class LocalModeManager { public async init() { // Setup a listener to catch state changes relating to local mode - this.config.on('change', changed => { + this.config.on('change', (changed) => { if (changed.localMode != null) { const local = changed.localMode || false; @@ -125,16 +125,16 @@ export class LocalModeManager { public async collectEngineSnapshot(): Promise { const containersPromise = this.docker .listContainers() - .then(resp => _.map(resp, 'Id')); + .then((resp) => _.map(resp, 'Id')); const imagesPromise = this.docker .listImages() - .then(resp => _.map(resp, 'Id')); + .then((resp) => _.map(resp, 'Id')); const volumesPromise = this.docker .listVolumes() - .then(resp => _.map(resp.Volumes, 'Name')); + .then((resp) => _.map(resp.Volumes, 'Name')); const networksPromise = this.docker .listNetworks() - .then(resp => _.map(resp, 'Id')); + .then((resp) => _.map(resp, 'Id')); const [containers, images, volumes, networks] = await Bluebird.all([ containersPromise, @@ -155,8 +155,8 @@ export class LocalModeManager { return new EngineSnapshot( [inspectInfo.Id], [inspectInfo.Image], - inspectInfo.Mounts.filter(m => m.Name != null).map(m => m.Name!), - _.map(inspectInfo.NetworkSettings.Networks, n => n.NetworkID), + inspectInfo.Mounts.filter((m) => m.Name != null).map((m) => m.Name!), + _.map(inspectInfo.NetworkSettings.Networks, (n) => n.NetworkID), ); } @@ -237,29 +237,29 @@ export class LocalModeManager { log.debug(`Going to delete the following objects: ${objects}`); // Delete engine objects. We catch every deletion error, so that we can attempt other objects deletions. - await Bluebird.map(objects.containers, cId => { + await Bluebird.map(objects.containers, (cId) => { return this.docker .getContainer(cId) .remove({ force: true }) - .catch(e => log.error(`Unable to delete container ${cId}`, e)); + .catch((e) => log.error(`Unable to delete container ${cId}`, e)); }); - await Bluebird.map(objects.images, iId => { + await Bluebird.map(objects.images, (iId) => { return this.docker .getImage(iId) .remove({ force: true }) - .catch(e => log.error(`Unable to delete image ${iId}`, e)); + .catch((e) => log.error(`Unable to delete image ${iId}`, e)); }); - await Bluebird.map(objects.networks, nId => { + await Bluebird.map(objects.networks, (nId) => { return this.docker .getNetwork(nId) .remove() - .catch(e => log.error(`Unable to delete network ${nId}`, e)); + .catch((e) => log.error(`Unable to delete network ${nId}`, e)); }); - await Bluebird.map(objects.volumes, vId => { + await Bluebird.map(objects.volumes, (vId) => { return this.docker .getVolume(vId) .remove() - .catch(e => log.error(`Unable to delete volume ${vId}`, e)); + .catch((e) => log.error(`Unable to delete volume ${vId}`, e)); }); // Remove any local mode state added to the database. @@ -267,7 +267,7 @@ export class LocalModeManager { .models('app') .del() .where({ source: 'local' }) - .catch(e => + .catch((e) => log.error('Cannot delete local app entries in the database', e), ); } diff --git a/src/logger.ts b/src/logger.ts index 1a4d0c84..2c04112e 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -158,7 +158,7 @@ export class Logger { } public lock(containerId: string): Bluebird.Disposer<() => void> { - return writeLock(containerId).disposer(release => { + return writeLock(containerId).disposer((release) => { release(); }); } @@ -177,11 +177,11 @@ export class Logger { return Bluebird.using(this.lock(containerId), async () => { const logs = new ContainerLogs(containerId, docker); this.containerLogs[containerId] = logs; - logs.on('error', err => { + logs.on('error', (err) => { log.error('Container log retrieval error', err); delete this.containerLogs[containerId]; }); - logs.on('log', async logMessage => { + logs.on('log', async (logMessage) => { this.log(_.merge({}, serviceInfo, logMessage)); // Take the timestamp and set it in the database as the last diff --git a/src/logging/balena-backend.ts b/src/logging/balena-backend.ts index b2faf446..ba62907f 100644 --- a/src/logging/balena-backend.ts +++ b/src/logging/balena-backend.ts @@ -124,7 +124,7 @@ export class BalenaLogBackend extends LogBackend { // Since we haven't sent the request body yet, and never will,the // only reason for the server to prematurely respond is to // communicate an error. So teardown the connection immediately - this.req.on('response', res => { + this.req.on('response', (res) => { log.error( 'LogBackend: server responded with status code:', res.statusCode, @@ -134,7 +134,7 @@ export class BalenaLogBackend extends LogBackend { this.req.on('timeout', () => this.teardown()); this.req.on('close', () => this.teardown()); - this.req.on('error', err => { + this.req.on('error', (err) => { log.error('LogBackend: unexpected error:', err); this.teardown(); }); diff --git a/src/logging/container.ts b/src/logging/container.ts index 717026c6..77d81eb7 100644 --- a/src/logging/container.ts +++ b/src/logging/container.ts @@ -43,7 +43,7 @@ export class ContainerLogs extends (EventEmitter as new () => LogsEventEmitter) [stderrStream, false], ].forEach(([stream, isStdout]: [Stream.Readable, boolean]) => { stream - .on('error', err => { + .on('error', (err) => { this.emit( 'error', new Error(`Error on container logs: ${err} ${err.stack}`), @@ -59,7 +59,7 @@ export class ContainerLogs extends (EventEmitter as new () => LogsEventEmitter) this.emit('log', { isStdout, ...logMsg }); } }) - .on('error', err => { + .on('error', (err) => { this.emit( 'error', new Error(`Error on container logs: ${err} ${err.stack}`), @@ -76,7 +76,7 @@ export class ContainerLogs extends (EventEmitter as new () => LogsEventEmitter) // https://docs.docker.com/engine/api/v1.30/#operation/ContainerAttach if ( _.includes([0, 1, 2], msgBuf[0]) && - _.every(msgBuf.slice(1, 7), c => c === 0) + _.every(msgBuf.slice(1, 7), (c) => c === 0) ) { // Take the header from this message, and parse it as normal msgBuf = msgBuf.slice(8); diff --git a/src/logging/local-backend.ts b/src/logging/local-backend.ts index cb090c74..a5e318ff 100644 --- a/src/logging/local-backend.ts +++ b/src/logging/local-backend.ts @@ -44,12 +44,12 @@ export class LocalLogBackend extends LogBackend { }) .then((msg: LogMessage | null) => { if (msg != null) { - _.each(this.globalListeners, listener => { + _.each(this.globalListeners, (listener) => { listener.push(`${JSON.stringify(msg)}\n`); }); } }) - .catch(e => { + .catch((e) => { log.error('Error streaming local log output:', e); }); } diff --git a/src/migrations/20171129013519_legacy.js b/src/migrations/20171129013519_legacy.js index fcbd9491..e94cf537 100644 --- a/src/migrations/20171129013519_legacy.js +++ b/src/migrations/20171129013519_legacy.js @@ -7,27 +7,31 @@ // a few dropColumn and dropTable calls to delete things that were removed throughout the supervisor's // history without actually adding drop statements (mostly just becoming unused, but still there). -exports.up = function(knex) { - const addColumn = function(table, column, type) { - return knex.schema.hasColumn(table, column).then(exists => { +exports.up = function (knex) { + const addColumn = function (table, column, type) { + return knex.schema.hasColumn(table, column).then((exists) => { if (!exists) { - return knex.schema.table(table, t => { + return knex.schema.table(table, (t) => { return t[type](column); }); } }); }; - const dropColumn = function(table, column) { - return knex.schema.hasColumn(table, column).then(exists => { + const dropColumn = function (table, column) { + return knex.schema.hasColumn(table, column).then((exists) => { if (exists) { - return knex.schema.table(table, t => { + return knex.schema.table(table, (t) => { return t.dropColumn(column); }); } }); }; - const createTableOrRun = function(tableName, tableCreator, runIfTableExists) { - return knex.schema.hasTable(tableName).then(exists => { + const createTableOrRun = function ( + tableName, + tableCreator, + runIfTableExists, + ) { + return knex.schema.hasTable(tableName).then((exists) => { if (!exists) { return knex.schema.createTable(tableName, tableCreator); } else if (runIfTableExists != null) { @@ -35,25 +39,25 @@ exports.up = function(knex) { } }); }; - const dropTable = function(tableName) { - return knex.schema.hasTable(tableName).then(exists => { + const dropTable = function (tableName) { + return knex.schema.hasTable(tableName).then((exists) => { if (exists) { return knex.schema.dropTable(tableName); } }); }; return Promise.all([ - createTableOrRun('config', t => { + createTableOrRun('config', (t) => { t.string('key').primary(); t.string('value'); }), - createTableOrRun('deviceConfig', t => { + createTableOrRun('deviceConfig', (t) => { t.json('values'); t.json('targetValues'); }).then(() => { return knex('deviceConfig') .select() - .then(deviceConfigs => { + .then((deviceConfigs) => { if (deviceConfigs.length === 0) { return knex('deviceConfig').insert({ values: '{}', @@ -64,7 +68,7 @@ exports.up = function(knex) { }), createTableOrRun( 'app', - t => { + (t) => { t.increments('id').primary(); t.string('name'); t.string('containerName'); @@ -99,7 +103,7 @@ exports.up = function(knex) { ), createTableOrRun( 'dependentApp', - t => { + (t) => { t.increments('id').primary(); t.string('appId'); t.string('parentAppId'); @@ -115,7 +119,7 @@ exports.up = function(knex) { ), createTableOrRun( 'dependentDevice', - t => { + (t) => { t.increments('id').primary(); t.string('uuid'); t.string('appId'); @@ -151,6 +155,6 @@ exports.up = function(knex) { ]); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not implemented')); }; diff --git a/src/migrations/20171129064057_multicontainer.js b/src/migrations/20171129064057_multicontainer.js index 02ce2f65..08d6b239 100644 --- a/src/migrations/20171129064057_multicontainer.js +++ b/src/migrations/20171129064057_multicontainer.js @@ -1,7 +1,7 @@ const Bluebird = require('bluebird'); const _ = require('lodash'); -var tryParse = function(obj) { +var tryParse = function (obj) { try { return JSON.parse(obj); } catch (e) { @@ -9,7 +9,7 @@ var tryParse = function(obj) { } }; -var singleToMulticontainerApp = function(app) { +var singleToMulticontainerApp = function (app) { // From *very* old supervisors, env or config may be null // so we ignore errors parsing them const conf = tryParse(app.config); @@ -68,7 +68,7 @@ var singleToMulticontainerApp = function(app) { return newApp; }; -var jsonifyAppFields = function(app) { +var jsonifyAppFields = function (app) { const newApp = _.clone(app); newApp.services = JSON.stringify(app.services); newApp.networks = JSON.stringify(app.networks); @@ -76,7 +76,7 @@ var jsonifyAppFields = function(app) { return newApp; }; -var imageForApp = function(app) { +var imageForApp = function (app) { const service = app.services[0]; return { name: service.image, @@ -89,7 +89,7 @@ var imageForApp = function(app) { }; }; -var imageForDependentApp = function(app) { +var imageForDependentApp = function (app) { return { name: app.image, appId: app.appId, @@ -101,9 +101,9 @@ var imageForDependentApp = function(app) { }; }; -exports.up = function(knex) { +exports.up = function (knex) { return Bluebird.resolve( - knex.schema.createTable('image', t => { + knex.schema.createTable('image', (t) => { t.increments('id').primary(); t.string('name'); t.integer('appId'); @@ -120,7 +120,7 @@ exports.up = function(knex) { .whereNot({ markedForDeletion: true }) .orWhereNull('markedForDeletion'), ) - .tap(apps => { + .tap((apps) => { if (apps.length > 0) { return knex('config').insert({ key: 'legacyAppsPresent', @@ -132,7 +132,7 @@ exports.up = function(knex) { // We're in a transaction, and it's easier to drop and recreate // than to migrate each field... return knex.schema.dropTable('app').then(() => { - return knex.schema.createTable('app', t => { + return knex.schema.createTable('app', (t) => { t.increments('id').primary(); t.string('name'); t.integer('releaseId'); @@ -144,7 +144,7 @@ exports.up = function(knex) { }); }); }) - .map(app => { + .map((app) => { const migratedApp = singleToMulticontainerApp(app); return knex('app') .insert(jsonifyAppFields(migratedApp)) @@ -157,7 +157,7 @@ exports.up = function(knex) { // to the config table. return knex('deviceConfig') .select() - .then(deviceConf => { + .then((deviceConf) => { return knex.schema.dropTable('deviceConfig').then(() => { const values = JSON.parse(deviceConf[0].values); const configKeys = { @@ -172,7 +172,7 @@ exports.up = function(knex) { RESIN_SUPERVISOR_DELTA_RETRY_INTERVAL: 'deltaRequestTimeout', RESIN_SUPERVISOR_OVERRIDE_LOCK: 'lockOverride', }; - return Bluebird.map(Object.keys(values), envVarName => { + return Bluebird.map(Object.keys(values), (envVarName) => { if (configKeys[envVarName] != null) { return knex('config').insert({ key: configKeys[envVarName], @@ -183,18 +183,18 @@ exports.up = function(knex) { }); }) .then(() => { - return knex.schema.createTable('deviceConfig', t => { + return knex.schema.createTable('deviceConfig', (t) => { t.json('targetValues'); }); }) .then(() => knex('deviceConfig').insert({ targetValues: '{}' })); }) .then(() => knex('dependentApp').select()) - .then(dependentApps => { + .then((dependentApps) => { return knex.schema .dropTable('dependentApp') .then(() => { - return knex.schema.createTable('dependentApp', t => { + return knex.schema.createTable('dependentApp', (t) => { t.increments('id').primary(); t.integer('appId'); t.integer('parentApp'); @@ -208,7 +208,7 @@ exports.up = function(knex) { }); }) .then(() => { - return knex.schema.createTable('dependentAppTarget', t => { + return knex.schema.createTable('dependentAppTarget', (t) => { t.increments('id').primary(); t.integer('appId'); t.integer('parentApp'); @@ -222,7 +222,7 @@ exports.up = function(knex) { }); }) .then(() => { - return Bluebird.map(dependentApps, app => { + return Bluebird.map(dependentApps, (app) => { const newApp = { appId: parseInt(app.appId, 10), parentApp: parseInt(app.parentAppId, 10), @@ -242,11 +242,11 @@ exports.up = function(knex) { }); }) .then(() => knex('dependentDevice').select()) - .then(dependentDevices => { + .then((dependentDevices) => { return knex.schema .dropTable('dependentDevice') .then(() => { - return knex.schema.createTable('dependentDevice', t => { + return knex.schema.createTable('dependentDevice', (t) => { t.increments('id').primary(); t.string('uuid'); t.integer('appId'); @@ -270,7 +270,7 @@ exports.up = function(knex) { }); }) .then(() => { - return knex.schema.createTable('dependentDeviceTarget', t => { + return knex.schema.createTable('dependentDeviceTarget', (t) => { t.increments('id').primary(); t.string('uuid'); t.string('name'); @@ -278,7 +278,7 @@ exports.up = function(knex) { }); }) .then(() => { - return Bluebird.map(dependentDevices, device => { + return Bluebird.map(dependentDevices, (device) => { const newDevice = _.clone(device); newDevice.appId = parseInt(device.appId, 10); newDevice.deviceId = parseInt(device.deviceId, 10); @@ -316,6 +316,6 @@ exports.up = function(knex) { }); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not implemented')); }; diff --git a/src/migrations/20171214172530_image_docker_id.js b/src/migrations/20171214172530_image_docker_id.js index c81df939..385d921a 100644 --- a/src/migrations/20171214172530_image_docker_id.js +++ b/src/migrations/20171214172530_image_docker_id.js @@ -1,10 +1,10 @@ // Adds a dockerImageId column to the image table to identify images downloaded with deltas -exports.up = function(knex) { - return knex.schema.table('image', t => { +exports.up = function (knex) { + return knex.schema.table('image', (t) => { t.string('dockerImageId'); }); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not implemented')); }; diff --git a/src/migrations/20180516164000-endpoint-specific-apps.js b/src/migrations/20180516164000-endpoint-specific-apps.js index f03fe6cd..5cfa6022 100644 --- a/src/migrations/20180516164000-endpoint-specific-apps.js +++ b/src/migrations/20180516164000-endpoint-specific-apps.js @@ -1,8 +1,8 @@ const fs = require('fs'); const configJsonPath = process.env.CONFIG_MOUNT_POINT; -exports.up = function(knex) { - return new Promise(resolve => { +exports.up = function (knex) { + return new Promise((resolve) => { if (!configJsonPath) { console.log( 'Unable to locate config.json! Things may fail unexpectedly!', @@ -27,9 +27,9 @@ exports.up = function(knex) { resolve({}); } }); - }).then(config => { + }).then((config) => { return knex.schema - .table('app', t => { + .table('app', (t) => { // Create a new column on the table and add the apiEndpoint config json // field if it exists t.string('source'); @@ -40,6 +40,6 @@ exports.up = function(knex) { }); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not Implemented')); }; diff --git a/src/migrations/20181907164000-endpoint-specific-logschannel.js b/src/migrations/20181907164000-endpoint-specific-logschannel.js index 8bc2f2e5..6ee2cda9 100644 --- a/src/migrations/20181907164000-endpoint-specific-logschannel.js +++ b/src/migrations/20181907164000-endpoint-specific-logschannel.js @@ -2,8 +2,8 @@ const Bluebird = require('bluebird'); const fs = require('fs'); const configJsonPath = process.env.CONFIG_MOUNT_POINT; -exports.up = function(knex) { - return new Bluebird(resolve => { +exports.up = function (knex) { + return new Bluebird((resolve) => { if (!configJsonPath) { console.log( 'Unable to locate config.json! Things may fail unexpectedly!', @@ -33,20 +33,20 @@ exports.up = function(knex) { .tap(() => { // take the logsChannelSecret, and the apiEndpoint config field, // and store them in a new table - return knex.schema.hasTable('logsChannelSecret').then(exists => { + return knex.schema.hasTable('logsChannelSecret').then((exists) => { if (!exists) { - return knex.schema.createTable('logsChannelSecret', t => { + return knex.schema.createTable('logsChannelSecret', (t) => { t.string('backend'); t.string('secret'); }); } }); }) - .then(config => { + .then((config) => { return knex('config') .where({ key: 'logsChannelSecret' }) .select('value') - .then(results => { + .then((results) => { if (results.length === 0) { return { config, secret: null }; } @@ -60,12 +60,10 @@ exports.up = function(knex) { }); }) .then(() => { - return knex('config') - .where('key', 'logsChannelSecret') - .del(); + return knex('config').where('key', 'logsChannelSecret').del(); }); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not Implemented')); }; diff --git a/src/migrations/20190619152500-engine-snapshot.js b/src/migrations/20190619152500-engine-snapshot.js index 6c95ed3b..2a365f34 100644 --- a/src/migrations/20190619152500-engine-snapshot.js +++ b/src/migrations/20190619152500-engine-snapshot.js @@ -1,5 +1,5 @@ -exports.up = knex => { - return knex.schema.createTable('engineSnapshot', t => { +exports.up = (knex) => { + return knex.schema.createTable('engineSnapshot', (t) => { t.string('snapshot'); // Engine snapshot encoded as JSON. t.string('timestamp'); // When the snapshot was created. }); diff --git a/src/migrations/M00000.js b/src/migrations/M00000.js index 74756e97..aefa5d9a 100644 --- a/src/migrations/M00000.js +++ b/src/migrations/M00000.js @@ -3,10 +3,10 @@ const _ = require('lodash'); // We take legacy deviceConfig targets and store them without the RESIN_ prefix // (we also strip the BALENA_ prefix for completeness, even though no supervisors // using this prefix made it to production) -exports.up = function(knex) { +exports.up = function (knex) { return knex('deviceConfig') .select('targetValues') - .then(devConfigs => { + .then((devConfigs) => { const devConfig = devConfigs[0]; const targetValues = JSON.parse(devConfig.targetValues); const filteredTargetValues = _.mapKeys(targetValues, (_v, k) => { @@ -18,6 +18,6 @@ exports.up = function(knex) { }); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not Implemented')); }; diff --git a/src/migrations/M00001.js b/src/migrations/M00001.js index 449ab86f..5430c974 100644 --- a/src/migrations/M00001.js +++ b/src/migrations/M00001.js @@ -3,11 +3,11 @@ const configJsonPath = process.env.CONFIG_MOUNT_POINT; const { checkTruthy } = require('../lib/validation'); -exports.up = function(knex) { +exports.up = function (knex) { return knex('config') .where({ key: 'localMode' }) .select('value') - .then(results => { + .then((results) => { if (results.length === 0) { // We don't need to do anything return; @@ -16,7 +16,7 @@ exports.up = function(knex) { let value = checkTruthy(results[0].value); value = value != null ? value : false; - return new Promise(resolve => { + return new Promise((resolve) => { if (!configJsonPath) { console.log( 'Unable to locate config.json! Things may fail unexpectedly!', @@ -37,7 +37,7 @@ exports.up = function(knex) { // Assign the local mode value parsed.localMode = value; - fs.writeFile(configJsonPath, JSON.stringify(parsed), err2 => { + fs.writeFile(configJsonPath, JSON.stringify(parsed), (err2) => { if (err2) { console.log( 'Failed to write config.json! Things may fail unexpectedly!', @@ -54,13 +54,11 @@ exports.up = function(knex) { } }); }).then(() => { - return knex('config') - .where('key', 'localMode') - .del(); + return knex('config').where('key', 'localMode').del(); }); }); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not Implemented')); }; diff --git a/src/migrations/M00002.js b/src/migrations/M00002.js index 6af309bc..cf99e18c 100644 --- a/src/migrations/M00002.js +++ b/src/migrations/M00002.js @@ -3,8 +3,8 @@ const configJsonPath = process.env.CONFIG_MOUNT_POINT; const { checkTruthy } = require('../lib/validation'); -exports.up = function(knex) { - return new Promise(resolve => { +exports.up = function (knex) { + return new Promise((resolve) => { if (!configJsonPath) { console.log( 'Unable to locate config.json! Things may fail unexpectedly!', @@ -32,7 +32,7 @@ exports.up = function(knex) { return resolve(false); } }); - }).then(localMode => { + }).then((localMode) => { // We can be sure that this does not already exist in the db because of the previous // migration return knex('config').insert({ @@ -42,6 +42,6 @@ exports.up = function(knex) { }); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not Implemented')); }; diff --git a/src/migrations/M00003.js b/src/migrations/M00003.js index 02436946..628f6980 100644 --- a/src/migrations/M00003.js +++ b/src/migrations/M00003.js @@ -1,4 +1,4 @@ -exports.up = function(knex) { +exports.up = function (knex) { return knex('deviceConfig') .select('targetValues') .then(([target]) => { @@ -16,6 +16,6 @@ exports.up = function(knex) { }); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not Implemented')); }; diff --git a/src/migrations/M00004.js b/src/migrations/M00004.js index bfa3b8d8..c9db95b5 100644 --- a/src/migrations/M00004.js +++ b/src/migrations/M00004.js @@ -1,10 +1,10 @@ -exports.up = function(knex) { - return knex.schema.createTable('containerLogs', table => { +exports.up = function (knex) { + return knex.schema.createTable('containerLogs', (table) => { table.string('containerId'); table.integer('lastSentTimestamp'); }); }; -exports.down = function() { +exports.down = function () { return Promise.reject(new Error('Not Implemented')); }; diff --git a/src/network.ts b/src/network.ts index a468b302..24d6f983 100644 --- a/src/network.ts +++ b/src/network.ts @@ -89,7 +89,7 @@ export const startConnectivityCheck = _.once( path: parsedUrl.path || '/', interval: 10 * 1000, }, - connected => { + (connected) => { onChangeCallback?.(connected); if (connected) { log.info('Internet Connectivity: OK'); @@ -127,7 +127,7 @@ export function getIPAddresses(): string[] { // - custom docker network bridges (br- + 12 hex characters) return _(os.networkInterfaces()) .omitBy((_interfaceFields, interfaceName) => IP_REGEX.test(interfaceName)) - .flatMap(validInterfaces => { + .flatMap((validInterfaces) => { return _(validInterfaces) .pickBy({ family: 'IPv4' }) .map('address') @@ -144,11 +144,7 @@ export function startIPAddressUpdate(): ( return (cb, interval) => { const getAndReportIP = () => { const ips = getIPAddresses(); - if ( - !_(ips) - .xor(lastIPValues) - .isEmpty() - ) { + if (!_(ips).xor(lastIPValues).isEmpty()) { lastIPValues = ips; cb(ips); } diff --git a/src/proxyvisor.js b/src/proxyvisor.js index a554d99b..510544b3 100644 --- a/src/proxyvisor.js +++ b/src/proxyvisor.js @@ -20,7 +20,7 @@ const mkdirpAsync = Promise.promisify(mkdirp); const isDefined = _.negate(_.isUndefined); -const parseDeviceFields = function(device) { +const parseDeviceFields = function (device) { device.id = parseInt(device.deviceId, 10); device.appId = parseInt(device.appId, 10); device.config = JSON.parse(device.config ?? '{}'); @@ -30,7 +30,7 @@ const parseDeviceFields = function(device) { return _.omit(device, 'markedForDeletion', 'logs_channel'); }; -const tarDirectory = appId => `/data/dependent-assets/${appId}`; +const tarDirectory = (appId) => `/data/dependent-assets/${appId}`; const tarFilename = (appId, commit) => `${appId}-${commit}.tar`; @@ -46,7 +46,7 @@ const getTarArchive = (source, destination) => ), ); -const cleanupTars = function(appId, commit) { +const cleanupTars = function (appId, commit) { let fileToKeep; if (commit != null) { fileToKeep = tarFilename(appId, commit); @@ -57,29 +57,29 @@ const cleanupTars = function(appId, commit) { return fs .readdir(dir) .catch(() => []) - .then(function(files) { + .then(function (files) { if (fileToKeep != null) { files = _.reject(files, fileToKeep); } - return Promise.map(files, file => fs.unlink(path.join(dir, file))); + return Promise.map(files, (file) => fs.unlink(path.join(dir, file))); }); }; -const formatTargetAsState = device => ({ +const formatTargetAsState = (device) => ({ appId: parseInt(device.appId, 10), commit: device.targetCommit, environment: device.targetEnvironment, config: device.targetConfig, }); -const formatCurrentAsState = device => ({ +const formatCurrentAsState = (device) => ({ appId: parseInt(device.appId, 10), commit: device.commit, environment: device.environment, config: device.config, }); -const createProxyvisorRouter = function(proxyvisor) { +const createProxyvisorRouter = function (proxyvisor) { const { db } = proxyvisor; const router = express.Router(); router.use(bodyParser.urlencoded({ limit: '10mb', extended: true })); @@ -89,13 +89,13 @@ const createProxyvisorRouter = function(proxyvisor) { .models('dependentDevice') .select() .map(parseDeviceFields) - .then(devices => res.json(devices)) - .catch(err => + .then((devices) => res.json(devices)) + .catch((err) => res.status(503).send(err?.message || err || 'Unknown error'), ), ); - router.post('/v1/devices', function(req, res) { + router.post('/v1/devices', function (req, res) { let { appId, device_type } = req.body; if ( @@ -115,7 +115,7 @@ const createProxyvisorRouter = function(proxyvisor) { }; return proxyvisor.apiBinder .provisionDependentDevice(d) - .then(function(dev) { + .then(function (dev) { // If the response has id: null then something was wrong in the request // but we don't know precisely what. if (dev.id == null) { @@ -137,19 +137,19 @@ const createProxyvisorRouter = function(proxyvisor) { .insert(deviceForDB) .then(() => res.status(201).send(dev)); }) - .catch(function(err) { + .catch(function (err) { log.error(`Error on ${req.method} ${url.parse(req.url).pathname}`, err); return res.status(503).send(err?.message || err || 'Unknown error'); }); }); - router.get('/v1/devices/:uuid', function(req, res) { + router.get('/v1/devices/:uuid', function (req, res) { const { uuid } = req.params; return db .models('dependentDevice') .select() .where({ uuid }) - .then(function([device]) { + .then(function ([device]) { if (device == null) { return res.status(404).send('Device not found'); } @@ -158,13 +158,13 @@ const createProxyvisorRouter = function(proxyvisor) { } return res.json(parseDeviceFields(device)); }) - .catch(function(err) { + .catch(function (err) { log.error(`Error on ${req.method} ${url.parse(req.url).pathname}`, err); return res.status(503).send(err?.message || err || 'Unknown error'); }); }); - router.post('/v1/devices/:uuid/logs', function(req, res) { + router.post('/v1/devices/:uuid/logs', function (req, res) { const { uuid } = req.params; const m = { message: req.body.message, @@ -178,7 +178,7 @@ const createProxyvisorRouter = function(proxyvisor) { .models('dependentDevice') .select() .where({ uuid }) - .then(function([device]) { + .then(function ([device]) { if (device == null) { return res.status(404).send('Device not found'); } @@ -188,13 +188,13 @@ const createProxyvisorRouter = function(proxyvisor) { proxyvisor.logger.logDependent(m, uuid); return res.status(202).send('OK'); }) - .catch(function(err) { + .catch(function (err) { log.error(`Error on ${req.method} ${url.parse(req.url).pathname}`, err); return res.status(503).send(err?.message || err || 'Unknown error'); }); }); - router.put('/v1/devices/:uuid', function(req, res) { + router.put('/v1/devices/:uuid', function (req, res) { const { uuid } = req.params; let { status, @@ -204,7 +204,7 @@ const createProxyvisorRouter = function(proxyvisor) { environment, config, } = req.body; - const validateDeviceFields = function() { + const validateDeviceFields = function () { if (isDefined(is_online) && !_.isBoolean(is_online)) { return 'is_online must be a boolean'; } @@ -262,7 +262,7 @@ const createProxyvisorRouter = function(proxyvisor) { .models('dependentDevice') .select() .where({ uuid }) - .then(function([device]) { + .then(function ([device]) { if (device == null) { return res.status(404).send('Device not found'); } @@ -272,7 +272,7 @@ const createProxyvisorRouter = function(proxyvisor) { if (device.deviceId == null) { throw new Error('Device is invalid'); } - return Promise.try(function() { + return Promise.try(function () { if (!_.isEmpty(fieldsToUpdateOnAPI)) { return proxyvisor.apiBinder.patchDevice( device.deviceId, @@ -286,17 +286,12 @@ const createProxyvisorRouter = function(proxyvisor) { .update(fieldsToUpdateOnDB) .where({ uuid }), ) - .then(() => - db - .models('dependentDevice') - .select() - .where({ uuid }), - ) - .then(function([dbDevice]) { + .then(() => db.models('dependentDevice').select().where({ uuid })) + .then(function ([dbDevice]) { return res.json(parseDeviceFields(dbDevice)); }); }) - .catch(function(err) { + .catch(function (err) { log.error(`Error on ${req.method} ${url.parse(req.url).pathname}`, err); return res.status(503).send(err?.message || err || 'Unknown error'); }); @@ -307,7 +302,7 @@ const createProxyvisorRouter = function(proxyvisor) { .models('dependentApp') .select() .where(_.pick(req.params, 'appId', 'commit')) - .then(function([app]) { + .then(function ([app]) { if (!app) { return res.status(404).send('Not found'); } @@ -317,12 +312,12 @@ const createProxyvisorRouter = function(proxyvisor) { .catch(() => Promise.using( proxyvisor.docker.imageRootDirMounted(app.image), - rootDir => getTarArchive(rootDir + '/assets', dest), + (rootDir) => getTarArchive(rootDir + '/assets', dest), ), ) .then(() => res.sendFile(dest)); }) - .catch(function(err) { + .catch(function (err) { log.error(`Error on ${req.method} ${url.parse(req.url).pathname}`, err); return res.status(503).send(err?.message || err || 'Unknown error'); }), @@ -332,14 +327,14 @@ const createProxyvisorRouter = function(proxyvisor) { db .models('dependentApp') .select() - .map(app => ({ + .map((app) => ({ id: parseInt(app.appId, 10), commit: app.commit, name: app.name, config: JSON.parse(app.config ?? '{}'), })) - .then(apps => res.json(apps)) - .catch(function(err) { + .then((apps) => res.json(apps)) + .catch(function (err) { log.error(`Error on ${req.method} ${url.parse(req.url).pathname}`, err); return res.status(503).send(err?.message || err || 'Unknown error'); }), @@ -375,7 +370,7 @@ export class Proxyvisor { this.lastRequestForDevice = {}; this.router = createProxyvisorRouter(this); this.actionExecutors = { - updateDependentTargets: step => { + updateDependentTargets: (step) => { return this.config .getMany(['currentApiKey', 'apiTimeout']) .then(({ currentApiKey, apiTimeout }) => { @@ -383,12 +378,10 @@ export class Proxyvisor { // - if update returns 0, then use APIBinder to fetch the device, then store it to the db // - set markedForDeletion: true for devices that are not in the step.devices list // - update dependentApp with step.app - return Promise.map(step.devices, device => { + return Promise.map(step.devices, (device) => { const { uuid } = device; // Only consider one app per dependent device for now - const appId = _(device.apps) - .keys() - .head(); + const appId = _(device.apps).keys().head(); if (appId == null) { throw new Error( 'Could not find an app for the dependent device', @@ -409,7 +402,7 @@ export class Proxyvisor { name: device.name, }) .where({ uuid }) - .then(n => { + .then((n) => { if (n !== 0) { return; } @@ -417,7 +410,7 @@ export class Proxyvisor { // so we need to fetch it. return this.apiBinder .fetchDevice(uuid, currentApiKey, apiTimeout) - .then(dev => { + .then((dev) => { const deviceForDB = { uuid, appId, @@ -446,7 +439,7 @@ export class Proxyvisor { .then(() => { return this.normaliseDependentAppForDB(step.app); }) - .then(appForDB => { + .then((appForDB) => { return this.db.upsertModel('dependentApp', appForDB, { appId: step.appId, }); @@ -455,12 +448,12 @@ export class Proxyvisor { }); }, - sendDependentHooks: step => { + sendDependentHooks: (step) => { return Promise.join( this.config.get('apiTimeout'), this.getHookEndpoint(step.appId), (apiTimeout, endpoint) => { - return Promise.mapSeries(step.devices, device => { + return Promise.mapSeries(step.devices, (device) => { return Promise.try(() => { if (this.lastRequestForDevice[device.uuid] != null) { const diff = @@ -482,17 +475,15 @@ export class Proxyvisor { ); }, - removeDependentApp: step => { + removeDependentApp: (step) => { // find step.app and delete it from the DB // find devices with step.appId and delete them from the DB - return this.db.transaction(trx => + return this.db.transaction((trx) => trx('dependentApp') .where({ appId: step.appId }) .del() .then(() => - trx('dependentDevice') - .where({ appId: step.appId }) - .del(), + trx('dependentDevice').where({ appId: step.appId }).del(), ) .then(() => cleanupTars(step.appId)), ); @@ -522,8 +513,8 @@ export class Proxyvisor { this.normaliseDependentAppFromDB, ), this.db.models('dependentDevice').select(), - function(apps, devicesFromDB) { - const devices = _.map(devicesFromDB, function(device) { + function (apps, devicesFromDB) { + const devices = _.map(devicesFromDB, function (device) { const dev = { uuid: device.uuid, name: device.name, @@ -568,8 +559,8 @@ export class Proxyvisor { } normaliseDependentDeviceTargetForDB(device, appCommit) { - return Promise.try(function() { - const apps = _.mapValues(_.clone(device.apps ?? {}), function(app) { + return Promise.try(function () { + const apps = _.mapValues(_.clone(device.apps ?? {}), function (app) { app.commit = appCommit || null; if (app.config == null) { app.config = {}; @@ -591,14 +582,14 @@ export class Proxyvisor { setTargetInTransaction(dependent, trx) { return Promise.try(() => { if (dependent?.apps != null) { - const appsArray = _.map(dependent.apps, function(app, appId) { + const appsArray = _.map(dependent.apps, function (app, appId) { const appClone = _.clone(app); appClone.appId = checkInt(appId); return appClone; }); return Promise.map(appsArray, this.normaliseDependentAppForDB) - .tap(appsForDB => { - return Promise.map(appsForDB, app => { + .tap((appsForDB) => { + return Promise.map(appsForDB, (app) => { return this.db.upsertModel( 'dependentAppTarget', app, @@ -607,7 +598,7 @@ export class Proxyvisor { ); }); }) - .then(appsForDB => + .then((appsForDB) => trx('dependentAppTarget') .whereNotIn('appId', _.map(appsForDB, 'appId')) .del(), @@ -615,19 +606,19 @@ export class Proxyvisor { } }).then(() => { if (dependent?.devices != null) { - const devicesArray = _.map(dependent.devices, function(dev, uuid) { + const devicesArray = _.map(dependent.devices, function (dev, uuid) { const devClone = _.clone(dev); devClone.uuid = uuid; return devClone; }); - return Promise.map(devicesArray, device => { + return Promise.map(devicesArray, (device) => { const appId = _.keys(device.apps)[0]; return this.normaliseDependentDeviceTargetForDB( device, dependent.apps[appId]?.commit, ); - }).then(devicesForDB => { - return Promise.map(devicesForDB, device => { + }).then((devicesForDB) => { + return Promise.map(devicesForDB, (device) => { return this.db.upsertModel( 'dependentDeviceTarget', device, @@ -645,7 +636,7 @@ export class Proxyvisor { } normaliseDependentAppFromDB(app) { - return Promise.try(function() { + return Promise.try(function () { const outApp = { appId: app.appId, name: app.name, @@ -662,11 +653,11 @@ export class Proxyvisor { } normaliseDependentDeviceTargetFromDB(device) { - return Promise.try(function() { + return Promise.try(function () { const outDevice = { uuid: device.uuid, name: device.name, - apps: _.mapValues(JSON.parse(device.apps), function(a) { + apps: _.mapValues(JSON.parse(device.apps), function (a) { if (a.commit == null) { a.commit = null; } @@ -678,7 +669,7 @@ export class Proxyvisor { } normaliseDependentDeviceFromDB(device) { - return Promise.try(function() { + return Promise.try(function () { const outDevice = _.clone(device); for (const prop of [ 'environment', @@ -766,7 +757,7 @@ export class Proxyvisor { } _compareDevices(currentDevices, targetDevices, appId) { - let currentDeviceTargets = _.map(currentDevices, function(dev) { + let currentDeviceTargets = _.map(currentDevices, function (dev) { if (dev.markedForDeletion) { return null; } @@ -783,7 +774,7 @@ export class Proxyvisor { }); currentDeviceTargets = _.filter( currentDeviceTargets, - dev => !_.isNull(dev), + (dev) => !_.isNull(dev), ); return !_.isEmpty( _.xorWith(currentDeviceTargets, targetDevices, _.isEqual), @@ -819,7 +810,7 @@ export class Proxyvisor { ]; } - if (_.some(stepsInProgress, step => step.appId === target.parentApp)) { + if (_.some(stepsInProgress, (step) => step.appId === target.parentApp)) { return [{ action: 'noop' }]; } @@ -886,8 +877,8 @@ export class Proxyvisor { let steps = []; for (const appId of allAppIds) { - const devicesForApp = devices => - _.filter(devices, d => _.has(d.apps, appId)); + const devicesForApp = (devices) => + _.filter(devices, (d) => _.has(d.apps, appId)); const currentDevices = devicesForApp(current.dependent.devices); const targetDevices = devicesForApp(target.dependent.devices); @@ -915,13 +906,13 @@ export class Proxyvisor { .then(([{ parentApp }]) => { return this.applications.getTargetApp(parentApp); }) - .then(parentApp => { - return Promise.map(parentApp?.services ?? [], service => { + .then((parentApp) => { + return Promise.map(parentApp?.services ?? [], (service) => { return this.docker.getImageEnv(service.image); - }).then(function(imageEnvs) { + }).then(function (imageEnvs) { const imageHookAddresses = _.map( imageEnvs, - env => + (env) => env.BALENA_DEPENDENT_DEVICES_HOOK_ADDRESS ?? env.RESIN_DEPENDENT_DEVICES_HOOK_ADDRESS, ); @@ -941,7 +932,7 @@ export class Proxyvisor { sendUpdate(device, timeout, endpoint) { return Promise.resolve(request.getRequestInstance()) - .then(instance => + .then((instance) => instance.putAsync(`${endpoint}${device.uuid}`, { json: true, body: device.target, @@ -958,42 +949,36 @@ export class Proxyvisor { } } }) - .catch(err => log.error(`Error updating device ${device.uuid}`, err)); + .catch((err) => log.error(`Error updating device ${device.uuid}`, err)); } sendDeleteHook({ uuid }, timeout, endpoint) { return Promise.resolve(request.getRequestInstance()) - .then(instance => instance.delAsync(`${endpoint}${uuid}`)) + .then((instance) => instance.delAsync(`${endpoint}${uuid}`)) .timeout(timeout) .spread((response, body) => { if (response.statusCode === 200) { - return this.db - .models('dependentDevice') - .del() - .where({ uuid }); + return this.db.models('dependentDevice').del().where({ uuid }); } else { throw new Error(`Hook returned ${response.statusCode}: ${body}`); } }) - .catch(err => log.error(`Error deleting device ${uuid}`, err)); + .catch((err) => log.error(`Error deleting device ${uuid}`, err)); } sendUpdates({ uuid }) { return Promise.join( - this.db - .models('dependentDevice') - .where({ uuid }) - .select(), + this.db.models('dependentDevice').where({ uuid }).select(), this.config.get('apiTimeout'), ([dev], apiTimeout) => { if (dev == null) { log.warn(`Trying to send update to non-existent device ${uuid}`); return; } - return this.normaliseDependentDeviceFromDB(dev).then(device => { + return this.normaliseDependentDeviceFromDB(dev).then((device) => { const currentState = formatCurrentAsState(device); const targetState = formatTargetAsState(device); - return this.getHookEndpoint(device.appId).then(endpoint => { + return this.getHookEndpoint(device.appId).then((endpoint) => { if (device.markedForDeletion) { return this.sendDeleteHook(device, apiTimeout, endpoint); } else if ( diff --git a/src/supervisor-api.ts b/src/supervisor-api.ts index 1f56e719..99021628 100644 --- a/src/supervisor-api.ts +++ b/src/supervisor-api.ts @@ -71,7 +71,7 @@ const expressLogger = morgan( 'ms', ].join(' '), { - stream: { write: d => log.api(d.toString().trimRight()) }, + stream: { write: (d) => log.api(d.toString().trimRight()) }, }, ); @@ -119,7 +119,7 @@ export class SupervisorAPI { this.api.get('/v1/healthy', async (_req, res) => { try { - const healths = await Promise.all(this.healthchecks.map(fn => fn())); + const healths = await Promise.all(this.healthchecks.map((fn) => fn())); if (!_.every(healths)) { log.error('Healthcheck failed'); return res.status(500).send('Unhealthy'); @@ -194,7 +194,7 @@ export class SupervisorAPI { await this.applyRules(localMode || false, port, allowedInterfaces); // Monitor the switching of local mode, and change which interfaces will // be listened to based on that - this.config.on('change', changedConfig => { + this.config.on('change', (changedConfig) => { if (changedConfig.localMode != null) { this.applyRules( changedConfig.localMode || false, @@ -204,7 +204,7 @@ export class SupervisorAPI { } }); - return new Promise(resolve => { + return new Promise((resolve) => { this.server = this.api.listen(port, () => { log.info(`Supervisor API successfully started on port ${port}`); if (this.server) { diff --git a/src/target-state.ts b/src/target-state.ts index 38934410..ad5b923b 100644 --- a/src/target-state.ts +++ b/src/target-state.ts @@ -31,7 +31,7 @@ export class TargetStateAccessor { // If we switch backend, the target state also needs to // be invalidated (this includes switching to and from // local mode) - this.config.on('change', conf => { + this.config.on('change', (conf) => { if (conf.apiEndpoint != null || conf.localMode != null) { this.targetState = undefined; } @@ -45,7 +45,7 @@ export class TargetStateAccessor { await this.getTargetApps(); } - return _.find(this.targetState, app => app.appId === appId); + return _.find(this.targetState, (app) => app.appId === appId); } public async getTargetApps(): Promise { @@ -70,7 +70,7 @@ export class TargetStateAccessor { this.targetState = undefined; await Promise.all( - apps.map(app => + apps.map((app) => this.db.upsertModel('app', app, { appId: app.appId }, trx), ), ); diff --git a/test/01-constants.spec.ts b/test/01-constants.spec.ts index e076ef95..1d3783c0 100644 --- a/test/01-constants.spec.ts +++ b/test/01-constants.spec.ts @@ -5,7 +5,7 @@ const { expect } = ChaiConfig; import constants = require('../src/lib/constants'); -describe('constants', function() { +describe('constants', function () { before(() => prepare()); it('has the correct configJsonPathOnHost', () => expect(constants.configJsonPathOnHost).to.equal('/config.json')); diff --git a/test/02-db.spec.ts b/test/02-db.spec.ts index 26168f95..7ee8cd99 100644 --- a/test/02-db.spec.ts +++ b/test/02-db.spec.ts @@ -22,23 +22,25 @@ async function createOldDatabase(path: string) { name: string, fn: (trx: Knex.CreateTableBuilder) => void, ) => - knex.schema.createTable(name, t => { + knex.schema.createTable(name, (t) => { if (fn != null) { return fn(t); } }); - await createEmptyTable('app', t => { + await createEmptyTable('app', (t) => { t.increments('id').primary(); t.boolean('privileged'); return t.string('containerId'); }); - await createEmptyTable('config', t => { + await createEmptyTable('config', (t) => { t.string('key'); return t.string('value'); }); - await createEmptyTable('dependentApp', t => t.increments('id').primary()); - await createEmptyTable('dependentDevice', t => t.increments('id').primary()); + await createEmptyTable('dependentApp', (t) => t.increments('id').primary()); + await createEmptyTable('dependentDevice', (t) => + t.increments('id').primary(), + ); return knex; } @@ -103,6 +105,6 @@ describe('DB', () => { }); it('allows performing transactions', () => { - return db.transaction(trx => expect(trx.commit()).to.be.fulfilled); + return db.transaction((trx) => expect(trx.commit()).to.be.fulfilled); }); }); diff --git a/test/03-config.spec.ts b/test/03-config.spec.ts index 4ba1a5a5..1161617d 100644 --- a/test/03-config.spec.ts +++ b/test/03-config.spec.ts @@ -111,8 +111,8 @@ describe('Config', () => { expect(conf.get('unknownInvalidValue' as any)).to.be.rejected; }); - it('emits a change event when values are set', done => { - conf.on('change', val => { + it('emits a change event when values are set', (done) => { + conf.on('change', (val) => { expect(val).to.deep.equal({ name: 'someValue' }); return done(); }); diff --git a/test/04-service.spec.ts b/test/04-service.spec.ts index a7d509d0..cd708c1e 100644 --- a/test/04-service.spec.ts +++ b/test/04-service.spec.ts @@ -207,7 +207,7 @@ describe('compose/service', () => { }); }); - it('should correctly handle large port ranges', function() { + it('should correctly handle large port ranges', function () { this.timeout(60000); const s = Service.fromComposeObject( { diff --git a/test/05-device-state.spec.ts b/test/05-device-state.spec.ts index 65227aa3..1384144e 100644 --- a/test/05-device-state.spec.ts +++ b/test/05-device-state.spec.ts @@ -223,7 +223,7 @@ describe('deviceState', () => { track: console.log, }; - stub(Service as any, 'extendEnvVars').callsFake(env => { + stub(Service as any, 'extendEnvVars').callsFake((env) => { env['ADDITIONAL_ENV_VAR'] = 'foo'; return env; }); @@ -308,12 +308,8 @@ describe('deviceState', () => { (deviceState as any).deviceConfig.getCurrent.restore(); const pinned = await config.get('pinDevice'); - expect(pinned) - .to.have.property('app') - .that.equals(1234); - expect(pinned) - .to.have.property('commit') - .that.equals('abcdef'); + expect(pinned).to.have.property('app').that.equals(1234); + expect(pinned).to.have.property('commit').that.equals('abcdef'); }); it('emits a change event when a new state is reported', () => { @@ -349,7 +345,7 @@ describe('deviceState', () => { expect(deviceState.setTarget(testTargetInvalid as any)).to.be.rejected; }); - it('allows triggering applying the target state', done => { + it('allows triggering applying the target state', (done) => { stub(deviceState as any, 'applyTarget').returns(Promise.resolve()); deviceState.triggerApplyTarget({ force: true }); @@ -365,7 +361,7 @@ describe('deviceState', () => { }, 5); }); - it('cancels current promise applying the target state', done => { + it('cancels current promise applying the target state', (done) => { (deviceState as any).scheduledApply = { force: false, delay: 100 }; (deviceState as any).applyInProgress = true; (deviceState as any).applyCancelled = false; diff --git a/test/09-event-tracker.spec.ts b/test/09-event-tracker.spec.ts index 1fb15e69..31a38847 100644 --- a/test/09-event-tracker.spec.ts +++ b/test/09-event-tracker.spec.ts @@ -14,7 +14,7 @@ describe('EventTracker', () => { before(() => { initStub = stub(mixpanel, 'init').callsFake( - token => + (token) => (({ token, track: stub().returns(undefined), diff --git a/test/12-logger.spec.js b/test/12-logger.spec.js index 8ec7a162..341a61b6 100644 --- a/test/12-logger.spec.js +++ b/test/12-logger.spec.js @@ -7,14 +7,14 @@ import * as sinon from 'sinon'; import { Logger } from '../src/logger'; import { ContainerLogs } from '../src/logging/container'; -describe('Logger', function() { - beforeEach(function() { +describe('Logger', function () { + beforeEach(function () { this._req = new stream.PassThrough(); this._req.flushHeaders = sinon.spy(); this._req.end = sinon.spy(); this._req.body = ''; - this._req.pipe(zlib.createGunzip()).on('data', chunk => { + this._req.pipe(zlib.createGunzip()).on('data', (chunk) => { this._req.body += chunk; }); @@ -36,11 +36,11 @@ describe('Logger', function() { }); }); - afterEach(function() { + afterEach(function () { this.requestStub.restore(); }); - it('waits the grace period before sending any logs', function() { + it('waits the grace period before sending any logs', function () { const clock = sinon.useFakeTimers(); this.logger.log({ message: 'foobar', serviceId: 15 }); clock.tick(4999); @@ -51,7 +51,7 @@ describe('Logger', function() { }); }); - it('tears down the connection after inactivity', function() { + it('tears down the connection after inactivity', function () { const clock = sinon.useFakeTimers(); this.logger.log({ message: 'foobar', serviceId: 15 }); clock.tick(61000); @@ -62,7 +62,7 @@ describe('Logger', function() { }); }); - it('sends logs as gzipped ndjson', function() { + it('sends logs as gzipped ndjson', function () { const timestamp = Date.now(); this.logger.log({ message: 'foobar', serviceId: 15 }); this.logger.log({ timestamp: 1337, message: 'foobar', serviceId: 15 }); @@ -87,15 +87,9 @@ describe('Logger', function() { expect(lines[2]).to.equal(''); let msg = JSON.parse(lines[0]); - expect(msg) - .to.have.property('message') - .that.equals('foobar'); - expect(msg) - .to.have.property('serviceId') - .that.equals(15); - expect(msg) - .to.have.property('timestamp') - .that.is.at.least(timestamp); + expect(msg).to.have.property('message').that.equals('foobar'); + expect(msg).to.have.property('serviceId').that.equals(15); + expect(msg).to.have.property('timestamp').that.is.at.least(timestamp); msg = JSON.parse(lines[1]); expect(msg).to.deep.equal({ timestamp: 1337, @@ -105,7 +99,7 @@ describe('Logger', function() { }); }); - it('allows logging system messages which are also reported to the eventTracker', function() { + it('allows logging system messages which are also reported to the eventTracker', function () { const timestamp = Date.now(); this.logger.logSystemMessage( 'Hello there!', @@ -122,19 +116,13 @@ describe('Logger', function() { expect(lines[1]).to.equal(''); const msg = JSON.parse(lines[0]); - expect(msg) - .to.have.property('message') - .that.equals('Hello there!'); - expect(msg) - .to.have.property('isSystem') - .that.equals(true); - expect(msg) - .to.have.property('timestamp') - .that.is.at.least(timestamp); + expect(msg).to.have.property('message').that.equals('Hello there!'); + expect(msg).to.have.property('isSystem').that.equals(true); + expect(msg).to.have.property('timestamp').that.is.at.least(timestamp); }); }); - it('should support non-tty log lines', function() { + it('should support non-tty log lines', function () { const message = '\u0001\u0000\u0000\u0000\u0000\u0000\u0000?2018-09-21T12:37:09.819134000Z this is the message'; const buffer = Buffer.from(message); diff --git a/test/15-conversions.spec.js b/test/15-conversions.spec.js index 8387d600..97f70457 100644 --- a/test/15-conversions.spec.js +++ b/test/15-conversions.spec.js @@ -1,8 +1,8 @@ import { expect } from './lib/chai-config'; import * as conversion from '../src/lib/conversions'; -describe('conversions', function() { - describe('envArrayToObject', function() { +describe('conversions', function () { + describe('envArrayToObject', function () { it('should convert an env array to an object', () => expect( conversion.envArrayToObject([ @@ -29,7 +29,7 @@ describe('conversions', function() { key1: 'value1', })); - it('should return an empty object with an empty input', function() { + it('should return an empty object with an empty input', function () { // @ts-ignore passing invalid value to test expect(conversion.envArrayToObject(null)).to.deep.equal({}); // @ts-ignore passing invalid value to test diff --git a/test/16-ports.spec.ts b/test/16-ports.spec.ts index 1f100fc8..696666a7 100644 --- a/test/16-ports.spec.ts +++ b/test/16-ports.spec.ts @@ -6,9 +6,9 @@ const PortMapPublic = (PortMap as any) as new ( portStrOrObj: string | PortRange, ) => PortMap; -describe('Ports', function() { - describe('Port string parsing', function() { - it('should correctly parse a port string without a range', function() { +describe('Ports', function () { + describe('Port string parsing', function () { + it('should correctly parse a port string without a range', function () { expect(new PortMapPublic('80')).to.deep.equal( new PortMapPublic({ internalStart: 80, @@ -56,7 +56,7 @@ describe('Ports', function() { }), )); - it('should correctly parse a protocol', function() { + it('should correctly parse a protocol', function () { expect(new PortMapPublic('80/udp')).to.deep.equal( new PortMapPublic({ internalStart: 80, @@ -95,7 +95,7 @@ describe('Ports', function() { expect(() => new PortMapPublic('80-90:80-85')).to.throw); }); - describe('toDockerOpts', function() { + describe('toDockerOpts', function () { it('should correctly generate docker options', () => expect(new PortMapPublic('80').toDockerOpts()).to.deep.equal({ exposedPorts: { @@ -127,7 +127,7 @@ describe('Ports', function() { })); }); - describe('fromDockerOpts', function() { + describe('fromDockerOpts', function () { it('should correctly detect a port range', () => expect( PortMap.fromDockerOpts({ @@ -297,7 +297,7 @@ describe('Ports', function() { }); describe('Running container comparison', () => - it('should not consider order when comparing current and target state', function() { + it('should not consider order when comparing current and target state', function () { const portBindings = require('./data/ports/not-ascending/port-bindings.json'); const compose = require('./data/ports/not-ascending/compose.json'); const portMapsCurrent = PortMap.fromDockerOpts(portBindings); @@ -312,8 +312,8 @@ describe('Ports', function() { PortMap.fromComposePorts(['80:80', '81:81', '82:82']), ).to.deep.equal([new PortMapPublic('80-82')]))); - describe('normalisePortMaps', function() { - it('should correctly normalise PortMap lists', function() { + describe('normalisePortMaps', function () { + it('should correctly normalise PortMap lists', function () { expect( PortMap.normalisePortMaps([ new PortMapPublic('80:90'), @@ -340,7 +340,7 @@ describe('Ports', function() { expect(PortMap.normalisePortMaps([])).to.deep.equal([]); }); - it('should correctly consider protocols', function() { + it('should correctly consider protocols', function () { expect( PortMap.normalisePortMaps([ new PortMapPublic('80:90'), @@ -376,7 +376,7 @@ describe('Ports', function() { ]); }); - it('should correctly consider hosts', function() { + it('should correctly consider hosts', function () { expect( PortMap.normalisePortMaps([ new PortMapPublic('127.0.0.1:80:80'), diff --git a/test/17-config-utils.spec.js b/test/17-config-utils.spec.js index 9eb8a39a..cfbaa9f9 100644 --- a/test/17-config-utils.spec.js +++ b/test/17-config-utils.spec.js @@ -8,9 +8,9 @@ const extlinuxBackend = new ExtlinuxConfigBackend(); const rpiBackend = new RPiConfigBackend(); describe('Config Utilities', () => - describe('Boot config utilities', function() { + describe('Boot config utilities', function () { describe('Env <-> Config', () => - it('correctly transforms environments to boot config objects', function() { + it('correctly transforms environments to boot config objects', function () { const bootConfig = configUtils.envToBootConfig(rpiBackend, { HOST_CONFIG_initramfs: 'initramf.gz 0x00800000', HOST_CONFIG_dtparam: '"i2c=on","audio=on"', @@ -26,8 +26,8 @@ describe('Config Utilities', () => }); })); - describe('TX2 boot config utilities', function() { - it('should parse a extlinux.conf file', function() { + describe('TX2 boot config utilities', function () { + it('should parse a extlinux.conf file', function () { const text = `\ DEFAULT primary # Comment @@ -45,9 +45,7 @@ APPEND \${cbootargs} \${resin_kernel_root} ro rootwait\ expect(parsed.globals) .to.have.property('DEFAULT') .that.equals('primary'); - expect(parsed.globals) - .to.have.property('TIMEOUT') - .that.equals('30'); + expect(parsed.globals).to.have.property('TIMEOUT').that.equals('30'); expect(parsed.globals) .to.have.property('MENU TITLE') .that.equals('Boot Options'); @@ -57,15 +55,13 @@ APPEND \${cbootargs} \${resin_kernel_root} ro rootwait\ expect(primary) .to.have.property('MENU LABEL') .that.equals('primary Image'); - expect(primary) - .to.have.property('LINUX') - .that.equals('/Image'); + expect(primary).to.have.property('LINUX').that.equals('/Image'); expect(primary) .to.have.property('APPEND') .that.equals('${cbootargs} ${resin_kernel_root} ro rootwait'); }); - it('should parse multiple service entries', function() { + it('should parse multiple service entries', function () { const text = `\ DEFAULT primary # Comment @@ -82,21 +78,17 @@ APPEND test4\ // @ts-ignore accessing private method const parsed = ExtlinuxConfigBackend.parseExtlinuxFile(text); - expect(parsed.labels) - .to.have.property('primary') - .that.deep.equals({ - LINUX: 'test1', - APPEND: 'test2', - }); - expect(parsed.labels) - .to.have.property('secondary') - .that.deep.equals({ - LINUX: 'test3', - APPEND: 'test4', - }); + expect(parsed.labels).to.have.property('primary').that.deep.equals({ + LINUX: 'test1', + APPEND: 'test2', + }); + expect(parsed.labels).to.have.property('secondary').that.deep.equals({ + LINUX: 'test3', + APPEND: 'test4', + }); }); - it('should parse configuration options from an extlinux.conf file', function() { + it('should parse configuration options from an extlinux.conf file', function () { let text = `\ DEFAULT primary # Comment @@ -112,9 +104,7 @@ APPEND \${cbootargs} \${resin_kernel_root} ro rootwait isolcpus=3\ let readFileStub = stub(fs, 'readFile').resolves(text); let parsed = extlinuxBackend.getBootConfig(); - expect(parsed) - .to.eventually.have.property('isolcpus') - .that.equals('3'); + expect(parsed).to.eventually.have.property('isolcpus').that.equals('3'); readFileStub.restore(); text = `\ diff --git a/test/18-compose-network.js b/test/18-compose-network.js index 29123f50..23c912d9 100644 --- a/test/18-compose-network.js +++ b/test/18-compose-network.js @@ -1,9 +1,9 @@ import { expect } from './lib/chai-config'; import { Network } from '../src/compose/network'; -describe('compose/network', function() { - describe('compose config -> internal config', function() { - it('should convert a compose configuration to an internal representation', function() { +describe('compose/network', function () { + describe('compose config -> internal config', function () { + it('should convert a compose configuration to an internal representation', function () { const network = Network.fromComposeObject( 'test', 123, @@ -42,7 +42,7 @@ describe('compose/network', function() { }); }); - it('should handle an incomplete ipam configuration', function() { + it('should handle an incomplete ipam configuration', function () { const network = Network.fromComposeObject( 'test', 123, @@ -81,7 +81,7 @@ describe('compose/network', function() { }); describe('internal config -> docker config', () => - it('should convert an internal representation to a docker representation', function() { + it('should convert an internal representation to a docker representation', function () { const network = Network.fromComposeObject( 'test', 123, diff --git a/test/19-compose-utils.js b/test/19-compose-utils.js index b3cd5316..2e41d675 100644 --- a/test/19-compose-utils.js +++ b/test/19-compose-utils.js @@ -2,7 +2,7 @@ import { expect } from './lib/chai-config'; import * as ComposeUtils from '../src/compose/utils'; describe('Composition utilities', () => - it('Should correctly camel case the configuration', function() { + it('Should correctly camel case the configuration', function () { const config = { networks: ['test', 'test2'], }; diff --git a/test/20-compose-volume.ts b/test/20-compose-volume.ts index fb7a64fe..9e1baed8 100644 --- a/test/20-compose-volume.ts +++ b/test/20-compose-volume.ts @@ -28,12 +28,8 @@ describe('Compose volumes', () => { Scope: 'local', }); - expect(volume) - .to.have.property('appId') - .that.equals(1032480); - expect(volume) - .to.have.property('name') - .that.equals('one_volume'); + expect(volume).to.have.property('appId').that.equals(1032480); + expect(volume).to.have.property('name').that.equals('one_volume'); expect(volume) .to.have.property('config') .that.has.property('labels') @@ -65,12 +61,8 @@ describe('Compose volumes', () => { opts, ); - expect(volume) - .to.have.property('appId') - .that.equals(1032480); - expect(volume) - .to.have.property('name') - .that.equals('one_volume'); + expect(volume).to.have.property('appId').that.equals(1032480); + expect(volume).to.have.property('name').that.equals('one_volume'); expect(volume) .to.have.property('config') .that.has.property('labels') @@ -106,12 +98,8 @@ describe('Compose volumes', () => { opts, ); - expect(volume) - .to.have.property('appId') - .that.equals(1032480); - expect(volume) - .to.have.property('name') - .that.equals('one_volume'); + expect(volume).to.have.property('appId').that.equals(1032480); + expect(volume).to.have.property('name').that.equals('one_volume'); expect(volume) .to.have.property('config') .that.has.property('labels') diff --git a/test/21-supervisor-api.spec.ts b/test/21-supervisor-api.spec.ts index d11942e2..fa5ce52a 100644 --- a/test/21-supervisor-api.spec.ts +++ b/test/21-supervisor-api.spec.ts @@ -44,10 +44,7 @@ describe('SupervisorAPI', () => { describe('/ping', () => { it('responds with OK (without auth)', async () => { - await request - .get('/ping') - .set('Accept', 'application/json') - .expect(200); + await request.get('/ping').set('Accept', 'application/json').expect(200); }); it('responds with OK (with auth)', async () => { await request @@ -71,7 +68,7 @@ describe('SupervisorAPI', () => { .set('Authorization', `Bearer ${VALID_SECRET}`) .expect('Content-Type', /json/) .expect(sampleResponses.V2.GET['/device/vpn'].statusCode) - .then(response => { + .then((response) => { expect(response.body).to.deep.equal( sampleResponses.V2.GET['/device/vpn'].body, ); diff --git a/test/23-local-mode.ts b/test/23-local-mode.ts index 488cc13f..174ab591 100644 --- a/test/23-local-mode.ts +++ b/test/23-local-mode.ts @@ -27,7 +27,7 @@ describe('LocalModeManager', () => { .models('engineSnapshot') .count('* as cnt') .first() - .then(r => r.cnt); + .then((r) => r.cnt); // Cleanup the database (to make sure nothing is left since last tests). beforeEach(async () => { @@ -235,7 +235,7 @@ describe('LocalModeManager', () => { await localMode.handleLocalModeStateChange(false); - removeStubs.forEach(s => expect(s.remove.calledTwice).to.be.true); + removeStubs.forEach((s) => expect(s.remove.calledTwice).to.be.true); }); it('keeps objects from the previous snapshot on local mode exit', async () => { @@ -255,7 +255,7 @@ describe('LocalModeManager', () => { .true; expect(dockerStub.getVolume.calledWithExactly('volume-2')).to.be.true; expect(dockerStub.getNetwork.calledWithExactly('network-2')).to.be.true; - removeStubs.forEach(s => expect(s.remove.calledOnce).to.be.true); + removeStubs.forEach((s) => expect(s.remove.calledOnce).to.be.true); }); it('logs but consumes cleanup errors on local mode exit', async () => { @@ -267,7 +267,7 @@ describe('LocalModeManager', () => { await localMode.handleLocalModeStateChange(false); // Even though remove method throws, we still attempt all removals. - removeStubs.forEach(s => expect(s.remove.calledTwice).to.be.true); + removeStubs.forEach((s) => expect(s.remove.calledTwice).to.be.true); }); it('skips cleanup without previous snapshot on local mode exit', async () => { @@ -279,7 +279,7 @@ describe('LocalModeManager', () => { expect(dockerStub.getContainer.notCalled).to.be.true; expect(dockerStub.getVolume.notCalled).to.be.true; expect(dockerStub.getNetwork.notCalled).to.be.true; - removeStubs.forEach(s => expect(s.remove.notCalled).to.be.true); + removeStubs.forEach((s) => expect(s.remove.notCalled).to.be.true); }); it('can be awaited', async () => { @@ -292,7 +292,7 @@ describe('LocalModeManager', () => { // Await like it's done by DeviceState. await localMode.switchCompletion(); - removeStubs.forEach(s => expect(s.remove.calledTwice).to.be.true); + removeStubs.forEach((s) => expect(s.remove.calledTwice).to.be.true); }); it('cleans the last snapshot so that nothing is done on restart', async () => { @@ -312,7 +312,7 @@ describe('LocalModeManager', () => { expect(dockerStub.getContainer.callCount).to.be.equal(3); // +1 for supervisor inspect call. expect(dockerStub.getVolume.callCount).to.be.equal(2); expect(dockerStub.getNetwork.callCount).to.be.equal(2); - removeStubs.forEach(s => expect(s.remove.callCount).to.be.equal(2)); + removeStubs.forEach((s) => expect(s.remove.callCount).to.be.equal(2)); }); it('skips cleanup in case of data corruption', async () => { @@ -330,7 +330,7 @@ describe('LocalModeManager', () => { expect(dockerStub.getContainer.notCalled).to.be.true; expect(dockerStub.getVolume.notCalled).to.be.true; expect(dockerStub.getNetwork.notCalled).to.be.true; - removeStubs.forEach(s => expect(s.remove.notCalled).to.be.true); + removeStubs.forEach((s) => expect(s.remove.notCalled).to.be.true); }); describe('with supervisor being updated', () => { @@ -362,7 +362,7 @@ describe('LocalModeManager', () => { // Current engine objects include 2 entities of each type. // Container-1, network-1, image-1, and volume-1 are resources associated with currently running supervisor. // Only xxx-2 objects must be deleted. - removeStubs.forEach(s => expect(s.remove.calledOnce).to.be.true); + removeStubs.forEach((s) => expect(s.remove.calledOnce).to.be.true); }); }); }); diff --git a/test/24-contracts.ts b/test/24-contracts.ts index 20fa8f01..592ef439 100644 --- a/test/24-contracts.ts +++ b/test/24-contracts.ts @@ -82,10 +82,12 @@ describe('Container contracts', () => { // package.json will, we generate values which are above // and below the current value, and use these to reason // about the contract engine results - const supervisorVersionGreater = `${semver.major(supervisorVersion)! + - 1}.0.0`; - const supervisorVersionLesser = `${semver.major(supervisorVersion)! - - 1}.0.0`; + const supervisorVersionGreater = `${ + semver.major(supervisorVersion)! + 1 + }.0.0`; + const supervisorVersionLesser = `${ + semver.major(supervisorVersion)! - 1 + }.0.0`; before(async () => { // We ensure that the versions we're using for testing @@ -275,9 +277,7 @@ describe('Container contracts', () => { optional: false, }, }); - expect(fulfilled) - .to.have.property('valid') - .that.equals(false); + expect(fulfilled).to.have.property('valid').that.equals(false); expect(fulfilled) .to.have.property('unmetServices') .that.deep.equals(['service']); @@ -298,9 +298,7 @@ describe('Container contracts', () => { optional: false, }, }); - expect(fulfilled) - .to.have.property('valid') - .that.equals(false); + expect(fulfilled).to.have.property('valid').that.equals(false); expect(fulfilled) .to.have.property('unmetServices') .that.deep.equals(['service2']); @@ -335,9 +333,7 @@ describe('Container contracts', () => { optional: false, }, }); - expect(fulfilled) - .to.have.property('valid') - .that.equals(false); + expect(fulfilled).to.have.property('valid').that.equals(false); expect(fulfilled) .to.have.property('unmetServices') .that.deep.equals(['service2']); diff --git a/test/26-journald.spec.ts b/test/26-journald.spec.ts index 0d9b6ed8..b7f356f2 100644 --- a/test/26-journald.spec.ts +++ b/test/26-journald.spec.ts @@ -6,12 +6,12 @@ import { expect } from './lib/chai-config'; describe('journald', () => { let spawn: SinonStub; - beforeEach(done => { + beforeEach((done) => { spawn = stub(require('child_process'), 'spawn'); done(); }); - afterEach(done => { + afterEach((done) => { spawn.restore(); done(); }); @@ -50,7 +50,7 @@ describe('journald', () => { expect(actualCommand).deep.equal(expectedCommand); expect(actualCoreArgs).deep.equal(expectedCoreArgs); - expectedOptionalArgs.forEach(arg => { + expectedOptionalArgs.forEach((arg) => { expect(actualOptionalArgs).to.include(arg); }); }); diff --git a/test/lib/mocked-balena-api.ts b/test/lib/mocked-balena-api.ts index cc6c170d..d46986f3 100644 --- a/test/lib/mocked-balena-api.ts +++ b/test/lib/mocked-balena-api.ts @@ -40,7 +40,7 @@ api.balenaBackend = { : null; if (uuid != null) { return res.json({ - d: _.filter(api.balenaBackend!.devices, dev => dev.uuid === uuid), + d: _.filter(api.balenaBackend!.devices, (dev) => dev.uuid === uuid), }); } else { return res.json({ d: [] }); diff --git a/test/lib/prepare.ts b/test/lib/prepare.ts index 9a0f61c1..05aedab3 100644 --- a/test/lib/prepare.ts +++ b/test/lib/prepare.ts @@ -7,7 +7,7 @@ */ import * as fs from 'fs'; -export = function() { +export = function () { try { fs.unlinkSync(process.env.DATABASE_PATH!); } catch (e) {