diff --git a/packages/node-core/CHANGELOG.md b/packages/node-core/CHANGELOG.md index a39fdc1474..cdf584710e 100644 --- a/packages/node-core/CHANGELOG.md +++ b/packages/node-core/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Fix import path (#2605) + ## [15.0.1] - 2024-11-25 ### Changed - Update polkadot/api library to 14 version diff --git a/packages/node-core/src/indexer/StoreOperations.test.ts b/packages/node-core/src/indexer/StoreOperations.test.ts index 8aa156197b..c311628209 100644 --- a/packages/node-core/src/indexer/StoreOperations.test.ts +++ b/packages/node-core/src/indexer/StoreOperations.test.ts @@ -2,10 +2,10 @@ // SPDX-License-Identifier: GPL-3.0 import assert from 'assert'; -import {CachedModel, DbOption, handledStringify, modelsTypeToModelAttributes, NodeConfig} from '@subql/node-core'; import {Entity, FunctionPropertyNames, Store} from '@subql/types-core'; -import {Boolean, GraphQLModelsType, Int, u8aToHex} from '@subql/utils'; +import {GraphQLModelsType, u8aToHex} from '@subql/utils'; import {Sequelize} from '@subql/x-sequelize'; +import {CachedModel, DbOption, handledStringify, modelsTypeToModelAttributes, NodeConfig} from '../'; import {EntityClass} from './store/entity'; import {StoreOperations} from './StoreOperations'; import {OperationType} from './types'; diff --git a/packages/node-core/src/indexer/storeModelProvider/baseStoreModel.service.ts b/packages/node-core/src/indexer/storeModelProvider/baseStoreModel.service.ts index cabe23b545..7750f2567f 100644 --- a/packages/node-core/src/indexer/storeModelProvider/baseStoreModel.service.ts +++ b/packages/node-core/src/indexer/storeModelProvider/baseStoreModel.service.ts @@ -1,15 +1,15 @@ // Copyright 2020-2024 SubQuery Pte Ltd authors & contributors // SPDX-License-Identifier: GPL-3.0 -import { BeforeApplicationShutdown } from '@nestjs/common'; -import { getLogger } from '@subql/node-core/logger'; -import { ModelStatic } from '@subql/x-sequelize'; -import { MetadataRepo, PoiRepo } from '../entities'; -import { HistoricalMode } from '../types'; -import { METADATA_ENTITY_NAME } from './metadata/utils'; -import { BaseEntity, IModel } from './model'; -import { POI_ENTITY_NAME } from './poi'; -import { Exporter } from './types'; +import {BeforeApplicationShutdown} from '@nestjs/common'; +import {ModelStatic} from '@subql/x-sequelize'; +import {getLogger} from '../../logger'; +import {MetadataRepo, PoiRepo} from '../entities'; +import {HistoricalMode} from '../types'; +import {METADATA_ENTITY_NAME} from './metadata/utils'; +import {BaseEntity, IModel} from './model'; +import {POI_ENTITY_NAME} from './poi'; +import {Exporter} from './types'; const logger = getLogger('BaseStoreModelService'); export abstract class BaseStoreModelService> implements BeforeApplicationShutdown { @@ -40,7 +40,7 @@ export abstract class BaseStoreModelService> implements BeforeAp return this.cachedModels[entity] as IModel; } - updateModels({ modifiedModels, removedModels }: { modifiedModels: ModelStatic[]; removedModels: string[] }): void { + updateModels({modifiedModels, removedModels}: {modifiedModels: ModelStatic[]; removedModels: string[]}): void { modifiedModels.forEach((m) => { this.cachedModels[m.name] = this.createModel(m.name); }); diff --git a/packages/node-core/src/indexer/storeModelProvider/metadata/metadata.ts b/packages/node-core/src/indexer/storeModelProvider/metadata/metadata.ts index 45b0108463..07772d1df7 100644 --- a/packages/node-core/src/indexer/storeModelProvider/metadata/metadata.ts +++ b/packages/node-core/src/indexer/storeModelProvider/metadata/metadata.ts @@ -2,8 +2,8 @@ // SPDX-License-Identifier: GPL-3.0 import assert from 'assert'; -import {hasValue} from '@subql/node-core/utils'; import {Op, Transaction} from '@subql/x-sequelize'; +import {hasValue} from '../../../utils'; import {DatasourceParams} from '../../dynamic-ds.service'; import {Metadata, MetadataKeys, MetadataRepo} from '../../entities'; import {APPEND_DS_QUERY, INCREMENT_QUERY} from './utils'; diff --git a/packages/node-core/src/indexer/storeModelProvider/model/model.test.ts b/packages/node-core/src/indexer/storeModelProvider/model/model.test.ts index 7932162a18..a086d549b3 100644 --- a/packages/node-core/src/indexer/storeModelProvider/model/model.test.ts +++ b/packages/node-core/src/indexer/storeModelProvider/model/model.test.ts @@ -1,10 +1,10 @@ // Copyright 2020-2024 SubQuery Pte Ltd authors & contributors // SPDX-License-Identifier: GPL-3.0 -import {DbOption} from '@subql/node-core/db'; import {DataTypes, Sequelize} from '@subql/x-sequelize'; import _ from 'lodash'; import {NodeConfig} from '../../../configure'; +import {DbOption} from '../../../db'; import {CachedModel} from './cacheModel'; import {PlainModel} from './model'; diff --git a/packages/node-core/src/indexer/storeModelProvider/utils.ts b/packages/node-core/src/indexer/storeModelProvider/utils.ts index 8e8782b251..482bd6a145 100644 --- a/packages/node-core/src/indexer/storeModelProvider/utils.ts +++ b/packages/node-core/src/indexer/storeModelProvider/utils.ts @@ -3,8 +3,8 @@ import {EventEmitter2} from '@nestjs/event-emitter'; import {SchedulerRegistry} from '@nestjs/schedule'; -import {NodeConfig} from '@subql/node-core/configure'; import {Sequelize} from '@subql/x-sequelize'; +import {NodeConfig} from '../../configure'; import {StoreCacheService} from './storeCache.service'; import {PlainStoreModelService} from './storeModel.service'; import {IStoreModelProvider} from './types'; diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md index 5cbc50fda8..f4e617ed79 100644 --- a/packages/node/CHANGELOG.md +++ b/packages/node/CHANGELOG.md @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed +- Fix import path (#2605) + ## [5.4.0] - 2024-11-25 ### Changed - Improve event iteration, this improves performance with large blocks (#2601)