From f47cf4c540cc13b52f5998e6a37824247841460c Mon Sep 17 00:00:00 2001 From: Kristjan ESPERANTO <35647502+KristjanESPERANTO@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:23:39 +0200 Subject: [PATCH] Update hafas-client and remove workaround (#232) --- README.md | 58 +++++++++++++++++++++-------------------------- base.json | 17 -------------- package-lock.json | 19 ++++++++-------- package.json | 2 +- 4 files changed, 37 insertions(+), 59 deletions(-) delete mode 100644 base.json diff --git a/README.md b/README.md index 2912cba..e0f4fb0 100644 --- a/README.md +++ b/README.md @@ -33,12 +33,6 @@ cd MMM-PublicTransportBerlin npm ci ``` -Since there is an issue with the current version of `hafas_client`, you also have to run this command to fix that: - -```shell -cp base.json node_modules/hafas-client/p/bvg/base.json -``` - ## Update Just enter your MMM-PublicTransportBerlin directory, pull the update and install the dependencies: @@ -100,32 +94,32 @@ The module is quite configurable. These are the possible options: Here is an example of an entry in `config.js`: ```JavaScript -{ - module: "MMM-PublicTransportBerlin", - position: "top_right", - config: { - stationName: "Alexanderplatz", - stationId: "900100003", - hidden: false, - ignoredLines: ["U5", "U8", "S75", "Bus 100"], - excludedTransportationTypes: "bus,suburban,subway", - travelTimeToStation: 10, - interval: 120000, - departureMinutes: 10, - marqueeLongDirections: true, - showColoredLineSymbols: true, - useColorForRealtimeInfo: true, - showTableHeaders: true, - showTableHeadersAsSymbols: true, - maxUnreachableDepartures: 3, - maxReachableDepartures: 7, - fadeUnreachableDepartures: true, - fadeReachableDepartures: true, - fadePointForReachableDepartures: 0.25, - excludeDelayFromTimeLabel: true, - useBrightScheme: true - } -}, + { + module: "MMM-PublicTransportBerlin", + position: "top_right", + config: { + stationName: "Alexanderplatz", + stationId: "900100003", + hidden: false, + ignoredLines: ["U5", "U8", "S75", "Bus 100"], + excludedTransportationTypes: "bus,suburban,subway", + travelTimeToStation: 10, + interval: 120000, + departureMinutes: 10, + marqueeLongDirections: true, + showColoredLineSymbols: true, + useColorForRealtimeInfo: true, + showTableHeaders: true, + showTableHeadersAsSymbols: true, + maxUnreachableDepartures: 3, + maxReachableDepartures: 7, + fadeUnreachableDepartures: true, + fadeReachableDepartures: true, + fadePointForReachableDepartures: 0.25, + excludeDelayFromTimeLabel: true, + useBrightScheme: true + } + }, ``` ## Multiple Modules diff --git a/base.json b/base.json deleted file mode 100644 index a68524c..0000000 --- a/base.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "auth": { - "type": "AID", - "aid": "dVg4TZbW8anjx9ztPwe2uk4LVRi9wO" - }, - "client": { - "type": "WEB", - "id": "VBB", - "v": 10002, - "name": "webapp", - "l": "vs_webapp" - }, - "endpoint": "https://bvg-apps-ext.hafas.de/bin/mgate.exe", - "ext": "BVG.1", - "ver": "1.72", - "defaultLanguage": "de" -} diff --git a/package-lock.json b/package-lock.json index 0086d14..c2bc5ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "2.1.0", "license": "MIT", "dependencies": { - "hafas-client": "^6.3.0", + "hafas-client": "^6.3.2", "moment": "^2.30", "vbb-line-colors": "^1.0.5", "vbb-short-station-name": "^1.0.1" @@ -2197,9 +2197,9 @@ "dev": true }, "node_modules/hafas-client": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/hafas-client/-/hafas-client-6.3.0.tgz", - "integrity": "sha512-wEcvducoEutQrwyylaJS6fhy3aTAhuWa6XNpKfvd4M9qSnaPV/f4Wcwi6u6TV0I5C+bdiyjmWcME4kKjWHFI+w==", + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/hafas-client/-/hafas-client-6.3.2.tgz", + "integrity": "sha512-EdtJjDO1HPW9Li9/x3xJM2t8q+O/6sWDGIPZdZsyvrUhQbGN2gDIdc8e4TREUvDUJDLPWwyQBZ/V69z+9Fwp9Q==", "license": "ISC", "dependencies": { "@derhuerst/br2nl": "^1.0.0", @@ -2212,7 +2212,7 @@ "https-proxy-agent": "^7.0.0", "lodash": "^4.17.5", "luxon": "^3.1.1", - "object-scan": "^13.0.0", + "object-scan": "^19.0.5", "p-retry": "^6.0.0", "p-throttle": "^5.0.0", "qs": "^6.6.0", @@ -3089,11 +3089,12 @@ } }, "node_modules/object-scan": { - "version": "13.9.3", - "resolved": "https://registry.npmjs.org/object-scan/-/object-scan-13.9.3.tgz", - "integrity": "sha512-gb27kO8ovRqt9V3BfPygvV/Dfd5cIk+QEX/V5D85M7kYimkcb9iTyKZLjSaojyPJUk/Ugr7yU36xaKaIVHbMOA==", + "version": "19.0.5", + "resolved": "https://registry.npmjs.org/object-scan/-/object-scan-19.0.5.tgz", + "integrity": "sha512-5rr03NDQJ3oW4gWamHxON45ZLoFe6VCsRJ+trMlYWXlnYTGsuX/eD6MPp9yItzqFhd0pUpgzPm0jrYoeubIsIA==", + "license": "MIT", "engines": { - "node": ">= 10" + "node": ">= 16" } }, "node_modules/object.assign": { diff --git a/package.json b/package.json index 8e3cb0f..3cb80c9 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "node": ">=16" }, "dependencies": { - "hafas-client": "^6.3.0", + "hafas-client": "^6.3.2", "moment": "^2.30", "vbb-line-colors": "^1.0.5", "vbb-short-station-name": "^1.0.1"