-import fs from 'node:fs';
-import path from 'node:path';
+import { createWriteStream, readdirSync } from 'node:fs';
+import { dirname, join, resolve } from 'node:path';
import { URL, fileURLToPath } from 'node:url';
import type { JSONSchemaType } from 'ajv';
import { Client, type FTPResponse } from 'basic-ftp';
import { URL, fileURLToPath } from 'node:url';
import type { JSONSchemaType } from 'ajv';
import { Client, type FTPResponse } from 'basic-ftp';
import { OCPP16Constants } from './OCPP16Constants';
import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
import { OCPP16Constants } from './OCPP16Constants';
import { OCPP16ServiceUtils } from './OCPP16ServiceUtils';
type OCPP16BootNotificationRequest,
type OCPP16BootNotificationResponse,
type OCPP16CancelReservationRequest,
type OCPP16BootNotificationRequest,
type OCPP16BootNotificationResponse,
type OCPP16CancelReservationRequest,
OCPP16ChargePointErrorCode,
OCPP16ChargePointStatus,
type OCPP16ChargingProfile,
OCPP16ChargePointErrorCode,
OCPP16ChargePointStatus,
type OCPP16ChargingProfile,
- path.join(
- path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../'),
- diagnosticsArchive
- ),
+ join(resolve(dirname(fileURLToPath(import.meta.url)), '../'), diagnosticsArchive),
private async handleRequestCancelReservation(
chargingStation: ChargingStation,
commandPayload: OCPP16CancelReservationRequest
private async handleRequestCancelReservation(
chargingStation: ChargingStation,
commandPayload: OCPP16CancelReservationRequest
return OCPP16Constants.OCPP_CANCEL_RESERVATION_RESPONSE_ACCEPTED;
} catch (error) {
return this.handleIncomingRequestError(
return OCPP16Constants.OCPP_CANCEL_RESERVATION_RESPONSE_ACCEPTED;
} catch (error) {
return this.handleIncomingRequestError(