repositories
/
e-mobility-charging-stations-simulator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1cd8382
)
build: switch to NodeNext module resolution
author
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 28 Dec 2023 12:56:39 +0000
(13:56 +0100)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Thu, 28 Dec 2023 12:56:39 +0000
(13:56 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
107 files changed:
.lintstagedrc.js
[new file with mode: 0644]
patch
|
blob
.lintstagedrc.json
[deleted file]
patch
|
blob
|
blame
|
history
src/charging-station/AutomaticTransactionGenerator.ts
patch
|
blob
|
blame
|
history
src/charging-station/Bootstrap.ts
patch
|
blob
|
blame
|
history
src/charging-station/ChargingStation.ts
patch
|
blob
|
blame
|
history
src/charging-station/ChargingStationWorker.ts
patch
|
blob
|
blame
|
history
src/charging-station/ConfigurationKeyUtils.ts
patch
|
blob
|
blame
|
history
src/charging-station/Helpers.ts
patch
|
blob
|
blame
|
history
src/charging-station/IdTagsCache.ts
patch
|
blob
|
blame
|
history
src/charging-station/SharedLRUCache.ts
patch
|
blob
|
blame
|
history
src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts
patch
|
blob
|
blame
|
history
src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
patch
|
blob
|
blame
|
history
src/charging-station/broadcast-channel/WorkerBroadcastChannel.ts
patch
|
blob
|
blame
|
history
src/charging-station/index.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/1.6/OCPP16Constants.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/1.6/OCPP16RequestService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/1.6/OCPP16ResponseService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/2.0/OCPP20Constants.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/2.0/OCPP20RequestService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/2.0/OCPP20ResponseService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/OCPPConstants.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/OCPPIncomingRequestService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/OCPPRequestService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/OCPPResponseService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/OCPPServiceUtils.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/index.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/AbstractUIServer.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/UIHttpServer.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/UIServerFactory.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/UIServerUtils.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/UIWebSocketServer.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/ui-services/AbstractUIService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/ui-services/UIService001.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/ui-services/UIServiceFactory.ts
patch
|
blob
|
blame
|
history
src/exception/OCPPError.ts
patch
|
blob
|
blame
|
history
src/exception/index.ts
patch
|
blob
|
blame
|
history
src/performance/PerformanceStatistics.ts
patch
|
blob
|
blame
|
history
src/performance/index.ts
patch
|
blob
|
blame
|
history
src/performance/storage/JsonFileStorage.ts
patch
|
blob
|
blame
|
history
src/performance/storage/MikroOrmStorage.ts
patch
|
blob
|
blame
|
history
src/performance/storage/MongoDBStorage.ts
patch
|
blob
|
blame
|
history
src/performance/storage/Storage.ts
patch
|
blob
|
blame
|
history
src/performance/storage/StorageFactory.ts
patch
|
blob
|
blame
|
history
src/start.ts
patch
|
blob
|
blame
|
history
src/types/ChargingStationConfiguration.ts
patch
|
blob
|
blame
|
history
src/types/ChargingStationInfo.ts
patch
|
blob
|
blame
|
history
src/types/ChargingStationOcppConfiguration.ts
patch
|
blob
|
blame
|
history
src/types/ChargingStationTemplate.ts
patch
|
blob
|
blame
|
history
src/types/ChargingStationWorker.ts
patch
|
blob
|
blame
|
history
src/types/ConfigurationData.ts
patch
|
blob
|
blame
|
history
src/types/ConnectorStatus.ts
patch
|
blob
|
blame
|
history
src/types/Error.ts
patch
|
blob
|
blame
|
history
src/types/Evse.ts
patch
|
blob
|
blame
|
history
src/types/MeasurandPerPhaseSampledValueTemplates.ts
patch
|
blob
|
blame
|
history
src/types/Statistics.ts
patch
|
blob
|
blame
|
history
src/types/UIProtocol.ts
patch
|
blob
|
blame
|
history
src/types/WorkerBroadcastChannel.ts
patch
|
blob
|
blame
|
history
src/types/index.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/1.6/ChargingProfile.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/1.6/MeterValues.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/1.6/Requests.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/1.6/Responses.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/1.6/Transaction.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/2.0/Common.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/2.0/Requests.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/2.0/Responses.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/2.0/Variables.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/ChargePointErrorCode.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/ChargingProfile.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/Common.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/Configuration.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/ConnectorStatusEnum.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/MeterValues.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/Requests.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/Reservation.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/Responses.ts
patch
|
blob
|
blame
|
history
src/types/ocpp/Transaction.ts
patch
|
blob
|
blame
|
history
src/types/orm/entities/PerformanceData.ts
patch
|
blob
|
blame
|
history
src/types/orm/entities/PerformanceRecord.ts
patch
|
blob
|
blame
|
history
src/utils/AsyncLock.ts
patch
|
blob
|
blame
|
history
src/utils/ChargingStationConfigurationUtils.ts
patch
|
blob
|
blame
|
history
src/utils/Configuration.ts
patch
|
blob
|
blame
|
history
src/utils/ConfigurationUtils.ts
patch
|
blob
|
blame
|
history
src/utils/Constants.ts
patch
|
blob
|
blame
|
history
src/utils/ErrorUtils.ts
patch
|
blob
|
blame
|
history
src/utils/FileUtils.ts
patch
|
blob
|
blame
|
history
src/utils/Logger.ts
patch
|
blob
|
blame
|
history
src/utils/MessageChannelUtils.ts
patch
|
blob
|
blame
|
history
src/utils/StatisticUtils.ts
patch
|
blob
|
blame
|
history
src/utils/Utils.ts
patch
|
blob
|
blame
|
history
src/utils/index.ts
patch
|
blob
|
blame
|
history
src/worker/WorkerAbstract.ts
patch
|
blob
|
blame
|
history
src/worker/WorkerConstants.ts
patch
|
blob
|
blame
|
history
src/worker/WorkerDynamicPool.ts
patch
|
blob
|
blame
|
history
src/worker/WorkerFactory.ts
patch
|
blob
|
blame
|
history
src/worker/WorkerFixedPool.ts
patch
|
blob
|
blame
|
history
src/worker/WorkerSet.ts
patch
|
blob
|
blame
|
history
src/worker/index.ts
patch
|
blob
|
blame
|
history
tests/utils/CircularArray.test.ts
patch
|
blob
|
blame
|
history
tests/utils/ElectricUtils.test.ts
patch
|
blob
|
blame
|
history
tests/utils/StatisticUtils.test.ts
patch
|
blob
|
blame
|
history
tests/utils/Utils.test.ts
patch
|
blob
|
blame
|
history
tsconfig.json
patch
|
blob
|
blame
|
history
diff --git a/.lintstagedrc.js
b/.lintstagedrc.js
new file mode 100644
(file)
index 0000000..
2a11a89
--- /dev/null
+++ b/
.lintstagedrc.js
@@ -0,0
+1,5
@@
+export default {
+ '{src,tests}/**/*.{ts,tsx,cts,mts}': ['prettier --cache --write' /* , 'eslint --cache --fix' */],
+ '**/*.{json,md,yml,yaml}': ['prettier --cache --write'],
+ '**/*.{js,jsx,cjs,mjs}': ['prettier --cache --write', 'eslint --cache --fix'],
+};
diff --git
a/.lintstagedrc.json
b/.lintstagedrc.json
deleted file mode 100644
(file)
index
45cd847
..0000000
--- a/
.lintstagedrc.json
+++ /dev/null
@@
-1,5
+0,0 @@
-{
- "{src,tests}/**/*.{ts,tsx,cts,mts}": ["prettier --cache --write", "eslint --cache --fix"],
- "**/*.{json,md,yml,yaml}": ["prettier --cache --write"],
- "**/*.{js,jsx,cjs,mjs}": ["prettier --cache --write", "eslint --cache --fix"]
-}
diff --git
a/src/charging-station/AutomaticTransactionGenerator.ts
b/src/charging-station/AutomaticTransactionGenerator.ts
index 95b2c67800a59fbe18146001e81c29e95965535c..abe271fd1b168ad734c020dbecc57d7faa992ce8 100644
(file)
--- a/
src/charging-station/AutomaticTransactionGenerator.ts
+++ b/
src/charging-station/AutomaticTransactionGenerator.ts
@@
-2,12
+2,12
@@
import { hoursToMilliseconds, secondsToMilliseconds } from 'date-fns';
import { hoursToMilliseconds, secondsToMilliseconds } from 'date-fns';
-import type { ChargingStation } from './ChargingStation';
-import { checkChargingStation } from './Helpers';
-import { IdTagsCache } from './IdTagsCache';
-import { isIdTagAuthorized } from './ocpp';
-import { BaseError } from '../exception';
-import { PerformanceStatistics } from '../performance';
+import type { ChargingStation } from './ChargingStation
.js
';
+import { checkChargingStation } from './Helpers
.js
';
+import { IdTagsCache } from './IdTagsCache
.js
';
+import { isIdTagAuthorized } from './ocpp
/index.js
';
+import { BaseError } from '../exception
/index.js
';
+import { PerformanceStatistics } from '../performance
/index.js
';
import {
AuthorizationStatus,
RequestCommand,
import {
AuthorizationStatus,
RequestCommand,
@@
-16,7
+16,7
@@
import {
type Status,
StopTransactionReason,
type StopTransactionResponse,
type Status,
StopTransactionReason,
type StopTransactionResponse,
-} from '../types';
+} from '../types
/index.js
';
import {
Constants,
cloneObject,
import {
Constants,
cloneObject,
@@
-27,7
+27,7
@@
import {
logger,
secureRandom,
sleep,
logger,
secureRandom,
sleep,
-} from '../utils';
+} from '../utils
/index.js
';
export class AutomaticTransactionGenerator {
private static readonly instances: Map<string, AutomaticTransactionGenerator> = new Map<
export class AutomaticTransactionGenerator {
private static readonly instances: Map<string, AutomaticTransactionGenerator> = new Map<
diff --git
a/src/charging-station/Bootstrap.ts
b/src/charging-station/Bootstrap.ts
index 503dfb0b7301f3f9e553e21c2a03a3f0ed34ad73..b84de928cf2250dc2facf6cf0663c7809cb61034 100644
(file)
--- a/
src/charging-station/Bootstrap.ts
+++ b/
src/charging-station/Bootstrap.ts
@@
-8,12
+8,12
@@
import { fileURLToPath } from 'node:url';
import chalk from 'chalk';
import { availableParallelism } from 'poolifier';
import chalk from 'chalk';
import { availableParallelism } from 'poolifier';
-import { waitChargingStationEvents } from './Helpers';
-import type { AbstractUIServer } from './ui-server/AbstractUIServer';
-import { UIServerFactory } from './ui-server/UIServerFactory';
+import { waitChargingStationEvents } from './Helpers
.js
';
+import type { AbstractUIServer } from './ui-server/AbstractUIServer
.js
';
+import { UIServerFactory } from './ui-server/UIServerFactory
.js
';
import { version } from '../../package.json';
import { version } from '../../package.json';
-import { BaseError } from '../exception';
-import { type Storage, StorageFactory } from '../performance';
+import { BaseError } from '../exception
/index.js
';
+import { type Storage, StorageFactory } from '../performance
/index.js
';
import {
type ChargingStationData,
type ChargingStationWorkerData,
import {
type ChargingStationData,
type ChargingStationWorkerData,
@@
-27,7
+27,7
@@
import {
type StorageConfiguration,
type UIServerConfiguration,
type WorkerConfiguration,
type StorageConfiguration,
type UIServerConfiguration,
type WorkerConfiguration,
-} from '../types';
+} from '../types
/index.js
';
import {
Configuration,
Constants,
import {
Configuration,
Constants,
@@
-39,8
+39,8
@@
import {
isNullOrUndefined,
logPrefix,
logger,
isNullOrUndefined,
logPrefix,
logger,
-} from '../utils';
-import { type WorkerAbstract, WorkerFactory } from '../worker';
+} from '../utils
/index.js
';
+import { type WorkerAbstract, WorkerFactory } from '../worker
/index.js
';
const moduleName = 'Bootstrap';
const moduleName = 'Bootstrap';
diff --git
a/src/charging-station/ChargingStation.ts
b/src/charging-station/ChargingStation.ts
index 5bc0ec9ad24d8ae76f486f388eb86d03a2cad0b8..892a670499cd6aefe175cf60533015805c01ae55 100644
(file)
--- a/
src/charging-station/ChargingStation.ts
+++ b/
src/charging-station/ChargingStation.ts
@@
-11,14
+11,14
@@
import { millisecondsToSeconds, secondsToMilliseconds } from 'date-fns';
import merge from 'just-merge';
import { type RawData, WebSocket } from 'ws';
import merge from 'just-merge';
import { type RawData, WebSocket } from 'ws';
-import { AutomaticTransactionGenerator } from './AutomaticTransactionGenerator';
-import { ChargingStationWorkerBroadcastChannel } from './broadcast-channel/ChargingStationWorkerBroadcastChannel';
+import { AutomaticTransactionGenerator } from './AutomaticTransactionGenerator
.js
';
+import { ChargingStationWorkerBroadcastChannel } from './broadcast-channel/ChargingStationWorkerBroadcastChannel
.js
';
import {
addConfigurationKey,
deleteConfigurationKey,
getConfigurationKey,
setConfigurationKeyValue,
import {
addConfigurationKey,
deleteConfigurationKey,
getConfigurationKey,
setConfigurationKeyValue,
-} from './ConfigurationKeyUtils';
+} from './ConfigurationKeyUtils
.js
';
import {
buildConnectorsMap,
checkChargingStation,
import {
buildConnectorsMap,
checkChargingStation,
@@
-43,8
+43,8
@@
import {
propagateSerialNumber,
stationTemplateToStationInfo,
warnTemplateKeysDeprecation,
propagateSerialNumber,
stationTemplateToStationInfo,
warnTemplateKeysDeprecation,
-} from './Helpers';
-import { IdTagsCache } from './IdTagsCache';
+} from './Helpers
.js
';
+import { IdTagsCache } from './IdTagsCache
.js
';
import {
OCPP16IncomingRequestService,
OCPP16RequestService,
import {
OCPP16IncomingRequestService,
OCPP16RequestService,
@@
-59,10
+59,10
@@
import {
buildTransactionEndMeterValue,
getMessageTypeString,
sendAndSetConnectorStatus,
buildTransactionEndMeterValue,
getMessageTypeString,
sendAndSetConnectorStatus,
-} from './ocpp';
-import { SharedLRUCache } from './SharedLRUCache';
-import { BaseError, OCPPError } from '../exception';
-import { PerformanceStatistics } from '../performance';
+} from './ocpp
/index.js
';
+import { SharedLRUCache } from './SharedLRUCache
.js
';
+import { BaseError, OCPPError } from '../exception
/index.js
';
+import { PerformanceStatistics } from '../performance
/index.js
';
import {
type AutomaticTransactionGeneratorConfiguration,
AvailabilityType,
import {
type AutomaticTransactionGeneratorConfiguration,
AvailabilityType,
@@
-117,7
+117,7
@@
import {
type WSError,
WebSocketCloseEventStatusCode,
type WsOptions,
type WSError,
WebSocketCloseEventStatusCode,
type WsOptions,
-} from '../types';
+} from '../types
/index.js
';
import {
ACElectricUtils,
AsyncLock,
import {
ACElectricUtils,
AsyncLock,
@@
-152,7
+152,7
@@
import {
secureRandom,
sleep,
watchJsonFile,
secureRandom,
sleep,
watchJsonFile,
-} from '../utils';
+} from '../utils
/index.js
';
export class ChargingStation extends EventEmitter {
public readonly index: number;
export class ChargingStation extends EventEmitter {
public readonly index: number;
diff --git
a/src/charging-station/ChargingStationWorker.ts
b/src/charging-station/ChargingStationWorker.ts
index d9e462d064967b75255dc333f3926f28b14b4cf4..c8f992f370b39c48b14275bc24a39953ab089f7c 100644
(file)
--- a/
src/charging-station/ChargingStationWorker.ts
+++ b/
src/charging-station/ChargingStationWorker.ts
@@
-4,11
+4,11
@@
import { parentPort } from 'node:worker_threads';
import { ThreadWorker } from 'poolifier';
import { ThreadWorker } from 'poolifier';
-import { ChargingStation } from './ChargingStation';
-import { BaseError } from '../exception';
-import type { ChargingStationWorkerData } from '../types';
-import { Configuration } from '../utils';
-import { type WorkerMessage, WorkerMessageEvents } from '../worker';
+import { ChargingStation } from './ChargingStation
.js
';
+import { BaseError } from '../exception
/index.js
';
+import type { ChargingStationWorkerData } from '../types
/index.js
';
+import { Configuration } from '../utils
/index.js
';
+import { type WorkerMessage, WorkerMessageEvents } from '../worker
/index.js
';
/**
* Creates and starts a charging station instance
/**
* Creates and starts a charging station instance
diff --git
a/src/charging-station/ConfigurationKeyUtils.ts
b/src/charging-station/ConfigurationKeyUtils.ts
index d1d093f7e978d832453b1bc1e585460d2e09f227..c7302e70577ef5072297ee18e6e14d6c8bba3e4a 100644
(file)
--- a/
src/charging-station/ConfigurationKeyUtils.ts
+++ b/
src/charging-station/ConfigurationKeyUtils.ts
@@
-1,6
+1,6
@@
-import type { ChargingStation } from './ChargingStation';
-import type { ConfigurationKey, ConfigurationKeyType } from '../types';
-import { logger } from '../utils';
+import type { ChargingStation } from './ChargingStation
.js
';
+import type { ConfigurationKey, ConfigurationKeyType } from '../types
/index.js
';
+import { logger } from '../utils
/index.js
';
interface ConfigurationKeyOptions {
readonly?: boolean;
interface ConfigurationKeyOptions {
readonly?: boolean;
diff --git
a/src/charging-station/Helpers.ts
b/src/charging-station/Helpers.ts
index 4f34fe180a33b01714466c4fb3cc792335863965..094205b8965cece47147e944f1f1c0e46f34dcf3 100644
(file)
--- a/
src/charging-station/Helpers.ts
+++ b/
src/charging-station/Helpers.ts
@@
-22,9
+22,9
@@
import {
} from 'date-fns';
import { maxTime } from 'date-fns/constants';
} from 'date-fns';
import { maxTime } from 'date-fns/constants';
-import type { ChargingStation } from './ChargingStation';
-import { getConfigurationKey } from './ConfigurationKeyUtils';
-import { BaseError } from '../exception';
+import type { ChargingStation } from './ChargingStation
.js
';
+import { getConfigurationKey } from './ConfigurationKeyUtils
.js
';
+import { BaseError } from '../exception
/index.js
';
import {
AmpereUnits,
AvailabilityType,
import {
AmpereUnits,
AvailabilityType,
@@
-52,7
+52,7
@@
import {
StandardParametersKey,
SupportedFeatureProfiles,
Voltage,
StandardParametersKey,
SupportedFeatureProfiles,
Voltage,
-} from '../types';
+} from '../types
/index.js
';
import {
ACElectricUtils,
Constants,
import {
ACElectricUtils,
Constants,
@@
-70,7
+70,7
@@
import {
isValidTime,
logger,
secureRandom,
isValidTime,
logger,
secureRandom,
-} from '../utils';
+} from '../utils
/index.js
';
const moduleName = 'Helpers';
const moduleName = 'Helpers';
diff --git
a/src/charging-station/IdTagsCache.ts
b/src/charging-station/IdTagsCache.ts
index 5e0ab0b8f0778c2fbf02333c579657387a5c1d5f..3e259fff7fd62e4972c0fac5d360f6851b9defcb 100644
(file)
--- a/
src/charging-station/IdTagsCache.ts
+++ b/
src/charging-station/IdTagsCache.ts
@@
-1,8
+1,8
@@
import { type FSWatcher, readFileSync } from 'node:fs';
import { type FSWatcher, readFileSync } from 'node:fs';
-import type { ChargingStation } from './ChargingStation';
-import { getIdTagsFile } from './Helpers';
-import { FileType, IdTagDistribution } from '../types';
+import type { ChargingStation } from './ChargingStation
.js
';
+import { getIdTagsFile } from './Helpers
.js
';
+import { FileType, IdTagDistribution } from '../types
/index.js
';
import {
handleFileException,
isNotEmptyString,
import {
handleFileException,
isNotEmptyString,
@@
-10,7
+10,7
@@
import {
logger,
secureRandom,
watchJsonFile,
logger,
secureRandom,
watchJsonFile,
-} from '../utils';
+} from '../utils
/index.js
';
interface IdTagsCacheValueType {
idTags: string[];
interface IdTagsCacheValueType {
idTags: string[];
diff --git
a/src/charging-station/SharedLRUCache.ts
b/src/charging-station/SharedLRUCache.ts
index d55f358e18809b19e65972287330047440c3ab8b..a06c8452d2283c560afb819f2fd276aff6e676d8 100644
(file)
--- a/
src/charging-station/SharedLRUCache.ts
+++ b/
src/charging-station/SharedLRUCache.ts
@@
-1,8
+1,13
@@
import LRUCache from 'mnemonist/lru-map-with-delete.js';
import LRUCache from 'mnemonist/lru-map-with-delete.js';
-import { Bootstrap } from './Bootstrap';
-import type { ChargingStationConfiguration, ChargingStationTemplate } from '../types';
-import { isEmptyObject, isNotEmptyArray, isNotEmptyString, isNullOrUndefined } from '../utils';
+import { Bootstrap } from './Bootstrap.js';
+import type { ChargingStationConfiguration, ChargingStationTemplate } from '../types/index.js';
+import {
+ isEmptyObject,
+ isNotEmptyArray,
+ isNotEmptyString,
+ isNullOrUndefined,
+} from '../utils/index.js';
enum CacheType {
chargingStationTemplate = 'chargingStationTemplate',
enum CacheType {
chargingStationTemplate = 'chargingStationTemplate',
diff --git
a/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts
b/src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts
index 2697397a6b7e6bcebed8fd47cd34a548bb471c6e..5de17e1a8c023322179ec59ee9a6783d0161ed36 100644
(file)
--- a/
src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts
+++ b/
src/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.ts
@@
-1,7
+1,7
@@
import { secondsToMilliseconds } from 'date-fns';
import { secondsToMilliseconds } from 'date-fns';
-import { WorkerBroadcastChannel } from './WorkerBroadcastChannel';
-import { BaseError, type OCPPError } from '../../exception';
+import { WorkerBroadcastChannel } from './WorkerBroadcastChannel
.js
';
+import { BaseError, type OCPPError } from '../../exception
/index.js
';
import {
AuthorizationStatus,
type AuthorizeRequest,
import {
AuthorizationStatus,
type AuthorizeRequest,
@@
-36,11
+36,17
@@
import {
type StatusNotificationResponse,
type StopTransactionRequest,
type StopTransactionResponse,
type StatusNotificationResponse,
type StopTransactionRequest,
type StopTransactionResponse,
-} from '../../types';
-import { Constants, convertToInt, isEmptyObject, isNullOrUndefined, logger } from '../../utils';
-import type { ChargingStation } from '../ChargingStation';
-import { getConfigurationKey } from '../ConfigurationKeyUtils';
-import { buildMeterValue } from '../ocpp';
+} from '../../types/index.js';
+import {
+ Constants,
+ convertToInt,
+ isEmptyObject,
+ isNullOrUndefined,
+ logger,
+} from '../../utils/index.js';
+import type { ChargingStation } from '../ChargingStation.js';
+import { getConfigurationKey } from '../ConfigurationKeyUtils.js';
+import { buildMeterValue } from '../ocpp/index.js';
const moduleName = 'ChargingStationWorkerBroadcastChannel';
const moduleName = 'ChargingStationWorkerBroadcastChannel';
diff --git
a/src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
b/src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
index d328291636ac8da6f37ce6fc1eebca288e67d339..62588e0aa4f11925cf9d084eca1fbae108d72c6b 100644
(file)
--- a/
src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
+++ b/
src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
@@
-1,13
+1,13
@@
-import { WorkerBroadcastChannel } from './WorkerBroadcastChannel';
+import { WorkerBroadcastChannel } from './WorkerBroadcastChannel
.js
';
import {
type BroadcastChannelResponse,
type BroadcastChannelResponsePayload,
type MessageEvent,
type ResponsePayload,
ResponseStatus,
import {
type BroadcastChannelResponse,
type BroadcastChannelResponsePayload,
type MessageEvent,
type ResponsePayload,
ResponseStatus,
-} from '../../types';
-import { isNullOrUndefined, logger } from '../../utils';
-import type { AbstractUIService } from '../ui-server/ui-services/AbstractUIService';
+} from '../../types
/index.js
';
+import { isNullOrUndefined, logger } from '../../utils
/index.js
';
+import type { AbstractUIService } from '../ui-server/ui-services/AbstractUIService
.js
';
const moduleName = 'UIServiceWorkerBroadcastChannel';
const moduleName = 'UIServiceWorkerBroadcastChannel';
diff --git
a/src/charging-station/broadcast-channel/WorkerBroadcastChannel.ts
b/src/charging-station/broadcast-channel/WorkerBroadcastChannel.ts
index 9102b10009a7114597a3091f344357c0a6abea12..dbd83c5bf628b860d1505368ff67e9231352cbc7 100644
(file)
--- a/
src/charging-station/broadcast-channel/WorkerBroadcastChannel.ts
+++ b/
src/charging-station/broadcast-channel/WorkerBroadcastChannel.ts
@@
-5,8
+5,8
@@
import type {
BroadcastChannelResponse,
JsonType,
MessageEvent,
BroadcastChannelResponse,
JsonType,
MessageEvent,
-} from '../../types';
-import { logPrefix, logger, validateUUID } from '../../utils';
+} from '../../types
/index.js
';
+import { logPrefix, logger, validateUUID } from '../../utils
/index.js
';
const moduleName = 'WorkerBroadcastChannel';
const moduleName = 'WorkerBroadcastChannel';
diff --git
a/src/charging-station/index.ts
b/src/charging-station/index.ts
index ed055a8d830b94cf878210c64e2e30c57a670e35..d03a5f77dbd0bd46ea2803126474bce292072111 100644
(file)
--- a/
src/charging-station/index.ts
+++ b/
src/charging-station/index.ts
@@
-1,10
+1,10
@@
-export { Bootstrap } from './Bootstrap';
-export type { ChargingStation } from './ChargingStation';
+export { Bootstrap } from './Bootstrap
.js
';
+export type { ChargingStation } from './ChargingStation
.js
';
export {
addConfigurationKey,
getConfigurationKey,
setConfigurationKeyValue,
export {
addConfigurationKey,
getConfigurationKey,
setConfigurationKeyValue,
-} from './ConfigurationKeyUtils';
+} from './ConfigurationKeyUtils
.js
';
export {
canProceedChargingProfile,
checkChargingStation,
export {
canProceedChargingProfile,
checkChargingStation,
@@
-15,4
+15,4
@@
export {
prepareChargingProfileKind,
removeExpiredReservations,
resetConnectorStatus,
prepareChargingProfileKind,
removeExpiredReservations,
resetConnectorStatus,
-} from './Helpers';
+} from './Helpers
.js
';
diff --git
a/src/charging-station/ocpp/1.6/OCPP16Constants.ts
b/src/charging-station/ocpp/1.6/OCPP16Constants.ts
index c33e552934c4dbcbda3f9cac5a13ef586780a7f6..3d1ab3c8477e8ca74d156b826b69abd3069f587b 100644
(file)
--- a/
src/charging-station/ocpp/1.6/OCPP16Constants.ts
+++ b/
src/charging-station/ocpp/1.6/OCPP16Constants.ts
@@
-1,5
+1,5
@@
-import { type ConnectorStatusTransition, OCPP16ChargePointStatus } from '../../../types';
-import { OCPPConstants } from '../OCPPConstants';
+import { type ConnectorStatusTransition, OCPP16ChargePointStatus } from '../../../types
/index.js
';
+import { OCPPConstants } from '../OCPPConstants
.js
';
export class OCPP16Constants extends OCPPConstants {
static readonly ChargePointStatusChargingStationTransitions: Readonly<
export class OCPP16Constants extends OCPPConstants {
static readonly ChargePointStatusChargingStationTransitions: Readonly<
diff --git
a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
index 6dae5c8ad51c17f66f332906bd44c0067d7720de..f1ea435aac3fba768a8c76506e167494dacc574a 100644
(file)
--- a/
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
+++ b/
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
@@
-16,8
+16,8
@@
import {
import { maxTime } from 'date-fns/constants';
import { create } from 'tar';
import { maxTime } from 'date-fns/constants';
import { create } from 'tar';
-import { OCPP16Constants } from './OCPP16Constants';
-import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
+import { OCPP16Constants } from './OCPP16Constants
.js
';
+import { OCPP16ServiceUtils } from './OCPP16ServiceUtils
.js
';
import {
type ChargingStation,
canProceedChargingProfile,
import {
type ChargingStation,
canProceedChargingProfile,
@@
-27,8
+27,8
@@
import {
prepareChargingProfileKind,
removeExpiredReservations,
setConfigurationKeyValue,
prepareChargingProfileKind,
removeExpiredReservations,
setConfigurationKeyValue,
-} from '../../../charging-station';
-import { OCPPError } from '../../../exception';
+} from '../../../charging-station
/index.js
';
+import { OCPPError } from '../../../exception
/index.js
';
import {
type ChangeConfigurationRequest,
type ChangeConfigurationResponse,
import {
type ChangeConfigurationRequest,
type ChangeConfigurationResponse,
@@
-95,7
+95,7
@@
import {
type SetChargingProfileResponse,
type UnlockConnectorRequest,
type UnlockConnectorResponse,
type SetChargingProfileResponse,
type UnlockConnectorRequest,
type UnlockConnectorResponse,
-} from '../../../types';
+} from '../../../types
/index.js
';
import {
Constants,
convertToDate,
import {
Constants,
convertToDate,
@@
-109,8
+109,8
@@
import {
isUndefined,
logger,
sleep,
isUndefined,
logger,
sleep,
-} from '../../../utils';
-import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService';
+} from '../../../utils
/index.js
';
+import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService
.js
';
const moduleName = 'OCPP16IncomingRequestService';
const moduleName = 'OCPP16IncomingRequestService';
diff --git
a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts
b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts
index b238dc66018a50563217065e08f42cfcaf427888..2b0375a21b0d0cb7aa44f95761a38f818ce1eb98 100644
(file)
--- a/
src/charging-station/ocpp/1.6/OCPP16RequestService.ts
+++ b/
src/charging-station/ocpp/1.6/OCPP16RequestService.ts
@@
-2,10
+2,10
@@
import type { JSONSchemaType } from 'ajv';
import type { JSONSchemaType } from 'ajv';
-import { OCPP16Constants } from './OCPP16Constants';
-import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
-import type { ChargingStation } from '../../../charging-station';
-import { OCPPError } from '../../../exception';
+import { OCPP16Constants } from './OCPP16Constants
.js
';
+import { OCPP16ServiceUtils } from './OCPP16ServiceUtils
.js
';
+import type { ChargingStation } from '../../../charging-station
/index.js
';
+import { OCPPError } from '../../../exception
/index.js
';
import {
ErrorType,
type JsonObject,
import {
ErrorType,
type JsonObject,
@@
-24,10
+24,10
@@
import {
type OCPP16StopTransactionRequest,
OCPPVersion,
type RequestParams,
type OCPP16StopTransactionRequest,
OCPPVersion,
type RequestParams,
-} from '../../../types';
-import { Constants, generateUUID } from '../../../utils';
-import { OCPPRequestService } from '../OCPPRequestService';
-import type { OCPPResponseService } from '../OCPPResponseService';
+} from '../../../types
/index.js
';
+import { Constants, generateUUID } from '../../../utils
/index.js
';
+import { OCPPRequestService } from '../OCPPRequestService
.js
';
+import type { OCPPResponseService } from '../OCPPResponseService
.js
';
const moduleName = 'OCPP16RequestService';
const moduleName = 'OCPP16RequestService';
diff --git
a/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts
b/src/charging-station/ocpp/1.6/OCPP16ResponseService.ts
index 7c331b6c79d70c328276c8b196ca9e552591d19e..1e64e74b01601577a446b33df5a284758183b188 100644
(file)
--- a/
src/charging-station/ocpp/1.6/OCPP16ResponseService.ts
+++ b/
src/charging-station/ocpp/1.6/OCPP16ResponseService.ts
@@
-3,15
+3,15
@@
import type { JSONSchemaType } from 'ajv';
import { secondsToMilliseconds } from 'date-fns';
import type { JSONSchemaType } from 'ajv';
import { secondsToMilliseconds } from 'date-fns';
-import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
+import { OCPP16ServiceUtils } from './OCPP16ServiceUtils
.js
';
import {
type ChargingStation,
addConfigurationKey,
getConfigurationKey,
hasReservationExpired,
resetConnectorStatus,
import {
type ChargingStation,
addConfigurationKey,
getConfigurationKey,
hasReservationExpired,
resetConnectorStatus,
-} from '../../../charging-station';
-import { OCPPError } from '../../../exception';
+} from '../../../charging-station
/index.js
';
+import { OCPPError } from '../../../exception
/index.js
';
import {
type ChangeConfigurationResponse,
ErrorType,
import {
type ChangeConfigurationResponse,
ErrorType,
@@
-50,9
+50,9
@@
import {
type ResponseHandler,
type SetChargingProfileResponse,
type UnlockConnectorResponse,
type ResponseHandler,
type SetChargingProfileResponse,
type UnlockConnectorResponse,
-} from '../../../types';
-import { Constants, convertToInt, isNullOrUndefined, logger } from '../../../utils';
-import { OCPPResponseService } from '../OCPPResponseService';
+} from '../../../types
/index.js
';
+import { Constants, convertToInt, isNullOrUndefined, logger } from '../../../utils
/index.js
';
+import { OCPPResponseService } from '../OCPPResponseService
.js
';
const moduleName = 'OCPP16ResponseService';
const moduleName = 'OCPP16ResponseService';
diff --git
a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
index 4062bc0af881d3445fdfc5207983d531dbf89b2a..e4d1ebdf1dc0e027925b16d54c7d82fb9d1934c8 100644
(file)
--- a/
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
+++ b/
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
@@
-11,12
+11,12
@@
import {
isWithinInterval,
} from 'date-fns';
isWithinInterval,
} from 'date-fns';
-import { OCPP16Constants } from './OCPP16Constants';
+import { OCPP16Constants } from './OCPP16Constants
.js
';
import {
type ChargingStation,
hasFeatureProfile,
hasReservationExpired,
import {
type ChargingStation,
hasFeatureProfile,
hasReservationExpired,
-} from '../../../charging-station';
+} from '../../../charging-station
/index.js
';
import {
type GenericResponse,
type JsonType,
import {
type GenericResponse,
type JsonType,
@@
-36,9
+36,9
@@
import {
OCPP16StopTransactionReason,
type OCPP16SupportedFeatureProfiles,
OCPPVersion,
OCPP16StopTransactionReason,
type OCPP16SupportedFeatureProfiles,
OCPPVersion,
-} from '../../../types';
-import { isNotEmptyArray, isNullOrUndefined, logger, roundTo } from '../../../utils';
-import { OCPPServiceUtils } from '../OCPPServiceUtils';
+} from '../../../types
/index.js
';
+import { isNotEmptyArray, isNullOrUndefined, logger, roundTo } from '../../../utils
/index.js
';
+import { OCPPServiceUtils } from '../OCPPServiceUtils
.js
';
export class OCPP16ServiceUtils extends OCPPServiceUtils {
public static checkFeatureProfile(
export class OCPP16ServiceUtils extends OCPPServiceUtils {
public static checkFeatureProfile(
diff --git
a/src/charging-station/ocpp/2.0/OCPP20Constants.ts
b/src/charging-station/ocpp/2.0/OCPP20Constants.ts
index c64fe13dca8c9d841d49cc2d3f143079c6cee4ee..3ae368a3736d6b66b92dc6133c0afddf1a91e49c 100644
(file)
--- a/
src/charging-station/ocpp/2.0/OCPP20Constants.ts
+++ b/
src/charging-station/ocpp/2.0/OCPP20Constants.ts
@@
-1,5
+1,8
@@
-import { type ConnectorStatusTransition, OCPP20ConnectorStatusEnumType } from '../../../types';
-import { OCPPConstants } from '../OCPPConstants';
+import {
+ type ConnectorStatusTransition,
+ OCPP20ConnectorStatusEnumType,
+} from '../../../types/index.js';
+import { OCPPConstants } from '../OCPPConstants.js';
export class OCPP20Constants extends OCPPConstants {
static readonly ChargingStationStatusTransitions: Readonly<ConnectorStatusTransition[]> =
export class OCPP20Constants extends OCPPConstants {
static readonly ChargingStationStatusTransitions: Readonly<ConnectorStatusTransition[]> =
diff --git
a/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
b/src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
index 0d657d99f7bd67b365660c3e2888653157485e5c..a48c7e9d47d28d95cf686fdb87d0315fc9c56d2e 100644
(file)
--- a/
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
+++ b/
src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.ts
@@
-2,9
+2,9
@@
import type { JSONSchemaType } from 'ajv';
import type { JSONSchemaType } from 'ajv';
-import { OCPP20ServiceUtils } from './OCPP20ServiceUtils';
-import type { ChargingStation } from '../../../charging-station';
-import { OCPPError } from '../../../exception';
+import { OCPP20ServiceUtils } from './OCPP20ServiceUtils
.js
';
+import type { ChargingStation } from '../../../charging-station
/index.js
';
+import { OCPPError } from '../../../exception
/index.js
';
import {
ErrorType,
type IncomingRequestHandler,
import {
ErrorType,
type IncomingRequestHandler,
@@
-12,9
+12,9
@@
import {
type OCPP20ClearCacheRequest,
OCPP20IncomingRequestCommand,
OCPPVersion,
type OCPP20ClearCacheRequest,
OCPP20IncomingRequestCommand,
OCPPVersion,
-} from '../../../types';
-import { logger } from '../../../utils';
-import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService';
+} from '../../../types
/index.js
';
+import { logger } from '../../../utils
/index.js
';
+import { OCPPIncomingRequestService } from '../OCPPIncomingRequestService
.js
';
const moduleName = 'OCPP20IncomingRequestService';
const moduleName = 'OCPP20IncomingRequestService';
diff --git
a/src/charging-station/ocpp/2.0/OCPP20RequestService.ts
b/src/charging-station/ocpp/2.0/OCPP20RequestService.ts
index f9f5c2686e3b3115301ed906c1b6f7075f5060c4..60b441427d039cc50cd0009a678c6ef612454a56 100644
(file)
--- a/
src/charging-station/ocpp/2.0/OCPP20RequestService.ts
+++ b/
src/charging-station/ocpp/2.0/OCPP20RequestService.ts
@@
-2,10
+2,10
@@
import type { JSONSchemaType } from 'ajv';
import type { JSONSchemaType } from 'ajv';
-import { OCPP20Constants } from './OCPP20Constants';
-import { OCPP20ServiceUtils } from './OCPP20ServiceUtils';
-import type { ChargingStation } from '../../../charging-station';
-import { OCPPError } from '../../../exception';
+import { OCPP20Constants } from './OCPP20Constants
.js
';
+import { OCPP20ServiceUtils } from './OCPP20ServiceUtils
.js
';
+import type { ChargingStation } from '../../../charging-station
/index.js
';
+import { OCPPError } from '../../../exception
/index.js
';
import {
ErrorType,
type JsonObject,
import {
ErrorType,
type JsonObject,
@@
-16,10
+16,10
@@
import {
type OCPP20StatusNotificationRequest,
OCPPVersion,
type RequestParams,
type OCPP20StatusNotificationRequest,
OCPPVersion,
type RequestParams,
-} from '../../../types';
-import { generateUUID } from '../../../utils';
-import { OCPPRequestService } from '../OCPPRequestService';
-import type { OCPPResponseService } from '../OCPPResponseService';
+} from '../../../types
/index.js
';
+import { generateUUID } from '../../../utils
/index.js
';
+import { OCPPRequestService } from '../OCPPRequestService
.js
';
+import type { OCPPResponseService } from '../OCPPResponseService
.js
';
const moduleName = 'OCPP20RequestService';
const moduleName = 'OCPP20RequestService';
diff --git
a/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts
b/src/charging-station/ocpp/2.0/OCPP20ResponseService.ts
index 111b114a34048113c4fdf2a60a77133570fe4405..98f2afb61ebe816a675181a033c06be715f8ecd1 100644
(file)
--- a/
src/charging-station/ocpp/2.0/OCPP20ResponseService.ts
+++ b/
src/charging-station/ocpp/2.0/OCPP20ResponseService.ts
@@
-2,9
+2,9
@@
import type { JSONSchemaType } from 'ajv';
import type { JSONSchemaType } from 'ajv';
-import { OCPP20ServiceUtils } from './OCPP20ServiceUtils';
-import { type ChargingStation, addConfigurationKey } from '../../../charging-station';
-import { OCPPError } from '../../../exception';
+import { OCPP20ServiceUtils } from './OCPP20ServiceUtils
.js
';
+import { type ChargingStation, addConfigurationKey } from '../../../charging-station
/index.js
';
+import { OCPPError } from '../../../exception
/index.js
';
import {
ErrorType,
type JsonType,
import {
ErrorType,
type JsonType,
@@
-18,9
+18,9
@@
import {
OCPPVersion,
RegistrationStatusEnumType,
type ResponseHandler,
OCPPVersion,
RegistrationStatusEnumType,
type ResponseHandler,
-} from '../../../types';
-import { logger } from '../../../utils';
-import { OCPPResponseService } from '../OCPPResponseService';
+} from '../../../types
/index.js
';
+import { logger } from '../../../utils
/index.js
';
+import { OCPPResponseService } from '../OCPPResponseService
.js
';
const moduleName = 'OCPP20ResponseService';
const moduleName = 'OCPP20ResponseService';
diff --git
a/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
b/src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
index c924b2400187931cfe4406d96ddc18bd72307787..eb4d099b2e20586a5d847bdb63d2ebaf75f26f5b 100644
(file)
--- a/
src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
+++ b/
src/charging-station/ocpp/2.0/OCPP20ServiceUtils.ts
@@
-2,8
+2,8
@@
import type { JSONSchemaType } from 'ajv';
import type { JSONSchemaType } from 'ajv';
-import { type JsonType, OCPPVersion } from '../../../types';
-import { OCPPServiceUtils } from '../OCPPServiceUtils';
+import { type JsonType, OCPPVersion } from '../../../types
/index.js
';
+import { OCPPServiceUtils } from '../OCPPServiceUtils
.js
';
export class OCPP20ServiceUtils extends OCPPServiceUtils {
public static parseJsonSchemaFile<T extends JsonType>(
export class OCPP20ServiceUtils extends OCPPServiceUtils {
public static parseJsonSchemaFile<T extends JsonType>(
diff --git
a/src/charging-station/ocpp/OCPPConstants.ts
b/src/charging-station/ocpp/OCPPConstants.ts
index dbe7834b4e0e6fbdddab7d77501dc32a9470e85a..8f5f98d69078388991383f3ebc8607fe8d86b925 100644
(file)
--- a/
src/charging-station/ocpp/OCPPConstants.ts
+++ b/
src/charging-station/ocpp/OCPPConstants.ts
@@
-6,11
+6,11
@@
import {
DataTransferStatus,
GenericStatus,
MeterValueMeasurand,
DataTransferStatus,
GenericStatus,
MeterValueMeasurand,
+ ReservationStatus,
TriggerMessageStatus,
UnlockStatus,
TriggerMessageStatus,
UnlockStatus,
-} from '../../types';
-import { ReservationStatus } from '../../types/ocpp/Responses';
-import { Constants } from '../../utils';
+} from '../../types/index.js';
+import { Constants } from '../../utils/index.js';
export class OCPPConstants {
static readonly OCPP_WEBSOCKET_TIMEOUT = 60000; // Ms
export class OCPPConstants {
static readonly OCPP_WEBSOCKET_TIMEOUT = 60000; // Ms
diff --git
a/src/charging-station/ocpp/OCPPIncomingRequestService.ts
b/src/charging-station/ocpp/OCPPIncomingRequestService.ts
index c93129bcfadbca7e1d0e0c3454e5ed7b8c092885..06a80e3ae7b966019ab879370005448d26a293f7 100644
(file)
--- a/
src/charging-station/ocpp/OCPPIncomingRequestService.ts
+++ b/
src/charging-station/ocpp/OCPPIncomingRequestService.ts
@@
-1,18
+1,18
@@
import Ajv, { type JSONSchemaType, type ValidateFunction } from 'ajv';
import ajvFormats from 'ajv-formats';
import Ajv, { type JSONSchemaType, type ValidateFunction } from 'ajv';
import ajvFormats from 'ajv-formats';
-import { OCPPConstants } from './OCPPConstants';
-import { OCPPServiceUtils } from './OCPPServiceUtils';
-import { type ChargingStation, getIdTagsFile } from '../../charging-station';
-import { OCPPError } from '../../exception';
+import { OCPPConstants } from './OCPPConstants
.js
';
+import { OCPPServiceUtils } from './OCPPServiceUtils
.js
';
+import { type ChargingStation, getIdTagsFile } from '../../charging-station
/index.js
';
+import { OCPPError } from '../../exception
/index.js
';
import type {
ClearCacheResponse,
HandleErrorParams,
IncomingRequestCommand,
JsonType,
OCPPVersion,
import type {
ClearCacheResponse,
HandleErrorParams,
IncomingRequestCommand,
JsonType,
OCPPVersion,
-} from '../../types';
-import { logger, setDefaultErrorParams } from '../../utils';
+} from '../../types
/index.js
';
+import { logger, setDefaultErrorParams } from '../../utils
/index.js
';
const moduleName = 'OCPPIncomingRequestService';
const moduleName = 'OCPPIncomingRequestService';
diff --git
a/src/charging-station/ocpp/OCPPRequestService.ts
b/src/charging-station/ocpp/OCPPRequestService.ts
index b9a75e5f943388b33b07be80e1654e47acf6cb3c..aeb09c332b7629acd8340fb874fd8d90348ecef4 100644
(file)
--- a/
src/charging-station/ocpp/OCPPRequestService.ts
+++ b/
src/charging-station/ocpp/OCPPRequestService.ts
@@
-1,12
+1,12
@@
import Ajv, { type JSONSchemaType, type ValidateFunction } from 'ajv';
import ajvFormats from 'ajv-formats';
import Ajv, { type JSONSchemaType, type ValidateFunction } from 'ajv';
import ajvFormats from 'ajv-formats';
-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 { OCPPConstants } from './OCPPConstants
.js
';
+import type { OCPPResponseService } from './OCPPResponseService
.js
';
+import { OCPPServiceUtils } from './OCPPServiceUtils
.js
';
+import type { ChargingStation } from '../../charging-station
/index.js
';
+import { OCPPError } from '../../exception
/index.js
';
+import { PerformanceStatistics } from '../../performance
/index.js
';
import {
ChargingStationEvents,
type ErrorCallback,
import {
ChargingStationEvents,
type ErrorCallback,
@@
-22,14
+22,14
@@
import {
type Response,
type ResponseCallback,
type ResponseType,
type Response,
type ResponseCallback,
type ResponseType,
-} from '../../types';
+} from '../../types
/index.js
';
import {
cloneObject,
formatDurationMilliSeconds,
handleSendMessageError,
isNullOrUndefined,
logger,
import {
cloneObject,
formatDurationMilliSeconds,
handleSendMessageError,
isNullOrUndefined,
logger,
-} from '../../utils';
+} from '../../utils
/index.js
';
const moduleName = 'OCPPRequestService';
const moduleName = 'OCPPRequestService';
diff --git
a/src/charging-station/ocpp/OCPPResponseService.ts
b/src/charging-station/ocpp/OCPPResponseService.ts
index b73fee584b4ab5f2045d1d81d723655e7e449e39..9fcfd6effc4247f07c298be36371bbf732ac3592 100644
(file)
--- a/
src/charging-station/ocpp/OCPPResponseService.ts
+++ b/
src/charging-station/ocpp/OCPPResponseService.ts
@@
-1,11
+1,16
@@
import Ajv, { type JSONSchemaType, type ValidateFunction } from 'ajv';
import ajvFormats from 'ajv-formats';
import Ajv, { type JSONSchemaType, type ValidateFunction } from 'ajv';
import ajvFormats from 'ajv-formats';
-import { OCPPServiceUtils } from './OCPPServiceUtils';
-import type { ChargingStation } from '../../charging-station';
-import { OCPPError } from '../../exception';
-import type { IncomingRequestCommand, JsonType, OCPPVersion, RequestCommand } from '../../types';
-import { logger } from '../../utils';
+import { OCPPServiceUtils } from './OCPPServiceUtils.js';
+import type { ChargingStation } from '../../charging-station/index.js';
+import { OCPPError } from '../../exception/index.js';
+import type {
+ IncomingRequestCommand,
+ JsonType,
+ OCPPVersion,
+ RequestCommand,
+} from '../../types/index.js';
+import { logger } from '../../utils/index.js';
const moduleName = 'OCPPResponseService';
const moduleName = 'OCPPResponseService';
diff --git
a/src/charging-station/ocpp/OCPPServiceUtils.ts
b/src/charging-station/ocpp/OCPPServiceUtils.ts
index 275494057a4500517ef4618f96a06268e527e0ac..569615212f37f0f365472691cc553957311bd7a9 100644
(file)
--- a/
src/charging-station/ocpp/OCPPServiceUtils.ts
+++ b/
src/charging-station/ocpp/OCPPServiceUtils.ts
@@
-5,11
+5,15
@@
import { fileURLToPath } from 'node:url';
import type { DefinedError, ErrorObject, JSONSchemaType } from 'ajv';
import { isDate } from 'date-fns';
import type { DefinedError, ErrorObject, JSONSchemaType } from 'ajv';
import { isDate } from 'date-fns';
-import { OCPP16Constants } from './1.6/OCPP16Constants';
-import { OCPP20Constants } from './2.0/OCPP20Constants';
-import { OCPPConstants } from './OCPPConstants';
-import { type ChargingStation, getConfigurationKey, getIdTagsFile } from '../../charging-station';
-import { BaseError, OCPPError } from '../../exception';
+import { OCPP16Constants } from './1.6/OCPP16Constants.js';
+import { OCPP20Constants } from './2.0/OCPP20Constants.js';
+import { OCPPConstants } from './OCPPConstants.js';
+import {
+ type ChargingStation,
+ getConfigurationKey,
+ getIdTagsFile,
+} from '../../charging-station/index.js';
+import { BaseError, OCPPError } from '../../exception/index.js';
import {
AuthorizationStatus,
type AuthorizeRequest,
import {
AuthorizationStatus,
type AuthorizeRequest,
@@
-42,7
+46,7
@@
import {
StandardParametersKey,
type StatusNotificationRequest,
type StatusNotificationResponse,
StandardParametersKey,
type StatusNotificationRequest,
type StatusNotificationResponse,
-} from '../../types';
+} from '../../types
/index.js
';
import {
ACElectricUtils,
Constants,
import {
ACElectricUtils,
Constants,
@@
-62,7
+66,7
@@
import {
max,
min,
roundTo,
max,
min,
roundTo,
-} from '../../utils';
+} from '../../utils
/index.js
';
export const getMessageTypeString = (messageType: MessageType): string => {
switch (messageType) {
export const getMessageTypeString = (messageType: MessageType): string => {
switch (messageType) {
diff --git
a/src/charging-station/ocpp/index.ts
b/src/charging-station/ocpp/index.ts
index b5abe46446ac9c5a1d2d9a789d0568a659c163e6..da1b751e995d244144babf3756aa951a1e4a0f11 100644
(file)
--- a/
src/charging-station/ocpp/index.ts
+++ b/
src/charging-station/ocpp/index.ts
@@
-1,11
+1,11
@@
-export { OCPP16IncomingRequestService } from './1.6/OCPP16IncomingRequestService';
-export { OCPP16RequestService } from './1.6/OCPP16RequestService';
-export { OCPP16ResponseService } from './1.6/OCPP16ResponseService';
-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 { OCPP16IncomingRequestService } from './1.6/OCPP16IncomingRequestService
.js
';
+export { OCPP16RequestService } from './1.6/OCPP16RequestService
.js
';
+export { OCPP16ResponseService } from './1.6/OCPP16ResponseService
.js
';
+export { OCPP20IncomingRequestService } from './2.0/OCPP20IncomingRequestService
.js
';
+export { OCPP20RequestService } from './2.0/OCPP20RequestService
.js
';
+export { OCPP20ResponseService } from './2.0/OCPP20ResponseService
.js
';
+export { OCPPIncomingRequestService } from './OCPPIncomingRequestService
.js
';
+export { OCPPRequestService } from './OCPPRequestService
.js
';
export {
buildMeterValue,
buildStatusNotificationRequest,
export {
buildMeterValue,
buildStatusNotificationRequest,
@@
-13,4
+13,4
@@
export {
getMessageTypeString,
isIdTagAuthorized,
sendAndSetConnectorStatus,
getMessageTypeString,
isIdTagAuthorized,
sendAndSetConnectorStatus,
-} from './OCPPServiceUtils';
+} from './OCPPServiceUtils
.js
';
diff --git
a/src/charging-station/ui-server/AbstractUIServer.ts
b/src/charging-station/ui-server/AbstractUIServer.ts
index d27ea616bfe98591e9afbc8a3dff65c8f7a412df..c6cc741b041b63d6a250f21ebcd7b58a9bfca0e6 100644
(file)
--- a/
src/charging-station/ui-server/AbstractUIServer.ts
+++ b/
src/charging-station/ui-server/AbstractUIServer.ts
@@
-3,9
+3,9
@@
import { type Http2Server, createServer } from 'node:http2';
import type { WebSocket } from 'ws';
import type { WebSocket } from 'ws';
-import type { AbstractUIService } from './ui-services/AbstractUIService';
-import { UIServiceFactory } from './ui-services/UIServiceFactory';
-import { BaseError } from '../../exception';
+import type { AbstractUIService } from './ui-services/AbstractUIService
.js
';
+import { UIServiceFactory } from './ui-services/UIServiceFactory
.js
';
+import { BaseError } from '../../exception
/index.js
';
import {
ApplicationProtocolVersion,
AuthenticationType,
import {
ApplicationProtocolVersion,
AuthenticationType,
@@
-17,7
+17,7
@@
import {
type RequestPayload,
type ResponsePayload,
type UIServerConfiguration,
type RequestPayload,
type ResponsePayload,
type UIServerConfiguration,
-} from '../../types';
+} from '../../types
/index.js
';
export abstract class AbstractUIServer {
public readonly chargingStations: Map<string, ChargingStationData>;
export abstract class AbstractUIServer {
public readonly chargingStations: Map<string, ChargingStationData>;
diff --git
a/src/charging-station/ui-server/UIHttpServer.ts
b/src/charging-station/ui-server/UIHttpServer.ts
index 85dbccdfe6ca5f79c10e360391f3b358f7aef871..eeab416d5e4a8d7b43db5733d3f2b6506d7e2c27 100644
(file)
--- a/
src/charging-station/ui-server/UIHttpServer.ts
+++ b/
src/charging-station/ui-server/UIHttpServer.ts
@@
-2,9
+2,9
@@
import type { IncomingMessage, RequestListener, ServerResponse } from 'node:http
import { StatusCodes } from 'http-status-codes';
import { StatusCodes } from 'http-status-codes';
-import { AbstractUIServer } from './AbstractUIServer';
-import { UIServerUtils } from './UIServerUtils';
-import { BaseError } from '../../exception';
+import { AbstractUIServer } from './AbstractUIServer
.js
';
+import { UIServerUtils } from './UIServerUtils
.js
';
+import { BaseError } from '../../exception
/index.js
';
import {
ApplicationProtocolVersion,
type ProcedureName,
import {
ApplicationProtocolVersion,
type ProcedureName,
@@
-15,7
+15,7
@@
import {
type RequestPayload,
ResponseStatus,
type UIServerConfiguration,
type RequestPayload,
ResponseStatus,
type UIServerConfiguration,
-} from '../../types';
+} from '../../types
/index.js
';
import {
Constants,
generateUUID,
import {
Constants,
generateUUID,
@@
-23,7
+23,7
@@
import {
isNullOrUndefined,
logPrefix,
logger,
isNullOrUndefined,
logPrefix,
logger,
-} from '../../utils';
+} from '../../utils
/index.js
';
const moduleName = 'UIHttpServer';
const moduleName = 'UIHttpServer';
diff --git
a/src/charging-station/ui-server/UIServerFactory.ts
b/src/charging-station/ui-server/UIServerFactory.ts
index d3c34b58aedaaa48f25289d011d84a4ba3cec942..b192ff35c9cc5283e5b08b381c86ee2745458937 100644
(file)
--- a/
src/charging-station/ui-server/UIServerFactory.ts
+++ b/
src/charging-station/ui-server/UIServerFactory.ts
@@
-1,14
+1,14
@@
import chalk from 'chalk';
import chalk from 'chalk';
-import type { AbstractUIServer } from './AbstractUIServer';
-import { UIHttpServer } from './UIHttpServer';
-import { UIServerUtils } from './UIServerUtils';
-import { UIWebSocketServer } from './UIWebSocketServer';
+import type { AbstractUIServer } from './AbstractUIServer
.js
';
+import { UIHttpServer } from './UIHttpServer
.js
';
+import { UIServerUtils } from './UIServerUtils
.js
';
+import { UIWebSocketServer } from './UIWebSocketServer
.js
';
import {
ApplicationProtocol,
ApplicationProtocolVersion,
type UIServerConfiguration,
import {
ApplicationProtocol,
ApplicationProtocolVersion,
type UIServerConfiguration,
-} from '../../types';
+} from '../../types
/index.js
';
export class UIServerFactory {
private constructor() {
export class UIServerFactory {
private constructor() {
diff --git
a/src/charging-station/ui-server/UIServerUtils.ts
b/src/charging-station/ui-server/UIServerUtils.ts
index 95bbba56c8134dd93f20ebbf2dcf06986e70961d..e35a1f15414e94e2a2d9b2bc1bb64a77988bae17 100644
(file)
--- a/
src/charging-station/ui-server/UIServerUtils.ts
+++ b/
src/charging-station/ui-server/UIServerUtils.ts
@@
-1,7
+1,7
@@
import type { IncomingMessage } from 'node:http';
import type { IncomingMessage } from 'node:http';
-import { Protocol, ProtocolVersion } from '../../types';
-import { logPrefix, logger } from '../../utils';
+import { Protocol, ProtocolVersion } from '../../types
/index.js
';
+import { logPrefix, logger } from '../../utils
/index.js
';
export class UIServerUtils {
private constructor() {
export class UIServerUtils {
private constructor() {
diff --git
a/src/charging-station/ui-server/UIWebSocketServer.ts
b/src/charging-station/ui-server/UIWebSocketServer.ts
index e322ef8db9901889344e41f9b97d41d1616c7bb3..42e4b3c2f32210a2e26bb37edb2851691617b92e 100644
(file)
--- a/
src/charging-station/ui-server/UIWebSocketServer.ts
+++ b/
src/charging-station/ui-server/UIWebSocketServer.ts
@@
-4,14
+4,14
@@
import type { Duplex } from 'node:stream';
import { StatusCodes } from 'http-status-codes';
import { type RawData, WebSocket, WebSocketServer } from 'ws';
import { StatusCodes } from 'http-status-codes';
import { type RawData, WebSocket, WebSocketServer } from 'ws';
-import { AbstractUIServer } from './AbstractUIServer';
-import { UIServerUtils } from './UIServerUtils';
+import { AbstractUIServer } from './AbstractUIServer
.js
';
+import { UIServerUtils } from './UIServerUtils
.js
';
import {
type ProtocolRequest,
type ProtocolResponse,
type UIServerConfiguration,
WebSocketCloseEventStatusCode,
import {
type ProtocolRequest,
type ProtocolResponse,
type UIServerConfiguration,
WebSocketCloseEventStatusCode,
-} from '../../types';
+} from '../../types
/index.js
';
import {
Constants,
getWebSocketCloseEventStatusString,
import {
Constants,
getWebSocketCloseEventStatusString,
@@
-20,7
+20,7
@@
import {
logPrefix,
logger,
validateUUID,
logPrefix,
logger,
validateUUID,
-} from '../../utils';
+} from '../../utils
/index.js
';
const moduleName = 'UIWebSocketServer';
const moduleName = 'UIWebSocketServer';
diff --git
a/src/charging-station/ui-server/ui-services/AbstractUIService.ts
b/src/charging-station/ui-server/ui-services/AbstractUIService.ts
index e0078c19ff1e4d94a5cb6656d651a9013d9ad768..8eb450a807ae395a533519d5d99e8ca010bda692 100644
(file)
--- a/
src/charging-station/ui-server/ui-services/AbstractUIService.ts
+++ b/
src/charging-station/ui-server/ui-services/AbstractUIService.ts
@@
-1,4
+1,4
@@
-import { BaseError, type OCPPError } from '../../../exception';
+import { BaseError, type OCPPError } from '../../../exception
/index.js
';
import {
BroadcastChannelProcedureName,
type BroadcastChannelRequestPayload,
import {
BroadcastChannelProcedureName,
type BroadcastChannelRequestPayload,
@@
-10,11
+10,11
@@
import {
type RequestPayload,
type ResponsePayload,
ResponseStatus,
type RequestPayload,
type ResponsePayload,
ResponseStatus,
-} from '../../../types';
-import { isNotEmptyArray, isNullOrUndefined, logger } from '../../../utils';
-import { Bootstrap } from '../../Bootstrap';
-import { UIServiceWorkerBroadcastChannel } from '../../broadcast-channel/UIServiceWorkerBroadcastChannel';
-import type { AbstractUIServer } from '../AbstractUIServer';
+} from '../../../types
/index.js
';
+import { isNotEmptyArray, isNullOrUndefined, logger } from '../../../utils
/index.js
';
+import { Bootstrap } from '../../Bootstrap
.js
';
+import { UIServiceWorkerBroadcastChannel } from '../../broadcast-channel/UIServiceWorkerBroadcastChannel
.js
';
+import type { AbstractUIServer } from '../AbstractUIServer
.js
';
const moduleName = 'AbstractUIService';
const moduleName = 'AbstractUIService';
diff --git
a/src/charging-station/ui-server/ui-services/UIService001.ts
b/src/charging-station/ui-server/ui-services/UIService001.ts
index e7570c1a24f1b03f4b2e48a9e3a3f58fae25bbdb..142f97ef9d0df389522b8ea597e30ba59947ad17 100644
(file)
--- a/
src/charging-station/ui-server/ui-services/UIService001.ts
+++ b/
src/charging-station/ui-server/ui-services/UIService001.ts
@@
-1,6
+1,6
@@
-import { AbstractUIService } from './AbstractUIService';
-import { type ProtocolRequestHandler, ProtocolVersion } from '../../../types';
-import type { AbstractUIServer } from '../AbstractUIServer';
+import { AbstractUIService } from './AbstractUIService
.js
';
+import { type ProtocolRequestHandler, ProtocolVersion } from '../../../types
/index.js
';
+import type { AbstractUIServer } from '../AbstractUIServer
.js
';
export class UIService001 extends AbstractUIService {
constructor(uiServer: AbstractUIServer) {
export class UIService001 extends AbstractUIService {
constructor(uiServer: AbstractUIServer) {
diff --git
a/src/charging-station/ui-server/ui-services/UIServiceFactory.ts
b/src/charging-station/ui-server/ui-services/UIServiceFactory.ts
index 41d60ddd3eddf4167964cbd06a9224b84085f956..6b7a0ee2801a2a3693bd442a34789270c0c1d3f3 100644
(file)
--- a/
src/charging-station/ui-server/ui-services/UIServiceFactory.ts
+++ b/
src/charging-station/ui-server/ui-services/UIServiceFactory.ts
@@
-1,7
+1,7
@@
-import type { AbstractUIService } from './AbstractUIService';
-import { UIService001 } from './UIService001';
-import { ProtocolVersion } from '../../../types';
-import type { AbstractUIServer } from '../AbstractUIServer';
+import type { AbstractUIService } from './AbstractUIService
.js
';
+import { UIService001 } from './UIService001
.js
';
+import { ProtocolVersion } from '../../../types
/index.js
';
+import type { AbstractUIServer } from '../AbstractUIServer
.js
';
export class UIServiceFactory {
private constructor() {
export class UIServiceFactory {
private constructor() {
diff --git
a/src/exception/OCPPError.ts
b/src/exception/OCPPError.ts
index 5736ad277a1b981907c052eadc9c06aba04b342a..4fb9ea165a1a827d952a7422e4f13c423061deef 100644
(file)
--- a/
src/exception/OCPPError.ts
+++ b/
src/exception/OCPPError.ts
@@
-1,13
+1,13
@@
// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
// Partial Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
-import { BaseError } from './BaseError';
+import { BaseError } from './BaseError
.js
';
import {
ErrorType,
type IncomingRequestCommand,
type JsonType,
type RequestCommand,
import {
ErrorType,
type IncomingRequestCommand,
type JsonType,
type RequestCommand,
-} from '../types';
-import { Constants } from '../utils';
+} from '../types
/index.js
';
+import { Constants } from '../utils
/index.js
';
export class OCPPError extends BaseError {
code: ErrorType;
export class OCPPError extends BaseError {
code: ErrorType;
diff --git
a/src/exception/index.ts
b/src/exception/index.ts
index 5e5b60caf1743125aea0fdaf94781927e1ef9536..027f9857bd6583d19821bc4af1ed78b3644e7fc2 100644
(file)
--- a/
src/exception/index.ts
+++ b/
src/exception/index.ts
@@
-1,2
+1,2
@@
-export { BaseError } from './BaseError';
-export { OCPPError } from './OCPPError';
+export { BaseError } from './BaseError
.js
';
+export { OCPPError } from './OCPPError
.js
';
diff --git
a/src/performance/PerformanceStatistics.ts
b/src/performance/PerformanceStatistics.ts
index 94c189e4d3e6251a7bf8bfa7022a13b1fc4d07f7..1246e1b2c6300795866c5ab5664e0575e8653121 100644
(file)
--- a/
src/performance/PerformanceStatistics.ts
+++ b/
src/performance/PerformanceStatistics.ts
@@
-15,7
+15,7
@@
import {
type Statistics,
type StorageConfiguration,
type TimestampedData,
type Statistics,
type StorageConfiguration,
type TimestampedData,
-} from '../types';
+} from '../types
/index.js
';
import {
CircularArray,
Configuration,
import {
CircularArray,
Configuration,
@@
-33,7
+33,7
@@
import {
min,
nthPercentile,
stdDeviation,
min,
nthPercentile,
stdDeviation,
-} from '../utils';
+} from '../utils
/index.js
';
export class PerformanceStatistics {
private static readonly instances: Map<string, PerformanceStatistics> = new Map<
export class PerformanceStatistics {
private static readonly instances: Map<string, PerformanceStatistics> = new Map<
diff --git
a/src/performance/index.ts
b/src/performance/index.ts
index aae8e4d0147c910bc1070cac02e7f817ea6028c4..d4d47596067ab8f379a62b9e156205a0dd6d3b71 100644
(file)
--- a/
src/performance/index.ts
+++ b/
src/performance/index.ts
@@
-1,3
+1,3
@@
-export { PerformanceStatistics } from './PerformanceStatistics';
-export { type Storage } from './storage/Storage';
-export { StorageFactory } from './storage/StorageFactory';
+export { PerformanceStatistics } from './PerformanceStatistics
.js
';
+export { type Storage } from './storage/Storage
.js
';
+export { StorageFactory } from './storage/StorageFactory
.js
';
diff --git
a/src/performance/storage/JsonFileStorage.ts
b/src/performance/storage/JsonFileStorage.ts
index 58680181f7499b858e485ea828e6f969910b78f9..ff1199597bc3fcb05acd508ff7ad0378632c7369 100644
(file)
--- a/
src/performance/storage/JsonFileStorage.ts
+++ b/
src/performance/storage/JsonFileStorage.ts
@@
-3,16
+3,16
@@
import { closeSync, existsSync, mkdirSync, openSync, writeSync } from 'node:fs';
import { dirname } from 'node:path';
import { closeSync, existsSync, mkdirSync, openSync, writeSync } from 'node:fs';
import { dirname } from 'node:path';
-import { Storage } from './Storage';
-import { BaseError } from '../../exception';
-import { FileType, type Statistics } from '../../types';
+import { Storage } from './Storage
.js
';
+import { BaseError } from '../../exception
/index.js
';
+import { FileType, type Statistics } from '../../types
/index.js
';
import {
AsyncLock,
AsyncLockType,
JSONStringifyWithMapSupport,
handleFileException,
isNullOrUndefined,
import {
AsyncLock,
AsyncLockType,
JSONStringifyWithMapSupport,
handleFileException,
isNullOrUndefined,
-} from '../../utils';
+} from '../../utils
/index.js
';
export class JsonFileStorage extends Storage {
private static performanceRecords: Map<string, Statistics>;
export class JsonFileStorage extends Storage {
private static performanceRecords: Map<string, Statistics>;
diff --git
a/src/performance/storage/MikroOrmStorage.ts
b/src/performance/storage/MikroOrmStorage.ts
index d1b84b8577d6bd267cf709cbc4cfd0880ceaea88..8d2cffca719f294dfc071728b073b7ef579c7e58 100644
(file)
--- a/
src/performance/storage/MikroOrmStorage.ts
+++ b/
src/performance/storage/MikroOrmStorage.ts
@@
-9,15
+9,15
@@
import {
} from '@mikro-orm/core';
import { TsMorphMetadataProvider } from '@mikro-orm/reflection';
} from '@mikro-orm/core';
import { TsMorphMetadataProvider } from '@mikro-orm/reflection';
-import { Storage } from './Storage';
+import { Storage } from './Storage
.js
';
import {
type MikroOrmDbType,
PerformanceData,
PerformanceRecord,
type Statistics,
StorageType,
import {
type MikroOrmDbType,
PerformanceData,
PerformanceRecord,
type Statistics,
StorageType,
-} from '../../types';
-import { Constants } from '../../utils';
+} from '../../types
/index.js
';
+import { Constants } from '../../utils
/index.js
';
export class MikroOrmStorage extends Storage {
private storageType: StorageType;
export class MikroOrmStorage extends Storage {
private storageType: StorageType;
diff --git
a/src/performance/storage/MongoDBStorage.ts
b/src/performance/storage/MongoDBStorage.ts
index 568f70953edc4a2a6db290dae0e51a1634e7cb68..e27b33c42b494f3a07a015ec596482167c21cf0d 100644
(file)
--- a/
src/performance/storage/MongoDBStorage.ts
+++ b/
src/performance/storage/MongoDBStorage.ts
@@
-2,10
+2,10
@@
import { MongoClient } from 'mongodb';
import { MongoClient } from 'mongodb';
-import { Storage } from './Storage';
-import { BaseError } from '../../exception';
-import { type Statistics, StorageType } from '../../types';
-import { Constants } from '../../utils';
+import { Storage } from './Storage
.js
';
+import { BaseError } from '../../exception
/index.js
';
+import { type Statistics, StorageType } from '../../types
/index.js
';
+import { Constants } from '../../utils
/index.js
';
export class MongoDBStorage extends Storage {
private readonly client?: MongoClient;
export class MongoDBStorage extends Storage {
private readonly client?: MongoClient;
diff --git
a/src/performance/storage/Storage.ts
b/src/performance/storage/Storage.ts
index 4c9ece358075875d4934c9e80111826485bb5919..5723dca87d00d33b73f31db2499d0b45f1bda43d 100644
(file)
--- a/
src/performance/storage/Storage.ts
+++ b/
src/performance/storage/Storage.ts
@@
-8,8
+8,8
@@
import {
type HandleErrorParams,
type Statistics,
StorageType,
type HandleErrorParams,
type Statistics,
StorageType,
-} from '../../types';
-import { isNullOrUndefined, logger, setDefaultErrorParams } from '../../utils';
+} from '../../types
/index.js
';
+import { isNullOrUndefined, logger, setDefaultErrorParams } from '../../utils
/index.js
';
export abstract class Storage {
protected readonly storageUri: URL;
export abstract class Storage {
protected readonly storageUri: URL;
diff --git
a/src/performance/storage/StorageFactory.ts
b/src/performance/storage/StorageFactory.ts
index 31d0982e7b99682ee6862b518413a60dbf3a6c31..51a0de5079edd890317dc8c69c4d5847cceb7698 100644
(file)
--- a/
src/performance/storage/StorageFactory.ts
+++ b/
src/performance/storage/StorageFactory.ts
@@
-1,12
+1,12
@@
// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
// Copyright Jerome Benoit. 2021-2023. All Rights Reserved.
-import { JsonFileStorage } from './JsonFileStorage';
+import { JsonFileStorage } from './JsonFileStorage
.js
';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
// eslint-disable-next-line @typescript-eslint/no-unused-vars
-import { MikroOrmStorage } from './MikroOrmStorage';
-import { MongoDBStorage } from './MongoDBStorage';
-import type { Storage } from './Storage';
-import { BaseError } from '../../exception';
-import { StorageType } from '../../types';
+import { MikroOrmStorage } from './MikroOrmStorage
.js
';
+import { MongoDBStorage } from './MongoDBStorage
.js
';
+import type { Storage } from './Storage
.js
';
+import { BaseError } from '../../exception
/index.js
';
+import { StorageType } from '../../types
/index.js
';
export class StorageFactory {
private constructor() {
export class StorageFactory {
private constructor() {
diff --git
a/src/start.ts
b/src/start.ts
index af569c53e3e46f2e12c694c221b6e1620955111c..8af14b50d83a7717dec3ab4d41e144877bc98d00 100644
(file)
--- a/
src/start.ts
+++ b/
src/start.ts
@@
-2,7
+2,7
@@
import chalk from 'chalk';
import chalk from 'chalk';
-import { Bootstrap } from './charging-station';
+import { Bootstrap } from './charging-station
/index.js
';
try {
await Bootstrap.getInstance().start();
try {
await Bootstrap.getInstance().start();
diff --git
a/src/types/ChargingStationConfiguration.ts
b/src/types/ChargingStationConfiguration.ts
index 7480459e8719601aa30b4cd666756238501957bc..82db82d008dec52f163c72b40ba93a3162ffcaa6 100644
(file)
--- a/
src/types/ChargingStationConfiguration.ts
+++ b/
src/types/ChargingStationConfiguration.ts
@@
-1,8
+1,8
@@
-import type { ChargingStationAutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
-import type { ChargingStationInfoConfiguration } from './ChargingStationInfo';
-import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration';
-import type { ConnectorStatus } from './ConnectorStatus';
-import type { EvseStatus } from './Evse';
+import type { ChargingStationAutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator
.js
';
+import type { ChargingStationInfoConfiguration } from './ChargingStationInfo
.js
';
+import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration
.js
';
+import type { ConnectorStatus } from './ConnectorStatus
.js
';
+import type { EvseStatus } from './Evse
.js
';
interface ConnectorsConfiguration {
connectorsStatus?: ConnectorStatus[];
interface ConnectorsConfiguration {
connectorsStatus?: ConnectorStatus[];
diff --git
a/src/types/ChargingStationInfo.ts
b/src/types/ChargingStationInfo.ts
index c66092c56f65d4347196b2d7236e9b67ab748697..9e8da9070ce87c7a4b31c448ca1746afee904f8e 100644
(file)
--- a/
src/types/ChargingStationInfo.ts
+++ b/
src/types/ChargingStationInfo.ts
@@
-1,5
+1,5
@@
-import type { ChargingStationTemplate } from './ChargingStationTemplate';
-import type { FirmwareStatus } from './ocpp/Requests';
+import type { ChargingStationTemplate } from './ChargingStationTemplate
.js
';
+import type { FirmwareStatus } from './ocpp/Requests
.js
';
export type ChargingStationInfo = Omit<
ChargingStationTemplate,
export type ChargingStationInfo = Omit<
ChargingStationTemplate,
diff --git
a/src/types/ChargingStationOcppConfiguration.ts
b/src/types/ChargingStationOcppConfiguration.ts
index 7bc47aae3d8caa79be98ca8f24036b64c111fc25..e9932701dce9a3df02a76c621df67bef0ab47d06 100644
(file)
--- a/
src/types/ChargingStationOcppConfiguration.ts
+++ b/
src/types/ChargingStationOcppConfiguration.ts
@@
-1,4
+1,4
@@
-import type { OCPPConfigurationKey } from './ocpp/Configuration';
+import type { OCPPConfigurationKey } from './ocpp/Configuration
.js
';
export type ConfigurationKey = OCPPConfigurationKey & {
visible?: boolean;
export type ConfigurationKey = OCPPConfigurationKey & {
visible?: boolean;
diff --git
a/src/types/ChargingStationTemplate.ts
b/src/types/ChargingStationTemplate.ts
index 5fd77851b9493b0cdbd5e28066e4b8b0f15b5493..9e9df95f54fd2cfd353bc4a81d846a49313d240e 100644
(file)
--- a/
src/types/ChargingStationTemplate.ts
+++ b/
src/types/ChargingStationTemplate.ts
@@
-2,18
+2,18
@@
import type { ClientRequestArgs } from 'node:http';
import type { ClientOptions } from 'ws';
import type { ClientOptions } from 'ws';
-import type { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
-import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration';
-import type { ConnectorStatus } from './ConnectorStatus';
-import type { EvseTemplate } from './Evse';
-import type { OCPPProtocol } from './ocpp/OCPPProtocol';
-import type { OCPPVersion } from './ocpp/OCPPVersion';
+import type { AutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator
.js
';
+import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration
.js
';
+import type { ConnectorStatus } from './ConnectorStatus
.js
';
+import type { EvseTemplate } from './Evse
.js
';
+import type { OCPPProtocol } from './ocpp/OCPPProtocol
.js
';
+import type { OCPPVersion } from './ocpp/OCPPVersion
.js
';
import type {
FirmwareStatus,
IncomingRequestCommand,
MessageTrigger,
RequestCommand,
import type {
FirmwareStatus,
IncomingRequestCommand,
MessageTrigger,
RequestCommand,
-} from './ocpp/Requests';
+} from './ocpp/Requests
.js
';
export enum CurrentType {
AC = 'AC',
export enum CurrentType {
AC = 'AC',
diff --git
a/src/types/ChargingStationWorker.ts
b/src/types/ChargingStationWorker.ts
index 64849fc1aaad5af2ccfde7a2653021a109831362..5cd731600db3c7311540003c74064dae77338b3b 100644
(file)
--- a/
src/types/ChargingStationWorker.ts
+++ b/
src/types/ChargingStationWorker.ts
@@
-1,15
+1,15
@@
import type { WebSocket } from 'ws';
import type { WebSocket } from 'ws';
-import type { ChargingStationAutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator';
-import { ChargingStationEvents } from './ChargingStationEvents';
-import type { ChargingStationInfo } from './ChargingStationInfo';
-import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration';
-import type { ConnectorStatus } from './ConnectorStatus';
-import type { EvseStatus } from './Evse';
-import type { JsonObject } from './JsonType';
-import type { BootNotificationResponse } from './ocpp/Responses';
-import type { Statistics } from './Statistics';
-import { type WorkerData, type WorkerMessage, WorkerMessageEvents } from '../worker';
+import type { ChargingStationAutomaticTransactionGeneratorConfiguration } from './AutomaticTransactionGenerator
.js
';
+import { ChargingStationEvents } from './ChargingStationEvents
.js
';
+import type { ChargingStationInfo } from './ChargingStationInfo
.js
';
+import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConfiguration
.js
';
+import type { ConnectorStatus } from './ConnectorStatus
.js
';
+import type { EvseStatus } from './Evse
.js
';
+import type { JsonObject } from './JsonType
.js
';
+import type { BootNotificationResponse } from './ocpp/Responses
.js
';
+import type { Statistics } from './Statistics
.js
';
+import { type WorkerData, type WorkerMessage, WorkerMessageEvents } from '../worker
/index.js
';
interface ChargingStationWorkerOptions extends JsonObject {
elementStartDelay?: number;
interface ChargingStationWorkerOptions extends JsonObject {
elementStartDelay?: number;
diff --git
a/src/types/ConfigurationData.ts
b/src/types/ConfigurationData.ts
index d1948921660b0da42774c813686405c2baf4d74c..4b636cda4a1e2af56ade447e8c47f31574a5d32c 100644
(file)
--- a/
src/types/ConfigurationData.ts
+++ b/
src/types/ConfigurationData.ts
@@
-3,9
+3,9
@@
import type { ResourceLimits } from 'node:worker_threads';
import type { WorkerChoiceStrategy } from 'poolifier';
import type { WorkerChoiceStrategy } from 'poolifier';
-import type { StorageType } from './Storage';
-import type { ApplicationProtocol, AuthenticationType } from './UIProtocol';
-import type { WorkerProcessType } from '../worker';
+import type { StorageType } from './Storage
.js
';
+import type { ApplicationProtocol, AuthenticationType } from './UIProtocol
.js
';
+import type { WorkerProcessType } from '../worker
/index.js
';
type ServerOptions = ListenOptions;
type ServerOptions = ListenOptions;
diff --git
a/src/types/ConnectorStatus.ts
b/src/types/ConnectorStatus.ts
index c1783eb43c159afaa9238655bca4b305e6207301..61c8a2089d9deb0f5f3205aca47b6108426957af 100644
(file)
--- a/
src/types/ConnectorStatus.ts
+++ b/
src/types/ConnectorStatus.ts
@@
-1,9
+1,9
@@
-import type { SampledValueTemplate } from './MeasurandPerPhaseSampledValueTemplates';
-import type { ChargingProfile } from './ocpp/ChargingProfile';
-import type { ConnectorStatusEnum } from './ocpp/ConnectorStatusEnum';
-import type { MeterValue } from './ocpp/MeterValues';
-import type { AvailabilityType } from './ocpp/Requests';
-import type { Reservation } from './ocpp/Reservation';
+import type { SampledValueTemplate } from './MeasurandPerPhaseSampledValueTemplates
.js
';
+import type { ChargingProfile } from './ocpp/ChargingProfile
.js
';
+import type { ConnectorStatusEnum } from './ocpp/ConnectorStatusEnum
.js
';
+import type { MeterValue } from './ocpp/MeterValues
.js
';
+import type { AvailabilityType } from './ocpp/Requests
.js
';
+import type { Reservation } from './ocpp/Reservation
.js
';
export interface ConnectorStatus {
availability: AvailabilityType;
export interface ConnectorStatus {
availability: AvailabilityType;
diff --git
a/src/types/Error.ts
b/src/types/Error.ts
index 6a7c04e21fa38f7ee573deaad7b16dc623cb36df..46f7569c849f20ffb5c17ea9f5ed5750c20c5d59 100644
(file)
--- a/
src/types/Error.ts
+++ b/
src/types/Error.ts
@@
-1,4
+1,4
@@
-import type { JsonType } from './JsonType';
+import type { JsonType } from './JsonType
.js
';
export interface HandleErrorParams<T extends JsonType> {
throwError?: boolean;
export interface HandleErrorParams<T extends JsonType> {
throwError?: boolean;
diff --git
a/src/types/Evse.ts
b/src/types/Evse.ts
index f47eb18a45c0aff625542fc2ea723e363e972beb..aaf2f6642d17cbdf77a76c2f51ce642a16913a78 100644
(file)
--- a/
src/types/Evse.ts
+++ b/
src/types/Evse.ts
@@
-1,5
+1,5
@@
-import type { ConnectorStatus } from './ConnectorStatus';
-import type { AvailabilityType } from './ocpp/Requests';
+import type { ConnectorStatus } from './ConnectorStatus
.js
';
+import type { AvailabilityType } from './ocpp/Requests
.js
';
export interface EvseTemplate {
Connectors: Record<string, ConnectorStatus>;
export interface EvseTemplate {
Connectors: Record<string, ConnectorStatus>;
diff --git
a/src/types/MeasurandPerPhaseSampledValueTemplates.ts
b/src/types/MeasurandPerPhaseSampledValueTemplates.ts
index 2922db4d791d8c0c8c358cd1d0b03feb1147f9ef..95a73b64e3c8e1c54381e44c1588adf36044bb68 100644
(file)
--- a/
src/types/MeasurandPerPhaseSampledValueTemplates.ts
+++ b/
src/types/MeasurandPerPhaseSampledValueTemplates.ts
@@
-1,4
+1,4
@@
-import type { SampledValue } from './ocpp/MeterValues';
+import type { SampledValue } from './ocpp/MeterValues
.js
';
export type SampledValueTemplate = SampledValue & {
fluctuationPercent?: number;
export type SampledValueTemplate = SampledValue & {
fluctuationPercent?: number;
diff --git
a/src/types/Statistics.ts
b/src/types/Statistics.ts
index 60b2379b77577757f4f5d883e828662645acb8f1..a7abb3f86131f1adf33463fe7880d8d764581d5e 100644
(file)
--- a/
src/types/Statistics.ts
+++ b/
src/types/Statistics.ts
@@
-1,6
+1,6
@@
-import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests';
-import type { CircularArray } from '../utils';
-import type { WorkerData } from '../worker';
+import type { IncomingRequestCommand, RequestCommand } from './ocpp/Requests
.js
';
+import type { CircularArray } from '../utils
/index.js
';
+import type { WorkerData } from '../worker
/index.js
';
export interface TimestampedData {
timestamp: number;
export interface TimestampedData {
timestamp: number;
diff --git
a/src/types/UIProtocol.ts
b/src/types/UIProtocol.ts
index f48119433d3f7508c783658cdbfe1db63987baff..69312eef7e89137c8f2638d259f50a00ed4993b9 100644
(file)
--- a/
src/types/UIProtocol.ts
+++ b/
src/types/UIProtocol.ts
@@
-1,5
+1,5
@@
-import type { JsonObject } from './JsonType';
-import type { BroadcastChannelResponsePayload } from './WorkerBroadcastChannel';
+import type { JsonObject } from './JsonType
.js
';
+import type { BroadcastChannelResponsePayload } from './WorkerBroadcastChannel
.js
';
export enum Protocol {
UI = 'ui',
export enum Protocol {
UI = 'ui',
diff --git
a/src/types/WorkerBroadcastChannel.ts
b/src/types/WorkerBroadcastChannel.ts
index abc33752cb10616fde5474a4f68c2843675a911c..89148fc2fb0e5910200835d79486c4c648d37add 100644
(file)
--- a/
src/types/WorkerBroadcastChannel.ts
+++ b/
src/types/WorkerBroadcastChannel.ts
@@
-1,4
+1,4
@@
-import type { RequestPayload, ResponsePayload } from './UIProtocol';
+import type { RequestPayload, ResponsePayload } from './UIProtocol
.js
';
export type BroadcastChannelRequest = [
string,
export type BroadcastChannelRequest = [
string,
diff --git
a/src/types/index.ts
b/src/types/index.ts
index cc80f527c8ed699f5b9d06442dd8074eb1738325..4d8b534efe5bb0c0a49c1a11367c539667343337 100644
(file)
--- a/
src/types/index.ts
+++ b/
src/types/index.ts
@@
-10,14
+10,14
@@
export {
type RequestPayload,
type ResponsePayload,
ResponseStatus,
type RequestPayload,
type ResponsePayload,
ResponseStatus,
-} from './UIProtocol';
+} from './UIProtocol
.js
';
export {
type AutomaticTransactionGeneratorConfiguration,
type ChargingStationAutomaticTransactionGeneratorConfiguration,
IdTagDistribution,
type Status,
export {
type AutomaticTransactionGeneratorConfiguration,
type ChargingStationAutomaticTransactionGeneratorConfiguration,
IdTagDistribution,
type Status,
-} from './AutomaticTransactionGenerator';
-export { type GenericResponse, GenericStatus, RegistrationStatusEnumType } from './ocpp/Common';
+} from './AutomaticTransactionGenerator
.js
';
+export { type GenericResponse, GenericStatus, RegistrationStatusEnumType } from './ocpp/Common
.js
';
export {
AvailabilityType,
type BootNotificationRequest,
export {
AvailabilityType,
type BootNotificationRequest,
@@
-39,7
+39,7
@@
export {
type ResponseCallback,
type ResponseType,
type StatusNotificationRequest,
type ResponseCallback,
type ResponseType,
type StatusNotificationRequest,
-} from './ocpp/Requests';
+} from './ocpp/Requests
.js
';
export {
AvailabilityStatus,
type BootNotificationResponse,
export {
AvailabilityStatus,
type BootNotificationResponse,
@@
-54,12
+54,13
@@
export {
type FirmwareStatusNotificationResponse,
type HeartbeatResponse,
type MeterValuesResponse,
type FirmwareStatusNotificationResponse,
type HeartbeatResponse,
type MeterValuesResponse,
+ ReservationStatus,
type Response,
type ResponseHandler,
type StatusNotificationResponse,
TriggerMessageStatus,
UnlockStatus,
type Response,
type ResponseHandler,
type StatusNotificationResponse,
TriggerMessageStatus,
UnlockStatus,
-} from './ocpp/Responses';
+} from './ocpp/Responses
.js
';
export {
AuthorizationStatus,
type AuthorizeRequest,
export {
AuthorizationStatus,
type AuthorizeRequest,
@@
-69,8
+70,8
@@
export {
StopTransactionReason,
type StopTransactionRequest,
type StopTransactionResponse,
StopTransactionReason,
type StopTransactionRequest,
type StopTransactionResponse,
-} from './ocpp/Transaction';
-export { BootReasonEnumType, OCPP20ConnectorStatusEnumType } from './ocpp/2.0/Common';
+} from './ocpp/Transaction
.js
';
+export { BootReasonEnumType, OCPP20ConnectorStatusEnumType } from './ocpp/2.0/Common
.js
';
export {
BroadcastChannelProcedureName,
type BroadcastChannelRequest,
export {
BroadcastChannelProcedureName,
type BroadcastChannelRequest,
@@
-78,7
+79,7
@@
export {
type BroadcastChannelResponse,
type BroadcastChannelResponsePayload,
type MessageEvent,
type BroadcastChannelResponse,
type BroadcastChannelResponsePayload,
type MessageEvent,
-} from './WorkerBroadcastChannel';
+} from './WorkerBroadcastChannel
.js
';
export {
type ChangeConfigurationRequest,
type GetConfigurationRequest,
export {
type ChangeConfigurationRequest,
type GetConfigurationRequest,
@@
-108,7
+109,7
@@
export {
type ResetRequest,
type SetChargingProfileRequest,
type UnlockConnectorRequest,
type ResetRequest,
type SetChargingProfileRequest,
type UnlockConnectorRequest,
-} from './ocpp/1.6/Requests';
+} from './ocpp/1.6/Requests
.js
';
export {
type ChangeConfigurationResponse,
type GetConfigurationResponse,
export {
type ChangeConfigurationResponse,
type GetConfigurationResponse,
@@
-128,19
+129,19
@@
export {
type OCPP16UpdateFirmwareResponse,
type SetChargingProfileResponse,
type UnlockConnectorResponse,
type OCPP16UpdateFirmwareResponse,
type SetChargingProfileResponse,
type UnlockConnectorResponse,
-} from './ocpp/1.6/Responses';
-export { ChargePointErrorCode } from './ocpp/ChargePointErrorCode';
+} from './ocpp/1.6/Responses
.js
';
+export { ChargePointErrorCode } from './ocpp/ChargePointErrorCode
.js
';
export {
type ChargingProfile,
ChargingProfileKindType,
ChargingRateUnitType,
type ChargingSchedulePeriod,
RecurrencyKindType,
export {
type ChargingProfile,
ChargingProfileKindType,
ChargingRateUnitType,
type ChargingSchedulePeriod,
RecurrencyKindType,
-} from './ocpp/ChargingProfile';
+} from './ocpp/ChargingProfile
.js
';
export type {
ChargingStationConfiguration,
EvseStatusConfiguration,
export type {
ChargingStationConfiguration,
EvseStatusConfiguration,
-} from './ChargingStationConfiguration';
+} from './ChargingStationConfiguration
.js
';
export {
type ChargingStationData,
type ChargingStationWorkerData,
export {
type ChargingStationData,
type ChargingStationWorkerData,
@@
-148,12
+149,12
@@
export {
type ChargingStationWorkerMessageData,
ChargingStationWorkerMessageEvents,
type EvseStatusWorkerType,
type ChargingStationWorkerMessageData,
ChargingStationWorkerMessageEvents,
type EvseStatusWorkerType,
-} from './ChargingStationWorker';
-export type { ChargingStationInfo } from './ChargingStationInfo';
+} from './ChargingStationWorker
.js
';
+export type { ChargingStationInfo } from './ChargingStationInfo
.js
';
export type {
ChargingStationOcppConfiguration,
ConfigurationKey,
export type {
ChargingStationOcppConfiguration,
ConfigurationKey,
-} from './ChargingStationOcppConfiguration';
+} from './ChargingStationOcppConfiguration
.js
';
export {
AmpereUnits,
type ChargingStationTemplate,
export {
AmpereUnits,
type ChargingStationTemplate,
@@
-162,7
+163,7
@@
export {
PowerUnits,
Voltage,
type WsOptions,
PowerUnits,
Voltage,
type WsOptions,
-} from './ChargingStationTemplate';
+} from './ChargingStationTemplate
.js
';
export {
ApplicationProtocolVersion,
type ConfigurationData,
export {
ApplicationProtocolVersion,
type ConfigurationData,
@@
-174,7
+175,7
@@
export {
SupervisionUrlDistribution,
type UIServerConfiguration,
type WorkerConfiguration,
SupervisionUrlDistribution,
type UIServerConfiguration,
type WorkerConfiguration,
-} from './ConfigurationData';
+} from './ConfigurationData
.js
';
export {
type ConfigurationKeyType,
ConnectorPhaseRotation,
export {
type ConfigurationKeyType,
ConnectorPhaseRotation,
@@
-182,22
+183,22
@@
export {
StandardParametersKey,
SupportedFeatureProfiles,
VendorParametersKey,
StandardParametersKey,
SupportedFeatureProfiles,
VendorParametersKey,
-} from './ocpp/Configuration';
-export type { ConnectorStatus } from './ConnectorStatus';
-export { ConnectorStatusEnum, type ConnectorStatusTransition } from './ocpp/ConnectorStatusEnum';
-export { DBName, type MikroOrmDbType, StorageType } from './Storage';
-export type { EmptyObject } from './EmptyObject';
-export { ErrorType } from './ocpp/ErrorType';
-export type { EvseTemplate, EvseStatus } from './Evse';
-export { FileType } from './FileType';
-export type { HandleErrorParams } from './Error';
-export type { JsonObject, JsonType } from './JsonType';
+} from './ocpp/Configuration
.js
';
+export type { ConnectorStatus } from './ConnectorStatus
.js
';
+export { ConnectorStatusEnum, type ConnectorStatusTransition } from './ocpp/ConnectorStatusEnum
.js
';
+export { DBName, type MikroOrmDbType, StorageType } from './Storage
.js
';
+export type { EmptyObject } from './EmptyObject
.js
';
+export { ErrorType } from './ocpp/ErrorType
.js
';
+export type { EvseTemplate, EvseStatus } from './Evse
.js
';
+export { FileType } from './FileType
.js
';
+export type { HandleErrorParams } from './Error
.js
';
+export type { JsonObject, JsonType } from './JsonType
.js
';
export type {
MeasurandPerPhaseSampledValueTemplates,
SampledValueTemplate,
export type {
MeasurandPerPhaseSampledValueTemplates,
SampledValueTemplate,
-} from './MeasurandPerPhaseSampledValueTemplates';
-export type { MeasurandValues } from './MeasurandValues';
-export { MessageType } from './ocpp/MessageType';
+} from './MeasurandPerPhaseSampledValueTemplates
.js
';
+export type { MeasurandValues } from './MeasurandValues
.js
';
+export { MessageType } from './ocpp/MessageType
.js
';
export {
type MeterValue,
MeterValueContext,
export {
type MeterValue,
MeterValueContext,
@@
-206,7
+207,7
@@
export {
MeterValuePhase,
MeterValueUnit,
type SampledValue,
MeterValuePhase,
MeterValueUnit,
type SampledValue,
-} from './ocpp/MeterValues';
+} from './ocpp/MeterValues
.js
';
export {
type OCPP16MeterValue,
OCPP16MeterValueContext,
export {
type OCPP16MeterValue,
OCPP16MeterValueContext,
@@
-217,7
+218,7
@@
export {
type OCPP16MeterValuesRequest,
type OCPP16MeterValuesResponse,
type OCPP16SampledValue,
type OCPP16MeterValuesRequest,
type OCPP16MeterValuesResponse,
type OCPP16SampledValue,
-} from './ocpp/1.6/MeterValues';
+} from './ocpp/1.6/MeterValues
.js
';
export {
OCPP16AuthorizationStatus,
type OCPP16AuthorizeRequest,
export {
OCPP16AuthorizationStatus,
type OCPP16AuthorizeRequest,
@@
-227,21
+228,21
@@
export {
OCPP16StopTransactionReason,
type OCPP16StopTransactionRequest,
type OCPP16StopTransactionResponse,
OCPP16StopTransactionReason,
type OCPP16StopTransactionRequest,
type OCPP16StopTransactionResponse,
-} from './ocpp/1.6/Transaction';
-export { OCPP16ChargePointErrorCode } from './ocpp/1.6/ChargePointErrorCode';
-export { OCPP16ChargePointStatus } from './ocpp/1.6/ChargePointStatus';
+} from './ocpp/1.6/Transaction
.js
';
+export { OCPP16ChargePointErrorCode } from './ocpp/1.6/ChargePointErrorCode
.js
';
+export { OCPP16ChargePointStatus } from './ocpp/1.6/ChargePointStatus
.js
';
export {
type OCPP16ChargingProfile,
OCPP16ChargingProfilePurposeType,
OCPP16ChargingRateUnitType,
type OCPP16ChargingSchedule,
type OCPP16ChargingSchedulePeriod,
export {
type OCPP16ChargingProfile,
OCPP16ChargingProfilePurposeType,
OCPP16ChargingRateUnitType,
type OCPP16ChargingSchedule,
type OCPP16ChargingSchedulePeriod,
-} from './ocpp/1.6/ChargingProfile';
+} from './ocpp/1.6/ChargingProfile
.js
';
export {
OCPP16StandardParametersKey,
OCPP16SupportedFeatureProfiles,
export {
OCPP16StandardParametersKey,
OCPP16SupportedFeatureProfiles,
-} from './ocpp/1.6/Configuration';
-export { OCPP16DiagnosticsStatus } from './ocpp/1.6/DiagnosticsStatus';
+} from './ocpp/1.6/Configuration
.js
';
+export { OCPP16DiagnosticsStatus } from './ocpp/1.6/DiagnosticsStatus
.js
';
export {
type OCPP20BootNotificationRequest,
type OCPP20ClearCacheRequest,
export {
type OCPP20BootNotificationRequest,
type OCPP20ClearCacheRequest,
@@
-249,26
+250,26
@@
export {
OCPP20IncomingRequestCommand,
OCPP20RequestCommand,
type OCPP20StatusNotificationRequest,
OCPP20IncomingRequestCommand,
OCPP20RequestCommand,
type OCPP20StatusNotificationRequest,
-} from './ocpp/2.0/Requests';
+} from './ocpp/2.0/Requests
.js
';
export type {
OCPP20BootNotificationResponse,
OCPP20ClearCacheResponse,
OCPP20HeartbeatResponse,
OCPP20StatusNotificationResponse,
export type {
OCPP20BootNotificationResponse,
OCPP20ClearCacheResponse,
OCPP20HeartbeatResponse,
OCPP20StatusNotificationResponse,
-} from './ocpp/2.0/Responses';
-export { OCPP20OptionalVariableName } from './ocpp/2.0/Variables';
-export { OCPPVersion } from './ocpp/OCPPVersion';
-export { PerformanceData } from './orm/entities/PerformanceData';
-export { PerformanceRecord } from './orm/entities/PerformanceRecord';
-export type { Statistics, TimestampedData } from './Statistics';
+} from './ocpp/2.0/Responses
.js
';
+export { OCPP20OptionalVariableName } from './ocpp/2.0/Variables
.js
';
+export { OCPPVersion } from './ocpp/OCPPVersion
.js
';
+export { PerformanceData } from './orm/entities/PerformanceData
.js
';
+export { PerformanceRecord } from './orm/entities/PerformanceRecord
.js
';
+export type { Statistics, TimestampedData } from './Statistics
.js
';
export {
type WSError,
WebSocketCloseEventStatusCode,
WebSocketCloseEventStatusString,
export {
type WSError,
WebSocketCloseEventStatusCode,
WebSocketCloseEventStatusString,
-} from './WebSocket';
+} from './WebSocket
.js
';
export {
type Reservation,
type ReservationKey,
ReservationTerminationReason,
export {
type Reservation,
type ReservationKey,
ReservationTerminationReason,
-} from './ocpp/Reservation';
-export { ChargingStationEvents } from './ChargingStationEvents';
+} from './ocpp/Reservation
.js
';
+export { ChargingStationEvents } from './ChargingStationEvents
.js
';
diff --git
a/src/types/ocpp/1.6/ChargingProfile.ts
b/src/types/ocpp/1.6/ChargingProfile.ts
index 8a50e895f18b93e9c6cf9df7bbfc1275caee6cd5..89cf8e4d8545308d0e841f9647dde94beac746ff 100644
(file)
--- a/
src/types/ocpp/1.6/ChargingProfile.ts
+++ b/
src/types/ocpp/1.6/ChargingProfile.ts
@@
-1,4
+1,4
@@
-import type { JsonObject } from '../../JsonType';
+import type { JsonObject } from '../../JsonType
.js
';
export interface OCPP16ChargingProfile extends JsonObject {
chargingProfileId: number;
export interface OCPP16ChargingProfile extends JsonObject {
chargingProfileId: number;
diff --git
a/src/types/ocpp/1.6/MeterValues.ts
b/src/types/ocpp/1.6/MeterValues.ts
index 6d102b8809edb0eaba896036bb243ea0636eea9e..e8d14ef9a845f2c0dae2be6add33a66651208468 100644
(file)
--- a/
src/types/ocpp/1.6/MeterValues.ts
+++ b/
src/types/ocpp/1.6/MeterValues.ts
@@
-1,5
+1,5
@@
-import type { EmptyObject } from '../../EmptyObject';
-import type { JsonObject } from '../../JsonType';
+import type { EmptyObject } from '../../EmptyObject
.js
';
+import type { JsonObject } from '../../JsonType
.js
';
export enum OCPP16MeterValueUnit {
WATT_HOUR = 'Wh',
export enum OCPP16MeterValueUnit {
WATT_HOUR = 'Wh',
diff --git
a/src/types/ocpp/1.6/Requests.ts
b/src/types/ocpp/1.6/Requests.ts
index b14583f08d63a8342c26438edd7c8e5a6a4a9240..9c3ece543a066187d5af2a7fd8674dcaeddb3e74 100644
(file)
--- a/
src/types/ocpp/1.6/Requests.ts
+++ b/
src/types/ocpp/1.6/Requests.ts
@@
-1,14
+1,14
@@
-import type { OCPP16ChargePointErrorCode } from './ChargePointErrorCode';
-import type { OCPP16ChargePointStatus } from './ChargePointStatus';
+import type { OCPP16ChargePointErrorCode } from './ChargePointErrorCode
.js
';
+import type { OCPP16ChargePointStatus } from './ChargePointStatus
.js
';
import type {
OCPP16ChargingProfile,
OCPP16ChargingProfilePurposeType,
OCPP16ChargingRateUnitType,
import type {
OCPP16ChargingProfile,
OCPP16ChargingProfilePurposeType,
OCPP16ChargingRateUnitType,
-} from './ChargingProfile';
-import type { OCPP16StandardParametersKey, OCPP16VendorParametersKey } from './Configuration';
-import type { OCPP16DiagnosticsStatus } from './DiagnosticsStatus';
-import type { EmptyObject } from '../../EmptyObject';
-import type { JsonObject } from '../../JsonType';
+} from './ChargingProfile
.js
';
+import type { OCPP16StandardParametersKey, OCPP16VendorParametersKey } from './Configuration
.js
';
+import type { OCPP16DiagnosticsStatus } from './DiagnosticsStatus
.js
';
+import type { EmptyObject } from '../../EmptyObject
.js
';
+import type { JsonObject } from '../../JsonType
.js
';
export enum OCPP16RequestCommand {
BOOT_NOTIFICATION = 'BootNotification',
export enum OCPP16RequestCommand {
BOOT_NOTIFICATION = 'BootNotification',
diff --git
a/src/types/ocpp/1.6/Responses.ts
b/src/types/ocpp/1.6/Responses.ts
index a42733e8a2244721451bf109b395f20331898bcc..d813eac0c35f8622f234d769494e34f3cbe65e7f 100644
(file)
--- a/
src/types/ocpp/1.6/Responses.ts
+++ b/
src/types/ocpp/1.6/Responses.ts
@@
-1,8
+1,8
@@
-import type { OCPP16ChargingSchedule } from './ChargingProfile';
-import type { EmptyObject } from '../../EmptyObject';
-import type { JsonObject } from '../../JsonType';
-import type { GenericStatus, RegistrationStatusEnumType } from '../Common';
-import type { OCPPConfigurationKey } from '../Configuration';
+import type { OCPP16ChargingSchedule } from './ChargingProfile
.js
';
+import type { EmptyObject } from '../../EmptyObject
.js
';
+import type { JsonObject } from '../../JsonType
.js
';
+import type { GenericStatus, RegistrationStatusEnumType } from '../Common
.js
';
+import type { OCPPConfigurationKey } from '../Configuration
.js
';
export interface OCPP16HeartbeatResponse extends JsonObject {
currentTime: Date;
export interface OCPP16HeartbeatResponse extends JsonObject {
currentTime: Date;
diff --git
a/src/types/ocpp/1.6/Transaction.ts
b/src/types/ocpp/1.6/Transaction.ts
index 586367d769df006dc01aae280002ea42291e17fd..49cabf2e2e7bb41660c77e4f6dc7273116d71124 100644
(file)
--- a/
src/types/ocpp/1.6/Transaction.ts
+++ b/
src/types/ocpp/1.6/Transaction.ts
@@
-1,5
+1,5
@@
-import type { OCPP16MeterValue } from './MeterValues';
-import type { JsonObject } from '../../JsonType';
+import type { OCPP16MeterValue } from './MeterValues
.js
';
+import type { JsonObject } from '../../JsonType
.js
';
export enum OCPP16StopTransactionReason {
EMERGENCY_STOP = 'EmergencyStop',
export enum OCPP16StopTransactionReason {
EMERGENCY_STOP = 'EmergencyStop',
diff --git
a/src/types/ocpp/2.0/Common.ts
b/src/types/ocpp/2.0/Common.ts
index e9226961476457e705bb86e782d8e44fc6d9aaa4..9898ca3c7523e0155a7263bee8bdaea2932404e6 100644
(file)
--- a/
src/types/ocpp/2.0/Common.ts
+++ b/
src/types/ocpp/2.0/Common.ts
@@
-1,5
+1,5
@@
-import type { JsonObject } from '../../JsonType';
-import type { GenericStatus } from '../Common';
+import type { JsonObject } from '../../JsonType
.js
';
+import type { GenericStatus } from '../Common
.js
';
export enum DataEnumType {
// eslint-disable-next-line id-blacklist
export enum DataEnumType {
// eslint-disable-next-line id-blacklist
diff --git
a/src/types/ocpp/2.0/Requests.ts
b/src/types/ocpp/2.0/Requests.ts
index 1b99c2727fb86928055cfc3beff4335733a79265..b91edc9d20adee487a6069e6c45e411acb42f3cb 100644
(file)
--- a/
src/types/ocpp/2.0/Requests.ts
+++ b/
src/types/ocpp/2.0/Requests.ts
@@
-2,10
+2,10
@@
import type {
BootReasonEnumType,
InstallCertificateUseEnumType,
OCPP20ConnectorStatusEnumType,
BootReasonEnumType,
InstallCertificateUseEnumType,
OCPP20ConnectorStatusEnumType,
-} from './Common';
-import type { OCPP20SetVariableDataType } from './Variables';
-import type { EmptyObject } from '../../EmptyObject';
-import type { JsonObject } from '../../JsonType';
+} from './Common
.js
';
+import type { OCPP20SetVariableDataType } from './Variables
.js
';
+import type { EmptyObject } from '../../EmptyObject
.js
';
+import type { JsonObject } from '../../JsonType
.js
';
export enum OCPP20RequestCommand {
BOOT_NOTIFICATION = 'BootNotification',
export enum OCPP20RequestCommand {
BOOT_NOTIFICATION = 'BootNotification',
diff --git
a/src/types/ocpp/2.0/Responses.ts
b/src/types/ocpp/2.0/Responses.ts
index a4ecdadd9f33a3db0bd9c5890b1bd1442829d063..38fdda41c3e4261b505bdea2861dd4123965c715 100644
(file)
--- a/
src/types/ocpp/2.0/Responses.ts
+++ b/
src/types/ocpp/2.0/Responses.ts
@@
-2,11
+2,11
@@
import type {
GenericStatusEnumType,
InstallCertificateStatusEnumType,
StatusInfoType,
GenericStatusEnumType,
InstallCertificateStatusEnumType,
StatusInfoType,
-} from './Common';
-import type { OCPP20SetVariableResultType } from './Variables';
-import type { EmptyObject } from '../../EmptyObject';
-import type { JsonObject } from '../../JsonType';
-import type { RegistrationStatusEnumType } from '../Common';
+} from './Common
.js
';
+import type { OCPP20SetVariableResultType } from './Variables
.js
';
+import type { EmptyObject } from '../../EmptyObject
.js
';
+import type { JsonObject } from '../../JsonType
.js
';
+import type { RegistrationStatusEnumType } from '../Common
.js
';
export type OCPP20BootNotificationResponse = {
currentTime: Date;
export type OCPP20BootNotificationResponse = {
currentTime: Date;
diff --git
a/src/types/ocpp/2.0/Variables.ts
b/src/types/ocpp/2.0/Variables.ts
index c08e00f0adb3b5f883acefeabc63f2a5ad27e54a..87075cbddfd4905d37b2d2f3cd71979d9809c491 100644
(file)
--- a/
src/types/ocpp/2.0/Variables.ts
+++ b/
src/types/ocpp/2.0/Variables.ts
@@
-1,5
+1,5
@@
-import type { EVSEType, StatusInfoType } from './Common';
-import type { JsonObject } from '../../JsonType';
+import type { EVSEType, StatusInfoType } from './Common
.js
';
+import type { JsonObject } from '../../JsonType
.js
';
enum OCPP20ComponentName {
AlignedDataCtrlr = 'AlignedDataCtrlr',
enum OCPP20ComponentName {
AlignedDataCtrlr = 'AlignedDataCtrlr',
diff --git
a/src/types/ocpp/ChargePointErrorCode.ts
b/src/types/ocpp/ChargePointErrorCode.ts
index d08f17a07121c078011db81253e1c9c6f51ab03d..5fcbee455b5914ef11058d464c0d8d8dc92d29a9 100644
(file)
--- a/
src/types/ocpp/ChargePointErrorCode.ts
+++ b/
src/types/ocpp/ChargePointErrorCode.ts
@@
-1,4
+1,4
@@
-import { OCPP16ChargePointErrorCode } from './1.6/ChargePointErrorCode';
+import { OCPP16ChargePointErrorCode } from './1.6/ChargePointErrorCode
.js
';
export const ChargePointErrorCode = {
...OCPP16ChargePointErrorCode,
export const ChargePointErrorCode = {
...OCPP16ChargePointErrorCode,
diff --git
a/src/types/ocpp/ChargingProfile.ts
b/src/types/ocpp/ChargingProfile.ts
index bd67417e40ed8a84bcd33b1d658cdf4c9efef760..6033ad954f6acd550abe0e2669c9d93a1e32b42e 100644
(file)
--- a/
src/types/ocpp/ChargingProfile.ts
+++ b/
src/types/ocpp/ChargingProfile.ts
@@
-4,7
+4,7
@@
import {
OCPP16ChargingRateUnitType,
type OCPP16ChargingSchedulePeriod,
OCPP16RecurrencyKindType,
OCPP16ChargingRateUnitType,
type OCPP16ChargingSchedulePeriod,
OCPP16RecurrencyKindType,
-} from './1.6/ChargingProfile';
+} from './1.6/ChargingProfile
.js
';
export type ChargingProfile = OCPP16ChargingProfile;
export type ChargingProfile = OCPP16ChargingProfile;
diff --git
a/src/types/ocpp/Common.ts
b/src/types/ocpp/Common.ts
index a4422b18643eee589ae309639312b9f97f14e0c4..a1be9be01f83516dd0ed26b9e0cf752fa78e9083 100644
(file)
--- a/
src/types/ocpp/Common.ts
+++ b/
src/types/ocpp/Common.ts
@@
-1,4
+1,4
@@
-import type { JsonObject } from '../JsonType';
+import type { JsonObject } from '../JsonType
.js
';
export enum GenericStatus {
Accepted = 'Accepted',
export enum GenericStatus {
Accepted = 'Accepted',
diff --git
a/src/types/ocpp/Configuration.ts
b/src/types/ocpp/Configuration.ts
index 3081f13d5d4a123d882a1809474e1c009a738d40..263ff004ae15165a4e6e33b1129c6ca56db3c0c9 100644
(file)
--- a/
src/types/ocpp/Configuration.ts
+++ b/
src/types/ocpp/Configuration.ts
@@
-2,13
+2,13
@@
import {
OCPP16StandardParametersKey,
OCPP16SupportedFeatureProfiles,
OCPP16VendorParametersKey,
OCPP16StandardParametersKey,
OCPP16SupportedFeatureProfiles,
OCPP16VendorParametersKey,
-} from './1.6/Configuration';
+} from './1.6/Configuration
.js
';
import {
OCPP20OptionalVariableName,
OCPP20RequiredVariableName,
OCPP20VendorVariableName,
import {
OCPP20OptionalVariableName,
OCPP20RequiredVariableName,
OCPP20VendorVariableName,
-} from './2.0/Variables';
-import type { JsonObject } from '../JsonType';
+} from './2.0/Variables
.js
';
+import type { JsonObject } from '../JsonType
.js
';
export const StandardParametersKey = {
...OCPP16StandardParametersKey,
export const StandardParametersKey = {
...OCPP16StandardParametersKey,
diff --git
a/src/types/ocpp/ConnectorStatusEnum.ts
b/src/types/ocpp/ConnectorStatusEnum.ts
index d3ac3e02d2a9661cfb4d440e430400b0eeb33489..9ed66fa501566558eccd0ba413f3aac1bd999dc0 100644
(file)
--- a/
src/types/ocpp/ConnectorStatusEnum.ts
+++ b/
src/types/ocpp/ConnectorStatusEnum.ts
@@
-1,5
+1,5
@@
-import { OCPP16ChargePointStatus } from './1.6/ChargePointStatus';
-import { OCPP20ConnectorStatusEnumType } from './2.0/Common';
+import { OCPP16ChargePointStatus } from './1.6/ChargePointStatus
.js
';
+import { OCPP20ConnectorStatusEnumType } from './2.0/Common
.js
';
export const ConnectorStatusEnum = {
...OCPP16ChargePointStatus,
export const ConnectorStatusEnum = {
...OCPP16ChargePointStatus,
diff --git
a/src/types/ocpp/MeterValues.ts
b/src/types/ocpp/MeterValues.ts
index 78cc9af9b02905c44e810c3e95eed1c351ecf681..9b6a3537af8b726410a102c56ccfa0d5f4df70d8 100644
(file)
--- a/
src/types/ocpp/MeterValues.ts
+++ b/
src/types/ocpp/MeterValues.ts
@@
-6,7
+6,7
@@
import {
OCPP16MeterValuePhase,
OCPP16MeterValueUnit,
type OCPP16SampledValue,
OCPP16MeterValuePhase,
OCPP16MeterValueUnit,
type OCPP16SampledValue,
-} from './1.6/MeterValues';
+} from './1.6/MeterValues
.js
';
export const MeterValueUnit = {
...OCPP16MeterValueUnit,
export const MeterValueUnit = {
...OCPP16MeterValueUnit,
diff --git
a/src/types/ocpp/Requests.ts
b/src/types/ocpp/Requests.ts
index 8d19078e448f0584b33c357f41e248852c069655..0d60daf5872044d5a365da2ce75ef01c179a70c3 100644
(file)
--- a/
src/types/ocpp/Requests.ts
+++ b/
src/types/ocpp/Requests.ts
@@
-1,5
+1,5
@@
-import { OCPP16DiagnosticsStatus } from './1.6/DiagnosticsStatus';
-import type { OCPP16MeterValuesRequest } from './1.6/MeterValues';
+import { OCPP16DiagnosticsStatus } from './1.6/DiagnosticsStatus
.js
';
+import type { OCPP16MeterValuesRequest } from './1.6/MeterValues
.js
';
import {
OCPP16AvailabilityType,
type OCPP16BootNotificationRequest,
import {
OCPP16AvailabilityType,
type OCPP16BootNotificationRequest,
@@
-14,18
+14,18
@@
import {
OCPP16RequestCommand,
type OCPP16ReserveNowRequest,
type OCPP16StatusNotificationRequest,
OCPP16RequestCommand,
type OCPP16ReserveNowRequest,
type OCPP16StatusNotificationRequest,
-} from './1.6/Requests';
-import { OperationalStatusEnumType } from './2.0/Common';
+} from './1.6/Requests
.js
';
+import { OperationalStatusEnumType } from './2.0/Common
.js
';
import {
type OCPP20BootNotificationRequest,
OCPP20IncomingRequestCommand,
OCPP20RequestCommand,
type OCPP20StatusNotificationRequest,
import {
type OCPP20BootNotificationRequest,
OCPP20IncomingRequestCommand,
OCPP20RequestCommand,
type OCPP20StatusNotificationRequest,
-} from './2.0/Requests';
-import type { MessageType } from './MessageType';
-import type { ChargingStation } from '../../charging-station';
-import type { OCPPError } from '../../exception';
-import type { JsonType } from '../JsonType';
+} from './2.0/Requests
.js
';
+import type { MessageType } from './MessageType
.js
';
+import type { ChargingStation } from '../../charging-station
/index.js
';
+import type { OCPPError } from '../../exception
/index.js
';
+import type { JsonType } from '../JsonType
.js
';
export const RequestCommand = {
...OCPP16RequestCommand,
export const RequestCommand = {
...OCPP16RequestCommand,
diff --git
a/src/types/ocpp/Reservation.ts
b/src/types/ocpp/Reservation.ts
index 61ef6474a6beb364dd625c20af791e71978ff540..8d783a26f2815d83dafa5ae8bf222b96d3a84b9e 100644
(file)
--- a/
src/types/ocpp/Reservation.ts
+++ b/
src/types/ocpp/Reservation.ts
@@
-1,4
+1,4
@@
-import type { OCPP16ReserveNowRequest } from './1.6/Requests';
+import type { OCPP16ReserveNowRequest } from './1.6/Requests
.js
';
export type Reservation = OCPP16ReserveNowRequest;
export type Reservation = OCPP16ReserveNowRequest;
diff --git
a/src/types/ocpp/Responses.ts
b/src/types/ocpp/Responses.ts
index 8107e274416d749b64c5bd8f70c4ab29517dd25b..e00302acb8c197bbc6f6d1771c4ffbaf8141c917 100644
(file)
--- a/
src/types/ocpp/Responses.ts
+++ b/
src/types/ocpp/Responses.ts
@@
-1,4
+1,4
@@
-import type { OCPP16MeterValuesResponse } from './1.6/MeterValues';
+import type { OCPP16MeterValuesResponse } from './1.6/MeterValues
.js
';
import {
OCPP16AvailabilityStatus,
type OCPP16BootNotificationResponse,
import {
OCPP16AvailabilityStatus,
type OCPP16BootNotificationResponse,
@@
-14,13
+14,13
@@
import {
type OCPP16StatusNotificationResponse,
OCPP16TriggerMessageStatus,
OCPP16UnlockStatus,
type OCPP16StatusNotificationResponse,
OCPP16TriggerMessageStatus,
OCPP16UnlockStatus,
-} from './1.6/Responses';
-import type { OCPP20BootNotificationResponse, OCPP20ClearCacheResponse } from './2.0/Responses';
-import { type GenericResponse, GenericStatus } from './Common';
-import type { ErrorType } from './ErrorType';
-import type { MessageType } from './MessageType';
-import type { ChargingStation } from '../../charging-station';
-import type { JsonType } from '../JsonType';
+} from './1.6/Responses
.js
';
+import type { OCPP20BootNotificationResponse, OCPP20ClearCacheResponse } from './2.0/Responses
.js
';
+import { type GenericResponse, GenericStatus } from './Common
.js
';
+import type { ErrorType } from './ErrorType
.js
';
+import type { MessageType } from './MessageType
.js
';
+import type { ChargingStation } from '../../charging-station
/index.js
';
+import type { JsonType } from '../JsonType
.js
';
export type Response = [MessageType.CALL_RESULT_MESSAGE, string, JsonType];
export type Response = [MessageType.CALL_RESULT_MESSAGE, string, JsonType];
diff --git
a/src/types/ocpp/Transaction.ts
b/src/types/ocpp/Transaction.ts
index 2a8a0ad46648978d3fe8b0fbab43f3cf008b812d..2a01b004c0561e2b70671959243e4067fd683c54 100644
(file)
--- a/
src/types/ocpp/Transaction.ts
+++ b/
src/types/ocpp/Transaction.ts
@@
-7,7
+7,7
@@
import {
OCPP16StopTransactionReason,
type OCPP16StopTransactionRequest,
type OCPP16StopTransactionResponse,
OCPP16StopTransactionReason,
type OCPP16StopTransactionRequest,
type OCPP16StopTransactionResponse,
-} from './1.6/Transaction';
+} from './1.6/Transaction
.js
';
export const AuthorizationStatus = {
...OCPP16AuthorizationStatus,
export const AuthorizationStatus = {
...OCPP16AuthorizationStatus,
diff --git
a/src/types/orm/entities/PerformanceData.ts
b/src/types/orm/entities/PerformanceData.ts
index 444241ff0fb2aa34d005b3a11328c7385e26f815..3b046a91e752ae6c872c478cf32c8c177c06b1f4 100644
(file)
--- a/
src/types/orm/entities/PerformanceData.ts
+++ b/
src/types/orm/entities/PerformanceData.ts
@@
-2,7
+2,7
@@
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Entity, ManyToOne, PrimaryKey, Property } from '@mikro-orm/core';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
-import type { PerformanceRecord } from './PerformanceRecord';
+import type { PerformanceRecord } from './PerformanceRecord
.js
';
@Entity()
export class PerformanceData {
@Entity()
export class PerformanceData {
diff --git
a/src/types/orm/entities/PerformanceRecord.ts
b/src/types/orm/entities/PerformanceRecord.ts
index 997d01003e27e7699937b674ef0d32a6d83f0cec..58bfacad1b07fc8310962e7a28fc15897d455205 100644
(file)
--- a/
src/types/orm/entities/PerformanceRecord.ts
+++ b/
src/types/orm/entities/PerformanceRecord.ts
@@
-2,7
+2,7
@@
import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Collection, Entity, OneToMany, PrimaryKey, Property } from '@mikro-orm/core';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
-import type { PerformanceData } from './PerformanceData';
+import type { PerformanceData } from './PerformanceData
.js
';
@Entity()
export class PerformanceRecord {
@Entity()
export class PerformanceRecord {
diff --git
a/src/utils/AsyncLock.ts
b/src/utils/AsyncLock.ts
index fe984cebdef97d8043d0f29f6fb9ba99ec502f3c..ec14a193c0af7649b493657d6b0170ddf359c1e7 100644
(file)
--- a/
src/utils/AsyncLock.ts
+++ b/
src/utils/AsyncLock.ts
@@
-2,7
+2,7
@@
import Queue from 'mnemonist/queue.js';
import Queue from 'mnemonist/queue.js';
-import { Constants } from './Constants';
+import { Constants } from './Constants
.js
';
export enum AsyncLockType {
configuration = 'configuration',
export enum AsyncLockType {
configuration = 'configuration',
diff --git
a/src/utils/ChargingStationConfigurationUtils.ts
b/src/utils/ChargingStationConfigurationUtils.ts
index 34d859c787eb54c4a87cd8d30ebdfb8d51fb88d0..b18922a48df0d10ae826f6c58dfafe02c6848930 100644
(file)
--- a/
src/utils/ChargingStationConfigurationUtils.ts
+++ b/
src/utils/ChargingStationConfigurationUtils.ts
@@
-1,11
+1,11
@@
-import { isNullOrUndefined } from './Utils';
-import type { ChargingStation } from '../charging-station';
+import { isNullOrUndefined } from './Utils
.js
';
+import type { ChargingStation } from '../charging-station
/index.js
';
import type {
ChargingStationAutomaticTransactionGeneratorConfiguration,
ConnectorStatus,
EvseStatusConfiguration,
EvseStatusWorkerType,
import type {
ChargingStationAutomaticTransactionGeneratorConfiguration,
ConnectorStatus,
EvseStatusConfiguration,
EvseStatusWorkerType,
-} from '../types';
+} from '../types
/index.js
';
export const buildChargingStationAutomaticTransactionGeneratorConfiguration = (
chargingStation: ChargingStation,
export const buildChargingStationAutomaticTransactionGeneratorConfiguration = (
chargingStation: ChargingStation,
diff --git
a/src/utils/Configuration.ts
b/src/utils/Configuration.ts
index 31d994f58eee2c29d18cacee21ac3a565f708c57..1c2e208fea86ddc4cf909a1870aaf99e41fa5f04 100644
(file)
--- a/
src/utils/Configuration.ts
+++ b/
src/utils/Configuration.ts
@@
-13,9
+13,9
@@
import {
getDefaultPerformanceStorageUri,
handleFileException,
logPrefix,
getDefaultPerformanceStorageUri,
handleFileException,
logPrefix,
-} from './ConfigurationUtils';
-import { Constants } from './Constants';
-import { hasOwnProp, isCFEnvironment, isUndefined, once } from './Utils';
+} from './ConfigurationUtils
.js
';
+import { Constants } from './Constants
.js
';
+import { hasOwnProp, isCFEnvironment, isUndefined, once } from './Utils
.js
';
import {
ApplicationProtocol,
type ConfigurationData,
import {
ApplicationProtocol,
type ConfigurationData,
@@
-28,14
+28,14
@@
import {
SupervisionUrlDistribution,
type UIServerConfiguration,
type WorkerConfiguration,
SupervisionUrlDistribution,
type UIServerConfiguration,
type WorkerConfiguration,
-} from '../types';
+} from '../types
/index.js
';
import {
DEFAULT_ELEMENT_START_DELAY,
DEFAULT_POOL_MAX_SIZE,
DEFAULT_POOL_MIN_SIZE,
DEFAULT_WORKER_START_DELAY,
WorkerProcessType,
import {
DEFAULT_ELEMENT_START_DELAY,
DEFAULT_POOL_MAX_SIZE,
DEFAULT_POOL_MIN_SIZE,
DEFAULT_WORKER_START_DELAY,
WorkerProcessType,
-} from '../worker';
+} from '../worker
/index.js
';
type ConfigurationSectionType =
| LogConfiguration
type ConfigurationSectionType =
| LogConfiguration
diff --git
a/src/utils/ConfigurationUtils.ts
b/src/utils/ConfigurationUtils.ts
index 73bd9ceb8dbf4124ad34ed8962c94493f75be671..4e03513c48c5d7046680708eb0acd949294fcecd 100644
(file)
--- a/
src/utils/ConfigurationUtils.ts
+++ b/
src/utils/ConfigurationUtils.ts
@@
-3,10
+3,10
@@
import { fileURLToPath } from 'node:url';
import chalk from 'chalk';
import chalk from 'chalk';
-import { Constants } from './Constants';
-import { isNotEmptyString, logPrefix as utilsLogPrefix } from './Utils';
-import { type ElementsPerWorkerType, FileType, StorageType } from '../types';
-import { WorkerProcessType } from '../worker';
+import { Constants } from './Constants
.js
';
+import { isNotEmptyString, logPrefix as utilsLogPrefix } from './Utils
.js
';
+import { type ElementsPerWorkerType, FileType, StorageType } from '../types
/index.js
';
+import { WorkerProcessType } from '../worker
/index.js
';
export const logPrefix = (): string => {
return utilsLogPrefix(' Simulator configuration |');
export const logPrefix = (): string => {
return utilsLogPrefix(' Simulator configuration |');
diff --git
a/src/utils/Constants.ts
b/src/utils/Constants.ts
index d704c15ddff2a377c9d39a6ca553f5a0409b85c9..4dc07366e68922670c64f9094c238918456bbb72 100644
(file)
--- a/
src/utils/Constants.ts
+++ b/
src/utils/Constants.ts
@@
-4,7
+4,7
@@
import {
CurrentType,
OCPPVersion,
VendorParametersKey,
CurrentType,
OCPPVersion,
VendorParametersKey,
-} from '../types';
+} from '../types
/index.js
';
export class Constants {
static readonly DEFAULT_STATION_INFO: Partial<ChargingStationInfo> = Object.freeze({
export class Constants {
static readonly DEFAULT_STATION_INFO: Partial<ChargingStationInfo> = Object.freeze({
diff --git
a/src/utils/ErrorUtils.ts
b/src/utils/ErrorUtils.ts
index 537aa308b41a0516e4b688c7f9b38124952d455f..e046f1c86582cc867dee74b9827b0780ca984f2a 100644
(file)
--- a/
src/utils/ErrorUtils.ts
+++ b/
src/utils/ErrorUtils.ts
@@
-2,9
+2,9
@@
import process from 'node:process';
import chalk from 'chalk';
import chalk from 'chalk';
-import { logger } from './Logger';
-import { isNotEmptyString } from './Utils';
-import type { ChargingStation } from '../charging-station';
+import { logger } from './Logger
.js
';
+import { isNotEmptyString } from './Utils
.js
';
+import type { ChargingStation } from '../charging-station
/index.js
';
import type {
EmptyObject,
FileType,
import type {
EmptyObject,
FileType,
@@
-12,7
+12,7
@@
import type {
IncomingRequestCommand,
JsonType,
RequestCommand,
IncomingRequestCommand,
JsonType,
RequestCommand,
-} from '../types';
+} from '../types
/index.js
';
const defaultErrorParams = {
throwError: true,
const defaultErrorParams = {
throwError: true,
diff --git
a/src/utils/FileUtils.ts
b/src/utils/FileUtils.ts
index ecb945bf40915841809270453428725cddf6b182..7235011cb0314509f108ee12115c05c0f84a59f7 100644
(file)
--- a/
src/utils/FileUtils.ts
+++ b/
src/utils/FileUtils.ts
@@
-1,9
+1,9
@@
import { type FSWatcher, type WatchListener, readFileSync, watch } from 'node:fs';
import { type FSWatcher, type WatchListener, readFileSync, watch } from 'node:fs';
-import { handleFileException } from './ErrorUtils';
-import { logger } from './Logger';
-import { isNotEmptyString } from './Utils';
-import type { FileType, JsonType } from '../types';
+import { handleFileException } from './ErrorUtils
.js
';
+import { logger } from './Logger
.js
';
+import { isNotEmptyString } from './Utils
.js
';
+import type { FileType, JsonType } from '../types
/index.js
';
export const watchJsonFile = <T extends JsonType>(
file: string,
export const watchJsonFile = <T extends JsonType>(
file: string,
diff --git
a/src/utils/Logger.ts
b/src/utils/Logger.ts
index 239ec9186310c2de9d2a6f94d78f8d75d99597f3..ba5fe9eb74da13ea0bb8ecb1350a9f3426235125 100644
(file)
--- a/
src/utils/Logger.ts
+++ b/
src/utils/Logger.ts
@@
-3,9
+3,9
@@
import { createLogger, format, type transport } from 'winston';
import TransportType from 'winston/lib/winston/transports/index.js';
import DailyRotateFile from 'winston-daily-rotate-file';
import TransportType from 'winston/lib/winston/transports/index.js';
import DailyRotateFile from 'winston-daily-rotate-file';
-import { Configuration } from './Configuration';
-import { insertAt } from './Utils';
-import { ConfigurationSection, type LogConfiguration } from '../types';
+import { Configuration } from './Configuration
.js
';
+import { insertAt } from './Utils
.js
';
+import { ConfigurationSection, type LogConfiguration } from '../types
/index.js
';
const logConfiguration = Configuration.getConfigurationSection<LogConfiguration>(
ConfigurationSection.log,
const logConfiguration = Configuration.getConfigurationSection<LogConfiguration>(
ConfigurationSection.log,
diff --git
a/src/utils/MessageChannelUtils.ts
b/src/utils/MessageChannelUtils.ts
index f3008b50d117b675cfeec772a8b90518669a998d..85d0c483d7c8662e4aaa2b60ffff204f642eef61 100644
(file)
--- a/
src/utils/MessageChannelUtils.ts
+++ b/
src/utils/MessageChannelUtils.ts
@@
-3,14
+3,14
@@
import {
buildChargingStationAutomaticTransactionGeneratorConfiguration,
buildConnectorsStatus,
buildEvsesStatus,
buildChargingStationAutomaticTransactionGeneratorConfiguration,
buildConnectorsStatus,
buildEvsesStatus,
-} from './ChargingStationConfigurationUtils';
-import type { ChargingStation } from '../charging-station';
+} from './ChargingStationConfigurationUtils
.js
';
+import type { ChargingStation } from '../charging-station
/index.js
';
import {
type ChargingStationData,
type ChargingStationWorkerMessage,
ChargingStationWorkerMessageEvents,
type Statistics,
import {
type ChargingStationData,
type ChargingStationWorkerMessage,
ChargingStationWorkerMessageEvents,
type Statistics,
-} from '../types';
+} from '../types
/index.js
';
export const buildStartedMessage = (
chargingStation: ChargingStation,
export const buildStartedMessage = (
chargingStation: ChargingStation,
diff --git
a/src/utils/StatisticUtils.ts
b/src/utils/StatisticUtils.ts
index 2ff71b0acb2ffa897a5d07f0e7bcd18719314903..7d2412ee0b3e9953d89f164597970014c37bdb4e 100644
(file)
--- a/
src/utils/StatisticUtils.ts
+++ b/
src/utils/StatisticUtils.ts
@@
-1,4
+1,4
@@
-import { isEmptyArray, isNullOrUndefined } from './Utils';
+import { isEmptyArray, isNullOrUndefined } from './Utils
.js
';
/**
* Computes the average of the given data set.
/**
* Computes the average of the given data set.
diff --git
a/src/utils/Utils.ts
b/src/utils/Utils.ts
index 366ccf98a96d182f55c67b9c2448d076be94e674..872c2b049800260bd32953b25a6d2dd190e94d97 100644
(file)
--- a/
src/utils/Utils.ts
+++ b/
src/utils/Utils.ts
@@
-13,8
+13,8
@@
import {
secondsToMilliseconds,
} from 'date-fns';
secondsToMilliseconds,
} from 'date-fns';
-import { Constants } from './Constants';
-import { type TimestampedData, WebSocketCloseEventStatusString } from '../types';
+import { Constants } from './Constants
.js
';
+import { type TimestampedData, WebSocketCloseEventStatusString } from '../types
/index.js
';
export const logPrefix = (prefixString = ''): string => {
return `${new Date().toLocaleString()}${prefixString}`;
export const logPrefix = (prefixString = ''): string => {
return `${new Date().toLocaleString()}${prefixString}`;
diff --git
a/src/utils/index.ts
b/src/utils/index.ts
index 7c876834ed260ee32aad32656edab3d7e5fac3f5..20d64cf554d2820e052cfc336c6a08ac36ec5a21 100644
(file)
--- a/
src/utils/index.ts
+++ b/
src/utils/index.ts
@@
-1,28
+1,28
@@
-export { ACElectricUtils, DCElectricUtils } from './ElectricUtils';
-export { AsyncLock, AsyncLockType } from './AsyncLock';
+export { ACElectricUtils, DCElectricUtils } from './ElectricUtils
.js
';
+export { AsyncLock, AsyncLockType } from './AsyncLock
.js
';
export {
OutputFormat,
buildChargingStationAutomaticTransactionGeneratorConfiguration,
buildConnectorsStatus,
buildEvsesStatus,
export {
OutputFormat,
buildChargingStationAutomaticTransactionGeneratorConfiguration,
buildConnectorsStatus,
buildEvsesStatus,
-} from './ChargingStationConfigurationUtils';
-export { CircularArray } from './CircularArray';
-export { Configuration } from './Configuration';
-export { Constants } from './Constants';
+} from './ChargingStationConfigurationUtils
.js
';
+export { CircularArray } from './CircularArray
.js
';
+export { Configuration } from './Configuration
.js
';
+export { Constants } from './Constants
.js
';
export {
handleFileException,
handleUncaughtException,
handleUnhandledRejection,
handleSendMessageError,
setDefaultErrorParams,
export {
handleFileException,
handleUncaughtException,
handleUnhandledRejection,
handleSendMessageError,
setDefaultErrorParams,
-} from './ErrorUtils';
-export { watchJsonFile } from './FileUtils';
+} from './ErrorUtils
.js
';
+export { watchJsonFile } from './FileUtils
.js
';
export {
buildPerformanceStatisticsMessage,
buildUpdatedMessage,
buildStartedMessage,
buildStoppedMessage,
export {
buildPerformanceStatisticsMessage,
buildUpdatedMessage,
buildStartedMessage,
buildStoppedMessage,
-} from './MessageChannelUtils';
+} from './MessageChannelUtils
.js
';
export {
JSONStringifyWithMapSupport,
cloneObject,
export {
JSONStringifyWithMapSupport,
cloneObject,
@@
-56,6
+56,6
@@
export {
secureRandom,
sleep,
validateUUID,
secureRandom,
sleep,
validateUUID,
-} from './Utils';
-export { average, median, nthPercentile, stdDeviation } from './StatisticUtils';
-export { logger } from './Logger';
+} from './Utils
.js
';
+export { average, median, nthPercentile, stdDeviation } from './StatisticUtils
.js
';
+export { logger } from './Logger
.js
';
diff --git
a/src/worker/WorkerAbstract.ts
b/src/worker/WorkerAbstract.ts
index cd4dedf992fca40ff0b7cb787e91468d28020d55..e78216def1d2aff36ce53572b30044a109675c28 100644
(file)
--- a/
src/worker/WorkerAbstract.ts
+++ b/
src/worker/WorkerAbstract.ts
@@
-3,8
+3,8
@@
import { existsSync } from 'node:fs';
import type { PoolInfo } from 'poolifier';
import type { PoolInfo } from 'poolifier';
-import type { SetInfo, WorkerData, WorkerOptions } from './WorkerTypes';
-import { defaultErrorHandler, defaultExitHandler } from './WorkerUtils';
+import type { SetInfo, WorkerData, WorkerOptions } from './WorkerTypes
.js
';
+import { defaultErrorHandler, defaultExitHandler } from './WorkerUtils
.js
';
export abstract class WorkerAbstract<T extends WorkerData> {
protected readonly workerScript: string;
export abstract class WorkerAbstract<T extends WorkerData> {
protected readonly workerScript: string;
diff --git
a/src/worker/WorkerConstants.ts
b/src/worker/WorkerConstants.ts
index c7f8065ae1dc603842e78e6eae6a8c0fe7133e17..654e6f5e2e51782ea2168d3ccb94cdff2dd66fca 100644
(file)
--- a/
src/worker/WorkerConstants.ts
+++ b/
src/worker/WorkerConstants.ts
@@
-1,6
+1,6
@@
import { availableParallelism } from 'poolifier';
import { availableParallelism } from 'poolifier';
-import type { WorkerOptions } from './WorkerTypes';
+import type { WorkerOptions } from './WorkerTypes
.js
';
export const EMPTY_FUNCTION = Object.freeze(() => {
/* This is intentional */
export const EMPTY_FUNCTION = Object.freeze(() => {
/* This is intentional */
diff --git
a/src/worker/WorkerDynamicPool.ts
b/src/worker/WorkerDynamicPool.ts
index 9527d67b60bd9b68ff81d4c96b8b415af6d30b61..e27e803b40b9f338d8997bb484705a3a57649208 100644
(file)
--- a/
src/worker/WorkerDynamicPool.ts
+++ b/
src/worker/WorkerDynamicPool.ts
@@
-2,9
+2,9
@@
import type { EventEmitterAsyncResource } from 'node:events';
import { DynamicThreadPool, type PoolInfo } from 'poolifier';
import { DynamicThreadPool, type PoolInfo } from 'poolifier';
-import { WorkerAbstract } from './WorkerAbstract';
-import type { WorkerData, WorkerOptions } from './WorkerTypes';
-import { randomizeDelay, sleep } from './WorkerUtils';
+import { WorkerAbstract } from './WorkerAbstract
.js
';
+import type { WorkerData, WorkerOptions } from './WorkerTypes
.js
';
+import { randomizeDelay, sleep } from './WorkerUtils
.js
';
export class WorkerDynamicPool extends WorkerAbstract<WorkerData> {
private readonly pool: DynamicThreadPool<WorkerData>;
export class WorkerDynamicPool extends WorkerAbstract<WorkerData> {
private readonly pool: DynamicThreadPool<WorkerData>;
diff --git
a/src/worker/WorkerFactory.ts
b/src/worker/WorkerFactory.ts
index 608e879859b9662cb093241aec71fccd7d0a9ea1..7ae5ddb93f8e116ab3e32273130d6a255386d61e 100644
(file)
--- a/
src/worker/WorkerFactory.ts
+++ b/
src/worker/WorkerFactory.ts
@@
-1,11
+1,11
@@
import { isMainThread } from 'node:worker_threads';
import { isMainThread } from 'node:worker_threads';
-import type { WorkerAbstract } from './WorkerAbstract';
-import { DEFAULT_WORKER_OPTIONS } from './WorkerConstants';
-import { WorkerDynamicPool } from './WorkerDynamicPool';
-import { WorkerFixedPool } from './WorkerFixedPool';
-import { WorkerSet } from './WorkerSet';
-import { type WorkerData, type WorkerOptions, WorkerProcessType } from './WorkerTypes';
+import type { WorkerAbstract } from './WorkerAbstract
.js
';
+import { DEFAULT_WORKER_OPTIONS } from './WorkerConstants
.js
';
+import { WorkerDynamicPool } from './WorkerDynamicPool
.js
';
+import { WorkerFixedPool } from './WorkerFixedPool
.js
';
+import { WorkerSet } from './WorkerSet
.js
';
+import { type WorkerData, type WorkerOptions, WorkerProcessType } from './WorkerTypes
.js
';
export class WorkerFactory {
private constructor() {
export class WorkerFactory {
private constructor() {
diff --git
a/src/worker/WorkerFixedPool.ts
b/src/worker/WorkerFixedPool.ts
index f15a1176beca886a418ec2e8de4779bc21e20f64..9e71c27703442525b1b572f098f6579f71d546ec 100644
(file)
--- a/
src/worker/WorkerFixedPool.ts
+++ b/
src/worker/WorkerFixedPool.ts
@@
-2,9
+2,9
@@
import type { EventEmitterAsyncResource } from 'node:events';
import { FixedThreadPool, type PoolInfo } from 'poolifier';
import { FixedThreadPool, type PoolInfo } from 'poolifier';
-import { WorkerAbstract } from './WorkerAbstract';
-import type { WorkerData, WorkerOptions } from './WorkerTypes';
-import { randomizeDelay, sleep } from './WorkerUtils';
+import { WorkerAbstract } from './WorkerAbstract
.js
';
+import type { WorkerData, WorkerOptions } from './WorkerTypes
.js
';
+import { randomizeDelay, sleep } from './WorkerUtils
.js
';
export class WorkerFixedPool extends WorkerAbstract<WorkerData> {
private readonly pool: FixedThreadPool<WorkerData>;
export class WorkerFixedPool extends WorkerAbstract<WorkerData> {
private readonly pool: FixedThreadPool<WorkerData>;
diff --git
a/src/worker/WorkerSet.ts
b/src/worker/WorkerSet.ts
index 047d03ad0ee09aa9922e4b66667f34ddc7f5b8e6..b33d917c14a4b7865f60acd80029dd5522c3ebd0 100644
(file)
--- a/
src/worker/WorkerSet.ts
+++ b/
src/worker/WorkerSet.ts
@@
-3,8
+3,8
@@
import { EventEmitterAsyncResource } from 'node:events';
import { SHARE_ENV, Worker } from 'node:worker_threads';
import { EventEmitterAsyncResource } from 'node:events';
import { SHARE_ENV, Worker } from 'node:worker_threads';
-import { WorkerAbstract } from './WorkerAbstract';
-import { EMPTY_FUNCTION, workerSetVersion } from './WorkerConstants';
+import { WorkerAbstract } from './WorkerAbstract
.js
';
+import { EMPTY_FUNCTION, workerSetVersion } from './WorkerConstants
.js
';
import {
type SetInfo,
type WorkerData,
import {
type SetInfo,
type WorkerData,
@@
-13,8
+13,8
@@
import {
type WorkerOptions,
type WorkerSetElement,
WorkerSetEvents,
type WorkerOptions,
type WorkerSetElement,
WorkerSetEvents,
-} from './WorkerTypes';
-import { randomizeDelay, sleep } from './WorkerUtils';
+} from './WorkerTypes
.js
';
+import { randomizeDelay, sleep } from './WorkerUtils
.js
';
export class WorkerSet extends WorkerAbstract<WorkerData> {
public readonly emitter: EventEmitterAsyncResource | undefined;
export class WorkerSet extends WorkerAbstract<WorkerData> {
public readonly emitter: EventEmitterAsyncResource | undefined;
diff --git
a/src/worker/index.ts
b/src/worker/index.ts
index a7c3d1ea1f185b0e5c77b78b3de7c41994273638..32781a6e390c42cf871c0f3d6b385e0eece4d628 100644
(file)
--- a/
src/worker/index.ts
+++ b/
src/worker/index.ts
@@
-1,15
+1,15
@@
-export type { WorkerAbstract } from './WorkerAbstract';
+export type { WorkerAbstract } from './WorkerAbstract
.js
';
export {
DEFAULT_ELEMENT_START_DELAY,
DEFAULT_POOL_MAX_SIZE,
DEFAULT_POOL_MIN_SIZE,
DEFAULT_WORKER_START_DELAY,
export {
DEFAULT_ELEMENT_START_DELAY,
DEFAULT_POOL_MAX_SIZE,
DEFAULT_POOL_MIN_SIZE,
DEFAULT_WORKER_START_DELAY,
-} from './WorkerConstants';
-export { WorkerFactory } from './WorkerFactory';
+} from './WorkerConstants
.js
';
+export { WorkerFactory } from './WorkerFactory
.js
';
export {
type WorkerData,
WorkerEvents,
type WorkerMessage,
WorkerMessageEvents,
WorkerProcessType,
export {
type WorkerData,
WorkerEvents,
type WorkerMessage,
WorkerMessageEvents,
WorkerProcessType,
-} from './WorkerTypes';
+} from './WorkerTypes
.js
';
diff --git
a/tests/utils/CircularArray.test.ts
b/tests/utils/CircularArray.test.ts
index 01cff444c6b377ed9f6df7b5380c3bed47edd1bb..358f740846bac855e02eae4321f57512ed65fd06 100644
(file)
--- a/
tests/utils/CircularArray.test.ts
+++ b/
tests/utils/CircularArray.test.ts
@@
-2,7
+2,7
@@
import { describe, it } from 'node:test';
import { expect } from 'expect';
import { expect } from 'expect';
-import { CircularArray, DEFAULT_CIRCULAR_ARRAY_SIZE } from '../../src/utils/CircularArray';
+import { CircularArray, DEFAULT_CIRCULAR_ARRAY_SIZE } from '../../src/utils/CircularArray
.js
';
await describe('CircularArray test suite', async () => {
await it('Verify that circular array can be instantiated', () => {
await describe('CircularArray test suite', async () => {
await it('Verify that circular array can be instantiated', () => {
diff --git
a/tests/utils/ElectricUtils.test.ts
b/tests/utils/ElectricUtils.test.ts
index 449967c2e02795e721a18c2c92a64e3647e6fc1c..d0d3b72bda2bbe12e65261bc26badb4ba29f8308 100644
(file)
--- a/
tests/utils/ElectricUtils.test.ts
+++ b/
tests/utils/ElectricUtils.test.ts
@@
-2,7
+2,7
@@
import { describe, it } from 'node:test';
import { expect } from 'expect';
import { expect } from 'expect';
-import { ACElectricUtils, DCElectricUtils } from '../../src/utils/ElectricUtils';
+import { ACElectricUtils, DCElectricUtils } from '../../src/utils/ElectricUtils
.js
';
await describe('ElectricUtils test suite', async () => {
await it('Verify DCElectricUtils.power()', () => {
await describe('ElectricUtils test suite', async () => {
await it('Verify DCElectricUtils.power()', () => {
diff --git
a/tests/utils/StatisticUtils.test.ts
b/tests/utils/StatisticUtils.test.ts
index 38963dbe97d2c69b27f18766f5be335351d12280..a9e61b2e00f75b568648cb1bc47d4d36655d4674 100644
(file)
--- a/
tests/utils/StatisticUtils.test.ts
+++ b/
tests/utils/StatisticUtils.test.ts
@@
-2,7
+2,7
@@
import { describe, it } from 'node:test';
import { expect } from 'expect';
import { expect } from 'expect';
-import { average, median, nthPercentile, stdDeviation } from '../../src/utils/StatisticUtils';
+import { average, median, nthPercentile, stdDeviation } from '../../src/utils/StatisticUtils
.js
';
await describe('StatisticUtils test suite', async () => {
await it('Verify average()', () => {
await describe('StatisticUtils test suite', async () => {
await it('Verify average()', () => {
diff --git
a/tests/utils/Utils.test.ts
b/tests/utils/Utils.test.ts
index 615f76fa01f057c9bad1a1b60a7a0d16b4df54d4..87777df399b69f8df723cbc5d58407a58878cd08 100644
(file)
--- a/
tests/utils/Utils.test.ts
+++ b/
tests/utils/Utils.test.ts
@@
-3,7
+3,7
@@
import { describe, it } from 'node:test';
import { hoursToMilliseconds, hoursToSeconds } from 'date-fns';
import { expect } from 'expect';
import { hoursToMilliseconds, hoursToSeconds } from 'date-fns';
import { expect } from 'expect';
-import { Constants } from '../../src/utils/Constants';
+import { Constants } from '../../src/utils/Constants
.js
';
import {
cloneObject,
convertToBoolean,
import {
cloneObject,
convertToBoolean,
@@
-35,7
+35,7
@@
import {
secureRandom,
sleep,
validateUUID,
secureRandom,
sleep,
validateUUID,
-} from '../../src/utils/Utils';
+} from '../../src/utils/Utils
.js
';
await describe('Utils test suite', async () => {
await it('Verify generateUUID()/validateUUID()', () => {
await describe('Utils test suite', async () => {
await it('Verify generateUUID()/validateUUID()', () => {
diff --git
a/tsconfig.json
b/tsconfig.json
index e32529663692daaf232c39342035dfdc18f362f8..a72199292466d734e981e836edd7c930a8fc2c94 100644
(file)
--- a/
tsconfig.json
+++ b/
tsconfig.json
@@
-2,14
+2,14
@@
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "es2022",
"$schema": "https://json.schemastore.org/tsconfig",
"compilerOptions": {
"target": "es2022",
- "module": "
esn
ext",
+ "module": "
NodeN
ext",
"lib": ["es2022"],
"removeComments": true,
"importHelpers": true,
"strict": true,
"lib": ["es2022"],
"removeComments": true,
"importHelpers": true,
"strict": true,
- "moduleResolution": "
node
",
+ "moduleResolution": "
NodeNext
",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"verbatimModuleSyntax": true,
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"verbatimModuleSyntax": true,