@golemio/pid 2.7.13-dev.940112441 → 2.8.0
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/12_metro_line_A_gtfs_trips.sql +0 -4
- package/dist/integration-engine/index.js +0 -2
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/queueDefinitions.js +50 -0
- package/dist/integration-engine/queueDefinitions.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/LegacyRopidGTFSWorker.d.ts +63 -0
- package/dist/integration-engine/ropid-gtfs/LegacyRopidGTFSWorker.js +541 -3
- package/dist/integration-engine/ropid-gtfs/LegacyRopidGTFSWorker.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +4 -18
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/interfaces/ICheckForNewDataInput.js.map +1 -0
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +3 -16
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.d.ts +3 -3
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +3 -21
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
- package/dist/output-gateway/pid/index.d.ts +2 -3
- package/dist/output-gateway/pid/index.js +1 -1
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/models/precomputed/interfaces/IDeparturesModel.d.ts +2 -3
- package/docs/implementation_documentation.md +37 -39
- package/docs/openapi-output.yaml +1 -1
- package/package.json +3 -3
- package/dist/helpers/AccessibilityEnums.d.ts +0 -16
- package/dist/helpers/AccessibilityEnums.js +0 -22
- package/dist/helpers/AccessibilityEnums.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/ioc/Di.d.ts +0 -3
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js +0 -29
- package/dist/integration-engine/ropid-gtfs/ioc/Di.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.d.ts +0 -8
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js +0 -12
- package/dist/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.d.ts +0 -5
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js +0 -23
- package/dist/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.d.ts +0 -12
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +0 -61
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.d.ts +0 -14
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +0 -93
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.d.ts +0 -19
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +0 -152
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.d.ts +0 -11
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +0 -57
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.d.ts +0 -21
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +0 -160
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.d.ts +0 -24
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.js +0 -36
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.d.ts +0 -12
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +0 -67
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.d.ts +0 -13
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +0 -102
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/ICheckForNewDataInput.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IDatasetsInput.d.ts +0 -4
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IDatasetsInput.js +0 -3
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/interfaces/IDatasetsInput.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CachedDatasetSchema.d.ts +0 -8
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CachedDatasetSchema.js +0 -40
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CachedDatasetSchema.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CheckForNewDataMessageValidation.d.ts +0 -4
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CheckForNewDataMessageValidation.js +0 -22
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/CheckForNewDataMessageValidation.js.map +0 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/DownloadDataInputSchema.d.ts +0 -5
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/DownloadDataInputSchema.js +0 -23
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/schema/DownloadDataInputSchema.js.map +0 -1
- /package/dist/integration-engine/ropid-gtfs/{workers/timetables/tasks/interfaces → interfaces}/ICheckForNewDataInput.d.ts +0 -0
- /package/dist/integration-engine/ropid-gtfs/{workers/timetables/tasks/interfaces → interfaces}/ICheckForNewDataInput.js +0 -0
|
@@ -1,29 +1,15 @@
|
|
|
1
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 StaticFileRedisRepository_1;
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
3
|
exports.StaticFileRedisRepository = void 0;
|
|
14
4
|
const RedisModel_1 = require("@golemio/core/dist/integration-engine/models/RedisModel");
|
|
15
|
-
|
|
16
|
-
let StaticFileRedisRepository = exports.StaticFileRedisRepository = StaticFileRedisRepository_1 = class StaticFileRedisRepository extends RedisModel_1.RedisModel {
|
|
5
|
+
class StaticFileRedisRepository extends RedisModel_1.RedisModel {
|
|
17
6
|
constructor() {
|
|
18
7
|
super("GTFSStaticFileRedisRepository", {
|
|
19
8
|
isKeyConstructedFromData: false,
|
|
20
|
-
prefix:
|
|
9
|
+
prefix: StaticFileRedisRepository.NAMESPACE_PREFIX,
|
|
21
10
|
});
|
|
22
11
|
}
|
|
23
|
-
}
|
|
12
|
+
}
|
|
13
|
+
exports.StaticFileRedisRepository = StaticFileRedisRepository;
|
|
24
14
|
StaticFileRedisRepository.NAMESPACE_PREFIX = "files:gtfsStatic";
|
|
25
|
-
exports.StaticFileRedisRepository = StaticFileRedisRepository = StaticFileRedisRepository_1 = __decorate([
|
|
26
|
-
(0, tsyringe_1.injectable)(),
|
|
27
|
-
__metadata("design:paramtypes", [])
|
|
28
|
-
], StaticFileRedisRepository);
|
|
29
15
|
//# sourceMappingURL=StaticFileRedisRepository.js.map
|
package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticFileRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StaticFileRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.ts"],"names":[],"mappings":";;;AAAA,wFAAqF;AAErF,MAAa,yBAA0B,SAAQ,uBAAU;IAGrD;QACI,KAAK,CAAC,+BAA+B,EAAE;YACnC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,yBAAyB,CAAC,gBAAgB;SACrD,CAAC,CAAC;IACP,CAAC;;AARL,8DASC;AARiB,0CAAgB,GAAG,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ICheckForNewDataInput.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/interfaces/ICheckForNewDataInput.ts"],"names":[],"mappings":""}
|
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
3
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
4
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -25,11 +16,10 @@ exports.RopidGTFSTransformation = void 0;
|
|
|
25
16
|
const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
|
|
26
17
|
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
27
18
|
const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
|
|
28
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
29
19
|
const csv_parser_1 = __importDefault(require("csv-parser"));
|
|
30
20
|
const csv_stringify_1 = __importDefault(require("csv-stringify"));
|
|
31
21
|
const stream_1 = require("stream");
|
|
32
|
-
|
|
22
|
+
class RopidGTFSTransformation extends transformations_1.BaseTransformation {
|
|
33
23
|
constructor() {
|
|
34
24
|
super();
|
|
35
25
|
this.transform = (input) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -62,9 +52,6 @@ let RopidGTFSTransformation = exports.RopidGTFSTransformation = class RopidGTFST
|
|
|
62
52
|
this.transformElement = () => { };
|
|
63
53
|
this.name = ropid_gtfs_1.RopidGTFS.name;
|
|
64
54
|
}
|
|
65
|
-
}
|
|
66
|
-
exports.RopidGTFSTransformation = RopidGTFSTransformation
|
|
67
|
-
(0, tsyringe_1.injectable)(),
|
|
68
|
-
__metadata("design:paramtypes", [])
|
|
69
|
-
], RopidGTFSTransformation);
|
|
55
|
+
}
|
|
56
|
+
exports.RopidGTFSTransformation = RopidGTFSTransformation;
|
|
70
57
|
//# sourceMappingURL=RopidGTFSTransformation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGTFSTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidGTFSTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uEAA4C;AAE5C,8EAA4D;AAC5D,2FAA4G;AAC5G,4DAA6B;AAC7B,kEAAsC;AACtC,mCAAuD;AAOvD,MAAa,uBAAwB,SAAQ,oCAAkB;IAG3D;QACI,KAAK,EAAE,CAAC;QAIL,cAAS,GAAG,CAAO,KAAmC,EAAqB,EAAE;YAChF,iEAAiE;YACjE,MAAM,4BAA4B,GAAG,MAAM,CAAC,IAAI,CAAC,sBAAS,CAAC,KAAK,CAAC,IAAuB,CAAC,CAAC,yBAAyB,CAAC;iBAC/G,MAAM,CAAC,CAAC,MAAM,EAAE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ACL,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC;QAEQ,qBAAgB,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QArClC,IAAI,CAAC,IAAI,GAAG,sBAAS,CAAC,IAAI,CAAC;IAC/B,CAAC;CAqCJ;AA3CD,0DA2CC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { IPIDDeparture, IPIDDepartureOutput } from "..";
|
|
1
2
|
export default class DepartureBoardMapper {
|
|
2
3
|
static mapDepartures(data: any, preferredTimezone: string, mode: string): any;
|
|
3
4
|
/**
|
|
4
5
|
* Initiates all routes. Should respond with correct data to a HTTP requests to all routes.
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
private static determineWheelchairAccessibility;
|
|
7
|
+
static transformResponseData: (x: IPIDDeparture, preferredTimezone: string, mode?: string) => IPIDDepartureOutput;
|
|
8
|
+
static calculateDepartureMinutes(predicted: Date | null): string | null;
|
|
9
9
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const AccessibilityEnums_1 = require("../../../helpers/AccessibilityEnums");
|
|
5
|
-
const RouteTypeEnums_1 = require("../../../helpers/RouteTypeEnums");
|
|
6
4
|
const shared_1 = require("../../shared");
|
|
7
5
|
const output_gateway_1 = require("@golemio/core/dist/output-gateway");
|
|
8
6
|
const __1 = require("..");
|
|
@@ -58,6 +56,8 @@ DepartureBoardMapper.transformResponseData = (x, preferredTimezone, mode) => {
|
|
|
58
56
|
departureTimestamp.predicted = null;
|
|
59
57
|
departureTimestamp.scheduled = null;
|
|
60
58
|
}
|
|
59
|
+
const wheelchairAccessibility = typeof x.real_wheelchair_accessible === "boolean" ? x.real_wheelchair_accessible : x.wheelchair_accessible === 1;
|
|
60
|
+
// enum 0,1,2 see GTFS specs
|
|
61
61
|
return {
|
|
62
62
|
arrival_timestamp: arrivalTimestamp,
|
|
63
63
|
delay: {
|
|
@@ -87,29 +87,11 @@ DepartureBoardMapper.transformResponseData = (x, preferredTimezone, mode) => {
|
|
|
87
87
|
id: x.trip_id,
|
|
88
88
|
is_at_stop: isAtStop,
|
|
89
89
|
is_canceled: x.is_canceled || false,
|
|
90
|
-
is_wheelchair_accessible:
|
|
90
|
+
is_wheelchair_accessible: wheelchairAccessibility,
|
|
91
91
|
is_air_conditioned: (_c = x["trip.vehicle_descriptor.is_air_conditioned"]) !== null && _c !== void 0 ? _c : null,
|
|
92
92
|
short_name: x.trip_short_name || null,
|
|
93
93
|
},
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
|
-
DepartureBoardMapper.determineWheelchairAccessibility = (departure) => {
|
|
97
|
-
const { wheelchair_accessible, wheelchair_boarding, real_wheelchair_accessible } = departure;
|
|
98
|
-
if (departure["trip.gtfs_route_type"] === RouteTypeEnums_1.GTFSRouteTypeEnum.METRO) {
|
|
99
|
-
switch (wheelchair_boarding) {
|
|
100
|
-
case AccessibilityEnums_1.GtfsStopWheelchairBoardingEnum.AccessibleStation:
|
|
101
|
-
return true;
|
|
102
|
-
case AccessibilityEnums_1.GtfsStopWheelchairBoardingEnum.InaccessibleStation:
|
|
103
|
-
case AccessibilityEnums_1.GtfsStopWheelchairBoardingEnum.NoInformation:
|
|
104
|
-
default:
|
|
105
|
-
return false;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
return typeof real_wheelchair_accessible === "boolean"
|
|
110
|
-
? real_wheelchair_accessible
|
|
111
|
-
: wheelchair_accessible === AccessibilityEnums_1.GtfsTripWheelchairAccessEnum.AccessibleVehicle;
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
96
|
exports.default = DepartureBoardMapper;
|
|
115
97
|
//# sourceMappingURL=DepartureBoardMapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DepartureBoardMapper.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/DepartureBoardMapper.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"DepartureBoardMapper.js","sourceRoot":"","sources":["../../../../src/output-gateway/pid/helpers/DepartureBoardMapper.ts"],"names":[],"mappings":";;;AAAA,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;IA6EM,MAAM,CAAC,yBAAyB,CAAC,SAAsB;QAC1D,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,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;QAEvF,IAAI,iBAAiB,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;;YAClC,OAAO,iBAAiB,CAAC,QAAQ,EAAE,CAAC;IAC7C,CAAC;;;AArFD;;GAEG;AACW,0CAAqB,GAAG,CAAC,CAAgB,EAAE,iBAAyB,EAAE,IAAa,EAAuB,EAAE;;IACtH,IAAI,QAAQ,GAAG,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,KAAK,CAAC,CAAC,uCAAuC,CAAC,CAAC,C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B"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { GTFSRouteTypeEnum } from "../../helpers/RouteTypeEnums";
|
|
2
1
|
import { DeparturesDirectionsEnum } from "../../schema-definitions/ropid-departures-directions";
|
|
3
2
|
import { IDeparturesModel } from "../../schema-definitions/ropid-gtfs/models/precomputed/interfaces/IDeparturesModel";
|
|
4
3
|
import { StatePositionEnum, StateProcessEnum } from "../../const";
|
|
5
|
-
export * from "./PIDRouter";
|
|
6
4
|
export * from "./models";
|
|
5
|
+
export * from "./PIDRouter";
|
|
7
6
|
export interface IPIDDeparture extends IDeparturesModel {
|
|
8
7
|
direction: DeparturesDirectionsEnum | null;
|
|
9
8
|
delay_seconds: number | null;
|
|
@@ -22,7 +21,7 @@ export interface IPIDDeparture extends IDeparturesModel {
|
|
|
22
21
|
"trip.gtfs_block_id": string | null;
|
|
23
22
|
"trip.gtfs_route_id": string | null;
|
|
24
23
|
"trip.gtfs_route_short_name": string | null;
|
|
25
|
-
"trip.gtfs_route_type":
|
|
24
|
+
"trip.gtfs_route_type": string | null;
|
|
26
25
|
"trip.gtfs_trip_headsign": string | null;
|
|
27
26
|
"trip.gtfs_trip_id": string | null;
|
|
28
27
|
"trip.id": string | null;
|
|
@@ -15,8 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.DepartureSkip = exports.DepartureFilter = exports.DepartureOrder = exports.DepartureMode = void 0;
|
|
18
|
-
__exportStar(require("./PIDRouter"), exports);
|
|
19
18
|
__exportStar(require("./models"), exports);
|
|
19
|
+
__exportStar(require("./PIDRouter"), exports);
|
|
20
20
|
var DepartureMode;
|
|
21
21
|
(function (DepartureMode) {
|
|
22
22
|
DepartureMode["DEPARTURES"] = "departures";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/pid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/output-gateway/pid/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,2CAAyB;AACzB,8CAA4B;AAqH5B,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,0CAAyB,CAAA;IACzB,sCAAqB,CAAA;IACrB,gCAAe,CAAA;AACnB,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACtB,+BAAa,CAAA;IACb,yCAAuB,CAAA;AAC3B,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,eAQX;AARD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,2CAAwB,CAAA;IACxB,0DAAuC,CAAA;IACvC,oDAAiC,CAAA;IACjC,mEAAgD,CAAA;IAChD,qEAAkD,CAAA;IAClD,8EAA2D,CAAA;AAC/D,CAAC,EARW,eAAe,+BAAf,eAAe,QAQ1B;AAED,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,wCAAuB,CAAA;IACvB,sCAAqB,CAAA;IACrB,mCAAkB,CAAA;IAClB,8BAA8B;AAClC,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB"}
|
package/dist/schema-definitions/ropid-gtfs/models/precomputed/interfaces/IDeparturesModel.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { GtfsStopWheelchairBoardingEnum, GtfsTripWheelchairAccessEnum } from "../../../../../helpers/AccessibilityEnums";
|
|
2
1
|
import { GTFSRouteTypeEnum } from "../../../../../helpers/RouteTypeEnums";
|
|
3
2
|
export interface IDeparturesModel {
|
|
4
3
|
stop_sequence: number;
|
|
@@ -12,13 +11,13 @@ export interface IDeparturesModel {
|
|
|
12
11
|
stop_id: string;
|
|
13
12
|
stop_name: string | null;
|
|
14
13
|
platform_code: string | null;
|
|
15
|
-
wheelchair_boarding:
|
|
14
|
+
wheelchair_boarding: number | null;
|
|
16
15
|
min_stop_sequence: number | null;
|
|
17
16
|
max_stop_sequence: number | null;
|
|
18
17
|
trip_id: string;
|
|
19
18
|
trip_headsign: string;
|
|
20
19
|
trip_short_name: string | null;
|
|
21
|
-
wheelchair_accessible:
|
|
20
|
+
wheelchair_accessible: number | null;
|
|
22
21
|
service_id: string | null;
|
|
23
22
|
date: string | null;
|
|
24
23
|
route_short_name: string | null;
|
|
@@ -367,42 +367,9 @@ Všechny tabulky se nachází ve schématu `pid`
|
|
|
367
367
|
|
|
368
368
|
### _LegacyRopidGTFSWorker_
|
|
369
369
|
|
|
370
|
-
Worker má na starost aktualizaci
|
|
370
|
+
Worker má na starost kontrolu a aktualizaci všech číselníků
|
|
371
371
|
|
|
372
|
-
####
|
|
373
|
-
|
|
374
|
-
- vstupní rabbitmq fronta
|
|
375
|
-
- název: vehicle-positions.ropidgtfs.checkForNewDeparturesPresets
|
|
376
|
-
- TTL: 4 minuty
|
|
377
|
-
- parametry: žádné
|
|
378
|
-
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
379
|
-
- název: vehicle-positions.ropidgtfs.downloadDeparturesPresets
|
|
380
|
-
- datové zdroje
|
|
381
|
-
- ROPID FTP
|
|
382
|
-
- transformace
|
|
383
|
-
- žádné
|
|
384
|
-
- data modely
|
|
385
|
-
- RopidGTFSMetadataModel `ropidgtfs_metadata`
|
|
386
|
-
|
|
387
|
-
#### _downloadDeparturesPresets()_
|
|
388
|
-
|
|
389
|
-
- vstupní rabbitmq fronta
|
|
390
|
-
- název: vehicle-positions.ropidgtfs.downloadDeparturesPresets
|
|
391
|
-
- TTL: 4 minuty
|
|
392
|
-
- parametry: žádné
|
|
393
|
-
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
394
|
-
- žádné
|
|
395
|
-
- datové zdroje
|
|
396
|
-
- ROPID FTP
|
|
397
|
-
- transformace
|
|
398
|
-
- [RopidDeparturesPresetsTransformation](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.ts)
|
|
399
|
-
- data modely
|
|
400
|
-
- RopidGTFSMetadataModel `ropidgtfs_metadata`,
|
|
401
|
-
- RopidDeparturesPresetsModel `ropid_departures_presets`
|
|
402
|
-
|
|
403
|
-
### TimetableWorker
|
|
404
|
-
|
|
405
|
-
#### task _CheckForNewData_
|
|
372
|
+
#### _checkForNewData()_
|
|
406
373
|
|
|
407
374
|
- vstupní rabbitmq fronta
|
|
408
375
|
- název: vehicle-positions.ropidgtfs.checkForNewData
|
|
@@ -417,7 +384,7 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
417
384
|
- data modely
|
|
418
385
|
- RopidGTFSMetadataModel `ropidgtfs_metadata`
|
|
419
386
|
|
|
420
|
-
####
|
|
387
|
+
#### _downloadDatasets()_
|
|
421
388
|
|
|
422
389
|
- vstupní rabbitmq fronta
|
|
423
390
|
- název: vehicle-positions.ropidgtfs.downloadDatasets
|
|
@@ -433,7 +400,7 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
433
400
|
- data modely
|
|
434
401
|
- RopidGTFSMetadataModel `ropidgtfs_metadata`
|
|
435
402
|
|
|
436
|
-
####
|
|
403
|
+
#### _transformAndSaveData()_
|
|
437
404
|
|
|
438
405
|
- vstupní rabbitmq fronta
|
|
439
406
|
- název: vehicle-positions.ropidgtfs.transformAndSaveData
|
|
@@ -463,7 +430,7 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
463
430
|
- RopidGTFSOisModel `ropidgtfs_ois`
|
|
464
431
|
- RopidGTFSRunNumbersModel `ropidgtfs_run_numbers`
|
|
465
432
|
|
|
466
|
-
####
|
|
433
|
+
#### _checkSavedRowsAndReplaceTables()_
|
|
467
434
|
|
|
468
435
|
- vstupní rabbitmq fronta
|
|
469
436
|
- název: vehicle-positions.ropidgtfs.checkSavedRowsAndReplaceTables
|
|
@@ -496,7 +463,7 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
496
463
|
- RopidGTFSPrecomputedDeparturesModel `ropidgtfs_precomputed_departures`
|
|
497
464
|
- RopidGTFSPrecomputedTripScheduleModel `ropidgtfs_precomputed_trip_schedule`
|
|
498
465
|
|
|
499
|
-
####
|
|
466
|
+
#### _refreshPrecomputedTables()_
|
|
500
467
|
|
|
501
468
|
- vstupní rabbitmq fronta
|
|
502
469
|
- název: vehicle-positions.ropidgtfs.refreshPrecomputedTables
|
|
@@ -515,6 +482,37 @@ Worker má na starost aktualizaci presets číselníků
|
|
|
515
482
|
- RopidGTFSPrecomputedDeparturesModel `ropidgtfs_precomputed_departures`
|
|
516
483
|
- RopidGTFSPrecomputedTripScheduleModel `ropidgtfs_precomputed_trip_schedule`
|
|
517
484
|
|
|
485
|
+
#### _checkForNewDeparturesPresets()_
|
|
486
|
+
|
|
487
|
+
- vstupní rabbitmq fronta
|
|
488
|
+
- název: vehicle-positions.ropidgtfs.checkForNewDeparturesPresets
|
|
489
|
+
- TTL: 4 minuty
|
|
490
|
+
- parametry: žádné
|
|
491
|
+
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
492
|
+
- název: vehicle-positions.ropidgtfs.downloadDeparturesPresets
|
|
493
|
+
- datové zdroje
|
|
494
|
+
- ROPID FTP
|
|
495
|
+
- transformace
|
|
496
|
+
- žádné
|
|
497
|
+
- data modely
|
|
498
|
+
- RopidGTFSMetadataModel `ropidgtfs_metadata`
|
|
499
|
+
|
|
500
|
+
#### _downloadDeparturesPresets()_
|
|
501
|
+
|
|
502
|
+
- vstupní rabbitmq fronta
|
|
503
|
+
- název: vehicle-positions.ropidgtfs.downloadDeparturesPresets
|
|
504
|
+
- TTL: 4 minuty
|
|
505
|
+
- parametry: žádné
|
|
506
|
+
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
507
|
+
- žádné
|
|
508
|
+
- datové zdroje
|
|
509
|
+
- ROPID FTP
|
|
510
|
+
- transformace
|
|
511
|
+
- [RopidDeparturesPresetsTransformation](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/blob/development/src/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.ts)
|
|
512
|
+
- data modely
|
|
513
|
+
- RopidGTFSMetadataModel `ropidgtfs_metadata`,
|
|
514
|
+
- RopidDeparturesPresetsModel `ropid_departures_presets`
|
|
515
|
+
|
|
518
516
|
### PresetWorker
|
|
519
517
|
|
|
520
518
|
#### _Task ~ SavePresetsDataTask_
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -1657,7 +1657,7 @@ components:
|
|
|
1657
1657
|
example: false
|
|
1658
1658
|
is_wheelchair_accessible:
|
|
1659
1659
|
type: boolean
|
|
1660
|
-
description: True if the vehicle
|
|
1660
|
+
description: True if the vehicle is wheelchair accessible.
|
|
1661
1661
|
example: false
|
|
1662
1662
|
is_air_conditioned:
|
|
1663
1663
|
type: boolean
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@golemio/pid",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.0",
|
|
4
4
|
"description": "Golemio PID Module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@commitlint/cli": "^11.0.0",
|
|
40
40
|
"@commitlint/config-conventional": "^11.0.0",
|
|
41
41
|
"@golemio/cli": "1.4.4",
|
|
42
|
-
"@golemio/core": "1.8.
|
|
42
|
+
"@golemio/core": "1.8.4",
|
|
43
43
|
"@golemio/db-common": "1.1.1",
|
|
44
44
|
"@golemio/eslint-config": "1.1.1",
|
|
45
45
|
"@types/amqplib": "^0.5.17",
|
|
@@ -86,4 +86,4 @@
|
|
|
86
86
|
"html-entities": "^2.3.3",
|
|
87
87
|
"pg-copy-streams": "^5.1.1"
|
|
88
88
|
}
|
|
89
|
-
}
|
|
89
|
+
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare enum GtfsStopWheelchairBoardingEnum {
|
|
2
|
-
/** No accessibility information for the station/stop */
|
|
3
|
-
NoInformation = 0,
|
|
4
|
-
/** Some vehicles at this station/stop can be boarded by a rider in a wheelchair */
|
|
5
|
-
AccessibleStation = 1,
|
|
6
|
-
/** Wheelchair boarding is not possible at this station/stop */
|
|
7
|
-
InaccessibleStation = 2
|
|
8
|
-
}
|
|
9
|
-
export declare enum GtfsTripWheelchairAccessEnum {
|
|
10
|
-
/** No accessibility information for the trip */
|
|
11
|
-
NoInformation = 0,
|
|
12
|
-
/** Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair */
|
|
13
|
-
AccessibleVehicle = 1,
|
|
14
|
-
/** No riders in wheelchairs can be accommodated on this trip */
|
|
15
|
-
InaccessibleVehicle = 2
|
|
16
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GtfsTripWheelchairAccessEnum = exports.GtfsStopWheelchairBoardingEnum = void 0;
|
|
4
|
-
var GtfsStopWheelchairBoardingEnum;
|
|
5
|
-
(function (GtfsStopWheelchairBoardingEnum) {
|
|
6
|
-
/** No accessibility information for the station/stop */
|
|
7
|
-
GtfsStopWheelchairBoardingEnum[GtfsStopWheelchairBoardingEnum["NoInformation"] = 0] = "NoInformation";
|
|
8
|
-
/** Some vehicles at this station/stop can be boarded by a rider in a wheelchair */
|
|
9
|
-
GtfsStopWheelchairBoardingEnum[GtfsStopWheelchairBoardingEnum["AccessibleStation"] = 1] = "AccessibleStation";
|
|
10
|
-
/** Wheelchair boarding is not possible at this station/stop */
|
|
11
|
-
GtfsStopWheelchairBoardingEnum[GtfsStopWheelchairBoardingEnum["InaccessibleStation"] = 2] = "InaccessibleStation";
|
|
12
|
-
})(GtfsStopWheelchairBoardingEnum || (exports.GtfsStopWheelchairBoardingEnum = GtfsStopWheelchairBoardingEnum = {}));
|
|
13
|
-
var GtfsTripWheelchairAccessEnum;
|
|
14
|
-
(function (GtfsTripWheelchairAccessEnum) {
|
|
15
|
-
/** No accessibility information for the trip */
|
|
16
|
-
GtfsTripWheelchairAccessEnum[GtfsTripWheelchairAccessEnum["NoInformation"] = 0] = "NoInformation";
|
|
17
|
-
/** Vehicle being used on this particular trip can accommodate at least one rider in a wheelchair */
|
|
18
|
-
GtfsTripWheelchairAccessEnum[GtfsTripWheelchairAccessEnum["AccessibleVehicle"] = 1] = "AccessibleVehicle";
|
|
19
|
-
/** No riders in wheelchairs can be accommodated on this trip */
|
|
20
|
-
GtfsTripWheelchairAccessEnum[GtfsTripWheelchairAccessEnum["InaccessibleVehicle"] = 2] = "InaccessibleVehicle";
|
|
21
|
-
})(GtfsTripWheelchairAccessEnum || (exports.GtfsTripWheelchairAccessEnum = GtfsTripWheelchairAccessEnum = {}));
|
|
22
|
-
//# sourceMappingURL=AccessibilityEnums.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AccessibilityEnums.js","sourceRoot":"","sources":["../../src/helpers/AccessibilityEnums.ts"],"names":[],"mappings":";;;AAAA,IAAY,8BASX;AATD,WAAY,8BAA8B;IACtC,wDAAwD;IACxD,qGAAiB,CAAA;IAEjB,mFAAmF;IACnF,6GAAqB,CAAA;IAErB,gEAAgE;IAChE,iHAAuB,CAAA;AAC3B,CAAC,EATW,8BAA8B,8CAA9B,8BAA8B,QASzC;AAED,IAAY,4BASX;AATD,WAAY,4BAA4B;IACpC,gDAAgD;IAChD,iGAAiB,CAAA;IAEjB,oGAAoG;IACpG,yGAAqB,CAAA;IAErB,gEAAgE;IAChE,6GAAuB,CAAA;AAC3B,CAAC,EATW,4BAA4B,4CAA5B,4BAA4B,QASvC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RopidGtfsContainer = void 0;
|
|
4
|
-
const Di_1 = require("../../ioc/Di");
|
|
5
|
-
const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
|
|
6
|
-
const pubsub_1 = require("@golemio/core/dist/integration-engine/data-access/pubsub");
|
|
7
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
8
|
-
const StaticFileRedisRepository_1 = require("../data-access/cache/StaticFileRedisRepository");
|
|
9
|
-
const RopidGTFSTransformation_1 = require("../transformations/RopidGTFSTransformation");
|
|
10
|
-
const PrecomputedTablesFacade_1 = require("../workers/timetables/tasks/helpers/PrecomputedTablesFacade");
|
|
11
|
-
const RopidGtfsFactory_1 = require("../workers/timetables/tasks/helpers/RopidGtfsFactory");
|
|
12
|
-
const RopidGtfsContainerToken_1 = require("./RopidGtfsContainerToken");
|
|
13
|
-
//#region Initialization
|
|
14
|
-
const RopidGtfsContainer = Di_1.PidContainer.createChildContainer();
|
|
15
|
-
exports.RopidGtfsContainer = RopidGtfsContainer;
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region Datasources
|
|
18
|
-
//#endregion
|
|
19
|
-
//#region Repositories
|
|
20
|
-
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.StaticFileRedisRepository, StaticFileRedisRepository_1.StaticFileRedisRepository);
|
|
21
|
-
//#endregion
|
|
22
|
-
//#region Transformations
|
|
23
|
-
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGTFSTransformation, RopidGTFSTransformation_1.RopidGTFSTransformation);
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region Facade
|
|
26
|
-
RopidGtfsContainer.registerSingleton(RopidGtfsContainerToken_1.RopidGtfsContainerToken.PrecomputedTablesFacade, PrecomputedTablesFacade_1.PrecomputedTablesFacade)
|
|
27
|
-
.register(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory, RopidGtfsFactory_1.RopidGtfsFactory, { lifecycle: tsyringe_1.Lifecycle.Transient })
|
|
28
|
-
.registerInstance(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RedisPubSubChannel, new pubsub_1.RedisPubSubChannel(ropid_gtfs_1.RopidGTFS.name));
|
|
29
|
-
//# sourceMappingURL=Di.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,qCAA0C;AAC1C,uEAA4C;AAC5C,qFAA8F;AAC9F,iEAAoF;AACpF,8FAA2F;AAC3F,wFAAqF;AACrF,yGAAsG;AACtG,2FAAwF;AACxF,uEAAoE;AAEpE,wBAAwB;AACxB,MAAM,kBAAkB,GAAwB,iBAAY,CAAC,oBAAoB,EAAE,CAAC;AAqB3E,gDAAkB;AApB3B,YAAY;AAEZ,qBAAqB;AAErB,YAAY;AAEZ,sBAAsB;AACtB,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,yBAAyB,EAAE,qDAAyB,CAAC,CAAC;AACnH,YAAY;AAEZ,yBAAyB;AACzB,kBAAkB,CAAC,iBAAiB,CAAC,iDAAuB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC,CAAC;AAC/G,YAAY;AAEZ,gBAAgB;AAChB,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"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RopidGtfsContainerToken = void 0;
|
|
4
|
-
const RopidGtfsContainerToken = {
|
|
5
|
-
PrecomputedTablesFacade: Symbol(),
|
|
6
|
-
StaticFileRedisRepository: Symbol(),
|
|
7
|
-
RopidGTFSTransformation: Symbol(),
|
|
8
|
-
RopidGtfsFactory: Symbol(),
|
|
9
|
-
RedisPubSubChannel: Symbol(),
|
|
10
|
-
};
|
|
11
|
-
exports.RopidGtfsContainerToken = RopidGtfsContainerToken;
|
|
12
|
-
//# sourceMappingURL=RopidGtfsContainerToken.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGtfsContainerToken.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/ioc/RopidGtfsContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,uBAAuB,GAAG;IAC5B,uBAAuB,EAAE,MAAM,EAAE;IACjC,yBAAyB,EAAE,MAAM,EAAE;IACnC,uBAAuB,EAAE,MAAM,EAAE;IACjC,gBAAgB,EAAE,MAAM,EAAE;IAC1B,kBAAkB,EAAE,MAAM,EAAE;CAC/B,CAAC;AAEO,0DAAuB"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimetableWorker = void 0;
|
|
4
|
-
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
|
|
5
|
-
const CheckForNewDataTask_1 = require("./tasks/CheckForNewDataTask");
|
|
6
|
-
const CheckSavedRowsAndReplaceTablesTask_1 = require("./tasks/CheckSavedRowsAndReplaceTablesTask");
|
|
7
|
-
const DownloadDatasetsTask_1 = require("./tasks/DownloadDatasetsTask");
|
|
8
|
-
const RefreshPrecomputedTablesTask_1 = require("./tasks/RefreshPrecomputedTablesTask");
|
|
9
|
-
const TransformAndSaveDataTask_1 = require("./tasks/TransformAndSaveDataTask");
|
|
10
|
-
class TimetableWorker extends workers_1.AbstractWorker {
|
|
11
|
-
constructor() {
|
|
12
|
-
super();
|
|
13
|
-
this.name = "ropidgtfs";
|
|
14
|
-
// Register tasks
|
|
15
|
-
this.registerTask(new CheckForNewDataTask_1.CheckForNewDataTask(this.getQueuePrefix()));
|
|
16
|
-
this.registerTask(new CheckSavedRowsAndReplaceTablesTask_1.CheckSavedRowsAndReplaceTablesTask(this.getQueuePrefix()));
|
|
17
|
-
this.registerTask(new DownloadDatasetsTask_1.DownloadDatasetsTask(this.getQueuePrefix()));
|
|
18
|
-
this.registerTask(new RefreshPrecomputedTablesTask_1.RefreshPrecomputedTablesTask(this.getQueuePrefix()));
|
|
19
|
-
this.registerTask(new TransformAndSaveDataTask_1.TransformAndSaveDataTask(this.getQueuePrefix()));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
exports.TimetableWorker = TimetableWorker;
|
|
23
|
-
//# sourceMappingURL=TimetableWorker.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TimetableWorker.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/workers/timetables/TimetableWorker.ts"],"names":[],"mappings":";;;AAAA,2EAA+E;AAC/E,qEAAkE;AAClE,mGAAgG;AAChG,uEAAoE;AACpE,uFAAoF;AACpF,+EAA4E;AAE5E,MAAa,eAAgB,SAAQ,wBAAc;IAG/C;QACI,KAAK,EAAE,CAAC;QAHF,SAAI,GAAG,WAAW,CAAC;QAKzB,iBAAiB;QACjB,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;CACJ;AAbD,0CAaC"}
|
package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ICheckForNewDataInput } from "./interfaces/ICheckForNewDataInput";
|
|
2
|
-
import { AbstractTask } from "@golemio/core/dist/integration-engine/workers";
|
|
3
|
-
import { CheckForNewDataMessageValidation } from "./schema/CheckForNewDataMessageValidation";
|
|
4
|
-
export declare class CheckForNewDataTask extends AbstractTask<ICheckForNewDataInput> {
|
|
5
|
-
readonly queueName = "checkForNewData";
|
|
6
|
-
readonly queueTtl: number;
|
|
7
|
-
readonly schema: typeof CheckForNewDataMessageValidation;
|
|
8
|
-
private logger;
|
|
9
|
-
private metaModel;
|
|
10
|
-
constructor(queuePrefix: string);
|
|
11
|
-
protected execute(data: ICheckForNewDataInput): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.CheckForNewDataTask = void 0;
|
|
13
|
-
const ModuleContainerToken_1 = require("../../../../ioc/ModuleContainerToken");
|
|
14
|
-
const Di_1 = require("../../../ioc/Di");
|
|
15
|
-
const RopidGtfsContainerToken_1 = require("../../../ioc/RopidGtfsContainerToken");
|
|
16
|
-
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
17
|
-
const integration_engine_1 = require("@golemio/core/dist/integration-engine");
|
|
18
|
-
const workers_1 = require("@golemio/core/dist/integration-engine/workers");
|
|
19
|
-
const CheckForNewDataMessageValidation_1 = require("./schema/CheckForNewDataMessageValidation");
|
|
20
|
-
class CheckForNewDataTask extends workers_1.AbstractTask {
|
|
21
|
-
constructor(queuePrefix) {
|
|
22
|
-
super(queuePrefix);
|
|
23
|
-
this.queueName = "checkForNewData";
|
|
24
|
-
this.queueTtl = 19 * 60 * 1000; // 19 minutes
|
|
25
|
-
this.schema = CheckForNewDataMessageValidation_1.CheckForNewDataMessageValidation;
|
|
26
|
-
this.logger = Di_1.RopidGtfsContainer.resolve(CoreToken_1.CoreToken.Logger);
|
|
27
|
-
// MetaData Model
|
|
28
|
-
this.metaModel = Di_1.RopidGtfsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.RopidGTFSMetadataModel);
|
|
29
|
-
}
|
|
30
|
-
execute(data) {
|
|
31
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
let forceRefresh = !!data.forceRefresh;
|
|
33
|
-
const datasets = [];
|
|
34
|
-
const ropidGtfsFactory = Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory);
|
|
35
|
-
const datasetMap = ropidGtfsFactory.getDatasetMap();
|
|
36
|
-
for (const dataset of Object.keys(datasetMap)) {
|
|
37
|
-
const serverLastModified = yield datasetMap[dataset].datasource.getLastModified();
|
|
38
|
-
const dbLastModified = yield this.metaModel.getLastModified(dataset);
|
|
39
|
-
const isDeployed = yield this.metaModel.isDeployed(dataset);
|
|
40
|
-
if (serverLastModified !== dbLastModified.lastModified || !isDeployed) {
|
|
41
|
-
datasets.push(dataset);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
if (datasets.length && datasets.length !== Object.keys(datasetMap).length) {
|
|
45
|
-
this.logger.error(`RopidGTFS datasets are out of sync`);
|
|
46
|
-
}
|
|
47
|
-
if (datasets.length) {
|
|
48
|
-
yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "downloadDatasets", {
|
|
49
|
-
datasets: datasets,
|
|
50
|
-
});
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
this.logger.info("RopidGTFS datasets are up to date");
|
|
54
|
-
if (forceRefresh) {
|
|
55
|
-
yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPrecomputedTables", {});
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.CheckForNewDataTask = CheckForNewDataTask;
|
|
61
|
-
//# sourceMappingURL=CheckForNewDataTask.js.map
|
package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CheckForNewDataTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAAoE;AAEpE,wCAA2D;AAC3D,kFAAqF;AAErF,wEAAqE;AAErE,8EAAqE;AACrE,2EAA6E;AAI7E,gGAA6F;AAE7F,MAAa,mBAAoB,SAAQ,sBAAmC;IAQxE,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QARP,cAAS,GAAG,iBAAiB,CAAC;QAC9B,aAAQ,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QACxC,WAAM,GAAG,mEAAgC,CAAC;QAOtD,IAAI,CAAC,MAAM,GAAG,uBAAkB,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QACpE,iBAAiB;QACjB,IAA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