]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor: fix phantom errorMessage, merge imports, harmonize Docker configs
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 16 Apr 2026 13:27:13 +0000 (15:27 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 16 Apr 2026 13:27:13 +0000 (15:27 +0200)
- 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

docker/Dockerfile
docker/run.sh
ui/common/src/types/ConfigurationType.ts
ui/web/docker/Dockerfile
ui/web/docker/run.sh
ui/web/src/composables/UIClient.ts

index 93fbcd3ee79e545a5f10ce07e0a8ee4ea178c0d8..8e4b5cc3cac2a8f7cb160430f502e8024be82679 100644 (file)
@@ -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"]
index 189983a293e7cff99ddd3962ad60b6dc07f36362..c5fb3cc0fb183e0fa0f5e71d4360812ce287414f 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env sh
 
-node dist/start.js
+exec node dist/start.js
index 2a3641b6c8c3ac0d01dccc079a397a9f9cbcc9a8..084449d8e5b1c3aab6ba9193f64ec5039bba7b99 100644 (file)
@@ -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
index bb618847e1e9686c18220ee2ca8caab48b432138..a554b541bf967a91931d7d0002fe183befb806c4 100644 (file)
@@ -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
index 865f7dde5873e0ee419e39bc5e7cdc85d98d1681..caa38234ab2a56fee9136161628b625a4b351303 100755 (executable)
@@ -1,3 +1,3 @@
 #!/usr/bin/env sh
 
-node start.js
+exec node start.js
index ba5bdbf7947098293441857c25ca1f2217e00e1b..b1f615b5d2c1579ccbfb5654b01804096f920201 100644 (file)
@@ -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,
       }
     }