minotor 4.0.0 → 5.0.1
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/CHANGELOG.md +3 -8
- package/dist/cli.mjs +128 -249
- package/dist/cli.mjs.map +1 -1
- package/dist/gtfs/parser.d.ts +0 -3
- package/dist/gtfs/stops.d.ts +1 -2
- package/dist/gtfs/trips.d.ts +6 -5
- package/dist/parser.cjs.js +127 -248
- package/dist/parser.cjs.js.map +1 -1
- package/dist/parser.esm.js +127 -248
- package/dist/parser.esm.js.map +1 -1
- package/dist/router.cjs.js +1 -1
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.d.ts +2 -2
- package/dist/router.esm.js +1 -1
- package/dist/router.esm.js.map +1 -1
- package/dist/router.umd.js +1 -1
- package/dist/router.umd.js.map +1 -1
- package/dist/routing/route.d.ts +3 -3
- package/dist/timetable/io.d.ts +5 -4
- package/dist/timetable/proto/timetable.d.ts +5 -15
- package/dist/timetable/route.d.ts +1 -1
- package/dist/timetable/timetable.d.ts +7 -5
- package/package.json +1 -1
- package/src/__e2e__/timetable/stops.bin +2 -2
- package/src/__e2e__/timetable/timetable.bin +2 -2
- package/src/gtfs/__tests__/parser.test.ts +2 -2
- package/src/gtfs/__tests__/routes.test.ts +3 -0
- package/src/gtfs/__tests__/stops.test.ts +6 -13
- package/src/gtfs/__tests__/trips.test.ts +122 -154
- package/src/gtfs/parser.ts +6 -11
- package/src/gtfs/profiles/__tests__/ch.test.ts +0 -28
- package/src/gtfs/profiles/ch.ts +1 -18
- package/src/gtfs/profiles/standard.ts +0 -9
- package/src/gtfs/routes.ts +1 -0
- package/src/gtfs/stops.ts +2 -12
- package/src/gtfs/trips.ts +21 -19
- package/src/router.ts +2 -2
- package/src/routing/__tests__/route.test.ts +3 -3
- package/src/routing/__tests__/router.test.ts +186 -203
- package/src/routing/route.ts +3 -3
- package/src/routing/router.ts +1 -1
- package/src/timetable/__tests__/io.test.ts +52 -64
- package/src/timetable/__tests__/timetable.test.ts +9 -13
- package/src/timetable/io.ts +20 -19
- package/src/timetable/proto/timetable.proto +5 -8
- package/src/timetable/proto/timetable.ts +78 -201
- package/src/timetable/route.ts +1 -1
- package/src/timetable/timetable.ts +20 -16
package/dist/gtfs/parser.d.ts
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { Platform } from '../stops/stops.js';
|
|
2
1
|
import { StopsIndex } from '../stops/stopsIndex.js';
|
|
3
2
|
import { RouteType, Timetable } from '../timetable/timetable.js';
|
|
4
|
-
import { StopEntry } from './stops.js';
|
|
5
3
|
import { Maybe } from './utils.js';
|
|
6
4
|
export type GtfsProfile = {
|
|
7
5
|
routeTypeParser: (routeType: number) => Maybe<RouteType>;
|
|
8
|
-
platformParser?: (stopEntry: StopEntry) => Maybe<Platform>;
|
|
9
6
|
};
|
|
10
7
|
export declare class GtfsParser {
|
|
11
8
|
private path;
|
package/dist/gtfs/stops.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Latitude, Longitude, Platform, SourceStopId, Stop, StopId, StopsMap } from '../stops/stops.js';
|
|
2
|
-
import { Maybe } from './utils.js';
|
|
3
2
|
export type GtfsLocationType = 0 | 1 | 2 | 3 | 4;
|
|
4
3
|
export type StopEntry = {
|
|
5
4
|
stop_id: SourceStopId;
|
|
@@ -20,7 +19,7 @@ export type ParsedStopsMap = Map<SourceStopId, ParsedStop>;
|
|
|
20
19
|
* @param stopsStream The readable stream containing the stops data.
|
|
21
20
|
* @return A mapping of stop IDs to corresponding stop details.
|
|
22
21
|
*/
|
|
23
|
-
export declare const parseStops: (stopsStream: NodeJS.ReadableStream
|
|
22
|
+
export declare const parseStops: (stopsStream: NodeJS.ReadableStream) => Promise<ParsedStopsMap>;
|
|
24
23
|
/**
|
|
25
24
|
* Builds the final stop map indexed by internal IDs.
|
|
26
25
|
* Excludes all stops that do not have at least one valid stopId
|
package/dist/gtfs/trips.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StopId } from '../stops/stops.js';
|
|
2
|
-
import {
|
|
2
|
+
import { Route } from '../timetable/route.js';
|
|
3
|
+
import { ServiceRouteId, ServiceRoutesMap, StopsAdjacency } from '../timetable/timetable.js';
|
|
3
4
|
import { ServiceIds } from './services.js';
|
|
4
5
|
import { ParsedStopsMap } from './stops.js';
|
|
5
6
|
import { TransfersMap } from './transfers.js';
|
|
@@ -17,11 +18,11 @@ export declare const encodePickUpDropOffTypes: (pickUpTypes: SerializedPickUpDro
|
|
|
17
18
|
*
|
|
18
19
|
* @param tripsStream The readable stream containing the trips data.
|
|
19
20
|
* @param serviceIds A mapping of service IDs to corresponding route IDs.
|
|
20
|
-
* @param
|
|
21
|
+
* @param serviceRoutes A mapping of route IDs to route details.
|
|
21
22
|
* @returns A mapping of trip IDs to corresponding route IDs.
|
|
22
23
|
*/
|
|
23
|
-
export declare const parseTrips: (tripsStream: NodeJS.ReadableStream, serviceIds: ServiceIds,
|
|
24
|
-
export declare const buildStopsAdjacencyStructure: (validStops: Set<StopId>, routes:
|
|
24
|
+
export declare const parseTrips: (tripsStream: NodeJS.ReadableStream, serviceIds: ServiceIds, serviceRoutes: ServiceRoutesMap) => Promise<TripIdsMap>;
|
|
25
|
+
export declare const buildStopsAdjacencyStructure: (validStops: Set<StopId>, serviceRoutes: ServiceRoutesMap, routes: Route[], transfersMap: TransfersMap) => StopsAdjacency;
|
|
25
26
|
/**
|
|
26
27
|
* Parses the stop_times.txt data from a GTFS feed.
|
|
27
28
|
*
|
|
@@ -31,4 +32,4 @@ export declare const buildStopsAdjacencyStructure: (validStops: Set<StopId>, rou
|
|
|
31
32
|
* @param validStopIds A set of valid stop IDs.
|
|
32
33
|
* @returns A mapping of route IDs to route details. The routes returned correspond to the set of trips from GTFS that share the same stop list.
|
|
33
34
|
*/
|
|
34
|
-
export declare const parseStopTimes: (stopTimesStream: NodeJS.ReadableStream, stopsMap: ParsedStopsMap, validTripIds: TripIdsMap, validStopIds: Set<StopId>) => Promise<
|
|
35
|
+
export declare const parseStopTimes: (stopTimesStream: NodeJS.ReadableStream, stopsMap: ParsedStopsMap, validTripIds: TripIdsMap, validStopIds: Set<StopId>) => Promise<Route[]>;
|