@transportme/load-ptv-gtfs 1.4.5 → 1.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@ import GTFSCalendar from './GTFSCalendar.mjs'
4
4
  export default class GTFSTrip {
5
5
 
6
6
  #routeGTFSID
7
+ #calendarName
7
8
  #operationDays
8
9
  #tripID
9
10
  #shapeID
@@ -24,6 +25,7 @@ export default class GTFSTrip {
24
25
  */
25
26
  constructor({ routeGTFSID, calendar, id, shapeID, headsign, direction, block }) {
26
27
  this.#routeGTFSID = routeGTFSID
28
+ this.#calendarName = calendar.id
27
29
  this.#operationDays = calendar.getOperationDays()
28
30
  this.#tripID = id
29
31
  this.#shapeID = shapeID
@@ -73,6 +75,10 @@ export default class GTFSTrip {
73
75
  return this.#block || null
74
76
  }
75
77
 
78
+ getCalendarName() {
79
+ return this.#calendarName
80
+ }
81
+
76
82
  getOperationDays() {
77
83
  return this.#operationDays
78
84
  }
@@ -173,7 +173,7 @@ export default class TripLoader {
173
173
  let tripData = await this.generateDBTripData(rawTripData, stops)
174
174
  if (!tripData) return
175
175
 
176
- let processedData = processTrip ? await processTrip(tripData) : tripData
176
+ let processedData = processTrip ? await processTrip(tripData, rawTripData) : tripData
177
177
  if (!processedData) return
178
178
 
179
179
  this.#shapeIDMap[tripData.shapeID] = tripData.routeGTFSID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transportme/load-ptv-gtfs",
3
- "version": "1.4.5",
3
+ "version": "1.4.6",
4
4
  "description": "",
5
5
  "main": "index.mjs",
6
6
  "scripts": {