From: Jérôme Benoit Date: Fri, 9 Sep 2022 10:14:36 +0000 (+0200) Subject: Refine scopes X-Git-Tag: v1.1.72~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5083d31a6f03f617f91fbed2497e379058df9e49;p=e-mobility-charging-stations-simulator.git Refine scopes Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStationWorkerBroadcastChannel.ts b/src/charging-station/ChargingStationWorkerBroadcastChannel.ts index 14d37706..4f671966 100644 --- a/src/charging-station/ChargingStationWorkerBroadcastChannel.ts +++ b/src/charging-station/ChargingStationWorkerBroadcastChannel.ts @@ -53,7 +53,6 @@ type CommandHandler = ( export default class ChargingStationWorkerBroadcastChannel extends WorkerBroadcastChannel { private readonly commandHandlers: Map; - private readonly chargingStation: ChargingStation; constructor(chargingStation: ChargingStation) { @@ -171,7 +170,6 @@ export default class ChargingStationWorkerBroadcastChannel extends WorkerBroadca return; } const [uuid, command, requestPayload] = validatedMessageEvent.data as BroadcastChannelRequest; - if ( requestPayload?.hashIds !== undefined && requestPayload?.hashIds?.includes(this.chargingStation.stationInfo.hashId) === false @@ -223,7 +221,7 @@ export default class ChargingStationWorkerBroadcastChannel extends WorkerBroadca private messageErrorHandler(messageEvent: MessageEvent): void { logger.error( `${this.chargingStation.logPrefix()} ${moduleName}.messageErrorHandler: Error at handling message:`, - { messageEvent } + messageEvent ); } diff --git a/src/charging-station/UIServiceWorkerBroadcastChannel.ts b/src/charging-station/UIServiceWorkerBroadcastChannel.ts index 7e22860a..76de2cdf 100644 --- a/src/charging-station/UIServiceWorkerBroadcastChannel.ts +++ b/src/charging-station/UIServiceWorkerBroadcastChannel.ts @@ -100,7 +100,7 @@ export default class UIServiceWorkerBroadcastChannel extends WorkerBroadcastChan private messageErrorHandler(messageEvent: MessageEvent): void { logger.error( `${this.uiService.logPrefix(moduleName, 'messageErrorHandler')} Error at handling message:`, - { messageEvent } + messageEvent ); } } diff --git a/src/charging-station/ui-server/ui-services/AbstractUIService.ts b/src/charging-station/ui-server/ui-services/AbstractUIService.ts index 0db59cca..5e9e4899 100644 --- a/src/charging-station/ui-server/ui-services/AbstractUIService.ts +++ b/src/charging-station/ui-server/ui-services/AbstractUIService.ts @@ -22,7 +22,7 @@ import type { AbstractUIServer } from '../AbstractUIServer'; const moduleName = 'AbstractUIService'; export default abstract class AbstractUIService { - protected static readonly ProcedureNameToBroadCastChannelProcedureNameMap: Omit< + private static readonly ProcedureNameToBroadCastChannelProcedureNameMap: Omit< Record, 'startSimulator' | 'stopSimulator' | 'listChargingStations' > = {