Dependencies update and cleanups.
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 18 Jan 2021 18:57:29 +0000 (19:57 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 18 Jan 2021 18:57:29 +0000 (19:57 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
package-lock.json
package.json
src/charging-station/ChargingStation.ts
src/types/ChargingStationTemplate.ts

index 6f1557626086c8507ad3e57c1508287fb45234d6..209b0e9a33753995caf7d55e30254edda297dc4d 100644 (file)
       }
     },
     "@typescript-eslint/eslint-plugin": {
-      "version": "4.13.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.13.0.tgz",
-      "integrity": "sha512-ygqDUm+BUPvrr0jrXqoteMqmIaZ/bixYOc3A4BRwzEPTZPi6E+n44rzNZWaB0YvtukgP+aoj0i/fyx7FkM2p1w==",
+      "version": "4.14.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.0.tgz",
+      "integrity": "sha512-IJ5e2W7uFNfg4qh9eHkHRUCbgZ8VKtGwD07kannJvM5t/GU8P8+24NX8gi3Hf5jST5oWPY8kyV1s/WtfiZ4+Ww==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/experimental-utils": "4.13.0",
-        "@typescript-eslint/scope-manager": "4.13.0",
+        "@typescript-eslint/experimental-utils": "4.14.0",
+        "@typescript-eslint/scope-manager": "4.14.0",
         "debug": "^4.1.1",
         "functional-red-black-tree": "^1.0.1",
         "lodash": "^4.17.15",
       }
     },
     "@typescript-eslint/experimental-utils": {
-      "version": "4.13.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.13.0.tgz",
-      "integrity": "sha512-/ZsuWmqagOzNkx30VWYV3MNB/Re/CGv/7EzlqZo5RegBN8tMuPaBgNK6vPBCQA8tcYrbsrTdbx3ixMRRKEEGVw==",
+      "version": "4.14.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.0.tgz",
+      "integrity": "sha512-6i6eAoiPlXMKRbXzvoQD5Yn9L7k9ezzGRvzC/x1V3650rUk3c3AOjQyGYyF9BDxQQDK2ElmKOZRD0CbtdkMzQQ==",
       "dev": true,
       "requires": {
         "@types/json-schema": "^7.0.3",
-        "@typescript-eslint/scope-manager": "4.13.0",
-        "@typescript-eslint/types": "4.13.0",
-        "@typescript-eslint/typescript-estree": "4.13.0",
+        "@typescript-eslint/scope-manager": "4.14.0",
+        "@typescript-eslint/types": "4.14.0",
+        "@typescript-eslint/typescript-estree": "4.14.0",
         "eslint-scope": "^5.0.0",
         "eslint-utils": "^2.0.0"
       }
     },
     "@typescript-eslint/parser": {
-      "version": "4.13.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.13.0.tgz",
-      "integrity": "sha512-KO0J5SRF08pMXzq9+abyHnaGQgUJZ3Z3ax+pmqz9vl81JxmTTOUfQmq7/4awVfq09b6C4owNlOgOwp61pYRBSg==",
+      "version": "4.14.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.14.0.tgz",
+      "integrity": "sha512-sUDeuCjBU+ZF3Lzw0hphTyScmDDJ5QVkyE21pRoBo8iDl7WBtVFS+WDN3blY1CH3SBt7EmYCw6wfmJjF0l/uYg==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/scope-manager": "4.13.0",
-        "@typescript-eslint/types": "4.13.0",
-        "@typescript-eslint/typescript-estree": "4.13.0",
+        "@typescript-eslint/scope-manager": "4.14.0",
+        "@typescript-eslint/types": "4.14.0",
+        "@typescript-eslint/typescript-estree": "4.14.0",
         "debug": "^4.1.1"
       }
     },
     "@typescript-eslint/scope-manager": {
-      "version": "4.13.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.13.0.tgz",
-      "integrity": "sha512-UpK7YLG2JlTp/9G4CHe7GxOwd93RBf3aHO5L+pfjIrhtBvZjHKbMhBXTIQNkbz7HZ9XOe++yKrXutYm5KmjWgQ==",
+      "version": "4.14.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.14.0.tgz",
+      "integrity": "sha512-/J+LlRMdbPh4RdL4hfP1eCwHN5bAhFAGOTsvE6SxsrM/47XQiPSgF5MDgLyp/i9kbZV9Lx80DW0OpPkzL+uf8Q==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/types": "4.13.0",
-        "@typescript-eslint/visitor-keys": "4.13.0"
+        "@typescript-eslint/types": "4.14.0",
+        "@typescript-eslint/visitor-keys": "4.14.0"
       }
     },
     "@typescript-eslint/types": {
-      "version": "4.13.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.13.0.tgz",
-      "integrity": "sha512-/+aPaq163oX+ObOG00M0t9tKkOgdv9lq0IQv/y4SqGkAXmhFmCfgsELV7kOCTb2vVU5VOmVwXBXJTDr353C1rQ==",
+      "version": "4.14.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.14.0.tgz",
+      "integrity": "sha512-VsQE4VvpldHrTFuVPY1ZnHn/Txw6cZGjL48e+iBxTi2ksa9DmebKjAeFmTVAYoSkTk7gjA7UqJ7pIsyifTsI4A==",
       "dev": true
     },
     "@typescript-eslint/typescript-estree": {
-      "version": "4.13.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.13.0.tgz",
-      "integrity": "sha512-9A0/DFZZLlGXn5XA349dWQFwPZxcyYyCFX5X88nWs2uachRDwGeyPz46oTsm9ZJE66EALvEns1lvBwa4d9QxMg==",
+      "version": "4.14.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.0.tgz",
+      "integrity": "sha512-wRjZ5qLao+bvS2F7pX4qi2oLcOONIB+ru8RGBieDptq/SudYwshveORwCVU4/yMAd4GK7Fsf8Uq1tjV838erag==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/types": "4.13.0",
-        "@typescript-eslint/visitor-keys": "4.13.0",
+        "@typescript-eslint/types": "4.14.0",
+        "@typescript-eslint/visitor-keys": "4.14.0",
         "debug": "^4.1.1",
         "globby": "^11.0.1",
         "is-glob": "^4.0.1",
       }
     },
     "@typescript-eslint/visitor-keys": {
-      "version": "4.13.0",
-      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.13.0.tgz",
-      "integrity": "sha512-6RoxWK05PAibukE7jElqAtNMq+RWZyqJ6Q/GdIxaiUj2Ept8jh8+FUVlbq9WxMYxkmEOPvCE5cRSyupMpwW31g==",
+      "version": "4.14.0",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.0.tgz",
+      "integrity": "sha512-MeHHzUyRI50DuiPgV9+LxcM52FCJFYjJiWHtXlbyC27b80mfOwKeiKI+MHOTEpcpfmoPFm/vvQS88bYIx6PZTA==",
       "dev": true,
       "requires": {
-        "@typescript-eslint/types": "4.13.0",
+        "@typescript-eslint/types": "4.14.0",
         "eslint-visitor-keys": "^2.0.0"
       }
     },
       "dev": true
     },
     "fast-glob": {
-      "version": "3.2.4",
-      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz",
-      "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==",
+      "version": "3.2.5",
+      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.5.tgz",
+      "integrity": "sha512-2DtFcgT68wiTTiwZ2hNdJfcHNke9XOfnwmBRWXhmeKM8rF0TGwmC/Qto3S7RoZKp5cilZbxzO5iTNTQsJ+EeDg==",
       "dev": true,
       "requires": {
         "@nodelib/fs.stat": "^2.0.2",
index d0cc70d283dd6d3ba0f763504991652157b26357..b2605fb125566d0a257516e47c38e37678b54aca 100644 (file)
@@ -62,8 +62,8 @@
     "@types/uuid": "^8.3.0",
     "@types/worker-threads-pool": "^2.0.0",
     "@types/ws": "^7.4.0",
-    "@typescript-eslint/eslint-plugin": "^4.13.0",
-    "@typescript-eslint/parser": "^4.13.0",
+    "@typescript-eslint/eslint-plugin": "^4.14.0",
+    "@typescript-eslint/parser": "^4.14.0",
     "clinic": "^8.0.1",
     "cross-env": "^7.0.3",
     "eslint": "^7.18.0",
index 8c0b04c14eef985978a83d24ff2f4151e7d80247..6870c1f79f2802fec10f002bff3a2fe560090a21 100644 (file)
@@ -3,7 +3,7 @@ import { AvailabilityType, BootNotificationRequest, ChangeAvailabilityRequest, C
 import { BootNotificationResponse, ChangeAvailabilityResponse, ChangeConfigurationResponse, DefaultResponse, GetConfigurationResponse, HeartbeatResponse, RegistrationStatus, SetChargingProfileResponse, StatusNotificationResponse, UnlockConnectorResponse } from '../types/ocpp/1.6/RequestResponses';
 import { ChargingProfile, ChargingProfilePurposeType } from '../types/ocpp/1.6/ChargingProfile';
 import ChargingStationConfiguration, { ConfigurationKey } from '../types/ChargingStationConfiguration';
-import ChargingStationTemplate, { PowerOutType } from '../types/ChargingStationTemplate';
+import ChargingStationTemplate, { PowerOutType, VoltageOut } from '../types/ChargingStationTemplate';
 import Connectors, { Connector } from '../types/Connectors';
 import { MeterValue, MeterValueLocation, MeterValueMeasurand, MeterValuePhase, MeterValueUnit, MeterValuesRequest, MeterValuesResponse, SampledValue } from '../types/ocpp/1.6/MeterValues';
 import { PerformanceObserver, performance } from 'perf_hooks';
@@ -335,10 +335,10 @@ export default class ChargingStation {
     let defaultVoltageOut: number;
     switch (this._getPowerOutType()) {
       case PowerOutType.AC:
-        defaultVoltageOut = 230;
+        defaultVoltageOut = VoltageOut.VOLTAGE_230;
         break;
       case PowerOutType.DC:
-        defaultVoltageOut = 400;
+        defaultVoltageOut = VoltageOut.VOLTAGE_400;
         break;
       default:
         logger.error(errMsg);
@@ -580,7 +580,7 @@ export default class ChargingStation {
         }
       }, interval);
     } else {
-      logger.error(`${this._logPrefix()} Charging station MeterValueSampleInterval configuration set to ${Utils.milliSecondsToHHMMSS(interval)}, not sending MeterValues`);
+      logger.error(`${this._logPrefix()} Charging station ${StandardParametersKey.MeterValueSampleInterval} configuration set to ${Utils.milliSecondsToHHMMSS(interval)}, not sending MeterValues`);
     }
   }
 
index 744e7414a497cf99d83e275a32fc9fe30a8a9dab..65e22ea3f0cfac7612b59c16e07d5c7988268ef2 100644 (file)
@@ -11,6 +11,12 @@ export enum PowerUnit {
   KILO_WATT = 'kW',
 }
 
+export enum VoltageOut {
+  VOLTAGE_110 = 110,
+  VOLTAGE_230 = 230,
+  VOLTAGE_400 = 400
+}
+
 export interface AutomaticTransactionGenerator {
   enable: boolean;
   minDuration: number;