@transportme/load-ptv-gtfs 1.4.11 → 1.4.12

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.
@@ -247,13 +247,20 @@ export default class TripLoader {
247
247
  await this.writeTrips()
248
248
  }
249
249
 
250
- async writeTrips() {
251
- if (this.#tripsToLoad.length) {
252
- this.#routeCache = {}
253
- this.#stopCache = {}
250
+ getTripsToLoad() {
251
+ return this.#tripsToLoad
252
+ }
254
253
 
254
+ clearTripsToLoad() {
255
+ this.#routeCache = {}
256
+ this.#stopCache = {}
257
+ this.#tripsToLoad = []
258
+ }
259
+
260
+ async writeTrips() {
261
+ if (this.getTripsToLoad().length) {
255
262
  await this.#trips.createDocuments(this.#tripsToLoad)
256
- this.#tripsToLoad = []
263
+ this.clearTripsToLoad()
257
264
  }
258
265
  }
259
266
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transportme/load-ptv-gtfs",
3
- "version": "1.4.11",
3
+ "version": "1.4.12",
4
4
  "description": "",
5
5
  "main": "index.mjs",
6
6
  "scripts": {