diff --git a/CHANGELOG.md b/CHANGELOG.md index ca05d2a0..691e61a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,10 @@ > Description -This release introduces enhancements to impove the user experience that can be created with Token Negotiator -for both on and off chain tokens. +This release introduces new web2 and web3 enhancements and fixes. ### Upgrade Steps -* Update NPM package to version 2.3.0 +* Update NPM package to version 2.4.0 ### Breaking Changes @@ -13,18 +12,16 @@ for both on and off chain tokens. ### New Features -* ERC20 support -* Flow Network support -* Redirect mode now enabled by default in browsers that do not support iframe or tab -* Remove KeyShape JS popup animation - now using CSS for all animations -* Wallet Connect V2 added (Experimental Use Only) +* New Event Hooks (see README) +* Configurable view navigation animations +* Wallet Disconnection ehancements ### Bug Fixes * Re-direct enhancements and fixes -* Remove the need for node polyfills when importing the project from NPM -* Enable closing of Token Outlet across all mobile browsers -* Use redirect mode for Firefox - iframe no longer works due to changes in storage state partitioning +* Wallet Connect V2 fixes +* Polyfills +* Flow Network support documentation added to README ### Performance Improvements @@ -39,4 +36,4 @@ for both on and off chain tokens. **Full Change log**: -https://github.com/TokenScript/token-negotiator/compare/v2.2.0...v2.3.0 +https://github.com/TokenScript/token-negotiator/compare/v2.3.0...v2.4.0 diff --git a/README.md b/README.md index 441ee887..99a7d4f8 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The following types of tokens are supported: (for new token issuers who are interested in using TokenScript please visit the following WIKI page: https://github.com/TokenScript/token-negotiator/wiki/Token-Issuer-Page). -### Token Negotiator supports NFT Tokens across the following blockchains and networks: +### Supported Blockchains and Networks: @@ -97,10 +97,15 @@ The following types of tokens are supported: + + + + +
devnet Y
flowmainnetY
-## Wallet Support +### Wallet Support @@ -139,10 +144,6 @@ The following types of tokens are supported: - - - - @@ -158,15 +159,15 @@ The following types of tokens are supported:
flow Blockto
flowBlockto
flow Lillico
-Within your application install the token negotiator: +### Getting Started -NPM +Using NPM ```sh npm i @tokenscript/token-negotiator ``` -Browser build +Or Browser ```html - - - - -
- + + + + +
+ - + window.negotiator.negotiate(); + } + function switchTheme() { + theme = theme === "dark" ? "light" : "dark"; + window.negotiator.switchTheme(theme); + } + + diff --git a/package-lock.json b/package-lock.json index db5fadfe..7f74550a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@tokenscript/attestation": "0.4.1-mw", "@toruslabs/torus-embed": "^1.25.0", "@walletconnect/types": "^2.1.5", - "@walletconnect/universal-provider": "^2.1.5", + "@walletconnect/universal-provider": "^2.4.5", "@walletconnect/web3-provider": "^1.7.1", "ethers": "^5.4.0", "pvutils": "^1.0.17", @@ -43,8 +43,8 @@ "husky": "^8.0.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", - "jest-junit": "^14.0.0", - "loader-utils": "^2.0.4", + "jest-junit": "^15.0.0", + "loader-utils": "^3.2.1", "os-browserify": "^0.3.0", "prettier": "^2.8.3", "process": "^0.11.10", @@ -66,7 +66,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, "dependencies": { "@jridgewell/gen-mapping": "^0.1.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -79,7 +78,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, "dependencies": { "@babel/highlight": "^7.18.6" }, @@ -99,7 +97,6 @@ "version": "7.20.12", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", - "dev": true, "dependencies": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", @@ -129,7 +126,6 @@ "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz", "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==", - "dev": true, "dependencies": { "@babel/types": "^7.20.7", "@jridgewell/gen-mapping": "^0.3.2", @@ -143,7 +139,6 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -254,7 +249,6 @@ "version": "7.18.9", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -275,7 +269,6 @@ "version": "7.19.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", - "dev": true, "dependencies": { "@babel/template": "^7.18.10", "@babel/types": "^7.19.0" @@ -288,7 +281,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, "dependencies": { "@babel/types": "^7.18.6" }, @@ -323,7 +315,6 @@ "version": "7.20.11", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz", "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==", - "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", @@ -397,7 +388,6 @@ "version": "7.20.2", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", - "dev": true, "dependencies": { "@babel/types": "^7.20.2" }, @@ -421,7 +411,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dev": true, "dependencies": { "@babel/types": "^7.18.6" }, @@ -472,7 +461,6 @@ "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz", "integrity": "sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==", - "dev": true, "dependencies": { "@babel/template": "^7.20.7", "@babel/traverse": "^7.20.7", @@ -486,7 +474,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", @@ -500,7 +487,6 @@ "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -1666,7 +1652,6 @@ "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", - "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", "@babel/parser": "^7.20.7", @@ -1680,7 +1665,6 @@ "version": "7.20.12", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.12.tgz", "integrity": "sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==", - "dev": true, "dependencies": { "@babel/code-frame": "^7.18.6", "@babel/generator": "^7.20.7", @@ -1716,6 +1700,26 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -3198,7 +3202,6 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, "dependencies": { "@jridgewell/set-array": "^1.0.0", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -3211,7 +3214,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -3220,7 +3222,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, "engines": { "node": ">=6.0.0" } @@ -3252,14 +3253,12 @@ "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.17", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", - "dev": true, "dependencies": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" @@ -3776,6 +3775,26 @@ "@babel/runtime": "7.x" } }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" + }, "node_modules/@types/babel__core": { "version": "7.1.20", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.20.tgz", @@ -4015,15 +4034,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.0.tgz", - "integrity": "sha512-SVLafp0NXpoJY7ut6VFVUU9I+YeFsDzeQwtK0WZ+xbRN3mtxJ08je+6Oi2N89qDn087COdO0u3blKZNv9VetRQ==", + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.54.0.tgz", + "integrity": "sha512-+hSN9BdSr629RF02d7mMtXhAJvDTyCbprNYJKrXETlul/Aml6YZwd90XioVbjejQeHbb3R8Dg0CkRgoJDxo8aw==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/type-utils": "5.48.0", - "@typescript-eslint/utils": "5.48.0", + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/type-utils": "5.54.0", + "@typescript-eslint/utils": "5.54.0", "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", "regexpp": "^3.2.0", @@ -4047,6 +4067,53 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.0.tgz", + "integrity": "sha512-VTPYNZ7vaWtYna9M4oD42zENOBrb+ZYyCNdFs949GcN8Miwn37b8b7eMj+EZaq7VK9fx0Jd+JhmkhjFhvnovhg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz", + "integrity": "sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz", + "integrity": "sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/eslint-plugin/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -4125,13 +4192,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.48.0.tgz", - "integrity": "sha512-vbtPO5sJyFjtHkGlGK4Sthmta0Bbls4Onv0bEqOGm7hP9h8UpRsHJwsrCiWtCUndTRNQO/qe6Ijz9rnT/DB+7g==", + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.54.0.tgz", + "integrity": "sha512-WI+WMJ8+oS+LyflqsD4nlXMsVdzTMYTxl16myXPaCXnSgc7LWwMsjxQFZCK/rVmTZ3FN71Ct78ehO9bRC7erYQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.48.0", - "@typescript-eslint/utils": "5.48.0", + "@typescript-eslint/typescript-estree": "5.54.0", + "@typescript-eslint/utils": "5.54.0", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -4151,6 +4218,96 @@ } } }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz", + "integrity": "sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.0.tgz", + "integrity": "sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz", + "integrity": "sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/@typescript-eslint/types": { "version": "5.48.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.48.0.tgz", @@ -4225,16 +4382,16 @@ "dev": true }, "node_modules/@typescript-eslint/utils": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.0.tgz", - "integrity": "sha512-x2jrMcPaMfsHRRIkL+x96++xdzvrdBCnYRd5QiW5Wgo1OB4kDYPbC1XjWP/TNqlfK93K/lUL92erq5zPLgFScQ==", + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.54.0.tgz", + "integrity": "sha512-cuwm8D/Z/7AuyAeJ+T0r4WZmlnlxQ8wt7C7fLpFlKMR+dY6QO79Cq1WpJhvZbMA4ZeZGHiRWnht7ZJ8qkdAunw==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/typescript-estree": "5.48.0", + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/typescript-estree": "5.54.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" @@ -4250,6 +4407,80 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.0.tgz", + "integrity": "sha512-VTPYNZ7vaWtYna9M4oD42zENOBrb+ZYyCNdFs949GcN8Miwn37b8b7eMj+EZaq7VK9fx0Jd+JhmkhjFhvnovhg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz", + "integrity": "sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.0.tgz", + "integrity": "sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz", + "integrity": "sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "5.54.0", + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/utils/node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -4402,22 +4633,22 @@ } }, "node_modules/@walletconnect/core": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.1.5.tgz", - "integrity": "sha512-UjQRIVNTJfUDwR0NATgJf2qQEjyX053JdG0PAZs1YxhpNevGuhAzAlOvWHf4hq9zV8uj9mUPkkkWXSY331uQig==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.4.6.tgz", + "integrity": "sha512-IPjS3dZvLQ2ZjuVKpel6NHIoW1bkCayh5W8XFC7nhLj5GHou5Gy2FsGgGbRknvCEVWH85AlFKFAvLZCe+TJ2VA==", "dependencies": { - "@walletconnect/heartbeat": "^1.0.1", + "@walletconnect/heartbeat": "1.2.0", "@walletconnect/jsonrpc-provider": "^1.0.6", "@walletconnect/jsonrpc-utils": "^1.0.4", - "@walletconnect/jsonrpc-ws-connection": "^1.0.6", + "@walletconnect/jsonrpc-ws-connection": "^1.0.7", "@walletconnect/keyvaluestorage": "^1.0.2", "@walletconnect/logger": "^2.0.1", - "@walletconnect/relay-api": "^1.0.7", + "@walletconnect/relay-api": "^1.0.9", "@walletconnect/relay-auth": "^1.0.4", "@walletconnect/safe-json": "^1.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.1.5", - "@walletconnect/utils": "2.1.5", + "@walletconnect/types": "2.4.6", + "@walletconnect/utils": "2.4.6", "events": "^3.3.0", "lodash.isequal": "4.5.0", "pino": "7.11.0", @@ -4485,12 +4716,15 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/heartbeat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.0.1.tgz", - "integrity": "sha512-2FbyTlftC7TMpLSMhEI/H9fy4ToadJ8B7t8ROI97L9ZlmmVyPdoYA8WDu7akQQId/ZBYb7WClfJqvweOB11vTA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.0.tgz", + "integrity": "sha512-0vbzTa/ARrpmMmOD+bQMxPvFYKtOLQZObgZakrYr0aODiMOO71CmPVNV2eAqXnw9rMmcP+z91OybLeIFlwTjjA==", "dependencies": { "@walletconnect/events": "^1.0.1", "@walletconnect/time": "^1.0.2", + "chai": "^4.3.7", + "mocha": "^10.2.0", + "ts-node": "^10.9.1", "tslib": "1.14.1" } }, @@ -4617,11 +4851,11 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/jsonrpc-provider": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.6.tgz", - "integrity": "sha512-f5vQxr53vUVQ51/9mRLb1OiNciT/546XZ68Byn9OYnDBGeGJXK2kQWDHp8sPWZbN5x0p7B6asdCWMVFJ6danlw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.8.tgz", + "integrity": "sha512-M44vzTrF0TeDcxQorm2lJ5klmfqchYOZqmIHb5T9lIPA/rj22643P83j44flZLyzycPqy5UUlIH6foeBPwjxMg==", "dependencies": { - "@walletconnect/jsonrpc-utils": "^1.0.4", + "@walletconnect/jsonrpc-utils": "^1.0.6", "@walletconnect/safe-json": "^1.0.1", "tslib": "1.14.1" } @@ -4646,9 +4880,9 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/jsonrpc-utils": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.4.tgz", - "integrity": "sha512-y0+tDxcTZ9BHBBKBJbjZxLUXb+zQZCylf7y/jTvDPNx76J0hYYc+F9zHzyqBLeorSKepLTk6yI8hw3NXbAQB3g==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.6.tgz", + "integrity": "sha512-snp0tfkjPiDLQp/jrBewI+9SM33GPV4+Gjgldod6XQ7rFyQ5FZjnBxUkY4xWH0+arNxzQSi6v5iDXjCjSaorpg==", "dependencies": { "@walletconnect/environment": "^1.0.1", "@walletconnect/jsonrpc-types": "^1.0.2", @@ -4661,11 +4895,11 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/jsonrpc-ws-connection": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.6.tgz", - "integrity": "sha512-WFu8uTXbIDgxFfyax9uNcqFYtexUq/OdCA3SBsOqIipsnJFbjXK8OaR8WCoec4tkJbDRQO9mrr1KpA0ZlIcnCQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.9.tgz", + "integrity": "sha512-x1COaW6hhMLEo+ND5zF/siBGg5SEwC/gHjeRbJtK1CRiq9atkg/XR7JwtSNfMvYX/O3PRCVmuc5SP0RQio9JUw==", "dependencies": { - "@walletconnect/jsonrpc-utils": "^1.0.4", + "@walletconnect/jsonrpc-utils": "^1.0.6", "@walletconnect/safe-json": "^1.0.1", "events": "^3.3.0", "tslib": "1.14.1", @@ -4758,9 +4992,9 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/relay-api": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@walletconnect/relay-api/-/relay-api-1.0.7.tgz", - "integrity": "sha512-Mf/Ql7Z0waZzAuondHS9bbUi12Kyvl95ihxVDM7mPO8o7Ke7S1ffpujCUhXbSacSKcw9aV2+7bKADlsBjQLR5Q==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@walletconnect/relay-api/-/relay-api-1.0.9.tgz", + "integrity": "sha512-Q3+rylJOqRkO1D9Su0DPE3mmznbAalYapJ9qmzDgK28mYF9alcP3UwG/og5V7l7CFOqzCLi7B8BvcBUrpDj0Rg==", "dependencies": { "@walletconnect/jsonrpc-types": "^1.0.2", "tslib": "1.14.1" @@ -4803,19 +5037,19 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/sign-client": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.1.5.tgz", - "integrity": "sha512-lEcP9Kk+2aKswWcJPBnTpZ+2V8r7mTLitA9F9cteFD0606k9xVGHoWEIt19YlVrB7sTKfXCdF/FWjmVTbHOBEw==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.4.6.tgz", + "integrity": "sha512-Dt5p4g105/1EFXFCTvdJiqtRGRgyWPzIJ8MSsTlYSoeJiTYwUC+mlBh4Y+Io/cxtc5hUuguaj0MyovIMiL4KkA==", "dependencies": { - "@walletconnect/core": "2.1.5", + "@walletconnect/core": "2.4.6", "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "^1.0.1", + "@walletconnect/heartbeat": "1.2.0", "@walletconnect/jsonrpc-provider": "^1.0.6", "@walletconnect/jsonrpc-utils": "^1.0.4", "@walletconnect/logger": "^2.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.1.5", - "@walletconnect/utils": "2.1.5", + "@walletconnect/types": "2.4.6", + "@walletconnect/utils": "2.4.6", "events": "^3.3.0", "pino": "7.11.0" } @@ -4904,12 +5138,12 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/@walletconnect/types": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.1.5.tgz", - "integrity": "sha512-KhJ+/Och+0W2i6gfSBLjn7yqu2496MXGPOHm9yosQ1t1X6i9j3FjA4yiyLCbmIdVOXvtU1JOdn15ATOhSUxc3Q==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.4.6.tgz", + "integrity": "sha512-0ck2VvTRT4pTMQbop2Dku8YuOdNhebyJlXjtHN4naFgu73rXiw7Yml4N4hKjV4cwJoOBepWD2f9Dvl9cDFQ/Wg==", "dependencies": { "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "^1.0.1", + "@walletconnect/heartbeat": "1.2.0", "@walletconnect/jsonrpc-types": "^1.0.2", "@walletconnect/keyvaluestorage": "^1.0.2", "@walletconnect/logger": "^2.0.1", @@ -4917,27 +5151,27 @@ } }, "node_modules/@walletconnect/universal-provider": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.1.5.tgz", - "integrity": "sha512-mjFexQrPk3xL8tIdFrDq0b4LfghKt5j9Fhd5wVwZWhcCf1i8tiRpOhuchY0v8B4r6rLla525dbdi3f2PKFE+EQ==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.4.6.tgz", + "integrity": "sha512-FvuCCoQ00kYK3M6wYpaK9goCTa8kK5DQPTrsXYeitfXcJccQHxJahpEzIadLc6sj5+uK06WuLGGSObfpjSG3IA==", "dependencies": { "@walletconnect/jsonrpc-http-connection": "^1.0.4", "@walletconnect/jsonrpc-provider": "^1.0.6", "@walletconnect/jsonrpc-types": "^1.0.2", "@walletconnect/jsonrpc-utils": "^1.0.4", "@walletconnect/logger": "^2.0.1", - "@walletconnect/sign-client": "2.1.5", - "@walletconnect/types": "2.1.5", - "@walletconnect/utils": "2.1.5", + "@walletconnect/sign-client": "2.4.6", + "@walletconnect/types": "2.4.6", + "@walletconnect/utils": "2.4.6", "eip1193-provider": "1.0.1", "events": "^3.3.0", "pino": "7.11.0" } }, "node_modules/@walletconnect/utils": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.1.5.tgz", - "integrity": "sha512-ZJNS/3oXjyDxjQXfXCl4GtnNnnVKaLRYwbhSw6ECDaZHo3WdAGWKrg14eB0XYw9RxTM4bCgb5z21NtaeP3ck4A==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.4.6.tgz", + "integrity": "sha512-SowRdiR3TTGeb3ikMP7ucOafgmu58Nh1pCjCff2666gQjVzT9qO1Y9aJ7eS3g3URJtLGzYCEIYohnUYOidvpgA==", "dependencies": { "@stablelib/chacha20poly1305": "1.0.1", "@stablelib/hkdf": "1.0.1", @@ -4945,10 +5179,10 @@ "@stablelib/sha256": "1.0.1", "@stablelib/x25519": "^1.0.3", "@walletconnect/jsonrpc-utils": "^1.0.4", - "@walletconnect/relay-api": "^1.0.7", + "@walletconnect/relay-api": "^1.0.9", "@walletconnect/safe-json": "^1.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.1.5", + "@walletconnect/types": "2.4.6", "@walletconnect/window-getters": "^1.0.1", "@walletconnect/window-metadata": "^1.0.1", "detect-browser": "5.3.0", @@ -5258,7 +5492,6 @@ "version": "8.8.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", - "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -5356,6 +5589,14 @@ "ajv": "^6.9.1" } }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "engines": { + "node": ">=6" + } + }, "node_modules/ansi-escapes": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", @@ -5375,7 +5616,6 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, "engines": { "node": ">=8" } @@ -5395,7 +5635,6 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -5404,6 +5643,11 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -5479,6 +5723,14 @@ "node": ">=0.8" } }, + "node_modules/assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "engines": { + "node": "*" + } + }, "node_modules/async": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", @@ -5843,7 +6095,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, "engines": { "node": ">=8" } @@ -5889,6 +6140,11 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, + "node_modules/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==" + }, "node_modules/browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -6173,11 +6429,27 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, + "node_modules/chai": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "dependencies": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^4.1.2", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -6196,6 +6468,14 @@ "node": ">=10" } }, + "node_modules/check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", + "engines": { + "node": "*" + } + }, "node_modules/checkpoint-store": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", @@ -6208,7 +6488,6 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, "funding": [ { "type": "individual", @@ -6235,7 +6514,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -6286,7 +6564,6 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -6375,8 +6652,7 @@ "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, "node_modules/cookiejar": { "version": "2.1.3", @@ -6477,6 +6753,11 @@ "sha.js": "^2.4.8" } }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, "node_modules/cross-fetch": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", @@ -6717,8 +6998,19 @@ "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "dev": true }, - "node_modules/deep-is": { - "version": "0.1.4", + "node_modules/deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "dependencies": { + "type-detect": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true @@ -6785,6 +7077,14 @@ "node": ">=8" } }, + "node_modules/diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/diff-sequences": { "version": "28.1.1", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", @@ -6930,8 +7230,7 @@ "node_modules/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 + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "node_modules/emojis-list": { "version": "3.0.0", @@ -7130,7 +7429,6 @@ "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, "engines": { "node": ">=0.8.0" } @@ -8355,6 +8653,20 @@ "webpack": "^4.0.0 || ^5.0.0" } }, + "node_modules/file-loader/node_modules/loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -8395,6 +8707,14 @@ "micromatch": "^4.0.2" } }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "bin": { + "flat": "cli.js" + } + }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -8486,7 +8806,6 @@ "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, "hasInstallScript": true, "optional": true, "os": [ @@ -8535,7 +8854,6 @@ "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, "engines": { "node": ">=6.9.0" } @@ -8548,6 +8866,14 @@ "node": "6.* || 8.* || >= 10.*" } }, + "node_modules/get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", + "engines": { + "node": "*" + } + }, "node_modules/get-intrinsic": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", @@ -8655,7 +8981,6 @@ "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, "engines": { "node": ">=4" } @@ -8760,7 +9085,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, "engines": { "node": ">=4" } @@ -8853,6 +9177,14 @@ "minimalistic-assert": "^1.0.1" } }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } + }, "node_modules/hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -9157,7 +9489,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -9250,7 +9581,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -9267,7 +9597,6 @@ "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, "engines": { "node": ">=8" } @@ -9304,7 +9633,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -9379,6 +9707,14 @@ "node": ">=8" } }, + "node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -9485,6 +9821,17 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -10262,9 +10609,9 @@ } }, "node_modules/jest-junit": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-14.0.1.tgz", - "integrity": "sha512-h7/wwzPbllgpQhhVcRzRC76/cc89GlazThoV1fDxcALkf26IIlRsu/AcTG64f4nR2WPE3Cbd+i/sVf+NCUHrWQ==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-15.0.0.tgz", + "integrity": "sha512-Z5sVX0Ag3HZdMUnD5DFlG+1gciIFSy7yIVPhOdGUi8YJaI9iLvvBb530gtQL2CHmv0JJeiwRZenr0VrSR7frvg==", "dev": true, "dependencies": { "mkdirp": "^1.0.4", @@ -11279,8 +11626,7 @@ "node_modules/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 + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "node_modules/js-yaml": { "version": "3.14.1", @@ -11371,7 +11717,6 @@ "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, "bin": { "jsesc": "bin/jsesc" }, @@ -11438,7 +11783,6 @@ "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, "bin": { "json5": "lib/cli.js" }, @@ -11723,17 +12067,12 @@ } }, "node_modules/loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - }, "engines": { - "node": ">=8.9.0" + "node": ">= 12.13.0" } }, "node_modules/locate-path": { @@ -11809,6 +12148,85 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/loglevel": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", @@ -11821,6 +12239,14 @@ "url": "https://tidelift.com/funding/github/npm/loglevel" } }, + "node_modules/loupe": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "dependencies": { + "get-func-name": "^2.0.0" + } + }, "node_modules/lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -11852,8 +12278,7 @@ "node_modules/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 + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" }, "node_modules/makeerror": { "version": "1.0.12", @@ -12064,28 +12489,232 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", + "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "dependencies": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "bin": { + "_mocha": "bin/_mocha", + "mocha": "bin/mocha.js" + }, + "engines": { + "node": ">= 14.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mochajs" + } + }, + "node_modules/mocha/node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "node_modules/mocha/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "dependencies": { + "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" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/mocha/node_modules/glob/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/mocha/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/mocha/node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/mocha/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mocha/node_modules/minimatch/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/mocha/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/mocha/node_modules/nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/mocha/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mocha/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" }, "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", + "node": ">=10" + }, "funding": { - "url": "https://github.com/sponsors/ljharb" + "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, + "node_modules/mocha/node_modules/yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", "engines": { "node": ">=10" } @@ -12242,7 +12871,6 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -12434,7 +13062,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, "dependencies": { "yocto-queue": "^0.1.0" }, @@ -12709,7 +13336,6 @@ "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, "engines": { "node": ">=8" } @@ -12745,6 +13371,14 @@ "node": ">=8" } }, + "node_modules/pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", + "engines": { + "node": "*" + } + }, "node_modules/pbkdf2": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", @@ -13430,7 +14064,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -13901,7 +14534,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, "dependencies": { "randombytes": "^2.1.0" } @@ -14255,7 +14887,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -14313,7 +14944,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -14355,7 +14985,6 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true, "engines": { "node": ">=8" }, @@ -14383,7 +15012,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "dependencies": { "has-flag": "^3.0.0" }, @@ -14920,6 +15548,64 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/ts-node/node_modules/acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/ts-node/node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "engines": { + "node": ">=0.3.1" + } + }, "node_modules/tslib": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", @@ -14983,7 +15669,6 @@ "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, "engines": { "node": ">=4" } @@ -15025,7 +15710,6 @@ "version": "4.9.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", - "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -15218,6 +15902,11 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + }, "node_modules/v8-to-istanbul": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", @@ -15880,11 +16569,15 @@ "node": ">=0.10.0" } }, + "node_modules/workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==" + }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -15901,7 +16594,6 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -15916,7 +16608,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -15927,8 +16618,7 @@ "node_modules/wrap-ansi/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/wrappy": { "version": "1.0.2", @@ -16063,7 +16753,6 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true, "engines": { "node": ">=10" } @@ -16093,7 +16782,6 @@ "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -16116,20 +16804,62 @@ "node": ">=12" } }, + "node_modules/yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "dependencies": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-unparser/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs-unparser/node_modules/decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/yargs/node_modules/yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true, "engines": { "node": ">=10" } }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "engines": { + "node": ">=6" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, "engines": { "node": ">=10" }, @@ -16143,7 +16873,6 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, "requires": { "@jridgewell/gen-mapping": "^0.1.0", "@jridgewell/trace-mapping": "^0.3.9" @@ -16153,7 +16882,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, "requires": { "@babel/highlight": "^7.18.6" } @@ -16167,7 +16895,6 @@ "version": "7.20.12", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", - "dev": true, "requires": { "@ampproject/remapping": "^2.1.0", "@babel/code-frame": "^7.18.6", @@ -16190,7 +16917,6 @@ "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.20.7.tgz", "integrity": "sha512-7wqMOJq8doJMZmP4ApXTzLxSr7+oO2jroJURrVEp6XShrQUObV8Tq/D0NCcoYg2uHqUrjzO0zwBjoYzelxK+sw==", - "dev": true, "requires": { "@babel/types": "^7.20.7", "@jridgewell/gen-mapping": "^0.3.2", @@ -16201,7 +16927,6 @@ "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, "requires": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", @@ -16283,8 +17008,7 @@ "@babel/helper-environment-visitor": { "version": "7.18.9", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "dev": true + "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==" }, "@babel/helper-explode-assignable-expression": { "version": "7.18.6", @@ -16299,7 +17023,6 @@ "version": "7.19.0", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz", "integrity": "sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w==", - "dev": true, "requires": { "@babel/template": "^7.18.10", "@babel/types": "^7.19.0" @@ -16309,7 +17032,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, "requires": { "@babel/types": "^7.18.6" } @@ -16335,7 +17057,6 @@ "version": "7.20.11", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz", "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==", - "dev": true, "requires": { "@babel/helper-environment-visitor": "^7.18.9", "@babel/helper-module-imports": "^7.18.6", @@ -16391,7 +17112,6 @@ "version": "7.20.2", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", - "dev": true, "requires": { "@babel/types": "^7.20.2" } @@ -16409,7 +17129,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dev": true, "requires": { "@babel/types": "^7.18.6" } @@ -16445,7 +17164,6 @@ "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz", "integrity": "sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==", - "dev": true, "requires": { "@babel/template": "^7.20.7", "@babel/traverse": "^7.20.7", @@ -16456,7 +17174,6 @@ "version": "7.18.6", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.18.6", "chalk": "^2.0.0", @@ -16466,8 +17183,7 @@ "@babel/parser": { "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.20.7.tgz", - "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==", - "dev": true + "integrity": "sha512-T3Z9oHybU+0vZlY9CiDSJQTD5ZapcW18ZctFMi0MOAl/4BjFF4ul7NVSARLdbGO5vDqy9eQiGTV0LtKfvCYvcg==" }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { "version": "7.18.6", @@ -17246,7 +17962,6 @@ "version": "7.20.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", - "dev": true, "requires": { "@babel/code-frame": "^7.18.6", "@babel/parser": "^7.20.7", @@ -17257,7 +17972,6 @@ "version": "7.20.12", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.12.tgz", "integrity": "sha512-MsIbFN0u+raeja38qboyF8TIT7K0BFzz/Yd/77ta4MsUsmP2RAnidIlwq7d5HFQrH/OZJecGV6B71C4zAgpoSQ==", - "dev": true, "requires": { "@babel/code-frame": "^7.18.6", "@babel/generator": "^7.20.7", @@ -17287,6 +18001,25 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "requires": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "dependencies": { + "@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + } + } + }, "@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -17605,7 +18338,8 @@ "ws": { "version": "7.4.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", - "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", + "requires": {} } } }, @@ -18267,7 +19001,6 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, "requires": { "@jridgewell/set-array": "^1.0.0", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -18276,14 +19009,12 @@ "@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true + "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==" }, "@jridgewell/set-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==" }, "@jridgewell/source-map": { "version": "0.3.2", @@ -18311,14 +19042,12 @@ "@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" }, "@jridgewell/trace-mapping": { "version": "0.3.17", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", - "dev": true, "requires": { "@jridgewell/resolve-uri": "3.1.0", "@jridgewell/sourcemap-codec": "1.4.14" @@ -18792,6 +19521,26 @@ "pump": "^3.0.0" } }, + "@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==" + }, + "@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==" + }, + "@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==" + }, + "@tsconfig/node16": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.3.tgz", + "integrity": "sha512-yOlFc+7UtL/89t2ZhjPvvB/DeAr3r+Dq58IgzsFkOAvVC6NMJXmCGjbptdXdR9qsX7pKcTL+s87FtYREi2dEEQ==" + }, "@types/babel__core": { "version": "7.1.20", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.20.tgz", @@ -19031,15 +19780,16 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.48.0.tgz", - "integrity": "sha512-SVLafp0NXpoJY7ut6VFVUU9I+YeFsDzeQwtK0WZ+xbRN3mtxJ08je+6Oi2N89qDn087COdO0u3blKZNv9VetRQ==", + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.54.0.tgz", + "integrity": "sha512-+hSN9BdSr629RF02d7mMtXhAJvDTyCbprNYJKrXETlul/Aml6YZwd90XioVbjejQeHbb3R8Dg0CkRgoJDxo8aw==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/type-utils": "5.48.0", - "@typescript-eslint/utils": "5.48.0", + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/type-utils": "5.54.0", + "@typescript-eslint/utils": "5.54.0", "debug": "^4.3.4", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "natural-compare-lite": "^1.4.0", "regexpp": "^3.2.0", @@ -19047,6 +19797,32 @@ "tsutils": "^3.21.0" }, "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.0.tgz", + "integrity": "sha512-VTPYNZ7vaWtYna9M4oD42zENOBrb+ZYyCNdFs949GcN8Miwn37b8b7eMj+EZaq7VK9fx0Jd+JhmkhjFhvnovhg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0" + } + }, + "@typescript-eslint/types": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz", + "integrity": "sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==", + "dev": true + }, + "@typescript-eslint/visitor-keys": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz", + "integrity": "sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "eslint-visitor-keys": "^3.3.0" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -19096,15 +19872,72 @@ } }, "@typescript-eslint/type-utils": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.48.0.tgz", - "integrity": "sha512-vbtPO5sJyFjtHkGlGK4Sthmta0Bbls4Onv0bEqOGm7hP9h8UpRsHJwsrCiWtCUndTRNQO/qe6Ijz9rnT/DB+7g==", + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.54.0.tgz", + "integrity": "sha512-WI+WMJ8+oS+LyflqsD4nlXMsVdzTMYTxl16myXPaCXnSgc7LWwMsjxQFZCK/rVmTZ3FN71Ct78ehO9bRC7erYQ==", "dev": true, "requires": { - "@typescript-eslint/typescript-estree": "5.48.0", - "@typescript-eslint/utils": "5.48.0", + "@typescript-eslint/typescript-estree": "5.54.0", + "@typescript-eslint/utils": "5.54.0", "debug": "^4.3.4", "tsutils": "^3.21.0" + }, + "dependencies": { + "@typescript-eslint/types": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz", + "integrity": "sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.0.tgz", + "integrity": "sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz", + "integrity": "sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "eslint-visitor-keys": "^3.3.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" + } + }, + "semver": { + "version": "7.3.8", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", + "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } } }, "@typescript-eslint/types": { @@ -19155,21 +19988,62 @@ } }, "@typescript-eslint/utils": { - "version": "5.48.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.48.0.tgz", - "integrity": "sha512-x2jrMcPaMfsHRRIkL+x96++xdzvrdBCnYRd5QiW5Wgo1OB4kDYPbC1XjWP/TNqlfK93K/lUL92erq5zPLgFScQ==", + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.54.0.tgz", + "integrity": "sha512-cuwm8D/Z/7AuyAeJ+T0r4WZmlnlxQ8wt7C7fLpFlKMR+dY6QO79Cq1WpJhvZbMA4ZeZGHiRWnht7ZJ8qkdAunw==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.48.0", - "@typescript-eslint/types": "5.48.0", - "@typescript-eslint/typescript-estree": "5.48.0", + "@typescript-eslint/scope-manager": "5.54.0", + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/typescript-estree": "5.54.0", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0", "semver": "^7.3.7" }, "dependencies": { + "@typescript-eslint/scope-manager": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.54.0.tgz", + "integrity": "sha512-VTPYNZ7vaWtYna9M4oD42zENOBrb+ZYyCNdFs949GcN8Miwn37b8b7eMj+EZaq7VK9fx0Jd+JhmkhjFhvnovhg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0" + } + }, + "@typescript-eslint/types": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.54.0.tgz", + "integrity": "sha512-nExy+fDCBEgqblasfeE3aQ3NuafBUxZxgxXcYfzYRZFHdVvk5q60KhCSkG0noHgHRo/xQ/BOzURLZAafFpTkmQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.54.0.tgz", + "integrity": "sha512-X2rJG97Wj/VRo5YxJ8Qx26Zqf0RRKsVHd4sav8NElhbZzhpBI8jU54i6hfo9eheumj4oO4dcRN1B/zIVEqR/MQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "@typescript-eslint/visitor-keys": "5.54.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.3.7", + "tsutils": "^3.21.0" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "5.54.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.54.0.tgz", + "integrity": "sha512-xu4wT7aRCakGINTLGeyGqDn+78BwFlggwBjnHa1ar/KaGagnmwLYmlrXIrgAaQ3AE1Vd6nLfKASm7LrFHNbKGA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "5.54.0", + "eslint-visitor-keys": "^3.3.0" + } + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -19306,22 +20180,22 @@ } }, "@walletconnect/core": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.1.5.tgz", - "integrity": "sha512-UjQRIVNTJfUDwR0NATgJf2qQEjyX053JdG0PAZs1YxhpNevGuhAzAlOvWHf4hq9zV8uj9mUPkkkWXSY331uQig==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/core/-/core-2.4.6.tgz", + "integrity": "sha512-IPjS3dZvLQ2ZjuVKpel6NHIoW1bkCayh5W8XFC7nhLj5GHou5Gy2FsGgGbRknvCEVWH85AlFKFAvLZCe+TJ2VA==", "requires": { - "@walletconnect/heartbeat": "^1.0.1", + "@walletconnect/heartbeat": "1.2.0", "@walletconnect/jsonrpc-provider": "^1.0.6", "@walletconnect/jsonrpc-utils": "^1.0.4", - "@walletconnect/jsonrpc-ws-connection": "^1.0.6", + "@walletconnect/jsonrpc-ws-connection": "^1.0.7", "@walletconnect/keyvaluestorage": "^1.0.2", "@walletconnect/logger": "^2.0.1", - "@walletconnect/relay-api": "^1.0.7", + "@walletconnect/relay-api": "^1.0.9", "@walletconnect/relay-auth": "^1.0.4", "@walletconnect/safe-json": "^1.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.1.5", - "@walletconnect/utils": "2.1.5", + "@walletconnect/types": "2.4.6", + "@walletconnect/utils": "2.4.6", "events": "^3.3.0", "lodash.isequal": "4.5.0", "pino": "7.11.0", @@ -19397,12 +20271,15 @@ } }, "@walletconnect/heartbeat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.0.1.tgz", - "integrity": "sha512-2FbyTlftC7TMpLSMhEI/H9fy4ToadJ8B7t8ROI97L9ZlmmVyPdoYA8WDu7akQQId/ZBYb7WClfJqvweOB11vTA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@walletconnect/heartbeat/-/heartbeat-1.2.0.tgz", + "integrity": "sha512-0vbzTa/ARrpmMmOD+bQMxPvFYKtOLQZObgZakrYr0aODiMOO71CmPVNV2eAqXnw9rMmcP+z91OybLeIFlwTjjA==", "requires": { "@walletconnect/events": "^1.0.1", "@walletconnect/time": "^1.0.2", + "chai": "^4.3.7", + "mocha": "^10.2.0", + "ts-node": "^10.9.1", "tslib": "1.14.1" }, "dependencies": { @@ -19525,11 +20402,11 @@ } }, "@walletconnect/jsonrpc-provider": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.6.tgz", - "integrity": "sha512-f5vQxr53vUVQ51/9mRLb1OiNciT/546XZ68Byn9OYnDBGeGJXK2kQWDHp8sPWZbN5x0p7B6asdCWMVFJ6danlw==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-provider/-/jsonrpc-provider-1.0.8.tgz", + "integrity": "sha512-M44vzTrF0TeDcxQorm2lJ5klmfqchYOZqmIHb5T9lIPA/rj22643P83j44flZLyzycPqy5UUlIH6foeBPwjxMg==", "requires": { - "@walletconnect/jsonrpc-utils": "^1.0.4", + "@walletconnect/jsonrpc-utils": "^1.0.6", "@walletconnect/safe-json": "^1.0.1", "tslib": "1.14.1" }, @@ -19558,9 +20435,9 @@ } }, "@walletconnect/jsonrpc-utils": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.4.tgz", - "integrity": "sha512-y0+tDxcTZ9BHBBKBJbjZxLUXb+zQZCylf7y/jTvDPNx76J0hYYc+F9zHzyqBLeorSKepLTk6yI8hw3NXbAQB3g==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-utils/-/jsonrpc-utils-1.0.6.tgz", + "integrity": "sha512-snp0tfkjPiDLQp/jrBewI+9SM33GPV4+Gjgldod6XQ7rFyQ5FZjnBxUkY4xWH0+arNxzQSi6v5iDXjCjSaorpg==", "requires": { "@walletconnect/environment": "^1.0.1", "@walletconnect/jsonrpc-types": "^1.0.2", @@ -19575,11 +20452,11 @@ } }, "@walletconnect/jsonrpc-ws-connection": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.6.tgz", - "integrity": "sha512-WFu8uTXbIDgxFfyax9uNcqFYtexUq/OdCA3SBsOqIipsnJFbjXK8OaR8WCoec4tkJbDRQO9mrr1KpA0ZlIcnCQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.9.tgz", + "integrity": "sha512-x1COaW6hhMLEo+ND5zF/siBGg5SEwC/gHjeRbJtK1CRiq9atkg/XR7JwtSNfMvYX/O3PRCVmuc5SP0RQio9JUw==", "requires": { - "@walletconnect/jsonrpc-utils": "^1.0.4", + "@walletconnect/jsonrpc-utils": "^1.0.6", "@walletconnect/safe-json": "^1.0.1", "events": "^3.3.0", "tslib": "1.14.1", @@ -19669,9 +20546,9 @@ } }, "@walletconnect/relay-api": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/@walletconnect/relay-api/-/relay-api-1.0.7.tgz", - "integrity": "sha512-Mf/Ql7Z0waZzAuondHS9bbUi12Kyvl95ihxVDM7mPO8o7Ke7S1ffpujCUhXbSacSKcw9aV2+7bKADlsBjQLR5Q==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@walletconnect/relay-api/-/relay-api-1.0.9.tgz", + "integrity": "sha512-Q3+rylJOqRkO1D9Su0DPE3mmznbAalYapJ9qmzDgK28mYF9alcP3UwG/og5V7l7CFOqzCLi7B8BvcBUrpDj0Rg==", "requires": { "@walletconnect/jsonrpc-types": "^1.0.2", "tslib": "1.14.1" @@ -19720,19 +20597,19 @@ } }, "@walletconnect/sign-client": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.1.5.tgz", - "integrity": "sha512-lEcP9Kk+2aKswWcJPBnTpZ+2V8r7mTLitA9F9cteFD0606k9xVGHoWEIt19YlVrB7sTKfXCdF/FWjmVTbHOBEw==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/sign-client/-/sign-client-2.4.6.tgz", + "integrity": "sha512-Dt5p4g105/1EFXFCTvdJiqtRGRgyWPzIJ8MSsTlYSoeJiTYwUC+mlBh4Y+Io/cxtc5hUuguaj0MyovIMiL4KkA==", "requires": { - "@walletconnect/core": "2.1.5", + "@walletconnect/core": "2.4.6", "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "^1.0.1", + "@walletconnect/heartbeat": "1.2.0", "@walletconnect/jsonrpc-provider": "^1.0.6", "@walletconnect/jsonrpc-utils": "^1.0.4", "@walletconnect/logger": "^2.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.1.5", - "@walletconnect/utils": "2.1.5", + "@walletconnect/types": "2.4.6", + "@walletconnect/utils": "2.4.6", "events": "^3.3.0", "pino": "7.11.0" } @@ -19784,7 +20661,8 @@ "ws": { "version": "7.5.3", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", - "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==" + "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", + "requires": {} } } }, @@ -19804,12 +20682,12 @@ } }, "@walletconnect/types": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.1.5.tgz", - "integrity": "sha512-KhJ+/Och+0W2i6gfSBLjn7yqu2496MXGPOHm9yosQ1t1X6i9j3FjA4yiyLCbmIdVOXvtU1JOdn15ATOhSUxc3Q==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/types/-/types-2.4.6.tgz", + "integrity": "sha512-0ck2VvTRT4pTMQbop2Dku8YuOdNhebyJlXjtHN4naFgu73rXiw7Yml4N4hKjV4cwJoOBepWD2f9Dvl9cDFQ/Wg==", "requires": { "@walletconnect/events": "^1.0.1", - "@walletconnect/heartbeat": "^1.0.1", + "@walletconnect/heartbeat": "1.2.0", "@walletconnect/jsonrpc-types": "^1.0.2", "@walletconnect/keyvaluestorage": "^1.0.2", "@walletconnect/logger": "^2.0.1", @@ -19817,27 +20695,27 @@ } }, "@walletconnect/universal-provider": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.1.5.tgz", - "integrity": "sha512-mjFexQrPk3xL8tIdFrDq0b4LfghKt5j9Fhd5wVwZWhcCf1i8tiRpOhuchY0v8B4r6rLla525dbdi3f2PKFE+EQ==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/universal-provider/-/universal-provider-2.4.6.tgz", + "integrity": "sha512-FvuCCoQ00kYK3M6wYpaK9goCTa8kK5DQPTrsXYeitfXcJccQHxJahpEzIadLc6sj5+uK06WuLGGSObfpjSG3IA==", "requires": { "@walletconnect/jsonrpc-http-connection": "^1.0.4", "@walletconnect/jsonrpc-provider": "^1.0.6", "@walletconnect/jsonrpc-types": "^1.0.2", "@walletconnect/jsonrpc-utils": "^1.0.4", "@walletconnect/logger": "^2.0.1", - "@walletconnect/sign-client": "2.1.5", - "@walletconnect/types": "2.1.5", - "@walletconnect/utils": "2.1.5", + "@walletconnect/sign-client": "2.4.6", + "@walletconnect/types": "2.4.6", + "@walletconnect/utils": "2.4.6", "eip1193-provider": "1.0.1", "events": "^3.3.0", "pino": "7.11.0" } }, "@walletconnect/utils": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.1.5.tgz", - "integrity": "sha512-ZJNS/3oXjyDxjQXfXCl4GtnNnnVKaLRYwbhSw6ECDaZHo3WdAGWKrg14eB0XYw9RxTM4bCgb5z21NtaeP3ck4A==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@walletconnect/utils/-/utils-2.4.6.tgz", + "integrity": "sha512-SowRdiR3TTGeb3ikMP7ucOafgmu58Nh1pCjCff2666gQjVzT9qO1Y9aJ7eS3g3URJtLGzYCEIYohnUYOidvpgA==", "requires": { "@stablelib/chacha20poly1305": "1.0.1", "@stablelib/hkdf": "1.0.1", @@ -19845,10 +20723,10 @@ "@stablelib/sha256": "1.0.1", "@stablelib/x25519": "^1.0.3", "@walletconnect/jsonrpc-utils": "^1.0.4", - "@walletconnect/relay-api": "^1.0.7", + "@walletconnect/relay-api": "^1.0.9", "@walletconnect/safe-json": "^1.0.1", "@walletconnect/time": "^1.0.2", - "@walletconnect/types": "2.1.5", + "@walletconnect/types": "2.4.6", "@walletconnect/window-getters": "^1.0.1", "@walletconnect/window-metadata": "^1.0.1", "detect-browser": "5.3.0", @@ -20086,7 +20964,8 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.2.0.tgz", "integrity": "sha512-4FB8Tj6xyVkyqjj1OaTqCjXYULB9FMkqQ8yGrZjRDrYh0nOE+7Lhs45WioWQQMV+ceFlE368Ukhe6xdvJM9Egg==", - "dev": true + "dev": true, + "requires": {} }, "@webpack-cli/info": { "version": "1.5.0", @@ -20101,7 +20980,8 @@ "version": "1.7.0", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.7.0.tgz", "integrity": "sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==", - "dev": true + "dev": true, + "requires": {} }, "@xtuc/ieee754": { "version": "1.2.0", @@ -20142,8 +21022,7 @@ "acorn": { "version": "8.8.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz", - "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==", - "dev": true + "integrity": "sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA==" }, "acorn-globals": { "version": "6.0.0", @@ -20167,13 +21046,15 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true + "dev": true, + "requires": {} }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true + "dev": true, + "requires": {} }, "acorn-walk": { "version": "7.2.0", @@ -20210,7 +21091,13 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true + "dev": true, + "requires": {} + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" }, "ansi-escapes": { "version": "4.3.2", @@ -20224,8 +21111,7 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" }, "ansi-styles": { "version": "3.2.1", @@ -20239,12 +21125,16 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" } }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==" + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -20313,6 +21203,11 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==" }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==" + }, "async": { "version": "2.6.4", "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", @@ -20586,8 +21481,7 @@ "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, "blakejs": { "version": "1.2.1", @@ -20627,6 +21521,11 @@ "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, + "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==" + }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", @@ -20837,11 +21736,24 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==" }, + "chai": { + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz", + "integrity": "sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==", + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^4.1.2", + "get-func-name": "^2.0.0", + "loupe": "^2.3.1", + "pathval": "^1.1.1", + "type-detect": "^4.0.5" + } + }, "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", @@ -20854,6 +21766,11 @@ "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==" + }, "checkpoint-store": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/checkpoint-store/-/checkpoint-store-1.1.0.tgz", @@ -20866,7 +21783,6 @@ "version": "3.5.3", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", - "dev": true, "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -20882,7 +21798,6 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -20920,7 +21835,6 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -20996,8 +21910,7 @@ "convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", - "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", - "dev": true + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, "cookiejar": { "version": "2.1.3", @@ -21086,6 +21999,11 @@ "sha.js": "^2.4.8" } }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==" + }, "cross-fetch": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", @@ -21272,6 +22190,14 @@ "integrity": "sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==", "dev": true }, + "deep-eql": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz", + "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==", + "requires": { + "type-detect": "^4.0.0" + } + }, "deep-is": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", @@ -21325,6 +22251,11 @@ "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, + "diff": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", + "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==" + }, "diff-sequences": { "version": "28.1.1", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-28.1.1.tgz", @@ -21456,8 +22387,7 @@ "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 + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "emojis-list": { "version": "3.0.0", @@ -21618,8 +22548,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==" }, "escodegen": { "version": "2.0.0", @@ -22651,6 +23580,19 @@ "requires": { "loader-utils": "^2.0.0", "schema-utils": "^3.0.0" + }, + "dependencies": { + "loader-utils": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", + "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + } + } } }, "fill-range": { @@ -22684,6 +23626,11 @@ "micromatch": "^4.0.2" } }, + "flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==" + }, "flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -22749,7 +23696,6 @@ "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": { @@ -22781,14 +23727,18 @@ "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" }, "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==" }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==" + }, "get-intrinsic": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", @@ -22868,8 +23818,7 @@ "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 + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" }, "globalthis": { "version": "1.0.3", @@ -22942,8 +23891,7 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==" }, "has-property-descriptors": { "version": "1.0.0", @@ -22997,6 +23945,11 @@ "minimalistic-assert": "^1.0.1" } }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -23089,7 +24042,8 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true + "dev": true, + "requires": {} }, "ieee754": { "version": "1.2.1", @@ -23213,7 +24167,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, "requires": { "binary-extensions": "^2.0.0" } @@ -23271,8 +24224,7 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==" }, "is-fn": { "version": "1.0.0", @@ -23282,8 +24234,7 @@ "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 + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, "is-function": { "version": "1.0.2", @@ -23308,7 +24259,6 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -23352,6 +24302,11 @@ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", "dev": true }, + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==" + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -23422,6 +24377,11 @@ "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" + }, "is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -23998,9 +24958,9 @@ } }, "jest-junit": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-14.0.1.tgz", - "integrity": "sha512-h7/wwzPbllgpQhhVcRzRC76/cc89GlazThoV1fDxcALkf26IIlRsu/AcTG64f4nR2WPE3Cbd+i/sVf+NCUHrWQ==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-15.0.0.tgz", + "integrity": "sha512-Z5sVX0Ag3HZdMUnD5DFlG+1gciIFSy7yIVPhOdGUi8YJaI9iLvvBb530gtQL2CHmv0JJeiwRZenr0VrSR7frvg==", "dev": true, "requires": { "mkdirp": "^1.0.4", @@ -24164,7 +25124,8 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true + "dev": true, + "requires": {} }, "jest-regex-util": { "version": "28.0.2", @@ -24762,8 +25723,7 @@ "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 + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" }, "js-yaml": { "version": "3.14.1", @@ -24819,15 +25779,15 @@ "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "dev": true + "dev": true, + "requires": {} } } }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==" }, "json-parse-even-better-errors": { "version": "2.3.1", @@ -24881,8 +25841,7 @@ "json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "jsonfile": { "version": "6.1.0", @@ -25129,15 +26088,10 @@ "dev": true }, "loader-utils": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz", - "integrity": "sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw==", - "dev": true, - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz", + "integrity": "sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw==", + "dev": true }, "locate-path": { "version": "5.0.0", @@ -25209,11 +26163,73 @@ "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", "integrity": "sha512-Sb487aTOCr9drQVL8pIxOzVhafOjZN9UU54hiN8PU3uAiSV7lx1yYNpbNmex2PK6dSJoNTSJUUswT651yww3Mg==" }, + "log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "requires": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.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==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "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==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "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==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "loglevel": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/loglevel/-/loglevel-1.8.1.tgz", "integrity": "sha512-tCRIJM51SHjAayKwC+QAg8hT8vg6z7GSgLJKGvzuPb1Wc+hLzqtuVLxp6/HzSPOozuK+8ErAhy7U/sVzw8Dgfg==" }, + "loupe": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.6.tgz", + "integrity": "sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==", + "requires": { + "get-func-name": "^2.0.0" + } + }, "lru-cache": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", @@ -25239,8 +26255,7 @@ "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 + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==" }, "makeerror": { "version": "1.0.12", @@ -25450,6 +26465,148 @@ "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", "dev": true }, + "mocha": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.2.0.tgz", + "integrity": "sha512-IDY7fl/BecMwFHzoqF2sg/SHHANeBoMMXFlS9r0OXKDssYE1M5O43wUY/9BVPeIvfH2zmEbBfseqN9gBQZzXkg==", + "requires": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.5.3", + "debug": "4.3.4", + "diff": "5.0.0", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.2.0", + "he": "1.2.0", + "js-yaml": "4.1.0", + "log-symbols": "4.1.0", + "minimatch": "5.0.1", + "ms": "2.1.3", + "nanoid": "3.3.3", + "serialize-javascript": "6.0.0", + "strip-json-comments": "3.1.1", + "supports-color": "8.1.1", + "workerpool": "6.2.1", + "yargs": "16.2.0", + "yargs-parser": "20.2.4", + "yargs-unparser": "2.0.0" + }, + "dependencies": { + "argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "glob": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", + "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", + "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" + }, + "dependencies": { + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "requires": { + "brace-expansion": "^1.1.7" + } + } + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "requires": { + "argparse": "^2.0.1" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "requires": { + "p-locate": "^5.0.0" + } + }, + "minimatch": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.0.1.tgz", + "integrity": "sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g==", + "requires": { + "brace-expansion": "^2.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "requires": { + "balanced-match": "^1.0.0" + } + } + } + }, + "ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "nanoid": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.3.tgz", + "integrity": "sha512-p1sjXuopFs0xg+fPASzQ28agW1oHD7xDsd9Xkf3T15H3c/cifrFHVwrh74PdoklAPi+i7MdRsE47vm2r6JoB+w==" + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "requires": { + "p-limit": "^3.0.2" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "requires": { + "has-flag": "^4.0.0" + } + }, + "yargs-parser": { + "version": "20.2.4", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", + "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==" + } + } + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -25583,8 +26740,7 @@ "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 + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==" }, "npm-run-path": { "version": "4.0.1", @@ -25726,7 +26882,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, "requires": { "yocto-queue": "^0.1.0" } @@ -25925,8 +27080,7 @@ "path-exists": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" }, "path-is-absolute": { "version": "1.0.1", @@ -25950,6 +27104,11 @@ "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", "dev": true }, + "pathval": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", + "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==" + }, "pbkdf2": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", @@ -26049,7 +27208,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -26451,7 +27611,6 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, "requires": { "picomatch": "^2.2.1" } @@ -26801,7 +27960,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", - "dev": true, "requires": { "randombytes": "^2.1.0" } @@ -27066,7 +28224,6 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -27112,7 +28269,6 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -27140,20 +28296,19 @@ "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" }, "style-loader": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz", "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==", - "dev": true + "dev": true, + "requires": {} }, "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" } @@ -27540,6 +28695,38 @@ } } }, + "ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "requires": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "dependencies": { + "acorn-walk": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", + "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==" + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==" + } + } + }, "tslib": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", @@ -27592,8 +28779,7 @@ "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 + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, "type-fest": { "version": "0.21.3", @@ -27622,8 +28808,7 @@ "typescript": { "version": "4.9.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.4.tgz", - "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==", - "dev": true + "integrity": "sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==" }, "uint8arrays": { "version": "3.1.0", @@ -27767,6 +28952,11 @@ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true }, + "v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==" + }, "v8-to-istanbul": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.1.tgz", @@ -28303,11 +29493,15 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, + "workerpool": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", + "integrity": "sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw==" + }, "wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -28318,7 +29512,6 @@ "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" } @@ -28327,7 +29520,6 @@ "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" } @@ -28335,8 +29527,7 @@ "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 + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" } } }, @@ -28358,7 +29549,8 @@ "ws": { "version": "7.5.9", "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==" + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "requires": {} }, "xhr": { "version": "2.6.0", @@ -28444,8 +29636,7 @@ "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, "yaeti": { "version": "0.0.6", @@ -28466,7 +29657,6 @@ "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", @@ -28480,8 +29670,7 @@ "yargs-parser": { "version": "20.2.9", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", - "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", - "dev": true + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==" } } }, @@ -28491,11 +29680,38 @@ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true }, + "yargs-unparser": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", + "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", + "requires": { + "camelcase": "^6.0.0", + "decamelize": "^4.0.0", + "flat": "^5.0.2", + "is-plain-obj": "^2.1.0" + }, + "dependencies": { + "camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==" + }, + "decamelize": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", + "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==" + } + } + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==" + }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==" } } } diff --git a/package.json b/package.json index 9378362c..e27206d7 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,14 @@ { "name": "@tokenscript/token-negotiator", - "version": "2.3.0", + "version": "2.4.0", "description": "Token-negotiator a token attestation bridge between web 2.0 and 3.0.", "module": "dist/index.js", "types": "dist/index.d.ts", "files": [ - "dist/" + "dist/", + "README.md", + "CHANGELOG.md", + "LICENSE" ], "scripts": { "build": "npm run clean && npm run write-version-constant && tsc --outDir dist && npm run compile-scss && npm run copy-assets", @@ -21,7 +24,7 @@ "test-watch": "jest --watch", "compile-scss": "sass ./src/theme/style.scss dist/theme/style.css", "compile-scss-umd": "sass ./src/theme/style.scss token-negotiator-dist/theme/style.css", - "write-version-constant": "CURRENT_VERSION=$(node -p \"require('./package.json').version\") && echo \"// modified by build process.\nexport const VERSION = '$CURRENT_VERSION'\" > src/version.ts ", + "write-version-constant": "node scripts/write_version_constant.js", "prepare": "husky install" }, "repository": { @@ -43,7 +46,7 @@ "@tokenscript/attestation": "0.4.1-mw", "@toruslabs/torus-embed": "^1.25.0", "@walletconnect/types": "^2.1.5", - "@walletconnect/universal-provider": "^2.1.5", + "@walletconnect/universal-provider": "^2.4.5", "@walletconnect/web3-provider": "^1.7.1", "ethers": "^5.4.0", "pvutils": "^1.0.17", @@ -72,8 +75,8 @@ "husky": "^8.0.0", "jest": "^28.1.0", "jest-environment-jsdom": "^28.1.0", - "jest-junit": "^14.0.0", - "loader-utils": "^2.0.4", + "jest-junit": "^15.0.0", + "loader-utils": "^3.2.1", "os-browserify": "^0.3.0", "prettier": "^2.8.3", "process": "^0.11.10", diff --git a/scripts/write_version_constant.js b/scripts/write_version_constant.js new file mode 100644 index 00000000..7cc45844 --- /dev/null +++ b/scripts/write_version_constant.js @@ -0,0 +1,16 @@ +#!/usr/bin/env node + +const fs = require("fs"); +const path = require("path"); +const packageJson = require(path.join(__dirname, "..", "package.json")); + +const version = packageJson.version; +const versionContent = `\ +// modified by build process. +export const VERSION = '${version}' +`; + +fs.writeFileSync( + path.join(__dirname, "..", "src", "version.ts"), + versionContent +); diff --git a/src/client/__tests__/client.spec.ts b/src/client/__tests__/client.spec.ts index 4fa91eab..6e17479b 100644 --- a/src/client/__tests__/client.spec.ts +++ b/src/client/__tests__/client.spec.ts @@ -135,19 +135,19 @@ describe('client spec', () => { test('tokenNegotiatorClient method solanaAvailable will return false with no window.solana instance', () => { const tokenNegotiatorClient = getOnChainSolanaConfigClient() - expect(tokenNegotiatorClient.solanaAvailable()).toBe(false) + expect(tokenNegotiatorClient.hasIssuerForBlockchain("solana")).toBe(false) }) test('tokenNegotiatorClient method solanaAvailable should show Solana', () => { const tokenNegotiatorClient = getOnChainSolanaConfigClient() window.solana = jest.fn({ instance: true }) - expect(tokenNegotiatorClient.solanaAvailable()).toBe(true) + expect(tokenNegotiatorClient.hasIssuerForBlockchain("solana")).toBe(true) }) test('tokenNegotiatorClient method solanaAvailable should not show Solana with no required issuer tokens', () => { const tokenNegotiatorClient = getOnChainConfigClient() window.solana = jest.fn({ instance: true }) // - expect(tokenNegotiatorClient.solanaAvailable()).toBe(false) + expect(tokenNegotiatorClient.hasIssuerForBlockchain("solana")).toBe(false) }) test('tokenNegotiatorClient method getWalletProvider', async () => { diff --git a/src/client/index.ts b/src/client/index.ts index 37780928..0d640e57 100644 --- a/src/client/index.ts +++ b/src/client/index.ts @@ -1,6 +1,6 @@ import { OutletAction, OutletResponseAction, Messaging } from './messaging' import { Ui, UiInterface, UItheme } from './ui' -import { logger, requiredParams, waitForElementToExist, errorHandler } from '../utils' +import { logger, requiredParams, waitForElementToExist, errorHandler, removeUrlSearchParams } from '../utils' import { getNftCollection, getNftTokens } from '../utils/token/nftProvider' import { Authenticator } from '@tokenscript/attestation' import { TokenStore } from './tokenStore' @@ -16,7 +16,12 @@ import { EventSenderConnectedWallet, EventSenderDisconnectedWallet, EventSenderError, + EventSenderViewChanged, OnChainIssuer, + EventSenderViewLoaded, + EventSenderOpenedOverlay, + EventSenderClosedOverlay, + EventSenderTokensRefreshed, } from './interface' import { SignedUNChallenge } from './auth/signedUNChallenge' import { TicketZKProof } from './auth/ticketZKProof' @@ -28,6 +33,7 @@ import { Outlet, OutletInterface } from '../outlet' import { shouldUseRedirectMode } from '../utils/support/getBrowserData' import { VERSION } from '../version' import { getFungibleTokenBalances, getFungibleTokensMeta } from '../utils/token/fungibleTokenProvider' +import { URLNS } from '../core/messaging' if (typeof window !== 'undefined') window.tn = { VERSION } @@ -86,6 +92,7 @@ export const defaultConfig: NegotiationInterface = { export const enum UIUpdateEventType { ISSUERS_LOADING, ISSUERS_LOADED, + WALLET_DISCONNECTED, } export enum ClientError { @@ -110,6 +117,7 @@ export class Client { private uiUpdateCallbacks: { [type in UIUpdateEventType] } = { [UIUpdateEventType.ISSUERS_LOADING]: undefined, [UIUpdateEventType.ISSUERS_LOADED]: undefined, + [UIUpdateEventType.WALLET_DISCONNECTED]: undefined, } private urlParams: URLSearchParams @@ -124,6 +132,8 @@ export class Client { let action = this.getDataFromQuery('action') logger(2, `Client() fired. Action = "${action}"`) this.removeCallbackParamsFromUrl() + } else { + this.urlParams = new URLSearchParams() } this.config = this.mergeConfig(defaultConfig, config) @@ -138,7 +148,7 @@ export class Client { } getDataFromQuery(itemKey: any): string { - return this.urlParams ? this.urlParams.get(itemKey) : '' + return this.urlParams ? this.urlParams.get(URLNS + itemKey) : '' } public readProofCallback() { @@ -152,30 +162,17 @@ export class Client { const attest = this.getDataFromQuery('attestation') const error = this.getDataFromQuery('error') - this.removeCallbackFromUrlSearchParams(this.urlParams) - this.emitRedirectProofEvent(issuer, attest, error) } private removeCallbackParamsFromUrl() { let params = new URLSearchParams(document.location.hash.substring(1)) - params = this.removeCallbackFromUrlSearchParams(params) + params = removeUrlSearchParams(params) document.location.hash = '#' + params.toString() } - private removeCallbackFromUrlSearchParams( - params: URLSearchParams, - paramNames: string[] = ['action', 'issuer', 'tokens', 'attestation', 'error'], - ) { - for (let paramName of paramNames) { - if (params.has(paramName)) params.delete(paramName) - } - - return params - } - private registerOutletProofEventListener() { window.addEventListener('auth-callback', (e: CustomEvent) => { this.emitRedirectProofEvent(e.detail.issuer, e.detail.proof, e.detail.error) @@ -241,19 +238,28 @@ export class Client { return this.config.safeConnectOptions !== undefined } - public solanaAvailable() { + public hasIssuerForBlockchain(blockchain: 'evm' | 'solana' | 'flow') { return ( - typeof window.solana !== 'undefined' && - this.config.issuers.filter((issuer: SolanaIssuerConfig) => { - return issuer?.blockchain?.toLowerCase() === 'solana' + this.config.issuers.filter((issuer: OnChainTokenConfig) => { + // EVM should always be active when we have off-chain attestations as it's used for UN challenge signing + if (blockchain === 'evm' && !issuer.onChain) return true + // window.solana must be defined if solana module imported + if (blockchain === 'solana' && typeof window.solana === 'undefined') return false + + // Defaults to evm if blockchain isn't specified and is an onchain token + return (issuer.blockchain ? issuer.blockchain.toLowerCase() : 'evm') === blockchain }).length > 0 ) } + public experimentalFeaturesEnabled(feature: string) { + return this.config.experimentalFeatures && this.config.experimentalFeatures.indexOf(feature) > -1 + } + public async getWalletProvider() { if (!this.web3WalletProvider) { const { Web3WalletProvider } = await import('./../wallet/Web3WalletProvider') - this.web3WalletProvider = new Web3WalletProvider(this, this.config.safeConnectOptions) + this.web3WalletProvider = new Web3WalletProvider(this, this.config.walletOptions, this.config.safeConnectOptions) } return this.web3WalletProvider @@ -265,9 +271,7 @@ export class Client { this.tokenStore.clearCachedTokens() this.eventSender('connected-wallet', null) this.eventSender('disconnected-wallet', null) - if (this.ui) { - this.ui.updateUI('wallet') - } + this.triggerUiUpdateCallback(UIUpdateEventType.WALLET_DISCONNECTED) } async negotiatorConnectToWallet(walletType: string) { @@ -281,6 +285,11 @@ export class Client { } async enrichTokenLookupDataOnChainTokens() { + if (!this.getTokenStore().hasOnChainTokens()) { + this.issuersLoaded = true + return + } + this.issuersLoaded = false this.triggerUiUpdateCallback(UIUpdateEventType.ISSUERS_LOADING) @@ -311,6 +320,7 @@ export class Client { this.tokenStore.updateTokenLookupStore(issuer, lookupData) } } catch (e) { + console.log('enrichTokenLookupDataOnChainTokens error =>', e) logger(2, 'Failed to load contract data for ' + issuer + ': ' + e.message) } } @@ -379,6 +389,8 @@ export class Client { await this.passiveNegotiationStrategy() } + + this.eventSender('loaded', null) } async activeNegotiationStrategy(openPopup: boolean) { @@ -487,7 +499,6 @@ export class Client { let responseTokensEncoded = this.getDataFromQuery('tokens') try { tokens = JSON.parse(responseTokensEncoded) - this.removeCallbackFromUrlSearchParams(this.urlParams) } catch (e) { logger(2, 'Error parse tokens from Response. ', e) } @@ -552,8 +563,6 @@ export class Client { } catch (e) { logger(2, 'Error parse tokens from Response. ', e) } - - this.removeCallbackFromUrlSearchParams(this.urlParams) } } catch (err) { logger(1, 'Error read tokens from URL') @@ -833,17 +842,23 @@ export class Client { } return new Promise((resolve, reject) => { - this.ui.updateUI('wallet', { - connectCallback: async () => { - this.ui.updateUI('main') - try { - let res = await this.authenticate(authRequest) - resolve(res) - } catch (e) { - reject(e) - } + const opt = { viewTransition: 'slide-in-right' } + this.ui.updateUI( + 'wallet', + { + viewName: 'wallet', + connectCallback: async () => { + this.ui.updateUI('main', { viewName: 'main' }, opt) + try { + let res = await this.authenticate(authRequest) + resolve(res) + } catch (e) { + reject(e) + } + }, }, - }) + opt, + ) }) } @@ -853,6 +868,11 @@ export class Client { } // eventSender overrides + async eventSender(eventName: 'loaded', data: EventSenderViewLoaded) + async eventSender(eventName: 'tokens-refreshed', data: EventSenderTokensRefreshed) + async eventSender(eventName: 'closed-overlay', data: EventSenderClosedOverlay) + async eventSender(eventName: 'opened-overlay', data: EventSenderOpenedOverlay) + async eventSender(eventName: 'view-changed', data: EventSenderViewChanged) async eventSender(eventName: 'tokens', data: EventSenderTokens) async eventSender(eventName: 'token-proof', data: EventSenderTokenProof) async eventSender(eventName: 'tokens-selected', data: EventSenderTokensSelected) diff --git a/src/client/interface.ts b/src/client/interface.ts index ebf3e36a..72d17ce6 100644 --- a/src/client/interface.ts +++ b/src/client/interface.ts @@ -3,6 +3,7 @@ import { AuthenticationMethod } from './auth/abstractAuthentication' import { SafeConnectOptions } from '../wallet/SafeConnectProvider' import { BrowserDataInterface } from '../utils/support/isSupported' import { WalletConnection } from '../wallet/Web3WalletProvider' +import { ConnectParams as WCv2ConnectParams } from '@walletconnect/universal-provider/dist/types/types/misc' export interface OffChainTokenConfig extends IssuerConfigInterface { onChain: false @@ -65,6 +66,15 @@ export interface NegotiationInterface { } } noInternetErrorMessage?: string + experimentalFeatures?: string[] + walletOptions?: WalletOptionsInterface +} + +export interface WalletOptionsInterface { + walletConnectV2?: { + chains?: string[] + rpcMap: { [chainId: string]: string } + } } export interface AuthenticateInterface { @@ -79,6 +89,11 @@ export interface AuthenticateInterface { } export type TokenNegotiatorEvents = + | 'view-changed' + | 'tokens-refreshed' + | 'opened-overlay' + | 'closed-overlay' + | 'loaded' | 'token-proof' | 'connected-wallet' | 'disconnected-wallet' @@ -87,6 +102,18 @@ export type TokenNegotiatorEvents = | 'network-change' | 'error' +export interface EventSenderViewLoaded { + data: any +} +export interface EventSenderClosedOverlay { + data: any +} +export interface EventSenderOpenedOverlay { + data: any +} +export interface EventSenderTokensRefreshed { + data: any +} export interface EventSenderTokenProof { issuer: string error: any | null @@ -96,6 +123,11 @@ export interface EventSenderError { issuer: string error: Error } +export interface EventSenderViewChanged { + viewName: string + data: any +} + export interface EventSenderTokensSelected { selectedTokens: Object } diff --git a/src/client/ui.ts b/src/client/ui.ts index e70b0347..b23807d9 100644 --- a/src/client/ui.ts +++ b/src/client/ui.ts @@ -16,6 +16,7 @@ export interface UIOptionsInterface { uiType?: UIType containerElement?: string openingHeading?: string + openingButtonText?: string issuerHeading?: string repeatAction?: string theme?: UItheme @@ -33,7 +34,7 @@ export interface UIOptionsInterface { export interface UiInterface { viewContainer: HTMLElement initialize(): Promise - updateUI(ViewClass: ViewComponent | ViewType, data?: any) + updateUI(ViewClass: ViewComponent | ViewType, data?: any, options?: any) closeOverlay(): void openOverlay(): void togglePopup(): void @@ -56,7 +57,9 @@ export class Ui implements UiInterface {
-
+
+
+
` @@ -68,12 +71,13 @@ export class Ui implements UiInterface { options?: UIOptionsInterface client: Client - popupContainer: any - viewContainer: any - loadContainer: any + popupContainer: HTMLDivElement + transitionContainer: HTMLDivElement + viewContainer: HTMLDivElement + loadContainer: HTMLDivElement currentView: ViewInterface | undefined retryCallback?: Function - retryButton: any + retryButton: HTMLButtonElement private isStartView = true @@ -95,6 +99,7 @@ export class Ui implements UiInterface { this.setTheme(this.options?.theme ?? 'light') + this.transitionContainer = this.popupContainer.querySelector('.transition-wrapper-tn') this.viewContainer = this.popupContainer.querySelector('.view-content-tn') this.loadContainer = this.popupContainer.querySelector('.load-container-tn') this.retryButton = this.loadContainer.querySelector('.dismiss-error-tn') @@ -108,7 +113,7 @@ export class Ui implements UiInterface { } }) - this.updateUI(await this.getStartScreen()) + this.updateUI(await this.getStartScreen(), { viewName: 'start' }) } public getViewFactory(type: ViewType): [ViewComponent, { [key: string]: any }] { @@ -194,7 +199,7 @@ export class Ui implements UiInterface { break case 'inline': - this.popupContainer.innerHTML = Ui.UI_CONTAINER_HTML + this.popupContainer.innerHTML = this.getUIContainer() break } @@ -204,12 +209,14 @@ export class Ui implements UiInterface { if (this.options.uiType === 'inline') return this.popupContainer.classList.add('close') this.popupContainer.classList.remove('open') + this.client.eventSender('closed-overlay', null) } openOverlay() { if (this.options.uiType === 'inline') return // Prevent out-of-popup click from closing the popup straight away setTimeout(() => { + this.client.eventSender('opened-overlay', null) this.popupContainer.classList.add('open') this.popupContainer.classList.remove('close') }, 10) @@ -225,8 +232,8 @@ export class Ui implements UiInterface { } } - updateUI(viewFactory: ViewComponent | ViewType, data?: any) { - let viewOptions = {} + updateUI(viewFactory: ViewComponent | ViewType, data?: any, options?: any) { + let viewOptions: any = {} if (typeof viewFactory === 'string') { this.isStartView = viewFactory === 'start' @@ -238,11 +245,42 @@ export class Ui implements UiInterface { this.isStartView = false } + // Manually specified view options can override ones set in the viewOverrides config + if (options) viewOptions = { ...viewOptions, ...options } + if (!this.viewContainer) { - logger(3, 'Element .overlay-content-tn not found: popup not initialized') + logger(3, 'Element .view-content-tn not found: popup not initialized') return } + // Setup state transition + let transitionClass + let oldViewRef + + const AVAILABLE_TRANSITIONS = ['slide-in-left', 'slide-in-right', 'slide-in-top', 'slide-in-bottom'] + + if (viewOptions?.viewTransition && AVAILABLE_TRANSITIONS.indexOf(viewOptions?.viewTransition) > -1) { + transitionClass = viewOptions?.viewTransition + '-tn' + + // Keep reference to old view for cleanup + oldViewRef = this.viewContainer + + // Inset new view container - add transition class to ensure it's out of frame + const newViewContainer = document.createElement('div') + + this.transitionContainer.classList.add(transitionClass) + newViewContainer.classList.add('view-content-tn') + + if (transitionClass === 'slide-in-left-tn' || transitionClass === 'slide-in-top-tn') { + this.transitionContainer.prepend(newViewContainer) + } else { + this.transitionContainer.appendChild(newViewContainer) + } + + // Set new viewContainer ref + this.viewContainer = newViewContainer + } + // @ts-ignore this.currentView = new viewFactory(this.client, this, this.viewContainer, { options: this.options, @@ -250,7 +288,28 @@ export class Ui implements UiInterface { data: data, }) + let viewName = typeof viewFactory === 'string' ? viewFactory : '' + if (!viewName && data?.viewName) viewName = data.viewName + + this.client.eventSender('view-changed', { viewName, data }) + this.currentView.render() + + if (transitionClass) { + // TODO: the transitionend event doesn't seem to be reliable + // sometimes it doesn't fire when a window is out of focus - see if there's a solution + // this.transitionContainer.addEventListener('transitionend', () => { + setTimeout(() => { + // Remove old viewContainer + oldViewRef.remove() + + // Remove transition classes from active viewContainer + this.transitionContainer.classList.remove('slide-in', transitionClass) + }, 300) + + // Add transition start class into viewport to start animation + this.transitionContainer.classList.add('slide-in') + } } viewIsNotStart() { @@ -269,7 +328,9 @@ export class Ui implements UiInterface { if (error === ClientError.USER_ABORT) return this.dismissLoader() } - this.loadContainer.querySelector('.loader-tn').style.display = 'none' + const loader = this.loadContainer.querySelector('.loader-tn') as HTMLDivElement + loader.style.display = 'none' + this.retryButton.style.display = 'block' this.loadContainer.querySelector('.loader-msg-tn').innerHTML = error @@ -277,7 +338,8 @@ export class Ui implements UiInterface { this.loadContainer.style.display = 'flex' if (!canDismiss) { - this.loadContainer.querySelector('.dismiss-error-tn').style.display = 'none' + const dismissBtn = this.loadContainer.querySelector('.dismiss-error-tn') as HTMLDivElement + dismissBtn.style.display = 'none' } } @@ -306,9 +368,10 @@ export class Ui implements UiInterface { showLoader(...message: string[]) { this.cancelDelayedLoader() - - this.loadContainer.querySelector('.loader-tn').style.display = 'block' - this.loadContainer.querySelector('.dismiss-error-tn').style.display = 'none' + const loader = this.loadContainer.querySelector('.loader-tn') as HTMLDivElement + loader.style.display = 'block' + const dismissBtn = this.loadContainer.querySelector('.dismiss-error-tn') as HTMLDivElement + dismissBtn.style.display = 'none' this.loadContainer.querySelector('.loader-msg-tn').innerHTML = message.join('\n') diff --git a/src/client/views/select-issuers.ts b/src/client/views/select-issuers.ts index 289689e3..004aae6a 100644 --- a/src/client/views/select-issuers.ts +++ b/src/client/views/select-issuers.ts @@ -1,5 +1,5 @@ import { AbstractView } from './view-interface' -import { TokenListItemInterface, TokenList } from './token-list' +import { TokenList, TokenListItemInterface } from './token-list' import { IconView } from './icon-view' import { logger } from '../../utils' import { UIUpdateEventType } from '../index' @@ -20,6 +20,14 @@ export class SelectIssuers extends AbstractView { this.client.cancelTokenAutoload() this.render() }) + + this.client.registerUiUpdateCallback(UIUpdateEventType.WALLET_DISCONNECTED, () => { + if (this.client.getTokenStore().hasOnChainTokens()) { + this.ui.updateUI('wallet', { viewName: 'wallet' }, { viewTransition: 'slide-in-left' }) + } else { + this.ui.updateUI('start', { viewName: 'start' }, { viewTransition: 'slide-in-left' }) + } + }) } render() { @@ -35,29 +43,29 @@ export class SelectIssuers extends AbstractView {

${this.params.options.issuerHeading}

-
- - -
+
+ + +
${this.getCustomContent()}
- + @@ -121,27 +260,28 @@ export class SelectWallet extends AbstractView { async connectWallet(e: any) { let wallet: any = e.currentTarget.dataset.wallet + let walletlabel: string = e.currentTarget.dataset.walletlabel + walletlabel = walletlabel ?? wallet logger(2, 'Connect wallet: ' + wallet) this.ui.showLoaderDelayed( - ['

Connecting to ' + wallet + '...

', 'You may need to unlock your wallet to continue.'], + [ + '

Connecting to ' + walletlabel + '...

', + 'You may need to unlock your wallet to continue.', + ], 500, ) try { await this.client.negotiatorConnectToWallet(wallet) - - if (wallet !== 'Flow') { - this.ui.dismissLoader() - - if (this.params?.data?.connectCallback) { - this.params?.data?.connectCallback() - } else { - // TODO: It may be better/faster to fire this on view load. - this.client.enrichTokenLookupDataOnChainTokens() - this.ui.updateUI('main') - } + this.ui.dismissLoader() + if (this.params?.data?.connectCallback) { + this.params?.data?.connectCallback() + } else { + // TODO: It may be better/faster to fire this on view load. + this.client.enrichTokenLookupDataOnChainTokens() + this.ui.updateUI('main', { viewName: 'main' }, { viewTransition: 'slide-in-right' }) } } catch (err: any) { this.ui.showError(err) diff --git a/src/client/views/start.ts b/src/client/views/start.ts index e2c7e53c..0a22796d 100644 --- a/src/client/views/start.ts +++ b/src/client/views/start.ts @@ -13,7 +13,7 @@ export class Start extends AbstractView {
${this.params.options.openingHeading}
@@ -24,12 +24,13 @@ export class Start extends AbstractView { async goToWalletSelection() { this.ui.showLoaderDelayed(['Initializing wallet..'], 500) + const opt = { viewTransition: 'slide-in-right' } if (await this.ui.canSkipWalletSelection()) { this.client.enrichTokenLookupDataOnChainTokens() - this.ui.updateUI('main') + this.ui.updateUI('main', { viewName: 'main' }, opt) } else { - this.ui.updateUI('wallet') + this.ui.updateUI('wallet', { viewName: 'main' }, opt) } this.ui.dismissLoader() diff --git a/src/client/views/token-list.ts b/src/client/views/token-list.ts index 4b82ad74..faecd7c5 100644 --- a/src/client/views/token-list.ts +++ b/src/client/views/token-list.ts @@ -62,15 +62,15 @@ export class TokenList extends AbstractView { getTokenListItems() { let html = '' - let newCount = Math.min(this.loadedCount + this.numberToLoad, this.params.tokens.length) + let newCount = Math.min(this.loadedCount + this.numberToLoad, this.params.data.tokens.length) for (let i: number = this.loadedCount; i < newCount; i++) { - html += this.createTokenMarkup(this.params.tokens[i]) + html += this.createTokenMarkup(this.params.data.tokens[i]) } this.loadedCount = newCount - if (this.loadedCount < this.params.tokens.length) html += this.createLoadMoreMarkup() + if (this.loadedCount < this.params.data.tokens.length) html += this.createLoadMoreMarkup() return html } diff --git a/src/client/views/view-interface.ts b/src/client/views/view-interface.ts index 00a67959..a777c114 100644 --- a/src/client/views/view-interface.ts +++ b/src/client/views/view-interface.ts @@ -1,5 +1,5 @@ import { Client } from '../index' -import { Ui } from '../ui' +import { Ui, UIOptionsInterface } from '../ui' export interface ViewConstructor { new (client: Client, popup: Ui, viewContainer: any, params: any): T @@ -12,20 +12,26 @@ export type ViewComponent = ViewFactory | ViewConstructor export interface ViewInterface { client: Client ui: Ui - viewContainer: any - params: any + viewContainer: HTMLDivElement | any + params: IViewParameters render(): void init(): void - update(params: any): void + update(params: IViewParameters): void +} + +export interface IViewParameters { + options: UIOptionsInterface | any + viewOptions: any + data?: any } export abstract class AbstractView implements ViewInterface { client: Client ui: Ui - viewContainer: any - params: any = {} + viewContainer: HTMLDivElement | any + params: IViewParameters - constructor(client: Client, popup: Ui, viewContainer: any, params: any) { + constructor(client: Client, popup: Ui, viewContainer: HTMLDivElement | any, params: IViewParameters) { this.client = client this.ui = popup this.viewContainer = viewContainer @@ -35,13 +41,13 @@ export abstract class AbstractView implements ViewInterface { // eslint-disable-next-line @typescript-eslint/no-empty-function public init(): void { - /* TODO document why this method 'init' is empty */ + // Init can be used to implement extra constructor code without overriding the constructor } abstract render(): void - public update(params: any): void { - this.params = params + public update(params: Partial): void { + this.params = { ...this.params, ...params } this.render() } } diff --git a/src/core/__tests__/core.spec.ts b/src/core/__tests__/core.spec.ts index d3328503..2dd052b1 100644 --- a/src/core/__tests__/core.spec.ts +++ b/src/core/__tests__/core.spec.ts @@ -2,7 +2,7 @@ import { SignedDevconTicket } from '@tokenscript/attestation/dist/asn1/shemas/SignedDevconTicket' -import { filterTokens, readTokens, decodeTokens, storeMagicURL, readMagicUrl, ethKeyIsValid } from './../index' +import { filterTokens, readTokens, decodeTokens, storeMagicURL, readTokenFromMagicUrl, ethKeyIsValid } from './../index' import { readSignedTicket } from '../../outlet' // const mockToken = `?ticket="MIGWMA0MATYCBWE3ap3-AgEABEEEKJZVxMEXbkSZZBWnNUTX_5ieu8GUqf0bx_a0tBPF6QYskABaMJBYhDOXsmQt3csk_TfMZ2wdmfRkK7ePCOI2kgNCAOOZKRpcE6tLBuPbfE_SmwPk2wNjbj5vpa6kkD7eqQXvBOCa0WNo8dEHKvipeUGZZEWWjJKxooB44dEYdQO70Vgc"&secret=45845870684&id="mah@mah.com"` @@ -113,23 +113,13 @@ describe('core Spec', () => { // Jest Test onerror // https://stackoverflow.com/questions/28584773/xmlhttprequest-testing-in-jest - test('expect to read new magic link', () => { + test('expect to read token from a magic link', () => { window.history.pushState( {}, 'Test Title', '/?ticket=MIGSMAkMATkCAQUCAQwEQQQsUB1tp0mEn0Zoc8Lu-c0ZJOHis3ynlUAuplV8jpJhMgGMuP4i2msZihJq0VeBBOhGLU-vhfkn_0DYsJ9J8djgA0IAScs-3TwdMQ6XSIu1z1nDRCWEzAMBWaVEHONiRlW0j5kTEXBKvgNHS5DsjGm2S84BKqHl3qucBHUOGjpt-6hEuxw=&secret=285996413010999512790264856198259265088323878963947294417758116344175800611&id=nicktaras83@gmail.com', ) - readMagicUrl('ticket', 'secret', 'id', 'dcTokens') + const token = readTokenFromMagicUrl('ticket', 'secret', 'id') + expect(token.id).toEqual('nicktaras83@gmail.com') }) - - test('expect to re-read magic link which is not pushed to state', () => { - window.history.pushState( - {}, - 'Test Title', - '/?ticket=MIGSMAkMATkCAQUCAQwEQQQsUB1tp0mEn0Zoc8Lu-c0ZJOHis3ynlUAuplV8jpJhMgGMuP4i2msZihJq0VeBBOhGLU-vhfkn_0DYsJ9J8djgA0IAScs-3TwdMQ6XSIu1z1nDRCWEzAMBWaVEHONiRlW0j5kTEXBKvgNHS5DsjGm2S84BKqHl3qucBHUOGjpt-6hEuxw=&secret=285996413010999512790264856198259265088323878963947294417758116344175800611&id=nicktaras83@gmail.com', - ) - readMagicUrl('ticket', 'secret', 'id', 'dcTokens') - // try to add again. This time it will exist and not be added to array. - readMagicUrl('ticket', 'secret', 'id', 'dcTokens') - }) -}) +}) \ No newline at end of file diff --git a/src/core/index.ts b/src/core/index.ts index 2ba362d5..7d1e2a44 100644 --- a/src/core/index.ts +++ b/src/core/index.ts @@ -1,16 +1,32 @@ import { base64ToUint8array, compareObjects } from '../utils/index' +import { OutletInterface } from '../outlet' + +export interface OffChainTokenData { + token: string + secret: string + id: string + magic_link: string +} + +export interface DecodedToken { + devconId: string + ticketIdNumber?: string + ticketIdString?: number + ticketClass: number + commitment: Uint8Array +} interface FilterInterface { [key: string]: any } -export const filterTokens = (decodedTokens: any, filter: FilterInterface = []) => { - let res: any = [] +export const filterTokens = (decodedTokens: DecodedToken[], filter: FilterInterface = {}) => { + let res: DecodedToken[] = [] if (decodedTokens.length && typeof filter === 'object' && Object.keys(filter).length) { let filterKeys = Object.keys(filter) - decodedTokens.forEach((token: any) => { + decodedTokens.forEach((token: DecodedToken) => { let fitFilter = 1 filterKeys.forEach((key) => { @@ -26,19 +42,23 @@ export const filterTokens = (decodedTokens: any, filter: FilterInterface = []) = } } -export const readTokens = (itemStorageKey: any) => { +export const readTokens = (itemStorageKey: string) => { const storageTickets = localStorage.getItem(itemStorageKey) - let tokens: any = [] + let tokens: OffChainTokenData[] = [] - let output: any = { tokens: [], noTokens: true, success: true } + let output: { tokens: OffChainTokenData[]; noTokens: boolean; success: boolean } = { + tokens: [], + noTokens: true, + success: true, + } try { if (storageTickets && storageTickets.length) { tokens = JSON.parse(storageTickets) if (tokens.length !== 0) { - tokens.forEach((item: any) => { + tokens.forEach((item: OffChainTokenData) => { if (item.token && item.secret) output.tokens.push(item) }) } @@ -55,7 +75,7 @@ export const readTokens = (itemStorageKey: any) => { } export const decodeTokens = ( - rawTokens: any, + rawTokens: string, tokenParser: any, unsignedTokenDataName: string, includeSignedToken = false, @@ -65,15 +85,7 @@ export const decodeTokens = ( if (x.length) { return x.map((tokenData: any) => { if (tokenData.token) { - let decodedToken = new tokenParser(base64ToUint8array(tokenData.token).buffer) - - if (decodedToken && decodedToken[unsignedTokenDataName]) { - let token = decodedToken[unsignedTokenDataName] - - token = propsArrayBufferToArray(token) - - return includeSignedToken ? { signedToken: tokenData.token, ...token } : token - } + return decodeToken(tokenData, tokenParser, unsignedTokenDataName, includeSignedToken) } }) } else { @@ -81,7 +93,26 @@ export const decodeTokens = ( } } -function propsArrayBufferToArray(obj: any) { +export const decodeToken = ( + tokenData: OffChainTokenData, + tokenParser: any, + unsignedTokenDataName: string, + includeSignedToken = false, +) => { + if (tokenData.token) { + let decodedToken = new tokenParser(base64ToUint8array(tokenData.token).buffer) + + if (decodedToken && decodedToken[unsignedTokenDataName]) { + let token = decodedToken[unsignedTokenDataName] + + token = propsArrayBufferToArray(token) + + return includeSignedToken ? { signedToken: tokenData.token, ...token } : token + } + } +} + +function propsArrayBufferToArray(obj: { [key: string]: any }) { Object.keys(obj).forEach((key) => { if (obj[key] instanceof ArrayBuffer) { obj[key] = Array.from(new Uint8Array(obj[key])) @@ -90,19 +121,18 @@ function propsArrayBufferToArray(obj: any) { return obj } -export const storeMagicURL = (tokens: any, itemStorageKey: string) => { +export const storeMagicURL = (tokens: OffChainTokenData[], itemStorageKey: string) => { if (tokens) { localStorage.setItem(itemStorageKey, JSON.stringify(tokens)) } } -export const readMagicUrl = ( +export const readTokenFromMagicUrl = ( tokenUrlName: string, tokenSecretName: string, tokenIdName: string, - itemStorageKey: string, urlParams: URLSearchParams | null = null, -) => { +): OffChainTokenData => { if (urlParams === null) urlParams = new URLSearchParams(window.location.search) const tokenFromQuery = urlParams.get(tokenUrlName) @@ -114,40 +144,15 @@ export const readMagicUrl = ( if (!(tokenFromQuery && secretFromQuery)) throw new Error('Incomplete token params in URL.') - let tokensOutput = readTokens(itemStorageKey) - - let isNewQueryTicket = true - - // TODO: use loop here instead - let tokens = tokensOutput.tokens.map((tokenData: any) => { - if (tokenData.token === tokenFromQuery) { - isNewQueryTicket = false - } - - return tokenData - }) - - if (isNewQueryTicket) { - tokens.push({ - token: tokenFromQuery, - secret: secretFromQuery, - id: decodeURIComponent(idFromQuery), - magic_link: window.location.href, - }) - return tokens + return { + token: tokenFromQuery, + secret: secretFromQuery, + id: decodeURIComponent(idFromQuery), + magic_link: window.location.href, } - - throw new Error('Token already added.') } -export const rawTokenCheck = async (unsignedToken: any, tokenIssuer: any) => { - // currently meta mask is needed to move beyond this point. - // however the err msg given is not obvious that this is the issue. - - // metamask is only one of the wallets, we have to use walletConnect to - // check if user have some wallet immediately before use wallet - // requiredParams(window.ethereum, "Please install metamask to continue."); - +export const rawTokenCheck = async (unsignedToken: DecodedToken, tokenIssuer: OutletInterface) => { let rawTokenData = getRawToken(unsignedToken, tokenIssuer) if (!rawTokenData) return null @@ -179,7 +184,7 @@ export const rawTokenCheck = async (unsignedToken: any, tokenIssuer: any) => { return tokenObj } -export const getRawToken = (unsignedToken: any, tokenIssuer: any) => { +export const getRawToken = (unsignedToken: DecodedToken, tokenIssuer: OutletInterface): OffChainTokenData => { if (!unsignedToken || !Object.keys(unsignedToken).length) return let tokensOutput = readTokens(tokenIssuer.itemStorageKey) @@ -190,7 +195,7 @@ export const getRawToken = (unsignedToken: any, tokenIssuer: any) => { let token = {} if (rawTokens.length) { - rawTokens.forEach((tokenData: any) => { + rawTokens.forEach((tokenData: OffChainTokenData) => { if (tokenData.token) { const _tokenParser = tokenIssuer.tokenParser @@ -208,7 +213,7 @@ export const getRawToken = (unsignedToken: any, tokenIssuer: any) => { }) } - return token + return token as OffChainTokenData } return null diff --git a/src/core/messaging.ts b/src/core/messaging.ts index 41e251c2..04844924 100644 --- a/src/core/messaging.ts +++ b/src/core/messaging.ts @@ -34,6 +34,9 @@ declare global { } } +/* URL namespace is used to avoid possible collisions with URL parameter names */ +export const URLNS = 'tn-' + export class Messaging { iframeStorageSupport: null | boolean = null iframe: any = null @@ -83,7 +86,7 @@ export class Messaging { let id = Messaging.getUniqueEventId() const url = this.constructUrl(id, request) - let newLocation = `${url}&redirect=true&requestor=${encodeURIComponent(redirectUrl)}` + let newLocation = `${url}&${URLNS}redirect=true&${URLNS}requestor=${encodeURIComponent(redirectUrl)}` logger(2, `redirect from ${document.location.href} to ${newLocation}`) @@ -273,12 +276,14 @@ export class Messaging { } } + // TODO: Use URLSearchParams object to build this query rather than manually constructing it + // This will prevent edge-case encoding issues. private constructUrl(id: any, request: RequestInterfaceBase) { - let url = `${request.origin}#evtid=${id}&action=${request.action}` + let url = `${request.origin}#${URLNS}evtid=${id}&${URLNS}action=${request.action}` // in request to Outlet() to get tokens we dont have any token if (typeof request.data.token !== 'undefined') { - url += `&token=${encodeURIComponent(JSON.stringify(request.data.token))}` + url += `&${URLNS}token=${encodeURIComponent(JSON.stringify(request.data.token))}` } for (let key in request.data) { @@ -286,17 +291,17 @@ export class Messaging { // no sense to send issuer config. Outlet() use own config, // it can be dangerous if Outlet beleive to external config from URL HASH - if (key === 'issuer') continue + if (key === 'issuer' || key === 'token') continue if (!value) continue if (value instanceof Array || value instanceof Object) { - url += `&${key}=${JSON.stringify(value)}` + url += `&${URLNS}${key}=${JSON.stringify(value)}` } else { if (key === 'urlParams') { url += `&${value}` } else { - url += `&${key}=${value}` + url += `&${URLNS}${key}=${value}` } } } diff --git a/src/outlet/__tests__/outlet.spec.ts b/src/outlet/__tests__/outlet.spec.ts index 7e4e35e4..86e621db 100644 --- a/src/outlet/__tests__/outlet.spec.ts +++ b/src/outlet/__tests__/outlet.spec.ts @@ -1,17 +1,58 @@ import { Outlet } from '../index' - /* TODO: Find a solution for TypeError: Cannot convert a BigInt value to a number at Math.pow () Thrown by import {Authenticator} from '@tokenscript/attestation' due to @tokenscript/attestation/src/libs/Point.ts */ -describe('Outlet spec', () => { - test('placeholder test', () => { +// @ts-ignore +const outlet = new Outlet({ + collectionID: 'devcon', + title: 'Devcon', + tokenOrigin: 'http://localhost:3002/', + attestationOrigin: 'https://test.attestation.id/', + base64senderPublicKeys: { + '6': 'MIIBMzCB7AYHKoZIzj0CATCB4AIBATAsBgcqhkjOPQEBAiEA/////////////////////////////////////v///C8wRAQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBEEEeb5mfvncu6xVoGKVzocLBwKb/NstzijZWfKBWxb4F5hIOtp3JqPEZV2k+/wOEQio/Re0SKaFVBmcR9CP+xDUuAIhAP////////////////////66rtzmr0igO7/SXozQNkFBAgEBA0IABGMxHraqggr2keTXszIcchTjYjH5WXpDaBOYgXva82mKcGnKgGRORXSmcjWN2suUCMkLQj3UNlZCFWF10wIrrlw=', + }, + base64attestorPubKey: + 'MIIBMzCB7AYHKoZIzj0CATCB4AIBATAsBgcqhkjOPQEBAiEA/////////////////////////////////////v///C8wRAQgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHBEEEeb5mfvncu6xVoGKVzocLBwKb/NstzijZWfKBWxb4F5hIOtp3JqPEZV2k+/wOEQio/Re0SKaFVBmcR9CP+xDUuAIhAP////////////////////66rtzmr0igO7/SXozQNkFBAgEBA0IABL+y43T1OJFScEep69/yTqpqnV/jzONz9Sp4TEHyAJ7IPN9+GHweCX1hT4OFxt152sBN3jJc1s0Ymzd8pNGZNoQ=', +}) + +describe('Test magic link token merging', () => { + // TicketId: 1235; Email 1 + const ticket1 = { + token: + 'MIGTME0MATYCAgTTAgEBBEEELP0-vySEqJgldcvPSwL5VH_Bjta--7eHQafKwrwvH5MaPlOxSUqRtPf4GLs73BRJy-shtne8OV5C2e4-6qf5ggNCAEBVl-qTKHcKDKyjNszQ2NOOHS78dp56zQ6kWxxP2R4bE8-ZQs_zfTUS_HcNaLvyrsiil9ihndmcYD32Traiyscc', + id: '1', + secret: '1', + magic_link: '', + } + // TicketId: 1235; Email 2 + const ticket2 = { + token: + 'MIGTME0MATYCAgTTAgEBBEEEDjlqyo764Y_sfQFUVOLrk6BN6RB7NDJuoxNL07aa13UPBrUh9mgF0Itge2EolzZkCXIN0mlHo0PhTIHhWMsOIwNCAIGsxXnRlAZb8ihGQo5CXnq1Gxui7ELcM0gKfR8EDnmNdGOGNLxjJdAuLRPyUuek9uuShQbkR-acpKsmlW86g_kb', + id: '2', + secret: '1', + magic_link: '', + } + // TicketId: 1236; Email 1 + const ticket3 = { + token: + 'MIGTME0MATYCAgTUAgECBEEELP0-vySEqJgldcvPSwL5VH_Bjta--7eHQafKwrwvH5MaPlOxSUqRtPf4GLs73BRJy-shtne8OV5C2e4-6qf5ggNCAHJ4nMSLoDSshkso5w1MDup5fWBIt1mCByU2HVf8uu_5eIhXM6fpkQq3Uyr7m0VxcYK3eehaaPLOqnPId9teDYIb', + id: '1', + secret: '1', + magic_link: '', + } + + test('Expect new attestation to be added', () => { + const tokens = outlet.mergeNewToken(ticket3, [ticket1]) as any[] + expect(tokens.length).toBe(2) + }) + test('Expect existing attestation with same ID to be overwritten', () => { + const tokens = outlet.mergeNewToken(ticket2, [ticket1]) as any[] expect(true).toBe(true) }) - - // test('Create outlet from token name', () => { - // const outlet = new Outlet({ config: {tokenName: 'devcon-remote'}}); - // console.log(outlet); - // }); + test('Expect duplicate attestation to be skipped', () => { + const tokens = outlet.mergeNewToken(ticket1, [ticket1]) + expect(tokens).toBe(false) + }) }) diff --git a/src/outlet/auth-handler.ts b/src/outlet/auth-handler.ts index 4d8c7ad5..1cb5d58b 100644 --- a/src/outlet/auth-handler.ts +++ b/src/outlet/auth-handler.ts @@ -1,10 +1,10 @@ // @ts-nocheck -import { ResponseActionBase } from '../core/messaging' +import { ResponseActionBase, URLNS } from '../core/messaging' import { OutletAction } from '../client/messaging' import { Outlet, OutletInterface } from './index' import { Authenticator } from '@tokenscript/attestation' -import { logger } from '../utils' +import { logger, removeUrlSearchParams } from '../utils' import { isBrave, isMacOrIOS } from '../utils/support/getBrowserData' export interface DevconToken { @@ -241,18 +241,28 @@ export class AuthHandler { if (this.redirectUrl) { const curParams = new URLSearchParams(document.location.hash.substring(1)) + // Request parameters for attestation.id const params = new URLSearchParams() - params.set('action', OutletAction.EMAIL_ATTEST_CALLBACK) params.set('email', this.email) params.set('address', this.address) params.set('wallet', this.wallet) - params.set('issuer', this.tokenDef.collectionID) - params.set('token', JSON.stringify(this.unsignedToken)) - params.set('email-attestation-callback', this.redirectUrl) - const requestor = curParams.get('requestor') + // Add extra params that will be required for the Attestation.id -> Outlet callback URL + const callbackUrl = new URL(this.redirectUrl) + const callbackParams = removeUrlSearchParams(new URLSearchParams(callbackUrl.hash.substring(1))) + callbackParams.set(URLNS + 'action', OutletAction.EMAIL_ATTEST_CALLBACK) + callbackParams.set(URLNS + 'issuer', this.tokenDef.collectionID) + callbackParams.set(URLNS + 'token', JSON.stringify(this.unsignedToken)) + + // Outlet -> Client callback + const requestor = curParams.get(URLNS + 'requestor') + if (requestor) { + callbackParams.set(URLNS + 'requestor', requestor) + } + + callbackUrl.hash = callbackParams.toString() - if (requestor) params.set('requestor', requestor) + params.set('email-attestation-callback', callbackUrl.href) const goto = `${this.attestationOrigin}#${params.toString()}` logger(2, 'authenticate. go to: ', goto) @@ -294,7 +304,7 @@ export class AuthHandler { iframe.src = this.attestationOrigin ?? '' iframe.style.width = '800px' - iframe.style.height = '700px' + iframe.style.height = '800px' iframe.style.maxWidth = '100%' iframe.style.background = '#fff' @@ -302,7 +312,7 @@ export class AuthHandler { this.iframeWrap = iframeWrap iframeWrap.setAttribute( 'style', - 'width:100%;min-height: 100vh; position: fixed; align-items: center; justify-content: center;display: none;top: 0; left: 0; background: #fffa', + 'width:101%;min-height: 100vh; position: fixed; align-items: center; justify-content: center;display: none;top: 0; left: 0; background: #fffa', ) iframeWrap.appendChild(iframe) diff --git a/src/outlet/index.ts b/src/outlet/index.ts index c1e8f4ca..943474c6 100644 --- a/src/outlet/index.ts +++ b/src/outlet/index.ts @@ -1,11 +1,21 @@ -import { rawTokenCheck, readMagicUrl, storeMagicURL, decodeTokens, filterTokens } from '../core' -import { logger, requiredParams, uint8toBuffer } from '../utils' +import { + rawTokenCheck, + readTokenFromMagicUrl, + storeMagicURL, + decodeTokens, + decodeToken, + filterTokens, + readTokens, + OffChainTokenData, + DecodedToken, +} from '../core' +import { logger, requiredParams, uint8toBuffer, removeUrlSearchParams } from '../utils' import { OutletAction, OutletResponseAction } from '../client/messaging' import { AuthHandler } from './auth-handler' // requred for default TicketDecoder. import { SignedDevconTicket } from '@tokenscript/attestation/dist/asn1/shemas/SignedDevconTicket' import { AsnParser } from '@peculiar/asn1-schema' -import { ResponseActionBase, ResponseInterfaceBase } from '../core/messaging' +import { ResponseActionBase, ResponseInterfaceBase, URLNS } from '../core/messaging' export interface OutletInterface { collectionID: string @@ -90,9 +100,9 @@ export class Outlet { } } - getDataFromQuery(itemKey: any): string { - const val = this.urlParams ? this.urlParams.get(itemKey) : '' - return val ? val : '' + getDataFromQuery(itemKey: string, namespaced = true): string { + itemKey = (namespaced ? URLNS : '') + itemKey + return this.urlParams ? this.urlParams.get(itemKey) : '' } getFilter() { @@ -134,8 +144,10 @@ export class Outlet { try { const tokenString = this.getDataFromQuery('token') let token = JSON.parse(tokenString) - const attestationBlob = this.getDataFromQuery('attestation') - const attestationSecret = '0x' + this.getDataFromQuery('requestSecret') + + // Note: these params come from attestation.id and are not namespaced + const attestationBlob = this.getDataFromQuery('attestation', false) + const attestationSecret = '0x' + this.getDataFromQuery('requestSecret', false) let authHandler = new AuthHandler( this, @@ -153,21 +165,24 @@ export class Outlet { // re-direct back to origin if (requesterURL) { const params = new URLSearchParams(requesterURL.hash.substring(1)) - params.set('action', 'proof-callback') - params.set('issuer', issuer) - params.set('attestation', useToken as string) + params.set(URLNS + 'action', 'proof-callback') + params.set(URLNS + 'issuer', issuer) + params.set(URLNS + 'attestation', useToken as string) + + // TODO: Remove once https://github.com/AlphaWallet/attestation.id/pull/196 is merged + params.delete('email') + params.delete('#email') // add tokens to avoid redirect loop // when use redirect to get tokens - let outlet = new Outlet(this.tokenConfig, true) let issuerTokens = outlet.prepareTokenOutput({}) logger(2, 'issuerTokens: ', issuerTokens) - params.set('tokens', JSON.stringify(issuerTokens)) + params.set(URLNS + 'tokens', JSON.stringify(issuerTokens)) - requesterURL.hash = '#' + params.toString() + requesterURL.hash = params.toString() console.log('urlToRedirect from OutletAction.EMAIL_ATTEST_CALLBACK: ', requesterURL.href) @@ -184,7 +199,12 @@ export class Outlet { this.dispatchAuthCallbackEvent(issuer, null, e.message) } - document.location.hash = '' + document.location.hash = removeUrlSearchParams(this.urlParams, [ + 'attestation', + 'requestSecret', + 'address', + 'wallet', + ]).toString() break } @@ -201,14 +221,16 @@ export class Outlet { // store local storage item that can be later used to check if third party cookies are allowed. // Note: This test can only be performed when the localstorage / cookie is assigned, then later requested. /* localStorage.setItem("cookie-support-check", "test"); - this.sendCookieCheck(evtid);*/ + this.sendCookieCheck(evtid);*/ + // TODO: Remove singleUse - this is only needed in negotiator that calls readMagicLink. + // move single link somewhere that it can be used by both Outlet & LocalOutlet if (!this.singleUse) { + await this.whitelistCheck(evtid, 'write') await this.readMagicLink() + this.sendTokens(evtid) } - this.sendTokens(evtid) - break } } @@ -219,16 +241,17 @@ export class Outlet { } public async readMagicLink() { - const evtid = this.getDataFromQuery('evtid') - const { tokenUrlName, tokenSecretName, tokenIdName, itemStorageKey } = this.tokenConfig try { - const tokens = readMagicUrl(tokenUrlName, tokenSecretName, tokenIdName, itemStorageKey, this.urlParams) + const newToken = readTokenFromMagicUrl(tokenUrlName, tokenSecretName, tokenIdName, this.urlParams) + let tokensOutput = readTokens(itemStorageKey) - await this.whitelistCheck(evtid, 'write') + const newTokens = this.mergeNewToken(newToken, tokensOutput.tokens) - storeMagicURL(tokens, itemStorageKey) + if (newTokens !== false) { + storeMagicURL(newTokens, itemStorageKey) + } const event = new Event('tokensupdated') @@ -240,6 +263,56 @@ export class Outlet { } } + /** + * Merges a new magic link into the existing token data. If a token is found with the same ID it is overwritten. + * @private + * @returns false when no changes to the data are required - the token is already added + */ + public mergeNewToken(newToken: OffChainTokenData, existingTokens: OffChainTokenData[]): OffChainTokenData[] | false { + const decodedNewToken = decodeToken( + newToken, + this.tokenConfig.tokenParser, + this.tokenConfig.unsignedTokenDataName, + false, + ) + + const newTokenId = this.getUniqueTokenId(decodedNewToken) + + for (const [index, tokenData] of existingTokens.entries()) { + // Nothing required, this token already exists + if (tokenData.token === newToken.token) { + return false + } + + const decodedTokenData = decodeToken( + tokenData, + this.tokenConfig.tokenParser, + this.tokenConfig.unsignedTokenDataName, + false, + ) + + const tokenId = this.getUniqueTokenId(decodedTokenData) + + // Overwrite existing token + if (newTokenId === tokenId) { + existingTokens[index] = newToken + return existingTokens + } + } + + // Add as new token + existingTokens.push(newToken) + return existingTokens + } + + /** + * Calculates a unique token ID to identify this ticket. Tickets can be reissued and have a different commitment, but are still the same token + * @private + */ + private getUniqueTokenId(decodedToken: DecodedToken) { + return `${decodedToken.devconId}-${decodedToken.ticketIdNumber ?? decodedToken.ticketIdString}` + } + private dispatchAuthCallbackEvent(issuer: string, proof?: string, error?: string) { const event = new CustomEvent('auth-callback', { detail: { @@ -371,6 +444,7 @@ export class Outlet { includeSigned, ) + // remove duplicates check return filterTokens(decodedTokens, filter) } @@ -379,10 +453,7 @@ export class Outlet { const unsignedToken = JSON.parse(token) - const redirect = - this.urlParams.get('redirect') === 'true' - ? document.location.origin + document.location.pathname + document.location.search - : false + const redirect = this.getDataFromQuery('redirect') === 'true' ? document.location.href : false try { // check if token issuer @@ -430,6 +501,7 @@ export class Outlet { } } + // TODO: Consolidate redirect callback for tokens, proof & errors into the sendMessageResponse function to remove duplication private sendTokens(evtid: any) { let issuerTokens = this.prepareTokenOutput(this.getFilter()) @@ -440,9 +512,9 @@ export class Outlet { let url = this.redirectCallbackUrl const params = new URLSearchParams(url.hash.substring(1)) - params.set('action', OutletAction.GET_ISSUER_TOKENS + '-response') - params.set('issuer', this.tokenConfig.collectionID) - params.set('tokens', JSON.stringify(issuerTokens)) + params.set(URLNS + 'action', OutletAction.GET_ISSUER_TOKENS + '-response') + params.set(URLNS + 'issuer', this.tokenConfig.collectionID) + params.set(URLNS + 'tokens', JSON.stringify(issuerTokens)) url.hash = '#' + params.toString() @@ -473,9 +545,9 @@ export class Outlet { let url = this.redirectCallbackUrl const params = new URLSearchParams(url.hash.substring(1)) - params.set('action', ResponseActionBase.ERROR) - params.set('issuer', issuer) - params.set('error', error) + params.set(URLNS + 'action', ResponseActionBase.ERROR) + params.set(URLNS + 'issuer', issuer) + params.set(URLNS + 'error', error) console.log('Redirecting error: ', error) @@ -496,9 +568,9 @@ export class Outlet { const requesterURL = this.redirectCallbackUrl.href const params = new URLSearchParams() - params.set('action', 'proof-callback') - params.set('issuer', issuer) - params.set('error', error) + params.set(URLNS + 'action', 'proof-callback') + params.set(URLNS + 'issuer', issuer) + params.set(URLNS + 'error', error) document.location.href = requesterURL + '#' + params.toString() } diff --git a/src/theme/common.scss b/src/theme/common.scss index e37bad66..e851f3a1 100644 --- a/src/theme/common.scss +++ b/src/theme/common.scss @@ -85,6 +85,13 @@ font-size: max(1rem, 16px); } +.overlay-tn .wallet-button-tn img, +.overlay-tn .wallet-button-tn svg { + max-width: 100%; + width: 62px; + height: auto; +} + .overlay-tn .no-tokens-tn { padding: 0 1rem; } @@ -579,7 +586,7 @@ li.issuer-connect-banner-tn .fungible-token-btn { display: flex; position: relative; left: 0; - transition: all 0.2s ease-out; + transition: all 0.25s ease-out; height: 100%; } @@ -691,6 +698,107 @@ li.issuer-connect-banner-tn .fungible-token-btn { .view-content-tn { height: 100%; + flex: 50%; + position: relative; + width: 100%; +} + +.transition-wrapper-tn { + position: absolute; + width: 100%; + height: 100%; + display: flex; + + &.slide-in-left-tn, + &.slide-in-right-tn { + width: 200% !important; + } + + &.slide-in-left-tn { + right: 0; + &.slide-in { + animation: slide-in-left 0.25s forwards ease-out; + -webkit-animation: slide-in-left 0.25s forwards ease-out; + } + } + + &.slide-in-right-tn { + left: 0; + &.slide-in { + animation: slide-in-right 0.25s forwards ease-out; + -webkit-animation: slide-in-right 0.25s forwards ease-out; + } + } + + &.slide-in-top-tn, + &.slide-in-bottom-tn { + height: 200% !important; + flex-direction: column; + } + + &.slide-in-top-tn { + bottom: 0; + &.slide-in { + animation: slide-in-top 0.25s forwards ease-out; + -webkit-animation: slide-in-top 0.25s forwards ease-out; + } + } + + &.slide-in-bottom-tn { + top: 0; + &.slide-in { + animation: slide-in-bottom 0.25s forwards ease-out; + -webkit-animation: slide-in-bottom 0.25s forwards ease-out; + } + } +} + +@keyframes slide-in-left { + 100% { + transform: translateX(50%); + } +} + +@-webkit-keyframes slide-in-left { + 100% { + -webkit-transform: translateX(50%); + } +} + +@keyframes slide-in-right { + 100% { + transform: translateX(-50%); + } +} + +@-webkit-keyframes slide-in-right { + 100% { + -webkit-transform: translateX(-50%); + } +} + +@keyframes slide-in-top { + 100% { + transform: translateY(50%); + } +} + +@-webkit-keyframes slide-in-top { + 100% { + -webkit-transform: translateY(50%); + } +} + +@keyframes slide-in-bottom { + 100% { + transform: translateY(-50%); + } +} + +@-webkit-keyframes slide-in-bottom { + 100% { + -webkit-transform: translateY(-50%); + } } .scroll-tn { diff --git a/src/utils/__tests__/util.spec.ts b/src/utils/__tests__/util.spec.ts index 048cae7d..60e81e2a 100644 --- a/src/utils/__tests__/util.spec.ts +++ b/src/utils/__tests__/util.spec.ts @@ -2,7 +2,14 @@ window.DISPLAY_DEBUG_LEVEL = 1 import { hasUncaughtExceptionCaptureCallback } from 'process' -import { logger, requiredParams, compareObjects, base64ToUint8array, waitForElementToExist } from './../index' +import { + logger, + requiredParams, + compareObjects, + base64ToUint8array, + waitForElementToExist, + removeUrlSearchParams, +} from './../index' import { errorHandler } from '../index' // TODO: add unit tests for the following functions: @@ -90,3 +97,21 @@ describe('util Spec errorHandler', () => { expect(errorHandler(err, 'error', null, null, false, false)).toEqual({ message: err, data: null, type: 'error' }) }) }) + +describe('util Spec removeUrlSearchParams', () => { + test('Expect no parameters to be left', () => { + let params = new URLSearchParams('tn-action=get-tokens&tn-issuer=devcon') + params = removeUrlSearchParams(params) + expect(params.toString()).toEqual('') + }) + test('Expect non-namespaced parameters to be removed', () => { + let params = new URLSearchParams('tn-action=get-tokens&tn-issuer=devcon&email=test@test.com') + params = removeUrlSearchParams(params, ['email']) + expect(params.toString()).toEqual('') + }) + test('Expect non-specified parameter to be retained', () => { + let params = new URLSearchParams('tn-action=get-tokens&tn-issuer=devcon&email=test@test.com&redirectMode=always') + params = removeUrlSearchParams(params, ['email']) + expect(params.toString()).toEqual('redirectMode=always') + }) +}) diff --git a/src/utils/index.ts b/src/utils/index.ts index 8483330f..315ca36f 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,4 +1,5 @@ import { Buffer } from 'buffer' +import { URLNS } from '../core/messaging' declare global { interface Window { @@ -142,3 +143,27 @@ export const tokenRequest = async (query: string, silenceRequestError: boolean) throw new Error(`HTTP error.`) } } + +/** + * Remove callback parameters from the URL by providing a list of keys or a namespace (key prefix) + * @param params + * @param additionalParams + * @param namespace + */ +export const removeUrlSearchParams = ( + params: URLSearchParams, + additionalParams: string[] = [], + namespace: string | null = URLNS, +) => { + if (namespace) + for (let key of Array.from(params.keys())) { + // Iterator needs to be converted to array since we are deleting keys + if (key.indexOf(namespace) === 0) params.delete(key) + } + + for (let paramName of additionalParams) { + if (params.has(paramName)) params.delete(paramName) + } + + return params +} diff --git a/src/utils/support/__tests__/getBrowswerData.spec.ts b/src/utils/support/__tests__/getBrowswerData.spec.ts index 51f7f5fd..0b44900b 100644 --- a/src/utils/support/__tests__/getBrowswerData.spec.ts +++ b/src/utils/support/__tests__/getBrowswerData.spec.ts @@ -17,10 +17,12 @@ describe('browser simulations', () => { iE9: false, edge: false, chrome: true, + desktop: true, phantomJS: false, fireFox: false, safari: false, android: false, + anyMetamask: false, iOS: false, mac: true, windows: false, diff --git a/src/utils/support/getBrowserData.ts b/src/utils/support/getBrowserData.ts index a0da6c4d..45e33ae8 100644 --- a/src/utils/support/getBrowserData.ts +++ b/src/utils/support/getBrowserData.ts @@ -37,6 +37,8 @@ export const getBrowserData = () => { isTrust: false, isStatusWallet: false, isGoWallet: false, + // this prop is TRUE when Metamask disabled or not installed + isBraveWallet: false, } } @@ -61,8 +63,10 @@ export const getBrowserData = () => { iOS: isIOS, mac: isMac, windows: isWindows, + desktop: navigator.userAgent?.indexOf("Mobi") === -1, touchDevice: isTouchDevice, metaMask: isMetaMask, + anyMetamask: !!windowEthereum.isMetaMask && !isTrust && !windowEthereum.isBraveWallet, alphaWallet: isAlphaWallet, mew: isMyEthereumWallet, trust: isTrust, diff --git a/src/version.ts b/src/version.ts index dd064dfd..6a070dee 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ // modified by build process. -export const VERSION = '2.3.0' +export const VERSION = '2.4.0' diff --git a/src/wallet/FlowProvider.ts b/src/wallet/FlowProvider.ts index 04c7f3eb..985a3d43 100644 --- a/src/wallet/FlowProvider.ts +++ b/src/wallet/FlowProvider.ts @@ -1,4 +1,4 @@ -import * as fcl from '@onflow/fcl' +import * as fcl from '@onflow/fcl/dist/fcl.umd.min' // const unsubscribe = fcl.currentUser.subscribe(currentUser => { // console.log("The Current User", currentUser) diff --git a/src/wallet/WalletConnectProvider.ts b/src/wallet/WalletConnectProvider.ts index c2fabf2f..efc4697d 100644 --- a/src/wallet/WalletConnectProvider.ts +++ b/src/wallet/WalletConnectProvider.ts @@ -1,24 +1,10 @@ import WalletConnectProvider from '@walletconnect/web3-provider/dist/umd/index.min' +import { WC_DEFAULT_RPC_MAP } from './WalletConnectV2Provider' export const getWalletConnectProviderInstance = async (checkConnectionOnly?: boolean) => { return new WalletConnectProvider({ infuraId: '7753fa7b79d2469f97c156780fce37ac', qrcode: !checkConnectionOnly, - rpc: { - 5: 'https://eth-goerli.g.alchemy.com/v2/yVhq9zPJorAWsw-F87fEabSUl7cCU6z4', // Goerli - 11155111: 'https://sepolia.infura.io/v3/9f79b2f9274344af90b8d4e244b580ef', // Sepolia - 137: 'https://polygon-rpc.com/', // Polygon - 80001: 'https://polygon-mumbai.g.alchemy.com/v2/rVI6pOV4irVsrw20cJxc1fxK_1cSeiY0', // mumbai - 56: 'https://bsc-dataseed.binance.org/', // BSC, - 97: 'https://data-seed-prebsc-1-s1.binance.org:8545', // BSC testnet - 43114: 'https://api.avax.network/ext/bc/C/rpc', // Avalanche - 43113: 'https://api.avax-test.network/ext/bc/C/rpc', // Fuji testnet - 250: 'https://rpc.fantom.network/', // Fantom, - 25: 'https://evm-cronos.crypto.org', // Cronos, - 338: 'https://evm-t3.cronos.org', // Cronos testnet(Rinkeby) - 42161: 'https://arb1.arbitrum.io/rpc', // Arbitrum - 421613: 'https://arb-goerli.g.alchemy.com/v2/nFrflomLgsQQL5NWjGileAVqIGGxZWce', // Arbitrum goerli, - 10: 'https://mainnet.optimism.io', - }, + rpc: WC_DEFAULT_RPC_MAP, }) } diff --git a/src/wallet/WalletConnectV2Provider.ts b/src/wallet/WalletConnectV2Provider.ts index 99da73b1..0d5a7f58 100644 --- a/src/wallet/WalletConnectV2Provider.ts +++ b/src/wallet/WalletConnectV2Provider.ts @@ -1,25 +1,24 @@ import UniversalProvider from '@walletconnect/universal-provider/dist/index.umd' -export const CUSTOM_RPCS_FOR_WC_V2 = { +export const WC_DEFAULT_RPC_MAP = { 1: 'https://ethereum.publicnode.com', // mainnet 5: 'https://eth-goerli.g.alchemy.com/v2/yVhq9zPJorAWsw-F87fEabSUl7cCU6z4', // Goerli - // 11155111: 'https://sepolia.infura.io/v3/9f79b2f9274344af90b8d4e244b580ef', // Sepolia + 11155111: 'https://sepolia.infura.io/v3/9f79b2f9274344af90b8d4e244b580ef', // Sepolia 137: 'https://polygon-rpc.com/', // Polygon 80001: 'https://polygon-mumbai.g.alchemy.com/v2/rVI6pOV4irVsrw20cJxc1fxK_1cSeiY0', // mumbai 56: 'https://bsc-dataseed.binance.org/', // BSC, - // 97: 'https://data-seed-prebsc-1-s1.binance.org:8545', // BSC testnet + 97: 'https://data-seed-prebsc-1-s1.binance.org:8545', // BSC testnet 43114: 'https://api.avax.network/ext/bc/C/rpc', // Avalanche - // 43113: 'https://api.avax-test.network/ext/bc/C/rpc', // Fuji testnet + 43113: 'https://api.avax-test.network/ext/bc/C/rpc', // Fuji testnet 250: 'https://rpc.fantom.network/', // Fantom, 25: 'https://evm-cronos.crypto.org', // Cronos, - // 338: 'https://evm-t3.cronos.org', // Cronos testnet(Rinkeby) + 338: 'https://evm-t3.cronos.org', // Cronos testnet 42161: 'https://arb1.arbitrum.io/rpc', // Arbitrum - // 421613: 'https://arb-goerli.g.alchemy.com/v2/nFrflomLgsQQL5NWjGileAVqIGGxZWce', // Arbitrum goerli, + 421613: 'https://arb-goerli.g.alchemy.com/v2/nFrflomLgsQQL5NWjGileAVqIGGxZWce', // Arbitrum goerli, 10: 'https://mainnet.optimism.io', // Optimism } -// https://ethereum.publicnode.com -export const WC_V2_CHAINS = [ +export const WC_V2_DEFAULT_CHAINS = [ 'eip155:1', // Mainnet // 'eip155:5', // 'eip155:11155111', diff --git a/src/wallet/Web3WalletProvider.ts b/src/wallet/Web3WalletProvider.ts index 92799872..c443cc6c 100644 --- a/src/wallet/Web3WalletProvider.ts +++ b/src/wallet/Web3WalletProvider.ts @@ -2,6 +2,7 @@ import { ethers } from 'ethers' import { logger } from '../utils' import { SafeConnectOptions } from './SafeConnectProvider' import { Client } from '../client' +import { WalletOptionsInterface } from '../client/interface' interface WalletConnectionState { [index: string]: WalletConnection @@ -21,13 +22,11 @@ export class Web3WalletProvider { connections: WalletConnectionState = {} - safeConnectOptions?: SafeConnectOptions - client: Client - - constructor(client: Client, safeConnectOptions?: SafeConnectOptions) { - this.client = client - this.safeConnectOptions = safeConnectOptions - } + constructor( + private client: Client, + private walletOptions?: WalletOptionsInterface, + public safeConnectOptions?: SafeConnectOptions, + ) {} saveConnections() { let savedConnections: WalletConnectionState = {} @@ -40,7 +39,6 @@ export class Web3WalletProvider { chainId: con.chainId, providerType: con.providerType, blockchain: con.blockchain, - ethers: ethers, } } @@ -273,12 +271,9 @@ export class Web3WalletProvider { namespaces: { eip155: { methods: ['eth_sendTransaction', 'eth_signTransaction', 'eth_sign', 'personal_sign', 'eth_signTypedData'], - chains: walletConnectProvider.WC_V2_CHAINS, + chains: this.walletOptions?.walletConnectV2?.chains ?? walletConnectProvider.WC_V2_DEFAULT_CHAINS, events: ['chainChanged', 'accountsChanged'], - rpcMap: walletConnectProvider.CUSTOM_RPCS_FOR_WC_V2, - // rpcMap: { - // 1: `https://mainnet.infura.io/v3/9f79b2f9274344af90b8d4e244b580ef` - // } + rpcMap: this.walletOptions?.walletConnectV2?.rpcMap ?? walletConnectProvider.WC_DEFAULT_RPC_MAP, }, }, pairingTopic: pairing?.topic, @@ -315,7 +310,7 @@ export class Web3WalletProvider { return this.registerProvider(provider, 'Torus') } - async Phantom() { + async Phantom(checkConnectionOnly: boolean) { logger(2, 'connect Phantom') if (typeof window.solana !== 'undefined') { @@ -326,11 +321,11 @@ export class Web3WalletProvider { // mainnet-beta, return this.registerNewWalletAddress(accountAddress, 'mainnet-beta', 'phantom', window.solana, 'solana') } else { - throw new Error('MetaMask is not available. Please check the extension is supported and active.') + throw new Error('Phantom is not available. Please check the extension is supported and active.') } } - async SafeConnect() { + async SafeConnect(checkConnectionOnly: boolean) { logger(2, 'connect SafeConnect') const provider = await this.getSafeConnectProvider() @@ -342,35 +337,18 @@ export class Web3WalletProvider { return address } - async flowSubscribe(fcl, currentUser) { - try { - if (currentUser.addr) { - this.registerNewWalletAddress(currentUser.addr, 1, 'flow', fcl) + async Flow(checkConnectionOnly: boolean) { + const flowProvider = await import('./FlowProvider') + const fcl = flowProvider.getFlowProvider() - const ui = this.client.getUi() + await fcl.currentUser.authenticate() + let currentUser = await fcl.currentUser.snapshot() - if (ui) ui.dismissLoader() + // No user address after authenticate() then connect was unsuccesfull + if (!currentUser.addr) throw new Error('Failed to connect Flow wallet') - this.client.enrichTokenLookupDataOnChainTokens() - if (ui) ui.updateUI('main') - } - } catch (e) { - console.error('flow wallet connection error ==>', e) - this.client.getUi().showError('Flow wallet connection error.') - } - } - - async Flow() { - try { - const flowProvider = await import('./FlowProvider') - const fcl = flowProvider.getFlowProvider() - - fcl.currentUser.subscribe((currentUser) => this.flowSubscribe(fcl, currentUser)) - fcl.authenticate() - } catch (e) { - console.error('error ==>', e) - } - return '' + this.registerNewWalletAddress(currentUser.addr, 1, 'flow', fcl) + return currentUser.addr } safeConnectAvailable() { diff --git a/src/wallet/__test__/wallet.spec.ts b/src/wallet/__test__/wallet.spec.ts index c06dcd34..5648a2ec 100644 --- a/src/wallet/__test__/wallet.spec.ts +++ b/src/wallet/__test__/wallet.spec.ts @@ -1,4 +1,7 @@ /* eslint-disable no-mixed-spaces-and-tabs */ +import { TextDecoder, TextEncoder } from 'text-encoding' +global.TextEncoder = TextEncoder +global.TextDecoder = TextDecoder import { Client } from '../../client/index' import { SafeConnectOptions, SafeConnectProvider } from '../SafeConnectProvider' import { Web3WalletProvider } from '../Web3WalletProvider' @@ -29,17 +32,12 @@ let tokenNegotiatorClient = new Client({ ], }) -let safeConnectOptions: SafeConnectOptions = { - url: 'https://safeconnect.tokenscript.org', - initialProof: 'address_attest', -} - describe('wallet spec', () => { let web3WalletProvider: Web3WalletProvider let safeConnectProvider: SafeConnectProvider test('web3WalletProvider a new instance', () => { - web3WalletProvider = new Web3WalletProvider(tokenNegotiatorClient, safeConnectOptions) + web3WalletProvider = new Web3WalletProvider(tokenNegotiatorClient, null, null) expect(web3WalletProvider).toBeDefined() }) diff --git a/webpack.config.js b/webpack.config.js index 3bef58d9..5b0acf8e 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -16,6 +16,12 @@ module.exports = { ], module: { rules: [ + { + test: /\.m?js$/, + resolve: { + fullySpecified: false + }, + }, { test: /\.tsx?$/, exclude: /node_modules/,