gtfs-to-html 2.12.1 → 2.12.2
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 +26 -21
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gtfs-to-html.js +37 -58
- package/dist/bin/gtfs-to-html.js.map +1 -1
- package/dist/frontend_libraries/anchorme.min.js +1 -0
- package/dist/frontend_libraries/gtfs-realtime.browser.proto.js +0 -0
- package/dist/frontend_libraries/maplibre-gl-geocoder.css +284 -0
- package/dist/frontend_libraries/maplibre-gl-geocoder.js +2790 -0
- package/dist/frontend_libraries/maplibre-gl.css +1 -0
- package/dist/frontend_libraries/maplibre-gl.js +59 -0
- package/dist/frontend_libraries/pbf.js +1 -0
- package/dist/index.js +37 -58
- package/dist/index.js.map +1 -1
- package/package.json +14 -11
- package/scripts/postinstall.js +115 -0
package/dist/app/index.js
CHANGED
|
@@ -136,7 +136,6 @@ import {
|
|
|
136
136
|
rm
|
|
137
137
|
} from "fs/promises";
|
|
138
138
|
import { homedir } from "os";
|
|
139
|
-
import { findPackageJSON } from "module";
|
|
140
139
|
import * as _ from "lodash-es";
|
|
141
140
|
import { uniqBy } from "lodash-es";
|
|
142
141
|
import archiver from "archiver";
|
|
@@ -259,20 +258,23 @@ function formatTripNameForCSV(trip, timetable) {
|
|
|
259
258
|
|
|
260
259
|
// src/lib/file-utils.ts
|
|
261
260
|
var homeDirectory = homedir();
|
|
262
|
-
function
|
|
263
|
-
if (config2.templatePath) {
|
|
264
|
-
return untildify(config2.templatePath);
|
|
265
|
-
}
|
|
261
|
+
function getPathToThisModuleFolder() {
|
|
266
262
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
267
|
-
let
|
|
263
|
+
let distFolderPath;
|
|
268
264
|
if (__dirname.endsWith("/dist/bin") || __dirname.endsWith("/dist/app")) {
|
|
269
|
-
|
|
265
|
+
distFolderPath = resolve(__dirname, "../../");
|
|
270
266
|
} else if (__dirname.endsWith("/dist")) {
|
|
271
|
-
|
|
267
|
+
distFolderPath = resolve(__dirname, "../");
|
|
272
268
|
} else {
|
|
273
|
-
|
|
269
|
+
distFolderPath = resolve(__dirname, "../../");
|
|
270
|
+
}
|
|
271
|
+
return distFolderPath;
|
|
272
|
+
}
|
|
273
|
+
function getPathToViewsFolder(config2) {
|
|
274
|
+
if (config2.templatePath) {
|
|
275
|
+
return untildify(config2.templatePath);
|
|
274
276
|
}
|
|
275
|
-
return
|
|
277
|
+
return join(getPathToThisModuleFolder(), "views/default");
|
|
276
278
|
}
|
|
277
279
|
function getPathToTemplateFile(templateFileName, config2) {
|
|
278
280
|
const fullTemplateFileName = config2.noHead !== true ? `${templateFileName}_full.pug` : `${templateFileName}.pug`;
|
|
@@ -428,7 +430,7 @@ function getAgencyGeoJSON(config2) {
|
|
|
428
430
|
// package.json
|
|
429
431
|
var package_default = {
|
|
430
432
|
name: "gtfs-to-html",
|
|
431
|
-
version: "2.12.
|
|
433
|
+
version: "2.12.2",
|
|
432
434
|
private: false,
|
|
433
435
|
description: "Build human readable transit timetables as HTML, PDF or CSV from GTFS",
|
|
434
436
|
keywords: [
|
|
@@ -463,6 +465,7 @@ var package_default = {
|
|
|
463
465
|
"dist",
|
|
464
466
|
"docker",
|
|
465
467
|
"examples",
|
|
468
|
+
"scripts",
|
|
466
469
|
"views/default",
|
|
467
470
|
"config-sample.json"
|
|
468
471
|
],
|
|
@@ -471,30 +474,32 @@ var package_default = {
|
|
|
471
474
|
},
|
|
472
475
|
scripts: {
|
|
473
476
|
build: "tsup",
|
|
477
|
+
postbuild: "node scripts/postinstall.js",
|
|
474
478
|
start: "node ./dist/app",
|
|
475
|
-
prepare: "husky"
|
|
479
|
+
prepare: "husky && npm run build",
|
|
480
|
+
postinstall: "node scripts/postinstall.js"
|
|
476
481
|
},
|
|
477
482
|
dependencies: {
|
|
478
483
|
"@maplibre/maplibre-gl-geocoder": "^1.9.1",
|
|
479
|
-
"@turf/helpers": "^7.3.
|
|
480
|
-
"@turf/simplify": "^7.3.
|
|
484
|
+
"@turf/helpers": "^7.3.1",
|
|
485
|
+
"@turf/simplify": "^7.3.1",
|
|
481
486
|
anchorme: "^3.0.8",
|
|
482
487
|
archiver: "^7.0.1",
|
|
483
488
|
"cli-table": "^0.3.11",
|
|
484
489
|
"css.escape": "^1.5.1",
|
|
485
490
|
"csv-stringify": "^6.6.0",
|
|
486
|
-
express: "^5.1
|
|
487
|
-
gtfs: "^4.18.
|
|
491
|
+
express: "^5.2.1",
|
|
492
|
+
gtfs: "^4.18.2",
|
|
488
493
|
"gtfs-realtime-pbf-js-module": "^1.0.0",
|
|
489
494
|
"js-beautify": "^1.15.4",
|
|
490
495
|
"lodash-es": "^4.17.21",
|
|
491
|
-
"maplibre-gl": "^5.
|
|
492
|
-
marked: "^17.0.
|
|
496
|
+
"maplibre-gl": "^5.14.0",
|
|
497
|
+
marked: "^17.0.1",
|
|
493
498
|
moment: "^2.30.1",
|
|
494
499
|
pbf: "^4.0.1",
|
|
495
500
|
"pretty-error": "^4.0.0",
|
|
496
501
|
pug: "^3.0.3",
|
|
497
|
-
puppeteer: "^24.
|
|
502
|
+
puppeteer: "^24.32.0",
|
|
498
503
|
"sanitize-filename": "^1.6.3",
|
|
499
504
|
"sanitize-html": "^2.17.0",
|
|
500
505
|
sqlstring: "^2.3.3",
|
|
@@ -505,7 +510,7 @@ var package_default = {
|
|
|
505
510
|
devDependencies: {
|
|
506
511
|
"@types/archiver": "^7.0.0",
|
|
507
512
|
"@types/cli-table": "^0.3.4",
|
|
508
|
-
"@types/express": "^5.0.
|
|
513
|
+
"@types/express": "^5.0.6",
|
|
509
514
|
"@types/insane": "^1.0.0",
|
|
510
515
|
"@types/js-beautify": "^1.14.3",
|
|
511
516
|
"@types/lodash-es": "^4.17.12",
|
|
@@ -518,7 +523,7 @@ var package_default = {
|
|
|
518
523
|
"@types/yargs": "^17.0.35",
|
|
519
524
|
husky: "^9.1.7",
|
|
520
525
|
"lint-staged": "^16.2.7",
|
|
521
|
-
prettier: "^3.
|
|
526
|
+
prettier: "^3.7.4",
|
|
522
527
|
tsup: "^8.5.1",
|
|
523
528
|
typescript: "^5.9.3"
|
|
524
529
|
},
|