From d9a1d9b8e2ed22e6bcd173a1ab0a2c3aa40fdce0 Mon Sep 17 00:00:00 2001 From: yanguoyu <841185308@qq.com> Date: Mon, 11 Sep 2023 17:25:16 +0800 Subject: [PATCH] chore: Update typeorm to v3 --- packages/neuron-wallet/package.json | 2 +- .../sync/indexer-cache-service.ts | 2 +- .../sync/tx-address-finder.ts | 2 +- .../src/database/chain/connection.ts | 6 +- .../chain/entities/multisig-config.ts | 4 +- .../src/database/chain/ormconfig.ts | 39 ++++---- .../subscriber/asset-account-subscriber.ts | 2 +- .../subscriber/sudt-token-info-subscriber.ts | 4 +- .../subscriber/user-setting-subscriber.ts | 3 +- .../src/models/synced-block-number.ts | 2 +- .../src/services/amend-transaction.ts | 2 +- .../src/services/asset-account-service.ts | 12 +-- packages/neuron-wallet/src/services/cells.ts | 6 +- .../src/services/sudt-token-info.ts | 2 +- .../src/services/sync-progress.ts | 2 +- .../src/services/tx/transaction-persistor.ts | 14 ++- .../tests/controllers/multisig.test.ts | 1 + .../models/synced-block-number.intg.test.ts | 4 +- .../tests/services/address.test.ts | 2 +- .../services/asset-account-service.test.ts | 2 +- .../tests/services/cell-local-info.test.ts | 6 +- .../tests/services/multisig.test.ts | 2 +- .../tests/services/sudt-token-info.test.ts | 4 +- .../tests/services/transactions.test.ts | 2 +- .../services/tx/transaction-generator.test.ts | 2 +- .../services/tx/transaction-persistor.test.ts | 32 +++---- .../tests/services/wallets.test.ts | 2 +- .../tests/setupAndTeardown/index.ts | 4 +- yarn.lock | 91 +++++++------------ 29 files changed, 115 insertions(+), 143 deletions(-) diff --git a/packages/neuron-wallet/package.json b/packages/neuron-wallet/package.json index 1f41ad3916..fd2479706f 100644 --- a/packages/neuron-wallet/package.json +++ b/packages/neuron-wallet/package.json @@ -73,7 +73,7 @@ "sqlite3": "5.1.6", "subleveldown": "4.1.4", "tslib": "2.6.2", - "typeorm": "0.2.45", + "typeorm": "0.3.17", "undici": "5.28.3", "uuid": "8.3.2" }, diff --git a/packages/neuron-wallet/src/block-sync-renderer/sync/indexer-cache-service.ts b/packages/neuron-wallet/src/block-sync-renderer/sync/indexer-cache-service.ts index 45f74efba8..b3401f6626 100644 --- a/packages/neuron-wallet/src/block-sync-renderer/sync/indexer-cache-service.ts +++ b/packages/neuron-wallet/src/block-sync-renderer/sync/indexer-cache-service.ts @@ -149,7 +149,7 @@ export default class IndexerCacheService { cacheBlockNumberEntity = (await getConnection() .getRepository(SyncInfoEntity) - .findOne({ name: SyncInfoEntity.getLastCachedKey(blake160) })) ?? + .findOneBy({ name: SyncInfoEntity.getLastCachedKey(blake160) })) ?? SyncInfoEntity.fromObject({ name: SyncInfoEntity.getLastCachedKey(blake160), value: '0x0', diff --git a/packages/neuron-wallet/src/block-sync-renderer/sync/tx-address-finder.ts b/packages/neuron-wallet/src/block-sync-renderer/sync/tx-address-finder.ts index f8d1a9d295..200aaeded3 100644 --- a/packages/neuron-wallet/src/block-sync-renderer/sync/tx-address-finder.ts +++ b/packages/neuron-wallet/src/block-sync-renderer/sync/tx-address-finder.ts @@ -90,7 +90,7 @@ export default class TxAddressFinder { let shouldSync = false for (const input of inputs) { const outPoint: OutPoint = input.previousOutput! - const output = await getConnection().getRepository(OutputEntity).findOne({ + const output = await getConnection().getRepository(OutputEntity).findOneBy({ outPointTxHash: outPoint.txHash, outPointIndex: outPoint.index, }) diff --git a/packages/neuron-wallet/src/database/chain/connection.ts b/packages/neuron-wallet/src/database/chain/connection.ts index a65452b356..32344e7946 100644 --- a/packages/neuron-wallet/src/database/chain/connection.ts +++ b/packages/neuron-wallet/src/database/chain/connection.ts @@ -1,15 +1,13 @@ -import { getConnection as originGetConnection } from 'typeorm' +import { ConnectionName, dataSource } from './ormconfig' import { NetworkType } from '../../models/network' import NetworksService from '../../services/networks' -export type ConnectionName = 'light' | 'full' - export function getCurrentConnectionName(): ConnectionName { return NetworksService.getInstance().getCurrent()?.type === NetworkType.Light ? 'light' : 'full' } export function getConnection(connectionName: ConnectionName = getCurrentConnectionName()) { - const connection = originGetConnection(connectionName) + const connection = dataSource[connectionName] if (!connection) { throw new Error(`The connection ${connectionName} should be initialized before use`) } diff --git a/packages/neuron-wallet/src/database/chain/entities/multisig-config.ts b/packages/neuron-wallet/src/database/chain/entities/multisig-config.ts index 2c0b2d8f6a..698be44a0f 100644 --- a/packages/neuron-wallet/src/database/chain/entities/multisig-config.ts +++ b/packages/neuron-wallet/src/database/chain/entities/multisig-config.ts @@ -24,10 +24,10 @@ export default class MultisigConfig { blake160s!: string[] @Column() - alias!: string + alias: string = '' @Column() - lastestBlockNumber!: string + lastestBlockNumber: string = '' public static fromModel(model: MultisigConfigModel): MultisigConfig { const multisigConfig = new MultisigConfig() diff --git a/packages/neuron-wallet/src/database/chain/ormconfig.ts b/packages/neuron-wallet/src/database/chain/ormconfig.ts index ac120deeca..48d3d4c795 100644 --- a/packages/neuron-wallet/src/database/chain/ormconfig.ts +++ b/packages/neuron-wallet/src/database/chain/ormconfig.ts @@ -1,4 +1,4 @@ -import { createConnection, getConnectionOptions, getConnection } from 'typeorm' +import { DataSource } from 'typeorm' import { SqliteConnectionOptions } from 'typeorm/driver/sqlite/SqliteConnectionOptions' import path from 'path' import fs from 'fs' @@ -63,7 +63,6 @@ import { CreateCellLocalInfo1701234043432 } from './migrations/1701234043432-Cre import { RenameSyncProgress1702781527414 } from './migrations/1702781527414-RenameSyncProgress' import { RemoveAddressInIndexerCache1704357651876 } from './migrations/1704357651876-RemoveAddressInIndexerCache' import { AmendTransaction1709008125088 } from './migrations/1709008125088-AmendTransaction' -import { ConnectionName } from './connection' import AddressSubscribe from './subscriber/address-subscriber' import MultisigConfigSubscribe from './subscriber/multisig-config-subscriber' import TxDescriptionSubscribe from './subscriber/tx-description-subscriber' @@ -71,24 +70,20 @@ import SudtTokenInfoSubscribe from './subscriber/sudt-token-info-subscriber' import AssetAccountSubscribe from './subscriber/asset-account-subscriber' export const CONNECTION_NOT_FOUND_NAME = 'ConnectionNotFoundError' +export type ConnectionName = 'light' | 'full' const dbPath = (name: string, connectionName: string): string => { const filename = `${connectionName}-${name}.sqlite` return path.join(env.fileBasePath, 'cells', filename) } -const connectOptions = async ( - genesisBlockHash: string, - connectionName: ConnectionName -): Promise => { - const connectionOptions = await getConnectionOptions() +const getConnectionOptions = (genesisBlockHash: string, connectionName: ConnectionName): SqliteConnectionOptions => { const database = env.isTestMode ? ':memory:' : dbPath(genesisBlockHash, connectionName) const logging: boolean | ('query' | 'schema' | 'error' | 'warn' | 'info' | 'log' | 'migration')[] = ['warn', 'error'] // (env.isDevMode) ? ['warn', 'error', 'log', 'info', 'schema', 'migration'] : ['warn', 'error'] return { - ...connectionOptions, name: connectionName, type: 'sqlite', database, @@ -161,33 +156,36 @@ const connectOptions = async ( ], logger: 'simple-console', logging, + synchronize: true, maxQueryExecutionTime: 30, } } +export const dataSource: Record = { + light: null, + full: null, +} + const initConnectionWithType = async (genesisBlockHash: string, connectionName: ConnectionName) => { // try to close connection, if not exist, will throw ConnectionNotFoundError when call getConnection() try { - await getConnection(connectionName).close() + await dataSource[connectionName]?.destroy() } catch (err) { + dataSource[connectionName] = null // do nothing } - const connectionOptions = await connectOptions(genesisBlockHash, connectionName) + const connectionOptions = getConnectionOptions(genesisBlockHash, connectionName) + dataSource[connectionName] = new DataSource(connectionOptions) try { - await createConnection(connectionOptions) - await getConnection(connectionName).manager.query(`PRAGMA busy_timeout = 3000;`) - await getConnection(connectionName).manager.query(`PRAGMA temp_store = MEMORY;`) + await dataSource[connectionName]?.initialize() + await dataSource[connectionName]?.manager.query(`PRAGMA busy_timeout = 3000;`) + await dataSource[connectionName]?.manager.query(`PRAGMA temp_store = MEMORY;`) } catch (err) { logger.error(err.message) } } -export async function initConnection(genesisBlockHash: string) { - await initConnectionWithType(genesisBlockHash, 'full') - await initConnectionWithType(genesisBlockHash, 'light') -} - export function migrateDBFile(genesisBlockHash: string) { const originDBFile = dbPath(genesisBlockHash, 'cell') const currentFullDBFile = dbPath(genesisBlockHash, 'full') @@ -203,4 +201,7 @@ export function migrateDBFile(genesisBlockHash: string) { } } -export default initConnection +export default async function initConnection(genesisBlockHash: string) { + await initConnectionWithType(genesisBlockHash, 'full') + await initConnectionWithType(genesisBlockHash, 'light') +} diff --git a/packages/neuron-wallet/src/database/chain/subscriber/asset-account-subscriber.ts b/packages/neuron-wallet/src/database/chain/subscriber/asset-account-subscriber.ts index 7e06e8db0d..9f4aa3dbeb 100644 --- a/packages/neuron-wallet/src/database/chain/subscriber/asset-account-subscriber.ts +++ b/packages/neuron-wallet/src/database/chain/subscriber/asset-account-subscriber.ts @@ -15,7 +15,7 @@ export default class AssetAccountSubscribe extends UserSettingSubscriber): Promise { const repo = this.getNeedSyncConnection(event.connection.name)?.getRepository(AssetAccount) if (repo && event.entity) { - const exist = await repo.findOne({ tokenID: event.entity.tokenID, blake160: event.entity.blake160 }) + const exist = await repo.findOneBy({ tokenID: event.entity.tokenID, blake160: event.entity.blake160 }) if (exist) { await repo.upsert(AssetAccount.fromModel(event.entity.toModel()), this.unionKeys) } else { diff --git a/packages/neuron-wallet/src/database/chain/subscriber/sudt-token-info-subscriber.ts b/packages/neuron-wallet/src/database/chain/subscriber/sudt-token-info-subscriber.ts index 5682bb5fa6..c24f777126 100644 --- a/packages/neuron-wallet/src/database/chain/subscriber/sudt-token-info-subscriber.ts +++ b/packages/neuron-wallet/src/database/chain/subscriber/sudt-token-info-subscriber.ts @@ -18,7 +18,9 @@ export default class SudtTokenInfoSubscribe extends UserSettingSubscriber = new (...args: unknown[]) => T diff --git a/packages/neuron-wallet/src/models/synced-block-number.ts b/packages/neuron-wallet/src/models/synced-block-number.ts index 35f98e9e0a..b76e9b92b0 100644 --- a/packages/neuron-wallet/src/models/synced-block-number.ts +++ b/packages/neuron-wallet/src/models/synced-block-number.ts @@ -28,7 +28,7 @@ export default class SyncedBlockNumber { if (!this.#blockNumberEntity) { let blockNumber = await getConnection() .getRepository(SyncInfoEntity) - .findOne({ name: SyncInfoEntity.CURRENT_BLOCK_NUMBER }) + .findOneBy({ name: SyncInfoEntity.CURRENT_BLOCK_NUMBER }) if (!blockNumber) { blockNumber = new SyncInfoEntity() diff --git a/packages/neuron-wallet/src/services/amend-transaction.ts b/packages/neuron-wallet/src/services/amend-transaction.ts index 9933787483..b3eb96f545 100644 --- a/packages/neuron-wallet/src/services/amend-transaction.ts +++ b/packages/neuron-wallet/src/services/amend-transaction.ts @@ -3,7 +3,7 @@ import AmendTransactionEntity from '../database/chain/entities/amend-transaction export default class AmendTransactionService { static async save(hash: string, amendHash: string) { - const exist = await getConnection().getRepository(AmendTransactionEntity).findOne({ + const exist = await getConnection().getRepository(AmendTransactionEntity).findOneBy({ hash, amendHash, }) diff --git a/packages/neuron-wallet/src/services/asset-account-service.ts b/packages/neuron-wallet/src/services/asset-account-service.ts index 7dc8f4689c..991338a744 100644 --- a/packages/neuron-wallet/src/services/asset-account-service.ts +++ b/packages/neuron-wallet/src/services/asset-account-service.ts @@ -1,4 +1,4 @@ -import { In } from 'typeorm' +import { In, IsNull } from 'typeorm' import { getConnection } from '../database/chain/connection' import BufferUtils from '../utils/buffer' import OutputEntity from '../database/chain/entities/output' @@ -22,19 +22,13 @@ export default class AssetAccountService { private static async getACPCells(publicKeyHash: string, tokenId: string = 'CKBytes') { const assetAccountInfo = new AssetAccountInfo() const anyoneCanPayLockHash = assetAccountInfo.generateAnyoneCanPayScript(publicKeyHash).computeHash() - let typeHash = null - if (tokenId !== 'CKBytes') { - typeHash = assetAccountInfo.generateSudtScript(tokenId).computeHash() - } const outputs = await getConnection() .getRepository(OutputEntity) - .createQueryBuilder('output') - .where({ + .findBy({ status: In([OutputStatus.Live, OutputStatus.Sent]), lockHash: anyoneCanPayLockHash, - typeHash, + typeHash: tokenId !== 'CKBytes' ? assetAccountInfo.generateSudtScript(tokenId).computeHash() : IsNull(), }) - .getMany() return outputs } diff --git a/packages/neuron-wallet/src/services/cells.ts b/packages/neuron-wallet/src/services/cells.ts index 82972a2d65..03e8cc0a1f 100644 --- a/packages/neuron-wallet/src/services/cells.ts +++ b/packages/neuron-wallet/src/services/cells.ts @@ -506,7 +506,7 @@ export default class CellsService { } public static getLiveCell = async (outPoint: OutPoint): Promise => { - const cellEntity: OutputEntity | undefined = await CellsService.getLiveCellEntity(outPoint) + const cellEntity = await CellsService.getLiveCellEntity(outPoint) if (!cellEntity) { return undefined @@ -515,8 +515,8 @@ export default class CellsService { return cellEntity.toModel() } - private static getLiveCellEntity = async (outPoint: OutPoint): Promise => { - const cellEntity: OutputEntity | undefined = await getConnection().getRepository(OutputEntity).findOne({ + private static getLiveCellEntity = async (outPoint: OutPoint): Promise => { + const cellEntity = await getConnection().getRepository(OutputEntity).findOneBy({ outPointTxHash: outPoint.txHash, outPointIndex: outPoint.index, status: 'live', diff --git a/packages/neuron-wallet/src/services/sudt-token-info.ts b/packages/neuron-wallet/src/services/sudt-token-info.ts index c24f06ad79..7195f2cdb2 100644 --- a/packages/neuron-wallet/src/services/sudt-token-info.ts +++ b/packages/neuron-wallet/src/services/sudt-token-info.ts @@ -41,7 +41,7 @@ export default class SudtTokenInfoService { .execute() } - static getSudtTokenInfo(typeArgs: string): Promise { + static getSudtTokenInfo(typeArgs: string): Promise { return getConnection() .getRepository(SudtTokenInfoEntity) .createQueryBuilder('info') diff --git a/packages/neuron-wallet/src/services/sync-progress.ts b/packages/neuron-wallet/src/services/sync-progress.ts index 47362710a4..3a83221b6a 100644 --- a/packages/neuron-wallet/src/services/sync-progress.ts +++ b/packages/neuron-wallet/src/services/sync-progress.ts @@ -111,7 +111,7 @@ export default class SyncProgressService { } static async getOtherTypeSyncBlockNumber() { - const items = await getConnection().getRepository(SyncProgress).find({ + const items = await getConnection().getRepository(SyncProgress).findBy({ addressType: SyncAddressType.Multisig, }) return items.reduce>((pre, cur) => ({ ...pre, [cur.hash]: cur.localSavedBlockNumber }), {}) diff --git a/packages/neuron-wallet/src/services/tx/transaction-persistor.ts b/packages/neuron-wallet/src/services/tx/transaction-persistor.ts index 7298ded15f..3eeecd3a61 100644 --- a/packages/neuron-wallet/src/services/tx/transaction-persistor.ts +++ b/packages/neuron-wallet/src/services/tx/transaction-persistor.ts @@ -24,9 +24,7 @@ export class TransactionPersistor { // 1. If the tx is not persisted before sending, output = sent, input = pending // 2. If the tx is already persisted before sending, do nothing private static saveWithSent = async (transaction: Transaction): Promise => { - const txEntity: TransactionEntity | undefined = await getConnection() - .getRepository(TransactionEntity) - .findOne(transaction.hash) + const txEntity = await getConnection().getRepository(TransactionEntity).findOneBy({ hash: transaction.hash }) if (txEntity && txEntity.status === TransactionStatus.Failed) { // delete and create a new one (OR just update all status) @@ -51,9 +49,9 @@ export class TransactionPersistor { lockArgsSetNeedsDetail?: Set ): Promise => { const connection = getConnection() - const txEntity: TransactionEntity | undefined = await connection + const txEntity: TransactionEntity | null = await connection .getRepository(TransactionEntity) - .findOne(transaction.hash) + .findOneBy({ hash: transaction.hash }) // update multiSignBlake160 / input.type / input.data / output.data if (txEntity) { @@ -151,7 +149,7 @@ export class TransactionPersistor { const outPoint: OutPoint | null = input.previousOutput() if (outPoint) { - const outputEntity: OutputEntity | undefined = await connection.getRepository(OutputEntity).findOne({ + const outputEntity = await connection.getRepository(OutputEntity).findOneBy({ outPointTxHash: outPoint.txHash, outPointIndex: outPoint.index, }) @@ -257,7 +255,7 @@ export class TransactionPersistor { inputs.push(input) if (outPoint) { - const previousOutput: OutputEntity | undefined = await connection.getRepository(OutputEntity).findOne({ + const previousOutput = await connection.getRepository(OutputEntity).findOneBy({ outPointTxHash: outPoint.txHash, outPointIndex: outPoint.index, }) @@ -271,7 +269,7 @@ export class TransactionPersistor { } const outputsData = transaction.outputsData! - const useTxInputs = await connection.getRepository(InputEntity).find({ outPointTxHash: tx.hash }) + const useTxInputs = await connection.getRepository(InputEntity).findBy({ outPointTxHash: tx.hash }) const useTxIndices = new Set(useTxInputs.map(v => v.outPointIndex)) const outputs: OutputEntity[] = transaction.outputs.map((o, index) => { const output = new OutputEntity() diff --git a/packages/neuron-wallet/tests/controllers/multisig.test.ts b/packages/neuron-wallet/tests/controllers/multisig.test.ts index 564f1e8fd7..fff2030f95 100644 --- a/packages/neuron-wallet/tests/controllers/multisig.test.ts +++ b/packages/neuron-wallet/tests/controllers/multisig.test.ts @@ -141,6 +141,7 @@ describe('test for multisig controller', () => { blake160s: [], alias: 'string', changed: expect.any(Function), + lastestBlockNumber: '', } await multisigController.saveConfig(params) expect(MultiSigServiceMock.prototype.saveMultisigConfig).toHaveBeenCalledWith(params) diff --git a/packages/neuron-wallet/tests/models/synced-block-number.intg.test.ts b/packages/neuron-wallet/tests/models/synced-block-number.intg.test.ts index c4a7855960..2a8fc4f8ff 100644 --- a/packages/neuron-wallet/tests/models/synced-block-number.intg.test.ts +++ b/packages/neuron-wallet/tests/models/synced-block-number.intg.test.ts @@ -1,5 +1,3 @@ -import { closeConnection, getConnection, initConnection } from '../setupAndTeardown' - const stubbedSyncedBlockNumberSubjectNext = jest.fn() const stubbedLoggerInfo = jest.fn() @@ -14,6 +12,8 @@ jest.mock('utils/logger', () => { } }) +import { closeConnection, getConnection, initConnection } from '../setupAndTeardown' + describe('SyncedBlockNumber model', () => { let SyncedBlockNumber: any beforeAll(async () => { diff --git a/packages/neuron-wallet/tests/services/address.test.ts b/packages/neuron-wallet/tests/services/address.test.ts index 98bbf90d12..e64ba06a46 100644 --- a/packages/neuron-wallet/tests/services/address.test.ts +++ b/packages/neuron-wallet/tests/services/address.test.ts @@ -123,7 +123,7 @@ describe('integration tests for AddressService', () => { let generatedAddresses: Address[] beforeAll(async () => { - await initConnection('') + await initConnection() }) afterAll(async () => { diff --git a/packages/neuron-wallet/tests/services/asset-account-service.test.ts b/packages/neuron-wallet/tests/services/asset-account-service.test.ts index 39842abbbe..713ba1d5a0 100644 --- a/packages/neuron-wallet/tests/services/asset-account-service.test.ts +++ b/packages/neuron-wallet/tests/services/asset-account-service.test.ts @@ -132,7 +132,7 @@ describe('AssetAccountService', () => { const AssetAccountService = require('../../src/services/asset-account-service').default beforeAll(async () => { - await initConnection('0x1234') + await initConnection() }) afterAll(async () => { diff --git a/packages/neuron-wallet/tests/services/cell-local-info.test.ts b/packages/neuron-wallet/tests/services/cell-local-info.test.ts index 188d4f6ac7..066f906415 100644 --- a/packages/neuron-wallet/tests/services/cell-local-info.test.ts +++ b/packages/neuron-wallet/tests/services/cell-local-info.test.ts @@ -106,13 +106,13 @@ describe('CellLocalInfoService', () => { describe('updateLiveCellLockStatus', () => { it('create new entity', async () => { await CellLocalInfoService.updateLiveCellLockStatus(outPoints, true) - await expect(getConnection().getRepository(CellLocalInfo).find({ locked: true })).resolves.toHaveLength(2) + await expect(getConnection().getRepository(CellLocalInfo).findBy({ locked: true })).resolves.toHaveLength(2) }) it('update entity locked', async () => { await CellLocalInfoService.updateLiveCellLockStatus(outPoints, true) - await expect(getConnection().getRepository(CellLocalInfo).find({ locked: true })).resolves.toHaveLength(2) + await expect(getConnection().getRepository(CellLocalInfo).findBy({ locked: true })).resolves.toHaveLength(2) await CellLocalInfoService.updateLiveCellLockStatus(outPoints, false) - await expect(getConnection().getRepository(CellLocalInfo).find({ locked: false })).resolves.toHaveLength(2) + await expect(getConnection().getRepository(CellLocalInfo).findBy({ locked: false })).resolves.toHaveLength(2) }) }) diff --git a/packages/neuron-wallet/tests/services/multisig.test.ts b/packages/neuron-wallet/tests/services/multisig.test.ts index 18933d0d7d..4f0e72fe7e 100644 --- a/packages/neuron-wallet/tests/services/multisig.test.ts +++ b/packages/neuron-wallet/tests/services/multisig.test.ts @@ -70,7 +70,7 @@ describe('multisig service', () => { const multisigOutput = MultisigOutput.fromIndexer(defaultOutput) beforeAll(async () => { - await initConnection('0x1234') + await initConnection() }) afterAll(async () => { diff --git a/packages/neuron-wallet/tests/services/sudt-token-info.test.ts b/packages/neuron-wallet/tests/services/sudt-token-info.test.ts index 88e6d96d66..f89fd33088 100644 --- a/packages/neuron-wallet/tests/services/sudt-token-info.test.ts +++ b/packages/neuron-wallet/tests/services/sudt-token-info.test.ts @@ -162,13 +162,13 @@ describe('sudt token info service', () => { }) it('no token info', async () => { - await expect(SudtTokenInfoService.getSudtTokenInfo('0x')).resolves.toBeUndefined() + await expect(SudtTokenInfoService.getSudtTokenInfo('0x')).resolves.toBeNull() }) it('token info not match', async () => { const entity = AssetAccountEntity.fromModel(assetAccount) await getConnection().manager.save([entity.sudtTokenInfo, entity]) - await expect(SudtTokenInfoService.getSudtTokenInfo(`0x${'00'.repeat(20)}`)).resolves.toBeUndefined() + await expect(SudtTokenInfoService.getSudtTokenInfo(`0x${'00'.repeat(20)}`)).resolves.toBeNull() }) it('match token info', async () => { diff --git a/packages/neuron-wallet/tests/services/transactions.test.ts b/packages/neuron-wallet/tests/services/transactions.test.ts index 8abca504b8..f8882620b1 100644 --- a/packages/neuron-wallet/tests/services/transactions.test.ts +++ b/packages/neuron-wallet/tests/services/transactions.test.ts @@ -64,7 +64,7 @@ describe('transactions service', () => { let hashes: string[] beforeAll(async () => { - await initConnection('0x1234') + await initConnection() }) afterAll(async () => { diff --git a/packages/neuron-wallet/tests/services/tx/transaction-generator.test.ts b/packages/neuron-wallet/tests/services/tx/transaction-generator.test.ts index 12db6c9f6f..2b3ce20801 100644 --- a/packages/neuron-wallet/tests/services/tx/transaction-generator.test.ts +++ b/packages/neuron-wallet/tests/services/tx/transaction-generator.test.ts @@ -90,7 +90,7 @@ import { closeConnection, getConnection, initConnection } from '../../setupAndTe describe('TransactionGenerator', () => { beforeAll(async () => { - await initConnection('0x1234') + await initConnection() // @ts-ignore: Private method SystemScriptInfo.getInstance().secpOutPointInfo = new Map([ diff --git a/packages/neuron-wallet/tests/services/tx/transaction-persistor.test.ts b/packages/neuron-wallet/tests/services/tx/transaction-persistor.test.ts index 78c3ac4f91..e39e3d482f 100644 --- a/packages/neuron-wallet/tests/services/tx/transaction-persistor.test.ts +++ b/packages/neuron-wallet/tests/services/tx/transaction-persistor.test.ts @@ -16,7 +16,7 @@ const [tx, tx2] = transactions describe('TransactionPersistor', () => { beforeAll(async () => { - await initConnection('') + await initConnection() }) afterAll(async () => { @@ -91,7 +91,7 @@ describe('TransactionPersistor', () => { expect(loadedTx?.inputs.length).toBe(0) expect(loadedTx?.outputs.length).toBe(1) expect(loadedTx?.outputs[0].lockArgs).toBe(tx.outputs[0].lock.args) - const txLocks = await getConnection().getRepository(TxLockEntity).find({ transactionHash: tx.hash }) + const txLocks = await getConnection().getRepository(TxLockEntity).findBy({ transactionHash: tx.hash }) expect(txLocks.length).toBe(1) expect(txLocks[0].lockHash).toBe(tx.inputs[0].lock?.computeHash()) }) @@ -109,7 +109,7 @@ describe('TransactionPersistor', () => { .getOne() expect(loadedTx?.inputs.length).toBe(1) expect(loadedTx?.outputs.length).toBe(2) - const txLocks = await getConnection().getRepository(TxLockEntity).find({ transactionHash: tx.hash }) + const txLocks = await getConnection().getRepository(TxLockEntity).findBy({ transactionHash: tx.hash }) expect(txLocks.length).toBe(0) }) it('filter with receive cheque and send cheque', async () => { @@ -139,7 +139,7 @@ describe('TransactionPersistor', () => { .getOne() expect(loadedTx?.inputs.length).toBe(1) expect(loadedTx?.outputs.length).toBe(2) - const txLocks = await getConnection().getRepository(TxLockEntity).find({ transactionHash: tx.hash }) + const txLocks = await getConnection().getRepository(TxLockEntity).findBy({ transactionHash: tx.hash }) expect(txLocks.length).toBe(0) }) it('filter with multi lock time', async () => { @@ -162,7 +162,7 @@ describe('TransactionPersistor', () => { .getOne() expect(loadedTx?.inputs.length).toBe(1) expect(loadedTx?.outputs.length).toBe(2) - const txLocks = await getConnection().getRepository(TxLockEntity).find({ transactionHash: tx.hash }) + const txLocks = await getConnection().getRepository(TxLockEntity).findBy({ transactionHash: tx.hash }) expect(txLocks.length).toBe(0) }) }) @@ -238,7 +238,7 @@ describe('TransactionPersistor', () => { //@ts-ignore private method await TransactionPersistor.saveWithFetch(tx) expect(createMock).toBeCalledTimes(0) - const output = await getConnection().getRepository(OutputEntity).findOne({ outPointTxHash: entity.hash }) + const output = await getConnection().getRepository(OutputEntity).findOneBy({ outPointTxHash: entity.hash }) expect(output?.status).toBe(OutputStatus.Live) }) it('update live output to dead because refer to input', async () => { @@ -247,7 +247,7 @@ describe('TransactionPersistor', () => { await originalCreate(tx2, OutputStatus.Sent, OutputStatus.Pending) //@ts-ignore private method await TransactionPersistor.saveWithFetch(tx2) - const output = await getConnection().getRepository(OutputEntity).findOne({ + const output = await getConnection().getRepository(OutputEntity).findOneBy({ outPointTxHash: tx2.inputs[0].previousOutput?.txHash, outPointIndex: tx2.inputs[0].previousOutput?.index, }) @@ -262,7 +262,7 @@ describe('TransactionPersistor', () => { it('set output to dead if it is in input', async () => { await TransactionPersistor.convertTransactionAndSave(tx2, TxSaveType.Sent) await TransactionPersistor.convertTransactionAndSave(tx, TxSaveType.Sent) - const output = await getConnection().getRepository(OutputEntity).findOne({ + const output = await getConnection().getRepository(OutputEntity).findOneBy({ outPointTxHash: tx2.inputs[0].previousOutput?.txHash, outPointIndex: tx2.inputs[0].previousOutput?.index, }) @@ -300,15 +300,15 @@ describe('TransactionPersistor', () => { }) await getConnection().manager.save([txLocks, hdPublicKeyInfo]) await TransactionPersistor.convertTransactionAndSave(tx, TxSaveType.Sent) - let output = await getConnection().getRepository(OutputEntity).findOne({ outPointTxHash: tx.hash }) - let input = await getConnection().getRepository(InputEntity).findOne({ transactionHash: tx.hash }) + let output = await getConnection().getRepository(OutputEntity).findOneBy({ outPointTxHash: tx.hash }) + let input = await getConnection().getRepository(InputEntity).findOneBy({ transactionHash: tx.hash }) expect(output).toBeDefined() expect(input).toBeDefined() await TransactionPersistor.checkTxLock() - output = await getConnection().getRepository(OutputEntity).findOne({ outPointTxHash: tx.hash }) - input = await getConnection().getRepository(InputEntity).findOne({ transactionHash: tx.hash }) - expect(output).toBeUndefined() - expect(input).toBeUndefined() + output = await getConnection().getRepository(OutputEntity).findOneBy({ outPointTxHash: tx.hash }) + input = await getConnection().getRepository(InputEntity).findOneBy({ transactionHash: tx.hash }) + expect(output).toBeNull() + expect(input).toBeNull() }) }) @@ -317,8 +317,8 @@ describe('TransactionPersistor', () => { let outputEntities: OutputEntity[] = [] beforeAll(async () => { await TransactionPersistor.convertTransactionAndSave(tx, TxSaveType.Sent) - inputEntities = await getConnection().getRepository(InputEntity).find({ transactionHash: tx.hash }) - outputEntities = await getConnection().getRepository(OutputEntity).find({ outPointTxHash: tx.hash }) + inputEntities = await getConnection().getRepository(InputEntity).findBy({ transactionHash: tx.hash }) + outputEntities = await getConnection().getRepository(OutputEntity).findBy({ outPointTxHash: tx.hash }) }) it('no filter', () => { const cells = [...inputEntities, ...outputEntities] diff --git a/packages/neuron-wallet/tests/services/wallets.test.ts b/packages/neuron-wallet/tests/services/wallets.test.ts index f696f2c270..f6c79028a4 100644 --- a/packages/neuron-wallet/tests/services/wallets.test.ts +++ b/packages/neuron-wallet/tests/services/wallets.test.ts @@ -58,7 +58,7 @@ describe('wallet service', () => { const fakeChainCode = 'codecodecodecodecodecodecodecodecodecodecodecodecodecodecodecode' beforeAll(async () => { - await initConnection('') + await initConnection() }) afterAll(async () => { diff --git a/packages/neuron-wallet/tests/setupAndTeardown/index.ts b/packages/neuron-wallet/tests/setupAndTeardown/index.ts index b2fd2ff5d6..3a725fc654 100644 --- a/packages/neuron-wallet/tests/setupAndTeardown/index.ts +++ b/packages/neuron-wallet/tests/setupAndTeardown/index.ts @@ -1,16 +1,16 @@ import initDB from '../../src/database/chain/ormconfig' -import { getConnection as originGetConnection } from 'typeorm' import { TransactionPersistor } from '../../src/services/tx' import AssetAccount from '../../src/models/asset-account' import OutputEntity from '../../src/database/chain/entities/output' import AssetAccountEntity from '../../src/database/chain/entities/asset-account' +import { getConnection as originGetConnection } from '../../src/database/chain/connection' export const initConnection = (genesisBlockHash?: string) => { return initDB(genesisBlockHash ?? ':memory:') } export const closeConnection = () => { - return originGetConnection('full').close() + return originGetConnection('full').destroy() } export const getConnection = () => { diff --git a/yarn.lock b/yarn.lock index 4ec9e2df91..62b7b614f9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4218,7 +4218,7 @@ lodash "^4.17.21" whatwg-mimetype "^3.0.0" -"@sqltools/formatter@^1.2.2": +"@sqltools/formatter@^1.2.5": version "1.2.5" resolved "https://registry.yarnpkg.com/@sqltools/formatter/-/formatter-1.2.5.tgz#3abc203c79b8c3e90fd6c156a0c62d5403520e12" integrity sha512-Uy0+khmZqUrUGm5dmMqVlnvufZRSK0FbYzVgp0UMstm+F5+W2/jnEEQyc9vo1ZR/E5ZI/B1WjjoTqBqwJL6Krw== @@ -5965,11 +5965,6 @@ dependencies: "@types/node" "*" -"@types/zen-observable@0.8.3": - version "0.8.3" - resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3" - integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw== - "@typescript-eslint/eslint-plugin@6.16.0": version "6.16.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.16.0.tgz#cc29fbd208ea976de3db7feb07755bba0ce8d8bc" @@ -6768,7 +6763,7 @@ app-root-dir@^1.0.2: resolved "https://registry.yarnpkg.com/app-root-dir/-/app-root-dir-1.0.2.tgz#38187ec2dea7577fff033ffcb12172692ff6e118" integrity sha512-jlpIfsOoNoafl92Sz//64uQHGSyMrD2vYG5d8o2a4qGvyNCvXur7bzIsWtAC/6flI2RYAp3kv8rsfBtaLm7w0g== -app-root-path@^3.0.0: +app-root-path@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-3.1.0.tgz#5971a2fc12ba170369a7a1ef018c71e6e47c2e86" integrity sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA== @@ -8971,7 +8966,7 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -date-fns@^2.30.0: +date-fns@^2.29.3, 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== @@ -9510,7 +9505,7 @@ dotenv-expand@^5.1.0: resolved "https://registry.yarnpkg.com/dotenv-expand/-/dotenv-expand-5.1.0.tgz#3fbaf020bfd794884072ea26b1e9791d45a629f0" integrity sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA== -dotenv@8.6.0, dotenv@^8.2.0: +dotenv@8.6.0: version "8.6.0" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.6.0.tgz#061af664d19f7f4d8fc6e4ff9b584ce237adcb8b" integrity sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g== @@ -9525,6 +9520,11 @@ dotenv@^16.0.0, dotenv@~16.3.1: resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== +dotenv@^16.0.3: + version "16.4.4" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.4.tgz#a26e7bb95ebd36272ebb56edb80b826aecf224c1" + integrity sha512-XvPXc8XAQThSjAbY6cQ/9PcBXmFoWuw1sQ3b8HqUCR6ziGXjkTi//kB9SWa2UwqlgdAIuRqAa/9hVljzPehbYg== + dotenv@^9.0.2: version "9.0.2" resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-9.0.2.tgz#dacc20160935a37dea6364aa1bef819fb9b6ab05" @@ -11461,7 +11461,7 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.0, glob@^8.0.1: +glob@^8.0.0, glob@^8.0.1, glob@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/glob/-/glob-8.1.0.tgz#d388f656593ef708ee3e34640fdfb99a9fd1c33e" integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== @@ -13516,7 +13516,7 @@ js-xxhash@^1.0.4: resolved "https://registry.yarnpkg.com/js-xxhash/-/js-xxhash-1.0.4.tgz#ce465d8a5c038167a07aa35a855c0bd792fe8e06" integrity sha512-S/6Oo7ruxx5k8m4qlMnbpwQdJjRsvvfcIhIk1dA9c5y5GNhYHKYKu9krEK3QgBax6CxJuf4gRL2opgLkdzWIKg== -js-yaml@4.1.0, js-yaml@^4.0.0, js-yaml@^4.1.0: +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== @@ -14753,6 +14753,11 @@ mkdirp@^1.0.3, mkdirp@^1.0.4: resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== +mkdirp@^2.1.3: + version "2.1.6" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-2.1.6.tgz#964fbcb12b2d8c5d6fbc62a963ac95a273e2cc19" + integrity sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A== + modify-values@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/modify-values/-/modify-values-1.0.1.tgz#b3939fa605546474e3e3e3c63d64bd43b4ee6022" @@ -17938,7 +17943,7 @@ sass@1.69.5: immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" -sax@>=0.6.0, sax@^1.2.4, sax@~1.2.4: +sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== @@ -19479,7 +19484,7 @@ tslib@2.3.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== -tslib@2.6.2: +tslib@2.6.2, tslib@^2.5.0: version "2.6.2" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -19654,28 +19659,26 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typeorm@0.2.45: - version "0.2.45" - resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.45.tgz#e5bbb3af822dc4646bad96cfa48cd22fa4687cea" - integrity sha512-c0rCO8VMJ3ER7JQ73xfk0zDnVv0WDjpsP6Q1m6CVKul7DB9iVdWLRjPzc8v2eaeBuomsbZ2+gTaYr8k1gm3bYA== +typeorm@0.3.17: + version "0.3.17" + resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.3.17.tgz#a73c121a52e4fbe419b596b244777be4e4b57949" + integrity sha512-UDjUEwIQalO9tWw9O2A4GU+sT3oyoUXheHJy4ft+RFdnRdQctdQ34L9SqE2p7LdwzafHx1maxT+bqXON+Qnmig== dependencies: - "@sqltools/formatter" "^1.2.2" - app-root-path "^3.0.0" + "@sqltools/formatter" "^1.2.5" + app-root-path "^3.1.0" buffer "^6.0.3" - chalk "^4.1.0" + chalk "^4.1.2" cli-highlight "^2.1.11" - debug "^4.3.1" - dotenv "^8.2.0" - glob "^7.1.6" - js-yaml "^4.0.0" - mkdirp "^1.0.4" + date-fns "^2.29.3" + debug "^4.3.4" + dotenv "^16.0.3" + glob "^8.1.0" + mkdirp "^2.1.3" reflect-metadata "^0.1.13" sha.js "^2.4.11" - tslib "^2.1.0" - uuid "^8.3.2" - xml2js "^0.4.23" - yargs "^17.0.1" - zen-observable-ts "^1.0.0" + tslib "^2.5.0" + uuid "^9.0.0" + yargs "^17.6.2" typescript@5.3.3: version "5.3.3" @@ -20725,24 +20728,11 @@ xml-name-validator@^3.0.0: resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== -xml2js@^0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.23.tgz#a0c69516752421eb2ac758ee4d4ccf58843eac66" - integrity sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug== - dependencies: - sax ">=0.6.0" - xmlbuilder "~11.0.0" - xmlbuilder@>=11.0.1, xmlbuilder@^15.1.1: version "15.1.1" resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-15.1.1.tgz#9dcdce49eea66d8d10b42cae94a79c3c8d0c2ec5" integrity sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg== -xmlbuilder@~11.0.0: - version "11.0.1" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-11.0.1.tgz#be9bae1c8a046e76b31127726347d0ad7002beb3" - integrity sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA== - xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" @@ -20798,7 +20788,7 @@ yargs-parser@^20.2.2, yargs-parser@^20.2.3: resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== -yargs@17.7.2, yargs@^17.0.1, yargs@^17.6.2, yargs@^17.7.2: +yargs@17.7.2, 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== @@ -20837,19 +20827,6 @@ yocto-queue@^0.1.0: resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== -zen-observable-ts@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/zen-observable-ts/-/zen-observable-ts-1.1.0.tgz#2d1aa9d79b87058e9b75698b92791c1838551f83" - integrity sha512-1h4zlLSqI2cRLPJUHJFL8bCWHhkpuXkF+dbGkRaWjgDIG26DmzyshUMrdV/rL3UnR+mhaX4fRq8LPouq0MYYIA== - dependencies: - "@types/zen-observable" "0.8.3" - zen-observable "0.8.15" - -zen-observable@0.8.15: - version "0.8.15" - resolved "https://registry.yarnpkg.com/zen-observable/-/zen-observable-0.8.15.tgz#96415c512d8e3ffd920afd3889604e30b9eaac15" - integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== - zip-stream@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-5.0.1.tgz#cf3293bba121cad98be2ec7f05991d81d9f18134"