build(deps-dev): apply updates
[e-mobility-charging-stations-simulator.git] / src / charging-station / IdTagsCache.ts
index f00a558971dad96a44b682150735f823d96fa63f..da4b38bfce79de421343e16f90dd2b6a17e85c6b 100644 (file)
@@ -1,16 +1,16 @@
 import { type FSWatcher, readFileSync } from 'node:fs'
 
-import type { ChargingStation } from './ChargingStation.js'
-import { getIdTagsFile } from './Helpers.js'
 import { FileType, IdTagDistribution } from '../types/index.js'
 import {
   handleFileException,
   isNotEmptyString,
-  logPrefix,
   logger,
+  logPrefix,
   secureRandom,
   watchJsonFile
 } from '../utils/index.js'
+import type { ChargingStation } from './ChargingStation.js'
+import { getIdTagsFile } from './Helpers.js'
 
 interface IdTagsCacheValueType {
   idTags: string[]
@@ -143,8 +143,7 @@ export class IdTagsCache {
               logger.debug(
                 `${this.logPrefix(file)} ${FileType.Authorization} file have changed, reload`
               )
-              this.deleteIdTagsCache(file)
-              this.deleteIdTagsCacheIndexes(file)
+              this.deleteIdTags(file)
             } catch (error) {
               handleFileException(
                 file,
@@ -178,7 +177,7 @@ export class IdTagsCache {
         deleted.push(this.idTagsCachesAddressableIndexes.delete(key))
       }
     }
-    return !deleted.some((value) => !value)
+    return !deleted.some(value => !value)
   }
 
   private getIdTagsCacheIndexesAddressableKey (prefix: string, uid: string): string {