@golemio/pid 3.4.1-dev.1622321089 → 3.4.1-dev.1622952033

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 (426) hide show
  1. package/db/migrations/postgresql/20250103092631-skip-missing.js +53 -0
  2. package/db/migrations/postgresql/sqls/20250103092631-skip-missing-down.sql +184 -0
  3. package/db/migrations/postgresql/sqls/20250103092631-skip-missing-up.sql +195 -0
  4. package/dist/input-gateway/jis/JisInfotextsController.js +4 -13
  5. package/dist/input-gateway/jis/JisInfotextsController.js.map +1 -1
  6. package/dist/input-gateway/jis/JisInfotextsRouter.js +3 -12
  7. package/dist/input-gateway/jis/JisInfotextsRouter.js.map +1 -1
  8. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js +4 -13
  9. package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js.map +1 -1
  10. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +3 -12
  11. package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
  12. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +4 -13
  13. package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
  14. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +3 -12
  15. package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
  16. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js +4 -15
  17. package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js.map +1 -1
  18. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js +8 -19
  19. package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js.map +1 -1
  20. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +1 -1
  21. package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -1
  22. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +56 -72
  23. package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
  24. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +32 -48
  25. package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
  26. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +24 -37
  27. package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
  28. package/dist/integration-engine/jis/services/JISInfotextsDataService.js +24 -35
  29. package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
  30. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +2 -3
  31. package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
  32. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +12 -23
  33. package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
  34. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -15
  35. package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
  36. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +3 -12
  37. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
  38. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +2 -11
  39. package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
  40. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +3 -12
  41. package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
  42. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +21 -30
  43. package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
  44. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js +20 -29
  45. package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js.map +1 -1
  46. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js +33 -52
  47. package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js.map +1 -1
  48. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js +12 -23
  49. package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js.map +1 -1
  50. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js +12 -23
  51. package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
  52. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +33 -44
  53. package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -1
  54. package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js +2 -1
  55. package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.js.map +1 -1
  56. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +10 -21
  57. package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
  58. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +15 -24
  59. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
  60. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js +3 -12
  61. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js.map +1 -1
  62. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js +3 -12
  63. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map +1 -1
  64. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +4 -13
  65. package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
  66. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +30 -41
  67. package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
  68. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +11 -22
  69. package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
  70. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +1 -2
  71. package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
  72. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +7 -16
  73. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
  74. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +3 -12
  75. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
  76. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +13 -17
  77. package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
  78. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +13 -22
  79. package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
  80. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js +1 -2
  81. package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js.map +1 -1
  82. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js +12 -23
  83. package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js.map +1 -1
  84. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +14 -25
  85. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
  86. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +26 -37
  87. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
  88. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +12 -23
  89. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
  90. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js +36 -49
  91. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js.map +1 -1
  92. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js +3 -14
  93. package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js.map +1 -1
  94. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +1 -2
  95. package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
  96. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +29 -40
  97. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +1 -1
  98. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +64 -81
  99. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
  100. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +60 -79
  101. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +1 -1
  102. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +23 -34
  103. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +1 -1
  104. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +26 -38
  105. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -1
  106. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js +21 -32
  107. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js.map +1 -1
  108. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +43 -55
  109. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +1 -1
  110. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js +8 -18
  111. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js.map +1 -1
  112. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js +11 -21
  113. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
  114. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +8 -17
  115. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
  116. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +19 -30
  117. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
  118. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js +8 -1
  119. package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js.map +1 -1
  120. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +31 -47
  121. package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
  122. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +6 -17
  123. package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -1
  124. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +4 -14
  125. package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -1
  126. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +6 -17
  127. package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -1
  128. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +34 -31
  129. package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
  130. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +3 -12
  131. package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
  132. package/dist/integration-engine/shared/RopidMetadataModel.js +35 -45
  133. package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
  134. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +13 -24
  135. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
  136. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +9 -6
  137. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
  138. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +113 -128
  139. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
  140. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +20 -34
  141. package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
  142. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +3 -12
  143. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -1
  144. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js +3 -12
  145. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js.map +1 -1
  146. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +12 -21
  147. package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
  148. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js +7 -16
  149. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js.map +1 -1
  150. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +22 -33
  151. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -1
  152. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js +31 -44
  153. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js.map +1 -1
  154. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +14 -25
  155. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -1
  156. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js +25 -37
  157. package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js.map +1 -1
  158. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +53 -63
  159. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
  160. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js +57 -72
  161. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js.map +1 -1
  162. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js +15 -26
  163. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js.map +1 -1
  164. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +10 -21
  165. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
  166. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +19 -30
  167. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
  168. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +10 -21
  169. package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
  170. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +5 -14
  171. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
  172. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +4 -14
  173. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
  174. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +1 -2
  175. package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -1
  176. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +35 -49
  177. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -1
  178. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +11 -22
  179. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
  180. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +2 -3
  181. package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
  182. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js +3 -12
  183. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js.map +1 -1
  184. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +3 -12
  185. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js.map +1 -1
  186. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +19 -29
  187. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
  188. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js +3 -12
  189. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js.map +1 -1
  190. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +3 -12
  191. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js.map +1 -1
  192. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +58 -55
  193. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
  194. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js +64 -79
  195. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
  196. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +46 -59
  197. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
  198. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +39 -6
  199. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
  200. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js +8 -19
  201. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js.map +1 -1
  202. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js +2 -13
  203. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js.map +1 -1
  204. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +1 -2
  205. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
  206. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +10 -16
  207. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js.map +1 -1
  208. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +68 -40
  209. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
  210. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js +5 -14
  211. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js.map +1 -1
  212. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -2
  213. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
  214. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +1 -2
  215. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -1
  216. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js +4 -4
  217. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js.map +1 -1
  218. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js +1 -2
  219. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js.map +1 -1
  220. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js +4 -5
  221. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js.map +1 -1
  222. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js +3 -4
  223. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js.map +1 -1
  224. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js +7 -18
  225. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js.map +1 -1
  226. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +7 -16
  227. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
  228. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +40 -57
  229. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
  230. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +36 -53
  231. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
  232. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js +32 -41
  233. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js.map +1 -1
  234. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +61 -33
  235. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
  236. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js +4 -4
  237. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js.map +1 -1
  238. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js +4 -6
  239. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
  240. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js +38 -55
  241. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js.map +1 -1
  242. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js +32 -45
  243. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js.map +1 -1
  244. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js +81 -91
  245. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js.map +1 -1
  246. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js +43 -55
  247. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js.map +1 -1
  248. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js +37 -49
  249. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
  250. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js +7 -18
  251. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js.map +1 -1
  252. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +41 -52
  253. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
  254. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +32 -43
  255. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
  256. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +95 -115
  257. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
  258. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +150 -162
  259. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js.map +1 -1
  260. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js +82 -94
  261. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js.map +1 -1
  262. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +24 -35
  263. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
  264. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +15 -18
  265. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
  266. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js +1 -1
  267. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js.map +1 -1
  268. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +11 -21
  269. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
  270. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -3
  271. package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
  272. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +5 -15
  273. package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
  274. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +4 -13
  275. package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -1
  276. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +4 -13
  277. package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -1
  278. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.d.ts +1 -0
  279. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +20 -20
  280. package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
  281. package/dist/output-gateway/pid/data-access/DeparturesRepository.js +40 -53
  282. package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
  283. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +62 -75
  284. package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -1
  285. package/dist/output-gateway/pid/domain/DepartureInterfaces.d.ts +7 -0
  286. package/dist/output-gateway/pid/domain/DepartureInterfaces.js +3 -0
  287. package/dist/output-gateway/pid/domain/DepartureInterfaces.js.map +1 -0
  288. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
  289. package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
  290. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +6 -15
  291. package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
  292. package/dist/output-gateway/pid/index.d.ts +4 -5
  293. package/dist/output-gateway/pid/index.js +1 -0
  294. package/dist/output-gateway/pid/index.js.map +1 -1
  295. package/dist/output-gateway/pid/ioc/Di.js +4 -0
  296. package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
  297. package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +2 -0
  298. package/dist/output-gateway/pid/ioc/OgPidToken.js +2 -0
  299. package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
  300. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +14 -28
  301. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +195 -84
  302. package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
  303. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js +20 -27
  304. package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js.map +1 -1
  305. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +16 -25
  306. package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
  307. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +28 -18
  308. package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
  309. package/dist/output-gateway/pid/models/helpers/SkipHelper.d.ts +19 -0
  310. package/dist/output-gateway/pid/models/helpers/SkipHelper.js +116 -0
  311. package/dist/output-gateway/pid/models/helpers/SkipHelper.js.map +1 -0
  312. package/dist/output-gateway/pid/models/helpers/const.d.ts +4 -0
  313. package/dist/output-gateway/pid/models/helpers/const.js +8 -0
  314. package/dist/output-gateway/pid/models/helpers/const.js.map +1 -0
  315. package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +4 -1
  316. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.d.ts +21 -0
  317. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js +3 -0
  318. package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js.map +1 -0
  319. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +1 -1
  320. package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js.map +1 -1
  321. package/dist/output-gateway/pid/service/facade/InfotextFacade.js +12 -23
  322. package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
  323. package/dist/output-gateway/pid/service/facade/StopFacade.js +27 -38
  324. package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
  325. package/dist/output-gateway/pid/service/facade/TransferFacade.d.ts +1 -1
  326. package/dist/output-gateway/pid/service/facade/TransferFacade.js +34 -39
  327. package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
  328. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +3 -4
  329. package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -1
  330. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +8 -12
  331. package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -1
  332. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +1 -2
  333. package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -1
  334. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +1 -2
  335. package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -1
  336. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js +4 -13
  337. package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -1
  338. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js +4 -13
  339. package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -1
  340. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js +9 -18
  341. package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -1
  342. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js +13 -26
  343. package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js.map +1 -1
  344. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js +22 -33
  345. package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js.map +1 -1
  346. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +9 -20
  347. package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
  348. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +23 -34
  349. package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
  350. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.d.ts +4 -2
  351. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +178 -175
  352. package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
  353. package/dist/output-gateway/public/domain/repository/IVehiclePositionsRepository.d.ts +2 -1
  354. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js +2 -2
  355. package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js.map +1 -1
  356. package/dist/output-gateway/public/service/VPSubscriber.js +8 -19
  357. package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -1
  358. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +100 -117
  359. package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -1
  360. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +18 -29
  361. package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
  362. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +20 -31
  363. package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -1
  364. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +15 -26
  365. package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
  366. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +1 -2
  367. package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  368. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +3 -14
  369. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
  370. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +7 -18
  371. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
  372. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +35 -46
  373. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
  374. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +16 -22
  375. package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
  376. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +9 -10
  377. package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -1
  378. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js +5 -15
  379. package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js.map +1 -1
  380. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +2 -3
  381. package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -1
  382. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js +2 -15
  383. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js.map +1 -1
  384. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js +1 -13
  385. package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
  386. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +14 -25
  387. package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -1
  388. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.d.ts +10 -0
  389. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js +65 -0
  390. package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js.map +1 -0
  391. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.d.ts +4 -0
  392. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js +3 -0
  393. package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js.map +1 -0
  394. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +3 -12
  395. package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
  396. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +4 -13
  397. package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
  398. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +5 -14
  399. package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
  400. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +90 -102
  401. package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
  402. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +3 -12
  403. package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
  404. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +43 -51
  405. package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
  406. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +28 -37
  407. package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
  408. package/dist/output-gateway/shared/DepartureCalculator.js +1 -1
  409. package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -1
  410. package/dist/output-gateway/shared/constants/validations.js +1 -1
  411. package/dist/output-gateway/shared/constants/validations.js.map +1 -1
  412. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +40 -48
  413. package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -1
  414. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +7 -16
  415. package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
  416. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +10 -19
  417. package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
  418. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js +5 -2
  419. package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js.map +1 -1
  420. package/dist/schema-definitions/ropid-gtfs/index.js +16 -4
  421. package/dist/schema-definitions/ropid-gtfs/index.js.map +1 -1
  422. package/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
  423. package/dist/schema-definitions/ropid-gtfs/redis/const.js +2 -1
  424. package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
  425. package/docs/openapi-output.yaml +11 -3
  426. package/package.json +2 -2
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
14
  Object.defineProperty(exports, "__esModule", { value: true });
