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