@golemio/pid 3.5.2-dev.1636445607 → 3.5.2-rc.1637873076
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/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js +1 -2
- package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +5 -6
- 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/helpers/RawQueryProvider.d.ts +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/RawQueryProvider.js +165 -101
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/RawQueryProvider.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +1 -1
- package/dist/output-gateway/pid/index.d.ts +5 -4
- package/dist/output-gateway/pid/index.js +0 -1
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.js +0 -4
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +0 -2
- package/dist/output-gateway/pid/ioc/OgPidToken.js +0 -2
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +28 -14
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +72 -192
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +15 -26
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/SkipHelper.d.ts +0 -11
- package/dist/output-gateway/pid/models/helpers/SkipHelper.js +0 -91
- package/dist/output-gateway/pid/models/helpers/SkipHelper.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +0 -3
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +0 -2
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +2 -4
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +68 -90
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
- package/dist/output-gateway/public/domain/repository/IVehiclePositionsRepository.d.ts +1 -2
- package/dist/output-gateway/shared/constants/validations.js +1 -1
- package/dist/output-gateway/shared/constants/validations.js.map +1 -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/docs/openapi-output.yaml +2 -10
- package/package.json +2 -2
- package/db/migrations/postgresql/20250103092631-skip-missing.js +0 -53
- package/db/migrations/postgresql/20250109122504-braking-down-mapping-queries.js +0 -53
- package/db/migrations/postgresql/sqls/20250103092631-skip-missing-down.sql +0 -184
- package/db/migrations/postgresql/sqls/20250103092631-skip-missing-up.sql +0 -195
- package/db/migrations/postgresql/sqls/20250109122504-braking-down-mapping-queries-down.sql +0 -12
- package/db/migrations/postgresql/sqls/20250109122504-braking-down-mapping-queries-up.sql +0 -139
- package/dist/output-gateway/pid/domain/DepartureInterfaces.d.ts +0 -7
- package/dist/output-gateway/pid/domain/DepartureInterfaces.js +0 -3
- package/dist/output-gateway/pid/domain/DepartureInterfaces.js.map +0 -1
- package/dist/output-gateway/pid/models/helpers/const.d.ts +0 -4
- package/dist/output-gateway/pid/models/helpers/const.js +0 -8
- package/dist/output-gateway/pid/models/helpers/const.js.map +0 -1
- package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.d.ts +0 -21
- package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js +0 -3
- package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js.map +0 -1
- package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.d.ts +0 -10
- package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js +0 -65
- package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js.map +0 -1
- package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.d.ts +0 -4
- package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js +0 -3
- package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js.map +0 -1
|
@@ -1,65 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.RunTripsRedisRepository = void 0;
|
|
16
|
-
const const_1 = require("../../../../schema-definitions/ropid-gtfs/redis/const");
|
|
17
|
-
const IoRedisConnector_1 = require("@golemio/core/dist/helpers/data-access/redis/IoRedisConnector");
|
|
18
|
-
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
19
|
-
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
20
|
-
const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
|
|
21
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
22
|
-
let RunTripsRedisRepository = exports.RunTripsRedisRepository = class RunTripsRedisRepository {
|
|
23
|
-
constructor(redisConnector, log) {
|
|
24
|
-
this.redisConnector = redisConnector;
|
|
25
|
-
this.log = log;
|
|
26
|
-
}
|
|
27
|
-
async getMultipleSchedule(runTuples) {
|
|
28
|
-
if (!runTuples.length) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
if (!this.redisConnector.isConnected()) {
|
|
32
|
-
await this.redisConnector.connect();
|
|
33
|
-
}
|
|
34
|
-
const connection = this.redisConnector.getConnection();
|
|
35
|
-
let runTripCache = [];
|
|
36
|
-
try {
|
|
37
|
-
runTripCache = await connection.mget(runTuples.map((runTuple) => `${const_1.GTFS_RUN_SCHEDULE_NAMESPACE_PREFIX}:${runTuple}`));
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
throw new golemio_errors_1.GeneralError("Cannot get run trips from cache", this.constructor.name, error);
|
|
41
|
-
}
|
|
42
|
-
let gtfsRunTripDtos = [];
|
|
43
|
-
for (const cache of runTripCache) {
|
|
44
|
-
if (cache === null) {
|
|
45
|
-
this.log.info(`${this.constructor.name}: Cannot find run trip cache`);
|
|
46
|
-
gtfsRunTripDtos.push(null);
|
|
47
|
-
continue;
|
|
48
|
-
}
|
|
49
|
-
try {
|
|
50
|
-
gtfsRunTripDtos.push(JSON.parse(cache));
|
|
51
|
-
}
|
|
52
|
-
catch (error) {
|
|
53
|
-
throw new golemio_errors_1.GeneralError("Cannot parse run trip cache", this.constructor.name, error);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
return gtfsRunTripDtos;
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
exports.RunTripsRedisRepository = RunTripsRedisRepository = __decorate([
|
|
60
|
-
(0, tsyringe_1.injectable)(),
|
|
61
|
-
__param(0, (0, tsyringe_1.inject)(ioc_1.ContainerToken.RedisConnector)),
|
|
62
|
-
__param(1, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
|
|
63
|
-
__metadata("design:paramtypes", [IoRedisConnector_1.IoRedisConnector, Object])
|
|
64
|
-
], RunTripsRedisRepository);
|
|
65
|
-
//# sourceMappingURL=RunTripsRedisRepository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RunTripsRedisRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iFAAiF;AAEjF,oGAAiG;AACjG,wEAAqE;AAErE,+DAAuE;AACvE,6EAAwE;AACxE,iEAAwE;AAGjE,IAAM,uBAAuB,qCAA7B,MAAM,uBAAuB;IAChC,YACmD,cAAgC,EAC7C,GAAY;QADC,mBAAc,GAAd,cAAc,CAAkB;QAC7C,QAAG,GAAH,GAAG,CAAS;IAC/C,CAAC;IAEG,KAAK,CAAC,mBAAmB,CAAC,SAAmB;QAChD,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;YACnB,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,YAAY,GAAyB,EAAE,CAAC;QAE5C,IAAI;YACA,YAAY,GAAG,MAAM,UAAU,CAAC,IAAI,CAChC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAG,0CAAkC,IAAI,QAAQ,EAAE,CAAC,CACnF,CAAC;SACL;QAAC,OAAO,KAAK,EAAE;YACZ,MAAM,IAAI,6BAAY,CAAC,iCAAiC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SAC3F;QAED,IAAI,eAAe,GAAuC,EAAE,CAAC;QAC7D,KAAK,MAAM,KAAK,IAAI,YAAY,EAAE;YAC9B,IAAI,KAAK,KAAK,IAAI,EAAE;gBAChB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,8BAA8B,CAAC,CAAC;gBACtE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC3B,SAAS;aACZ;YAED,IAAI;gBACA,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;aAC3C;YAAC,OAAO,KAAK,EAAE;gBACZ,MAAM,IAAI,6BAAY,CAAC,6BAA6B,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACvF;SACJ;QAED,OAAO,eAAe,CAAC;IAC3B,CAAC;CACJ,CAAA;kCA3CY,uBAAuB;IADnC,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,uBAAuB,CA2CnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IRunTripsRedisRepository.js","sourceRoot":"","sources":["../../../../../src/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.ts"],"names":[],"mappings":""}
|