From a4a80bcb3d05cb213b045a2f40932f8ae160615c Mon Sep 17 00:00:00 2001 From: titix Date: Wed, 27 Mar 2024 17:56:11 -0300 Subject: [PATCH 01/24] fix: env var | cypress | dependencies | ui styles --- .env.example | 2 +- cypress/e2e/fundamentals.cy.ts | 5 --- cypress/e2e/landing.ts | 5 +++ cypress/fixtures/example.json | 5 --- cypress/support/commands.ts | 36 ------------------- cypress/support/e2e.ts | 21 +---------- package.json | 1 - pnpm-lock.yaml | 17 --------- src/config/env.ts | 14 +++++--- src/containers/Footer/index.tsx | 2 +- src/containers/Header/index.tsx | 12 +++++-- src/pages/layout.tsx | 9 +---- ...b3ModalProvider.tsx => WalletProvider.tsx} | 2 +- src/providers/index.tsx | 4 +-- src/utils/Variables.ts | 7 ++++ 15 files changed, 38 insertions(+), 104 deletions(-) delete mode 100644 cypress/e2e/fundamentals.cy.ts create mode 100644 cypress/e2e/landing.ts delete mode 100644 cypress/fixtures/example.json rename src/providers/{Web3ModalProvider.tsx => WalletProvider.tsx} (92%) diff --git a/.env.example b/.env.example index 3a4e274..fec4611 100644 --- a/.env.example +++ b/.env.example @@ -1,3 +1,3 @@ NEXT_PUBLIC_RPC_URL= # Example: https://localhost:8545 -NEXT_PUBLIC_PROJECT_ID= # API from WalletConnect +NEXT_PUBLIC_PROJECT_ID= # ProjectID from WalletConnect NEXT_PUBLIC_ALCHEMY_KEY= # API key from Alchemy \ No newline at end of file diff --git a/cypress/e2e/fundamentals.cy.ts b/cypress/e2e/fundamentals.cy.ts deleted file mode 100644 index 1360e51..0000000 --- a/cypress/e2e/fundamentals.cy.ts +++ /dev/null @@ -1,5 +0,0 @@ -describe('template spec', () => { - it('passes', () => { - cy.visit('https://example.cypress.io'); - }); -}); diff --git a/cypress/e2e/landing.ts b/cypress/e2e/landing.ts new file mode 100644 index 0000000..a4c7f11 --- /dev/null +++ b/cypress/e2e/landing.ts @@ -0,0 +1,5 @@ +describe('basic test', () => { + it('test', () => { + cy.visit('/'); + }); +}); diff --git a/cypress/fixtures/example.json b/cypress/fixtures/example.json deleted file mode 100644 index 02e4254..0000000 --- a/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "Using fixtures to represent data", - "email": "hello@cypress.io", - "body": "Fixtures are a great way to mock data for responses to routes" -} diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 698b01a..6d4cbd5 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -1,37 +1 @@ /// -// *********************************************** -// This example commands.ts shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) -// -// declare global { -// namespace Cypress { -// interface Chainable { -// login(email: string, password: string): Chainable -// drag(subject: string, options?: Partial): Chainable -// dismiss(subject: string, options?: Partial): Chainable -// visit(originalFn: CommandOriginalFn, url: string, options: Partial): Chainable -// } -// } -// } \ No newline at end of file diff --git a/cypress/support/e2e.ts b/cypress/support/e2e.ts index f80f74f..1221b17 100644 --- a/cypress/support/e2e.ts +++ b/cypress/support/e2e.ts @@ -1,20 +1 @@ -// *********************************************************** -// This example support/e2e.ts is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import './commands' - -// Alternatively you can use CommonJS syntax: -// require('./commands') \ No newline at end of file +import './commands'; diff --git a/package.json b/package.json index e529be9..53fde04 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,6 @@ "cypress": "13.7.0", "eslint": "8.45.0", "eslint-config-prettier": "9.0.0", - "eslint-formatter-codeframe": "7.32.1", "eslint-plugin-import": "2.28.1", "eslint-plugin-jsx-a11y": "6.7.1", "eslint-plugin-prettier": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3dba5b..69885b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -91,9 +91,6 @@ devDependencies: eslint-config-prettier: specifier: 9.0.0 version: 9.0.0(eslint@8.45.0) - eslint-formatter-codeframe: - specifier: 7.32.1 - version: 7.32.1 eslint-plugin-import: specifier: 2.28.1 version: 2.28.1(@typescript-eslint/parser@6.0.0)(eslint@8.45.0) @@ -173,12 +170,6 @@ packages: chokidar: 3.6.0 dev: true - /@babel/code-frame@7.12.11: - resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} - dependencies: - '@babel/highlight': 7.24.1 - dev: true - /@babel/code-frame@7.24.1: resolution: {integrity: sha512-bC49z4spJQR3j8vFtJBLqzyzFV0ciuL5HYX7qfSl3KEqeMVV+eTquRvmXxpvB0AMubRrvv7y5DILiLLPi57Ewg==} engines: {node: '>=6.9.0'} @@ -5824,14 +5815,6 @@ packages: eslint: 8.45.0 dev: true - /eslint-formatter-codeframe@7.32.1: - resolution: {integrity: sha512-DK/3Q3+zVKq/7PdSYiCxPrsDF8H/TRMK5n8Hziwr4IMkMy+XiKSwbpj25AdajS63I/B61Snetq4uVvX9fOLyAg==} - engines: {node: ^10.12.0 || >=12.0.0} - dependencies: - '@babel/code-frame': 7.12.11 - chalk: 4.1.2 - dev: true - /eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} dependencies: diff --git a/src/config/env.ts b/src/config/env.ts index 4ba9aa4..85eea33 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -1,11 +1,17 @@ import { Env } from '~/types'; export const getEnv = (): Env => { - const { NEXT_PUBLIC_RPC_URL, NEXT_PUBLIC_PROJECT_ID, NEXT_PUBLIC_ALCHEMY_KEY } = process.env; + const NEXT_PUBLIC_RPC_URL = process.env.NEXT_PUBLIC_RPC_URL; + const NEXT_PUBLIC_PROJECT_ID = process.env.NEXT_PUBLIC_PROJECT_ID; + const NEXT_PUBLIC_ALCHEMY_KEY = process.env.NEXT_PUBLIC_ALCHEMY_KEY; + + if (!NEXT_PUBLIC_RPC_URL || !NEXT_PUBLIC_PROJECT_ID || !NEXT_PUBLIC_ALCHEMY_KEY) { + throw new Error('Environment configuration is missing critical values'); + } return { - RPC_URL: NEXT_PUBLIC_RPC_URL || '', - PROJECT_ID: NEXT_PUBLIC_PROJECT_ID || '', - ALCHEMY_KEY: NEXT_PUBLIC_ALCHEMY_KEY || '', + RPC_URL: NEXT_PUBLIC_RPC_URL, + PROJECT_ID: NEXT_PUBLIC_PROJECT_ID, + ALCHEMY_KEY: NEXT_PUBLIC_ALCHEMY_KEY, }; }; diff --git a/src/containers/Footer/index.tsx b/src/containers/Footer/index.tsx index 618e88c..ee503a2 100644 --- a/src/containers/Footer/index.tsx +++ b/src/containers/Footer/index.tsx @@ -23,7 +23,7 @@ const FooterContainer = styled('footer')(() => { justifyContent: 'space-between', backgroundColor: currentTheme.backgroundSecondary, borderTop: currentTheme.border, - width: '100vw', + width: '100%', }; }); diff --git a/src/containers/Header/index.tsx b/src/containers/Header/index.tsx index 15a55de..c97fee0 100644 --- a/src/containers/Header/index.tsx +++ b/src/containers/Header/index.tsx @@ -5,6 +5,7 @@ import LightModeIcon from '@mui/icons-material/LightMode'; import DarkModeIcon from '@mui/icons-material/DarkMode'; import { useCustomTheme } from '~/hooks/useTheme'; +import { zIndex } from '~/utils'; export const Header = () => { const { changeTheme, theme } = useCustomTheme(); @@ -12,7 +13,7 @@ export const Header = () => { return ( Logo - {theme === 'dark' ? : } + {theme === 'dark' ? : } ); @@ -28,8 +29,8 @@ const StyledHeader = styled('header')(() => { alignItems: 'center', justifyContent: 'space-between', backgroundColor: currentTheme.backgroundSecondary, - width: '100vw', - zIndex: 100, + width: '100%', + zIndex: zIndex.HEADER, }; }); @@ -38,3 +39,8 @@ const Logo = styled('h1')({ fontWeight: 'bold', cursor: 'pointer', }); + +const SIconButton = styled(IconButton)({ + position: 'absolute', + left: '50%', +}); diff --git a/src/pages/layout.tsx b/src/pages/layout.tsx index 70a1a96..e3e15c0 100644 --- a/src/pages/layout.tsx +++ b/src/pages/layout.tsx @@ -32,15 +32,8 @@ const MainContent = styled(Box)` width: 100%; max-width: 100%; overflow-x: hidden; - - max-width: 120rem; - padding: 0 4rem; - min-height: 100vh; + min-height: 100%; margin: 0 auto; - - @media (max-width: 600px) { - padding: 0 1.6rem; - } `; const NoScriptMessage = styled('noscript')(() => { diff --git a/src/providers/Web3ModalProvider.tsx b/src/providers/WalletProvider.tsx similarity index 92% rename from src/providers/Web3ModalProvider.tsx rename to src/providers/WalletProvider.tsx index 8e0c9eb..8bd8753 100644 --- a/src/providers/Web3ModalProvider.tsx +++ b/src/providers/WalletProvider.tsx @@ -13,7 +13,7 @@ type Props = { const queryClient = new QueryClient(); -export function Web3ModalProvider({ children }: Props) { +export function WalletProvider({ children }: Props) { return ( diff --git a/src/providers/index.tsx b/src/providers/index.tsx index 9c6ed54..3047956 100644 --- a/src/providers/index.tsx +++ b/src/providers/index.tsx @@ -2,7 +2,7 @@ import type { ReactNode } from 'react'; import { StateProvider } from './StateProvider'; import { ThemeProvider } from './ThemeProvider'; -import { Web3ModalProvider } from './Web3ModalProvider'; +import { WalletProvider } from './WalletProvider'; type Props = { children: ReactNode; @@ -12,7 +12,7 @@ export const Providers = ({ children }: Props) => { return ( - {children} + {children} ); diff --git a/src/utils/Variables.ts b/src/utils/Variables.ts index 32d9458..e54a266 100644 --- a/src/utils/Variables.ts +++ b/src/utils/Variables.ts @@ -20,3 +20,10 @@ export const fontSize = { MEDIUM: '1.4rem', SMALL: '1.2rem', }; + +export const zIndex = { + HEADER: 100, + MODAL: 200, + BACKDROP: -1, + TOAST: 500, +}; From f403e07e25150224657e330987eb9c3d2f01f9bf Mon Sep 17 00:00:00 2001 From: titix Date: Wed, 27 Mar 2024 18:22:22 -0300 Subject: [PATCH 02/24] fix: style hardcoded value --- src/containers/Landing/index.tsx | 4 +++- src/utils/Variables.ts | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/containers/Landing/index.tsx b/src/containers/Landing/index.tsx index a14cd3f..68a9a20 100644 --- a/src/containers/Landing/index.tsx +++ b/src/containers/Landing/index.tsx @@ -1,5 +1,7 @@ import { styled } from '@mui/material/styles'; +import { height } from '~/utils'; + export const Landing = () => { return ( @@ -11,7 +13,7 @@ export const Landing = () => { const LandingContainer = styled('div')({ display: 'flex', flexDirection: 'column', - height: 'calc(100vh - 16rem)', + height: `calc(100vh - (${height.HEADER} + ${height.FOOTER}))`, padding: '0 8rem', alignItems: 'center', justifyContent: 'center', diff --git a/src/utils/Variables.ts b/src/utils/Variables.ts index e54a266..80e235d 100644 --- a/src/utils/Variables.ts +++ b/src/utils/Variables.ts @@ -27,3 +27,8 @@ export const zIndex = { BACKDROP: -1, TOAST: 500, }; + +export const height = { + FOOTER: '8rem', + HEADER: '8rem', +}; From f97a49e8d1b84e01dea3db2ef87ddd6541413e2e Mon Sep 17 00:00:00 2001 From: titix Date: Wed, 27 Mar 2024 18:42:50 -0300 Subject: [PATCH 03/24] fix: footer and header height --- src/containers/Footer/index.tsx | 4 +++- src/containers/Header/index.tsx | 4 ++-- src/containers/Landing/index.tsx | 6 ++++-- src/utils/Variables.ts | 7 +++---- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/containers/Footer/index.tsx b/src/containers/Footer/index.tsx index ee503a2..6fc8f48 100644 --- a/src/containers/Footer/index.tsx +++ b/src/containers/Footer/index.tsx @@ -1,6 +1,8 @@ import { styled } from '@mui/material/styles'; import { useCustomTheme } from '~/hooks/useTheme'; +import { FOOTER_HEIGHT } from '~/utils'; + export const Footer = () => { return ( @@ -17,7 +19,7 @@ const FooterContainer = styled('footer')(() => { const { currentTheme } = useCustomTheme(); return { display: 'flex', - height: '8rem', + height: `${FOOTER_HEIGHT}rem`, padding: '0 8rem', alignItems: 'center', justifyContent: 'space-between', diff --git a/src/containers/Header/index.tsx b/src/containers/Header/index.tsx index c97fee0..2caa8a9 100644 --- a/src/containers/Header/index.tsx +++ b/src/containers/Header/index.tsx @@ -5,7 +5,7 @@ import LightModeIcon from '@mui/icons-material/LightMode'; import DarkModeIcon from '@mui/icons-material/DarkMode'; import { useCustomTheme } from '~/hooks/useTheme'; -import { zIndex } from '~/utils'; +import { zIndex, HEADER_HEIGHT } from '~/utils'; export const Header = () => { const { changeTheme, theme } = useCustomTheme(); @@ -24,7 +24,7 @@ const StyledHeader = styled('header')(() => { const { currentTheme } = useCustomTheme(); return { display: 'flex', - height: '8rem', + height: `${HEADER_HEIGHT}rem`, padding: '0 8rem', alignItems: 'center', justifyContent: 'space-between', diff --git a/src/containers/Landing/index.tsx b/src/containers/Landing/index.tsx index 68a9a20..625f604 100644 --- a/src/containers/Landing/index.tsx +++ b/src/containers/Landing/index.tsx @@ -1,6 +1,8 @@ import { styled } from '@mui/material/styles'; -import { height } from '~/utils'; +import { MAIN_HEIGHT } from '~/utils'; + +console.log(MAIN_HEIGHT); export const Landing = () => { return ( @@ -13,7 +15,7 @@ export const Landing = () => { const LandingContainer = styled('div')({ display: 'flex', flexDirection: 'column', - height: `calc(100vh - (${height.HEADER} + ${height.FOOTER}))`, + height: `calc(100vh - ${MAIN_HEIGHT}rem)`, padding: '0 8rem', alignItems: 'center', justifyContent: 'center', diff --git a/src/utils/Variables.ts b/src/utils/Variables.ts index 80e235d..f8caa97 100644 --- a/src/utils/Variables.ts +++ b/src/utils/Variables.ts @@ -28,7 +28,6 @@ export const zIndex = { TOAST: 500, }; -export const height = { - FOOTER: '8rem', - HEADER: '8rem', -}; +export const HEADER_HEIGHT = 8; // Header height in rem units +export const FOOTER_HEIGHT = 8; // Footer height in rem units +export const MAIN_HEIGHT = HEADER_HEIGHT + FOOTER_HEIGHT; From 13af02d9fb3fdcdcf75ddd7887f7af7b9c690fee Mon Sep 17 00:00:00 2001 From: titix Date: Wed, 27 Mar 2024 23:00:44 -0300 Subject: [PATCH 04/24] test: cypress basic test --- cypress.config.ts | 6 ++---- cypress/cypress.d.ts | 5 +++++ cypress/e2e/landing.ts | 5 ----- cypress/e2e/spec.cy.ts | 6 ++++++ cypress/support/commands.ts | 3 +++ cypress/tsconfig.json | 9 +++++++++ src/containers/Landing/index.tsx | 4 +--- tsconfig.json | 5 +++-- 8 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 cypress/cypress.d.ts delete mode 100644 cypress/e2e/landing.ts create mode 100644 cypress/e2e/spec.cy.ts create mode 100644 cypress/tsconfig.json diff --git a/cypress.config.ts b/cypress.config.ts index 17161e3..5bed49b 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -1,9 +1,7 @@ -import { defineConfig } from "cypress"; +import { defineConfig } from 'cypress'; export default defineConfig({ e2e: { - setupNodeEvents(on, config) { - // implement node event listeners here - }, + baseUrl: 'http://localhost:3000', }, }); diff --git a/cypress/cypress.d.ts b/cypress/cypress.d.ts new file mode 100644 index 0000000..256fee8 --- /dev/null +++ b/cypress/cypress.d.ts @@ -0,0 +1,5 @@ +declare namespace Cypress { + interface Chainable { + getByTestId(testId: string): Chainable>; + } +} diff --git a/cypress/e2e/landing.ts b/cypress/e2e/landing.ts deleted file mode 100644 index a4c7f11..0000000 --- a/cypress/e2e/landing.ts +++ /dev/null @@ -1,5 +0,0 @@ -describe('basic test', () => { - it('test', () => { - cy.visit('/'); - }); -}); diff --git a/cypress/e2e/spec.cy.ts b/cypress/e2e/spec.cy.ts new file mode 100644 index 0000000..e9e7f2a --- /dev/null +++ b/cypress/e2e/spec.cy.ts @@ -0,0 +1,6 @@ +describe('Renders every component', () => { + it('Renders App component', () => { + cy.visit('/'); + cy.getByTestId('boilerplate-title').should('exist'); + }); +}); diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 6d4cbd5..5c74ee9 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -1 +1,4 @@ /// +Cypress.Commands.add('getByTestId', (testId) => { + return cy.get(`[data-testid="${testId}"]`); +}); diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json new file mode 100644 index 0000000..5ed0d7b --- /dev/null +++ b/cypress/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "noEmit": true, + "types": ["cypress"], + }, + "include": ["**/*.ts"] + } + \ No newline at end of file diff --git a/src/containers/Landing/index.tsx b/src/containers/Landing/index.tsx index 625f604..6b217cf 100644 --- a/src/containers/Landing/index.tsx +++ b/src/containers/Landing/index.tsx @@ -2,12 +2,10 @@ import { styled } from '@mui/material/styles'; import { MAIN_HEIGHT } from '~/utils'; -console.log(MAIN_HEIGHT); - export const Landing = () => { return ( -

