diff --git a/change/@azure-msal-common-2f239598-9032-49d8-a2a3-f97f5b3ad268.json b/change/@azure-msal-common-2f239598-9032-49d8-a2a3-f97f5b3ad268.json new file mode 100644 index 0000000000..ce5799e616 --- /dev/null +++ b/change/@azure-msal-common-2f239598-9032-49d8-a2a3-f97f5b3ad268.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: fix device code polling bug", + "packageName": "@azure/msal-common", + "email": "samuelkamau@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@azure-msal-common-84845d56-56d3-493d-88fc-d86ef0876b99.json b/change/@azure-msal-common-84845d56-56d3-493d-88fc-d86ef0876b99.json new file mode 100644 index 0000000000..6859458107 --- /dev/null +++ b/change/@azure-msal-common-84845d56-56d3-493d-88fc-d86ef0876b99.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Remove input params from Empty Scopes error constructors #3654", + "packageName": "@azure/msal-common", + "email": "thomas.norling@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@azure-msal-node-93f8af6f-cfda-4d84-8af6-86620f007e92.json b/change/@azure-msal-node-93f8af6f-cfda-4d84-8af6-86620f007e92.json new file mode 100644 index 0000000000..c8ffa06a51 --- /dev/null +++ b/change/@azure-msal-node-93f8af6f-cfda-4d84-8af6-86620f007e92.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: have the log level propagate to msal-common", + "packageName": "@azure/msal-node", + "email": "samuelkamau@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/lib/msal-common/.babelrc b/lib/msal-common/.babelrc index bb3be65fb5..cc19f74b7f 100644 --- a/lib/msal-common/.babelrc +++ b/lib/msal-common/.babelrc @@ -10,7 +10,6 @@ ], "plugins": [ "@babel/proposal-class-properties", - "@babel/proposal-object-rest-spread", - "istanbul" + "@babel/proposal-object-rest-spread" ] } diff --git a/lib/msal-common/.mocharc.json b/lib/msal-common/.mocharc.json deleted file mode 100644 index 24a27da3e3..0000000000 --- a/lib/msal-common/.mocharc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "require": ["./test/mochaSetup.js", "@babel/polyfill"], - "spec": ["./test/**/*.spec.ts"] -} diff --git a/lib/msal-common/.nycrc b/lib/msal-common/.nycrc deleted file mode 100644 index 7251407cb4..0000000000 --- a/lib/msal-common/.nycrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "@istanbuljs/nyc-config-babel", - "extension": [ - ".ts" - ], - "include": [ - "src" - ], - "exclude": [ - "**/*.d.ts" - ], - "all": true, - "clean": false, - "reporter": "lcov" -} diff --git a/lib/msal-common/jest.config.js b/lib/msal-common/jest.config.js new file mode 100644 index 0000000000..786c613791 --- /dev/null +++ b/lib/msal-common/jest.config.js @@ -0,0 +1,10 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + */ + +module.exports = { + preset: "ts-jest", + testEnvironment: "node", + collectCoverageFrom: ["src/**/*.ts"] +}; diff --git a/lib/msal-common/package-lock.json b/lib/msal-common/package-lock.json index 9103e52d21..1448ed8fc0 100644 --- a/lib/msal-common/package-lock.json +++ b/lib/msal-common/package-lock.json @@ -1,4646 +1,8039 @@ { - "name": "@azure/msal-common", - "version": "4.2.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "@babel/code-frame": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", - "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", - "dev": true, - "requires": { - "@babel/highlight": "^7.8.3" - } - }, - "@babel/compat-data": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.0.tgz", - "integrity": "sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g==", - "dev": true, - "requires": { - "browserslist": "^4.9.1", - "invariant": "^2.2.4", - "semver": "^5.5.0" - } + "name": "@azure/msal-common", + "version": "4.3.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz", + "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==", + "dev": true, + "requires": { + "@babel/highlight": "^7.8.3" + } + }, + "@babel/compat-data": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.9.0.tgz", + "integrity": "sha512-zeFQrr+284Ekvd9e7KAX954LkapWiOmQtsfHirhxqfdlX6MEC32iRE+pqUGlYIBchdevaCwvzxWGSy/YBNI85g==", + "dev": true, + "requires": { + "browserslist": "^4.9.1", + "invariant": "^2.2.4", + "semver": "^5.5.0" + } + }, + "@babel/core": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz", + "integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.0", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helpers": "^7.9.0", + "@babel/parser": "^7.9.0", + "@babel/template": "^7.8.6", + "@babel/traverse": "^7.9.0", + "@babel/types": "^7.9.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.1", + "json5": "^2.1.2", + "lodash": "^4.17.13", + "resolve": "^1.3.2", + "semver": "^5.4.1", + "source-map": "^0.5.0" + }, + "dependencies": { + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } }, - "@babel/core": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz", - "integrity": "sha512-kWc7L0fw1xwvI0zi8OKVBuxRVefwGOrKSQMvrQ3dW+bIIavBY3/NpXmpjMy7bQnLgwgzWQZ8TlM57YHpHNHz4w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.0", - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helpers": "^7.9.0", - "@babel/parser": "^7.9.0", - "@babel/template": "^7.8.6", - "@babel/traverse": "^7.9.0", - "@babel/types": "^7.9.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", - "json5": "^2.1.2", - "lodash": "^4.17.13", - "resolve": "^1.3.2", - "semver": "^5.4.1", - "source-map": "^0.5.0" - }, - "dependencies": { - "json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } - } + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true }, - "@babel/generator": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.4.tgz", - "integrity": "sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA==", - "dev": true, - "requires": { - "@babel/types": "^7.9.0", - "jsesc": "^2.5.1", - "lodash": "^4.17.13", - "source-map": "^0.5.0" - } + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + } + } + }, + "@babel/generator": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.9.4.tgz", + "integrity": "sha512-rjP8ahaDy/ouhrvCoU1E5mqaitWrxwuNGU+dy1EpaoK48jZay4MdkskKGIMHLZNewg8sAsqpGSREJwP0zH3YQA==", + "dev": true, + "requires": { + "@babel/types": "^7.9.0", + "jsesc": "^2.5.1", + "lodash": "^4.17.13", + "source-map": "^0.5.0" + } + }, + "@babel/helper-annotate-as-pure": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", + "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", + "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", + "dev": true, + "requires": { + "@babel/helper-explode-assignable-expression": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-compilation-targets": { + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz", + "integrity": "sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.8.6", + "browserslist": "^4.9.1", + "invariant": "^2.2.4", + "levenary": "^1.1.1", + "semver": "^5.5.0" + } + }, + "@babel/helper-create-class-features-plugin": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz", + "integrity": "sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-split-export-declaration": "^7.8.3" + } + }, + "@babel/helper-create-regexp-features-plugin": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", + "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-regex": "^7.8.3", + "regexpu-core": "^4.7.0" + } + }, + "@babel/helper-define-map": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", + "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/types": "^7.8.3", + "lodash": "^4.17.13" + } + }, + "@babel/helper-explode-assignable-expression": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", + "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", + "dev": true, + "requires": { + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-function-name": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", + "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-get-function-arity": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", + "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-hoist-variables": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", + "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-member-expression-to-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", + "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-module-imports": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", + "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-module-transforms": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", + "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-simple-access": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/template": "^7.8.6", + "@babel/types": "^7.9.0", + "lodash": "^4.17.13" + } + }, + "@babel/helper-optimise-call-expression": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", + "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-plugin-utils": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", + "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", + "dev": true + }, + "@babel/helper-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", + "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", + "dev": true, + "requires": { + "lodash": "^4.17.13" + } + }, + "@babel/helper-remap-async-to-generator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", + "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-wrap-function": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-replace-supers": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", + "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", + "dev": true, + "requires": { + "@babel/helper-member-expression-to-functions": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/traverse": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/helper-simple-access": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", + "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", + "dev": true, + "requires": { + "@babel/template": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-split-export-declaration": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", + "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", + "dev": true, + "requires": { + "@babel/types": "^7.8.3" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", + "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", + "dev": true + }, + "@babel/helper-wrap-function": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", + "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.8.3", + "@babel/types": "^7.8.3" + } + }, + "@babel/helpers": { + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz", + "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==", + "dev": true, + "requires": { + "@babel/template": "^7.8.3", + "@babel/traverse": "^7.9.0", + "@babel/types": "^7.9.0" + } + }, + "@babel/highlight": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", + "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@babel/parser": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", + "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", + "dev": true + }, + "@babel/plugin-proposal-async-generator-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", + "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0" + } + }, + "@babel/plugin-proposal-class-properties": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz", + "integrity": "sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-proposal-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", + "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-dynamic-import": "^7.8.0" + } + }, + "@babel/plugin-proposal-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", + "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.0" + } + }, + "@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + } + }, + "@babel/plugin-proposal-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz", + "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3" + } + }, + "@babel/plugin-proposal-object-rest-spread": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz", + "integrity": "sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + } + }, + "@babel/plugin-proposal-optional-chaining": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", + "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.0" + } + }, + "@babel/plugin-proposal-unicode-property-regex": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", + "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.8", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", + "dev": true + } + } + }, + "@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", + "dev": true + } + } + }, + "@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "dependencies": { + "@babel/helper-plugin-utils": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz", + "integrity": "sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==", + "dev": true + } + } + }, + "@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-numeric-separator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz", + "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", + "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz", + "integrity": "sha512-GO1MQ/SGGGoiEXY0e0bSpHimJvxqB7lktLLIq2pv8xG7WZ8IMEle74jIe1FhprHBWjwjZtXHkycDLZXIWM5Wfg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-arrow-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", + "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-async-to-generator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", + "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", + "dev": true, + "requires": { + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-remap-async-to-generator": "^7.8.3" + } + }, + "@babel/plugin-transform-block-scoped-functions": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", + "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-block-scoping": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", + "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "lodash": "^4.17.13" + } + }, + "@babel/plugin-transform-classes": { + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz", + "integrity": "sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-define-map": "^7.8.3", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-optimise-call-expression": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.6", + "@babel/helper-split-export-declaration": "^7.8.3", + "globals": "^11.1.0" + } + }, + "@babel/plugin-transform-computed-properties": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", + "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-destructuring": { + "version": "7.8.8", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz", + "integrity": "sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-dotall-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", + "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-duplicate-keys": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", + "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-exponentiation-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", + "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", + "dev": true, + "requires": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-for-of": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", + "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-function-name": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", + "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", + "dev": true, + "requires": { + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", + "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-member-expression-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", + "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-modules-amd": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz", + "integrity": "sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3", + "babel-plugin-dynamic-import-node": "^2.3.0" + } + }, + "@babel/plugin-transform-modules-commonjs": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz", + "integrity": "sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-simple-access": "^7.8.3", + "babel-plugin-dynamic-import-node": "^2.3.0" + } + }, + "@babel/plugin-transform-modules-systemjs": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz", + "integrity": "sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ==", + "dev": true, + "requires": { + "@babel/helper-hoist-variables": "^7.8.3", + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3", + "babel-plugin-dynamic-import-node": "^2.3.0" + } + }, + "@babel/plugin-transform-modules-umd": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz", + "integrity": "sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==", + "dev": true, + "requires": { + "@babel/helper-module-transforms": "^7.9.0", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", + "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3" + } + }, + "@babel/plugin-transform-new-target": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", + "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-object-super": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", + "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-replace-supers": "^7.8.3" + } + }, + "@babel/plugin-transform-parameters": { + "version": "7.9.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz", + "integrity": "sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg==", + "dev": true, + "requires": { + "@babel/helper-get-function-arity": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-property-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", + "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-regenerator": { + "version": "7.8.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", + "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==", + "dev": true, + "requires": { + "regenerator-transform": "^0.14.2" + } + }, + "@babel/plugin-transform-reserved-words": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", + "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-shorthand-properties": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", + "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", + "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-sticky-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", + "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/helper-regex": "^7.8.3" + } + }, + "@babel/plugin-transform-template-literals": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", + "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", + "dev": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-typeof-symbol": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", + "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.9.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.4.tgz", + "integrity": "sha512-yeWeUkKx2auDbSxRe8MusAG+n4m9BFY/v+lPjmQDgOFX5qnySkUY5oXzkp6FwPdsYqnKay6lorXYdC0n3bZO7w==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-syntax-typescript": "^7.8.3" + } + }, + "@babel/plugin-transform-unicode-regex": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", + "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", + "dev": true, + "requires": { + "@babel/helper-create-regexp-features-plugin": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3" + } + }, + "@babel/preset-env": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.0.tgz", + "integrity": "sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ==", + "dev": true, + "requires": { + "@babel/compat-data": "^7.9.0", + "@babel/helper-compilation-targets": "^7.8.7", + "@babel/helper-module-imports": "^7.8.3", + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-proposal-async-generator-functions": "^7.8.3", + "@babel/plugin-proposal-dynamic-import": "^7.8.3", + "@babel/plugin-proposal-json-strings": "^7.8.3", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-proposal-numeric-separator": "^7.8.3", + "@babel/plugin-proposal-object-rest-spread": "^7.9.0", + "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", + "@babel/plugin-proposal-optional-chaining": "^7.9.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", + "@babel/plugin-syntax-async-generators": "^7.8.0", + "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-numeric-separator": "^7.8.0", + "@babel/plugin-syntax-object-rest-spread": "^7.8.0", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", + "@babel/plugin-syntax-optional-chaining": "^7.8.0", + "@babel/plugin-syntax-top-level-await": "^7.8.3", + "@babel/plugin-transform-arrow-functions": "^7.8.3", + "@babel/plugin-transform-async-to-generator": "^7.8.3", + "@babel/plugin-transform-block-scoped-functions": "^7.8.3", + "@babel/plugin-transform-block-scoping": "^7.8.3", + "@babel/plugin-transform-classes": "^7.9.0", + "@babel/plugin-transform-computed-properties": "^7.8.3", + "@babel/plugin-transform-destructuring": "^7.8.3", + "@babel/plugin-transform-dotall-regex": "^7.8.3", + "@babel/plugin-transform-duplicate-keys": "^7.8.3", + "@babel/plugin-transform-exponentiation-operator": "^7.8.3", + "@babel/plugin-transform-for-of": "^7.9.0", + "@babel/plugin-transform-function-name": "^7.8.3", + "@babel/plugin-transform-literals": "^7.8.3", + "@babel/plugin-transform-member-expression-literals": "^7.8.3", + "@babel/plugin-transform-modules-amd": "^7.9.0", + "@babel/plugin-transform-modules-commonjs": "^7.9.0", + "@babel/plugin-transform-modules-systemjs": "^7.9.0", + "@babel/plugin-transform-modules-umd": "^7.9.0", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", + "@babel/plugin-transform-new-target": "^7.8.3", + "@babel/plugin-transform-object-super": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.8.7", + "@babel/plugin-transform-property-literals": "^7.8.3", + "@babel/plugin-transform-regenerator": "^7.8.7", + "@babel/plugin-transform-reserved-words": "^7.8.3", + "@babel/plugin-transform-shorthand-properties": "^7.8.3", + "@babel/plugin-transform-spread": "^7.8.3", + "@babel/plugin-transform-sticky-regex": "^7.8.3", + "@babel/plugin-transform-template-literals": "^7.8.3", + "@babel/plugin-transform-typeof-symbol": "^7.8.4", + "@babel/plugin-transform-unicode-regex": "^7.8.3", + "@babel/preset-modules": "^0.1.3", + "@babel/types": "^7.9.0", + "browserslist": "^4.9.1", + "core-js-compat": "^3.6.2", + "invariant": "^2.2.2", + "levenary": "^1.1.1", + "semver": "^5.5.0" + } + }, + "@babel/preset-modules": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", + "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + } + }, + "@babel/preset-typescript": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.9.0.tgz", + "integrity": "sha512-S4cueFnGrIbvYJgwsVFKdvOmpiL0XGw9MFW9D0vgRys5g36PBhZRL8NX8Gr2akz8XRtzq6HuDXPD/1nniagNUg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.8.3", + "@babel/plugin-transform-typescript": "^7.9.0" + } + }, + "@babel/runtime": { + "version": "7.9.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", + "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "@babel/template": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", + "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/parser": "^7.8.6", + "@babel/types": "^7.8.6" + } + }, + "@babel/traverse": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz", + "integrity": "sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.8.3", + "@babel/generator": "^7.9.0", + "@babel/helper-function-name": "^7.8.3", + "@babel/helper-split-export-declaration": "^7.8.3", + "@babel/parser": "^7.9.0", + "@babel/types": "^7.9.0", + "debug": "^4.1.0", + "globals": "^11.1.0", + "lodash": "^4.17.13" + } + }, + "@babel/types": { + "version": "7.9.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", + "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.9.0", + "lodash": "^4.17.13", + "to-fast-properties": "^2.0.0" + } + }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "@cnakazawa/watch": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz", + "integrity": "sha512-v9kIhKwjeZThiWrLmj0y17CWoyddASLj9O2yvbZkbvw/N3rWOYy9zkV66ursAoVr0mV15bL8g0c4QZUE6cdDoQ==", + "dev": true, + "requires": { + "exec-sh": "^0.3.2", + "minimist": "^1.2.0" + } + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true }, - "@babel/helper-annotate-as-pure": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.8.3.tgz", - "integrity": "sha512-6o+mJrZBxOoEX77Ezv9zwW7WV8DdluouRKNY/IR5u/YTMuKHgugHOzYWlYvYLpLA9nPsQCAAASpCIbjI9Mv+Uw==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true }, - "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.8.3.tgz", - "integrity": "sha512-5eFOm2SyFPK4Rh3XMMRDjN7lBH0orh3ss0g3rTYZnBQ+r6YPj7lgDyCvPphynHvUrobJmeMignBr6Acw9mAPlw==", - "dev": true, - "requires": { - "@babel/helper-explode-assignable-expression": "^7.8.3", - "@babel/types": "^7.8.3" - } + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", + "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", + "dev": true + }, + "@jest/console": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-26.6.2.tgz", + "integrity": "sha512-IY1R2i2aLsLr7Id3S6p2BA82GNWryt4oSvEXLAKc+L2zdi89dSkE8xC1C+0kpATG4JhBJREnQOH7/zmccM2B0g==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^26.6.2", + "jest-util": "^26.6.2", + "slash": "^3.0.0" + }, + "dependencies": { + "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" + } }, - "@babel/helper-compilation-targets": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.8.7.tgz", - "integrity": "sha512-4mWm8DCK2LugIS+p1yArqvG1Pf162upsIsjE7cNBjez+NjliQpVhj20obE520nao0o14DaTnFJv+Fw5a0JpoUw==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.8.6", - "browserslist": "^4.9.1", - "invariant": "^2.2.4", - "levenary": "^1.1.1", - "semver": "^5.5.0" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "@babel/helper-create-class-features-plugin": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.8.6.tgz", - "integrity": "sha512-klTBDdsr+VFFqaDHm5rR69OpEQtO2Qv8ECxHS1mNhJJvaHArR6a1xTf5K/eZW7eZpJbhCx3NW1Yt/sKsLXLblg==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-member-expression-to-functions": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.6", - "@babel/helper-split-export-declaration": "^7.8.3" - } + "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" + } }, - "@babel/helper-create-regexp-features-plugin": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.8.8.tgz", - "integrity": "sha512-LYVPdwkrQEiX9+1R29Ld/wTrmQu1SSKYnuOk3g0CkcZMA1p0gsNxJFj/3gBdaJ7Cg0Fnek5z0DsMULePP7Lrqg==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-regex": "^7.8.3", - "regexpu-core": "^4.7.0" - } + "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 }, - "@babel/helper-define-map": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.8.3.tgz", - "integrity": "sha512-PoeBYtxoZGtct3md6xZOCWPcKuMuk3IHhgxsRRNtnNShebf4C8YonTSblsK4tvDbm+eJAw2HAPOfCr+Q/YRG/g==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/types": "^7.8.3", - "lodash": "^4.17.13" - } + "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 }, - "@babel/helper-explode-assignable-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.8.3.tgz", - "integrity": "sha512-N+8eW86/Kj147bO9G2uclsg5pwfs/fqqY5rwgIL7eTBklgXjcOJ3btzS5iM6AitJcftnY7pm2lGsrJVYLGjzIw==", - "dev": true, - "requires": { - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" - } + "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" + } + } + } + }, + "@jest/core": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-26.6.3.tgz", + "integrity": "sha512-xvV1kKbhfUqFVuZ8Cyo+JPpipAHHAV3kcDBftiduK8EICXmTFddryy3P7NfZt8Pv37rA9nEJBKCCkglCPt/Xjw==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/reporters": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-changed-files": "^26.6.2", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-resolve-dependencies": "^26.6.3", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "jest-watcher": "^26.6.2", + "micromatch": "^4.0.2", + "p-each-series": "^2.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "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" + } }, - "@babel/helper-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.8.3.tgz", - "integrity": "sha512-BCxgX1BC2hD/oBlIFUgOCQDOPV8nSINxCwM3o93xP4P9Fq6aV5sgv2cOOITDMtCfQ+3PvHp3l689XZvAM9QyOA==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "@babel/helper-get-function-arity": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz", - "integrity": "sha512-FVDR+Gd9iLjUMY1fzE2SR0IuaJToR4RkCDARVfsBBPSP53GEqSFjD8gNyxg246VUyc/ALRxFaAK8rVG7UT7xRA==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } + "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" + } }, - "@babel/helper-hoist-variables": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.8.3.tgz", - "integrity": "sha512-ky1JLOjcDUtSc+xkt0xhYff7Z6ILTAHKmZLHPxAhOP0Nd77O+3nCsd6uSVYur6nJnCI029CrNbYlc0LoPfAPQg==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } + "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 }, - "@babel/helper-member-expression-to-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz", - "integrity": "sha512-fO4Egq88utkQFjbPrSHGmGLFqmrshs11d46WI+WZDESt7Wu7wN2G2Iu+NMMZJFDOVRHAMIkB5SNh30NtwCA7RA==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "@babel/helper-module-imports": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.8.3.tgz", - "integrity": "sha512-R0Bx3jippsbAEtzkpZ/6FIiuzOURPcMjHp+Z6xPe6DtApDJx+w7UYyOLanZqO8+wKR9G10s/FmHXvxaMd9s6Kg==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } + "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 }, - "@babel/helper-module-transforms": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.9.0.tgz", - "integrity": "sha512-0FvKyu0gpPfIQ8EkxlrAydOWROdHpBmiCiRwLkUiBGhCUPRRbVD2/tm3sFr/c/GWFrQ/ffutGUAnx7V0FzT2wA==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.6", - "@babel/helper-simple-access": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/template": "^7.8.6", - "@babel/types": "^7.9.0", - "lodash": "^4.17.13" - } + "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" + } + } + } + }, + "@jest/environment": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-26.6.2.tgz", + "integrity": "sha512-nFy+fHl28zUrRsCeMB61VDThV1pVTtlEokBRgqPrcT1JNq4yRNIyTHfyht6PqtUvY9IsuLGTrbG8kPXjSZIZwA==", + "dev": true, + "requires": { + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2" + } + }, + "@jest/fake-timers": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-26.6.2.tgz", + "integrity": "sha512-14Uleatt7jdzefLPYM3KLcnUl1ZNikaKq34enpb5XG9i81JpppDb5muZvonvKyrl7ftEHkKS5L5/eB/kxJ+bvA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@sinonjs/fake-timers": "^6.0.1", + "@types/node": "*", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" + } + }, + "@jest/globals": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-26.6.2.tgz", + "integrity": "sha512-85Ltnm7HlB/KesBUuALwQ68YTU72w9H2xW9FjZ1eL1U3lhtefjjl5c2MiUbpXt/i6LaPRvoOFJ22yCBSfQ0JIA==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/types": "^26.6.2", + "expect": "^26.6.2" + } + }, + "@jest/reporters": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-26.6.2.tgz", + "integrity": "sha512-h2bW53APG4HvkOnVMo8q3QXa6pcaNt1HkwVsOPMBV6LD/q9oSpxNSYZQYkAnjdMjrJ86UuYeLo+aEZClV6opnw==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.4", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "jest-haste-map": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "node-notifier": "^8.0.0", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^7.0.0" + }, + "dependencies": { + "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" + } }, - "@babel/helper-optimise-call-expression": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.8.3.tgz", - "integrity": "sha512-Kag20n86cbO2AvHca6EJsvqAd82gc6VMGule4HwebwMlwkpXuVqrNRj6CkCV2sKxgi9MyAUnZVnZ6lJ1/vKhHQ==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "@babel/helper-plugin-utils": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.8.3.tgz", - "integrity": "sha512-j+fq49Xds2smCUNYmEHF9kGNkhbet6yVIBp4e6oeQpH1RUs/Ir06xUKzDjDkGcaaokPiTNs2JBWHjaE4csUkZQ==", - "dev": true - }, - "@babel/helper-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.8.3.tgz", - "integrity": "sha512-BWt0QtYv/cg/NecOAZMdcn/waj/5P26DR4mVLXfFtDokSR6fyuG0Pj+e2FqtSME+MqED1khnSMulkmGl8qWiUQ==", - "dev": true, - "requires": { - "lodash": "^4.17.13" - } + "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" + } }, - "@babel/helper-remap-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.8.3.tgz", - "integrity": "sha512-kgwDmw4fCg7AVgS4DukQR/roGp+jP+XluJE5hsRZwxCYGg+Rv9wSGErDWhlI90FODdYfd4xG4AQRiMDjjN0GzA==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-wrap-function": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" - } + "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 }, - "@babel/helper-replace-supers": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz", - "integrity": "sha512-PeMArdA4Sv/Wf4zXwBKPqVj7n9UF/xg6slNRtZW84FM7JpE1CbG8B612FyM4cxrf4fMAMGO0kR7voy1ForHHFA==", - "dev": true, - "requires": { - "@babel/helper-member-expression-to-functions": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/traverse": "^7.8.6", - "@babel/types": "^7.8.6" - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "@babel/helper-simple-access": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.8.3.tgz", - "integrity": "sha512-VNGUDjx5cCWg4vvCTR8qQ7YJYZ+HBjxOgXEl7ounz+4Sn7+LMD3CFrCTEU6/qXKbA2nKg21CwhhBzO0RpRbdCw==", - "dev": true, - "requires": { - "@babel/template": "^7.8.3", - "@babel/types": "^7.8.3" - } + "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 }, - "@babel/helper-split-export-declaration": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz", - "integrity": "sha512-3x3yOeyBhW851hroze7ElzdkeRXQYQbFIb7gLK1WQYsw2GWDay5gAJNw1sWJ0VFP6z5J1whqeXH/WCdCjZv6dA==", - "dev": true, - "requires": { - "@babel/types": "^7.8.3" - } + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true }, - "@babel/helper-validator-identifier": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.0.tgz", - "integrity": "sha512-6G8bQKjOh+of4PV/ThDm/rRqlU7+IGoJuofpagU5GlEl29Vv0RGqqt86ZGRV8ZuSOY3o+8yXl5y782SMcG7SHw==", - "dev": true - }, - "@babel/helper-wrap-function": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.8.3.tgz", - "integrity": "sha512-LACJrbUET9cQDzb6kG7EeD7+7doC3JNvUgTEQOx2qaO1fKlzE/Bf05qs9w1oXQMmXlPO65lC3Tq9S6gZpTErEQ==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.8.3", - "@babel/types": "^7.8.3" - } + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + } }, - "@babel/helpers": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.9.2.tgz", - "integrity": "sha512-JwLvzlXVPjO8eU9c/wF9/zOIN7X6h8DYf7mG4CiFRZRvZNKEF5dQ3H3V+ASkHoIB3mWhatgl5ONhyqHRI6MppA==", - "dev": true, - "requires": { - "@babel/template": "^7.8.3", - "@babel/traverse": "^7.9.0", - "@babel/types": "^7.9.0" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true }, - "@babel/highlight": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz", - "integrity": "sha512-lJZPilxX7Op3Nv/2cvFdnlepPXDxi29wxteT57Q965oc5R9v86ztx0jfxVrTcBk8C2kcPkkDa2Z4T3ZsPPVWsQ==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.9.0", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, - "@babel/parser": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz", - "integrity": "sha512-bC49otXX6N0/VYhgOMh4gnP26E9xnDZK3TmbNpxYzzz9BQLBosQwfyOe9/cXUU3txYhTzLCbcqd5c8y/OmCjHA==", - "dev": true - }, - "@babel/plugin-proposal-async-generator-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.8.3.tgz", - "integrity": "sha512-NZ9zLv848JsV3hs8ryEh7Uaz/0KsmPLqv0+PdkDJL1cJy0K4kOCFa8zc1E3mp+RHPQcpdfb/6GovEsW4VDrOMw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-remap-async-to-generator": "^7.8.3", - "@babel/plugin-syntax-async-generators": "^7.8.0" - } + "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" + } + } + } + }, + "@jest/source-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-26.6.2.tgz", + "integrity": "sha512-YwYcCwAnNmOVsZ8mr3GfnzdXDAl4LaenZP5z+G0c8bzC9/dugL8zRmxZzdoTl4IaS3CryS1uWnROLPFmb6lVvA==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.4", + "source-map": "^0.6.0" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "@babel/plugin-proposal-class-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz", - "integrity": "sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@jest/test-result": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-26.6.2.tgz", + "integrity": "sha512-5O7H5c/7YlojphYNrK02LlDIV2GNPYisKwHm2QTKjNZeEzezCbwYs9swJySv2UfPMyZ0VdsmMv7jIlD/IKYQpQ==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-26.6.3.tgz", + "integrity": "sha512-YHlVIjP5nfEyjlrSr8t/YdNfU/1XEt7c5b4OxcXCjyRhjzLYu/rO69/WHPuYcbCWkz8kAeZVZp2N2+IOLLEPGw==", + "dev": true, + "requires": { + "@jest/test-result": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-runner": "^26.6.3", + "jest-runtime": "^26.6.3" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + } + } + }, + "@jest/transform": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-26.6.2.tgz", + "integrity": "sha512-E9JjhUgNzvuQ+vVAL21vlyfy12gP0GhazGgJC4h6qUt1jSdUXGWJ1wfu/X7Sd8etSgxV4ovT1pb9v5D6QW4XgA==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^26.6.2", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-util": "^26.6.2", + "micromatch": "^4.0.2", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "dependencies": { + "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" + } }, - "@babel/plugin-proposal-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.8.3.tgz", - "integrity": "sha512-NyaBbyLFXFLT9FP+zk0kYlUlA8XtCUbehs67F0nnEg7KICgMc2mNkIeu9TYhKzyXMkrapZFwAhXLdnt4IYHy1w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-dynamic-import": "^7.8.0" - } + "babel-plugin-istanbul": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" + } }, - "@babel/plugin-proposal-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.8.3.tgz", - "integrity": "sha512-KGhQNZ3TVCQG/MjRbAUwuH+14y9q0tpxs1nWWs3pbSleRdDro9SAMMDyye8HhY1gqZ7/NqIc8SKhya0wRDgP1Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.0" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-TS9MlfzXpXKt6YYomudb/KU7nQI6/xnapG6in1uZxoxDghuSMZsPb6D2fyUwNYSAp4l1iR7QtFOjkqcRYcUsfw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.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" + } }, - "@babel/plugin-proposal-numeric-separator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.8.3.tgz", - "integrity": "sha512-jWioO1s6R/R+wEHizfaScNsAx+xKgwTLNXSh7tTC4Usj3ItsPEhYkEpU4h+lpnBwq7NBVOJXfO6cRFYcX69JUQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3" - } + "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 }, - "@babel/plugin-proposal-object-rest-spread": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.9.0.tgz", - "integrity": "sha512-UgqBv6bjq4fDb8uku9f+wcm1J7YxJ5nT7WO/jBr0cl0PLKb7t1O6RNR1kZbjgx2LQtsDI9hwoQVmn0yhXeQyow==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0" - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-0gkX7J7E+AtAw9fcwlVQj8peP61qhdg/89D5swOkjYbkboA2CVckn3kiyum1DE0wskGb7KJJxBdyEBApDLLVdw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "@babel/plugin-proposal-optional-chaining": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.9.0.tgz", - "integrity": "sha512-NDn5tu3tcv4W30jNhmc2hyD5c56G6cXx4TesJubhxrJeCvuuMpttxr0OnNCqbZGhFjLrg+NIhxxC+BK5F6yS3w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.0" - } + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true }, - "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.8.8.tgz", - "integrity": "sha512-EVhjVsMpbhLw9ZfHWSx2iy13Q8Z/eg8e8ccVWt23sWQK5l1UdkoLJPN5w69UA4uITGBnEZD2JOe4QOHycYKv8A==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.8", - "@babel/helper-plugin-utils": "^7.8.3" - } + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + } }, - "@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true }, - "@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, - "@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } + "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" + } }, - "@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + } + } + }, + "@jest/types": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-26.6.2.tgz", + "integrity": "sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0" + }, + "dependencies": { + "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" + } }, - "@babel/plugin-syntax-numeric-separator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.8.3.tgz", - "integrity": "sha512-H7dCMAdN83PcCmqmkHB5dtp+Xa9a6LKSvA2hiFBC/5alSHxM5VgWZXFqDi0YFe8XNGT6iCa+z4V4zSt/PdZ7Dw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.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" + } }, - "@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } + "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 }, - "@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.8.3.tgz", - "integrity": "sha512-kwj1j9lL/6Wd0hROD3b/OZZ7MSrZLqqn9RAZ5+cYYsflQ9HZBIKCUkr3+uL1MEJ1NePiUbf98jjiMQSv0NMR9g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "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" + } + } + } + }, + "@sinonjs/commons": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.1.tgz", + "integrity": "sha512-Debi3Baff1Qu1Unc3mjJ96MgpbwTn43S1+9yJ0llWygPwDNu2aaWBD6yc9y/Z8XDRNhx7U+u2UDg2OGQXkclUQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-6.0.1.tgz", + "integrity": "sha512-MZPUxrmFubI36XS1DI3qmI0YdN1gks62JtFZvxR67ljjSNCeK6U08Zx4msEWOXuofgqUt6zPHSi1H9fbjR/NRA==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, + "@sinonjs/formatio": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz", + "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1", + "@sinonjs/samsam": "^3.1.0" + } + }, + "@sinonjs/samsam": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", + "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.3.0", + "array-from": "^2.1.1", + "lodash": "^4.17.15" + } + }, + "@sinonjs/text-encoding": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", + "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", + "dev": true + }, + "@types/babel__core": { + "version": "7.1.14", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.14.tgz", + "integrity": "sha512-zGZJzzBUVDo/eV6KgbE0f0ZI7dInEYvo12Rb70uNQDshC3SkRMb67ja0GgRHZgAX3Za6rhaWlvbDO8rrGyAb1g==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.2.tgz", + "integrity": "sha512-MdSJnBjl+bdwkLskZ3NGFp9YcXGx5ggLpQQPqtgakVhsWK0hTtNYhjpZLlWQTviGTvF8at+Bvli3jV7faPdgeQ==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.0.tgz", + "integrity": "sha512-NTPErx4/FiPCGScH7foPyr+/1Dkzkni+rHiYHHoTjvwou7AQzJkNeD60A9CXRy+ZEN2B1bggmkTMCDb+Mv5k+A==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.11.1", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.11.1.tgz", + "integrity": "sha512-Vs0hm0vPahPMYi9tDjtP66llufgO3ST16WXaSTtDGEl9cewAl3AibmxWw6TINOqHPT9z0uABKAYjT9jNSg4npw==", + "dev": true, + "requires": { + "@babel/types": "^7.3.0" + } + }, + "@types/debug": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz", + "integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==", + "dev": true + }, + "@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true + }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.0.tgz", + "integrity": "sha512-nwKNbvnwJ2/mndE9ItP/zc2TCzw6uuodnF4EHYWD+gCQDVBuRQL5UzbZD0/ezy1iKsFU2ZQiDqg4M9dN4+wZgA==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/jest": { + "version": "26.0.23", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-26.0.23.tgz", + "integrity": "sha512-ZHLmWMJ9jJ9PTiT58juykZpL7KjwJywFN3Rr2pTSkyQfydf/rk22yS7W8p5DaVUMQ2BQC7oYiU3FjbTM/mYrOA==", + "dev": true, + "requires": { + "jest-diff": "^26.0.0", + "pretty-format": "^26.0.0" + } + }, + "@types/node": { + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.3.0.tgz", + "integrity": "sha512-8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9YsQ==", + "dev": true + }, + "@types/normalize-package-data": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", + "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "dev": true + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@types/prettier": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.2.3.tgz", + "integrity": "sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA==", + "dev": true + }, + "@types/sinon": { + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", + "integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==", + "dev": true + }, + "@types/stack-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.0.tgz", + "integrity": "sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw==", + "dev": true + }, + "@types/yargs": { + "version": "15.0.13", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-15.0.13.tgz", + "integrity": "sha512-kQ5JNTrbDv3Rp5X2n/iUu37IJBDU2gsZ5R/g1/KHOOEc5IKfUFjXT6DENPGduh08I/pamwtEq4oul7gUqKTQDQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "20.2.0", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.0.tgz", + "integrity": "sha512-37RSHht+gzzgYeobbG+KWryeAW8J33Nhr69cjTqSYymXVZEN9NbRYWoYlRtDhHKPVT1FyNKwaTPC1NynKZpzRA==", + "dev": true + }, + "abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "dev": true + }, + "acorn": { + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz", + "integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==", + "dev": true + }, + "acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + } + } + }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "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-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "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==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-from": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", + "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dev": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "dev": true + }, + "aws4": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", + "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", + "dev": true + }, + "babel-jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", + "integrity": "sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA==", + "dev": true, + "requires": { + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/babel__core": "^7.1.7", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + }, + "dependencies": { + "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" + } }, - "@babel/plugin-syntax-typescript": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.8.3.tgz", - "integrity": "sha512-GO1MQ/SGGGoiEXY0e0bSpHimJvxqB7lktLLIq2pv8xG7WZ8IMEle74jIe1FhprHBWjwjZtXHkycDLZXIWM5Wfg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "babel-plugin-istanbul": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" + } }, - "@babel/plugin-transform-arrow-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.8.3.tgz", - "integrity": "sha512-0MRF+KC8EqH4dbuITCWwPSzsyO3HIWWlm30v8BbbpOrS1B++isGxPnnuq/IZvOX5J2D/p7DQalQm+/2PnlKGxg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "@babel/plugin-transform-async-to-generator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.8.3.tgz", - "integrity": "sha512-imt9tFLD9ogt56Dd5CI/6XgpukMwd/fLGSrix2httihVe7LOGVPhyhMh1BU5kDM7iHD08i8uUtmV2sWaBFlHVQ==", - "dev": true, - "requires": { - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-remap-async-to-generator": "^7.8.3" - } + "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" + } }, - "@babel/plugin-transform-block-scoped-functions": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.8.3.tgz", - "integrity": "sha512-vo4F2OewqjbB1+yaJ7k2EJFHlTP3jR634Z9Cj9itpqNjuLXvhlVxgnjsHsdRgASR8xYDrx6onw4vW5H6We0Jmg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "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 }, - "@babel/plugin-transform-block-scoping": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.8.3.tgz", - "integrity": "sha512-pGnYfm7RNRgYRi7bids5bHluENHqJhrV4bCZRwc5GamaWIIs07N4rZECcmJL6ZClwjDz1GbdMZFtPs27hTB06w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "lodash": "^4.17.13" - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "@babel/plugin-transform-classes": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.9.2.tgz", - "integrity": "sha512-TC2p3bPzsfvSsqBZo0kJnuelnoK9O3welkUpqSqBQuBF6R5MN2rysopri8kNvtlGIb2jmUO7i15IooAZJjZuMQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-define-map": "^7.8.3", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-optimise-call-expression": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.6", - "@babel/helper-split-export-declaration": "^7.8.3", - "globals": "^11.1.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "@babel/plugin-transform-computed-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.8.3.tgz", - "integrity": "sha512-O5hiIpSyOGdrQZRQ2ccwtTVkgUDBBiCuK//4RJ6UfePllUTCENOzKxfh6ulckXKc0DixTFLCfb2HVkNA7aDpzA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true }, - "@babel/plugin-transform-destructuring": { - "version": "7.8.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.8.8.tgz", - "integrity": "sha512-eRJu4Vs2rmttFCdhPUM3bV0Yo/xPSdPw6ML9KHs/bjB4bLA5HXlbvYXPOD5yASodGod+krjYx21xm1QmL8dCJQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + } }, - "@babel/plugin-transform-dotall-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.8.3.tgz", - "integrity": "sha512-kLs1j9Nn4MQoBYdRXH6AeaXMbEJFaFu/v1nQkvib6QzTj8MZI5OQzqmD83/2jEM1z0DLilra5aWO5YpyC0ALIw==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true }, - "@babel/plugin-transform-duplicate-keys": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.8.3.tgz", - "integrity": "sha512-s8dHiBUbcbSgipS4SMFuWGqCvyge5V2ZeAWzR6INTVC3Ltjig/Vw1G2Gztv0vU/hRG9X8IvKvYdoksnUfgXOEQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "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" + } }, - "@babel/plugin-transform-exponentiation-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.8.3.tgz", - "integrity": "sha512-zwIpuIymb3ACcInbksHaNcR12S++0MDLKkiqXHl3AzpgdKlFNhog+z/K0+TGW+b0w5pgTq4H6IwV/WhxbGYSjQ==", - "dev": true, - "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" - } + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + } + } + }, + "babel-plugin-dynamic-import-node": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", + "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", + "dev": true, + "requires": { + "object.assign": "^4.1.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-26.6.2.tgz", + "integrity": "sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-26.6.2.tgz", + "integrity": "sha512-YvdtlVm9t3k777c5NPQIv6cxFFFapys25HiUmuSgHwIZhfifweR5c5Sf5nwE3MAbfu327CYSvps8Yx6ANLyleQ==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^26.6.2", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "dev": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "beachball": { + "version": "1.32.2", + "resolved": "https://registry.npmjs.org/beachball/-/beachball-1.32.2.tgz", + "integrity": "sha512-1rUhqockNXdAjCCzFLszHxnfsjf+/dTFo2YudpeQWyKUyQ1HeIiwdUVp/bM9uOc+VxG6sUrk5nnrBRAX7yI4aw==", + "dev": true, + "requires": { + "cosmiconfig": "^6.0.0", + "execa": "^4.0.3", + "fs-extra": "^8.0.1", + "git-url-parse": "^11.1.2", + "glob": "^7.1.4", + "lodash": "^4.17.15", + "minimatch": "^3.0.4", + "p-limit": "^3.0.2", + "prompts": "~2.1.0", + "semver": "^6.1.1", + "toposort": "^2.0.2", + "yargs-parser": "^13.1.0" + }, + "dependencies": { + "cosmiconfig": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", + "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", + "dev": true, + "requires": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.1.0", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.7.2" + } }, - "@babel/plugin-transform-for-of": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.9.0.tgz", - "integrity": "sha512-lTAnWOpMwOXpyDx06N+ywmF3jNbafZEqZ96CGYabxHrxNX8l5ny7dt4bK/rGwAh9utyP2b2Hv7PlZh1AAS54FQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } }, - "@babel/plugin-transform-function-name": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.8.3.tgz", - "integrity": "sha512-rO/OnDS78Eifbjn5Py9v8y0aR+aSYhDhqAwVfsTl0ERuMZyr05L1aFSCJnbv2mmsLkit/4ReeQ9N2BgLnOcPCQ==", - "dev": true, - "requires": { - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" - } + "execa": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", + "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } }, - "@babel/plugin-transform-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.8.3.tgz", - "integrity": "sha512-3Tqf8JJ/qB7TeldGl+TT55+uQei9JfYaregDcEAyBZ7akutriFrt6C/wLYIer6OYhleVQvH/ntEhjE/xMmy10A==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "get-stream": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", + "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } }, - "@babel/plugin-transform-member-expression-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.8.3.tgz", - "integrity": "sha512-3Wk2EXhnw+rP+IDkK6BdtPKsUE5IeZ6QOGrPYvw52NwBStw9V1ZVzxgK6fSKSxqUvH9eQPR3tm3cOq79HlsKYA==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true }, - "@babel/plugin-transform-modules-amd": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.9.0.tgz", - "integrity": "sha512-vZgDDF003B14O8zJy0XXLnPH4sg+9X5hFBBGN1V+B2rgrB+J2xIypSN6Rk9imB2hSTHQi5OHLrFWsZab1GMk+Q==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" - } + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "p-limit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", + "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true }, - "@babel/plugin-transform-modules-commonjs": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.9.0.tgz", - "integrity": "sha512-qzlCrLnKqio4SlgJ6FMMLBe4bySNis8DFn1VkGmOcxG9gqEyPIOzeQrA//u0HAKrWpJlpZbZMPB1n/OPa4+n8g==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-simple-access": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" - } + "parse-json": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.1.tgz", + "integrity": "sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + } }, - "@babel/plugin-transform-modules-systemjs": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.9.0.tgz", - "integrity": "sha512-FsiAv/nao/ud2ZWy4wFacoLOm5uxl0ExSQ7ErvP7jpoihLR6Cq90ilOFyX9UXct3rbtKsAiZ9kFt5XGfPe/5SQ==", - "dev": true, - "requires": { - "@babel/helper-hoist-variables": "^7.8.3", - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3", - "babel-plugin-dynamic-import-node": "^2.3.0" - } + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true }, - "@babel/plugin-transform-modules-umd": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.9.0.tgz", - "integrity": "sha512-uTWkXkIVtg/JGRSIABdBoMsoIeoHQHPTL0Y2E7xf5Oj7sLqwVsNXOkNk0VJc7vF0IMBsPeikHxFjGe+qmwPtTQ==", - "dev": true, - "requires": { - "@babel/helper-module-transforms": "^7.9.0", - "@babel/helper-plugin-utils": "^7.8.3" - } + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true }, - "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.8.3.tgz", - "integrity": "sha512-f+tF/8UVPU86TrCb06JoPWIdDpTNSGGcAtaD9mLP0aYGA0OS0j7j7DHJR0GTFrUZPUU6loZhbsVZgTh0N+Qdnw==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true }, - "@babel/plugin-transform-new-target": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.8.3.tgz", - "integrity": "sha512-QuSGysibQpyxexRyui2vca+Cmbljo8bcRckgzYV4kRIsHpVeyeC3JDO63pY+xFZ6bWOBn7pfKZTqV4o/ix9sFw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "shebang-command": { + "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": "^3.0.0" + } }, - "@babel/plugin-transform-object-super": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.8.3.tgz", - "integrity": "sha512-57FXk+gItG/GejofIyLIgBKTas4+pEU47IXKDBWFTxdPd7F80H8zybyAY7UoblVfBhBGs2EKM+bJUu2+iUYPDQ==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-replace-supers": "^7.8.3" - } + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true }, - "@babel/plugin-transform-parameters": { - "version": "7.9.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.9.3.tgz", - "integrity": "sha512-fzrQFQhp7mIhOzmOtPiKffvCYQSK10NR8t6BBz2yPbeUHb9OLW8RZGtgDRBn8z2hGcwvKDL3vC7ojPTLNxmqEg==", - "dev": true, - "requires": { - "@babel/helper-get-function-arity": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" - } + "which": { + "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" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true + }, + "browserslist": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.4.tgz", + "integrity": "sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001208", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.712", + "escalade": "^3.1.1", + "node-releases": "^1.1.71" + } + }, + "bs-logger": { + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.6.tgz", + "integrity": "sha512-pd8DCoxmbgc7hyPKOvxtqNcjYoOsABPQdcCUjGp3d42VR2CX1ORhk2A87oqqu5R1kk+76nsxZupkmyd+MVtCog==", + "dev": true, + "requires": { + "fast-json-stable-stringify": "2.x" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "caller-callsite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", + "dev": true, + "requires": { + "callsites": "^2.0.0" + }, + "dependencies": { + "callsites": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", + "dev": true + } + } + }, + "caller-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", + "dev": true, + "requires": { + "caller-callsite": "^2.0.0" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001208", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz", + "integrity": "sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==", + "dev": true + }, + "capture-exit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/capture-exit/-/capture-exit-2.0.0.tgz", + "integrity": "sha512-PiT/hQmTonHhl/HFGN+Lx3JJUznrVYJ3+AQsnthneZbvW7x+f08Tk7yLJTLEOUvBTbduLeeBkxEaYXUOUrRq6g==", + "dev": true, + "requires": { + "rsvp": "^4.8.4" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "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" + } + }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, + "ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true + }, + "cjs-module-lexer": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-0.6.0.tgz", + "integrity": "sha512-uc2Vix1frTfnuzxxu1Hp4ktSvM3QaI4oXl4ZUqL1wjTu/BGki9TrCWoqLTg/drR1KwAEarXuRFCG2Svr1GxPFw==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true + }, + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.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 + }, + "colorette": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", + "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", + "dev": true + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "core-js-compat": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", + "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==", + "dev": true, + "requires": { + "browserslist": "^4.8.3", + "semver": "7.0.0" + }, + "dependencies": { + "semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true + } + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "cosmiconfig": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "dev": true, + "requires": { + "import-fresh": "^2.0.0", + "is-directory": "^0.3.1", + "js-yaml": "^3.13.1", + "parse-json": "^4.0.0" + }, + "dependencies": { + "import-fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "dev": true, + "requires": { + "caller-path": "^2.0.0", + "resolve-from": "^3.0.0" + } }, - "@babel/plugin-transform-property-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.8.3.tgz", - "integrity": "sha512-uGiiXAZMqEoQhRWMK17VospMZh5sXWg+dlh2soffpkAl96KAm+WZuJfa6lcELotSRmooLqg0MWdH6UUq85nmmg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "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==", + "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" + } + }, + "cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "dev": true + }, + "cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dev": true, + "requires": { + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + } + } + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "data-urls": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "dev": true, + "requires": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decimal.js": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.1.tgz", + "integrity": "sha512-KaL7+6Fw6i5A2XSnsbhm/6B+NuEA7TZ4vqxnd5tXz9sbKtrN9Srj8ab4vKVdK8YAqZO9P1kg45Y6YLoduPf+kw==", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "diff-sequences": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-26.6.2.tgz", + "integrity": "sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q==", + "dev": true + }, + "domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "dev": true, + "requires": { + "webidl-conversions": "^5.0.0" + }, + "dependencies": { + "webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "dev": true + } + } + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "dev": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "electron-to-chromium": { + "version": "1.3.717", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.717.tgz", + "integrity": "sha512-OfzVPIqD1MkJ7fX+yTl2nKyOE4FReeVfMCzzxQS+Kp43hZYwHwThlGP+EGIZRXJsxCM7dqo8Y65NOX/HP12iXQ==", + "dev": true + }, + "emittery": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.7.2.tgz", + "integrity": "sha512-A8OG5SR/ij3SsJdWDJdkkSYUjQdCUx6APQXem0SaEePBSRg4eymGYwBkKo1Y6DU+af/Jn2dBQqDBvjnr9Vi8nQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es6-object-assign": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", + "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "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 + }, + "escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "dev": true, + "requires": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + }, + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "exec-sh": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz", + "integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w==", + "dev": true + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } }, - "@babel/plugin-transform-regenerator": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.8.7.tgz", - "integrity": "sha512-TIg+gAl4Z0a3WmD3mbYSk+J9ZUH6n/Yc57rtKRnlA/7rcCvpekHXe0CMZHP1gYp7/KLe9GHTuIba0vXmls6drA==", - "dev": true, - "requires": { - "regenerator-transform": "^0.14.2" - } + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "expect": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-26.6.2.tgz", + "integrity": "sha512-9/hlOBkQl2l/PLHJx6JjoDF6xPKcJEsUlWKb23rKE7KzeDqUZKXKNMW27KIue5JMdBV9HgmoJPcc8HtO85t9IA==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "ansi-styles": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-regex-util": "^26.0.0" + }, + "dependencies": { + "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" + } }, - "@babel/plugin-transform-reserved-words": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.8.3.tgz", - "integrity": "sha512-mwMxcycN3omKFDjDQUl+8zyMsBfjRFr0Zn/64I41pmjv4NJuqcYlEtezwYtw9TFd9WR1vN5kiM+O0gMZzO6L0A==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "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" + } }, - "@babel/plugin-transform-shorthand-properties": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.8.3.tgz", - "integrity": "sha512-I9DI6Odg0JJwxCHzbzW08ggMdCezoWcuQRz3ptdudgwaHxTjxw5HgdFJmZIkIMlRymL6YiZcped4TTCB0JcC8w==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "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 + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "dependencies": { + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + } + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "dev": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "gensync": { + "version": "1.0.0-beta.1", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", + "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", + "dev": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, + "get-stdin": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", + "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "git-up": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/git-up/-/git-up-4.0.1.tgz", + "integrity": "sha512-LFTZZrBlrCrGCG07/dm1aCjjpL1z9L3+5aEeI9SBhAqSc+kiA9Or1bgZhQFNppJX6h/f5McrvJt1mQXTFm6Qrw==", + "dev": true, + "requires": { + "is-ssh": "^1.3.0", + "parse-url": "^5.0.0" + } + }, + "git-url-parse": { + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.1.2.tgz", + "integrity": "sha512-gZeLVGY8QVKMIkckncX+iCq2/L8PlwncvDFKiWkBn9EtCfYDbliRTTp6qzyQ1VMdITUfq7293zDzfpjdiGASSQ==", + "dev": true, + "requires": { + "git-up": "^4.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", + "dev": true + }, + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=", + "dev": true, + "optional": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "dev": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "dev": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "dev": true, + "requires": { + "whatwg-encoding": "^1.0.5" + } + }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true + }, + "husky": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/husky/-/husky-3.1.0.tgz", + "integrity": "sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "ci-info": "^2.0.0", + "cosmiconfig": "^5.2.1", + "execa": "^1.0.0", + "get-stdin": "^7.0.0", + "opencollective-postinstall": "^2.0.2", + "pkg-dir": "^4.2.0", + "please-upgrade-node": "^3.2.0", + "read-pkg": "^5.2.0", + "run-node": "^1.0.0", + "slash": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true }, - "@babel/plugin-transform-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.8.3.tgz", - "integrity": "sha512-CkuTU9mbmAoFOI1tklFWYYbzX5qCIZVXPVy0jpXgGwkplCndQAa58s2jr66fTeQnA64bDox0HL4U56CFYoyC7g==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "parse-json": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", + "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1", + "lines-and-columns": "^1.1.6" + } }, - "@babel/plugin-transform-sticky-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.8.3.tgz", - "integrity": "sha512-9Spq0vGCD5Bb4Z/ZXXSK5wbbLFMG085qd2vhL1JYu1WcQ5bXqZBAYRzU1d+p79GcHs2szYv5pVQCX13QgldaWw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/helper-regex": "^7.8.3" - } + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true }, - "@babel/plugin-transform-template-literals": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.8.3.tgz", - "integrity": "sha512-820QBtykIQOLFT8NZOcTRJ1UNuztIELe4p9DCgvj4NK+PwluSJ49we7s9FB1HIGNIYT7wFUJ0ar2QpCDj0escQ==", - "dev": true, - "requires": { - "@babel/helper-annotate-as-pure": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" - } + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } }, - "@babel/plugin-transform-typeof-symbol": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.8.4.tgz", - "integrity": "sha512-2QKyfjGdvuNfHsb7qnBBlKclbD4CfshH2KvDabiijLMGXPHJXGxtDzwIF7bQP+T0ysw8fYTtxPafgfs/c1Lrqg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3" - } + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + } }, - "@babel/plugin-transform-typescript": { - "version": "7.9.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.9.4.tgz", - "integrity": "sha512-yeWeUkKx2auDbSxRe8MusAG+n4m9BFY/v+lPjmQDgOFX5qnySkUY5oXzkp6FwPdsYqnKay6lorXYdC0n3bZO7w==", - "dev": true, - "requires": { - "@babel/helper-create-class-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-syntax-typescript": "^7.8.3" - } + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "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" + } + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "interpret": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", + "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", + "dev": true + }, + "invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dev": true, + "requires": { + "loose-envify": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "requires": { + "ci-info": "^2.0.0" + } + }, + "is-core-module": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-directory": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", + "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", + "dev": true + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "optional": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "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-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, + "is-ssh": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.1.tgz", + "integrity": "sha512-0eRIASHZt1E68/ixClI8bp2YK2wmBPVWEismTs6M+M099jKgrzl/3E976zIbImSIob48N2/XGe9y7ZiYdImSlg==", + "dev": true, + "requires": { + "protocols": "^1.1.0" + } + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "optional": true, + "requires": { + "is-docker": "^2.0.0" + } + }, + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "dev": true + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "dependencies": { + "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 }, - "@babel/plugin-transform-unicode-regex": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.8.3.tgz", - "integrity": "sha512-+ufgJjYdmWfSQ+6NS9VGUR2ns8cjJjYbrbi11mZBTaWm+Fui/ncTLFF28Ei1okavY+xkojGr1eJxNsWYeA5aZw==", - "dev": true, - "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3" - } + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true }, - "@babel/polyfill": { - "version": "7.8.7", - "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.8.7.tgz", - "integrity": "sha512-LeSfP9bNZH2UOZgcGcZ0PIHUt1ZuHub1L3CVmEyqLxCeDLm4C5Gi8jRH8ZX2PNpDhQCo0z6y/+DIs2JlliXW8w==", - "dev": true, - "requires": { - "core-js": "^2.6.5", - "regenerator-runtime": "^0.13.4" - } + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } }, - "@babel/preset-env": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.9.0.tgz", - "integrity": "sha512-712DeRXT6dyKAM/FMbQTV/FvRCms2hPCx+3weRjZ8iQVQWZejWWk1wwG6ViWMyqb/ouBbGOl5b6aCk0+j1NmsQ==", - "dev": true, - "requires": { - "@babel/compat-data": "^7.9.0", - "@babel/helper-compilation-targets": "^7.8.7", - "@babel/helper-module-imports": "^7.8.3", - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-proposal-async-generator-functions": "^7.8.3", - "@babel/plugin-proposal-dynamic-import": "^7.8.3", - "@babel/plugin-proposal-json-strings": "^7.8.3", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-proposal-numeric-separator": "^7.8.3", - "@babel/plugin-proposal-object-rest-spread": "^7.9.0", - "@babel/plugin-proposal-optional-catch-binding": "^7.8.3", - "@babel/plugin-proposal-optional-chaining": "^7.9.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.8.3", - "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", - "@babel/plugin-syntax-json-strings": "^7.8.0", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", - "@babel/plugin-syntax-numeric-separator": "^7.8.0", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.8.3", - "@babel/plugin-transform-arrow-functions": "^7.8.3", - "@babel/plugin-transform-async-to-generator": "^7.8.3", - "@babel/plugin-transform-block-scoped-functions": "^7.8.3", - "@babel/plugin-transform-block-scoping": "^7.8.3", - "@babel/plugin-transform-classes": "^7.9.0", - "@babel/plugin-transform-computed-properties": "^7.8.3", - "@babel/plugin-transform-destructuring": "^7.8.3", - "@babel/plugin-transform-dotall-regex": "^7.8.3", - "@babel/plugin-transform-duplicate-keys": "^7.8.3", - "@babel/plugin-transform-exponentiation-operator": "^7.8.3", - "@babel/plugin-transform-for-of": "^7.9.0", - "@babel/plugin-transform-function-name": "^7.8.3", - "@babel/plugin-transform-literals": "^7.8.3", - "@babel/plugin-transform-member-expression-literals": "^7.8.3", - "@babel/plugin-transform-modules-amd": "^7.9.0", - "@babel/plugin-transform-modules-commonjs": "^7.9.0", - "@babel/plugin-transform-modules-systemjs": "^7.9.0", - "@babel/plugin-transform-modules-umd": "^7.9.0", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.8.3", - "@babel/plugin-transform-new-target": "^7.8.3", - "@babel/plugin-transform-object-super": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.8.7", - "@babel/plugin-transform-property-literals": "^7.8.3", - "@babel/plugin-transform-regenerator": "^7.8.7", - "@babel/plugin-transform-reserved-words": "^7.8.3", - "@babel/plugin-transform-shorthand-properties": "^7.8.3", - "@babel/plugin-transform-spread": "^7.8.3", - "@babel/plugin-transform-sticky-regex": "^7.8.3", - "@babel/plugin-transform-template-literals": "^7.8.3", - "@babel/plugin-transform-typeof-symbol": "^7.8.4", - "@babel/plugin-transform-unicode-regex": "^7.8.3", - "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.9.0", - "browserslist": "^4.9.1", - "core-js-compat": "^3.6.2", - "invariant": "^2.2.2", - "levenary": "^1.1.1", - "semver": "^5.5.0" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true }, - "@babel/preset-modules": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.3.tgz", - "integrity": "sha512-Ra3JXOHBq2xd56xSF7lMKXdjBn3T772Y1Wet3yWnkDly9zHvJki029tAFzvAAK5cf4YV3yoxuP61crYRol6SVg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - } + "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" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true }, - "@babel/preset-typescript": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.9.0.tgz", - "integrity": "sha512-S4cueFnGrIbvYJgwsVFKdvOmpiL0XGw9MFW9D0vgRys5g36PBhZRL8NX8Gr2akz8XRtzq6HuDXPD/1nniagNUg==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.8.3", - "@babel/plugin-transform-typescript": "^7.9.0" - } + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest/-/jest-26.6.3.tgz", + "integrity": "sha512-lGS5PXGAzR4RF7V5+XObhqz2KZIDUA1yD0DG6pBVmy10eh0ZIXQImRuzocsI/N2XZ1GrLFwTS27In2i2jlpq1Q==", + "dev": true, + "requires": { + "@jest/core": "^26.6.3", + "import-local": "^3.0.2", + "jest-cli": "^26.6.3" + }, + "dependencies": { + "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" + } }, - "@babel/register": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.9.0.tgz", - "integrity": "sha512-Tv8Zyi2J2VRR8g7pC5gTeIN8Ihultbmk0ocyNz8H2nEZbmhp1N6q0A1UGsQbDvGP/sNinQKUHf3SqXwqjtFv4Q==", - "dev": true, - "requires": { - "find-cache-dir": "^2.0.0", - "lodash": "^4.17.13", - "make-dir": "^2.1.0", - "pirates": "^4.0.0", - "source-map-support": "^0.5.16" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "@babel/runtime": { - "version": "7.9.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.9.2.tgz", - "integrity": "sha512-NE2DtOdufG7R5vnfQUTehdTfNycfUANEtCa9PssN9O/xmTzP4E08UI797ixaei6hBEVL9BI/PsdJS5x7mWoB9Q==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.13.4" - } + "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" + } }, - "@babel/template": { - "version": "7.8.6", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.8.6.tgz", - "integrity": "sha512-zbMsPMy/v0PWFZEhQJ66bqjhH+z0JgMoBWuikXybgG3Gkd/3t5oQ1Rw2WQhnSrsOmsKXnZOx15tkC4qON/+JPg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/parser": "^7.8.6", - "@babel/types": "^7.8.6" - } + "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 }, - "@babel/traverse": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.0.tgz", - "integrity": "sha512-jAZQj0+kn4WTHO5dUZkZKhbFrqZE7K5LAQ5JysMnmvGij+wOdr+8lWqPeW0BcF4wFwrEXXtdGO7wcV6YPJcf3w==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.8.3", - "@babel/generator": "^7.9.0", - "@babel/helper-function-name": "^7.8.3", - "@babel/helper-split-export-declaration": "^7.8.3", - "@babel/parser": "^7.9.0", - "@babel/types": "^7.9.0", - "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.13" - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "@babel/types": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.9.0.tgz", - "integrity": "sha512-BS9JKfXkzzJl8RluW4JGknzpiUV7ZrvTayM6yfqLTVBEnFtyowVIOu6rqxRd5cVO6yGoWf4T8u8dgK9oB+GCng==", - "dev": true, - "requires": { - "@babel/helper-validator-identifier": "^7.9.0", - "lodash": "^4.17.13", - "to-fast-properties": "^2.0.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "jest-cli": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-26.6.3.tgz", + "integrity": "sha512-GF9noBSa9t08pSyl3CY4frMrqp+aQXFGFkf5hEPbh/pIUFYWMK6ZLTfbmadxJVcJrdRoChlWQsA2VkJcDFK8hg==", + "dev": true, + "requires": { + "@jest/core": "^26.6.3", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "import-local": "^3.0.2", + "is-ci": "^2.0.0", + "jest-config": "^26.6.3", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "prompts": "^2.0.1", + "yargs": "^15.4.1" + } }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", - "dev": true, - "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "dev": true - } - } + "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" + } + } + } + }, + "jest-changed-files": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-26.6.2.tgz", + "integrity": "sha512-fDS7szLcY9sCtIip8Fjry9oGf3I2ht/QT21bAHm5Dmf0mD4X3ReNUf17y+bO6fR8WgbIZTlbyG1ak/53cbRzKQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "execa": "^4.0.0", + "throat": "^5.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } }, - "@istanbuljs/nyc-config-babel": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@istanbuljs/nyc-config-babel/-/nyc-config-babel-2.1.1.tgz", - "integrity": "sha512-cWcUCqHOYB+Mpumsv03uaE7rMvtmJn7pZ3llc+9gyqMFC93IVcUuuJ/mknoWsiuajcEjRCqKmhGaiAaXG6kzLA==", - "dev": true - }, - "@istanbuljs/schema": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz", - "integrity": "sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw==", - "dev": true - }, - "@sinonjs/commons": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.7.1.tgz", - "integrity": "sha512-Debi3Baff1Qu1Unc3mjJ96MgpbwTn43S1+9yJ0llWygPwDNu2aaWBD6yc9y/Z8XDRNhx7U+u2UDg2OGQXkclUQ==", - "dev": true, - "requires": { - "type-detect": "4.0.8" - } + "execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + } }, - "@sinonjs/formatio": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/@sinonjs/formatio/-/formatio-3.2.2.tgz", - "integrity": "sha512-B8SEsgd8gArBLMD6zpRw3juQ2FVSsmdd7qlevyDqzS9WTCtvF55/gAL+h6gue8ZvPYcdiPdvueM/qm//9XzyTQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1", - "@sinonjs/samsam": "^3.1.0" - } + "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" + } }, - "@sinonjs/samsam": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", - "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.3.0", - "array-from": "^2.1.1", - "lodash": "^4.17.15" - } + "is-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", + "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", + "dev": true }, - "@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "@types/chai": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.11.tgz", - "integrity": "sha512-t7uW6eFafjO+qJ3BIV2gGUyZs27egcNRkUdalkud+Qa3+kg//f129iuOFivHDXQ+vnU3fDXuwgv0cqMCbcE8sw==", - "dev": true - }, - "@types/chai-as-promised": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@types/chai-as-promised/-/chai-as-promised-7.1.2.tgz", - "integrity": "sha512-PO2gcfR3Oxa+u0QvECLe1xKXOqYTzCmWf0FhLhjREoW3fPAVamjihL7v1MOVLJLsnAMdLcjkfrs01yvDMwVK4Q==", - "dev": true, - "requires": { - "@types/chai": "*" - } + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } }, - "@types/debug": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz", - "integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==", - "dev": true - }, - "@types/mocha": { - "version": "5.2.7", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.7.tgz", - "integrity": "sha512-NYrtPht0wGzhwe9+/idPaBB+TqkY9AhTvOLMkThm0IoEfLaiVQZwBwyJ5puCkO3AUCWrmcoePjp2mbFocKy4SQ==", - "dev": true - }, - "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", - "dev": true - }, - "@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true - }, - "@types/sinon": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-7.5.2.tgz", - "integrity": "sha512-T+m89VdXj/eidZyejvmoP9jivXgBDdkOSBVQjU9kF349NEx10QdPNGxHeZUaj1IlJ32/ewdyXJjnJxyxJroYwg==", - "dev": true - }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", - "dev": true, - "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" - } + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true }, - "ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true + "shebang-command": { + "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": "^3.0.0" + } }, - "ansi-regex": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", - "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", - "dev": true + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true }, + "which": { + "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" + } + } + } + }, + "jest-config": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-26.6.3.tgz", + "integrity": "sha512-t5qdIj/bCj2j7NFVHb2nFB4aUdfucDn3JRKgrZnplb8nieAirAzRSHP8uDEd+qV6ygzg9Pz4YG7UTJf94LPSyg==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^26.6.3", + "@jest/types": "^26.6.2", + "babel-jest": "^26.6.3", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.4", + "jest-environment-jsdom": "^26.6.2", + "jest-environment-node": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-jasmine2": "^26.6.3", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2" + }, + "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" - } + "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" + } }, - "append-transform": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", - "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", - "dev": true, - "requires": { - "default-require-extensions": "^3.0.0" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-from": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", - "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "babel-plugin-dynamic-import-node": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz", - "integrity": "sha512-o6qFkpeQEBxcqt0XYlWzAVxNCSCZdUgcR8IRlhD/8DylxjjO4foPcvTW0GGKa/cVt3rvxZ7o5ippJ+/0nvLhlQ==", - "dev": true, - "requires": { - "object.assign": "^4.1.0" - } - }, - "babel-plugin-istanbul": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-5.2.0.tgz", - "integrity": "sha512-5LphC0USA8t4i1zCtjbbNb6jJj/9+X6P37Qfirc/70EQ34xKlMW+a1RHGwxGI+SwWpNwZ27HqvzAobeqaXwiZw==", - "dev": true, - "requires": { - "@babel/helper-plugin-utils": "^7.0.0", - "find-up": "^3.0.0", - "istanbul-lib-instrument": "^3.3.0", - "test-exclude": "^5.2.3" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - } - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "beachball": { - "version": "1.32.2", - "resolved": "https://registry.npmjs.org/beachball/-/beachball-1.32.2.tgz", - "integrity": "sha512-1rUhqockNXdAjCCzFLszHxnfsjf+/dTFo2YudpeQWyKUyQ1HeIiwdUVp/bM9uOc+VxG6sUrk5nnrBRAX7yI4aw==", - "dev": true, - "requires": { - "cosmiconfig": "^6.0.0", - "execa": "^4.0.3", - "fs-extra": "^8.0.1", - "git-url-parse": "^11.1.2", - "glob": "^7.1.4", - "lodash": "^4.17.15", - "minimatch": "^3.0.4", - "p-limit": "^3.0.2", - "prompts": "~2.1.0", - "semver": "^6.1.1", - "toposort": "^2.0.2", - "yargs-parser": "^13.1.0" - }, - "dependencies": { - "cosmiconfig": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz", - "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==", - "dev": true, - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.1.0", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.7.2" - } - }, - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "execa": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.0.3.tgz", - "integrity": "sha512-WFDXGHckXPWZX19t1kCsXzOpqX9LWYNqn4C+HqZlk/V0imTkzJZqf87ZBhvpHaftERYknpk0fjSylnXVlVgI0A==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - } - }, - "get-stream": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.1.0.tgz", - "integrity": "sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - }, - "npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "requires": { - "path-key": "^3.0.0" - } - }, - "p-limit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", - "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parse-json": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.1.tgz", - "integrity": "sha512-ztoZ4/DYeXQq4E21v169sC8qWINGpcosGv9XhTDvg9/hWvx/zrFkc9BiWxR58OJLHGk28j5BL0SDLeV2WmFZlQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - }, - "path-key": { - "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-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "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": "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": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "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" - } - } - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserslist": { - "version": "4.16.4", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.4.tgz", - "integrity": "sha512-d7rCxYV8I9kj41RH8UKYnvDYCRENUlHRgyXy/Rhr/1BaeLGfiCptEdFE8MIrvGfWbBFNjVYx76SQWvNX1j+/cQ==", - "dev": true, - "requires": { - "caniuse-lite": "^1.0.30001208", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.712", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" - } - }, - "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", - "dev": true - }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, - "caching-transform": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", - "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", - "dev": true, - "requires": { - "hasha": "^5.0.0", - "make-dir": "^3.0.0", - "package-hash": "^4.0.0", - "write-file-atomic": "^3.0.0" - }, - "dependencies": { - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "dev": true, - "requires": { - "callsites": "^2.0.0" - }, - "dependencies": { - "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", - "dev": true - } - } + "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" + } }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "dev": true, - "requires": { - "caller-callsite": "^2.0.0" - } + "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 }, - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - }, - "caniuse-lite": { - "version": "1.0.30001208", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz", - "integrity": "sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==", - "dev": true - }, - "chai": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", - "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", - "dev": true, - "requires": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "pathval": "^1.1.0", - "type-detect": "^4.0.5" - } + "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 }, - "chai-as-promised": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/chai-as-promised/-/chai-as-promised-7.1.1.tgz", - "integrity": "sha512-azL6xMoi+uxu6z4rhWQ1jbdUhOMhis2PvscD/xjLqNMkv3BPPp2JyyuTHOrf9BOosGpNQ11v6BKv/g57RXbiaA==", - "dev": true, - "requires": { - "check-error": "^1.0.2" - } + "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" + } + } + } + }, + "jest-diff": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-26.6.2.tgz", + "integrity": "sha512-6m+9Z3Gv9wN0WFVasqjCL/06+EFCMTqDEUl/b87HYK2rAPTyfz4ZIuSlPhY51PIQRWx5TaxeF1qmXKe9gfN3sA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "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": "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" - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, - "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", - "dev": true - }, - "cliui": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", - "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", - "dev": true, - "requires": { - "string-width": "^3.1.0", - "strip-ansi": "^5.2.0", - "wrap-ansi": "^5.1.0" - }, - "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==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } - } + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.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" - } + "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.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "colorette": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.2.tgz", - "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==", - "dev": true - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "dev": true - }, - "commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "core-js": { - "version": "2.6.11", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", - "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", - "dev": true - }, - "core-js-compat": { - "version": "3.6.4", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.6.4.tgz", - "integrity": "sha512-zAa3IZPvsJ0slViBQ2z+vgyyTuhd3MFn1rBQjZSKVEgB0UMYhUkCj9jJUVPgGTGqWvsBVmfnruXgTcNyTlEiSA==", - "dev": true, - "requires": { - "browserslist": "^4.8.3", - "semver": "7.0.0" - }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } - } - }, - "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", - "dev": true, - "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" - }, - "dependencies": { - "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", - "dev": true, - "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" - } - }, - "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", - "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==", - "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" - } - }, - "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } + "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 }, - "default-require-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", - "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", - "dev": true, - "requires": { - "strip-bom": "^4.0.0" - }, - "dependencies": { - "strip-bom": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", - "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", - "dev": true - } - } - }, - "define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "requires": { - "object-keys": "^1.0.12" - } + "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 }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, - "electron-to-chromium": { - "version": "1.3.717", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.717.tgz", - "integrity": "sha512-OfzVPIqD1MkJ7fX+yTl2nKyOE4FReeVfMCzzxQS+Kp43hZYwHwThlGP+EGIZRXJsxCM7dqo8Y65NOX/HP12iXQ==", - "dev": true - }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } + "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" + } + } + } + }, + "jest-docblock": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-26.0.0.tgz", + "integrity": "sha512-RDZ4Iz3QbtRWycd8bUEPxQsTlYazfYn/h5R65Fc6gOfwozFhoImx+affzky/FFBuqISPTqjXomoIGJVKBWoo0w==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-26.6.2.tgz", + "integrity": "sha512-Mer/f0KaATbjl8MCJ+0GEpNdqmnVmDYqCTJYTvoo7rqmRiDllmp2AYN+06F93nXcY3ur9ShIjS+CO/uD+BbH4A==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "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" + } }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "es-abstract": { - "version": "1.17.5", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.5.tgz", - "integrity": "sha512-BR9auzDbySxOcfog0tLECW8l28eRGpDpU3Dm3Hp4q/N+VtLTmyj4EUN088XZWQDW/hzj6sYRDXeOFsaAODKvpg==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" - } + "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" + } }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } + "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 }, - "es6-error": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", - "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", - "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 }, - "es6-object-assign": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", - "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=", - "dev": true + "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" + } + } + } + }, + "jest-environment-jsdom": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-26.6.2.tgz", + "integrity": "sha512-jgPqCruTlt3Kwqg5/WVFyHIOJHsiAvhcp2qiR2QQstuG9yWox5+iHpU3ZrcBxW14T4fe5Z68jAfLRh7joCSP2Q==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2", + "jsdom": "^16.4.0" + } + }, + "jest-environment-node": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-26.6.2.tgz", + "integrity": "sha512-zhtMio3Exty18dy8ee8eJ9kjnRyZC1N4C1Nt/VShN1apyXc8rWGtJ9lI7vqiWcyyXS4BVSEn9lxAM2D+07/Tag==", + "dev": true, + "requires": { + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "jest-mock": "^26.6.2", + "jest-util": "^26.6.2" + } + }, + "jest-get-type": { + "version": "26.3.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-26.3.0.tgz", + "integrity": "sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig==", + "dev": true + }, + "jest-haste-map": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-26.6.2.tgz", + "integrity": "sha512-easWIJXIw71B2RdR8kgqpjQrbMRWQBgiBwXYEhtGUTaX+doCjBheluShdDMeR8IMfJiTqH4+zfhtg29apJf/8w==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.1.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^26.0.0", + "jest-serializer": "^26.6.2", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "micromatch": "^4.0.2", + "sane": "^4.0.3", + "walker": "^1.0.7" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + } + } + }, + "jest-jasmine2": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-26.6.3.tgz", + "integrity": "sha512-kPKUrQtc8aYwBV7CqBg5pu+tmYXlvFlSFYn18ev4gPFtrRzB15N2gW/Roew3187q2w2eHuu0MU9TJz6w0/nPEg==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^26.6.2", + "is-generator-fn": "^2.0.0", + "jest-each": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "pretty-format": "^26.6.2", + "throat": "^5.0.0" + }, + "dependencies": { + "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" + } }, - "escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "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 - }, - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - }, - "estree-walker": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", - "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "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" + } }, - "execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - } + "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 }, - "find-cache-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", - "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^2.0.0", - "pkg-dir": "^3.0.0" - } + "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 }, - "flat": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", - "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", - "dev": true, - "requires": { - "is-buffer": "~2.0.3" - } + "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" + } + } + } + }, + "jest-leak-detector": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-26.6.2.tgz", + "integrity": "sha512-i4xlXpsVSMeKvg2cEKdfhh0H39qlJlP5Ex1yQxwF9ubahboQYMgTtz5oML35AVA3B4Eu+YsmwaiKVev9KCvLxg==", + "dev": true, + "requires": { + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + } + }, + "jest-matcher-utils": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-26.6.2.tgz", + "integrity": "sha512-llnc8vQgYcNqDrqRDXWwMr9i7rS5XFiCwvh6DTP7Jqa2mqpcCBBlpCbn+trkG0KNhPu/h8rzyBkriOtBstvWhw==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "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" + } }, - "foreground-child": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", - "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", - "dev": true, - "requires": { - "cross-spawn": "^7.0.0", - "signal-exit": "^3.0.2" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true - }, - "shebang-command": { - "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": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "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" - } - } - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "fromentries": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.1.tgz", - "integrity": "sha512-w4t/zm2J+uAcrpeKyW0VmYiIs3aqe/xKQ+2qwazVNZSCklQHhaVjk6XzKw5GtImq5thgL0IVRjGRAOastb08RQ==", - "dev": true - }, - "fs-extra": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", - "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", - "dev": true, - "requires": { - "graceful-fs": "^4.2.0", - "jsonfile": "^4.0.0", - "universalify": "^0.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" + } }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "gensync": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz", - "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true - }, - "get-package-type": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", - "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", - "dev": true - }, - "get-stdin": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", - "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", - "dev": true + "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 }, - "get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "requires": { - "pump": "^3.0.0" - } + "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 }, - "git-up": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/git-up/-/git-up-4.0.1.tgz", - "integrity": "sha512-LFTZZrBlrCrGCG07/dm1aCjjpL1z9L3+5aEeI9SBhAqSc+kiA9Or1bgZhQFNppJX6h/f5McrvJt1mQXTFm6Qrw==", - "dev": true, - "requires": { - "is-ssh": "^1.3.0", - "parse-url": "^5.0.0" - } + "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" + } + } + } + }, + "jest-message-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-26.6.2.tgz", + "integrity": "sha512-rGiLePzQ3AzwUshu2+Rn+UMFk0pHN58sOG+IaJbk5Jxuqo3NYO1U2/MIR4S1sKgsoYSXSzdtSa0TgrmtUwEbmA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.2", + "pretty-format": "^26.6.2", + "slash": "^3.0.0", + "stack-utils": "^2.0.2" + }, + "dependencies": { + "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" + } }, - "git-url-parse": { - "version": "11.1.2", - "resolved": "https://registry.npmjs.org/git-url-parse/-/git-url-parse-11.1.2.tgz", - "integrity": "sha512-gZeLVGY8QVKMIkckncX+iCq2/L8PlwncvDFKiWkBn9EtCfYDbliRTTp6qzyQ1VMdITUfq7293zDzfpjdiGASSQ==", - "dev": true, - "requires": { - "git-up": "^4.0.0" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.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" + } }, - "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true + "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 }, "graceful-fs": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", - "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "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 - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "hasha": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", - "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", - "dev": true, - "requires": { - "is-stream": "^2.0.0", - "type-fest": "^0.8.0" - }, - "dependencies": { - "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==", - "dev": true - } - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "html-escaper": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", - "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", - "dev": true - }, - "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true - }, - "husky": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/husky/-/husky-3.1.0.tgz", - "integrity": "sha512-FJkPoHHB+6s4a+jwPqBudBDvYZsoQW5/HBuMSehC8qDiCe50kpcxeqFoDSlow+9I6wg47YxBoT3WxaURlrDIIQ==", - "dev": true, - "requires": { - "chalk": "^2.4.2", - "ci-info": "^2.0.0", - "cosmiconfig": "^5.2.1", - "execa": "^1.0.0", - "get-stdin": "^7.0.0", - "opencollective-postinstall": "^2.0.2", - "pkg-dir": "^4.2.0", - "please-upgrade-node": "^3.2.0", - "read-pkg": "^5.2.0", - "run-node": "^1.0.0", - "slash": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "parse-json": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.0.0.tgz", - "integrity": "sha512-OOY5b7PAEFV0E2Fir1KOkxchnZNCdowAJgQ5NuxjpBKTRP3pQhwkrkxqQjeoKJ+fO7bCpmIZaogI4eZGDMEGOw==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1", - "lines-and-columns": "^1.1.6" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "read-pkg": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", - "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", - "dev": true, - "requires": { - "@types/normalize-package-data": "^2.4.0", - "normalize-package-data": "^2.5.0", - "parse-json": "^5.0.0", - "type-fest": "^0.6.0" - } - }, - "type-fest": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", - "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", - "dev": true - } - } - }, - "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } + "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" + } + } + } + }, + "jest-mock": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-26.6.2.tgz", + "integrity": "sha512-YyFjePHHp1LzpzYcmgqkJ0nm0gg/lJx2aZFzFy1S6eUqNjXsOqTK10zNRff2dNfssgokjkG65OlWNcIlgd3zew==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/node": "*" + } + }, + "jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true + }, + "jest-regex-util": { + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-26.0.0.tgz", + "integrity": "sha512-Gv3ZIs/nA48/Zvjrl34bf+oD76JHiGDUxNOVgUjh3j890sblXryjY4rss71fPtD/njchl6PSE2hIhvyWa1eT0A==", + "dev": true + }, + "jest-resolve": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-26.6.2.tgz", + "integrity": "sha512-sOxsZOq25mT1wRsfHcbtkInS+Ek7Q8jCHUB0ZUTP0tc/c41QHriU/NunqMfCUWsL4H3MHpvQD4QR9kSYhS7UvQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^26.6.2", + "read-pkg-up": "^7.0.1", + "resolve": "^1.18.1", + "slash": "^3.0.0" + }, + "dependencies": { + "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" + } }, - "imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "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", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "interpret": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", - "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==", - "dev": true - }, - "invariant": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", - "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", - "dev": true, - "requires": { - "loose-envify": "^1.0.0" - } + "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" + } }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", - "dev": true - }, - "is-buffer": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", - "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", - "dev": true - }, - "is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true - }, - "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true - }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "requires": { - "has": "^1.0.3" - } + "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 }, - "is-ssh": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/is-ssh/-/is-ssh-1.3.1.tgz", - "integrity": "sha512-0eRIASHZt1E68/ixClI8bp2YK2wmBPVWEismTs6M+M099jKgrzl/3E976zIbImSIob48N2/XGe9y7ZiYdImSlg==", - "dev": true, - "requires": { - "protocols": "^1.1.0" - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } + "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 }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + } }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } }, - "istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", - "dev": true - }, - "istanbul-lib-hook": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", - "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", - "dev": true, - "requires": { - "append-transform": "^2.0.0" - } + "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" + } + } + } + }, + "jest-resolve-dependencies": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-26.6.3.tgz", + "integrity": "sha512-pVwUjJkxbhe4RY8QEWzN3vns2kqyuldKpxlxJlzEYfKSvY6/bMvxoFrYYzUO1Gx28yKWN37qyV7rIoIp2h8fTg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-snapshot": "^26.6.2" + } + }, + "jest-runner": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-26.6.3.tgz", + "integrity": "sha512-atgKpRHnaA2OvByG/HpGA4g6CSPS/1LK0jK3gATJAoptC1ojltpmVlYC3TYgdmGp+GLuhzpH30Gvs36szSL2JQ==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.7.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-docblock": "^26.0.0", + "jest-haste-map": "^26.6.2", + "jest-leak-detector": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "jest-runtime": "^26.6.3", + "jest-util": "^26.6.2", + "jest-worker": "^26.6.2", + "source-map-support": "^0.5.6", + "throat": "^5.0.0" + }, + "dependencies": { + "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" + } }, - "istanbul-lib-instrument": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", - "integrity": "sha512-5nnIN4vo5xQZHdXno/YDXJ0G+I3dAm4XgzfSVTPLQpj/zAV2dV6Juy0yaf10/zrJOJeHoN3fraFe+XRq2bFVZA==", - "dev": true, - "requires": { - "@babel/generator": "^7.4.0", - "@babel/parser": "^7.4.3", - "@babel/template": "^7.4.0", - "@babel/traverse": "^7.4.3", - "@babel/types": "^7.4.0", - "istanbul-lib-coverage": "^2.0.5", - "semver": "^6.0.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 - } - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "istanbul-lib-processinfo": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz", - "integrity": "sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw==", - "dev": true, - "requires": { - "archy": "^1.0.0", - "cross-spawn": "^7.0.0", - "istanbul-lib-coverage": "^3.0.0-alpha.1", - "make-dir": "^3.0.0", - "p-map": "^3.0.0", - "rimraf": "^3.0.0", - "uuid": "^3.3.3" - }, - "dependencies": { - "cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "requires": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - } - }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "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": "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": "^3.0.0" - } - }, - "shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true - }, - "which": { - "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" - } - } - } + "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" + } }, - "istanbul-lib-report": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", - "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", - "dev": true, - "requires": { - "istanbul-lib-coverage": "^3.0.0", - "make-dir": "^3.0.0", - "supports-color": "^7.1.0" - }, - "dependencies": { - "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 - }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "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" - } - } - } + "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 }, - "istanbul-lib-source-maps": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", - "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^3.0.0", - "source-map": "^0.6.1" - }, - "dependencies": { - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "istanbul-reports": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", - "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", - "dev": true, - "requires": { - "html-escaper": "^2.0.0", - "istanbul-lib-report": "^3.0.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } + "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" + } + } + } + }, + "jest-runtime": { + "version": "26.6.3", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-26.6.3.tgz", + "integrity": "sha512-lrzyR3N8sacTAMeonbqpnSka1dHNux2uk0qqDXVkMv2c/A3wYnvQ4EXuI013Y6+gSKSCxdaczvf4HF0mVXHRdw==", + "dev": true, + "requires": { + "@jest/console": "^26.6.2", + "@jest/environment": "^26.6.2", + "@jest/fake-timers": "^26.6.2", + "@jest/globals": "^26.6.2", + "@jest/source-map": "^26.6.2", + "@jest/test-result": "^26.6.2", + "@jest/transform": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/yargs": "^15.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^0.6.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-config": "^26.6.3", + "jest-haste-map": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-mock": "^26.6.2", + "jest-regex-util": "^26.0.0", + "jest-resolve": "^26.6.2", + "jest-snapshot": "^26.6.2", + "jest-util": "^26.6.2", + "jest-validate": "^26.6.2", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^15.4.1" + }, + "dependencies": { + "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" + } }, - "jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "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", - "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", - "dev": true - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "just-extend": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", - "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", - "dev": true - }, - "kleur": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", - "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", - "dev": true - }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "levenary": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", - "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", - "dev": true, - "requires": { - "leven": "^3.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" + } }, - "lines-and-columns": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } - } + "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 }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", - "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", - "dev": true - }, - "log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "requires": { - "chalk": "^2.0.1" - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "lolex": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", - "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } + "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 }, - "make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "requires": { - "pify": "^4.0.1", - "semver": "^5.6.0" - } + "strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true }, - "merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "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==", - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } + "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" + } + } + } + }, + "jest-serializer": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-26.6.2.tgz", + "integrity": "sha512-S5wqyz0DXnNJPd/xfIzZ5Xnp1HrJWBczg8mMfMpN78OJ5eDxXyf+Ygld9wX1DnUWbIbhM1YDY95NjR4CBXkb2g==", + "dev": true, + "requires": { + "@types/node": "*", + "graceful-fs": "^4.2.4" + }, + "dependencies": { + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true + } + } + }, + "jest-snapshot": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-26.6.2.tgz", + "integrity": "sha512-OLhxz05EzUtsAmOMzuupt1lHYXCNib0ECyuZ/PZOx9TrZcC8vL0x+DUG3TL+GLX3yHG45e6YGjIm0XwDc3q3og==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0", + "@jest/types": "^26.6.2", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.0.0", + "chalk": "^4.0.0", + "expect": "^26.6.2", + "graceful-fs": "^4.2.4", + "jest-diff": "^26.6.2", + "jest-get-type": "^26.3.0", + "jest-haste-map": "^26.6.2", + "jest-matcher-utils": "^26.6.2", + "jest-message-util": "^26.6.2", + "jest-resolve": "^26.6.2", + "natural-compare": "^1.4.0", + "pretty-format": "^26.6.2", + "semver": "^7.3.2" + }, + "dependencies": { + "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" + } }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "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" - } + "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" + } }, - "mocha": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.3.tgz", - "integrity": "sha512-0R/3FvjIGH3eEuG17ccFPk117XL2rWxatr81a57D+r/x2uTYZRbdZ4oVidEUMh2W2TJDa7MdAb12Lm2/qrKajg==", - "dev": true, - "requires": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.4", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.3.2", - "yargs-parser": "13.1.2", - "yargs-unparser": "1.6.0" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "mkdirp": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.4.tgz", - "integrity": "sha512-iG9AK/dJLtJ0XNgTuDbSyNS3zECqDlAhnQW4CsNxBG3LQJBbHmRX1egw39DmtOdCAqY+dKXV+sgPgilNWUKMVw==", - "dev": true, - "requires": { - "minimist": "^1.2.5" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "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 - }, - "supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } + "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 }, - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "nise": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.3.tgz", - "integrity": "sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ==", - "dev": true, - "requires": { - "@sinonjs/formatio": "^3.2.1", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "lolex": "^5.0.1", - "path-to-regexp": "^1.7.0" - }, - "dependencies": { - "lolex": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", - "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.7.0" - } - } - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "requires": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "node-modules-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", - "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", - "dev": true - }, - "node-preload": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", - "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", - "dev": true, - "requires": { - "process-on-spawn": "^1.0.0" - } + "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": { + "lru-cache": "^6.0.0" + } }, - "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } + "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" + } + } + } + }, + "jest-util": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-26.6.2.tgz", + "integrity": "sha512-MDW0fKfsn0OI7MS7Euz6h8HNDXVQ0gaM9uW6RjfDmd1DAFcaxX9OqIakHIqhbnmF08Cf2DLDG+ulq8YQQ0Lp0Q==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^2.0.0", + "micromatch": "^4.0.2" + }, + "dependencies": { + "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" + } }, - "npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "requires": { - "path-key": "^2.0.0" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "nyc": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", - "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", - "dev": true, - "requires": { - "@istanbuljs/load-nyc-config": "^1.0.0", - "@istanbuljs/schema": "^0.1.2", - "caching-transform": "^4.0.0", - "convert-source-map": "^1.7.0", - "decamelize": "^1.2.0", - "find-cache-dir": "^3.2.0", - "find-up": "^4.1.0", - "foreground-child": "^2.0.0", - "get-package-type": "^0.1.0", - "glob": "^7.1.6", - "istanbul-lib-coverage": "^3.0.0", - "istanbul-lib-hook": "^3.0.0", - "istanbul-lib-instrument": "^4.0.0", - "istanbul-lib-processinfo": "^2.0.2", - "istanbul-lib-report": "^3.0.0", - "istanbul-lib-source-maps": "^4.0.0", - "istanbul-reports": "^3.0.2", - "make-dir": "^3.0.0", - "node-preload": "^0.2.1", - "p-map": "^3.0.0", - "process-on-spawn": "^1.0.0", - "resolve-from": "^5.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "spawn-wrap": "^2.0.0", - "test-exclude": "^6.0.0", - "yargs": "^15.0.2" - }, - "dependencies": { - "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" - } - }, - "cliui": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", - "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^6.2.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 - }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "istanbul-lib-coverage": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", - "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", - "dev": true - }, - "istanbul-lib-instrument": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", - "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", - "dev": true, - "requires": { - "@babel/core": "^7.7.5", - "@istanbuljs/schema": "^0.1.2", - "istanbul-lib-coverage": "^3.0.0", - "semver": "^6.3.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "resolve-from": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", - "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", - "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 - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - }, - "test-exclude": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", - "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", - "dev": true, - "requires": { - "@istanbuljs/schema": "^0.1.2", - "glob": "^7.1.4", - "minimatch": "^3.0.4" - } - }, - "wrap-ansi": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", - "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - } - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "dev": true, - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - }, - "yargs-parser": { - "version": "18.1.3", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", - "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.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" + } }, - "object-inspect": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", - "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==", - "dev": true - }, - "object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true - }, - "object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "requires": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - } + "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 }, - "object.getownpropertydescriptors": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.0.tgz", - "integrity": "sha512-Z53Oah9A3TdLoblT7VKJaTDdXdT+lQO+cNpKVnya5JDe9uLvzu1YyY1yFDFrcxrlRgWrEFH0jJtD/IbuwjcEVg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" - } + "graceful-fs": { + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", + "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==", + "dev": true }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "requires": { - "wrappy": "1" - } + "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 }, - "onetime": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", - "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", - "dev": true, - "requires": { - "mimic-fn": "^2.1.0" - } + "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" + } + } + } + }, + "jest-validate": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-26.6.2.tgz", + "integrity": "sha512-NEYZ9Aeyj0i5rQqbq+tpIOom0YS1u2MVu6+euBsvpgIme+FOfRmoC4R5p0JiAUpaFvFy24xgrpMknarR/93XjQ==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "camelcase": "^6.0.0", + "chalk": "^4.0.0", + "jest-get-type": "^26.3.0", + "leven": "^3.1.0", + "pretty-format": "^26.6.2" + }, + "dependencies": { + "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" + } }, - "opencollective-postinstall": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", - "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true - }, - "p-map": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", - "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", - "dev": true, - "requires": { - "aggregate-error": "^3.0.0" - } + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true }, - "package-hash": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", - "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^5.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "parent-module": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", - "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, - "requires": { - "callsites": "^3.0.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" + } }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } + "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 }, - "parse-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-4.0.1.tgz", - "integrity": "sha512-d7yhga0Oc+PwNXDvQ0Jv1BuWkLVPXcAoQ/WREgd6vNNoKYaW52KI+RdOFjI63wjkmps9yUE8VS4veP+AgpQ/hA==", - "dev": true, - "requires": { - "is-ssh": "^1.3.0", - "protocols": "^1.4.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, - "parse-url": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-5.0.1.tgz", - "integrity": "sha512-flNUPP27r3vJpROi0/R3/2efgKkyXqnXwyP1KQ2U0SfFRgdizOdWfvrrvJg1LuOoxs7GQhmxJlq23IpQ/BkByg==", - "dev": true, - "requires": { - "is-ssh": "^1.3.0", - "normalize-url": "^3.3.0", - "parse-path": "^4.0.0", - "protocols": "^1.4.0" - }, - "dependencies": { - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", - "dev": true - } - } + "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" + } + } + } + }, + "jest-watcher": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-26.6.2.tgz", + "integrity": "sha512-WKJob0P/Em2csiVthsI68p6aGKTIcsfjH9Gsx1f0A3Italz43e3ho0geSAVsmj09RWOELP1AZ/DXyJgOgDKxXQ==", + "dev": true, + "requires": { + "@jest/test-result": "^26.6.2", + "@jest/types": "^26.6.2", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^26.6.2", + "string-length": "^4.0.1" + }, + "dependencies": { + "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" + } }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "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" + } }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, - "path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "requires": { - "isarray": "0.0.1" - } + "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 }, - "path-type": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", - "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", - "dev": true, - "requires": { - "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "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 }, - "pathval": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", - "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", - "dev": true + "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" + } + } + } + }, + "jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "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 }, + "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" + } + } + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "dev": true + }, + "jsdom": { + "version": "16.5.3", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.5.3.tgz", + "integrity": "sha512-Qj1H+PEvUsOtdPJ056ewXM4UJPCi4hhLA8wpiz9F2YvsRBhuFsXxtrIFAgGBDynQA9isAMGE91PfUYbdMPXuTA==", + "dev": true, + "requires": { + "abab": "^2.0.5", + "acorn": "^8.1.0", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "html-encoding-sniffer": "^2.0.1", + "is-potential-custom-element-name": "^1.0.0", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "request": "^2.88.2", + "request-promise-native": "^1.0.9", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.4", + "xml-name-validator": "^3.0.0" + } + }, + "jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "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", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "dev": true + }, + "json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "dev": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "just-extend": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.1.0.tgz", + "integrity": "sha512-ApcjaOdVTJ7y4r08xI5wIqpvwS48Q0PBG4DJROcEkH1f8MdAiNFyFxz3xoL0LWAVwjrwPYZdVHHxhRHcx/uGLA==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, + "levenary": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/levenary/-/levenary-1.1.1.tgz", + "integrity": "sha512-mkAdOIt79FD6irqjYSs4rdbnlT5vRonMEvBVPVb3XmevfS8kgRXwfes0dhPdEtzTWD/1eNE/Bm/G1iRt6DcnQQ==", + "dev": true, + "requires": { + "leven": "^3.1.0" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lolex": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", + "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==", + "dev": true + }, + "loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "requires": { + "js-tokens": "^3.0.0 || ^4.0.0" + } + }, + "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" + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.x" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "dependencies": { "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", - "dev": true - }, - "pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "pirates": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", - "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", - "dev": true, - "requires": { - "node-modules-regexp": "^1.0.0" - } - }, - "pkg-dir": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", - "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", - "dev": true, - "requires": { - "find-up": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - } - } - }, - "please-upgrade-node": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", - "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", - "dev": true, - "requires": { - "semver-compare": "^1.0.0" - } - }, - "private": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", - "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", - "dev": true - }, - "process-on-spawn": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", - "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", - "dev": true, - "requires": { - "fromentries": "^1.2.0" - } - }, - "prompts": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.1.0.tgz", - "integrity": "sha512-+x5TozgqYdOwWsQFZizE/Tra3fKvAoy037kOyU6cgz84n8f6zxngLOV4O32kTwt9FcLCxAqw0P/c8rOr9y+Gfg==", - "dev": true, - "requires": { - "kleur": "^3.0.2", - "sisteransi": "^1.0.0" - } - }, - "protocols": { - "version": "1.4.7", - "resolved": "https://registry.npmjs.org/protocols/-/protocols-1.4.7.tgz", - "integrity": "sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg==", - "dev": true - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "read-pkg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", - "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", - "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - } - } + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz", + "integrity": "sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg==", + "dev": true + } + } + }, + "mime-db": { + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", + "dev": true + }, + "mime-types": { + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", + "dev": true, + "requires": { + "mime-db": "1.47.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + } + } + }, + "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==" + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "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 + }, + "nise": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.3.tgz", + "integrity": "sha512-Ymbac/94xeIrMf59REBPOv0thr+CJVFMhrlAkW/gjCIE58BGQdCj0x7KRCb3yz+Ga2Rz3E9XXSvUyyxqqhjQAQ==", + "dev": true, + "requires": { + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/text-encoding": "^0.7.1", + "just-extend": "^4.0.2", + "lolex": "^5.0.1", + "path-to-regexp": "^1.7.0" + }, + "dependencies": { + "lolex": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-5.1.2.tgz", + "integrity": "sha512-h4hmjAvHTmd+25JSwrtTIuwbKdwg5NzZVRMLn9saij4SZaepCrTCxPr35H/3bjwfMJtN+t3CX8672UIkglz28A==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + } + } + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "dev": true + }, + "node-notifier": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-8.0.2.tgz", + "integrity": "sha512-oJP/9NAdd9+x2Q+rfphB2RJCHjod70RcRLjosiPMMu5gjIfwVnOUGq2nbTjTUbmy0DJ/tFIVT30+Qe3nzl4TJg==", + "dev": true, + "optional": true, + "requires": { + "growly": "^1.3.0", + "is-wsl": "^2.2.0", + "semver": "^7.3.2", + "shellwords": "^0.1.1", + "uuid": "^8.3.0", + "which": "^2.0.2" + }, + "dependencies": { + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "optional": true, + "requires": { + "lru-cache": "^6.0.0" + } }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } + "uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "optional": true }, - "regenerate": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", - "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", - "dev": true - }, - "regenerate-unicode-properties": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", - "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", - "dev": true, - "requires": { - "regenerate": "^1.4.0" - } + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "optional": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "node-releases": { + "version": "1.1.71", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", + "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "dev": true + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz", + "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "opencollective-postinstall": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz", + "integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==", + "dev": true + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "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" + } + }, + "p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "requires": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + } + }, + "parse-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/parse-path/-/parse-path-4.0.1.tgz", + "integrity": "sha512-d7yhga0Oc+PwNXDvQ0Jv1BuWkLVPXcAoQ/WREgd6vNNoKYaW52KI+RdOFjI63wjkmps9yUE8VS4veP+AgpQ/hA==", + "dev": true, + "requires": { + "is-ssh": "^1.3.0", + "protocols": "^1.4.0" + } + }, + "parse-url": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/parse-url/-/parse-url-5.0.1.tgz", + "integrity": "sha512-flNUPP27r3vJpROi0/R3/2efgKkyXqnXwyP1KQ2U0SfFRgdizOdWfvrrvJg1LuOoxs7GQhmxJlq23IpQ/BkByg==", + "dev": true, + "requires": { + "is-ssh": "^1.3.0", + "normalize-url": "^3.3.0", + "parse-path": "^4.0.0", + "protocols": "^1.4.0" + }, + "dependencies": { + "normalize-url": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", + "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==", + "dev": true + } + } + }, + "parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", + "dev": true, + "requires": { + "isarray": "0.0.1" + } + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "dev": true + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dev": true, + "requires": { + "node-modules-regexp": "^1.0.0" + } + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dev": true, + "requires": { + "semver-compare": "^1.0.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "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=", + "dev": true + }, + "pretty-format": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-26.6.2.tgz", + "integrity": "sha512-7AeGuCYNGmycyQbCqd/3PWH4eOoX/OiCa0uphp57NVTeAGdJGaAliecxwBDHYQCIvrW7aDBZCYeNTP/WX69mkg==", + "dev": true, + "requires": { + "@jest/types": "^26.6.2", + "ansi-regex": "^5.0.0", + "ansi-styles": "^4.0.0", + "react-is": "^17.0.1" + }, + "dependencies": { + "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" + } }, - "regenerator-runtime": { - "version": "0.13.5", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", - "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", - "dev": true - }, - "regenerator-transform": { - "version": "0.14.4", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", - "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.8.4", - "private": "^0.1.8" - } + "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" + } }, - "regexpu-core": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", - "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", - "dev": true, - "requires": { - "regenerate": "^1.4.0", - "regenerate-unicode-properties": "^8.2.0", - "regjsgen": "^0.5.1", - "regjsparser": "^0.6.4", - "unicode-match-property-ecmascript": "^1.0.4", - "unicode-match-property-value-ecmascript": "^1.2.0" - } + "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 + } + } + }, + "private": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", + "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==", + "dev": true + }, + "prompts": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.1.0.tgz", + "integrity": "sha512-+x5TozgqYdOwWsQFZizE/Tra3fKvAoy037kOyU6cgz84n8f6zxngLOV4O32kTwt9FcLCxAqw0P/c8rOr9y+Gfg==", + "dev": true, + "requires": { + "kleur": "^3.0.2", + "sisteransi": "^1.0.0" + } + }, + "protocols": { + "version": "1.4.7", + "resolved": "https://registry.npmjs.org/protocols/-/protocols-1.4.7.tgz", + "integrity": "sha512-Fx65lf9/YDn3hUX08XUc0J8rSux36rEsyiv21ZGUC1mOyeM3lTRpZLcrm8aAolzS4itwVfm7TAPyxC2E5zd6xg==", + "dev": true + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "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 + }, + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regenerate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", + "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==", + "dev": true + }, + "regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "dev": true, + "requires": { + "regenerate": "^1.4.0" + } + }, + "regenerator-runtime": { + "version": "0.13.5", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz", + "integrity": "sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA==", + "dev": true + }, + "regenerator-transform": { + "version": "0.14.4", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.4.tgz", + "integrity": "sha512-EaJaKPBI9GvKpvUz2mz4fhx7WPgvwRLY9v3hlNHWmAuJHI13T4nwKnNvm5RWJzEdnI5g5UwtOww+S8IdoUC2bw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.8.4", + "private": "^0.1.8" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpu-core": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.0.tgz", + "integrity": "sha512-TQ4KXRnIn6tz6tjnrXEkD/sshygKH/j5KzK86X8MkeHyZ8qst/LZ89j3X4/8HEIfHANTFIP/AbXakeRhWIl5YQ==", + "dev": true, + "requires": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + } + }, + "regjsgen": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", + "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", + "dev": true + }, + "regjsparser": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", + "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "dev": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, + "request-promise-core": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.4.tgz", + "integrity": "sha512-TTbAfBBRdWD7aNNOoVOBH4pN/KigV6LyapYNNlAPA8JwbovRti1E88m3sYAwsLi5ryhPKsE9APwnjFTgdUjTpw==", + "dev": true, + "requires": { + "lodash": "^4.17.19" + } + }, + "request-promise-native": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.9.tgz", + "integrity": "sha512-wcW+sIUiWnKgNY0dqCpOZkUbF/I+YPi+f09JZIDa39Ec+q82CpSYniDp+ISgTTbKmnpJWASeJBPZmoxH84wt3g==", + "dev": true, + "requires": { + "request-promise-core": "1.1.4", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + }, + "dependencies": { + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "dev": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + } + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "resolve": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + }, + "dependencies": { + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + } + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "rimraf": { + "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" + } + }, + "rollup": { + "version": "2.46.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.46.0.tgz", + "integrity": "sha512-qPGoUBNl+Z8uNu0z7pD3WPTABWRbcOwIrO/5ccDJzmrtzn0LVf6Lj91+L5CcWhXl6iWf23FQ6m8Jkl2CmN1O7Q==", + "dev": true, + "requires": { + "fsevents": "~2.3.1" + } + }, + "rollup-plugin-typescript2": { + "version": "0.29.0", + "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.29.0.tgz", + "integrity": "sha512-YytahBSZCIjn/elFugEGQR5qTsVhxhUwGZIsA9TmrSsC88qroGo65O5HZP/TTArH2dm0vUmYWhKchhwi2wL9bw==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "find-cache-dir": "^3.3.1", + "fs-extra": "8.1.0", + "resolve": "1.17.0", + "tslib": "2.0.1" + }, + "dependencies": { + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + } + }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true }, - "regjsgen": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.1.tgz", - "integrity": "sha512-5qxzGZjDs9w4tzT3TPhCJqWdCc3RLYwy9J2NB0nm5Lz+S273lvWcpjaTGHsT1dc6Hhfq41uSEOw8wBmxrKOuyg==", - "dev": true - }, - "regjsparser": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", - "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", - "dev": true, - "requires": { - "jsesc": "~0.5.0" - }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } - } + "find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + } + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } }, - "release-zalgo": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", - "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } + "make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "requires": { + "semver": "^6.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true }, - "require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } }, "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "rimraf": { - "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" - } - }, - "rollup": { - "version": "2.46.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.46.0.tgz", - "integrity": "sha512-qPGoUBNl+Z8uNu0z7pD3WPTABWRbcOwIrO/5ccDJzmrtzn0LVf6Lj91+L5CcWhXl6iWf23FQ6m8Jkl2CmN1O7Q==", - "dev": true, - "requires": { - "fsevents": "~2.3.1" - } - }, - "rollup-plugin-typescript2": { - "version": "0.29.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.29.0.tgz", - "integrity": "sha512-YytahBSZCIjn/elFugEGQR5qTsVhxhUwGZIsA9TmrSsC88qroGo65O5HZP/TTArH2dm0vUmYWhKchhwi2wL9bw==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "find-cache-dir": "^3.3.1", - "fs-extra": "8.1.0", - "resolve": "1.17.0", - "tslib": "2.0.1" - }, - "dependencies": { - "@rollup/pluginutils": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", - "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", - "dev": true, - "requires": { - "@types/estree": "0.0.39", - "estree-walker": "^1.0.1", - "picomatch": "^2.2.2" - } - }, - "@types/estree": { - "version": "0.0.39", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", - "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", - "dev": true - }, - "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - } - }, - "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - } - }, - "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "requires": { - "p-locate": "^4.1.0" - } - }, - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "requires": { - "p-limit": "^2.2.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "requires": { - "find-up": "^4.0.0" - } - }, - "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "tslib": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", - "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==", - "dev": true - } - } - }, - "run-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", - "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", - "dev": true - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "semver-compare": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", - "dev": true - }, - "set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true + "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=", - "dev": true, - "requires": { - "shebang-regex": "^1.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=", - "dev": true - }, - "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, - "shx": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.2.tgz", - "integrity": "sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==", - "dev": true, - "requires": { - "es6-object-assign": "^1.0.3", - "minimist": "^1.2.0", - "shelljs": "^0.8.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - } - } - }, - "signal-exit": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", - "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", - "dev": true - }, - "sinon": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz", - "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==", - "dev": true, - "requires": { - "@sinonjs/commons": "^1.4.0", - "@sinonjs/formatio": "^3.2.1", - "@sinonjs/samsam": "^3.3.3", - "diff": "^3.5.0", - "lolex": "^4.2.0", - "nise": "^1.5.2", - "supports-color": "^5.5.0" - } - }, - "sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true + "tslib": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.1.tgz", + "integrity": "sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ==", + "dev": true + } + } + }, + "rsvp": { + "version": "4.8.5", + "resolved": "https://registry.npmjs.org/rsvp/-/rsvp-4.8.5.tgz", + "integrity": "sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==", + "dev": true + }, + "run-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/run-node/-/run-node-1.0.0.tgz", + "integrity": "sha512-kc120TBlQ3mih1LSzdAJXo4xn/GWS2ec0l3S+syHDXP9uRr0JAT8Qd3mdMuyjqCzeZktgP3try92cEgf9Nks8A==", + "dev": true + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sane": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/sane/-/sane-4.1.0.tgz", + "integrity": "sha512-hhbzAgTIX8O7SHfp2c8/kREfEn4qO/9q8C9beyY6+tvZ87EpoZ3i1RIEvp27YBswnNbY9mWd6paKVmKbAgLfZA==", + "dev": true, + "requires": { + "@cnakazawa/watch": "^1.0.3", + "anymatch": "^2.0.0", + "capture-exit": "^2.0.0", + "exec-sh": "^0.3.2", + "execa": "^1.0.0", + "fb-watchman": "^2.0.0", + "micromatch": "^3.1.4", + "minimist": "^1.1.1", + "walker": "~1.0.5" + }, + "dependencies": { + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + } + } + }, + "saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "requires": { + "xmlchars": "^2.2.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", + "dev": true + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shelljs": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", + "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", + "dev": true, + "requires": { + "glob": "^7.0.0", + "interpret": "^1.0.0", + "rechoir": "^0.6.2" + } + }, + "shellwords": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", + "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==", + "dev": true, + "optional": true + }, + "shx": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/shx/-/shx-0.3.2.tgz", + "integrity": "sha512-aS0mWtW3T2sHAenrSrip2XGv39O9dXIFUqxAEWHEOS1ePtGIBavdPJY1kE2IHl14V/4iCbUiNDPGdyYTtmhSoA==", + "dev": true, + "requires": { + "es6-object-assign": "^1.0.3", + "minimist": "^1.2.0", + "shelljs": "^0.8.1" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "sinon": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.5.0.tgz", + "integrity": "sha512-AoD0oJWerp0/rY9czP/D6hDTTUYGpObhZjMpd7Cl/A6+j0xBE+ayL/ldfggkBXUs0IkvIiM1ljM8+WkOc5k78Q==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.4.0", + "@sinonjs/formatio": "^3.2.1", + "@sinonjs/samsam": "^3.3.3", + "diff": "^3.5.0", + "lolex": "^4.2.0", + "nise": "^1.5.2", + "supports-color": "^5.5.0" + } + }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "source-map-support": { - "version": "0.5.16", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.16.tgz", - "integrity": "sha512-efyLRJDr68D9hBBNIPWFjhpFzURh+KJykQwvMyW5UiZzYwoF6l4YMMDIJJEyFWxWCqfyxLzz6tSfUFR+kXXsVQ==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "source-map": "^0.6.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - } - } - }, - "spawn-wrap": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", - "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", - "dev": true, - "requires": { - "foreground-child": "^2.0.0", - "is-windows": "^1.0.2", - "make-dir": "^3.0.0", - "rimraf": "^3.0.0", - "signal-exit": "^3.0.2", - "which": "^2.0.1" - }, - "dependencies": { - "make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "requires": { - "semver": "^6.0.0" - } - }, - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - }, - "which": { - "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" - } - } - } - }, - "spdx-correct": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", - "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", - "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", - "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", - "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "string.prototype.trimend": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.0.tgz", - "integrity": "sha512-EEJnGqa/xNfIg05SxiPSqRS7S9qwDhYts1TSLR1BQfYUfPe1stofgGKvwERK9+9yf+PpfBMlpBaCHucXGPQfUA==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, - "string.prototype.trimleft": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.2.tgz", - "integrity": "sha512-gCA0tza1JBvqr3bfAIFJGqfdRTyPae82+KTnm3coDXkZN9wnuW3HjGgN386D7hfv5CHQYCI022/rJPVlqXyHSw==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimstart": "^1.0.0" - } - }, - "string.prototype.trimright": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.2.tgz", - "integrity": "sha512-ZNRQ7sY3KroTaYjRS6EbNiiHrOkjihL9aQE/8gfQ4DtAC/aEBRHFJa44OmoWxGGqXuJlfKkZW4WcXErGr+9ZFg==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", - "string.prototype.trimend": "^1.0.0" - } - }, - "string.prototype.trimstart": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.0.tgz", - "integrity": "sha512-iCP8g01NFYiiBOnwG1Xc3WZLyoo+RuBymwIlWncShXDDJYWN6DbnM3odslBJdgCdRlq94B5s63NWAZlcn2CS4w==", - "dev": true, - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.5" - } - }, + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", + "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", + "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "dev": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", + "dev": true + }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { "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" - }, - "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 - } - } - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true - }, - "strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "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" + } + }, + "supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "dependencies": { + "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 }, "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" - } - }, - "test-exclude": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", - "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", - "dev": true, - "requires": { - "glob": "^7.1.3", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^2.0.0" - } - }, - "to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true - }, - "toposort": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", - "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=", - "dev": true - }, - "tslib": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", - "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", - "dev": true - }, - "tslint": { - "version": "5.20.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", - "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^4.0.1", - "glob": "^7.1.1", - "js-yaml": "^3.13.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" - }, - "dependencies": { - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true - }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - } - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", - "dev": true - }, - "typedarray-to-buffer": { - "version": "3.1.5", - "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", - "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", - "dev": true, - "requires": { - "is-typedarray": "^1.0.0" - } - }, - "typescript": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", - "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", - "dev": true - }, - "unicode-canonical-property-names-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", - "dev": true - }, - "unicode-match-property-ecmascript": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", - "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", - "dev": true, - "requires": { - "unicode-canonical-property-names-ecmascript": "^1.0.4", - "unicode-property-aliases-ecmascript": "^1.0.4" - } - }, - "unicode-match-property-value-ecmascript": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", - "dev": true - }, - "unicode-property-aliases-ecmascript": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", - "dev": true - }, - "universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } + "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" + } + } + } + }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, + "throat": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-5.0.0.tgz", + "integrity": "sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==", + "dev": true + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "toposort": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", + "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=", + "dev": true + }, + "tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dev": true, + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + } + }, + "tr46": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.0.2.tgz", + "integrity": "sha512-3n1qG+/5kg+jrbTzwAykB5yRYtQCTqOGKq5U5PE3b0a1/mzo6snDhjGS0zJVJunO0NrT3Dg1MLy5TjWP/UJppg==", + "dev": true, + "requires": { + "punycode": "^2.1.1" + } + }, + "ts-jest": { + "version": "26.5.6", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-26.5.6.tgz", + "integrity": "sha512-rua+rCP8DxpA8b4DQD/6X2HQS8Zy/xzViVYfEs2OQu68tkCuKLV0Md8pmX55+W24uRIyAsf/BajRfxOs+R2MKA==", + "dev": true, + "requires": { + "bs-logger": "0.x", + "buffer-from": "1.x", + "fast-json-stable-stringify": "2.x", + "jest-util": "^26.1.0", + "json5": "2.x", + "lodash": "4.x", + "make-error": "1.x", + "mkdirp": "1.x", + "semver": "7.x", + "yargs-parser": "20.x" + }, + "dependencies": { + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "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": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } + "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": { + "lru-cache": "^6.0.0" + } }, - "wrap-ansi": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", - "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.0", - "string-width": "^3.0.0", - "strip-ansi": "^5.0.0" - }, - "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==", - "dev": true, - "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - } - } - } + "yargs-parser": { + "version": "20.2.7", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.7.tgz", + "integrity": "sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw==", + "dev": true + } + } + }, + "tslib": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==", + "dev": true + }, + "tslint": { + "version": "5.20.1", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", + "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.8.0", + "tsutils": "^2.29.0" + }, + "dependencies": { + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "requires": { + "is-typedarray": "^1.0.0" + } + }, + "typescript": { + "version": "3.8.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.8.3.tgz", + "integrity": "sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==", + "dev": true + }, + "unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "dev": true + }, + "unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "dev": true, + "requires": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + } + }, + "unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "dev": true + }, + "unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "write-file-atomic": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", - "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", - "dev": true, - "requires": { - "imurmurhash": "^0.1.4", - "is-typedarray": "^1.0.0", - "signal-exit": "^3.0.2", - "typedarray-to-buffer": "^3.1.5" - } + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + } + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "dev": true + }, + "v8-to-istanbul": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz", + "integrity": "sha512-TxNb7YEUwkLXCQYeudi6lgQ/SZrzNO4kMdlqVxaZPUIUjCv6iSSypUQX70kNBSERpQ8fk48+d61FXk+tgqcWow==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "dev": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dev": true, + "requires": { + "browser-process-hrtime": "^1.0.0" + } + }, + "w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dev": true, + "requires": { + "xml-name-validator": "^3.0.0" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.x" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true + }, + "whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "requires": { + "iconv-lite": "0.4.24" + } + }, + "whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true + }, + "whatwg-url": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.5.0.tgz", + "integrity": "sha512-fy+R77xWv0AiqfLl4nuGUlQ3/6b5uNfQ4WAbGQVMYshCTCCPK9psC1nWh3XHuxGVCtlcDDQPQW1csmmIQo+fwg==", + "dev": true, + "requires": { + "lodash": "^4.7.0", + "tr46": "^2.0.2", + "webidl-conversions": "^6.1.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "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" + } }, - "y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "yaml": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", - "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", - "dev": true - }, - "yargs": { - "version": "13.3.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", - "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", - "dev": true, - "requires": { - "cliui": "^5.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.1.2" - }, - "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 - }, - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "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 - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true - }, - "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" - } - } - } + "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 + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "ws": { + "version": "7.4.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.5.tgz", + "integrity": "sha512-xzyu3hFvomRfXKH8vOFMU3OguG6oOvhXMo3xsGy3xWExqaM2dxBbVxuD99O7m3ZUFMvvscsZDqxfgMaRr/Nr1g==", + "dev": true + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yaml": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", + "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", + "dev": true + }, + "yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "requires": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "dependencies": { "yargs-parser": { - "version": "13.1.2", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", - "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "yargs-unparser": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.0.tgz", - "integrity": "sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==", - "dev": true, - "requires": { - "flat": "^4.1.0", - "lodash": "^4.17.15", - "yargs": "^13.3.0" - } + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } + } } diff --git a/lib/msal-common/package.json b/lib/msal-common/package.json index c2852be1f1..e53aecc013 100644 --- a/lib/msal-common/package.json +++ b/lib/msal-common/package.json @@ -39,8 +39,8 @@ "clean:coverage": "rimraf ../../.nyc_output/*", "lint": "cd ../../ && npm run lint:common", "lint:fix": "npm run lint -- -- --fix", - "test": "mocha", - "test:coverage": "nyc mocha", + "test": "jest", + "test:coverage": "jest --coverage", "test:coverage:only": "npm run clean:coverage && npm run test:coverage", "build:modules": "rollup -c", "build:modules:watch": "rollup -cw", @@ -52,28 +52,20 @@ "@babel/core": "^7.7.2", "@babel/plugin-proposal-class-properties": "^7.7.0", "@babel/plugin-proposal-object-rest-spread": "^7.6.2", - "@babel/polyfill": "^7.7.0", "@babel/preset-env": "^7.7.1", "@babel/preset-typescript": "^7.7.2", - "@babel/register": "^7.7.0", - "@istanbuljs/nyc-config-babel": "^2.1.1", - "@types/chai": "^4.2.5", - "@types/chai-as-promised": "^7.1.2", "@types/debug": "^4.1.5", - "@types/mocha": "^5.2.7", + "@types/jest": "^26.0.23", "@types/sinon": "^7.5.0", - "babel-plugin-istanbul": "^5.2.0", "beachball": "^1.32.2", - "chai": "^4.2.0", - "chai-as-promised": "^7.1.1", "husky": "^3.0.9", - "mocha": "^6.2.2", - "nyc": "^15.0.0", + "jest": "^26.6.3", "rimraf": "^3.0.2", "rollup": "^2.46.0", "rollup-plugin-typescript2": "^0.29.0", "shx": "^0.3.2", "sinon": "^7.5.0", + "ts-jest": "^26.5.6", "tslib": "^1.10.0", "tslint": "^5.20.0", "typescript": "^3.7.5" diff --git a/lib/msal-common/src/client/DeviceCodeClient.ts b/lib/msal-common/src/client/DeviceCodeClient.ts index e6da83236d..9871cb6e59 100644 --- a/lib/msal-common/src/client/DeviceCodeClient.ts +++ b/lib/msal-common/src/client/DeviceCodeClient.ts @@ -130,6 +130,32 @@ export class DeviceCodeClient extends BaseClient { return parameterBuilder.createQueryString(); } + /** + * Breaks the polling with specific conditions. + * @param request CommonDeviceCodeRequest + * @param deviceCodeResponse DeviceCodeResponse + */ + private continuePolling( + deviceCodeExpirationTime: number, + userSpecifiedTimeout?: number, + userSpecifiedCancelFlag?: boolean, + ): boolean { + if (userSpecifiedCancelFlag) { + this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true"); + throw ClientAuthError.createDeviceCodeCancelledError(); + } else if (userSpecifiedTimeout && userSpecifiedTimeout < deviceCodeExpirationTime && TimeUtils.nowSeconds() > userSpecifiedTimeout) { + this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${userSpecifiedTimeout}`); + throw ClientAuthError.createUserTimeoutReachedError(); + } else if (TimeUtils.nowSeconds() > deviceCodeExpirationTime) { + if (userSpecifiedTimeout) { + this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${userSpecifiedTimeout}`); + } + this.logger.error(`Device code expired. Expiration time of device code was ${deviceCodeExpirationTime}`); + throw ClientAuthError.createDeviceCodeExpiredError(); + } + return true; + } + /** * Creates token request with device code response and polls token endpoint at interval set by the device code * response @@ -151,58 +177,35 @@ export class DeviceCodeClient extends BaseClient { * Poll token endpoint while (device code is not expired AND operation has not been cancelled by * setting CancellationToken.cancel = true). POST request is sent at interval set by pollingIntervalMilli */ - return new Promise((resolve, reject) => { - - const intervalId: ReturnType = setInterval(async () => { - try { - if (request.cancel) { - - this.logger.error("Token request cancelled by setting DeviceCodeRequest.cancel = true"); - clearInterval(intervalId); - reject(ClientAuthError.createDeviceCodeCancelledError()); - - } else if (userSpecifiedTimeout && userSpecifiedTimeout < deviceCodeExpirationTime && TimeUtils.nowSeconds() > userSpecifiedTimeout) { - - this.logger.error(`User defined timeout for device code polling reached. The timeout was set for ${userSpecifiedTimeout}`); - clearInterval(intervalId); - reject(ClientAuthError.createUserTimeoutReachedError()); - - } else if (TimeUtils.nowSeconds() > deviceCodeExpirationTime) { - - if (userSpecifiedTimeout) { - this.logger.verbose(`User specified timeout ignored as the device code has expired before the timeout elapsed. The user specified timeout was set for ${userSpecifiedTimeout}`); - } - - this.logger.error(`Device code expired. Expiration time of device code was ${deviceCodeExpirationTime}`); - clearInterval(intervalId); - reject(ClientAuthError.createDeviceCodeExpiredError()); - - } else { - const thumbprint: RequestThumbprint = { - clientId: this.config.authOptions.clientId, - authority: request.authority, - scopes: request.scopes - }; - const response = await this.executePostToTokenEndpoint( - this.authority.tokenEndpoint, - requestBody, - headers, - thumbprint); - - if (response.body && response.body.error === Constants.AUTHORIZATION_PENDING) { - // user authorization is pending. Sleep for polling interval and try again - this.logger.info(response.body.error_description || "no_error_description"); - } else { - clearInterval(intervalId); - resolve(response.body); - } - } - } catch (error) { - clearInterval(intervalId); - reject(error); - } - }, pollingIntervalMilli); - }); + while (this.continuePolling(deviceCodeExpirationTime, userSpecifiedTimeout, request.cancel)) { + const thumbprint: RequestThumbprint = { + clientId: this.config.authOptions.clientId, + authority: request.authority, + scopes: request.scopes + }; + const response = await this.executePostToTokenEndpoint( + this.authority.tokenEndpoint, + requestBody, + headers, + thumbprint); + + if (response.body && response.body.error === Constants.AUTHORIZATION_PENDING) { + // user authorization is pending. Sleep for polling interval and try again + this.logger.info(response.body.error_description || "Authorization pending. Continue polling."); + + await TimeUtils.delay(pollingIntervalMilli); + } else { + this.logger.verbose("Authorization completed successfully. Polling stopped."); + return response.body; + } + } + + /* + * The above code should've thrown by this point, but to satisfy TypeScript, + * and in the rare case the conditionals in continuePolling() may not catch everything... + */ + this.logger.error("Polling stopped for unknown reasons."); + throw ClientAuthError.createDeviceCodeUnknownError(); } /** diff --git a/lib/msal-common/src/error/ClientAuthError.ts b/lib/msal-common/src/error/ClientAuthError.ts index 9173f163ad..1a8331070b 100644 --- a/lib/msal-common/src/error/ClientAuthError.ts +++ b/lib/msal-common/src/error/ClientAuthError.ts @@ -4,7 +4,6 @@ */ import { AuthError } from "./AuthError"; -import { ScopeSet } from "../request/ScopeSet"; /** * ClientAuthErrorMessage class containing string constants used by error codes and messages. @@ -111,6 +110,10 @@ export const ClientAuthErrorMessage = { code: "device_code_expired", desc: "Device code is expired." }, + DeviceCodeUnknownError: { + code: "device_code_unknown_error", + desc: "Device code stopped polling for unknown reasons." + }, NoAccountInSilentRequest: { code: "no_account_in_silent_request", desc: "Please pass an account object, silent flow is not supported without account information" @@ -371,8 +374,8 @@ export class ClientAuthError extends AuthError { * Throws error if ScopeSet is null or undefined. * @param givenScopeSet */ - static createEmptyInputScopeSetError(givenScopeSet: ScopeSet): ClientAuthError { - return new ClientAuthError(ClientAuthErrorMessage.emptyInputScopeSetError.code, `${ClientAuthErrorMessage.emptyInputScopeSetError.desc} Given ScopeSet: ${givenScopeSet}`); + static createEmptyInputScopeSetError(): ClientAuthError { + return new ClientAuthError(ClientAuthErrorMessage.emptyInputScopeSetError.code, `${ClientAuthErrorMessage.emptyInputScopeSetError.desc}`); } /** @@ -389,6 +392,13 @@ export class ClientAuthError extends AuthError { return new ClientAuthError(ClientAuthErrorMessage.DeviceCodeExpired.code, `${ClientAuthErrorMessage.DeviceCodeExpired.desc}`); } + /** + * Throws error if device code is expired + */ + static createDeviceCodeUnknownError(): ClientAuthError { + return new ClientAuthError(ClientAuthErrorMessage.DeviceCodeUnknownError.code, `${ClientAuthErrorMessage.DeviceCodeUnknownError.desc}`); + } + /** * Throws error when silent requests are made without an account object */ diff --git a/lib/msal-common/src/error/ClientConfigurationError.ts b/lib/msal-common/src/error/ClientConfigurationError.ts index 3a65704b07..d5cd578a99 100644 --- a/lib/msal-common/src/error/ClientConfigurationError.ts +++ b/lib/msal-common/src/error/ClientConfigurationError.ts @@ -145,22 +145,13 @@ export class ClientConfigurationError extends ClientAuthError { ClientConfigurationErrorMessage.urlEmptyError.desc); } - /** - * Error thrown when scopes are not an array - * @param inputScopes - */ - static createScopesNonArrayError(inputScopes: Array): ClientConfigurationError { - return new ClientConfigurationError(ClientConfigurationErrorMessage.nonArrayScopesError.code, - `${ClientConfigurationErrorMessage.nonArrayScopesError.desc} Given Scopes: ${inputScopes}`); - } - /** * Error thrown when scopes are empty. * @param scopesValue */ - static createEmptyScopesArrayError(inputScopes: Array): ClientConfigurationError { + static createEmptyScopesArrayError(): ClientConfigurationError { return new ClientConfigurationError(ClientConfigurationErrorMessage.emptyScopesError.code, - `${ClientConfigurationErrorMessage.emptyScopesError.desc} Given Scopes: ${inputScopes}`); + `${ClientConfigurationErrorMessage.emptyScopesError.desc}`); } /** diff --git a/lib/msal-common/src/request/ScopeSet.ts b/lib/msal-common/src/request/ScopeSet.ts index 51ba8f99e2..b21d25cf5c 100644 --- a/lib/msal-common/src/request/ScopeSet.ts +++ b/lib/msal-common/src/request/ScopeSet.ts @@ -49,7 +49,7 @@ export class ScopeSet { private validateInputScopes(inputScopes: Array): void { // Check if scopes are required but not given or is an empty array if (!inputScopes || inputScopes.length < 1) { - throw ClientConfigurationError.createEmptyScopesArrayError(inputScopes); + throw ClientConfigurationError.createEmptyScopesArrayError(); } } @@ -139,7 +139,7 @@ export class ScopeSet { */ unionScopeSets(otherScopes: ScopeSet): Set { if (!otherScopes) { - throw ClientAuthError.createEmptyInputScopeSetError(otherScopes); + throw ClientAuthError.createEmptyInputScopeSetError(); } const unionScopes = new Set(); // Iterator in constructor not supported in IE11 otherScopes.scopes.forEach(scope => unionScopes.add(scope.toLowerCase())); @@ -153,7 +153,7 @@ export class ScopeSet { */ intersectingScopeSets(otherScopes: ScopeSet): boolean { if (!otherScopes) { - throw ClientAuthError.createEmptyInputScopeSetError(otherScopes); + throw ClientAuthError.createEmptyInputScopeSetError(); } // Do not allow OIDC scopes to be the only intersecting scopes diff --git a/lib/msal-common/src/utils/TimeUtils.ts b/lib/msal-common/src/utils/TimeUtils.ts index 847accd523..e57df312d8 100644 --- a/lib/msal-common/src/utils/TimeUtils.ts +++ b/lib/msal-common/src/utils/TimeUtils.ts @@ -28,4 +28,13 @@ export class TimeUtils { // If current time + offset is greater than token expiration time, then token is expired. return (offsetCurrentTimeSec > expirationSec); } + + /** + * Waits for t number of milliseconds + * @param t number + * @param value T + */ + static delay(t: number, value?: T): Promise { + return new Promise((resolve) => setTimeout(() => resolve(value), t)); + } } diff --git a/lib/msal-common/test/account/AuthToken.spec.ts b/lib/msal-common/test/account/AuthToken.spec.ts index 132d93b694..a6c163d8d8 100644 --- a/lib/msal-common/test/account/AuthToken.spec.ts +++ b/lib/msal-common/test/account/AuthToken.spec.ts @@ -1,8 +1,6 @@ -import { expect } from "chai"; import { AuthToken } from "../../src/account/AuthToken"; import { TEST_CONFIG, TEST_DATA_CLIENT_INFO, RANDOM_TEST_GUID, TEST_TOKENS, TEST_URIS, TEST_POP_VALUES } from "../test_kit/StringConstants"; import { PkceCodes, ICrypto } from "../../src/crypto/ICrypto"; -import sinon from "sinon"; import { ClientAuthErrorMessage, ClientAuthError, StringUtils } from "../../src"; import { DecodedAuthToken } from "../../src/account/DecodedAuthToken"; @@ -24,90 +22,91 @@ const testTokenPayload = "eyJ2ZXIiOiIyLjAiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc2 describe("AuthToken.ts Class Unit Tests", () => { let cryptoInterface: ICrypto; - beforeEach(() => { - cryptoInterface = { - createNewGuid(): string { - return RANDOM_TEST_GUID; - }, - base64Decode(input: string): string { - switch (input) { - case TEST_POP_VALUES.ENCODED_REQ_CNF: - return TEST_POP_VALUES.DECODED_REQ_CNF; - case TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO: - return TEST_DATA_CLIENT_INFO.TEST_DECODED_CLIENT_INFO; - case testTokenPayload: - return JSON.stringify(idTokenClaims); - default: - return input; - } - }, - base64Encode(input: string): string { - switch (input) { - case "123-test-uid": - return "MTIzLXRlc3QtdWlk"; - case "456-test-uid": - return "NDU2LXRlc3QtdWlk"; - case TEST_POP_VALUES.DECODED_REQ_CNF: - return TEST_POP_VALUES.ENCODED_REQ_CNF; - default: - return input; - } - }, - async generatePkceCodes(): Promise { - return { - challenge: TEST_CONFIG.TEST_CHALLENGE, - verifier: TEST_CONFIG.TEST_VERIFIER - } - }, - async getPublicKeyThumbprint(): Promise { - return TEST_POP_VALUES.KID; - }, - async signJwt(): Promise { - return ""; + beforeEach(() => { + cryptoInterface = { + createNewGuid(): string { + return RANDOM_TEST_GUID; + }, + base64Decode(input: string): string { + switch (input) { + case TEST_POP_VALUES.ENCODED_REQ_CNF: + return TEST_POP_VALUES.DECODED_REQ_CNF; + case TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO: + return TEST_DATA_CLIENT_INFO.TEST_DECODED_CLIENT_INFO; + case testTokenPayload: + return JSON.stringify(idTokenClaims); + default: + return input; } - }; - }); + }, + base64Encode(input: string): string { + switch (input) { + case "123-test-uid": + return "MTIzLXRlc3QtdWlk"; + case "456-test-uid": + return "NDU2LXRlc3QtdWlk"; + case TEST_POP_VALUES.DECODED_REQ_CNF: + return TEST_POP_VALUES.ENCODED_REQ_CNF; + default: + return input; + } + }, + async generatePkceCodes(): Promise { + return { + challenge: TEST_CONFIG.TEST_CHALLENGE, + verifier: TEST_CONFIG.TEST_VERIFIER + } + }, + async getPublicKeyThumbprint(): Promise { + return TEST_POP_VALUES.KID; + }, + async signJwt(): Promise { + return ""; + } + }; + }); - afterEach(() => { - sinon.restore(); - }); + afterEach(() => { + jest.restoreAllMocks(); + }); describe("Constructor", () => { it("Throws error if rawIdToken is null or empty", () => { - expect(() => new AuthToken("", cryptoInterface)).to.throw(ClientAuthErrorMessage.nullOrEmptyToken.desc); - expect(() => new AuthToken("", cryptoInterface)).to.throw(ClientAuthError); + expect(() => new AuthToken("", cryptoInterface)).toThrowError(ClientAuthErrorMessage.nullOrEmptyToken.desc); + expect(() => new AuthToken("", cryptoInterface)).toThrowError(ClientAuthError); + // @ts-ignore - expect(() => new AuthToken(null, cryptoInterface)).to.throw(ClientAuthErrorMessage.nullOrEmptyToken.desc); + expect(() => new AuthToken(null, cryptoInterface)).toThrowError(ClientAuthErrorMessage.nullOrEmptyToken.desc); // @ts-ignore - expect(() => new AuthToken(null, cryptoInterface)).to.throw(ClientAuthError); + expect(() => new AuthToken(null, cryptoInterface)).toThrowError(ClientAuthError); }); it("Successfully sets the rawidToken and claims fields", () => { - sinon.stub(AuthToken, "extractTokenClaims").returns(idTokenClaims); + //jest.spyOn(AuthToken, "extractTokenClaims").mockReturnValue(idTokenClaims); const idToken = new AuthToken(TEST_TOKENS.IDTOKEN_V2, cryptoInterface); - expect(idToken.rawToken).to.be.eq(TEST_TOKENS.IDTOKEN_V2); - expect(idToken.claims).to.be.deep.eq(idTokenClaims); + expect(idToken.rawToken).toBe(TEST_TOKENS.IDTOKEN_V2); + expect(idToken.claims).toEqual(idTokenClaims); }); }); describe("extractIdToken()", () => { it("Throws error if idToken is null or empty", () => { - expect(() => AuthToken.extractTokenClaims("", cryptoInterface)).to.throw(ClientAuthErrorMessage.nullOrEmptyToken.desc); - expect(() => AuthToken.extractTokenClaims("", cryptoInterface)).to.throw(ClientAuthError); + expect(() => AuthToken.extractTokenClaims("", cryptoInterface)).toThrowError(ClientAuthErrorMessage.nullOrEmptyToken.desc); + expect(() => AuthToken.extractTokenClaims("", cryptoInterface)).toThrowError(ClientAuthError); // @ts-ignore - expect(() => AuthToken.extractTokenClaims(null, cryptoInterface)).to.throw(ClientAuthErrorMessage.nullOrEmptyToken.desc); + expect(() => AuthToken.extractTokenClaims(null, cryptoInterface)).toThrowError(ClientAuthErrorMessage.nullOrEmptyToken.desc); // @ts-ignore - expect(() => AuthToken.extractTokenClaims(null, cryptoInterface)).to.throw(ClientAuthError); + expect(() => AuthToken.extractTokenClaims(null, cryptoInterface)).toThrowError(ClientAuthError); }); it("throws if decodeJwt returns null", () => { // @ts-ignore - sinon.stub(StringUtils, "decodeAuthToken").returns(null); - expect(() => AuthToken.extractTokenClaims(TEST_TOKENS.IDTOKEN_V2, cryptoInterface)).to.throw(ClientAuthErrorMessage.tokenParsingError.desc); + jest.spyOn(StringUtils, "decodeAuthToken").mockReturnValue(null); + expect(() => AuthToken.extractTokenClaims(TEST_TOKENS.IDTOKEN_V2, cryptoInterface)).toThrowError(ClientAuthErrorMessage.tokenParsingError.desc); }); it("Throws error if payload cannot be parsed", () => { @@ -116,10 +115,10 @@ describe("AuthToken.ts Class Unit Tests", () => { JWSPayload: "jws payload", JWSSig: "signature" }; - sinon.stub(StringUtils, "decodeAuthToken").returns(decodedJwt); + jest.spyOn(StringUtils, "decodeAuthToken").mockReturnValue(decodedJwt); - expect(() => AuthToken.extractTokenClaims(TEST_TOKENS.IDTOKEN_V2, cryptoInterface)).to.throw(ClientAuthErrorMessage.tokenParsingError.desc); - expect(() => AuthToken.extractTokenClaims(TEST_TOKENS.IDTOKEN_V2, cryptoInterface)).to.throw(ClientAuthError); + expect(() => AuthToken.extractTokenClaims(TEST_TOKENS.IDTOKEN_V2, cryptoInterface)).toThrowError(ClientAuthErrorMessage.tokenParsingError.desc); + expect(() => AuthToken.extractTokenClaims(TEST_TOKENS.IDTOKEN_V2, cryptoInterface)).toThrowError(ClientAuthError); }); it("Successfully extracts the idTokenClaims from the decodedJwt", () => { @@ -132,8 +131,8 @@ describe("AuthToken.ts Class Unit Tests", () => { JWSPayload: testTokenPayload, JWSSig: "signature" }; - sinon.stub(StringUtils, "decodeAuthToken").returns(decodedJwt); - expect(AuthToken.extractTokenClaims(decodedJwt.JWSPayload, cryptoInterface)).to.be.deep.eq(idTokenClaims); + jest.spyOn(StringUtils, "decodeAuthToken").mockReturnValue(decodedJwt); + expect(AuthToken.extractTokenClaims(decodedJwt.JWSPayload, cryptoInterface)).toEqual(idTokenClaims); }); }); }); diff --git a/lib/msal-common/test/account/ClientInfo.spec.ts b/lib/msal-common/test/account/ClientInfo.spec.ts index bacc33ad43..30e214f609 100644 --- a/lib/msal-common/test/account/ClientInfo.spec.ts +++ b/lib/msal-common/test/account/ClientInfo.spec.ts @@ -1,8 +1,6 @@ -import { expect } from "chai"; import { buildClientInfo } from "../../src/account/ClientInfo"; import { TEST_CONFIG, TEST_DATA_CLIENT_INFO, RANDOM_TEST_GUID, TEST_POP_VALUES } from "../test_kit/StringConstants"; import { PkceCodes, ICrypto } from "../../src/crypto/ICrypto"; -import sinon from "sinon"; import { ClientAuthError, ClientAuthErrorMessage } from "../../src"; describe("ClientInfo.ts Class Unit Tests", () => { @@ -52,29 +50,29 @@ describe("ClientInfo.ts Class Unit Tests", () => { }); afterEach(() => { - sinon.restore(); + jest.restoreAllMocks(); }); it("Throws error if clientInfo is null or empty", () => { // @ts-ignore - expect(() => buildClientInfo(null, cryptoInterface)).to.throw(ClientAuthErrorMessage.clientInfoEmptyError.desc); + expect(() => buildClientInfo(null, cryptoInterface)).toThrowError(ClientAuthErrorMessage.clientInfoEmptyError.desc); // @ts-ignore - expect(() => buildClientInfo(null, cryptoInterface)).to.throw(ClientAuthError); + expect(() => buildClientInfo(null, cryptoInterface)).toThrowError(ClientAuthError); - expect(() => buildClientInfo("", cryptoInterface)).to.throw(ClientAuthErrorMessage.clientInfoEmptyError.desc); - expect(() => buildClientInfo("", cryptoInterface)).to.throw(ClientAuthError); + expect(() => buildClientInfo("", cryptoInterface)).toThrowError(ClientAuthErrorMessage.clientInfoEmptyError.desc); + expect(() => buildClientInfo("", cryptoInterface)).toThrowError(ClientAuthError); }); it("Throws error if function could not successfully decode ", () => { - expect(() => buildClientInfo("ThisCan'tbeParsed", cryptoInterface)).to.throw(ClientAuthErrorMessage.clientInfoDecodingError.desc); - expect(() => buildClientInfo("ThisCan'tbeParsed", cryptoInterface)).to.throw(ClientAuthError); + expect(() => buildClientInfo("ThisCan'tbeParsed", cryptoInterface)).toThrowError(ClientAuthErrorMessage.clientInfoDecodingError.desc); + expect(() => buildClientInfo("ThisCan'tbeParsed", cryptoInterface)).toThrowError(ClientAuthError); }); it("Succesfully returns decoded client info", () => { const clientInfo = buildClientInfo(TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO, cryptoInterface); - expect(clientInfo.uid).to.be.eq(TEST_DATA_CLIENT_INFO.TEST_UID); - expect(clientInfo.utid).to.be.eq(TEST_DATA_CLIENT_INFO.TEST_UTID); + expect(clientInfo.uid).toBe(TEST_DATA_CLIENT_INFO.TEST_UID); + expect(clientInfo.utid).toBe(TEST_DATA_CLIENT_INFO.TEST_UTID); }); }); }); diff --git a/lib/msal-common/test/authority/Authority.spec.ts b/lib/msal-common/test/authority/Authority.spec.ts index f50c2e4b02..b78840b561 100644 --- a/lib/msal-common/test/authority/Authority.spec.ts +++ b/lib/msal-common/test/authority/Authority.spec.ts @@ -1,5 +1,3 @@ -import { expect } from "chai"; -import sinon from "sinon"; import { Authority } from "../../src/authority/Authority"; import { INetworkModule, NetworkRequestOptions } from "../../src/network/INetworkModule"; import { Constants } from "../../src/utils/Constants"; @@ -29,7 +27,7 @@ describe("Authority.ts Class Unit Tests", () => { mockStorage = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); }); afterEach(() => { - sinon.restore(); + jest.restoreAllMocks(); }); describe("Constructor", () => { @@ -46,7 +44,7 @@ describe("Authority.ts Class Unit Tests", () => { } }; const authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); - expect(authority.canonicalAuthority).to.be.eq(`${Constants.DEFAULT_AUTHORITY}`); + expect(authority.canonicalAuthority).toBe(`${Constants.DEFAULT_AUTHORITY}`); }); it("Throws error if URI is not in valid format", () => { @@ -61,9 +59,9 @@ describe("Authority.ts Class Unit Tests", () => { } }; - expect(() => new Authority("http://login.microsoftonline.com/common", networkInterface, mockStorage, authorityOptions)).to.throw(ClientConfigurationErrorMessage.authorityUriInsecure.desc); - expect(() => new Authority("This is not a URI", networkInterface, mockStorage, authorityOptions)).to.throw(ClientConfigurationErrorMessage.urlParseError.desc); - expect(() => new Authority("", networkInterface, mockStorage, authorityOptions)).to.throw(ClientConfigurationErrorMessage.urlEmptyError.desc); + expect(() => new Authority("http://login.microsoftonline.com/common", networkInterface, mockStorage, authorityOptions)).toThrowError(ClientConfigurationErrorMessage.authorityUriInsecure.desc); + expect(() => new Authority("This is not a URI", networkInterface, mockStorage, authorityOptions)).toThrowError(ClientConfigurationErrorMessage.urlParseError.desc); + expect(() => new Authority("", networkInterface, mockStorage, authorityOptions)).toThrowError(ClientConfigurationErrorMessage.urlEmptyError.desc); }); }); @@ -84,88 +82,100 @@ describe("Authority.ts Class Unit Tests", () => { }); it("Gets canonical authority that ends in '/'", () => { - expect(authority.canonicalAuthority.endsWith("/")).to.be.true; - expect(authority.canonicalAuthority).to.be.eq(`${Constants.DEFAULT_AUTHORITY}`); + expect(authority.canonicalAuthority.endsWith("/")).toBe(true); + expect(authority.canonicalAuthority).toBe(`${Constants.DEFAULT_AUTHORITY}`); }); it("Set canonical authority performs validation and canonicalization on url", () => { - expect(() => authority.canonicalAuthority = "http://login.microsoftonline.com/common").to.throw(ClientConfigurationErrorMessage.authorityUriInsecure.desc); - expect(() => authority.canonicalAuthority = "https://login.microsoftonline.com/").to.not.throw(); - expect(() => authority.canonicalAuthority = "This is not a URI").to.throw(ClientConfigurationErrorMessage.urlParseError.desc); + expect(() => authority.canonicalAuthority = "http://login.microsoftonline.com/common").toThrowError(ClientConfigurationErrorMessage.authorityUriInsecure.desc); + expect(() => authority.canonicalAuthority = "https://login.microsoftonline.com/").not.toThrowError(); + expect(() => authority.canonicalAuthority = "This is not a URI").toThrowError(ClientConfigurationErrorMessage.urlParseError.desc); authority.canonicalAuthority = `${TEST_URIS.ALTERNATE_INSTANCE}/${RANDOM_TEST_GUID}`; - expect(authority.canonicalAuthority.endsWith("/")).to.be.true; - expect(authority.canonicalAuthority).to.be.eq(`${TEST_URIS.ALTERNATE_INSTANCE}/${RANDOM_TEST_GUID}/`); + expect(authority.canonicalAuthority.endsWith("/")).toBe(true); + expect(authority.canonicalAuthority).toBe(`${TEST_URIS.ALTERNATE_INSTANCE}/${RANDOM_TEST_GUID}/`); }); it("Get canonicalAuthorityUrlComponents returns current url components", () => { - expect(authority.canonicalAuthorityUrlComponents.Protocol).to.be.eq("https:"); - expect(authority.canonicalAuthorityUrlComponents.HostNameAndPort).to.be.eq("login.microsoftonline.com"); - expect(authority.canonicalAuthorityUrlComponents.PathSegments).to.be.deep.eq(["common"]); - expect(authority.canonicalAuthorityUrlComponents.AbsolutePath).to.be.eq("/common/"); - expect(authority.canonicalAuthorityUrlComponents.Hash).to.be.undefined; - expect(authority.canonicalAuthorityUrlComponents.Search).to.be.undefined; + expect(authority.canonicalAuthorityUrlComponents.Protocol).toBe("https:"); + expect(authority.canonicalAuthorityUrlComponents.HostNameAndPort).toBe("login.microsoftonline.com"); + expect(authority.canonicalAuthorityUrlComponents.PathSegments).toEqual(["common"]); + expect(authority.canonicalAuthorityUrlComponents.AbsolutePath).toBe("/common/"); + expect(authority.canonicalAuthorityUrlComponents.Hash).toBeUndefined(); + expect(authority.canonicalAuthorityUrlComponents.Search).toBeUndefined(); }); it("tenant is equal to first path segment value", () => { - expect(authority.tenant).to.be.eq("common"); - expect(authority.tenant).to.be.eq(authority.canonicalAuthorityUrlComponents.PathSegments[0]); + expect(authority.tenant).toBe("common"); + expect(authority.tenant).toBe(authority.canonicalAuthorityUrlComponents.PathSegments[0]); }); it("Gets options that were passed into constructor", () => { - expect(authority.options).to.be.eq(authorityOptions); + expect(authority.options).toBe(authorityOptions); }); describe("OAuth Endpoints", () => { beforeEach(async () => { - sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); + jest.spyOn(Authority.prototype, "getEndpointMetadataFromNetwork").mockResolvedValue(DEFAULT_OPENID_CONFIG_RESPONSE.body); await authority.resolveEndpointsAsync(); }); it("Returns authorization_endpoint of tenantDiscoveryResponse", () => { - expect(authority.authorizationEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common")); + expect(authority.authorizationEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common") + ); }); it("Returns token_endpoint of tenantDiscoveryResponse", () => { - expect(authority.tokenEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common")); + expect(authority.tokenEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common") + ); }); it("Returns end_session_endpoint of tenantDiscoveryResponse", () => { - expect(authority.endSessionEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")); + expect(authority.endSessionEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common") + ); }); it("Returns issuer of tenantDiscoveryResponse for selfSignedJwtAudience", () => { - expect(authority.selfSignedJwtAudience).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); + expect(authority.selfSignedJwtAudience).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); }); it("Throws error if endpoint discovery is incomplete for authorizationEndpoint, tokenEndpoint, endSessionEndpoint and selfSignedJwtAudience", () => { authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); - expect(() => authority.authorizationEndpoint).to.throw(ClientAuthErrorMessage.endpointResolutionError.desc); - expect(() => authority.tokenEndpoint).to.throw(ClientAuthErrorMessage.endpointResolutionError.desc); - expect(() => authority.endSessionEndpoint).to.throw(ClientAuthErrorMessage.endpointResolutionError.desc); - expect(() => authority.deviceCodeEndpoint).to.throw(ClientAuthErrorMessage.endpointResolutionError.desc); - expect(() => authority.selfSignedJwtAudience).to.throw(ClientAuthErrorMessage.endpointResolutionError.desc); + expect(() => authority.authorizationEndpoint).toThrowError(ClientAuthErrorMessage.endpointResolutionError.desc); + expect(() => authority.tokenEndpoint).toThrowError(ClientAuthErrorMessage.endpointResolutionError.desc); + expect(() => authority.endSessionEndpoint).toThrowError(ClientAuthErrorMessage.endpointResolutionError.desc); + expect(() => authority.deviceCodeEndpoint).toThrowError(ClientAuthErrorMessage.endpointResolutionError.desc); + expect(() => authority.selfSignedJwtAudience).toThrowError(ClientAuthErrorMessage.endpointResolutionError.desc); }); it("Returns endpoints for different b2c policy than what is cached", async () => { - sinon.restore(); + jest.clearAllMocks(); const signInPolicy = "b2c_1_sisopolicy"; const resetPolicy = "b2c_1_password_reset"; const baseAuthority = "https://login.microsoftonline.com/tfp/msidlabb2c.onmicrosoft.com/"; - sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(B2C_OPENID_CONFIG_RESPONSE.body); + jest.spyOn(Authority.prototype, "getEndpointMetadataFromNetwork").mockResolvedValue(B2C_OPENID_CONFIG_RESPONSE.body); authority = new Authority(`${baseAuthority}${signInPolicy}`, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); const secondAuthority = new Authority(`${baseAuthority}${resetPolicy}`, networkInterface, mockStorage, authorityOptions); await secondAuthority.resolveEndpointsAsync(); - expect(authority.authorizationEndpoint).to.be.eq(B2C_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); - expect(secondAuthority.authorizationEndpoint).to.be.eq(B2C_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace(signInPolicy, resetPolicy)); - expect(authority.tokenEndpoint).to.be.eq(B2C_OPENID_CONFIG_RESPONSE.body.token_endpoint); - expect(secondAuthority.tokenEndpoint).to.be.eq(B2C_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace(signInPolicy, resetPolicy)); - expect(authority.endSessionEndpoint).to.be.eq(B2C_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); - expect(secondAuthority.endSessionEndpoint).to.be.eq(B2C_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace(signInPolicy, resetPolicy)); + expect(authority.authorizationEndpoint).toBe(B2C_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); + expect(secondAuthority.authorizationEndpoint).toBe( + B2C_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace(signInPolicy, resetPolicy) + ); + expect(authority.tokenEndpoint).toBe(B2C_OPENID_CONFIG_RESPONSE.body.token_endpoint); + expect(secondAuthority.tokenEndpoint).toBe( + B2C_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace(signInPolicy, resetPolicy) + ); + expect(authority.endSessionEndpoint).toBe(B2C_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); + expect(secondAuthority.endSessionEndpoint).toBe( + B2C_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace(signInPolicy, resetPolicy) + ); }); }); }); @@ -173,10 +183,10 @@ describe("Authority.ts Class Unit Tests", () => { describe("Regional authorities", () => { const networkInterface: INetworkModule = { sendGetRequestAsync(url: string, options?: NetworkRequestOptions): T { - return null; + return {} as T; }, sendPostRequestAsync(url: string, options?: NetworkRequestOptions): T { - return null; + return {} as T; } }; @@ -197,10 +207,10 @@ describe("Authority.ts Class Unit Tests", () => { const authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.discoveryComplete()).to.be.true; - expect(authority.authorizationEndpoint).to.be.eq(`${deepCopyOpenIdResponse.body.authorization_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/`); - expect(authority.tokenEndpoint).to.be.eq(`${deepCopyOpenIdResponse.body.token_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/?allowestsrnonmsi=true`); - expect(authority.endSessionEndpoint).to.be.eq(`${deepCopyOpenIdResponse.body.end_session_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/`); + expect(authority.discoveryComplete()).toBe(true); + expect(authority.authorizationEndpoint).toEqual(`${deepCopyOpenIdResponse.body.authorization_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/`); + expect(authority.tokenEndpoint).toEqual(`${deepCopyOpenIdResponse.body.token_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/?allowestsrnonmsi=true`); + expect(authority.endSessionEndpoint).toEqual(`${deepCopyOpenIdResponse.body.end_session_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/`); }); it("region provided by the user overrides the region auto-discovered", async () => { @@ -212,10 +222,10 @@ describe("Authority.ts Class Unit Tests", () => { const authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, {...authorityOptions, azureRegionConfiguration: { azureRegion: "westus2", environmentRegion: "centralus" }}); await authority.resolveEndpointsAsync(); - expect(authority.discoveryComplete()).to.be.true; - expect(authority.authorizationEndpoint).to.be.eq(`${deepCopyOpenIdResponse.body.authorization_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/`); - expect(authority.tokenEndpoint).to.be.eq(`${deepCopyOpenIdResponse.body.token_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/?allowestsrnonmsi=true`); - expect(authority.endSessionEndpoint).to.be.eq(`${deepCopyOpenIdResponse.body.end_session_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/`); + expect(authority.discoveryComplete()).toBe(true); + expect(authority.authorizationEndpoint).toEqual(`${deepCopyOpenIdResponse.body.authorization_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/`); + expect(authority.tokenEndpoint).toEqual(`${deepCopyOpenIdResponse.body.token_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/?allowestsrnonmsi=true`); + expect(authority.endSessionEndpoint).toEqual(`${deepCopyOpenIdResponse.body.end_session_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "westus2.login.microsoft.com")}/`); }); it("auto discovered region only used when the user provides the AUTO_DISCOVER flag", async () => { @@ -227,10 +237,10 @@ describe("Authority.ts Class Unit Tests", () => { const authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, {...authorityOptions, azureRegionConfiguration: { azureRegion: Constants.AZURE_REGION_AUTO_DISCOVER_FLAG, environmentRegion: "centralus" }}); await authority.resolveEndpointsAsync(); - expect(authority.discoveryComplete()).to.be.true; - expect(authority.authorizationEndpoint).to.be.eq(`${deepCopyOpenIdResponse.body.authorization_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "centralus.login.microsoft.com")}/`); - expect(authority.tokenEndpoint).to.be.eq(`${deepCopyOpenIdResponse.body.token_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "centralus.login.microsoft.com")}/?allowestsrnonmsi=true`); - expect(authority.endSessionEndpoint).to.be.eq(`${deepCopyOpenIdResponse.body.end_session_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "centralus.login.microsoft.com")}/`); + expect(authority.discoveryComplete()).toBe(true); + expect(authority.authorizationEndpoint).toEqual(`${deepCopyOpenIdResponse.body.authorization_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "centralus.login.microsoft.com")}/`); + expect(authority.tokenEndpoint).toEqual(`${deepCopyOpenIdResponse.body.token_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "centralus.login.microsoft.com")}/?allowestsrnonmsi=true`); + expect(authority.endSessionEndpoint).toEqual(`${deepCopyOpenIdResponse.body.end_session_endpoint.replace("{tenant}", "common").replace("login.microsoftonline.com", "centralus.login.microsoft.com")}/`); }); it("fallbacks to the global endpoint when the user provides the AUTO_DISCOVER flag but no region is detected", async () => { @@ -242,10 +252,10 @@ describe("Authority.ts Class Unit Tests", () => { const authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, {...authorityOptions, azureRegionConfiguration: { azureRegion: Constants.AZURE_REGION_AUTO_DISCOVER_FLAG, environmentRegion: undefined }}); await authority.resolveEndpointsAsync(); - expect(authority.discoveryComplete()).to.be.true; - expect(authority.authorizationEndpoint).to.be.eq(deepCopyOpenIdResponse.body.authorization_endpoint.replace("{tenant}", "common")); - expect(authority.tokenEndpoint).to.be.eq(deepCopyOpenIdResponse.body.token_endpoint.replace("{tenant}", "common")); - expect(authority.endSessionEndpoint).to.be.eq(deepCopyOpenIdResponse.body.end_session_endpoint.replace("{tenant}", "common")); + expect(authority.discoveryComplete()).toBe(true); + expect(authority.authorizationEndpoint).toEqual(deepCopyOpenIdResponse.body.authorization_endpoint.replace("{tenant}", "common")); + expect(authority.tokenEndpoint).toEqual(deepCopyOpenIdResponse.body.token_endpoint.replace("{tenant}", "common")); + expect(authority.endSessionEndpoint).toEqual(deepCopyOpenIdResponse.body.end_session_endpoint.replace("{tenant}", "common")); }) }) @@ -267,13 +277,13 @@ describe("Authority.ts Class Unit Tests", () => { }); it("discoveryComplete returns false if endpoint discovery has not been completed", () => { - expect(authority.discoveryComplete()).to.be.false; + expect(authority.discoveryComplete()).toBe(false); }); it("discoveryComplete returns true if resolveEndpointsAsync resolves successfully", async () => { - sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); + jest.spyOn(Authority.prototype, "getEndpointMetadataFromNetwork").mockResolvedValue(DEFAULT_OPENID_CONFIG_RESPONSE.body); await authority.resolveEndpointsAsync(); - expect(authority.discoveryComplete()).to.be.true; + expect(authority.discoveryComplete()).toBe(true); }); @@ -288,12 +298,18 @@ describe("Authority.ts Class Unit Tests", () => { authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, options); await authority.resolveEndpointsAsync(); - expect(authority.discoveryComplete()).to.be.true; - expect(authority.authorizationEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common")); - expect(authority.tokenEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common")); - expect(authority.deviceCodeEndpoint).to.be.eq(authority.tokenEndpoint.replace("/token", "/devicecode")); - expect(authority.endSessionEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")); - expect(authority.selfSignedJwtAudience).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); + expect(authority.discoveryComplete()).toBe(true); + expect(authority.authorizationEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common") + ); + expect(authority.tokenEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common") + ); + expect(authority.deviceCodeEndpoint).toBe(authority.tokenEndpoint.replace("/token", "/devicecode")); + expect(authority.endSessionEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common") + ); + expect(authority.selfSignedJwtAudience).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); // Test that the metadata is cached const key = `authority-metadata-${TEST_CONFIG.MSAL_CLIENT_ID}-${Constants.DEFAULT_AUTHORITY_HOST}`; @@ -301,11 +317,11 @@ describe("Authority.ts Class Unit Tests", () => { if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.authorization_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); - expect(cachedAuthorityMetadata.token_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint); - expect(cachedAuthorityMetadata.end_session_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); - expect(cachedAuthorityMetadata.issuer).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer); - expect(cachedAuthorityMetadata.endpointsFromNetwork).to.be.false; + expect(cachedAuthorityMetadata.authorization_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); + expect(cachedAuthorityMetadata.token_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint); + expect(cachedAuthorityMetadata.end_session_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); + expect(cachedAuthorityMetadata.issuer).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer); + expect(cachedAuthorityMetadata.endpointsFromNetwork).toBe(false); } }); @@ -318,8 +334,8 @@ describe("Authority.ts Class Unit Tests", () => { }; authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, options); authority.resolveEndpointsAsync().catch(e => { - expect(e).to.be.instanceOf(ClientConfigurationError); - expect(e.errorMessage).to.be.eq(ClientConfigurationErrorMessage.invalidAuthorityMetadata.desc); + expect(e).toBeInstanceOf(ClientConfigurationError); + expect(e.errorMessage).toBe(ClientConfigurationErrorMessage.invalidAuthorityMetadata.desc); done(); }); }); @@ -335,23 +351,29 @@ describe("Authority.ts Class Unit Tests", () => { authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.discoveryComplete()).to.be.true; - expect(authority.authorizationEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common")); - expect(authority.tokenEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common")); - expect(authority.deviceCodeEndpoint).to.be.eq(authority.tokenEndpoint.replace("/token", "/devicecode")); - expect(authority.endSessionEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")); - expect(authority.selfSignedJwtAudience).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); + expect(authority.discoveryComplete()).toBe(true); + expect(authority.authorizationEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common") + ); + expect(authority.tokenEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common") + ); + expect(authority.deviceCodeEndpoint).toBe(authority.tokenEndpoint.replace("/token", "/devicecode")); + expect(authority.endSessionEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common") + ); + expect(authority.selfSignedJwtAudience).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); // Test that the metadata is cached const cachedAuthorityMetadata = mockStorage.getAuthorityMetadata(key); if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.authorization_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); - expect(cachedAuthorityMetadata.token_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint); - expect(cachedAuthorityMetadata.end_session_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); - expect(cachedAuthorityMetadata.issuer).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer); - expect(cachedAuthorityMetadata.endpointsFromNetwork).to.be.true; + expect(cachedAuthorityMetadata.authorization_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); + expect(cachedAuthorityMetadata.token_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint); + expect(cachedAuthorityMetadata.end_session_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); + expect(cachedAuthorityMetadata.issuer).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer); + expect(cachedAuthorityMetadata.endpointsFromNetwork).toBe(true); } }); @@ -363,7 +385,7 @@ describe("Authority.ts Class Unit Tests", () => { value.updateCanonicalAuthority(Constants.DEFAULT_AUTHORITY); mockStorage.setAuthorityMetadata(key, value); - sinon.stub(AuthorityMetadataEntity.prototype, "isExpired").returns(true); + jest.spyOn(AuthorityMetadataEntity.prototype, "isExpired").mockReturnValue(true); networkInterface.sendGetRequestAsync = (url: string, options?: NetworkRequestOptions): any => { return DEFAULT_OPENID_CONFIG_RESPONSE; @@ -371,23 +393,29 @@ describe("Authority.ts Class Unit Tests", () => { authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.discoveryComplete()).to.be.true; - expect(authority.authorizationEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common")); - expect(authority.tokenEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common")); - expect(authority.deviceCodeEndpoint).to.be.eq(authority.tokenEndpoint.replace("/token", "/devicecode")); - expect(authority.endSessionEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")); - expect(authority.selfSignedJwtAudience).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); + expect(authority.discoveryComplete()).toBe(true); + expect(authority.authorizationEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common") + ); + expect(authority.tokenEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common") + ); + expect(authority.deviceCodeEndpoint).toBe(authority.tokenEndpoint.replace("/token", "/devicecode")); + expect(authority.endSessionEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common") + ); + expect(authority.selfSignedJwtAudience).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); // Test that the metadata is cached const cachedAuthorityMetadata = mockStorage.getAuthorityMetadata(key); if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.authorization_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); - expect(cachedAuthorityMetadata.token_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint); - expect(cachedAuthorityMetadata.end_session_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); - expect(cachedAuthorityMetadata.issuer).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer); - expect(cachedAuthorityMetadata.endpointsFromNetwork).to.be.true; + expect(cachedAuthorityMetadata.authorization_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); + expect(cachedAuthorityMetadata.token_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint); + expect(cachedAuthorityMetadata.end_session_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); + expect(cachedAuthorityMetadata.issuer).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer); + expect(cachedAuthorityMetadata.endpointsFromNetwork).toBe(true); } }); @@ -398,12 +426,18 @@ describe("Authority.ts Class Unit Tests", () => { authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.discoveryComplete()).to.be.true; - expect(authority.authorizationEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common")); - expect(authority.tokenEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common")); - expect(authority.deviceCodeEndpoint).to.be.eq(authority.tokenEndpoint.replace("/token", "/devicecode")); - expect(authority.endSessionEndpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")); - expect(authority.selfSignedJwtAudience).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); + expect(authority.discoveryComplete()).toBe(true); + expect(authority.authorizationEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common") + ); + expect(authority.tokenEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint.replace("{tenant}", "common") + ); + expect(authority.deviceCodeEndpoint).toBe(authority.tokenEndpoint.replace("/token", "/devicecode")); + expect(authority.endSessionEndpoint).toBe( + DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common") + ); + expect(authority.selfSignedJwtAudience).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer.replace("{tenant}", "common")); // Test that the metadata is cached const key = `authority-metadata-${TEST_CONFIG.MSAL_CLIENT_ID}-${Constants.DEFAULT_AUTHORITY_HOST}`; @@ -411,11 +445,11 @@ describe("Authority.ts Class Unit Tests", () => { if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.authorization_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); - expect(cachedAuthorityMetadata.token_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint); - expect(cachedAuthorityMetadata.end_session_endpoint).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); - expect(cachedAuthorityMetadata.issuer).to.be.eq(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer); - expect(cachedAuthorityMetadata.endpointsFromNetwork).to.be.true; + expect(cachedAuthorityMetadata.authorization_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint); + expect(cachedAuthorityMetadata.token_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.token_endpoint); + expect(cachedAuthorityMetadata.end_session_endpoint).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint); + expect(cachedAuthorityMetadata.issuer).toBe(DEFAULT_OPENID_CONFIG_RESPONSE.body.issuer); + expect(cachedAuthorityMetadata.endpointsFromNetwork).toBe(true); } }); @@ -425,8 +459,8 @@ describe("Authority.ts Class Unit Tests", () => { }; authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); authority.resolveEndpointsAsync().catch(e => { - expect(e).to.be.instanceOf(ClientAuthError); - expect(e.errorMessage).to.include(ClientAuthErrorMessage.unableToGetOpenidConfigError.desc); + expect(e).toBeInstanceOf(ClientAuthError); + expect(e.errorMessage.includes(ClientAuthErrorMessage.unableToGetOpenidConfigError.desc)).toBe(true); done(); }); }); @@ -445,9 +479,9 @@ describe("Authority.ts Class Unit Tests", () => { }; authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.isAlias(Constants.DEFAULT_AUTHORITY_HOST)).to.be.true; - expect(authority.getPreferredCache()).to.be.eq(Constants.DEFAULT_AUTHORITY_HOST); - expect(authority.canonicalAuthority).to.include(Constants.DEFAULT_AUTHORITY_HOST); + expect(authority.isAlias(Constants.DEFAULT_AUTHORITY_HOST)).toBe(true); + expect(authority.getPreferredCache()).toBe(Constants.DEFAULT_AUTHORITY_HOST); + expect(authority.canonicalAuthority.includes(Constants.DEFAULT_AUTHORITY_HOST)).toBe(true); // Test that the metadata is cached const key = `authority-metadata-${TEST_CONFIG.MSAL_CLIENT_ID}-${Constants.DEFAULT_AUTHORITY_HOST}`; @@ -455,10 +489,10 @@ describe("Authority.ts Class Unit Tests", () => { if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.aliases).to.contain(Constants.DEFAULT_AUTHORITY_HOST); - expect(cachedAuthorityMetadata.preferred_cache).to.be.eq(Constants.DEFAULT_AUTHORITY_HOST); - expect(cachedAuthorityMetadata.preferred_network).to.be.eq(Constants.DEFAULT_AUTHORITY_HOST); - expect(cachedAuthorityMetadata.aliasesFromNetwork).to.be.false; + expect(cachedAuthorityMetadata.aliases).toContain(Constants.DEFAULT_AUTHORITY_HOST); + expect(cachedAuthorityMetadata.preferred_cache).toBe(Constants.DEFAULT_AUTHORITY_HOST); + expect(cachedAuthorityMetadata.preferred_network).toBe(Constants.DEFAULT_AUTHORITY_HOST); + expect(cachedAuthorityMetadata.aliasesFromNetwork).toBe(false); } }); @@ -475,11 +509,11 @@ describe("Authority.ts Class Unit Tests", () => { authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.isAlias("login.microsoftonline.com")).to.be.true; - expect(authority.isAlias("login.windows.net")).to.be.true; - expect(authority.isAlias("sts.windows.net")).to.be.true; - expect(authority.getPreferredCache()).to.be.eq("sts.windows.net"); - expect(authority.canonicalAuthority).to.include("login.windows.net"); + expect(authority.isAlias("login.microsoftonline.com")).toBe(true); + expect(authority.isAlias("login.windows.net")).toBe(true); + expect(authority.isAlias("sts.windows.net")).toBe(true); + expect(authority.getPreferredCache()).toBe("sts.windows.net"); + expect(authority.canonicalAuthority.includes("login.windows.net")).toBe(true); // Test that the metadata is cached const key = `authority-metadata-${TEST_CONFIG.MSAL_CLIENT_ID}-sts.windows.net`; @@ -487,12 +521,12 @@ describe("Authority.ts Class Unit Tests", () => { if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.aliases).to.contain("login.microsoftonline.com"); - expect(cachedAuthorityMetadata.aliases).to.contain("login.windows.net"); - expect(cachedAuthorityMetadata.aliases).to.contain("sts.windows.net"); - expect(cachedAuthorityMetadata.preferred_cache).to.be.eq("sts.windows.net"); - expect(cachedAuthorityMetadata.preferred_network).to.be.eq("login.windows.net"); - expect(cachedAuthorityMetadata.aliasesFromNetwork).to.be.false; + expect(cachedAuthorityMetadata.aliases).toContain("login.microsoftonline.com"); + expect(cachedAuthorityMetadata.aliases).toContain("login.windows.net"); + expect(cachedAuthorityMetadata.aliases).toContain("sts.windows.net"); + expect(cachedAuthorityMetadata.preferred_cache).toBe("sts.windows.net"); + expect(cachedAuthorityMetadata.preferred_network).toBe("login.windows.net"); + expect(cachedAuthorityMetadata.aliasesFromNetwork).toBe(false); } }); @@ -509,27 +543,27 @@ describe("Authority.ts Class Unit Tests", () => { value.updateCloudDiscoveryMetadata(DEFAULT_TENANT_DISCOVERY_RESPONSE.body.metadata[0], true); value.updateCanonicalAuthority(Constants.DEFAULT_AUTHORITY); mockStorage.setAuthorityMetadata(key, value); - sinon.stub(Authority.prototype, "updateEndpointMetadata").resolves("cache"); + jest.spyOn(Authority.prototype, "updateEndpointMetadata").mockResolvedValue("cache"); authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.isAlias("login.microsoftonline.com")).to.be.true; - expect(authority.isAlias("login.windows.net")).to.be.true; - expect(authority.isAlias("sts.windows.net")).to.be.true; - expect(authority.getPreferredCache()).to.be.eq("sts.windows.net"); - expect(authority.canonicalAuthority).to.include("login.windows.net"); + expect(authority.isAlias("login.microsoftonline.com")).toBe(true); + expect(authority.isAlias("login.windows.net")).toBe(true); + expect(authority.isAlias("sts.windows.net")).toBe(true); + expect(authority.getPreferredCache()).toBe("sts.windows.net"); + expect(authority.canonicalAuthority.includes("login.windows.net")).toBe(true); // Test that the metadata is cached const cachedAuthorityMetadata = mockStorage.getAuthorityMetadata(key); if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.aliases).to.contain("login.microsoftonline.com"); - expect(cachedAuthorityMetadata.aliases).to.contain("login.windows.net"); - expect(cachedAuthorityMetadata.aliases).to.contain("sts.windows.net"); - expect(cachedAuthorityMetadata.preferred_cache).to.be.eq("sts.windows.net"); - expect(cachedAuthorityMetadata.preferred_network).to.be.eq("login.windows.net"); - expect(cachedAuthorityMetadata.aliasesFromNetwork).to.be.true; + expect(cachedAuthorityMetadata.aliases).toContain("login.microsoftonline.com"); + expect(cachedAuthorityMetadata.aliases).toContain("login.windows.net"); + expect(cachedAuthorityMetadata.aliases).toContain("sts.windows.net"); + expect(cachedAuthorityMetadata.preferred_cache).toBe("sts.windows.net"); + expect(cachedAuthorityMetadata.preferred_network).toBe("login.windows.net"); + expect(cachedAuthorityMetadata.aliasesFromNetwork).toBe(true); } }); @@ -546,8 +580,8 @@ describe("Authority.ts Class Unit Tests", () => { value.updateCloudDiscoveryMetadata(DEFAULT_TENANT_DISCOVERY_RESPONSE.body.metadata[0], true); value.updateCanonicalAuthority(Constants.DEFAULT_AUTHORITY); mockStorage.setAuthorityMetadata(key, value); - sinon.stub(AuthorityMetadataEntity.prototype, "isExpired").returns(true); - sinon.stub(Authority.prototype, "updateEndpointMetadata").resolves("cache"); + jest.spyOn(AuthorityMetadataEntity.prototype, "isExpired").mockReturnValue(true); + jest.spyOn(Authority.prototype, "updateEndpointMetadata").mockResolvedValue("cache"); networkInterface.sendGetRequestAsync = (url: string, options?: NetworkRequestOptions): any => { return DEFAULT_TENANT_DISCOVERY_RESPONSE; @@ -555,23 +589,23 @@ describe("Authority.ts Class Unit Tests", () => { authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.isAlias("login.microsoftonline.com")).to.be.true; - expect(authority.isAlias("login.windows.net")).to.be.true; - expect(authority.isAlias("sts.windows.net")).to.be.true; - expect(authority.getPreferredCache()).to.be.eq("sts.windows.net"); - expect(authority.canonicalAuthority).to.include("login.windows.net"); + expect(authority.isAlias("login.microsoftonline.com")).toBe(true); + expect(authority.isAlias("login.windows.net")).toBe(true); + expect(authority.isAlias("sts.windows.net")).toBe(true); + expect(authority.getPreferredCache()).toBe("sts.windows.net"); + expect(authority.canonicalAuthority.includes("login.windows.net")).toBe(true); // Test that the metadata is cached const cachedAuthorityMetadata = mockStorage.getAuthorityMetadata(key); if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.aliases).to.contain("login.microsoftonline.com"); - expect(cachedAuthorityMetadata.aliases).to.contain("login.windows.net"); - expect(cachedAuthorityMetadata.aliases).to.contain("sts.windows.net"); - expect(cachedAuthorityMetadata.preferred_cache).to.be.eq("sts.windows.net"); - expect(cachedAuthorityMetadata.preferred_network).to.be.eq("login.windows.net"); - expect(cachedAuthorityMetadata.aliasesFromNetwork).to.be.true; + expect(cachedAuthorityMetadata.aliases).toContain("login.microsoftonline.com"); + expect(cachedAuthorityMetadata.aliases).toContain("login.windows.net"); + expect(cachedAuthorityMetadata.aliases).toContain("sts.windows.net"); + expect(cachedAuthorityMetadata.preferred_cache).toBe("sts.windows.net"); + expect(cachedAuthorityMetadata.preferred_network).toBe("login.windows.net"); + expect(cachedAuthorityMetadata.aliasesFromNetwork).toBe(true); } }); @@ -585,15 +619,15 @@ describe("Authority.ts Class Unit Tests", () => { networkInterface.sendGetRequestAsync = (url: string, options?: NetworkRequestOptions): any => { return DEFAULT_TENANT_DISCOVERY_RESPONSE; }; - sinon.stub(Authority.prototype, "updateEndpointMetadata").resolves("cache"); + jest.spyOn(Authority.prototype, "updateEndpointMetadata").mockResolvedValue("cache"); authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.isAlias("login.microsoftonline.com")).to.be.true; - expect(authority.isAlias("login.windows.net")).to.be.true; - expect(authority.isAlias("sts.windows.net")).to.be.true; - expect(authority.getPreferredCache()).to.be.eq("sts.windows.net"); - expect(authority.canonicalAuthority).to.include("login.windows.net"); + expect(authority.isAlias("login.microsoftonline.com")).toBe(true); + expect(authority.isAlias("login.windows.net")).toBe(true); + expect(authority.isAlias("sts.windows.net")).toBe(true); + expect(authority.getPreferredCache()).toBe("sts.windows.net"); + expect(authority.canonicalAuthority.includes("login.windows.net")).toBe(true); // Test that the metadata is cached const key = `authority-metadata-${TEST_CONFIG.MSAL_CLIENT_ID}-sts.windows.net`; @@ -601,12 +635,12 @@ describe("Authority.ts Class Unit Tests", () => { if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.aliases).to.contain("login.microsoftonline.com"); - expect(cachedAuthorityMetadata.aliases).to.contain("login.windows.net"); - expect(cachedAuthorityMetadata.aliases).to.contain("sts.windows.net"); - expect(cachedAuthorityMetadata.preferred_cache).to.be.eq("sts.windows.net"); - expect(cachedAuthorityMetadata.preferred_network).to.be.eq("login.windows.net"); - expect(cachedAuthorityMetadata.aliasesFromNetwork).to.be.true; + expect(cachedAuthorityMetadata.aliases).toContain("login.microsoftonline.com"); + expect(cachedAuthorityMetadata.aliases).toContain("login.windows.net"); + expect(cachedAuthorityMetadata.aliases).toContain("sts.windows.net"); + expect(cachedAuthorityMetadata.preferred_cache).toBe("sts.windows.net"); + expect(cachedAuthorityMetadata.preferred_network).toBe("login.windows.net"); + expect(cachedAuthorityMetadata.aliasesFromNetwork).toBe(true); } }); @@ -620,13 +654,13 @@ describe("Authority.ts Class Unit Tests", () => { networkInterface.sendGetRequestAsync = (url: string, options?: NetworkRequestOptions): any => { return DEFAULT_TENANT_DISCOVERY_RESPONSE; }; - sinon.stub(Authority.prototype, "updateEndpointMetadata").resolves("cache"); + jest.spyOn(Authority.prototype, "updateEndpointMetadata").mockResolvedValue("cache"); authority = new Authority("https://custom-domain.microsoft.com", networkInterface, mockStorage, authorityOptions); await authority.resolveEndpointsAsync(); - expect(authority.isAlias("custom-domain.microsoft.com")).to.be.true; - expect(authority.getPreferredCache()).to.be.eq("custom-domain.microsoft.com"); - expect(authority.canonicalAuthority).to.include("custom-domain.microsoft.com"); + expect(authority.isAlias("custom-domain.microsoft.com")).toBe(true); + expect(authority.getPreferredCache()).toBe("custom-domain.microsoft.com"); + expect(authority.canonicalAuthority.includes("custom-domain.microsoft.com")); // Test that the metadata is cached const key = `authority-metadata-${TEST_CONFIG.MSAL_CLIENT_ID}-custom-domain.microsoft.com`; @@ -634,10 +668,10 @@ describe("Authority.ts Class Unit Tests", () => { if (!cachedAuthorityMetadata) { throw Error("Cached AuthorityMetadata should not be null!"); } else { - expect(cachedAuthorityMetadata.aliases).to.contain("custom-domain.microsoft.com"); - expect(cachedAuthorityMetadata.preferred_cache).to.be.eq("custom-domain.microsoft.com"); - expect(cachedAuthorityMetadata.preferred_network).to.be.eq("custom-domain.microsoft.com"); - expect(cachedAuthorityMetadata.aliasesFromNetwork).to.be.true; + expect(cachedAuthorityMetadata.aliases).toContain("custom-domain.microsoft.com"); + expect(cachedAuthorityMetadata.preferred_cache).toBe("custom-domain.microsoft.com"); + expect(cachedAuthorityMetadata.preferred_network).toBe("custom-domain.microsoft.com"); + expect(cachedAuthorityMetadata.aliasesFromNetwork).toBe(true); } }); @@ -650,8 +684,8 @@ describe("Authority.ts Class Unit Tests", () => { } authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); authority.resolveEndpointsAsync().catch(e => { - expect(e).to.be.instanceOf(ClientConfigurationError); - expect(e.errorMessage).to.be.eq(ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.desc); + expect(e).toBeInstanceOf(ClientConfigurationError); + expect(e.errorMessage).toBe(ClientConfigurationErrorMessage.invalidCloudDiscoveryMetadata.desc); done(); }); }); @@ -669,9 +703,9 @@ describe("Authority.ts Class Unit Tests", () => { authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); authority.resolveEndpointsAsync().catch(e => { - expect(e).to.be.instanceOf(ClientConfigurationError); - expect(e.errorMessage).to.equal(ClientConfigurationErrorMessage.untrustedAuthority.desc); - expect(e.errorCode).to.equal(ClientConfigurationErrorMessage.untrustedAuthority.code); + expect(e).toBeInstanceOf(ClientConfigurationError); + expect(e.errorMessage).toBe(ClientConfigurationErrorMessage.untrustedAuthority.desc); + expect(e.errorCode).toBe(ClientConfigurationErrorMessage.untrustedAuthority.code); done(); }); }); @@ -693,15 +727,15 @@ describe("Authority.ts Class Unit Tests", () => { authority = new Authority(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); authority.resolveEndpointsAsync().catch(e => { - expect(e).to.be.instanceOf(ClientConfigurationError); - expect(e.errorMessage).to.equal(ClientConfigurationErrorMessage.untrustedAuthority.desc); - expect(e.errorCode).to.equal(ClientConfigurationErrorMessage.untrustedAuthority.code); + expect(e).toBeInstanceOf(ClientConfigurationError); + expect(e.errorMessage).toEqual(ClientConfigurationErrorMessage.untrustedAuthority.desc); + expect(e.errorCode).toEqual(ClientConfigurationErrorMessage.untrustedAuthority.code); done(); }); }); it("getPreferredCache throws error if discovery is not complete", () => { - expect(() => authority.getPreferredCache()).to.throw(ClientAuthErrorMessage.endpointResolutionError.desc); + expect(() => authority.getPreferredCache()).toThrowError(ClientAuthErrorMessage.endpointResolutionError.desc); }); }); @@ -709,13 +743,14 @@ describe("Authority.ts Class Unit Tests", () => { const authorityUrl = "https://login.microsoftonline.com/adfs/" let endpoint = ""; authority = new Authority(authorityUrl, networkInterface, mockStorage, authorityOptions); - sinon.stub(networkInterface, "sendGetRequestAsync").callsFake((openIdConfigEndpoint) => { + jest.spyOn(networkInterface, "sendGetRequestAsync").mockImplementation((openIdConfigEndpoint) => { + // @ts-ignore endpoint = openIdConfigEndpoint; return DEFAULT_OPENID_CONFIG_RESPONSE; }); await authority.resolveEndpointsAsync(); - expect(endpoint).to.equal(`${authorityUrl}.well-known/openid-configuration`); + expect(endpoint).toBe(`${authorityUrl}.well-known/openid-configuration`); }); it("OIDC ProtocolMode does not append v2 to endpoint", async () => { @@ -728,13 +763,14 @@ describe("Authority.ts Class Unit Tests", () => { authorityMetadata: "" } authority = new Authority(authorityUrl, networkInterface, mockStorage, options); - sinon.stub(networkInterface, "sendGetRequestAsync").callsFake((openIdConfigEndpoint) => { + jest.spyOn(networkInterface, "sendGetRequestAsync").mockImplementation((openIdConfigEndpoint) => { + // @ts-ignore endpoint = openIdConfigEndpoint; return DEFAULT_OPENID_CONFIG_RESPONSE; }); await authority.resolveEndpointsAsync(); - expect(endpoint).to.equal(`${authorityUrl}.well-known/openid-configuration`); + expect(endpoint).toBe(`${authorityUrl}.well-known/openid-configuration`); }) }); }); diff --git a/lib/msal-common/test/authority/AuthorityFactory.spec.ts b/lib/msal-common/test/authority/AuthorityFactory.spec.ts index 94951b14cf..8ab83df0f0 100644 --- a/lib/msal-common/test/authority/AuthorityFactory.spec.ts +++ b/lib/msal-common/test/authority/AuthorityFactory.spec.ts @@ -1,5 +1,3 @@ -import { expect } from "chai"; -import sinon from "sinon"; import { AuthorityFactory } from "../../src/authority/AuthorityFactory"; import { INetworkModule, NetworkRequestOptions } from "../../src/network/INetworkModule"; import { TEST_CONFIG } from "../test_kit/StringConstants"; @@ -45,13 +43,13 @@ describe("AuthorityFactory.ts Class Unit Tests", () => { afterEach(() => { mockCache.clearCache(); - sinon.restore(); + jest.clearAllMocks(); }); it("AuthorityFactory returns null if given url is null or empty", () => { - expect(() => AuthorityFactory.createInstance("", networkInterface, mockStorage, authorityOptions)).to.throw(ClientConfigurationErrorMessage.urlEmptyError.desc); + expect(() => AuthorityFactory.createInstance("", networkInterface, mockStorage, authorityOptions)).toThrowError(ClientConfigurationErrorMessage.urlEmptyError.desc); // @ts-ignore - expect(() => AuthorityFactory.createInstance(null, networkInterface, mockStorage, authorityOptions)).to.throw(ClientConfigurationErrorMessage.urlEmptyError.desc); + expect(() => AuthorityFactory.createInstance(null, networkInterface, mockStorage, authorityOptions)).toThrowError(ClientConfigurationErrorMessage.urlEmptyError.desc); }); it("Throws error for malformed url strings", () => { @@ -62,7 +60,7 @@ describe("AuthorityFactory.ts Class Unit Tests", () => { mockStorage, authorityOptions ) - ).to.throw(ClientConfigurationErrorMessage.authorityUriInsecure.desc); + ).toThrowError(ClientConfigurationErrorMessage.authorityUriInsecure.desc); expect(() => AuthorityFactory.createInstance( "This is not a URI", @@ -70,57 +68,57 @@ describe("AuthorityFactory.ts Class Unit Tests", () => { mockStorage, authorityOptions ) - ).to.throw(ClientConfigurationErrorMessage.urlParseError.desc); + ).toThrowError(ClientConfigurationErrorMessage.urlParseError.desc); expect(() => AuthorityFactory.createInstance("", networkInterface, mockStorage, authorityOptions) - ).to.throw(ClientConfigurationErrorMessage.urlEmptyError.desc); + ).toThrowError(ClientConfigurationErrorMessage.urlEmptyError.desc); }); it("createInstance returns Default instance if AAD Authority", () => { const authorityInstance = AuthorityFactory.createInstance(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); - expect(authorityInstance.authorityType).to.be.eq(AuthorityType.Default); + expect(authorityInstance.authorityType).toBe(AuthorityType.Default); expect(authorityInstance instanceof Authority); }); it("createInstance returns Default instance if B2C Authority", () => { const authorityInstance = AuthorityFactory.createInstance(TEST_CONFIG.b2cValidAuthority, networkInterface, mockStorage, authorityOptions); - expect(authorityInstance.authorityType).to.be.eq(AuthorityType.Default); + expect(authorityInstance.authorityType).toBe(AuthorityType.Default); expect(authorityInstance instanceof Authority); }); it("createInstance return ADFS instance if /adfs in path", () => { const authorityInstanceAAD = AuthorityFactory.createInstance(TEST_CONFIG.ADFS_VALID_AUTHORITY, networkInterface, mockStorage, authorityOptions); - expect(authorityInstanceAAD.authorityType).to.be.eq(AuthorityType.Adfs); + expect(authorityInstanceAAD.authorityType).toBe(AuthorityType.Adfs); expect(authorityInstanceAAD instanceof Authority); authorityOptions.protocolMode = ProtocolMode.OIDC; const authorityInstanceOIDC = AuthorityFactory.createInstance(TEST_CONFIG.ADFS_VALID_AUTHORITY, networkInterface, mockStorage, authorityOptions); - expect(authorityInstanceOIDC.authorityType).to.be.eq(AuthorityType.Adfs); + expect(authorityInstanceOIDC.authorityType).toBe(AuthorityType.Adfs); expect(authorityInstanceOIDC instanceof Authority); }); it("createInstance returns (non v2) OIDC endpoint with ProtocolMode: OIDC", () => { authorityOptions.protocolMode = ProtocolMode.OIDC; const authorityInstance = AuthorityFactory.createInstance(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); - expect(authorityInstance.authorityType).to.be.eq(AuthorityType.Default); + expect(authorityInstance.authorityType).toBe(AuthorityType.Default); expect(authorityInstance instanceof Authority); }); it("createDiscoveredInstance calls resolveEndpointsAsync then returns authority", async () => { - const resolveEndpointsStub = sinon.stub(Authority.prototype, "resolveEndpointsAsync").resolves(); + const resolveEndpointsStub = jest.spyOn(Authority.prototype, "resolveEndpointsAsync").mockResolvedValue(); const authorityInstance = await AuthorityFactory.createDiscoveredInstance(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions); - expect(authorityInstance.authorityType).to.be.eq(AuthorityType.Default); + expect(authorityInstance.authorityType).toBe(AuthorityType.Default); expect(authorityInstance instanceof Authority); - expect(resolveEndpointsStub.calledOnce).to.be.true; + expect(resolveEndpointsStub).toHaveBeenCalledTimes(1); }); it("createDiscoveredInstance throws if resolveEndpointsAsync fails", (done) => { - const resolveEndpointsStub = sinon.stub(Authority.prototype, "resolveEndpointsAsync").throws("Discovery failed."); + const resolveEndpointsStub = jest.spyOn(Authority.prototype, "resolveEndpointsAsync").mockRejectedValue("Discovery failed."); AuthorityFactory.createDiscoveredInstance(Constants.DEFAULT_AUTHORITY, networkInterface, mockStorage, authorityOptions).catch(e => { - expect(e).to.be.instanceOf(ClientAuthError); - expect(e.errorMessage).to.include(ClientAuthErrorMessage.endpointResolutionError.desc); - expect(e.errorMessage).to.include("Discovery failed."); - expect(resolveEndpointsStub.calledOnce).to.be.true; + expect(e).toBeInstanceOf(ClientAuthError); + expect(e.errorMessage.includes(ClientAuthErrorMessage.endpointResolutionError.desc)).toBe(true); + expect(e.errorMessage.includes("Discovery failed.")).toBe(true); + expect(resolveEndpointsStub).toHaveBeenCalledTimes(1); done(); }); }); diff --git a/lib/msal-common/test/cache/CacheManager.spec.ts b/lib/msal-common/test/cache/CacheManager.spec.ts index a357123eeb..9462e9b8e0 100644 --- a/lib/msal-common/test/cache/CacheManager.spec.ts +++ b/lib/msal-common/test/cache/CacheManager.spec.ts @@ -1,21 +1,19 @@ -import { expect } from "chai"; import { AuthenticationScheme, CredentialType } from "../../src/utils/Constants"; import { AccountEntity } from "../../src/cache/entities/AccountEntity"; import { AccessTokenEntity } from "../../src/cache/entities/AccessTokenEntity"; import { CacheRecord } from "../../src/cache/entities/CacheRecord"; import { AccountFilter, CredentialFilter } from "../../src/cache/utils/CacheTypes"; -import sinon, { mock } from "sinon"; +import sinon from "sinon"; import { ScopeSet } from "../../src/request/ScopeSet"; import { TEST_CONFIG, TEST_TOKENS, - CACHE_MOCKS, - TEST_ACCOUNT_INFO, + CACHE_MOCKS } from "../test_kit/StringConstants"; import { ClientAuthErrorMessage } from "../../src/error/ClientAuthError"; import { AccountInfo } from "../../src/account/AccountInfo"; import { MockCache } from "./MockCache"; -import { AuthorityMetadataEntity, CacheManager } from "../../src"; +import { AuthorityMetadataEntity, CacheManager, AppMetadataEntity, IdTokenEntity, RefreshTokenEntity } from "../../src"; import { mockCrypto } from "../client/ClientTestUtils"; import { TestError } from "../test_kit/TestErrors"; @@ -54,11 +52,11 @@ describe("CacheManager.ts test cases", () => { const cacheRecord = new CacheRecord(); cacheRecord.account = ac; mockCache.cacheManager.saveCacheRecord(cacheRecord); - const mockCacheAccount = mockCache.cacheManager.getAccount(accountKey); + const mockCacheAccount = mockCache.cacheManager.getAccount(accountKey) as AccountEntity; if (!mockCacheAccount) { throw TestError.createTestSetupError("mockCacheAccount does not have a value"); } - expect(mockCacheAccount.homeAccountId).to.eql("someUid.someUtid"); + expect(mockCacheAccount.homeAccountId).toEqual("someUid.someUtid"); }); it("save accessToken", () => { @@ -81,13 +79,14 @@ describe("CacheManager.ts test cases", () => { const cacheRecord = new CacheRecord(); cacheRecord.accessToken = at; mockCache.cacheManager.saveCacheRecord(cacheRecord); - const mockCacheAT = mockCache.cacheManager.getAccessTokenCredential(atKey); + + const mockCacheAT = mockCache.cacheManager.getAccessTokenCredential(atKey) as AccessTokenEntity; if (!mockCacheAT) { throw TestError.createTestSetupError("mockCacheAT does not have a value"); } - expect(mockCacheAT.homeAccountId).to.eql("someUid.someUtid"); - expect(mockCacheAT.credentialType).to.eql(CredentialType.ACCESS_TOKEN); - expect(mockCacheAT.tokenType).to.eql(AuthenticationScheme.BEARER); + expect(mockCacheAT.homeAccountId).toEqual("someUid.someUtid"); + expect(mockCacheAT.credentialType).toEqual(CredentialType.ACCESS_TOKEN); + expect(mockCacheAT.tokenType).toEqual(AuthenticationScheme.BEARER); }); it("save accessToken with Auth Scheme (pop)", () => { @@ -111,14 +110,14 @@ describe("CacheManager.ts test cases", () => { const cacheRecord = new CacheRecord(); cacheRecord.accessToken = at; mockCache.cacheManager.saveCacheRecord(cacheRecord); - const mockCacheAT = mockCache.cacheManager.getAccessTokenCredential(atKey); + const mockCacheAT = mockCache.cacheManager.getAccessTokenCredential(atKey) as AccessTokenEntity; if (!mockCacheAT) { throw TestError.createTestSetupError("mockCacheAT does not have a value"); } - expect(mockCacheAT.homeAccountId).to.eql("someUid.someUtid"); - expect(mockCacheAT.credentialType).to.eql(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME); - expect(mockCacheAT.tokenType).to.eql(AuthenticationScheme.POP); - expect(mockCacheAT.keyId).to.not.be.undefined; + expect(mockCacheAT.homeAccountId).toEqual("someUid.someUtid"); + expect(mockCacheAT.credentialType).toEqual(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME); + expect(mockCacheAT.tokenType).toEqual(AuthenticationScheme.POP); + expect(mockCacheAT.keyId).toBeDefined(); }); it("getAccount", () => { @@ -135,9 +134,10 @@ describe("CacheManager.ts test cases", () => { const cacheRecord = new CacheRecord(); cacheRecord.account = ac; mockCache.cacheManager.saveCacheRecord(cacheRecord); - // @ts-ignore - expect(mockCache.cacheManager.getAccount(accountKey).homeAccountId).to.eql("someUid.someUtid"); - expect(mockCache.cacheManager.getAccount("")).to.be.null; + + const cacheAccount = mockCache.cacheManager.getAccount(accountKey) as AccountEntity; + expect(cacheAccount.homeAccountId).toEqual("someUid.someUtid"); + expect(mockCache.cacheManager.getAccount("")).toBeNull(); }); it("getAccessTokenCredential (Bearer)", () => { @@ -153,10 +153,10 @@ describe("CacheManager.ts test cases", () => { const cacheRecord = new CacheRecord(); cacheRecord.accessToken = accessTokenEntity; mockCache.cacheManager.saveCacheRecord(cacheRecord); - // @ts-ignore - expect(mockCache.cacheManager.getAccessTokenCredential(credKey).homeAccountId).to.eql("someUid.someUtid"); - // @ts-ignore - expect(mockCache.cacheManager.getAccessTokenCredential(credKey).credentialType).to.eql(CredentialType.ACCESS_TOKEN); + + const cachedAccessToken = mockCache.cacheManager.getAccessTokenCredential(credKey) as AccessTokenEntity; + expect(cachedAccessToken.homeAccountId).toEqual("someUid.someUtid"); + expect(cachedAccessToken.credentialType).toEqual(CredentialType.ACCESS_TOKEN); }); it("getAccessTokenCredential (POP)", () => { @@ -172,10 +172,10 @@ describe("CacheManager.ts test cases", () => { const cacheRecord = new CacheRecord(); cacheRecord.accessToken = accessTokenEntity; mockCache.cacheManager.saveCacheRecord(cacheRecord); - // @ts-ignore - expect(mockCache.cacheManager.getAccessTokenCredential(credKey).homeAccountId).to.eql("someUid.someUtid"); - // @ts-ignore - expect(mockCache.cacheManager.getAccessTokenCredential(credKey).credentialType).to.eql(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME); + + const cachedAccessToken = mockCache.cacheManager.getAccessTokenCredential(credKey) as AccessTokenEntity; + expect(cachedAccessToken.homeAccountId).toEqual("someUid.someUtid"); + expect(cachedAccessToken.credentialType).toEqual(CredentialType.ACCESS_TOKEN_WITH_AUTH_SCHEME); }); @@ -185,34 +185,34 @@ describe("CacheManager.ts test cases", () => { // filter by homeAccountId const successFilter: AccountFilter = { homeAccountId: "uid.utid" }; let accounts = mockCache.cacheManager.getAccountsFilteredBy(successFilter); - expect(Object.keys(accounts).length).to.eql(1); + expect(Object.keys(accounts).length).toEqual(1); const wrongFilter: AccountFilter = { homeAccountId: "Wrong Id" }; accounts = mockCache.cacheManager.getAccountsFilteredBy(wrongFilter); - expect(Object.keys(accounts).length).to.eql(0); + expect(Object.keys(accounts).length).toEqual(0); }); it("environment filter", () => { // filter by environment const successFilter: AccountFilter = { environment: "login.microsoftonline.com" }; let accounts = mockCache.cacheManager.getAccountsFilteredBy(successFilter); - expect(Object.keys(accounts).length).to.eql(1); + expect(Object.keys(accounts).length).toEqual(1); sinon.restore(); const wrongFilter: AccountFilter = { environment: "Wrong Env" }; accounts = mockCache.cacheManager.getAccountsFilteredBy(wrongFilter); - expect(Object.keys(accounts).length).to.eql(0); + expect(Object.keys(accounts).length).toEqual(0); }); it("realm filter", () => { // filter by realm const successFilter: AccountFilter = { realm: "microsoft" }; let accounts = mockCache.cacheManager.getAccountsFilteredBy(successFilter); - expect(Object.keys(accounts).length).to.eql(1); + expect(Object.keys(accounts).length).toEqual(1); const wrongFilter: AccountFilter = { realm: "Wrong Realm" }; accounts = mockCache.cacheManager.getAccountsFilteredBy(wrongFilter); - expect(Object.keys(accounts).length).to.eql(0); + expect(Object.keys(accounts).length).toEqual(0); }); }); @@ -222,143 +222,144 @@ describe("CacheManager.ts test cases", () => { // filter by homeAccountId const successFilter: CredentialFilter = { homeAccountId: "uid.utid" }; let credentials = mockCache.cacheManager.getCredentialsFilteredBy(successFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(1); - expect(Object.keys(credentials.accessTokens).length).to.eql(3); - expect(Object.keys(credentials.refreshTokens).length).to.eql(2); + expect(Object.keys(credentials.idTokens).length).toEqual(1); + expect(Object.keys(credentials.accessTokens).length).toEqual(3); + expect(Object.keys(credentials.refreshTokens).length).toEqual(2); const wrongFilter: CredentialFilter = { homeAccountId: "someuid.someutid" }; credentials = mockCache.cacheManager.getCredentialsFilteredBy(wrongFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(0); - expect(Object.keys(credentials.accessTokens).length).to.eql(0); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(0); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); }); it("environment filter", () => { // filter by environment const successFilter: CredentialFilter = { environment: "login.microsoftonline.com" }; let credentials = mockCache.cacheManager.getCredentialsFilteredBy(successFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(1); - expect(Object.keys(credentials.accessTokens).length).to.eql(3); - expect(Object.keys(credentials.refreshTokens).length).to.eql(2); + expect(Object.keys(credentials.idTokens).length).toEqual(1); + expect(Object.keys(credentials.accessTokens).length).toEqual(3); + expect(Object.keys(credentials.refreshTokens).length).toEqual(2); sinon.restore(); const wrongFilter: CredentialFilter = { environment: "Wrong Env" }; credentials = mockCache.cacheManager.getCredentialsFilteredBy(wrongFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(0); - expect(Object.keys(credentials.accessTokens).length).to.eql(0); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(0); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); }); it("realm filter", () => { // filter by realm const successFilter: CredentialFilter = { realm: "microsoft" }; let credentials = mockCache.cacheManager.getCredentialsFilteredBy(successFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(1); - expect(Object.keys(credentials.accessTokens).length).to.eql(3); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(1); + expect(Object.keys(credentials.accessTokens).length).toEqual(3); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); const wrongFilter: CredentialFilter = { realm: "Wrong Realm" }; credentials = mockCache.cacheManager.getCredentialsFilteredBy(wrongFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(0); - expect(Object.keys(credentials.accessTokens).length).to.eql(0); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(0); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); }); it("credentialType filter", () => { // filter by credentialType const successFilter: CredentialFilter = { credentialType: "IdToken" }; let credentials = mockCache.cacheManager.getCredentialsFilteredBy(successFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(1); - expect(Object.keys(credentials.accessTokens).length).to.eql(0); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(1); + expect(Object.keys(credentials.accessTokens).length).toEqual(0); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); const wrongFilter: CredentialFilter = { credentialType: "Incorrect" }; credentials = mockCache.cacheManager.getCredentialsFilteredBy(wrongFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(0); - expect(Object.keys(credentials.accessTokens).length).to.eql(0); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(0); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); }); it("credentialType filter (Access Tokens with and without Auth Scheme)", () => { // filter by credentialType const successFilter: CredentialFilter = { credentialType: "AccessToken" }; let credentials = mockCache.cacheManager.getCredentialsFilteredBy(successFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); // There are two Bearer tokens in the mock cache - expect(Object.keys(credentials.accessTokens).length).to.eql(2); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(2); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); const wrongFilter: CredentialFilter = { credentialType: "AccessToken_With_AuthScheme" }; credentials = mockCache.cacheManager.getCredentialsFilteredBy(wrongFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); // There is one POP token in the mock cache - expect(Object.keys(credentials.accessTokens).length).to.eql(1); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(1); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); }); it("clientId filter", () => { // filter by clientId const successFilter: CredentialFilter = { clientId: "mock_client_id" }; let credentials = mockCache.cacheManager.getCredentialsFilteredBy(successFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(1); - expect(Object.keys(credentials.accessTokens).length).to.eql(3); - expect(Object.keys(credentials.refreshTokens).length).to.eql(1); + expect(Object.keys(credentials.idTokens).length).toEqual(1); + expect(Object.keys(credentials.accessTokens).length).toEqual(3); + expect(Object.keys(credentials.refreshTokens).length).toEqual(1); const wrongFilter: CredentialFilter = { clientId: "Wrong Client ID" }; credentials = mockCache.cacheManager.getCredentialsFilteredBy(wrongFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(0); - expect(Object.keys(credentials.accessTokens).length).to.eql(0); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(0); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); }); it("target filter", () => { // filter by target const successFilter = { target: "scope1 scope2 scope3" }; let credentials = mockCache.cacheManager.getCredentialsFilteredBy(successFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(0); - expect(Object.keys(credentials.accessTokens).length).to.eql(2); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(2); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); const wrongFilter = { target: "wrong target" }; credentials = mockCache.cacheManager.getCredentialsFilteredBy(wrongFilter); - expect(Object.keys(credentials.idTokens).length).to.eql(0); - expect(Object.keys(credentials.accessTokens).length).to.eql(0); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(0); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); const filterOidcscopes = { target: "scope1 scope2 scope3 offline_access openid profile" }; credentials = mockCache.cacheManager.getCredentialsFilteredBy(filterOidcscopes); - expect(Object.keys(credentials.idTokens).length).to.eql(0); - expect(Object.keys(credentials.accessTokens).length).to.eql(2); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(2); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); const filterScopesCase = { target: "scope1 scope2 SCOPE3 offline_access openid profile" }; credentials = mockCache.cacheManager.getCredentialsFilteredBy(filterScopesCase); - expect(Object.keys(credentials.idTokens).length).to.eql(0); - expect(Object.keys(credentials.accessTokens).length).to.eql(2); - expect(Object.keys(credentials.refreshTokens).length).to.eql(0); + expect(Object.keys(credentials.idTokens).length).toEqual(0); + expect(Object.keys(credentials.accessTokens).length).toEqual(2); + expect(Object.keys(credentials.refreshTokens).length).toEqual(0); }); }); it("getAppMetadata and readAppMetadataFromCache", () => { const appMetadataKey = "appmetadata-login.microsoftonline.com-mock_client_id_1"; - const appMetadata = mockCache.cacheManager.getAppMetadata(appMetadataKey); + const appMetadata = mockCache.cacheManager.getAppMetadata(appMetadataKey) as AppMetadataEntity; if (!appMetadata) { throw TestError.createTestSetupError("appMetadata does not have a value"); } - expect(appMetadata.clientId).to.eql(CACHE_MOCKS.MOCK_CLIENT_ID_1); - expect(appMetadata.environment).to.eql(CACHE_MOCKS.MOCK_ACCOUNT_INFO.environment); - const cachedAppMetadata = mockCache.cacheManager.readAppMetadataFromCache(CACHE_MOCKS.MOCK_ACCOUNT_INFO.environment, CACHE_MOCKS.MOCK_CLIENT_ID_1); + expect(appMetadata.clientId).toEqual(CACHE_MOCKS.MOCK_CLIENT_ID_1); + expect(appMetadata.environment).toEqual(CACHE_MOCKS.MOCK_ACCOUNT_INFO.environment); + + const cachedAppMetadata = mockCache.cacheManager.readAppMetadataFromCache(CACHE_MOCKS.MOCK_ACCOUNT_INFO.environment, CACHE_MOCKS.MOCK_CLIENT_ID_1) as AppMetadataEntity; if (!cachedAppMetadata) { throw TestError.createTestSetupError("appMetadata does not have a value"); } - expect(cachedAppMetadata.clientId).to.eql(CACHE_MOCKS.MOCK_CLIENT_ID_1); - expect(cachedAppMetadata.environment).to.eql(CACHE_MOCKS.MOCK_ACCOUNT_INFO.environment); + expect(cachedAppMetadata.clientId).toEqual(CACHE_MOCKS.MOCK_CLIENT_ID_1); + expect(cachedAppMetadata.environment).toEqual(CACHE_MOCKS.MOCK_ACCOUNT_INFO.environment); }); it("removeAppMetadata", () => { mockCache.cacheManager.removeAppMetadata(); - expect(mockCache.cacheManager.getAppMetadata("appmetadata-login.microsoftonline.com-mock_client_id_1")).to.be.undefined; + expect(mockCache.cacheManager.getAppMetadata("appmetadata-login.microsoftonline.com-mock_client_id_1")).toBeUndefined(); }); it("removeAllAccounts", () => { @@ -378,13 +379,13 @@ describe("CacheManager.ts test cases", () => { mockCache.cacheManager.removeAllAccounts(); // Only app metadata remaining - expect(mockCache.cacheManager.getKeys().length === 1).to.be.true; + expect(mockCache.cacheManager.getKeys().length === 1).toBe(true); }); it("removeAccount", () => { - expect(mockCache.cacheManager.getAccount("uid.utid-login.microsoftonline.com-microsoft")).to.not.be.null; + expect(mockCache.cacheManager.getAccount("uid.utid-login.microsoftonline.com-microsoft")).not.toBeNull(); mockCache.cacheManager.removeAccount("uid.utid-login.microsoftonline.com-microsoft"); - expect(mockCache.cacheManager.getAccount("uid.utid-login.microsoftonline.com-microsoft")).to.be.null; + expect(mockCache.cacheManager.getAccount("uid.utid-login.microsoftonline.com-microsoft")).toBeNull(); }); it("removeCredential", () => { @@ -404,7 +405,7 @@ describe("CacheManager.ts test cases", () => { mockCache.cacheManager.removeCredential(at); const atKey = at.generateCredentialKey(); - expect(mockCache.cacheManager.getAccount(atKey)).to.be.null; + expect(mockCache.cacheManager.getAccount(atKey)).toBeNull(); }); it("readAccessTokenFromCache matches multiple tokens, throws error", () => { @@ -431,15 +432,15 @@ describe("CacheManager.ts test cases", () => { const mockedAccountInfo: AccountInfo = { homeAccountId: "uid.utid", + localAccountId: "uid", environment: "login.microsoftonline.com", - localAccountId: TEST_ACCOUNT_INFO.localAccountId, tenantId: TEST_CONFIG.TENANT, username: "John Doe" }; if (!mockedAccountInfo) { throw TestError.createTestSetupError("mockedAccountInfo does not have a value"); } - expect(() => mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.BEARER)).to.throw(`${ClientAuthErrorMessage.multipleMatchingTokens.desc}`); + expect(() => mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.BEARER)).toThrowError(`${ClientAuthErrorMessage.multipleMatchingTokens.desc}`); }); it("readAccessTokenFromCache only matches a Bearer Token when Authentication Scheme is set to Bearer", () => { @@ -466,13 +467,13 @@ describe("CacheManager.ts test cases", () => { const mockedAccountInfo: AccountInfo = { homeAccountId: "uid.utid", + localAccountId: "uid", environment: "login.microsoftonline.com", - localAccountId: TEST_ACCOUNT_INFO.localAccountId, tenantId: TEST_CONFIG.TENANT, username: "John Doe" }; - expect(mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.BEARER)).to.deep.eq(mockedAtEntity); - expect(() => mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.BEARER)).to.not.throw(`${ClientAuthErrorMessage.multipleMatchingTokens.desc}`); + expect(mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.BEARER)).toEqual(mockedAtEntity); + expect(() => mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.BEARER)).not.toThrowError(`${ClientAuthErrorMessage.multipleMatchingTokens.desc}`); }); it("readAccessTokenFromCache only matches a POP Token when Authentication Scheme is set to pop", () => { @@ -499,42 +500,42 @@ describe("CacheManager.ts test cases", () => { const mockedAccountInfo: AccountInfo = { homeAccountId: "uid.utid", + localAccountId: "uid", environment: "login.microsoftonline.com", - localAccountId: TEST_ACCOUNT_INFO.localAccountId, tenantId: TEST_CONFIG.TENANT, username: "John Doe" }; - expect(mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.POP)).to.deep.eq(mockedPopAtEntity); - expect(() => mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.POP)).to.not.throw(`${ClientAuthErrorMessage.multipleMatchingTokens.desc}`); + expect(mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.POP)).toEqual(mockedPopAtEntity); + expect(() => mockCache.cacheManager.readAccessTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, new ScopeSet(["user.read"]), AuthenticationScheme.POP)).not.toThrowError(`${ClientAuthErrorMessage.multipleMatchingTokens.desc}`); }); it("readIdTokenFromCache", () => { - const idToken = mockCache.cacheManager.readIdTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, CACHE_MOCKS.MOCK_ACCOUNT_INFO); + const idToken = mockCache.cacheManager.readIdTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, CACHE_MOCKS.MOCK_ACCOUNT_INFO) as IdTokenEntity; if (!idToken) { throw TestError.createTestSetupError("idToken does not have a value"); } - expect(idToken.clientId).to.equal(CACHE_MOCKS.MOCK_CLIENT_ID); + expect(idToken.clientId).toBe(CACHE_MOCKS.MOCK_CLIENT_ID); }); it("readRefreshTokenFromCache", () => { - const refreshToken = mockCache.cacheManager.readRefreshTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID_1, CACHE_MOCKS.MOCK_ACCOUNT_INFO, false); + const refreshToken = mockCache.cacheManager.readRefreshTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID_1, CACHE_MOCKS.MOCK_ACCOUNT_INFO, false) as RefreshTokenEntity; if (!refreshToken) { throw TestError.createTestSetupError("refreshToken does not have a value"); } - expect(refreshToken.clientId).to.equal(CACHE_MOCKS.MOCK_CLIENT_ID_1); + expect(refreshToken.clientId).toBe(CACHE_MOCKS.MOCK_CLIENT_ID_1); }); it("readRefreshTokenFromCache Error", () => { const refreshToken = mockCache.cacheManager.readRefreshTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, CACHE_MOCKS.MOCK_ACCOUNT_INFO, true); - expect(refreshToken).to.equal(null); + expect(refreshToken).toBe(null); }); it("readRefreshTokenFromCache with familyId", () => { - const refreshToken = mockCache.cacheManager.readRefreshTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID_1, CACHE_MOCKS.MOCK_ACCOUNT_INFO, true); + const refreshToken = mockCache.cacheManager.readRefreshTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID_1, CACHE_MOCKS.MOCK_ACCOUNT_INFO, true) as RefreshTokenEntity; if (!refreshToken) { throw TestError.createTestSetupError("refreshToken does not have a value"); } - expect(refreshToken.clientId).to.equal(CACHE_MOCKS.MOCK_CLIENT_ID_1); + expect(refreshToken.clientId).toBe(CACHE_MOCKS.MOCK_CLIENT_ID_1); }); it("readRefreshTokenFromCache with environment aliases", () => { @@ -550,17 +551,17 @@ describe("CacheManager.ts test cases", () => { }); const mockedAccountInfo: AccountInfo = { homeAccountId: "uid.utid", + localAccountId: "uid", environment: "login.windows.net", - localAccountId: TEST_ACCOUNT_INFO.localAccountId, tenantId: "mocked_tid", username: "mocked_username" }; - const cachedToken = mockCache.cacheManager.readRefreshTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, false); + const cachedToken = mockCache.cacheManager.readRefreshTokenFromCache(CACHE_MOCKS.MOCK_CLIENT_ID, mockedAccountInfo, false) as RefreshTokenEntity; if (!cachedToken) { throw TestError.createTestSetupError("refreshToken does not have a value"); } - expect(cachedToken.homeAccountId).to.equal("uid.utid"); - expect(cachedToken.environment).to.equal("login.microsoftonline.com"); + expect(cachedToken.homeAccountId).toBe("uid.utid"); + expect(cachedToken.environment).toBe("login.microsoftonline.com"); }); }); diff --git a/lib/msal-common/test/cache/entities/AccessTokenEntity.spec.ts b/lib/msal-common/test/cache/entities/AccessTokenEntity.spec.ts index f26f6c1b7f..e6ca5c7d04 100644 --- a/lib/msal-common/test/cache/entities/AccessTokenEntity.spec.ts +++ b/lib/msal-common/test/cache/entities/AccessTokenEntity.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { AccessTokenEntity } from "../../../src/cache/entities/AccessTokenEntity"; import { mockCache, mockAccessTokenEntity_1, mockAccessTokenEntity_2, mockRefreshTokenEntity } from "./cacheConstants"; import { ClientAuthError, ClientAuthErrorMessage } from "../../../src"; @@ -13,28 +12,28 @@ describe("AccessTokenEntity.ts Unit Tests", () => { it("Generate AccessTokenEntity key", () => { const at = mockCache.createMockATOne(); - expect(at.generateCredentialKey()).to.eql( + expect(at.generateCredentialKey()).toEqual( "uid.utid-login.microsoftonline.com-accesstoken-mock_client_id-microsoft-scope1 scope2 scope3" ); }); it("Throws error if AccessTokenEntity is not assigned a type", () => { const at = new AccessTokenEntity(); - expect(() => at.generateType()).to.throw(ClientAuthError); - expect(() => at.generateType()).to.throw(ClientAuthErrorMessage.unexpectedCredentialType.desc); + expect(() => at.generateType()).toThrowError(ClientAuthError); + expect(() => at.generateType()).toThrowError(ClientAuthErrorMessage.unexpectedCredentialType.desc); }); it("Generate AccessTokenEntity type", () => { const at = mockCache.createMockATOne(); - expect(at.generateType()).to.eql(CacheType.ACCESS_TOKEN); + expect(at.generateType()).toEqual(CacheType.ACCESS_TOKEN); }); it("verify if an object is an access token entity", () => { - expect(AccessTokenEntity.isAccessTokenEntity(mockAccessTokenEntity_1)).to.eql(true); - expect(AccessTokenEntity.isAccessTokenEntity(mockAccessTokenEntity_2)).to.eql(true); + expect(AccessTokenEntity.isAccessTokenEntity(mockAccessTokenEntity_1)).toEqual(true); + expect(AccessTokenEntity.isAccessTokenEntity(mockAccessTokenEntity_2)).toEqual(true); }); it("verify if an object is not an access token entity", () => { - expect(AccessTokenEntity.isAccessTokenEntity(mockRefreshTokenEntity)).to.eql(false); + expect(AccessTokenEntity.isAccessTokenEntity(mockRefreshTokenEntity)).toEqual(false); }); }); diff --git a/lib/msal-common/test/cache/entities/AccountEntity.spec.ts b/lib/msal-common/test/cache/entities/AccountEntity.spec.ts index 425198aab1..7fb83e7f39 100644 --- a/lib/msal-common/test/cache/entities/AccountEntity.spec.ts +++ b/lib/msal-common/test/cache/entities/AccountEntity.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { AccountEntity } from "../../../src/cache/entities/AccountEntity"; import { mockAccountEntity, mockIdTokenEntity } from "./cacheConstants"; import { AuthToken } from "../../../src/account/AuthToken"; @@ -107,21 +106,19 @@ describe("AccountEntity.ts Unit Tests", () => { it("generate an AccountEntityKey", () => { const ac = new AccountEntity(); Object.assign(ac, mockAccountEntity); - expect(ac.generateAccountKey()).to.eql( - "uid.utid-login.microsoftonline.com-microsoft" - ); + expect(ac.generateAccountKey()).toEqual("uid.utid-login.microsoftonline.com-microsoft"); }); it("throws error if account entity is not assigned a type", () => { const ac = new AccountEntity(); - expect(() => ac.generateType()).to.throw(ClientAuthError); - expect(() => ac.generateType()).to.throw(ClientAuthErrorMessage.unexpectedAccountType.desc); + expect(() => ac.generateType()).toThrowError(ClientAuthError); + expect(() => ac.generateType()).toThrowError(ClientAuthErrorMessage.unexpectedAccountType.desc); }); it("generate type of the cache", () => { const ac = new AccountEntity(); Object.assign(ac, mockAccountEntity); - expect(ac.generateType()).to.eql(1003); + expect(ac.generateType()).toEqual(1003); }); it("create an Account", () => { @@ -155,13 +152,13 @@ describe("AccountEntity.ts Unit Tests", () => { idToken ); - expect(acc.generateAccountKey()).to.eql(`${homeAccountId}-login.windows.net-${idTokenClaims.tid}`); - expect(acc.homeAccountId).to.eq(homeAccountId); - expect(acc.environment).to.eq(PREFERRED_CACHE_ALIAS); - expect(acc.realm).to.eq(idTokenClaims.tid); - expect(acc.username).to.eq("AbeLi@microsoft.com"); - expect(acc.localAccountId).to.eql(idTokenClaims.oid); - expect(acc.idTokenClaims).to.eq(idTokenClaims); + expect(acc.generateAccountKey()).toEqual(`${homeAccountId}-login.windows.net-${idTokenClaims.tid}`); + expect(acc.homeAccountId).toBe(homeAccountId); + expect(acc.environment).toBe(PREFERRED_CACHE_ALIAS); + expect(acc.realm).toBe(idTokenClaims.tid); + expect(acc.username).toBe("AbeLi@microsoft.com"); + expect(acc.localAccountId).toEqual(idTokenClaims.oid); + expect(acc.idTokenClaims).toBe(idTokenClaims); }); it("create an Account with sub instead of oid as localAccountId", () => { @@ -194,13 +191,13 @@ describe("AccountEntity.ts Unit Tests", () => { idToken ); - expect(acc.generateAccountKey()).to.eql(`${homeAccountId}-login.windows.net-${idTokenClaims.tid}`); - expect(acc.homeAccountId).to.eq(homeAccountId); - expect(acc.environment).to.eq(PREFERRED_CACHE_ALIAS); - expect(acc.realm).to.eq(idTokenClaims.tid); - expect(acc.username).to.eq("AbeLi@microsoft.com"); - expect(acc.localAccountId).to.eql(idTokenClaims.sub); - expect(acc.idTokenClaims).to.eq(idTokenClaims); + expect(acc.generateAccountKey()).toEqual(`${homeAccountId}-login.windows.net-${idTokenClaims.tid}`); + expect(acc.homeAccountId).toBe(homeAccountId); + expect(acc.environment).toBe(PREFERRED_CACHE_ALIAS); + expect(acc.realm).toBe(idTokenClaims.tid); + expect(acc.username).toBe("AbeLi@microsoft.com"); + expect(acc.localAccountId).toEqual(idTokenClaims.sub); + expect(acc.idTokenClaims).toBe(idTokenClaims); }); it("create an Account with emails claim instead of preferred_username claim", () => { @@ -233,13 +230,13 @@ describe("AccountEntity.ts Unit Tests", () => { authority, idToken ); - expect(acc.generateAccountKey()).to.eql(`${homeAccountId}-login.windows.net-${idTokenClaims.tid}`); - expect(acc.homeAccountId).to.eq(homeAccountId); - expect(acc.environment).to.eq(PREFERRED_CACHE_ALIAS); - expect(acc.realm).to.eq(idTokenClaims.tid); - expect(acc.username).to.eq("AbeLi@microsoft.com"); - expect(acc.localAccountId).to.eql(idTokenClaims.oid); - expect(acc.idTokenClaims).to.eq(idTokenClaims); + expect(acc.generateAccountKey()).toEqual(`${homeAccountId}-login.windows.net-${idTokenClaims.tid}`); + expect(acc.homeAccountId).toBe(homeAccountId); + expect(acc.environment).toBe(PREFERRED_CACHE_ALIAS); + expect(acc.realm).toBe(idTokenClaims.tid); + expect(acc.username).toBe("AbeLi@microsoft.com"); + expect(acc.localAccountId).toEqual(idTokenClaims.oid); + expect(acc.idTokenClaims).toBe(idTokenClaims); }); it("create an Account no preferred_username or emails claim", () => { @@ -279,13 +276,13 @@ describe("AccountEntity.ts Unit Tests", () => { idToken ); - expect(acc.generateAccountKey()).to.eql(`${homeAccountId}-login.windows.net-${idTokenClaims.tid}`); - expect(acc.homeAccountId).to.eq(homeAccountId); - expect(acc.environment).to.eq(PREFERRED_CACHE_ALIAS); - expect(acc.realm).to.eq(idTokenClaims.tid); - expect(acc.username).to.eq(""); - expect(acc.localAccountId).to.eql(idTokenClaims.oid); - expect(acc.idTokenClaims).to.eq(idTokenClaims); + expect(acc.generateAccountKey()).toEqual(`${homeAccountId}-login.windows.net-${idTokenClaims.tid}`); + expect(acc.homeAccountId).toBe(homeAccountId); + expect(acc.environment).toBe(PREFERRED_CACHE_ALIAS); + expect(acc.realm).toBe(idTokenClaims.tid); + expect(acc.username).toBe(""); + expect(acc.localAccountId).toEqual(idTokenClaims.oid); + expect(acc.idTokenClaims).toBe(idTokenClaims); }); it("creates a generic account", () => { @@ -323,23 +320,23 @@ describe("AccountEntity.ts Unit Tests", () => { idToken ); - expect(acc.generateAccountKey()).to.eql(`${idTokenClaims.sub.toLowerCase()}-login.windows.net-`); - expect(acc.homeAccountId).to.eq(homeAccountId); - expect(acc.environment).to.eq(PREFERRED_CACHE_ALIAS); - expect(acc.realm).to.eq(""); // Realm empty for generic accounts - expect(acc.username).to.eq("testupn"); - expect(acc.localAccountId).to.eq(idTokenClaims.oid); - expect(acc.authorityType).to.eq(CacheAccountType.GENERIC_ACCOUNT_TYPE); - expect(AccountEntity.isAccountEntity(acc)).to.eql(true); - expect(acc.idTokenClaims).to.eq(idTokenClaims); + expect(acc.generateAccountKey()).toEqual(`${idTokenClaims.sub.toLowerCase()}-login.windows.net-`); + expect(acc.homeAccountId).toBe(homeAccountId); + expect(acc.environment).toBe(PREFERRED_CACHE_ALIAS); + expect(acc.realm).toBe(""); // Realm empty for generic accounts + expect(acc.username).toBe("testupn"); + expect(acc.localAccountId).toBe(idTokenClaims.oid); + expect(acc.authorityType).toBe(CacheAccountType.GENERIC_ACCOUNT_TYPE); + expect(AccountEntity.isAccountEntity(acc)).toEqual(true); + expect(acc.idTokenClaims).toBe(idTokenClaims); }); it("verify if an object is an account entity", () => { - expect(AccountEntity.isAccountEntity(mockAccountEntity)).to.eql(true); + expect(AccountEntity.isAccountEntity(mockAccountEntity)).toEqual(true); }); it("verify if an object is not an account entity", () => { - expect(AccountEntity.isAccountEntity(mockIdTokenEntity)).to.eql(false); + expect(AccountEntity.isAccountEntity(mockIdTokenEntity)).toEqual(false); }); describe("accountInfoIsEqual()", () => { @@ -380,8 +377,8 @@ describe("AccountEntity.ts Unit Tests", () => { it("returns true if two account info objects have the same values", () => { const acc1: AccountInfo = acc.getAccountInfo(); const acc2: AccountInfo = {...acc1}; - expect(AccountEntity.accountInfoIsEqual(acc1, acc2, false)).to.be.true; - expect(AccountEntity.accountInfoIsEqual(acc1, acc2, true)).to.be.true; + expect(AccountEntity.accountInfoIsEqual(acc1, acc2, false)).toBe(true); + expect(AccountEntity.accountInfoIsEqual(acc1, acc2, true)).toBe(true); }); it("returns false if two account info objects represent the same user but have different iat claims", () => { @@ -425,12 +422,12 @@ describe("AccountEntity.ts Unit Tests", () => { }; // iat claims are different - expect(AccountEntity.accountInfoIsEqual(acc1, acc2, false)).to.be.true; - expect(AccountEntity.accountInfoIsEqual(acc1, acc2, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc2, false)).toBe(true); + expect(AccountEntity.accountInfoIsEqual(acc1, acc2, true)).toBe(false); // iat claim is missing on 1 account - expect(AccountEntity.accountInfoIsEqual(acc1, acc3, false)).to.be.true; - expect(AccountEntity.accountInfoIsEqual(acc1, acc3, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc3, false)).toBe(true); + expect(AccountEntity.accountInfoIsEqual(acc1, acc3, true)).toBe(false); }); it("returns false if two account info objects represent the same user but have different nonce claims", () => { @@ -474,12 +471,12 @@ describe("AccountEntity.ts Unit Tests", () => { }; // nonce claims are different - expect(AccountEntity.accountInfoIsEqual(acc1, acc2, false)).to.be.true; - expect(AccountEntity.accountInfoIsEqual(acc1, acc2, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc2, false)).toBe(true); + expect(AccountEntity.accountInfoIsEqual(acc1, acc2, true)).toBe(false); // nonce claim is missing on 1 account - expect(AccountEntity.accountInfoIsEqual(acc1, acc3, false)).to.be.true; - expect(AccountEntity.accountInfoIsEqual(acc1, acc3, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc3, false)).toBe(true); + expect(AccountEntity.accountInfoIsEqual(acc1, acc3, true)).toBe(false); }); it("returns false if required AccountInfo parameters are not equal", () => { @@ -492,40 +489,40 @@ describe("AccountEntity.ts Unit Tests", () => { const acc7: AccountInfo = {...acc1}; const acc8: AccountInfo = {...acc1}; acc2.homeAccountId = "mockHomeAccountId2"; - expect(AccountEntity.accountInfoIsEqual(acc1, acc2, false)).to.be.false; - expect(AccountEntity.accountInfoIsEqual(acc1, acc2, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc2, false)).toBe(false); + expect(AccountEntity.accountInfoIsEqual(acc1, acc2, true)).toBe(false); acc3.localAccountId = "mockLocalAccountId2"; - expect(AccountEntity.accountInfoIsEqual(acc1, acc3, false)).to.be.false; - expect(AccountEntity.accountInfoIsEqual(acc1, acc3, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc3, false)).toBe(false); + expect(AccountEntity.accountInfoIsEqual(acc1, acc3, true)).toBe(false); acc4.environment = "mockEnv2"; - expect(AccountEntity.accountInfoIsEqual(acc1, acc4, false)).to.be.false; - expect(AccountEntity.accountInfoIsEqual(acc1, acc4, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc4, false)).toBe(false); + expect(AccountEntity.accountInfoIsEqual(acc1, acc4, true)).toBe(false); acc5.tenantId = "mockTenant2"; - expect(AccountEntity.accountInfoIsEqual(acc1, acc5, false)).to.be.false; - expect(AccountEntity.accountInfoIsEqual(acc1, acc5, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc5, false)).toBe(false); + expect(AccountEntity.accountInfoIsEqual(acc1, acc5, true)).toBe(false); acc6.username = "mockUsername2"; - expect(AccountEntity.accountInfoIsEqual(acc1, acc6, false)).to.be.false; - expect(AccountEntity.accountInfoIsEqual(acc1, acc6, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc6, false)).toBe(false); + expect(AccountEntity.accountInfoIsEqual(acc1, acc6, true)).toBe(false); acc7.name = "mockName2"; - expect(AccountEntity.accountInfoIsEqual(acc1, acc7, false)).to.be.true; - expect(AccountEntity.accountInfoIsEqual(acc1, acc7, true)).to.be.true; + expect(AccountEntity.accountInfoIsEqual(acc1, acc7, false)).toBe(true); + expect(AccountEntity.accountInfoIsEqual(acc1, acc7, true)).toBe(true); acc8.idTokenClaims = {}; - expect(AccountEntity.accountInfoIsEqual(acc1, acc8, false)).to.be.true; - expect(AccountEntity.accountInfoIsEqual(acc1, acc8, true)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc8, false)).toBe(true); + expect(AccountEntity.accountInfoIsEqual(acc1, acc8, true)).toBe(false); }); it("returns false if an account info object is invalid", () => { const acc1 = null; const acc2: AccountInfo = acc.getAccountInfo(); - expect(AccountEntity.accountInfoIsEqual(acc1, acc2)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc1, acc2)).toBe(false); const acc3: AccountInfo = acc.getAccountInfo(); const acc4 = null; - expect(AccountEntity.accountInfoIsEqual(acc3, acc4)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc3, acc4)).toBe(false); const acc5 = null; const acc6 = null; - expect(AccountEntity.accountInfoIsEqual(acc5, acc6)).to.be.false; + expect(AccountEntity.accountInfoIsEqual(acc5, acc6)).toBe(false); }); }); }); @@ -575,15 +572,15 @@ describe("AccountEntity.ts Unit Tests for ADFS", () => { idToken ); - expect(acc.generateAccountKey()).to.eql(`${idTokenClaims.sub.toLowerCase()}-myadfs.com-`); - expect(acc.homeAccountId).to.eq(homeAccountId); - expect(acc.environment).to.eq("myadfs.com"); - expect(acc.realm).to.eq(""); - expect(acc.username).to.eq("testupn"); - expect(acc.localAccountId).to.eq(idTokenClaims.oid); - expect(acc.authorityType).to.eq(CacheAccountType.ADFS_ACCOUNT_TYPE); - expect(AccountEntity.isAccountEntity(acc)).to.eql(true); - expect(acc.idTokenClaims).to.eq(idTokenClaims); + expect(acc.generateAccountKey()).toEqual(`${idTokenClaims.sub.toLowerCase()}-myadfs.com-`); + expect(acc.homeAccountId).toBe(homeAccountId); + expect(acc.environment).toBe("myadfs.com"); + expect(acc.realm).toBe(""); + expect(acc.username).toBe("testupn"); + expect(acc.localAccountId).toBe(idTokenClaims.oid); + expect(acc.authorityType).toBe(CacheAccountType.ADFS_ACCOUNT_TYPE); + expect(AccountEntity.isAccountEntity(acc)).toEqual(true); + expect(acc.idTokenClaims).toBe(idTokenClaims); }); it("creates a generic ADFS account without OID", () => { @@ -621,14 +618,14 @@ describe("AccountEntity.ts Unit Tests for ADFS", () => { idToken ); - expect(acc.generateAccountKey()).to.eql(`${idTokenClaims.sub.toLowerCase()}-myadfs.com-`); - expect(acc.homeAccountId).to.eq(homeAccountId); - expect(acc.environment).to.eq("myadfs.com"); - expect(acc.realm).to.eq(""); - expect(acc.username).to.eq("testupn"); - expect(acc.authorityType).to.eq(CacheAccountType.ADFS_ACCOUNT_TYPE); - expect(acc.localAccountId).to.eq(idTokenClaims.sub); - expect(AccountEntity.isAccountEntity(acc)).to.eql(true); - expect(acc.idTokenClaims).to.eq(idTokenClaims); + expect(acc.generateAccountKey()).toEqual(`${idTokenClaims.sub.toLowerCase()}-myadfs.com-`); + expect(acc.homeAccountId).toBe(homeAccountId); + expect(acc.environment).toBe("myadfs.com"); + expect(acc.realm).toBe(""); + expect(acc.username).toBe("testupn"); + expect(acc.authorityType).toBe(CacheAccountType.ADFS_ACCOUNT_TYPE); + expect(acc.localAccountId).toBe(idTokenClaims.sub); + expect(AccountEntity.isAccountEntity(acc)).toEqual(true); + expect(acc.idTokenClaims).toBe(idTokenClaims); }); }); diff --git a/lib/msal-common/test/cache/entities/AppMetadataEntity.spec.ts b/lib/msal-common/test/cache/entities/AppMetadataEntity.spec.ts index a363c72cce..5eabcb7150 100644 --- a/lib/msal-common/test/cache/entities/AppMetadataEntity.spec.ts +++ b/lib/msal-common/test/cache/entities/AppMetadataEntity.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { AppMetadataEntity } from "../../../src/cache/entities/AppMetadataEntity"; import { mockAppMetaDataEntity, mockIdTokenEntity } from "./cacheConstants"; import { IdTokenEntity } from "../../../src"; @@ -12,22 +11,20 @@ describe("AppMetadataEntity.ts Unit Tests", () => { it("Create an AppMetadataEntity", () => { const appM = new AppMetadataEntity(); Object.assign(appM, mockAppMetaDataEntity); - expect(appM.generateAppMetadataKey()).to.eql( - "appmetadata-login.microsoftonline.com-mock_client_id" - ); + expect(appM.generateAppMetadataKey()).toEqual("appmetadata-login.microsoftonline.com-mock_client_id"); }); it("verify if an object is an appMetadata entity", () => { const appM = new AppMetadataEntity(); Object.assign(appM, mockAppMetaDataEntity); const key = appM.generateAppMetadataKey(); - expect(AppMetadataEntity.isAppMetadataEntity(key, mockAppMetaDataEntity)).to.eql(true); + expect(AppMetadataEntity.isAppMetadataEntity(key, mockAppMetaDataEntity)).toEqual(true); }); it("verify if an object is not an appMetadata entity", () => { const idT = new IdTokenEntity(); Object.assign(idT, mockIdTokenEntity); const key = idT.generateCredentialKey(); - expect(AppMetadataEntity.isAppMetadataEntity(key, mockIdTokenEntity)).to.eql(false); + expect(AppMetadataEntity.isAppMetadataEntity(key, mockIdTokenEntity)).toEqual(false); }); }); diff --git a/lib/msal-common/test/cache/entities/AuthorityMetadataEntity.spec.ts b/lib/msal-common/test/cache/entities/AuthorityMetadataEntity.spec.ts index d3a82f17da..3623ba3782 100644 --- a/lib/msal-common/test/cache/entities/AuthorityMetadataEntity.spec.ts +++ b/lib/msal-common/test/cache/entities/AuthorityMetadataEntity.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { Constants, TimeUtils } from "../../../src"; import { AuthorityMetadataEntity } from "../../../src/cache/entities/AuthorityMetadataEntity"; import { DEFAULT_OPENID_CONFIG_RESPONSE, TEST_CONFIG } from "../../test_kit/StringConstants"; @@ -20,19 +19,20 @@ describe("AuthorityMetadataEntity.ts Unit Tests", () => { }; it("Verify if an object is a AuthorityMetadataEntity", () => { - expect(AuthorityMetadataEntity.isAuthorityMetadataEntity(key, testObj)).to.be.true; + expect(AuthorityMetadataEntity.isAuthorityMetadataEntity(key, testObj)).toBe(true); }); it("Verify an object is not a AuthorityMetadataEntity", () => { - expect(AuthorityMetadataEntity.isAuthorityMetadataEntity(key, null)).to.be.false; - expect(AuthorityMetadataEntity.isAuthorityMetadataEntity(key, {})).to.be.false; - expect(AuthorityMetadataEntity.isAuthorityMetadataEntity("not-a-real-key", testObj)).to.be.false; + // @ts-ignore + expect(AuthorityMetadataEntity.isAuthorityMetadataEntity(key, null)).toBe(false); + expect(AuthorityMetadataEntity.isAuthorityMetadataEntity(key, {})).toBe(false); + expect(AuthorityMetadataEntity.isAuthorityMetadataEntity("not-a-real-key", testObj)).toBe(false); Object.keys(testObj).forEach((key) => { const incompleteTestObject = {...testObj}; delete incompleteTestObject[key]; - expect(AuthorityMetadataEntity.isAuthorityMetadataEntity(key, incompleteTestObject)).to.be.false; + expect(AuthorityMetadataEntity.isAuthorityMetadataEntity(key, incompleteTestObject)).toBe(false); }); }); }); diff --git a/lib/msal-common/test/cache/entities/IdTokenEntity.spec.ts b/lib/msal-common/test/cache/entities/IdTokenEntity.spec.ts index 9ff472b1eb..55b5d9d61a 100644 --- a/lib/msal-common/test/cache/entities/IdTokenEntity.spec.ts +++ b/lib/msal-common/test/cache/entities/IdTokenEntity.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { IdTokenEntity } from "../../../src/cache/entities/IdTokenEntity"; import { mockIdTokenEntity, mockAccessTokenEntity_1 } from "./cacheConstants"; import { ClientAuthError, ClientAuthErrorMessage } from "../../../src"; @@ -13,28 +12,26 @@ describe("IdTokenEntity.ts Unit Tests", () => { it("Create an IdTokenEntity", () => { const idT = new IdTokenEntity(); Object.assign(idT, mockIdTokenEntity); - expect(idT.generateCredentialKey()).to.eql( - "uid.utid-login.microsoftonline.com-idtoken-mock_client_id-microsoft-" - ); + expect(idT.generateCredentialKey()).toEqual("uid.utid-login.microsoftonline.com-idtoken-mock_client_id-microsoft-"); }); it("Throws error if IdTokenEntity is not assigned a type", () => { const idT = new IdTokenEntity(); - expect(() => idT.generateType()).to.throw(ClientAuthError); - expect(() => idT.generateType()).to.throw(ClientAuthErrorMessage.unexpectedCredentialType.desc); + expect(() => idT.generateType()).toThrowError(ClientAuthError); + expect(() => idT.generateType()).toThrowError(ClientAuthErrorMessage.unexpectedCredentialType.desc); }); it("Generate IdTokenEntity type", () => { const idT = new IdTokenEntity(); Object.assign(idT, mockIdTokenEntity); - expect(idT.generateType()).to.eql(CacheType.ID_TOKEN); + expect(idT.generateType()).toEqual(CacheType.ID_TOKEN); }); it("verify if an object is an id token entity", () => { - expect(IdTokenEntity.isIdTokenEntity(mockIdTokenEntity)).to.eql(true); + expect(IdTokenEntity.isIdTokenEntity(mockIdTokenEntity)).toEqual(true); }); it("verify if an object is not an id token entity", () => { - expect(IdTokenEntity.isIdTokenEntity(mockAccessTokenEntity_1)).to.eql(false); + expect(IdTokenEntity.isIdTokenEntity(mockAccessTokenEntity_1)).toEqual(false); }); }); diff --git a/lib/msal-common/test/cache/entities/RefreshTokenEntity.spec.ts b/lib/msal-common/test/cache/entities/RefreshTokenEntity.spec.ts index 1b277dba28..aed3b879b8 100644 --- a/lib/msal-common/test/cache/entities/RefreshTokenEntity.spec.ts +++ b/lib/msal-common/test/cache/entities/RefreshTokenEntity.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { RefreshTokenEntity } from "../../../src/cache/entities/RefreshTokenEntity"; import { mockRefreshTokenEntity, mockRefreshTokenEntityWithFamilyId, mockAppMetaDataEntity } from "./cacheConstants"; import { ClientAuthError, ClientAuthErrorMessage } from "../../../src"; @@ -13,37 +12,33 @@ describe("RefreshTokenEntity.ts Unit Tests", () => { it("Create a RefreshTokenEntity", () => { const rt = new RefreshTokenEntity(); Object.assign(rt, mockRefreshTokenEntity); - expect(rt.generateCredentialKey()).to.eql( - "uid.utid-login.microsoftonline.com-refreshtoken-mock_client_id--" - ); + expect(rt.generateCredentialKey()).toEqual("uid.utid-login.microsoftonline.com-refreshtoken-mock_client_id--"); }); it("Create a RefreshTokenEntity with familyId", () => { const rt = new RefreshTokenEntity(); Object.assign(rt, mockRefreshTokenEntityWithFamilyId); - expect(rt.generateCredentialKey()).to.eql( - "uid.utid-login.microsoftonline.com-refreshtoken-1--" - ); + expect(rt.generateCredentialKey()).toEqual("uid.utid-login.microsoftonline.com-refreshtoken-1--"); }); it("Throws error if RefreshTokenEntity is not assigned a type", () => { const rt = new RefreshTokenEntity(); - expect(() => rt.generateType()).to.throw(ClientAuthError); - expect(() => rt.generateType()).to.throw(ClientAuthErrorMessage.unexpectedCredentialType.desc); + expect(() => rt.generateType()).toThrowError(ClientAuthError); + expect(() => rt.generateType()).toThrowError(ClientAuthErrorMessage.unexpectedCredentialType.desc); }); it("Generate RefreshTokenEntity type", () => { const rt = new RefreshTokenEntity(); Object.assign(rt, mockRefreshTokenEntity); - expect(rt.generateType()).to.eql(CacheType.REFRESH_TOKEN); + expect(rt.generateType()).toEqual(CacheType.REFRESH_TOKEN); }); it("verify if an object is a refresh token entity", () => { - expect(RefreshTokenEntity.isRefreshTokenEntity(mockRefreshTokenEntity)).to.eql(true); - expect(RefreshTokenEntity.isRefreshTokenEntity(mockRefreshTokenEntityWithFamilyId)).to.eql(true); + expect(RefreshTokenEntity.isRefreshTokenEntity(mockRefreshTokenEntity)).toEqual(true); + expect(RefreshTokenEntity.isRefreshTokenEntity(mockRefreshTokenEntityWithFamilyId)).toEqual(true); }); it("verify if an object is not a refresh token entity", () => { - expect(RefreshTokenEntity.isRefreshTokenEntity(mockAppMetaDataEntity)).to.eql(false); + expect(RefreshTokenEntity.isRefreshTokenEntity(mockAppMetaDataEntity)).toEqual(false); }); }); diff --git a/lib/msal-common/test/cache/entities/ServerTelemetryEntity.spec.ts b/lib/msal-common/test/cache/entities/ServerTelemetryEntity.spec.ts index 2a206636e1..87756a2b01 100644 --- a/lib/msal-common/test/cache/entities/ServerTelemetryEntity.spec.ts +++ b/lib/msal-common/test/cache/entities/ServerTelemetryEntity.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { ServerTelemetryEntity } from "../../../src/cache/entities/ServerTelemetryEntity"; import { SERVER_TELEM_CONSTANTS, Separators } from "../../../src/utils/Constants"; import { TEST_CONFIG } from "../../test_kit/StringConstants"; @@ -15,7 +14,7 @@ describe("ServerTelemetryEntity.ts Unit Tests", () => { cacheHits: 0 }; - expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, serverTelemetryObject)).to.be.true; + expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, serverTelemetryObject)).toBe(true); }); it("Verify an object is not a ServerTelemetry Entity", () => { @@ -26,37 +25,37 @@ describe("ServerTelemetryEntity.ts Unit Tests", () => { errorCount: 1 }; - expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, missingCacheHits)).to.be.false; + expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, missingCacheHits)).toBe(false); const missingErrors = { failedRequests: [999, "correlationId"], errorCount: 1, cacheHits: 0 }; - expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, missingErrors)).to.be.false; + expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, missingErrors)).toBe(false); const missingFailedRequests = { errors: ["testError"], errorCount: 1, cacheHits: 0 }; - expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, missingFailedRequests)).to.be.false; + expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, missingFailedRequests)).toBe(false); const noCommonValues = { testParam: "test" }; - expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, noCommonValues)).to.be.false; + expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey, noCommonValues)).toBe(false); }); it("Verify an object is a ServerTelemetry Entity only when cache key is passed", () => { - expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey)).to.be.true; + expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey)).toBe(true); }); it("Verify an object is not a ServerTelemetry Entity only when cache key is passed", () => { const ServerTelemetryKey = Separators.CACHE_KEY_SEPARATOR + SERVER_TELEM_CONSTANTS.CACHE_KEY + TEST_CONFIG.MSAL_CLIENT_ID; - expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey)).to.be.false; + expect(ServerTelemetryEntity.isServerTelemetryEntity(ServerTelemetryKey)).toBe(false); }); }); diff --git a/lib/msal-common/test/cache/entities/ThrottlingEntity.spec.ts b/lib/msal-common/test/cache/entities/ThrottlingEntity.spec.ts index 732b8cd8cd..0727faf663 100644 --- a/lib/msal-common/test/cache/entities/ThrottlingEntity.spec.ts +++ b/lib/msal-common/test/cache/entities/ThrottlingEntity.spec.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. */ -import "mocha"; -import { expect } from "chai"; import { ThrottlingEntity } from "../../../src/cache/entities/ThrottlingEntity"; import { ThrottlingConstants, Separators } from "../../../src/utils/Constants"; import { TEST_CONFIG } from "../../test_kit/StringConstants"; @@ -17,29 +15,31 @@ describe("ThrottlingEntity", () => { const throttlingObject = { throttleTime: 0 }; - expect(ThrottlingEntity.isThrottlingEntity(key, throttlingObject)).to.be.true; + expect(ThrottlingEntity.isThrottlingEntity(key, throttlingObject)).toBe(true); }); it("Verifies if an object is a ThrottlingEntity when no object is given", () => { - expect(ThrottlingEntity.isThrottlingEntity(key)).to.be.true; - expect(ThrottlingEntity.isThrottlingEntity(key, null)).to.be.true; + expect(ThrottlingEntity.isThrottlingEntity(key)).toBe(true); + // @ts-ignore + expect(ThrottlingEntity.isThrottlingEntity(key, null)).toBe(true); }); it("Verifies if an object is not a ThrottlingEntity based on field", () => { const throttlingObject = { test: 0 }; - expect(ThrottlingEntity.isThrottlingEntity(key, throttlingObject)).to.be.false; + expect(ThrottlingEntity.isThrottlingEntity(key, throttlingObject)).toBe(false); }); it("Verifies if an object is not a ThrottlingEntity based on key", () => { const throttlingObject = { throttleTime: 0 }; - expect(ThrottlingEntity.isThrottlingEntity("asd", throttlingObject)).to.be.false; - expect(ThrottlingEntity.isThrottlingEntity("", throttlingObject)).to.be.false; - expect(ThrottlingEntity.isThrottlingEntity(null, throttlingObject)).to.be.false; + expect(ThrottlingEntity.isThrottlingEntity("asd", throttlingObject)).toBe(false); + expect(ThrottlingEntity.isThrottlingEntity("", throttlingObject)).toBe(false); + // @ts-ignore + expect(ThrottlingEntity.isThrottlingEntity(null, throttlingObject)).toBe(false); }); }); }); diff --git a/lib/msal-common/test/client/AuthorizationCodeClient.spec.ts b/lib/msal-common/test/client/AuthorizationCodeClient.spec.ts index bf99cc6b56..726603a759 100644 --- a/lib/msal-common/test/client/AuthorizationCodeClient.spec.ts +++ b/lib/msal-common/test/client/AuthorizationCodeClient.spec.ts @@ -1,16 +1,10 @@ -import * as Mocha from "mocha"; -import * as chai from "chai"; import sinon from "sinon"; -import chaiAsPromised from "chai-as-promised"; -const expect = chai.expect; -chai.use(chaiAsPromised); import { Authority, AuthorizationCodeClient, CommonAuthorizationCodeRequest, CommonAuthorizationUrlRequest, Constants, - ClientAuthErrorMessage, ServerError, IdToken, CacheManager, @@ -19,7 +13,8 @@ import { AuthToken, ICrypto, TokenClaims, - SignedHttpRequest + SignedHttpRequest, + ClientAuthError } from "../../src"; import { ALTERNATE_OPENID_CONFIG_RESPONSE, @@ -40,7 +35,6 @@ import { ClientConfiguration } from "../../src/config/ClientConfiguration"; import { BaseClient } from "../../src/client/BaseClient"; import { AADServerParamKeys, PromptValue, ResponseMode, SSOTypes, AuthenticationScheme, ThrottlingConstants } from "../../src/utils/Constants"; import { ClientTestUtils, MockStorageClass } from "./ClientTestUtils"; -import { version } from "../../src/packageMetadata"; import { TestError } from "../test_kit/TestErrors"; describe("AuthorizationCodeClient unit tests", () => { @@ -54,9 +48,9 @@ describe("AuthorizationCodeClient unit tests", () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config: ClientConfiguration = await ClientTestUtils.createTestClientConfiguration(); const client = new AuthorizationCodeClient(config); - expect(client).to.be.not.null; - expect(client instanceof AuthorizationCodeClient).to.be.true; - expect(client instanceof BaseClient).to.be.true; + expect(client).not.toBeNull(); + expect(client instanceof AuthorizationCodeClient).toBe(true); + expect(client instanceof BaseClient).toBe(true); }); }); @@ -78,15 +72,15 @@ describe("AuthorizationCodeClient unit tests", () => { authenticationScheme: AuthenticationScheme.BEARER }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.contain(Constants.DEFAULT_AUTHORITY); - expect(loginUrl).to.contain(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common")); - expect(loginUrl).to.contain(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.RESPONSE_TYPE}=${Constants.CODE_RESPONSE_TYPE}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.RESPONSE_MODE}=${encodeURIComponent(ResponseMode.QUERY)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CODE_CHALLENGE}=${encodeURIComponent(TEST_CONFIG.TEST_CHALLENGE)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CODE_CHALLENGE_METHOD}=${encodeURIComponent(Constants.S256_CODE_CHALLENGE_METHOD)}`); + expect(loginUrl.includes(Constants.DEFAULT_AUTHORITY)).toBe(true); + expect(loginUrl.includes(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common"))).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.RESPONSE_TYPE}=${Constants.CODE_RESPONSE_TYPE}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.RESPONSE_MODE}=${encodeURIComponent(ResponseMode.QUERY)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CODE_CHALLENGE}=${encodeURIComponent(TEST_CONFIG.TEST_CHALLENGE)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CODE_CHALLENGE_METHOD}=${encodeURIComponent(Constants.S256_CODE_CHALLENGE_METHOD)}`)).toBe(true); }); it("Creates an authorization url passing in optional parameters", async () => { @@ -113,21 +107,21 @@ describe("AuthorizationCodeClient unit tests", () => { authenticationScheme: AuthenticationScheme.BEARER }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.contain(TEST_CONFIG.validAuthority); - expect(loginUrl).to.contain(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common")); - expect(loginUrl).to.contain(`${AADServerParamKeys.SCOPE}=${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.RESPONSE_TYPE}=${Constants.CODE_RESPONSE_TYPE}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.RESPONSE_MODE}=${encodeURIComponent(ResponseMode.FORM_POST)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.STATE}=${encodeURIComponent(TEST_CONFIG.STATE)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.PROMPT}=${PromptValue.LOGIN}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.NONCE}=${encodeURIComponent(TEST_CONFIG.NONCE)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CODE_CHALLENGE}=${encodeURIComponent(TEST_CONFIG.TEST_CHALLENGE)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CODE_CHALLENGE_METHOD}=${encodeURIComponent(TEST_CONFIG.CODE_CHALLENGE_METHOD)}`); - expect(loginUrl).to.contain(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`); - expect(loginUrl).to.contain(`${SSOTypes.DOMAIN_HINT}=${encodeURIComponent(TEST_CONFIG.DOMAIN_HINT)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); + expect(loginUrl.includes(TEST_CONFIG.validAuthority)).toBe(true); + expect(loginUrl.includes(DEFAULT_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common"))).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.SCOPE}=${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.RESPONSE_TYPE}=${Constants.CODE_RESPONSE_TYPE}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.RESPONSE_MODE}=${encodeURIComponent(ResponseMode.FORM_POST)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.STATE}=${encodeURIComponent(TEST_CONFIG.STATE)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.PROMPT}=${PromptValue.LOGIN}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.NONCE}=${encodeURIComponent(TEST_CONFIG.NONCE)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CODE_CHALLENGE}=${encodeURIComponent(TEST_CONFIG.TEST_CHALLENGE)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CODE_CHALLENGE_METHOD}=${encodeURIComponent(TEST_CONFIG.CODE_CHALLENGE_METHOD)}`)).toBe(true); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`)).toBe(true); + expect(loginUrl.includes(`${SSOTypes.DOMAIN_HINT}=${encodeURIComponent(TEST_CONFIG.DOMAIN_HINT)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(true); }); it("Prefers sid over loginHint if both provided and prompt=None", async () => { @@ -149,8 +143,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.not.contain(`${SSOTypes.LOGIN_HINT}=`); - expect(loginUrl).to.contain(`${SSOTypes.SID}=${encodeURIComponent(TEST_CONFIG.SID)}`); + expect(loginUrl).toEqual(expect.not.arrayContaining([`${SSOTypes.LOGIN_HINT}=`])); + expect(loginUrl.includes(`${SSOTypes.SID}=${encodeURIComponent(TEST_CONFIG.SID)}`)).toBe(true); }); it("Prefers loginHint over sid if both provided and prompt!=None", async () => { @@ -172,8 +166,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.contain(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`); - expect(loginUrl).to.not.contain(`${SSOTypes.SID}=`); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`)).toBe(true); + expect(loginUrl.includes(`${SSOTypes.SID}=`)).toBe(false); }); it("Ignores sid if prompt!=None", async () => { @@ -194,8 +188,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.not.contain(`${SSOTypes.LOGIN_HINT}=`); - expect(loginUrl).to.not.contain(`${SSOTypes.SID}=`); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=`)).toBe(false); + expect(loginUrl.includes(`${SSOTypes.SID}=`)).toBe(false); }); it("Prefers loginHint over Account if both provided and account does not have token claims", async () => { @@ -216,9 +210,9 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.contain(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`); - expect(loginUrl).to.not.contain(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_ACCOUNT_INFO.username)}`); - expect(loginUrl).to.not.contain(`${SSOTypes.SID}=`); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`)).toBe(true); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_ACCOUNT_INFO.username)}`)).toBe(false); + expect(loginUrl.includes(`${SSOTypes.SID}=`)).toBe(false); }); it("Uses sid from account if not provided in request and prompt=None, overrides login_hint", async () => { @@ -228,17 +222,18 @@ describe("AuthorizationCodeClient unit tests", () => { const config: ClientConfiguration = await ClientTestUtils.createTestClientConfiguration(); const client = new AuthorizationCodeClient(config); const testAccount = TEST_ACCOUNT_INFO; - const testTokenClaims: Required> = { - "ver": "2.0", - "iss": `${TEST_URIS.DEFAULT_INSTANCE}9188040d-6c67-4c5b-b112-36a304b66dad/v2.0`, - "sub": "AAAAAAAAAAAAAAAAAAAAAIkzqFVrSaSaFHy782bbtaQ", - "exp": 1536361411, - "name": "Abe Lincoln", - "preferred_username": "AbeLi@microsoft.com", - "oid": "00000000-0000-0000-66f3-3332eca7ea81", - "tid": "3338040d-6c67-4c5b-b112-36a304b66dad", - "nonce": "123523", - "sid": "testSid" + // @ts-ignore + const testTokenClaims: Required> = { + ver: "2.0", + iss: `${TEST_URIS.DEFAULT_INSTANCE}9188040d-6c67-4c5b-b112-36a304b66dad/v2.0`, + sub: "AAAAAAAAAAAAAAAAAAAAAIkzqFVrSaSaFHy782bbtaQ", + exp: 1536361411, + name: "Abe Lincoln", + preferred_username: "AbeLi@microsoft.com", + oid: "00000000-0000-0000-66f3-3332eca7ea81", + tid: "3338040d-6c67-4c5b-b112-36a304b66dad", + nonce: "123523", + sid: "testSid" }; testAccount.idTokenClaims = testTokenClaims; @@ -254,8 +249,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.contain(`${SSOTypes.SID}=${encodeURIComponent(testTokenClaims.sid)}`); - expect(loginUrl).to.not.contain(`${SSOTypes.LOGIN_HINT}=`); + expect(loginUrl.includes(`${SSOTypes.SID}=${encodeURIComponent(testTokenClaims.sid)}`)).toBe(true); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=`)).toBe(false); }); it("Uses loginHint instead of sid from account prompt!=None", async () => { @@ -291,8 +286,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.not.contain(`${SSOTypes.SID}=`); - expect(loginUrl).to.contain(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`); + expect(loginUrl.includes(`${SSOTypes.SID}=`)).toBe(false); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`)).toBe(true); }); it("Uses login_hint instead of username if sid is not present in token claims for account or request", async () => { @@ -326,8 +321,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.contain(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`); - expect(loginUrl).to.not.contain(`${SSOTypes.SID}=`); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`)).toBe(true); + expect(loginUrl.includes(`${SSOTypes.SID}=`)).toBe(false); }); it("Sets login_hint to Account.username if login_hint and sid are not provided", async () => { @@ -347,8 +342,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.contain(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_ACCOUNT_INFO.username)}`); - expect(loginUrl).to.not.contain(`${SSOTypes.SID}=`); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_ACCOUNT_INFO.username)}`)).toBe(true); + expect(loginUrl.includes(`${SSOTypes.SID}=`)).toBe(false); }); it("Ignores Account if prompt is select_account", async () => { @@ -369,8 +364,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.not.contain(`${SSOTypes.LOGIN_HINT}=`); - expect(loginUrl).to.not.contain(`${SSOTypes.SID}=`); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=`)).toBe(false); + expect(loginUrl.includes(`${SSOTypes.SID}=`)).toBe(false); }); it("Ignores loginHint if prompt is select_account", async () => { @@ -391,8 +386,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.not.contain(`${SSOTypes.LOGIN_HINT}=`); - expect(loginUrl).to.not.contain(`${SSOTypes.SID}=`); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=`)).toBe(false); + expect(loginUrl.includes(`${SSOTypes.SID}=`)).toBe(false); }); it("Ignores sid if prompt is select_account", async () => { @@ -413,8 +408,8 @@ describe("AuthorizationCodeClient unit tests", () => { responseMode: ResponseMode.FRAGMENT }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl).to.not.contain(`${SSOTypes.LOGIN_HINT}=`); - expect(loginUrl).to.not.contain(`${SSOTypes.SID}=`); + expect(loginUrl.includes(`${SSOTypes.LOGIN_HINT}=`)).toBe(false); + expect(loginUrl.includes(`${SSOTypes.SID}=`)).toBe(false); }); it("Creates a login URL with scopes from given token request", async () => { @@ -438,7 +433,7 @@ describe("AuthorizationCodeClient unit tests", () => { }; const loginUrl = await client.getAuthCodeUrl(loginRequest); - expect(loginUrl).to.contain(`${AADServerParamKeys.SCOPE}=${encodeURIComponent(`${testScope1} ${testScope2}`)}`); + expect(loginUrl.includes(`${AADServerParamKeys.SCOPE}=${encodeURIComponent(`${testScope1} ${testScope2}`)}`)).toBe(true); }); it("Does not append an extra '?' when the authorization endpoint already contains a query string", async () => { @@ -465,16 +460,16 @@ describe("AuthorizationCodeClient unit tests", () => { authenticationScheme: AuthenticationScheme.BEARER }; const loginUrl = await client.getAuthCodeUrl(authCodeUrlRequest); - expect(loginUrl.split("?").length).to.equal(2); - expect(loginUrl).to.contain(`param1=value1`); - expect(loginUrl).to.contain(ALTERNATE_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common")); - expect(loginUrl).to.contain(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.RESPONSE_TYPE}=${Constants.CODE_RESPONSE_TYPE}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.RESPONSE_MODE}=${encodeURIComponent(ResponseMode.QUERY)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CODE_CHALLENGE}=${encodeURIComponent(TEST_CONFIG.TEST_CHALLENGE)}`); - expect(loginUrl).to.contain(`${AADServerParamKeys.CODE_CHALLENGE_METHOD}=${encodeURIComponent(Constants.S256_CODE_CHALLENGE_METHOD)}`); + expect(loginUrl.split("?").length).toEqual(2); + expect(loginUrl.includes(`param1=value1`)).toBe(true); + expect(loginUrl.includes(ALTERNATE_OPENID_CONFIG_RESPONSE.body.authorization_endpoint.replace("{tenant}", "common"))).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.RESPONSE_TYPE}=${Constants.CODE_RESPONSE_TYPE}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.RESPONSE_MODE}=${encodeURIComponent(ResponseMode.QUERY)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CODE_CHALLENGE}=${encodeURIComponent(TEST_CONFIG.TEST_CHALLENGE)}`)).toBe(true); + expect(loginUrl.includes(`${AADServerParamKeys.CODE_CHALLENGE_METHOD}=${encodeURIComponent(Constants.S256_CODE_CHALLENGE_METHOD)}`)).toBe(true); }); }); @@ -487,6 +482,7 @@ describe("AuthorizationCodeClient unit tests", () => { throw TestError.createTestSetupError("configuration crypto interface not initialized correctly."); } const testSuccessHash = `#code=thisIsATestCode&client_info=${TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO}&state=${encodeURIComponent(TEST_STATE_VALUES.ENCODED_LIB_STATE)}`; + //@ts-ignore config.cryptoInterface.base64Decode = (input: string): string => { switch (input) { case TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO: @@ -497,6 +493,7 @@ describe("AuthorizationCodeClient unit tests", () => { return input; } }; + // @ts-ignore config.cryptoInterface.base64Encode = (input: string): string => { switch (input) { case "123-test-uid": @@ -511,8 +508,8 @@ describe("AuthorizationCodeClient unit tests", () => { }; const client: AuthorizationCodeClient = new AuthorizationCodeClient(config); const authCodePayload = client.handleFragmentResponse(testSuccessHash, TEST_STATE_VALUES.ENCODED_LIB_STATE); - expect(authCodePayload.code).to.be.eq("thisIsATestCode"); - expect(authCodePayload.state).to.be.eq(TEST_STATE_VALUES.ENCODED_LIB_STATE); + expect(authCodePayload.code).toBe("thisIsATestCode"); + expect(authCodePayload.state).toBe(TEST_STATE_VALUES.ENCODED_LIB_STATE); }); it("returns valid server code response when state is encoded twice", async () => { @@ -522,6 +519,7 @@ describe("AuthorizationCodeClient unit tests", () => { throw TestError.createTestSetupError("configuration crypto interface not initialized correctly."); } const testSuccessHash = `#code=thisIsATestCode&client_info=${TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO}&state=${encodeURIComponent(encodeURIComponent(TEST_STATE_VALUES.ENCODED_LIB_STATE))}`; + // @ts-ignore config.cryptoInterface.base64Decode = (input: string): string => { switch (input) { case TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO: @@ -532,6 +530,7 @@ describe("AuthorizationCodeClient unit tests", () => { return input; } }; + // @ts-ignore config.cryptoInterface.base64Encode = (input: string): string => { switch (input) { case "123-test-uid": @@ -546,8 +545,8 @@ describe("AuthorizationCodeClient unit tests", () => { }; const client: AuthorizationCodeClient = new AuthorizationCodeClient(config); const authCodePayload = client.handleFragmentResponse(testSuccessHash, TEST_STATE_VALUES.ENCODED_LIB_STATE); - expect(authCodePayload.code).to.be.eq("thisIsATestCode"); - expect(authCodePayload.state).to.be.eq(TEST_STATE_VALUES.ENCODED_LIB_STATE); + expect(authCodePayload.code).toBe("thisIsATestCode"); + expect(authCodePayload.state).toBe(TEST_STATE_VALUES.ENCODED_LIB_STATE); }); it("throws server error when error is in hash", async () => { @@ -556,18 +555,31 @@ describe("AuthorizationCodeClient unit tests", () => { const config: ClientConfiguration = await ClientTestUtils.createTestClientConfiguration(); const client: AuthorizationCodeClient = new AuthorizationCodeClient(config); const cacheStorageMock = config.storageInterface as MockStorageClass; - expect(() => client.handleFragmentResponse(testErrorHash, TEST_STATE_VALUES.ENCODED_LIB_STATE)).to.throw("msal error description"); - expect(cacheStorageMock.getKeys().length).to.be.eq(1); - expect(cacheStorageMock.getAuthorityMetadataKeys().length).to.be.eq(1) + expect(() => client.handleFragmentResponse(testErrorHash, TEST_STATE_VALUES.ENCODED_LIB_STATE)).toThrowError("msal error description"); + expect(cacheStorageMock.getKeys().length).toBe(1); + expect(cacheStorageMock.getAuthorityMetadataKeys().length).toBe(1) - expect(() => client.handleFragmentResponse(testErrorHash, TEST_STATE_VALUES.ENCODED_LIB_STATE)).to.throw(ServerError); - expect(cacheStorageMock.getKeys().length).to.be.eq(1); - expect(cacheStorageMock.getAuthorityMetadataKeys().length).to.be.eq(1) + expect(() => client.handleFragmentResponse(testErrorHash, TEST_STATE_VALUES.ENCODED_LIB_STATE)).toThrowError(ServerError); + expect(cacheStorageMock.getKeys().length).toBe(1); + expect(cacheStorageMock.getAuthorityMetadataKeys().length).toBe(1) }); }); describe("Acquire a token", () => { + it("Throws error if null code request is passed", async () => { + sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); + const config: ClientConfiguration = await ClientTestUtils.createTestClientConfiguration(); + const client = new AuthorizationCodeClient(config); + + // @ts-ignore + await expect(client.acquireToken(null, null)).rejects.toMatchObject(ClientAuthError.createTokenRequestCannotBeMadeError()); + // @ts-ignore + expect(config.storageInterface.getKeys().length).toBe(1); + // @ts-ignore + expect(config.storageInterface.getAuthorityMetadataKeys().length).toBe(1); + }); + it("Throws error if code response does not contain authorization code", async () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config: ClientConfiguration = await ClientTestUtils.createTestClientConfiguration(); @@ -584,11 +596,12 @@ describe("AuthorizationCodeClient unit tests", () => { authenticationScheme: AuthenticationScheme.BEARER, authority: TEST_CONFIG.validAuthority }; - await expect(client.acquireToken(codeRequest, { - code: "" - })).to.be.rejectedWith(ClientAuthErrorMessage.tokenRequestCannotBeMade.desc); - expect(config.storageInterface.getKeys().length).to.be.eq(1); - expect(config.storageInterface.getAuthorityMetadataKeys().length).to.be.eq(1); + // @ts-ignore + await expect(client.acquireToken(codeRequest, null)).rejects.toMatchObject(ClientAuthError.createTokenRequestCannotBeMadeError()); + // @ts-ignore + expect(config.storageInterface.getKeys().length).toBe(1); + // @ts-ignore + expect(config.storageInterface.getAuthorityMetadataKeys().length).toBe(1); }); it("Does not add headers that do not qualify for a simple request", async () => { @@ -598,7 +611,7 @@ describe("AuthorizationCodeClient unit tests", () => { sinon.stub(AuthorizationCodeClient.prototype, "executePostToTokenEndpoint").callsFake((tokenEndpoint: string, queryString: string, headers: Record) => { const headerNames = Object.keys(headers); headerNames.forEach((name) => { - expect(CORS_SIMPLE_REQUEST_HEADERS).contains(name.toLowerCase()); + expect(CORS_SIMPLE_REQUEST_HEADERS).toEqual(expect.arrayContaining([name.toLowerCase()])); }); stubCalled = true; @@ -613,6 +626,7 @@ describe("AuthorizationCodeClient unit tests", () => { // Set up required objects and mocked return values const testState = `eyAiaWQiOiAidGVzdGlkIiwgInRzIjogMTU5Mjg0NjQ4MiB9${Constants.RESOURCE_DELIM}userState`; const decodedLibState = "{ \"id\": \"testid\", \"ts\": 1592846482 }"; + // @ts-ignore config.cryptoInterface.base64Decode = (input: string): string => { switch (input) { case TEST_POP_VALUES.ENCODED_REQ_CNF: @@ -626,6 +640,7 @@ describe("AuthorizationCodeClient unit tests", () => { } }; + // @ts-ignore config.cryptoInterface.base64Encode = (input: string): string => { switch (input) { case TEST_POP_VALUES.DECODED_REQ_CNF: @@ -671,7 +686,7 @@ describe("AuthorizationCodeClient unit tests", () => { state: testState }); - expect(stubCalled).to.be.true; + expect(stubCalled).toBe(true); }); it("Acquires a token successfully", async () => { @@ -687,6 +702,7 @@ describe("AuthorizationCodeClient unit tests", () => { // Set up required objects and mocked return values const testState = `eyAiaWQiOiAidGVzdGlkIiwgInRzIjogMTU5Mjg0NjQ4MiB9${Constants.RESOURCE_DELIM}userState`; const decodedLibState = "{ \"id\": \"testid\", \"ts\": 1592846482 }"; + // @ts-ignore config.cryptoInterface.base64Decode = (input: string): string => { switch (input) { case TEST_POP_VALUES.ENCODED_REQ_CNF: @@ -700,6 +716,7 @@ describe("AuthorizationCodeClient unit tests", () => { } }; + // @ts-ignore config.cryptoInterface.base64Encode = (input: string): string => { switch (input) { case TEST_POP_VALUES.DECODED_REQ_CNF: @@ -748,27 +765,38 @@ describe("AuthorizationCodeClient unit tests", () => { throw TestError.createTestSetupError("mockedAccountInfo does not have a value"); } - expect(authenticationResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT.body.access_token); - expect((Date.now() + (AUTHENTICATION_RESULT.body.expires_in * 1000)) >= authenticationResult.expiresOn.getMilliseconds()).to.be.true; - expect(createTokenRequestBodySpy.calledWith(authCodeRequest)).to.be.ok; - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.SCOPE}=${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CODE}=${TEST_TOKENS.AUTHORIZATION_CODE}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.GRANT_TYPE}=${Constants.CODE_GRANT_TYPE}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CODE_VERIFIER}=${TEST_CONFIG.TEST_VERIFIER}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); + expect(authenticationResult.accessToken).toEqual(AUTHENTICATION_RESULT.body.access_token); + // @ts-ignore + expect((Date.now() + (AUTHENTICATION_RESULT.body.expires_in * 1000)) >= authenticationResult.expiresOn.getMilliseconds()).toBe(true); + expect(createTokenRequestBodySpy.calledWith(authCodeRequest)).toBeTruthy(); + + const returnVal = await createTokenRequestBodySpy.returnValues[0] as string; + expect(returnVal.includes(`${AADServerParamKeys.SCOPE}=${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CODE}=${TEST_TOKENS.AUTHORIZATION_CODE}`) + ).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.GRANT_TYPE}=${Constants.CODE_GRANT_TYPE}`) + ).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CODE_VERIFIER}=${TEST_CONFIG.TEST_VERIFIER}`) + ).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`) + ).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`) + ).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`) + ).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`) + ).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`) + ).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); }); it("Adds tokenQueryParameters to the /token request", (done) => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); sinon.stub(AuthorizationCodeClient.prototype, "executePostToTokenEndpoint").callsFake((url) => { - expect(url).to.contain("/token?testParam=testValue") + expect(url.includes("/token?testParam=testValue")).toBe(true); done(); }); @@ -821,6 +849,7 @@ describe("AuthorizationCodeClient unit tests", () => { } }; + // @ts-ignore config.cryptoInterface.base64Encode = (input: string): string => { switch (input) { case TEST_POP_VALUES.DECODED_REQ_CNF: @@ -836,8 +865,9 @@ describe("AuthorizationCodeClient unit tests", () => { } }; const signedJwt = "signedJwt"; + // @ts-ignore config.cryptoInterface.signJwt = async (payload: SignedHttpRequest, kid: string): Promise => { - expect(payload.at).to.be.eq(POP_AUTHENTICATION_RESULT.body.access_token); + expect(payload.at).toBe(POP_AUTHENTICATION_RESULT.body.access_token); return signedJwt; }; // Set up stubs @@ -886,23 +916,21 @@ describe("AuthorizationCodeClient unit tests", () => { state: testState }); - if (!authenticationResult.expiresOn) { - throw TestError.createTestSetupError("configuration cryptoInterface not initialized correctly."); - } - - expect(authenticationResult.accessToken).to.eq(signedJwt); - expect((Date.now() + (POP_AUTHENTICATION_RESULT.body.expires_in * 1000)) >= authenticationResult.expiresOn.getMilliseconds()).to.be.true; - expect(createTokenRequestBodySpy.calledWith(authCodeRequest)).to.be.ok; - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.SCOPE}=${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CODE}=${TEST_TOKENS.AUTHORIZATION_CODE}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.GRANT_TYPE}=${Constants.CODE_GRANT_TYPE}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CODE_VERIFIER}=${TEST_CONFIG.TEST_VERIFIER}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.TOKEN_TYPE}=${AuthenticationScheme.POP}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.REQ_CNF}=${encodeURIComponent(TEST_POP_VALUES.ENCODED_REQ_CNF)}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); + expect(authenticationResult.accessToken).toBe(signedJwt); + // @ts-ignore + expect((Date.now() + (POP_AUTHENTICATION_RESULT.body.expires_in * 1000)) >= authenticationResult.expiresOn.getMilliseconds()).toBe(true); + expect(createTokenRequestBodySpy.calledWith(authCodeRequest)).toBeTruthy(); + const returnVal = await createTokenRequestBodySpy.returnValues[0] as string; + expect(returnVal.includes(`${AADServerParamKeys.SCOPE}=${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CODE}=${TEST_TOKENS.AUTHORIZATION_CODE}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.GRANT_TYPE}=${Constants.CODE_GRANT_TYPE}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CODE_VERIFIER}=${TEST_CONFIG.TEST_VERIFIER}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.TOKEN_TYPE}=${AuthenticationScheme.POP}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.REQ_CNF}=${encodeURIComponent(TEST_POP_VALUES.ENCODED_REQ_CNF)}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(true); }); it("properly handles expiration timestamps as strings", async () => { @@ -915,7 +943,7 @@ describe("AuthorizationCodeClient unit tests", () => { ext_expires_in: "3599" } }); - const createTokenRequestBodySpy = sinon.spy(AuthorizationCodeClient.prototype, "createTokenRequestBody"); + sinon.spy(AuthorizationCodeClient.prototype, "createTokenRequestBody"); const config: ClientConfiguration = await ClientTestUtils.createTestClientConfiguration(); if (!config.cryptoInterface) { @@ -924,6 +952,7 @@ describe("AuthorizationCodeClient unit tests", () => { // Set up required objects and mocked return values const testState = `eyAiaWQiOiAidGVzdGlkIiwgInRzIjogMTU5Mjg0NjQ4MiB9${Constants.RESOURCE_DELIM}userState`; const decodedLibState = "{ \"id\": \"testid\", \"ts\": 1592846482 }"; + // @ts-ignore config.cryptoInterface.base64Decode = (input: string): string => { switch (input) { case TEST_POP_VALUES.ENCODED_REQ_CNF: @@ -937,6 +966,7 @@ describe("AuthorizationCodeClient unit tests", () => { } }; + // @ts-ignore config.cryptoInterface.base64Encode = (input: string): string => { switch (input) { case TEST_POP_VALUES.DECODED_REQ_CNF: @@ -982,7 +1012,7 @@ describe("AuthorizationCodeClient unit tests", () => { state: testState }); - expect(authenticationResult.expiresOn?.toString()).to.not.equal("Invalid Date"); + expect(authenticationResult.expiresOn?.toString()).not.toBe("Invalid Date"); }); it("Saves refresh_in correctly to the cache", async () => { @@ -1004,6 +1034,7 @@ describe("AuthorizationCodeClient unit tests", () => { // Set up required objects and mocked return values const testState = `eyAiaWQiOiAidGVzdGlkIiwgInRzIjogMTU5Mjg0NjQ4MiB9${Constants.RESOURCE_DELIM}userState`; const decodedLibState = "{ \"id\": \"testid\", \"ts\": 1592846482 }"; + // @ts-ignore config.cryptoInterface.base64Decode = (input: string): string => { switch (input) { case TEST_POP_VALUES.ENCODED_REQ_CNF: @@ -1017,6 +1048,7 @@ describe("AuthorizationCodeClient unit tests", () => { } }; + // @ts-ignore config.cryptoInterface.base64Encode = (input: string): string => { switch (input) { case TEST_POP_VALUES.DECODED_REQ_CNF: @@ -1064,9 +1096,9 @@ describe("AuthorizationCodeClient unit tests", () => { const accessTokenKey = config.storageInterface?.getKeys().find(value => value.indexOf("accesstoken") >= 0); const accessTokenCacheItem = accessTokenKey ? config.storageInterface?.getAccessTokenCredential(accessTokenKey) : null; - expect(authenticationResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT.body.access_token); - expect(authenticationResult.expiresOn && (Date.now() + (AUTHENTICATION_RESULT.body.expires_in * 1000)) >= authenticationResult.expiresOn.getMilliseconds()).to.be.true; - expect(createTokenRequestBodySpy.calledWith(authCodeRequest)).to.be.ok; + expect(authenticationResult.accessToken).toEqual(AUTHENTICATION_RESULT.body.access_token); + expect(authenticationResult.expiresOn && (Date.now() + (AUTHENTICATION_RESULT.body.expires_in * 1000)) >= authenticationResult.expiresOn.getMilliseconds()).toBe(true); + expect(createTokenRequestBodySpy.calledWith(authCodeRequest)).toBeTruthy(); expect(accessTokenCacheItem && accessTokenCacheItem.refreshOn && accessTokenCacheItem.refreshOn === accessTokenCacheItem.cachedAt + authResult.body.refresh_in); }); }); @@ -1077,19 +1109,14 @@ describe("AuthorizationCodeClient unit tests", () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config: ClientConfiguration = await ClientTestUtils.createTestClientConfiguration(); const client = new AuthorizationCodeClient(config); - const testAccount: AccountInfo = { - homeAccountId: TEST_DATA_CLIENT_INFO.TEST_HOME_ACCOUNT_ID, - environment: "login.windows.net", - tenantId: "testTenantId", - username: "test@contoso.com", - localAccountId: TEST_DATA_CLIENT_INFO.TEST_LOCAL_ACCOUNT_ID - }; const removeAccountSpy = sinon.stub(MockStorageClass.prototype, "clear").returns(); const logoutUri = client.getLogoutUri({account: null, correlationId: RANDOM_TEST_GUID}); - expect(removeAccountSpy.calledOnce).to.be.true; - expect(logoutUri).to.be.eq(`${DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")}?${AADServerParamKeys.CLIENT_REQUEST_ID}=${RANDOM_TEST_GUID}`); + expect(removeAccountSpy.calledOnce).toBe(true); + expect(logoutUri).toBe( + `${DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")}?${AADServerParamKeys.CLIENT_REQUEST_ID}=${RANDOM_TEST_GUID}` + ); }); it("Returns a uri and clears the cache of relevant account info", async () => { @@ -1107,8 +1134,10 @@ describe("AuthorizationCodeClient unit tests", () => { const removeAccountSpy = sinon.stub(CacheManager.prototype, "removeAccount").returns(true); const logoutUri = client.getLogoutUri({account: testAccount, correlationId: RANDOM_TEST_GUID}); - expect(removeAccountSpy.calledWith(AccountEntity.generateAccountCacheKey(testAccount))).to.be.true; - expect(logoutUri).to.be.eq(`${DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")}?${AADServerParamKeys.CLIENT_REQUEST_ID}=${RANDOM_TEST_GUID}`); + expect(removeAccountSpy.calledWith(AccountEntity.generateAccountCacheKey(testAccount))).toBe(true); + expect(logoutUri).toBe( + `${DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")}?${AADServerParamKeys.CLIENT_REQUEST_ID}=${RANDOM_TEST_GUID}` + ); }); it("Returns a uri with given postLogoutUri and correlationId", async () => { @@ -1131,9 +1160,9 @@ describe("AuthorizationCodeClient unit tests", () => { idTokenHint: "id_token_hint" }); - expect(removeAccountSpy.calledWith(AccountEntity.generateAccountCacheKey(testAccount))).to.be.true; + expect(removeAccountSpy.calledWith(AccountEntity.generateAccountCacheKey(testAccount))).toBe(true); const testLogoutUriWithParams = `${DEFAULT_OPENID_CONFIG_RESPONSE.body.end_session_endpoint.replace("{tenant}", "common")}?${AADServerParamKeys.POST_LOGOUT_URI}=${encodeURIComponent(TEST_URIS.TEST_LOGOUT_URI)}&${AADServerParamKeys.CLIENT_REQUEST_ID}=${encodeURIComponent(RANDOM_TEST_GUID)}&${AADServerParamKeys.ID_TOKEN_HINT}=id_token_hint`; - expect(logoutUri).to.be.eq(testLogoutUriWithParams); + expect(logoutUri).toBe(testLogoutUriWithParams); }); }); }); diff --git a/lib/msal-common/test/client/BaseClient.spec.ts b/lib/msal-common/test/client/BaseClient.spec.ts index 63b28c2d4e..eac775672c 100644 --- a/lib/msal-common/test/client/BaseClient.spec.ts +++ b/lib/msal-common/test/client/BaseClient.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { BaseClient } from "../../src/client/BaseClient"; import { Authority, Constants } from "../../src"; import { HeaderNames } from "../../src/utils/Constants"; @@ -49,8 +48,8 @@ describe("BaseClient.ts Class Unit Tests", () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config = await ClientTestUtils.createTestClientConfiguration(); const client = new TestClient(config); - expect(client).to.be.not.null; - expect(client instanceof BaseClient).to.be.true; + expect(client).not.toBeNull(); + expect(client instanceof BaseClient).toBe(true); }); it("Sets fields on BaseClient object", async () => { @@ -58,10 +57,10 @@ describe("BaseClient.ts Class Unit Tests", () => { const config = await ClientTestUtils.createTestClientConfiguration(); const client = new TestClient(config); - expect(client.getConfig()).to.be.not.null; - expect(client.getCryptoUtils()).to.be.not.null; - expect(client.getDefaultAuthorityInstance()).to.be.not.null; - expect(client.getNetworkClient()).to.be.not.null; + expect(client.getConfig()).not.toBeNull(); + expect(client.getCryptoUtils()).not.toBeNull(); + expect(client.getDefaultAuthorityInstance()).not.toBeNull(); + expect(client.getNetworkClient()).not.toBeNull(); }); }); @@ -79,7 +78,7 @@ describe("BaseClient.ts Class Unit Tests", () => { const client = new TestClient(config); const headers = client.createDefaultTokenRequestHeaders(); - expect(headers[HeaderNames.CONTENT_TYPE]).to.eq(Constants.URL_FORM_CONTENT_TYPE); + expect(headers[HeaderNames.CONTENT_TYPE]).toBe(Constants.URL_FORM_CONTENT_TYPE); }); }); }); diff --git a/lib/msal-common/test/client/ClientCredentialClient.spec.ts b/lib/msal-common/test/client/ClientCredentialClient.spec.ts index 307c616a5b..12d5c15985 100644 --- a/lib/msal-common/test/client/ClientCredentialClient.spec.ts +++ b/lib/msal-common/test/client/ClientCredentialClient.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import sinon from "sinon"; import { CONFIDENTIAL_CLIENT_AUTHENTICATION_RESULT, @@ -17,22 +16,23 @@ import { AccessTokenEntity } from "../../src/cache/entities/AccessTokenEntity" import { TimeUtils } from "../../src/utils/TimeUtils"; import { CredentialCache } from "../../src/cache/utils/CacheTypes"; import { CacheManager } from "../../src/cache/CacheManager"; -import { ClientAuthErrorMessage } from "../../src/error/ClientAuthError"; +import { ClientAuthError } from "../../src/error/ClientAuthError"; +import { AuthenticationResult } from "../../src/response/AuthenticationResult"; describe("ClientCredentialClient unit tests", () => { afterEach(() => { sinon.restore(); }); - describe("Constructor", async () => { + describe("Constructor", () => { it("creates a ClientCredentialClient", async () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config = await ClientTestUtils.createTestClientConfiguration(); const client = new ClientCredentialClient(config); - expect(client).to.be.not.null; - expect(client instanceof ClientCredentialClient).to.be.true; - expect(client instanceof BaseClient).to.be.true; + expect(client).not.toBeNull(); + expect(client instanceof ClientCredentialClient).toBe(true); + expect(client instanceof BaseClient).toBe(true); }); }); @@ -50,23 +50,24 @@ describe("ClientCredentialClient unit tests", () => { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, }; - const authResult = await client.acquireToken(clientCredentialRequest); + const authResult = await client.acquireToken(clientCredentialRequest) as AuthenticationResult; const expectedScopes = [TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.accessToken).to.deep.eq(CONFIDENTIAL_CLIENT_AUTHENTICATION_RESULT.body.access_token); - expect(authResult.state).to.be.empty; - - expect(createTokenRequestBodySpy.calledWith(clientCredentialRequest)).to.be.true; - - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.CLIENT_CREDENTIALS_GRANT}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.accessToken).toEqual(CONFIDENTIAL_CLIENT_AUTHENTICATION_RESULT.body.access_token); + expect(authResult.state).toHaveLength(0); + + expect(createTokenRequestBodySpy.calledWith(clientCredentialRequest)).toBe(true); + + const returnVal = await createTokenRequestBodySpy.returnValues[0] as string; + expect(returnVal.includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.CLIENT_CREDENTIALS_GRANT}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); }); it("Adds claims when provided", async () => { @@ -84,24 +85,24 @@ describe("ClientCredentialClient unit tests", () => { claims: TEST_CONFIG.CLAIMS }; - const authResult = await client.acquireToken(clientCredentialRequest); + const authResult = await client.acquireToken(clientCredentialRequest) as AuthenticationResult; const expectedScopes = [TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.accessToken).to.deep.eq(CONFIDENTIAL_CLIENT_AUTHENTICATION_RESULT.body.access_token); - expect(authResult.state).to.be.empty; - - expect(createTokenRequestBodySpy.calledWith(clientCredentialRequest)).to.be.true; - - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.CLIENT_CREDENTIALS_GRANT}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.accessToken).toEqual(CONFIDENTIAL_CLIENT_AUTHENTICATION_RESULT.body.access_token); + expect(authResult.state).toBe(""); + + expect(createTokenRequestBodySpy.calledWith(clientCredentialRequest)).toBe(true); + + expect(createTokenRequestBodySpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.CLIENT_CREDENTIALS_GRANT}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(true); }); it("Does not add claims when empty object provided", async () => { @@ -119,24 +120,24 @@ describe("ClientCredentialClient unit tests", () => { claims: "{}" }; - const authResult = await client.acquireToken(clientCredentialRequest); + const authResult = await client.acquireToken(clientCredentialRequest) as AuthenticationResult; const expectedScopes = [TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.accessToken).to.deep.eq(CONFIDENTIAL_CLIENT_AUTHENTICATION_RESULT.body.access_token); - expect(authResult.state).to.be.empty; - - expect(createTokenRequestBodySpy.calledWith(clientCredentialRequest)).to.be.true; - - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.CLIENT_CREDENTIALS_GRANT}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.not.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.accessToken).toEqual(CONFIDENTIAL_CLIENT_AUTHENTICATION_RESULT.body.access_token); + expect(authResult.state).toBe(""); + + expect(createTokenRequestBodySpy.calledWith(clientCredentialRequest)).toBe(true); + + expect(createTokenRequestBodySpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.CLIENT_CREDENTIALS_GRANT}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(false); }); it("Does not add headers that do not qualify for a simple request", async () => { @@ -146,7 +147,7 @@ describe("ClientCredentialClient unit tests", () => { sinon.stub(ClientCredentialClient.prototype, "executePostToTokenEndpoint").callsFake((tokenEndpoint: string, queryString: string, headers: Record) => { const headerNames = Object.keys(headers); headerNames.forEach((name) => { - expect(CORS_SIMPLE_REQUEST_HEADERS).contains(name.toLowerCase()); + expect(CORS_SIMPLE_REQUEST_HEADERS).toEqual(expect.arrayContaining([name.toLowerCase()])); }); stubCalled = true; @@ -162,7 +163,7 @@ describe("ClientCredentialClient unit tests", () => { }; await client.acquireToken(clientCredentialRequest); - expect(stubCalled).to.be.true; + expect(stubCalled).toBe(true); }); it("acquires a token, returns token from the cache", async () => { @@ -182,14 +183,14 @@ describe("ClientCredentialClient unit tests", () => { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, }; - const authResult = await client.acquireToken(clientCredentialRequest); + const authResult = await client.acquireToken(clientCredentialRequest) as AuthenticationResult; const expectedScopes = [TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.accessToken).to.deep.eq("an_access_token"); - expect(authResult.account).to.be.null; - expect(authResult.fromCache).to.be.true; - expect(authResult.uniqueId).to.be.empty; - expect(authResult.state).to.be.empty; + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.accessToken).toEqual("an_access_token"); + expect(authResult.account).toBeNull(); + expect(authResult.fromCache).toBe(true); + expect(authResult.uniqueId).toHaveLength(0); + expect(authResult.state).toHaveLength(0); }); it("acquires a token, skipCache = true", async () => { @@ -207,18 +208,19 @@ describe("ClientCredentialClient unit tests", () => { skipCache: true }; - const authResult = await client.acquireToken(clientCredentialRequest); + const authResult = await client.acquireToken(clientCredentialRequest) as AuthenticationResult; const expectedScopes = [TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.accessToken).to.deep.eq(CONFIDENTIAL_CLIENT_AUTHENTICATION_RESULT.body.access_token); - expect(authResult.state).to.be.empty; + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.accessToken).toEqual(CONFIDENTIAL_CLIENT_AUTHENTICATION_RESULT.body.access_token); + expect(authResult.state).toHaveLength(0); - expect(createTokenRequestBodySpy.calledWith(clientCredentialRequest)).to.be.true; + expect(createTokenRequestBodySpy.calledWith(clientCredentialRequest)).toBe(true); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.CLIENT_CREDENTIALS_GRANT}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); + const returnVal = await createTokenRequestBodySpy.returnValues[0] as string; + expect(returnVal.includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.CLIENT_CREDENTIALS_GRANT}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); }); it("Multiple access tokens matched, exception thrown", async () => { @@ -237,7 +239,9 @@ describe("ClientCredentialClient unit tests", () => { "key1": mockedAtEntity, "key2": mockedAtEntity2 }, + // @ts-ignore refreshTokens: null, + // @ts-ignore idTokens: null } @@ -250,7 +254,7 @@ describe("ClientCredentialClient unit tests", () => { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, }; - await expect(client.acquireToken(clientCredentialRequest)).to.be.rejectedWith(`${ClientAuthErrorMessage.multipleMatchingTokens.desc}`); + await expect(client.acquireToken(clientCredentialRequest)).rejects.toMatchObject(ClientAuthError.createMultipleMatchingTokensInCacheError()); }); }); diff --git a/lib/msal-common/test/client/ClientTestUtils.ts b/lib/msal-common/test/client/ClientTestUtils.ts index c8e53c866d..b1b0883aca 100644 --- a/lib/msal-common/test/client/ClientTestUtils.ts +++ b/lib/msal-common/test/client/ClientTestUtils.ts @@ -166,10 +166,10 @@ export class ClientTestUtils { const mockHttpClient = { sendGetRequestAsync(): T { - return null; + return {} as T; }, sendPostRequestAsync(): T { - return null; + return {} as T; } }; diff --git a/lib/msal-common/test/client/DeviceCodeClient.spec.ts b/lib/msal-common/test/client/DeviceCodeClient.spec.ts index 90a0186bd8..2e90538d3e 100644 --- a/lib/msal-common/test/client/DeviceCodeClient.spec.ts +++ b/lib/msal-common/test/client/DeviceCodeClient.spec.ts @@ -1,13 +1,12 @@ -import { expect } from "chai"; import sinon from "sinon"; import { Authority, - ClientAuthErrorMessage, Constants, DeviceCodeClient, CommonDeviceCodeRequest, ClientConfiguration, AuthToken, + ClientAuthError, } from "../../src"; import { AUTHENTICATION_RESULT, AUTHORIZATION_PENDING_RESPONSE, @@ -25,10 +24,10 @@ import { BaseClient } from "../../src/client/BaseClient"; import { AADServerParamKeys, GrantType, ThrottlingConstants } from "../../src/utils/Constants"; import { ClientTestUtils } from "./ClientTestUtils"; -describe("DeviceCodeClient unit tests", async () => { +describe("DeviceCodeClient unit tests", () => { let config: ClientConfiguration; - before(() => { + beforeAll(() => { sinon.restore(); }); @@ -36,8 +35,8 @@ describe("DeviceCodeClient unit tests", async () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); config = await ClientTestUtils.createTestClientConfiguration(); // Set up required objects and mocked return values - const testState = `eyAiaWQiOiAidGVzdGlkIiwgInRzIjogMTU5Mjg0NjQ4MiB9${Constants.RESOURCE_DELIM}userState`; const decodedLibState = `{ "id": "testid", "ts": 1592846482 }`; + // @ts-ignore config.cryptoInterface.base64Decode = (input: string): string => { switch (input) { case TEST_POP_VALUES.ENCODED_REQ_CNF: @@ -51,6 +50,7 @@ describe("DeviceCodeClient unit tests", async () => { } }; + // @ts-ignore config.cryptoInterface.base64Encode = (input: string): string => { switch (input) { case TEST_POP_VALUES.DECODED_REQ_CNF: @@ -89,39 +89,40 @@ describe("DeviceCodeClient unit tests", async () => { it("creates a DeviceCodeClient", async () => { const client = new DeviceCodeClient(config); - expect(client).to.be.not.null; - expect(client instanceof DeviceCodeClient).to.be.true; - expect(client instanceof BaseClient).to.be.true; + expect(client).not.toBeNull(); + expect(client instanceof DeviceCodeClient).toBe(true); + expect(client instanceof BaseClient).toBe(true); }); }); - describe("Acquire a token", async () => { + describe("Acquire a token", () => { it("Does not add headers that do not qualify for a simple request", (done) => { + jest.setTimeout(6000); // For more information about this test see: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS sinon.stub(DeviceCodeClient.prototype, "executePostRequestToDeviceCodeEndpoint").resolves(DEVICE_CODE_RESPONSE); sinon.stub(BaseClient.prototype, "executePostToTokenEndpoint").callsFake((tokenEndpoint: string, queryString: string, headers: Record) => { const headerNames = Object.keys(headers); headerNames.forEach((name) => { - expect(CORS_SIMPLE_REQUEST_HEADERS).contains(name.toLowerCase()); + expect(CORS_SIMPLE_REQUEST_HEADERS).toEqual(expect.arrayContaining([name.toLowerCase()])); }); done(); return AUTHENTICATION_RESULT; }); - let deviceCodeResponse = null; const request: CommonDeviceCodeRequest = { - authority: Constants.DEFAULT_AUTHORITY, + authority: TEST_CONFIG.validAuthority, + correlationId: "test-correlationId", scopes: [...TEST_CONFIG.DEFAULT_GRAPH_SCOPE, ...TEST_CONFIG.DEFAULT_SCOPES], - deviceCodeCallback: (response) => deviceCodeResponse = response, - correlationId: RANDOM_TEST_GUID + deviceCodeCallback: () => {} }; const client = new DeviceCodeClient(config); client.acquireToken(request); - }).timeout(6000); + }); it("Acquires a token successfully", async () => { + jest.setTimeout(6000); sinon.stub(DeviceCodeClient.prototype, "executePostRequestToDeviceCodeEndpoint").resolves(DEVICE_CODE_RESPONSE); sinon.stub(BaseClient.prototype, "executePostToTokenEndpoint").resolves(AUTHENTICATION_RESULT); @@ -130,36 +131,39 @@ describe("DeviceCodeClient unit tests", async () => { let deviceCodeResponse = null; const request: CommonDeviceCodeRequest = { - authority: Constants.DEFAULT_AUTHORITY, + authority: TEST_CONFIG.validAuthority, + correlationId: "test-correlationId", scopes: [...TEST_CONFIG.DEFAULT_GRAPH_SCOPE, ...TEST_CONFIG.DEFAULT_SCOPES], - deviceCodeCallback: (response) => deviceCodeResponse = response, - correlationId: RANDOM_TEST_GUID + deviceCodeCallback: (response) => deviceCodeResponse = response }; const client = new DeviceCodeClient(config); - const authenticationResult = await client.acquireToken(request); + await client.acquireToken(request); // Check that device code url is correct - expect(queryStringSpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(queryStringSpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); + const returnVal = await queryStringSpy.returnValues[0] as string; + expect(returnVal.includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(returnVal.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); // Check that deviceCodeCallback was called with the right arguments - expect(deviceCodeResponse).to.deep.eq(DEVICE_CODE_RESPONSE); + expect(deviceCodeResponse).toEqual(DEVICE_CODE_RESPONSE); // expect(JSON.parse(authenticationResult)).to.deep.eq(AUTHENTICATION_RESULT.body); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(encodeURIComponent(GrantType.DEVICE_CODE_GRANT)); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(DEVICE_CODE_RESPONSE.deviceCode); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); - - }).timeout(6000); + const tokenReturnVal = await createTokenRequestBodySpy.returnValues[0] as string; + expect(tokenReturnVal.includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(tokenReturnVal.includes(encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID))).toBe(true); + expect(tokenReturnVal.includes(encodeURIComponent(GrantType.DEVICE_CODE_GRANT))).toBe(true); + expect(tokenReturnVal.includes(DEVICE_CODE_RESPONSE.deviceCode)).toBe(true); + expect(tokenReturnVal.includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(tokenReturnVal.includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(tokenReturnVal.includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(tokenReturnVal.includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(tokenReturnVal.includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); + + }); it("Adds claims to request", async () => { + jest.setTimeout(6000); sinon.stub(DeviceCodeClient.prototype, "executePostRequestToDeviceCodeEndpoint").resolves(DEVICE_CODE_RESPONSE); sinon.stub(BaseClient.prototype, "executePostToTokenEndpoint").resolves(AUTHENTICATION_RESULT); @@ -176,29 +180,30 @@ describe("DeviceCodeClient unit tests", async () => { }; const client = new DeviceCodeClient(config); - const authenticationResult = await client.acquireToken(request); + await client.acquireToken(request); // Check that device code url is correct - expect(queryStringSpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(queryStringSpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); + expect(queryStringSpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(queryStringSpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); // Check that deviceCodeCallback was called with the right arguments - expect(deviceCodeResponse).to.deep.eq(DEVICE_CODE_RESPONSE); + expect(deviceCodeResponse).toEqual(DEVICE_CODE_RESPONSE); // expect(JSON.parse(authenticationResult)).to.deep.eq(AUTHENTICATION_RESULT.body); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(encodeURIComponent(GrantType.DEVICE_CODE_GRANT)); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(DEVICE_CODE_RESPONSE.deviceCode); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); - }).timeout(6000); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID))).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(encodeURIComponent(GrantType.DEVICE_CODE_GRANT))).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(DEVICE_CODE_RESPONSE.deviceCode)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); + }); it("Does not add claims to request if empty object passed", async () => { + jest.setTimeout(6000); sinon.stub(DeviceCodeClient.prototype, "executePostRequestToDeviceCodeEndpoint").resolves(DEVICE_CODE_RESPONSE); sinon.stub(BaseClient.prototype, "executePostToTokenEndpoint").resolves(AUTHENTICATION_RESULT); @@ -215,100 +220,101 @@ describe("DeviceCodeClient unit tests", async () => { }; const client = new DeviceCodeClient(config); - const authenticationResult = await client.acquireToken(request); + await client.acquireToken(request); // Check that device code url is correct - expect(queryStringSpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(queryStringSpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); + expect(queryStringSpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(queryStringSpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); // Check that deviceCodeCallback was called with the right arguments - expect(deviceCodeResponse).to.deep.eq(DEVICE_CODE_RESPONSE); + expect(deviceCodeResponse).toEqual(DEVICE_CODE_RESPONSE); // expect(JSON.parse(authenticationResult)).to.deep.eq(AUTHENTICATION_RESULT.body); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(encodeURIComponent(GrantType.DEVICE_CODE_GRANT)); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(DEVICE_CODE_RESPONSE.deviceCode); - expect(createTokenRequestBodySpy.returnValues[0]).to.not.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); - }).timeout(6000); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE}%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID))).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(encodeURIComponent(GrantType.DEVICE_CODE_GRANT))).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(DEVICE_CODE_RESPONSE.deviceCode)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(false); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); + }); it("Acquires a token successfully after authorization_pending error", async () => { + jest.setTimeout(12000); sinon.stub(DeviceCodeClient.prototype, "executePostRequestToDeviceCodeEndpoint").resolves(DEVICE_CODE_RESPONSE); const tokenRequestStub = sinon.stub(BaseClient.prototype, "executePostToTokenEndpoint"); tokenRequestStub.onFirstCall().resolves(AUTHORIZATION_PENDING_RESPONSE); tokenRequestStub.onSecondCall().resolves(AUTHENTICATION_RESULT); - let deviceCodeResponse = null; const request: CommonDeviceCodeRequest = { - authority: Constants.DEFAULT_AUTHORITY, + authority: TEST_CONFIG.validAuthority, + correlationId: "test-correlationId", scopes: [...TEST_CONFIG.DEFAULT_GRAPH_SCOPE, ...TEST_CONFIG.DEFAULT_SCOPES], - deviceCodeCallback: (response) => deviceCodeResponse = response, - correlationId: RANDOM_TEST_GUID + deviceCodeCallback: () => {} }; const client = new DeviceCodeClient(config); - const authenticationResult = await client.acquireToken(request); - }).timeout(12000); + await client.acquireToken(request); + }); }); describe("Device code exceptions", () => { it("Throw device code flow cancelled exception if DeviceCodeRequest.cancel=true", async () => { + jest.setTimeout(6000); sinon.stub(DeviceCodeClient.prototype, "executePostRequestToDeviceCodeEndpoint").resolves(DEVICE_CODE_RESPONSE); sinon.stub(BaseClient.prototype, "executePostToTokenEndpoint").resolves(AUTHENTICATION_RESULT); - let deviceCodeResponse = null; const request: CommonDeviceCodeRequest = { - authority: Constants.DEFAULT_AUTHORITY, + authority: TEST_CONFIG.validAuthority, + correlationId: "test-correlationId", scopes: [...TEST_CONFIG.DEFAULT_GRAPH_SCOPE, ...TEST_CONFIG.DEFAULT_SCOPES], - deviceCodeCallback: (response) => deviceCodeResponse = response, - correlationId: RANDOM_TEST_GUID + deviceCodeCallback: () => {} }; const client = new DeviceCodeClient(config); request.cancel = true; - await expect(client.acquireToken(request)).to.be.rejectedWith(`${ClientAuthErrorMessage.DeviceCodePollingCancelled.desc}`); - }).timeout(6000); + await expect(client.acquireToken(request)).rejects.toMatchObject(ClientAuthError.createDeviceCodeCancelledError()); + }); it("Throw device code expired exception if device code is expired", async () => { + jest.setTimeout(6000); sinon.stub(DeviceCodeClient.prototype, "executePostRequestToDeviceCodeEndpoint").resolves(DEVICE_CODE_EXPIRED_RESPONSE); + sinon.stub(BaseClient.prototype, "executePostToTokenEndpoint").resolves(AUTHORIZATION_PENDING_RESPONSE); - let deviceCodeResponse = null; const request: CommonDeviceCodeRequest = { - authority: Constants.DEFAULT_AUTHORITY, + authority: TEST_CONFIG.validAuthority, + correlationId: "test-correlationId", scopes: [...TEST_CONFIG.DEFAULT_GRAPH_SCOPE, ...TEST_CONFIG.DEFAULT_SCOPES], - deviceCodeCallback: (response) => deviceCodeResponse = response, - correlationId: RANDOM_TEST_GUID + deviceCodeCallback: () => {} }; const client = new DeviceCodeClient(config); - await expect(client.acquireToken(request)).to.be.rejectedWith(`${ClientAuthErrorMessage.DeviceCodeExpired.desc}`); - }).timeout(6000); + await expect(client.acquireToken(request)).rejects.toMatchObject(ClientAuthError.createDeviceCodeExpiredError()); + }); it("Throw device code expired exception if the timeout expires", async () => { + jest.setTimeout(15000); sinon.stub(DeviceCodeClient.prototype, "executePostRequestToDeviceCodeEndpoint").resolves(DEVICE_CODE_RESPONSE); const tokenRequestStub = sinon .stub(BaseClient.prototype, "executePostToTokenEndpoint") .onFirstCall().resolves(AUTHORIZATION_PENDING_RESPONSE) - let deviceCodeResponse = null; const request: CommonDeviceCodeRequest = { - authority: Constants.DEFAULT_AUTHORITY, + authority: TEST_CONFIG.validAuthority, + correlationId: "test-correlationId", scopes: [...TEST_CONFIG.DEFAULT_GRAPH_SCOPE, ...TEST_CONFIG.DEFAULT_SCOPES], - deviceCodeCallback: (response) => deviceCodeResponse = response, - correlationId: RANDOM_TEST_GUID, - timeout: DEVICE_CODE_RESPONSE.interval, // Setting a timeout equal to the interval polling time to allow for one call to the token endpoint + deviceCodeCallback: () => {}, + timeout: DEVICE_CODE_RESPONSE.interval - 1, // Setting a timeout equal to the interval polling time minus one to allow for one call to the token endpoint }; const client = new DeviceCodeClient(config); - await expect(client.acquireToken(request)).to.be.rejectedWith(`${ClientAuthErrorMessage.userTimeoutReached.desc}`); - await expect(tokenRequestStub.callCount).to.equal(1); - }).timeout(15000); + await expect(client.acquireToken(request)).rejects.toMatchObject(ClientAuthError.createUserTimeoutReachedError()); + expect(tokenRequestStub.callCount).toBe(1); + }); }); }); diff --git a/lib/msal-common/test/client/OnBehalfOfClient.spec.ts b/lib/msal-common/test/client/OnBehalfOfClient.spec.ts index e5f044925c..0ebec5827c 100644 --- a/lib/msal-common/test/client/OnBehalfOfClient.spec.ts +++ b/lib/msal-common/test/client/OnBehalfOfClient.spec.ts @@ -3,7 +3,6 @@ * Licensed under the MIT License. */ -import { expect } from "chai"; import sinon from "sinon"; import { AUTHENTICATION_RESULT_DEFAULT_SCOPES, @@ -28,8 +27,8 @@ import { AccessTokenEntity } from "../../src/cache/entities/AccessTokenEntity"; import { ScopeSet } from "../../src/request/ScopeSet"; import { CredentialCache } from "../../src/cache/utils/CacheTypes"; import { CacheManager } from "../../src/cache/CacheManager"; -import { ClientAuthErrorMessage } from "../../src/error/ClientAuthError"; -import { ClientConfiguration } from "../../src"; +import { ClientAuthError } from "../../src/error/ClientAuthError"; +import { ClientConfiguration, AuthenticationResult } from "../../src"; describe("OnBehalfOf unit tests", () => { let config: ClientConfiguration; @@ -39,7 +38,7 @@ describe("OnBehalfOf unit tests", () => { config = await ClientTestUtils.createTestClientConfiguration(); // Set up required objects and mocked return values const decodedLibState = "{ \"id\": \"testid\", \"ts\": 1592846482 }"; - config.cryptoInterface.base64Decode = (input: string): string => { + config.cryptoInterface!.base64Decode = (input: string): string => { switch (input) { case TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO: return TEST_DATA_CLIENT_INFO.TEST_DECODED_CLIENT_INFO; @@ -50,7 +49,7 @@ describe("OnBehalfOf unit tests", () => { } }; - config.cryptoInterface.base64Encode = (input: string): string => { + config.cryptoInterface!.base64Encode = (input: string): string => { switch (input) { case "123-test-uid": return "MTIzLXRlc3QtdWlk"; @@ -82,13 +81,13 @@ describe("OnBehalfOf unit tests", () => { sinon.restore(); }); - describe("Constructor", async () => { + describe("Constructor", () => { it("creates a OnBehalfOf", async () => { const client = new OnBehalfOfClient(config); - expect(client).to.be.not.null; - expect(client instanceof OnBehalfOfClient).to.be.true; - expect(client instanceof BaseClient).to.be.true; + expect(client).not.toBeNull(); + expect(client instanceof OnBehalfOfClient).toBe(true); + expect(client instanceof BaseClient).toBe(true); }); }); @@ -98,7 +97,7 @@ describe("OnBehalfOf unit tests", () => { sinon.stub(OnBehalfOfClient.prototype, "executePostToTokenEndpoint").callsFake((tokenEndpoint: string, queryString: string, headers: Record) => { const headerNames = Object.keys(headers); headerNames.forEach((name) => { - expect(CORS_SIMPLE_REQUEST_HEADERS).contains(name.toLowerCase()); + expect(CORS_SIMPLE_REQUEST_HEADERS).toEqual(expect.arrayContaining([name.toLowerCase()])); }); done(); @@ -107,6 +106,8 @@ describe("OnBehalfOf unit tests", () => { const client = new OnBehalfOfClient(config); const onBehalfOfRequest: CommonOnBehalfOfRequest = { + authority: TEST_CONFIG.validAuthority, + correlationId: TEST_CONFIG.CORRELATION_ID, scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, oboAssertion: TEST_TOKENS.ACCESS_TOKEN, skipCache: false @@ -124,31 +125,33 @@ describe("OnBehalfOf unit tests", () => { const client = new OnBehalfOfClient(config); const onBehalfOfRequest: CommonOnBehalfOfRequest = { + authority: TEST_CONFIG.validAuthority, + correlationId: TEST_CONFIG.CORRELATION_ID, scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, oboAssertion: TEST_TOKENS.ACCESS_TOKEN, skipCache: false }; - const authResult = await client.acquireToken(onBehalfOfRequest); + const authResult = await client.acquireToken(onBehalfOfRequest) as AuthenticationResult; const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, Constants.OFFLINE_ACCESS_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.idToken).to.deep.eq(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.id_token); - expect(authResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.access_token); - expect(authResult.state).to.be.empty; - - expect(createTokenRequestBodySpy.calledWith(onBehalfOfRequest)).to.be.true; - - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.GRANT_TYPE}=${encodeURIComponent(GrantType.JWT_BEARER)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.REQUESTED_TOKEN_USE}=${AADServerParamKeys.ON_BEHALF_OF}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.OBO_ASSERTION}=${TEST_TOKENS.ACCESS_TOKEN}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.idToken).toEqual(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.id_token); + expect(authResult.accessToken).toEqual(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.access_token); + expect(authResult.state).toHaveLength(0); + + expect(createTokenRequestBodySpy.calledWith(onBehalfOfRequest)).toBe(true); + + expect(createTokenRequestBodySpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_ID}=${encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.GRANT_TYPE}=${encodeURIComponent(GrantType.JWT_BEARER)}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.REQUESTED_TOKEN_USE}=${AADServerParamKeys.ON_BEHALF_OF}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.OBO_ASSERTION}=${TEST_TOKENS.ACCESS_TOKEN}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); }); it("acquires a token, returns token from cache", async () => { @@ -167,28 +170,30 @@ describe("OnBehalfOf unit tests", () => { sinon.stub(OnBehalfOfClient.prototype, "readIdTokenFromCache").returns(expectedIdTokenEntity); // mock account - const idToken: AuthToken = new AuthToken(TEST_TOKENS.IDTOKEN_V2, config.cryptoInterface); - const expectedAccountEntity: AccountEntity = AccountEntity.createAccount(TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO, "123-test-uid.456-test-uid", config.authOptions.authority, idToken, config.cryptoInterface, TEST_TOKENS.ACCESS_TOKEN); + const idToken: AuthToken = new AuthToken(TEST_TOKENS.IDTOKEN_V2, config.cryptoInterface!); + const expectedAccountEntity: AccountEntity = AccountEntity.createAccount(TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO, "123-test-uid.456-test-uid", config.authOptions.authority, idToken); sinon.stub(OnBehalfOfClient.prototype, "readAccountFromCache").returns(expectedAccountEntity); const client = new OnBehalfOfClient(config); const onBehalfOfRequest: CommonOnBehalfOfRequest = { + authority: TEST_CONFIG.validAuthority, + correlationId: TEST_CONFIG.CORRELATION_ID, scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, oboAssertion: TEST_TOKENS.ACCESS_TOKEN }; - const authResult = await client.acquireToken(onBehalfOfRequest); - expect(authResult.scopes).to.deep.eq(ScopeSet.fromString(expectedAtEntity.target).asArray()); - expect(authResult.idToken).to.deep.eq(TEST_TOKENS.IDTOKEN_V2); - expect(authResult.accessToken).to.deep.eq(expectedAtEntity.secret); - expect(authResult.state).to.be.empty; - expect(authResult.fromCache).to.be.true; - expect(authResult.uniqueId).to.eq(idToken.claims.oid); - expect(authResult.tenantId).to.eq(idToken.claims.tid); - expect(authResult.account.homeAccountId).to.eq(expectedAccountEntity.homeAccountId); - expect(authResult.account.environment).to.eq(expectedAccountEntity.environment); - expect(authResult.account.tenantId).to.eq(expectedAccountEntity.realm); + const authResult = await client.acquireToken(onBehalfOfRequest) as AuthenticationResult; + expect(authResult.scopes).toEqual(ScopeSet.fromString(expectedAtEntity.target).asArray()); + expect(authResult.idToken).toEqual(TEST_TOKENS.IDTOKEN_V2); + expect(authResult.accessToken).toEqual(expectedAtEntity.secret); + expect(authResult.state).toHaveLength(0); + expect(authResult.fromCache).toBe(true); + expect(authResult.uniqueId).toBe(idToken.claims.oid); + expect(authResult.tenantId).toBe(idToken.claims.tid); + expect(authResult.account!.homeAccountId).toBe(expectedAccountEntity.homeAccountId); + expect(authResult.account!.environment).toBe(expectedAccountEntity.environment); + expect(authResult.account!.tenantId).toBe(expectedAccountEntity.realm); }); it("acquires a token, skipCache=true", async () => { @@ -199,26 +204,28 @@ describe("OnBehalfOf unit tests", () => { const client = new OnBehalfOfClient(config); const onBehalfOfRequest: CommonOnBehalfOfRequest = { + authority: TEST_CONFIG.validAuthority, + correlationId: TEST_CONFIG.CORRELATION_ID, scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, oboAssertion: TEST_TOKENS.ACCESS_TOKEN, skipCache: true }; - const authResult = await client.acquireToken(onBehalfOfRequest); + const authResult = await client.acquireToken(onBehalfOfRequest) as AuthenticationResult; const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, Constants.OFFLINE_ACCESS_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.idToken).to.deep.eq(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.id_token); - expect(authResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.access_token); - expect(authResult.state).to.be.empty; - - expect(createTokenRequestBodySpy.calledWith(onBehalfOfRequest)).to.be.true; - - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.GRANT_TYPE}=${encodeURIComponent(GrantType.JWT_BEARER)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.REQUESTED_TOKEN_USE}=${AADServerParamKeys.ON_BEHALF_OF}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.OBO_ASSERTION}=${TEST_TOKENS.ACCESS_TOKEN}`); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.idToken).toEqual(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.id_token); + expect(authResult.accessToken).toEqual(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.access_token); + expect(authResult.state).toHaveLength(0); + + expect(createTokenRequestBodySpy.calledWith(onBehalfOfRequest)).toBe(true); + + expect(createTokenRequestBodySpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_ID}=${encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.GRANT_TYPE}=${encodeURIComponent(GrantType.JWT_BEARER)}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.REQUESTED_TOKEN_USE}=${AADServerParamKeys.ON_BEHALF_OF}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.OBO_ASSERTION}=${TEST_TOKENS.ACCESS_TOKEN}`)).toBe(true); }); it("Multiple access tokens matched, exception thrown", async () => { @@ -233,18 +240,20 @@ describe("OnBehalfOf unit tests", () => { "key1": mockedAtEntity, "key2": mockedAtEntity2 }, - refreshTokens: null, - idTokens: null + refreshTokens: {}, + idTokens: {} }; sinon.stub(CacheManager.prototype, "getCredentialsFilteredBy").returns(mockedCredentialCache); const client = new OnBehalfOfClient(config); const onBehalfOfRequest: CommonOnBehalfOfRequest = { + authority: TEST_CONFIG.validAuthority, + correlationId: TEST_CONFIG.CORRELATION_ID, scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, oboAssertion: TEST_TOKENS.ACCESS_TOKEN }; - await expect(client.acquireToken(onBehalfOfRequest)).to.be.rejectedWith(`${ClientAuthErrorMessage.multipleMatchingTokens.desc}`); + await expect(client.acquireToken(onBehalfOfRequest)).rejects.toMatchObject(ClientAuthError.createMultipleMatchingTokensInCacheError()); }); }); diff --git a/lib/msal-common/test/client/RefreshTokenClient.spec.ts b/lib/msal-common/test/client/RefreshTokenClient.spec.ts index b00ed12ebc..290542240a 100644 --- a/lib/msal-common/test/client/RefreshTokenClient.spec.ts +++ b/lib/msal-common/test/client/RefreshTokenClient.spec.ts @@ -3,7 +3,6 @@ * Licensed under the MIT License. */ -import { expect } from "chai"; import sinon from "sinon"; import { AUTHENTICATION_RESULT, @@ -20,16 +19,16 @@ import { AADServerParamKeys, GrantType, Constants, CredentialType, Authenticatio import { ClientTestUtils, MockStorageClass } from "./ClientTestUtils"; import { Authority } from "../../src/authority/Authority"; import { RefreshTokenClient } from "../../src/client/RefreshTokenClient"; -import { RefreshTokenRequest } from "../../src/request/RefreshTokenRequest"; +import { CommonRefreshTokenRequest } from "../../src/request/CommonRefreshTokenRequest"; import { AccountEntity } from "../../src/cache/entities/AccountEntity"; import { RefreshTokenEntity } from "../../src/cache/entities/RefreshTokenEntity"; import { AuthenticationResult } from "../../src/response/AuthenticationResult"; import { AccountInfo } from "../../src/account/AccountInfo"; import { CacheManager } from "../../src/cache/CacheManager"; import { ClientConfiguration } from "../../src/config/ClientConfiguration"; -import { SilentFlowRequest } from "../../src/request/SilentFlowRequest"; -import { ClientAuthErrorMessage } from "../../src/error/ClientAuthError"; -import { ClientConfigurationErrorMessage } from "../../src/error/ClientConfigurationError"; +import { CommonSilentFlowRequest } from "../../src/request/CommonSilentFlowRequest"; +import { ClientAuthError } from "../../src/error/ClientAuthError"; +import { ClientConfigurationError } from "../../src/error/ClientConfigurationError"; import { AuthToken } from "../../src/account/AuthToken"; import { SilentFlowClient } from "../../src/client/SilentFlowClient"; import { AppMetadataEntity } from "../../src/cache/entities/AppMetadataEntity"; @@ -73,9 +72,9 @@ describe("RefreshTokenClient unit tests", () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config = await ClientTestUtils.createTestClientConfiguration(); const client = new RefreshTokenClient(config); - expect(client).to.be.not.null; - expect(client instanceof RefreshTokenClient).to.be.true; - expect(client instanceof BaseClient).to.be.true; + expect(client).not.toBeNull(); + expect(client instanceof RefreshTokenClient).toBe(true); + expect(client instanceof BaseClient).toBe(true); }); }); @@ -89,12 +88,12 @@ describe("RefreshTokenClient unit tests", () => { it("Adds tokenQueryParameters to the /token request", (done) => { sinon.stub(RefreshTokenClient.prototype, "executePostToTokenEndpoint").callsFake((url) => { - expect(url).to.contain("/token?testParam=testValue") + expect(url.includes("/token?testParam=testValue")).toBe(true); done(); }); const client = new RefreshTokenClient(config); - const refreshTokenRequest: RefreshTokenRequest = { + const refreshTokenRequest: CommonRefreshTokenRequest = { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, refreshToken: TEST_TOKENS.REFRESH_TOKEN, claims: TEST_CONFIG.CLAIMS, @@ -134,10 +133,10 @@ describe("RefreshTokenClient unit tests", () => { sinon.stub(CacheManager.prototype, "readRefreshTokenFromCache").returns(testRefreshTokenEntity); config = await ClientTestUtils.createTestClientConfiguration(); - config.storageInterface.setAccount(testAccountEntity); - config.storageInterface.setRefreshTokenCredential(testRefreshTokenEntity); - config.storageInterface.setRefreshTokenCredential(testFamilyRefreshTokenEntity); - config.storageInterface.setAppMetadata(testAppMetadata); + config.storageInterface!.setAccount(testAccountEntity); + config.storageInterface!.setRefreshTokenCredential(testRefreshTokenEntity); + config.storageInterface!.setRefreshTokenCredential(testFamilyRefreshTokenEntity); + config.storageInterface!.setAppMetadata(testAppMetadata); client = new RefreshTokenClient(config); }); @@ -150,7 +149,7 @@ describe("RefreshTokenClient unit tests", () => { sinon.stub(RefreshTokenClient.prototype, "executePostToTokenEndpoint").callsFake((tokenEndpoint: string, queryString: string, headers: Record) => { const headerNames = Object.keys(headers); headerNames.forEach((name) => { - expect(CORS_SIMPLE_REQUEST_HEADERS).contains(name.toLowerCase()); + expect(CORS_SIMPLE_REQUEST_HEADERS.includes(name.toLowerCase())).toBe(true); }); done(); @@ -158,7 +157,7 @@ describe("RefreshTokenClient unit tests", () => { }); const client = new RefreshTokenClient(config); - const refreshTokenRequest: RefreshTokenRequest = { + const refreshTokenRequest: CommonRefreshTokenRequest = { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, refreshToken: TEST_TOKENS.REFRESH_TOKEN, claims: TEST_CONFIG.CLAIMS, @@ -174,7 +173,7 @@ describe("RefreshTokenClient unit tests", () => { sinon.stub(RefreshTokenClient.prototype, "executePostToTokenEndpoint").resolves(AUTHENTICATION_RESULT); const createTokenRequestBodySpy = sinon.spy(RefreshTokenClient.prototype, "createTokenRequestBody"); const client = new RefreshTokenClient(config); - const refreshTokenRequest: RefreshTokenRequest = { + const refreshTokenRequest: CommonRefreshTokenRequest = { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, refreshToken: TEST_TOKENS.REFRESH_TOKEN, claims: TEST_CONFIG.CLAIMS, @@ -186,32 +185,33 @@ describe("RefreshTokenClient unit tests", () => { const authResult: AuthenticationResult = await client.acquireToken(refreshTokenRequest); const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0], "email"]; - expect(authResult.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(authResult.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.account).to.deep.eq(testAccount); - expect(authResult.idToken).to.deep.eq(AUTHENTICATION_RESULT.body.id_token); - expect(authResult.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(authResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT.body.access_token); - expect(authResult.state).to.be.empty; - expect(createTokenRequestBodySpy.calledWith(refreshTokenRequest)).to.be.true; - - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.REFRESH_TOKEN}=${TEST_TOKENS.REFRESH_TOKEN}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.REFRESH_TOKEN_GRANT}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); + expect(authResult.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(authResult.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.account).toEqual(testAccount); + expect(authResult.idToken).toEqual(AUTHENTICATION_RESULT.body.id_token); + expect(authResult.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(authResult.accessToken).toEqual(AUTHENTICATION_RESULT.body.access_token); + expect(authResult.state).toHaveLength(0); + expect(createTokenRequestBodySpy.calledWith(refreshTokenRequest)).toBe(true); + + const result = await createTokenRequestBodySpy.returnValues[0] as string; + expect(result.includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.REFRESH_TOKEN}=${TEST_TOKENS.REFRESH_TOKEN}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.REFRESH_TOKEN_GRANT}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); }); it("acquireTokenByRefreshToken refreshes a token", async () => { sinon.stub(RefreshTokenClient.prototype, "executePostToTokenEndpoint").resolves(AUTHENTICATION_RESULT); - const silentFlowRequest: SilentFlowRequest = { + const silentFlowRequest: CommonSilentFlowRequest = { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, account: testAccount, authority: TEST_CONFIG.validAuthority, @@ -219,7 +219,7 @@ describe("RefreshTokenClient unit tests", () => { forceRefresh: false }; - const expectedRefreshRequest: RefreshTokenRequest = { + const expectedRefreshRequest: CommonRefreshTokenRequest = { ...silentFlowRequest, authenticationScheme: TEST_CONFIG.TOKEN_TYPE_BEARER as AuthenticationScheme, refreshToken: testRefreshTokenEntity.secret @@ -227,14 +227,14 @@ describe("RefreshTokenClient unit tests", () => { const refreshTokenClientSpy = sinon.stub(RefreshTokenClient.prototype, "acquireToken"); await client.acquireTokenByRefreshToken(silentFlowRequest); - expect(refreshTokenClientSpy.calledWith(expectedRefreshRequest)).to.be.true; + expect(refreshTokenClientSpy.calledWith(expectedRefreshRequest)).toBe(true); }); it("does not add claims if none are provided", async () => { sinon.stub(RefreshTokenClient.prototype, "executePostToTokenEndpoint").resolves(AUTHENTICATION_RESULT); const createTokenRequestBodySpy = sinon.spy(RefreshTokenClient.prototype, "createTokenRequestBody"); const client = new RefreshTokenClient(config); - const refreshTokenRequest: RefreshTokenRequest = { + const refreshTokenRequest: CommonRefreshTokenRequest = { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, refreshToken: TEST_TOKENS.REFRESH_TOKEN, authority: TEST_CONFIG.validAuthority, @@ -245,34 +245,35 @@ describe("RefreshTokenClient unit tests", () => { const authResult: AuthenticationResult = await client.acquireToken(refreshTokenRequest); const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0], "email"]; - expect(authResult.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(authResult.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.account).to.deep.eq(testAccount); - expect(authResult.idToken).to.deep.eq(AUTHENTICATION_RESULT.body.id_token); - expect(authResult.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(authResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT.body.access_token); - expect(authResult.state).to.be.empty; - expect(createTokenRequestBodySpy.calledWith(refreshTokenRequest)).to.be.true; - - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.REFRESH_TOKEN}=${TEST_TOKENS.REFRESH_TOKEN}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.REFRESH_TOKEN_GRANT}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.not.eventually.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); + expect(authResult.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(authResult.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.account).toEqual(testAccount); + expect(authResult.idToken).toEqual(AUTHENTICATION_RESULT.body.id_token); + expect(authResult.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(authResult.accessToken).toEqual(AUTHENTICATION_RESULT.body.access_token); + expect(authResult.state).toBe(""); + expect(createTokenRequestBodySpy.calledWith(refreshTokenRequest)).toBe(true); + + const result = await createTokenRequestBodySpy.returnValues[0] as string; + expect(result.includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.REFRESH_TOKEN}=${TEST_TOKENS.REFRESH_TOKEN}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.REFRESH_TOKEN_GRANT}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(false); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); }); it("does not add claims if empty object is provided", async () => { sinon.stub(RefreshTokenClient.prototype, "executePostToTokenEndpoint").resolves(AUTHENTICATION_RESULT); const createTokenRequestBodySpy = sinon.spy(RefreshTokenClient.prototype, "createTokenRequestBody"); const client = new RefreshTokenClient(config); - const refreshTokenRequest: RefreshTokenRequest = { + const refreshTokenRequest: CommonRefreshTokenRequest = { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, refreshToken: TEST_TOKENS.REFRESH_TOKEN, authority: TEST_CONFIG.validAuthority, @@ -284,27 +285,28 @@ describe("RefreshTokenClient unit tests", () => { const authResult: AuthenticationResult = await client.acquireToken(refreshTokenRequest); const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0], "email"]; - expect(authResult.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(authResult.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.account).to.deep.eq(testAccount); - expect(authResult.idToken).to.deep.eq(AUTHENTICATION_RESULT.body.id_token); - expect(authResult.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(authResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT.body.access_token); - expect(authResult.state).to.be.empty; - expect(createTokenRequestBodySpy.calledWith(refreshTokenRequest)).to.be.true; - - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.REFRESH_TOKEN}=${TEST_TOKENS.REFRESH_TOKEN}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.REFRESH_TOKEN_GRANT}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.not.eventually.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); + expect(authResult.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(authResult.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.account).toEqual(testAccount); + expect(authResult.idToken).toEqual(AUTHENTICATION_RESULT.body.id_token); + expect(authResult.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(authResult.accessToken).toEqual(AUTHENTICATION_RESULT.body.access_token); + expect(authResult.state).toBe(""); + expect(createTokenRequestBodySpy.calledWith(refreshTokenRequest)).toBe(true); + + const result = await createTokenRequestBodySpy.returnValues[0] as string; + expect(result.includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.REFRESH_TOKEN}=${TEST_TOKENS.REFRESH_TOKEN}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.REFRESH_TOKEN_GRANT}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(false); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); }); }); @@ -331,10 +333,10 @@ describe("RefreshTokenClient unit tests", () => { sinon.stub(CacheManager.prototype, "readRefreshTokenFromCache").returns(testFamilyRefreshTokenEntity); config = await ClientTestUtils.createTestClientConfiguration(); - config.storageInterface.setAccount(testAccountEntity); - config.storageInterface.setRefreshTokenCredential(testRefreshTokenEntity); - config.storageInterface.setRefreshTokenCredential(testFamilyRefreshTokenEntity); - config.storageInterface.setAppMetadata(testAppMetadata); + config.storageInterface!.setAccount(testAccountEntity); + config.storageInterface!.setRefreshTokenCredential(testRefreshTokenEntity); + config.storageInterface!.setRefreshTokenCredential(testFamilyRefreshTokenEntity); + config.storageInterface!.setAppMetadata(testAppMetadata); client = new RefreshTokenClient(config); }); @@ -345,7 +347,7 @@ describe("RefreshTokenClient unit tests", () => { it("acquires a token (FOCI)", async () => { const createTokenRequestBodySpy = sinon.spy(RefreshTokenClient.prototype, "createTokenRequestBody"); const client = new RefreshTokenClient(config); - const refreshTokenRequest: RefreshTokenRequest = { + const refreshTokenRequest: CommonRefreshTokenRequest = { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, refreshToken: TEST_TOKENS.REFRESH_TOKEN, claims: TEST_CONFIG.CLAIMS, @@ -356,28 +358,29 @@ describe("RefreshTokenClient unit tests", () => { const authResult: AuthenticationResult = await client.acquireToken(refreshTokenRequest); const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0], "email"]; - expect(authResult.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(authResult.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.account).to.deep.eq(testAccount); - expect(authResult.idToken).to.deep.eq(AUTHENTICATION_RESULT_WITH_FOCI.body.id_token); - expect(authResult.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(authResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT_WITH_FOCI.body.access_token); - expect(authResult.familyId).to.deep.eq(AUTHENTICATION_RESULT_WITH_FOCI.body.foci); - expect(authResult.state).to.be.empty; - - expect(createTokenRequestBodySpy.calledWith(refreshTokenRequest)).to.be.true; - - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.REFRESH_TOKEN}=${TEST_TOKENS.REFRESH_TOKEN}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.REFRESH_TOKEN_GRANT}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`); - await expect(createTokenRequestBodySpy.returnValues[0]).to.eventually.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); + expect(authResult.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(authResult.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.account).toEqual(testAccount); + expect(authResult.idToken).toEqual(AUTHENTICATION_RESULT_WITH_FOCI.body.id_token); + expect(authResult.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(authResult.accessToken).toEqual(AUTHENTICATION_RESULT_WITH_FOCI.body.access_token); + expect(authResult.familyId).toEqual(AUTHENTICATION_RESULT_WITH_FOCI.body.foci); + expect(authResult.state).toHaveLength(0); + + expect(createTokenRequestBodySpy.calledWith(refreshTokenRequest)).toBe(true); + + const result = await createTokenRequestBodySpy.returnValues[0] as string; + expect(result.includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.REFRESH_TOKEN}=${TEST_TOKENS.REFRESH_TOKEN}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.GRANT_TYPE}=${GrantType.REFRESH_TOKEN_GRANT}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLIENT_SECRET}=${TEST_CONFIG.MSAL_CLIENT_SECRET}`)).toBe(true); + expect(result.includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(true); }); it("acquireTokenByRefreshToken refreshes a token (FOCI)", async () => { - const silentFlowRequest: SilentFlowRequest = { + const silentFlowRequest: CommonSilentFlowRequest = { scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, account: testAccount, authority: TEST_CONFIG.validAuthority, @@ -385,7 +388,7 @@ describe("RefreshTokenClient unit tests", () => { forceRefresh: false }; - const expectedRefreshRequest: RefreshTokenRequest = { + const expectedRefreshRequest: CommonRefreshTokenRequest = { ...silentFlowRequest, refreshToken: testRefreshTokenEntity.secret, authenticationScheme: TEST_CONFIG.TOKEN_TYPE_BEARER as AuthenticationScheme @@ -393,7 +396,7 @@ describe("RefreshTokenClient unit tests", () => { const refreshTokenClientSpy = sinon.stub(RefreshTokenClient.prototype, "acquireToken"); await client.acquireTokenByRefreshToken(silentFlowRequest); - expect(refreshTokenClientSpy.calledWith(expectedRefreshRequest)).to.be.true; + expect(refreshTokenClientSpy.calledWith(expectedRefreshRequest)).toBe(true); }); }); @@ -405,23 +408,27 @@ describe("RefreshTokenClient unit tests", () => { const client = new RefreshTokenClient(config); await expect(client.acquireTokenByRefreshToken({ scopes: TEST_CONFIG.DEFAULT_GRAPH_SCOPE, + // @ts-ignore account: null, authority: TEST_CONFIG.validAuthority, correlationId: TEST_CONFIG.CORRELATION_ID, forceRefresh: false - })).to.be.rejectedWith(ClientAuthErrorMessage.NoAccountInSilentRequest.desc); + })).rejects.toMatchObject(ClientAuthError.createNoAccountInSilentRequestError()); }); it("Throws error if request object is null or undefined", async () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config = await ClientTestUtils.createTestClientConfiguration(); const client = new RefreshTokenClient(config); - await expect(client.acquireTokenByRefreshToken(null)).to.be.rejectedWith(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc); - await expect(client.acquireTokenByRefreshToken(undefined)).to.be.rejectedWith(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc); + //@ts-ignore + await expect(client.acquireTokenByRefreshToken(null)).rejects.toMatchObject(ClientConfigurationError.createEmptyTokenRequestError()); + //@ts-ignore + await expect(client.acquireTokenByRefreshToken(undefined)).rejects.toMatchObject(ClientConfigurationError.createEmptyTokenRequestError()); }); it("Throws error if it does not find token in cache", async () => { const testAccount: AccountInfo = { + localAccountId: TEST_DATA_CLIENT_INFO.TEST_LOCAL_ACCOUNT_ID, homeAccountId: TEST_DATA_CLIENT_INFO.TEST_HOME_ACCOUNT_ID, environment: "login.windows.net", tenantId: "testTenantId", @@ -437,7 +444,7 @@ describe("RefreshTokenClient unit tests", () => { testAccountEntity.authorityType = "MSSTS"; sinon.stub(MockStorageClass.prototype, "getAccount").returns(testAccountEntity); sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); - const tokenRequest: SilentFlowRequest = { + const tokenRequest: CommonSilentFlowRequest = { scopes: [testScope2], account: testAccount, authority: TEST_CONFIG.validAuthority, @@ -446,7 +453,7 @@ describe("RefreshTokenClient unit tests", () => { }; const config = await ClientTestUtils.createTestClientConfiguration(); const client = new SilentFlowClient(config); - await expect(client.acquireToken(tokenRequest)).to.be.rejectedWith(ClientAuthErrorMessage.noTokensFoundError.desc); + await expect(client.acquireToken(tokenRequest)).rejects.toMatchObject(ClientAuthError.createNoTokensFoundError()); }); }); }); diff --git a/lib/msal-common/test/client/SilentFlowClient.spec.ts b/lib/msal-common/test/client/SilentFlowClient.spec.ts index f9a4924641..8c607f4a84 100644 --- a/lib/msal-common/test/client/SilentFlowClient.spec.ts +++ b/lib/msal-common/test/client/SilentFlowClient.spec.ts @@ -3,8 +3,6 @@ * Licensed under the MIT License. */ -import { expect } from "chai"; -import chaiAsPromised from "chai-as-promised"; import sinon from "sinon"; import { AUTHENTICATION_RESULT, @@ -17,13 +15,13 @@ import { } from "../test_kit/StringConstants"; import { BaseClient } from "../../src/client/BaseClient"; import { AuthenticationScheme, Constants, CredentialType } from "../../src/utils/Constants"; -import { ClientTestUtils, MockStorageClass } from "./ClientTestUtils"; +import { ClientTestUtils, MockStorageClass, mockCrypto } from "./ClientTestUtils"; import { Authority } from "../../src/authority/Authority"; import { SilentFlowClient } from "../../src/client/SilentFlowClient"; import { RefreshTokenClient } from "../../src/client/RefreshTokenClient"; import { AuthenticationResult } from "../../src/response/AuthenticationResult"; import { AccountInfo } from "../../src/account/AccountInfo"; -import { CommonSilentFlowRequest, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, CacheManager, ClientConfigurationErrorMessage, ClientAuthErrorMessage, TimeUtils, ClientConfiguration, RefreshTokenRequest, ServerTelemetryManager, TokenClaims } from "../../src"; +import { CommonSilentFlowRequest, AccountEntity, IdTokenEntity, AccessTokenEntity, RefreshTokenEntity, CacheManager, TimeUtils, ClientConfiguration, CommonRefreshTokenRequest, ServerTelemetryManager, ClientAuthError, ClientConfigurationError } from "../../src"; import { AuthToken } from "../../src/account/AuthToken"; import { ScopeSet } from "../../src/request/ScopeSet"; import { PopTokenGenerator } from "../../src/crypto/PopTokenGenerator"; @@ -91,14 +89,14 @@ describe("SilentFlowClient unit tests", () => { sinon.restore(); }); - describe("Constructor", async () => { + describe("Constructor", () => { it("creates a SilentFlowClient", async () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config = await ClientTestUtils.createTestClientConfiguration(); const client = new SilentFlowClient(config); - expect(client).to.be.not.null; - expect(client instanceof SilentFlowClient).to.be.true; - expect(client instanceof BaseClient).to.be.true; + expect(client).not.toBeNull(); + expect(client instanceof SilentFlowClient).toBe(true); + expect(client instanceof BaseClient).toBe(true); }); }); @@ -128,15 +126,15 @@ describe("SilentFlowClient unit tests", () => { }; const response = await client.acquireCachedToken(silentFlowRequest); - expect(response.authority).to.be.eq(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); - expect(response.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(response.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(response.scopes).to.deep.eq(testScopes); - expect(response.account).to.deep.eq(testAccount); - expect(response.idToken).to.deep.eq(testIdToken.secret); - expect(response.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(response.accessToken).to.deep.eq(testAccessTokenEntity.secret); - expect(response.state).to.be.empty; + expect(response.authority).toBe(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); + expect(response.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(response.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(response.scopes).toEqual(testScopes); + expect(response.account).toEqual(testAccount); + expect(response.idToken).toEqual(testIdToken.secret); + expect(response.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(response.accessToken).toEqual(testAccessTokenEntity.secret); + expect(response.state).toHaveLength(0); }); it("acquireCachedToken() looks up Bearer token when AuthenticationScheme is not set in request", async () => { @@ -163,15 +161,15 @@ describe("SilentFlowClient unit tests", () => { }; const response = await client.acquireCachedToken(silentFlowRequest); - expect(response.authority).to.be.eq(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); - expect(response.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(response.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(response.scopes).to.deep.eq(testScopes); - expect(response.account).to.deep.eq(testAccount); - expect(response.idToken).to.deep.eq(testIdToken.secret); - expect(response.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(response.accessToken).to.deep.eq(testAccessTokenEntity.secret); - expect(response.state).to.be.empty; + expect(response.authority).toBe(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); + expect(response.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(response.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(response.scopes).toEqual(testScopes); + expect(response.account).toEqual(testAccount); + expect(response.idToken).toEqual(testIdToken.secret); + expect(response.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(response.accessToken).toEqual(testAccessTokenEntity.secret); + expect(response.state).toHaveLength(0); expect(readCacheRecordSpy.calledWith(testAccount, config.authOptions.clientId, new ScopeSet(silentFlowRequest.scopes), silentFlowRequest.authority, AuthenticationScheme.BEARER)); }); @@ -200,15 +198,15 @@ describe("SilentFlowClient unit tests", () => { }; const response = await client.acquireCachedToken(silentFlowRequest); - expect(response.authority).to.be.eq(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); - expect(response.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(response.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(response.scopes).to.deep.eq(testScopes); - expect(response.account).to.deep.eq(testAccount); - expect(response.idToken).to.deep.eq(testIdToken.secret); - expect(response.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(response.accessToken).to.deep.eq(testAccessTokenEntity.secret); - expect(response.state).to.be.empty; + expect(response.authority).toBe(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); + expect(response.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(response.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(response.scopes).toEqual(testScopes); + expect(response.account).toEqual(testAccount); + expect(response.idToken).toEqual(testIdToken.secret); + expect(response.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(response.accessToken).toEqual(testAccessTokenEntity.secret); + expect(response.state).toHaveLength(0); expect(readCacheRecordSpy.calledWith(testAccount, config.authOptions.clientId, new ScopeSet(silentFlowRequest.scopes), silentFlowRequest.authority, AuthenticationScheme.BEARER)); }); @@ -238,15 +236,15 @@ describe("SilentFlowClient unit tests", () => { }; const response = await client.acquireCachedToken(silentFlowRequest); - expect(response.authority).to.be.eq(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); - expect(response.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(response.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(response.scopes).to.deep.eq(testScopes); - expect(response.account).to.deep.eq(testAccount); - expect(response.idToken).to.deep.eq(testIdToken.secret); - expect(response.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(response.accessToken).to.deep.eq(testAccessTokenWithAuthSchemeEntity.secret); - expect(response.state).to.be.empty; + expect(response.authority).toBe(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); + expect(response.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(response.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(response.scopes).toEqual(testScopes); + expect(response.account).toEqual(testAccount); + expect(response.idToken).toEqual(testIdToken.secret); + expect(response.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(response.accessToken).toEqual(testAccessTokenWithAuthSchemeEntity.secret); + expect(response.state).toHaveLength(0); expect(readCacheRecordSpy.calledWith(testAccount, config.authOptions.clientId, new ScopeSet(silentFlowRequest.scopes), silentFlowRequest.authority, AuthenticationScheme.POP)); }); @@ -273,15 +271,15 @@ describe("SilentFlowClient unit tests", () => { }; const response = await client.acquireCachedToken(silentFlowRequest); - expect(response.authority).to.be.eq(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); - expect(response.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(response.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(response.scopes).to.deep.eq(testScopes); - expect(response.account).to.deep.eq(testAccount); - expect(response.idToken).to.deep.eq(testIdToken.secret); - expect(response.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(response.accessToken).to.deep.eq(testAccessTokenEntity.secret); - expect(response.state).to.be.empty; + expect(response.authority).toEqual(`${TEST_URIS.DEFAULT_INSTANCE}${TEST_CONFIG.TENANT}/`); + expect(response.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(response.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(response.scopes).toEqual(testScopes); + expect(response.account).toEqual(testAccount); + expect(response.idToken).toEqual(testIdToken.secret); + expect(response.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(response.accessToken).toEqual(testAccessTokenEntity.secret); + expect(response.state).toBe(""); }); }); @@ -293,28 +291,34 @@ describe("SilentFlowClient unit tests", () => { const client = new SilentFlowClient(config); await expect(client.acquireToken({ scopes: TEST_CONFIG.DEFAULT_SCOPES, + // @ts-ignore account: null, authority: TEST_CONFIG.validAuthority, correlationId: TEST_CONFIG.CORRELATION_ID, forceRefresh: false - })).to.be.rejectedWith(ClientAuthErrorMessage.NoAccountInSilentRequest.desc); + })).rejects.toMatchObject(ClientAuthError.createNoAccountInSilentRequestError()); await expect(client.acquireCachedToken({ scopes: TEST_CONFIG.DEFAULT_SCOPES, + // @ts-ignore account: null, authority: TEST_CONFIG.validAuthority, correlationId: TEST_CONFIG.CORRELATION_ID, forceRefresh: false - })).to.be.rejectedWith(ClientAuthErrorMessage.NoAccountInSilentRequest.desc); + })).rejects.toMatchObject(ClientAuthError.createNoAccountInSilentRequestError()); }); it("Throws error if request object is null or undefined", async () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config = await ClientTestUtils.createTestClientConfiguration(); const client = new SilentFlowClient(config); - await expect(client.acquireToken(null)).to.be.rejectedWith(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc); - await expect(client.acquireToken(undefined)).to.be.rejectedWith(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc); - await expect(client.acquireCachedToken(null)).to.be.rejectedWith(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc); - await expect(client.acquireCachedToken(undefined)).to.be.rejectedWith(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc); + //@ts-ignore + await expect(client.acquireToken(null)).rejects.toMatchObject(ClientConfigurationError.createEmptyTokenRequestError()); + //@ts-ignore + await expect(client.acquireToken(undefined)).rejects.toMatchObject(ClientConfigurationError.createEmptyTokenRequestError()); + //@ts-ignore + await expect(client.acquireCachedToken(null)).rejects.toMatchObject(ClientConfigurationError.createEmptyTokenRequestError()); + //@ts-ignore + await expect(client.acquireCachedToken(undefined)).rejects.toMatchObject(ClientConfigurationError.createEmptyTokenRequestError()); }); it("Throws error if scopes are not included in request object", async () => { @@ -322,12 +326,13 @@ describe("SilentFlowClient unit tests", () => { const config = await ClientTestUtils.createTestClientConfiguration(); const client = new SilentFlowClient(config); await expect(client.acquireToken({ - scopes: null, + //@ts-ignore + scopes: undefined, account: testAccount, authority: TEST_CONFIG.validAuthority, correlationId: TEST_CONFIG.CORRELATION_ID, forceRefresh: false - })).to.be.rejectedWith(ClientConfigurationErrorMessage.emptyScopesError.desc); + })).rejects.toMatchObject(ClientConfigurationError.createEmptyScopesArrayError()); }); it("Throws error if scopes are empty in request object", async () => { @@ -341,7 +346,7 @@ describe("SilentFlowClient unit tests", () => { sinon.stub(Authority.prototype, "getEndpointMetadataFromNetwork").resolves(DEFAULT_OPENID_CONFIG_RESPONSE.body); const config = await ClientTestUtils.createTestClientConfiguration(); const client = new SilentFlowClient(config); - await expect(client.acquireToken(tokenRequest)).to.be.rejectedWith(ClientConfigurationErrorMessage.emptyScopesError.desc); + await expect(client.acquireToken(tokenRequest)).rejects.toMatchObject(ClientConfigurationError.createEmptyScopesArrayError()); }); it("Throws error if it does not find token in cache", async () => { @@ -364,7 +369,7 @@ describe("SilentFlowClient unit tests", () => { }; const config = await ClientTestUtils.createTestClientConfiguration(); const client = new SilentFlowClient(config); - await expect(client.acquireToken(tokenRequest)).to.be.rejectedWith(ClientAuthErrorMessage.noTokensFoundError.desc); + await expect(client.acquireToken(tokenRequest)).rejects.toMatchObject(ClientConfigurationError.createNoTokensFoundError()); }); it("acquireCachedToken throws refresh requiredError if forceRefresh set to true", async () => { @@ -387,7 +392,7 @@ describe("SilentFlowClient unit tests", () => { forceRefresh: true }; - await expect(client.acquireCachedToken(silentFlowRequest)).to.be.rejectedWith(ClientAuthErrorMessage.tokenRefreshRequired.desc); + expect(client.acquireCachedToken(silentFlowRequest)).rejects.toMatchObject(ClientAuthError.createRefreshRequiredError()); }); it("acquireCachedToken throws refresh requiredError if claims included on request", async () => { @@ -410,7 +415,7 @@ describe("SilentFlowClient unit tests", () => { claims: TEST_CONFIG.CLAIMS }; - await expect(client.acquireCachedToken(silentFlowRequest)).to.be.rejectedWith(ClientAuthErrorMessage.tokenRefreshRequired.desc); + expect(client.acquireCachedToken(silentFlowRequest)).rejects.toMatchObject(ClientAuthError.createRefreshRequiredError()); }); it("acquireCachedToken throws refresh requiredError if access token is expired", async () => { @@ -432,7 +437,7 @@ describe("SilentFlowClient unit tests", () => { forceRefresh: false }; - await expect(client.acquireCachedToken(silentFlowRequest)).to.be.rejectedWith(ClientAuthErrorMessage.tokenRefreshRequired.desc); + expect(client.acquireCachedToken(silentFlowRequest)).rejects.toMatchObject(ClientAuthError.createRefreshRequiredError()); }); it("acquireCachedToken throws refresh requiredError if no access token is cached", async () => { @@ -454,7 +459,7 @@ describe("SilentFlowClient unit tests", () => { forceRefresh: false }; - await expect(client.acquireCachedToken(silentFlowRequest)).to.be.rejectedWith(ClientAuthErrorMessage.tokenRefreshRequired.desc); + expect(client.acquireCachedToken(silentFlowRequest)).rejects.toMatchObject(ClientAuthError.createRefreshRequiredError()); }); }); @@ -502,16 +507,16 @@ describe("SilentFlowClient unit tests", () => { const refreshTokenSpy = sinon.stub(RefreshTokenClient.prototype, "acquireToken"); const authResult = await client.acquireToken(silentFlowRequest); - expect(refreshTokenSpy.called).to.be.false; + expect(refreshTokenSpy.called).toBe(false); const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(authResult.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.account).to.deep.eq(testAccount); - expect(authResult.idToken).to.deep.eq(testIdToken.secret); - expect(authResult.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(authResult.accessToken).to.deep.eq(testAccessTokenEntity.secret); - expect(authResult.state).to.be.empty; + expect(authResult.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(authResult.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.account).toEqual(testAccount); + expect(authResult.idToken).toEqual(testIdToken.secret); + expect(authResult.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(authResult.accessToken).toEqual(testAccessTokenEntity.secret); + expect(authResult.state).toHaveLength(0); }); it("acquireToken calls refreshToken if refresh is required", async () => { @@ -523,7 +528,7 @@ describe("SilentFlowClient unit tests", () => { forceRefresh: false }; - const expectedRefreshRequest: RefreshTokenRequest = { + const expectedRefreshRequest: CommonRefreshTokenRequest = { ...silentFlowRequest, refreshToken: testRefreshTokenEntity.secret, authenticationScheme: TEST_CONFIG.TOKEN_TYPE_BEARER as AuthenticationScheme @@ -533,8 +538,8 @@ describe("SilentFlowClient unit tests", () => { const refreshTokenClientSpy = sinon.stub(RefreshTokenClient.prototype, "acquireToken"); await client.acquireToken(silentFlowRequest); - expect(refreshTokenClientSpy.called).to.be.true; - expect(refreshTokenClientSpy.calledWith(expectedRefreshRequest)).to.be.true; + expect(refreshTokenClientSpy.called).toBe(true); + expect(refreshTokenClientSpy.calledWith(expectedRefreshRequest)).toBe(true); }); it("acquireCachedToken returns cached token", async () => { @@ -542,7 +547,7 @@ describe("SilentFlowClient unit tests", () => { clientId: TEST_CONFIG.MSAL_CLIENT_ID, apiId: 862, correlationId: "test-correlation-id" - }, null); + }, new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto)); client = new SilentFlowClient(config); const telemetryCacheHitSpy = sinon.stub(ServerTelemetryManager.prototype, "incrementCacheHits").returns(1); sinon.stub(TimeUtils, "isTokenExpired").returns(false); @@ -557,15 +562,15 @@ describe("SilentFlowClient unit tests", () => { const authResult: AuthenticationResult = await client.acquireCachedToken(silentFlowRequest); const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(telemetryCacheHitSpy.calledOnce).to.be.true; - expect(authResult.uniqueId).to.deep.eq(ID_TOKEN_CLAIMS.oid); - expect(authResult.tenantId).to.deep.eq(ID_TOKEN_CLAIMS.tid); - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.account).to.deep.eq(testAccount); - expect(authResult.idToken).to.deep.eq(testIdToken.secret); - expect(authResult.idTokenClaims).to.deep.eq(ID_TOKEN_CLAIMS); - expect(authResult.accessToken).to.deep.eq(testAccessTokenEntity.secret); - expect(authResult.state).to.be.empty; + expect(telemetryCacheHitSpy.calledOnce).toBe(true); + expect(authResult.uniqueId).toEqual(ID_TOKEN_CLAIMS.oid); + expect(authResult.tenantId).toEqual(ID_TOKEN_CLAIMS.tid); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.account).toEqual(testAccount); + expect(authResult.idToken).toEqual(testIdToken.secret); + expect(authResult.idTokenClaims).toEqual(ID_TOKEN_CLAIMS); + expect(authResult.accessToken).toEqual(testAccessTokenEntity.secret); + expect(authResult.state).toHaveLength(0); }); it("acquireCachedToken throws refresh requiredError if access token is expired", async () => { @@ -580,7 +585,7 @@ describe("SilentFlowClient unit tests", () => { forceRefresh: false }; - await expect(client.acquireCachedToken(silentFlowRequest)).to.be.rejectedWith(ClientAuthErrorMessage.tokenRefreshRequired.desc); + expect(client.acquireCachedToken(silentFlowRequest)).rejects.toMatchObject(ClientAuthError.createRefreshRequiredError()); }); it("refreshes token if refreshOn time has passed", async () => { @@ -604,7 +609,7 @@ describe("SilentFlowClient unit tests", () => { forceRefresh: false }; - const expectedRefreshRequest: RefreshTokenRequest = { + const expectedRefreshRequest: CommonRefreshTokenRequest = { ...silentFlowRequest, refreshToken: testRefreshTokenEntity.secret, authenticationScheme: TEST_CONFIG.TOKEN_TYPE_BEARER as AuthenticationScheme @@ -613,8 +618,8 @@ describe("SilentFlowClient unit tests", () => { const refreshTokenSpy = sinon.stub(RefreshTokenClient.prototype, "acquireToken"); await client.acquireToken(silentFlowRequest); - expect(refreshTokenSpy.called).to.be.true; - expect(refreshTokenSpy.calledWith(expectedRefreshRequest)).to.be.true; + expect(refreshTokenSpy.called).toBe(true); + expect(refreshTokenSpy.calledWith(expectedRefreshRequest)).toBe(true); }); }); }); diff --git a/lib/msal-common/test/client/UsernamePasswordClient.spec.ts b/lib/msal-common/test/client/UsernamePasswordClient.spec.ts index fb0577c9c7..c8c417c186 100644 --- a/lib/msal-common/test/client/UsernamePasswordClient.spec.ts +++ b/lib/msal-common/test/client/UsernamePasswordClient.spec.ts @@ -3,13 +3,11 @@ * Licensed under the MIT License. */ -import { expect } from "chai"; import sinon from "sinon"; import { AUTHENTICATION_RESULT_DEFAULT_SCOPES, DEFAULT_OPENID_CONFIG_RESPONSE, TEST_CONFIG, - TEST_TOKENS, TEST_DATA_CLIENT_INFO, TEST_URIS, CORS_SIMPLE_REQUEST_HEADERS, @@ -22,7 +20,7 @@ import { Authority } from "../../src/authority/Authority"; import { UsernamePasswordClient } from "../../src/client/UsernamePasswordClient"; import { CommonUsernamePasswordRequest } from "../../src/request/CommonUsernamePasswordRequest"; import { AuthToken } from "../../src/account/AuthToken"; -import { ClientConfiguration } from "../../src"; +import { AuthenticationResult, ClientConfiguration } from "../../src"; describe("Username Password unit tests", () => { let config: ClientConfiguration; @@ -32,7 +30,7 @@ describe("Username Password unit tests", () => { config = await ClientTestUtils.createTestClientConfiguration(); // Set up required objects and mocked return values const decodedLibState = `{ "id": "testid", "ts": 1592846482 }`; - config.cryptoInterface.base64Decode = (input: string): string => { + config.cryptoInterface!.base64Decode = (input: string): string => { switch (input) { case TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO: return TEST_DATA_CLIENT_INFO.TEST_DECODED_CLIENT_INFO; @@ -43,7 +41,7 @@ describe("Username Password unit tests", () => { } }; - config.cryptoInterface.base64Encode = (input: string): string => { + config.cryptoInterface!.base64Encode = (input: string): string => { switch (input) { case "123-test-uid": return "MTIzLXRlc3QtdWlk"; @@ -76,13 +74,13 @@ describe("Username Password unit tests", () => { sinon.restore(); }); - describe("Constructor", async () => { + describe("Constructor", () => { it("creates a UsernamePasswordClient", async () => { const client = new UsernamePasswordClient(config); - expect(client).to.be.not.null; - expect(client instanceof UsernamePasswordClient).to.be.true; - expect(client instanceof BaseClient).to.be.true; + expect(client).not.toBeNull(); + expect(client instanceof UsernamePasswordClient).toBe(true); + expect(client instanceof BaseClient).toBe(true); }); }); @@ -91,7 +89,7 @@ describe("Username Password unit tests", () => { sinon.stub(UsernamePasswordClient.prototype, "executePostToTokenEndpoint").callsFake((tokenEndpoint: string, queryString: string, headers: Record) => { const headerNames = Object.keys(headers); headerNames.forEach((name) => { - expect(CORS_SIMPLE_REQUEST_HEADERS).contains(name.toLowerCase()); + expect(CORS_SIMPLE_REQUEST_HEADERS.includes(name.toLowerCase())).toBe(true); }); done(); @@ -125,26 +123,25 @@ describe("Username Password unit tests", () => { correlationId: RANDOM_TEST_GUID }; - const authResult = await client.acquireToken(usernamePasswordRequest); + const authResult = await client.acquireToken(usernamePasswordRequest) as AuthenticationResult; const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, Constants.OFFLINE_ACCESS_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.idToken).to.deep.eq(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.id_token); - expect(authResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.access_token); - expect(authResult.state).to.be.empty; - - expect(createTokenRequestBodySpy.calledWith(usernamePasswordRequest)).to.be.true; - - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.GRANT_TYPE}=${encodeURIComponent(GrantType.RESOURCE_OWNER_PASSWORD_GRANT)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${PasswordGrantConstants.username}=mock_name`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${PasswordGrantConstants.password}=mock_password`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.idToken).toEqual(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.id_token); + expect(authResult.accessToken).toEqual(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.access_token); + expect(authResult.state).toHaveLength(0); + + expect(createTokenRequestBodySpy.calledWith(usernamePasswordRequest)).toBe(true); + + expect(createTokenRequestBodySpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_ID}=${encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.GRANT_TYPE}=${encodeURIComponent(GrantType.RESOURCE_OWNER_PASSWORD_GRANT)}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${PasswordGrantConstants.username}=mock_name`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${PasswordGrantConstants.password}=mock_password`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); }); it("Does not include claims if empty object is passed", async () => { @@ -162,25 +159,25 @@ describe("Username Password unit tests", () => { claims: "{}" }; - const authResult = await client.acquireToken(usernamePasswordRequest); + const authResult = await client.acquireToken(usernamePasswordRequest) as AuthenticationResult; const expectedScopes = [Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, Constants.OFFLINE_ACCESS_SCOPE, TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]]; - expect(authResult.scopes).to.deep.eq(expectedScopes); - expect(authResult.idToken).to.deep.eq(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.id_token); - expect(authResult.accessToken).to.deep.eq(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.access_token); - expect(authResult.state).to.be.empty; - - expect(createTokenRequestBodySpy.calledWith(usernamePasswordRequest)).to.be.true; - - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.CLIENT_ID}=${encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.GRANT_TYPE}=${encodeURIComponent(GrantType.RESOURCE_OWNER_PASSWORD_GRANT)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${PasswordGrantConstants.username}=mock_name`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${PasswordGrantConstants.password}=mock_password`); - expect(createTokenRequestBodySpy.returnValues[0]).to.not.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`); - expect(createTokenRequestBodySpy.returnValues[0]).to.contain(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`); + expect(authResult.scopes).toEqual(expectedScopes); + expect(authResult.idToken).toEqual(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.id_token); + expect(authResult.accessToken).toEqual(AUTHENTICATION_RESULT_DEFAULT_SCOPES.body.access_token); + expect(authResult.state).toBe(""); + + expect(createTokenRequestBodySpy.calledWith(usernamePasswordRequest)).toBe(true); + + expect(createTokenRequestBodySpy.returnValues[0].includes(`${TEST_CONFIG.DEFAULT_GRAPH_SCOPE[0]}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLIENT_ID}=${encodeURIComponent(TEST_CONFIG.MSAL_CLIENT_ID)}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.GRANT_TYPE}=${encodeURIComponent(GrantType.RESOURCE_OWNER_PASSWORD_GRANT)}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${PasswordGrantConstants.username}=mock_name`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${PasswordGrantConstants.password}=mock_password`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(false); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_SKU}=${Constants.SKU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_VER}=${TEST_CONFIG.TEST_VERSION}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_OS}=${TEST_CONFIG.TEST_OS}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_CLIENT_CPU}=${TEST_CONFIG.TEST_CPU}`)).toBe(true); + expect(createTokenRequestBodySpy.returnValues[0].includes(`${AADServerParamKeys.X_MS_LIB_CAPABILITY}=${ThrottlingConstants.X_MS_LIB_CAPABILITY_VALUE}`)).toBe(true); }); }); diff --git a/lib/msal-common/test/config/ClientConfiguration.spec.ts b/lib/msal-common/test/config/ClientConfiguration.spec.ts index 93e5a9e5f9..ce2c90cafe 100644 --- a/lib/msal-common/test/config/ClientConfiguration.spec.ts +++ b/lib/msal-common/test/config/ClientConfiguration.spec.ts @@ -1,5 +1,4 @@ -import { expect } from "chai"; -import { ClientConfiguration, buildClientConfiguration } from "../../src/config/ClientConfiguration"; +import { CommonClientConfiguration, buildClientConfiguration } from "../../src/config/ClientConfiguration"; import { PkceCodes } from "../../src/crypto/ICrypto"; import { AuthError } from "../../src/error/AuthError"; import { NetworkRequestOptions } from "../../src/network/INetworkModule"; @@ -7,67 +6,83 @@ import { LogLevel } from "../../src/logger/Logger"; import { Constants } from "../../src"; import { version } from "../../src/packageMetadata"; import {TEST_CONFIG, TEST_POP_VALUES} from "../test_kit/StringConstants"; -import { MockStorageClass } from "../client/ClientTestUtils"; +import { MockStorageClass, mockCrypto } from "../client/ClientTestUtils"; import { MockCache } from "../cache/entities/cacheConstants"; describe("ClientConfiguration.ts Class Unit Tests", () => { it("buildConfiguration assigns default functions", async () => { - const emptyConfig: ClientConfiguration = buildClientConfiguration({ + const emptyConfig: CommonClientConfiguration = buildClientConfiguration({ + //@ts-ignore authOptions: { clientId: TEST_CONFIG.MSAL_CLIENT_ID } }); // Crypto interface checks - expect(emptyConfig.cryptoInterface).to.be.not.null; - expect(emptyConfig.cryptoInterface.base64Decode).to.be.not.null; - expect(() => emptyConfig.cryptoInterface.base64Decode("test input")).to.throw("Unexpected error in authentication.: Crypto interface - base64Decode() has not been implemented"); - expect(() => emptyConfig.cryptoInterface.base64Decode("test input")).to.throw(AuthError); - expect(emptyConfig.cryptoInterface.base64Encode).to.be.not.null; - expect(() => emptyConfig.cryptoInterface.base64Encode("test input")).to.throw("Unexpected error in authentication.: Crypto interface - base64Encode() has not been implemented"); - expect(() => emptyConfig.cryptoInterface.base64Encode("test input")).to.throw(AuthError); - expect(emptyConfig.cryptoInterface.generatePkceCodes).to.be.not.null; - await expect(emptyConfig.cryptoInterface.generatePkceCodes()).to.be.rejectedWith("Unexpected error in authentication.: Crypto interface - generatePkceCodes() has not been implemented"); - await expect(emptyConfig.cryptoInterface.generatePkceCodes()).to.be.rejectedWith(AuthError); + expect(emptyConfig.cryptoInterface).not.toBeNull(); + expect(emptyConfig.cryptoInterface.base64Decode).not.toBeNull(); + expect(() => emptyConfig.cryptoInterface.base64Decode("test input")).toThrowError( + "Unexpected error in authentication.: Crypto interface - base64Decode() has not been implemented" + ); + expect(() => emptyConfig.cryptoInterface.base64Decode("test input")).toThrowError(AuthError); + expect(emptyConfig.cryptoInterface.base64Encode).not.toBeNull(); + expect(() => emptyConfig.cryptoInterface.base64Encode("test input")).toThrowError( + "Unexpected error in authentication.: Crypto interface - base64Encode() has not been implemented" + ); + expect(() => emptyConfig.cryptoInterface.base64Encode("test input")).toThrowError(AuthError); + expect(emptyConfig.cryptoInterface.generatePkceCodes).not.toBeNull(); + await expect(emptyConfig.cryptoInterface.generatePkceCodes()).rejects.toMatchObject(AuthError.createUnexpectedError("Crypto interface - generatePkceCodes() has not been implemented")) // Storage interface checks - expect(emptyConfig.storageInterface).to.be.not.null; - expect(emptyConfig.storageInterface.clear).to.be.not.null; - expect(() => emptyConfig.storageInterface.clear()).to.throw("Unexpected error in authentication.: Storage interface - clear() has not been implemented"); - expect(() => emptyConfig.storageInterface.clear()).to.throw(AuthError); - expect(emptyConfig.storageInterface.containsKey).to.be.not.null; - expect(() => emptyConfig.storageInterface.containsKey("testKey")).to.throw("Unexpected error in authentication.: Storage interface - containsKey() has not been implemented"); - expect(() => emptyConfig.storageInterface.containsKey("testKey")).to.throw(AuthError); - expect(emptyConfig.storageInterface.getAccount).to.be.not.null; - expect(() => emptyConfig.storageInterface.getAccount("testKey")).to.throw("Unexpected error in authentication.: Storage interface - getAccount() has not been implemented"); - expect(() => emptyConfig.storageInterface.getAccount("testKey")).to.throw(AuthError); - expect(emptyConfig.storageInterface.getKeys).to.be.not.null; - expect(() => emptyConfig.storageInterface.getKeys()).to.throw("Unexpected error in authentication.: Storage interface - getKeys() has not been implemented"); - expect(() => emptyConfig.storageInterface.getKeys()).to.throw(AuthError); - expect(emptyConfig.storageInterface.removeItem).to.be.not.null; - expect(() => emptyConfig.storageInterface.removeItem("testKey")).to.throw("Unexpected error in authentication.: Storage interface - removeItem() has not been implemented"); - expect(() => emptyConfig.storageInterface.removeItem("testKey")).to.throw(AuthError); - expect(emptyConfig.storageInterface.setAccount).to.be.not.null; - expect(() => emptyConfig.storageInterface.setAccount(MockCache.acc)).to.throw("Unexpected error in authentication.: Storage interface - setAccount() has not been implemented"); - expect(() => emptyConfig.storageInterface.setAccount(MockCache.acc)).to.throw(AuthError); + expect(emptyConfig.storageInterface).not.toBeNull(); + expect(emptyConfig.storageInterface.clear).not.toBeNull(); + expect(() => emptyConfig.storageInterface.clear()).toThrowError( + "Unexpected error in authentication.: Storage interface - clear() has not been implemented" + ); + expect(() => emptyConfig.storageInterface.clear()).toThrowError(AuthError); + expect(emptyConfig.storageInterface.containsKey).not.toBeNull(); + expect(() => emptyConfig.storageInterface.containsKey("testKey")).toThrowError( + "Unexpected error in authentication.: Storage interface - containsKey() has not been implemented" + ); + expect(() => emptyConfig.storageInterface.containsKey("testKey")).toThrowError(AuthError); + expect(emptyConfig.storageInterface.getAccount).not.toBeNull(); + expect(() => emptyConfig.storageInterface.getAccount("testKey")).toThrowError( + "Unexpected error in authentication.: Storage interface - getAccount() has not been implemented" + ); + expect(() => emptyConfig.storageInterface.getAccount("testKey")).toThrowError(AuthError); + expect(emptyConfig.storageInterface.getKeys).not.toBeNull(); + expect(() => emptyConfig.storageInterface.getKeys()).toThrowError( + "Unexpected error in authentication.: Storage interface - getKeys() has not been implemented" + ); + expect(() => emptyConfig.storageInterface.getKeys()).toThrowError(AuthError); + expect(emptyConfig.storageInterface.removeItem).not.toBeNull(); + expect(() => emptyConfig.storageInterface.removeItem("testKey")).toThrowError( + "Unexpected error in authentication.: Storage interface - removeItem() has not been implemented" + ); + expect(() => emptyConfig.storageInterface.removeItem("testKey")).toThrowError(AuthError); + expect(emptyConfig.storageInterface.setAccount).not.toBeNull(); + expect(() => emptyConfig.storageInterface.setAccount(MockCache.acc)).toThrowError( + "Unexpected error in authentication.: Storage interface - setAccount() has not been implemented" + ); + expect(() => emptyConfig.storageInterface.setAccount(MockCache.acc)).toThrowError(AuthError); // Network interface checks - expect(emptyConfig.networkInterface).to.be.not.null; - expect(emptyConfig.networkInterface.sendGetRequestAsync).to.be.not.null; - await expect(emptyConfig.networkInterface.sendGetRequestAsync("", null)).to.be.rejectedWith("Unexpected error in authentication.: Network interface - sendGetRequestAsync() has not been implemented"); - await expect(emptyConfig.networkInterface.sendGetRequestAsync("", null)).to.be.rejectedWith(AuthError); - expect(emptyConfig.networkInterface.sendPostRequestAsync).to.be.not.null; - await expect(emptyConfig.networkInterface.sendPostRequestAsync("", null)).to.be.rejectedWith("Unexpected error in authentication.: Network interface - sendPostRequestAsync() has not been implemented"); - await expect(emptyConfig.networkInterface.sendPostRequestAsync("", null)).to.be.rejectedWith(AuthError); + expect(emptyConfig.networkInterface).not.toBeNull(); + expect(emptyConfig.networkInterface.sendGetRequestAsync).not.toBeNull(); + //@ts-ignore + expect(emptyConfig.networkInterface.sendGetRequestAsync("", null)).rejects.toMatchObject(AuthError.createUnexpectedError("Network interface - sendGetRequestAsync() has not been implemented")); + expect(emptyConfig.networkInterface.sendPostRequestAsync).not.toBeNull(); + //@ts-ignore + await expect(emptyConfig.networkInterface.sendPostRequestAsync("", null)).rejects.toMatchObject(AuthError.createUnexpectedError("Network interface - sendPostRequestAsync() has not been implemented")); // Logger options checks - expect(emptyConfig.loggerOptions).to.be.not.null; - expect(emptyConfig.loggerOptions.piiLoggingEnabled).to.be.false; + expect(emptyConfig.loggerOptions).not.toBeNull(); + expect(emptyConfig.loggerOptions.piiLoggingEnabled).toBe(false); // Client info checks - expect(emptyConfig.libraryInfo.sku).to.be.eq(Constants.SKU); - expect(emptyConfig.libraryInfo.version).to.be.eq(version); - expect(emptyConfig.libraryInfo.os).to.be.empty; - expect(emptyConfig.libraryInfo.cpu).to.be.empty; + expect(emptyConfig.libraryInfo.sku).toBe(Constants.SKU); + expect(emptyConfig.libraryInfo.version).toBe(version); + expect(emptyConfig.libraryInfo.os).toHaveLength(0); + expect(emptyConfig.libraryInfo.cpu).toHaveLength(0); }); - const cacheStorageMock = new MockStorageClass(); + const cacheStorageMock = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const testPkceCodes = { challenge: "TestChallenge", @@ -78,10 +93,9 @@ describe("ClientConfiguration.ts Class Unit Tests", () => { testParam: "testValue" }; - const testKeySet = ["testKey1", "testKey2"]; - it("buildConfiguration correctly assigns new values", async () => { - const newConfig: ClientConfiguration = buildClientConfiguration({ + const newConfig: CommonClientConfiguration = buildClientConfiguration({ + //@ts-ignore authOptions: { clientId: TEST_CONFIG.MSAL_CLIENT_ID }, @@ -127,41 +141,43 @@ describe("ClientConfiguration.ts Class Unit Tests", () => { }); cacheStorageMock.setAccount(MockCache.acc); // Crypto interface tests - expect(newConfig.cryptoInterface).to.be.not.null; - expect(newConfig.cryptoInterface.base64Decode).to.be.not.null; - expect(newConfig.cryptoInterface.base64Decode("testString")).to.be.eq("testDecodedString"); - expect(newConfig.cryptoInterface.base64Encode).to.be.not.null; - expect(newConfig.cryptoInterface.base64Encode("testString")).to.be.eq("testEncodedString"); - expect(newConfig.cryptoInterface.generatePkceCodes).to.be.not.null; - await expect(newConfig.cryptoInterface.generatePkceCodes()).to.eventually.eq(testPkceCodes); + expect(newConfig.cryptoInterface).not.toBeNull(); + expect(newConfig.cryptoInterface.base64Decode).not.toBeNull(); + expect(newConfig.cryptoInterface.base64Decode("testString")).toBe("testDecodedString"); + expect(newConfig.cryptoInterface.base64Encode).not.toBeNull(); + expect(newConfig.cryptoInterface.base64Encode("testString")).toBe("testEncodedString"); + expect(newConfig.cryptoInterface.generatePkceCodes).not.toBeNull(); + expect(newConfig.cryptoInterface.generatePkceCodes()).resolves.toBe(testPkceCodes); // Storage interface tests - expect(newConfig.storageInterface).to.be.not.null; - expect(newConfig.storageInterface.clear).to.be.not.null; - expect(newConfig.storageInterface.clear).to.be.eq(cacheStorageMock.clear); - expect(newConfig.storageInterface.containsKey).to.be.not.null; - expect(newConfig.storageInterface.containsKey(MockCache.acc.generateAccountKey())).to.be.true; - expect(newConfig.storageInterface.getAccount).to.be.not.null; - expect(newConfig.storageInterface.getAccount(MockCache.acc.generateAccountKey())).to.be.eq(MockCache.acc); - expect(newConfig.storageInterface.getKeys).to.be.not.null; - expect(newConfig.storageInterface.getKeys()).to.be.deep.eq([MockCache.acc.generateAccountKey()]); - expect(newConfig.storageInterface.removeItem).to.be.not.null; - expect(newConfig.storageInterface.removeItem).to.be.eq(cacheStorageMock.removeItem); - expect(newConfig.storageInterface.setAccount).to.be.not.null; - expect(newConfig.storageInterface.setAccount).to.be.eq(cacheStorageMock.setAccount); + expect(newConfig.storageInterface).not.toBeNull(); + expect(newConfig.storageInterface.clear).not.toBeNull(); + expect(newConfig.storageInterface.clear).toBe(cacheStorageMock.clear); + expect(newConfig.storageInterface.containsKey).not.toBeNull(); + expect(newConfig.storageInterface.containsKey(MockCache.acc.generateAccountKey())).toBe(true); + expect(newConfig.storageInterface.getAccount).not.toBeNull(); + expect(newConfig.storageInterface.getAccount(MockCache.acc.generateAccountKey())).toBe(MockCache.acc); + expect(newConfig.storageInterface.getKeys).not.toBeNull(); + expect(newConfig.storageInterface.getKeys()).toEqual([MockCache.acc.generateAccountKey()]); + expect(newConfig.storageInterface.removeItem).not.toBeNull(); + expect(newConfig.storageInterface.removeItem).toBe(cacheStorageMock.removeItem); + expect(newConfig.storageInterface.setAccount).not.toBeNull(); + expect(newConfig.storageInterface.setAccount).toBe(cacheStorageMock.setAccount); // Network interface tests - expect(newConfig.networkInterface).to.be.not.null; - expect(newConfig.networkInterface.sendGetRequestAsync).to.be.not.null; - await expect(newConfig.networkInterface.sendGetRequestAsync("", null)).to.eventually.eq(testNetworkResult); - expect(newConfig.networkInterface.sendPostRequestAsync).to.be.not.null; - await expect(newConfig.networkInterface.sendPostRequestAsync("", null)).to.eventually.eq(testNetworkResult); + expect(newConfig.networkInterface).not.toBeNull(); + expect(newConfig.networkInterface.sendGetRequestAsync).not.toBeNull(); + //@ts-ignore + expect(newConfig.networkInterface.sendGetRequestAsync("", null)).resolves.toBe(testNetworkResult); + expect(newConfig.networkInterface.sendPostRequestAsync).not.toBeNull(); + //@ts-ignore + expect(newConfig.networkInterface.sendPostRequestAsync("", null)).resolves.toBe(testNetworkResult); // Logger option tests - expect(newConfig.loggerOptions).to.be.not.null; - expect(newConfig.loggerOptions.loggerCallback).to.be.not.null; - expect(newConfig.loggerOptions.piiLoggingEnabled).to.be.true; + expect(newConfig.loggerOptions).not.toBeNull(); + expect(newConfig.loggerOptions.loggerCallback).not.toBeNull(); + expect(newConfig.loggerOptions.piiLoggingEnabled).toBe(true); // Client info tests - expect(newConfig.libraryInfo.sku).to.be.eq(TEST_CONFIG.TEST_SKU); - expect(newConfig.libraryInfo.version).to.be.eq(TEST_CONFIG.TEST_VERSION); - expect(newConfig.libraryInfo.os).to.be.eq(TEST_CONFIG.TEST_OS); - expect(newConfig.libraryInfo.cpu).to.be.eq(TEST_CONFIG.TEST_CPU); + expect(newConfig.libraryInfo.sku).toBe(TEST_CONFIG.TEST_SKU); + expect(newConfig.libraryInfo.version).toBe(TEST_CONFIG.TEST_VERSION); + expect(newConfig.libraryInfo.os).toBe(TEST_CONFIG.TEST_OS); + expect(newConfig.libraryInfo.cpu).toBe(TEST_CONFIG.TEST_CPU); }); }); diff --git a/lib/msal-common/test/crypto/PopTokenGenerator.spec.ts b/lib/msal-common/test/crypto/PopTokenGenerator.spec.ts index 9249ad8a15..58ffa63f64 100644 --- a/lib/msal-common/test/crypto/PopTokenGenerator.spec.ts +++ b/lib/msal-common/test/crypto/PopTokenGenerator.spec.ts @@ -1,11 +1,6 @@ -import * as Mocha from "mocha"; -import * as chai from "chai"; import sinon from "sinon"; -import chaiAsPromised from "chai-as-promised"; -const expect = chai.expect; -chai.use(chaiAsPromised); -import { ICrypto, PkceCodes, UrlString, SignedHttpRequest, TimeUtils, IUri, BaseAuthRequest, AuthenticationScheme } from "../../src"; -import { RANDOM_TEST_GUID, TEST_POP_VALUES, TEST_DATA_CLIENT_INFO, TEST_CONFIG, TEST_URIS, TEST_TOKENS } from "../test_kit/StringConstants"; +import { ICrypto, PkceCodes, UrlString, SignedHttpRequest, TimeUtils, BaseAuthRequest, AuthenticationScheme } from "../../src"; +import { RANDOM_TEST_GUID, TEST_POP_VALUES, TEST_DATA_CLIENT_INFO, TEST_CONFIG, TEST_URIS } from "../test_kit/StringConstants"; import { PopTokenGenerator } from "../../src/crypto/PopTokenGenerator"; describe("PopTokenGenerator Unit Tests", () => { @@ -69,27 +64,15 @@ describe("PopTokenGenerator Unit Tests", () => { it("Generates the req_cnf correctly", async () => { const popTokenGenerator = new PopTokenGenerator(cryptoInterface); const req_cnf = await popTokenGenerator.generateCnf(testRequest); - expect(req_cnf).to.be.eq(TEST_POP_VALUES.ENCODED_REQ_CNF); + expect(req_cnf).toBe(TEST_POP_VALUES.ENCODED_REQ_CNF); }); }); describe("signPopToken", () => { - let popTokenGenerator: PopTokenGenerator; - let accessToken: string; - let resourceReqMethod: string; - let resourceUrl: string; - let resourceUrlString: UrlString; - let resourceUrlComponents: IUri; let currTime: number; let testRequest: BaseAuthRequest; - before(() => { - popTokenGenerator = new PopTokenGenerator(cryptoInterface); - accessToken = TEST_POP_VALUES.SAMPLE_POP_AT; - resourceReqMethod = "POST"; - resourceUrl = TEST_URIS.TEST_RESOURCE_ENDPT_WITH_PARAMS; - resourceUrlString = new UrlString(resourceUrl); - resourceUrlComponents = resourceUrlString.getUrlComponents(); + beforeAll(() => { currTime = TimeUtils.nowSeconds(); testRequest = { authority: TEST_CONFIG.validAuthority, @@ -120,7 +103,7 @@ describe("PopTokenGenerator Unit Tests", () => { cryptoInterface.signJwt = (payload: SignedHttpRequest, kid: string): Promise => { - expect(kid).to.be.eq(TEST_POP_VALUES.KID); + expect(kid).toBe(TEST_POP_VALUES.KID); const expectedPayload = { at: accessToken, ts: currTime, @@ -132,9 +115,9 @@ describe("PopTokenGenerator Unit Tests", () => { client_claims: shrClaims }; - expect(payload).to.be.deep.eq(expectedPayload); + expect(payload).toEqual(expectedPayload); done(); - return null; + return Promise.resolve(""); }; popTokenGenerator.signPopToken(accessToken, popRequest); }); @@ -143,9 +126,8 @@ describe("PopTokenGenerator Unit Tests", () => { const popTokenGenerator = new PopTokenGenerator(cryptoInterface); const accessToken = TEST_POP_VALUES.SAMPLE_POP_AT; const currTime = TimeUtils.nowSeconds(); - const popRequest = { ...testRequest, authenticationScheme: AuthenticationScheme.POP }; cryptoInterface.signJwt = (payload: SignedHttpRequest, kid: string): Promise => { - expect(kid).to.be.eq(TEST_POP_VALUES.KID); + expect(kid).toBe(TEST_POP_VALUES.KID); const expectedPayload = { at: accessToken, ts: currTime, @@ -157,9 +139,9 @@ describe("PopTokenGenerator Unit Tests", () => { client_claims: undefined }; - expect(payload).to.be.deep.eq(expectedPayload); + expect(payload).toEqual(expectedPayload); done(); - return null; + return Promise.resolve(""); }; popTokenGenerator.signPopToken(accessToken, testRequest); }); diff --git a/lib/msal-common/test/error/AuthError.spec.ts b/lib/msal-common/test/error/AuthError.spec.ts index 89d1976407..752a83fb9a 100644 --- a/lib/msal-common/test/error/AuthError.spec.ts +++ b/lib/msal-common/test/error/AuthError.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { AuthError, AuthErrorMessage } from "../../src/error/AuthError"; describe("AuthError.ts Class", () => { @@ -15,13 +14,13 @@ describe("AuthError.ts Class", () => { err = error; } - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(TEST_ERROR_CODE); - expect(err.errorMessage).to.equal(TEST_ERROR_MSG); - expect(err.message).to.equal(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); - expect(err.name).to.equal("AuthError"); - expect(err.stack).to.include("AuthError.spec.ts"); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(TEST_ERROR_CODE); + expect(err.errorMessage).toBe(TEST_ERROR_MSG); + expect(err.message).toBe(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); + expect(err.name).toBe("AuthError"); + expect(err.stack?.includes("AuthError.spec.ts")).toBe(true); }); it("createUnexpectedError creates a AuthError object", () => { @@ -35,13 +34,13 @@ describe("AuthError.ts Class", () => { err = error; } - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(AuthErrorMessage.unexpectedError.code); - expect(err.errorMessage).to.contain(AuthErrorMessage.unexpectedError.desc); - expect(err.errorMessage).to.contain(ERROR_DESC); - expect(err.message).to.contain(AuthErrorMessage.unexpectedError.desc); - expect(err.name).to.equal("AuthError"); - expect(err.stack).to.include("AuthError.spec.ts"); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(AuthErrorMessage.unexpectedError.code); + expect(err.errorMessage.includes(AuthErrorMessage.unexpectedError.desc)).toBe(true); + expect(err.errorMessage.includes(ERROR_DESC)).toBe(true); + expect(err.message.includes(AuthErrorMessage.unexpectedError.desc)).toBe(true); + expect(err.name).toBe("AuthError"); + expect(err.stack?.includes("AuthError.spec.ts")).toBe(true); }); }); diff --git a/lib/msal-common/test/error/ClientAuthError.spec.ts b/lib/msal-common/test/error/ClientAuthError.spec.ts index 23da420c1a..36e61d88a7 100644 --- a/lib/msal-common/test/error/ClientAuthError.spec.ts +++ b/lib/msal-common/test/error/ClientAuthError.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { ClientAuthError, ClientAuthErrorMessage } from "../../src/error/ClientAuthError"; import { AuthError } from "../../src/error/AuthError"; @@ -9,273 +8,273 @@ describe("ClientAuthError.ts Class Unit Tests", () => { const TEST_ERROR_MSG: string = "This is a test error"; const err: ClientAuthError = new ClientAuthError(TEST_ERROR_CODE, TEST_ERROR_MSG); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(TEST_ERROR_CODE); - expect(err.errorMessage).to.equal(TEST_ERROR_MSG); - expect(err.message).to.equal(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(TEST_ERROR_CODE); + expect(err.errorMessage).toBe(TEST_ERROR_MSG); + expect(err.message).toBe(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createClientInfoDecodingError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createClientInfoDecodingError("Caught decoding error."); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.clientInfoDecodingError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.clientInfoDecodingError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.clientInfoDecodingError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.clientInfoDecodingError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.clientInfoDecodingError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.clientInfoDecodingError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createClientInfoEmptyError creates a ClientAuthError object", () => { - const err: ClientAuthError = ClientAuthError.createClientInfoEmptyError("Raw client info."); - - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.clientInfoEmptyError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.clientInfoEmptyError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.clientInfoEmptyError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + const err: ClientAuthError = ClientAuthError.createClientInfoEmptyError(); + + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.clientInfoEmptyError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.clientInfoEmptyError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.clientInfoEmptyError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createIdTokenParsingError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createTokenParsingError("Raw client info."); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.tokenParsingError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.tokenParsingError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.tokenParsingError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.tokenParsingError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.tokenParsingError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.tokenParsingError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createIdTokenNullOrEmptyError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createTokenNullOrEmptyError("Invalid Raw IdToken string."); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.nullOrEmptyToken.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.nullOrEmptyToken.desc); - expect(err.message).to.include(ClientAuthErrorMessage.nullOrEmptyToken.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.nullOrEmptyToken.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.nullOrEmptyToken.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.nullOrEmptyToken.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createEndpointDiscoveryIncompleteError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createEndpointDiscoveryIncompleteError("Test endpoint error."); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.endpointResolutionError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.endpointResolutionError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.endpointResolutionError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.endpointResolutionError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.endpointResolutionError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.endpointResolutionError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createHashNotDeserializedError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createHashNotDeserializedError("Couldn't deserialize hash object correctly"); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.hashNotDeserialized.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.hashNotDeserialized.desc); - expect(err.message).to.include(ClientAuthErrorMessage.hashNotDeserialized.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.hashNotDeserialized.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.hashNotDeserialized.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.hashNotDeserialized.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createStateMismatchError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createStateMismatchError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.stateMismatchError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.stateMismatchError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.stateMismatchError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.stateMismatchError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.stateMismatchError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.stateMismatchError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createNonceMismatchError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createNonceMismatchError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.nonceMismatchError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.nonceMismatchError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.nonceMismatchError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.nonceMismatchError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.nonceMismatchError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.nonceMismatchError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createNoTokensFoundError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createNoTokensFoundError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.noTokensFoundError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.noTokensFoundError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.noTokensFoundError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.noTokensFoundError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.noTokensFoundError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.noTokensFoundError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createMultipleMatchingTokensInCacheError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createMultipleMatchingTokensInCacheError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.multipleMatchingTokens.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.multipleMatchingTokens.desc); - expect(err.message).to.include(ClientAuthErrorMessage.multipleMatchingTokens.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.multipleMatchingTokens.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.multipleMatchingTokens.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.multipleMatchingTokens.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createTokenRequestCannotBeMadeError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createTokenRequestCannotBeMadeError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.tokenRequestCannotBeMade.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.tokenRequestCannotBeMade.desc); - expect(err.message).to.include(ClientAuthErrorMessage.tokenRequestCannotBeMade.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.tokenRequestCannotBeMade.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.tokenRequestCannotBeMade.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.tokenRequestCannotBeMade.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createAppendEmptyScopeToSetError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createAppendEmptyScopeToSetError(""); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.appendEmptyScopeError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.appendEmptyScopeError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.appendEmptyScopeError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.appendEmptyScopeError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.appendEmptyScopeError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.appendEmptyScopeError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createRemoveEmptyScopeFromSetError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createRemoveEmptyScopeFromSetError(""); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.removeEmptyScopeError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.removeEmptyScopeError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.removeEmptyScopeError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.removeEmptyScopeError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.removeEmptyScopeError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.removeEmptyScopeError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createAppendScopeSetError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createAppendScopeSetError("Couldn't append scopeset"); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.appendScopeSetError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.appendScopeSetError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.appendScopeSetError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.appendScopeSetError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.appendScopeSetError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.appendScopeSetError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createEmptyInputScopeSetError creates a ClientAuthError object", () => { - const err: ClientAuthError = ClientAuthError.createEmptyInputScopeSetError(null); - - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.emptyInputScopeSetError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.emptyInputScopeSetError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.emptyInputScopeSetError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + const err: ClientAuthError = ClientAuthError.createEmptyInputScopeSetError(); + + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.emptyInputScopeSetError.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.emptyInputScopeSetError.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.emptyInputScopeSetError.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createDeviceCodeCancelledError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createDeviceCodeCancelledError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.DeviceCodePollingCancelled.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.DeviceCodePollingCancelled.desc); - expect(err.message).to.include(ClientAuthErrorMessage.DeviceCodePollingCancelled.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.DeviceCodePollingCancelled.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.DeviceCodePollingCancelled.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.DeviceCodePollingCancelled.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createDeviceCodeExpiredError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createDeviceCodeExpiredError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.DeviceCodeExpired.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.DeviceCodeExpired.desc); - expect(err.message).to.include(ClientAuthErrorMessage.DeviceCodeExpired.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.DeviceCodeExpired.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.DeviceCodeExpired.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.DeviceCodeExpired.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createInvalidCacheTypeError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createInvalidCacheTypeError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.invalidCacheType.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.invalidCacheType.desc); - expect(err.message).to.include(ClientAuthErrorMessage.invalidCacheType.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.invalidCacheType.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.invalidCacheType.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.invalidCacheType.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createUnexpectedAccountTypeError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createUnexpectedAccountTypeError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.unexpectedAccountType.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.unexpectedAccountType.desc); - expect(err.message).to.include(ClientAuthErrorMessage.unexpectedAccountType.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.unexpectedAccountType.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.unexpectedAccountType.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.unexpectedAccountType.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); it("createUnexpectedCredentialTypeError creates a ClientAuthError object", () => { const err: ClientAuthError = ClientAuthError.createUnexpectedCredentialTypeError(); - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.unexpectedCredentialType.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.unexpectedCredentialType.desc); - expect(err.message).to.include(ClientAuthErrorMessage.unexpectedCredentialType.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("ClientAuthError.spec.ts"); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.unexpectedCredentialType.code); + expect(err.errorMessage.includes(ClientAuthErrorMessage.unexpectedCredentialType.desc)).toBe(true); + expect(err.message.includes(ClientAuthErrorMessage.unexpectedCredentialType.desc)).toBe(true); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack?.includes("ClientAuthError.spec.ts")).toBe(true); }); }); diff --git a/lib/msal-common/test/error/ClientConfigurationError.spec.ts b/lib/msal-common/test/error/ClientConfigurationError.spec.ts index 6e189127ef..77db0bc877 100644 --- a/lib/msal-common/test/error/ClientConfigurationError.spec.ts +++ b/lib/msal-common/test/error/ClientConfigurationError.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { ClientConfigurationError, ClientConfigurationErrorMessage } from "../../src/error/ClientConfigurationError"; import { ClientAuthError, AuthError } from "../../src"; import { TEST_CONFIG } from "../test_kit/StringConstants"; @@ -10,170 +9,156 @@ describe("ClientConfigurationError.ts Class Unit Tests", () => { const TEST_ERROR_MSG: string = "This is a test error"; const err: ClientConfigurationError = new ClientConfigurationError(TEST_ERROR_CODE, TEST_ERROR_MSG); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(TEST_ERROR_CODE); - expect(err.errorMessage).to.equal(TEST_ERROR_MSG); - expect(err.message).to.equal(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(TEST_ERROR_CODE); + expect(err.errorMessage).toBe(TEST_ERROR_MSG); + expect(err.message).toBe(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createRedirectUriEmptyError creates a ClientConfigurationError object", () => { const err: ClientConfigurationError = ClientConfigurationError.createRedirectUriEmptyError(); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.redirectUriNotSet.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.redirectUriNotSet.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.redirectUriNotSet.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.redirectUriNotSet.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.redirectUriNotSet.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.redirectUriNotSet.desc)).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createPostLogoutRedirectUriEmptyError creates a ClientConfigurationError object", () => { const err: ClientConfigurationError = ClientConfigurationError.createPostLogoutRedirectUriEmptyError(); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.postLogoutUriNotSet.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.postLogoutUriNotSet.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.postLogoutUriNotSet.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.postLogoutUriNotSet.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.postLogoutUriNotSet.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.postLogoutUriNotSet.desc)).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createClaimsRequestParsingError creates a ClientConfigurationError object", () => { const err: ClientConfigurationError = ClientConfigurationError.createClaimsRequestParsingError("Could not parse claims."); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.claimsRequestParsingError.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.claimsRequestParsingError.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.claimsRequestParsingError.desc); - expect(err.errorMessage).to.include("Could not parse claims."); - expect(err.message).to.include("Could not parse claims."); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.claimsRequestParsingError.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.claimsRequestParsingError.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.claimsRequestParsingError.desc)).toBe(true); + expect(err.errorMessage.includes("Could not parse claims.")).toBe(true); + expect(err.message.includes("Could not parse claims.")).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createInsecureAuthorityUriError creates a ClientConfigurationError object", () => { const err: ClientConfigurationError = ClientConfigurationError.createInsecureAuthorityUriError("test url string"); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.authorityUriInsecure.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.authorityUriInsecure.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.authorityUriInsecure.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.authorityUriInsecure.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.authorityUriInsecure.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.authorityUriInsecure.desc)).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createUrlParseError creates a ClientConfigurationError object", () => { const err: ClientConfigurationError = ClientConfigurationError.createUrlParseError("Url parse error"); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.urlParseError.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.urlParseError.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.urlParseError.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.urlParseError.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.urlParseError.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.urlParseError.desc)).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createUrlEmptyError creates a ClientConfigurationError object", () => { const err: ClientConfigurationError = ClientConfigurationError.createUrlEmptyError(); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.urlEmptyError.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.urlEmptyError.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.urlEmptyError.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); - }); - - it("createScopesNonArrayError creates a ClientConfigurationError object", () => { - const err: ClientConfigurationError = ClientConfigurationError.createScopesNonArrayError(null); - - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.nonArrayScopesError.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.nonArrayScopesError.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.nonArrayScopesError.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.urlEmptyError.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.urlEmptyError.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.urlEmptyError.desc)).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createEmptyScopesArrayError creates a ClientConfigurationError object", () => { - const err: ClientConfigurationError = ClientConfigurationError.createEmptyScopesArrayError([]); - - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.emptyScopesError.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.emptyScopesError.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.emptyScopesError.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + const err: ClientConfigurationError = ClientConfigurationError.createEmptyScopesArrayError(); + + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.emptyScopesError.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.emptyScopesError.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.emptyScopesError.desc)).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createClientIdSingleScopeError creates a ClientConfigurationError object", () => { const err: ClientConfigurationError = ClientConfigurationError.createClientIdSingleScopeError([TEST_CONFIG.MSAL_CLIENT_ID, "scope1"]); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.clientIdSingleScopeError.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.clientIdSingleScopeError.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.clientIdSingleScopeError.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.clientIdSingleScopeError.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.clientIdSingleScopeError.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.clientIdSingleScopeError.desc)).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createInvalidPromptError creates a ClientConfigurationError object", () => { const err: ClientConfigurationError = ClientConfigurationError.createInvalidPromptError("notaprompt"); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.invalidPrompt.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.invalidPrompt.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.invalidPrompt.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.invalidPrompt.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.invalidPrompt.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.invalidPrompt.desc)).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); it("createEmptyTokenRequestError creates a ClientConfigurationError object", () => { const err: ClientConfigurationError = ClientConfigurationError.createEmptyTokenRequestError(); - expect(err instanceof ClientConfigurationError).to.be.true; - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientConfigurationErrorMessage.tokenRequestEmptyError.code); - expect(err.errorMessage).to.include(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc); - expect(err.message).to.include(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc); - expect(err.name).to.equal("ClientConfigurationError"); - expect(err.stack).to.include("ClientConfigurationError.spec.ts"); + expect(err instanceof ClientConfigurationError).toBe(true); + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientConfigurationErrorMessage.tokenRequestEmptyError.code); + expect(err.errorMessage.includes(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc)).toBe(true); + expect(err.message.includes(ClientConfigurationErrorMessage.tokenRequestEmptyError.desc)).toBe(true); + expect(err.name).toBe("ClientConfigurationError"); + expect(err.stack?.includes("ClientConfigurationError.spec.ts")).toBe(true); }); }); diff --git a/lib/msal-common/test/error/InteractionRequiredAuthError.spec.ts b/lib/msal-common/test/error/InteractionRequiredAuthError.spec.ts index b237570662..99fcf3041c 100644 --- a/lib/msal-common/test/error/InteractionRequiredAuthError.spec.ts +++ b/lib/msal-common/test/error/InteractionRequiredAuthError.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { InteractionRequiredAuthError, InteractionRequiredAuthErrorMessage, InteractionRequiredAuthSubErrorMessage } from "../../src/error/InteractionRequiredAuthError"; import { ServerError } from "../../src/error/ServerError"; import { AuthError } from "../../src/error/AuthError"; @@ -11,49 +10,49 @@ describe("InteractionRequiredAuthError.ts Class Unit Tests", () => { const TEST_ERROR_MSG: string = "This is a test error"; const err: InteractionRequiredAuthError = new InteractionRequiredAuthError(TEST_ERROR_CODE, TEST_ERROR_MSG); - expect(err instanceof InteractionRequiredAuthError).to.be.true; - expect(err instanceof ServerError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(TEST_ERROR_CODE); - expect(err.errorMessage).to.equal(TEST_ERROR_MSG); - expect(err.message).to.equal(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); - expect(err.name).to.equal("InteractionRequiredAuthError"); - expect(err.stack).to.include("InteractionRequiredAuthError.spec.ts"); + expect(err instanceof InteractionRequiredAuthError).toBe(true); + expect(err instanceof ServerError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(TEST_ERROR_CODE); + expect(err.errorMessage).toBe(TEST_ERROR_MSG); + expect(err.message).toBe(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); + expect(err.name).toBe("InteractionRequiredAuthError"); + expect(err.stack?.includes("InteractionRequiredAuthError.spec.ts")).toBe(true); }); describe("isInteractionRequiredError()", () => { it("Returns false if given values are empty", () => { - expect(InteractionRequiredAuthError.isInteractionRequiredError("", "")).to.be.false; + expect(InteractionRequiredAuthError.isInteractionRequiredError("", "")).toBe(false); }); it("Returns expected value for given error code", () => { InteractionRequiredAuthErrorMessage.forEach(function (errorCode) { - expect(InteractionRequiredAuthError.isInteractionRequiredError(errorCode, "")).to.be.true; + expect(InteractionRequiredAuthError.isInteractionRequiredError(errorCode, "")).toBe(true); }); - expect(InteractionRequiredAuthError.isInteractionRequiredError("bad_token", "")).to.be.false; + expect(InteractionRequiredAuthError.isInteractionRequiredError("bad_token", "")).toBe(false); }); it("Returns expected value for given error string", () => { InteractionRequiredAuthErrorMessage.forEach(function (errorCode) { - expect(InteractionRequiredAuthError.isInteractionRequiredError("", `This is a ${errorCode} error!`)).to.be.true; + expect(InteractionRequiredAuthError.isInteractionRequiredError("", `This is a ${errorCode} error!`)).toBe(true); }); - expect(InteractionRequiredAuthError.isInteractionRequiredError("", "This is not an interaction required error")).to.be.false; + expect(InteractionRequiredAuthError.isInteractionRequiredError("", "This is not an interaction required error")).toBe(false); }); it("Returns expected value for given error code and error string", () => { InteractionRequiredAuthErrorMessage.forEach(function (errorCode) { - expect(InteractionRequiredAuthError.isInteractionRequiredError(errorCode, `This is a ${errorCode} error!`)).to.be.true; + expect(InteractionRequiredAuthError.isInteractionRequiredError(errorCode, `This is a ${errorCode} error!`)).toBe(true); }); - expect(InteractionRequiredAuthError.isInteractionRequiredError("bad_token", "This is not an interaction required error")).to.be.false; + expect(InteractionRequiredAuthError.isInteractionRequiredError("bad_token", "This is not an interaction required error")).toBe(false); }); it("Returns expected value for given sub-error", () => { InteractionRequiredAuthSubErrorMessage.forEach(function (subErrorCode) { - expect(InteractionRequiredAuthError.isInteractionRequiredError("", "", subErrorCode)).to.be.true; + expect(InteractionRequiredAuthError.isInteractionRequiredError("", "", subErrorCode)).toBe(true); }); - expect(InteractionRequiredAuthError.isInteractionRequiredError("", "", "bad_token")).to.be.false; + expect(InteractionRequiredAuthError.isInteractionRequiredError("", "", "bad_token")).toBe(false); }); }); }); diff --git a/lib/msal-common/test/error/ServerError.spec.ts b/lib/msal-common/test/error/ServerError.spec.ts index fd861c389c..62865fe5e6 100644 --- a/lib/msal-common/test/error/ServerError.spec.ts +++ b/lib/msal-common/test/error/ServerError.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { ServerError } from "../../src/error/ServerError"; import { AuthError } from "../../src/error/AuthError"; @@ -9,13 +8,13 @@ describe("ServerError.ts Class Unit Tests", () => { const TEST_ERROR_MSG: string = "This is a test error"; const err: ServerError = new ServerError(TEST_ERROR_CODE, TEST_ERROR_MSG); - expect(err instanceof ServerError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(TEST_ERROR_CODE); - expect(err.errorMessage).to.equal(TEST_ERROR_MSG); - expect(err.message).to.equal(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); - expect(err.name).to.equal("ServerError"); - expect(err.stack).to.include("ServerError.spec.ts"); + expect(err instanceof ServerError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(TEST_ERROR_CODE); + expect(err.errorMessage).toBe(TEST_ERROR_MSG); + expect(err.message).toBe(`${TEST_ERROR_CODE}: ${TEST_ERROR_MSG}`); + expect(err.name).toBe("ServerError"); + expect(err.stack?.includes("ServerError.spec.ts")).toBe(true); }); }); diff --git a/lib/msal-common/test/logger/Logger.spec.ts b/lib/msal-common/test/logger/Logger.spec.ts index 9b6bb5a51a..8133209658 100644 --- a/lib/msal-common/test/logger/Logger.spec.ts +++ b/lib/msal-common/test/logger/Logger.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { LoggerOptions } from "../../src/config/ClientConfiguration"; import { LogLevel, Logger } from "../../src/logger/Logger"; import sinon from "sinon"; @@ -26,7 +25,7 @@ describe("Logger.ts Class Unit Tests", () => { it("Creates a logger with the given logger options", () => { const logger = new Logger(loggerOptions); - expect(logger.isPiiLoggingEnabled()).to.be.true; + expect(logger.isPiiLoggingEnabled()).toBe(true); }); }); @@ -35,16 +34,16 @@ describe("Logger.ts Class Unit Tests", () => { it("Creates a new logger with logger configurations of existing logger", () => { const logger = new Logger(loggerOptions); const loggerClone = logger.clone("msal-common", "1.0.0"); - expect(loggerClone.isPiiLoggingEnabled()).to.equal(logger.isPiiLoggingEnabled()); + expect(loggerClone.isPiiLoggingEnabled()).toBe(logger.isPiiLoggingEnabled()); }); it("Creates a new logger with package name and package version", () => { const logger = new Logger(loggerOptions); const loggerClone = logger.clone("msal-common", "2.0.0"); loggerClone.info("Message"); - expect(logStore[LogLevel.Info]).to.include("msal-common"); - expect(logStore[LogLevel.Info]).to.include("2.0.0"); - expect(logStore[LogLevel.Info]).to.include("msal-common@2.0.0"); + expect(logStore[LogLevel.Info].includes("msal-common")).toBe(true); + expect(logStore[LogLevel.Info].includes("2.0.0")).toBe(true); + expect(logStore[LogLevel.Info].includes("msal-common@2.0.0")).toBe(true); }); }); @@ -53,16 +52,16 @@ describe("Logger.ts Class Unit Tests", () => { it("Creates a new logger with logger configurations of existing logger", () => { const logger = new Logger(loggerOptions); const loggerClone = logger.clone("msal-common", "1.0.0"); - expect(loggerClone.isPiiLoggingEnabled()).to.equal(logger.isPiiLoggingEnabled()); + expect(loggerClone.isPiiLoggingEnabled()).toBe(logger.isPiiLoggingEnabled()); }); it("Creates a new logger with package name and package version", () => { const logger = new Logger(loggerOptions); const loggerClone = logger.clone("msal-common", "2.0.0"); loggerClone.info("Message"); - expect(logStore[LogLevel.Info]).to.include("msal-common"); - expect(logStore[LogLevel.Info]).to.include("2.0.0"); - expect(logStore[LogLevel.Info]).to.include("msal-common@2.0.0"); + expect(logStore[LogLevel.Info].includes("msal-common")).toBe(true); + expect(logStore[LogLevel.Info].includes("2.0.0")).toBe(true); + expect(logStore[LogLevel.Info].includes("msal-common@2.0.0")).toBe(true); }); }); @@ -71,7 +70,7 @@ describe("Logger.ts Class Unit Tests", () => { it("Executes a callback if assigned", () => { const logger = new Logger(loggerOptions); logger.executeCallback(LogLevel.Error, "Message", true); - expect(logStore[LogLevel.Error]).to.be.eq("Message"); + expect(logStore[LogLevel.Error]).toBe("Message"); }); }); @@ -82,7 +81,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.error("Message"); - expect(executeCbSpy.calledWith(LogLevel.Error)).to.be.true; + expect(executeCbSpy.calledWith(LogLevel.Error)).toBe(true); }); it("Executes errorPii APIs", () => { @@ -90,7 +89,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.errorPii("Message"); - expect(executeCbSpy.calledWith(LogLevel.Error)).to.be.true; + expect(executeCbSpy.calledWith(LogLevel.Error)).toBe(true); }); it("Does not execute errorPii APIs if piiLogging is disabled", () => { @@ -99,7 +98,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.errorPii("Message"); - expect(executeCbSpy.called).to.be.false; + expect(executeCbSpy.called).toBe(false); }); }); @@ -110,7 +109,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.warning("Message"); - expect(executeCbSpy.calledWith(LogLevel.Warning)).to.be.true; + expect(executeCbSpy.calledWith(LogLevel.Warning)).toBe(true); }); it("Executes warningPii APIs", () => { @@ -118,7 +117,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.warningPii("Message"); - expect(executeCbSpy.calledWith(LogLevel.Warning)).to.be.true; + expect(executeCbSpy.calledWith(LogLevel.Warning)).toBe(true); }); it("Does not execute warningPii APIs if piiLogging is disabled", () => { @@ -127,7 +126,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.warningPii("Message"); - expect(executeCbSpy.called).to.be.false; + expect(executeCbSpy.called).toBe(false); }); }); @@ -138,7 +137,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.info("Message"); - expect(executeCbSpy.calledWith(LogLevel.Info)).to.be.true; + expect(executeCbSpy.calledWith(LogLevel.Info)).toBe(true); }); it("Executes infoPii APIs", () => { @@ -146,7 +145,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.infoPii("Message"); - expect(executeCbSpy.calledWith(LogLevel.Info)).to.be.true; + expect(executeCbSpy.calledWith(LogLevel.Info)).toBe(true); }); it("Does not execute infoPii APIs if piiLogging is disabled", () => { @@ -155,7 +154,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.infoPii("Message"); - expect(executeCbSpy.called).to.be.false; + expect(executeCbSpy.called).toBe(false); }); }); @@ -166,7 +165,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.verbose("Message"); - expect(executeCbSpy.calledWith(LogLevel.Verbose)).to.be.true; + expect(executeCbSpy.calledWith(LogLevel.Verbose)).toBe(true); }); it("Executes verbosePii APIs", () => { @@ -174,7 +173,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.verbosePii("Message"); - expect(executeCbSpy.calledWith(LogLevel.Verbose)).to.be.true; + expect(executeCbSpy.calledWith(LogLevel.Verbose)).toBe(true); }); it("Does not execute verbosePii APIs if piiLogging is disabled", () => { @@ -183,7 +182,7 @@ describe("Logger.ts Class Unit Tests", () => { const logger = new Logger(loggerOptions); logger.verbosePii("Message"); - expect(executeCbSpy.called).to.be.false; + expect(executeCbSpy.called).toBe(false); }); }); }); diff --git a/lib/msal-common/test/mochaSetup.js b/lib/msal-common/test/mochaSetup.js deleted file mode 100644 index fffabe2b56..0000000000 --- a/lib/msal-common/test/mochaSetup.js +++ /dev/null @@ -1,4 +0,0 @@ -require("@babel/register")({ extensions: ['.js', '.jsx', '.ts', '.tsx'] }); -const chai = require("chai"); -const chaiAsPromised = require("chai-as-promised"); -chai.use(chaiAsPromised); diff --git a/lib/msal-common/test/network/NetworkManager.spec.ts b/lib/msal-common/test/network/NetworkManager.spec.ts index 1db5c4bfd7..93aca52a12 100644 --- a/lib/msal-common/test/network/NetworkManager.spec.ts +++ b/lib/msal-common/test/network/NetworkManager.spec.ts @@ -3,16 +3,15 @@ * Licensed under the MIT License. */ -import { expect } from "chai"; import sinon from "sinon"; import { ThrottlingUtils } from "../../src/network/ThrottlingUtils"; import { RequestThumbprint } from "../../src/network/RequestThumbprint"; import { NetworkManager, NetworkResponse } from "../../src/network/NetworkManager"; import { ServerAuthorizationTokenResponse } from "../../src/response/ServerAuthorizationTokenResponse"; -import { MockStorageClass } from "../client/ClientTestUtils"; +import { MockStorageClass, mockCrypto } from "../client/ClientTestUtils"; import { NetworkRequestOptions } from "../../src/network/INetworkModule"; import { ServerError } from "../../src/error/ServerError"; -import { AUTHENTICATION_RESULT, NETWORK_REQUEST_OPTIONS, THUMBPRINT, THROTTLING_ENTITY, DEFAULT_NETWORK_IMPLEMENTATION } from "../test_kit/StringConstants"; +import { AUTHENTICATION_RESULT, NETWORK_REQUEST_OPTIONS, THUMBPRINT, THROTTLING_ENTITY, DEFAULT_NETWORK_IMPLEMENTATION, TEST_CONFIG } from "../test_kit/StringConstants"; import { ClientAuthError, ClientAuthErrorMessage } from "../../src"; describe("NetworkManager", () => { @@ -23,7 +22,7 @@ describe("NetworkManager", () => { it("returns a response", async () => { const networkInterface = DEFAULT_NETWORK_IMPLEMENTATION; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const networkManager = new NetworkManager(networkInterface, cache); const thumbprint: RequestThumbprint = THUMBPRINT; const options: NetworkRequestOptions = NETWORK_REQUEST_OPTIONS; @@ -44,12 +43,12 @@ describe("NetworkManager", () => { sinon.assert.callCount(getThrottlingStub, 1); sinon.assert.callCount(setThrottlingStub, 0); sinon.assert.callCount(removeItemStub, 0); - expect(res).to.deep.eq(mockRes); + expect(res).toEqual(mockRes); }); it("blocks the request if item is found in the cache", async () => { const networkInterface = DEFAULT_NETWORK_IMPLEMENTATION; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const networkManager = new NetworkManager(networkInterface, cache); const thumbprint: RequestThumbprint = THUMBPRINT; const options: NetworkRequestOptions = NETWORK_REQUEST_OPTIONS; @@ -68,12 +67,12 @@ describe("NetworkManager", () => { sinon.assert.callCount(getThrottlingStub, 1); sinon.assert.callCount(setThrottlingStub, 0); sinon.assert.callCount(removeItemStub, 0); - expect(() => ThrottlingUtils.preProcess(cache, thumbprint)).to.throw(ServerError); + expect(() => ThrottlingUtils.preProcess(cache, thumbprint)).toThrowError(ServerError); }); it("passes request through if expired item in cache", async () => { const networkInterface = DEFAULT_NETWORK_IMPLEMENTATION; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const networkManager = new NetworkManager(networkInterface, cache); const thumbprint: RequestThumbprint = THUMBPRINT; const options: NetworkRequestOptions = NETWORK_REQUEST_OPTIONS; @@ -95,12 +94,12 @@ describe("NetworkManager", () => { sinon.assert.callCount(getThrottlingStub, 1); sinon.assert.callCount(setThrottlingStub, 0); sinon.assert.callCount(removeItemStub, 1); - expect(res).to.deep.eq(mockRes); + expect(res).toEqual(mockRes); }); it("creates cache entry on error", async () => { const networkInterface = DEFAULT_NETWORK_IMPLEMENTATION; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const networkManager = new NetworkManager(networkInterface, cache); const thumbprint: RequestThumbprint = THUMBPRINT; const options: NetworkRequestOptions = NETWORK_REQUEST_OPTIONS; @@ -121,12 +120,12 @@ describe("NetworkManager", () => { sinon.assert.callCount(getThrottlingStub, 1); sinon.assert.callCount(setThrottlingStub, 1); sinon.assert.callCount(removeItemStub, 0); - expect(res).to.deep.eq(mockRes); + expect(res).toEqual(mockRes); }); it("throws network error if fetch client fails", (done) => { const networkInterface = DEFAULT_NETWORK_IMPLEMENTATION; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const networkManager = new NetworkManager(networkInterface, cache); const thumbprint: RequestThumbprint = THUMBPRINT; const options: NetworkRequestOptions = NETWORK_REQUEST_OPTIONS; @@ -134,10 +133,10 @@ describe("NetworkManager", () => { sinon.stub(networkInterface, "sendPostRequestAsync").returns(Promise.reject("Fetch failed")); networkManager.sendPostRequest>(thumbprint, "tokenEndpoint", options).catch(e => { - expect(e).to.be.instanceOf(ClientAuthError); - expect(e.errorCode).to.be.eq(ClientAuthErrorMessage.networkError.code); - expect(e.errorMessage).to.contain("Fetch failed"); - expect(e.errorMessage).to.contain("tokenEndpoint"); + expect(e).toBeInstanceOf(ClientAuthError); + expect(e.errorCode).toBe(ClientAuthErrorMessage.networkError.code); + expect(e.errorMessage.includes("Fetch failed")).toBe(true); + expect(e.errorMessage.includes("tokenEndpoint")).toBe(true); done(); }); }); diff --git a/lib/msal-common/test/network/ThrottlingUtils.spec.ts b/lib/msal-common/test/network/ThrottlingUtils.spec.ts index d8bc3ca430..db7852239f 100644 --- a/lib/msal-common/test/network/ThrottlingUtils.spec.ts +++ b/lib/msal-common/test/network/ThrottlingUtils.spec.ts @@ -3,14 +3,13 @@ * Licensed under the MIT License. */ -import { expect } from "chai"; import sinon from "sinon"; import { ThrottlingUtils } from "../../src/network/ThrottlingUtils"; import { RequestThumbprint } from "../../src/network/RequestThumbprint"; import { ThrottlingEntity } from "../../src/cache/entities/ThrottlingEntity"; import { NetworkResponse } from "../../src/network/NetworkManager"; import { ServerAuthorizationTokenResponse } from "../../src/response/ServerAuthorizationTokenResponse"; -import { MockStorageClass } from "../client/ClientTestUtils"; +import { MockStorageClass, mockCrypto } from "../client/ClientTestUtils"; import { ServerError } from "../../src"; import { THUMBPRINT, THROTTLING_ENTITY, TEST_CONFIG } from "../test_kit/StringConstants"; @@ -21,7 +20,7 @@ describe("ThrottlingUtils", () => { const jsonString = JSON.stringify(thumbprint); const key = ThrottlingUtils.generateThrottlingStorageKey(thumbprint); - expect(key).to.deep.eq(`throttling.${jsonString}`); + expect(key).toEqual(`throttling.${jsonString}`); }); }); @@ -33,7 +32,7 @@ describe("ThrottlingUtils", () => { it("checks the cache and throws an error", () => { const thumbprint: RequestThumbprint = THUMBPRINT; const thumbprintValue: ThrottlingEntity = THROTTLING_ENTITY; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const removeItemStub = sinon.stub(cache, "removeItem"); sinon.stub(cache, "getThrottlingCache").callsFake(() => thumbprintValue); sinon.stub(Date, "now").callsFake(() => 1); @@ -43,13 +42,13 @@ describe("ThrottlingUtils", () => { } catch { } sinon.assert.callCount(removeItemStub, 0); - expect(() => ThrottlingUtils.preProcess(cache, thumbprint)).to.throw(ServerError); + expect(() => ThrottlingUtils.preProcess(cache, thumbprint)).toThrowError(ServerError); }); it("checks the cache and removes an item", () => { const thumbprint: RequestThumbprint = THUMBPRINT; const thumbprintValue: ThrottlingEntity = THROTTLING_ENTITY; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const removeItemStub = sinon.stub(cache, "removeItem"); sinon.stub(cache, "getThrottlingCache").callsFake(() => thumbprintValue); sinon.stub(Date, "now").callsFake(() => 10); @@ -57,19 +56,19 @@ describe("ThrottlingUtils", () => { ThrottlingUtils.preProcess(cache, thumbprint); sinon.assert.callCount(removeItemStub, 1); - expect(() => ThrottlingUtils.preProcess(cache, thumbprint)).to.not.throw; + expect(() => ThrottlingUtils.preProcess(cache, thumbprint)).not.toThrow(); }); it("checks the cache and does nothing with no match", () => { const thumbprint: RequestThumbprint = THUMBPRINT; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const removeItemStub = sinon.stub(cache, "removeItem"); sinon.stub(cache, "getThrottlingCache").callsFake(() => null); ThrottlingUtils.preProcess(cache, thumbprint); sinon.assert.callCount(removeItemStub, 0); - expect(() => ThrottlingUtils.preProcess(cache, thumbprint)).to.not.throw; + expect(() => ThrottlingUtils.preProcess(cache, thumbprint)).not.toThrow(); }); }); @@ -85,7 +84,7 @@ describe("ThrottlingUtils", () => { body: { }, status: 429 }; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const setItemStub = sinon.stub(cache, "setThrottlingCache"); ThrottlingUtils.postProcess(cache, thumbprint, res); @@ -99,7 +98,7 @@ describe("ThrottlingUtils", () => { body: { }, status: 200 }; - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const setItemStub = sinon.stub(cache, "setThrottlingCache"); ThrottlingUtils.postProcess(cache, thumbprint, res); @@ -116,7 +115,7 @@ describe("ThrottlingUtils", () => { }; const bool = ThrottlingUtils.checkResponseStatus(res); - expect(bool).to.be.true; + expect(bool).toBe(true); }); it("returns true if 500 <= status < 600", () => { @@ -127,7 +126,7 @@ describe("ThrottlingUtils", () => { }; const bool = ThrottlingUtils.checkResponseStatus(res); - expect(bool).to.be.true; + expect(bool).toBe(true); }); it("returns false if status is not 429 or between 500 and 600", () => { @@ -138,7 +137,7 @@ describe("ThrottlingUtils", () => { }; const bool = ThrottlingUtils.checkResponseStatus(res); - expect(bool).to.be.false; + expect(bool).toBe(false); }); }); @@ -153,7 +152,7 @@ describe("ThrottlingUtils", () => { }; const bool = ThrottlingUtils.checkResponseForRetryAfter(res); - expect(bool).to.be.true; + expect(bool).toBe(true); }); it("returns true when Retry-After header exists and when status > 300", () => { @@ -166,7 +165,7 @@ describe("ThrottlingUtils", () => { }; const bool = ThrottlingUtils.checkResponseForRetryAfter(res); - expect(bool).to.be.true; + expect(bool).toBe(true); }); it("returns false when there is no RetryAfter header", () => { @@ -178,7 +177,7 @@ describe("ThrottlingUtils", () => { }; const bool = ThrottlingUtils.checkResponseForRetryAfter(res); - expect(bool).to.be.false; + expect(bool).toBe(false); }); it("returns false when 200 <= status < 300", () => { @@ -190,50 +189,51 @@ describe("ThrottlingUtils", () => { }; const bool = ThrottlingUtils.checkResponseForRetryAfter(res); - expect(bool).to.be.false; + expect(bool).toBe(false); }); }); describe("calculateThrottleTime", () => { - before(() => { + beforeAll(() => { sinon.stub(Date, "now").callsFake(() => 5000); }); - after(() => { + afterAll(() => { sinon.restore(); }); it("returns calculated time to throttle", () => { const time = ThrottlingUtils.calculateThrottleTime(10); - expect(time).to.be.deep.eq(15000); + expect(time).toEqual(15000); }); it("calculates with the default time given a bad number", () => { const time1 = ThrottlingUtils.calculateThrottleTime(-1); const time2 = ThrottlingUtils.calculateThrottleTime(0); + //@ts-ignore const time3 = ThrottlingUtils.calculateThrottleTime(null); // Based on Constants.DEFAULT_THROTTLE_TIME_SECONDS - expect(time1).to.be.deep.eq(65000); - expect(time2).to.be.deep.eq(65000); - expect(time3).to.be.deep.eq(65000); + expect(time1).toEqual(65000); + expect(time2).toEqual(65000); + expect(time3).toEqual(65000); }); it("calculates with the default MAX if given too large of a number", () => { const time = ThrottlingUtils.calculateThrottleTime(1000000000); // Based on Constants.DEFAULT_MAX_THROTTLE_TIME_SECONDS - expect(time).to.be.deep.eq(3605000); + expect(time).toEqual(3605000); }); }); describe("removeThrottle", () => { - after(() => { + afterAll(() => { sinon.restore(); }); it("removes the entry from storage and returns true", () => { - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const removeItemStub = sinon.stub(cache, "removeItem").returns(true); const clientId = TEST_CONFIG.MSAL_CLIENT_ID; const authority = TEST_CONFIG.validAuthority; @@ -242,11 +242,11 @@ describe("ThrottlingUtils", () => { const res = ThrottlingUtils.removeThrottle(cache, clientId, authority, scopes); sinon.assert.callCount(removeItemStub, 1); - expect(res).to.be.true; + expect(res).toBe(true); }); it("doesn't find an entry and returns false", () => { - const cache = new MockStorageClass(); + const cache = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const removeItemStub = sinon.stub(cache, "removeItem").returns(false); const clientId = TEST_CONFIG.MSAL_CLIENT_ID; const authority = TEST_CONFIG.validAuthority; @@ -255,7 +255,7 @@ describe("ThrottlingUtils", () => { const res = ThrottlingUtils.removeThrottle(cache, clientId, authority, scopes); sinon.assert.callCount(removeItemStub, 1); - expect(res).to.be.false; + expect(res).toBe(false); }); }); }); diff --git a/lib/msal-common/test/request/RequestParameterBuilder.spec.ts b/lib/msal-common/test/request/RequestParameterBuilder.spec.ts index 0e9d4f0de9..f1832abe75 100644 --- a/lib/msal-common/test/request/RequestParameterBuilder.spec.ts +++ b/lib/msal-common/test/request/RequestParameterBuilder.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import {Constants, SSOTypes, PromptValue, AADServerParamKeys, ResponseMode, GrantType, AuthenticationScheme} from "../../src/utils/Constants"; import { TEST_CONFIG, @@ -8,7 +7,6 @@ import { TEST_POP_VALUES } from "../test_kit/StringConstants"; import { RequestParameterBuilder } from "../../src/request/RequestParameterBuilder"; -import { ScopeSet } from "../../src/request/ScopeSet"; import { ClientConfigurationError, ClientConfigurationErrorMessage } from "../../src"; import sinon from "sinon"; @@ -16,7 +14,7 @@ describe("RequestParameterBuilder unit tests", () => { it("constructor", () => { const requestParameterBuilder = new RequestParameterBuilder(); - expect(requestParameterBuilder).to.be.instanceOf(RequestParameterBuilder); + expect(requestParameterBuilder).toBeInstanceOf(RequestParameterBuilder); }); it("Build query string from RequestParameterBuilder object", () => { @@ -41,90 +39,97 @@ describe("RequestParameterBuilder unit tests", () => { requestParameterBuilder.addSid(TEST_CONFIG.SID); const requestQueryString = requestParameterBuilder.createQueryString(); - expect(requestQueryString).to.contain(`${AADServerParamKeys.RESPONSE_TYPE}=${Constants.CODE_RESPONSE_TYPE}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.RESPONSE_MODE}=${encodeURIComponent(ResponseMode.FORM_POST)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`); - expect(requestQueryString).to.contain(`${SSOTypes.DOMAIN_HINT}=${encodeURIComponent(TEST_CONFIG.DOMAIN_HINT)}`); - expect(requestQueryString).to.contain(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.CLIENT_REQUEST_ID}=${encodeURIComponent(TEST_CONFIG.CORRELATION_ID)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.PROMPT}=${PromptValue.SELECT_ACCOUNT}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.STATE}=${encodeURIComponent(TEST_CONFIG.STATE)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.NONCE}=${encodeURIComponent(TEST_CONFIG.NONCE)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.CODE_CHALLENGE}=${encodeURIComponent(TEST_CONFIG.TEST_CHALLENGE)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.CODE_CHALLENGE_METHOD}=${encodeURIComponent(TEST_CONFIG.CODE_CHALLENGE_METHOD)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.CODE}=${encodeURIComponent(TEST_TOKENS.AUTHORIZATION_CODE)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.DEVICE_CODE}=${encodeURIComponent(DEVICE_CODE_RESPONSE.deviceCode)}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.CODE_VERIFIER}=${encodeURIComponent(TEST_CONFIG.TEST_VERIFIER)}`); - expect(requestQueryString).to.contain(`${SSOTypes.SID}=${encodeURIComponent(TEST_CONFIG.SID)}`); + expect(requestQueryString.includes(`${AADServerParamKeys.RESPONSE_TYPE}=${Constants.CODE_RESPONSE_TYPE}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.RESPONSE_MODE}=${encodeURIComponent(ResponseMode.FORM_POST)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.CLIENT_ID}=${TEST_CONFIG.MSAL_CLIENT_ID}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.REDIRECT_URI}=${encodeURIComponent(TEST_URIS.TEST_REDIRECT_URI_LOCALHOST)}`)).toBe(true); + expect(requestQueryString.includes(`${SSOTypes.DOMAIN_HINT}=${encodeURIComponent(TEST_CONFIG.DOMAIN_HINT)}`)).toBe(true); + expect(requestQueryString.includes(`${SSOTypes.LOGIN_HINT}=${encodeURIComponent(TEST_CONFIG.LOGIN_HINT)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.CLAIMS}=${encodeURIComponent(TEST_CONFIG.CLAIMS)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.CLIENT_REQUEST_ID}=${encodeURIComponent(TEST_CONFIG.CORRELATION_ID)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.PROMPT}=${PromptValue.SELECT_ACCOUNT}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.STATE}=${encodeURIComponent(TEST_CONFIG.STATE)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.NONCE}=${encodeURIComponent(TEST_CONFIG.NONCE)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.CODE_CHALLENGE}=${encodeURIComponent(TEST_CONFIG.TEST_CHALLENGE)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.CODE_CHALLENGE_METHOD}=${encodeURIComponent(TEST_CONFIG.CODE_CHALLENGE_METHOD)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.CODE}=${encodeURIComponent(TEST_TOKENS.AUTHORIZATION_CODE)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.DEVICE_CODE}=${encodeURIComponent(DEVICE_CODE_RESPONSE.deviceCode)}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.CODE_VERIFIER}=${encodeURIComponent(TEST_CONFIG.TEST_VERIFIER)}`)).toBe(true); + expect(requestQueryString.includes(`${SSOTypes.SID}=${encodeURIComponent(TEST_CONFIG.SID)}`)).toBe(true); }); it("Adds token type and req_cnf correctly for proof-of-possession tokens", () => { const requestParameterBuilder = new RequestParameterBuilder(); requestParameterBuilder.addPopToken(TEST_POP_VALUES.ENCODED_REQ_CNF); const requestQueryString = requestParameterBuilder.createQueryString(); - expect(requestQueryString).to.contain(`${AADServerParamKeys.TOKEN_TYPE}=${AuthenticationScheme.POP}`); - expect(requestQueryString).to.contain(`${AADServerParamKeys.REQ_CNF}=${encodeURIComponent(TEST_POP_VALUES.ENCODED_REQ_CNF)}`); + expect(requestQueryString.includes(`${AADServerParamKeys.TOKEN_TYPE}=${AuthenticationScheme.POP}`)).toBe(true); + expect(requestQueryString.includes(`${AADServerParamKeys.REQ_CNF}=${encodeURIComponent(TEST_POP_VALUES.ENCODED_REQ_CNF)}`)).toBe(true); }); it("Does not add token type or req_cnf if req_cnf is undefined or empty", () => { const requestParameterBuilder = new RequestParameterBuilder(); requestParameterBuilder.addPopToken(""); const requestQueryString = requestParameterBuilder.createQueryString(); - expect(requestQueryString).to.be.empty; + expect(Object.keys(requestQueryString)).toHaveLength(0); const requestParameterBuilder2 = new RequestParameterBuilder(); + //@ts-ignore requestParameterBuilder.addPopToken(undefined); const requestQueryString2 = requestParameterBuilder2.createQueryString(); - expect(requestQueryString2).to.be.empty; + expect(Object.keys(requestQueryString2)).toHaveLength(0); }); it("addScopes appends oidc scopes by default", () => { let requestParameterBuilder = new RequestParameterBuilder(); requestParameterBuilder.addScopes(["testScope"]); let requestQueryString = requestParameterBuilder.createQueryString(); - expect(requestQueryString).to.contain(`${AADServerParamKeys.SCOPE}=testScope%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); + expect(requestQueryString.includes(`${AADServerParamKeys.SCOPE}=testScope%20${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); requestParameterBuilder = new RequestParameterBuilder(); requestParameterBuilder.addScopes([]); requestQueryString = requestParameterBuilder.createQueryString(); - expect(requestQueryString).to.contain(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); + expect(requestQueryString.includes(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); requestParameterBuilder = new RequestParameterBuilder(); + //@ts-ignore requestParameterBuilder.addScopes(null); requestQueryString = requestParameterBuilder.createQueryString(); - expect(requestQueryString).to.contain(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); + expect(requestQueryString.includes(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); requestParameterBuilder = new RequestParameterBuilder(); + //@ts-ignore requestParameterBuilder.addScopes(undefined); requestQueryString = requestParameterBuilder.createQueryString(); - expect(requestQueryString).to.contain(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`); + expect(requestQueryString.includes(`${AADServerParamKeys.SCOPE}=${Constants.OPENID_SCOPE}%20${Constants.PROFILE_SCOPE}%20${Constants.OFFLINE_ACCESS_SCOPE}`)).toBe(true); }); it("addScopes does not append oidc scopes if flag set to false", () => { const requestParameterBuilder = new RequestParameterBuilder(); requestParameterBuilder.addScopes(["testScope"], false); const requestQueryString = requestParameterBuilder.createQueryString(); - expect(requestQueryString).to.contain(`${AADServerParamKeys.SCOPE}=testScope`); + expect(requestQueryString.includes(`${AADServerParamKeys.SCOPE}=testScope`)).toBe(true); }); it("addCodeChallengeParams throws invalidCodeChallengeParamsError if codeChallengeMethod empty", () => { const requestParameterBuilder = new RequestParameterBuilder(); - expect(() => requestParameterBuilder.addCodeChallengeParams(TEST_CONFIG.TEST_CHALLENGE, "")).to.throw(ClientConfigurationError.createInvalidCodeChallengeParamsError().errorMessage); + expect(() => requestParameterBuilder.addCodeChallengeParams(TEST_CONFIG.TEST_CHALLENGE, "")).toThrowError( + ClientConfigurationError.createInvalidCodeChallengeParamsError().errorMessage + ); }); it("addCodeChallengeParams throws invalidCodeChallengeParamsError if codeChallenge empty", () => { const requestParameterBuilder = new RequestParameterBuilder(); - expect(() => requestParameterBuilder.addCodeChallengeParams("", AADServerParamKeys.CODE_CHALLENGE_METHOD)).to.throw(ClientConfigurationError.createInvalidCodeChallengeParamsError().errorMessage); + expect(() => requestParameterBuilder.addCodeChallengeParams("", AADServerParamKeys.CODE_CHALLENGE_METHOD)).toThrowError( + ClientConfigurationError.createInvalidCodeChallengeParamsError().errorMessage + ); }); it("throws error if claims is not stringified JSON object", () => { const claims = "not-a-valid-JSON-object"; sinon.stub(RequestParameterBuilder.prototype, "addClientCapabilitiesToClaims").returns(claims); const requestParameterBuilder = new RequestParameterBuilder(); - expect(() => requestParameterBuilder.addClaims(claims, [])).to.throw(ClientConfigurationErrorMessage.invalidClaimsRequest.desc); + expect(() => requestParameterBuilder.addClaims(claims, [])).toThrowError(ClientConfigurationErrorMessage.invalidClaimsRequest.desc); sinon.restore(); }); @@ -132,14 +137,14 @@ describe("RequestParameterBuilder unit tests", () => { it("passing just claims returns claims", () => { const requestParameterBuilder = new RequestParameterBuilder(); const testClaims = TEST_CONFIG.CLAIMS; - expect(requestParameterBuilder.addClientCapabilitiesToClaims(testClaims, [])).to.eq(testClaims); + expect(requestParameterBuilder.addClientCapabilitiesToClaims(testClaims, [])).toBe(testClaims); }); it("passing just clientCapabilities returns clientCapabilities as claims request", () => { const requestParameterBuilder = new RequestParameterBuilder(); const clientCapabilities = ["CP1"]; const expectedString = "{\"access_token\":{\"xms_cc\":{\"values\":[\"CP1\"]}}}"; - expect(requestParameterBuilder.addClientCapabilitiesToClaims(undefined, clientCapabilities)).to.eq(expectedString); + expect(requestParameterBuilder.addClientCapabilitiesToClaims(undefined, clientCapabilities)).toBe(expectedString); }); it("passed claims already has access_token key, append xms_cc claim from clientCapabilities", () => { @@ -147,7 +152,7 @@ describe("RequestParameterBuilder unit tests", () => { const claimsRequest = "{\"access_token\":{\"example_claim\":{\"values\":[\"example_value\"]}}}"; const clientCapabilities = ["CP1"]; const expectedString = "{\"access_token\":{\"example_claim\":{\"values\":[\"example_value\"]},\"xms_cc\":{\"values\":[\"CP1\"]}}}"; - expect(requestParameterBuilder.addClientCapabilitiesToClaims(claimsRequest, clientCapabilities)).to.eq(expectedString); + expect(requestParameterBuilder.addClientCapabilitiesToClaims(claimsRequest, clientCapabilities)).toBe(expectedString); }); it("passed claims does not have access_token key, add access_token key and xms_cc key underneath", () => { @@ -155,13 +160,13 @@ describe("RequestParameterBuilder unit tests", () => { const claimsRequest = "{\"id_token\":{\"example_claim\":{\"values\":[\"example_value\"]}}}"; const clientCapabilities = ["CP1"]; const expectedString = "{\"id_token\":{\"example_claim\":{\"values\":[\"example_value\"]}},\"access_token\":{\"xms_cc\":{\"values\":[\"CP1\"]}}}"; - expect(requestParameterBuilder.addClientCapabilitiesToClaims(claimsRequest, clientCapabilities)).to.eq(expectedString); + expect(requestParameterBuilder.addClientCapabilitiesToClaims(claimsRequest, clientCapabilities)).toBe(expectedString); }); it("throws error if claims passed is not stringified JSON object", () => { const requestParameterBuilder = new RequestParameterBuilder(); const testClaims = "not-a-valid-JSON-object"; - expect(() => requestParameterBuilder.addClientCapabilitiesToClaims(testClaims, [])).to.throw(ClientConfigurationErrorMessage.invalidClaimsRequest.desc); + expect(() => requestParameterBuilder.addClientCapabilitiesToClaims(testClaims, [])).toThrowError(ClientConfigurationErrorMessage.invalidClaimsRequest.desc); }); }); }); diff --git a/lib/msal-common/test/request/RequestValidator.spec.ts b/lib/msal-common/test/request/RequestValidator.spec.ts index 0436649bc1..ed2584a90c 100644 --- a/lib/msal-common/test/request/RequestValidator.spec.ts +++ b/lib/msal-common/test/request/RequestValidator.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { ClientConfigurationError } from "../../src"; @@ -12,8 +11,7 @@ describe("RequestValidator unit tests", () => { describe("ValidateRedirectUri tests", () => { it("Throws UrlEmptyError if redirect uri is empty", () => { - expect( function () {RequestValidator.validateRedirectUri("")}) - .to.throw(ClientConfigurationError.createRedirectUriEmptyError().message); + expect( function () {RequestValidator.validateRedirectUri("")}).toThrowError(ClientConfigurationError.createRedirectUriEmptyError().message); }); }); @@ -32,8 +30,7 @@ describe("RequestValidator unit tests", () => { RequestValidator.validatePrompt(PromptValue.NONE); }); it("Throws InvalidPromptError if invalid prompt value passed in", () => { - expect(function() { RequestValidator.validatePrompt("")}) - .to.throw(ClientConfigurationError.createInvalidPromptError("").message); + expect(function() { RequestValidator.validatePrompt("")}).toThrowError(ClientConfigurationError.createInvalidPromptError("").message); }); }); @@ -44,8 +41,7 @@ describe("RequestValidator unit tests", () => { }); it("Throws InvalidClaimsError if invalid claims value passed in", () => { - expect(function() { RequestValidator.validateClaims("invalid_claims_value")}) - .to.throw(ClientConfigurationError.createInvalidClaimsRequestError().message); + expect(function() { RequestValidator.validateClaims("invalid_claims_value")}).toThrowError(ClientConfigurationError.createInvalidClaimsRequestError().message); }); }); @@ -53,13 +49,11 @@ describe("RequestValidator unit tests", () => { describe("ValidateCodeChallengeParams tests", () => { it("Throws InvalidCodeChallengeParamsError if no code challenge method present", () => { - expect(function() { RequestValidator.validateCodeChallengeParams("",TEST_CONFIG.CODE_CHALLENGE_METHOD)}) - .to.throw(ClientConfigurationError.createInvalidCodeChallengeParamsError().message); + expect(function() { RequestValidator.validateCodeChallengeParams("",TEST_CONFIG.CODE_CHALLENGE_METHOD)}).toThrowError(ClientConfigurationError.createInvalidCodeChallengeParamsError().message); }); it("Throws InvalidCodeChallengeMethodError if no code challenge method present", () => { - expect(function() { RequestValidator.validateCodeChallengeParams(TEST_CONFIG.TEST_CHALLENGE, "255")}) - .to.throw(ClientConfigurationError.createInvalidCodeChallengeMethodError().message); + expect(function() { RequestValidator.validateCodeChallengeParams(TEST_CONFIG.TEST_CHALLENGE, "255")}).toThrowError(ClientConfigurationError.createInvalidCodeChallengeMethodError().message); }); }); }); diff --git a/lib/msal-common/test/request/ScopeSet.spec.ts b/lib/msal-common/test/request/ScopeSet.spec.ts index 83e8543be7..d278d29443 100644 --- a/lib/msal-common/test/request/ScopeSet.spec.ts +++ b/lib/msal-common/test/request/ScopeSet.spec.ts @@ -1,6 +1,4 @@ -import { expect } from "chai"; import { ScopeSet } from "../../src/request/ScopeSet"; -import { TEST_CONFIG } from "../test_kit/StringConstants"; import { ClientConfigurationError, ClientConfigurationErrorMessage, Constants, ClientAuthError, ClientAuthErrorMessage } from "../../src"; import sinon from "sinon"; import { OIDC_DEFAULT_SCOPES, OIDC_SCOPES } from "../../src/utils/Constants"; @@ -10,11 +8,13 @@ describe("ScopeSet.ts", () => { describe("Constructor and scope validation", () => { it("Throws error if scopes are null or empty and required", () => { - expect(() => new ScopeSet(null)).to.throw(ClientConfigurationErrorMessage.emptyScopesError.desc); - expect(() => new ScopeSet(null)).to.throw(ClientConfigurationError); + // @ts-ignore + expect(() => new ScopeSet(null)).toThrowError(ClientConfigurationErrorMessage.emptyScopesError.desc); + // @ts-ignore + expect(() => new ScopeSet(null)).toThrowError(ClientConfigurationError); - expect(() => new ScopeSet([])).to.throw(ClientConfigurationErrorMessage.emptyScopesError.desc); - expect(() => new ScopeSet([])).to.throw(ClientConfigurationError); + expect(() => new ScopeSet([])).toThrowError(ClientConfigurationErrorMessage.emptyScopesError.desc); + expect(() => new ScopeSet([])).toThrowError(ClientConfigurationError); }); it("Trims array string values", () => { @@ -25,7 +25,7 @@ describe("ScopeSet.ts", () => { const testScope3 = " TESTSCOPE3 "; const trimmedTestScope3 = "TESTSCOPE3"; const scopeSet = new ScopeSet([testScope1, testScope2, testScope3]); - expect(scopeSet.asArray()).to.deep.eq([trimmedTestScope1, trimmedTestScope2, trimmedTestScope3]); + expect(scopeSet.asArray()).toEqual([trimmedTestScope1, trimmedTestScope2, trimmedTestScope3]); }); it("Removes case-sensitive duplicates from input scope array", () => { @@ -35,21 +35,25 @@ describe("ScopeSet.ts", () => { const testScope4 = "testscope"; const testScope5 = "testscope"; const scopeSet = new ScopeSet([testScope1, testScope2, testScope3, testScope4, testScope5]); - expect(scopeSet.asArray()).to.deep.eq([testScope1, testScope2, testScope3, testScope4]); + expect(scopeSet.asArray()).toEqual([testScope1, testScope2, testScope3, testScope4]); }); }); describe("fromString Constructor", () => { it("Throws error if scopeString is empty, null or undefined if scopes are required", () => { - expect(() => ScopeSet.fromString("")).to.throw(ClientConfigurationErrorMessage.emptyScopesError.desc); - expect(() => ScopeSet.fromString("")).to.throw(ClientConfigurationError); + expect(() => ScopeSet.fromString("")).toThrowError(ClientConfigurationErrorMessage.emptyScopesError.desc); + expect(() => ScopeSet.fromString("")).toThrowError(ClientConfigurationError); - expect(() => ScopeSet.fromString(null)).to.throw(ClientConfigurationErrorMessage.emptyScopesError.desc); - expect(() => ScopeSet.fromString(null)).to.throw(ClientConfigurationError); + // @ts-ignore + expect(() => ScopeSet.fromString(null)).toThrowError(ClientConfigurationErrorMessage.emptyScopesError.desc); + // @ts-ignore + expect(() => ScopeSet.fromString(null)).toThrowError(ClientConfigurationError); - expect(() => ScopeSet.fromString(undefined)).to.throw(ClientConfigurationErrorMessage.emptyScopesError.desc); - expect(() => ScopeSet.fromString(undefined)).to.throw(ClientConfigurationError); + // @ts-ignore + expect(() => ScopeSet.fromString(undefined)).toThrowError(ClientConfigurationErrorMessage.emptyScopesError.desc); + // @ts-ignore + expect(() => ScopeSet.fromString(undefined)).toThrowError(ClientConfigurationError); }); it("Trims array string values", () => { @@ -60,7 +64,7 @@ describe("ScopeSet.ts", () => { const testScope3 = " TESTSCOPE3 "; const trimmedTestScope3 = "TESTSCOPE3"; const scopeSet = ScopeSet.fromString(`${testScope1} ${testScope2} ${testScope3}`); - expect(scopeSet.asArray()).to.deep.eq([trimmedTestScope1, trimmedTestScope2, trimmedTestScope3]); + expect(scopeSet.asArray()).toEqual([trimmedTestScope1, trimmedTestScope2, trimmedTestScope3]); }); it("Removes case-sensitive duplicates from input scope array", () => { @@ -70,7 +74,7 @@ describe("ScopeSet.ts", () => { const testScope4 = "testscope"; const testScope5 = "testscope"; const scopeSet = ScopeSet.fromString(`${testScope1} ${testScope2} ${testScope3} ${testScope4} ${testScope5}`); - expect(scopeSet.asArray()).to.deep.eq([testScope1, testScope2, testScope3, testScope4]); + expect(scopeSet.asArray()).toEqual([testScope1, testScope2, testScope3, testScope4]); }); }); @@ -88,79 +92,89 @@ describe("ScopeSet.ts", () => { }); it("containsScope() checks if a given scope is present in the set of scopes", () => { - expect(scopes.containsScope(Constants.OPENID_SCOPE)).to.be.false; - expect(scopes.containsScope("notinset")).to.be.false; - expect(scopes.containsScope(testScope)).to.be.true; + expect(scopes.containsScope(Constants.OPENID_SCOPE)).toBe(false); + expect(scopes.containsScope("notinset")).toBe(false); + expect(scopes.containsScope(testScope)).toBe(true); }); it("containsScope() returns false if null or empty scope is passed to it", () => { - expect(scopes.containsScope("")).to.be.false; - expect(scopes.containsScope(null)).to.be.false; - expect(scopes.containsScope(undefined)).to.be.false; + expect(scopes.containsScope("")).toBe(false); + // @ts-ignore + expect(scopes.containsScope(null)).toBe(false); + // @ts-ignore + expect(scopes.containsScope(undefined)).toBe(false); }); it("containsScopeSet() checks if a given ScopeSet is fully contained in another - returns false otherwise", () => { const biggerSet = new ScopeSet([testScope, "testScope2", "testScope3"]); - expect(biggerSet.containsScopeSet(scopes)).to.be.true; + expect(biggerSet.containsScopeSet(scopes)).toBe(true); const alternateSet = new ScopeSet(["testScope2"]); - expect(scopes.containsScopeSet(alternateSet)).to.be.false; + expect(scopes.containsScopeSet(alternateSet)).toBe(false); }); it("containsScopeSet() returns false if given ScopeSet is null or undefined", () => { - expect(scopes.containsScopeSet(null)).to.be.false; - expect(scopes.containsScopeSet(undefined)).to.be.false; + // @ts-ignore + expect(scopes.containsScopeSet(null)).toBe(false); + // @ts-ignore + expect(scopes.containsScopeSet(undefined)).toBe(false); }); it("appendScope() adds scope to set after trimming", () => { - expect(scopes.asArray()).to.contain(testScope); + expect(scopes.asArray()).toEqual(expect.arrayContaining([testScope])); scopes.appendScope(" testScope2 "); - expect(scopes.asArray()).to.contain("testScope2"); + expect(scopes.asArray()).toEqual(expect.arrayContaining(["testScope2"])); }); it("appendScope() does not add duplicates to ScopeSet", () => { const scopeArr = scopes.asArray(); scopes.appendScope(testScope); const newScopeArr = scopes.asArray(); - expect(newScopeArr).to.be.deep.eq(scopeArr); + expect(newScopeArr).toEqual(scopeArr); }); it("appendScope() does nothing if given scope is empty, null or undefined", () => { const testScopes = [testScope]; const setAddSpy = sinon.spy(Set.prototype, "add"); scopes.appendScope(""); - expect(setAddSpy.called).to.be.false; - expect(scopes.asArray()).to.be.deep.eq(testScopes); + expect(setAddSpy.called).toBe(false); + expect(scopes.asArray()).toEqual(testScopes); + // @ts-ignore scopes.appendScope(null); - expect(setAddSpy.called).to.be.false; - expect(scopes.asArray()).to.be.deep.eq(testScopes); + expect(setAddSpy.called).toBe(false); + expect(scopes.asArray()).toEqual(testScopes); + // @ts-ignore scopes.appendScope(undefined); - expect(setAddSpy.called).to.be.false; - expect(scopes.asArray()).to.be.deep.eq(testScopes); + expect(setAddSpy.called).toBe(false); + expect(scopes.asArray()).toEqual(testScopes); }); it("appendScopes() throws error if given array is null or undefined", () => { - expect(() => scopes.appendScopes(null)).to.throw(ClientAuthError); - expect(() => scopes.appendScopes(null)).to.throw(ClientAuthErrorMessage.appendScopeSetError.desc); + // @ts-ignore + expect(() => scopes.appendScopes(null)).toThrowError(ClientAuthError); + // @ts-ignore + expect(() => scopes.appendScopes(null)).toThrowError(ClientAuthErrorMessage.appendScopeSetError.desc); - expect(() => scopes.appendScopes(undefined)).to.throw(ClientAuthError); - expect(() => scopes.appendScopes(undefined)).to.throw(ClientAuthErrorMessage.appendScopeSetError.desc); + // @ts-ignore + expect(() => scopes.appendScopes(undefined)).toThrowError(ClientAuthError); + // @ts-ignore + expect(() => scopes.appendScopes(undefined)).toThrowError(ClientAuthErrorMessage.appendScopeSetError.desc); }); it("appendScopes() does not change ScopeSet if given array is empty", () => { const scopeArr = scopes.asArray(); scopes.appendScopes([]); - expect(scopes.asArray()).to.be.deep.eq(scopeArr); + expect(scopes.asArray()).toEqual(scopeArr); }); it("appendScopes() adds multiple scopes to ScopeSet", () => { const testScope2 = "testscope2"; const testScope3 = "testscope3"; scopes.appendScopes([testScope2, testScope3]); - expect(scopes.asArray()).to.contain(testScope2); - expect(scopes.asArray()).to.contain(testScope3); + expect(scopes.asArray()).toEqual(expect.arrayContaining([testScope2])); + expect(scopes.asArray()).toEqual(expect.arrayContaining([testScope3])); }); it("appendScopes() trims scopes before adding", () => { @@ -169,42 +183,50 @@ describe("ScopeSet.ts", () => { const testScope3 = " testscope3 "; const expectedTestScope3 = "testscope3"; scopes.appendScopes([testScope2, testScope3]); - expect(scopes.asArray()).to.contain(expectedTestScope2); - expect(scopes.asArray()).to.contain(expectedTestScope3); + expect(scopes.asArray()).toEqual(expect.arrayContaining([expectedTestScope2])); + expect(scopes.asArray()).toEqual(expect.arrayContaining([expectedTestScope3])); }) it("appendScopes() does not add duplicate scopes", () => { const unchangedScopes = new ScopeSet([testScope, Constants.OFFLINE_ACCESS_SCOPE]); const scopeArr = unchangedScopes.asArray(); unchangedScopes.appendScopes([testScope, Constants.OFFLINE_ACCESS_SCOPE]); - expect(unchangedScopes.asArray()).to.be.deep.eq(scopeArr); + expect(unchangedScopes.asArray()).toEqual(scopeArr); }); it("removeScopes() throws error if scope is null, undefined or empty", () => { - expect(() => scopes.removeScope(null)).to.throw(ClientAuthErrorMessage.removeEmptyScopeError.desc); - expect(() => scopes.removeScope(null)).to.throw(ClientAuthError); + // @ts-ignore + expect(() => scopes.removeScope(null)).toThrowError(ClientAuthErrorMessage.removeEmptyScopeError.desc); + // @ts-ignore + expect(() => scopes.removeScope(null)).toThrowError(ClientAuthError); - expect(() => scopes.removeScope(undefined)).to.throw(ClientAuthErrorMessage.removeEmptyScopeError.desc); - expect(() => scopes.removeScope(undefined)).to.throw(ClientAuthError); + // @ts-ignore + expect(() => scopes.removeScope(undefined)).toThrowError(ClientAuthErrorMessage.removeEmptyScopeError.desc); + // @ts-ignore + expect(() => scopes.removeScope(undefined)).toThrowError(ClientAuthError); - expect(() => scopes.removeScope("")).to.throw(ClientAuthErrorMessage.removeEmptyScopeError.desc); - expect(() => scopes.removeScope("")).to.throw(ClientAuthError); + expect(() => scopes.removeScope("")).toThrowError(ClientAuthErrorMessage.removeEmptyScopeError.desc); + expect(() => scopes.removeScope("")).toThrowError(ClientAuthError); }); it("removeScopes() correctly removes scopes", () => { const scopeArr = scopes.asArray(); scopes.removeScope("testScope2"); - expect(scopes.asArray()).to.be.deep.eq(scopeArr); + expect(scopes.asArray()).toEqual(scopeArr); scopes.removeScope(testScope); - expect(scopes.asArray()).to.be.empty; + expect(scopes.asArray()).toHaveLength(0); }); it("unionScopeSets() throws error if input is null or undefined", () => { - expect(() => scopes.unionScopeSets(null)).to.throw(ClientAuthErrorMessage.emptyInputScopeSetError.desc); - expect(() => scopes.unionScopeSets(null)).to.throw(ClientAuthError); + // @ts-ignore + expect(() => scopes.unionScopeSets(null)).toThrowError(ClientAuthErrorMessage.emptyInputScopeSetError.desc); + // @ts-ignore + expect(() => scopes.unionScopeSets(null)).toThrowError(ClientAuthError); - expect(() => scopes.unionScopeSets(undefined)).to.throw(ClientAuthErrorMessage.emptyInputScopeSetError.desc); - expect(() => scopes.unionScopeSets(undefined)).to.throw(ClientAuthError); + // @ts-ignore + expect(() => scopes.unionScopeSets(undefined)).toThrowError(ClientAuthErrorMessage.emptyInputScopeSetError.desc); + // @ts-ignore + expect(() => scopes.unionScopeSets(undefined)).toThrowError(ClientAuthError); }); it("unionScopeSets() combines multiple sets and returns new Set of scopes", () => { @@ -215,25 +237,29 @@ describe("ScopeSet.ts", () => { const unionSet = newScopeSet.unionScopeSets(scopes); const unionArray = Array.from(unionSet); - expect(unionSet instanceof Set).to.be.true; - expect(unionSet.size).to.be.eq(newScopeSet.getScopeCount() + scopes.getScopeCount()); + expect(unionSet instanceof Set).toBe(true); + expect(unionSet.size).toBe(newScopeSet.getScopeCount() + scopes.getScopeCount()); for(let i = 0; i < unionArray.length; i++) { - expect(newScopeSet.containsScope(unionArray[i]) || scopes.containsScope(unionArray[i])).to.be.true; + expect(newScopeSet.containsScope(unionArray[i]) || scopes.containsScope(unionArray[i])).toBe(true); } }); it("intersectingScopeSets() throws error if input is null or undefined", () => { - expect(() => scopes.intersectingScopeSets(null)).to.throw(ClientAuthErrorMessage.emptyInputScopeSetError.desc); - expect(() => scopes.intersectingScopeSets(null)).to.throw(ClientAuthError); + // @ts-ignore + expect(() => scopes.intersectingScopeSets(null)).toThrowError(ClientAuthErrorMessage.emptyInputScopeSetError.desc); + // @ts-ignore + expect(() => scopes.intersectingScopeSets(null)).toThrowError(ClientAuthError); - expect(() => scopes.intersectingScopeSets(undefined)).to.throw(ClientAuthErrorMessage.emptyInputScopeSetError.desc); - expect(() => scopes.intersectingScopeSets(undefined)).to.throw(ClientAuthError); + // @ts-ignore + expect(() => scopes.intersectingScopeSets(undefined)).toThrowError(ClientAuthErrorMessage.emptyInputScopeSetError.desc); + // @ts-ignore + expect(() => scopes.intersectingScopeSets(undefined)).toThrowError(ClientAuthError); }); it("intersectingScopeSets() returns true if ScopeSets have one or more scopes in common", () => { const testScope2 = "testScope2"; const newScopeSet = new ScopeSet([testScope, testScope2]); - expect(newScopeSet.intersectingScopeSets(scopes)).to.be.true; + expect(newScopeSet.intersectingScopeSets(scopes)).toBe(true); }); it("intersectingScopeSets() returns false if ScopeSets have no scopes in common", () => { @@ -242,13 +268,13 @@ describe("ScopeSet.ts", () => { const newScopeSet = new ScopeSet([testScope2, testScope3]); newScopeSet.removeScope(Constants.OFFLINE_ACCESS_SCOPE); - expect(newScopeSet.intersectingScopeSets(scopes)).to.be.false; + expect(newScopeSet.intersectingScopeSets(scopes)).toBe(false); }); it("intersectingScopeSets() does not ignore OIDC scopes if they are only present", () => { const scopeset1 = new ScopeSet([...OIDC_SCOPES]); const scopeset2 = new ScopeSet([...OIDC_SCOPES]); - expect(scopeset1.intersectingScopeSets(scopeset2)).to.be.true; + expect(scopeset1.intersectingScopeSets(scopeset2)).toBe(true); }); it("intersectingScopeSets() ignores OIDC scopes if other scopes are present", () => { @@ -256,21 +282,21 @@ describe("ScopeSet.ts", () => { const testScope2 = "testScope2"; const scopeset1 = new ScopeSet([...OIDC_SCOPES, testScope]); const scopeset2 = new ScopeSet([...OIDC_SCOPES, testScope2]); - expect(scopeset1.intersectingScopeSets(scopeset2)).to.be.false; + expect(scopeset1.intersectingScopeSets(scopeset2)).toBe(false); const scopeset3 = new ScopeSet([Constants.OPENID_SCOPE, Constants.PROFILE_SCOPE, Constants.EMAIL_SCOPE, testScope]); const scopeset4 = new ScopeSet([...OIDC_DEFAULT_SCOPES, testScope]); - expect(scopeset3.intersectingScopeSets(scopeset4)).to.be.true; + expect(scopeset3.intersectingScopeSets(scopeset4)).toBe(true); }); it("getScopeCount() correctly returns the size of the ScopeSet", () => { - expect(scopes.getScopeCount()).to.be.eq(1); + expect(scopes.getScopeCount()).toBe(1); const twoScopes = new ScopeSet(["1", "2"]); - expect(twoScopes.getScopeCount()).to.be.eq(2); + expect(twoScopes.getScopeCount()).toBe(2); const threeScopes = new ScopeSet(["1", "2", "3"]) - expect(threeScopes.getScopeCount()).to.be.eq(3); + expect(threeScopes.getScopeCount()).toBe(3); }); }); @@ -297,27 +323,27 @@ describe("ScopeSet.ts", () => { it("asArray() returns ScopeSet as an array", () => { const scopeArr = nonRequiredScopeSet.asArray(); - expect(Array.isArray(scopeArr)).to.be.true; - expect(scopeArr.length).to.be.eq(nonRequiredScopeSet.getScopeCount()); + expect(Array.isArray(scopeArr)).toBe(true); + expect(scopeArr.length).toBe(nonRequiredScopeSet.getScopeCount()); for (let i = 0; i < scopeArr.length; i++) { - expect(nonRequiredScopeSet.containsScope(scopeArr[i])).to.be.true; + expect(nonRequiredScopeSet.containsScope(scopeArr[i])).toBe(true); } }); it("printScopes() prints space-delimited string of scopes", () => { const scopeArr = nonRequiredScopeSet.asArray(); - expect(nonRequiredScopeSet.printScopes()).to.be.eq(scopeArr.join(" ")); + expect(nonRequiredScopeSet.printScopes()).toBe(scopeArr.join(" ")); }); it("printScopes() prints empty string if ScopeSet is empty", () => { requiredScopeSet.removeScope(testScope); requiredScopeSet.removeScope(Constants.OFFLINE_ACCESS_SCOPE); - expect(requiredScopeSet.printScopes()).to.be.eq(""); + expect(requiredScopeSet.printScopes()).toBe(""); }); it("printScopesLowerCase() prints space-delimited string of scopes in lowercase", () => { const scopeArr = lowercaseScopeSet.asArray(); - expect(uppercaseScopeSet.printScopesLowerCase()).to.be.eq(scopeArr.join(" ")); + expect(uppercaseScopeSet.printScopesLowerCase()).toBe(scopeArr.join(" ")); }); }); }); diff --git a/lib/msal-common/test/response/ResponseHandler.spec.ts b/lib/msal-common/test/response/ResponseHandler.spec.ts index 0a7867e69e..580efe5d61 100644 --- a/lib/msal-common/test/response/ResponseHandler.spec.ts +++ b/lib/msal-common/test/response/ResponseHandler.spec.ts @@ -1,23 +1,34 @@ -import * as Mocha from "mocha"; -import { expect } from "chai"; import sinon from "sinon"; import { ServerAuthorizationTokenResponse } from "../../src/response/ServerAuthorizationTokenResponse"; import { ResponseHandler } from "../../src/response/ResponseHandler"; -import { AUTHENTICATION_RESULT, RANDOM_TEST_GUID, TEST_CONFIG, ID_TOKEN_CLAIMS, TEST_DATA_CLIENT_INFO, TEST_STATE_VALUES, TEST_POP_VALUES, POP_AUTHENTICATION_RESULT, TEST_URIS, DEFAULT_OPENID_CONFIG_RESPONSE } from "../test_kit/StringConstants"; +import { AUTHENTICATION_RESULT, RANDOM_TEST_GUID, TEST_CONFIG, ID_TOKEN_CLAIMS, TEST_DATA_CLIENT_INFO, TEST_STATE_VALUES, TEST_POP_VALUES, POP_AUTHENTICATION_RESULT, TEST_URIS, TEST_TOKEN_LIFETIMES, TEST_TOKENS } from "../test_kit/StringConstants"; import { Authority } from "../../src/authority/Authority"; import { INetworkModule, NetworkRequestOptions } from "../../src/network/INetworkModule"; import { ICrypto, PkceCodes } from "../../src/crypto/ICrypto"; -import { ClientTestUtils } from "../client/ClientTestUtils"; -import { AccountEntity, ClientAuthError, ClientAuthErrorMessage, InteractionRequiredAuthError, ServerError, AuthToken, AuthError, TokenClaims, AuthenticationScheme, ProtocolMode, Logger, LogLevel, AuthorityOptions, TimeUtils, BaseAuthRequest } from "../../src"; import { ServerAuthorizationCodeResponse } from "../../src/response/ServerAuthorizationCodeResponse"; import { MockStorageClass } from "../client/ClientTestUtils"; +import { TokenClaims } from "../../src/account/TokenClaims"; +import { AccountInfo } from "../../src/account/AccountInfo"; +import { AuthenticationResult } from "../../src/response/AuthenticationResult"; +import { AuthenticationScheme } from "../../src/utils/Constants"; +import { AuthorityOptions } from "../../src/authority/AuthorityOptions"; +import { ProtocolMode } from "../../src/authority/ProtocolMode"; +import { LogLevel, Logger } from "../../src/logger/Logger"; +import { AuthToken } from "../../src/account/AuthToken"; +import { AccountEntity } from "../../src/cache/entities/AccountEntity"; +import { BaseAuthRequest } from "../../src/request/BaseAuthRequest"; +import { TimeUtils } from "../../src/utils/TimeUtils"; +import { AuthError } from "../../src/error/AuthError"; +import { ClientAuthError, ClientAuthErrorMessage } from "../../src/error/ClientAuthError"; +import { InteractionRequiredAuthError } from "../../src/error/InteractionRequiredAuthError"; +import { ServerError } from "../../src/error/ServerError"; const networkInterface: INetworkModule = { sendGetRequestAsync(url: string, options?: NetworkRequestOptions): T { - return null; + return {} as T; }, sendPostRequestAsync(url: string, options?: NetworkRequestOptions): T { - return null; + return {} as T; } }; const signedJwt = "SignedJwt"; @@ -28,7 +39,7 @@ const cryptoInterface: ICrypto = { base64Decode(input: string): string { switch (input) { case TEST_POP_VALUES.ENCODED_REQ_CNF: - TEST_POP_VALUES.DECODED_REQ_CNF; + return TEST_POP_VALUES.DECODED_REQ_CNF; case TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO: return TEST_DATA_CLIENT_INFO.TEST_DECODED_CLIENT_INFO; case TEST_POP_VALUES.SAMPLE_POP_AT_PAYLOAD_ENCODED: @@ -40,7 +51,7 @@ const cryptoInterface: ICrypto = { base64Encode(input: string): string { switch (input) { case TEST_POP_VALUES.DECODED_REQ_CNF: - TEST_POP_VALUES.ENCODED_REQ_CNF; + return TEST_POP_VALUES.ENCODED_REQ_CNF; case TEST_DATA_CLIENT_INFO.TEST_DECODED_CLIENT_INFO: return TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO; case TEST_POP_VALUES.SAMPLE_POP_AT_PAYLOAD_DECODED: @@ -65,6 +76,38 @@ const cryptoInterface: ICrypto = { const testCacheManager = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, cryptoInterface); +const testServerTokenResponse = { + headers: null, + status: 200, + body: { + token_type: TEST_CONFIG.TOKEN_TYPE_BEARER, + scope: TEST_CONFIG.DEFAULT_SCOPES.join(" "), + expires_in: TEST_TOKEN_LIFETIMES.DEFAULT_EXPIRES_IN, + ext_expires_in: TEST_TOKEN_LIFETIMES.DEFAULT_EXPIRES_IN, + access_token: TEST_TOKENS.ACCESS_TOKEN, + refresh_token: TEST_TOKENS.REFRESH_TOKEN, + id_token: TEST_TOKENS.IDTOKEN_V2, + client_info: TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO + } +}; +const testIdTokenClaims: TokenClaims = { + "ver": "2.0", + "iss": "https://login.microsoftonline.com/9188040d-6c67-4c5b-b112-36a304b66dad/v2.0", + "sub": "AAAAAAAAAAAAAAAAAAAAAIkzqFVrSaSaFHy782bbtaQ", + "name": "Abe Lincoln", + "preferred_username": "AbeLi@microsoft.com", + "oid": "00000000-0000-0000-66f3-3332eca7ea81", + "tid": "3338040d-6c67-4c5b-b112-36a304b66dad", + "nonce": "123523", +}; +const testAccount: AccountInfo = { + homeAccountId: TEST_DATA_CLIENT_INFO.TEST_HOME_ACCOUNT_ID, + localAccountId: TEST_DATA_CLIENT_INFO.TEST_UID, + environment: "login.windows.net", + tenantId: testIdTokenClaims.tid || "", + username: testIdTokenClaims.preferred_username || "" +} + const authorityOptions: AuthorityOptions = { protocolMode: ProtocolMode.AAD, knownAuthorities: ["login.microsoftonline.com"], @@ -103,7 +146,7 @@ describe("ResponseHandler.ts", () => { sinon.restore(); }); - describe("generateCacheRecord", async () => { + describe("generateCacheRecord", () => { it("throws invalid cache environment error", async () => { preferredCacheStub.returns(""); const testRequest: BaseAuthRequest = { @@ -116,12 +159,12 @@ describe("ResponseHandler.ts", () => { try { const timestamp = TimeUtils.nowSeconds(); const tokenResp = await responseHandler.handleServerTokenResponse(testResponse, testAuthority, timestamp, testRequest); - expect(tokenResp).to.be.undefined; + expect(tokenResp).toBeUndefined(); } catch(e) { if (e instanceof AuthError) { - expect(e).to.be.instanceOf(ClientAuthError); - expect(e.errorCode).to.be.eq(ClientAuthErrorMessage.invalidCacheEnvironment.code); - expect(e.errorMessage).to.be.eq(ClientAuthErrorMessage.invalidCacheEnvironment.desc); + expect(e).toBeInstanceOf(ClientAuthError); + expect(e.errorCode).toBe(ClientAuthErrorMessage.invalidCacheEnvironment.code); + expect(e.errorMessage).toBe(ClientAuthErrorMessage.invalidCacheEnvironment.desc); } else { throw e; } @@ -135,17 +178,31 @@ describe("ResponseHandler.ts", () => { scopes: ["openid", "profile", "User.Read", "email"] }; const testResponse: ServerAuthorizationTokenResponse = {...AUTHENTICATION_RESULT.body}; - testResponse.access_token = null; + testResponse.access_token = undefined; + + const testTokenResponse: AuthenticationResult = { + authority: TEST_CONFIG.validAuthority, + uniqueId: testIdTokenClaims.oid || "", + tenantId: testIdTokenClaims.tid || "", + scopes: TEST_CONFIG.DEFAULT_SCOPES, + idToken: testResponse.id_token || "", + idTokenClaims: testIdTokenClaims, + accessToken: "", + fromCache: false, + expiresOn: new Date(Date.now() + (testServerTokenResponse.body.expires_in * 1000)), + account: testAccount, + tokenType: AuthenticationScheme.BEARER + }; const responseHandler = new ResponseHandler("this-is-a-client-id", testCacheManager, cryptoInterface, new Logger(loggerOptions), null, null); - sinon.stub(ResponseHandler, "generateAuthenticationResult").callsFake((cryptoObj, authority, cacheRecord, request, idTokenObj, fromTokenCache, stateString) => { - expect(authority).to.be.eq(testAuthority); - expect(cacheRecord.idToken).to.not.be.null; - expect(cacheRecord.accessToken).to.be.null; - expect(cacheRecord.refreshToken).to.not.be.null; + sinon.stub(ResponseHandler, "generateAuthenticationResult").callsFake(async (cryptoObj, authority, cacheRecord, request, idTokenObj, fromTokenCache, stateString) => { + expect(authority).toBe(testAuthority); + expect(cacheRecord.idToken).not.toBeNull(); + expect(cacheRecord.accessToken).toBeNull(); + expect(cacheRecord.refreshToken).not.toBeNull(); done(); - return null; + return testTokenResponse; }); const timestamp = TimeUtils.nowSeconds(); responseHandler.handleServerTokenResponse(testResponse, testAuthority, timestamp, testRequest); @@ -158,17 +215,31 @@ describe("ResponseHandler.ts", () => { scopes: ["openid", "profile", "User.Read", "email"] }; const testResponse: ServerAuthorizationTokenResponse = {...AUTHENTICATION_RESULT.body}; - testResponse.refresh_token = null; + testResponse.refresh_token = undefined; + + const testTokenResponse: AuthenticationResult = { + authority: TEST_CONFIG.validAuthority, + uniqueId: testIdTokenClaims.oid || "", + tenantId: testIdTokenClaims.tid || "", + scopes: TEST_CONFIG.DEFAULT_SCOPES, + idToken: testResponse.id_token || "", + idTokenClaims: testIdTokenClaims, + accessToken: testResponse.access_token || "", + fromCache: false, + expiresOn: new Date(Date.now() + (testServerTokenResponse.body.expires_in * 1000)), + account: testAccount, + tokenType: AuthenticationScheme.BEARER + }; const responseHandler = new ResponseHandler("this-is-a-client-id", testCacheManager, cryptoInterface, new Logger(loggerOptions), null, null); - sinon.stub(ResponseHandler, "generateAuthenticationResult").callsFake((cryptoObj, authority, cacheRecord, idTokenObj, fromTokenCache, stateString, resourceReqMethod, resourceReqUri) => { - expect(authority).to.be.eq(testAuthority); - expect(cacheRecord.idToken).to.not.be.null; - expect(cacheRecord.accessToken).to.not.be.null; - expect(cacheRecord.refreshToken).to.be.null; + sinon.stub(ResponseHandler, "generateAuthenticationResult").callsFake(async (cryptoObj, authority, cacheRecord, request, idTokenObj, fromTokenCache, stateString) => { + expect(authority).toBe(testAuthority); + expect(cacheRecord.idToken).not.toBeNull(); + expect(cacheRecord.accessToken).not.toBeNull(); + expect(cacheRecord.refreshToken).toBeNull(); done(); - return null; + return testTokenResponse; }); const timestamp = TimeUtils.nowSeconds(); @@ -182,16 +253,30 @@ describe("ResponseHandler.ts", () => { scopes: ["openid", "profile", "User.Read", "email"] }; const testResponse: ServerAuthorizationTokenResponse = {...AUTHENTICATION_RESULT.body}; + const testTokenResponse: AuthenticationResult = { + authority: TEST_CONFIG.validAuthority, + uniqueId: testIdTokenClaims.oid || "", + tenantId: testIdTokenClaims.tid || "", + scopes: TEST_CONFIG.DEFAULT_SCOPES, + idToken: testResponse.id_token || "", + idTokenClaims: testIdTokenClaims, + accessToken: testResponse.access_token || "", + fromCache: false, + expiresOn: new Date(Date.now() + (testServerTokenResponse.body.expires_in * 1000)), + account: testAccount, + tokenType: AuthenticationScheme.BEARER + }; + const responseHandler = new ResponseHandler("this-is-a-client-id", testCacheManager, cryptoInterface, new Logger(loggerOptions), null, null); - sinon.stub(ResponseHandler, "generateAuthenticationResult").callsFake((cryptoObj, authority, cacheRecord, idTokenObj, fromTokenCache, stateString, resourceReqMethod, resourceReqUri) => { - expect(authority).to.be.eq(testAuthority); - expect(cacheRecord.idToken).to.not.be.null; - expect(cacheRecord.accessToken).to.not.be.null; - expect(cacheRecord.refreshToken).to.not.be.null; + sinon.stub(ResponseHandler, "generateAuthenticationResult").callsFake(async (cryptoObj, authority, cacheRecord, request, idTokenObj, fromTokenCache, stateString) => { + expect(authority).toBe(testAuthority); + expect(cacheRecord.idToken).not.toBeNull(); + expect(cacheRecord.accessToken).not.toBeNull(); + expect(cacheRecord.refreshToken).not.toBeNull(); done(); - return null; + return testTokenResponse; }); const timestamp = TimeUtils.nowSeconds(); @@ -199,7 +284,7 @@ describe("ResponseHandler.ts", () => { }); }); - describe("generateAuthenticationResult", async () => { + describe("generateAuthenticationResult", () => { it("sets default values if refresh_token not in cacheRecord", async () => { const testRequest: BaseAuthRequest = { authority: testAuthority.canonicalAuthority, @@ -213,7 +298,7 @@ describe("ResponseHandler.ts", () => { const timestamp = TimeUtils.nowSeconds(); const result = await responseHandler.handleServerTokenResponse(testResponse, testAuthority, timestamp, testRequest); - expect(result.familyId).to.be.eq(""); + expect(result.familyId).toBe(""); }); it("sets default values for access token using PoP scheme", async () => { @@ -225,7 +310,7 @@ describe("ResponseHandler.ts", () => { resourceRequestUri: TEST_URIS.TEST_RESOURCE_ENDPT_WITH_PARAMS }; const testResponse: ServerAuthorizationTokenResponse = { ...POP_AUTHENTICATION_RESULT.body }; - claimsStub.callsFake((encodedToken: string, crypto: ICrypto): TokenClaims => { + claimsStub.callsFake((encodedToken: string, crypto: ICrypto): TokenClaims|null => { switch (encodedToken) { case testResponse.id_token: return ID_TOKEN_CLAIMS as TokenClaims; @@ -244,8 +329,8 @@ describe("ResponseHandler.ts", () => { const timestamp = TimeUtils.nowSeconds(); const result = await responseHandler.handleServerTokenResponse(testResponse, testAuthority, timestamp, testRequest); - expect(result.tokenType).to.be.eq(AuthenticationScheme.POP); - expect(result.accessToken).to.be.eq(signedJwt); + expect(result.tokenType).toBe(AuthenticationScheme.POP); + expect(result.accessToken).toBe(signedJwt); }); }); @@ -267,8 +352,8 @@ describe("ResponseHandler.ts", () => { try { responseHandler.validateServerAuthorizationCodeResponse(testServerCodeResponse, "differentState", cryptoInterface); } catch (e) { - expect(e).to.be.instanceOf(ClientAuthError); - expect(stateMismatchSpy.calledOnce).to.be.true; + expect(e).toBeInstanceOf(ClientAuthError); + expect(stateMismatchSpy.calledOnce).toBe(true); done(); } }); @@ -283,7 +368,7 @@ describe("ResponseHandler.ts", () => { const responseHandler = new ResponseHandler("this-is-a-client-id", testCacheManager, cryptoInterface, new Logger(loggerOptions), null, null); responseHandler.validateServerAuthorizationCodeResponse(testServerCodeResponse, TEST_STATE_VALUES.URI_ENCODED_LIB_STATE, cryptoInterface); - expect(stateMismatchSpy.notCalled).to.be.true; + expect(stateMismatchSpy.notCalled).toBe(true); }); it("Does not throw state mismatch error when Uri encoded characters have different casing", () => { @@ -297,7 +382,7 @@ describe("ResponseHandler.ts", () => { const testAltState = "eyJpZCI6IjExNTUzYTliLTcxMTYtNDhiMS05ZDQ4LWY2ZDRhOGZmODM3MSIsInRzIjoxNTkyODQ2NDgyfQ%3d%3d"; const responseHandler = new ResponseHandler("this-is-a-client-id", testCacheManager, cryptoInterface, new Logger(loggerOptions), null, null); responseHandler.validateServerAuthorizationCodeResponse(testServerCodeResponse, testAltState, cryptoInterface); - expect(stateMismatchSpy.notCalled).to.be.true; + expect(stateMismatchSpy.notCalled).toBe(true); }); it("throws interactionRequiredError", (done) => { @@ -312,7 +397,7 @@ describe("ResponseHandler.ts", () => { try { responseHandler.validateServerAuthorizationCodeResponse(testServerCodeResponse, TEST_STATE_VALUES.URI_ENCODED_LIB_STATE, cryptoInterface); } catch (e) { - expect(e).to.be.instanceOf(InteractionRequiredAuthError); + expect(e).toBeInstanceOf(InteractionRequiredAuthError); done(); } }); @@ -329,7 +414,7 @@ describe("ResponseHandler.ts", () => { try { responseHandler.validateServerAuthorizationCodeResponse(testServerCodeResponse, TEST_STATE_VALUES.URI_ENCODED_LIB_STATE, cryptoInterface); } catch (e) { - expect(e).to.be.instanceOf(ServerError); + expect(e).toBeInstanceOf(ServerError); done(); } }); @@ -346,7 +431,7 @@ describe("ResponseHandler.ts", () => { try { responseHandler.validateServerAuthorizationCodeResponse(testServerCodeResponse, TEST_STATE_VALUES.URI_ENCODED_LIB_STATE, cryptoInterface); } catch (e) { - expect(e).to.be.instanceOf(ServerError); + expect(e).toBeInstanceOf(ServerError); done(); } @@ -364,7 +449,7 @@ describe("ResponseHandler.ts", () => { try { responseHandler.validateServerAuthorizationCodeResponse(testServerCodeResponse, TEST_STATE_VALUES.URI_ENCODED_LIB_STATE, cryptoInterface); } catch (e) { - expect(e).to.be.instanceOf(ServerError); + expect(e).toBeInstanceOf(ServerError); done(); } @@ -381,8 +466,8 @@ describe("ResponseHandler.ts", () => { const responseHandler = new ResponseHandler("this-is-a-client-id", testCacheManager, cryptoInterface, new Logger(loggerOptions), null, null); responseHandler.validateServerAuthorizationCodeResponse(testServerCodeResponse, TEST_STATE_VALUES.URI_ENCODED_LIB_STATE, cryptoInterface); - expect(buildClientInfoSpy.calledOnce).to.be.true; - expect(buildClientInfoSpy.calledWith(TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO)).to.be.true; + expect(buildClientInfoSpy.calledOnce).toBe(true); + expect(buildClientInfoSpy.calledWith(TEST_DATA_CLIENT_INFO.TEST_RAW_CLIENT_INFO)).toBe(true); }); it("does not call buildClientInfo if clientInfo not in response", () => { @@ -395,7 +480,7 @@ describe("ResponseHandler.ts", () => { const responseHandler = new ResponseHandler("this-is-a-client-id", testCacheManager, cryptoInterface, new Logger(loggerOptions), null, null); responseHandler.validateServerAuthorizationCodeResponse(testServerCodeResponse, TEST_STATE_VALUES.URI_ENCODED_LIB_STATE, cryptoInterface); - expect(buildClientInfoSpy.notCalled).to.be.true; + expect(buildClientInfoSpy.notCalled).toBe(true); }); }); }); diff --git a/lib/msal-common/test/telemetry/ServerTelemetryManager.spec.ts b/lib/msal-common/test/telemetry/ServerTelemetryManager.spec.ts index d3f313387f..5b801ea4f6 100644 --- a/lib/msal-common/test/telemetry/ServerTelemetryManager.spec.ts +++ b/lib/msal-common/test/telemetry/ServerTelemetryManager.spec.ts @@ -3,14 +3,12 @@ * Licensed under the MIT License. */ -import * as Mocha from "mocha"; -import { expect } from "chai"; import { ServerTelemetryManager, AuthError, ServerTelemetryRequest, ServerTelemetryEntity } from "../../src"; import { TEST_CONFIG } from "../test_kit/StringConstants"; import sinon from "sinon"; -import { MockStorageClass } from "../client/ClientTestUtils"; +import { MockStorageClass, mockCrypto } from "../client/ClientTestUtils"; -const testCacheManager = new MockStorageClass(); +const testCacheManager = new MockStorageClass(TEST_CONFIG.MSAL_CLIENT_ID, mockCrypto); const testApiCode = 9999999; const testError = "interaction_required"; const testCorrelationId = "this-is-a-test-correlationId"; @@ -40,7 +38,7 @@ describe("ServerTelemetryManager.ts", () => { }; const cacheValue = testCacheManager.getServerTelemetry(cacheKey) as ServerTelemetryEntity; - expect(cacheValue).to.deep.eq(failures); + expect(cacheValue).toEqual(failures); }); it("Adds error if a previous error already exists in cache", () => { @@ -55,7 +53,7 @@ describe("ServerTelemetryManager.ts", () => { }; const cacheValue = testCacheManager.getServerTelemetry(cacheKey) as ServerTelemetryEntity; - expect(cacheValue).to.deep.eq(failures); + expect(cacheValue).toEqual(failures); }); it("Adds suberror if present on the error object", () => { @@ -69,7 +67,7 @@ describe("ServerTelemetryManager.ts", () => { }; const cacheValue = testCacheManager.getServerTelemetry(cacheKey) as ServerTelemetryEntity; - expect(cacheValue).to.deep.eq(failures); + expect(cacheValue).toEqual(failures); }); it("Adds stringified error if not an AuthError", () => { @@ -87,7 +85,7 @@ describe("ServerTelemetryManager.ts", () => { }; const cacheValue = testCacheManager.getServerTelemetry(cacheKey) as ServerTelemetryEntity; - expect(cacheValue).to.deep.eq(failures); + expect(cacheValue).toEqual(failures); }); it("Adds unknown error if error is empty or cannot be identified", () => { @@ -105,7 +103,7 @@ describe("ServerTelemetryManager.ts", () => { }; const cacheValue = testCacheManager.getServerTelemetry(cacheKey) as ServerTelemetryEntity; - expect(cacheValue).to.deep.eq(failures); + expect(cacheValue).toEqual(failures); }); }); @@ -113,14 +111,14 @@ describe("ServerTelemetryManager.ts", () => { it("Adds telemetry headers with current request", () => { const telemetryManager = new ServerTelemetryManager(testTelemetryPayload, testCacheManager); const currHeaderVal = telemetryManager.generateCurrentRequestHeaderValue(); - expect(currHeaderVal).to.eq(`2|${testApiCode},0|,`); + expect(currHeaderVal).toBe(`2|${testApiCode},0|,`); }); it("Adds telemetry headers with current request with forceRefresh true", () => { const testPayload: ServerTelemetryRequest = {...testTelemetryPayload, forceRefresh: true }; const telemetryManager = new ServerTelemetryManager(testPayload, testCacheManager); const currHeaderVal = telemetryManager.generateCurrentRequestHeaderValue(); - expect(currHeaderVal).to.eq(`2|${testApiCode},1|,`); + expect(currHeaderVal).toBe(`2|${testApiCode},1|,`); }); it("Adds telemetry headers with last failed request", () => { @@ -134,7 +132,7 @@ describe("ServerTelemetryManager.ts", () => { const telemetryManager = new ServerTelemetryManager(testTelemetryPayload, testCacheManager); const lastHeaderVal = telemetryManager.generateLastRequestHeaderValue(); - expect(lastHeaderVal).to.eq(`2|${testCacheHits}|${testApiCode},${testCorrelationId}|${testError}|1,0`); + expect(lastHeaderVal).toBe(`2|${testCacheHits}|${testApiCode},${testCorrelationId}|${testError}|1,0`); }); it("Adds telemetry headers with multiple last failed requests", () => { @@ -148,7 +146,9 @@ describe("ServerTelemetryManager.ts", () => { const telemetryManager = new ServerTelemetryManager(testTelemetryPayload, testCacheManager); const lastHeaderVal = telemetryManager.generateLastRequestHeaderValue(); - expect(lastHeaderVal).to.eq(`2|${testCacheHits}|${testApiCode},${testCorrelationId},${testApiCode},${testCorrelationId}|${testError},${testError}|2,0`); + expect(lastHeaderVal).toBe( + `2|${testCacheHits}|${testApiCode},${testCorrelationId},${testApiCode},${testCorrelationId}|${testError},${testError}|2,0` + ); }); it("Adds partial telemetry data if max size is reached and sets overflow flag to 1", () => { @@ -163,7 +163,7 @@ describe("ServerTelemetryManager.ts", () => { const telemetryManager = new ServerTelemetryManager(testTelemetryPayload, testCacheManager); const lastHeaderVal = telemetryManager.generateLastRequestHeaderValue(); - expect(lastHeaderVal).to.eq(`2|${testCacheHits}|${testApiCode},${testCorrelationId}|${testError}|2,1`); + expect(lastHeaderVal).toBe(`2|${testCacheHits}|${testApiCode},${testCorrelationId}|${testError}|2,1`); }); }); @@ -177,10 +177,10 @@ describe("ServerTelemetryManager.ts", () => { }; testCacheManager.setServerTelemetry(cacheKey, failures); - expect(testCacheManager.getServerTelemetry(cacheKey)).to.deep.eq(failures); + expect(testCacheManager.getServerTelemetry(cacheKey)).toEqual(failures); const telemetryManager = new ServerTelemetryManager(testTelemetryPayload, testCacheManager); telemetryManager.clearTelemetryCache(); - expect(testCacheManager.getServerTelemetry(cacheKey)).to.be.undefined; + expect(testCacheManager.getServerTelemetry(cacheKey)).toBeUndefined(); }); it("Removes partial telemetry data from cache if partial data was sent to server", () => { @@ -198,34 +198,34 @@ describe("ServerTelemetryManager.ts", () => { cacheHits: 0 }; - expect(testCacheManager.getServerTelemetry(cacheKey)).to.deep.eq(failures); + expect(testCacheManager.getServerTelemetry(cacheKey)).toEqual(failures); const telemetryManager = new ServerTelemetryManager(testTelemetryPayload, testCacheManager); telemetryManager.clearTelemetryCache(); - expect(testCacheManager.getServerTelemetry(cacheKey)).to.deep.eq(expectedCacheEntry); + expect(testCacheManager.getServerTelemetry(cacheKey)).toEqual(expectedCacheEntry); }); }); describe("maxErrorsToSend tests", () => { it("maxErrorsToSend returns a number smaller than length of error array when size limit reached", () => { const failures = { - failedRequests: [], - errors: [], + failedRequests: [] as string[], + errors: [] as string[], cacheHits: 0 }; let dataSize = 0; while (dataSize < 4000) { - failures.failedRequests.push(testApiCode, testCorrelationId); - failures.errors.push(testError); + failures.failedRequests.push(`${testApiCode}`, testCorrelationId); + failures.errors.push(`${testError}`); dataSize += testApiCode.toString().length + testCorrelationId.toString().length + testError.length; } // Add a couple more to go over max size - failures.failedRequests.push(testApiCode, testCorrelationId); + failures.failedRequests.push(`${testApiCode}`, testCorrelationId); failures.errors.push(testError); - failures.failedRequests.push(testApiCode, testCorrelationId); + failures.failedRequests.push(`${testApiCode}`, testCorrelationId); failures.errors.push(testError); - expect(ServerTelemetryManager.maxErrorsToSend(failures)).to.be.lessThan(failures.errors.length); + expect(ServerTelemetryManager.maxErrorsToSend(failures)).toBeLessThan(failures.errors.length); }); it("maxErrorsToSend doesn't break on null and undefined values", () => { @@ -235,7 +235,8 @@ describe("ServerTelemetryManager.ts", () => { cacheHits: 0 }; - expect(ServerTelemetryManager.maxErrorsToSend(failures)).to.be.eq(2); + // @ts-ignore + expect(ServerTelemetryManager.maxErrorsToSend(failures)).toBe(2); }); }); @@ -247,6 +248,6 @@ describe("ServerTelemetryManager.ts", () => { telemetryManager.incrementCacheHits(); const cacheValue = testCacheManager.getServerTelemetry(cacheKey) as ServerTelemetryEntity; - expect(cacheValue.cacheHits).to.eq(2); + expect(cacheValue.cacheHits).toBe(2); }); }); diff --git a/lib/msal-common/test/test_kit/StringConstants.ts b/lib/msal-common/test/test_kit/StringConstants.ts index 1305dfb7b2..5582f99015 100644 --- a/lib/msal-common/test/test_kit/StringConstants.ts +++ b/lib/msal-common/test/test_kit/StringConstants.ts @@ -43,7 +43,7 @@ export const ID_TOKEN_CLAIMS = { sub: "AAAAAAAAAAAAAAAAAAAAAIkzqFVrSaSaFHy782bbtaQ", aud: "6cb04018-a3f5-46a7-b995-940c78f5aef3", exp: 1536361411, - iat: "1536274711", + iat: 1536274711, nbf: "1536274711", name: "Abe Lincoln", preferred_username: "AbeLi@microsoft.com", @@ -452,8 +452,8 @@ export const CACHE_MOCKS = { MOCK_CLIENT_ID_1: "mock_client_id_1", MOCK_ACCOUNT_INFO: { homeAccountId: "uid.utid", + localAccountId: "uid", environment: "login.microsoftonline.com", - localAccountId: "uid.utid", tenantId: "microsoft", username: "mocked_username" }, diff --git a/lib/msal-common/test/url/UrlString.spec.ts b/lib/msal-common/test/url/UrlString.spec.ts index de55ebb515..5dc6a8dca4 100644 --- a/lib/msal-common/test/url/UrlString.spec.ts +++ b/lib/msal-common/test/url/UrlString.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { TEST_URIS, TEST_HASHES } from "../test_kit/StringConstants"; import { UrlString } from "../../src/url/UrlString"; import { ClientConfigurationError, ClientConfigurationErrorMessage } from "../../src/error/ClientConfigurationError"; @@ -13,105 +12,111 @@ describe("UrlString.ts Class Unit Tests", () => { it("Creates a valid UrlString object", () => { let urlObj = new UrlString(TEST_URIS.TEST_REDIR_URI.toUpperCase()); - expect(urlObj.urlString).to.be.eq(TEST_URIS.TEST_REDIR_URI + "/"); + expect(urlObj.urlString).toBe(TEST_URIS.TEST_REDIR_URI + "/"); }); it("constructor throws error if uri is empty or null", () => { - expect(() => new UrlString(null)).to.throw(ClientConfigurationErrorMessage.urlEmptyError.desc); - expect(() => new UrlString(null)).to.throw(ClientConfigurationError); + // @ts-ignore + expect(() => new UrlString(null)).toThrowError(ClientConfigurationErrorMessage.urlEmptyError.desc); + // @ts-ignore + expect(() => new UrlString(null)).toThrowError(ClientConfigurationError); - expect(() => new UrlString("")).to.throw(ClientConfigurationErrorMessage.urlEmptyError.desc); - expect(() => new UrlString("")).to.throw(ClientConfigurationError); + expect(() => new UrlString("")).toThrowError(ClientConfigurationErrorMessage.urlEmptyError.desc); + expect(() => new UrlString("")).toThrowError(ClientConfigurationError); }); it("validateAsUri throws error if uri components could not be extracted", () => { const urlComponentError = "Error getting url components" sinon.stub(UrlString.prototype, "getUrlComponents").throws(urlComponentError); let urlObj = new UrlString(TEST_URIS.TEST_REDIR_URI); - expect(() => urlObj.validateAsUri()).to.throw(`${ClientConfigurationErrorMessage.urlParseError.desc} Given Error: ${urlComponentError}`); - expect(() => urlObj.validateAsUri()).to.throw(ClientConfigurationError); + expect(() => urlObj.validateAsUri()).toThrowError( + `${ClientConfigurationErrorMessage.urlParseError.desc} Given Error: ${urlComponentError}` + ); + expect(() => urlObj.validateAsUri()).toThrowError(ClientConfigurationError); }); it("validateAsUri throws error if uri is not secure", () => { const insecureUrlString = "http://login.microsoft.com/common"; let urlObj = new UrlString(insecureUrlString); - expect(() => urlObj.validateAsUri()).to.throw(`${ClientConfigurationErrorMessage.authorityUriInsecure.desc} Given URI: ${insecureUrlString}`); - expect(() => urlObj.validateAsUri()).to.throw(ClientConfigurationError); + expect(() => urlObj.validateAsUri()).toThrowError( + `${ClientConfigurationErrorMessage.authorityUriInsecure.desc} Given URI: ${insecureUrlString}` + ); + expect(() => urlObj.validateAsUri()).toThrowError(ClientConfigurationError); }); it("validateAsUri validates any valid URI", () => { const insecureUrlString = "https://example.com/"; let urlObj = new UrlString(insecureUrlString); - expect(() => urlObj.validateAsUri()).to.not.throw; + expect(() => urlObj.validateAsUri()).not.toThrow(); }); it("urlRemoveQueryStringParameter removes required path components",() => { let urlObj1 = new UrlString(TEST_URIS.TEST_AUTH_ENDPT_WITH_PARAMS1); - expect(urlObj1.urlString).to.contain("param1=value1"); + expect(urlObj1.urlString).toContain("param1=value1"); urlObj1.urlRemoveQueryStringParameter("param1"); - expect(urlObj1.urlString).to.not.contain("param1=value1"); + expect(urlObj1.urlString).not.toContain("param1=value1"); let urlObj2 = new UrlString(TEST_URIS.TEST_AUTH_ENDPT_WITH_PARAMS2); - expect(urlObj2.urlString).to.contain("param1=value1"); - expect(urlObj2.urlString).to.contain("param2=value2"); + expect(urlObj2.urlString).toContain("param1=value1"); + expect(urlObj2.urlString).toContain("param2=value2"); urlObj2.urlRemoveQueryStringParameter("param2"); - expect(urlObj2.urlString).to.contain("param1=value1"); - expect(urlObj2.urlString).to.not.contain("param2=value2"); + expect(urlObj2.urlString).toContain("param1=value1"); + expect(urlObj2.urlString).not.toContain("param2=value2"); urlObj2.urlRemoveQueryStringParameter("param1"); - expect(urlObj2.urlString).to.not.contain("param1=value1"); - expect(urlObj2.urlString).to.not.contain("param2=value2"); + expect(urlObj2.urlString).not.toContain("param1=value1"); + expect(urlObj2.urlString).not.toContain("param2=value2"); }); it("appendQueryString appends the provided query string", () => { const baseUrl = "https://localhost/"; const queryString = "param1=value1¶m2=value2"; - expect(UrlString.appendQueryString(baseUrl, queryString)).to.equal(`${baseUrl}?${queryString}`); - expect(UrlString.appendQueryString(`${baseUrl}?param3=value3`, queryString)).to.equal(`${baseUrl}?param3=value3&${queryString}`); - expect(UrlString.appendQueryString(baseUrl, "")).to.equal(baseUrl); + expect(UrlString.appendQueryString(baseUrl, queryString)).toEqual(`${baseUrl}?${queryString}`); + expect(UrlString.appendQueryString(`${baseUrl}?param3=value3`, queryString)).toEqual(`${baseUrl}?param3=value3&${queryString}`); + expect(UrlString.appendQueryString(baseUrl, "")).toEqual(baseUrl); }); it("removes hash from url provided", () => { const baseUrl = "https://localhost/"; const fullUrl = baseUrl + "#thisIsATestHash"; - expect(UrlString.removeHashFromUrl(fullUrl)).to.eq(baseUrl); + expect(UrlString.removeHashFromUrl(fullUrl)).toBe(baseUrl); }); it("removes empty query string from url provided", () => { const baseUrl = "https://localhost/"; const testUrl = baseUrl + "?"; const testUrl2 = baseUrl + "?/"; - expect(UrlString.removeHashFromUrl(testUrl)).to.eq(baseUrl); - expect(UrlString.removeHashFromUrl(testUrl2)).to.eq(baseUrl); + expect(UrlString.removeHashFromUrl(testUrl)).toBe(baseUrl); + expect(UrlString.removeHashFromUrl(testUrl2)).toBe(baseUrl); }); it("replaceTenantPath correctly replaces common with tenant id", () => { let urlObj = new UrlString(TEST_URIS.TEST_AUTH_ENDPT); const sampleTenantId = "sample-tenant-id"; - expect(urlObj.urlString).to.contain("common"); - expect(urlObj.urlString).to.not.contain(sampleTenantId); + expect(urlObj.urlString).toContain("common"); + expect(urlObj.urlString).not.toContain(sampleTenantId); const newUrlObj = urlObj.replaceTenantPath(sampleTenantId); - expect(newUrlObj.urlString).to.not.contain("common"); - expect(newUrlObj.urlString).to.contain(sampleTenantId); + expect(newUrlObj.urlString).not.toContain("common"); + expect(newUrlObj.urlString).toContain(sampleTenantId); }); it("replaceTenantPath correctly replaces organizations with tenant id", () => { let urlObj = new UrlString(TEST_URIS.TEST_AUTH_ENDPT_ORGS); const sampleTenantId = "sample-tenant-id"; - expect(urlObj.urlString).to.contain("organizations"); - expect(urlObj.urlString).to.not.contain(sampleTenantId); + expect(urlObj.urlString).toContain("organizations"); + expect(urlObj.urlString).not.toContain(sampleTenantId); const newUrlObj = urlObj.replaceTenantPath(sampleTenantId); - expect(newUrlObj.urlString).to.not.contain("organizations"); - expect(newUrlObj.urlString).to.contain(sampleTenantId); + expect(newUrlObj.urlString).not.toContain("organizations"); + expect(newUrlObj.urlString).toContain(sampleTenantId); }); it("replaceTenantPath returns the same url if path does not contain common or organizations", () => { let urlObj = new UrlString(TEST_URIS.TEST_AUTH_ENDPT_TENANT_ID); const sampleTenantId2 = "sample-tenant-id-2"; - expect(urlObj.urlString).to.contain("sample-tenantid"); - expect(urlObj.urlString).to.not.contain(sampleTenantId2); + expect(urlObj.urlString).toContain("sample-tenantid"); + expect(urlObj.urlString).not.toContain(sampleTenantId2); const newUrlObj = urlObj.replaceTenantPath(sampleTenantId2); - expect(newUrlObj.urlString).to.contain("sample-tenantid"); - expect(newUrlObj.urlString).to.not.contain(sampleTenantId2); + expect(newUrlObj.urlString).toContain("sample-tenantid"); + expect(newUrlObj.urlString).not.toContain(sampleTenantId2); }); it("getHash returns the anchor part of the URL correctly, or nothing if there is no anchor", () => { @@ -123,9 +128,9 @@ describe("UrlString.ts Class Unit Tests", () => { const urlObjWithHashAndSlash = new UrlString(urlWithHashAndSlash); const urlObjWithoutHash = new UrlString(urlWithoutHash); - expect(urlObjWithHash.getHash()).to.be.eq(TEST_HASHES.TEST_SUCCESS_ID_TOKEN_HASH.substring(1)); - expect(urlObjWithHashAndSlash.getHash()).to.be.eq(TEST_HASHES.TEST_SUCCESS_ID_TOKEN_HASH.substring(1)); - expect(urlObjWithoutHash.getHash()).to.be.empty; + expect(urlObjWithHash.getHash()).toBe(TEST_HASHES.TEST_SUCCESS_ID_TOKEN_HASH.substring(1)); + expect(urlObjWithHashAndSlash.getHash()).toBe(TEST_HASHES.TEST_SUCCESS_ID_TOKEN_HASH.substring(1)); + expect(urlObjWithoutHash.getHash()).toHaveLength(0); }); it("getDeserializedHash returns the hash as a deserialized object", () => { @@ -136,12 +141,12 @@ describe("UrlString.ts Class Unit Tests", () => { "param3": "value3", }; - expect(UrlString.getDeserializedHash(serializedHash)).to.be.deep.eq(deserializedHash); + expect(UrlString.getDeserializedHash(serializedHash)).toEqual(deserializedHash); }); it("getUrlComponents returns all path components", () => { const urlObj = new UrlString(TEST_URIS.TEST_AUTH_ENDPT_WITH_PARAMS2); - expect(urlObj.getUrlComponents()).to.be.deep.eq({ + expect(urlObj.getUrlComponents()).toEqual({ Protocol: "https:", HostNameAndPort: "login.microsoftonline.com", AbsolutePath: "/common/oauth2/v2.0/authorize", @@ -158,66 +163,66 @@ describe("UrlString.ts Class Unit Tests", () => { PathSegments: ["common", "oauth2", "v2.0", "authorize"] } as IUri; const urlObj = UrlString.constructAuthorityUriFromObject(urlComponents); - expect(urlObj.urlString).to.be.eq(TEST_URIS.TEST_AUTH_ENDPT + "/"); + expect(urlObj.urlString).toBe(TEST_URIS.TEST_AUTH_ENDPT + "/"); }); it("hashContainsKnownProperties returns true if correct hash is given", () => { - expect(UrlString.hashContainsKnownProperties(TEST_HASHES.TEST_SUCCESS_ID_TOKEN_HASH)).to.be.true; - expect(UrlString.hashContainsKnownProperties(TEST_HASHES.TEST_SUCCESS_ACCESS_TOKEN_HASH)).to.be.true; - expect(UrlString.hashContainsKnownProperties(TEST_HASHES.TEST_SUCCESS_CODE_HASH)).to.be.true; - expect(UrlString.hashContainsKnownProperties(TEST_HASHES.TEST_ERROR_HASH)).to.be.true; + expect(UrlString.hashContainsKnownProperties(TEST_HASHES.TEST_SUCCESS_ID_TOKEN_HASH)).toBe(true); + expect(UrlString.hashContainsKnownProperties(TEST_HASHES.TEST_SUCCESS_ACCESS_TOKEN_HASH)).toBe(true); + expect(UrlString.hashContainsKnownProperties(TEST_HASHES.TEST_SUCCESS_CODE_HASH)).toBe(true); + expect(UrlString.hashContainsKnownProperties(TEST_HASHES.TEST_ERROR_HASH)).toBe(true); }); it("hashContainsKnownProperties returns false if incorrect hash is given", () => { const exampleUnknownHash = "#param1=value1¶m2=value2¶m3=value3"; - expect(UrlString.hashContainsKnownProperties(exampleUnknownHash)).to.be.false; + expect(UrlString.hashContainsKnownProperties(exampleUnknownHash)).toBe(false); }); describe("getDomainFromUrl tests", () => { it("tests domain is returned when provided url includes protocol", () => { - expect(UrlString.getDomainFromUrl("https://domain.com")).to.eq("domain.com"); - expect(UrlString.getDomainFromUrl("https://domain.com/")).to.eq("domain.com"); - expect(UrlString.getDomainFromUrl("http://domain.com")).to.eq("domain.com"); + expect(UrlString.getDomainFromUrl("https://domain.com")).toBe("domain.com"); + expect(UrlString.getDomainFromUrl("https://domain.com/")).toBe("domain.com"); + expect(UrlString.getDomainFromUrl("http://domain.com")).toBe("domain.com"); }); it("tests domain is returned when only domain is provided", () => { - expect(UrlString.getDomainFromUrl("domain.com/")).to.eq("domain.com"); - expect(UrlString.getDomainFromUrl("domain.com")).to.eq("domain.com"); + expect(UrlString.getDomainFromUrl("domain.com/")).toBe("domain.com"); + expect(UrlString.getDomainFromUrl("domain.com")).toBe("domain.com"); }); it("tests domain is returned when provided url is not homepage", () => { - expect(UrlString.getDomainFromUrl("domain.com/page")).to.eq("domain.com"); - expect(UrlString.getDomainFromUrl("domain.com/index.html")).to.eq("domain.com"); + expect(UrlString.getDomainFromUrl("domain.com/page")).toBe("domain.com"); + expect(UrlString.getDomainFromUrl("domain.com/index.html")).toBe("domain.com"); }); it("tests domain is returned when provided url includes hash", () => { - expect(UrlString.getDomainFromUrl("domain.com#customHash")).to.eq("domain.com"); - expect(UrlString.getDomainFromUrl("domain.com/#customHash")).to.eq("domain.com"); + expect(UrlString.getDomainFromUrl("domain.com#customHash")).toBe("domain.com"); + expect(UrlString.getDomainFromUrl("domain.com/#customHash")).toBe("domain.com"); }); it("tests domain is returned when provided url includes query string", () => { - expect(UrlString.getDomainFromUrl("domain.com?queryString=1")).to.eq("domain.com"); - expect(UrlString.getDomainFromUrl("domain.com/?queryString=1")).to.eq("domain.com"); + expect(UrlString.getDomainFromUrl("domain.com?queryString=1")).toBe("domain.com"); + expect(UrlString.getDomainFromUrl("domain.com/?queryString=1")).toBe("domain.com"); }); }); describe("getAbsoluteUrl tests", () => { it("Returns url provided if it's already absolute", () => { const absoluteUrl = "https://localhost:30662" - expect(UrlString.getAbsoluteUrl(absoluteUrl, absoluteUrl + "/testPath")).to.eq(absoluteUrl); + expect(UrlString.getAbsoluteUrl(absoluteUrl, absoluteUrl + "/testPath")).toBe(absoluteUrl); }); it("Returns absolute url if relativeUrl provided", () => { const basePath = "https://localhost:30662" const absoluteUrl = "https://localhost:30662/testPath"; - expect(UrlString.getAbsoluteUrl("/testPath", basePath)).to.eq(absoluteUrl); - expect(UrlString.getAbsoluteUrl("/testPath", basePath + "/")).to.eq(absoluteUrl); + expect(UrlString.getAbsoluteUrl("/testPath", basePath)).toBe(absoluteUrl); + expect(UrlString.getAbsoluteUrl("/testPath", basePath + "/")).toBe(absoluteUrl); }); it("Replaces path if relativeUrl provided and baseUrl contains different path", () => { const basePath = "https://localhost:30662/differentPath" const expectedUrl = "https://localhost:30662/testPath"; - expect(UrlString.getAbsoluteUrl("/testPath", basePath)).to.eq(expectedUrl); + expect(UrlString.getAbsoluteUrl("/testPath", basePath)).toBe(expectedUrl); }); }); @@ -227,7 +232,7 @@ describe("UrlString.ts Class Unit Tests", () => { const canonicalUrl = UrlString.canonicalizeUri(url); - expect(canonicalUrl).to.equal(url); + expect(canonicalUrl).toEqual(url); }); it ("handles ?", () => { @@ -235,7 +240,7 @@ describe("UrlString.ts Class Unit Tests", () => { const canonicalUrl = UrlString.canonicalizeUri(url); - expect(canonicalUrl).to.equal("https://contoso.com/"); + expect(canonicalUrl).toEqual("https://contoso.com/"); }); it ("handles ?/", () => { @@ -243,7 +248,7 @@ describe("UrlString.ts Class Unit Tests", () => { const canonicalUrl = UrlString.canonicalizeUri(url); - expect(canonicalUrl).to.equal("https://contoso.com/"); + expect(canonicalUrl).toEqual("https://contoso.com/"); }); it("maintains original casing of original url", () => { @@ -251,8 +256,8 @@ describe("UrlString.ts Class Unit Tests", () => { const canonicalUrl = UrlString.canonicalizeUri(url); - expect(url).to.equal("https://contoso.com/PATH"); - expect(canonicalUrl).to.equal("https://contoso.com/path/"); + expect(url).toEqual("https://contoso.com/PATH"); + expect(canonicalUrl).toEqual("https://contoso.com/path/"); }) }); }); diff --git a/lib/msal-common/test/utils/ProtocolUtils.spec.ts b/lib/msal-common/test/utils/ProtocolUtils.spec.ts index d6d2736521..5c89b11562 100644 --- a/lib/msal-common/test/utils/ProtocolUtils.spec.ts +++ b/lib/msal-common/test/utils/ProtocolUtils.spec.ts @@ -1,4 +1,3 @@ -import { expect } from "chai"; import { ProtocolUtils } from "../../src/utils/ProtocolUtils"; import { RANDOM_TEST_GUID, TEST_CONFIG, TEST_POP_VALUES } from "../test_kit/StringConstants"; import { ICrypto, PkceCodes } from "../../src/crypto/ICrypto"; @@ -22,7 +21,7 @@ describe("ProtocolUtils.ts Class Unit Tests", () => { base64Decode(input: string): string { switch (input) { case TEST_POP_VALUES.ENCODED_REQ_CNF: - TEST_POP_VALUES.DECODED_REQ_CNF; + return TEST_POP_VALUES.DECODED_REQ_CNF; case encodedLibState: return decodedLibState; default: @@ -32,7 +31,7 @@ describe("ProtocolUtils.ts Class Unit Tests", () => { base64Encode(input: string): string { switch (input) { case TEST_POP_VALUES.DECODED_REQ_CNF: - TEST_POP_VALUES.ENCODED_REQ_CNF; + return TEST_POP_VALUES.ENCODED_REQ_CNF; case `${decodedLibState}`: return encodedLibState; default: @@ -60,34 +59,38 @@ describe("ProtocolUtils.ts Class Unit Tests", () => { it("setRequestState() appends library state to given state", () => { const requestState = ProtocolUtils.setRequestState(cryptoInterface, userState); - expect(requestState).to.be.eq(testState); + expect(requestState).toBe(testState); }); it("setRequestState() only creates library state", () => { const requestState = ProtocolUtils.setRequestState(cryptoInterface, ""); - expect(requestState).to.be.eq(encodedLibState); + expect(requestState).toBe(encodedLibState); }); it("setRequestState throws error if no crypto object is passed to it", () => { - expect(() => ProtocolUtils.setRequestState(null, userState)).to.throw(ClientAuthError); - expect(() => ProtocolUtils.setRequestState(null, userState)).to.throw(ClientAuthErrorMessage.noCryptoObj.desc); + // @ts-ignore + expect(() => ProtocolUtils.setRequestState(null, userState)).toThrowError(ClientAuthError); + // @ts-ignore + expect(() => ProtocolUtils.setRequestState(null, userState)).toThrowError(ClientAuthErrorMessage.noCryptoObj.desc); }); it("parseRequestState() throws error if given state is null or empty", () => { - expect(() => ProtocolUtils.parseRequestState(cryptoInterface, "")).to.throw(ClientAuthError); - expect(() => ProtocolUtils.parseRequestState(cryptoInterface, "")).to.throw(ClientAuthErrorMessage.invalidStateError.desc); + expect(() => ProtocolUtils.parseRequestState(cryptoInterface, "")).toThrowError(ClientAuthError); + expect(() => ProtocolUtils.parseRequestState(cryptoInterface, "")).toThrowError(ClientAuthErrorMessage.invalidStateError.desc); - expect(() => ProtocolUtils.parseRequestState(cryptoInterface, null)).to.throw(ClientAuthError); - expect(() => ProtocolUtils.parseRequestState(cryptoInterface, null)).to.throw(ClientAuthErrorMessage.invalidStateError.desc); + // @ts-ignore + expect(() => ProtocolUtils.parseRequestState(cryptoInterface, null)).toThrowError(ClientAuthError); + // @ts-ignore + expect(() => ProtocolUtils.parseRequestState(cryptoInterface, null)).toThrowError(ClientAuthErrorMessage.invalidStateError.desc); }); it("parseRequestState() returns empty userRequestState if no resource delimiter found in state string", () => { const requestState = ProtocolUtils.parseRequestState(cryptoInterface, decodedLibState); - expect(requestState.userRequestState).to.be.empty; + expect(requestState.userRequestState).toHaveLength(0); }); it("parseRequestState() correctly splits the state by the resource delimiter", () => { const requestState = ProtocolUtils.parseRequestState(cryptoInterface, testState); - expect(requestState.userRequestState).to.be.eq(userState); + expect(requestState.userRequestState).toBe(userState); }); }); diff --git a/lib/msal-common/test/utils/StringUtils.spec.ts b/lib/msal-common/test/utils/StringUtils.spec.ts index 5c6e58a4c3..0f103a408d 100644 --- a/lib/msal-common/test/utils/StringUtils.spec.ts +++ b/lib/msal-common/test/utils/StringUtils.spec.ts @@ -1,9 +1,7 @@ -import { expect } from "chai"; import { StringUtils } from "../../src/utils/StringUtils"; import { TEST_TOKENS } from "../test_kit/StringConstants"; import { ClientAuthError, ClientAuthErrorMessage } from "../../src/error/ClientAuthError"; import { AuthError } from "../../src/error/AuthError"; -import { IdToken } from "../../src"; describe("StringUtils.ts Class Unit Tests", () => { @@ -11,119 +9,113 @@ describe("StringUtils.ts Class Unit Tests", () => { const sampleJwt = `${TEST_TOKENS.SAMPLE_JWT_HEADER}.${TEST_TOKENS.SAMPLE_JWT_PAYLOAD}.${TEST_TOKENS.SAMPLE_JWT_SIG}`; const decodedJwt = StringUtils.decodeAuthToken(sampleJwt); - expect(decodedJwt).to.be.deep.eq({ + expect(decodedJwt).toEqual({ header: TEST_TOKENS.SAMPLE_JWT_HEADER, JWSPayload: TEST_TOKENS.SAMPLE_JWT_PAYLOAD, JWSSig: TEST_TOKENS.SAMPLE_JWT_SIG }); }); - it("decodeJwt throws error when given a null token string", () => { - let err: ClientAuthError; - + it("decodeJwt throws error when given a null token string", (done) => { try { - let decodedJwt = StringUtils.decodeAuthToken(null); - } catch (e) { - err = e; - } - - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.nullOrEmptyToken.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.nullOrEmptyToken.desc); - expect(err.message).to.include(ClientAuthErrorMessage.nullOrEmptyToken.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("StringUtils.spec.ts"); - }); - - it("decodeJwt throws error when given a empty token string", () => { - let err: ClientAuthError; - + // @ts-ignore + StringUtils.decodeAuthToken(null); + } catch (err) { + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.nullOrEmptyToken.code); + expect(err.errorMessage).toContain(ClientAuthErrorMessage.nullOrEmptyToken.desc); + expect(err.message).toContain(ClientAuthErrorMessage.nullOrEmptyToken.desc); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack).toContain("StringUtils.spec.ts"); + done(); + } + }); + + it("decodeJwt throws error when given a empty token string", (done) => { try { - let decodedJwt = StringUtils.decodeAuthToken(""); - } catch (e) { - err = e; + StringUtils.decodeAuthToken(""); + } catch (err) { + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.nullOrEmptyToken.code); + expect(err.errorMessage).toContain(ClientAuthErrorMessage.nullOrEmptyToken.desc); + expect(err.message).toContain(ClientAuthErrorMessage.nullOrEmptyToken.desc); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack).toContain("StringUtils.spec.ts"); + done(); } - - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.nullOrEmptyToken.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.nullOrEmptyToken.desc); - expect(err.message).to.include(ClientAuthErrorMessage.nullOrEmptyToken.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("StringUtils.spec.ts"); }); - it("decodeJwt throws error when given a malformed token string", () => { - let err: ClientAuthError; - + it("decodeJwt throws error when given a malformed token string", (done) => { try { - let decodedJwt = StringUtils.decodeAuthToken(TEST_TOKENS.SAMPLE_MALFORMED_JWT); - } catch (e) { - err = e; + StringUtils.decodeAuthToken(TEST_TOKENS.SAMPLE_MALFORMED_JWT); + } catch (err) { + expect(err instanceof ClientAuthError).toBe(true); + expect(err instanceof AuthError).toBe(true); + expect(err instanceof Error).toBe(true); + expect(err.errorCode).toBe(ClientAuthErrorMessage.tokenParsingError.code); + expect(err.errorMessage).toContain(ClientAuthErrorMessage.tokenParsingError.desc); + expect(err.message).toContain(ClientAuthErrorMessage.tokenParsingError.desc); + expect(err.name).toBe("ClientAuthError"); + expect(err.stack).toContain("StringUtils.spec.ts"); + done(); } - - expect(err instanceof ClientAuthError).to.be.true; - expect(err instanceof AuthError).to.be.true; - expect(err instanceof Error).to.be.true; - expect(err.errorCode).to.equal(ClientAuthErrorMessage.tokenParsingError.code); - expect(err.errorMessage).to.include(ClientAuthErrorMessage.tokenParsingError.desc); - expect(err.message).to.include(ClientAuthErrorMessage.tokenParsingError.desc); - expect(err.name).to.equal("ClientAuthError"); - expect(err.stack).to.include("StringUtils.spec.ts"); }); it("isEmpty correctly identifies empty strings", () => { - expect(StringUtils.isEmpty(undefined)).to.be.true; - expect(StringUtils.isEmpty(null)).to.be.true; - expect(StringUtils.isEmpty("")).to.be.true; - expect(StringUtils.isEmpty("Non-empty string")).to.be.false; + expect(StringUtils.isEmpty(undefined)).toBe(true); + // @ts-ignore + expect(StringUtils.isEmpty(null)).toBe(true); + expect(StringUtils.isEmpty("")).toBe(true); + expect(StringUtils.isEmpty("Non-empty string")).toBe(false); }); it("isEmptyObject correctly identifies empty stringified objects", () => { - expect(StringUtils.isEmptyObj(undefined)).to.be.true; - expect(StringUtils.isEmptyObj(null)).to.be.true; - expect(StringUtils.isEmptyObj("")).to.be.true; - expect(StringUtils.isEmptyObj("{}")).to.be.true; - expect(StringUtils.isEmptyObj("{ }")).to.be.true; - expect(StringUtils.isEmptyObj("{ }")).to.be.true; - expect(StringUtils.isEmptyObj("Non-object string")).to.be.true; + expect(StringUtils.isEmptyObj(undefined)).toBe(true); + // @ts-ignore + expect(StringUtils.isEmptyObj(null)).toBe(true); + expect(StringUtils.isEmptyObj("")).toBe(true); + expect(StringUtils.isEmptyObj("{}")).toBe(true); + expect(StringUtils.isEmptyObj("{ }")).toBe(true); + expect(StringUtils.isEmptyObj("{ }")).toBe(true); + expect(StringUtils.isEmptyObj("Non-object string")).toBe(true); const exampleObj = { "valid": true }; - expect(StringUtils.isEmptyObj(JSON.stringify(exampleObj))).to.be.false; + expect(StringUtils.isEmptyObj(JSON.stringify(exampleObj))).toBe(false); }); it("startsWith returns true if given string starts with given substring", () => { const testString = "This is a test string"; const searchString = "This"; - expect(StringUtils.startsWith(testString, searchString)).to.be.true; + expect(StringUtils.startsWith(testString, searchString)).toBe(true); }); it("startsWith returns false if given string does not start with given substring", () => { const testString = "This is a test string"; const searchString = "test"; - expect(StringUtils.startsWith(testString, searchString)).to.be.false; + expect(StringUtils.startsWith(testString, searchString)).toBe(false); }); it("endsWith returns true if given string ends with given substring", () => { const testString = "This is a test string"; const searchString = "string"; - expect(StringUtils.endsWith(testString, searchString)).to.be.true; + expect(StringUtils.endsWith(testString, searchString)).toBe(true); }); it("endsWith returns false if given string does not end with given substring", () => { const testString = "This is a test string"; const searchString = "test"; - expect(StringUtils.endsWith(testString, searchString)).to.be.false; + expect(StringUtils.endsWith(testString, searchString)).toBe(false); }); it("endsWith returns false if given string is shorter than substring to search for", () => { const testString = "test"; const searchString = "tests"; - expect(StringUtils.endsWith(testString, searchString)).to.be.false; + expect(StringUtils.endsWith(testString, searchString)).toBe(false); }); @@ -134,12 +126,12 @@ describe("StringUtils.ts Class Unit Tests", () => { "param2": "value2", "param3": "value3", }; - expect(StringUtils.queryStringToObject(serializedObj)).to.be.deep.eq(deserializedObj); + expect(StringUtils.queryStringToObject(serializedObj)).toEqual(deserializedObj); }); it("trimArrayEntries() correctly trims entries in an array", () => { const arr = ["S1", " S2 ", " S3 "]; - expect(StringUtils.trimArrayEntries(arr)).to.be.deep.eq(["S1", "S2", "S3"]); + expect(StringUtils.trimArrayEntries(arr)).toEqual(["S1", "S2", "S3"]); }); it("removeEmptyStringsFromArray() removes empty strings from an array", () => { @@ -151,14 +143,15 @@ describe("StringUtils.ts Class Unit Tests", () => { const test = { test: "json" }; const jsonString = JSON.stringify(test); const parsedVal = StringUtils.jsonParseHelper(jsonString); - expect(parsedVal).to.be.deep.eq(test); + expect(parsedVal).toEqual(test); }); it("returns null on error", () => { + // @ts-ignore const parsedValNull = StringUtils.jsonParseHelper(null); const parsedValEmptyString = StringUtils.jsonParseHelper(""); - expect(parsedValNull).to.be.null; - expect(parsedValEmptyString).to.be.null; + expect(parsedValNull).toBeNull(); + expect(parsedValEmptyString).toBeNull(); }) }); @@ -166,19 +159,19 @@ describe("StringUtils.ts Class Unit Tests", () => { it("no wildcard", () => { const matches = StringUtils.matchPattern("https://myapplication.com/user/1", "https://myapplication.com/user/1"); - expect(matches).to.be.true; + expect(matches).toBe(true); }); it("single wildcard", () => { const matches = StringUtils.matchPattern("https://myapplication.com/user/*", "https://myapplication.com/user/1"); - expect(matches).to.be.true; + expect(matches).toBe(true); }); it("multiple wildcards", () => { const matches = StringUtils.matchPattern("https://*.myapplication.com/user/*", "https://test.myapplication.com/user/1"); - expect(matches).to.be.true; + expect(matches).toBe(true); }); }); }); diff --git a/lib/msal-common/test/utils/TimeUtils.spec.ts b/lib/msal-common/test/utils/TimeUtils.spec.ts index 9cf39194ca..87396edd6b 100644 --- a/lib/msal-common/test/utils/TimeUtils.spec.ts +++ b/lib/msal-common/test/utils/TimeUtils.spec.ts @@ -1,11 +1,10 @@ -import { expect } from "chai"; import { TimeUtils } from "../../src/utils/TimeUtils"; describe("TimeUtils.ts Class Unit Tests", () => { it("nowSeconds() gets the current Unix time in seconds", () => { const currSeconds = TimeUtils.nowSeconds(); - expect(typeof currSeconds).to.be.eq("number"); - expect(currSeconds).to.be.at.most(TimeUtils.nowSeconds()); + expect(typeof currSeconds).toBe("number"); + expect(currSeconds).toBeLessThanOrEqual(TimeUtils.nowSeconds()); }); }); diff --git a/lib/msal-common/tsconfig.json b/lib/msal-common/tsconfig.json index 516bbd8c81..03284103a3 100644 --- a/lib/msal-common/tsconfig.json +++ b/lib/msal-common/tsconfig.json @@ -31,7 +31,7 @@ ], "types": [ "node", - "mocha" + "jest" ] } diff --git a/lib/msal-node/src/client/ClientApplication.ts b/lib/msal-node/src/client/ClientApplication.ts index c3d42567e9..f6aa5fd53b 100644 --- a/lib/msal-node/src/client/ClientApplication.ts +++ b/lib/msal-node/src/client/ClientApplication.ts @@ -247,6 +247,7 @@ export abstract class ClientApplication { clientCapabilities: this.config.auth.clientCapabilities }, loggerOptions: { + logLevel: this.config.system!.loggerOptions!.logLevel, loggerCallback: this.config.system!.loggerOptions! .loggerCallback, piiLoggingEnabled: this.config.system!.loggerOptions!