refactor(simulator): add control over the OCPP stack exports
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 12 Feb 2023 15:07:55 +0000 (16:07 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 12 Feb 2023 15:07:55 +0000 (16:07 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts
src/charging-station/ChargingStationWorkerBroadcastChannel.ts
src/charging-station/ocpp/index.ts [new file with mode: 0644]

index 0118f3d14f1b858c9e2930caa86e316b55f51a7c..c74daceb008b3195adda78261a6d0e3a66ad1fa9 100644 (file)
@@ -15,16 +15,18 @@ import { ChargingStationConfigurationUtils } from './ChargingStationConfiguratio
 import { ChargingStationUtils } from './ChargingStationUtils';
 import { ChargingStationWorkerBroadcastChannel } from './ChargingStationWorkerBroadcastChannel';
 import { MessageChannelUtils } from './MessageChannelUtils';
-import { OCPP16IncomingRequestService } from './ocpp/1.6/OCPP16IncomingRequestService';
-import { OCPP16RequestService } from './ocpp/1.6/OCPP16RequestService';
-import { OCPP16ResponseService } from './ocpp/1.6/OCPP16ResponseService';
-import { OCPP16ServiceUtils } from './ocpp/1.6/OCPP16ServiceUtils';
-import { OCPP20IncomingRequestService } from './ocpp/2.0/OCPP20IncomingRequestService';
-import { OCPP20RequestService } from './ocpp/2.0/OCPP20RequestService';
-import { OCPP20ResponseService } from './ocpp/2.0/OCPP20ResponseService';
-import type { OCPPIncomingRequestService } from './ocpp/OCPPIncomingRequestService';
-import type { OCPPRequestService } from './ocpp/OCPPRequestService';
-import { OCPPServiceUtils } from './ocpp/OCPPServiceUtils';
+import {
+  OCPP16IncomingRequestService,
+  OCPP16RequestService,
+  OCPP16ResponseService,
+  OCPP16ServiceUtils,
+  OCPP20IncomingRequestService,
+  OCPP20RequestService,
+  OCPP20ResponseService,
+  type OCPPIncomingRequestService,
+  type OCPPRequestService,
+  OCPPServiceUtils,
+} from './ocpp';
 import { SharedLRUCache } from './SharedLRUCache';
 import { BaseError, OCPPError } from '../exception';
 import { PerformanceStatistics } from '../performance/PerformanceStatistics';
index 6ffa0f14d648b86941bddd2e764efefb3b2231fb..1a2943a71c842f90c83b3c1a68bc6de17f9affc5 100644 (file)
@@ -1,6 +1,6 @@
 import type { ChargingStation } from './ChargingStation';
 import { ChargingStationConfigurationUtils } from './ChargingStationConfigurationUtils';
-import { OCPP16ServiceUtils } from './ocpp/1.6/OCPP16ServiceUtils';
+import { OCPP16ServiceUtils } from './ocpp';
 import { WorkerBroadcastChannel } from './WorkerBroadcastChannel';
 import { BaseError, type OCPPError } from '../exception';
 import {
diff --git a/src/charging-station/ocpp/index.ts b/src/charging-station/ocpp/index.ts
new file mode 100644 (file)
index 0000000..a0634d1
--- /dev/null
@@ -0,0 +1,11 @@
+export * from './OCPPIncomingRequestService';
+export * from './OCPPRequestService';
+export * from './OCPPServiceUtils';
+export * from './1.6/OCPP16IncomingRequestService';
+export * from './1.6/OCPP16RequestService';
+export * from './1.6/OCPP16ResponseService';
+// FIXME: shall not be exported
+export * from './1.6/OCPP16ServiceUtils';
+export * from './2.0/OCPP20IncomingRequestService';
+export * from './2.0/OCPP20RequestService';
+export * from './2.0/OCPP20ResponseService';