export default {
'{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']
+ '**/*.{js,jsx,cjs,mjs}': ['prettier --cache --write', 'eslint --cache --fix'],
}
"printWidth": 100,
"semi": false,
"singleQuote": true,
- "trailingComma": "none"
+ "trailingComma": "es5"
}
"esbuild-plugin-clean": "^1.0.1",
"esbuild-plugin-copy": "^2.1.1",
"eslint": "^8.56.0",
- "eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-config-standard-with-typescript": "^43.0.0",
"eslint-define-config": "^2.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^46.9.1",
- "eslint-plugin-n": "^16.5.0",
+ "eslint-plugin-n": "^16.6.0",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-tsdoc": "^0.2.17",
"expect": "^29.7.0",
eslint:
specifier: ^8.56.0
version: 8.56.0
- eslint-config-prettier:
- specifier: ^9.1.0
- version: 9.1.0(eslint@8.56.0)
eslint-config-standard:
specifier: ^17.1.0
- version: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.5.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)
+ version: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)
eslint-config-standard-with-typescript:
specifier: ^43.0.0
- version: 43.0.0(@typescript-eslint/eslint-plugin@6.16.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.5.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3)
+ version: 43.0.0(@typescript-eslint/eslint-plugin@6.16.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3)
eslint-define-config:
specifier: ^2.1.0
version: 2.1.0
specifier: ^46.9.1
version: 46.9.1(eslint@8.56.0)
eslint-plugin-n:
- specifier: ^16.5.0
- version: 16.5.0(eslint@8.56.0)
+ specifier: ^16.6.0
+ version: 16.6.0(eslint@8.56.0)
eslint-plugin-prettier:
specifier: ^5.1.2
- version: 5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1)
+ version: 5.1.2(eslint@8.56.0)(prettier@3.1.1)
eslint-plugin-tsdoc:
specifier: ^0.2.17
version: 0.2.17
event-target-shim: 5.0.1
dev: true
- /acorn-jsx@5.3.2(acorn@8.11.2):
+ /acorn-jsx@5.3.2(acorn@8.11.3):
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
dev: true
/acorn-loose@8.3.0:
resolution: {integrity: sha512-75lAs9H19ldmW+fAbyqHdjgdCrz0pWGXKmnqFoh8PyVd1L2RIb4RzYrSjmopeqv3E1G3/Pimu6GgLlrGbrkF7w==}
engines: {node: '>=0.4.0'}
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
/acorn-node@1.8.2:
resolution: {integrity: sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==}
resolution: {integrity: sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==}
engines: {node: '>=0.4.0'}
+ /acorn-walk@8.3.1:
+ resolution: {integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==}
+ engines: {node: '>=0.4.0'}
+ dev: true
+
/acorn@7.4.1:
resolution: {integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
- /acorn@8.11.2:
- resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==}
+ /acorn@8.11.3:
+ resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==}
engines: {node: '>=0.4.0'}
hasBin: true
eslint: 8.56.0
dev: true
- /eslint-config-prettier@9.1.0(eslint@8.56.0):
- resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==}
- hasBin: true
- peerDependencies:
- eslint: '>=7.0.0'
- dependencies:
- eslint: 8.56.0
- dev: true
-
/eslint-config-standard-jsx@11.0.0(eslint-plugin-react@7.33.2)(eslint@8.56.0):
resolution: {integrity: sha512-+1EV/R0JxEK1L0NGolAr8Iktm3Rgotx3BKwgaX+eAuSX8D952LULKtjgZD3F+e6SvibONnhLwoTi9DPxN5LvvQ==}
peerDependencies:
- supports-color
dev: true
- /eslint-config-standard-with-typescript@43.0.0(@typescript-eslint/eslint-plugin@6.16.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.5.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3):
+ /eslint-config-standard-with-typescript@43.0.0(@typescript-eslint/eslint-plugin@6.16.0)(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)(typescript@5.3.3):
resolution: {integrity: sha512-AT0qK01M5bmsWiE3UZvaQO5da1y1n6uQckAKqGNe6zPW5IOzgMLXZxw77nnFm+C11nxAZXsCPrbsgJhSrGfX6Q==}
peerDependencies:
'@typescript-eslint/eslint-plugin': ^6.4.0
'@typescript-eslint/eslint-plugin': 6.16.0(@typescript-eslint/parser@6.16.0)(eslint@8.56.0)(typescript@5.3.3)
'@typescript-eslint/parser': 6.16.0(eslint@8.56.0)(typescript@5.3.3)
eslint: 8.56.0
- eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.5.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)
+ eslint-config-standard: 17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0)
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.16.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
- eslint-plugin-n: 16.5.0(eslint@8.56.0)
+ eslint-plugin-n: 16.6.0(eslint@8.56.0)
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
typescript: 5.3.3
transitivePeerDependencies:
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
dev: true
- /eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.5.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0):
+ /eslint-config-standard@17.1.0(eslint-plugin-import@2.29.1)(eslint-plugin-n@16.6.0)(eslint-plugin-promise@6.1.1)(eslint@8.56.0):
resolution: {integrity: sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==}
engines: {node: '>=12.0.0'}
peerDependencies:
dependencies:
eslint: 8.56.0
eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.16.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0)
- eslint-plugin-n: 16.5.0(eslint@8.56.0)
+ eslint-plugin-n: 16.6.0(eslint@8.56.0)
eslint-plugin-promise: 6.1.1(eslint@8.56.0)
dev: true
semver: 7.5.4
dev: true
- /eslint-plugin-n@16.5.0(eslint@8.56.0):
- resolution: {integrity: sha512-Hw02Bj1QrZIlKyj471Tb1jSReTl4ghIMHGuBGiMVmw+s0jOPbI4CBuYpGbZr+tdQ+VAvSK6FDSta3J4ib/SKHQ==}
+ /eslint-plugin-n@16.6.0(eslint@8.56.0):
+ resolution: {integrity: sha512-Ag3tYFF90lYU8JdHEl9qSSpeLYbVnO+Oj7sgPUarWUacv1mPL3d5h5yG4Bv3tLe71hrcxmgTi7oByYwKXaVatw==}
engines: {node: '>=16.0.0'}
peerDependencies:
eslint: '>=7.0.0'
eslint: 8.56.0
eslint-plugin-es-x: 7.5.0(eslint@8.56.0)
get-tsconfig: 4.7.2
+ globals: 13.24.0
ignore: 5.3.0
is-builtin-module: 3.2.1
is-core-module: 2.13.1
semver: 7.5.4
dev: true
- /eslint-plugin-prettier@5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1):
+ /eslint-plugin-prettier@5.1.2(eslint@8.56.0)(prettier@3.1.1):
resolution: {integrity: sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
optional: true
dependencies:
eslint: 8.56.0
- eslint-config-prettier: 9.1.0(eslint@8.56.0)
prettier: 3.1.1
prettier-linter-helpers: 1.0.0
synckit: 0.8.8
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
- acorn: 8.11.2
- acorn-jsx: 5.3.2(acorn@8.11.2)
+ acorn: 8.11.3
+ acorn-jsx: 5.3.2(acorn@8.11.3)
eslint-visitor-keys: 3.4.3
dev: true
denque: 2.1.0
iconv-lite: 0.6.3
long: 5.2.3
- moment-timezone: 0.5.43
+ moment-timezone: 0.5.44
please-upgrade-node: 3.2.0
/md5.js@1.3.5:
xtend: 4.0.2
dev: true
- /moment-timezone@0.5.43:
- resolution: {integrity: sha512-72j3aNyuIsDxdF1i7CEgV2FfxM1r6aaqJyLB2vwb33mXYyoyLly+F1zbWqhA3/bVIoJ4szlUoMbUnVdid32NUQ==}
+ /moment-timezone@0.5.44:
+ resolution: {integrity: sha512-nv3YpzI/8lkQn0U6RkLd+f0W/zy/JnoR5/EyPz/dNkPTBjA2jNLCVxaiQ8QpeLymhSZvX0wCL5s27NQWdOPwAw==}
dependencies:
moment: 2.30.1
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
commander: 2.20.3
source-map: 0.6.1
source-map-support: 0.5.21
'@tsconfig/node14': 1.0.3
'@tsconfig/node16': 1.0.4
'@types/node': 20.10.5
- acorn: 8.11.2
- acorn-walk: 8.2.0
+ acorn: 8.11.3
+ acorn-walk: 8.3.1
arg: 4.1.3
create-require: 1.1.1
diff: 4.0.2
import { env } from 'node:process'
-const isCIEnvironment = env.CI !== undefined
-const isCFEnvironment = env.VCAP_APPLICATION !== undefined
+const isCIEnvironment = env.CI != null
+const isCFEnvironment = env.VCAP_APPLICATION != null
if (isCFEnvironment === false && isCIEnvironment === false) {
// eslint-disable-next-line n/no-unpublished-import
import('husky').then(({ install }) => install())
import { env, exit } from 'node:process'
-const skipPreinstall = env.SKIP_PREINSTALL || env.VCAP_APPLICATION !== undefined
+const skipPreinstall = parseInt(env.SKIP_PREINSTALL) || env.VCAP_APPLICATION != null
if (skipPreinstall) {
// eslint-disable-next-line n/no-process-exit
exit()
}
private resetConnectorStatus (connectorStatus: Status | undefined): void {
- if (connectorStatus === undefined) {
+ if (connectorStatus == null) {
return
}
delete connectorStatus?.startDate
succeeded = 0,
missingChargingStationsConfiguration = 1,
noChargingStationTemplates = 2,
- gracefulShutdownError = 3
+ gracefulShutdownError = 3,
}
export class Bootstrap extends EventEmitter {
getMaxNumberOfEvses,
getNumberOfReservableConnectors,
getPhaseRotationValue,
+ hasFeatureProfile,
hasReservationExpired,
initializeConnectorsMapStatus,
propagateSerialNumber,
this,
StandardParametersKey.AuthorizeRemoteTxRequests
)
- return authorizeRemoteTxRequests !== undefined
+ return authorizeRemoteTxRequests != null
? convertToBoolean(authorizeRemoteTxRequests.value)
: false
}
this,
StandardParametersKey.LocalAuthListEnabled
)
- return localAuthListEnabled !== undefined ? convertToBoolean(localAuthListEnabled.value) : false
+ return localAuthListEnabled != null ? convertToBoolean(localAuthListEnabled.value) : false
}
public getHeartbeatInterval (): number {
const HeartbeatInterval = getConfigurationKey(this, StandardParametersKey.HeartbeatInterval)
- if (HeartbeatInterval !== undefined) {
+ if (HeartbeatInterval != null) {
return secondsToMilliseconds(convertToInt(HeartbeatInterval.value))
}
const HeartBeatInterval = getConfigurationKey(this, StandardParametersKey.HeartBeatInterval)
- if (HeartBeatInterval !== undefined) {
+ if (HeartBeatInterval != null) {
return secondsToMilliseconds(convertToInt(HeartBeatInterval.value))
}
this.stationInfo?.autoRegister === false &&
}
public startHeartbeat (): void {
- if (this.getHeartbeatInterval() > 0 && this.heartbeatSetInterval === undefined) {
+ if (this.getHeartbeatInterval() > 0 && this.heartbeatSetInterval == null) {
this.heartbeatSetInterval = setInterval(() => {
this.ocppRequestService
.requestHandler<HeartbeatRequest, HeartbeatResponse>(this, RequestCommand.HEARTBEAT)
this.getHeartbeatInterval()
)}`
)
- } else if (this.heartbeatSetInterval !== undefined) {
+ } else if (this.heartbeatSetInterval != null) {
logger.info(
`${this.logPrefix()} Heartbeat already started every ${formatDurationMilliSeconds(
this.getHeartbeatInterval()
}
public stopMeterValues (connectorId: number): void {
- if (this.getConnectorStatus(connectorId)?.transactionSetInterval !== undefined) {
+ if (this.getConnectorStatus(connectorId)?.transactionSetInterval != null) {
clearInterval(this.getConnectorStatus(connectorId)?.transactionSetInterval)
}
}
public async addReservation (reservation: Reservation): Promise<void> {
const reservationFound = this.getReservationBy('reservationId', reservation.reservationId)
- if (reservationFound !== undefined) {
+ if (reservationFound != null) {
await this.removeReservation(reservationFound, ReservationTerminationReason.REPLACE_EXISTING)
}
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
}
private setIntervalFlushMessageBuffer (): void {
- if (this.flushMessageBufferSetInterval === undefined) {
+ if (this.flushMessageBufferSetInterval == null) {
this.flushMessageBufferSetInterval = setInterval(() => {
if (this.isWebSocketConnectionOpened() && this.inAcceptedState()) {
this.flushMessageBuffer()
}
private clearIntervalFlushMessageBuffer (): void {
- if (this.flushMessageBufferSetInterval !== undefined) {
+ if (this.flushMessageBufferSetInterval != null) {
clearInterval(this.flushMessageBufferSetInterval)
delete this.flushMessageBufferSetInterval
}
}
if (
isNullOrUndefined(getConfigurationKey(this, StandardParametersKey.LocalAuthListEnabled)) &&
- getConfigurationKey(this, StandardParametersKey.SupportedFeatureProfiles)?.value?.includes(
- SupportedFeatureProfiles.LocalAuthListManagement
- ) === true
+ hasFeatureProfile(this, SupportedFeatureProfiles.LocalAuthListManagement) === true
) {
addConfigurationKey(this, StandardParametersKey.LocalAuthListEnabled, 'false')
}
// 0 for disabling
private getConnectionTimeout (): number {
- if (getConfigurationKey(this, StandardParametersKey.ConnectionTimeOut) !== undefined) {
+ if (getConfigurationKey(this, StandardParametersKey.ConnectionTimeOut) != null) {
return convertToInt(
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
getConfigurationKey(this, StandardParametersKey.ConnectionTimeOut)!.value! ??
if (
isNotEmptyString(this.stationInfo?.amperageLimitationOcppKey) &&
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- getConfigurationKey(this, this.stationInfo.amperageLimitationOcppKey!) !== undefined
+ getConfigurationKey(this, this.stationInfo.amperageLimitationOcppKey!) != null
) {
return (
convertToInt(
private startWebSocketPing (): void {
const webSocketPingInterval: number =
- getConfigurationKey(this, StandardParametersKey.WebSocketPingInterval) !== undefined
+ getConfigurationKey(this, StandardParametersKey.WebSocketPingInterval) != null
? convertToInt(
getConfigurationKey(this, StandardParametersKey.WebSocketPingInterval)?.value
)
: 0
- if (webSocketPingInterval > 0 && this.webSocketPingSetInterval === undefined) {
+ if (webSocketPingInterval > 0 && this.webSocketPingSetInterval == null) {
this.webSocketPingSetInterval = setInterval(() => {
if (this.isWebSocketConnectionOpened()) {
this.wsConnection?.ping()
webSocketPingInterval
)}`
)
- } else if (this.webSocketPingSetInterval !== undefined) {
+ } else if (this.webSocketPingSetInterval != null) {
logger.info(
`${this.logPrefix()} WebSocket ping already started every ${formatDurationSeconds(
webSocketPingInterval
}
private stopWebSocketPing (): void {
- if (this.webSocketPingSetInterval !== undefined) {
+ if (this.webSocketPingSetInterval != null) {
clearInterval(this.webSocketPingSetInterval)
delete this.webSocketPingSetInterval
}
}
private stopHeartbeat (): void {
- if (this.heartbeatSetInterval !== undefined) {
+ if (this.heartbeatSetInterval != null) {
clearInterval(this.heartbeatSetInterval)
delete this.heartbeatSetInterval
}
}
params = { ...{ overwrite: false, save: false }, ...params }
let keyFound = getConfigurationKey(chargingStation, key)
- if (keyFound !== undefined && params?.overwrite === true) {
+ if (keyFound != null && params?.overwrite === true) {
deleteConfigurationKey(chargingStation, keyFound.key, {
save: false
})
keyFound = undefined
}
- if (keyFound === undefined) {
+ if (keyFound == null) {
chargingStation.ocppConfiguration?.configurationKey?.push({
key,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
caseInsensitive = false
): void => {
const keyFound = getConfigurationKey(chargingStation, key, caseInsensitive)
- if (keyFound !== undefined) {
+ if (keyFound != null) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
chargingStation.ocppConfiguration!.configurationKey![
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
): ConfigurationKey[] | undefined => {
params = { ...{ save: true, caseInsensitive: false }, ...params }
const keyFound = getConfigurationKey(chargingStation, key, params?.caseInsensitive)
- if (keyFound !== undefined) {
+ if (keyFound != null) {
const deletedConfigurationKey = chargingStation.ocppConfiguration?.configurationKey?.splice(
chargingStation.ocppConfiguration.configurationKey.indexOf(keyFound),
1
index: number,
stationTemplate: ChargingStationTemplate | undefined
): string => {
- if (stationTemplate === undefined) {
+ if (stationTemplate == null) {
return "Unknown 'chargingStationId'"
}
// In case of multiple instances: add instance index to charging station id
const instanceIndex = env.CF_INSTANCE_INDEX ?? 0
const idSuffix = stationTemplate?.nameSuffix ?? ''
const idStr = `000000000${index.toString()}`
- return stationTemplate?.fixedName != null
+ return stationTemplate?.fixedName === true
? stationTemplate.baseName
: `${stationTemplate.baseName}-${instanceIndex.toString()}${idStr.substring(
idStr.length - 4
logPrefix: string,
configurationFile: string
): void => {
- if (isNullOrUndefined(stationConfiguration)) {
+ if (stationConfiguration == null) {
const errorMsg = `Failed to read charging station configuration file ${configurationFile}`
logger.error(`${logPrefix} ${errorMsg}`)
throw new BaseError(errorMsg)
}
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- if (isEmptyObject(stationConfiguration!)) {
+ if (isEmptyObject(stationConfiguration)) {
const errorMsg = `Empty charging station configuration from file ${configurationFile}`
logger.error(`${logPrefix} ${errorMsg}`)
throw new BaseError(errorMsg)
logPrefix: string,
templateFile: string
): void => {
- if (!isNullOrUndefined(connectorStatus?.status)) {
+ if (connectorStatus?.status != null) {
logger.warn(
`${logPrefix} Charging station information from template ${templateFile} with connector id ${connectorId} status configuration defined, undefine it`
)
enum CacheType {
chargingStationTemplate = 'chargingStationTemplate',
- chargingStationConfiguration = 'chargingStationConfiguration'
+ chargingStationConfiguration = 'chargingStationConfiguration',
}
type CacheValueType = ChargingStationTemplate | ChargingStationConfiguration
await this.chargingStation.ocppRequestService.requestHandler<
StatusNotificationRequest,
StatusNotificationResponse
- >(this.chargingStation, RequestCommand.STATUS_NOTIFICATION, requestPayload, requestParams)
+ >(
+ this.chargingStation,
+ RequestCommand.STATUS_NOTIFICATION,
+ requestPayload,
+ requestParams
+ )
],
[
BroadcastChannelProcedureName.HEARTBEAT,
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this.chargingStation.getConnectorStatus(requestPayload!.connectorId!)!
.transactionId!,
- configuredMeterValueSampleInterval !== undefined
+ configuredMeterValueSampleInterval != null
? secondsToMilliseconds(convertToInt(configuredMeterValueSampleInterval.value))
: Constants.DEFAULT_METER_VALUES_INTERVAL
)
return
}
let responsePayload: BroadcastChannelResponsePayload | undefined
- let commandResponse: CommandResponse | undefined
+ // eslint-disable-next-line @typescript-eslint/no-invalid-void-type
+ let commandResponse: CommandResponse | void | undefined
try {
commandResponse = await this.commandHandler(command, requestPayload)
- if (isNullOrUndefined(commandResponse) || isEmptyObject(commandResponse)) {
+ if (isNullOrUndefined(commandResponse) || isEmptyObject(commandResponse as CommandResponse)) {
responsePayload = {
hashId: this.chargingStation.stationInfo.hashId,
status: ResponseStatus.SUCCESS
responsePayload = this.commandResponseToResponsePayload(
command,
requestPayload,
- commandResponse
+ commandResponse as CommandResponse
)
}
} catch (error) {
hashIdsSucceeded: this.responses
.get(uuid)
?.responses.map(({ status, hashId }) => {
- if (hashId !== undefined && status === ResponseStatus.SUCCESS) {
+ if (hashId != null && status === ResponseStatus.SUCCESS) {
return hashId
}
return undefined
hashIdsFailed: this.responses
.get(uuid)
?.responses.map(({ status, hashId }) => {
- if (hashId !== undefined && status === ResponseStatus.FAILURE) {
+ if (hashId != null && status === ResponseStatus.FAILURE) {
return hashId
}
return undefined
responsesFailed: this.responses
.get(uuid)
?.responses.map((response) => {
- if (response !== undefined && response.status === ResponseStatus.FAILURE) {
+ if (response != null && response.status === ResponseStatus.FAILURE) {
return response
}
return undefined
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
for (const k of key!) {
const keyFound = getConfigurationKey(chargingStation, k, true)
- if (keyFound !== undefined) {
+ if (keyFound != null) {
if (isUndefined(keyFound.visible)) {
keyFound.visible = true
}
)
chargingStation.startMeterValues(
connectorId,
- configuredMeterValueSampleInterval !== undefined
+ configuredMeterValueSampleInterval != null
? secondsToMilliseconds(convertToInt(configuredMeterValueSampleInterval.value))
: Constants.DEFAULT_METER_VALUES_INTERVAL
)
this.incomingRequestHandler = this.incomingRequestHandler.bind(this) as <
ReqType extends JsonType,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
- ResType extends JsonType
+ ResType extends JsonType,
>(
chargingStation: ChargingStation,
messageId: string,
commandPayload: ReqType
) => Promise<void>
this.validateIncomingRequestPayload = this.validateIncomingRequestPayload.bind(this) as <
- T extends JsonType
+ T extends JsonType,
>(
chargingStation: ChargingStation,
commandName: IncomingRequestCommand,
this.requestHandler = this.requestHandler.bind(this) as <
// eslint-disable-next-line @typescript-eslint/no-unused-vars
ReqType extends JsonType,
- ResType extends JsonType
+ ResType extends JsonType,
>(
chargingStation: ChargingStation,
commandName: RequestCommand,
>()
this.responseHandler = this.responseHandler.bind(this) as <
ReqType extends JsonType,
- ResType extends JsonType
+ ResType extends JsonType,
>(
chargingStation: ChargingStation,
commandName: RequestCommand,
}
public static startHeartbeatInterval (chargingStation: ChargingStation, interval: number): void {
- if (chargingStation.heartbeatSetInterval === undefined) {
+ if (chargingStation.heartbeatSetInterval == null) {
chargingStation.startHeartbeat()
} else if (chargingStation.getHeartbeatInterval() !== interval) {
chargingStation.restartHeartbeat()
GET = 'GET',
PUT = 'PUT',
POST = 'POST',
- PATCH = 'PATCH'
+ PATCH = 'PATCH',
}
export class UIHttpServer extends AbstractUIServer {
const [protocol, version, procedureName] = req.url?.split('/').slice(1) as [
Protocol,
ProtocolVersion,
- ProcedureName
+ ProcedureName,
]
const uuid = generateUUID()
this.responseHandlers.set(uuid, res)
if (isNotEmptyArray(payload.hashIds)) {
payload.hashIds = payload.hashIds
?.map((hashId) => {
- if (hashId !== undefined && this.uiServer.chargingStations.has(hashId)) {
+ if (hashId != null && this.uiServer.chargingStations.has(hashId)) {
return hashId
}
logger.warn(
export enum IdTagDistribution {
RANDOM = 'random',
ROUND_ROBIN = 'round-robin',
- CONNECTOR_AFFINITY = 'connector-affinity'
+ CONNECTOR_AFFINITY = 'connector-affinity',
}
export interface AutomaticTransactionGeneratorConfiguration {
registered = 'registered',
accepted = 'accepted',
updated = 'updated',
- connectorStatusChanged = 'connectorStatusChanged'
+ connectorStatusChanged = 'connectorStatusChanged',
}
export enum CurrentType {
AC = 'AC',
- DC = 'DC'
+ DC = 'DC',
}
export enum PowerUnits {
WATT = 'W',
- KILO_WATT = 'kW'
+ KILO_WATT = 'kW',
}
export enum AmpereUnits {
MILLI_AMPERE = 'mA',
CENTI_AMPERE = 'cA',
DECI_AMPERE = 'dA',
- AMPERE = 'A'
+ AMPERE = 'A',
}
export enum Voltage {
VOLTAGE_110 = 110,
VOLTAGE_230 = 230,
VOLTAGE_400 = 400,
- VOLTAGE_800 = 800
+ VOLTAGE_800 = 800,
}
export type WsOptions = ClientOptions & ClientRequestArgs
CSMSRootCertificate = 'CSMSRootCertificate',
ManufacturerRootCertificate = 'ManufacturerRootCertificate',
ChargingStationCertificate = 'ChargingStationCertificate',
- V2GCertificate = 'V2GCertificate'
+ V2GCertificate = 'V2GCertificate',
}
export interface ChargingStationTemplate {
}
enum ChargingStationMessageEvents {
- performanceStatistics = 'performanceStatistics'
+ performanceStatistics = 'performanceStatistics',
}
export const ChargingStationWorkerMessageEvents = {
log = 'log',
performanceStorage = 'performanceStorage',
worker = 'worker',
- uiServer = 'uiServer'
+ uiServer = 'uiServer',
}
export enum SupervisionUrlDistribution {
ROUND_ROBIN = 'round-robin',
RANDOM = 'random',
- CHARGING_STATION_AFFINITY = 'charging-station-affinity'
+ CHARGING_STATION_AFFINITY = 'charging-station-affinity',
}
export interface StationTemplateUrl {
export enum ApplicationProtocolVersion {
VERSION_11 = 1.1,
- VERSION_20 = 2.0
+ VERSION_20 = 2.0,
}
export interface UIServerConfiguration {
ChargingStationConfiguration = 'charging station configuration',
ChargingStationTemplate = 'charging station template',
PerformanceRecords = 'performance records',
- JsonSchema = 'json schema'
+ JsonSchema = 'json schema',
}
MONGO_DB = 'mongodb',
MYSQL = 'mysql',
MARIA_DB = 'mariadb',
- SQLITE = 'sqlite'
+ SQLITE = 'sqlite',
}
export enum DBName {
MONGO_DB = 'MongoDB',
MYSQL = 'MySQL',
MARIA_DB = 'MariaDB',
- SQLITE = 'SQLite'
+ SQLITE = 'SQLite',
}
import type { BroadcastChannelResponsePayload } from './WorkerBroadcastChannel.js'
export enum Protocol {
- UI = 'ui'
+ UI = 'ui',
}
export enum ApplicationProtocol {
HTTP = 'http',
- WS = 'ws'
+ WS = 'ws',
}
export enum AuthenticationType {
- BASIC_AUTH = 'basic-auth'
+ BASIC_AUTH = 'basic-auth',
}
export enum ProtocolVersion {
- '0.0.1' = '0.0.1'
+ '0.0.1' = '0.0.1',
}
export type ProtocolRequest = [string, ProcedureName, RequestPayload]
METER_VALUES = 'meterValues',
DATA_TRANSFER = 'dataTransfer',
DIAGNOSTICS_STATUS_NOTIFICATION = 'diagnosticsStatusNotification',
- FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification'
+ FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification',
}
export interface RequestPayload extends JsonObject {
export enum ResponseStatus {
SUCCESS = 'success',
- FAILURE = 'failure'
+ FAILURE = 'failure',
}
export interface ResponsePayload extends JsonObject {
CLOSE_SERVICE_RESTART = 1012,
CLOSE_TRY_AGAIN_LATER = 1013,
CLOSE_BAD_GATEWAY = 1014,
- CLOSE_TLS_HANDSHAKE = 1015
+ CLOSE_TLS_HANDSHAKE = 1015,
}
export interface WSError extends Error {
export type BroadcastChannelRequest = [
string,
BroadcastChannelProcedureName,
- BroadcastChannelRequestPayload
+ BroadcastChannelRequestPayload,
]
export type BroadcastChannelResponse = [string, BroadcastChannelResponsePayload]
METER_VALUES = 'meterValues',
DATA_TRANSFER = 'dataTransfer',
DIAGNOSTICS_STATUS_NOTIFICATION = 'diagnosticsStatusNotification',
- FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification'
+ FIRMWARE_STATUS_NOTIFICATION = 'firmwareStatusNotification',
}
export interface BroadcastChannelRequestPayload extends RequestPayload {
READER_FAILURE = 'ReaderFailure',
RESET_FAILURE = 'ResetFailure',
UNDER_VOLTAGE = 'UnderVoltage',
- WEAK_SIGNAL = 'WeakSignal'
+ WEAK_SIGNAL = 'WeakSignal',
}
Finishing = 'Finishing',
Reserved = 'Reserved',
Unavailable = 'Unavailable',
- Faulted = 'Faulted'
+ Faulted = 'Faulted',
}
export enum OCPP16ChargingRateUnitType {
WATT = 'W',
- AMPERE = 'A'
+ AMPERE = 'A',
}
export enum OCPP16ChargingProfileKindType {
ABSOLUTE = 'Absolute',
RECURRING = 'Recurring',
- RELATIVE = 'Relative'
+ RELATIVE = 'Relative',
}
export enum OCPP16ChargingProfilePurposeType {
CHARGE_POINT_MAX_PROFILE = 'ChargePointMaxProfile',
TX_DEFAULT_PROFILE = 'TxDefaultProfile',
- TX_PROFILE = 'TxProfile'
+ TX_PROFILE = 'TxProfile',
}
export enum OCPP16RecurrencyKindType {
DAILY = 'Daily',
- WEEKLY = 'Weekly'
+ WEEKLY = 'Weekly',
}
LocalAuthListManagement = 'LocalAuthListManagement',
Reservation = 'Reservation',
SmartCharging = 'SmartCharging',
- RemoteTrigger = 'RemoteTrigger'
+ RemoteTrigger = 'RemoteTrigger',
}
export enum OCPP16StandardParametersKey {
ChargingScheduleAllowedChargingRateUnit = 'ChargingScheduleAllowedChargingRateUnit',
ChargingScheduleMaxPeriods = 'ChargingScheduleMaxPeriods',
ConnectorSwitch3to1PhaseSupported = 'ConnectorSwitch3to1PhaseSupported',
- MaxChargingProfilesInstalled = 'MaxChargingProfilesInstalled'
+ MaxChargingProfilesInstalled = 'MaxChargingProfilesInstalled',
}
export enum OCPP16VendorParametersKey {
- ConnectionUrl = 'ConnectionUrl'
+ ConnectionUrl = 'ConnectionUrl',
}
Idle = 'Idle',
Uploaded = 'Uploaded',
UploadFailed = 'UploadFailed',
- Uploading = 'Uploading'
+ Uploading = 'Uploading',
}
TEMP_CELSIUS = 'Celsius',
TEMP_FAHRENHEIT = 'Fahrenheit',
TEMP_KELVIN = 'K',
- PERCENT = 'Percent'
+ PERCENT = 'Percent',
}
export enum OCPP16MeterValueContext {
SAMPLE_PERIODIC = 'Sample.Periodic',
TRANSACTION_BEGIN = 'Transaction.Begin',
TRANSACTION_END = 'Transaction.End',
- TRIGGER = 'Trigger'
+ TRIGGER = 'Trigger',
}
export enum OCPP16MeterValueMeasurand {
FAN_RPM = 'RPM',
STATE_OF_CHARGE = 'SoC',
TEMPERATURE = 'Temperature',
- VOLTAGE = 'Voltage'
+ VOLTAGE = 'Voltage',
}
export enum OCPP16MeterValueLocation {
CABLE = 'Cable',
EV = 'EV',
INLET = 'Inlet',
- OUTLET = 'Outlet'
+ OUTLET = 'Outlet',
}
export enum OCPP16MeterValuePhase {
L3_N = 'L3-N',
L1_L2 = 'L1-L2',
L2_L3 = 'L2-L3',
- L3_L1 = 'L3-L1'
+ L3_L1 = 'L3-L1',
}
enum OCPP16MeterValueFormat {
RAW = 'Raw',
- SIGNED_DATA = 'SignedData'
+ SIGNED_DATA = 'SignedData',
}
export interface OCPP16SampledValue extends JsonObject {
METER_VALUES = 'MeterValues',
DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification',
FIRMWARE_STATUS_NOTIFICATION = 'FirmwareStatusNotification',
- DATA_TRANSFER = 'DataTransfer'
+ DATA_TRANSFER = 'DataTransfer',
}
export enum OCPP16IncomingRequestCommand {
DATA_TRANSFER = 'DataTransfer',
UPDATE_FIRMWARE = 'UpdateFirmware',
RESERVE_NOW = 'ReserveNow',
- CANCEL_RESERVATION = 'CancelReservation'
+ CANCEL_RESERVATION = 'CancelReservation',
}
export type OCPP16HeartbeatRequest = EmptyObject
enum ResetType {
HARD = 'Hard',
- SOFT = 'Soft'
+ SOFT = 'Soft',
}
export interface ResetRequest extends JsonObject {
export enum OCPP16AvailabilityType {
Inoperative = 'Inoperative',
- Operative = 'Operative'
+ Operative = 'Operative',
}
export interface OCPP16ChangeAvailabilityRequest extends JsonObject {
Idle = 'Idle',
InstallationFailed = 'InstallationFailed',
Installing = 'Installing',
- Installed = 'Installed'
+ Installed = 'Installed',
}
export type OCPP16FirmwareStatusNotificationRequest = {
FirmwareStatusNotification = 'FirmwareStatusNotification',
Heartbeat = 'Heartbeat',
MeterValues = 'MeterValues',
- StatusNotification = 'StatusNotification'
+ StatusNotification = 'StatusNotification',
}
export interface OCPP16TriggerMessageRequest extends JsonObject {
export enum OCPP16UnlockStatus {
UNLOCKED = 'Unlocked',
UNLOCK_FAILED = 'UnlockFailed',
- NOT_SUPPORTED = 'NotSupported'
+ NOT_SUPPORTED = 'NotSupported',
}
export interface UnlockConnectorResponse extends JsonObject {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
REBOOT_REQUIRED = 'RebootRequired',
- NOT_SUPPORTED = 'NotSupported'
+ NOT_SUPPORTED = 'NotSupported',
}
export interface ChangeConfigurationResponse extends JsonObject {
export enum OCPP16ChargingProfileStatus {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
- NOT_SUPPORTED = 'NotSupported'
+ NOT_SUPPORTED = 'NotSupported',
}
export interface OCPP16GetCompositeScheduleResponse extends JsonObject {
export enum OCPP16AvailabilityStatus {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
- SCHEDULED = 'Scheduled'
+ SCHEDULED = 'Scheduled',
}
export interface OCPP16ChangeAvailabilityResponse extends JsonObject {
export enum OCPP16ClearChargingProfileStatus {
ACCEPTED = 'Accepted',
- UNKNOWN = 'Unknown'
+ UNKNOWN = 'Unknown',
}
export interface OCPP16ClearChargingProfileResponse extends JsonObject {
export enum OCPP16TriggerMessageStatus {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
- NOT_IMPLEMENTED = 'NotImplemented'
+ NOT_IMPLEMENTED = 'NotImplemented',
}
export interface OCPP16TriggerMessageResponse extends JsonObject {
ACCEPTED = 'Accepted',
REJECTED = 'Rejected',
UNKNOWN_MESSAGE_ID = 'UnknownMessageId',
- UNKNOWN_VENDOR_ID = 'UnknownVendorId'
+ UNKNOWN_VENDOR_ID = 'UnknownVendorId',
}
export interface OCPP16DataTransferResponse extends JsonObject {
OCCUPIED = 'Occupied',
REJECTED = 'Rejected',
UNAVAILABLE = 'Unavailable',
- NOT_SUPPORTED = 'NotSupported'
+ NOT_SUPPORTED = 'NotSupported',
}
export interface OCPP16ReserveNowResponse extends JsonObject {
REMOTE = 'Remote',
SOFT_RESET = 'SoftReset',
UNLOCK_COMMAND = 'UnlockCommand',
- DE_AUTHORIZED = 'DeAuthorized'
+ DE_AUTHORIZED = 'DeAuthorized',
}
export enum OCPP16AuthorizationStatus {
BLOCKED = 'Blocked',
EXPIRED = 'Expired',
INVALID = 'Invalid',
- CONCURRENT_TX = 'ConcurrentTx'
+ CONCURRENT_TX = 'ConcurrentTx',
}
interface IdTagInfo extends JsonObject {
boolean = 'boolean',
OptionList = 'OptionList',
SequenceList = 'SequenceList',
- MemberList = 'MemberList'
+ MemberList = 'MemberList',
}
export enum BootReasonEnumType {
ScheduledReset = 'ScheduledReset',
Triggered = 'Triggered',
Unknown = 'Unknown',
- Watchdog = 'Watchdog'
+ Watchdog = 'Watchdog',
}
export enum OperationalStatusEnumType {
Operative = 'Operative',
- Inoperative = 'Inoperative'
+ Inoperative = 'Inoperative',
}
export enum OCPP20ConnectorStatusEnumType {
Occupied = 'Occupied',
Reserved = 'Reserved',
Unavailable = 'Unavailable',
- Faulted = 'Faulted'
+ Faulted = 'Faulted',
}
export type GenericStatusEnumType = GenericStatus
export enum HashAlgorithmEnumType {
SHA256 = 'SHA256',
SHA384 = 'SHA384',
- SHA512 = 'SHA512'
+ SHA512 = 'SHA512',
}
export enum GetCertificateIdUseEnumType {
MORootCertificate = 'MORootCertificate',
CSMSRootCertificate = 'CSMSRootCertificate',
V2GCertificateChain = 'V2GCertificateChain',
- ManufacturerRootCertificate = 'ManufacturerRootCertificate'
+ ManufacturerRootCertificate = 'ManufacturerRootCertificate',
}
export enum GetCertificateStatusEnumType {
Accepted = 'Accepted',
- Failed = 'Failed'
+ Failed = 'Failed',
}
export enum GetInstalledCertificateStatusEnumType {
Accepted = 'Accepted',
- NotFound = 'NotFound'
+ NotFound = 'NotFound',
}
export enum InstallCertificateStatusEnumType {
Accepted = 'Accepted',
Rejected = 'Rejected',
- Failed = 'Failed'
+ Failed = 'Failed',
}
export enum InstallCertificateUseEnumType {
V2GRootCertificate = 'V2GRootCertificate',
MORootCertificate = 'MORootCertificate',
CSMSRootCertificate = 'CSMSRootCertificate',
- ManufacturerRootCertificate = 'ManufacturerRootCertificate'
+ ManufacturerRootCertificate = 'ManufacturerRootCertificate',
}
export enum DeleteCertificateStatusEnumType {
Accepted = 'Accepted',
Failed = 'Failed',
- NotFound = 'NotFound'
+ NotFound = 'NotFound',
}
export enum CertificateActionEnumType {
Install = 'Install',
- Update = 'Update'
+ Update = 'Update',
}
export enum CertificateSigningUseEnumType {
ChargingStationCertificate = 'ChargingStationCertificate',
- V2GCertificate = 'V2GCertificate'
+ V2GCertificate = 'V2GCertificate',
}
export type CertificateSignedStatusEnumType = GenericStatusEnumType
export enum OCPP20RequestCommand {
BOOT_NOTIFICATION = 'BootNotification',
HEARTBEAT = 'Heartbeat',
- STATUS_NOTIFICATION = 'StatusNotification'
+ STATUS_NOTIFICATION = 'StatusNotification',
}
export enum OCPP20IncomingRequestCommand {
CLEAR_CACHE = 'ClearCache',
REQUEST_START_TRANSACTION = 'RequestStartTransaction',
- REQUEST_STOP_TRANSACTION = 'RequestStopTransaction'
+ REQUEST_STOP_TRANSACTION = 'RequestStopTransaction',
}
type ModemType = {
SecurityCtrlr = 'SecurityCtrlr',
SmartChargingCtrlr = 'SmartChargingCtrlr',
TariffCostCtrlr = 'TariffCostCtrlr',
- TxCtrlr = 'TxCtrlr'
+ TxCtrlr = 'TxCtrlr',
}
export enum OCPP20RequiredVariableName {
TxEndedMeasurands = 'TxEndedMeasurands',
TxStartedMeasurands = 'TxStartedMeasurands',
TxUpdatedMeasurands = 'TxUpdatedMeasurands',
- TxUpdatedInterval = 'TxUpdatedInterval'
+ TxUpdatedInterval = 'TxUpdatedInterval',
}
export enum OCPP20OptionalVariableName {
HeartbeatInterval = 'HeartbeatInterval',
- WebSocketPingInterval = 'WebSocketPingInterval'
+ WebSocketPingInterval = 'WebSocketPingInterval',
}
export enum OCPP20VendorVariableName {
- ConnectionUrl = 'ConnectionUrl'
+ ConnectionUrl = 'ConnectionUrl',
}
enum AttributeEnumType {
Actual = 'Actual',
Target = 'Target',
MinSet = 'MinSet',
- MaxSet = 'MaxSet'
+ MaxSet = 'MaxSet',
}
type ComponentType = {
UnknownComponent = 'UnknownComponent',
UnknownVariable = 'UnknownVariable',
NotSupportedAttributeType = 'NotSupportedAttributeType',
- RebootRequired = 'RebootRequired'
+ RebootRequired = 'RebootRequired',
}
export type OCPP20SetVariableResultType = {
export enum GenericStatus {
Accepted = 'Accepted',
- Rejected = 'Rejected'
+ Rejected = 'Rejected',
}
export interface GenericResponse extends JsonObject {
export enum RegistrationStatusEnumType {
ACCEPTED = 'Accepted',
PENDING = 'Pending',
- REJECTED = 'Rejected'
+ REJECTED = 'Rejected',
}
SRT = 'SRT',
STR = 'STR',
TRS = 'TRS',
- TSR = 'TSR'
+ TSR = 'TSR',
}
export type ConfigurationKeyType = string | StandardParametersKey | VendorParametersKey
// Payload for Action is syntactically correct but at least one of the fields violates data type constraints (e.g. "somestring" = 12)
TYPE_CONSTRAINT_VIOLATION = 'TypeConstraintViolation',
// Any other error not covered by the previous ones
- GENERIC_ERROR = 'GenericError'
+ GENERIC_ERROR = 'GenericError',
}
export enum MessageType {
CALL_MESSAGE = 2, // Caller to Callee
CALL_RESULT_MESSAGE = 3, // Callee to Caller
- CALL_ERROR_MESSAGE = 4 // Callee to Caller
+ CALL_ERROR_MESSAGE = 4, // Callee to Caller
}
export enum OCPPProtocol {
- JSON = 'json'
+ JSON = 'json',
}
export enum OCPPVersion {
VERSION_16 = '1.6',
VERSION_20 = '2.0',
- VERSION_201 = '2.0.1'
+ VERSION_201 = '2.0.1',
}
ResponseCallback,
ErrorCallback,
RequestCommand | IncomingRequestCommand,
- JsonType
+ JsonType,
]
export const MessageTrigger = {
TRANSACTION_STARTED = 'TransactionStarted',
CONNECTOR_STATE_CHANGED = 'ConnectorStateChanged',
RESERVATION_CANCELED = 'ReservationCanceled',
- REPLACE_EXISTING = 'ReplaceExisting'
+ REPLACE_EXISTING = 'ReplaceExisting',
}
export enum AsyncLockType {
configuration = 'configuration',
- performance = 'performance'
+ performance = 'performance',
}
type ResolveType = (value: void | PromiseLike<void>) => void
export const enum OutputFormat {
configuration = 'configuration',
- worker = 'worker'
+ worker = 'worker',
}
export const buildEvsesStatus = (
public splice (start: number, deleteCount?: number, ...items: T[]): CircularArray<T> {
let itemsRemoved: T[] = []
- if (arguments.length >= 3 && deleteCount !== undefined) {
+ if (arguments.length >= 3 && deleteCount != null) {
itemsRemoved = super.splice(start, deleteCount, ...items)
if (this.length > this.size) {
const itemsOverflowing = super.splice(0, this.length - this.size)
elementsPerWorker: ElementsPerWorkerType | undefined
): void => {
if (
- elementsPerWorker !== undefined &&
+ elementsPerWorker != null &&
elementsPerWorker !== 'auto' &&
elementsPerWorker !== 'all' &&
!Number.isSafeInteger(elementsPerWorker)
workerSet = 'workerSet',
/** @experimental */
dynamicPool = 'dynamicPool',
- fixedPool = 'fixedPool'
+ fixedPool = 'fixedPool',
}
export interface SetInfo {
stopped = 'stopped',
error = 'error',
elementStarted = 'elementStarted',
- elementError = 'elementError'
+ elementError = 'elementError',
}
export const WorkerEvents = {
export enum WorkerMessageEvents {
startWorkerElement = 'startWorkerElement',
startWorkerElementError = 'startWorkerElementError',
- startedWorkerElement = 'startedWorkerElement'
+ startedWorkerElement = 'startedWorkerElement',
}
root: true,
env: {
- node: true
+ node: true,
},
plugins: ['import'],
'plugin:import/recommended',
'plugin:vue/vue3-recommended',
'@vue/eslint-config-prettier',
- '@vue/eslint-config-typescript/recommended'
+ '@vue/eslint-config-typescript/recommended',
],
settings: {
'import/resolver': {
typescript: {
- project: './tsconfig.json'
- }
- }
+ project: './tsconfig.json',
+ },
+ },
},
parserOptions: {
- ecmaVersion: 'latest'
+ ecmaVersion: 'latest',
},
rules: {
'sort-imports': [
'error',
{
- ignoreDeclarationSort: true
- }
+ ignoreDeclarationSort: true,
+ },
],
- 'import/order': 'error'
- }
+ 'import/order': 'error',
+ },
})
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',
}
"printWidth": 100,
"semi": false,
"singleQuote": true,
- "trailingComma": "none"
+ "trailingComma": "es5"
}
"dependencies": {
"finalhandler": "^1.2.0",
"serve-static": "^1.15.0",
- "vue": "^3.3.13",
+ "vue": "^3.4.0",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@types/node": "^20.10.5",
"@typescript-eslint/eslint-plugin": "^6.16.0",
"@typescript-eslint/parser": "^6.16.0",
- "@vitejs/plugin-vue": "^5.0.0",
+ "@vitejs/plugin-vue": "^5.0.1",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vitest/coverage-v8": "^1.1.0",
- "@vue/eslint-config-prettier": "^8.0.0",
+ "@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^2.4.3",
"@vue/tsconfig": "^0.5.1",
specifier: ^1.15.0
version: 1.15.0
vue:
- specifier: ^3.3.13
- version: 3.3.13(typescript@5.3.3)
+ specifier: ^3.4.0
+ version: 3.4.0(typescript@5.3.3)
vue-router:
specifier: ^4.2.5
- version: 4.2.5(vue@3.3.13)
+ version: 4.2.5(vue@3.4.0)
devDependencies:
'@tsconfig/node20':
specifier: ^6.16.0
version: 6.16.0(eslint@8.56.0)(typescript@5.3.3)
'@vitejs/plugin-vue':
- specifier: ^5.0.0
- version: 5.0.0(vite@5.0.10)(vue@3.3.13)
+ specifier: ^5.0.1
+ version: 5.0.1(vite@5.0.10)(vue@3.4.0)
'@vitejs/plugin-vue-jsx':
specifier: ^3.1.0
- version: 3.1.0(vite@5.0.10)(vue@3.3.13)
+ version: 3.1.0(vite@5.0.10)(vue@3.4.0)
'@vitest/coverage-v8':
specifier: ^1.1.0
version: 1.1.0(vitest@1.1.0)
'@vue/eslint-config-prettier':
- specifier: ^8.0.0
- version: 8.0.0(eslint@8.56.0)(prettier@3.1.1)
+ specifier: ^9.0.0
+ version: 9.0.0(eslint@8.56.0)(prettier@3.1.1)
'@vue/eslint-config-typescript':
specifier: ^12.0.0
version: 12.0.0(eslint-plugin-vue@9.19.2)(eslint@8.56.0)(typescript@5.3.3)
'@vue/test-utils':
specifier: ^2.4.3
- version: 2.4.3(vue@3.3.13)
+ version: 2.4.3(vue@3.4.0)
'@vue/tsconfig':
specifier: ^0.5.1
version: 0.5.1
resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==}
dev: true
- /@vitejs/plugin-vue-jsx@3.1.0(vite@5.0.10)(vue@3.3.13):
+ /@vitejs/plugin-vue-jsx@3.1.0(vite@5.0.10)(vue@3.4.0):
resolution: {integrity: sha512-w9M6F3LSEU5kszVb9An2/MmXNxocAnUb3WhRr8bHlimhDrXNt6n6D2nJQR3UXpGlZHh/EsgouOHCsM8V3Ln+WA==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
'@babel/plugin-transform-typescript': 7.23.6(@babel/core@7.23.6)
'@vue/babel-plugin-jsx': 1.1.5(@babel/core@7.23.6)
vite: 5.0.10(@types/node@20.10.5)
- vue: 3.3.13(typescript@5.3.3)
+ vue: 3.4.0(typescript@5.3.3)
transitivePeerDependencies:
- supports-color
dev: true
- /@vitejs/plugin-vue@5.0.0(vite@5.0.10)(vue@3.3.13):
- resolution: {integrity: sha512-7x5e8X4J1Wi4NxudGjJBd2OFerAi/0nzF80ojCzvfj347WVr0YSn82C8BSsgwSHzlk9Kw5xnZfj0/7RLnNwP5w==}
+ /@vitejs/plugin-vue@5.0.1(vite@5.0.10)(vue@3.4.0):
+ resolution: {integrity: sha512-lwvZX5tDhJpRJEKsjoUSWgaD26Lk9X4aDYGAPpr/Q6cLTT3PC8LPu2dsnYEweAZiNgHsbyKL2Svc/CDrFOsbtw==}
engines: {node: ^18.0.0 || >=20.0.0}
peerDependencies:
vite: ^5.0.0
vue: ^3.2.25
dependencies:
vite: 5.0.10(@types/node@20.10.5)
- vue: 3.3.13(typescript@5.3.3)
+ vue: 3.4.0(typescript@5.3.3)
dev: true
/@vitest/coverage-v8@1.1.0(vitest@1.1.0):
- supports-color
dev: true
- /@vue/compiler-core@3.3.13:
- resolution: {integrity: sha512-bwi9HShGu7uaZLOErZgsH2+ojsEdsjerbf2cMXPwmvcgZfVPZ2BVZzCVnwZBxTAYd6Mzbmf6izcUNDkWnBBQ6A==}
+ /@vue/compiler-core@3.4.0:
+ resolution: {integrity: sha512-cw4S15PkNGTKkP9OFFl4wnQoJJk+HqaYBafgrpDnSukiQGpcYJeRpzmqnCVCIkl6V6Eqsv58E0OAdl6b592vuA==}
dependencies:
'@babel/parser': 7.23.6
- '@vue/shared': 3.3.13
+ '@vue/shared': 3.4.0
+ entities: 4.5.0
estree-walker: 2.0.2
source-map-js: 1.0.2
- /@vue/compiler-dom@3.3.13:
- resolution: {integrity: sha512-EYRDpbLadGtNL0Gph+HoKiYqXLqZ0xSSpR5Dvnu/Ep7ggaCbjRDIus1MMxTS2Qm0koXED4xSlvTZaTnI8cYAsw==}
+ /@vue/compiler-dom@3.4.0:
+ resolution: {integrity: sha512-E957uOhpoE48YjZGWeAoLmNYd3UeU4oIP8kJi8Rcsb9l2tV8Z48Jn07Zgq1aW0v3vuhlmydEKkKKbhLpADHXEA==}
dependencies:
- '@vue/compiler-core': 3.3.13
- '@vue/shared': 3.3.13
+ '@vue/compiler-core': 3.4.0
+ '@vue/shared': 3.4.0
- /@vue/compiler-sfc@3.3.13:
- resolution: {integrity: sha512-DQVmHEy/EKIgggvnGRLx21hSqnr1smUS9Aq8tfxiiot8UR0/pXKHN9k78/qQ7etyQTFj5em5nruODON7dBeumw==}
+ /@vue/compiler-sfc@3.4.0:
+ resolution: {integrity: sha512-PWE0mE2yW7bJS7PmaCrVDEG6KPaDJo0pb4AKnCxJ5lRRDO4IwL/fswBGhCpov+v/c+N/e+hQHpXNwvqU9BtUXg==}
dependencies:
'@babel/parser': 7.23.6
- '@vue/compiler-core': 3.3.13
- '@vue/compiler-dom': 3.3.13
- '@vue/compiler-ssr': 3.3.13
- '@vue/reactivity-transform': 3.3.13
- '@vue/shared': 3.3.13
+ '@vue/compiler-core': 3.4.0
+ '@vue/compiler-dom': 3.4.0
+ '@vue/compiler-ssr': 3.4.0
+ '@vue/shared': 3.4.0
estree-walker: 2.0.2
magic-string: 0.30.5
postcss: 8.4.32
source-map-js: 1.0.2
- /@vue/compiler-ssr@3.3.13:
- resolution: {integrity: sha512-d/P3bCeUGmkJNS1QUZSAvoCIW4fkOKK3l2deE7zrp0ypJEy+En2AcypIkqvcFQOcw3F0zt2VfMvNsA9JmExTaw==}
+ /@vue/compiler-ssr@3.4.0:
+ resolution: {integrity: sha512-+oXKy105g9DIYQKDi3Gwung0xqQX5gJHr0GR+Vf7yK/WkNDM6q61ummcKmKAB85EIst8y3vj2PA9z9YU5Oc4DQ==}
dependencies:
- '@vue/compiler-dom': 3.3.13
- '@vue/shared': 3.3.13
+ '@vue/compiler-dom': 3.4.0
+ '@vue/shared': 3.4.0
/@vue/devtools-api@6.5.1:
resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==}
dev: false
- /@vue/eslint-config-prettier@8.0.0(eslint@8.56.0)(prettier@3.1.1):
- resolution: {integrity: sha512-55dPqtC4PM/yBjhAr+yEw6+7KzzdkBuLmnhBrDfp4I48+wy+Giqqj9yUr5T2uD/BkBROjjmqnLZmXRdOx/VtQg==}
+ /@vue/eslint-config-prettier@9.0.0(eslint@8.56.0)(prettier@3.1.1):
+ resolution: {integrity: sha512-z1ZIAAUS9pKzo/ANEfd2sO+v2IUalz7cM/cTLOZ7vRFOPk5/xuRKQteOu1DErFLAh/lYGXMVZ0IfYKlyInuDVg==}
peerDependencies:
eslint: '>= 8.0.0'
prettier: '>= 3.0.0'
dependencies:
eslint: 8.56.0
- eslint-config-prettier: 8.10.0(eslint@8.56.0)
- eslint-plugin-prettier: 5.1.2(eslint-config-prettier@8.10.0)(eslint@8.56.0)(prettier@3.1.1)
+ eslint-config-prettier: 9.1.0(eslint@8.56.0)
+ eslint-plugin-prettier: 5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1)
prettier: 3.1.1
transitivePeerDependencies:
- '@types/eslint'
- supports-color
dev: true
- /@vue/reactivity-transform@3.3.13:
- resolution: {integrity: sha512-oWnydGH0bBauhXvh5KXUy61xr9gKaMbtsMHk40IK9M4gMuKPJ342tKFarY0eQ6jef8906m35q37wwA8DMZOm5Q==}
+ /@vue/reactivity@3.4.0:
+ resolution: {integrity: sha512-X6BvQjNcgKKHWPQzlRJjZvIu72Kkn8xJSv6VNptqWh8dToMknD0Hch1l4N7llKgVt6Diq4lMeUnErbZFvuGlAA==}
dependencies:
- '@babel/parser': 7.23.6
- '@vue/compiler-core': 3.3.13
- '@vue/shared': 3.3.13
- estree-walker: 2.0.2
- magic-string: 0.30.5
+ '@vue/shared': 3.4.0
- /@vue/reactivity@3.3.13:
- resolution: {integrity: sha512-fjzCxceMahHhi4AxUBzQqqVhuA21RJ0COaWTbIBl1PruGW1CeY97louZzLi4smpYx+CHfFPPU/CS8NybbGvPKQ==}
+ /@vue/runtime-core@3.4.0:
+ resolution: {integrity: sha512-NYrj/JgMMqnSWcIud8lLzDQrBLu+EVEeQ56QE9DYJeKG2eFrnQy8o/h57R9nCprafHs0uImKL3xsdXjHseYVxw==}
dependencies:
- '@vue/shared': 3.3.13
+ '@vue/reactivity': 3.4.0
+ '@vue/shared': 3.4.0
- /@vue/runtime-core@3.3.13:
- resolution: {integrity: sha512-1TzA5TvGuh2zUwMJgdfvrBABWZ7y8kBwBhm7BXk8rvdx2SsgcGfz2ruv2GzuGZNvL1aKnK8CQMV/jFOrxNQUMA==}
+ /@vue/runtime-dom@3.4.0:
+ resolution: {integrity: sha512-1ZoHEsA5l77qbx2F+SWo/hQdBksPuOmww1t/jznidDG+xMB/iidafEFvo2ZTtZii0JfTIrlDhjshfYUvQC17wQ==}
dependencies:
- '@vue/reactivity': 3.3.13
- '@vue/shared': 3.3.13
-
- /@vue/runtime-dom@3.3.13:
- resolution: {integrity: sha512-JJkpE8R/hJKXqVTgUoODwS5wqKtOsmJPEqmp90PDVGygtJ4C0PtOkcEYXwhiVEmef6xeXcIlrT3Yo5aQ4qkHhQ==}
- dependencies:
- '@vue/runtime-core': 3.3.13
- '@vue/shared': 3.3.13
+ '@vue/runtime-core': 3.4.0
+ '@vue/shared': 3.4.0
csstype: 3.1.3
- /@vue/server-renderer@3.3.13(vue@3.3.13):
- resolution: {integrity: sha512-vSnN+nuf6iSqTL3Qgx/9A+BT+0Zf/VJOgF5uMZrKjYPs38GMYyAU1coDyBNHauehXDaP+zl73VhwWv0vBRBHcg==}
+ /@vue/server-renderer@3.4.0(vue@3.4.0):
+ resolution: {integrity: sha512-GuOVCyLDlWPu8nKo5AUxb8B+iB/Ik4I1WwqAlBqf5+y48z6D6rvKshp7KR3cJea+pte1tdTsb0+Ja82KizMZOw==}
peerDependencies:
- vue: 3.3.13
+ vue: 3.4.0
dependencies:
- '@vue/compiler-ssr': 3.3.13
- '@vue/shared': 3.3.13
- vue: 3.3.13(typescript@5.3.3)
+ '@vue/compiler-ssr': 3.4.0
+ '@vue/shared': 3.4.0
+ vue: 3.4.0(typescript@5.3.3)
- /@vue/shared@3.3.13:
- resolution: {integrity: sha512-/zYUwiHD8j7gKx2argXEMCUXVST6q/21DFU0sTfNX0URJroCe3b1UF6vLJ3lQDfLNIiiRl2ONp7Nh5UVWS6QnA==}
+ /@vue/shared@3.4.0:
+ resolution: {integrity: sha512-Nhh3ed3G1R6HDAWiG6YYFt0Zmq/To6u5vjzwa9TIquGheCXPY6nEdIAO8ZdlwXsWqC2yNLj700FOvShpYt5CEA==}
- /@vue/test-utils@2.4.3(vue@3.3.13):
+ /@vue/test-utils@2.4.3(vue@3.4.0):
resolution: {integrity: sha512-F4K7mF+ad++VlTrxMJVRnenKSJmO6fkQt2wpRDiKDesQMkfpniGWsqEi/JevxGBo2qEkwwjvTUAoiGJLNx++CA==}
peerDependencies:
'@vue/server-renderer': ^3.0.1
optional: true
dependencies:
js-beautify: 1.14.11
- vue: 3.3.13(typescript@5.3.3)
+ vue: 3.4.0(typescript@5.3.3)
vue-component-type-helpers: 1.8.27
dev: true
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
dev: true
- /acorn-jsx@5.3.2(acorn@8.11.2):
+ /acorn-jsx@5.3.2(acorn@8.11.3):
resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==}
peerDependencies:
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
dev: true
/acorn-walk@8.3.1:
engines: {node: '>=0.4.0'}
dev: true
- /acorn@8.11.2:
- resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==}
+ /acorn@8.11.3:
+ resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==}
engines: {node: '>=0.4.0'}
hasBin: true
dev: true
/entities@4.5.0:
resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==}
engines: {node: '>=0.12'}
- dev: true
/es-abstract@1.22.3:
resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==}
engines: {node: '>=10'}
dev: true
- /eslint-config-prettier@8.10.0(eslint@8.56.0):
- resolution: {integrity: sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==}
+ /eslint-config-prettier@9.1.0(eslint@8.56.0):
+ resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==}
hasBin: true
peerDependencies:
eslint: '>=7.0.0'
- supports-color
dev: true
- /eslint-plugin-prettier@5.1.2(eslint-config-prettier@8.10.0)(eslint@8.56.0)(prettier@3.1.1):
+ /eslint-plugin-prettier@5.1.2(eslint-config-prettier@9.1.0)(eslint@8.56.0)(prettier@3.1.1):
resolution: {integrity: sha512-dhlpWc9vOwohcWmClFcA+HjlvUpuyynYs0Rf+L/P6/0iQE6vlHW9l5bkfzN62/Stm9fbq8ku46qzde76T1xlSg==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
optional: true
dependencies:
eslint: 8.56.0
- eslint-config-prettier: 8.10.0(eslint@8.56.0)
+ eslint-config-prettier: 9.1.0(eslint@8.56.0)
prettier: 3.1.1
prettier-linter-helpers: 1.0.0
synckit: 0.8.8
eslint: 8.56.0
natural-compare: 1.4.0
nth-check: 2.1.1
- postcss-selector-parser: 6.0.14
+ postcss-selector-parser: 6.0.15
semver: 7.5.4
vue-eslint-parser: 9.3.2(eslint@8.56.0)
xml-name-validator: 4.0.0
resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dependencies:
- acorn: 8.11.2
- acorn-jsx: 5.3.2(acorn@8.11.2)
+ acorn: 8.11.3
+ acorn-jsx: 5.3.2(acorn@8.11.3)
eslint-visitor-keys: 3.4.3
dev: true
/mlly@1.4.2:
resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==}
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
pathe: 1.1.1
pkg-types: 1.0.3
ufo: 1.3.2
pathe: 1.1.1
dev: true
- /postcss-selector-parser@6.0.14:
- resolution: {integrity: sha512-65xXYsT40i9GyWzlHQ5ShZoK7JZdySeOozi/tz2EezDo6c04q6+ckYMeoY7idaie1qp2dT5KoYQ2yky6JuoHnA==}
+ /postcss-selector-parser@6.0.15:
+ resolution: {integrity: sha512-rEYkQOMUCEMhsKbK66tbEU9QVIxbhN18YiniAwA7XQYTVBqrBy+P2p5JcdqsHgKM2zWylp8d7J6eszocfds5Sw==}
engines: {node: '>=4'}
dependencies:
cssesc: 3.0.0
/strip-literal@1.3.0:
resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==}
dependencies:
- acorn: 8.11.2
+ acorn: 8.11.3
dev: true
/supports-color@5.5.0:
- supports-color
dev: true
- /vue-router@4.2.5(vue@3.3.13):
+ /vue-router@4.2.5(vue@3.4.0):
resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==}
peerDependencies:
vue: ^3.2.0
dependencies:
'@vue/devtools-api': 6.5.1
- vue: 3.3.13(typescript@5.3.3)
+ vue: 3.4.0(typescript@5.3.3)
dev: false
- /vue@3.3.13(typescript@5.3.3):
- resolution: {integrity: sha512-LDnUpQvDgsfc0u/YgtAgTMXJlJQqjkxW1PVcOnJA5cshPleULDjHi7U45pl2VJYazSSvLH8UKcid/kzH8I0a0Q==}
+ /vue@3.4.0(typescript@5.3.3):
+ resolution: {integrity: sha512-iTE9Ve/7DO/H39+gXHrNkRdnh1jDwPe/fap4brbPKkp1APMkS03OiZ+UY0dwpqtRX0iPWQTkh8Fu3hKgLtaxfA==}
peerDependencies:
typescript: '*'
peerDependenciesMeta:
typescript:
optional: true
dependencies:
- '@vue/compiler-dom': 3.3.13
- '@vue/compiler-sfc': 3.3.13
- '@vue/runtime-dom': 3.3.13
- '@vue/server-renderer': 3.3.13(vue@3.3.13)
- '@vue/shared': 3.3.13
+ '@vue/compiler-dom': 3.4.0
+ '@vue/compiler-sfc': 3.4.0
+ '@vue/runtime-dom': 3.4.0
+ '@vue/server-renderer': 3.4.0(vue@3.4.0)
+ '@vue/shared': 3.4.0
typescript: 5.3.3
/w3c-xmlserializer@5.0.0:
uiServer: {
host: 'localhost',
port: 8080,
- protocol: 'ui0.0.1'
- }
+ protocol: 'ui0.0.1',
+ },
}
export default config
type ProtocolResponse,
type RequestPayload,
type ResponsePayload,
- ResponseStatus
+ ResponseStatus,
} from '@/types'
import config from '@/assets/config'
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, {
- hashIds: [hashId]
+ hashIds: [hashId],
})
}
return this.sendRequest(ProcedureName.START_TRANSACTION, {
hashIds: [hashId],
connectorId,
- idTag
+ idTag,
})
}
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_TRANSACTION, {
hashIds: [hashId],
- transactionId
+ transactionId,
})
}
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.START_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
- connectorIds: [connectorId]
+ connectorIds: [connectorId],
})
}
): Promise<ResponsePayload> {
return this.sendRequest(ProcedureName.STOP_AUTOMATIC_TRANSACTION_GENERATOR, {
hashIds: [hashId],
- connectorIds: [connectorId]
+ connectorIds: [connectorId],
})
}
}
// const isIterable = <T>(obj: T): boolean => {
-// if (obj === null || obj === undefined) {
+// if (obj == null) {
// return false
// }
// return typeof (obj as unknown as Iterable<T>)[Symbol.iterator] === 'function'
{
path: '/',
name: 'charging-stations',
- component: ChargingStationsView
- }
+ component: ChargingStationsView,
+ },
]
const router = createRouter({
history: createWebHistory(),
- routes
+ routes,
})
export default router
Idle = 'Idle',
InstallationFailed = 'InstallationFailed',
Installing = 'Installing',
- Installed = 'Installed'
+ Installed = 'Installed',
}
export const FirmwareStatus = {
- ...OCPP16FirmwareStatus
+ ...OCPP16FirmwareStatus,
} as const
export type FirmwareStatus = OCPP16FirmwareStatus
REMOTE_START_TRANSACTION = 'RemoteStartTransaction',
REMOTE_STOP_TRANSACTION = 'RemoteStopTransaction',
GET_DIAGNOSTICS = 'GetDiagnostics',
- TRIGGER_MESSAGE = 'TriggerMessage'
+ TRIGGER_MESSAGE = 'TriggerMessage',
}
export const IncomingRequestCommand = {
- ...OCPP16IncomingRequestCommand
+ ...OCPP16IncomingRequestCommand,
} as const
export type IncomingRequestCommand = OCPP16IncomingRequestCommand
START_TRANSACTION = 'StartTransaction',
STOP_TRANSACTION = 'StopTransaction',
METER_VALUES = 'MeterValues',
- DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification'
+ DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification',
}
export const RequestCommand = {
- ...OCPP16RequestCommand
+ ...OCPP16RequestCommand,
} as const
export type RequestCommand = OCPP16RequestCommand
export enum OCPP16RegistrationStatus {
ACCEPTED = 'Accepted',
PENDING = 'Pending',
- REJECTED = 'Rejected'
+ REJECTED = 'Rejected',
}
export interface OCPP16BootNotificationResponse extends JsonObject {
FirmwareStatusNotification = 'FirmwareStatusNotification',
Heartbeat = 'Heartbeat',
MeterValues = 'MeterValues',
- StatusNotification = 'StatusNotification'
+ StatusNotification = 'StatusNotification',
}
export const MessageTrigger = {
- ...OCPP16MessageTrigger
+ ...OCPP16MessageTrigger,
} as const
export type MessageTrigger = OCPP16MessageTrigger
export enum OCPPVersion {
VERSION_16 = '1.6',
- VERSION_20 = '2.0'
+ VERSION_20 = '2.0',
}
export enum OCPPProtocol {
- JSON = 'json'
+ JSON = 'json',
}
export enum CurrentType {
AC = 'AC',
- DC = 'DC'
+ DC = 'DC',
}
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',
- AMPERE = 'A'
+ AMPERE = 'A',
}
export type ConnectorStatus = {
export enum OCPP16AvailabilityType {
INOPERATIVE = 'Inoperative',
- OPERATIVE = 'Operative'
+ OPERATIVE = 'Operative',
}
export type AvailabilityType = OCPP16AvailabilityType
FINISHING = 'Finishing',
RESERVED = 'Reserved',
UNAVAILABLE = 'Unavailable',
- FAULTED = 'Faulted'
+ FAULTED = 'Faulted',
}
export type ChargePointStatus = OCPP16ChargePointStatus
import type { JsonObject } from './JsonType'
export enum Protocol {
- UI = 'ui'
+ UI = 'ui',
}
export enum ApplicationProtocol {
HTTP = 'http',
- WS = 'ws'
+ WS = 'ws',
}
export enum ProtocolVersion {
- '0.0.1' = '0.0.1'
+ '0.0.1' = '0.0.1',
}
export type ProtocolRequest = [string, ProcedureName, RequestPayload]
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 enum ResponseStatus {
SUCCESS = 'success',
- FAILURE = 'failure'
+ FAILURE = 'failure',
}
export interface ResponsePayload extends JsonObject {
export type {
ChargingStationData,
ChargingStationInfo,
- ConnectorStatus
+ ConnectorStatus,
} from './ChargingStationType'
export type { BaseConfig } from './ConfigurationType'
export {
type ProtocolResponse,
type RequestPayload,
type ResponsePayload,
- ResponseStatus
+ ResponseStatus,
} from './UIProtocol'
const state: State = reactive({
isLoading: false,
chargingStations: [],
- idTag: ''
+ idTag: '',
})
async function load(): Promise<void> {
import finalhandler from 'finalhandler'
import serveStatic from 'serve-static'
-const isCFEnvironment = env.VCAP_APPLICATION !== undefined
+const isCFEnvironment = env.VCAP_APPLICATION != null
const PORT = isCFEnvironment ? parseInt(env.PORT) : 3030
const uiPath = join(dirname(fileURLToPath(import.meta.url)), './dist')
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')
plugins: [vue(), vueJsx()],
resolve: {
alias: {
- '@': fileURLToPath(new URL('./src', import.meta.url))
- }
- }
+ '@': fileURLToPath(new URL('./src', import.meta.url)),
+ },
+ },
})
root: fileURLToPath(new URL('./', import.meta.url)),
coverage: {
provider: 'v8',
- reporter: ['text', 'lcov']
- }
- }
+ reporter: ['text', 'lcov'],
+ },
+ },
})
)