From 15035259cac2299a1757c5c8ec2d9ebf9fdc75f1 Mon Sep 17 00:00:00 2001 From: Mohan Date: Wed, 6 Nov 2024 15:17:04 +0530 Subject: [PATCH 01/39] feat: Inform users that there are no available slots on staking contract and prompt them to switch (#421) (#423) * fix: improve error messages in AgentButton component * feat: add NoAvailableSlotsOnTheContract component * feat: integrate NoAvailableSlotsOnTheContract component and enhance service slot checks * feat: implement useCanStartUpdateStakingContract hook and update related components * feat: add available slots display and max-width styling to StakingContractDetails * feat: add POPOVER_WIDTH_LARGE constant and apply max-width styling to CountdownUntilMigration component * fix: correct spelling of 'occurred' in error notifications in AgentButton component * refactor: rename useCanStartUpdateStakingContract hook to useCanUpdateStakingContract and update related components * feat: update StakingContractUpdate and NoAvailableSlotsOnTheContract components to accept stakingProgramId prop and remove useCanUpdateStakingContract hook * chore: bump version to 0.1.0-rc186 in package.json and pyproject.toml Co-authored-by: Josh Miller <31908788+truemiller@users.noreply.github.com> --- .../MainPage/header/AgentButton.tsx | 15 ++++-- frontend/components/MainPage/index.tsx | 7 ++- .../NoAvailableSlotsOnTheContract.tsx | 51 +++++++++++++++++++ .../MainPage/sections/AlertSections/index.tsx | 9 ++++ .../sections/StakingContractUpdate.tsx | 19 +++---- .../CountdownUntilMigration.tsx | 3 +- .../StakingContractDetails.tsx | 6 +++ .../StakingContractSection/useMigrate.tsx | 18 +++++++ frontend/constants/symbols.ts | 2 + frontend/constants/width.ts | 2 + frontend/styles/globals.scss | 4 +- frontend/types/Autonolas.ts | 1 + package.json | 2 +- pyproject.toml | 2 +- 14 files changed, 120 insertions(+), 21 deletions(-) create mode 100644 frontend/components/MainPage/sections/AlertSections/NoAvailableSlotsOnTheContract.tsx diff --git a/frontend/components/MainPage/header/AgentButton.tsx b/frontend/components/MainPage/header/AgentButton.tsx index f2f76511..eb24147e 100644 --- a/frontend/components/MainPage/header/AgentButton.tsx +++ b/frontend/components/MainPage/header/AgentButton.tsx @@ -89,7 +89,7 @@ const AgentRunningButton = () => { await ServicesService.stopDeployment(service.hash); } catch (error) { console.error(error); - showNotification?.('Error while stopping agent'); + showNotification?.('Some error occurred while stopping agent'); } finally { // Resume polling, will update to correct status regardless of success setIsServicePollingPaused(false); @@ -145,6 +145,7 @@ const AgentNotRunningButton = () => { isAgentEvicted, setIsPaused: setIsStakingContractInfoPollingPaused, updateActiveStakingContractInfo, + hasEnoughServiceSlots, } = useStakingContractInfo(); const { activeStakingProgramId, defaultStakingProgramId } = useStakingProgram(); @@ -192,7 +193,7 @@ const AgentNotRunningButton = () => { } catch (error) { console.error(error); setServiceStatus(undefined); - showNotification?.('Error while creating safe'); + showNotification?.('Some error occurred while creating safe'); setIsStakingContractInfoPollingPaused(false); setIsServicePollingPaused(false); setIsBalancePollingPaused(false); @@ -211,7 +212,7 @@ const AgentNotRunningButton = () => { } catch (error) { console.error(error); setServiceStatus(undefined); - showNotification?.('Error while deploying service'); + showNotification?.('Some error occurred while deploying service'); setIsServicePollingPaused(false); setIsBalancePollingPaused(false); setIsStakingContractInfoPollingPaused(false); @@ -223,7 +224,9 @@ const AgentNotRunningButton = () => { showNotification?.(`Your agent is running!`); } catch (error) { console.error(error); - showNotification?.('Error while showing "running" notification'); + showNotification?.( + 'Some error occurred while showing "running" notification', + ); } // Can assume successful deployment @@ -278,6 +281,9 @@ const AgentNotRunningButton = () => { if (!requiredOlas) return false; + // If no slots available, agent cannot be started + if (!hasEnoughServiceSlots) return false; + // case where service exists & user has initial funded if (service && storeState?.isInitialFunded) { if (!safeOlasBalanceWithStaked) return false; @@ -302,6 +308,7 @@ const AgentNotRunningButton = () => { requiredOlas, totalEthBalance, isLowBalance, + hasEnoughServiceSlots, ]); const buttonProps: ButtonProps = { diff --git a/frontend/components/MainPage/index.tsx b/frontend/components/MainPage/index.tsx index 7e971999..93ad0587 100644 --- a/frontend/components/MainPage/index.tsx +++ b/frontend/components/MainPage/index.tsx @@ -8,6 +8,7 @@ import { useBalance } from '@/hooks/useBalance'; import { useMasterSafe } from '@/hooks/useMasterSafe'; import { usePageState } from '@/hooks/usePageState'; import { useServices } from '@/hooks/useServices'; +import { useStakingContractInfo } from '@/hooks/useStakingContractInfo'; import { useStakingProgram } from '@/hooks/useStakingProgram'; import { MainHeader } from './header'; @@ -26,6 +27,7 @@ export const Main = () => { const { updateServicesState } = useServices(); const { updateBalances, isLoaded, setIsLoaded } = useBalance(); const { activeStakingProgramId: currentStakingProgram } = useStakingProgram(); + const { hasEnoughServiceSlots } = useStakingContractInfo(); useEffect(() => { if (!isLoaded) { @@ -37,6 +39,7 @@ export const Main = () => { const hideMainOlasBalanceTopBorder = [ !backupSafeAddress, currentStakingProgram === StakingProgramId.Alpha, + !hasEnoughServiceSlots, ].some((condition) => !!condition); return ( @@ -71,7 +74,9 @@ export const Main = () => { - + {currentStakingProgram && ( + + )} diff --git a/frontend/components/MainPage/sections/AlertSections/NoAvailableSlotsOnTheContract.tsx b/frontend/components/MainPage/sections/AlertSections/NoAvailableSlotsOnTheContract.tsx new file mode 100644 index 00000000..68e38f80 --- /dev/null +++ b/frontend/components/MainPage/sections/AlertSections/NoAvailableSlotsOnTheContract.tsx @@ -0,0 +1,51 @@ +import { Flex, Typography } from 'antd'; + +import { useMigrate } from '@/components/ManageStakingPage/StakingContractSection/useMigrate'; +import { Pages } from '@/enums/PageState'; +import { StakingProgramId } from '@/enums/StakingProgram'; +import { usePageState } from '@/hooks/usePageState'; +import { useStakingContractInfo } from '@/hooks/useStakingContractInfo'; + +import { CustomAlert } from '../../../Alert'; + +const { Text } = Typography; + +type NoAvailableSlotsOnTheContractProps = { + stakingProgramId: StakingProgramId; +}; +export const NoAvailableSlotsOnTheContract = ({ + stakingProgramId, +}: NoAvailableSlotsOnTheContractProps) => { + const { goto } = usePageState(); + const { hasEnoughServiceSlots } = useStakingContractInfo(); + const { canUpdateStakingContract } = useMigrate(stakingProgramId); + + if (hasEnoughServiceSlots) return null; + + return ( + + + No available slots on the contract + + + Select a contract with available slots to be able to start your + agent. + + {canUpdateStakingContract && ( + goto(Pages.ManageStaking)} + > + Change staking contract + + )} + + } + /> + ); +}; diff --git a/frontend/components/MainPage/sections/AlertSections/index.tsx b/frontend/components/MainPage/sections/AlertSections/index.tsx index 905a375a..6772c384 100644 --- a/frontend/components/MainPage/sections/AlertSections/index.tsx +++ b/frontend/components/MainPage/sections/AlertSections/index.tsx @@ -1,12 +1,16 @@ import { CardSection } from '@/components/styled/CardSection'; +import { useStakingProgram } from '@/hooks/useStakingProgram'; import { AddBackupWalletAlert } from './AddBackupWalletAlert'; import { AvoidSuspensionAlert } from './AvoidSuspensionAlert'; import { LowTradingBalanceAlert } from './LowTradingBalanceAlert'; import { NewStakingProgramAlert } from './NewStakingProgramAlert'; +import { NoAvailableSlotsOnTheContract } from './NoAvailableSlotsOnTheContract'; import { UpdateAvailableAlert } from './UpdateAvailableAlert'; export const AlertSections = () => { + const { activeStakingProgramId } = useStakingProgram(); + return ( @@ -14,6 +18,11 @@ export const AlertSections = () => { + {activeStakingProgramId && ( + + )} ); }; diff --git a/frontend/components/MainPage/sections/StakingContractUpdate.tsx b/frontend/components/MainPage/sections/StakingContractUpdate.tsx index b769c470..3594f29e 100644 --- a/frontend/components/MainPage/sections/StakingContractUpdate.tsx +++ b/frontend/components/MainPage/sections/StakingContractUpdate.tsx @@ -4,37 +4,32 @@ import { useMemo } from 'react'; import { STAKING_PROGRAM_META } from '@/constants/stakingProgramMeta'; import { Pages } from '@/enums/PageState'; -import { useBalance } from '@/hooks/useBalance'; -import { useNeedsFunds } from '@/hooks/useNeedsFunds'; +import { StakingProgramId } from '@/enums/StakingProgram'; import { usePageState } from '@/hooks/usePageState'; import { useStakingProgram } from '@/hooks/useStakingProgram'; +import { useMigrate } from '../../ManageStakingPage/StakingContractSection/useMigrate'; import { CardSection } from '../../styled/CardSection'; const { Text } = Typography; -export const StakingContractUpdate = () => { +type StakingContractUpdateProps = { stakingProgramId: StakingProgramId }; +export const StakingContractUpdate = ({ + stakingProgramId, +}: StakingContractUpdateProps) => { const { goto } = usePageState(); - const { isBalanceLoaded, isLowBalance } = useBalance(); - const { needsInitialFunding } = useNeedsFunds(); const { activeStakingProgramMeta, isActiveStakingProgramLoaded, defaultStakingProgramId, } = useStakingProgram(); + const { canUpdateStakingContract } = useMigrate(stakingProgramId); const stakingContractName = useMemo(() => { if (activeStakingProgramMeta) return activeStakingProgramMeta.name; return STAKING_PROGRAM_META[defaultStakingProgramId].name; }, [activeStakingProgramMeta, defaultStakingProgramId]); - const canUpdateStakingContract = useMemo(() => { - if (!isBalanceLoaded) return false; - if (isLowBalance) return false; - if (needsInitialFunding) return false; - return true; - }, [isBalanceLoaded, isLowBalance, needsInitialFunding]); - const stakingButton = useMemo(() => { if (!isActiveStakingProgramLoaded) return ; return ( diff --git a/frontend/components/ManageStakingPage/StakingContractSection/CountdownUntilMigration.tsx b/frontend/components/ManageStakingPage/StakingContractSection/CountdownUntilMigration.tsx index d8f71c07..28a8accf 100644 --- a/frontend/components/ManageStakingPage/StakingContractSection/CountdownUntilMigration.tsx +++ b/frontend/components/ManageStakingPage/StakingContractSection/CountdownUntilMigration.tsx @@ -3,6 +3,7 @@ import { isNil } from 'lodash'; import { useState } from 'react'; import { useInterval } from 'usehooks-ts'; +import { POPOVER_WIDTH_LARGE } from '@/constants/width'; import { StakingContractInfo } from '@/types/Autonolas'; const { Text } = Typography; @@ -41,7 +42,7 @@ export const CountdownUntilMigration = ({ : countdownDisplayFormat(secondsUntilReady); return ( - + Can't switch because you unstaked too recently. This may be because your agent was suspended. Keep running your agent and you'll be able to switch in diff --git a/frontend/components/ManageStakingPage/StakingContractSection/StakingContractDetails.tsx b/frontend/components/ManageStakingPage/StakingContractSection/StakingContractDetails.tsx index 05020e20..607807cf 100644 --- a/frontend/components/ManageStakingPage/StakingContractSection/StakingContractDetails.tsx +++ b/frontend/components/ManageStakingPage/StakingContractSection/StakingContractDetails.tsx @@ -2,6 +2,7 @@ import { Alert, Skeleton } from 'antd'; import { useMemo } from 'react'; import { InfoBreakdownList } from '@/components/InfoBreakdown'; +import { NA } from '@/constants/symbols'; import { StakingProgramId } from '@/enums/StakingProgram'; import { useStakingContractInfo } from '@/hooks/useStakingContractInfo'; @@ -19,6 +20,10 @@ export const StakingContractDetails = ({ const details = stakingContractInfoRecord[stakingProgramId]; return [ + { + left: 'Available slots', + right: details.maxNumServices || NA, + }, { left: 'Rewards per epoch', right: `~ ${details.rewardsPerWorkPeriod?.toFixed(2)} OLAS`, @@ -26,6 +31,7 @@ export const StakingContractDetails = ({ { left: 'Estimated Annual Percentage Yield (APY)', right: `${details.apy}%`, + leftClassName: 'max-width-200', }, { left: 'Required OLAS for staking', diff --git a/frontend/components/ManageStakingPage/StakingContractSection/useMigrate.tsx b/frontend/components/ManageStakingPage/StakingContractSection/useMigrate.tsx index 624b9288..ef67412e 100644 --- a/frontend/components/ManageStakingPage/StakingContractSection/useMigrate.tsx +++ b/frontend/components/ManageStakingPage/StakingContractSection/useMigrate.tsx @@ -4,6 +4,7 @@ import { useMemo } from 'react'; import { DeploymentStatus } from '@/client'; import { StakingProgramId } from '@/enums/StakingProgram'; import { useBalance } from '@/hooks/useBalance'; +import { useNeedsFunds } from '@/hooks/useNeedsFunds'; import { useServices } from '@/hooks/useServices'; import { useServiceTemplates } from '@/hooks/useServiceTemplates'; import { useStakingContractInfo } from '@/hooks/useStakingContractInfo'; @@ -40,9 +41,11 @@ export const useMigrate = (stakingProgramId: StakingProgramId) => { isBalanceLoaded, masterSafeBalance: safeBalance, totalOlasStakedBalance, + isLowBalance, } = useBalance(); const { activeStakingProgramId, activeStakingProgramMeta } = useStakingProgram(); + const { needsInitialFunding } = useNeedsFunds(); const { activeStakingContractInfo, @@ -50,6 +53,7 @@ export const useMigrate = (stakingProgramId: StakingProgramId) => { isServiceStakedForMinimumDuration, isStakingContractInfoLoaded, stakingContractInfoRecord, + hasEnoughServiceSlots, } = useStakingContractInfo(); const stakingContractInfo = stakingContractInfoRecord?.[stakingProgramId]; @@ -231,8 +235,22 @@ export const useMigrate = (stakingProgramId: StakingProgramId) => { stakingProgramId, ]); + const canUpdateStakingContract = useMemo(() => { + if (!isBalanceLoaded) return false; + if (isLowBalance) return false; + if (needsInitialFunding) return false; + if (!hasEnoughServiceSlots) return false; + return true; + }, [ + isBalanceLoaded, + isLowBalance, + needsInitialFunding, + hasEnoughServiceSlots, + ]); + return { migrateValidation, firstDeployValidation, + canUpdateStakingContract, }; }; diff --git a/frontend/constants/symbols.ts b/frontend/constants/symbols.ts index 14c16e9f..5deb8016 100644 --- a/frontend/constants/symbols.ts +++ b/frontend/constants/symbols.ts @@ -1,3 +1,5 @@ +export const NA = 'n/a'; + export const UNICODE_SYMBOLS = { OLAS: '☴', EXTERNAL_LINK: '↗', diff --git a/frontend/constants/width.ts b/frontend/constants/width.ts index 65295b69..2bb0e5eb 100644 --- a/frontend/constants/width.ts +++ b/frontend/constants/width.ts @@ -1,3 +1,5 @@ export const MODAL_WIDTH = 412; export const POPOVER_WIDTH_MEDIUM = 260; + +export const POPOVER_WIDTH_LARGE = 340; diff --git a/frontend/styles/globals.scss b/frontend/styles/globals.scss index 8ac389c5..ee408e2b 100644 --- a/frontend/styles/globals.scss +++ b/frontend/styles/globals.scss @@ -262,10 +262,12 @@ ul.alert-list { .w-3\/4 { width: 75% !important; } - .w-full { width: 100% !important; } +.max-width-200 { + max-width: 200px; +} .loading-ellipses:after { overflow: hidden; diff --git a/frontend/types/Autonolas.ts b/frontend/types/Autonolas.ts index 9b1d04dc..1fdfd43c 100644 --- a/frontend/types/Autonolas.ts +++ b/frontend/types/Autonolas.ts @@ -12,6 +12,7 @@ export type StakingRewardsInfo = { export type StakingContractInfo = { availableRewards: number; + /* number of slots available for staking */ maxNumServices: number; serviceIds: number[]; /** minimum staking duration (in seconds) */ diff --git a/package.json b/package.json index 28133381..b9dbb657 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,5 @@ "download-binaries": "sh download_binaries.sh", "build:pearl": "sh build_pearl.sh" }, - "version": "0.1.0-rc184" + "version": "0.1.0-rc186" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0a48a9d4..f5109942 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "olas-operate-middleware" -version = "0.1.0-rc184" +version = "0.1.0-rc186" description = "" authors = ["David Vilela ", "Viraj Patel "] readme = "README.md" From 8c78861d4d942ce68eb70b4fd04423854662969f Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 10:14:35 +0000 Subject: [PATCH 02/39] chore: add openssl install --- .github/workflows/release.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eec34a41..eea6bd6a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,15 @@ jobs: steps: - uses: actions/checkout@v3 + # Install OpenSSL (fixes SSL module issue in Python on Mac only) + - name: Install OpenSSL + run: | + brew install openssl + echo "Adding OpenSSL to PATH" + echo "$(brew --prefix openssl)/bin" >> $GITHUB_PATH + echo "$(brew --prefix openssl)/lib" >> $GITHUB_PATH + echo "$(brew --prefix openssl)/include" >> $GITHUB_PATH + # Setup Python - uses: actions/setup-python@v4 with: @@ -35,7 +44,11 @@ jobs: # Set architecture for macos-latest-large as x64 and arm64 for other versions - name: Set architecture environment variable run: | - if [ "${{ matrix.os }}" == "macos-14-large" ]; then echo "OS_ARCH=x64" >> $GITHUB_ENV; else echo "OS_ARCH=arm64" >> $GITHUB_ENV; fi + if [ "${{ matrix.os }}" == "macos-14-large" ]; then + echo "OS_ARCH=x64" >> $GITHUB_ENV; + else + echo "OS_ARCH=arm64" >> $GITHUB_ENV; + fi # Cache Poetry dependencies with unique key for each environment and architecture - name: Cache Poetry dependencies From 666644d3f5f3eeecf78b6a84f625546dee66e651 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 10:14:45 +0000 Subject: [PATCH 03/39] chore: add openssl install & certifi CA bundle --- .github/workflows/release_win.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index 15676dfb..c7c4d0cc 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -23,6 +23,19 @@ jobs: steps: - uses: actions/checkout@v3 + # Install OpenSSL using Chocolatey and add to PATH + - name: Install OpenSSL + run: | + choco install openssl -y + echo "C:\Program Files\OpenSSL-Win64\bin" >> $GITHUB_PATH + openssl version + + # Install certifi for Python's CA certificate handling + - name: Install certifi for SSL + run: | + python -m pip install certifi + echo "REQUESTS_CA_BUNDLE=$(python -c 'import certifi; print(certifi.where())')" >> $GITHUB_ENV + - uses: actions/setup-python@v4 id: setup-python with: From 5751dcd457efaa282a27b9c68dc2f0bbfb16222c Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 10:19:17 +0000 Subject: [PATCH 04/39] fix: reduce yarn spamming to avoid rate limit, yarn timeouts --- .github/workflows/backend.yml | 7 +++++++ .github/workflows/frontend.yml | 7 +++++++ .github/workflows/release.yml | 10 +++++++++- .github/workflows/release_win.yml | 9 ++++++++- 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml index 124d9af9..242e2e8b 100644 --- a/.github/workflows/backend.yml +++ b/.github/workflows/backend.yml @@ -14,6 +14,13 @@ jobs: with: node-version: "20.x" + # Configure Yarn network settings for timeout, retries, and reduced concurrency + - name: Configure Yarn network settings + run: | + yarn config set network-timeout 60000 # Set network timeout to 1 minute + yarn config set network-retries 10 # Retry up to 10 times + yarn config set network-concurrency 2 # Reduce concurrency to 2 connections + # Python - uses: actions/setup-python@v4 with: diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 197e3174..e6a3654b 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -15,6 +15,13 @@ jobs: with: node-version: "20.x" + # Configure Yarn network settings for timeout, retries, and reduced concurrency + - name: Configure Yarn network settings + run: | + yarn config set network-timeout 60000 # Set network timeout to 1 minute + yarn config set network-retries 10 # Retry up to 10 times + yarn config set network-concurrency 2 # Reduce concurrency to 2 connections + # Install dependencies - name: Install dependencies run: yarn install:frontend diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eea6bd6a..ddbfcb48 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -99,7 +99,15 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20.x" - registry-url: "https://registry.npmjs.org" + registry-url: "https://registry.npmjs.org" + + # Configure Yarn network settings for timeout, retries, and reduced concurrency + - name: Configure Yarn network settings + run: | + yarn config set network-timeout 60000 # Set network timeout to 1 minute + yarn config set network-retries 10 # Retry up to 10 times + yarn config set network-concurrency 2 # Reduce concurrency to 2 connections + # Download the appropriate architecture artifact - name: Download Pearl binary for architecture diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index c7c4d0cc..c9050dc7 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -44,7 +44,14 @@ jobs: - uses: actions/setup-node@v4 with: node-version: "20.x" - registry-url: "https://registry.npmjs.org" + registry-url: "https://registry.npmjs.org" + + # Configure Yarn network settings for timeout, retries, and reduced concurrency + - name: Configure Yarn network settings + run: | + yarn config set network-timeout 60000 # Set network timeout to 1 minute + yarn config set network-retries 10 # Retry up to 10 times + yarn config set network-concurrency 2 # Reduce concurrency to 2 connections - name: Install and configure Poetry uses: snok/install-poetry@v1 From ce0424d1b6e551cbd1e3428d370859a534bb5569 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 10:25:12 +0000 Subject: [PATCH 05/39] fix: add openssl to path for python --- .github/workflows/release.yml | 6 +++--- .github/workflows/release_win.yml | 14 ++++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ddbfcb48..b3045e6c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,14 +17,14 @@ jobs: steps: - uses: actions/checkout@v3 - # Install OpenSSL (fixes SSL module issue in Python on Mac only) + # Install OpenSSL for Mac with Homebrew and set up the environment for Python to locate it - name: Install OpenSSL run: | brew install openssl echo "Adding OpenSSL to PATH" echo "$(brew --prefix openssl)/bin" >> $GITHUB_PATH - echo "$(brew --prefix openssl)/lib" >> $GITHUB_PATH - echo "$(brew --prefix openssl)/include" >> $GITHUB_PATH + echo "SSL_CERT_FILE=$(brew --prefix openssl)/etc/openssl/cert.pem" >> $GITHUB_ENV + echo "REQUESTS_CA_BUNDLE=$(brew --prefix openssl)/etc/openssl/cert.pem" >> $GITHUB_ENV # Setup Python - uses: actions/setup-python@v4 diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index c9050dc7..184bfbed 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -28,18 +28,20 @@ jobs: run: | choco install openssl -y echo "C:\Program Files\OpenSSL-Win64\bin" >> $GITHUB_PATH + echo "SSL_CERT_FILE=C:\Program Files\OpenSSL-Win64\cert.pem" >> $GITHUB_ENV + echo "REQUESTS_CA_BUNDLE=C:\Program Files\OpenSSL-Win64\cert.pem" >> $GITHUB_ENV openssl version - - # Install certifi for Python's CA certificate handling - - name: Install certifi for SSL - run: | - python -m pip install certifi - echo "REQUESTS_CA_BUNDLE=$(python -c 'import certifi; print(certifi.where())')" >> $GITHUB_ENV - uses: actions/setup-python@v4 id: setup-python with: python-version: "3.10" + + # Install certifi for Python's CA certificate handling (more upto date than OpenSSL) + - name: Install certifi for SSL + run: | + python -m pip install certifi + echo "REQUESTS_CA_BUNDLE=$(python -c 'import certifi; print(certifi.where())')" >> $GITHUB_ENV - uses: actions/setup-node@v4 with: From e67bf8c8beabc308639da477e0f4179f40e4c21b Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 10:31:41 +0000 Subject: [PATCH 06/39] chore: install certifi and test https url --- .github/workflows/release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3045e6c..fc0cbfd8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,6 +31,16 @@ jobs: with: python-version: "3.10" + # Install certifi + - name: Reinstall certifi to ensure latest CA certificates + run: python -m pip install --upgrade certifi + + # Verify SSL by testing a simple HTTPS request + - name: Test SSL with HTTPS Request + run: | + python -c "import ssl; print(ssl.OPENSSL_VERSION)" + python -c "import urllib.request; urllib.request.urlopen('https://pypi.org')" + # Install Poetry and its dependencies - name: Install and configure Poetry uses: snok/install-poetry@v1 From c2c103f101e48abc21e857ca9a6839c7061c85d8 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 10:36:17 +0000 Subject: [PATCH 07/39] fix: remote certifi, test default ca bundles --- .github/workflows/release.yml | 4 ---- .github/workflows/release_win.yml | 6 ------ 2 files changed, 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc0cbfd8..987e17e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,10 +30,6 @@ jobs: - uses: actions/setup-python@v4 with: python-version: "3.10" - - # Install certifi - - name: Reinstall certifi to ensure latest CA certificates - run: python -m pip install --upgrade certifi # Verify SSL by testing a simple HTTPS request - name: Test SSL with HTTPS Request diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index 184bfbed..4348ccbe 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -36,12 +36,6 @@ jobs: id: setup-python with: python-version: "3.10" - - # Install certifi for Python's CA certificate handling (more upto date than OpenSSL) - - name: Install certifi for SSL - run: | - python -m pip install certifi - echo "REQUESTS_CA_BUNDLE=$(python -c 'import certifi; print(certifi.where())')" >> $GITHUB_ENV - uses: actions/setup-node@v4 with: From ac8f0806f9432f3b0ed4fc5518d2ff9429ef374a Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 10:45:49 +0000 Subject: [PATCH 08/39] fix: ensure latest setup python is being used with openssl --- .github/workflows/release.yml | 17 +++++++++++++---- .github/workflows/release_win.yml | 26 +++++++++++++++++--------- 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 987e17e9..99594155 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,19 +17,28 @@ jobs: steps: - uses: actions/checkout@v3 - # Install OpenSSL for Mac with Homebrew and set up the environment for Python to locate it + # Install OpenSSL with Homebrew and set environment variables - name: Install OpenSSL run: | brew install openssl - echo "Adding OpenSSL to PATH" - echo "$(brew --prefix openssl)/bin" >> $GITHUB_PATH echo "SSL_CERT_FILE=$(brew --prefix openssl)/etc/openssl/cert.pem" >> $GITHUB_ENV echo "REQUESTS_CA_BUNDLE=$(brew --prefix openssl)/etc/openssl/cert.pem" >> $GITHUB_ENV - # Setup Python + # Set up Python with setup-python action and add it to PATH - uses: actions/setup-python@v4 + id: setup-python with: python-version: "3.10" + + - name: Add Python to PATH + run: | + echo "${{ steps.setup-python.outputs.python-path }}/bin" >> $GITHUB_PATH + + # Verify which Python is being used + - name: Verify Python Version and Location + run: | + which python + python --version # Verify SSL by testing a simple HTTPS request - name: Test SSL with HTTPS Request diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index 4348ccbe..a0a22fec 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -23,20 +23,28 @@ jobs: steps: - uses: actions/checkout@v3 - # Install OpenSSL using Chocolatey and add to PATH - - name: Install OpenSSL - run: | - choco install openssl -y - echo "C:\Program Files\OpenSSL-Win64\bin" >> $GITHUB_PATH - echo "SSL_CERT_FILE=C:\Program Files\OpenSSL-Win64\cert.pem" >> $GITHUB_ENV - echo "REQUESTS_CA_BUNDLE=C:\Program Files\OpenSSL-Win64\cert.pem" >> $GITHUB_ENV - openssl version - + # Set up Python with setup-python action and add it to PATH - uses: actions/setup-python@v4 id: setup-python with: python-version: "3.10" + - name: Add Python to PATH + run: | + echo "${{ steps.setup-python.outputs.python-path }}" >> $GITHUB_PATH + + # Verify which Python is being used + - name: Verify Python Version and Location + run: | + where python + python --version + + # Verify SSL by testing a simple HTTPS request + - name: Test SSL with HTTPS Request + run: | + python -c "import ssl; print(ssl.OPENSSL_VERSION)" + python -c "import urllib.request; urllib.request.urlopen('https://pypi.org')" + - uses: actions/setup-node@v4 with: node-version: "20.x" From 0e36c2714dbfc1081e00c952e566188320685c16 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 10:46:32 +0000 Subject: [PATCH 09/39] chore: readd open ssl --- .github/workflows/release_win.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index a0a22fec..1018e33d 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -23,6 +23,15 @@ jobs: steps: - uses: actions/checkout@v3 + # Install OpenSSL using Chocolatey and set environment variables + - name: Install OpenSSL + run: | + choco install openssl.light -y + echo "C:\Program Files\OpenSSL-Win64\bin" >> $GITHUB_PATH + echo "SSL_CERT_FILE=C:\Program Files\OpenSSL-Win64\cert.pem" >> $GITHUB_ENV + echo "REQUESTS_CA_BUNDLE=C:\Program Files\OpenSSL-Win64\cert.pem" >> $GITHUB_ENV + openssl version + # Set up Python with setup-python action and add it to PATH - uses: actions/setup-python@v4 id: setup-python From 9f2e26445904e9babb00b1653d9baf5252e866ec Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 10:56:58 +0000 Subject: [PATCH 10/39] chore: test setup-python action v5 --- .github/workflows/release.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99594155..c6fb85bf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,28 +17,11 @@ jobs: steps: - uses: actions/checkout@v3 - # Install OpenSSL with Homebrew and set environment variables - - name: Install OpenSSL - run: | - brew install openssl - echo "SSL_CERT_FILE=$(brew --prefix openssl)/etc/openssl/cert.pem" >> $GITHUB_ENV - echo "REQUESTS_CA_BUNDLE=$(brew --prefix openssl)/etc/openssl/cert.pem" >> $GITHUB_ENV - # Set up Python with setup-python action and add it to PATH - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 id: setup-python with: python-version: "3.10" - - - name: Add Python to PATH - run: | - echo "${{ steps.setup-python.outputs.python-path }}/bin" >> $GITHUB_PATH - - # Verify which Python is being used - - name: Verify Python Version and Location - run: | - which python - python --version # Verify SSL by testing a simple HTTPS request - name: Test SSL with HTTPS Request From 1121cb468a7c245372074966891e6a6fa4262866 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 11:07:57 +0000 Subject: [PATCH 11/39] chore: test no macos-large, use arch matrix --- .github/workflows/release.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c6fb85bf..d2568fda 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-14, macos-14-large] + os: [macos-14] + arch: [arm64, x64] steps: - uses: actions/checkout@v3 @@ -41,12 +42,9 @@ jobs: # Set architecture for macos-latest-large as x64 and arm64 for other versions - name: Set architecture environment variable - run: | - if [ "${{ matrix.os }}" == "macos-14-large" ]; then - echo "OS_ARCH=x64" >> $GITHUB_ENV; - else - echo "OS_ARCH=arm64" >> $GITHUB_ENV; - fi + run: + echo "OS_ARCH=${{ matrix.arch }}" >> $GITHUB_ENV; + # Cache Poetry dependencies with unique key for each environment and architecture - name: Cache Poetry dependencies @@ -56,9 +54,9 @@ jobs: ~/.cache/pypoetry ~/.cache/pip ~/.venv - key: poetry-${{ env.OS_ARCH }}-${{ hashFiles('**/poetry.lock') }} + key: poetry-${{ matrix.arch }}-${{ hashFiles('**/poetry.lock') }} restore-keys: | - poetry-${{ env.OS_ARCH }}- + poetry-${{ matrix.arch }}- - name: Install dependencies run: poetry install @@ -68,18 +66,18 @@ jobs: run: | trader_version=$(poetry run python -c "import yaml; config = yaml.safe_load(open('templates/trader.yaml')); print(config['service_version'])") echo $trader_version - mkdir dist && curl -L -o dist/aea_bin "https://github.com/valory-xyz/trader/releases/download/${trader_version}/trader_bin_${{ env.OS_ARCH }}" + mkdir dist && curl -L -o dist/aea_bin "https://github.com/valory-xyz/trader/releases/download/${trader_version}/trader_bin_${{ matrix.arch }}" - name: Build with PyInstaller run: | poetry run pyinstaller operate/services/utils/tendermint.py --onefile - poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_bin:. --add-binary dist/tendermint:. --onefile --name pearl_${{ env.OS_ARCH }} + poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_bin:. --add-binary dist/tendermint:. --onefile --name pearl_${{ matrix.arch }} - name: Upload Release Assets uses: actions/upload-artifact@v4 with: - name: pearl_${{ env.OS_ARCH }} - path: dist/pearl_${{ env.OS_ARCH }} + name: pearl_${{ matrix.arch }} + path: dist/pearl_${{ matrix.arch }} # Jobs for production and development, running separately for x64 and arm64 build-release: From 4fe82a42f926e7378800d66cceadfbfd4b6b3715 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 11:24:44 +0000 Subject: [PATCH 12/39] chore: update release workflow to set OS_ARCH env and specify macos-14 everywhere --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2568fda..7c95177a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,7 +40,7 @@ jobs: virtualenvs-path: ~/my-custom-path installer-parallel: true - # Set architecture for macos-latest-large as x64 and arm64 for other versions + # Set OS_ARCH env - name: Set architecture environment variable run: echo "OS_ARCH=${{ matrix.arch }}" >> $GITHUB_ENV; @@ -81,7 +81,7 @@ jobs: # Jobs for production and development, running separately for x64 and arm64 build-release: - runs-on: macos-latest + runs-on: macos-14 strategy: matrix: env: [production, development] From 55e1b0841946acfa3334788ba25cfe82c8b09491 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 11:27:40 +0000 Subject: [PATCH 13/39] chore: remove error catches from app build and release --- build-win-tenderly.js | 2 +- build-win.js | 2 +- build.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build-win-tenderly.js b/build-win-tenderly.js index 68fbdbbf..82d837d2 100644 --- a/build-win-tenderly.js +++ b/build-win-tenderly.js @@ -35,4 +35,4 @@ const main = async () => { }); }; -main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); +main().then((response) => { console.log('Build & Notarize complete'); }) \ No newline at end of file diff --git a/build-win.js b/build-win.js index 9427337c..272ce289 100644 --- a/build-win.js +++ b/build-win.js @@ -46,4 +46,4 @@ const main = async () => { }); }; -main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); +main().then((response) => { console.log('Build & Notarize complete'); }) diff --git a/build.js b/build.js index 3b834a07..1d25e01e 100644 --- a/build.js +++ b/build.js @@ -65,4 +65,4 @@ const main = async () => { }); }; -main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); +main().then((response) => { console.log('Build & Notarize complete'); }); From d7763c120b1a4cba94c89328dcf9c9e418944dc4 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 11:31:56 +0000 Subject: [PATCH 14/39] chore: update @electron/notarize to version 2.5.0 and refresh dependencies in yarn.lock --- package.json | 4 ++-- yarn.lock | 39 ++++++++++++++++++++++++++++++++------- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index ffb04760..ab823607 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "zod": "^3.23.8" }, "devDependencies": { - "@electron/notarize": "^2.3.0", + "@electron/notarize": "^2.5.0", "dotenv-cli": "^7.4.2", "electron": "30.0.6", "electron-builder": "^24.12.0", @@ -64,4 +64,4 @@ "build:pearl": "sh build_pearl.sh" }, "version": "0.1.0-rc188" -} \ No newline at end of file +} diff --git a/yarn.lock b/yarn.lock index b8e7bcff..9943c185 100644 --- a/yarn.lock +++ b/yarn.lock @@ -157,10 +157,10 @@ fs-extra "^9.0.1" promise-retry "^2.0.1" -"@electron/notarize@^2.3.0": - version "2.3.2" - resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.3.2.tgz#20a52a961747be8542a35003380988a0d3fe15e6" - integrity sha512-zfayxCe19euNwRycCty1C7lF7snk9YwfRpB5M8GLr1a4ICH63znxaPNAubrMvj0yDvVozqfgsdYpXVUnpWBDpg== +"@electron/notarize@^2.5.0": + version "2.5.0" + resolved "https://registry.npmjs.org/@electron/notarize/-/notarize-2.5.0.tgz#d4d25356adfa29df4a76bd64a8bd347237cd251e" + integrity sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A== dependencies: debug "^4.1.1" fs-extra "^9.0.1" @@ -5086,7 +5086,16 @@ string-convert@^0.2.0: resolved "https://registry.yarnpkg.com/string-convert/-/string-convert-0.2.1.tgz#6982cc3049fbb4cd85f8b24568b9d9bf39eeff97" integrity sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A== -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -5111,7 +5120,14 @@ string_decoder@^1.1.1: dependencies: safe-buffer "~5.2.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + +strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -5491,7 +5507,16 @@ workerpool@^6.5.1: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544" integrity sha512-Fs4dNYcsdpYSAfVxhnl1L5zTksjvOJxtC5hzMNl+1t9B8hTJTdKDyZ5ju7ztgPy+ft9tBFXoOlDNiOT9WUXZlA== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== From 04149fda2ada9f7dd2fa21328d2bffd4961376a2 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 12:01:58 +0000 Subject: [PATCH 15/39] chore: enhance build logging to include response and error details --- build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.js b/build.js index 1d25e01e..f2becba3 100644 --- a/build.js +++ b/build.js @@ -65,4 +65,4 @@ const main = async () => { }); }; -main().then((response) => { console.log('Build & Notarize complete'); }); +main().then((response) => { console.log('Build & Notarize complete'); console.log(JSON.stringify(response)); }).catch((error) => { console.log('Failed to build and notarize.'); console.error(JSON.stringify(error)); process.exit(1); }); From e0bba6e7a129406ca081a26a1f5be2ffe3c49d48 Mon Sep 17 00:00:00 2001 From: Mohan Date: Fri, 8 Nov 2024 17:32:11 +0530 Subject: [PATCH 16/39] feat: Notify user when epoch has changed (#387) * feat: init logic * feat: add file * feat: move service not loading to hook * feat: add first condition, if agent is not running show notification * feat: move queries to graphql/queries * feat: add logic regarding notification * feat: cleaup and remove unwanted comments * chore: renames * refactor: reorganize notification hooks and improve structure * feat: add contract event listener for new epoch notifications * feat: integrate active staking contract info and update epoch notification logic --------- Co-authored-by: truemiller --- frontend/components/Layout/index.tsx | 8 +++ .../MainPage/header/AgentButton.tsx | 15 ++--- .../StakingRewardsThisEpoch.tsx | 34 +--------- frontend/graphql/queries.ts | 35 +++++++++++ frontend/hooks/useNotifyOnNewEpoch.ts | 62 +++++++++++++++++++ frontend/hooks/useServices.ts | 25 ++++++-- frontend/service/Autonolas.ts | 3 + frontend/types/Autonolas.ts | 2 + frontend/types/Epoch.ts | 8 +++ 9 files changed, 146 insertions(+), 46 deletions(-) create mode 100644 frontend/graphql/queries.ts create mode 100644 frontend/hooks/useNotifyOnNewEpoch.ts create mode 100644 frontend/types/Epoch.ts diff --git a/frontend/components/Layout/index.tsx b/frontend/components/Layout/index.tsx index 42610c1b..22f3c7bb 100644 --- a/frontend/components/Layout/index.tsx +++ b/frontend/components/Layout/index.tsx @@ -5,6 +5,7 @@ import styled, { css } from 'styled-components'; import { COLOR } from '@/constants/colors'; import { OnlineStatusContext } from '@/context/OnlineStatusProvider'; +import { useNotifyOnNewEpoch } from '@/hooks/useNotifyOnNewEpoch'; import { TopBar } from './TopBar'; @@ -39,11 +40,18 @@ const Body = styled.div` overflow-y: auto; `; +const useSystemLevelNotifications = () => { + useNotifyOnNewEpoch(); +}; + export const Layout = ({ children, }: PropsWithChildren & { vertical?: boolean }) => { const { isOnline } = useContext(OnlineStatusContext); + // all the app level notifications + useSystemLevelNotifications(); + useEffect(() => { let messageKey; if (!isOnline) { diff --git a/frontend/components/MainPage/header/AgentButton.tsx b/frontend/components/MainPage/header/AgentButton.tsx index f0846bb6..092b587d 100644 --- a/frontend/components/MainPage/header/AgentButton.tsx +++ b/frontend/components/MainPage/header/AgentButton.tsx @@ -340,8 +340,8 @@ const AgentNotRunningButton = () => { export const AgentButton = () => { const { - service, serviceStatus, + isServiceNotRunning, hasInitialLoaded: isServicesLoaded, } = useServices(); const { isStakingContractInfoRecordLoaded } = useStakingContractContext(); @@ -365,16 +365,11 @@ export const AgentButton = () => { return ; } - if (!isEligibleForStaking && isAgentEvicted) + if (!isEligibleForStaking && isAgentEvicted) { return ; + } - if ( - !service || - serviceStatus === DeploymentStatus.STOPPED || - serviceStatus === DeploymentStatus.CREATED || - serviceStatus === DeploymentStatus.BUILT || - serviceStatus === DeploymentStatus.DELETED - ) { + if (isServiceNotRunning) { return ; } @@ -385,6 +380,6 @@ export const AgentButton = () => { serviceStatus, isEligibleForStaking, isAgentEvicted, - service, + isServiceNotRunning, ]); }; diff --git a/frontend/components/MainPage/sections/RewardsSection/StakingRewardsThisEpoch.tsx b/frontend/components/MainPage/sections/RewardsSection/StakingRewardsThisEpoch.tsx index bb4d07ba..1ea39be0 100644 --- a/frontend/components/MainPage/sections/RewardsSection/StakingRewardsThisEpoch.tsx +++ b/frontend/components/MainPage/sections/RewardsSection/StakingRewardsThisEpoch.tsx @@ -1,51 +1,21 @@ import { InfoCircleOutlined } from '@ant-design/icons'; import { useQuery } from '@tanstack/react-query'; import { Popover, Typography } from 'antd'; -import { gql, request } from 'graphql-request'; -import { z } from 'zod'; -import { GNOSIS_REWARDS_HISTORY_SUBGRAPH_URL } from '@/constants/urls'; import { POPOVER_WIDTH_MEDIUM } from '@/constants/width'; +import { getLatestEpochDetails } from '@/graphql/queries'; import { useStakingProgram } from '@/hooks/useStakingProgram'; import { formatToTime } from '@/utils/time'; const { Text } = Typography; -const EpochTimeResponseSchema = z.object({ - epochLength: z.string(), - blockTimestamp: z.string(), -}); -type EpochTimeResponse = z.infer; - const useEpochEndTime = () => { const { activeStakingProgramAddress } = useStakingProgram(); - const latestEpochTimeQuery = gql` - query { - checkpoints( - orderBy: epoch - orderDirection: desc - first: 1 - where: { - contractAddress: "${activeStakingProgramAddress}" - } - ) { - epochLength - blockTimestamp - } - } - `; - const { data, isLoading } = useQuery({ queryKey: ['latestEpochTime'], queryFn: async () => { - const response = (await request( - GNOSIS_REWARDS_HISTORY_SUBGRAPH_URL, - latestEpochTimeQuery, - )) as { - checkpoints: EpochTimeResponse[]; - }; - return EpochTimeResponseSchema.parse(response.checkpoints[0]); + return await getLatestEpochDetails(activeStakingProgramAddress as string); }, select: (data) => { // last epoch end time + epoch length diff --git a/frontend/graphql/queries.ts b/frontend/graphql/queries.ts new file mode 100644 index 00000000..c2c3e680 --- /dev/null +++ b/frontend/graphql/queries.ts @@ -0,0 +1,35 @@ +import { gql, request } from 'graphql-request'; + +import { GNOSIS_REWARDS_HISTORY_SUBGRAPH_URL } from '@/constants/urls'; +import { + EpochDetailsResponse, + EpochDetailsResponseSchema, +} from '@/types/Epoch'; + +export const getLatestEpochTimeQuery = (contractAddress: string) => gql` + query { + checkpoints( + orderBy: epoch + orderDirection: desc + first: 1 + where: { + contractAddress: "${contractAddress}" + } + ) { + epoch + epochLength + blockTimestamp + } + } +`; + +export const getLatestEpochDetails = async (contractAddress: string) => { + const response = await request<{ + checkpoints: EpochDetailsResponse[]; + }>( + GNOSIS_REWARDS_HISTORY_SUBGRAPH_URL, + getLatestEpochTimeQuery(contractAddress), + ); + + return EpochDetailsResponseSchema.parse(response.checkpoints[0]); +}; diff --git a/frontend/hooks/useNotifyOnNewEpoch.ts b/frontend/hooks/useNotifyOnNewEpoch.ts new file mode 100644 index 00000000..11e544ac --- /dev/null +++ b/frontend/hooks/useNotifyOnNewEpoch.ts @@ -0,0 +1,62 @@ +import { useEffect, useState } from 'react'; + +import { useElectronApi } from '@/hooks/useElectronApi'; +import { useServices } from '@/hooks/useServices'; + +import { useActiveStakingContractInfo } from './useStakingContractInfo'; + +type EpochStatusNotification = { + lastEpoch: number; + isNotified: boolean; +}; + +/** + * Hook to notify the user when a new epoch is started + * and agent is not running. + */ +export const useNotifyOnNewEpoch = () => { + const { showNotification } = useElectronApi(); + const { isServiceNotRunning } = useServices(); + + const { activeStakingContractInfo, isActiveStakingContractInfoLoaded } = + useActiveStakingContractInfo(); + const epoch = activeStakingContractInfo?.epochCounter; + + const [epochStatusNotification, setEpochStatusNotification] = + useState(null); + + useEffect(() => { + // if active staking contract info is not loaded yet, return + if (!isActiveStakingContractInfoLoaded) return; + + // if agent is running, no need to show notification + if (!isServiceNotRunning) return; + + // latest epoch is not loaded yet + if (!epoch) return; + + // first time, just load the epoch status + if (!epochStatusNotification) { + setEpochStatusNotification({ lastEpoch: epoch, isNotified: false }); + return; + } + + // already notified for this epoch + if (epochStatusNotification.isNotified) return; + + // if latest epoch is not the last notified epoch + if (epochStatusNotification.lastEpoch !== epoch) { + showNotification?.( + 'Start your agent to avoid missing rewards and getting evicted.', + ); + + setEpochStatusNotification({ lastEpoch: epoch, isNotified: true }); + } + }, [ + isServiceNotRunning, + epochStatusNotification, + epoch, + isActiveStakingContractInfoLoaded, + showNotification, + ]); +}; diff --git a/frontend/hooks/useServices.ts b/frontend/hooks/useServices.ts index 6f11330a..0e36b85c 100644 --- a/frontend/hooks/useServices.ts +++ b/frontend/hooks/useServices.ts @@ -1,6 +1,11 @@ -import { useContext } from 'react'; - -import { Service, ServiceHash, ServiceTemplate } from '@/client'; +import { useContext, useMemo } from 'react'; + +import { + DeploymentStatus, + Service, + ServiceHash, + ServiceTemplate, +} from '@/client'; import { CHAINS } from '@/constants/chains'; import { ServicesContext } from '@/context/ServicesProvider'; import MulticallService from '@/service/Multicall'; @@ -91,12 +96,24 @@ export const useServices = () => { const deleteServiceState = (serviceHash: ServiceHash) => setServices((prev) => prev?.filter((s) => s.hash !== serviceHash)); + const service = services?.[0]; + + const isServiceNotRunning = useMemo( + () => + !service || + serviceStatus === DeploymentStatus.STOPPED || + serviceStatus === DeploymentStatus.CREATED || + serviceStatus === DeploymentStatus.BUILT || + serviceStatus === DeploymentStatus.DELETED, + [service, serviceStatus], + ); return { - service: services?.[0], + service, services, serviceId, serviceStatus, + isServiceNotRunning, setServiceStatus, getServiceFromState, getServicesFromState, diff --git a/frontend/service/Autonolas.ts b/frontend/service/Autonolas.ts index f926daab..e18119a6 100644 --- a/frontend/service/Autonolas.ts +++ b/frontend/service/Autonolas.ts @@ -225,6 +225,7 @@ const getStakingContractInfoByServiceIdStakingProgram = async ( serviceId, ), serviceStakingTokenMechUsageContracts[stakingProgramId].minStakingDeposit(), + serviceStakingTokenMechUsageContracts[stakingProgramId].epochCounter(), ]; await gnosisMulticallProvider.init(); @@ -238,6 +239,7 @@ const getStakingContractInfoByServiceIdStakingProgram = async ( serviceInfo, serviceStakingState, minStakingDeposit, + epochCounter, ] = multicallResponse; const availableRewards = parseFloat( @@ -254,6 +256,7 @@ const getStakingContractInfoByServiceIdStakingProgram = async ( serviceStakingStartTime: serviceInfo.tsStart.toNumber(), serviceStakingState, minStakingDeposit: parseFloat(ethers.utils.formatEther(minStakingDeposit)), + epochCounter: epochCounter.toNumber(), }; }; diff --git a/frontend/types/Autonolas.ts b/frontend/types/Autonolas.ts index 1fdfd43c..77d47040 100644 --- a/frontend/types/Autonolas.ts +++ b/frontend/types/Autonolas.ts @@ -29,4 +29,6 @@ export type StakingContractInfo = { olasStakeRequired: number; /** rewards per work period */ rewardsPerWorkPeriod: number; + /** current epoch */ + epochCounter: number; }; diff --git a/frontend/types/Epoch.ts b/frontend/types/Epoch.ts new file mode 100644 index 00000000..76ae7887 --- /dev/null +++ b/frontend/types/Epoch.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const EpochDetailsResponseSchema = z.object({ + epoch: z.string(), + epochLength: z.string(), + blockTimestamp: z.string(), +}); +export type EpochDetailsResponse = z.infer; From bc468d8de579dad62acf1d7716533fec1b90e351 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 12:21:55 +0000 Subject: [PATCH 17/39] chore: update electron, 30 is deprecated --- package.json | 4 +- yarn.lock | 767 ++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 615 insertions(+), 156 deletions(-) diff --git a/package.json b/package.json index ab823607..a73c69ff 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "devDependencies": { "@electron/notarize": "^2.5.0", "dotenv-cli": "^7.4.2", - "electron": "30.0.6", - "electron-builder": "^24.12.0", + "electron": "^33.2.0", + "electron-builder": "^25.1.8", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-prettier": "^5.1.3", diff --git a/yarn.lock b/yarn.lock index 9943c185..4cac5ded 100644 --- a/yarn.lock +++ b/yarn.lock @@ -124,10 +124,10 @@ ajv "^6.12.0" ajv-keywords "^3.4.1" -"@electron/asar@^3.2.1": - version "3.2.10" - resolved "https://registry.yarnpkg.com/@electron/asar/-/asar-3.2.10.tgz#615cf346b734b23cafa4e0603551010bd0e50aa8" - integrity sha512-mvBSwIBUeiRscrCeJE1LwctAriBj65eUDm0Pc11iE5gRwzkmsdbS7FnZ1XUWjpSeQWL1L5g12Fc/SchPM9DUOw== +"@electron/asar@^3.2.7": + version "3.2.17" + resolved "https://registry.npmjs.org/@electron/asar/-/asar-3.2.17.tgz#91d28087aad80d1a1c8cc4e667c6476edf50f949" + integrity sha512-OcWImUI686w8LkghQj9R2ynZ2ME693Ek6L1SiaAgqGKzBaTIZw3fHDqN82Rcl+EU1Gm9EgkJ5KLIY/q5DCRbbA== dependencies: commander "^5.0.0" glob "^7.1.6" @@ -148,16 +148,7 @@ optionalDependencies: global-agent "^3.0.0" -"@electron/notarize@2.2.1": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@electron/notarize/-/notarize-2.2.1.tgz#d0aa6bc43cba830c41bfd840b85dbe0e273f59fe" - integrity sha512-aL+bFMIkpR0cmmj5Zgy0LMKEpgy43/hw5zadEArgmAMWWlKc5buwFvFT9G/o/YJkvXAJm5q3iuTuLaiaXW39sg== - dependencies: - debug "^4.1.1" - fs-extra "^9.0.1" - promise-retry "^2.0.1" - -"@electron/notarize@^2.5.0": +"@electron/notarize@2.5.0", "@electron/notarize@^2.5.0": version "2.5.0" resolved "https://registry.npmjs.org/@electron/notarize/-/notarize-2.5.0.tgz#d4d25356adfa29df4a76bd64a8bd347237cd251e" integrity sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A== @@ -166,10 +157,10 @@ fs-extra "^9.0.1" promise-retry "^2.0.1" -"@electron/osx-sign@1.0.5": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@electron/osx-sign/-/osx-sign-1.0.5.tgz#0af7149f2fce44d1a8215660fd25a9fb610454d8" - integrity sha512-k9ZzUQtamSoweGQDV2jILiRIHUu7lYlJ3c6IEmjv1hC17rclE+eb9U+f6UFlOOETo0JzY1HNlXy4YOlCvl+Lww== +"@electron/osx-sign@1.3.1": + version "1.3.1" + resolved "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.3.1.tgz#faf7eeca7ca004a6be541dc4cf7a1bd59ec59b1c" + integrity sha512-BAfviURMHpmb1Yb50YbCxnOY0wfwaLXH5KJ4+80zS0gUkzDX3ec23naTlEqKsN+PwYn+a1cCzM7BJ4Wcd3sGzw== dependencies: compare-version "^0.1.2" debug "^4.3.4" @@ -178,18 +169,38 @@ minimist "^1.2.6" plist "^3.0.5" -"@electron/universal@1.5.1": - version "1.5.1" - resolved "https://registry.yarnpkg.com/@electron/universal/-/universal-1.5.1.tgz#f338bc5bcefef88573cf0ab1d5920fac10d06ee5" - integrity sha512-kbgXxyEauPJiQQUNG2VgUeyfQNFk6hBF11ISN2PNI6agUgPl55pv4eQmaqHzTAzchBvqZ2tQuRVaPStGf0mxGw== +"@electron/rebuild@3.6.1": + version "3.6.1" + resolved "https://registry.npmjs.org/@electron/rebuild/-/rebuild-3.6.1.tgz#59e8e36c3f6e6b94a699425dfb61f0394c3dd4df" + integrity sha512-f6596ZHpEq/YskUd8emYvOUne89ij8mQgjYFA5ru25QwbrRO+t1SImofdDv7kKOuWCmVOuU5tvfkbgGxIl3E/w== + dependencies: + "@malept/cross-spawn-promise" "^2.0.0" + chalk "^4.0.0" + debug "^4.1.1" + detect-libc "^2.0.1" + fs-extra "^10.0.0" + got "^11.7.0" + node-abi "^3.45.0" + node-api-version "^0.2.0" + node-gyp "^9.0.0" + ora "^5.1.0" + read-binary-file-arch "^1.0.6" + semver "^7.3.5" + tar "^6.0.5" + yargs "^17.0.1" + +"@electron/universal@2.0.1": + version "2.0.1" + resolved "https://registry.npmjs.org/@electron/universal/-/universal-2.0.1.tgz#7b070ab355e02957388f3dbd68e2c3cd08c448ae" + integrity sha512-fKpv9kg4SPmt+hY7SVBnIYULE9QJl8L3sCfcBsnqbJwwBwAeTLokJ9TRt9y7bK0JAzIW2y78TVVjvnQEms/yyA== dependencies: - "@electron/asar" "^3.2.1" - "@malept/cross-spawn-promise" "^1.1.0" + "@electron/asar" "^3.2.7" + "@malept/cross-spawn-promise" "^2.0.0" debug "^4.3.1" - dir-compare "^3.0.0" - fs-extra "^9.0.1" - minimatch "^3.0.4" - plist "^3.0.4" + dir-compare "^4.2.0" + fs-extra "^11.1.1" + minimatch "^9.0.3" + plist "^3.1.0" "@emotion/hash@^0.8.0": version "0.8.0" @@ -602,6 +613,11 @@ resolved "https://registry.yarnpkg.com/@fontsource/inter/-/inter-5.0.19.tgz#680a71be6311e60df77c78fcdd941753886a59e4" integrity sha512-tVU77yjKnsoUotrXGYbbYxmL9nbm/MSo3deZietmf8V2FEDlbi9fvkJHMrYbo7ZsOqR1AYBBqRYmemz4pSE5Mg== +"@gar/promisify@^1.1.3": + version "1.1.3" + resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" + integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== + "@graphql-typed-document-node/core@^3.2.0": version "3.2.0" resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" @@ -638,10 +654,10 @@ wrap-ansi "^8.1.0" wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" -"@malept/cross-spawn-promise@^1.1.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz#504af200af6b98e198bce768bc1730c6936ae01d" - integrity sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ== +"@malept/cross-spawn-promise@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz#d0772de1aa680a0bfb9ba2f32b4c828c7857cb9d" + integrity sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg== dependencies: cross-spawn "^7.0.1" @@ -929,6 +945,22 @@ "@nomicfoundation/solidity-analyzer-linux-x64-musl" "0.1.2" "@nomicfoundation/solidity-analyzer-win32-x64-msvc" "0.1.2" +"@npmcli/fs@^2.1.0": + version "2.1.2" + resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz#a9e2541a4a2fec2e69c29b35e6060973da79b865" + integrity sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ== + dependencies: + "@gar/promisify" "^1.1.3" + semver "^7.3.5" + +"@npmcli/move-file@^2.0.0": + version "2.0.1" + resolved "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz#26f6bdc379d87f75e55739bab89db525b06100e4" + integrity sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ== + dependencies: + mkdirp "^1.0.4" + rimraf "^3.0.2" + "@pkgjs/parseargs@^0.11.0": version "0.11.0" resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" @@ -1289,6 +1321,11 @@ resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz#a1337ca426aa61cef9fe15b5b28e340a72f6fa99" integrity sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw== +abbrev@^1.0.0: + version "1.1.1" + resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + abstract-level@^1.0.0, abstract-level@^1.0.2, abstract-level@^1.0.3, abstract-level@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/abstract-level/-/abstract-level-1.0.4.tgz#3ad8d684c51cc9cbc9cf9612a7100b716c414b57" @@ -1327,13 +1364,27 @@ aes-js@3.0.0: resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" integrity sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw== -agent-base@6: +agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== dependencies: debug "4" +agent-base@^7.0.2, agent-base@^7.1.0: + version "7.1.1" + resolved "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" + integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== + dependencies: + debug "^4.3.4" + +agentkeepalive@^4.2.1: + version "4.5.0" + resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz#2673ad1389b3c418c5a20c5d7364f93ca04be923" + integrity sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew== + dependencies: + humanize-ms "^1.2.1" + aggregate-error@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" @@ -1487,44 +1538,62 @@ anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" -app-builder-bin@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/app-builder-bin/-/app-builder-bin-4.0.0.tgz#1df8e654bd1395e4a319d82545c98667d7eed2f0" - integrity sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA== +app-builder-bin@5.0.0-alpha.10: + version "5.0.0-alpha.10" + resolved "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-5.0.0-alpha.10.tgz#cf12e593b6b847fb9d04027fa755c6c6610d778b" + integrity sha512-Ev4jj3D7Bo+O0GPD2NMvJl+PGiBAfS7pUGawntBNpCbxtpncfUixqFj9z9Jme7V7s3LBGqsWZZP54fxBX3JKJw== -app-builder-lib@24.13.3: - version "24.13.3" - resolved "https://registry.yarnpkg.com/app-builder-lib/-/app-builder-lib-24.13.3.tgz#36e47b65fecb8780bb73bff0fee4e0480c28274b" - integrity sha512-FAzX6IBit2POXYGnTCT8YHFO/lr5AapAII6zzhQO3Rw4cEDOgK+t1xhLc5tNcKlicTHlo9zxIwnYCX9X2DLkig== +app-builder-lib@25.1.8: + version "25.1.8" + resolved "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-25.1.8.tgz#ae376039c5f269c7d562af494a087e5bc6310f1b" + integrity sha512-pCqe7dfsQFBABC1jeKZXQWhGcCPF3rPCXDdfqVKjIeWBcXzyC1iOWZdfFhGl+S9MyE/k//DFmC6FzuGAUudNDg== dependencies: "@develar/schema-utils" "~2.6.5" - "@electron/notarize" "2.2.1" - "@electron/osx-sign" "1.0.5" - "@electron/universal" "1.5.1" + "@electron/notarize" "2.5.0" + "@electron/osx-sign" "1.3.1" + "@electron/rebuild" "3.6.1" + "@electron/universal" "2.0.1" "@malept/flatpak-bundler" "^0.4.0" "@types/fs-extra" "9.0.13" async-exit-hook "^2.0.1" bluebird-lst "^1.0.9" - builder-util "24.13.1" - builder-util-runtime "9.2.4" + builder-util "25.1.7" + builder-util-runtime "9.2.10" chromium-pickle-js "^0.2.0" + config-file-ts "0.2.8-rc1" debug "^4.3.4" + dotenv "^16.4.5" + dotenv-expand "^11.0.6" ejs "^3.1.8" - electron-publish "24.13.1" + electron-publish "25.1.7" form-data "^4.0.0" fs-extra "^10.1.0" hosted-git-info "^4.1.0" is-ci "^3.0.0" isbinaryfile "^5.0.0" js-yaml "^4.1.0" + json5 "^2.2.3" lazy-val "^1.0.5" - minimatch "^5.1.1" - read-config-file "6.3.2" + minimatch "^10.0.0" + resedit "^1.7.0" sanitize-filename "^1.6.3" semver "^7.3.8" tar "^6.1.12" temp-file "^3.4.0" +"aproba@^1.0.3 || ^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== + +are-we-there-yet@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz#679df222b278c64f2cdba1175cdc00b0d96164bd" + integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg== + dependencies: + delegates "^1.0.0" + readable-stream "^3.6.0" + argparse@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" @@ -1611,6 +1680,15 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.3.0.tgz#f6e14a97858d327252200242d4ccfe522c445522" integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== +bl@^4.1.0: + version "4.1.0" + resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" + integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== + dependencies: + buffer "^5.5.0" + inherits "^2.0.4" + readable-stream "^3.4.0" + blakejs@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.2.1.tgz#5057e4206eadb4a97f7c0b6e197a505042fc3814" @@ -1718,11 +1796,6 @@ buffer-crc32@~0.2.3: resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ== -buffer-equal@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.1.tgz#2f7651be5b1b3f057fcd6e7ee16cf34767077d90" - integrity sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg== - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" @@ -1733,7 +1806,7 @@ buffer-xor@^1.0.3: resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" integrity sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ== -buffer@^5.1.0: +buffer@^5.1.0, buffer@^5.5.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -1749,6 +1822,14 @@ buffer@^6.0.3: base64-js "^1.3.1" ieee754 "^1.2.1" +builder-util-runtime@9.2.10: + version "9.2.10" + resolved "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.2.10.tgz#a0f7d9e214158402e78b74a745c8d9f870c604bc" + integrity sha512-6p/gfG1RJSQeIbz8TK5aPNkoztgY1q5TgmGFMAXcY8itsGW6Y2ld1ALsZ5UJn8rog7hKF3zHx5iQbNQ8uLcRlw== + dependencies: + debug "^4.3.4" + sax "^1.2.4" + builder-util-runtime@9.2.4: version "9.2.4" resolved "https://registry.yarnpkg.com/builder-util-runtime/-/builder-util-runtime-9.2.4.tgz#13cd1763da621e53458739a1e63f7fcba673c42a" @@ -1757,22 +1838,22 @@ builder-util-runtime@9.2.4: debug "^4.3.4" sax "^1.2.4" -builder-util@24.13.1: - version "24.13.1" - resolved "https://registry.yarnpkg.com/builder-util/-/builder-util-24.13.1.tgz#4a4c4f9466b016b85c6990a0ea15aa14edec6816" - integrity sha512-NhbCSIntruNDTOVI9fdXz0dihaqX2YuE1D6zZMrwiErzH4ELZHE6mdiB40wEgZNprDia+FghRFgKoAqMZRRjSA== +builder-util@25.1.7: + version "25.1.7" + resolved "https://registry.npmjs.org/builder-util/-/builder-util-25.1.7.tgz#a07b404f0cb1a635aa165902be65297d58932ff8" + integrity sha512-7jPjzBwEGRbwNcep0gGNpLXG9P94VA3CPAZQCzxkFXiV2GMQKlziMbY//rXPI7WKfhsvGgFXjTcXdBEwgXw9ww== dependencies: "7zip-bin" "~5.2.0" "@types/debug" "^4.1.6" - app-builder-bin "4.0.0" + app-builder-bin "5.0.0-alpha.10" bluebird-lst "^1.0.9" - builder-util-runtime "9.2.4" + builder-util-runtime "9.2.10" chalk "^4.1.2" cross-spawn "^7.0.3" debug "^4.3.4" fs-extra "^10.1.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.1" + http-proxy-agent "^7.0.0" + https-proxy-agent "^7.0.0" is-ci "^3.0.0" js-yaml "^4.1.0" source-map-support "^0.5.19" @@ -1791,6 +1872,30 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== +cacache@^16.1.0: + version "16.1.3" + resolved "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz#a02b9f34ecfaf9a78c9f4bc16fceb94d5d67a38e" + integrity sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ== + dependencies: + "@npmcli/fs" "^2.1.0" + "@npmcli/move-file" "^2.0.0" + chownr "^2.0.0" + fs-minipass "^2.1.0" + glob "^8.0.1" + infer-owner "^1.0.4" + lru-cache "^7.7.1" + minipass "^3.1.6" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + mkdirp "^1.0.4" + p-map "^4.0.0" + promise-inflight "^1.0.1" + rimraf "^3.0.2" + ssri "^9.0.0" + tar "^6.1.11" + unique-filename "^2.0.0" + cacheable-lookup@^5.0.3: version "5.0.4" resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz#5a6b865b2c44357be3d5ebc2a467b032719a7005" @@ -1925,6 +2030,18 @@ clean-stack@^2.0.0: resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-spinners@^2.5.0: + version "2.9.2" + resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz#1773a8f4b9c4d6ac31563df53b3fc1d79462fe41" + integrity sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg== + cli-truncate@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" @@ -1963,6 +2080,11 @@ clone-response@^1.0.2: dependencies: mimic-response "^1.0.0" +clone@^1.0.2: + version "1.0.4" + resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" + integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== + color-convert@^1.9.0, color-convert@^1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" @@ -1995,6 +2117,11 @@ color-string@^1.6.0: color-name "^1.0.0" simple-swizzle "^0.2.2" +color-support@^1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" + integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== + color@^3.1.3: version "3.2.1" resolved "https://registry.yarnpkg.com/color/-/color-3.2.1.tgz#3544dc198caf4490c3ecc9a790b54fe9ff45e164" @@ -2064,13 +2191,18 @@ conf@^10.2.0: pkg-up "^3.1.0" semver "^7.3.5" -config-file-ts@^0.2.4: - version "0.2.6" - resolved "https://registry.yarnpkg.com/config-file-ts/-/config-file-ts-0.2.6.tgz#b424ff74612fb37f626d6528f08f92ddf5d22027" - integrity sha512-6boGVaglwblBgJqGyxm4+xCmEGcWgnWHSWHY5jad58awQhB6gftq0G8HbzU39YqCIYHMLAiL1yjwiZ36m/CL8w== +config-file-ts@0.2.8-rc1: + version "0.2.8-rc1" + resolved "https://registry.npmjs.org/config-file-ts/-/config-file-ts-0.2.8-rc1.tgz#fb7fc6ccb2e313f69dbeb78f1db0b00038049de0" + integrity sha512-GtNECbVI82bT4RiDIzBSVuTKoSHufnU7Ce7/42bkWZJZFLjmDF2WBpVsvRkhKCfKBnTBb3qZrBwPpFBU/Myvhg== dependencies: - glob "^10.3.10" - typescript "^5.3.3" + glob "^10.3.12" + typescript "^5.4.3" + +console-control-strings@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== cookie@^0.4.1: version "0.4.2" @@ -2202,6 +2334,13 @@ deep-is@^0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== +defaults@^1.0.3: + version "1.0.4" + resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz#b0b02062c1e2aa62ff5d9528f0f98baa90978d7a" + integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== + dependencies: + clone "^1.0.2" + defer-to-connect@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587" @@ -2230,11 +2369,21 @@ delayed-stream@~1.0.0: resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== + depd@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== +detect-libc@^2.0.1: + version "2.0.3" + resolved "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz#f0cd503b40f9939b894697d19ad50895e30cf700" + integrity sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw== + detect-node@^2.0.4: version "2.1.0" resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1" @@ -2245,22 +2394,22 @@ diff@^5.2.0: resolved "https://registry.yarnpkg.com/diff/-/diff-5.2.0.tgz#26ded047cd1179b78b9537d5ef725503ce1ae531" integrity sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A== -dir-compare@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/dir-compare/-/dir-compare-3.3.0.tgz#2c749f973b5c4b5d087f11edaae730db31788416" - integrity sha512-J7/et3WlGUCxjdnD3HAAzQ6nsnc0WL6DD7WcwJb7c39iH1+AWfg+9OqzJNaI6PkBwBvm1mhZNL9iY/nRiZXlPg== +dir-compare@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/dir-compare/-/dir-compare-4.2.0.tgz#d1d4999c14fbf55281071fdae4293b3b9ce86f19" + integrity sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ== dependencies: - buffer-equal "^1.0.0" - minimatch "^3.0.4" + minimatch "^3.0.5" + p-limit "^3.1.0 " -dmg-builder@24.13.3: - version "24.13.3" - resolved "https://registry.yarnpkg.com/dmg-builder/-/dmg-builder-24.13.3.tgz#95d5b99c587c592f90d168a616d7ec55907c7e55" - integrity sha512-rcJUkMfnJpfCboZoOOPf4L29TRtEieHNOeAbYPWPxlaBw/Z1RKrRA86dOI9rwaI4tQSc/RD82zTNHprfUHXsoQ== +dmg-builder@25.1.8: + version "25.1.8" + resolved "https://registry.npmjs.org/dmg-builder/-/dmg-builder-25.1.8.tgz#41f3b725edd896156e891016a44129e1bd580430" + integrity sha512-NoXo6Liy2heSklTI5OIZbCgXC1RzrDQsZkeEwXhdOro3FT1VBOvbubvscdPnjVuQ4AMwwv61oaH96AbiYg9EnQ== dependencies: - app-builder-lib "24.13.3" - builder-util "24.13.1" - builder-util-runtime "9.2.4" + app-builder-lib "25.1.8" + builder-util "25.1.7" + builder-util-runtime "9.2.10" fs-extra "^10.1.0" iconv-lite "^0.6.2" js-yaml "^4.1.0" @@ -2310,21 +2459,18 @@ dotenv-expand@^10.0.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-10.0.0.tgz#12605d00fb0af6d0a592e6558585784032e4ef37" integrity sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A== -dotenv-expand@^5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" - integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== +dotenv-expand@^11.0.6: + version "11.0.6" + resolved "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.6.tgz#f2c840fd924d7c77a94eff98f153331d876882d3" + integrity sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g== + dependencies: + dotenv "^16.4.4" -dotenv@^16.3.0, dotenv@^16.4.5: +dotenv@^16.3.0, dotenv@^16.4.4, dotenv@^16.4.5: version "16.4.5" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f" integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg== -dotenv@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-9.0.2.tgz#dacc20160935a37dea6364aa1bef819fb9b6ab05" - integrity sha512-I9OvvrHp4pIARv4+x9iuewrWycX6CcZtoAu1XrzPxc5UygMJXJZYmBsynku8IkrJwgypE5DGNjDPmPRhDCptUg== - duplexer@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" @@ -2342,20 +2488,19 @@ ejs@^3.1.8: dependencies: jake "^10.8.5" -electron-builder@^24.12.0: - version "24.13.3" - resolved "https://registry.yarnpkg.com/electron-builder/-/electron-builder-24.13.3.tgz#c506dfebd36d9a50a83ee8aa32d803d83dbe4616" - integrity sha512-yZSgVHft5dNVlo31qmJAe4BVKQfFdwpRw7sFp1iQglDRCDD6r22zfRJuZlhtB5gp9FHUxCMEoWGq10SkCnMAIg== +electron-builder@^25.1.8: + version "25.1.8" + resolved "https://registry.npmjs.org/electron-builder/-/electron-builder-25.1.8.tgz#b0e310f1600787610bb84c3f39bc7aadb2548486" + integrity sha512-poRgAtUHHOnlzZnc9PK4nzG53xh74wj2Jy7jkTrqZ0MWPoHGh1M2+C//hGeYdA+4K8w4yiVCNYoLXF7ySj2Wig== dependencies: - app-builder-lib "24.13.3" - builder-util "24.13.1" - builder-util-runtime "9.2.4" + app-builder-lib "25.1.8" + builder-util "25.1.7" + builder-util-runtime "9.2.10" chalk "^4.1.2" - dmg-builder "24.13.3" + dmg-builder "25.1.8" fs-extra "^10.1.0" is-ci "^3.0.0" lazy-val "^1.0.5" - read-config-file "6.3.2" simple-update-notifier "2.0.0" yargs "^17.6.2" @@ -2364,14 +2509,14 @@ electron-log@^5.1.4: resolved "https://registry.yarnpkg.com/electron-log/-/electron-log-5.1.5.tgz#70d5051fc5ab7669b2592f53f72034867269c96e" integrity sha512-vuq10faUAxRbILgQx7yHoMObKZDEfj7hMSZrJPsVrDNeCpV/HN11dU7QuY4UDUe055pzBxhSCB3m0+6D3Aktjw== -electron-publish@24.13.1: - version "24.13.1" - resolved "https://registry.yarnpkg.com/electron-publish/-/electron-publish-24.13.1.tgz#57289b2f7af18737dc2ad134668cdd4a1b574a0c" - integrity sha512-2ZgdEqJ8e9D17Hwp5LEq5mLQPjqU3lv/IALvgp+4W8VeNhryfGhYEQC/PgDPMrnWUp+l60Ou5SJLsu+k4mhQ8A== +electron-publish@25.1.7: + version "25.1.7" + resolved "https://registry.npmjs.org/electron-publish/-/electron-publish-25.1.7.tgz#14e50c2a3fafdc1c454eadbbc47ead89a48bb554" + integrity sha512-+jbTkR9m39eDBMP4gfbqglDd6UvBC7RLh5Y0MhFSsc6UkGHj9Vj9TWobxevHYMMqmoujL11ZLjfPpMX+Pt6YEg== dependencies: "@types/fs-extra" "^9.0.11" - builder-util "24.13.1" - builder-util-runtime "9.2.4" + builder-util "25.1.7" + builder-util-runtime "9.2.10" chalk "^4.1.2" fs-extra "^10.1.0" lazy-val "^1.0.5" @@ -2399,10 +2544,10 @@ electron-updater@^6.1.8: semver "^7.3.8" tiny-typed-emitter "^2.1.0" -electron@30.0.6: - version "30.0.6" - resolved "https://registry.yarnpkg.com/electron/-/electron-30.0.6.tgz#9ddea5f68396ecca88ad7c2c466a30fc9c16144b" - integrity sha512-PkhEPFdpYcTzjAO3gMHZ+map7g2+xCrMDedo/L1i0ir2BRXvAB93IkTJX497U6Srb/09r2cFt+k20VPNVCdw3Q== +electron@^33.2.0: + version "33.2.0" + resolved "https://registry.npmjs.org/electron/-/electron-33.2.0.tgz#2a7098653eaf1a53c7311a01d5636783019f2354" + integrity sha512-PVw1ICAQDPsnnsmpNFX/b1i/49h67pbSPxuIENd9K9WpGO1tsRaQt+K2bmXqTuoMJsbzIc75Ce8zqtuwBPqawA== dependencies: "@electron/get" "^2.0.0" "@types/node" "^20.9.0" @@ -2449,6 +2594,13 @@ enabled@2.0.x: resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ== +encoding@^0.1.13: + version "0.1.13" + resolved "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -2733,6 +2885,11 @@ evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" +exponential-backoff@^3.1.1: + version "3.1.1" + resolved "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" + integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== + extract-zip@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" @@ -2917,6 +3074,15 @@ fs-extra@^10.0.0, fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^11.1.1: + version "11.2.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz#e70e17dfad64232287d01929399e0ea7c86b0e5b" + integrity sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" @@ -2945,7 +3111,7 @@ fs-extra@^9.0.0, fs-extra@^9.0.1: jsonfile "^6.0.1" universalify "^2.0.0" -fs-minipass@^2.0.0: +fs-minipass@^2.0.0, fs-minipass@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== @@ -2972,6 +3138,20 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== +gauge@^4.0.3: + version "4.0.4" + resolved "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz#52ff0652f2bbf607a989793d53b751bef2328dce" + integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== + dependencies: + aproba "^1.0.3 || ^2.0.0" + color-support "^1.1.3" + console-control-strings "^1.1.0" + has-unicode "^2.0.1" + signal-exit "^3.0.7" + string-width "^4.2.3" + strip-ansi "^6.0.1" + wide-align "^1.1.5" + get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -3021,10 +3201,10 @@ glob@7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^10.3.10: - version "10.4.3" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.4.3.tgz#e0ba2253dd21b3d0acdfb5d507c59a29f513fc7a" - integrity sha512-Q38SGlYRpVtDBPSWEylRyctn7uDeTp4NQERTLiCT1FqA9JXPYWqAVmQU6qh4r/zMM5ehxTcbaO8EjhWnvEhmyg== +glob@^10.3.12: + version "10.4.5" + resolved "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz#f4d9f0b90ffdbab09c9d77f5f29b4262517b0956" + integrity sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg== dependencies: foreground-child "^3.1.0" jackspeak "^3.1.2" @@ -3033,7 +3213,7 @@ glob@^10.3.10: package-json-from-dist "^1.0.0" path-scurry "^1.11.1" -glob@^7.1.3, glob@^7.1.6: +glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -3045,7 +3225,7 @@ glob@^7.1.3, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.1.0: +glob@^8.0.1, glob@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -3090,7 +3270,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -got@^11.8.5: +got@^11.7.0, got@^11.8.5: version "11.8.6" resolved "https://registry.yarnpkg.com/got/-/got-11.8.6.tgz#276e827ead8772eddbcfc97170590b841823233a" integrity sha512-6tfZ91bOr7bOXnK7PRDCGBLa1H4U080YHNaAQ2KsMGlLEzRbk44nsZF2E1IeRc3vtJHPVbKCYgdFbaGO2ljd8g== @@ -3107,7 +3287,7 @@ got@^11.8.5: p-cancelable "^2.0.0" responselike "^2.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.11: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.6: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -3211,6 +3391,11 @@ has-symbols@^1.0.3: resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== +has-unicode@^2.0.1: + version "2.0.1" + resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== + hash-base@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" @@ -3256,7 +3441,7 @@ hosted-git-info@^4.1.0: dependencies: lru-cache "^6.0.0" -http-cache-semantics@^4.0.0: +http-cache-semantics@^4.0.0, http-cache-semantics@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz#abe02fcb2985460bf0323be664436ec3476a6d5a" integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== @@ -3281,6 +3466,14 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" +http-proxy-agent@^7.0.0: + version "7.0.2" + resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz#9a8b1f246866c028509486585f62b8f2c18c270e" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + http2-wrapper@^1.0.0-beta.5.2: version "1.0.3" resolved "https://registry.yarnpkg.com/http2-wrapper/-/http2-wrapper-1.0.3.tgz#b8f55e0c1f25d4ebd08b3b0c2c079f9590800b3d" @@ -3289,7 +3482,7 @@ http2-wrapper@^1.0.0-beta.5.2: quick-lru "^5.1.1" resolve-alpn "^1.0.0" -https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: +https-proxy-agent@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== @@ -3297,6 +3490,21 @@ https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: agent-base "6" debug "4" +https-proxy-agent@^7.0.0: + version "7.0.5" + resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== + dependencies: + agent-base "^7.0.2" + debug "4" + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== + dependencies: + ms "^2.0.0" + iconv-corefoundation@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz#31065e6ab2c9272154c8b0821151e2c88f1b002a" @@ -3352,6 +3560,11 @@ indent-string@^4.0.0: resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== +infer-owner@^1.0.4: + version "1.0.4" + resolved "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" + integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== + inflight@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" @@ -3372,6 +3585,14 @@ io-ts@1.10.4: dependencies: fp-ts "^1.0.0" +ip-address@^9.0.5: + version "9.0.5" + resolved "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz#117a960819b08780c3bd1f14ef3c1cc1d3f3ea5a" + integrity sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g== + dependencies: + jsbn "1.1.0" + sprintf-js "^1.1.3" + is-arrayish@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" @@ -3418,6 +3639,16 @@ is-hex-prefixed@1.0.0: resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" integrity sha512-WvtOiug1VFrE9v1Cydwm+FnXd3+w9GaeVUss5W4v/SLy3UW00vP+6iNF2SdnfiBoLy4bTqVdkftNGTUeOFVsbA== +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -3504,6 +3735,11 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" +jsbn@1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz#b01307cb29b618a1ed26ec79e911f803c4da0040" + integrity sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A== + json-buffer@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" @@ -3541,9 +3777,9 @@ json2mq@^0.2.0: dependencies: string-convert "^0.2.0" -json5@^2.2.0: +json5@^2.2.3: version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" + resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jsonfile@^2.1.0: @@ -3597,7 +3833,7 @@ kuler@^2.0.0: resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== -lazy-val@^1.0.4, lazy-val@^1.0.5: +lazy-val@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/lazy-val/-/lazy-val-1.0.5.tgz#6cf3b9f5bc31cee7ee3e369c0832b7583dcd923d" integrity sha512-0/BnGCCfyUMkBpeDgWihanIAF9JmZhHBgUhEqzvf+adhNGLoP6TaiI5oF8oyb3I45P+PcnrqihSf01M0l0G5+Q== @@ -3731,11 +3967,38 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^7.7.1: + version "7.18.3" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" + integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== + lru_map@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== +make-fetch-happen@^10.0.3: + version "10.2.1" + resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz#f5e3835c5e9817b617f2770870d9492d28678164" + integrity sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w== + dependencies: + agentkeepalive "^4.2.1" + cacache "^16.1.0" + http-cache-semantics "^4.1.0" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^7.7.1" + minipass "^3.1.6" + minipass-collect "^1.0.2" + minipass-fetch "^2.0.3" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + negotiator "^0.6.3" + promise-retry "^2.0.1" + socks-proxy-agent "^7.0.0" + ssri "^9.0.0" + map-stream@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194" @@ -3823,6 +4086,13 @@ minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg== +minimatch@^10.0.0: + version "10.0.1" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz#ce0521856b453c86e25f2c4c0d03e6ff7ddc440b" + integrity sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -3830,14 +4100,14 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1, minimatch@^5.1.1, minimatch@^5.1.6: +minimatch@^5.0.1, minimatch@^5.1.6: version "5.1.6" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.6.tgz#1cfcb8cf5522ea69952cd2af95ae09477f122a96" integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== dependencies: brace-expansion "^2.0.1" -minimatch@^9.0.4: +minimatch@^9.0.3, minimatch@^9.0.4: version "9.0.5" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5" integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow== @@ -3849,7 +4119,46 @@ minimist@^1.2.6: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== -minipass@^3.0.0: +minipass-collect@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz#22b813bf745dc6edba2576b940022ad6edc8c617" + integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== + dependencies: + minipass "^3.0.0" + +minipass-fetch@^2.0.3: + version "2.1.2" + resolved "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz#95560b50c472d81a3bc76f20ede80eaed76d8add" + integrity sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA== + dependencies: + minipass "^3.1.6" + minipass-sized "^1.0.3" + minizlib "^2.1.2" + optionalDependencies: + encoding "^0.1.13" + +minipass-flush@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" + integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== + dependencies: + minipass "^3.0.0" + +minipass-pipeline@^1.2.4: + version "1.2.4" + resolved "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" + integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== + dependencies: + minipass "^3.0.0" + +minipass-sized@^1.0.3: + version "1.0.3" + resolved "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + +minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.6: version "3.3.6" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.3.6.tgz#7bba384db3a1520d18c9c0e5251c3444e95dd94a" integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== @@ -3866,7 +4175,7 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.1.2.tgz#93a9626ce5e5e66bd4db86849e7515e92340a707" integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -minizlib@^2.1.1: +minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -3874,7 +4183,7 @@ minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" -mkdirp@^1.0.3: +mkdirp@^1.0.3, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -3922,7 +4231,7 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@^2.1.1, ms@^2.1.3: +ms@^2.0.0, ms@^2.1.1, ms@^2.1.3: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -3942,6 +4251,11 @@ natural-compare@^1.4.0: resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== +negotiator@^0.6.3: + version "0.6.4" + resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz#777948e2452651c570b712dd01c23e262713fff7" + integrity sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w== + net@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/net/-/net-1.0.2.tgz#d1757ec9a7fb2371d83cf4755ce3e27e10829388" @@ -3970,6 +4284,13 @@ next@^14.2.3: "@next/swc-win32-ia32-msvc" "14.2.4" "@next/swc-win32-x64-msvc" "14.2.4" +node-abi@^3.45.0: + version "3.71.0" + resolved "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz#52d84bbcd8575efb71468fbaa1f9a49b2c242038" + integrity sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw== + dependencies: + semver "^7.3.5" + node-addon-api@^1.6.3: version "1.7.2" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" @@ -3980,6 +4301,13 @@ node-addon-api@^2.0.0: resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== +node-api-version@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/node-api-version/-/node-api-version-0.2.0.tgz#5177441da2b1046a4d4547ab9e0972eed7b1ac1d" + integrity sha512-fthTTsi8CxaBXMaBAD7ST2uylwvsnYxh2PfaScwpMhos6KlSFajXQPcM4ogNE1q2s3Lbz9GCGqeIHC+C6OZnKg== + dependencies: + semver "^7.3.5" + node-fetch@^2.6.12: version "2.7.0" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" @@ -3992,6 +4320,30 @@ node-gyp-build@^4.2.0, node-gyp-build@^4.3.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5" integrity sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw== +node-gyp@^9.0.0: + version "9.4.1" + resolved "https://registry.npmjs.org/node-gyp/-/node-gyp-9.4.1.tgz#8a1023e0d6766ecb52764cc3a734b36ff275e185" + integrity sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ== + dependencies: + env-paths "^2.2.0" + exponential-backoff "^3.1.1" + glob "^7.1.4" + graceful-fs "^4.2.6" + make-fetch-happen "^10.0.3" + nopt "^6.0.0" + npmlog "^6.0.0" + rimraf "^3.0.2" + semver "^7.3.5" + tar "^6.1.2" + which "^2.0.2" + +nopt@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" + integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== + dependencies: + abbrev "^1.0.0" + normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" @@ -4002,6 +4354,16 @@ normalize-url@^6.0.1: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== +npmlog@^6.0.0: + version "6.0.2" + resolved "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz#c8166017a42f2dea92d6453168dd865186a70830" + integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== + dependencies: + are-we-there-yet "^3.0.0" + console-control-strings "^1.1.0" + gauge "^4.0.3" + set-blocking "^2.0.0" + object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" @@ -4026,7 +4388,7 @@ one-time@^1.0.0: dependencies: fn.name "1.x.x" -onetime@^5.1.2: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -4045,6 +4407,21 @@ optionator@^0.9.3: type-check "^0.4.0" word-wrap "^1.2.5" +ora@^5.1.0: + version "5.4.1" + resolved "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== + dependencies: + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -4069,7 +4446,7 @@ p-limit@^2.0.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: +p-limit@^3.0.2, "p-limit@^3.1.0 ": version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -4177,6 +4554,11 @@ pbkdf2@^3.0.17: safe-buffer "^5.0.1" sha.js "^2.4.8" +pe-library@^0.4.1: + version "0.4.1" + resolved "https://registry.npmjs.org/pe-library/-/pe-library-0.4.1.tgz#e269be0340dcb13aa6949d743da7d658c3e2fbea" + integrity sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw== + pend@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" @@ -4199,7 +4581,7 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -plist@^3.0.4, plist@^3.0.5: +plist@^3.0.4, plist@^3.0.5, plist@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/plist/-/plist-3.1.0.tgz#797a516a93e62f5bde55e0b9cc9c967f860893c9" integrity sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ== @@ -4253,6 +4635,11 @@ progress@^2.0.3: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== +promise-inflight@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" + integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== + promise-retry@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" @@ -4684,17 +5071,12 @@ react@^18.3.1: dependencies: loose-envify "^1.1.0" -read-config-file@6.3.2: - version "6.3.2" - resolved "https://registry.yarnpkg.com/read-config-file/-/read-config-file-6.3.2.tgz#556891aa6ffabced916ed57457cb192e61880411" - integrity sha512-M80lpCjnE6Wt6zb98DoW8WHR09nzMSpu8XHtPkiTHrJ5Az9CybfeQhTJ8D7saeBHpGhLPIVyA8lcL6ZmdKwY6Q== +read-binary-file-arch@^1.0.6: + version "1.0.6" + resolved "https://registry.npmjs.org/read-binary-file-arch/-/read-binary-file-arch-1.0.6.tgz#959c4637daa932280a9b911b1a6766a7e44288fc" + integrity sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg== dependencies: - config-file-ts "^0.2.4" - dotenv "^9.0.2" - dotenv-expand "^5.1.0" - js-yaml "^4.1.0" - json5 "^2.2.0" - lazy-val "^1.0.4" + debug "^4.3.4" readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.2" @@ -4727,6 +5109,13 @@ require-from-string@^2.0.0, require-from-string@^2.0.2: resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== +resedit@^1.7.0: + version "1.7.2" + resolved "https://registry.npmjs.org/resedit/-/resedit-1.7.2.tgz#b1041170b99811710c13f949c7d225871de4cc78" + integrity sha512-vHjcY2MlAITJhC0eRD/Vv8Vlgmu9Sd3LX9zZvtGzU5ZImdTN3+d6e/4mnTyV8vEbyf1sgNIrWxhWlrys52OkEA== + dependencies: + pe-library "^0.4.1" + resize-observer-polyfill@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz#0e9020dd3d21024458d4ebd27e23e40269810464" @@ -4756,6 +5145,14 @@ responselike@^2.0.0: dependencies: lowercase-keys "^2.0.0" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" @@ -4934,6 +5331,11 @@ serialize-javascript@^6.0.2: dependencies: randombytes "^2.1.0" +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== + setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -4969,6 +5371,11 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== +signal-exit@^3.0.2, signal-exit@^3.0.7: + version "3.0.7" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" + integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== + signal-exit@^4.0.1: version "4.1.0" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" @@ -4997,11 +5404,28 @@ slice-ansi@^3.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" -smart-buffer@^4.0.2: +smart-buffer@^4.0.2, smart-buffer@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.2.0.tgz#6e1d71fa4f18c05f7d0ff216dd16a481d0e8d9ae" integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== +socks-proxy-agent@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz#dc069ecf34436621acb41e3efa66ca1b5fed15b6" + integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww== + dependencies: + agent-base "^6.0.2" + debug "^4.3.3" + socks "^2.6.2" + +socks@^2.6.2: + version "2.8.3" + resolved "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz#1ebd0f09c52ba95a09750afe3f3f9f724a800cb5" + integrity sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw== + dependencies: + ip-address "^9.0.5" + smart-buffer "^4.2.0" + solc@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" @@ -5042,11 +5466,18 @@ split@0.3: dependencies: through "2" -sprintf-js@^1.1.2: +sprintf-js@^1.1.2, sprintf-js@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" integrity sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA== +ssri@^9.0.0: + version "9.0.1" + resolved "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" + integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== + dependencies: + minipass "^3.1.1" + stack-trace@0.0.x: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" @@ -5095,7 +5526,7 @@ string-convert@^0.2.0: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -5221,7 +5652,7 @@ synckit@^0.8.6: "@pkgr/core" "^0.1.0" tslib "^2.6.2" -tar@^6.1.12: +tar@^6.0.5, tar@^6.1.11, tar@^6.1.12, tar@^6.1.2: version "6.2.1" resolved "https://registry.yarnpkg.com/tar/-/tar-6.2.1.tgz#717549c541bc3c2af15751bea94b1dd068d4b03a" integrity sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A== @@ -5381,10 +5812,10 @@ type-fest@^2.17.0: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== -typescript@^5.3.3: - version "5.5.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.3.tgz#e1b0a3c394190838a0b168e771b0ad56a0af0faa" - integrity sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ== +typescript@^5.4.3: + version "5.6.3" + resolved "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" + integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== undici-types@~5.26.4: version "5.26.5" @@ -5398,6 +5829,20 @@ undici@^5.14.0: dependencies: "@fastify/busboy" "^2.0.0" +unique-filename@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz#e785f8675a9a7589e0ac77e0b5c34d2eaeac6da2" + integrity sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A== + dependencies: + unique-slug "^3.0.0" + +unique-slug@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz#6d347cf57c8a7a7a6044aabd0e2d74e4d76dc7c9" + integrity sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w== + dependencies: + imurmurhash "^0.1.4" + universalify@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" @@ -5451,6 +5896,13 @@ verror@^1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +wcwidth@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" + integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== + dependencies: + defaults "^1.0.3" + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -5464,13 +5916,20 @@ whatwg-url@^5.0.0: tr46 "~0.0.3" webidl-conversions "^3.0.0" -which@^2.0.1: +which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" +wide-align@^1.1.5: + version "1.1.5" + resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" + integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== + dependencies: + string-width "^1.0.2 || 2 || 3 || 4" + winston-transport@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.7.0.tgz#e302e6889e6ccb7f383b926df6936a5b781bd1f0" @@ -5602,7 +6061,7 @@ yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.6.2: +yargs@^17.0.1, yargs@^17.6.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== From 80706a58718729e98d73a57aadb6d63d04fc6211 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 12:35:04 +0000 Subject: [PATCH 18/39] chore: rename APPLETEAMID to APPLE_TEAM_ID for consistency and update error handling in build process --- .github/workflows/release.yml | 4 ++-- build.js | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c95177a..d8602c4d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -168,7 +168,7 @@ jobs: env: APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }} APPLE_ID: ${{ secrets.APPLEID }} - APPLETEAMID: ${{ secrets.APPLETEAMID }} + APPLE_TEAM_ID: ${{ secrets.APPLETEAMID }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} CSC_LINK: ${{ secrets.CSC_LINK }} GH_TOKEN: ${{ secrets.github_token }} @@ -184,7 +184,7 @@ jobs: env: APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLEIDPASS }} APPLE_ID: ${{ secrets.APPLEID }} - APPLETEAMID: ${{ secrets.APPLETEAMID }} + APPLE_TEAM_ID: ${{ secrets.APPLETEAMID }} CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} CSC_LINK: ${{ secrets.CSC_LINK }} GH_TOKEN: ${{ secrets.github_token }} diff --git a/build.js b/build.js index f2becba3..fdacf56d 100644 --- a/build.js +++ b/build.js @@ -57,12 +57,9 @@ const main = async () => { gatekeeperAssess: false, entitlements: 'electron/entitlements.mac.plist', entitlementsInherit: 'electron/entitlements.mac.plist', - notarize: { - teamId: process.env.APPLETEAMID, - }, }, }, }); }; -main().then((response) => { console.log('Build & Notarize complete'); console.log(JSON.stringify(response)); }).catch((error) => { console.log('Failed to build and notarize.'); console.error(JSON.stringify(error)); process.exit(1); }); +main().then((response) => { console.log('Build & Notarize complete'); console.log(JSON.stringify(response)); }).catch((error) => { console.log('Failed to build and notarize.'); throw new Error(error); }); From e1e248144352b89b3a2d6a48b409af58e6e41990 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 14:17:46 +0000 Subject: [PATCH 19/39] chore: win doesn't need openssl addition, use setup-python v5 --- .github/workflows/release_win.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index 1018e33d..83436082 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -23,17 +23,8 @@ jobs: steps: - uses: actions/checkout@v3 - # Install OpenSSL using Chocolatey and set environment variables - - name: Install OpenSSL - run: | - choco install openssl.light -y - echo "C:\Program Files\OpenSSL-Win64\bin" >> $GITHUB_PATH - echo "SSL_CERT_FILE=C:\Program Files\OpenSSL-Win64\cert.pem" >> $GITHUB_ENV - echo "REQUESTS_CA_BUNDLE=C:\Program Files\OpenSSL-Win64\cert.pem" >> $GITHUB_ENV - openssl version - # Set up Python with setup-python action and add it to PATH - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 id: setup-python with: python-version: "3.10" From ad3bbbad6149bb5298ca519316e60a31ac0d0a6a Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 15:19:06 +0000 Subject: [PATCH 20/39] chore: remove ssl tests --- .github/workflows/release.yml | 7 ------- .github/workflows/release_win.yml | 12 ------------ 2 files changed, 19 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d8602c4d..f0bb4d47 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,12 +23,6 @@ jobs: id: setup-python with: python-version: "3.10" - - # Verify SSL by testing a simple HTTPS request - - name: Test SSL with HTTPS Request - run: | - python -c "import ssl; print(ssl.OPENSSL_VERSION)" - python -c "import urllib.request; urllib.request.urlopen('https://pypi.org')" # Install Poetry and its dependencies - name: Install and configure Poetry @@ -45,7 +39,6 @@ jobs: run: echo "OS_ARCH=${{ matrix.arch }}" >> $GITHUB_ENV; - # Cache Poetry dependencies with unique key for each environment and architecture - name: Cache Poetry dependencies uses: actions/cache@v3 diff --git a/.github/workflows/release_win.yml b/.github/workflows/release_win.yml index 83436082..fe0f747f 100644 --- a/.github/workflows/release_win.yml +++ b/.github/workflows/release_win.yml @@ -33,18 +33,6 @@ jobs: run: | echo "${{ steps.setup-python.outputs.python-path }}" >> $GITHUB_PATH - # Verify which Python is being used - - name: Verify Python Version and Location - run: | - where python - python --version - - # Verify SSL by testing a simple HTTPS request - - name: Test SSL with HTTPS Request - run: | - python -c "import ssl; print(ssl.OPENSSL_VERSION)" - python -c "import urllib.request; urllib.request.urlopen('https://pypi.org')" - - uses: actions/setup-node@v4 with: node-version: "20.x" From 35fb73b139d812d0c193e3d3c960c49f98e6f681 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 15:19:15 +0000 Subject: [PATCH 21/39] bump: rc193 --- package.json | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index a73c69ff..d7619ad5 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,5 @@ "download-binaries": "sh download_binaries.sh", "build:pearl": "sh build_pearl.sh" }, - "version": "0.1.0-rc188" -} + "version": "0.1.0-rc193" +} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 990db451..c6bcd27c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "olas-operate-middleware" -version = "0.1.0-rc188" +version = "0.1.0-rc193" description = "" authors = ["David Vilela ", "Viraj Patel "] readme = "README.md" From dac4610a2f16acd8b792c6152645bf638c3bc5ea Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 15:25:44 +0000 Subject: [PATCH 22/39] fix: remove void reponses, throw text error --- build-win-tenderly.js | 6 +++++- build-win.js | 6 +++++- build.js | 6 +++++- build.tester.js | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/build-win-tenderly.js b/build-win-tenderly.js index 82d837d2..e98e3e5a 100644 --- a/build-win-tenderly.js +++ b/build-win-tenderly.js @@ -35,4 +35,8 @@ const main = async () => { }); }; -main().then((response) => { console.log('Build & Notarize complete'); }) \ No newline at end of file +main().then(() => { + console.log('Build & Notarize complete'); +}).catch(() => { + throw new Error('Failed to build and notarize.'); +}); \ No newline at end of file diff --git a/build-win.js b/build-win.js index 272ce289..17920c4d 100644 --- a/build-win.js +++ b/build-win.js @@ -46,4 +46,8 @@ const main = async () => { }); }; -main().then((response) => { console.log('Build & Notarize complete'); }) +main().then(() => { + console.log('Build & Notarize complete'); +}).catch(() => { + throw new Error('Failed to build and notarize.'); +}); diff --git a/build.js b/build.js index fdacf56d..d576ce90 100644 --- a/build.js +++ b/build.js @@ -62,4 +62,8 @@ const main = async () => { }); }; -main().then((response) => { console.log('Build & Notarize complete'); console.log(JSON.stringify(response)); }).catch((error) => { console.log('Failed to build and notarize.'); throw new Error(error); }); +main().then(() => { + console.log('Build & Notarize complete'); +}).catch(() => { + throw new Error('Failed to build and notarize.'); +}); diff --git a/build.tester.js b/build.tester.js index c4a9439e..b4163427 100644 --- a/build.tester.js +++ b/build.tester.js @@ -49,4 +49,8 @@ const main = async () => { }); }; -main().then((response) => { console.log('Build & Notarize complete'); }).catch((e) => console.error(e)); +main().then(() => { + console.log('Build & Notarize complete'); +}).catch(() => { + throw new Error('Failed to build and notarize.'); +}); From 404b600899ed838a3536988d3cf90029b14fbe30 Mon Sep 17 00:00:00 2001 From: Mohan Date: Fri, 8 Nov 2024 21:12:58 +0530 Subject: [PATCH 23/39] fix: issue with streak being stuck and include new staking contracts (#424) * feat: tiny cleanup * feat: add function to get staking program id by contract address * feat: add staking contract addresses and update rewards history to include contract name * feat: enhance RewardsStreak component with loading state and improve rewards history hook logic * feat: refactor RewardsStreak component to handle loading state and improve streak calculation logic * feat: update useRewardsHistory hook to improve error handling and parsing of checkpoints response * feat: enhance RewardsStreak and useRewardsHistory for improved loading state and checkpoint handling * feat: enhance RewardsHistory component to include service ID check and sort contract addresses by recent participation * refactor: update comments in RewardsHistory component for clarity on contract address sorting * refactor: rename service staking contract addresses for clarity and consistency in Gnosis chain * feat: update useRewardsHistory hook to filter checkpoints by supported staking contracts * feat: update RewardsStreak component to use Flex for layout and improve type safety in service functions --- .../sections/RewardsSection/RewardsStreak.tsx | 62 +++-- .../RewardsHistory/RewardsHistory.tsx | 44 +++- frontend/constants/colors.ts | 1 + frontend/constants/contractAddresses.ts | 27 +- frontend/constants/stakingProgramMeta.ts | 1 - frontend/hooks/useRewardsHistory.ts | 237 ++++++++++-------- frontend/utils/service.ts | 20 ++ 7 files changed, 235 insertions(+), 157 deletions(-) diff --git a/frontend/components/MainPage/sections/RewardsSection/RewardsStreak.tsx b/frontend/components/MainPage/sections/RewardsSection/RewardsStreak.tsx index 937e2d20..e29be30d 100644 --- a/frontend/components/MainPage/sections/RewardsSection/RewardsStreak.tsx +++ b/frontend/components/MainPage/sections/RewardsSection/RewardsStreak.tsx @@ -1,10 +1,13 @@ import { RightOutlined } from '@ant-design/icons'; -import { Flex, Typography } from 'antd'; +import { Flex, Skeleton, Typography } from 'antd'; import styled from 'styled-components'; import { FireNoStreak } from '@/components/custom-icons/FireNoStreak'; import { FireStreak } from '@/components/custom-icons/FireStreak'; +import { COLOR } from '@/constants/colors'; +import { NA } from '@/constants/symbols'; import { Pages } from '@/enums/PageState'; +import { useBalance } from '@/hooks/useBalance'; import { usePageState } from '@/hooks/usePageState'; import { useReward } from '@/hooks/useReward'; import { useRewardsHistory } from '@/hooks/useRewardsHistory'; @@ -13,45 +16,54 @@ const { Text } = Typography; const RewardsStreakFlex = styled(Flex)` padding: 8px 16px; - background: #f2f4f9; - border-radius: 6px; - justify-content: space-between; height: 40px; - align-items: center; + background: ${COLOR.GRAY_1}; + border-radius: 6px; `; -const Streak = ({ - streak, - isLoading, -}: { - streak: number; - isLoading: boolean; -}) => { +const Streak = () => { + const { isBalanceLoaded } = useBalance(); const { isEligibleForRewards } = useReward(); - if (isLoading) return
Loading...
; + const { + latestRewardStreak: streak, + isLoading, + isFetching, + isError, + } = useRewardsHistory(); - // Graph does not account for the current day, so we need to add 1 to the streak - const optimisticStreak = isEligibleForRewards ? streak + 1 : streak; + if (isLoading || isFetching || !isBalanceLoaded) { + return ; + } - const streakText = - optimisticStreak > 0 ? `${optimisticStreak} day streak` : 'No streak'; - const streakIcon = optimisticStreak > 0 ? : ; + if (isError) { + return NA; + } + + // Graph does not account for the current day, + // so we need to add 1 to the streak, if the user is eligible for rewards + const optimisticStreak = isEligibleForRewards ? streak + 1 : streak; return ( - - {streakIcon} - {streakText} - + + {optimisticStreak > 0 ? ( + <> + {optimisticStreak} day streak + + ) : ( + <> + No streak + + )} + ); }; export const RewardsStreak = () => { const { goto } = usePageState(); - const { latestRewardStreak, isLoading } = useRewardsHistory(); return ( - - + + { ); }; +type ContractRewardsProps = { + stakingProgramId: StakingProgramId; + checkpoints: Checkpoint[]; +}; + const ContractRewards = ({ stakingProgramId, checkpoints, -}: { - stakingProgramId: StakingProgramId; - checkpoints: TransformedCheckpoint[]; -}) => ( +}: ContractRewardsProps) => ( {STAKING_PROGRAM_META[stakingProgramId].name} @@ -182,16 +182,36 @@ export const RewardsHistory = () => { const { contractCheckpoints, isError, isLoading, isFetching, refetch } = useRewardsHistory(); const { goto } = usePageState(); + const { serviceId } = useServices(); const history = useMemo(() => { - if (isLoading || isFetching) return ; + if (isLoading || isFetching || !serviceId) return ; if (isError) return ; if (!contractCheckpoints) return ; - if (Object.keys(contractCheckpoints).length === 0) + if (Object.keys(contractCheckpoints).length === 0) { return ; + } + + // find the recent contract address where the service has participated in + const recentContractAddress = Object.values(contractCheckpoints) + .flat() + .sort((a, b) => b.epochEndTimeStamp - a.epochEndTimeStamp) + .find((checkpoint) => + checkpoint.serviceIds.includes(`${serviceId}`), + )?.contractAddress; + + // most recent transaction staking contract at the top of the list + const latestContractAddresses = Object.keys(contractCheckpoints).sort( + (a, b) => { + if (a === recentContractAddress) return -1; + if (b === recentContractAddress) return 1; + return 0; + }, + ); + return ( - {Object.keys(contractCheckpoints).map((contractAddress: string) => { + {latestContractAddresses.map((contractAddress: string) => { const checkpoints = contractCheckpoints[contractAddress]; const [stakingProgramId] = Object.entries( SERVICE_STAKING_TOKEN_MECH_USAGE_CONTRACT_ADDRESSES[Chain.GNOSIS], @@ -215,7 +235,7 @@ export const RewardsHistory = () => { })} ); - }, [isLoading, isFetching, isError, refetch, contractCheckpoints]); + }, [isLoading, isFetching, isError, serviceId, contractCheckpoints, refetch]); return ( diff --git a/frontend/constants/colors.ts b/frontend/constants/colors.ts index 2df0154f..7b11ae7d 100644 --- a/frontend/constants/colors.ts +++ b/frontend/constants/colors.ts @@ -11,4 +11,5 @@ export const COLOR = { BROWN: '#873800', TEXT: '#1f2229', TEXT_LIGHT: '#606F85', + GRAY_1: '#f2f4f9', }; diff --git a/frontend/constants/contractAddresses.ts b/frontend/constants/contractAddresses.ts index 41f99a5a..2e6ab53e 100644 --- a/frontend/constants/contractAddresses.ts +++ b/frontend/constants/contractAddresses.ts @@ -16,22 +16,25 @@ export const SERVICE_REGISTRY_TOKEN_UTILITY_CONTRACT_ADDRESS: Record< [Chain.GNOSIS]: '0xa45E64d13A30a51b91ae0eb182e88a40e9b18eD8', }; +export const GNOSIS_SERVICE_STAKING_CONTRACT_ADDRESSES: Record< + StakingProgramId, + `0x${string}` +> = { + [StakingProgramId.Alpha]: '0xEE9F19b5DF06c7E8Bfc7B28745dcf944C504198A', + [StakingProgramId.Beta]: '0xeF44Fb0842DDeF59D37f85D61A1eF492bbA6135d', + [StakingProgramId.Beta2]: '0x1c2F82413666d2a3fD8bC337b0268e62dDF67434', + [StakingProgramId.Beta3]: '0xBd59Ff0522aA773cB6074ce83cD1e4a05A457bc1', + [StakingProgramId.Beta4]: '0x3052451e1eAee78e62E169AfdF6288F8791F2918', + [StakingProgramId.Beta5]: '0x4Abe376Fda28c2F43b84884E5f822eA775DeA9F4', + [StakingProgramId.BetaMechMarketplace]: + '0xDaF34eC46298b53a3d24CBCb431E84eBd23927dA', +}; + export const SERVICE_STAKING_TOKEN_MECH_USAGE_CONTRACT_ADDRESSES: Record< number, Record > = { - [Chain.GNOSIS]: { - [StakingProgramId.Alpha]: '0xEE9F19b5DF06c7E8Bfc7B28745dcf944C504198A', - - [StakingProgramId.Beta]: '0xeF44Fb0842DDeF59D37f85D61A1eF492bbA6135d', - [StakingProgramId.Beta2]: '0x1c2F82413666d2a3fD8bC337b0268e62dDF67434', - [StakingProgramId.Beta3]: '0xBd59Ff0522aA773cB6074ce83cD1e4a05A457bc1', - [StakingProgramId.Beta4]: '0x3052451e1eAee78e62E169AfdF6288F8791F2918', - [StakingProgramId.Beta5]: '0x4Abe376Fda28c2F43b84884E5f822eA775DeA9F4', - - [StakingProgramId.BetaMechMarketplace]: - '0xDaF34eC46298b53a3d24CBCb431E84eBd23927dA', - }, + [Chain.GNOSIS]: GNOSIS_SERVICE_STAKING_CONTRACT_ADDRESSES, }; /** diff --git a/frontend/constants/stakingProgramMeta.ts b/frontend/constants/stakingProgramMeta.ts index 1bdebc46..15edfc69 100644 --- a/frontend/constants/stakingProgramMeta.ts +++ b/frontend/constants/stakingProgramMeta.ts @@ -49,7 +49,6 @@ export const STAKING_PROGRAM_META: Record< canMigrateTo: activeStakingProgramsWithout(StakingProgramId.Beta5), deprecated: false, }, - [StakingProgramId.BetaMechMarketplace]: { name: 'Pearl Beta Mech Marketplace', canMigrateTo: activeStakingProgramsWithout( diff --git a/frontend/hooks/useRewardsHistory.ts b/frontend/hooks/useRewardsHistory.ts index f9ca9975..e2e8dd96 100644 --- a/frontend/hooks/useRewardsHistory.ts +++ b/frontend/hooks/useRewardsHistory.ts @@ -5,7 +5,10 @@ import { groupBy } from 'lodash'; import { useEffect, useMemo } from 'react'; import { z } from 'zod'; +import { GNOSIS_SERVICE_STAKING_CONTRACT_ADDRESSES } from '@/constants/contractAddresses'; import { GNOSIS_REWARDS_HISTORY_SUBGRAPH_URL } from '@/constants/urls'; +import { Address } from '@/types/Address'; +import { getStakingProgramIdByAddress } from '@/utils/service'; import { useServices } from './useServices'; @@ -32,14 +35,27 @@ const CheckpointGraphResponseSchema = z.object({ message: 'Expected epochLength to be a string', }), contractAddress: z.string({ - message: 'Expected contractAddress to be a string', + message: 'Expected contractAddress to be a valid Ethereum address', }), }); -type CheckpointGraphResponse = z.infer; +const CheckpointsGraphResponseSchema = z.array(CheckpointGraphResponseSchema); +type CheckpointResponse = z.infer; + +const supportedStakingContracts = Object.values( + GNOSIS_SERVICE_STAKING_CONTRACT_ADDRESSES, +).map((address) => `"${address}"`); const fetchRewardsQuery = gql` { - checkpoints(orderBy: epoch, orderDirection: desc) { + checkpoints( + orderBy: epoch + orderDirection: desc + first: 1000 + where: { + serviceIds_not: [] + contractAddress_in: [${supportedStakingContracts}] + } + ) { id availableRewards blockTimestamp @@ -53,7 +69,7 @@ const fetchRewardsQuery = gql` } `; -export type TransformedCheckpoint = { +export type Checkpoint = { epoch: string; rewards: string[]; serviceIds: string[]; @@ -61,6 +77,7 @@ export type TransformedCheckpoint = { transactionHash: string; epochLength: string; contractAddress: string; + contractName?: string; epochEndTimeStamp: number; epochStartTimeStamp: number; reward: number; @@ -68,15 +85,15 @@ export type TransformedCheckpoint = { }; const transformCheckpoints = ( - checkpoints: CheckpointGraphResponse[], - serviceId?: number, + checkpoints: CheckpointResponse[], + serviceId: number, timestampToIgnore?: null | number, -): TransformedCheckpoint[] => { +): Checkpoint[] => { if (!checkpoints || checkpoints.length === 0) return []; if (!serviceId) return []; - const transformed = checkpoints - .map((checkpoint: CheckpointGraphResponse, index: number) => { + return checkpoints + .map((checkpoint: CheckpointResponse, index: number) => { const serviceIdIndex = checkpoint.serviceIds?.findIndex((id) => Number(id) === serviceId) ?? -1; @@ -84,12 +101,9 @@ const transformCheckpoints = ( let reward = '0'; if (serviceIdIndex !== -1) { - const isRewardFinite = isFinite( - Number(checkpoint.rewards?.[serviceIdIndex]), - ); - reward = isRewardFinite - ? checkpoint.rewards?.[serviceIdIndex] ?? '0' - : '0'; + const currentReward = checkpoint.rewards?.[serviceIdIndex]; + const isRewardFinite = isFinite(Number(currentReward)); + reward = isRewardFinite ? currentReward ?? '0' : '0'; } // If the epoch is 0, it means it's the first epoch else, @@ -99,106 +113,119 @@ const transformCheckpoints = ( ? Number(checkpoint.blockTimestamp) - Number(checkpoint.epochLength) : checkpoints[index + 1]?.blockTimestamp ?? 0; + const stakingContractId = getStakingProgramIdByAddress( + checkpoint.contractAddress as Address, + ); + return { ...checkpoint, epochEndTimeStamp: Number(checkpoint.blockTimestamp ?? Date.now()), epochStartTimeStamp: Number(epochStartTimeStamp), reward: Number(ethers.utils.formatUnits(reward, 18)), earned: serviceIdIndex !== -1, + contractName: stakingContractId, }; }) - .filter((epoch) => { - // If the contract has been switched to new contract, ignore the rewards from the old contract of the same epoch, + .filter((checkpoint) => { + // If the contract has been switched to new contract, + // ignore the rewards from the old contract of the same epoch, // as the rewards are already accounted in the new contract. - // example: If contract was switched on September 1st, 2024, ignore the rewards before that date - // in the old contract. + // Example: If contract was switched on September 1st, 2024, + // ignore the rewards before that date in the old contract. if (!timestampToIgnore) return true; - if (!epoch) return false; - if (!epoch.epochEndTimeStamp) return false; - return epoch.epochEndTimeStamp < timestampToIgnore; - }); + if (!checkpoint) return false; + if (!checkpoint.epochEndTimeStamp) return false; - return transformed; + return checkpoint.epochEndTimeStamp < timestampToIgnore; + }); }; -export const useRewardsHistory = () => { +type CheckpointsResponse = { checkpoints: CheckpointResponse[] }; + +/** + * hook to fetch rewards history for all contracts + */ +const useContractCheckpoints = () => { const { serviceId } = useServices(); - const { - data: contractCheckpoints, - isError, - isLoading, - isFetching, - refetch, - } = useQuery({ + return useQuery({ queryKey: [], async queryFn() { - if (!serviceId) return { checkpoints: [] }; + if (!serviceId) return []; - const checkpointsResponse: { - checkpoints: CheckpointGraphResponse[]; - } = await request(GNOSIS_REWARDS_HISTORY_SUBGRAPH_URL, fetchRewardsQuery); - return checkpointsResponse; + const checkpointsResponse = await request( + GNOSIS_REWARDS_HISTORY_SUBGRAPH_URL, + fetchRewardsQuery, + ); + + const parsedCheckpoints = CheckpointsGraphResponseSchema.safeParse( + checkpointsResponse.checkpoints, + ); + + if (parsedCheckpoints.error) { + console.error(parsedCheckpoints.error); + return []; + } + + return parsedCheckpoints.data; }, - select: ({ - checkpoints, - }): { [contractAddress: string]: TransformedCheckpoint[] } => { + select: (checkpoints): { [contractAddress: string]: Checkpoint[] } => { if (!serviceId) return {}; if (!checkpoints) return {}; - // group checkpoints by contract address / staking program + // group checkpoints by contract address (staking program) const checkpointsByContractAddress = groupBy( checkpoints, 'contractAddress', ); - // only need relevant contract history that service has participated in + // only need relevant contract history that service has participated in, // ignore contract addresses with no activity from the service - const relevantTransformedCheckpoints = Object.keys( - checkpointsByContractAddress, - ).reduce( - ( - acc: { [stakingContractAddress: string]: TransformedCheckpoint[] }, - stakingContractAddress: string, - ) => { - const checkpoints = - checkpointsByContractAddress[stakingContractAddress]; - - // skip if there are no checkpoints for the contract address - if (!checkpoints) return acc; - if (checkpoints.length <= 0) return acc; - if ( - !checkpoints.some((checkpoint) => - checkpoint.serviceIds.includes(`${serviceId}`), - ) - ) - return acc; - - // transform the checkpoints .. - // includes epoch start and end time, rewards, etc - const transformedCheckpoints = transformCheckpoints( - checkpoints, - serviceId as number, - null, - ); - - return { - ...acc, - [stakingContractAddress]: transformedCheckpoints, - }; - }, - {}, - ); + return Object.keys(checkpointsByContractAddress).reduce<{ + [stakingContractAddress: string]: Checkpoint[]; + }>((acc, stakingContractAddress: string) => { + const checkpoints = + checkpointsByContractAddress[stakingContractAddress]; + + // skip if there are no checkpoints for the contract address + if (!checkpoints) return acc; + if (checkpoints.length <= 0) return acc; + + // check if the service has participated in the staking contract + // if not, skip the contract + const isServiceParticipatedInContract = checkpoints.some((checkpoint) => + checkpoint.serviceIds.includes(`${serviceId}`), + ); + if (!isServiceParticipatedInContract) return acc; + + // transform the checkpoints, includes epoch start and end time, rewards, etc + const transformedCheckpoints = transformCheckpoints( + checkpoints, + serviceId, + null, + ); - return relevantTransformedCheckpoints; + return { ...acc, [stakingContractAddress]: transformedCheckpoints }; + }, {}); }, refetchOnWindowFocus: false, refetchInterval: ONE_DAY_IN_MS, enabled: !!serviceId, }); +}; - const allCheckpoints = useMemo( +export const useRewardsHistory = () => { + const { serviceId } = useServices(); + const { + isError, + isLoading, + isFetching, + refetch, + data: contractCheckpoints, + } = useContractCheckpoints(); + + const epochSortedCheckpoints = useMemo( () => Object.values(contractCheckpoints ?? {}) .flat() @@ -207,54 +234,50 @@ export const useRewardsHistory = () => { ); const latestRewardStreak = useMemo(() => { + if (isLoading || isFetching) return 0; if (!contractCheckpoints) return 0; // remove all histories that are not earned - const earnedCheckpoints = allCheckpoints.filter( + const earnedCheckpoints = epochSortedCheckpoints.filter( (checkpoint) => checkpoint.earned, ); - // sort descending by epoch end time - const sorted = earnedCheckpoints.sort( - (a, b) => b.epochEndTimeStamp - a.epochEndTimeStamp, - ); + const timeNow = Math.trunc(Date.now() / 1000); - let streak = 0; - for (let i = 0; i < sorted.length; i++) { - const current = sorted[i]; + let isStreakBroken = false; // flag to break the streak + return earnedCheckpoints.reduce((streakCount, current, i) => { + if (isStreakBroken) return streakCount; // first iteration if (i === 0) { - const timeNow = Date.now() / 1000; - - // multiplied by 2 to give a buffer of 2 days - const initialEpochGap = timeNow - current.epochEndTimeStamp; + const initialEpochGap = Math.trunc(timeNow - current.epochEndTimeStamp); - // if the last epoch was more than 1 day ago, break - if (initialEpochGap > ONE_DAY_IN_S) break; + // If the epoch gap is greater than the epoch length + if (initialEpochGap > Number(current.epochLength)) { + isStreakBroken = true; + return streakCount; + } - // if the last epoch was less than 1 day ago, increment streak if (current.earned) { - streak++; - continue; + return streakCount + 1; } - break; + isStreakBroken = true; + return streakCount; } - // nth interations - const previous = sorted[i - 1]; + // other iterations + const previous = earnedCheckpoints[i - 1]; const epochGap = previous.epochStartTimeStamp - current.epochEndTimeStamp; - if (current.earned && epochGap <= ONE_DAY_IN_S) { - streak++; - continue; + if (current.earned && epochGap <= Number(current.epochLength)) { + return streakCount + 1; } - break; - } - return streak; - }, [allCheckpoints, contractCheckpoints]); + isStreakBroken = true; + return streakCount; + }, 0); + }, [isLoading, isFetching, epochSortedCheckpoints, contractCheckpoints]); useEffect(() => { serviceId && refetch(); @@ -266,7 +289,7 @@ export const useRewardsHistory = () => { isLoading, latestRewardStreak, refetch, - allCheckpoints, + allCheckpoints: epochSortedCheckpoints, contractCheckpoints, }; }; diff --git a/frontend/utils/service.ts b/frontend/utils/service.ts index 3b3fe45b..1321e565 100644 --- a/frontend/utils/service.ts +++ b/frontend/utils/service.ts @@ -1,6 +1,8 @@ import { ServiceTemplate } from '@/client'; +import { GNOSIS_SERVICE_STAKING_CONTRACT_ADDRESSES } from '@/constants/contractAddresses'; import { INITIAL_DEFAULT_STAKING_PROGRAM_ID } from '@/context/StakingProgramProvider'; import { StakingProgramId } from '@/enums/StakingProgram'; +import { Address } from '@/types/Address'; /** TODO: update from hardcoded, workaround for quick release */ export const getMinimumStakedAmountRequired = ( @@ -37,3 +39,21 @@ export const getMinimumStakedAmountRequired = ( return; }; + +/** + * + * Get the staking program id by address + * @example getStakingProgramIdByAddress('0x3052451e1eAee78e62E169AfdF6288F8791F2918') // StakingProgramId.Beta4 + */ +export const getStakingProgramIdByAddress = ( + contractAddress: Address, +): StakingProgramId | undefined => { + const entries = Object.entries(GNOSIS_SERVICE_STAKING_CONTRACT_ADDRESSES) as [ + StakingProgramId, + Address, + ][]; + const foundEntry = entries.find( + ([, address]) => address.toLowerCase() === contractAddress.toLowerCase(), + ); + return foundEntry ? foundEntry[0] : undefined; +}; From bad4d93961b6be736c3fad4d3b645698fb6083b3 Mon Sep 17 00:00:00 2001 From: truemiller Date: Fri, 8 Nov 2024 16:38:24 +0000 Subject: [PATCH 24/39] bump: rc194 --- package.json | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index d7619ad5..8b9d99e0 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,5 @@ "download-binaries": "sh download_binaries.sh", "build:pearl": "sh build_pearl.sh" }, - "version": "0.1.0-rc193" + "version": "0.1.0-rc194" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c6bcd27c..b9f6ca24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "olas-operate-middleware" -version = "0.1.0-rc193" +version = "0.1.0-rc194" description = "" authors = ["David Vilela ", "Viraj Patel "] readme = "README.md" From d9d98249443436f0b85f15352c12cd30d13221e6 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Tue, 5 Nov 2024 14:36:47 +0300 Subject: [PATCH 25/39] utf-8 fix to use open-aea with fix --- .github/workflows/release.yml | 3 ++- Makefile | 9 ++++++++- electron/install.js | 2 +- package.json | 2 +- pyproject.toml | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f0bb4d47..1bc0bbe7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -59,7 +59,8 @@ jobs: run: | trader_version=$(poetry run python -c "import yaml; config = yaml.safe_load(open('templates/trader.yaml')); print(config['service_version'])") echo $trader_version - mkdir dist && curl -L -o dist/aea_bin "https://github.com/valory-xyz/trader/releases/download/${trader_version}/trader_bin_${{ matrix.arch }}" + make ./dist/aea_bin + #instead of this one mwe use make; mkdir dist && curl -L -o dist/aea_bin "https://github.com/valory-xyz/trader/releases/download/${trader_version}/trader_bin_${{ env.OS_ARCH }}" - name: Build with PyInstaller run: | diff --git a/Makefile b/Makefile index 5a766bb5..c60d1222 100644 --- a/Makefile +++ b/Makefile @@ -13,11 +13,18 @@ endef ./dist/aea_win.exe: ./trader/ mkdir -p dist - cd trader && poetry install && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots --hidden-import grpc --hidden-import openapi_core --collect-all google.protobuf --collect-all openapi_core --collect-all openapi_spec_validator --collect-all asn1crypto --hidden-import py_ecc --hidden-import pytz --onefile pyinstaller/trader_bin.py --name trader_win + cd trader && poetry install && rm -fr ./open-aea && git clone https://github.com/valory-xyz/open-aea.git -b fix/1.5.2_encoding && poetry run pip install ./open-aea/ && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots --hidden-import grpc --hidden-import openapi_core --collect-all google.protobuf --collect-all openapi_core --collect-all openapi_spec_validator --collect-all asn1crypto --hidden-import py_ecc --hidden-import pytz --onefile pyinstaller/trader_bin.py --name trader_win cp -f trader/dist/trader_win.exe ./dist/aea_win.exe pwd +./dist/aea_bin: ./trader/ + mkdir -p dist + cd trader && poetry install && rm -fr ./open-aea && git clone https://github.com/valory-xyz/open-aea.git -b fix/1.5.2_encoding && poetry run pip install ./open-aea/ && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots --hidden-import grpc --hidden-import openapi_core --collect-all google.protobuf --collect-all openapi_core --collect-all openapi_spec_validator --collect-all asn1crypto --hidden-import py_ecc --hidden-import pytz --onefile pyinstaller/trader_bin.py --name trader_bin + cp -f trader/dist/trader_bin ./dist/aea_bin + pwd + + ./dist/tendermint_win.exe: ./operate/ pwd poetry install && poetry run pyinstaller operate/services/utils/tendermint.py --onefile --name tendermint_win diff --git a/electron/install.js b/electron/install.js index b6c22f31..0d1aafa6 100644 --- a/electron/install.js +++ b/electron/install.js @@ -25,7 +25,7 @@ const Env = { PATH: `${process.env.PATH}:/opt/homebrew/bin:/usr/local/bin`, HOMEBREW_NO_AUTO_UPDATE: '1', PYTHONUTF8: '1', - PYTHONIOENCODING: 'utf8' + PYTHONIOENCODING: 'utf-8' }; const SudoOptions = { diff --git a/package.json b/package.json index 8b9d99e0..581a7506 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,5 @@ "download-binaries": "sh download_binaries.sh", "build:pearl": "sh build_pearl.sh" }, - "version": "0.1.0-rc194" + "version": "0.1.0-rc191" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b9f6ca24..d9488f40 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "olas-operate-middleware" -version = "0.1.0-rc194" +version = "0.1.0-rc191" description = "" authors = ["David Vilela ", "Viraj Patel "] readme = "README.md" From 8925d406cd0c37fdd4c9f7f2d6a074b81376861d Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Thu, 7 Nov 2024 13:53:23 +0300 Subject: [PATCH 26/39] pearl backend open-aea fix for utf8 --- .github/workflows/release.yml | 8 +++++++- Makefile | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1bc0bbe7..2d5e17cb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -65,7 +65,13 @@ jobs: - name: Build with PyInstaller run: | poetry run pyinstaller operate/services/utils/tendermint.py --onefile - poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_bin:. --add-binary dist/tendermint:. --onefile --name pearl_${{ matrix.arch }} + + # patch open aea in place + rm -fr ./open-aea + git clone https://github.com/valory-xyz/open-aea.git -b fix/1.5.2_encoding + poetry run pip install ./open-aea/ + + poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_bin:. --add-binary dist/tendermint:. --onefile --name pearl_${{ env.OS_ARCH }} - name: Upload Release Assets uses: actions/upload-artifact@v4 diff --git a/Makefile b/Makefile index c60d1222..1dd2bdb2 100644 --- a/Makefile +++ b/Makefile @@ -32,7 +32,7 @@ endef ./dist/pearl_win.exe: ./operate/ ./dist/aea_win.exe ./dist/tendermint_win.exe pwd - poetry install && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all coincurve --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_win.exe:. --add-binary dist/tendermint_win.exe:. --onefile --name pearl_win + poetry install && rm -fr ./open-aea && git clone https://github.com/valory-xyz/open-aea.git -b fix/1.5.2_encoding && poetry run pip install ./open-aea/ && poetry run pyinstaller --collect-data eth_account --collect-all aea --collect-all coincurve --collect-all autonomy --collect-all operate --collect-all aea_ledger_ethereum --collect-all aea_ledger_cosmos --collect-all aea_ledger_ethereum_flashbots --hidden-import aea_ledger_ethereum --hidden-import aea_ledger_cosmos --hidden-import aea_ledger_ethereum_flashbots operate/pearl.py --add-binary dist/aea_win.exe:. --add-binary dist/tendermint_win.exe:. --onefile --name pearl_win ./electron/bins/: From db1b928d54a8cdc789ab933fc7a7f9fc3739d823 Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Mon, 11 Nov 2024 15:56:59 +0100 Subject: [PATCH 27/39] fix: prevent unintended downgrade --- operate/services/service.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/operate/services/service.py b/operate/services/service.py index e4627404..55458177 100644 --- a/operate/services/service.py +++ b/operate/services/service.py @@ -668,7 +668,13 @@ def migrate_format(cls, path: Path) -> None: data = json.load(file) version = data.get("version", 0) - if version >= 3: + + if version > SERVICE_CONFIG_VERSION: + raise ValueError( + f"Service configuration in {path} has version {version}, which means it was created with a newer version of olas-operate-middleware. Only configuration versions <= {SERVICE_CONFIG_VERSION} are supported by this version of olas-operate-middleware." + ) + + if version == SERVICE_CONFIG_VERSION: return # Migrate from old formats to new format From 5b2892b4f8a78c376c9e0cf0733b2a37c6623496 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Thu, 7 Nov 2024 13:47:30 +0300 Subject: [PATCH 28/39] TM graceful stop --- operate/constants.py | 2 + operate/services/deployment_runner.py | 18 ++++++++- operate/services/utils/tendermint.py | 55 +++++++++++++++++++++++++-- package.json | 2 +- pyproject.toml | 2 +- 5 files changed, 73 insertions(+), 6 deletions(-) diff --git a/operate/constants.py b/operate/constants.py index 4a2b77f2..50d75635 100644 --- a/operate/constants.py +++ b/operate/constants.py @@ -37,3 +37,5 @@ ON_CHAIN_INTERACT_SLEEP = 3.0 HEALTH_CHECK_URL = "http://127.0.0.1:8716/healthcheck" # possible DNS issues on windows so use IP address + +TM_CONTROL_URL = "http://localhost:8080" diff --git a/operate/services/deployment_runner.py b/operate/services/deployment_runner.py index 4f10dae8..a5f8c87e 100644 --- a/operate/services/deployment_runner.py +++ b/operate/services/deployment_runner.py @@ -28,12 +28,16 @@ import typing as t from abc import ABC, ABCMeta, abstractmethod from pathlib import Path +from traceback import print_exc from typing import Any from venv import main as venv_cli import psutil from aea.__version__ import __version__ as aea_version from autonomy.__version__ import __version__ as autonomy_version +from requests import get + +from operate import constants class AbstractDeploymentRunner(ABC): @@ -86,6 +90,9 @@ def kill_process(pid: int) -> None: class BaseDeploymentRunner(AbstractDeploymentRunner, metaclass=ABCMeta): """Base deployment with aea support.""" + TM_CONTROL_URL = constants.TM_CONTROL_URL + SLEEP_BEFORE_TM_KILL = 2 # seconds + def _run_aea(self, *args: str, cwd: Path) -> Any: """Run aea command.""" return self._run_cmd(args=[self._aea_bin, *args], cwd=cwd) @@ -123,7 +130,7 @@ def _prepare_agent_env(self) -> Any: for var in env: # Fix tendermint connection params if var.endswith("MODELS_PARAMS_ARGS_TENDERMINT_COM_URL"): - env[var] = "http://localhost:8080" + env[var] = self.TM_CONTROL_URL if var.endswith("MODELS_PARAMS_ARGS_TENDERMINT_URL"): env[var] = "http://localhost:26657" @@ -189,8 +196,17 @@ def _stop_agent(self) -> None: return kill_process(int(pid.read_text(encoding="utf-8"))) + def _get_tm_exit_url(self) -> str: + return f"{self.TM_CONTROL_URL}/exit" + def _stop_tendermint(self) -> None: """Start tendermint process.""" + try: + get(self._get_tm_exit_url()) + time.sleep(self.SLEEP_BEFORE_TM_KILL) + except Exception: # pylint: disable=broad-except + print_exc() + pid = self._work_directory / "tendermint.pid" if not pid.exists(): return diff --git a/operate/services/utils/tendermint.py b/operate/services/utils/tendermint.py index 9fa90d43..e9782a67 100644 --- a/operate/services/utils/tendermint.py +++ b/operate/services/utils/tendermint.py @@ -18,8 +18,10 @@ # ------------------------------------------------------------------------------ """Tendermint manager.""" +import contextlib import json import logging +import multiprocessing import os import platform import re @@ -32,6 +34,7 @@ from logging import Logger from pathlib import Path from threading import Event, Thread +from time import sleep from typing import Any, Callable, Dict, List, Optional, Tuple, cast import requests @@ -310,8 +313,8 @@ def _stop_monitoring_thread(self) -> None: def stop(self) -> None: """Stop a Tendermint node process.""" - self._stop_tm_process() self._stop_monitoring_thread() + self._stop_tm_process() @staticmethod def _write_to_console(line: str) -> None: @@ -503,6 +506,9 @@ def create_app( # pylint: disable=too-many-statements ) app = Flask(__name__) # pylint: disable=redefined-outer-name + app._is_on_exit = ( # pylint: disable=protected-access + False # ugly but better than global ver + ) period_dumper = PeriodDumper( logger=app.logger, dump_dir=Path(os.environ["TMSTATE"]), @@ -570,6 +576,8 @@ def update_params() -> Dict: @app.route("/gentle_reset") def gentle_reset() -> Tuple[Any, int]: """Reset the tendermint node gently.""" + if app._is_on_exit: # pylint: disable=protected-access + raise RuntimeError("server exit now") try: tendermint_node.stop() tendermint_node.start() @@ -597,6 +605,8 @@ def app_hash() -> Tuple[Any, int]: @app.route("/hard_reset") def hard_reset() -> Tuple[Any, int]: """Reset the node forcefully, and prune the blocks""" + if app._is_on_exit: # pylint: disable=protected-access + raise RuntimeError("server exit now") try: tendermint_node.stop() if IS_DEV_MODE: @@ -639,7 +649,46 @@ def create_server() -> Any: return flask_app -if __name__ == "__main__": - # Start the Flask server programmatically +def run_app_in_subprocess(q: multiprocessing.Queue) -> None: + """Run flask app in a subprocess to kill it when needed.""" + print("app in subprocess") + app, tendermint_node = create_app() + + @app.route("/exit") + def handle_server_exit() -> Response: + """Handle server exit.""" + app._is_on_exit = True # pylint: disable=protected-access + tendermint_node.stop() + + q.put(True) + return {"node": "stopped"} + + app.run(host="localhost", port=8080) + + +def run_stoppable_main() -> None: + """Main to spawn flask in a subprocess.""" + print("run stoppable main!") + q: multiprocessing.Queue = multiprocessing.Queue() + p = multiprocessing.Process(target=run_app_in_subprocess, args=(q,)) + p.start() + # wait for stop marker + q.get(block=True) + sleep(1) + p.terminate() + + +def main() -> None: + """Main entrance.""" app = create_server() app.run(host="localhost", port=8080) + + +if __name__ == "__main__": + # Start the Flask server programmatically + + with contextlib.suppress(Exception): + # support for pyinstaller multiprocessing + multiprocessing.freeze_support() + + run_stoppable_main() diff --git a/package.json b/package.json index 581a7506..8b9d99e0 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,5 @@ "download-binaries": "sh download_binaries.sh", "build:pearl": "sh build_pearl.sh" }, - "version": "0.1.0-rc191" + "version": "0.1.0-rc194" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d9488f40..b9f6ca24 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "olas-operate-middleware" -version = "0.1.0-rc191" +version = "0.1.0-rc194" description = "" authors = ["David Vilela ", "Viraj Patel "] readme = "README.md" From bce4d936c2c839b0cdeb7092e3c351b170b3a645 Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Mon, 11 Nov 2024 17:05:21 +0100 Subject: [PATCH 29/39] fix: raise exception --- operate/services/manage.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/operate/services/manage.py b/operate/services/manage.py index 950334f3..8a48f42b 100644 --- a/operate/services/manage.py +++ b/operate/services/manage.py @@ -112,6 +112,8 @@ def json(self) -> t.List[t.Dict]: try: service = Service.load(path=path) data.append(service.json) + except ValueError as e: + raise e except Exception as e: # pylint: disable=broad-except self.logger.warning( f"Failed to load service: {path.name}. Exception: {e}" @@ -477,6 +479,10 @@ def _deploy_service_onchain_from_safe( # pylint: disable=too-many-statements,to # TODO fix this os.environ["CUSTOM_CHAIN_RPC"] = ledger_config.rpc + + print("!!!!!!!!!!!!!") + print(ledger_config.rpc) + current_agent_id = None if chain_data.token > -1: self.logger.info("Syncing service state") From 18b1bb9759485a72c0f2bd71f7f18980fd0bec30 Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Mon, 11 Nov 2024 17:12:08 +0100 Subject: [PATCH 30/39] chore: revert debug message --- operate/services/manage.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/operate/services/manage.py b/operate/services/manage.py index 8a48f42b..8934e8d0 100644 --- a/operate/services/manage.py +++ b/operate/services/manage.py @@ -479,10 +479,6 @@ def _deploy_service_onchain_from_safe( # pylint: disable=too-many-statements,to # TODO fix this os.environ["CUSTOM_CHAIN_RPC"] = ledger_config.rpc - - print("!!!!!!!!!!!!!") - print(ledger_config.rpc) - current_agent_id = None if chain_data.token > -1: self.logger.info("Syncing service state") From cc51de1df17e9cb6a38f2967d1b5d4ecb8acbf8d Mon Sep 17 00:00:00 2001 From: truemiller Date: Tue, 12 Nov 2024 10:29:06 +0000 Subject: [PATCH 31/39] release: rc195 --- package.json | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8b9d99e0..51757886 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,5 @@ "download-binaries": "sh download_binaries.sh", "build:pearl": "sh build_pearl.sh" }, - "version": "0.1.0-rc194" + "version": "0.1.0-rc195" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b9f6ca24..8d66f2f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "olas-operate-middleware" -version = "0.1.0-rc194" +version = "0.1.0-rc195" description = "" authors = ["David Vilela ", "Viraj Patel "] readme = "README.md" From f88c3543a42ea3f866a725bd51fbb801bf4acdfb Mon Sep 17 00:00:00 2001 From: truemiller Date: Tue, 12 Nov 2024 17:24:33 +0000 Subject: [PATCH 32/39] refactor: process killing, logging, var names for clarity --- electron/main.js | 81 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 14 deletions(-) diff --git a/electron/main.js b/electron/main.js index 763e4f98..7afb26cc 100644 --- a/electron/main.js +++ b/electron/main.js @@ -70,11 +70,19 @@ let splashWindow = null; /** @type {Electron.Tray | null} */ let tray = null; -let operateDaemon, operateDaemonPid, nextAppProcess, nextAppProcessPid; +// Used in production and development +let operateDaemon; +let operateDaemonPid; +// Child processes for running next app are only used in development +// required for hot reloads and other dev features +let devNextApp; +let devNextAppPid; + +// Next.js app instance for production // @ts-ignore - Workaround for the missing type definitions const nextApp = next({ - dev: false, // this instance is only used for production + dev: false, // DO NOT SET TO TRUE dir: path.join(__dirname), }); @@ -85,28 +93,73 @@ function showNotification(title, body) { } async function beforeQuit() { - if (operateDaemonPid) { + // destroy all ui components for immediate feedback + tray?.destroy(); + splashWindow?.destroy(); + mainWindow?.destroy(); + + if (operateDaemon || operateDaemonPid) { + // gracefully stop running services try { await fetch( `http://localhost:${appConfig.ports.prod.operate}/stop_all_services`, ); - await killProcesses(operateDaemonPid); } catch (e) { - logger.electron(e); + logger.electron("Couldn't stop_all_services gracefully:"); + logger.electron(JSON.stringify(e, null, 2)); + } + + // clean-up via pid first* + // may have dangling subprocesses + try { + operateDaemonPid && (await killProcesses(operateDaemonPid)); + } catch (e) { + logger.electron("Couldn't kill daemon processes via pid:"); + logger.electron(JSON.stringify(e, null, 2)); + } + + // attempt to kill the daemon process via kill + // if the pid-based cleanup fails + try { + const dead = operateDaemon?.kill(); + if (!dead) { + logger.electron('Daemon process still alive after kill'); + } + } catch (e) { + logger.electron("Couldn't kill operate daemon process via kill:"); + logger.electron(JSON.stringify(e, null, 2)); } } - if (nextAppProcessPid) { + if (devNextApp || devNextAppPid) { + // attempt graceful kill first with next app + try { + const dead = devNextApp?.kill(); + if (!dead) { + logger.electron('Dev NextApp process still alive after kill'); + } + } catch (e) { + logger.electron("Couldn't kill devNextApp process via kill:"); + logger.electron(JSON.stringify(e, null, 2)); + } + + // attempt to kill the dev next app process via pid try { - await killProcesses(nextAppProcessPid); + devNextAppPid && (await killProcesses(devNextAppPid)); } catch (e) { - logger.electron(e); + logger.electron("Couldn't kill devNextApp processes via pid:"); + logger.electron(JSON.stringify(e, null, 2)); } } - tray?.destroy(); - splashWindow?.destroy(); - mainWindow?.destroy(); + if (nextApp) { + // attempt graceful close of prod next app + await nextApp.close().catch((e) => { + logger.electron("Couldn't close NextApp gracefully:"); + logger.electron(JSON.stringify(e, null, 2)); + }); + // electron will kill next service on exit + } } const APP_WIDTH = 460; @@ -340,7 +393,7 @@ async function launchNextApp() { async function launchNextAppDev() { await new Promise(function (resolve, _reject) { process.env.NEXT_PUBLIC_BACKEND_PORT = appConfig.ports.dev.operate; // must set next env var to connect to backend - nextAppProcess = spawn( + devNextApp = spawn( 'yarn', ['dev:frontend', '--port', appConfig.ports.dev.next], { @@ -352,8 +405,8 @@ async function launchNextAppDev() { }, }, ); - nextAppProcessPid = nextAppProcess.pid; - nextAppProcess.stdout.on('data', (data) => { + devNextAppPid = devNextApp.pid; + devNextApp.stdout.on('data', (data) => { logger.next(data.toString().trim()); resolve(); }); From 7f3ef6286946872bbc3437bbf8b789c3f64f4a3e Mon Sep 17 00:00:00 2001 From: truemiller Date: Tue, 12 Nov 2024 17:25:05 +0000 Subject: [PATCH 33/39] feat: add electron logging to killProcesses --- electron/processes.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/electron/processes.js b/electron/processes.js index faaa9266..e65e2ed2 100644 --- a/electron/processes.js +++ b/electron/processes.js @@ -16,15 +16,16 @@ function killProcesses(pid) { // Array of PIDs to kill, starting with the children const pidsToKill = children.map((p) => p.PID); - logger.info("Pids to kill " + JSON.stringify(pidsToKill)); + logger.electron('Pids to kill ' + JSON.stringify(pidsToKill)); const killCommand = isWindows ? windowsKillCommand : unixKillCommand; let errors = []; - for (const ppid of pidsToKill) { - logger.info("kill: " + ppid); - exec(`${killCommand} ${ppid}`, (err) => { - logger.error("Pids to kill error:" + err); + for (const pid of pidsToKill) { + logger.electron('killing: ' + pid); + exec(`${killCommand} ${pid}`, (err) => { + logger.electron(`error killing pid ${pid}`); + logger.electron(JSON.stringify(err, null, 2)); if ( err?.message?.includes(isWindows ? 'not found' : 'No such process') ) { @@ -36,9 +37,7 @@ function killProcesses(pid) { if (errors.length === 0) { reject(errors); - - - } else resolve(); + } else resolve(); }); }); } From 119b6985b7667ad206b9077aa5e1da0490f21625 Mon Sep 17 00:00:00 2001 From: Josh Miller <31908788+truemiller@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:38:23 +0000 Subject: [PATCH 34/39] enforce err --- electron/processes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/electron/processes.js b/electron/processes.js index e65e2ed2..5a1e8ba0 100644 --- a/electron/processes.js +++ b/electron/processes.js @@ -24,8 +24,8 @@ function killProcesses(pid) { for (const pid of pidsToKill) { logger.electron('killing: ' + pid); exec(`${killCommand} ${pid}`, (err) => { - logger.electron(`error killing pid ${pid}`); - logger.electron(JSON.stringify(err, null, 2)); + err && logger.electron(`error killing pid ${pid}`); + err && logger.electron(JSON.stringify(err, null, 2)); if ( err?.message?.includes(isWindows ? 'not found' : 'No such process') ) { From 3de2a136f666287f79b2ee308b468d38f1b8cd92 Mon Sep 17 00:00:00 2001 From: truemiller Date: Tue, 12 Nov 2024 17:40:26 +0000 Subject: [PATCH 35/39] bump: rc196 --- package.json | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 51757886..16dbf2dd 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,5 @@ "download-binaries": "sh download_binaries.sh", "build:pearl": "sh build_pearl.sh" }, - "version": "0.1.0-rc195" + "version": "0.1.0-rc196" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8d66f2f0..440429ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "olas-operate-middleware" -version = "0.1.0-rc195" +version = "0.1.0-rc196" description = "" authors = ["David Vilela ", "Viraj Patel "] readme = "README.md" From a845e62dc882fb3a8598485500ace00c96428ecb Mon Sep 17 00:00:00 2001 From: Josh Miller <31908788+truemiller@users.noreply.github.com> Date: Tue, 12 Nov 2024 17:44:37 +0000 Subject: [PATCH 36/39] Update electron/main.js --- electron/main.js | 1 + 1 file changed, 1 insertion(+) diff --git a/electron/main.js b/electron/main.js index 7afb26cc..6c453b6a 100644 --- a/electron/main.js +++ b/electron/main.js @@ -80,6 +80,7 @@ let devNextApp; let devNextAppPid; // Next.js app instance for production +// requires http server wrap to work; assign port, receive requests, deliver responses // @ts-ignore - Workaround for the missing type definitions const nextApp = next({ dev: false, // DO NOT SET TO TRUE From bfd906c091ba04f768ef6d8c902939d2cbee84a0 Mon Sep 17 00:00:00 2001 From: "Yuri (solarw) Turchenkov" Date: Wed, 13 Nov 2024 09:29:29 +0300 Subject: [PATCH 37/39] tm kill better timeout handling --- operate/services/deployment_runner.py | 2 +- operate/services/utils/tendermint.py | 23 +++++++++++++++-------- package.json | 2 +- pyproject.toml | 2 +- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/operate/services/deployment_runner.py b/operate/services/deployment_runner.py index a5f8c87e..f6deae07 100644 --- a/operate/services/deployment_runner.py +++ b/operate/services/deployment_runner.py @@ -202,7 +202,7 @@ def _get_tm_exit_url(self) -> str: def _stop_tendermint(self) -> None: """Start tendermint process.""" try: - get(self._get_tm_exit_url()) + get(self._get_tm_exit_url(), timeout=(1, 10)) time.sleep(self.SLEEP_BEFORE_TM_KILL) except Exception: # pylint: disable=broad-except print_exc() diff --git a/operate/services/utils/tendermint.py b/operate/services/utils/tendermint.py index e9782a67..407604e9 100644 --- a/operate/services/utils/tendermint.py +++ b/operate/services/utils/tendermint.py @@ -309,7 +309,7 @@ def _stop_monitoring_thread(self) -> None: """Stop a monitoring process.""" if self._monitoring is not None: self._monitoring.stop() # set stop event - self._monitoring.join() + self._monitoring.join(timeout=20) def stop(self) -> None: """Stop a Tendermint node process.""" @@ -658,10 +658,11 @@ def run_app_in_subprocess(q: multiprocessing.Queue) -> None: def handle_server_exit() -> Response: """Handle server exit.""" app._is_on_exit = True # pylint: disable=protected-access - tendermint_node.stop() - - q.put(True) - return {"node": "stopped"} + try: + tendermint_node.stop() + finally: + q.put(True) + return {"node": "stopped"} app.run(host="localhost", port=8080) @@ -673,9 +674,15 @@ def run_stoppable_main() -> None: p = multiprocessing.Process(target=run_app_in_subprocess, args=(q,)) p.start() # wait for stop marker - q.get(block=True) - sleep(1) - p.terminate() + try: + q.get(block=True) + sleep(1) + finally: + p.terminate() + with contextlib.suppress(Exception): + p.join(timeout=10) + p.terminate() + def main() -> None: diff --git a/package.json b/package.json index 16dbf2dd..c91dfc62 100644 --- a/package.json +++ b/package.json @@ -63,5 +63,5 @@ "download-binaries": "sh download_binaries.sh", "build:pearl": "sh build_pearl.sh" }, - "version": "0.1.0-rc196" + "version": "0.1.0-rc197" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 440429ad..2909aa82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "olas-operate-middleware" -version = "0.1.0-rc196" +version = "0.1.0-rc197" description = "" authors = ["David Vilela ", "Viraj Patel "] readme = "README.md" From abb84ded933a3ea80df61cb13414db973ca45777 Mon Sep 17 00:00:00 2001 From: truemiller Date: Wed, 13 Nov 2024 16:09:20 +0000 Subject: [PATCH 38/39] chore: black lint fix for main to staging checks --- operate/services/utils/tendermint.py | 1 - 1 file changed, 1 deletion(-) diff --git a/operate/services/utils/tendermint.py b/operate/services/utils/tendermint.py index 407604e9..7d64cbd6 100644 --- a/operate/services/utils/tendermint.py +++ b/operate/services/utils/tendermint.py @@ -682,7 +682,6 @@ def run_stoppable_main() -> None: with contextlib.suppress(Exception): p.join(timeout=10) p.terminate() - def main() -> None: From d770c88e529ece35805a989701692c7906ce56a9 Mon Sep 17 00:00:00 2001 From: truemiller Date: Wed, 13 Nov 2024 16:22:05 +0000 Subject: [PATCH 39/39] chore: black lint fix for main to staging checks ## Proposed changes Flake8 failing on staging ## Types of changes What types of changes does your code introduce? _Put an `x` in the boxes that apply_ - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) --- operate/services/utils/tendermint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operate/services/utils/tendermint.py b/operate/services/utils/tendermint.py index 7d64cbd6..a6276716 100644 --- a/operate/services/utils/tendermint.py +++ b/operate/services/utils/tendermint.py @@ -662,7 +662,7 @@ def handle_server_exit() -> Response: tendermint_node.stop() finally: q.put(True) - return {"node": "stopped"} + return {"node": "stopped"} app.run(host="localhost", port=8080)