24
15
  exports.RopidMonitoringService = void 0;
25
16
  const ContainerToken_1 = require("@golemio/core/dist/integration-engine/ioc/ContainerToken");
@@ -29,22 +20,20 @@ let RopidMonitoringService = exports.RopidMonitoringService = class RopidMonitor
29
20
  constructor(config) {
30
21
  this.config = config;
31
22
  }
32
- sendLogsToMonitoringSystem(logEntries) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- const requestConfig = this.getRequestConfig(logEntries);
35
- try {
36
- const response = yield fetch(this.config.datasources.RopidMonitoringPushUrl, requestConfig);
37
- if (response.status < 200 || response.status >= 300) {
38
- throw new golemio_errors_1.GeneralError(`Error while sending logs to the ROPID monitoring system. Status code: ${response.status}`, this.constructor.name);
39
- }
23
+ async sendLogsToMonitoringSystem(logEntries) {
24
+ const requestConfig = this.getRequestConfig(logEntries);
25
+ try {
26
+ const response = await fetch(this.config.datasources.RopidMonitoringPushUrl, requestConfig);
27
+ if (response.status < 200 || response.status >= 300) {
28
+ throw new golemio_errors_1.GeneralError(`Error while sending logs to the ROPID monitoring system. Status code: ${response.status}`, this.constructor.name);
40
29
  }
41
- catch (err) {
42
- if (err instanceof golemio_errors_1.GeneralError) {
43
- throw err;
44
- }
45
- throw new golemio_errors_1.GeneralError("Error while sending logs to the ROPID monitoring system", this.constructor.name, err);
30
+ }
31
+ catch (err) {
32
+ if (err instanceof golemio_errors_1.GeneralError) {
33
+ throw err;
46
34
  }
47
- });
35
+ throw new golemio_errors_1.GeneralError("Error while sending logs to the ROPID monitoring system", this.constructor.name, err);
36
+ }
48
37
  }
