From eef2e714ea4b9a31d3fab712799a59d929b6f47c Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 07:04:29 -0300 Subject: [PATCH 01/34] =?UTF-8?q?[feat]=20:sparkles:=20add=20product=20ver?= =?UTF-8?q?si=C3=B3n=20(#372)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ,todo.md | 317 +++++++++++++++++++++++++++++++ Dockerfile | 2 + README.md | 1 + cloudbuild.yaml | 4 +- example_env | 1 + package.json | 4 +- scripts/docker-build.sh | 36 ++++ src/components/Navbar/Navbar.jsx | 2 + src/config.js | 1 + src/styles/_navbar.scss | 17 ++ 10 files changed, 382 insertions(+), 3 deletions(-) create mode 100644 ,todo.md create mode 100644 scripts/docker-build.sh diff --git a/,todo.md b/,todo.md new file mode 100644 index 00000000..49b0e8e1 --- /dev/null +++ b/,todo.md @@ -0,0 +1,317 @@ +- issue alpha +- recursividad con notificaciones +- linter errors +- setear versión en dev con el commit y en main con el tag + +- Problema: rate limit con la url del provider de rpc (teníamos tenderly) +- origen del problema: las notificaciones (navbar) +- workaround: deshabilité las notificaciones y cambié el provider a rpc1 (por las dudas, para que nos banee el dominio). +- Solución definitiva: Pendiente + +temp/temp-1 + +En esta versión del componente: + +fetchSeasonData y fetchAlbums se encargan de manejar las solicitudes para los datos de la temporada y los álbumes, respectivamente, y se usan useCallback para evitar recreaciones innecesarias. +Se agrega el uso de useMemo y useCallback para funciones y valores que se reutilizan frecuentemente. +Se aseguran que los useEffect solo se ejecuten cuando es necesario. +Se agrupan las actualizaciones del estado para reducir el número de renderizaciones. + +--- + +--- + +**status** + +--- + +--- + +**Mejoras / bugs** + +**landing** + +_DOING_ + +_TODO_ + +- mejora (reportado por magnus, 13-02-2024): Por otro lado, sigue la situación (apenas visual), que cuando se sale de revizar una figura, no retorna a la página en que se estaba, sino siempre a la página 2 + +- bug: sw: Uncaught (in promise) TypeError: Failed to execute 'addAll' on 'Cache': Request failed. + +- revisa lo de pwa en config, que da error en el build (actions), lo tira como warning. + +- mejora: agregar notificación al mintear carta + +- mejora: (reportada por magnus, 29-12-2023) + La visualización del borde Gris del marco que se ve en el álbum, sería bueno que también se aplicará en los marcos de las figuras al momento de colocar figuras para intercambio. + Cuando se escogen para intercambio, se conserva el marco azul + +- mejora: [ ] #303: Recordar idioma seleccionado por el usuario + +- FEAT: [ ] #304: Indicar en las cartas las ofertas de otros usuarios + +- FEAT: [ ] #305: Match de cartas de oferta en selección de intercambio + +- FEAT: [] #306: Ranking de wallets con más álbums + +- FEAT: [] #307: Ranking de wallets por carta + +- FEAT: [] #308: ver álbums completados o quemados (persistencia en bdd) + +- FEAT: [] #309: Identificación de cartas Shiny + +- change: meter notificación de winner asociada al evento de venta del último pack (indicando si fuiste ganador o no) + +_BACKLOG_ + +- mejora: #310: Evita efecto de refresh en el click de la carta al quemar + +- fix: al transferir un album, se pierde los textos de las cantidades + +- mejora: Poder enviar error al team de desarrollo (con la api de next js, tomar de AD, para envío de mails) + +- FEAT: Poder scanear un qr en el control de transferir (card, pack) (para mobile) + +- mejora: El numerito 120 y 121, pisa la imagen (bajar un toque para esas dos cartas) + +- mejora: Agregar notificación de cuando alguien te transfiere fondos (ojo qu eno tenés evento, como te enteras? tiene evento el erc20 de eso?) + +- mejora web3 modal + + - al estar cargando, si ya esta conectado, muestra los botones de conectar unos segundos y luego el album. Ver de usar el "isConnecting" para evitar ese efecto. + - al hacer casmbio de wallet, no te refresca los datos en gamma (queda conectada la wallet anterior) + - i18n + - algunas redes no soportan el switch_network: Error switching network Error: Request method wallet_switchEthereumChain is not supported + - si vas desconectando las redes, cuando desconectas la útlima da error + - no detecta cuando desconectas la cuenta desde metamask + -- https://docs.walletconnect.com/web3modal/react/components + +- mejora. revisar por qué no te lleva a la página de offline cuando das de baja los servicios de internet + +- esta volviendo a salir el efecto de redibujo de una pagina abajod el book. + +- mejora: al recibir eventos, que actualice el contexto de datos (además de las notificaciones) + +- mejora: or qué al darle refresh, sigue mostrando las notificaicones? (ver si es por el sstate, usar localStorage en la pagina directamente) + +- mejora: cuando alguien confirma el inventario, si luego el owner de la oferta, abre ésta, ya no se la muestra, pero al cerrar el infoCard, el inventario no está actualizado (le sigue mostrando en su poder la carta de la oferta y no le muestra nueva que recibió) + +- mejora: cuando le das refresh (f5), si estás conectado que vaya al libro directamente (tendrías que levantar la wallet de localhost, creo que ya lo hace el otro contexto, esperar hasta tener el otro contexsto) + +- mejora: header, menu mobile: agregar para mobile un header con el menu de 3 rallitas, que combine sound, idioma y wallet. Tal vez dehar en el centro el "NoF" + +- mejora: mover las ofertas a contexto + +- mejora: sacar lo de wallet y contratos fuera de los main, y mostrar un componente de noContectado + +- mejora: Evitar que choque el movimiento de pagina, al hacer click en las figuritas que están enlas 4 esquinas + +- mejora: Mostrar el el inventario del usuario TODAS las cartas que tiene oferta (?) - hoy muestra solo muestra de las cartas que tiene el user en su inventario. (quedaría deprecado con la nueva pantalla de ofertas) + +- mejora: cuando entras a jugar con varios, el openPack demora + +- mejora: Los estilos de los modales (transfer card, transfer pack, etc.; ejemplo, como el transfer de alpha y al menos, ajustar los colores a los modales como el el trasnfer de alpha) + +- mejora: Igualar estilos modales / llevar al estilo del sitio (ver ejemplo en modales de alpha) + +- mejora: en caso de tener que re-desplegar contrato, proba en local si podes hacer export/import de datos (vía script), habrá algo en la web? + +* mejora: arreglar el tema de cuando se desconecta y cambia de red + https://socket.dev/npm/package/@web3-onboard/react + https://stackoverflow.com/questions/71569214/error-error-must-initialize-before-using-hooks + https://onboard.blocknative.com/docs/modules/react#usesetlocale +* FEAT: Armar pantalla para ver todas las notificacions (o scrollear) y re-activar el "ver todo" + +- mejora: ver por qué se actualiza el book cuando tocas las acciones en notificaciones (tema de uso de contexto?) +- error: en la api matcher, para bsc, da un revert, problemas del endpoint del RPC? http://localhost:3000/api/match?w1=0xcdf7658B1cACf7b6b31F285126039b048d2D2823&w2=0x35dad65F60c1A32c9895BE97f6bcE57D32792E83 + +**SC** + +_TODO_ + + * [ ] #104: Incorporar método de sorteo al comprar el último pack + (Este album otorga un numero "Ticket" de loteria que se sorteara al finzalizar la venta del ultimo sobre entre todos los tickets disponibles. El pool que se gana aquel suertudo es un % que se va acumulando por cada compra.) + - Revisar el getLotteryWinner, falta un require para verificar que el ticket random este en la col y comprar si ese ticker randome estsa ok, dado que no incluye al user, que si se contempla al generar el ticket! + - Crear una funcion en contrato de packs de Lottery o "sortear ticket" + - la funcion se tiene que llamar en buPack y buyPacks si se alcanzo el máximo de sobres + - Esa funcion obtiene el ticket del contrato de tickets y valida que tenga algo + - obtiene el pricezebalnace del contrato del contrato de carta y el % a pagar en la lotgeria + - verifica que haya saldo suficiente para la transferencia (como hace hoy _tranferPrizesAmounts) + - realiza la transferencia + - resta el monto del contrato de cartas + - emite evento de ticketSorteado o loteriaRealizada + - generar los tests: quema de cartas 60, generación de tickets, que desaparezca el album de 60, sorteo + +_BACKLOG_ + +- feat: identificar las cartas shiny + +- mejora: hacer upgradeable los contratos + + - ver si se peude eliminar el constructor de cards por lo de ERC20 + - volver a ver video de patrick + - agrega lo de upgrade + +- mejora: ver de actualizar todo a ethers 6 y hardhat-ethers v3 + +- proxy: Revisar este blog, que tiene un monton de cosas por hacer antes de pasar a proyx: + https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable + +--- + +nof dev: https://develop-nof-landing-7bteynlhua-uc.a.run.app/ +react icons preview fc: https://react-icons.github.io/react-icons/icons/fc/ +gitmoji.dev / commit, icons + +feat: Una nueva característica para el usuario. +fix: Arregla un bug que afecta al usuario. +perf: Cambios que mejoran el rendimiento del sitio. +build: Cambios en el sistema de build, tareas de despliegue o instalación. +ci: Cambios en la integración continua. +docs: Cambios en la documentación. +refactor: Refactorización del código como cambios de nombre de variables o funciones. +style: Cambios de formato, tabulaciones, espacios o puntos y coma, etc; no afectan al usuario. +test: Añade tests o refactoriza uno existente. +chore: Other changes that don't modify src or test files +revert: Reverts a previous commit + +--- + +--- + +**commit_msgs** + +sc update mumbai addresses: +git commit -m "[chore] :wrench: update mumbai addresses" + +**mumbai-wallets** + +cuenta dev1 mumbai: 0x35dad65F60c1A32c9895BE97f6bcE57D32792E83 +cuenta 2 mumbai: 0x117b706DEF40310eF5926aB57868dAcf46605b8d + +**hardhat-wallets** + +Account #0: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000 ETH) +Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 + +Account #1: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 (10000 ETH) +Private Key: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d + +Account #2: 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC (10000 ETH) +Private Key: 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a + +Account #3: 0x90F79bf6EB2c4f870365E785982E1f101E93b906 (10000 ETH) +Private Key: 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6 + +Account #4: 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 (10000 ETH) +Private Key: 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a + +Account #5: 0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc (10000 ETH) +Private Key: 0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba + +Account #6: 0x976EA74026E726554dB657fA54763abd0C3a0aa9 (10000 ETH) +Private Key: 0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e + +Account #7: 0x14dC79964da2C08b23698B3D3cc7Ca32193d9955 (10000 ETH) +Private Key: 0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356 + +Account #8: 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f (10000 ETH) +Private Key: 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 + +Account #9: 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 (10000 ETH) +Private Key: 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 + +Account #10: 0xBcd4042DE499D14e55001CcbB24a551F3b954096 (10000 ETH) +Private Key: 0xf214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897 + +Account #11: 0x71bE63f3384f5fb98995898A86B02Fb2426c5788 (10000 ETH) +Private Key: 0x701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2bdf6f192c82 + +Account #12: 0xFABB0ac9d68B0B445fB7357272Ff202C5651694a (10000 ETH) +Private Key: 0xa267530f49f8280200edf313ee7af6b827f2a8bce2897751d06a843f644967b1 + +Account #13: 0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec (10000 ETH) +Private Key: 0x47c99abed3324a2707c28affff1267e45918ec8c3f20b8aa892e8b065d2942dd + +Account #14: 0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097 (10000 ETH) +Private Key: 0xc526ee95bf44d8fc405a158bb884d9d1238d99f0612e9f33d006bb0789009aaa + +Account #15: 0xcd3B766CCDd6AE721141F452C550Ca635964ce71 (10000 ETH) +Private Key: 0x8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61 + +Account #16: 0x2546BcD3c84621e976D8185a91A922aE77ECEc30 (10000 ETH) +Private Key: 0xea6c44ac03bff858b476bba40716402b03e41b8e97e276d1baec7c37d42484a0 + +Account #17: 0xbDA5747bFD65F08deb54cb465eB87D40e51B197E (10000 ETH) +Private Key: 0x689af8efa8c651a91ad287602527f3af2fe9f6501a7ac4b061667b5a93e037fd + +Account #18: 0xdD2FD4581271e230360230F9337D5c0430Bf44C0 (10000 ETH) +Private Key: 0xde9be858da4a475276426320d5e9262ecfc3ba460bfac56360bfa6c4c28b4ee0 + +Account #19: 0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199 (10000 ETH) +Private Key: 0xdf57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e + +**beta testers wallets** + +Aleop 0xa0B12ebA61C11E1fE08057562A1373FbE352CFB1 +Ndawin 0xfA30E6c039277562E5231eB5684aA44351310A88 +Juanse 0xaEEdb1c33B2E4d6a4a1509fCd795dd97B550358E +MAGNUS 0x1A9df03FC2E04aeB661e885D918a73620B664A67 +Powder 0x4722bC41FEc3885EA72dA4961DA823E6365BBc4c +Mage Hernán 0xedD31e732EA38E95f0637634FE1EBb3Ca5055979 +P4 troy 0xCd432d93ADb30fAD8BcFdB1913BECE3F1D8C6f73 +Ingeniero 0xCCca402f251b8f9c002B4fb19BC1E31F7579079F +Xhaira 0xA345bc4a3C3145D4965400AD08089fA9926054b0 +Nachito 0x5FAF012e3A20932472531004B7661B203673aDdF +Valen 0x314D71a85a9cef2b49B872A0d88F5a4e0e466DdF, 0xC935343cA00F660D97E85E253fE3Ac561eA67ACA +SDKFelgrand: 0x12428d5688b0ec18CE352F4DD5a778909b5BA7B7 +derchef07: 0xb06918785F88c54D23B7116F4a12386499592557 +HaseoMisakiR: 0x6E8895d04077bf563e5aaE333eA004ef4B4A13A1 +festi: 0xa1Ba1e315EB3bB5958170CC49cec29EeC391EAE7 + +--- + +--- + +# contract deploys (mumbai) + +## 20231206 + +NEXT_PUBLIC_DAI_ADDRESS='0xdf302B697a0F6f3CEAB0624a4db2445a4B830043' +NEXT_PUBLIC_ALPHA_ADDRESS='0xC7F14830D02A6C50df31B33DF1CaBb1A87A59bAc' +NEXT_PUBLIC_GAMMA_PACKS_ADDRESS='0x420a83ABB2286255d529BB8AdB43071B2e8f148d' +NEXT_PUBLIC_GAMMA_CARDS_ADDRESS='0xCD1c83a7d2EbAF06052c1d8A14397834303e8368' +NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS='0x78842c8D8F1a695bb151bCa187af6cBD28250e3D' + +## 20231205 + +NEXT_PUBLIC_DAI_ADDRESS='0xF0F01CEd79B4Acf577E5864A690b268Ef4a11575' +NEXT_PUBLIC_ALPHA_ADDRESS='0xD25734a632005EeD4D26f7D4269D1c6D347d82C7' +NEXT_PUBLIC_GAMMA_PACKS_ADDRESS='0x1788D58b65A39e54308807A6aF46a186E626f41f' +NEXT_PUBLIC_GAMMA_CARDS_ADDRESS='0x87eF0d14aBA7C495d6844689d912777Aea6BcA5c' +NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS='0x2ABCCF3EbE6F4E74050182BdaED76F11654F5e2E' + +## 20231126 + +NEXT_PUBLIC_DAI_ADDRESS='0x291FaB5F25B87d1672452aE28dcEB1b8Cd2F82f7' +NEXT_PUBLIC_ALPHA_ADDRESS='0x643A6255Fe5aBdb26f43296284F535219E6dD13C' +NEXT_PUBLIC_GAMMA_PACKS_ADDRESS='0xFC24dFdb838b4544b91436F93da70d2B2476b634' +NEXT_PUBLIC_GAMMA_CARDS_ADDRESS='0xb2da44Bd77e922142F3Ef20504826e83D4e9fc0C' +NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS='0xc2E8cEE4dC93F24b9Bc70A100083C0A6075694cE' + +## 20231124 + +NOF_DAI_CONTRACT_CURRENT_ADDRESS='0x291FaB5F25B87d1672452aE28dcEB1b8Cd2F82f7' +NOF_ALPHA_CONTRACT_CURRENT_ADDRESS='0x643A6255Fe5aBdb26f43296284F535219E6dD13C' +NOF_GAMMA_PACKS_CONTRACT_CURRENT_ADDRESS='0xFC24dFdb838b4544b91436F93da70d2B2476b634' +NOF_GAMMA_CARDS_CONTRACT_CURRENT_ADDRESS='0xb2da44Bd77e922142F3Ef20504826e83D4e9fc0C' +NOF_GAMMA_OFFERS_CONTRACT_CURRENT_ADDRESS='0x18537721EDfdEa2060640314BD996672E0DB921D' + +--- + +mongodump --uri "mongodb+srv://cloud:kSfwcgHL3y3A@nof.f14znpg.mongodb.net/nofys" -o . +mongodump --uri "mongodb+srv://cloud:kSfwcgHL3y3A@nof.f14znpg.mongodb.net/nombre_de_tu_base_de_datos" -o . +mongodump --uri "mongodb+srv://cloud:kSfwcgHL3y3A@nof.f14znpg.mongodb.net/sample_mflix" -o . + +--- diff --git a/Dockerfile b/Dockerfile index 846a4c62..4d03fa66 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,7 @@ ARG MAIL_SG_FROM ARG NEXT_PUBLIC_STORAGE_URL_ALPHA ARG NEXT_PUBLIC_STORAGE_URL_GAMMA ARG NEXT_PUBLIC_ADMIN_ACCOUNTS +ARG NEXT_PUBLIC_NOF_VERSION # env @@ -52,6 +53,7 @@ ENV MAIL_SG_FROM $MAIL_SG_FROM ENV NEXT_PUBLIC_STORAGE_URL_ALPHA $NEXT_PUBLIC_STORAGE_URL_ALPHA ENV NEXT_PUBLIC_STORAGE_URL_GAMMA $NEXT_PUBLIC_STORAGE_URL_GAMMA ENV NEXT_PUBLIC_ADMIN_ACCOUNTS $NEXT_PUBLIC_ADMIN_ACCOUNTS +ENV NEXT_PUBLIC_NOF_VERSION $NEXT_PUBLIC_NOF_VERSION COPY --from=deps /app/node_modules ./node_modules diff --git a/README.md b/README.md index 3d84e618..50471ce6 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,7 @@ NEXT_PUBLIC_APP_ENV='development' NEXT_PUBLIC_STORAGE_URL_ALPHA='https://storage.googleapis.com/nof-alpha' NEXT_PUBLIC_STORAGE_URL_GAMMA='https://storage.googleapis.com/nof-gamma' NEXT_PUBLIC_ADMIN_ACCOUNTS='0x35dad65F60c1A32c9895BE97f6bcE57D32792E83,0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266' +NEXT_PUBLIC_NOF_VERSION='v0.0.0' # Only por local environment to put contracts addresses from hardhat NEXT_PUBLIC_NOF_DAI_HARDHAT_CONTRACT_ADDRESS='' diff --git a/cloudbuild.yaml b/cloudbuild.yaml index b8ba2f4d..9897cba1 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -30,7 +30,7 @@ steps: - NEXT_PUBLIC_STORAGE_URL_ALPHA=${_NEXT_PUBLIC_STORAGE_URL_ALPHA} - NEXT_PUBLIC_STORAGE_URL_GAMMA=${_NEXT_PUBLIC_STORAGE_URL_GAMMA} - NEXT_PUBLIC_ADMIN_ACCOUNTS=${_NEXT_PUBLIC_ADMIN_ACCOUNTS} - + - NEXT_PUBLIC_NOF_VERSION=${_NEXT_PUBLIC_NOF_VERSION} # build the container images - name: "gcr.io/cloud-builders/docker" @@ -61,7 +61,7 @@ steps: "--build-arg", "NEXT_PUBLIC_STORAGE_URL_ALPHA=${_NEXT_PUBLIC_STORAGE_URL_ALPHA}", "--build-arg", "NEXT_PUBLIC_STORAGE_URL_GAMMA=${_NEXT_PUBLIC_STORAGE_URL_GAMMA}", "--build-arg", "NEXT_PUBLIC_ADMIN_ACCOUNTS=${_NEXT_PUBLIC_ADMIN_ACCOUNTS}", - + "--build-arg", "NEXT_PUBLIC_NOF_VERSION=${_NEXT_PUBLIC_NOF_VERSION}", "." ] diff --git a/example_env b/example_env index dc286e90..76aed636 100644 --- a/example_env +++ b/example_env @@ -20,6 +20,7 @@ NEXT_PUBLIC_APP_ENV='development' NEXT_PUBLIC_STORAGE_URL_ALPHA='https://storage.googleapis.com/nof-alpha' NEXT_PUBLIC_STORAGE_URL_GAMMA='https://storage.googleapis.com/nof-gamma' NEXT_PUBLIC_ADMIN_ACCOUNTS='0x...,0X....,0xfa3....' // accounts separated by a comma +NEXT_PUBLIC_NOF_VERSION='v0.1.219' // Only por local environment to put contracts addresses from hardhat NEXT_PUBLIC_NOF_DAI_CONTRACT_CURRENT_ADDRESS='' diff --git a/package.json b/package.json index a4954bd4..344a12fa 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,9 @@ "git-config": "git config --global core.autocrlf true", "git-log": "git log --oneline --decorate", "gitp": "git log --pretty=”%s”", - "commitlint-check-comit-msg": "npx --no-install commitlint --edit \"$1\"" + "commitlint-check-comit-msg": "npx --no-install commitlint --edit \"$1\"", + "docker:build": "bash ./scripts/docker-build.sh", + "docker:run": "bash docker run -d -p 3000:3000 --name my-nextjs-container my-nextjs-app" }, "dependencies": { "@next/eslint-plugin-next": "^14.0.1", diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh new file mode 100644 index 00000000..3eb512cf --- /dev/null +++ b/scripts/docker-build.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +# Mover al directorio raíz del proyecto +cd "$(dirname "$0")/.." + +# Exportar variables de entorno desde el archivo .env +export $(grep -v '^#' .env | xargs) + +# Volver al directorio scripts +cd scripts + +# Ejecutar docker build con las variables de entorno como argumentos de compilación +docker build \ + --build-arg APP_ENV="$APP_ENV" \ + --build-arg NODE_ENV="$NODE_ENV" \ + --build-arg MONGODB="$MONGODB" \ + --build-arg GAMMA_SERVICE_URL="$GAMMA_SERVICE_URL" \ + --build-arg GRAPH_URL="$GRAPH_URL" \ + --build-arg WALLET_CONNECT_PROJECT_ID="$WALLET_CONNECT_PROJECT_ID" \ + --build-arg NODE_PROVIDER_MUMBAI_URL="$NODE_PROVIDER_MUMBAI_URL" \ + --build-arg NODE_PROVIDER_BSC_TESTNET_URL="$NODE_PROVIDER_BSC_TESTNET_URL" \ + --build-arg NODE_PROVIDER_OPBNB_TESTNET="$NODE_PROVIDER_OPBNB_TESTNET" \ + --build-arg MAIL_CLIENT="$MAIL_CLIENT" \ + --build-arg MAIL_FROM="$MAIL_FROM" \ + --build-arg MAIL_TO="$MAIL_TO" \ + --build-arg MAIL_ETHEREAL_HOST="$MAIL_ETHEREAL_HOST" \ + --build-arg MAIL_ETHEREAL_PORT="$MAIL_ETHEREAL_PORT" \ + --build-arg MAIL_ETHEREAL_USER="$MAIL_ETHEREAL_USER" \ + --build-arg MAIL_ETHEREAL_PSWD="$MAIL_ETHEREAL_PSWD" \ + --build-arg MAIL_SG_KEY="$MAIL_SG_KEY" \ + --build-arg MAIL_SG_FROM="$MAIL_SG_FROM" \ + --build-arg NEXT_PUBLIC_STORAGE_URL_ALPHA="$NEXT_PUBLIC_STORAGE_URL_ALPHA" \ + --build-arg NEXT_PUBLIC_STORAGE_URL_GAMMA="$NEXT_PUBLIC_STORAGE_URL_GAMMA" \ + --build-arg NEXT_PUBLIC_ADMIN_ACCOUNTS="$NEXT_PUBLIC_ADMIN_ACCOUNTS" \ + --build-arg NEXT_PUBLIC_NOF_VERSION="$NEXT_PUBLIC_NOF_VERSION" \ + -t my-nextjs-app .. diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index 64ec8047..7fd6987f 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -10,6 +10,7 @@ import AccountInfo from './AccountInfo.jsx' import NotificationInfo from './NotificationInfo.jsx' import LanguageSelection from '../LanguageSelection' import { useLayoutContext, useWeb3Context, useNotificationContext } from '../../hooks' +import { nofVersion } from '../../config.js' function Navbar() { const { t } = useTranslation() @@ -88,6 +89,7 @@ function Navbar() { nof + {nofVersion} ) diff --git a/src/config.js b/src/config.js index a1bb043c..c46c2365 100644 --- a/src/config.js +++ b/src/config.js @@ -52,6 +52,7 @@ export const storageUrlGamma = process.env.NEXT_PUBLIC_STORAGE_URL_GAMMA || 'https://storage.googleapis.com/nof-gamma' export const adminAccounts = process.env.NEXT_PUBLIC_ADMIN_ACCOUNTS || '0x8a8F5e5ae88532c605921f320a92562c9599fB9E' +export const nofVersion = process.env.NEXT_PUBLIC_NOF_VERSION || 'v0.1.219' // ------------------------------------------------------------------ // calculated variables diff --git a/src/styles/_navbar.scss b/src/styles/_navbar.scss index 0513be1c..a62c6819 100644 --- a/src/styles/_navbar.scss +++ b/src/styles/_navbar.scss @@ -354,3 +354,20 @@ header { margin-right: 10px; } } + +.navbar__left__nof { + position: relative; +} + +.navbar__left__nof__version { + position: absolute; + bottom: -22px; /* Ajusta según sea necesario */ + left: 50%; + transform: translateX(-50%); + font-size: 8px; /* Ajusta el tamaño de la fuente según prefieras */ + color: #343131; /* Cambia el color si es necesario */ + background: #ede8e8; /* Puedes cambiar el fondo si quieres */ + padding: 2px 5px; + border-radius: 4px; + text-align: center; +} From 452d16c1679a4c3e3f2d12fc24a7d772d85b37dc Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 07:09:01 -0300 Subject: [PATCH 02/34] [chore] :fire: remove temp files --- ,todo.md | 317 ----------------------------------------------------- .gitignore | 1 + 2 files changed, 1 insertion(+), 317 deletions(-) delete mode 100644 ,todo.md diff --git a/,todo.md b/,todo.md deleted file mode 100644 index 49b0e8e1..00000000 --- a/,todo.md +++ /dev/null @@ -1,317 +0,0 @@ -- issue alpha -- recursividad con notificaciones -- linter errors -- setear versión en dev con el commit y en main con el tag - -- Problema: rate limit con la url del provider de rpc (teníamos tenderly) -- origen del problema: las notificaciones (navbar) -- workaround: deshabilité las notificaciones y cambié el provider a rpc1 (por las dudas, para que nos banee el dominio). -- Solución definitiva: Pendiente - -temp/temp-1 - -En esta versión del componente: - -fetchSeasonData y fetchAlbums se encargan de manejar las solicitudes para los datos de la temporada y los álbumes, respectivamente, y se usan useCallback para evitar recreaciones innecesarias. -Se agrega el uso de useMemo y useCallback para funciones y valores que se reutilizan frecuentemente. -Se aseguran que los useEffect solo se ejecuten cuando es necesario. -Se agrupan las actualizaciones del estado para reducir el número de renderizaciones. - ---- - ---- - -**status** - ---- - ---- - -**Mejoras / bugs** - -**landing** - -_DOING_ - -_TODO_ - -- mejora (reportado por magnus, 13-02-2024): Por otro lado, sigue la situación (apenas visual), que cuando se sale de revizar una figura, no retorna a la página en que se estaba, sino siempre a la página 2 - -- bug: sw: Uncaught (in promise) TypeError: Failed to execute 'addAll' on 'Cache': Request failed. - -- revisa lo de pwa en config, que da error en el build (actions), lo tira como warning. - -- mejora: agregar notificación al mintear carta - -- mejora: (reportada por magnus, 29-12-2023) - La visualización del borde Gris del marco que se ve en el álbum, sería bueno que también se aplicará en los marcos de las figuras al momento de colocar figuras para intercambio. - Cuando se escogen para intercambio, se conserva el marco azul - -- mejora: [ ] #303: Recordar idioma seleccionado por el usuario - -- FEAT: [ ] #304: Indicar en las cartas las ofertas de otros usuarios - -- FEAT: [ ] #305: Match de cartas de oferta en selección de intercambio - -- FEAT: [] #306: Ranking de wallets con más álbums - -- FEAT: [] #307: Ranking de wallets por carta - -- FEAT: [] #308: ver álbums completados o quemados (persistencia en bdd) - -- FEAT: [] #309: Identificación de cartas Shiny - -- change: meter notificación de winner asociada al evento de venta del último pack (indicando si fuiste ganador o no) - -_BACKLOG_ - -- mejora: #310: Evita efecto de refresh en el click de la carta al quemar - -- fix: al transferir un album, se pierde los textos de las cantidades - -- mejora: Poder enviar error al team de desarrollo (con la api de next js, tomar de AD, para envío de mails) - -- FEAT: Poder scanear un qr en el control de transferir (card, pack) (para mobile) - -- mejora: El numerito 120 y 121, pisa la imagen (bajar un toque para esas dos cartas) - -- mejora: Agregar notificación de cuando alguien te transfiere fondos (ojo qu eno tenés evento, como te enteras? tiene evento el erc20 de eso?) - -- mejora web3 modal - - - al estar cargando, si ya esta conectado, muestra los botones de conectar unos segundos y luego el album. Ver de usar el "isConnecting" para evitar ese efecto. - - al hacer casmbio de wallet, no te refresca los datos en gamma (queda conectada la wallet anterior) - - i18n - - algunas redes no soportan el switch_network: Error switching network Error: Request method wallet_switchEthereumChain is not supported - - si vas desconectando las redes, cuando desconectas la útlima da error - - no detecta cuando desconectas la cuenta desde metamask - -- https://docs.walletconnect.com/web3modal/react/components - -- mejora. revisar por qué no te lleva a la página de offline cuando das de baja los servicios de internet - -- esta volviendo a salir el efecto de redibujo de una pagina abajod el book. - -- mejora: al recibir eventos, que actualice el contexto de datos (además de las notificaciones) - -- mejora: or qué al darle refresh, sigue mostrando las notificaicones? (ver si es por el sstate, usar localStorage en la pagina directamente) - -- mejora: cuando alguien confirma el inventario, si luego el owner de la oferta, abre ésta, ya no se la muestra, pero al cerrar el infoCard, el inventario no está actualizado (le sigue mostrando en su poder la carta de la oferta y no le muestra nueva que recibió) - -- mejora: cuando le das refresh (f5), si estás conectado que vaya al libro directamente (tendrías que levantar la wallet de localhost, creo que ya lo hace el otro contexto, esperar hasta tener el otro contexsto) - -- mejora: header, menu mobile: agregar para mobile un header con el menu de 3 rallitas, que combine sound, idioma y wallet. Tal vez dehar en el centro el "NoF" - -- mejora: mover las ofertas a contexto - -- mejora: sacar lo de wallet y contratos fuera de los main, y mostrar un componente de noContectado - -- mejora: Evitar que choque el movimiento de pagina, al hacer click en las figuritas que están enlas 4 esquinas - -- mejora: Mostrar el el inventario del usuario TODAS las cartas que tiene oferta (?) - hoy muestra solo muestra de las cartas que tiene el user en su inventario. (quedaría deprecado con la nueva pantalla de ofertas) - -- mejora: cuando entras a jugar con varios, el openPack demora - -- mejora: Los estilos de los modales (transfer card, transfer pack, etc.; ejemplo, como el transfer de alpha y al menos, ajustar los colores a los modales como el el trasnfer de alpha) - -- mejora: Igualar estilos modales / llevar al estilo del sitio (ver ejemplo en modales de alpha) - -- mejora: en caso de tener que re-desplegar contrato, proba en local si podes hacer export/import de datos (vía script), habrá algo en la web? - -* mejora: arreglar el tema de cuando se desconecta y cambia de red - https://socket.dev/npm/package/@web3-onboard/react - https://stackoverflow.com/questions/71569214/error-error-must-initialize-before-using-hooks - https://onboard.blocknative.com/docs/modules/react#usesetlocale -* FEAT: Armar pantalla para ver todas las notificacions (o scrollear) y re-activar el "ver todo" - -- mejora: ver por qué se actualiza el book cuando tocas las acciones en notificaciones (tema de uso de contexto?) -- error: en la api matcher, para bsc, da un revert, problemas del endpoint del RPC? http://localhost:3000/api/match?w1=0xcdf7658B1cACf7b6b31F285126039b048d2D2823&w2=0x35dad65F60c1A32c9895BE97f6bcE57D32792E83 - -**SC** - -_TODO_ - - * [ ] #104: Incorporar método de sorteo al comprar el último pack - (Este album otorga un numero "Ticket" de loteria que se sorteara al finzalizar la venta del ultimo sobre entre todos los tickets disponibles. El pool que se gana aquel suertudo es un % que se va acumulando por cada compra.) - - Revisar el getLotteryWinner, falta un require para verificar que el ticket random este en la col y comprar si ese ticker randome estsa ok, dado que no incluye al user, que si se contempla al generar el ticket! - - Crear una funcion en contrato de packs de Lottery o "sortear ticket" - - la funcion se tiene que llamar en buPack y buyPacks si se alcanzo el máximo de sobres - - Esa funcion obtiene el ticket del contrato de tickets y valida que tenga algo - - obtiene el pricezebalnace del contrato del contrato de carta y el % a pagar en la lotgeria - - verifica que haya saldo suficiente para la transferencia (como hace hoy _tranferPrizesAmounts) - - realiza la transferencia - - resta el monto del contrato de cartas - - emite evento de ticketSorteado o loteriaRealizada - - generar los tests: quema de cartas 60, generación de tickets, que desaparezca el album de 60, sorteo - -_BACKLOG_ - -- feat: identificar las cartas shiny - -- mejora: hacer upgradeable los contratos - - - ver si se peude eliminar el constructor de cards por lo de ERC20 - - volver a ver video de patrick - - agrega lo de upgrade - -- mejora: ver de actualizar todo a ethers 6 y hardhat-ethers v3 - -- proxy: Revisar este blog, que tiene un monton de cosas por hacer antes de pasar a proyx: - https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable - ---- - -nof dev: https://develop-nof-landing-7bteynlhua-uc.a.run.app/ -react icons preview fc: https://react-icons.github.io/react-icons/icons/fc/ -gitmoji.dev / commit, icons - -feat: Una nueva característica para el usuario. -fix: Arregla un bug que afecta al usuario. -perf: Cambios que mejoran el rendimiento del sitio. -build: Cambios en el sistema de build, tareas de despliegue o instalación. -ci: Cambios en la integración continua. -docs: Cambios en la documentación. -refactor: Refactorización del código como cambios de nombre de variables o funciones. -style: Cambios de formato, tabulaciones, espacios o puntos y coma, etc; no afectan al usuario. -test: Añade tests o refactoriza uno existente. -chore: Other changes that don't modify src or test files -revert: Reverts a previous commit - ---- - ---- - -**commit_msgs** - -sc update mumbai addresses: -git commit -m "[chore] :wrench: update mumbai addresses" - -**mumbai-wallets** - -cuenta dev1 mumbai: 0x35dad65F60c1A32c9895BE97f6bcE57D32792E83 -cuenta 2 mumbai: 0x117b706DEF40310eF5926aB57868dAcf46605b8d - -**hardhat-wallets** - -Account #0: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 (10000 ETH) -Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 - -Account #1: 0x70997970C51812dc3A010C7d01b50e0d17dc79C8 (10000 ETH) -Private Key: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d - -Account #2: 0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC (10000 ETH) -Private Key: 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a - -Account #3: 0x90F79bf6EB2c4f870365E785982E1f101E93b906 (10000 ETH) -Private Key: 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6 - -Account #4: 0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65 (10000 ETH) -Private Key: 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a - -Account #5: 0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc (10000 ETH) -Private Key: 0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba - -Account #6: 0x976EA74026E726554dB657fA54763abd0C3a0aa9 (10000 ETH) -Private Key: 0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e - -Account #7: 0x14dC79964da2C08b23698B3D3cc7Ca32193d9955 (10000 ETH) -Private Key: 0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356 - -Account #8: 0x23618e81E3f5cdF7f54C3d65f7FBc0aBf5B21E8f (10000 ETH) -Private Key: 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97 - -Account #9: 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 (10000 ETH) -Private Key: 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6 - -Account #10: 0xBcd4042DE499D14e55001CcbB24a551F3b954096 (10000 ETH) -Private Key: 0xf214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897 - -Account #11: 0x71bE63f3384f5fb98995898A86B02Fb2426c5788 (10000 ETH) -Private Key: 0x701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2bdf6f192c82 - -Account #12: 0xFABB0ac9d68B0B445fB7357272Ff202C5651694a (10000 ETH) -Private Key: 0xa267530f49f8280200edf313ee7af6b827f2a8bce2897751d06a843f644967b1 - -Account #13: 0x1CBd3b2770909D4e10f157cABC84C7264073C9Ec (10000 ETH) -Private Key: 0x47c99abed3324a2707c28affff1267e45918ec8c3f20b8aa892e8b065d2942dd - -Account #14: 0xdF3e18d64BC6A983f673Ab319CCaE4f1a57C7097 (10000 ETH) -Private Key: 0xc526ee95bf44d8fc405a158bb884d9d1238d99f0612e9f33d006bb0789009aaa - -Account #15: 0xcd3B766CCDd6AE721141F452C550Ca635964ce71 (10000 ETH) -Private Key: 0x8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61 - -Account #16: 0x2546BcD3c84621e976D8185a91A922aE77ECEc30 (10000 ETH) -Private Key: 0xea6c44ac03bff858b476bba40716402b03e41b8e97e276d1baec7c37d42484a0 - -Account #17: 0xbDA5747bFD65F08deb54cb465eB87D40e51B197E (10000 ETH) -Private Key: 0x689af8efa8c651a91ad287602527f3af2fe9f6501a7ac4b061667b5a93e037fd - -Account #18: 0xdD2FD4581271e230360230F9337D5c0430Bf44C0 (10000 ETH) -Private Key: 0xde9be858da4a475276426320d5e9262ecfc3ba460bfac56360bfa6c4c28b4ee0 - -Account #19: 0x8626f6940E2eb28930eFb4CeF49B2d1F2C9C1199 (10000 ETH) -Private Key: 0xdf57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e - -**beta testers wallets** - -Aleop 0xa0B12ebA61C11E1fE08057562A1373FbE352CFB1 -Ndawin 0xfA30E6c039277562E5231eB5684aA44351310A88 -Juanse 0xaEEdb1c33B2E4d6a4a1509fCd795dd97B550358E -MAGNUS 0x1A9df03FC2E04aeB661e885D918a73620B664A67 -Powder 0x4722bC41FEc3885EA72dA4961DA823E6365BBc4c -Mage Hernán 0xedD31e732EA38E95f0637634FE1EBb3Ca5055979 -P4 troy 0xCd432d93ADb30fAD8BcFdB1913BECE3F1D8C6f73 -Ingeniero 0xCCca402f251b8f9c002B4fb19BC1E31F7579079F -Xhaira 0xA345bc4a3C3145D4965400AD08089fA9926054b0 -Nachito 0x5FAF012e3A20932472531004B7661B203673aDdF -Valen 0x314D71a85a9cef2b49B872A0d88F5a4e0e466DdF, 0xC935343cA00F660D97E85E253fE3Ac561eA67ACA -SDKFelgrand: 0x12428d5688b0ec18CE352F4DD5a778909b5BA7B7 -derchef07: 0xb06918785F88c54D23B7116F4a12386499592557 -HaseoMisakiR: 0x6E8895d04077bf563e5aaE333eA004ef4B4A13A1 -festi: 0xa1Ba1e315EB3bB5958170CC49cec29EeC391EAE7 - ---- - ---- - -# contract deploys (mumbai) - -## 20231206 - -NEXT_PUBLIC_DAI_ADDRESS='0xdf302B697a0F6f3CEAB0624a4db2445a4B830043' -NEXT_PUBLIC_ALPHA_ADDRESS='0xC7F14830D02A6C50df31B33DF1CaBb1A87A59bAc' -NEXT_PUBLIC_GAMMA_PACKS_ADDRESS='0x420a83ABB2286255d529BB8AdB43071B2e8f148d' -NEXT_PUBLIC_GAMMA_CARDS_ADDRESS='0xCD1c83a7d2EbAF06052c1d8A14397834303e8368' -NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS='0x78842c8D8F1a695bb151bCa187af6cBD28250e3D' - -## 20231205 - -NEXT_PUBLIC_DAI_ADDRESS='0xF0F01CEd79B4Acf577E5864A690b268Ef4a11575' -NEXT_PUBLIC_ALPHA_ADDRESS='0xD25734a632005EeD4D26f7D4269D1c6D347d82C7' -NEXT_PUBLIC_GAMMA_PACKS_ADDRESS='0x1788D58b65A39e54308807A6aF46a186E626f41f' -NEXT_PUBLIC_GAMMA_CARDS_ADDRESS='0x87eF0d14aBA7C495d6844689d912777Aea6BcA5c' -NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS='0x2ABCCF3EbE6F4E74050182BdaED76F11654F5e2E' - -## 20231126 - -NEXT_PUBLIC_DAI_ADDRESS='0x291FaB5F25B87d1672452aE28dcEB1b8Cd2F82f7' -NEXT_PUBLIC_ALPHA_ADDRESS='0x643A6255Fe5aBdb26f43296284F535219E6dD13C' -NEXT_PUBLIC_GAMMA_PACKS_ADDRESS='0xFC24dFdb838b4544b91436F93da70d2B2476b634' -NEXT_PUBLIC_GAMMA_CARDS_ADDRESS='0xb2da44Bd77e922142F3Ef20504826e83D4e9fc0C' -NEXT_PUBLIC_GAMMA_OFFERS_ADDRESS='0xc2E8cEE4dC93F24b9Bc70A100083C0A6075694cE' - -## 20231124 - -NOF_DAI_CONTRACT_CURRENT_ADDRESS='0x291FaB5F25B87d1672452aE28dcEB1b8Cd2F82f7' -NOF_ALPHA_CONTRACT_CURRENT_ADDRESS='0x643A6255Fe5aBdb26f43296284F535219E6dD13C' -NOF_GAMMA_PACKS_CONTRACT_CURRENT_ADDRESS='0xFC24dFdb838b4544b91436F93da70d2B2476b634' -NOF_GAMMA_CARDS_CONTRACT_CURRENT_ADDRESS='0xb2da44Bd77e922142F3Ef20504826e83D4e9fc0C' -NOF_GAMMA_OFFERS_CONTRACT_CURRENT_ADDRESS='0x18537721EDfdEa2060640314BD996672E0DB921D' - ---- - -mongodump --uri "mongodb+srv://cloud:kSfwcgHL3y3A@nof.f14znpg.mongodb.net/nofys" -o . -mongodump --uri "mongodb+srv://cloud:kSfwcgHL3y3A@nof.f14znpg.mongodb.net/nombre_de_tu_base_de_datos" -o . -mongodump --uri "mongodb+srv://cloud:kSfwcgHL3y3A@nof.f14znpg.mongodb.net/sample_mflix" -o . - ---- diff --git a/.gitignore b/.gitignore index 9482df77..72a830a1 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ hardhat.config.ts # misc .DS_Store *.pem +.todo.md # debug npm-debug.log* From 920bdde314bf433d3f3827ddf589d64214ed6df4 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:02:31 -0300 Subject: [PATCH 03/34] [docs] :memo: update readme with new env variables --- README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 50471ce6..296b9278 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Create a .env file running the command in terminal touch .env ``` -The environment variables bellow needs to be set in the .env file when project is running locally: +The environment variables bellow needs to be set in the .env: ```sh SKIP_PREFLIGHT_CHECK=true @@ -49,13 +49,16 @@ GAMMA_SERVICE_URL='https://gamma-microservice-7bteynlhua-uc.a.run.app' GRAPH_URL='https://api.thegraph.com/subgraphs/name/tomasfrancizco/nof_polygon' WALLET_CONNECT_PROJECT_ID={you project ID from walletconnect.com} CHAIN_NODE_PROVIDER_URL='https://polygon-mumbai.g.alchemy.com/v2/YOUR_API_KEY' +NODE_PROVIDER_MUMBAI_URL='https://stylish-dawn-bush.bsc-testnet.quiknode.pro/{YOUR_NODE_PROVIDER_KEY}' +NODE_PROVIDER_BSC_TESTNET_URL='https://bsc-testnet.nodereal.io/v1/{YOUR_NODE_PROVIDER_KEY}' +NODE_PROVIDER_OPBNB_TESTNET='https://opbnb-testnet.nodereal.io/v1/{YOUR_NODE_PROVIDER_KEY}' +NOF_VERSION='v0.0.0' # Client-side NEXT_PUBLIC_APP_ENV='development' NEXT_PUBLIC_STORAGE_URL_ALPHA='https://storage.googleapis.com/nof-alpha' NEXT_PUBLIC_STORAGE_URL_GAMMA='https://storage.googleapis.com/nof-gamma' NEXT_PUBLIC_ADMIN_ACCOUNTS='0x35dad65F60c1A32c9895BE97f6bcE57D32792E83,0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266' -NEXT_PUBLIC_NOF_VERSION='v0.0.0' # Only por local environment to put contracts addresses from hardhat NEXT_PUBLIC_NOF_DAI_HARDHAT_CONTRACT_ADDRESS='' @@ -64,18 +67,12 @@ NEXT_PUBLIC_NOF_GAMMA_CARDS_HARDHAT_CONTRACT_ADDRESS='' NEXT_PUBLIC_NOF_GAMMA_PACKS_HARDHAT_CONTRACT_ADDRESS='' NEXT_PUBLIC_NOF_GAMMA_OFFERS_HARDHAT_CONTRACT_ADDRESS='' NEXT_PUBLIC_NOF_GAMMA_TICKETS_HARDHAT_CONTRACT_ADDRESS='' - - ``` -The source code of the smart contracts is located at [https://github.com/P4-Games/NoF-Smart-Contracts](https://github.com/P4-Games/NoF-Smart-Contracts). If you want to run them locally (example: on a hardhat or ganache node), after compiling them locally, change the addresses in the .env and set these options to network: +The source code of the smart contracts is located at [https://github.com/P4-Games/NoF-Smart-Contracts](https://github.com/P4-Games/NoF-Smart-Contracts). -```sh -NEXT_PUBLIC_CHAIN_NAME='localhost' -NEXT_PUBLIC_CHAIN_ID='0x539' -NEXT_PUBLIC_CHAIN_CURRENCY='ETH' -NEXT_PUBLIC_CHAIN_RPC_URL='http://localhost:8545' -``` + +All the environment variables needed are in the [example_env](./example_env) file. # Quick commands From c829662ddabd70ceb1fde0cf9bee7ebb2a293f33 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:04:20 -0300 Subject: [PATCH 04/34] [build] :recycle: move product-version to server-site (#378) --- Dockerfile | 4 ++-- cloudbuild.yaml | 4 ++-- example_env | 2 +- src/config.js | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4d03fa66..aadeab3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ ARG MAIL_SG_FROM ARG NEXT_PUBLIC_STORAGE_URL_ALPHA ARG NEXT_PUBLIC_STORAGE_URL_GAMMA ARG NEXT_PUBLIC_ADMIN_ACCOUNTS -ARG NEXT_PUBLIC_NOF_VERSION +ARG NOF_VERSION # env @@ -53,7 +53,7 @@ ENV MAIL_SG_FROM $MAIL_SG_FROM ENV NEXT_PUBLIC_STORAGE_URL_ALPHA $NEXT_PUBLIC_STORAGE_URL_ALPHA ENV NEXT_PUBLIC_STORAGE_URL_GAMMA $NEXT_PUBLIC_STORAGE_URL_GAMMA ENV NEXT_PUBLIC_ADMIN_ACCOUNTS $NEXT_PUBLIC_ADMIN_ACCOUNTS -ENV NEXT_PUBLIC_NOF_VERSION $NEXT_PUBLIC_NOF_VERSION +ENV NOF_VERSION $NOF_VERSION COPY --from=deps /app/node_modules ./node_modules diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 9897cba1..4e90ae72 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -30,7 +30,7 @@ steps: - NEXT_PUBLIC_STORAGE_URL_ALPHA=${_NEXT_PUBLIC_STORAGE_URL_ALPHA} - NEXT_PUBLIC_STORAGE_URL_GAMMA=${_NEXT_PUBLIC_STORAGE_URL_GAMMA} - NEXT_PUBLIC_ADMIN_ACCOUNTS=${_NEXT_PUBLIC_ADMIN_ACCOUNTS} - - NEXT_PUBLIC_NOF_VERSION=${_NEXT_PUBLIC_NOF_VERSION} + - NOF_VERSION=${_NOF_VERSION} # build the container images - name: "gcr.io/cloud-builders/docker" @@ -61,7 +61,7 @@ steps: "--build-arg", "NEXT_PUBLIC_STORAGE_URL_ALPHA=${_NEXT_PUBLIC_STORAGE_URL_ALPHA}", "--build-arg", "NEXT_PUBLIC_STORAGE_URL_GAMMA=${_NEXT_PUBLIC_STORAGE_URL_GAMMA}", "--build-arg", "NEXT_PUBLIC_ADMIN_ACCOUNTS=${_NEXT_PUBLIC_ADMIN_ACCOUNTS}", - "--build-arg", "NEXT_PUBLIC_NOF_VERSION=${_NEXT_PUBLIC_NOF_VERSION}", + "--build-arg", "NOF_VERSION=${_NOF_VERSION}", "." ] diff --git a/example_env b/example_env index 76aed636..1fcb3671 100644 --- a/example_env +++ b/example_env @@ -20,7 +20,7 @@ NEXT_PUBLIC_APP_ENV='development' NEXT_PUBLIC_STORAGE_URL_ALPHA='https://storage.googleapis.com/nof-alpha' NEXT_PUBLIC_STORAGE_URL_GAMMA='https://storage.googleapis.com/nof-gamma' NEXT_PUBLIC_ADMIN_ACCOUNTS='0x...,0X....,0xfa3....' // accounts separated by a comma -NEXT_PUBLIC_NOF_VERSION='v0.1.219' +NOF_VERSION='v0.1.219' // Only por local environment to put contracts addresses from hardhat NEXT_PUBLIC_NOF_DAI_CONTRACT_CURRENT_ADDRESS='' diff --git a/src/config.js b/src/config.js index c46c2365..3dad20fd 100644 --- a/src/config.js +++ b/src/config.js @@ -52,7 +52,7 @@ export const storageUrlGamma = process.env.NEXT_PUBLIC_STORAGE_URL_GAMMA || 'https://storage.googleapis.com/nof-gamma' export const adminAccounts = process.env.NEXT_PUBLIC_ADMIN_ACCOUNTS || '0x8a8F5e5ae88532c605921f320a92562c9599fB9E' -export const nofVersion = process.env.NEXT_PUBLIC_NOF_VERSION || 'v0.1.219' +export const nofVersion = process.env.NOF_VERSION || 'v0.1.219' // ------------------------------------------------------------------ // calculated variables From ec9955c884e10ac751e266be5faf5ec978ce545f Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:06:41 -0300 Subject: [PATCH 05/34] [refactor] :recycle: read product-version from api (#378) --- src/components/Navbar/Navbar.jsx | 13 +++++++++++-- src/pages/api/version/v.js | 5 +++++ src/services/handleVersion.js | 17 +++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 src/pages/api/version/v.js create mode 100644 src/services/handleVersion.js diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index 7fd6987f..9ae9139a 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -10,7 +10,7 @@ import AccountInfo from './AccountInfo.jsx' import NotificationInfo from './NotificationInfo.jsx' import LanguageSelection from '../LanguageSelection' import { useLayoutContext, useWeb3Context, useNotificationContext } from '../../hooks' -import { nofVersion } from '../../config.js' +import { getProductVersion } from '../../services/handleVersion.js' function Navbar() { const { t } = useTranslation() @@ -25,6 +25,7 @@ function Navbar() { const [notificationsNbrClass, setNotificationsNbrClass] = useState('notification__badge__1') const { notifications, getNotificationsByUser } = useNotificationContext() const { walletAddress } = useWeb3Context() + const [productVersion, setProductVersion] = useState('1.0.0') const accountRef = useRef(null) const notificationRef = useRef(null) @@ -65,6 +66,14 @@ function Navbar() { // setNotificationsNbr(20) // setNotificationsNbrClass(20 > 9 ? 'notification__badge__2' : 'notification__badge__1') }, [notifications, walletAddress]) //eslint-disable-line react-hooks/exhaustive-deps + const fetchVersion = async () => { + const version = await getProductVersion() + return version + } + + useEffect(() => { + fetchVersion().then(setProductVersion) + }, [productVersion]) //eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { document.addEventListener('mousedown', handleClickOutside) @@ -89,7 +98,7 @@ function Navbar() { nof - {nofVersion} + {productVersion} ) diff --git a/src/pages/api/version/v.js b/src/pages/api/version/v.js new file mode 100644 index 00000000..2041e3fc --- /dev/null +++ b/src/pages/api/version/v.js @@ -0,0 +1,5 @@ +import { nofVersion } from '../../../config' + +export default async function handler(req, res) { + res.status(200).json({ version: nofVersion }) +} diff --git a/src/services/handleVersion.js b/src/services/handleVersion.js new file mode 100644 index 00000000..8e63b2d2 --- /dev/null +++ b/src/services/handleVersion.js @@ -0,0 +1,17 @@ +import RenderResult from "next/dist/server/render-result" + +export const getProductVersion = async () => { + try { + const res = await fetch('/api/version/v', { + method: 'GET', + headers: { + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json' + } + }) + const result = await res.json() + return result.version + } catch (ex) { + console.log('error en getProductVersion', ex) + } +} From 23a972b952a3709e65e5e3fc4d2959c5e923b366 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:07:01 -0300 Subject: [PATCH 06/34] [chore] :fire: remove unused file --- .github/workflows/scripts/gitTag.sh | 65 ----------------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/scripts/gitTag.sh diff --git a/.github/workflows/scripts/gitTag.sh b/.github/workflows/scripts/gitTag.sh deleted file mode 100644 index c7d76d98..00000000 --- a/.github/workflows/scripts/gitTag.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash - -VERSION="" - -# get parameters -while getopts v: flag -do - case "${flag}" in - v) VERSION=${OPTARG};; - esac -done - -# get highest tag number, and add v0.1.0 if doesn't exist -git fetch --prune --unshallow 2>/dev/null -CURRENT_VERSION=`git describe --abbrev=0 --tags 2>/dev/null` - -if [[ $CURRENT_VERSION == '' ]] -then - CURRENT_VERSION='v0.1.0' -fi -echo "Current Version: $CURRENT_VERSION" - -# replace . with space so can split into an array -CURRENT_VERSION_PARTS=(${CURRENT_VERSION//./ }) - -# get number parts -VNUM1=${CURRENT_VERSION_PARTS[0]} -VNUM2=${CURRENT_VERSION_PARTS[1]} -VNUM3=${CURRENT_VERSION_PARTS[2]} - -if [[ $VERSION == 'major' ]] -then - VNUM1=v$((VNUM1+1)) -elif [[ $VERSION == 'minor' ]] -then - VNUM2=$((VNUM2+1)) -elif [[ $VERSION == 'patch' ]] -then - VNUM3=$((VNUM3+1)) -else - echo "No version type (https://semver.org/) or incorrect type specified, try: -v [major, minor, patch]" - exit 1 -fi - -# create new tag -NEW_TAG="$VNUM1.$VNUM2.$VNUM3" -echo "($VERSION) updating $CURRENT_VERSION to $NEW_TAG" - -# get current hash and see if it already has a tag -GIT_COMMIT=`git rev-parse HEAD` -NEEDS_TAG=`git describe --contains $GIT_COMMIT 2>/dev/null` - -# only tag if no tag already -if [ -z "$NEEDS_TAG" ]; then - echo "Tagged with $NEW_TAG" - git tag $NEW_TAG - git push --tags - git push -else - echo "Already a tag on this commit" -fi - -echo "git-tag=$NEW_TAG" >> $GITHUB_OUTPUT - -exit 0 From 404e5061e48835f0d8cc06f5270ce52f91c9c1d5 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:09:55 -0300 Subject: [PATCH 07/34] [build] :hammer: update git scripts (#378) --- .github/workflows/gcp.yml | 9 ++++-- scripts/docker-build.sh | 2 +- scripts/product_version.sh | 62 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 scripts/product_version.sh diff --git a/.github/workflows/gcp.yml b/.github/workflows/gcp.yml index 964961a0..e8165ff3 100644 --- a/.github/workflows/gcp.yml +++ b/.github/workflows/gcp.yml @@ -2,7 +2,7 @@ name: Build and Deploy to Cloud Run on: push: - branches: [ main ] + branches: [ main, feature/version-auto ] env: PROJECT_ID: number-one-fan @@ -25,7 +25,12 @@ jobs: - name: 'Set up Cloud SDK' uses: 'google-github-actions/setup-gcloud@v0' - + + - name: Set NOF_VERSION in environment + id: env-nof-version + run: | + bash ./scripts/product_version.sh -v patch + - name: Build Docker Image run: docker build -t ${{ env.IMAGE_NAME }}:latest . diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh index 3eb512cf..978b5aeb 100644 --- a/scripts/docker-build.sh +++ b/scripts/docker-build.sh @@ -32,5 +32,5 @@ docker build \ --build-arg NEXT_PUBLIC_STORAGE_URL_ALPHA="$NEXT_PUBLIC_STORAGE_URL_ALPHA" \ --build-arg NEXT_PUBLIC_STORAGE_URL_GAMMA="$NEXT_PUBLIC_STORAGE_URL_GAMMA" \ --build-arg NEXT_PUBLIC_ADMIN_ACCOUNTS="$NEXT_PUBLIC_ADMIN_ACCOUNTS" \ - --build-arg NEXT_PUBLIC_NOF_VERSION="$NEXT_PUBLIC_NOF_VERSION" \ + --build-arg NOF_VERSION="$NOF_VERSION" \ -t my-nextjs-app .. diff --git a/scripts/product_version.sh b/scripts/product_version.sh new file mode 100644 index 00000000..b5311d49 --- /dev/null +++ b/scripts/product_version.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# Just set product versión in environment without TAG source code! +# This script is used in .github\workflows\gcp.yml + +VERSION="" + +# get parameters +while getopts v: flag +do + case "${flag}" in + v) VERSION=${OPTARG};; + esac +done + +# get highest tag number, and add v0.1.0 if doesn't exist +git fetch --prune --unshallow 2>/dev/null +CURRENT_VERSION=$(git describe --abbrev=0 --tags 2>/dev/null) + +if [[ $CURRENT_VERSION == '' ]] +then + CURRENT_VERSION='v0.1.0' +fi +echo "Current Version: $CURRENT_VERSION" + +# replace . with space so can split into an array +CURRENT_VERSION_PARTS=(${CURRENT_VERSION//./ }) + +# get number parts +VNUM1=${CURRENT_VERSION_PARTS[0]} +VNUM2=${CURRENT_VERSION_PARTS[1]} +VNUM3=${CURRENT_VERSION_PARTS[2]} + +if [[ $VERSION == 'major' ]] +then + VNUM1=v$((VNUM1+1)) + VNUM2=0 + VNUM3=0 +elif [[ $VERSION == 'minor' ]] +then + VNUM2=$((VNUM2+1)) + VNUM3=0 +elif [[ $VERSION == 'patch' ]] +then + VNUM3=$((VNUM3+1)) +else + echo "No version type (https://semver.org/) or incorrect type specified, try: -v [major, minor, patch]" + exit 1 +fi + +# create new tag +NEW_TAG="$VNUM1.$VNUM2.$VNUM3" +echo "($VERSION) updating $CURRENT_VERSION to $NEW_TAG" + +# set tag in environment to use in frontend +NOF_VERSION=$NEW_TAG +echo "NOF_VERSION=$NEW_TAG" + +# write tag to GITHUB_ENV for use in GitHub Actions +echo "NOF_VERSION=$NEW_TAG" >> $GITHUB_ENV + +exit 0 From 0426d1b5a60be128d0827162637d92d1ea7a7ff5 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:10:37 -0300 Subject: [PATCH 08/34] [chore] :art: prettier --- README.md | 3 +-- src/pages/api/version/v.js | 2 +- src/services/handleVersion.js | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 296b9278..7ea347a2 100644 --- a/README.md +++ b/README.md @@ -69,8 +69,7 @@ NEXT_PUBLIC_NOF_GAMMA_OFFERS_HARDHAT_CONTRACT_ADDRESS='' NEXT_PUBLIC_NOF_GAMMA_TICKETS_HARDHAT_CONTRACT_ADDRESS='' ``` -The source code of the smart contracts is located at [https://github.com/P4-Games/NoF-Smart-Contracts](https://github.com/P4-Games/NoF-Smart-Contracts). - +The source code of the smart contracts is located at [https://github.com/P4-Games/NoF-Smart-Contracts](https://github.com/P4-Games/NoF-Smart-Contracts). All the environment variables needed are in the [example_env](./example_env) file. diff --git a/src/pages/api/version/v.js b/src/pages/api/version/v.js index 2041e3fc..2f0d1fd2 100644 --- a/src/pages/api/version/v.js +++ b/src/pages/api/version/v.js @@ -1,5 +1,5 @@ import { nofVersion } from '../../../config' export default async function handler(req, res) { - res.status(200).json({ version: nofVersion }) + res.status(200).json({ version: nofVersion }) } diff --git a/src/services/handleVersion.js b/src/services/handleVersion.js index 8e63b2d2..4ab2c629 100644 --- a/src/services/handleVersion.js +++ b/src/services/handleVersion.js @@ -1,4 +1,4 @@ -import RenderResult from "next/dist/server/render-result" +import RenderResult from 'next/dist/server/render-result' export const getProductVersion = async () => { try { From 8adfd9f945a2d17f69f747a01ff070b5ebba23fd Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:43:26 -0300 Subject: [PATCH 09/34] [reactor] :recycle: allow multiple environments in network config (#373) --- src/config.js | 49 ++++++--- src/context/Web3Context.js | 216 +++++++++++++++---------------------- 2 files changed, 124 insertions(+), 141 deletions(-) diff --git a/src/config.js b/src/config.js index 3dad20fd..84926cd2 100644 --- a/src/config.js +++ b/src/config.js @@ -95,9 +95,12 @@ export const NETWORKS = { hardhat: { config: { enabled: 'true', - environment: 'development', + environments: ['development'], chainName: 'localhost', - chainId: '0x539', + chainId: { + h: '0x539', + d: 1337 + }, chainCurrency: 'ETH', ChainRpcUrl: 'http://localhost:8545', chainExplorerUrl: 'http://localhost:8545', @@ -118,9 +121,12 @@ export const NETWORKS = { amoy: { config: { enabled: 'true', - environment: 'testing', + environments: ['testing'], chainName: 'amoy', - chainId: '0x13882', + chainId: { + h: '0x13882', + d: 80002 + }, chainCurrency: 'MATIC', ChainRpcUrl: 'https://rpc-amoy.polygon.technology', chainExplorerUrl: 'https://www.oklink.com/amoy', @@ -140,9 +146,12 @@ export const NETWORKS = { mumbai: { config: { enabled: 'true', - environment: 'testing', + environments: ['testing'], chainName: 'mumbai', - chainId: '0x13881', + chainId: { + h: '0x13881', + d: 80001 + }, chainCurrency: 'MATIC', ChainRpcUrl: 'https://rpc-mumbai.maticvigil.com', chainExplorerUrl: 'https://mumbai.polygonscan.com', @@ -163,9 +172,12 @@ export const NETWORKS = { 'bsc-testnet': { config: { enabled: 'true', - environment: 'testing', + environments: ['testing'], chainName: 'bsc-testnet', - chainId: '0x61', + chainId: { + h: '0x61', + d: 97 + }, chainCurrency: 'tBNB', ChainRpcUrl: 'https://bsc-testnet-dataseed.bnbchain.org', chainExplorerUrl: 'https://testnet.bscscan.com', @@ -185,9 +197,12 @@ export const NETWORKS = { 'opbnb-testnet': { config: { enabled: 'true', - environment: 'testing', + environments: ['testing'], chainName: 'opBNB-testnet', - chainId: '0x15eb', + chainId: { + h: '0x15eb', + d: 5611 + }, chainCurrency: 'tBNB', ChainRpcUrl: 'https://opbnb-testnet-rpc.bnbchain.org', chainExplorerUrl: 'https://opbnb-testnet.bscscan.com', @@ -207,9 +222,12 @@ export const NETWORKS = { matic: { config: { enabled: 'true', - environment: 'production', + environments: ['production'], chainName: 'matic', - chainId: '0x89', + chainId: { + h: '0x89', + d: 137 + }, chainCurrency: 'MATIC', ChainRpcUrl: 'https://polygon-mainnet.infura.io', chainExplorerUrl: 'https://polygonscan.com', @@ -229,9 +247,12 @@ export const NETWORKS = { sepolia: { config: { enabled: 'true', - environment: 'production', + environments: ['production', 'testing'], chainName: 'sepolia', - chainId: '0xaa36a7', + chainId: { + h: '0xaa36a7', + d: 11155111 + }, chainCurrency: 'ETH', ChainRpcUrl: 'https://sepolia.gateway.tenderly.co', chainExplorerUrl: 'https://sepolia.etherscan.io', diff --git a/src/context/Web3Context.js b/src/context/Web3Context.js index fda45a9e..b7be6068 100644 --- a/src/context/Web3Context.js +++ b/src/context/Web3Context.js @@ -1,9 +1,14 @@ import { useState, useEffect, createContext, useContext } from 'react' import PropTypes from 'prop-types' import { ethers } from 'ethers' -import { createWeb3Modal, defaultConfig } from '@web3modal/ethers5/react' -import { useWeb3ModalProvider, useWeb3ModalAccount } from '@web3modal/ethers5/react' -import { useWeb3Modal, useDisconnect } from '@web3modal/ethers5/react' +import { + createWeb3Modal, + defaultConfig, + useWeb3ModalProvider, + useWeb3ModalAccount, + useWeb3Modal, + useDisconnect +} from '@web3modal/ethers5/react' import daiAbi from './abis/testDai/TestDAI.v3.sol/NofTestDAIV3.json' import alphaAbi from './abis/alpha/Alpha.v4.sol/NofAlphaV4.json' import gammaPacksAbi from './abis/gamma/GammaPacks.v3.sol/NofGammaPacksV3.json' @@ -26,7 +31,6 @@ function Web3ContextProvider({ children }) { const [web3Error, setWeb3Error] = useState('') const [wallets, setWallets] = useState(null) const [isValidNetwork, setIsValidNetwork] = useState(false) - const [isValidNetworkForAlpha, setIsValidNetworkForAlpha] = useState(false) const [daiContract, setDaiContract] = useState(null) const [alphaContract, setAlphaContract] = useState(null) const [gammaPacksContract, setGammaPacksContract] = useState(null) @@ -48,13 +52,13 @@ function Web3ContextProvider({ children }) { const enabledNetworks = Object.keys(NETWORKS) .filter((networkKey) => { const network = NETWORKS[networkKey] - return network.config.enabled === 'true' && network.config.environment === environment + return network.config.enabled === 'true' && network.config.environments.includes(environment) }) .map((networkKey) => { const network = NETWORKS[networkKey] return { web3ModalConfig: { - chainId: hexToDec(network.config.chainId), + chainId: network.config.chainId.d, name: network.config.chainName, currency: network.config.chainCurrency, explorerUrl: network.config.chainExplorerUrl, @@ -68,13 +72,12 @@ function Web3ContextProvider({ children }) { const enabledNetworkNames = enabledNetworks .map((network) => network.web3ModalConfig.name) .join(', ') - const enabledNetworkChainIds = enabledNetworks.map((network) => network.web3ModalConfig.chainId) const webModalConfigs = enabledNetworks.map((network) => network.web3ModalConfig) createWeb3Modal({ ethersConfig: defaultConfig({ metadata, - defaultChainId: hexToDec(enabledNetworks[0].config.chainId), + defaultChainId: enabledNetworks[0].config.chainId.d, enableEIP6963: true, enableInjected: true, enableCoinbase: true, @@ -90,117 +93,47 @@ function Web3ContextProvider({ children }) { }) const { open } = useWeb3Modal() - async function requestAccount() { - let web3Provider - let accountAddress - try { - if (!walletProvider) return - web3Provider = new ethers.providers.Web3Provider(walletProvider) - - if (!web3Provider) return - const _wallets = await web3Provider.listAccounts() - const _chainId = (await web3Provider.getNetwork()).chainId - - setWallets(_wallets) - accountAddress = await web3Provider.getSigner().getAddress() - const chainIdHex = decToHex(_chainId) - - const networkKeys = Object.keys(NETWORKS) - const isValidNetwork = networkKeys.some((networkKey) => { - const network = NETWORKS[networkKey] - return ( - network.config.enabled === 'true' && - network.config.environment === environment && - network.config.chainId === chainIdHex - ) - }) - - const isValidNetworkForAlpha = () => { - const network = NETWORKS['sepolia'] - return network.config.chainId === chainIdHex - } - - if (isValidNetwork) { - connectContracts(web3Provider.getSigner()) - setIsValidNetwork(true) - } else { - setIsValidNetwork(false) - setWeb3Error('account_invalid_network') - } - - if (isValidNetworkForAlpha()) { - connectContractsForAlpha(web3Provider.getSigner()) - setIsValidNetworkForAlpha(true) - } else { - setIsValidNetworkForAlpha(false) - setWeb3Error('account_invalid_network') - } - - return [web3Provider, accountAddress] - } catch (e) { - console.error({ e }) - } - } - - useEffect(() => { - requestAccount() - }, [isConnected, chainId, address]) //eslint-disable-line react-hooks/exhaustive-deps - - function connectWallet() { - try { - setWeb3Error('') - open() - } catch (e) { - console.error({ e }) - } - } - function getCurrentNetwork() { - const network = enabledNetworks.find((network) => network.web3ModalConfig.chainId === chainId) - return network ? network : null - } - - function getCurrentNetworkForAlpha() { - const sepolia = NETWORKS['sepolia'] - const network = sepolia.config.chainId === decToHex(chainId) - sepolia.web3ModalConfig = { - chainId: hexToDec(sepolia.config.chainId), - name: sepolia.config.chainName, - currency: sepolia.config.chainCurrency, - explorerUrl: sepolia.config.chainExplorerUrl, - rpcUrl: sepolia.config.ChainRpcUrl - } - return network ? sepolia : null + const network = enabledNetworks.find((ntwk) => ntwk.web3ModalConfig.chainId === chainId) + return network || null } function connectContracts(_signer) { try { - const _contracts = getCurrentNetwork().contracts + console.info('connectContracts') + const currentNetwork = getCurrentNetwork() + if (!currentNetwork) { + // eslint-disable-next-line no-console + console.warn('No current network setting contracts') + return + } - const daiContractInstance = new ethers.Contract(_contracts.daiAddress, daiAbi.abi, _signer) + const { contracts } = currentNetwork + + const daiContractInstance = new ethers.Contract(contracts.daiAddress, daiAbi.abi, _signer) const alphaContractInstance = new ethers.Contract( - _contracts.alphaAddress, + contracts.alphaAddress, alphaAbi.abi, _signer ) const gammaPacksContractInstance = new ethers.Contract( - _contracts.gammaPackAddress, + contracts.gammaPackAddress, gammaPacksAbi.abi, _signer ) const gammaCardsContractInstance = new ethers.Contract( - _contracts.gammaCardsAddress, + contracts.gammaCardsAddress, gammaCardsAbi.abi, _signer ) const gammaOffersContractInstance = new ethers.Contract( - _contracts.gammaOffersAddress, + contracts.gammaOffersAddress, gammaOffersAbi.abi, _signer ) const gammaTicketsContractInstance = new ethers.Contract( - _contracts.gammaTicketsAddress, + contracts.gammaTicketsAddress, gammaTicketsAbi.abi, _signer ) @@ -246,7 +179,7 @@ function Web3ContextProvider({ children }) { }) gammaCardsContractInstance.on('AlbumCompleted', (user, clazz) => { - if (parseInt(clazz) === 1) addNotification(user, 'notification_album_120_completed', []) + if (parseInt(clazz, 10) === 1) addNotification(user, 'notification_album_120_completed', []) else addNotification(user, 'notification_album_60_completed', []) }) @@ -263,24 +196,66 @@ function Web3ContextProvider({ children }) { setGammaOffersContract(gammaOffersContractInstance) setGammaTicketsContract(gammaTicketsContractInstance) } catch (e) { + // eslint-disable-next-line no-console + console.info('connectContracts error') console.error({ e }) } } - function connectContractsForAlpha(_signer) { + async function requestAccount() { + let web3Provider + try { - const _contracts = getCurrentNetworkForAlpha().contracts + console.info('requestAccount') - const daiContractInstance = new ethers.Contract(_contracts.daiAddress, daiAbi.abi, _signer) + if (!walletProvider) return + web3Provider = new ethers.providers.Web3Provider(walletProvider) - const alphaContractInstance = new ethers.Contract( - _contracts.alphaAddress, - alphaAbi.abi, - _signer - ) - setDaiContract(daiContractInstance) - setAlphaContract(alphaContractInstance) + if (!web3Provider) return + const providerWallets = await web3Provider.listAccounts() + const providerChainId = (await web3Provider.getNetwork()).chainId + + setWallets(providerWallets) + await web3Provider.getSigner().getAddress() + + const networkKeys = Object.keys(NETWORKS) + const validNetwork = networkKeys.some((networkKey) => { + const network = NETWORKS[networkKey] + return ( + network.config.enabled.toString().toLowerCase() === 'true' && + network.config.environments.includes(environment) && + network.config.chainId.d === providerChainId + ) + }) + + if (validNetwork) { + connectContracts(web3Provider.getSigner()) + setIsValidNetwork(true) + } else { + setIsValidNetwork(false) + setWeb3Error('account_invalid_network') + } + + // return [web3Provider, accountAddress] } catch (e) { + // eslint-disable-next-line no-console + console.info('requestAccount error') + console.error({ e }) + } + } + + useEffect(() => { + requestAccount() + }, [isConnected, chainId, address]) //eslint-disable-line react-hooks/exhaustive-deps + + function connectWallet() { + try { + console.info('connectWallet') + setWeb3Error('') + open() + } catch (e) { + // eslint-disable-next-line no-console + console.info('connectWallet error') console.error({ e }) } } @@ -289,18 +264,9 @@ function Web3ContextProvider({ children }) { disconnect() setWallets(null) setIsValidNetwork(false) - setIsValidNetworkForAlpha(false) setWeb3Error('') } - function decToHex(number) { - return `0x${parseInt(number).toString(16)}` - } - - function hexToDec(str) { - return parseInt(str, 16) - } - useEffect(() => { if (window && typeof window.ethereum === 'undefined') { setWeb3Error('account_no_metamask') @@ -309,32 +275,28 @@ function Web3ContextProvider({ children }) { if (window && window.ethereum !== undefined) { window.ethereum.on('accountsChanged', (accounts) => { + // eslint-disable-next-line no-console console.log('accountsChanged event', accounts, address) }) - window.ethereum.on('chainChanged', (newChain) => { + window.ethereum.on('chainChanged', (newChainIdDec) => { setWeb3Error('account_invalid_network') - const _chanIdHex = decToHex(newChain) setIsValidNetwork(false) - setIsValidNetworkForAlpha(false) - if (enabledNetworkChainIds.includes(_chanIdHex)) { + const enabledNetworkChainIdsDec = enabledNetworks.map( + (network) => network.web3ModalConfig.chainId + ) + if (enabledNetworkChainIdsDec.includes(newChainIdDec)) { const provider = new ethers.providers.Web3Provider(window.ethereum, 'any') const signer = provider.getSigner() connectContracts(signer) setIsValidNetwork(true) } - - if (_chanIdHex === NETWORKS['sepolia'].config.chainId) { - const provider = new ethers.providers.Web3Provider(window.ethereum, 'any') - const signer = provider.getSigner() - connectContractsForAlpha(signer) - setIsValidNetworkForAlpha(true) - } }) } }, []) //eslint-disable-line react-hooks/exhaustive-deps + // eslint-disable-next-line react/jsx-no-constructed-context-values const value = { chainId, wallets, @@ -348,13 +310,13 @@ function Web3ContextProvider({ children }) { web3Error, isConnected, isValidNetwork, - isValidNetworkForAlpha, enabledNetworkNames, connectWallet, disconnectWallet, getCurrentNetwork } + // eslint-disable-next-line react/jsx-filename-extension return {children} } From 51f9c751d610c4d70c3096925414803de55305d2 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:44:15 -0300 Subject: [PATCH 10/34] [chore] :sparkles: linter --- README.md | 3 ++- src/components/FlipBook/FlipBook.jsx | 4 ++-- src/components/Footer/Footer.jsx | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7ea347a2..296b9278 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,8 @@ NEXT_PUBLIC_NOF_GAMMA_OFFERS_HARDHAT_CONTRACT_ADDRESS='' NEXT_PUBLIC_NOF_GAMMA_TICKETS_HARDHAT_CONTRACT_ADDRESS='' ``` -The source code of the smart contracts is located at [https://github.com/P4-Games/NoF-Smart-Contracts](https://github.com/P4-Games/NoF-Smart-Contracts). +The source code of the smart contracts is located at [https://github.com/P4-Games/NoF-Smart-Contracts](https://github.com/P4-Games/NoF-Smart-Contracts). + All the environment variables needed are in the [example_env](./example_env) file. diff --git a/src/components/FlipBook/FlipBook.jsx b/src/components/FlipBook/FlipBook.jsx index e320178c..7ef3dd88 100644 --- a/src/components/FlipBook/FlipBook.jsx +++ b/src/components/FlipBook/FlipBook.jsx @@ -66,8 +66,8 @@ const FlipBook = (props) => { ? 'hero__top__album__book__page' : '' : isClassesReplaced - ? 'hero__top__album__book__page0' - : '' + ? 'hero__top__album__book__page0' + : '' } data-density='hard' number={index + 1} diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx index 9a2a502c..0fc760cf 100644 --- a/src/components/Footer/Footer.jsx +++ b/src/components/Footer/Footer.jsx @@ -1,6 +1,7 @@ import React from 'react' -import FooterButtons from './FooterButtons' + import { useLayoutContext } from '../../hooks' +import FooterButtons from './FooterButtons' function Footer() { const { mobile, turnNextPage, turnPrevPage } = useLayoutContext() From 9279cb54424e31d2d75f1cbda39fc04b5db1b638 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:45:27 -0300 Subject: [PATCH 11/34] [fix] :bug: increase listeners events in next-config (#375) --- next.config.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/next.config.js b/next.config.js index ab0efce8..e13c3a7d 100644 --- a/next.config.js +++ b/next.config.js @@ -5,13 +5,28 @@ const nextConfig = { const path = require('path') const { i18n } = require('./next-i18next.config') const { pwa } = require('./next-pwa.config') +const { EventEmitter } = require('events'); + +// Configuración del EventEmitter +const originalAddListener = EventEmitter.prototype.addListener; +EventEmitter.prototype.addListener = function(event) { + console.log(`Adding listener for event: ${event}`); + return originalAddListener.apply(this, arguments); +}; +EventEmitter.defaultMaxListeners = 50; module.exports = nextConfig module.exports = { i18n, pwa, // https://nextjs.org/docs/api-reference/next.config.js/compression + trailingSlash: true, compress: true, + swcMinify: true, + eslint: { + // Warning: This allows production builds to successfully complete even if // your project has ESLint errors. + ignoreDuringBuilds: true, + }, images: { domains: ['storage.googleapis.com'] }, @@ -35,9 +50,12 @@ module.exports = { } } ] + }, + { + test: /\.svg$/, + use: ['@svgr/webpack'], }) - - return config + return config; }, // https://nextjs.org/docs/api-reference/next.config.js/headers async headers() { From ff8ddf822593a51e317df82b322fa6f548013e37 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:47:29 -0300 Subject: [PATCH 12/34] [refactor] :recycle: move string function to utils --- src/utils/numberUtils.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/utils/numberUtils.js diff --git a/src/utils/numberUtils.js b/src/utils/numberUtils.js new file mode 100644 index 00000000..b8d1fb7e --- /dev/null +++ b/src/utils/numberUtils.js @@ -0,0 +1,7 @@ +export function decToHex(number) { + return `0x${parseInt(number, 10).toString(16)}` +} + +export function hexToDec(str) { + return parseInt(str, 16) +} From 7e6ed88356f374a3a637f25892c5c191600a1e02 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:47:49 -0300 Subject: [PATCH 13/34] [refactor] :recycle: move string functions to string-utils --- src/utils/stringUtils.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/utils/stringUtils.js b/src/utils/stringUtils.js index 77e8f08b..0bd7ce38 100644 --- a/src/utils/stringUtils.js +++ b/src/utils/stringUtils.js @@ -4,9 +4,13 @@ export const capitalizeFirstLetter = (word) => export const getAccountAddressText = (walletAddress) => { if (walletAddress <= 15 || !walletAddress) { return walletAddress - } else { - const firstPart = walletAddress.substring(0, 7) - const lastPart = walletAddress.substring(walletAddress.length - 5) - return `${firstPart}...${lastPart}` } + const firstPart = walletAddress.substring(0, 7) + const lastPart = walletAddress.substring(walletAddress.length - 5) + return `${firstPart}...${lastPart}` +} + +export function removeQuotes(text) { + if (text === '' || !text) return text + return text.replace(/['"]/g, '') } From 0a8366bc82d0a2e521bbdc8942468bf2dca06160 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:48:12 -0300 Subject: [PATCH 14/34] [refactor] :recycle: move string functions to string-utils --- src/config.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/config.js b/src/config.js index 84926cd2..70007b79 100644 --- a/src/config.js +++ b/src/config.js @@ -14,6 +14,9 @@ // server-side environment variables // ------------------------------------------------------------------ */ + +import { removeQuotes } from './utils/stringUtils' + export const MONGODB = process.env.MONGODB || 'mongodb://localhost:27017' export const environment = (process.env.NEXT_PUBLIC_APP_ENV || 'testing').toLowerCase() @@ -272,8 +275,3 @@ export const NETWORKS = { } // ------------------------------------------------------------------ - -function removeQuotes(text) { - if (text === '' || !text) return text - return text.replace(/['"]/g, '') -} From ed903fdb145c0e60285dec00406d03095763edcf Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:48:59 -0300 Subject: [PATCH 15/34] [chore] :rotating_light: fix linter warning (#377) --- src/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.js b/src/config.js index 70007b79..96708c1a 100644 --- a/src/config.js +++ b/src/config.js @@ -33,7 +33,7 @@ export const MAIL_CONFIG = { sg_key: process.env.MAIL_SG_KEY, sg_from: process.env.MAIL_SG_FROM || 'no-reply@nof.town', ethereal_host: process.env.MAIL_ETHEREAL_HOST || 'smtp.ethereal.email', - ethereal_port: parseInt(process.env.MAIL_ETHEREAL_PORT || 587), + ethereal_port: parseInt(process.env.MAIL_ETHEREAL_PORT || 587, 10), ethereal_user: process.env.MAIL_ETHEREAL_USER, ethereal_pswd: process.env.MAIL_ETHEREAL_PSWD } From ece4b263b17a8ad323d7f259314c00b688ca3301 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:49:35 -0300 Subject: [PATCH 16/34] [chore] :wastebasket: Deprecate code that needs to be cleaned up. (#377) --- src/config.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/config.js b/src/config.js index 96708c1a..5c6af303 100644 --- a/src/config.js +++ b/src/config.js @@ -23,8 +23,10 @@ export const environment = (process.env.NEXT_PUBLIC_APP_ENV || 'testing').toLowe export const gammaServiceUrl = process.env.GAMMA_SERVICE_URL || 'https://gamma-microservice-7bteynlhua-uc.a.run.app' +/* export const graphUrl = process.env.GRAPH_URL || 'https://api.thegraph.com/subgraphs/name/tomasfrancizco/nof_polygon' +*/ export const MAIL_CONFIG = { client: process.env.MAIL_CLIENT || 'sendgrid', From 1e8654fd86e50486bf59d9429edeca501d7d90d9 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:51:03 -0300 Subject: [PATCH 17/34] [chore] :rotating_light: fix linter warning (#377) --- src/sections/Alpha/AlphaAlbums.jsx | 2 -- src/services/dai.js | 4 ---- src/services/handleVersion.js | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/sections/Alpha/AlphaAlbums.jsx b/src/sections/Alpha/AlphaAlbums.jsx index 6c0820f4..6fb403aa 100644 --- a/src/sections/Alpha/AlphaAlbums.jsx +++ b/src/sections/Alpha/AlphaAlbums.jsx @@ -19,7 +19,6 @@ import { storageUrlAlpha } from '../../config' import { useTranslation } from 'next-i18next' import CustomImage from '../../components/CustomImage' import { useWeb3Context } from '../../hooks' -import { emitError, emitSuccess } from '../../utils/alert' SwiperCore.use([Parallax, Autoplay, Navigation, Pagination, Scrollbar, A11y]) @@ -44,7 +43,6 @@ const AlphaAlbums = ({ albums, setSeasonName }) => { }, [getCurrentNetwork, alphaContract]) const handleRedirectAlbum = (album) => { - console.log('handleRedirectAlbum', album) if (album[0].completion === 5) { // Open the album on OpenSea if the completion status is 5 window.open(`${openSeaUrl}/${album[0].tokenId}`, '_blank') diff --git a/src/services/dai.js b/src/services/dai.js index 2ac9a71b..23afa8ed 100644 --- a/src/services/dai.js +++ b/src/services/dai.js @@ -20,12 +20,8 @@ export const getBalance = async (daiContract, walletAddress) => { } export const checkBalance = async (daiContract, walletAddress, daiNeeded) => { - // Get the walletAddress balance from the Dai contract const balance = await daiContract.balanceOf(walletAddress) - // Convert the balance from a BigNumber to a number const number = JSON.parse(ethers.BigNumber.from(balance).toString()) - - // Return true if the walletAddress balance is greater than the amount needed, false otherwise return number >= daiNeeded } diff --git a/src/services/handleVersion.js b/src/services/handleVersion.js index 4ab2c629..8e63b2d2 100644 --- a/src/services/handleVersion.js +++ b/src/services/handleVersion.js @@ -1,4 +1,4 @@ -import RenderResult from 'next/dist/server/render-result' +import RenderResult from "next/dist/server/render-result" export const getProductVersion = async () => { try { From 66a63f4b1b23f4bc75c445a305c98d3e84263f5c Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:53:14 -0300 Subject: [PATCH 18/34] [fix] :bug: add usecallback in some functions (#375) --- src/components/Navbar/AccountInfo.jsx | 33 ++++++++++----------------- src/components/Navbar/Navbar.jsx | 1 + 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/src/components/Navbar/AccountInfo.jsx b/src/components/Navbar/AccountInfo.jsx index c61e3edf..bdfc6585 100644 --- a/src/components/Navbar/AccountInfo.jsx +++ b/src/components/Navbar/AccountInfo.jsx @@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import React, { useState, useEffect, useCallback } from 'react' import PropTypes from 'prop-types' import Link from 'next/link' import { useTranslation } from 'next-i18next' @@ -33,7 +33,7 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { const currentNwk = getCurrentNetwork() - const fetchTokenName = async () => { + const fetchTokenName = useCallback(async () => { if (!walletAddress || !daiContract || !isValidNetwork) return try { const token = await getTokenName(daiContract) @@ -41,13 +41,9 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { } catch (e) { console.error({ e }) } - } - - useEffect(() => { - fetchTokenName() - }, [showAccountInfo, tokenName, walletAddress, isValidNetwork]) //eslint-disable-line react-hooks/exhaustive-deps - - const fetchBalance = async () => { + }, [walletAddress, daiContract, isValidNetwork]) + + const fetchBalance = useCallback(async () => { if (!walletAddress || !daiContract || !isValidNetwork) return try { const balance = await getBalance(daiContract, walletAddress) @@ -55,11 +51,16 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { } catch (e) { console.error({ e }) } - } + }, [walletAddress, daiContract, isValidNetwork]) + + useEffect(() => { + fetchTokenName() + }, [walletAddress, daiContract, isValidNetwork]) //eslint-disable-line react-hooks/exhaustive-deps + useEffect(() => { fetchBalance() - }, [showAccountInfo, walletBalance, walletAddress, isValidNetwork]) //eslint-disable-line react-hooks/exhaustive-deps + }, [walletBalance, walletAddress, isValidNetwork]) //eslint-disable-line react-hooks/exhaustive-deps function copyToClipboard(text) { navigator.clipboard.writeText(text) @@ -230,16 +231,6 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { : t('account_invalid_network').replace('{NETWORKS}', enabledNetworkNames)}

- {/*!isValidNetwork && ( -
- { - switchOrCreateNetwork() - }} - className='account__info__icon' - /> -
- )*/} ) diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index 9ae9139a..ee5e7ee4 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -75,6 +75,7 @@ function Navbar() { fetchVersion().then(setProductVersion) }, [productVersion]) //eslint-disable-line react-hooks/exhaustive-deps + useEffect(() => { document.addEventListener('mousedown', handleClickOutside) return () => { From e05d19658608c846dfad813bce01b561c5a9facf Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:56:00 -0300 Subject: [PATCH 19/34] [fix] :poop: disable email error-notificationes (#375) --- src/services/handleError.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/services/handleError.js b/src/services/handleError.js index e92f6947..304cb098 100644 --- a/src/services/handleError.js +++ b/src/services/handleError.js @@ -1,4 +1,13 @@ export const handleError = async (wallet, operation, errorMsg) => { + try { + console.error({ errorMsg }) + } catch (ex) { + console.log('error en _handleError', ex) + } +} + +/* +export const handleError2 = async (wallet, operation, errorMsg) => { try { console.error({ errorMsg }) @@ -20,3 +29,4 @@ export const handleError = async (wallet, operation, errorMsg) => { console.log('error en _handleError', ex) } } +*/ \ No newline at end of file From 793529dd367afe3f6fe3001d9e81cbdbe1ce7a38 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:57:02 -0300 Subject: [PATCH 20/34] [refactor] :recycle: refactor alpha code (#375) --- src/sections/Alpha/AlphaMain.jsx | 294 +++++++++++++++++-------------- 1 file changed, 157 insertions(+), 137 deletions(-) diff --git a/src/sections/Alpha/AlphaMain.jsx b/src/sections/Alpha/AlphaMain.jsx index fcc052f0..3706fea9 100644 --- a/src/sections/Alpha/AlphaMain.jsx +++ b/src/sections/Alpha/AlphaMain.jsx @@ -1,10 +1,10 @@ -import { useState, useEffect } from 'react' +import { useState, useEffect, useCallback } from 'react' import { ethers } from 'ethers' import 'swiper/css/bundle' import Swiper from 'swiper/bundle' import AlphaAlbums from './AlphaAlbums' import Rules from '../Common/Rules' -import { storageUrlAlpha, NETWORKS } from '../../config' +import { storageUrlAlpha } from '../../config' import { createNewSeason, buyPack, @@ -25,8 +25,9 @@ import { emitError, emitSuccess, emitInfo } from '../../utils/alert' import { useTranslation } from 'next-i18next' import { useWeb3Context, useLayoutContext } from '../../hooks' +import { fetchWithRetry } from '../../services/middleware' -const vidas = [ +const lives = [ '/images/alpha/vida0.png', '/images/alpha/vida1.png', '/images/alpha/vida2.png', @@ -50,7 +51,7 @@ const AlphaMain = () => { const [cards, setCards] = useState([]) const [error, setError] = useState('') const [cardIndex, setCardIndex] = useState(0) - const [vida, setVida] = useState('/images/alpha/vida0.png') + const [live, setLive] = useState('/images/alpha/vida0.png') const [seasonNames, setSeasonNames] = useState(null) const [seasonName, setSeasonName] = useState('') const [packPrices, setPackPrices] = useState(null) @@ -60,24 +61,24 @@ const AlphaMain = () => { const [seasonFolder, setSeasonFolder] = useState(null) const { startLoading, stopLoading } = useLayoutContext() const { - chainId, walletAddress, daiContract, alphaContract, connectWallet, isConnected, isValidNetwork, - isValidNetworkForAlpha, - enabledNetworkNames + enabledNetworkNames, + getCurrentNetwork } = useWeb3Context() const [showRules, setShowRules] = useState(false) const [albums, setAlbums] = useState(null) const [showMain, setShowMain] = useState(false) const [disableBuyPackButton, setDisableBuyPackButton] = useState(false) - const fetchAlbums = async () => { + const fetchAlbums = useCallback(async () => { try { - if (!walletAddress || !isValidNetworkForAlpha || !alphaContract || !seasonNames) return + console.log('fetchAlbums') + if (!walletAddress || !isValidNetwork || !alphaContract || !seasonNames) return startLoading() let albumsArr = [] @@ -97,16 +98,91 @@ const AlphaMain = () => { console.error({ ex }) emitError(t('alpha_fetch_albums_error')) } - } + }, [walletAddress, isValidNetwork, alphaContract, seasonNames, t]) //eslint-disable-line react-hooks/exhaustive-deps + + const fetchSeasonData = useCallback(async () => { + try { + console.log('fetchSeasonData') + + if (!walletAddress || !isValidNetwork || !alphaContract) return + startLoading() + console.log('fetchSeasonData 2', alphaContract.address) + console.log('fetchSeasonData 2', alphaContract) + + // Define la función de solicitud + const key = `fetchSeasonData-${walletAddress}` + const requestFunc = async () => { + const seasonData = await alphaContract.getSeasonData() + console.log('fetchSeasonData 3', seasonData) + return seasonData + } + + // Usa fetchWithRetry para realizar la solicitud + let seasonData = await fetchWithRetry(key, requestFunc) + + // let seasonData = await alphaContract.getSeasonData() + + if (seasonData) { + let currentSeason + let currentPrice + for (let i = 0; i < seasonData[0].length; i++) { + const seasonName = seasonData[0][i] + const seasonPackPrice = seasonData[1][i] + const packsAvailable = await checkPacks(alphaContract, seasonName) + if (!packsAvailable) { + stopLoading() + emitError(t('alpha_fetch_season_data_error')) + return + } + if (packsAvailable.length > 0) { + currentSeason = seasonName + currentPrice = seasonPackPrice + break + } else { + currentSeason = seasonName + currentPrice = seasonPackPrice + } + } + + const seasonWinnersCount = {} + for (let i = 0; i < seasonData[0].length; i++) { + const winnersBySeason = await getWinnersBySeason(alphaContract, seasonData[0][i]) + seasonWinnersCount[seasonData[0][i]] = winnersBySeason.length + } + + const finishedSeasons = Object.entries(seasonWinnersCount) + .filter((season) => season[1] == 10) + .map((season) => season[0]) + const activeSeasons = seasonData[0].filter((season) => !finishedSeasons.includes(season)) + + setSeasonName(currentSeason) + setPackPrice(currentPrice?.toString()) + setPackPrices(seasonData[1]) + setSeasonNames(activeSeasons) + + if (!activeSeasons || !activeSeasons.length) { + setError(t('no_season_names')) + } else { + setError('') + } + } + stopLoading() + } catch (ex) { + stopLoading() + console.log('fetchSeasonData error', ex.error) + console.error(ex) + emitError(t('alpha_fetch_season_data_error')) + } + }, [walletAddress, isValidNetwork, alphaContract, t]) //eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { fetchAlbums() - }, [isValidNetworkForAlpha, albums]) //eslint-disable-line react-hooks/exhaustive-deps + }, [isValidNetwork, albums]) //eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { fetchSeasonData() setShowMain(false) - }, [walletAddress, isValidNetworkForAlpha]) //eslint-disable-line react-hooks/exhaustive-deps + }, [walletAddress, isValidNetwork]) //eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { swiper = new Swiper('.swiper-container', { @@ -171,7 +247,7 @@ const AlphaMain = () => { } }, [seasonName]) - const resetShowMain = (cardsData) => { + const resetShowMain = useCallback((cardsData) => { startLoading() setCards([]) setShowMain(false) @@ -180,137 +256,74 @@ const AlphaMain = () => { setShowMain(true) stopLoading() }, 500) - } + }, []) //eslint-disable-line react-hooks/exhaustive-deps - const getOpenseaUrl = () => { - let baseUrl = '' - let chainName = '' - if (chainId) { - Object.entries(NETWORKS).forEach(([key, value]) => { - if (value.config.chainId == chainId) { - const openseaUrl = value.config.chainOpenSeaBaseUrl - baseUrl = openseaUrl - chainName = value.config.chainName - } - }) + const getOpenseaUrl = useCallback(() => { + const currentNetwork = getCurrentNetwork() + if (currentNetwork) { + const baseUrl = currentNetwork.config.chainOpenSeaBaseUrl + const chainName = currentNetwork.config.chainName return `${baseUrl}/assets/${chainName}/${alphaContract?.address}` } else { return '' } - } + }, [alphaContract]) - const fetchSeasonData = async () => { + const handleCreateNewSeason = async () => { try { - if (!walletAddress || !isValidNetworkForAlpha || !alphaContract) return - startLoading() - let seasonData = await alphaContract.getSeasonData() + const authorization = await getAuthorized(alphaContract, walletAddress) + if (!authorization) { + emitInfo(t('alpha_season_authorization'), 2000) + return + } - if (seasonData) { - let currentSeason - let currentPrice - for (let i = 0; i < seasonData[0].length; i++) { - const seasonName = seasonData[0][i] - const seasonPackPrice = seasonData[1][i] - const packsAvailable = await checkPacks(alphaContract, seasonName) - if (!packsAvailable) { - stopLoading() - emitError(t('alpha_fetch_season_data_error')) - return + const result = await Swal.fire({ + title: `${t('alpha_season_create_title')}`, + html: ` + `, + + showDenyButton: false, + showCancelButton: true, + confirmButtonText: `${t('alpha_confirm_new_season')}`, + confirmButtonColor: '#005EA3', + color: 'black', + background: 'white', + customClass: { + image: 'cardalertimg', + input: 'alertinput' + }, + preConfirm: () => { + const nameInput = Swal.getPopup().querySelector('#name') + const priceInput = Swal.getPopup().querySelector('#packPrice') + const name = nameInput.value + const price = priceInput.value + + if (name.length > 12) { + nameInput.classList.add('swal2-inputerror') + Swal.showValidationMessage(`${t('alpha_season_name_error')}`) } - if (packsAvailable.length > 0) { - currentSeason = seasonName - currentPrice = seasonPackPrice - break - } else { - currentSeason = seasonName - currentPrice = seasonPackPrice + if (price < 1) { + priceInput.classList.add('swal2-inputerror') + Swal.showValidationMessage(`${t('alpha_season_price_error')}`) } - } - const seasonWinnersCount = {} - for (let i = 0; i < seasonData[0].length; i++) { - const winnersBySeason = await getWinnersBySeason(alphaContract, seasonData[0][i]) - seasonWinnersCount[seasonData[0][i]] = winnersBySeason.length + return { name: name, price: price } } + }) - const finishedSeasons = Object.entries(seasonWinnersCount) - .filter((season) => season[1] == 10) - .map((season) => season[0]) - const activeSeasons = seasonData[0].filter((season) => !finishedSeasons.includes(season)) - - setSeasonName(currentSeason) - setPackPrice(currentPrice?.toString()) - setPackPrices(seasonData[1]) - setSeasonNames(activeSeasons) - - if (!activeSeasons || !activeSeasons.length) { - setError(t('no_season_names')) + if (result.isConfirmed) { + startLoading() + const tx = await createNewSeason(alphaContract, result.value.name, result.value.price) + stopLoading() + if (!tx) { + emitError(t('alpha_create_new_season_error')) } else { - setError('') + emitSuccess(t('confirmado'), 2000) + fetchSeasonData() } } - stopLoading() - } catch (ex) { - stopLoading() - console.error(ex) - emitError(t('alpha_fetch_season_data_error')) - } - } - - const handleCreateNewSeason = async () => { - try { - const authorization = await getAuthorized(alphaContract, walletAddress) - if (authorization) { - const result = await Swal.fire({ - title: `${t('alpha_season_create_title')}`, - html: ` - `, - - showDenyButton: false, - showCancelButton: true, - confirmButtonText: `${t('alpha_confirm_new_season')}`, - confirmButtonColor: '#005EA3', - color: 'black', - background: 'white', - customClass: { - image: 'cardalertimg', - input: 'alertinput' - }, - preConfirm: () => { - const nameInput = Swal.getPopup().querySelector('#name') - const priceInput = Swal.getPopup().querySelector('#packPrice') - const name = nameInput.value - const price = priceInput.value - - if (name.length > 12) { - nameInput.classList.add('swal2-inputerror') - Swal.showValidationMessage(`${t('alpha_season_name_error')}`) - } - if (price < 1) { - priceInput.classList.add('swal2-inputerror') - Swal.showValidationMessage(`${t('alpha_season_price_error')}`) - } - - return { name: name, price: price } - } - }) - - if (result.isConfirmed) { - startLoading() - const tx = await createNewSeason(alphaContract, result.value.name, result.value.price) - stopLoading() - if (!tx) { - emitError(t('alpha_create_new_season_error')) - } else { - emitSuccess(t('confirmado'), 2000) - fetchSeasonData() - } - } - } else { - emitInfo(t('alpha_season_authorization'), 2000) - } } catch (e) { console.error({ e }) stopLoading() @@ -321,6 +334,7 @@ const AlphaMain = () => { const showCards = async (address, seasonName, isBuyingPack = true) => { startLoading() try { + console.log('calling showCards') const checkPacksResult = await checkPacks(alphaContract, seasonName) if (!checkPacksResult) { stopLoading() @@ -329,8 +343,8 @@ const AlphaMain = () => { } setDisableTransfer(checkPacksResult.length == 0 ? false : true) - const cards = await getUserCards(alphaContract, address, seasonName) + if (!cards) { stopLoading() emitError(t('alpha_show_cards_error')) @@ -355,7 +369,7 @@ const AlphaMain = () => { setAlbumCollection(ethers.BigNumber.from(albumData[0].collection).toNumber()) const completion = ethers.BigNumber.from(albumData[0].completion).toNumber() setAlbumCompletion(completion) - setVida(vidas[completion]) + setLive(lives[completion]) const seasonFolderData = await getSeasonFolder(alphaContract, seasonName) if (!seasonFolderData) { @@ -413,12 +427,15 @@ const AlphaMain = () => { } } } catch (ex) { - emitError(t('alpha_show_cards_error')) + stopLoading() console.error(ex) + emitError(t('alpha_show_cards_error')) } } const handleBuyPack = async (price, name) => { + console.log('calling handleBuyPack') + setDisableBuyPackButton(true) startLoading() try { @@ -540,6 +557,8 @@ const AlphaMain = () => { const handlePasteCard = async (cardIndex) => { try { + console.log('calling handlePasteCard') + startLoading() const cardTokenId = ethers.BigNumber.from(cards[cardIndex].tokenId).toNumber() const albumTokenId = ethers.BigNumber.from(album[0].tokenId).toNumber() @@ -565,6 +584,7 @@ const AlphaMain = () => { } const handleTokenTransfer = async (tokenId, collection) => { + console.log('calling handleTokenTransfer') const players = await getSeasonPlayers(alphaContract, seasonName) const playersOptions = players .filter((player) => player != walletAddress) @@ -630,10 +650,10 @@ const AlphaMain = () => { {t('connect_wallet')} )} - {isConnected && !isValidNetworkForAlpha && ( + {isConnected && !isValidNetwork && (
- {t('account_invalid_network').replace('{NETWORKS}', 'sepolia')} + {t('account_invalid_network').replace('{NETWORKS}', enabledNetworkNames)}
)} @@ -651,11 +671,11 @@ const AlphaMain = () => { return (
- {(!isConnected || !isValidNetworkForAlpha) && } + {(!isConnected || !isValidNetwork) && } {showRules && } - {isConnected && isValidNetworkForAlpha && alphaContract && seasonNames && ( + {isConnected && isValidNetwork && alphaContract && seasonNames && (
{ {pack && pack.length && showMain ? (
@@ -748,7 +768,7 @@ const AlphaMain = () => { ? `${t('progreso')}: ${albumCompletion}/5` : `${t('posicion')}: ${winnerPosition}`} - vida + vida {t('album')}: #{albumCollection} From c898dc79562413246c8b7ab37190d4025b5b5f1d Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:57:49 -0300 Subject: [PATCH 21/34] [refactor] :recycle: add handle-error and remove unused code (#375) --- src/services/alpha.js | 96 +++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 53 deletions(-) diff --git a/src/services/alpha.js b/src/services/alpha.js index 0edf2dab..e5b4dc63 100644 --- a/src/services/alpha.js +++ b/src/services/alpha.js @@ -1,6 +1,8 @@ -import { graphUrl } from '../config' +// import { graphUrl } from '../config' import { ethers } from 'ethers' +import { handleError } from './handleError' +/* const query = ` query getSeasonWinners { winners(first: 1000) { @@ -11,7 +13,9 @@ const query = ` } } ` +*/ +/* export const fetchWinnersQuery = async () => { try { const response = await fetch(graphUrl, { @@ -32,16 +36,17 @@ export const fetchWinnersQuery = async () => { return false } } - +*/ export const createNewSeason = async (alphaContract, name, price, amount = 60, folder = 'T1') => { - const estimatedGas = await alphaContract.estimateGas.newSeason( - name, - ethers.utils.parseUnits(price, 18), - amount, - folder - ) - const gasLimit = estimatedGas.mul(ethers.BigNumber.from(120)).div(ethers.BigNumber.from(100)) try { + const estimatedGas = await alphaContract.estimateGas.newSeason( + name, + ethers.utils.parseUnits(price, 18), + amount, + folder + ) + const gasLimit = estimatedGas.mul(ethers.BigNumber.from(120)).div(ethers.BigNumber.from(100)) + const trx = await alphaContract.newSeason( name, ethers.utils.parseUnits(price, 18), @@ -54,10 +59,8 @@ export const createNewSeason = async (alphaContract, name, price, amount = 60, f await trx.wait() return true } catch (e) { - console.error({ - e - }) - return false + handleError('0x', 'createNewSeason', e) + throw e } } @@ -71,10 +74,8 @@ export const buyPack = async (alphaContract, packPrice, seasonName) => { await trx.wait() return trx } catch (e) { - console.error({ - e - }) - return false + handleError('0x', 'buyPack', e) + throw e } } @@ -88,10 +89,8 @@ export const transferCard = async (alphaContract, from, to, tokenId) => { await trx.wait() return true } catch (e) { - console.error({ - e - }) - return false + handleError('0x', 'transferCard', e) + throw e } } @@ -105,93 +104,84 @@ export const pasteCard = async (alphaContract, cardTokenId, albumTokenId) => { await trx.wait() return true } catch (e) { - console.error({ - e - }) - return false + handleError('0x', 'pasteCard', e) + throw e } } export const getAlbumData = async (alphaContract, tokenId) => { try { + console.log('calling getAlbumData') const albumData = await alphaContract.cards(tokenId) return albumData } catch (e) { - console.error({ - e - }) - return e + handleError('0x', 'getAlbumData', e) + throw e } } export const checkPacks = async (alphaContract, seasonName) => { try { + console.log('calling checkPacks') const packs = await alphaContract.getSeasonAlbums(seasonName) return packs } catch (e) { - console.error({ - e - }) - return false + handleError('0x', 'checkPacks', e) + throw e } } export const getSeasonFolder = async (alphaContract, seasonName) => { try { + console.log('calling getSeasonFolder') const response = await alphaContract.seasons(seasonName) return response.folder } catch (e) { - console.error({ - e - }) - return false + handleError('0x', 'getSeasonFolder', e) + throw e } } export const getUserCards = async (alphaContract, address, seasonName) => { try { + console.log('calling getUserCards') const cards = await alphaContract.getCardsByUserBySeason(address, seasonName) return cards } catch (e) { - console.error({ - e - }) - return false + handleError('0x', 'getUserCards', e) + throw e } } export const getWinnersBySeason = async (alphaContract, seasonName) => { try { + console.log('calling getWinnersBySeason') const winners = await alphaContract.getWinners(seasonName) return winners } catch (e) { - console.error({ - e - }) - return false + handleError('0x', 'getWinnersBySeason', e) + throw e } } export const getAuthorized = async (alphaContract, address) => { try { + console.log('calling getAuthorized') const authorized = await alphaContract.getAuthorized(address) return authorized } catch (e) { - console.error({ - e - }) - return e + handleError('0x', 'getAuthorized', e) + throw e } } export const getSeasonPlayers = async (alphaContract, seasonName) => { try { + console.log('calling getSeasonPlayers') const players = await alphaContract.getSeasonPlayers(seasonName) return players } catch (e) { - console.error({ - e - }) - return e + handleError('0x', 'getSeasonPlayers', e) + throw e } } From 9eabe3dd2015d7bfb62abfebdf6e77a136910fd6 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 08:58:28 -0300 Subject: [PATCH 22/34] [fix] :poop: disable service-worker (#375) --- src/pages/_app.jsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pages/_app.jsx b/src/pages/_app.jsx index 0dd1eeab..d3671c4d 100644 --- a/src/pages/_app.jsx +++ b/src/pages/_app.jsx @@ -14,7 +14,9 @@ import { NotificationProvider } from '../context/NotificationContext' import { SettingsProvider } from '../context/SettingsContext' import { LayoutProvider } from '../context/LayoutContext' import Layout from '../components/Layout' + function MyApp({ Component, pageProps }) { + /* useEffect(() => { if ('serviceWorker' in navigator && window && !window.location.hostname.includes('localhost')) { window.addEventListener('load', function () { @@ -29,6 +31,7 @@ function MyApp({ Component, pageProps }) { }) } }, []) + */ return ( From f00bf9cf8da4ec393cd8ccbbb6089c8040d7b802 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 09:00:17 -0300 Subject: [PATCH 23/34] [fix] :poop: disable internal-notifications (#375, #376) --- src/context/NotificationContext.js | 32 +++++++++++++++++------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/context/NotificationContext.js b/src/context/NotificationContext.js index 49857e51..d202ca19 100644 --- a/src/context/NotificationContext.js +++ b/src/context/NotificationContext.js @@ -1,21 +1,13 @@ import { createContext, useState, useEffect, useContext } from 'react' import PropTypes from 'prop-types' import { v4 as uuidv4 } from 'uuid' -import { Web3Context } from './Web3Context' +// import { Web3Context } from './Web3Context' export const NotificationContext = createContext() -export const NotificationProvider = ({ children }) => { +export function NotificationProvider({ children }) { const [notifications, setNotifications] = useState([]) - const { walletAddress } = useContext(Web3Context) - - const getNotificationsByUser = (user) => { - if (!user) return notifications - const myNotifications = notifications.filter( - (notification) => notification.walletAddress === user && notification.deleted === false - ) - return filterUniqueNotifications(myNotifications) - } + // const { walletAddress } = useContext(Web3Context) const filterUniqueNotifications = (notificationList) => { const uniqueIdentifiers = new Set() @@ -29,18 +21,30 @@ export const NotificationProvider = ({ children }) => { }) } + const getNotificationsByUser = (userWalletAddress) => { + /* + if (!userWalletAddress) return notifications + const myNotifications = notifications.filter( + (notification) => notification.walletAddress === userWalletAddress && notification.deleted === false + ) + return filterUniqueNotifications(myNotifications) + */ + } + + /* useEffect(() => { const filteredNotifications = getNotificationsByUser(walletAddress) setNotifications(filteredNotifications) - }, [walletAddress]) //eslint-disable-line react-hooks/exhaustive-deps + }, [walletAddress]) // eslint-disable-line react-hooks/exhaustive-deps + */ const addNotification = (user, message, data) => { const date = new Date().toLocaleString() const newNotification = { id: uuidv4(), - date: date, + date, walletAddress: user, - message: message, + message, data: data || [], read: false, deleted: false From 9c63877095cb2cb86f527b553f4041c16a34ade5 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 09:00:53 -0300 Subject: [PATCH 24/34] [fix] :poop: disable internal-notifications in navbar (#375) --- src/components/Navbar/Navbar.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index ee5e7ee4..48f35f08 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -56,6 +56,7 @@ function Navbar() { } } + /* useEffect(() => { const notif = getNotificationsByUser(walletAddress) || [] const unreadNotifications = notif.filter((notification) => !notification.read) @@ -63,9 +64,9 @@ function Navbar() { setNotificationsNbrClass( unreadNotifications.length > 9 ? 'notification__badge__2' : 'notification__badge__1' ) - // setNotificationsNbr(20) - // setNotificationsNbrClass(20 > 9 ? 'notification__badge__2' : 'notification__badge__1') - }, [notifications, walletAddress]) //eslint-disable-line react-hooks/exhaustive-deps + }, [notifications, walletAddress]) // eslint-disable-line react-hooks/exhaustive-deps + */ + const fetchVersion = async () => { const version = await getProductVersion() return version From 6f1c673327e54480decaf009d2a606b30071f989 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 09:01:38 -0300 Subject: [PATCH 25/34] [fix] :sparkles: linter (#377) --- src/components/Navbar/NotificationInfo.jsx | 53 +++++++++++++++------- src/pages/api/version/v.js | 2 +- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/src/components/Navbar/NotificationInfo.jsx b/src/components/Navbar/NotificationInfo.jsx index bd4bfca8..72f18ed2 100644 --- a/src/components/Navbar/NotificationInfo.jsx +++ b/src/components/Navbar/NotificationInfo.jsx @@ -1,3 +1,15 @@ +/* eslint-disable react/no-unstable-nested-components */ +/* eslint-disable react/jsx-no-comment-textnodes */ +/* eslint-disable jsx-a11y/click-events-have-key-events */ +/* eslint-disable react/function-component-definition */ +/* eslint-disable spaced-comment */ +/* eslint-disable react/jsx-fragments */ +/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */ +/* eslint-disable react/no-array-index-key */ +/* eslint-disable react/jsx-curly-brace-presence */ +/* eslint-disable react/jsx-no-useless-fragment */ +/* eslint-disable react/forbid-prop-types */ +/* eslint-disable react/require-default-props */ import React, { useState, useEffect } from 'react' import PropTypes from 'prop-types' import { useTranslation } from 'next-i18next' @@ -11,7 +23,6 @@ import { useWeb3Context, useNotificationContext, useSettingsContext } from '../. const NotificationInfo = ({ showNotificationInfo }) => { const { t } = useTranslation() const { - notifications, getNotificationsByUser, readNotification, deleteNotification, @@ -28,7 +39,7 @@ const NotificationInfo = ({ showNotificationInfo }) => { useEffect(() => { setUpdatedNotifications(getNotificationsByUser(walletAddress)) - }, [showNotificationInfo, notifications, walletAddress, languageSetted]) //eslint-disable-line react-hooks/exhaustive-deps + }, [showNotificationInfo, walletAddress, languageSetted]) //eslint-disable-line react-hooks/exhaustive-deps const formatNotificationDate = (date) => { moment.locale(languageSetted) @@ -102,6 +113,7 @@ const NotificationInfo = ({ showNotificationInfo }) => { deleteAllNotifications(walletAddress) } + // eslint-disable-next-line react/function-component-definition, react/no-unstable-nested-components const NotificationTitle = () => updatedNotifications && updatedNotifications.length > 0 ? (
@@ -137,10 +149,13 @@ const NotificationInfo = ({ showNotificationInfo }) => {
) + // eslint-disable-next-line react/function-component-definition const NotificationMessage = ({ notification }) => (
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, + jsx-a11y/click-events-have-key-events

{ @@ -186,25 +201,29 @@ const NotificationInfo = ({ showNotificationInfo }) => { ) - const NotificationMessages = () => ( - - {updatedNotifications.slice(0, 7).map((notification, index) => ( - - ))} - {/* + function NotificationMessages() { + return ( + + {updatedNotifications.slice(0, 7).map((notification, index) => ( + + ))} + {/*


{t('notification_view_all')}
*/} - - ) + + ) + } - const NoMessages = () => ( - -
-

{t('notification_no_messages')}

-
-
- ) + function NoMessages() { + return ( + +
+

{t('notification_no_messages')}

+
+
+ ) + } NotificationMessage.propTypes = { notification: PropTypes.object diff --git a/src/pages/api/version/v.js b/src/pages/api/version/v.js index 2f0d1fd2..2041e3fc 100644 --- a/src/pages/api/version/v.js +++ b/src/pages/api/version/v.js @@ -1,5 +1,5 @@ import { nofVersion } from '../../../config' export default async function handler(req, res) { - res.status(200).json({ version: nofVersion }) + res.status(200).json({ version: nofVersion }) } From a8657a5770f2d2b608daaabda4d20f390b156309 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 09:03:27 -0300 Subject: [PATCH 26/34] [build] :rotating_light: update linter and prettier config and dependencies (#377) --- .eslintignore | 28 +- .eslintrc.json => .eslintrc | 18 +- .prettierignore | 11 +- package-lock.json | 1944 +++++++++++++++++++++++++++-------- package.json | 59 +- 5 files changed, 1598 insertions(+), 462 deletions(-) rename .eslintrc.json => .eslintrc (69%) diff --git a/.eslintignore b/.eslintignore index 6af45a85..c4f580bc 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,26 @@ -**/node_modules/* +// .eslintignore +build/* +dist/* +public/* +scripts/ **/out/* +**/node_modules/* +**/prisma +**/prisma.js + **/.next/* -**/src/context/abis/* -**/src/styles/* -**/_static/* \ No newline at end of file +next.config.js + +vite.config.js +vite.config.ts + +src/reportWebVitals.js +src/service-worker.js +src/serviceWorkerRegistration.js +src/setupTests.js + +src/reportWebVitals.ts +src/service-worker.ts +src/serviceWorkerRegistration.ts +src/setupTests.ts +**/src/context/abis/* \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc similarity index 69% rename from .eslintrc.json rename to .eslintrc index 64349061..30cd6529 100644 --- a/.eslintrc.json +++ b/.eslintrc @@ -4,11 +4,10 @@ "es2021": true }, "extends": [ - "eslint:recommended", - "plugin:react/recommended", - "plugin:@next/next/recommended", - "next/core-web-vitals", - "prettier" + // "eslint:recommended", + // "plugin:react/recommended", + // "plugin:@next/next/recommended", + // "prettier" ], "parserOptions": { "ecmaFeatures": { @@ -19,7 +18,7 @@ }, "plugins": [ "react", - "@next/eslint-plugin-next" + // "@next/eslint-plugin-next" ], "rules": { "arrow-body-style": 1, @@ -32,11 +31,6 @@ "@next/next/no-img-element": 0, "react/no-unescaped-entities": 0, "import/no-useless-path-segments": 1, - "no-unused-vars": [ - 1, - { - "ignoreRestSiblings": false - } - ] + "no-unused-vars": 0 } } diff --git a/.prettierignore b/.prettierignore index 89aacb89..14db6d21 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,8 +1,11 @@ -node_modules -.next -yarn.lock +build/* +dist/* +public/* +**/out/* +**/.next/* +**/node_modules/* package-lock.json -public +yarn.lock .github .vscode **/src/context/abis/* diff --git a/package-lock.json b/package-lock.json index 0aaf3ba4..bf83eab5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,14 @@ { "name": "nof-landing", - "version": "0.1.0", + "version": "0.1.219", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nof-landing", - "version": "0.1.0", + "version": "0.1.219", "license": "MIT", "dependencies": { - "@next/eslint-plugin-next": "^14.0.1", "@nomicfoundation/hardhat-toolbox": "^2.0.0", "@sendgrid/mail": "^8.1.0", "@walletconnect/web3-provider": "^1.8.0", @@ -28,7 +27,7 @@ "next-i18next": "^15.0.0", "next-pwa": "^5.6.0", "nodemailer": "^6.9.8", - "prettier": "^3.0.3", + "prop-types": "^15.8.1", "react": "18.2.0", "react-card-flip": "^1.2.2", "react-dom": "18.2.0", @@ -47,16 +46,28 @@ "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", - "eslint": "^8.52.0", - "eslint-config-next": "^14.0.1", - "eslint-config-prettier": "^9.0.0", + "@next/eslint-plugin-next": "^14.0.4", + "eslint": "^8.55.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-config-airbnb-typescript": "^17.1.0", + "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-perfectionist": "^2.5.0", + "eslint-plugin-prettier": "^5.0.1", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-unused-imports": "^3.0.0", "file-loader": "^6.2.0", - "pre-commit": "^1.2.2" + "husky": "^8.0.3", + "pre-commit": "^1.2.2", + "prettier": "^3.1.0" }, "engines": { - "node": "^16 || ^17 || ^18", - "npm": "^8.1.0 || ^8.5.0 || ^9.8.1", - "yarn": "^1.22.10 || ^1.22.19" + "node": ">=16.0.0", + "npm": ">=8.1.0", + "yarn": ">=1.22.10" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -2534,9 +2545,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -2557,9 +2568,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", - "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3266,13 +3277,14 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.13", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", - "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { @@ -3293,9 +3305,10 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", - "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true }, "node_modules/@ioredis/commands": { @@ -3303,6 +3316,102 @@ "resolved": "https://registry.npmjs.org/@ioredis/commands/-/commands-1.2.0.tgz", "integrity": "sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==" }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/@jimp/bmp": { "version": "0.22.10", "resolved": "https://registry.npmjs.org/@jimp/bmp/-/bmp-0.22.10.tgz", @@ -3974,27 +4083,55 @@ "integrity": "sha512-gK60YoFae3s8qi5UgIzbvxOhsh5gKyEaiKH5+kLBUYXLlrPyWJR2xKBj2WqvHkO7wDX7/Hed3DAqjSpU4ijIvQ==" }, "node_modules/@next/eslint-plugin-next": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.0.1.tgz", - "integrity": "sha512-bLjJMwXdzvhnQOnxvHoTTUh/+PYk6FF/DCgHi4BXwXCINer+o1ZYfL9aVeezj/oI7wqGJOqwGIXrlBvPbAId3w==", + "version": "14.2.5", + "resolved": "https://registry.npmjs.org/@next/eslint-plugin-next/-/eslint-plugin-next-14.2.5.tgz", + "integrity": "sha512-LY3btOpPh+OTIpviNojDpUdIbHW9j0JBYBjsIp8IxtDFfYFyORvw3yNq6N231FVqQA7n7lwaf7xHbVJlA1ED7g==", + "dev": true, "dependencies": { - "glob": "7.1.7" + "glob": "10.3.10" + } + }, + "node_modules/@next/eslint-plugin-next/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==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" } }, "node_modules/@next/eslint-plugin-next/node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, "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" + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@next/eslint-plugin-next/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -5326,6 +5463,28 @@ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.0.0.tgz", "integrity": "sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==" }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -5405,12 +5564,6 @@ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==" }, - "node_modules/@rushstack/eslint-patch": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.5.1.tgz", - "integrity": "sha512-6i/8UoL0P5y4leBIGzvkZdS85RDMG9y1ihZzmTZQ5LdHUYmZ7pKFoj8X0236s3lusPs1Fa5HTQUpwI+UfTcmeA==", - "dev": true - }, "node_modules/@scure/base": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.3.tgz", @@ -6064,9 +6217,9 @@ } }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==" + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==" }, "node_modules/@types/json5": { "version": "0.0.29", @@ -6169,6 +6322,12 @@ "@types/node": "*" } }, + "node_modules/@types/semver": { + "version": "7.5.8", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.8.tgz", + "integrity": "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==", + "dev": true + }, "node_modules/@types/trusted-types": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", @@ -6196,11 +6355,98 @@ "@types/node": "*" } }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.21.0.tgz", + "integrity": "sha512-oy9+hTPCUFpngkEZUSzbf9MxI65wbKFoQYsgPdILTfbUldp5ovUuphZVe4i30emU9M/kP+T64Di0mxl7dSw3MA==", + "dev": true, + "peer": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/type-utils": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "peer": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@typescript-eslint/parser": { "version": "6.9.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.1.tgz", "integrity": "sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "6.9.1", "@typescript-eslint/types": "6.9.1", @@ -6229,6 +6475,7 @@ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz", "integrity": "sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg==", "dev": true, + "peer": true, "dependencies": { "@typescript-eslint/types": "6.9.1", "@typescript-eslint/visitor-keys": "6.9.1" @@ -6241,11 +6488,40 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/types": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.1.tgz", - "integrity": "sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==", + "node_modules/@typescript-eslint/type-utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.21.0.tgz", + "integrity": "sha512-rZQI7wHfao8qMX3Rd3xqeYSMCL3SoiSQLBATSiVKARdFGCYSRvmViieZjqc58jKgs8Y8i9YvVVhRbHSTA4VBag==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/typescript-estree": "6.21.0", + "@typescript-eslint/utils": "6.21.0", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", "dev": true, + "peer": true, "engines": { "node": "^16.0.0 || >=18.0.0" }, @@ -6254,17 +6530,19 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz", - "integrity": "sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw==", + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", "dev": true, + "peer": true, "dependencies": { - "@typescript-eslint/types": "6.9.1", - "@typescript-eslint/visitor-keys": "6.9.1", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", + "minimatch": "9.0.3", "semver": "^7.5.4", "ts-api-utils": "^1.0.1" }, @@ -6281,11 +6559,40 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/visitor-keys": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils/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==", + "dev": true, + "peer": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils/node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", "dev": true, + "peer": true, "dependencies": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -6301,26 +6608,250 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.9.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz", - "integrity": "sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==", + "node_modules/@typescript-eslint/type-utils/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", "dev": true, + "peer": true, "dependencies": { - "@typescript-eslint/types": "6.9.1", - "eslint-visitor-keys": "^3.4.1" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "^16.0.0 || >=18.0.0" + "node": ">=16 || 14 >=14.17" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/@ungap/structured-clone": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "node_modules/@typescript-eslint/types": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.1.tgz", + "integrity": "sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==", + "dev": true, + "peer": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz", + "integrity": "sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "peer": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.21.0.tgz", + "integrity": "sha512-NfWVaC8HP9T8cbKQxHcsJBY5YE1O33+jpMwN45qzWWaPDZgLIbo12toGMWnmhvCpd3sIxkpDw3Wv1B3dYrbDQQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.21.0", + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/typescript-estree": "6.21.0", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.21.0.tgz", + "integrity": "sha512-OwLUIWZJry80O99zvqXVEioyniJMa+d2GrqpUTqi5/v5D5rOrppJVBPa0yKCblcigC0/aYAzxxqQ1B+DS2RYsg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.21.0.tgz", + "integrity": "sha512-1kFmZ1rOm5epu9NZEZm1kckCDGj5UJEf7P1kliH4LKu/RkwpsfqqGmY2OOcUs18lSlQBKLDYBOGxRVtrMN5lpg==", + "dev": true, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.21.0.tgz", + "integrity": "sha512-6npJTkZcO+y2/kr+z0hc4HwNfrrP4kNYh57ek7yCNlrBjWQ1Y0OS7jiZTkgumrvkX5HkEKXFZkkdFNkaW2wmUQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "@typescript-eslint/visitor-keys": "6.21.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.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": "6.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz", + "integrity": "sha512-JJtkDduxLi9bivAB+cYOVMtbkqdPOhZ+ZI5LC47MIRrDV4Yn2o+ZnW10Nkmr28xRpSpdJ6Sm42Hjf2+REYXm0A==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "6.21.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/utils/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==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/globby": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", + "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.2.9", + "ignore": "^5.2.0", + "merge2": "^1.4.1", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@typescript-eslint/utils/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz", + "integrity": "sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==", + "dev": true, + "peer": true, + "dependencies": { + "@typescript-eslint/types": "6.9.1", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, @@ -7718,12 +8249,12 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" }, "node_modules/aria-query": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", - "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.1.3.tgz", + "integrity": "sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ==", "dev": true, "dependencies": { - "dequal": "^2.0.3" + "deep-equal": "^2.0.5" } }, "node_modules/array-back": { @@ -7736,12 +8267,15 @@ } }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -7754,15 +8288,16 @@ "dev": true }, "node_modules/array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", "is-string": "^1.0.7" }, "engines": { @@ -7857,16 +8392,17 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -7917,9 +8453,9 @@ } }, "node_modules/ast-types-flow": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz", - "integrity": "sha512-eBvWn1lvIApYMhzQMsu9ciLfkBY499mFZlNqG+/9WR7PVlroQw0vG30cOQQbaKz3sCEc44TAOu2ykzqXSNnwag==", + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.8.tgz", + "integrity": "sha512-OH/2E5Fg20h2aPrbe+QL8JZQFko0YZaF+j4mnQ7BGhfavO7OpSLa8a0y9sBwomHdSbkhTS8TQNayBfnW5DwbvQ==", "dev": true }, "node_modules/async": { @@ -7956,15 +8492,6 @@ "tslib": "^2.0.0" } }, - "node_modules/asynciterator.prototype": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/asynciterator.prototype/-/asynciterator.prototype-1.0.0.tgz", - "integrity": "sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.3" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -7987,9 +8514,12 @@ } }, "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -8011,9 +8541,9 @@ "integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==" }, "node_modules/axe-core": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.8.2.tgz", - "integrity": "sha512-/dlp0fxyM3R8YW7MFzaHWXrf4zzbr0vaYb23VBFCl83R7nWNPg/yaQw2Dc8jzCMmDVLhSdzH8MjrsuIUuvX+6g==", + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.9.1.tgz", + "integrity": "sha512-QbUdXJVTpvUTHU7871ppZkdOLBeGUKBQWHkHrvN2V9IQWGMt61zf3B45BtzjxEJzYuj0JBjBZP/hmYS/R9pmAw==", "dev": true, "engines": { "node": ">=4" @@ -8030,12 +8560,12 @@ } }, "node_modules/axobject-query": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", - "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.1.1.tgz", + "integrity": "sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg==", "dev": true, "dependencies": { - "dequal": "^2.0.3" + "deep-equal": "^2.0.5" } }, "node_modules/b4a": { @@ -8634,13 +9164,18 @@ } }, "node_modules/call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -9305,6 +9840,12 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/confusing-browser-globals": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", + "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==", + "dev": true + }, "node_modules/consola": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/consola/-/consola-3.2.3.tgz", @@ -9544,31 +10085,79 @@ "node": ">=0.10" } }, - "node_modules/dayjs": { - "version": "1.11.10", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", - "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" - }, - "node_modules/death": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", - "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", - "peer": true - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", "dependencies": { - "ms": "2.1.2" + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" }, "engines": { - "node": ">=6.0" + "node": ">= 0.4" }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/dayjs": { + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" + }, + "node_modules/death": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/death/-/death-1.1.0.tgz", + "integrity": "sha512-vsV6S4KVHvTGxbEcij7hkWRv0It+sGGWVOM67dQde/o5Xjnr+KmLjxWJii2uEObIrt1CcM9w0Yaovx+iOlIL+w==", + "peer": true + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, "node_modules/decamelize": { @@ -9638,6 +10227,44 @@ "node": ">=6" } }, + "node_modules/deep-equal": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-2.2.3.tgz", + "integrity": "sha512-ZIwpnevOurS8bpT4192sqAowWM76JDKSHYzMLty3BZGSswgq6pBaH3DhCSW5xVAZICZyKdOBPjwww5wfgT/6PA==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.5", + "es-get-iterator": "^1.1.3", + "get-intrinsic": "^1.2.2", + "is-arguments": "^1.1.1", + "is-array-buffer": "^3.0.2", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.2", + "isarray": "^2.0.5", + "object-is": "^1.1.5", + "object-keys": "^1.1.1", + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.1", + "side-channel": "^1.0.4", + "which-boxed-primitive": "^1.0.2", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/deep-equal/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -9668,16 +10295,19 @@ } }, "node_modules/define-data-property": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", - "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", "dependencies": { - "get-intrinsic": "^1.2.1", - "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/define-properties": { @@ -9807,15 +10437,6 @@ "node": ">= 0.8" } }, - "node_modules/dequal": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", - "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/destr": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/destr/-/destr-2.0.2.tgz", @@ -9933,6 +10554,12 @@ "stream-shift": "^1.0.0" } }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -10060,49 +10687,56 @@ } }, "node_modules/es-abstract": { - "version": "1.22.3", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz", - "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==", - "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "arraybuffer.prototype.slice": "^1.0.2", - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.5", - "es-set-tostringtag": "^2.0.1", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", - "get-intrinsic": "^1.2.2", - "get-symbol-description": "^1.0.0", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "hasown": "^2.0.0", - "internal-slot": "^1.0.5", - "is-array-buffer": "^3.0.2", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", - "is-typed-array": "^1.1.12", + "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.4", - "regexp.prototype.flags": "^1.5.1", - "safe-array-concat": "^1.0.1", - "safe-regex-test": "^1.0.0", - "string.prototype.trim": "^1.2.8", - "string.prototype.trimend": "^1.0.7", - "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.0", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", - "which-typed-array": "^1.1.13" + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -10111,26 +10745,74 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/es-iterator-helpers": { - "version": "1.0.15", - "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.15.tgz", - "integrity": "sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==", + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", "dev": true, "dependencies": { - "asynciterator.prototype": "^1.0.0", "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-get-iterator/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, + "node_modules/es-iterator-helpers": { + "version": "1.0.19", + "resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz", + "integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", "define-properties": "^1.2.1", - "es-abstract": "^1.22.1", - "es-set-tostringtag": "^2.0.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.2.1", + "es-abstract": "^1.23.3", + "es-errors": "^1.3.0", + "es-set-tostringtag": "^2.0.3", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "globalthis": "^1.0.3", - "has-property-descriptors": "^1.0.0", - "has-proto": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", - "internal-slot": "^1.0.5", + "internal-slot": "^1.0.7", "iterator.prototype": "^1.1.2", - "safe-array-concat": "^1.0.1" + "safe-array-concat": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" } }, "node_modules/es-module-lexer": { @@ -10139,14 +10821,25 @@ "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", "peer": true }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-set-tostringtag": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz", - "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", "dependencies": { - "get-intrinsic": "^1.2.2", - "has-tostringtag": "^1.0.0", - "hasown": "^2.0.0" + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -10305,16 +10998,16 @@ } }, "node_modules/eslint": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", - "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.52.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -10359,36 +11052,74 @@ "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint-config-next": { - "version": "14.0.1", - "resolved": "https://registry.npmjs.org/eslint-config-next/-/eslint-config-next-14.0.1.tgz", - "integrity": "sha512-QfIFK2WD39H4WOespjgf6PLv9Bpsd7KGGelCtmq4l67nGvnlsGpuvj0hIT+aIy6p5gKH+lAChYILsyDlxP52yg==", + "node_modules/eslint-config-airbnb": { + "version": "19.0.4", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb/-/eslint-config-airbnb-19.0.4.tgz", + "integrity": "sha512-T75QYQVQX57jiNgpF9r1KegMICE94VYwoFQyMGhrvc+lB8YF2E/M/PYDaQe1AJcWaEgqLE+ErXV1Og/+6Vyzew==", "dev": true, "dependencies": { - "@next/eslint-plugin-next": "14.0.1", - "@rushstack/eslint-patch": "^1.3.3", - "@typescript-eslint/parser": "^5.4.2 || ^6.0.0", - "eslint-import-resolver-node": "^0.3.6", - "eslint-import-resolver-typescript": "^3.5.2", - "eslint-plugin-import": "^2.28.1", - "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-react-hooks": "^4.5.0 || 5.0.0-canary-7118f5dd7-20230705" + "eslint-config-airbnb-base": "^15.0.0", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5" + }, + "engines": { + "node": "^10.12.0 || ^12.22.0 || ^14.17.0 || >=16.0.0" }, "peerDependencies": { - "eslint": "^7.23.0 || ^8.0.0", - "typescript": ">=3.3.1" + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3", + "eslint-plugin-jsx-a11y": "^6.5.1", + "eslint-plugin-react": "^7.28.0", + "eslint-plugin-react-hooks": "^4.3.0" + } + }, + "node_modules/eslint-config-airbnb-base": { + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz", + "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==", + "dev": true, + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.5", + "semver": "^6.3.0" }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "peerDependencies": { + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.2" + } + }, + "node_modules/eslint-config-airbnb-base/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-config-airbnb-typescript": { + "version": "17.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-typescript/-/eslint-config-airbnb-typescript-17.1.0.tgz", + "integrity": "sha512-GPxI5URre6dDpJ0CtcthSZVBAfI+Uw7un5OYNVxP2EYi3H81Jw701yFP7AU+/vCE7xBtFmjge7kfhhk4+RAiig==", + "dev": true, + "dependencies": { + "eslint-config-airbnb-base": "^15.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "^5.13.0 || ^6.0.0", + "@typescript-eslint/parser": "^5.0.0 || ^6.0.0", + "eslint": "^7.32.0 || ^8.2.0", + "eslint-plugin-import": "^2.25.3" } }, "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -10530,27 +11261,27 @@ } }, "node_modules/eslint-plugin-jsx-a11y": { - "version": "6.7.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.7.1.tgz", - "integrity": "sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.9.0.tgz", + "integrity": "sha512-nOFOCaJG2pYqORjK19lqPqxMO/JpvdCZdPtNdxY3kvom3jTvkAbOvQvD8wuD0G8BYR0IGAGYDlzqWJOh/ybn2g==", "dev": true, "dependencies": { - "@babel/runtime": "^7.20.7", - "aria-query": "^5.1.3", - "array-includes": "^3.1.6", - "array.prototype.flatmap": "^1.3.1", - "ast-types-flow": "^0.0.7", - "axe-core": "^4.6.2", - "axobject-query": "^3.1.1", + "aria-query": "~5.1.3", + "array-includes": "^3.1.8", + "array.prototype.flatmap": "^1.3.2", + "ast-types-flow": "^0.0.8", + "axe-core": "^4.9.1", + "axobject-query": "~3.1.1", "damerau-levenshtein": "^1.0.8", "emoji-regex": "^9.2.2", - "has": "^1.0.3", - "jsx-ast-utils": "^3.3.3", - "language-tags": "=1.0.5", + "es-iterator-helpers": "^1.0.19", + "hasown": "^2.0.2", + "jsx-ast-utils": "^3.3.5", + "language-tags": "^1.0.9", "minimatch": "^3.1.2", - "object.entries": "^1.1.6", - "object.fromentries": "^2.0.6", - "semver": "^6.3.0" + "object.fromentries": "^2.0.8", + "safe-regex-test": "^1.0.3", + "string.prototype.includes": "^2.0.0" }, "engines": { "node": ">=4.0" @@ -10565,13 +11296,90 @@ "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true }, - "node_modules/eslint-plugin-jsx-a11y/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "node_modules/eslint-plugin-perfectionist": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-perfectionist/-/eslint-plugin-perfectionist-2.11.0.tgz", + "integrity": "sha512-XrtBtiu5rbQv88gl+1e2RQud9te9luYNvKIgM9emttQ2zutHPzY/AQUucwxscDKV4qlTkvLTxjOFvxqeDpPorw==", "dev": true, - "bin": { - "semver": "bin/semver.js" + "dependencies": { + "@typescript-eslint/utils": "^6.13.0 || ^7.0.0", + "minimatch": "^9.0.3", + "natural-compare-lite": "^1.4.0" + }, + "peerDependencies": { + "astro-eslint-parser": "^1.0.2", + "eslint": ">=8.0.0", + "svelte": ">=3.0.0", + "svelte-eslint-parser": "^0.37.0", + "vue-eslint-parser": ">=9.0.0" + }, + "peerDependenciesMeta": { + "astro-eslint-parser": { + "optional": true + }, + "svelte": { + "optional": true + }, + "svelte-eslint-parser": { + "optional": true + }, + "vue-eslint-parser": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-perfectionist/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==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/eslint-plugin-perfectionist/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } } }, "node_modules/eslint-plugin-react": { @@ -10654,6 +11462,36 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-unused-imports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unused-imports/-/eslint-plugin-unused-imports-3.2.0.tgz", + "integrity": "sha512-6uXyn6xdINEpxE1MtDjxQsyXB37lfyO2yKGVVgtD7WEWQGORSOZjgrD6hBhvGv4/SO+TOlS+UnC6JppRqbuwGQ==", + "dev": true, + "dependencies": { + "eslint-rule-composer": "^0.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "@typescript-eslint/eslint-plugin": "6 - 7", + "eslint": "8" + }, + "peerDependenciesMeta": { + "@typescript-eslint/eslint-plugin": { + "optional": true + } + } + }, + "node_modules/eslint-rule-composer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/eslint-rule-composer/-/eslint-rule-composer-0.3.0.tgz", + "integrity": "sha512-bt+Sh8CtDmn2OajxvNO+BX7Wn4CIWMpTRm3MaiKPCQcnnlm0CS2mhui6QaoeQugs+3Kj2ESKEEGJUdVafwhiCg==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -11399,6 +12237,12 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", @@ -11647,6 +12491,34 @@ "is-callable": "^1.1.3" } }, + "node_modules/foreground-child": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.2.1.tgz", + "integrity": "sha512-PXUUyLqrR2XCWICfv6ukppP96sdFwWbNEnfEMt7jNsISjMsvaLNinAHNDYyvkyU+SZG2BTSbT5NjG+vZslfGTA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -11813,15 +12685,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "dependencies": { + "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -11857,12 +12733,13 @@ } }, "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" }, "engines": { "node": ">= 0.4" @@ -12169,9 +13046,9 @@ } }, "node_modules/globals": { - "version": "13.23.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", - "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -12601,18 +13478,6 @@ "uuid": "dist/bin/uuid" } }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -12630,20 +13495,20 @@ } }, "node_modules/has-property-descriptors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", - "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", "dependencies": { - "get-intrinsic": "^1.1.1" + "es-define-property": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/has-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", - "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", "engines": { "node": ">= 0.4" }, @@ -12663,11 +13528,11 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -12699,9 +13564,9 @@ } }, "node_modules/hasown": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", - "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -12866,6 +13731,21 @@ "ms": "^2.0.0" } }, + "node_modules/husky": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", + "dev": true, + "bin": { + "husky": "lib/bin.js" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/typicode" + } + }, "node_modules/i18next": { "version": "23.6.0", "resolved": "https://registry.npmjs.org/i18next/-/i18next-23.6.0.tgz", @@ -12936,9 +13816,9 @@ ] }, "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "engines": { "node": ">= 4" } @@ -13019,11 +13899,11 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" }, "node_modules/internal-slot": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", - "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", "dependencies": { - "get-intrinsic": "^1.2.2", + "es-errors": "^1.3.0", "hasown": "^2.0.0", "side-channel": "^1.0.4" }, @@ -13096,13 +13976,15 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13188,6 +14070,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", @@ -13306,9 +14202,9 @@ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==" }, "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", "engines": { "node": ">= 0.4" }, @@ -13428,11 +14324,14 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", - "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", "dependencies": { - "call-bind": "^1.0.2" + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -13490,11 +14389,11 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -13609,6 +14508,24 @@ "set-function-name": "^2.0.1" } }, + "node_modules/jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, "node_modules/jake": { "version": "10.8.7", "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.7.tgz", @@ -13895,13 +14812,15 @@ } }, "node_modules/jsx-ast-utils": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.3.tgz", - "integrity": "sha512-fYQHZTZ8jSfmWZ0iyzfwiU4WDX4HpHbMCZ3gPlWYiCl3BoeOTsqKBqnTVfH2rYT7eP5c3sVbeSPHnnJOaTrWiw==", + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.3.5.tgz", + "integrity": "sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==", "dev": true, "dependencies": { - "array-includes": "^3.1.5", - "object.assign": "^4.1.3" + "array-includes": "^3.1.6", + "array.prototype.flat": "^1.3.1", + "object.assign": "^4.1.4", + "object.values": "^1.1.6" }, "engines": { "node": ">=4.0" @@ -13944,18 +14863,21 @@ } }, "node_modules/language-subtag-registry": { - "version": "0.3.22", - "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", - "integrity": "sha512-tN0MCzyWnoz/4nHS6uxdlFWoUZT7ABptwKPQ52Ea7URk6vll88bWBVhodtnlfEuCcKWNGoc+uGbw1cwa9IKh/w==", + "version": "0.3.23", + "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.23.tgz", + "integrity": "sha512-0K65Lea881pHotoGEa5gDlMxt3pctLi2RplBb7Ezh4rRdLEOtgi7n4EwK9lamnUCkKBqaeKRVebTq6BAxSkpXQ==", "dev": true }, "node_modules/language-tags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz", - "integrity": "sha512-qJhlO9cGXi6hBGKoxEG/sKZDAHD5Hnu9Hs4WbOY3pCWXDhw0N8x1NenNzm2EnNLkLkk7J2SdxAkDSbb6ftT+UQ==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.9.tgz", + "integrity": "sha512-MbjN408fEndfiQXbFQ1vnd+1NoLDsnQW41410oQBXiyXDMYH5z505juWa4KUE1LqxRC7DgOgZDbKLxHIwm27hA==", "dev": true, "dependencies": { - "language-subtag-registry": "~0.3.2" + "language-subtag-registry": "^0.3.20" + }, + "engines": { + "node": ">=0.10" } }, "node_modules/level": { @@ -14747,6 +15669,15 @@ "node": ">=0.10.0" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/mkdirp": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", @@ -15143,6 +16074,12 @@ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/natural-compare-lite": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz", + "integrity": "sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==", + "dev": true + }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -15458,6 +16395,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object-is": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.6.tgz", + "integrity": "sha512-F8cZ+KfGlSGi09lJT7/Nd6KJZ9ygtvYC0/UYYLI9nmQKLMnydpB9yvbv9K1uSkEu7FU9vYPmVwLg328tX+ot3Q==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -15467,12 +16420,12 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -15498,14 +16451,15 @@ } }, "node_modules/object.fromentries": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", - "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -15777,6 +16731,28 @@ "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "dev": true, + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -15943,6 +16919,14 @@ "node": ">=4.0.0" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postcss": { "version": "8.4.14", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", @@ -16095,9 +17079,10 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -16108,6 +17093,18 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -16913,13 +17910,14 @@ } }, "node_modules/regexp.prototype.flags": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz", - "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "set-function-name": "^2.0.0" + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" }, "engines": { "node": ">= 0.4" @@ -17332,12 +18330,12 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, @@ -17382,14 +18380,17 @@ } }, "node_modules/safe-regex-test": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", - "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.3", + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", "is-regex": "^1.1.4" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -17630,14 +18631,16 @@ "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" }, "node_modules/set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", "dependencies": { - "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -18275,6 +19278,18 @@ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==" }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dev": true, + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/stream-browserify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", @@ -18333,6 +19348,30 @@ "node": ">=8" } }, + "node_modules/string-width-cjs": { + "name": "string-width", + "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", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/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, + "engines": { + "node": ">=8" + } + }, "node_modules/string-width/node_modules/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", @@ -18341,6 +19380,16 @@ "node": ">=8" } }, + "node_modules/string.prototype.includes": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.includes/-/string.prototype.includes-2.0.0.tgz", + "integrity": "sha512-E34CkBgyeqNDcrbU76cDjL5JLcVrtSdYq0MEh/B10r17pRP4ciHLwTgnuLV8Ay6cgEMLkcBkFCKyFZ43YldYzg==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "node_modules/string.prototype.matchall": { "version": "4.0.10", "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.10.tgz", @@ -18361,13 +19410,14 @@ } }, "node_modules/string.prototype.trim": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", - "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==", + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -18377,26 +19427,29 @@ } }, "node_modules/string.prototype.trimend": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz", - "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz", - "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -18434,6 +19487,19 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "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" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -18677,6 +19743,22 @@ "get-port": "^3.1.0" } }, + "node_modules/synckit": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.1.tgz", + "integrity": "sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==", + "dev": true, + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/table": { "version": "6.8.1", "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", @@ -19187,9 +20269,9 @@ } }, "node_modules/tslib": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz", - "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==" + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", + "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==" }, "node_modules/tsort": { "version": "0.0.1", @@ -19339,27 +20421,28 @@ } }, "node_modules/typed-array-buffer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", - "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", - "is-typed-array": "^1.1.10" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" } }, "node_modules/typed-array-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", - "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -19369,15 +20452,16 @@ } }, "node_modules/typed-array-byte-offset": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", - "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "has-proto": "^1.0.1", - "is-typed-array": "^1.1.10" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" }, "engines": { "node": ">= 0.4" @@ -19387,13 +20471,19 @@ } }, "node_modules/typed-array-length": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", - "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", "dependencies": { - "call-bind": "^1.0.2", + "call-bind": "^1.0.7", "for-each": "^0.3.3", - "is-typed-array": "^1.1.9" + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -20249,15 +21339,15 @@ "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==" }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -20628,6 +21718,24 @@ "node": ">=6" } }, + "node_modules/wrap-ansi-cjs": { + "name": "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", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/wrap-ansi/node_modules/ansi-regex": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", diff --git a/package.json b/package.json index 344a12fa..f9f76e53 100644 --- a/package.json +++ b/package.json @@ -1,8 +1,8 @@ { "name": "nof-landing", - "version": "0.1.0", "license": "MIT", "private": true, + "version": "0.1.219", "proxy": "https://gamma-microservice-7bteynlhua-uc.a.run.app", "scripts": { "dev": "next dev", @@ -11,23 +11,25 @@ "create-env": "printenv > .env", "serve": "yarn build && npm i -g http-server && http-server ./.next", "export": "yarn build && next export -o _static", - "clear-all": "rm -rf .next _static node_modules", - "re-start": "rm -rf .next node_modules && yarn install && yarn dev", - "re-build": "rm -rf .next node_modules && yarn install && yarn build", - "lint": "next lint", - "lint:fix": "eslint --fix --ext .js,.jsx,.scss .", - "prettier": "./node_modules/.bin/prettier --write \"{,!(node_modules)/**/}*.{js,jsx,md,scss,tsx}\"", - "install:clean": "rm -rf node_modules/ && rm -rf package-lock.json && rm -rf .next/ && npm install && npm install -g generate-changelog yarn install-peerdeps", + "lint": "eslint \"src/**/*.{js,jsx}\"", + "lint:fix": "eslint --fix \"src/**/*.{js,jsx}\"", + "prettier": "prettier --write \"src/**/*.{js,jsx}\"", + "rm:all": "rm -rf node_modules .next out dist build", + "re:start": "yarn rm:all && yarn install && yarn dev", + "re:build": "yarn rm:all && yarn install && yarn build", + "re:build-npm": "npm run rm:all && npm install && npm run build", + "dev:ts": "yarn dev & yarn ts:watch", "git-prune": "git remote prune origin", "git-config": "git config --global core.autocrlf true", "git-log": "git log --oneline --decorate", "gitp": "git log --pretty=”%s”", "commitlint-check-comit-msg": "npx --no-install commitlint --edit \"$1\"", + "pre-commit": "npm run prettier && npm run lint:fix && npm run commitlint-check-comit-msg", + "inspect": "cross-env NODE_OPTIONS=\"--inspect --trace-warnings\" next dev", "docker:build": "bash ./scripts/docker-build.sh", "docker:run": "bash docker run -d -p 3000:3000 --name my-nextjs-container my-nextjs-app" }, "dependencies": { - "@next/eslint-plugin-next": "^14.0.1", "@nomicfoundation/hardhat-toolbox": "^2.0.0", "@sendgrid/mail": "^8.1.0", "@walletconnect/web3-provider": "^1.8.0", @@ -46,7 +48,7 @@ "next-i18next": "^15.0.0", "next-pwa": "^5.6.0", "nodemailer": "^6.9.8", - "prettier": "^3.0.3", + "prop-types": "^15.8.1", "react": "18.2.0", "react-card-flip": "^1.2.2", "react-dom": "18.2.0", @@ -65,11 +67,23 @@ "devDependencies": { "@commitlint/cli": "^18.4.3", "@commitlint/config-conventional": "^18.4.3", - "eslint": "^8.52.0", - "eslint-config-next": "^14.0.1", - "eslint-config-prettier": "^9.0.0", + "@next/eslint-plugin-next": "^14.0.4", + "eslint": "^8.55.0", + "eslint-config-airbnb": "^19.0.4", + "eslint-config-airbnb-typescript": "^17.1.0", + "eslint-config-prettier": "^9.1.0", + "eslint-import-resolver-typescript": "^3.6.1", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-jsx-a11y": "^6.8.0", + "eslint-plugin-perfectionist": "^2.5.0", + "eslint-plugin-prettier": "^5.0.1", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", + "eslint-plugin-unused-imports": "^3.0.0", "file-loader": "^6.2.0", - "pre-commit": "^1.2.2" + "husky": "^8.0.3", + "pre-commit": "^1.2.2", + "prettier": "^3.1.0" }, "cacheDirectories": [ ".next/cache" @@ -87,16 +101,13 @@ ] }, "engines": { - "node": "^16 || ^17 || ^18", - "npm": "^8.1.0 || ^8.5.0 || ^9.8.1", - "yarn": "^1.22.10 || ^1.22.19" + "node": ">=16.0.0", + "npm": ">=8.1.0", + "yarn": ">=1.22.10" }, - "pre-commit": { - "precommit.silent": true, - "run": [ - "commitlint-check-comit-msg", - "lint:fix", - "prettier" - ] + "husky": { + "hooks": { + "pre-commit": "npm run pre-commit" + } } } From f6a6dc0ca28b7c1cabafdb881e1d8e5a8bbf4147 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 09:08:00 -0300 Subject: [PATCH 27/34] [fix] :bug: replace sepolia rpc provider (#375) --- src/config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.js b/src/config.js index 5c6af303..ae0270b4 100644 --- a/src/config.js +++ b/src/config.js @@ -259,7 +259,7 @@ export const NETWORKS = { d: 11155111 }, chainCurrency: 'ETH', - ChainRpcUrl: 'https://sepolia.gateway.tenderly.co', + ChainRpcUrl: 'https://1rpc.io/sepolia', chainExplorerUrl: 'https://sepolia.etherscan.io', chainOpenSeaBaseUrl: 'https://testnets.opensea.io', chainNftUrl: '', From 0fd430b6699c10c1b93b71647f4206d887098eb5 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 09:11:42 -0300 Subject: [PATCH 28/34] [fix] :bug: disable notifications in web-context (#375, #376) --- src/context/NotificationContext.js | 10 ++++------ src/context/Web3Context.js | 8 +++++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/context/NotificationContext.js b/src/context/NotificationContext.js index d202ca19..e69512af 100644 --- a/src/context/NotificationContext.js +++ b/src/context/NotificationContext.js @@ -21,21 +21,19 @@ export function NotificationProvider({ children }) { }) } - const getNotificationsByUser = (userWalletAddress) => { - /* - if (!userWalletAddress) return notifications + const getNotificationsByUser = (user) => { + if (!user || !notifications.length) return notifications const myNotifications = notifications.filter( - (notification) => notification.walletAddress === userWalletAddress && notification.deleted === false + (notification) => notification.walletAddress === user && notification.deleted === false ) return filterUniqueNotifications(myNotifications) - */ } /* useEffect(() => { const filteredNotifications = getNotificationsByUser(walletAddress) setNotifications(filteredNotifications) - }, [walletAddress]) // eslint-disable-line react-hooks/exhaustive-deps + }, [walletAddress]) //eslint-disable-line react-hooks/exhaustive-deps */ const addNotification = (user, message, data) => { diff --git a/src/context/Web3Context.js b/src/context/Web3Context.js index b7be6068..2bb5acf7 100644 --- a/src/context/Web3Context.js +++ b/src/context/Web3Context.js @@ -16,8 +16,8 @@ import gammaCardsAbi from './abis/gamma/GammaCards.v5.sol/NofGammaCardsV5.json' import gammaOffersAbi from './abis/gamma/GammaOffers.v4.sol/NofGammaOffersV4.json' import gammaTicketsAbi from './abis/gamma/GammaTickets.v1.sol/NofGammaTicketsV1.json' import { NETWORKS, walletConnectProjectId, environment } from '../config' -import { NotificationContext } from './NotificationContext' -import { getAccountAddressText } from '../utils/stringUtils' +// import { NotificationContext } from './NotificationContext' +// import { getAccountAddressText } from '../utils/stringUtils' const initialState = { connectWallet: () => {}, @@ -37,7 +37,7 @@ function Web3ContextProvider({ children }) { const [gammaCardsContract, setGammaCardsContract] = useState(null) const [gammaOffersContract, setGammaOffersContract] = useState(null) const [gammaTicketsContract, setGammaTicketsContract] = useState(null) - const { addNotification } = useContext(NotificationContext) + // const { addNotification } = useContext(NotificationContext) const { address, chainId, isConnected } = useWeb3ModalAccount() const { walletProvider } = useWeb3ModalProvider() const { disconnect } = useDisconnect() @@ -138,6 +138,7 @@ function Web3ContextProvider({ children }) { _signer ) + /* gammaPacksContractInstance.on('PackTransfered', (from, to, tokenId) => { const packNbr = ethers.BigNumber.from(tokenId).toNumber() addNotification(to, 'notification_pack_transfer', [ @@ -188,6 +189,7 @@ function Web3ContextProvider({ children }) { { item: 'TICKET_ID', value: ticketId, valueShort: getAccountAddressText(ticketId) } ]) }) + */ setDaiContract(daiContractInstance) setAlphaContract(alphaContractInstance) From c07218892792533f14842b8d7e2d2ffe74c9564a Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 09:13:38 -0300 Subject: [PATCH 29/34] [chore] :rotating_light: linter --- src/components/Navbar/AccountInfo.jsx | 3 +-- src/components/Navbar/Navbar.jsx | 1 - src/context/Web3Context.js | 2 +- src/pages/api/version/v.js | 2 +- src/sections/Alpha/AlphaMain.jsx | 10 +++++----- src/services/handleError.js | 2 -- src/services/handleVersion.js | 2 +- 7 files changed, 9 insertions(+), 13 deletions(-) diff --git a/src/components/Navbar/AccountInfo.jsx b/src/components/Navbar/AccountInfo.jsx index bdfc6585..74ee0b05 100644 --- a/src/components/Navbar/AccountInfo.jsx +++ b/src/components/Navbar/AccountInfo.jsx @@ -42,7 +42,7 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { console.error({ e }) } }, [walletAddress, daiContract, isValidNetwork]) - + const fetchBalance = useCallback(async () => { if (!walletAddress || !daiContract || !isValidNetwork) return try { @@ -57,7 +57,6 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { fetchTokenName() }, [walletAddress, daiContract, isValidNetwork]) //eslint-disable-line react-hooks/exhaustive-deps - useEffect(() => { fetchBalance() }, [walletBalance, walletAddress, isValidNetwork]) //eslint-disable-line react-hooks/exhaustive-deps diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index 48f35f08..97b11f81 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -76,7 +76,6 @@ function Navbar() { fetchVersion().then(setProductVersion) }, [productVersion]) //eslint-disable-line react-hooks/exhaustive-deps - useEffect(() => { document.addEventListener('mousedown', handleClickOutside) return () => { diff --git a/src/context/Web3Context.js b/src/context/Web3Context.js index 2bb5acf7..b77fcd3d 100644 --- a/src/context/Web3Context.js +++ b/src/context/Web3Context.js @@ -189,7 +189,7 @@ function Web3ContextProvider({ children }) { { item: 'TICKET_ID', value: ticketId, valueShort: getAccountAddressText(ticketId) } ]) }) - */ + */ setDaiContract(daiContractInstance) setAlphaContract(alphaContractInstance) diff --git a/src/pages/api/version/v.js b/src/pages/api/version/v.js index 2041e3fc..2f0d1fd2 100644 --- a/src/pages/api/version/v.js +++ b/src/pages/api/version/v.js @@ -1,5 +1,5 @@ import { nofVersion } from '../../../config' export default async function handler(req, res) { - res.status(200).json({ version: nofVersion }) + res.status(200).json({ version: nofVersion }) } diff --git a/src/sections/Alpha/AlphaMain.jsx b/src/sections/Alpha/AlphaMain.jsx index 3706fea9..2c51ea3a 100644 --- a/src/sections/Alpha/AlphaMain.jsx +++ b/src/sections/Alpha/AlphaMain.jsx @@ -109,9 +109,9 @@ const AlphaMain = () => { console.log('fetchSeasonData 2', alphaContract.address) console.log('fetchSeasonData 2', alphaContract) - // Define la función de solicitud - const key = `fetchSeasonData-${walletAddress}` - const requestFunc = async () => { + // Define la función de solicitud + const key = `fetchSeasonData-${walletAddress}` + const requestFunc = async () => { const seasonData = await alphaContract.getSeasonData() console.log('fetchSeasonData 3', seasonData) return seasonData @@ -119,9 +119,9 @@ const AlphaMain = () => { // Usa fetchWithRetry para realizar la solicitud let seasonData = await fetchWithRetry(key, requestFunc) - + // let seasonData = await alphaContract.getSeasonData() - + if (seasonData) { let currentSeason let currentPrice diff --git a/src/services/handleError.js b/src/services/handleError.js index 304cb098..66c70e51 100644 --- a/src/services/handleError.js +++ b/src/services/handleError.js @@ -6,7 +6,6 @@ export const handleError = async (wallet, operation, errorMsg) => { } } -/* export const handleError2 = async (wallet, operation, errorMsg) => { try { console.error({ errorMsg }) @@ -29,4 +28,3 @@ export const handleError2 = async (wallet, operation, errorMsg) => { console.log('error en _handleError', ex) } } -*/ \ No newline at end of file diff --git a/src/services/handleVersion.js b/src/services/handleVersion.js index 8e63b2d2..4ab2c629 100644 --- a/src/services/handleVersion.js +++ b/src/services/handleVersion.js @@ -1,4 +1,4 @@ -import RenderResult from "next/dist/server/render-result" +import RenderResult from 'next/dist/server/render-result' export const getProductVersion = async () => { try { From ff2e96be155f2eaccfb463f14bcd8b29d60731b8 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 09:31:26 -0300 Subject: [PATCH 30/34] [fix] :bug: add middleware to handle alpha data (#375) --- src/services/middleware.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/services/middleware.js diff --git a/src/services/middleware.js b/src/services/middleware.js new file mode 100644 index 00000000..03a57a76 --- /dev/null +++ b/src/services/middleware.js @@ -0,0 +1,27 @@ +const cache = new Map() + +export const fetchWithRetry = async (key, requestFunc, retries = 5, delay = 2000) => { + // Verifica si el resultado ya está en caché + if (cache.has(key)) { + console.log('get from cache: ', key) + return cache.get(key) + } + + console.log('NO from cache: ', key) + for (let i = 0; i < retries; i++) { + try { + const result = await requestFunc() + // Guarda el resultado en caché + cache.set(key, result) + console.log('save in cache:', key, result) + return result + } catch (error) { + console.log('retry: ', key, i + 1) + if (error.code === -32005 && i < retries - 1) { + await new Promise((resolve) => setTimeout(resolve, delay)) + } else { + throw error + } + } + } +} From 2308ea9df936f7425530b5686dc53134e7352ec4 Mon Sep 17 00:00:00 2001 From: dappsar Date: Sat, 20 Jul 2024 11:55:28 -0300 Subject: [PATCH 31/34] [feat] :rotating_light: fix linter errors (#377) --- .eslintrc | 174 +++++++++- src/components/CustomImage/CustomImage.jsx | 2 +- src/components/FlipBook/FlipBook.jsx | 13 +- src/components/FlipBook/HtmlFlipBook.jsx | 10 +- src/components/Footer/Footer.jsx | 14 +- src/components/Footer/FooterButtons.jsx | 17 +- .../LanguageSelection/LanguageSelection.jsx | 93 +++--- src/components/Layout/Layout.jsx | 5 +- src/components/Navbar/AccountInfo.jsx | 38 ++- src/components/Navbar/Navbar.jsx | 30 +- src/components/Navbar/NofTown.jsx | 2 +- src/components/Navbar/NotificationInfo.jsx | 10 +- src/components/Navbar/Whitepaper.jsx | 2 +- src/context/GammaDataContext.js | 15 +- src/context/LayoutContext.js | 4 +- src/context/NotificationContext.js | 2 +- src/context/SettingsContext.js | 15 +- src/context/Web3Context.js | 23 +- src/hooks/index.js | 6 +- src/hooks/useGammaDataContext.js | 1 + src/hooks/useLayoutContext.js | 1 + src/hooks/useNotificationContext.js | 1 + src/hooks/useSettingsContext.js | 1 + src/hooks/useWeb3Context.js | 1 + src/pages/_app.jsx | 11 +- src/pages/_offline.jsx | 1 + src/pages/admin.jsx | 5 +- src/pages/alpha.jsx | 1 + src/pages/api/characters.js | 37 ++- src/pages/api/info.js | 14 +- src/pages/api/mail/common.js | 17 +- src/pages/api/mail/e.js | 2 +- src/pages/api/missing.js | 17 +- src/pages/api/newCharacter.js | 3 +- src/pages/api/post.js | 5 +- src/pages/api/rank.js | 20 +- src/pages/api/vote.js | 7 +- src/pages/gamma.jsx | 1 + src/pages/index.jsx | 1 + src/sections/Alpha/AlphaAlbums.jsx | 20 +- src/sections/Alpha/AlphaMain.jsx | 111 +++---- src/sections/Common/Rules.jsx | 5 +- src/sections/Gamma/GammaAlbum.jsx | 17 +- src/sections/Gamma/GammaAlbumInfo.jsx | 16 +- src/sections/Gamma/GammaAlbumPublish.jsx | 37 +-- src/sections/Gamma/GammaCardExchange.jsx | 25 +- src/sections/Gamma/GammaCardInfo.jsx | 34 +- src/sections/Gamma/GammaCardOffers.jsx | 25 +- src/sections/Gamma/GammaMain.jsx | 300 ++++++++---------- src/sections/Gamma/GammaPackOpen.jsx | 107 +++---- src/sections/Gamma/GammaPackOpenCards.jsx | 7 +- src/sections/Gamma/index.jsx | 4 +- src/sections/Main/Main.jsx | 193 ++++++----- src/sections/Offline/OfflineMain.jsx | 2 +- src/services/alpha.js | 37 +-- src/services/gamma.js | 147 +++++---- src/services/handleVersion.js | 3 +- src/services/middleware.js | 37 ++- src/services/offers.js | 9 +- src/utils/alert.js | 8 +- 60 files changed, 926 insertions(+), 840 deletions(-) diff --git a/.eslintrc b/.eslintrc index 30cd6529..a8b484a9 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,25 +1,177 @@ { + "root": true, "env": { "browser": true, "es2021": true }, + "plugins": [ + "perfectionist", + "unused-imports", + "prettier", + "react", + "@next/eslint-plugin-next" + // "react", + // "@next/eslint-plugin-next" + ], "extends": [ // "eslint:recommended", // "plugin:react/recommended", // "plugin:@next/next/recommended", // "prettier" + "airbnb", + "airbnb/hooks", + "prettier", + "plugin:react/recommended", + "plugin:@next/next/recommended" ], "parserOptions": { - "ecmaFeatures": { + "ecmaVersion": 12, + "sourceType": "module", + "ecmaFeatures": { "jsx": true }, - "ecmaVersion": 12, - "sourceType": "module" }, - "plugins": [ - "react", - // "@next/eslint-plugin-next" - ], + "settings": { + "import/resolver": { + "node": { + "extensions": [".js", ".jsx", ".ts", ".tsx", ".css"] + } + } + }, + "rules": { + "no-alert": 0, + "camelcase": 0, + "no-console": 0, + "no-unused-vars": [ + "off", + { + "ignoreRestSiblings": true + } + ], + "no-param-reassign": 0, + "no-underscore-dangle": 0, + "no-restricted-exports": 0, + "react/no-children-prop": 0, + "consistent-return": 0, + "react/react-in-jsx-scope": 0, + "jsx-a11y/anchor-is-valid": 0, + "react/no-array-index-key": 0, + "no-promise-executor-return": 0, + "react/require-default-props": 0, + "react/jsx-props-no-spreading": 0, + "react/display-name": 0, + "import/prefer-default-export": 0, + "react/function-component-definition": 0, + "jsx-a11y/control-has-associated-label": 0, + "react/forbid-prop-types": 0, + "no-plusplus": 0, + "no-use-before-define": 0, + "react/jsx-no-useless-fragment": [ + 1, + { + "allowExpressions": true + } + ], + "prefer-destructuring": [ + 1, + { + "object": true, + "array": false + } + ], + "react/no-unstable-nested-components": [ + 1, + { + "allowAsProps": true + } + ], + "react/jsx-no-duplicate-props": [ + 1, + { + "ignoreCase": false + } + ], + // unused-imports + // https://www.npmjs.com/package/eslint-plugin-unused-imports + "unused-imports/no-unused-imports": 1, + "unused-imports/no-unused-vars": [ + 0, + { + "vars": "all", + "varsIgnorePattern": "^_", + "args": "after-used", + "argsIgnorePattern": "^_" + } + ], + // perfectionist + // https://eslint-plugin-perfectionist.azat.io/ + "perfectionist/sort-named-imports": [ + 1, + { + "order": "asc", + "type": "line-length" + } + ], + "perfectionist/sort-named-exports": [ + 1, + { + "order": "asc", + "type": "line-length" + } + ], + "perfectionist/sort-exports": [ + 1, + { + "order": "asc", + "type": "line-length" + } + ], + "perfectionist/sort-imports": [ + 1, + { + "order": "asc", + "type": "line-length", + "newlines-between": "always", + "groups": [ + [ + "builtin", + "external" + ], + "custom-context", + "custom-services", + "custom-hooks", + "custom-utils", + "internal", + "custom-components", + "custom-sections", + "custom-styles", + [ + "parent", + "sibling", + "index" + ], + "object", + "unknown" + ], + "custom-groups": { + "value": { + "custom-context": "src/context/**", + "custom-services": "src/services/**", + "custom-hooks": "src/hooks/**", + "custom-utils": "src/utils/**", + "custom-components": "src/components/**", + "custom-sections": "src/sections/**", + "custom-styles": "src/styles/**" + } + }, + "internal-pattern": [ + "src/**" + ] + } + ] + } + + /* "rules": { "arrow-body-style": 1, "react/prop-types": 1, @@ -31,6 +183,12 @@ "@next/next/no-img-element": 0, "react/no-unescaped-entities": 0, "import/no-useless-path-segments": 1, - "no-unused-vars": 0 + "no-unused-vars": [ + 1, + { + "ignoreRestSiblings": false + } + ] } + */ } diff --git a/src/components/CustomImage/CustomImage.jsx b/src/components/CustomImage/CustomImage.jsx index 302cd0f0..a1e111cf 100644 --- a/src/components/CustomImage/CustomImage.jsx +++ b/src/components/CustomImage/CustomImage.jsx @@ -1,5 +1,5 @@ -import React, { useState } from 'react' import PropTypes from 'prop-types' +import React, { useState } from 'react' function CustomImage({ src, alt, className }) { const [error, setError] = useState(false) diff --git a/src/components/FlipBook/FlipBook.jsx b/src/components/FlipBook/FlipBook.jsx index 7ef3dd88..7bc594f9 100644 --- a/src/components/FlipBook/FlipBook.jsx +++ b/src/components/FlipBook/FlipBook.jsx @@ -1,5 +1,6 @@ -import React, { useEffect, useState } from 'react' import PropTypes from 'prop-types' +import React, { useState, useEffect } from 'react' + import HTMLFlipBook from './HtmlFlipBook' import { useLayoutContext } from '../../hooks' @@ -48,8 +49,8 @@ const FlipBook = (props) => { minHeight={350} maxHeight={600} swipeDistance={30} - showPageCorners={true} - autoSize={true} + showPageCorners + autoSize startPage={startPage} ref={bookRef} usePortrait={windowSize.size} @@ -74,12 +75,12 @@ const FlipBook = (props) => { >
{index % 2 === 0 ? ( - {content} + <>{content} ) : ( - + <> {showClose && } {content} - + )}
diff --git a/src/components/FlipBook/HtmlFlipBook.jsx b/src/components/FlipBook/HtmlFlipBook.jsx index 495d0153..e5054c78 100644 --- a/src/components/FlipBook/HtmlFlipBook.jsx +++ b/src/components/FlipBook/HtmlFlipBook.jsx @@ -1,7 +1,7 @@ -import React, { useCallback, useEffect, useImperativeHandle, useRef, useState } from 'react' import PropTypes from 'prop-types' // import { PageFlip } from 'page-flip' import { PageFlip } from 'book-flip' +import React, { useRef, useState, useEffect, useCallback, useImperativeHandle } from 'react' const HTMLFlipBookForward = React.forwardRef((props, ref) => { const htmlElementRef = useRef(null) @@ -17,7 +17,7 @@ const HTMLFlipBookForward = React.forwardRef((props, ref) => { if (pageFlip.current) { pageFlip.current.clear() } - }, []) //eslint-disable-line react-hooks/exhaustive-deps + }, []) // eslint-disable-line react-hooks/exhaustive-deps const removeHandlers = useCallback(() => { const flip = pageFlip.current @@ -29,7 +29,7 @@ const HTMLFlipBookForward = React.forwardRef((props, ref) => { flip.off('init') flip.off('update') } - }, []) //eslint-disable-line react-hooks/exhaustive-deps + }, []) // eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { childRef.current = [] @@ -54,7 +54,7 @@ const HTMLFlipBookForward = React.forwardRef((props, ref) => { } } removeHandlers() - }, [props.children]) //eslint-disable-line react-hooks/exhaustive-deps + }, [props.children]) // eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { const setHandlers = () => { @@ -98,7 +98,7 @@ const HTMLFlipBookForward = React.forwardRef((props, ref) => { setHandlers() } - }, [pages]) //eslint-disable-line react-hooks/exhaustive-deps + }, [pages]) // eslint-disable-line react-hooks/exhaustive-deps return (
diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx index 0fc760cf..57ca0f8a 100644 --- a/src/components/Footer/Footer.jsx +++ b/src/components/Footer/Footer.jsx @@ -1,7 +1,7 @@ import React from 'react' -import { useLayoutContext } from '../../hooks' import FooterButtons from './FooterButtons' +import { useLayoutContext } from '../../hooks' function Footer() { const { mobile, turnNextPage, turnPrevPage } = useLayoutContext() @@ -14,20 +14,14 @@ function Footer() {
{!mobile && ( <> -
- <> -
-
- <> -
+
+
)} {!mobile && ( <> -
- <> -
+

Number One Fan &
diff --git a/src/components/Footer/FooterButtons.jsx b/src/components/Footer/FooterButtons.jsx index 7b260aff..5fd482d2 100644 --- a/src/components/Footer/FooterButtons.jsx +++ b/src/components/Footer/FooterButtons.jsx @@ -1,5 +1,6 @@ import React from 'react' import Link from 'next/link' + import { useLayoutContext } from '../../hooks' function FooterButtons() { @@ -45,9 +46,7 @@ function FooterButtons() { className={ (footerButtonsClasses && footerButtonsClasses[0]) ?? 'footer__buttons__bluebtn_custom' } - > - <> -

+ /> )} {showButtons[1] && buttonFunctions && buttonFunctions[1] && (
- <> -
+ /> )} {showButtons[2] && buttonFunctions && buttonFunctions[2] && (
- <> -
+ /> )} {showButtons[3] && buttonFunctions && buttonFunctions[3] && (
- <> -
+ /> )}
) diff --git a/src/components/LanguageSelection/LanguageSelection.jsx b/src/components/LanguageSelection/LanguageSelection.jsx index c84329fb..d5a9cd44 100644 --- a/src/components/LanguageSelection/LanguageSelection.jsx +++ b/src/components/LanguageSelection/LanguageSelection.jsx @@ -1,5 +1,6 @@ -import React, { useState } from 'react' import Image from 'next/image' +import React, { useState } from 'react' + import { useSettingsContext } from '../../hooks' function LanguageSelection() { @@ -35,52 +36,50 @@ function LanguageSelection() { } return ( - <> -
- - {dropdownOpen && ( -
-
    -
  • - -
  • -
  • - -
  • -
  • - -
  • -
-
- )} -
- +
+ + {dropdownOpen && ( +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+ )} +
) } diff --git a/src/components/Layout/Layout.jsx b/src/components/Layout/Layout.jsx index 569cbcf4..50ea283c 100644 --- a/src/components/Layout/Layout.jsx +++ b/src/components/Layout/Layout.jsx @@ -1,10 +1,11 @@ import React from 'react' import PropTypes from 'prop-types' -import { useLayoutContext } from '../../hooks' -import Loading from '../Loading' + import NofHead from '../Head' import Navbar from '../Navbar' import Footer from '../Footer' +import Loading from '../Loading' +import { useLayoutContext } from '../../hooks' const Layout = ({ children }) => { const { loading } = useLayoutContext() diff --git a/src/components/Navbar/AccountInfo.jsx b/src/components/Navbar/AccountInfo.jsx index 74ee0b05..4dc58e8d 100644 --- a/src/components/Navbar/AccountInfo.jsx +++ b/src/components/Navbar/AccountInfo.jsx @@ -1,17 +1,17 @@ -import React, { useState, useEffect, useCallback } from 'react' -import PropTypes from 'prop-types' import Link from 'next/link' -import { useTranslation } from 'next-i18next' import Swal from 'sweetalert2' -import { HiOutlineClipboardDocument } from 'react-icons/hi2' +import PropTypes from 'prop-types' +import { useTranslation } from 'next-i18next' import { GoLinkExternal } from 'react-icons/go' +import { HiOutlineClipboardDocument } from 'react-icons/hi2' import { AiOutlineSend, AiOutlineBank } from 'react-icons/ai' +import React, { useState, useEffect, useCallback } from 'react' import { useWeb3Context, useLayoutContext } from '../../hooks' -import { getBalance, getTokenName, transfer, mintDai } from '../../services/dai' -import { emitError, emitInfo, emitSuccess } from '../../utils/alert' -import { checkInputAddress, checkFloatValue1GTValue2 } from '../../utils/InputValidators' import { getAccountAddressText } from '../../utils/stringUtils' +import { emitInfo, emitError, emitSuccess } from '../../utils/alert' +import { mintDai, transfer, getBalance, getTokenName } from '../../services/dai' +import { checkInputAddress, checkFloatValue1GTValue2 } from '../../utils/InputValidators' const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { const { t } = useTranslation() @@ -55,11 +55,11 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { useEffect(() => { fetchTokenName() - }, [walletAddress, daiContract, isValidNetwork]) //eslint-disable-line react-hooks/exhaustive-deps + }, [walletAddress, daiContract, isValidNetwork]) // eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { fetchBalance() - }, [walletBalance, walletAddress, isValidNetwork]) //eslint-disable-line react-hooks/exhaustive-deps + }, [walletBalance, walletAddress, isValidNetwork]) // eslint-disable-line react-hooks/exhaustive-deps function copyToClipboard(text) { navigator.clipboard.writeText(text) @@ -101,13 +101,11 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { if (isNaN(amount)) { amountInput.classList.add('swal2-inputerror') Swal.showValidationMessage(`${t('amount_invalid')}`) - } else { - if (isNaN(amount)) { - amountInput.classList.add('swal2-inputerror') - Swal.showValidationMessage(`${t('amount_invalid')}`) - } + } else if (isNaN(amount)) { + amountInput.classList.add('swal2-inputerror') + Swal.showValidationMessage(`${t('amount_invalid')}`) } - return { amount: amount } + return { amount } } }) @@ -174,7 +172,7 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { Swal.showValidationMessage(`${t('quantity_invalid')}`) } } - return { wallet: wallet, amount: amount } + return { wallet, amount } } }) @@ -295,22 +293,22 @@ const AccountInfo = ({ showAccountInfo, setShowAccountInfo }) => { return (
{isConnected ? ( - + <>
{isValidNetwork && ( - + <>
-
+ )}

-
+ ) : (
diff --git a/src/components/Navbar/Navbar.jsx b/src/components/Navbar/Navbar.jsx index 97b11f81..0dee931c 100644 --- a/src/components/Navbar/Navbar.jsx +++ b/src/components/Navbar/Navbar.jsx @@ -1,16 +1,16 @@ -import React, { useRef, useEffect, useState } from 'react' import Link from 'next/link' import Image from 'next/image' -import { useTranslation } from 'next-i18next' import { useRouter } from 'next/router' +import { useTranslation } from 'next-i18next' +import React, { useRef, useState, useEffect } from 'react' -import Whitepaper from './Whitepaper.jsx' import NofTown from './NofTown.jsx' +import Whitepaper from './Whitepaper.jsx' import AccountInfo from './AccountInfo.jsx' -import NotificationInfo from './NotificationInfo.jsx' import LanguageSelection from '../LanguageSelection' -import { useLayoutContext, useWeb3Context, useNotificationContext } from '../../hooks' +import NotificationInfo from './NotificationInfo.jsx' import { getProductVersion } from '../../services/handleVersion.js' +import { useWeb3Context, useLayoutContext, useNotificationContext } from '../../hooks' function Navbar() { const { t } = useTranslation() @@ -74,7 +74,7 @@ function Navbar() { useEffect(() => { fetchVersion().then(setProductVersion) - }, [productVersion]) //eslint-disable-line react-hooks/exhaustive-deps + }, [productVersion]) // eslint-disable-line react-hooks/exhaustive-deps useEffect(() => { document.addEventListener('mousedown', handleClickOutside) @@ -97,7 +97,7 @@ function Navbar() { const ButtonNof = () => (
handleAudioClick()} className='navbar__left__nof'> - nof + nof {productVersion}
@@ -115,17 +115,15 @@ function Navbar() { ) const ButtonNotification = () => ( - -
handleNotificationClick()} className='navbar__right__notif'> - {notificationsNbr > 0 &&
{notificationsNbr}
} - coin -
-
+
handleNotificationClick()} className='navbar__right__notif'> + {notificationsNbr > 0 &&
{notificationsNbr}
} + coin +
) const ButtonAccount = () => (
handleAccountClick()} className='navbar__right__account'> - coin + coin
) @@ -136,7 +134,7 @@ function Navbar() {
    -
  • +
  • {isHomePage && } @@ -161,7 +159,7 @@ function Navbar() {
-