path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../'),
'assets',
'station-templates',
- path.basename(stationTemplateUrl.file)
+ stationTemplateUrl.file
),
};
await this.workerImplementation.addElement(workerData);
import crypto from 'crypto';
import fs from 'fs';
import path from 'path';
-import { URL, fileURLToPath } from 'url';
+import { URL } from 'url';
import { parentPort } from 'worker_threads';
import WebSocket, { Data, RawData } from 'ws';
this.hashId = ChargingStationUtils.getHashId(this.index, this.getTemplateFromFile());
logger.info(`${this.logPrefix()} Charging station hashId '${this.hashId}'`);
this.configurationFile = path.join(
- path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../'),
- 'assets',
- 'configurations',
+ path.dirname(this.templateFile.replace('station-templates', 'configurations')),
this.hashId + '.json'
);
this.stationInfo = this.getStationInfo();