From d4c84337227e85dfbf20ff23d153e6bd1f685b87 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 5 Jan 2023 21:25:06 +0100 Subject: [PATCH] Apply dependencies update MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- package-lock.json | 40 ++++++++++++++-------------- package.json | 4 +-- src/types/ChargingStationTemplate.ts | 11 +++++--- src/types/ocpp/1.6/Requests.ts | 15 +++++++++++ src/types/ocpp/Requests.ts | 6 +++++ 5 files changed, 51 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index 25531398..cf87f2db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,7 +36,7 @@ "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.2", "@mikro-orm/cli": "^5.6.3", - "@release-it/bumper": "^4.0.1", + "@release-it/bumper": "^4.0.2", "@rollup/plugin-json": "^6.0.0", "@types/mocha": "^10.0.1", "@types/mochawesome": "^6.2.1", @@ -82,7 +82,7 @@ }, "optionalDependencies": { "bufferutil": "^4.0.7", - "utf-8-validate": "^5.0.10" + "utf-8-validate": "^6.0.0" } }, "node_modules/@assemblyscript/loader": { @@ -2252,9 +2252,9 @@ } }, "node_modules/@release-it/bumper": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-4.0.1.tgz", - "integrity": "sha512-/HG+COX2MtDC7Ca25XqZYcEwpq1gDifjmSeatbjEc293y+DPUwuIjs6LrMsEUr91UuIg9NTqriKzXj//gq3QCw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-4.0.2.tgz", + "integrity": "sha512-HjiFIBNvb67cLTbzdm6EqiSRwpB4MJY4TGJFY/ac5qnIxERWK5gx1zBnwbJZffDSoS46hJMugoXrDbITEfX4gA==", "dev": true, "dependencies": { "@iarna/toml": "^2.2.5", @@ -13279,9 +13279,9 @@ } }, "node_modules/release-it/node_modules/ansi-escapes/node_modules/type-fest": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.5.0.tgz", - "integrity": "sha512-bI3zRmZC8K0tUz1HjbIOAGQwR2CoPQG68N5IF7gm0LBl8QSNXzkmaWnkWccCUL5uG9mCsp4sBwC8SBrNSISWew==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.5.1.tgz", + "integrity": "sha512-70T99cpILFk2fzwuljwWxmazSphFrdOe3gRHbp6bqs71pxFBbJwFqnmkLO2lQL6aLHxHmYAnP/sL+AJWpT70jA==", "dev": true, "engines": { "node": ">=14.16" @@ -16754,9 +16754,9 @@ } }, "node_modules/utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.0.tgz", + "integrity": "sha512-OCJuwxQsnG51swYmNloViggxNOFO/leOZpnb/vVeoastJbrzrZZU7lGsYlUcdkCl9nsBu2nkKLjpljb3Ckvb/Q==", "hasInstallScript": true, "optional": true, "dependencies": { @@ -19284,9 +19284,9 @@ } }, "@release-it/bumper": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-4.0.1.tgz", - "integrity": "sha512-/HG+COX2MtDC7Ca25XqZYcEwpq1gDifjmSeatbjEc293y+DPUwuIjs6LrMsEUr91UuIg9NTqriKzXj//gq3QCw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@release-it/bumper/-/bumper-4.0.2.tgz", + "integrity": "sha512-HjiFIBNvb67cLTbzdm6EqiSRwpB4MJY4TGJFY/ac5qnIxERWK5gx1zBnwbJZffDSoS46hJMugoXrDbITEfX4gA==", "dev": true, "requires": { "@iarna/toml": "^2.2.5", @@ -27945,9 +27945,9 @@ }, "dependencies": { "type-fest": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.5.0.tgz", - "integrity": "sha512-bI3zRmZC8K0tUz1HjbIOAGQwR2CoPQG68N5IF7gm0LBl8QSNXzkmaWnkWccCUL5uG9mCsp4sBwC8SBrNSISWew==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.5.1.tgz", + "integrity": "sha512-70T99cpILFk2fzwuljwWxmazSphFrdOe3gRHbp6bqs71pxFBbJwFqnmkLO2lQL6aLHxHmYAnP/sL+AJWpT70jA==", "dev": true } } @@ -30537,9 +30537,9 @@ } }, "utf-8-validate": { - "version": "5.0.10", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz", - "integrity": "sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.0.tgz", + "integrity": "sha512-OCJuwxQsnG51swYmNloViggxNOFO/leOZpnb/vVeoastJbrzrZZU7lGsYlUcdkCl9nsBu2nkKLjpljb3Ckvb/Q==", "optional": true, "requires": { "node-gyp-build": "^4.3.0" diff --git a/package.json b/package.json index d0433ead..d0851240 100644 --- a/package.json +++ b/package.json @@ -98,12 +98,12 @@ }, "optionalDependencies": { "bufferutil": "^4.0.7", - "utf-8-validate": "^5.0.10" + "utf-8-validate": "^6.0.0" }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.2", "@mikro-orm/cli": "^5.6.3", - "@release-it/bumper": "^4.0.1", + "@release-it/bumper": "^4.0.2", "@rollup/plugin-json": "^6.0.0", "@types/mocha": "^10.0.1", "@types/mochawesome": "^6.2.1", diff --git a/src/types/ChargingStationTemplate.ts b/src/types/ChargingStationTemplate.ts index cd92616c..c6640771 100644 --- a/src/types/ChargingStationTemplate.ts +++ b/src/types/ChargingStationTemplate.ts @@ -7,7 +7,12 @@ import type { ChargingStationOcppConfiguration } from './ChargingStationOcppConf import type { ConnectorStatus } from './ConnectorStatus'; import type { OCPPProtocol } from './ocpp/OCPPProtocol'; import type { OCPPVersion } from './ocpp/OCPPVersion'; -import type { IncomingRequestCommand, MessageTrigger, RequestCommand } from './ocpp/Requests'; +import type { + FirmwareStatus, + IncomingRequestCommand, + MessageTrigger, + RequestCommand, +} from './ocpp/Requests'; export enum CurrentType { AC = 'AC', @@ -38,11 +43,11 @@ export type WsOptions = ClientOptions & ClientRequestArgs; type FirmwareUpgrade = { versionUpgrade: { patternGroup?: number | number[]; - to?: string; + step?: number; }; reset?: boolean; resetDelay?: number; - checkIntegrity?: boolean; + failureMessage?: FirmwareStatus; }; type CommandsSupport = { diff --git a/src/types/ocpp/1.6/Requests.ts b/src/types/ocpp/1.6/Requests.ts index 97dccc1e..78fe4105 100644 --- a/src/types/ocpp/1.6/Requests.ts +++ b/src/types/ocpp/1.6/Requests.ts @@ -15,6 +15,7 @@ export enum OCPP16RequestCommand { STOP_TRANSACTION = 'StopTransaction', METER_VALUES = 'MeterValues', DIAGNOSTICS_STATUS_NOTIFICATION = 'DiagnosticsStatusNotification', + FIRMWARE_STATUS_NOTIFICATION = 'FirmwareStatusNotification', DATA_TRANSFER = 'DataTransfer', } @@ -122,6 +123,20 @@ export interface OCPP16UpdateFirmwareRequest extends JsonObject { retryInterval?: number; } +export enum OCPP16FirmwareStatus { + Downloaded = 'Downloaded', + DownloadFailed = 'DownloadFailed', + Downloading = 'Downloading', + Idle = 'Idle', + InstallationFailed = 'InstallationFailed', + Installing = 'Installing', + Installed = 'Installed', +} + +export type OCPP16FirmwareStatusNotificationRequest = { + status: OCPP16FirmwareStatus; +}; + export interface GetDiagnosticsRequest extends JsonObject { location: string; retries?: number; diff --git a/src/types/ocpp/Requests.ts b/src/types/ocpp/Requests.ts index 09e2b0cc..a2194996 100644 --- a/src/types/ocpp/Requests.ts +++ b/src/types/ocpp/Requests.ts @@ -7,6 +7,7 @@ import { OCPP16AvailabilityType, type OCPP16BootNotificationRequest, type OCPP16DataTransferRequest, + OCPP16FirmwareStatus, type OCPP16HeartbeatRequest, OCPP16IncomingRequestCommand, OCPP16MessageTrigger, @@ -82,4 +83,9 @@ export const DiagnosticsStatus = { } as const; export type DiagnosticsStatus = OCPP16DiagnosticsStatus; +export const FirmwareStatus = { + ...OCPP16FirmwareStatus, +} as const; +export type FirmwareStatus = OCPP16FirmwareStatus; + export type ResponseType = JsonType | OCPPError; -- 2.34.1