From: Jérôme Benoit Date: Thu, 16 Apr 2026 13:27:13 +0000 (+0200) Subject: refactor: fix phantom errorMessage, merge imports, harmonize Docker configs X-Git-Tag: cli@v4.5.0~67 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=18dc1211f776e966b36417f47aa191c248dea183;p=e-mobility-charging-stations-simulator.git refactor: fix phantom errorMessage, merge imports, harmonize Docker configs - stopTransaction: use responsesFailed instead of phantom errorMessage field - ConfigurationType: merge duplicate imports from UIProtocol - Docker: remove pnpm@latest (use packageManager field), remove depth 0 no-op - Docker: add EXPOSE to both Dockerfiles (8080 simulator, 3030 dashboard) - Docker: exec in run.sh for proper signal propagation --- diff --git a/docker/Dockerfile b/docker/Dockerfile index 93fbcd3e..8e4b5cc3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,9 +7,6 @@ RUN set -ex \ && apk add --no-cache --virtual .gyp build-base python3 \ && npm install -g --ignore-scripts corepack \ && corepack enable \ - && corepack prepare pnpm@latest --activate \ - && pnpm set progress=false \ - && pnpm config set depth 0 \ && pnpm install --ignore-scripts --frozen-lockfile \ && cp docker/config.json src/assets/config.json \ && cp docker/idtags.json src/assets/idtags.json \ @@ -33,4 +30,5 @@ RUN set -ex \ && chmod +x /run.sh \ && chmod +x /autoconfig.sh +EXPOSE 8080 ENTRYPOINT ["/bin/sh", "-c", "/autoconfig.sh && /run.sh"] diff --git a/docker/run.sh b/docker/run.sh index 189983a2..c5fb3cc0 100755 --- a/docker/run.sh +++ b/docker/run.sh @@ -1,3 +1,3 @@ #!/usr/bin/env sh -node dist/start.js +exec node dist/start.js diff --git a/ui/common/src/types/ConfigurationType.ts b/ui/common/src/types/ConfigurationType.ts index 2a3641b6..084449d8 100644 --- a/ui/common/src/types/ConfigurationType.ts +++ b/ui/common/src/types/ConfigurationType.ts @@ -1,5 +1,4 @@ -import type { AuthenticationType, ProtocolVersion } from './UIProtocol.js' -import type { Protocol } from './UIProtocol.js' +import type { AuthenticationType, Protocol, ProtocolVersion } from './UIProtocol.js' export interface ConfigurationData { theme?: string diff --git a/ui/web/docker/Dockerfile b/ui/web/docker/Dockerfile index bb618847..a554b541 100644 --- a/ui/web/docker/Dockerfile +++ b/ui/web/docker/Dockerfile @@ -6,9 +6,6 @@ COPY . ./ RUN set -ex \ && npm install -g --ignore-scripts corepack \ && corepack enable \ - && corepack prepare pnpm@latest --activate \ - && pnpm set progress=false \ - && pnpm config set depth 0 \ && pnpm install --ignore-scripts --frozen-lockfile \ && cp ui/web/docker/config.json ui/web/public/config.json \ && pnpm --filter webui build diff --git a/ui/web/docker/run.sh b/ui/web/docker/run.sh index 865f7dde..caa38234 100755 --- a/ui/web/docker/run.sh +++ b/ui/web/docker/run.sh @@ -1,3 +1,3 @@ #!/usr/bin/env sh -node start.js +exec node start.js diff --git a/ui/web/src/composables/UIClient.ts b/ui/web/src/composables/UIClient.ts index ba5bdbf7..b1f615b5 100644 --- a/ui/web/src/composables/UIClient.ts +++ b/ui/web/src/composables/UIClient.ts @@ -224,7 +224,13 @@ export class UIClient { } if (typeof options.transactionId === 'string') { return { - errorMessage: 'OCPP 1.6 requires numeric transactionId', + responsesFailed: [ + { + errorMessage: 'OCPP 1.6 requires numeric transactionId', + hashId, + status: ResponseStatus.FAILURE, + }, + ], status: ResponseStatus.FAILURE, } }