diff --git a/.dockerignore b/.dockerignore index 1087f90813..b9aa3ae03a 100644 --- a/.dockerignore +++ b/.dockerignore @@ -9,6 +9,7 @@ scripts **/node_modules **/build **/dist +**/tsconfig.tsbuildinfo # Core package artifacts # Hardhat files diff --git a/.github/workflows/cd-core.yaml b/.github/workflows/cd-core.yaml index 8fe2d7797c..28fa135da5 100644 --- a/.github/workflows/cd-core.yaml +++ b/.github/workflows/cd-core.yaml @@ -17,7 +17,7 @@ jobs: - name: Install dependencies run: yarn install --immutable - name: Build core package - run: yarn build:core + run: yarn workspace @human-protocol/core build - name: Change core version uses: jossef/action-set-json-field@v2 with: diff --git a/.github/workflows/cd-deploy-contracts.yaml b/.github/workflows/cd-deploy-contracts.yaml index ba255fec28..af1248a670 100644 --- a/.github/workflows/cd-deploy-contracts.yaml +++ b/.github/workflows/cd-deploy-contracts.yaml @@ -42,7 +42,7 @@ jobs: - name: Install dependencies run: yarn --immutable - name: Build core package - run: yarn build:core + run: yarn workspace @human-protocol/core build - name: Networks list id: networks run: | diff --git a/.github/workflows/cd-logger.yaml b/.github/workflows/cd-logger.yaml new file mode 100644 index 0000000000..d262ede44e --- /dev/null +++ b/.github/workflows/cd-logger.yaml @@ -0,0 +1,26 @@ +name: Logger NPM publish + +permissions: + contents: read + +on: + workflow_dispatch: + +jobs: + logger-publish: + name: Logger NPM Publish + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: yarn + - name: Install dependencies + run: yarn install --immutable + - name: Build logger package + run: yarn workspace @human-protocol/logger build + - name: Publish package + run: yarn workspace @human-protocol/logger npm publish --access public + env: + YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/cd-node-sdk.yaml b/.github/workflows/cd-node-sdk.yaml index dc066b215b..daf25ad3ae 100644 --- a/.github/workflows/cd-node-sdk.yaml +++ b/.github/workflows/cd-node-sdk.yaml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: yarn install --immutable - name: Build core package - run: yarn build:core + run: yarn workspace @human-protocol/core build - name: Change Node.js SDK version from release tag uses: jossef/action-set-json-field@v2 if: ${{ github.event_name != 'workflow_dispatch' }} diff --git a/.github/workflows/cd-python-sdk.yaml b/.github/workflows/cd-python-sdk.yaml index 77be10ccb7..13d865d86d 100644 --- a/.github/workflows/cd-python-sdk.yaml +++ b/.github/workflows/cd-python-sdk.yaml @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: yarn install - name: Build core package - run: yarn build:core + run: yarn workspace @human-protocol/core build - name: Set up Python uses: actions/setup-python@v5 with: diff --git a/.github/workflows/cd-subgraph.yaml b/.github/workflows/cd-subgraph.yaml index 9a61753575..35dac8da74 100644 --- a/.github/workflows/cd-subgraph.yaml +++ b/.github/workflows/cd-subgraph.yaml @@ -22,6 +22,7 @@ jobs: - name: ethereum - name: polygon - name: sepolia + - name: aurora-testnet fail-fast: true max-parallel: 3 steps: @@ -51,7 +52,7 @@ jobs: run: yarn install --immutable - name: Build core package if: steps.filter_networks.outputs.continue == 'true' - run: yarn build:core + run: yarn workspace @human-protocol/core build - name: Generate and build Subgraph if: steps.filter_networks.outputs.continue == 'true' run: yarn generate && yarn build diff --git a/.github/workflows/ci-test-node-sdk.yaml b/.github/workflows/ci-test-node-sdk.yaml index 3aa1436b77..6d7bd2a3d5 100644 --- a/.github/workflows/ci-test-node-sdk.yaml +++ b/.github/workflows/ci-test-node-sdk.yaml @@ -19,6 +19,6 @@ jobs: - name: Install dependencies run: yarn install --immutable - name: Build core package - run: yarn build:core + run: yarn workspace @human-protocol/core build - name: Run Node.js SDK test run: yarn workspace @human-protocol/sdk test diff --git a/.github/workflows/ci-test-python-sdk.yaml b/.github/workflows/ci-test-python-sdk.yaml index 99597a2d81..3db01fbf34 100644 --- a/.github/workflows/ci-test-python-sdk.yaml +++ b/.github/workflows/ci-test-python-sdk.yaml @@ -19,7 +19,7 @@ jobs: - name: Install core package dependencies run: yarn install --immutable - name: Build core package - run: yarn build:core + run: yarn workspace @human-protocol/core build - name: Set up Python 3.10 uses: actions/setup-python@v5 with: diff --git a/.github/workflows/ci-test-subgraph.yaml b/.github/workflows/ci-test-subgraph.yaml index a84c675469..976c341b3b 100644 --- a/.github/workflows/ci-test-subgraph.yaml +++ b/.github/workflows/ci-test-subgraph.yaml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: yarn install --immutable - name: Build core package - run: yarn build:core + run: yarn workspace @human-protocol/core build - name: Generate manifest for Polygon for tests run: NETWORK=polygon yarn workspace @human-protocol/subgraph generate - name: Run subgraph test diff --git a/docker-setup/Makefile b/docker-setup/Makefile index 365895d059..d9a3d81c62 100644 --- a/docker-setup/Makefile +++ b/docker-setup/Makefile @@ -2,6 +2,7 @@ infra-up infra-stop \ build-services services-up services-stop +export COMPOSE_BAKE=false DOCKER_PARALLEL ?= 4 check-env-file: diff --git a/package.json b/package.json index e101aba252..5a50d4fe39 100644 --- a/package.json +++ b/package.json @@ -8,9 +8,7 @@ "scripts": { "clean": "yarn workspaces foreach --all -p run clean", "lint": "yarn workspaces foreach --all -p run lint", - "build:core": "yarn workspace @human-protocol/core build", - "build:sdk": "yarn workspace @human-protocol/sdk build", - "build:libs": "yarn build:core && yarn build:sdk", + "build:libs": "yarn workspaces foreach -Rpt --from '{@human-protocol/sdk,packages/libs/*}' run build", "docker:infra-up": "make -C ./docker-setup -f Makefile.dev infra-up", "docker:infra-stop": "make -C ./docker-setup -f Makefile.dev infra-stop", "docker:infra-down": "make -C ./docker-setup -f Makefile.dev infra-down", diff --git a/packages/apps/dashboard/client/eslint.config.js b/packages/apps/dashboard/client/eslint.config.js index dcf3e17b34..a253b2d2e5 100644 --- a/packages/apps/dashboard/client/eslint.config.js +++ b/packages/apps/dashboard/client/eslint.config.js @@ -72,6 +72,7 @@ export default tseslint.config( ], 'import/no-duplicates': 'error', 'import/no-unresolved': 'error', + '@typescript-eslint/consistent-type-imports': 'error', '@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }], '@typescript-eslint/no-explicit-any': 'error', 'no-console': ['error', { allow: ['warn', 'error'] }], diff --git a/packages/apps/dashboard/client/index.html b/packages/apps/dashboard/client/index.html index 3b1a160e05..bbab1e01ee 100644 --- a/packages/apps/dashboard/client/index.html +++ b/packages/apps/dashboard/client/index.html @@ -2,17 +2,16 @@ - + + - + + HUMAN Dashboard diff --git a/packages/apps/dashboard/client/package.json b/packages/apps/dashboard/client/package.json index 80032a771a..5458c1869e 100644 --- a/packages/apps/dashboard/client/package.json +++ b/packages/apps/dashboard/client/package.json @@ -20,12 +20,12 @@ "@emotion/react": "^11.11.4", "@emotion/styled": "^11.11.5", "@human-protocol/sdk": "workspace:*", - "@mui/icons-material": "^7.0.1", - "@mui/material": "^5.15.18", - "@mui/styled-engine-sc": "6.4.0", - "@mui/system": "^5.15.14", - "@mui/x-data-grid": "^8.5.2", - "@mui/x-date-pickers": "^7.23.6", + "@mui/icons-material": "^7.2.0", + "@mui/material": "^7.2.0", + "@mui/styled-engine-sc": "7.2.0", + "@mui/system": "^7.2.0", + "@mui/x-data-grid": "^8.7.0", + "@mui/x-date-pickers": "^8.7.0", "@tanstack/react-query": "^5.67.2", "@types/react-router-dom": "^5.3.3", "@types/recharts": "^1.8.29", diff --git a/packages/apps/dashboard/client/src/app/AppRoutes.tsx b/packages/apps/dashboard/client/src/app/AppRoutes.tsx index 866ee88553..1ca3459cef 100644 --- a/packages/apps/dashboard/client/src/app/AppRoutes.tsx +++ b/packages/apps/dashboard/client/src/app/AppRoutes.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import { BrowserRouter as Router, Route, Routes } from 'react-router-dom'; diff --git a/packages/apps/dashboard/client/src/app/index.tsx b/packages/apps/dashboard/client/src/app/index.tsx index 04a926ce42..1f3145606d 100644 --- a/packages/apps/dashboard/client/src/app/index.tsx +++ b/packages/apps/dashboard/client/src/app/index.tsx @@ -1,5 +1,7 @@ -import React from 'react'; +import { StrictMode } from 'react'; +import { LocalizationProvider } from '@mui/x-date-pickers'; +import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import ReactDOM from 'react-dom/client'; @@ -17,10 +19,12 @@ const queryClient = new QueryClient({ ReactDOM.createRoot(document.getElementById('root')!).render( - - - - - + + + + + + + ); diff --git a/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx b/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx index 82045f6af2..ff1abe7fcc 100644 --- a/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx +++ b/packages/apps/dashboard/client/src/app/providers/ThemeProvider.tsx @@ -1,17 +1,15 @@ import { - FC, - PropsWithChildren, + type FC, + type PropsWithChildren, useCallback, useEffect, useMemo, useState, } from 'react'; -import { - CssBaseline, - PaletteMode, - ThemeProvider as MuiThemeProvider, -} from '@mui/material'; +import type { PaletteMode } from '@mui/material'; +import CssBaseline from '@mui/material/CssBaseline'; +import { ThemeProvider as MuiThemeProvider } from '@mui/material/styles'; import { createAppTheme } from '@/shared/ui/theme'; diff --git a/packages/apps/dashboard/client/src/app/styles/_home-page.scss b/packages/apps/dashboard/client/src/app/styles/_home-page.scss index e0c55f0895..28f2715d44 100644 --- a/packages/apps/dashboard/client/src/app/styles/_home-page.scss +++ b/packages/apps/dashboard/client/src/app/styles/_home-page.scss @@ -1,7 +1,3 @@ -.home-page-search { - margin-top: 24px; -} - .home-page-leaderboard { margin-top: 60px; } diff --git a/packages/apps/dashboard/client/src/app/styles/_page-wrapper.scss b/packages/apps/dashboard/client/src/app/styles/_page-wrapper.scss index 647bdf1945..d51f35de55 100644 --- a/packages/apps/dashboard/client/src/app/styles/_page-wrapper.scss +++ b/packages/apps/dashboard/client/src/app/styles/_page-wrapper.scss @@ -12,10 +12,15 @@ .container { margin: auto; padding: 30px 80px 100px; + min-height: calc(100vh - 82px); @media (max-width: 1200px) { padding: 24px 16px; } + + @media (max-width: 900px) { + min-height: calc(100vh - 62px); + } } @media (max-width: 600px) { diff --git a/packages/apps/dashboard/client/src/features/graph/api/useChartData.ts b/packages/apps/dashboard/client/src/features/graph/api/useChartData.ts index b6e27a522d..5f0c24e2b5 100644 --- a/packages/apps/dashboard/client/src/features/graph/api/useChartData.ts +++ b/packages/apps/dashboard/client/src/features/graph/api/useChartData.ts @@ -10,11 +10,11 @@ import validateResponse from '@/shared/lib/validateResponse'; import { hcaptchaDailyStatsSchema, - HcaptchaDailyStats, + type HcaptchaDailyStats, } from '../model/hcaptchaDailyStatsSchema'; import { hmtDailyStatsSchema, - HMTDailyStats, + type HMTDailyStats, } from '../model/hmtDailyStatsSchema'; export type ChartData = (HMTDailyStats & Omit)[]; diff --git a/packages/apps/dashboard/client/src/features/graph/store/useChartParamsStore.ts b/packages/apps/dashboard/client/src/features/graph/store/useChartParamsStore.ts index 7755ed615d..28f2fcdc64 100644 --- a/packages/apps/dashboard/client/src/features/graph/store/useChartParamsStore.ts +++ b/packages/apps/dashboard/client/src/features/graph/store/useChartParamsStore.ts @@ -1,4 +1,4 @@ -import dayjs, { Dayjs } from 'dayjs'; +import dayjs, { type Dayjs } from 'dayjs'; import { create } from 'zustand'; const MINIMAL_DATE_FOR_DATE_PICKER = '2021-04-06'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx b/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx index 73a297367d..ddc08e7368 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/AreaChart.tsx @@ -1,9 +1,10 @@ -import { FC, useEffect, useRef, useState } from 'react'; +import { type FC, useEffect, useRef, useState } from 'react'; -import { Typography, useTheme } from '@mui/material'; import Card from '@mui/material/Card'; import Stack from '@mui/material/Stack'; -import dayjs, { Dayjs } from 'dayjs'; +import { useTheme } from '@mui/material/styles'; +import Typography from '@mui/material/Typography'; +import dayjs, { type Dayjs } from 'dayjs'; import { CartesianGrid, Tooltip, @@ -16,7 +17,7 @@ import { import DatePicker from '@/shared/ui/DatePicker'; -import useChartData, { ChartData } from '../api/useChartData'; +import useChartData, { type ChartData } from '../api/useChartData'; import formatNumber from '../lib/formatNumber'; import useChartParamsStore, { initialAllTime, diff --git a/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx b/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx index a1c474da5b..98cb87e7a5 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/ChartTooltip.tsx @@ -1,17 +1,18 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord'; -import { Grid, Typography } from '@mui/material'; import Box from '@mui/material/Box'; import Card from '@mui/material/Card'; +import Grid from '@mui/material/Grid'; import Stack from '@mui/material/Stack'; -import { TooltipProps } from 'recharts'; +import Typography from '@mui/material/Typography'; +import type { TooltipProps } from 'recharts'; import FormattedNumber from '@/shared/ui/FormattedNumber'; import formatDate from '../lib/formatDate'; -import { ChartDataConfigObject } from './AreaChart'; +import type { ChartDataConfigObject } from './AreaChart'; const renderTitle = (title: string) => { const currentTitle: ChartDataConfigObject = { diff --git a/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx b/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx index 7d351507c6..e2b73f6750 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/CustomXAxisTick.tsx @@ -1,6 +1,6 @@ -import { useTheme } from '@mui/material'; +import { useTheme } from '@mui/material/styles'; // @ts-expect-error -- import error, but this type work property -import { ContentRenderer } from 'recharts'; +import type { ContentRenderer } from 'recharts'; import formatDate from '../lib/formatDate'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/GraphSwiper.tsx b/packages/apps/dashboard/client/src/features/graph/ui/GraphSwiper.tsx index 67775b3f45..cf4e9c602f 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/GraphSwiper.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/GraphSwiper.tsx @@ -1,4 +1,4 @@ -import { FC, useEffect } from 'react'; +import { type FC, useEffect } from 'react'; import { Navigation } from 'swiper/modules'; import { Swiper, SwiperSlide } from 'swiper/react'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx b/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx index f03d15b7d0..4771443e0a 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/SmallGraph.tsx @@ -1,19 +1,19 @@ -import { FC, Fragment } from 'react'; +import { type FC, Fragment } from 'react'; -import { useTheme } from '@mui/material'; import Box from '@mui/material/Box'; import Card from '@mui/material/Card'; import Stack from '@mui/material/Stack'; +import { useTheme } from '@mui/material/styles'; import Typography from '@mui/material/Typography'; import { - AreaChart, Area, - XAxis, - YAxis, + AreaChart, CartesianGrid, - Tooltip, ResponsiveContainer, - TooltipProps, + Tooltip, + type TooltipProps, + XAxis, + YAxis, } from 'recharts'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; diff --git a/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx b/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx index 9ef5a320b4..7a4703acd5 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/ToggleButtons.tsx @@ -1,12 +1,12 @@ -import { styled } from '@mui/material'; import Button from '@mui/material/Button'; +import { styled } from '@mui/material/styles'; import ToggleButton from '@mui/material/ToggleButton'; import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'; import dayjs from 'dayjs'; import useChartParamsStore, { TIME_PERIOD_OPTIONS, - TimePeriod, + type TimePeriod, } from '../store/useChartParamsStore'; export const StyledToggleButtonGroup = styled(ToggleButtonGroup)( diff --git a/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx b/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx index b699b14f8d..14ea451755 100644 --- a/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx +++ b/packages/apps/dashboard/client/src/features/graph/ui/ToggleCharts.tsx @@ -1,8 +1,10 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import { FormControlLabel, FormGroup, Typography } from '@mui/material'; import Checkbox from '@mui/material/Checkbox'; +import FormControlLabel from '@mui/material/FormControlLabel'; +import FormGroup from '@mui/material/FormGroup'; import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import FormattedNumber from '@/shared/ui/FormattedNumber'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts b/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts index 03bb6609f7..9d66199cda 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts +++ b/packages/apps/dashboard/client/src/features/leaderboard/model/leaderboardSchema.ts @@ -1,19 +1,6 @@ import { z } from 'zod'; -export const reputationSchema = z.unknown().transform((value) => { - try { - const knownReputation = z - .union([z.literal('Low'), z.literal('Medium'), z.literal('High')]) - .parse(value); - - return knownReputation; - } catch (error) { - console.error(error); - return 'Unknown'; - } -}); - -export type Reputation = z.infer; +import { reputationSchema } from '@/shared/model/reputationSchema'; const leaderboardEntity = z.object({ address: z.string(), diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx index f2935aa8fa..901fbb1d69 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/AddressCell.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import { ChainId } from '@human-protocol/sdk'; +import type { ChainId } from '@human-protocol/sdk/src/enums'; import Box from '@mui/material/Box'; import AbbreviateClipboard from '@/shared/ui/AbbreviateClipboard'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/CategoryCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/CategoryCell.tsx index aff8549534..887dca2b8f 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/CategoryCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/CategoryCell.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Box from '@mui/material/Box'; import Chip from '@mui/material/Chip'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx index 028b9dcaf2..55d910c549 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/ChainCell.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import { ChainId } from '@human-protocol/sdk'; +import type { ChainId } from '@human-protocol/sdk/src/enums'; import Typography from '@mui/material/Typography'; import { getNetwork } from '@/shared/lib/networks'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/DataGridWrapper.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/DataGridWrapper.tsx index bc71c3b905..f89fc8e37a 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/DataGridWrapper.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/DataGridWrapper.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; @@ -8,7 +8,7 @@ import { useIsMobile } from '@/shared/hooks/useBreakpoints'; import handleErrorMessage from '@/shared/lib/handleErrorMessage'; import Loader from '@/shared/ui/Loader'; -import { LeaderboardData } from '../model/leaderboardSchema'; +import type { LeaderboardData } from '../model/leaderboardSchema'; import useDataGrid from '../ui/useDataGrid'; type Props = { diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/Leaderboard.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/Leaderboard.tsx index baea7f9a8b..8d14be8764 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/Leaderboard.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/Leaderboard.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx index f65a2a7da4..d2ec1162de 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/RoleCell.tsx @@ -1,6 +1,6 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; -import { Launch as LaunchIcon } from '@mui/icons-material'; +import LaunchIcon from '@mui/icons-material/Launch'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; import { Link } from 'react-router-dom'; @@ -59,13 +59,16 @@ const RoleCell: FC = ({ rank, role, websiteUrl, name }) => { - + {formattedName ?? humanReadableRole} {websiteUrl ? : null} {name && role ? ( - + {humanReadableRole} ) : null} diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/SelectNetwork.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/SelectNetwork.tsx index 555c9a8b3a..d8972b9e45 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/SelectNetwork.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/SelectNetwork.tsx @@ -5,7 +5,7 @@ import CircularProgress from '@mui/material/CircularProgress'; import FormControl from '@mui/material/FormControl'; import InputLabel from '@mui/material/InputLabel'; import MenuItem from '@mui/material/MenuItem'; -import Select, { SelectChangeEvent } from '@mui/material/Select'; +import Select, { type SelectChangeEvent } from '@mui/material/Select'; import useFilteredNetworks from '@/shared/api/useFilteredNetworks'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/TextCell.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/TextCell.tsx index a3f78f9ebf..49e650b8c3 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/TextCell.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/TextCell.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Typography from '@mui/material/Typography'; diff --git a/packages/apps/dashboard/client/src/features/leaderboard/ui/useDataGrid.tsx b/packages/apps/dashboard/client/src/features/leaderboard/ui/useDataGrid.tsx index f2e2f630f2..1f9930e059 100644 --- a/packages/apps/dashboard/client/src/features/leaderboard/ui/useDataGrid.tsx +++ b/packages/apps/dashboard/client/src/features/leaderboard/ui/useDataGrid.tsx @@ -3,12 +3,12 @@ import { useMemo } from 'react'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Box from '@mui/material/Box'; import Typography from '@mui/material/Typography'; -import { GridColDef, GridRenderCellParams } from '@mui/x-data-grid'; +import type { GridColDef, GridRenderCellParams } from '@mui/x-data-grid'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; import CustomTooltip from '@/shared/ui/CustomTooltip'; -import { LeaderboardData } from '../model/leaderboardSchema'; +import type { LeaderboardData } from '../model/leaderboardSchema'; import useLeaderboardFiltersStore from '../store/useLeaderboardFiltersStore'; import AddressCell from './AddressCell'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts b/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts index 10b6b53ddd..e12e5844ee 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts +++ b/packages/apps/dashboard/client/src/features/searchResults/model/addressDetailsSchema.ts @@ -1,7 +1,7 @@ -import { Role } from '@human-protocol/sdk'; +import { Role } from '@human-protocol/sdk/src/constants'; import { z } from 'zod'; -import { reputationSchema } from '@/features/leaderboard/model/leaderboardSchema'; +import { reputationSchema } from '@/shared/model/reputationSchema'; const transformOptionalTokenAmount = ( value: string | undefined | null, diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx index 7d4c256570..ef1550aa55 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/Clipboard.tsx @@ -1,4 +1,4 @@ -import { FC, useState } from 'react'; +import { type FC, useState } from 'react'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; import Card from '@mui/material/Card'; @@ -43,6 +43,7 @@ const Clipboard: FC = ({ value }) => { { navigator.clipboard.writeText(value); setTooltipOpen(true); diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/EscrowAddress.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/EscrowAddress.tsx index 5270129696..8f8318f455 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/EscrowAddress.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/EscrowAddress.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Chip from '@mui/material/Chip'; import Stack from '@mui/material/Stack'; @@ -6,7 +6,7 @@ import Typography from '@mui/material/Typography'; import SectionWrapper from '@/shared/ui/SectionWrapper'; -import { AddressDetailsEscrow } from '../model/addressDetailsSchema'; +import type { AddressDetailsEscrow } from '../model/addressDetailsSchema'; import HmtBalance from './HmtBalance'; import TitleSectionWrapper from './TitleSectionWrapper'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/HmtBalance.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/HmtBalance.tsx index 0d9d00c134..fab1fbc99c 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/HmtBalance.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/HmtBalance.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/HmtPrice.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/HmtPrice.tsx index be07a28276..7d0233744f 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/HmtPrice.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/HmtPrice.tsx @@ -1,4 +1,5 @@ -import { Typography, Stack } from '@mui/material'; +import Stack from '@mui/material/Stack'; +import Typography from '@mui/material/Typography'; import useHmtPrice from '@/shared/api/useHmtPrice'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx index 9f47bdbbc8..4054a82cf9 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorAddress.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import { Role } from '@human-protocol/sdk'; +import { Role } from '@human-protocol/sdk/src/constants'; import Box from '@mui/material/Box'; import Chip from '@mui/material/Chip'; import Link from '@mui/material/Link'; @@ -13,7 +13,7 @@ import { env } from '@/shared/config/env'; import EntityIcon from '@/shared/ui/EntityIcon'; import SectionWrapper from '@/shared/ui/SectionWrapper'; -import { AddressDetailsOperator } from '../model/addressDetailsSchema'; +import type { AddressDetailsOperator } from '../model/addressDetailsSchema'; import HmtBalance from './HmtBalance'; import HmtPrice from './HmtPrice'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTable.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTable.tsx index 02c973e230..dae7cbd7ea 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTable.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTable.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Table from '@mui/material/Table'; import TableContainer from '@mui/material/TableContainer'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx index 34cbef9bdd..bb34c6301c 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBody.tsx @@ -1,15 +1,15 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import { TableRow } from '@mui/material'; import CircularProgress from '@mui/material/CircularProgress'; import Link from '@mui/material/Link'; import MuiTableBody from '@mui/material/TableBody'; import TableCell from '@mui/material/TableCell'; +import TableRow from '@mui/material/TableRow'; import handleErrorMessage from '@/shared/lib/handleErrorMessage'; import useGlobalFiltersStore from '@/shared/store/useGlobalFiltersStore'; -import { PaginatedEscrowDetails } from '../../model/escrowDetailsSchema'; +import type { PaginatedEscrowDetails } from '../../model/escrowDetailsSchema'; import EscrowsTableBodyContainer from './EscrowsTableBodyContainer'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBodyContainer.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBodyContainer.tsx index fe7f2c329e..9f85086590 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBodyContainer.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/OperatorEscrows/EscrowsTableBodyContainer.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import Grid from '@mui/material/Grid'; import MuiTableBody from '@mui/material/TableBody'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx index 6dc9a20c09..d01de8167e 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/ReputationScore.tsx @@ -1,6 +1,7 @@ -import { Chip, useTheme } from '@mui/material'; +import Chip from '@mui/material/Chip'; +import { useTheme } from '@mui/material/styles'; -type Reputation = 'High' | 'Medium' | 'Low' | 'Unknown'; +import type { Reputation } from '@/shared/model/reputationSchema'; type Props = { reputation: Reputation; @@ -15,28 +16,28 @@ const ReputationScore = ({ reputation }: Props) => { const theme = useTheme(); const reputationAttributes: Record = { - High: { + high: { title: 'High', colors: { title: theme.palette.success.main, border: theme.palette.success.light, }, }, - Medium: { + medium: { title: 'Medium', colors: { title: theme.palette.warning.main, border: theme.palette.warning.light, }, }, - Low: { + low: { title: 'Low', colors: { title: theme.palette.orange.main, border: theme.palette.orange.light, }, }, - Unknown: { + unknown: { title: 'Coming soon', colors: { title: theme.palette.ocean.main, diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx index e9b30182a3..ff88b6637e 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/SearchResults.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; -import { Stack } from '@mui/material'; +import Stack from '@mui/material/Stack'; import { AxiosError } from 'axios'; import { useLocation, useParams } from 'react-router-dom'; @@ -13,7 +13,7 @@ import Loader from '@/shared/ui/Loader'; import ShadowIcon from '@/shared/ui/ShadowIcon'; import useAddressDetails from '../api/useAddressDetails'; -import { AddressDetails } from '../model/addressDetailsSchema'; +import type { AddressDetails } from '../model/addressDetailsSchema'; import Clipboard from './Clipboard'; import EscrowAddress from './EscrowAddress'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/StakeInfo.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/StakeInfo.tsx index 8731f44cfc..60d7023dbb 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/StakeInfo.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/StakeInfo.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx index a0611b80ee..8a35ebfa92 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/TablePagination.tsx @@ -1,6 +1,6 @@ -import { FC, useEffect } from 'react'; +import { type FC, useEffect } from 'react'; -import { TablePagination as MuiTablePagination } from '@mui/material'; +import MuiTablePagination from '@mui/material/TablePagination'; import useGlobalFiltersStore from '@/shared/store/useGlobalFiltersStore'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx index 3eacd67706..a7fc5ad517 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/TitleSectionWrapper.tsx @@ -1,9 +1,9 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; -import { SxProps } from '@mui/material'; import Box from '@mui/material/Box'; import Stack from '@mui/material/Stack'; +import type { SxProps } from '@mui/material/styles'; import Typography from '@mui/material/Typography'; import CustomTooltip from '@/shared/ui/CustomTooltip'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/TokenAmount.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/TokenAmount.tsx index 8d57079fb1..ae097a4229 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/TokenAmount.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/TokenAmount.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletAddress.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletAddress.tsx index bc74edf214..254e6fecac 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletAddress.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletAddress.tsx @@ -1,11 +1,11 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import SectionWrapper from '@/shared/ui/SectionWrapper'; -import { +import type { AddressDetailsOperator, AddressDetailsWallet, } from '../model/addressDetailsSchema'; diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx index f1725e4252..f39de49cd3 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBody.tsx @@ -1,4 +1,4 @@ -import { FC, useState } from 'react'; +import { type FC, useState } from 'react'; import AddCircleIcon from '@mui/icons-material/AddCircle'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; @@ -13,7 +13,7 @@ import TableRow from '@mui/material/TableRow'; import handleErrorMessage from '@/shared/lib/handleErrorMessage'; import AbbreviateClipboard from '@/shared/ui/AbbreviateClipboard'; -import { PaginatedTransactionDetails } from '../../model/transactionDetailsSchema'; +import type { PaginatedTransactionDetails } from '../../model/transactionDetailsSchema'; import TransactionsTableBodyContainer from './TransactionsTableBodyContainer'; import TransactionsTableCellMethod from './TransactionsTableCellMethod'; @@ -75,7 +75,11 @@ const TransactionsTableBody: FC = ({ data, isLoading, error }) => { {elem.internalTransactions.length > 0 && ( - toggleRow(idx)} size="small"> + toggleRow(idx)} + size="small" + > {expandedRows[idx] ? ( ) : ( diff --git a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBodyContainer.tsx b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBodyContainer.tsx index 133bb36a0f..97e6abc3d2 100644 --- a/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBodyContainer.tsx +++ b/packages/apps/dashboard/client/src/features/searchResults/ui/WalletTransactions/TransactionsTableBodyContainer.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import Grid from '@mui/material/Grid'; import MuiTableBody from '@mui/material/TableBody'; diff --git a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx index a92bd05c73..f95a658b76 100644 --- a/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx +++ b/packages/apps/dashboard/client/src/pages/home/ui/HomePage.tsx @@ -1,12 +1,12 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import HelpOutlineIcon from '@mui/icons-material/HelpOutline'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import Divider from '@mui/material/Divider'; -import styled from '@mui/material/styles/styled'; +import Grid from '@mui/material/Grid'; +import { styled } from '@mui/material/styles'; import Typography from '@mui/material/Typography'; -import Grid from '@mui/material/Unstable_Grid2'; import { Link } from 'react-router-dom'; import GraphSwiper from '@/features/graph/ui/GraphSwiper'; @@ -28,7 +28,7 @@ const CardWrapper = styled(Grid)(({ theme }) => ({ borderRadius: '16px', padding: '24px 32px', [theme.breakpoints.up('md')]: { - height: 300, + height: '100%', }, [theme.breakpoints.down('md')]: { height: 'auto', @@ -66,12 +66,12 @@ const HomePage: FC = () => { return ( - + All HUMAN activity. In one place. - + - + Token @@ -85,7 +85,7 @@ const HomePage: FC = () => { - + { + try { + const knownReputation = z + .union([z.literal('low'), z.literal('medium'), z.literal('high')]) + .parse(value); + + return knownReputation; + } catch (error) { + console.error(error); + return 'unknown'; + } +}); + +export type Reputation = z.infer; diff --git a/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx b/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx index 83c1e14638..5c665fb461 100644 --- a/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/AbbreviateClipboard/index.tsx @@ -1,8 +1,8 @@ import { useState } from 'react'; import ContentCopyIcon from '@mui/icons-material/ContentCopy'; -import { Link } from '@mui/material'; import IconButton from '@mui/material/IconButton'; +import Link from '@mui/material/Link'; import Stack from '@mui/material/Stack'; import Typography from '@mui/material/Typography'; import { useNavigate } from 'react-router-dom'; @@ -57,6 +57,7 @@ const AbbreviateClipboard = ({ value, link }: AbbreviateClipboardProps) => { )} { navigator.clipboard.writeText(value); setTooltipOpen(true); diff --git a/packages/apps/dashboard/client/src/shared/ui/Breadcrumbs/index.tsx b/packages/apps/dashboard/client/src/shared/ui/Breadcrumbs/index.tsx index 2858ae7b4d..53a22f2412 100644 --- a/packages/apps/dashboard/client/src/shared/ui/Breadcrumbs/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/Breadcrumbs/index.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import KeyboardArrowRightIcon from '@mui/icons-material/KeyboardArrowRight'; import Box from '@mui/material/Box'; diff --git a/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx b/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx index 4002edbb51..f3e59903f6 100644 --- a/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/CustomTooltip/index.tsx @@ -1,4 +1,4 @@ -import { Tooltip, TooltipProps } from '@mui/material'; +import Tooltip, { type TooltipProps } from '@mui/material/Tooltip'; const CustomTooltip = (props: TooltipProps) => { return ; diff --git a/packages/apps/dashboard/client/src/shared/ui/DatePicker/index.tsx b/packages/apps/dashboard/client/src/shared/ui/DatePicker/index.tsx index 1ec5ff700f..876ae66976 100644 --- a/packages/apps/dashboard/client/src/shared/ui/DatePicker/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/DatePicker/index.tsx @@ -1,44 +1,15 @@ -import { Dispatch, SetStateAction, useState } from 'react'; - import Typography from '@mui/material/Typography'; -import { - DatePickerProps, - LocalizationProvider, - UseDateFieldProps, -} from '@mui/x-date-pickers'; -import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; -import { DatePicker as DatePickerMui } from '@mui/x-date-pickers/DatePicker'; -import { - BaseSingleInputFieldProps, - DateValidationError, - FieldSection, -} from '@mui/x-date-pickers/models'; +import { type DatePickerProps, usePickerContext } from '@mui/x-date-pickers'; +import { DatePicker as MuiDatePicker } from '@mui/x-date-pickers/DatePicker'; import type { Dayjs } from 'dayjs'; -interface CustomDateFieldProps - extends UseDateFieldProps, - BaseSingleInputFieldProps< - Dayjs | null, - Dayjs, - FieldSection, - false, - DateValidationError - > { - setOpen: Dispatch>; -} +const CustomDateField = () => { + const { triggerRef, setOpen, label } = usePickerContext(); -const CustomDateField = ({ - setOpen, - label, - id, - InputProps: { ref } = {}, - inputProps: { 'aria-label': ariaLabel } = {}, -}: CustomDateFieldProps) => { return ( setOpen((prevState) => !prevState)} sx={{ borderBottom: '1px solid', @@ -54,49 +25,27 @@ const CustomDateField = ({ ); }; -interface CustomDatePickerProps { - props: Omit, 'open' | 'onOpen' | 'onClose'>; -} - -const CustomDatePicker = ({ props }: CustomDatePickerProps) => { - const [open, setOpen] = useState(false); +type MuiDatePickerProps = { + value: Dayjs; + onChange: (value: Dayjs | null) => void; + customProps?: DatePickerProps; +}; +const DatePicker = ({ value, onChange, customProps }: MuiDatePickerProps) => { return ( - setOpen(false)} - onOpen={() => setOpen(true)} + ); }; -interface DatePickerPropsMui { - value: Dayjs; - onChange: (value: Dayjs | null) => void; - customProps?: Omit['props']; -} - -const DatePicker = ({ value, onChange, customProps }: DatePickerPropsMui) => { - return ( - - - - ); -}; - export default DatePicker; diff --git a/packages/apps/dashboard/client/src/shared/ui/EntityIcon/index.tsx b/packages/apps/dashboard/client/src/shared/ui/EntityIcon/index.tsx index 2ae1ceb6a0..868933cbeb 100644 --- a/packages/apps/dashboard/client/src/shared/ui/EntityIcon/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/EntityIcon/index.tsx @@ -1,4 +1,4 @@ -import { Role } from '@human-protocol/sdk'; +import { Role } from '@human-protocol/sdk/src/constants'; import ExchangeOracleIcon from '@/shared/ui/icons/ExchangeOracleIcon'; import HumanIcon from '@/shared/ui/icons/HumanIcon'; diff --git a/packages/apps/dashboard/client/src/shared/ui/FormattedNumber/index.tsx b/packages/apps/dashboard/client/src/shared/ui/FormattedNumber/index.tsx index 43f4a848dd..2adf29fd5d 100644 --- a/packages/apps/dashboard/client/src/shared/ui/FormattedNumber/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/FormattedNumber/index.tsx @@ -1,4 +1,4 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import { NumericFormat } from 'react-number-format'; diff --git a/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx b/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx index 5126ad866e..ac2999cccd 100644 --- a/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/NetworkIcon/index.tsx @@ -1,5 +1,6 @@ -import { ChainId } from '@human-protocol/sdk'; +import type { ChainId } from '@human-protocol/sdk/src/enums'; +import AuroraIcon from '@/shared/ui/icons/AuroraIcon'; import BinanceSmartChainIcon from '@/shared/ui/icons/BinanceSmartChainIcon'; import EthereumIcon from '@/shared/ui/icons/EthereumIcon'; import HumanIcon from '@/shared/ui/icons/HumanIcon'; @@ -17,6 +18,8 @@ export const NetworkIcon = ({ chainId }: { chainId: ChainId }) => { case 137: case 80002: return ; + case 1313161555: + return ; default: return ; } diff --git a/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx b/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx index 939908955f..9f912bbd33 100644 --- a/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/SearchBar/index.tsx @@ -1,22 +1,19 @@ -import { FC, useCallback, useEffect, useState } from 'react'; +import { type FC, useCallback, useEffect, useState } from 'react'; import CloseIcon from '@mui/icons-material/Close'; import SearchIcon from '@mui/icons-material/Search'; -import { - InputAdornment, - TextField, - Select as MuiSelect, - SelectChangeEvent, - Grid, - MenuItem, - Box, - CircularProgress, - useTheme, -} from '@mui/material'; +import Box from '@mui/material/Box'; +import CircularProgress from '@mui/material/CircularProgress'; +import Grid from '@mui/material/Grid'; import IconButton from '@mui/material/IconButton'; -import clsx from 'clsx'; -import { useNavigate } from 'react-router-dom'; - +import InputAdornment from '@mui/material/InputAdornment'; +import MenuItem from '@mui/material/MenuItem'; +import MuiSelect, { type SelectChangeEvent } from '@mui/material/Select'; +import { useTheme } from '@mui/material/styles'; +import TextField from '@mui/material/TextField'; +import { useLocation, useNavigate } from 'react-router-dom'; + +import { ROUTES } from '@/app/config/routes'; import useFilteredNetworks from '@/shared/api/useFilteredNetworks'; import { useIsMobile } from '@/shared/hooks/useBreakpoints'; import isValidEvmAddress from '@/shared/lib/isValidEvmAddress'; @@ -34,23 +31,16 @@ import { gridSx, } from './styles'; -type SearchBarProps = { - className?: string; - initialInputValue?: string; -}; - -const SearchBar: FC = ({ - className = '', - initialInputValue = '', -}) => { - const isMobile = useIsMobile(); +const SearchBar: FC = () => { + const [inputValue, setInputValue] = useState(''); + const [error, setError] = useState(''); + const [focus, setFocus] = useState(false); const { filteredNetworks, isLoading } = useFilteredNetworks(); const { address, chainId, setChainId, setAddress } = useGlobalFiltersStore(); const navigate = useNavigate(); - const [inputValue, setInputValue] = useState(initialInputValue); - const [error, setError] = useState(null); - const [focus, setFocus] = useState(false); + const isMobile = useIsMobile(); const theme = useTheme(); + const location = useLocation(); useEffect(() => { setInputValue(address); @@ -77,11 +67,11 @@ const SearchBar: FC = ({ setInputValue(value); if (isValidEvmAddress(value)) { - setError(null); + setError(''); } else if (value.length > 0) { setError('Invalid EVM address. Must start with 0x and be 42 characters.'); } else { - setError(null); + setError(''); } }; @@ -91,7 +81,7 @@ const SearchBar: FC = ({ const handleClearClick = () => { setInputValue(''); - setError(null); + setError(''); }; const handleSubmit = (event: React.FormEvent) => { @@ -99,7 +89,20 @@ const SearchBar: FC = ({ navigateToAddress(); }; - if (isLoading) return ; + if (isLoading) { + const color = + location.pathname === ROUTES.HOME ? 'white.main' : 'primary.main'; + return ( + + + + ); + } const renderEmptyValue = ( @@ -121,7 +124,7 @@ const SearchBar: FC = ({ ); return ( -
+ = ({ ), endAdornment: inputValue && ( - + = (props) => { + return ( + + + + ); +}; + +export default AuroraIcon; diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/BinanceSmartChainIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/BinanceSmartChainIcon.tsx index 4e99f7ee6a..38f28c8530 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/BinanceSmartChainIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/BinanceSmartChainIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const BinanceSmartChainIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/DarkModeIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/DarkModeIcon.tsx index 28a6d6d5f2..43ab1e5ba5 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/DarkModeIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/DarkModeIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const DarkModeIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/DiscordIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/DiscordIcon.tsx index 459685c6d5..6556f5b50d 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/DiscordIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/DiscordIcon.tsx @@ -1,8 +1,8 @@ -import React from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; -const DiscordIcon: React.FC = (props) => { +const DiscordIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/EscrowAddressIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/EscrowAddressIcon.tsx index fe065f746d..8dea2f7832 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/EscrowAddressIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/EscrowAddressIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const EscrowAddressIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/EthereumIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/EthereumIcon.tsx index 61e39522cf..933282013d 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/EthereumIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/EthereumIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const EthereumIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/ExchangeOracleIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/ExchangeOracleIcon.tsx index f4fd72d70d..aaf2f8bcd0 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/ExchangeOracleIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/ExchangeOracleIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const ExchangeOracleIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/HumanIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/HumanIcon.tsx index 90581b56c1..d535dcb3d2 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/HumanIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/HumanIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const HumanIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/JobLauncherIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/JobLauncherIcon.tsx index 80a004766f..eba393aa89 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/JobLauncherIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/JobLauncherIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const JobLauncherIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/LeaderboardIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/LeaderboardIcon.tsx index 585a217543..6dc2e1e874 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/LeaderboardIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/LeaderboardIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const LeaderboardIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/LightModeIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/LightModeIcon.tsx index 5e8866c7f8..ba6afb627d 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/LightModeIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/LightModeIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const LightModeIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIcon.tsx index ea6291608a..c307d86781 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const LogoBlockIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIconMobile.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIconMobile.tsx index 1fdf5e9d2c..8f1a645479 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIconMobile.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/LogoBlockIconMobile.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const LogoBlockIconMobile: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/PolygonIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/PolygonIcon.tsx index 0eb1c1ef40..d37c41c1b1 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/PolygonIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/PolygonIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const PolygonIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/RecordingOracleIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/RecordingOracleIcon.tsx index a3f305dc62..b972cd92ad 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/RecordingOracleIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/RecordingOracleIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const RecordingOracleIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/ReputationOracleIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/ReputationOracleIcon.tsx index 67639b7fca..651067c91e 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/ReputationOracleIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/ReputationOracleIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const ReputationOracleIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/icons/WalletIcon.tsx b/packages/apps/dashboard/client/src/shared/ui/icons/WalletIcon.tsx index d8f159c4fa..37dc85f7e0 100644 --- a/packages/apps/dashboard/client/src/shared/ui/icons/WalletIcon.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/icons/WalletIcon.tsx @@ -1,6 +1,6 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import SvgIcon, { SvgIconProps } from '@mui/material/SvgIcon'; +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; const WalletIcon: FC = (props) => { return ( diff --git a/packages/apps/dashboard/client/src/shared/ui/theme/index.tsx b/packages/apps/dashboard/client/src/shared/ui/theme/index.tsx index 56307ab400..b3dc129827 100644 --- a/packages/apps/dashboard/client/src/shared/ui/theme/index.tsx +++ b/packages/apps/dashboard/client/src/shared/ui/theme/index.tsx @@ -1,11 +1,11 @@ -import { CSSProperties } from 'react'; +import type { CSSProperties } from 'react'; -import { Shadows } from '@mui/material'; -import { createTheme } from '@mui/material/styles'; import { - PaletteColorOptions, - PaletteColor, -} from '@mui/material/styles/createPalette'; + createTheme, + type PaletteColorOptions, + type PaletteColor, + type Shadows, +} from '@mui/material/styles'; import { lightPalette, darkPalette } from './palette'; diff --git a/packages/apps/dashboard/client/src/widgets/footer/ui/Footer.tsx b/packages/apps/dashboard/client/src/widgets/footer/ui/Footer.tsx index 1695d72ed0..bc49ea6ba6 100644 --- a/packages/apps/dashboard/client/src/widgets/footer/ui/Footer.tsx +++ b/packages/apps/dashboard/client/src/widgets/footer/ui/Footer.tsx @@ -1,12 +1,13 @@ -import { FC } from 'react'; +import type { FC } from 'react'; import GitHubIcon from '@mui/icons-material/GitHub'; import LinkedInIcon from '@mui/icons-material/LinkedIn'; import TelegramIcon from '@mui/icons-material/Telegram'; import TwitterIcon from '@mui/icons-material/Twitter'; -import { IconButton, styled } from '@mui/material'; import Box from '@mui/material/Box'; +import IconButton from '@mui/material/IconButton'; import Link from '@mui/material/Link'; +import { styled } from '@mui/material/styles'; import Typography from '@mui/material/Typography'; import { env } from '@/shared/config/env'; diff --git a/packages/apps/dashboard/client/src/widgets/header/ui/Header.tsx b/packages/apps/dashboard/client/src/widgets/header/ui/Header.tsx index 8b2703c8e4..e425ff12e0 100644 --- a/packages/apps/dashboard/client/src/widgets/header/ui/Header.tsx +++ b/packages/apps/dashboard/client/src/widgets/header/ui/Header.tsx @@ -1,14 +1,14 @@ -import { FC, useState } from 'react'; +import { type FC, useState } from 'react'; import CloseIcon from '@mui/icons-material/Close'; import MenuIcon from '@mui/icons-material/Menu'; -import { Link as MuiLink } from '@mui/material'; import AppBar from '@mui/material/AppBar'; import Box from '@mui/material/Box'; import Button from '@mui/material/Button'; import Drawer from '@mui/material/Drawer'; import IconButton from '@mui/material/IconButton'; -import styled from '@mui/material/styles/styled'; +import MuiLink from '@mui/material/Link'; +import { styled } from '@mui/material/styles'; import Toolbar from '@mui/material/Toolbar'; import { Link } from 'react-router-dom'; @@ -53,7 +53,7 @@ const Header: FC = () => { height: { xs: 62, md: 82 }, }} > - + diff --git a/packages/apps/dashboard/client/src/widgets/header/ui/ThemeModeSwitch.tsx b/packages/apps/dashboard/client/src/widgets/header/ui/ThemeModeSwitch.tsx index 7be9bd599c..6caeece0cd 100644 --- a/packages/apps/dashboard/client/src/widgets/header/ui/ThemeModeSwitch.tsx +++ b/packages/apps/dashboard/client/src/widgets/header/ui/ThemeModeSwitch.tsx @@ -1,6 +1,7 @@ -import { FC } from 'react'; +import type { FC } from 'react'; -import { IconButton, useTheme } from '@mui/material'; +import IconButton from '@mui/material/IconButton'; +import { useTheme } from '@mui/material/styles'; import DarkModeIcon from '@/shared/ui/icons/DarkModeIcon'; import LightModeIcon from '@/shared/ui/icons/LightModeIcon'; diff --git a/packages/apps/dashboard/client/src/widgets/page-wrapper/ui/PageWrapper.tsx b/packages/apps/dashboard/client/src/widgets/page-wrapper/ui/PageWrapper.tsx index e4096036c4..8ecc2a85d1 100644 --- a/packages/apps/dashboard/client/src/widgets/page-wrapper/ui/PageWrapper.tsx +++ b/packages/apps/dashboard/client/src/widgets/page-wrapper/ui/PageWrapper.tsx @@ -1,4 +1,4 @@ -import { FC, PropsWithChildren } from 'react'; +import type { FC, PropsWithChildren } from 'react'; import clsx from 'clsx'; diff --git a/packages/apps/dashboard/client/vite.config.ts b/packages/apps/dashboard/client/vite.config.ts index 1d90c510e5..ad7d6b888e 100644 --- a/packages/apps/dashboard/client/vite.config.ts +++ b/packages/apps/dashboard/client/vite.config.ts @@ -24,6 +24,14 @@ export default defineConfig({ commonjsOptions: { include: [/core/, /human-protocol-sdk/, /node_modules/], }, + minify: 'terser', + terserOptions: { + compress: { + drop_debugger: true, + unused: true, + dead_code: true, + }, + }, }, server: { port: 3004, diff --git a/packages/apps/dashboard/server/src/common/config/network-config.service.ts b/packages/apps/dashboard/server/src/common/config/network-config.service.ts index 82805f0fb8..f9b0ab3f08 100644 --- a/packages/apps/dashboard/server/src/common/config/network-config.service.ts +++ b/packages/apps/dashboard/server/src/common/config/network-config.service.ts @@ -62,6 +62,12 @@ export class NetworkConfigService { rpcUrl: this.configService.get('RPC_URL_BSC_TESTNET'), }, }), + ...(this.configService.get('RPC_URL_AURORA_TESTNET') && { + auroratest: { + chainId: ChainId.AURORA_TESTNET, + rpcUrl: this.configService.get('RPC_URL_AURORA_TESTNET'), + }, + }), ...(this.configService.get('RPC_URL_LOCALHOST') && { localhost: { chainId: ChainId.LOCALHOST, diff --git a/packages/apps/dashboard/server/src/common/utils/constants.ts b/packages/apps/dashboard/server/src/common/utils/constants.ts index 71594d0819..9bdd75a836 100644 --- a/packages/apps/dashboard/server/src/common/utils/constants.ts +++ b/packages/apps/dashboard/server/src/common/utils/constants.ts @@ -6,6 +6,7 @@ export const TESTNET_CHAIN_IDS = [ ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, ChainId.SEPOLIA, + ChainId.AURORA_TESTNET, ]; export const MAINNET_CHAIN_IDS = [ ChainId.MAINNET, diff --git a/packages/apps/dashboard/server/src/modules/networks/network.service.spec.ts b/packages/apps/dashboard/server/src/modules/networks/network.service.spec.ts index 95509e912f..3e01deebb2 100644 --- a/packages/apps/dashboard/server/src/modules/networks/network.service.spec.ts +++ b/packages/apps/dashboard/server/src/modules/networks/network.service.spec.ts @@ -24,6 +24,7 @@ describe('NetworksService', () => { process.env.RPC_URL_POLYGON = 'https://testrpc.com'; process.env.RPC_URL_BSC_MAINNET = 'https://testrpc.com'; process.env.RPC_URL_ETHEREUM = 'https://testrpc.com'; + process.env.RPC_URL_AURORA_TESTNET = 'https://testrpc.com'; process.env.WEB3_ENV = 'mainnet'; }); diff --git a/packages/apps/faucet/client/src/constants/index.ts b/packages/apps/faucet/client/src/constants/index.ts index 60ad7fbdfb..07ba08e013 100644 --- a/packages/apps/faucet/client/src/constants/index.ts +++ b/packages/apps/faucet/client/src/constants/index.ts @@ -4,4 +4,5 @@ export const FAUCET_CHAIN_IDS = [ ChainId.SEPOLIA, ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, + ChainId.AURORA_TESTNET, ]; diff --git a/packages/apps/faucet/server/.env.example b/packages/apps/faucet/server/.env.example index 03af5931bf..c7c4b2a028 100644 --- a/packages/apps/faucet/server/.env.example +++ b/packages/apps/faucet/server/.env.example @@ -13,10 +13,7 @@ ADDRESS_WAITING_TIME=3600 RPC_URL_SEPOLIA="" RPC_URL_BSC_TESTNET="" RPC_URL_POLYGON_AMOY="" -RPC_URL_MOONBASE_ALPHA="" -RPC_URL_AVALANCHE_TESTNET="" -RPC_URL_CELO_ALFAJORES="" -RPC_URL_XLAYER_TESTNET="" +RPC_URL_AURORA_TESTNET="" # Balance threshold FAUCET_MIN_BALANCE= diff --git a/packages/apps/faucet/server/src/constants/networks.ts b/packages/apps/faucet/server/src/constants/networks.ts index e79f7ddb62..ac5a70a976 100644 --- a/packages/apps/faucet/server/src/constants/networks.ts +++ b/packages/apps/faucet/server/src/constants/networks.ts @@ -16,6 +16,9 @@ export const FAUCET_NETWORKS: { [ChainId.POLYGON_AMOY]: { rpcUrl: process.env.RPC_URL_POLYGON_AMOY || '', }, + [ChainId.AURORA_TESTNET]: { + rpcUrl: process.env.RPC_URL_AURORA_TESTNET || '', + }, [ChainId.LOCALHOST]: { rpcUrl: process.env.RPC_PORT ? `http://127.0.0.1:${process.env.RPC_PORT}` diff --git a/packages/apps/faucet/server/src/index.ts b/packages/apps/faucet/server/src/index.ts index ad728f64f3..88d08eebb2 100644 --- a/packages/apps/faucet/server/src/index.ts +++ b/packages/apps/faucet/server/src/index.ts @@ -28,6 +28,8 @@ app.use(bodyParser.urlencoded({ extended: false })); app.use(express.static(path.join(__dirname, '..', 'client', 'build'))); const port = process.env.APP_PORT; +app.set('trust proxy', 1); + // set up rate limiter: maximum of five requests per second app.use( RateLimit({ @@ -106,7 +108,7 @@ app.post('/faucet', async (request: Request, response: Response) => { }); // extract ip - let ipAddress = request.ip || request.socket.remoteAddress; + let ipAddress = request.ip; if (!ipAddress) return response.status(200).json({ status: false, diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/config/env-schema.ts b/packages/apps/fortune/exchange-oracle/server/src/common/config/env-schema.ts index 0afcd37f0e..08f10c9732 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/common/config/env-schema.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/common/config/env-schema.ts @@ -22,9 +22,8 @@ export const envValidator = Joi.object({ RPC_URL_BSC: Joi.string(), RPC_URL_POLYGON_AMOY: Joi.string(), RPC_URL_SEPOLIA: Joi.string(), - RPC_URL_MOONBEAM: Joi.string(), RPC_URL_BSC_TESTNET: Joi.string(), - RPC_URL_XLAYER: Joi.string(), + RPC_URL_AURORA_TESTNET: Joi.string(), RPC_URL_LOCALHOST: Joi.string(), // S3 S3_ENDPOINT: Joi.string(), diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/config/network-config.service.ts b/packages/apps/fortune/exchange-oracle/server/src/common/config/network-config.service.ts index 416f8f1a67..ead16f03c4 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/common/config/network-config.service.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/common/config/network-config.service.ts @@ -62,6 +62,15 @@ export class NetworkConfigService { rpcUrl: this.configService.get('RPC_URL_BSC_TESTNET'), }, }), + ...(this.configService.get('RPC_URL_AURORA_TESTNET') && { + auroratest: { + chainId: ChainId.AURORA_TESTNET, + /** + * The RPC URL for the AURORA Testnet network. + */ + rpcUrl: this.configService.get('RPC_URL_AURORA_TESTNET'), + }, + }), ...(this.configService.get('RPC_URL_LOCALHOST') && { localhost: { chainId: ChainId.LOCALHOST, diff --git a/packages/apps/fortune/exchange-oracle/server/src/common/constant/index.ts b/packages/apps/fortune/exchange-oracle/server/src/common/constant/index.ts index f68848e847..509aca7a57 100644 --- a/packages/apps/fortune/exchange-oracle/server/src/common/constant/index.ts +++ b/packages/apps/fortune/exchange-oracle/server/src/common/constant/index.ts @@ -10,6 +10,7 @@ export const TESTNET_CHAIN_IDS = [ ChainId.POLYGON_AMOY, ChainId.BSC_TESTNET, ChainId.SEPOLIA, + ChainId.AURORA_TESTNET, ]; export const MAINNET_CHAIN_IDS = [ChainId.POLYGON, ChainId.BSC_MAINNET]; diff --git a/packages/apps/fortune/recording-oracle/src/common/config/env-schema.ts b/packages/apps/fortune/recording-oracle/src/common/config/env-schema.ts index a2605048c3..0bbd2c5e19 100644 --- a/packages/apps/fortune/recording-oracle/src/common/config/env-schema.ts +++ b/packages/apps/fortune/recording-oracle/src/common/config/env-schema.ts @@ -13,6 +13,7 @@ export const envValidator = Joi.object({ RPC_URL_SEPOLIA: Joi.string(), RPC_URL_MOONBEAM: Joi.string(), RPC_URL_BSC_TESTNET: Joi.string(), + RPC_URL_AURORA_TESTNET: Joi.string(), RPC_URL_LOCALHOST: Joi.string(), // S3 S3_ENDPOINT: Joi.string(), diff --git a/packages/apps/fortune/recording-oracle/src/common/config/network-config.service.ts b/packages/apps/fortune/recording-oracle/src/common/config/network-config.service.ts index a2571f7619..798271b61c 100644 --- a/packages/apps/fortune/recording-oracle/src/common/config/network-config.service.ts +++ b/packages/apps/fortune/recording-oracle/src/common/config/network-config.service.ts @@ -62,6 +62,15 @@ export class NetworkConfigService { rpcUrl: this.configService.get('RPC_URL_BSC_TESTNET'), }, }), + ...(this.configService.get('RPC_URL_AURORA_TESTNET') && { + bsctest: { + chainId: ChainId.AURORA_TESTNET, + /** + * The RPC URL for the AURORA Testnet network. + */ + rpcUrl: this.configService.get('RPC_URL_AURORA_TESTNET'), + }, + }), ...(this.configService.get('RPC_URL_LOCALHOST') && { localhost: { chainId: ChainId.LOCALHOST, diff --git a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts index 7666fcd23d..445fbf86f7 100644 --- a/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts +++ b/packages/apps/human-app/frontend/src/modules/smart-contracts/chains.ts @@ -27,6 +27,7 @@ export const TestnetChainsIds = [ ChainId.POLYGON_AMOY, ChainId.SEPOLIA, ChainId.BSC_TESTNET, + ChainId.AURORA_TESTNET, ChainId.LOCALHOST, ] as const; diff --git a/packages/apps/job-launcher/client/package.json b/packages/apps/job-launcher/client/package.json index e4ed76e7c7..86a3bd68ac 100644 --- a/packages/apps/job-launcher/client/package.json +++ b/packages/apps/job-launcher/client/package.json @@ -37,7 +37,6 @@ "typescript": "^5.6.3", "viem": "2.x", "wagmi": "^2.14.6", - "web-vitals": "^4.2.2", "xml2js": "^0.6.2", "yup": "^1.6.1" }, diff --git a/packages/apps/job-launcher/client/src/components/Icons/AuroraIcon.tsx b/packages/apps/job-launcher/client/src/components/Icons/AuroraIcon.tsx new file mode 100644 index 0000000000..130d43133e --- /dev/null +++ b/packages/apps/job-launcher/client/src/components/Icons/AuroraIcon.tsx @@ -0,0 +1,13 @@ +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; +import type { FC } from 'react'; + +export const AuroraIcon: FC = (props) => { + return ( + + + + ); +}; diff --git a/packages/apps/job-launcher/client/src/components/Icons/chains.tsx b/packages/apps/job-launcher/client/src/components/Icons/chains.tsx index 45909024a7..c5e8e35acb 100644 --- a/packages/apps/job-launcher/client/src/components/Icons/chains.tsx +++ b/packages/apps/job-launcher/client/src/components/Icons/chains.tsx @@ -1,6 +1,7 @@ import { ChainId } from '@human-protocol/sdk'; import { ReactElement } from 'react'; +import { AuroraIcon } from './AuroraIcon'; import { BinanceSmartChainIcon } from './BinanceSmartChainIcon'; import { DollarSignIcon } from './DollarSignIcon'; import { EthereumIcon } from './EthereumIcon'; @@ -15,6 +16,7 @@ export const CHAIN_ICONS: { [chainId in ChainId]?: ReactElement } = { [ChainId.POLYGON_AMOY]: , [ChainId.BSC_MAINNET]: , [ChainId.BSC_TESTNET]: , + [ChainId.AURORA_TESTNET]: , }; export const TOKEN_ICONS: Record = { diff --git a/packages/apps/job-launcher/client/src/constants/chains.ts b/packages/apps/job-launcher/client/src/constants/chains.ts index 9d65dd4929..67e9f9bda1 100644 --- a/packages/apps/job-launcher/client/src/constants/chains.ts +++ b/packages/apps/job-launcher/client/src/constants/chains.ts @@ -15,6 +15,7 @@ switch (import.meta.env.VITE_APP_ENVIRONMENT.toLowerCase()) { ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, ChainId.SEPOLIA, + ChainId.AURORA_TESTNET, ]; break; case 'localhost': diff --git a/packages/apps/job-launcher/client/src/main.tsx b/packages/apps/job-launcher/client/src/main.tsx index 0148d40d7b..8b624e49b4 100644 --- a/packages/apps/job-launcher/client/src/main.tsx +++ b/packages/apps/job-launcher/client/src/main.tsx @@ -5,7 +5,7 @@ import { LocalizationProvider } from '@mui/x-date-pickers'; import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'; import { Elements } from '@stripe/react-stripe-js'; import { loadStripe } from '@stripe/stripe-js'; -import React from 'react'; +import { StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import { Provider } from 'react-redux'; @@ -16,7 +16,6 @@ import { SnackbarProvider, WagmiProvider, } from './providers'; -import reportWebVitals from './reportWebVitals'; import { store } from './state'; import { fetchUserBalanceAsync, signIn } from './state/auth/reducer'; import theme from './theme'; @@ -41,7 +40,7 @@ loadStripe(publishableKey).then((stripePromise) => { } root.render( - + @@ -61,13 +60,8 @@ loadStripe(publishableKey).then((stripePromise) => { - , + , ); }); const root = createRoot(document.getElementById('root') as HTMLElement); - -// If you want to start measuring performance in your app, pass a function -// to log results (for example: reportWebVitals(console.log)) -// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals -reportWebVitals(); diff --git a/packages/apps/job-launcher/client/src/providers/WagmiProvider.tsx b/packages/apps/job-launcher/client/src/providers/WagmiProvider.tsx index ad9308ed9e..9a53e3602b 100644 --- a/packages/apps/job-launcher/client/src/providers/WagmiProvider.tsx +++ b/packages/apps/job-launcher/client/src/providers/WagmiProvider.tsx @@ -27,6 +27,7 @@ export const wagmiConfig = createConfig({ wagmiChains.avalanche, wagmiChains.xLayer, wagmiChains.xLayerTestnet, + wagmiChains.auroraTestnet, LOCALHOST, ], connectors: [ @@ -70,6 +71,10 @@ export const wagmiConfig = createConfig({ unstable_connector(metaMask), http(), ]), + [wagmiChains.auroraTestnet.id]: fallback([ + unstable_connector(metaMask), + http(), + ]), [LOCALHOST.id]: fallback([ unstable_connector(metaMask), http(LOCALHOST.rpcUrls.default.http[0]), diff --git a/packages/apps/job-launcher/client/src/reportWebVitals.ts b/packages/apps/job-launcher/client/src/reportWebVitals.ts deleted file mode 100644 index 49a2a16e0f..0000000000 --- a/packages/apps/job-launcher/client/src/reportWebVitals.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ReportHandler } from 'web-vitals'; - -const reportWebVitals = (onPerfEntry?: ReportHandler) => { - if (onPerfEntry && onPerfEntry instanceof Function) { - import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { - getCLS(onPerfEntry); - getFID(onPerfEntry); - getFCP(onPerfEntry); - getLCP(onPerfEntry); - getTTFB(onPerfEntry); - }); - } -}; - -export default reportWebVitals; diff --git a/packages/apps/job-launcher/server/.env.example b/packages/apps/job-launcher/server/.env.example index d892a45d20..55590e127e 100644 --- a/packages/apps/job-launcher/server/.env.example +++ b/packages/apps/job-launcher/server/.env.example @@ -84,10 +84,8 @@ HCAPTCHA_SECRET=0x0000000000000000000000000000000000000000 # Stripe PAYMENT_PROVIDER_SECRET_KEY=disabled -PAYMENT_PROVIDER_APP_NAME=Launcher Server Local -PAYMENT_PROVIDER_APP_VERSION=1.0.0 +PAYMENT_PROVIDER_APP_NAME=Job Launcher Server Local PAYMENT_PROVIDER_APP_INFO_URL=http://local.app -PAYMENT_PROVIDER_API_VERSION=2022-11-15 # Sendgrid SENDGRID_API_KEY=sendgrid-disabled diff --git a/packages/apps/job-launcher/server/Dockerfile b/packages/apps/job-launcher/server/Dockerfile index 72663d1e27..e837d0a8ec 100644 --- a/packages/apps/job-launcher/server/Dockerfile +++ b/packages/apps/job-launcher/server/Dockerfile @@ -16,6 +16,7 @@ COPY ${APP_PATH}/package.json ./${APP_PATH}/ # so we need to copy and build them COPY packages/core ./packages/core COPY packages/sdk ./packages/sdk +COPY packages/libs ./packages/libs RUN yarn install diff --git a/packages/apps/job-launcher/server/package.json b/packages/apps/job-launcher/server/package.json index fc7451e68c..249528e9e8 100644 --- a/packages/apps/job-launcher/server/package.json +++ b/packages/apps/job-launcher/server/package.json @@ -30,6 +30,7 @@ "dependencies": { "@google-cloud/storage": "^7.15.0", "@google-cloud/vision": "^4.3.2", + "@human-protocol/logger": "workspace:*", "@human-protocol/sdk": "workspace:*", "@nestjs/axios": "^3.1.2", "@nestjs/common": "^10.2.7", diff --git a/packages/apps/job-launcher/server/src/app.module.ts b/packages/apps/job-launcher/server/src/app.module.ts index 03fcb7b581..b351d7e082 100644 --- a/packages/apps/job-launcher/server/src/app.module.ts +++ b/packages/apps/job-launcher/server/src/app.module.ts @@ -1,6 +1,10 @@ import { Module } from '@nestjs/common'; import { APP_FILTER, APP_GUARD, APP_INTERCEPTOR, APP_PIPE } from '@nestjs/core'; +import { ServeStaticModule } from '@nestjs/serve-static'; +import { ScheduleModule } from '@nestjs/schedule'; import { ConfigModule } from '@nestjs/config'; +import { join } from 'path'; + import { AppController } from './app.controller'; import { DatabaseModule } from './database/database.module'; import { JwtAuthGuard } from './common/guards'; @@ -12,18 +16,16 @@ import { JobModule } from './modules/job/job.module'; import { PaymentModule } from './modules/payment/payment.module'; import { Web3Module } from './modules/web3/web3.module'; import { envValidator } from './common/config/env-schema'; -import { ServeStaticModule } from '@nestjs/serve-static'; -import { join } from 'path'; import { StorageModule } from './modules/storage/storage.module'; import { CronJobModule } from './modules/cron-job/cron-job.module'; import { SnakeCaseInterceptor } from './common/interceptors/snake-case'; import { WebhookModule } from './modules/webhook/webhook.module'; import { EnvConfigModule } from './common/config/config.module'; import { ExceptionFilter } from './common/exceptions/exception.filter'; -import { ScheduleModule } from '@nestjs/schedule'; import { StatisticModule } from './modules/statistic/statistic.module'; import { QualificationModule } from './modules/qualification/qualification.module'; import { TransformEnumInterceptor } from './common/interceptors/transform-enum.interceptor'; +import Environment from './common/utils/environment'; @Module({ providers: [ @@ -54,7 +56,7 @@ import { TransformEnumInterceptor } from './common/interceptors/transform-enum.i /** * First value found takes precendece */ - envFilePath: [`.env.${process.env.NODE_ENV}`, '.env.local', '.env'], + envFilePath: [`.env.${Environment.name}`, '.env.local', '.env'], validationSchema: envValidator, }), DatabaseModule, diff --git a/packages/apps/job-launcher/server/src/common/config/env-schema.ts b/packages/apps/job-launcher/server/src/common/config/env-schema.ts index 50e853d2dc..74445aba16 100644 --- a/packages/apps/job-launcher/server/src/common/config/env-schema.ts +++ b/packages/apps/job-launcher/server/src/common/config/env-schema.ts @@ -2,7 +2,6 @@ import * as Joi from 'joi'; export const envValidator = Joi.object({ // General - NODE_ENV: Joi.string(), HOST: Joi.string(), PORT: Joi.string(), FE_URL: Joi.string(), @@ -47,6 +46,7 @@ export const envValidator = Joi.object({ RPC_URL_POLYGON_AMOY: Joi.string(), RPC_URL_BSC_MAINNET: Joi.string(), RPC_URL_BSC_TESTNET: Joi.string(), + RPC_URL_AURORA_TESTNET: Joi.string(), RPC_URL_MOONBEAM: Joi.string(), RPC_URL_XLAYER_TESTNET: Joi.string(), RPC_URL_XLAYER: Joi.string(), diff --git a/packages/apps/job-launcher/server/src/common/config/network-config.service.ts b/packages/apps/job-launcher/server/src/common/config/network-config.service.ts index df563652f1..24edba9de6 100644 --- a/packages/apps/job-launcher/server/src/common/config/network-config.service.ts +++ b/packages/apps/job-launcher/server/src/common/config/network-config.service.ts @@ -68,6 +68,15 @@ export class NetworkConfigService { rpcUrl: this.configService.get('RPC_URL_BSC_TESTNET'), }, }), + ...(this.configService.get('RPC_URL_AURORA_TESTNET') && { + auroratest: { + chainId: ChainId.AURORA_TESTNET, + /** + * The RPC URL for the AURORA Testnet network. + */ + rpcUrl: this.configService.get('RPC_URL_AURORA_TESTNET'), + }, + }), ...(this.configService.get('RPC_URL_LOCALHOST') && { localhost: { chainId: ChainId.LOCALHOST, diff --git a/packages/apps/job-launcher/server/src/common/config/payment-provider-config.service.ts b/packages/apps/job-launcher/server/src/common/config/payment-provider-config.service.ts index c28a642d2e..84b385912f 100644 --- a/packages/apps/job-launcher/server/src/common/config/payment-provider-config.service.ts +++ b/packages/apps/job-launcher/server/src/common/config/payment-provider-config.service.ts @@ -26,23 +26,23 @@ export class PaymentProviderConfigService { /** * The name of the application interacting with the payment providers API. - * Default: 'Fortune' + * Default: 'Job Launcher Server' */ get appName(): string { return this.configService.get( 'PAYMENT_PROVIDER_APP_NAME', - 'Fortune', + 'Job Launcher Server', ); } /** * The version of the application interacting with the payment providers API. - * Default: '0.0.1' + * Default: '1.0.0' */ get appVersion(): string { return this.configService.get( 'PAYMENT_PROVIDER_APP_VERSION', - '0.0.1', + '1.0.0', ); } diff --git a/packages/apps/job-launcher/server/src/common/config/server-config.service.ts b/packages/apps/job-launcher/server/src/common/config/server-config.service.ts index 6f26a2a109..a7901183d9 100644 --- a/packages/apps/job-launcher/server/src/common/config/server-config.service.ts +++ b/packages/apps/job-launcher/server/src/common/config/server-config.service.ts @@ -5,14 +5,6 @@ import { ConfigService } from '@nestjs/config'; export class ServerConfigService { constructor(private configService: ConfigService) {} - /** - * The environment in which the server is running (e.g., 'development', 'production'). - * Default: 'development' - */ - get nodeEnv(): string { - return this.configService.get('NODE_ENV', 'development'); - } - /** * The hostname or IP address on which the server will run. * Default: 'localhost' diff --git a/packages/apps/job-launcher/server/src/common/constants/index.ts b/packages/apps/job-launcher/server/src/common/constants/index.ts index 3518b69d51..a335b1be3c 100644 --- a/packages/apps/job-launcher/server/src/common/constants/index.ts +++ b/packages/apps/job-launcher/server/src/common/constants/index.ts @@ -16,6 +16,7 @@ export const TESTNET_CHAIN_IDS = [ ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, ChainId.SEPOLIA, + ChainId.AURORA_TESTNET, ]; export const MAINNET_CHAIN_IDS = [ChainId.BSC_MAINNET, ChainId.POLYGON]; diff --git a/packages/apps/job-launcher/server/src/common/constants/tokens.ts b/packages/apps/job-launcher/server/src/common/constants/tokens.ts index 061662d90e..ae784e8497 100644 --- a/packages/apps/job-launcher/server/src/common/constants/tokens.ts +++ b/packages/apps/job-launcher/server/src/common/constants/tokens.ts @@ -49,6 +49,13 @@ export const TOKEN_ADDRESSES: { }, // [EscrowFundToken.USDC]: { address: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582', decimals: 6 }, }, + [ChainId.AURORA_TESTNET]: { + [EscrowFundToken.HMT]: { + address: NETWORKS[ChainId.AURORA_TESTNET]!.hmtAddress, + decimals: 18, + }, + // [EscrowFundToken.USDC]: { address: '0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582', decimals: 6 }, + }, [ChainId.LOCALHOST]: { [EscrowFundToken.HMT]: { address: NETWORKS[ChainId.LOCALHOST]!.hmtAddress, diff --git a/packages/apps/job-launcher/server/src/common/exceptions/exception.filter.ts b/packages/apps/job-launcher/server/src/common/exceptions/exception.filter.ts index 7ad8be772a..d0d6a808e8 100644 --- a/packages/apps/job-launcher/server/src/common/exceptions/exception.filter.ts +++ b/packages/apps/job-launcher/server/src/common/exceptions/exception.filter.ts @@ -3,9 +3,9 @@ import { Catch, ExceptionFilter as IExceptionFilter, HttpStatus, - Logger, } from '@nestjs/common'; import { Request, Response } from 'express'; + import { ValidationError, AuthError, @@ -15,10 +15,11 @@ import { ServerError, DatabaseError, } from '../errors'; +import logger from '../../logger'; @Catch() export class ExceptionFilter implements IExceptionFilter { - private logger = new Logger(ExceptionFilter.name); + private readonly logger = logger.child({ context: ExceptionFilter.name }); private getStatus(exception: any): number { if (exception instanceof ValidationError) { @@ -49,10 +50,7 @@ export class ExceptionFilter implements IExceptionFilter { const status = this.getStatus(exception); const message = exception.message || 'Internal server error'; - this.logger.error( - `Exception caught: ${message}`, - exception.stack || 'No stack trace available', - ); + this.logger.error('Unhandled exception', exception); response.status(status).json({ statusCode: status, diff --git a/packages/apps/job-launcher/server/src/common/guards/signature.auth.ts b/packages/apps/job-launcher/server/src/common/guards/signature.auth.ts index 8b536358f5..a3c2d11ac5 100644 --- a/packages/apps/job-launcher/server/src/common/guards/signature.auth.ts +++ b/packages/apps/job-launcher/server/src/common/guards/signature.auth.ts @@ -1,18 +1,15 @@ import { EscrowUtils } from '@human-protocol/sdk'; -import { - CanActivate, - ExecutionContext, - Injectable, - Logger, -} from '@nestjs/common'; +import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; + import { HEADER_SIGNATURE_KEY } from '../constants'; import { Role } from '../enums/role'; import { AuthError } from '../errors'; import { verifySignature } from '../utils/signature'; +import logger from '../../logger'; @Injectable() export class SignatureAuthGuard implements CanActivate { - private readonly logger = new Logger(SignatureAuthGuard.name); + private readonly logger = logger.child({ context: SignatureAuthGuard.name }); constructor(private role: Role[]) {} @@ -49,10 +46,7 @@ export class SignatureAuthGuard implements CanActivate { return true; } } catch (error) { - this.logger.error( - `Error verifying signature: ${error.message}`, - error.stack, - ); + this.logger.error('Error verifying signature', error); } throw new AuthError('Unauthorized'); diff --git a/packages/apps/job-launcher/server/src/common/guards/whitelist.auth.ts b/packages/apps/job-launcher/server/src/common/guards/whitelist.auth.ts index 5683a2b81f..e7ad6ea6c5 100644 --- a/packages/apps/job-launcher/server/src/common/guards/whitelist.auth.ts +++ b/packages/apps/job-launcher/server/src/common/guards/whitelist.auth.ts @@ -1,15 +1,12 @@ -import { - CanActivate, - ExecutionContext, - Injectable, - Logger, -} from '@nestjs/common'; +import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common'; + import { WhitelistService } from '../../modules/whitelist/whitelist.service'; import { AuthError } from '../errors'; +import logger from '../../logger'; @Injectable() export class WhitelistAuthGuard implements CanActivate { - private readonly logger = new Logger(WhitelistAuthGuard.name); + private readonly logger = logger.child({ context: WhitelistAuthGuard.name }); constructor(private readonly whitelistService: WhitelistService) {} @@ -18,7 +15,7 @@ export class WhitelistAuthGuard implements CanActivate { const user = request.user; if (!user) { - this.logger.error('User object is missing in the request.', request); + this.logger.error('User object is missing in the request'); throw new AuthError('User not found.'); } diff --git a/packages/apps/job-launcher/server/src/common/utils/environment.ts b/packages/apps/job-launcher/server/src/common/utils/environment.ts new file mode 100644 index 0000000000..05d5c87255 --- /dev/null +++ b/packages/apps/job-launcher/server/src/common/utils/environment.ts @@ -0,0 +1,26 @@ +enum EnvironmentName { + LOCAL = 'local', + DEVELOPMENT = 'development', + TEST = 'test', + STAGING = 'staging', + PRODUCTION = 'production', +} + +class Environment { + static readonly name: string = + process.env.NODE_ENV || EnvironmentName.DEVELOPMENT; + + static isDevelopment(): boolean { + return [ + EnvironmentName.DEVELOPMENT, + EnvironmentName.TEST, + EnvironmentName.LOCAL, + ].includes(Environment.name as EnvironmentName); + } + + static isTest(): boolean { + return Environment.name === EnvironmentName.TEST; + } +} + +export default Environment; diff --git a/packages/apps/job-launcher/server/src/common/utils/slack.ts b/packages/apps/job-launcher/server/src/common/utils/slack.ts index e74d4fd02f..cb6ef3156e 100644 --- a/packages/apps/job-launcher/server/src/common/utils/slack.ts +++ b/packages/apps/job-launcher/server/src/common/utils/slack.ts @@ -1,12 +1,13 @@ -import { Logger } from '@nestjs/common'; import axios from 'axios'; +import logger from '../../logger'; + +const slackLogger = logger.child({ context: 'sendSlackNotification' }); + export async function sendSlackNotification( webhookUrl: string, message: string, ): Promise { - const logger = new Logger('Slack'); - const payload = { text: message, }; @@ -17,10 +18,10 @@ export async function sendSlackNotification( try { await axios.post(webhookUrl, payload); - logger.log('Slack notification sent:', payload); + slackLogger.debug('Slack notification sent', payload); return true; - } catch (e) { - logger.error('Error sending Slack notification:', e); + } catch (error) { + slackLogger.error('Error sending Slack notification', error); return false; } } diff --git a/packages/apps/job-launcher/server/src/database/database.module.ts b/packages/apps/job-launcher/server/src/database/database.module.ts index cc711645a9..66d72e30d2 100644 --- a/packages/apps/job-launcher/server/src/database/database.module.ts +++ b/packages/apps/job-launcher/server/src/database/database.module.ts @@ -10,7 +10,6 @@ import { TypeOrmLoggerModule, TypeOrmLoggerService } from './typeorm'; import { JobEntity } from '../modules/job/job.entity'; import { ContentModerationRequestEntity } from '../modules/content-moderation/content-moderation-request.entity'; import { PaymentEntity } from '../modules/payment/payment.entity'; -import { ServerConfigService } from '../common/config/server-config.service'; import { DatabaseConfigService } from '../common/config/database-config.service'; import { ApiKeyEntity } from '../modules/auth/apikey.entity'; import { WebhookEntity } from '../modules/webhook/webhook.entity'; @@ -22,15 +21,10 @@ import { WhitelistEntity } from '../modules/whitelist/whitelist.entity'; imports: [ TypeOrmModule.forRootAsync({ imports: [TypeOrmLoggerModule], - inject: [ - TypeOrmLoggerService, - DatabaseConfigService, - ServerConfigService, - ], + inject: [TypeOrmLoggerService, DatabaseConfigService], useFactory: ( typeOrmLoggerService: TypeOrmLoggerService, databaseConfigService: DatabaseConfigService, - serverConfigService: ServerConfigService, ) => { const loggerOptions = databaseConfigService.logging?.split(', '); typeOrmLoggerService.setOptions( @@ -72,7 +66,6 @@ import { WhitelistEntity } from '../modules/whitelist/whitelist.entity'; username: databaseConfigService.user, password: databaseConfigService.password, database: databaseConfigService.database, - keepConnectionAlive: serverConfigService.nodeEnv === 'test', migrationsRun: false, ssl: databaseConfigService.ssl, }; diff --git a/packages/apps/job-launcher/server/src/database/migrations/1749498615107-RenameStripeCustomerIdColumn.ts b/packages/apps/job-launcher/server/src/database/migrations/1749498615107-RenameStripeCustomerIdColumn.ts index ff6bb88c1b..adb2f1fd30 100644 --- a/packages/apps/job-launcher/server/src/database/migrations/1749498615107-RenameStripeCustomerIdColumn.ts +++ b/packages/apps/job-launcher/server/src/database/migrations/1749498615107-RenameStripeCustomerIdColumn.ts @@ -1,7 +1,8 @@ import { MigrationInterface, QueryRunner } from 'typeorm'; -export class RenameStripeCustomerIdColumn1749498615107 implements MigrationInterface { - +export class RenameStripeCustomerIdColumn1749498615107 + implements MigrationInterface +{ name = 'RenameStripeCustomerIdColumn1749498615107'; public async up(queryRunner: QueryRunner): Promise { @@ -25,4 +26,4 @@ export class RenameStripeCustomerIdColumn1749498615107 implements MigrationInter RENAME COLUMN "payment_provider_id" TO "stripe_customer_id" `); } -} +} diff --git a/packages/apps/job-launcher/server/src/logger/index.ts b/packages/apps/job-launcher/server/src/logger/index.ts new file mode 100644 index 0000000000..50ec6a69cc --- /dev/null +++ b/packages/apps/job-launcher/server/src/logger/index.ts @@ -0,0 +1,24 @@ +import { createLogger, NestLogger, LogLevel } from '@human-protocol/logger'; + +import Environment from '../common/utils/environment'; + +const isDevelopment = Environment.isDevelopment(); + +const defaultLogger = createLogger( + { + name: 'DefaultLogger', + level: isDevelopment ? LogLevel.DEBUG : LogLevel.INFO, + pretty: isDevelopment, + disabled: Environment.isTest(), + }, + { + environment: Environment.name, + service: 'job-launcher', + }, +); + +export const nestLoggerOverride = new NestLogger( + defaultLogger.child({ name: 'NestLogger' }), +); + +export default defaultLogger; diff --git a/packages/apps/job-launcher/server/src/main.ts b/packages/apps/job-launcher/server/src/main.ts index bb5e4019e0..1ee1a55318 100644 --- a/packages/apps/job-launcher/server/src/main.ts +++ b/packages/apps/job-launcher/server/src/main.ts @@ -8,12 +8,14 @@ import { useContainer } from 'class-validator'; import helmet from 'helmet'; import { AppModule } from './app.module'; import { ServerConfigService } from './common/config/server-config.service'; +import logger, { nestLoggerOverride } from './logger'; async function bootstrap() { const app = await NestFactory.create(AppModule, { cors: { exposedHeaders: ['Content-Disposition'], }, + logger: nestLoggerOverride, }); useContainer(app.select(AppModule), { fallbackOnErrors: true }); @@ -38,7 +40,7 @@ async function bootstrap() { const port = serverConfigService.port; await app.listen(port, host, async () => { - console.info(`API server is running on http://${host}:${port}`); + logger.info(`API server is running on http://${host}:${port}`); }); } diff --git a/packages/apps/job-launcher/server/src/modules/auth/auth.controller.ts b/packages/apps/job-launcher/server/src/modules/auth/auth.controller.ts index cdd9440f7f..73566fd130 100644 --- a/packages/apps/job-launcher/server/src/modules/auth/auth.controller.ts +++ b/packages/apps/job-launcher/server/src/modules/auth/auth.controller.ts @@ -4,7 +4,6 @@ import { Controller, HttpCode, Ip, - Logger, Post, Req, Request, @@ -39,6 +38,8 @@ import { AuthService } from './auth.service'; import { TokenType } from './token.entity'; import { TokenRepository } from './token.repository'; +import logger from '../../logger'; + @ApiTags('Auth') @ApiResponse({ status: 400, @@ -58,7 +59,7 @@ import { TokenRepository } from './token.repository'; }) @Controller('/auth') export class AuthJwtController { - private readonly logger = new Logger(AuthJwtController.name); + private readonly logger = logger.child({ context: AuthJwtController.name }); constructor( private readonly authService: AuthService, @@ -245,11 +246,8 @@ export class AuthJwtController { try { const apiKey = await this.authService.createOrUpdateAPIKey(req.user); return { apiKey }; - } catch (e) { - this.logger.log( - e.message, - `${AuthJwtController.name} - ${ErrorAuth.ApiKeyCouldNotBeCreatedOrUpdated}`, - ); + } catch (error) { + this.logger.error(ErrorAuth.ApiKeyCouldNotBeCreatedOrUpdated, error); throw new ValidationError(ErrorAuth.ApiKeyCouldNotBeCreatedOrUpdated); } } diff --git a/packages/apps/job-launcher/server/src/modules/content-moderation/gcv-content-moderation.service.ts b/packages/apps/job-launcher/server/src/modules/content-moderation/gcv-content-moderation.service.ts index d4bd6f8b0c..f1a422c51d 100644 --- a/packages/apps/job-launcher/server/src/modules/content-moderation/gcv-content-moderation.service.ts +++ b/packages/apps/job-launcher/server/src/modules/content-moderation/gcv-content-moderation.service.ts @@ -1,6 +1,6 @@ import { Storage } from '@google-cloud/storage'; import { ImageAnnotatorClient, protos } from '@google-cloud/vision'; -import { Injectable, Logger } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import NodeCache from 'node-cache'; import { SlackConfigService } from '../../common/config/slack-config.service'; import { VisionConfigService } from '../../common/config/vision-config.service'; @@ -31,10 +31,13 @@ import { ContentModerationRequestEntity } from './content-moderation-request.ent import { ContentModerationRequestRepository } from './content-moderation-request.repository'; import { ModerationResultDto } from './content-moderation.dto'; import { IContentModeratorService } from './content-moderation.interface'; +import logger from '../../logger'; @Injectable() export class GCVContentModerationService implements IContentModeratorService { - private readonly logger = new Logger(GCVContentModerationService.name); + private readonly logger = logger.child({ + context: GCVContentModerationService.name, + }); private visionClient: ImageAnnotatorClient; private storage: Storage; @@ -153,11 +156,12 @@ export class GCVContentModerationService implements IContentModeratorService { jobEntity.status = JobStatus.UNDER_MODERATION; await this.jobRepository.updateOne(jobEntity); } - } catch (err) { - this.logger.error( - `Error creating requests for job ${jobEntity.id}: ${err.message}`, - ); - throw err; + } catch (error) { + this.logger.error('Error creating requests for job', { + error, + jobId: jobEntity.id, + }); + throw error; } } @@ -176,10 +180,13 @@ export class GCVContentModerationService implements IContentModeratorService { requests.map(async (requestEntity) => { try { await this.processSingleRequest(requestEntity); - } catch (err) { - this.logger.error( - `Error processing request ${requestEntity.id} (job ${jobEntity.id}): ${err.message}`, - ); + } catch (error) { + this.logger.error('Error processing moderation request', { + moderationRequestId: requestEntity.id, + jobId: jobEntity.id, + error, + }); + requestEntity.status = ContentModerationRequestStatus.FAILED; await this.contentModerationRequestRepository.updateOne( requestEntity, @@ -187,11 +194,13 @@ export class GCVContentModerationService implements IContentModeratorService { } }), ); - } catch (err) { - this.logger.error( - `Error processing requests for job ${jobEntity.id}: ${err.message}`, - ); - throw err; + } catch (error) { + this.logger.error('Error processing moderation requests', { + error, + jobId: jobEntity.id, + }); + + throw error; } } @@ -211,10 +220,13 @@ export class GCVContentModerationService implements IContentModeratorService { requests.map(async (requestEntity) => { try { await this.parseSingleRequest(requestEntity); - } catch (err) { - this.logger.error( - `Error parsing request ${requestEntity.id} for job ${jobEntity.id}: ${err.message}`, - ); + } catch (error) { + this.logger.error('Error parsing moderation request', { + moderationRequestId: requestEntity.id, + jobId: jobEntity.id, + error, + }); + requestEntity.status = ContentModerationRequestStatus.FAILED; await this.contentModerationRequestRepository.updateOne( requestEntity, @@ -222,11 +234,12 @@ export class GCVContentModerationService implements IContentModeratorService { } }), ); - } catch (err) { - this.logger.error( - `Error parsing results for job ${jobEntity.id}: ${err.message}`, - ); - throw err; + } catch (error) { + this.logger.error('Error parsing moderation results', { + jobId: jobEntity.id, + error, + }); + throw error; } } @@ -266,9 +279,12 @@ export class GCVContentModerationService implements IContentModeratorService { jobEntity.status = JobStatus.POSSIBLE_ABUSE_IN_REVIEW; await this.jobRepository.updateOne(jobEntity); } - } catch (err) { - this.logger.error(`Error finalizing job ${jobEntity.id}: ${err.message}`); - throw err; + } catch (error) { + this.logger.error('Error finalizing moderation job', { + jobId: jobEntity.id, + error, + }); + throw error; } } @@ -327,11 +343,11 @@ export class GCVContentModerationService implements IContentModeratorService { const [operation] = await this.visionClient.asyncBatchAnnotateImages(requestPayload); const [filesResponse] = await operation.promise(); - this.logger.log( - `Output written to GCS: ${filesResponse?.outputConfig?.gcsDestination?.uri}`, - ); + this.logger.debug('Output written to GCS', { + url: filesResponse?.outputConfig?.gcsDestination?.uri, + }); } catch (error) { - this.logger.error('Error analyzing images:', error); + this.logger.error('Error analyzing images', error); throw new Error(ErrorContentModeration.ContentModerationFailed); } } @@ -389,11 +405,11 @@ export class GCVContentModerationService implements IContentModeratorService { } } return this.categorizeModerationResults(allResponses); - } catch (err) { - if (err.message === ErrorContentModeration.NoResultsFound) { - throw err; + } catch (error) { + if (error.message === ErrorContentModeration.NoResultsFound) { + throw error; } - this.logger.error('Error collecting moderation results:', err); + this.logger.error('Error collecting moderation results', error); throw new Error(ErrorContentModeration.ResultsParsingFailed); } } diff --git a/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.spec.ts b/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.spec.ts index dd397c871f..82643408eb 100644 --- a/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.spec.ts +++ b/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.spec.ts @@ -1078,7 +1078,7 @@ describe('CronJobService', () => { }); }); - describe('syncJobStuses Cron Job', () => { + describe('syncJobStatuses Cron Job', () => { let cronJobEntityMock: Partial; let jobEntityMock: Partial; let escrowEventMock: Partial; @@ -1129,7 +1129,7 @@ describe('CronJobService', () => { const startCronJobMock = jest.spyOn(service, 'startCronJob'); - await service.syncJobStuses(); + await service.syncJobStatuses(); expect(startCronJobMock).not.toHaveBeenCalled(); }); @@ -1139,7 +1139,7 @@ describe('CronJobService', () => { .spyOn(service, 'startCronJob') .mockResolvedValueOnce(cronJobEntityMock as any); - await service.syncJobStuses(); + await service.syncJobStatuses(); expect(service.startCronJob).toHaveBeenCalledWith( CronJobType.SyncJobStatuses, @@ -1151,7 +1151,7 @@ describe('CronJobService', () => { .spyOn(jobRepository, 'findManyByChainIdsAndEscrowAddresses') .mockResolvedValueOnce([jobEntityMock as any]); - await service.syncJobStuses(); + await service.syncJobStatuses(); expect(EscrowUtils.getStatusEvents).toHaveBeenCalled(); expect( @@ -1174,9 +1174,13 @@ describe('CronJobService', () => { .spyOn(EscrowUtils, 'getStatusEvents') .mockRejectedValue(new Error('Test error')); - await service.syncJobStuses(); + await service.syncJobStatuses(); - expect(loggerErrorSpy).toHaveBeenCalledWith(expect.any(Error)); + expect(loggerErrorSpy).toHaveBeenCalledWith( + 'Error in syncJobStatuses cron job', + expect.any(Error), + ); + loggerErrorSpy.mockRestore(); }); it('should complete the cron job entity to unlock', async () => { @@ -1184,7 +1188,7 @@ describe('CronJobService', () => { .spyOn(service, 'completeCronJob') .mockResolvedValueOnce(cronJobEntityMock as any); - await service.syncJobStuses(); + await service.syncJobStatuses(); expect(service.completeCronJob).toHaveBeenCalledWith( cronJobEntityMock as any, diff --git a/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.ts b/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.ts index abfc46cea1..8e41a57729 100644 --- a/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.ts +++ b/packages/apps/job-launcher/server/src/modules/cron-job/cron-job.service.ts @@ -1,5 +1,4 @@ -import { Injectable, Logger } from '@nestjs/common'; -import { v4 as uuidv4 } from 'uuid'; +import { Injectable } from '@nestjs/common'; import { ErrorContentModeration, ErrorCronJob, @@ -30,10 +29,11 @@ import { WebhookRepository } from '../webhook/webhook.repository'; import { WebhookService } from '../webhook/webhook.service'; import { CronJobEntity } from './cron-job.entity'; import { CronJobRepository } from './cron-job.repository'; +import logger from '../../logger'; @Injectable() export class CronJobService { - private readonly logger = new Logger(CronJobService.name); + private readonly logger = logger.child({ context: CronJobService.name }); constructor( private readonly cronJobRepository: CronJobRepository, @@ -67,7 +67,7 @@ export class CronJobService { return false; } - this.logger.log('Previous cron job is not completed yet'); + this.logger.info('Previous cron job is not completed yet'); return true; } @@ -102,21 +102,20 @@ export class CronJobService { jobs.map(async (jobEntity) => { try { await this.contentModerationService.moderateJob(jobEntity); - } catch (err) { - const errorId = uuidv4(); - const failedReason = `${ErrorContentModeration.ResultsParsingFailed} (Error ID: ${errorId})`; - this.logger.error( - `Error parse job moderation results job. Error ID: ${errorId}, Job ID: ${jobEntity.id}, Reason: ${failedReason}, Message: ${err.message}`, - ); + } catch (error) { + this.logger.error('Error parse job moderation results job', { + jobId: jobEntity.id, + error, + }); await this.jobService.handleProcessJobFailure( jobEntity, - failedReason, + ErrorContentModeration.ResultsParsingFailed, ); } }), ); - } catch (err) { - this.logger.error(`Error in moderateContentCronJob: ${err.message}`); + } catch (error) { + this.logger.error('Error in moderateContentCronJob', error); } await this.completeCronJob(cronJobEntity); @@ -132,7 +131,7 @@ export class CronJobService { return; } - this.logger.log('Create escrow START'); + this.logger.info('Create escrow START'); const cronJob = await this.startCronJob(CronJobType.CreateEscrow); try { @@ -142,23 +141,22 @@ export class CronJobService { for (const jobEntity of jobEntities) { try { await this.jobService.createEscrow(jobEntity); - } catch (err) { - const errorId = uuidv4(); - const failedReason = `${ErrorEscrow.NotCreated} (Error ID: ${errorId})`; - this.logger.error( - `Error creating escrow. Error ID: ${errorId}, Job ID: ${jobEntity.id}, Reason: ${failedReason}, Message: ${err.message}`, - ); + } catch (error) { + this.logger.error('Error in moderateContentCronJob', { + jobId: jobEntity.id, + error, + }); await this.jobService.handleProcessJobFailure( jobEntity, - failedReason, + ErrorEscrow.NotCreated, ); } } - } catch (e) { - this.logger.error(e); + } catch (error) { + this.logger.error('Error in createEscrow cron job', error); } - this.logger.log('Create escrow STOP'); + this.logger.info('Create escrow STOP'); await this.completeCronJob(cronJob); } @@ -172,7 +170,7 @@ export class CronJobService { return; } - this.logger.log('Setup escrow START'); + this.logger.info('Setup escrow START'); const cronJob = await this.startCronJob(CronJobType.SetupEscrow); try { @@ -183,23 +181,22 @@ export class CronJobService { for (const jobEntity of jobEntities) { try { await this.jobService.setupEscrow(jobEntity); - } catch (err) { - const errorId = uuidv4(); - const failedReason = `${ErrorEscrow.NotSetup} (Error ID: ${errorId})`; - this.logger.error( - `Error setting up escrow. Error ID: ${errorId}, Job ID: ${jobEntity.id}, Reason: ${failedReason}, Message: ${err.message}`, - ); + } catch (error) { + this.logger.error('Error setting up escrow', { + jobId: jobEntity.id, + error, + }); await this.jobService.handleProcessJobFailure( jobEntity, - failedReason, + ErrorEscrow.NotSetup, ); } } - } catch (e) { - this.logger.error(e); + } catch (error) { + this.logger.error('Error in setupEscrow cron job', error); } - this.logger.log('Setup escrow STOP'); + this.logger.info('Setup escrow STOP'); await this.completeCronJob(cronJob); } @@ -213,7 +210,7 @@ export class CronJobService { return; } - this.logger.log('Fund escrow START'); + this.logger.info('Fund escrow START'); const cronJob = await this.startCronJob(CronJobType.FundEscrow); try { @@ -224,23 +221,22 @@ export class CronJobService { for (const jobEntity of jobEntities) { try { await this.jobService.fundEscrow(jobEntity); - } catch (err) { - const errorId = uuidv4(); - const failedReason = `${ErrorEscrow.NotFunded} (Error ID: ${errorId})`; - this.logger.error( - `Error funding escrow. Error ID: ${errorId}, Job ID: ${jobEntity.id}, Reason: ${failedReason}, Message: ${err.message}`, - ); + } catch (error) { + this.logger.error('Error funding escrow', { + jobId: jobEntity.id, + error, + }); await this.jobService.handleProcessJobFailure( jobEntity, - failedReason, + ErrorEscrow.NotFunded, ); } } - } catch (e) { - this.logger.error(e); + } catch (error) { + this.logger.error('Error in fundEscrow cron job', error); } - this.logger.log('Fund escrow STOP'); + this.logger.info('Fund escrow STOP'); await this.completeCronJob(cronJob); } @@ -254,7 +250,7 @@ export class CronJobService { return; } - this.logger.log('Cancel jobs START'); + this.logger.info('Cancel jobs START'); const cronJob = await this.startCronJob(CronJobType.CancelEscrow); try { @@ -304,23 +300,22 @@ export class CronJobService { }); await this.webhookRepository.createUnique(webhookEntity); } - } catch (err) { - const errorId = uuidv4(); - const failedReason = `${ErrorEscrow.NotCanceled} (Error ID: ${errorId})`; - this.logger.error( - `Error canceling escrow. Error ID: ${errorId}, Job ID: ${jobEntity.id}, Reason: ${failedReason}, Message: ${err.message}`, - ); + } catch (error) { + this.logger.error('Error canceling escrow', { + jobId: jobEntity.id, + error, + }); await this.jobService.handleProcessJobFailure( jobEntity, - failedReason, + ErrorEscrow.NotCanceled, ); } } - } catch (e) { - this.logger.error(e); + } catch (error) { + this.logger.error('Error in cancelEscrow cron job', error); } await this.completeCronJob(cronJob); - this.logger.log('Cancel jobs STOP'); + this.logger.info('Cancel jobs STOP'); return true; } @@ -338,7 +333,7 @@ export class CronJobService { return; } - this.logger.log('Pending webhooks START'); + this.logger.info('Pending webhooks START'); const cronJob = await this.startCronJob(CronJobType.ProcessPendingWebhook); try { @@ -350,19 +345,22 @@ export class CronJobService { for (const webhookEntity of webhookEntities) { try { await this.webhookService.sendWebhook(webhookEntity); - } catch (err) { - this.logger.error(`Error sending webhook: ${err.message}`); + } catch (error) { + this.logger.error('Error sending webhook', { + webhookId: webhookEntity.id, + error, + }); await this.webhookService.handleWebhookError(webhookEntity); continue; } webhookEntity.status = WebhookStatus.COMPLETED; await this.webhookRepository.updateOne(webhookEntity); } - } catch (e) { - this.logger.error(e); + } catch (error) { + this.logger.error('Error in processPendingWebhooks cron job', error); } - this.logger.log('Pending webhooks STOP'); + this.logger.info('Pending webhooks STOP'); await this.completeCronJob(cronJob); } @@ -378,7 +376,7 @@ export class CronJobService { return; } - this.logger.log('Abuse START'); + this.logger.info('Abuse START'); const cronJob = await this.startCronJob(CronJobType.Abuse); try { @@ -395,7 +393,9 @@ export class CronJobService { webhookEntity.escrowAddress, ); if (!jobEntity) { - this.logger.log(ErrorJob.NotFound, JobService.name); + this.logger.error('Job not found for webhook', { + webhookId: webhookEntity.id, + }); throw new NotFoundError(ErrorJob.NotFound); } if ( @@ -410,21 +410,23 @@ export class CronJobService { await this.jobRepository.updateOne(jobEntity); } await this.paymentService.createSlash(jobEntity); - } catch (err) { - this.logger.error( - `Error slashing escrow (address: ${webhookEntity.escrowAddress}, chainId: ${webhookEntity.chainId}: ${err.message}`, - ); + } catch (error) { + this.logger.error('Error slashing escrow', { + escrowAddress: webhookEntity.escrowAddress, + chainId: webhookEntity.chainId, + error, + }); await this.webhookService.handleWebhookError(webhookEntity); continue; } webhookEntity.status = WebhookStatus.COMPLETED; await this.webhookRepository.updateOne(webhookEntity); } - } catch (e) { - this.logger.error(e); + } catch (error) { + this.logger.error('Error in processAbuse cron job', error); } - this.logger.log('Abuse STOP'); + this.logger.info('Abuse STOP'); await this.completeCronJob(cronJob); } @@ -433,7 +435,7 @@ export class CronJobService { * @returns {Promise} - Returns a promise that resolves when the operation is complete. */ @Cron('30 */2 * * * *') - public async syncJobStuses(): Promise { + public async syncJobStatuses(): Promise { const lastCronJob = await this.cronJobRepository.findOneByType( CronJobType.SyncJobStatuses, ); @@ -442,7 +444,7 @@ export class CronJobService { return; } - this.logger.log('Update jobs START'); + this.logger.info('Update jobs START'); const cronJob = await this.startCronJob(CronJobType.SyncJobStatuses); try { @@ -469,7 +471,7 @@ export class CronJobService { } while (eventsBatch.length === 100); } if (events.length === 0) { - this.logger.log('No events to process'); + this.logger.info('No events to process for syncJobStatuses cron job'); await this.completeCronJob(cronJob); return; } @@ -535,11 +537,11 @@ export class CronJobService { cronJob.lastSubgraphTime = new Date(latestEventTimestamp + 1000); // Add one sec to avoid getting the last processed event await this.cronJobRepository.save(cronJob); } - } catch (e) { - this.logger.error(e); + } catch (error) { + this.logger.error('Error in syncJobStatuses cron job', error); } - this.logger.log('Update jobs STOP'); + this.logger.info('Update jobs STOP'); await this.completeCronJob(cronJob); } } diff --git a/packages/apps/job-launcher/server/src/modules/job/job.controller.spec.ts b/packages/apps/job-launcher/server/src/modules/job/job.controller.spec.ts index 3c33b1179f..36d1da5072 100644 --- a/packages/apps/job-launcher/server/src/modules/job/job.controller.spec.ts +++ b/packages/apps/job-launcher/server/src/modules/job/job.controller.spec.ts @@ -111,7 +111,7 @@ describe('JobController', () => { expect(result).toBe(1); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, MUTEX_TIMEOUT, expect.any(Function), ); @@ -176,7 +176,7 @@ describe('JobController', () => { ).rejects.toThrow('Unauthorized'); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, MUTEX_TIMEOUT, expect.any(Function), ); @@ -206,7 +206,7 @@ describe('JobController', () => { expect(result).toBe(1); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, expect.any(Number), expect.any(Function), ); @@ -227,7 +227,7 @@ describe('JobController', () => { ).rejects.toThrow(UnauthorizedException); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, expect.any(Number), expect.any(Function), ); @@ -244,7 +244,7 @@ describe('JobController', () => { ).rejects.toThrow(ConflictException); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, expect.any(Number), expect.any(Function), ); @@ -261,7 +261,7 @@ describe('JobController', () => { ).rejects.toThrow(BadRequestException); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, expect.any(Number), expect.any(Function), ); @@ -310,7 +310,7 @@ describe('JobController', () => { expect(result).toBe(1); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, expect.any(Number), expect.any(Function), ); @@ -331,7 +331,7 @@ describe('JobController', () => { ).rejects.toThrow(UnauthorizedException); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, expect.any(Number), expect.any(Function), ); @@ -348,7 +348,7 @@ describe('JobController', () => { ).rejects.toThrow(ConflictException); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, expect.any(Number), expect.any(Function), ); @@ -365,7 +365,7 @@ describe('JobController', () => { ).rejects.toThrow(BadRequestException); expect(mockMutexManagerService.runExclusive).toHaveBeenCalledWith( - { id: `user${mockRequest.user.id}` }, + `user${mockRequest.user.id}`, expect.any(Number), expect.any(Function), ); diff --git a/packages/apps/job-launcher/server/src/modules/job/job.controller.ts b/packages/apps/job-launcher/server/src/modules/job/job.controller.ts index 4b6034f1f8..c23e19395d 100644 --- a/packages/apps/job-launcher/server/src/modules/job/job.controller.ts +++ b/packages/apps/job-launcher/server/src/modules/job/job.controller.ts @@ -84,7 +84,7 @@ export class JobController { @Request() req: RequestWithUser, ): Promise { return await this.mutexManagerService.runExclusive( - { id: `user${req.user.id}` }, + `user${req.user.id}`, MUTEX_TIMEOUT, async () => { return await this.jobService.createJob( @@ -128,7 +128,7 @@ export class JobController { } return await this.mutexManagerService.runExclusive( - { id: `user${req.user.id}` }, + `user${req.user.id}`, MUTEX_TIMEOUT, async () => { return await this.jobService.createJob( @@ -168,7 +168,7 @@ export class JobController { @Request() req: RequestWithUser, ): Promise { return await this.mutexManagerService.runExclusive( - { id: `user${req.user.id}` }, + `user${req.user.id}`, MUTEX_TIMEOUT, async () => { return await this.jobService.createJob(req.user, data.type, data); @@ -204,7 +204,7 @@ export class JobController { @Request() req: RequestWithUser, ): Promise { return await this.mutexManagerService.runExclusive( - { id: `user${req.user.id}` }, + `user${req.user.id}`, MUTEX_TIMEOUT, async () => { return await this.jobService.createJob(req.user, data.type, data); @@ -243,7 +243,7 @@ export class JobController { // 'Hcaptcha jobs disabled temporally', // ); // return await this.mutexManagerService.runExclusive( - // { id: `user${req.user.id}` }, + // `user${req.user.id}`, // MUTEX_TIMEOUT, // async () => { // return await this.jobService.createJob( @@ -348,7 +348,7 @@ export class JobController { @Request() req: RequestWithUser, ): Promise { await this.mutexManagerService.runExclusive( - { id: `user${req.user.id}` }, + `user${req.user.id}`, MUTEX_TIMEOUT, async () => { return await this.jobService.requestToCancelJobByAddress( @@ -387,7 +387,7 @@ export class JobController { @Request() req: RequestWithUser, ): Promise { await this.mutexManagerService.runExclusive( - { id: `user${req.user.id}` }, + `user${req.user.id}`, MUTEX_TIMEOUT, async () => { return await this.jobService.requestToCancelJobById( diff --git a/packages/apps/job-launcher/server/src/modules/job/job.module.ts b/packages/apps/job-launcher/server/src/modules/job/job.module.ts index cdca136425..531a5e8beb 100644 --- a/packages/apps/job-launcher/server/src/modules/job/job.module.ts +++ b/packages/apps/job-launcher/server/src/modules/job/job.module.ts @@ -1,4 +1,4 @@ -import { Logger, Module } from '@nestjs/common'; +import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { ConfigModule } from '@nestjs/config'; @@ -35,7 +35,6 @@ import { ManifestModule } from '../manifest/manifest.module'; ], controllers: [JobController], providers: [ - Logger, JobService, JobRepository, WebhookRepository, diff --git a/packages/apps/job-launcher/server/src/modules/job/job.service.ts b/packages/apps/job-launcher/server/src/modules/job/job.service.ts index e18688b745..b619abbcb9 100644 --- a/packages/apps/job-launcher/server/src/modules/job/job.service.ts +++ b/packages/apps/job-launcher/server/src/modules/job/job.service.ts @@ -9,7 +9,7 @@ import { NETWORKS, StorageParams, } from '@human-protocol/sdk'; -import { Inject, Injectable, Logger } from '@nestjs/common'; +import { Inject, Injectable } from '@nestjs/common'; import { ModuleRef } from '@nestjs/core'; import { ValidationError as ClassValidationError, @@ -76,12 +76,15 @@ import { import { JobEntity } from './job.entity'; import { EscrowAction } from './job.interface'; import { JobRepository } from './job.repository'; +import logger from '../../logger'; + @Injectable() export class JobService { - public readonly logger = new Logger(JobService.name); + private readonly logger = logger.child({ context: JobService.name }); public readonly storageParams: StorageParams; public readonly bucket: string; private cronJobRepository: CronJobRepository; + constructor( @Inject(Web3Service) private readonly web3Service: Web3Service, @@ -583,11 +586,10 @@ export class JobService { } if (allFortuneValidationErrors.length > 0) { - this.logger.log( - ErrorJob.ResultValidationFailed, - JobService.name, - allFortuneValidationErrors, - ); + this.logger.error(ErrorJob.ResultValidationFailed, { + jobId: jobEntity.id, + validationErrors: allFortuneValidationErrors, + }); throw new ValidationError(ErrorJob.ResultValidationFailed); } return data; diff --git a/packages/apps/job-launcher/server/src/modules/manifest/manifest.service.ts b/packages/apps/job-launcher/server/src/modules/manifest/manifest.service.ts index 61836dde66..d497c898f2 100644 --- a/packages/apps/job-launcher/server/src/modules/manifest/manifest.service.ts +++ b/packages/apps/job-launcher/server/src/modules/manifest/manifest.service.ts @@ -8,7 +8,6 @@ import { import { ValidationError as ClassValidationError, Injectable, - Logger, } from '@nestjs/common'; import { validate } from 'class-validator'; import { ethers } from 'ethers'; @@ -74,7 +73,6 @@ import { @Injectable() export class ManifestService { - public readonly logger = new Logger(ManifestService.name); public readonly storageParams: StorageParams; public readonly bucket: string; diff --git a/packages/apps/job-launcher/server/src/modules/mutex/mutex-manager.service.spec.ts b/packages/apps/job-launcher/server/src/modules/mutex/mutex-manager.service.spec.ts index c41b3077be..d2c23877a4 100644 --- a/packages/apps/job-launcher/server/src/modules/mutex/mutex-manager.service.spec.ts +++ b/packages/apps/job-launcher/server/src/modules/mutex/mutex-manager.service.spec.ts @@ -22,7 +22,7 @@ describe('MutexManagerService', () => { let task1Executed = false; let task2Executed = false; - const userId = { id: 'user1' }; + const userId = 'user1'; const task1 = service.runExclusive(userId, timeout, async () => { await new Promise((resolve) => setTimeout(resolve, 100)); // Simulate async work @@ -41,7 +41,7 @@ describe('MutexManagerService', () => { }); it('should timeout if lock is not acquired in time', async () => { - const userId = { id: 'user2' }; + const userId = 'user2'; // Simulate a long async work to hold the lock service.runExclusive(userId, timeout, async () => { @@ -53,6 +53,6 @@ describe('MutexManagerService', () => { service.runExclusive(userId, timeout, async () => { await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate async work }), - ).rejects.toThrow('Function execution timed out for user2'); + ).rejects.toThrow('Function execution timed out for key'); }); }); diff --git a/packages/apps/job-launcher/server/src/modules/mutex/mutex-manager.service.ts b/packages/apps/job-launcher/server/src/modules/mutex/mutex-manager.service.ts index 159face8a5..30b0e50a76 100644 --- a/packages/apps/job-launcher/server/src/modules/mutex/mutex-manager.service.ts +++ b/packages/apps/job-launcher/server/src/modules/mutex/mutex-manager.service.ts @@ -1,15 +1,16 @@ -import { Injectable, Logger, OnModuleDestroy } from '@nestjs/common'; +import { Injectable, OnModuleDestroy } from '@nestjs/common'; import { E_TIMEOUT, Mutex, MutexInterface, withTimeout } from 'async-mutex'; import { ServerError } from '../../common/errors'; +import logger from '../../logger'; @Injectable() export class MutexManagerService implements OnModuleDestroy { - private mutexes: WeakMap = new WeakMap(); - private mutexTimeouts: Map = new Map(); + private mutexes: Map = new Map(); + private mutexTimeouts: Map = new Map(); private mutexTimeoutDuration = 120000; // 2 minutes - public readonly logger = new Logger(MutexManagerService.name); + private readonly logger = logger.child({ context: MutexManagerService.name }); - private getMutex(key: object, timeout: number): MutexInterface { + private getMutex(key: string, timeout: number): MutexInterface { if (!this.mutexes.has(key)) { const mutex: MutexInterface = withTimeout( new Mutex(), @@ -23,7 +24,7 @@ export class MutexManagerService implements OnModuleDestroy { return this.mutexes.get(key)!; } - private scheduleMutexCleanup(key: object): void { + private scheduleMutexCleanup(key: string): void { if (this.mutexTimeouts.has(key)) { clearTimeout(this.mutexTimeouts.get(key)); } @@ -34,47 +35,43 @@ export class MutexManagerService implements OnModuleDestroy { this.mutexTimeouts.set(key, timeout); } - private cleanupMutex(key: object): void { + private cleanupMutex(key: string): void { this.mutexes.delete(key); this.mutexTimeouts.delete(key); } async runExclusive( - key: object, + key: string, timeout: number, callback: () => Promise, ): Promise { const mutex = this.getMutex(key, timeout); try { - this.logger.log( - `Attempting to acquire lock for ${(key as any).id as string}...`, - ); + this.logger.debug('Attempting to acquire lock for key', { + key, + }); + const result = await mutex.runExclusive(async () => { - this.logger.log( - `Lock acquired for ${(key as any).id as string}, executing function...`, - ); - this.logger.log( - `Function executed for ${(key as any).id as string}, lock released.`, - ); + this.logger.debug('`Lock acquired for key', { + key, + }); return await callback(); }); + + this.logger.debug('Function executed for key, lock released', { + key, + }); + return result; } catch (e) { if (e === E_TIMEOUT) { - this.logger.error( - `Function execution timed out for ${(key as any).id as string}`, - ); - throw new Error( - `Function execution timed out for ${(key as any).id as string}`, - ); + const errorMessage = 'Function execution timed out for key'; + this.logger.error(errorMessage, { key }); + throw new Error(errorMessage); } - this.logger.error( - `Function execution failed for ${(key as any).id as string}`, - e, - ); - throw new ServerError( - `Function execution failed for ${(key as any).id as string}`, - ); + const errorMessage = 'Function execution failed for key'; + this.logger.error(errorMessage, { key }); + throw new ServerError(errorMessage); } } diff --git a/packages/apps/job-launcher/server/src/modules/payment/payment.service.ts b/packages/apps/job-launcher/server/src/modules/payment/payment.service.ts index 6454eef906..f8bd94c771 100644 --- a/packages/apps/job-launcher/server/src/modules/payment/payment.service.ts +++ b/packages/apps/job-launcher/server/src/modules/payment/payment.service.ts @@ -3,7 +3,7 @@ import { HMToken, HMToken__factory, } from '@human-protocol/core/typechain-types'; -import { Injectable, Logger } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { ethers, formatUnits } from 'ethers'; import { NetworkConfigService } from '../../common/config/network-config.service'; import { ServerConfigService } from '../../common/config/server-config.service'; @@ -46,10 +46,11 @@ import { RateService } from '../rate/rate.service'; import { UserEntity } from '../user/user.entity'; import { UserRepository } from '../user/user.repository'; import { PaymentProvider } from './providers/payment-provider.abstract'; +import logger from '../../logger'; @Injectable() export class PaymentService { - private readonly logger = new Logger(PaymentService.name); + private readonly logger = logger.child({ context: PaymentService.name }); constructor( private readonly networkConfigService: NetworkConfigService, @@ -79,7 +80,10 @@ export class PaymentService { const setup = await this.paymentProvider.retrieveCardSetup(data.setupId); if (!setup) { - this.logger.log(ErrorPayment.SetupNotFound, PaymentService.name); + this.logger.error(ErrorPayment.SetupNotFound, { + userId: user.id, + setupId: data.setupId, + }); throw new NotFoundError(ErrorPayment.SetupNotFound); } @@ -222,9 +226,14 @@ export class PaymentService { throw new ServerError(ErrorPayment.InvalidTransactionData); } - if ((await transaction.confirmations()) < TX_CONFIRMATION_TRESHOLD) { + const nConfirmations = await transaction.confirmations(); + if (nConfirmations < TX_CONFIRMATION_TRESHOLD) { this.logger.error( - `Transaction has ${transaction.confirmations} confirmations instead of ${TX_CONFIRMATION_TRESHOLD}`, + 'Number of confirmations for transaction is less than threshold', + { + nConfirmations, + threshold: TX_CONFIRMATION_TRESHOLD, + }, ); throw new ConflictError( ErrorPayment.TransactionHasNotEnoughAmountOfConfirmations, diff --git a/packages/apps/job-launcher/server/src/modules/payment/providers/payment-provider.abstract.ts b/packages/apps/job-launcher/server/src/modules/payment/providers/payment-provider.abstract.ts index 6adca84442..939a359b6e 100644 --- a/packages/apps/job-launcher/server/src/modules/payment/providers/payment-provider.abstract.ts +++ b/packages/apps/job-launcher/server/src/modules/payment/providers/payment-provider.abstract.ts @@ -1,3 +1,4 @@ +import { Injectable } from '@nestjs/common'; import { CardSetup, CustomerData, @@ -6,12 +7,9 @@ import { PaymentMethod, } from '../payment.interface'; import { BillingInfoDto } from '../payment.dto'; -import { Injectable, Logger } from '@nestjs/common'; @Injectable() export abstract class PaymentProvider { - protected readonly logger: Logger = new Logger(this.constructor.name); - /** * Create a new customer in the payment provider system * @param email Customer's email address diff --git a/packages/apps/job-launcher/server/src/modules/payment/providers/stripe/stripe.service.spec.ts b/packages/apps/job-launcher/server/src/modules/payment/providers/stripe/stripe.service.spec.ts index fed082f457..0d9c24098d 100644 --- a/packages/apps/job-launcher/server/src/modules/payment/providers/stripe/stripe.service.spec.ts +++ b/packages/apps/job-launcher/server/src/modules/payment/providers/stripe/stripe.service.spec.ts @@ -3,7 +3,6 @@ jest.mock('stripe'); import { faker } from '@faker-js/faker'; import { PaymentData } from '../../payment.interface'; import { Test, TestingModule } from '@nestjs/testing'; -import { Logger } from '@nestjs/common'; import { StripePaymentStatus, StripeService } from './stripe.service'; import { PaymentProviderConfigService } from '../../../../common/config/payment-provider-config.service'; import Stripe from 'stripe'; @@ -28,7 +27,6 @@ import { describe('StripeService', () => { let service: StripeService; let stripeMock: jest.Mocked; - let loggerSpy: jest.SpyInstance; const mockStripeConfigService = { secretKey: 'test_key', @@ -88,7 +86,6 @@ describe('StripeService', () => { } as unknown as jest.Mocked; (service as any).stripe = stripeMock; - loggerSpy = jest.spyOn(Logger.prototype, 'log'); }); afterEach(() => { @@ -121,7 +118,6 @@ describe('StripeService', () => { await expect(service.createCustomer(email)).rejects.toThrow( new ServerError(ErrorPayment.CustomerNotCreated), ); - expect(loggerSpy).toHaveBeenCalled(); }); }); diff --git a/packages/apps/job-launcher/server/src/modules/payment/providers/stripe/stripe.service.ts b/packages/apps/job-launcher/server/src/modules/payment/providers/stripe/stripe.service.ts index b40a39d655..894b73d0bc 100644 --- a/packages/apps/job-launcher/server/src/modules/payment/providers/stripe/stripe.service.ts +++ b/packages/apps/job-launcher/server/src/modules/payment/providers/stripe/stripe.service.ts @@ -14,6 +14,7 @@ import { } from '../../payment.interface'; import { PaymentProvider } from '../payment-provider.abstract'; import { AddressDto, BillingInfoDto } from '../../payment.dto'; +import logger from '../../../../logger'; export enum StripePaymentStatus { CANCELED = 'canceled', @@ -23,6 +24,7 @@ export enum StripePaymentStatus { @Injectable() export class StripeService extends PaymentProvider { + private readonly logger = logger.child({ context: StripeService.name }); private stripe: Stripe; constructor(private stripeConfigService: PaymentProviderConfigService) { @@ -43,7 +45,7 @@ export class StripeService extends PaymentProvider { const customer = await this.stripe.customers.create({ email }); return customer.id; } catch (error) { - this.logger.log(error.message, StripeService.name); + this.logger.error('Error while creating stripe customer', error); throw new ServerError(ErrorPayment.CustomerNotCreated); } } @@ -57,15 +59,17 @@ export class StripeService extends PaymentProvider { customer: customerId ?? undefined, }); } catch (error) { - this.logger.log(error.message, StripeService.name); + this.logger.error('Error while setting up card', { + customerId, + error, + }); throw new ServerError(ErrorPayment.CardNotAssigned); } if (!setupIntent?.client_secret) { - this.logger.log( - ErrorPayment.ClientSecretDoesNotExist, - StripeService.name, - ); + this.logger.error('ErrorPayment.ClientSecretDoesNotExist', { + customerId, + }); throw new ServerError(ErrorPayment.ClientSecretDoesNotExist); } @@ -335,7 +339,7 @@ export class StripeService extends PaymentProvider { ); return { - email: customer.email!, + email: customer.email as string, name: customer.name ?? undefined, address: customer.address ? { @@ -357,7 +361,7 @@ export class StripeService extends PaymentProvider { )) as Stripe.Customer; return { - email: customer.email!, + email: customer.email as string, name: customer.name ?? undefined, address: customer.address ? { diff --git a/packages/apps/job-launcher/server/src/modules/qualification/qualification.module.ts b/packages/apps/job-launcher/server/src/modules/qualification/qualification.module.ts index 934c00ee6b..c69913070f 100644 --- a/packages/apps/job-launcher/server/src/modules/qualification/qualification.module.ts +++ b/packages/apps/job-launcher/server/src/modules/qualification/qualification.module.ts @@ -1,4 +1,4 @@ -import { Logger, Module } from '@nestjs/common'; +import { Module } from '@nestjs/common'; import { ConfigModule } from '@nestjs/config'; import { QualificationService } from './qualification.service'; import { QualificationController } from './qualification.controller'; @@ -7,7 +7,7 @@ import { Web3Module } from '../web3/web3.module'; @Module({ imports: [ConfigModule, HttpModule, Web3Module], - providers: [Logger, QualificationService], + providers: [QualificationService], controllers: [QualificationController], exports: [QualificationService], }) diff --git a/packages/apps/job-launcher/server/src/modules/qualification/qualification.service.ts b/packages/apps/job-launcher/server/src/modules/qualification/qualification.service.ts index 00837e962a..a4867f8f31 100644 --- a/packages/apps/job-launcher/server/src/modules/qualification/qualification.service.ts +++ b/packages/apps/job-launcher/server/src/modules/qualification/qualification.service.ts @@ -1,16 +1,19 @@ import { ChainId, KVStoreKeys, KVStoreUtils } from '@human-protocol/sdk'; import { HttpService } from '@nestjs/axios'; -import { Injectable, Logger } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { firstValueFrom } from 'rxjs'; import { Web3ConfigService } from '../../common/config/web3-config.service'; import { ErrorQualification, ErrorWeb3 } from '../../common/constants/errors'; import { ServerError } from '../../common/errors'; import { Web3Service } from '../web3/web3.service'; import { QualificationDto } from './qualification.dto'; +import logger from '../../logger'; @Injectable() export class QualificationService { - private readonly logger = new Logger(QualificationService.name); + private readonly logger = logger.child({ + context: QualificationService.name, + }); constructor( private httpService: HttpService, @@ -46,7 +49,8 @@ export class QualificationService { return data; } catch (error) { this.logger.error( - `Error fetching qualifications from reputation oracle: ${error}`, + 'Error fetching qualifications from reputation oracle', + error, ); throw new ServerError(ErrorQualification.FailedToFetchQualifications); } diff --git a/packages/apps/job-launcher/server/src/modules/rate/rate.service.ts b/packages/apps/job-launcher/server/src/modules/rate/rate.service.ts index 8c5b008e62..97008852f4 100644 --- a/packages/apps/job-launcher/server/src/modules/rate/rate.service.ts +++ b/packages/apps/job-launcher/server/src/modules/rate/rate.service.ts @@ -1,5 +1,5 @@ import { HttpService } from '@nestjs/axios'; -import { Injectable, Logger } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { firstValueFrom } from 'rxjs'; import { ServerConfigService } from '../../common/config/server-config.service'; import { COINGECKO_API_URL } from '../../common/constants'; @@ -7,10 +7,11 @@ import { ErrorCurrency } from '../../common/constants/errors'; import { CoingeckoTokenId } from '../../common/constants/payment'; import { EscrowFundToken } from '../../common/enums/job'; import { NotFoundError } from '../../common/errors'; +import logger from '../../logger'; @Injectable() export class RateService { - public readonly logger = new Logger(RateService.name); + private readonly logger = logger.child({ context: RateService.name }); private cache: Map; constructor( @@ -76,7 +77,11 @@ export class RateService { return finalRate; } catch (error) { - this.logger.error(error); + this.logger.error('Error while getting rate', { + from, + to, + error, + }); throw new NotFoundError(ErrorCurrency.PairNotFound); } } diff --git a/packages/apps/job-launcher/server/src/modules/routing-protocol/routing-protocol.service.ts b/packages/apps/job-launcher/server/src/modules/routing-protocol/routing-protocol.service.ts index f57657182b..f32b1f2160 100644 --- a/packages/apps/job-launcher/server/src/modules/routing-protocol/routing-protocol.service.ts +++ b/packages/apps/job-launcher/server/src/modules/routing-protocol/routing-protocol.service.ts @@ -1,5 +1,5 @@ import { ChainId, Role } from '@human-protocol/sdk'; -import { Injectable, Logger } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { NetworkConfigService } from '../../common/config/network-config.service'; import { Web3ConfigService } from '../../common/config/web3-config.service'; import { ErrorRoutingProtocol } from '../../common/constants/errors'; @@ -26,7 +26,6 @@ type OracleValue = { @Injectable() export class RoutingProtocolService { - public readonly logger = new Logger(RoutingProtocolService.name); private readonly chains: ChainId[]; private readonly reputationOracles: string[]; private readonly chainPriorityOrder: number[]; diff --git a/packages/apps/job-launcher/server/src/modules/sendgrid/sendgrid.service.ts b/packages/apps/job-launcher/server/src/modules/sendgrid/sendgrid.service.ts index 5a5c9bd71f..a00bc46c59 100644 --- a/packages/apps/job-launcher/server/src/modules/sendgrid/sendgrid.service.ts +++ b/packages/apps/job-launcher/server/src/modules/sendgrid/sendgrid.service.ts @@ -1,4 +1,4 @@ -import { Injectable, Logger } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { MailDataRequired, MailService } from '@sendgrid/mail'; import { SendgridConfigService } from '../../common/config/sendgrid-config.service'; import { @@ -7,10 +7,11 @@ import { } from '../../common/constants'; import { ErrorSendGrid } from '../../common/constants/errors'; import { ConflictError, ServerError } from '../../common/errors'; +import logger from '../../logger'; @Injectable() export class SendGridService { - private readonly logger = new Logger(SendGridService.name); + private readonly logger = logger.child({ context: SendGridService.name }); private readonly defaultFromEmail: string; private readonly defaultFromName: string; @@ -44,7 +45,7 @@ export class SendGridService { }: Partial): Promise { try { if (this.sendgridConfigService.apiKey === SENDGRID_API_KEY_DISABLED) { - this.logger.debug(personalizations); + this.logger.debug('Sending email in dev mode', { personalizations }); return; } @@ -54,10 +55,12 @@ export class SendGridService { personalizations, ...emailData, }); - this.logger.log('Email sent successfully'); return; } catch (error) { - this.logger.error(error, SendGridService.name); + this.logger.error('Error while sending email', { + error, + templateId, + }); throw new ServerError(ErrorSendGrid.EmailNotSent); } } diff --git a/packages/apps/job-launcher/server/src/modules/user/user.module.ts b/packages/apps/job-launcher/server/src/modules/user/user.module.ts index 63814b47ae..65c7b47395 100644 --- a/packages/apps/job-launcher/server/src/modules/user/user.module.ts +++ b/packages/apps/job-launcher/server/src/modules/user/user.module.ts @@ -1,4 +1,4 @@ -import { Logger, Module, forwardRef } from '@nestjs/common'; +import { Module, forwardRef } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { ConfigModule } from '@nestjs/config'; @@ -15,7 +15,7 @@ import { AuthModule } from '../auth/auth.module'; PaymentModule, forwardRef(() => AuthModule), ], - providers: [Logger, UserService, UserRepository], + providers: [UserService, UserRepository], exports: [UserService], }) export class UserModule {} diff --git a/packages/apps/job-launcher/server/src/modules/web3/web3.service.ts b/packages/apps/job-launcher/server/src/modules/web3/web3.service.ts index b05e971802..26979e3338 100644 --- a/packages/apps/job-launcher/server/src/modules/web3/web3.service.ts +++ b/packages/apps/job-launcher/server/src/modules/web3/web3.service.ts @@ -1,15 +1,16 @@ import { ChainId, OperatorUtils, Role } from '@human-protocol/sdk'; -import { Injectable, Logger } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { Wallet, ethers } from 'ethers'; import { NetworkConfigService } from '../../common/config/network-config.service'; import { Web3ConfigService } from '../../common/config/web3-config.service'; import { ErrorWeb3 } from '../../common/constants/errors'; import { ConflictError, ValidationError } from '../../common/errors'; import { AvailableOraclesDto, OracleDataDto } from './web3.dto'; +import logger from '../../logger'; @Injectable() export class Web3Service { - public readonly logger = new Logger(Web3Service.name); + private readonly logger = logger.child({ context: Web3Service.name }); private signers: { [key: number]: Wallet } = {}; public readonly signerAddress: string; @@ -95,7 +96,12 @@ export class Web3Service { return filteredOracles; } catch (error) { - this.logger.error(`Error processing chainId ${chainId}:`, error); + this.logger.error('Error processing chainId', { + chainId, + jobType, + address, + error, + }); } return []; } @@ -139,9 +145,10 @@ export class Web3Service { ); if (!operator || !operator.reputationNetworks) { - this.logger.error( - `Operator or reputation networks not found for chain ${chainId}.`, - ); + this.logger.error('Operator or reputation networks not found for chain', { + chainId, + jobType, + }); return []; } @@ -158,10 +165,12 @@ export class Web3Service { ? networkOperator.address : null; } catch (error) { - this.logger.error( - `Failed to fetch operator for address ${address} on chain ${chainId}:`, + this.logger.error('Failed to fetch operator for address', { + chainId, + address, + jobType, error, - ); + }); return null; } }), diff --git a/packages/apps/job-launcher/server/src/modules/webhook/webhook.module.ts b/packages/apps/job-launcher/server/src/modules/webhook/webhook.module.ts index dab2beb310..4d3427fc10 100644 --- a/packages/apps/job-launcher/server/src/modules/webhook/webhook.module.ts +++ b/packages/apps/job-launcher/server/src/modules/webhook/webhook.module.ts @@ -1,4 +1,4 @@ -import { Logger, Module } from '@nestjs/common'; +import { Module } from '@nestjs/common'; import { TypeOrmModule } from '@nestjs/typeorm'; import { ConfigModule } from '@nestjs/config'; @@ -21,7 +21,7 @@ import { JobRepository } from '../job/job.repository'; HttpModule, ], controllers: [WebhookController], - providers: [Logger, WebhookService, WebhookRepository, JobRepository], + providers: [WebhookService, WebhookRepository, JobRepository], exports: [WebhookService], }) export class WebhookModule {} diff --git a/packages/apps/job-launcher/server/src/modules/webhook/webhook.repository.ts b/packages/apps/job-launcher/server/src/modules/webhook/webhook.repository.ts index 1c5fe17804..3be1173071 100644 --- a/packages/apps/job-launcher/server/src/modules/webhook/webhook.repository.ts +++ b/packages/apps/job-launcher/server/src/modules/webhook/webhook.repository.ts @@ -1,4 +1,4 @@ -import { Injectable, Logger } from '@nestjs/common'; +import { Injectable } from '@nestjs/common'; import { BaseRepository } from '../../database/base.repository'; import { DataSource, In, LessThanOrEqual } from 'typeorm'; @@ -8,10 +8,9 @@ import { WebhookEntity } from './webhook.entity'; @Injectable() export class WebhookRepository extends BaseRepository { - private readonly logger = new Logger(WebhookRepository.name); constructor( - private dataSource: DataSource, - public readonly serverConfigService: ServerConfigService, + dataSource: DataSource, + readonly serverConfigService: ServerConfigService, ) { super(WebhookEntity, dataSource); } diff --git a/packages/apps/job-launcher/server/src/modules/webhook/webhook.service.ts b/packages/apps/job-launcher/server/src/modules/webhook/webhook.service.ts index 4bb967ca39..dd76cd0a9b 100644 --- a/packages/apps/job-launcher/server/src/modules/webhook/webhook.service.ts +++ b/packages/apps/job-launcher/server/src/modules/webhook/webhook.service.ts @@ -6,7 +6,7 @@ import { KVStoreUtils, } from '@human-protocol/sdk'; import { HttpService } from '@nestjs/axios'; -import { Inject, Injectable, Logger } from '@nestjs/common'; +import { Inject, Injectable } from '@nestjs/common'; import { firstValueFrom } from 'rxjs'; import { ServerConfigService } from '../../common/config/server-config.service'; import { Web3ConfigService } from '../../common/config/web3-config.service'; @@ -23,10 +23,11 @@ import { Web3Service } from '../web3/web3.service'; import { WebhookDataDto } from './webhook.dto'; import { WebhookEntity } from './webhook.entity'; import { WebhookRepository } from './webhook.repository'; +import logger from '../../logger'; @Injectable() export class WebhookService { - private readonly logger = new Logger(WebhookService.name); + private readonly logger = logger.child({ context: WebhookService.name }); constructor( @Inject(Web3Service) @@ -85,6 +86,7 @@ export class WebhookService { } catch (error) { const formattedError = formatAxiosError(error); this.logger.error('Webhook not sent', { + webhookId: webhook.id, error: formattedError, }); throw new Error(formattedError.message); diff --git a/packages/apps/job-launcher/server/typeorm.config.ts b/packages/apps/job-launcher/server/typeorm.config.ts index 8f9702ab7b..d58d85e3e8 100644 --- a/packages/apps/job-launcher/server/typeorm.config.ts +++ b/packages/apps/job-launcher/server/typeorm.config.ts @@ -2,10 +2,13 @@ import { DataSource } from 'typeorm'; import { SnakeNamingStrategy } from 'typeorm-naming-strategies'; import * as dotenv from 'dotenv'; +import Environment from './src/common/utils/environment'; + dotenv.config({ - path: process.env.NODE_ENV - ? `.env.${process.env.NODE_ENV as string}` - : '.env', + /** + * First value wins if "override" option is not set + */ + path: [`.env.${Environment.name}`, '.env'], }); export default new DataSource({ diff --git a/packages/apps/reputation-oracle/server/Dockerfile b/packages/apps/reputation-oracle/server/Dockerfile index dff82f8a3e..ef91c55cd5 100644 --- a/packages/apps/reputation-oracle/server/Dockerfile +++ b/packages/apps/reputation-oracle/server/Dockerfile @@ -16,6 +16,7 @@ COPY ${APP_PATH}/package.json ./${APP_PATH}/ # so we need to copy and build them COPY packages/core ./packages/core COPY packages/sdk ./packages/sdk +COPY packages/libs ./packages/libs RUN yarn install diff --git a/packages/apps/reputation-oracle/server/package.json b/packages/apps/reputation-oracle/server/package.json index bbdecfb4fd..a1fb2f451c 100644 --- a/packages/apps/reputation-oracle/server/package.json +++ b/packages/apps/reputation-oracle/server/package.json @@ -29,6 +29,7 @@ }, "dependencies": { "@human-protocol/core": "workspace:*", + "@human-protocol/logger": "workspace:*", "@human-protocol/sdk": "workspace:*", "@nestjs/axios": "^3.1.3", "@nestjs/common": "^10.2.7", @@ -62,7 +63,6 @@ "passport": "^0.7.0", "passport-jwt": "^4.0.1", "pg": "8.13.1", - "pino": "^9.6.0", "reflect-metadata": "^0.2.2", "rxjs": "^7.2.0", "typeorm": "^0.3.16", @@ -91,7 +91,6 @@ "eslint-plugin-prettier": "^5.2.1", "jest": "29.7.0", "nock": "^14.0.3", - "pino-pretty": "^13.0.0", "prettier": "^3.4.2", "source-map-support": "^0.5.20", "supertest": "^7.0.0", diff --git a/packages/apps/reputation-oracle/server/src/common/constants/index.ts b/packages/apps/reputation-oracle/server/src/common/constants/index.ts index a2e57e2cc9..637d783de0 100644 --- a/packages/apps/reputation-oracle/server/src/common/constants/index.ts +++ b/packages/apps/reputation-oracle/server/src/common/constants/index.ts @@ -1,3 +1,4 @@ +export const SERVICE_NAME = 'reputation-oracle'; export const DATABASE_SCHEMA_NAME = 'hmt'; export const JWT_STRATEGY_NAME = 'jwt-http'; diff --git a/packages/apps/reputation-oracle/server/src/config/env-schema.ts b/packages/apps/reputation-oracle/server/src/config/env-schema.ts index fe23793630..8b3284f159 100644 --- a/packages/apps/reputation-oracle/server/src/config/env-schema.ts +++ b/packages/apps/reputation-oracle/server/src/config/env-schema.ts @@ -52,6 +52,7 @@ export const envValidator = Joi.object({ RPC_URL_POLYGON_AMOY: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_BSC_MAINNET: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_BSC_TESTNET: Joi.string().uri({ scheme: ['http', 'https'] }), + RPC_URL_AURORA_TESTNET: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_MOONBEAM: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_XLAYER_TESTNET: Joi.string().uri({ scheme: ['http', 'https'] }), RPC_URL_XLAYER: Joi.string().uri({ scheme: ['http', 'https'] }), diff --git a/packages/apps/reputation-oracle/server/src/config/web3-config.service.ts b/packages/apps/reputation-oracle/server/src/config/web3-config.service.ts index dbb40d55f4..edce855c26 100644 --- a/packages/apps/reputation-oracle/server/src/config/web3-config.service.ts +++ b/packages/apps/reputation-oracle/server/src/config/web3-config.service.ts @@ -62,6 +62,9 @@ export class Web3ConfigService { [ChainId.POLYGON_AMOY]: this.configService.get('RPC_URL_POLYGON_AMOY'), [ChainId.BSC_MAINNET]: this.configService.get('RPC_URL_BSC_MAINNET'), [ChainId.BSC_TESTNET]: this.configService.get('RPC_URL_BSC_TESTNET'), + [ChainId.AURORA_TESTNET]: this.configService.get( + 'RPC_URL_AURORA_TESTNET', + ), [ChainId.SEPOLIA]: this.configService.get('RPC_URL_SEPOLIA'), [ChainId.LOCALHOST]: this.configService.get('RPC_URL_LOCALHOST'), }; diff --git a/packages/apps/reputation-oracle/server/src/database/migrations/1750766313641-AddReasonToAbuse.ts b/packages/apps/reputation-oracle/server/src/database/migrations/1750766313641-AddReasonToAbuse.ts index da01de6e2f..bbc84f71cd 100644 --- a/packages/apps/reputation-oracle/server/src/database/migrations/1750766313641-AddReasonToAbuse.ts +++ b/packages/apps/reputation-oracle/server/src/database/migrations/1750766313641-AddReasonToAbuse.ts @@ -4,7 +4,9 @@ export class AddReasonToAbuse1750766313641 implements MigrationInterface { name = 'AddReasonToAbuse1750766313641'; public async up(queryRunner: QueryRunner): Promise { - await queryRunner.query(`ALTER TABLE "hmt"."abuses" ADD "reason" text NOT NULL`); + await queryRunner.query( + `ALTER TABLE "hmt"."abuses" ADD "reason" text NOT NULL`, + ); } public async down(queryRunner: QueryRunner): Promise { diff --git a/packages/apps/reputation-oracle/server/src/logger/README.md b/packages/apps/reputation-oracle/server/src/logger/README.md deleted file mode 100644 index 5a8c41198d..0000000000 --- a/packages/apps/reputation-oracle/server/src/logger/README.md +++ /dev/null @@ -1,86 +0,0 @@ -Custom logger implementation for use in Node.js HUMAN apps. - -Provides standartized API and writes logs in pre-defined JSON format: -```json -{ - "level": "debug", - "message": "Some info about error", - "timestamp": 1738937400037, - "error": { - "kind": "CustomError", - "message": "Message from custom error", - "stack": "CustomError: Message from custom error\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", - "customErrorProp": "error-detail-prop" - } - // ...merging meta -} -``` -:information_source: Error formatting is done only for error argument and "error" context property. - -Pretty-printing is enabled for local/development environment by default. - -### Usage examples -At the moment preferred underlying logger is `pino`. Corresponding file exports `createLogger` factory function that is used to create pre-configured default logger intance, that has service/app name and environment bound to all log messages. - -Import the pre-defined logger -```ts -import logger from '/logger'; -``` -then use it as per API contract: with log message first and any useful detail in log meta -:information_source: If meta is not a plain object and not an error - it is being logged as "meta" property -```ts -// to log simple message -logger.info('Info without any context'); - -// to log message with some context info -loger.info('New user registered', { - userAgent, - country, - ip, - email, -}); - -// to log error -logger.error('Something went wrong', error); - -// or error with some extra context -logger.error('Error updating some entity', { - error, - entityId: 42, - ...extra -}); - -// to log anything -logger.debug('Show me value', someValue); -``` - -If needed, you can create named logger -```ts -const utilsLogger = logger.child({ name: 'UtilsLogger' }) -// .... -utilsLogger.debug('input params', args); -/* -{ - "level": "debug", - "logger": "UtilsLogger", - "message": "input params", - "timestamp": 1738937400037 - ... -} -*/ -``` -or bind a "context" (or any other) prop to it -```ts -const contextLogger = logger.child({ context: 'SomeService' }) -// .... -contextLogger.info('Helpful info', context); -/* -{ - "level": "debug", - "context": "SomeService", - "message": "Helpful info", - "timestamp": 1738937400037, - ... -} -*/ -``` \ No newline at end of file diff --git a/packages/apps/reputation-oracle/server/src/logger/__mocks__/index.ts b/packages/apps/reputation-oracle/server/src/logger/__mocks__/index.ts index f4017058d8..bc3cb79069 100644 --- a/packages/apps/reputation-oracle/server/src/logger/__mocks__/index.ts +++ b/packages/apps/reputation-oracle/server/src/logger/__mocks__/index.ts @@ -1,4 +1,4 @@ -import { Logger } from '../types'; +import type { Logger } from '@human-protocol/logger'; const logger: Logger = { child: () => logger, diff --git a/packages/apps/reputation-oracle/server/src/logger/index.ts b/packages/apps/reputation-oracle/server/src/logger/index.ts index 4509f80573..fe8e9df382 100644 --- a/packages/apps/reputation-oracle/server/src/logger/index.ts +++ b/packages/apps/reputation-oracle/server/src/logger/index.ts @@ -1,6 +1,6 @@ -import { createLogger } from './pino-logger'; -import NestLogger from './nest-logger'; -import { LogLevel } from './types'; +import { createLogger, NestLogger, LogLevel } from '@human-protocol/logger'; + +import { SERVICE_NAME } from '../common/constants'; import Environment from '../utils/environment'; const isDevelopment = Environment.isDevelopment(); @@ -14,7 +14,7 @@ const defaultLogger = createLogger( }, { environment: Environment.name, - service: 'reputation-oracle', + service: SERVICE_NAME, }, ); diff --git a/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts b/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts index 847886401c..7fa5ece5c7 100644 --- a/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts +++ b/packages/apps/reputation-oracle/server/src/modules/web3/web3.service.ts @@ -10,6 +10,7 @@ export const supportedChainIdsByNetwork = { ChainId.POLYGON_AMOY, ChainId.BSC_TESTNET, ChainId.SEPOLIA, + ChainId.AURORA_TESTNET, ], [Web3Network.LOCAL]: [ChainId.LOCALHOST], } as const; diff --git a/packages/apps/staking/package.json b/packages/apps/staking/package.json index 57b96a50c5..0da86f96be 100644 --- a/packages/apps/staking/package.json +++ b/packages/apps/staking/package.json @@ -31,6 +31,7 @@ "@human-protocol/sdk": "*", "@mui/icons-material": "^7.0.1", "@mui/material": "^5.16.7", + "@mui/x-data-grid": "^8.7.0", "@tanstack/query-sync-storage-persister": "^5.68.0", "@tanstack/react-query": "^5.67.2", "@tanstack/react-query-persist-client": "^5.80.7", diff --git a/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/Icons/AuroraIcon.tsx b/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/Icons/AuroraIcon.tsx new file mode 100644 index 0000000000..1e8cf89d87 --- /dev/null +++ b/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/Icons/AuroraIcon.tsx @@ -0,0 +1,16 @@ +import type { FC } from 'react'; + +import SvgIcon, { type SvgIconProps } from '@mui/material/SvgIcon'; + +const AuroraIcon: FC = (props) => { + return ( + + + + ); +}; + +export default AuroraIcon; diff --git a/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/index.tsx b/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/index.tsx index 9e4b5be83d..559e895b2e 100644 --- a/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/index.tsx +++ b/packages/apps/staking/src/components/NetworkStatus/NetworkIcon/index.tsx @@ -5,6 +5,7 @@ import MoonbeamIcon from './Icons/MoonbeamIcon'; import MoonbaseAlphaIcon from './Icons/MoonbaseAlphaIcon'; import { XLayerIcon } from './Icons/XLayerIcon'; import { AvalancheIcon } from './Icons/AvalancheIcon'; +import AuroraIcon from './Icons/AuroraIcon'; export const NetworkIcon = ({ chainId }: { chainId?: number }) => { const icon = (() => { @@ -31,6 +32,8 @@ export const NetworkIcon = ({ chainId }: { chainId?: number }) => { case 43113: case 43114: return ; + case 1313161555: + return ; default: return ; } diff --git a/packages/apps/staking/src/constants/chains.ts b/packages/apps/staking/src/constants/chains.ts index 1c7e7cd18e..799732dc8f 100644 --- a/packages/apps/staking/src/constants/chains.ts +++ b/packages/apps/staking/src/constants/chains.ts @@ -18,6 +18,7 @@ switch (import.meta.env.VITE_APP_ENVIRONMENT.toLowerCase()) { ChainId.BSC_TESTNET, ChainId.POLYGON_AMOY, ChainId.SEPOLIA, + ChainId.AURORA_TESTNET, ]; break; case 'localhost': diff --git a/packages/apps/staking/src/providers/WagmiProvider.tsx b/packages/apps/staking/src/providers/WagmiProvider.tsx index b684251dc0..426d32f29c 100644 --- a/packages/apps/staking/src/providers/WagmiProvider.tsx +++ b/packages/apps/staking/src/providers/WagmiProvider.tsx @@ -13,12 +13,7 @@ const chainIdToChainMap: Record = { [wagmiChains.bscTestnet.id]: wagmiChains.bscTestnet, [wagmiChains.polygon.id]: wagmiChains.polygon, [wagmiChains.polygonAmoy.id]: wagmiChains.polygonAmoy, - [wagmiChains.moonbeam.id]: wagmiChains.moonbeam, - [wagmiChains.moonbaseAlpha.id]: wagmiChains.moonbaseAlpha, - [wagmiChains.avalanche.id]: wagmiChains.avalanche, - [wagmiChains.avalancheFuji.id]: wagmiChains.avalancheFuji, - [wagmiChains.xLayer.id]: wagmiChains.xLayer, - [wagmiChains.xLayerTestnet.id]: wagmiChains.xLayerTestnet, + [wagmiChains.auroraTestnet.id]: wagmiChains.auroraTestnet, [LOCALHOST.id]: LOCALHOST, }; diff --git a/packages/core/README.md b/packages/core/README.md index a64d0a5056..1a1d6cef77 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -211,7 +211,7 @@ yarn upgrade:proxy --network [NETWORK_NAME] 5. Verify the contract runing the following line: ```bash -yarn dlx hardhat verify --network [NETWORK_NAME] [CONTRACT_ADDRESS] +npx hardhat verify --network [NETWORK_NAME] [CONTRACT_ADDRESS] ``` ## Documentation diff --git a/packages/core/hardhat.config.ts b/packages/core/hardhat.config.ts index 4ed1881cbd..045a329124 100644 --- a/packages/core/hardhat.config.ts +++ b/packages/core/hardhat.config.ts @@ -114,61 +114,12 @@ const config: HardhatUserConfig = { process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], timeout: 2000000, }, - moonbeam: { - chainId: 1284, - timeout: 2000000, - url: process.env.ETH_MOONBEAM_URL || '', - accounts: - process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, - moonbaseAlpha: { - chainId: 1287, - timeout: 2000000, - url: process.env.ETH_MOONBASE_ALPHA_URL || '', - accounts: - process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, - avalancheFujiTestnet: { - chainId: 43113, - timeout: 2000000, - url: process.env.ETH_FUJI_URL || '', - accounts: - process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, - avalanche: { - chainId: 43114, - timeout: 2000000, - url: process.env.ETH_AVALANCHE_URL || '', - accounts: - process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, - alfajores: { - chainId: 44787, - timeout: 2000000, - url: process.env.ETH_CELO_ALFAJORES_URL || '', + auroraTestnet: { + chainId: 1313161555, + url: process.env.ETH_AURORA_TESTNET_URL || '', accounts: process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, - celo: { - chainId: 42220, timeout: 2000000, - url: process.env.ETH_CELO_URL || '', - accounts: - process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, - xlayer: { - chainId: 196, - timeout: 20000000, - url: process.env.ETH_XLAYER_URL || '', - accounts: - process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], - }, - xlayerTestnet: { - chainId: 195, - timeout: 20000000, - url: process.env.ETH_XLAYER_TESTNET_URL || '', - accounts: - process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], }, }, gasReporter: { @@ -220,32 +171,15 @@ const config: HardhatUserConfig = { polygonAmoy: process.env.POLYGONSCAN_API_KEY || '', bsc: process.env.BSC_API_KEY || '', bscTestnet: process.env.BSC_API_KEY || '', - moonbeam: process.env.MOONSCAN_API_KEY || '', - moonbaseAlpha: process.env.MOONSCAN_API_KEY || '', - avalancheFujiTestnet: process.env.AVALANCHE_API_KEY || '', - avalanche: process.env.AVALANCHE_API_KEY || '', - alfajores: process.env.CELOSCAN_API_KEY || '', - celo: process.env.CELOSCAN_API_KEY || '', - xlayer: process.env.OKLINK_API_KEY || '', - xlayerTestnet: process.env.OKLINK_API_KEY || '', + auroraTestnet: 'empty', }, customChains: [ { - network: 'xlayer', - chainId: 196, - urls: { - apiURL: - 'https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/XLAYER', - browserURL: 'https://www.oklink.com/xlayer', - }, - }, - { - network: 'xlayerTestnet', - chainId: 195, + network: 'auroraTestnet', + chainId: 1313161555, urls: { - apiURL: - 'https://www.oklink.com/api/v5/explorer/contract/verify-source-code-plugin/XLAYER_TESTNET', - browserURL: 'https://www.oklink.com/xlayer-test', + apiURL: 'https://explorer.testnet.aurora.dev/api', + browserURL: 'http://explorer.testnet.aurora.dev', }, }, ], diff --git a/packages/libs/logger/.prettierrc b/packages/libs/logger/.prettierrc new file mode 100644 index 0000000000..dcb72794f5 --- /dev/null +++ b/packages/libs/logger/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "trailingComma": "all" +} \ No newline at end of file diff --git a/packages/libs/logger/README.md b/packages/libs/logger/README.md new file mode 100644 index 0000000000..1091a928f5 --- /dev/null +++ b/packages/libs/logger/README.md @@ -0,0 +1,152 @@ +## HUMAN Protocol Node.js logger + +Custom logger implementation for use in Node.js HUMAN Protocol apps. + +Provides standartized API and writes logs in pre-defined JSON format: +```json +{ + "level": "debug", + "message": "Some info about error", + "timestamp": 1738937400037, + "error": { + "kind": "CustomError", + "message": "Message from custom error", + "stack": "CustomError: Message from custom error\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)", + "customErrorProp": "error-detail-prop" + } + // ...merging meta +} +``` + +## Logger initialization and usage + +### Pre-created logger instance +By defaul this library exports pre-created logger instance that you can start using immediately. This logger is pre-configured with: + - zero-bindings (only `name` is set up as `human-protocol-logger`) + - pretty-printing and structured log format + - has `debug` as its minimum level to log + +To use it: +```ts +import logger from '@human-protocol/logger'; + +logger.info('Some message', { some: 'extras' }); +``` +It's expected to be used only in dev environments, such as a developer toolbox, some local scripts and etc. + +### Create application logger with factory function + +Lib exports `createLogger` factory function that should be used to create a logger intance with proper bindings for application. Recommended bindings are at least `service` and `environment`, so that you can distinguish logs coming from different sources in your log-management system easilly. + +```ts +import { createLogger, LogLevel } from '@human-protocol/logger'; + +const ENV_NAME = process.NODE_ENV || 'development'; +const isDevelopment = ENV_NAME === 'development'; +const isTest = process.NODE_ENV === 'test' + +const defaultAppLogger = createLogger( + { + name: 'DefaultLogger', + level: isDevelopment ? LogLevel.DEBUG : LogLevel.INFO, + pretty: isDevelopment, + disabled: isTest, + }, + { + environment: ENV_NAME, + service: 'you-application-name', + }, +); + +export default defaultAppLogger; + +// import it somewehre in your app and use +import logger from '/logger'; + +logger.info('Some application log', { with: 'useful-context' }); +``` + +### Replacing default Nest.js logger +Once you have your application logger instance created, you can replace default Nest.js logger with it, so anything that comes from your appication follows the same format. This library provides a helper for that: + +```ts +import { NestLogger } from '@human-protocol/logger'; + +// initialize an overridden instance +export const nestLoggerOverride = new NestLogger( + defaultAppLogger.child({ name: 'NestLogger' }), +); + + +// init you Nest.js app with overriden instance +const app = await NestFactory.create(AppModule, { + logger: nestLoggerOverride, +}); + +// Logger is `nestLoggerOverride` now +import { Logger } from '@nestjs/common'; +``` + +## Usage examples +Logger has next API contract: log message first and any useful detail in log meta as a second argument. + +:information_source: If meta is not a plain object and not an error - it is being logged as "meta" property + +:information_source: Error formatting is done only for error argument and "error" context property. + +```ts +// to log simple message +logger.info('Info without any context'); + +// to log message with some context info +loger.info('New user registered', { + userAgent, + country, + ip, + email, +}); + +// to log an error +logger.error('Something went wrong', error); + +// or error with some extra context +logger.error('Error updating some entity', { + error, + entityId: 42, + ...extra +}); + +// to log anything +logger.debug('Show me value', someValue); +``` + +If needed, you can create a named logger +```ts +const utilsLogger = logger.child({ name: 'UtilsLogger' }) +// .... +utilsLogger.debug('input params', args); +/* +{ + "level": "debug", + "logger": "UtilsLogger", + "message": "input params", + "timestamp": 1738937400037 + ... +} +*/ +``` +or bind a "context" (or any other) prop to it +```ts +const contextLogger = logger.child({ context: 'SomeClassOrMethod' }) +// .... +contextLogger.info('Helpful info', context); +/* +{ + "level": "debug", + "context": "SomeClassOrMethod", + "message": "Helpful info", + "timestamp": 1738937400037, + ... +} +*/ +``` \ No newline at end of file diff --git a/packages/libs/logger/eslint.config.mjs b/packages/libs/logger/eslint.config.mjs new file mode 100644 index 0000000000..034ebf9082 --- /dev/null +++ b/packages/libs/logger/eslint.config.mjs @@ -0,0 +1,58 @@ +// @ts-check +import eslint from '@eslint/js'; +import globals from 'globals'; +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +import importPlugin from 'eslint-plugin-import'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + { + ignores: ['eslint.config.mjs', 'dist'], + }, + eslint.configs.recommended, + tseslint.configs.recommended, + eslintPluginPrettierRecommended, + { + languageOptions: { + globals: { + ...globals.node, + }, + ecmaVersion: 2022, + sourceType: 'module', + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + plugins: { + import: importPlugin, + }, + settings: { + 'import/resolver': { + typescript: {}, + }, + }, + rules: { + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/no-floating-promises': 'warn', + '@typescript-eslint/no-unsafe-argument': 'warn', + '@typescript-eslint/no-unused-vars': ['error', { + "args": "all", + "argsIgnorePattern": "^_", + "caughtErrors": "all", + "caughtErrorsIgnorePattern": "^noop", + "destructuredArrayIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "ignoreRestSiblings": true + }], + 'import/order': [ + 'warn', + { + alphabetize: { order: 'asc', caseInsensitive: true }, + 'newlines-between': 'always', + groups: ['builtin', 'external', 'internal', ['parent', 'sibling', 'index']], + }, + ], + }, + }, +); diff --git a/packages/libs/logger/package.json b/packages/libs/logger/package.json new file mode 100644 index 0000000000..a78ada3f4d --- /dev/null +++ b/packages/libs/logger/package.json @@ -0,0 +1,57 @@ +{ + "name": "@human-protocol/logger", + "version": "1.0.0", + "description": "Unified logging package for HUMAN Protocol", + "type": "commonjs", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist/**/*" + ], + "scripts": { + "clean": "tsc --build --clean && rm -rf ./dist", + "build": "tsc --build", + "lint": "eslint \"src/**/*.ts\" --fix", + "format": "prettier --write \"src/**/*.ts\"" + }, + "dependencies": { + "pino": "^9.7.0", + "pino-pretty": "^13.0.0" + }, + "devDependencies": { + "@eslint/js": "^9.30.1", + "@types/node": "^22.10.5", + "eslint": "^9.30.1", + "eslint-config-prettier": "^10.1.5", + "eslint-import-resolver-typescript": "^4.4.4", + "eslint-plugin-import": "^2.32.0", + "eslint-plugin-prettier": "^5.5.1", + "globals": "^16.3.0", + "prettier": "^3.4.2", + "typescript": "^5.8.3", + "typescript-eslint": "^8.35.1" + }, + "peerDependencies": { + "@nestjs/common": "^10.2.7" + }, + "engines": { + "node": ">=22" + }, + "repository": { + "type": "git", + "url": "https://github.com/humanprotocol/human-protocol.git", + "directory": "packages/libs/logger" + }, + "keywords": [ + "human-protocol", + "logger" + ], + "license": "MIT", + "lint-staged": { + "*.ts": [ + "prettier --write", + "eslint --fix" + ] + }, + "packageManager": "yarn@4.9.1" +} diff --git a/packages/apps/reputation-oracle/server/src/logger/abstract-logger.ts b/packages/libs/logger/src/abstract-logger.ts similarity index 100% rename from packages/apps/reputation-oracle/server/src/logger/abstract-logger.ts rename to packages/libs/logger/src/abstract-logger.ts diff --git a/packages/libs/logger/src/index.ts b/packages/libs/logger/src/index.ts new file mode 100644 index 0000000000..ab3a81d8ae --- /dev/null +++ b/packages/libs/logger/src/index.ts @@ -0,0 +1,9 @@ +import { createPinoLogger as createLogger } from './pino-logger'; + +export { default as NestLogger } from './nest-logger'; + +export { LogLevel } from './types'; +export type { Logger, LoggerFactory, LoggerFactoryOptions } from './types'; + +export { createLogger }; +export default createLogger({ name: 'human-protocol-logger', pretty: true }); diff --git a/packages/apps/reputation-oracle/server/src/logger/nest-logger.ts b/packages/libs/logger/src/nest-logger.ts similarity index 88% rename from packages/apps/reputation-oracle/server/src/logger/nest-logger.ts rename to packages/libs/logger/src/nest-logger.ts index a8347d52b7..ca29a041a3 100644 --- a/packages/apps/reputation-oracle/server/src/logger/nest-logger.ts +++ b/packages/libs/logger/src/nest-logger.ts @@ -1,14 +1,18 @@ -import { LoggerService } from '@nestjs/common'; +/* eslint-disable @typescript-eslint/no-explicit-any */ +import type { LoggerService } from '@nestjs/common'; + import { Logger, LogLevel, LogMeta } from './types'; class NestLogger implements LoggerService { constructor(private readonly loggerInstance: Logger) {} log(message: any, ...optionalParams: any[]) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument this.callLogger(LogLevel.INFO, message, ...optionalParams); } warn(message: any, ...optionalParams: any[]) { + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument this.callLogger(LogLevel.WARN, message, ...optionalParams); } @@ -47,6 +51,7 @@ class NestLogger implements LoggerService { } } + // eslint-disable-next-line @typescript-eslint/no-unsafe-argument this.callLogger(LogLevel.ERROR, _message, ..._optionalParams); } diff --git a/packages/apps/reputation-oracle/server/src/logger/pino-logger.ts b/packages/libs/logger/src/pino-logger.ts similarity index 89% rename from packages/apps/reputation-oracle/server/src/logger/pino-logger.ts rename to packages/libs/logger/src/pino-logger.ts index 09d0a055df..c7da8d5def 100644 --- a/packages/apps/reputation-oracle/server/src/logger/pino-logger.ts +++ b/packages/libs/logger/src/pino-logger.ts @@ -1,11 +1,12 @@ import pino from 'pino'; + import LoggerWrapper from './abstract-logger'; import { ChildBindings, LogMeta, Logger, LogLevel, - LoggerOptions, + LoggerFactory, LogRecord, } from './types'; @@ -35,13 +36,13 @@ export class WrappedPino extends LoggerWrapper { const pinoLogLevelFormatter = (label: string) => ({ level: label }); -export function createLogger( - { name, level, pretty, disabled }: LoggerOptions, +export const createPinoLogger: LoggerFactory = ( + { name, level, pretty, disabled }, bindings: LogMeta = {}, -): WrappedPino { +) => { const pinoLogger = pino({ base: null, - level: level || LogLevel.INFO, + level: level || LogLevel.DEBUG, enabled: disabled !== true, timestamp: false, formatters: { @@ -60,4 +61,4 @@ export function createLogger( }); return new WrappedPino(pinoLogger, { ...bindings, name }); -} +}; diff --git a/packages/apps/reputation-oracle/server/src/logger/types.ts b/packages/libs/logger/src/types.ts similarity index 83% rename from packages/apps/reputation-oracle/server/src/logger/types.ts rename to packages/libs/logger/src/types.ts index 4c5eb3fe1f..127d96eef4 100644 --- a/packages/apps/reputation-oracle/server/src/logger/types.ts +++ b/packages/libs/logger/src/types.ts @@ -30,9 +30,14 @@ export interface Logger { child: (bindings: ChildBindings) => Logger; } -export type LoggerOptions = { +export type LoggerFactoryOptions = { name?: string; pretty?: boolean; level?: `${LogLevel}`; disabled?: boolean; }; + +export type LoggerFactory = ( + optins: LoggerFactoryOptions, + bindings?: LogMeta, +) => Logger; diff --git a/packages/libs/logger/tsconfig.json b/packages/libs/logger/tsconfig.json new file mode 100644 index 0000000000..701e95b085 --- /dev/null +++ b/packages/libs/logger/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "es2022", + "lib": ["ES2022"], + "module": "node18", + "moduleResolution": "node16", + "rootDir": "./src", + "outDir": "./dist", + "declaration": true, + "declarationMap": true, + "sourceMap": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "types": ["node"], + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/constants.py b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/constants.py index a9433ff89a..8fdbc5de08 100644 --- a/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/constants.py +++ b/packages/sdk/python/human-protocol-sdk/human_protocol_sdk/constants.py @@ -11,6 +11,7 @@ class ChainId(Enum): BSC_TESTNET = 97 POLYGON = 137 POLYGON_AMOY = 80002 + AURORA_TESTNET = 1313161555 LOCALHOST = 1338 @@ -36,7 +37,7 @@ class OperatorCategory(Enum): "https://api.studio.thegraph.com/query/74256/ethereum/version/latest" ), "subgraph_url_api_key": ( - "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmUe2Zpp9uZmYRLsgiEJQA87CCna4ZaRGUiQ7cU1f58dVV" + "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmSxVvFd4STZkR9gwfuJ76YUpYGcWcBJ6Sm3kqBJHFdUw2" ), "hmt_address": "0xd1ba9BAC957322D6e8c07a160a3A8dA11A0d2867", "factory_address": "0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a", @@ -52,7 +53,7 @@ class OperatorCategory(Enum): "https://api.studio.thegraph.com/query/74256/sepolia/version/latest" ), "subgraph_url_api_key": ( - "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmbPBqzyRt3zAtF6BtY52P8wn7Gc3qdjWuKLHdargK8WZp" + "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmP3Ma4hZ6ZBxNTL2ip2BCkB33vMgRKRLpw74KcwZShzvk" ), "hmt_address": "0x792abbcC99c01dbDec49c9fa9A828a186Da45C33", "factory_address": "0x5987A5558d961ee674efe4A8c8eB7B1b5495D3bf", @@ -68,7 +69,7 @@ class OperatorCategory(Enum): "https://api.studio.thegraph.com/query/74256/bsc/version/latest" ), "subgraph_url_api_key": ( - "hthttps://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYP2yo1NGNWGf585uwyRifERv6ZJbJqse3q9Xv1izrR5D" + "hthttps://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmW54Mzx63QNVdvk2V9kRaoHicfeJFuDSt7xSGDHpZg9AW" ), "hmt_address": "0x711Fd6ab6d65A98904522d4e3586F492B989c527", "factory_address": "0x92FD968AcBd521c232f5fB8c33b342923cC72714", @@ -84,7 +85,7 @@ class OperatorCategory(Enum): "https://api.studio.thegraph.com/query/74256/bsc-testnet/version/latest" ), "subgraph_url_api_key": ( - "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmekNGfmcY6trj3m471kQLWg3YSKM7UaRJ3Ef3MBxWfu6o" + "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmWaq9orii1Xkw9uCVJ7akDnjY2fuewBRU5LiUKT12XVui" ), "hmt_address": "0xE3D74BBFa45B4bCa69FF28891fBE392f4B4d4e4d", "factory_address": "0x2bfA592DBDaF434DDcbb893B1916120d181DAD18", @@ -102,7 +103,7 @@ class OperatorCategory(Enum): "https://api.studio.thegraph.com/query/74256/polygon/version/latest" ), "subgraph_url_api_key": ( - "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmTv69h7rW9SMSfLJN4WHzMA4qYttX2GzzfM5Drey4mCRp" + "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmVmsQCdB3dGjt9tKG2Y96PRsHUCgGPK8oWtyVw8HMypTc" ), "hmt_address": "0xc748B2A084F8eFc47E086ccdDD9b7e67aEb571BF", "factory_address": "0xBDBfD2cC708199C5640C6ECdf3B0F4A4C67AdfcB", @@ -120,7 +121,7 @@ class OperatorCategory(Enum): "https://api.studio.thegraph.com/query/74256/amoy/version/latest" ), "subgraph_url_api_key": ( - "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmUe97VzETuP1zQ6oD2trtu9RvSxpRSUrv4uhF1y5dzQDN" + "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmPD243cnyp6ApUT2zpsNLKmtM75RLHNwUGT7NRTDds7QN" ), "hmt_address": "0x792abbcC99c01dbDec49c9fa9A828a186Da45C33", "factory_address": "0xAFf5a986A530ff839d49325A5dF69F96627E8D29", @@ -129,6 +130,22 @@ class OperatorCategory(Enum): "old_subgraph_url": "", "old_factory_address": "", }, + ChainId.AURORA_TESTNET: { + "title": "Aurora Testnet", + "scan_url": "https://testnet.aurorascan.dev", + "subgraph_url": ( + "https://api.studio.thegraph.com/query/74256/amoy/version/aurora-testnet" + ), + "subgraph_url_api_key": ( + "https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmVQuank2mwaZg3mcLUH15QEP8KaVS4NNsRaWxnq5mRWoo" + ), + "hmt_address": "0x792abbcC99c01dbDec49c9fa9A828a186Da45C33", + "factory_address": "0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940", + "staking_address": "0x7457d26a3C70Bd71F7557C773b303c1dB82BBB68", + "kvstore_address": "0xD6D347ba6987519B4e42EcED43dF98eFf5465a23", + "old_subgraph_url": "", + "old_factory_address": "", + }, ChainId.LOCALHOST: { "title": "Localhost", "scan_url": "", diff --git a/packages/sdk/typescript/human-protocol-sdk/package.json b/packages/sdk/typescript/human-protocol-sdk/package.json index e7015afc6f..8d91dedc23 100644 --- a/packages/sdk/typescript/human-protocol-sdk/package.json +++ b/packages/sdk/typescript/human-protocol-sdk/package.json @@ -53,7 +53,7 @@ "eslint": "^8.55.0", "prettier": "^3.4.2", "ts-node": "^10.9.2", - "typedoc": "^0.28.4", + "typedoc": "^0.28.7", "typedoc-plugin-markdown": "^4.2.3", "typescript": "^5.8.3" }, diff --git a/packages/sdk/typescript/human-protocol-sdk/src/constants.ts b/packages/sdk/typescript/human-protocol-sdk/src/constants.ts index 0351a400ae..1ee3cab49c 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/constants.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/constants.ts @@ -36,7 +36,7 @@ export const NETWORKS: { subgraphUrl: 'https://api.studio.thegraph.com/query/74256/ethereum/version/latest', subgraphUrlApiKey: - 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmUe2Zpp9uZmYRLsgiEJQA87CCna4ZaRGUiQ7cU1f58dVV', + 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmSxVvFd4STZkR9gwfuJ76YUpYGcWcBJ6Sm3kqBJHFdUw2', oldSubgraphUrl: '', oldFactoryAddress: '', }, @@ -51,7 +51,7 @@ export const NETWORKS: { subgraphUrl: 'https://api.studio.thegraph.com/query/74256/sepolia/version/latest', subgraphUrlApiKey: - 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmbPBqzyRt3zAtF6BtY52P8wn7Gc3qdjWuKLHdargK8WZp', + 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmP3Ma4hZ6ZBxNTL2ip2BCkB33vMgRKRLpw74KcwZShzvk', oldSubgraphUrl: '', oldFactoryAddress: '', }, @@ -66,7 +66,7 @@ export const NETWORKS: { subgraphUrl: 'https://api.studio.thegraph.com/query/74256/bsc/version/latest', subgraphUrlApiKey: - 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmYP2yo1NGNWGf585uwyRifERv6ZJbJqse3q9Xv1izrR5D', + 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmW54Mzx63QNVdvk2V9kRaoHicfeJFuDSt7xSGDHpZg9AW', oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsc', oldFactoryAddress: '0xc88bC422cAAb2ac8812de03176402dbcA09533f4', }, @@ -81,7 +81,7 @@ export const NETWORKS: { subgraphUrl: 'https://api.studio.thegraph.com/query/74256/bsc-testnet/version/latest', subgraphUrlApiKey: - 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmekNGfmcY6trj3m471kQLWg3YSKM7UaRJ3Ef3MBxWfu6o', + 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmWaq9orii1Xkw9uCVJ7akDnjY2fuewBRU5LiUKT12XVui', oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/bsctest', oldFactoryAddress: '0xaae6a2646c1f88763e62e0cd08ad050ea66ac46f', @@ -97,7 +97,7 @@ export const NETWORKS: { subgraphUrl: 'https://api.studio.thegraph.com/query/74256/polygon/version/latest', subgraphUrlApiKey: - 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmTv69h7rW9SMSfLJN4WHzMA4qYttX2GzzfM5Drey4mCRp', + 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmVmsQCdB3dGjt9tKG2Y96PRsHUCgGPK8oWtyVw8HMypTc', oldSubgraphUrl: 'https://api.thegraph.com/subgraphs/name/humanprotocol/polygon', oldFactoryAddress: '0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794', @@ -113,7 +113,22 @@ export const NETWORKS: { subgraphUrl: 'https://api.studio.thegraph.com/query/74256/amoy/version/latest', subgraphUrlApiKey: - 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmUe97VzETuP1zQ6oD2trtu9RvSxpRSUrv4uhF1y5dzQDN', + 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmPD243cnyp6ApUT2zpsNLKmtM75RLHNwUGT7NRTDds7QN', + oldSubgraphUrl: '', + oldFactoryAddress: '', + }, + [ChainId.AURORA_TESTNET]: { + chainId: ChainId.AURORA_TESTNET, + title: 'Aurora Testnet', + scanUrl: 'https://explorer.testnet.aurora.dev/', + factoryAddress: '0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940', + hmtAddress: '0x792abbcC99c01dbDec49c9fa9A828a186Da45C33', + stakingAddress: '0x7457d26a3C70Bd71F7557C773b303c1dB82BBB68', + kvstoreAddress: '0xD6D347ba6987519B4e42EcED43dF98eFf5465a23', + subgraphUrl: + 'https://api.studio.thegraph.com/query/74256/amoy/version/latest', + subgraphUrlApiKey: + 'https://gateway-arbitrum.network.thegraph.com/api/[SUBGRAPH_API_KEY]/deployments/id/QmVQuank2mwaZg3mcLUH15QEP8KaVS4NNsRaWxnq5mRWoo', oldSubgraphUrl: '', oldFactoryAddress: '', }, diff --git a/packages/sdk/typescript/human-protocol-sdk/src/enums.ts b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts index 951fa0d524..b45bec2725 100644 --- a/packages/sdk/typescript/human-protocol-sdk/src/enums.ts +++ b/packages/sdk/typescript/human-protocol-sdk/src/enums.ts @@ -6,6 +6,7 @@ export enum ChainId { BSC_TESTNET = 97, POLYGON = 137, POLYGON_AMOY = 80002, + AURORA_TESTNET = 1313161555, LOCALHOST = 1338, } diff --git a/packages/sdk/typescript/subgraph/config/amoy.json b/packages/sdk/typescript/subgraph/config/amoy.json index dfeb55c219..2253b3495f 100644 --- a/packages/sdk/typescript/subgraph/config/amoy.json +++ b/packages/sdk/typescript/subgraph/config/amoy.json @@ -25,10 +25,5 @@ "address": "0xffE496683F842a923110415b7278ded3F265f2C5", "startBlock": 14983952, "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - }, - "RewardPool": { - "address": "0xd866bCEFf6D0F77E1c3EAE28230AE6C79b03fDa7", - "startBlock": 5773007, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" } } diff --git a/packages/sdk/typescript/subgraph/config/aurora-testnet.json b/packages/sdk/typescript/subgraph/config/aurora-testnet.json new file mode 100644 index 0000000000..c7daff1f03 --- /dev/null +++ b/packages/sdk/typescript/subgraph/config/aurora-testnet.json @@ -0,0 +1,29 @@ +{ + "network": "aurora-testnet", + "description": "HUMAN subgraph on Aurora Testnet", + "EscrowFactory": { + "address": "0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940", + "startBlock": 201537646, + "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" + }, + "HMToken": { + "address": "0x792abbcC99c01dbDec49c9fa9A828a186Da45C33", + "startBlock": 201536119, + "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", + "totalSupply": "1000000000000000000000000000", + "contractDeployer": "0xF3D9a0ba9FA14273C515e519DFD0826Ff87d5164" + }, + "Escrow": { + "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" + }, + "KVStore": { + "address": "0xD6D347ba6987519B4e42EcED43dF98eFf5465a23", + "startBlock": 201537661, + "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" + }, + "Staking": { + "address": "0x7457d26a3C70Bd71F7557C773b303c1dB82BBB68", + "startBlock": 201537602, + "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" + } +} diff --git a/packages/sdk/typescript/subgraph/config/avalanche.json b/packages/sdk/typescript/subgraph/config/avalanche.json deleted file mode 100644 index 138de46970..0000000000 --- a/packages/sdk/typescript/subgraph/config/avalanche.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "network": "avalanche", - "description": "Human subgraph on Avalanche Mainnet", - "EscrowFactory": { - "address": "0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a", - "startBlock": 28745625, - "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" - }, - "HMToken": { - "address": "0x12365293cb6477d4fc2686e46bb97e3fb64f1550", - "startBlock": 20412574, - "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", - "totalSupply": "0", - "contractDeployer": "bridge" - }, - "Escrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" - }, - "Staking": { - "address": "0x05398211bA2046E296fBc9a9D3EB49e3F15C3123", - "startBlock": 36012046, - "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - }, - "KVStore": { - "address": "0x9Bc7bff35B2Be2413708d48c3B0aEF5c43646728", - "startBlock": 38431384, - "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" - }, - "RewardPool": { - "address": "0x4A5963Dd6792692e9147EdC7659936b96251917a", - "startBlock": 36026027, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, - "LegacyEscrowFactory": { - "address": "0x9767a578ba7a5FA1563c8229943cB01cd8446BB4", - "startBlock": 23168540, - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/EscrowFactory.json" - }, - "LegacyEscrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/Escrow.json" - } -} diff --git a/packages/sdk/typescript/subgraph/config/bsc-testnet.json b/packages/sdk/typescript/subgraph/config/bsc-testnet.json index dd113230df..aaf5db6347 100644 --- a/packages/sdk/typescript/subgraph/config/bsc-testnet.json +++ b/packages/sdk/typescript/subgraph/config/bsc-testnet.json @@ -26,11 +26,6 @@ "startBlock": 34883905, "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" }, - "RewardPool": { - "address": "0xB0A0500103eCEc431b73F6BAd923F0a2774E6e29", - "startBlock": 26716365, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, "LegacyEscrowFactory": { "address": "0xaae6a2646c1f88763e62e0cd08ad050ea66ac46f", "startBlock": 23632686, diff --git a/packages/sdk/typescript/subgraph/config/bsc.json b/packages/sdk/typescript/subgraph/config/bsc.json index 0b741f1819..cfbb32fd9b 100644 --- a/packages/sdk/typescript/subgraph/config/bsc.json +++ b/packages/sdk/typescript/subgraph/config/bsc.json @@ -26,11 +26,6 @@ "startBlock": 33941535, "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" }, - "RewardPool": { - "address": "0xf376443BCc6d4d4D63eeC086bc4A9E4a83878e0e", - "startBlock": 28745631, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, "LegacyEscrowFactory": { "address": "0xc88bC422cAAb2ac8812de03176402dbcA09533f4", "startBlock": 20689161, diff --git a/packages/sdk/typescript/subgraph/config/celo-alfajores.json b/packages/sdk/typescript/subgraph/config/celo-alfajores.json deleted file mode 100644 index 8cb88b0e7a..0000000000 --- a/packages/sdk/typescript/subgraph/config/celo-alfajores.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "network": "celo-alfajores", - "description": "Human subgraph on Celo Alfajores testnet", - "EscrowFactory": { - "address": "0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569", - "startBlock": 20484046, - "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" - }, - "HMToken": { - "address": "0x2736B33455A872dC478E1E004106D04c35472468", - "startBlock": 20484042, - "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", - "totalSupply": "1000000000000000000000000000", - "contractDeployer": "0xAceDcCb4D41F21c766ddd176d6d8DD48e9051234" - }, - "Escrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" - }, - "Staking": { - "address": "0x003548Df34be8836cF0F9673403a1E40ba449a0F", - "startBlock": 20484043, - "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - }, - "KVStore": { - "address": "0x938335006ea6F9Eb0e8020969cFF94404425e298", - "startBlock": 20484049, - "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" - }, - "RewardPool": { - "address": "0xA9545C2530BD5bdb464d5E274F59ACceAa73eD86", - "startBlock": 20484050, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, - "LegacyEscrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/Escrow.json" - } -} diff --git a/packages/sdk/typescript/subgraph/config/celo.json b/packages/sdk/typescript/subgraph/config/celo.json deleted file mode 100644 index 00f6953c92..0000000000 --- a/packages/sdk/typescript/subgraph/config/celo.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "network": "celo", - "description": "Human subgraph on Celo mainnet", - "EscrowFactory": { - "address": "0xc90B43a5d576D9d8026c48904dfbaED50C15Fa08", - "startBlock": 22219820, - "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" - }, - "HMToken": { - "address": "0x19Ead835951493A763c96910255d5eeF147E914F", - "startBlock": 22024713, - "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", - "totalSupply": "0", - "contractDeployer": "bridge" - }, - "Escrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" - }, - "Staking": { - "address": "0x34cD3Bd6B16c559f321799b516dE61E12017fFd1", - "startBlock": 22219818, - "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - }, - "KVStore": { - "address": "0x86Af9f6Cd34B69Db1B202223C6d6D109f2491569", - "startBlock": 22219821, - "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" - }, - "RewardPool": { - "address": "0xb9344bAD98E3d26a4d83900922baf395a2Ec154c", - "startBlock": 22219823, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, - "LegacyEscrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/Escrow.json" - } -} diff --git a/packages/sdk/typescript/subgraph/config/ethereum.json b/packages/sdk/typescript/subgraph/config/ethereum.json index 68a944588e..4cf773b86c 100644 --- a/packages/sdk/typescript/subgraph/config/ethereum.json +++ b/packages/sdk/typescript/subgraph/config/ethereum.json @@ -26,11 +26,6 @@ "startBlock": 21464165, "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" }, - "RewardPool": { - "address": "0x4A5963Dd6792692e9147EdC7659936b96251917a", - "startBlock": 16968283, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, "LegacyEscrowFactory": { "address": "0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a", "startBlock": 16924057, diff --git a/packages/sdk/typescript/subgraph/config/fuji.json b/packages/sdk/typescript/subgraph/config/fuji.json deleted file mode 100644 index 70fbdc6504..0000000000 --- a/packages/sdk/typescript/subgraph/config/fuji.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "network": "fuji", - "description": "Human subgraph on Avalanche testnet (Fuji C-Chain)", - "EscrowFactory": { - "address": "0x56C2ba540726ED4f46E7a134b6b9Ee9C867FcF92", - "startBlock": 26449198, - "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" - }, - "HMToken": { - "address": "0x9406d5c635AD22b0d76c75E52De57A2177919ca3", - "startBlock": 14935627, - "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", - "totalSupply": "1000000000000000000000000000", - "contractDeployer": "0x4c0e5f15b38bC8cfD90DDEa183C180cdCcAF7406" - }, - "Escrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" - }, - "Staking": { - "address": "0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940", - "startBlock": 37208323, - "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - }, - "KVStore": { - "address": "0x3aD4B091E054f192a822D1406f4535eAd38580e4", - "startBlock": 27495191, - "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" - }, - "RewardPool": { - "address": "0x5517fE916Fe9F8dB15B0DDc76ebDf0BdDCd4ed18", - "startBlock": 26449207, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, - "LegacyEscrowFactory": { - "address": "0xfb4469201951C3B9a7F1996c477cb7BDBEcE0A88", - "startBlock": 14957503, - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/EscrowFactory.json" - }, - "LegacyEscrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/Escrow.json" - } -} diff --git a/packages/sdk/typescript/subgraph/config/moonbase-alpha.json b/packages/sdk/typescript/subgraph/config/moonbase-alpha.json deleted file mode 100644 index 4f4e3c74bc..0000000000 --- a/packages/sdk/typescript/subgraph/config/moonbase-alpha.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "network": "mbase", - "description": "Human subgraph on Moonbase Alpha network", - "EscrowFactory": { - "address": "0x5e622FF522D81aa426f082bDD95210BC25fCA7Ed", - "startBlock": 3950929, - "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" - }, - "HMToken": { - "address": "0x2dd72db2bBA65cE663e476bA8b84A1aAF802A8e3", - "startBlock": 3950738, - "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", - "totalSupply": "1000000000000000000000000000", - "contractDeployer": "0xf183b3B34E70Dd17859455389A3aB54D49D41e6f" - }, - "Escrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" - }, - "Staking": { - "address": "0xbA537fEF2442cD48f60686FE1Bbbe40F964a7940", - "startBlock": 9962637, - "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - }, - "KVStore": { - "address": "0xcC561f4482f4Ff051D2Dcc65c2cE1A0f291bbA46", - "startBlock": 5431340, - "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" - }, - "RewardPool": { - "address": "0xf46B45Df3d956369726d8Bd93Ba33963Ab692920", - "startBlock": 3950931, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, - "LegacyEscrowFactory": { - "address": "0x24e587b36B5EF0202d665d94f08fc20Bd21D523b", - "startBlock": 4941034, - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/EscrowFactory.json" - }, - "LegacyEscrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/Escrow.json" - } -} diff --git a/packages/sdk/typescript/subgraph/config/moonbeam.json b/packages/sdk/typescript/subgraph/config/moonbeam.json deleted file mode 100644 index d0b80c9728..0000000000 --- a/packages/sdk/typescript/subgraph/config/moonbeam.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "network": "moonbeam", - "description": "Human subgraph on Moonbeam mainnet", - "EscrowFactory": { - "address": "0xD9c75a1Aa4237BB72a41E5E26bd8384f10c1f55a", - "startBlock": 2904819, - "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" - }, - "HMToken": { - "address": "0x3b25BC1dC591D24d60560d0135D6750A561D4764", - "startBlock": 1105853, - "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", - "totalSupply": "0", - "contractDeployer": "bridge" - }, - "Escrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" - }, - "Staking": { - "address": "0x05398211bA2046E296fBc9a9D3EB49e3F15C3123", - "startBlock": 2904815, - "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - }, - "KVStore": { - "address": "0x2B95bEcb6EBC4589f64CB000dFCF716b4aeF8aA6", - "startBlock": 4979685, - "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" - }, - "RewardPool": { - "address": "0x4A5963Dd6792692e9147EdC7659936b96251917a", - "startBlock": 2904825, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, - "LegacyEscrowFactory": { - "address": "0x98108c28B7767a52BE38B4860832dd4e11A7ecad", - "startBlock": 1145429, - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/EscrowFactory.json" - }, - "LegacyEscrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/Escrow.json" - } -} diff --git a/packages/sdk/typescript/subgraph/config/polygon.json b/packages/sdk/typescript/subgraph/config/polygon.json index 154eb00dbd..82ea7715ad 100644 --- a/packages/sdk/typescript/subgraph/config/polygon.json +++ b/packages/sdk/typescript/subgraph/config/polygon.json @@ -26,11 +26,6 @@ "startBlock": 50567977, "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" }, - "RewardPool": { - "address": "0x1371057BAec59944B924A7963F2EeCF43ff94CE4", - "startBlock": 43404740, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, "LegacyEscrowFactory": { "address": "0x45eBc3eAE6DA485097054ae10BA1A0f8e8c7f794", "startBlock": 25426566, diff --git a/packages/sdk/typescript/subgraph/config/sepolia.json b/packages/sdk/typescript/subgraph/config/sepolia.json index 77edb312d6..544eec59ef 100644 --- a/packages/sdk/typescript/subgraph/config/sepolia.json +++ b/packages/sdk/typescript/subgraph/config/sepolia.json @@ -26,11 +26,6 @@ "startBlock": 7062708, "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" }, - "RewardPool": { - "address": "0xAFf5a986A530ff839d49325A5dF69F96627E8D29", - "startBlock": 5716239, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, "LegacyEscrow": { "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/Escrow.json" } diff --git a/packages/sdk/typescript/subgraph/config/xlayer-testnet.json b/packages/sdk/typescript/subgraph/config/xlayer-testnet.json deleted file mode 100644 index 0368adab56..0000000000 --- a/packages/sdk/typescript/subgraph/config/xlayer-testnet.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "network": "xlayer-sepolia", - "description": "Human subgraph on X Layer testnet", - "EscrowFactory": { - "address": "0x6Cd3ecAD36ee88E9ef3665CF381D9dAE0FE0a32e", - "startBlock": 14184132, - "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" - }, - "HMToken": { - "address": "0x792abbcC99c01dbDec49c9fa9A828a186Da45C33", - "startBlock": 13484407, - "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", - "totalSupply": "1000000000000000000000000000", - "contractDeployer": "0xf3d9a0ba9fa14273c515e519dfd0826ff87d5164" - }, - "Escrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" - }, - "Staking": { - "address": "0xeF9849a904dF0d494D69ac0B0a6860a3A7936114", - "startBlock": 20427547, - "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - }, - "KVStore": { - "address": "0xdE8BE9E3C12E9F546309A429cd88d026a25EaF8C", - "startBlock": 14184135, - "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" - }, - "RewardPool": { - "address": "0x6daccd1f3a68945f8a7ac6d20260953f7a97fae4", - "startBlock": 14184141, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, - "LegacyEscrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/Escrow.json" - } -} diff --git a/packages/sdk/typescript/subgraph/config/xlayer.json b/packages/sdk/typescript/subgraph/config/xlayer.json deleted file mode 100644 index bea89ffa52..0000000000 --- a/packages/sdk/typescript/subgraph/config/xlayer.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "network": "xlayer-mainnet", - "description": "Human subgraph on XLayer Mainnet", - "EscrowFactory": { - "address": "0x4949C9DFFD83F0D5Ab0AB24C57C4D403D5c20C15", - "startBlock": 1125365, - "abi": "../../../../node_modules/@human-protocol/core/abis/EscrowFactory.json" - }, - "HMToken": { - "address": "0x10acbe3b9e6a2ff7f341e5cbf4b6617741ff44aa", - "startBlock": 363525, - "abi": "../../../../node_modules/@human-protocol/core/abis/HMToken.json", - "totalSupply": "0", - "contractDeployer": "bridge" - }, - "Escrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/Escrow.json" - }, - "KVStore": { - "address": "0x6512d894cc3d3FE93Da9d0420430136fA889FaB9", - "startBlock": 1125367, - "abi": "../../../../node_modules/@human-protocol/core/abis/KVStore.json" - }, - "Staking": { - "address": "0x01D115E9E8bF0C58318793624CC662a030D07F1D", - "startBlock": 1125356, - "abi": "../../../../node_modules/@human-protocol/core/abis/Staking.json" - }, - "RewardPool": { - "address": "0x7ABa5F75b2b530cB0c8927C86591c21dF44f06b6", - "startBlock": 1125372, - "abi": "../../../../node_modules/@human-protocol/core/abis/RewardPool.json" - }, - "LegacyEscrow": { - "abi": "../../../../node_modules/@human-protocol/core/abis/legacy/Escrow.json" - } -} diff --git a/packages/sdk/typescript/subgraph/src/mapping/utils/transaction.ts b/packages/sdk/typescript/subgraph/src/mapping/utils/transaction.ts index ecf759d749..7a1cc7571f 100644 --- a/packages/sdk/typescript/subgraph/src/mapping/utils/transaction.ts +++ b/packages/sdk/typescript/subgraph/src/mapping/utils/transaction.ts @@ -72,6 +72,7 @@ export function createTransaction( Address.fromBytes(transaction.to) == to ) { transaction.method = method; + transaction.from = from; transaction.value = value !== null ? value : BigInt.fromI32(0); transaction.token = token; transaction.escrow = escrow; diff --git a/yarn.lock b/yarn.lock index c858ad4df4..a9334c71b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2334,7 +2334,7 @@ __metadata: languageName: node linkType: hard -"@emnapi/core@npm:^1.4.0": +"@emnapi/core@npm:^1.4.0, @emnapi/core@npm:^1.4.3": version: 1.4.3 resolution: "@emnapi/core@npm:1.4.3" dependencies: @@ -2344,7 +2344,7 @@ __metadata: languageName: node linkType: hard -"@emnapi/runtime@npm:^1.4.0": +"@emnapi/runtime@npm:^1.4.0, @emnapi/runtime@npm:^1.4.3": version: 1.4.3 resolution: "@emnapi/runtime@npm:1.4.3" dependencies: @@ -2735,6 +2735,17 @@ __metadata: languageName: node linkType: hard +"@eslint/config-array@npm:^0.21.0": + version: 0.21.0 + resolution: "@eslint/config-array@npm:0.21.0" + dependencies: + "@eslint/object-schema": "npm:^2.1.6" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.2" + checksum: 10c0/0ea801139166c4aa56465b309af512ef9b2d3c68f9198751bbc3e21894fe70f25fbf26e1b0e9fffff41857bc21bfddeee58649ae6d79aadcd747db0c5dca771f + languageName: node + linkType: hard + "@eslint/config-helpers@npm:^0.2.1": version: 0.2.2 resolution: "@eslint/config-helpers@npm:0.2.2" @@ -2742,6 +2753,13 @@ __metadata: languageName: node linkType: hard +"@eslint/config-helpers@npm:^0.3.0": + version: 0.3.0 + resolution: "@eslint/config-helpers@npm:0.3.0" + checksum: 10c0/013ae7b189eeae8b30cc2ee87bc5c9c091a9cd615579003290eb28bebad5d78806a478e74ba10b3fe08ed66975b52af7d2cd4b4b43990376412b14e5664878c8 + languageName: node + linkType: hard + "@eslint/core@npm:^0.14.0": version: 0.14.0 resolution: "@eslint/core@npm:0.14.0" @@ -2799,6 +2817,13 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:9.30.1, @eslint/js@npm:^9.30.1": + version: 9.30.1 + resolution: "@eslint/js@npm:9.30.1" + checksum: 10c0/17fc382a0deafdb1cadac1269d9c2f2464f025bde6e4d12fc4f4775eb9886b41340d4650b72e85a53423644fdc89bf59c987a852f27379ad25feecf2c5bbc1c9 + languageName: node + linkType: hard + "@eslint/object-schema@npm:^2.1.6": version: 2.1.6 resolution: "@eslint/object-schema@npm:2.1.6" @@ -3372,16 +3397,16 @@ __metadata: languageName: node linkType: hard -"@gerrit0/mini-shiki@npm:^3.2.2": - version: 3.4.0 - resolution: "@gerrit0/mini-shiki@npm:3.4.0" +"@gerrit0/mini-shiki@npm:^3.7.0": + version: 3.7.0 + resolution: "@gerrit0/mini-shiki@npm:3.7.0" dependencies: - "@shikijs/engine-oniguruma": "npm:^3.4.0" - "@shikijs/langs": "npm:^3.4.0" - "@shikijs/themes": "npm:^3.4.0" - "@shikijs/types": "npm:^3.4.0" + "@shikijs/engine-oniguruma": "npm:^3.7.0" + "@shikijs/langs": "npm:^3.7.0" + "@shikijs/themes": "npm:^3.7.0" + "@shikijs/types": "npm:^3.7.0" "@shikijs/vscode-textmate": "npm:^10.0.2" - checksum: 10c0/8426cef64510e6174e010885a133cb2f5a2cd9fb2a033ea527d14e73ab5c03a5053ba87e7dcd4cfbfeab0bd22a69bb9354e9e15c83ea053f5590c369699bf4ef + checksum: 10c0/eb3f4900d841338077d839ebbc7f8722b13876a586cff7abc73295e956683724dd3371a9f990900184a2d069461965951b2604d677991badf3474262e7811384 languageName: node linkType: hard @@ -3921,12 +3946,12 @@ __metadata: "@emotion/styled": "npm:^11.11.5" "@eslint/js": "npm:^9.27.0" "@human-protocol/sdk": "workspace:*" - "@mui/icons-material": "npm:^7.0.1" - "@mui/material": "npm:^5.15.18" - "@mui/styled-engine-sc": "npm:6.4.0" - "@mui/system": "npm:^5.15.14" - "@mui/x-data-grid": "npm:^8.5.2" - "@mui/x-date-pickers": "npm:^7.23.6" + "@mui/icons-material": "npm:^7.2.0" + "@mui/material": "npm:^7.2.0" + "@mui/styled-engine-sc": "npm:7.2.0" + "@mui/system": "npm:^7.2.0" + "@mui/x-data-grid": "npm:^8.7.0" + "@mui/x-date-pickers": "npm:^8.7.0" "@tanstack/react-query": "npm:^5.67.2" "@types/react": "npm:^18.2.66" "@types/react-dom": "npm:^18.2.22" @@ -4372,7 +4397,6 @@ __metadata: vite: "npm:^6.2.4" vite-plugin-node-polyfills: "npm:^0.23.0" wagmi: "npm:^2.14.6" - web-vitals: "npm:^4.2.2" xml2js: "npm:^0.6.2" yup: "npm:^1.6.1" languageName: unknown @@ -4386,6 +4410,7 @@ __metadata: "@golevelup/ts-jest": "npm:^0.6.1" "@google-cloud/storage": "npm:^7.15.0" "@google-cloud/vision": "npm:^4.3.2" + "@human-protocol/logger": "workspace:*" "@human-protocol/sdk": "workspace:*" "@nestjs/axios": "npm:^3.1.2" "@nestjs/cli": "npm:^10.3.2" @@ -4451,6 +4476,28 @@ __metadata: languageName: unknown linkType: soft +"@human-protocol/logger@workspace:*, @human-protocol/logger@workspace:packages/libs/logger": + version: 0.0.0-use.local + resolution: "@human-protocol/logger@workspace:packages/libs/logger" + dependencies: + "@eslint/js": "npm:^9.30.1" + "@types/node": "npm:^22.10.5" + eslint: "npm:^9.30.1" + eslint-config-prettier: "npm:^10.1.5" + eslint-import-resolver-typescript: "npm:^4.4.4" + eslint-plugin-import: "npm:^2.32.0" + eslint-plugin-prettier: "npm:^5.5.1" + globals: "npm:^16.3.0" + pino: "npm:^9.7.0" + pino-pretty: "npm:^13.0.0" + prettier: "npm:^3.4.2" + typescript: "npm:^5.8.3" + typescript-eslint: "npm:^8.35.1" + peerDependencies: + "@nestjs/common": ^10.2.7 + languageName: unknown + linkType: soft + "@human-protocol/reputation-oracle@workspace:packages/apps/reputation-oracle/server": version: 0.0.0-use.local resolution: "@human-protocol/reputation-oracle@workspace:packages/apps/reputation-oracle/server" @@ -4458,6 +4505,7 @@ __metadata: "@faker-js/faker": "npm:^9.4.0" "@golevelup/ts-jest": "npm:^0.6.1" "@human-protocol/core": "workspace:*" + "@human-protocol/logger": "workspace:*" "@human-protocol/sdk": "workspace:*" "@nestjs/axios": "npm:^3.1.3" "@nestjs/cli": "npm:^10.3.2" @@ -4509,8 +4557,6 @@ __metadata: passport: "npm:^0.7.0" passport-jwt: "npm:^4.0.1" pg: "npm:8.13.1" - pino: "npm:^9.6.0" - pino-pretty: "npm:^13.0.0" prettier: "npm:^3.4.2" reflect-metadata: "npm:^0.2.2" rxjs: "npm:^7.2.0" @@ -4544,7 +4590,7 @@ __metadata: prettier: "npm:^3.4.2" secp256k1: "npm:^5.0.1" ts-node: "npm:^10.9.2" - typedoc: "npm:^0.28.4" + typedoc: "npm:^0.28.7" typedoc-plugin-markdown: "npm:^4.2.3" typescript: "npm:^5.8.3" vitest: "npm:^3.0.9" @@ -4558,6 +4604,7 @@ __metadata: "@human-protocol/sdk": "npm:*" "@mui/icons-material": "npm:^7.0.1" "@mui/material": "npm:^5.16.7" + "@mui/x-data-grid": "npm:^8.7.0" "@tanstack/query-sync-storage-persister": "npm:^5.68.0" "@tanstack/react-query": "npm:^5.67.2" "@tanstack/react-query-persist-client": "npm:^5.80.7" @@ -5660,6 +5707,13 @@ __metadata: languageName: node linkType: hard +"@mui/core-downloads-tracker@npm:^7.2.0": + version: 7.2.0 + resolution: "@mui/core-downloads-tracker@npm:7.2.0" + checksum: 10c0/f9e3dd760de2120bf26d957f2bc186caf03e9bc75e9888290549ee79686dbb650bfbbff4abf42628bdcbb0b40a9b311701bb665052b8956a55a7599349664ddb + languageName: node + linkType: hard + "@mui/icons-material@npm:^7.0.1": version: 7.1.0 resolution: "@mui/icons-material@npm:7.1.0" @@ -5676,6 +5730,22 @@ __metadata: languageName: node linkType: hard +"@mui/icons-material@npm:^7.2.0": + version: 7.2.0 + resolution: "@mui/icons-material@npm:7.2.0" + dependencies: + "@babel/runtime": "npm:^7.27.6" + peerDependencies: + "@mui/material": ^7.2.0 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/40943e3c69be132d9c9888388d0624d7d3ab6832a58e31cccbf1d7f2678cdfddf3d876fce7f059f45beaf15fe5f169dd9d2958e68b8b33c62598ba2741b65128 + languageName: node + linkType: hard + "@mui/lab@npm:^5.0.0-alpha.141": version: 5.0.0-alpha.176 resolution: "@mui/lab@npm:5.0.0-alpha.176" @@ -5705,7 +5775,7 @@ __metadata: languageName: node linkType: hard -"@mui/material@npm:^5.15.18, @mui/material@npm:^5.16.7": +"@mui/material@npm:^5.16.7": version: 5.17.1 resolution: "@mui/material@npm:5.17.1" dependencies: @@ -5738,6 +5808,42 @@ __metadata: languageName: node linkType: hard +"@mui/material@npm:^7.2.0": + version: 7.2.0 + resolution: "@mui/material@npm:7.2.0" + dependencies: + "@babel/runtime": "npm:^7.27.6" + "@mui/core-downloads-tracker": "npm:^7.2.0" + "@mui/system": "npm:^7.2.0" + "@mui/types": "npm:^7.4.4" + "@mui/utils": "npm:^7.2.0" + "@popperjs/core": "npm:^2.11.8" + "@types/react-transition-group": "npm:^4.4.12" + clsx: "npm:^2.1.1" + csstype: "npm:^3.1.3" + prop-types: "npm:^15.8.1" + react-is: "npm:^19.1.0" + react-transition-group: "npm:^4.4.5" + peerDependencies: + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@mui/material-pigment-css": ^7.2.0 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@mui/material-pigment-css": + optional: true + "@types/react": + optional: true + checksum: 10c0/56e1d76356b1a6a25ef2ba80448e117548612ddc796d5eb7704ae6308c1888df6378f4e61a63b7bbc15bf399dac0b85cc545619d0a4907a2a2fcff00361bd166 + languageName: node + linkType: hard + "@mui/private-theming@npm:^5.17.1": version: 5.17.1 resolution: "@mui/private-theming@npm:5.17.1" @@ -5755,18 +5861,35 @@ __metadata: languageName: node linkType: hard -"@mui/styled-engine-sc@npm:6.4.0": - version: 6.4.0 - resolution: "@mui/styled-engine-sc@npm:6.4.0" +"@mui/private-theming@npm:^7.2.0": + version: 7.2.0 + resolution: "@mui/private-theming@npm:7.2.0" dependencies: - "@babel/runtime": "npm:^7.26.0" + "@babel/runtime": "npm:^7.27.6" + "@mui/utils": "npm:^7.2.0" + prop-types: "npm:^15.8.1" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/902b34889487c622cf6e67bf102c4b8dbd888c941cbf829150cf81b4145adb50a3bb261a26539b89d5134c24fc5e1e344cfe1782c58085b77b7533889c589c9d + languageName: node + linkType: hard + +"@mui/styled-engine-sc@npm:7.2.0": + version: 7.2.0 + resolution: "@mui/styled-engine-sc@npm:7.2.0" + dependencies: + "@babel/runtime": "npm:^7.27.6" "@types/hoist-non-react-statics": "npm:^3.3.6" csstype: "npm:^3.1.3" hoist-non-react-statics: "npm:^3.3.2" prop-types: "npm:^15.8.1" peerDependencies: styled-components: ^6.0.0 - checksum: 10c0/25ff55ecc340e0524d00bce8a2bdd16bfc7ba8038d4a535303522191179d78f8947e9faf3c5852a992e251abc8cc8a160724601e23bad415980f10b0294d6bb9 + checksum: 10c0/3baa8e92160215a11d9e86b1cc9f1a898dc24179bfd106bc0976c3893682793f9d5a0db3d4903c4690c3c564cba0c3ee78b4e67d26bd34a817b66916799ca150 languageName: node linkType: hard @@ -5791,6 +5914,29 @@ __metadata: languageName: node linkType: hard +"@mui/styled-engine@npm:^7.2.0": + version: 7.2.0 + resolution: "@mui/styled-engine@npm:7.2.0" + dependencies: + "@babel/runtime": "npm:^7.27.6" + "@emotion/cache": "npm:^11.14.0" + "@emotion/serialize": "npm:^1.3.3" + "@emotion/sheet": "npm:^1.4.0" + csstype: "npm:^3.1.3" + prop-types: "npm:^15.8.1" + peerDependencies: + "@emotion/react": ^11.4.1 + "@emotion/styled": ^11.3.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + checksum: 10c0/d9b6d688f0505a8b877a16cfd43b6f554d77ed1ec481243a8fe154c042c37ce8edc42449cd5e6509329273450f809a88f8a4b248267e377b87db51fd0c496330 + languageName: node + linkType: hard + "@mui/system@npm:^5.15.14, @mui/system@npm:^5.17.1": version: 5.17.1 resolution: "@mui/system@npm:5.17.1" @@ -5819,6 +5965,34 @@ __metadata: languageName: node linkType: hard +"@mui/system@npm:^7.2.0": + version: 7.2.0 + resolution: "@mui/system@npm:7.2.0" + dependencies: + "@babel/runtime": "npm:^7.27.6" + "@mui/private-theming": "npm:^7.2.0" + "@mui/styled-engine": "npm:^7.2.0" + "@mui/types": "npm:^7.4.4" + "@mui/utils": "npm:^7.2.0" + clsx: "npm:^2.1.1" + csstype: "npm:^3.1.3" + prop-types: "npm:^15.8.1" + peerDependencies: + "@emotion/react": ^11.5.0 + "@emotion/styled": ^11.3.0 + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + "@types/react": + optional: true + checksum: 10c0/5ae7da82dad8a72fe20994d21e949c3d74b9de4158511580a2fde4db4ea4ebc7b12f61a73c0df862b7154714a095b84e51defbb898688e08a46e1702706d5b6d + languageName: node + linkType: hard + "@mui/types@npm:^7.4.2": version: 7.4.2 resolution: "@mui/types@npm:7.4.2" @@ -5847,6 +6021,20 @@ __metadata: languageName: node linkType: hard +"@mui/types@npm:^7.4.4": + version: 7.4.4 + resolution: "@mui/types@npm:7.4.4" + dependencies: + "@babel/runtime": "npm:^7.27.6" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/50987623c477a55eaccc11bb0fe651df99e14b4a8bc29a53c493bce7d8b41529c7e7c8c8d3f55d2539db5531e7b4eff9feb93c73134947f465fc41efc43556c2 + languageName: node + linkType: hard + "@mui/types@npm:~7.2.15": version: 7.2.24 resolution: "@mui/types@npm:7.2.24" @@ -5919,13 +6107,33 @@ __metadata: languageName: node linkType: hard -"@mui/x-data-grid@npm:^8.5.2": - version: 8.5.2 - resolution: "@mui/x-data-grid@npm:8.5.2" +"@mui/utils@npm:^7.2.0": + version: 7.2.0 + resolution: "@mui/utils@npm:7.2.0" + dependencies: + "@babel/runtime": "npm:^7.27.6" + "@mui/types": "npm:^7.4.4" + "@types/prop-types": "npm:^15.7.15" + clsx: "npm:^2.1.1" + prop-types: "npm:^15.8.1" + react-is: "npm:^19.1.0" + peerDependencies: + "@types/react": ^17.0.0 || ^18.0.0 || ^19.0.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@types/react": + optional: true + checksum: 10c0/e1b49f3c9e822d51ba12c7ba16b4efdf5bcbc59ea5f980da331864330425dace49922206f2ff354c925332fe5cc7bfd8d1bcb9d546a68edc21d7f1e95124ace6 + languageName: node + linkType: hard + +"@mui/x-data-grid@npm:^8.7.0": + version: 8.7.0 + resolution: "@mui/x-data-grid@npm:8.7.0" dependencies: "@babel/runtime": "npm:^7.27.6" "@mui/utils": "npm:^7.1.1" - "@mui/x-internals": "npm:8.5.2" + "@mui/x-internals": "npm:8.7.0" clsx: "npm:^2.1.1" prop-types: "npm:^15.8.1" use-sync-external-store: "npm:^1.5.0" @@ -5941,7 +6149,7 @@ __metadata: optional: true "@emotion/styled": optional: true - checksum: 10c0/deb5e7e1f9391b92d85acdb39eb1bc0fd85cbad748be839b132b62dedd3fcce5aae1919b4630a76f156ebcbd8402114feff97b6cc118f484883d722d31976b47 + checksum: 10c0/cb77a88b336a4809dcec2e1f0252700eb8467913eb19adea32b6c65c0a0f3ac68311d82f4f83f8ef6269d2e90ddd83518c378cfcb8f1a45dfc7d59fd2a749fe9 languageName: node linkType: hard @@ -5993,6 +6201,54 @@ __metadata: languageName: node linkType: hard +"@mui/x-date-pickers@npm:^8.7.0": + version: 8.7.0 + resolution: "@mui/x-date-pickers@npm:8.7.0" + dependencies: + "@babel/runtime": "npm:^7.27.6" + "@mui/utils": "npm:^7.1.1" + "@mui/x-internals": "npm:8.7.0" + "@types/react-transition-group": "npm:^4.4.12" + clsx: "npm:^2.1.1" + prop-types: "npm:^15.8.1" + react-transition-group: "npm:^4.4.5" + peerDependencies: + "@emotion/react": ^11.9.0 + "@emotion/styled": ^11.8.1 + "@mui/material": ^5.15.14 || ^6.0.0 || ^7.0.0 + "@mui/system": ^5.15.14 || ^6.0.0 || ^7.0.0 + date-fns: ^2.25.0 || ^3.2.0 || ^4.0.0 + date-fns-jalali: ^2.13.0-0 || ^3.2.0-0 || ^4.0.0-0 + dayjs: ^1.10.7 + luxon: ^3.0.2 + moment: ^2.29.4 + moment-hijri: ^2.1.2 || ^3.0.0 + moment-jalaali: ^0.7.4 || ^0.8.0 || ^0.9.0 || ^0.10.0 + react: ^17.0.0 || ^18.0.0 || ^19.0.0 + react-dom: ^17.0.0 || ^18.0.0 || ^19.0.0 + peerDependenciesMeta: + "@emotion/react": + optional: true + "@emotion/styled": + optional: true + date-fns: + optional: true + date-fns-jalali: + optional: true + dayjs: + optional: true + luxon: + optional: true + moment: + optional: true + moment-hijri: + optional: true + moment-jalaali: + optional: true + checksum: 10c0/964b2ab033b50925536319e67512055ae496631595de3cf488b37cc1d44c7f962645eae7942589c4817d8e82fa35fd819cae62108b4902cb916e8315774ce966 + languageName: node + linkType: hard + "@mui/x-internals@npm:7.29.0": version: 7.29.0 resolution: "@mui/x-internals@npm:7.29.0" @@ -6005,9 +6261,9 @@ __metadata: languageName: node linkType: hard -"@mui/x-internals@npm:8.5.2": - version: 8.5.2 - resolution: "@mui/x-internals@npm:8.5.2" +"@mui/x-internals@npm:8.7.0": + version: 8.7.0 + resolution: "@mui/x-internals@npm:8.7.0" dependencies: "@babel/runtime": "npm:^7.27.6" "@mui/utils": "npm:^7.1.1" @@ -6015,7 +6271,7 @@ __metadata: peerDependencies: "@mui/system": ^5.15.14 || ^6.0.0 || ^7.0.0 react: ^17.0.0 || ^18.0.0 || ^19.0.0 - checksum: 10c0/03d2105d82624b0064c618a6bfc289c124f7fd8bff2f11fe5ceb9504514fb4cf59be906b5649b3537f21b86c54dbcbf4406e55d529a8a399d9fbc510f3bd2bf9 + checksum: 10c0/c3fab5603a046db85f739195576de4581cf9afed7c6b299322b6745ad9336534afb1e62e8fa9fc5a37e1e9eee942b51c7bccf2ccecf591efa27650a513071eed languageName: node linkType: hard @@ -6057,6 +6313,17 @@ __metadata: languageName: node linkType: hard +"@napi-rs/wasm-runtime@npm:^0.2.11": + version: 0.2.11 + resolution: "@napi-rs/wasm-runtime@npm:0.2.11" + dependencies: + "@emnapi/core": "npm:^1.4.3" + "@emnapi/runtime": "npm:^1.4.3" + "@tybys/wasm-util": "npm:^0.9.0" + checksum: 10c0/049bd14c58b99fbe0967b95e9921c5503df196b59be22948d2155f17652eb305cff6728efd8685338b855da7e476dd2551fbe3a313fc2d810938f0717478441e + languageName: node + linkType: hard + "@napi-rs/wasm-runtime@npm:^0.2.9": version: 0.2.9 resolution: "@napi-rs/wasm-runtime@npm:0.2.9" @@ -8440,41 +8707,41 @@ __metadata: languageName: node linkType: hard -"@shikijs/engine-oniguruma@npm:^3.4.0": - version: 3.4.0 - resolution: "@shikijs/engine-oniguruma@npm:3.4.0" +"@shikijs/engine-oniguruma@npm:^3.7.0": + version: 3.7.0 + resolution: "@shikijs/engine-oniguruma@npm:3.7.0" dependencies: - "@shikijs/types": "npm:3.4.0" + "@shikijs/types": "npm:3.7.0" "@shikijs/vscode-textmate": "npm:^10.0.2" - checksum: 10c0/7a8b6c5ad27e28e7483df5cb939963571bb7df90a77b571c654d3de0ae3678d37d6b0bf5f77ecdf9ecbc6a2dbccc32719f96ced0d303561c4d945c7ac642bf29 + checksum: 10c0/e1ec52ec2255e3330812084d62bde8853d20162b1cd285dbb63440d63d0b16c03b6ce6983982e41ac2fc2eceb3e2f6b2bc1c627d093482c4c3836c4fbb9567b0 languageName: node linkType: hard -"@shikijs/langs@npm:^3.4.0": - version: 3.4.0 - resolution: "@shikijs/langs@npm:3.4.0" +"@shikijs/langs@npm:^3.7.0": + version: 3.7.0 + resolution: "@shikijs/langs@npm:3.7.0" dependencies: - "@shikijs/types": "npm:3.4.0" - checksum: 10c0/73f464e7e433b42fa9c25ebc4bcca1832f861ee9342ccc63090328f3516af6d4fc685cae84e330b9a4aee69f095922403b2b345d0412e7dc7b0be66a1e3bbf68 + "@shikijs/types": "npm:3.7.0" + checksum: 10c0/326e8b014e74d25ce84a63bf7fdd47d5582f85c8404d4c48d6bdacf2f32ab92ddb39b41710ee7eff3daaecbbea7ee96a6c49d427344ee8375551597c74010a81 languageName: node linkType: hard -"@shikijs/themes@npm:^3.4.0": - version: 3.4.0 - resolution: "@shikijs/themes@npm:3.4.0" +"@shikijs/themes@npm:^3.7.0": + version: 3.7.0 + resolution: "@shikijs/themes@npm:3.7.0" dependencies: - "@shikijs/types": "npm:3.4.0" - checksum: 10c0/adca4a5b2ce2d663b39caed2f9002cda5cab96c938cd594e2924e78e9a360a8cb886d3e87ce2773b5c1f4ef94f96281667b41dcb55dbd7e655ef1edcf775c6cd + "@shikijs/types": "npm:3.7.0" + checksum: 10c0/6887eb99b55439988edab21a1af00302eaed6ba0dd7e2bea6c844ff4dfb8879a0c6c2178ba3fcfe2dbf3fd9f3ab6105572c57ae871e147aaceaf53bcc345d0cd languageName: node linkType: hard -"@shikijs/types@npm:3.4.0, @shikijs/types@npm:^3.4.0": - version: 3.4.0 - resolution: "@shikijs/types@npm:3.4.0" +"@shikijs/types@npm:3.7.0, @shikijs/types@npm:^3.7.0": + version: 3.7.0 + resolution: "@shikijs/types@npm:3.7.0" dependencies: "@shikijs/vscode-textmate": "npm:^10.0.2" "@types/hast": "npm:^3.0.4" - checksum: 10c0/3a2d51208981e1ca70101dc5575e60cffca223cdc0aeb1683b3b4a582205edf185c104b41c5092b2dfca96d1f81a88d12e16161cb8288287949b90ac5eabf531 + checksum: 10c0/d7c4fcca358c0585602090e2b4ed0a3f6742b55bea340030c115cb7aa643eac79836baa095517a538d695415458bb48c08b7be7f3c8d1cf1c1c7749a58913a3f languageName: node linkType: hard @@ -10308,6 +10575,13 @@ __metadata: languageName: node linkType: hard +"@types/prop-types@npm:^15.7.15": + version: 15.7.15 + resolution: "@types/prop-types@npm:15.7.15" + checksum: 10c0/b59aad1ad19bf1733cf524fd4e618196c6c7690f48ee70a327eb450a42aab8e8a063fbe59ca0a5701aebe2d92d582292c0fb845ea57474f6a15f6994b0e260b2 + languageName: node + linkType: hard + "@types/qs@npm:*, @types/qs@npm:^6.9.7": version: 6.9.18 resolution: "@types/qs@npm:6.9.18" @@ -10352,7 +10626,7 @@ __metadata: languageName: node linkType: hard -"@types/react-transition-group@npm:^4.4.10, @types/react-transition-group@npm:^4.4.11": +"@types/react-transition-group@npm:^4.4.10, @types/react-transition-group@npm:^4.4.11, @types/react-transition-group@npm:^4.4.12": version: 4.4.12 resolution: "@types/react-transition-group@npm:4.4.12" peerDependencies: @@ -10613,6 +10887,27 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/eslint-plugin@npm:8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/eslint-plugin@npm:8.35.1" + dependencies: + "@eslint-community/regexpp": "npm:^4.10.0" + "@typescript-eslint/scope-manager": "npm:8.35.1" + "@typescript-eslint/type-utils": "npm:8.35.1" + "@typescript-eslint/utils": "npm:8.35.1" + "@typescript-eslint/visitor-keys": "npm:8.35.1" + graphemer: "npm:^1.4.0" + ignore: "npm:^7.0.0" + natural-compare: "npm:^1.4.0" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + "@typescript-eslint/parser": ^8.35.1 + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/0f369be24644ebea30642512ddae0e602e4ca6bc55ae09d9860f16a3baae6aee1a376c182c61b43d12bc137156e3931f6bac3c73919c9c81b32c962bb5bc544e + languageName: node + linkType: hard + "@typescript-eslint/eslint-plugin@npm:^5.0.0, @typescript-eslint/eslint-plugin@npm:^5.5.0": version: 5.62.0 resolution: "@typescript-eslint/eslint-plugin@npm:5.62.0" @@ -10712,6 +11007,22 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/parser@npm:8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/parser@npm:8.35.1" + dependencies: + "@typescript-eslint/scope-manager": "npm:8.35.1" + "@typescript-eslint/types": "npm:8.35.1" + "@typescript-eslint/typescript-estree": "npm:8.35.1" + "@typescript-eslint/visitor-keys": "npm:8.35.1" + debug: "npm:^4.3.4" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/949383d74f6db1b91f90923d50f0ecbacaa972fd56e70553c803a8f64131345afdaf096cf1c1fc4a833ddc06ee44b241811edb5d516d769e244560f5b7f0e0af + languageName: node + linkType: hard + "@typescript-eslint/parser@npm:^5.0.0, @typescript-eslint/parser@npm:^5.5.0": version: 5.62.0 resolution: "@typescript-eslint/parser@npm:5.62.0" @@ -10776,6 +11087,19 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/project-service@npm:8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/project-service@npm:8.35.1" + dependencies: + "@typescript-eslint/tsconfig-utils": "npm:^8.35.1" + "@typescript-eslint/types": "npm:^8.35.1" + debug: "npm:^4.3.4" + peerDependencies: + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/f8e88d773d7e9f193a05b4daeca1e7571fa0059b36ffad291fc6d83c9df94fbe38c935e076ae29e755bcb6008c4ee5c1073ebb2077258c5c0b53c76a23eb3c16 + languageName: node + linkType: hard + "@typescript-eslint/scope-manager@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/scope-manager@npm:5.62.0" @@ -10826,6 +11150,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/scope-manager@npm:8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/scope-manager@npm:8.35.1" + dependencies: + "@typescript-eslint/types": "npm:8.35.1" + "@typescript-eslint/visitor-keys": "npm:8.35.1" + checksum: 10c0/ddfa0b81f47402874efcdd8e0857142600d90fc4e827243ed0fd058731e77e4beb8f5a60425117d1d4146d84437f538cf303f7bfebbd0f02733b202aa30a8393 + languageName: node + linkType: hard + "@typescript-eslint/tsconfig-utils@npm:8.33.0, @typescript-eslint/tsconfig-utils@npm:^8.33.0": version: 8.33.0 resolution: "@typescript-eslint/tsconfig-utils@npm:8.33.0" @@ -10835,6 +11169,15 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/tsconfig-utils@npm:8.35.1, @typescript-eslint/tsconfig-utils@npm:^8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/tsconfig-utils@npm:8.35.1" + peerDependencies: + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/a11b53e05fbc59eff3f95619847fb7222d8b2aa613e602524c9b700be3ce0d48bcf5e5932869df4658f514bd2cdc87c857d484472af3f3f3adf88b6e7e1c26f3 + languageName: node + linkType: hard + "@typescript-eslint/type-utils@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/type-utils@npm:5.62.0" @@ -10901,6 +11244,21 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/type-utils@npm:8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/type-utils@npm:8.35.1" + dependencies: + "@typescript-eslint/typescript-estree": "npm:8.35.1" + "@typescript-eslint/utils": "npm:8.35.1" + debug: "npm:^4.3.4" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/09041dd64684823da169c0668e6187d237c728bf54771003dc6ddaa895cbd11ad401ff14f096451c689e37815a791ef77beaf80d1f8bbf6b92ee3edbf346bc7c + languageName: node + linkType: hard + "@typescript-eslint/types@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/types@npm:5.62.0" @@ -10936,6 +11294,13 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/types@npm:8.35.1, @typescript-eslint/types@npm:^8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/types@npm:8.35.1" + checksum: 10c0/136dd1c7a39685baa398406423a97a4b6a66e6aed7cbd6ae698a89b0fde92c76f1415294bec612791d67d7917fda280caa65b9d761e2744e8143506d1f417fb2 + languageName: node + linkType: hard + "@typescript-eslint/typescript-estree@npm:5.62.0": version: 5.62.0 resolution: "@typescript-eslint/typescript-estree@npm:5.62.0" @@ -11030,6 +11395,26 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/typescript-estree@npm:8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/typescript-estree@npm:8.35.1" + dependencies: + "@typescript-eslint/project-service": "npm:8.35.1" + "@typescript-eslint/tsconfig-utils": "npm:8.35.1" + "@typescript-eslint/types": "npm:8.35.1" + "@typescript-eslint/visitor-keys": "npm:8.35.1" + debug: "npm:^4.3.4" + fast-glob: "npm:^3.3.2" + is-glob: "npm:^4.0.3" + minimatch: "npm:^9.0.4" + semver: "npm:^7.6.0" + ts-api-utils: "npm:^2.1.0" + peerDependencies: + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/6ef093cf9d7a54a323b3d112c78309b2c24c0f94e2c5b61401db9390eb7ffa3ab1da066c497907d58f0bba6986984ac73a478febd91f0bf11598108cc49f6e02 + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:5.62.0, @typescript-eslint/utils@npm:^5.10.0, @typescript-eslint/utils@npm:^5.58.0, @typescript-eslint/utils@npm:^5.62.0": version: 5.62.0 resolution: "@typescript-eslint/utils@npm:5.62.0" @@ -11094,6 +11479,21 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/utils@npm:8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/utils@npm:8.35.1" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.7.0" + "@typescript-eslint/scope-manager": "npm:8.35.1" + "@typescript-eslint/types": "npm:8.35.1" + "@typescript-eslint/typescript-estree": "npm:8.35.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/1fa4877caae48961d160b88fc974bb7bfe355ca2f8f6915987427354ca23621698041678adab5964caf9ad62c17b349110136890688f13b10ab1aaad74ae63d9 + languageName: node + linkType: hard + "@typescript-eslint/utils@npm:^8.18.1": version: 8.32.0 resolution: "@typescript-eslint/utils@npm:8.32.0" @@ -11159,6 +11559,16 @@ __metadata: languageName: node linkType: hard +"@typescript-eslint/visitor-keys@npm:8.35.1": + version: 8.35.1 + resolution: "@typescript-eslint/visitor-keys@npm:8.35.1" + dependencies: + "@typescript-eslint/types": "npm:8.35.1" + eslint-visitor-keys: "npm:^4.2.1" + checksum: 10c0/55b9eb15842a5d5dca11375e436340c731e01b07190c741d2656330f3e4d88b59e1bf3d677681dd091460be2b6e5f2c42e92faea36f947d25382ead5e8118108 + languageName: node + linkType: hard + "@ungap/structured-clone@npm:^1.2.0": version: 1.3.0 resolution: "@ungap/structured-clone@npm:1.3.0" @@ -11166,6 +11576,27 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-android-arm-eabi@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-android-arm-eabi@npm:1.11.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@unrs/resolver-binding-android-arm64@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-android-arm64@npm:1.11.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@unrs/resolver-binding-darwin-arm64@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-darwin-arm64@npm:1.11.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@unrs/resolver-binding-darwin-arm64@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-darwin-arm64@npm:1.7.2" @@ -11173,6 +11604,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-darwin-x64@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-darwin-x64@npm:1.11.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@unrs/resolver-binding-darwin-x64@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-darwin-x64@npm:1.7.2" @@ -11180,6 +11618,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-freebsd-x64@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-freebsd-x64@npm:1.11.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "@unrs/resolver-binding-freebsd-x64@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-freebsd-x64@npm:1.7.2" @@ -11187,6 +11632,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.11.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-arm-gnueabihf@npm:1.7.2" @@ -11194,6 +11646,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-arm-musleabihf@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-arm-musleabihf@npm:1.11.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-arm-musleabihf@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-arm-musleabihf@npm:1.7.2" @@ -11201,6 +11660,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-arm64-gnu@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-arm64-gnu@npm:1.11.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-arm64-gnu@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-arm64-gnu@npm:1.7.2" @@ -11208,6 +11674,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-arm64-musl@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-arm64-musl@npm:1.11.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-arm64-musl@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-arm64-musl@npm:1.7.2" @@ -11215,6 +11688,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-ppc64-gnu@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-ppc64-gnu@npm:1.11.0" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-ppc64-gnu@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-ppc64-gnu@npm:1.7.2" @@ -11222,6 +11702,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-riscv64-gnu@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-riscv64-gnu@npm:1.11.0" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-riscv64-gnu@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-riscv64-gnu@npm:1.7.2" @@ -11229,6 +11716,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-riscv64-musl@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-riscv64-musl@npm:1.11.0" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-riscv64-musl@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-riscv64-musl@npm:1.7.2" @@ -11236,6 +11730,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-s390x-gnu@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-s390x-gnu@npm:1.11.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-s390x-gnu@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-s390x-gnu@npm:1.7.2" @@ -11243,6 +11744,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-x64-gnu@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-x64-gnu@npm:1.11.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-x64-gnu@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-x64-gnu@npm:1.7.2" @@ -11250,6 +11758,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-linux-x64-musl@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-linux-x64-musl@npm:1.11.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + "@unrs/resolver-binding-linux-x64-musl@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-linux-x64-musl@npm:1.7.2" @@ -11257,6 +11772,15 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-wasm32-wasi@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-wasm32-wasi@npm:1.11.0" + dependencies: + "@napi-rs/wasm-runtime": "npm:^0.2.11" + conditions: cpu=wasm32 + languageName: node + linkType: hard + "@unrs/resolver-binding-wasm32-wasi@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-wasm32-wasi@npm:1.7.2" @@ -11266,6 +11790,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-win32-arm64-msvc@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-win32-arm64-msvc@npm:1.11.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@unrs/resolver-binding-win32-arm64-msvc@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-win32-arm64-msvc@npm:1.7.2" @@ -11273,6 +11804,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-win32-ia32-msvc@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-win32-ia32-msvc@npm:1.11.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@unrs/resolver-binding-win32-ia32-msvc@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-win32-ia32-msvc@npm:1.7.2" @@ -11280,6 +11818,13 @@ __metadata: languageName: node linkType: hard +"@unrs/resolver-binding-win32-x64-msvc@npm:1.11.0": + version: 1.11.0 + resolution: "@unrs/resolver-binding-win32-x64-msvc@npm:1.11.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@unrs/resolver-binding-win32-x64-msvc@npm:1.7.2": version: 1.7.2 resolution: "@unrs/resolver-binding-win32-x64-msvc@npm:1.7.2" @@ -12610,6 +13155,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.15.0": + version: 8.15.0 + resolution: "acorn@npm:8.15.0" + bin: + acorn: bin/acorn + checksum: 10c0/dec73ff59b7d6628a01eebaece7f2bdb8bb62b9b5926dcad0f8931f2b8b79c2be21f6c68ac095592adb5adb15831a3635d9343e6a91d028bbe85d564875ec3ec + languageName: node + linkType: hard + "adm-zip@npm:^0.4.16": version: 0.4.16 resolution: "adm-zip@npm:0.4.16" @@ -13008,6 +13562,22 @@ __metadata: languageName: node linkType: hard +"array-includes@npm:^3.1.9": + version: 3.1.9 + resolution: "array-includes@npm:3.1.9" + dependencies: + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.4" + define-properties: "npm:^1.2.1" + es-abstract: "npm:^1.24.0" + es-object-atoms: "npm:^1.1.1" + get-intrinsic: "npm:^1.3.0" + is-string: "npm:^1.1.1" + math-intrinsics: "npm:^1.1.0" + checksum: 10c0/0235fa69078abeac05ac4250699c44996bc6f774a9cbe45db48674ce6bd142f09b327d31482ff75cf03344db4ea03eae23edb862d59378b484b47ed842574856 + languageName: node + linkType: hard + "array-timsort@npm:^1.0.3": version: 1.0.3 resolution: "array-timsort@npm:1.0.3" @@ -13036,7 +13606,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlastindex@npm:^1.2.5": +"array.prototype.findlastindex@npm:^1.2.5, array.prototype.findlastindex@npm:^1.2.6": version: 1.2.6 resolution: "array.prototype.findlastindex@npm:1.2.6" dependencies: @@ -13051,7 +13621,7 @@ __metadata: languageName: node linkType: hard -"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": +"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2, array.prototype.flat@npm:^1.3.3": version: 1.3.3 resolution: "array.prototype.flat@npm:1.3.3" dependencies: @@ -15596,6 +16166,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.4.1": + version: 4.4.1 + resolution: "debug@npm:4.4.1" + dependencies: + ms: "npm:^2.1.3" + peerDependenciesMeta: + supports-color: + optional: true + checksum: 10c0/d2b44bc1afd912b49bb7ebb0d50a860dc93a4dd7d946e8de94abc957bb63726b7dd5aa48c18c2386c379ec024c46692e15ed3ed97d481729f929201e671fcd55 + languageName: node + linkType: hard + "decamelize@npm:^1.2.0": version: 1.2.0 resolution: "decamelize@npm:1.2.0" @@ -16321,26 +16903,85 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.23.9": - version: 1.23.9 - resolution: "es-abstract@npm:1.23.9" +"es-abstract@npm:^1.17.5, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3, es-abstract@npm:^1.23.5, es-abstract@npm:^1.23.6, es-abstract@npm:^1.23.9": + version: 1.23.9 + resolution: "es-abstract@npm:1.23.9" + dependencies: + array-buffer-byte-length: "npm:^1.0.2" + arraybuffer.prototype.slice: "npm:^1.0.4" + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.8" + call-bound: "npm:^1.0.3" + data-view-buffer: "npm:^1.0.2" + data-view-byte-length: "npm:^1.0.2" + data-view-byte-offset: "npm:^1.0.1" + es-define-property: "npm:^1.0.1" + es-errors: "npm:^1.3.0" + es-object-atoms: "npm:^1.0.0" + es-set-tostringtag: "npm:^2.1.0" + es-to-primitive: "npm:^1.3.0" + function.prototype.name: "npm:^1.1.8" + get-intrinsic: "npm:^1.2.7" + get-proto: "npm:^1.0.0" + get-symbol-description: "npm:^1.1.0" + globalthis: "npm:^1.0.4" + gopd: "npm:^1.2.0" + has-property-descriptors: "npm:^1.0.2" + has-proto: "npm:^1.2.0" + has-symbols: "npm:^1.1.0" + hasown: "npm:^2.0.2" + internal-slot: "npm:^1.1.0" + is-array-buffer: "npm:^3.0.5" + is-callable: "npm:^1.2.7" + is-data-view: "npm:^1.0.2" + is-regex: "npm:^1.2.1" + is-shared-array-buffer: "npm:^1.0.4" + is-string: "npm:^1.1.1" + is-typed-array: "npm:^1.1.15" + is-weakref: "npm:^1.1.0" + math-intrinsics: "npm:^1.1.0" + object-inspect: "npm:^1.13.3" + object-keys: "npm:^1.1.1" + object.assign: "npm:^4.1.7" + own-keys: "npm:^1.0.1" + regexp.prototype.flags: "npm:^1.5.3" + safe-array-concat: "npm:^1.1.3" + safe-push-apply: "npm:^1.0.0" + safe-regex-test: "npm:^1.1.0" + set-proto: "npm:^1.0.0" + string.prototype.trim: "npm:^1.2.10" + string.prototype.trimend: "npm:^1.0.9" + string.prototype.trimstart: "npm:^1.0.8" + typed-array-buffer: "npm:^1.0.3" + typed-array-byte-length: "npm:^1.0.3" + typed-array-byte-offset: "npm:^1.0.4" + typed-array-length: "npm:^1.0.7" + unbox-primitive: "npm:^1.1.0" + which-typed-array: "npm:^1.1.18" + checksum: 10c0/1de229c9e08fe13c17fe5abaec8221545dfcd57e51f64909599a6ae896df84b8fd2f7d16c60cb00d7bf495b9298ca3581aded19939d4b7276854a4b066f8422b + languageName: node + linkType: hard + +"es-abstract@npm:^1.24.0": + version: 1.24.0 + resolution: "es-abstract@npm:1.24.0" dependencies: array-buffer-byte-length: "npm:^1.0.2" arraybuffer.prototype.slice: "npm:^1.0.4" available-typed-arrays: "npm:^1.0.7" call-bind: "npm:^1.0.8" - call-bound: "npm:^1.0.3" + call-bound: "npm:^1.0.4" data-view-buffer: "npm:^1.0.2" data-view-byte-length: "npm:^1.0.2" data-view-byte-offset: "npm:^1.0.1" es-define-property: "npm:^1.0.1" es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" + es-object-atoms: "npm:^1.1.1" es-set-tostringtag: "npm:^2.1.0" es-to-primitive: "npm:^1.3.0" function.prototype.name: "npm:^1.1.8" - get-intrinsic: "npm:^1.2.7" - get-proto: "npm:^1.0.0" + get-intrinsic: "npm:^1.3.0" + get-proto: "npm:^1.0.1" get-symbol-description: "npm:^1.1.0" globalthis: "npm:^1.0.4" gopd: "npm:^1.2.0" @@ -16352,21 +16993,24 @@ __metadata: is-array-buffer: "npm:^3.0.5" is-callable: "npm:^1.2.7" is-data-view: "npm:^1.0.2" + is-negative-zero: "npm:^2.0.3" is-regex: "npm:^1.2.1" + is-set: "npm:^2.0.3" is-shared-array-buffer: "npm:^1.0.4" is-string: "npm:^1.1.1" is-typed-array: "npm:^1.1.15" - is-weakref: "npm:^1.1.0" + is-weakref: "npm:^1.1.1" math-intrinsics: "npm:^1.1.0" - object-inspect: "npm:^1.13.3" + object-inspect: "npm:^1.13.4" object-keys: "npm:^1.1.1" object.assign: "npm:^4.1.7" own-keys: "npm:^1.0.1" - regexp.prototype.flags: "npm:^1.5.3" + regexp.prototype.flags: "npm:^1.5.4" safe-array-concat: "npm:^1.1.3" safe-push-apply: "npm:^1.0.0" safe-regex-test: "npm:^1.1.0" set-proto: "npm:^1.0.0" + stop-iteration-iterator: "npm:^1.1.0" string.prototype.trim: "npm:^1.2.10" string.prototype.trimend: "npm:^1.0.9" string.prototype.trimstart: "npm:^1.0.8" @@ -16375,8 +17019,8 @@ __metadata: typed-array-byte-offset: "npm:^1.0.4" typed-array-length: "npm:^1.0.7" unbox-primitive: "npm:^1.1.0" - which-typed-array: "npm:^1.1.18" - checksum: 10c0/1de229c9e08fe13c17fe5abaec8221545dfcd57e51f64909599a6ae896df84b8fd2f7d16c60cb00d7bf495b9298ca3581aded19939d4b7276854a4b066f8422b + which-typed-array: "npm:^1.1.19" + checksum: 10c0/b256e897be32df5d382786ce8cce29a1dd8c97efbab77a26609bd70f2ed29fbcfc7a31758cb07488d532e7ccccdfca76c1118f2afe5a424cdc05ca007867c318 languageName: node linkType: hard @@ -16646,6 +17290,17 @@ __metadata: languageName: node linkType: hard +"eslint-config-prettier@npm:^10.1.5": + version: 10.1.5 + resolution: "eslint-config-prettier@npm:10.1.5" + peerDependencies: + eslint: ">=7.0.0" + bin: + eslint-config-prettier: bin/cli.js + checksum: 10c0/5486255428e4577e8064b40f27db299faf7312b8e43d7b4bc913a6426e6c0f5950cd519cad81ae24e9aecb4002c502bc665c02e3b52efde57af2debcf27dd6e0 + languageName: node + linkType: hard + "eslint-config-prettier@npm:^9.1.0": version: 9.1.0 resolution: "eslint-config-prettier@npm:9.1.0" @@ -16681,6 +17336,21 @@ __metadata: languageName: node linkType: hard +"eslint-import-context@npm:^0.1.8": + version: 0.1.9 + resolution: "eslint-import-context@npm:0.1.9" + dependencies: + get-tsconfig: "npm:^4.10.1" + stable-hash-x: "npm:^0.2.0" + peerDependencies: + unrs-resolver: ^1.0.0 + peerDependenciesMeta: + unrs-resolver: + optional: true + checksum: 10c0/07851103443b70af681c5988e2702e681ff9b956e055e11d4bd9b2322847fa0d9e8da50c18fc7cb1165106b043f34fbd0384d7011c239465c4645c52132e56f3 + languageName: node + linkType: hard + "eslint-import-resolver-alias@npm:^1.1.2": version: 1.1.2 resolution: "eslint-import-resolver-alias@npm:1.1.2" @@ -16725,6 +17395,30 @@ __metadata: languageName: node linkType: hard +"eslint-import-resolver-typescript@npm:^4.4.4": + version: 4.4.4 + resolution: "eslint-import-resolver-typescript@npm:4.4.4" + dependencies: + debug: "npm:^4.4.1" + eslint-import-context: "npm:^0.1.8" + get-tsconfig: "npm:^4.10.1" + is-bun-module: "npm:^2.0.0" + stable-hash-x: "npm:^0.2.0" + tinyglobby: "npm:^0.2.14" + unrs-resolver: "npm:^1.7.11" + peerDependencies: + eslint: "*" + eslint-plugin-import: "*" + eslint-plugin-import-x: "*" + peerDependenciesMeta: + eslint-plugin-import: + optional: true + eslint-plugin-import-x: + optional: true + checksum: 10c0/3bf8ad77c21660f77a0e455555ab179420f68ae7a132906c85a217ccce51cb6680cf70027cab32a358d193e5b9e476f6ba2e595585242aa97d4f6435ca22104e + languageName: node + linkType: hard + "eslint-module-utils@npm:^2.12.0": version: 2.12.0 resolution: "eslint-module-utils@npm:2.12.0" @@ -16737,6 +17431,18 @@ __metadata: languageName: node linkType: hard +"eslint-module-utils@npm:^2.12.1": + version: 2.12.1 + resolution: "eslint-module-utils@npm:2.12.1" + dependencies: + debug: "npm:^3.2.7" + peerDependenciesMeta: + eslint: + optional: true + checksum: 10c0/6f4efbe7a91ae49bf67b4ab3644cb60bc5bd7db4cb5521de1b65be0847ffd3fb6bce0dd68f0995e1b312d137f768e2a1f842ee26fe73621afa05f850628fdc40 + languageName: node + linkType: hard + "eslint-plugin-eslint-comments@npm:^3.2.0": version: 3.2.0 resolution: "eslint-plugin-eslint-comments@npm:3.2.0" @@ -16792,6 +17498,35 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-import@npm:^2.32.0": + version: 2.32.0 + resolution: "eslint-plugin-import@npm:2.32.0" + dependencies: + "@rtsao/scc": "npm:^1.1.0" + array-includes: "npm:^3.1.9" + array.prototype.findlastindex: "npm:^1.2.6" + array.prototype.flat: "npm:^1.3.3" + array.prototype.flatmap: "npm:^1.3.3" + debug: "npm:^3.2.7" + doctrine: "npm:^2.1.0" + eslint-import-resolver-node: "npm:^0.3.9" + eslint-module-utils: "npm:^2.12.1" + hasown: "npm:^2.0.2" + is-core-module: "npm:^2.16.1" + is-glob: "npm:^4.0.3" + minimatch: "npm:^3.1.2" + object.fromentries: "npm:^2.0.8" + object.groupby: "npm:^1.0.3" + object.values: "npm:^1.2.1" + semver: "npm:^6.3.1" + string.prototype.trimend: "npm:^1.0.9" + tsconfig-paths: "npm:^3.15.0" + peerDependencies: + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 + checksum: 10c0/bfb1b8fc8800398e62ddfefbf3638d185286edfed26dfe00875cc2846d954491b4f5112457831588b757fa789384e1ae585f812614c4797f0499fa234fd4a48b + languageName: node + linkType: hard + "eslint-plugin-jest@npm:^25.3.0": version: 25.7.0 resolution: "eslint-plugin-jest@npm:25.7.0" @@ -16907,6 +17642,26 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-prettier@npm:^5.5.1": + version: 5.5.1 + resolution: "eslint-plugin-prettier@npm:5.5.1" + dependencies: + prettier-linter-helpers: "npm:^1.0.0" + synckit: "npm:^0.11.7" + peerDependencies: + "@types/eslint": ">=8.0.0" + eslint: ">=8.0.0" + eslint-config-prettier: ">= 7.0.0 <10.0.0 || >=10.1.0" + prettier: ">=3.0.0" + peerDependenciesMeta: + "@types/eslint": + optional: true + eslint-config-prettier: + optional: true + checksum: 10c0/6ed93faa7d885af2a987d732f7e716e7aaba55e2da2b091e1b16bacf68425bffe91d784803597bd3f3e6201499fabb89ae28a51ac3986659a46e55e729ed2d55 + languageName: node + linkType: hard + "eslint-plugin-react-hooks@npm:^4.3.0, eslint-plugin-react-hooks@npm:^4.6.0": version: 4.6.2 resolution: "eslint-plugin-react-hooks@npm:4.6.2" @@ -17067,6 +17822,16 @@ __metadata: languageName: node linkType: hard +"eslint-scope@npm:^8.4.0": + version: 8.4.0 + resolution: "eslint-scope@npm:8.4.0" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^5.2.0" + checksum: 10c0/407f6c600204d0f3705bd557f81bd0189e69cd7996f408f8971ab5779c0af733d1af2f1412066b40ee1588b085874fc37a2333986c6521669cdbdd36ca5058e0 + languageName: node + linkType: hard + "eslint-visitor-keys@npm:^2.1.0": version: 2.1.0 resolution: "eslint-visitor-keys@npm:2.1.0" @@ -17088,6 +17853,13 @@ __metadata: languageName: node linkType: hard +"eslint-visitor-keys@npm:^4.2.1": + version: 4.2.1 + resolution: "eslint-visitor-keys@npm:4.2.1" + checksum: 10c0/fcd43999199d6740db26c58dbe0c2594623e31ca307e616ac05153c9272f12f1364f5a0b1917a8e962268fdecc6f3622c1c2908b4fcc2e047a106fe6de69dc43 + languageName: node + linkType: hard + "eslint@npm:^8.0.1, eslint@npm:^8.55.0, eslint@npm:^8.57.0": version: 8.57.1 resolution: "eslint@npm:8.57.1" @@ -17186,6 +17958,56 @@ __metadata: languageName: node linkType: hard +"eslint@npm:^9.30.1": + version: 9.30.1 + resolution: "eslint@npm:9.30.1" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.12.1" + "@eslint/config-array": "npm:^0.21.0" + "@eslint/config-helpers": "npm:^0.3.0" + "@eslint/core": "npm:^0.14.0" + "@eslint/eslintrc": "npm:^3.3.1" + "@eslint/js": "npm:9.30.1" + "@eslint/plugin-kit": "npm:^0.3.1" + "@humanfs/node": "npm:^0.16.6" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@humanwhocodes/retry": "npm:^0.4.2" + "@types/estree": "npm:^1.0.6" + "@types/json-schema": "npm:^7.0.15" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.6" + debug: "npm:^4.3.2" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^8.4.0" + eslint-visitor-keys: "npm:^4.2.1" + espree: "npm:^10.4.0" + esquery: "npm:^1.5.0" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^8.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + peerDependencies: + jiti: "*" + peerDependenciesMeta: + jiti: + optional: true + bin: + eslint: bin/eslint.js + checksum: 10c0/5a5867078e03ea56a1b6d1ee1548659abc38a6d5136c7ef94e21c5dbeb28e3ed50b15d2e0da25fce85600f6cf7ea7715eae650c41e8ae826c34490e9ec73d5d6 + languageName: node + linkType: hard + "espree@npm:^10.0.1, espree@npm:^10.3.0": version: 10.3.0 resolution: "espree@npm:10.3.0" @@ -17197,6 +18019,17 @@ __metadata: languageName: node linkType: hard +"espree@npm:^10.4.0": + version: 10.4.0 + resolution: "espree@npm:10.4.0" + dependencies: + acorn: "npm:^8.15.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^4.2.1" + checksum: 10c0/c63fe06131c26c8157b4083313cb02a9a54720a08e21543300e55288c40e06c3fc284bdecf108d3a1372c5934a0a88644c98714f38b6ae8ed272b40d9ea08d6b + languageName: node + linkType: hard + "espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" @@ -18561,6 +19394,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.10.1": + version: 4.10.1 + resolution: "get-tsconfig@npm:4.10.1" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: 10c0/7f8e3dabc6a49b747920a800fb88e1952fef871cdf51b79e98db48275a5de6cdaf499c55ee67df5fa6fe7ce65f0063e26de0f2e53049b408c585aa74d39ffa21 + languageName: node + linkType: hard + "ghost-testrpc@npm:^0.0.2": version: 0.0.2 resolution: "ghost-testrpc@npm:0.0.2" @@ -18741,6 +19583,13 @@ __metadata: languageName: node linkType: hard +"globals@npm:^16.3.0": + version: 16.3.0 + resolution: "globals@npm:16.3.0" + checksum: 10c0/c62dc20357d1c0bf2be4545d6c4141265d1a229bf1c3294955efb5b5ef611145391895e3f2729f8603809e81b30b516c33e6c2597573844449978606aad6eb38 + languageName: node + linkType: hard + "globalthis@npm:^1.0.4": version: 1.0.4 resolution: "globalthis@npm:1.0.4" @@ -19925,7 +20774,7 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.1.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.16.0": +"is-core-module@npm:^2.1.0, is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1, is-core-module@npm:^2.16.0, is-core-module@npm:^2.16.1": version: 2.16.1 resolution: "is-core-module@npm:2.16.1" dependencies: @@ -20096,6 +20945,13 @@ __metadata: languageName: node linkType: hard +"is-negative-zero@npm:^2.0.3": + version: 2.0.3 + resolution: "is-negative-zero@npm:2.0.3" + checksum: 10c0/bcdcf6b8b9714063ffcfa9929c575ac69bfdabb8f4574ff557dfc086df2836cf07e3906f5bbc4f2a5c12f8f3ba56af640c843cdfc74da8caed86c7c7d66fd08e + languageName: node + linkType: hard + "is-node-process@npm:^1.2.0": version: 1.2.0 resolution: "is-node-process@npm:1.2.0" @@ -20255,7 +21111,7 @@ __metadata: languageName: node linkType: hard -"is-weakref@npm:^1.0.2, is-weakref@npm:^1.1.0": +"is-weakref@npm:^1.0.2, is-weakref@npm:^1.1.0, is-weakref@npm:^1.1.1": version: 1.1.1 resolution: "is-weakref@npm:1.1.1" dependencies: @@ -22917,6 +23773,15 @@ __metadata: languageName: node linkType: hard +"napi-postinstall@npm:^0.3.0": + version: 0.3.0 + resolution: "napi-postinstall@npm:0.3.0" + bin: + napi-postinstall: lib/cli.js + checksum: 10c0/dd5b295a0c7e669dda81a553b5defcdbe56805beb4279cd0df973454f072c083f574d399c4c825eece128113159658b031b4ac4b9dcb5735c5e34ddaefd3a3ca + languageName: node + linkType: hard + "native-fetch@npm:^4.0.2": version: 4.0.2 resolution: "native-fetch@npm:4.0.2" @@ -23370,7 +24235,7 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.13.3": +"object-inspect@npm:^1.13.3, object-inspect@npm:^1.13.4": version: 1.13.4 resolution: "object-inspect@npm:1.13.4" checksum: 10c0/d7f8711e803b96ea3191c745d6f8056ce1f2496e530e6a19a0e92d89b0fa3c76d910c31f0aa270432db6bd3b2f85500a376a83aaba849a8d518c8845b3211692 @@ -24402,16 +25267,16 @@ __metadata: languageName: node linkType: hard -"pino@npm:^9.6.0": - version: 9.6.0 - resolution: "pino@npm:9.6.0" +"pino@npm:^9.7.0": + version: 9.7.0 + resolution: "pino@npm:9.7.0" dependencies: atomic-sleep: "npm:^1.0.0" fast-redact: "npm:^3.1.1" on-exit-leak-free: "npm:^2.1.0" pino-abstract-transport: "npm:^2.0.0" pino-std-serializers: "npm:^7.0.0" - process-warning: "npm:^4.0.0" + process-warning: "npm:^5.0.0" quick-format-unescaped: "npm:^4.0.3" real-require: "npm:^0.2.0" safe-stable-stringify: "npm:^2.3.1" @@ -24419,7 +25284,7 @@ __metadata: thread-stream: "npm:^3.0.0" bin: pino: bin.js - checksum: 10c0/bcd1e9d9b301bea13b95689ca9ad7105ae9451928fb6c0b67b3e58c5fe37cea1d40665f3d6641e3da00be0bbc17b89031e67abbc8ea6aac6164f399309fd78e7 + checksum: 10c0/c7f8a83a9a9d728b4eff6d0f4b9367f031c91bcaa5806fbf0eedcc8e77faba593d59baf11a8fba0dd1c778bb17ca7ed01418ac1df4ec129faeedd4f3ecaff66f languageName: node linkType: hard @@ -24695,10 +25560,10 @@ __metadata: languageName: node linkType: hard -"process-warning@npm:^4.0.0": - version: 4.0.1 - resolution: "process-warning@npm:4.0.1" - checksum: 10c0/577a268b9fd5c3d9f6dbb4348220099391d830905642845d591e7ee8b1e45043d98b7b9826a3c1379bdd1686cdfe0f6cf349cb812affc5853b662e6a9896579e +"process-warning@npm:^5.0.0": + version: 5.0.0 + resolution: "process-warning@npm:5.0.0" + checksum: 10c0/941f48863d368ec161e0b5890ba0c6af94170078f3d6b5e915c19b36fb59edb0dc2f8e834d25e0d375a8bf368a49d490f080508842168832b93489d17843ec29 languageName: node linkType: hard @@ -25500,7 +26365,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.3": +"regexp.prototype.flags@npm:^1.5.3, regexp.prototype.flags@npm:^1.5.4": version: 1.5.4 resolution: "regexp.prototype.flags@npm:1.5.4" dependencies: @@ -26951,6 +27816,13 @@ __metadata: languageName: node linkType: hard +"stable-hash-x@npm:^0.2.0": + version: 0.2.0 + resolution: "stable-hash-x@npm:0.2.0" + checksum: 10c0/c757df58366ee4bb266a9486b8932eab7c1ba730469eaf4b68d2dee404814e9f84089c44c9b5205f8c7d99a0ab036cce2af69139ce5ed44b635923c011a8aea8 + languageName: node + linkType: hard + "stable-hash@npm:^0.0.5": version: 0.0.5 resolution: "stable-hash@npm:0.0.5" @@ -26997,6 +27869,16 @@ __metadata: languageName: node linkType: hard +"stop-iteration-iterator@npm:^1.1.0": + version: 1.1.0 + resolution: "stop-iteration-iterator@npm:1.1.0" + dependencies: + es-errors: "npm:^1.3.0" + internal-slot: "npm:^1.1.0" + checksum: 10c0/de4e45706bb4c0354a4b1122a2b8cc45a639e86206807ce0baf390ee9218d3ef181923fa4d2b67443367c491aa255c5fbaa64bb74648e3c5b48299928af86c09 + languageName: node + linkType: hard + "stream-browserify@npm:^3.0.0": version: 3.0.0 resolution: "stream-browserify@npm:3.0.0" @@ -27777,6 +28659,16 @@ __metadata: languageName: node linkType: hard +"tinyglobby@npm:^0.2.14": + version: 0.2.14 + resolution: "tinyglobby@npm:0.2.14" + dependencies: + fdir: "npm:^6.4.4" + picomatch: "npm:^4.0.2" + checksum: 10c0/f789ed6c924287a9b7d3612056ed0cda67306cd2c80c249fd280cf1504742b12583a2089b61f4abbd24605f390809017240e250241f09938054c9b363e51c0a6 + languageName: node + linkType: hard + "tinypool@npm:^1.0.2": version: 1.0.2 resolution: "tinypool@npm:1.0.2" @@ -28342,20 +29234,20 @@ __metadata: languageName: node linkType: hard -"typedoc@npm:^0.28.4": - version: 0.28.4 - resolution: "typedoc@npm:0.28.4" +"typedoc@npm:^0.28.7": + version: 0.28.7 + resolution: "typedoc@npm:0.28.7" dependencies: - "@gerrit0/mini-shiki": "npm:^3.2.2" + "@gerrit0/mini-shiki": "npm:^3.7.0" lunr: "npm:^2.3.9" markdown-it: "npm:^14.1.0" minimatch: "npm:^9.0.5" - yaml: "npm:^2.7.1" + yaml: "npm:^2.8.0" peerDependencies: typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x bin: typedoc: bin/typedoc - checksum: 10c0/5c7f4019da81e8b0869e4757b3d74c001dc021be381c5716a14212fbf63ad81bcfc470e040b7eac132603447c367019d5acab323d1b358b040979f1f56fe6393 + checksum: 10c0/30c942fa286c62898e5b2dd7750af80abb89684f4286bfbdf4009fb495cb8cfd65afbb793370d294c5d62e97c525789c2aae4bfd8ed29f5faa1dc49dcf4bf9c4 languageName: node linkType: hard @@ -28461,6 +29353,20 @@ __metadata: languageName: node linkType: hard +"typescript-eslint@npm:^8.35.1": + version: 8.35.1 + resolution: "typescript-eslint@npm:8.35.1" + dependencies: + "@typescript-eslint/eslint-plugin": "npm:8.35.1" + "@typescript-eslint/parser": "npm:8.35.1" + "@typescript-eslint/utils": "npm:8.35.1" + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: ">=4.8.4 <5.9.0" + checksum: 10c0/17781138f59c241658db96f793b745883e427bc48530cec2e81ad0a7941b557ddd2eede290d2c3d254f23d59a36ab1bf2cd1e705797e0db36d0ccd61c1a4299e + languageName: node + linkType: hard + "typescript@npm:5.7.2": version: 5.7.2 resolution: "typescript@npm:5.7.2" @@ -28828,6 +29734,73 @@ __metadata: languageName: node linkType: hard +"unrs-resolver@npm:^1.7.11": + version: 1.11.0 + resolution: "unrs-resolver@npm:1.11.0" + dependencies: + "@unrs/resolver-binding-android-arm-eabi": "npm:1.11.0" + "@unrs/resolver-binding-android-arm64": "npm:1.11.0" + "@unrs/resolver-binding-darwin-arm64": "npm:1.11.0" + "@unrs/resolver-binding-darwin-x64": "npm:1.11.0" + "@unrs/resolver-binding-freebsd-x64": "npm:1.11.0" + "@unrs/resolver-binding-linux-arm-gnueabihf": "npm:1.11.0" + "@unrs/resolver-binding-linux-arm-musleabihf": "npm:1.11.0" + "@unrs/resolver-binding-linux-arm64-gnu": "npm:1.11.0" + "@unrs/resolver-binding-linux-arm64-musl": "npm:1.11.0" + "@unrs/resolver-binding-linux-ppc64-gnu": "npm:1.11.0" + "@unrs/resolver-binding-linux-riscv64-gnu": "npm:1.11.0" + "@unrs/resolver-binding-linux-riscv64-musl": "npm:1.11.0" + "@unrs/resolver-binding-linux-s390x-gnu": "npm:1.11.0" + "@unrs/resolver-binding-linux-x64-gnu": "npm:1.11.0" + "@unrs/resolver-binding-linux-x64-musl": "npm:1.11.0" + "@unrs/resolver-binding-wasm32-wasi": "npm:1.11.0" + "@unrs/resolver-binding-win32-arm64-msvc": "npm:1.11.0" + "@unrs/resolver-binding-win32-ia32-msvc": "npm:1.11.0" + "@unrs/resolver-binding-win32-x64-msvc": "npm:1.11.0" + napi-postinstall: "npm:^0.3.0" + dependenciesMeta: + "@unrs/resolver-binding-android-arm-eabi": + optional: true + "@unrs/resolver-binding-android-arm64": + optional: true + "@unrs/resolver-binding-darwin-arm64": + optional: true + "@unrs/resolver-binding-darwin-x64": + optional: true + "@unrs/resolver-binding-freebsd-x64": + optional: true + "@unrs/resolver-binding-linux-arm-gnueabihf": + optional: true + "@unrs/resolver-binding-linux-arm-musleabihf": + optional: true + "@unrs/resolver-binding-linux-arm64-gnu": + optional: true + "@unrs/resolver-binding-linux-arm64-musl": + optional: true + "@unrs/resolver-binding-linux-ppc64-gnu": + optional: true + "@unrs/resolver-binding-linux-riscv64-gnu": + optional: true + "@unrs/resolver-binding-linux-riscv64-musl": + optional: true + "@unrs/resolver-binding-linux-s390x-gnu": + optional: true + "@unrs/resolver-binding-linux-x64-gnu": + optional: true + "@unrs/resolver-binding-linux-x64-musl": + optional: true + "@unrs/resolver-binding-wasm32-wasi": + optional: true + "@unrs/resolver-binding-win32-arm64-msvc": + optional: true + "@unrs/resolver-binding-win32-ia32-msvc": + optional: true + "@unrs/resolver-binding-win32-x64-msvc": + optional: true + checksum: 10c0/5883c0621e3a57f21426092a99783ecd88e795493a0ab013a10013ddd8fe355d67a88ac37a7e8ae0f3617d52e7f688b95d9b2807ac605b22c174a8bd6d85fc04 + languageName: node + linkType: hard + "unstorage@npm:^1.9.0": version: 1.16.0 resolution: "unstorage@npm:1.16.0" @@ -29539,13 +30512,6 @@ __metadata: languageName: node linkType: hard -"web-vitals@npm:^4.2.2": - version: 4.2.4 - resolution: "web-vitals@npm:4.2.4" - checksum: 10c0/383c9281d5b556bcd190fde3c823aeb005bb8cf82e62c75b47beb411014a4ed13fa5c5e0489ed0f1b8d501cd66b0bebcb8624c1a75750bd5df13e2a3b1b2d194 - languageName: node - linkType: hard - "web3-core@npm:^4.4.0, web3-core@npm:^4.5.0, web3-core@npm:^4.6.0, web3-core@npm:^4.7.1": version: 4.7.1 resolution: "web3-core@npm:4.7.1" @@ -30018,7 +30984,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18, which-typed-array@npm:^1.1.2": +"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.18, which-typed-array@npm:^1.1.19, which-typed-array@npm:^1.1.2": version: 1.1.19 resolution: "which-typed-array@npm:1.1.19" dependencies: @@ -30396,7 +31362,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.2.2, yaml@npm:^2.7.0, yaml@npm:^2.7.1": +"yaml@npm:^2.2.2, yaml@npm:^2.7.0": version: 2.7.1 resolution: "yaml@npm:2.7.1" bin: @@ -30405,6 +31371,15 @@ __metadata: languageName: node linkType: hard +"yaml@npm:^2.8.0": + version: 2.8.0 + resolution: "yaml@npm:2.8.0" + bin: + yaml: bin.mjs + checksum: 10c0/f6f7310cf7264a8107e72c1376f4de37389945d2fb4656f8060eca83f01d2d703f9d1b925dd8f39852a57034fafefde6225409ddd9f22aebfda16c6141b71858 + languageName: node + linkType: hard + "yargs-parser@npm:21.1.1, yargs-parser@npm:^21.0.0, yargs-parser@npm:^21.1.1": version: 21.1.1 resolution: "yargs-parser@npm:21.1.1"