@golemio/pid 3.4.0 → 3.4.1-dev.1622739356
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/input-gateway/jis/JisInfotextsController.js +4 -13
- package/dist/input-gateway/jis/JisInfotextsController.js.map +1 -1
- package/dist/input-gateway/jis/JisInfotextsRouter.js +3 -12
- package/dist/input-gateway/jis/JisInfotextsRouter.js.map +1 -1
- package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js +4 -13
- package/dist/input-gateway/ropid-gtfs/RopidGtfsController.js.map +1 -1
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js +3 -12
- package/dist/input-gateway/ropid-gtfs/RopidGtfsRouter.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js +4 -13
- package/dist/input-gateway/vehicle-positions/VehiclePositionsController.js.map +1 -1
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js +3 -12
- package/dist/input-gateway/vehicle-positions/VehiclePositionsRouter.js.map +1 -1
- package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js +4 -15
- package/dist/integration-engine/data-retention/workers/tasks/DeleteDataTask.js.map +1 -1
- package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js +8 -19
- package/dist/integration-engine/data-retention/workers/tasks/TableStorageRetentionTask.js.map +1 -1
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js +1 -1
- package/dist/integration-engine/jis/datasources/JISInfotextsDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js +56 -72
- package/dist/integration-engine/jis/repositories/JISInfotextsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js +32 -48
- package/dist/integration-engine/jis/repositories/JISInfotextsRopidGTFSStopsRepository.js.map +1 -1
- package/dist/integration-engine/jis/repositories/JISMetadataRepository.js +24 -37
- package/dist/integration-engine/jis/repositories/JISMetadataRepository.js.map +1 -1
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js +24 -35
- package/dist/integration-engine/jis/services/JISInfotextsDataService.js.map +1 -1
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js +2 -3
- package/dist/integration-engine/jis/transformations/JISInfotextsTransformation.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js +12 -23
- package/dist/integration-engine/jis/workers/tasks/FetchJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js +4 -15
- package/dist/integration-engine/jis/workers/tasks/RefreshJISInfotextsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js +3 -12
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopTimesModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js +2 -11
- package/dist/integration-engine/ropid-gtfs/RopidGTFSStopsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js +3 -12
- package/dist/integration-engine/ropid-gtfs/RopidGTFSTripsModel.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js +21 -30
- package/dist/integration-engine/ropid-gtfs/RopidGtfsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js +20 -29
- package/dist/integration-engine/ropid-gtfs/RopidGtfsMetadataRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js +33 -52
- package/dist/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js +12 -23
- package/dist/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js +12 -23
- package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js +33 -44
- package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js +10 -21
- package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js +15 -24
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js +3 -12
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js +3 -12
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js +4 -13
- package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js +30 -41
- package/dist/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js +11 -22
- package/dist/integration-engine/ropid-gtfs/helpers/DataCacheManager.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js +1 -2
- package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js +7 -16
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js +3 -12
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js +13 -17
- package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js +13 -22
- package/dist/integration-engine/ropid-gtfs/workers/presets/data-access/PresetLogRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js +1 -2
- package/dist/integration-engine/ropid-gtfs/workers/presets/datasources/grafana-loki/GrafanaLokiDataSourceProvider.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js +12 -23
- package/dist/integration-engine/ropid-gtfs/workers/presets/helpers/RopidMonitoringService.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js +14 -25
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CheckForNewDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js +26 -37
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/CollectAndSaveLogsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js +12 -23
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/DownloadDeparturesPresetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js +36 -49
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/ProcessAndSendLogsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js +3 -14
- package/dist/integration-engine/ropid-gtfs/workers/presets/tasks/SavePresetsDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js +1 -2
- package/dist/integration-engine/ropid-gtfs/workers/presets/transformations/PresetLogTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js +29 -40
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckForNewDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js +64 -81
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/CheckSavedRowsAndReplaceTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js +60 -79
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/DownloadDatasetsTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js +23 -34
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPrecomputedTablesTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js +26 -38
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/RefreshPublicGtfsDepartureCacheTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js +21 -32
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/SaveStaticDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js +43 -55
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/TransformAndSaveDataTask.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js +8 -18
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/DeparturesDirectionRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js +11 -21
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/data-access/MetroRailtrackGPSRepository.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js +8 -17
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/PrecomputedTablesFacade.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js +19 -30
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/helpers/RopidGtfsFactory.js.map +1 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js +8 -1
- package/dist/integration-engine/ropid-gtfs/workers/timetables/tasks/transformations/DeparturesDirectionTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js +31 -47
- package/dist/integration-engine/ropid-vymi/RopidVYMIEventsTransformation.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js +6 -17
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIEventsRoutesModel.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js +4 -14
- package/dist/integration-engine/ropid-vymi/models/RopidVYMIMetadataModel.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js +6 -17
- package/dist/integration-engine/ropid-vymi/workers/tasks/CheckForNewEventsTask.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js +34 -31
- package/dist/integration-engine/ropid-vymi/workers/tasks/FetchAndProcessEventsTask.js.map +1 -1
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js +3 -12
- package/dist/integration-engine/ropid-vymi/workers/tasks/helpers/RopidVYMIApiHelper.js.map +1 -1
- package/dist/integration-engine/shared/RopidMetadataModel.js +35 -45
- package/dist/integration-engine/shared/RopidMetadataModel.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js +13 -24
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/AlertsGenerator.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js +9 -6
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/helpers/VehicleDescriptor.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js +113 -128
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/tasks/GenerateFilesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js +20 -34
- package/dist/integration-engine/vehicle-positions/workers/gtfs-rt/transformations/AlertsTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/AbstractRunRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsMessagesRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js +12 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/data-access/CommonRunsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js +7 -16
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/CommonMessageProcessor.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js +22 -33
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/CisLookupManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js +31 -44
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/GtfsLookupManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js +14 -25
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/RegionalBusRunsFacade.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js +25 -37
- package/dist/integration-engine/vehicle-positions/workers/runs/helpers/regional-bus/TripScheduleManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js +53 -63
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessMetroRunMessagesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js +57 -72
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/ProcessRegionalBusRunMessagesTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js +15 -26
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveArrivaCityRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js +10 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveBusRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js +19 -30
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveMetroRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js +10 -21
- package/dist/integration-engine/vehicle-positions/workers/runs/tasks/SaveTramRunsToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js +5 -14
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/CommonRunsMessagesTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js +4 -14
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/MetroRunsMessageProcessingTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/runs/transformations/RegionalBusRunsMessagesTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js +35 -49
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/data-access/DescriptorRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js +11 -22
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/tasks/RefreshDescriptorsTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js +2 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-descriptors/transformations/DescriptorTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/CisStopRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js +19 -29
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/PositionsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/StopTimesHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js +3 -12
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsHistoryRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js +58 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/TripsRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js +64 -79
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicApiCacheRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js +46 -59
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/cache/PublicStopTimeCacheRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js +39 -6
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/helpers/TripsMapper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js +8 -19
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/metro/CachedMetroRailtrackLookup.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js +2 -13
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/data-access/views/PublicStopTimeRepository.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DPPUtils.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js +10 -16
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/DelayComputationManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js +68 -40
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/PositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js +5 -14
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/TripStopsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/VPUtils.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/anchor-points/AnchorPointSegmenter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js +4 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/ComputeDelayHelper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js +1 -2
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/AbstractDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js +4 -5
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/CommonDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js +3 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/compute-positions/strategy/MetroDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js +7 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-data/strategy/HttpGtfsTripDataFixer.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js +7 -16
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/AbstractGTFSTripRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js +40 -57
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripCommonRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js +36 -53
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/gtfs-trip-run/GTFSTripMetroRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js +32 -41
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/metro/MetroShapePointsFixer.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js +61 -33
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/RegionalBusPositionsManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js +4 -4
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/RegionalBusComputeDelayHelper.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js +4 -6
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/compute-positions/strategy/BusDelayAtStop.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js +38 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/helpers/regional-bus/gtfs-trip-run/GtfsTripRegionalBusRunManager.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js +32 -45
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/DataRetentionTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js +81 -91
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/ProcessRegionalBusPositionsTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js +43 -55
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js +37 -49
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/PropagateTrainDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js +7 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshGtfsTripDataTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js +41 -52
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicStopTimeCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js +32 -43
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/RefreshPublicTripCacheTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js +95 -115
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/SaveDataToDBTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js +150 -162
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js +82 -94
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateGtfsTripIdTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js +24 -35
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/UpdateRunsGtfsTripIdTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js +15 -18
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/abstract/AbstractPropagateDelayTask.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/tasks/helpers/UpdateDelayLimiter.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js +11 -21
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/MpvMessageTransformation.js.map +1 -1
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js +2 -3
- package/dist/integration-engine/vehicle-positions/workers/vehicle-positions/transformations/PublicApiTripTransformation.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js +5 -15
- package/dist/output-gateway/pid/controllers/v2/V2DepartureBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js +4 -13
- package/dist/output-gateway/pid/controllers/v2/V2InfotextsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js +4 -13
- package/dist/output-gateway/pid/controllers/v3/V3InfotextsController.js.map +1 -1
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +8 -17
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js.map +1 -1
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js +40 -53
- package/dist/output-gateway/pid/data-access/DeparturesRepository.js.map +1 -1
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js +62 -75
- package/dist/output-gateway/pid/data-access/JISInfotextRepository.js.map +1 -1
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js +2 -3
- package/dist/output-gateway/pid/helpers/DepartureBoardMapper.js.map +1 -1
- package/dist/output-gateway/pid/helpers/ParamValidatorManager.js +6 -15
- package/dist/output-gateway/pid/helpers/ParamValidatorManager.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +11 -21
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js +20 -27
- package/dist/output-gateway/pid/models/RopidDeparturesDirectionsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js +16 -25
- package/dist/output-gateway/pid/models/RopidVYMIEventsStopsModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js +2 -4
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js +12 -23
- package/dist/output-gateway/pid/service/facade/InfotextFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/StopFacade.js +27 -38
- package/dist/output-gateway/pid/service/facade/StopFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +32 -39
- package/dist/output-gateway/pid/service/facade/TransferFacade.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js +3 -4
- package/dist/output-gateway/pid/service/transformations/JISInfotextDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js +8 -12
- package/dist/output-gateway/pid/service/transformations/JISInfotextOverviewTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js +1 -2
- package/dist/output-gateway/pid/service/transformations/JISInfotextTransferTransformation.js.map +1 -1
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js +1 -2
- package/dist/output-gateway/pid/service/transformations/TransferDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js +4 -13
- package/dist/output-gateway/public/controllers/v2/V2PublicDepartureBoardsController.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js +4 -13
- package/dist/output-gateway/public/controllers/v2/V2PublicGtfsController.js.map +1 -1
- package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js +9 -18
- package/dist/output-gateway/public/controllers/v2/V2PublicVehiclePositionsController.js.map +1 -1
- package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js +13 -26
- package/dist/output-gateway/public/data-access/VehicleDescriptorCachedRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js +22 -33
- package/dist/output-gateway/public/data-access/redis/DelayComputationRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js +9 -20
- package/dist/output-gateway/public/data-access/redis/PublicGtfsDepartureRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js +23 -34
- package/dist/output-gateway/public/data-access/redis/PublicStopTimeRepository.js.map +1 -1
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +153 -172
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
- package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js +2 -2
- package/dist/output-gateway/public/routers/v2/helpers/CustomStopIdGroupValidator.js.map +1 -1
- package/dist/output-gateway/public/service/VPSubscriber.js +8 -19
- package/dist/output-gateway/public/service/VPSubscriber.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js +100 -117
- package/dist/output-gateway/public/service/facade/DepartureBoardFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js +18 -29
- package/dist/output-gateway/public/service/facade/DetailedTripFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js +20 -31
- package/dist/output-gateway/public/service/facade/GtfsTripLookupFacade.js.map +1 -1
- package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js +15 -26
- package/dist/output-gateway/public/service/facade/VehiclePositionsFacade.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js +1 -2
- package/dist/output-gateway/public/service/helpers/gtfs-trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js +3 -14
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/InfoTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js +7 -18
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/ShapesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js +35 -46
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/StopTimesTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js +16 -22
- package/dist/output-gateway/public/service/helpers/trip-scope/strategy/VehicleDescriptorTripScopeHandler.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js +9 -10
- package/dist/output-gateway/public/service/transformations/PublicDepartureTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js +5 -15
- package/dist/output-gateway/public/service/transformations/PublicVehiclePositionsTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js +2 -3
- package/dist/output-gateway/public/service/transformations/gtfs-trip-scopes/PublicGtfsTripInfoTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js +2 -15
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripInfoTransformation.js.map +1 -1
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js +1 -13
- package/dist/output-gateway/public/service/transformations/scopes/PublicVPTripStopTimesTransformation.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js +14 -25
- package/dist/output-gateway/ropid-gtfs/data-access/CisStopGroupRepository.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js +3 -12
- package/dist/output-gateway/ropid-gtfs/models/GTFSCalendarModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js +4 -13
- package/dist/output-gateway/ropid-gtfs/models/GTFSRoutesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js +5 -14
- package/dist/output-gateway/ropid-gtfs/models/GTFSShapesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js +90 -102
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js +3 -12
- package/dist/output-gateway/ropid-gtfs/models/GTFSStopTimesModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js +43 -51
- package/dist/output-gateway/ropid-gtfs/models/GTFSTripsModel.js.map +1 -1
- package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js +28 -37
- package/dist/output-gateway/ropid-gtfs/routers/v2/V2GTFSRouter.js.map +1 -1
- package/dist/output-gateway/shared/DepartureCalculator.js +1 -1
- package/dist/output-gateway/shared/DepartureCalculator.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js +40 -48
- package/dist/output-gateway/vehicle-positions/data-access/helpers/PositionOutputMapper.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js +7 -16
- package/dist/output-gateway/vehicle-positions/data-access/views/TripWithLastPositionRepository.js.map +1 -1
- package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js +10 -19
- package/dist/output-gateway/vehicle-positions/routers/v2/V2VehiclePositionsRouter.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js +5 -2
- package/dist/schema-definitions/ropid-gtfs/RopidGTFSRunNumbers.js.map +1 -1
- package/dist/schema-definitions/ropid-gtfs/index.js +16 -4
- package/dist/schema-definitions/ropid-gtfs/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -8,15 +8,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
21
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
22
13
|
};
|
|
@@ -33,18 +24,16 @@ let StaticFileRedisRepository = exports.StaticFileRedisRepository = StaticFileRe
|
|
|
33
24
|
prefix: StaticFileRedisRepository_1.NAMESPACE_PREFIX,
|
|
34
25
|
});
|
|
35
26
|
}
|
|
36
|
-
getCsvAsJson(key) {
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
resolve(results);
|
|
47
|
-
});
|
|
27
|
+
async getCsvAsJson(key) {
|
|
28
|
+
return await new Promise((resolve, reject) => {
|
|
29
|
+
const results = [];
|
|
30
|
+
this.getReadableStream(key)
|
|
31
|
+
.pipe((0, csv_parser_1.default)())
|
|
32
|
+
.on("data", (data) => {
|
|
33
|
+
results.push(data);
|
|
34
|
+
})
|
|
35
|
+
.on("end", () => {
|
|
36
|
+
resolve(results);
|
|
48
37
|
});
|
|
49
38
|
});
|
|
50
39
|
}
|
package/dist/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticFileRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StaticFileRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/StaticFileRedisRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wFAAqF;AACrF,iEAAgE;AAChE,4DAA6B;AAItB,IAAM,yBAAyB,qEAA/B,MAAM,yBAA0B,SAAQ,uBAAU;IAGrD;QACI,KAAK,CAAC,+BAA+B,EAAE;YACnC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,2BAAyB,CAAC,gBAAgB;SACrD,CAAC,CAAC;IACP,CAAC;IAEM,KAAK,CAAC,YAAY,CAAC,GAAW;QACjC,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,MAAM,OAAO,GAAyB,EAAE,CAAC;YAEzC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC;iBACtB,IAAI,CAAC,IAAA,oBAAG,GAAE,CAAC;iBACX,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;gBACjB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACvB,CAAC,CAAC;iBACD,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE;gBACZ,OAAO,CAAC,OAAO,CAAC,CAAC;YACrB,CAAC,CAAC,CAAC;QACX,CAAC,CAAC,CAAC;IACP,CAAC;;AAtBa,0CAAgB,GAAG,kBAAkB,AAArB,CAAsB;oCAD3C,yBAAyB;IADrC,IAAA,qBAAU,GAAE;;GACA,yBAAyB,CAwBrC"}
|
|
@@ -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.DeparturesRepository = void 0;
|
|
25
16
|
const RouteTypeEnums_1 = require("../../../../helpers/RouteTypeEnums");
|
|
@@ -43,7 +34,7 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
|
|
|
43
34
|
}, new golemio_validator_1.JSONSchemaValidator("DeparturesRepository", precomputed_1.DeparturesModel.jsonSchema));
|
|
44
35
|
this.config = config;
|
|
45
36
|
this.logger = logger;
|
|
46
|
-
this.createAndPopulate = (sourceTableSuffix) =>
|
|
37
|
+
this.createAndPopulate = async (sourceTableSuffix) => {
|
|
47
38
|
const nodeEnv = this.config.getValue("env.NODE_ENV", "development");
|
|
48
39
|
const timeConstraintLiteral = nodeEnv !== "test" ? `WHERE gtfs_timestamp(t.arrival_time, t4.date) > now() - interval '6 hours'` : "";
|
|
49
40
|
/* eslint-disable max-len */
|
|
@@ -95,7 +86,7 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
|
|
|
95
86
|
try {
|
|
96
87
|
const tableName = precomputed_1.DeparturesModel.TABLE_NAME;
|
|
97
88
|
const tmpTableName = tableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp;
|
|
98
|
-
|
|
89
|
+
await this.sequelizeModel.sequelize.query(`
|
|
99
90
|
SET LOCAL search_path TO ${const_1.PG_SCHEMA};
|
|
100
91
|
DROP TABLE IF EXISTS ${tmpTableName};
|
|
101
92
|
CREATE TABLE ${tmpTableName} (LIKE ${tableName} including all);
|
|
@@ -109,10 +100,10 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
|
|
|
109
100
|
this.logger.error(err);
|
|
110
101
|
throw err;
|
|
111
102
|
}
|
|
112
|
-
}
|
|
113
|
-
this.countDeparturesForPublicCache = (intervalParams) =>
|
|
103
|
+
};
|
|
104
|
+
this.countDeparturesForPublicCache = async (intervalParams) => {
|
|
114
105
|
try {
|
|
115
|
-
return
|
|
106
|
+
return await this.sequelizeModel.count({
|
|
116
107
|
where: {
|
|
117
108
|
[sequelize_1.Op.and]: {
|
|
118
109
|
departure_datetime: {
|
|
@@ -131,10 +122,10 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
|
|
|
131
122
|
catch (err) {
|
|
132
123
|
throw new golemio_errors_1.GeneralError("Error while getting number of departures", this.constructor.name, err);
|
|
133
124
|
}
|
|
134
|
-
}
|
|
135
|
-
this.getDepaturesForPublicCache = (page, pageSize, intervalParams) =>
|
|
125
|
+
};
|
|
126
|
+
this.getDepaturesForPublicCache = async (page, pageSize, intervalParams) => {
|
|
136
127
|
try {
|
|
137
|
-
return
|
|
128
|
+
return await this.sequelizeModel.findAll({
|
|
138
129
|
attributes: [
|
|
139
130
|
"stop_id",
|
|
140
131
|
"departure_datetime",
|
|
@@ -168,13 +159,13 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
|
|
|
168
159
|
catch (err) {
|
|
169
160
|
throw new golemio_errors_1.GeneralError("Error while getting departures for public cache", this.constructor.name, err);
|
|
170
161
|
}
|
|
171
|
-
}
|
|
172
|
-
this.replaceByTmp = (transaction) =>
|
|
162
|
+
};
|
|
163
|
+
this.replaceByTmp = async (transaction) => {
|
|
173
164
|
try {
|
|
174
165
|
const tableName = precomputed_1.DeparturesModel.TABLE_NAME;
|
|
175
166
|
const tmpTableName = tableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp;
|
|
176
167
|
const dropTableName = tableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Drop;
|
|
177
|
-
|
|
168
|
+
await this.sequelizeModel.sequelize.query(`
|
|
178
169
|
SET LOCAL search_path TO ${const_1.PG_SCHEMA};
|
|
179
170
|
LOCK ${tableName} IN EXCLUSIVE MODE;
|
|
180
171
|
ALTER TABLE ${tableName} RENAME TO ${dropTableName};
|
|
@@ -185,16 +176,16 @@ let DeparturesRepository = exports.DeparturesRepository = class DeparturesReposi
|
|
|
185
176
|
this.logger.error(err);
|
|
186
177
|
throw err;
|
|
187
178
|
}
|
|
188
|
-
}
|
|
189
|
-
this.analyze = () =>
|
|
179
|
+
};
|
|
180
|
+
this.analyze = async () => {
|
|
190
181
|
try {
|
|
191
|
-
|
|
182
|
+
await this.sequelizeModel.sequelize.query(`analyze ${const_1.PG_SCHEMA}.${precomputed_1.DeparturesModel.TABLE_NAME}${SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp};`);
|
|
192
183
|
}
|
|
193
184
|
catch (err) {
|
|
194
185
|
this.logger.error(err);
|
|
195
186
|
throw err;
|
|
196
187
|
}
|
|
197
|
-
}
|
|
188
|
+
};
|
|
198
189
|
}
|
|
199
190
|
};
|
|
200
191
|
exports.DeparturesRepository = DeparturesRepository = __decorate([
|
package/dist/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeparturesRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeparturesRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/DeparturesRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,uEAA4D;AAG5D,gEAAuC;AACvC,8FAAqE;AAErE,wEAAqE;AAErE,yEAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAClF,mEAAiF;AACjF,iEAAwE;AACxE,+EAA4E;AAGrE,IAAM,oBAAoB,kCAA1B,MAAM,oBAAqB,SAAQ,sBAAa;IACnD,YACoC,MAA6B,EACnC,MAAuB;QAEjD,KAAK,CACD,sBAAsB,EACtB;YACI,WAAW,EAAE,6BAAe,CAAC,UAAU;YACvC,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,6BAAe,CAAC,cAAc;YACzD,kBAAkB,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC;YACtD,UAAU,EAAE,YAAY;SAC3B,EACD,IAAI,uCAAmB,CAAC,sBAAsB,EAAE,6BAAe,CAAC,UAAU,CAAC,CAC9E,CAAC;QAbsC,WAAM,GAAN,MAAM,CAAe;QAC3B,WAAM,GAAN,MAAM,CAAS;QAe9C,sBAAiB,GAAG,KAAK,E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M,CAAC,CAAA;;GAHpB,oBAAoB,CA0LhC"}
|
package/dist/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.js
CHANGED
|
@@ -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.MinMaxStopSequencesRepository = void 0;
|
|
13
4
|
const const_1 = require("../../../../schema-definitions/const");
|
|
@@ -25,7 +16,7 @@ class MinMaxStopSequencesRepository extends models_1.PostgresModel {
|
|
|
25
16
|
savingType: "insertOnly",
|
|
26
17
|
attributesToRemove: ["id", "created_at", "updated_at"],
|
|
27
18
|
}, new golemio_validator_1.JSONSchemaValidator("MinMaxStopSequencesRepositoryValidator", ropid_gtfs_1.RopidGTFS.minMaxStopSequences.outputJsonSchema));
|
|
28
|
-
this.populate = (sourceTableSuffix) =>
|
|
19
|
+
this.populate = async (sourceTableSuffix) => {
|
|
29
20
|
const sql = `
|
|
30
21
|
SELECT
|
|
31
22
|
trip_id,
|
|
@@ -44,13 +35,13 @@ class MinMaxStopSequencesRepository extends models_1.PostgresModel {
|
|
|
44
35
|
`;
|
|
45
36
|
try {
|
|
46
37
|
const tmpTable = ropid_gtfs_1.RopidGTFS.minMaxStopSequences.pgTableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp;
|
|
47
|
-
|
|
38
|
+
await this.sequelizeModel.sequelize.query(`INSERT INTO "${const_1.PG_SCHEMA}"."${tmpTable}" ${sql};`);
|
|
48
39
|
}
|
|
49
40
|
catch (err) {
|
|
50
41
|
helpers_1.log.error(err);
|
|
51
42
|
throw err;
|
|
52
43
|
}
|
|
53
|
-
}
|
|
44
|
+
};
|
|
54
45
|
}
|
|
55
46
|
}
|
|
56
47
|
exports.MinMaxStopSequencesRepository = MinMaxStopSequencesRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MinMaxStopSequencesRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MinMaxStopSequencesRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/MinMaxStopSequencesRepository.ts"],"names":[],"mappings":";;;AAAA,gEAAuC;AACvC,0EAA4C;AAC5C,2EAAoE;AACpE,yEAAqF;AACrF,mFAAkF;AAClF,+EAA4E;AAE5E,MAAa,6BAA8B,SAAQ,sBAAa;IAC5D;QACI,KAAK,CACD,+BAA+B,EAC/B;YACI,yBAAyB,EAAE,sBAAS,CAAC,mBAAmB,CAAC,yBAAyB;YAClF,WAAW,EAAE,sBAAS,CAAC,mBAAmB,CAAC,WAAW;YACtD,QAAQ,EAAE,iBAAS;YACnB,UAAU,EAAE,YAAY;YACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC;SACzD,EACD,IAAI,uCAAmB,CAAC,wCAAwC,EAAE,sBAAS,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CACpH,CAAC;QAGC,aAAQ,GAAG,KAAK,EAAE,iBAAwC,EAAiB,EAAE;YAChF,MAAM,GAAG,GAAG;;;;;;;;;;;;;oBAaA,iBAAS,yBAAyB,iBAAiB;;SAE9D,CAAC;YAEF,IAAI;gBACA,MAAM,QAAQ,GAAG,sBAAS,CAAC,mBAAmB,CAAC,WAAW,GAAG,6CAAqB,CAAC,GAAG,CAAC;gBAEvF,MAAM,IAAI,CAAC,cAAc,CAAC,SAAU,CAAC,KAAK,CAAC,gBAAgB,iBAAS,MAAM,QAAQ,KAAK,GAAG,GAAG,CAAC,CAAC;aAClG;YAAC,OAAO,GAAG,EAAE;gBACV,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACf,MAAM,GAAG,CAAC;aACb;QACL,CAAC,CAAC;IA5BF,CAAC;CA6BJ;AA1CD,sEA0CC"}
|
package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js
CHANGED
|
@@ -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.ServicesCalendarRepository = void 0;
|
|
13
4
|
const const_1 = require("../../../../schema-definitions/const");
|
|
@@ -25,7 +16,7 @@ class ServicesCalendarRepository extends models_1.PostgresModel {
|
|
|
25
16
|
savingType: "insertOnly",
|
|
26
17
|
attributesToRemove: ["id", "created_at", "updated_at"],
|
|
27
18
|
}, new golemio_validator_1.JSONSchemaValidator("ServicesCalendarRepositoryValidator", ropid_gtfs_1.RopidGTFS.servicesCalendar.outputJsonSchema));
|
|
28
|
-
this.populate = (sourceTableSuffix) =>
|
|
19
|
+
this.populate = async (sourceTableSuffix) => {
|
|
29
20
|
const sql = `
|
|
30
21
|
SELECT
|
|
31
22
|
dates.date,
|
|
@@ -88,13 +79,13 @@ class ServicesCalendarRepository extends models_1.PostgresModel {
|
|
|
88
79
|
`;
|
|
89
80
|
try {
|
|
90
81
|
const tmpTable = ropid_gtfs_1.RopidGTFS.servicesCalendar.pgTableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp;
|
|
91
|
-
|
|
82
|
+
await this.sequelizeModel.sequelize.query(`INSERT INTO "${const_1.PG_SCHEMA}".${tmpTable} ${sql};`);
|
|
92
83
|
}
|
|
93
84
|
catch (err) {
|
|
94
85
|
helpers_1.log.error(err);
|
|
95
86
|
throw err;
|
|
96
87
|
}
|
|
97
|
-
}
|
|
88
|
+
};
|
|
98
89
|
}
|
|
99
90
|
}
|
|
100
91
|
exports.ServicesCalendarRepository = ServicesCalendarRepository;
|
package/dist/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServicesCalendarRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ServicesCalendarRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/ServicesCalendarRepository.ts"],"names":[],"mappings":";;;AAAA,gEAAuC;AACvC,0EAA4C;AAC5C,2EAAoE;AACpE,yEAAqF;AACrF,mFAAkF;AAClF,+EAA4E;AAE5E,MAAa,0BAA2B,SAAQ,sBAAa;IACzD;QACI,KAAK,CACD,4BAA4B,EAC5B;YACI,yBAAyB,EAAE,sBAAS,CAAC,gBAAgB,CAAC,yBAAyB;YAC/E,WAAW,EAAE,sBAAS,CAAC,gBAAgB,CAAC,WAAW;YACnD,QAAQ,EAAE,iBAAS;YACnB,UAAU,EAAE,YAAY;YACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC;SACzD,EACD,IAAI,uCAAmB,CAAC,qCAAqC,EAAE,sBAAS,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAC9G,CAAC;QAGC,aAAQ,GAAG,KAAK,EAAE,iBAAwC,EAAiB,EAAE;YAChF,MAAM,GAAG,GAAG;;;;;;;;;;;;;0BAaM,iBAAS,uBAAuB,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCA+BvC,iBAAS,6BAA6B,iBAAiB;;;;;;;;gCAQ3D,iBAAS,6BAA6B,iBAAiB;;;;;;;SAO9E,CAAC;YAEF,IAAI;gBACA,MAAM,QAAQ,GAAG,sBAAS,CAAC,gBAAgB,CAAC,WAAW,GAAG,6CAAqB,CAAC,GAAG,CAAC;gBAEpF,MAAM,IAAI,CAAC,cAAc,CAAC,SAAU,CAAC,KAAK,CAAC,gBAAgB,iBAAS,KAAK,QAAQ,IAAI,GAAG,GAAG,CAAC,CAAC;aAChG;YAAC,OAAO,GAAG,EAAE;gBACV,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACf,MAAM,GAAG,CAAC;aACb;QACL,CAAC,CAAC;IAxEF,CAAC;CAyEJ;AAtFD,gEAsFC"}
|
package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js
CHANGED
|
@@ -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.TripScheduleRepository = void 0;
|
|
13
4
|
const const_1 = require("../../../../schema-definitions/const");
|
|
@@ -26,9 +17,9 @@ class TripScheduleRepository extends models_1.PostgresModel {
|
|
|
26
17
|
attributesToRemove: ["id", "created_at", "updated_at"],
|
|
27
18
|
}, new golemio_validator_1.JSONSchemaValidator("TripScheduleRepositoryValidator", ropid_gtfs_1.RopidGTFS.tripSchedule.outputJsonSchema));
|
|
28
19
|
this.findAll = (options) => {
|
|
29
|
-
return this.sequelizeModel.findAll(
|
|
20
|
+
return this.sequelizeModel.findAll({ raw: true, ...options });
|
|
30
21
|
};
|
|
31
|
-
this.populate = (sourceTableSuffix) =>
|
|
22
|
+
this.populate = async (sourceTableSuffix) => {
|
|
32
23
|
/* eslint-disable max-len */
|
|
33
24
|
const sql = `
|
|
34
25
|
SELECT
|
|
@@ -95,7 +86,7 @@ class TripScheduleRepository extends models_1.PostgresModel {
|
|
|
95
86
|
/* eslint-enable max-len */
|
|
96
87
|
try {
|
|
97
88
|
const tmpTable = ropid_gtfs_1.RopidGTFS.tripSchedule.pgTableName + SourceTableSuffixEnum_1.SourceTableSuffixEnum.Tmp;
|
|
98
|
-
|
|
89
|
+
await this.sequelizeModel.sequelize.query(`
|
|
99
90
|
SET LOCAL search_path TO ${const_1.PG_SCHEMA};
|
|
100
91
|
INSERT INTO "${tmpTable}" ${sql};
|
|
101
92
|
`);
|
|
@@ -104,7 +95,7 @@ class TripScheduleRepository extends models_1.PostgresModel {
|
|
|
104
95
|
helpers_1.log.error(err);
|
|
105
96
|
throw err;
|
|
106
97
|
}
|
|
107
|
-
}
|
|
98
|
+
};
|
|
108
99
|
}
|
|
109
100
|
}
|
|
110
101
|
exports.TripScheduleRepository = TripScheduleRepository;
|
package/dist/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TripScheduleRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TripScheduleRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/precomputed/TripScheduleRepository.ts"],"names":[],"mappings":";;;AAAA,gEAAuC;AACvC,0EAA4C;AAE5C,2EAAoE;AACpE,yEAAqF;AACrF,mFAAkF;AAElF,+EAA4E;AAE5E,MAAa,sBAAuB,SAAQ,sBAAa;IACrD;QACI,KAAK,CACD,wBAAwB,EACxB;YACI,yBAAyB,EAAE,sBAAS,CAAC,YAAY,CAAC,yBAAyB;YAC3E,WAAW,EAAE,sBAAS,CAAC,YAAY,CAAC,WAAW;YAC/C,QAAQ,EAAE,iBAAS;YACnB,UAAU,EAAE,YAAY;YACxB,kBAAkB,EAAE,CAAC,IAAI,EAAE,YAAY,EAAE,YAAY,CAAC;SACzD,EACD,IAAI,uCAAmB,CAAC,iCAAiC,EAAE,sBAAS,CAAC,YAAY,CAAC,gBAAgB,CAAC,CACtG,CAAC;QAGC,YAAO,GAAG,CAAC,OAAoB,EAA2B,EAAE;YAC/D,OAAO,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;QAClE,CAAC,CAAC;QAEK,aAAQ,GAAG,KAAK,EAAE,iBAAwC,EAAiB,EAAE;YAChF,4BAA4B;YAC5B,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAqDI,iBAAS,0BAA0B,iBAAiB;8BAC9C,iBAAS;8BACT,iBAAS;6BACV,iBAAS,oBAAoB,iBAAiB;6BAC9C,iBAAS,qBAAqB,iBAAiB;6BAC/C,iBAAS,yBAAyB,iBAAiB;6BACnD,iBAAS,yBAAyB,iBAAiB;;SAEvE,CAAC;YACF,2BAA2B;YAE3B,IAAI;gBACA,MAAM,QAAQ,GAAG,sBAAS,CAAC,YAAY,CAAC,WAAW,GAAG,6CAAqB,CAAC,GAAG,CAAC;gBAEhF,MAAM,IAAI,CAAC,cAAc,CAAC,SAAU,CAAC,KAAK,CAAC;2CACZ,iBAAS;+BACrB,QAAQ,KAAK,GAAG;aAClC,CAAC,CAAC;aACN;YAAC,OAAO,GAAG,EAAE;gBACV,aAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;gBACf,MAAM,GAAG,CAAC;aACb;QACL,CAAC,CAAC;IAnFF,CAAC;CAoFJ;AAjGD,wDAiGC"}
|
|
@@ -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.DeparturePresetsFacade = void 0;
|
|
25
16
|
const ModuleContainerToken_1 = require("../../ioc/ModuleContainerToken");
|
|
@@ -38,42 +29,40 @@ let DeparturePresetsFacade = exports.DeparturePresetsFacade = class DeparturePre
|
|
|
38
29
|
this.transformationDeparturesPresets = transformationDeparturesPresets;
|
|
39
30
|
this.logger = logger;
|
|
40
31
|
}
|
|
41
|
-
handleNewDeparturePresets(data, lastModified) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
32
|
+
async handleNewDeparturePresets(data, lastModified) {
|
|
33
|
+
const dbLastModified = await this.metadataRepository.getLastModified(RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS);
|
|
34
|
+
await this.metadataRepository.save({
|
|
35
|
+
dataset: RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS,
|
|
36
|
+
key: RopidMetadataModel_1.MetaDatasetInfoKeyEnum.LAST_MODIFIED,
|
|
37
|
+
type: RopidMetadataModel_1.MetaTypeEnum.DATASET_INFO,
|
|
38
|
+
value: lastModified,
|
|
39
|
+
version: dbLastModified.version + 1,
|
|
40
|
+
});
|
|
41
|
+
const transformedData = await this.transformationDeparturesPresets.transform(data);
|
|
42
|
+
await this.metadataRepository.save({
|
|
43
|
+
dataset: RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS,
|
|
44
|
+
key: "departuresPresets",
|
|
45
|
+
type: RopidMetadataModel_1.MetaTypeEnum.TABLE_TOTAL_COUNT,
|
|
46
|
+
value: transformedData.length,
|
|
47
|
+
version: dbLastModified.version + 1,
|
|
48
|
+
});
|
|
49
|
+
try {
|
|
50
|
+
await this.departurePresetsRepository.truncate(true);
|
|
51
|
+
await this.departurePresetsRepository.save(transformedData, true);
|
|
52
|
+
await this.metadataRepository.save({
|
|
53
53
|
dataset: RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS,
|
|
54
54
|
key: "departuresPresets",
|
|
55
|
-
type: RopidMetadataModel_1.MetaTypeEnum.
|
|
56
|
-
value:
|
|
55
|
+
type: RopidMetadataModel_1.MetaTypeEnum.STATE,
|
|
56
|
+
value: RopidMetadataModel_1.MetaStateEnum.SAVED,
|
|
57
57
|
version: dbLastModified.version + 1,
|
|
58
58
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
value: RopidMetadataModel_1.MetaStateEnum.SAVED,
|
|
67
|
-
version: dbLastModified.version + 1,
|
|
68
|
-
});
|
|
69
|
-
yield this.metadataRepository.checkSavedRows(RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS, dbLastModified.version + 1);
|
|
70
|
-
yield this.metadataRepository.replaceTmpTables(RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS, dbLastModified.version + 1);
|
|
71
|
-
}
|
|
72
|
-
catch (err) {
|
|
73
|
-
this.logger.error(err);
|
|
74
|
-
yield this.metadataRepository.rollbackFailedSaving(RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS, dbLastModified.version + 1);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
59
|
+
await this.metadataRepository.checkSavedRows(RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS, dbLastModified.version + 1);
|
|
60
|
+
await this.metadataRepository.replaceTmpTables(RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS, dbLastModified.version + 1);
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
this.logger.error(err);
|
|
64
|
+
await this.metadataRepository.rollbackFailedSaving(RopidGtfsFacade_1.DatasetEnum.DEPARTURES_PRESETS, dbLastModified.version + 1);
|
|
65
|
+
}
|
|
77
66
|
}
|
|
78
67
|
};
|
|
79
68
|
exports.DeparturePresetsFacade = DeparturePresetsFacade = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeparturePresetsFacade.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DeparturePresetsFacade.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/facade/DeparturePresetsFacade.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,yEAAoE;AACpE,wEAAoG;AAGpG,6FAA0F;AAC1F,iEAAwE;AACxE,wDAAiD;AACjD,gFAA6E;AAC7E,0FAAuF;AACvF,4EAAyE;AACzE,kHAA+G;AAGxG,IAAM,sBAAsB,oCAA5B,MAAM,sBAAsB;IAC/B,YACyE,kBAA+C,EACnD,0BAAsD,EAE/G,+BAAqE,EACtC,MAAe;QAJe,uBAAkB,GAAlB,kBAAkB,CAA6B;QACnD,+BAA0B,GAA1B,0BAA0B,CAA4B;QAE/G,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,6BAAW,CAAC,kBAAkB,CAAC,CAAC;QACrG,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC/B,OAAO,EAAE,6BAAW,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,MAAM,IAAI,CAAC,+BAA+B,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAEnF,MAAM,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC;YAC/B,OAAO,EAAE,6BAAW,CAAC,kBAAkB;YACvC,GAAG,EAAE,mBAAmB;YACxB,IAAI,EAAE,iCAAY,CAAC,iBAAiB;YACp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,oCAAoC,CAAC,CAAA;IAEjE,WAAA,IAAA,iBAAM,EAAC,+BAAc,CAAC,MAAM,CAAC,CAAA;qCAJ2D,yDAA2B;QACvB,uDAA0B;QAE9E,2EAAoC;GALxE,sBAAsB,CA+ClC"}
|
|
@@ -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.DataCacheManager = void 0;
|
|
13
4
|
const RegionalBusGtfsCacheRepository_1 = require("../../vehicle-positions/workers/runs/data-access/cache/RegionalBusGtfsCacheRepository");
|
|
@@ -29,19 +20,17 @@ class DataCacheManager {
|
|
|
29
20
|
this.delayComputationRepository = new cache_1.DelayComputationRedisRepository();
|
|
30
21
|
this.regionalBusGtfsLookupCacheRepository = new RegionalBusGtfsCacheRepository_1.RegionalBusGtfsCacheRepository();
|
|
31
22
|
}
|
|
32
|
-
cleanCache() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
});
|
|
23
|
+
async cleanCache() {
|
|
24
|
+
try {
|
|
25
|
+
await this.staticFileRepository.truncate(true);
|
|
26
|
+
await this.runTripsRepository.truncate(true);
|
|
27
|
+
await this.blockStopsRepository.truncate(true);
|
|
28
|
+
await this.delayComputationRepository.truncate(true);
|
|
29
|
+
await this.regionalBusGtfsLookupCacheRepository.truncate(true);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
throw new golemio_errors_1.GeneralError("DataCacheManager: Failed to clean cache", this.constructor.name, err);
|
|
33
|
+
}
|
|
45
34
|
}
|
|
46
35
|
}
|
|
47
36
|
exports.DataCacheManager = DataCacheManager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataCacheManager.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/helpers/DataCacheManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DataCacheManager.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/helpers/DataCacheManager.ts"],"names":[],"mappings":";;;AAAA,0IAAqI;AACrI,6EAAwE;AACxE,gDAK8B;AAC9B,kCAA+C;AAC/C,4EAAyE;AAGzE,MAAa,gBAAgB;IAQlB,MAAM,CAAC,WAAW;QACrB,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,SAAS,GAAG,IAAI,gBAAgB,EAAE,CAAC;SAC3C;QAED,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;QACI,IAAI,CAAC,oBAAoB,GAAG,IAAI,iCAAyB,EAAE,CAAC;QAC5D,IAAI,CAAC,kBAAkB,GAAG,IAAI,+BAAuB,EAAE,CAAC;QACxD,IAAI,CAAC,oBAAoB,GAAG,uBAAkB,CAAC,OAAO,CAClD,iDAAuB,CAAC,yBAAyB,CACpD,CAAC;QACF,IAAI,CAAC,0BAA0B,GAAG,IAAI,uCAA+B,EAAE,CAAC;QACxE,IAAI,CAAC,oCAAoC,GAAG,IAAI,+DAA8B,EAAE,CAAC;IACrF,CAAC;IAEM,KAAK,CAAC,UAAU;QACnB,IAAI;YACA,MAAM,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC7C,MAAM,IAAI,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,IAAI,CAAC,0BAA0B,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YACrD,MAAM,IAAI,CAAC,oCAAoC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;SAClE;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAAC,yCAAyC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACjG;IACL,CAAC;CACJ;AArCD,4CAqCC"}
|
package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js
CHANGED
|
@@ -14,11 +14,10 @@ let PublicDepartureCacheTransformation = exports.PublicDepartureCacheTransformat
|
|
|
14
14
|
super(...arguments);
|
|
15
15
|
this.name = "PublicDepartureCacheTransformation";
|
|
16
16
|
this.transformInternal = (inputDto) => {
|
|
17
|
-
var _a, _b;
|
|
18
17
|
const outputDto = {
|
|
19
18
|
stop_id: inputDto.stop_id,
|
|
20
19
|
departure_datetime: inputDto.departure_datetime.toISOString(),
|
|
21
|
-
arrival_datetime:
|
|
20
|
+
arrival_datetime: inputDto.arrival_datetime?.toISOString() ?? null,
|
|
22
21
|
route_short_name: inputDto.route_short_name,
|
|
23
22
|
route_type: inputDto.route_type,
|
|
24
23
|
trip_id: inputDto.trip_id,
|
package/dist/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicDepartureCacheTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,6GAA0G;AAC1G,iEAAgE;AAIzD,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,+CAGvD;IAHM;;QAII,SAAI,GAAG,oCAAoC,CAAC;QAEzC,sBAAiB,GAAG,CAAC,QAA6B,EAAE,EAAE
|
|
1
|
+
{"version":3,"file":"PublicDepartureCacheTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/PublicDepartureCacheTransformation.ts"],"names":[],"mappings":";;;;;;;;;AACA,6GAA0G;AAC1G,iEAAgE;AAIzD,IAAM,kCAAkC,gDAAxC,MAAM,kCAAmC,SAAQ,+CAGvD;IAHM;;QAII,SAAI,GAAG,oCAAoC,CAAC;QAEzC,sBAAiB,GAAG,CAAC,QAA6B,EAAE,EAAE;YAC5D,MAAM,SAAS,GAAiC;gBAC5C,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,WAAW,EAAE;gBAC7D,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB,EAAE,WAAW,EAAE,IAAI,IAAI;gBAClE,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;gBAC3C,UAAU,EAAE,QAAQ,CAAC,UAAU;gBAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,aAAa,EAAE,QAAQ,CAAC,aAAa;gBACrC,aAAa,EAAE,QAAQ,CAAC,aAAa;aACxC,CAAC;YAEF,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;6CArBY,kCAAkC;IAD9C,IAAA,qBAAU,GAAE;GACA,kCAAkC,CAqB9C"}
|
package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js
CHANGED
|
@@ -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.RopidGTFSCisStopsTransformation = void 0;
|
|
13
4
|
const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
|
|
@@ -19,12 +10,12 @@ class RopidGTFSCisStopsTransformation extends transformations_1.BaseTransformati
|
|
|
19
10
|
/**
|
|
20
11
|
* Overrides BaseTransformation::transform
|
|
21
12
|
*/
|
|
22
|
-
this.transform = ({ data }) =>
|
|
13
|
+
this.transform = async ({ data }) => {
|
|
23
14
|
const res = {
|
|
24
15
|
cis_stop_groups: [],
|
|
25
16
|
cis_stops: [],
|
|
26
17
|
};
|
|
27
|
-
const promises = data.map((stopGroup) =>
|
|
18
|
+
const promises = data.map(async (stopGroup) => {
|
|
28
19
|
const promisesStops = stopGroup.stops.map((stop) => {
|
|
29
20
|
return {
|
|
30
21
|
alt_idos_name: stop.altIdosName,
|
|
@@ -39,7 +30,7 @@ class RopidGTFSCisStopsTransformation extends transformations_1.BaseTransformati
|
|
|
39
30
|
zone: stop.zone,
|
|
40
31
|
};
|
|
41
32
|
});
|
|
42
|
-
res.cis_stops.push(...(
|
|
33
|
+
res.cis_stops.push(...(await Promise.all(promisesStops)));
|
|
43
34
|
return {
|
|
44
35
|
avg_jtsk_x: stopGroup.avgJtskX,
|
|
45
36
|
avg_jtsk_y: stopGroup.avgJtskY,
|
|
@@ -55,11 +46,11 @@ class RopidGTFSCisStopsTransformation extends transformations_1.BaseTransformati
|
|
|
55
46
|
node: stopGroup.node,
|
|
56
47
|
unique_name: stopGroup.uniqueName,
|
|
57
48
|
};
|
|
58
|
-
})
|
|
59
|
-
res.cis_stop_groups = this.getUniqueStopGroups(
|
|
49
|
+
});
|
|
50
|
+
res.cis_stop_groups = this.getUniqueStopGroups(await Promise.all(promises));
|
|
60
51
|
return res;
|
|
61
|
-
}
|
|
62
|
-
this.transformElement = () =>
|
|
52
|
+
};
|
|
53
|
+
this.transformElement = async () => { };
|
|
63
54
|
this.getUniqueStopGroups = (data) => {
|
|
64
55
|
// duplicity checking
|
|
65
56
|
// TODO is it ok if all duplicate items are removed?
|
package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGTFSCisStopsTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSCisStopsTransformation.ts"],"names":[],"mappings":"
|
|
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,KAAK,EAAE,CAAC;QAIZ;;WAEG;QACI,cAAS,GAAG,KAAK,EAAE,EAAE,IAAI,EAA+B,EAAqC,EAAE;YAClG,MAAM,GAAG,GAA6B;gBAClC,eAAe,EAAE,EAAE;gBACnB,SAAS,EAAE,EAAE;aAChB,CAAC;YAEF,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE;gBAC1C,MAAM,aAAa,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAiC,EAAE,EAAE;oBAC5E,OAAO;wBACH,aAAa,EAAE,IAAI,CAA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EAAE,GAAE,CAAC,CAAC;QAElD,wBAAmB,GAAG,CAAC,IAAmC,EAAiC,EAAE;YACjG,qBAAqB;YACrB,oDAAoD;YACpD,MAAM,SAAS,GAAG,IAAI,GAAG,EAAE,CAAC;YAC5B,MAAM,sBAAsB,GAAa,EAAE,CAAC;YAC5C,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAClB,IAAI,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;oBACzB,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;oBACtC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBAC9B;qBAAM;oBACH,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;iBACjC;YACL,CAAC,CAAC,CAAC;YAEH,IAAI,sBAAsB,CAAC,MAAM,GAAG,CAAC,EAAE;gBACnC,aAAG,CAAC,IAAI,CACJ,2EAA2E;oBACvE,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAC7C,CAAC;aACL;YAED,OAAO,CAAC,GAAG,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;QACnC,CAAC,CAAC;QAxEE,IAAI,CAAC,IAAI,GAAG,sBAAS,CAAC,IAAI,GAAG,UAAU,CAAC;IAC5C,CAAC;CAwEJ;AA9ED,0EA8EC"}
|
|
@@ -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.RopidGTFSOisMappingTransformation = void 0;
|
|
13
4
|
const transformations_1 = require("@golemio/core/dist/integration-engine/transformations");
|
|
@@ -18,12 +9,12 @@ class RopidGTFSOisMappingTransformation extends transformations_1.BaseTransforma
|
|
|
18
9
|
/**
|
|
19
10
|
* Overrides BaseTransformation::transform
|
|
20
11
|
*/
|
|
21
|
-
this.transform = ({ data }) =>
|
|
12
|
+
this.transform = async ({ data }) => {
|
|
22
13
|
const promises = data.map((element) => {
|
|
23
14
|
return this.transformElement(element);
|
|
24
15
|
});
|
|
25
|
-
return
|
|
26
|
-
}
|
|
16
|
+
return await Promise.all(promises);
|
|
17
|
+
};
|
|
27
18
|
this.transformElement = (element) => {
|
|
28
19
|
return {
|
|
29
20
|
ois: element.ois,
|
package/dist/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGTFSOisTransformation.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/transformations/RopidGTFSOisTransformation.ts"],"names":[],"mappings":"
|
|
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"}
|