gtfs 4.16.0 → 4.17.1

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.
@@ -154,7 +154,7 @@ __export(models_exports, {
154
154
  routes: () => routes,
155
155
  runEvents: () => runEvents,
156
156
  runsPieces: () => runsPieces,
157
- serviceAlertTargets: () => serviceAlertTargets,
157
+ serviceAlertInformedEntities: () => serviceAlertInformedEntities,
158
158
  serviceAlerts: () => serviceAlerts,
159
159
  shapes: () => shapes,
160
160
  stopAreas: () => stopAreas,
@@ -1385,7 +1385,8 @@ var stops = {
1385
1385
  {
1386
1386
  name: "parent_station",
1387
1387
  type: "text",
1388
- index: true
1388
+ index: true,
1389
+ prefix: true
1389
1390
  },
1390
1391
  {
1391
1392
  name: "stop_timezone",
@@ -2481,21 +2482,24 @@ var tripUpdates = {
2481
2482
  required: true,
2482
2483
  primary: true,
2483
2484
  index: true,
2484
- source: "id"
2485
+ source: "id",
2486
+ prefix: true
2485
2487
  },
2486
2488
  {
2487
2489
  name: "vehicle_id",
2488
2490
  type: "text",
2489
2491
  index: true,
2490
2492
  source: "tripUpdate.vehicle.id",
2491
- default: null
2493
+ default: null,
2494
+ prefix: true
2492
2495
  },
2493
2496
  {
2494
2497
  name: "trip_id",
2495
2498
  type: "text",
2496
2499
  index: true,
2497
2500
  source: "tripUpdate.trip.tripId",
2498
- default: null
2501
+ default: null,
2502
+ prefix: true
2499
2503
  },
2500
2504
  {
2501
2505
  name: "trip_start_time",
@@ -2514,7 +2518,8 @@ var tripUpdates = {
2514
2518
  type: "text",
2515
2519
  index: true,
2516
2520
  source: "tripUpdate.trip.routeId",
2517
- default: null
2521
+ default: null,
2522
+ prefix: true
2518
2523
  },
2519
2524
  {
2520
2525
  name: "start_date",
@@ -2557,7 +2562,8 @@ var stopTimeUpdates = {
2557
2562
  type: "text",
2558
2563
  index: true,
2559
2564
  source: "parent.tripUpdate.trip.tripId",
2560
- default: null
2565
+ default: null,
2566
+ prefix: true
2561
2567
  },
2562
2568
  {
2563
2569
  name: "trip_start_time",
@@ -2576,14 +2582,16 @@ var stopTimeUpdates = {
2576
2582
  type: "text",
2577
2583
  index: true,
2578
2584
  source: "parent.tripUpdate.trip.routeId",
2579
- default: null
2585
+ default: null,
2586
+ prefix: true
2580
2587
  },
2581
2588
  {
2582
2589
  name: "stop_id",
2583
2590
  type: "text",
2584
2591
  index: true,
2585
2592
  source: "stopId",
2586
- default: null
2593
+ default: null,
2594
+ prefix: true
2587
2595
  },
2588
2596
  {
2589
2597
  name: "stop_sequence",
@@ -2645,7 +2653,8 @@ var vehiclePositions = {
2645
2653
  required: true,
2646
2654
  primary: true,
2647
2655
  index: true,
2648
- source: "id"
2656
+ source: "id",
2657
+ prefix: true
2649
2658
  },
2650
2659
  {
2651
2660
  name: "bearing",
@@ -2687,7 +2696,8 @@ var vehiclePositions = {
2687
2696
  type: "text",
2688
2697
  index: true,
2689
2698
  source: "vehicle.trip.tripId",
2690
- default: null
2699
+ default: null,
2700
+ prefix: true
2691
2701
  },
2692
2702
  {
2693
2703
  name: "trip_start_date",
@@ -2732,7 +2742,8 @@ var vehiclePositions = {
2732
2742
  type: "text",
2733
2743
  index: true,
2734
2744
  source: "vehicle.vehicle.id",
2735
- default: null
2745
+ default: null,
2746
+ prefix: true
2736
2747
  },
2737
2748
  {
2738
2749
  name: "vehicle_label",
@@ -2782,7 +2793,8 @@ var serviceAlerts = {
2782
2793
  required: true,
2783
2794
  primary: true,
2784
2795
  index: true,
2785
- source: "id"
2796
+ source: "id",
2797
+ prefix: true
2786
2798
  },
2787
2799
  {
2788
2800
  name: "active_period",
@@ -2861,9 +2873,9 @@ var serviceAlerts = {
2861
2873
  ]
2862
2874
  };
2863
2875
 
2864
- // src/models/gtfs-realtime/service-alert-targets.ts
2865
- var serviceAlertTargets = {
2866
- filenameBase: "service_alert_targets",
2876
+ // src/models/gtfs-realtime/service-alert-informed_entities.ts
2877
+ var serviceAlertInformedEntities = {
2878
+ filenameBase: "service_alert_informed_entities",
2867
2879
  extension: "gtfs-realtime",
2868
2880
  schema: [
2869
2881
  {
@@ -2871,20 +2883,45 @@ var serviceAlertTargets = {
2871
2883
  type: "text",
2872
2884
  required: true,
2873
2885
  primary: true,
2874
- source: "parent.id"
2886
+ source: "parent.id",
2887
+ prefix: true
2875
2888
  },
2876
2889
  {
2877
2890
  name: "stop_id",
2878
2891
  type: "text",
2879
2892
  index: true,
2880
2893
  source: "stopId",
2881
- default: null
2894
+ default: null,
2895
+ prefix: true
2882
2896
  },
2883
2897
  {
2884
2898
  name: "route_id",
2885
2899
  type: "text",
2886
2900
  index: true,
2887
2901
  source: "routeId",
2902
+ default: null,
2903
+ prefix: true
2904
+ },
2905
+ {
2906
+ name: "route_type",
2907
+ type: "integer",
2908
+ index: true,
2909
+ source: "routeType",
2910
+ default: null
2911
+ },
2912
+ {
2913
+ name: "trip_id",
2914
+ type: "text",
2915
+ index: true,
2916
+ source: "trip.tripId",
2917
+ default: null,
2918
+ prefix: true
2919
+ },
2920
+ {
2921
+ name: "direction_id",
2922
+ type: "integer",
2923
+ index: true,
2924
+ source: "directionId",
2888
2925
  default: null
2889
2926
  },
2890
2927
  {
@@ -3240,8 +3277,8 @@ import { feature, featureCollection } from "@turf/helpers";
3240
3277
  // src/lib/import-gtfs-realtime.ts
3241
3278
  import pluralize from "pluralize";
3242
3279
  import GtfsRealtimeBindings from "gtfs-realtime-bindings";
3243
- import sqlString2 from "sqlstring-sqlite";
3244
3280
  import mapSeries from "promise-map-series";
3281
+ import { get } from "lodash-es";
3245
3282
 
3246
3283
  // src/lib/utils.ts
3247
3284
  import sqlString from "sqlstring-sqlite";
@@ -3275,7 +3312,7 @@ import { writeFile } from "node:fs/promises";
3275
3312
  import { without, compact as compact2 } from "lodash-es";
3276
3313
  import pluralize3 from "pluralize";
3277
3314
  import { stringify } from "csv-stringify";
3278
- import sqlString3 from "sqlstring-sqlite";
3315
+ import sqlString2 from "sqlstring-sqlite";
3279
3316
  import mapSeries3 from "promise-map-series";
3280
3317
  import untildify4 from "untildify";
3281
3318
  var getAgencies = (db, config) => {
@@ -3327,7 +3364,7 @@ var exportGtfs = async (initialConfig) => {
3327
3364
  exportPath,
3328
3365
  `${model.filenameBase}.${model.filenameExtension}`
3329
3366
  );
3330
- const tableName = sqlString3.escapeId(model.filenameBase);
3367
+ const tableName = sqlString2.escapeId(model.filenameBase);
3331
3368
  const lines = db.prepare(`SELECT * FROM ${tableName};`).all();
3332
3369
  if (!lines || lines.length === 0) {
3333
3370
  if (!model.nonstandard) {
@@ -3389,7 +3426,7 @@ var exportGtfs = async (initialConfig) => {
3389
3426
  };
3390
3427
 
3391
3428
  // src/lib/advancedQuery.ts
3392
- import sqlString4 from "sqlstring-sqlite";
3429
+ import sqlString3 from "sqlstring-sqlite";
3393
3430
 
3394
3431
  // src/lib/gtfs/routes.ts
3395
3432
  import { omit as omit3, pick } from "lodash-es";
@@ -3403,7 +3440,7 @@ import { omit as omit5, orderBy, pick as pick3 } from "lodash-es";
3403
3440
 
3404
3441
  // src/lib/gtfs/stop-times.ts
3405
3442
  import { omit as omit6 } from "lodash-es";
3406
- import sqlString5 from "sqlstring-sqlite";
3443
+ import sqlString4 from "sqlstring-sqlite";
3407
3444
 
3408
3445
  // src/bin/gtfs-export.ts
3409
3446
  var pe = new PrettyError();