From: Jérôme Benoit Date: Fri, 26 Aug 2022 12:10:05 +0000 (+0200) Subject: Web UI: Refine documentation and code cleanup X-Git-Tag: v1.1.67~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=efdd19228b996d429acfdef7e929baa4fa3f9d81;p=e-mobility-charging-stations-simulator.git Web UI: Refine documentation and code cleanup Signed-off-by: Jérôme Benoit --- diff --git a/package-lock.json b/package-lock.json index c568b04a..98351356 100644 --- a/package-lock.json +++ b/package-lock.json @@ -72,7 +72,7 @@ "rollup-plugin-terser": "^7.0.2", "rollup-plugin-ts": "^3.0.2", "ts-node": "^10.9.1", - "typescript": "^4.7.4" + "typescript": "^4.8.2" }, "engines": { "node": ">=16.0.0", @@ -16427,9 +16427,9 @@ } }, "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", + "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -30205,9 +30205,9 @@ } }, "typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", + "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", "dev": true }, "ua-parser-js": { diff --git a/package.json b/package.json index d3a818a1..942ad001 100644 --- a/package.json +++ b/package.json @@ -146,6 +146,6 @@ "rollup-plugin-terser": "^7.0.2", "rollup-plugin-ts": "^3.0.2", "ts-node": "^10.9.1", - "typescript": "^4.7.4" + "typescript": "^4.8.2" } } diff --git a/rollup.config.mjs b/rollup.config.mjs index eda73627..2f1c5d69 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -41,7 +41,6 @@ export default { 'basic-ftp', 'chalk', 'crypto', - 'express', 'fs', 'mnemonist/lru-map-with-delete', 'moment', diff --git a/src/ui/web/README.md b/src/ui/web/README.md index 00740197..04d8532a 100644 --- a/src/ui/web/README.md +++ b/src/ui/web/README.md @@ -10,13 +10,13 @@ npm install For both solution you can then follow the link displayed in the terminal at the end of compilation -#### Compiles and run without development tools +#### Compiles and run for production ``` npm start ``` -#### Compiles and hot-reloads for development +#### Compiles and run for development ``` npm run serve @@ -33,7 +33,3 @@ npm run build ``` npm run lint ``` - -### Customize configuration - -See [Configuration Reference](https://cli.vuejs.org/config/). diff --git a/src/ui/web/package-lock.json b/src/ui/web/package-lock.json index 1890e232..73b6f99b 100644 --- a/src/ui/web/package-lock.json +++ b/src/ui/web/package-lock.json @@ -39,7 +39,7 @@ "eslint-plugin-vue": "^9.4.0", "lint-staged": "^13.0.3", "prettier": "^2.7.1", - "typescript": "~4.7.4", + "typescript": "^4.8.2", "vue-eslint-parser": "^9.0.3" } }, @@ -17536,9 +17536,9 @@ } }, "node_modules/typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", + "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -32406,9 +32406,9 @@ } }, "typescript": { - "version": "4.7.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz", - "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==", + "version": "4.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", + "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", "dev": true }, "unbzip2-stream": { diff --git a/src/ui/web/package.json b/src/ui/web/package.json index 5c0a56bc..dd3ed56b 100644 --- a/src/ui/web/package.json +++ b/src/ui/web/package.json @@ -41,7 +41,7 @@ "eslint-plugin-vue": "^9.4.0", "lint-staged": "^13.0.3", "prettier": "^2.7.1", - "typescript": "~4.7.4", + "typescript": "^4.8.2", "vue-eslint-parser": "^9.0.3" }, "_id": "webui@0.1.0", diff --git a/src/ui/web/src/views/ChargingStationsView.vue b/src/ui/web/src/views/ChargingStationsView.vue index 9a5a2ce1..0c781566 100644 --- a/src/ui/web/src/views/ChargingStationsView.vue +++ b/src/ui/web/src/views/ChargingStationsView.vue @@ -46,8 +46,8 @@ const state: State = reactive({ async function load(): Promise { if (state.isLoading === true) return; state.isLoading = true; - const list = await UIClientInstance.listChargingStations(); - state.chargingStations = list as unknown as Record; + const chargingStationsList = await UIClientInstance.listChargingStations(); + state.chargingStations = chargingStationsList as unknown as Record; state.isLoading = false; } diff --git a/src/ui/web/start.js b/src/ui/web/start.js index e804fc11..0078cb5e 100644 --- a/src/ui/web/start.js +++ b/src/ui/web/start.js @@ -4,7 +4,7 @@ const path = require('path'), serveStatic = require('serve-static'); const PORT = process.env.PORT || 3030, - uiPath = path.join(__dirname, './dist/'); + uiPath = path.join(__dirname, './dist'); const serve = serveStatic(uiPath); @@ -12,4 +12,4 @@ const server = http.createServer(function onRequest(req, res) { serve(req, res, finalhandler(req, res)); }); -server.listen(PORT, () => console.info(`http://localhost:${PORT}`)); +server.listen(PORT, () => console.info(`App running at: http://localhost:${PORT}`));