@golemio/pid 5.4.3 → 5.4.4-dev.2288959879

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.
Files changed (63) hide show
  1. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +1 -1
  2. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
  3. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.d.ts +3 -7
  4. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js +3 -9
  5. package/dist/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.js.map +1 -1
  6. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.d.ts +3 -8
  7. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +19 -26
  8. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
  9. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.d.ts +3 -7
  10. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +5 -14
  11. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
  12. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.d.ts +3 -4
  13. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +6 -6
  14. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
  15. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +1 -1
  16. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
  17. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.d.ts +3 -5
  18. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +3 -13
  19. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
  20. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/interfaces/IPresetLogTransformation.d.ts +2 -4
  21. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.d.ts +15 -3
  22. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.js.map +1 -1
  23. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.d.ts +1 -1
  24. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +13 -4
  25. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
  26. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.d.ts +4 -4
  27. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +9 -15
  28. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
  29. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +1 -1
  30. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
  31. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.d.ts +3 -3
  32. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +4 -8
  33. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
  34. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +1 -1
  35. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
  36. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +1 -1
  37. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
  38. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +1 -1
  39. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
  40. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +1 -1
  41. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
  42. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.d.ts +5 -7
  43. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +11 -10
  44. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
  45. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.d.ts +3 -4
  46. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +3 -4
  47. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
  48. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessagesTransformation.d.ts +4 -4
  49. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessagesTransformation.js +6 -10
  50. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessagesTransformation.js.map +1 -1
  51. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +1 -1
  52. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
  53. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.d.ts +3 -4
  54. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +3 -13
  55. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
  56. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -1
  57. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
  58. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +1 -1
  59. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
  60. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.d.ts +4 -7
  61. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +20 -27
  62. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
  63. package/package.json +1 -1
@@ -43,7 +43,7 @@ let DeparturePresetsFacade = class DeparturePresetsFacade {
43
43
  value: lastModified,
44
44
  version: dbLastModified.version + 1,
45
45
  });
