diff --git a/package-lock.json b/package-lock.json index 070d41175..4c13256a1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -697,6 +697,12 @@ "fastq": "^1.6.0" } }, + "@sindresorhus/is": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz", + "integrity": "sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==", + "dev": true + }, "@sinonjs/commons": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.1.tgz", @@ -715,6 +721,15 @@ "@sinonjs/commons": "^1.7.0" } }, + "@szmarczak/http-timer": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz", + "integrity": "sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==", + "dev": true, + "requires": { + "defer-to-connect": "^1.0.1" + } + }, "@types/babel__core": { "version": "7.1.12", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.12.tgz", @@ -811,6 +826,12 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", "dev": true }, + "@types/minimist": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", + "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", + "dev": true + }, "@types/node": { "version": "14.14.20", "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.20.tgz", @@ -1081,6 +1102,55 @@ "uri-js": "^4.2.2" } }, + "ansi-align": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", + "dev": true, + "requires": { + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -1204,6 +1274,12 @@ "function-bind": "^1.1.1" } }, + "arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -1396,6 +1472,34 @@ "tweetnacl": "^0.14.3" } }, + "boxen": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", + "integrity": "sha512-eB4uT9RGzg2odpER62bBwSLvUeGC+WbRjjyyFhGsKnc8wp/m0+hQsMUvUe3H2V0D5vw0nBdO1hCJoZo5mKeuIQ==", + "dev": true, + "requires": { + "ansi-align": "^3.0.0", + "camelcase": "^5.3.1", + "chalk": "^3.0.0", + "cli-boxes": "^2.2.0", + "string-width": "^4.1.0", + "term-size": "^2.1.0", + "type-fest": "^0.8.1", + "widest-line": "^3.1.0" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -1453,6 +1557,38 @@ "unset-value": "^1.0.0" } }, + "cacheable-request": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", + "integrity": "sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==", + "dev": true, + "requires": { + "clone-response": "^1.0.2", + "get-stream": "^5.1.0", + "http-cache-semantics": "^4.0.0", + "keyv": "^3.0.0", + "lowercase-keys": "^2.0.0", + "normalize-url": "^4.1.0", + "responselike": "^1.0.2" + }, + "dependencies": { + "get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "lowercase-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", + "integrity": "sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==", + "dev": true + } + } + }, "call-bind": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", @@ -1475,6 +1611,17 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, + "camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + } + }, "capture-exit": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", @@ -1541,6 +1688,12 @@ } } }, + "cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true + }, "cliui": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", @@ -1552,6 +1705,15 @@ "wrap-ansi": "^6.2.0" } }, + "clone-response": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz", + "integrity": "sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -1610,6 +1772,20 @@ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "configstore": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz", + "integrity": "sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==", + "dev": true, + "requires": { + "dot-prop": "^5.2.0", + "graceful-fs": "^4.1.2", + "make-dir": "^3.0.0", + "unique-string": "^2.0.0", + "write-file-atomic": "^3.0.0", + "xdg-basedir": "^4.0.0" + } + }, "contains-path": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", @@ -1648,6 +1824,12 @@ "which": "^2.0.1" } }, + "crypto-random-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz", + "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==", + "dev": true + }, "cssom": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", @@ -1706,6 +1888,24 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "requires": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "dependencies": { + "map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true + } + } + }, "decimal.js": { "version": "10.2.1", "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz", @@ -1718,6 +1918,21 @@ "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true, + "requires": { + "mimic-response": "^1.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -1730,6 +1945,12 @@ "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", "dev": true }, + "defer-to-connect": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz", + "integrity": "sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1833,6 +2054,21 @@ } } }, + "dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, "ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -1913,6 +2149,12 @@ "is-symbol": "^1.0.2" } }, + "escape-goat": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz", + "integrity": "sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -2038,6 +2280,21 @@ "integrity": "sha512-hLeA2f5e06W1xyr/93/QJulN/rLbUVUmqTlexv9PRKHFwEC9ffJcH2LvJhMoEqYQBEYafedgGZXH2W8NUpt5lA==", "dev": true }, + "eslint-formatter-pretty": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-4.0.0.tgz", + "integrity": "sha512-QgdeZxQwWcN0TcXXNZJiS6BizhAANFhCzkE7Yl9HKB7WjElzwED6+FbbZB2gji8ofgJTGPqKm6VRCNT3OGCeEw==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "eslint-rule-docs": "^1.1.5", + "log-symbols": "^4.0.0", + "plur": "^4.0.0", + "string-width": "^4.2.0", + "supports-hyperlinks": "^2.0.0" + } + }, "eslint-import-resolver-node": { "version": "0.3.4", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", @@ -2354,6 +2611,12 @@ } } }, + "eslint-rule-docs": { + "version": "1.1.219", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.219.tgz", + "integrity": "sha512-MeihPfW6NSZkm9ia0OpqoZm0r8gU6xJoa+G1PqUCGGZMcJQpFeNTy1ItuNIrtZFsR6n0mVqYR4j55Rd3HxIb+Q==", + "dev": true + }, "eslint-scope": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", @@ -2931,6 +3194,15 @@ "is-glob": "^4.0.1" } }, + "global-dirs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-2.1.0.tgz", + "integrity": "sha512-MG6kdOUh/xBnyo9cJFeIKkLEc1AyFq42QTU4XiX51i2NEdxLxLWXIjEjmqKeSuKR7pAZjTqUVoT2b2huxVLgYQ==", + "dev": true, + "requires": { + "ini": "1.3.7" + } + }, "globals": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", @@ -2954,6 +3226,25 @@ "slash": "^3.0.0" } }, + "got": { + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/got/-/got-9.6.0.tgz", + "integrity": "sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==", + "dev": true, + "requires": { + "@sindresorhus/is": "^0.14.0", + "@szmarczak/http-timer": "^1.1.2", + "cacheable-request": "^6.0.0", + "decompress-response": "^3.3.0", + "duplexer3": "^0.1.4", + "get-stream": "^4.1.0", + "lowercase-keys": "^1.0.1", + "mimic-response": "^1.0.1", + "p-cancelable": "^1.0.0", + "to-readable-stream": "^1.0.0", + "url-parse-lax": "^3.0.0" + } + }, "graceful-fs": { "version": "4.2.4", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", @@ -2983,6 +3274,12 @@ "har-schema": "^2.0.0" } }, + "hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -3056,6 +3353,12 @@ } } }, + "has-yarn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", + "integrity": "sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw==", + "dev": true + }, "hosted-git-info": { "version": "2.8.8", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", @@ -3077,6 +3380,12 @@ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", "dev": true }, + "http-cache-semantics": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz", + "integrity": "sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==", + "dev": true + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -3119,6 +3428,12 @@ "resolve-from": "^4.0.0" } }, + "import-lazy": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz", + "integrity": "sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM=", + "dev": true + }, "import-local": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", @@ -3135,6 +3450,12 @@ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", "dev": true }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3151,6 +3472,12 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, + "ini": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz", + "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==", + "dev": true + }, "internal-slot": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.2.tgz", @@ -3189,6 +3516,12 @@ "integrity": "sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk=", "dev": true }, + "irregular-plurals": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.2.0.tgz", + "integrity": "sha512-YqTdPLfwP7YFN0SsD3QUVCkm9ZG2VzOXv3DOrw5G5mkMbVwptTwVcFv7/C0vOpBmgTxAeTG19XpUs1E522LW9Q==", + "dev": true + }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", @@ -3330,18 +3663,52 @@ "is-extglob": "^2.1.1" } }, + "is-installed-globally": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.3.2.tgz", + "integrity": "sha512-wZ8x1js7Ia0kecP/CHM/3ABkAmujX7WPvQk6uu3Fly/Mk44pySulQpnHG46OMjHGXApINnV4QhY3SWnECO2z5g==", + "dev": true, + "requires": { + "global-dirs": "^2.0.1", + "is-path-inside": "^3.0.1" + } + }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", "dev": true }, + "is-npm": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-4.0.0.tgz", + "integrity": "sha512-96ECIfh9xtDDlPylNPXhzjsykHsMJZ18ASpaWzQyBr4YRTcVjUvzaHayDAES2oU/3KpljhHUjtSRNiDwi0F0ig==", + "dev": true + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", "dev": true }, + "is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true + }, + "is-path-inside": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -3409,6 +3776,12 @@ "is-docker": "^2.0.0" } }, + "is-yarn-global": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz", + "integrity": "sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -4031,6 +4404,12 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", + "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -4098,6 +4477,15 @@ "object.assign": "^4.1.2" } }, + "keyv": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", + "integrity": "sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==", + "dev": true, + "requires": { + "json-buffer": "3.0.0" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -4110,6 +4498,15 @@ "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, + "latest-version": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz", + "integrity": "sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA==", + "dev": true, + "requires": { + "package-json": "^6.3.0" + } + }, "leven": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", @@ -4182,6 +4579,15 @@ "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", "dev": true }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dev": true, + "requires": { + "chalk": "^4.0.0" + } + }, "loose-envify": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", @@ -4191,6 +4597,12 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "lowercase-keys": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz", + "integrity": "sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==", + "dev": true + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -4232,6 +4644,12 @@ "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", "dev": true }, + "map-obj": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz", + "integrity": "sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==", + "dev": true + }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", @@ -4241,6 +4659,33 @@ "object-visit": "^1.0.0" } }, + "meow": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-7.1.1.tgz", + "integrity": "sha512-GWHvA5QOcS412WCo8vwKDlTelGLsCGBVevQB5Kva961rmNfun0PCbv5+xta2kUMFJyR8/oWnn7ddeKdosbAPbA==", + "dev": true, + "requires": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^2.5.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.13.1", + "yargs-parser": "^18.1.3" + }, + "dependencies": { + "type-fest": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.13.1.tgz", + "integrity": "sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==", + "dev": true + } + } + }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", @@ -4284,6 +4729,18 @@ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", "dev": true }, + "mimic-response": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz", + "integrity": "sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==", + "dev": true + }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -4299,6 +4756,17 @@ "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, + "minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "requires": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + } + }, "mixin-deep": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", @@ -4419,6 +4887,12 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "normalize-url": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", + "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==", + "dev": true + }, "npm-run-path": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", @@ -4595,6 +5069,12 @@ "word-wrap": "^1.2.3" } }, + "p-cancelable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz", + "integrity": "sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==", + "dev": true + }, "p-each-series": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", @@ -4631,6 +5111,26 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "package-json": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz", + "integrity": "sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ==", + "dev": true, + "requires": { + "got": "^9.6.0", + "registry-auth-token": "^4.0.0", + "registry-url": "^5.0.0", + "semver": "^6.2.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4817,6 +5317,15 @@ "find-up": "^4.0.0" } }, + "plur": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", + "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", + "dev": true, + "requires": { + "irregular-plurals": "^3.2.0" + } + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -4829,6 +5338,12 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "prepend-http": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz", + "integrity": "sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=", + "dev": true + }, "pretty-format": { "version": "26.6.2", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", @@ -4898,12 +5413,47 @@ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", "dev": true }, + "pupa": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz", + "integrity": "sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A==", + "dev": true, + "requires": { + "escape-goat": "^2.0.0" + } + }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, + "quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "dependencies": { + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + } + } + }, "react-is": { "version": "17.0.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.1.tgz", @@ -4941,6 +5491,16 @@ "type-fest": "^0.8.1" } }, + "redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "requires": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + } + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -4988,6 +5548,24 @@ "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", "dev": true }, + "registry-auth-token": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz", + "integrity": "sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, + "registry-url": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz", + "integrity": "sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw==", + "dev": true, + "requires": { + "rc": "^1.2.8" + } + }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", @@ -5141,6 +5719,15 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, + "responselike": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz", + "integrity": "sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=", + "dev": true, + "requires": { + "lowercase-keys": "^1.0.0" + } + }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", @@ -5354,6 +5941,23 @@ "lru-cache": "^6.0.0" } }, + "semver-diff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", + "integrity": "sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg==", + "dev": true, + "requires": { + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -6007,6 +6611,15 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -6070,6 +6683,12 @@ } } }, + "term-size": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", + "integrity": "sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==", + "dev": true + }, "terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", @@ -6135,6 +6754,12 @@ } } }, + "to-readable-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz", + "integrity": "sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==", + "dev": true + }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", @@ -6176,6 +6801,12 @@ "punycode": "^2.1.1" } }, + "trim-newlines": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz", + "integrity": "sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==", + "dev": true + }, "tsconfig-paths": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", @@ -6205,6 +6836,20 @@ } } }, + "tsd": { + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.14.0.tgz", + "integrity": "sha512-fl1gS5orAwqIb0P2xMdppgCrwv1BfCJn67wBzRBCV9OUaWHVXHqiIqL6yX/519xFgT1ZOaLMhr5W9XDo8kuuRA==", + "dev": true, + "requires": { + "eslint-formatter-pretty": "^4.0.0", + "globby": "^11.0.1", + "meow": "^7.0.1", + "path-exists": "^4.0.0", + "read-pkg-up": "^7.0.0", + "update-notifier": "^4.1.0" + } + }, "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", @@ -6283,6 +6928,15 @@ "set-value": "^2.0.1" } }, + "unique-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz", + "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==", + "dev": true, + "requires": { + "crypto-random-string": "^2.0.0" + } + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -6323,6 +6977,39 @@ } } }, + "update-notifier": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/update-notifier/-/update-notifier-4.1.3.tgz", + "integrity": "sha512-Yld6Z0RyCYGB6ckIjffGOSOmHXj1gMeE7aROz4MG+XMkmixBX4jUngrGXNYz7wPKBmtoD4MnBa2Anu7RSKht/A==", + "dev": true, + "requires": { + "boxen": "^4.2.0", + "chalk": "^3.0.0", + "configstore": "^5.0.1", + "has-yarn": "^2.1.0", + "import-lazy": "^2.1.0", + "is-ci": "^2.0.0", + "is-installed-globally": "^0.3.1", + "is-npm": "^4.0.0", + "is-yarn-global": "^0.3.0", + "latest-version": "^5.0.0", + "pupa": "^2.0.1", + "semver-diff": "^3.1.1", + "xdg-basedir": "^4.0.0" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, "uri-js": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", @@ -6338,6 +7025,15 @@ "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", "dev": true }, + "url-parse-lax": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz", + "integrity": "sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=", + "dev": true, + "requires": { + "prepend-http": "^2.0.0" + } + }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", @@ -6471,6 +7167,15 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "requires": { + "string-width": "^4.0.0" + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/package.json b/package.json index c94e32b16..b4307dc84 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "typescript-lint": "eslint typings/*.ts", "test": "jest && npm run test-typings", "test-esm": "node --experimental-modules ./tests/esm-test.mjs", - "test-typings": "tsc -p tsconfig.json", + "test-typings": "tsd", "typescript-checkJS": "tsc --allowJS --checkJS index.js --noEmit", "test-all": "npm run test && npm run lint && npm run typescript-lint && npm run typescript-checkJS && npm run test-esm" }, @@ -45,9 +45,10 @@ "eslint-plugin-jest": "^24.1.3", "jest": "^26.6.3", "standard": "^16.0.3", + "tsd": "^0.14.0", "typescript": "^4.1.2" }, - "typings": "typings/index.d.ts", + "types": "typings/index.d.ts", "jest": { "collectCoverage": true }, diff --git a/tsconfig.json b/tsconfig.json index 24b014583..8be030472 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,8 +13,5 @@ "noEmit": true, "forceConsistentCasingInFileNames": true }, - "files": [ - "typings/index.d.ts", - "typings/commander-tests.ts" - ] + "include": ["**/*.ts"], } diff --git a/typings/commander-tests.ts b/typings/commander-tests.ts deleted file mode 100644 index 7e0e71b8a..000000000 --- a/typings/commander-tests.ts +++ /dev/null @@ -1,342 +0,0 @@ -import * as commander from './index'; - -// Test Commander usage with TypeScript. -// This is NOT a usable program, just used to test for compile errors! - -// We declare lots of variables just to check types of right-side of expression, so disable this: -/* eslint-disable @typescript-eslint/no-unused-vars */ - -// This conflicts with esline rule saying no space! -/* eslint-disable @typescript-eslint/space-before-function-paren */ - -const program: commander.Command = new commander.Command(); -// program.silly; // <-- Error, hurrah! - -// Check for exported global Command objects -const importedDefaultProgram: commander.Command = commander; -const importedExplicitProgram: commander.Command = commander.program; - -// Check export classes exist -const commandInstance1 = new commander.Command(); -const commandInstance2 = new commander.Command('name'); -const optionsInstance = new commander.Option('-f'); -const errorInstance = new commander.CommanderError(1, 'code', 'message'); -const invalidOptionErrorInstance = new commander.InvalidOptionArgumentError('message'); - -// Command properties -const theArgs: string[] = program.args; -const theCommands: commander.Command[] = program.commands; - -// version -const versionThis1: commander.Command = program.version('1.2.3'); -const versionThis2: commander.Command = program.version('1.2.3', '-r,--revision'); -const versionThis3: commander.Command = program.version('1.2.3', '-r,--revision', 'show revision information'); - -// command (and CommandOptions) -const commandNew1: commander.Command = program.command('action'); -const commandNew2: commander.Command = program.command('action', { isDefault: true, hidden: true, noHelp: true }); -const commandThis1: commander.Command = program.command('exec', 'exec description'); -const commandThis2: commander.Command = program.command('exec', 'exec description', { isDefault: true, hidden: true, noHelp: true, executableFile: 'foo' }); - -// addCommand -const addCommandThis: commander.Command = program.addCommand(new commander.Command('abc')); - -// arguments -const argumentsThis: commander.Command = program.arguments(' [env]'); - -// addHelpCommand -const addHelpCommandThis1: commander.Command = program.addHelpCommand(); -const addHelpCommandThis3: commander.Command = program.addHelpCommand(false); -const addHelpCommandThis2: commander.Command = program.addHelpCommand(true); -const addHelpCommandThis4: commander.Command = program.addHelpCommand('compress '); -const addHelpCommandThis5: commander.Command = program.addHelpCommand('compress ', 'compress target file'); - -// exitOverride -const exitThis1: commander.Command = program.exitOverride(); -const exitThis2: commander.Command = program.exitOverride((err): never => { - return process.exit(err.exitCode); -}); -const exitThis3: commander.Command = program.exitOverride((err): void => { - if (err.code !== 'commander.executeSubCommandAsync') { - throw err; - } else { - // Async callback from spawn events, not useful to throw. - } -}); - -// action -const actionThis1: commander.Command = program.action(() => { - // do nothing. -}); -const actionThis2: commander.Command = program.action(async() => { - // do nothing. -}); - -// option -const optionThis1: commander.Command = program.option('-a,--alpha'); -const optionThis2: commander.Command = program.option('-p, --peppers', 'Add peppers'); -const optionThis3: commander.Command = program.option('-s, --string [value]', 'default string', 'value'); -const optionThis4: commander.Command = program.option('-b, --boolean', 'default boolean', false); -program.option('--drink ', 'float argument', parseFloat); -const optionThis6: commander.Command = program.option('-f, --float ', 'float argument', parseFloat, 3.2); -const optionThis7: commander.Command = program.option('-i, --integer ', 'integer argument', myParseInt); -const optionThis8: commander.Command = program.option('-i, --integer ', 'integer argument', myParseInt, 5); -const optionThis9: commander.Command = program.option('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0); -const optionThis10: commander.Command = program.option('-c, --collect ', 'repeatable value', collect, []); -const optionThis11: commander.Command = program.option('-l, --list ', 'comma separated list', commaSeparatedList); - -// requiredOption, same tests as option -const requiredOptionThis1: commander.Command = program.requiredOption('-a,--alpha'); -const requiredOptionThis2: commander.Command = program.requiredOption('-p, --peppers', 'Add peppers'); -const requiredOptionThis3: commander.Command = program.requiredOption('-s, --string [value]', 'default string', 'value'); -const requiredOptionThis4: commander.Command = program.requiredOption('-b, --boolean', 'default boolean', false); -program.requiredOption('--drink ', 'float argument', parseFloat); -const requiredOptionThis6: commander.Command = program.requiredOption('-f, --float ', 'float argument', parseFloat, 3.2); -const requiredOptionThis7: commander.Command = program.requiredOption('-i, --integer ', 'integer argument', myParseInt); -const requiredOptionThis8: commander.Command = program.requiredOption('-i, --integer ', 'integer argument', myParseInt, 5); -const requiredOptionThis9: commander.Command = program.requiredOption('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0); -const requiredOptionThis10: commander.Command = program.requiredOption('-c, --collect ', 'repeatable value', collect, []); -const requiredOptionThis11: commander.Command = program.requiredOption('-l, --list ', 'comma separated list', commaSeparatedList); - -// createOption -const createOption1: commander.Option = program.createOption('a, --alpha'); -const createOption2: commander.Option = program.createOption('a, --alpha', 'description'); - -// addOption -const addOptionThis: commander.Command = program.addOption(new commander.Option('-s,--simple')); - -// storeOptionsAsProperties -// chaining -const storeOptionsAsPropertiesThis1: commander.Command = program.storeOptionsAsProperties(); -const storeOptionsAsPropertiesThis2: commander.Command = program.storeOptionsAsProperties(false); -// return type depends on parameter -const storeOptionsAsPropertiesThis3 = program.storeOptionsAsProperties(); -const storeOptionsAsPropertiesValue3 = storeOptionsAsPropertiesThis3.someOption; -const storeOptionsAsPropertiesThis4 = program.storeOptionsAsProperties(true); -const storeOptionsAsPropertiesValue4 = storeOptionsAsPropertiesThis4.someOption; -const storeOptionsAsPropertiesThis5 = program.storeOptionsAsProperties(false); -// const storeOptionsAsPropertiesValue5 = storeOptionsAsPropertiesThis5.someOption; // error - -// combineFlagAndOptionalValue -const combineFlagAndOptionalValueThis1: commander.Command = program.combineFlagAndOptionalValue(); -const combineFlagAndOptionalValueThis2: commander.Command = program.combineFlagAndOptionalValue(false); - -// allowUnknownOption -const allowUnknownOptionThis1: commander.Command = program.allowUnknownOption(); -const allowUnknownOptionThis2: commander.Command = program.allowUnknownOption(false); - -// allowExcessArguments -const allowExcessArgumentsThis1: commander.Command = program.allowExcessArguments(); -const allowExcessArgumentsThis2: commander.Command = program.allowExcessArguments(false); - -// enablePositionalOptions -const enablePositionalOptionsThis1: commander.Command = program.enablePositionalOptions(); -const enablePositionalOptionsThis2: commander.Command = program.enablePositionalOptions(false); - -// passThroughOptions -const passThroughOptionsThis1: commander.Command = program.passThroughOptions(); -const passThroughOptionsThis2: commander.Command = program.passThroughOptions(false); - -// parse -const parseThis1: commander.Command = program.parse(); -const parseThis2: commander.Command = program.parse(process.argv); -const parseThis3: commander.Command = program.parse(['node', 'script.js'], { from: 'node' }); -const parseThis4: commander.Command = program.parse(['node', 'script.js'], { from: 'electron' }); -const parseThis5: commander.Command = program.parse(['--option'], { from: 'user' }); - -// parseAsync, same tests as parse -const parseAsyncThis1: Promise = program.parseAsync(); -const parseAsyncThis2: Promise = program.parseAsync(process.argv); -const parseAsyncThis3: Promise = program.parseAsync(['node', 'script.js'], { from: 'node' }); -const parseAsyncThis4: Promise = program.parseAsync(['node', 'script.js'], { from: 'electron' }); -const parseAsyncThis5: Promise = program.parseAsync(['--option'], { from: 'user' }); - -// parseOptions (and ParseOptionsResult) -const { operands, unknown } = program.parseOptions(['node', 'script.js', 'hello']); - -// opts -const opts = program.opts(); -const optsVal1 = opts.foo; -// eslint-disable-next-line @typescript-eslint/dot-notation -const opstVale2 = opts['bar']; - -// description -const descriptionThis: commander.Command = program.description('my description'); -const descriptionValue: string = program.description(); - -// alias -const aliasThis: commander.Command = program.alias('my alias'); -const aliasValue: string = program.alias(); - -// aliases -const aliasesThis: commander.Command = program.aliases(['first-alias', 'second-alias']); -const aliasesValue: string[] = program.aliases(); - -// usage -const usageThis: commander.Command = program.usage('my usage'); -const usageValue: string = program.usage(); - -// name -const nameThis: commander.Command = program.name('my-name'); -const nameValue: string = program.name(); - -// outputHelp -program.outputHelp(); -program.outputHelp((str: string) => { return str; }); -program.outputHelp({ error: true }); - -// help -program.help(); -program.help((str: string) => { return str; }); -program.help({ error: true }); - -// helpInformation -const helpInformnationValue: string = program.helpInformation(); -const helpInformnationValue2: string = program.helpInformation({ error: true }); - -// helpOption -const helpOptionThis1: commander.Command = program.helpOption('-h,--help'); -const helpOptionThis2: commander.Command = program.helpOption('-h,--help', 'custom description'); -const helpOptionThis3: commander.Command = program.helpOption(undefined, 'custom description'); -const helpOptionThis4: commander.Command = program.helpOption(false); - -// addHelpText -const addHelpTextThis1: commander.Command = program.addHelpText('after', 'text'); -const addHelpTextThis2: commander.Command = program.addHelpText('afterAll', 'text'); -const addHelpTextThis3: commander.Command = program.addHelpText('before', () => 'before'); -const addHelpTextThis4: commander.Command = program.addHelpText('beforeAll', (context: commander.AddHelpTextContext) => { - if (context.error) { - return; // Can return nothing to skip display - } - return context.command.name(); -}); - -// on -const onThis: commander.Command = program.on('command:foo', () => { - // do nothing. -}); - -// createCommand - -const createInstance2: commander.Command = program.createCommand('name'); - -class MyCommand extends commander.Command { - createCommand(name?: string): MyCommand { - return new MyCommand(name); - } - - myFunction(): void { - // do nothing. - } -} -const myProgram = new MyCommand(); -myProgram.myFunction(); -const mySub = myProgram.command('sub'); -mySub.myFunction(); - -// configureHelp - -const createHelpInstance: commander.Help = program.createHelp(); -const configureHelpThis: commander.Command = program.configureHelp({ - sortSubcommands: true, // override property - visibleCommands: (cmd: commander.Command) => [] // override method -}); -const helpConfiguration: commander.HelpConfiguration = program.configureHelp(); - -// configureOutput -const configureOutputThis: commander.Command = program.configureOutput({ }); -const configureOutputConfig: commander.OutputConfiguration = program.configureOutput(); - -program.configureOutput({ - writeOut: (str: string) => console.log(str), - writeErr: (str: string) => console.error(str), - getOutHelpWidth: () => 80, - getErrHelpWidth: () => 80, - outputError: (str: string, write: (str: string) => void) => { write(str); } -}); - -// Help -const helper = new commander.Help(); -const helperCommand = new commander.Command(); -const helperOption = new commander.Option('-a, --all'); - -helper.helpWidth = 3; -helper.sortSubcommands = true; -helper.sortOptions = false; - -const subcommandTermStr: string = helper.subcommandTerm(helperCommand); -const commandUsageStr: string = helper.commandUsage(helperCommand); -const commandDescriptionStr: string = helper.commandDescription(helperCommand); -const subcommandDescriptionStr: string = helper.subcommandDescription(helperCommand); -const optionTermStr: string = helper.optionTerm(helperOption); -const optionDescriptionStr: string = helper.optionDescription(helperOption); - -const visibleCommands: commander.Command[] = helper.visibleCommands(helperCommand); -const visibleOptions: commander.Option[] = helper.visibleOptions(helperCommand); -const visibleArguments: Array<{ term: string; description: string}> = helper.visibleArguments(helperCommand); - -const widestCommand: number = helper.longestSubcommandTermLength(helperCommand, helper); -const widestOption: number = helper.longestOptionTermLength(helperCommand, helper); -const widestArgument: number = helper.longestArgumentTermLength(helperCommand, helper); -const widest: number = helper.padWidth(helperCommand, helper); - -const wrapped: string = helper.wrap('a b c', 50, 3); - -const formatted: string = helper.formatHelp(helperCommand, helper); - -// Option methods - -const baseOption = new commander.Option('-f,--foo', 'foo description'); - -// default -const myOptionThis1: commander.Option = baseOption.default(3); -const myOptionThis2: commander.Option = baseOption.default(60, 'one minute'); - -// fullDescription -const optionDescription: string = baseOption.fullDescription(); - -// argParser -const myOptionThis3: commander.Option = baseOption.argParser((value: string) => parseInt(value)); -const myOptionThis4: commander.Option = baseOption.argParser((value: string, previous: string[]) => { return previous.concat(value); }); - -// makeOptionMandatory -const myOptionThis5: commander.Option = baseOption.makeOptionMandatory(); -const myOptionThis6: commander.Option = baseOption.makeOptionMandatory(true); - -// hideHelp -const hideHelpThis1: commander.Option = baseOption.hideHelp(); -const hideHelpThis2: commander.Option = baseOption.hideHelp(true); -const hideHelpThis3: commander.Option = baseOption.hideHelp(false); - -// argumentRejected -function goodbye(): never { - return baseOption.argumentRejected('failed'); -} - -// choices -const choicesThis: commander.Option = baseOption.choices(['a', 'b']); - -// name -const optionName: string = baseOption.name(); diff --git a/typings/index.test-d.ts b/typings/index.test-d.ts new file mode 100644 index 000000000..6b56e5f0b --- /dev/null +++ b/typings/index.test-d.ts @@ -0,0 +1,325 @@ +import * as commander from './index'; +import {expectType, expectAssignable} from 'tsd'; + +// We are are not just checking return types here, we are also implicitly checking that the expected syntax is allowed. + +const program: commander.Command = new commander.Command(); +// program.silly; // <-- Error, hurrah! + +// Check for exported global Command object(s) +expectAssignable(commander); // legacy default export of program +expectType(commander.program); + +// Check export classes and functions exist +expectType(new commander.Command()); +expectType(new commander.Command('name')); +expectType(new commander.Option('-f')); +expectType(new commander.CommanderError(1, 'code', 'message')); +expectType(new commander.InvalidOptionArgumentError('message')); +expectType(commander.createCommand()); + +// Command properties +expectType(program.args); +expectType(program.commands); + +// version +expectType(program.version('1.2.3')); +expectType(program.version('1.2.3', '-r,--revision')); +expectType(program.version('1.2.3', '-r,--revision', 'show revision information')); + +// command (and CommandOptions) +expectType(program.command('action')); +expectType(program.command('action', { isDefault: true, hidden: true, noHelp: true })); +expectType(program.command('exec', 'exec description')); +expectType(program.command('exec', 'exec description', { isDefault: true, hidden: true, noHelp: true, executableFile: 'foo' })); + +// addCommand +expectType(program.addCommand(new commander.Command('abc'))); + +// arguments +expectType(program.arguments(' [env]')); + +// addHelpCommand +expectType(program.addHelpCommand()); +expectType(program.addHelpCommand(false)); +expectType(program.addHelpCommand(true)); +expectType(program.addHelpCommand('compress ')); +expectType(program.addHelpCommand('compress ', 'compress target file')); + +// exitOverride +expectType(program.exitOverride()); +expectType(program.exitOverride((err): never => { + return process.exit(err.exitCode); +})); +expectType(program.exitOverride((err): void => { + if (err.code !== 'commander.executeSubCommandAsync') { + throw err; + } else { + // Async callback from spawn events, not useful to throw. + } +})); + +// action +expectType(program.action(() => { + // do nothing. +})); +expectType(program.action(async() => { + // do nothing. +})); + +// option +expectType(program.option('-a,--alpha')); +expectType(program.option('-p, --peppers', 'Add peppers')); +expectType(program.option('-s, --string [value]', 'default string', 'value')); +expectType(program.option('-b, --boolean', 'default boolean', false)); +expectType(program.option('--drink (program.option('-f, --float ', 'float argument', parseFloat)); +expectType(program.option('-f, --float ', 'float argument', parseFloat, 3.2)); +expectType(program.option('-i, --integer ', 'integer argument', myParseInt)); +expectType(program.option('-i, --integer ', 'integer argument', myParseInt, 5)); +expectType(program.option('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0)); +expectType(program.option('-c, --collect ', 'repeatable value', collect, [])); +expectType(program.option('-l, --list ', 'comma separated list', commaSeparatedList)); + +// requiredOption, same tests as option +expectType(program.requiredOption('-a,--alpha')); +expectType(program.requiredOption('-p, --peppers', 'Add peppers')); +expectType(program.requiredOption('-s, --string [value]', 'default string', 'value')); +expectType(program.requiredOption('-b, --boolean', 'default boolean', false)); +expectType(program.requiredOption('--drink (program.requiredOption('-f, --float ', 'float argument', parseFloat)); +expectType(program.requiredOption('-f, --float ', 'float argument', parseFloat, 3.2)); +expectType(program.requiredOption('-i, --integer ', 'integer argument', myParseInt)); +expectType(program.requiredOption('-i, --integer ', 'integer argument', myParseInt, 5)); +expectType(program.requiredOption('-v, --verbose', 'verbosity that can be increased', increaseVerbosity, 0)); +expectType(program.requiredOption('-c, --collect ', 'repeatable value', collect, [])); +expectType(program.requiredOption('-l, --list ', 'comma separated list', commaSeparatedList)); + +// createOption +expectType(program.createOption('a, --alpha')); +expectType(program.createOption('a, --alpha', 'description')); + +// addOption +expectType(program.addOption(new commander.Option('-s,--simple'))); + +// storeOptionsAsProperties +expectType(program.storeOptionsAsProperties()); +expectType(program.storeOptionsAsProperties(true)); +expectType(program.storeOptionsAsProperties(false)); + +// combineFlagAndOptionalValue +expectType(program.combineFlagAndOptionalValue()); +expectType(program.combineFlagAndOptionalValue(false)); + +// allowUnknownOption +expectType(program.allowUnknownOption()); +expectType(program.allowUnknownOption(false)); + +// allowExcessArguments +expectType(program.allowExcessArguments()); +expectType(program.allowExcessArguments(false)); + +// enablePositionalOptions +expectType(program.enablePositionalOptions()); +expectType(program.enablePositionalOptions(false)); + +// passThroughOptions +expectType(program.passThroughOptions()); +expectType(program.passThroughOptions(false)); + +// parse +expectType(program.parse()); +expectType(program.parse(process.argv)); +expectType(program.parse(['node', 'script.js'], { from: 'node' })); +expectType(program.parse(['node', 'script.js'], { from: 'electron' })); +expectType(program.parse(['--option'], { from: 'user' })); + +// parseAsync, same tests as parse +expectType>(program.parseAsync()); +expectType>(program.parseAsync(process.argv)); +expectType>(program.parseAsync(['node', 'script.js'], { from: 'node' })); +expectType>(program.parseAsync(['node', 'script.js'], { from: 'electron' })); +expectType>(program.parseAsync(['--option'], { from: 'user' })); + +// parseOptions (and ParseOptionsResult) +expectType<{operands: string[]; unknown: string[]}>(program.parseOptions(['node', 'script.js', 'hello'])); + +// opts +const opts = program.opts(); +expectType(opts); +expectType(opts.foo); +expectType(opts['bar']); + +// description +expectType(program.description('my description')); +expectType(program.description()); + +// alias +expectType(program.alias('my alias')); +expectType(program.alias()); + +// aliases +expectType(program.aliases(['first-alias', 'second-alias'])); +expectType(program.aliases()); + +// usage +expectType(program.usage('my usage')); +expectType(program.usage()); + +// name +expectType(program.name('my-name')); +expectType(program.name()); + +// outputHelp +expectType(program.outputHelp()); +expectType(program.outputHelp((str: string) => { return str; })); +expectType(program.outputHelp({ error: true })); + +// help +expectType(program.help()); +expectType(program.help((str: string) => { return str; })); +expectType(program.help({ error: true })); + +// helpInformation +expectType(program.helpInformation()); +expectType(program.helpInformation({ error: true })); + +// helpOption +expectType(program.helpOption('-h,--help')); +expectType(program.helpOption('-h,--help', 'custom description')); +expectType(program.helpOption(undefined, 'custom description')); +expectType(program.helpOption(false)); + +// addHelpText +expectType(program.addHelpText('after', 'text')); +expectType(program.addHelpText('afterAll', 'text')); +expectType(program.addHelpText('before', () => 'before')); +expectType(program.addHelpText('beforeAll', (context: commander.AddHelpTextContext) => { + if (context.error) { + return; // Can return nothing to skip display + } + return context.command.name(); +})); + +// on +expectType(program.on('command:foo', () => { + // do nothing. +})); + +// createCommand +expectType(program.createCommand()); +expectType(program.createCommand('name')); + +class MyCommand extends commander.Command { + createCommand(name?: string): MyCommand { + return new MyCommand(name); + } + + myFunction(): void { + // do nothing. + } +} +const myProgram = new MyCommand(); +expectType(myProgram.command('sub')); + +// configureHelp +expectType(program.createHelp()); +expectType(program.configureHelp({ + sortSubcommands: true, // override property + visibleCommands: () => [] // override method +})); +expectType(program.configureHelp()); + +// configureOutput +expectType(program.configureOutput({ })); +expectType(program.configureOutput()); + +expectType(program.configureOutput({ + writeOut: (str: string) => console.log(str), + writeErr: (str: string) => console.error(str), + getOutHelpWidth: () => 80, + getErrHelpWidth: () => 80, + outputError: (str: string, write: (str: string) => void) => { write(str); } +})); + +// Help +const helper = new commander.Help(); +const helperCommand = new commander.Command(); +const helperOption = new commander.Option('-a, --all'); + +expectType(helper.helpWidth); +expectType(helper.sortSubcommands); +expectType(helper.sortOptions); + +expectType(helper.subcommandTerm(helperCommand)); +expectType(helper.commandUsage(helperCommand)); +expectType(helper.commandDescription(helperCommand)); +expectType(helper.subcommandDescription(helperCommand)); +expectType(helper.optionTerm(helperOption)); +expectType(helper.optionDescription(helperOption)); + +expectType(helper.visibleCommands(helperCommand)); +expectType(helper.visibleOptions(helperCommand)); +expectType>(helper.visibleArguments(helperCommand)); + +expectType(helper.longestSubcommandTermLength(helperCommand, helper)); +expectType(helper.longestOptionTermLength(helperCommand, helper)); +expectType(helper.longestArgumentTermLength(helperCommand, helper)); +expectType(helper.padWidth(helperCommand, helper)); + +expectType(helper.wrap('a b c', 50, 3)); + +expectType(helper.formatHelp(helperCommand, helper)); + +// Option methods + +const baseOption = new commander.Option('-f,--foo', 'foo description'); + +// default +expectType(baseOption.default(3)); +expectType(baseOption.default(60, 'one minute')); + +// fullDescription +expectType(baseOption.fullDescription()); + +// argParser +expectType(baseOption.argParser((value: string) => parseInt(value))); +expectType(baseOption.argParser((value: string, previous: string[]) => { return previous.concat(value); })); + +// makeOptionMandatory +expectType(baseOption.makeOptionMandatory()); +expectType(baseOption.makeOptionMandatory(true)); + +// hideHelp +expectType(baseOption.hideHelp()); +expectType(baseOption.hideHelp(true)); +expectType(baseOption.hideHelp(false)); + +// argumentRejected +expectType(baseOption.argumentRejected('failed')); + +// choices +expectType(baseOption.choices(['a', 'b'])); + +// name +expectType(baseOption.name());