refactor: rename src/charging-station/Utils.ts -> src/charging-station/Helpers.ts
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 30 Jul 2023 16:19:24 +0000 (18:19 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 30 Jul 2023 16:19:24 +0000 (18:19 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/AutomaticTransactionGenerator.ts
src/charging-station/Bootstrap.ts
src/charging-station/ChargingStation.ts
src/charging-station/Helpers.ts [moved from src/charging-station/Utils.ts with 99% similarity]
src/charging-station/IdTagsCache.ts
src/charging-station/index.ts

index 5e11f36e4f95762bf408f6dcb16c0a63e5c5c028..bdeffbd25489dae3f2e7169ea4a51eef5292afc7 100644 (file)
@@ -5,8 +5,8 @@ import { AsyncResource } from 'node:async_hooks';
 import { hoursToMilliseconds, secondsToMilliseconds } from 'date-fns';
 
 import type { ChargingStation } from './ChargingStation';
+import { checkChargingStation } from './Helpers';
 import { IdTagsCache } from './IdTagsCache';
-import { checkChargingStation } from './Utils';
 import { BaseError } from '../exception';
 import { PerformanceStatistics } from '../performance';
 import {
index 7e23949ca8aca4f6dc0e93998b94bd9121634759..27f4a6073c8c5159c1bfa2b134688e6d6027325a 100644 (file)
@@ -8,9 +8,9 @@ import { isMainThread } from 'node:worker_threads';
 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 './Utils';
 import { version } from '../../package.json' assert { type: 'json' };
 import { BaseError } from '../exception';
 import { type Storage, StorageFactory } from '../performance';
index bf5bc189d4d3ad22eacd853fa621229b44013e74..c379ec7bd0ea08e1e68c8e62ac3179add092d406 100644 (file)
@@ -26,20 +26,6 @@ import {
   getConfigurationKey,
   setConfigurationKeyValue,
 } from './ConfigurationKeyUtils';
-import { IdTagsCache } from './IdTagsCache';
-import {
-  OCPP16IncomingRequestService,
-  OCPP16RequestService,
-  OCPP16ResponseService,
-  OCPP16ServiceUtils,
-  OCPP20IncomingRequestService,
-  OCPP20RequestService,
-  OCPP20ResponseService,
-  type OCPPIncomingRequestService,
-  type OCPPRequestService,
-  OCPPServiceUtils,
-} from './ocpp';
-import { SharedLRUCache } from './SharedLRUCache';
 import {
   buildConnectorsMap,
   checkConnectorsConfiguration,
@@ -62,7 +48,21 @@ import {
   propagateSerialNumber,
   stationTemplateToStationInfo,
   warnTemplateKeysDeprecation,
-} from './Utils';
+} from './Helpers';
+import { IdTagsCache } from './IdTagsCache';
+import {
+  OCPP16IncomingRequestService,
+  OCPP16RequestService,
+  OCPP16ResponseService,
+  OCPP16ServiceUtils,
+  OCPP20IncomingRequestService,
+  OCPP20RequestService,
+  OCPP20ResponseService,
+  type OCPPIncomingRequestService,
+  type OCPPRequestService,
+  OCPPServiceUtils,
+} from './ocpp';
+import { SharedLRUCache } from './SharedLRUCache';
 import { BaseError, OCPPError } from '../exception';
 import { PerformanceStatistics } from '../performance';
 import {
similarity index 99%
rename from src/charging-station/Utils.ts
rename to src/charging-station/Helpers.ts
index fa60c9a5fe6984f76a58228956b629a107366df3..7f32b4871d3e0c717af79e46d093958419b32e92 100644 (file)
@@ -65,7 +65,7 @@ import {
   secureRandom,
 } from '../utils';
 
-const moduleName = 'Utils';
+const moduleName = 'Helpers';
 
 export const getChargingStationId = (
   index: number,
index e88a3a5d0e6564a27b88b8a6c36dacb3a970d152..5e0ab0b8f0778c2fbf02333c579657387a5c1d5f 100644 (file)
@@ -1,7 +1,7 @@
 import { type FSWatcher, readFileSync } from 'node:fs';
 
 import type { ChargingStation } from './ChargingStation';
-import { getIdTagsFile } from './Utils';
+import { getIdTagsFile } from './Helpers';
 import { FileType, IdTagDistribution } from '../types';
 import {
   handleFileException,
index 32417cb24557994c091b69dfd3ce0cf045361712..0d15d676495b35fe070171ecc675ac34074477d4 100644 (file)
@@ -10,4 +10,4 @@ export {
   checkChargingStation,
   resetConnectorStatus,
   hasFeatureProfile,
-} from './Utils';
+} from './Helpers';