diff --git a/webclient/.eslintrc.js b/webclient/.eslintrc.js index b69dfefc..98ce4443 100644 --- a/webclient/.eslintrc.js +++ b/webclient/.eslintrc.js @@ -6,6 +6,9 @@ module.exports = { "@typescript-eslint" ], "ignorePatterns": ["node_modules/*", "build/*", "public/pb/*"], + "env": { + "jest": true + }, "rules": { "array-bracket-spacing": ["error", "never"], "arrow-spacing": ["error", {"before": true, "after": true}], diff --git a/webclient/package-lock.json b/webclient/package-lock.json index 00879808..87f4c185 100644 --- a/webclient/package-lock.json +++ b/webclient/package-lock.json @@ -13,9 +13,9 @@ } }, "@babel/compat-data": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.0.tgz", - "integrity": "sha512-DGjt2QZse5SGd9nfOSqO4WLJ8NN/oHkijbXbPrxuoJO3oIPJL3TciZs9FX+cOHNiY9E9l0opL8g7BmLe3T+9ew==" + "version": "7.16.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.16.4.tgz", + "integrity": "sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q==" }, "@babel/core": { "version": "7.12.3", @@ -115,9 +115,9 @@ } }, "@babel/helper-define-polyfill-provider": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.4.tgz", - "integrity": "sha512-OrpPZ97s+aPi6h2n1OXzdhVis1SGSsMU2aMHgLcOKfsp4/v1NWpx3CWT3lBj5eeBq9cDkPkh+YCfdF7O12uNDQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz", + "integrity": "sha512-7hfT8lUljl/tM3h+izTX/pO3W3frz2ok6Pk+gzys8iJqDfZrZy2pXjRTZAvG2YmfHun1X4q8/UZRLatMfqc5Tg==", "requires": { "@babel/helper-compilation-targets": "^7.13.0", "@babel/helper-module-imports": "^7.12.13", @@ -215,9 +215,9 @@ "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==" }, "@babel/helper-remap-async-to-generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.0.tgz", - "integrity": "sha512-MLM1IOMe9aQBqMWxcRw8dcb9jlM86NIw7KA0Wri91Xkfied+dE0QuBFSBjMNvqzmS0OSIDsMNC24dBEkPUi7ew==", + "version": "7.16.4", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.4.tgz", + "integrity": "sha512-vGERmmhR+s7eH5Y/cp8PCVzj4XEjerq8jooMfxFdA5xVtAk9Sh4AQsrWgiErUEBjtGrBtOFKDUcWQFW4/dFwMA==", "requires": { "@babel/helper-annotate-as-pure": "^7.16.0", "@babel/helper-wrap-function": "^7.16.0", @@ -301,9 +301,9 @@ } }, "@babel/parser": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.3.tgz", - "integrity": "sha512-dcNwU1O4sx57ClvLBVFbEgx0UZWfd0JQX5X6fxFRCLHelFBGXFfSz6Y0FAq2PEwUqlqLkdVjVr4VASEOuUnLJw==" + "version": "7.16.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", + "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.16.2", @@ -324,12 +324,12 @@ } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.0.tgz", - "integrity": "sha512-nyYmIo7ZqKsY6P4lnVmBlxp9B3a96CscbLotlsNuktMHahkDwoPYEjXrZHU0Tj844Z9f1IthVxQln57mhkcExw==", + "version": "7.16.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.4.tgz", + "integrity": "sha512-/CUekqaAaZCQHleSK/9HajvcD/zdnJiKRiuUFq8ITE+0HsPzquf53cpFiqAwl/UfmJbR6n5uGPQSPdrmKOvHHg==", "requires": { "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.16.0", + "@babel/helper-remap-async-to-generator": "^7.16.4", "@babel/plugin-syntax-async-generators": "^7.8.4" } }, @@ -1015,17 +1015,17 @@ } }, "@babel/preset-env": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.0.tgz", - "integrity": "sha512-cdTu/W0IrviamtnZiTfixPfIncr2M1VqRrkjzZWlr1B4TVYimCFK5jkyOdP4qw2MrlKHi+b3ORj6x8GoCew8Dg==", + "version": "7.16.4", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.4.tgz", + "integrity": "sha512-v0QtNd81v/xKj4gNKeuAerQ/azeNn/G1B1qMLeXOcV8+4TWlD2j3NV1u8q29SDFBXx/NBq5kyEAO+0mpRgacjA==", "requires": { - "@babel/compat-data": "^7.16.0", - "@babel/helper-compilation-targets": "^7.16.0", + "@babel/compat-data": "^7.16.4", + "@babel/helper-compilation-targets": "^7.16.3", "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.0", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.2", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.0", - "@babel/plugin-proposal-async-generator-functions": "^7.16.0", + "@babel/plugin-proposal-async-generator-functions": "^7.16.4", "@babel/plugin-proposal-class-properties": "^7.16.0", "@babel/plugin-proposal-class-static-block": "^7.16.0", "@babel/plugin-proposal-dynamic-import": "^7.16.0", @@ -1075,7 +1075,7 @@ "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.0", "@babel/plugin-transform-new-target": "^7.16.0", "@babel/plugin-transform-object-super": "^7.16.0", - "@babel/plugin-transform-parameters": "^7.16.0", + "@babel/plugin-transform-parameters": "^7.16.3", "@babel/plugin-transform-property-literals": "^7.16.0", "@babel/plugin-transform-regenerator": "^7.16.0", "@babel/plugin-transform-reserved-words": "^7.16.0", @@ -1088,10 +1088,10 @@ "@babel/plugin-transform-unicode-regex": "^7.16.0", "@babel/preset-modules": "^0.1.5", "@babel/types": "^7.16.0", - "babel-plugin-polyfill-corejs2": "^0.2.3", - "babel-plugin-polyfill-corejs3": "^0.3.0", - "babel-plugin-polyfill-regenerator": "^0.2.3", - "core-js-compat": "^3.19.0", + "babel-plugin-polyfill-corejs2": "^0.3.0", + "babel-plugin-polyfill-corejs3": "^0.4.0", + "babel-plugin-polyfill-regenerator": "^0.3.0", + "core-js-compat": "^3.19.1", "semver": "^6.3.0" }, "dependencies": { @@ -1344,6 +1344,11 @@ "slash": "^3.0.0" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1424,6 +1429,11 @@ "strip-ansi": "^6.0.0" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -1493,6 +1503,13 @@ "@jest/types": "^26.6.2", "@types/node": "*", "jest-mock": "^26.6.2" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "@jest/fake-timers": { @@ -1506,6 +1523,13 @@ "jest-message-util": "^26.6.2", "jest-mock": "^26.6.2", "jest-util": "^26.6.2" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "@jest/globals": { @@ -1755,6 +1779,11 @@ "chalk": "^4.0.0" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2223,9 +2252,9 @@ } }, "@types/eslint": { - "version": "7.28.2", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.2.tgz", - "integrity": "sha512-KubbADPkfoU75KgKeKLsFHXnU4ipH7wYg0TRT33NK3N3yiu7jlFAAoygIWBV+KbuHx/G+AvuGX6DllnK35gfJA==", + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz", + "integrity": "sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==", "requires": { "@types/estree": "*", "@types/json-schema": "*" @@ -2243,6 +2272,13 @@ "requires": { "@types/minimatch": "*", "@types/node": "*" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "@types/graceful-fs": { @@ -2251,6 +2287,13 @@ "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", "requires": { "@types/node": "*" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "@types/history": { @@ -2266,6 +2309,23 @@ "requires": { "@types/react": "*", "hoist-non-react-statics": "^3.3.0" + }, + "dependencies": { + "@types/react": { + "version": "17.0.37", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz", + "integrity": "sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg==", + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" + } } }, "@types/html-minifier-terser": { @@ -2422,9 +2482,9 @@ } }, "@types/jquery": { - "version": "3.5.8", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.8.tgz", - "integrity": "sha512-cXk6NwqjDYg+UI9p2l3x0YmPa4m7RrXqmbK4IpVVpRJiYXU/QTo+UZrn54qfE1+9Gao4qpYqUnxm5ZCy2FTXAw==", + "version": "3.5.9", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.9.tgz", + "integrity": "sha512-B8pDk+sH/tSv/HKdx6EQER6BfUOb2GtKs0LOmozziS4h7cbe8u/eYySfUAeTwD+J09SqV3man7AMWIA5mgzCBA==", "dev": true, "requires": { "@types/sizzle": "*" @@ -2441,9 +2501,9 @@ "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=" }, "@types/lodash": { - "version": "4.14.176", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.176.tgz", - "integrity": "sha512-xZmuPTa3rlZoIbtDUyJKZQimJV3bxCmzMIO2c9Pz9afyDro6kr7R79GwcB6mRhuoPmV2p1Vb66WOJH7F886WKQ==", + "version": "4.14.177", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.177.tgz", + "integrity": "sha512-0fDwydE2clKe9MNfvXHBHF9WEahRuj+msTuQqOmAApNORFvhMYZKNGGJdCzuhheVjMps/ti0Ak/iJPACMaevvw==", "dev": true }, "@types/long": { @@ -2469,7 +2529,8 @@ "@types/node": { "version": "16.11.7", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.7.tgz", - "integrity": "sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==" + "integrity": "sha512-QB5D2sqfSjCmTuWcBWyJ+/44bcjO7VbjSbOE0ucoVbAsSNQc4Lt6QkgkVXkTDwkL4z/beecZNDvVX15D4P8Jbw==", + "dev": true }, "@types/normalize-package-data": { "version": "2.4.1", @@ -2509,6 +2570,7 @@ "version": "17.0.34", "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.34.tgz", "integrity": "sha512-46FEGrMjc2+8XhHXILr+3+/sTe3OfzSPU9YGKILLrUYbQ1CLQC9Daqo1KzENGXAWwrFwiY0l4ZbF20gRvgpWTg==", + "dev": true, "requires": { "@types/prop-types": "*", "@types/scheduler": "*", @@ -2516,9 +2578,10 @@ }, "dependencies": { "csstype": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.9.tgz", - "integrity": "sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==" + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==", + "dev": true } } }, @@ -2549,6 +2612,23 @@ "@types/react": "*", "hoist-non-react-statics": "^3.3.0", "redux": "^4.0.0" + }, + "dependencies": { + "@types/react": { + "version": "17.0.37", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz", + "integrity": "sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg==", + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" + } } }, "@types/react-router": { @@ -2578,6 +2658,23 @@ "integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==", "requires": { "@types/react": "*" + }, + "dependencies": { + "@types/react": { + "version": "17.0.37", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.37.tgz", + "integrity": "sha512-2FS1oTqBGcH/s0E+CjrCCR9+JMpsu9b69RTFO+40ua43ZqP5MmQ4iUde/dMjWR909KxZwmOQIFq6AV6NjEG5xg==", + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "csstype": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" + } } }, "@types/react-virtualized-auto-sizer": { @@ -2614,6 +2711,13 @@ "integrity": "sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==", "requires": { "@types/node": "*" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "@types/scheduler": { @@ -2658,9 +2762,9 @@ } }, "@types/webpack": { - "version": "4.41.31", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.31.tgz", - "integrity": "sha512-/i0J7sepXFIp1ZT7FjUGi1eXMCg8HCCzLJEQkKsOtbJFontsJLolBcDC+3qxn5pPwiCt1G0ZdRmYRzNBtvpuGQ==", + "version": "4.41.32", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.32.tgz", + "integrity": "sha512-cb+0ioil/7oz5//7tZUSwbrSAN/NWHrQylz5cW8G0dWTcF/g+/dSdMlKVZspBYuMAN1+WnwHrkxiRrLcwd0Heg==", "requires": { "@types/node": "*", "@types/tapable": "^1", @@ -2670,6 +2774,11 @@ "source-map": "^0.6.0" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -2687,6 +2796,11 @@ "source-map": "^0.7.3" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "source-map": { "version": "0.7.3", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", @@ -2708,13 +2822,13 @@ "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==" }, "@typescript-eslint/eslint-plugin": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.3.1.tgz", - "integrity": "sha512-cFImaoIr5Ojj358xI/SDhjog57OK2NqlpxwdcgyxDA3bJlZcJq5CPzUXtpD7CxI2Hm6ATU7w5fQnnkVnmwpHqw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.4.0.tgz", + "integrity": "sha512-9/yPSBlwzsetCsGEn9j24D8vGQgJkOTr4oMLas/w886ZtzKIs1iyoqFrwsX2fqYEeUwsdBpC21gcjRGo57u0eg==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "5.3.1", - "@typescript-eslint/scope-manager": "5.3.1", + "@typescript-eslint/experimental-utils": "5.4.0", + "@typescript-eslint/scope-manager": "5.4.0", "debug": "^4.3.2", "functional-red-black-tree": "^1.0.1", "ignore": "^5.1.8", @@ -2724,43 +2838,43 @@ }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.3.1.tgz", - "integrity": "sha512-RgFn5asjZ5daUhbK5Sp0peq0SSMytqcrkNfU4pnDma2D8P3ElZ6JbYjY8IMSFfZAJ0f3x3tnO3vXHweYg0g59w==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.4.0.tgz", + "integrity": "sha512-Nz2JDIQUdmIGd6p33A+naQmwfkU5KVTLb/5lTk+tLVTDacZKoGQisj8UCxk7onJcrgjIvr8xWqkYI+DbI3TfXg==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.3.1", - "@typescript-eslint/types": "5.3.1", - "@typescript-eslint/typescript-estree": "5.3.1", + "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/typescript-estree": "5.4.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/scope-manager": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.3.1.tgz", - "integrity": "sha512-XksFVBgAq0Y9H40BDbuPOTUIp7dn4u8oOuhcgGq7EoDP50eqcafkMVGrypyVGvDYHzjhdUCUwuwVUK4JhkMAMg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", + "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.3.1", - "@typescript-eslint/visitor-keys": "5.3.1" + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/visitor-keys": "5.4.0" } }, "@typescript-eslint/types": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.3.1.tgz", - "integrity": "sha512-bG7HeBLolxKHtdHG54Uac750eXuQQPpdJfCYuw4ZI3bZ7+GgKClMWM8jExBtp7NSP4m8PmLRM8+lhzkYnSmSxQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", + "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.3.1.tgz", - "integrity": "sha512-PwFbh/PKDVo/Wct6N3w+E4rLZxUDgsoII/GrWM2A62ETOzJd4M6s0Mu7w4CWsZraTbaC5UQI+dLeyOIFF1PquQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", + "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.3.1", - "@typescript-eslint/visitor-keys": "5.3.1", + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/visitor-keys": "5.4.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -2769,12 +2883,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.3.1.tgz", - "integrity": "sha512-3cHUzUuVTuNHx0Gjjt5pEHa87+lzyqOiHXy/Gz+SJOCW1mpw9xQHIIEwnKn+Thph1mgWyZ90nboOcSuZr/jTTQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", + "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.3.1", + "@typescript-eslint/types": "5.4.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -2809,41 +2923,41 @@ } }, "@typescript-eslint/parser": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.3.1.tgz", - "integrity": "sha512-TD+ONlx5c+Qhk21x9gsJAMRohWAUMavSOmJgv3JGy9dgPhuBd5Wok0lmMClZDyJNLLZK1JRKiATzCKZNUmoyfw==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.4.0.tgz", + "integrity": "sha512-JoB41EmxiYpaEsRwpZEYAJ9XQURPFer8hpkIW9GiaspVLX8oqbqNM8P4EP8HOZg96yaALiLEVWllA2E8vwsIKw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.3.1", - "@typescript-eslint/types": "5.3.1", - "@typescript-eslint/typescript-estree": "5.3.1", + "@typescript-eslint/scope-manager": "5.4.0", + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/typescript-estree": "5.4.0", "debug": "^4.3.2" }, "dependencies": { "@typescript-eslint/scope-manager": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.3.1.tgz", - "integrity": "sha512-XksFVBgAq0Y9H40BDbuPOTUIp7dn4u8oOuhcgGq7EoDP50eqcafkMVGrypyVGvDYHzjhdUCUwuwVUK4JhkMAMg==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.4.0.tgz", + "integrity": "sha512-pRxFjYwoi8R+n+sibjgF9iUiAELU9ihPBtHzocyW8v8D8G8KeQvXTsW7+CBYIyTYsmhtNk50QPGLE3vrvhM5KA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.3.1", - "@typescript-eslint/visitor-keys": "5.3.1" + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/visitor-keys": "5.4.0" } }, "@typescript-eslint/types": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.3.1.tgz", - "integrity": "sha512-bG7HeBLolxKHtdHG54Uac750eXuQQPpdJfCYuw4ZI3bZ7+GgKClMWM8jExBtp7NSP4m8PmLRM8+lhzkYnSmSxQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.4.0.tgz", + "integrity": "sha512-GjXNpmn+n1LvnttarX+sPD6+S7giO+9LxDIGlRl4wK3a7qMWALOHYuVSZpPTfEIklYjaWuMtfKdeByx0AcaThA==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.3.1.tgz", - "integrity": "sha512-PwFbh/PKDVo/Wct6N3w+E4rLZxUDgsoII/GrWM2A62ETOzJd4M6s0Mu7w4CWsZraTbaC5UQI+dLeyOIFF1PquQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.4.0.tgz", + "integrity": "sha512-nhlNoBdhKuwiLMx6GrybPT3SFILm5Gij2YBdPEPFlYNFAXUJWX6QRgvi/lwVoadaQEFsizohs6aFRMqsXI2ewA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.3.1", - "@typescript-eslint/visitor-keys": "5.3.1", + "@typescript-eslint/types": "5.4.0", + "@typescript-eslint/visitor-keys": "5.4.0", "debug": "^4.3.2", "globby": "^11.0.4", "is-glob": "^4.0.3", @@ -2852,12 +2966,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.3.1.tgz", - "integrity": "sha512-3cHUzUuVTuNHx0Gjjt5pEHa87+lzyqOiHXy/Gz+SJOCW1mpw9xQHIIEwnKn+Thph1mgWyZ90nboOcSuZr/jTTQ==", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.4.0.tgz", + "integrity": "sha512-PVbax7MeE7tdLfW5SA0fs8NGVVr+buMPrcj+CWYWPXsZCH8qZ1THufDzbXm1xrZ2b2PA1iENJ0sRq5fuUtvsJg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.3.1", + "@typescript-eslint/types": "5.4.0", "eslint-visitor-keys": "^3.0.0" } }, @@ -3640,12 +3754,12 @@ "integrity": "sha512-squySRkf+6JGnvjoUtDEjSREJEBirnXi9NqP6rjSYsylxQxqBTz+pkmf395i9E2zsvmYUaI40BHo6SqZUdydlw==" }, "babel-plugin-polyfill-corejs2": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.3.tgz", - "integrity": "sha512-NDZ0auNRzmAfE1oDDPW2JhzIMXUk+FFe2ICejmt5T4ocKgiQx3e0VCRx9NCAidcMtL2RUZaWtXnmjTCkx0tcbA==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.0.tgz", + "integrity": "sha512-wMDoBJ6uG4u4PNFh72Ty6t3EgfA91puCuAwKIazbQlci+ENb/UU9A3xG5lutjUIiXCIn1CY5L15r9LimiJyrSA==", "requires": { "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.2.4", + "@babel/helper-define-polyfill-provider": "^0.3.0", "semver": "^6.1.1" }, "dependencies": { @@ -3657,20 +3771,20 @@ } }, "babel-plugin-polyfill-corejs3": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.3.0.tgz", - "integrity": "sha512-JLwi9vloVdXLjzACL80j24bG6/T1gYxwowG44dg6HN/7aTPdyPbJJidf6ajoA3RPHHtW0j9KMrSOLpIZpAnPpg==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.4.0.tgz", + "integrity": "sha512-YxFreYwUfglYKdLUGvIF2nJEsGwj+RhWSX/ije3D2vQPOXuyMLMtg/cCGMDpOA7Nd+MwlNdnGODbd2EwUZPlsw==", "requires": { - "@babel/helper-define-polyfill-provider": "^0.2.4", + "@babel/helper-define-polyfill-provider": "^0.3.0", "core-js-compat": "^3.18.0" } }, "babel-plugin-polyfill-regenerator": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.3.tgz", - "integrity": "sha512-JVE78oRZPKFIeUqFGrSORNzQnrDwZR16oiWeGM8ZyjBn2XAT5OjP+wXx5ESuo33nUsFUEJYjtklnsKbxW5L+7g==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz", + "integrity": "sha512-dhAPTDLGoMW5/84wkgwiLRwMnio2i1fUe53EuvtKMv0pn2p3S8OCoV1xAzfJPl0KOX7IB89s2ib85vbYiea3jg==", "requires": { - "@babel/helper-define-polyfill-provider": "^0.2.4" + "@babel/helper-define-polyfill-provider": "^0.3.0" } }, "babel-plugin-syntax-object-rest-spread": { @@ -4188,12 +4302,12 @@ } }, "browserslist": { - "version": "4.17.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.6.tgz", - "integrity": "sha512-uPgz3vyRTlEiCv4ee9KlsKgo2V6qPk7Jsn0KAn2OBqbqKo3iNcPEC1Ti6J4dwnz+aIRfEEEuOzC9IBk8tXUomw==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.18.1.tgz", + "integrity": "sha512-8ScCzdpPwR2wQh8IT82CA2VgDwjHyqMovPBZSNH54+tm4Jk2pCuv90gmAdH6J84OCRWi0b4gMe6O6XPXuJnjgQ==", "requires": { - "caniuse-lite": "^1.0.30001274", - "electron-to-chromium": "^1.3.886", + "caniuse-lite": "^1.0.30001280", + "electron-to-chromium": "^1.3.896", "escalade": "^3.1.1", "node-releases": "^2.0.1", "picocolors": "^1.0.0" @@ -4356,9 +4470,9 @@ } }, "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz", + "integrity": "sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA==" }, "caniuse-api": { "version": "3.0.0", @@ -4372,9 +4486,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001280", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001280.tgz", - "integrity": "sha512-kFXwYvHe5rix25uwueBxC569o53J6TpnGu0BEEn+6Lhl2vsnAumRFWEBhDft1fwyo6m1r4i+RqA4+163FpeFcA==" + "version": "1.0.30001283", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001283.tgz", + "integrity": "sha512-9RoKo841j1GQFSJz/nCXOj0sD7tHBtlowjYlrqIUS812x9/emfBLBt6IyMz1zIaYc/eRL8Cs6HPUVi2Hzq4sIg==" }, "capture-exit": { "version": "2.0.0", @@ -4584,9 +4698,9 @@ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" }, "common-tags": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.1.tgz", - "integrity": "sha512-uOZd85rJqrdEIE/JjhW5YAeatX8iqjjvVzIyfx7JL7G5r9Tep6YpYT9gEJWhWpVyDQEyzukWd6p2qULpJ8tmBw==" + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==" }, "commondir": { "version": "1.0.1", @@ -5227,9 +5341,9 @@ } }, "csstype": { - "version": "2.6.18", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.18.tgz", - "integrity": "sha512-RSU6Hyeg14am3Ah4VZEmeX8H7kLwEEirXe6aU2IPfKNvhXwTflK5HQRDNI0ypQXoqmm+QPyG2IaPuQE5zMwSIQ==" + "version": "2.6.19", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.19.tgz", + "integrity": "sha512-ZVxXaNy28/k3kJg0Fou5MiYpp88j7H9hLZp8PDC3jV0WFjfH5E9xHb56L0W59cPbKbcHXeP4qyT8PrHp8t6LcQ==" }, "cyclist": { "version": "1.0.1", @@ -5480,9 +5594,9 @@ } }, "dexie": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dexie/-/dexie-3.0.3.tgz", - "integrity": "sha512-BSFhGpngnCl1DOr+8YNwBDobRMH0ziJs2vts69VilwetHYOtEDcLqo7d/XiIphM0tJZ2rPPyAGd31lgH2Ln3nw==" + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/dexie/-/dexie-3.2.0.tgz", + "integrity": "sha512-OpS8ss1CLHYAhxRu6hT+/Gt1uLhKCf0O18xHBdRGlemOWXXRiiOZ0ty1/bACIJzGt1DGmvarzrPwYYt9EkRZfw==" }, "diff-sequences": { "version": "26.6.2", @@ -5562,9 +5676,9 @@ }, "dependencies": { "csstype": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.9.tgz", - "integrity": "sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==" + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" } } }, @@ -5694,9 +5808,9 @@ "integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==" }, "electron-to-chromium": { - "version": "1.3.896", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.896.tgz", - "integrity": "sha512-NcGkBVXePiuUrPLV8IxP43n1EOtdg+dudVjrfVEUd/bOqpQUFZ2diL5PPYzbgEhZFEltdXV3AcyKwGnEQ5lhMA==" + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.3.tgz", + "integrity": "sha512-hfpppjYhqIZB8jrNb0rNceQRkSnBN7QJl3W26O1jUv3F3BkQknqy1YTqVXkFnIcFtBc3Qnv5M7r5Lez2iOLgZA==" }, "elliptic": { "version": "6.5.4", @@ -6323,9 +6437,9 @@ } }, "eslint-plugin-react": { - "version": "7.27.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.27.0.tgz", - "integrity": "sha512-0Ut+CkzpppgFtoIhdzi2LpdpxxBvgFf99eFqWxJnUrO7mMe0eOiNpou6rvNYeVVV6lWZvTah0BFne7k5xHjARg==", + "version": "7.27.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.27.1.tgz", + "integrity": "sha512-meyunDjMMYeWr/4EBLTV1op3iSG3mjT/pz5gti38UzfM4OPpNc2m0t2xvKCOMU5D6FSdd34BIMFOvQbW+i8GAA==", "requires": { "array-includes": "^3.1.4", "array.prototype.flatmap": "^1.2.5", @@ -6475,6 +6589,11 @@ "schema-utils": "^3.1.1" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -8702,6 +8821,11 @@ "throat": "^5.0.0" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -8965,6 +9089,13 @@ "jest-mock": "^26.6.2", "jest-util": "^26.6.2", "jsdom": "^16.4.0" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "jest-environment-node": { @@ -8978,6 +9109,13 @@ "@types/node": "*", "jest-mock": "^26.6.2", "jest-util": "^26.6.2" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "jest-get-type": { @@ -9004,6 +9142,13 @@ "micromatch": "^4.0.2", "sane": "^4.0.3", "walker": "^1.0.7" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "jest-jasmine2": { @@ -9031,6 +9176,11 @@ "throat": "^5.0.0" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -9209,6 +9359,13 @@ "requires": { "@jest/types": "^26.6.2", "@types/node": "*" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "jest-pnp-resolver": { @@ -9318,6 +9475,11 @@ "throat": "^5.0.0" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -9484,6 +9646,13 @@ "requires": { "@types/node": "*", "graceful-fs": "^4.2.4" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "jest-snapshot": { @@ -9582,6 +9751,11 @@ "micromatch": "^4.0.2" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -9758,6 +9932,11 @@ "string-length": "^4.0.1" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -9813,6 +9992,11 @@ "supports-color": "^7.0.0" }, "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -9882,9 +10066,9 @@ }, "dependencies": { "acorn": { - "version": "8.5.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", - "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==" + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.6.0.tgz", + "integrity": "sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw==" } } }, @@ -9947,9 +10131,9 @@ }, "dependencies": { "csstype": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.9.tgz", - "integrity": "sha512-rpw6JPxK6Rfg1zLOYCSwle2GFOOsnjmDYDaBwEcwoOg4qlsIVCN789VkBZDJAGi4T07gI4YSutR43t9Zz4Lzuw==" + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz", + "integrity": "sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA==" } } }, @@ -10086,9 +10270,9 @@ } }, "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=" + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==" }, "loader-runner": { "version": "2.4.0", @@ -10166,9 +10350,9 @@ "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" }, "loglevel": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.7.1.tgz", - "integrity": "sha512-Hesni4s5UkWkwCGJMQGAh71PaLUmKFM60dHvq0zi/vDhhrzuk+4GgNbTXJ12YYQJn6ZKBDNIjYcuQGKudvqrIw==" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.0.tgz", + "integrity": "sha512-G6A/nJLRgWOuuwdNuA6koovfEV1YpqqAG4pRUlFaz3jj2QNZ8M4vBqnVA+HBTmU/AMNUtlOsMmSpF6NyOjztbA==" }, "long": { "version": "4.0.0", @@ -12267,13 +12451,13 @@ }, "dependencies": { "postcss": { - "version": "8.3.11", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.11.tgz", - "integrity": "sha512-hCmlUAIlUiav8Xdqw3Io4LcpA1DOt7h3LSTAC4G6JGHFFaWzI6qvFt9oilvl8BmkbBRX1IhM90ZAmpk68zccQA==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.1.tgz", + "integrity": "sha512-WqLs/TTzXdG+/A4ZOOK9WDZiikrRaiA+eoEb/jz2DT9KUhMNHgP7yKPO8vwi62ZCsb703Gwb7BMZwDzI54Y2Ag==", "requires": { "nanoid": "^3.1.30", "picocolors": "^1.0.0", - "source-map-js": "^0.6.2" + "source-map-js": "^1.0.1" } } } @@ -12477,6 +12661,13 @@ "@types/long": "^4.0.1", "@types/node": ">=13.7.0", "long": "^4.0.0" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "proxy-addr": { @@ -13086,9 +13277,9 @@ } }, "redux-form": { - "version": "8.3.7", - "resolved": "https://registry.npmjs.org/redux-form/-/redux-form-8.3.7.tgz", - "integrity": "sha512-CUv6z5Gpog3shB3Ptsd+x6dmeQ1AzIlx1Tniri3j7Gf+oBBtLrD7dHMLOcTbJKsaEwG49SB/z1Pik3Hy04mNcQ==", + "version": "8.3.8", + "resolved": "https://registry.npmjs.org/redux-form/-/redux-form-8.3.8.tgz", + "integrity": "sha512-PzXhA0d+awIc4PkuhbDa6dCEiraMrGMyyDlYEVNX6qEyW/G2SqZXrjav5zrpXb0CCeqQSc9iqwbMtYQXbJbOAQ==", "requires": { "@babel/runtime": "^7.9.2", "es6-error": "^4.1.1", @@ -13504,6 +13695,13 @@ "@types/estree": "*", "@types/node": "*", "acorn": "^7.1.0" + }, + "dependencies": { + "@types/node": { + "version": "16.11.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.11.10.tgz", + "integrity": "sha512-3aRnHa1KlOEEhJ6+CvyHKK5vE9BcLGjtUpwvqYLRvYNQKMfabu3BwfJaA/SLW8dxe28LsNDjtHwePTuzn3gmOA==" + } } }, "rollup-plugin-babel": { @@ -14029,9 +14227,9 @@ } }, "signal-exit": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.5.tgz", - "integrity": "sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ==" + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz", + "integrity": "sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ==" }, "simple-swizzle": { "version": "0.2.2", @@ -14260,9 +14458,9 @@ "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-js": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", - "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.1.tgz", + "integrity": "sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA==" }, "source-map-resolve": { "version": "0.5.3", @@ -14277,9 +14475,9 @@ } }, "source-map-support": { - "version": "0.5.20", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", - "integrity": "sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw==", + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" @@ -14326,9 +14524,9 @@ } }, "spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.11.tgz", + "integrity": "sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==" }, "spdy": { "version": "4.0.2", @@ -14702,9 +14900,9 @@ }, "dependencies": { "ajv": { - "version": "8.8.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.0.tgz", - "integrity": "sha512-L+cJ/+pkdICMueKR6wIx3VP2fjIx3yAhuvadUv/osv9yFD7OVZy442xFF+Oeu3ZvmhBGQzoF6mTSt+LUWBmGQg==", + "version": "8.8.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.8.2.tgz", + "integrity": "sha512-x9VuX+R/jcFj1DHo/fCp99esgGDWiHENrKxaCENuCxpoMCmAt/COCGVDwA7kleEpEzJjDnvh3yGoOuLu0Dtllw==", "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -14873,9 +15071,9 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "terser": { - "version": "5.9.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.9.0.tgz", - "integrity": "sha512-h5hxa23sCdpzcye/7b8YqbE5OwKca/ni0RQz1uRX3tGh8haaGHqcuSqbGRybuAKNdntZ0mDgFNXPJ48xQ2RXKQ==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.10.0.tgz", + "integrity": "sha512-AMmF99DMfEDiRJfxfY5jj5wNH/bYO09cniSqhfoyxc8sFoYIgkJy86G04UoZU5VjlpnplVu0K6Tx6E9b5+DlHA==", "requires": { "commander": "^2.20.0", "source-map": "~0.7.2", @@ -15041,9 +15239,9 @@ "integrity": "sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==" }, "tsconfig-paths": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz", - "integrity": "sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz", + "integrity": "sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg==", "requires": { "@types/json5": "^0.0.29", "json5": "^1.0.1", @@ -15125,9 +15323,9 @@ } }, "typescript": { - "version": "4.4.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.4.tgz", - "integrity": "sha512-DqGhF5IKoBl8WNf8C1gu8q0xZSInh9j1kJJMqT3a94w1JzVaBU4EXOSMrz9yDqMT0xt3selp83fuFMQ0uzv6qA==" + "version": "4.5.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.2.tgz", + "integrity": "sha512-5BlMof9H1yGt0P8/WF+wPNw6GfctgGjXp5hkblpyT+8rkASSmkUKMXrxR0Xg8ThVCi/JnHQiKXeBaEwCeQwMFw==" }, "unbox-primitive": { "version": "1.0.1", @@ -16829,9 +17027,9 @@ } }, "ws": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", - "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==" + "version": "7.5.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz", + "integrity": "sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA==" }, "xml-name-validator": { "version": "3.0.0", diff --git a/webclient/package.json b/webclient/package.json index 167a9077..4cb10da7 100644 --- a/webclient/package.json +++ b/webclient/package.json @@ -33,10 +33,12 @@ "postinstall:default": "./copy_shared_files.sh", "start": "cross-env ESLINT_NO_DEV_ERRORS=true react-scripts start", "build": "react-scripts build", - "test": "react-scripts test", + "test": "cross-env CI=true react-scripts test", + "test:watch": "react-scripts test", "eject": "react-scripts eject", "lint": "eslint \"./**/*.{ts,tsx}\"", - "lint:fix": "eslint \"./**/*.{ts,tsx}\" --fix" + "lint:fix": "eslint \"./**/*.{ts,tsx}\" --fix", + "golden": "npm run lint && npm run test" }, "eslintConfig": { "extends": "react-app" diff --git a/webclient/src/websocket/commands/RoomCommands.spec.ts b/webclient/src/websocket/commands/RoomCommands.spec.ts index 803698e5..84051eea 100644 --- a/webclient/src/websocket/commands/RoomCommands.spec.ts +++ b/webclient/src/websocket/commands/RoomCommands.spec.ts @@ -8,11 +8,15 @@ describe('RoomCommands', () => { let sendRoomCommandSpy; beforeEach(() => { - sendRoomCommandSpy = spyOn(webClient.protobuf, 'sendRoomCommand'); + sendRoomCommandSpy = jest.spyOn(webClient.protobuf, 'sendRoomCommand').mockImplementation(() => {}); webClient.protobuf.controller.RoomCommand = { create: args => args }; }); + afterEach(() => { + jest.restoreAllMocks(); + }); + describe('roomSay', () => { beforeEach(() => { webClient.protobuf.controller.Command_RoomSay = { create: args => args }; @@ -50,18 +54,18 @@ describe('RoomCommands', () => { expect(webClient.protobuf.sendRoomCommand).toHaveBeenCalledWith( roomId, { '.Command_LeaveRoom.ext': {} }, - jasmine.any(Function) + expect.any(Function) ); }); it('should call RoomPersistence.leaveRoom if RespOk', () => { const RespOk = 'ok'; webClient.protobuf.controller.Response = { ResponseCode: { RespOk } }; - sendRoomCommandSpy.and.callFake((_, __, callback) => { + sendRoomCommandSpy.mockImplementation((_, __, callback) => { callback({ responseCode: RespOk }) }); - spyOn(RoomPersistence, 'leaveRoom'); + jest.spyOn(RoomPersistence, 'leaveRoom').mockImplementation(() => {}); RoomCommands.leaveRoom(roomId); diff --git a/webclient/src/websocket/commands/SessionCommands.spec.ts b/webclient/src/websocket/commands/SessionCommands.spec.ts index 9e4dba99..71d4a39c 100644 --- a/webclient/src/websocket/commands/SessionCommands.spec.ts +++ b/webclient/src/websocket/commands/SessionCommands.spec.ts @@ -1,34 +1,37 @@ -import { StatusEnum } from 'types'; +import { StatusEnum, WebSocketConnectReason } from 'types'; import { SessionCommands } from './SessionCommands'; import { RoomPersistence, SessionPersistence } from '../persistence'; import webClient from '../WebClient'; -import { WebSocketConnectReason } from '../services/WebSocketService'; import { AccountActivationParams, ServerRegisterParams } from '../../store'; describe('SessionCommands', () => { const roomId = 1; let sendModeratorCommandSpy; let sendSessionCommandSpy; + let MockSessionCommands; beforeEach(() => { - spyOn(SessionCommands, 'updateStatus').and.callThrough(); - spyOn(webClient, 'updateStatus'); - spyOn(console, 'error'); + jest.spyOn(SessionCommands, 'updateStatus'); + jest.spyOn(webClient, 'updateStatus').mockImplementation(() => {}); + jest.spyOn(console, 'error').mockImplementation(() => {}); - sendModeratorCommandSpy = spyOn(webClient.protobuf, 'sendModeratorCommand'); - sendSessionCommandSpy = spyOn(webClient.protobuf, 'sendSessionCommand'); + sendModeratorCommandSpy = jest.spyOn(webClient.protobuf, 'sendModeratorCommand').mockImplementation(() => {}); + sendSessionCommandSpy = jest.spyOn(webClient.protobuf, 'sendSessionCommand').mockImplementation(() => {}); webClient.protobuf.controller.ModeratorCommand = { create: args => args }; webClient.protobuf.controller.SessionCommand = { create: args => args }; }); + afterEach(() => { + jest.restoreAllMocks(); + }); describe('connect', () => { let options; beforeEach(() => { - spyOn(webClient, 'connect'); + jest.spyOn(webClient, 'connect').mockImplementation(() => {}); options = { host: 'host', port: 'port', @@ -69,13 +72,10 @@ describe('SessionCommands', () => { describe('disconnect', () => { it('should call SessionCommands.updateStatus and webClient.disconnect', () => { - spyOn(webClient, 'disconnect'); + jest.spyOn(webClient, 'disconnect'); SessionCommands.disconnect(); - expect(SessionCommands.updateStatus).toHaveBeenCalled(); - expect(SessionCommands.updateStatus).toHaveBeenCalledWith(StatusEnum.DISCONNECTING, 'Disconnecting...'); - expect(webClient.disconnect).toHaveBeenCalled(); }); }); @@ -83,8 +83,8 @@ describe('SessionCommands', () => { describe('login', () => { beforeEach(() => { webClient.protobuf.controller.Command_Login = { create: args => args }; - webClient.options.user = 'user'; - webClient.options.pass = 'pass'; + webClient.options.userName = 'user'; + webClient.options.password = 'pass'; }); it('should call protobuf controller methods and sendCommand', () => { @@ -94,11 +94,11 @@ describe('SessionCommands', () => { expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalledWith({ '.Command_Login.ext': { ...webClient.clientConfig, - userName: webClient.options.user, - password: webClient.options.pass, - clientid: jasmine.any(String) + userName: webClient.options.userName, + password: webClient.options.password, + clientid: expect.any(String) } - }, jasmine.any(Function)); + }, expect.any(Function)); }); describe('response', () => { @@ -118,15 +118,15 @@ describe('SessionCommands', () => { webClient.protobuf.controller.Response = { ResponseCode: { RespOk } }; - sendSessionCommandSpy.and.callFake((_, callback) => callback(response)); + sendSessionCommandSpy.mockImplementation((_, callback) => callback(response)); }); it('RespOk should update user/state and list users/games', () => { - spyOn(SessionPersistence, 'updateBuddyList'); - spyOn(SessionPersistence, 'updateIgnoreList'); - spyOn(SessionPersistence, 'updateUser'); - spyOn(SessionCommands, 'listUsers'); - spyOn(SessionCommands, 'listRooms'); + jest.spyOn(SessionPersistence, 'updateBuddyList').mockImplementation(() => {}); + jest.spyOn(SessionPersistence, 'updateIgnoreList').mockImplementation(() => {}); + jest.spyOn(SessionPersistence, 'updateUser').mockImplementation(() => {}); + jest.spyOn(SessionCommands, 'listUsers').mockImplementation(() => {}); + jest.spyOn(SessionCommands, 'listRooms').mockImplementation(() => {}); SessionCommands.login(); @@ -270,14 +270,14 @@ describe('SessionCommands', () => { expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalledWith({ '.Command_Register.ext': { ...webClient.clientConfig, - userName: options.user, - password: options.pass, + userName: options.userName, + password: options.password, email: options.email, country: options.country, realName: options.realName, - clientid: jasmine.any(String) + clientid: expect.any(String) } - }, jasmine.any(Function)); + }, expect.any(Function)); }); describe('response', () => { @@ -296,12 +296,12 @@ describe('SessionCommands', () => { webClient.protobuf.controller.Response = { ResponseCode: { RespRegistrationAccepted } }; - sendSessionCommandSpy.and.callFake((_, callback) => callback(response)); + sendSessionCommandSpy.mockImplementation((_, callback) => callback(response)); }) it('should login user if registration accepted without email verification', () => { - spyOn(SessionCommands, 'login'); - spyOn(SessionPersistence, 'accountAwaitingActivation'); + jest.spyOn(SessionCommands, 'login').mockImplementation(() => {}); + jest.spyOn(SessionPersistence, 'accountAwaitingActivation').mockImplementation(() => {}); SessionCommands.register(); @@ -315,8 +315,8 @@ describe('SessionCommands', () => { webClient.protobuf.controller.Response.ResponseCode.RespRegistrationAcceptedNeedsActivation = RespRegistrationAcceptedNeedsActivation; - spyOn(SessionCommands, 'login'); - spyOn(SessionPersistence, 'accountAwaitingActivation'); + jest.spyOn(SessionCommands, 'login').mockImplementation(() => {}); + jest.spyOn(SessionPersistence, 'accountAwaitingActivation').mockImplementation(() => {}); SessionCommands.register(); @@ -355,11 +355,11 @@ describe('SessionCommands', () => { expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalledWith({ '.Command_Activate.ext': { ...webClient.clientConfig, - userName: options.user, - token: options.activationCode, - clientid: jasmine.any(String) + userName: options.userName, + token: options.token, + clientid: expect.any(String) } - }, jasmine.any(Function)); + }, expect.any(Function)); }); describe('response', () => { @@ -377,9 +377,9 @@ describe('SessionCommands', () => { webClient.protobuf.controller.Response = { ResponseCode: { RespActivationAccepted } }; - sendSessionCommandSpy.and.callFake((_, callback) => callback(response)); - spyOn(SessionCommands, 'login'); - spyOn(SessionPersistence, 'accountActivationFailed'); + sendSessionCommandSpy.mockImplementation((_, callback) => callback(response)); + jest.spyOn(SessionCommands, 'login').mockImplementation(() => {}); + jest.spyOn(SessionPersistence, 'accountActivationFailed').mockImplementation(() => {}); }); it('should activate user and login if correct activation token used', () => { @@ -413,7 +413,7 @@ describe('SessionCommands', () => { expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalled(); expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalledWith({ '.Command_ListUsers.ext': {} - }, jasmine.any(Function)); + }, expect.any(Function)); }); it('should call SessionPersistence.updateUsers if RespOk', () => { @@ -425,8 +425,8 @@ describe('SessionCommands', () => { }; webClient.protobuf.controller.Response = { ResponseCode: { RespOk } }; - sendSessionCommandSpy.and.callFake((_, callback) => callback(response)); - spyOn(SessionPersistence, 'updateUsers'); + sendSessionCommandSpy.mockImplementation((_, callback) => callback(response)); + jest.spyOn(SessionPersistence, 'updateUsers').mockImplementation(() => {}); SessionCommands.listUsers(); @@ -460,7 +460,7 @@ describe('SessionCommands', () => { expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalled(); expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalledWith({ '.Command_JoinRoom.ext': { roomId } - }, jasmine.any(Function)); + }, expect.any(Function)); }); describe('response', () => { @@ -476,11 +476,11 @@ describe('SessionCommands', () => { webClient.protobuf.controller.Response = { ResponseCode: { RespOk } }; - sendSessionCommandSpy.and.callFake((_, callback) => callback(response)); + sendSessionCommandSpy.mockImplementation((_, callback) => callback(response)); }); it('RespOk should call RoomPersistence.joinRoom', () => { - spyOn(RoomPersistence, 'joinRoom'); + jest.spyOn(RoomPersistence, 'joinRoom').mockImplementation(() => {}); SessionCommands.joinRoom(roomId); @@ -534,7 +534,7 @@ describe('SessionCommands', () => { describe('addToBuddyList', () => { it('should call SessionCommands.addToList', () => { - spyOn(SessionCommands, 'addToList'); + jest.spyOn(SessionCommands, 'addToList').mockImplementation(() => {}); const userName = 'userName'; SessionCommands.addToBuddyList(userName); @@ -545,7 +545,7 @@ describe('SessionCommands', () => { describe('removeFromBuddyList', () => { it('should call SessionCommands.removeFromList', () => { - spyOn(SessionCommands, 'removeFromList'); + jest.spyOn(SessionCommands, 'removeFromList').mockImplementation(() => {}); const userName = 'userName'; SessionCommands.removeFromBuddyList(userName); @@ -556,7 +556,7 @@ describe('SessionCommands', () => { describe('addToIgnoreList', () => { it('should call SessionCommands.addToList', () => { - spyOn(SessionCommands, 'addToList'); + jest.spyOn(SessionCommands, 'addToList').mockImplementation(() => {}); const userName = 'userName'; SessionCommands.addToIgnoreList(userName); @@ -567,7 +567,7 @@ describe('SessionCommands', () => { describe('removeFromIgnoreList', () => { it('should call SessionCommands.removeFromList', () => { - spyOn(SessionCommands, 'removeFromList'); + jest.spyOn(SessionCommands, 'removeFromList').mockImplementation(() => {}); const userName = 'userName'; SessionCommands.removeFromIgnoreList(userName); @@ -588,7 +588,7 @@ describe('SessionCommands', () => { expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalled(); expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalledWith({ '.Command_AddToList.ext': addToList - }, jasmine.any(Function)); + }, expect.any(Function)); }); }); @@ -604,7 +604,7 @@ describe('SessionCommands', () => { expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalled(); expect(webClient.protobuf.sendSessionCommand).toHaveBeenCalledWith({ '.Command_RemoveFromList.ext': removeFromList - }, jasmine.any(Function)); + }, expect.any(Function)); }); }); @@ -621,7 +621,7 @@ describe('SessionCommands', () => { expect(webClient.protobuf.sendModeratorCommand).toHaveBeenCalled(); expect(webClient.protobuf.sendModeratorCommand).toHaveBeenCalledWith({ '.Command_ViewLogHistory.ext': filters - }, jasmine.any(Function)); + }, expect.any(Function)); }); describe('response', () => { @@ -637,11 +637,11 @@ describe('SessionCommands', () => { webClient.protobuf.controller.Response = { ResponseCode: { RespOk } }; - sendModeratorCommandSpy.and.callFake((_, callback) => callback(response)); + sendModeratorCommandSpy.mockImplementation((_, callback) => callback(response)); }); it('RespOk should call SessionPersistence.viewLogs', () => { - spyOn(SessionPersistence, 'viewLogs'); + jest.spyOn(SessionPersistence, 'viewLogs').mockImplementation(() => {}); SessionCommands.viewLogHistory(filters); diff --git a/webclient/src/websocket/events/RoomEvents.spec.ts b/webclient/src/websocket/events/RoomEvents.spec.ts index eb09acc9..24e14898 100644 --- a/webclient/src/websocket/events/RoomEvents.spec.ts +++ b/webclient/src/websocket/events/RoomEvents.spec.ts @@ -11,7 +11,7 @@ import { RoomPersistence } from '../persistence/RoomPersistence'; describe('RoomEvents', () => { it('.Event_JoinRoom.ext should call RoomPersistence.userJoined', () => { - spyOn(RoomPersistence, 'userJoined'); + jest.spyOn(RoomPersistence, 'userJoined').mockImplementation(() => {}); const data: JoinRoomData = { userInfo: {} as any }; const event: RoomEvent = { roomEvent: { roomId: 1 } }; @@ -24,7 +24,7 @@ describe('RoomEvents', () => { }); it('.Event_LeaveRoom.ext should call RoomPersistence.userLeft', () => { - spyOn(RoomPersistence, 'userLeft'); + jest.spyOn(RoomPersistence, 'userLeft').mockImplementation(() => {}); const data: LeaveRoomData = { name: '' }; const event: RoomEvent = { roomEvent: { roomId: 1 } }; @@ -37,7 +37,7 @@ describe('RoomEvents', () => { }); it('.Event_ListGames.ext should call RoomPersistence.updateGames', () => { - spyOn(RoomPersistence, 'updateGames'); + jest.spyOn(RoomPersistence, 'updateGames').mockImplementation(() => {}); const data: ListGamesData = { gameList: [] }; const event: RoomEvent = { roomEvent: { roomId: 1 } }; @@ -50,7 +50,7 @@ describe('RoomEvents', () => { }); it('.Event_RoomSay.ext should call RoomPersistence.addMessage', () => { - spyOn(RoomPersistence, 'addMessage'); + jest.spyOn(RoomPersistence, 'addMessage').mockImplementation(() => {}); const data: Message = {} as any; const event: RoomEvent = { roomEvent: { roomId: 1 } }; diff --git a/webclient/src/websocket/events/SessionEvents.spec.ts b/webclient/src/websocket/events/SessionEvents.spec.ts index ee7013f3..dc82a362 100644 --- a/webclient/src/websocket/events/SessionEvents.spec.ts +++ b/webclient/src/websocket/events/SessionEvents.spec.ts @@ -1,4 +1,4 @@ -import { StatusEnum } from 'types'; +import { StatusEnum, WebSocketConnectReason } from 'types'; import { AddToListData, @@ -15,18 +15,17 @@ import { import { SessionCommands } from '../commands'; import { RoomPersistence, SessionPersistence } from '../persistence'; import webClient from '../WebClient'; -import { WebSocketConnectReason } from '../services/WebSocketService'; describe('SessionEvents', () => { const roomId = 1; beforeEach(() => { - spyOn(SessionCommands, 'updateStatus'); + jest.spyOn(SessionCommands, 'updateStatus').mockImplementation(() => {}); }); describe('.Event_AddToList.ext', () => { it('should call SessionPersistence.addToBuddyList if buddy listName', () => { - spyOn(SessionPersistence, 'addToBuddyList'); + jest.spyOn(SessionPersistence, 'addToBuddyList').mockImplementation(() => {}); const data: AddToListData = { listName: 'buddy', userInfo: {} as any }; SessionEvents['.Event_AddToList.ext'](data); @@ -37,7 +36,7 @@ describe('SessionEvents', () => { }); it('should call SessionPersistence.addToIgnoreList if ignore listName', () => { - spyOn(SessionPersistence, 'addToIgnoreList'); + jest.spyOn(SessionPersistence, 'addToIgnoreList').mockImplementation(() => {}); const data: AddToListData = { listName: 'ignore', userInfo: {} as any }; SessionEvents['.Event_AddToList.ext'](data); @@ -48,7 +47,7 @@ describe('SessionEvents', () => { }); it('should call console.log if unknown listName', () => { - spyOn(console, 'log'); + jest.spyOn(console, 'log').mockImplementation(() => {}); const data: AddToListData = { listName: 'unknown', userInfo: {} as any }; SessionEvents['.Event_AddToList.ext'](data); @@ -218,7 +217,7 @@ describe('SessionEvents', () => { describe('.Event_ListRooms.ext', () => { beforeEach(() => { webClient.options.autojoinrooms = false; - spyOn(RoomPersistence, 'updateRooms'); + jest.spyOn(RoomPersistence, 'updateRooms').mockImplementation(() => {}); }); it('should call RoomPersistence.updateRooms', () => { @@ -231,7 +230,7 @@ describe('SessionEvents', () => { it('should call SessionCommands.joinRoom if webClient and room is configured for autojoin', () => { webClient.options.autojoinrooms = true; - spyOn(SessionCommands, 'joinRoom'); + jest.spyOn(SessionCommands, 'joinRoom').mockImplementation(() => {}); const data: ListRoomsData = { roomList: [{ roomId, autoJoin: true } as any, { roomId: 2, autoJoin: false } as any] }; SessionEvents['.Event_ListRooms.ext'](data); @@ -243,7 +242,7 @@ describe('SessionEvents', () => { describe('.Event_RemoveFromList.ext', () => { it('should call SessionPersistence.removeFromBuddyList if buddy listName', () => { - spyOn(SessionPersistence, 'removeFromBuddyList'); + jest.spyOn(SessionPersistence, 'removeFromBuddyList').mockImplementation(() => {}); const data: RemoveFromListData = { listName: 'buddy', userName: '' }; SessionEvents['.Event_RemoveFromList.ext'](data); @@ -254,7 +253,7 @@ describe('SessionEvents', () => { }); it('should call SessionPersistence.removeFromIgnoreList if ignore listName', () => { - spyOn(SessionPersistence, 'removeFromIgnoreList'); + jest.spyOn(SessionPersistence, 'removeFromIgnoreList').mockImplementation(() => {}); const data: RemoveFromListData = { listName: 'ignore', userName: '' }; SessionEvents['.Event_RemoveFromList.ext'](data); @@ -265,7 +264,7 @@ describe('SessionEvents', () => { }); it('should call console.log if unknown listName', () => { - spyOn(console, 'log'); + jest.spyOn(console, 'log').mockImplementation(() => {}); const data: RemoveFromListData = { listName: 'unknown', userName: '' }; SessionEvents['.Event_RemoveFromList.ext'](data); @@ -287,13 +286,15 @@ describe('SessionEvents', () => { serverName: 'serverName', serverVersion: 'serverVersion', protocolVersion: 0, + serverOptions: 0 }; - spyOn(SessionPersistence, 'updateInfo'); + jest.spyOn(SessionPersistence, 'updateInfo').mockImplementation(() => {}); + webClient.protobuf.controller.Event_ServerIdentification = { ServerOptions: { SupportsPasswordHash: 1 } }; }); it('update status/info and login', () => { - spyOn(SessionCommands, 'login'); + jest.spyOn(SessionCommands, 'login').mockImplementation(() => {}); webClient.options.reason = WebSocketConnectReason.LOGIN; @@ -305,7 +306,7 @@ describe('SessionEvents', () => { }); it('should update stat/info and register', () => { - spyOn(SessionCommands, 'register'); + jest.spyOn(SessionCommands, 'register').mockImplementation(() => {}); webClient.options.reason = WebSocketConnectReason.REGISTER; @@ -316,7 +317,7 @@ describe('SessionEvents', () => { }); it('should update stat/info and activate account', () => { - spyOn(SessionCommands, 'activateAccount'); + jest.spyOn(SessionCommands, 'activateAccount').mockImplementation(() => {}); webClient.options.reason = WebSocketConnectReason.ACTIVATE_ACCOUNT; @@ -327,14 +328,15 @@ describe('SessionEvents', () => { }); it('should disconnect if protocolVersion mismatched', () => { - spyOn(SessionCommands, 'login'); - spyOn(SessionCommands, 'disconnect'); + jest.spyOn(SessionCommands, 'login').mockImplementation(() => {}); + jest.spyOn(SessionCommands, 'disconnect').mockImplementation(() => {}); webClient.protocolVersion = 0; const data: ServerIdentificationData = { serverName: '', serverVersion: '', protocolVersion: 1, + serverOptions: 0 }; event(data); @@ -350,7 +352,7 @@ describe('SessionEvents', () => { describe('.Event_ServerMessage.ext', () => { it('should call SessionPersistence.serverMessage', () => { - spyOn(SessionPersistence, 'serverMessage'); + jest.spyOn(SessionPersistence, 'serverMessage').mockImplementation(() => {}); const data: ServerMessageData = { message: 'message' }; SessionEvents['.Event_ServerMessage.ext'](data); @@ -363,7 +365,7 @@ describe('SessionEvents', () => { describe('.Event_UserJoined.ext', () => { it('should call SessionPersistence.userJoined', () => { - spyOn(SessionPersistence, 'userJoined'); + jest.spyOn(SessionPersistence, 'userJoined').mockImplementation(() => {}); const data: UserJoinedData = { userInfo: {} as any }; SessionEvents['.Event_UserJoined.ext'](data); @@ -376,7 +378,7 @@ describe('SessionEvents', () => { describe('.Event_UserLeft.ext', () => { it('should call SessionPersistence.userLeft', () => { - spyOn(SessionPersistence, 'userLeft'); + jest.spyOn(SessionPersistence, 'userLeft').mockImplementation(() => {}); const data: UserLeftData = { name: '' }; SessionEvents['.Event_UserLeft.ext'](data); diff --git a/webclient/src/websocket/services/KeepAliveService.spec.ts b/webclient/src/websocket/services/KeepAliveService.spec.ts index c0eb4523..d15810ed 100644 --- a/webclient/src/websocket/services/KeepAliveService.spec.ts +++ b/webclient/src/websocket/services/KeepAliveService.spec.ts @@ -30,8 +30,8 @@ describe('KeepAliveService', () => { promise = new Promise(resolve => resolvePing = resolve); ping = (done) => promise.then(done); - checkReadyStateSpy = spyOn(socket, 'checkReadyState'); - checkReadyStateSpy.and.returnValue(true); + checkReadyStateSpy = jest.spyOn(socket, 'checkReadyState'); + checkReadyStateSpy.mockImplementation(() => true); service.startPingLoop(interval, ping); jest.advanceTimersByTime(interval); @@ -52,15 +52,15 @@ describe('KeepAliveService', () => { }); it('should fire disconnected$ if lastPingPending is still true', () => { - spyOn(service.disconnected$, 'next'); + jest.spyOn(service.disconnected$, 'next').mockImplementation(() => {}); jest.advanceTimersByTime(interval); expect(service.disconnected$.next).toHaveBeenCalled(); }); it('should endPingLoop if socket is not open', () => { - spyOn(service, 'endPingLoop'); - checkReadyStateSpy.and.returnValue(false); + jest.spyOn(service, 'endPingLoop').mockImplementation(() => {}); + checkReadyStateSpy.mockImplementation(() => false); resolvePing(); jest.advanceTimersByTime(interval);