gtfs-to-html 2.10.14 → 2.10.15

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.
@@ -139,7 +139,7 @@ import {
139
139
  getFrequencies,
140
140
  getTimetables,
141
141
  getTimetablePages,
142
- getAgencies,
142
+ getAgencies as getAgencies2,
143
143
  openDb
144
144
  } from "gtfs";
145
145
  import { stringify } from "csv-stringify";
@@ -157,12 +157,14 @@ import { featureCollection, round } from "@turf/helpers";
157
157
  import { clearLine, cursorTo } from "readline";
158
158
  import { noop } from "lodash-es";
159
159
  import * as colors from "yoctocolors";
160
- import { getFeedInfo } from "gtfs";
160
+ import { getAgencies, getFeedInfo } from "gtfs";
161
161
  import Table from "cli-table";
162
162
  function generateLogText(outputStats, config) {
163
163
  const feedInfo = getFeedInfo();
164
+ const agencies = getAgencies();
164
165
  const feedVersion = feedInfo.length > 0 && feedInfo[0].feed_version ? feedInfo[0].feed_version : "Unknown";
165
166
  const logText = [
167
+ `Agencies: ${agencies.map((agency) => agency.agency_name).join(", ")}`,
166
168
  `Feed Version: ${feedVersion}`,
167
169
  `GTFS-to-HTML Version: ${config.gtfsToHtmlVersion}`,
168
170
  `Date Generated: ${(/* @__PURE__ */ new Date()).toISOString()}`,
@@ -500,7 +502,7 @@ function formatTripNameForCSV(trip, timetable) {
500
502
  // package.json
501
503
  var package_default = {
502
504
  name: "gtfs-to-html",
503
- version: "2.10.14",
505
+ version: "2.10.15",
504
506
  private: false,
505
507
  description: "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
506
508
  keywords: [
@@ -557,12 +559,12 @@ var package_default = {
557
559
  "gtfs-realtime-pbf-js-module": "^1.0.0",
558
560
  "js-beautify": "^1.15.4",
559
561
  "lodash-es": "^4.17.21",
560
- marked: "^16.0.0",
562
+ marked: "^16.1.1",
561
563
  moment: "^2.30.1",
562
564
  pbf: "^4.0.1",
563
565
  "pretty-error": "^4.0.0",
564
566
  pug: "^3.0.3",
565
- puppeteer: "^24.14.0",
567
+ puppeteer: "^24.15.0",
566
568
  "sanitize-filename": "^1.6.3",
567
569
  "sanitize-html": "^2.17.0",
568
570
  sqlstring: "^2.3.3",
@@ -1057,6 +1059,11 @@ var getStopOrder = (timetable, config) => {
1057
1059
  stopGraph.push([stopId, sortedStopIds[index + 1]]);
1058
1060
  }
1059
1061
  }
1062
+ if (stopGraph.length === 0 && config.showOnlyTimepoint === true) {
1063
+ timetable.warnings.push(
1064
+ `Timetable ${timetable.timetable_id}'s trips have stoptimes with timepoints but \`showOnlyTimepoint\` is true. Try setting \`showOnlyTimepoint\` to false.`
1065
+ );
1066
+ }
1060
1067
  const stopIds = toposort(stopGraph);
1061
1068
  return duplicateStopsForDifferentArrivalDeparture(
1062
1069
  stopIds,
@@ -1688,7 +1695,7 @@ var generateStats = (timetablePage) => {
1688
1695
  return stats;
1689
1696
  };
1690
1697
  function generateTimetableHTML(timetablePage, config) {
1691
- const agencies = getAgencies();
1698
+ const agencies = getAgencies2();
1692
1699
  const templateVars = {
1693
1700
  timetablePage,
1694
1701
  config,
@@ -1728,7 +1735,7 @@ function generateTimetableCSV(timetable) {
1728
1735
  return stringify(lines);
1729
1736
  }
1730
1737
  function generateOverviewHTML(timetablePages, config) {
1731
- const agencies = getAgencies();
1738
+ const agencies = getAgencies2();
1732
1739
  if (agencies.length === 0) {
1733
1740
  throw new Error("No agencies found");
1734
1741
  }