From: Jérôme Benoit Date: Fri, 19 May 2023 10:51:27 +0000 (+0200) Subject: refactor: revert internal exports X-Git-Tag: v1.2.14~49 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=c1565026eb14b8bf6aa494c89ccbfcea1ff1dc67;p=e-mobility-charging-stations-simulator.git refactor: revert internal exports Signed-off-by: Jérôme Benoit --- diff --git a/src/performance/index.ts b/src/performance/index.ts index 258dbc01..aae8e4d0 100644 --- a/src/performance/index.ts +++ b/src/performance/index.ts @@ -1 +1,3 @@ -export { PerformanceStatistics, type Storage, StorageFactory } from './internal'; +export { PerformanceStatistics } from './PerformanceStatistics'; +export { type Storage } from './storage/Storage'; +export { StorageFactory } from './storage/StorageFactory'; diff --git a/src/performance/internal.ts b/src/performance/internal.ts deleted file mode 100644 index af79c9cd..00000000 --- a/src/performance/internal.ts +++ /dev/null @@ -1,7 +0,0 @@ -export * from './storage/JsonFileStorage'; -export * from './storage/MikroOrmStorage'; -export * from './storage/MongoDBStorage'; -export * from './storage/Storage'; -export * from './storage/StorageFactory'; - -export * from './PerformanceStatistics'; diff --git a/src/performance/storage/JsonFileStorage.ts b/src/performance/storage/JsonFileStorage.ts index 87c12537..e94d79b9 100644 --- a/src/performance/storage/JsonFileStorage.ts +++ b/src/performance/storage/JsonFileStorage.ts @@ -3,9 +3,9 @@ import fs from 'node:fs'; import path from 'node:path'; +import { Storage } from './Storage'; import { FileType, type Statistics } from '../../types'; import { AsyncLock, AsyncLockType, Constants, FileUtils, Utils } from '../../utils'; -import { Storage } from '../internal'; export class JsonFileStorage extends Storage { private fd: number | null = null; diff --git a/src/performance/storage/MikroOrmStorage.ts b/src/performance/storage/MikroOrmStorage.ts index d77b95a0..e5b09b58 100644 --- a/src/performance/storage/MikroOrmStorage.ts +++ b/src/performance/storage/MikroOrmStorage.ts @@ -9,6 +9,7 @@ import { } from '@mikro-orm/core'; import { TsMorphMetadataProvider } from '@mikro-orm/reflection'; +import { Storage } from './Storage'; import { type MikroOrmDbType, PerformanceData, @@ -17,7 +18,6 @@ import { StorageType, } from '../../types'; import { Constants } from '../../utils'; -import { Storage } from '../internal'; export class MikroOrmStorage extends Storage { private storageType: StorageType; diff --git a/src/performance/storage/MongoDBStorage.ts b/src/performance/storage/MongoDBStorage.ts index 9073ecba..aff757b5 100644 --- a/src/performance/storage/MongoDBStorage.ts +++ b/src/performance/storage/MongoDBStorage.ts @@ -2,9 +2,9 @@ import { MongoClient } from 'mongodb'; +import { Storage } from './Storage'; import { type Statistics, StorageType } from '../../types'; import { Constants } from '../../utils'; -import { Storage } from '../internal'; export class MongoDBStorage extends Storage { private readonly client: MongoClient | null; diff --git a/src/performance/storage/StorageFactory.ts b/src/performance/storage/StorageFactory.ts index 5a3b2e12..09b58a15 100644 --- a/src/performance/storage/StorageFactory.ts +++ b/src/performance/storage/StorageFactory.ts @@ -1,7 +1,10 @@ // Copyright Jerome Benoit. 2021-2023. All Rights Reserved. +import { JsonFileStorage } from './JsonFileStorage'; +import { MikroOrmStorage } from './MikroOrmStorage'; +import { MongoDBStorage } from './MongoDBStorage'; +import type { Storage } from './Storage'; import { StorageType } from '../../types'; -import { JsonFileStorage, MikroOrmStorage, MongoDBStorage, type Storage } from '../internal'; export class StorageFactory { private constructor() {