@golemio/pid 4.0.3-dev.1997942620 → 4.0.3-rc.2001599412
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 +1 -1
- package/dist/helpers/GtfsStopParser.d.ts +0 -2
- package/dist/helpers/GtfsStopParser.js +8 -11
- package/dist/helpers/GtfsStopParser.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +1 -0
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
- package/dist/integration-engine/jis/ioc/Di.js +0 -10
- package/dist/integration-engine/jis/ioc/Di.js.map +1 -1
- package/dist/integration-engine/jis/ioc/JISContainerToken.d.ts +0 -4
- package/dist/integration-engine/jis/ioc/JISContainerToken.js +0 -5
- package/dist/integration-engine/jis/ioc/JISContainerToken.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.d.ts +1 -6
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +2 -50
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
- package/dist/integration-engine/jis/workers/JISWorker.js +0 -1
- package/dist/integration-engine/jis/workers/JISWorker.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.d.ts +2 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -5
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.d.ts +1 -5
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +0 -24
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/index.d.ts +0 -1
- package/dist/integration-engine/ropid-gtfs/index.js +0 -1
- package/dist/integration-engine/ropid-gtfs/index.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js +0 -8
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +0 -3
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +0 -3
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +5 -8
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.d.ts +0 -1
- package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js +0 -1
- package/dist/integration-engine/vehicle-positions/ioc/VPContainerToken.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +0 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/interfaces/TripRepositoryInterfaces.d.ts +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.d.ts +1 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +109 -124
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.d.ts +1 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +85 -100
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +0 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +0 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
- package/dist/output-gateway/index.js +0 -1
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/jis/ioc/Di.js +2 -2
- package/dist/output-gateway/jis/ioc/Di.js.map +1 -1
- package/dist/output-gateway/jis/ioc/OgJisToken.d.ts +0 -2
- package/dist/output-gateway/jis/ioc/OgJisToken.js +0 -2
- package/dist/output-gateway/jis/ioc/OgJisToken.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/domain/InfotextInterfaces.d.ts +0 -5
- package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.d.ts +1 -4
- package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js +1 -7
- package/dist/output-gateway/pid/helpers/JISInfotextStopSuppressionFilter.js.map +1 -1
- package/dist/output-gateway/pid/index.d.ts +0 -50
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.js +6 -64
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +0 -12
- package/dist/output-gateway/pid/ioc/OgPidToken.js +0 -12
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
- package/dist/output-gateway/pid/routers/index.d.ts +0 -1
- package/dist/output-gateway/pid/routers/index.js +1 -3
- package/dist/output-gateway/pid/routers/index.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/InfotextFacade.d.ts +2 -7
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js +4 -29
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/StopFacade.d.ts +3 -12
- package/dist/output-gateway/pid/service/facade/StopFacade.js +7 -43
- package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +10 -17
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +16 -161
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.d.ts +1 -7
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js +0 -9
- package/dist/output-gateway/pid/service/helpers/PlatformCodeResolver.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.d.ts +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +4 -7
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.d.ts +0 -1
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +0 -21
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +1 -2
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +15 -14
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
- package/dist/output-gateway/public/domain/repository/IGtfsDepartureRepository.d.ts +1 -1
- package/dist/output-gateway/public/ioc/Di.js +1 -1
- package/dist/output-gateway/public/ioc/Di.js.map +1 -1
- package/dist/output-gateway/{shared → public}/service/VPSubscriber.d.ts +2 -4
- package/dist/output-gateway/{shared → public}/service/VPSubscriber.js +1 -1
- package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -0
- package/dist/output-gateway/shared/constants/route-version.d.ts +1 -2
- package/dist/output-gateway/shared/constants/route-version.js +0 -1
- package/dist/output-gateway/shared/constants/route-version.js.map +1 -1
- package/dist/schema-definitions/jis/redis/const.d.ts +0 -1
- package/dist/schema-definitions/jis/redis/const.js +1 -2
- package/dist/schema-definitions/jis/redis/const.js.map +1 -1
- package/dist/schema-definitions/ropid-departures-presets/index.d.ts +0 -1
- package/dist/schema-definitions/ropid-departures-presets/index.js +0 -3
- package/dist/schema-definitions/ropid-departures-presets/index.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopDto.d.ts +0 -1
- package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +0 -1
- package/dist/schema-definitions/ropid-gtfs/redis/const.js +1 -2
- package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.d.ts +2 -3
- package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js +0 -4
- package/dist/schema-definitions/vehicle-positions/models/views/PublicStopTimeModel.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/models/views/interfaces/IPublicStopTimeDto.d.ts +0 -1
- package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicApiCacheDto.d.ts +0 -2
- package/dist/schema-definitions/vehicle-positions/redis/interfaces/IPublicStopTimeCacheDto.d.ts +0 -1
- package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js +0 -8
- package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicApiCacheDtoSchema.js.map +1 -1
- package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js +1 -4
- package/dist/schema-definitions/vehicle-positions/redis/schemas/PublicStopTimeCacheDtoSchema.js.map +1 -1
- package/docs/asyncapi.yaml +0 -45
- package/docs/cache/types/redis.md +2 -82
- package/docs/jis/index.md +5 -15
- package/docs/openapi-input.yaml +2 -13
- package/docs/openapi-output.yaml +4 -326
- package/package.json +2 -2
- package/db/example/redis/gtfsStopsCacheMock.json +0 -8
- package/db/example/redis/jisCacheMock.json +0 -31
- package/db/migrations/postgresql/20250716143052-add-stop-name-to-combined-stop-times.js +0 -53
- package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-down.sql +0 -47
- package/db/migrations/postgresql/sqls/20250716143052-add-stop-name-to-combined-stop-times-up.sql +0 -47
- package/dist/helpers/jis/JISInfotextSeverityLevelPriority.d.ts +0 -6
- package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js +0 -11
- package/dist/helpers/jis/JISInfotextSeverityLevelPriority.js.map +0 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.d.ts +0 -9
- package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js +0 -86
- package/dist/integration-engine/jis/repositories/JISInfotextsRedisRepository.js.map +0 -1
- package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.d.ts +0 -7
- package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js +0 -37
- package/dist/integration-engine/jis/transformations/JISInfotextCacheTranformation.js.map +0 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.d.ts +0 -13
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js +0 -47
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsCacheTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.d.ts +0 -18
- package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js +0 -44
- package/dist/integration-engine/ropid-gtfs/RopidGTFSCisStopsModel.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.d.ts +0 -12
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js +0 -44
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshGtfsStopsCacheTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.d.ts +0 -12
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js +0 -87
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/cache/GtfsStopsRedisRepository.js.map +0 -1
- package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.d.ts +0 -17
- package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js +0 -113
- package/dist/output-gateway/jis/data-access/cache/JISInfotextsRedisRepository.js.map +0 -1
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.d.ts +0 -17
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js +0 -155
- package/dist/output-gateway/pid/controllers/v4/V4TransferBoardsController.js.map +0 -1
- package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.d.ts +0 -14
- package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js +0 -3
- package/dist/output-gateway/pid/controllers/v4/interfaces/ITransferBoardsParams.js.map +0 -1
- package/dist/output-gateway/pid/helpers/TransferBoardFilter.d.ts +0 -5
- package/dist/output-gateway/pid/helpers/TransferBoardFilter.js +0 -33
- package/dist/output-gateway/pid/helpers/TransferBoardFilter.js.map +0 -1
- package/dist/output-gateway/pid/helpers/TransferBoardSorter.d.ts +0 -6
- package/dist/output-gateway/pid/helpers/TransferBoardSorter.js +0 -61
- package/dist/output-gateway/pid/helpers/TransferBoardSorter.js.map +0 -1
- package/dist/output-gateway/pid/routers/v4/V4PIDRouter.d.ts +0 -16
- package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js +0 -67
- package/dist/output-gateway/pid/routers/v4/V4PIDRouter.js.map +0 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.d.ts +0 -13
- package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js +0 -31
- package/dist/output-gateway/pid/service/transformations/JISInfotextCacheTransferTransformation.js.map +0 -1
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.d.ts +0 -27
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js +0 -77
- package/dist/output-gateway/pid/service/transformations/TransferDepartureCacheTransformation.js.map +0 -1
- package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.d.ts +0 -13
- package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js +0 -83
- package/dist/output-gateway/ropid-gtfs/data-access/redis/GtfsStopsRedisRepository.js.map +0 -1
- package/dist/output-gateway/shared/service/VPSubscriber.js.map +0 -1
- package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.d.ts +0 -17
- package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js +0 -3
- package/dist/schema-definitions/jis/redis/interfaces/IJISInfotextDto.js.map +0 -1
- package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.d.ts +0 -3
- package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js +0 -59
- package/dist/schema-definitions/jis/redis/schemas/JISInfotextDtoSchema.js.map +0 -1
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.d.ts +0 -16
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js +0 -3
- package/dist/schema-definitions/ropid-gtfs/interfaces/IStopCisDto.js.map +0 -1
- package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.d.ts +0 -58
- package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js +0 -69
- package/dist/schema-definitions/ropid-gtfs/models/StopCisDto.js.map +0 -1
|
@@ -17,35 +17,29 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.TransferFacade = void 0;
|
|
19
19
|
const pid_1 = require("../..");
|
|
20
|
+
const data_access_1 = require("../../data-access");
|
|
20
21
|
const OgPidToken_1 = require("../../ioc/OgPidToken");
|
|
22
|
+
const PIDDepartureModel_1 = __importDefault(require("../../models/helpers/PIDDepartureModel"));
|
|
21
23
|
const IPIDDepartureQueryOptions_1 = __importDefault(require("../../models/helpers/interfaces/IPIDDepartureQueryOptions"));
|
|
24
|
+
const shared_1 = require("../../../shared");
|
|
22
25
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
23
26
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
24
27
|
const TransferDepartureTransformation_1 = require("../transformations/TransferDepartureTransformation");
|
|
25
|
-
const PublicGtfsDepartureRepository_1 = require("../../../public/data-access/redis/PublicGtfsDepartureRepository");
|
|
26
|
-
const PublicVehiclePositionsRepository_1 = require("../../../public/data-access/redis/PublicVehiclePositionsRepository");
|
|
27
|
-
const PublicStopTimeRepository_1 = require("../../../public/data-access/redis/PublicStopTimeRepository");
|
|
28
|
-
const DelayComputationRepository_1 = require("../../../public/data-access/redis/DelayComputationRepository");
|
|
29
|
-
const monitoring_1 = require("@golemio/core/dist/monitoring");
|
|
30
|
-
const PIDDepartureModel_1 = __importDefault(require("../../models/helpers/PIDDepartureModel"));
|
|
31
|
-
const shared_1 = require("../../../shared");
|
|
32
|
-
const data_access_1 = require("../../data-access");
|
|
33
|
-
const const_1 = require("../../../../const");
|
|
34
|
-
const DateTimeUtils_1 = require("../../../../helpers/DateTimeUtils");
|
|
35
|
-
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
36
28
|
let TransferFacade = exports.TransferFacade = class TransferFacade {
|
|
37
|
-
constructor(
|
|
38
|
-
this.
|
|
39
|
-
this.departuresRepository = departuresRepository;
|
|
29
|
+
constructor(departureRepository, departureTransformation) {
|
|
30
|
+
this.departureRepository = departureRepository;
|
|
40
31
|
this.departureTransformation = departureTransformation;
|
|
41
|
-
this.tripRepository = tripRepository;
|
|
42
|
-
this.stopTimeRepository = stopTimeRepository;
|
|
43
|
-
this.delayComputationRepository = delayComputationRepository;
|
|
44
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Retrieves transfer departures for given GTFS stop IDs
|
|
35
|
+
* - Get transfer departures from DB
|
|
36
|
+
* - Process them (filter, sort, etc.)
|
|
37
|
+
* - Transform them to DTO
|
|
38
|
+
*/
|
|
45
39
|
async getTransferDepartures(stopIds, tripNumber, currentMoment, minutesOffset, timeZone = shared_1.RopidRouterUtils.TIMEZONE) {
|
|
46
40
|
let departureEntities = [];
|
|
47
41
|
try {
|
|
48
|
-
departureEntities = await this.
|
|
42
|
+
departureEntities = await this.departureRepository.getTransferDepartures({
|
|
49
43
|
stopsIds: stopIds,
|
|
50
44
|
currentMoment,
|
|
51
45
|
minutesOffset,
|
|
@@ -77,137 +71,6 @@ let TransferFacade = exports.TransferFacade = class TransferFacade {
|
|
|
77
71
|
}
|
|
78
72
|
return transferDepartures;
|
|
79
73
|
}
|
|
80
|
-
async getTransferCache(stopIds, limit, reqNumber, vehicleType, timeFrom) {
|
|
81
|
-
const span = (0, monitoring_1.createChildSpan)(`Departures.getTransferCache`);
|
|
82
|
-
span?.setAttributes({ stopIds, limit, reqNumber, vehicleType });
|
|
83
|
-
try {
|
|
84
|
-
let departureEntities = [];
|
|
85
|
-
try {
|
|
86
|
-
departureEntities = await this.publicDepartureRepository.getPublicGtfsDepartureCache(stopIds, 60, // look forward up-to 1 hour, see JIS Transferboards Design Document
|
|
87
|
-
timeFrom, limit * 2 // should be (at least) 2x the limit from request
|
|
88
|
-
);
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
span?.recordException(error);
|
|
92
|
-
if (error instanceof golemio_errors_1.AbstractGolemioError) {
|
|
93
|
-
throw error;
|
|
94
|
-
}
|
|
95
|
-
throw new golemio_errors_1.GeneralError("Failed to publicGtfsDepartureCache", this.constructor.name, error, 500);
|
|
96
|
-
}
|
|
97
|
-
const currentPosition = await this.tripRepository.getDetailedVehiclePosition(`service-${vehicleType}-${reqNumber}`);
|
|
98
|
-
let currentDeparture = null;
|
|
99
|
-
let currentStopTime = null;
|
|
100
|
-
if (currentPosition) {
|
|
101
|
-
const departureIndex = departureEntities.findIndex((departure) => {
|
|
102
|
-
return departure.trip_id === currentPosition.gtfs_trip_id;
|
|
103
|
-
}) ?? null;
|
|
104
|
-
// Remove currentDeparture from departureEntities
|
|
105
|
-
if (departureIndex !== -1) {
|
|
106
|
-
currentDeparture = departureEntities.splice(departureIndex, 1)[0];
|
|
107
|
-
}
|
|
108
|
-
const stopTimes = (await this.stopTimeRepository.getPublicStopTimeCache(currentPosition.vehicle_id, currentPosition.gtfs_trip_id)) || [];
|
|
109
|
-
currentStopTime = stopTimes.find((stopTime) => stopIds.includes(stopTime.stop_id)) ?? null;
|
|
110
|
-
}
|
|
111
|
-
if (currentPosition && !currentDeparture) {
|
|
112
|
-
// Important Fallback for last-stop of a trip
|
|
113
|
-
// because there is no Departure from such last-stop
|
|
114
|
-
currentDeparture = await this.findFallbackDeparture(currentPosition, stopIds);
|
|
115
|
-
}
|
|
116
|
-
const omitFutureTrips = true;
|
|
117
|
-
// One trip might go through more Stops in one Node
|
|
118
|
-
const uniqueDeparturesTripIds = Array.from(new Set(departureEntities.map((departure) => departure.trip_id)));
|
|
119
|
-
const positionsByTrip = await this.tripRepository.getAllVehiclePositionsForMultipleTrips(uniqueDeparturesTripIds, omitFutureTrips);
|
|
120
|
-
let transfers = [];
|
|
121
|
-
const moreDepartures = await this.processMultiplePositionsForDeparturesAtOnce(departureEntities, positionsByTrip, stopIds);
|
|
122
|
-
transfers.push(...moreDepartures);
|
|
123
|
-
return {
|
|
124
|
-
currentTrip: {
|
|
125
|
-
departure: currentDeparture,
|
|
126
|
-
position: currentPosition,
|
|
127
|
-
stopTime: currentStopTime,
|
|
128
|
-
},
|
|
129
|
-
transfers,
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
catch (error) {
|
|
133
|
-
span?.recordException(error);
|
|
134
|
-
if (error instanceof golemio_errors_1.AbstractGolemioError) {
|
|
135
|
-
throw error;
|
|
136
|
-
}
|
|
137
|
-
throw new golemio_errors_1.GeneralError("Error in getTransferCache", this.constructor.name, error, 500);
|
|
138
|
-
}
|
|
139
|
-
finally {
|
|
140
|
-
span?.end();
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
async findFallbackDeparture(currentPosition, stopIds) {
|
|
144
|
-
const stopTimes = (await this.delayComputationRepository.getDelayComputationCacheProperty(currentPosition.gtfs_trip_id, "stop_times"));
|
|
145
|
-
if (!stopTimes?.stop_times?.length) {
|
|
146
|
-
return null;
|
|
147
|
-
}
|
|
148
|
-
const departureAtStopId = stopTimes.stop_times.find((stopTime) => stopIds.includes(stopTime.stop_id)) || null;
|
|
149
|
-
if (departureAtStopId) {
|
|
150
|
-
const arrivalDate = DateTimeUtils_1.DateTimeUtils.getStopDateTimeForTripOrigin(departureAtStopId.arrival_time_seconds, currentPosition.detailed_info.origin_timestamp);
|
|
151
|
-
const departureDate = DateTimeUtils_1.DateTimeUtils.getStopDateTimeForTripOrigin(departureAtStopId.departure_time_seconds, currentPosition.detailed_info.origin_timestamp);
|
|
152
|
-
return {
|
|
153
|
-
stop_id: departureAtStopId.stop_id,
|
|
154
|
-
departure_datetime: departureDate.toISOString(),
|
|
155
|
-
arrival_datetime: arrivalDate.toISOString(),
|
|
156
|
-
route_short_name: currentPosition.gtfs_route_short_name,
|
|
157
|
-
route_type: currentPosition.route_type,
|
|
158
|
-
trip_id: currentPosition.gtfs_trip_id,
|
|
159
|
-
stop_sequence: departureAtStopId.stop_sequence,
|
|
160
|
-
platform_code: null,
|
|
161
|
-
trip_headsign: currentPosition.detailed_info.trip_headsign,
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
return null;
|
|
165
|
-
}
|
|
166
|
-
async processMultiplePositionsForDeparturesAtOnce(departures, positionsByTrip, stopIds) {
|
|
167
|
-
const outputGroup = [];
|
|
168
|
-
const trainIdTripIdTuples = [];
|
|
169
|
-
const trainDepartures = new Map();
|
|
170
|
-
for (const departure of departures) {
|
|
171
|
-
// for each departure, use its trip_id + multiple position
|
|
172
|
-
const positions = positionsByTrip.get(departure.trip_id) || [];
|
|
173
|
-
if (!positions.length) {
|
|
174
|
-
outputGroup.push({
|
|
175
|
-
departure,
|
|
176
|
-
position: null,
|
|
177
|
-
stopTime: null,
|
|
178
|
-
});
|
|
179
|
-
continue;
|
|
180
|
-
}
|
|
181
|
-
const validPositions = positions.filter((pos) => pos.state_position !== const_1.StatePositionEnum.CANCELED);
|
|
182
|
-
for (const pos of validPositions) {
|
|
183
|
-
if (pos.route_type === RouteTypeEnums_1.GTFSRouteTypeEnum.TRAIN) {
|
|
184
|
-
trainDepartures.set(departure.trip_id, departure);
|
|
185
|
-
trainIdTripIdTuples.push([pos.vehicle_id, departure.trip_id]);
|
|
186
|
-
continue;
|
|
187
|
-
}
|
|
188
|
-
// not a train, thus no stopTime.cis_platform_code needed
|
|
189
|
-
outputGroup.push({
|
|
190
|
-
departure,
|
|
191
|
-
position: pos,
|
|
192
|
-
stopTime: null,
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
const stopTimeCachesByTripId = !trainIdTripIdTuples.length
|
|
197
|
-
? new Map()
|
|
198
|
-
: await this.stopTimeRepository.getManyPublicStopTimeCaches(trainIdTripIdTuples);
|
|
199
|
-
for (const [tripId, stopTimeCache] of Array.from(stopTimeCachesByTripId.entries())) {
|
|
200
|
-
const departure = trainDepartures.get(tripId);
|
|
201
|
-
const position = positionsByTrip.get(tripId)[0];
|
|
202
|
-
const stopTime = stopTimeCache.find((stopTime) => stopIds.includes(stopTime.stop_id));
|
|
203
|
-
outputGroup.push({
|
|
204
|
-
departure,
|
|
205
|
-
position: position || null,
|
|
206
|
-
stopTime: stopTime || null,
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
return outputGroup;
|
|
210
|
-
}
|
|
211
74
|
/**
|
|
212
75
|
* Fallback options as defined by ROPID
|
|
213
76
|
*/
|
|
@@ -228,17 +91,9 @@ let TransferFacade = exports.TransferFacade = class TransferFacade {
|
|
|
228
91
|
};
|
|
229
92
|
exports.TransferFacade = TransferFacade = __decorate([
|
|
230
93
|
(0, tsyringe_1.injectable)(),
|
|
231
|
-
__param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.
|
|
232
|
-
__param(1, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
__param(4, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.PublicStopTimeRepository)),
|
|
236
|
-
__param(5, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.DelayComputationRepository)),
|
|
237
|
-
__metadata("design:paramtypes", [PublicGtfsDepartureRepository_1.PublicGtfsDepartureRepository,
|
|
238
|
-
data_access_1.DeparturesRepository,
|
|
239
|
-
TransferDepartureTransformation_1.TransferDepartureTransformation,
|
|
240
|
-
PublicVehiclePositionsRepository_1.PublicVehiclePositionsRepository,
|
|
241
|
-
PublicStopTimeRepository_1.PublicStopTimeRepository,
|
|
242
|
-
DelayComputationRepository_1.DelayComputationRepository])
|
|
94
|
+
__param(0, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.DeparturesRepository)),
|
|
95
|
+
__param(1, (0, tsyringe_1.inject)(OgPidToken_1.OgPidToken.TransferDepartureTransformation)),
|
|
96
|
+
__metadata("design:paramtypes", [data_access_1.DeparturesRepository,
|
|
97
|
+
TransferDepartureTransformation_1.TransferDepartureTransformation])
|
|
243
98
|
], TransferFacade);
|
|
244
99
|
//# sourceMappingURL=TransferFacade.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/TransferFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+
|
|
1
|
+
{"version":3,"file":"TransferFacade.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/facade/TransferFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAgI;AAChI,mDAA2D;AAC3D,qDAAoD;AACpD,+FAA0E;AAC1E,0HAAoG;AACpG,4CAA8C;AAC9C,6EAA8F;AAE9F,iEAAwE;AACxE,wGAAqG;AAG9F,IAAM,cAAc,4BAApB,MAAM,cAAc;IACvB,YACqD,mBAAyC,EAC9B,uBAAwD;QADnE,wBAAmB,GAAnB,mBAAmB,CAAsB;QAC9B,4BAAuB,GAAvB,uBAAuB,CAAiC;IACrH,CAAC;IAEJ;;;;;OAKG;IACI,KAAK,CAAC,qBAAqB,CAC9B,OAAiB,EACjB,UAAyB,EACzB,aAAqB,EACrB,aAAqB,EACrB,QAAQ,GAAG,yBAAgB,CAAC,QAAQ;QAEpC,IAAI,iBAAiB,GAAyB,EAAE,CAAC;QACjD,IAAI;YACA,iBAAiB,GAAG,MAAM,IAAI,CAAC,mBAAmB,CAAC,qBAAqB,CAAC;gBACrE,QAAQ,EAAE,OAAO;gBACjB,aAAa;gBACb,aAAa;aAChB,CAAC,CAAC;SACN;QAAC,OAAO,KAAK,EAAE;YACZ,IAAI,KAAK,YAAY,qCAAoB,EAAE;gBACvC,MAAM,KAAK,CAAC;aACf;YAED,MAAM,IAAI,6BAAY,CAAC,wCAAwC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;SACvG;QAED,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;YAChC,OAAO,EAAE,CAAC;SACb;QAED,IAAI,kBAAkB,GAAyB,EAAE,CAAC;QAClD,IAAI;YACA,MAAM,mBAA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|
3
3
|
/**
|
|
4
4
|
* Platform code is determined by the following rules:
|
|
@@ -7,10 +7,4 @@ export declare class PlatformCodeResolver {
|
|
|
7
7
|
* - for other route types, the departure platform code is used (GTFS)
|
|
8
8
|
*/
|
|
9
9
|
static resolve(departure: ITransferDeparture): string | null;
|
|
10
|
-
/**
|
|
11
|
-
* Determine platform code based on the following rules:
|
|
12
|
-
* if current stop time is known, use its RT CIS platform code (if available)
|
|
13
|
-
* otherwise use GTFS schedule platform code
|
|
14
|
-
*/
|
|
15
|
-
static determinePlatformCode(inputDto: IDepartureWithPosition): string | null;
|
|
16
10
|
}
|
|
@@ -15,15 +15,6 @@ class PlatformCodeResolver {
|
|
|
15
15
|
}
|
|
16
16
|
return departure.platform_code;
|
|
17
17
|
}
|
|
18
|
-
/**
|
|
19
|
-
* Determine platform code based on the following rules:
|
|
20
|
-
* if current stop time is known, use its RT CIS platform code (if available)
|
|
21
|
-
* otherwise use GTFS schedule platform code
|
|
22
|
-
*/
|
|
23
|
-
static determinePlatformCode(inputDto) {
|
|
24
|
-
const { departure, stopTime } = inputDto;
|
|
25
|
-
return stopTime?.cis_stop_platform_code || departure.platform_code;
|
|
26
|
-
}
|
|
27
18
|
}
|
|
28
19
|
exports.PlatformCodeResolver = PlatformCodeResolver;
|
|
29
20
|
//# sourceMappingURL=PlatformCodeResolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformCodeResolver.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/helpers/PlatformCodeResolver.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAG5D,MAAa,oBAAoB;IAC7B;;;;;OAKG;IACI,MAAM,CAAC,OAAO,CAAC,SAA6B;QAC/C,IAAI,SAAS,CAAC,UAAU,KAAK,kCAAiB,CAAC,KAAK,IAAI,SAAS,CAAC,6BAA6B,CAAC,KAAK,IAAI,EAAE;YACvG,OAAO,SAAS,CAAC,6BAA6B,CAAC,CAAC;SACnD;QAED,OAAO,SAAS,CAAC,aAAa,CAAC;IACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"PlatformCodeResolver.js","sourceRoot":"","sources":["../../../../../src/output-gateway/pid/service/helpers/PlatformCodeResolver.ts"],"names":[],"mappings":";;;AAAA,uEAA4D;AAG5D,MAAa,oBAAoB;IAC7B;;;;;OAKG;IACI,MAAM,CAAC,OAAO,CAAC,SAA6B;QAC/C,IAAI,SAAS,CAAC,UAAU,KAAK,kCAAiB,CAAC,KAAK,IAAI,SAAS,CAAC,6BAA6B,CAAC,KAAK,IAAI,EAAE;YACvG,OAAO,SAAS,CAAC,6BAA6B,CAAC,CAAC;SACnD;QAED,OAAO,SAAS,CAAC,aAAa,CAAC;IACnC,CAAC;CACJ;AAdD,oDAcC"}
|
|
@@ -6,6 +6,6 @@ export declare class PublicGtfsDepartureRepository implements IGtfsDepartureRepo
|
|
|
6
6
|
private redisConnector;
|
|
7
7
|
private log;
|
|
8
8
|
constructor(redisConnector: IoRedisConnector, log: ILogger);
|
|
9
|
-
getPublicGtfsDepartureCache(stopIds: string[], minutesAfter: number
|
|
9
|
+
getPublicGtfsDepartureCache(stopIds: string[], minutesAfter: number): Promise<IPublicGtfsDepartureCacheDto[]>;
|
|
10
10
|
private getAndParseDepartureCache;
|
|
11
11
|
}
|
|
@@ -19,18 +19,15 @@ const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
|
19
19
|
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
20
20
|
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
21
21
|
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
22
|
-
const ONE_SECOND = 1;
|
|
23
22
|
let PublicGtfsDepartureRepository = exports.PublicGtfsDepartureRepository = class PublicGtfsDepartureRepository {
|
|
24
23
|
constructor(redisConnector, log) {
|
|
25
24
|
this.redisConnector = redisConnector;
|
|
26
25
|
this.log = log;
|
|
27
|
-
this.getAndParseDepartureCache = async (stopId, minutesAfter
|
|
26
|
+
this.getAndParseDepartureCache = async (stopId, minutesAfter) => {
|
|
28
27
|
const connection = this.redisConnector.getConnection();
|
|
29
28
|
let departureCache;
|
|
30
|
-
const now = Date.now();
|
|
31
29
|
try {
|
|
32
|
-
departureCache = await connection.zrangebyscore(`${const_1.PUBLIC_DEPARTURE_NAMESPACE_PREFIX}:${stopId}`,
|
|
33
|
-
);
|
|
30
|
+
departureCache = await connection.zrangebyscore(`${const_1.PUBLIC_DEPARTURE_NAMESPACE_PREFIX}:${stopId}`, "-inf", Math.round(new Date().getTime() / 1000) + minutesAfter * 60);
|
|
34
31
|
}
|
|
35
32
|
catch (err) {
|
|
36
33
|
throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot get public departure cache from cache: ${err.message}`, this.constructor.name, err);
|
|
@@ -47,11 +44,11 @@ let PublicGtfsDepartureRepository = exports.PublicGtfsDepartureRepository = clas
|
|
|
47
44
|
}
|
|
48
45
|
};
|
|
49
46
|
}
|
|
50
|
-
async getPublicGtfsDepartureCache(stopIds, minutesAfter
|
|
47
|
+
async getPublicGtfsDepartureCache(stopIds, minutesAfter) {
|
|
51
48
|
if (!this.redisConnector.isConnected()) {
|
|
52
49
|
await this.redisConnector.connect();
|
|
53
50
|
}
|
|
54
|
-
const allDepartures = await Promise.all(stopIds.map((stopId) => this.getAndParseDepartureCache(stopId, minutesAfter
|
|
51
|
+
const allDepartures = await Promise.all(stopIds.map((stopId) => this.getAndParseDepartureCache(stopId, minutesAfter)));
|
|
55
52
|
return allDepartures.flat();
|
|
56
53
|
}
|
|
57
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicGtfsDepartureRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iFAAgF;AAEhF,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;
|
|
1
|
+
{"version":3,"file":"PublicGtfsDepartureRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iFAAgF;AAEhF,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,6BAA6B,2CAAnC,MAAM,6BAA6B;IACtC,YAC2C,cAAwC,EACrD,GAAoB;QADC,mBAAc,GAAd,cAAc,CAAkB;QAC7C,QAAG,GAAH,GAAG,CAAS;QAe1C,8BAAyB,GAAG,KAAK,EAAE,MAAc,EAAE,YAAoB,EAA2C,EAAE;YACxH,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;YACvD,IAAI,cAAwB,CAAC;YAE7B,IAAI;gBACA,cAAc,GAAG,MAAM,UAAU,CAAC,aAAa,CAC3C,GAAG,yCAAiC,IAAI,MAAM,EAAE,EAChD,MAAM,EACN,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,YAAY,GAAG,EAAE,CAC9D,CAAC;aACL;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,mDAAmD,GAAG,CAAC,OAAO,EAAE,EACxF,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;aACL;YAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC7B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,iDAAiD,MAAM,WAAW,CAAC,CAAC;gBAC1G,OAAO,EAAE,CAAC;aACb;YAED,IAAI;gBACA,OAAO,cAAc,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAiC,CAAC,CAAC;aAC3F;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,0CAA0C,GAAG,CAAC,OAAO,EAAE,EAC/E,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;aACL;QACL,CAAC,CAAC;IA9CC,CAAC;IAEG,KAAK,CAAC,2BAA2B,CAAC,OAAiB,EAAE,YAAoB;QAC5E,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,EAAE;YACpC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;SACvC;QAED,MAAM,aAAa,GAAqC,MAAM,OAAO,CAAC,GAAG,CACrE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,CAAC,yBAAyB,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAChF,CAAC;QAEF,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;IAChC,CAAC;CAmCJ,CAAA;wCAnDY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAF1E,6BAA6B,CAmDzC"}
|
|
@@ -7,5 +7,4 @@ export declare class PublicStopTimeRepository implements IStopTimeRepository {
|
|
|
7
7
|
private log;
|
|
8
8
|
constructor(redisConnector: IoRedisConnector, log: ILogger);
|
|
9
9
|
getPublicStopTimeCache(vehicleId: string, gtfsTripId: string): Promise<IPublicStopTimeCacheDto[]>;
|
|
10
|
-
getManyPublicStopTimeCaches(tuples: Array<[string, string]>): Promise<Map<string, IPublicStopTimeCacheDto[]>>;
|
|
11
10
|
}
|
|
@@ -48,27 +48,6 @@ let PublicStopTimeRepository = exports.PublicStopTimeRepository = class PublicSt
|
|
|
48
48
|
throw new golemio_errors_1.GeneralError(`${this.constructor.name}: Cannot parse public stop time cache: ${err.message}`, this.constructor.name, err);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
async getManyPublicStopTimeCaches(tuples) {
|
|
52
|
-
const connection = this.redisConnector.getConnection();
|
|
53
|
-
const parsedStopTimeCaches = new Map();
|
|
54
|
-
const mappedKeys = tuples.map((k) => `${const_1.PUBLIC_STOP_TIME_CACHE_NAMESPACE_PREFIX}:${k[0]}-${k[1]}`);
|
|
55
|
-
const stopCaches = await connection.mget(mappedKeys);
|
|
56
|
-
let i = -1;
|
|
57
|
-
for (const stopCache of stopCaches) {
|
|
58
|
-
i++;
|
|
59
|
-
if (stopCache === null) {
|
|
60
|
-
continue;
|
|
61
|
-
}
|
|
62
|
-
try {
|
|
63
|
-
const tripId = tuples[i][1];
|
|
64
|
-
parsedStopTimeCaches.set(tripId, JSON.parse(stopCache));
|
|
65
|
-
}
|
|
66
|
-
catch (error) {
|
|
67
|
-
throw new golemio_errors_1.GeneralError("Cannot parse stop time cache", this.constructor.name, error);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return parsedStopTimeCaches;
|
|
71
|
-
}
|
|
72
51
|
};
|
|
73
52
|
exports.PublicStopTimeRepository = PublicStopTimeRepository = __decorate([
|
|
74
53
|
(0, tsyringe_1.injectable)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicStopTimeRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicStopTimeRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,wFAA6F;AAE7F,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,wBAAwB,sCAA9B,MAAM,wBAAwB;IACjC,YACmD,cAAgC,EAC7C,GAAY;QADC,mBAAc,GAAd,cAAc,CAAkB;QAC7C,QAAG,GAAH,GAAG,CAAS;IAC/C,CAAC;IAEG,KAAK,CAAC,sBAAsB,CAAC,SAAiB,EAAE,UAAkB;QACrE,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,EAAE;YACpC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;SACvC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;QACvD,IAAI,aAAa,GAAkB,IAAI,CAAC;QAExC,IAAI;YACA,MAAM,GAAG,GAAG,GAAG,SAAS,IAAI,UAAU,EAAE,CAAC;YACzC,aAAa,GAAG,MAAM,UAAU,CAAC,GAAG,CAAC,GAAG,+CAAuC,IAAI,GAAG,EAAE,CAAC,CAAC;SAC7F;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,mDAAmD,GAAG,CAAC,OAAO,EAAE,EACxF,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;SACL;QAED,IAAI,aAAa,KAAK,IAAI,EAAE;YACxB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,sCAAsC,CAAC,CAAC;YAC9E,OAAO,EAAE,CAAC;SACb;QAED,IAAI;YACA,OAAO,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;SACpC;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAClB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,0CAA0C,GAAG,CAAC,OAAO,EAAE,EAC/E,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;SACL;IACL,CAAC;
|
|
1
|
+
{"version":3,"file":"PublicStopTimeRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicStopTimeRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;A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E,IAAI,CAAC,WAAW,CAAC,IAAI,EACrB,GAAG,CACN,CAAC;SACL;IACL,CAAC;CACJ,CAAA;mCAxCY,wBAAwB;IADpC,IAAA,qBAAU,GAAE;IAGJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAF1E,wBAAwB,CAwCpC"}
|
|
@@ -11,8 +11,7 @@ export declare class PublicVehiclePositionsRepository implements IVehiclePositio
|
|
|
11
11
|
setCurrentSetName(name: string): void;
|
|
12
12
|
getAllVehicleIds(boundingBox: IBoundingBoxWithCenter): Promise<string[]>;
|
|
13
13
|
getAllVehiclePositions(vehicleIds: string[], tripIds?: string[]): Promise<IPublicApiCacheDto[]>;
|
|
14
|
-
getAllVehiclePositionsForMultipleTrips(tripIds: string[]
|
|
15
|
-
private pushPositionsIntoMapByTrip;
|
|
14
|
+
getAllVehiclePositionsForMultipleTrips(tripIds: string[]): Promise<Map<string, IPublicApiCacheDto[]>>;
|
|
16
15
|
getTripsWithUntrackedVehicles(tripIds: string[]): Promise<Set<string>>;
|
|
17
16
|
getDetailedVehiclePosition(vehicleId: string, tripId?: string): Promise<IPublicApiCacheDto | null>;
|
|
18
17
|
private getVehicleIdsForMultiple;
|
|
@@ -81,7 +81,7 @@ let PublicVehiclePositionsRepository = exports.PublicVehiclePositionsRepository
|
|
|
81
81
|
}
|
|
82
82
|
return parsedVehiclePositions;
|
|
83
83
|
}
|
|
84
|
-
async getAllVehiclePositionsForMultipleTrips(tripIds
|
|
84
|
+
async getAllVehiclePositionsForMultipleTrips(tripIds) {
|
|
85
85
|
const positionsByTrip = new Map();
|
|
86
86
|
if (!this.setName || tripIds.length === 0) {
|
|
87
87
|
this.log.debug("Empty setName for public vehicle positions api or empty trip ids.");
|
|
@@ -92,13 +92,23 @@ let PublicVehiclePositionsRepository = exports.PublicVehiclePositionsRepository
|
|
|
92
92
|
}
|
|
93
93
|
const [vehicleIdsCurrent, vehicleIdsFuture] = await Promise.all([
|
|
94
94
|
this.getVehicleIdsForMultiple(tripIds, "trip"),
|
|
95
|
-
|
|
95
|
+
this.getVehicleIdsForMultiple(tripIds, "future-trip"),
|
|
96
96
|
]);
|
|
97
97
|
const vehicleIds = Array.from(new Set([...vehicleIdsCurrent, ...vehicleIdsFuture]));
|
|
98
98
|
if (vehicleIds.length > 0) {
|
|
99
|
-
await this.
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
const allPositions = await this.getAllVehiclePositions(vehicleIds);
|
|
100
|
+
for (const position of allPositions) {
|
|
101
|
+
if (!positionsByTrip.has(position.gtfs_trip_id)) {
|
|
102
|
+
positionsByTrip.set(position.gtfs_trip_id, []);
|
|
103
|
+
}
|
|
104
|
+
positionsByTrip.get(position.gtfs_trip_id).push(position);
|
|
105
|
+
}
|
|
106
|
+
const futurePositions = await this.getAllVehiclePositions(vehicleIds, tripIds);
|
|
107
|
+
for (const position of futurePositions) {
|
|
108
|
+
if (!positionsByTrip.has(position.gtfs_trip_id)) {
|
|
109
|
+
positionsByTrip.set(position.gtfs_trip_id, []);
|
|
110
|
+
}
|
|
111
|
+
positionsByTrip.get(position.gtfs_trip_id).push(position);
|
|
102
112
|
}
|
|
103
113
|
}
|
|
104
114
|
const canceledTrips = await this.getCanceledTrips(tripIds);
|
|
@@ -107,15 +117,6 @@ let PublicVehiclePositionsRepository = exports.PublicVehiclePositionsRepository
|
|
|
107
117
|
}
|
|
108
118
|
return positionsByTrip;
|
|
109
119
|
}
|
|
110
|
-
async pushPositionsIntoMapByTrip(positionsByTrip, vehicleIds, tripIds) {
|
|
111
|
-
const allPositions = await this.getAllVehiclePositions(vehicleIds, tripIds);
|
|
112
|
-
for (const position of allPositions) {
|
|
113
|
-
if (!positionsByTrip.has(position.gtfs_trip_id)) {
|
|
114
|
-
positionsByTrip.set(position.gtfs_trip_id, []);
|
|
115
|
-
}
|
|
116
|
-
positionsByTrip.get(position.gtfs_trip_id).push(position);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
120
|
async getTripsWithUntrackedVehicles(tripIds) {
|
|
120
121
|
const untrackedTrips = new Set();
|
|
121
122
|
if (!this.setName || tripIds.length === 0) {
|
package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicVehiclePositionsRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,gCAAgC,8CAAtC,MAAM,gCAAgC;IAGzC,YAC2C,cAAwC,EACrD,GAAoB;QADC,mBAAc,GAAd,cAAc,CAAkB;QAC7C,QAAG,GAAH,GAAG,CAAS;QAJ1C,YAAO,GAAuB,SAAS,CAAC,CAAC,qBAAqB;IAKnE,CAAC;IAEG,iBAAiB,CAAC,IAAY;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,WAAmC;QAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;YAClE,OAAO,EAAE,CAAC;SACb;QAED,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,EAAE;YACpC,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,CAAC;SACvC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;QACvD,IAAI,UAAU,GAAa,EAAE,CAAC;QAE9B,IAAI;YACA,UAAU,GAAG,CAAC,MAAM,UAAU,CAAC,SAAS,CACpC,IAAI,CAAC,OAAO,EACZ,YAAY,EACZ,W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AI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SACnG;QAED,MAAM,sBAAsB,GAAyB,EAAE,CAAC;QACxD,KAAK,MAAM,eAAe,IAAI,gBAAgB,EAAE;YAC5C,IAAI,eAAe,KAAK,IAAI,EAAE;gBAC1B,SAAS;aACZ;YAED,IAAI;gBACA,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;aAC5D;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,IAAI,6BAAY,CAAC,+BAA+B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACzF;SACJ;QAED,OAAO,sBAAsB,CAAC;IAClC,CAAC;IAEM,KAAK,CAAC,sCAAsC,
|
|
1
|
+
{"version":3,"file":"PublicVehiclePositionsRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAGA,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,gCAAgC,8CAAtC,MAAM,gCAAgC;IAGzC,YAC2C,cAAwC,EACrD,GAAoB;QADC,mBAAc,GAAd,cAAc,CAAkB;QAC7C,QAAG,GAAH,GAAG,CAAS;QAJ1C,YAAO,GAAuB,SAAS,CAAC,CAAC,qBAAqB;IAKnE,CAAC;IAEG,iBAAiB,CAAC,IAAY;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;IACxB,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,WAAmC;QAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACf,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAC;YAClE,OAAO,EAAE,CAAC;SACb;QAED,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE,EAAE;YACpC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AC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,EAAE,CAAC;SACb;QAED,MAAM,IAAI,GAAa,EAAE,CAAC;QAC1B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;YAC1B,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,OAAO,mBAAmB,MAAM,EAAE,CAAC,CAAC;SACzD;QAED,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE;YACtC,IAAI,YAAY,KAAK,IAAI,EAAE;gBACvB,SAAS;aACZ;iBAAM;gBACH,IAAI;oBACA,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;iBACtD;gBAAC,OAAO,KAAK,EAAE;oBACZ,MAAM,IAAI,6BAAY,CAAC,4BAA4B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;iBACtF;aACJ;SACJ;QACD,OAAO,mBAAmB,CAAC;IAC/B,CAAC;CACJ,CAAA;2CAzPY,gCAAgC;IAD5C,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,oBAAc,CAAC,cAAc,CAAC,CAAA;IACrC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;qCADsC,mCAAgB;GAJ1E,gCAAgC,CAyP5C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IPublicGtfsDepartureCacheDto } from "../../../../schema-definitions/ropid-gtfs/redis/interfaces/IPublicGtfsDepartureCacheDto";
|
|
2
2
|
export interface IGtfsDepartureRepository {
|
|
3
|
-
getPublicGtfsDepartureCache(stopId: string[], minutesAfter: number
|
|
3
|
+
getPublicGtfsDepartureCache(stopId: string[], minutesAfter: number): Promise<IPublicGtfsDepartureCacheDto[]>;
|
|
4
4
|
}
|
|
@@ -11,7 +11,7 @@ const DelayComputationRepository_1 = require("../data-access/redis/DelayComputat
|
|
|
11
11
|
const PublicGtfsDepartureRepository_1 = require("../data-access/redis/PublicGtfsDepartureRepository");
|
|
12
12
|
const PublicStopTimeRepository_1 = require("../data-access/redis/PublicStopTimeRepository");
|
|
13
13
|
const PublicVehiclePositionsRepository_1 = require("../data-access/redis/PublicVehiclePositionsRepository");
|
|
14
|
-
const VPSubscriber_1 = require("
|
|
14
|
+
const VPSubscriber_1 = require("../service/VPSubscriber");
|
|
15
15
|
const DepartureBoardFacade_1 = require("../service/facade/DepartureBoardFacade");
|
|
16
16
|
const DetailedTripFacade_1 = require("../service/facade/DetailedTripFacade");
|
|
17
17
|
const GtfsTripLookupFacade_1 = require("../service/facade/GtfsTripLookupFacade");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,oFAAyE;AACzE,qFAAmF;AAEnF,wEAAqE;AAErE,iEAAkF;AAClF,iEAA4E;AAC5E,wGAAqG;AACrG,gGAA6F;AAC7F,sGAAmG;AACnG,4FAAyF;AACzF,4GAAyG;AAGzG,
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,oFAAyE;AACzE,qFAAmF;AAEnF,wEAAqE;AAErE,iEAAkF;AAClF,iEAA4E;AAC5E,wGAAqG;AACrG,gGAA6F;AAC7F,sGAAmG;AACnG,4FAAyF;AACzF,4GAAyG;AAGzG,0DAAuD;AACvD,iFAA8E;AAC9E,6EAA0E;AAC1E,iFAA8E;AAC9E,qFAAwF;AACxF,4EAAyE;AACzE,gHAA6G;AAC7G,2GAA4G;AAC5G,+GAAgH;AAChH,qHAAsH;AACtH,qIAAsI;AAEtI,mGAAgG;AAChG,sGAAmG;AACnG,0GAAuG;AACvG,gHAA6G;AAC7G,gIAA6H;AAC7H,mI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AgB,CAAC;YAChE,MAAM,EAAE,MAAM;SACjB,EACD,CAAC,CAAC,OAAO,CAA8B,6BAAa,CAAC,gCAAgC,CAAC,CACzF,CAAC;IACN,CAAC,CAAC;CACL,CAAC,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ISubscriberOptions, RedisSubscriber } from "@golemio/core/dist/helpers/data-access/pubsub/subscribers/RedisSubscriber";
|
|
2
|
+
import { IVehiclePositionsRepository } from "../domain/repository/IVehiclePositionsRepository";
|
|
2
3
|
export declare class VPSubscriber extends RedisSubscriber {
|
|
3
4
|
private repository;
|
|
4
|
-
constructor(options: ISubscriberOptions, repository:
|
|
5
|
+
constructor(options: ISubscriberOptions, repository: IVehiclePositionsRepository);
|
|
5
6
|
initialize(): Promise<void>;
|
|
6
7
|
}
|
|
7
|
-
export interface RepositoryWithSubscriber {
|
|
8
|
-
setCurrentSetName(name: string): void;
|
|
9
|
-
}
|
|
@@ -9,7 +9,7 @@ class VPSubscriber extends RedisSubscriber_1.RedisSubscriber {
|
|
|
9
9
|
}
|
|
10
10
|
async initialize() {
|
|
11
11
|
await this.subscribe();
|
|
12
|
-
this.logger.debug(
|
|
12
|
+
this.logger.debug("Redis subscriber subscribed to channel for Public API.");
|
|
13
13
|
this.listen((message) => {
|
|
14
14
|
this.logger.debug("Redis subscriber received a message to change repository source.");
|
|
15
15
|
if (message !== undefined) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VPSubscriber.js","sourceRoot":"","sources":["../../../../src/output-gateway/public/service/VPSubscriber.ts"],"names":[],"mappings":";;;AAAA,+GAAgI;AAGhI,MAAa,YAAa,SAAQ,iCAAe;IAC7C,YAAY,OAA2B,EAAU,UAAuC;QACpF,KAAK,CAAC,OAAO,CAAC,CAAC;QAD8B,eAAU,GAAV,UAAU,CAA6B;IAExF,CAAC;IAEM,KAAK,CAAC,UAAU;QACnB,MAAM,IAAI,CAAC,SAAS,EAAE,CAAC;QAEvB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE;YACpB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YACtF,IAAI,OAAO,KAAK,SAAS,EAAE;gBACvB,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;aAC9C;QACL,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAhBD,oCAgBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-version.js","sourceRoot":"","sources":["../../../../src/output-gateway/shared/constants/route-version.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"route-version.js","sourceRoot":"","sources":["../../../../src/output-gateway/shared/constants/route-version.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,yBAAS,CAAA;IACT,yBAAS,CAAA;IACT,yBAAS,CAAA;AACb,CAAC,EAJW,YAAY,4BAAZ,YAAY,QAIvB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.JIS_METADATA_NAMESPACE_PREFIX = void 0;
|
|
4
4
|
exports.JIS_METADATA_NAMESPACE_PREFIX = "jisMetadata";
|
|
5
|
-
exports.JIS_NAMESPACE_PREFIX = "jisCache";
|
|
6
5
|
//# sourceMappingURL=const.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/redis/const.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG,aAAa,CAAC
|
|
1
|
+
{"version":3,"file":"const.js","sourceRoot":"","sources":["../../../../src/schema-definitions/jis/redis/const.ts"],"names":[],"mappings":";;;AAAa,QAAA,6BAA6B,GAAG,aAAa,CAAC"}
|