From 17bfa1b672f294e7af4c9a344cb42628cf0c1d87 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 28 Aug 2022 13:29:55 +0200 Subject: [PATCH] Add postman collection for UI HTPP server MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- docker/Dockerfile | 4 +- docker/authorization-tags.json | 1 + docker/docker-compose.yml | 2 + package-lock.json | 2 +- package.json | 2 +- ...imulatorUIProtocol.postman_collection.json | 299 ++++++++++++++++++ src/charging-station/MessageChannelUtils.ts | 1 + src/ui/web/package-lock.json | 199 ++++++++---- src/ui/web/package.json | 10 +- src/ui/web/src/composables/UIClient.ts | 2 +- src/ui/web/src/types/ConfigurationType.ts | 2 +- src/ui/web/tsconfig.json | 1 - 12 files changed, 450 insertions(+), 75 deletions(-) create mode 100644 docker/authorization-tags.json create mode 100644 src/assets/CSSimulatorUIProtocol.postman_collection.json diff --git a/docker/Dockerfile b/docker/Dockerfile index 9843d05b..2aae47f2 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -9,6 +9,7 @@ WORKDIR /usr/builder COPY package.json package-lock.json tsconfig.json rollup.config.mjs prepare.js build-requirements.js ./ COPY src ./src COPY docker/config.json ./src/assets/config.json +COPY docker/authorization-tags.json ./src/assets/authorization-tags.json RUN npm set progress=false && npm config set depth 0 && npm cache clean --force && npm install RUN npm run build @@ -25,10 +26,9 @@ FROM node:lts-alpine ARG STACK_TRACE_LIMIT ARG MAX_OLD_SPACE_SIZE -WORKDIR /usr/app - ENV NODE_OPTIONS="--stack-trace-limit=${STACK_TRACE_LIMIT} --max-old-space-size=${MAX_OLD_SPACE_SIZE}" +WORKDIR /usr/app COPY --from=builder /usr/builder/webui ./webui COPY --from=builder /usr/builder/node_modules ./node_modules COPY --from=builder /usr/builder/dist ./dist diff --git a/docker/authorization-tags.json b/docker/authorization-tags.json new file mode 100644 index 00000000..b94e83fb --- /dev/null +++ b/docker/authorization-tags.json @@ -0,0 +1 @@ +["test"] diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index db6f914c..6c4a7310 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -12,5 +12,7 @@ services: MAX_OLD_SPACE_SIZE: 1024 networks: - ev_network + expose: + - 8080 ports: - '3030:3030' diff --git a/package-lock.json b/package-lock.json index f94bfbd8..d91dc6a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "uuid": "^8.3.2", "winston": "^3.8.1", "winston-daily-rotate-file": "^4.7.1", - "ws": "^8.8.0" + "ws": "^8.8.1" }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.2", diff --git a/package.json b/package.json index fc47c655..d7f27019 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "uuid": "^8.3.2", "winston": "^3.8.1", "winston-daily-rotate-file": "^4.7.1", - "ws": "^8.8.0" + "ws": "^8.8.1" }, "optionalDependencies": { "bufferutil": "^4.0.6", diff --git a/src/assets/CSSimulatorUIProtocol.postman_collection.json b/src/assets/CSSimulatorUIProtocol.postman_collection.json new file mode 100644 index 00000000..fa625198 --- /dev/null +++ b/src/assets/CSSimulatorUIProtocol.postman_collection.json @@ -0,0 +1,299 @@ +{ + "info": { + "_postman_id": "2d4009e7-04a8-4516-adaf-8b60780df9f4", + "name": "CSSimulatorUIProtocol", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", + "_exporter_id": "23011687" + }, + "item": [ + { + "name": "listChargingStations", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/{{protocol}}/{{version}}/listChargingStations", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "{{protocol}}", + "{{version}}", + "listChargingStations" + ] + } + }, + "response": [] + }, + { + "name": "startChargingStation", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hashIds\": [\n \"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n \"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/{{protocol}}/{{version}}/startChargingStation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "{{protocol}}", + "{{version}}", + "startChargingStation" + ] + } + }, + "response": [] + }, + { + "name": "stopChargingStation", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hashIds\": [\n \"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n \"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/{{protocol}}/{{version}}/stopChargingStation", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "{{protocol}}", + "{{version}}", + "stopChargingStation" + ] + } + }, + "response": [] + }, + { + "name": "startSimulator", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/{{protocol}}/{{version}}/startSimulator", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "{{protocol}}", + "{{version}}", + "startSimulator" + ] + } + }, + "response": [] + }, + { + "name": "stopSimulator", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/{{protocol}}/{{version}}/stopSimulator", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "{{protocol}}", + "{{version}}", + "stopSimulator" + ] + } + }, + "response": [] + }, + { + "name": "openConnection", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hashIds\": [\n \"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n \"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/{{protocol}}/{{version}}/openConnection", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "{{protocol}}", + "{{version}}", + "openConnection" + ] + } + }, + "response": [] + }, + { + "name": "closeConnection", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hashIds\": [\n \"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\",\n \"331d024fea36e3e2483a0e5dc9376234241c8c099ad201a441437b23622c308555183f37cbc84a1818c1c45aaae50896\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/{{protocol}}/{{version}}/closeConnection", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "{{protocol}}", + "{{version}}", + "closeConnection" + ] + } + }, + "response": [] + }, + { + "name": "startTransaction", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hashIds\": [\n \"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n ],\n \"connectorId\": 1,\n \"idTag\": \"test\"\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/{{protocol}}/{{version}}/startTransaction", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "{{protocol}}", + "{{version}}", + "startTransaction" + ] + } + }, + "response": [] + }, + { + "name": "stopTransaction", + "request": { + "method": "POST", + "header": [], + "body": { + "mode": "raw", + "raw": "{\n \"hashIds\": [\n \"0058d8b50e422cce5bbd0c0a4ad13d5d657e8a88670dcf04c1b2b563fea3db5b96a3686278b374ed050e21baef89060e\"\n ],\n \"transactionId\": 1236043451\n}", + "options": { + "raw": { + "language": "json" + } + } + }, + "url": { + "raw": "{{baseUrl}}/{{protocol}}/{{version}}/stopTransaction", + "host": [ + "{{baseUrl}}" + ], + "path": [ + "{{protocol}}", + "{{version}}", + "stopTransaction" + ] + } + }, + "response": [] + } + ], + "event": [ + { + "listen": "prerequest", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + }, + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "" + ] + } + } + ], + "variable": [ + { + "key": "baseUrl", + "value": "http://localhost:8080", + "type": "string" + }, + { + "key": "protocol", + "value": "ui", + "type": "string" + }, + { + "key": "version", + "value": "0.0.1", + "type": "string" + } + ] +} \ No newline at end of file diff --git a/src/charging-station/MessageChannelUtils.ts b/src/charging-station/MessageChannelUtils.ts index 4cf037ba..2371dd3d 100644 --- a/src/charging-station/MessageChannelUtils.ts +++ b/src/charging-station/MessageChannelUtils.ts @@ -56,6 +56,7 @@ export class MessageChannelUtils { stopped: chargingStation.stopped, bootNotificationResponse: chargingStation.bootNotificationResponse, connectors: Array.from(chargingStation.connectors.values()).map( + // eslint-disable-next-line @typescript-eslint/no-unused-vars ({ transactionSetInterval, ...connectorStatusRest }) => connectorStatusRest ), }; diff --git a/src/ui/web/package-lock.json b/src/ui/web/package-lock.json index 7963e1f8..20885e35 100644 --- a/src/ui/web/package-lock.json +++ b/src/ui/web/package-lock.json @@ -5544,6 +5544,21 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/bufferutil": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", + "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/builtins": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", @@ -11333,27 +11348,6 @@ "node": ">=12" } }, - "node_modules/jsdom/node_modules/ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -13365,6 +13359,19 @@ "node": ">= 6.13.0" } }, + "node_modules/node-gyp-build": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", + "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "dev": true, + "optional": true, + "peer": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, "node_modules/node-notifier": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-10.0.1.tgz", @@ -16770,6 +16777,27 @@ "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", "dev": true }, + "node_modules/subscriptions-transport-ws/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -17802,6 +17830,21 @@ "node": ">=0.10.0" } }, + "node_modules/utf-8-validate": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", + "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "peer": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -18477,6 +18520,27 @@ "node": ">=8" } }, + "node_modules/webpack-bundle-analyzer/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/webpack-chain": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/webpack-chain/-/webpack-chain-6.5.1.tgz", @@ -18678,27 +18742,6 @@ "url": "https://opencollective.com/webpack" } }, - "node_modules/webpack-dev-server/node_modules/ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": "^5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/webpack-merge": { "version": "5.8.0", "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", @@ -18997,12 +19040,12 @@ } }, "node_modules/ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "dev": true, "engines": { - "node": ">=8.3.0" + "node": ">=10.0.0" }, "peerDependencies": { "bufferutil": "^4.0.1", @@ -23432,6 +23475,17 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "bufferutil": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.6.tgz", + "integrity": "sha512-jduaYOYtnio4aIAyc6UbvPCVcgq7nYpVnucyxr6eCYg/Woad9Hf/oxxBRDnGGjPfjUm6j5O/uBWhIu4iLebFaw==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, "builtins": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", @@ -27772,13 +27826,6 @@ "tr46": "^3.0.0", "webidl-conversions": "^7.0.0" } - }, - "ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", - "dev": true, - "requires": {} } } }, @@ -29302,6 +29349,14 @@ "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", "dev": true }, + "node-gyp-build": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz", + "integrity": "sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==", + "dev": true, + "optional": true, + "peer": true + }, "node-notifier": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-10.0.1.tgz", @@ -31858,6 +31913,13 @@ "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", "dev": true + }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "requires": {} } } }, @@ -32626,6 +32688,17 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", "dev": true }, + "utf-8-validate": { + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", + "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", + "dev": true, + "optional": true, + "peer": true, + "requires": { + "node-gyp-build": "^4.3.0" + } + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", @@ -33157,6 +33230,13 @@ "requires": { "has-flag": "^4.0.0" } + }, + "ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "requires": {} } } }, @@ -33306,13 +33386,6 @@ "ajv-formats": "^2.1.1", "ajv-keywords": "^5.0.0" } - }, - "ws": { - "version": "8.8.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", - "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", - "dev": true, - "requires": {} } } }, @@ -33536,9 +33609,9 @@ } }, "ws": { - "version": "7.5.9", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", - "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "dev": true, "requires": {} }, diff --git a/src/ui/web/package.json b/src/ui/web/package.json index 03e86c51..4e9f36da 100644 --- a/src/ui/web/package.json +++ b/src/ui/web/package.json @@ -1,6 +1,10 @@ { "name": "webui", "version": "0.1.0", + "readme": "README.md", + "gitHooks": { + "pre-commit": "lint-staged" + }, "scripts": { "start": "npm run build && node start.js", "serve": "vue-cli-service serve", @@ -43,9 +47,5 @@ "prettier": "^2.7.1", "typescript": "~4.8.2" }, - "_id": "webui@0.1.0", - "gitHooks": { - "pre-commit": "lint-staged" - }, - "readme": "README.md" + "_id": "webui@0.1.0" } diff --git a/src/ui/web/src/composables/UIClient.ts b/src/ui/web/src/composables/UIClient.ts index 0c30494d..c5e81a31 100644 --- a/src/ui/web/src/composables/UIClient.ts +++ b/src/ui/web/src/composables/UIClient.ts @@ -30,7 +30,7 @@ export default class UIClient { return UIClient._instance; } - public registerWSonOpenListener(listener: (this: WebSocket, ev: Event) => void) { + public registerWSonOpenListener(listener: (event: Event) => void) { this._ws.addEventListener('open', listener); } diff --git a/src/ui/web/src/types/ConfigurationType.ts b/src/ui/web/src/types/ConfigurationType.ts index ee7baae0..69e2b9cd 100644 --- a/src/ui/web/src/types/ConfigurationType.ts +++ b/src/ui/web/src/types/ConfigurationType.ts @@ -5,5 +5,5 @@ export interface BaseConfig { export interface EMobilityConfig { host: string; port: number; - protocol: 'ui0.0.1'; + protocol: string; } diff --git a/src/ui/web/tsconfig.json b/src/ui/web/tsconfig.json index 9e934d1f..8269c9eb 100644 --- a/src/ui/web/tsconfig.json +++ b/src/ui/web/tsconfig.json @@ -7,7 +7,6 @@ "baseUrl": ".", "types": [ "node", - "webpack-env", "mocha", "chai" ], -- 2.34.1