import { AsyncResource } from 'node:async_hooks';
-import { type ChargingStation, ChargingStationUtils, IdTagsCache } from './internal';
+import type { ChargingStation } from './ChargingStation';
+import { ChargingStationUtils } from './ChargingStationUtils';
+import { IdTagsCache } from './IdTagsCache';
import { BaseError } from '../exception';
// import { PerformanceStatistics } from '../performance';
import { PerformanceStatistics } from '../performance/PerformanceStatistics';
import chalk from 'chalk';
-import { type AbstractUIServer, ChargingStationUtils, UIServerFactory } from './internal';
+import { ChargingStationUtils } from './ChargingStationUtils';
+import type { AbstractUIServer } from './ui-server/AbstractUIServer';
+import { UIServerFactory } from './ui-server/UIServerFactory';
import packageJson from '../../package.json' assert { type: 'json' };
import { BaseError } from '../exception';
import { type Storage, StorageFactory } from '../performance';
import merge from 'just-merge';
import WebSocket, { type RawData } from 'ws';
+import { AutomaticTransactionGenerator } from './AutomaticTransactionGenerator';
+import { ChargingStationConfigurationUtils } from './ChargingStationConfigurationUtils';
+import { ChargingStationUtils } from './ChargingStationUtils';
+import { ChargingStationWorkerBroadcastChannel } from './ChargingStationWorkerBroadcastChannel';
+import { IdTagsCache } from './IdTagsCache';
+import { MessageChannelUtils } from './MessageChannelUtils';
import {
- AutomaticTransactionGenerator,
- ChargingStationConfigurationUtils,
- ChargingStationUtils,
- ChargingStationWorkerBroadcastChannel,
- IdTagsCache,
- MessageChannelUtils,
- SharedLRUCache,
-} from './internal';
-import {
- // OCPP16IncomingRequestService,
+ OCPP16IncomingRequestService,
OCPP16RequestService,
- // OCPP16ResponseService,
+ OCPP16ResponseService,
OCPP16ServiceUtils,
OCPP20IncomingRequestService,
OCPP20RequestService,
- // OCPP20ResponseService,
+ OCPP20ResponseService,
type OCPPIncomingRequestService,
type OCPPRequestService,
- // OCPPServiceUtils,
+ OCPPServiceUtils,
} from './ocpp';
-import { OCPP16IncomingRequestService } from './ocpp/1.6/OCPP16IncomingRequestService';
-import { OCPP16ResponseService } from './ocpp/1.6/OCPP16ResponseService';
-import { OCPP20ResponseService } from './ocpp/2.0/OCPP20ResponseService';
-import { OCPPServiceUtils } from './ocpp/OCPPServiceUtils';
+import { SharedLRUCache } from './SharedLRUCache';
import { BaseError, OCPPError } from '../exception';
-import { PerformanceStatistics } from '../performance';
+// import { PerformanceStatistics } from '../performance';
+import { PerformanceStatistics } from '../performance/PerformanceStatistics';
import {
type AutomaticTransactionGeneratorConfiguration,
AvailabilityType,
-import type { ChargingStation } from './internal';
+import type { ChargingStation } from './ChargingStation';
import type { ConfigurationKey, ConfigurationKeyType } from '../types';
import { logger } from '../utils';
import chalk from 'chalk';
import moment from 'moment';
-import type { ChargingStation } from './internal';
+import type { ChargingStation } from './ChargingStation';
import { BaseError } from '../exception';
import {
AmpereUnits,
import { ThreadWorker } from 'poolifier';
-import { ChargingStation, ChargingStationUtils } from './internal';
+import { ChargingStation } from './ChargingStation';
+import { ChargingStationUtils } from './ChargingStationUtils';
import type { ChargingStationWorkerData } from '../types';
import { Utils } from '../utils';
import { WorkerConstants, type WorkerMessage, WorkerMessageEvents } from '../worker';
-import {
- type ChargingStation,
- ChargingStationConfigurationUtils,
- WorkerBroadcastChannel,
-} from './internal';
+import type { ChargingStation } from './ChargingStation';
+import { ChargingStationConfigurationUtils } from './ChargingStationConfigurationUtils';
import { OCPP16ServiceUtils } from './ocpp';
+import { WorkerBroadcastChannel } from './WorkerBroadcastChannel';
import { BaseError, type OCPPError } from '../exception';
import {
AuthorizationStatus,
import fs from 'node:fs';
-import { type ChargingStation, ChargingStationUtils } from './internal';
+import type { ChargingStation } from './ChargingStation';
+import { ChargingStationUtils } from './ChargingStationUtils';
import { FileType, IdTagDistribution } from '../types';
import { FileUtils, Utils, logger } from '../utils';
-import type { ChargingStation } from './internal';
+import type { ChargingStation } from './ChargingStation';
import {
type ChargingStationData,
type ChargingStationWorkerMessage,
import LRUCache from 'mnemonist/lru-map-with-delete.js';
-import { Bootstrap } from './internal';
+import { Bootstrap } from './Bootstrap';
import type { ChargingStationConfiguration, ChargingStationTemplate } from '../types';
import { Utils } from '../utils';
-import { type AbstractUIService, WorkerBroadcastChannel } from './internal';
+import type { AbstractUIService } from './ui-server/ui-services/AbstractUIService';
+import { WorkerBroadcastChannel } from './WorkerBroadcastChannel';
import {
type BroadcastChannelResponse,
type BroadcastChannelResponsePayload,
-export {
- Bootstrap,
- type ChargingStation,
- ChargingStationConfigurationUtils,
- ChargingStationUtils,
- MessageChannelUtils,
-} from './internal';
+export { Bootstrap } from './Bootstrap';
+export type { ChargingStation } from './ChargingStation';
+export { ChargingStationConfigurationUtils } from './ChargingStationConfigurationUtils';
+export { ChargingStationUtils } from './ChargingStationUtils';
+export { MessageChannelUtils } from './MessageChannelUtils';
+++ /dev/null
-export * from './IdTagsCache';
-export * from './AutomaticTransactionGenerator';
-export * from './Bootstrap';
-export * from './ChargingStation';
-export * from './ChargingStationConfigurationUtils';
-export * from './ChargingStationUtils';
-export * from './ChargingStationWorkerBroadcastChannel';
-export * from './MessageChannelUtils';
-export * from './SharedLRUCache';
-export * from './UIServiceWorkerBroadcastChannel';
-export * from './WorkerBroadcastChannel';
-export * from './ui-server/AbstractUIServer';
-export * from './ui-server/UIHttpServer';
-export * from './ui-server/UIServerFactory';
-export * from './ui-server/UIServerUtils';
-export * from './ui-server/UIWebSocketServer';
-export * from './ui-server/ui-services/AbstractUIService';
-export * from './ui-server/ui-services/UIService001';
-export * from './ui-server/ui-services/UIServiceFactory';
import { type ConnectorStatusTransition, OCPP16ChargePointStatus } from '../../../types';
-import { OCPPConstants } from '../internal';
+import { OCPPConstants } from '../OCPPConstants';
export class OCPP16Constants extends OCPPConstants {
static readonly ChargePointStatusChargingStationTransitions: Readonly<
import { Client, type FTPResponse } from 'basic-ftp';
import tar from 'tar';
+import { OCPP16Constants } from './OCPP16Constants';
+import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
import {
type ChargingStation,
ChargingStationConfigurationUtils,
type UnlockConnectorResponse,
} from '../../../types';
import { Constants, Utils, logger } from '../../../utils';
-import { OCPP16Constants, OCPP16ServiceUtils, OCPPIncomingRequestService } from '../internal';
+import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService';
const moduleName = 'OCPP16IncomingRequestService';
import type { JSONSchemaType } from 'ajv';
+import { OCPP16Constants } from './OCPP16Constants';
+import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
import type { ChargingStation } from '../../../charging-station';
import { OCPPError } from '../../../exception';
import {
type RequestParams,
} from '../../../types';
import { Constants, Utils } from '../../../utils';
-import {
- OCPP16Constants,
- OCPP16ServiceUtils,
- OCPPRequestService,
- type OCPPResponseService,
-} from '../internal';
+import { OCPPRequestService } from '../OCPPRequestService';
+import type { OCPPResponseService } from '../OCPPResponseService';
const moduleName = 'OCPP16RequestService';
import type { JSONSchemaType } from 'ajv';
+import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
import {
type ChargingStation,
ChargingStationConfigurationUtils,
type UnlockConnectorResponse,
} from '../../../types';
import { Constants, Utils, logger } from '../../../utils';
-import { OCPP16ServiceUtils, OCPPResponseService } from '../internal';
+import { OCPPResponseService } from '../OCPPResponseService';
const moduleName = 'OCPP16ResponseService';
Voltage,
} from '../../../types';
import { ACElectricUtils, Constants, DCElectricUtils, Utils, logger } from '../../../utils';
-import { OCPPServiceUtils } from '../internal';
+import { OCPPServiceUtils } from '../OCPPServiceUtils';
export class OCPP16ServiceUtils extends OCPPServiceUtils {
public static checkFeatureProfile(
import { type ConnectorStatusTransition, OCPP20ConnectorStatusEnumType } from '../../../types';
-import { OCPPConstants } from '../internal';
+import { OCPPConstants } from '../OCPPConstants';
export class OCPP20Constants extends OCPPConstants {
static readonly ChargingStationStatusTransitions: Readonly<ConnectorStatusTransition[]> =
import type { JSONSchemaType } from 'ajv';
+import { OCPP20ServiceUtils } from './OCPP20ServiceUtils';
import type { ChargingStation } from '../../../charging-station';
import { OCPPError } from '../../../exception';
import {
OCPPVersion,
} from '../../../types';
import { logger } from '../../../utils';
-import { OCPP20ServiceUtils, OCPPIncomingRequestService } from '../internal';
+import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService';
const moduleName = 'OCPP20IncomingRequestService';
import type { JSONSchemaType } from 'ajv';
+import { OCPP20Constants } from './OCPP20Constants';
+import { OCPP20ServiceUtils } from './OCPP20ServiceUtils';
import type { ChargingStation } from '../../../charging-station';
import { OCPPError } from '../../../exception';
import {
type RequestParams,
} from '../../../types';
import { Utils } from '../../../utils';
-import {
- OCPP20Constants,
- OCPP20ServiceUtils,
- OCPPRequestService,
- type OCPPResponseService,
-} from '../internal';
+import { OCPPRequestService } from '../OCPPRequestService';
+import type { OCPPResponseService } from '../OCPPResponseService';
const moduleName = 'OCPP20RequestService';
import type { JSONSchemaType } from 'ajv';
+import { OCPP20ServiceUtils } from './OCPP20ServiceUtils';
import { type ChargingStation, ChargingStationConfigurationUtils } from '../../../charging-station';
import { OCPPError } from '../../../exception';
import {
type ResponseHandler,
} from '../../../types';
import { logger } from '../../../utils';
-import { OCPP20ServiceUtils, OCPPResponseService } from '../internal';
+import { OCPPResponseService } from '../OCPPResponseService';
const moduleName = 'OCPP20ResponseService';
import type { JSONSchemaType } from 'ajv';
import { type JsonType, OCPPVersion } from '../../../types';
-import { OCPPServiceUtils } from '../internal';
+import { OCPPServiceUtils } from '../OCPPServiceUtils';
export class OCPP20ServiceUtils extends OCPPServiceUtils {
public static parseJsonSchemaFile<T extends JsonType>(
import Ajv, { type JSONSchemaType } from 'ajv';
import ajvFormats from 'ajv-formats';
-import { OCPPConstants, OCPPServiceUtils } from './internal';
+import { OCPPConstants } from './OCPPConstants';
+import { OCPPServiceUtils } from './OCPPServiceUtils';
import { type ChargingStation, ChargingStationUtils } from '../../charging-station';
import { OCPPError } from '../../exception';
import type {
import Ajv, { type JSONSchemaType } from 'ajv';
import ajvFormats from 'ajv-formats';
-import { OCPPConstants, type OCPPResponseService, OCPPServiceUtils } from './internal';
+import { OCPPConstants } from './OCPPConstants';
+import type { OCPPResponseService } from './OCPPResponseService';
+import { OCPPServiceUtils } from './OCPPServiceUtils';
import type { ChargingStation } from '../../charging-station';
import { OCPPError } from '../../exception';
-import { PerformanceStatistics } from '../../performance';
+// import { PerformanceStatistics } from '../../performance';
+import { PerformanceStatistics } from '../../performance/PerformanceStatistics';
import {
type EmptyObject,
type ErrorCallback,
import Ajv, { type JSONSchemaType } from 'ajv';
import ajvFormats from 'ajv-formats';
-import { OCPPServiceUtils } from './internal';
+import { OCPPServiceUtils } from './OCPPServiceUtils';
import type { ChargingStation } from '../../charging-station';
import { OCPPError } from '../../exception';
import type {
import type { DefinedError, ErrorObject, JSONSchemaType } from 'ajv';
-import { OCPP16Constants, OCPP20Constants } from './internal';
+import { OCPP16Constants } from './1.6/OCPP16Constants';
+import { OCPP20Constants } from './2.0/OCPP20Constants';
import { type ChargingStation, ChargingStationConfigurationUtils } from '../../charging-station';
import { BaseError } from '../../exception';
import {
-export {
- OCPP16IncomingRequestService,
- OCPP16RequestService,
- OCPP16ResponseService,
- // FIXME: shall not be exported
- OCPP16ServiceUtils,
- OCPP20IncomingRequestService,
- OCPP20RequestService,
- OCPP20ResponseService,
- OCPPIncomingRequestService,
- OCPPRequestService,
- OCPPServiceUtils,
-} from './internal';
+export { OCPP16IncomingRequestService } from './1.6/OCPP16IncomingRequestService';
+export { OCPP16RequestService } from './1.6/OCPP16RequestService';
+export { OCPP16ResponseService } from './1.6/OCPP16ResponseService';
+// FIXME: shall not be exported
+export { OCPP16ServiceUtils } from './1.6/OCPP16ServiceUtils';
+export { OCPP20IncomingRequestService } from './2.0/OCPP20IncomingRequestService';
+export { OCPP20RequestService } from './2.0/OCPP20RequestService';
+export { OCPP20ResponseService } from './2.0/OCPP20ResponseService';
+export { OCPPIncomingRequestService } from './OCPPIncomingRequestService';
+export { OCPPRequestService } from './OCPPRequestService';
+export { OCPPServiceUtils } from './OCPPServiceUtils';
+++ /dev/null
-export * from './1.6/OCPP16Constants';
-export * from './1.6/OCPP16IncomingRequestService';
-export * from './1.6/OCPP16RequestService';
-export * from './1.6/OCPP16ResponseService';
-export * from './1.6/OCPP16ServiceUtils';
-
-export * from './2.0/OCPP20Constants';
-export * from './2.0/OCPP20IncomingRequestService';
-export * from './2.0/OCPP20RequestService';
-export * from './2.0/OCPP20ResponseService';
-export * from './2.0/OCPP20ServiceUtils';
-
-export * from './OCPPConstants';
-export * from './OCPPIncomingRequestService';
-export * from './OCPPRequestService';
-export * from './OCPPResponseService';
-export * from './OCPPServiceUtils';
import type { WebSocket } from 'ws';
+import type { AbstractUIService } from './ui-services/AbstractUIService';
+import { UIServiceFactory } from './ui-services/UIServiceFactory';
import {
AuthenticationType,
type ChargingStationData,
type ResponsePayload,
type UIServerConfiguration,
} from '../../types';
-import { type AbstractUIService, UIServiceFactory } from '../internal';
export abstract class AbstractUIServer {
public readonly chargingStations: Map<string, ChargingStationData>;
import { StatusCodes } from 'http-status-codes';
+import { AbstractUIServer } from './AbstractUIServer';
+import { UIServerUtils } from './UIServerUtils';
import { BaseError } from '../../exception';
import {
type ProcedureName,
type UIServerConfiguration,
} from '../../types';
import { Constants, Utils, logger } from '../../utils';
-import { AbstractUIServer, UIServerUtils } from '../internal';
const moduleName = 'UIHttpServer';
import chalk from 'chalk';
+import type { AbstractUIServer } from './AbstractUIServer';
+import { UIHttpServer } from './UIHttpServer';
+import { UIServerUtils } from './UIServerUtils';
+import { UIWebSocketServer } from './UIWebSocketServer';
import { ApplicationProtocol, type UIServerConfiguration } from '../../types';
import { Configuration } from '../../utils';
-import { type AbstractUIServer, UIHttpServer, UIServerUtils, UIWebSocketServer } from '../internal';
export class UIServerFactory {
private constructor() {
import { StatusCodes } from 'http-status-codes';
import WebSocket, { type RawData, WebSocketServer } from 'ws';
+import { AbstractUIServer } from './AbstractUIServer';
+import { UIServerUtils } from './UIServerUtils';
import {
type ProtocolRequest,
type ProtocolResponse,
WebSocketCloseEventStatusCode,
} from '../../types';
import { Constants, Utils, logger } from '../../utils';
-import { AbstractUIServer, UIServerUtils } from '../internal';
const moduleName = 'UIWebSocketServer';
ResponseStatus,
} from '../../../types';
import { Utils, logger } from '../../../utils';
-import { type AbstractUIServer, Bootstrap, UIServiceWorkerBroadcastChannel } from '../../internal';
+import { Bootstrap } from '../../Bootstrap';
+import { UIServiceWorkerBroadcastChannel } from '../../UIServiceWorkerBroadcastChannel';
+import type { AbstractUIServer } from '../AbstractUIServer';
const moduleName = 'AbstractUIService';
+import { AbstractUIService } from './AbstractUIService';
import { type ProcedureName, type ProtocolRequestHandler, ProtocolVersion } from '../../../types';
-import { type AbstractUIServer, AbstractUIService } from '../../internal';
+import type { AbstractUIServer } from '../AbstractUIServer';
export class UIService001 extends AbstractUIService {
constructor(uiServer: AbstractUIServer) {
+import type { AbstractUIService } from './AbstractUIService';
+import { UIService001 } from './UIService001';
import { ProtocolVersion } from '../../../types';
-import { type AbstractUIServer, type AbstractUIService, UIService001 } from '../../internal';
+import type { AbstractUIServer } from '../AbstractUIServer';
export class UIServiceFactory {
private constructor() {
import chalk from 'chalk';
-import { Bootstrap } from './charging-station';
+// import { Bootstrap } from './charging-station';
+import { Bootstrap } from './charging-station/Bootstrap';
Bootstrap.getInstance()
.start()