From f1e731bd71b42117f4173830c6ba6dc6eccefce6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 13 Jan 2023 20:56:46 +0100 Subject: [PATCH] Allow to specify more OCPP command payload fields while using the UI server MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- package-lock.json | 298 ++++++------------ package.json | 10 +- .../ocpp/1.6/OCPP16RequestService.ts | 57 +++- ui/web/package-lock.json | 14 +- ui/web/package.json | 2 +- 5 files changed, 146 insertions(+), 235 deletions(-) diff --git a/package-lock.json b/package-lock.json index 416bf880..b0a96da5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,10 +9,10 @@ "version": "1.1.89", "license": "Apache-2.0", "dependencies": { - "@mikro-orm/core": "^5.6.6", - "@mikro-orm/mariadb": "^5.6.6", - "@mikro-orm/reflection": "^5.6.6", - "@mikro-orm/sqlite": "^5.6.6", + "@mikro-orm/core": "^5.6.7", + "@mikro-orm/mariadb": "^5.6.7", + "@mikro-orm/reflection": "^5.6.7", + "@mikro-orm/sqlite": "^5.6.7", "ajv": "^8.12.0", "ajv-formats": "^2.1.1", "basic-ftp": "^5.0.2", @@ -34,7 +34,7 @@ }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.2", - "@mikro-orm/cli": "^5.6.6", + "@mikro-orm/cli": "^5.6.7", "@release-it/bumper": "^4.0.2", "@rollup/plugin-json": "^6.0.0", "@types/mocha": "^10.0.1", @@ -1471,6 +1471,17 @@ "node": ">=8" } }, + "node_modules/@jercle/yargonaut": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@jercle/yargonaut/-/yargonaut-1.1.5.tgz", + "integrity": "sha512-zBp2myVvBHp1UaJsNTyS6q4UDKT7eRiqTS4oNTS6VQMd6mpxYOdbeK4pY279cDCdakGy6hG0J3ejoXZVsPwHqw==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "figlet": "^1.5.2", + "parent-require": "^1.0.0" + } + }, "node_modules/@jest/expect-utils": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.3.1.tgz", @@ -1649,16 +1660,16 @@ } }, "node_modules/@mikro-orm/cli": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.6.6.tgz", - "integrity": "sha512-jcIiYg+tL8V+ETj+4mUYz9XHV8QNS0qj4Rv14nhIzcryvDbooEs30UnNOpohGvnmmgN85Cbij8rRM8FWJMIvRQ==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.6.7.tgz", + "integrity": "sha512-yIYi2hf/GxSRk9bGXNrjhk0TopfHf+ah2vv/knYid3aAh1HZF7ZHOuTdRSc5Et7LYwtXICF1cPQYyknmuFoESw==", "dev": true, "dependencies": { - "@mikro-orm/core": "~5.6.6", - "@mikro-orm/knex": "~5.6.6", + "@jercle/yargonaut": "1.1.5", + "@mikro-orm/core": "~5.6.7", + "@mikro-orm/knex": "~5.6.7", "fs-extra": "11.1.0", "tsconfig-paths": "4.1.2", - "yargonaut": "1.1.4", "yargs": "15.4.1" }, "bin": { @@ -1728,16 +1739,16 @@ } }, "node_modules/@mikro-orm/core": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/core/-/core-5.6.6.tgz", - "integrity": "sha512-L5PPwYz2mwlhmaqcEDBZxKdf3ssV25lZWWGXJcKnszf13IUVY22TUOLYmP/Fv8wqvQ/kJzhSxzhWrDuJInMYtw==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/core/-/core-5.6.7.tgz", + "integrity": "sha512-XLCY3S10nz7uUFGTFypUuaO48cQAhCUiSsQBxpqqhlOqVz6yxGYdqAe7SmMKuplmpOoVL8OGDZrULzd0bIjtYA==", "dependencies": { "acorn-loose": "8.3.0", "acorn-walk": "8.2.0", "dotenv": "16.0.3", "fs-extra": "11.1.0", "globby": "11.1.0", - "mikro-orm": "~5.6.6", + "mikro-orm": "~5.6.7", "reflect-metadata": "0.1.13" }, "engines": { @@ -1810,9 +1821,9 @@ } }, "node_modules/@mikro-orm/knex": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/knex/-/knex-5.6.6.tgz", - "integrity": "sha512-llBuE4SecPPeLThXJ4EYppT0XwWvOeuLSpGmbCipWBshzpRa1YSRJg1EDP7+M0orkfEupBFJexaphZ83iI5eOw==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/knex/-/knex-5.6.7.tgz", + "integrity": "sha512-UDwAt+lII9/G0NfaYjrwyChlhBbgNrq700VCy4aaSbJ1S2gysRfhzeiDVtlmd+zRIHDAz+U5NETspgnP128TKw==", "dependencies": { "fs-extra": "11.1.0", "knex": "2.4.0", @@ -1873,11 +1884,11 @@ } }, "node_modules/@mikro-orm/mariadb": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/mariadb/-/mariadb-5.6.6.tgz", - "integrity": "sha512-3ex7WtRV+3nnGlF314rHFCSbyVhdx/9MpRep1FY1W004A06Ks4Yb6t4fkHk9Gv+7Sjfr7IVH2owhzcDX2iXmew==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/mariadb/-/mariadb-5.6.7.tgz", + "integrity": "sha512-g+n3PhsEXiJBG8VnspaYIANJ9jMZzhpXCCJzGhcS0f99fSnt1+/2U66WJJ6D07LVh51d2qISnYEfrKwuSArMKA==", "dependencies": { - "@mikro-orm/knex": "~5.6.6", + "@mikro-orm/knex": "~5.6.7", "mariadb": "2.5.6" }, "engines": { @@ -1902,9 +1913,9 @@ } }, "node_modules/@mikro-orm/reflection": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/reflection/-/reflection-5.6.6.tgz", - "integrity": "sha512-2b+uLUX+RFH/ptEOuqM/jwBM1FBABGkgOiH3oGTleCr1tdd21HBNrfcNoNtNOprU+YQeQokFh8SaxByOJ18yTQ==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/reflection/-/reflection-5.6.7.tgz", + "integrity": "sha512-20uzBXhoCIgQqFA67I14etutmdSYbw/hr96mbCCOSEheTjskL5KfpA6AS90QBk7NZtMtso730GhNXnsacqQeLA==", "dependencies": { "globby": "11.1.0", "ts-morph": "17.0.1" @@ -1917,11 +1928,11 @@ } }, "node_modules/@mikro-orm/sqlite": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/sqlite/-/sqlite-5.6.6.tgz", - "integrity": "sha512-/JFLr5JtWSdJ5jpZG8DqxFWl+F+gRYUv6OH0nGTKRzQ7JDiZQ6vxulpXsg++g06vgZrR3CKAD7MW3EAa3ORl/Q==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/sqlite/-/sqlite-5.6.7.tgz", + "integrity": "sha512-TKJGkbrxgd3azcwuUXaJ5kPpeqCA3Cn/zHohTQ3WCmLicbcXTxxjR5jwNGrn22gkmiPCSOTKVAb0MmQUnFpJ1w==", "dependencies": { - "@mikro-orm/knex": "~5.6.6", + "@mikro-orm/knex": "~5.6.7", "fs-extra": "11.1.0", "sqlite3": "5.1.4", "sqlstring-sqlite": "0.1.1" @@ -10293,9 +10304,9 @@ } }, "node_modules/mikro-orm": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/mikro-orm/-/mikro-orm-5.6.6.tgz", - "integrity": "sha512-ckRwQ+0O6o6q80UzqKr/1HK8iecJXGNk4a5p27yLOU8GYwBXH5kGIAQLB47O6rjMiDJdOzle7Fi4VG1YNF9gVg==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/mikro-orm/-/mikro-orm-5.6.7.tgz", + "integrity": "sha512-mxkg+BDXmuQh4PYlWkv0Yysy33Yvg/31BZN4UWWZpV9gcLMYPQcaEF8qfSW7sMbrdNSJcvqf2MX6etmIARHJ9A==", "engines": { "node": ">= 14.0.0" } @@ -11278,9 +11289,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -13282,9 +13293,9 @@ } }, "node_modules/release-it/node_modules/data-uri-to-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", - "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "dev": true, "engines": { "node": ">= 12" @@ -17153,81 +17164,6 @@ "node": ">= 14" } }, - "node_modules/yargonaut": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/yargonaut/-/yargonaut-1.1.4.tgz", - "integrity": "sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA==", - "dev": true, - "dependencies": { - "chalk": "^1.1.1", - "figlet": "^1.1.1", - "parent-require": "^1.0.0" - } - }, - "node_modules/yargonaut/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargonaut/node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargonaut/node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargonaut/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/yargonaut/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargonaut/node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", @@ -18573,6 +18509,17 @@ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", "dev": true }, + "@jercle/yargonaut": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@jercle/yargonaut/-/yargonaut-1.1.5.tgz", + "integrity": "sha512-zBp2myVvBHp1UaJsNTyS6q4UDKT7eRiqTS4oNTS6VQMd6mpxYOdbeK4pY279cDCdakGy6hG0J3ejoXZVsPwHqw==", + "dev": true, + "requires": { + "chalk": "^4.1.2", + "figlet": "^1.5.2", + "parent-require": "^1.0.0" + } + }, "@jest/expect-utils": { "version": "29.3.1", "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-29.3.1.tgz", @@ -18727,16 +18674,16 @@ } }, "@mikro-orm/cli": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.6.6.tgz", - "integrity": "sha512-jcIiYg+tL8V+ETj+4mUYz9XHV8QNS0qj4Rv14nhIzcryvDbooEs30UnNOpohGvnmmgN85Cbij8rRM8FWJMIvRQ==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/cli/-/cli-5.6.7.tgz", + "integrity": "sha512-yIYi2hf/GxSRk9bGXNrjhk0TopfHf+ah2vv/knYid3aAh1HZF7ZHOuTdRSc5Et7LYwtXICF1cPQYyknmuFoESw==", "dev": true, "requires": { - "@mikro-orm/core": "~5.6.6", - "@mikro-orm/knex": "~5.6.6", + "@jercle/yargonaut": "1.1.5", + "@mikro-orm/core": "~5.6.7", + "@mikro-orm/knex": "~5.6.7", "fs-extra": "11.1.0", "tsconfig-paths": "4.1.2", - "yargonaut": "1.1.4", "yargs": "15.4.1" }, "dependencies": { @@ -18754,16 +18701,16 @@ } }, "@mikro-orm/core": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/core/-/core-5.6.6.tgz", - "integrity": "sha512-L5PPwYz2mwlhmaqcEDBZxKdf3ssV25lZWWGXJcKnszf13IUVY22TUOLYmP/Fv8wqvQ/kJzhSxzhWrDuJInMYtw==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/core/-/core-5.6.7.tgz", + "integrity": "sha512-XLCY3S10nz7uUFGTFypUuaO48cQAhCUiSsQBxpqqhlOqVz6yxGYdqAe7SmMKuplmpOoVL8OGDZrULzd0bIjtYA==", "requires": { "acorn-loose": "8.3.0", "acorn-walk": "8.2.0", "dotenv": "16.0.3", "fs-extra": "11.1.0", "globby": "11.1.0", - "mikro-orm": "~5.6.6", + "mikro-orm": "~5.6.7", "reflect-metadata": "0.1.13" }, "dependencies": { @@ -18785,9 +18732,9 @@ } }, "@mikro-orm/knex": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/knex/-/knex-5.6.6.tgz", - "integrity": "sha512-llBuE4SecPPeLThXJ4EYppT0XwWvOeuLSpGmbCipWBshzpRa1YSRJg1EDP7+M0orkfEupBFJexaphZ83iI5eOw==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/knex/-/knex-5.6.7.tgz", + "integrity": "sha512-UDwAt+lII9/G0NfaYjrwyChlhBbgNrq700VCy4aaSbJ1S2gysRfhzeiDVtlmd+zRIHDAz+U5NETspgnP128TKw==", "requires": { "fs-extra": "11.1.0", "knex": "2.4.0", @@ -18807,29 +18754,29 @@ } }, "@mikro-orm/mariadb": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/mariadb/-/mariadb-5.6.6.tgz", - "integrity": "sha512-3ex7WtRV+3nnGlF314rHFCSbyVhdx/9MpRep1FY1W004A06Ks4Yb6t4fkHk9Gv+7Sjfr7IVH2owhzcDX2iXmew==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/mariadb/-/mariadb-5.6.7.tgz", + "integrity": "sha512-g+n3PhsEXiJBG8VnspaYIANJ9jMZzhpXCCJzGhcS0f99fSnt1+/2U66WJJ6D07LVh51d2qISnYEfrKwuSArMKA==", "requires": { - "@mikro-orm/knex": "~5.6.6", + "@mikro-orm/knex": "~5.6.7", "mariadb": "2.5.6" } }, "@mikro-orm/reflection": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/reflection/-/reflection-5.6.6.tgz", - "integrity": "sha512-2b+uLUX+RFH/ptEOuqM/jwBM1FBABGkgOiH3oGTleCr1tdd21HBNrfcNoNtNOprU+YQeQokFh8SaxByOJ18yTQ==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/reflection/-/reflection-5.6.7.tgz", + "integrity": "sha512-20uzBXhoCIgQqFA67I14etutmdSYbw/hr96mbCCOSEheTjskL5KfpA6AS90QBk7NZtMtso730GhNXnsacqQeLA==", "requires": { "globby": "11.1.0", "ts-morph": "17.0.1" } }, "@mikro-orm/sqlite": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/@mikro-orm/sqlite/-/sqlite-5.6.6.tgz", - "integrity": "sha512-/JFLr5JtWSdJ5jpZG8DqxFWl+F+gRYUv6OH0nGTKRzQ7JDiZQ6vxulpXsg++g06vgZrR3CKAD7MW3EAa3ORl/Q==", + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/@mikro-orm/sqlite/-/sqlite-5.6.7.tgz", + "integrity": "sha512-TKJGkbrxgd3azcwuUXaJ5kPpeqCA3Cn/zHohTQ3WCmLicbcXTxxjR5jwNGrn22gkmiPCSOTKVAb0MmQUnFpJ1w==", "requires": { - "@mikro-orm/knex": "~5.6.6", + "@mikro-orm/knex": "~5.6.7", "fs-extra": "11.1.0", "sqlite3": "5.1.4", "sqlstring-sqlite": "0.1.1" @@ -25422,9 +25369,9 @@ } }, "mikro-orm": { - "version": "5.6.6", - "resolved": "https://registry.npmjs.org/mikro-orm/-/mikro-orm-5.6.6.tgz", - "integrity": "sha512-ckRwQ+0O6o6q80UzqKr/1HK8iecJXGNk4a5p27yLOU8GYwBXH5kGIAQLB47O6rjMiDJdOzle7Fi4VG1YNF9gVg==" + "version": "5.6.7", + "resolved": "https://registry.npmjs.org/mikro-orm/-/mikro-orm-5.6.7.tgz", + "integrity": "sha512-mxkg+BDXmuQh4PYlWkv0Yysy33Yvg/31BZN4UWWZpV9gcLMYPQcaEF8qfSW7sMbrdNSJcvqf2MX6etmIARHJ9A==" }, "miller-rabin": { "version": "4.0.1", @@ -26242,9 +26189,9 @@ "dev": true }, "node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "version": "2.6.8", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.8.tgz", + "integrity": "sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==", "requires": { "whatwg-url": "^5.0.0" }, @@ -27722,9 +27669,9 @@ } }, "data-uri-to-buffer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", - "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", "dev": true }, "emoji-regex": { @@ -30648,65 +30595,6 @@ "integrity": "sha512-AacA8nRULjKMX2DvWvOAdBZMOfQlypSFkjcOcu9FalllIDJ1kvlREzcdIZmidQUqqeMv7jorHjq2HlLv/+c2lg==", "dev": true }, - "yargonaut": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/yargonaut/-/yargonaut-1.1.4.tgz", - "integrity": "sha512-rHgFmbgXAAzl+1nngqOcwEljqHGG9uUZoPjsdZEs1w5JW9RXYzrSvH/u70C1JE5qFi0qjsdhnUX/dJRpWqitSA==", - "dev": true, - "requires": { - "chalk": "^1.1.1", - "figlet": "^1.1.1", - "parent-require": "^1.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } - } - }, "yargs": { "version": "15.4.1", "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", diff --git a/package.json b/package.json index da2ea356..bb0c19b8 100644 --- a/package.json +++ b/package.json @@ -72,10 +72,10 @@ "release": "release-it" }, "dependencies": { - "@mikro-orm/core": "^5.6.6", - "@mikro-orm/mariadb": "^5.6.6", - "@mikro-orm/reflection": "^5.6.6", - "@mikro-orm/sqlite": "^5.6.6", + "@mikro-orm/core": "^5.6.7", + "@mikro-orm/mariadb": "^5.6.7", + "@mikro-orm/reflection": "^5.6.7", + "@mikro-orm/sqlite": "^5.6.7", "ajv": "^8.12.0", "ajv-formats": "^2.1.1", "basic-ftp": "^5.0.2", @@ -101,7 +101,7 @@ }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.2", - "@mikro-orm/cli": "^5.6.6", + "@mikro-orm/cli": "^5.6.7", "@release-it/bumper": "^4.0.2", "@rollup/plugin-json": "^6.0.0", "@types/mocha": "^10.0.1", diff --git a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts index 77b5cb58..0671af33 100644 --- a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts @@ -192,6 +192,18 @@ export default class OCPP16RequestService extends OCPPRequestService { connectorId: commandParams?.connectorId, status: commandParams?.status, errorCode: commandParams?.errorCode, + ...(!Utils.isUndefined(commandParams?.info) && { + info: commandParams?.info, + }), + ...(!Utils.isUndefined(commandParams?.timestamp) && { + timestamp: commandParams?.timestamp, + }), + ...(!Utils.isUndefined(commandParams?.vendorId) && { + vendorId: commandParams?.vendorId, + }), + ...(!Utils.isUndefined(commandParams?.vendorErrorCode) && { + vendorErrorCode: commandParams?.vendorErrorCode, + }), } as unknown as Request; case OCPP16RequestCommand.START_TRANSACTION: return { @@ -199,16 +211,23 @@ export default class OCPP16RequestService extends OCPPRequestService { ...(!Utils.isUndefined(commandParams?.idTag) ? { idTag: commandParams?.idTag } : { idTag: Constants.DEFAULT_IDTAG }), - meterStart: chargingStation.getEnergyActiveImportRegisterByConnectorId( - commandParams?.connectorId as number - ), + meterStart: + commandParams?.meterStart ?? + chargingStation.getEnergyActiveImportRegisterByConnectorId( + commandParams?.connectorId as number + ), timestamp: commandParams?.timestamp ?? new Date(), + ...(!Utils.isUndefined(commandParams?.reservationId) && { + reservationId: commandParams?.reservationId, + }), } as unknown as Request; case OCPP16RequestCommand.STOP_TRANSACTION: - connectorId = chargingStation.getConnectorIdByTransactionId( - commandParams?.transactionId as number - ); - commandParams?.meterStop && + chargingStation.getTransactionDataMeterValues() && + Utils.isUndefined(commandParams?.transactionData) && + (connectorId = chargingStation.getConnectorIdByTransactionId( + commandParams?.transactionId as number + )); + !commandParams?.meterStop && (energyActiveImportRegister = chargingStation.getEnergyActiveImportRegisterByTransactionId( commandParams?.transactionId as number, @@ -221,17 +240,21 @@ export default class OCPP16RequestService extends OCPPRequestService { chargingStation.getTransactionIdTag(commandParams?.transactionId as number), meterStop: commandParams?.meterStop ?? energyActiveImportRegister, timestamp: commandParams?.timestamp ?? new Date(), - reason: commandParams?.reason, - ...(chargingStation.getTransactionDataMeterValues() && { - transactionData: OCPP16ServiceUtils.buildTransactionDataMeterValues( - chargingStation.getConnectorStatus(connectorId).transactionBeginMeterValue, - OCPP16ServiceUtils.buildTransactionEndMeterValue( - chargingStation, - connectorId, - (commandParams?.meterStop as number) ?? energyActiveImportRegister - ) - ), + ...(!Utils.isUndefined(commandParams?.reason) && { + reason: commandParams?.reason, }), + ...(!Utils.isUndefined(commandParams?.transactionData) + ? { transactionData: commandParams?.transactionData } + : chargingStation.getTransactionDataMeterValues() && { + transactionData: OCPP16ServiceUtils.buildTransactionDataMeterValues( + chargingStation.getConnectorStatus(connectorId).transactionBeginMeterValue, + OCPP16ServiceUtils.buildTransactionEndMeterValue( + chargingStation, + connectorId, + (commandParams?.meterStop as number) ?? energyActiveImportRegister + ) + ), + }), } as unknown as Request; case OCPP16RequestCommand.DATA_TRANSFER: return commandParams as unknown as Request; diff --git a/ui/web/package-lock.json b/ui/web/package-lock.json index d811fba7..b76f3ac2 100644 --- a/ui/web/package-lock.json +++ b/ui/web/package-lock.json @@ -34,7 +34,7 @@ "@vue/tsconfig": "^0.1.3", "chai": "^4.3.7", "eslint": "^8.31.0", - "eslint-plugin-vue": "^9.8.0", + "eslint-plugin-vue": "^9.9.0", "prettier": "^2.8.2", "typescript": "~4.9.4" } @@ -7931,9 +7931,9 @@ } }, "node_modules/eslint-plugin-vue": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.8.0.tgz", - "integrity": "sha512-E/AXwcTzunyzM83C2QqDHxepMzvI2y6x+mmeYHbVDQlKFqmKYvRrhaVixEeeG27uI44p9oKDFiyCRw4XxgtfHA==", + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.9.0.tgz", + "integrity": "sha512-YbubS7eK0J7DCf0U2LxvVP7LMfs6rC6UltihIgval3azO3gyDwEGVgsCMe1TmDiEkl6GdMKfRpaME6QxIYtzDQ==", "dev": true, "dependencies": { "eslint-utils": "^3.0.0", @@ -24905,9 +24905,9 @@ } }, "eslint-plugin-vue": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.8.0.tgz", - "integrity": "sha512-E/AXwcTzunyzM83C2QqDHxepMzvI2y6x+mmeYHbVDQlKFqmKYvRrhaVixEeeG27uI44p9oKDFiyCRw4XxgtfHA==", + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-9.9.0.tgz", + "integrity": "sha512-YbubS7eK0J7DCf0U2LxvVP7LMfs6rC6UltihIgval3azO3gyDwEGVgsCMe1TmDiEkl6GdMKfRpaME6QxIYtzDQ==", "dev": true, "requires": { "eslint-utils": "^3.0.0", diff --git a/ui/web/package.json b/ui/web/package.json index eaf827d4..037cfaf7 100644 --- a/ui/web/package.json +++ b/ui/web/package.json @@ -37,7 +37,7 @@ "@vue/tsconfig": "^0.1.3", "chai": "^4.3.7", "eslint": "^8.31.0", - "eslint-plugin-vue": "^9.8.0", + "eslint-plugin-vue": "^9.9.0", "prettier": "^2.8.2", "typescript": "~4.9.4" }, -- 2.34.1