Commit graph

158 commits

Author SHA1 Message Date
McToel
cc8459c161 using math.random instead of webcrypto and reintroduced randomizeUserAgent 2025-02-20 23:45:44 +01:00
McToel
406d24a051
Merge branch 'main' into main 2025-02-19 01:00:22 +01:00
McToel
f1d226e9c8 Linting 2025-02-19 00:16:08 +01:00
McToel
f943e50cbd cleanup 2025-02-17 15:46:01 +01:00
McToel
c908705167 Less optimistic variable handling 2025-02-16 16:50:06 +01:00
McToel
53c20ab0e8 trying to handle undefined envs 2025-02-16 16:39:00 +01:00
McToel
a9eacd20b5 removed commented out imports 2025-02-14 00:43:22 +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
McToel
46e21f8d75 replaced node crypto with web crypto 2025-02-13 16:01:29 +01:00
McToel
f7909aac29 Removed Proxy and local address code 2025-02-13 15:25:33 +01: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
Jannis R
2fd06941b5
use HTTP keep-alive
1000 locations() requests against DB endpoint, before:
  min     max   sum   mean  stddev
215ms  4351ms  329s  329ms   341ms

after:
  min     max   sum   mean  stddev
160ms   579ms  194s  194ms    37ms
2021-12-09 18:54:46 +01:00