Commit graph

159 commits

Author SHA1 Message Date
Traines
883eb8c8de refactor 2025-03-21 21:13:20 +00:00
Traines
b20cf1060a add dbris, moreStops param 2025-03-21 20:49:38 +00:00
Traines
b887c674d4 fix param parsing for refreshJourney
Some checks failed
test / lint-and-spellcheck (push) Has been cancelled
test / unit-tests (18.x) (push) Has been cancelled
test / unit-tests (20.x) (push) Has been cancelled
test / unit-tests (22.x) (push) Has been cancelled
test / integration-tests (18.x) (push) Has been cancelled
test / integration-tests (20.x) (push) Has been cancelled
test / integration-tests (22.x) (push) Has been cancelled
test / e2e-tests (18.x) (push) Has been cancelled
2025-03-20 10:58:32 +00:00
Traines
162b946bac support for bestprice, notOnlyFastRoutes, serviceDays, fix param default handling 2025-03-15 22:44:08 +00:00
Traines
9975a6c9ac more reliable setup of proxy agent
Some checks failed
test / lint-and-spellcheck (push) Has been cancelled
test / unit-tests (18.x) (push) Has been cancelled
test / unit-tests (20.x) (push) Has been cancelled
test / unit-tests (22.x) (push) Has been cancelled
test / integration-tests (18.x) (push) Has been cancelled
test / integration-tests (20.x) (push) Has been cancelled
test / integration-tests (22.x) (push) Has been cancelled
test / e2e-tests (18.x) (push) Has been cancelled
2025-03-08 23:12:36 +00:00
Kristjan ESPERANTO
de63bf0a37 Fix typos found with cspell 2025-03-06 16:13:56 +01:00
Kristjan ESPERANTO
53b385a865
Replace lodash by modern JavaScript functions (#20)
Some checks are pending
test / lint (push) Waiting to run
test / unit-tests (18.x) (push) Waiting to run
test / unit-tests (20.x) (push) Waiting to run
test / unit-tests (22.x) (push) Waiting to run
test / integration-tests (18.x) (push) Waiting to run
test / integration-tests (20.x) (push) Waiting to run
test / integration-tests (22.x) (push) Waiting to run
test / e2e-tests (18.x) (push) Blocked by required conditions
* Replace lodash by built-in functions

* .flatMap -> .flat
2025-03-01 17:30:58 +01:00
Traines
16829f839c add back HTTP_PROXY support 2025-02-25 12:52:50 +00:00
Traines
9fe4972d2b fix includeRelatedStations 2025-02-25 12:23:26 +00:00
McToel
1aeb246622
Browser compatibility (#17)
* Removed Proxy and local address code

* replaced node crypto with web crypto

* Replaced require with static imports

* removed commented out imports

* import db-hafas-stations on demand

* trying to handle undefined envs

* Less optimistic variable handling

* cleanup

* Small browser docs addition

* Linting

* No async in new Promise

* Bumped eslint to v9 and ecmaScript to 2025

* removed duplicated eslint config

* Bumped minimal node version to node 18

* Added node 24

* using math.random instead of webcrypto and reintroduced randomizeUserAgent

* Oh no node 24 is actually not released yet

* removed temp debug file
2025-02-25 13:21:26 +01:00
Traines
177a3cab3f migrate and update loyaltyCard parsing from db-rest 2025-02-13 23:32:01 +00:00
Traines
71d1a4f1a9 refactor enrichStations, only load on first request 2025-02-13 22:16:22 +00:00
Traines
977da80885 cleanup 2025-01-11 21:14:50 +00:00
Traines
01b95e74f4 add back cli 2025-01-11 20:55:46 +00:00
Traines
98670d5e08 stop() 2025-01-08 23:24:40 +00:00
dabund24
632a29d2aa
Allow value -1 for transfers option in journeys() (#6)
* allow value -1 for transfers option in journeys() for db and dbnav profiles

* add unit test for implicitly unconstrained transfers

* implement `formatTransfers()`, use it `formatJourneysReq()` functions and re-add corresponding unit test
2025-01-09 00:22:43 +01:00
Traines
87a705e966 dbnav journeys, trips, fixes 2025-01-03 10:57:24 +00:00
Traines
3d998de41c dbnav boards, fixes 2025-01-02 14:00:45 +00:00
Traines
6538f814aa fix regression... 2024-12-21 23:16:57 +00:00
Traines
debc1ee150 dbnav profile: locations, nearby 2024-12-21 23:04:05 +00:00
Traines
771ab128b3 more refactoring 2024-12-21 16:30:11 +00:00
Traines
ec723b3414 refactoring 2024-12-21 15:26:49 +00:00
Traines
760a1bdb54 refreshJourney with tickets, loyaltyCard/firstClass rest support, accept-lang 2024-12-11 23:51:58 +00:00
Traines
c6bb1b468a fixes for journeyID and fahrtNr 2024-12-10 22:49:11 +00:00
Traines
f8a79834b3 linting 2024-12-08 21:42:57 +00:00
Traines
0e328aa681 tests 2024-12-07 23:48:08 +00:00
Traines
80e633dcb7 arrival/departure, refactoring 2024-12-07 22:46:04 +00:00
Traines
2f45f66793 /locations, /locations/nearby, fixes 2024-12-07 18:29:16 +00:00
Traines
2e094c2b78 initial db-vendo with /journeys (wip) 2024-12-07 16:17:16 +00:00
Kristjan ESPERANTO
66d9fb5194
apply linting rules
follow-up of 228c7253
2024-02-10 16:50:12 +01:00
Jannis R
a157d0b15f
put todos 2024-01-18 15:27:35 +01:00
Jannis R
f29ced5b2d
handle "PROBLEMS" HAFAS error code 2023-12-07 00:55:35 +01:00
Jannis R
793cc9eee5
request: with $HTTP(S)_PROXY, keep connections alive for 10s 2023-07-25 16:09:43 +02:00
Jannis R
f9c24a4a84
https-proxy-agent@7 2023-07-07 19:33:06 +02:00
Jannis R
c2a71b08e8
request: import Buffer 🐛
related: #281
2023-01-06 14:07:30 +01:00
Jannis R
547dd4b2a9
parseDateTime, format{Date,Time}: share Luxon IANAZones 2022-12-03 14:05:30 +01:00
Jannis R
339d64e901
convert to ESM 💥📝 2022-11-18 19:20:03 +01:00
Jannis R
cef6dcaf0f
request: pass whole req body into transformReqBody 🐛 2022-11-18 19:20:03 +01:00
Jannis R
1000e48dfd
handle METHOD_NA/NO_MATCH/PARAMETER errors 2022-11-17 15:17:02 +01:00
Jannis R
9b263bb379
rework error handling 💥📝 2022-11-17 15:17:02 +01:00
Jannis R
0275b65c7a
fetch-ponyfill & pinkie-promise -> cross-fetch 💥
cross-fetch requires `globalThis.Promise` to be present.
2022-11-17 15:17:02 +01:00
Jannis R
7765f9d7a1
lib/request: use async/await, simplify error handling 2022-11-17 15:17:02 +01:00
Jannis R
a81e550f2a
departures{GetPasslist,StbFltrEquiv}: default to false 💥 2022-11-17 15:17:01 +01:00
Jannis R
492fdeb2ef
add profile.randomizeUserAgent flag 📝 2022-11-17 15:17:01 +01:00
Jannis R
a60083f8d1
parse trip.scheduledDays 2022-11-16 15:23:25 +01:00
Jannis R
7ccffa5e51
profile.log{Request,Response}: pass in random request ID 📝 2022-10-07 01:31:12 +02:00
Jannis R
829c9ca461
add profile.log{Request,Response}() hooks 📝 2022-10-06 14:34:38 +02:00
Pieterjan Van Saet
7c68f962c1
parse{Stopover,JourneyLeg, Trip}: expose {arrival,departure}PrognosisType
see #266

Co-authored-by: Jannis R <mail@jannisr.de>
2022-07-22 01:06:35 +02:00
Jannis R
e3a022972c
request: tweak user-agent randomisation
see also https://github.com/deg0nz/MMM-PublicTransportBerlin/pull/67
2022-01-13 14:08:28 +01:00
Jannis R
9c10a1765f
fix request debug-logging 🐛 2021-12-09 18:58:35 +01:00