Add GTFS enrichment to HAFAS response
Implements enrichment for HAFAS API responses by cross-referencing section data against an indexed ÖBB GTFS feed. This involves adding logic to fetch, parse, and index the GTFS data from the specified URL. The enrichment function now uses GTFS time and station data to populate `gtfsName` and `gtfsDirection` fields for missing journey data in HAFAS responses. Updates are also made to: - Update `apps/web/src/lib/constants.ts` with the GTFS URL. - Create `apps/web/src/lib/oebb-gtfs.ts` to handle GTFS fetching and indexing. - Enhance `apps/web/src/app/api/hafas/route.ts` to utilize the new enrichment function. -Package updates include `fflate` and minor fixes to other packages.
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"cli": {
|
||||
"version": ">= 18.12.2",
|
||||
"appVersionSource": "remote"
|
||||
},
|
||||
"build": {
|
||||
"development": {
|
||||
"developmentClient": true,
|
||||
"distribution": "internal"
|
||||
},
|
||||
"preview": {
|
||||
"distribution": "internal"
|
||||
},
|
||||
"production": {
|
||||
"autoIncrement": true
|
||||
}
|
||||
},
|
||||
"submit": {
|
||||
"production": {}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user