46
- const transformedData = await this.transformationDeparturesPresets.transform(data);
46
+ const transformedData = this.transformationDeparturesPresets.transformArray(data);
47
47
  await this.metadataRepository.save({
48
48
  dataset: DatasetEnum_1.DatasetEnum.DEPARTURES_PRESETS,
49
49
  key: "departuresPresets",
@@ -1 +1 @@
1
- {"version":3,"file":"DeparturePresetsFacade.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oEAAyD;AACzD,yEAAoE;AACpE,0IAAqI;AACrI,wEAAoG;AAKpG,6FAA0F;AAC1F,iEAAwE;AACxE,gEAA6D;AAC7D,gFAA6E;AAC7E,0FAAuF;AACvF,wDAAqD;AACrD,4EAAyE;AACzE,kHAA+G;AAGxG,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC/B,YACyE,kBAA+C,EACvD,mBAAwC,EACpC,0BAAsD,EAE/G,8CAA8F,EAE9F,+BAAqE,EACtC,MAAe;QAPe,uBAAkB,GAAlB,kBAAkB,CAA6B;QACvD,wB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}
1
+ {"version":3,"file":"DeparturePresetsFacade.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oEAAyD;AACzD,yEAAoE;AACpE,0IAAqI;AACrI,wEAAoG;AAKpG,6FAA0F;AAC1F,iEAAwE;AACxE,gEAA6D;AAC7D,gFAA6E;AAC7E,0FAAuF;AACvF,wDAAqD;AACrD,4EAAyE;AACzE,kHAA+G;AAGxG,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IAC/B,YACyE,kBAA+C,EACvD,mBAAwC,EACpC,0BAAsD,EAE/G,8CAA8F,EAE9F,+BAAqE,EACtC,MAAe;QAPe,uBAAkB,GAAlB,kBAAkB,CAA6B;QACvD,wBAAmB,GAAnB,mBAAmB,CAAqB;QACpC,+BAA0B,GAA1B,0BAA0B,CAA4B;QAE/G,mDAA8C,GAA9C,8CAA8C,CAAgD;QAE9F,oCAA+B,GAA/B,+BAA+B,CAAsC;QACtC,WAAM,GAAN,MAAM,CAAS;IACvD,CAAC;IAEG,KAAK,CAAC,yBAAyB,CAAC,IAA8B,EAAE,YAAoB;QACvF,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,yBAAW,CAAC,kBAAkB,CAAC,CAAC;QACrG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC/B,OAAO,EAAE,yBAAW,CAAC,kBAAkB;YACvC,GAAG,EAAE,2CAAsB,CAAC,aAAa;YACzC,IAAI,EAAE,iCAAY,CAAC,YAAY;YAC/B,KAAK,EAAE,YAAY;YACnB,OAAO,EAAE,cAAc,CAAC,OAAO,GAAG,CAAC;SACtC,CAAC,CAAC;QAEH,MAAM,eAAe,GAAG,IAAI,CAAC,+BAA+B,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAElF,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC/B,OAA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IAAA,iBAAM,EAAC,iDAAuB,CAAC,2BAA2B,CAAC,CAAA;IAC3D,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,0BAA0B,CAAC,CAAA;IACvD,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,8CAA8C,CAAC,CAAA;IAE9E,WAAA,IAAA,iBAAM,EAAC,2CAAoB,CAAC,oCAAoC,CAAC,CAAA;IAEjE,WAAA,IAAA,iBAAM,EAAC,+BAAc,CAAC,MAAM,CAAC,CAAA;qCAP2D,yDAA2B;QAClC,yCAAmB;QACR,uDAA0B;QAE/D,+FAA8C;QAE7D,2EAAoC;GARxE,sBAAsB,CAqFlC"}
@@ -1,11 +1,7 @@
1
1
  import { IRopidDeparturesPreset, IRopidDeparturesPresetsOutput } from "../../../schema-definitions/ropid-departures-presets";
2
- import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
3
- export declare class RopidDeparturesPresetsTransformation extends BaseTransformation implements ITransformation {
2
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
3
+ export declare class RopidDeparturesPresetsTransformation extends AbstractTransformation<IRopidDeparturesPreset, IRopidDeparturesPresetsOutput> {
4
4
  name: string;
5
5
  constructor();
6
- /**
7
- * Overrides BaseTransformation::transform
8
- */
9
- transform: (data: IRopidDeparturesPreset[]) => Promise<IRopidDeparturesPresetsOutput[]>;
10
- protected transformElement: (element: IRopidDeparturesPreset) => IRopidDeparturesPresetsOutput;
6
+ protected transformInternal: (element: IRopidDeparturesPreset) => IRopidDeparturesPresetsOutput;
11
7
  }
@@ -2,17 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RopidDeparturesPresetsTransformation = void 0;
4
4
  const ropid_departures_presets_1 = require("../../../schema-definitions/ropid-departures-presets");
5
- const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
6
- class RopidDeparturesPresetsTransformation extends transformations_1.BaseTransformation {
5
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
6
+ class RopidDeparturesPresetsTransformation extends AbstractTransformation_1.AbstractTransformation {
7
7
  constructor() {
8
8
  super();
9
- /**
10
- * Overrides BaseTransformation::transform
11
- */
12
- this.transform = (data) => {
13
- return Promise.resolve(data.map((element) => this.transformElement(element)));
14
- };
15
- this.transformElement = (element) => {
9
+ this.transformInternal = (element) => {
16
10
  return {
17
11
  route_name: element.routeName,
18
12
  api_version: element.apiVersion,
@@ -1 +1 @@
1
- {"version":3,"file":"RopidDeparturesPresetsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.ts"],"names":[],"mappings":";;;AAAA,mGAA8H;AAC9H,2FAA4G;AAE5G,MAAa,oCAAqC,SAAQ,oCAAkB;IAGxE;QACI,KAAK,EAAE,CAAC;QAIZ;;WAEG;QACI,cAAS,GAAG,CAAC,IAA8B,EAA4C,EAAE;YAC5F,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAClF,CAAC,CAAC;QAEQ,qBAAgB,GAAG,CAAC,OAA+B,EAAiC,EAAE;YAC5F,OAAO;gBACH,UAAU,EAAE,OAAO,CAAC,SAAS;gBAC7B,WAAW,EAAE,OAAO,CAAC,UAAU;gBAC/B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,gBAAgB,EAAE,IAAI,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;gBAC/D,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,UAAU,EAAE,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;aACxE,CAAC;QACN,CAAC,CAAC;QAnBE,IAAI,CAAC,IAAI,GAAG,iDAAsB,CAAC,IAAI,CAAC;IAC5C,CAAC;CAmBJ;AAzBD,oFAyBC"}
1
+ {"version":3,"file":"RopidDeparturesPresetsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidDeparturesPresetsTransformation.ts"],"names":[],"mappings":";;;AAAA,mGAA8H;AAC9H,6GAA0G;AAG1G,MAAa,oCAAqC,SAAQ,+CAGzD;IAGG;QACI,KAAK,EAAE,CAAC;QAIF,sBAAiB,GAAG,CAAC,OAA+B,EAAiC,EAAE;YAC7F,OAAO;gBACH,UAAU,EAAE,OAAO,CAAC,SAAS;gBAC7B,WAAW,EAAE,OAAO,CAAC,UAAU;gBAC/B,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,gBAAgB,EAAE,IAAI,eAAe,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;gBAC/D,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,UAAU,EAAE,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC;aACxE,CAAC;QACN,CAAC,CAAC;QAZE,IAAI,CAAC,IAAI,GAAG,iDAAsB,CAAC,IAAI,CAAC;IAC5C,CAAC;CAYJ;AArBD,oFAqBC"}
@@ -1,6 +1,6 @@
1
- import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
2
1
  import { IRopidGTFSCisStopsData, IRopidGTFSCisStopsInputData } from "../../../schema-definitions/ropid-gtfs/RopidGTFSCisStops";
3
2
  import { IRopidGTFSCisStopGroupsData, IRopidGTFSCisStopGroupsInputData } from "../../../schema-definitions/ropid-gtfs/RopidGTFSCisStopGroups";
3
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
4
4
  export interface ICisStopsTransformationData {
5
5
  data: IInputDataset[];
6
6
  name: string;
@@ -12,14 +12,9 @@ export interface ICisStopsTransformedData {
12
12
  cis_stop_groups: IRopidGTFSCisStopGroupsData[];
13
13
  cis_stops: IRopidGTFSCisStopsData[];
14
14
  }
15
- export declare class RopidGTFSCisStopsTransformation extends BaseTransformation implements ITransformation {
15
+ export declare class RopidGTFSCisStopsTransformation extends AbstractTransformation<ICisStopsTransformationData, ICisStopsTransformedData> {
16
16
  name: string;
17
- constructor();
18
- /**
19
- * Overrides BaseTransformation::transform
20
- */
21
- transform: ({ data }: ICisStopsTransformationData) => Promise<ICisStopsTransformedData>;
22
- protected transformElement: () => Promise<any>;
17
+ protected transformInternal: ({ data }: ICisStopsTransformationData) => ICisStopsTransformedData;
23
18
  private getUniqueStopGroups;
24
19
  }
25
20
  export {};
@@ -1,23 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RopidGTFSCisStopsTransformation = void 0;
4
- const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
5
4
  const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
6
5
  const helpers_1 = require("@golemio/core/dist/integration-engine/helpers");
7
- class RopidGTFSCisStopsTransformation extends transformations_1.BaseTransformation {
6
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
7
+ class RopidGTFSCisStopsTransformation extends AbstractTransformation_1.AbstractTransformation {
8
8
  constructor() {
9
- super();
10
- /**
11
- * Overrides BaseTransformation::transform
12
- */
13
- this.transform = async ({ data }) => {
14
- const res = {
15
- cis_stop_groups: [],
16
- cis_stops: [],
17
- };
18
- const promises = data.map(async (stopGroup) => {
19
- const promisesStops = stopGroup.stops.map((stop) => {
20
- return {
9
+ super(...arguments);
10
+ this.name = ropid_gtfs_1.RopidGTFS.name + "CisStops";
11
+ this.transformInternal = ({ data }) => {
12
+ const cis_stops = [];
13
+ const stopGroups = [];
14
+ for (const stopGroup of data) {
15
+ for (const stop of stopGroup.stops) {
16
+ cis_stops.push({
21
17
  alt_idos_name: stop.altIdosName,
22
18
  cis: stopGroup.cis,
23
19
  id: stop.id,
@@ -28,10 +24,9 @@ class RopidGTFSCisStopsTransformation extends transformations_1.BaseTransformati
28
24
  platform: stop.platform,
29
25
  wheelchair_access: stop.wheelchairAccess,
30
26
  zone: stop.zone,
31
- };
32
- });
33
- res.cis_stops.push(...(await Promise.all(promisesStops)));
34
- return {
27
+ });
28
+ }
29
+ stopGroups.push({
35
30
  avg_jtsk_x: stopGroup.avgJtskX,
36
31
  avg_jtsk_y: stopGroup.avgJtskY,
37
32
  avg_lat: stopGroup.avgLat,
@@ -45,15 +40,14 @@ class RopidGTFSCisStopsTransformation extends transformations_1.BaseTransformati
45
40
  name: stopGroup.name,
46
41
  node: stopGroup.node,
47
42
  unique_name: stopGroup.uniqueName,
48
- };
49
- });
50
- res.cis_stop_groups = this.getUniqueStopGroups(await Promise.all(promises));
51
- return res;
43
+ });
44
+ }
45
+ return {
46
+ cis_stops,
47
+ cis_stop_groups: this.getUniqueStopGroups(stopGroups),
48
+ };
52
49
  };
53
- this.transformElement = async () => { };
54
50
  this.getUniqueStopGroups = (data) => {
55
- // duplicity checking
56
- // TODO is it ok if all duplicate items are removed?
57
51
  const uniqueMap = new Map();
58
52
  const duplicateCisStopGroups = [];
59
53
  data.forEach((item) => {
@@ -71,7 +65,6 @@ class RopidGTFSCisStopsTransformation extends transformations_1.BaseTransformati
71
65
  }
72
66
  return [...uniqueMap.values()];
73
67
  };
74
- this.name = ropid_gtfs_1.RopidGTFS.name + "CisStops";
75
68
  }
76
69
  }
77
70
  exports.RopidGTFSCisStopsTransformation = RopidGTFSCisStopsTransformation;
@@ -1 +1 @@
1
- {"version":3,"file":"RopidGTFSCisStopsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.ts"],"names":[],"mappings":";;;AAAA,2FAA4G;AAC5G,uEAA4C;AAC5C,2EAAoE;AAkBpE,MAAa,+BAAgC,SAAQ,oCAAkB;IAGnE;QACI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C,IAAI,GAAG,sBAAS,CAAC,IAAI,GAAG,UAAU,CAAC;IAC5C,CAAC;CAwEJ;AA9ED,0EA8EC"}
1
+ {"version":3,"file":"RopidGTFSCisStopsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.ts"],"names":[],"mappings":";;;AAAA,uEAA4C;AAC5C,2EAAoE;AAGpE,6GAA0G;AAgB1G,MAAa,+BAAgC,SAAQ,+CAGpD;IAHD;;QAIW,SAAI,GAAG,sBAAS,CAAC,IAAI,GAAG,UAAU,CAAC;QAEhC,sBAAiB,GAAG,CAAC,EAAE,IAAI,EAA+B,EAA4B,EAAE;YAC9F,MAAM,SAAS,GAA6B,EAAE,CAAC;YAC/C,MAAM,UAAU,GAAkC,EAAE,CAAC;YAErD,KAAK,MAAM,SAAS,IAAI,IAAI,EAAE,CAAC;gBAC3B,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,KAAK,EAAE,CAAC;oBACjC,SAAS,CAAC,IAAI,CAAC;wBACX,aAAa,EAAE,IAAI,CAAC,WAAW;wBAC/B,GAAG,EAAE,SAAS,CAAC,GAAG;wBAClB,EAAE,EAAE,IAAI,CAAC,EAAE;wBACX,MAAM,EAAE,IAAI,CAAC,KAAK;wBAClB,MAAM,EAAE,IAAI,CAAC,KAAK;wBAClB,GAAG,EAAE,IAAI,CAAC,GAAG;wBACb,GAAG,EAAE,IAAI,CAAC,GAAG;wBACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;wBACvB,iBAAiB,EAAE,IAAI,CAAC,gBAAgB;wBACxC,IAAI,EAAE,IAAI,CAAC,IAAI;qBAClB,CAAC,CAAC;gBACP,CAAC;gBAED,UAAU,CAAC,IAAI,CAAC;oBACZ,UAAU,EAAE,SAAS,CAAC,QAAQ;oBAC9B,UAAU,EAAE,SAAS,CAAC,QAAQ;oBAC9B,OAAO,EAAE,SAAS,CAAC,MAAM;oBACzB,OAAO,EAAE,SAAS,CAAC,MA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C;QACnC,CAAC,CAAC;IACN,CAAC;CAAA;AAvED,0EAuEC"}
@@ -1,15 +1,11 @@
1
- import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
2
1
  import { IRopidGTFSOisMappingInputData, IRopidGTFSOisMappingData } from "../../../schema-definitions/ropid-gtfs/RopidGTFSOisMapping";
2
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
3
3
  export interface IOisMappingTransformationData {
4
4
  data: IRopidGTFSOisMappingInputData[];
5
5
  name: string;
6
6
  }
7
- export declare class RopidGTFSOisMappingTransformation extends BaseTransformation implements ITransformation {
7
+ export declare class RopidGTFSOisMappingTransformation extends AbstractTransformation<IOisMappingTransformationData, IRopidGTFSOisMappingData[]> {
8
8
  name: string;
9
9
  constructor();
10
- /**
11
- * Overrides BaseTransformation::transform
12
- */
13
- transform: ({ data }: IOisMappingTransformationData) => Promise<IRopidGTFSOisMappingData[]>;
14
- protected transformElement: (element: IRopidGTFSOisMappingInputData) => IRopidGTFSOisMappingData;
10
+ protected transformInternal: (input: IOisMappingTransformationData) => IRopidGTFSOisMappingData[];
15
11
  }
@@ -1,26 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RopidGTFSOisMappingTransformation = void 0;
4
- const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
5
4
  const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
6
- class RopidGTFSOisMappingTransformation extends transformations_1.BaseTransformation {
5
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
6
+ class RopidGTFSOisMappingTransformation extends AbstractTransformation_1.AbstractTransformation {
7
7
  constructor() {
8
8
  super();
9
- /**
10
- * Overrides BaseTransformation::transform
11
- */
12
- this.transform = async ({ data }) => {
13
- const promises = data.map((element) => {
14
- return this.transformElement(element);
15
- });
16
- return await Promise.all(promises);
17
- };
18
- this.transformElement = (element) => {
19
- return {
9
+ this.transformInternal = (input) => {
10
+ return input.data.map((element) => ({
20
11
  ois: element.ois,
21
12
  node: element.node,
22
13
  name: element.name,
23
- };
14
+ }));
24
15
  };
25
16
  this.name = ropid_gtfs_1.RopidGTFS.ois.name;
26
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RopidGTFSOisTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.ts"],"names":[],"mappings":";;;AAAA,2FAA4G;AAC5G,uEAA4C;AAQ5C,MAAa,iCAAkC,SAAQ,oCAAkB;IAGrE;QACI,KAAK,EAAE,CAAC;QAIZ;;WAEG;QACI,cAAS,GAAG,KAAK,EAAE,EAAE,IAAI,EAAiC,EAAuC,EAAE;YACtG,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBAClC,OAAO,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;YAC1C,CAAC,CAAC,CAAC;YACH,OAAO,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACvC,CAAC,CAAC;QAEQ,qBAAgB,GAAG,CAAC,OAAsC,EAA4B,EAAE;YAC9F,OAAO;gBACH,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE,OAAO,CAAC,IAAI;aACrB,CAAC;QACN,CAAC,CAAC;QAnBE,IAAI,CAAC,IAAI,GAAG,sBAAS,CAAC,GAAG,CAAC,IAAI,CAAC;IACnC,CAAC;CAmBJ;AAzBD,8EAyBC"}
1
+ {"version":3,"file":"RopidGTFSOisTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.ts"],"names":[],"mappings":";;;AAAA,uEAA4C;AAE5C,6GAA0G;AAO1G,MAAa,iCAAkC,SAAQ,+CAGtD;IAGG;QACI,KAAK,EAAE,CAAC;QAIF,sBAAiB,GAAG,CAAC,KAAoC,EAA8B,EAAE;YAC/F,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;gBAChC,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE,OAAO,CAAC,IAAI;aACrB,CAAC,CAAC,CAAC;QACR,CAAC,CAAC;QATE,IAAI,CAAC,IAAI,GAAG,sBAAS,CAAC,GAAG,CAAC,IAAI,CAAC;IACnC,CAAC;CASJ;AAlBD,8EAkBC"}
@@ -1,12 +1,11 @@
1
- import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
1
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
2
2
  import { Readable } from "stream";
3
3
  export interface IRopidGtfsTransformationData {
4
4
  sourceStream: Readable;
5
5
  name: string;
6
6
  }
7
- export declare class RopidGTFSTransformation extends BaseTransformation implements ITransformation {
7
+ export declare class RopidGTFSTransformation extends AbstractTransformation<IRopidGtfsTransformationData, Readable> {
8
8
  name: string;
9
9
  constructor();
10
- transform: (input: IRopidGtfsTransformationData) => Promise<Readable>;
11
- protected transformElement: () => void;
10
+ protected transformInternal: (input: IRopidGtfsTransformationData) => Readable;
12
11
  }
@@ -15,15 +15,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.RopidGTFSTransformation = void 0;
16
16
  const ropid_gtfs_1 = require("../../../schema-definitions/ropid-gtfs");
17
17
  const integration_engine_1 = require("@golemio/core/dist/integration-engine");
18
- const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
18
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
19
19
  const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
20
20
  const csv_parser_1 = __importDefault(require("csv-parser"));
21
21
  const csv_stringify_1 = __importDefault(require("csv-stringify"));
22
22
  const stream_1 = require("stream");
23
- let RopidGTFSTransformation = class RopidGTFSTransformation extends transformations_1.BaseTransformation {
23
+ let RopidGTFSTransformation = class RopidGTFSTransformation extends AbstractTransformation_1.AbstractTransformation {
24
24
  constructor() {
25
25
  super();
26
- this.transform = async (input) => {
26
+ this.transformInternal = (input) => {
27
27
  // create object by table structure and fill its values with null
28
28
  const tableToObjectFilledWithNulls = Object.keys(ropid_gtfs_1.RopidGTFS[input.name].outputSequelizeAttributes)
29
29
  .filter((column) => !column.startsWith("computed_"))
@@ -36,7 +36,7 @@ let RopidGTFSTransformation = class RopidGTFSTransformation extends transformati
36
36
  ...tableToObjectFilledWithNulls,
37
37
  // filter redundant properties and fill data to prepared structure
38
38
  ...Object.keys(chunk)
39
- .filter((key) => Object.keys(tableToObjectFilledWithNulls).includes(key))
39
+ .filter((key) => key in tableToObjectFilledWithNulls)
40
40
  .reduce((obj, key) => {
41
41
  obj[key] = chunk[key];
42
42
  return obj;
@@ -45,7 +45,7 @@ let RopidGTFSTransformation = class RopidGTFSTransformation extends transformati
45
45
  callback();
46
46
  },
47
47
  });
48
- return (0, stream_1.pipeline)(input.sourceStream, (0, csv_parser_1.default)(), addColumns, (0, csv_stringify_1.default)({ header: true }), (err) => {
48
+ const out = (0, stream_1.pipeline)(input.sourceStream, (0, csv_parser_1.default)(), addColumns, (0, csv_stringify_1.default)({ header: true }), (err) => {
49
49
  if (err) {
50
50
  integration_engine_1.log.error(`Datasets: transformation error (${input.name}): ${err.toString()}`);
51
51
  throw err;
@@ -54,8 +54,8 @@ let RopidGTFSTransformation = class RopidGTFSTransformation extends transformati
54
54
  integration_engine_1.log.info(`Datasets: transformation success (${input.name})`);
55
55
  }
56
56
  });
57
+ return out;
57
58
  };
58
- this.transformElement = () => { };
59
59
  this.name = ropid_gtfs_1.RopidGTFS.name;
60
60
  }
61
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RopidGTFSTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTF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,CAAC,CAAC;oBACH,QAAQ,EAAE,CAAC;gBACf,CAAC;aACJ,CAAC,CAAC;YAEH,OAAO,IAAA,iBAAQ,EAAC,KAAK,CAAC,YAAY,EAAE,IAAA,oBAAG,GAAE,EAAE,UAAU,EAAE,IAAA,uBAAS,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE;gBACxF,IAAI,GAAG,EAAE,CAAC;oBACN,wBAAG,CAAC,KAAK,CAAC,mCAAmC,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;oBAC/E,MAAM,GAAG,CAAC;gBACd,CAAC;qBAAM,CAAC;oBACJ,wBAAG,CAAC,IAAI,CAAC,qCAAqC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;gBACjE,CAAC;YACL,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;QAEQ,qBAAgB,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QArClC,IAAI,CAAC,IAAI,GAAG,sBAAS,CAAC,IAAI,CAAC;IAC/B,CAAC;CAqCJ,CAAA;AA3CY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,qBAAU,GAAE;;GACA,uBAAuB,CA2CnC"}
1
+ {"version":3,"file":"RopidGTFSTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uEAA4C;AAE5C,8EAA4D;AAC5D,6GAA0G;AAC1G,iEAAgE;AAChE,4DAA6B;AAC7B,kEAAsC;AACtC,mCAAuD;AAQhD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,+CAA8D;IAGvG;QACI,KAAK,EAAE,CAAC;QAIF,sBAAiB,GAAG,CAAC,KAAmC,EAAY,EAAE;YAC5E,iEAAiE;YACjE,MAAM,4BAA4B,GAAG,MAAM,CAAC,IAAI,CAAC,sBAAS,CAA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,GAAG,CAAC;gBACd,CAAC;qBAAM,CAAC;oBACJ,wBAAG,CAAC,IAAI,CAAC,qCAAqC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;gBACjE,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,OAAO,GAAG,CAAC;QACf,CAAC,CAAC;QArCE,IAAI,CAAC,IAAI,GAAG,sBAAS,CAAC,IAAI,CAAC;IAC/B,CAAC;CAqCJ,CAAA;AA3CY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,qBAAU,GAAE;;GACA,uBAAuB,CA2CnC"}
@@ -41,7 +41,7 @@ class CollectAndSaveLogsTask extends workers_1.AbstractTask {
41
41
  }
42
42
  const validLogEntries = this.logFilter.getValidLogEntries(queryResult);
43
43
  if (validLogEntries.length > 0) {
44
- const presetLogDtos = await this.logTransformation.transform(queryResult);
44
+ const presetLogDtos = this.logTransformation.transformArray(queryResult);
45
45
  this.logger.info(`${this.constructor.name}: ${presetLogDtos.length} log entries collected`);
46
46
  await this.logRepository.saveData(presetLogDtos);
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CollectAndSaveLogsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAC1C,+EAAoE;AAEpE,wEAAqE;AAErE,2FAAqF;AACrF,2EAA6E;AAC7E,6EAAiG;AAEjG,wFAAiF;AAEjF,gEAA6D;AAG7D,uEAA8E;AAG9E,MAAa,sBAAuB,SAAQ,sBAAkC;IAW1E,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAXP,cAAS,GAAG,oBAAoB,CAAC;QACjC,aAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QACnC,WAAM,GAAG,mDAA6B,CAAC;QAUnD,IAAI,CAAC,iBAAiB,GAAG,iBAAY,CAAC,OAAO,CACzC,2CAAoB,CAAC,0BAA0B,C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AAG,CAAC,EAAE,CAAC;YAC7B,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;YAC1E,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,aAAa,CAAC,MAAM,wBAAwB,CAAC,CAAC;YAE5F,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,kCAAkC,CAAC,CAAC;QACjF,CAAC;QAED,MAAM,8BAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,oBAAoB,EAAE,EAAE,CAAC,CAAC;IACzF,CAAC;CACJ;AAtDD,wDAsDC"}
1
+ {"version":3,"file":"CollectAndSaveLogsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAC1C,+EAAoE;AAEpE,wEAAqE;AAErE,2FAAqF;AACrF,2EAA6E;AAC7E,6EAAiG;AAEjG,wFAAiF;AAEjF,gEAA6D;AAG7D,uEAA8E;AAG9E,MAAa,sBAAuB,SAAQ,sBAAkC;IAW1E,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAXP,cAAS,GAAG,oBAAoB,CAAC;QACjC,aAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QACnC,WAAM,GAAG,mDAA6B,CAAC;QAUnD,IAAI,CAAC,iBAAiB,GAAG,iBAAY,CAAC,OAAO,CACzC,2CAAoB,CAAC,0BAA0B,CAClD,CAAC;QACF,IAAI,CAAC,iBAAiB,GAAG,iBAAY,CAAC,OAAO,CAA2B,2CAAoB,CAAC,uBAAuB,CAAC,C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,CAAC;YAC3G,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,aAAa,CAAC,MAAM,wBAAwB,CAAC,CAAC;YAE5F,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,kCAAkC,CAAC,CAAC;QACjF,CAAC;QAED,MAAM,8BAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,oBAAoB,EAAE,EAAE,CAAC,CAAC;IACzF,CAAC;CACJ;AAtDD,wDAsDC"}
@@ -1,9 +1,7 @@
1
1
  import { ILogQueryData } from "../../../../../schema-definitions/ropid-departures-preset-logs/datasources/interfaces";
2
2
  import { IPresetLogOutputDto } from "../../../../../schema-definitions/ropid-departures-preset-logs/models/interfaces";
3
- import { BaseTransformation } from "@golemio/core/dist/integration-engine/transformations";
4
- import { IPresetLogTransformation } from "./interfaces/IPresetLogTransformation";
5
- export declare class PresetLogTransformation extends BaseTransformation implements IPresetLogTransformation {
3
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
4
+ export declare class PresetLogTransformation extends AbstractTransformation<Required<ILogQueryData>, IPresetLogOutputDto> {
6
5
  name: string;
7
- transform: (data: ILogQueryData[]) => Promise<IPresetLogOutputDto[]>;
8
- protected transformElement: (dataItem: Required<ILogQueryData>) => IPresetLogOutputDto;
6
+ protected transformInternal: (dataItem: Required<ILogQueryData>) => IPresetLogOutputDto;
9
7
  }
@@ -7,23 +7,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  };
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.PresetLogTransformation = void 0;
10
- const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
10
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
11
11
  const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
12
- let PresetLogTransformation = class PresetLogTransformation extends transformations_1.BaseTransformation {
12
+ let PresetLogTransformation = class PresetLogTransformation extends AbstractTransformation_1.AbstractTransformation {
13
13
  constructor() {
14
14
  super(...arguments);
15
15
  this.name = "PresetLogTransformation";
16
- this.transform = (data) => {
17
- const dto = [];
18
- for (const dataItem of data) {
19
- const dtoItem = this.transformElement(dataItem);
20
- if (dtoItem) {
21
- dto.push(dtoItem);
22
- }
23
- }
24
- return Promise.resolve(dto);
25
- };
26
- this.transformElement = (dataItem) => {
16
+ this.transformInternal = (dataItem) => {
27
17
  // Use dummy hostname to parse relative URLs
28
18
  // we want to normalize the relative URL without query params, leading slashes and other irregularities
29
19
  const url = new URL(dataItem.stream.req_url, "http://golemio");
@@ -1 +1 @@
1
- {"version":3,"file":"PresetLogTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,2FAA2F;AAC3F,iEAAgE;AAIzD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,oCAAkB;IAAxD;;QACI,SAAI,GAAG,yBAAyB,CAAC;QAEjC,cAAS,GAAG,CAAC,IAAqB,EAAkC,EAAE;YACzE,MAAM,GAAG,GAA0B,EAAE,CAAC;YACtC,KAAK,MAAM,QAAQ,IAAI,IAAI,EAAE,CAAC;gBAC1B,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAmC,CAAC,CAAC;gBAC3E,IAAI,OAAO,EAAE,CAAC;oBACV,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBACtB,CAAC;YACL,CAAC;YAED,OAAO,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC,CAAC;QAEQ,qBAAgB,GAAG,CAAC,QAAiC,EAAuB,EAAE;YACpF,4CAA4C;YAC5C,uGAAuG;YACvG,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;YAC/D,MAAM,yBAAyB,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAChE,MAAM,oBAAoB,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,yBAAyB,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAE3F,OAAO;gBACH,WAAW,EAAE,oBAAoB;gBACjC,YAAY,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;gBAClE,YAAY,EAAE,KAAK;gBACnB,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO;gBACpC,cAAc,EAAE,QAAQ,CAAC,MAAM,CAAC,UAAU;gBAC1C,kBAAkB,EAAE,QAAQ,CAAC,MAAM,CAAC,aAAa,IAAI,EAAE;gBACvD,eAAe,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,CAAC;gBAC5D,gBAAgB,EAAE,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC;aAClE,CAAC;QACN,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;AAjCY,0DAAuB;kCAAvB,uBAAuB;IADnC,IAAA,qBAAU,GAAE;GACA,uBAAuB,CAiCnC"}
1
+ {"version":3,"file":"PresetLogTransformation.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ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from "../../../../../../schema-definitions/ropid-departures-preset-logs/models/interfaces";
3
- import { ITransformation } from "@golemio/core/dist/integration-engine/transformations";
4
- export interface IPresetLogTransformation extends ITransformation {
5
- transform: (data: ILogQueryData[]) => Promise<IPresetLogOutputDto[]>;
6
- }
3
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
4
+ export type IPresetLogTransformation = AbstractTransformation<Required<ILogQueryData>, IPresetLogOutputDto>;
@@ -1,8 +1,13 @@
1
1
  import { DatasetEnum } from "../../../../helpers/DatasetEnum";
2
+ import { ICisStopsTransformationData, ICisStopsTransformedData } from "../../../../transformations/RopidGTFSCisStopsTransformation";
3
+ import { IOisMappingTransformationData } from "../../../../transformations/RopidGTFSOisTransformation";
4
+ import { IRopidGtfsTransformationData } from "../../../../transformations/RopidGTFSTransformation";
2
5
  import { DatasetModelName } from "../../../../../../schema-definitions/ropid-gtfs";
6
+ import { IRopidGTFSOisMappingData } from "../../../../../../schema-definitions/ropid-gtfs/RopidGTFSOisMapping";
7
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
3
8
  import { RetryDataSource } from "@golemio/core/dist/integration-engine/datasources/RetryDataSource";
4
9
  import { IFile } from "@golemio/core/dist/integration-engine/datasources/protocol-strategy/IProtocolStrategy";
5
- import { ITransformation } from "@golemio/core/dist/integration-engine/transformations/ITransformation";
10
+ import { Readable } from "stream";
6
11
  export declare const ORIGIN_HOSTNAME_HEADER = "x-origin-hostname";
7
12
  export type ICachedFileMeta = Omit<IFile, "data">;
8
13
  export type ICachedDataset = ICachedFileMeta & {
@@ -13,10 +18,16 @@ export declare enum CacheContentType {
13
18
  JSON = "JSON"
14
19
  }
15
20
  export type GTFSDatasets = Exclude<DatasetEnum, DatasetEnum.DEPARTURES_PRESETS>;
21
+ type DatasetTransformationMap = {
22
+ [DatasetEnum.PID_GTFS]: AbstractTransformation<IRopidGtfsTransformationData, Readable>;
23
+ [DatasetEnum.RUN_NUMBERS]: AbstractTransformation<IRopidGtfsTransformationData, Readable>;
24
+ [DatasetEnum.CIS_STOPS]: AbstractTransformation<ICisStopsTransformationData, ICisStopsTransformedData>;
25
+ [DatasetEnum.OIS_MAPPING]: AbstractTransformation<IOisMappingTransformationData, IRopidGTFSOisMappingData[]>;
26
+ };
16
27
  export type DatasetMap = {
17
- [key in GTFSDatasets]: {
28
+ [K in GTFSDatasets]: {
18
29
  datasource: RetryDataSource;
19
- transformation: ITransformation;
30
+ transformation: DatasetTransformationMap[K];
20
31
  cacheContentType: CacheContentType;
21
32
  };
22
33
  };
@@ -27,3 +38,4 @@ export declare enum SaveMethod {
27
38
  STREAM = "stream",
28
39
  SEQUELIZE = "sequelize"
29
40
  }
41
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"HelperTypes.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.ts"],"names":[],"mappings":";;;AAAA,iEAAiE;AACjE,gFAAiF;AAKpE,QAAA,sBAAsB,GAAG,mBAAmB,CAAC;AAQ1D,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,+BAAW,CAAA;IACX,iCAAa,CAAA;AACjB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAYM,MAAM,eAAe,GAAG,CAAC,GAAQ,EAAyB,EAAE;IAC/D,OAAO,GAAG,YAAY,MAAM,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC;AACtH,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEK,MAAM,mBAAmB,GAAG,CAAC,OAAqB,EAAE,IAAY,EAAyC,EAAE;IAC9G,IAAI,KAAK,CAAC;IACV,QAAQ,OAAO,EAAE,CAAC;QACd,KAAK,yBAAW,CAAC,QAAQ;YACrB,KAAK,GAAG,IAAyB,CAAC;YAClC,MAAM;QACV,KAAK,yBAAW,CAAC,WAAW;YACxB,KAAK,GAAU,aAAa,CAAC;YAC7B,MAAM;QACV,KAAK,yBAAW,CAAC,WAAW;YACxB,KAAK,GAAU,KAAK,CAAC;YACrB,MAAM;QACV,KAAK,yBAAW,CAAC,SAAS;YACtB,KAAK,GAAG,CAAQ,WAAW,EAAS,iBAAiB,CAAC,CAAC;YACvD,MAAM;QACV;YACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,eAAe,IAAI,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B;AAEK,MAAM,qBAAqB,GAAG,CAAC,SAA2B,EAAU,EAAE;IACzE,OAAO,sBAAS,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC;AAC5C,CAAC,CAAC;AAFW,QAAA,qBAAqB,yBAEhC;AAEF,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;AAC3B,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB"}
1
+ {"version":3,"file":"HelperTypes.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/HelperTypes.ts"],"names":[],"mappings":";;;AAAA,iEAAiE;AAOjE,gFAAiF;AAOpE,QAAA,sBAAsB,GAAG,mBAAmB,CAAC;AAQ1D,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,+BAAW,CAAA;IACX,iCAAa,CAAA;AACjB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAmBM,MAAM,eAAe,GAAG,CAAC,GAAQ,EAAyB,EAAE;IAC/D,OAAO,GAAG,YAAY,MAAM,IAAI,GAAG,CAAC,QAAQ,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,GAAG,CAAC,OAAO,KAAK,SAAS,CAAC;AACtH,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEK,MAAM,mBAAmB,GAAG,CAAC,OAAqB,EAAE,IAAY,EAAyC,EAAE;IAC9G,IAAI,KAAK,CAAC;IACV,QAAQ,OAAO,EAAE,CAAC;QACd,KAAK,yBAAW,CAAC,QAAQ;YACrB,KAAK,GAAG,IAAyB,CAAC;YAClC,MAAM;QACV,KAAK,yBAAW,CAAC,WAAW;YACxB,KAAK,GAAU,aAAa,CAAC;YAC7B,MAAM;QACV,KAAK,yBAAW,CAAC,WAAW;YACxB,KAAK,GAAU,KAAK,CAAC;YACrB,MAAM;QACV,KAAK,yBAAW,CAAC,SAAS;YACtB,KAAK,GAAG,CAAQ,WAAW,EAAS,iBAAiB,CAAC,CAAC;YACvD,MAAM;QACV;YACI,MAAM,IAAI,KAAK,CAAC,yBAAyB,OAAO,eAAe,IAAI,EAAE,CAAC,CAAC;IAC/E,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AApBW,QAAA,mBAAmB,uBAoB9B;AAEK,MAAM,qBAAqB,GAAG,CAAC,SAA2B,EAAU,EAAE;IACzE,OAAO,sBAAS,CAAC,SAAS,CAAC,CAAC,WAAW,CAAC;AAC5C,CAAC,CAAC;AAFW,QAAA,qBAAqB,yBAEhC;AAEF,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,qCAAuB,CAAA;AAC3B,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB"}
@@ -14,7 +14,7 @@ export declare class RopidGtfsFactory {
14
14
  private ropidGtfsRouteSubAgencyTransformation;
15
15
  constructor();
16
16
  getDatasetMap(): DatasetMap;
17
- getTransformation(dataset: GTFSDatasets): import("@golemio/core/dist/integration-engine").ITransformation;
17
+ getTransformation(dataset: GTFSDatasets): import("@golemio/core/dist/helpers/transformation/AbstractTransformation").AbstractTransformation<import("../../../../transformations/RopidGTFSCisStopsTransformation").ICisStopsTransformationData, import("../../../../transformations/RopidGTFSCisStopsTransformation").ICisStopsTransformedData> | import("@golemio/core/dist/helpers/transformation/AbstractTransformation").AbstractTransformation<import("../../../../transformations/RopidGTFSOisTransformation").IOisMappingTransformationData, import("../../../../../../schema-definitions/ropid-gtfs/RopidGTFSOisMapping").IRopidGTFSOisMappingData[]> | import("@golemio/core/dist/helpers/transformation/AbstractTransformation").AbstractTransformation<import("../../../../transformations/RopidGTFSTransformation").IRopidGtfsTransformationData, import("stream").Readable>;
18
18
  getSaveMethod(dataset: DatasetEnum, modelName: string): SaveMethod;
19
19
  loadAndTransformDataset(inputData: ICachedDataset, modelName: DatasetModelName): Promise<any>;
20
20
  }
@@ -19,6 +19,7 @@ const RopidGTFSTransformation_1 = require("../../../../transformations/RopidGTFS
19
19
  const RopidGtfsRouteSubAgencyTransformation_1 = require("../../../../transformations/RopidGtfsRouteSubAgencyTransformation");
20
20
  const ropid_gtfs_1 = require("../../../../../../schema-definitions/ropid-gtfs");
21
21
  const integration_engine_1 = require("@golemio/core/dist/integration-engine");
22
+ const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
22
23
  const RetryDataSource_1 = require("@golemio/core/dist/integration-engine/datasources/RetryDataSource");
23
24
  const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
24
25
  const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
@@ -123,18 +124,26 @@ let RopidGtfsFactory = class RopidGtfsFactory {
123
124
  }
124
125
  else if (inputData.dataset === DatasetEnum_1.DatasetEnum.PID_GTFS || inputData.dataset === DatasetEnum_1.DatasetEnum.RUN_NUMBERS) {
125
126
  const sourceStream = this.staticFileRedisRepository.getReadableStream(inputData.filepath);
126
- return await this.transformationGtfs.transform({
127
+ return this.transformationGtfs.transformElement({
127
128
  sourceStream,
128
129
  name: modelName,
129
130
  });
130
131
  }
131
- else {
132
+ else if (inputData.dataset === DatasetEnum_1.DatasetEnum.CIS_STOPS) {
132
133
  const data = await this.staticFileRedisRepository.get(inputData.filepath);
133
- return await this.datasetMap[inputData.dataset].transformation.transform({
134
- data: this.datasetMap[inputData.dataset].cacheContentType === HelperTypes_1.CacheContentType.JSON ? JSON.parse(data) : data,
134
+ return this.transformationCisStops.transformElement({
135
+ data: JSON.parse(data),
135
136
  name: inputData.name,
136
137
  });
137
138
  }
139
+ else if (inputData.dataset === DatasetEnum_1.DatasetEnum.OIS_MAPPING) {
140
+ const data = await this.staticFileRedisRepository.get(inputData.filepath);
141
+ return this.transformationOisMapping.transformElement({
142
+ data: JSON.parse(data),
143
+ name: inputData.name,
144
+ });
145
+ }
146
+ throw new golemio_errors_1.GeneralError(`Unknown dataset: ${inputData.dataset}`, this.constructor.name);
138
147
  }
139
148
  };
140
149
  exports.RopidGtfsFactory = RopidGtfsFactory;
@@ -1 +1 @@
1
- {"version":3,"file":"RopidGtfsFactory.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iEAAiE;AACjE,2CAA2D;AAC3D,qFAAqF;AACrF,iHAAiH;AACjH,uGAA8G;AAC9G,iGAAiG;AACjG,6HAA6H;AAC7H,gFAA8D;AAC9D,8EAM+C;AAC/C,uGAAoG;AACpG,mFAAkF;AAClF,iEAAgE;AAChE,+CAAuG;AAGhG,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAezB;QACI,aAAa;QACb,IAAI,CAAC,cAAc,GAAG,IAAI,iCAAe,CACrC,sBAAS,CAAC,IAAI,GAAG,YAAY,EAC7B,IAAI,wCAAmB,CAAC;YACpB,QAAQ,EAAE,2BAAM,CAAC,WAAW,CAAC,iBAAiB;YAC9C,UAAU,EAAE,kCAAa,CAAC,UAAU;YACpC,UAAU,EAAE,kCAAa,CAAC,MAAM;YAChC,IAAI,EAAE,2BAAM,CAAC,WAAW,CAAC,aAAa;YACtC,GAAG,EAAE,2BAAM,CAAC,WAAW,CAAC,QAAQ;YAChC,gBAAgB,EAAE;gBACd,YAAY;gBACZ,cAAc;gBACd,oBAAoB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WAAW,EAAE,CAAC;YACrG,MAAM,YAAY,GAAG,IAAI,CAAC,yBAAyB,CAAC,iBAAiB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC1F,OAAO,MAAM,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC;gBAC3C,YAAY;gBACZ,IAAI,EAAE,SAAS;aAClB,CAAC,CAAC;QACP,CAAC;aAAM,CAAC;YACJ,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,yBAAyB,CAAC,GAAG,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAC1E,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,OAAuB,CAAC,CAAC,cAAc,CAAC,SAAS,CAAC;gBACrF,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,gBAAgB,KAAK,8BAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;gBAC7G,IAAI,EAAE,SAAS,CAAC,IAAI;aACvB,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACJ,CAAA;AA7JY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,qBAAU,GAAE;;GACA,gBAAgB,CA6J5B"}
1
+ {"version":3,"file":"RopidGtfsFactory.js","sourceRoot":"","sources":["../../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iEAAiE;AACjE,2CAA2D;AAC3D,qFAAqF;AACrF,iHAAiH;AACjH,uGAA8G;AAC9G,iGAAiG;AACjG,6HAA6H;AAC7H,gFAA8D;AAC9D,8EAM+C;AAC/C,6EAAwE;AACxE,uGAAoG;AACpG,mFAAkF;AAClF,iEAAgE;AAChE,+CAAuG;AAGhG,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAezB;QACI,aAAa;QACb,IAAI,CA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CAAC;gBACtB,IAAI,EAAE,SAAS,CAAC,IAAI;aACvB,CAAC,CAAC;QACP,CAAC;QAED,MAAM,IAAI,6BAAY,CAAC,oBAAoB,SAAS,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC3F,CAAC;CACJ,CAAA;AArKY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,qBAAU,GAAE;;GACA,gBAAgB,CAqK5B"}
@@ -1,4 +1,4 @@
1
- import { BaseTransformation, ITransformation } from "@golemio/core/dist/integration-engine/transformations";
1
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
2
2
  import { IRopidVYMIEvent, IRopidVYMIEventOutput, IRopidVYMIEventRouteOutput, IRopidVYMIEventStopOutput } from "../../schema-definitions/ropid-vymi";
3
3
  interface ITransformElementOutput {
4
4
  event: IRopidVYMIEventOutput;
@@ -8,12 +8,12 @@ interface ITransformElementOutput {
8
8
  interface ITransformedData extends Omit<ITransformElementOutput, "event"> {
9
9
  events: IRopidVYMIEventOutput[];
10
10
  }
11
- export declare class RopidVYMIEventsTransformation extends BaseTransformation implements ITransformation {
11
+ export declare class RopidVYMIEventsTransformation extends AbstractTransformation<IRopidVYMIEvent, ITransformElementOutput> {
12
12
  private static ROPID_DATE_TIME_FORMAT;
13
13
  name: string;
14
14
  constructor();
15
- transform: (data: IRopidVYMIEvent[]) => Promise<ITransformedData>;
16
- protected transformElement: (event: IRopidVYMIEvent) => ITransformElementOutput;
15
+ transform: (data: IRopidVYMIEvent[]) => ITransformedData;
16
+ protected transformInternal: (event: IRopidVYMIEvent) => ITransformElementOutput;
17
17
  private transformRoutes;
18
18
  private transformStops;
19
19
  private formatRopidAuditDateTime;