@golemio/pid 2.12.10-dev.1265906013 → 2.12.10-dev.1267493459
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/db/example/15_vehicle_descriptors.sql +3 -3
- package/db/example/redis/publicDepartureBoardsMock.json +13 -0
- package/db/example/redis/publicVehiclePositionsMock.json +24 -0
- package/db/migrations/postgresql/20240424122841-delay-at-past-stops-release-part-1.js +53 -0
- package/db/migrations/postgresql/sqls/20240424122841-delay-at-past-stops-release-part-1-down.sql +1 -0
- package/db/migrations/postgresql/sqls/20240424122841-delay-at-past-stops-release-part-1-up.sql +98 -0
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.d.ts +4 -3
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +8 -6
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.d.ts +14 -0
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +82 -0
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.d.ts +10 -2
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +81 -10
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/interfaces/IPublicDepartureDto.d.ts +12 -0
- package/dist/integration-engine/ropid-gtfs/interfaces/IPublicDepartureDto.js +3 -0
- package/dist/integration-engine/ropid-gtfs/interfaces/IPublicDepartureDto.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js +10 -0
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +4 -0
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +4 -0
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.d.ts +7 -0
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +36 -0
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.d.ts +2 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +9 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/constants.d.ts +1 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/constants.js +5 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/constants.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +4 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.d.ts +21 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +102 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.d.ts +3 -2
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +9 -7
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IRefreshPublicDepartureParams.d.ts +4 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IRefreshPublicDepartureParams.js +3 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IRefreshPublicDepartureParams.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/RefreshPublicDepartureSchema.d.ts +5 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/RefreshPublicDepartureSchema.js +31 -0
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/RefreshPublicDepartureSchema.js.map +1 -0
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js +6 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -1
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
- package/dist/output-gateway/public/controllers/v1/PublicDepartureBoardsController.d.ts +8 -0
- package/dist/output-gateway/public/controllers/v1/PublicDepartureBoardsController.js +60 -0
- package/dist/output-gateway/public/controllers/v1/PublicDepartureBoardsController.js.map +1 -0
- package/dist/output-gateway/public/controllers/v1/interfaces/PublicParamsInterfaces.d.ts +10 -0
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.d.ts +11 -0
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +72 -0
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -0
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +1 -0
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +22 -2
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
- package/dist/output-gateway/public/domain/IPublicDepartureTransformInputDto.d.ts +9 -0
- package/dist/output-gateway/public/domain/IPublicDepartureTransformInputDto.js +3 -0
- package/dist/output-gateway/public/domain/IPublicDepartureTransformInputDto.js.map +1 -0
- package/dist/output-gateway/public/domain/PublicApiDepartureInterfaces.d.ts +34 -0
- package/dist/output-gateway/public/domain/PublicApiDepartureInterfaces.js +3 -0
- package/dist/output-gateway/public/domain/PublicApiDepartureInterfaces.js.map +1 -0
- package/dist/output-gateway/public/domain/repository/IGtfsDepartureRepository.d.ts +4 -0
- package/dist/output-gateway/public/domain/repository/IGtfsDepartureRepository.js +3 -0
- package/dist/output-gateway/public/domain/repository/IGtfsDepartureRepository.js.map +1 -0
- package/dist/output-gateway/public/domain/repository/IVehiclePositionsRepository.d.ts +1 -0
- package/dist/output-gateway/public/ioc/Di.js +8 -0
- package/dist/output-gateway/public/ioc/Di.js.map +1 -1
- package/dist/output-gateway/public/ioc/OgModuleToken.d.ts +2 -0
- package/dist/output-gateway/public/ioc/OgModuleToken.js +2 -0
- package/dist/output-gateway/public/ioc/OgModuleToken.js.map +1 -1
- package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.d.ts +10 -0
- package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.js +28 -0
- package/dist/output-gateway/public/routers/v1/PublicDeparturesRouter.js.map +1 -0
- package/dist/output-gateway/public/routers/v1/{PublicRouter.d.ts → PublicVehiclePositionsRouter.d.ts} +3 -3
- package/dist/output-gateway/public/routers/v1/{PublicRouter.js → PublicVehiclePositionsRouter.js} +8 -8
- package/dist/output-gateway/public/routers/v1/PublicVehiclePositionsRouter.js.map +1 -0
- package/dist/output-gateway/public/routers/v1/helpers/CustomStopIdGroupValidator.d.ts +5 -0
- package/dist/output-gateway/public/routers/v1/helpers/CustomStopIdGroupValidator.js +42 -0
- package/dist/output-gateway/public/routers/v1/helpers/CustomStopIdGroupValidator.js.map +1 -0
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.d.ts +17 -0
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +106 -0
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -0
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.d.ts +34 -0
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +54 -0
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -0
- package/dist/output-gateway/shared/DepartureCalculator.d.ts +10 -0
- package/dist/output-gateway/shared/DepartureCalculator.js +26 -0
- package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -0
- package/dist/output-gateway/shared/RopidRouterUtils.d.ts +2 -1
- package/dist/output-gateway/shared/RopidRouterUtils.js +4 -3
- package/dist/output-gateway/shared/RopidRouterUtils.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
- package/dist/schema-definitions/ropid-gtfs/redis/const.js +5 -0
- package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -0
- package/dist/schema-definitions/ropid-gtfs/redis/interfaces/IPublicGtfsDepartureCacheDto.d.ts +12 -0
- package/dist/schema-definitions/ropid-gtfs/redis/interfaces/IPublicGtfsDepartureCacheDto.js +3 -0
- package/dist/schema-definitions/ropid-gtfs/redis/interfaces/IPublicGtfsDepartureCacheDto.js.map +1 -0
- package/dist/schema-definitions/ropid-gtfs/redis/schemas/PublicGtfsDepartureDtoSchema.d.ts +4 -0
- package/dist/schema-definitions/ropid-gtfs/redis/schemas/PublicGtfsDepartureDtoSchema.js +69 -0
- package/dist/schema-definitions/ropid-gtfs/redis/schemas/PublicGtfsDepartureDtoSchema.js.map +1 -0
- package/docs/implementation_documentation.md +26 -0
- package/docs/openapi-output.yaml +233 -0
- package/package.json +1 -1
- package/dist/output-gateway/public/routers/v1/PublicRouter.js.map +0 -1
|
@@ -9,9 +9,13 @@ const RopidGtfsFacade_1 = require("../RopidGtfsFacade");
|
|
|
9
9
|
const RopidGtfsMetadataRepository_1 = require("../RopidGtfsMetadataRepository");
|
|
10
10
|
const RopidGtfsRepository_1 = require("../data-access/RopidGtfsRepository");
|
|
11
11
|
const BlockStopsRedisRepository_1 = require("../data-access/cache/BlockStopsRedisRepository");
|
|
12
|
+
const PublicGtfsDepartureRepository_1 = require("../data-access/cache/PublicGtfsDepartureRepository");
|
|
12
13
|
const StaticFileRedisRepository_1 = require("../data-access/cache/StaticFileRedisRepository");
|
|
14
|
+
const precomputed_1 = require("../data-access/precomputed");
|
|
13
15
|
const DeparturePresetsFacade_1 = require("../facade/DeparturePresetsFacade");
|
|
16
|
+
const PublicDepartureCacheTransformation_1 = require("../transformations/PublicDepartureCacheTransformation");
|
|
14
17
|
const RopidGTFSTransformation_1 = require("../transformations/RopidGTFSTransformation");
|
|
18
|
+
const RefreshPublicGtfsDepartureCacheTask_1 = require("../workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask");
|
|
15
19
|
const PrecomputedTablesFacade_1 = require("../workers/timetables/tasks/helpers/PrecomputedTablesFacade");
|
|
16
20
|
const RopidGtfsFactory_1 = require("../workers/timetables/tasks/helpers/RopidGtfsFactory");
|
|
17
21
|
const RopidGtfsContainerToken_1 = require("./RopidGtfsContainerToken");
|
|
@@ -25,9 +29,12 @@ RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContaine
|
|
|
25
29
|
//#region Repositories
|
|
26
30
|
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.StaticFileRedisRepository, StaticFileRedisRepository_1.StaticFileRedisRepository).registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsRepository, RopidGtfsRepository_1.RopidGtfsRepository);
|
|
27
31
|
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsMetadataRepository, RopidGtfsMetadataRepository_1.RopidGtfsMetadataRepository);
|
|
32
|
+
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DepartureRepository, precomputed_1.DeparturesRepository);
|
|
33
|
+
RopidGtfsContainer.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.PublicGtfsDepartureRepository, PublicGtfsDepartureRepository_1.PublicGtfsDepartureRepository);
|
|
28
34
|
//#endregion
|
|
29
35
|
//#region Transformations
|
|
30
36
|
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGTFSTransformation, RopidGTFSTransformation_1.RopidGTFSTransformation);
|
|
37
|
+
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.PublicDepartureCacheTransformation, PublicDepartureCacheTransformation_1.PublicDepartureCacheTransformation);
|
|
31
38
|
//#endregion
|
|
32
39
|
//#region Facade
|
|
33
40
|
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFacade, RopidGtfsFacade_1.RopidGtfsFacade);
|
|
@@ -35,4 +42,7 @@ RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContaine
|
|
|
35
42
|
.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory, RopidGtfsFactory_1.RopidGtfsFactory, { lifecycle: tsyringe_1.Lifecycle.Transient })
|
|
36
43
|
.registerInstance(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RedisPubSubChannel, new pubsub_1.RedisPubSubChannel(ropid_gtfs_1.RopidGTFS.name));
|
|
37
44
|
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DeparturePresetsFacade, DeparturePresetsFacade_1.DeparturePresetsFacade);
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region Tasks
|
|
47
|
+
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RefreshPublicGtfsDepartureCacheTask, RefreshPublicGtfsDepartureCacheTask_1.RefreshPublicGtfsDepartureCacheTask);
|
|
38
48
|
//# sourceMappingURL=Di.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-g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CAAC,CAAC;AAC/F,kBAAkB,CAAC,QAAQ,CAAC,iDAAuB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC,CAAC;AAClH,YAAY;AAEZ,yBAAyB;AACzB,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC,CAAC;AAC/G,kBAAkB,CAAC,iBAAiB,CAChC,iDAAuB,CAAC,kCAAkC,EAC1D,uEAAkC,CACrC,CAAC;AACF,YAAY;AAEZ,gBAAgB;AAChB,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,eAAe,EAAE,iCAAe,CAAC,CAAC;AAC/F,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC;KACzG,QAAQ,CAAC,iDAAuB,CAAC,gBAAgB,EAAE,mCAAgB,EAAE,EAAE,SAAS,EAAE,oBAAS,CAAC,SAAS,EAAE,CAAC;KACxG,gBAAgB,CAAC,iDAAuB,CAAC,kBAAkB,EAAE,IAAI,2BAAkB,CAAC,sBAAS,CAAC,IAAI,CAAC,CAAC,CAAC;AAE1G,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,sBAAsB,EAAE,+CAAsB,CAAC,CAAC;AAC7G,YAAY;AAEZ,eAAe;AACf,kBAAkB,CAAC,iBAAiB,CAChC,iDAAuB,CAAC,mCAAmC,EAC3D,yEAAmC,CACtC,CAAC"}
|
|
@@ -4,10 +4,14 @@ declare const RopidGtfsContainerToken: {
|
|
|
4
4
|
PrecomputedTablesFacade: symbol;
|
|
5
5
|
StaticFileRedisRepository: symbol;
|
|
6
6
|
RopidGTFSTransformation: symbol;
|
|
7
|
+
PublicDepartureCacheTransformation: symbol;
|
|
7
8
|
RopidGtfsFactory: symbol;
|
|
8
9
|
RedisPubSubChannel: symbol;
|
|
9
10
|
RopidGtfsRepository: symbol;
|
|
11
|
+
DepartureRepository: symbol;
|
|
12
|
+
PublicGtfsDepartureRepository: symbol;
|
|
10
13
|
DeparturePresetsFacade: symbol;
|
|
11
14
|
RopidGtfsFacade: symbol;
|
|
15
|
+
RefreshPublicGtfsDepartureCacheTask: symbol;
|
|
12
16
|
};
|
|
13
17
|
export { RopidGtfsContainerToken };
|
|
@@ -7,11 +7,15 @@ const RopidGtfsContainerToken = {
|
|
|
7
7
|
PrecomputedTablesFacade: Symbol(),
|
|
8
8
|
StaticFileRedisRepository: Symbol(),
|
|
9
9
|
RopidGTFSTransformation: Symbol(),
|
|
10
|
+
PublicDepartureCacheTransformation: Symbol(),
|
|
10
11
|
RopidGtfsFactory: Symbol(),
|
|
11
12
|
RedisPubSubChannel: Symbol(),
|
|
12
13
|
RopidGtfsRepository: Symbol(),
|
|
14
|
+
DepartureRepository: Symbol(),
|
|
15
|
+
PublicGtfsDepartureRepository: Symbol(),
|
|
13
16
|
DeparturePresetsFacade: Symbol(),
|
|
14
17
|
RopidGtfsFacade: Symbol(),
|
|
18
|
+
RefreshPublicGtfsDepartureCacheTask: Symbol(),
|
|
15
19
|
};
|
|
16
20
|
exports.RopidGtfsContainerToken = RopidGtfsContainerToken;
|
|
17
21
|
//# sourceMappingURL=RopidGtfsContainerToken.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGtfsContainerToken.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,uBAAuB,GAAG;IAC5B,yBAAyB,EAAE,MAAM,EAAE;IACnC,2BAA2B,EAAE,MAAM,EAAE;IACrC,uBAAuB,EAAE,MAAM,EAAE;IACjC,yBAAyB,EAAE,MAAM,EAAE;IACnC,uBAAuB,EAAE,MAAM,EAAE;IACjC,gBAAgB,EAAE,MAAM,EAAE;IAC1B,kBAAkB,EAAE,MAAM,EAAE;IAC5B,mBAAmB,EAAE,MAAM,EAAE;IAC7B,sBAAsB,EAAE,MAAM,EAAE;IAChC,eAAe,EAAE,MAAM,EAAE;
|
|
1
|
+
{"version":3,"file":"RopidGtfsContainerToken.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,uBAAuB,GAAG;IAC5B,yBAAyB,EAAE,MAAM,EAAE;IACnC,2BAA2B,EAAE,MAAM,EAAE;IACrC,uBAAuB,EAAE,MAAM,EAAE;IACjC,yBAAyB,EAAE,MAAM,EAAE;IACnC,uBAAuB,EAAE,MAAM,EAAE;IACjC,kCAAkC,EAAE,MAAM,EAAE;IAC5C,gBAAgB,EAAE,MAAM,EAAE;IAC1B,kBAAkB,EAAE,MAAM,EAAE;IAC5B,mBAAmB,EAAE,MAAM,EAAE;IAC7B,mBAAmB,EAAE,MAAM,EAAE;IAC7B,6BAA6B,EAAE,MAAM,EAAE;IACvC,sBAAsB,EAAE,MAAM,EAAE;IAChC,eAAe,EAAE,MAAM,EAAE;IACzB,mCAAmC,EAAE,MAAM,EAAE;CAChD,CAAC;AAEO,0DAAuB"}
|
package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { IPublicGtfsDepartureCacheDto } from "../../../schema-definitions/ropid-gtfs/redis/interfaces/IPublicGtfsDepartureCacheDto";
|
|
2
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
3
|
+
import { IPublicDepartureDto } from "../interfaces/IPublicDepartureDto";
|
|
4
|
+
export declare class PublicDepartureCacheTransformation extends AbstractTransformation<IPublicDepartureDto, IPublicGtfsDepartureCacheDto> {
|
|
5
|
+
name: string;
|
|
6
|
+
protected transformInternal: (inputDto: IPublicDepartureDto) => IPublicGtfsDepartureCacheDto;
|
|
7
|
+
}
|
package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PublicDepartureCacheTransformation = void 0;
|
|
10
|
+
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
|
|
11
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
12
|
+
let PublicDepartureCacheTransformation = exports.PublicDepartureCacheTransformation = class PublicDepartureCacheTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.name = "PublicDepartureCacheTransformation";
|
|
16
|
+
this.transformInternal = (inputDto) => {
|
|
17
|
+
var _a, _b;
|
|
18
|
+
const outputDto = {
|
|
19
|
+
stop_id: inputDto.stop_id,
|
|
20
|
+
departure_datetime: inputDto.departure_datetime.toISOString(),
|
|
21
|
+
arrival_datetime: (_b = (_a = inputDto.arrival_datetime) === null || _a === void 0 ? void 0 : _a.toISOString()) !== null && _b !== void 0 ? _b : null,
|
|
22
|
+
route_short_name: inputDto.route_short_name,
|
|
23
|
+
route_type: inputDto.route_type,
|
|
24
|
+
trip_id: inputDto.trip_id,
|
|
25
|
+
stop_sequence: inputDto.stop_sequence,
|
|
26
|
+
platform_code: inputDto.platform_code,
|
|
27
|
+
trip_headsign: inputDto.trip_headsign,
|
|
28
|
+
};
|
|
29
|
+
return outputDto;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.PublicDepartureCacheTransformation = PublicDepartureCacheTransformation = __decorate([
|
|
34
|
+
(0, tsyringe_1.injectable)()
|
|
35
|
+
], PublicDepartureCacheTransformation);
|
|
36
|
+
//# sourceMappingURL=PublicDepartureCacheTransformation.js.map
|
package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublicDepartureCacheTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,6GAA0G;AAC1G,iEAAgE;AAIzD,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,+CAGvD;IAHM;;QAII,SAAI,GAAG,oCAAoC,CAAC;QAEzC,sBAAiB,GAAG,CAAC,QAA6B,EAAE,EAAE;;YAC5D,MAAM,SAAS,GAAiC;gBAC5C,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,WAAW,EAAE;gBAC7D,gBAAgB,EAAE,MAAA,MAAA,QAAQ,CAAC,gBAAgB,0CAAE,WAAW,EAAE,mCAAI,IAAI;gBAClE,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;gBAC3C,UAAU,EAAE,QAAQ,CAAC,UAAU;gBAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,aAAa,EAAE,QAAQ,CAAC,aAAa;aACxC,CAAC;YAEF,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;6CArBY,kCAAkC;IAD9C,IAAA,qBAAU,GAAE;GACA,kCAAkC,CAqB9C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { AbstractWorker } from "@golemio/core/dist/integration-engine/workers";
|
|
1
|
+
import { AbstractTask, AbstractWorker } from "@golemio/core/dist/integration-engine/workers";
|
|
2
2
|
export declare class TimetableWorker extends AbstractWorker {
|
|
3
3
|
protected name: string;
|
|
4
4
|
constructor();
|
|
5
|
+
registerTask: (task: AbstractTask<any>) => void;
|
|
5
6
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimetableWorker = void 0;
|
|
4
|
+
const Di_1 = require("../../ioc/Di");
|
|
5
|
+
const RopidGtfsContainerToken_1 = require("../../ioc/RopidGtfsContainerToken");
|
|
4
6
|
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
|
|
7
|
+
const constants_1 = require("./constants");
|
|
5
8
|
const CheckForNewDataTask_1 = require("./tasks/CheckForNewDataTask");
|
|
6
9
|
const CheckSavedRowsAndReplaceTablesTask_1 = require("./tasks/CheckSavedRowsAndReplaceTablesTask");
|
|
7
10
|
const DownloadDatasetsTask_1 = require("./tasks/DownloadDatasetsTask");
|
|
@@ -10,8 +13,13 @@ const TransformAndSaveDataTask_1 = require("./tasks/TransformAndSaveDataTask");
|
|
|
10
13
|
class TimetableWorker extends workers_1.AbstractWorker {
|
|
11
14
|
constructor() {
|
|
12
15
|
super();
|
|
13
|
-
this.name =
|
|
16
|
+
this.name = constants_1.TIMETABLE_WORKER_NAME;
|
|
17
|
+
this.registerTask = (task) => {
|
|
18
|
+
super.registerTask(task);
|
|
19
|
+
task.queuePrefix = this.getQueuePrefix();
|
|
20
|
+
};
|
|
14
21
|
// Register tasks
|
|
22
|
+
this.registerTask(Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RefreshPublicGtfsDepartureCacheTask));
|
|
15
23
|
this.registerTask(new CheckForNewDataTask_1.CheckForNewDataTask(this.getQueuePrefix()));
|
|
16
24
|
this.registerTask(new CheckSavedRowsAndReplaceTablesTask_1.CheckSavedRowsAndReplaceTablesTask(this.getQueuePrefix()));
|
|
17
25
|
this.registerTask(new DownloadDatasetsTask_1.DownloadDatasetsTask(this.getQueuePrefix()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimetableWorker.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"TimetableWorker.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.ts"],"names":[],"mappings":";;;AAAA,qCAA2D;AAC3D,+EAAqF;AACrF,2EAA6F;AAC7F,2CAAoD;AACpD,qEAAkE;AAClE,mGAAgG;AAChG,uEAAoE;AACpE,uFAAoF;AAEpF,+EAA4E;AAE5E,MAAa,eAAgB,SAAQ,wBAAc;IAG/C;QACI,KAAK,EAAE,CAAC;QAHF,SAAI,GAAG,iCAAqB,CAAC;QAkBhC,iBAAY,GAAG,CAAC,IAAuB,EAAQ,EAAE;YACpD,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC7C,CAAC,CAAC;QAhBE,iBAAiB;QACjB,IAAI,CAAC,YAAY,CACb,uBAAkB,CAAC,OAAO,CACtB,iDAAuB,CAAC,mCAAmC,CAC9D,CACJ,CAAC;QACF,IAAI,CAAC,YAAY,CAAC,IAAI,yCAAmB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAClE,IAAI,CAAC,YAAY,CAAC,IAAI,uEAAkC,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QACjF,IAAI,CAAC,YAAY,CAAC,IAAI,2CAAoB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QACnE,IAAI,CAAC,YAAY,CAAC,IAAI,2DAA4B,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC3E,IAAI,CAAC,YAAY,CAAC,IAAI,mDAAwB,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;IAC3E,CAAC;CAMJ;AAvBD,0CAuBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TIMETABLE_WORKER_NAME = "RopidGtfs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/workers/timetables/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,WAAW,CAAC"}
|
|
@@ -54,7 +54,11 @@ class CheckSavedRowsAndReplaceTablesTask extends workers_1.AbstractTask {
|
|
|
54
54
|
yield this.dataCacheManager.cleanCache();
|
|
55
55
|
yield this.ropidGtfsRepository.cleanTmpAndOldTables();
|
|
56
56
|
const rabbitExchangeName = this.config.getValue("env.RABBIT_EXCHANGE_NAME");
|
|
57
|
+
// send message to VP worker to refresh GTFS trip data (see task description for more info)
|
|
57
58
|
yield integration_engine_1.QueueManager.sendMessageToExchange(`${rabbitExchangeName}.${constants_1.WORKER_NAME.toLowerCase()}`, "refreshGTFSTripData", {});
|
|
59
|
+
// send message to GTFS timetable worker to refresh public GTFS departure cache
|
|
60
|
+
// so that the new data is available in the public (Lítačka) API
|
|
61
|
+
yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPublicGtfsDepartureCache", {});
|
|
58
62
|
}
|
|
59
63
|
catch (err) {
|
|
60
64
|
yield this.retryOrThrow(notDeployedVersions, data, err);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckSavedRowsAndReplaceTablesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,wEAA2E;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WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC;gBAClD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mDAAmD,KAAK,SAAS,IAAI,CAAC,QAAQ,oBAAoB,CAAC,CAAC;aACzH;YAED,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE;gBACrB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,CAAC,CAAC;gBACvD,OAAO;aACV;YAED,MAAM,mBAAmB,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;YACjH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,2BAA2B,CAAC,mBAAmB,CAAC,CAAC;YAEhG,IAAI;gBACA,MAAM,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAC;gBACvD,MAAM,IAAI,CAAC,sBAAsB,CAAC,qCAAqC,CAAC,6CAAqB,CAAC,GAAG,CAAC,CAAC;gBACnG,MAAM,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;gBAC9D,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,CAAC;gBACzC,MAAM,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,CAAC;gBAEtD,MAAM,kBAAkB,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAS,0BAA0B,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckSavedRowsAndReplaceTablesTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,wEAA2E;AAC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AAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACzE,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;QAC9C,CAAC;KAAA;CACJ;AAjJD,gFAiJC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PublicGtfsDepartureRepository } from "../../../data-access/cache/PublicGtfsDepartureRepository";
|
|
2
|
+
import { DeparturesRepository } from "../../../data-access/precomputed";
|
|
3
|
+
import { PublicDepartureCacheTransformation } from "../../../transformations/PublicDepartureCacheTransformation";
|
|
4
|
+
import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
|
|
5
|
+
import { AbstractTask } from "@golemio/core/dist/integration-engine/workers";
|
|
6
|
+
import { IRefreshPublicDepartureParams } from "./interfaces/IRefreshPublicDepartureParams";
|
|
7
|
+
import { RefreshPublicDepartureValidationSchema } from "./schema/RefreshPublicDepartureSchema";
|
|
8
|
+
export declare class RefreshPublicGtfsDepartureCacheTask extends AbstractTask<IRefreshPublicDepartureParams> {
|
|
9
|
+
private departureTransformation;
|
|
10
|
+
private departureRepository;
|
|
11
|
+
private publicDepartureRepository;
|
|
12
|
+
private config;
|
|
13
|
+
readonly queueName = "refreshPublicGtfsDepartureCache";
|
|
14
|
+
readonly queueTtl: number;
|
|
15
|
+
readonly schema: typeof RefreshPublicDepartureValidationSchema;
|
|
16
|
+
private readonly departurePageSize;
|
|
17
|
+
constructor(departureTransformation: PublicDepartureCacheTransformation, departureRepository: DeparturesRepository, publicDepartureRepository: PublicGtfsDepartureRepository, config: ISimpleConfig);
|
|
18
|
+
protected execute(params: IRefreshPublicDepartureParams): Promise<void>;
|
|
19
|
+
private getIntervalParamsWithDefault;
|
|
20
|
+
private getDeparturesByStopId;
|
|
21
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
15
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
16
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
17
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
18
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
19
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
20
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.RefreshPublicGtfsDepartureCacheTask = void 0;
|
|
25
|
+
const PublicGtfsDepartureRepository_1 = require("../../../data-access/cache/PublicGtfsDepartureRepository");
|
|
26
|
+
const precomputed_1 = require("../../../data-access/precomputed");
|
|
27
|
+
const RopidGtfsContainerToken_1 = require("../../../ioc/RopidGtfsContainerToken");
|
|
28
|
+
const PublicDepartureCacheTransformation_1 = require("../../../transformations/PublicDepartureCacheTransformation");
|
|
29
|
+
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
30
|
+
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
|
|
31
|
+
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
32
|
+
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
33
|
+
const constants_1 = require("../constants");
|
|
34
|
+
const RefreshPublicDepartureSchema_1 = require("./schema/RefreshPublicDepartureSchema");
|
|
35
|
+
const DEFAULT_PAGE_SIZE = 50000;
|
|
36
|
+
let RefreshPublicGtfsDepartureCacheTask = exports.RefreshPublicGtfsDepartureCacheTask = class RefreshPublicGtfsDepartureCacheTask extends workers_1.AbstractTask {
|
|
37
|
+
constructor(departureTransformation, departureRepository, publicDepartureRepository, config) {
|
|
38
|
+
super(constants_1.TIMETABLE_WORKER_NAME);
|
|
39
|
+
this.departureTransformation = departureTransformation;
|
|
40
|
+
this.departureRepository = departureRepository;
|
|
41
|
+
this.publicDepartureRepository = publicDepartureRepository;
|
|
42
|
+
this.config = config;
|
|
43
|
+
this.queueName = "refreshPublicGtfsDepartureCache";
|
|
44
|
+
this.queueTtl = 59 * 60 * 1000; // 59 minutes
|
|
45
|
+
this.schema = RefreshPublicDepartureSchema_1.RefreshPublicDepartureValidationSchema;
|
|
46
|
+
const departurePageSize = this.config.getValue("module.pid.ropid-gtfs.timetables.refreshPublicGtfsDepartureCache.departurePageSize", DEFAULT_PAGE_SIZE.toString());
|
|
47
|
+
this.departurePageSize = Number.parseInt(departurePageSize);
|
|
48
|
+
}
|
|
49
|
+
execute(params) {
|
|
50
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
51
|
+
const intervalParams = this.getIntervalParamsWithDefault(params);
|
|
52
|
+
const numberOfDepartures = yield this.departureRepository.countDeparturesForPublicCache(intervalParams);
|
|
53
|
+
const pages = Math.ceil(numberOfDepartures / this.departurePageSize);
|
|
54
|
+
for (let page = 0; page < pages; page++) {
|
|
55
|
+
const departuresForCache = yield this.departureRepository.getDepaturesForPublicCache(page, this.departurePageSize, intervalParams);
|
|
56
|
+
const departuresByStopIdDict = this.getDeparturesByStopId(departuresForCache);
|
|
57
|
+
for (const [stopId, departures] of departuresByStopIdDict.entries()) {
|
|
58
|
+
try {
|
|
59
|
+
const departuresDto = this.departureTransformation.transformArray(departures);
|
|
60
|
+
yield this.publicDepartureRepository.replaceDeparturesForStop(departuresDto, stopId, intervalParams);
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
if (err instanceof golemio_errors_1.AbstractGolemioError) {
|
|
64
|
+
throw err;
|
|
65
|
+
}
|
|
66
|
+
throw new golemio_errors_1.GeneralError("Error while refreshing public departure cache", this.constructor.name, err);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
getIntervalParamsWithDefault(params) {
|
|
73
|
+
var _a, _b;
|
|
74
|
+
const defaultIntervalFromHours = this.config.getValue("module.pid.ropid-gtfs.timetables.refreshPublicGtfsDepartureCache.defaultIntervalFromHours", "-3");
|
|
75
|
+
const defaultIntervalToHours = this.config.getValue("module.pid.ropid-gtfs.timetables.refreshPublicGtfsDepartureCache.defaultIntervalToHours", "6");
|
|
76
|
+
return {
|
|
77
|
+
intervalFromHours: (_a = params.intervalFromHours) !== null && _a !== void 0 ? _a : Number.parseInt(defaultIntervalFromHours),
|
|
78
|
+
intervalToHours: (_b = params.intervalToHours) !== null && _b !== void 0 ? _b : Number.parseInt(defaultIntervalToHours),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
getDeparturesByStopId(departures) {
|
|
82
|
+
const departuresByStopId = new Map();
|
|
83
|
+
for (const departure of departures) {
|
|
84
|
+
if (!departuresByStopId.has(departure.stop_id)) {
|
|
85
|
+
departuresByStopId.set(departure.stop_id, []);
|
|
86
|
+
}
|
|
87
|
+
departuresByStopId.get(departure.stop_id).push(departure);
|
|
88
|
+
}
|
|
89
|
+
return departuresByStopId;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
exports.RefreshPublicGtfsDepartureCacheTask = RefreshPublicGtfsDepartureCacheTask = __decorate([
|
|
93
|
+
(0, tsyringe_1.injectable)(),
|
|
94
|
+
__param(0, (0, tsyringe_1.inject)(RopidGtfsContainerToken_1.RopidGtfsContainerToken.PublicDepartureCacheTransformation)),
|
|
95
|
+
__param(1, (0, tsyringe_1.inject)(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DepartureRepository)),
|
|
96
|
+
__param(2, (0, tsyringe_1.inject)(RopidGtfsContainerToken_1.RopidGtfsContainerToken.PublicGtfsDepartureRepository)),
|
|
97
|
+
__param(3, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
|
|
98
|
+
__metadata("design:paramtypes", [PublicDepartureCacheTransformation_1.PublicDepartureCacheTransformation,
|
|
99
|
+
precomputed_1.DeparturesRepository,
|
|
100
|
+
PublicGtfsDepartureRepository_1.PublicGtfsDepartureRepository, Object])
|
|
101
|
+
], RefreshPublicGtfsDepartureCacheTask);
|
|
102
|
+
//# sourceMappingURL=RefreshPublicGtfsDepartureCacheTask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RefreshPublicGtfsDepartureCacheTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,4GAA+G;AAC/G,kEAA8E;AAE9E,kFAAqF;AACrF,oHAAuH;AAEvH,wEAAqE;AACrE,2EAA6E;AAC7E,6EAA8F;AAC9F,iEAAwE;AACxE,4CAAqD;AAErD,wFAA+F;AAE/F,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAGzB,IAAM,mCAAmC,iDAAzC,MAAM,mCAAoC,SAAQ,sBAA2C;IAMhG,YAE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AS,CAAC,CAAC;SAC9D;QAED,OAAO,kBAAkB,CAAC;IAC9B,CAAC;CACJ,CAAA;8CAhFY,mCAAmC;IAD/C,IAAA,qBAAU,GAAE;IAQJ,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,kCAAkC,CAAC,CAAA;IAElE,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,6BAA6B,CAAC,CAAA;IAE7D,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;qCAJE,uEAAkC;QACe,kCAAoB;QAEnE,6DAA6B;GAX3D,mCAAmC,CAgF/C"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { RopidGtfsRepository } from "../../../../data-access/RopidGtfsRepository";
|
|
2
|
+
import { DeparturesRepository } from "../../../../data-access/precomputed/DeparturesRepository";
|
|
2
3
|
import { SourceTableSuffixEnum } from "../../../../helpers/SourceTableSuffixEnum";
|
|
3
4
|
import { ILogger } from "@golemio/core/dist/helpers/logger/LoggerProvider";
|
|
4
5
|
export declare class PrecomputedTablesFacade {
|
|
5
6
|
private readonly logger;
|
|
6
7
|
private readonly ropidGtfsRepository;
|
|
8
|
+
private readonly departureRepository;
|
|
7
9
|
/** Precomputed data repositories */
|
|
8
|
-
private departuresRepository;
|
|
9
10
|
private minMaxStopSequencesRepository;
|
|
10
11
|
private tripScheduleRepository;
|
|
11
12
|
private servicesCalendarRepository;
|
|
12
|
-
constructor(logger: ILogger, ropidGtfsRepository: RopidGtfsRepository);
|
|
13
|
+
constructor(logger: ILogger, ropidGtfsRepository: RopidGtfsRepository, departureRepository: DeparturesRepository);
|
|
13
14
|
createAndPopulatePrecomputedTmpTables: (sourceTableSuffix: SourceTableSuffixEnum) => Promise<void>;
|
|
14
15
|
}
|
|
@@ -32,9 +32,10 @@ const RopidGtfsContainerToken_1 = require("../../../../ioc/RopidGtfsContainerTok
|
|
|
32
32
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
33
33
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
34
34
|
let PrecomputedTablesFacade = exports.PrecomputedTablesFacade = class PrecomputedTablesFacade {
|
|
35
|
-
constructor(logger, ropidGtfsRepository) {
|
|
35
|
+
constructor(logger, ropidGtfsRepository, departureRepository) {
|
|
36
36
|
this.logger = logger;
|
|
37
37
|
this.ropidGtfsRepository = ropidGtfsRepository;
|
|
38
|
+
this.departureRepository = departureRepository;
|
|
38
39
|
this.createAndPopulatePrecomputedTmpTables = (sourceTableSuffix) => __awaiter(this, void 0, void 0, function* () {
|
|
39
40
|
yield this.ropidGtfsRepository.createPrecomputedTmpTables();
|
|
40
41
|
this.logger.info(`Datasets: populating temp table ${this.servicesCalendarRepository["tableName"]}${SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp}`);
|
|
@@ -43,13 +44,12 @@ let PrecomputedTablesFacade = exports.PrecomputedTablesFacade = class Precompute
|
|
|
43
44
|
yield this.minMaxStopSequencesRepository.populate(sourceTableSuffix);
|
|
44
45
|
this.logger.info(`Datasets: populating temp table ${this.tripScheduleRepository["tableName"]}${SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp}`);
|
|
45
46
|
yield this.tripScheduleRepository.populate(sourceTableSuffix);
|
|
46
|
-
this.logger.info(`Datasets: populating temp table ${this.
|
|
47
|
-
yield this.
|
|
48
|
-
this.logger.info(`Datasets: running analyze on ${this.
|
|
49
|
-
yield this.
|
|
47
|
+
this.logger.info(`Datasets: populating temp table ${this.departureRepository["tableName"]}${SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp}`);
|
|
48
|
+
yield this.departureRepository.createAndPopulate(sourceTableSuffix);
|
|
49
|
+
this.logger.info(`Datasets: running analyze on ${this.departureRepository["tableName"]}${SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp}`);
|
|
50
|
+
yield this.departureRepository.analyze();
|
|
50
51
|
});
|
|
51
52
|
/** Precomputed data repositories */
|
|
52
|
-
this.departuresRepository = new DeparturesRepository_1.DeparturesRepository();
|
|
53
53
|
this.minMaxStopSequencesRepository = new MinMaxStopSequencesRepository_1.MinMaxStopSequencesRepository();
|
|
54
54
|
this.tripScheduleRepository = new TripScheduleRepository_1.TripScheduleRepository();
|
|
55
55
|
this.servicesCalendarRepository = new ServicesCalendarRepository_1.ServicesCalendarRepository();
|
|
@@ -59,6 +59,8 @@ exports.PrecomputedTablesFacade = PrecomputedTablesFacade = __decorate([
|
|
|
59
59
|
(0, tsyringe_1.injectable)(),
|
|
60
60
|
__param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
61
61
|
__param(1, (0, tsyringe_1.inject)(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsRepository)),
|
|
62
|
-
|
|
62
|
+
__param(2, (0, tsyringe_1.inject)(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DepartureRepository)),
|
|
63
|
+
__metadata("design:paramtypes", [Object, RopidGtfsRepository_1.RopidGtfsRepository,
|
|
64
|
+
DeparturesRepository_1.DeparturesRepository])
|
|
63
65
|
], PrecomputedTablesFacade);
|
|
64
66
|
//# sourceMappingURL=PrecomputedTablesFacade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrecomputedTablesFacade.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"PrecomputedTablesFacade.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqF;AACrF,mGAAmG;AACnG,qHAAqH;AACrH,+GAA+G;AAC/G,uGAAuG;A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,iCAAiC,IAAI,CAAC,mBAAmB,CAAC,WAAW,CAAC,GAAG,6CAAqB,CAAC,GAAG,EAAE,CAAC,CAAC;YACvH,MAAM,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;QAC7C,CAAC,CAAA,CAAC;QA7BE,oCAAoC;QACpC,IAAI,CAAC,6BAA6B,GAAG,IAAI,6DAA6B,EAAE,CAAC;QACzE,IAAI,CAAC,sBAAsB,GAAG,IAAI,+CAAsB,EAAE,CAAC;QAC3D,IAAI,CAAC,0BAA0B,GAAG,IAAI,uDAA0B,EAAE,CAAC;IACvE,CAAC;CA0BJ,CAAA;kCAzCY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;IAQJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;IACxB,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,mBAAmB,CAAC,CAAA;6CADuC,yCAAmB;QACnB,2CAAoB;GAT1G,uBAAuB,CAyCnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IRefreshPublicDepartureParams.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IRefreshPublicDepartureParams.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RefreshPublicDepartureValidationSchema = void 0;
|
|
13
|
+
const class_validator_1 = require("@golemio/core/dist/shared/class-validator");
|
|
14
|
+
class RefreshPublicDepartureValidationSchema {
|
|
15
|
+
}
|
|
16
|
+
exports.RefreshPublicDepartureValidationSchema = RefreshPublicDepartureValidationSchema;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsOptional)(),
|
|
19
|
+
(0, class_validator_1.IsInt)()
|
|
20
|
+
// we do not want to have older departures than 3 hours in the cache for now
|
|
21
|
+
// see the PublicGtfsDepartureRepository.replaceDeparturesForStop method
|
|
22
|
+
,
|
|
23
|
+
(0, class_validator_1.Min)(-3),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], RefreshPublicDepartureValidationSchema.prototype, "intervalFromHours", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
(0, class_validator_1.IsInt)(),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], RefreshPublicDepartureValidationSchema.prototype, "intervalToHours", void 0);
|
|
31
|
+
//# sourceMappingURL=RefreshPublicDepartureSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RefreshPublicDepartureSchema.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/RefreshPublicDepartureSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAAmF;AAGnF,MAAa,sCAAsC;CAWlD;AAXD,wFAWC;AALG;IALC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;IACR,4EAA4E;IAC5E,wEAAwE;;IACvE,IAAA,qBAAG,EAAC,CAAC,CAAC,CAAC;;iFACmB;AAI3B;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,uBAAK,GAAE;;+EACiB"}
|
|
@@ -46,8 +46,13 @@ let PublicApiCacheRepository = exports.PublicApiCacheRepository = PublicApiCache
|
|
|
46
46
|
const newSetKey = `${PublicApiCacheRepository_1.NAMESPACE_PREFIX}:${(0, node_crypto_1.randomBytes)(4).toString("hex")}`;
|
|
47
47
|
const pipeline = this.connection.pipeline();
|
|
48
48
|
for (const item of data) {
|
|
49
|
+
// geo sorted set with vehicle ids (for quick lookup of vehicle ids in given area)
|
|
49
50
|
pipeline.geoadd(newSetKey, item.lng, item.lat, item.vehicle_id);
|
|
50
|
-
|
|
51
|
+
// list with vehicle ids for each trip (for quick lookup of vehicle ids for each trip)
|
|
52
|
+
pipeline.rpush(`${newSetKey}:trip-${item.gtfs_trip_id}`, item.vehicle_id);
|
|
53
|
+
pipeline.expire(`${newSetKey}:trip-${item.gtfs_trip_id}`, 1 * 60); // 1 minute
|
|
54
|
+
// vehicle data for each vehicle id (for quick lookup of vehicle data for each vehicle id)
|
|
55
|
+
pipeline.set(`${newSetKey}:vehicle-${item.vehicle_id}`, JSON.stringify(item), "EX", 1 * 60);
|
|
51
56
|
}
|
|
52
57
|
pipeline.expire(newSetKey, 1 * 60); // 1 minute
|
|
53
58
|
yield pipeline.exec();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicApiCacheRepository.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,8FAAmF;AAEnF,0IAAuG;AACvG,wFAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAClF,iEAAgE;AAChE,6CAA0C;AAGnC,IAAM,wBAAwB,mEAA9B,MAAM,wBAAyB,SAAQ,uBAAU;IAGpD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,0BAAwB,CAAC,gBAAgB;SACpD,EACD,IAAI,uCAAmB,CAAC,0BAA0B,EAAE,iDAAuB,CAAC,CAC/E,CAAC;IACN,CAAC;IAEY,MAAM,CAAC,IAA0B;;YAC1C,IAAI;gBACA,MAAM,IAAI,CAAC,SAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;aACxC;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAClB,qDAAqD,GAAG,CAAC,OAAO,EAAE,EAClE,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;aACL;YAED,IAAI;gBACA,MAAM,SAAS,GAAG,GAAG,0BAAwB,CAAC,gBAAgB,IAAI,IAAA,yBAAW,EAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBACnG,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;gBAE5C,KAAK,MAAM,IAAI,IAAI,IAAI,EAAE;oBACrB,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"PublicApiCacheRepository.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,8FAAmF;AAEnF,0IAAuG;AACvG,wFAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAClF,iEAAgE;AAChE,6CAA0C;AAGnC,IAAM,wBAAwB,mEAA9B,MAAM,wBAAyB,SAAQ,uBAAU;IAGpD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,wBAAwB,EAAE,KAAK;Y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AED,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,WAAW;gBAC/C,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBAEtB,OAAO,SAAS,CAAC;aACpB;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAAC,yCAAyC,EAAE,GAAG,CAAC,CAAC;aAC1E;QACL,CAAC;KAAA;;AA/Ca,yCAAgB,GAAG,qCAA6B,AAAhC,CAAiC;mCADtD,wBAAwB;IADpC,IAAA,qBAAU,GAAE;;GACA,wBAAwB,CAiDpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sEAAsD;AACtD,6CAA6B;AAC7B,0DAA0C;AAC1C,wEAAwD"}
|
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
const AccessibilityEnums_1 = require("../../../helpers/AccessibilityEnums");
|
|
5
5
|
const RouteTypeEnums_1 = require("../../../helpers/RouteTypeEnums");
|
|
6
6
|
const shared_1 = require("../../shared");
|
|
7
|
+
const DepartureCalculator_1 = require("../../shared/DepartureCalculator");
|
|
7
8
|
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
8
9
|
const __1 = require("..");
|
|
9
10
|
class DepartureBoardMapper {
|
|
@@ -18,7 +19,7 @@ class DepartureBoardMapper {
|
|
|
18
19
|
output_gateway_1.log.warn(`Unknown type of predicted date: ${predicted}`);
|
|
19
20
|
return null;
|
|
20
21
|
}
|
|
21
|
-
const departure_minutes =
|
|
22
|
+
const departure_minutes = DepartureCalculator_1.DepartureCalculator.getDepartureMinutes(predicted);
|
|
22
23
|
if (departure_minutes < 1)
|
|
23
24
|
return "<1";
|
|
24
25
|
else
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepartureBoardMapper.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/DepartureBoardMapper.ts"],"names":[],"mappings":";;;AAAA,4EAA2G;AAC3G,oEAA4D;AAC5D,yCAA8C;AAC9C,sEAAwD;AACxD,0BAAuF;AAEvF,MAAqB,oBAAoB;IAC9B,MAAM,CAAC,aAAa,CAAC,IAAS,EAAE,iBAAyB,EAAE,IAAY;QAC1E,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,CAAC,CAAC,CAAC;QAEjH,OAAO,MAAM,CAAC;IAClB,CAAC;IAyEO,MAAM,CAAC,yBAAyB,CAAC,SAAsB;QAC3D,IAAI,CAAC,SAAS;YAAE,OAAO,IAAI,CAAC;QAC5B,IAAI,CAAC,CAAC,SAAS,YAAY,IAAI,CAAC,EAAE;YAC9B,oBAAG,CAAC,IAAI,CAAC,mCAAmC,SAAS,EAAE,CAAC,CAAC;YACzD,OAAO,IAAI,CAAC;SACf;QACD,MAAM,iBAAiB,GAAG,
|
|
1
|
+
{"version":3,"file":"DepartureBoardMapper.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/DepartureBoardMapper.ts"],"names":[],"mappings":";;;AAAA,4EAA2G;AAC3G,oEAA4D;AAC5D,yCAA8C;AAC9C,0EAAqE;AACrE,sEAAwD;AACxD,0BAAuF;AAEvF,MAAqB,oBAAoB;IAC9B,MAAM,CAAC,aAAa,CAAC,IAAS,EAAE,iBAAyB,EAAE,IAAY;QAC1E,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAgB,EAAE,EAAE,CAAC,IAAI,CAAC,qBA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