diff --git a/package-lock.json b/package-lock.json index 6c1873df..d57a6892 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.0.0-6", "license": "Apache-2.0", "devDependencies": { - "@cordova/eslint-config": "^3.0.0" + "@cordova/eslint-config": "^4.0.0" }, "engines": { "cordovaDependencies": { @@ -20,15 +20,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "dependencies": { - "@babel/highlight": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" + "@babel/highlight": "^7.10.4" } }, "node_modules/@babel/helper-validator-identifier": { @@ -54,23 +51,133 @@ "node": ">=6.9.0" } }, - "node_modules/@cordova/eslint-config": { + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@cordova/eslint-config/-/eslint-config-3.0.0.tgz", - "integrity": "sha512-YOZn/G5foKFzZc8R/oBM+BLG6vHufOmZiJtiZHNxifsrqzORwyjq1EiUSvQ6s0bm6Ydh3zwwyuGVbYyDBil67w==", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "eslint": "^6.8.0", - "eslint-config-standard": "^14.1.1", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.1" + "has-flag": "^3.0.0" }, "engines": { - "node": ">= 10.13.0" + "node": ">=4" } }, + "node_modules/@cordova/eslint-config": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@cordova/eslint-config/-/eslint-config-4.0.0.tgz", + "integrity": "sha512-LllpB2UbdM3QcZGc9vNr/LAT3PyqdX9uoeIHIdAE5dT/+Kkc6tbh4IlhCDScs8fFpVi3iRow154NzM++pItmpQ==", + "dev": true, + "dependencies": { + "eslint": "^7.32.0", + "eslint-config-standard": "^16.0.3", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.1" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -114,52 +221,37 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", "dev": true, - "dependencies": { - "type-fest": "^0.21.3" - }, "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=6" } }, "node_modules/ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/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==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/argparse": { @@ -208,12 +300,12 @@ } }, "node_modules/astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/balanced-match": { @@ -255,59 +347,37 @@ } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" - } - }, - "node_modules/chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, - "node_modules/cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", - "dev": true, - "dependencies": { - "restore-cursor": "^3.1.0" + "node": ">=10" }, - "engines": { - "node": ">=8" - } - }, - "node_modules/cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true, - "engines": { - "node": ">= 10" + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "node_modules/concat-map": { @@ -317,28 +387,17 @@ "dev": true }, "node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" }, "engines": { - "node": ">=4.8" - } - }, - "node_modules/cross-spawn/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" + "node": ">= 8" } }, "node_modules/debug": { @@ -394,6 +453,18 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/es-abstract": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", @@ -446,55 +517,61 @@ } }, "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "engines": { - "node": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -502,23 +579,36 @@ "eslint": "bin/eslint.js" }, "engines": { - "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + "node": "^10.12.0 || >=12.0.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/eslint-config-standard": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz", - "integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", + "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], "peerDependencies": { - "eslint": ">=6.2.2", - "eslint-plugin-import": ">=2.18.0", - "eslint-plugin-node": ">=9.1.0", - "eslint-plugin-promise": ">=4.2.1", - "eslint-plugin-standard": ">=4.0.0" + "eslint": "^7.12.1", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^4.2.1 || ^5.0.0" } }, "node_modules/eslint-import-resolver-node": { @@ -581,33 +671,6 @@ "eslint": ">=4.19.1" } }, - "node_modules/eslint-plugin-es/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, - "node_modules/eslint-plugin-es/node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/eslint-plugin-import": { "version": "2.25.4", "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz", @@ -682,21 +745,6 @@ "eslint": ">=5.16.0" } }, - "node_modules/eslint-plugin-node/node_modules/eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "dependencies": { - "eslint-visitor-keys": "^1.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/eslint-plugin-node/node_modules/ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", @@ -706,36 +754,25 @@ "node": ">= 4" } }, - "node_modules/eslint-plugin-promise": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz", - "integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==", + "node_modules/eslint-plugin-node/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", "dev": true, - "engines": { - "node": ">=6" + "bin": { + "semver": "bin/semver.js" } }, - "node_modules/eslint-plugin-standard": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz", - "integrity": "sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ==", + "node_modules/eslint-plugin-promise": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.2.0.tgz", + "integrity": "sha512-SftLb1pUG01QYq2A/hGAWfDRXqYD82zE7j7TopDOyNdU+7SvvoXREls/+PRTY17vUXzXnZA/zfnyKgRH6x4JJw==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, "peerDependencies": { - "eslint": ">=5.0.0" + "eslint": "^7.0.0" } }, "node_modules/eslint-scope": { @@ -752,18 +789,21 @@ } }, "node_modules/eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "dependencies": { "eslint-visitor-keys": "^1.1.0" }, "engines": { "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" } }, - "node_modules/eslint-visitor-keys": { + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", @@ -772,18 +812,36 @@ "node": ">=4" } }, + "node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "dependencies": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" }, "engines": { - "node": ">=6.0.0" + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" } }, "node_modules/esprima": { @@ -859,20 +917,6 @@ "node": ">=0.10.0" } }, - "node_modules/external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "dependencies": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -891,31 +935,16 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "node_modules/figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "dependencies": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/find-up": { @@ -931,23 +960,22 @@ } }, "node_modules/flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "dependencies": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "engines": { - "node": ">=4" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, "node_modules/fs.realpath": { @@ -1031,12 +1059,12 @@ } }, "node_modules/globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "dependencies": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" }, "engines": { "node": ">=8" @@ -1067,12 +1095,12 @@ } }, "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/has-symbols": { @@ -1102,18 +1130,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -1164,121 +1180,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "node_modules/inquirer": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", - "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", - "dev": true, - "dependencies": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/inquirer/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/inquirer/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/inquirer/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/inquirer/node_modules/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, - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/inquirer/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -1534,13 +1435,13 @@ } }, "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -1559,19 +1460,28 @@ "node": ">=4" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { - "node": ">=6" + "node": ">=10" } }, "node_modules/minimatch": { @@ -1587,47 +1497,23 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, - "node_modules/mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, "node_modules/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 }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "node_modules/object-inspect": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", @@ -1683,54 +1569,30 @@ }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" } }, "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" }, "engines": { "node": ">= 0.8.0" } }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -1795,12 +1657,12 @@ } }, "node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/path-parse": { @@ -1810,9 +1672,9 @@ "dev": true }, "node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { "node": ">= 0.8.0" @@ -1837,12 +1699,24 @@ } }, "node_modules/regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, "engines": { - "node": ">=6.5.0" + "node": ">=0.10.0" } }, "node_modules/resolve": { @@ -1871,86 +1745,55 @@ "node": ">=4" } }, - "node_modules/restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "dependencies": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "dependencies": { "glob": "^7.1.3" }, "bin": { "rimraf": "bin.js" - } - }, - "node_modules/run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", - "dev": true, - "dependencies": { - "tslib": "^1.9.0" }, - "engines": { - "npm": ">=2.0.0" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, "node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "dependencies": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" }, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=8" } }, "node_modules/side-channel": { @@ -1967,33 +1810,21 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/signal-exit": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", - "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", - "dev": true - }, "node_modules/slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "dependencies": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "engines": { - "node": ">=6" - } - }, - "node_modules/slice-ansi/node_modules/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, - "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, "node_modules/sprintf-js": { @@ -2016,27 +1847,6 @@ "node": ">=8" } }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/string.prototype.trimend": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", @@ -2064,15 +1874,15 @@ } }, "node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "dependencies": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=6" + "node": ">=8" } }, "node_modules/strip-bom": { @@ -2097,15 +1907,15 @@ } }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -2121,73 +1931,49 @@ } }, "node_modules/table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", + "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", "dev": true, "dependencies": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/table/node_modules/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 - }, - "node_modules/table/node_modules/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, - "engines": { - "node": ">=4" + "node": ">=10.0.0" } }, - "node_modules/table/node_modules/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==", + "node_modules/table/node_modules/ajv": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", + "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", "dev": true, "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" }, - "engines": { - "node": ">=6" + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "node_modules/through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "node_modules/tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "dependencies": { - "os-tmpdir": "~1.0.2" - }, - "engines": { - "node": ">=0.6.0" - } - }, "node_modules/tsconfig-paths": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", @@ -2200,31 +1986,28 @@ "strip-bom": "^3.0.0" } }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "dependencies": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/unbox-primitive": { @@ -2258,15 +2041,18 @@ "dev": true }, "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "dependencies": { "isexe": "^2.0.0" }, "bin": { - "which": "bin/which" + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" } }, "node_modules/which-boxed-primitive": { @@ -2300,27 +2086,21 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "node_modules/write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "dependencies": { - "mkdirp": "^0.5.1" - }, - "engines": { - "node": ">=4" - } + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } }, "dependencies": { "@babel/code-frame": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", - "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dev": true, "requires": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.10.4" } }, "@babel/helper-validator-identifier": { @@ -2338,22 +2118,113 @@ "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@cordova/eslint-config": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@cordova/eslint-config/-/eslint-config-3.0.0.tgz", - "integrity": "sha512-YOZn/G5foKFzZc8R/oBM+BLG6vHufOmZiJtiZHNxifsrqzORwyjq1EiUSvQ6s0bm6Ydh3zwwyuGVbYyDBil67w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@cordova/eslint-config/-/eslint-config-4.0.0.tgz", + "integrity": "sha512-LllpB2UbdM3QcZGc9vNr/LAT3PyqdX9uoeIHIdAE5dT/+Kkc6tbh4IlhCDScs8fFpVi3iRow154NzM++pItmpQ==", + "dev": true, + "requires": { + "eslint": "^7.32.0", + "eslint-config-standard": "^16.0.3", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-promise": "^5.1.1" + } + }, + "@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", "dev": true, "requires": { - "eslint": "^6.8.0", - "eslint-config-standard": "^14.1.1", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-node": "^11.0.0", - "eslint-plugin-promise": "^4.2.1", - "eslint-plugin-standard": "^4.0.1" + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" } }, + "@humanwhocodes/object-schema": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true + }, "@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -2385,36 +2256,25 @@ "uri-js": "^4.2.2" } }, - "ansi-escapes": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", - "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", - "dev": true, - "requires": { - "type-fest": "^0.21.3" - }, - "dependencies": { - "type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "dev": true - } - } + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true }, "ansi-regex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", - "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, "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==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" } }, "argparse": { @@ -2451,9 +2311,9 @@ } }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "balanced-match": { @@ -2477,62 +2337,40 @@ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "restore-cursor": "^3.1.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true - }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, "requires": { - "color-name": "1.1.3" + "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, "concat-map": { @@ -2542,24 +2380,14 @@ "dev": true }, "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "dependencies": { - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - } + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" } }, "debug": { @@ -2601,6 +2429,15 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "es-abstract": { "version": "1.19.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", @@ -2641,60 +2478,63 @@ } }, "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, "eslint": { - "version": "6.8.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", - "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^1.4.3", - "eslint-visitor-keys": "^1.1.0", - "espree": "^6.1.2", - "esquery": "^1.0.1", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^7.0.0", "is-glob": "^4.0.0", "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.14", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", - "optionator": "^0.8.3", + "optionator": "^0.9.1", "progress": "^2.0.0", - "regexpp": "^2.0.1", - "semver": "^6.1.2", - "strip-ansi": "^5.2.0", - "strip-json-comments": "^3.0.1", - "table": "^5.2.3", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" } }, "eslint-config-standard": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.1.tgz", - "integrity": "sha512-Z9B+VR+JIXRxz21udPTL9HpFMyoMUEeX1G251EQ6e05WD9aPVtVBn09XUmZ259wCMlCDmYDSZG62Hhm+ZTJcUg==", + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-16.0.3.tgz", + "integrity": "sha512-x4fmJL5hGqNJKGHSjnLdgA6U6h1YW/G2dW9fA+cyVur4SK6lyue8+UgNKWlZtUDTXvgKDD/Oa3GQjmB5kjtVvg==", "dev": true, "requires": {} }, @@ -2748,23 +2588,6 @@ "requires": { "eslint-utils": "^2.0.0", "regexpp": "^3.0.0" - }, - "dependencies": { - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true - } } }, "eslint-plugin-import": { @@ -2828,33 +2651,24 @@ "semver": "^6.1.0" }, "dependencies": { - "eslint-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", - "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", - "dev": true, - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, "eslint-plugin-promise": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.3.1.tgz", - "integrity": "sha512-bY2sGqyptzFBDLh/GMbAxfdJC+b0f23ME63FOE4+Jao0oZ3E1LEwFtWJX/1pGMJLiTtrSSern2CRM/g+dfc0eQ==", - "dev": true - }, - "eslint-plugin-standard": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.1.0.tgz", - "integrity": "sha512-ZL7+QRixjTR6/528YNGyDotyffm5OQst/sGxKDwGb9Uqs4In5Egi4+jbobhqJoyoCM6/7v/1A5fhQ7ScMtDjaQ==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-5.2.0.tgz", + "integrity": "sha512-SftLb1pUG01QYq2A/hGAWfDRXqYD82zE7j7TopDOyNdU+7SvvoXREls/+PRTY17vUXzXnZA/zfnyKgRH6x4JJw==", "dev": true, "requires": {} }, @@ -2869,29 +2683,45 @@ } }, "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", "dev": true, "requires": { "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true }, "espree": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", - "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { - "acorn": "^7.1.1", - "acorn-jsx": "^5.2.0", - "eslint-visitor-keys": "^1.1.0" + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } } }, "esprima": { @@ -2946,17 +2776,6 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -2975,22 +2794,13 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "figures": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", - "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "find-up": { @@ -3003,20 +2813,19 @@ } }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" } }, "flatted": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", - "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.4.tgz", + "integrity": "sha512-8/sOawo8tJ4QOBX8YlQBMxL8+RLZfxMQOif9o0KUKTNTjMYElWPE0r/m5VNFxTRd0NSw8qSy8dajrwX4RYI1Hw==", "dev": true }, "fs.realpath": { @@ -3082,12 +2891,12 @@ } }, "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "version": "13.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz", + "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "type-fest": "^0.20.2" } }, "has": { @@ -3106,9 +2915,9 @@ "dev": true }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, "has-symbols": { @@ -3126,15 +2935,6 @@ "has-symbols": "^1.0.2" } }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", @@ -3173,93 +2973,6 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "inquirer": { - "version": "7.3.3", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", - "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.19", - "mute-stream": "0.0.8", - "run-async": "^2.4.0", - "rxjs": "^6.6.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "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 - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, "internal-slot": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", @@ -3437,13 +3150,13 @@ } }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, "locate-path": { @@ -3456,18 +3169,27 @@ "path-exists": "^3.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true }, - "mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", "dev": true }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -3478,44 +3200,23 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, "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 }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, "object-inspect": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", @@ -3560,35 +3261,20 @@ "wrappy": "1" } }, - "onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } - }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "dev": true, "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" } }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", - "dev": true - }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -3635,9 +3321,9 @@ "dev": true }, "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, "path-parse": { @@ -3647,9 +3333,9 @@ "dev": true }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, "progress": { @@ -3665,9 +3351,15 @@ "dev": true }, "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true }, "resolve": { @@ -3687,65 +3379,37 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, - "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", - "dev": true, - "requires": { - "onetime": "^5.1.0", - "signal-exit": "^3.0.2" - } - }, "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { "glob": "^7.1.3" } }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true - }, - "rxjs": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", - "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", "dev": true, "requires": { - "tslib": "^1.9.0" + "lru-cache": "^6.0.0" } }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "shebang-regex": "^3.0.0" } }, "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, "side-channel": { @@ -3759,29 +3423,15 @@ "object-inspect": "^1.9.0" } }, - "signal-exit": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", - "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==", - "dev": true - }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" - }, - "dependencies": { - "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 - } + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" } }, "sprintf-js": { @@ -3799,23 +3449,6 @@ "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.1" - } - } } }, "string.prototype.trimend": { @@ -3839,12 +3472,12 @@ } }, "strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, "requires": { - "ansi-regex": "^4.1.0" + "ansi-regex": "^5.0.1" } }, "strip-bom": { @@ -3860,12 +3493,12 @@ "dev": true }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" } }, "supports-preserve-symlinks-flag": { @@ -3875,39 +3508,35 @@ "dev": true }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.0.tgz", + "integrity": "sha512-s/fitrbVeEyHKFa7mFdkuQMWlH1Wgw/yEXMt5xACT4ZpzWFluehAxRtUUQKPuWhaLAWhFcVx6w3oC8VKaUfPGA==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^8.0.1", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1" }, "dependencies": { - "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==", + "ajv": { + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", + "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true } } }, @@ -3917,21 +3546,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "tsconfig-paths": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", @@ -3944,25 +3558,19 @@ "strip-bom": "^3.0.0" } }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, "unbox-primitive": { @@ -3993,9 +3601,9 @@ "dev": true }, "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, "requires": { "isexe": "^2.0.0" @@ -4026,14 +3634,11 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } } diff --git a/package.json b/package.json index f4693f58..6e759e1a 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,6 @@ } }, "devDependencies": { - "@cordova/eslint-config": "^3.0.0" + "@cordova/eslint-config": "^4.0.0" } } diff --git a/plugin.xml b/plugin.xml index 463ee772..049c4cb0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -29,7 +29,7 @@ https://github.com/ns0m/cordova-plugin-ns0m-file-transfer https://github.com/ns0m/cordova-plugin-ns0m-file-transfer/issues - + diff --git a/src/windows/FileTransferProxy.js b/src/windows/FileTransferProxy.js index 316779ff..c3aeab8f 100644 --- a/src/windows/FileTransferProxy.js +++ b/src/windows/FileTransferProxy.js @@ -21,22 +21,22 @@ /* global Windows, WinJS */ -var FTErr = require('./FileTransferError'); -var ProgressEvent = require('cordova-plugin-file.ProgressEvent'); -var FileUploadResult = require('cordova-plugin-file.FileUploadResult'); -var FileProxy = require('cordova-plugin-file.FileProxy'); +const FTErr = require('./FileTransferError'); +const ProgressEvent = require('cordova-plugin-file.ProgressEvent'); +const FileUploadResult = require('cordova-plugin-file.FileUploadResult'); +const FileProxy = require('cordova-plugin-file.FileProxy'); -var appData = Windows.Storage.ApplicationData.current; +const appData = Windows.Storage.ApplicationData.current; -var LINE_START = '--'; -var LINE_END = '\r\n'; -var BOUNDARY = '+++++'; +const LINE_START = '--'; +const LINE_END = '\r\n'; +const BOUNDARY = '+++++'; -var fileTransferOps = []; +const fileTransferOps = []; // Some private helper functions, hidden by the module function cordovaPathToNative (path) { - var cleanPath = String(path); + let cleanPath = String(path); // turn / into \\ cleanPath = cleanPath.replace(/\//g, '\\'); // turn \\ into \ @@ -51,7 +51,7 @@ function nativePathToCordova (path) { } function alreadyCancelled (opId) { - var op = fileTransferOps[opId]; + const op = fileTransferOps[opId]; return op && op.state === FileTransferOperation.CANCELLED; } @@ -62,21 +62,21 @@ function doUpload (upload, uploadId, filePath, server, successCallback, errorCal } // update internal TransferOperation object with newly created promise - var uploadOperation = upload.startAsync(); + const uploadOperation = upload.startAsync(); fileTransferOps[uploadId].promise = uploadOperation; uploadOperation.then( function (result) { // Update TransferOperation object with new state, delete promise property // since it is not actual anymore - var currentUploadOp = fileTransferOps[uploadId]; + const currentUploadOp = fileTransferOps[uploadId]; if (currentUploadOp) { currentUploadOp.state = FileTransferOperation.DONE; currentUploadOp.promise = null; } - var response = result.getResponseInformation(); - var ftResult = new FileUploadResult(result.progress.bytesSent, response.statusCode, ''); + const response = result.getResponseInformation(); + const ftResult = new FileUploadResult(result.progress.bytesSent, response.statusCode, ''); // if server's response doesn't contain any data, then resolve operation now if (result.progress.bytesReceived === 0) { @@ -85,7 +85,7 @@ function doUpload (upload, uploadId, filePath, server, successCallback, errorCal } // otherwise create a data reader, attached to response stream to get server's response - var reader = new Windows.Storage.Streams.DataReader(result.getResultStreamAt(0)); + const reader = new Windows.Storage.Streams.DataReader(result.getResultStreamAt(0)); reader.loadAsync(result.progress.bytesReceived).then(function (size) { ftResult.response = reader.readString(size); successCallback(ftResult); @@ -93,23 +93,23 @@ function doUpload (upload, uploadId, filePath, server, successCallback, errorCal }); }, function (error) { - var source = nativePathToCordova(filePath); + const source = nativePathToCordova(filePath); // Handle download error here. // Wrap this routines into promise due to some async methods - var getTransferError = new WinJS.Promise(function (resolve) { + const getTransferError = new WinJS.Promise(function (resolve) { if (error.message === 'Canceled') { // If download was cancelled, message property will be specified resolve(new FTErr(FTErr.ABORT_ERR, source, server, null, null, error)); } else { // in the other way, try to get response property - var response = upload.getResponseInformation(); + const response = upload.getResponseInformation(); if (!response) { resolve(new FTErr(FTErr.CONNECTION_ERR, source, server)); } else { - var reader = new Windows.Storage.Streams.DataReader(upload.getResultStreamAt(0)); + const reader = new Windows.Storage.Streams.DataReader(upload.getResultStreamAt(0)); reader.loadAsync(upload.progress.bytesReceived).then(function (size) { - var responseText = reader.readString(size); + const responseText = reader.readString(size); resolve(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, server, response.statusCode, responseText, error)); reader.close(); }); @@ -119,7 +119,7 @@ function doUpload (upload, uploadId, filePath, server, successCallback, errorCal // Update TransferOperation object with new state, delete promise property // since it is not actual anymore - var currentUploadOp = fileTransferOps[uploadId]; + const currentUploadOp = fileTransferOps[uploadId]; if (currentUploadOp) { currentUploadOp.state = FileTransferOperation.CANCELLED; currentUploadOp.promise = null; @@ -131,7 +131,7 @@ function doUpload (upload, uploadId, filePath, server, successCallback, errorCal }); }, function (evt) { - var progressEvent = new ProgressEvent('progress', { + const progressEvent = new ProgressEvent('progress', { loaded: evt.progress.bytesSent, total: evt.progress.totalBytesToSend, target: evt.resultFile @@ -151,7 +151,7 @@ FileTransferOperation.PENDING = 0; FileTransferOperation.DONE = 1; FileTransferOperation.CANCELLED = 2; -var HTTP_E_STATUS_NOT_MODIFIED = -2145844944; +const HTTP_E_STATUS_NOT_MODIFIED = -2145844944; module.exports = { /* @@ -159,24 +159,24 @@ exec(win, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id, httpMethod]); */ upload: function (successCallback, errorCallback, options) { - var filePath = options[0]; - var server = options[1]; - var fileKey = options[2] || 'source'; - var fileName = options[3]; - var mimeType = options[4]; - var params = options[5]; + let filePath = options[0]; + const server = options[1]; + const fileKey = options[2] || 'source'; + let fileName = options[3]; + let mimeType = options[4]; + const params = options[5]; // var trustAllHosts = options[6]; // todo // var chunkedMode = options[7]; // todo - var headers = options[8] || {}; - var uploadId = options[9]; - var httpMethod = options[10]; + const headers = options[8] || {}; + const uploadId = options[9]; + const httpMethod = options[10]; - var isMultipart = typeof headers['Content-Type'] === 'undefined'; + const isMultipart = typeof headers['Content-Type'] === 'undefined'; function stringToByteArray (str) { - var byteCharacters = atob(str); - var byteNumbers = new Array(byteCharacters.length); - for (var i = 0; i < byteCharacters.length; i++) { + const byteCharacters = atob(str); + const byteNumbers = new Array(byteCharacters.length); + for (let i = 0; i < byteCharacters.length; i++) { byteNumbers[i] = byteCharacters.charCodeAt(i); } return new Uint8Array(byteNumbers); @@ -190,11 +190,11 @@ exec(win, fail, 'FileTransfer', 'upload', if (filePath.indexOf('data:') === 0 && filePath.indexOf('base64') !== -1) { // First a DataWriter object is created, backed by an in-memory stream where // the data will be stored. - var writer = Windows.Storage.Streams.DataWriter(new Windows.Storage.Streams.InMemoryRandomAccessStream()); + const writer = Windows.Storage.Streams.DataWriter(new Windows.Storage.Streams.InMemoryRandomAccessStream()); writer.unicodeEncoding = Windows.Storage.Streams.UnicodeEncoding.utf8; writer.byteOrder = Windows.Storage.Streams.ByteOrder.littleEndian; - var commaIndex = filePath.indexOf(','); + const commaIndex = filePath.indexOf(','); if (commaIndex === -1) { errorCallback(new FTErr(FTErr.INVALID_URL_ERR, fileName, server, null, null, 'No comma in data: URI')); return; @@ -203,12 +203,12 @@ exec(win, fail, 'FileTransfer', 'upload', // Create internal download operation object fileTransferOps[uploadId] = new FileTransferOperation(FileTransferOperation.PENDING, null); - var fileDataString = filePath.substr(commaIndex + 1); + const fileDataString = filePath.substr(commaIndex + 1); // setting request headers for uploader - var uploader = new Windows.Networking.BackgroundTransfer.BackgroundUploader(); + const uploader = new Windows.Networking.BackgroundTransfer.BackgroundUploader(); uploader.method = httpMethod; - for (var header in headers) { + for (const header in headers) { if (Object.prototype.hasOwnProperty.call(headers, header)) { uploader.setRequestHeader(header, headers[header]); } @@ -216,8 +216,8 @@ exec(win, fail, 'FileTransfer', 'upload', if (isMultipart) { // adding params supplied to request payload - var multipartParams = ''; - for (var key in params) { + let multipartParams = ''; + for (const key in params) { if (Object.prototype.hasOwnProperty.call(params, key)) { multipartParams += LINE_START + BOUNDARY + LINE_END; multipartParams += 'Content-Disposition: form-data; name="' + key + '"'; @@ -227,12 +227,12 @@ exec(win, fail, 'FileTransfer', 'upload', } } - var multipartFile = LINE_START + BOUNDARY + LINE_END; + let multipartFile = LINE_START + BOUNDARY + LINE_END; multipartFile += 'Content-Disposition: form-data; name="file";'; multipartFile += ' filename="' + fileName + '"' + LINE_END; multipartFile += 'Content-Type: ' + mimeType + LINE_END + LINE_END; - var bound = LINE_END + LINE_START + BOUNDARY + LINE_START + LINE_END; + const bound = LINE_END + LINE_START + BOUNDARY + LINE_START + LINE_END; uploader.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + BOUNDARY); writer.writeString(multipartParams); @@ -243,7 +243,7 @@ exec(win, fail, 'FileTransfer', 'upload', writer.writeBytes(stringToByteArray(fileDataString)); } - var stream; + let stream; // The call to store async sends the actual contents of the writer // to the backing stream. @@ -279,9 +279,9 @@ exec(win, fail, 'FileTransfer', 'upload', } // create download object. This will throw an exception if URL is malformed - var uri = new Windows.Foundation.Uri(server); + const uri = new Windows.Foundation.Uri(server); - var createUploadOperation; + let createUploadOperation; try { createUploadOperation = uploader.createUploadFromStreamAsync(uri, stream); } catch (e) { @@ -294,7 +294,7 @@ exec(win, fail, 'FileTransfer', 'upload', doUpload(upload, uploadId, filePath, server, successCallback, errorCallback); }, function (err) { - var errorObj = new FTErr(FTErr.INVALID_URL_ERR); + const errorObj = new FTErr(FTErr.INVALID_URL_ERR); errorObj.exception = err; errorCallback(errorObj); } @@ -340,23 +340,23 @@ exec(win, fail, 'FileTransfer', 'upload', } // setting request headers for uploader - var uploader = new Windows.Networking.BackgroundTransfer.BackgroundUploader(); + const uploader = new Windows.Networking.BackgroundTransfer.BackgroundUploader(); uploader.method = httpMethod; - for (var header in headers) { + for (const header in headers) { if (Object.prototype.hasOwnProperty.call(headers, header)) { uploader.setRequestHeader(header, headers[header]); } } // create download object. This will throw an exception if URL is malformed - var uri = new Windows.Foundation.Uri(server); + const uri = new Windows.Foundation.Uri(server); - var createUploadOperation; + let createUploadOperation; try { if (isMultipart) { // adding params supplied to request payload - var transferParts = []; - for (var key in params) { + const transferParts = []; + for (const key in params) { // Create content part for params only if value is specified because CreateUploadAsync fails otherwise if ( Object.prototype.hasOwnProperty.call(params, key) && @@ -364,7 +364,7 @@ exec(win, fail, 'FileTransfer', 'upload', params[key] !== undefined && params[key].toString() !== '' ) { - var contentPart = new Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart(); + const contentPart = new Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart(); contentPart.setHeader('Content-Disposition', 'form-data; name="' + key + '"'); contentPart.setText(params[key]); transferParts.push(contentPart); @@ -372,7 +372,7 @@ exec(win, fail, 'FileTransfer', 'upload', } // Adding file to upload to request payload - var fileToUploadPart = new Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart(fileKey, fileName); + const fileToUploadPart = new Windows.Networking.BackgroundTransfer.BackgroundTransferContentPart(fileKey, fileName); fileToUploadPart.setHeader('Content-Type', mimeType); fileToUploadPart.setFile(storageFile); transferParts.push(fileToUploadPart); @@ -391,7 +391,7 @@ exec(win, fail, 'FileTransfer', 'upload', doUpload(upload, uploadId, filePath, server, successCallback, errorCallback); }, function (err) { - var errorObj = new FTErr(FTErr.INVALID_URL_ERR); + const errorObj = new FTErr(FTErr.INVALID_URL_ERR); errorObj.exception = err; errorCallback(errorObj); } @@ -405,10 +405,10 @@ exec(win, fail, 'FileTransfer', 'upload', // [source, target, trustAllHosts, id, headers] download: function (successCallback, errorCallback, options) { - var source = options[0]; - var target = options[1]; - var downloadId = options[3]; - var headers = options[4] || {}; + const source = options[0]; + let target = options[1]; + const downloadId = options[3]; + const headers = options[4] || {}; if (!target) { errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR)); @@ -428,22 +428,22 @@ exec(win, fail, 'FileTransfer', 'upload', } target = cordovaPathToNative(target); - var path = target.substr(0, target.lastIndexOf('\\')); - var fileName = target.substr(target.lastIndexOf('\\') + 1); + const path = target.substr(0, target.lastIndexOf('\\')); + const fileName = target.substr(target.lastIndexOf('\\') + 1); if (path === null || fileName === null) { errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR)); return; } // Download to a temp file to avoid the file deletion on 304 // CB-7006 Empty file is created on file transfer if server response is 304 - var tempFileName = '~' + fileName; + const tempFileName = '~' + fileName; - var download = null; + let download = null; // Create internal download operation object fileTransferOps[downloadId] = new FileTransferOperation(FileTransferOperation.PENDING, null); - var downloadCallback = function (storageFolder) { + const downloadCallback = function (storageFolder) { storageFolder.createFileAsync(tempFileName, Windows.Storage.CreationCollisionOption.replaceExisting).then( function (storageFile) { if (alreadyCancelled(downloadId)) { @@ -452,8 +452,8 @@ exec(win, fail, 'FileTransfer', 'upload', } // if download isn't cancelled, contunue with creating and preparing download operation - var downloader = new Windows.Networking.BackgroundTransfer.BackgroundDownloader(); - for (var header in headers) { + const downloader = new Windows.Networking.BackgroundTransfer.BackgroundDownloader(); + for (const header in headers) { if (Object.prototype.hasOwnProperty.call(headers, header)) { downloader.setRequestHeader(header, headers[header]); } @@ -461,7 +461,7 @@ exec(win, fail, 'FileTransfer', 'upload', // create download object. This will throw an exception if URL is malformed try { - var uri = Windows.Foundation.Uri(source); + const uri = Windows.Foundation.Uri(source); download = downloader.createDownload(uri, storageFile); } catch (e) { // so we handle this and call errorCallback @@ -469,7 +469,7 @@ exec(win, fail, 'FileTransfer', 'upload', return; } - var downloadOperation = download.startAsync(); + const downloadOperation = download.startAsync(); // update internal TransferOperation object with newly created promise fileTransferOps[downloadId].promise = downloadOperation; @@ -477,7 +477,7 @@ exec(win, fail, 'FileTransfer', 'upload', function () { // Update TransferOperation object with new state, delete promise property // since it is not actual anymore - var currentDownloadOp = fileTransferOps[downloadId]; + const currentDownloadOp = fileTransferOps[downloadId]; if (currentDownloadOp) { currentDownloadOp.state = FileTransferOperation.DONE; currentDownloadOp.promise = null; @@ -485,7 +485,7 @@ exec(win, fail, 'FileTransfer', 'upload', storageFile.renameAsync(fileName, Windows.Storage.CreationCollisionOption.replaceExisting).done( function () { - var nativeURI = storageFile.path + const nativeURI = storageFile.path .replace(appData.localFolder.path, 'ms-appdata:///local') .replace(appData.temporaryFolder.path, 'ms-appdata:///temp') .replace(/\\/g, '/'); @@ -500,7 +500,7 @@ exec(win, fail, 'FileTransfer', 'upload', ); }, function (error) { - var getTransferError = new WinJS.Promise(function (resolve) { + const getTransferError = new WinJS.Promise(function (resolve) { // Handle download error here. If download was cancelled, // message property will be specified if (error.message === 'Canceled') { @@ -509,7 +509,7 @@ exec(win, fail, 'FileTransfer', 'upload', resolve(new FTErr(FTErr.NOT_MODIFIED_ERR, source, target, 304, null, error)); } else { // in the other way, try to get response property - var response = download.getResponseInformation(); + const response = download.getResponseInformation(); if (!response) { resolve(new FTErr(FTErr.CONNECTION_ERR, source, target)); } else { @@ -517,9 +517,9 @@ exec(win, fail, 'FileTransfer', 'upload', resolve(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, target, response.statusCode, null, error)); return; } - var reader = new Windows.Storage.Streams.DataReader(download.getResultStreamAt(0)); + const reader = new Windows.Storage.Streams.DataReader(download.getResultStreamAt(0)); reader.loadAsync(download.progress.bytesReceived).then(function (bytesLoaded) { - var payload = reader.readString(bytesLoaded); + const payload = reader.readString(bytesLoaded); resolve( new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, target, response.statusCode, payload, error) ); @@ -530,7 +530,7 @@ exec(win, fail, 'FileTransfer', 'upload', getTransferError.then(function (fileTransferError) { // Update TransferOperation object with new state, delete promise property // since it is not actual anymore - var currentDownloadOp = fileTransferOps[downloadId]; + const currentDownloadOp = fileTransferOps[downloadId]; if (currentDownloadOp) { currentDownloadOp.state = FileTransferOperation.CANCELLED; currentDownloadOp.promise = null; @@ -543,7 +543,7 @@ exec(win, fail, 'FileTransfer', 'upload', }); }, function (evt) { - var progressEvent = new ProgressEvent('progress', { + const progressEvent = new ProgressEvent('progress', { loaded: evt.progress.bytesReceived, total: evt.progress.totalBytesToReceive, target: evt.resultFile @@ -562,15 +562,15 @@ exec(win, fail, 'FileTransfer', 'upload', ); }; - var fileNotFoundErrorCallback = function (error) { + const fileNotFoundErrorCallback = function (error) { errorCallback(new FTErr(FTErr.FILE_NOT_FOUND_ERR, source, target, null, null, error)); }; Windows.Storage.StorageFolder.getFolderFromPathAsync(path).then(downloadCallback, function (error) { // Handle non-existent directory if (error.number === -2147024894) { - var parent = path.substr(0, path.lastIndexOf('\\')); - var folderNameToCreate = path.substr(path.lastIndexOf('\\') + 1); + const parent = path.substr(0, path.lastIndexOf('\\')); + const folderNameToCreate = path.substr(path.lastIndexOf('\\') + 1); Windows.Storage.StorageFolder.getFolderFromPathAsync(parent).then(function (parentFolder) { parentFolder.createFolderAsync(folderNameToCreate).then(downloadCallback, fileNotFoundErrorCallback); @@ -582,10 +582,10 @@ exec(win, fail, 'FileTransfer', 'upload', }, abort: function (successCallback, error, options) { - var fileTransferOpId = options[0]; + const fileTransferOpId = options[0]; // Try to find transferOperation with id specified, and cancel its' promise - var currentOp = fileTransferOps[fileTransferOpId]; + const currentOp = fileTransferOps[fileTransferOpId]; if (currentOp) { currentOp.state = FileTransferOperation.CANCELLED; currentOp.promise && currentOp.promise.cancel(); diff --git a/tests/hooks/after_prepare.js b/tests/hooks/after_prepare.js index 7c5b34ca..95df808d 100644 --- a/tests/hooks/after_prepare.js +++ b/tests/hooks/after_prepare.js @@ -21,13 +21,13 @@ * */ -var path = require('path'); -var fs = require('fs'); +const path = require('path'); +const fs = require('fs'); module.exports = function (context) { function main () { // get the file transfer server address from the specified variables - var fileTransferServerAddress = getFileTransferServerAddress(context) || getDefaultFileTransferServerAddress(context); + const fileTransferServerAddress = getFileTransferServerAddress(context) || getDefaultFileTransferServerAddress(context); console.log('Tests will use the following file transfer server address: ' + fileTransferServerAddress); console.log( 'If you\'re using cordova@6.3.1 and the above address is wrong at "platform add", don\'t worry, it\'ll fix itself on "cordova run" or "cordova prepare".' @@ -38,10 +38,10 @@ module.exports = function (context) { } function getDefaultFileTransferServerAddress (context) { - var address = null; - var configNodes = context.opts.plugin.pluginInfo._et._root._children; + let address = null; + const configNodes = context.opts.plugin.pluginInfo._et._root._children; - for (var node in configNodes) { + for (const node in configNodes) { if (configNodes[node].attrib.name === 'FILETRANSFER_SERVER_ADDRESS') { address = configNodes[node].attrib.default; } @@ -51,13 +51,13 @@ module.exports = function (context) { } function getFileTransferServerAddress (context) { - var platformJsonFile = path.join( + const platformJsonFile = path.join( context.opts.projectRoot, 'platforms', context.opts.platforms[0], context.opts.platforms[0] + '.json' ); - var platformJson = JSON.parse(fs.readFileSync(platformJsonFile, 'utf8')); + const platformJson = JSON.parse(fs.readFileSync(platformJsonFile, 'utf8')); if ( platformJson && @@ -72,12 +72,12 @@ module.exports = function (context) { } function writeFileTransferOptions (address, context) { - for (var p in context.opts.paths) { - var ftOpts = { + for (const p in context.opts.paths) { + const ftOpts = { serverAddress: address }; - var ftOptsString = JSON.stringify(ftOpts); - var ftOptsFile = path.join(context.opts.paths[p], 'fileTransferOpts.json'); + const ftOptsString = JSON.stringify(ftOpts); + const ftOptsFile = path.join(context.opts.paths[p], 'fileTransferOpts.json'); fs.writeFileSync(ftOptsFile, ftOptsString, 'utf8'); } } diff --git a/tests/server/index.js b/tests/server/index.js index 02c6617d..9c6e6bf9 100644 --- a/tests/server/index.js +++ b/tests/server/index.js @@ -1,7 +1,7 @@ const http = require('http'); const stringify = require('json-stringify-safe'); const Busboy = require('busboy'); -var { Iconv } = require('iconv'); +const { Iconv } = require('iconv'); const port = process.env.PORT || 5000; const DIRECT_UPLOAD_LIMIT = 85; // bytes @@ -18,7 +18,7 @@ function parseMultipartForm (req, res, finishCb) { const busboy = new Busboy({ headers: req.headers }); busboy.on('file', function (fieldname, file, filename, encoding, mimetype) { - var currentFile = { size: 0 }; + const currentFile = { size: 0 }; file.on('data', function (data) { currentFile.name = filename; @@ -62,7 +62,7 @@ function respondWithParsedForm (req, res, parseResultObj) { function respondWithParsedFormNonUTF (req, res, parseResultObj) { parseResultObj.latin1Symbols = LATIN1_SYMBOLS; - var buffer = iconv.convert(stringify(parseResultObj)); + const buffer = iconv.convert(stringify(parseResultObj)); res.writeHead(200, { 'Content-Type': 'application/json' }); res.write(buffer); res.end('\n'); @@ -111,7 +111,7 @@ http.createServer(function (req, res) { parseMultipartForm(req, res, respondWithParsedForm); } else { console.log('direct upload'); - var body = ''; + let body = ''; req.on('data', function (chunk) { body += chunk; if (body.length > DIRECT_UPLOAD_LIMIT) { diff --git a/tests/server/package-lock.json b/tests/server/package-lock.json index 286b690b..adf105d5 100644 --- a/tests/server/package-lock.json +++ b/tests/server/package-lock.json @@ -906,9 +906,9 @@ } }, "i": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/i/-/i-0.3.6.tgz", - "integrity": "sha1-2WyScyB28HJxG2sQ/X1PZa2O4j0=" + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/i/-/i-0.3.7.tgz", + "integrity": "sha512-FYz4wlXgkQwIPqhzC5TdNMLSE5+GS1IIDJZY/1ZiEPCT2S3COUVZeT5OW4BmW4r5LHLQuOosSwsvnroG9GR59Q==" }, "iconv": { "version": "3.0.0", diff --git a/tests/tests.js b/tests/tests.js index 3c225f26..e917ae30 100644 --- a/tests/tests.js +++ b/tests/tests.js @@ -25,21 +25,21 @@ exports.defineAutoTests = function () { 'use strict'; // constants - var ONE_SECOND = 1000; // in milliseconds - var GRACE_TIME_DELTA = 600; // in milliseconds - var DEFAULT_FILESYSTEM_SIZE = 1024 * 50; // filesystem size in bytes - var UNKNOWN_HOST = 'http://foobar.apache.org'; - var DOWNLOAD_TIMEOUT = 15 * ONE_SECOND; - var LONG_TIMEOUT = 60 * ONE_SECOND; - var UPLOAD_TIMEOUT = 15 * ONE_SECOND; - var ABORT_DELAY = 100; // for abort() tests - var LATIN1_SYMBOLS = '¥§©ÆÖÑøøø¼'; - var DATA_URI_PREFIX = 'data:image/png;base64,'; - var DATA_URI_CONTENT = + const ONE_SECOND = 1000; // in milliseconds + const GRACE_TIME_DELTA = 600; // in milliseconds + const DEFAULT_FILESYSTEM_SIZE = 1024 * 50; // filesystem size in bytes + const UNKNOWN_HOST = 'http://foobar.apache.org'; + const DOWNLOAD_TIMEOUT = 15 * ONE_SECOND; + const LONG_TIMEOUT = 60 * ONE_SECOND; + const UPLOAD_TIMEOUT = 15 * ONE_SECOND; + const ABORT_DELAY = 100; // for abort() tests + const LATIN1_SYMBOLS = '¥§©ÆÖÑøøø¼'; + const DATA_URI_PREFIX = 'data:image/png;base64,'; + const DATA_URI_CONTENT = 'iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg=='; - var DATA_URI_CONTENT_LENGTH = 85; // bytes. (This is the raw file size: used https://en.wikipedia.org/wiki/File:Red-dot-5px.png from https://en.wikipedia.org/wiki/Data_URI_scheme) - var RETRY_COUNT = 100; // retry some flaky tests (yes, THIS many times, due to Heroku server instability) - var RETRY_INTERVAL = 100; + const DATA_URI_CONTENT_LENGTH = 85; // bytes. (This is the raw file size: used https://en.wikipedia.org/wiki/File:Red-dot-5px.png from https://en.wikipedia.org/wiki/Data_URI_scheme) + const RETRY_COUNT = 100; // retry some flaky tests (yes, THIS many times, due to Heroku server instability) + const RETRY_INTERVAL = 100; // upload test server address // NOTE: @@ -47,16 +47,16 @@ exports.defineAutoTests = function () { // Will get it from the config // you can specify it as a 'FILETRANSFER_SERVER_ADDRESS' variable upon test plugin installation // or change the default value in plugin.xml - var SERVER = ''; - var SERVER_WITH_CREDENTIALS = ''; + let SERVER = ''; + let SERVER_WITH_CREDENTIALS = ''; // flags - var isWindows = cordova.platformId === 'windows'; - var isBrowser = cordova.platformId === 'browser'; - var isWindowsPhone = isWindows && WinJS.Utilities.isPhone; - var isIE = isBrowser && navigator.userAgent.indexOf('Trident') >= 0; - var isIos = cordova.platformId === 'ios'; - var isIot = cordova.platformId === 'android' && navigator.userAgent.indexOf('iot') >= 0; + const isWindows = cordova.platformId === 'windows'; + const isBrowser = cordova.platformId === 'browser'; + const isWindowsPhone = isWindows && WinJS.Utilities.isPhone; + const isIE = isBrowser && navigator.userAgent.indexOf('Trident') >= 0; + const isIos = cordova.platformId === 'ios'; + const isIot = cordova.platformId === 'android' && navigator.userAgent.indexOf('iot') >= 0; // tests describe('FileTransferError', function () { @@ -65,7 +65,7 @@ exports.defineAutoTests = function () { }); it('should be constructable', function () { - var transferError = new FileTransferError(); + const transferError = new FileTransferError(); expect(transferError).toBeDefined(); }); @@ -90,7 +90,7 @@ exports.defineAutoTests = function () { }); it('should be constructable', function () { - var transferOptions = new FileUploadOptions(); + const transferOptions = new FileUploadOptions(); expect(transferOptions).toBeDefined(); }); }); @@ -100,7 +100,7 @@ exports.defineAutoTests = function () { this.tempRoot = null; // named callbacks - var unexpectedCallbacks = { + const unexpectedCallbacks = { httpFail: function () {}, httpWin: function () {}, fileSystemFail: function () {}, @@ -109,14 +109,14 @@ exports.defineAutoTests = function () { fileOperationWin: function () {} }; - var expectedCallbacks = { + const expectedCallbacks = { unsupportedOperation: function (response) { console.log('spec called unsupported functionality; response:', response); } }; // helpers - var deleteFile = function (fileSystem, name, done) { + const deleteFile = function (fileSystem, name, done) { fileSystem.getFile( name, null, @@ -136,8 +136,8 @@ exports.defineAutoTests = function () { ); }; - var writeFile = function (fileSystem, name, content, success, done) { - var fileOperationFail = function () { + const writeFile = function (fileSystem, name, content, success, done) { + const fileOperationFail = function () { unexpectedCallbacks.fileOperationFail(); done(); }; @@ -160,7 +160,7 @@ exports.defineAutoTests = function () { }; if (cordova.platformId === 'browser') { - var blob = new Blob([content + '\n'], { type: 'text/plain' }); + const blob = new Blob([content + '\n'], { type: 'text/plain' }); writer.write(blob); } else { writer.write(content + '\n'); @@ -173,7 +173,7 @@ exports.defineAutoTests = function () { ); }; - var defaultOnProgressHandler = function (event) { + const defaultOnProgressHandler = function (event) { if (event.lengthComputable) { expect(event.loaded).toBeGreaterThan(1); expect(event.total).toBeGreaterThan(0); @@ -190,7 +190,7 @@ exports.defineAutoTests = function () { } }; - var getMalformedUrl = function () { + const getMalformedUrl = function () { if (cordova.platformId === 'android') { // bad protocol causes a MalformedUrlException on Android return 'httpssss://example.com'; @@ -200,7 +200,7 @@ exports.defineAutoTests = function () { } }; - var setServerAddress = function (address) { + const setServerAddress = function (address) { SERVER = address; SERVER_WITH_CREDENTIALS = SERVER.replace('http://', 'http://cordova_user:cordova_password@'); }; @@ -210,7 +210,7 @@ exports.defineAutoTests = function () { // signifies a completed async call, each async call needs its own done(), and // therefore its own beforeEach beforeEach(function (done) { - var specContext = this; + const specContext = this; window.requestFileSystem( LocalFileSystem.PERSISTENT, @@ -226,7 +226,7 @@ exports.defineAutoTests = function () { }); beforeEach(function (done) { - var specContext = this; + const specContext = this; window.requestFileSystem( LocalFileSystem.TEMPORARY, @@ -244,14 +244,14 @@ exports.defineAutoTests = function () { // spy on all named callbacks beforeEach(function () { // ignore the actual implementations of the unexpected callbacks - for (var callback in unexpectedCallbacks) { + for (const callback in unexpectedCallbacks) { if (Object.prototype.hasOwnProperty.call(unexpectedCallbacks, callback)) { spyOn(unexpectedCallbacks, callback); } } // but run the implementations of the expected callbacks - for (callback in expectedCallbacks) { + for (const callback in expectedCallbacks) { if (Object.prototype.hasOwnProperty.call(expectedCallbacks, callback)) { spyOn(expectedCallbacks, callback).and.callThrough(); } @@ -261,7 +261,7 @@ exports.defineAutoTests = function () { // at the end, check that none of the unexpected callbacks got called, // and act on the expected callbacks afterEach(function () { - for (var callback in unexpectedCallbacks) { + for (const callback in unexpectedCallbacks) { if (Object.prototype.hasOwnProperty.call(unexpectedCallbacks, callback)) { expect(unexpectedCallbacks[callback]).not.toHaveBeenCalled(); } @@ -275,10 +275,10 @@ exports.defineAutoTests = function () { it('util spec: get file transfer server url', function () { try { // attempt to synchronously load medic config - var xhr = new XMLHttpRequest(); + const xhr = new XMLHttpRequest(); xhr.open('GET', '../fileTransferOpts.json', false); xhr.send(null); - var parsedCfg = JSON.parse(xhr.responseText); + const parsedCfg = JSON.parse(xhr.responseText); if (parsedCfg.serverAddress) { setServerAddress(parsedCfg.serverAddress); } @@ -301,12 +301,12 @@ exports.defineAutoTests = function () { }); it('filetransfer.spec.1 should be constructable', function () { - var transfer = new FileTransfer(); + const transfer = new FileTransfer(); expect(transfer).toBeDefined(); }); it('filetransfer.spec.2 should expose proper functions', function () { - var transfer = new FileTransfer(); + const transfer = new FileTransfer(); expect(transfer.upload).toBeDefined(); expect(transfer.download).toBeDefined(); @@ -343,7 +343,7 @@ exports.defineAutoTests = function () { // - 'cordova-filetransfer.jitsu.com' describe('download', function () { // helpers - var verifyDownload = function (fileEntry, specContext) { + const verifyDownload = function (fileEntry, specContext) { expect(fileEntry.name).toBe(specContext.fileName); }; @@ -359,12 +359,12 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.4 should download a file', function (done) { - var fileURL = SERVER + '/robots.txt'; - var specContext = this; + const fileURL = SERVER + '/robots.txt'; + const specContext = this; - var fileWin = function (blob) { + const fileWin = function (blob) { if (specContext.transfer.onprogress.calls.any()) { - var lastProgressEvent = specContext.transfer.onprogress.calls.mostRecent().args[0]; + const lastProgressEvent = specContext.transfer.onprogress.calls.mostRecent().args[0]; expect(lastProgressEvent.loaded).not.toBeGreaterThan(blob.size); } else { console.log('no progress events were emitted'); @@ -373,17 +373,17 @@ exports.defineAutoTests = function () { done(); }; - var fileSystemFail = function () { + const fileSystemFail = function () { unexpectedCallbacks.fileSystemFail(); done(); }; - var downloadFail = function () { + const downloadFail = function () { unexpectedCallbacks.httpFail(); done(); }; - var downloadWin = function (entry) { + const downloadWin = function (entry) { verifyDownload(entry, specContext); // verify the FileEntry representing this file @@ -398,15 +398,15 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.4.1 should download a file using target name with space', function (done) { - var fileURL = SERVER + '/robots.txt'; + const fileURL = SERVER + '/robots.txt'; this.fileName = 'test file.txt'; this.localFilePath = this.root.toURL() + this.fileName; - var specContext = this; + const specContext = this; - var fileWin = function (blob) { + const fileWin = function (blob) { if (specContext.transfer.onprogress.calls.any()) { - var lastProgressEvent = specContext.transfer.onprogress.calls.mostRecent().args[0]; + const lastProgressEvent = specContext.transfer.onprogress.calls.mostRecent().args[0]; expect(lastProgressEvent.loaded).not.toBeGreaterThan(blob.size); } else { console.log('no progress events were emitted'); @@ -415,17 +415,17 @@ exports.defineAutoTests = function () { done(); }; - var fileSystemFail = function () { + const fileSystemFail = function () { unexpectedCallbacks.fileSystemFail(); done(); }; - var downloadFail = function () { + const downloadFail = function () { unexpectedCallbacks.httpFail(); done(); }; - var downloadWin = function (entry) { + const downloadWin = function (entry) { verifyDownload(entry, specContext); // verify the FileEntry representing this file @@ -440,15 +440,15 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.5 should download a file using http basic auth', function (done) { - var fileURL = SERVER_WITH_CREDENTIALS + '/download_basic_auth'; - var specContext = this; + const fileURL = SERVER_WITH_CREDENTIALS + '/download_basic_auth'; + const specContext = this; - var downloadWin = function (entry) { + const downloadWin = function (entry) { verifyDownload(entry, specContext); done(); }; - var downloadFail = function () { + const downloadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -463,15 +463,15 @@ exports.defineAutoTests = function () { function (done) { // NOTE: // using server without credentials - var fileURL = SERVER + '/download_basic_auth'; + const fileURL = SERVER + '/download_basic_auth'; - var downloadFail = function (error) { + const downloadFail = function (error) { expect(error.http_status).toBe(401); expect(error.http_status).not.toBe(404, 'Ensure ' + fileURL + ' is in the white list'); done(); }; - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -494,20 +494,20 @@ exports.defineAutoTests = function () { return; } - var fileURL = window.location.protocol + '//' + window.location.pathname.replace(/ /g, '%20'); - var specContext = this; + const fileURL = window.location.protocol + '//' + window.location.pathname.replace(/ /g, '%20'); + const specContext = this; if (!/^file:/.exec(fileURL)) { done(); return; } - var downloadWin = function (entry) { + const downloadWin = function (entry) { verifyDownload(entry, specContext); done(); }; - var downloadFail = function () { + const downloadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -520,26 +520,26 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.8 should download a file using https://', function (done) { - var fileURL = 'https://www.apache.org/licenses/'; - var specContext = this; + const fileURL = 'https://www.apache.org/licenses/'; + const specContext = this; - var downloadFail = function () { + const downloadFail = function () { unexpectedCallbacks.httpFail(); done(); }; - var fileOperationFail = function () { + const fileOperationFail = function () { unexpectedCallbacks.fileOperationFail(); done(); }; - var fileSystemFail = function () { + const fileSystemFail = function () { unexpectedCallbacks.fileSystemFail(); done(); }; - var fileWin = function (file) { - var reader = new FileReader(); + const fileWin = function (file) { + const reader = new FileReader(); reader.onerror = fileOperationFail; reader.onload = function () { @@ -550,7 +550,7 @@ exports.defineAutoTests = function () { reader.readAsText(file); }; - var downloadWin = function (entry) { + const downloadWin = function (entry) { verifyDownload(entry, specContext); entry.file(fileWin, fileSystemFail); }; @@ -563,11 +563,11 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.11 should call the error callback on abort()', function (done) { - var fileURL = 'http://cordova.apache.org/static/downloads/BlueZedEx.mp3'; + let fileURL = 'http://cordova.apache.org/static/downloads/BlueZedEx.mp3'; fileURL = fileURL + '?q=' + new Date().getTime(); - var specContext = this; + const specContext = this; - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -583,21 +583,21 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.9 should not leave partial file due to abort', function (done) { - var fileURL = 'http://cordova.apache.org/static/downloads/logos.zip'; - var specContext = this; + const fileURL = 'http://cordova.apache.org/static/downloads/logos.zip'; + const specContext = this; - var fileSystemWin = function () { + const fileSystemWin = function () { unexpectedCallbacks.fileSystemWin(); done(); }; - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; - var downloadFail = function (error) { - var result = !!(error.code === FileTransferError.ABORT_ERR || error.code === FileTransferError.CONNECTION_ERR); + const downloadFail = function (error) { + const result = !!(error.code === FileTransferError.ABORT_ERR || error.code === FileTransferError.CONNECTION_ERR); if (!result) { fail( 'Expected ' + @@ -631,18 +631,18 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.10 should be stopped by abort()', function (done) { - var fileURL = 'http://cordova.apache.org/static/downloads/BlueZedEx.mp3'; + let fileURL = 'http://cordova.apache.org/static/downloads/BlueZedEx.mp3'; fileURL = fileURL + '?q=' + new Date().getTime(); - var specContext = this; + const specContext = this; expect(specContext.transfer.abort).not.toThrow(); // should be a no-op. - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; - var downloadFail = function (error) { + const downloadFail = function (error) { expect(error.code).toBe(FileTransferError.ABORT_ERR); // delay calling done() to wait for the bogus abort() @@ -665,9 +665,9 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.12 should get http status on failure', function (done) { - var fileURL = SERVER + '/404'; + const fileURL = SERVER + '/404'; - var downloadFail = function (error) { + const downloadFail = function (error) { expect(error.http_status).not.toBe(401, 'Ensure ' + fileURL + ' is in the white list'); expect(error.http_status).toBe(404); @@ -676,7 +676,7 @@ exports.defineAutoTests = function () { done(); }; - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -689,9 +689,9 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.13 should get http body on failure', function (done) { - var fileURL = SERVER + '/404'; + const fileURL = SERVER + '/404'; - var downloadFail = function (error) { + const downloadFail = function (error) { expect(error.http_status).not.toBe(401, 'Ensure ' + fileURL + ' is in the white list'); expect(error.http_status).toBe(404); @@ -701,7 +701,7 @@ exports.defineAutoTests = function () { done(); }; - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -712,9 +712,9 @@ exports.defineAutoTests = function () { ); it('filetransfer.spec.14 should handle malformed urls', function (done) { - var fileURL = getMalformedUrl(); + const fileURL = getMalformedUrl(); - var downloadFail = function (error) { + const downloadFail = function (error) { // Note: Android needs the bad protocol to be added to the access list // won't match because ^https?:// is prepended to the regex // The bad protocol must begin with http to avoid automatic prefix @@ -724,7 +724,7 @@ exports.defineAutoTests = function () { done(); }; - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -735,14 +735,14 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.15 should handle unknown host', function (done) { - var fileURL = UNKNOWN_HOST; + const fileURL = UNKNOWN_HOST; - var downloadFail = function (error) { + const downloadFail = function (error) { expect(error.code).toBe(FileTransferError.CONNECTION_ERR); done(); }; - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -756,9 +756,9 @@ exports.defineAutoTests = function () { ); it('filetransfer.spec.16 should handle bad file path', function (done) { - var fileURL = SERVER; + const fileURL = SERVER; - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -769,15 +769,15 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.17 progress should work with gzip encoding', function (done) { - var fileURL = 'http://www.apache.org/'; - var specContext = this; + const fileURL = 'http://www.apache.org/'; + const specContext = this; - var downloadWin = function (entry) { + const downloadWin = function (entry) { verifyDownload(entry, specContext); done(); }; - var downloadFail = function () { + const downloadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -795,13 +795,13 @@ exports.defineAutoTests = function () { return; } - var fileURL = SERVER + '/robots.txt'; + const fileURL = SERVER + '/robots.txt'; - var downloadWin = function (entry) { + const downloadWin = function (entry) { expect(entry.toNativeURL).toBeDefined(); expect(entry.toNativeURL).toEqual(jasmine.any(Function)); - var nativeURL = entry.toNativeURL(); + const nativeURL = entry.toNativeURL(); expect(nativeURL).toBeTruthy(); expect(nativeURL).toEqual(jasmine.any(String)); @@ -815,7 +815,7 @@ exports.defineAutoTests = function () { done(); }; - var downloadFail = function () { + const downloadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -826,27 +826,27 @@ exports.defineAutoTests = function () { ); it('filetransfer.spec.28 (compatibility) should be able to download a file using local paths', function (done) { - var fileURL = SERVER + '/robots.txt'; - var specContext = this; + const fileURL = SERVER + '/robots.txt'; + const specContext = this; - var unsupported = function (response) { + const unsupported = function (response) { expectedCallbacks.unsupportedOperation(response); done(); }; - var downloadWin = function (entry) { + const downloadWin = function (entry) { verifyDownload(entry, specContext); done(); }; - var internalFilePath; + let internalFilePath; if (specContext.root.toInternalURL) { internalFilePath = specContext.root.toInternalURL() + specContext.fileName; } else { internalFilePath = specContext.localFilePath; } - var downloadFail = function () { + const downloadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -869,13 +869,13 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.33 should properly handle 304', function (done) { - var downloadFail = function (error) { + const downloadFail = function (error) { expect(error.http_status).toBe(304); expect(error.code).toBe(FileTransferError.NOT_MODIFIED_ERR); done(); }; - var downloadWin = function () { + const downloadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -888,24 +888,24 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.35 304 should not result in the deletion of a cached file', function (done) { - var specContext = this; + const specContext = this; - var fileOperationFail = function () { + const fileOperationFail = function () { unexpectedCallbacks.fileOperationFail(); done(); }; - var fileSystemFail = function () { + const fileSystemFail = function () { unexpectedCallbacks.fileSystemFail(); done(); }; - var httpWin = function () { + const httpWin = function () { unexpectedCallbacks.httpWin(); done(); }; - var downloadFail = function (error) { + const downloadFail = function (error) { expect(error.http_status).toBe(304); expect(error.code).toBe(FileTransferError.NOT_MODIFIED_ERR); @@ -913,8 +913,8 @@ exports.defineAutoTests = function () { specContext.fileName, { create: false }, function (entry) { - var fileWin = function (file) { - var reader = new FileReader(); + const fileWin = function (file) { + const reader = new FileReader(); reader.onerror = fileOperationFail; reader.onloadend = function () { @@ -961,27 +961,27 @@ exports.defineAutoTests = function () { pending(); } - var fileURL = SERVER + '/download_non_utf'; - var specContext = this; + const fileURL = SERVER + '/download_non_utf'; + const specContext = this; - var fileOperationFail = function () { + const fileOperationFail = function () { unexpectedCallbacks.fileOperationFail(); done(); }; - var fileSystemFail = function () { + const fileSystemFail = function () { unexpectedCallbacks.fileSystemFail(); done(); }; - var httpFail = function () { + const httpFail = function () { unexpectedCallbacks.httpFail(); done(); }; - var fileWin = function (blob) { + const fileWin = function (blob) { if (specContext.transfer.onprogress.calls.any()) { - var lastProgressEvent = specContext.transfer.onprogress.calls.mostRecent().args[0]; + const lastProgressEvent = specContext.transfer.onprogress.calls.mostRecent().args[0]; expect(lastProgressEvent.loaded).not.toBeGreaterThan(blob.size); } else { console.log('no progress events were emitted'); @@ -989,7 +989,7 @@ exports.defineAutoTests = function () { expect(blob.size).toBeGreaterThan(0); - var reader = new FileReader(); + const reader = new FileReader(); reader.onerror = fileOperationFail; reader.onloadend = function () { @@ -1000,7 +1000,7 @@ exports.defineAutoTests = function () { reader.readAsBinaryString(blob); }; - var downloadWin = function (entry) { + const downloadWin = function (entry) { verifyDownload(entry, specContext); // verify the FileEntry representing this file @@ -1021,11 +1021,11 @@ exports.defineAutoTests = function () { this.localFilePath = null; // helpers - var verifyUpload = function (uploadResult, specContext) { + const verifyUpload = function (uploadResult, specContext) { expect(uploadResult.bytesSent).toBeGreaterThan(0); expect(uploadResult.responseCode).toBe(200); - var obj = null; + let obj = null; try { obj = JSON.parse(uploadResult.response); expect(obj.fields).toBeDefined(); @@ -1039,7 +1039,7 @@ exports.defineAutoTests = function () { }; beforeEach(function (done) { - var specContext = this; + const specContext = this; specContext.fileName = 'fileToUpload.txt'; specContext.fileContents = 'upload test file'; @@ -1054,7 +1054,7 @@ exports.defineAutoTests = function () { specContext.uploadOptions.mimeType = 'text/plain'; specContext.uploadOptions.params = specContext.uploadParams; - var fileWin = function (entry) { + const fileWin = function (entry) { specContext.localFilePath = entry.toURL(); done(); }; @@ -1071,10 +1071,10 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.18 should be able to upload a file', function (done) { - var fileURL = SERVER + '/upload'; - var specContext = this; + const fileURL = SERVER + '/upload'; + const specContext = this; - var uploadWin = function (uploadResult) { + const uploadWin = function (uploadResult) { verifyUpload(uploadResult, specContext); if (cordova.platformId === 'ios') { @@ -1085,7 +1085,7 @@ exports.defineAutoTests = function () { done(); }; - var uploadFail = function () { + const uploadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -1099,15 +1099,15 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.19 should be able to upload a file with http basic auth', function (done) { - var fileURL = SERVER_WITH_CREDENTIALS + '/upload_basic_auth'; - var specContext = this; + const fileURL = SERVER_WITH_CREDENTIALS + '/upload_basic_auth'; + const specContext = this; - var uploadWin = function (uploadResult) { + const uploadWin = function (uploadResult) { verifyUpload(uploadResult, specContext); done(); }; - var uploadFail = function () { + const uploadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -1121,22 +1121,22 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.21 should be stopped by abort()', function (done) { - var fileURL = SERVER + '/upload'; - var specContext = this; + const fileURL = SERVER + '/upload'; + const specContext = this; - var uploadFail = function (e) { + const uploadFail = function (e) { expect(e.code).toBe(FileTransferError.ABORT_ERR); // delay calling done() to wait for the bogus abort() setTimeout(done, GRACE_TIME_DELTA * 2); }; - var uploadWin = function () { + const uploadWin = function () { unexpectedCallbacks.httpWin(); done(); }; - var fileWin = function () { + const fileWin = function () { expect(specContext.transfer.abort).not.toThrow(); // NOTE: removing uploadOptions cause Android to timeout @@ -1158,7 +1158,7 @@ exports.defineAutoTests = function () { // windows store and ios are too fast, win is called before we have a chance to abort // so let's get them busy - while not providing an extra load to the slow Android emulators - var arrayLength = (isWindows && !isWindowsPhone) || isIos ? 3000000 : isIot ? 150000 : 200000; + const arrayLength = (isWindows && !isWindowsPhone) || isIos ? 3000000 : isIot ? 150000 : 200000; writeFile(specContext.root, specContext.fileName, new Array(arrayLength).join('aborttest!'), fileWin, done); }, UPLOAD_TIMEOUT @@ -1167,16 +1167,16 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.22 should get http status and body on failure', function (done) { - var fileURL = SERVER + '/403'; - var retryCount = 0; - var self = this; + const fileURL = SERVER + '/403'; + let retryCount = 0; + const self = this; - var uploadWin = function () { + const uploadWin = function () { unexpectedCallbacks.httpWin(); done(); }; - var uploadFail = function (error) { + const uploadFail = function (error) { if (error.http_status === 503 && ++retryCount <= RETRY_COUNT) { // Heroku often gives this error, retry in 1 second console.log('retrying... ' + retryCount); @@ -1196,15 +1196,15 @@ exports.defineAutoTests = function () { ); it('filetransfer.spec.24 should handle malformed urls', function (done) { - var fileURL = getMalformedUrl(); + const fileURL = getMalformedUrl(); - var uploadFail = function (error) { + const uploadFail = function (error) { expect(error.code).toBe(FileTransferError.INVALID_URL_ERR); expect(error.http_status).not.toBe(401, 'Ensure ' + fileURL + ' is in the white list'); done(); }; - var uploadWin = function () { + const uploadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -1215,15 +1215,15 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.25 should handle unknown host', function (done) { - var fileURL = UNKNOWN_HOST; + const fileURL = UNKNOWN_HOST; - var uploadFail = function (error) { + const uploadFail = function (error) { expect(error.code).toBe(FileTransferError.CONNECTION_ERR); expect(error.http_status).not.toBe(401, 'Ensure ' + fileURL + ' is in the white list'); done(); }; - var uploadWin = function () { + const uploadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -1236,15 +1236,15 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.25 should handle missing file', function (done) { - var fileURL = SERVER + '/upload'; + const fileURL = SERVER + '/upload'; - var uploadFail = function (error) { + const uploadFail = function (error) { expect(error.code).toBe(FileTransferError.FILE_NOT_FOUND_ERR); expect(error.http_status).not.toBe(401, 'Ensure ' + fileURL + ' is in the white list'); done(); }; - var uploadWin = function () { + const uploadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -1255,14 +1255,14 @@ exports.defineAutoTests = function () { ); it('filetransfer.spec.26 should handle bad file path', function (done) { - var fileURL = SERVER + '/upload'; + const fileURL = SERVER + '/upload'; - var uploadFail = function (error) { + const uploadFail = function (error) { expect(error.http_status).not.toBe(401, 'Ensure ' + fileURL + ' is in the white list'); done(); }; - var uploadWin = function () { + const uploadWin = function () { unexpectedCallbacks.httpWin(); done(); }; @@ -1273,16 +1273,16 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.27 should be able to set custom headers', function (done) { - var fileURL = SERVER + '/upload_echo_headers'; - var retryCount = 0; - var self = this; + const fileURL = SERVER + '/upload_echo_headers'; + let retryCount = 0; + const self = this; - var uploadWin = function (uploadResult) { + const uploadWin = function (uploadResult) { expect(uploadResult.bytesSent).toBeGreaterThan(0); expect(uploadResult.responseCode).toBe(200); expect(uploadResult.response).toBeDefined(); - var responseHtml = decodeURIComponent(uploadResult.response); + const responseHtml = decodeURIComponent(uploadResult.response); expect(responseHtml).toMatch(/CustomHeader1[\s\S]*CustomValue1/i); expect(responseHtml).toMatch( @@ -1293,7 +1293,7 @@ exports.defineAutoTests = function () { done(); }; - var uploadFail = function () { + const uploadFail = function () { if (++retryCount >= RETRY_COUNT) { unexpectedCallbacks.httpFail(); done(); @@ -1323,25 +1323,25 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.29 (compatibility) should be able to upload a file using local paths', function (done) { - var fileURL = SERVER + '/upload'; - var specContext = this; + const fileURL = SERVER + '/upload'; + const specContext = this; - var unsupported = function (response) { + const unsupported = function (response) { expectedCallbacks.unsupportedOperation(response); done(); }; - var uploadWin = function (uploadResult) { + const uploadWin = function (uploadResult) { verifyUpload(uploadResult, specContext); done(); }; - var uploadFail = function () { + const uploadFail = function () { unexpectedCallbacks.httpFail(); done(); }; - var internalFilePath; + let internalFilePath; if (specContext.root.toInternalURL) { internalFilePath = specContext.root.toInternalURL() + specContext.fileName; } else { @@ -1368,10 +1368,10 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.31 should be able to upload a file using PUT method', function (done) { - var fileURL = SERVER + '/upload'; - var specContext = this; + const fileURL = SERVER + '/upload'; + const specContext = this; - var uploadWin = function (uploadResult) { + const uploadWin = function (uploadResult) { verifyUpload(uploadResult, specContext); if (cordova.platformId === 'ios') { @@ -1382,7 +1382,7 @@ exports.defineAutoTests = function () { done(); }; - var uploadFail = function () { + const uploadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -1398,10 +1398,10 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.32 should be able to upload a file (non-multipart)', function (done) { - var fileURL = SERVER + '/upload'; - var specContext = this; + const fileURL = SERVER + '/upload'; + const specContext = this; - var uploadWin = function (uploadResult) { + const uploadWin = function (uploadResult) { expect(uploadResult.bytesSent).toBeGreaterThan(0); expect(uploadResult.responseCode).toBe(200); expect(uploadResult.response).toBeDefined(); @@ -1418,7 +1418,7 @@ exports.defineAutoTests = function () { done(); }; - var uploadFail = function () { + const uploadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -1437,10 +1437,10 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.34 should not delete a file on upload error', function (done) { - var fileURL = SERVER + '/upload'; - var specContext = this; + const fileURL = SERVER + '/upload'; + const specContext = this; - var uploadFail = function (e) { + const uploadFail = function (e) { expect(e.code).toBe(FileTransferError.ABORT_ERR); // check that the file is there @@ -1459,12 +1459,12 @@ exports.defineAutoTests = function () { ); }; - var uploadWin = function () { + const uploadWin = function () { unexpectedCallbacks.httpWin(); done(); }; - var fileWin = function () { + const fileWin = function () { expect(specContext.transfer.abort).not.toThrow(); // abort at the first onprogress event @@ -1497,13 +1497,13 @@ exports.defineAutoTests = function () { pending(); } - var fileURL = SERVER + '/upload_non_utf'; - var specContext = this; + const fileURL = SERVER + '/upload_non_utf'; + const specContext = this; - var uploadWin = function (uploadResult) { + const uploadWin = function (uploadResult) { verifyUpload(uploadResult, specContext); - var obj = null; + let obj = null; try { obj = JSON.parse(uploadResult.response); expect(obj.latin1Symbols).toBe(LATIN1_SYMBOLS); @@ -1519,7 +1519,7 @@ exports.defineAutoTests = function () { done(); }; - var uploadFail = function () { + const uploadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -1533,13 +1533,13 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.38 should be able to upload a file using data: source uri', function (done) { - var fileURL = SERVER + '/upload'; - var specContext = this; + const fileURL = SERVER + '/upload'; + const specContext = this; - var uploadWin = function (uploadResult) { + const uploadWin = function (uploadResult) { verifyUpload(uploadResult, specContext); - var obj = null; + let obj = null; try { obj = JSON.parse(uploadResult.response); expect(obj.files.file.size).toBe(DATA_URI_CONTENT_LENGTH); @@ -1555,7 +1555,7 @@ exports.defineAutoTests = function () { done(); }; - var dataUri = DATA_URI_PREFIX + DATA_URI_CONTENT; + const dataUri = DATA_URI_PREFIX + DATA_URI_CONTENT; // NOTE: removing uploadOptions cause Android to timeout specContext.transfer.upload( dataUri, @@ -1575,9 +1575,9 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.39 should be able to upload a file using data: source uri (non-multipart)', function (done) { - var fileURL = SERVER + '/upload'; + const fileURL = SERVER + '/upload'; - var uploadWin = function (uploadResult) { + const uploadWin = function (uploadResult) { expect(uploadResult.responseCode).toBe(200); expect(uploadResult.bytesSent).toBeGreaterThan(0); @@ -1589,7 +1589,7 @@ exports.defineAutoTests = function () { done(); }; - var uploadFail = function () { + const uploadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -1599,7 +1599,7 @@ exports.defineAutoTests = function () { 'Content-Type': 'image/png' }; - var dataUri = DATA_URI_PREFIX + DATA_URI_CONTENT; + const dataUri = DATA_URI_PREFIX + DATA_URI_CONTENT; // NOTE: removing uploadOptions cause Android to timeout this.transfer.upload(dataUri, fileURL, uploadWin, uploadFail, this.uploadOptions); }, @@ -1609,11 +1609,11 @@ exports.defineAutoTests = function () { it( 'filetransfer.spec.40 should not fail to upload a file using data: source uri when the data is empty', function (done) { - var fileURL = SERVER + '/upload'; + const fileURL = SERVER + '/upload'; - var dataUri = DATA_URI_PREFIX; + const dataUri = DATA_URI_PREFIX; - var uploadFail = function () { + const uploadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -1632,7 +1632,7 @@ exports.defineAutoTests = function () { // request body will be empty in this case instead of 0\n\n. pending(); } - var fileURL = SERVER + '/upload'; + const fileURL = SERVER + '/upload'; // Content-Type header disables multipart this.uploadOptions.headers = { @@ -1642,9 +1642,9 @@ exports.defineAutoTests = function () { // turn off the onprogress handler this.transfer.onprogress = function () {}; - var dataUri = DATA_URI_PREFIX; + const dataUri = DATA_URI_PREFIX; - var uploadFail = function () { + const uploadFail = function () { unexpectedCallbacks.httpFail(); done(); }; @@ -1656,11 +1656,11 @@ exports.defineAutoTests = function () { ); describe('chunkedMode handling', function () { - var testChunkedModeWin = function (uploadResult, specContext) { - var multipartModeEnabled = !( + const testChunkedModeWin = function (uploadResult, specContext) { + const multipartModeEnabled = !( specContext.uploadOptions.headers && specContext.uploadOptions.headers['Content-Type'] ); - var obj = null; + let obj = null; try { obj = JSON.parse(uploadResult.response); @@ -1684,10 +1684,10 @@ exports.defineAutoTests = function () { } }; - var testChunkedModeBase = function (chunkedMode, multipart, done) { - var retryCount = 0; - var fileURL = SERVER + '/upload_echo_headers'; - var specContext = this; + const testChunkedModeBase = function (chunkedMode, multipart, done) { + let retryCount = 0; + const fileURL = SERVER + '/upload_echo_headers'; + const specContext = this; specContext.uploadOptions.chunkedMode = chunkedMode; if (!multipart) { @@ -1697,7 +1697,7 @@ exports.defineAutoTests = function () { }; } - var uploadFail = function () { + const uploadFail = function () { if (++retryCount >= RETRY_COUNT) { unexpectedCallbacks.httpFail(); done(); @@ -1785,28 +1785,28 @@ exports.defineAutoTests = function () { exports.defineManualTests = function (contentEl, createActionButton) { 'use strict'; - var imageURL = 'http://apache.org/images/feather-small.gif'; - var videoURL = 'http://techslides.com/demos/sample-videos/small.mp4'; + const imageURL = 'http://apache.org/images/feather-small.gif'; + const videoURL = 'http://techslides.com/demos/sample-videos/small.mp4'; function clearResults () { - var results = document.getElementById('info'); + const results = document.getElementById('info'); results.innerHTML = ''; } function downloadImg (source, urlFn, element, directory) { - var filename = source.substring(source.lastIndexOf('/') + 1); + let filename = source.substring(source.lastIndexOf('/') + 1); filename = (directory || '') + filename; function download (fileSystem) { - var ft = new FileTransfer(); + const ft = new FileTransfer(); console.log('Starting download'); - var progress = document.getElementById('loadingStatus'); + const progress = document.getElementById('loadingStatus'); progress.value = 0; ft.onprogress = function (progressEvent) { if (progressEvent.lengthComputable) { - var currPercents = parseInt(100 * (progressEvent.loaded / progressEvent.total), 10); + const currPercents = parseInt(100 * (progressEvent.loaded / progressEvent.total), 10); if (currPercents > progress.value) { progress.value = currPercents; } @@ -1885,8 +1885,8 @@ exports.defineManualTests = function (contentEl, createActionButton) { /******************************************************************************/ - var progress_tag = ''; - var file_transfer_tests = + const progress_tag = ''; + const file_transfer_tests = '

