From 3deaeab6cd24a1cae2a8c2f4b7523f0a0a2c7275 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 2 Apr 2026 13:33:56 +0200 Subject: [PATCH] refactor(ocpp): remove dead barrel re-exports Remove 19 unused re-exports from ocpp/index.ts (12) and auth/index.ts (7). All consumers import directly from source files. Convert OCPPIncomingRequestService and OCPPRequestService to type-only exports matching their sole consumer. --- src/charging-station/ocpp/auth/index.ts | 36 ------------------------- src/charging-station/ocpp/index.ts | 19 +++---------- 2 files changed, 4 insertions(+), 51 deletions(-) diff --git a/src/charging-station/ocpp/auth/index.ts b/src/charging-station/ocpp/auth/index.ts index 14cb45c7..32e2cdf0 100644 --- a/src/charging-station/ocpp/auth/index.ts +++ b/src/charging-station/ocpp/auth/index.ts @@ -8,22 +8,6 @@ * @module ocpp/auth */ -// ============================================================================ -// Interfaces -// ============================================================================ - -export { OCPP16AuthAdapter } from './adapters/OCPP16AuthAdapter.js' - -// ============================================================================ -// Types & Enums -// ============================================================================ - -export { OCPP20AuthAdapter } from './adapters/OCPP20AuthAdapter.js' - -// ============================================================================ -// Adapters -// ============================================================================ - export type { AuthCache, AuthComponentFactory, @@ -38,20 +22,7 @@ export type { OCPPAuthService, } from './interfaces/OCPPAuthService.js' export { OCPPAuthServiceFactory } from './services/OCPPAuthServiceFactory.js' - -// ============================================================================ -// Strategies -// ============================================================================ - export { OCPPAuthServiceImpl } from './services/OCPPAuthServiceImpl.js' -export { CertificateAuthStrategy } from './strategies/CertificateAuthStrategy.js' -export { LocalAuthStrategy } from './strategies/LocalAuthStrategy.js' - -// ============================================================================ -// Services -// ============================================================================ - -export { RemoteAuthStrategy } from './strategies/RemoteAuthStrategy.js' export { type AuthConfiguration, AuthContext, @@ -75,10 +46,3 @@ export { mapToOCPP20TokenType, requiresAdditionalInfo, } from './types/AuthTypes.js' - -// ============================================================================ -// Utils -// ============================================================================ - -export { AuthValidators } from './utils/AuthValidators.js' -export { AuthConfigValidator } from './utils/ConfigValidator.js' diff --git a/src/charging-station/ocpp/index.ts b/src/charging-station/ocpp/index.ts index b2997cdc..7b1458d8 100644 --- a/src/charging-station/ocpp/index.ts +++ b/src/charging-station/ocpp/index.ts @@ -1,20 +1,9 @@ -export { OCPP16IncomingRequestService } from './1.6/OCPP16IncomingRequestService.js' -export { OCPP16RequestService } from './1.6/OCPP16RequestService.js' -export { OCPP16ResponseService } from './1.6/OCPP16ResponseService.js' -export { OCPP16ServiceUtils } from './1.6/OCPP16ServiceUtils.js' -export { OCPP20IncomingRequestService } from './2.0/OCPP20IncomingRequestService.js' -export { OCPP20RequestService } from './2.0/OCPP20RequestService.js' -export { OCPP20ResponseService } from './2.0/OCPP20ResponseService.js' -export { buildTransactionEvent, OCPP20ServiceUtils } from './2.0/OCPP20ServiceUtils.js' -export { OCPP20VariableManager } from './2.0/OCPP20VariableManager.js' +export { OCPP20ServiceUtils } from './2.0/OCPP20ServiceUtils.js' export { OCPPAuthServiceFactory } from './auth/index.js' -export { - restoreConnectorStatus, - sendAndSetConnectorStatus, -} from './OCPPConnectorStatusOperations.js' +export { sendAndSetConnectorStatus } from './OCPPConnectorStatusOperations.js' export { OCPPConstants } from './OCPPConstants.js' -export { OCPPIncomingRequestService } from './OCPPIncomingRequestService.js' -export { OCPPRequestService } from './OCPPRequestService.js' +export { type OCPPIncomingRequestService } from './OCPPIncomingRequestService.js' +export { type OCPPRequestService } from './OCPPRequestService.js' export { createOCPPServices } from './OCPPServiceFactory.js' export { flushQueuedTransactionMessages, -- 2.43.0