import { createHash } from 'node:crypto'
import { EventEmitter } from 'node:events'
import { type FSWatcher, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
-import { dirname, join, parse } from 'node:path'
+import { dirname, join } from 'node:path'
import { URL } from 'node:url'
import { parentPort } from 'node:worker_threads'
buildEvsesStatus,
buildStartedMessage,
buildStoppedMessage,
+ buildTemplateName,
buildUpdatedMessage,
clone,
convertToBoolean,
const stationInfo = stationTemplateToStationInfo(stationTemplate)
stationInfo.hashId = getHashId(this.index, stationTemplate)
stationInfo.templateIndex = this.index
- stationInfo.templateName = parse(this.templateFile).name
+ stationInfo.templateName = buildTemplateName(this.templateFile)
stationInfo.chargingStationId = getChargingStationId(this.index, stationTemplate)
createSerialNumber(stationTemplate, stationInfo)
stationInfo.voltageOut = this.getVoltageOut(stationInfo)
}
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (stationInfo.templateName == null) {
- stationInfo.templateName = parse(this.templateFile).name
+ stationInfo.templateName = buildTemplateName(this.templateFile)
}
}
}