- run: pnpm install --ignore-scripts
- # - run: pnpm format
- - run: pnpm lint:fix
+ - run: pnpm format
- working-directory: ui/web
run: |
export default {
- '{src,tests}/**/*.{ts,tsx,cts,mts}': [
- // 'prettier --cache --write',
- 'eslint --cache --fix',
- ],
+ '{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'],
}
)
)
logger.info(
- `${this.logPrefix(connectorId)} transaction started with id ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ `${this.logPrefix(connectorId)} transaction started with id ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
this.chargingStation
.getConnectorStatus(connectorId)
?.transactionId?.toString()} and will stop in ${formatDurationMilliSeconds(waitTrxEnd)}`
const connectorStatus = this.chargingStation.getConnectorStatus(connectorId)
if (connectorStatus?.transactionStarted === true) {
logger.info(
- `${this.logPrefix(connectorId)} entered in transaction loop while a transaction ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ `${this.logPrefix(connectorId)} entered in transaction loop while a transaction ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
connectorStatus.transactionId?.toString()} is already started on connector ${connectorId.toString()}`
)
return false
while (connectorStatus?.transactionStarted === true) {
if (!logged) {
logger.info(
- `${this.logPrefix(connectorId)} transaction loop waiting for started transaction ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ `${this.logPrefix(connectorId)} transaction loop waiting for started transaction ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
connectorStatus.transactionId?.toString()} on connector ${connectorId.toString()} to be stopped`
)
logged = true
chalk.green(
`Charging stations simulator ${this.version} started with ${this.numberOfConfiguredChargingStations.toString()} configured and ${this.numberOfProvisionedChargingStations.toString()} provisioned charging station(s) from ${this.numberOfChargingStationTemplates.toString()} charging station template(s) and ${
Configuration.workerDynamicPoolInUse()
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
- ? `${workerConfiguration.poolMinSize?.toString()}/`
+ ? // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ `${workerConfiguration.poolMinSize?.toString()}/`
: ''
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
}${this.workerImplementation?.size.toString()}${
Configuration.workerPoolInUse()
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
- ? `/${workerConfiguration.poolMaxSize?.toString()}`
+ ? // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ `/${workerConfiguration.poolMaxSize?.toString()}`
: ''
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
} worker(s) concurrently running in '${workerConfiguration.processType}' mode${
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
isNaN(connectorAmperageLimitationLimit!)
? Number.POSITIVE_INFINITY
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- : connectorAmperageLimitationLimit!,
+ : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ connectorAmperageLimitationLimit!,
isNaN(chargingStationChargingProfilesLimit)
? Number.POSITIVE_INFINITY
: chargingStationChargingProfilesLimit,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
isNaN(connectorChargingProfilesLimit!)
? Number.POSITIVE_INFINITY
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- : connectorChargingProfilesLimit!
+ : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ connectorChargingProfilesLimit!
)
}
for (const connectorId of connectors.keys()) {
if (connectorId > 0 && connectors.get(connectorId)?.transactionStarted === true) {
logger.warn(
- `${logPrefix} Connector id ${connectorId.toString()} at initialization has a transaction started with id ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ `${logPrefix} Connector id ${connectorId.toString()} at initialization has a transaction started with id ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
connectors.get(connectorId)?.transactionId?.toString()}`
)
}
case CurrentType.DC:
return chargingProfile.chargingSchedule.chargingRateUnit === ChargingRateUnitType.WATT
? limit
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- : DCElectricUtils.power(chargingStation.stationInfo.voltageOut!, limit)
+ : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ DCElectricUtils.power(chargingStation.stationInfo.voltageOut!, limit)
default:
logger.error(
`${chargingStation.logPrefix()} ${moduleName}.buildChargingProfilesLimit: ${errorMsg}`
`${chargingStation.logPrefix()} MeterValues measurand ${
meterValue.sampledValue[sampledValuesIndex].measurand ??
MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER
- }: connector id ${connectorId.toString()}, transaction id ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ }: connector id ${connectorId.toString()}, transaction id ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
connector?.transactionId?.toString()}, value: ${socMinimumValue.toString()}/${
meterValue.sampledValue[sampledValuesIndex].value
}/${socMaximumValue.toString()}`
`${chargingStation.logPrefix()} MeterValues measurand ${
meterValue.sampledValue[sampledValuesIndex].measurand ??
MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER
- }: connector id ${connectorId.toString()}, transaction id ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ }: connector id ${connectorId.toString()}, transaction id ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
connector?.transactionId?.toString()}, value: ${connectorMinimumPowerRounded.toString()}/${
meterValue.sampledValue[sampledValuesIndex].value
}/${connectorMaximumPowerRounded.toString()}`
}: phase ${
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
meterValue.sampledValue[sampledValuesPerPhaseIndex].phase
- }, connector id ${connectorId.toString()}, transaction id ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ }, connector id ${connectorId.toString()}, transaction id ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
connector?.transactionId?.toString()}, value: ${connectorMinimumPowerPerPhaseRounded.toString()}/${
meterValue.sampledValue[sampledValuesPerPhaseIndex].value
}/${connectorMaximumPowerPerPhaseRounded.toString()}`
`${chargingStation.logPrefix()} MeterValues measurand ${
meterValue.sampledValue[sampledValuesIndex].measurand ??
MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER
- }: connector id ${connectorId.toString()}, transaction id ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ }: connector id ${connectorId.toString()}, transaction id ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
connector?.transactionId?.toString()}, value: ${connectorMinimumAmperage.toString()}/${
meterValue.sampledValue[sampledValuesIndex].value
}/${connectorMaximumAmperage.toString()}`
}: phase ${
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
meterValue.sampledValue[sampledValuesPerPhaseIndex].phase
- }, connector id ${connectorId.toString()}, transaction id ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ }, connector id ${connectorId.toString()}, transaction id ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
connector?.transactionId?.toString()}, value: ${connectorMinimumAmperage.toString()}/${
meterValue.sampledValue[sampledValuesPerPhaseIndex].value
}/${connectorMaximumAmperage.toString()}`
`${chargingStation.logPrefix()} MeterValues measurand ${
meterValue.sampledValue[sampledValuesIndex].measurand ??
MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER
- }: connector id ${connectorId.toString()}, transaction id ${
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
+ }: connector id ${connectorId.toString()}, transaction id ${// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
connector?.transactionId?.toString()}, value: ${connectorMinimumEnergyRounded.toString()}/${energyValueRounded.toString()}/${connectorMaximumEnergyRounded.toString()}, duration: ${interval.toString()}ms`
)
}