49
38
  getRequestConfig(logEntries) {
50
39
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"RopidMonitoringService.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA,6FAA0F;AAC1F,6EAAwE;AACxE,iEAAwE;AAIjE,IAAM,sBAAsB,oCAA5B,MAAM,sBAAsB;IAC/B,YAAmD,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAG,CAAC;IAEhE,0BAA0B,CAAC,UAAoC;;YACxE,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;YAExD,IAAI;gBACA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;gBAC5F,IAAI,QAAQ,CAAC,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,EAAE;oBACjD,MAAM,IAAI,6BAAY,CAClB,yEAAyE,QAAQ,CAAC,MAAM,EAAE,EAC1F,IAAI,CAAC,WAAW,CAAC,IAAI,CACxB,CAAC;iBACL;aACJ;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,GAAG,YAAY,6BAAY,EAAE;oBAC7B,MAAM,GAAG,CAAC;iBACb;gBAED,MAAM,IAAI,6BAAY,CAAC,yDAAyD,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aACjH;QACL,CAAC;KAAA;IAEO,gBAAgB,CAAC,UAAoC;QACzD,OAAO;YACH,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,0BAA0B;YAC3D,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;YAChC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;SACzC,CAAC;IACN,CAAC;CACJ,CAAA;iCA/BY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,+BAAc,CAAC,MAAM,CAAC,CAAA;;GADjC,sBAAsB,CA+BlC"}
1
+ {"version":3,"file":"RopidMonitoringService.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,6FAA0F;AAC1F,6EAAwE;AACxE,iEAAwE;AAIjE,IAAM,sBAAsB,oCAA5B,MAAM,sBAAsB;IAC/B,YAAmD,MAAsB;QAAtB,WAAM,GAAN,MAAM,CAAgB;IAAG,CAAC;IAEtE,KAAK,CAAC,0BAA0B,CAAC,UAAoC;QACxE,MAAM,aAAa,GAAG,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,CAAC;QAExD,IAAI;YACA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,sBAAsB,EAAE,aAAa,CAAC,CAAC;YAC5F,IAAI,QAAQ,CAAC,MAAM,GAAG,GAAG,IAAI,QAAQ,CAAC,MAAM,IAAI,GAAG,EAAE;gBACjD,MAAM,IAAI,6BAAY,CAClB,yEAAyE,QAAQ,CAAC,MAAM,EAAE,EAC1F,IAAI,CAAC,WAAW,CAAC,IAAI,CACxB,CAAC;aACL;SACJ;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,GAAG,YAAY,6BAAY,EAAE;gBAC7B,MAAM,GAAG,CAAC;aACb;YAED,MAAM,IAAI,6BAAY,CAAC,yDAAyD,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACjH;IACL,CAAC;IAEO,gBAAgB,CAAC,UAAoC;QACzD,OAAO;YACH,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,0BAA0B;YAC3D,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC;YAChC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI,CAAC;SACzC,CAAC;IACN,CAAC;CACJ,CAAA;iCA/BY,sBAAsB;IADlC,IAAA,qBAAU,GAAE;IAEI,WAAA,IAAA,iBAAM,EAAC,+BAAc,CAAC,MAAM,CAAC,CAAA;;GADjC,sBAAsB,CA+BlC"}
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
14
  Object.defineProperty(exports, "__esModule", { value: true });
24
15
  exports.CheckForNewDeparturesPresetsTask = void 0;
25
16
  const RopidGtfsMetadataRepository_1 = require("../../../RopidGtfsMetadataRepository");
@@ -38,24 +29,22 @@ let CheckForNewDeparturesPresetsTask = exports.CheckForNewDeparturesPresetsTask
38
29
  this.queueName = "checkForNewDeparturesPresets";
39
30
  this.queueTtl = 59 * 1000 * 4; // 4 minutes
40
31
  }
