build(simulator): switch to strict type checking
[e-mobility-charging-stations-simulator.git] / mikro-orm.config-template.ts
index 7ac022be17447f6c8c21c9eb1cf6a75d2d99e607..4ef43dff66fb4dec4af00b9b08cb9002732f3ef1 100644 (file)
@@ -1,17 +1,17 @@
-import path from 'node:path';
+import { dirname, join } from 'node:path';
+import { fileURLToPath } from 'node:url';
 
 import { TsMorphMetadataProvider } from '@mikro-orm/reflection';
 
-import { PerformanceData } from './src/types/orm/entities/PerformanceData';
-import { PerformanceRecord } from './src/types/orm/entities/PerformanceRecord';
-import { Constants } from './src/utils/Constants';
+import { PerformanceData, PerformanceRecord } from './src/types';
+import { Constants } from './src/utils';
 
 export default {
   metadataProvider: TsMorphMetadataProvider,
   entities: [PerformanceRecord, PerformanceData],
   type: 'sqlite',
-  clientUrl: `file://${path.join(
-    path.resolve(__dirname),
-    `${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`
+  clientUrl: `file://${join(
+    dirname(fileURLToPath(import.meta.url)),
+    `${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`,
   )}`,
 };