Web3 React Boilerplate

+

Web3 React Boilerplate

); }; diff --git a/tsconfig.json b/tsconfig.json index bcd800d..069e30f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "module": "ESNext", "esModuleInterop": true, "skipLibCheck": true, - "moduleResolution": "bundler", + "moduleResolution": "node", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, @@ -21,10 +21,11 @@ "incremental": true, "plugins": [{ "name": "next" }], "baseUrl": ".", + "types": ["cypress"], "paths": { "~/*": ["src/*"] } }, - "include": ["./src", "./dist/types/**/*.ts", "./next-env.d.ts"], + "include": ["./src", "./dist/types/**/*.ts", "./next-env.d.ts", "./cypress/**/*.ts"], "exclude": ["./node_modules"] } \ No newline at end of file From 73d3cf9f2f206b6fea0edc87f418747a1be9817b Mon Sep 17 00:00:00 2001 From: titix Date: Wed, 27 Mar 2024 23:18:59 -0300 Subject: [PATCH 05/24] fix: github workflow cypress --- .github/workflows/build-test.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index ab53c89..13b7a1f 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -87,3 +87,12 @@ jobs: - name: Run Tests run: yarn test + + - name: Start Application + run: yarn start + + - name: Run Cypress E2E Tests + uses: cypress-io/github-action@v2 + with: + start: yarn start + wait-on: 'http://localhost:3000' From 053a084edbd0e2c20c858bab59d79f4c25c0af93 Mon Sep 17 00:00:00 2001 From: titix Date: Thu, 4 Apr 2024 11:54:51 -0300 Subject: [PATCH 06/24] fix: env vars as string type error on building --- src/config/env.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/env.ts b/src/config/env.ts index 4ba9aa4..9afb7c7 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -4,8 +4,8 @@ export const getEnv = (): Env => { const { NEXT_PUBLIC_RPC_URL, NEXT_PUBLIC_PROJECT_ID, NEXT_PUBLIC_ALCHEMY_KEY } = process.env; return { - RPC_URL: NEXT_PUBLIC_RPC_URL || '', - PROJECT_ID: NEXT_PUBLIC_PROJECT_ID || '', - ALCHEMY_KEY: NEXT_PUBLIC_ALCHEMY_KEY || '', + RPC_URL: NEXT_PUBLIC_RPC_URL as string, + PROJECT_ID: NEXT_PUBLIC_PROJECT_ID as string, + ALCHEMY_KEY: NEXT_PUBLIC_ALCHEMY_KEY as string, }; }; From 9462d4e51da916275b40a1619b1aa20a84347f89 Mon Sep 17 00:00:00 2001 From: titix Date: Thu, 4 Apr 2024 12:08:36 -0300 Subject: [PATCH 07/24] fix: revert back to undefined --- src/config/env.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/env.ts b/src/config/env.ts index 0b7d234..8c02faf 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -10,8 +10,8 @@ export const getEnv = (): Env => { } return { - RPC_URL: NEXT_PUBLIC_RPC_URL as string, - PROJECT_ID: NEXT_PUBLIC_PROJECT_ID as string, - ALCHEMY_KEY: NEXT_PUBLIC_ALCHEMY_KEY as string, + RPC_URL: NEXT_PUBLIC_RPC_URL || '', + PROJECT_ID: NEXT_PUBLIC_PROJECT_ID || '', + ALCHEMY_KEY: NEXT_PUBLIC_ALCHEMY_KEY || '', }; }; From 7493046924de6f9df71697df242ea2df004c01b3 Mon Sep 17 00:00:00 2001 From: titix Date: Thu, 4 Apr 2024 12:09:59 -0300 Subject: [PATCH 08/24] fix: env vars as string type error on building --- src/config/env.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/config/env.ts b/src/config/env.ts index 8c02faf..4d3ba54 100644 --- a/src/config/env.ts +++ b/src/config/env.ts @@ -5,13 +5,9 @@ export const getEnv = (): Env => { const NEXT_PUBLIC_PROJECT_ID = process.env.NEXT_PUBLIC_PROJECT_ID; const NEXT_PUBLIC_ALCHEMY_KEY = process.env.NEXT_PUBLIC_ALCHEMY_KEY; - if (!NEXT_PUBLIC_RPC_URL || !NEXT_PUBLIC_PROJECT_ID || !NEXT_PUBLIC_ALCHEMY_KEY) { - throw new Error('Environment configuration is missing critical values'); - } - return { - RPC_URL: NEXT_PUBLIC_RPC_URL || '', - PROJECT_ID: NEXT_PUBLIC_PROJECT_ID || '', - ALCHEMY_KEY: NEXT_PUBLIC_ALCHEMY_KEY || '', + RPC_URL: NEXT_PUBLIC_RPC_URL as string, + PROJECT_ID: NEXT_PUBLIC_PROJECT_ID as string, + ALCHEMY_KEY: NEXT_PUBLIC_ALCHEMY_KEY as string, }; }; From 3545aa754747aa7bb11badc5987e6126329d1c65 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Fri, 5 Apr 2024 13:00:19 -0300 Subject: [PATCH 09/24] fix: migrate build to pnpm and cypress config --- .github/workflows/build-test.yml | 93 ++++++++++++++++---------------- 1 file changed, 46 insertions(+), 47 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 13b7a1f..6097eea 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -7,43 +7,33 @@ jobs: build: name: Build runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - - name: Install Node + - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "21.4" - registry-url: "https://registry.npmjs.org" - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - uses: actions/cache@v3 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + node-version: "21.4" + cache: 'pnpm' - name: Install project dependencies - run: yarn --prefer-offline - id: install + run: pnpm install --frozen-lockfile - - name: Build project dependencies - run: yarn run build - id: build + - name: Build project + run: pnpm run build check: name: Check for crypto runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "21.4" + cache: 'pnpm' + - name: Check for crypto uses: defi-wonderland/check-crypto-action@v1 with: @@ -55,44 +45,53 @@ jobs: test: name: Lint and Test runs-on: ubuntu-latest - steps: - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: "21.4" - registry-url: "https://registry.npmjs.org" - - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v3 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + - name: Setup Node.js + uses: actions/setup-node@v3 with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + node-version: "21.4" + cache: 'pnpm' - name: Install project dependencies - run: yarn --prefer-offline - id: install + run: pnpm install --frozen-lockfile - name: Run Prettier - run: yarn prettier + run: pnpm run prettier - name: Run Linter - run: yarn lint + run: pnpm run lint - name: Run Tests - run: yarn test - - - name: Start Application - run: yarn start + run: pnpm test + + e2e: + name: Cypress E2E Tests + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "21.4" + cache: 'pnpm' + + - name: Install project dependencies + run: pnpm install --frozen-lockfile + + - name: Start Server + run: pnpm run start:prod & + env: + PORT: 3000 + + - name: Sleep for 30s + run: sleep 30 - - name: Run Cypress E2E Tests + - name: Cypress E2E Tests uses: cypress-io/github-action@v2 with: - start: yarn start wait-on: 'http://localhost:3000' + wait-on-timeout: 60 From 6abff6222028b6015ff15aa89d8425bf242be303 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Fri, 5 Apr 2024 13:09:25 -0300 Subject: [PATCH 10/24] fix: prev structure with pnpm and e2e --- .github/workflows/build-test.yml | 66 ++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6097eea..a86cec0 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,3 +1,4 @@ + name: Build and Test on: @@ -7,33 +8,43 @@ jobs: build: name: Build runs-on: ubuntu-latest + steps: - uses: actions/checkout@v3 - - name: Setup Node.js + - name: Install Node uses: actions/setup-node@v3 with: - node-version: "21.4" - cache: 'pnpm' + node-version: "21.4" + registry-url: "https://registry.npmjs.org" + + - name: Get pnpm cache directory path + id: pnpm-cache-dir-path + run: echo "::set-output name=dir::$(pnpm cache dir)" + + - uses: actions/cache@v3 + id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }} + restore-keys: | + ${{ runner.os }}-pnpm- - name: Install project dependencies - run: pnpm install --frozen-lockfile + run: pnpm --prefer-offline + id: install - - name: Build project + - name: Build project dependencies run: pnpm run build + id: build check: name: Check for crypto runs-on: ubuntu-latest + steps: - uses: actions/checkout@v3 - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: "21.4" - cache: 'pnpm' - - name: Check for crypto uses: defi-wonderland/check-crypto-action@v1 with: @@ -45,27 +56,39 @@ jobs: test: name: Lint and Test runs-on: ubuntu-latest + steps: - uses: actions/checkout@v3 - - - name: Setup Node.js - uses: actions/setup-node@v3 + - uses: actions/setup-node@v3 with: node-version: "21.4" - cache: 'pnpm' + registry-url: "https://registry.npmjs.org" + + - name: Get pnpm cache directory path + id: pnpm-cache-dir-path + run: echo "::set-output name=dir::$(pnpm cache dir)" + + - uses: actions/cache@v3 + id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }} + restore-keys: | + ${{ runner.os }}-pnpm- - name: Install project dependencies - run: pnpm install --frozen-lockfile + run: pnpm --prefer-offline + id: install - name: Run Prettier - run: pnpm run prettier + run: pnpm prettier - name: Run Linter - run: pnpm run lint + run: pnpm lint - name: Run Tests run: pnpm test - + e2e: name: Cypress E2E Tests runs-on: ubuntu-latest @@ -76,9 +99,12 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: "21.4" + node-version: "18" cache: 'pnpm' + - name: Install PNPM + run: npm install -g pnpm + - name: Install project dependencies run: pnpm install --frozen-lockfile From cb5be5b3a72ab56a8f01033b2c21fa65fb0a3c9e Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Fri, 5 Apr 2024 13:44:02 -0300 Subject: [PATCH 11/24] fix: build and test workflows --- .github/workflows/build-test.yml | 115 +++++++++++-------------------- 1 file changed, 41 insertions(+), 74 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index a86cec0..34810e7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -1,5 +1,4 @@ - -name: Build and Test +name: Build and Format on: pull_request: @@ -11,32 +10,24 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2 + with: + version: 8 - name: Install Node uses: actions/setup-node@v3 with: - node-version: "21.4" - registry-url: "https://registry.npmjs.org" - - - name: Get pnpm cache directory path - id: pnpm-cache-dir-path - run: echo "::set-output name=dir::$(pnpm cache dir)" - - - uses: actions/cache@v3 - id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }} - restore-keys: | - ${{ runner.os }}-pnpm- + node-version: '21.4' + registry-url: 'https://registry.npmjs.org' + cache: 'pnpm' - name: Install project dependencies - run: pnpm --prefer-offline - id: install + run: pnpm install --frozen-lockfile --prefer-frozen-lockfile - name: Build project dependencies run: pnpm run build - id: build + env: + NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} check: name: Check for crypto @@ -54,70 +45,46 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} test: - name: Lint and Test - runs-on: ubuntu-latest + name: Lint, Unit Test, and E2E Test + runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: "21.4" - registry-url: "https://registry.npmjs.org" + steps: + - uses: actions/checkout@v3 - - name: Get pnpm cache directory path - id: pnpm-cache-dir-path - run: echo "::set-output name=dir::$(pnpm cache dir)" + - name: Install Node + uses: actions/setup-node@v3 + with: + node-version: '21.4' + registry-url: 'https://registry.npmjs.org' + cache: 'pnpm' - - uses: actions/cache@v3 - id: pnpm-cache # use this to check for `cache-hit` (`steps.pnpm-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm.lock') }} - restore-keys: | - ${{ runner.os }}-pnpm- - - name: Install project dependencies - run: pnpm --prefer-offline - id: install + - name: Install project dependencies + run: pnpm install --frozen-lockfile --prefer-frozen-lockfile - - name: Run Prettier - run: pnpm prettier + - name: Run Prettier + run: pnpm run prettier - - name: Run Linter - run: pnpm lint + - name: Run Linter + run: pnpm run lint - - name: Run Tests - run: pnpm test - - e2e: - name: Cypress E2E Tests - runs-on: ubuntu-latest - needs: build - steps: - - uses: actions/checkout@v3 + - name: Run Unit Tests + run: pnpm test - - name: Setup Node.js - uses: actions/setup-node@v3 - with: - node-version: "18" - cache: 'pnpm' + - name: Build project for production + run: pnpm run build - - name: Install PNPM - run: npm install -g pnpm + - name: Start Server for E2E Tests + run: pnpm exec next start -p ${{ env.PORT }} & + env: + PORT: 3000 - - name: Install project dependencies - run: pnpm install --frozen-lockfile + - name: Sleep for 30s + run: sleep 30 - - name: Start Server - run: pnpm run start:prod & - env: - PORT: 3000 + - name: Cypress E2E Tests + uses: cypress-io/github-action@v2 + with: + wait-on: 'http://localhost:3000' + wait-on-timeout: 60 - - name: Sleep for 30s - run: sleep 30 - - - name: Cypress E2E Tests - uses: cypress-io/github-action@v2 - with: - wait-on: 'http://localhost:3000' - wait-on-timeout: 60 From 68ce691cff6a8d5a5a725b1c1bed96190501e540 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Fri, 5 Apr 2024 15:02:38 -0300 Subject: [PATCH 12/24] fix: update build-test.yml --- .github/workflows/build-test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 34810e7..b307707 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -58,6 +58,8 @@ jobs: registry-url: 'https://registry.npmjs.org' cache: 'pnpm' + - name: Install PNPM + run: npm install -g pnpm - name: Install project dependencies run: pnpm install --frozen-lockfile --prefer-frozen-lockfile From 4479b08a879624196f0aac28a6c8b8c7b8d81a49 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Fri, 5 Apr 2024 15:49:03 -0300 Subject: [PATCH 13/24] fix: update build-test.yml --- .github/workflows/build-test.yml | 64 ++++++++++++++------------------ 1 file changed, 28 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index b307707..1c1e0fc 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -47,46 +47,38 @@ jobs: test: name: Lint, Unit Test, and E2E Test runs-on: ubuntu-latest - + steps: - - uses: actions/checkout@v3 - - - name: Install Node - uses: actions/setup-node@v3 - with: - node-version: '21.4' - registry-url: 'https://registry.npmjs.org' - cache: 'pnpm' - - - name: Install PNPM - run: npm install -g pnpm - - - name: Install project dependencies - run: pnpm install --frozen-lockfile --prefer-frozen-lockfile - - - name: Run Prettier - run: pnpm run prettier - - - name: Run Linter - run: pnpm run lint + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8.15 - - name: Run Unit Tests - run: pnpm test + - uses: actions/setup-node@v4 + with: + node-version: '21.4' + cache: 'pnpm' + + - run: pnpm install - - name: Build project for production - run: pnpm run build + - run: pnpm run prettier + + - run: pnpm run lint + + - run: pnpm test - - name: Start Server for E2E Tests - run: pnpm exec next start -p ${{ env.PORT }} & - env: - PORT: 3000 + - run: pnpm run build - - name: Sleep for 30s - run: sleep 30 + - name: Start Server for E2E Tests + run: pnpm run start & + env: + PORT: 3000 - - name: Cypress E2E Tests - uses: cypress-io/github-action@v2 - with: - wait-on: 'http://localhost:3000' - wait-on-timeout: 60 + - run: sleep 30 + - name: Cypress E2E Tests + uses: cypress-io/github-action@v2 + with: + wait-on: 'http://localhost:3000' + wait-on-timeout: 60 From 72f0258a3c223485c9e1e7c31bad088a1394f9f6 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:11:52 -0300 Subject: [PATCH 14/24] fix: update build-test.yml for cypress test --- .github/workflows/build-test.yml | 68 +++++++++++++++----------------- 1 file changed, 32 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 1c1e0fc..3403ed3 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -45,40 +45,36 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} test: - name: Lint, Unit Test, and E2E Test - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v2 - with: - version: 8.15 - - - uses: actions/setup-node@v4 - with: - node-version: '21.4' - cache: 'pnpm' - - - run: pnpm install - - - run: pnpm run prettier - - - run: pnpm run lint - - - run: pnpm test - - - run: pnpm run build - - - name: Start Server for E2E Tests - run: pnpm run start & - env: - PORT: 3000 - - - run: sleep 30 + name: Lint, Unit Test, and E2E Test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8.15 + + - uses: actions/setup-node@v4 + with: + node-version: '21.4' + cache: 'pnpm' + + - name: Install project dependencies + run: pnpm install + + - name: Run Prettier + run: pnpm run prettier + + - name: Run Linter + run: pnpm run lint + + - name: Cypress E2E Tests + uses: cypress-io/github-action@v2 + with: + command: pnpm test + cache-key: ${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }} + install-command: pnpm install --frozen-lockfile + wait-on: 'http://localhost:3000' + wait-on-timeout: 60 - - name: Cypress E2E Tests - uses: cypress-io/github-action@v2 - with: - wait-on: 'http://localhost:3000' - wait-on-timeout: 60 From 2f5b8b3ac1202e659036014cc1d743653e6a9545 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:18:04 -0300 Subject: [PATCH 15/24] fix: cypress test job --- .github/workflows/build-test.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 3403ed3..cc39c84 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -45,7 +45,7 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} test: - name: Lint, Unit Test, and E2E Test + name: Lint, E2E Test runs-on: ubuntu-latest steps: @@ -68,13 +68,21 @@ jobs: - name: Run Linter run: pnpm run lint + + - name: Run Build + run: pnpm run build + + - name: Start Server for E2E Tests + run: pnpm run start & + env: + PORT: 3000 + + - run: sleep 30 - name: Cypress E2E Tests uses: cypress-io/github-action@v2 with: - command: pnpm test - cache-key: ${{ runner.os }}-build-${{ hashFiles('**/pnpm-lock.yaml') }} - install-command: pnpm install --frozen-lockfile wait-on: 'http://localhost:3000' wait-on-timeout: 60 + install: false From 102ac61e5cafe601488e12a4deb3201d0b6536ef Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:31:42 -0300 Subject: [PATCH 16/24] fix: cypress test job --- .github/workflows/build-test.yml | 46 +++++++------------------------- 1 file changed, 10 insertions(+), 36 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index cc39c84..81679f3 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -49,40 +49,14 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v2 - with: - version: 8.15 - - - uses: actions/setup-node@v4 - with: - node-version: '21.4' - cache: 'pnpm' - - - name: Install project dependencies - run: pnpm install - - - name: Run Prettier - run: pnpm run prettier - - - name: Run Linter - run: pnpm run lint - - - name: Run Build - run: pnpm run build - - - name: Start Server for E2E Tests - run: pnpm run start & - env: - PORT: 3000 - - - run: sleep 30 - - - name: Cypress E2E Tests - uses: cypress-io/github-action@v2 - with: - wait-on: 'http://localhost:3000' - wait-on-timeout: 60 - install: false + - name: Checkout + uses: actions/checkout@v2 + - name: Cypress run + uses: cypress-io/github-action@v3 + with: + project: ./cypress + browser: chrome + build: pnpm build + start: pnpm start + wait-on: "http://localhost:3000" From fdad6feb31dd9700094a247a759f0aebb3bb3a71 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:35:05 -0300 Subject: [PATCH 17/24] fix: cypress --- .github/workflows/build-test.yml | 35 +++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 81679f3..8f997e7 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -49,14 +49,29 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - - name: Cypress run - uses: cypress-io/github-action@v3 - with: - project: ./cypress - browser: chrome - build: pnpm build - start: pnpm start - wait-on: "http://localhost:3000" + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '21.4' + cache: 'pnpm' + + - name: Install Dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - name: Start + run: pnpm start & + shell: bash + + - name: Cypress run + uses: cypress-io/github-action@v3 + with: + project: ./cypress + browser: chrome + start: '' + wait-on: "http://localhost:3000" From a9154d6beb40070da11f8ea7f50950b415df60a4 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:38:21 -0300 Subject: [PATCH 18/24] fix: cypress --- .github/workflows/build-test.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 8f997e7..4ef7e72 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -49,11 +49,13 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8.15 - - name: Set up Node.js - uses: actions/setup-node@v2 + - uses: actions/setup-node@v4 with: node-version: '21.4' cache: 'pnpm' From 7a47287c867adeb0d5ca7a6da6dd388b11053684 Mon Sep 17 00:00:00 2001 From: titix Date: Sun, 7 Apr 2024 14:08:15 -0300 Subject: [PATCH 19/24] fix: cypress run --- .github/workflows/build-test.yml | 25 +++---- package.json | 16 ++-- pnpm-lock.yaml | 123 ++++++++++++++++++++++++++++--- 3 files changed, 132 insertions(+), 32 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 4ef7e72..345faa5 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -44,10 +44,10 @@ jobs: only_notify: true token: ${{ secrets.GITHUB_TOKEN }} - test: - name: Lint, E2E Test + test: + name: Lint and Test runs-on: ubuntu-latest - + steps: - uses: actions/checkout@v4 @@ -63,17 +63,10 @@ jobs: - name: Install Dependencies run: pnpm install - - name: Build - run: pnpm build - - - name: Start - run: pnpm start & - shell: bash + - name: Build the project + run: pnpm run build - - name: Cypress run - uses: cypress-io/github-action@v3 - with: - project: ./cypress - browser: chrome - start: '' - wait-on: "http://localhost:3000" + - name: Run Tests + run: pnpm run test + env: + CI: true \ No newline at end of file diff --git a/package.json b/package.json index 53fde04..a97968d 100644 --- a/package.json +++ b/package.json @@ -11,17 +11,18 @@ "scripts": { "dev": "next dev", "build": "next build", - "start": "next start", + "start": "next start -p 3000", "preview": "next start", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", - "lint:fix": "yarn run lint -- --fix", + "lint:fix": "pnpm run lint -- --fix", "prettier": "prettier src --check", - "prettier:fix": "yarn run prettier -- --write", - "format": "yarn run prettier:fix && yarn run lint:fix", - "format:check": "yarn run prettier && yarn run lint", + "prettier:fix": "pnpm run prettier -- --write", + "format": "pnpm run prettier:fix && yarn run lint:fix", + "format:check": "pnpm run prettier && yarn run lint", "prepare": "husky install && wonderland-crypto-husky-checks install", - "test": "yarn cypress run", - "test:watch": "yarn cypress open" + "cypress:open": "cypress open", + "cypress:run": "cypress run", + "test": "start-server-and-test start http://localhost:3000 'pnpm run cypress:run'" }, "lint-staged": { "src/**/*.{js,jsx,ts,tsx}": "eslint --cache --fix", @@ -68,6 +69,7 @@ "jsdom": "24.0.0", "lodash.merge": "4.6.2", "prettier": "3.0.3", + "start-server-and-test": "2.0.3", "styled-components": "6.0.7", "typescript": "5.4.2" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 69885b3..c80b4af 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -121,6 +121,9 @@ devDependencies: prettier: specifier: 3.0.3 version: 3.0.3 + start-server-and-test: + specifier: 2.0.3 + version: 2.0.3 styled-components: specifier: 6.0.7 version: 6.0.7(react-dom@18.2.0)(react@18.2.0) @@ -1819,13 +1822,11 @@ packages: /@hapi/hoek@9.3.0: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} - dev: false /@hapi/topo@5.1.0: resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} dependencies: '@hapi/hoek': 9.3.0 - dev: false /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} @@ -3176,15 +3177,12 @@ packages: resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==} dependencies: '@hapi/hoek': 9.3.0 - dev: false /@sideway/formula@3.0.1: resolution: {integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==} - dev: false /@sideway/pinpoint@2.0.0: resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} - dev: false /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -4337,6 +4335,10 @@ packages: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} dev: true + /arg@5.0.2: + resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} + dev: true + /argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: @@ -4521,6 +4523,16 @@ packages: engines: {node: '>=4'} dev: true + /axios@1.6.8(debug@4.3.4): + resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} + dependencies: + follow-redirects: 1.15.6(debug@4.3.4) + form-data: 4.0.0 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + dev: true + /axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} dependencies: @@ -5486,6 +5498,10 @@ packages: readable-stream: 2.3.8 dev: false + /duplexer@0.1.2: + resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} + dev: true + /duplexify@4.1.3: resolution: {integrity: sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==} dependencies: @@ -6138,6 +6154,18 @@ packages: '@scure/bip39': 1.2.2 dev: false + /event-stream@3.3.4: + resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==} + dependencies: + duplexer: 0.1.2 + from: 0.1.7 + map-stream: 0.1.0 + pause-stream: 0.0.11 + split: 0.3.3 + stream-combiner: 0.0.4 + through: 2.3.8 + dev: true + /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -6188,7 +6216,6 @@ packages: onetime: 5.1.2 signal-exit: 3.0.7 strip-final-newline: 2.0.0 - dev: false /execa@8.0.1: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} @@ -6405,6 +6432,18 @@ packages: engines: {node: '>=0.4.0'} dev: false + /follow-redirects@1.15.6(debug@4.3.4): + resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dependencies: + debug: 4.3.4(supports-color@8.1.1) + dev: true + /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -6445,6 +6484,10 @@ packages: engines: {node: '>= 0.6'} dev: false + /from@0.1.7: + resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} + dev: true + /fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} @@ -6538,7 +6581,6 @@ packages: /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} - dev: false /get-stream@8.0.1: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} @@ -6842,7 +6884,6 @@ packages: /human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - dev: false /human-signals@5.0.0: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} @@ -7390,7 +7431,6 @@ packages: '@sideway/address': 4.1.5 '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 - dev: false /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -7845,6 +7885,10 @@ packages: tmpl: 1.0.5 dev: false + /map-stream@0.1.0: + resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} + dev: true + /marky@1.2.5: resolution: {integrity: sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==} dev: false @@ -8724,6 +8768,12 @@ packages: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} dev: false + /pause-stream@0.0.11: + resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} + dependencies: + through: 2.3.8 + dev: true + /pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: true @@ -8943,6 +8993,18 @@ packages: resolution: {integrity: sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==} dev: true + /proxy-from-env@1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + dev: true + + /ps-tree@1.2.0: + resolution: {integrity: sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==} + engines: {node: '>= 0.10'} + hasBin: true + dependencies: + event-stream: 3.3.4 + dev: true + /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true @@ -9800,6 +9862,12 @@ packages: engines: {node: '>= 10.x'} dev: false + /split@0.3.3: + resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==} + dependencies: + through: 2.3.8 + dev: true + /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: false @@ -9838,6 +9906,23 @@ packages: type-fest: 0.7.1 dev: false + /start-server-and-test@2.0.3: + resolution: {integrity: sha512-QsVObjfjFZKJE6CS6bSKNwWZCKBG6975/jKRPPGFfFh+yOQglSeGXiNWjzgQNXdphcBI9nXbyso9tPfX4YAUhg==} + engines: {node: '>=16'} + hasBin: true + dependencies: + arg: 5.0.2 + bluebird: 3.7.2 + check-more-types: 2.24.0 + debug: 4.3.4(supports-color@8.1.1) + execa: 5.1.1 + lazy-ass: 1.6.0 + ps-tree: 1.2.0 + wait-on: 7.2.0(debug@4.3.4) + transitivePeerDependencies: + - supports-color + dev: true + /statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} @@ -9859,6 +9944,12 @@ packages: internal-slot: 1.0.7 dev: true + /stream-combiner@0.0.4: + resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==} + dependencies: + duplexer: 0.1.2 + dev: true + /stream-shift@1.0.3: resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} dev: false @@ -10726,6 +10817,20 @@ packages: - zod dev: false + /wait-on@7.2.0(debug@4.3.4): + resolution: {integrity: sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==} + engines: {node: '>=12.0.0'} + hasBin: true + dependencies: + axios: 1.6.8(debug@4.3.4) + joi: 17.12.2 + lodash: 4.17.21 + minimist: 1.2.8 + rxjs: 7.8.1 + transitivePeerDependencies: + - debug + dev: true + /walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} dependencies: From 3867448d15ac4b9e4b11d341e62272b4db9855c9 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Sun, 7 Apr 2024 14:11:56 -0300 Subject: [PATCH 20/24] fix: test jobs --- .github/workflows/build-test.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 345faa5..eb81b01 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -44,7 +44,7 @@ jobs: only_notify: true token: ${{ secrets.GITHUB_TOKEN }} - test: + test: name: Lint and Test runs-on: ubuntu-latest @@ -63,10 +63,10 @@ jobs: - name: Install Dependencies run: pnpm install - - name: Build the project - run: pnpm run build + - name: Build the project + run: pnpm run build - - name: Run Tests - run: pnpm run test - env: - CI: true \ No newline at end of file + - name: Run Tests + run: pnpm run test + env: + CI: true From ed6d30ab69b3e26fecf388188b6e83773743e37e Mon Sep 17 00:00:00 2001 From: Ardy Date: Mon, 8 Apr 2024 11:59:32 -0400 Subject: [PATCH 21/24] chore: update github action --- .github/workflows/build-test.yml | 42 +++++------ package.json | 3 +- pnpm-lock.yaml | 123 +++---------------------------- 3 files changed, 31 insertions(+), 137 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index eb81b01..8c17d6c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -49,24 +49,24 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - - uses: pnpm/action-setup@v2 - with: - version: 8.15 - - - uses: actions/setup-node@v4 - with: - node-version: '21.4' - cache: 'pnpm' - - - name: Install Dependencies - run: pnpm install - - - name: Build the project - run: pnpm run build - - - name: Run Tests - run: pnpm run test - env: - CI: true + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v2 + with: + version: 8.15 + + - uses: actions/setup-node@v4 + with: + node-version: '21.4' + cache: 'pnpm' + + - name: Install Dependencies + run: pnpm install + + - name: Build the project + run: pnpm run build + + - name: Cypress run + uses: cypress-io/github-action@v5 + with: + start: pnpm start, pnpm test diff --git a/package.json b/package.json index a97968d..ed70754 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "prepare": "husky install && wonderland-crypto-husky-checks install", "cypress:open": "cypress open", "cypress:run": "cypress run", - "test": "start-server-and-test start http://localhost:3000 'pnpm run cypress:run'" + "test": "pnpm cypress:run" }, "lint-staged": { "src/**/*.{js,jsx,ts,tsx}": "eslint --cache --fix", @@ -69,7 +69,6 @@ "jsdom": "24.0.0", "lodash.merge": "4.6.2", "prettier": "3.0.3", - "start-server-and-test": "2.0.3", "styled-components": "6.0.7", "typescript": "5.4.2" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c80b4af..69885b3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -121,9 +121,6 @@ devDependencies: prettier: specifier: 3.0.3 version: 3.0.3 - start-server-and-test: - specifier: 2.0.3 - version: 2.0.3 styled-components: specifier: 6.0.7 version: 6.0.7(react-dom@18.2.0)(react@18.2.0) @@ -1822,11 +1819,13 @@ packages: /@hapi/hoek@9.3.0: resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} + dev: false /@hapi/topo@5.1.0: resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} dependencies: '@hapi/hoek': 9.3.0 + dev: false /@humanwhocodes/config-array@0.11.14: resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} @@ -3177,12 +3176,15 @@ packages: resolution: {integrity: sha512-IqO/DUQHUkPeixNQ8n0JA6102hT9CmaljNTPmQ1u8MEhBo/R4Q8eKLN/vGZxuebwOroDB4cbpjheD4+/sKFK4Q==} dependencies: '@hapi/hoek': 9.3.0 + dev: false /@sideway/formula@3.0.1: resolution: {integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==} + dev: false /@sideway/pinpoint@2.0.0: resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} + dev: false /@sinclair/typebox@0.27.8: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} @@ -4335,10 +4337,6 @@ packages: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} dev: true - /arg@5.0.2: - resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} - dev: true - /argparse@1.0.10: resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} dependencies: @@ -4523,16 +4521,6 @@ packages: engines: {node: '>=4'} dev: true - /axios@1.6.8(debug@4.3.4): - resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} - dependencies: - follow-redirects: 1.15.6(debug@4.3.4) - form-data: 4.0.0 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - dev: true - /axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} dependencies: @@ -5498,10 +5486,6 @@ packages: readable-stream: 2.3.8 dev: false - /duplexer@0.1.2: - resolution: {integrity: sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==} - dev: true - /duplexify@4.1.3: resolution: {integrity: sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==} dependencies: @@ -6154,18 +6138,6 @@ packages: '@scure/bip39': 1.2.2 dev: false - /event-stream@3.3.4: - resolution: {integrity: sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==} - dependencies: - duplexer: 0.1.2 - from: 0.1.7 - map-stream: 0.1.0 - pause-stream: 0.0.11 - split: 0.3.3 - stream-combiner: 0.0.4 - through: 2.3.8 - dev: true - /event-target-shim@5.0.1: resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} engines: {node: '>=6'} @@ -6216,6 +6188,7 @@ packages: onetime: 5.1.2 signal-exit: 3.0.7 strip-final-newline: 2.0.0 + dev: false /execa@8.0.1: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} @@ -6432,18 +6405,6 @@ packages: engines: {node: '>=0.4.0'} dev: false - /follow-redirects@1.15.6(debug@4.3.4): - resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} - engines: {node: '>=4.0'} - peerDependencies: - debug: '*' - peerDependenciesMeta: - debug: - optional: true - dependencies: - debug: 4.3.4(supports-color@8.1.1) - dev: true - /for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} dependencies: @@ -6484,10 +6445,6 @@ packages: engines: {node: '>= 0.6'} dev: false - /from@0.1.7: - resolution: {integrity: sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==} - dev: true - /fs-extra@8.1.0: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} @@ -6581,6 +6538,7 @@ packages: /get-stream@6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} engines: {node: '>=10'} + dev: false /get-stream@8.0.1: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} @@ -6884,6 +6842,7 @@ packages: /human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + dev: false /human-signals@5.0.0: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} @@ -7431,6 +7390,7 @@ packages: '@sideway/address': 4.1.5 '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 + dev: false /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -7885,10 +7845,6 @@ packages: tmpl: 1.0.5 dev: false - /map-stream@0.1.0: - resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==} - dev: true - /marky@1.2.5: resolution: {integrity: sha512-q9JtQJKjpsVxCRVgQ+WapguSbKC3SQ5HEzFGPAJMStgh3QjCawp00UKv3MTTAArTmGmmPUvllHZoNbZ3gs0I+Q==} dev: false @@ -8768,12 +8724,6 @@ packages: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} dev: false - /pause-stream@0.0.11: - resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==} - dependencies: - through: 2.3.8 - dev: true - /pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} dev: true @@ -8993,18 +8943,6 @@ packages: resolution: {integrity: sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==} dev: true - /proxy-from-env@1.1.0: - resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - dev: true - - /ps-tree@1.2.0: - resolution: {integrity: sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==} - engines: {node: '>= 0.10'} - hasBin: true - dependencies: - event-stream: 3.3.4 - dev: true - /psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true @@ -9862,12 +9800,6 @@ packages: engines: {node: '>= 10.x'} dev: false - /split@0.3.3: - resolution: {integrity: sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==} - dependencies: - through: 2.3.8 - dev: true - /sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: false @@ -9906,23 +9838,6 @@ packages: type-fest: 0.7.1 dev: false - /start-server-and-test@2.0.3: - resolution: {integrity: sha512-QsVObjfjFZKJE6CS6bSKNwWZCKBG6975/jKRPPGFfFh+yOQglSeGXiNWjzgQNXdphcBI9nXbyso9tPfX4YAUhg==} - engines: {node: '>=16'} - hasBin: true - dependencies: - arg: 5.0.2 - bluebird: 3.7.2 - check-more-types: 2.24.0 - debug: 4.3.4(supports-color@8.1.1) - execa: 5.1.1 - lazy-ass: 1.6.0 - ps-tree: 1.2.0 - wait-on: 7.2.0(debug@4.3.4) - transitivePeerDependencies: - - supports-color - dev: true - /statuses@1.5.0: resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} engines: {node: '>= 0.6'} @@ -9944,12 +9859,6 @@ packages: internal-slot: 1.0.7 dev: true - /stream-combiner@0.0.4: - resolution: {integrity: sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==} - dependencies: - duplexer: 0.1.2 - dev: true - /stream-shift@1.0.3: resolution: {integrity: sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==} dev: false @@ -10817,20 +10726,6 @@ packages: - zod dev: false - /wait-on@7.2.0(debug@4.3.4): - resolution: {integrity: sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==} - engines: {node: '>=12.0.0'} - hasBin: true - dependencies: - axios: 1.6.8(debug@4.3.4) - joi: 17.12.2 - lodash: 4.17.21 - minimist: 1.2.8 - rxjs: 7.8.1 - transitivePeerDependencies: - - debug - dev: true - /walker@1.0.8: resolution: {integrity: sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==} dependencies: From a0f6baf313af6e04f883663c20e3601d87fa7b2b Mon Sep 17 00:00:00 2001 From: Ardy Date: Mon, 8 Apr 2024 12:24:09 -0400 Subject: [PATCH 22/24] chore: empty commit From 5e31a0ebaebcc9ef9ae2e9ddabfef50979506c14 Mon Sep 17 00:00:00 2001 From: Ardy Date: Mon, 8 Apr 2024 12:28:59 -0400 Subject: [PATCH 23/24] fix: gh action --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 8c17d6c..2b8d4f4 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: pnpm/action-setup@v2 with: From a1ee8dc7c0771d19eb234e6ca9764c921a71cb60 Mon Sep 17 00:00:00 2001 From: TITI <162849030+0xtiti@users.noreply.github.com> Date: Mon, 8 Apr 2024 13:37:55 -0300 Subject: [PATCH 24/24] fix: add prettier and linter checks --- .github/workflows/build-test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 2b8d4f4..b288a84 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -65,6 +65,12 @@ jobs: - name: Build the project run: pnpm run build + + - name: Run Prettier + run: pnpm prettier + + - name: Run Linter + run: pnpm lint - name: Cypress run uses: cypress-io/github-action@v5