repositories
/
e-mobility-charging-stations-simulator.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a223d9b
)
refactor: refine prettier configuration
author
Jérôme Benoit
<jerome.benoit@sap.com>
Fri, 12 Jan 2024 17:48:24 +0000
(18:48 +0100)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Fri, 12 Jan 2024 17:48:24 +0000
(18:48 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
34 files changed:
.prettierrc.json
patch
|
blob
|
blame
|
history
src/charging-station/Bootstrap.ts
patch
|
blob
|
blame
|
history
src/charging-station/ChargingStation.ts
patch
|
blob
|
blame
|
history
src/charging-station/ConfigurationKeyUtils.ts
patch
|
blob
|
blame
|
history
src/charging-station/Helpers.ts
patch
|
blob
|
blame
|
history
src/charging-station/IdTagsCache.ts
patch
|
blob
|
blame
|
history
src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
patch
|
blob
|
blame
|
history
src/charging-station/ocpp/OCPPServiceUtils.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/UIHttpServer.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/UIWebSocketServer.ts
patch
|
blob
|
blame
|
history
src/charging-station/ui-server/ui-services/AbstractUIService.ts
patch
|
blob
|
blame
|
history
src/performance/PerformanceStatistics.ts
patch
|
blob
|
blame
|
history
src/performance/storage/JsonFileStorage.ts
patch
|
blob
|
blame
|
history
src/utils/AsyncLock.ts
patch
|
blob
|
blame
|
history
src/utils/ChargingStationConfigurationUtils.ts
patch
|
blob
|
blame
|
history
src/utils/Configuration.ts
patch
|
blob
|
blame
|
history
src/utils/Utils.ts
patch
|
blob
|
blame
|
history
src/worker/WorkerSet.ts
patch
|
blob
|
blame
|
history
src/worker/WorkerUtils.ts
patch
|
blob
|
blame
|
history
ui/web/.eslintrc.cjs
patch
|
blob
|
blame
|
history
ui/web/.lintstagedrc.js
patch
|
blob
|
blame
|
history
ui/web/.prettierrc.json
patch
|
blob
|
blame
|
history
ui/web/src/assets/config.ts
patch
|
blob
|
blame
|
history
ui/web/src/composables/UIClient.ts
patch
|
blob
|
blame
|
history
ui/web/src/router/index.ts
patch
|
blob
|
blame
|
history
ui/web/src/types/ChargingStationType.ts
patch
|
blob
|
blame
|
history
ui/web/src/types/UIProtocol.ts
patch
|
blob
|
blame
|
history
ui/web/src/types/index.ts
patch
|
blob
|
blame
|
history
ui/web/src/views/ChargingStationsView.vue
patch
|
blob
|
blame
|
history
ui/web/tests/unit/CSTable.spec.ts
patch
|
blob
|
blame
|
history
ui/web/vite.config.ts
patch
|
blob
|
blame
|
history
ui/web/vitest.config.ts
patch
|
blob
|
blame
|
history
diff --git
a/.prettierrc.json
b/.prettierrc.json
index 6632aaeb6873d9f1edf3b4ab3cbe617ab8ec283a..066e89fcd2212b26dc027ef6abfb85510c9bae0f 100644
(file)
--- a/
.prettierrc.json
+++ b/
.prettierrc.json
@@
-1,7
+1,8
@@
{
"$schema": "https://json.schemastore.org/prettierrc",
"printWidth": 100,
{
"$schema": "https://json.schemastore.org/prettierrc",
"printWidth": 100,
- "
semi": false
,
+ "
arrowParens": "avoid"
,
"singleQuote": true,
"singleQuote": true,
+ "semi": false,
"trailingComma": "none"
}
"trailingComma": "none"
}
diff --git
a/src/charging-station/Bootstrap.ts
b/src/charging-station/Bootstrap.ts
index 04205db6f0ee3852e9c2b0d2c7b20cfe7c57d135..c0dc2b3d2ff22aaeefdc221d3ccab4dce8ebc7ac 100644
(file)
--- a/
src/charging-station/Bootstrap.ts
+++ b/
src/charging-station/Bootstrap.ts
@@
-424,7
+424,7
@@
export class Bootstrap extends EventEmitter {
exit(exitCodes.gracefulShutdownError)
})
})
exit(exitCodes.gracefulShutdownError)
})
})
- .catch(
(error)
=> {
+ .catch(
error
=> {
console.error(chalk.red('Error while shutdowning charging stations simulator: '), error)
exit(exitCodes.gracefulShutdownError)
})
console.error(chalk.red('Error while shutdowning charging stations simulator: '), error)
exit(exitCodes.gracefulShutdownError)
})
diff --git
a/src/charging-station/ChargingStation.ts
b/src/charging-station/ChargingStation.ts
index ca8a82a5f33cc3daeebb16448dc19436ea0ad363..9efe7b3087fac1a46136255fe050e88966ba00a0 100644
(file)
--- a/
src/charging-station/ChargingStation.ts
+++ b/
src/charging-station/ChargingStation.ts
@@
-518,7
+518,7
@@
export class ChargingStation extends EventEmitter {
this.heartbeatSetInterval = setInterval(() => {
this.ocppRequestService
.requestHandler<HeartbeatRequest, HeartbeatResponse>(this, RequestCommand.HEARTBEAT)
this.heartbeatSetInterval = setInterval(() => {
this.ocppRequestService
.requestHandler<HeartbeatRequest, HeartbeatResponse>(this, RequestCommand.HEARTBEAT)
- .catch(
(error)
=> {
+ .catch(
error
=> {
logger.error(
`${this.logPrefix()} Error while sending '${RequestCommand.HEARTBEAT}':`,
error
logger.error(
`${this.logPrefix()} Error while sending '${RequestCommand.HEARTBEAT}':`,
error
@@
-603,7
+603,7
@@
export class ChargingStation extends EventEmitter {
meterValue: [meterValue]
}
)
meterValue: [meterValue]
}
)
- .catch(
(error)
=> {
+ .catch(
error
=> {
logger.error(
`${this.logPrefix()} Error while sending '${RequestCommand.METER_VALUES}':`,
error
logger.error(
`${this.logPrefix()} Error while sending '${RequestCommand.METER_VALUES}':`,
error
@@
-1264,7
+1264,7
@@
export class ChargingStation extends EventEmitter {
this.initializeOcppConfiguration()
this.initializeOcppServices()
this.once(ChargingStationEvents.accepted, () => {
this.initializeOcppConfiguration()
this.initializeOcppServices()
this.once(ChargingStationEvents.accepted, () => {
- this.startMessageSequence().catch(
(error)
=> {
+ this.startMessageSequence().catch(
error
=> {
logger.error(`${this.logPrefix()} Error while starting the message sequence:`, error)
})
})
logger.error(`${this.logPrefix()} Error while starting the message sequence:`, error)
})
})
@@
-1710,7
+1710,7
@@
export class ChargingStation extends EventEmitter {
this.sharedLRUCache.deleteChargingStationConfiguration(this.configurationFileHash)
this.sharedLRUCache.setChargingStationConfiguration(configurationData)
this.configurationFileHash = configurationHash
this.sharedLRUCache.deleteChargingStationConfiguration(this.configurationFileHash)
this.sharedLRUCache.setChargingStationConfiguration(configurationData)
this.configurationFileHash = configurationHash
- }).catch(
(error)
=> {
+ }).catch(
error
=> {
handleFileException(
this.configurationFile,
FileType.ChargingStationConfiguration,
handleFileException(
this.configurationFile,
FileType.ChargingStationConfiguration,
diff --git
a/src/charging-station/ConfigurationKeyUtils.ts
b/src/charging-station/ConfigurationKeyUtils.ts
index bb0d9978cc7d110330b271ca685160fcdf2ecd1a..075a497988ae2f5375a665568be67bd7fe8dae82 100644
(file)
--- a/
src/charging-station/ConfigurationKeyUtils.ts
+++ b/
src/charging-station/ConfigurationKeyUtils.ts
@@
-21,7
+21,7
@@
export const getConfigurationKey = (
key: ConfigurationKeyType,
caseInsensitive = false
): ConfigurationKey | undefined => {
key: ConfigurationKeyType,
caseInsensitive = false
): ConfigurationKey | undefined => {
- return chargingStation.ocppConfiguration?.configurationKey?.find(
(configElement)
=> {
+ return chargingStation.ocppConfiguration?.configurationKey?.find(
configElement
=> {
if (caseInsensitive) {
return configElement.key.toLowerCase() === key.toLowerCase()
}
if (caseInsensitive) {
return configElement.key.toLowerCase() === key.toLowerCase()
}
diff --git
a/src/charging-station/Helpers.ts
b/src/charging-station/Helpers.ts
index c2694498ecec09789f5fa02f6bbfd62cabc4d5d4..f15bb0847116696e88413b55bd16752479ff4b44 100644
(file)
--- a/
src/charging-station/Helpers.ts
+++ b/
src/charging-station/Helpers.ts
@@
-374,7
+374,7
@@
export const resetConnectorStatus = (connectorStatus: ConnectorStatus | undefine
connectorStatus.chargingProfiles =
connectorStatus.transactionId != null && isNotEmptyArray(connectorStatus.chargingProfiles)
? connectorStatus.chargingProfiles?.filter(
connectorStatus.chargingProfiles =
connectorStatus.transactionId != null && isNotEmptyArray(connectorStatus.chargingProfiles)
? connectorStatus.chargingProfiles?.filter(
-
(chargingProfile)
=> chargingProfile.transactionId !== connectorStatus.transactionId
+
chargingProfile
=> chargingProfile.transactionId !== connectorStatus.transactionId
)
: []
connectorStatus.idTagLocalAuthorized = false
)
: []
connectorStatus.idTagLocalAuthorized = false
@@
-662,7
+662,7
@@
export const waitChargingStationEvents = async (
event: ChargingStationWorkerMessageEvents,
eventsToWait: number
): Promise<number> => {
event: ChargingStationWorkerMessageEvents,
eventsToWait: number
): Promise<number> => {
- return await new Promise<number>(
(resolve)
=> {
+ return await new Promise<number>(
resolve
=> {
let events = 0
if (eventsToWait === 0) {
resolve(events)
let events = 0
if (eventsToWait === 0) {
resolve(events)
diff --git
a/src/charging-station/IdTagsCache.ts
b/src/charging-station/IdTagsCache.ts
index f00a558971dad96a44b682150735f823d96fa63f..d1ad32d2bbffe63aa4d091fe11fecce1af0db165 100644
(file)
--- a/
src/charging-station/IdTagsCache.ts
+++ b/
src/charging-station/IdTagsCache.ts
@@
-178,7
+178,7
@@
export class IdTagsCache {
deleted.push(this.idTagsCachesAddressableIndexes.delete(key))
}
}
deleted.push(this.idTagsCachesAddressableIndexes.delete(key))
}
}
- return !deleted.some(
(value)
=> !value)
+ return !deleted.some(
value
=> !value)
}
private getIdTagsCacheIndexesAddressableKey (prefix: string, uid: string): string {
}
private getIdTagsCacheIndexesAddressableKey (prefix: string, uid: string): string {
diff --git
a/src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
b/src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
index 3e34782f47a7d3d440bdf5719a899121a412ff4f..3a0c75b7d7e7ac19bce1cb255e320b7b4d35c5b0 100644
(file)
--- a/
src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
+++ b/
src/charging-station/broadcast-channel/UIServiceWorkerBroadcastChannel.ts
@@
-78,7
+78,7
@@
export class UIServiceWorkerBroadcastChannel extends WorkerBroadcastChannel {
}
return undefined
})
}
return undefined
})
- .filter(
(hashId)
=> hashId != null) as string[],
+ .filter(
hashId
=> hashId != null) as string[],
...(responsesStatus === ResponseStatus.FAILURE && {
hashIdsFailed: this.responses
.get(uuid)
...(responsesStatus === ResponseStatus.FAILURE && {
hashIdsFailed: this.responses
.get(uuid)
@@
-88,18
+88,18
@@
export class UIServiceWorkerBroadcastChannel extends WorkerBroadcastChannel {
}
return undefined
})
}
return undefined
})
- .filter(
(hashId)
=> hashId != null) as string[]
+ .filter(
hashId
=> hashId != null) as string[]
}),
...(responsesStatus === ResponseStatus.FAILURE && {
responsesFailed: this.responses
.get(uuid)
}),
...(responsesStatus === ResponseStatus.FAILURE && {
responsesFailed: this.responses
.get(uuid)
- ?.responses.map(
(response)
=> {
+ ?.responses.map(
response
=> {
if (response.status === ResponseStatus.FAILURE) {
return response
}
return undefined
})
if (response.status === ResponseStatus.FAILURE) {
return response
}
return undefined
})
- .filter(
(response)
=> response != null) as BroadcastChannelResponsePayload[]
+ .filter(
response
=> response != null) as BroadcastChannelResponsePayload[]
})
}
}
})
}
}
diff --git
a/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
b/src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
index d4b3c6302cd13e18e402a165e7cbcf699d4a875a..9d661dc605b4d5965e70e772cda2d494ee751d56 100644
(file)
--- a/
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
+++ b/
src/charging-station/ocpp/1.6/OCPP16IncomingRequestService.ts
@@
-1290,8
+1290,8
@@
export class OCPP16IncomingRequestService extends OCPPIncomingRequestService {
let ftpClient: Client | undefined
try {
const logFiles = readdirSync(resolve(dirname(fileURLToPath(import.meta.url)), '../'))
let ftpClient: Client | undefined
try {
const logFiles = readdirSync(resolve(dirname(fileURLToPath(import.meta.url)), '../'))
- .filter(
(file)
=> file.endsWith('.log'))
- .map(
(file)
=> join('./', file))
+ .filter(
file
=> file.endsWith('.log'))
+ .map(
file
=> join('./', file))
const diagnosticsArchive = `${chargingStation.stationInfo?.chargingStationId}_logs.tar.gz`
create({ gzip: true }, logFiles).pipe(createWriteStream(diagnosticsArchive))
ftpClient = new Client()
const diagnosticsArchive = `${chargingStation.stationInfo?.chargingStationId}_logs.tar.gz`
create({ gzip: true }, logFiles).pipe(createWriteStream(diagnosticsArchive))
ftpClient = new Client()
@@
-1303,7
+1303,7
@@
export class OCPP16IncomingRequestService extends OCPPIncomingRequestService {
})
let uploadResponse: FTPResponse | undefined
if (accessResponse.code === 220) {
})
let uploadResponse: FTPResponse | undefined
if (accessResponse.code === 220) {
- ftpClient.trackProgress(
(info)
=> {
+ ftpClient.trackProgress(
info
=> {
logger.info(
`${chargingStation.logPrefix()} ${moduleName}.handleRequestGetDiagnostics: ${
info.bytes / 1024
logger.info(
`${chargingStation.logPrefix()} ${moduleName}.handleRequestGetDiagnostics: ${
info.bytes / 1024
@@
-1316,7
+1316,7
@@
export class OCPP16IncomingRequestService extends OCPPIncomingRequestService {
>(chargingStation, OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION, {
status: OCPP16DiagnosticsStatus.Uploading
})
>(chargingStation, OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION, {
status: OCPP16DiagnosticsStatus.Uploading
})
- .catch(
(error)
=> {
+ .catch(
error
=> {
logger.error(
`${chargingStation.logPrefix()} ${moduleName}.handleRequestGetDiagnostics: Error while sending '${
OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION
logger.error(
`${chargingStation.logPrefix()} ${moduleName}.handleRequestGetDiagnostics: Error while sending '${
OCPP16RequestCommand.DIAGNOSTICS_STATUS_NOTIFICATION
@@
-1418,7
+1418,7
@@
export class OCPP16IncomingRequestService extends OCPPIncomingRequestService {
chargingStation.bootNotificationRequest,
{ skipBufferingOnError: true, triggerMessage: true }
)
chargingStation.bootNotificationRequest,
{ skipBufferingOnError: true, triggerMessage: true }
)
- .then(
(response)
=> {
+ .then(
response
=> {
chargingStation.bootNotificationResponse = response
})
.catch(Constants.EMPTY_FUNCTION)
chargingStation.bootNotificationResponse = response
})
.catch(Constants.EMPTY_FUNCTION)
diff --git
a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
index 570708b74be0ba7f30b9f243bc613ccbe25dd584..1f119a2e4753fb476bb6ee1ddf8e13e5e96cfd8c 100644
(file)
--- a/
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
+++ b/
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
@@
-293,7
+293,7
@@
export class OCPP16ServiceUtils extends OCPPServiceUtils {
),
chargingSchedulePeriod: [
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
),
chargingSchedulePeriod: [
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- ...compositeChargingScheduleHigher!.chargingSchedulePeriod.map(
(schedulePeriod)
=> {
+ ...compositeChargingScheduleHigher!.chargingSchedulePeriod.map(
schedulePeriod
=> {
return {
...schedulePeriod,
startPeriod: higherFirst
return {
...schedulePeriod,
startPeriod: higherFirst
@@
-306,7
+306,7
@@
export class OCPP16ServiceUtils extends OCPPServiceUtils {
}
}),
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
}
}),
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- ...compositeChargingScheduleLower!.chargingSchedulePeriod.map(
(schedulePeriod)
=> {
+ ...compositeChargingScheduleLower!.chargingSchedulePeriod.map(
schedulePeriod
=> {
return {
...schedulePeriod,
startPeriod: higherFirst
return {
...schedulePeriod,
startPeriod: higherFirst
@@
-339,7
+339,7
@@
export class OCPP16ServiceUtils extends OCPPServiceUtils {
),
chargingSchedulePeriod: [
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
),
chargingSchedulePeriod: [
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- ...compositeChargingScheduleHigher!.chargingSchedulePeriod.map(
(schedulePeriod)
=> {
+ ...compositeChargingScheduleHigher!.chargingSchedulePeriod.map(
schedulePeriod
=> {
return {
...schedulePeriod,
startPeriod: higherFirst
return {
...schedulePeriod,
startPeriod: higherFirst
@@
-544,7
+544,7
@@
export class OCPP16ServiceUtils extends OCPPServiceUtils {
compositeInterval.end as Date,
chargingScheduleInterval.start
),
compositeInterval.end as Date,
chargingScheduleInterval.start
),
- chargingSchedulePeriod: chargingSchedule.chargingSchedulePeriod.filter(
(schedulePeriod)
=>
+ chargingSchedulePeriod: chargingSchedule.chargingSchedulePeriod.filter(
schedulePeriod
=>
isWithinInterval(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod)!,
isWithinInterval(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
addSeconds(chargingScheduleInterval.start, schedulePeriod.startPeriod)!,
diff --git
a/src/charging-station/ocpp/OCPPServiceUtils.ts
b/src/charging-station/ocpp/OCPPServiceUtils.ts
index 8c4c9479a42edfc727e05241e6523fa6f36348e8..6a2e28ac50e80272fd24f225239f61c6d9196a9a 100644
(file)
--- a/
src/charging-station/ocpp/OCPPServiceUtils.ts
+++ b/
src/charging-station/ocpp/OCPPServiceUtils.ts
@@
-142,7
+142,7
@@
const isIdTagLocalAuthorized = (chargingStation: ChargingStation, idTag: string)
chargingStation.idTagsCache
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
.getIdTags(getIdTagsFile(chargingStation.stationInfo!)!)
chargingStation.idTagsCache
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
.getIdTags(getIdTagsFile(chargingStation.stationInfo!)!)
- ?.find(
(tag)
=> tag === idTag)
+ ?.find(
tag
=> tag === idTag)
)
)
}
)
)
}
@@
-206,11
+206,11
@@
const checkConnectorStatusTransition = (
if (
(connectorId === 0 &&
OCPP16Constants.ChargePointStatusChargingStationTransitions.findIndex(
if (
(connectorId === 0 &&
OCPP16Constants.ChargePointStatusChargingStationTransitions.findIndex(
-
(transition)
=> transition.from === fromStatus && transition.to === status
+
transition
=> transition.from === fromStatus && transition.to === status
) !== -1) ||
(connectorId > 0 &&
OCPP16Constants.ChargePointStatusConnectorTransitions.findIndex(
) !== -1) ||
(connectorId > 0 &&
OCPP16Constants.ChargePointStatusConnectorTransitions.findIndex(
-
(transition)
=> transition.from === fromStatus && transition.to === status
+
transition
=> transition.from === fromStatus && transition.to === status
) !== -1)
) {
transitionAllowed = true
) !== -1)
) {
transitionAllowed = true
@@
-221,11
+221,11
@@
const checkConnectorStatusTransition = (
if (
(connectorId === 0 &&
OCPP20Constants.ChargingStationStatusTransitions.findIndex(
if (
(connectorId === 0 &&
OCPP20Constants.ChargingStationStatusTransitions.findIndex(
-
(transition)
=> transition.from === fromStatus && transition.to === status
+
transition
=> transition.from === fromStatus && transition.to === status
) !== -1) ||
(connectorId > 0 &&
OCPP20Constants.ConnectorStatusTransitions.findIndex(
) !== -1) ||
(connectorId > 0 &&
OCPP20Constants.ConnectorStatusTransitions.findIndex(
-
(transition)
=> transition.from === fromStatus && transition.to === status
+
transition
=> transition.from === fromStatus && transition.to === status
) !== -1)
) {
transitionAllowed = true
) !== -1)
) {
transitionAllowed = true
diff --git
a/src/charging-station/ui-server/UIHttpServer.ts
b/src/charging-station/ui-server/UIHttpServer.ts
index eac654ee822ea1773d1c1427ae7d04ed997771a7..eb3550830682f45cff76aff8559df71b34e855f5 100644
(file)
--- a/
src/charging-station/ui-server/UIHttpServer.ts
+++ b/
src/charging-station/ui-server/UIHttpServer.ts
@@
-80,7
+80,7
@@
export class UIHttpServer extends AbstractUIServer {
}
private requestListener (req: IncomingMessage, res: ServerResponse): void {
}
private requestListener (req: IncomingMessage, res: ServerResponse): void {
- this.authenticate(req,
(err)
=> {
+ this.authenticate(req,
err
=> {
if (err != null) {
res
.writeHead(StatusCodes.UNAUTHORIZED, {
if (err != null) {
res
.writeHead(StatusCodes.UNAUTHORIZED, {
@@
-106,7
+106,7
@@
export class UIHttpServer extends AbstractUIServer {
throw new BaseError(`Unsupported UI protocol version: '${fullProtocol}'`)
}
this.registerProtocolVersionUIService(version)
throw new BaseError(`Unsupported UI protocol version: '${fullProtocol}'`)
}
this.registerProtocolVersionUIService(version)
- req.on('error',
(error)
=> {
+ req.on('error',
error
=> {
logger.error(
`${this.logPrefix(moduleName, 'requestListener.req.onerror')} Error on HTTP request:`,
error
logger.error(
`${this.logPrefix(moduleName, 'requestListener.req.onerror')} Error on HTTP request:`,
error
diff --git
a/src/charging-station/ui-server/UIWebSocketServer.ts
b/src/charging-station/ui-server/UIWebSocketServer.ts
index c135cb13859d09d212a8bda3060f6c95f7729c01..42162d16556c47cec0c0b7805f77fc36d3ac7f99 100644
(file)
--- a/
src/charging-station/ui-server/UIWebSocketServer.ts
+++ b/
src/charging-station/ui-server/UIWebSocketServer.ts
@@
-47,7
+47,7
@@
export class UIWebSocketServer extends AbstractUIServer {
}
const [, version] = UIServerUtils.getProtocolAndVersion(ws.protocol)
this.registerProtocolVersionUIService(version)
}
const [, version] = UIServerUtils.getProtocolAndVersion(ws.protocol)
this.registerProtocolVersionUIService(version)
- ws.on('message',
(rawData)
=> {
+ ws.on('message',
rawData
=> {
const request = this.validateRawDataRequest(rawData)
if (request === false) {
ws.close(WebSocketCloseEventStatusCode.CLOSE_INVALID_PAYLOAD)
const request = this.validateRawDataRequest(rawData)
if (request === false) {
ws.close(WebSocketCloseEventStatusCode.CLOSE_INVALID_PAYLOAD)
@@
-65,7
+65,7
@@
export class UIWebSocketServer extends AbstractUIServer {
})
.catch(Constants.EMPTY_FUNCTION)
})
})
.catch(Constants.EMPTY_FUNCTION)
})
- ws.on('error',
(error)
=> {
+ ws.on('error',
error
=> {
logger.error(`${this.logPrefix(moduleName, 'start.ws.onerror')} WebSocket error:`, error)
})
ws.on('close', (code, reason) => {
logger.error(`${this.logPrefix(moduleName, 'start.ws.onerror')} WebSocket error:`, error)
})
ws.on('close', (code, reason) => {
@@
-86,7
+86,7
@@
export class UIWebSocketServer extends AbstractUIServer {
}
})
this.httpServer.on('upgrade', (req: IncomingMessage, socket: Duplex, head: Buffer): void => {
}
})
this.httpServer.on('upgrade', (req: IncomingMessage, socket: Duplex, head: Buffer): void => {
- this.authenticate(req,
(err)
=> {
+ this.authenticate(req,
err
=> {
if (err != null) {
socket.write(`HTTP/1.1 ${StatusCodes.UNAUTHORIZED} Unauthorized\r\n\r\n`)
socket.destroy()
if (err != null) {
socket.write(`HTTP/1.1 ${StatusCodes.UNAUTHORIZED} Unauthorized\r\n\r\n`)
socket.destroy()
diff --git
a/src/charging-station/ui-server/ui-services/AbstractUIService.ts
b/src/charging-station/ui-server/ui-services/AbstractUIService.ts
index 799a6651b23eb7a1089283997bd05cec56e639f7..c0a7c7997974f0027b94189e276ed23f6a93bcf2 100644
(file)
--- a/
src/charging-station/ui-server/ui-services/AbstractUIService.ts
+++ b/
src/charging-station/ui-server/ui-services/AbstractUIService.ts
@@
-163,7
+163,7
@@
export abstract class AbstractUIService {
): void {
if (isNotEmptyArray(payload.hashIds)) {
payload.hashIds = payload.hashIds
): void {
if (isNotEmptyArray(payload.hashIds)) {
payload.hashIds = payload.hashIds
- ?.map(
(hashId)
=> {
+ ?.map(
hashId
=> {
if (this.uiServer.chargingStations.has(hashId)) {
return hashId
}
if (this.uiServer.chargingStations.has(hashId)) {
return hashId
}
@@
-175,7
+175,7
@@
export abstract class AbstractUIService {
)
return undefined
})
)
return undefined
})
- .filter(
(hashId)
=> hashId != null) as string[]
+ .filter(
hashId
=> hashId != null) as string[]
} else {
delete payload.hashIds
}
} else {
delete payload.hashIds
}
diff --git
a/src/performance/PerformanceStatistics.ts
b/src/performance/PerformanceStatistics.ts
index 2f10960604a8429a5a059b62d2ed46d44c2bb241..e8740d29fa511de737570328dcdfbd025e838c84 100644
(file)
--- a/
src/performance/PerformanceStatistics.ts
+++ b/
src/performance/PerformanceStatistics.ts
@@
-190,7
+190,7
@@
export class PerformanceStatistics {
}
private initializePerformanceObserver (): void {
}
private initializePerformanceObserver (): void {
- this.performanceObserver = new PerformanceObserver(
(performanceObserverList)
=> {
+ this.performanceObserver = new PerformanceObserver(
performanceObserverList
=> {
const lastPerformanceEntry = performanceObserverList.getEntries()[0]
// logger.debug(
// `${this.logPrefix()} '${lastPerformanceEntry.name}' performance entry: %j`,
const lastPerformanceEntry = performanceObserverList.getEntries()[0]
// logger.debug(
// `${this.logPrefix()} '${lastPerformanceEntry.name}' performance entry: %j`,
diff --git
a/src/performance/storage/JsonFileStorage.ts
b/src/performance/storage/JsonFileStorage.ts
index f44d9f2b35adc56ca0d9d503e927ccfac6eae760..f4a888143ff60c23b682b0be9b6215c5af779beb 100644
(file)
--- a/
src/performance/storage/JsonFileStorage.ts
+++ b/
src/performance/storage/JsonFileStorage.ts
@@
-34,7
+34,7
@@
export class JsonFileStorage extends Storage {
0,
'utf8'
)
0,
'utf8'
)
- }).catch(
(error)
=> {
+ }).catch(
error
=> {
handleFileException(
this.dbName,
FileType.PerformanceRecords,
handleFileException(
this.dbName,
FileType.PerformanceRecords,
diff --git
a/src/utils/AsyncLock.ts
b/src/utils/AsyncLock.ts
index c6b35b84457fa9f090b002417e4cbdfeb32cfb5e..099aac15bd72a140157a967e7d3f5648b74672f3 100644
(file)
--- a/
src/utils/AsyncLock.ts
+++ b/
src/utils/AsyncLock.ts
@@
-35,7
+35,7
@@
export class AsyncLock {
asyncLock.acquired = true
return
}
asyncLock.acquired = true
return
}
- await new Promise<void>(
(resolve)
=> {
+ await new Promise<void>(
resolve
=> {
asyncLock.resolveQueue.enqueue(resolve)
})
}
asyncLock.resolveQueue.enqueue(resolve)
})
}
@@
-48,7
+48,7
@@
export class AsyncLock {
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const queuedResolve = asyncLock.resolveQueue.dequeue()!
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const queuedResolve = asyncLock.resolveQueue.dequeue()!
- await new Promise<void>(
(resolve)
=> {
+ await new Promise<void>(
resolve
=> {
queuedResolve()
resolve()
})
queuedResolve()
resolve()
})
diff --git
a/src/utils/ChargingStationConfigurationUtils.ts
b/src/utils/ChargingStationConfigurationUtils.ts
index fc8fc9014644ee0e87c978680c6b7ee603c06901..0e32c7e629b28bfa3ade6eba052272130877a8ea 100644
(file)
--- a/
src/utils/ChargingStationConfigurationUtils.ts
+++ b/
src/utils/ChargingStationConfigurationUtils.ts
@@
-35,7
+35,7
@@
export const buildEvsesStatus = (
outputFormat: OutputFormat = OutputFormat.configuration
): Array<EvseStatusWorkerType | EvseStatusConfiguration> => {
// eslint-disable-next-line array-callback-return
outputFormat: OutputFormat = OutputFormat.configuration
): Array<EvseStatusWorkerType | EvseStatusConfiguration> => {
// eslint-disable-next-line array-callback-return
- return [...chargingStation.evses.values()].map(
(evseStatus)
=> {
+ return [...chargingStation.evses.values()].map(
evseStatus
=> {
const connectorsStatus = [...evseStatus.connectors.values()].map(
({ transactionSetInterval, ...connectorStatusRest }) => connectorStatusRest
)
const connectorsStatus = [...evseStatus.connectors.values()].map(
({ transactionSetInterval, ...connectorStatusRest }) => connectorStatusRest
)
diff --git
a/src/utils/Configuration.ts
b/src/utils/Configuration.ts
index 596b685cbf7be0636f4ec7a0ba74c0668bf0c16b..dc3ca595273d523a4dff6a12d2da26270e2cb3f7 100644
(file)
--- a/
src/utils/Configuration.ts
+++ b/
src/utils/Configuration.ts
@@
-559,7
+559,7
@@
export class Configuration {
Configuration.configurationSectionCache.clear()
if (Configuration.configurationChangeCallback !== undefined) {
Configuration.configurationChangeCallback()
Configuration.configurationSectionCache.clear()
if (Configuration.configurationChangeCallback !== undefined) {
Configuration.configurationChangeCallback()
- .catch(
(error)
=> {
+ .catch(
error
=> {
throw typeof error === 'string' ? new Error(error) : error
})
.finally(() => {
throw typeof error === 'string' ? new Error(error) : error
})
.finally(() => {
diff --git
a/src/utils/Utils.ts
b/src/utils/Utils.ts
index b8083596b2618a3b5c2360d15a4fc6542a00c9dd..df802f3ebe98530c5a3568f36dfc2adde28a74c0 100644
(file)
--- a/
src/utils/Utils.ts
+++ b/
src/utils/Utils.ts
@@
-29,7
+29,7
@@
export const validateUUID = (uuid: string): boolean => {
}
export const sleep = async (milliSeconds: number): Promise<NodeJS.Timeout> => {
}
export const sleep = async (milliSeconds: number): Promise<NodeJS.Timeout> => {
- return await new Promise<NodeJS.Timeout>(
(resolve)
=>
+ return await new Promise<NodeJS.Timeout>(
resolve
=>
setTimeout(resolve as () => void, milliSeconds)
)
}
setTimeout(resolve as () => void, milliSeconds)
)
}
@@
-203,7
+203,7
@@
export const getRandomFloatFluctuatedRounded = (
}
export const extractTimeSeriesValues = (timeSeries: TimestampedData[]): number[] => {
}
export const extractTimeSeriesValues = (timeSeries: TimestampedData[]): number[] => {
- return timeSeries.map(
(timeSeriesItem)
=> timeSeriesItem.value)
+ return timeSeries.map(
timeSeriesItem
=> timeSeriesItem.value)
}
export const isObject = (item: unknown): boolean => {
}
export const isObject = (item: unknown): boolean => {
diff --git
a/src/worker/WorkerSet.ts
b/src/worker/WorkerSet.ts
index ea5d654cdd001f599e6af1b670e61e494852430c..ea1ed241020637d0dcab4534b5bfdf4605891d6e 100644
(file)
--- a/
src/worker/WorkerSet.ts
+++ b/
src/worker/WorkerSet.ts
@@
-86,7
+86,7
@@
export class WorkerSet extends WorkerAbstract<WorkerData> {
public async stop (): Promise<void> {
for (const workerSetElement of this.workerSet) {
const worker = workerSetElement.worker
public async stop (): Promise<void> {
for (const workerSetElement of this.workerSet) {
const worker = workerSetElement.worker
- const waitWorkerExit = new Promise<void>(
(resolve)
=> {
+ const waitWorkerExit = new Promise<void>(
resolve
=> {
worker.once('exit', () => {
resolve()
})
worker.once('exit', () => {
resolve()
})
@@
-137,7
+137,7
@@
export class WorkerSet extends WorkerAbstract<WorkerData> {
}
})
worker.on('error', this.workerOptions.poolOptions?.errorHandler ?? EMPTY_FUNCTION)
}
})
worker.on('error', this.workerOptions.poolOptions?.errorHandler ?? EMPTY_FUNCTION)
- worker.on('error',
(error)
=> {
+ worker.on('error',
error
=> {
this.emitter?.emit(WorkerSetEvents.error, error)
if (
this.workerOptions.poolOptions?.restartWorkerOnError === true &&
this.emitter?.emit(WorkerSetEvents.error, error)
if (
this.workerOptions.poolOptions?.restartWorkerOnError === true &&
diff --git
a/src/worker/WorkerUtils.ts
b/src/worker/WorkerUtils.ts
index 5cd19f12cea02b1f101c9be10dac19895abc2bdb..f36c6046d626d5d4850f1b75dca253edae043b15 100644
(file)
--- a/
src/worker/WorkerUtils.ts
+++ b/
src/worker/WorkerUtils.ts
@@
-3,7
+3,7
@@
import { getRandomValues } from 'node:crypto'
import chalk from 'chalk'
export const sleep = async (milliSeconds: number): Promise<NodeJS.Timeout> => {
import chalk from 'chalk'
export const sleep = async (milliSeconds: number): Promise<NodeJS.Timeout> => {
- return await new Promise<NodeJS.Timeout>(
(resolve)
=>
+ return await new Promise<NodeJS.Timeout>(
resolve
=>
setTimeout(resolve as () => void, milliSeconds)
)
}
setTimeout(resolve as () => void, milliSeconds)
)
}
diff --git
a/ui/web/.eslintrc.cjs
b/ui/web/.eslintrc.cjs
index 75c92c6a3b1e71b886cad07dc45eaaaa6f2b2463..128bff5f0f6df12a76f1dc511d32b4f5b1b21b87 100644
(file)
--- a/
ui/web/.eslintrc.cjs
+++ b/
ui/web/.eslintrc.cjs
@@
-6,7
+6,7
@@
module.exports = defineConfig({
root: true,
env: {
root: true,
env: {
- node: true
,
+ node: true
},
plugins: ['import'],
},
plugins: ['import'],
@@
-16,19
+16,19
@@
module.exports = defineConfig({
'plugin:import/recommended',
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript/recommended',
'plugin:import/recommended',
'plugin:vue/vue3-recommended',
'@vue/eslint-config-typescript/recommended',
- '@vue/eslint-config-prettier'
,
+ '@vue/eslint-config-prettier'
],
settings: {
'import/resolver': {
typescript: {
],
settings: {
'import/resolver': {
typescript: {
- project: './tsconfig.json'
,
- }
,
- }
,
+ project: './tsconfig.json'
+ }
+ }
},
parserOptions: {
},
parserOptions: {
- ecmaVersion: 'latest'
,
+ ecmaVersion: 'latest'
},
rules: {
},
rules: {
@@
-39,9
+39,9
@@
module.exports = defineConfig({
'sort-imports': [
'error',
{
'sort-imports': [
'error',
{
- ignoreDeclarationSort: true
,
- }
,
+ ignoreDeclarationSort: true
+ }
],
],
- 'import/order': 'error'
,
- }
,
+ 'import/order': 'error'
+ }
})
})
diff --git
a/ui/web/.lintstagedrc.js
b/ui/web/.lintstagedrc.js
index 59a73cecbc31dbda0708914953e414147fc166a3..a8ba217a05a2668399b9ff2c7782fbbd51358f59 100644
(file)
--- a/
ui/web/.lintstagedrc.js
+++ b/
ui/web/.lintstagedrc.js
@@
-1,5
+1,5
@@
export default {
'*.{.css,json,md,yml,yaml,html,js,jsx,cjs,mjs,ts,tsx,cts,mts}': 'prettier --cache --write',
'*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}':
export default {
'*.{.css,json,md,yml,yaml,html,js,jsx,cjs,mjs,ts,tsx,cts,mts}': 'prettier --cache --write',
'*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}':
- 'eslint . --cache --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore'
,
+ 'eslint . --cache --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore'
}
}
diff --git
a/ui/web/.prettierrc.json
b/ui/web/.prettierrc.json
index 6632aaeb6873d9f1edf3b4ab3cbe617ab8ec283a..066e89fcd2212b26dc027ef6abfb85510c9bae0f 100644
(file)
--- a/
ui/web/.prettierrc.json
+++ b/
ui/web/.prettierrc.json
@@
-1,7
+1,8
@@
{
"$schema": "https://json.schemastore.org/prettierrc",
"printWidth": 100,
{
"$schema": "https://json.schemastore.org/prettierrc",
"printWidth": 100,
- "
semi": false
,
+ "
arrowParens": "avoid"
,
"singleQuote": true,
"singleQuote": true,
+ "semi": false,
"trailingComma": "none"
}
"trailingComma": "none"
}
diff --git
a/ui/web/src/assets/config.ts
b/ui/web/src/assets/config.ts
index c9068f9b66a087c5010e5fcab6e39b6580eef4b4..cf6f3eb2d23a41435484386d0ef4a9d850d6bda4 100644
(file)
--- a/
ui/web/src/assets/config.ts
+++ b/
ui/web/src/assets/config.ts
@@
-4,8
+4,8
@@
const config: BaseConfig = {
uiServer: {
host: 'localhost',
port: 8080,
uiServer: {
host: 'localhost',
port: 8080,
- protocol: 'ui0.0.1'
,
- }
,
+ protocol: 'ui0.0.1'
+ }
}
export default config
}
export default config
diff --git
a/ui/web/src/composables/UIClient.ts
b/ui/web/src/composables/UIClient.ts
index 10f2d3dea0b42ad2fe08fe549b7f1fb475802d41..49ca30182cd9e829db51da0d93c920b8538df56e 100644
(file)
--- a/
ui/web/src/composables/UIClient.ts
+++ b/
ui/web/src/composables/UIClient.ts
@@
-3,7
+3,7
@@
import {
type ProtocolResponse,
type RequestPayload,
type ResponsePayload,
type ProtocolResponse,
type RequestPayload,
type ResponsePayload,
- ResponseStatus
,
+ ResponseStatus
} from '@/types'
import config from '@/assets/config'
} from '@/types'
import config from '@/assets/config'
@@
-57,13
+57,13
@@
export class UIClient {
public async openConnection(hashId: string): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.OPEN_CONNECTION, {
public async openConnection(hashId: string): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.OPEN_CONNECTION, {
- hashIds: [hashId]
,
+ hashIds: [hashId]
})
}
public async closeConnection(hashId: string): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.CLOSE_CONNECTION, {
})
}
public async closeConnection(hashId: string): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.CLOSE_CONNECTION, {
- hashIds: [hashId]
,
+ hashIds: [hashId]
})
}
})
}
@@
-75,7
+75,7
@@
export class UIClient {
return this.sendRequest(ProcedureName.START_TRANSACTION, {
hashIds: [hashId],
connectorId,
return this.sendRequest(ProcedureName.START_TRANSACTION, {
hashIds: [hashId],
connectorId,
- idTag
,
+ idTag
})
}
})
}
@@
-85,7
+85,7
@@
export class UIClient {
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_TRANSACTION, {
hashIds: [hashId],
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_TRANSACTION, {
hashIds: [hashId],
- transactionId
,
+ transactionId
})
}
})
}
@@
-95,7
+95,7
@@
export class UIClient {
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.START_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.START_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
- connectorIds: [connectorId]
,
+ connectorIds: [connectorId]
})
}
})
}
@@
-105,7
+105,7
@@
export class UIClient {
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
- connectorIds: [connectorId]
,
+ connectorIds: [connectorId]
})
}
})
}
@@
-115,10
+115,10
@@
export class UIClient {
config.uiServer.protocol
)
this.ws.onmessage = this.responseHandler.bind(this)
config.uiServer.protocol
)
this.ws.onmessage = this.responseHandler.bind(this)
- this.ws.onerror =
(errorEvent)
=> {
+ this.ws.onerror =
errorEvent
=> {
console.error('WebSocket error: ', errorEvent)
}
console.error('WebSocket error: ', errorEvent)
}
- this.ws.onclose =
(closeEvent)
=> {
+ this.ws.onclose =
closeEvent
=> {
console.info('WebSocket closed: ', closeEvent)
}
}
console.info('WebSocket closed: ', closeEvent)
}
}
diff --git
a/ui/web/src/router/index.ts
b/ui/web/src/router/index.ts
index b58a4d2a506d7e5f9c9f94a153bd1d7a7d0061ee..1015d92361787bd1405a90a1f38408cfad7acb43 100644
(file)
--- a/
ui/web/src/router/index.ts
+++ b/
ui/web/src/router/index.ts
@@
-5,13
+5,13
@@
const routes: RouteRecordRaw[] = [
{
path: '/',
name: 'charging-stations',
{
path: '/',
name: 'charging-stations',
- component: ChargingStationsView
,
- }
,
+ component: ChargingStationsView
+ }
]
const router = createRouter({
history: createWebHistory(),
]
const router = createRouter({
history: createWebHistory(),
- routes
,
+ routes
})
export default router
})
export default router
diff --git
a/ui/web/src/types/ChargingStationType.ts
b/ui/web/src/types/ChargingStationType.ts
index 1479e1d7a622f4e2dafdb082f2b78e3ab6eedfec..2e79fbc8b44204fe57ea395b3aa934555ae650da 100644
(file)
--- a/
ui/web/src/types/ChargingStationType.ts
+++ b/
ui/web/src/types/ChargingStationType.ts
@@
-21,11
+21,11
@@
export enum OCPP16FirmwareStatus {
Idle = 'Idle',
InstallationFailed = 'InstallationFailed',
Installing = 'Installing',
Idle = 'Idle',
InstallationFailed = 'InstallationFailed',
Installing = 'Installing',
- Installed = 'Installed'
,
+ Installed = 'Installed'
}
export const FirmwareStatus = {
}
export const FirmwareStatus = {
- ...OCPP16FirmwareStatus
,
+ ...OCPP16FirmwareStatus
} as const
export type FirmwareStatus = OCPP16FirmwareStatus
} as const
export type FirmwareStatus = OCPP16FirmwareStatus
@@
-99,11
+99,11
@@
export enum OCPP16IncomingRequestCommand {
REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction',
GET_DIAGNOSTICS = 'GetDiagnostics',
REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction',
GET_DIAGNOSTICS = 'GetDiagnostics',
- TRIGGER_MESSAGE = 'TriggerMessage'
,
+ TRIGGER_MESSAGE = 'TriggerMessage'
}
export const IncomingRequestCommand = {
}
export const IncomingRequestCommand = {
- ...OCPP16IncomingRequestCommand
,
+ ...OCPP16IncomingRequestCommand
} as const
export type IncomingRequestCommand = OCPP16IncomingRequestCommand
} as const
export type IncomingRequestCommand = OCPP16IncomingRequestCommand
@@
-115,11
+115,11
@@
export enum OCPP16RequestCommand {
START_TRANSACTION = 'StartTransaction',
STOP_TRANSACTION = 'StopTransaction',
METER_VALUES = 'MeterValues',
START_TRANSACTION = 'StartTransaction',
STOP_TRANSACTION = 'StopTransaction',
METER_VALUES = 'MeterValues',
- DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification'
,
+ DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification'
}
export const RequestCommand = {
}
export const RequestCommand = {
- ...OCPP16RequestCommand
,
+ ...OCPP16RequestCommand
} as const
export type RequestCommand = OCPP16RequestCommand
} as const
export type RequestCommand = OCPP16RequestCommand
@@
-128,7
+128,7
@@
export type BootNotificationResponse = OCPP16BootNotificationResponse
export enum OCPP16RegistrationStatus {
ACCEPTED = 'Accepted',
PENDING = 'Pending',
export enum OCPP16RegistrationStatus {
ACCEPTED = 'Accepted',
PENDING = 'Pending',
- REJECTED = 'Rejected'
,
+ REJECTED = 'Rejected'
}
export interface OCPP16BootNotificationResponse extends JsonObject {
}
export interface OCPP16BootNotificationResponse extends JsonObject {
@@
-143,11
+143,11
@@
export enum OCPP16MessageTrigger {
FirmwareStatusNotification = 'FirmwareStatusNotification',
Heartbeat = 'Heartbeat',
MeterValues = 'MeterValues',
FirmwareStatusNotification = 'FirmwareStatusNotification',
Heartbeat = 'Heartbeat',
MeterValues = 'MeterValues',
- StatusNotification = 'StatusNotification'
,
+ StatusNotification = 'StatusNotification'
}
export const MessageTrigger = {
}
export const MessageTrigger = {
- ...OCPP16MessageTrigger
,
+ ...OCPP16MessageTrigger
} as const
export type MessageTrigger = OCPP16MessageTrigger
} as const
export type MessageTrigger = OCPP16MessageTrigger
@@
-158,30
+158,30
@@
type CommandsSupport = {
export enum OCPPVersion {
VERSION_16 = '1.6',
export enum OCPPVersion {
VERSION_16 = '1.6',
- VERSION_20 = '2.0'
,
+ VERSION_20 = '2.0'
}
export enum OCPPProtocol {
}
export enum OCPPProtocol {
- JSON = 'json'
,
+ JSON = 'json'
}
export enum CurrentType {
AC = 'AC',
}
export enum CurrentType {
AC = 'AC',
- DC = 'DC'
,
+ DC = 'DC'
}
export enum Voltage {
VOLTAGE_110 = 110,
VOLTAGE_230 = 230,
VOLTAGE_400 = 400,
}
export enum Voltage {
VOLTAGE_110 = 110,
VOLTAGE_230 = 230,
VOLTAGE_400 = 400,
- VOLTAGE_800 = 800
,
+ VOLTAGE_800 = 800
}
export enum AmpereUnits {
MILLI_AMPERE = 'mA',
CENTI_AMPERE = 'cA',
DECI_AMPERE = 'dA',
}
export enum AmpereUnits {
MILLI_AMPERE = 'mA',
CENTI_AMPERE = 'cA',
DECI_AMPERE = 'dA',
- AMPERE = 'A'
,
+ AMPERE = 'A'
}
export type ConnectorStatus = {
}
export type ConnectorStatus = {
@@
-207,7
+207,7
@@
export type EvseStatus = {
export enum OCPP16AvailabilityType {
INOPERATIVE = 'Inoperative',
export enum OCPP16AvailabilityType {
INOPERATIVE = 'Inoperative',
- OPERATIVE = 'Operative'
,
+ OPERATIVE = 'Operative'
}
export type AvailabilityType = OCPP16AvailabilityType
}
export type AvailabilityType = OCPP16AvailabilityType
@@
-221,7
+221,7
@@
export enum OCPP16ChargePointStatus {
FINISHING = 'Finishing',
RESERVED = 'Reserved',
UNAVAILABLE = 'Unavailable',
FINISHING = 'Finishing',
RESERVED = 'Reserved',
UNAVAILABLE = 'Unavailable',
- FAULTED = 'Faulted'
,
+ FAULTED = 'Faulted'
}
export type ChargePointStatus = OCPP16ChargePointStatus
}
export type ChargePointStatus = OCPP16ChargePointStatus
diff --git
a/ui/web/src/types/UIProtocol.ts
b/ui/web/src/types/UIProtocol.ts
index 48b0f1a86355092b66a5e95cc9b1aeff4e661324..07eb52125599520cf59e8e81b4675d39bca85383 100644
(file)
--- a/
ui/web/src/types/UIProtocol.ts
+++ b/
ui/web/src/types/UIProtocol.ts
@@
-1,16
+1,16
@@
import type { JsonObject } from './JsonType'
export enum Protocol {
import type { JsonObject } from './JsonType'
export enum Protocol {
- UI = 'ui'
,
+ UI = 'ui'
}
export enum ApplicationProtocol {
HTTP = 'http',
}
export enum ApplicationProtocol {
HTTP = 'http',
- WS = 'ws'
,
+ WS = 'ws'
}
export enum ProtocolVersion {
}
export enum ProtocolVersion {
- '0.0.1' = '0.0.1'
,
+ '0.0.1' = '0.0.1'
}
export type ProtocolRequest = [string, ProcedureName, RequestPayload]
}
export type ProtocolRequest = [string, ProcedureName, RequestPayload]
@@
-31,7
+31,7
@@
export enum ProcedureName {
START_AUTOMATIC_TRANSACTION_GENERATOR = 'startAutomaticTransactionGenerator',
STOP_AUTOMATIC_TRANSACTION_GENERATOR = 'stopAutomaticTransactionGenerator',
START_TRANSACTION = 'startTransaction',
START_AUTOMATIC_TRANSACTION_GENERATOR = 'startAutomaticTransactionGenerator',
STOP_AUTOMATIC_TRANSACTION_GENERATOR = 'stopAutomaticTransactionGenerator',
START_TRANSACTION = 'startTransaction',
- STOP_TRANSACTION = 'stopTransaction'
,
+ STOP_TRANSACTION = 'stopTransaction'
}
export interface RequestPayload extends JsonObject {
}
export interface RequestPayload extends JsonObject {
@@
-41,7
+41,7
@@
export interface RequestPayload extends JsonObject {
export enum ResponseStatus {
SUCCESS = 'success',
export enum ResponseStatus {
SUCCESS = 'success',
- FAILURE = 'failure'
,
+ FAILURE = 'failure'
}
export interface ResponsePayload extends JsonObject {
}
export interface ResponsePayload extends JsonObject {
diff --git
a/ui/web/src/types/index.ts
b/ui/web/src/types/index.ts
index d866d361a5a27abd8dee925ab6380d546ce57ffe..ec7821f32a12fa17f5cc15153240ad9d3b2b96bd 100644
(file)
--- a/
ui/web/src/types/index.ts
+++ b/
ui/web/src/types/index.ts
@@
-1,7
+1,7
@@
export type {
ChargingStationData,
ChargingStationInfo,
export type {
ChargingStationData,
ChargingStationInfo,
- ConnectorStatus
,
+ ConnectorStatus
} from './ChargingStationType'
export type { BaseConfig } from './ConfigurationType'
export {
} from './ChargingStationType'
export type { BaseConfig } from './ConfigurationType'
export {
@@
-9,5
+9,5
@@
export {
type ProtocolResponse,
type RequestPayload,
type ResponsePayload,
type ProtocolResponse,
type RequestPayload,
type ResponsePayload,
- ResponseStatus
,
+ ResponseStatus
} from './UIProtocol'
} from './UIProtocol'
diff --git
a/ui/web/src/views/ChargingStationsView.vue
b/ui/web/src/views/ChargingStationsView.vue
index 707cce54c5ab93f67b716809da432dffcd21d2db..5e385955fb060abef6d59dfbffb1d85a94f19703 100644
(file)
--- a/
ui/web/src/views/ChargingStationsView.vue
+++ b/
ui/web/src/views/ChargingStationsView.vue
@@
-39,7
+39,7
@@
type State = {
const state: State = reactive({
isLoading: false,
chargingStations: [],
const state: State = reactive({
isLoading: false,
chargingStations: [],
- idTag: ''
,
+ idTag: ''
})
async function load(): Promise<void> {
})
async function load(): Promise<void> {
diff --git
a/ui/web/tests/unit/CSTable.spec.ts
b/ui/web/tests/unit/CSTable.spec.ts
index a725df552f831e0b4648fd41d2df2bf368b95a13..39c980c5d244ef1a0f954bcf1241b8ff6129064f 100644
(file)
--- a/
ui/web/tests/unit/CSTable.spec.ts
+++ b/
ui/web/tests/unit/CSTable.spec.ts
@@
-6,7
+6,7
@@
import type { ChargingStationData } from '@/types'
test('renders CS table columns name', () => {
const chargingStations: ChargingStationData[] = []
const wrapper = shallowMount(CSTable, {
test('renders CS table columns name', () => {
const chargingStations: ChargingStationData[] = []
const wrapper = shallowMount(CSTable, {
- props: { chargingStations, idTag: '0' }
,
+ props: { chargingStations, idTag: '0' }
})
expect(wrapper.text()).to.include('Action')
expect(wrapper.text()).to.include('Connector')
})
expect(wrapper.text()).to.include('Action')
expect(wrapper.text()).to.include('Connector')
diff --git
a/ui/web/vite.config.ts
b/ui/web/vite.config.ts
index c258c4b197a5e63cd8888333f980105611382d87..a5a1d53342af3729580add99ae03ef4cf7394aa2 100644
(file)
--- a/
ui/web/vite.config.ts
+++ b/
ui/web/vite.config.ts
@@
-7,7
+7,7
@@
export default defineConfig({
plugins: [vue(), vueJsx()],
resolve: {
alias: {
plugins: [vue(), vueJsx()],
resolve: {
alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
,
- }
,
- }
,
+ '@': fileURLToPath(new URL('./src', import.meta.url))
+ }
+ }
})
})
diff --git
a/ui/web/vitest.config.ts
b/ui/web/vitest.config.ts
index b772de1747337f51ae39042dd521037c1af7456f..39905b29c5bf4f670d2ab327e584209f0a81aafb 100644
(file)
--- a/
ui/web/vitest.config.ts
+++ b/
ui/web/vitest.config.ts
@@
-12,8
+12,8
@@
export default mergeConfig(
root: fileURLToPath(new URL('./', import.meta.url)),
coverage: {
provider: 'v8',
root: fileURLToPath(new URL('./', import.meta.url)),
coverage: {
provider: 'v8',
- reporter: ['text', 'lcov']
,
- }
,
- }
,
+ reporter: ['text', 'lcov']
+ }
+ }
})
)
})
)