gtfs-to-html 2.10.1 → 2.10.3

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/app/index.js CHANGED
@@ -8,7 +8,6 @@ var __export = (target, all) => {
8
8
  import { dirname as dirname2, join as join2 } from "node:path";
9
9
  import { fileURLToPath as fileURLToPath2 } from "node:url";
10
10
  import { readFileSync } from "node:fs";
11
- import { map } from "lodash-es";
12
11
  import yargs from "yargs";
13
12
  import { hideBin } from "yargs/helpers";
14
13
  import { openDb as openDb2 } from "gtfs";
@@ -136,11 +135,11 @@ import { fileURLToPath } from "node:url";
136
135
  import * as _ from "lodash-es";
137
136
  import archiver from "archiver";
138
137
  import beautify from "js-beautify";
138
+ import DOMPurify from "dompurify";
139
139
  import { renderFile } from "pug";
140
140
  import puppeteer from "puppeteer";
141
141
  import sanitize from "sanitize-filename";
142
142
  import untildify from "untildify";
143
- import insane from "insane";
144
143
  import { marked } from "marked";
145
144
 
146
145
  // src/lib/template-functions.ts
@@ -292,7 +291,7 @@ async function renderTemplate(templateFileName, templateVars, config2) {
292
291
  const templatePath = getPathToTemplateFile(templateFileName, config2);
293
292
  const html = await renderFile(templatePath, {
294
293
  _,
295
- md: (text) => insane(marked.parseInline(text)),
294
+ md: (text) => DOMPurify.sanitize(marked.parseInline(text)),
296
295
  ...template_functions_exports,
297
296
  formatRouteColor,
298
297
  formatRouteTextColor,
@@ -408,7 +407,7 @@ function getAgencyGeoJSON(config2) {
408
407
  }
409
408
 
410
409
  // package.json
411
- var version = "2.10.1";
410
+ var version = "2.10.3";
412
411
 
413
412
  // src/lib/utils.ts
414
413
  var isTimepoint = (stoptime) => {
@@ -1915,9 +1914,8 @@ app.use(
1915
1914
  app.get("/", async (req, res, next) => {
1916
1915
  try {
1917
1916
  const timetablePages = [];
1918
- const timetablePageIds = map(
1919
- getTimetablePagesForAgency(config),
1920
- "timetable_page_id"
1917
+ const timetablePageIds = getTimetablePagesForAgency(config).map(
1918
+ (timetablePage) => timetablePage.timetable_page_id
1921
1919
  );
1922
1920
  for (const timetablePageId of timetablePageIds) {
1923
1921
  const timetablePage = await getFormattedTimetablePage(