refactor(simulator): remove uneeded check
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 17 Mar 2023 11:14:54 +0000 (12:14 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 17 Mar 2023 11:14:54 +0000 (12:14 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
package-lock.json
package.json
src/charging-station/ChargingStation.ts

index c8d89f9c190e5338418e1706ead1de22fa64adfc..87eeeb5fe75d11fb9da0c6624ab54b4b36201aa1 100644 (file)
@@ -65,7 +65,7 @@
         "mocha": "^10.2.0",
         "mochawesome": "^7.1.3",
         "prettier": "^2.8.4",
-        "release-it": "^15.8.0",
+        "release-it": "^15.9.0",
         "robohydra": "^0.6.9",
         "rollup": "^3.19.1",
         "rollup-plugin-analyzer": "^4.0.0",
       }
     },
     "node_modules/execa": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/execa/-/execa-7.0.0.tgz",
-      "integrity": "sha512-tQbH0pH/8LHTnwTrsKWideqi6rFB/QNUawEwrn+WHyz7PX1Tuz2u7wfTvbaNBdP5JD5LVWxNo8/A8CHNZ3bV6g==",
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz",
+      "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==",
       "dev": true,
       "dependencies": {
         "cross-spawn": "^7.0.3",
       "dev": true
     },
     "node_modules/release-it": {
-      "version": "15.8.0",
-      "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.8.0.tgz",
-      "integrity": "sha512-eJwYY/vXefcnWn7OHlZRcQJYPSJw/fdO+29C/Re5MZE8FZReCHu+EYq3yB0Bm39/3cTVz/5I/2Fk5rtAsVFU1g==",
+      "version": "15.9.0",
+      "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.9.0.tgz",
+      "integrity": "sha512-uYlbEMvOHeMNLK7AOrckjxNrUB7fU2euiNQ199eGcqCaoOUxD+QqQ6MMBuYaLB0cqvjCgvH5XoaySZW5HFMPLg==",
       "dev": true,
       "dependencies": {
         "@iarna/toml": "2.2.5",
         "async-retry": "1.3.3",
         "chalk": "5.2.0",
         "cosmiconfig": "8.1.0",
-        "execa": "7.0.0",
+        "execa": "7.1.1",
         "git-url-parse": "13.1.0",
         "globby": "13.1.3",
         "got": "12.6.0",
         "lodash": "4.17.21",
         "mime-types": "2.1.35",
         "new-github-release-url": "2.0.0",
-        "node-fetch": "3.3.0",
+        "node-fetch": "3.3.1",
         "open": "8.4.2",
         "ora": "6.1.2",
         "os-name": "5.1.0",
       }
     },
     "node_modules/release-it/node_modules/ansi-escapes": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.0.0.tgz",
