move local car import to bootstrap repo
RENAME
src/integration/car/local/LocalCarIntegration.ts
src/bootstrap/LocalCarCatalogBootstrap.ts
-import { CarCatalog, CarCatalogChargeAlternativeTable, CarCatalogChargeOptionTable, CarCatalogConverter } from '../../../types/Car';
+import { CarCatalog, CarCatalogChargeAlternativeTable, CarCatalogChargeOptionTable, CarCatalogConverter } from '../types/Car';
-import CarStorage from '../../../storage/mongodb/CarStorage';
-import Constants from '../../../utils/Constants';
+import CarStorage from '../storage/mongodb/CarStorage';
+import Constants from '../utils/Constants';
import Jimp from 'jimp';
-import Logging from '../../../utils/Logging';
-import { ServerAction } from '../../../types/Server';
-import Utils from '../../../utils/Utils';
-import { Voltage } from '../../../types/ChargingStation';
+import Logging from '../utils/Logging';
+import { ServerAction } from '../types/Server';
+import Utils from '../utils/Utils';
+import { Voltage } from '../types/ChargingStation';
import fs from 'fs';
-import global from '../../../types/GlobalType';
+import global from '../types/GlobalType';
const MODULE_NAME = 'LocalCarIntegration';
-export default class LocalCarIntegration {
- public static async importLocalCarCatalog() : Promise<void> {
+export default class LocalCarCatalogBootstrap {
+ public static async uploadLocalCarCatalogsFromFile() : Promise<void> {
let created = 0;
try {
const cars = JSON.parse(fs.readFileSync(`${global.appRoot}/assets/cars/cars-definition.json`, 'utf8'));

MODIFY
src/start.ts
src/start.ts
@@ -10,7 +10,7 @@ import Configuration from './utils/Configuration';
import Constants from './utils/Constants';
import I18nManager from './utils/I18nManager';
import JsonCentralSystemServer from './server/ocpp/json/JsonCentralSystemServer';
-import LocalCarIntegration from './integration/car/local/LocalCarIntegration';
+import LocalCarCatalogBootstrap from './bootstrap/LocalCarCatalogBootstrap';
import Logging from './utils/Logging';
import MigrationConfiguration from './types/configuration/MigrationConfiguration';
import MigrationHandler from './migration/MigrationHandler';
@@ -147,7 +147,7 @@ export default class Bootstrap {
// -------------------------------------------------------------------------
startTimeMillis = await this.logAndGetStartTimeMillis('Local car catalogs are being imported...');
// Load and Save the Charging Station templates
- await LocalCarIntegration.importLocalCarCatalog();
+ await LocalCarCatalogBootstrap.uploadLocalCarCatalogsFromFile();
// Log
await this.logDuration(startTimeMillis, 'Local car catalogs has been imported successfully');

move local car import to bootstrap repo