gtfs-to-html 2.10.11 → 2.10.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.
- package/dist/app/index.js +34 -18
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gtfs-to-html.js +25 -20
- package/dist/bin/gtfs-to-html.js.map +1 -1
- package/dist/index.js +25 -20
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/app/index.js
CHANGED
|
@@ -5,9 +5,9 @@ var __export = (target, all) => {
|
|
|
5
5
|
};
|
|
6
6
|
|
|
7
7
|
// src/app/index.ts
|
|
8
|
-
import { dirname as dirname2, join as join2 } from "
|
|
9
|
-
import { fileURLToPath as fileURLToPath2 } from "
|
|
10
|
-
import { readFileSync } from "
|
|
8
|
+
import { dirname as dirname2, join as join2 } from "path";
|
|
9
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
10
|
+
import { readFileSync } from "fs";
|
|
11
11
|
import yargs from "yargs";
|
|
12
12
|
import { hideBin } from "yargs/helpers";
|
|
13
13
|
import { openDb as openDb2 } from "gtfs";
|
|
@@ -130,8 +130,18 @@ import sqlString from "sqlstring";
|
|
|
130
130
|
import toposort from "toposort";
|
|
131
131
|
|
|
132
132
|
// src/lib/file-utils.ts
|
|
133
|
-
import { dirname, join, resolve } from "
|
|
134
|
-
import {
|
|
133
|
+
import { dirname, join, resolve } from "path";
|
|
134
|
+
import { createWriteStream } from "fs";
|
|
135
|
+
import { fileURLToPath } from "url";
|
|
136
|
+
import {
|
|
137
|
+
access,
|
|
138
|
+
cp,
|
|
139
|
+
copyFile,
|
|
140
|
+
mkdir,
|
|
141
|
+
readdir,
|
|
142
|
+
readFile,
|
|
143
|
+
rm
|
|
144
|
+
} from "fs/promises";
|
|
135
145
|
import * as _ from "lodash-es";
|
|
136
146
|
import archiver from "archiver";
|
|
137
147
|
import beautify from "js-beautify";
|
|
@@ -312,6 +322,7 @@ import simplify from "@turf/simplify";
|
|
|
312
322
|
import { featureCollection, round } from "@turf/helpers";
|
|
313
323
|
|
|
314
324
|
// src/lib/log-utils.ts
|
|
325
|
+
import { clearLine, cursorTo } from "readline";
|
|
315
326
|
import { noop } from "lodash-es";
|
|
316
327
|
import * as colors from "yoctocolors";
|
|
317
328
|
import { getFeedInfo } from "gtfs";
|
|
@@ -409,7 +420,7 @@ function getAgencyGeoJSON(config2) {
|
|
|
409
420
|
// package.json
|
|
410
421
|
var package_default = {
|
|
411
422
|
name: "gtfs-to-html",
|
|
412
|
-
version: "2.10.
|
|
423
|
+
version: "2.10.12",
|
|
413
424
|
private: false,
|
|
414
425
|
description: "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
|
|
415
426
|
keywords: [
|
|
@@ -462,18 +473,18 @@ var package_default = {
|
|
|
462
473
|
"cli-table": "^0.3.11",
|
|
463
474
|
"csv-stringify": "^6.5.2",
|
|
464
475
|
express: "^5.1.0",
|
|
465
|
-
gtfs: "^4.17.
|
|
476
|
+
gtfs: "^4.17.3",
|
|
466
477
|
"gtfs-realtime-pbf-js-module": "^1.0.0",
|
|
467
478
|
"js-beautify": "^1.15.4",
|
|
468
479
|
"lodash-es": "^4.17.21",
|
|
469
|
-
marked: "^15.0.
|
|
480
|
+
marked: "^15.0.12",
|
|
470
481
|
moment: "^2.30.1",
|
|
471
482
|
pbf: "^4.0.1",
|
|
472
483
|
"pretty-error": "^4.0.0",
|
|
473
484
|
pug: "^3.0.3",
|
|
474
|
-
puppeteer: "^24.
|
|
485
|
+
puppeteer: "^24.9.0",
|
|
475
486
|
"sanitize-filename": "^1.6.3",
|
|
476
|
-
"sanitize-html": "^2.
|
|
487
|
+
"sanitize-html": "^2.17.0",
|
|
477
488
|
sqlstring: "^2.3.3",
|
|
478
489
|
"timer-machine": "^1.1.0",
|
|
479
490
|
toposort: "^2.0.2",
|
|
@@ -483,20 +494,20 @@ var package_default = {
|
|
|
483
494
|
},
|
|
484
495
|
devDependencies: {
|
|
485
496
|
"@types/archiver": "^6.0.3",
|
|
486
|
-
"@types/express": "^5.0.
|
|
497
|
+
"@types/express": "^5.0.2",
|
|
487
498
|
"@types/insane": "^1.0.0",
|
|
488
499
|
"@types/js-beautify": "^1.14.3",
|
|
489
500
|
"@types/lodash-es": "^4.17.12",
|
|
490
501
|
"@types/morgan": "^1.9.9",
|
|
491
|
-
"@types/node": "^22.
|
|
502
|
+
"@types/node": "^22.15.19",
|
|
492
503
|
"@types/pug": "^2.0.10",
|
|
493
|
-
"@types/sanitize-html": "^2.
|
|
504
|
+
"@types/sanitize-html": "^2.16.0",
|
|
494
505
|
"@types/timer-machine": "^1.1.3",
|
|
495
506
|
"@types/yargs": "^17.0.33",
|
|
496
507
|
husky: "^9.1.7",
|
|
497
|
-
"lint-staged": "^
|
|
508
|
+
"lint-staged": "^16.0.0",
|
|
498
509
|
prettier: "^3.5.3",
|
|
499
|
-
tsup: "^8.
|
|
510
|
+
tsup: "^8.5.0",
|
|
500
511
|
typescript: "^5.8.3"
|
|
501
512
|
},
|
|
502
513
|
engines: {
|
|
@@ -961,10 +972,15 @@ var getStopOrder = (timetable, config2) => {
|
|
|
961
972
|
}
|
|
962
973
|
try {
|
|
963
974
|
const stopGraph = [];
|
|
975
|
+
const timepointStopIds = new Set(
|
|
976
|
+
timetable.orderedTrips.flatMap(
|
|
977
|
+
(trip) => trip.stoptimes.filter((stoptime) => isTimepoint(stoptime)).map((stoptime) => stoptime.stop_id)
|
|
978
|
+
)
|
|
979
|
+
);
|
|
964
980
|
for (const trip of timetable.orderedTrips) {
|
|
965
981
|
const sortedStopIds = trip.stoptimes.filter((stoptime) => {
|
|
966
982
|
if (config2.showOnlyTimepoint === true) {
|
|
967
|
-
return
|
|
983
|
+
return timepointStopIds.has(stoptime.stop_id);
|
|
968
984
|
}
|
|
969
985
|
return true;
|
|
970
986
|
}).map((stoptime) => stoptime.stop_id);
|
|
@@ -990,12 +1006,12 @@ var getStopOrder = (timetable, config2) => {
|
|
|
990
1006
|
(stoptime) => stoptime.stop_id
|
|
991
1007
|
);
|
|
992
1008
|
const missingStopIds = difference(
|
|
993
|
-
|
|
1009
|
+
new Set(
|
|
994
1010
|
timetable.orderedTrips.flatMap(
|
|
995
1011
|
(trip) => trip.stoptimes.map((stoptime) => stoptime.stop_id)
|
|
996
1012
|
)
|
|
997
1013
|
),
|
|
998
|
-
|
|
1014
|
+
new Set(stopIds)
|
|
999
1015
|
);
|
|
1000
1016
|
if (missingStopIds.length > 0) {
|
|
1001
1017
|
timetable.warnings.push(
|