From 039ba440cb9e76415d8aaeb8da9dfcb5c60aa849 Mon Sep 17 00:00:00 2001 From: J M Rossy Date: Mon, 13 Nov 2023 11:08:28 -0500 Subject: [PATCH] Fix rounding issue with max amounts (#79) - Fix rounding issue with max amounts - Upgrade sdk to 3.1.0-beta4 --- package.json | 6 +- src/components/toast/IgpDetailsToast.tsx | 4 +- src/consts/values.ts | 3 - src/features/transfer/TransferTokenForm.tsx | 8 +- src/features/transfer/useTokenTransfer.ts | 2 +- src/features/transfer/utils.ts | 3 +- yarn.lock | 316 ++++++++++++++++---- 7 files changed, 269 insertions(+), 73 deletions(-) diff --git a/package.json b/package.json index 2b98a70e..0e419025 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@hyperlane-xyz/warp-ui-template", "description": "A web app template for building Hyperlane Warp Route UIs", - "version": "3.1.0-beta3", + "version": "3.1.0-beta4", "author": "J M Rossy", "dependencies": { "@chakra-ui/next-js": "^2.1.5", @@ -16,8 +16,8 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@headlessui/react": "^1.7.14", - "@hyperlane-xyz/sdk": "^3.1.0-beta3", - "@hyperlane-xyz/utils": "^3.1.0-beta3", + "@hyperlane-xyz/sdk": "^3.1.0-beta4", + "@hyperlane-xyz/utils": "^3.1.0-beta4", "@hyperlane-xyz/widgets": "^1.5.0", "@metamask/jazzicon": "https://github.com/jmrossy/jazzicon#7a8df28974b4e81129bfbe3cab76308b889032a6", "@rainbow-me/rainbowkit": "0.12.16", diff --git a/src/components/toast/IgpDetailsToast.tsx b/src/components/toast/IgpDetailsToast.tsx index 798ea72c..c94202ca 100644 --- a/src/components/toast/IgpDetailsToast.tsx +++ b/src/components/toast/IgpDetailsToast.tsx @@ -2,13 +2,13 @@ import { toast } from 'react-toastify'; import { links } from '../../consts/links'; -export function toastIgpDetails(igpFee: number, tokenName = 'native token') { +export function toastIgpDetails(igpFee: string, tokenName = 'native token') { toast.error(, { autoClose: 5000, }); } -export function IgpDetailsToast({ tokenName, igpFee }) { +export function IgpDetailsToast({ tokenName, igpFee }: { tokenName: string; igpFee: string }) { return (
Cross-chain transfers require a small fee of {igpFee} {tokenName} to fund delivery transaction diff --git a/src/consts/values.ts b/src/consts/values.ts index 095619fe..4de68cb4 100644 --- a/src/consts/values.ts +++ b/src/consts/values.ts @@ -1,6 +1,3 @@ -export const MIN_ROUNDED_VALUE = 0.00001; -export const DISPLAY_DECIMALS = 4; -export const STANDARD_TOKEN_DECIMALS = 18; export const SOL_ZERO_ADDRESS = '00000000000000000000000000000000000000000000'; export const COSMOS_ZERO_ADDRESS = 'cosmos100000000000000000000000000000000000000'; // Strangely, this is not included in any of the Solana packages diff --git a/src/features/transfer/TransferTokenForm.tsx b/src/features/transfer/TransferTokenForm.tsx index 11777487..b4fc83c3 100644 --- a/src/features/transfer/TransferTokenForm.tsx +++ b/src/features/transfer/TransferTokenForm.tsx @@ -295,7 +295,7 @@ function TokenBalance({ balance?: string | null; decimals?: number; }) { - const value = !decimals ? fromWei(balance, decimals) : fromWeiRounded(balance, decimals, false); + const value = !decimals ? fromWei(balance, decimals) : fromWeiRounded(balance, decimals); return
{`${label}: ${value}`}
; } @@ -420,7 +420,7 @@ function ReviewDetails({ visible, tokenRoutes }: { visible: boolean; tokenRoutes tokenRoutes, ) as WarpRoute; const isNft = tokenCaip19Id && isNonFungibleToken(tokenCaip19Id); - const sendValueWei = isNft ? amount.toString() : toWei(amount, route?.originDecimals).toFixed(0); + const sendValueWei = isNft ? amount.toString() : toWei(amount, route?.originDecimals); const originProtocol = getProtocolType(originCaip2Id); const originUnitName = originProtocol !== ProtocolType.Cosmos @@ -534,7 +534,9 @@ function validateFormValues( const parsedAmount = tryParseAmount(amount); if (!parsedAmount || parsedAmount.lte(0)) return { amount: isNft ? 'Invalid Token Id' : 'Invalid amount' }; - const sendValue = isNft ? parsedAmount : toWei(parsedAmount, route?.originDecimals); + const sendValue = isNft + ? parsedAmount + : new BigNumber(toWei(parsedAmount, route?.originDecimals)); if (!isNft) { // Validate balances for ERC20-like tokens diff --git a/src/features/transfer/useTokenTransfer.ts b/src/features/transfer/useTokenTransfer.ts index eecfaf8d..ac83f0c0 100644 --- a/src/features/transfer/useTokenTransfer.ts +++ b/src/features/transfer/useTokenTransfer.ts @@ -124,7 +124,7 @@ async function executeTransfer({ if (!tokenRoute) throw new Error('No token route found between chains'); const isNft = isNonFungibleToken(tokenCaip19Id); - const weiAmountOrId = isNft ? amount : toWei(amount, tokenRoute.originDecimals).toFixed(0); + const weiAmountOrId = isNft ? amount : toWei(amount, tokenRoute.originDecimals); const activeAccountAddress = getAccountAddressForChain( originCaip2Id, activeAccounts.accounts[originProtocol], diff --git a/src/features/transfer/utils.ts b/src/features/transfer/utils.ts index 7c447ef4..3901fec0 100644 --- a/src/features/transfer/utils.ts +++ b/src/features/transfer/utils.ts @@ -1,3 +1,4 @@ +import BigNumber from 'bignumber.js'; import { providers } from 'ethers'; import { toast } from 'react-toastify'; @@ -33,7 +34,7 @@ export async function ensureSufficientCollateral(route: Route, weiAmount: string route.originDecimals, destinationBalance, ); - if (destinationBalanceInOriginDecimals.lt(weiAmount)) { + if (new BigNumber(destinationBalanceInOriginDecimals).lt(weiAmount)) { toast.error('Collateral contract balance insufficient for transfer'); throw new Error('Insufficient collateral balance'); } diff --git a/yarn.lock b/yarn.lock index e72f2f41..04e89728 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2988,26 +2988,26 @@ __metadata: languageName: node linkType: hard -"@hyperlane-xyz/core@npm:3.1.0-beta3": - version: 3.1.0-beta3 - resolution: "@hyperlane-xyz/core@npm:3.1.0-beta3" +"@hyperlane-xyz/core@npm:3.1.0-beta4": + version: 3.1.0-beta4 + resolution: "@hyperlane-xyz/core@npm:3.1.0-beta4" dependencies: "@eth-optimism/contracts": ^0.6.0 - "@hyperlane-xyz/utils": 3.1.0-beta3 + "@hyperlane-xyz/utils": 3.1.0-beta4 "@openzeppelin/contracts": ^4.8.0 "@openzeppelin/contracts-upgradeable": ^4.8.0 - checksum: fc5d1ccd6d15ec19e85f464c3e03c2d84354674325de7f5405701b04326d4a73835cfb5254d31a0bdec24aa77e09dc40af9585b2454f1b301214dfc14d8b515d + checksum: 58ab0d872a390d6e6affdcc87b69ed3e251337cab0f468632b2d7208ffe11b25fb1178a04864bb6af5f325e20ae9b1aa23f215a1e6996debe7db91c29ddd3c9d languageName: node linkType: hard -"@hyperlane-xyz/sdk@npm:^3.1.0-beta3": - version: 3.1.0-beta3 - resolution: "@hyperlane-xyz/sdk@npm:3.1.0-beta3" +"@hyperlane-xyz/sdk@npm:^3.1.0-beta4": + version: 3.1.0-beta4 + resolution: "@hyperlane-xyz/sdk@npm:3.1.0-beta4" dependencies: "@cosmjs/cosmwasm-stargate": ^0.31.3 "@cosmjs/stargate": ^0.31.3 - "@hyperlane-xyz/core": 3.1.0-beta3 - "@hyperlane-xyz/utils": 3.1.0-beta3 + "@hyperlane-xyz/core": 3.1.0-beta4 + "@hyperlane-xyz/utils": 3.1.0-beta4 "@solana/spl-token": ^0.3.8 "@solana/web3.js": ^1.78.0 "@types/coingecko-api": ^1.0.10 @@ -3021,19 +3021,20 @@ __metadata: ethers: ^5.7.2 viem: ^1.3.1 zod: ^3.21.2 - checksum: 3c11752712c3adc3c6ab143ca1e73feddb50d8088331c2ee5e86037726745a450fbfddfd86388406b191be08d3146a84ccbf3a7079ca759bd341c18bdd34a7d0 + checksum: a1d53f62cebe9afa4229f18eb5d3dafde37311f57d8df8428031c1196073413e98a30697a8458a39e127eca40b9b39f40075d91bc1879e27a96fe4c6562244dd languageName: node linkType: hard -"@hyperlane-xyz/utils@npm:3.1.0-beta3, @hyperlane-xyz/utils@npm:^3.1.0-beta3": - version: 3.1.0-beta3 - resolution: "@hyperlane-xyz/utils@npm:3.1.0-beta3" +"@hyperlane-xyz/utils@npm:3.1.0-beta4, @hyperlane-xyz/utils@npm:^3.1.0-beta4": + version: 3.1.0-beta4 + resolution: "@hyperlane-xyz/utils@npm:3.1.0-beta4" dependencies: "@cosmjs/encoding": ^0.31.3 "@solana/web3.js": ^1.78.0 bignumber.js: ^9.1.1 ethers: ^5.7.2 - checksum: 7cf253e167b0fa6178e9c71172009c5e20b0fe1cad6fb9c0d2072a9bee11ae488f9bf460676d3471ff6996661fc19ae012d9975f2180e71d860cd24b0dc3274e + mocha: ^10.2.0 + checksum: 61a6a78aae19717fb73e0941e22ba6762569283510413b7976b71efe925c7965d46ba7eaf469f241189980eefc1097c31e6df656c6ffa61ad80d929ff5e71219 languageName: node linkType: hard @@ -3053,8 +3054,8 @@ __metadata: "@emotion/react": ^11.11.1 "@emotion/styled": ^11.11.0 "@headlessui/react": ^1.7.14 - "@hyperlane-xyz/sdk": ^3.1.0-beta3 - "@hyperlane-xyz/utils": ^3.1.0-beta3 + "@hyperlane-xyz/sdk": ^3.1.0-beta4 + "@hyperlane-xyz/utils": ^3.1.0-beta4 "@hyperlane-xyz/widgets": ^1.5.0 "@metamask/jazzicon": "https://github.com/jmrossy/jazzicon#7a8df28974b4e81129bfbe3cab76308b889032a6" "@rainbow-me/rainbowkit": 0.12.16 @@ -7127,6 +7128,13 @@ __metadata: languageName: node linkType: hard +"ansi-colors@npm:4.1.1": + version: 4.1.1 + resolution: "ansi-colors@npm:4.1.1" + checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 + languageName: node + linkType: hard + "ansi-escapes@npm:^4.2.1": version: 4.3.2 resolution: "ansi-escapes@npm:4.3.2" @@ -7682,6 +7690,13 @@ __metadata: languageName: node linkType: hard +"browser-stdout@npm:1.3.1": + version: 1.3.1 + resolution: "browser-stdout@npm:1.3.1" + checksum: b717b19b25952dd6af483e368f9bcd6b14b87740c3d226c2977a65e84666ffd67000bddea7d911f111a9b6ddc822b234de42d52ab6507bce4119a4cc003ef7b3 + languageName: node + linkType: hard + "browserify-aes@npm:^1.0.0, browserify-aes@npm:^1.0.4": version: 1.2.0 resolution: "browserify-aes@npm:1.2.0" @@ -7930,7 +7945,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^6.2.0": +"camelcase@npm:^6.0.0, camelcase@npm:^6.2.0": version: 6.3.0 resolution: "camelcase@npm:6.3.0" checksum: 8c96818a9076434998511251dcb2761a94817ea17dbdc37f47ac080bd088fc62c7369429a19e2178b993497132c8cbcf5cc1f44ba963e76782ba469c0474938d @@ -7977,7 +7992,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^4.0.0, chalk@npm:^4.1.1": +"chalk@npm:^4.0.0, chalk@npm:^4.1.0, chalk@npm:^4.1.1": version: 4.1.2 resolution: "chalk@npm:4.1.2" dependencies: @@ -8001,7 +8016,7 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.5.3": +"chokidar@npm:3.5.3, chokidar@npm:^3.5.3": version: 3.5.3 resolution: "chokidar@npm:3.5.3" dependencies: @@ -8087,6 +8102,17 @@ __metadata: languageName: node linkType: hard +"cliui@npm:^7.0.2": + version: 7.0.4 + resolution: "cliui@npm:7.0.4" + dependencies: + string-width: ^4.2.0 + strip-ansi: ^6.0.0 + wrap-ansi: ^7.0.0 + checksum: ce2e8f578a4813806788ac399b9e866297740eecd4ad1823c27fd344d78b22c5f8597d548adbcc46f0573e43e21e751f39446c5a5e804a12aace402b7a315d7f + languageName: node + linkType: hard + "cliui@npm:^8.0.1": version: 8.0.1 resolution: "cliui@npm:8.0.1" @@ -8428,7 +8454,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:~4.3.1, debug@npm:~4.3.2": +"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.2, debug@npm:^4.3.3, debug@npm:^4.3.4, debug@npm:~4.3.1, debug@npm:~4.3.2": version: 4.3.4 resolution: "debug@npm:4.3.4" dependencies: @@ -8465,6 +8491,13 @@ __metadata: languageName: node linkType: hard +"decamelize@npm:^4.0.0": + version: 4.0.0 + resolution: "decamelize@npm:4.0.0" + checksum: b7d09b82652c39eead4d6678bb578e3bebd848add894b76d0f6b395bc45b2d692fb88d977e7cfb93c4ed6c119b05a1347cef261174916c2e75c0a8ca57da1809 + languageName: node + linkType: hard + "decode-uri-component@npm:^0.2.0, decode-uri-component@npm:^0.2.2": version: 0.2.2 resolution: "decode-uri-component@npm:0.2.2" @@ -8611,6 +8644,13 @@ __metadata: languageName: node linkType: hard +"diff@npm:5.0.0": + version: 5.0.0 + resolution: "diff@npm:5.0.0" + checksum: f19fe29284b633afdb2725c2a8bb7d25761ea54d321d8e67987ac851c5294be4afeab532bd84531e02583a3fe7f4014aa314a3eda84f5590e7a9e6b371ef3b46 + languageName: node + linkType: hard + "diff@npm:^4.0.1": version: 4.0.2 resolution: "diff@npm:4.0.2" @@ -8900,6 +8940,13 @@ __metadata: languageName: node linkType: hard +"escape-string-regexp@npm:4.0.0, escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + "escape-string-regexp@npm:^1.0.5": version: 1.0.5 resolution: "escape-string-regexp@npm:1.0.5" @@ -8914,13 +8961,6 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 - languageName: node - linkType: hard - "eslint-config-next@npm:^13.4.3": version: 13.4.3 resolution: "eslint-config-next@npm:13.4.3" @@ -9515,6 +9555,16 @@ __metadata: languageName: node linkType: hard +"find-up@npm:5.0.0, find-up@npm:^5.0.0": + version: 5.0.0 + resolution: "find-up@npm:5.0.0" + dependencies: + locate-path: ^6.0.0 + path-exists: ^4.0.0 + checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 + languageName: node + linkType: hard + "find-up@npm:^2.1.0": version: 2.1.0 resolution: "find-up@npm:2.1.0" @@ -9543,16 +9593,6 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: ^6.0.0 - path-exists: ^4.0.0 - checksum: 07955e357348f34660bde7920783204ff5a26ac2cafcaa28bace494027158a97b9f56faaf2d89a6106211a8174db650dd9f503f9c0d526b1202d5554a00b9095 - languageName: node - linkType: hard - "flat-cache@npm:^3.0.4": version: 3.0.4 resolution: "flat-cache@npm:3.0.4" @@ -9563,6 +9603,15 @@ __metadata: languageName: node linkType: hard +"flat@npm:^5.0.2": + version: 5.0.2 + resolution: "flat@npm:5.0.2" + bin: + flat: cli.js + checksum: 12a1536ac746db74881316a181499a78ef953632ddd28050b7a3a43c62ef5462e3357c8c29d76072bb635f147f7a9a1f0c02efef6b4be28f8db62ceb3d5c7f5d + languageName: node + linkType: hard + "flatted@npm:^3.1.0": version: 3.2.5 resolution: "flatted@npm:3.2.5" @@ -9845,6 +9894,20 @@ __metadata: languageName: node linkType: hard +"glob@npm:7.2.0": + version: 7.2.0 + resolution: "glob@npm:7.2.0" + 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 + checksum: 78a8ea942331f08ed2e055cb5b9e40fe6f46f579d7fd3d694f3412fe5db23223d29b7fee1575440202e9a7ff9a72ab106a39fee39934c7bedafe5e5f8ae20134 + languageName: node + linkType: hard + "glob@npm:^7.1.3, glob@npm:^7.1.4": version: 7.2.3 resolution: "glob@npm:7.2.3" @@ -10051,6 +10114,15 @@ __metadata: languageName: node linkType: hard +"he@npm:1.2.0": + version: 1.2.0 + resolution: "he@npm:1.2.0" + bin: + he: bin/he + checksum: 3d4d6babccccd79c5c5a3f929a68af33360d6445587d628087f39a965079d84f18ce9c3d3f917ee1e3978916fc833bb8b29377c3b403f919426f91bc6965e7a7 + languageName: node + linkType: hard + "hey-listen@npm:^1.0.8": version: 1.0.8 resolution: "hey-listen@npm:1.0.8" @@ -10489,6 +10561,13 @@ __metadata: languageName: node linkType: hard +"is-unicode-supported@npm:^0.1.0": + version: 0.1.0 + resolution: "is-unicode-supported@npm:0.1.0" + checksum: a2aab86ee7712f5c2f999180daaba5f361bdad1efadc9610ff5b8ab5495b86e4f627839d085c6530363c6d6d4ecbde340fb8e54bdb83da4ba8e0865ed5513c52 + languageName: node + linkType: hard + "is-weakref@npm:^1.0.2": version: 1.0.2 resolution: "is-weakref@npm:1.0.2" @@ -11110,26 +11189,26 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:^3.13.1": - version: 3.14.1 - resolution: "js-yaml@npm:3.14.1" +"js-yaml@npm:4.1.0, js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" dependencies: - argparse: ^1.0.7 - esprima: ^4.0.0 + argparse: ^2.0.1 bin: js-yaml: bin/js-yaml.js - checksum: bef146085f472d44dee30ec34e5cf36bf89164f5d585435a3d3da89e52622dff0b188a580e4ad091c3341889e14cb88cac6e4deb16dc5b1e9623bb0601fc255c + checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a languageName: node linkType: hard -"js-yaml@npm:^4.1.0": - version: 4.1.0 - resolution: "js-yaml@npm:4.1.0" +"js-yaml@npm:^3.13.1": + version: 3.14.1 + resolution: "js-yaml@npm:3.14.1" dependencies: - argparse: ^2.0.1 + argparse: ^1.0.7 + esprima: ^4.0.0 bin: js-yaml: bin/js-yaml.js - checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a + checksum: bef146085f472d44dee30ec34e5cf36bf89164f5d585435a3d3da89e52622dff0b188a580e4ad091c3341889e14cb88cac6e4deb16dc5b1e9623bb0601fc255c languageName: node linkType: hard @@ -11465,6 +11544,16 @@ __metadata: languageName: node linkType: hard +"log-symbols@npm:4.1.0": + version: 4.1.0 + resolution: "log-symbols@npm:4.1.0" + dependencies: + chalk: ^4.1.0 + is-unicode-supported: ^0.1.0 + checksum: fce1497b3135a0198803f9f07464165e9eb83ed02ceb2273930a6f8a508951178d8cf4f0378e9d28300a2ed2bc49050995d2bd5f53ab716bb15ac84d58c6ef74 + languageName: node + linkType: hard + "loglevel@npm:^1.8.1": version: 1.8.1 resolution: "loglevel@npm:1.8.1" @@ -11680,6 +11769,15 @@ __metadata: languageName: node linkType: hard +"minimatch@npm:5.0.1": + version: 5.0.1 + resolution: "minimatch@npm:5.0.1" + dependencies: + brace-expansion: ^2.0.1 + checksum: b34b98463da4754bc526b244d680c69d4d6089451ebe512edaf6dd9eeed0279399cfa3edb19233513b8f830bf4bfcad911dddcdf125e75074100d52f724774f0 + languageName: node + linkType: hard + "minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -11791,6 +11889,38 @@ __metadata: languageName: node linkType: hard +"mocha@npm:^10.2.0": + version: 10.2.0 + resolution: "mocha@npm:10.2.0" + 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 + checksum: 406c45eab122ffd6ea2003c2f108b2bc35ba036225eee78e0c784b6fa2c7f34e2b13f1dbacef55a4fdf523255d76e4f22d1b5aacda2394bd11666febec17c719 + languageName: node + linkType: hard + "motion@npm:10.16.2": version: 10.16.2 resolution: "motion@npm:10.16.2" @@ -11819,7 +11949,7 @@ __metadata: languageName: node linkType: hard -"ms@npm:^2.0.0, ms@npm:^2.1.1": +"ms@npm:2.1.3, ms@npm:^2.0.0, ms@npm:^2.1.1": version: 2.1.3 resolution: "ms@npm:2.1.3" checksum: aa92de608021b242401676e35cfa5aa42dd70cbdc082b916da7fb925c542173e36bce97ea3e804923fe92c0ad991434e4a38327e15a1b5b5f945d66df615ae6d @@ -11853,6 +11983,15 @@ __metadata: languageName: node linkType: hard +"nanoid@npm:3.3.3": + version: 3.3.3 + resolution: "nanoid@npm:3.3.3" + bin: + nanoid: bin/nanoid.cjs + checksum: ada019402a07464a694553c61d2dca8a4353645a7d92f2830f0d487fedff403678a0bee5323a46522752b2eab95a0bc3da98b6cccaa7c0c55cd9975130e6d6f0 + languageName: node + linkType: hard + "nanoid@npm:^3.3.4, nanoid@npm:^3.3.6": version: 3.3.6 resolution: "nanoid@npm:3.3.6" @@ -13529,6 +13668,15 @@ __metadata: languageName: node linkType: hard +"serialize-javascript@npm:6.0.0": + version: 6.0.0 + resolution: "serialize-javascript@npm:6.0.0" + dependencies: + randombytes: ^2.1.0 + checksum: 56f90b562a1bdc92e55afb3e657c6397c01a902c588c0fe3d4c490efdcc97dcd2a3074ba12df9e94630f33a5ce5b76a74784a7041294628a6f4306e0ec84bf93 + languageName: node + linkType: hard + "set-blocking@npm:^2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -13883,7 +14031,7 @@ __metadata: languageName: node linkType: hard -"strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": +"strip-json-comments@npm:3.1.1, strip-json-comments@npm:^3.1.0, strip-json-comments@npm:^3.1.1": version: 3.1.1 resolution: "strip-json-comments@npm:3.1.1" checksum: 492f73e27268f9b1c122733f28ecb0e7e8d8a531a6662efbd08e22cccb3f9475e90a1b82cab06a392f6afae6d2de636f977e231296400d0ec5304ba70f166443 @@ -13945,6 +14093,15 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:8.1.1, supports-color@npm:^8.0.0": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: ^4.0.0 + checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 + languageName: node + linkType: hard + "supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" @@ -13963,15 +14120,6 @@ __metadata: languageName: node linkType: hard -"supports-color@npm:^8.0.0": - version: 8.1.1 - resolution: "supports-color@npm:8.1.1" - dependencies: - has-flag: ^4.0.0 - checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 - languageName: node - linkType: hard - "supports-preserve-symlinks-flag@npm:^1.0.0": version: 1.0.0 resolution: "supports-preserve-symlinks-flag@npm:1.0.0" @@ -14736,6 +14884,13 @@ __metadata: languageName: node linkType: hard +"workerpool@npm:6.2.1": + version: 6.2.1 + resolution: "workerpool@npm:6.2.1" + checksum: c2c6eebbc5225f10f758d599a5c016fa04798bcc44e4c1dffb34050cd361d7be2e97891aa44419e7afe647b1f767b1dc0b85a5e046c409d890163f655028b09d + languageName: node + linkType: hard + "wrap-ansi@npm:^5.1.0": version: 5.1.0 resolution: "wrap-ansi@npm:5.1.0" @@ -14912,6 +15067,13 @@ __metadata: languageName: node linkType: hard +"yargs-parser@npm:20.2.4": + version: 20.2.4 + resolution: "yargs-parser@npm:20.2.4" + checksum: d251998a374b2743a20271c2fd752b9fbef24eb881d53a3b99a7caa5e8227fcafd9abf1f345ac5de46435821be25ec12189a11030c12ee6481fef6863ed8b924 + languageName: node + linkType: hard + "yargs-parser@npm:^13.1.2": version: 13.1.2 resolution: "yargs-parser@npm:13.1.2" @@ -14932,6 +15094,13 @@ __metadata: languageName: node linkType: hard +"yargs-parser@npm:^20.2.2": + version: 20.2.9 + resolution: "yargs-parser@npm:20.2.9" + checksum: 8bb69015f2b0ff9e17b2c8e6bfe224ab463dd00ca211eece72a4cd8a906224d2703fb8a326d36fdd0e68701e201b2a60ed7cf81ce0fd9b3799f9fe7745977ae3 + languageName: node + linkType: hard + "yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1" @@ -14939,6 +15108,33 @@ __metadata: languageName: node linkType: hard +"yargs-unparser@npm:2.0.0": + version: 2.0.0 + resolution: "yargs-unparser@npm:2.0.0" + dependencies: + camelcase: ^6.0.0 + decamelize: ^4.0.0 + flat: ^5.0.2 + is-plain-obj: ^2.1.0 + checksum: 68f9a542c6927c3768c2f16c28f71b19008710abd6b8f8efbac6dcce26bbb68ab6503bed1d5994bdbc2df9a5c87c161110c1dfe04c6a3fe5c6ad1b0e15d9a8a3 + languageName: node + linkType: hard + +"yargs@npm:16.2.0": + version: 16.2.0 + resolution: "yargs@npm:16.2.0" + dependencies: + cliui: ^7.0.2 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.0 + y18n: ^5.0.5 + yargs-parser: ^20.2.2 + checksum: b14afbb51e3251a204d81937c86a7e9d4bdbf9a2bcee38226c900d00f522969ab675703bee2a6f99f8e20103f608382936034e64d921b74df82b63c07c5e8f59 + languageName: node + linkType: hard + "yargs@npm:^13.2.4": version: 13.3.2 resolution: "yargs@npm:13.3.2"