gtfs-to-html 2.12.12 → 2.12.13
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.d.ts +1 -2
- package/dist/app/index.js +96 -2522
- package/dist/app/index.js.map +1 -1
- package/dist/bin/gtfs-to-html.d.ts +1 -1
- package/dist/bin/gtfs-to-html.js +28 -3035
- package/dist/bin/gtfs-to-html.js.map +1 -1
- package/dist/browser/THIRD_PARTY_LICENSES.txt +1 -1
- package/dist/browser/pbf.js +1 -1
- package/dist/file-utils-B3ZcDOSK.js +1922 -0
- package/dist/file-utils-B3ZcDOSK.js.map +1 -0
- package/dist/index.d.ts +110 -105
- package/dist/index.js +3 -3018
- package/dist/src-Bc8DLOTC.js +124 -0
- package/dist/src-Bc8DLOTC.js.map +1 -0
- package/package.json +11 -11
- package/dist/index.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,123 +1,127 @@
|
|
|
1
|
-
import { ConfigAgency,
|
|
2
|
-
export { GtfsError, GtfsErrorCategory, GtfsErrorCode, GtfsWarning, GtfsWarningCode, ImportReport, formatGtfsError, isGtfsError, isGtfsValidationError } from 'gtfs';
|
|
1
|
+
import { ConfigAgency, GtfsError, GtfsErrorCategory, GtfsErrorCode, GtfsWarning, GtfsWarningCode, ImportReport, Route, Stop, Timetable, TimetablePage, Trip, formatGtfsError, isGtfsError, isGtfsValidationError } from "gtfs";
|
|
3
2
|
|
|
3
|
+
//#region src/types/config.d.ts
|
|
4
4
|
interface Config {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
5
|
+
agencies: ConfigAgency[];
|
|
6
|
+
assetPath?: string;
|
|
7
|
+
sqlitePath?: string;
|
|
8
|
+
allowEmptyTimetables?: boolean;
|
|
9
|
+
beautify?: boolean;
|
|
10
|
+
coordinatePrecision?: number;
|
|
11
|
+
dateFormat?: string;
|
|
12
|
+
daysShortStrings?: string[];
|
|
13
|
+
daysStrings?: string[];
|
|
14
|
+
defaultOrientation?: string;
|
|
15
|
+
effectiveDate?: string;
|
|
16
|
+
endDate?: string;
|
|
17
|
+
groupTimetablesIntoPages?: boolean;
|
|
18
|
+
interpolatedStopSymbol?: string;
|
|
19
|
+
interpolatedStopText?: string;
|
|
20
|
+
linkStopUrls?: boolean;
|
|
21
|
+
mapStyleUrl?: string;
|
|
22
|
+
menuType?: 'none' | 'simple' | 'jump' | 'radio';
|
|
23
|
+
noDropoffSymbol?: string;
|
|
24
|
+
noDropoffText?: string;
|
|
25
|
+
noHead?: boolean;
|
|
26
|
+
noPickupSymbol?: string;
|
|
27
|
+
noPickupText?: string;
|
|
28
|
+
noRegularServiceDaysText?: string;
|
|
29
|
+
noServiceSymbol?: string;
|
|
30
|
+
noServiceText?: string;
|
|
31
|
+
outputFormat?: 'html' | 'pdf' | 'csv';
|
|
32
|
+
overwriteExistingFiles?: boolean;
|
|
33
|
+
outputPath?: string;
|
|
34
|
+
requestDropoffSymbol?: string;
|
|
35
|
+
requestDropoffText?: string;
|
|
36
|
+
requestPickupSymbol?: string;
|
|
37
|
+
requestPickupText?: string;
|
|
38
|
+
serviceNotProvidedOnText?: string;
|
|
39
|
+
serviceProvidedOnText?: string;
|
|
40
|
+
showArrivalOnDifference?: number;
|
|
41
|
+
showCalendarExceptions?: boolean;
|
|
42
|
+
showDuplicateTrips?: boolean;
|
|
43
|
+
showMap?: boolean;
|
|
44
|
+
showOnlyTimepoint?: boolean;
|
|
45
|
+
showRouteTitle?: boolean;
|
|
46
|
+
showStopCity?: boolean;
|
|
47
|
+
showStopDescription?: boolean;
|
|
48
|
+
showStoptimesForRequestStops?: boolean;
|
|
49
|
+
skipImport?: boolean;
|
|
50
|
+
sortingAlgorithm?: string;
|
|
51
|
+
startDate?: string;
|
|
52
|
+
templatePath?: string;
|
|
53
|
+
timeFormat?: string;
|
|
54
|
+
useParentStation?: boolean;
|
|
55
|
+
verbose?: boolean;
|
|
56
|
+
zipOutput?: boolean;
|
|
57
|
+
logFunction?: (text: string) => void;
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/types/timetable.d.ts
|
|
60
61
|
interface FormattedTimetable extends Timetable {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
route_ids: string[];
|
|
63
|
+
trip_ids: string[];
|
|
64
|
+
routes: Route[];
|
|
65
|
+
orderedTrips: Trip[];
|
|
66
|
+
stops: Stop[];
|
|
67
|
+
service_ids?: string[];
|
|
68
|
+
warnings?: string[];
|
|
69
|
+
has_continues_as_route?: boolean;
|
|
70
|
+
has_continues_from_route?: boolean;
|
|
70
71
|
}
|
|
71
|
-
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/types/timetable-page.d.ts
|
|
72
74
|
interface FormattedTimetablePage extends TimetablePage {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
timetables: FormattedTimetable[];
|
|
76
|
+
routes: Route[];
|
|
77
|
+
relativePath?: string;
|
|
76
78
|
}
|
|
77
|
-
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region src/lib/gtfs-to-html.d.ts
|
|
78
81
|
declare const gtfsToHtml: (initialConfig: Config) => Promise<string>;
|
|
79
|
-
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region src/lib/errors.d.ts
|
|
80
84
|
declare enum GtfsToHtmlErrorCategory {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
CONFIG = "config",
|
|
86
|
+
DATABASE = "database",
|
|
87
|
+
GTFS = "gtfs",
|
|
88
|
+
FILE_SYSTEM = "file_system",
|
|
89
|
+
TEMPLATE = "template",
|
|
90
|
+
QUERY = "query",
|
|
91
|
+
VALIDATION = "validation",
|
|
92
|
+
INTERNAL = "internal"
|
|
89
93
|
}
|
|
90
94
|
/**
|
|
91
95
|
* Error codes are a public API contract and should remain stable.
|
|
92
96
|
*/
|
|
93
97
|
declare enum GtfsToHtmlErrorCode {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
CONFIG_INVALID = "GTFS_TO_HTML_CONFIG_INVALID",
|
|
99
|
+
CONFIG_FILE_NOT_FOUND = "GTFS_TO_HTML_CONFIG_FILE_NOT_FOUND",
|
|
100
|
+
CONFIG_PARSE_FAILED = "GTFS_TO_HTML_CONFIG_PARSE_FAILED",
|
|
101
|
+
CONFIG_DATE_INVALID = "GTFS_TO_HTML_CONFIG_DATE_INVALID",
|
|
102
|
+
CONFIG_MISSING_AGENCIES = "GTFS_TO_HTML_CONFIG_MISSING_AGENCIES",
|
|
103
|
+
DATABASE_OPEN_FAILED = "GTFS_TO_HTML_DATABASE_OPEN_FAILED",
|
|
104
|
+
GTFS_IMPORT_FAILED = "GTFS_TO_HTML_GTFS_IMPORT_FAILED",
|
|
105
|
+
FILE_SYSTEM_WRITE_FAILED = "GTFS_TO_HTML_FILE_SYSTEM_WRITE_FAILED",
|
|
106
|
+
OUTPUT_DIRECTORY_NOT_EMPTY = "GTFS_TO_HTML_OUTPUT_DIRECTORY_NOT_EMPTY",
|
|
107
|
+
QUERY_RESULT_NOT_FOUND = "GTFS_TO_HTML_QUERY_RESULT_NOT_FOUND",
|
|
108
|
+
QUERY_RESULT_AMBIGUOUS = "GTFS_TO_HTML_QUERY_RESULT_AMBIGUOUS",
|
|
109
|
+
QUERY_INVALID = "GTFS_TO_HTML_QUERY_INVALID",
|
|
110
|
+
TIMETABLE_GENERATION_FAILED = "GTFS_TO_HTML_TIMETABLE_GENERATION_FAILED"
|
|
107
111
|
}
|
|
108
112
|
interface GtfsToHtmlErrorOptions {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
113
|
+
code: GtfsToHtmlErrorCode;
|
|
114
|
+
category: GtfsToHtmlErrorCategory;
|
|
115
|
+
isOperational?: boolean;
|
|
116
|
+
details?: Record<string, unknown>;
|
|
117
|
+
cause?: unknown;
|
|
114
118
|
}
|
|
115
119
|
declare class GtfsToHtmlError extends Error {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
code: GtfsToHtmlErrorCode;
|
|
121
|
+
category: GtfsToHtmlErrorCategory;
|
|
122
|
+
isOperational: boolean;
|
|
123
|
+
details?: Record<string, unknown>;
|
|
124
|
+
constructor(message: string, options: GtfsToHtmlErrorOptions);
|
|
121
125
|
}
|
|
122
126
|
declare function isGtfsToHtmlError(error: unknown): error is GtfsToHtmlError;
|
|
123
127
|
/**
|
|
@@ -125,7 +129,8 @@ declare function isGtfsToHtmlError(error: unknown): error is GtfsToHtmlError;
|
|
|
125
129
|
*/
|
|
126
130
|
declare function isGtfsParsingError(error: unknown): boolean;
|
|
127
131
|
declare function formatGtfsToHtmlError(error: unknown, options?: {
|
|
128
|
-
|
|
132
|
+
verbosity: 'user' | 'developer';
|
|
129
133
|
}): string;
|
|
130
|
-
|
|
131
|
-
export { type Config, type FormattedTimetable, type FormattedTimetablePage, GtfsToHtmlError, GtfsToHtmlErrorCategory, GtfsToHtmlErrorCode, gtfsToHtml as default, formatGtfsToHtmlError, isGtfsParsingError, isGtfsToHtmlError };
|
|
134
|
+
//#endregion
|
|
135
|
+
export { type Config, type FormattedTimetable, type FormattedTimetablePage, GtfsError, GtfsErrorCategory, GtfsErrorCode, GtfsToHtmlError, GtfsToHtmlErrorCategory, GtfsToHtmlErrorCode, type GtfsWarning, GtfsWarningCode, type ImportReport, gtfsToHtml as default, formatGtfsError, formatGtfsToHtmlError, isGtfsError, isGtfsParsingError, isGtfsToHtmlError, isGtfsValidationError };
|
|
136
|
+
//# sourceMappingURL=index.d.ts.map
|