@transportme/load-ptv-gtfs 1.4.14 → 1.4.16

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.
package/index.mjs CHANGED
@@ -23,6 +23,8 @@ import GTFSStopsReader from './lib/gtfs-parser/readers/GTFSStopsReader.mjs'
23
23
  import GTFSStopTimesReader from './lib/gtfs-parser/readers/GTFSStopTimesReader.mjs'
24
24
  import GTFSTripReader from './lib/gtfs-parser/readers/GTFSTripReader.mjs'
25
25
 
26
+ import PTVGTFS from './lib/gtfs-package/PTVGTFS.mjs'
27
+
26
28
  const GTFSTypes = {
27
29
  GTFSAgency, GTFSCalendar, GTFSCalendarDate,
28
30
  GTFSRoute, GTFSShape, GTFSShapePoint,
@@ -40,5 +42,5 @@ export {
40
42
  RouteLoader, ShapeLoader,
41
43
  StopsLoader, TripLoader,
42
44
  GTFSTypes, GTFSReaders,
43
- setRouteStops
45
+ setRouteStops, PTVGTFS
44
46
  }
@@ -5,6 +5,8 @@ import path from 'path'
5
5
  import { createWriteStream } from 'fs'
6
6
  import { unlink } from 'fs/promises'
7
7
 
8
+ const EXCLUDED_MODES = [7, 8, 9]
9
+
8
10
  export default class PTVGTFS {
9
11
 
10
12
  #url
@@ -77,7 +79,7 @@ export default class PTVGTFS {
77
79
  await new Promise(resolve => zip.extractAllToAsync(this.#destinationFolder, true, resolve))
78
80
 
79
81
  for (let mode = 1; mode <= 11; mode++) {
80
- if (mode === 9) continue
82
+ if (EXCLUDED_MODES.includes(mode)) continue
81
83
  await this.#unzipMode(mode.toString())
82
84
  }
83
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transportme/load-ptv-gtfs",
3
- "version": "1.4.14",
3
+ "version": "1.4.16",
4
4
  "description": "",
5
5
  "main": "index.mjs",
6
6
  "scripts": {