41
- execute() {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- try {
44
- const departuresPresetsServerLastModified = yield this.departuresPresetsDataSource.getLastModified();
45
- const departuresPresetsDbLastModified = yield this.metadataRepository.getLastModified(RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS);
46
- if (departuresPresetsServerLastModified !== departuresPresetsDbLastModified.lastModified) {
47
- yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "downloadDeparturesPresets", {});
48
- }
32
+ async execute() {
33
+ try {
34
+ const departuresPresetsServerLastModified = await this.departuresPresetsDataSource.getLastModified();
35
+ const departuresPresetsDbLastModified = await this.metadataRepository.getLastModified(RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS);
36
+ if (departuresPresetsServerLastModified !== departuresPresetsDbLastModified.lastModified) {
37
+ await integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "downloadDeparturesPresets", {});
38
+ }
39
+ }
40
+ catch (err) {
41
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
42
+ throw err;
49
43
  }
50
- catch (err) {
51
- if (err instanceof golemio_errors_1.AbstractGolemioError) {
52
- throw err;
53
- }
54
- else {
55
- throw new golemio_errors_1.GeneralError("Error while checking for new departures presets", this.constructor.name, err);
56
- }
44
+ else {
45
+ throw new golemio_errors_1.GeneralError("Error while checking for new departures presets", this.constructor.name, err);
57
46
  }
58
- });
47
+ }
59
48
  }
60
49
  };
61
50
  exports.CheckForNewDeparturesPresetsTask = CheckForNewDeparturesPresetsTask = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"CheckForNewDeparturesPresetsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,sFAAyF;AACzF,kFAAqF;AACrF,8EAAwF;AACxF,iEAAwE;AACxE,8DAAuD;AACvD,6EAA8F;AAC9F,4FAAyF;AACzF,6EAA4C;AAGrC,IAAM,gCAAgC,8CAAtC,MAAM,gCAAiC,SAAQ,sCAAiB;IAInE,YACiE,kBAAuD,EAEpH,2BAAgE;QAEhE,KAAK,CAAC,sBAAS,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAJiC,uBAAkB,GAAlB,kBAAkB,CAA6B;QAE5G,gCAA2B,GAA3B,2BAA2B,CAA6B;QANpD,cAAS,GAAG,8BAA8B,CAAC;QAC3C,aAAQ,GAAG,EAAE,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,YAAY;IAQtD,CAAC;IAEe,OAAO;;YACnB,IAAI;gBACA,MAAM,mCAAmC,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,eAAe,EAAE,CAAC;gBACrG,MAAM,+BAA+B,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,eAAe,CAAC,6BAAW,CAAC,kBAAkB,CAAC,CAAC;gBACtH,IAAI,mCAAmC,KAAK,+BAA+B,CAAC,YAAY,EAAE;oBACtF,MAAM,iCAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,2BAA2B,EAAE,EAAE,CAAC,CAAC;iBAC/F;aACJ;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;oBACrC,MAAM,GAAG,CAAC;iBACb;qBAAM;oBACH,MAAM,IAAI,6BAAY,CAAC,iDAAiD,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;iBACzG;aACJ;QACL,CAAC;KAAA;CACJ,CAAA;2CA3BY,gCAAgC;IAD5C,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,2BAA2B,CAAC,CAAA;IAC3D,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,2BAA2B,CAAC,CAAA;qCAD6B,yDAA2B;QAE/E,yDAA2B;GAP3D,gCAAgC,CA2B5C"}
1
+ {"version":3,"file":"CheckForNewDeparturesPresetsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.ts"],"names":[],"mappings":";;;;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AM,EAAC,iDAAuB,CAAC,2BAA2B,CAAC,CAAA;qCAD6B,yDAA2B;QAE/E,yDAA2B;GAP3D,gCAAgC,CA2B5C"}
@@ -1,13 +1,4 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.CollectAndSaveLogsTask = void 0;
13
4
  const Di_1 = require("../../../../ioc/Di");
@@ -31,35 +22,33 @@ class CollectAndSaveLogsTask extends workers_1.AbstractTask {
31
22
  this.logFilter = Di_1.PidContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.PresetLogFilter);
32
23
  this.logger = Di_1.PidContainer.resolve(CoreToken_1.CoreToken.Logger);
33
24
  }
34
- execute(data) {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- const currentTimestampInSeconds = Math.round(new Date().getTime() / 1000);
37
- const dataSource = this.dataSourceFactory.getDataSource(PresetLogProviderEnum_1.PresetLogProvider.GrafanaLoki, {
38
- start: currentTimestampInSeconds - data.targetMinutes * 60,
39
- end: currentTimestampInSeconds,
40
- query: LogQueryManager_1.LogQueryManager.getCompletedPresetRequestLogsQuery(),
41
- });
42
- let queryResult = [];
43
- try {
44
- queryResult = yield dataSource.getAll();
45
- }
46
- catch (err) {
47
- if (err instanceof golemio_errors_1.AbstractGolemioError) {
48
- throw err;
49
- }
50
- throw new golemio_errors_1.DatasourceError("Error while fetching preset logs", this.constructor.name, err);
51
- }
52
- const validLogEntries = this.logFilter.getValidLogEntries(queryResult);
53
- if (validLogEntries.length > 0) {
54
- const presetLogDtos = yield this.logTransformation.transform(queryResult);
55
- this.logger.info(`${this.constructor.name}: ${presetLogDtos.length} log entries collected`);
56
- yield this.logRepository.saveData(presetLogDtos);
57
- }
58
- else {
59
- this.logger.warn(`${this.constructor.name}: no valid log entries collected`);
60
- }
61
- yield queueprocessors_1.QueueManager.sendMessageToExchange(this.queuePrefix, "processAndSendLogs", {});
25
+ async execute(data) {
26
+ const currentTimestampInSeconds = Math.round(new Date().getTime() / 1000);
27
+ const dataSource = this.dataSourceFactory.getDataSource(PresetLogProviderEnum_1.PresetLogProvider.GrafanaLoki, {
28
+ start: currentTimestampInSeconds - data.targetMinutes * 60,
29
+ end: currentTimestampInSeconds,
30
+ query: LogQueryManager_1.LogQueryManager.getCompletedPresetRequestLogsQuery(),
62
31
  });
32
+ let queryResult = [];
33
+ try {
34
+ queryResult = await dataSource.getAll();
35
+ }
36
+ catch (err) {
37
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
38
+ throw err;
39
+ }
40
+ throw new golemio_errors_1.DatasourceError("Error while fetching preset logs", this.constructor.name, err);
41
+ }
42
+ const validLogEntries = this.logFilter.getValidLogEntries(queryResult);
43
+ if (validLogEntries.length > 0) {
44
+ const presetLogDtos = await this.logTransformation.transform(queryResult);
45
+ this.logger.info(`${this.constructor.name}: ${presetLogDtos.length} log entries collected`);
46
+ await this.logRepository.saveData(presetLogDtos);
47
+ }
48
+ else {
49
+ this.logger.warn(`${this.constructor.name}: no valid log entries collected`);
50
+ }
51
+ await queueprocessors_1.QueueManager.sendMessageToExchange(this.queuePrefix, "processAndSendLogs", {});
63
52
  }
