## Component Boundaries
-- `charging-station/` and `ocpp/` are SEPARATE components with their own barrels
+- `charging-station/` and `ocpp/` are SEPARATE components with their own barrels (files under `src/charging-station/ocpp/` belong to the `ocpp/` component, not to `charging-station/`)
- `ocpp/1.6/` and `ocpp/2.0/` are separate sub-components of ocpp
- `ocpp/auth/` is an independent subsystem with its own barrel, interfaces, and strategy pattern
- `worker/` is **fully standalone** — zero imports from other local modules. Has its own `sleep()`, `secureRandom()`, `mergeDeepRight()`. Uses `new Error()` (not `BaseError`). Portable to other projects
-- `types/` is pure type definitions, depends on nothing except `worker/` (type-only)
-- `utils/` depends on `types/` and `charging-station/` (type-only + 1 runtime: `getMessageTypeString`)
-- `exception/` — `BaseError` has no imports; `OCPPError` imports from `types/` and `ocpp/OCPPConstants`. The barrel creates a transitive dep chain NOT usable by `utils/` (circular)
+- `types/` is pure type definitions; type-only imports from `worker/`, `charging-station/`, and `exception/` are permitted (runtime-elided, no cycle risk)
+- `utils/` depends on `types/`, `charging-station/` (type-only + 1 runtime: `getMessageTypeString`), `exception/` (`BaseError` runtime), and `worker/` (constants/enums runtime)
+- `exception/`:
+ - `BaseError` has no imports; `OCPPError` imports `OCPPConstants` via direct path `../charging-station/ocpp/OCPPConstants.js` (TDZ-documented exception — barrel `ocpp/index.js` re-exports `OCPP20ServiceUtils` which transitively imports `OCPPError`, causing a cycle)
+ - The `exception/index.js` barrel IS usable from `utils/` for files whose loaded chain doesn't include `ConfigurationSchema.ts` accessing `CURRENT_CONFIGURATION_SCHEMA_VERSION` at module top-level. Only `utils/ConfigurationMigrations.ts` requires the direct path `../exception/BaseError.js` (TDZ-documented exception)
+
+## Import Discipline
+
+- **Cross-component imports** MUST go through the importee's barrel (`<component>/index.js`) — never deep-import internal files
+- **Intra-component imports** use direct relative paths (`./Sibling.js`, `../Parent.js`); never the component's own barrel (`./index.js`) — causes self-cycle
+- **Tests** are outside the component they test → MUST import via the component's barrel
+- **Documented exceptions** (TDZ cycles): two files use direct cross-component paths with explanatory comments — `src/utils/ConfigurationMigrations.ts:4` (`exception/BaseError.js`) and `src/exception/OCPPError.ts:5` (`charging-station/ocpp/OCPPConstants.js`). Both have a `// Direct path:` comment justifying the deviation
## Design Patterns
+export { AutomaticTransactionGenerator } from './AutomaticTransactionGenerator.js'
export { Bootstrap } from './Bootstrap.js'
+export {
+ deleteStateFile,
+ readStateFile,
+ reconstructTemplateIndexes,
+ STATE_FILE_VERSION,
+ writeStateFile,
+} from './BootstrapStateUtils.js'
export type { ChargingStation } from './ChargingStation.js'
export {
addConfigurationKey,
buildConfigKey,
+ deleteConfigurationKey,
getConfigurationKey,
setConfigurationKeyValue,
} from './ConfigurationKeyUtils.js'
export {
canProceedChargingProfile,
checkChargingStationState,
+ checkConfiguration,
+ checkStationInfoConnectorStatus,
+ getBootConnectorStatus,
+ getChargingStationId,
getConnectorChargingProfiles,
+ getHashId,
getIdTagsFile,
+ getMaxConfiguredNumberOfConnectors,
+ getMaxNumberOfEvses,
+ getPhaseRotationValue,
hasFeatureProfile,
hasPendingReservation,
hasPendingReservations,
hasReservationExpired,
+ pickConfiguredNumberOfConnectors,
prepareChargingProfileKind,
removeExpiredReservations,
resetAuthorizeConnectorStatus,
resetConnectorStatus,
+ setChargingStationOptions,
+ validateStationInfo,
} from './Helpers.js'
export type { IBootstrap } from './IBootstrap.js'
+export { IdTagsCache } from './IdTagsCache.js'
+export { SharedLRUCache } from './SharedLRUCache.js'
+export { applyMigration, coerceVersion, CURRENT_SCHEMA_VERSION } from './TemplateMigrations.js'
+export { StrictTemplateSchema, TemplateSchema } from './TemplateSchema.js'
+export { TemplateValidationError, validateTemplate } from './TemplateValidation.js'
+export { OCPP16ServiceUtils } from './1.6/OCPP16ServiceUtils.js'
export { OCPP20ServiceUtils } from './2.0/OCPP20ServiceUtils.js'
export { OCPPAuthServiceFactory } from './auth/index.js'
export { sendAndSetConnectorStatus } from './OCPPConnectorStatusOperations.js'
import { z } from 'zod'
import { ConfigurationSection, type LogConfiguration } from '../../../types/index.js'
-import { Configuration } from '../../../utils/Configuration.js'
+import { Configuration } from '../../../utils/index.js'
const MAX_TAIL_LINES = 5000
const DEFAULT_TAIL_LINES = 200
import type { ErrorType, IncomingRequestCommand, JsonType, RequestCommand } from '../types/index.js'
+// Direct path: the `ocpp/index.js` barrel pulls OCPP20ServiceUtils which transitively imports OCPPError, causing a TDZ cycle.
import { OCPPConstants } from '../charging-station/ocpp/OCPPConstants.js'
import { BaseError } from './BaseError.js'
StorageConfigurationSchema,
UIServerConfigurationSchema,
WorkerConfigurationSchema,
-} from '../charging-station/ConfigurationSchema.js'
+} from '../utils/index.js'
export enum ApplicationProtocolVersion {
VERSION_11 = '1.1',
import { env } from 'node:process'
import { fileURLToPath } from 'node:url'
-import { CURRENT_CONFIGURATION_SCHEMA_VERSION } from '../charging-station/ConfigurationMigrations.js'
-import {
- ConfigurationValidationError,
- validateConfiguration,
-} from '../charging-station/ConfigurationValidation.js'
import { BaseError } from '../exception/index.js'
import {
ApplicationProtocol,
DEFAULT_WORKER_START_DELAY_MS,
WorkerProcessType,
} from '../worker/index.js'
+import { CURRENT_CONFIGURATION_SCHEMA_VERSION } from './ConfigurationMigrations.js'
import {
buildPerformanceUriFilePath,
+ configurationLogPrefix,
getDefaultPerformanceStorageUri,
- logPrefix,
} from './ConfigurationUtils.js'
+import { ConfigurationValidationError, validateConfiguration } from './ConfigurationValidation.js'
import { Constants } from './Constants.js'
import { ensureError, handleFileException } from './ErrorUtils.js'
import { logger } from './Logger.js'
Configuration.configurationFile = configurationFile
} else {
console.error(
- `${chalk.green(logPrefix())} ${chalk.red(
+ `${chalk.green(configurationLogPrefix())} ${chalk.red(
"Configuration file './src/assets/config.json' not found, using default configuration"
)}`
)
validationError instanceof ConfigurationValidationError ||
validationError instanceof BaseError
) {
- console.error(`${chalk.green(logPrefix())} ${chalk.red(validationError.message)}`)
+ console.error(
+ `${chalk.green(configurationLogPrefix())} ${chalk.red(validationError.message)}`
+ )
process.exit(1)
}
throw validationError
Configuration.configurationFile,
FileType.Configuration,
ensureError(error),
- logPrefix(),
+ configurationLogPrefix(),
{ consoleOut: true }
)
}
Configuration.configurationFileReloading = true
const consoleWarnOnce = once(console.warn)
consoleWarnOnce(
- `${chalk.green(logPrefix())} ${chalk.yellow(
+ `${chalk.green(configurationLogPrefix())} ${chalk.yellow(
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
`${FileType.Configuration} ${Configuration.configurationFile} file has changed, reload`
)}`
)
Configuration.runReloadLoop().catch((error: unknown) => {
- logger.error(`${logPrefix()} Configuration reload loop error:`, ensureError(error))
+ logger.error(
+ `${configurationLogPrefix()} Configuration reload loop error:`,
+ ensureError(error)
+ )
})
})
} catch (error) {
Configuration.configurationFile,
FileType.Configuration,
ensureError(error),
- logPrefix(),
+ configurationLogPrefix(),
{ consoleOut: true }
)
}
await Configuration.configurationChangeCallback()
} catch (callbackError) {
logger.error(
- `${logPrefix()} Configuration change callback error:`,
+ `${configurationLogPrefix()} Configuration change callback error:`,
ensureError(callbackError)
)
}
} catch (error) {
if (error instanceof ConfigurationValidationError || error instanceof BaseError) {
logger.error(
- `${logPrefix()} Configuration hot-reload failed; rolling back to previous configuration:`,
+ `${configurationLogPrefix()} Configuration hot-reload failed; rolling back to previous configuration:`,
error
)
} else {
logger.error(
- `${logPrefix()} Configuration hot-reload failed with unexpected error; rolling back:`,
+ `${configurationLogPrefix()} Configuration hot-reload failed with unexpected error; rolling back:`,
ensureError(error)
)
}
import { Constants } from './Constants.js'
import { logPrefix as utilsLogPrefix } from './Utils.js'
-export const logPrefix = (): string => {
+export const configurationLogPrefix = (): string => {
return utilsLogPrefix(' Simulator configuration |')
}
import type { FieldError } from './ConfigurationMigrations.js'
import { BaseError } from '../exception/index.js'
-import { logPrefix } from '../utils/ConfigurationUtils.js'
-// Direct path: the `utils/index.js` barrel re-exports Configuration, causing a TDZ cycle.
-import { isEmpty } from '../utils/Utils.js'
import {
applyConfigurationMigration,
coerceConfigurationVersion,
remapDeprecatedKeys,
} from './ConfigurationMigrations.js'
import { ConfigurationSchema } from './ConfigurationSchema.js'
+import { configurationLogPrefix } from './ConfigurationUtils.js'
+import { isEmpty } from './Utils.js'
const moduleName = 'ConfigurationValidation'
: `use '${canonicalDestination}' instead`
// console.warn: logger.warn would recurse via Configuration → validateConfiguration.
console.warn(
- `${chalk.green(logPrefix())} ${chalk.yellow(
+ `${chalk.green(configurationLogPrefix())} ${chalk.yellow(
`${moduleName}: deprecated configuration key '${sourceKey}' detected in '${filePath}'; ${guidance}`
)}`
)
buildEvsesStatus,
} from './ChargingStationConfigurationUtils.js'
export { Configuration } from './Configuration.js'
+export {
+ applyConfigurationMigration,
+ coerceConfigurationVersion,
+ CURRENT_CONFIGURATION_SCHEMA_VERSION,
+ DEPRECATED_KEY_REMAPPINGS,
+ type FieldError,
+ remapDeprecatedKeys,
+} from './ConfigurationMigrations.js'
+export {
+ ConfigurationSchema,
+ LogConfigurationSchema,
+ StationTemplateUrlSchema,
+ StorageConfigurationSchema,
+ UIServerAuthenticationSchema,
+ UIServerConfigurationSchema,
+ WorkerConfigurationSchema,
+} from './ConfigurationSchema.js'
+export {
+ buildPerformanceUriFilePath,
+ configurationLogPrefix,
+ getDefaultPerformanceStorageUri,
+} from './ConfigurationUtils.js'
+export { ConfigurationValidationError, validateConfiguration } from './ConfigurationValidation.js'
export { Constants } from './Constants.js'
export { ACElectricUtils, DCElectricUtils } from './ElectricUtils.js'
export {
formatLogPrefix,
generateUUID,
getMessageTypeString,
+ getRandomFloat,
getRandomFloatFluctuatedRounded,
getRandomFloatRounded,
getWebSocketCloseEventStatusString,
has,
+ insertAt,
isArraySorted,
isAsyncFunction,
+ isCFEnvironment,
isEmpty,
isJsonObject,
isNotEmptyArray,
mergeDeepRight,
once,
promiseWithTimeout,
+ queueMicrotaskErrorThrowing,
roundTo,
secureRandom,
sleep,
WorkerMessageEvents,
WorkerProcessType,
} from './WorkerTypes.js'
+export { defaultErrorHandler, defaultExitHandler, randomizeDelay, sleep } from './WorkerUtils.js'
import type { ChargingStation } from '../../src/charging-station/index.js'
-import { AutomaticTransactionGenerator } from '../../src/charging-station/AutomaticTransactionGenerator.js'
+import { AutomaticTransactionGenerator } from '../../src/charging-station/index.js'
import { BaseError } from '../../src/exception/index.js'
import { type StartTransactionResult } from '../../src/types/index.js'
-import { Constants } from '../../src/utils/Constants.js'
+import { Constants } from '../../src/utils/index.js'
import { flushMicrotasks, standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import { createMockChargingStation } from './helpers/StationHelpers.js'
reconstructTemplateIndexes,
STATE_FILE_VERSION,
writeStateFile,
-} from '../../src/charging-station/BootstrapStateUtils.js'
+} from '../../src/charging-station/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
await describe('BootstrapStateUtils', async () => {
import type { ChargingStation } from '../../src/charging-station/index.js'
-import { resetConnectorStatus } from '../../src/charging-station/Helpers.js'
+import { resetConnectorStatus } from '../../src/charging-station/index.js'
import { RegistrationStatusEnumType } from '../../src/types/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import { TEST_ONE_HOUR_MS } from './ChargingStationTestConstants.js'
import type { ChargingStation } from '../../src/charging-station/index.js'
-import { OCPP16ServiceUtils } from '../../src/charging-station/ocpp/1.6/OCPP16ServiceUtils.js'
-import { OCPP20ServiceUtils } from '../../src/charging-station/ocpp/2.0/OCPP20ServiceUtils.js'
+import { OCPP16ServiceUtils } from '../../src/charging-station/ocpp/index.js'
+import { OCPP20ServiceUtils } from '../../src/charging-station/ocpp/index.js'
import { OCPPVersion } from '../../src/types/index.js'
import {
setupConnectorWithTransaction,
deleteConfigurationKey,
getConfigurationKey,
setConfigurationKeyValue,
-} from '../../src/charging-station/ConfigurationKeyUtils.js'
+} from '../../src/charging-station/index.js'
import { OCPP20ComponentName, OCPPVersion, StandardParametersKey } from '../../src/types/index.js'
import { logger } from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
resetConnectorStatus,
setChargingStationOptions,
validateStationInfo,
-} from '../../src/charging-station/Helpers.js'
+} from '../../src/charging-station/index.js'
import {
AvailabilityType,
type ChargingProfile,
import type { ChargingStation } from '../../src/charging-station/index.js'
-import { getIdTagsFile } from '../../src/charging-station/Helpers.js'
-import { IdTagsCache } from '../../src/charging-station/IdTagsCache.js'
+import { getIdTagsFile } from '../../src/charging-station/index.js'
+import { IdTagsCache } from '../../src/charging-station/index.js'
import { IdTagDistribution } from '../../src/types/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import { createMockChargingStation } from './helpers/StationHelpers.js'
ChargingStationTemplate,
} from '../../src/types/index.js'
-import { Bootstrap } from '../../src/charging-station/Bootstrap.js'
-import { SharedLRUCache } from '../../src/charging-station/SharedLRUCache.js'
+import { Bootstrap } from '../../src/charging-station/index.js'
+import { SharedLRUCache } from '../../src/charging-station/index.js'
import { StandardParametersKey } from '../../src/types/index.js'
-import { Constants } from '../../src/utils/Constants.js'
+import { Constants } from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
interface BootstrapStatic {
applyMigration,
coerceVersion,
CURRENT_SCHEMA_VERSION,
-} from '../../src/charging-station/TemplateMigrations.js'
+} from '../../src/charging-station/index.js'
import { logger } from '../../src/utils/index.js'
import { mockLoggerWarnDebug, standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import { buildLegacyTemplate } from './helpers/TemplateFixtures.js'
import assert from 'node:assert/strict'
import { afterEach, describe, it } from 'node:test'
-import { CURRENT_SCHEMA_VERSION } from '../../src/charging-station/TemplateMigrations.js'
-import { TemplateSchema } from '../../src/charging-station/TemplateSchema.js'
+import { CURRENT_SCHEMA_VERSION } from '../../src/charging-station/index.js'
+import { TemplateSchema } from '../../src/charging-station/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import { TEST_CHARGING_STATION_BASE_NAME } from './ChargingStationTestConstants.js'
import { buildMinimalTemplate } from './helpers/TemplateFixtures.js'
import { afterEach, describe, it } from 'node:test'
import { ZodError } from 'zod'
-import { CURRENT_SCHEMA_VERSION } from '../../src/charging-station/TemplateMigrations.js'
-import {
- TemplateValidationError,
- validateTemplate,
-} from '../../src/charging-station/TemplateValidation.js'
+import { CURRENT_SCHEMA_VERSION } from '../../src/charging-station/index.js'
+import { TemplateValidationError, validateTemplate } from '../../src/charging-station/index.js'
import { BaseError } from '../../src/exception/index.js'
import { logger } from '../../src/utils/index.js'
import { mockLoggerWarnDebug, standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import assert from 'node:assert/strict'
import { afterEach, describe, it } from 'node:test'
-import { BaseError } from '../../src/exception/BaseError.js'
+import { BaseError } from '../../src/exception/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
await describe('BaseError', async () => {
import assert from 'node:assert/strict'
import { afterEach, describe, it } from 'node:test'
-import { OCPPConstants } from '../../src/charging-station/ocpp/OCPPConstants.js'
-import { BaseError } from '../../src/exception/BaseError.js'
-import { OCPPError } from '../../src/exception/OCPPError.js'
+import { OCPPConstants } from '../../src/charging-station/ocpp/index.js'
+import { BaseError } from '../../src/exception/index.js'
+import { OCPPError } from '../../src/exception/index.js'
import { ErrorType, RequestCommand } from '../../src/types/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import assert from 'node:assert/strict'
import { afterEach, describe, it } from 'node:test'
-import { AsyncLock, AsyncLockType } from '../../src/utils/AsyncLock.js'
+import { AsyncLock, AsyncLockType } from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
await describe('AsyncLock', async () => {
buildConnectorsStatus,
buildEvseEntries,
buildEvsesStatus,
-} from '../../src/utils/ChargingStationConfigurationUtils.js'
-import { Constants } from '../../src/utils/Constants.js'
+} from '../../src/utils/index.js'
+import { Constants } from '../../src/utils/index.js'
import {
cleanupChargingStation,
createMockChargingStation,
import type { ConfigurationData } from '../../src/types/index.js'
-import { ConfigurationValidationError } from '../../src/charging-station/ConfigurationValidation.js'
import { BaseError } from '../../src/exception/index.js'
import { ConfigurationSection } from '../../src/types/index.js'
+import { ConfigurationValidationError } from '../../src/utils/index.js'
import { Configuration, logger } from '../../src/utils/index.js'
+import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import {
buildInvalidJsonString,
buildMinimalConfiguration,
-} from '../charging-station/helpers/ConfigurationFixtures.js'
-import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
+} from './helpers/ConfigurationFixtures.js'
interface ConfigurationInternals {
configurationChangeCallback?: () => Promise<void>
WorkerConfiguration,
} from '../../src/types/index.js'
-import { CURRENT_CONFIGURATION_SCHEMA_VERSION } from '../../src/charging-station/ConfigurationMigrations.js'
import {
ApplicationProtocol,
ApplicationProtocolVersion,
StorageType,
SupervisionUrlDistribution,
} from '../../src/types/index.js'
+import { CURRENT_CONFIGURATION_SCHEMA_VERSION } from '../../src/utils/index.js'
import { Configuration } from '../../src/utils/index.js'
import { WorkerProcessType } from '../../src/worker/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
CURRENT_CONFIGURATION_SCHEMA_VERSION,
DEPRECATED_KEY_REMAPPINGS,
remapDeprecatedKeys,
-} from '../../src/charging-station/ConfigurationMigrations.js'
+} from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import {
buildLegacyConfiguration,
import {
CURRENT_CONFIGURATION_SCHEMA_VERSION,
DEPRECATED_KEY_REMAPPINGS,
-} from '../../src/charging-station/ConfigurationMigrations.js'
-import {
- ConfigurationSchema,
- WorkerConfigurationSchema,
-} from '../../src/charging-station/ConfigurationSchema.js'
+} from '../../src/utils/index.js'
+import { ConfigurationSchema, WorkerConfigurationSchema } from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import {
BAD_FIXTURES,
import { StorageType } from '../../src/types/index.js'
import {
buildPerformanceUriFilePath,
+ configurationLogPrefix,
getDefaultPerformanceStorageUri,
- logPrefix,
-} from '../../src/utils/ConfigurationUtils.js'
+} from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
await describe('ConfigurationUtils', async () => {
})
await it('should return log prefix with simulator configuration', () => {
- assert.ok(logPrefix().includes(' Simulator configuration |'))
+ assert.ok(configurationLogPrefix().includes(' Simulator configuration |'))
})
await it('should build file URI path for performance storage', () => {
import { afterEach, describe, it } from 'node:test'
import { fileURLToPath } from 'node:url'
-import { validateConfiguration } from '../../src/charging-station/ConfigurationValidation.js'
+import { validateConfiguration } from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
/** p99 must stay within Nx of the median (relative threshold absorbs CI noise). */
import { afterEach, describe, it } from 'node:test'
import { ZodError } from 'zod'
+import { BaseError } from '../../src/exception/index.js'
import {
CURRENT_CONFIGURATION_SCHEMA_VERSION,
DEPRECATED_KEY_REMAPPINGS,
-} from '../../src/charging-station/ConfigurationMigrations.js'
-import {
- ConfigurationValidationError,
- validateConfiguration,
-} from '../../src/charging-station/ConfigurationValidation.js'
-import { BaseError } from '../../src/exception/index.js'
+} from '../../src/utils/index.js'
+import { ConfigurationValidationError, validateConfiguration } from '../../src/utils/index.js'
import { logger } from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
import {
import assert from 'node:assert/strict'
import { afterEach, describe, it } from 'node:test'
-import { ACElectricUtils, DCElectricUtils } from '../../src/utils/ElectricUtils.js'
+import { ACElectricUtils, DCElectricUtils } from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
const COS_PHI_RESIDENTIAL = 0.85
handleSendMessageError,
handleUncaughtException,
handleUnhandledRejection,
-} from '../../src/utils/ErrorUtils.js'
+} from '../../src/utils/index.js'
import { logger } from '../../src/utils/index.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../charging-station/ChargingStationTestConstants.js'
import { createMockChargingStation } from '../charging-station/helpers/StationHelpers.js'
import { afterEach, beforeEach, describe, it } from 'node:test'
import { FileType } from '../../src/types/index.js'
-import { atomicWriteFile, atomicWriteFileSync, watchJsonFile } from '../../src/utils/FileUtils.js'
+import { atomicWriteFile, atomicWriteFileSync, watchJsonFile } from '../../src/utils/index.js'
import { logger } from '../../src/utils/index.js'
import { createLoggerMocks, standardCleanup } from '../helpers/TestLifecycleHelpers.js'
buildStartedMessage,
buildStoppedMessage,
buildUpdatedMessage,
-} from '../../src/utils/MessageChannelUtils.js'
+} from '../../src/utils/index.js'
import {
cleanupChargingStation,
createMockChargingStation,
import assert from 'node:assert/strict'
import { afterEach, describe, it } from 'node:test'
-import { average, max, median, min, percentile, std } from '../../src/utils/StatisticUtils.js'
+import { average, max, median, min, percentile, std } from '../../src/utils/index.js'
import { standardCleanup } from '../helpers/TestLifecycleHelpers.js'
await describe('StatisticUtils', async () => {
truncateId,
validateIdentifierString,
validateUUID,
-} from '../../src/utils/Utils.js'
+} from '../../src/utils/index.js'
import { standardCleanup, withMockTimers } from '../helpers/TestLifecycleHelpers.js'
await describe('Utils', async () => {
* @file Shared configuration fixtures for schema/migration/validation tests.
*/
-import { CURRENT_CONFIGURATION_SCHEMA_VERSION } from '../../../src/charging-station/ConfigurationMigrations.js'
+import { CURRENT_CONFIGURATION_SCHEMA_VERSION } from '../../../src/utils/index.js'
/**
* Build a minimal valid configuration at the current schema version.
defaultExitHandler,
randomizeDelay,
sleep,
-} from '../../src/worker/WorkerUtils.js'
+} from '../../src/worker/index.js'
import { standardCleanup, withMockTimers } from '../helpers/TestLifecycleHelpers.js'
await describe('WorkerUtils', async () => {