gtfs-to-html 2.8.1 → 2.9.0
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/README.md +1 -1
- package/dist/app/index.js +19 -2
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gtfs-to-html.js +26 -8
- package/dist/bin/gtfs-to-html.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +26 -8
- package/dist/index.js.map +1 -1
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ By generating future timetables and including dates in table metadata, your time
|
|
|
45
45
|
|
|
46
46
|
### Auto-generated maps
|
|
47
47
|
|
|
48
|
-
`gtfs-to-html` can also generate a map for each route that can be included with the schedule page. The map shows all stops for the route and lists all routes that serve each stop.
|
|
48
|
+
`gtfs-to-html` can also generate a map for each route that can be included with the schedule page. The map shows all stops for the route and lists all routes that serve each stop. Maps can also show realtime vehicle locations and predicted arrival times from GTFS-realtime data.
|
|
49
49
|
|
|
50
50
|
Note: If you only want maps of GTFS data, use the [gtfs-to-geojson](https://github.com/blinktaginc/gtfs-to-geojson) package instead and skip making timetables entirely. If offers many different formats of GeoJSON for routes and stops.
|
|
51
51
|
|
package/dist/app/index.js
CHANGED
|
@@ -133,7 +133,6 @@ import toposort from "toposort";
|
|
|
133
133
|
// src/lib/file-utils.ts
|
|
134
134
|
import path from "node:path";
|
|
135
135
|
import { fileURLToPath } from "node:url";
|
|
136
|
-
import copydir from "copy-dir";
|
|
137
136
|
import _ from "lodash-es";
|
|
138
137
|
import archiver from "archiver";
|
|
139
138
|
import beautify from "js-beautify";
|
|
@@ -366,7 +365,7 @@ function getAgencyGeoJSON(config2) {
|
|
|
366
365
|
}
|
|
367
366
|
|
|
368
367
|
// package.json
|
|
369
|
-
var version = "2.8.
|
|
368
|
+
var version = "2.8.1";
|
|
370
369
|
|
|
371
370
|
// src/lib/utils.ts
|
|
372
371
|
var isTimepoint = (stoptime) => {
|
|
@@ -1343,6 +1342,9 @@ function setDefaultConfig(initialConfig) {
|
|
|
1343
1342
|
if (config2.outputFormat === "pdf") {
|
|
1344
1343
|
config2.noHead = false;
|
|
1345
1344
|
}
|
|
1345
|
+
config2.hasGtfsRealtime = config2.agencies.some(
|
|
1346
|
+
(agency) => agency.realtimeTripUpdates?.url || agency.realtimeVehiclePositions?.url
|
|
1347
|
+
);
|
|
1346
1348
|
return config2;
|
|
1347
1349
|
}
|
|
1348
1350
|
function getFormattedTimetablePage(timetablePageId, config2) {
|
|
@@ -1838,6 +1840,21 @@ app.set("view engine", "pug");
|
|
|
1838
1840
|
app.use(logger("dev"));
|
|
1839
1841
|
var staticAssetPath = config.templatePath === void 0 ? path2.join(fileURLToPath2(import.meta.url), "../../../views/default") : untildify2(config.templatePath);
|
|
1840
1842
|
app.use(express.static(staticAssetPath));
|
|
1843
|
+
app.use(
|
|
1844
|
+
"/js",
|
|
1845
|
+
express.static(
|
|
1846
|
+
path2.join(fileURLToPath2(import.meta.url), "../../../node_modules/pbf/dist")
|
|
1847
|
+
)
|
|
1848
|
+
);
|
|
1849
|
+
app.use(
|
|
1850
|
+
"/js",
|
|
1851
|
+
express.static(
|
|
1852
|
+
path2.join(
|
|
1853
|
+
fileURLToPath2(import.meta.url),
|
|
1854
|
+
"../../../node_modules/gtfs-realtime-pbf-js-module"
|
|
1855
|
+
)
|
|
1856
|
+
)
|
|
1857
|
+
);
|
|
1841
1858
|
app.use("/", router);
|
|
1842
1859
|
app.set("port", process.env.PORT || 3e3);
|
|
1843
1860
|
var server = app.listen(app.get("port"), () => {
|