64
53
  }
65
54
  exports.CollectAndSaveLogsTask = CollectAndSaveLogsTask;
@@ -1 +1 @@
1
- {"version":3,"file":"CollectAndSaveLogsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;A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AAE,CAAC;YAEtC,IAAI;gBACA,WAAW,GAAG,MAAM,UAAU,CAAC,MAAM,EAAE,CAAC;aAC3C;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;oBACrC,MAAM,GAAG,CAAC;iBACb;gBAED,MAAM,IAAI,gCAAe,CAAC,kCAAkC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;aAC7F;YAED,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;YACvE,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC5B,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;gBAC1E,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,aAAa,CAAC,MAAM,wBAAwB,CAAC,CAAC;gBAE5F,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;aACpD;iBAAM;gBACH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,kCAAkC,CAAC,CAAC;aAChF;YAED,MAAM,8BAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,oBAAoB,EAAE,EAAE,CAAC,CAAC;QACzF,CAAC;KAAA;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,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E;gBACrC,MAAM,GAAG,CAAC;aACb;YAED,MAAM,IAAI,gCAAe,CAAC,kCAAkC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC7F;QAED,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,WAAW,CAAC,CAAC;QACvE,IAAI,eAAe,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5B,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;SACpD;aAAM;YACH,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,kCAAkC,CAAC,CAAC;SAChF;QAED,MAAM,8BAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,WAAW,EAAE,oBAAoB,EAAE,EAAE,CAAC,CAAC;IACzF,CAAC;CACJ;AAtDD,wDAsDC"}
@@ -11,15 +11,6 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
11
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
12
  return function (target, key) { decorator(target, key, paramIndex); }
13
13
  };
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
14
  Object.defineProperty(exports, "__esModule", { value: true });
24
15
  exports.DownloadDeparturesPresetsTask = void 0;
25
16
  const DeparturePresetsFacade_1 = require("../../../facade/DeparturePresetsFacade");
@@ -37,22 +28,20 @@ let DownloadDeparturesPresetsTask = exports.DownloadDeparturesPresetsTask = clas
37
28
  this.queueName = "downloadDeparturesPresets";
38
29
  this.queueTtl = 4 * 60 * 1000; // 4 minutes
39
30
  }
40
- execute() {
41
- return __awaiter(this, void 0, void 0, function* () {
42
- try {
43
- const file = yield this.departuresPresetsDataSource.getAll();
44
- const lastModified = yield this.departuresPresetsDataSource.getLastModified();
45
- yield this.facade.handleNewDeparturePresets(file.data, lastModified);
31
+ async execute() {
32
+ try {
33
+ const file = await this.departuresPresetsDataSource.getAll();
34
+ const lastModified = await this.departuresPresetsDataSource.getLastModified();
35
+ await this.facade.handleNewDeparturePresets(file.data, lastModified);
36
+ }
37
+ catch (err) {
38
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
39
+ throw err;
46
40
  }
47
- catch (err) {
48
- if (err instanceof golemio_errors_1.AbstractGolemioError) {
49
- throw err;
50
- }
51
- else {
52
- throw new golemio_errors_1.GeneralError("Error while downloading departures presets: " + err.message, this.constructor.name, err);
53
- }
41
+ else {
42
+ throw new golemio_errors_1.GeneralError("Error while downloading departures presets: " + err.message, this.constructor.name, err);
54
43
  }
55
- });
44
+ }
56
45
  }
57
46
  };
58
47
  exports.DownloadDeparturesPresetsTask = DownloadDeparturesPresetsTask = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"DownloadDeparturesPresetsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,mFAAsF;AACtF,kFAAqF;AACrF,8EAA0E;AAC1E,6EAA8F;AAC9F,iEAAwE;AACxE,4FAAyF;AAEzF,6EAA4C;AAGrC,IAAM,6BAA6B,2CAAnC,MAAM,6BAA8B,SAAQ,sCAAiB;IAIhE,YAEI,2BAAgE,EACR,MAAsC;QAE9F,KAAK,CAAC,sBAAS,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC;QAH5B,gCAA2B,GAA3B,2BAA2B,CAA6B;QACA,WAAM,GAAN,MAAM,CAAwB;QANlG,cAAS,GAAG,2BAA2B,CAAC;QACxC,aAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;IAQtC,CAAC;IAEe,OAAO;;YACnB,IAAI;gBACA,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,MAAM,EAAE,CAAC;gBAC7D,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,2BAA2B,CAAC,eAAe,EAAE,CAAC;gBAC9E,MAAM,IAAI,CAAC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;aACxE;YAAC,OAAO,GAAG,EAAE;gBACV,IAAI,GAAG,YAAY,qCAAoB,EAAE;oBACrC,MAAM,GAAG,CAAC;iBACb;qBAAM;oBACH,MAAM,IAAI,6BAAY,CAAC,8CAA8C,GAAG,GAAG,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;iBACpH;aACJ;QACL,CAAC;KAAA;CACJ,CAAA;wCAzBY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,2BAA2B,CAAC,CAAA;IAE3D,WAAA,IAAA,iBAAM,EAAC,iDAAuB,CAAC,sBAAsB,CAAC,CAAA;qCADlB,yDAA2B;QACQ,+CAAsB;GAPzF,6BAA6B,CAyBzC"}
