@golemio/pid 2.3.8-rc.748458900 → 2.4.0-dev.754696501
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/README.md +2 -2
- package/db/example/99_precomputed_tables.sql +65 -44
- package/db/migrations/postgresql/20230104135230-add-first-last-stop-to-scheduled-trips.js +53 -0
- package/db/migrations/postgresql/sqls/20230104135230-add-first-last-stop-to-scheduled-trips-down.sql +3 -0
- package/db/migrations/postgresql/sqls/20230104135230-add-first-last-stop-to-scheduled-trips-up.sql +3 -0
- package/dist/integration-engine/ropid-gtfs/RopidGTFSScheduledTripsModel.js +65 -44
- package/dist/integration-engine/ropid-gtfs/RopidGTFSScheduledTripsModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/VehiclePositionsInterfaces.d.ts +4 -1
- package/dist/integration-engine/vehicle-positions/VehiclePositionsWorker.js +13 -5
- package/dist/integration-engine/vehicle-positions/VehiclePositionsWorker.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.d.ts +7 -3
- package/dist/integration-engine/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +22 -3
- package/dist/integration-engine/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/models/VehiclePositionsPositionsModel.js +1 -3
- package/dist/integration-engine/vehicle-positions/models/VehiclePositionsPositionsModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/models/VehiclePositionsRunsModel.d.ts +5 -2
- package/dist/integration-engine/vehicle-positions/models/VehiclePositionsRunsModel.js +6 -6
- package/dist/integration-engine/vehicle-positions/models/VehiclePositionsRunsModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/models/VehiclePositionsTripsModel.js +1 -1
- package/dist/integration-engine/vehicle-positions/models/VehiclePositionsTripsModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/models/helpers/VPPositionsMapper.js +1 -1
- package/dist/output-gateway/shared/data-access/FeatureFlagDictionary.d.ts +3 -0
- package/dist/output-gateway/shared/data-access/FeatureFlagDictionary.js +7 -0
- package/dist/output-gateway/shared/data-access/FeatureFlagDictionary.js.map +1 -0
- package/dist/output-gateway/shared/data-access/index.d.ts +1 -0
- package/dist/output-gateway/shared/data-access/index.js +18 -0
- package/dist/output-gateway/shared/data-access/index.js.map +1 -0
- package/dist/output-gateway/vehicle-positions/models/VehiclePositionsTripsModel.d.ts +1 -0
- package/dist/output-gateway/vehicle-positions/models/VehiclePositionsTripsModel.js +7 -0
- package/dist/output-gateway/vehicle-positions/models/VehiclePositionsTripsModel.js.map +1 -1
- package/dist/schema-definitions/gtfsrt-alerts/GtfsRtAlert.d.ts +2 -2
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.d.ts +6 -0
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.js +8 -0
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSPrecomputed.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/RopidGtfsSchedule.d.ts +1 -26
- package/dist/schema-definitions/shared/index.d.ts +1 -1
- package/dist/schema-definitions/vehicle-positions/index.d.ts +1 -26
- package/docs/implementation_documentation.md +12 -13
- package/docs/openapi-output.yaml +1 -1
- package/package.json +17 -12
|
@@ -197,7 +197,6 @@ _:warning: Původním záměrem bylo využití OIS číselníku během zpracová
|
|
|
197
197
|
- autobusy (mimo DPP), trolejbusy, vlaky, přívozy, lanovky
|
|
198
198
|
- TCP zprávy o obězích vozidel - DPP + CHAPS
|
|
199
199
|
- autobusy (pouze DPP) a tramvaje
|
|
200
|
-
- UDP zprávy o obězích vozidel - DPP + CHAPS
|
|
201
200
|
- metro
|
|
202
201
|
|
|
203
202
|
#### _Vehicle Positions_
|
|
@@ -264,7 +263,7 @@ _:warning: Původním záměrem bylo využití OIS číselníku během zpracová
|
|
|
264
263
|
#### _Vehicle Positions Metro Runs_
|
|
265
264
|
|
|
266
265
|
- formát dat
|
|
267
|
-
- protokol:
|
|
266
|
+
- protokol: tcp
|
|
268
267
|
- datový typ: xml
|
|
269
268
|
- validační schéma: základní kontrola xml v [parseru](https://gitlab.com/operator-ict/golemio/code/tcp-input-gateway/-/blob/development/src/receivers/parsers/dpp-metro.parser.ts), validační schéma pro parsovaný json [MetroRunsSchema](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/vehicle-positions/workers/runs/tasks/schema/MetroRunsSchema.ts)
|
|
270
269
|
- příklad vstupnich dat
|
|
@@ -273,8 +272,8 @@ _:warning: Původním záměrem bylo využití OIS číselníku během zpracová
|
|
|
273
272
|
<vlak csp=" 3" csr=" 3" cv="279" ko="1809" odch="25" />
|
|
274
273
|
</m>
|
|
275
274
|
```
|
|
276
|
-
- adresa:
|
|
277
|
-
- dokumentace
|
|
275
|
+
- adresa: tcp.golemio.cz:3006
|
|
276
|
+
- dokumentace tcp receiveru: [transport input gateway#dpp-metro](https://gitlab.com/operator-ict/golemio/code/tcp-input-gateway#dpp-metro)
|
|
278
277
|
- řízení přístupů řešeno na síťové úrovni mimo permission proxy
|
|
279
278
|
- přeposíláno z [produkční data proxy](https://gitlab.com/operator-ict/golemio/devops/infrastructure/-/blob/master/cluster_production/golemio_data-proxy-values.yaml#L55)
|
|
280
279
|
- transformace raw dat
|
|
@@ -283,7 +282,7 @@ _:warning: Původním záměrem bylo využití OIS číselníku během zpracová
|
|
|
283
282
|
- vehicle-positions.vehiclepositionsruns.saveMetroRunsToDB
|
|
284
283
|
- ukládání raw dat na blob storage
|
|
285
284
|
- název kontejneru: {rabin,golem}-input-gateway
|
|
286
|
-
- cesta: /
|
|
285
|
+
- cesta: /tcp-dpp-metro-data/yyyy-MM-dd/HH_mm_ss.SSS.xml
|
|
287
286
|
- agregace dat: 1 MB
|
|
288
287
|
- odhadovaná zátěž
|
|
289
288
|
- desítky až stovky zpráv za minutu
|
|
@@ -523,7 +522,7 @@ _:warning: Stávající funkcionalita bude postupně refactorována a přesunuta
|
|
|
523
522
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
524
523
|
- název: vehicle-positions.vehiclepositions.propagateDelay
|
|
525
524
|
- datové zdroje
|
|
526
|
-
- MPVNET, CHAPS TCP
|
|
525
|
+
- MPVNET, CHAPS TCP
|
|
527
526
|
- transformace
|
|
528
527
|
- determinace pozic tripů v rámci jednoho GTFS block id (platí pouze pro některé vlakové linky)
|
|
529
528
|
- [PositionsManager.computePositions](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/vehicle-positions/helpers/PositionsManager.ts#L32): obohacení pozicových dat, aproximace pozice, dopočet zpoždění
|
|
@@ -540,7 +539,7 @@ _:warning: Stávající funkcionalita bude postupně refactorována a přesunuta
|
|
|
540
539
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
541
540
|
- žádné
|
|
542
541
|
- datové zdroje
|
|
543
|
-
- MPVNET, CHAPS TCP
|
|
542
|
+
- MPVNET, CHAPS TCP
|
|
544
543
|
- transformace
|
|
545
544
|
- [mapDelayedPositionsToRunTrips](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/vehicle-positions/VehiclePositionsWorker.ts#L449): transformace výstupních pozic z updateDelay na oběhy
|
|
546
545
|
- [propagateDelayForGtfsTrip](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/vehicle-positions/VehiclePositionsWorker.ts#L475): přepočet zpoždění u spojů se zpožděním před tratí
|
|
@@ -604,7 +603,7 @@ _:warning: Stávající funkcionalita bude postupně refactorována a přesunuta
|
|
|
604
603
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
605
604
|
- žádné
|
|
606
605
|
- datové zdroje
|
|
607
|
-
- MPVNET, CHAPS TCP
|
|
606
|
+
- MPVNET, CHAPS TCP, ROPID FTP, ROPID VYMI
|
|
608
607
|
- transformace
|
|
609
608
|
- žádné
|
|
610
609
|
- data modely
|
|
@@ -645,7 +644,7 @@ Nová implementace VehiclePositionsWorkeru
|
|
|
645
644
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
646
645
|
- žádné
|
|
647
646
|
- datové zdroje
|
|
648
|
-
- MPVNET, CHAPS TCP
|
|
647
|
+
- MPVNET, CHAPS TCP
|
|
649
648
|
- transformace
|
|
650
649
|
- žádné
|
|
651
650
|
- data modely
|
|
@@ -656,7 +655,7 @@ Nová implementace VehiclePositionsWorkeru
|
|
|
656
655
|
|
|
657
656
|
### _RunsWorker_
|
|
658
657
|
|
|
659
|
-
Worker má na starost zpracování a transformaci
|
|
658
|
+
Worker má na starost zpracování a transformaci TCP oběhů
|
|
660
659
|
|
|
661
660
|
#### _task: SaveMetroRunsToDBTask_
|
|
662
661
|
|
|
@@ -668,7 +667,7 @@ Worker má na starost zpracování a transformaci UDP oběhů
|
|
|
668
667
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
669
668
|
- název: vehicle-positions.vehiclepositionsruns.processMetroRunMessages
|
|
670
669
|
- datové zdroje
|
|
671
|
-
- CHAPS
|
|
670
|
+
- CHAPS TCP
|
|
672
671
|
- transformace
|
|
673
672
|
- [MetroRunsMessagesTransformation](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/vehicle-positions/workers/runs/tasks/transformations/MetroRunsMessagesTransformation.ts)
|
|
674
673
|
- data modely
|
|
@@ -684,7 +683,7 @@ Worker má na starost zpracování a transformaci UDP oběhů
|
|
|
684
683
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
685
684
|
- název: vehicle-positions.vehiclepositions.updateDelay
|
|
686
685
|
- datové zdroje
|
|
687
|
-
- CHAPS
|
|
686
|
+
- CHAPS TCP
|
|
688
687
|
- transformace
|
|
689
688
|
- [MetroRunsMessageProcessingTransformation](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/vehicle-positions/workers/runs/tasks/transformations/MetroRunsMessageProcessingTransformation.ts), dále se oběhy a nalezené GTFS scheduled trips transformují na trips [VPTripsMapper.mapMetroRunToDto](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/vehicle-positions/models/helpers/VPTripsMapper.ts) a pozice [VPPositionsMapper.mapMetroRunToDto](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/vehicle-positions/models/helpers/VPPositionsMapper.ts) pro frontu `vehiclepositions.updateDelay`
|
|
690
689
|
- data modely
|
|
@@ -704,7 +703,7 @@ Worker má na starost zpracování a transformaci UDP oběhů
|
|
|
704
703
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
705
704
|
- žádné
|
|
706
705
|
- datové zdroje
|
|
707
|
-
- CHAPS
|
|
706
|
+
- CHAPS TCP
|
|
708
707
|
- transformace
|
|
709
708
|
- žádné
|
|
710
709
|
- data modely
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -737,7 +737,7 @@ paths:
|
|
|
737
737
|
example: 28004
|
|
738
738
|
- name: names
|
|
739
739
|
in: query
|
|
740
|
-
description: Get results by exact name of stop (case and whitespace sensitive). May return stops of the same name from different towns.
|
|
740
|
+
description: Get results by exact name of stop (case and whitespace sensitive). May return stops of the same name from different towns. Using `names` in combination with other identifiers will return an intersection of stops with `names` and stops of ASW, CIS or GTFS identifiers in the same node. Use this feature to filter out a subset of stops of the same name while guaranteeing them to be from the desired node only.
|
|
741
741
|
required: false
|
|
742
742
|
schema:
|
|
743
743
|
type: string
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/pid",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0-dev.754696501",
|
|
4
4
|
"description": "Golemio PID Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "rimraf ./dist && ttsc -p ./tsconfig.build.json",
|
|
9
|
-
"build-minimal": "run-s 'build --sourceMap false --declaration false'",
|
|
10
|
-
"build-watch": "run-s 'build --watch --preserveWatchOutput'",
|
|
9
|
+
"build-minimal": "run-s 'build -- --sourceMap false --declaration false'",
|
|
10
|
+
"build-watch": "run-s 'build -- --watch --preserveWatchOutput'",
|
|
11
11
|
"pretest": "golemio import-db-data",
|
|
12
12
|
"test": "cross-env NODE_ENV='test' TS_NODE_COMPILER='ttypescript' TZ='UTC' mocha --exit --check-leaks --timeout 120000 -r ts-node/register --file 'test/setup.ts' -r dotenv/config 'test/**/*.test.ts'",
|
|
13
|
-
"test-debug": "run-s 'test --inspect-brk=9230'",
|
|
13
|
+
"test-debug": "run-s 'test -- --inspect-brk=9230'",
|
|
14
14
|
"apidocs": "cross-env NODE_ENV=test TS_NODE_COMPILER='ttypescript' ts-node -r dotenv/config test/api-docs/index.ts",
|
|
15
|
-
"apidocs-test": "run-s 'apidocs input,output'",
|
|
16
|
-
"apidocs-test-input": "run-s 'apidocs input'",
|
|
17
|
-
"apidocs-test-output": "run-s 'apidocs output'",
|
|
18
|
-
"code-coverage": "nyc run-s 'test -r source-map-support/register'",
|
|
15
|
+
"apidocs-test": "run-s 'apidocs -- input,output'",
|
|
16
|
+
"apidocs-test-input": "run-s 'apidocs -- input'",
|
|
17
|
+
"apidocs-test-output": "run-s 'apidocs -- output'",
|
|
18
|
+
"code-coverage": "nyc run-s 'test -- -r source-map-support/register'",
|
|
19
19
|
"generate-docs": "typedoc --out docs/typedoc src",
|
|
20
20
|
"lint": "eslint --cache \"{src,test}/**/*.ts\""
|
|
21
21
|
},
|
|
@@ -28,14 +28,19 @@
|
|
|
28
28
|
"type": "git",
|
|
29
29
|
"url": "https://gitlab.com/operator-ict/golemio/code/modules/pid"
|
|
30
30
|
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=16.0.0",
|
|
33
|
+
"npm": ">=8.0.0",
|
|
34
|
+
"yarn": "Use npm!"
|
|
35
|
+
},
|
|
31
36
|
"devDependencies": {
|
|
32
37
|
"@apideck/portman": "^1.16.1",
|
|
33
38
|
"@commitlint/cli": "^11.0.0",
|
|
34
39
|
"@commitlint/config-conventional": "^11.0.0",
|
|
35
40
|
"@golemio/cli": "1.3.3",
|
|
36
|
-
"@golemio/core": "1.3.
|
|
37
|
-
"@golemio/db-common": "1.0
|
|
38
|
-
"@golemio/eslint-config": "
|
|
41
|
+
"@golemio/core": "1.3.1-dev.753243556",
|
|
42
|
+
"@golemio/db-common": "1.1.0",
|
|
43
|
+
"@golemio/eslint-config": "1.1.0",
|
|
39
44
|
"@ovos-media/ts-transform-paths": "^1.7.18-1",
|
|
40
45
|
"@types/amqplib": "^0.5.17",
|
|
41
46
|
"@types/chai": "4.2.3",
|
|
@@ -68,7 +73,7 @@
|
|
|
68
73
|
"typescript": "4.7.2"
|
|
69
74
|
},
|
|
70
75
|
"peerDependencies": {
|
|
71
|
-
"@golemio/core": "
|
|
76
|
+
"@golemio/core": "~1.0"
|
|
72
77
|
},
|
|
73
78
|
"dependencies": {
|
|
74
79
|
"@golemio/ovapi-gtfs-realtime-bindings": "1.0.0",
|