-import path from 'node:path';
+import { dirname, join } from 'node:path'
+import { fileURLToPath } from 'node:url'
-import { TsMorphMetadataProvider } from '@mikro-orm/reflection';
+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/index.js'
+import { Constants } from './src/utils/index.js'
export default {
metadataProvider: TsMorphMetadataProvider,
entities: [PerformanceRecord, PerformanceData],
type: 'sqlite',
- clientUrl: `file://${path.join(
- path.resolve(__dirname),
+ clientUrl: `file://${join(
+ dirname(fileURLToPath(import.meta.url)),
`${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`
- )}`,
-};
+ )}`
+}