1
+ {"version":3,"file":"DownloadDeparturesPresetsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.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GAPzF,6BAA6B,CAyBzC"}
@@ -1,13 +1,4 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.ProcessAndSendLogsTask = void 0;
13
4
  const Di_1 = require("../../../../ioc/Di");
@@ -36,52 +27,48 @@ class ProcessAndSendLogsTask extends workers_1.AbstractEmptyTask {
36
27
  this.lockTimeout = Number.parseInt(lockTimeout);
37
28
  this.refreshInterval = this.lockTimeout * 0.8; // recommended
38
29
  }
39
- execute() {
40
- return __awaiter(this, void 0, void 0, function* () {
41
- const mutex = this.createMutex();
42
- const lockAcquired = yield mutex.tryAcquire();
43
- if (!lockAcquired) {
44
- this.logger.error(`${this.constructor.name}: unable to obtain mutex lock.`);
30
+ async execute() {
31
+ const mutex = this.createMutex();
32
+ const lockAcquired = await mutex.tryAcquire();
33
+ if (!lockAcquired) {
34
+ this.logger.error(`${this.constructor.name}: unable to obtain mutex lock.`);
35
+ return;
36
+ }
37
+ try {
38
+ const logEntries = await this.logRepository.findUnprocessed();
39
+ if (logEntries.length === 0) {
40
+ this.logger.warn(`${this.constructor.name}: no logs found to send to the ROPID monitoring system`);
45
41
  return;
46
42
  }
47
- try {
48
- const logEntries = yield this.logRepository.findUnprocessed();
49
- if (logEntries.length === 0) {
50
- this.logger.warn(`${this.constructor.name}: no logs found to send to the ROPID monitoring system`);
51
- return;
43
+ // Process logs in batches to avoid exceeding the maximum allowed size of the request
44
+ for (let i = 0; i < logEntries.length; i += this.batchSize) {
45
+ try {
46
+ const batchedLogs = logEntries.slice(i, i + this.batchSize);
47
+ await this.processBatch(batchedLogs);
52
48
  }
53
- // Process logs in batches to avoid exceeding the maximum allowed size of the request
54
- for (let i = 0; i < logEntries.length; i += this.batchSize) {
55
- try {
56
- const batchedLogs = logEntries.slice(i, i + this.batchSize);
57
- yield this.processBatch(batchedLogs);
58
- }
59
- catch (err) {
60
- this.logger.warn(err, `${this.constructor.name}: error while processing DCIP system logs`);
61
- }
49
+ catch (err) {
50
+ this.logger.warn(err, `${this.constructor.name}: error while processing DCIP system logs`);
62
51
  }
63
52
  }
64
- finally {
65
- yield mutex.release();
66
- }
67
- });
53
+ }
54
+ finally {
55
+ await mutex.release();
56
+ }
68
57
  }
69
- processBatch(logEntries) {
70
- return __awaiter(this, void 0, void 0, function* () {
71
- let logIds = [];
72
- let logData = [];
73
- for (const logEntry of logEntries) {
74
- const { device_alias, received_at } = logEntry.toJSON();
75
- logIds.push(logEntry.get("id"));
76
- logData.push({
77
- deviceAlias: device_alias,
78
- receivedAt: LogDateTimeUtils_1.LogDateTimeUtils.parseISONoFractionalFromDate(received_at),
79
- });
80
- }
81
- yield this.monitoringService.sendLogsToMonitoringSystem(logData);
82
- this.logger.info(`${this.constructor.name}: ${logData.length} logs sent to the ROPID monitoring system`);
83
- yield this.logRepository.markAsProcessed(logIds);
84
- });
58
+ async processBatch(logEntries) {
59
+ let logIds = [];
60
+ let logData = [];
61
+ for (const logEntry of logEntries) {
62
+ const { device_alias, received_at } = logEntry.toJSON();
63
+ logIds.push(logEntry.get("id"));
64
+ logData.push({
65
+ deviceAlias: device_alias,
66
+ receivedAt: LogDateTimeUtils_1.LogDateTimeUtils.parseISONoFractionalFromDate(received_at),
67
+ });
68
+ }
69
+ await this.monitoringService.sendLogsToMonitoringSystem(logData);
70
+ this.logger.info(`${this.constructor.name}: ${logData.length} logs sent to the ROPID monitoring system`);
71
+ await this.logRepository.markAsProcessed(logIds);
85
72
  }
86
73
  createMutex() {
87
74
  return new redis_semaphore_1.Mutex(this.redisClient.getConnection(), this.LOCK_KEY_PHRASE, {
@@ -1 +1 @@
1
- {"version":3,"file":"ProcessAndSendLogsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA0C;AAC1C,+EAAoE;AAKpE,wEAAqE;AAErE,mEAA2E;AAC3E,2EAAkF;AAClF,+EAAkE;AAGlE,kEAA+D;AAE/D,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,8BAA8B,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjD,MAAa,sBAAuB,SAAQ,2BAAiB;IAazD,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAbP,cAAS,GAAG,oBAAoB,CAAC;QACjC,aAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QAClC,oBAAe,GAAG,iCAAiC,CAAC;QAYjE,MAAM,MAAM,GAAG,iBAAY,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAAC;QAE3E,IAAI,CAAC,aAAa,GAAG,iBAAY,CAAC,OAAO,CAAuB,2CAAoB,CAAC,mBAAmB,CAAC,CAAC;QAC1G,IAAI,CAAC,iBAAiB,GAAG,iBAAY,CAAC,OAAO,CAA0B,2CAAoB,CAAC,sBAAsB,CAAC,CAAC;QACpH,IAAI,CAAC,WAAW,GAAG,iBAAY,CAAC,OAAO,CAAmB,oBAAc,CAAC,cAAc,CAAC,CAAC;QACzF,IAAI,CAAC,MAAM,GAAG,iBAAY,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QAE9D,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,iCAAiC,EAAE,kBAAkB,CAAC,QAAQ,EAAE,CAAC,CAAC;QACpG,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,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CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ;AAzFD,wDAyFC"}
1
+ {"version":3,"file":"ProcessAndSendLogsTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.ts"],"names":[],"mappings":";;;AAAA,2CAA0C;AAC1C,+EAAoE;AAKpE,wEAAqE;AAErE,mEAA2E;AAC3E,2EAAkF;AAClF,+EAAkE;AAGlE,kEAA+D;AAE/D,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,8BAA8B,GAAG,EAAE,GAAG,IAAI,CAAC;AAEjD,MAAa,sBAAuB,SAAQ,2BAAiB;IAazD,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QAbP,cAAS,GAAG,oBAAoB,CAAC;QACjC,aAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;QAClC,oBAAe,GAAG,iCAAiC,CAAC;QAYjE,MAAM,MAAM,GAAG,iBAAY,CAAC,OAAO,CAAgB,qBAAS,CAAC,YAAY,CAAC,CAAC;QAE3E,IAAI,CAAC,aAAa,GAAG,iBAAY,CAAC,OAAO,CAAuB,2CAAoB,CAAC,mBAAmB,CAAC,CAAC;QAC1G,IAAI,CAAC,iBAAiB,GAAG,iBAAY,CAAC,OAAO,CAA0B,2CAAoB,CAAC,sBAAsB,CAAC,CAAC;QACpH,IAAI,CAAC,WAAW,GAAG,iBAAY,CAAC,OAAO,CAAmB,oBAAc,CAAC,cAAc,CAAC,CAAC;QACzF,IAAI,CAAC,MAAM,GAAG,iBAAY,CAAC,OAAO,CAAU,qBAAS,CAAC,MAAM,CAAC,CAAC;QAE9D,MAAM,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,iCAAiC,EAAE,kBAAkB,CAAC,QAAQ,EAAE,CAAC,CAAC;QACpG,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QAE5C,MA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wDAyFC"}
@@ -1,13 +1,4 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.SavePresetsDataTask = void 0;
13
4
  const Di_1 = require("../../../ioc/Di");
@@ -22,11 +13,9 @@ class SavePresetsDataTask extends AbstractTaskJsonSchema_1.AbstractTaskJsonSchem
22
13
  this.queueTtl = 5 * 60 * 1000; // 5 minutes
23
14
  this.schema = new golemio_validator_1.JSONSchemaValidator(ropid_departures_presets_1.RopidDeparturesPresets.name + "Controller", ropid_departures_presets_1.RopidDeparturesPresets.datasourceJsonSchema);
24
15
  }
25
- execute(data) {
26
- return __awaiter(this, void 0, void 0, function* () {
27
- const facade = Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DeparturePresetsFacade);
28
- yield facade.handleNewDeparturePresets(data, new Date().toISOString());
29
- });
16
+ async execute(data) {
17
+ const facade = Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.DeparturePresetsFacade);
18
+ await facade.handleNewDeparturePresets(data, new Date().toISOString());
30
19
  }
31
20
  }
32
21
  exports.SavePresetsDataTask = SavePresetsDataTask;
@@ -1 +1 @@
1
- {"version":3,"file":"SavePresetsDataTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,wCAA2D;AAC3D,kFAAqF;AACrF,yGAA+F;AAC/F,iHAA8G;AAC9G,mFAAkF;AAElF,MAAa,mBAAoB,SAAQ,+CAAgD;IAQrF,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QARP,cAAS,GAAG,aAAa,CAAC;QAC1B,aAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;QAC5C,WAAM,GAAG,IAAI,uCAAmB,CACtC,iDAAsB,CAAC,IAAI,GAAG,YAAY,EAC1C,iDAAsB,CAAC,oBAAoB,CAC9C,CAAC;IAIF,CAAC;IAEe,OAAO,CAAC,IAA8B;;YAClD,MAAM,MAAM,GAAG,uBAAkB,CAAC,OAAO,CAAyB,iDAAuB,CAAC,sBAAsB,CAAC,CAAC;YAClH,MAAM,MAAM,CAAC,yBAAyB,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;QAC3E,CAAC;KAAA;CACJ;AAhBD,kDAgBC"}
1
+ {"version":3,"file":"SavePresetsDataTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.ts"],"names":[],"mappings":";;;AACA,wCAA2D;AAC3D,kFAAqF;AACrF,yGAA+F;AAC/F,iHAA8G;AAC9G,mFAAkF;AAElF,MAAa,mBAAoB,SAAQ,+CAAgD;IAQrF,YAAY,WAAmB;QAC3B,KAAK,CAAC,WAAW,CAAC,CAAC;QARP,cAAS,GAAG,aAAa,CAAC;QAC1B,aAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,YAAY;QAC5C,WAAM,GAAG,IAAI,uCAAmB,CACtC,iDAAsB,CAAC,IAAI,GAAG,YAAY,EAC1C,iDAAsB,CAAC,oBAAoB,CAC9C,CAAC;IAIF,CAAC;IAES,KAAK,CAAC,OAAO,CAAC,IAA8B;QAClD,MAAM,MAAM,GAAG,uBAAkB,CAAC,OAAO,CAAyB,iDAAuB,CAAC,sBAAsB,CAAC,CAAC;QAClH,MAAM,MAAM,CAAC,yBAAyB,CAAC,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;IAC3E,CAAC;CACJ;AAhBD,kDAgBC"}
@@ -24,7 +24,6 @@ let PresetLogTransformation = exports.PresetLogTransformation = class PresetLogT
24
24
  return Promise.resolve(dto);
25
25
  };
26
26
  this.transformElement = (dataItem) => {
27
- var _a;
28
27
  // Use dummy hostname to parse relative URLs
29
28
  // we want to normalize the relative URL without query params, leading slashes and other irregularities
30
29
  const url = new URL(dataItem.stream.req_url, "http://golemio");
@@ -36,7 +35,7 @@ let PresetLogTransformation = exports.PresetLogTransformation = class PresetLogT
36
35
  is_processed: false,
37
36
  request_url: dataItem.stream.req_url,
38
37
  request_method: dataItem.stream.req_method,
39
- request_user_agent: (_a = dataItem.stream.req_userAgent) !== null && _a !== void 0 ? _a : "",
38
+ request_user_agent: dataItem.stream.req_userAgent ?? "",
40
39
  response_status: Number.parseInt(dataItem.stream.res_status),
41
40
  response_time_ms: Number.parseInt(dataItem.stream.responseTime),
42
41
  };
@@ -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,qCAA7B,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;gBACzB,MAAM,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,QAAmC,CAAC,CAAC;gBAC3E,IAAI,OAAO,EAAE;oBACT,GAAG,CAAC,IAAI,CAAC,OAAO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Q,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;kCAjCY,uBAAuB;IADnC,IAAA,qBAAU,GAAE;GACA,uBAAuB,CAiCnC"}
@@ -1,13 +1,4 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
12
3
  exports.CheckForNewDataTask = void 0;
13
4
  const Di_1 = require("../../../ioc/Di");
@@ -25,39 +16,37 @@ class CheckForNewDataTask extends workers_1.AbstractTask {
25
16
  this.logger = Di_1.RopidGtfsContainer.resolve(CoreToken_1.CoreToken.Logger);
26
17
  this.metadataRepository = Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsMetadataRepository);
27
18
  }
28
- execute(data) {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- let forceRefresh = !!data.forceRefresh;
31
- let outdatedDatasetCount = 0;
32
- const ropidGtfsFactory = Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory);
33
- const datasetMap = ropidGtfsFactory.getDatasetMap();
34
- const datasetList = Object.keys(datasetMap);
35
- for (const dataset of datasetList) {
36
- const serverLastModified = yield datasetMap[dataset].datasource.getLastModified();
37
- const dbLastModified = yield this.metadataRepository.getLastModified(dataset);
38
- const isDeployed = yield this.metadataRepository.isDeployed(dataset);
39
- if (serverLastModified !== dbLastModified.lastModified || !isDeployed) {
40
- outdatedDatasetCount++;
41
- }
19
+ async execute(data) {
20
+ let forceRefresh = !!data.forceRefresh;
21
+ let outdatedDatasetCount = 0;
22
+ const ropidGtfsFactory = Di_1.RopidGtfsContainer.resolve(RopidGtfsContainerToken_1.RopidGtfsContainerToken.RopidGtfsFactory);
23
+ const datasetMap = ropidGtfsFactory.getDatasetMap();
24
+ const datasetList = Object.keys(datasetMap);
25
+ for (const dataset of datasetList) {
26
+ const serverLastModified = await datasetMap[dataset].datasource.getLastModified();
27
+ const dbLastModified = await this.metadataRepository.getLastModified(dataset);
28
+ const isDeployed = await this.metadataRepository.isDeployed(dataset);
29
+ if (serverLastModified !== dbLastModified.lastModified || !isDeployed) {
30
+ outdatedDatasetCount++;
42
31
  }
43
- if (outdatedDatasetCount !== datasetList.length) {
44
- this.logger.warn(`RopidGTFS datasets are out of sync`);
32
+ }
33
+ if (outdatedDatasetCount !== datasetList.length) {
34
+ this.logger.warn(`RopidGTFS datasets are out of sync`);
35
+ }
36
+ if (outdatedDatasetCount > 0) {
37
+ // NOTE: We are sending all datasets to download even if only some of them are outdated
38
+ // to avoid unwanted side effects (such as empty precomputed tables)
39
+ await integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "downloadDatasets", {
40
+ datasets: datasetList,
41
+ });
42
+ }
43
+ else {
44
+ this.logger.info("RopidGTFS datasets are up to date");
45
+ if (forceRefresh) {
46
+ await integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPrecomputedTables", {});
45
47
  }
46
- if (outdatedDatasetCount > 0) {
47
- // NOTE: We are sending all datasets to download even if only some of them are outdated
48
- // to avoid unwanted side effects (such as empty precomputed tables)
49
- yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "downloadDatasets", {
50
- datasets: datasetList,
51
- });
52
- }
53
- else {
54
- this.logger.info("RopidGTFS datasets are up to date");
55
- if (forceRefresh) {
56
- yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "refreshPrecomputedTables", {});
57
- }
58
- }
59
- yield integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "saveStaticData", {});
60
- });
48
+ }
49
+ await integration_engine_1.QueueManager.sendMessageToExchange(this.queuePrefix, "saveStaticData", {});
61
50
  }
