From b4b5a5eb6e670106eaf6f82c851e991a68dfef8f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 5 Jul 2026 20:41:58 +0200 Subject: [PATCH] refactor: migrate external deep imports to ui-server and broadcast-channel barrels (#1953) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Migrate the 2 external cross-sub-component deep imports enabled by the barrels introduced in #1952 to route through the barrel index files per the flat parent barrel convention. Sites migrated (2): - Bootstrap.ts:61 UIServerFactory — deep → ui-server/index.js - ChargingStation.ts:114 ChargingStationWorkerBroadcastChannel — deep → broadcast-channel/index.js Sites deliberately NOT migrated (documented in PR body): - Bootstrap.ts:13 AbstractUIServer (type) — not re-exported; internal extension point per the ui-server barrel's `@file` omission list. - ConfigurationSchema.ts:7 UIServerNet.isHostLiteralWithoutPort — UIServerNet not re-exported; internal helper per the omission list. - AbstractUIService.ts:33 UIServiceWorkerBroadcastChannel (value) — adjacent sub-component crossing. Migrating triggers a circular-load ReferenceError at test time because the broadcast-channel barrel re-exports both concrete channels, transitively pulling ChargingStationWorkerBroadcastChannel's charging-station chain back through ui-server before class declarations complete. - UIServiceWorkerBroadcastChannel.ts:1 AbstractUIService (type-only) — adjacent sub-component crossing; kept direct for symmetry. Convention codified: barrels are for CROSS-COMPONENT external consumers, not for adjacent-sub-component crossings within the same parent module. Matches the meter-values/index.ts convention. Quality gates: typecheck clean, lint clean, 2955/2961 tests pass, 0 fail. Diff: +2/-2 across 2 files. Follow-up to #1952 (barrel gaps closure). PR-D' from the sequence tracked in #1950's scope fence. --- src/charging-station/Bootstrap.ts | 2 +- src/charging-station/ChargingStation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/charging-station/Bootstrap.ts b/src/charging-station/Bootstrap.ts index ea25f0e1..c8828b38 100644 --- a/src/charging-station/Bootstrap.ts +++ b/src/charging-station/Bootstrap.ts @@ -58,7 +58,7 @@ import { } from '../worker/index.js' import { readStateFile, reconstructTemplateIndexes, writeStateFile } from './BootstrapStateUtils.js' import { buildTemplateName, waitChargingStationEvents } from './Helpers.js' -import { UIServerFactory } from './ui-server/UIServerFactory.js' +import { UIServerFactory } from './ui-server/index.js' const moduleName = 'Bootstrap' diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index b974aed4..fe4fdcfe 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -111,7 +111,7 @@ import { watchJsonFile, } from '../utils/index.js' import { AutomaticTransactionGenerator } from './AutomaticTransactionGenerator.js' -import { ChargingStationWorkerBroadcastChannel } from './broadcast-channel/ChargingStationWorkerBroadcastChannel.js' +import { ChargingStationWorkerBroadcastChannel } from './broadcast-channel/index.js' import { CoherentMeterValuesManager } from './CoherentMeterValuesManager.js' import { addConfigurationKey, -- 2.53.0