gtfs-to-html 2.12.8 → 2.12.9

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 CHANGED
@@ -61,6 +61,7 @@ Many transit agencies use `gtfs-to-html` to generate the schedule pages used on
61
61
 
62
62
  | Agency | Location |
63
63
  | ----------------------------------------------------------------------------- | ----------------------------------- |
64
+ | [Asheville Rides Transit (ART)](https://www.ridetheart.com) | Asheville, North Carolina |
64
65
  | [Basin Transit](https://basin-transit.com) | Morongo Basin, California |
65
66
  | [Bayway Transit](https://www.baywaytransit.org) | Panama City, Florida |
66
67
  | [Brockton Area Transit Authority](https://ridebat.com) | Brockton, Massachusetts |
package/dist/app/index.js CHANGED
@@ -188,7 +188,7 @@ import {
188
188
  import { homedir } from "os";
189
189
  import * as _ from "lodash-es";
190
190
  import { uniqBy } from "lodash-es";
191
- import archiver from "archiver";
191
+ import { ZipArchive } from "archiver";
192
192
  import beautify from "js-beautify";
193
193
  import sanitizeHtml from "sanitize-html";
194
194
  import { renderFile } from "pug";
@@ -509,7 +509,7 @@ function getAgencyGeoJSON(config2) {
509
509
  // package.json
510
510
  var package_default = {
511
511
  name: "gtfs-to-html",
512
- version: "2.12.8",
512
+ version: "2.12.9",
513
513
  private: false,
514
514
  description: "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
515
515
  keywords: [
@@ -555,15 +555,15 @@ var package_default = {
555
555
  build: "tsup",
556
556
  postbuild: "node scripts/postinstall.js",
557
557
  start: "node ./dist/app",
558
- prepare: "husky && npm run build",
558
+ prepare: "husky && pnpm run build",
559
559
  postinstall: "node scripts/postinstall.js"
560
560
  },
561
561
  dependencies: {
562
562
  "@maplibre/maplibre-gl-geocoder": "^1.9.4",
563
- "@turf/helpers": "^7.3.4",
564
- "@turf/simplify": "^7.3.4",
563
+ "@turf/helpers": "^7.3.5",
564
+ "@turf/simplify": "^7.3.5",
565
565
  anchorme: "^3.0.8",
566
- archiver: "^7.0.1",
566
+ archiver: "^8.0.0",
567
567
  "cli-table": "^0.3.11",
568
568
  "css.escape": "^1.5.1",
569
569
  "csv-stringify": "^6.7.0",
@@ -572,15 +572,15 @@ var package_default = {
572
572
  "gtfs-realtime-pbf-js-module": "^1.0.0",
573
573
  "js-beautify": "^1.15.4",
574
574
  "lodash-es": "^4.18.1",
575
- "maplibre-gl": "^5.23.0",
576
- marked: "^18.0.0",
575
+ "maplibre-gl": "^5.24.0",
576
+ marked: "^18.0.3",
577
577
  moment: "^2.30.1",
578
578
  pbf: "^4.0.1",
579
579
  "pretty-error": "^4.0.0",
580
580
  pug: "^3.0.4",
581
- puppeteer: "^24.40.0",
581
+ puppeteer: "^24.43.1",
582
582
  "sanitize-filename": "^1.6.4",
583
- "sanitize-html": "^2.17.2",
583
+ "sanitize-html": "^2.17.4",
584
584
  sqlstring: "^2.3.3",
585
585
  toposort: "^2.0.2",
586
586
  yargs: "^18.0.0",
@@ -599,14 +599,15 @@ var package_default = {
599
599
  "@types/toposort": "^2.0.7",
600
600
  "@types/yargs": "^17.0.35",
601
601
  husky: "^9.1.7",
602
- "lint-staged": "^16.4.0",
603
- prettier: "^3.8.2",
602
+ "lint-staged": "^17.0.4",
603
+ prettier: "^3.8.3",
604
604
  tsup: "^8.5.1",
605
- typescript: "^6.0.2"
605
+ typescript: "^6.0.3"
606
606
  },
607
607
  engines: {
608
608
  node: ">= 22"
609
609
  },
610
+ packageManager: "pnpm@11.1.1+sha512.d1fdf5f73c617b64fa1a56a81c3c8dfe0e966e33a6010aa256b517ae77be21d93e05affc0de1a83b0e4f29d569f68b446ae8f068cd7247c0bb3df0fb4d7bdf9a",
610
611
  "release-it": {
611
612
  github: {
612
613
  release: true
@@ -617,7 +618,7 @@ var package_default = {
617
618
  }
618
619
  },
619
620
  hooks: {
620
- "after:bump": "npm run build"
621
+ "after:bump": "pnpm run build"
621
622
  }
622
623
  },
623
624
  prettier: {
@@ -625,12 +626,6 @@ var package_default = {
625
626
  },
626
627
  "lint-staged": {
627
628
  "*.{js,ts,json}": "prettier --write"
628
- },
629
- pnpm: {
630
- onlyBuiltDependencies: [
631
- "better-sqlite3",
632
- "puppeteer"
633
- ]
634
629
  }
635
630
  };
636
631
 
@@ -1451,6 +1446,46 @@ var filterTrips = (timetable, calendars, config2) => {
1451
1446
  if (config2.showDuplicateTrips === false) {
1452
1447
  filteredTrips = deduplicateTrips(filteredTrips);
1453
1448
  }
1449
+ const dayNames = [
1450
+ "monday",
1451
+ "tuesday",
1452
+ "wednesday",
1453
+ "thursday",
1454
+ "friday",
1455
+ "saturday",
1456
+ "sunday"
1457
+ ];
1458
+ const timetableDays = dayNames.filter((day) => timetable[day] === 1);
1459
+ if (timetableDays.length > 1) {
1460
+ const warnedServiceIds = /* @__PURE__ */ new Set();
1461
+ for (const trip of filteredTrips) {
1462
+ const tripServiceIds = [
1463
+ trip.service_id,
1464
+ ...trip.additional_service_ids ?? []
1465
+ ];
1466
+ const tripCalendars = calendars.filter(
1467
+ (c) => tripServiceIds.includes(c.service_id)
1468
+ );
1469
+ if (tripCalendars.length === 0) {
1470
+ continue;
1471
+ }
1472
+ const tripDays = getDaysFromCalendars(tripCalendars);
1473
+ const missingDays = timetableDays.filter(
1474
+ (day) => (tripDays[day] ?? 0) !== 1
1475
+ );
1476
+ if (missingDays.length > 0) {
1477
+ const serviceIdKey = tripServiceIds.sort().join("|");
1478
+ if (!warnedServiceIds.has(serviceIdKey)) {
1479
+ warnedServiceIds.add(serviceIdKey);
1480
+ const tripDayList = formatDays(tripDays, config2);
1481
+ const timetableDayList = formatDays(timetable, config2);
1482
+ timetable.warnings.push(
1483
+ `Timetable ${timetable.timetable_id} (Routes: ${timetable.routes.map((route) => route.route_short_name).join(", ")}) covers ${timetableDayList} but some trips (service_id=${tripServiceIds.join(", ")}) only run on ${tripDayList}. This may indicate a data issue in the GTFS or that you should generate separate timetables for different days of the week.`
1484
+ );
1485
+ }
1486
+ }
1487
+ }
1488
+ }
1454
1489
  const formattedTrips = filteredTrips.map((trip) => {
1455
1490
  const tripCalendars = calendars.filter((calendar) => {
1456
1491
  return [