From: Jérôme Benoit Date: Wed, 5 May 2021 17:15:11 +0000 (+0200) Subject: Cleanups and dependency update. X-Git-Tag: v1.0.1-0~33 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bb80986b8d8724de94e2b307aef9b63c45cdfce3;p=e-mobility-charging-stations-simulator.git Cleanups and dependency update. Signed-off-by: Jérôme Benoit --- diff --git a/package-lock.json b/package-lock.json index e1baf334..71a88485 100644 --- a/package-lock.json +++ b/package-lock.json @@ -299,10 +299,15 @@ } }, "@es-joy/jsdoccomment": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.1.1.tgz", - "integrity": "sha512-6lIx5Pjc50D7VJU9lfRZ1twfIrIwQk+aeT9Ink2C07IUu/y9pxkIpDqmhY/VN3jAW42dA5z6ioOdyhOZZU1isw==", - "dev": true + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.4.3.tgz", + "integrity": "sha512-t0JWZfQiG+Qkr6+tl05dlGcgE/MMPqs7QfNlFkTsbpcCu2Zfukcan/fIiHKTc0iOs4Yh3cnfklMayJnlmKaOwQ==", + "dev": true, + "requires": { + "comment-parser": "^1.1.5", + "esquery": "^1.4.0", + "jsdoctypeparser": "^9.0.0" + } }, "@eslint/eslintrc": { "version": "0.4.0", @@ -705,9 +710,9 @@ "dev": true }, "@types/node": { - "version": "14.14.43", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.43.tgz", - "integrity": "sha512-3pwDJjp1PWacPTpH0LcfhgjvurQvrZFBrC6xxjaUEZ7ifUtT32jtjPxEMMblpqd2Mvx+k8haqQJLQxolyGN/cQ==", + "version": "14.14.44", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.44.tgz", + "integrity": "sha512-+gaugz6Oce6ZInfI/tK4Pq5wIIkJMEJUu92RB3Eu93mtj4wjjjz9EB5mLp5s1pSsLXdC/CPut/xF20ZzAQJbTA==", "dev": true }, "@types/offscreencanvas": { @@ -4486,14 +4491,15 @@ } }, "eslint-plugin-jsdoc": { - "version": "33.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-33.0.0.tgz", - "integrity": "sha512-bkopnnuDdT04abKWPfDdD6XcAp2yX6UDpDViyvIdYmxbZYbpHXCRzQzLqCTo+SzWSTS0KFWz/V3shmmMr+x4EA==", + "version": "33.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-33.1.0.tgz", + "integrity": "sha512-nyH1qAj5f4uDnDpg4aiAS65wJSfxfBDf0lIgNfxtew31z3VRaM8WsVmpe4UhI2u27oOD/ChRuye6KAzzuHn6Jw==", "dev": true, "requires": { - "@es-joy/jsdoccomment": "^0.1.1", + "@es-joy/jsdoccomment": "^0.4.3", "comment-parser": "1.1.5", "debug": "^4.3.1", + "esquery": "^1.4.0", "jsdoctypeparser": "^9.0.0", "lodash": "^4.17.21", "regextras": "^0.7.1", diff --git a/package.json b/package.json index 01534425..fd8d1170 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "utf-8-validate": "^5.0.4" }, "devDependencies": { - "@types/node": "^14.14.43", + "@types/node": "^14.14.44", "@types/uuid": "^8.3.0", "@types/ws": "^7.4.2", "@typescript-eslint/eslint-plugin": "^4.22.1", @@ -70,7 +70,7 @@ "cross-env": "^7.0.3", "eslint": "^7.25.0", "eslint-plugin-import": "^2.22.1", - "eslint-plugin-jsdoc": "^33.0.0", + "eslint-plugin-jsdoc": "^33.1.0", "mbt": "^1.1.1", "npm-check": "^5.9.2", "rollup": "^2.47.0", diff --git a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts index e9f7ee6d..96502b3c 100644 --- a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts @@ -314,9 +314,9 @@ export default class OCPP16RequestService extends OCPPRequestService { transactionId, meterValue, }; - await self.sendMessage(Utils.generateUUID(), payload, MessageType.CALL_MESSAGE, OCPP16RequestCommand.METERVALUES); + await self.sendMessage(Utils.generateUUID(), payload, MessageType.CALL_MESSAGE, OCPP16RequestCommand.METER_VALUES); } catch (error) { - self.handleRequestError(OCPP16RequestCommand.METERVALUES, error); + self.handleRequestError(OCPP16RequestCommand.METER_VALUES, error); } } diff --git a/src/types/ocpp/1.6/Requests.ts b/src/types/ocpp/1.6/Requests.ts index 8af407c0..9ed48049 100644 --- a/src/types/ocpp/1.6/Requests.ts +++ b/src/types/ocpp/1.6/Requests.ts @@ -12,7 +12,7 @@ export enum OCPP16RequestCommand { AUTHORIZE = 'Authorize', START_TRANSACTION = 'StartTransaction', STOP_TRANSACTION = 'StopTransaction', - METERVALUES = 'MeterValues' + METER_VALUES = 'MeterValues' } export enum OCPP16IncomingRequestCommand { diff --git a/src/utils/PerformanceStatistics.ts b/src/utils/PerformanceStatistics.ts index 515467a6..9594fb3f 100644 --- a/src/utils/PerformanceStatistics.ts +++ b/src/utils/PerformanceStatistics.ts @@ -113,7 +113,7 @@ export default class PerformanceStatistics { private addPerformanceTimer(command: RequestCommand | IncomingRequestCommand, duration: number): void { // Map to proper command name const MAPCOMMAND = { - sendMeterValues: RequestCommand.METERVALUES, + sendMeterValues: RequestCommand.METER_VALUES, startTransaction: RequestCommand.START_TRANSACTION, stopTransaction: RequestCommand.STOP_TRANSACTION, };