-      "integrity": "sha512-IG23inYII3dWlU2EyiAiGj6Bwal5GzsgPMwjYGvc1HPE2dgbj4ZB5ToWBKSquKw74nB3TIuOwaI6/jSULzfgrw==",
+      "version": "6.1.0",
+      "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.1.0.tgz",
+      "integrity": "sha512-bQyg9bzRntwR/8b89DOEhGwctcwCrbWW/TuqTQnpqpy5Fz3aovcOTj5i8NJV6AHc8OGNdMaqdxAWww8pz2kiKg==",
       "dev": true,
       "dependencies": {
         "type-fest": "^3.0.0"
       "dev": true
     },
     "node_modules/release-it/node_modules/node-fetch": {
-      "version": "3.3.0",
-      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz",
-      "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==",
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
+      "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
       "dev": true,
       "dependencies": {
         "data-uri-to-buffer": "^4.0.0",
       }
     },
     "execa": {
-      "version": "7.0.0",
-      "resolved": "https://registry.npmjs.org/execa/-/execa-7.0.0.tgz",
-      "integrity": "sha512-tQbH0pH/8LHTnwTrsKWideqi6rFB/QNUawEwrn+WHyz7PX1Tuz2u7wfTvbaNBdP5JD5LVWxNo8/A8CHNZ3bV6g==",
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/execa/-/execa-7.1.1.tgz",
+      "integrity": "sha512-wH0eMf/UXckdUYnO21+HDztteVv05rq2GXksxT4fCGeHkBhw1DROXh40wcjMcRqDOWE7iPJ4n3M7e2+YFP+76Q==",
       "dev": true,
       "requires": {
         "cross-spawn": "^7.0.3",
       "dev": true
     },
     "release-it": {
-      "version": "15.8.0",
-      "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.8.0.tgz",
-      "integrity": "sha512-eJwYY/vXefcnWn7OHlZRcQJYPSJw/fdO+29C/Re5MZE8FZReCHu+EYq3yB0Bm39/3cTVz/5I/2Fk5rtAsVFU1g==",
+      "version": "15.9.0",
+      "resolved": "https://registry.npmjs.org/release-it/-/release-it-15.9.0.tgz",
+      "integrity": "sha512-uYlbEMvOHeMNLK7AOrckjxNrUB7fU2euiNQ199eGcqCaoOUxD+QqQ6MMBuYaLB0cqvjCgvH5XoaySZW5HFMPLg==",
       "dev": true,
       "requires": {
         "@iarna/toml": "2.2.5",
         "async-retry": "1.3.3",
         "chalk": "5.2.0",
         "cosmiconfig": "8.1.0",
-        "execa": "7.0.0",
+        "execa": "7.1.1",
         "git-url-parse": "13.1.0",
         "globby": "13.1.3",
         "got": "12.6.0",
         "lodash": "4.17.21",
         "mime-types": "2.1.35",
         "new-github-release-url": "2.0.0",
-        "node-fetch": "3.3.0",
+        "node-fetch": "3.3.1",
         "open": "8.4.2",
         "ora": "6.1.2",
         "os-name": "5.1.0",
       },
       "dependencies": {
         "ansi-escapes": {
-          "version": "6.0.0",
-          "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.0.0.tgz",
-          "integrity": "sha512-IG23inYII3dWlU2EyiAiGj6Bwal5GzsgPMwjYGvc1HPE2dgbj4ZB5ToWBKSquKw74nB3TIuOwaI6/jSULzfgrw==",
+          "version": "6.1.0",
+          "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.1.0.tgz",
+          "integrity": "sha512-bQyg9bzRntwR/8b89DOEhGwctcwCrbWW/TuqTQnpqpy5Fz3aovcOTj5i8NJV6AHc8OGNdMaqdxAWww8pz2kiKg==",
           "dev": true,
           "requires": {
             "type-fest": "^3.0.0"
           "dev": true
         },
         "node-fetch": {
-          "version": "3.3.0",
-          "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.0.tgz",
-          "integrity": "sha512-BKwRP/O0UvoMKp7GNdwPlObhYGB5DQqwhEDQlNKuoqwVYSxkSZCSbHjnFFmUEtwSKRPU4kNK8PbDYYitwaE3QA==",
+          "version": "3.3.1",
+          "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",
+          "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",
           "dev": true,
           "requires": {
             "data-uri-to-buffer": "^4.0.0",
index 01ed64233c93d5ec5d9e1c4565993d7fec2d2954..a38dfb7e3030e0ac73ada2063b99146e61d89374 100644 (file)
     "mocha": "^10.2.0",
     "mochawesome": "^7.1.3",
     "prettier": "^2.8.4",
-    "release-it": "^15.8.0",
+    "release-it": "^15.9.0",
     "robohydra": "^0.6.9",
     "rollup": "^3.19.1",
     "rollup-plugin-analyzer": "^4.0.0",
index 9a53a2e4a61dcc0bb0484d68565c7409343f02fc..c4388061c093189632263a54f2c384adbb8fcd0f 100644 (file)
@@ -405,11 +405,7 @@ export class ChargingStation {
   }
 
   public startHeartbeat(): void {
-    if (
-      this.getHeartbeatInterval() &&
-      this.getHeartbeatInterval() > 0 &&
-      !this.heartbeatSetInterval
-    ) {
+    if (this.getHeartbeatInterval() > 0 && !this.heartbeatSetInterval) {
       this.heartbeatSetInterval = setInterval(() => {
         this.ocppRequestService
           .requestHandler<HeartbeatRequest, HeartbeatResponse>(this, RequestCommand.HEARTBEAT)