]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor: code-quality cleanup — utils usage, logic consolidation, export hygiene...
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 19 Jul 2026 16:17:58 +0000 (18:17 +0200)
committerGitHub <noreply@github.com>
Sun, 19 Jul 2026 16:17:58 +0000 (18:17 +0200)
commit2bee4896149f6000ecd27feb118d39a2406b1194
tree1a71a558114599b1957a4ee36c728ec835f6e34d
parentde0e86f47426fd8a53f122d5f7f427042a4edfb3
refactor: code-quality cleanup — utils usage, logic consolidation, export hygiene (#2036)

* refactor(ui-server): use isEmpty for outstanding-hashid checks

* refactor(ui-server): extract releaseRequest for broadcast request release

* refactor(ocpp): lift requestHandler into base template method

* refactor(utils): add isOCPP20x helper and route version predicates

* refactor(charging-station): single-source the request-statistics gate

* refactor(utils): use isNotEmptyString/isNotEmptyArray predicates

* refactor: drop dead exports and redundant re-export

* refactor(auth): rename AuthorizationStatus enum to AuthResultStatus

* refactor(ocpp): drop now-redundant logRequestHandlerError module-name param

* docs(charging-station): document recordRequestStatistic public method

* refactor(ocpp): route VariableMetadata mutability/persistence checks through predicates

* refactor(ocpp): unexport in-file-only parseJsonSchemaFile
57 files changed:
src/charging-station/ChargingStation.ts
src/charging-station/ConfigurationKeyUtils.ts
src/charging-station/TemplateSchema.ts
src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts
src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
src/charging-station/index.ts
src/charging-station/ocpp/1.6/OCPP16RequestService.ts
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
src/charging-station/ocpp/2.0/OCPP20RequestService.ts
src/charging-station/ocpp/2.0/OCPP20VariableManager.ts
src/charging-station/ocpp/2.0/OCPP20VariableRegistry.ts
src/charging-station/ocpp/OCPPRequestService.ts
src/charging-station/ocpp/OCPPServiceOperations.ts
src/charging-station/ocpp/OCPPServiceUtils.ts
src/charging-station/ocpp/auth/adapters/OCPP16AuthAdapter.ts
src/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.ts
src/charging-station/ocpp/auth/cache/InMemoryAuthCache.ts
src/charging-station/ocpp/auth/index.ts
src/charging-station/ocpp/auth/interfaces/OCPPAuthService.ts
src/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.ts
src/charging-station/ocpp/auth/strategies/CertificateAuthStrategy.ts
src/charging-station/ocpp/auth/strategies/LocalAuthStrategy.ts
src/charging-station/ocpp/auth/types/AuthTypes.ts
src/charging-station/ocpp/auth/utils/AuthHelpers.ts
src/charging-station/ui-server/UIMCPServer.ts
src/charging-station/ui-server/UIServerAccessPolicy.ts
src/charging-station/ui-server/ui-services/AbstractUIService.ts
src/utils/Configuration.ts
src/utils/ConfigurationSchema.ts
src/utils/Utils.ts
src/utils/index.ts
src/worker/WorkerTypes.ts
src/worker/index.ts
tests/charging-station/ChargingStation-RequestStatistic.test.ts [new file with mode: 0644]
tests/charging-station/ocpp/1.6/OCPP16RequestService-CallChain.test.ts
tests/charging-station/ocpp/1.6/OCPP16ServiceUtils.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStartTransaction.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-CacheUpdate.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-AuthCache.test.ts
tests/charging-station/ocpp/2.0/OCPP20VariableRegistry.test.ts [new file with mode: 0644]
tests/charging-station/ocpp/OCPPServiceOperations.test.ts
tests/charging-station/ocpp/auth/OCPPAuthIntegration.test.ts
tests/charging-station/ocpp/auth/adapters/OCPP16AuthAdapter.test.ts
tests/charging-station/ocpp/auth/adapters/OCPP20AuthAdapter.test.ts
tests/charging-station/ocpp/auth/cache/InMemoryAuthCache.test.ts
tests/charging-station/ocpp/auth/helpers/MockFactories.ts
tests/charging-station/ocpp/auth/services/OCPPAuthServiceImpl.test.ts
tests/charging-station/ocpp/auth/strategies/CertificateAuthStrategy.test.ts
tests/charging-station/ocpp/auth/strategies/LocalAuthStrategy-DisablePostAuthorize.test.ts
tests/charging-station/ocpp/auth/strategies/LocalAuthStrategy.test.ts
tests/charging-station/ocpp/auth/strategies/RemoteAuthStrategy.test.ts
tests/charging-station/ocpp/auth/types/AuthTypes.test.ts
tests/charging-station/ocpp/auth/utils/AuthConfigValidator.test.ts
tests/charging-station/ocpp/auth/utils/AuthHelpers.test.ts
tests/utils/Utils.test.ts
ui/common/src/client/WebSocketClient.ts
ui/common/tests/WebSocketClient.test.ts