build: properly workaround Ajv TS type definitions bug
[e-mobility-charging-stations-simulator.git] / mikro-orm.config-template.ts
CommitLineData
d972af76 1import { dirname, join } from 'node:path';
51022aa0 2import { fileURLToPath } from 'node:url';
f412fe24
JB
3
4import { TsMorphMetadataProvider } from '@mikro-orm/reflection';
5
60a74391
JB
6import { PerformanceData, PerformanceRecord } from './src/types';
7import { Constants } from './src/utils';
ae8ee665
JB
8
9export default {
10 metadataProvider: TsMorphMetadataProvider,
11 entities: [PerformanceRecord, PerformanceData],
12 type: 'sqlite',
d972af76
JB
13 clientUrl: `file://${join(
14 dirname(fileURLToPath(import.meta.url)),
5edd8ba0 15 `${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`,
e7aeea18 16 )}`,
ae8ee665 17};