gtfs-to-html 2.8.1 → 2.9.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.
- package/README.md +1 -1
- package/dist/app/index.js +20 -2
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gtfs-to-html.js +34 -9
- package/dist/bin/gtfs-to-html.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +34 -9
- package/dist/index.js.map +1 -1
- package/package.json +9 -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.
|
|
368
|
+
var version = "2.9.0";
|
|
370
369
|
|
|
371
370
|
// src/lib/utils.ts
|
|
372
371
|
var isTimepoint = (stoptime) => {
|
|
@@ -1342,7 +1341,11 @@ function setDefaultConfig(initialConfig) {
|
|
|
1342
1341
|
const config2 = Object.assign(defaults, initialConfig);
|
|
1343
1342
|
if (config2.outputFormat === "pdf") {
|
|
1344
1343
|
config2.noHead = false;
|
|
1344
|
+
config2.menuType = "none";
|
|
1345
1345
|
}
|
|
1346
|
+
config2.hasGtfsRealtime = config2.agencies.some(
|
|
1347
|
+
(agency) => agency.realtimeTripUpdates?.url || agency.realtimeVehiclePositions?.url
|
|
1348
|
+
);
|
|
1346
1349
|
return config2;
|
|
1347
1350
|
}
|
|
1348
1351
|
function getFormattedTimetablePage(timetablePageId, config2) {
|
|
@@ -1838,6 +1841,21 @@ app.set("view engine", "pug");
|
|
|
1838
1841
|
app.use(logger("dev"));
|
|
1839
1842
|
var staticAssetPath = config.templatePath === void 0 ? path2.join(fileURLToPath2(import.meta.url), "../../../views/default") : untildify2(config.templatePath);
|
|
1840
1843
|
app.use(express.static(staticAssetPath));
|
|
1844
|
+
app.use(
|
|
1845
|
+
"/js",
|
|
1846
|
+
express.static(
|
|
1847
|
+
path2.join(fileURLToPath2(import.meta.url), "../../../node_modules/pbf/dist")
|
|
1848
|
+
)
|
|
1849
|
+
);
|
|
1850
|
+
app.use(
|
|
1851
|
+
"/js",
|
|
1852
|
+
express.static(
|
|
1853
|
+
path2.join(
|
|
1854
|
+
fileURLToPath2(import.meta.url),
|
|
1855
|
+
"../../../node_modules/gtfs-realtime-pbf-js-module"
|
|
1856
|
+
)
|
|
1857
|
+
)
|
|
1858
|
+
);
|
|
1841
1859
|
app.use("/", router);
|
|
1842
1860
|
app.set("port", process.env.PORT || 3e3);
|
|
1843
1861
|
var server = app.listen(app.get("port"), () => {
|