import fs from 'fs';
import lockfile from 'proper-lockfile';
-export class JSONFileStorage extends Storage {
+export class JsonFileStorage extends Storage {
private fd: number | null = null;
constructor(storageUri: string, logPrefix: string) {
import { Storage } from './Storage';
import { TsMorphMetadataProvider } from '@mikro-orm/reflection';
-export class MikroORMStorage extends Storage {
+export class MikroOrmStorage extends Storage {
private storageType: StorageType;
private orm: MikroORM | null;
// Copyright Jerome Benoit. 2021. All Rights Reserved.
-import { JSONFileStorage } from './JSONFileStorage';
-import { MikroORMStorage } from './MikroORMStorage';
+import { JsonFileStorage } from './JsonFileStorage';
+import { MikroOrmStorage } from './MikroOrmStorage';
import { MongoDBStorage } from './MongoDBStorage';
import { Storage } from './Storage';
import { StorageType } from '../../types/Storage';
let storageInstance: Storage = null;
switch (type) {
case StorageType.JSON_FILE:
- storageInstance = new JSONFileStorage(connectionUri, logPrefix);
+ storageInstance = new JsonFileStorage(connectionUri, logPrefix);
break;
case StorageType.MONGO_DB:
storageInstance = new MongoDBStorage(connectionUri, logPrefix);
// case StorageType.MYSQL:
// case StorageType.MARIA_DB:
// case StorageType.SQLITE:
- // storageInstance = new MikroORMStorage(connectionURI, logPrefix, type);
+ // storageInstance = new MikroOrmStorage(connectionURI, logPrefix, type);
// break;
default:
throw new Error(`${logPrefix} Unknown storage type: ${type}`);