From 3f6289d6ea3afb2b70770b22721b4ac206adeec4 Mon Sep 17 00:00:00 2001 From: Juliano Lazzarotto <30806844+stackchain@users.noreply.github.com> Date: Wed, 16 Aug 2023 14:34:58 +0100 Subject: [PATCH 1/2] refactor: wallets --- apps/wallet-mobile/package.json | 7 +- apps/wallet-mobile/src/AppNavigator.tsx | 2 +- apps/wallet-mobile/src/InitApp.tsx | 8 +- .../src/NftDetails/NftDetails.tsx | 2 +- .../TxHistory/TxDetails/TxDetails.stories.tsx | 11 +- .../src/TxHistory/TxDetails/TxDetails.tsx | 3 +- .../TxHistory/TxHistoryList/TxHistoryList.tsx | 2 +- .../TxHistoryList/TxHistoryListItem.tsx | 3 +- apps/wallet-mobile/src/YoroiApp.tsx | 4 +- .../ChangePinScreen.stories.tsx | 7 +- .../CheckPinInput/CheckPinInput.stories.tsx | 7 +- .../CreatePinInput/CreatePinInput.stories.tsx | 4 +- .../CreatePinScreen.stories.tsx | 4 +- .../PinLoginScreen/PinLoginScreen.stories.tsx | 7 +- apps/wallet-mobile/src/auth/hooks.test.ts | 25 +- .../src/components/NftPreview/NftPreview.tsx | 2 +- .../src/components/TokenIcon/TokenIcon.tsx | 2 +- .../features/Initialization/common/terms.ts | 2 +- .../Settings/Currency/CurrencyContext.tsx | 3 +- .../Settings/PrivacyMode/PrivacyMode.tsx | 3 +- .../src/i18n/LanguageProvider.tsx | 3 +- .../src/metrics/metricsManager.tsx | 8 +- .../wallet-mobile/src/theme/ThemeProvider.tsx | 3 +- .../src/yoroi-wallets/auth/auth.ts | 11 +- .../yoroi-wallets/cardano/api/assetSuply.ts | 2 +- .../src/yoroi-wallets/cardano/api/metadata.ts | 2 +- .../cardano/api/nftModerationStatus.ts | 2 +- .../cardano/api/tokenRegistry.ts | 2 +- .../cardano/byron/ByronWallet.ts | 18 +- .../src/yoroi-wallets/cardano/nfts.ts | 6 +- .../cardano/shelley/ShelleyWallet.ts | 18 +- .../tests/mainnet/ShelleyWallet.test.ts | 17 +- .../testnet/ShelleyWalletTestnet.test.ts | 15 +- .../transactionManager.test.ts | 2 +- .../transactionManager/transactionManager.ts | 8 +- .../cardano/utxoManager/utxoManager.test.ts | 3 +- .../cardano/utxoManager/utxoManager.ts | 10 +- .../src/yoroi-wallets/hooks/index.ts | 3 +- .../yoroi-wallets/memos/memosManager.test.ts | 2 +- .../src/yoroi-wallets/memos/memosManager.ts | 6 +- .../yoroi-wallets/migrations/4_9_0.test.ts | 43 +- .../src/yoroi-wallets/migrations/4_9_0.ts | 7 +- .../src/yoroi-wallets/migrations/hooks.ts | 4 +- .../migrations/walletMeta.test.ts | 74 +- .../yoroi-wallets/migrations/walletMeta.ts | 8 +- .../yoroi-wallets/storage/EncryptedStorage.ts | 6 +- .../yoroi-wallets/storage/StorageProvider.tsx | 21 - .../src/yoroi-wallets/storage/index.ts | 2 - .../src/yoroi-wallets/types/yoroi.ts | 9 +- .../src/yoroi-wallets/utils/parsing.test.ts | 64 +- .../src/yoroi-wallets/utils/parsing.ts | 37 - .../walletManager/walletManager.test.ts | 2 +- .../walletManager/walletManager.ts | 9 +- .../messages/src/AppNavigator.json | 16 +- .../messages/src/NftDetails/NftDetails.json | 44 +- .../src/TxHistory/TxDetails/TxDetails.json | 128 +- .../TxHistoryList/TxHistoryListItem.json | 48 +- .../messages/src/yoroi-wallets/auth/auth.json | 24 +- lerna.json | 4 + metro.config.js | 3 +- package.json | 39 +- packages/types/src/app/storage.ts | 27 + packages/types/src/index.ts | 5 + packages/wallets/.dependency-cruiser.js | 449 ++++ packages/wallets/.gitignore | 70 + packages/wallets/.watchmanconfig | 1 + packages/wallets/babel.config.js | 3 + packages/wallets/jest.setup.js | 3 + packages/wallets/package.json | 209 ++ packages/wallets/scripts/flowgen.sh | 3 + .../wallets/src/adapters/asyncStorage.test.ts | 48 +- .../wallets/src/adapters/asyncStorage.ts | 68 +- packages/wallets/src/helpers.test.ts | 9 + packages/wallets/src/helpers.ts | 3 + packages/wallets/src/index.ts | 4 + packages/wallets/src/parsers.test.ts | 152 ++ packages/wallets/src/parsers.ts | 55 + .../src/translators/storage.reactjs.test.tsx | 57 + .../src/translators/storage.reactjs.tsx | 23 + packages/wallets/tsconfig.build.json | 5 + packages/wallets/tsconfig.json | 25 + yarn.lock | 1798 +++++++++++++++-- 82 files changed, 3235 insertions(+), 623 deletions(-) delete mode 100644 apps/wallet-mobile/src/yoroi-wallets/storage/StorageProvider.tsx create mode 100644 lerna.json create mode 100644 packages/types/src/app/storage.ts create mode 100644 packages/wallets/.dependency-cruiser.js create mode 100644 packages/wallets/.gitignore create mode 100644 packages/wallets/.watchmanconfig create mode 100644 packages/wallets/babel.config.js create mode 100644 packages/wallets/jest.setup.js create mode 100644 packages/wallets/package.json create mode 100644 packages/wallets/scripts/flowgen.sh rename apps/wallet-mobile/src/yoroi-wallets/storage/storage.test.ts => packages/wallets/src/adapters/asyncStorage.test.ts (85%) rename apps/wallet-mobile/src/yoroi-wallets/storage/storage.ts => packages/wallets/src/adapters/asyncStorage.ts (53%) create mode 100644 packages/wallets/src/helpers.test.ts create mode 100644 packages/wallets/src/helpers.ts create mode 100644 packages/wallets/src/index.ts create mode 100644 packages/wallets/src/parsers.test.ts create mode 100644 packages/wallets/src/parsers.ts create mode 100644 packages/wallets/src/translators/storage.reactjs.test.tsx create mode 100644 packages/wallets/src/translators/storage.reactjs.tsx create mode 100644 packages/wallets/tsconfig.build.json create mode 100644 packages/wallets/tsconfig.json diff --git a/apps/wallet-mobile/package.json b/apps/wallet-mobile/package.json index 0811e163b6..d0ec58ded4 100644 --- a/apps/wallet-mobile/package.json +++ b/apps/wallet-mobile/package.json @@ -38,6 +38,9 @@ "release:ios:nightly": "bundle exec fastlane ios release --env nightly", "prerelease:ios:production": "bundle install && ./scripts/update-commit.sh && npx pod-install", "release:ios:production": "bundle exec fastlane ios release --env production", + "reset:android": "cd android && ./gradlew clean && cd ..", + "reset:ios": "yarn pod-install", + "reset": "yarn reset:android && yarn reset:ios", "run:android:dev:debug": "ENVFILE=.env react-native run-android --mode=devDebug --appIdSuffix=dev --verbose", "run:android:nightly:debug": "ENVFILE=.env.nightly react-native run-android --mode=nightlyDebug --appIdSuffix=nightly --verbose", "run:android:nightly:release": "ENVFILE=.env.nightly react-native run-android --mode=nightlyRelease --appIdSuffix=nightly --verbose", @@ -123,6 +126,7 @@ "@shopify/flash-list": "^1.4.1", "@unstoppabledomains/resolution": "6.0.3", "@yoroi/swap": "1.0.0", + "@yoroi/wallets": "1.0.0", "add": "2.0.6", "assert": "^2.0.0", "base-64": "^1.0.0", @@ -180,7 +184,7 @@ "util": "0.12.4", "uuid": "^3.3.2", "vm-browserify": "1.1.2", - "zod": "^3.21.4" + "zod": "^3.22.1" }, "devDependencies": { "@amplitude/ampli": "^1.32.0", @@ -264,6 +268,7 @@ "lint-staged": "^13.2.2", "metro-react-native-babel-preset": "0.73.9", "node-fetch": "<3", + "pod-install": "^0.1.38", "prettier": "^2.4.1", "prettier-plugin-packagejson": "^2.2.11", "prettylint": "^1.0.0", diff --git a/apps/wallet-mobile/src/AppNavigator.tsx b/apps/wallet-mobile/src/AppNavigator.tsx index f5fe5f605b..79f70ae41b 100644 --- a/apps/wallet-mobile/src/AppNavigator.tsx +++ b/apps/wallet-mobile/src/AppNavigator.tsx @@ -1,5 +1,6 @@ import {NavigationContainer, NavigationContainerRef} from '@react-navigation/native' import {createStackNavigator} from '@react-navigation/stack' +import {isString} from '@yoroi/wallets' import * as React from 'react' import {defineMessages, useIntl} from 'react-intl' import {Alert, AppState, AppStateStatus, InteractionManager, Platform} from 'react-native' @@ -19,7 +20,6 @@ import {SearchProvider} from './Search/SearchContext' import {WalletInitNavigator} from './WalletInit/WalletInitNavigator' import {WalletNavigator} from './WalletNavigator' import {AuthSetting, useAuthOsEnabled, useAuthSetting, useAuthWithOs} from './yoroi-wallets/auth' -import {isString} from './yoroi-wallets/utils' const Stack = createStackNavigator() const navRef = React.createRef>() diff --git a/apps/wallet-mobile/src/InitApp.tsx b/apps/wallet-mobile/src/InitApp.tsx index 3c8321574c..d40ffab6c7 100644 --- a/apps/wallet-mobile/src/InitApp.tsx +++ b/apps/wallet-mobile/src/InitApp.tsx @@ -1,3 +1,5 @@ +import {App} from '@yoroi/types' +import {isString, useStorage} from '@yoroi/wallets' import React, {useEffect, useRef} from 'react' import {Platform, UIManager} from 'react-native' import {enableScreens} from 'react-native-screens' @@ -7,8 +9,6 @@ import uuid from 'uuid' import {AppNavigator} from './AppNavigator' import {CONFIG, isProduction} from './legacy/config' import {useCrashReportsEnabled} from './yoroi-wallets/hooks' -import {useStorage, YoroiStorage} from './yoroi-wallets/storage' -import {isString} from './yoroi-wallets/utils' import {walletManager} from './yoroi-wallets/walletManager' enableScreens() @@ -45,7 +45,7 @@ const useInitApp = () => { return loaded } -const initInstallationId = async (storage: YoroiStorage) => { +const initInstallationId = async (storage: App.Storage) => { const installationId = await storage.join('appSettings/').getItem('installationId', (data) => data) // LEGACY: installationId is not serialized if (installationId != null) return installationId @@ -53,7 +53,7 @@ const initInstallationId = async (storage: YoroiStorage) => { await storage.setItem('appSettings/installationId', newInstallationId, () => newInstallationId) // LEGACY: installationId is not serialized } -export const initApp = async (storage: YoroiStorage) => { +export const initApp = async (storage: App.Storage) => { await initInstallationId(storage) await walletManager.initialize() } diff --git a/apps/wallet-mobile/src/NftDetails/NftDetails.tsx b/apps/wallet-mobile/src/NftDetails/NftDetails.tsx index af2d38fab9..ee532e4852 100644 --- a/apps/wallet-mobile/src/NftDetails/NftDetails.tsx +++ b/apps/wallet-mobile/src/NftDetails/NftDetails.tsx @@ -1,5 +1,6 @@ import {RouteProp, useRoute} from '@react-navigation/native' import {Balance} from '@yoroi/types' +import {isRecord, isString} from '@yoroi/wallets' import React, {ReactNode, useState} from 'react' import {defineMessages, useIntl} from 'react-intl' import {Dimensions, Linking, StyleSheet, TouchableOpacity, View} from 'react-native' @@ -17,7 +18,6 @@ import {useSelectedWallet} from '../SelectedWallet' import {COLORS} from '../theme' import {getNetworkConfigById} from '../yoroi-wallets/cardano/networks' import {useNft} from '../yoroi-wallets/hooks' -import {isRecord, isString} from '../yoroi-wallets/utils' export const NftDetails = () => { const {id} = useRoute>().params diff --git a/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.stories.tsx b/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.stories.tsx index 94381e3933..685546624f 100644 --- a/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.stories.tsx +++ b/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.stories.tsx @@ -1,10 +1,11 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import {storiesOf} from '@storybook/react-native' +import {rootStorage, StorageProvider} from '@yoroi/wallets' import React from 'react' import {QueryProvider, RouteProvider} from '../../../.storybook/decorators' import {SelectedWalletProvider} from '../../SelectedWallet' import {mocks} from '../../yoroi-wallets/mocks' -import {storage, StorageProvider} from '../../yoroi-wallets/storage' import {TxDetails} from './TxDetails' storiesOf('TxDetails', module) @@ -49,16 +50,16 @@ storiesOf('TxDetails', module) { if (key === 'appSettings/') { - const appSettings = storage.join(key) + const appSettings = rootStorage.join(key) return { ...appSettings, - getItem: async (key) => (key === 'privacyMode' ? 'HIDDEN' : appSettings.getItem(key)), + getItem: async (key): Promise => (key === 'privacyMode' ? 'HIDDEN' : appSettings.getItem(key)), } } - return storage + return rootStorage }, }} > diff --git a/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx b/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx index 208a2403ce..8d509c5614 100644 --- a/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx +++ b/apps/wallet-mobile/src/TxHistory/TxDetails/TxDetails.tsx @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import {useNavigation, useRoute} from '@react-navigation/native' +import {isNonNullable} from '@yoroi/wallets' import {BigNumber} from 'bignumber.js' import {fromPairs} from 'lodash' import React, {useEffect, useState} from 'react' @@ -20,7 +21,7 @@ import {getNetworkConfigById} from '../../yoroi-wallets/cardano/networks' import {CardanoTypes, YoroiWallet} from '../../yoroi-wallets/cardano/types' import {useTipStatus, useTransactionInfos} from '../../yoroi-wallets/hooks' import {NetworkId, TransactionInfo} from '../../yoroi-wallets/types' -import {asQuantity, isNonNullable} from '../../yoroi-wallets/utils' +import {asQuantity} from '../../yoroi-wallets/utils' import {AssetList} from './AssetList' import assetListStyle from './AssetListTransaction.style' diff --git a/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryList.tsx b/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryList.tsx index d82f37d153..df807aee57 100644 --- a/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryList.tsx +++ b/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryList.tsx @@ -1,4 +1,5 @@ import {useNavigation} from '@react-navigation/native' +import {isString} from '@yoroi/wallets' import _ from 'lodash' import React from 'react' import {useIntl} from 'react-intl' @@ -11,7 +12,6 @@ import {formatDateRelative} from '../../legacy/format' import {useSelectedWallet} from '../../SelectedWallet' import {useTransactionInfos} from '../../yoroi-wallets/hooks' import {TransactionInfo} from '../../yoroi-wallets/types' -import {isString} from '../../yoroi-wallets/utils' import {ActionsBanner} from './ActionsBanner' import {EmptyHistory} from './EmptyHistory' import {TxHistoryListItem} from './TxHistoryListItem' diff --git a/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryListItem.tsx b/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryListItem.tsx index cef976662d..830bfa0ea5 100644 --- a/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryListItem.tsx +++ b/apps/wallet-mobile/src/TxHistory/TxHistoryList/TxHistoryListItem.tsx @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import {useNavigation} from '@react-navigation/native' +import {isNonNullable} from '@yoroi/wallets' import {BigNumber} from 'bignumber.js' import _, {fromPairs} from 'lodash' import React from 'react' @@ -18,7 +19,7 @@ import {isEmptyString} from '../../utils/utils' import {MultiToken} from '../../yoroi-wallets/cardano/MultiToken' import {YoroiWallet} from '../../yoroi-wallets/cardano/types' import {IOData, TransactionAssurance, TransactionDirection, TransactionInfo} from '../../yoroi-wallets/types' -import {asQuantity, isNonNullable} from '../../yoroi-wallets/utils' +import {asQuantity} from '../../yoroi-wallets/utils' type Props = { transaction: TransactionInfo diff --git a/apps/wallet-mobile/src/YoroiApp.tsx b/apps/wallet-mobile/src/YoroiApp.tsx index b57e56819c..243b9c1f48 100644 --- a/apps/wallet-mobile/src/YoroiApp.tsx +++ b/apps/wallet-mobile/src/YoroiApp.tsx @@ -1,3 +1,4 @@ +import {rootStorage, StorageProvider} from '@yoroi/wallets' import React from 'react' import {LogBox, Platform, StyleSheet, UIManager} from 'react-native' import Config from 'react-native-config' @@ -19,7 +20,6 @@ import {SelectedWalletMetaProvider, SelectedWalletProvider} from './SelectedWall import {ThemeProvider} from './theme' import {WalletManagerProvider} from './WalletManager' import {useMigrations} from './yoroi-wallets/migrations' -import {storage, StorageProvider} from './yoroi-wallets/storage' import {walletManager} from './yoroi-wallets/walletManager' enableScreens() @@ -40,7 +40,7 @@ const queryClient = new QueryClient() const metricsManager = makeMetricsManager() export const YoroiApp = () => { - const migrated = useMigrations(storage) + const migrated = useMigrations(rootStorage) // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions return migrated ? ( diff --git a/apps/wallet-mobile/src/auth/ChangePinScreen/ChangePinScreen.stories.tsx b/apps/wallet-mobile/src/auth/ChangePinScreen/ChangePinScreen.stories.tsx index 2b108cbc75..60d190a494 100644 --- a/apps/wallet-mobile/src/auth/ChangePinScreen/ChangePinScreen.stories.tsx +++ b/apps/wallet-mobile/src/auth/ChangePinScreen/ChangePinScreen.stories.tsx @@ -1,16 +1,17 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import {action} from '@storybook/addon-actions' import {storiesOf} from '@storybook/react-native' +import {rootStorage, StorageProvider} from '@yoroi/wallets' import React from 'react' -import {storage, StorageProvider} from '../../yoroi-wallets/storage' import {ChangePinScreen} from './ChangePinScreen' storiesOf('ChangePinScreen', module).add('Default', () => { return ( { + ...rootStorage, + getItem: async (key): Promise => { action('getItem')(key) return encryptedKeyHash }, diff --git a/apps/wallet-mobile/src/auth/CheckPinInput/CheckPinInput.stories.tsx b/apps/wallet-mobile/src/auth/CheckPinInput/CheckPinInput.stories.tsx index e394065813..efc2d34b72 100644 --- a/apps/wallet-mobile/src/auth/CheckPinInput/CheckPinInput.stories.tsx +++ b/apps/wallet-mobile/src/auth/CheckPinInput/CheckPinInput.stories.tsx @@ -1,17 +1,18 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import {action} from '@storybook/addon-actions' import {storiesOf} from '@storybook/react-native' +import {rootStorage, StorageProvider} from '@yoroi/wallets' import React from 'react' -import {storage, StorageProvider} from '../../yoroi-wallets/storage' import {CheckPinInput} from './CheckPinInput' storiesOf('CheckPinInput', module).add('Default', () => ( { action('getItem')(key) - return encryptedKeyHash + return encryptedKeyHash as any }, }} > diff --git a/apps/wallet-mobile/src/auth/CreatePinInput/CreatePinInput.stories.tsx b/apps/wallet-mobile/src/auth/CreatePinInput/CreatePinInput.stories.tsx index 369c9fe05c..eef85eaad7 100644 --- a/apps/wallet-mobile/src/auth/CreatePinInput/CreatePinInput.stories.tsx +++ b/apps/wallet-mobile/src/auth/CreatePinInput/CreatePinInput.stories.tsx @@ -1,14 +1,14 @@ import {action} from '@storybook/addon-actions' import {storiesOf} from '@storybook/react-native' +import {rootStorage, StorageProvider} from '@yoroi/wallets' import React from 'react' -import {storage, StorageProvider} from '../../yoroi-wallets/storage' import {CreatePinInput} from './CreatePinInput' storiesOf('CreatePinInput', module).add('Default', () => ( { action('setItem')(key, data) return Promise.resolve() diff --git a/apps/wallet-mobile/src/auth/CreatePinScreen/CreatePinScreen.stories.tsx b/apps/wallet-mobile/src/auth/CreatePinScreen/CreatePinScreen.stories.tsx index 81aff710ad..2e47c33e62 100644 --- a/apps/wallet-mobile/src/auth/CreatePinScreen/CreatePinScreen.stories.tsx +++ b/apps/wallet-mobile/src/auth/CreatePinScreen/CreatePinScreen.stories.tsx @@ -1,15 +1,15 @@ import {action} from '@storybook/addon-actions' import {storiesOf} from '@storybook/react-native' +import {rootStorage, StorageProvider} from '@yoroi/wallets' import React from 'react' -import {storage, StorageProvider} from '../../yoroi-wallets/storage' import {CreatePinScreen} from './CreatePinScreen' storiesOf('CreatePinScreen', module).add('Default', () => { return ( action('onDone')} /> diff --git a/apps/wallet-mobile/src/auth/PinLoginScreen/PinLoginScreen.stories.tsx b/apps/wallet-mobile/src/auth/PinLoginScreen/PinLoginScreen.stories.tsx index 0285dc7846..bdeb7b32fb 100644 --- a/apps/wallet-mobile/src/auth/PinLoginScreen/PinLoginScreen.stories.tsx +++ b/apps/wallet-mobile/src/auth/PinLoginScreen/PinLoginScreen.stories.tsx @@ -1,14 +1,15 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import {storiesOf} from '@storybook/react-native' +import {rootStorage, StorageProvider} from '@yoroi/wallets' import React from 'react' -import {storage, StorageProvider} from '../../yoroi-wallets/storage' import {PinLoginScreen} from './PinLoginScreen' storiesOf('PinLoginScreen', module).add('Default', () => ( { + ...rootStorage, + getItem: async (): Promise => { return encryptedKeyHash }, }} diff --git a/apps/wallet-mobile/src/auth/hooks.test.ts b/apps/wallet-mobile/src/auth/hooks.test.ts index 387f9de218..6a0bd777bf 100644 --- a/apps/wallet-mobile/src/auth/hooks.test.ts +++ b/apps/wallet-mobile/src/auth/hooks.test.ts @@ -1,34 +1,33 @@ import AsyncStorage from '@react-native-async-storage/async-storage' +import {parseSafe, rootStorage} from '@yoroi/wallets' import {disableAllEasyConfirmation, enableAuthWithOs} from '../yoroi-wallets/auth' -import {storage} from '../yoroi-wallets/storage' -import {parseSafe} from '../yoroi-wallets/utils/parsing' import {WalletMeta} from '../yoroi-wallets/walletManager' describe('enableAuthWithOs', () => { beforeEach(() => AsyncStorage.clear()) it('empty', async () => { - await enableAuthWithOs(storage) + await enableAuthWithOs(rootStorage) expect(await storageSnapshot()).toEqual({ '/appSettings/auth': 'os', }) }) it('existing value', async () => { - storage.join('appSettings/').setItem('auth', 'pin') + rootStorage.join('appSettings/').setItem('auth', 'pin') - await enableAuthWithOs(storage) + await enableAuthWithOs(rootStorage) expect(await storageSnapshot()).toEqual({ '/appSettings/auth': 'os', }) }) it('remove pin', async () => { - storage.join('appSettings/').setItem('auth', 'pin') - storage.join('appSettings/').setItem('customPinHash', '123456789') + rootStorage.join('appSettings/').setItem('auth', 'pin') + rootStorage.join('appSettings/').setItem('customPinHash', '123456789') - await enableAuthWithOs(storage) + await enableAuthWithOs(rootStorage) expect(await storageSnapshot()).toEqual({ '/appSettings/auth': 'os', }) @@ -39,25 +38,25 @@ describe('disableAllEasyConfirmations', () => { beforeEach(() => AsyncStorage.clear()) it('works', async () => { - await storage.join('wallet/').setItem('1', { + await rootStorage.join('wallet/').setItem('1', { ...mockWalletMeta, isEasyConfirmationEnabled: true, } as WalletMeta) - await storage + await rootStorage .join('wallet/') .join('1/') .setItem('data', {...mockWalletJSON, isEasyConfirmationEnabled: true}) - await storage.join('wallet/').setItem('2', { + await rootStorage.join('wallet/').setItem('2', { ...mockWalletMeta, isEasyConfirmationEnabled: true, } as WalletMeta) - await storage + await rootStorage .join('wallet/') .join('2/') .setItem('data', {...mockWalletJSON, isEasyConfirmationEnabled: true}) - await disableAllEasyConfirmation(storage) + await disableAllEasyConfirmation(rootStorage) expect(await storageSnapshot()).toEqual({ '/wallet/1': { checksum: { diff --git a/apps/wallet-mobile/src/components/NftPreview/NftPreview.tsx b/apps/wallet-mobile/src/components/NftPreview/NftPreview.tsx index b5c46e7bf3..42c20ed3ab 100644 --- a/apps/wallet-mobile/src/components/NftPreview/NftPreview.tsx +++ b/apps/wallet-mobile/src/components/NftPreview/NftPreview.tsx @@ -1,4 +1,5 @@ import {Balance} from '@yoroi/types' +import {isString} from '@yoroi/wallets' import React, {useEffect, useState} from 'react' import {ErrorBoundary} from 'react-error-boundary' import {Image, ImageResizeMode, ImageStyle, StyleProp, View} from 'react-native' @@ -7,7 +8,6 @@ import {SvgUri} from 'react-native-svg' import placeholder from '../../assets/img/nft-placeholder.png' import {getNftFilenameMediaType, getNftMainImageMediaType, isSvgMediaType} from '../../yoroi-wallets/cardano/nfts' -import {isString} from '../../yoroi-wallets/utils' export const NftPreview = ({ nft, diff --git a/apps/wallet-mobile/src/components/TokenIcon/TokenIcon.tsx b/apps/wallet-mobile/src/components/TokenIcon/TokenIcon.tsx index fe786ed1c4..def31c9ca3 100644 --- a/apps/wallet-mobile/src/components/TokenIcon/TokenIcon.tsx +++ b/apps/wallet-mobile/src/components/TokenIcon/TokenIcon.tsx @@ -1,3 +1,4 @@ +import {isString} from '@yoroi/wallets' import React from 'react' import {Image, StyleSheet, View} from 'react-native' @@ -5,7 +6,6 @@ import {features} from '../../features' import {COLORS} from '../../theme' import {YoroiWallet} from '../../yoroi-wallets/cardano/types' import {useNft, useNftImageModerated, useTokenInfo} from '../../yoroi-wallets/hooks' -import {isString} from '../../yoroi-wallets/utils' import {Boundary} from '../Boundary' import {Icon} from '../Icon' import {ModeratedNftIcon} from './ModeratedNftIcon' diff --git a/apps/wallet-mobile/src/features/Initialization/common/terms.ts b/apps/wallet-mobile/src/features/Initialization/common/terms.ts index f713908af2..cc35a26105 100644 --- a/apps/wallet-mobile/src/features/Initialization/common/terms.ts +++ b/apps/wallet-mobile/src/features/Initialization/common/terms.ts @@ -1,8 +1,8 @@ +import {useStorage} from '@yoroi/wallets' import {useCallback} from 'react' import {useMutation, useQuery, useQueryClient} from 'react-query' import {CONFIG} from '../../../legacy/config' -import {useStorage} from '../../../yoroi-wallets/storage' export type LegalAgreement = { latestAcceptedAgreementsDate: number diff --git a/apps/wallet-mobile/src/features/Settings/Currency/CurrencyContext.tsx b/apps/wallet-mobile/src/features/Settings/Currency/CurrencyContext.tsx index 7cc5f59a67..90423a4486 100644 --- a/apps/wallet-mobile/src/features/Settings/Currency/CurrencyContext.tsx +++ b/apps/wallet-mobile/src/features/Settings/Currency/CurrencyContext.tsx @@ -1,10 +1,9 @@ +import {parseSafe, useStorage} from '@yoroi/wallets' import React from 'react' import {useMutation, UseMutationOptions, useQuery, useQueryClient} from 'react-query' import {isEmptyString} from '../../../utils' -import {useStorage} from '../../../yoroi-wallets/storage' import {ConfigCurrencies, configCurrencies, CurrencySymbol, supportedCurrencies} from '../../../yoroi-wallets/types' -import {parseSafe} from '../../../yoroi-wallets/utils' const CurrencyContext = React.createContext(undefined) export const CurrencyProvider = ({children}: {children: React.ReactNode}) => { diff --git a/apps/wallet-mobile/src/features/Settings/PrivacyMode/PrivacyMode.tsx b/apps/wallet-mobile/src/features/Settings/PrivacyMode/PrivacyMode.tsx index 9f71d473c3..9edb07ad9b 100644 --- a/apps/wallet-mobile/src/features/Settings/PrivacyMode/PrivacyMode.tsx +++ b/apps/wallet-mobile/src/features/Settings/PrivacyMode/PrivacyMode.tsx @@ -1,8 +1,7 @@ +import {parseSafe, useStorage} from '@yoroi/wallets' import {UseMutationOptions, useQuery} from 'react-query' import {useMutationWithInvalidations} from '../../../yoroi-wallets/hooks' -import {useStorage} from '../../../yoroi-wallets/storage' -import {parseSafe} from '../../../yoroi-wallets/utils' export const useReadPrivacyMode = () => { const storage = useStorage() diff --git a/apps/wallet-mobile/src/i18n/LanguageProvider.tsx b/apps/wallet-mobile/src/i18n/LanguageProvider.tsx index 3586dc92a7..6212f01278 100644 --- a/apps/wallet-mobile/src/i18n/LanguageProvider.tsx +++ b/apps/wallet-mobile/src/i18n/LanguageProvider.tsx @@ -1,3 +1,4 @@ +import {parseSafe, useStorage} from '@yoroi/wallets' import React, {useMemo} from 'react' import {IntlProvider} from 'react-intl' import {NativeModules, Platform, Text} from 'react-native' @@ -12,8 +13,6 @@ import { UseQueryOptions, } from 'react-query' -import {useStorage} from '../yoroi-wallets/storage' -import {parseSafe} from '../yoroi-wallets/utils' import {LanguageCode, supportedLanguages, updateLanguageSettings} from './languages' import translations from './translations' diff --git a/apps/wallet-mobile/src/metrics/metricsManager.tsx b/apps/wallet-mobile/src/metrics/metricsManager.tsx index 5b7dffc9bb..2dbd7bea61 100644 --- a/apps/wallet-mobile/src/metrics/metricsManager.tsx +++ b/apps/wallet-mobile/src/metrics/metricsManager.tsx @@ -1,10 +1,10 @@ import {EnrichmentPlugin, Event, PluginType} from '@amplitude/analytics-types' +import {App} from '@yoroi/types' +import {parseBoolean, rootStorage} from '@yoroi/wallets' import * as React from 'react' import Config from 'react-native-config' import {Logger} from '../yoroi-wallets/logging' -import {storage, YoroiStorage} from '../yoroi-wallets/storage' -import {parseBoolean} from '../yoroi-wallets/utils' import {Ampli, ampli} from './ampli' import {mockMetricsManager} from './mocks' @@ -30,7 +30,7 @@ const infoPlugin: EnrichmentPlugin = { }, } -export const makeMetricsStorage = (yoroiStorage: YoroiStorage = storage) => { +export const makeMetricsStorage = (yoroiStorage: App.Storage = rootStorage) => { const enabledKey = 'metrics-enabled' const consentRequestedKey = 'metrics-consentRequested' const settingsStorage = yoroiStorage.join('appSettings/') @@ -53,7 +53,7 @@ export const makeMetricsStorage = (yoroiStorage: YoroiStorage = storage) => { export type MetricsStorage = ReturnType export const makeMetricsManager = ( - metricsStorage: MetricsStorage = makeMetricsStorage(storage), + metricsStorage: MetricsStorage = makeMetricsStorage(rootStorage), metricsModule: Ampli = ampli, ) => { const disable = () => diff --git a/apps/wallet-mobile/src/theme/ThemeProvider.tsx b/apps/wallet-mobile/src/theme/ThemeProvider.tsx index 9603f6bdc4..f737ffab4c 100644 --- a/apps/wallet-mobile/src/theme/ThemeProvider.tsx +++ b/apps/wallet-mobile/src/theme/ThemeProvider.tsx @@ -1,9 +1,8 @@ +import {parseSafe, useStorage} from '@yoroi/wallets' import React from 'react' import {useColorScheme} from 'react-native' import {useMutation, UseMutationOptions, useQuery, useQueryClient} from 'react-query' -import {useStorage} from '../yoroi-wallets/storage' -import {parseSafe} from '../yoroi-wallets/utils' import {darkTheme} from './darkTheme' import {lightTheme} from './lightTheme' import {Theme} from './types' diff --git a/apps/wallet-mobile/src/yoroi-wallets/auth/auth.ts b/apps/wallet-mobile/src/yoroi-wallets/auth/auth.ts index 784441d7aa..66c7855fda 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/auth/auth.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/auth/auth.ts @@ -1,3 +1,5 @@ +import {App} from '@yoroi/types' +import {parseSafe, parseString, useStorage} from '@yoroi/wallets' import * as React from 'react' import {defineMessages, useIntl} from 'react-intl' import {Alert, AppState, Platform} from 'react-native' @@ -11,8 +13,7 @@ import {YoroiWallet} from '../cardano/types' import {decryptData, encryptData} from '../encryption' import {useMutationWithInvalidations} from '../hooks' import {parseWalletMeta} from '../migrations' -import {AuthenticationPrompt, Keychain, useStorage, YoroiStorage} from '../storage' -import {parseSafe, parseString} from '../utils' +import {AuthenticationPrompt, Keychain} from '../storage' export const useAuthOsEnabled = (options?: UseQueryOptions) => { const queryClient = useQueryClient() @@ -53,7 +54,7 @@ export const useEnableAuthWithOs = (options?: UseMutationOptions) = return {...mutation, enableAuthWithOs: enable} } -export const enableAuthWithOs = async (storage: YoroiStorage) => { +export const enableAuthWithOs = async (storage: App.Storage) => { const settingsStorage = storage.join('appSettings/') await settingsStorage.setItem('auth', AUTH_WITH_OS) @@ -149,7 +150,7 @@ export const useDisableAllEasyConfirmation = ( } } -export const disableAllEasyConfirmation = async (storage: YoroiStorage) => { +export const disableAllEasyConfirmation = async (storage: App.Storage) => { const walletStorage = storage.join('wallet/') const walletIds = await walletStorage.getAllKeys() @@ -227,7 +228,7 @@ export const useAuthSetting = (options?: UseQueryOptions) => return query.data } -export const getAuthSetting = async (storage: YoroiStorage) => +export const getAuthSetting = async (storage: App.Storage) => storage.join('appSettings/').getItem('auth', parseAuthSetting) const parseAuthSetting = (data: unknown) => { diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/api/assetSuply.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/api/assetSuply.ts index 9b39b600bd..198bfc205b 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/api/assetSuply.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/api/assetSuply.ts @@ -1,7 +1,7 @@ +import {createTypeGuardFromSchema} from '@yoroi/wallets' import {z} from 'zod' import {BackendConfig} from '../../types' -import {createTypeGuardFromSchema} from '../../utils' import fetchDefault from './fetch' import {toAssetName, toPolicyId} from './utils' diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/api/metadata.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/api/metadata.ts index 7a012fb102..de1c9c7a0c 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/api/metadata.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/api/metadata.ts @@ -1,8 +1,8 @@ import {Balance} from '@yoroi/types' +import {createTypeGuardFromSchema, isArray, isNonNullable, isRecord} from '@yoroi/wallets' import {z} from 'zod' import {BackendConfig, NFTAsset} from '../../types' -import {createTypeGuardFromSchema, isArray, isNonNullable, isRecord} from '../../utils' import {convertNft} from '../nfts' import {fetchTokensSupplies} from './assetSuply' import fetchDefault from './fetch' diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/api/nftModerationStatus.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/api/nftModerationStatus.ts index c3d8fb16cd..c50a85e214 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/api/nftModerationStatus.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/api/nftModerationStatus.ts @@ -1,7 +1,7 @@ +import {createTypeGuardFromSchema} from '@yoroi/wallets' import {z} from 'zod' import {BackendConfig, YoroiNftModerationStatus} from '../../types' -import {createTypeGuardFromSchema} from '../../utils' import fetchDefault from './fetch' export const getNFTModerationStatus = async ( diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/api/tokenRegistry.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/api/tokenRegistry.ts index c7e3d4a4fb..c06a4e7d15 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/api/tokenRegistry.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/api/tokenRegistry.ts @@ -1,9 +1,9 @@ import {Balance} from '@yoroi/types' +import {createTypeGuardFromSchema} from '@yoroi/wallets' import {z} from 'zod' import {promiseAny} from '../../../utils' import {BackendConfig} from '../../types' -import {createTypeGuardFromSchema} from '../../utils' import {checkedFetch} from './fetch' import {getNFT} from './metadata' import {fallbackTokenInfo, tokenInfo, toTokenSubject} from './utils' diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/byron/ByronWallet.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/byron/ByronWallet.ts index 451dd2a5ba..aeb42d89fa 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/byron/ByronWallet.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/byron/ByronWallet.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import * as yoroiLib from '@emurgo/yoroi-lib' -import {Balance} from '@yoroi/types' +import {App, Balance} from '@yoroi/types' +import {parseSafe} from '@yoroi/wallets' import assert from 'assert' import {BigNumber} from 'bignumber.js' import ExtendableError from 'es6-error' @@ -12,7 +13,7 @@ import LocalizableError from '../../../i18n/LocalizableError' import {HWDeviceInfo} from '../../hw' import {Logger} from '../../logging' import {makeMemosManager, MemosManager} from '../../memos' -import {makeWalletEncryptedStorage, WalletEncryptedStorage, YoroiStorage} from '../../storage' +import {makeWalletEncryptedStorage, WalletEncryptedStorage} from '../../storage' import {Keychain} from '../../storage/Keychain' import { AccountStateResponse, @@ -37,7 +38,6 @@ import { YoroiUnsignedTx, } from '../../types' import {Quantities} from '../../utils' -import {parseSafe} from '../../utils/parsing' import {genTimeToSlot} from '../../utils/timeUtils' import {validatePassword} from '../../utils/validators' import {WalletMeta} from '../../walletManager' @@ -140,7 +140,7 @@ export class ByronWallet implements YoroiWallet { isEasyConfirmationEnabled = false private _utxos: RawUtxo[] - private readonly storage: YoroiStorage + private readonly storage: App.Storage private readonly utxoManager: UtxoManager private readonly stakingKeyPath: number[] private readonly transactionManager: TransactionManager @@ -155,7 +155,7 @@ export class ByronWallet implements YoroiWallet { password, }: { id: string - storage: YoroiStorage + storage: App.Storage mnemonic: string password: string }): Promise { @@ -191,7 +191,7 @@ export class ByronWallet implements YoroiWallet { hwDeviceInfo: HWDeviceInfo | null id: string isReadOnly: boolean - storage: YoroiStorage + storage: App.Storage }): Promise { const {internalChain, externalChain} = await addressChains.create({implementationId, networkId, accountPubKeyHex}) @@ -209,7 +209,7 @@ export class ByronWallet implements YoroiWallet { }) } - static async restore({walletMeta, storage}: {storage: YoroiStorage; walletMeta: WalletMeta}) { + static async restore({walletMeta, storage}: {storage: App.Storage; walletMeta: WalletMeta}) { const data = await storage.getItem('data', parseWalletJSON) if (!data) throw new Error('Cannot read saved data') Logger.debug('openWallet::data', data) @@ -257,7 +257,7 @@ export class ByronWallet implements YoroiWallet { id: string implementationId: WalletImplementationId networkId: NetworkId - storage: YoroiStorage + storage: App.Storage internalChain: AddressChain externalChain: AddressChain isReadOnly: boolean @@ -315,7 +315,7 @@ export class ByronWallet implements YoroiWallet { transactionManager, memosManager, }: { - storage: YoroiStorage + storage: App.Storage networkId: NetworkId id: string utxoManager: UtxoManager diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/nfts.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/nfts.ts index c8aba27a48..8ad7e3b68b 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/nfts.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/nfts.ts @@ -1,13 +1,13 @@ import {Balance} from '@yoroi/types' +import {createTypeGuardFromSchema, isArrayOfType, isString} from '@yoroi/wallets' import {z} from 'zod' import {features} from '../../features' import {getAssetFingerprint} from '../../legacy/format' -import {createTypeGuardFromSchema, isArrayOfType, isString} from '../utils' import {utf8ToHex} from './api/utils' - export const convertNft = (options: { - metadata?: unknown + // eslint-disable-next-line @typescript-eslint/no-explicit-any + metadata?: any storageUrl: string policyId: string shortName: string diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/ShelleyWallet.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/ShelleyWallet.ts index f579f04dbf..cd54ac7302 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/ShelleyWallet.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/ShelleyWallet.ts @@ -1,5 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import {Balance} from '@yoroi/types' +import {App, Balance} from '@yoroi/types' +import {parseSafe} from '@yoroi/wallets' import assert from 'assert' import {BigNumber} from 'bignumber.js' import ExtendableError from 'es6-error' @@ -11,7 +12,7 @@ import LocalizableError from '../../../i18n/LocalizableError' import {HWDeviceInfo} from '../../hw' import {Logger} from '../../logging' import {makeMemosManager, MemosManager} from '../../memos' -import {makeWalletEncryptedStorage, WalletEncryptedStorage, YoroiStorage} from '../../storage' +import {makeWalletEncryptedStorage, WalletEncryptedStorage} from '../../storage' import {Keychain} from '../../storage/Keychain' import type { AccountStateResponse, @@ -29,7 +30,6 @@ import type { } from '../../types' import {StakingInfo, YoroiSignedTx, YoroiUnsignedTx} from '../../types' import {Quantities} from '../../utils' -import {parseSafe} from '../../utils/parsing' import {validatePassword} from '../../utils/validators' import {WalletMeta} from '../../walletManager' import {Cardano, CardanoMobile} from '../../wallets' @@ -168,7 +168,7 @@ export const makeShelleyWallet = (constants: typeof MAINNET | typeof TESTNET) => isEasyConfirmationEnabled = false private _utxos: RawUtxo[] - private readonly storage: YoroiStorage + private readonly storage: App.Storage private readonly utxoManager: UtxoManager private readonly transactionManager: TransactionManager private readonly memosManager: MemosManager @@ -182,7 +182,7 @@ export const makeShelleyWallet = (constants: typeof MAINNET | typeof TESTNET) => password, }: { id: string - storage: YoroiStorage + storage: App.Storage mnemonic: string password: string }): Promise { @@ -216,7 +216,7 @@ export const makeShelleyWallet = (constants: typeof MAINNET | typeof TESTNET) => hwDeviceInfo: HWDeviceInfo | null id: string isReadOnly: boolean - storage: YoroiStorage + storage: App.Storage }): Promise { const {internalChain, externalChain} = await addressChains.create({accountPubKeyHex}) @@ -232,7 +232,7 @@ export const makeShelleyWallet = (constants: typeof MAINNET | typeof TESTNET) => }) } - static async restore({walletMeta, storage}: {storage: YoroiStorage; walletMeta: WalletMeta}) { + static async restore({walletMeta, storage}: {storage: App.Storage; walletMeta: WalletMeta}) { const data = await storage.getItem('data', parseWalletJSON) if (!data) throw new Error('Cannot read saved data') Logger.debug('openWallet::data', data) @@ -269,7 +269,7 @@ export const makeShelleyWallet = (constants: typeof MAINNET | typeof TESTNET) => accountPubKeyHex: string hwDeviceInfo: HWDeviceInfo | null id: string - storage: YoroiStorage + storage: App.Storage internalChain: AddressChain externalChain: AddressChain isReadOnly: boolean @@ -322,7 +322,7 @@ export const makeShelleyWallet = (constants: typeof MAINNET | typeof TESTNET) => transactionManager, memosManager, }: { - storage: YoroiStorage + storage: App.Storage id: string utxoManager: UtxoManager hwDeviceInfo: HWDeviceInfo | null diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/tests/mainnet/ShelleyWallet.test.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/tests/mainnet/ShelleyWallet.test.ts index 14b8a9f1b4..49768823a3 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/tests/mainnet/ShelleyWallet.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/tests/mainnet/ShelleyWallet.test.ts @@ -1,9 +1,10 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import AsyncStorage from '@react-native-async-storage/async-storage' import {Balance} from '@yoroi/types' +import {rootStorage} from '@yoroi/wallets' import {HWDeviceInfo} from '../../../../hw' -import {EncryptedStorage, EncryptedStorageKeys, storage} from '../../../../storage' +import {EncryptedStorage, EncryptedStorageKeys} from '../../../../storage' import {DefaultAsset} from '../../../../types' import {WalletMeta} from '../../../../walletManager' import {ShelleyAddressGeneratorJSON} from '../../../chain' @@ -25,7 +26,7 @@ describe('ShelleyWallet', () => { const wallet: YoroiWallet & Record = await ShelleyWalletMainnet.create({ id: walletMeta.id, mnemonic, - storage: storage.join(`${walletMeta.id}/`), + storage: rootStorage.join(`${walletMeta.id}/`), password, }) @@ -128,8 +129,8 @@ describe('ShelleyWallet', () => { }) it('restore', async () => { - storage.setItem(`${walletMeta.id}`, walletMeta) - storage.setItem(`${walletMeta.id}/data`, data) + rootStorage.setItem(`${walletMeta.id}`, walletMeta) + rootStorage.setItem(`${walletMeta.id}/data`, data) const rootKey = 'a0cf109fd1346748a20f2ade2b3d1e1561485d2f28ae6d8c36e289b4d0ca22544b4e892132ca15095d48370d4cb2bc7c8cde3f68b8a2f63cfeda4c5ac2752599065111b0929f2b3e6fa0f4bddbc90f9a00d1997d4164f6361d2c0f3c4be1f050' @@ -137,7 +138,7 @@ describe('ShelleyWallet', () => { await EncryptedStorage.write(EncryptedStorageKeys.rootKey(walletMeta.id), rootKey, password) const wallet: YoroiWallet & Record = await ShelleyWalletMainnet.restore({ - storage: storage.join(`${walletMeta.id}/`), + storage: rootStorage.join(`${walletMeta.id}/`), walletMeta, }) await wallet.internalChain?._addressGenerator.getRewardAddressHex() @@ -259,7 +260,7 @@ describe('ShelleyWallet', () => { const wallet: YoroiWallet & Record = await ShelleyWalletMainnet.createBip44({ id: walletMeta.id, accountPubKeyHex, - storage: storage.join(`${walletMeta.id}/`), + storage: rootStorage.join(`${walletMeta.id}/`), hwDeviceInfo, isReadOnly, }) @@ -361,7 +362,7 @@ describe('ShelleyWallet', () => { const wallet: YoroiWallet & Record = await ShelleyWalletMainnet.createBip44({ id: walletMeta.id, accountPubKeyHex, - storage: storage.join(`${walletMeta.id}/`), + storage: rootStorage.join(`${walletMeta.id}/`), hwDeviceInfo, isReadOnly, }) @@ -551,5 +552,5 @@ const data: WalletJSON = { const getBech32InternalChain = (wallet: any) => wallet.internalChain?._addressGenerator._accountPubKeyPtr?.toBech32() const getRewardAddress = (wallet: any) => wallet.getRewardAddress().then((address) => address.toBech32()) -const getWalletData = (wallet: YoroiWallet) => storage.join(`${wallet.id}/`).getItem(`data`) +const getWalletData = (wallet: YoroiWallet) => rootStorage.join(`${wallet.id}/`).getItem(`data`) const getStakingKey = (wallet: any) => wallet.getStakingKey().then((key) => key.toBech32()) diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/tests/testnet/ShelleyWalletTestnet.test.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/tests/testnet/ShelleyWalletTestnet.test.ts index 51557acf27..79db73344e 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/tests/testnet/ShelleyWalletTestnet.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/shelley/tests/testnet/ShelleyWalletTestnet.test.ts @@ -1,9 +1,10 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import AsyncStorage from '@react-native-async-storage/async-storage' import {Balance} from '@yoroi/types' +import {rootStorage} from '@yoroi/wallets' import {HWDeviceInfo} from '../../../../hw' -import {EncryptedStorage, EncryptedStorageKeys, storage} from '../../../../storage' +import {EncryptedStorage, EncryptedStorageKeys} from '../../../../storage' import {DefaultAsset} from '../../../../types' import {WalletMeta} from '../../../../walletManager' import {ShelleyAddressGeneratorJSON} from '../../../chain' @@ -22,7 +23,7 @@ describe('ShelleyWalletTestnet', () => { const wallet: YoroiWallet & Record = await ShelleyWalletTestnet.create({ id: walletMeta.id, mnemonic, - storage: storage.join(`${walletMeta.id}/`), + storage: rootStorage.join(`${walletMeta.id}/`), password, }) @@ -125,8 +126,8 @@ describe('ShelleyWalletTestnet', () => { }) it('restore', async () => { - storage.setItem(`${walletMeta.id}`, walletMeta) - storage.setItem(`${walletMeta.id}/data`, data) + rootStorage.setItem(`${walletMeta.id}`, walletMeta) + rootStorage.setItem(`${walletMeta.id}/data`, data) const rootKey = 'a0cf109fd1346748a20f2ade2b3d1e1561485d2f28ae6d8c36e289b4d0ca22544b4e892132ca15095d48370d4cb2bc7c8cde3f68b8a2f63cfeda4c5ac2752599065111b0929f2b3e6fa0f4bddbc90f9a00d1997d4164f6361d2c0f3c4be1f050' @@ -134,7 +135,7 @@ describe('ShelleyWalletTestnet', () => { await EncryptedStorage.write(EncryptedStorageKeys.rootKey(walletMeta.id), rootKey, password) const wallet: YoroiWallet & Record = await ShelleyWalletTestnet.restore({ - storage: storage.join(`${walletMeta.id}/`), + storage: rootStorage.join(`${walletMeta.id}/`), walletMeta, }) await wallet.internalChain?._addressGenerator.getRewardAddressHex() @@ -255,7 +256,7 @@ describe('ShelleyWalletTestnet', () => { const wallet: YoroiWallet & Record = await ShelleyWalletTestnet.createBip44({ id: walletMeta.id, accountPubKeyHex, - storage: storage.join(`${walletMeta.id}/`), + storage: rootStorage.join(`${walletMeta.id}/`), hwDeviceInfo, isReadOnly, }) @@ -491,5 +492,5 @@ const data: WalletJSON = { const getBech32InternalChain = (wallet: any) => wallet.internalChain?._addressGenerator._accountPubKeyPtr?.toBech32() const getRewardAddress = (wallet: any) => wallet.getRewardAddress().then((address) => address.toBech32()) -const getWalletData = (wallet: YoroiWallet) => storage.join(`${wallet.id}/`).getItem(`data`) +const getWalletData = (wallet: YoroiWallet) => rootStorage.join(`${wallet.id}/`).getItem(`data`) const getStakingKey = (wallet: any) => wallet.getStakingKey().then((key) => key.toBech32()) diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/transactionManager/transactionManager.test.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/transactionManager/transactionManager.test.ts index 855b87de39..0be8602c86 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/transactionManager/transactionManager.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/transactionManager/transactionManager.test.ts @@ -1,8 +1,8 @@ import AsyncStorage from '@react-native-async-storage/async-storage' +import {rootStorage} from '@yoroi/wallets' import {fromPairs} from 'lodash' import DeviceInfo from 'react-native-device-info' -import {storage as rootStorage} from '../../storage/storage' import {ApiHistoryError} from '../errors' import { mockedAddressesByChunks, diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/transactionManager/transactionManager.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/transactionManager/transactionManager.ts index 3646555bac..260685da92 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/transactionManager/transactionManager.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/transactionManager/transactionManager.ts @@ -1,12 +1,13 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/no-explicit-any */ +import {App} from '@yoroi/types' +import {isArray, parseSafe} from '@yoroi/wallets' import assert from 'assert' import {fromPairs, mapValues, max} from 'lodash' import DeviceInfo from 'react-native-device-info' import {defaultMemoize} from 'reselect' import {Logger} from '../../logging' -import {YoroiStorage} from '../../storage/storage' import { BackendConfig, CERTIFICATE_KIND, @@ -17,7 +18,6 @@ import { TxHistoryRequest, } from '../../types/other' import {RemoteCertificateMeta} from '../../types/staking' -import {isArray, parseSafe} from '../../utils/parsing' import {Version, versionCompare} from '../../utils/versioning' import * as yoroiApi from '../api' import {ApiHistoryError} from '../errors' @@ -38,7 +38,7 @@ export class TransactionManager { #confirmationCountsSelector = defaultMemoize(confirmationCountsSelector) #storage: TxManagerStorage - static async create(storage: YoroiStorage) { + static async create(storage: App.Storage) { const txStorage = makeTxManagerStorage(storage) const version = DeviceInfo.getVersion() as Version const isDeprecatedSchema = versionCompare(version, '4.1.0') === -1 @@ -481,7 +481,7 @@ export type TxManagerStorage = { clear: () => Promise } -export const makeTxManagerStorage = (storage: YoroiStorage): TxManagerStorage => ({ +export const makeTxManagerStorage = (storage: App.Storage): TxManagerStorage => ({ loadTxs: async () => { const txids = await storage.getItem('txids', parseTxids) if (!txids) return {} diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/utxoManager/utxoManager.test.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/utxoManager/utxoManager.test.ts index 1633b1fa9e..da77ea3b11 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/utxoManager/utxoManager.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/utxoManager/utxoManager.test.ts @@ -1,4 +1,5 @@ -import {storage as rootStorage} from '../../storage' +import {rootStorage} from '@yoroi/wallets' + import {makeUtxoManagerStorage, makeUtxoStorage} from './utxoManager' describe('utxo manager storage', () => { diff --git a/apps/wallet-mobile/src/yoroi-wallets/cardano/utxoManager/utxoManager.ts b/apps/wallet-mobile/src/yoroi-wallets/cardano/utxoManager/utxoManager.ts index d58a10e54d..f9a8ec5873 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/cardano/utxoManager/utxoManager.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/cardano/utxoManager/utxoManager.ts @@ -1,12 +1,12 @@ import {initUtxo, UtxoModels, UtxoStorage} from '@emurgo/yoroi-lib' import {Utxo, UtxoAtSafePoint, UtxoDiffToBestBlock} from '@emurgo/yoroi-lib/dist/utxo/models' +import {App} from '@yoroi/types' +import {parseSafe} from '@yoroi/wallets' import {parseInt} from 'lodash' -import {YoroiStorage} from '../../storage' import {RawUtxo} from '../../types' -import {parseSafe} from '../../utils/parsing' -export const makeUtxoManager = async ({storage, apiUrl}: {storage: YoroiStorage; apiUrl: string}) => { +export const makeUtxoManager = async ({storage, apiUrl}: {storage: App.Storage; apiUrl: string}) => { const managerStorage = makeUtxoManagerStorage(storage) const serviceStorage = makeUtxoStorage(storage.join('utxos/')) const service = initUtxo(serviceStorage, `${apiUrl}/`) @@ -40,7 +40,7 @@ export const makeUtxoManager = async ({storage, apiUrl}: {storage: YoroiStorage; } as const } -export const makeUtxoManagerStorage = (storage: YoroiStorage) => { +export const makeUtxoManagerStorage = (storage: App.Storage) => { const addrCounterKey = 'addrCounter' return { @@ -66,7 +66,7 @@ export type UtxoManager = Awaited> const diffPath = 'diff' const safePointPath = 'safe-point' -export const makeUtxoStorage = (storage: YoroiStorage) => { +export const makeUtxoStorage = (storage: App.Storage) => { const getUtxoDiffToBestBlock = () => storage.getItem(diffPath, parseDiff).then((diff) => diff ?? []) const setUtxoDiffToBestBlock = (utxoDiffToBestBlock: UtxoDiffToBestBlock[]) => storage.setItem(diffPath, utxoDiffToBestBlock) diff --git a/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts b/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts index b1d31e51c2..b7c4667965 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts @@ -1,6 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import AsyncStorage, {AsyncStorageStatic} from '@react-native-async-storage/async-storage' import {Balance} from '@yoroi/types' +import {parseBoolean, useStorage} from '@yoroi/wallets' import * as React from 'react' import {useCallback, useMemo} from 'react' import { @@ -21,7 +22,6 @@ import {generateShelleyPlateFromKey} from '../cardano/shelley/plate' import {WalletEvent, YoroiWallet} from '../cardano/types' import {HWDeviceInfo} from '../hw' import {parseWalletMeta} from '../migrations/walletMeta' -import {useStorage} from '../storage' import { TRANSACTION_DIRECTION, TRANSACTION_STATUS, @@ -30,7 +30,6 @@ import { YoroiUnsignedTx, } from '../types' import {CurrencySymbol, NetworkId, TipStatusResponse, TxSubmissionStatus, WalletImplementationId} from '../types/other' -import {parseBoolean} from '../utils/parsing' import {delay} from '../utils/timeUtils' import {Amounts, Quantities, Utxos} from '../utils/utils' import {WalletManager, WalletMeta} from '../walletManager' diff --git a/apps/wallet-mobile/src/yoroi-wallets/memos/memosManager.test.ts b/apps/wallet-mobile/src/yoroi-wallets/memos/memosManager.test.ts index 23c53de9b8..d61cb40fa9 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/memos/memosManager.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/memos/memosManager.test.ts @@ -1,6 +1,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage' +import {rootStorage} from '@yoroi/wallets' -import {storage as rootStorage} from '../storage' import {makeMemosManager} from './memosManager' describe('memos manager', () => { diff --git a/apps/wallet-mobile/src/yoroi-wallets/memos/memosManager.ts b/apps/wallet-mobile/src/yoroi-wallets/memos/memosManager.ts index 6ccfba587a..5a1259d55c 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/memos/memosManager.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/memos/memosManager.ts @@ -1,7 +1,7 @@ -import {YoroiStorage} from '../storage' -import {isString, parseString} from '../utils/parsing' +import {App} from '@yoroi/types' +import {isString, parseString} from '@yoroi/wallets' -export const makeMemosManager = async (storage: YoroiStorage) => { +export const makeMemosManager = async (storage: App.Storage) => { const getMemos = () => storage .getAllKeys() diff --git a/apps/wallet-mobile/src/yoroi-wallets/migrations/4_9_0.test.ts b/apps/wallet-mobile/src/yoroi-wallets/migrations/4_9_0.test.ts index 0452cbf02d..0dc57c74e1 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/migrations/4_9_0.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/migrations/4_9_0.test.ts @@ -1,4 +1,5 @@ -import {storage} from '../storage' +import {rootStorage} from '@yoroi/wallets' + import {migrateAuthSetting, OLD_OS_AUTH_KEY} from './4_9_0' describe('migrateAuthSetting', () => { const installationId = 'uuidv4' @@ -6,57 +7,57 @@ describe('migrateAuthSetting', () => { const pin = 'pin' beforeEach(async () => { - await storage.clear() - await storage.join('appSettings/').setItem('installationId', installationId) + await rootStorage.clear() + await rootStorage.join('appSettings/').setItem('installationId', installationId) }) it('method = null and no pin/os means new setup, it should remain null', async () => { - await migrateAuthSetting(storage) + await migrateAuthSetting(rootStorage) - await expect(storage.join('appSettings/').getItem('auth')).resolves.toBeNull() + await expect(rootStorage.join('appSettings/').getItem('auth')).resolves.toBeNull() }) // correct way should make sure that .setItem was not called - // but there are some issues when resetting back the storage mock + // but there are some issues when resetting back the rootStorage mock it('method != null remains the same', async () => { - await storage.join('appSettings/').setItem('auth', os) - await migrateAuthSetting(storage) - await expect(storage.join('appSettings/').getItem('auth')).resolves.toBe(os) + await rootStorage.join('appSettings/').setItem('auth', os) + await migrateAuthSetting(rootStorage) + await expect(rootStorage.join('appSettings/').getItem('auth')).resolves.toBe(os) - await storage.join('appSettings/').setItem('auth', pin) - await migrateAuthSetting(storage) - await expect(storage.join('appSettings/').getItem('auth')).resolves.toBe(pin) + await rootStorage.join('appSettings/').setItem('auth', pin) + await migrateAuthSetting(rootStorage) + await expect(rootStorage.join('appSettings/').getItem('auth')).resolves.toBe(pin) }) // if the store is inconsistent we favor OS, so the user can disable on device and it will ask for a new pin it('old store is pin + os (inconsistent), method = "os"', async () => { - await storage.join('appSettings/').multiSet([ + await rootStorage.join('appSettings/').multiSet([ ['customPinHash', 'encrypted-hash'], [OLD_OS_AUTH_KEY, true], ]) - await migrateAuthSetting(storage) + await migrateAuthSetting(rootStorage) - await expect(storage.join('appSettings/').getItem('auth')).resolves.toBe(os) + await expect(rootStorage.join('appSettings/').getItem('auth')).resolves.toBe(os) }) it('old store is pin, method = "pin"', async () => { - await storage.join('appSettings/').multiSet([ + await rootStorage.join('appSettings/').multiSet([ ['customPinHash', 'encrypted-hash'], [OLD_OS_AUTH_KEY, false], ]) - await migrateAuthSetting(storage) + await migrateAuthSetting(rootStorage) - await expect(storage.join('appSettings/').getItem('auth')).resolves.toBe(pin) + await expect(rootStorage.join('appSettings/').getItem('auth')).resolves.toBe(pin) }) // pin hash is deleted when changing to OS auth it('old store is os, method = "os"', async () => { - await storage.join('appSettings/').setItem('isSystemAuthEnabled', true) + await rootStorage.join('appSettings/').setItem('isSystemAuthEnabled', true) - await migrateAuthSetting(storage) + await migrateAuthSetting(rootStorage) - await expect(storage.join('appSettings/').getItem('auth')).resolves.toBe(os) + await expect(rootStorage.join('appSettings/').getItem('auth')).resolves.toBe(os) }) }) diff --git a/apps/wallet-mobile/src/yoroi-wallets/migrations/4_9_0.ts b/apps/wallet-mobile/src/yoroi-wallets/migrations/4_9_0.ts index c011b2ef5e..46469440ae 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/migrations/4_9_0.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/migrations/4_9_0.ts @@ -1,8 +1,9 @@ +import {App} from '@yoroi/types' +import {parseBoolean} from '@yoroi/wallets' + import {AUTH_WITH_OS, AUTH_WITH_PIN, disableAllEasyConfirmation, getAuthSetting} from '../auth/auth' -import {YoroiStorage} from '../storage' -import {parseBoolean} from '../utils/parsing' -export const migrateAuthSetting = async (storage: YoroiStorage) => { +export const migrateAuthSetting = async (storage: App.Storage) => { const authSetting = await getAuthSetting(storage) const isFirstRun = await storage .join('appSettings/') diff --git a/apps/wallet-mobile/src/yoroi-wallets/migrations/hooks.ts b/apps/wallet-mobile/src/yoroi-wallets/migrations/hooks.ts index 9525b2c9a8..50160b4859 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/migrations/hooks.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/migrations/hooks.ts @@ -1,9 +1,9 @@ +import {App} from '@yoroi/types' import * as React from 'react' -import {YoroiStorage} from '../storage' import {to4_9_0} from './4_9_0' -export const useMigrations = (storage: YoroiStorage) => { +export const useMigrations = (storage: App.Storage) => { const [done, setDone] = React.useState(false) React.useEffect(() => { const runMigrations = async () => { diff --git a/apps/wallet-mobile/src/yoroi-wallets/migrations/walletMeta.test.ts b/apps/wallet-mobile/src/yoroi-wallets/migrations/walletMeta.test.ts index 0a2bfa40b1..ea771a364d 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/migrations/walletMeta.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/migrations/walletMeta.test.ts @@ -1,10 +1,10 @@ import AsyncStorage from '@react-native-async-storage/async-storage' +import {rootStorage} from '@yoroi/wallets' import assert from 'assert' import {expect} from 'chai' import {WALLET_CONFIG_24 as HASKELL_SHELLEY_24} from '../cardano/constants/mainnet/constants' import {WALLETS} from '../cardano/utils' -import {storage} from '../storage' import {NETWORK_REGISTRY} from '../types' import {WalletMeta} from '../walletManager' import {migrateWalletMetas} from './walletMeta' @@ -16,8 +16,8 @@ describe('migrateWalletMetas()', () => { describe('when networkId is missing and isShelley is present', () => { it('should set networkId and walletImplementationId as JORMUNGANDR if isShelley is true', async () => { const {networkId: _, ...meta} = mockedWalletMeta - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expected = [ { @@ -34,8 +34,8 @@ describe('migrateWalletMetas()', () => { it('should set networkId and walletImplementationId as HASKELL_SHELLEY if isShelley is false', async () => { const {networkId: _, ...meta} = {...mockedWalletMeta, isShelley: false} - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expected = [ { @@ -55,8 +55,8 @@ describe('migrateWalletMetas()', () => { describe('when networkId is present or isShelley is missing', () => { it('should keep walletImplementationId if it is not null', async () => { const meta = mockedWalletMeta - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expected = [mockedWalletMeta] @@ -67,8 +67,8 @@ describe('migrateWalletMetas()', () => { it('should set walletImplementationId as BYRON if it is null', async () => { const {walletImplementationId: _, ...meta} = mockedWalletMeta - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expected = [{...mockedWalletMeta, walletImplementationId: WALLETS.HASKELL_BYRON.WALLET_IMPLEMENTATION_ID}] @@ -79,8 +79,8 @@ describe('migrateWalletMetas()', () => { it('should set networkId as HASKELL_SHELLEY if it is null', async () => { const {networkId: _networkId, isShelley: _isShelley, ...meta} = mockedWalletMeta - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expectedWalletMeta = {...mockedWalletMeta, networkId: NETWORK_REGISTRY.HASKELL_SHELLEY} delete expectedWalletMeta.isShelley @@ -93,8 +93,8 @@ describe('migrateWalletMetas()', () => { it('should set networkId as HASKELL_SHELLEY if it is BYRON_MAINNET', async () => { const {isShelley: _isShelley, ...meta} = mockedWalletMeta - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expectedWalletMeta = {...mockedWalletMeta, networkId: NETWORK_REGISTRY.HASKELL_SHELLEY} delete expectedWalletMeta.isShelley @@ -108,8 +108,8 @@ describe('migrateWalletMetas()', () => { it('should keep networkId if it is not BYRON_MAINNET and not NULL', async () => { const meta = {...mockedWalletMeta, networkId: NETWORK_REGISTRY.HASKELL_SHELLEY_TESTNET} delete meta.isShelley - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expectedWalletMeta = {...mockedWalletMeta, networkId: NETWORK_REGISTRY.HASKELL_SHELLEY_TESTNET} delete expectedWalletMeta.isShelley @@ -125,8 +125,8 @@ describe('migrateWalletMetas()', () => { it('should set checksum with data when the addressGenerator is present in the wallet/data HASKELL', async () => { const {checksum: _, ...meta} = mockedWalletMeta - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expectedWalletMeta = mockedWalletMeta const expected = [expectedWalletMeta] @@ -142,8 +142,8 @@ describe('migrateWalletMetas()', () => { walletImplementationId: WALLETS.HASKELL_BYRON.WALLET_IMPLEMENTATION_ID, } - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expectedWalletMeta = { ...mockedWalletMeta, @@ -166,8 +166,8 @@ describe('migrateWalletMetas()', () => { ...mockedWalletMeta, walletImplementationId: WALLETS.JORMUNGANDR_ITN.WALLET_IMPLEMENTATION_ID, } - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expectedWalletMeta = { ...mockedWalletMeta, @@ -190,8 +190,8 @@ describe('migrateWalletMetas()', () => { const {checksum: _, ...meta} = mockedWalletMeta const data = {...mockedWalletData, externalChain: {}} - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', data) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', data) const walletMetas = [meta] const expectedWalletMeta = { ...mockedWalletMeta, @@ -212,8 +212,8 @@ describe('migrateWalletMetas()', () => { it('should set isHW according to the wallet/data when false', async () => { const {isHW: _, ...meta} = mockedWalletMeta const data = {...mockedWalletData, isHW: false} - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', data) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', data) const walletMetas = [meta] const expectedWalletMeta = {...mockedWalletMeta, isHW: false} const expected = [expectedWalletMeta] @@ -226,8 +226,8 @@ describe('migrateWalletMetas()', () => { it('should set isHW according to the wallet/data when true', async () => { const {isHW: _, ...meta} = mockedWalletMeta const data = {...mockedWalletData, isHW: true} - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', data) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', data) const walletMetas = [meta] const expectedWalletMeta = {...mockedWalletMeta, isHW: true} const expected = [expectedWalletMeta] @@ -240,8 +240,8 @@ describe('migrateWalletMetas()', () => { it('should set isHW to false when it is not present in wallet/data', async () => { const {isHW: _, ...meta} = mockedWalletMeta const data = {...mockedWalletData, isHW: null} - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', data) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', data) const walletMetas = [meta] const expectedWalletMeta = {...mockedWalletMeta, isHW: false} const expected = [expectedWalletMeta] @@ -255,8 +255,8 @@ describe('migrateWalletMetas()', () => { describe('wallet meta type check', () => { it('should throw when there is no id', async () => { const {id: _, ...meta} = mockedWalletMeta - await storage.join('wallet/').setItem(mockedWalletMeta.id, meta) - await storage.join('wallet/').join(`${mockedWalletMeta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(mockedWalletMeta.id, meta) + await rootStorage.join('wallet/').join(`${mockedWalletMeta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] try { @@ -268,8 +268,8 @@ describe('migrateWalletMetas()', () => { it('should not throw when optional fields are not present', async () => { const {isShelley: _isShelley, ...meta} = mockedWalletMeta - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] assert.doesNotReject(() => migrateWalletMetas(walletMetas)) @@ -277,8 +277,8 @@ describe('migrateWalletMetas()', () => { it('should throw when safeguard fails', async () => { const {isShelley: _isShelley, ...meta} = {...mockedWalletMeta, walletImplementationId: 'invalid'} - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] try { // @ts-expect-error test @@ -293,8 +293,8 @@ describe('migrateWalletMetas()', () => { describe('when isEasyConfirmationEnabled is missing', () => { it('should set isEasyConfirmationEnabled to false', async () => { const {isEasyConfirmationEnabled: _, ...meta} = mockedWalletMeta - await storage.join('wallet/').setItem(meta.id, meta) - await storage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) + await rootStorage.join('wallet/').setItem(meta.id, meta) + await rootStorage.join('wallet/').join(`${meta.id}/`).setItem('data', mockedWalletData) const walletMetas = [meta] const expectedWalletMeta = {...mockedWalletMeta, isEasyConfirmationEnabled: false} const expected = [expectedWalletMeta] diff --git a/apps/wallet-mobile/src/yoroi-wallets/migrations/walletMeta.ts b/apps/wallet-mobile/src/yoroi-wallets/migrations/walletMeta.ts index 3347d2a049..d2e9368e52 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/migrations/walletMeta.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/migrations/walletMeta.ts @@ -1,17 +1,17 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import {parseSafe, rootStorage} from '@yoroi/wallets' + import {Logger} from '../../legacy/logging' import {CardanoTypes, legacyWalletChecksum, walletChecksum} from '../cardano/types' import {WALLETS} from '../cardano/utils' -import {storage} from '../storage' import type {NetworkId, WalletImplementationId} from '../types/other' import {NETWORK_REGISTRY, WALLET_IMPLEMENTATION_REGISTRY} from '../types/other' -import {parseSafe} from '../utils/parsing' import {WalletMeta} from '../walletManager' async function toShelleyWalletMeta(currentWalletMeta: Partial): Promise { if (!currentWalletMeta.id) throw new Error(`Wallet meta stored is corrupted. ${JSON.stringify(currentWalletMeta)}`) - const walletData: any = await storage.join('wallet/').join(`${currentWalletMeta.id}/`).getItem('data') + const walletData: any = await rootStorage.join('wallet/').join(`${currentWalletMeta.id}/`).getItem('data') const walletMetaUpdate: Partial = {...currentWalletMeta} // new fields added over time @@ -103,7 +103,7 @@ function migrateAttribute(attr: keyof WalletMeta, walletMetaUpdated: Partial { diff --git a/apps/wallet-mobile/src/yoroi-wallets/storage/EncryptedStorage.ts b/apps/wallet-mobile/src/yoroi-wallets/storage/EncryptedStorage.ts index c5b93044a6..c5aa367bd6 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/storage/EncryptedStorage.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/storage/EncryptedStorage.ts @@ -1,14 +1,14 @@ +import {parseString, rootStorage} from '@yoroi/wallets' + import {YoroiWallet} from '../cardano/types' import {decryptData, encryptData} from '../encryption' -import {parseString} from '../utils' -import {storage} from './storage' type StorageKey = `${string}-MASTER_PASSWORD` export const EncryptedStorageKeys = { rootKey: (id: YoroiWallet['id']): StorageKey => `${id}-MASTER_PASSWORD`, } -const keyStorage = storage.join('keystore/') +const keyStorage = rootStorage.join('keystore/') export const EncryptedStorage = { async read(key: StorageKey, password: string) { diff --git a/apps/wallet-mobile/src/yoroi-wallets/storage/StorageProvider.tsx b/apps/wallet-mobile/src/yoroi-wallets/storage/StorageProvider.tsx deleted file mode 100644 index 41084eb72b..0000000000 --- a/apps/wallet-mobile/src/yoroi-wallets/storage/StorageProvider.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react' - -import {storage as rootStorage, YoroiStorage} from './storage' - -const StorageContext = React.createContext(undefined) -export const StorageProvider = ({ - children, - storage = rootStorage, -}: { - storage?: YoroiStorage - children: React.ReactNode -}) => { - return {children} -} - -// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions -export const useStorage = () => React.useContext(StorageContext) || invalid() - -const invalid = () => { - throw new Error('Missing StorageProvider') -} diff --git a/apps/wallet-mobile/src/yoroi-wallets/storage/index.ts b/apps/wallet-mobile/src/yoroi-wallets/storage/index.ts index 111a509fd5..525979e5a4 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/storage/index.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/storage/index.ts @@ -1,5 +1,3 @@ export * from './EncryptedStorage' export * from './Keychain' export * from './KeychainStorage' -export * from './storage' -export * from './StorageProvider' diff --git a/apps/wallet-mobile/src/yoroi-wallets/types/yoroi.ts b/apps/wallet-mobile/src/yoroi-wallets/types/yoroi.ts index 26439c563f..7837694bc0 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/types/yoroi.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/types/yoroi.ts @@ -1,8 +1,7 @@ -import {Balance} from '@yoroi/types' +import {App, Balance} from '@yoroi/types' import {CardanoTypes, YoroiWallet} from '../cardano/types' import {HWDeviceInfo} from '../hw' -import {YoroiStorage} from '../storage' import {WalletMeta} from '../walletManager' export type YoroiUnsignedTx = YoroiTxInfo & { @@ -68,7 +67,7 @@ export type WalletFactory = { password, }: { id: string - storage: YoroiStorage + storage: App.Storage mnemonic: string password: string }): Promise @@ -84,8 +83,8 @@ export type WalletFactory = { hwDeviceInfo: HWDeviceInfo | null id: string isReadOnly: boolean - storage: YoroiStorage + storage: App.Storage }): Promise - restore({walletMeta, storage}: {storage: YoroiStorage; walletMeta: WalletMeta}): Promise + restore({walletMeta, storage}: {storage: App.Storage; walletMeta: WalletMeta}): Promise } diff --git a/apps/wallet-mobile/src/yoroi-wallets/utils/parsing.test.ts b/apps/wallet-mobile/src/yoroi-wallets/utils/parsing.test.ts index cafbbea4e2..66fec0e955 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/utils/parsing.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/utils/parsing.test.ts @@ -1,7 +1,7 @@ import {utf8ToHex} from '../cardano/api/utils' import {PRIMARY_TOKEN} from '../cardano/constants/testnet/constants' import {NETWORKS} from '../cardano/networks' -import {InvalidAssetAmount, isArrayOfType, isNonNullable, isRecord, isString, parseAmountDecimal} from './parsing' +import {InvalidAssetAmount, parseAmountDecimal} from './parsing' describe('parseAdaDecimal', () => { // recall: tests run on mainnet (default network) @@ -41,65 +41,3 @@ describe('asciiToHex', () => { expect(hex).toEqual('') }) }) - -describe('isArrayOfType', () => { - it('returns true if array is empty', () => { - expect(isArrayOfType([], isString)).toEqual(true) - }) - - it('returns true if array contains only elements of given type', () => { - expect(isArrayOfType(['a', 'b', 'c'], isString)).toEqual(true) - }) - - it('returns false if array contains elements of different type', () => { - expect(isArrayOfType(['a', 'b', 1], isString)).toEqual(false) - }) -}) - -describe('isString', () => { - it('returns true if string', () => { - expect(isString('hello')).toEqual(true) - }) - - it('returns false if not string', () => { - expect(isString(123)).toEqual(false) - expect(isString({})).toEqual(false) - expect(isString([])).toEqual(false) - expect(isString(null)).toEqual(false) - expect(isString(undefined)).toEqual(false) - expect(isString(true)).toEqual(false) - }) -}) - -describe('isRecord', () => { - it('returns true if is an object', () => { - expect(isRecord({})).toEqual(true) - }) - - it('returns false if is not an object or its array or its null', () => { - expect(isRecord([])).toEqual(false) - expect(isRecord(null)).toEqual(false) - expect(isRecord(undefined)).toEqual(false) - expect(isRecord(123)).toEqual(false) - expect(isRecord('hello')).toEqual(false) - expect(isRecord(true)).toEqual(false) - }) -}) - -describe('isNonNullable', () => { - it('returns true if value is not null nor undefined', () => { - expect(isNonNullable(1)).toEqual(true) - expect(isNonNullable('hello')).toEqual(true) - expect(isNonNullable({})).toEqual(true) - expect(isNonNullable([])).toEqual(true) - expect(isNonNullable(false)).toEqual(true) - expect(isNonNullable(true)).toEqual(true) - expect(isNonNullable(0)).toEqual(true) - expect(isNonNullable('')).toEqual(true) - }) - - it('returns false if null or undefined', () => { - expect(isNonNullable(null)).toEqual(false) - expect(isNonNullable(undefined)).toEqual(false) - }) -}) diff --git a/apps/wallet-mobile/src/yoroi-wallets/utils/parsing.ts b/apps/wallet-mobile/src/yoroi-wallets/utils/parsing.ts index a4a902af8d..cd9b92832b 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/utils/parsing.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/utils/parsing.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import {BigNumber} from 'bignumber.js' import ExtendableError from 'es6-error' -import {z} from 'zod' import {isHaskellShelleyNetwork, NETWORKS} from '../cardano/networks' import {Token} from '../types' @@ -24,12 +23,6 @@ export class InvalidAssetAmount extends ExtendableError { } } -export const createTypeGuardFromSchema = - (schema: z.ZodType) => - (data: unknown): data is T => { - return schema.safeParse(data).success - } - // expects an amount in regular currency units (eg ADA, not Lovelace) export const parseAmountDecimal = (amount: string, token: Token): BigNumber => { const assetMeta = token @@ -75,33 +68,3 @@ export const parseAmountDecimal = (amount: string, token: Token): BigNumber => { return value } - -export const parseBoolean = (data: unknown) => { - const parsed = parseSafe(data) - return isBoolean(parsed) ? parsed : undefined -} -export const parseString = (data: unknown) => { - const parsed = parseSafe(data) - return isString(parsed) ? parsed : undefined -} - -export function isArrayOfType(data: unknown, predicate: (data: unknown) => data is T): data is Array { - return isArray(data) && data.every(predicate) -} - -export const isRecord = createTypeGuardFromSchema>(z.record(z.unknown())) -export const isArray = createTypeGuardFromSchema(z.array(z.unknown())) - -export const parseSafe = (text: any) => { - try { - return JSON.parse(text) as unknown - } catch (_) { - return undefined - } -} - -export const isBoolean = (data: unknown): data is boolean => typeof data === 'boolean' -export const isString = (data: unknown): data is string => typeof data === 'string' -export const isNonNullable = (data: T | null | undefined): data is T => data !== null && data !== undefined -export const isNumber = (data: unknown): data is number => - typeof data === 'number' && !Number.isNaN(data) && Number.isFinite(data) diff --git a/apps/wallet-mobile/src/yoroi-wallets/walletManager/walletManager.test.ts b/apps/wallet-mobile/src/yoroi-wallets/walletManager/walletManager.test.ts index 0087126a17..a2e3530a9b 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/walletManager/walletManager.test.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/walletManager/walletManager.test.ts @@ -1,8 +1,8 @@ /* eslint-disable no-unused-labels */ import AsyncStorage from '@react-native-async-storage/async-storage' +import {parseSafe} from '@yoroi/wallets' import {isYoroiWallet} from '../cardano/types' -import {parseSafe} from '../utils/parsing' import {WalletManager} from './walletManager' // ! Actually hitting the API diff --git a/apps/wallet-mobile/src/yoroi-wallets/walletManager/walletManager.ts b/apps/wallet-mobile/src/yoroi-wallets/walletManager/walletManager.ts index c5fe24c9e5..19a93940f8 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/walletManager/walletManager.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/walletManager/walletManager.ts @@ -1,4 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ +import {App} from '@yoroi/types' +import {parseSafe, rootStorage} from '@yoroi/wallets' import ExtendableError from 'es6-error' import uuid from 'uuid' @@ -7,10 +9,9 @@ import {CardanoTypes, isYoroiWallet, YoroiWallet} from '../cardano/types' import {HWDeviceInfo} from '../hw' import {Logger} from '../logging' import {isWalletMeta, migrateWalletMetas, parseWalletMeta} from '../migrations/walletMeta' -import {makeWalletEncryptedStorage, storage, YoroiStorage} from '../storage' +import {makeWalletEncryptedStorage} from '../storage' import {Keychain} from '../storage/Keychain' import {NetworkId, WalletImplementationId} from '../types' -import {parseSafe} from '../utils' export class WalletClosed extends ExtendableError {} @@ -34,10 +35,10 @@ export type WalletManagerSubscription = (event: WalletManagerEvent) => void export class WalletManager { private subscriptions: Array = [] - storage: YoroiStorage + storage: App.Storage constructor() { - this.storage = storage.join('wallet/') + this.storage = rootStorage.join('wallet/') } async listWallets() { diff --git a/apps/wallet-mobile/translations/messages/src/AppNavigator.json b/apps/wallet-mobile/translations/messages/src/AppNavigator.json index 3a0fd787fb..deca0e0dbc 100644 --- a/apps/wallet-mobile/translations/messages/src/AppNavigator.json +++ b/apps/wallet-mobile/translations/messages/src/AppNavigator.json @@ -6,12 +6,12 @@ "start": { "line": 159, "column": 17, - "index": 5251 + "index": 5244 }, "end": { "line": 162, "column": 3, - "index": 5341 + "index": 5334 } }, { @@ -21,12 +21,12 @@ "start": { "line": 163, "column": 18, - "index": 5361 + "index": 5354 }, "end": { "line": 166, "column": 3, - "index": 5459 + "index": 5452 } }, { @@ -36,12 +36,12 @@ "start": { "line": 167, "column": 25, - "index": 5486 + "index": 5479 }, "end": { "line": 170, "column": 3, - "index": 5600 + "index": 5593 } }, { @@ -51,12 +51,12 @@ "start": { "line": 171, "column": 27, - "index": 5629 + "index": 5622 }, "end": { "line": 174, "column": 3, - "index": 5750 + "index": 5743 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/NftDetails/NftDetails.json b/apps/wallet-mobile/translations/messages/src/NftDetails/NftDetails.json index 6a83bdaabd..736ca764f5 100644 --- a/apps/wallet-mobile/translations/messages/src/NftDetails/NftDetails.json +++ b/apps/wallet-mobile/translations/messages/src/NftDetails/NftDetails.json @@ -6,12 +6,12 @@ "start": { "line": 284, "column": 9, - "index": 7976 + "index": 7968 }, "end": { "line": 287, "column": 3, - "index": 8047 + "index": 8039 } }, { @@ -21,12 +21,12 @@ "start": { "line": 288, "column": 12, - "index": 8061 + "index": 8053 }, "end": { "line": 291, "column": 3, - "index": 8132 + "index": 8124 } }, { @@ -36,12 +36,12 @@ "start": { "line": 292, "column": 12, - "index": 8146 + "index": 8138 }, "end": { "line": 295, "column": 3, - "index": 8217 + "index": 8209 } }, { @@ -51,12 +51,12 @@ "start": { "line": 296, "column": 11, - "index": 8230 + "index": 8222 }, "end": { "line": 299, "column": 3, - "index": 8300 + "index": 8292 } }, { @@ -66,12 +66,12 @@ "start": { "line": 300, "column": 13, - "index": 8315 + "index": 8307 }, "end": { "line": 303, "column": 3, - "index": 8386 + "index": 8378 } }, { @@ -81,12 +81,12 @@ "start": { "line": 304, "column": 15, - "index": 8403 + "index": 8395 }, "end": { "line": 307, "column": 3, - "index": 8480 + "index": 8472 } }, { @@ -96,12 +96,12 @@ "start": { "line": 308, "column": 10, - "index": 8492 + "index": 8484 }, "end": { "line": 311, "column": 3, - "index": 8559 + "index": 8551 } }, { @@ -111,12 +111,12 @@ "start": { "line": 312, "column": 15, - "index": 8576 + "index": 8568 }, "end": { "line": 315, "column": 3, - "index": 8653 + "index": 8645 } }, { @@ -126,12 +126,12 @@ "start": { "line": 316, "column": 12, - "index": 8667 + "index": 8659 }, "end": { "line": 319, "column": 3, - "index": 8739 + "index": 8731 } }, { @@ -141,12 +141,12 @@ "start": { "line": 320, "column": 16, - "index": 8757 + "index": 8749 }, "end": { "line": 323, "column": 3, - "index": 8834 + "index": 8826 } }, { @@ -156,12 +156,12 @@ "start": { "line": 324, "column": 16, - "index": 8852 + "index": 8844 }, "end": { "line": 327, "column": 3, - "index": 8932 + "index": 8924 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/TxHistory/TxDetails/TxDetails.json b/apps/wallet-mobile/translations/messages/src/TxHistory/TxDetails/TxDetails.json index b489a9313e..29c91989cc 100644 --- a/apps/wallet-mobile/translations/messages/src/TxHistory/TxDetails/TxDetails.json +++ b/apps/wallet-mobile/translations/messages/src/TxHistory/TxDetails/TxDetails.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Sent funds", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 359, + "line": 360, "column": 8, - "index": 12428 + "index": 12458 }, "end": { - "line": 362, + "line": 363, "column": 3, - "index": 12523 + "index": 12553 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!Received funds", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 363, + "line": 364, "column": 12, - "index": 12537 + "index": 12567 }, "end": { - "line": 366, + "line": 367, "column": 3, - "index": 12640 + "index": 12670 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!Intrawallet transaction", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 367, + "line": 368, "column": 8, - "index": 12650 + "index": 12680 }, "end": { - "line": 370, + "line": 371, "column": 3, - "index": 12758 + "index": 12788 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!Multi-party transaction", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 371, + "line": 372, "column": 9, - "index": 12769 + "index": 12799 }, "end": { - "line": 374, + "line": 375, "column": 3, - "index": 12878 + "index": 12908 } }, { @@ -64,14 +64,14 @@ "defaultMessage": "!!!/{idx}", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 378, + "line": 379, "column": 24, - "index": 12942 + "index": 12972 }, "end": { - "line": 381, + "line": 382, "column": 3, - "index": 13043 + "index": 13073 } }, { @@ -79,14 +79,14 @@ "defaultMessage": "!!!/change", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 382, + "line": 383, "column": 23, - "index": 13068 + "index": 13098 }, "end": { - "line": 385, + "line": 386, "column": 3, - "index": 13169 + "index": 13199 } }, { @@ -94,14 +94,14 @@ "defaultMessage": "!!!not mine", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 386, + "line": 387, "column": 24, - "index": 13195 + "index": 13225 }, "end": { - "line": 389, + "line": 390, "column": 3, - "index": 13298 + "index": 13328 } }, { @@ -109,14 +109,14 @@ "defaultMessage": "!!!Fee:", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 390, + "line": 391, "column": 7, - "index": 13307 + "index": 13337 }, "end": { - "line": 393, + "line": 394, "column": 3, - "index": 13390 + "index": 13420 } }, { @@ -124,14 +124,14 @@ "defaultMessage": "!!!From Addresses", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 394, + "line": 395, "column": 17, - "index": 13409 + "index": 13439 }, "end": { - "line": 397, + "line": 398, "column": 3, - "index": 13511 + "index": 13541 } }, { @@ -139,14 +139,14 @@ "defaultMessage": "!!!To Addresses", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 398, + "line": 399, "column": 15, - "index": 13528 + "index": 13558 }, "end": { - "line": 401, + "line": 402, "column": 3, - "index": 13626 + "index": 13656 } }, { @@ -154,14 +154,14 @@ "defaultMessage": "!!!Memo", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 402, + "line": 403, "column": 8, - "index": 13636 + "index": 13666 }, "end": { - "line": 405, + "line": 406, "column": 3, - "index": 13719 + "index": 13749 } }, { @@ -169,14 +169,14 @@ "defaultMessage": "!!!Transaction ID", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 406, + "line": 407, "column": 17, - "index": 13738 + "index": 13768 }, "end": { - "line": 409, + "line": 410, "column": 3, - "index": 13840 + "index": 13870 } }, { @@ -184,14 +184,14 @@ "defaultMessage": "!!!Transaction assurance level", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 410, + "line": 411, "column": 20, - "index": 13862 + "index": 13892 }, "end": { - "line": 413, + "line": 414, "column": 3, - "index": 13980 + "index": 14010 } }, { @@ -199,14 +199,14 @@ "defaultMessage": "!!!{cnt} {cnt, plural, one {CONFIRMATION} other {CONFIRMATIONS}}", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 414, + "line": 415, "column": 17, - "index": 13999 + "index": 14029 }, "end": { - "line": 417, + "line": 418, "column": 3, - "index": 14148 + "index": 14178 } }, { @@ -214,14 +214,14 @@ "defaultMessage": "!!!+ {cnt} omitted {cnt, plural, one {address} other {addresses}}", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 418, + "line": 419, "column": 16, - "index": 14166 + "index": 14196 }, "end": { - "line": 421, + "line": 422, "column": 3, - "index": 14315 + "index": 14345 } }, { @@ -229,14 +229,14 @@ "defaultMessage": "!!!Open in explorer", "file": "src/TxHistory/TxDetails/TxDetails.tsx", "start": { - "line": 422, + "line": 423, "column": 18, - "index": 14335 + "index": 14365 }, "end": { - "line": 425, + "line": 426, "column": 3, - "index": 14416 + "index": 14446 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/TxHistory/TxHistoryList/TxHistoryListItem.json b/apps/wallet-mobile/translations/messages/src/TxHistory/TxHistoryList/TxHistoryListItem.json index 6a58dc358c..27efd70470 100644 --- a/apps/wallet-mobile/translations/messages/src/TxHistory/TxHistoryList/TxHistoryListItem.json +++ b/apps/wallet-mobile/translations/messages/src/TxHistory/TxHistoryList/TxHistoryListItem.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Fee", "file": "src/TxHistory/TxHistoryList/TxHistoryListItem.tsx", "start": { - "line": 163, + "line": 164, "column": 7, - "index": 5731 + "index": 5761 }, "end": { - "line": 166, + "line": 167, "column": 3, - "index": 5820 + "index": 5850 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!ADA sent", "file": "src/TxHistory/TxHistoryList/TxHistoryListItem.tsx", "start": { - "line": 167, + "line": 168, "column": 23, - "index": 5845 + "index": 5875 }, "end": { - "line": 170, + "line": 171, "column": 3, - "index": 5955 + "index": 5985 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!ADA received", "file": "src/TxHistory/TxHistoryList/TxHistoryListItem.tsx", "start": { - "line": 171, + "line": 172, "column": 27, - "index": 5984 + "index": 6014 }, "end": { - "line": 174, + "line": 175, "column": 3, - "index": 6102 + "index": 6132 } }, { @@ -49,14 +49,14 @@ "defaultMessage": "!!!Intrawallet", "file": "src/TxHistory/TxHistoryList/TxHistoryListItem.tsx", "start": { - "line": 175, + "line": 176, "column": 23, - "index": 6127 + "index": 6157 }, "end": { - "line": 178, + "line": 179, "column": 3, - "index": 6240 + "index": 6270 } }, { @@ -64,14 +64,14 @@ "defaultMessage": "!!!Multiparty", "file": "src/TxHistory/TxHistoryList/TxHistoryListItem.tsx", "start": { - "line": 179, + "line": 180, "column": 24, - "index": 6266 + "index": 6296 }, "end": { - "line": 182, + "line": 183, "column": 3, - "index": 6379 + "index": 6409 } }, { @@ -80,14 +80,14 @@ "defaultMessage": "!!!{cnt} assets", "file": "src/TxHistory/TxHistoryList/TxHistoryListItem.tsx", "start": { - "line": 183, + "line": 184, "column": 10, - "index": 6391 + "index": 6421 }, "end": { - "line": 187, + "line": 188, "column": 3, - "index": 6543 + "index": 6573 } } ] \ No newline at end of file diff --git a/apps/wallet-mobile/translations/messages/src/yoroi-wallets/auth/auth.json b/apps/wallet-mobile/translations/messages/src/yoroi-wallets/auth/auth.json index b5e4cd14b2..efa89f7497 100644 --- a/apps/wallet-mobile/translations/messages/src/yoroi-wallets/auth/auth.json +++ b/apps/wallet-mobile/translations/messages/src/yoroi-wallets/auth/auth.json @@ -4,14 +4,14 @@ "defaultMessage": "!!!Authorize", "file": "src/yoroi-wallets/auth/auth.ts", "start": { - "line": 253, + "line": 254, "column": 13, - "index": 8385 + "index": 8407 }, "end": { - "line": 256, + "line": 257, "column": 3, - "index": 8492 + "index": 8514 } }, { @@ -19,14 +19,14 @@ "defaultMessage": "!!!Too many attempts", "file": "src/yoroi-wallets/auth/auth.ts", "start": { - "line": 257, + "line": 258, "column": 19, - "index": 8513 + "index": 8535 }, "end": { - "line": 260, + "line": 261, "column": 3, - "index": 8624 + "index": 8646 } }, { @@ -34,14 +34,14 @@ "defaultMessage": "!!!Unknown error!", "file": "src/yoroi-wallets/auth/auth.ts", "start": { - "line": 261, + "line": 262, "column": 16, - "index": 8642 + "index": 8664 }, "end": { - "line": 264, + "line": 265, "column": 3, - "index": 8749 + "index": 8771 } } ] \ No newline at end of file diff --git a/lerna.json b/lerna.json new file mode 100644 index 0000000000..140d2c6043 --- /dev/null +++ b/lerna.json @@ -0,0 +1,4 @@ +{ + "npmClient": "yarn", + "version": "independent" +} diff --git a/metro.config.js b/metro.config.js index e13e71c36b..49dfcdc031 100644 --- a/metro.config.js +++ b/metro.config.js @@ -4,8 +4,9 @@ module.exports = { projectRoot: path.resolve(__dirname, "apps/wallet-mobile"), watchFolders: [ path.resolve(__dirname, "node_modules"), - path.resolve(__dirname, "packages/types"), path.resolve(__dirname, "packages/api-openswap"), + path.resolve(__dirname, "packages/types"), + path.resolve(__dirname, "packages/wallets"), path.resolve(__dirname, "packages/swap"), path.resolve(__dirname, "apps/wallet-mobile"), ], diff --git a/package.json b/package.json index efe620cf90..a334aa172e 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,39 @@ { "name": "yoroi", "version": "1.0.0", + "private": true, "repository": "git@github.com:Emurgo/yoroi.git", "author": "EMURGO", - "private": true, + "workspaces": { + "packages": [ + "packages/types", + "packages/wallets", + "packages/api-openswap", + "packages/*", + "apps/*" + ], + "nohoist": [ + "**/chokidar-cli", + "**/concurrently", + "**/rimraf", + "**/lerna" + ] + }, "scripts": { - "reset": "yarn workspaces run rimraf node_modules && yarn rimraf node_modules" + "reset": "yarn clean && yarn install --frozen-lockfile && yarn wallet-mobile:reset && yarn build && yarn start", + "build": "yarn workspaces run build", + "clean": "yarn workspaces run rimraf node_modules && yarn rimraf node_modules", + "build:start": "yarn build && concurrently \"yarn watch\" \"yarn wallet-mobile:start\"", + "start": "concurrently \"yarn watch\" \"yarn wallet-mobile:start\"", + "wallet-mobile:start": "cd apps/wallet-mobile && yarn start", + "wallet-mobile:reset": "cd apps/wallet-mobile && yarn reset && cd ../..", + "watch": "chokidar \"packages/*/src/**/*\" -c \"yarn build:changed\"", + "build:changed": "lerna run build --since --ignore @yoroi/wallet-mobile" }, - "workspaces": [ - "packages/types", - "packages/api-openswap", - "packages/*", - "apps/*" - ] + "devDependencies": { + "concurrently": "^8.2.0", + "chokidar-cli": "^3.0.0", + "lerna": "^7.1.5", + "rimraf": "^5.0.1" + } } diff --git a/packages/types/src/app/storage.ts b/packages/types/src/app/storage.ts new file mode 100644 index 0000000000..267afb2708 --- /dev/null +++ b/packages/types/src/app/storage.ts @@ -0,0 +1,27 @@ +export type AppStorageFolderName = `${string}/` + +export interface AppStorage { + join: (folderName: AppStorageFolderName) => AppStorage + getItem: ( + key: string, + parse?: (item: string | null) => T, + ) => Promise + multiGet: ( + keys: Array, + parse?: (item: string | null) => T, + ) => Promise> + setItem: ( + key: string, + value: T, + stringify?: (data: T) => string, + ) => Promise + multiSet: ( + tuples: Array<[key: string, value: unknown]>, + stringify?: (data: unknown) => string, + ) => Promise + removeItem: (key: string) => Promise + removeFolder: (folderName: AppStorageFolderName) => Promise + multiRemove: (keys: Array) => Promise + getAllKeys: () => Promise> + clear: () => Promise +} diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 955c7f39df..1fbd737fe4 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -17,7 +17,12 @@ import { import {SwapPool} from './swap/pool' import {SwapStorage} from './swap/storage' import {SwapManager} from './swap/manager' +import {AppStorage, AppStorageFolderName} from './app/storage' +export namespace App { + export interface Storage extends AppStorage {} + export type StorageFolderName = AppStorageFolderName +} export namespace Swap { export type CreateOrderData = SwapCreateOrderData export type CreateOrderResponse = SwapCreateOrderResponse diff --git a/packages/wallets/.dependency-cruiser.js b/packages/wallets/.dependency-cruiser.js new file mode 100644 index 0000000000..fff414129a --- /dev/null +++ b/packages/wallets/.dependency-cruiser.js @@ -0,0 +1,449 @@ +/** @type {import('dependency-cruiser').IConfiguration} */ +module.exports = { + forbidden: [ + /* rules from the 'recommended' preset: */ + { + name: 'fix-circular', + severity: 'error', + comment: + 'This dependency is part of a circular relationship. You might want to revise ' + + 'your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ', + from: {}, + to: { + circular: true + } + }, + { + name: 'no-orphans', + comment: + "This is an orphan module - it's likely not used (anymore?). Either use it or " + + "remove it. If it's logical this module is an orphan (i.e. it's a config file), " + + "add an exception for it in your dependency-cruiser configuration. By default " + + "this rule does not scrutinize dot-files (e.g. .eslintrc.js), TypeScript declaration " + + "files (.d.ts), tsconfig.json and some of the babel and webpack configs.", + severity: 'warn', + from: { + orphan: true, + pathNot: [ + '(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$', // dot files + '\\.d\\.ts$', // TypeScript declaration files + '(^|/)tsconfig\\.json$', // TypeScript config + '(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$' // other configs + ] + }, + to: {}, + }, + { + name: 'no-deprecated-core', + comment: + 'A module depends on a node core module that has been deprecated. Find an alternative - these are ' + + "bound to exist - node doesn't deprecate lightly.", + severity: 'warn', + from: {}, + to: { + dependencyTypes: [ + 'core' + ], + path: [ + '^(v8\/tools\/codemap)$', + '^(v8\/tools\/consarray)$', + '^(v8\/tools\/csvparser)$', + '^(v8\/tools\/logreader)$', + '^(v8\/tools\/profile_view)$', + '^(v8\/tools\/profile)$', + '^(v8\/tools\/SourceMap)$', + '^(v8\/tools\/splaytree)$', + '^(v8\/tools\/tickprocessor-driver)$', + '^(v8\/tools\/tickprocessor)$', + '^(node-inspect\/lib\/_inspect)$', + '^(node-inspect\/lib\/internal\/inspect_client)$', + '^(node-inspect\/lib\/internal\/inspect_repl)$', + '^(async_hooks)$', + '^(punycode)$', + '^(domain)$', + '^(constants)$', + '^(sys)$', + '^(_linklist)$', + '^(_stream_wrap)$' + ], + } + }, + { + name: 'not-to-deprecated', + comment: + 'This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later ' + + 'version of that module, or find an alternative. Deprecated modules are a security risk.', + severity: 'warn', + from: {}, + to: { + dependencyTypes: [ + 'deprecated' + ] + } + }, + { + name: 'no-non-package-json', + severity: 'error', + comment: + "This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " + + "That's problematic as the package either (1) won't be available on live (2 - worse) will be " + + "available on live with an non-guaranteed version. Fix it by adding the package to the dependencies " + + "in your package.json.", + from: {}, + to: { + dependencyTypes: [ + 'npm-no-pkg', + 'npm-unknown' + ] + } + }, + { + name: 'not-to-unresolvable', + comment: + "This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " + + 'module: add it to your package.json. In all other cases you likely already know what to do.', + severity: 'error', + from: {}, + to: { + couldNotResolve: true + } + }, + { + name: 'no-duplicate-dep-types', + comment: + "Likely this module depends on an external ('npm') package that occurs more than once " + + "in your package.json i.e. bot as a devDependencies and in dependencies. This will cause " + + "maintenance problems later on.", + severity: 'warn', + from: {}, + to: { + moreThanOneDependencyType: true, + // as it's pretty common to have a type import be a type only import + // _and_ (e.g.) a devDependency - don't consider type-only dependency + // types for this rule + dependencyTypesNot: ["type-only"] + } + }, + + /* rules you might want to tweak for your specific situation: */ + { + name: 'not-to-spec', + comment: + 'This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. ' + + "If there's something in a spec that's of use to other modules, it doesn't have that single " + + 'responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.', + severity: 'error', + from: {}, + to: { + path: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$' + } + }, + { + name: 'not-to-dev-dep', + severity: 'error', + comment: + "This module depends on an npm package from the 'devDependencies' section of your " + + 'package.json. It looks like something that ships to production, though. To prevent problems ' + + "with npm packages that aren't there on production declare it (only!) in the 'dependencies'" + + 'section of your package.json. If this module is development only - add it to the ' + + 'from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration', + from: { + path: '^(src)', + pathNot: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$' + }, + to: { + dependencyTypes: [ + 'npm-dev' + ] + } + }, + { + name: 'optional-deps-used', + severity: 'info', + comment: + "This module depends on an npm package that is declared as an optional dependency " + + "in your package.json. As this makes sense in limited situations only, it's flagged here. " + + "If you're using an optional dependency here by design - add an exception to your" + + "dependency-cruiser configuration.", + from: {}, + to: { + dependencyTypes: [ + 'npm-optional' + ] + } + }, + { + name: 'peer-deps-used', + comment: + "This module depends on an npm package that is declared as a peer dependency " + + "in your package.json. This makes sense if your package is e.g. a plugin, but in " + + "other cases - maybe not so much. If the use of a peer dependency is intentional " + + "add an exception to your dependency-cruiser configuration.", + severity: 'warn', + from: {}, + to: { + dependencyTypes: [ + 'npm-peer' + ] + } + } + ], + options: { + + /* conditions specifying which files not to follow further when encountered: + - path: a regular expression to match + - dependencyTypes: see https://github.com/sverweij/dependency-cruiser/blob/master/doc/rules-reference.md#dependencytypes-and-dependencytypesnot + for a complete list + */ + doNotFollow: { + path: 'node_modules' + }, + + /* conditions specifying which dependencies to exclude + - path: a regular expression to match + - dynamic: a boolean indicating whether to ignore dynamic (true) or static (false) dependencies. + leave out if you want to exclude neither (recommended!) + */ + // exclude : { + // path: '', + // dynamic: true + // }, + + /* pattern specifying which files to include (regular expression) + dependency-cruiser will skip everything not matching this pattern + */ + // includeOnly : '', + + /* dependency-cruiser will include modules matching against the focus + regular expression in its output, as well as their neighbours (direct + dependencies and dependents) + */ + // focus : '', + + /* list of module systems to cruise */ + // moduleSystems: ['amd', 'cjs', 'es6', 'tsd'], + + /* prefix for links in html and svg output (e.g. 'https://github.com/you/yourrepo/blob/develop/' + to open it on your online repo or `vscode://file/${process.cwd()}/` to + open it in visual studio code), + */ + // prefix: '', + + /* false (the default): ignore dependencies that only exist before typescript-to-javascript compilation + true: also detect dependencies that only exist before typescript-to-javascript compilation + "specify": for each dependency identify whether it only exists before compilation or also after + */ + tsPreCompilationDeps: true, + + /* + list of extensions to scan that aren't javascript or compile-to-javascript. + Empty by default. Only put extensions in here that you want to take into + account that are _not_ parsable. + */ + // extraExtensionsToScan: [".json", ".jpg", ".png", ".svg", ".webp"], + + /* if true combines the package.jsons found from the module up to the base + folder the cruise is initiated from. Useful for how (some) mono-repos + manage dependencies & dependency definitions. + */ + // combinedDependencies: false, + + /* if true leave symlinks untouched, otherwise use the realpath */ + // preserveSymlinks: false, + + /* TypeScript project file ('tsconfig.json') to use for + (1) compilation and + (2) resolution (e.g. with the paths property) + + The (optional) fileName attribute specifies which file to take (relative to + dependency-cruiser's current working directory). When not provided + defaults to './tsconfig.json'. + */ + tsConfig: { + fileName: 'tsconfig.json' + }, + + /* Webpack configuration to use to get resolve options from. + + The (optional) fileName attribute specifies which file to take (relative + to dependency-cruiser's current working directory. When not provided defaults + to './webpack.conf.js'. + + The (optional) `env` and `args` attributes contain the parameters to be passed if + your webpack config is a function and takes them (see webpack documentation + for details) + */ + // webpackConfig: { + // fileName: './webpack.config.js', + // env: {}, + // args: {}, + // }, + + /* Babel config ('.babelrc', '.babelrc.json', '.babelrc.json5', ...) to use + for compilation (and whatever other naughty things babel plugins do to + source code). This feature is well tested and usable, but might change + behavior a bit over time (e.g. more precise results for used module + systems) without dependency-cruiser getting a major version bump. + */ + // babelConfig: { + // fileName: './.babelrc' + // }, + + /* List of strings you have in use in addition to cjs/ es6 requires + & imports to declare module dependencies. Use this e.g. if you've + re-declared require, use a require-wrapper or use window.require as + a hack. + */ + // exoticRequireStrings: [], + /* options to pass on to enhanced-resolve, the package dependency-cruiser + uses to resolve module references to disk. You can set most of these + options in a webpack.conf.js - this section is here for those + projects that don't have a separate webpack config file. + + Note: settings in webpack.conf.js override the ones specified here. + */ + enhancedResolveOptions: { + /* List of strings to consider as 'exports' fields in package.json. Use + ['exports'] when you use packages that use such a field and your environment + supports it (e.g. node ^12.19 || >=14.7 or recent versions of webpack). + + If you have an `exportsFields` attribute in your webpack config, that one + will have precedence over the one specified here. + */ + exportsFields: ["exports"], + /* List of conditions to check for in the exports field. e.g. use ['imports'] + if you're only interested in exposed es6 modules, ['require'] for commonjs, + or all conditions at once `(['import', 'require', 'node', 'default']`) + if anything goes for you. Only works when the 'exportsFields' array is + non-empty. + + If you have a 'conditionNames' attribute in your webpack config, that one will + have precedence over the one specified here. + */ + conditionNames: ["import", "require", "node", "default"], + /* + The extensions, by default are the same as the ones dependency-cruiser + can access (run `npx depcruise --info` to see which ones that are in + _your_ environment. If that list is larger than what you need (e.g. + it contains .js, .jsx, .ts, .tsx, .cts, .mts - but you don't use + TypeScript you can pass just the extensions you actually use (e.g. + [".js", ".jsx"]). This can speed up the most expensive step in + dependency cruising (module resolution) quite a bit. + */ + // extensions: [".js", ".jsx", ".ts", ".tsx", ".d.ts"], + /* + If your TypeScript project makes use of types specified in 'types' + fields in package.jsons of external dependencies, specify "types" + in addition to "main" in here, so enhanced-resolve (the resolver + dependency-cruiser uses) knows to also look there. You can also do + this if you're not sure, but still use TypeScript. In a future version + of dependency-cruiser this will likely become the default. + */ + mainFields: ["main", "types"], + }, + reporterOptions: { + dot: { + /* pattern of modules that can be consolidated in the detailed + graphical dependency graph. The default pattern in this configuration + collapses everything in node_modules to one folder deep so you see + the external modules, but not the innards your app depends upon. + */ + collapsePattern: 'node_modules/[^/]+', + + /* Options to tweak the appearance of your graph.See + https://github.com/sverweij/dependency-cruiser/blob/master/doc/options-reference.md#reporteroptions + for details and some examples. If you don't specify a theme + don't worry - dependency-cruiser will fall back to the default one. + */ + // theme: { + // graph: { + // /* use splines: "ortho" for straight lines. Be aware though + // graphviz might take a long time calculating ortho(gonal) + // routings. + // */ + // splines: "true" + // }, + // modules: [ + // { + // criteria: { matchesFocus: true }, + // attributes: { + // fillcolor: "lime", + // penwidth: 2, + // }, + // }, + // { + // criteria: { matchesFocus: false }, + // attributes: { + // fillcolor: "lightgrey", + // }, + // }, + // { + // criteria: { matchesReaches: true }, + // attributes: { + // fillcolor: "lime", + // penwidth: 2, + // }, + // }, + // { + // criteria: { matchesReaches: false }, + // attributes: { + // fillcolor: "lightgrey", + // }, + // }, + // { + // criteria: { source: "^src/model" }, + // attributes: { fillcolor: "#ccccff" } + // }, + // { + // criteria: { source: "^src/view" }, + // attributes: { fillcolor: "#ccffcc" } + // }, + // ], + // dependencies: [ + // { + // criteria: { "rules[0].severity": "error" }, + // attributes: { fontcolor: "red", color: "red" } + // }, + // { + // criteria: { "rules[0].severity": "warn" }, + // attributes: { fontcolor: "orange", color: "orange" } + // }, + // { + // criteria: { "rules[0].severity": "info" }, + // attributes: { fontcolor: "blue", color: "blue" } + // }, + // { + // criteria: { resolved: "^src/model" }, + // attributes: { color: "#0000ff77" } + // }, + // { + // criteria: { resolved: "^src/view" }, + // attributes: { color: "#00770077" } + // } + // ] + // } + }, + archi: { + /* pattern of modules that can be consolidated in the high level + graphical dependency graph. If you use the high level graphical + dependency graph reporter (`archi`) you probably want to tweak + this collapsePattern to your situation. + */ + collapsePattern: '^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/[^/]+', + + /* Options to tweak the appearance of your graph.See + https://github.com/sverweij/dependency-cruiser/blob/master/doc/options-reference.md#reporteroptions + for details and some examples. If you don't specify a theme + for 'archi' dependency-cruiser will use the one specified in the + dot section (see above), if any, and otherwise use the default one. + */ + // theme: { + // }, + }, + "text": { + "highlightFocused": true + }, + } + } +}; +// generated: dependency-cruiser@12.10.0 on 2023-03-08T01:53:10.874Z \ No newline at end of file diff --git a/packages/wallets/.gitignore b/packages/wallets/.gitignore new file mode 100644 index 0000000000..75356714f9 --- /dev/null +++ b/packages/wallets/.gitignore @@ -0,0 +1,70 @@ +# OSX +# +.DS_Store + +# XDE +.expo/ + +# VSCode +.vscode/ +jsconfig.json + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +project.xcworkspace + +# Android/IJ +# +.classpath +.cxx +.gradle +.idea +.project +.settings +local.properties +android.iml + +# Cocoapods +# +example/ios/Pods + +# Ruby +example/vendor/ + +# node.js +# +node_modules/ +npm-debug.log +yarn-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +android/app/libs +android/keystores/debug.keystore + +# Expo +.expo/ + +# Turborepo +.turbo/ + +# generated by bob +lib/ diff --git a/packages/wallets/.watchmanconfig b/packages/wallets/.watchmanconfig new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/packages/wallets/.watchmanconfig @@ -0,0 +1 @@ +{} diff --git a/packages/wallets/babel.config.js b/packages/wallets/babel.config.js new file mode 100644 index 0000000000..f842b77fcf --- /dev/null +++ b/packages/wallets/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ['module:metro-react-native-babel-preset'], +}; diff --git a/packages/wallets/jest.setup.js b/packages/wallets/jest.setup.js new file mode 100644 index 0000000000..eb2d41652a --- /dev/null +++ b/packages/wallets/jest.setup.js @@ -0,0 +1,3 @@ +jest.mock('@react-native-async-storage/async-storage', () => + require('@react-native-async-storage/async-storage/jest/async-storage-mock'), +) diff --git a/packages/wallets/package.json b/packages/wallets/package.json new file mode 100644 index 0000000000..1c98210606 --- /dev/null +++ b/packages/wallets/package.json @@ -0,0 +1,209 @@ +{ + "name": "@yoroi/wallets", + "version": "1.0.0", + "description": "The Wallets package of Yoroi SDK", + "keywords": [ + "yoroi", + "cardano", + "swap", + "browser", + "react" + ], + "homepage": "https://github.com/Emurgo/yoroi/packages/wallets#readme", + "bugs": { + "url": "https://github.com/Emurgo/yoroi/issues" + }, + "repository": { + "type": "github", + "url": "https://github.com/Emurgo/yoroi.git", + "directory": "packages/wallets" + }, + "license": "Apache-2.0", + "author": "EMURGO Fintech (https://github.com/Emurgo/yoroi)", + "contributors": [ + { + "name": "Juliano Lazzarotto", + "email": "30806844+stackchain@users.noreply.github.com" + } + ], + "main": "lib/commonjs/index", + "module": "lib/module/index", + "source": "src/index", + "browser": "lib/module/index", + "types": "lib/typescript/index.d.ts", + "files": [ + "src", + "lib", + "!ios/build", + "!android/build", + "!android/gradle", + "!android/gradlew", + "!android/gradlew.bat", + "!android/local.properties", + "!**/__tests__", + "!**/__fixtures__", + "!**/__mocks__", + "!**/.*" + ], + "scripts": { + "build": "yarn tsc && yarn lint && yarn test --ci --silent && yarn clean && bob build && yarn flow", + "clean": "del-cli lib", + "dgraph": "depcruise src --include-only \"^src\" --output-type dot | dot -T svg > dependency-graph.svg", + "flow": ". ./scripts/flowgen.sh", + "lint": "eslint \"**/*.{js,ts,tsx}\"", + "prepack": "yarn build", + "publish:beta": "yarn build && npm publish --scope yoroi --tag beta --access beta", + "publish:prod": "yarn build && npm publish --scope yoroi --access public", + "release": "release-it", + "test": "jest", + "test:watch": "jest --watch --debug", + "tsc": "tsc --noEmit -p tsconfig.json" + }, + "commitlint": { + "extends": [ + "@commitlint/config-conventional" + ] + }, + "prettier": { + "bracketSpacing": false, + "quoteProps": "consistent", + "semi": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "all", + "useTabs": false + }, + "eslintConfig": { + "extends": [ + "@react-native-community", + "prettier" + ], + "rules": { + "prettier/prettier": [ + "error", + { + "quoteProps": "consistent", + "bracketSpacing": false, + "singleQuote": true, + "tabWidth": 2, + "trailingComma": "all", + "useTabs": false, + "semi": false + } + ] + }, + "root": true + }, + "eslintIgnore": [ + "node_modules/", + "lib/", + "babel.config.js", + "jest.setup.js", + "coverage/" + ], + "jest": { + "modulePathIgnorePatterns": [ + "/example/node_modules", + "/lib/" + ], + "preset": "react-native", + "setupFiles": [ + "/jest.setup.js" + ], + "collectCoverageFrom": [ + "src/**/*.{js,jsx,ts,tsx}", + "!src/**/*.d.ts" + ], + "coverageThreshold": { + "global": { + "branches": 100, + "functions": 100, + "lines": 100, + "statements":100 + } + }, + "collectCoverage": true, + "coverageReporters": [ + "text-summary", + "html" + ] + }, + "dependencies": { + "@react-native-async-storage/async-storage": "^1.19.2", + "immer": "^10.0.2", + "zod": "^3.22.1" + }, + "devDependencies": { + "@commitlint/config-conventional": "^17.0.2", + "@react-native-community/eslint-config": "^3.0.2", + "@release-it/conventional-changelog": "^5.0.0", + "@testing-library/jest-dom": "^6.0.0", + "@testing-library/react": "^14.0.0", + "@testing-library/react-hooks": "^8.0.1", + "@types/jest": "^28.1.2", + "@types/react": "18.2.0", + "@types/react-native": "0.71.6", + "@yoroi/types": "1.0.4", + "commitlint": "^17.0.2", + "del-cli": "^5.0.0", + "dependency-cruiser": "^13.1.1", + "eslint": "^8.4.1", + "eslint-config-prettier": "^8.5.0", + "eslint-plugin-ft-flow": "^3.0.0", + "eslint-plugin-prettier": "^4.0.0", + "flowgen": "^1.21.0", + "jest": "^28.1.1", + "pod-install": "^0.1.0", + "prettier": "^2.0.5", + "react": "18.2.0", + "react-native": "0.71.6", + "react-native-builder-bob": "^0.20.4", + "react-query": "^3.39.3", + "react-test-renderer": "^18.2.0", + "release-it": "^15.0.0", + "typescript": "^4.5.2" + }, + "peerDependencies": { + "react": ">= 16.8.0 <= 19.0.0", + "react-query": "^3.39.3" + }, + "packageManager": "^yarn@1.22.15", + "engines": { + "node": ">= 16.19.0" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/" + }, + "react-native-builder-bob": { + "source": "src", + "output": "lib", + "targets": [ + "commonjs", + "module", + [ + "typescript", + { + "project": "tsconfig.build.json", + "tsc": "./node_modules/.bin/tsc" + } + ] + ] + }, + "release-it": { + "git": { + "commitMessage": "chore: release ${version}", + "tagName": "v${version}" + }, + "npm": { + "publish": true + }, + "github": { + "release": false + }, + "plugins": { + "@release-it/conventional-changelog": { + "preset": "angular" + } + } + } +} diff --git a/packages/wallets/scripts/flowgen.sh b/packages/wallets/scripts/flowgen.sh new file mode 100644 index 0000000000..2638ef8d27 --- /dev/null +++ b/packages/wallets/scripts/flowgen.sh @@ -0,0 +1,3 @@ +for i in $(find lib -type f -name "*.d.ts"); + do sh -c "npx flowgen $i -o ${i%.*.*}.js.flow"; +done; diff --git a/apps/wallet-mobile/src/yoroi-wallets/storage/storage.test.ts b/packages/wallets/src/adapters/asyncStorage.test.ts similarity index 85% rename from apps/wallet-mobile/src/yoroi-wallets/storage/storage.test.ts rename to packages/wallets/src/adapters/asyncStorage.test.ts index d403909972..3d33002ada 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/storage/storage.test.ts +++ b/packages/wallets/src/adapters/asyncStorage.test.ts @@ -1,13 +1,14 @@ +/* eslint-disable @typescript-eslint/no-shadow */ import AsyncStorage from '@react-native-async-storage/async-storage' -import {parseSafe} from '../utils/parsing' -import {storage as yoroiStorage} from './storage' +import {parseSafe} from '../parsers' +import {rootStorage} from './asyncStorage' describe('prefixed storage', () => { beforeEach(() => AsyncStorage.clear()) it('getAllKeys, setItem, getItem, removeItem, clear', async () => { - const storage = yoroiStorage + const storage = rootStorage await storage.getAllKeys().then((keys) => expect(keys).toEqual([])) await storage.setItem('item1', item1) @@ -26,7 +27,7 @@ describe('prefixed storage', () => { }) it('getAllKeys, setItem, getItem, removeItem, clear, with prefix', async () => { - const storage = yoroiStorage.join('prefix/') + const storage = rootStorage.join('prefix/') expect(await storage.getAllKeys()).toEqual([]) await storage.setItem('item1', item1) @@ -45,7 +46,7 @@ describe('prefixed storage', () => { }) it('getAllKeys, multiSet, multiGet, multiRemove', async () => { - const storage = yoroiStorage.join('prefix/') + const storage = rootStorage.join('prefix/') await storage.multiSet([ ['item1', item1], @@ -71,19 +72,19 @@ describe('prefixed storage', () => { }) it('getAllKeys', async () => { - const storage1 = yoroiStorage.join('prefix/1/') + const storage1 = rootStorage.join('prefix/1/') expect(await storage1.getAllKeys()).toEqual([]) await storage1.setItem('key1', item1) await storage1.setItem('key2', item2) expect(await storage1.getAllKeys()).toEqual(['key1', 'key2']) - const storage2 = yoroiStorage.join('prefix/2/3/') + const storage2 = rootStorage.join('prefix/2/3/') expect(await storage2.getAllKeys()).toEqual([]) await storage2.setItem('key1', item1) await storage2.setItem('key2', item2) expect(await storage2.getAllKeys()).toEqual(['key1', 'key2']) - const storage = yoroiStorage.join('prefix/') + const storage = rootStorage.join('prefix/') expect(await storage.getAllKeys()).toEqual([]) await storage.setItem('key1', item1) await storage.setItem('key2', item2) @@ -91,7 +92,7 @@ describe('prefixed storage', () => { }) it('join', async () => { - const root = yoroiStorage.join('/') + const root = rootStorage.join('/') await root.setItem('key1', item1) await root.setItem('key2', item2) expect(await root.getAllKeys()).toEqual(['key1', 'key2']) @@ -116,7 +117,7 @@ describe('prefixed storage', () => { describe('stringify/parse', () => { it('getItem, setItem', async () => { - const storage = yoroiStorage + const storage = rootStorage const item = 'text' const storedItem = 'item123' @@ -134,7 +135,7 @@ describe('prefixed storage', () => { }) it('multiGet, multiSet', async () => { - const storage = yoroiStorage + const storage = rootStorage const item1 = 'item1' const storedItem1 = `${item1}-modified` const item2 = 'item2' @@ -149,22 +150,25 @@ describe('prefixed storage', () => { return `${data}-modified` }) // overrides JSON.stringify - const parsedResult = await storage.multiGet(['item1', 'item2'], (data) => { - expect([storedItem1, storedItem2]).toContain(data) - return data?.slice(0, 5) - }) // overrides JSON.parse + const parsedResult = await storage.multiGet( + ['item1', 'item2'], + (data) => { + expect([storedItem1, storedItem2]).toContain(data) + return data?.slice(0, 5) + }, + ) // overrides JSON.parse expect(parsedResult).toEqual(tuples) }) }) it('clears sub-storage', async () => { - const storage1 = yoroiStorage.join('1/') + const storage1 = rootStorage.join('1/') const storage2 = storage1.join('2/') const storage3 = storage2.join('3/') - await yoroiStorage.setItem('a', '000') - await yoroiStorage.setItem('1', '000') + await rootStorage.setItem('a', '000') + await rootStorage.setItem('1', '000') await storage1.setItem('b', 111) await storage2.setItem('c', 222) await storage3.setItem('d', 333) @@ -191,12 +195,12 @@ describe('prefixed storage', () => { }) it('removeFolder', async () => { - const storage1 = yoroiStorage.join('1/') + const storage1 = rootStorage.join('1/') const storage2 = storage1.join('2/') const storage3 = storage2.join('3/') - await yoroiStorage.setItem('a', '000') - await yoroiStorage.setItem('1', '000') + await rootStorage.setItem('a', '000') + await rootStorage.setItem('1', '000') await storage1.setItem('b', 111) await storage2.setItem('c', 222) await storage3.setItem('d', 333) @@ -222,7 +226,7 @@ describe('prefixed storage', () => { '/a': '000', }) - await yoroiStorage.removeFolder('1/') + await rootStorage.removeFolder('1/') expect(await snapshot()).toEqual({ '/1': '000', diff --git a/apps/wallet-mobile/src/yoroi-wallets/storage/storage.ts b/packages/wallets/src/adapters/asyncStorage.ts similarity index 53% rename from apps/wallet-mobile/src/yoroi-wallets/storage/storage.ts rename to packages/wallets/src/adapters/asyncStorage.ts index 6cb6202974..5274e5c593 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/storage/storage.ts +++ b/packages/wallets/src/adapters/asyncStorage.ts @@ -1,35 +1,51 @@ import AsyncStorage from '@react-native-async-storage/async-storage' +import {App} from '@yoroi/types' -import {parseSafe} from '../utils/parsing' +import {parseSafe} from '../parsers' -export type YoroiStorage = ReturnType -export type FolderName = `${string}/` - -const mountStorage = (path: FolderName) => { - const withPath = (key: string) => `${path}${key}` as `${FolderName}${string}` +// ------- +// ADAPTER + "FACTORY" +const mountStorage = (path: App.StorageFolderName): App.Storage => { + const withPath = (key: string) => + `${path}${key}` as `${App.StorageFolderName}${string}` const withoutPath = (value: string) => value.slice(path.length) - function getItem(key: string, parse: (item: string | null) => T): Promise + function getItem( + key: string, + parse: (item: string | null) => T, + ): Promise function getItem(key: string): Promise async function getItem(key: string, parse = parseSafe) { const item = await AsyncStorage.getItem(withPath(key)) return parse(item) } - function multiGet(keys: Array, parse: (item: string | null) => T): Promise> - function multiGet(keys: Array): Promise> + function multiGet( + keys: Array, + parse: (item: string | null) => T, + ): Promise> + function multiGet( + keys: Array, + ): Promise> async function multiGet(keys: Array, parse = parseSafe) { const absolutePaths = keys.map((key) => withPath(key)) const items = await AsyncStorage.multiGet(absolutePaths) - return items.map(([key, value]) => [withoutPath(key), parse(value)] as const) + return items.map( + ([key, value]) => [withoutPath(key), parse(value)] as const, + ) } return { - join: (folderName: FolderName) => mountStorage(`${path}${folderName}`), + join: (folderName: App.StorageFolderName) => + mountStorage(`${path}${folderName}`), getItem, multiGet, - setItem: async (key: string, value: T, stringify: (data: T) => string = JSON.stringify) => { + setItem: async ( + key: string, + value: T, + stringify: (data: T) => string = JSON.stringify, + ) => { const item = stringify(value) await AsyncStorage.setItem(withPath(key), item) }, @@ -37,16 +53,22 @@ const mountStorage = (path: FolderName) => { tuples: Array<[key: string, value: unknown]>, stringify: (data: unknown) => string = JSON.stringify, ) => { - const items: Array<[string, string]> = tuples.map(([key, value]) => [withPath(key), stringify(value)]) + const items: Array<[string, string]> = tuples.map(([key, value]) => [ + withPath(key), + stringify(value), + ]) await AsyncStorage.multiSet(items) }, removeItem: async (key: string) => { await AsyncStorage.removeItem(withPath(key)) }, - removeFolder: async (folderName: FolderName) => { + removeFolder: async (folderName: App.StorageFolderName) => { const keys = await AsyncStorage.getAllKeys() const filteredKeys = keys.filter( - (key) => key.startsWith(path) && withoutPath(key).startsWith(folderName) && isFolderKey({key, path}), + (key) => + key.startsWith(path) && + withoutPath(key).startsWith(folderName) && + isFolderKey({key, path}), ) await AsyncStorage.multiRemove(filteredKeys) @@ -56,7 +78,9 @@ const mountStorage = (path: FolderName) => { }, getAllKeys: () => { return AsyncStorage.getAllKeys() - .then((keys) => keys.filter((key) => key.startsWith(path) && isFileKey({key, path}))) + .then((keys) => + keys.filter((key) => key.startsWith(path) && isFileKey({key, path})), + ) .then((filteredKeys) => filteredKeys.map(withoutPath)) }, clear: async () => { @@ -68,7 +92,13 @@ const mountStorage = (path: FolderName) => { } as const } -const isFileKey = ({key, path}: {key: string; path: string}) => !key.slice(path.length).includes('/') -const isFolderKey = ({key, path}: {key: string; path: string}) => !isFileKey({key, path}) +// ------- +// FILTERS +const isFileKey = ({key, path}: {key: string; path: string}) => + !key.slice(path.length).includes('/') +const isFolderKey = ({key, path}: {key: string; path: string}) => + !isFileKey({key, path}) -export const storage = mountStorage('/') +// ---- +// ROOT +export const rootStorage = mountStorage('/') diff --git a/packages/wallets/src/helpers.test.ts b/packages/wallets/src/helpers.test.ts new file mode 100644 index 0000000000..4c99fd3cf5 --- /dev/null +++ b/packages/wallets/src/helpers.test.ts @@ -0,0 +1,9 @@ +import {invalid} from './helpers' + +describe('invalid', () => { + it('should throw an error with the given message', () => { + expect(() => invalid('This is an invalid function')).toThrowError( + 'This is an invalid function', + ) + }) +}) diff --git a/packages/wallets/src/helpers.ts b/packages/wallets/src/helpers.ts new file mode 100644 index 0000000000..4a2eeb98f5 --- /dev/null +++ b/packages/wallets/src/helpers.ts @@ -0,0 +1,3 @@ +export const invalid = (message: string) => { + throw new Error(message) +} diff --git a/packages/wallets/src/index.ts b/packages/wallets/src/index.ts new file mode 100644 index 0000000000..020167c886 --- /dev/null +++ b/packages/wallets/src/index.ts @@ -0,0 +1,4 @@ +export * from './helpers' +export * from './parsers' +export * from './adapters/asyncStorage' +export * from './translators/storage.reactjs' diff --git a/packages/wallets/src/parsers.test.ts b/packages/wallets/src/parsers.test.ts new file mode 100644 index 0000000000..5e5efff41b --- /dev/null +++ b/packages/wallets/src/parsers.test.ts @@ -0,0 +1,152 @@ +import {z} from 'zod' +import { + createTypeGuardFromSchema, + isArray, + isArrayOfType, + isBoolean, + isNonNullable, + isNumber, + isRecord, + isString, + parseBoolean, + parseSafe, + parseString, +} from './parsers' + +describe('parsers', () => { + describe('isArrayOfType', () => { + it('returns true if array is empty', () => { + expect(isArrayOfType([], isString)).toEqual(true) + }) + + it('returns true if array contains only elements of given type', () => { + expect(isArrayOfType(['a', 'b', 'c'], isString)).toEqual(true) + }) + + it('returns false if array contains elements of different type', () => { + expect(isArrayOfType(['a', 'b', 1], isString)).toEqual(false) + }) + }) + + describe('isString', () => { + it('returns true if string', () => { + expect(isString('hello')).toEqual(true) + }) + + it('returns false if not string', () => { + expect(isString(123)).toEqual(false) + expect(isString({})).toEqual(false) + expect(isString([])).toEqual(false) + expect(isString(null)).toEqual(false) + expect(isString(undefined)).toEqual(false) + expect(isString(true)).toEqual(false) + }) + }) + + describe('isRecord', () => { + it('returns true if is an object', () => { + expect(isRecord({})).toEqual(true) + }) + + it('returns false if is not an object or its array or its null', () => { + expect(isRecord([])).toEqual(false) + expect(isRecord(null)).toEqual(false) + expect(isRecord(undefined)).toEqual(false) + expect(isRecord(123)).toEqual(false) + expect(isRecord('hello')).toEqual(false) + expect(isRecord(true)).toEqual(false) + }) + }) + + describe('isNonNullable', () => { + it('returns true if value is not null nor undefined', () => { + expect(isNonNullable(1)).toEqual(true) + expect(isNonNullable('hello')).toEqual(true) + expect(isNonNullable({})).toEqual(true) + expect(isNonNullable([])).toEqual(true) + expect(isNonNullable(false)).toEqual(true) + expect(isNonNullable(true)).toEqual(true) + expect(isNonNullable(0)).toEqual(true) + expect(isNonNullable('')).toEqual(true) + }) + + it('returns false if null or undefined', () => { + expect(isNonNullable(null)).toEqual(false) + expect(isNonNullable(undefined)).toEqual(false) + }) + }) + + describe('parseBoolean', () => { + it('should return a boolean if the data is a boolean', () => { + expect(parseBoolean('true')).toBe(true) + expect(parseBoolean('false')).toBe(false) + }) + it('should return undefined if the data is not a boolean', () => { + expect(parseBoolean('abc')).toBeUndefined() + expect(parseBoolean('123')).toBeUndefined() + }) + }) + + describe('parseString', () => { + it('should return a string if the data is a string', () => { + expect(parseString('"hello"')).toBe('hello') + }) + it('should return undefined if the data is not a string', () => { + expect(parseString('true')).toBeUndefined() + expect(parseString('123')).toBeUndefined() + }) + }) + + describe('parseSafe', () => { + it('should return parsed JSON if valid JSON', () => { + expect(parseSafe('{"key": "value"}')).toEqual({key: 'value'}) + }) + it('should return undefined if invalid JSON', () => { + expect(parseSafe('{key: value}')).toBeUndefined() + }) + }) + + describe('isBoolean', () => { + it('should return true if the data is a boolean', () => { + expect(isBoolean(true)).toBe(true) + expect(isBoolean(false)).toBe(true) + }) + it('should return false if the data is not a boolean', () => { + expect(isBoolean('true')).toBe(false) + }) + }) + + describe('isNumber', () => { + it('should return true if the data is a number', () => { + expect(isNumber(123)).toBe(true) + }) + it('should return false if the data is not a number', () => { + expect(isNumber('123')).toBe(false) + }) + }) + + describe('createTypeGuardFromSchema', () => { + const isPerson = createTypeGuardFromSchema( + z.object({ + name: z.string(), + age: z.number(), + }), + ) + + it('should return true if the data matches the schema', () => { + expect(isPerson({name: 'John', age: 30})).toBe(true) + }) + it('should return false if the data does not match the schema', () => { + expect(isPerson({name: 'John', age: '30'})).toBe(false) + }) + }) + + describe('isArray', () => { + it('should return true if the data is an array', () => { + expect(isArray(['a', 'b', 'c'])).toBe(true) + }) + it('should return false if the data is not an array', () => { + expect(isArray('hello')).toBe(false) + }) + }) +}) diff --git a/packages/wallets/src/parsers.ts b/packages/wallets/src/parsers.ts new file mode 100644 index 0000000000..da0bb4aa46 --- /dev/null +++ b/packages/wallets/src/parsers.ts @@ -0,0 +1,55 @@ +import {z} from 'zod' + +// ------- +// PARSERS +export const parseBoolean = (data: unknown) => { + const parsed = parseSafe(data) + return isBoolean(parsed) ? parsed : undefined +} +export const parseString = (data: unknown) => { + const parsed = parseSafe(data) + return isString(parsed) ? parsed : undefined +} + +export const parseSafe = (text: any) => { + try { + return JSON.parse(text) as unknown + } catch (_) { + return undefined + } +} + +// ----------- +// TYPE GUARDS +export const isBoolean = (data: unknown): data is boolean => + typeof data === 'boolean' + +export const isString = (data: unknown): data is string => + typeof data === 'string' + +export const isNonNullable = (data: T | null | undefined): data is T => + data !== null && data !== undefined + +export const isNumber = (data: unknown): data is number => + typeof data === 'number' && !Number.isNaN(data) && Number.isFinite(data) + +export const createTypeGuardFromSchema = + (schema: z.ZodType) => + (data: unknown): data is T => { + return schema.safeParse(data).success + } + +export const isRecord = createTypeGuardFromSchema>( + z.record(z.unknown()), +) + +export const isArray = createTypeGuardFromSchema( + z.array(z.unknown()), +) + +export function isArrayOfType( + data: unknown, + predicate: (data: unknown) => data is T, +): data is Array { + return isArray(data) && data.every(predicate) +} diff --git a/packages/wallets/src/translators/storage.reactjs.test.tsx b/packages/wallets/src/translators/storage.reactjs.test.tsx new file mode 100644 index 0000000000..042c754da1 --- /dev/null +++ b/packages/wallets/src/translators/storage.reactjs.test.tsx @@ -0,0 +1,57 @@ +import React from 'react' +import renderer from 'react-test-renderer' +import {StorageProvider, useStorage} from './storage.reactjs' // Update with the actual module path +import {rootStorage} from '../adapters/asyncStorage' + +describe('StorageProvider and useStorage Tests', () => { + test('StorageProvider provides storage context', () => { + const TestComponent = () => { + const storage = useStorage() + return
{storage ? 'Storage Available' : 'Storage Unavailable'}
+ } + + const tree = renderer.create( + + + , + ) + + const treeInstance = tree.root + const textElement = treeInstance.findByType('div') + expect(textElement.props.children).toBe('Storage Available') + }) + + test('StorageProvider provides the default rootStorage context', () => { + const TestComponent = () => { + const storage = useStorage() + return
{storage ? 'Storage Available' : 'Storage Unavailable'}
+ } + + const tree = renderer.create( + + + , + ) + + const treeInstance = tree.root + const textElement = treeInstance.findByType('div') + expect(textElement.props.children).toBe('Storage Available') + }) + + test('useStorage throws error without StorageProvider', () => { + const InvalidComponent = () => { + useStorage() + return
Invalid Component
+ } + + // Suppress console error caused by the 'invalid' function + const originalError = console.error + console.error = jest.fn() + + expect(() => renderer.create()).toThrow( + 'Missing StorageProvider', + ) + + console.error = originalError + }) +}) diff --git a/packages/wallets/src/translators/storage.reactjs.tsx b/packages/wallets/src/translators/storage.reactjs.tsx new file mode 100644 index 0000000000..fb608b2be3 --- /dev/null +++ b/packages/wallets/src/translators/storage.reactjs.tsx @@ -0,0 +1,23 @@ +import React from 'react' + +import {rootStorage} from '../adapters/asyncStorage' +import {App} from '@yoroi/types' +import {invalid} from '../helpers' + +const StorageContext = React.createContext(undefined) +export const StorageProvider = ({ + children, + storage = rootStorage, +}: { + storage?: App.Storage + children: React.ReactNode +}) => { + return ( + + {children} + + ) +} + +export const useStorage = () => + React.useContext(StorageContext) ?? invalid('Missing StorageProvider') diff --git a/packages/wallets/tsconfig.build.json b/packages/wallets/tsconfig.build.json new file mode 100644 index 0000000000..1382480b0c --- /dev/null +++ b/packages/wallets/tsconfig.build.json @@ -0,0 +1,5 @@ + +{ + "extends": "./tsconfig", + "exclude": ["example", "src/**/*.spec.ts", "src/**/*.test.ts"] +} diff --git a/packages/wallets/tsconfig.json b/packages/wallets/tsconfig.json new file mode 100644 index 0000000000..a074f3ce47 --- /dev/null +++ b/packages/wallets/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "declaration": true, + "baseUrl": "./src", + "allowUnreachableCode": false, + "allowUnusedLabels": false, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react", + "lib": ["esnext"], + "module": "esnext", + "moduleResolution": "node", + "noFallthroughCasesInSwitch": true, + "noImplicitReturns": true, + "noImplicitUseStrict": false, + "noStrictGenericChecks": false, + "noUncheckedIndexedAccess": true, + "noUnusedLocals": true, + "noUnusedParameters": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "esnext" + } +} diff --git a/yarn.lock b/yarn.lock index 378522ad5a..9263353b36 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,11 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== +"@adobe/css-tools@^4.0.1": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@adobe/css-tools/-/css-tools-4.3.1.tgz#abfccb8ca78075a2b6187345c26243c1a0842f28" + integrity sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg== + "@amplitude/ampli@^1.32.0": version "1.32.0" resolved "https://registry.yarnpkg.com/@amplitude/ampli/-/ampli-1.32.0.tgz#f0175c3f6e5423609b0dab92a748f6ceac1d9381" @@ -184,6 +189,14 @@ dependencies: "@babel/highlight" "^7.22.5" +"@babel/code-frame@^7.10.4": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.10.tgz#1c20e612b768fefa75f6e90d6ecb86329247f0a3" + integrity sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA== + dependencies: + "@babel/highlight" "^7.22.10" + chalk "^2.4.2" + "@babel/compat-data@^7.20.5", "@babel/compat-data@^7.22.5", "@babel/compat-data@^7.22.6": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.6.tgz#15606a20341de59ba02cd2fcc5086fcbe73bf544" @@ -518,6 +531,15 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.22.10": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.10.tgz#02a3f6d8c1cb4521b2fd0ab0da8f4739936137d7" + integrity sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ== + dependencies: + "@babel/helper-validator-identifier" "^7.22.5" + chalk "^2.4.2" + js-tokens "^4.0.0" + "@babel/node@^7.15.8": version "7.22.6" resolved "https://registry.yarnpkg.com/@babel/node/-/node-7.22.6.tgz#a47b4f150f06bad1808823c4519690ded6c93911" @@ -1542,6 +1564,13 @@ dependencies: regenerator-runtime "^0.13.11" +"@babel/runtime@^7.21.0", "@babel/runtime@^7.9.2": + version "7.22.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.22.10.tgz#ae3e9631fd947cb7e3610d3e9d8fef5f76696682" + integrity sha512-21t/fkKLMZI4pqP2wlmsQAWnYW1PDyKyyUV4vCi+B25ydmdaYTKXPwCj0BzSUnZf4seIiYvSA3jcZ3gdsMFkLQ== + dependencies: + regenerator-runtime "^0.14.0" + "@babel/template@^7.0.0", "@babel/template@^7.22.5", "@babel/template@^7.3.3": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" @@ -3461,6 +3490,85 @@ rxjs "6" uuid "^3.4.0" +"@lerna/child-process@7.1.5": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-7.1.5.tgz#a01e8821fb7b17a68d1c1527127543af6cf27f1b" + integrity sha512-YXmxzxXTP3u9HQpSXvK8qqoAm7VWQIFria3FVMQKkOSkWkph1TNnvt3Q1JvKT7/Jgd1HfTc3QrK09a2FND9+8A== + dependencies: + chalk "^4.1.0" + execa "^5.0.0" + strong-log-transformer "^2.1.0" + +"@lerna/create@7.1.5": + version "7.1.5" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-7.1.5.tgz#180b26f028be25b541a327429168da6c10bdb265" + integrity sha512-/CDI/cvXJbycgSDzWXzP7DBuJ10qL/uYEouFt3/mxi9+hSfM885fu6lbVPV7QOf8A0otXcTs7PN2dVyMrnWQeg== + dependencies: + "@lerna/child-process" "7.1.5" + "@npmcli/run-script" "6.0.2" + "@nx/devkit" ">=16.5.1 < 17" + "@octokit/plugin-enterprise-rest" "6.0.1" + "@octokit/rest" "19.0.11" + byte-size "8.1.1" + chalk "4.1.0" + clone-deep "4.0.1" + cmd-shim "6.0.1" + columnify "1.6.0" + conventional-changelog-core "5.0.1" + conventional-recommended-bump "7.0.1" + cosmiconfig "^8.2.0" + dedent "0.7.0" + execa "5.0.0" + fs-extra "^11.1.1" + get-stream "6.0.0" + git-url-parse "13.1.0" + glob-parent "5.1.2" + globby "11.1.0" + graceful-fs "4.2.11" + has-unicode "2.0.1" + ini "^1.3.8" + init-package-json "5.0.0" + inquirer "^8.2.4" + is-stream "2.0.0" + js-yaml "4.1.0" + libnpmpublish "7.3.0" + load-json-file "6.2.0" + lodash "^4.17.21" + make-dir "3.1.0" + minimatch "3.0.5" + multimatch "5.0.0" + node-fetch "2.6.7" + npm-package-arg "8.1.1" + npm-packlist "5.1.1" + npm-registry-fetch "^14.0.5" + npmlog "^6.0.2" + nx ">=16.5.1 < 17" + p-map "4.0.0" + p-map-series "2.1.0" + p-queue "6.6.2" + p-reduce "^2.1.0" + pacote "^15.2.0" + pify "5.0.0" + read-cmd-shim "4.0.0" + read-package-json "6.0.4" + resolve-from "5.0.0" + rimraf "^4.4.1" + semver "^7.3.4" + signal-exit "3.0.7" + slash "^3.0.0" + ssri "^9.0.1" + strong-log-transformer "2.1.0" + tar "6.1.11" + temp-dir "1.0.0" + upath "2.0.1" + uuid "^9.0.0" + validate-npm-package-license "^3.0.4" + validate-npm-package-name "5.0.0" + write-file-atomic "5.0.1" + write-pkg "4.0.0" + yargs "16.2.0" + yargs-parser "20.2.4" + "@nicolo-ribaudo/chokidar-2@2.1.8-no-fsevents.3": version "2.1.8-no-fsevents.3" resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz#323d72dd25103d0c4fbdce89dadf574a787b1f9b" @@ -3507,6 +3615,35 @@ "@gar/promisify" "^1.0.1" semver "^7.3.5" +"@npmcli/fs@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-3.1.0.tgz#233d43a25a91d68c3a863ba0da6a3f00924a173e" + integrity sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w== + dependencies: + semver "^7.3.5" + +"@npmcli/git@^4.0.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@npmcli/git/-/git-4.1.0.tgz#ab0ad3fd82bc4d8c1351b6c62f0fa56e8fe6afa6" + integrity sha512-9hwoB3gStVfa0N31ymBmrX+GuDGdVA/QWShZVqE0HK2Af+7QGGrCTbZia/SW0ImUTjTne7SP91qxDmtXvDHRPQ== + dependencies: + "@npmcli/promise-spawn" "^6.0.0" + lru-cache "^7.4.4" + npm-pick-manifest "^8.0.0" + proc-log "^3.0.0" + promise-inflight "^1.0.1" + promise-retry "^2.0.1" + semver "^7.3.5" + which "^3.0.0" + +"@npmcli/installed-package-contents@^2.0.1": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/installed-package-contents/-/installed-package-contents-2.0.2.tgz#bfd817eccd9e8df200919e73f57f9e3d9e4f9e33" + integrity sha512-xACzLPhnfD51GKvTOOuNX2/V4G4mz9/1I2MfDoye9kBM3RYe5g2YbscsaGoTlaWqkxeiapBWyseULVKpSVHtKQ== + dependencies: + npm-bundled "^3.0.0" + npm-normalize-package-bin "^3.0.0" + "@npmcli/move-file@^1.0.1": version "1.1.2" resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" @@ -3515,6 +3652,107 @@ mkdirp "^1.0.4" rimraf "^3.0.2" +"@npmcli/node-gyp@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz#101b2d0490ef1aa20ed460e4c0813f0db560545a" + integrity sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA== + +"@npmcli/promise-spawn@^6.0.0", "@npmcli/promise-spawn@^6.0.1": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/promise-spawn/-/promise-spawn-6.0.2.tgz#c8bc4fa2bd0f01cb979d8798ba038f314cfa70f2" + integrity sha512-gGq0NJkIGSwdbUt4yhdF8ZrmkGKVz9vAdVzpOfnom+V8PLSmSOVhZwbNvZZS1EYcJN5hzzKBxmmVVAInM6HQLg== + dependencies: + which "^3.0.0" + +"@npmcli/run-script@6.0.2", "@npmcli/run-script@^6.0.0": + version "6.0.2" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-6.0.2.tgz#a25452d45ee7f7fb8c16dfaf9624423c0c0eb885" + integrity sha512-NCcr1uQo1k5U+SYlnIrbAh3cxy+OQT1VtqiAbxdymSlptbzBb62AjH2xXgjNCoP073hoa1CfCAcwoZ8k96C4nA== + dependencies: + "@npmcli/node-gyp" "^3.0.0" + "@npmcli/promise-spawn" "^6.0.0" + node-gyp "^9.0.0" + read-package-json-fast "^3.0.0" + which "^3.0.0" + +"@nrwl/devkit@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-16.7.0.tgz#1e343045e6eea1645235417d47900318421fca47" + integrity sha512-QH+2513/eDsCH7eOeweJTc8msly1ozfhIGgFMgpKtzPCv7xc3CyrUMa42tFf/Ld70v6fxp7zftyTsICPA7aOvg== + dependencies: + "@nx/devkit" "16.7.0" + +"@nrwl/tao@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-16.7.0.tgz#2670a387b0dfba92d3cc7bdcbd0b1e9053631a50" + integrity sha512-bmzS1drM6qPjXoaIYM2l2xLoB2vCN4a6ZjicYrGA7vAxEDR2Q2+AqiZF5HIAAR2EeT1RrU6D6m9peU9TeBFX3A== + dependencies: + nx "16.7.0" + tslib "^2.3.0" + +"@nx/devkit@16.7.0", "@nx/devkit@>=16.5.1 < 17": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/devkit/-/devkit-16.7.0.tgz#ace0534745c54dd9099e2a0bbd1807b82b1ea1c9" + integrity sha512-XR7k9IZa+qXiyIn5NAoB4mJ+V4yl6lRICndBUat4dECgPPJp8phF/ZiO4WEBA6qC6PyjLrd8jh9zAj+/L4+14g== + dependencies: + "@nrwl/devkit" "16.7.0" + ejs "^3.1.7" + enquirer "~2.3.6" + ignore "^5.0.4" + semver "7.5.3" + tmp "~0.2.1" + tslib "^2.3.0" + +"@nx/nx-darwin-arm64@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.7.0.tgz#bd39d8d0aa1bdd7ef13b73510b8f0ab304861803" + integrity sha512-J7UYS8Rp/Eyjh5RI2l1sydDofbSd8FfXJat0r2uAfN9qxAHJD9DijC08bezSiZqsmkF9IwVkFFufDnbM1uSlxg== + +"@nx/nx-darwin-x64@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-darwin-x64/-/nx-darwin-x64-16.7.0.tgz#0a3eeb5741fcd89e0cacb4133baacfcd4a79a74a" + integrity sha512-gya03azE7iRjozZ/PTX86sw6GXzfAxIqInD47sNFzJbDP7zByMkwoPnfPxyBQDjm8e1UhrfrNgTJSoCdfZ9c5w== + +"@nx/nx-freebsd-x64@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-freebsd-x64/-/nx-freebsd-x64-16.7.0.tgz#9c98e7eea4aa83da089227ec899da531a64deed0" + integrity sha512-DC/Oi4E4aIxkN8HHcSWxoDr+MoamL6LKLWHx/bauHCoDj8NomSLDTLauffd3kFYicMqv8k1hiWB2WAsXAVALjQ== + +"@nx/nx-linux-arm-gnueabihf@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.7.0.tgz#8e1eb2ef18dfe5749b86b723740b77a5020fa1fd" + integrity sha512-Jya1kiY4+XPdcWdiydsIY1PgCF2j57i//oHY1D1q/FrMmGeXdEeWFSStj47fLew5wfbdHw42lQNPeFMtSYzAyA== + +"@nx/nx-linux-arm64-gnu@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.7.0.tgz#96cf9b5e21b96218d9be3385a0504d727b0e1a89" + integrity sha512-RLRnytYuqjcb6+tq86og8KYHtb4/lRpzujXeTckfoe0nA/z+TkZMIc+LSGbFlIa6Voar1O6+UAw5Fc9/EC909A== + +"@nx/nx-linux-arm64-musl@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.7.0.tgz#aba829d2bdb4ab412466088c1bf667ee38172ac9" + integrity sha512-ZPF+Q0wX2CE81/3ynZfGPPmvMd4ABEwfJ31/7bgingcGSUJ20aIBFbZLdVjX4zO5plofTRujrggIi2SUHBoHzg== + +"@nx/nx-linux-x64-gnu@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.7.0.tgz#baaeb99b09c941348bc0c8b0a6e729fce5f7a2ff" + integrity sha512-HvBZ8DXJ9vwQsOY4F5Vs5c/zgj+Mn/iwY98jXOa8NY4OsIDQQfOtwbiuCruMWD0S34r+yv8PX09MoVh0Qi4+Jg== + +"@nx/nx-linux-x64-musl@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.7.0.tgz#8094105c67bd224edd3f7558e6ad39e2dfe55227" + integrity sha512-hqKX6XGrITfY/yONaWWGHY/DRv1evDLOUluBIGhcGZNKiQAPctE5f3Q29InfUakZV7ct4jYe6M3Rn+gq34QwyA== + +"@nx/nx-win32-arm64-msvc@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.7.0.tgz#607e1de32661242358bc90a873d4546d6f338f68" + integrity sha512-JmLH63ntsunlxveXTU8f5jMKZGNPXU++I8NKd+A+Texb5h90zoc7GDvyVImFTXzx0duU1CGjreQRiBqiOcQ4Ew== + +"@nx/nx-win32-x64-msvc@16.7.0": + version "16.7.0" + resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.7.0.tgz#67bc2d079792417ac6681608b59b13d7bc1eab1c" + integrity sha512-R8erkoQ/+6HOCC9JTd3wMIa/VhfCR1Lwzws0mhSe0i5IU1mYdiZi67K8DchSXuLUheeEAZOQB4jW0c6P2jMgWA== + "@oclif/color@^0.1.0": version "0.1.2" resolved "https://registry.yarnpkg.com/@oclif/color/-/color-0.1.2.tgz#28b07e2850d9ce814d0b587ce3403b7ad8f7d987" @@ -3738,6 +3976,11 @@ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-18.0.0.tgz#f43d765b3c7533fd6fb88f3f25df079c24fccf69" integrity sha512-V8GImKs3TeQRxRtXFpG2wl19V7444NIOTDF24AWuIbmNaNYOQMWRbjcGDXV5B+0n887fgDcuMNOmlul+k+oJtw== +"@octokit/plugin-enterprise-rest@6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" + integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== + "@octokit/plugin-paginate-rest@^6.1.2": version "6.1.2" resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-6.1.2.tgz#f86456a7a1fe9e58fec6385a85cf1b34072341f8" @@ -3808,6 +4051,14 @@ dependencies: "@octokit/openapi-types" "^18.0.0" +"@parcel/watcher@2.0.4": + version "2.0.4" + resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.4.tgz#f300fef4cc38008ff4b8c29d92588eced3ce014b" + integrity sha512-cTDi+FUDBIUOBKEtj+nhiJ71AZVlkAsQFuGQTun5tV9mwQBQgZvhCzG+URPQc8myeN32yRVZEfVAPCs1RW+Jvg== + dependencies: + node-addon-api "^3.2.1" + node-gyp-build "^4.3.0" + "@phenomnomnominal/tsquery@^3.0.0": version "3.0.0" resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-3.0.0.tgz#6f2f4dbf6304ff52b12cc7a5b979f20c3794a22a" @@ -3867,6 +4118,13 @@ dependencies: merge-options "^3.0.4" +"@react-native-async-storage/async-storage@^1.19.2": + version "1.19.2" + resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.19.2.tgz#44f0af5927a04436b3f67aae67f028b888ff452c" + integrity sha512-7jTQKbT3BdhFHQMnfElsLeeyVqNICv72lPKbeNHnNgLP9eH3+Yk1GFMWWb7A8qRMYianSmwmx1cYofNe9H9hLQ== + dependencies: + merge-options "^3.0.4" + "@react-native-community/cli-clean@^10.1.1": version "10.1.1" resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-10.1.1.tgz#4c73ce93a63a24d70c0089d4025daac8184ff504" @@ -4575,6 +4833,35 @@ resolved "https://registry.yarnpkg.com/@sideway/pinpoint/-/pinpoint-2.0.0.tgz#cff8ffadc372ad29fd3f78277aeb29e632cc70df" integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== +"@sigstore/bundle@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@sigstore/bundle/-/bundle-1.1.0.tgz#17f8d813b09348b16eeed66a8cf1c3d6bd3d04f1" + integrity sha512-PFutXEy0SmQxYI4texPw3dd2KewuNqv7OuK1ZFtY2fM754yhvG2KdgwIhRnoEE2uHdtdGNQ8s0lb94dW9sELog== + dependencies: + "@sigstore/protobuf-specs" "^0.2.0" + +"@sigstore/protobuf-specs@^0.2.0": + version "0.2.0" + resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.2.0.tgz#5801b2a4d10afe1577be6133be6b132b5677c18c" + integrity sha512-8ZhZKAVfXjIspDWwm3D3Kvj0ddbJ0HqDZ/pOs5cx88HpT8mVsotFrg7H1UMnXOuDHz6Zykwxn4mxG3QLuN+RUg== + +"@sigstore/sign@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@sigstore/sign/-/sign-1.0.0.tgz#6b08ebc2f6c92aa5acb07a49784cb6738796f7b4" + integrity sha512-INxFVNQteLtcfGmcoldzV6Je0sbbfh9I16DM4yJPw3j5+TFP8X6uIiA18mvpEa9yyeycAKgPmOA3X9hVdVTPUA== + dependencies: + "@sigstore/bundle" "^1.1.0" + "@sigstore/protobuf-specs" "^0.2.0" + make-fetch-happen "^11.0.1" + +"@sigstore/tuf@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-1.0.3.tgz#2a65986772ede996485728f027b0514c0b70b160" + integrity sha512-2bRovzs0nJZFlCN3rXirE4gwxCn97JNjMmwpecqlbgV9WcxX7WRuIrgzx/X7Ib7MYRbyUTpBYE0s2x6AmZXnlg== + dependencies: + "@sigstore/protobuf-specs" "^0.2.0" + tuf-js "^1.1.7" + "@sinclair/typebox@^0.24.1": version "0.24.51" resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f" @@ -5164,6 +5451,34 @@ dependencies: defer-to-connect "^2.0.1" +"@testing-library/dom@^9.0.0": + version "9.3.1" + resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-9.3.1.tgz#8094f560e9389fb973fe957af41bf766937a9ee9" + integrity sha512-0DGPd9AR3+iDTjGoMpxIkAsUihHZ3Ai6CneU6bRRrffXMgzCdlNk43jTrD2/5LT6CBb3MWTP8v510JzYtahD2w== + dependencies: + "@babel/code-frame" "^7.10.4" + "@babel/runtime" "^7.12.5" + "@types/aria-query" "^5.0.1" + aria-query "5.1.3" + chalk "^4.1.0" + dom-accessibility-api "^0.5.9" + lz-string "^1.5.0" + pretty-format "^27.0.2" + +"@testing-library/jest-dom@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@testing-library/jest-dom/-/jest-dom-6.0.0.tgz#d2ba5a3fd13724d5966b3f8cd24d2cedcab4fa76" + integrity sha512-Ye2R3+/oM27jir8CzYPmuWdavTaKwNZcu0d22L9pO/vnOYE0wmrtpw79TQJa8H6gV8/i7yd+pLaqeLlA0rTMfg== + dependencies: + "@adobe/css-tools" "^4.0.1" + "@babel/runtime" "^7.9.2" + aria-query "^5.0.0" + chalk "^3.0.0" + css.escape "^1.5.1" + dom-accessibility-api "^0.5.6" + lodash "^4.17.15" + redent "^3.0.0" + "@testing-library/react-hooks@^8.0.1": version "8.0.1" resolved "https://registry.yarnpkg.com/@testing-library/react-hooks/-/react-hooks-8.0.1.tgz#0924bbd5b55e0c0c0502d1754657ada66947ca12" @@ -5179,6 +5494,20 @@ dependencies: pretty-format "^27.0.0" +"@testing-library/react@^14.0.0": + version "14.0.0" + resolved "https://registry.yarnpkg.com/@testing-library/react/-/react-14.0.0.tgz#59030392a6792450b9ab8e67aea5f3cc18d6347c" + integrity sha512-S04gSNJbYE30TlIMLTzv6QCTzt9AqIF5y6s6SzVFILNcNvbV/jU96GeiTPillGQo+Ny64M/5PV7klNYYgv5Dfg== + dependencies: + "@babel/runtime" "^7.12.5" + "@testing-library/dom" "^9.0.0" + "@types/react-dom" "^18.0.0" + +"@tootallnate/once@2": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" + integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== + "@tsconfig/node10@^1.0.7": version "1.0.9" resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.9.tgz#df4907fc07a886922637b15e02d4cebc4c0021b2" @@ -5204,7 +5533,20 @@ resolved "https://registry.yarnpkg.com/@tsconfig/react-native/-/react-native-2.0.3.tgz#79ad8efc6d3729152da6cb23725b6c364a7349b2" integrity sha512-jE58snEKBd9DXfyR4+ssZmYJ/W2mOSnNrvljR0aLyQJL9JKX6vlWELHkRjb3HBbcM9Uy0hZGijXbqEAjOERW2A== -"@types/aria-query@^5.0.0": +"@tufjs/canonical-json@1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz#eade9fd1f537993bc1f0949f3aea276ecc4fab31" + integrity sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ== + +"@tufjs/models@1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-1.0.4.tgz#5a689630f6b9dbda338d4b208019336562f176ef" + integrity sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A== + dependencies: + "@tufjs/canonical-json" "1.0.0" + minimatch "^9.0.0" + +"@types/aria-query@^5.0.0", "@types/aria-query@^5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-5.0.1.tgz#3286741fb8f1e1580ac28784add4c7a1d49bdfbc" integrity sha512-XTIieEY+gvJ39ChLcB4If5zHtPxt3Syj5rgZR+e1ctpmK8NjPf0zFqsz4JpLJT0xla9GFDKjy8Cpu331nrmE1Q== @@ -5465,6 +5807,11 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== +"@types/minimatch@^3.0.3": + version "3.0.5" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" + integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== + "@types/minimist@^1.2.0", "@types/minimist@^1.2.2": version "1.2.2" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" @@ -5555,6 +5902,13 @@ resolved "https://registry.yarnpkg.com/@types/qs/-/qs-6.9.7.tgz#63bb7d067db107cc1e457c303bc25d511febf6cb" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== +"@types/react-dom@^18.0.0": + version "18.2.7" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.7.tgz#67222a08c0a6ae0a0da33c3532348277c70abb63" + integrity sha512-GRaAEriuT4zp9N4p1i8BDBYmEyfo+xQ3yHjJU4eiK5NDa1RmUZG+unZABUTK4/Ox/M+GaHwb6Ow8rUITrtjszA== + dependencies: + "@types/react" "*" + "@types/react-native-background-timer@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@types/react-native-background-timer/-/react-native-background-timer-2.0.0.tgz#c44c57f8fbca9d9d5521fdd72a8f55232b79381e" @@ -6356,7 +6710,27 @@ resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== -JSONStream@^1.0.4: +"@yarnpkg/lockfile@^1.1.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" + integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== + +"@yarnpkg/parsers@3.0.0-rc.46": + version "3.0.0-rc.46" + resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.46.tgz#03f8363111efc0ea670e53b0282cd3ef62de4e01" + integrity sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q== + dependencies: + js-yaml "^3.10.0" + tslib "^2.4.0" + +"@zkochan/js-yaml@0.0.6": + version "0.0.6" + resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826" + integrity sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg== + dependencies: + argparse "^2.0.1" + +JSONStream@^1.0.4, JSONStream@^1.3.5: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== @@ -6364,6 +6738,11 @@ JSONStream@^1.0.4: jsonparse "^1.2.0" through ">=2.2.7 <3" +abbrev@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" + integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" @@ -6426,7 +6805,7 @@ add@2.0.6: resolved "https://registry.yarnpkg.com/add/-/add-2.0.6.tgz#248f0a9f6e5a528ef2295dbeec30532130ae2235" integrity sha512-j5QzrmsokwWWp6kUcJQySpbG+xfOBqqKnup3OIk1pz+kB/80SLorZ9V8zHFLO92Lcd+hbvq8bT+zOGoPkmBV0Q== -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== @@ -6440,6 +6819,13 @@ agent-base@^7.0.1, agent-base@^7.0.2, agent-base@^7.1.0: dependencies: debug "^4.3.4" +agentkeepalive@^4.2.1: + version "4.5.0" + resolved "https://registry.yarnpkg.com/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" @@ -6526,6 +6912,11 @@ ansi-colors@4.1.1: resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== +ansi-colors@^4.1.1: + version "4.1.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" + integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== + ansi-escapes@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b" @@ -6706,6 +7097,14 @@ are-we-there-yet@^2.0.0: delegates "^1.0.0" readable-stream "^3.6.0" +are-we-there-yet@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/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" + arg@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.0.tgz#583c518199419e0037abb74062c37f8519e575f0" @@ -6728,7 +7127,14 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -aria-query@^5.2.1: +aria-query@5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" + integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ== + dependencies: + deep-equal "^2.0.5" + +aria-query@^5.0.0, aria-query@^5.2.1: version "5.3.0" resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A== @@ -6758,6 +7164,11 @@ array-buffer-byte-length@^1.0.0: call-bind "^1.0.2" is-array-buffer "^3.0.1" +array-differ@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" + integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== + array-find-index@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" @@ -6864,6 +7275,11 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA== +arrify@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" + integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== + asap@~2.0.3, asap@~2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46" @@ -6978,7 +7394,7 @@ available-typed-arrays@^1.0.5: resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== -axios@1.4.0: +axios@1.4.0, axios@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA== @@ -7880,6 +8296,13 @@ builtins@^1.0.3: resolved "https://registry.yarnpkg.com/builtins/-/builtins-1.0.3.tgz#cb94faeb61c8696451db36534e1422f94f0aee88" integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ== +builtins@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/builtins/-/builtins-5.0.1.tgz#87f6db9ab0458be728564fa81d876d8d74552fa9" + integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== + dependencies: + semver "^7.0.0" + bundle-name@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bundle-name/-/bundle-name-3.0.0.tgz#ba59bcc9ac785fb67ccdbf104a2bf60c099f0e1a" @@ -7914,6 +8337,11 @@ byte-length@^1.0.2: resolved "https://registry.yarnpkg.com/byte-length/-/byte-length-1.0.2.tgz#ba5a5909240b0121c079b7f7b15248d6f08223cc" integrity sha512-ovBpjmsgd/teRmgcPh23d4gJvxDoXtAzEL9xTfMU8Yc2kqCDb7L9jAG0XHl1nzuGl+h3ebCIF1i62UFyA9V/2Q== +byte-size@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-8.1.1.tgz#3424608c62d59de5bfda05d31e0313c6174842ae" + integrity sha512-tUkzZWK0M/qdoLEqikxBWe4kumyuwjl3HO6zHTr4yEI23EojPtLYXdG1+AQY7MN0cGyNDvEaJ8wiYQm6P2bPxg== + bytes@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -7987,6 +8415,24 @@ cacache@^15.3.0: tar "^6.0.2" unique-filename "^1.1.1" +cacache@^17.0.0: + version "17.1.4" + resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.1.4.tgz#b3ff381580b47e85c6e64f801101508e26604b35" + integrity sha512-/aJwG2l3ZMJ1xNAnqbMpA40of9dj/pIH3QfiuQSqjfPJF747VR0J/bHn+/KdNnHKc6XQcWt/AfRSBft82W1d2A== + dependencies: + "@npmcli/fs" "^3.1.0" + fs-minipass "^3.0.0" + glob "^10.2.2" + lru-cache "^7.7.1" + minipass "^7.0.3" + minipass-collect "^1.0.2" + minipass-flush "^1.0.5" + minipass-pipeline "^1.2.4" + p-map "^4.0.0" + ssri "^10.0.0" + tar "^6.1.11" + unique-filename "^3.0.0" + cache-base@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" @@ -8199,6 +8645,14 @@ chai@^4.3.7: pathval "^1.1.1" type-detect "^4.0.5" +chalk@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.0.tgz#4e14870a618d9e2edd97dd8345fd9d9dc315646a" + integrity sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + chalk@5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" @@ -8274,7 +8728,17 @@ child-process-promise@^2.2.0: node-version "^1.0.0" promise-polyfill "^6.0.1" -chokidar@3.5.3, chokidar@^3.0.0, chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1: +chokidar-cli@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/chokidar-cli/-/chokidar-cli-3.0.0.tgz#29283666063b9e167559d30f247ff8fc48794eb7" + integrity sha512-xVW+Qeh7z15uZRxHOkP93Ux8A0xbPzwK4GaqD8dQOYc34TlkqUhVSS59fK36DOp5WdJlrRzlYSy02Ht99FjZqQ== + dependencies: + chokidar "^3.5.2" + lodash.debounce "^4.0.8" + lodash.throttle "^4.1.1" + yargs "^13.3.0" + +chokidar@3.5.3, chokidar@^3.0.0, chokidar@^3.4.0, chokidar@^3.4.1, chokidar@^3.4.2, chokidar@^3.5.1, chokidar@^3.5.2: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -8338,7 +8802,7 @@ ci-info@^2.0.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== -ci-info@^3.2.0, ci-info@^3.3.0: +ci-info@^3.2.0, ci-info@^3.3.0, ci-info@^3.6.1: version "3.8.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== @@ -8395,6 +8859,13 @@ cli-boxes@^3.0.0: resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-3.0.0.tgz#71a10c716feeba005e4504f36329ef0b17cf3145" integrity sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g== +cli-cursor@3.1.0, cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + cli-cursor@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" @@ -8402,13 +8873,6 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" -cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - cli-cursor@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-4.0.0.tgz#3cecfe3734bf4fe02a8361cbdc0f6fe28c6a57ea" @@ -8423,6 +8887,11 @@ cli-progress@^3.4.0: dependencies: string-width "^4.2.3" +cli-spinners@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" + integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== + cli-spinners@^2.0.0, cli-spinners@^2.1.0, cli-spinners@^2.2.0, cli-spinners@^2.5.0, cli-spinners@^2.6.1: version "2.9.0" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.9.0.tgz#5881d0ad96381e117bbe07ad91f2008fe6ffd8db" @@ -8503,6 +8972,15 @@ client-oauth2@^4.3.3: popsicle "^12.0.5" safe-buffer "^5.2.0" +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + cliui@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" @@ -8530,7 +9008,7 @@ cliui@^8.0.1: strip-ansi "^6.0.1" wrap-ansi "^7.0.0" -clone-deep@^4.0.1: +clone-deep@4.0.1, clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== @@ -8556,6 +9034,11 @@ clone@^2.1.2: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== +cmd-shim@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-6.0.1.tgz#a65878080548e1dca760b3aea1e21ed05194da9d" + integrity sha512-S9iI9y0nKR4hwEQsVWpyxld/6kRfGepGfzff83FcaiEBpmvlbA2nnGe7Cylgrx2f/p1P5S5wpRm9oL8z1PbS3Q== + co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -8606,7 +9089,7 @@ color-string@^1.6.0, color-string@^1.9.0: color-name "^1.0.0" simple-swizzle "^0.2.2" -color-support@^1.1.2: +color-support@^1.1.2, color-support@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== @@ -8637,6 +9120,14 @@ colorette@^2.0.19: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== +columnify@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.6.0.tgz#6989531713c9008bb29735e61e37acf5bd553cf3" + integrity sha512-lomjuFZKfM6MSAnV9aCZC9sc0qGbmZdfygNv+nCpqVkSKdCxCklLtd16O0EILGkImHw9ZpHkAnHaB+8Zxq5W6Q== + dependencies: + strip-ansi "^6.0.1" + wcwidth "^1.0.0" + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -8804,6 +9295,21 @@ concordance@^5.0.4: semver "^7.3.2" well-known-symbols "^2.0.0" +concurrently@^8.2.0: + version "8.2.0" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-8.2.0.tgz#cdc9f621a4d913366600355d68254df2c5e782f3" + integrity sha512-nnLMxO2LU492mTUj9qX/az/lESonSZu81UznYDoXtz1IQf996ixVqPAgHXwvHiHCAef/7S8HIK+fTFK7Ifk8YA== + dependencies: + chalk "^4.1.2" + date-fns "^2.30.0" + lodash "^4.17.21" + rxjs "^7.8.1" + shell-quote "^1.8.1" + spawn-command "0.0.2" + supports-color "^8.1.1" + tree-kill "^1.2.2" + yargs "^17.7.2" + conf@^6.2.0: version "6.2.4" resolved "https://registry.yarnpkg.com/conf/-/conf-6.2.4.tgz#49d23c4e21ef2ac2860f7b5ed25b7b7e484f769f" @@ -8876,6 +9382,13 @@ content-type@^1.0.4, content-type@~1.0.4, content-type@~1.0.5: resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.5.tgz#8b773162656d1d1086784c8f23a54ce6d73d7918" integrity sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA== +conventional-changelog-angular@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-6.0.0.tgz#a9a9494c28b7165889144fd5b91573c4aa9ca541" + integrity sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg== + dependencies: + compare-func "^2.0.0" + conventional-changelog-angular@^5.0.11, conventional-changelog-angular@^5.0.12: version "5.0.13" resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.13.tgz#896885d63b914a70d4934b59d2fe7bde1832b28c" @@ -8916,6 +9429,23 @@ conventional-changelog-conventionalcommits@^5.0.0: lodash "^4.17.15" q "^1.5.1" +conventional-changelog-core@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-5.0.1.tgz#3c331b155d5b9850f47b4760aeddfc983a92ad49" + integrity sha512-Rvi5pH+LvgsqGwZPZ3Cq/tz4ty7mjijhr3qR4m9IBXNbxGGYgTVVO+duXzz9aArmHxFtwZ+LRkrNIMDQzgoY4A== + dependencies: + add-stream "^1.0.0" + conventional-changelog-writer "^6.0.0" + conventional-commits-parser "^4.0.0" + dateformat "^3.0.3" + get-pkg-repo "^4.2.1" + git-raw-commits "^3.0.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^5.0.0" + normalize-package-data "^3.0.3" + read-pkg "^3.0.0" + read-pkg-up "^3.0.0" + conventional-changelog-core@^4.2.1: version "4.2.4" resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz#e50d047e8ebacf63fac3dc67bf918177001e1e9f" @@ -8977,6 +9507,11 @@ conventional-changelog-preset-loader@^2.3.4: resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.3.4.tgz#14a855abbffd59027fd602581f1f34d9862ea44c" integrity sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g== +conventional-changelog-preset-loader@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-3.0.0.tgz#14975ef759d22515d6eabae6396c2ae721d4c105" + integrity sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA== + conventional-changelog-writer@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-5.0.1.tgz#e0757072f045fe03d91da6343c843029e702f359" @@ -8992,6 +9527,19 @@ conventional-changelog-writer@^5.0.0: split "^1.0.0" through2 "^4.0.0" +conventional-changelog-writer@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-6.0.1.tgz#d8d3bb5e1f6230caed969dcc762b1c368a8f7b01" + integrity sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ== + dependencies: + conventional-commits-filter "^3.0.0" + dateformat "^3.0.3" + handlebars "^4.7.7" + json-stringify-safe "^5.0.1" + meow "^8.1.2" + semver "^7.0.0" + split "^1.0.1" + conventional-changelog@^3.1.25: version "3.1.25" resolved "https://registry.yarnpkg.com/conventional-changelog/-/conventional-changelog-3.1.25.tgz#3e227a37d15684f5aa1fb52222a6e9e2536ccaff" @@ -9017,6 +9565,14 @@ conventional-commits-filter@^2.0.7: lodash.ismatch "^4.4.0" modify-values "^1.0.0" +conventional-commits-filter@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-3.0.0.tgz#bf1113266151dd64c49cd269e3eb7d71d7015ee2" + integrity sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q== + dependencies: + lodash.ismatch "^4.4.0" + modify-values "^1.0.1" + conventional-commits-parser@^3.2.0, conventional-commits-parser@^3.2.2: version "3.2.4" resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.2.4.tgz#a7d3b77758a202a9b2293d2112a8d8052c740972" @@ -9029,6 +9585,29 @@ conventional-commits-parser@^3.2.0, conventional-commits-parser@^3.2.2: split2 "^3.0.0" through2 "^4.0.0" +conventional-commits-parser@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz#02ae1178a381304839bce7cea9da5f1b549ae505" + integrity sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg== + dependencies: + JSONStream "^1.3.5" + is-text-path "^1.0.1" + meow "^8.1.2" + split2 "^3.2.2" + +conventional-recommended-bump@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-7.0.1.tgz#ec01f6c7f5d0e2491c2d89488b0d757393392424" + integrity sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA== + dependencies: + concat-stream "^2.0.0" + conventional-changelog-preset-loader "^3.0.0" + conventional-commits-filter "^3.0.0" + conventional-commits-parser "^4.0.0" + git-raw-commits "^3.0.0" + git-semver-tags "^5.0.0" + meow "^8.1.2" + conventional-recommended-bump@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-6.1.0.tgz#cfa623285d1de554012f2ffde70d9c8a22231f55" @@ -9168,7 +9747,7 @@ cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: path-type "^4.0.0" yaml "^1.10.0" -cosmiconfig@^8.0.0: +cosmiconfig@^8.0.0, cosmiconfig@^8.2.0: version "8.2.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== @@ -9372,6 +9951,11 @@ css-what@^6.1.0: resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== +css.escape@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" + integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg== + csstype@^2.5.7: version "2.6.21" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.21.tgz#2efb85b7cc55c80017c66a5ad7cbd931fda3a90e" @@ -9422,6 +10006,13 @@ data-uri-to-buffer@^5.0.1: resolved "https://registry.yarnpkg.com/data-uri-to-buffer/-/data-uri-to-buffer-5.0.1.tgz#db89a9e279c2ffe74f50637a59a32fb23b3e4d7c" integrity sha512-a9l6T1qqDogvvnw0nKlfZzqsyikEBZBClF39V3TFoKhDtGBqHu2HkuomJc02j5zft8zrUaXEuoicLeW54RkzPg== +date-fns@^2.30.0: + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" + date-time@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/date-time/-/date-time-3.1.0.tgz#0d1e934d170579f481ed8df1e2b8ff70ee845e1e" @@ -9429,7 +10020,7 @@ date-time@^3.1.0: dependencies: time-zone "^1.0.0" -dateformat@^3.0.0: +dateformat@^3.0.0, dateformat@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== @@ -9453,7 +10044,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -9509,7 +10100,7 @@ decompress-response@^6.0.0: dependencies: mimic-response "^3.1.0" -dedent@^0.7.0: +dedent@0.7.0, dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" integrity sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA== @@ -9955,6 +10546,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +dom-accessibility-api@^0.5.6, dom-accessibility-api@^0.5.9: + version "0.5.16" + resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.16.tgz#5a7429e6066eb3664d911e33fb0e45de8eb08453" + integrity sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg== + dom-helpers@^5.0.1: version "5.2.1" resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-5.2.1.tgz#d9400536b2bf8225ad98fe052e029451ac40e902" @@ -10035,6 +10631,11 @@ dotenv@^8.0.0, dotenv@^8.2.0: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== +dotenv@~16.3.1: + version "16.3.1" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" + integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== + dtrace-provider@~0.8: version "0.8.8" resolved "https://registry.yarnpkg.com/dtrace-provider/-/dtrace-provider-0.8.8.tgz#2996d5490c37e1347be263b423ed7b297fb0d97e" @@ -10049,6 +10650,11 @@ duplexer2@^0.1.2: dependencies: readable-stream "^2.0.2" +duplexer@^0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" + integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== + duplexify@^3.4.2, duplexify@^3.6.0: version "3.7.1" resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" @@ -10091,7 +10697,7 @@ ee-first@1.1.1: resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== -ejs@^3.0.1: +ejs@^3.0.1, ejs@^3.1.7: version "3.1.9" resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.9.tgz#03c9e8777fe12686a9effcef22303ca3d8eeb361" integrity sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ== @@ -10131,6 +10737,11 @@ emoji-regex@10.2.1, emoji-regex@^10.2.1: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.2.1.tgz#a41c330d957191efd3d9dfe6e1e8e1e9ab048b3f" integrity sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA== +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -10165,6 +10776,13 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== +encoding@^0.1.13: + version "0.1.13" + resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" + integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== + dependencies: + iconv-lite "^0.6.2" + end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" @@ -10189,6 +10807,13 @@ enhanced-resolve@^4.5.0: memory-fs "^0.5.0" tapable "^1.0.0" +enquirer@~2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + entities@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/entities/-/entities-2.2.0.tgz#098dc90ebb83d8dffa089d55256b351d34c4da55" @@ -10214,6 +10839,11 @@ env-paths@^2.2.0: resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== +envinfo@7.8.1: + version "7.8.1" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475" + integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + envinfo@^7.7.2: version "7.10.0" resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.10.0.tgz#55146e3909cc5fe63c22da63fb15b05aeac35b13" @@ -10224,6 +10854,11 @@ eol@^0.9.1: resolved "https://registry.yarnpkg.com/eol/-/eol-0.9.1.tgz#f701912f504074be35c6117a5c4ade49cd547acd" integrity sha512-Ds/TEoZjwggRoz/Q2O7SE3i4Jm66mqTDfmdHdq/7DKVk3bro9Q8h6WdXKdPqFLMoqxrDK5SVRzHVPOS6uuGtrg== +err-code@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-2.0.3.tgz#23c2f3b756ffdfc608d30e27c9a941024807e7f9" + integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== + errno@^0.1.3, errno@~0.1.7: version "0.1.8" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" @@ -10879,6 +11514,11 @@ event-target-shim@^5.0.0, event-target-shim@^5.0.1: resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== +eventemitter3@^4.0.4: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + events@^3.0.0, events@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -10897,6 +11537,21 @@ exec-async@^2.2.0: resolved "https://registry.yarnpkg.com/exec-async/-/exec-async-2.2.0.tgz#c7c5ad2eef3478d38390c6dd3acfe8af0efc8301" integrity sha512-87OpwcEiMia/DeiKFzaQNBNFeN3XkkpYIh9FyOqq5mS2oKv3CBE67PXoEKcr6nodWdXNogTiQ0jE2NGuoffXPw== +execa@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-5.0.0.tgz#4029b0007998a841fbd1032e5f4de86a3c1e3376" + integrity sha512-ov6w/2LCiuyO4RLYGdpFGjkcs0wMTgGE8PrkTHikeUy5iJekXyPIKUjifk5CsE0pt7sMCrMZ3YNqoCj6idQOnQ== + dependencies: + cross-spawn "^7.0.3" + get-stream "^6.0.0" + human-signals "^2.1.0" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.1" + onetime "^5.1.2" + signal-exit "^3.0.3" + strip-final-newline "^2.0.0" + execa@7.1.1, execa@^7.0.0, execa@^7.1.1: version "7.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-7.1.1.tgz#3eb3c83d239488e7b409d48e8813b76bb55c9c43" @@ -11161,6 +11816,11 @@ expo-status-bar@~1.4.4: pretty-format "^26.5.2" uuid "^3.4.0" +exponential-backoff@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" + integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== + express@^4.17.1: version "4.18.2" resolved "https://registry.yarnpkg.com/express/-/express-4.18.2.tgz#3fabe08296e930c796c19e3c516979386ba9fd59" @@ -11322,6 +11982,17 @@ fast-glob@3, fast-glob@^3.0.3, fast-glob@^3.2.11, fast-glob@^3.2.5, fast-glob@^3 merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0, fast-json-stable-stringify@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -11403,6 +12074,13 @@ figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" integrity sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== +figures@3.2.0, figures@^3.0.0, figures@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + figures@5.0.0, figures@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/figures/-/figures-5.0.0.tgz#126cd055052dea699f8a54e8c9450e6ecfc44d5f" @@ -11411,13 +12089,6 @@ figures@5.0.0, figures@^5.0.0: escape-string-regexp "^5.0.0" is-unicode-supported "^1.2.0" -figures@^3.0.0, figures@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -11769,7 +12440,7 @@ fs-extra@^10.0.0, fs-extra@^10.1.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^11.0.0, fs-extra@^11.1.1: +fs-extra@^11.0.0, fs-extra@^11.1.0, fs-extra@^11.1.1: version "11.1.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== @@ -11804,6 +12475,13 @@ fs-minipass@^2.0.0: dependencies: minipass "^3.0.0" +fs-minipass@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-3.0.3.tgz#79a85981c4dc120065e96f62086bf6f9dc26cc54" + integrity sha512-XUBA9XClHbnJWSfBzjkm6RvPsyg3sryZt06BEQoXcF7EK/xpGaQYJgQKDJSUH5SGZ76Y7pFx1QBnXz09rU5Fbw== + dependencies: + minipass "^7.0.3" + fs-monkey@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/fs-monkey/-/fs-monkey-1.0.4.tgz#ee8c1b53d3fe8bb7e5d2c5c5dfc0168afdd2f747" @@ -11882,6 +12560,20 @@ gauge@^3.0.0: strip-ansi "^6.0.1" wide-align "^1.1.2" +gauge@^4.0.3: + version "4.0.4" + resolved "https://registry.yarnpkg.com/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" + gaze@^1.1.2: version "1.1.3" resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" @@ -11919,7 +12611,7 @@ get-package-type@^0.1.0: resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== -get-pkg-repo@^4.0.0: +get-pkg-repo@^4.0.0, get-pkg-repo@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz#75973e1c8050c73f48190c52047c4cee3acbf385" integrity sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA== @@ -11929,16 +12621,16 @@ get-pkg-repo@^4.0.0: through2 "^2.0.0" yargs "^16.2.0" +get-port@5.1.1, get-port@^5.0.0: + version "5.1.1" + resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" + integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== + get-port@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== -get-port@^5.0.0: - version "5.1.1" - resolved "https://registry.yarnpkg.com/get-port/-/get-port-5.1.1.tgz#0469ed07563479de6efb986baf053dcd7d4e3193" - integrity sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ== - get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" @@ -11949,6 +12641,11 @@ get-stdin@^9.0.0: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-9.0.0.tgz#3983ff82e03d56f1b2ea0d3e60325f39d703a575" integrity sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA== +get-stream@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.0.tgz#3e0012cb6827319da2706e601a1583e8629a6718" + integrity sha512-A1B3Bh1UmL0bidM/YX2NsCOTnGJePL9rO/M+Mw3m9f2gUpfokS0hi5Eah0WSUEWZdZhIZtMjkIYS7mDfOqNHbg== + get-stream@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -12012,6 +12709,15 @@ git-raw-commits@^2.0.11, git-raw-commits@^2.0.8: split2 "^3.0.0" through2 "^4.0.0" +git-raw-commits@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-3.0.0.tgz#5432f053a9744f67e8db03dbc48add81252cfdeb" + integrity sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw== + dependencies: + dargs "^7.0.0" + meow "^8.1.2" + split2 "^3.2.2" + git-remote-origin-url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz#5282659dae2107145a11126112ad3216ec5fa65f" @@ -12028,6 +12734,14 @@ git-semver-tags@^4.1.1: meow "^8.0.0" semver "^6.0.0" +git-semver-tags@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-5.0.1.tgz#db748aa0e43d313bf38dcd68624d8443234e1c15" + integrity sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA== + dependencies: + meow "^8.1.2" + semver "^7.0.0" + git-up@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/git-up/-/git-up-7.0.0.tgz#bace30786e36f56ea341b6f69adfd83286337467" @@ -12055,6 +12769,13 @@ github-from-package@0.0.0: resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw== +glob-parent@5.1.2, glob-parent@^5.1.2, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + glob-parent@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" @@ -12063,13 +12784,6 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" @@ -12077,7 +12791,7 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob@10.3.3: +glob@10.3.3, glob@^10.2.2, glob@^10.2.5: version "10.3.3" resolved "https://registry.yarnpkg.com/glob/-/glob-10.3.3.tgz#8360a4ffdd6ed90df84aa8d52f21f452e86a123b" integrity sha512-92vPiMb/iqpmEgsOoIDvTjc50wf9CCCvMzsi6W0JLPeUKE8TWP1a73PgqSrqy7iAZxaSD1YdzU7QZR5LF51MJw== @@ -12088,6 +12802,18 @@ glob@10.3.3: minipass "^5.0.0 || ^6.0.2 || ^7.0.0" path-scurry "^1.10.1" +glob@7.1.4: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" @@ -12135,7 +12861,7 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, gl once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3: +glob@^8.0.1, glob@^8.0.3: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -12146,6 +12872,16 @@ glob@^8.0.3: minimatch "^5.0.1" once "^1.3.0" +glob@^9.2.0: + version "9.3.5" + resolved "https://registry.yarnpkg.com/glob/-/glob-9.3.5.tgz#ca2ed8ca452781a3009685607fdf025a899dfe21" + integrity sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q== + dependencies: + fs.realpath "^1.0.0" + minimatch "^8.0.2" + minipass "^4.2.4" + path-scurry "^1.6.1" + glob@~7.1.1: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" @@ -12204,6 +12940,18 @@ globalthis@^1.0.0, globalthis@^1.0.3: dependencies: define-properties "^1.1.3" +globby@11.1.0, globby@^11.0.1, globby@^11.1.0: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + globby@13.1.4: version "13.1.4" resolved "https://registry.yarnpkg.com/globby/-/globby-13.1.4.tgz#2f91c116066bcec152465ba36e5caa4a13c01317" @@ -12229,18 +12977,6 @@ globby@^10.0.1: merge2 "^1.2.3" slash "^3.0.0" -globby@^11.0.1, globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - globby@^13.1.2: version "13.2.2" resolved "https://registry.yarnpkg.com/globby/-/globby-13.2.2.tgz#63b90b1bf68619c2135475cbd4e71e66aa090592" @@ -12318,7 +13054,7 @@ graceful-fs@4.2.10: resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: +graceful-fs@4.2.11, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.3, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.10, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: 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== @@ -12422,7 +13158,7 @@ has-tostringtag@^1.0.0: dependencies: has-symbols "^1.0.2" -has-unicode@^2.0.1: +has-unicode@2.0.1, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== @@ -12544,7 +13280,7 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== -hosted-git-info@^3.0.2: +hosted-git-info@^3.0.2, hosted-git-info@^3.0.6: version "3.0.8" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" integrity sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw== @@ -12558,6 +13294,13 @@ hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: dependencies: lru-cache "^6.0.0" +hosted-git-info@^6.0.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-6.1.1.tgz#629442c7889a69c05de604d52996b74fe6f26d58" + integrity sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w== + dependencies: + lru-cache "^7.5.1" + html-escaper@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" @@ -12591,6 +13334,15 @@ http-errors@2.0.0: statuses "2.0.1" toidentifier "1.0.1" +http-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" + integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== + dependencies: + "@tootallnate/once" "2" + agent-base "6" + debug "4" + http-proxy-agent@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz#e9096c5afd071a3fce56e6252bb321583c124673" @@ -12659,6 +13411,13 @@ human-signals@^4.3.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-4.3.1.tgz#ab7f811e851fca97ffbd2c1fe9a958964de321b2" integrity sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ== +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== + dependencies: + ms "^2.0.0" + hyperlinker@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/hyperlinker/-/hyperlinker-1.0.0.tgz#23dc9e38a206b208ee49bc2d6c8ef47027df0c0e" @@ -12680,6 +13439,13 @@ iconv-lite@0.4.24, iconv-lite@^0.4.24: dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@^0.6.2: + version "0.6.3" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" + integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== + dependencies: + safer-buffer ">= 2.1.2 < 3.0.0" + ieee754@^1.1.13, ieee754@^1.1.4, ieee754@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" @@ -12697,7 +13463,21 @@ ignore-walk@^3.0.3: dependencies: minimatch "^3.0.4" -ignore@5.2.4, ignore@^5.0.5, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: +ignore-walk@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-5.0.1.tgz#5f199e23e1288f518d90358d461387788a154776" + integrity sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw== + dependencies: + minimatch "^5.0.1" + +ignore-walk@^6.0.0: + version "6.0.3" + resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-6.0.3.tgz#0fcdb6decaccda35e308a7b0948645dd9523b7bb" + integrity sha512-C7FfFoTA+bI10qfeydT8aZbvr91vAEU+2W5BZUlzPec47oNb07SsOfwYrtxuvOYdUApPP/Qlh4DtAO51Ekk2QA== + dependencies: + minimatch "^9.0.0" + +ignore@5.2.4, ignore@^5.0.4, ignore@^5.0.5, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -12743,7 +13523,7 @@ import-lazy@^4.0.0: resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-4.0.0.tgz#e8eb627483a0a43da3c03f3e35548be5cb0cc153" integrity sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw== -import-local@^3.0.2: +import-local@3.1.0, import-local@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-3.1.0.tgz#b4479df8a5fd44f6cdce24070675676063c95cb4" integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== @@ -12811,11 +13591,24 @@ ini@2.0.0: resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== -ini@^1.3.2, ini@^1.3.4, ini@~1.3.0: +ini@^1.3.2, ini@^1.3.4, ini@^1.3.8, ini@~1.3.0: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +init-package-json@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-5.0.0.tgz#030cf0ea9c84cfc1b0dc2e898b45d171393e4b40" + integrity sha512-kBhlSheBfYmq3e0L1ii+VKe3zBTLL5lDCDWR+f9dLmEGSB3MqLlMlsolubSsyI88Bg6EA+BIMlomAnQ1SwgQBw== + dependencies: + npm-package-arg "^10.0.0" + promzard "^1.0.0" + read "^2.0.0" + read-package-json "^6.0.0" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" + validate-npm-package-name "^5.0.0" + inquirer-autocomplete-prompt@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/inquirer-autocomplete-prompt/-/inquirer-autocomplete-prompt-2.0.0.tgz#28d742e5bc411ce52c8ce21509279e12b21a76f3" @@ -13081,6 +13874,13 @@ is-core-module@^2.11.0, is-core-module@^2.5.0, is-core-module@^2.9.0: dependencies: has "^1.0.3" +is-core-module@^2.8.1: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -13271,6 +14071,11 @@ is-invalid-path@^0.1.0: dependencies: is-glob "^2.0.0" +is-lambda@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" + integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== + is-map@^2.0.1, is-map@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" @@ -13419,6 +14224,11 @@ is-ssh@^1.4.0: dependencies: protocols "^2.0.1" +is-stream@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" + integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== + is-stream@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" @@ -13828,6 +14638,16 @@ jest-config@^29.6.1: slash "^3.0.0" strip-json-comments "^3.1.1" +"jest-diff@>=29.4.3 < 30": + version "29.6.2" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-29.6.2.tgz#c36001e5543e82a0805051d3ceac32e6825c1c46" + integrity sha512-t+ST7CB9GX5F2xKwhwCf0TAR17uNDiaPTZnVymP9lw0lssa9vG+AFyDZoeIHStU3WowFFwT+ky+er0WVl2yGhA== + dependencies: + chalk "^4.0.0" + diff-sequences "^29.4.3" + jest-get-type "^29.4.3" + pretty-format "^29.6.2" + jest-diff@^28.1.3: version "28.1.3" resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.3.tgz#948a192d86f4e7a64c5264ad4da4877133d8792f" @@ -14525,7 +15345,7 @@ js-yaml@4.1.0, js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -js-yaml@^3.12.1, js-yaml@^3.13.1: +js-yaml@^3.10.0, js-yaml@^3.12.1, js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -14603,6 +15423,11 @@ json-parse-even-better-errors@^2.3.0: resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz#7c47805a94319928e05777405dc12e1f7a4ee02d" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== +json-parse-even-better-errors@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz#2cb2ee33069a78870a0c7e3da560026b89669cf7" + integrity sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA== + json-schema-deref-sync@^0.13.0: version "0.13.0" resolved "https://registry.yarnpkg.com/json-schema-deref-sync/-/json-schema-deref-sync-0.13.0.tgz#cb08b4ff435a48b5a149652d7750fdd071009823" @@ -14666,7 +15491,7 @@ json5@^1.0.1, json5@^1.0.2: dependencies: minimist "^1.2.0" -jsonc-parser@^3.2.0: +jsonc-parser@3.2.0, jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== @@ -14692,7 +15517,7 @@ jsonify@^0.0.1: resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.1.tgz#2aa3111dae3d34a0f151c63f3a45d995d9420978" integrity sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg== -jsonparse@^1.2.0: +jsonparse@^1.2.0, jsonparse@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== @@ -14788,6 +15613,87 @@ lazystream@^1.0.0: dependencies: readable-stream "^2.0.5" +lerna@^7.1.5: + version "7.1.5" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-7.1.5.tgz#f65bde23d477382a221f9373f82d027825fa8622" + integrity sha512-5bvfmoIH4Czk5mdoLaRPYkM3M63Ei6+TOuXs3MgXmvqD8vs+vQpHuBVmiYFp5Mwsck3FkidJ+eTxfucltA2Lmw== + dependencies: + "@lerna/child-process" "7.1.5" + "@lerna/create" "7.1.5" + "@npmcli/run-script" "6.0.2" + "@nx/devkit" ">=16.5.1 < 17" + "@octokit/plugin-enterprise-rest" "6.0.1" + "@octokit/rest" "19.0.11" + byte-size "8.1.1" + chalk "4.1.0" + clone-deep "4.0.1" + cmd-shim "6.0.1" + columnify "1.6.0" + conventional-changelog-angular "6.0.0" + conventional-changelog-core "5.0.1" + conventional-recommended-bump "7.0.1" + cosmiconfig "^8.2.0" + dedent "0.7.0" + envinfo "7.8.1" + execa "5.0.0" + fs-extra "^11.1.1" + get-port "5.1.1" + get-stream "6.0.0" + git-url-parse "13.1.0" + glob-parent "5.1.2" + globby "11.1.0" + graceful-fs "4.2.11" + has-unicode "2.0.1" + import-local "3.1.0" + ini "^1.3.8" + init-package-json "5.0.0" + inquirer "^8.2.4" + is-ci "3.0.1" + is-stream "2.0.0" + jest-diff ">=29.4.3 < 30" + js-yaml "4.1.0" + libnpmaccess "7.0.2" + libnpmpublish "7.3.0" + load-json-file "6.2.0" + lodash "^4.17.21" + make-dir "3.1.0" + minimatch "3.0.5" + multimatch "5.0.0" + node-fetch "2.6.7" + npm-package-arg "8.1.1" + npm-packlist "5.1.1" + npm-registry-fetch "^14.0.5" + npmlog "^6.0.2" + nx ">=16.5.1 < 17" + p-map "4.0.0" + p-map-series "2.1.0" + p-pipe "3.1.0" + p-queue "6.6.2" + p-reduce "2.1.0" + p-waterfall "2.1.1" + pacote "^15.2.0" + pify "5.0.0" + read-cmd-shim "4.0.0" + read-package-json "6.0.4" + resolve-from "5.0.0" + rimraf "^4.4.1" + semver "^7.3.8" + signal-exit "3.0.7" + slash "3.0.0" + ssri "^9.0.1" + strong-log-transformer "2.1.0" + tar "6.1.11" + temp-dir "1.0.0" + typescript ">=3 < 6" + upath "2.0.1" + uuid "^9.0.0" + validate-npm-package-license "3.0.4" + validate-npm-package-name "5.0.0" + write-file-atomic "5.0.1" + write-pkg "4.0.0" + yargs "16.2.0" + yargs-parser "20.2.4" + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -14809,6 +15715,28 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +libnpmaccess@7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-7.0.2.tgz#7f056c8c933dd9c8ba771fa6493556b53c5aac52" + integrity sha512-vHBVMw1JFMTgEk15zRsJuSAg7QtGGHpUSEfnbcRL1/gTBag9iEfJbyjpDmdJmwMhvpoLoNBtdAUCdGnaP32hhw== + dependencies: + npm-package-arg "^10.1.0" + npm-registry-fetch "^14.0.3" + +libnpmpublish@7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-7.3.0.tgz#2ceb2b36866d75a6cd7b4aa748808169f4d17e37" + integrity sha512-fHUxw5VJhZCNSls0KLNEG0mCD2PN1i14gH5elGOgiVnU3VgTcRahagYP2LKI1m0tFCJ+XrAm0zVYyF5RCbXzcg== + dependencies: + ci-info "^3.6.1" + normalize-package-data "^5.0.0" + npm-package-arg "^10.1.0" + npm-registry-fetch "^14.0.3" + proc-log "^3.0.0" + semver "^7.3.7" + sigstore "^1.4.0" + ssri "^10.0.1" + lie@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" @@ -14834,6 +15762,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.2.4.tgz#eca284f75d2965079309dc0ad9255abb2ebc1632" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +lines-and-columns@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" + integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== + linkify-it@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-2.2.0.tgz#e3b54697e78bf915c70a38acd78fd09e0058b1cf" @@ -14874,6 +15807,16 @@ listr2@^5.0.7: through "^2.3.8" wrap-ansi "^7.0.0" +load-json-file@6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-6.2.0.tgz#5c7770b42cafa97074ca2848707c61662f4251a1" + integrity sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ== + dependencies: + graceful-fs "^4.1.15" + parse-json "^5.0.0" + strip-bom "^4.0.0" + type-fest "^0.6.0" + load-json-file@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" @@ -15253,7 +16196,7 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -lru-cache@^7.14.1: +lru-cache@^7.14.1, lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: version "7.18.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-7.18.3.tgz#f793896e0fd0e954a59dfdd82f0773808df6aa89" integrity sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA== @@ -15268,6 +16211,11 @@ lru_map@^0.3.3: resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" integrity sha512-Pn9cox5CsMYngeDbmChANltQl+5pi6XmTrraMSzhPmMBbmgcxmqWry0U3PGapCU1yB4/LqCcom7qhHZiF/jGfQ== +lz-string@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.5.0.tgz#c1ab50f77887b712621201ba9fd4e3a6ed099941" + integrity sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ== + macos-release@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-3.2.0.tgz#dcee82b6a4932971b1538dbf6f3aabc4a903b613" @@ -15280,6 +16228,13 @@ magic-string@^0.30.0: dependencies: "@jridgewell/sourcemap-codec" "^1.4.15" +make-dir@3.1.0, make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -15288,13 +16243,6 @@ make-dir@^2.0.0, make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - make-error-cause@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-2.3.0.tgz#ecd11875971e506d510e93d37796e5b83f46d6f9" @@ -15307,6 +16255,27 @@ make-error@1.x, make-error@^1.1.1, make-error@^1.3.5: resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== +make-fetch-happen@^11.0.0, make-fetch-happen@^11.0.1, make-fetch-happen@^11.0.3, make-fetch-happen@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz#85ceb98079584a9523d4bf71d32996e7e208549f" + integrity sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w== + dependencies: + agentkeepalive "^4.2.1" + cacache "^17.0.0" + http-cache-semantics "^4.1.1" + http-proxy-agent "^5.0.0" + https-proxy-agent "^5.0.0" + is-lambda "^1.0.1" + lru-cache "^7.7.1" + minipass "^5.0.0" + minipass-fetch "^3.0.0" + 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 "^10.0.0" + makeerror@1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" @@ -15520,7 +16489,7 @@ meow@^5.0.0: trim-newlines "^2.0.0" yargs-parser "^10.0.0" -meow@^8.0.0: +meow@^8.0.0, meow@^8.1.2: version "8.1.2" resolved "https://registry.yarnpkg.com/meow/-/meow-8.1.2.tgz#bcbe45bda0ee1729d350c03cffc8395a36c4e897" integrity sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q== @@ -16064,6 +17033,13 @@ minimalistic-crypto-utils@^1.0.1: dependencies: brace-expansion "^1.1.7" +minimatch@3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.5.tgz#4da8f1290ee0f0f8e83d60ca69f8f134068604a3" + integrity sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw== + dependencies: + brace-expansion "^1.1.7" + minimatch@5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" @@ -16071,7 +17047,7 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -"minimatch@6 || 7 || 8 || 9", minimatch@^9.0.1: +"minimatch@6 || 7 || 8 || 9", minimatch@^9.0.0, minimatch@^9.0.1: version "9.0.3" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.3.tgz#a6e00c3de44c3a542bfaae70abfc22420a6da825" integrity sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg== @@ -16092,6 +17068,13 @@ minimatch@^6.0.4: dependencies: brace-expansion "^2.0.1" +minimatch@^8.0.2: + version "8.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-8.0.4.tgz#847c1b25c014d4e9a7f68aaf63dedd668a626229" + integrity sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA== + dependencies: + brace-expansion "^2.0.1" + minimatch@~3.0.2: version "3.0.8" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" @@ -16128,6 +17111,17 @@ minipass-collect@^1.0.2: dependencies: minipass "^3.0.0" +minipass-fetch@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-3.0.4.tgz#4d4d9b9f34053af6c6e597a64be8e66e42bf45b7" + integrity sha512-jHAqnA728uUpIaFm7NWsCnqKT6UqZz7GcI/bDpPATuwYyKwJwW0remxSCxUlKiEty+eopHGa3oc8WxgQ1FFJqg== + dependencies: + minipass "^7.0.3" + 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.yarnpkg.com/minipass-flush/-/minipass-flush-1.0.5.tgz#82e7135d7e89a50ffe64610a787953c4c4cbb373" @@ -16135,13 +17129,28 @@ minipass-flush@^1.0.5: dependencies: minipass "^3.0.0" -minipass-pipeline@^1.2.2: +minipass-json-stream@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz#7edbb92588fbfc2ff1db2fc10397acb7b6b44aa7" + integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== + dependencies: + jsonparse "^1.3.1" + minipass "^3.0.0" + +minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/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.yarnpkg.com/minipass-sized/-/minipass-sized-1.0.3.tgz#70ee5a7c5052070afacfbc22977ea79def353b70" + integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== + dependencies: + minipass "^3.0.0" + minipass@3.1.6: version "3.1.6" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" @@ -16156,6 +17165,11 @@ minipass@^3.0.0, minipass@^3.1.1: dependencies: yallist "^4.0.0" +minipass@^4.2.4: + version "4.2.8" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.8.tgz#f0010f64393ecfc1d1ccb5f582bcaf45f48e1a3a" + integrity sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ== + minipass@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" @@ -16166,7 +17180,12 @@ minipass@^5.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.2.tgz#58a82b7d81c7010da5bd4b2c0c85ac4b4ec5131e" integrity sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA== -minizlib@^2.1.1: +minipass@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-7.0.3.tgz#05ea638da44e475037ed94d1c7efcc76a25e1974" + integrity sha512-LhbbwCfz3vsb12j/WkWQPZfKTsgqIe1Nf/ti1pKjYESGLHIVjWU96G9/ljLH4F9mWNVhlQOm0VySdAWzf05dpg== + +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== @@ -16262,7 +17281,7 @@ mocha@^10.0.0: yargs-parser "20.2.4" yargs-unparser "2.0.0" -modify-values@^1.0.0: +modify-values@^1.0.0, modify-values@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" integrity sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw== @@ -16294,7 +17313,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.3, ms@^2.1.1: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== @@ -16304,6 +17323,17 @@ multi-sort-stream@^1.0.3: resolved "https://registry.yarnpkg.com/multi-sort-stream/-/multi-sort-stream-1.0.4.tgz#e4348edc9edc36e16333e531a90c0f166235cc99" integrity sha512-hAZ8JOEQFbgdLe8HWZbb7gdZg0/yAIHF00Qfo3kd0rXFv96nXe+/bPTrKHZ2QMHugGX4FiAyET1Lt+jiB+7Qlg== +multimatch@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-5.0.0.tgz#932b800963cea7a31a033328fa1e0c3a1874dbe6" + integrity sha512-ypMKuglUrZUD99Tk2bUQ+xNQj43lPEfAeX2o9cTteAmShXy2VHDJpuwu1o0xqoKCt9jLVAvwyFKdLTPXKAfJyA== + dependencies: + "@types/minimatch" "^3.0.3" + array-differ "^3.0.0" + array-union "^2.1.0" + arrify "^2.0.1" + minimatch "^3.0.4" + multipipe@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-4.0.0.tgz#d302554ae664c1157dbfd1e8f98f03c517b3948a" @@ -16317,7 +17347,7 @@ mute-stream@0.0.8: resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== -mute-stream@1.0.0: +mute-stream@1.0.0, mute-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" integrity sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA== @@ -16414,7 +17444,7 @@ ncp@^2.0.0, ncp@~2.0.0: resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" integrity sha512-zIdGUrPRFTUELUvr3Gmc7KZ2Sw/h1PiVM0Af/oHB6zgnV1ikqSfRk+TOufi79aHYCW3NiOXmr1BP5nWbzojLaA== -negotiator@0.6.3: +negotiator@0.6.3, negotiator@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== @@ -16493,6 +17523,11 @@ node-abi@^3.3.0: dependencies: semver "^7.3.5" +node-addon-api@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" + integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== + node-addon-api@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-6.1.0.tgz#ac8470034e58e67d0c6f1204a18ae6995d9c0d76" @@ -16546,6 +17581,28 @@ node-forge@^1.2.1, node-forge@^1.3.1: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-1.3.1.tgz#be8da2af243b2417d5f646a770663a92b7e9ded3" integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== +node-gyp-build@^4.3.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" + integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== + +node-gyp@^9.0.0: + version "9.4.0" + resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-9.4.0.tgz#2a7a91c7cba4eccfd95e949369f27c9ba704f369" + integrity sha512-dMXsYP6gc9rRbejLXmTbVRYjAHw7ppswsKyMxuxJxxOHzluIO1rGp9TOQgjFJ+2MCqcOcQTOPB/8Xwhr+7s4Eg== + dependencies: + env-paths "^2.2.0" + exponential-backoff "^3.1.1" + glob "^7.1.4" + graceful-fs "^4.2.6" + make-fetch-happen "^11.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" + node-int64@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" @@ -16589,6 +17646,11 @@ node-libs-browser@^2.2.1: util "^0.11.0" vm-browserify "^1.0.1" +node-machine-id@1.1.12: + version "1.1.12" + resolved "https://registry.yarnpkg.com/node-machine-id/-/node-machine-id-1.1.12.tgz#37904eee1e59b320bb9c5d6c0a59f3b469cb6267" + integrity sha512-QNABxbrPa3qEIfrE6GOJ7BYIuignnJw7iQ2YPbc3Nla1HzRJjXzZOiikfF8m7eAMfichLt3M4VgLOetqgDmgGQ== + node-releases@^2.0.12: version "2.0.13" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" @@ -16604,6 +17666,13 @@ node-version@^1.0.0: resolved "https://registry.yarnpkg.com/node-version/-/node-version-1.2.0.tgz#34fde3ffa8e1149bd323983479dda620e1b5060d" integrity sha512-ma6oU4Sk0qOoKEAymVoTvk8EdXEobdS7m/mAGhDJ8Rouugho48crHBORAmy5BoOcv8wraPM6xumapQp5hl4iIQ== +nopt@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" + integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== + dependencies: + abbrev "^1.0.0" + normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -16614,7 +17683,7 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package- semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-package-data@^3.0.0, normalize-package-data@^3.0.2: +normalize-package-data@^3.0.0, normalize-package-data@^3.0.2, normalize-package-data@^3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== @@ -16624,6 +17693,16 @@ normalize-package-data@^3.0.0, normalize-package-data@^3.0.2: semver "^7.3.4" validate-npm-package-license "^3.0.1" +normalize-package-data@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-5.0.0.tgz#abcb8d7e724c40d88462b84982f7cbf6859b4588" + integrity sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q== + dependencies: + hosted-git-info "^6.0.0" + is-core-module "^2.8.1" + semver "^7.3.5" + validate-npm-package-license "^3.0.4" + normalize-path@3, 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" @@ -16646,6 +17725,56 @@ normalize-url@^8.0.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-8.0.0.tgz#593dbd284f743e8dcf6a5ddf8fadff149c82701a" integrity sha512-uVFpKhj5MheNBJRTiMZ9pE/7hD1QTeEvugSJW/OmLzAp78PB5O6adfMNTvmfKhXBkvCzC+rqifWcVYpGFwTjnw== +npm-bundled@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.1.2.tgz#944c78789bd739035b70baa2ca5cc32b8d860bc1" + integrity sha512-x5DHup0SuyQcmL3s7Rx/YQ8sbw/Hzg0rj48eN0dV7hf5cmQq5PXIeioroH3raV1QC1yh3uTYuMThvEQF3iKgGQ== + dependencies: + npm-normalize-package-bin "^1.0.1" + +npm-bundled@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-3.0.0.tgz#7e8e2f8bb26b794265028491be60321a25a39db7" + integrity sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ== + dependencies: + npm-normalize-package-bin "^3.0.0" + +npm-install-checks@^6.0.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-6.2.0.tgz#fae55b9967b03ac309695ec96629492d5cedf371" + integrity sha512-744wat5wAAHsxa4590mWO0tJ8PKxR8ORZsH9wGpQc3nWTzozMAgBN/XyqYw7mg3yqLM8dLwEnwSfKMmXAjF69g== + dependencies: + semver "^7.1.1" + +npm-normalize-package-bin@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" + integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== + +npm-normalize-package-bin@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.1.tgz#25447e32a9a7de1f51362c61a559233b89947832" + integrity sha512-dMxCf+zZ+3zeQZXKxmyuCKlIDPGuv8EF940xbkC4kQVDTtqoh6rJFO+JTKSA6/Rwi0getWmtuy4Itup0AMcaDQ== + +npm-package-arg@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.1.tgz#00ebf16ac395c63318e67ce66780a06db6df1b04" + integrity sha512-CsP95FhWQDwNqiYS+Q0mZ7FAEDytDZAkNxQqea6IaAFJTAY9Lhhqyl0irU/6PMc7BGfUmnsbHcqxJD7XuVM/rg== + dependencies: + hosted-git-info "^3.0.6" + semver "^7.0.0" + validate-npm-package-name "^3.0.0" + +npm-package-arg@^10.0.0, npm-package-arg@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-10.1.0.tgz#827d1260a683806685d17193073cc152d3c7e9b1" + integrity sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA== + dependencies: + hosted-git-info "^6.0.0" + proc-log "^3.0.0" + semver "^7.3.5" + validate-npm-package-name "^5.0.0" + npm-package-arg@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-7.0.0.tgz#52cdf08b491c0c59df687c4c925a89102ef794a5" @@ -16656,6 +17785,46 @@ npm-package-arg@^7.0.0: semver "^5.6.0" validate-npm-package-name "^3.0.0" +npm-packlist@5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-5.1.1.tgz#79bcaf22a26b6c30aa4dd66b976d69cc286800e0" + integrity sha512-UfpSvQ5YKwctmodvPPkK6Fwk603aoVsf8AEbmVKAEECrfvL8SSe1A2YIwrJ6xmTHAITKPwwZsWo7WwEbNk0kxw== + dependencies: + glob "^8.0.1" + ignore-walk "^5.0.1" + npm-bundled "^1.1.2" + npm-normalize-package-bin "^1.0.1" + +npm-packlist@^7.0.0: + version "7.0.4" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-7.0.4.tgz#033bf74110eb74daf2910dc75144411999c5ff32" + integrity sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q== + dependencies: + ignore-walk "^6.0.0" + +npm-pick-manifest@^8.0.0: + version "8.0.2" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-8.0.2.tgz#2159778d9c7360420c925c1a2287b5a884c713aa" + integrity sha512-1dKY+86/AIiq1tkKVD3l0WI+Gd3vkknVGAggsFeBkTvbhMQ1OND/LKkYv4JtXPKUJ8bOTCyLiqEg2P6QNdK+Gg== + dependencies: + npm-install-checks "^6.0.0" + npm-normalize-package-bin "^3.0.0" + npm-package-arg "^10.0.0" + semver "^7.3.5" + +npm-registry-fetch@^14.0.0, npm-registry-fetch@^14.0.3, npm-registry-fetch@^14.0.5: + version "14.0.5" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-14.0.5.tgz#fe7169957ba4986a4853a650278ee02e568d115d" + integrity sha512-kIDMIo4aBm6xg7jOttupWZamsZRkAqMqwqqbVXnUqstY5+tapvv6bkH/qMR76jdgV+YljEUCyWx3hRYMrJiAgA== + dependencies: + make-fetch-happen "^11.0.0" + minipass "^5.0.0" + minipass-fetch "^3.0.0" + minipass-json-stream "^1.0.1" + minizlib "^2.1.2" + npm-package-arg "^10.0.0" + proc-log "^3.0.0" + npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" @@ -16687,6 +17856,16 @@ npmlog@^5.0.1: gauge "^3.0.0" set-blocking "^2.0.0" +npmlog@^6.0.0, npmlog@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/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" + nth-check@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.1.1.tgz#c9eab428effce36cd6b92c924bdb000ef1f1ed1d" @@ -16699,6 +17878,58 @@ nullthrows@^1.1.1: resolved "https://registry.yarnpkg.com/nullthrows/-/nullthrows-1.1.1.tgz#7818258843856ae971eae4208ad7d7eb19a431b1" integrity sha512-2vPPEi+Z7WqML2jZYddDIfy5Dqb0r2fze2zTxNNknZaFpVHU3mFB3R+DWeJWGVx0ecvttSGlJTI+WG+8Z4cDWw== +nx@16.7.0, "nx@>=16.5.1 < 17": + version "16.7.0" + resolved "https://registry.yarnpkg.com/nx/-/nx-16.7.0.tgz#89c54fe9e927f4cd3033dea58b6e05aa206a0d36" + integrity sha512-PPEI4znnR8k0X5mEriMYDlTXTf3GyDTzBYn5qc+FWIY/P1r8E1cEcb0yWh7eNNSv3qgdJYdkRsPO7hNJINM5SA== + dependencies: + "@nrwl/tao" "16.7.0" + "@parcel/watcher" "2.0.4" + "@yarnpkg/lockfile" "^1.1.0" + "@yarnpkg/parsers" "3.0.0-rc.46" + "@zkochan/js-yaml" "0.0.6" + axios "^1.0.0" + chalk "^4.1.0" + cli-cursor "3.1.0" + cli-spinners "2.6.1" + cliui "^7.0.2" + dotenv "~16.3.1" + enquirer "~2.3.6" + fast-glob "3.2.7" + figures "3.2.0" + flat "^5.0.2" + fs-extra "^11.1.0" + glob "7.1.4" + ignore "^5.0.4" + js-yaml "4.1.0" + jsonc-parser "3.2.0" + lines-and-columns "~2.0.3" + minimatch "3.0.5" + node-machine-id "1.1.12" + npm-run-path "^4.0.1" + open "^8.4.0" + semver "7.5.3" + string-width "^4.2.3" + strong-log-transformer "^2.1.0" + tar-stream "~2.2.0" + tmp "~0.2.1" + tsconfig-paths "^4.1.2" + tslib "^2.3.0" + v8-compile-cache "2.3.0" + yargs "^17.6.2" + yargs-parser "21.1.1" + optionalDependencies: + "@nx/nx-darwin-arm64" "16.7.0" + "@nx/nx-darwin-x64" "16.7.0" + "@nx/nx-freebsd-x64" "16.7.0" + "@nx/nx-linux-arm-gnueabihf" "16.7.0" + "@nx/nx-linux-arm64-gnu" "16.7.0" + "@nx/nx-linux-arm64-musl" "16.7.0" + "@nx/nx-linux-x64-gnu" "16.7.0" + "@nx/nx-linux-x64-musl" "16.7.0" + "@nx/nx-win32-arm64-msvc" "16.7.0" + "@nx/nx-win32-x64-msvc" "16.7.0" + ob1@0.73.10: version "0.73.10" resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.73.10.tgz#bf0a2e8922bb8687ddca82327c5cf209414a1bd4" @@ -16893,7 +18124,7 @@ open@^7.3.1: is-docker "^2.0.0" is-wsl "^2.1.1" -open@^8.0.3, open@^8.0.4, open@^8.3.0: +open@^8.0.3, open@^8.0.4, open@^8.3.0, open@^8.4.0: version "8.4.2" resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== @@ -17094,7 +18325,12 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-map@^4.0.0: +p-map-series@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map-series/-/p-map-series-2.1.0.tgz#7560d4c452d9da0c07e692fdbfe6e2c81a2a91f2" + integrity sha512-RpYIIK1zXSNEOdwxcfe7FdvGcs7+y5n8rifMhMNWvaxRNMPINJHF5GDeuVxWqnfrcHPSCnp7Oo5yNXHId9Av2Q== + +p-map@4.0.0, p-map@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== @@ -17108,6 +18344,31 @@ p-map@^5.5.0: dependencies: aggregate-error "^4.0.0" +p-pipe@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-3.1.0.tgz#48b57c922aa2e1af6a6404cb7c6bf0eb9cc8e60e" + integrity sha512-08pj8ATpzMR0Y80x50yJHn37NF6vjrqHutASaX5LiH5npS9XPvrUmscd9MF5R4fuYRHOxQR1FfMIlF7AzwoPqw== + +p-queue@6.6.2: + version "6.6.2" + resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-6.6.2.tgz#2068a9dcf8e67dd0ec3e7a2bcb76810faa85e426" + integrity sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ== + dependencies: + eventemitter3 "^4.0.4" + p-timeout "^3.2.0" + +p-reduce@2.1.0, p-reduce@^2.0.0, p-reduce@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-2.1.0.tgz#09408da49507c6c274faa31f28df334bc712b64a" + integrity sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw== + +p-timeout@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" + integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== + dependencies: + p-finally "^1.0.0" + p-try@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" @@ -17118,6 +18379,13 @@ p-try@^2.0.0: resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +p-waterfall@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/p-waterfall/-/p-waterfall-2.1.1.tgz#63153a774f472ccdc4eb281cdb2967fcf158b2ee" + integrity sha512-RRTnDb2TBG/epPRI2yYXsimO0v3BXC8Yd3ogr1545IaqKK17VGhbWVeGGN+XfCm/08OK8635nH31c8bATkHuSw== + dependencies: + p-reduce "^2.0.0" + pac-proxy-agent@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/pac-proxy-agent/-/pac-proxy-agent-6.0.3.tgz#61042187093b67aa7dd05b41e4ec7c241a27c428" @@ -17150,6 +18418,30 @@ package-json@^8.1.0: registry-url "^6.0.0" semver "^7.3.7" +pacote@^15.2.0: + version "15.2.0" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-15.2.0.tgz#0f0dfcc3e60c7b39121b2ac612bf8596e95344d3" + integrity sha512-rJVZeIwHTUta23sIZgEIM62WYwbmGbThdbnkt81ravBplQv+HjyroqnLRNH2+sLJHcGZmLRmhPwACqhfTcOmnA== + dependencies: + "@npmcli/git" "^4.0.0" + "@npmcli/installed-package-contents" "^2.0.1" + "@npmcli/promise-spawn" "^6.0.1" + "@npmcli/run-script" "^6.0.0" + cacache "^17.0.0" + fs-minipass "^3.0.0" + minipass "^5.0.0" + npm-package-arg "^10.0.0" + npm-packlist "^7.0.0" + npm-pick-manifest "^8.0.0" + npm-registry-fetch "^14.0.0" + proc-log "^3.0.0" + promise-retry "^2.0.1" + read-package-json "^6.0.0" + read-package-json-fast "^3.0.0" + sigstore "^1.3.0" + ssri "^10.0.0" + tar "^6.1.11" + pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" @@ -17333,7 +18625,7 @@ path-parse@^1.0.5, path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-scurry@^1.10.1: +path-scurry@^1.10.1, path-scurry@^1.6.1: version "1.10.1" resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.10.1.tgz#9ba6bf5aa8500fe9fd67df4f0d9483b2b0bfc698" integrity sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ== @@ -17427,6 +18719,11 @@ pidtree@^0.6.0: resolved "https://registry.yarnpkg.com/pidtree/-/pidtree-0.6.0.tgz#90ad7b6d42d5841e69e0a2419ef38f8883aa057c" integrity sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g== +pify@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-5.0.0.tgz#1f5eca3f5e87ebec28cc6d54a0e4aaf00acc127f" + integrity sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA== + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -17527,7 +18824,7 @@ pngjs@^5.0.0: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== -pod-install@^0.1.0: +pod-install@^0.1.0, pod-install@^0.1.38: version "0.1.38" resolved "https://registry.yarnpkg.com/pod-install/-/pod-install-0.1.38.tgz#1c16a800a5fc1abea0cafcc0e190f376368c76ab" integrity sha512-NeDWGigjJRriOIKBOvpW2/tK2tYLfyUT7ia6C6L+oarCAhBNP+IGODWdU+GEAqvfsseqOApcFclpXAJTL0UPzA== @@ -17685,7 +18982,7 @@ pretty-format@^26.5.2, pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" -pretty-format@^27.0.0, pretty-format@^27.5.1: +pretty-format@^27.0.0, pretty-format@^27.0.2, pretty-format@^27.5.1: version "27.5.1" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== @@ -17713,6 +19010,15 @@ pretty-format@^29.0.0, pretty-format@^29.6.1: ansi-styles "^5.0.0" react-is "^18.0.0" +pretty-format@^29.6.2: + version "29.6.2" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-29.6.2.tgz#3d5829261a8a4d89d8b9769064b29c50ed486a47" + integrity sha512-1q0oC8eRveTg5nnBEWMXAU2qpv65Gnuf2eCQzSjxpWFkPaPARwqZZDGuNE0zPAZfTCHzIk3A8dIjwlQKKLphyg== + dependencies: + "@jest/schemas" "^29.6.0" + ansi-styles "^5.0.0" + react-is "^18.0.0" + pretty-hrtime@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" @@ -17738,6 +19044,11 @@ prettylint@^1.0.0: meow "^3.7.0" tslib "^1.8.0" +proc-log@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/proc-log/-/proc-log-3.0.0.tgz#fb05ef83ccd64fd7b20bbe9c8c1070fc08338dd8" + integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -17763,6 +19074,14 @@ promise-polyfill@^6.0.1: resolved "https://registry.yarnpkg.com/promise-polyfill/-/promise-polyfill-6.1.0.tgz#dfa96943ea9c121fca4de9b5868cb39d3472e057" integrity sha512-g0LWaH0gFsxovsU7R5LrrhHhWAWiHRnh1GPrhXnPgYsDkIqjRYUYSZEsej/wtleDrz5xVSIDbeKfidztp2XHFQ== +promise-retry@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-2.0.1.tgz#ff747a13620ab57ba688f5fc67855410c370da22" + integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== + dependencies: + err-code "^2.0.2" + retry "^0.12.0" + promise.allsettled@1.0.6, promise.allsettled@^1.0.0: version "1.0.6" resolved "https://registry.yarnpkg.com/promise.allsettled/-/promise.allsettled-1.0.6.tgz#8dc8ba8edf429feb60f8e81335b920e109c94b6e" @@ -17806,6 +19125,13 @@ prompts@2.4.2, prompts@^2.0.1, prompts@^2.3.2, prompts@^2.4.0, prompts@^2.4.2: kleur "^3.0.3" sisteransi "^1.0.5" +promzard@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/promzard/-/promzard-1.0.0.tgz#3246f8e6c9895a77c0549cefb65828ac0f6c006b" + integrity sha512-KQVDEubSUHGSt5xLakaToDFrSoZhStB8dXLzk2xvwR67gJktrHFvpR63oZgHyK19WKbHFLXJqCPXdVR3aBP8Ig== + dependencies: + read "^2.0.0" + prop-types@*, prop-types@15.8.1, prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" @@ -18660,6 +19986,29 @@ read-babelrc-up@^0.3.0: find-up "^3.0.0" json5 "^2.1.0" +read-cmd-shim@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-4.0.0.tgz#640a08b473a49043e394ae0c7a34dd822c73b9bb" + integrity sha512-yILWifhaSEEytfXI76kB9xEEiG1AiozaCJZ83A87ytjRiN+jVibXjedjCRNjoZviinhG+4UkalO3mWTd8u5O0Q== + +read-package-json-fast@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/read-package-json-fast/-/read-package-json-fast-3.0.2.tgz#394908a9725dc7a5f14e70c8e7556dff1d2b1049" + integrity sha512-0J+Msgym3vrLOUB3hzQCuZHII0xkNGCtz/HJH9xZshwv9DbDwkw1KaE3gx/e2J5rpEY5rtOy6cyhKOPrkP7FZw== + dependencies: + json-parse-even-better-errors "^3.0.0" + npm-normalize-package-bin "^3.0.0" + +read-package-json@6.0.4, read-package-json@^6.0.0: + version "6.0.4" + resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-6.0.4.tgz#90318824ec456c287437ea79595f4c2854708836" + integrity sha512-AEtWXYfopBj2z5N5PbkAOeNHRPUg5q+Nen7QLxV8M2zJq1ym6/lCz3fYNTCXe19puu2d06jfHhrP7v/S2PtMMw== + dependencies: + glob "^10.2.2" + json-parse-even-better-errors "^3.0.0" + normalize-package-data "^5.0.0" + npm-normalize-package-bin "^3.0.0" + read-pkg-up@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" @@ -18732,6 +20081,13 @@ read-pkg@^6.0.0: parse-json "^5.2.0" type-fest "^1.0.1" +read@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/read/-/read-2.1.0.tgz#69409372c54fe3381092bc363a00650b6ac37218" + integrity sha512-bvxi1QLJHcaywCAEsAk4DG3nVoqiY2Csps3qzWalhj5hFqRn1d/OixkFXtLO1PrgHUcAP0FNaSY/5GYNfENFFQ== + dependencies: + mute-stream "~1.0.0" + "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" @@ -18904,6 +20260,11 @@ regenerator-runtime@^0.13.11, regenerator-runtime@^0.13.2, regenerator-runtime@^ resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9" integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.0.tgz#5e19d68eb12d486f797e15a3c6a918f7cec5eb45" + integrity sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA== + regenerator-transform@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" @@ -19235,6 +20596,20 @@ rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: dependencies: glob "^7.1.3" +rimraf@^4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-4.4.1.tgz#bd33364f67021c5b79e93d7f4fa0568c7c21b755" + integrity sha512-Gk8NlF062+T9CqNGn6h4tls3k6T1+/nXdOcSZVikNVtlRdYpA7wRJJMoXmuvOnLW844rPjdQ7JgXCYM6PPC/og== + dependencies: + glob "^9.2.0" + +rimraf@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.1.tgz#0881323ab94ad45fec7c0221f27ea1a142f3f0d0" + integrity sha512-OfFZdwtd3lZ+XZzYP/6gTACubwFcHdLRqS9UX3UwpU2dnGQYkPFISRwvM3w9IiB2w7bW5qGo/uAwE4SmXXSKvg== + dependencies: + glob "^10.2.5" + rimraf@~2.2.6: version "2.2.8" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" @@ -19362,7 +20737,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.1.0: +"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== @@ -19511,12 +20886,19 @@ semver@7.5.2: dependencies: lru-cache "^6.0.0" +semver@7.5.3: + version "7.5.3" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.3.tgz#161ce8c2c6b4b3bdca6caadc9fa3317a4c4fe88e" + integrity sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ== + dependencies: + lru-cache "^6.0.0" + semver@^6.0.0, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4: +semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -19690,7 +21072,7 @@ shebang-regex@^3.0.0: resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shell-quote@^1.6.1, shell-quote@^1.7.2, shell-quote@^1.7.3: +shell-quote@^1.6.1, shell-quote@^1.7.2, shell-quote@^1.7.3, shell-quote@^1.8.1: version "1.8.1" resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== @@ -19718,7 +21100,7 @@ siginfo@^2.0.0: resolved "https://registry.yarnpkg.com/siginfo/-/siginfo-2.0.0.tgz#32e76c70b79724e3bb567cb9d543eb858ccfaf30" integrity sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g== -signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: +signal-exit@3.0.7, signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== @@ -19728,6 +21110,17 @@ signal-exit@^4.0.1: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.1.0.tgz#952188c1cbd546070e2dd20d0f41c0ae0530cb04" integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== +sigstore@^1.3.0, sigstore@^1.4.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.9.0.tgz#1e7ad8933aa99b75c6898ddd0eeebc3eb0d59875" + integrity sha512-0Zjz0oe37d08VeOtBIuB6cRriqXse2e8w+7yIy2XSXjshRKxbc2KkhXjL229jXSxEm7UbcjS76wcJDGQddVI9A== + dependencies: + "@sigstore/bundle" "^1.1.0" + "@sigstore/protobuf-specs" "^0.2.0" + "@sigstore/sign" "^1.0.0" + "@sigstore/tuf" "^1.0.3" + make-fetch-happen "^11.0.1" + simple-concat@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" @@ -19799,16 +21192,16 @@ sjcl@^1.0.3: resolved "https://registry.yarnpkg.com/sjcl/-/sjcl-1.0.8.tgz#f2ec8d7dc1f0f21b069b8914a41a8f236b0e252a" integrity sha512-LzIjEQ0S0DpIgnxMEayM1rq9aGwGRG4OnZhCdjx7glTaJtf4zRfpg87ImfjSJjoW9vKpagd82McDOwbRT5kQKQ== +slash@3.0.0, slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slash@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - slash@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-4.0.0.tgz#2422372176c4c6c5addb5e2ada885af984b396a7" @@ -19889,6 +21282,15 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +socks-proxy-agent@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/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-proxy-agent@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-8.0.1.tgz#ffc5859a66dac89b0c4dab90253b96705f3e7120" @@ -19898,7 +21300,7 @@ socks-proxy-agent@^8.0.1: debug "^4.3.4" socks "^2.7.1" -socks@^2.7.1: +socks@^2.6.2, socks@^2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/socks/-/socks-2.7.1.tgz#d8e651247178fde79c0663043e07240196857d55" integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== @@ -19988,6 +21390,11 @@ source-map@^0.7.3: resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.4.tgz#a9bbe705c9d8846f4e08ff6765acf0f1b0898656" integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== +spawn-command@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/spawn-command/-/spawn-command-0.0.2.tgz#9544e1a43ca045f8531aac1a48cb29bdae62338e" + integrity sha512-zC8zGoGkmc8J9ndvml8Xksr1Amk9qBujgbF0JAIWO7kXr43w0h/0GJNM/Vustixu+YE8N/MTrQ7N31FvHUACxQ== + spdx-correct@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.2.0.tgz#4f5ab0668f0059e34f9c00dce331784a12de4e9c" @@ -20026,7 +21433,7 @@ split-string@^3.0.1, split-string@^3.0.2: dependencies: extend-shallow "^3.0.0" -split2@^3.0.0: +split2@^3.0.0, split2@^3.2.2: version "3.2.2" resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== @@ -20050,6 +21457,13 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== +ssri@^10.0.0, ssri@^10.0.1: + version "10.0.5" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-10.0.5.tgz#e49efcd6e36385196cb515d3a2ad6c3f0265ef8c" + integrity sha512-bSf16tAFkGeRlUNDjXu8FzaMQt6g2HZJrun7mtMbIPOddxt3GLMSz5VWUWcqTJUPfLEaDIepGxv+bYQW49596A== + dependencies: + minipass "^7.0.3" + ssri@^6.0.1: version "6.0.2" resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.2.tgz#157939134f20464e7301ddba3e90ffa8f7728ac5" @@ -20064,6 +21478,13 @@ ssri@^8.0.1: dependencies: minipass "^3.1.1" +ssri@^9.0.1: + version "9.0.1" + resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" + integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== + dependencies: + minipass "^3.1.1" + stable@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" @@ -20250,6 +21671,15 @@ string-width@^2.0.0: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + string-width@^5.0.0, string-width@^5.0.1, string-width@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" @@ -20358,7 +21788,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.2.0: +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== @@ -20452,6 +21882,15 @@ strnum@^1.0.5: resolved "https://registry.yarnpkg.com/strnum/-/strnum-1.0.5.tgz#5c4e829fe15ad4ff0d20c3db5ac97b73c9b072db" integrity sha512-J8bbNyKKXl5qYcR36TIO8W3mVGVHrmmxsd5PAItGkmyzwJvybiw2IVq5nqd0i4LSNSkB/sx9VHllbfFdr9k1JA== +strong-log-transformer@2.1.0, strong-log-transformer@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" + integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== + dependencies: + duplexer "^0.1.1" + minimist "^1.2.0" + through "^2.3.4" + structured-headers@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/structured-headers/-/structured-headers-0.4.1.tgz#77abd9410622c6926261c09b9d16cf10592694d1" @@ -20490,7 +21929,7 @@ suffix@^0.1.0: resolved "https://registry.yarnpkg.com/suffix/-/suffix-0.1.1.tgz#cc58231646a0ef1102f79478ef3a9248fd9c842f" integrity sha512-j5uf6MJtMCfC4vBe5LFktSe4bGyNTBk7I2Kdri0jeLrcv5B9pWfxVa5JQpoxgtR8vaVB7bVxsWgnfQbX5wkhAA== -supports-color@8.1.1, supports-color@^8.0.0, supports-color@^8.1.0: +supports-color@8.1.1, supports-color@^8.0.0, supports-color@^8.1.0, supports-color@^8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -20590,7 +22029,7 @@ tar-stream@3.0.0: bl "^6.0.0" streamx "^2.12.5" -tar-stream@^2.1.4, tar-stream@^2.2.0: +tar-stream@^2.1.4, tar-stream@^2.2.0, tar-stream@~2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== @@ -20610,7 +22049,19 @@ tar-stream@^3.1.5: fast-fifo "^1.2.0" streamx "^2.15.0" -tar@^6.0.2, tar@^6.0.5: +tar@6.1.11: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + +tar@^6.0.2, tar@^6.0.5, tar@^6.1.11, tar@^6.1.2: version "6.1.15" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.15.tgz#c9738b0b98845a3b344d334b8fa3041aaba53a69" integrity sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A== @@ -20648,7 +22099,7 @@ telnet-client@1.2.8: dependencies: bluebird "^3.5.4" -temp-dir@^1.0.0: +temp-dir@1.0.0, temp-dir@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d" integrity sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ== @@ -20796,7 +22247,7 @@ through2@^4.0.0: dependencies: readable-stream "3" -through@2, "through@>=2.2.7 <3", through@^2.3.6, through@^2.3.8: +through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== @@ -20855,7 +22306,7 @@ tmp@^0.0.33: dependencies: os-tmpdir "~1.0.2" -tmp@^0.2.1: +tmp@^0.2.1, tmp@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== @@ -20950,6 +22401,11 @@ traverse@~0.6.6: resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.7.tgz#46961cd2d57dd8706c36664acde06a248f1173fe" integrity sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg== +tree-kill@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/tree-kill/-/tree-kill-1.2.2.tgz#4ca09a9092c88b73a7cdc5e8a01b507b0790a0cc" + integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== + trim-newlines@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" @@ -21095,7 +22551,7 @@ tslib@^1, tslib@^1.14.1, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -"tslib@^2.4.1 || ^1.9.3": +tslib@^2.3.0, "tslib@^2.4.1 || ^1.9.3": version "2.6.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.1.tgz#fd8c9a0ff42590b25703c0acb3de3d3f4ede0410" integrity sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig== @@ -21112,6 +22568,15 @@ tty-browserify@0.0.0: resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" integrity sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw== +tuf-js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-1.1.7.tgz#21b7ae92a9373015be77dfe0cb282a80ec3bbe43" + integrity sha512-i3P9Kgw3ytjELUfpuKVDNBJvk4u5bXL6gskv572mcevPbSKCV3zt3djhmlEQ65yERjIbOSncy7U4cQJaB1CBCg== + dependencies: + "@tufjs/models" "1.0.4" + debug "^4.3.4" + make-fetch-happen "^11.1.1" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -21179,6 +22644,11 @@ type-fest@^0.3.0, type-fest@^0.3.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1" integrity sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ== +type-fest@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.4.1.tgz#8bdf77743385d8a4f13ba95f610f5ccd68c728f8" + integrity sha512-IwzA/LSfD2vC1/YDYMv/zHP4rDF1usCwllsDpbolT3D4fUepIO7f9K70jjmUewU/LmGUKJcwcVtDCpnKk4BPMw== + type-fest@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.6.0.tgz#8d2a2370d3df886eb5c90ada1c5bf6188acf838b" @@ -21278,6 +22748,11 @@ typescript@5.0.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== +"typescript@>=3 < 6", "typescript@^4.6.4 || ^5.0.0", "typescript@^4.7 || 5": + version "5.1.6" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" + integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== + typescript@^3.9.7: version "3.9.10" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" @@ -21288,11 +22763,6 @@ typescript@^4.5.2: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== -"typescript@^4.6.4 || ^5.0.0", "typescript@^4.7 || 5": - version "5.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" - integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== - typescript@~4.4.4: version "4.4.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.4.tgz#2cd01a1a1f160704d3101fd5a58ff0f9fcb8030c" @@ -21406,6 +22876,13 @@ unique-filename@^1.1.1: dependencies: unique-slug "^2.0.0" +unique-filename@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" + integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== + dependencies: + unique-slug "^4.0.0" + unique-slug@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.2.tgz#baabce91083fc64e945b0f3ad613e264f7cd4e6c" @@ -21413,6 +22890,13 @@ unique-slug@^2.0.0: dependencies: imurmurhash "^0.1.4" +unique-slug@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-4.0.0.tgz#6bae6bb16be91351badd24cdce741f892a6532e3" + integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== + dependencies: + imurmurhash "^0.1.4" + unique-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a" @@ -21485,6 +22969,11 @@ untildify@^4.0.0: resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== +upath@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/upath/-/upath-2.0.1.tgz#50c73dea68d6f6b990f51d279ce6081665d61a8b" + integrity sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w== + upath@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894" @@ -21653,6 +23142,11 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== +v8-compile-cache@2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + v8-to-istanbul@^9.0.1: version "9.1.0" resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-9.1.0.tgz#1b83ed4e397f58c85c266a570fc2558b5feb9265" @@ -21674,7 +23168,7 @@ valid-url@~1.0.9: resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" integrity sha512-QQDsV8OnSf5Uc30CKSwG9lnhMPe6exHtTXLRYX8uMwKENy640pU+2BgBL0LRbDh/eYRahNCS7aewCx0wf3NYVA== -validate-npm-package-license@^3.0.1: +validate-npm-package-license@3.0.4, validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== @@ -21682,6 +23176,13 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" +validate-npm-package-name@5.0.0, validate-npm-package-name@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz#f16afd48318e6f90a1ec101377fa0384cfc8c713" + integrity sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ== + dependencies: + builtins "^5.0.0" + validate-npm-package-name@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz#5fa912d81eb7d0c74afc140de7317f0ca7df437e" @@ -21815,7 +23316,7 @@ watskeburt@0.11.6: resolved "https://registry.yarnpkg.com/watskeburt/-/watskeburt-0.11.6.tgz#bce3920da3e89769079b0df0ff890a3e18a8384b" integrity sha512-LrtRC7U9jzZUJafNhjvQDMaHFBdT/bQGbzkf26xX8JHHyB2TvxjWdwpxa9J0F7RgJ4eI/v1jnXILCkdlcANeiw== -wcwidth@^1.0.1: +wcwidth@^1.0.0, wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== @@ -21987,6 +23488,13 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" +which@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/which/-/which-3.0.1.tgz#89f1cd0c23f629a8105ffe69b8172791c87b4be1" + integrity sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg== + dependencies: + isexe "^2.0.0" + why-is-node-running@^2.2.2: version "2.2.2" resolved "https://registry.yarnpkg.com/why-is-node-running/-/why-is-node-running-2.2.2.tgz#4185b2b4699117819e7154594271e7e344c9973e" @@ -21995,7 +23503,7 @@ why-is-node-running@^2.2.2: siginfo "^2.0.0" stackback "0.0.2" -wide-align@^1.1.2: +wide-align@^1.1.2, wide-align@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== @@ -22078,6 +23586,15 @@ wrap-ansi@8.1.0, wrap-ansi@^8.1.0: string-width "^5.0.1" strip-ansi "^7.0.1" +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: version "6.2.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" @@ -22092,6 +23609,14 @@ wrappy@1: resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== +write-file-atomic@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-5.0.1.tgz#68df4717c55c6fa4281a7860b4c2ba0a6d2b11e7" + integrity sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw== + dependencies: + imurmurhash "^0.1.4" + signal-exit "^4.0.1" + write-file-atomic@^2.3.0, write-file-atomic@^2.4.2: version "2.4.3" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.4.3.tgz#1fd2e9ae1df3e75b8d8c367443c692d4ca81f481" @@ -22119,7 +23644,7 @@ write-file-atomic@^4.0.1, write-file-atomic@^4.0.2: imurmurhash "^0.1.4" signal-exit "^3.0.7" -write-json-file@^3.0.2: +write-json-file@^3.0.2, write-json-file@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/write-json-file/-/write-json-file-3.2.0.tgz#65bbdc9ecd8a1458e15952770ccbadfcff5fe62a" integrity sha512-3xZqT7Byc2uORAatYiP3DHUUAVEkNOswEWNs9H5KXiicRTvzYzYqKjYc4G7p+8pltvAw641lVByKVtMpf+4sYQ== @@ -22131,6 +23656,15 @@ write-json-file@^3.0.2: sort-keys "^2.0.0" write-file-atomic "^2.4.2" +write-pkg@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/write-pkg/-/write-pkg-4.0.0.tgz#675cc04ef6c11faacbbc7771b24c0abbf2a20039" + integrity sha512-v2UQ+50TNf2rNHJ8NyWttfm/EJUBWMJcx6ZTYZr6Qp52uuegWw/lBkCtCbnYZEmPRNL61m+u67dAmGxo+HTULA== + dependencies: + sort-keys "^2.0.0" + type-fest "^0.4.1" + write-json-file "^3.2.0" + ws@8.2.3: version "8.2.3" resolved "https://registry.yarnpkg.com/ws/-/ws-8.2.3.tgz#63a56456db1b04367d0b721a0b80cae6d8becbba" @@ -22258,6 +23792,14 @@ yargs-parser@^10.0.0: dependencies: camelcase "^4.1.0" +yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^18.1.2: version "18.1.3" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" @@ -22294,6 +23836,22 @@ yargs@16.2.0, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" +yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + yargs@^15.1.0, yargs@^15.3.1: version "15.4.1" resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" @@ -22311,7 +23869,7 @@ yargs@^15.1.0, yargs@^15.3.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.0.0, yargs@^17.3.1, yargs@^17.5.1, yargs@^17.7.2: +yargs@^17.0.0, yargs@^17.3.1, yargs@^17.5.1, yargs@^17.6.2, yargs@^17.7.2: version "17.7.2" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== @@ -22365,7 +23923,7 @@ zip-stream@^4.1.0: compress-commons "^4.1.0" readable-stream "^3.6.0" -zod@^3.21.4: - version "3.21.4" - resolved "https://registry.yarnpkg.com/zod/-/zod-3.21.4.tgz#10882231d992519f0a10b5dd58a38c9dabbb64db" - integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw== +zod@^3.22.1: + version "3.22.1" + resolved "https://registry.yarnpkg.com/zod/-/zod-3.22.1.tgz#815f850baf933fef96c1061322dbe579b1a80c27" + integrity sha512-+qUhAMl414+Elh+fRNtpU+byrwjDFOS1N7NioLY+tSlcADTx4TkCUua/hxJvxwDXcV4397/nZ420jy4n4+3WUg== From cdd9b3e21a8f1165df7bd64616d9f4363da2bd26 Mon Sep 17 00:00:00 2001 From: Juliano Lazzarotto <30806844+stackchain@users.noreply.github.com> Date: Fri, 18 Aug 2023 14:13:56 +0100 Subject: [PATCH 2/2] chore: moved storage --- packages/types/src/app/multi-storage.ts | 17 ++++++ packages/types/src/helpers/types.ts | 1 + packages/types/src/index.ts | 5 ++ .../wallets/src/adapters/asyncStorage.test.ts | 59 ++++++++++++++++++- packages/wallets/src/adapters/asyncStorage.ts | 53 ++++++++++++++--- packages/wallets/src/index.ts | 1 + packages/wallets/src/storage.ts | 3 + .../src/translators/storage.reactjs.test.tsx | 2 +- .../src/translators/storage.reactjs.tsx | 2 +- 9 files changed, 133 insertions(+), 10 deletions(-) create mode 100644 packages/types/src/app/multi-storage.ts create mode 100644 packages/types/src/helpers/types.ts create mode 100644 packages/wallets/src/storage.ts diff --git a/packages/types/src/app/multi-storage.ts b/packages/types/src/app/multi-storage.ts new file mode 100644 index 0000000000..113e5936d0 --- /dev/null +++ b/packages/types/src/app/multi-storage.ts @@ -0,0 +1,17 @@ +import {AppStorage, AppStorageFolderName} from './storage' +import {Nullable} from '../helpers/types' + +export interface AppMultiStorage { + keys: () => Promise + remove: () => Promise + save: (data: NonNullable[]) => Promise + read: () => Promise<[string, Nullable][]> +} + +export type AppMultiStorageOptions = { + storage: AppStorage + dataFolder: AppStorageFolderName + keyExtractor: keyof T | ((data: NonNullable) => string) + serializer?: (data: NonNullable) => string + deserializer?: (data: string | null) => Nullable +} diff --git a/packages/types/src/helpers/types.ts b/packages/types/src/helpers/types.ts new file mode 100644 index 0000000000..c99b0be4f5 --- /dev/null +++ b/packages/types/src/helpers/types.ts @@ -0,0 +1 @@ +export type Nullable = T | null | undefined diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 1fbd737fe4..3447a98d25 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -18,10 +18,13 @@ import {SwapPool} from './swap/pool' import {SwapStorage} from './swap/storage' import {SwapManager} from './swap/manager' import {AppStorage, AppStorageFolderName} from './app/storage' +import {AppMultiStorage, AppMultiStorageOptions} from './app/multi-storage' export namespace App { export interface Storage extends AppStorage {} export type StorageFolderName = AppStorageFolderName + export interface MultiStorage extends AppMultiStorage {} + export type MultiStorageOptions = AppMultiStorageOptions } export namespace Swap { export type CreateOrderData = SwapCreateOrderData @@ -50,3 +53,5 @@ export namespace Balance { export type Amount = BalanceAmount export type Amounts = BalanceAmounts } + +export * from './helpers/types' diff --git a/packages/wallets/src/adapters/asyncStorage.test.ts b/packages/wallets/src/adapters/asyncStorage.test.ts index 3d33002ada..990da107b6 100644 --- a/packages/wallets/src/adapters/asyncStorage.test.ts +++ b/packages/wallets/src/adapters/asyncStorage.test.ts @@ -2,7 +2,9 @@ import AsyncStorage from '@react-native-async-storage/async-storage' import {parseSafe} from '../parsers' -import {rootStorage} from './asyncStorage' +import {rootStorage} from '../storage' +import {mountMultiStorage} from './asyncStorage' +import {App} from '@yoroi/types' describe('prefixed storage', () => { beforeEach(() => AsyncStorage.clear()) @@ -235,8 +237,63 @@ describe('prefixed storage', () => { }) }) +describe('multi storage', () => { + beforeEach(() => AsyncStorage.clear()) + + it('save, read, keys, remove providing the serializers', async () => { + const storage = mountMultiStorage(options) + await storage.save([item3, item4]) + + const readItems = await storage.read() + expect(readItems).toEqual([ + ['1', item3], + ['2', item4], + ]) + + const keys = await storage.keys() + expect(keys).toEqual(['1', '2']) + + await storage.remove() + + const emptyKeys = await storage.keys() + expect(emptyKeys).toEqual([]) + }) + it('save, read, keys, remove default serializers / key as extractor', async () => { + const storage = mountMultiStorage({ + storage: rootStorage.join('multiStorage/'), + dataFolder: 'dataFolder/', + keyExtractor: 'id', + }) + await storage.save([item3, item4]) + + const readItems = await storage.read() + expect(readItems).toEqual([ + ['1', item3], + ['2', item4], + ]) + + const keys = await storage.keys() + expect(keys).toEqual(['1', '2']) + + await storage.remove() + + const emptyKeys = await storage.keys() + expect(emptyKeys).toEqual([]) + }) +}) + +const options: App.MultiStorageOptions = { + storage: rootStorage.join('multiStorage/'), + dataFolder: 'dataFolder/', + keyExtractor: (item: any) => item.id, + serializer: JSON.stringify, + deserializer: (data) => JSON.parse(data as string), +} + const item1 = {a: 123, b: 234} const item2 = {c: 123, d: 234} +const item3 = {id: 1, a: 123, b: 234} +const item4 = {id: '2', c: 123, d: 234} const snapshot = async () => { const keys = await AsyncStorage.getAllKeys() diff --git a/packages/wallets/src/adapters/asyncStorage.ts b/packages/wallets/src/adapters/asyncStorage.ts index 5274e5c593..780709bb06 100644 --- a/packages/wallets/src/adapters/asyncStorage.ts +++ b/packages/wallets/src/adapters/asyncStorage.ts @@ -1,11 +1,11 @@ import AsyncStorage from '@react-native-async-storage/async-storage' -import {App} from '@yoroi/types' +import {App, Nullable} from '@yoroi/types' import {parseSafe} from '../parsers' // ------- // ADAPTER + "FACTORY" -const mountStorage = (path: App.StorageFolderName): App.Storage => { +export const mountStorage = (path: App.StorageFolderName): App.Storage => { const withPath = (key: string) => `${path}${key}` as `${App.StorageFolderName}${string}` const withoutPath = (value: string) => value.slice(path.length) @@ -92,13 +92,52 @@ const mountStorage = (path: App.StorageFolderName): App.Storage => { } as const } +export const mountMultiStorage = ( + options: App.MultiStorageOptions, +): App.MultiStorage => { + const { + storage, + dataFolder, + keyExtractor, + serializer = JSON.stringify, + deserializer = parseSafe as (item: string | null) => Nullable, + } = options + const dataStorage = storage.join(dataFolder) + + const keys = () => dataStorage.getAllKeys() + const remove = () => storage.removeFolder(dataFolder) + const save = (items: NonNullable[]) => { + const entries: [string, T][] = items.map((record) => { + if (typeof keyExtractor === 'function') { + return [keyExtractor(record), record] + } + return [String(record[keyExtractor]), record] + }) + const entriesWithKeys = entries.filter(([key]) => key != null && key !== '') + return dataStorage.multiSet( + entriesWithKeys, + serializer as (record: unknown) => string, + ) + } + const read = () => { + return dataStorage + .getAllKeys() + .then((readKeys) => + dataStorage.multiGet>(readKeys, deserializer), + ) + } + + return { + keys, + remove, + save, + read, + } +} + // ------- -// FILTERS +// HELPERS const isFileKey = ({key, path}: {key: string; path: string}) => !key.slice(path.length).includes('/') const isFolderKey = ({key, path}: {key: string; path: string}) => !isFileKey({key, path}) - -// ---- -// ROOT -export const rootStorage = mountStorage('/') diff --git a/packages/wallets/src/index.ts b/packages/wallets/src/index.ts index 020167c886..2d598b26a8 100644 --- a/packages/wallets/src/index.ts +++ b/packages/wallets/src/index.ts @@ -2,3 +2,4 @@ export * from './helpers' export * from './parsers' export * from './adapters/asyncStorage' export * from './translators/storage.reactjs' +export * from './storage' diff --git a/packages/wallets/src/storage.ts b/packages/wallets/src/storage.ts new file mode 100644 index 0000000000..a17f825201 --- /dev/null +++ b/packages/wallets/src/storage.ts @@ -0,0 +1,3 @@ +import {mountStorage} from './adapters/asyncStorage' + +export const rootStorage = mountStorage('/') diff --git a/packages/wallets/src/translators/storage.reactjs.test.tsx b/packages/wallets/src/translators/storage.reactjs.test.tsx index 042c754da1..ab5b181563 100644 --- a/packages/wallets/src/translators/storage.reactjs.test.tsx +++ b/packages/wallets/src/translators/storage.reactjs.test.tsx @@ -1,7 +1,7 @@ import React from 'react' import renderer from 'react-test-renderer' import {StorageProvider, useStorage} from './storage.reactjs' // Update with the actual module path -import {rootStorage} from '../adapters/asyncStorage' +import {rootStorage} from '../storage' describe('StorageProvider and useStorage Tests', () => { test('StorageProvider provides storage context', () => { diff --git a/packages/wallets/src/translators/storage.reactjs.tsx b/packages/wallets/src/translators/storage.reactjs.tsx index fb608b2be3..3cf963a59f 100644 --- a/packages/wallets/src/translators/storage.reactjs.tsx +++ b/packages/wallets/src/translators/storage.reactjs.tsx @@ -1,6 +1,6 @@ import React from 'react' -import {rootStorage} from '../adapters/asyncStorage' +import {rootStorage} from '../storage' import {App} from '@yoroi/types' import {invalid} from '../helpers'