Image File Transfer Tests

' + '

The following tests should display an image of the Apache feather in the status box

' + '
' + @@ -1945,7 +1945,7 @@ exports.defineManualTests = function (contentEl, createActionButton) { createActionButton( 'Download and play video (cdvfile)', function () { - var videoElement = document.createElement('video'); + const videoElement = document.createElement('video'); videoElement.controls = 'controls'; downloadImg( videoURL, @@ -1961,7 +1961,7 @@ exports.defineManualTests = function (contentEl, createActionButton) { createActionButton( 'Download and play video (native)', function () { - var videoElement = document.createElement('video'); + const videoElement = document.createElement('video'); videoElement.controls = 'controls'; downloadImg( videoURL, diff --git a/www/FileTransfer.js b/www/FileTransfer.js index 99389717..73c6a081 100644 --- a/www/FileTransfer.js +++ b/www/FileTransfer.js @@ -21,13 +21,13 @@ /* global cordova, FileSystem */ -var argscheck = require('cordova/argscheck'); -var exec = require('cordova/exec'); -var FileTransferError = require('./FileTransferError'); -var ProgressEvent = require('cordova-plugin-file.ProgressEvent'); +const argscheck = require('cordova/argscheck'); +const exec = require('cordova/exec'); +const FileTransferError = require('./FileTransferError'); +const ProgressEvent = require('cordova-plugin-file.ProgressEvent'); function newProgressEvent (result) { - var pe = new ProgressEvent(); + const pe = new ProgressEvent(); pe.lengthComputable = result.lengthComputable; pe.loaded = result.loaded; pe.total = result.total; @@ -35,24 +35,24 @@ function newProgressEvent (result) { } function getUrlCredentials (urlString) { - var credentialsPattern = /^https?:\/\/(?:(?:(([^:@/]*)(?::([^@/]*))?)?@)?([^:/?#]*)(?::(\d*))?).*$/; - var credentials = credentialsPattern.exec(urlString); + const credentialsPattern = /^https?:\/\/(?:(?:(([^:@/]*)(?::([^@/]*))?)?@)?([^:/?#]*)(?::(\d*))?).*$/; + const credentials = credentialsPattern.exec(urlString); return credentials && credentials[1]; } function getBasicAuthHeader (urlString) { - var header = null; + let header = null; // This is changed due to MS Windows doesn't support credentials in http uris // so we detect them by regexp and strip off from result url // Proof: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/a327cf3c-f033-4a54-8b7f-03c56ba3203f/windows-foundation-uri-security-problem if (window.btoa) { - var credentials = getUrlCredentials(urlString); + const credentials = getUrlCredentials(urlString); if (credentials) { - var authHeader = 'Authorization'; - var authHeaderValue = 'Basic ' + window.btoa(credentials); + const authHeader = 'Authorization'; + const authHeaderValue = 'Basic ' + window.btoa(credentials); header = { name: authHeader, @@ -65,10 +65,10 @@ function getBasicAuthHeader (urlString) { } function convertHeadersToArray (headers) { - var result = []; - for (var header in headers) { + const result = []; + for (const header in headers) { if (Object.prototype.hasOwnProperty.call(headers, header)) { - var headerValue = headers[header]; + const headerValue = headers[header]; result.push({ name: header, value: headerValue.toString() @@ -78,13 +78,13 @@ function convertHeadersToArray (headers) { return result; } -var idCounter = 0; +let idCounter = 0; /** * FileTransfer uploads a file to a remote server. * @constructor */ -var FileTransfer = function () { +const FileTransfer = function () { this._id = ++idCounter; this.onprogress = null; // optional callback }; @@ -102,14 +102,14 @@ var FileTransfer = function () { FileTransfer.prototype.upload = function (filePath, server, successCallback, errorCallback, options, trustAllHosts) { argscheck.checkArgs('ssFFO*', 'FileTransfer.upload', arguments); // check for options - var fileKey = null; - var fileName = null; - var mimeType = null; - var params = null; - var chunkedMode = true; - var headers = null; - var httpMethod = null; - var basicAuthHeader = getBasicAuthHeader(server); + let fileKey = null; + let fileName = null; + let mimeType = null; + let params = null; + let chunkedMode = true; + let headers = null; + let httpMethod = null; + const basicAuthHeader = getBasicAuthHeader(server); if (basicAuthHeader) { server = server.replace(getUrlCredentials(server) + '@', ''); @@ -144,15 +144,15 @@ FileTransfer.prototype.upload = function (filePath, server, successCallback, err params = params && convertHeadersToArray(params); } - var fail = + const fail = errorCallback && function (e) { - var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body, e.exception); + const error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body, e.exception); errorCallback(error); }; - var self = this; - var win = function (result) { + const self = this; + const win = function (result) { if (typeof result.lengthComputable !== 'undefined') { if (self.onprogress) { self.onprogress(newProgressEvent(result)); @@ -189,9 +189,9 @@ FileTransfer.prototype.upload = function (filePath, server, successCallback, err */ FileTransfer.prototype.download = function (source, target, successCallback, errorCallback, trustAllHosts, options) { argscheck.checkArgs('ssFF*', 'FileTransfer.download', arguments); - var self = this; + const self = this; - var basicAuthHeader = getBasicAuthHeader(source); + const basicAuthHeader = getBasicAuthHeader(source); if (basicAuthHeader) { source = source.replace(getUrlCredentials(source) + '@', ''); @@ -200,7 +200,7 @@ FileTransfer.prototype.download = function (source, target, successCallback, err options.headers[basicAuthHeader.name] = basicAuthHeader.value; } - var headers = null; + let headers = null; if (options) { headers = options.headers || null; } @@ -209,13 +209,13 @@ FileTransfer.prototype.download = function (source, target, successCallback, err headers = convertHeadersToArray(headers); } - var win = function (result) { + const win = function (result) { if (typeof result.lengthComputable !== 'undefined') { if (self.onprogress) { return self.onprogress(newProgressEvent(result)); } } else if (successCallback) { - var entry = null; + let entry = null; if (result.isDirectory) { entry = new (require('cordova-plugin-file.DirectoryEntry'))(); } else if (result.isFile) { @@ -233,10 +233,10 @@ FileTransfer.prototype.download = function (source, target, successCallback, err } }; - var fail = + const fail = errorCallback && function (e) { - var error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body, e.exception); + const error = new FileTransferError(e.code, e.source, e.target, e.http_status, e.body, e.exception); errorCallback(error); }; diff --git a/www/FileTransferError.js b/www/FileTransferError.js index e3c15eb0..b77b15de 100644 --- a/www/FileTransferError.js +++ b/www/FileTransferError.js @@ -23,7 +23,7 @@ * FileTransferError * @constructor */ -var FileTransferError = function (code, source, target, status, body, exception) { +const FileTransferError = function (code, source, target, status, body, exception) { this.code = code || null; this.source = source || null; this.target = target || null; diff --git a/www/browser/FileTransfer.js b/www/browser/FileTransfer.js index 01e178e8..c2e3b55b 100644 --- a/www/browser/FileTransfer.js +++ b/www/browser/FileTransfer.js @@ -21,38 +21,38 @@ /* global FileUploadResult */ -var argscheck = require('cordova/argscheck'); -var FileTransferError = require('./FileTransferError'); +const argscheck = require('cordova/argscheck'); +const FileTransferError = require('./FileTransferError'); function getParentPath (filePath) { - var pos = filePath.lastIndexOf('/'); + const pos = filePath.lastIndexOf('/'); return filePath.substring(0, pos + 1); } function getFileName (filePath) { - var pos = filePath.lastIndexOf('/'); + const pos = filePath.lastIndexOf('/'); return filePath.substring(pos + 1); } function getUrlCredentials (urlString) { - var credentialsPattern = /^https?:\/\/(?:(?:(([^:@/]*)(?::([^@/]*))?)?@)?([^:/?#]*)(?::(\d*))?).*$/; - var credentials = credentialsPattern.exec(urlString); + const credentialsPattern = /^https?:\/\/(?:(?:(([^:@/]*)(?::([^@/]*))?)?@)?([^:/?#]*)(?::(\d*))?).*$/; + const credentials = credentialsPattern.exec(urlString); return credentials && credentials[1]; } function getBasicAuthHeader (urlString) { - var header = null; + let header = null; // This is changed due to MS Windows doesn't support credentials in http uris // so we detect them by regexp and strip off from result url // Proof: http://social.msdn.microsoft.com/Forums/windowsapps/en-US/a327cf3c-f033-4a54-8b7f-03c56ba3203f/windows-foundation-uri-security-problem if (window.btoa) { - var credentials = getUrlCredentials(urlString); + const credentials = getUrlCredentials(urlString); if (credentials) { - var authHeader = 'Authorization'; - var authHeaderValue = 'Basic ' + window.btoa(credentials); + const authHeader = 'Authorization'; + const authHeaderValue = 'Basic ' + window.btoa(credentials); header = { name: authHeader, @@ -68,15 +68,15 @@ function checkURL (url) { return url.indexOf(' ') === -1; } -var idCounter = 0; +let idCounter = 0; -var transfers = {}; +const transfers = {}; /** * FileTransfer uploads a file to a remote server. * @constructor */ -var FileTransfer = function () { +const FileTransfer = function () { this._id = ++idCounter; this.onprogress = null; // optional callback }; @@ -106,32 +106,32 @@ FileTransfer.prototype.upload = function (filePath, server, successCallback, err options = options || {}; - var fileKey = options.fileKey || 'file'; - var fileName = options.fileName || 'image.jpg'; - var mimeType = options.mimeType || 'image/jpeg'; - var params = options.params || {}; - var withCredentials = options.withCredentials || false; + const fileKey = options.fileKey || 'file'; + const fileName = options.fileName || 'image.jpg'; + const mimeType = options.mimeType || 'image/jpeg'; + const params = options.params || {}; + const withCredentials = options.withCredentials || false; // var chunkedMode = !!options.chunkedMode; // Not supported - var headers = options.headers || {}; - var httpMethod = options.httpMethod && options.httpMethod.toUpperCase() === 'PUT' ? 'PUT' : 'POST'; + const headers = options.headers || {}; + const httpMethod = options.httpMethod && options.httpMethod.toUpperCase() === 'PUT' ? 'PUT' : 'POST'; - var basicAuthHeader = getBasicAuthHeader(server); + const basicAuthHeader = getBasicAuthHeader(server); if (basicAuthHeader) { server = server.replace(getUrlCredentials(server) + '@', ''); headers[basicAuthHeader.name] = basicAuthHeader.value; } - var that = this; - var xhr = (transfers[this._id] = new XMLHttpRequest()); + const that = this; + const xhr = (transfers[this._id] = new XMLHttpRequest()); xhr.withCredentials = withCredentials; - var fail = + const fail = errorCallback && function (code, status, response) { if (transfers[this._id]) { delete transfers[this._id]; } - var error = new FileTransferError(code, filePath, server, status, response); + const error = new FileTransferError(code, filePath, server, status, response); if (errorCallback) { errorCallback(error); } @@ -142,14 +142,14 @@ FileTransfer.prototype.upload = function (filePath, server, successCallback, err function (entry) { entry.file( function (file) { - var reader = new FileReader(); + const reader = new FileReader(); reader.onloadend = function () { - var blob = new Blob([this.result], { type: mimeType }); + const blob = new Blob([this.result], { type: mimeType }); // Prepare form data to send to server - var fd = new FormData(); + const fd = new FormData(); fd.append(fileKey, blob, fileName); - for (var prop in params) { + for (const prop in params) { if (Object.prototype.hasOwnProperty.call(params, prop)) { fd.append(prop, params[prop]); } @@ -158,7 +158,7 @@ FileTransfer.prototype.upload = function (filePath, server, successCallback, err xhr.open(httpMethod, server); // Fill XHR headers - for (var header in headers) { + for (const header in headers) { if (Object.prototype.hasOwnProperty.call(headers, header)) { xhr.setRequestHeader(header, headers[header]); } @@ -167,7 +167,7 @@ FileTransfer.prototype.upload = function (filePath, server, successCallback, err xhr.onload = function () { // 2xx codes are valid if (this.status >= 200 && this.status < 300) { - var result = new FileUploadResult(); + const result = new FileUploadResult(); result.bytesSent = blob.size; result.responseCode = this.status; result.response = this.response; @@ -242,19 +242,19 @@ FileTransfer.prototype.download = function (source, target, successCallback, err options = options || {}; - var headers = options.headers || {}; - var withCredentials = options.withCredentials || false; + const headers = options.headers || {}; + const withCredentials = options.withCredentials || false; - var basicAuthHeader = getBasicAuthHeader(source); + const basicAuthHeader = getBasicAuthHeader(source); if (basicAuthHeader) { source = source.replace(getUrlCredentials(source) + '@', ''); headers[basicAuthHeader.name] = basicAuthHeader.value; } - var that = this; - var xhr = (transfers[this._id] = new XMLHttpRequest()); + const that = this; + const xhr = (transfers[this._id] = new XMLHttpRequest()); xhr.withCredentials = withCredentials; - var fail = + const fail = errorCallback && function (code, status, response) { if (transfers[that._id]) { @@ -263,24 +263,24 @@ FileTransfer.prototype.download = function (source, target, successCallback, err // In XHR GET reqests we're setting response type to Blob // but in case of error we need to raise event with plain text response if (response instanceof Blob) { - var reader = new FileReader(); + const reader = new FileReader(); reader.readAsText(response); reader.onloadend = function (e) { - var error = new FileTransferError(code, source, target, status, e.target.result); + const error = new FileTransferError(code, source, target, status, e.target.result); errorCallback(error); }; } else { - var error = new FileTransferError(code, source, target, status, response); + const error = new FileTransferError(code, source, target, status, response); errorCallback(error); } }; xhr.onload = function (e) { - var fileNotFound = function () { + const fileNotFound = function () { fail(FileTransferError.FILE_NOT_FOUND_ERR); }; - var req = e.target; + const req = e.target; // req.status === 0 is special case for local files with file:// URI scheme if ((req.status === 200 || req.status === 0) && req.response) { window.resolveLocalFileSystemURL( @@ -336,7 +336,7 @@ FileTransfer.prototype.download = function (source, target, successCallback, err xhr.open('GET', source, true); - for (var header in headers) { + for (const header in headers) { if (Object.prototype.hasOwnProperty.call(headers, header)) { xhr.setRequestHeader(header, headers[header]); }