62
51
  }
63
52
  exports.CheckForNewDataTask = CheckForNewDataTask;
@@ -1 +1 @@
1
- {"version":3,"file":"CheckForNewDataTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,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,IAAI,CAAC,kBAAkB,GAAG,uBAAkB,CAAC,OAAO,CAChD,iDAAuB,CAAC,2BAA2B,CACtD,CAAC;IACN,CAAC;IAEe,OAAO,CAAC,IAA2B;;YAC/C,IAAI,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;YACvC,IAAI,oBAAoB,GAAG,CAAC,CAAC;YAC7B,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,EAAE,EAAE,CAAC,CAAC;QACrF,CAAC;KAAA;CACJ;AAnDD,kDAmDC"}
1
+ {"version":3,"file":"CheckForNewDataTask.js","sourceRoot":"","sources":["../../../../../../src/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.ts"],"names":[],"mappings":";;;AACA,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,IAAI,CAAC,kBAAkB,GAAG,uBAAkB,CAAC,OAAO,CAChD,iDAAuB,CAAC,2BAA2B,CACtD,CAAC;IACN,CAAC;IAES,KAAK,CAAC,OAAO,CAAC,IAA2B;QAC/C,IAAI,YAAY,GAAG,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC;QACvC,IAAI,oBAAoB,GAAG,CAAC,CAAC;QAC7B,MAAM,gBAAgB,GAAG,uBAAkB,CAAC,OAAO,CAAmB,iDAAuB,CAAC,gBAAgB,CAAC,CAAC;QAChH,MAAM,UAAU,GAAG,gBAAgB,CAAC,aAAa,EAAE,CAAC;QACpD,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAmB,CAAC;QAE9D,KAAK,MAAM,OAAO,IAAI,WAAW,EAAE;YAC/B,MAAM,kBAAkB,GAAG,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;YAClF,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,kBA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