minotor 1.0.1 → 1.0.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/.prettierignore +1 -0
- package/CHANGELOG.md +2 -2
- package/dist/cli/minotor.d.ts +1 -1
- package/dist/cli/utils.d.ts +1 -1
- package/dist/{bundle.cjs.js → parser.cjs.js} +11 -433
- package/dist/parser.cjs.js.map +1 -0
- package/dist/parser.d.ts +3 -0
- package/dist/{bundle.esm.js → parser.esm.js} +12 -426
- package/dist/parser.esm.js.map +1 -0
- package/dist/router.cjs.js +2 -0
- package/dist/router.cjs.js.map +1 -0
- package/dist/router.d.ts +10 -0
- package/dist/router.esm.js +2 -0
- package/dist/router.esm.js.map +1 -0
- package/dist/{bundle.umd.js → router.umd.js} +1 -1
- package/dist/{bundle.umd.js.map → router.umd.js.map} +1 -1
- package/dist/routing/result.d.ts +1 -1
- package/dist/routing/router.d.ts +1 -1
- package/package.json +13 -8
- package/rollup.config.js +22 -11
- package/src/cli/minotor.ts +1 -1
- package/src/cli/repl.ts +1 -1
- package/src/cli/utils.ts +1 -1
- package/src/parser.ts +4 -0
- package/src/{index.ts → router.ts} +8 -11
- package/src/routing/result.ts +1 -1
- package/src/routing/router.ts +1 -1
- package/dist/bundle.cjs.js.map +0 -1
- package/dist/bundle.esm.js.map +0 -1
- package/dist/index.d.ts +0 -11
- package/dist/umdIndex.d.ts +0 -9
- package/src/umdIndex.ts +0 -14
package/dist/routing/result.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StopId } from '../stops/stops.js';
|
|
2
|
-
import { StopsIndex } from '../
|
|
2
|
+
import { StopsIndex } from '../stops/stopsIndex.js';
|
|
3
3
|
import { Query } from './query.js';
|
|
4
4
|
import { Route } from './route.js';
|
|
5
5
|
import { ReachingTime, TripLeg } from './router.js';
|
package/dist/routing/router.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StopId } from '../stops/stops.js';
|
|
2
|
+
import { StopsIndex } from '../stops/stopsIndex.js';
|
|
2
3
|
import { Time } from '../timetable/time.js';
|
|
3
4
|
import { Timetable } from '../timetable/timetable.js';
|
|
4
|
-
import { StopsIndex } from '../umdIndex.js';
|
|
5
5
|
import { Query } from './query.js';
|
|
6
6
|
import { Result } from './result.js';
|
|
7
7
|
import { Leg } from './route.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "minotor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "A lightweight client-side transit router.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"minotor",
|
|
@@ -22,20 +22,25 @@
|
|
|
22
22
|
"url": "https://github.com/aubryio/minotor.git"
|
|
23
23
|
},
|
|
24
24
|
"type": "module",
|
|
25
|
-
"main": "dist/
|
|
26
|
-
"module": "dist/
|
|
27
|
-
"browser": "dist/
|
|
25
|
+
"main": "dist/router.cjs.js",
|
|
26
|
+
"module": "dist/router.esm.js",
|
|
27
|
+
"browser": "dist/router.umd.js",
|
|
28
|
+
"types": "./dist/router.d.ts",
|
|
28
29
|
"bin": {
|
|
29
30
|
"minotor": "./dist/cli.mjs"
|
|
30
31
|
},
|
|
31
32
|
"exports": {
|
|
32
33
|
".": {
|
|
33
|
-
"import": "./dist/
|
|
34
|
-
"require": "./dist/
|
|
35
|
-
"types": "./dist/
|
|
34
|
+
"import": "./dist/router.esm.js",
|
|
35
|
+
"require": "./dist/router.cjs.js",
|
|
36
|
+
"types": "./dist/router.d.ts"
|
|
37
|
+
},
|
|
38
|
+
"./parser.js": {
|
|
39
|
+
"import": "./dist/parser.esm.js",
|
|
40
|
+
"require": "./dist/parser.cjs.js",
|
|
41
|
+
"types": "./dist/parser.d.ts"
|
|
36
42
|
}
|
|
37
43
|
},
|
|
38
|
-
"types": "./dist/index.d.ts",
|
|
39
44
|
"engines": {
|
|
40
45
|
"node": ">=21.1.0",
|
|
41
46
|
"npm": ">=10.9.1"
|
package/rollup.config.js
CHANGED
|
@@ -5,26 +5,37 @@ import terser from '@rollup/plugin-terser';
|
|
|
5
5
|
|
|
6
6
|
export default [
|
|
7
7
|
{
|
|
8
|
-
input: 'src/
|
|
9
|
-
output:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
input: 'src/router.ts',
|
|
9
|
+
output: [
|
|
10
|
+
{
|
|
11
|
+
file: 'dist/router.umd.js',
|
|
12
|
+
format: 'umd',
|
|
13
|
+
name: 'minotor',
|
|
14
|
+
sourcemap: true,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
file: 'dist/router.esm.js',
|
|
18
|
+
format: 'es',
|
|
19
|
+
sourcemap: true,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
file: 'dist/router.cjs.js',
|
|
23
|
+
format: 'cjs',
|
|
24
|
+
sourcemap: true,
|
|
25
|
+
},
|
|
26
|
+
],
|
|
15
27
|
plugins: [resolve(), commonjs(), typescript(), terser()],
|
|
16
28
|
},
|
|
17
|
-
// CommonJS and ES module builds for Node.js and bundlers
|
|
18
29
|
{
|
|
19
|
-
input: 'src/
|
|
30
|
+
input: 'src/parser.ts',
|
|
20
31
|
output: [
|
|
21
32
|
{
|
|
22
|
-
file: 'dist/
|
|
33
|
+
file: 'dist/parser.esm.js',
|
|
23
34
|
format: 'es',
|
|
24
35
|
sourcemap: true,
|
|
25
36
|
},
|
|
26
37
|
{
|
|
27
|
-
file: 'dist/
|
|
38
|
+
file: 'dist/parser.cjs.js',
|
|
28
39
|
format: 'cjs',
|
|
29
40
|
sourcemap: true,
|
|
30
41
|
},
|
package/src/cli/minotor.ts
CHANGED
|
@@ -3,7 +3,7 @@ import fs from 'fs';
|
|
|
3
3
|
import log from 'loglevel';
|
|
4
4
|
import { DateTime } from 'luxon';
|
|
5
5
|
|
|
6
|
-
import { chGtfsProfile, GtfsParser, GtfsProfile } from '../
|
|
6
|
+
import { chGtfsProfile, GtfsParser, GtfsProfile } from '../parser.js';
|
|
7
7
|
import { startRepl } from './repl.js';
|
|
8
8
|
|
|
9
9
|
const program = new Command();
|
package/src/cli/repl.ts
CHANGED
|
@@ -2,7 +2,7 @@ import repl from 'node:repl';
|
|
|
2
2
|
|
|
3
3
|
import fs from 'fs';
|
|
4
4
|
|
|
5
|
-
import { Query, Router, StopsIndex, Time, Timetable } from '../
|
|
5
|
+
import { Query, Router, StopsIndex, Time, Timetable } from '../router.js';
|
|
6
6
|
import { plotGraphToDotFile, prettyPrintRoute } from './utils.js';
|
|
7
7
|
|
|
8
8
|
export const startRepl = (stopsPath: string, timetablePath: string) => {
|
package/src/cli/utils.ts
CHANGED
package/src/parser.ts
ADDED
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* An index containing the full library, including node-dependent modules.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { GtfsParser, GtfsProfile } from './gtfs/parser.js';
|
|
6
|
-
import { chGtfsProfile } from './gtfs/profiles/ch.js';
|
|
7
1
|
import { Plotter } from './routing/plotter.js';
|
|
8
2
|
import { Query } from './routing/query.js';
|
|
9
3
|
import { Result } from './routing/result.js';
|
|
10
|
-
import { Route } from './routing/route.js';
|
|
11
|
-
import { Router } from './routing/router.js';
|
|
4
|
+
import { Leg, Route, Transfer, VehicleLeg } from './routing/route.js';
|
|
5
|
+
import { ReachingTime, Router } from './routing/router.js';
|
|
6
|
+
import { StopId } from './stops/stops.js';
|
|
12
7
|
import { StopsIndex } from './stops/stopsIndex.js';
|
|
13
8
|
import { Time } from './timetable/time.js';
|
|
14
9
|
import { Timetable } from './timetable/timetable.js';
|
|
15
10
|
|
|
16
11
|
export {
|
|
17
|
-
|
|
18
|
-
GtfsParser,
|
|
19
|
-
GtfsProfile,
|
|
12
|
+
Leg,
|
|
20
13
|
Plotter,
|
|
21
14
|
Query,
|
|
15
|
+
ReachingTime,
|
|
22
16
|
Result,
|
|
23
17
|
Route,
|
|
24
18
|
Router,
|
|
19
|
+
StopId,
|
|
25
20
|
StopsIndex,
|
|
26
21
|
Time,
|
|
27
22
|
Timetable,
|
|
23
|
+
Transfer,
|
|
24
|
+
VehicleLeg,
|
|
28
25
|
};
|
package/src/routing/result.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StopId } from '../stops/stops.js';
|
|
2
|
-
import { StopsIndex } from '../
|
|
2
|
+
import { StopsIndex } from '../stops/stopsIndex.js';
|
|
3
3
|
import { Query } from './query.js';
|
|
4
4
|
import { Leg, Route } from './route.js';
|
|
5
5
|
import { ReachingTime, TripLeg } from './router.js';
|
package/src/routing/router.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
2
2
|
import { StopId } from '../stops/stops.js';
|
|
3
|
+
import { StopsIndex } from '../stops/stopsIndex.js';
|
|
3
4
|
import { Duration } from '../timetable/duration.js';
|
|
4
5
|
import { Time } from '../timetable/time.js';
|
|
5
6
|
import { Timetable } from '../timetable/timetable.js';
|
|
6
|
-
import { StopsIndex } from '../umdIndex.js';
|
|
7
7
|
import { Query } from './query.js';
|
|
8
8
|
import { Result } from './result.js';
|
|
9
9
|
import { Leg } from './route.js';
|