From 351d6077e316dd323384446a052e1c70c7a72786 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 19 Mar 2026 15:58:59 +0100 Subject: [PATCH] fix: use exception barrel instead of direct module imports Redirect OCPPError imports from exception/OCPPError.js to the barrel exception/index.js in auth services and OCPP20 test utils. --- .../ocpp/auth/factories/AuthComponentFactory.ts | 2 +- .../ocpp/auth/services/OCPPAuthServiceFactory.ts | 2 +- src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts | 2 +- .../ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/charging-station/ocpp/auth/factories/AuthComponentFactory.ts b/src/charging-station/ocpp/auth/factories/AuthComponentFactory.ts index 026bca55..d70d3685 100644 --- a/src/charging-station/ocpp/auth/factories/AuthComponentFactory.ts +++ b/src/charging-station/ocpp/auth/factories/AuthComponentFactory.ts @@ -8,7 +8,7 @@ import type { } from '../interfaces/OCPPAuthService.js' import type { AuthConfiguration } from '../types/AuthTypes.js' -import { OCPPError } from '../../../../exception/OCPPError.js' +import { OCPPError } from '../../../../exception/index.js' import { ErrorType, OCPPVersion } from '../../../../types/index.js' import { InMemoryAuthCache } from '../cache/InMemoryAuthCache.js' import { AuthConfigValidator } from '../utils/ConfigValidator.js' diff --git a/src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.ts b/src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.ts index 8f4414df..f3a9272f 100644 --- a/src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.ts +++ b/src/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.ts @@ -1,7 +1,7 @@ import type { ChargingStation } from '../../../ChargingStation.js' import type { OCPPAuthService } from '../interfaces/OCPPAuthService.js' -import { OCPPError } from '../../../../exception/OCPPError.js' +import { OCPPError } from '../../../../exception/index.js' import { ErrorType } from '../../../../types/index.js' import { logger } from '../../../../utils/index.js' import { OCPPAuthServiceImpl } from './OCPPAuthServiceImpl.js' diff --git a/src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts b/src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts index 04abcc97..ac08d8bd 100644 --- a/src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts +++ b/src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts @@ -3,7 +3,7 @@ import type { OCPP16AuthAdapter } from '../adapters/OCPP16AuthAdapter.js' import type { OCPP20AuthAdapter } from '../adapters/OCPP20AuthAdapter.js' import type { LocalAuthStrategy } from '../strategies/LocalAuthStrategy.js' -import { OCPPError } from '../../../../exception/OCPPError.js' +import { OCPPError } from '../../../../exception/index.js' import { ErrorType, OCPPVersion } from '../../../../types/index.js' import { convertToDate, diff --git a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts index 24f4f97b..e54e8f94 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts @@ -21,7 +21,7 @@ import { OCPP20ServiceUtils, } from '../../../../src/charging-station/ocpp/2.0/OCPP20ServiceUtils.js' import { OCPP20VariableManager } from '../../../../src/charging-station/ocpp/2.0/OCPP20VariableManager.js' -import { OCPPError } from '../../../../src/exception/OCPPError.js' +import { OCPPError } from '../../../../src/exception/index.js' import { AttributeEnumType, ConnectorStatusEnum, -- 2.43.0