From 5083d31a6f03f617f91fbed2497e379058df9e49 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 9 Sep 2022 12:14:36 +0200 Subject: [PATCH] Refine scopes MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStationWorkerBroadcastChannel.ts | 4 +--- src/charging-station/UIServiceWorkerBroadcastChannel.ts | 2 +- .../ui-server/ui-services/AbstractUIService.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) 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' > = { -- 2.34.1