- private getConfiguredSupervisionURL(): URL {
- const supervisionUrls = Utils.cloneObject<string | string[]>(this.stationInfo.supervisionURL ?? Configuration.getSupervisionURLs());
- let indexUrl = 0;
+ private warnDeprecatedTemplateKey(template: ChargingStationTemplate, key: string, chargingStationId: string, logMsgToAppend = ''): void {
+ if (!Utils.isUndefined(template[key])) {
+ logger.warn(`${Utils.logPrefix(` ${chargingStationId} |`)} Deprecated template key '${key}' usage in file '${this.stationTemplateFile}'${logMsgToAppend && '. ' + logMsgToAppend}`);
+ }
+ }
+
+ private convertDeprecatedTemplateKey(template: ChargingStationTemplate, deprecatedKey: string, key: string): void {
+ if (!Utils.isUndefined(template[deprecatedKey])) {
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
+ template[key] = template[deprecatedKey];
+ delete template[deprecatedKey];
+ }
+ }
+
+ private getConfiguredSupervisionUrl(): URL {
+ const supervisionUrls = Utils.cloneObject<string | string[]>(this.stationInfo.supervisionUrls ?? Configuration.getSupervisionUrls());