]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor: close barrel gaps for ui-server, broadcast-channel, DEFAULT_PERSIST_STATE...
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 5 Jul 2026 18:31:05 +0000 (20:31 +0200)
committerGitHub <noreply@github.com>
Sun, 5 Jul 2026 18:31:05 +0000 (20:31 +0200)
commita7a3ee2717e18bd1cc148dfa44f652253dc4204f
tree2519d53bf4d6a55901a9ca3326edfe247b908fa4
parenta91880ad922d2e4f2e8272a37606daf17c1b09a7
refactor: close barrel gaps for ui-server, broadcast-channel, DEFAULT_PERSIST_STATE (#1952)

Close 3 barrel gaps identified during the PR #1950 audit chain.

New barrels (respect the flat parent barrel convention already used by
`src/charging-station/ocpp/index.ts`, `.../meter-values/index.ts`,
`src/performance/index.ts`):

- `src/charging-station/ui-server/index.ts` — exposes UIMCPServer,
  UIServerFactory, UIWebSocketServer, HttpMethod (UIServerUtils),
  DEFAULT_COMPRESSION_THRESHOLD_BYTES (UIServerSecurity),
  AbstractUIService, BroadcastChannelResponseLogContext. Deliberately
  omits UIHttpServer (@deprecated pending removal), AbstractUIServer
  (internal extension point), UIServerAccessPolicy/UIServerNet
  helpers, and ui-services concrete implementations — all documented
  in the `@file` JSDoc header.

- `src/charging-station/broadcast-channel/index.ts` — exposes
  ChargingStationWorkerBroadcastChannel and
  UIServiceWorkerBroadcastChannel. Deliberately omits
  WorkerBroadcastChannel (abstract base with only internal subclasses)
  — documented in the `@file` JSDoc header.

Both barrels carry an `@file` header matching the peer convention
(`meter-values/index.ts`, `ocpp/auth/index.ts`) that documents what is
exposed AND what is deliberately NOT re-exported and why — anchoring
the exposure discipline in the file itself.

Extended barrel:
- `src/utils/index.ts`: add `DEFAULT_PERSIST_STATE` to the
  `Configuration` re-export block. Closes an Explore-flagged barrel
  gap prospectively; zero current callers affected.

No consumer migrations in this PR — tests inside the sub-components
follow the "test-of-that-file uses direct import" precedent from
PR #1950. Source-to-source deep imports (5 sites: Bootstrap.ts,
ChargingStation.ts, ConfigurationSchema.ts,
UIServiceWorkerBroadcastChannel.ts, AbstractUIService.ts) are deferred
to a follow-up PR-D' to keep this PR focused on barrel infrastructure.

Quality gates: typecheck clean, lint clean, 577/577 targeted tests
pass (ui-server + broadcast-channel + Configuration suites).

Diff: +41/-1 across 3 files.

Reviews applied (3 rounds, 4 agents each): 1 substantive convergent
finding v2 addressed (JSDoc headers on both new barrels); v3 saturation
HIGH declared by 4/4 agents (0 substantive findings, 6 false positives
rejected via caller-trace).
src/charging-station/broadcast-channel/index.ts [new file with mode: 0644]
src/charging-station/ui-server/index.ts [new file with mode: 0644]
src/utils/index.ts