@transportme/load-ptv-gtfs 1.4.12 → 1.4.14

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.
@@ -129,7 +129,8 @@ export class SmartrakTrip extends GTFSTrip {
129
129
  getTripData() {
130
130
  return {
131
131
  ...super.getTripData(),
132
- depotID: this.getDepotID()
132
+ depotID: this.getDepotID(),
133
+ runID: this.getTripID()
133
134
  }
134
135
  }
135
136
 
@@ -8,9 +8,9 @@ import { minutesPastMidnightToHHMM } from '../utils.mjs'
8
8
 
9
9
  export default class TripLoader {
10
10
 
11
- #routes
12
- #stops
13
- #trips
11
+ routes
12
+ stops
13
+ trips
14
14
 
15
15
  #tripsReader
16
16
  #stopTimesReader
@@ -44,9 +44,9 @@ export default class TripLoader {
44
44
  * @param {DatabaseConnection} database A database connection
45
45
  */
46
46
  constructor({ tripsFile, stopTimesFile, calendarFile, calendarDatesFile }, mode, database) {
47
- this.#routes = this.getRoutesDB(database)
48
- this.#stops = this.getStopsDB(database)
49
- this.#trips = this.getTripsDB(database)
47
+ this.routes = this.getRoutesDB(database)
48
+ this.stops = this.getStopsDB(database)
49
+ this.trips = this.getTripsDB(database)
50
50
 
51
51
  this.#mode = mode
52
52
 
@@ -104,7 +104,7 @@ export default class TripLoader {
104
104
  async findMatchingRoute(routeGTFSID) {
105
105
  if (this.#routeCache[routeGTFSID]) return this.#routeCache[routeGTFSID]
106
106
 
107
- let route = await this.#routes.findDocument({
107
+ let route = await this.routes.findDocument({
108
108
  routeGTFSID: routeGTFSID
109
109
  })
110
110
 
@@ -115,7 +115,7 @@ export default class TripLoader {
115
115
  async findMatchingStop(stopGTFSID) {
116
116
  if (this.#stopCache[stopGTFSID]) return this.#stopCache[stopGTFSID]
117
117
 
118
- let stop = await this.#stops.findDocument({
118
+ let stop = await this.stops.findDocument({
119
119
  'bays.stopGTFSID': stopGTFSID
120
120
  })
121
121
 
@@ -259,7 +259,7 @@ export default class TripLoader {
259
259
 
260
260
  async writeTrips() {
261
261
  if (this.getTripsToLoad().length) {
262
- await this.#trips.createDocuments(this.#tripsToLoad)
262
+ await this.trips.createDocuments(this.getTripsToLoad())
263
263
  this.clearTripsToLoad()
264
264
  }
265
265
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transportme/load-ptv-gtfs",
3
- "version": "1.4.12",
3
+ "version": "1.4.14",
4
4
  "description": "",
5
5
  "main": "index.mjs",
6
6
  "scripts": {