@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.
- package/db/migrations/postgresql/20250103092631-skip-missing.js +53 -0
- package/db/migrations/postgresql/sqls/20250103092631-skip-missing-down.sql +184 -0
- package/db/migrations/postgresql/sqls/20250103092631-skip-missing-up.sql +195 -0
- 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/RunTripsRedisRepository.js +2 -1
- package/dist/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.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.d.ts +1 -0
- package/dist/output-gateway/pid/controllers/v3/V3TransferBoardsController.js +20 -20
- 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/domain/DepartureInterfaces.d.ts +7 -0
- package/dist/output-gateway/pid/domain/DepartureInterfaces.js +3 -0
- package/dist/output-gateway/pid/domain/DepartureInterfaces.js.map +1 -0
- 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/index.d.ts +4 -5
- package/dist/output-gateway/pid/index.js +1 -0
- package/dist/output-gateway/pid/index.js.map +1 -1
- package/dist/output-gateway/pid/ioc/Di.js +4 -0
- package/dist/output-gateway/pid/ioc/Di.js.map +1 -1
- package/dist/output-gateway/pid/ioc/OgPidToken.d.ts +2 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js +2 -0
- package/dist/output-gateway/pid/ioc/OgPidToken.js.map +1 -1
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.d.ts +14 -28
- package/dist/output-gateway/pid/models/PIDDepartureBoardsModel.js +195 -84
- 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 +28 -18
- package/dist/output-gateway/pid/models/helpers/PIDDepartureModel.js.map +1 -1
- package/dist/output-gateway/pid/models/helpers/SkipHelper.d.ts +19 -0
- package/dist/output-gateway/pid/models/helpers/SkipHelper.js +116 -0
- package/dist/output-gateway/pid/models/helpers/SkipHelper.js.map +1 -0
- package/dist/output-gateway/pid/models/helpers/const.d.ts +4 -0
- package/dist/output-gateway/pid/models/helpers/const.js +8 -0
- package/dist/output-gateway/pid/models/helpers/const.js.map +1 -0
- package/dist/output-gateway/pid/models/helpers/interfaces/IPIDDepartureQueryOptions.d.ts +4 -1
- package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.d.ts +21 -0
- package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js +3 -0
- package/dist/output-gateway/pid/models/interfaces/IGetDeparturesOptions.js.map +1 -0
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.js +1 -1
- package/dist/output-gateway/pid/routers/v3/V3PIDRouter.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.d.ts +1 -1
- package/dist/output-gateway/pid/service/facade/TransferFacade.js +34 -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.d.ts +4 -2
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js +178 -175
- package/dist/output-gateway/public/data-access/redis/PublicVehiclePositionsRepository.js.map +1 -1
- package/dist/output-gateway/public/domain/repository/IVehiclePositionsRepository.d.ts +2 -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/data-access/redis/RunTripsRedisRepository.d.ts +10 -0
- package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js +65 -0
- package/dist/output-gateway/ropid-gtfs/data-access/redis/RunTripsRedisRepository.js.map +1 -0
- package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.d.ts +4 -0
- package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js +3 -0
- package/dist/output-gateway/ropid-gtfs/domain/repository/IRunTripsRedisRepository.js.map +1 -0
- 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/shared/constants/validations.js +1 -1
- package/dist/output-gateway/shared/constants/validations.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/dist/schema-definitions/ropid-gtfs/redis/const.d.ts +1 -0
- package/dist/schema-definitions/ropid-gtfs/redis/const.js +2 -1
- package/dist/schema-definitions/ropid-gtfs/redis/const.js.map +1 -1
- package/docs/openapi-output.yaml +11 -3
- 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.RopidGtfsRepository = void 0;
|
|
25
16
|
const const_1 = require("../../../schema-definitions/const");
|
|
@@ -36,54 +27,44 @@ let RopidGtfsRepository = exports.RopidGtfsRepository = class RopidGtfsRepositor
|
|
|
36
27
|
this.replaceAllProcedure = "ropidgtfs_replaceAllSavedTables";
|
|
37
28
|
this.createPrecomputedTmpTablesProcedure = "ropidgtfs_preparePrecomputedTmpTables";
|
|
38
29
|
}
|
|
39
|
-
replaceAllTable(tables, t) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
bind: [tables.join(",")],
|
|
46
|
-
});
|
|
30
|
+
async replaceAllTable(tables, t) {
|
|
31
|
+
this.logger.info(`Replacing tmp for actual tables: ${tables.join(", ")}`);
|
|
32
|
+
const connection = this.connector.getConnection();
|
|
33
|
+
await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.replaceAllProcedure}($1);`, {
|
|
34
|
+
transaction: t,
|
|
35
|
+
bind: [tables.join(",")],
|
|
47
36
|
});
|
|
48
37
|
}
|
|
49
|
-
createTmpTables() {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
yield connection.query(`CALL ${const_1.PG_SCHEMA}.${this.preparationProcedure}();`);
|
|
54
|
-
});
|
|
38
|
+
async createTmpTables() {
|
|
39
|
+
this.logger.info(`Creating tmp tables`);
|
|
40
|
+
const connection = this.connector.getConnection();
|
|
41
|
+
await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.preparationProcedure}();`);
|
|
55
42
|
}
|
|
56
|
-
createPrecomputedTmpTables() {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
yield connection.query(`CALL ${const_1.PG_SCHEMA}.${this.createPrecomputedTmpTablesProcedure}();`);
|
|
61
|
-
});
|
|
43
|
+
async createPrecomputedTmpTables() {
|
|
44
|
+
this.logger.info(`Creating precomputed tmp tables`);
|
|
45
|
+
const connection = this.connector.getConnection();
|
|
46
|
+
await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.createPrecomputedTmpTablesProcedure}();`);
|
|
62
47
|
}
|
|
63
|
-
cleanTmpAndOldTables() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
});
|
|
48
|
+
async cleanTmpAndOldTables() {
|
|
49
|
+
try {
|
|
50
|
+
this.logger.info(`Cleaning tmp and old tables`);
|
|
51
|
+
const connection = this.connector.getConnection();
|
|
52
|
+
await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.cleaningOldProcedure}();`);
|
|
53
|
+
await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.cleaningTmpProcedure}();`);
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
this.logger.error(new golemio_errors_1.GeneralError("Error while cleaning tmp and old tables", this.constructor.name, err));
|
|
57
|
+
}
|
|
75
58
|
}
|
|
76
|
-
cleanOldTables() {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
}
|
|
86
|
-
});
|
|
59
|
+
async cleanOldTables() {
|
|
60
|
+
try {
|
|
61
|
+
this.logger.info(`Cleaning tmp and old tables`);
|
|
62
|
+
const connection = this.connector.getConnection();
|
|
63
|
+
await connection.query(`CALL ${const_1.PG_SCHEMA}.${this.cleaningOldProcedure}();`);
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
this.logger.error(new golemio_errors_1.GeneralError("Error while cleaning old tables", this.constructor.name, err));
|
|
67
|
+
}
|
|
87
68
|
}
|
|
88
69
|
};
|
|
89
70
|
exports.RopidGtfsRepository = RopidGtfsRepository = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RopidGtfsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RopidGtfsRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/data-access/RopidGtfsRepository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAAuC;AAEvC,wEAAqE;AAErE,6EAAwE;AAExE,iEAAwE;AAGjE,IAAM,mBAAmB,iCAAzB,MAAM,mBAAmB;IAO5B,YACyC,SAAqC,EAChD,MAAuB;QADJ,cAAS,GAAT,SAAS,CAAoB;QACxC,WAAM,GAAN,MAAM,CAAS;QAR7C,yBAAoB,GAAG,4BAA4B,CAAC;QACpD,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,yBAAoB,GAAG,0BAA0B,CAAC;QAClD,wBAAmB,GAAG,iCAAiC,CAAC;QACxD,wCAAmC,GAAG,uCAAuC,CAAC;IAKnF,CAAC;IAEG,KAAK,CAAC,eAAe,CAAC,MAAgB,EAAE,CAAc;QACzD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,oCAAoC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1E,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QAClD,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,iBAAS,IAAI,IAAI,CAAC,mBAAmB,OAAO,EAAE;YACzE,WAAW,EAAE,CAAC;YACd,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC3B,CAAC,CAAC;IACP,CAAC;IAEM,KAAK,CAAC,eAAe;QACxB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACxC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QAClD,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,iBAAS,IAAI,IAAI,CAAC,oBAAoB,KAAK,CAAC,CAAC;IAChF,CAAC;IAEM,KAAK,CAAC,0BAA0B;QACnC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;QACpD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;QAClD,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,iBAAS,IAAI,IAAI,CAAC,mCAAmC,KAAK,CAAC,CAAC;IAC/F,CAAC;IAEM,KAAK,CAAC,oBAAoB;QAC7B,IAAI;YACA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAChD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;YAClD,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,iBAAS,IAAI,IAAI,CAAC,oBAAoB,KAAK,CAAC,CAAC;YAC5E,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,iBAAS,IAAI,IAAI,CAAC,oBAAoB,KAAK,CAAC,CAAC;SAC/E;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,6BAAY,CAAC,yCAAyC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;SAC9G;IACL,CAAC;IAEM,KAAK,CAAC,cAAc;QACvB,IAAI;YACA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;YAChD,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;YAClD,MAAM,UAAU,CAAC,KAAK,CAAC,QAAQ,iBAAS,IAAI,IAAI,CAAC,oBAAoB,KAAK,CAAC,CAAC;SAC/E;QAAC,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,6BAAY,CAAC,iCAAiC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;SACtG;IACL,CAAC;CACJ,CAAA;8BArDY,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IASJ,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;;GATpB,mBAAmB,CAqD/B"}
|
|
@@ -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.RouteSubAgencyRepository = void 0;
|
|
13
4
|
const const_1 = require("../../../schema-definitions/const");
|
|
@@ -25,20 +16,18 @@ class RouteSubAgencyRepository extends models_1.PostgresModel {
|
|
|
25
16
|
savingType: "insertOnly",
|
|
26
17
|
}, new golemio_validator_1.JSONSchemaValidator("RouteSubAgencyRepository", RouteSubAgencyDto_1.RouteSubAgencyDto.jsonSchema));
|
|
27
18
|
}
|
|
28
|
-
findSubAgenciesByCisLineIds(cisLineIds) {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
});
|
|
19
|
+
async findSubAgenciesByCisLineIds(cisLineIds) {
|
|
20
|
+
try {
|
|
21
|
+
return await this.sequelizeModel.findAll({
|
|
22
|
+
attributes: ["route_licence_number", "route_id", "sub_agency_name"],
|
|
23
|
+
where: {
|
|
24
|
+
route_licence_number: cisLineIds,
|
|
25
|
+
},
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
throw new golemio_errors_1.GeneralError("findSubAgenciesByCisLineIds: failed to get sub-agencies", this.name, err);
|
|
30
|
+
}
|
|
42
31
|
}
|
|
43
32
|
}
|
|
44
33
|
exports.RouteSubAgencyRepository = RouteSubAgencyRepository;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteSubAgencyRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RouteSubAgencyRepository.js","sourceRoot":"","sources":["../../../../src/integration-engine/ropid-gtfs/data-access/RouteSubAgencyRepository.ts"],"names":[],"mappings":";;;AAAA,6DAAuC;AACvC,uEAA4C;AAC5C,uGAA6E;AAC7E,yEAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAElF,MAAa,wBAAyB,SAAQ,sBAAa;IACvD;QACI,KAAK,CACD,0BAA0B,EAC1B;YACI,WAAW,EAAE,sBAAS,CAAC,kBAAkB,CAAC,WAAW;YACrD,QAAQ,EAAE,iBAAS;YACnB,yBAAyB,EAAE,qCAAiB,CAAC,cAAc;YAC3D,UAAU,EAAE,YAAY;SAC3B,EACD,IAAI,uCAAmB,CAAC,0BAA0B,EAAE,qCAAiB,CAAC,UAAU,CAAC,CACpF,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,2BAA2B,CAAC,UAAoB;QACzD,IAAI;YACA,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAoB;gBACxD,UAAU,EAAE,CAAC,sBAAsB,EAAE,UAAU,EAAE,iBAAiB,CAAC;gBACnE,KAAK,EAAE;oBACH,oBAAoB,EAAE,UAAU;iBACnC;aACJ,CAAC,CAAC;SACN;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAAC,yDAAyD,EAAE,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SACrG;IACL,CAAC;CACJ;AA1BD,4DA0BC"}
|
package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.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.DelayComputationRedisRepository = void 0;
|
|
13
4
|
const DelayComputationDtoSchema_1 = require("../../../../schema-definitions/ropid-gtfs/redis/schemas/DelayComputationDtoSchema");
|
|
@@ -24,20 +15,18 @@ class DelayComputationRedisRepository extends RedisModel_1.RedisModel {
|
|
|
24
15
|
prefix: DelayComputationRedisRepository.NAMESPACE_PREFIX,
|
|
25
16
|
}, new golemio_validator_1.JSONSchemaValidator("GTFSDelayComputationRedisRepositoryValidator", DelayComputationDtoSchema_1.DelayComputationDtoSchema));
|
|
26
17
|
}
|
|
27
|
-
expire(keys, ttlInSeconds) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
});
|
|
18
|
+
async expire(keys, ttlInSeconds) {
|
|
19
|
+
const pipeline = this.connection.pipeline();
|
|
20
|
+
for (const key of keys) {
|
|
21
|
+
const redisKey = `${this.prefix}:${key}`;
|
|
22
|
+
pipeline.expire(redisKey, ttlInSeconds);
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
await pipeline.exec();
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
throw new golemio_errors_1.GeneralError("Error while expiring keys in Redis", this.constructor.name, err);
|
|
29
|
+
}
|
|
41
30
|
}
|
|
42
31
|
}
|
|
43
32
|
exports.DelayComputationRedisRepository = DelayComputationRedisRepository;
|
package/dist/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DelayComputationRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DelayComputationRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/DelayComputationRedisRepository.ts"],"names":[],"mappings":";;;AAAA,iIAAoG;AACpG,wFAA6F;AAC7F,wFAAqF;AACrF,6EAAwE;AACxE,mFAAkF;AAElF,MAAa,+BAAgC,SAAQ,uBAAU;IAG3D;QACI,KAAK,CACD,qCAAqC,EACrC;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,IAAI;YAC9B,MAAM,EAAE,+BAA+B,CAAC,gBAAgB;SAC3D,EACD,IAAI,uCAAmB,CAAC,8CAA8C,EAAE,qDAAyB,CAAC,CACrG,CAAC;IACN,CAAC;IAEM,KAAK,CAAC,MAAM,CAAC,IAAc,EAAE,YAAoB;QACpD,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;QAC5C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;YACpB,MAAM,QAAQ,GAAG,GAAG,IAAI,CAAC,MAAM,IAAI,GAAG,EAAE,CAAC;YACzC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;SAC3C;QAED,IAAI;YACA,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;SACzB;QAAC,OAAO,GAAG,EAAE;YACV,MAAM,IAAI,6BAAY,CAAC,oCAAoC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;SAC5F;IACL,CAAC;;AA5BL,0EA6BC;AA5BiB,gDAAgB,GAAG,+CAAuC,CAAC"}
|
package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js
CHANGED
|
@@ -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 PublicGtfsDepartureRepository_1;
|
|
21
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
13
|
exports.PublicGtfsDepartureRepository = void 0;
|
|
@@ -41,45 +32,43 @@ let PublicGtfsDepartureRepository = exports.PublicGtfsDepartureRepository = Publ
|
|
|
41
32
|
* - remove departures that are in the same time range as the new ones
|
|
42
33
|
* (to prevent duplicates and to keep the cache clean and up-to-date)
|
|
43
34
|
*/
|
|
44
|
-
replaceDeparturesForStop(departures, stopId, intervalParams) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
35
|
+
async replaceDeparturesForStop(departures, stopId, intervalParams) {
|
|
36
|
+
try {
|
|
37
|
+
await this.validator.Validate(departures);
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
throw new golemio_errors_1.ValidationError("Error while validating departures", this.constructor.name, err);
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
const sortedSetKey = `${this.prefix}:${stopId}`;
|
|
44
|
+
const pipeline = this.connection.pipeline();
|
|
45
|
+
// Automatically remove departures that are older than 3 hours to keep the cache clean
|
|
46
|
+
pipeline.zremrangebyscore(sortedSetKey, "-inf", new Date().getTime() / 1000 - 3 * 3600);
|
|
47
|
+
if (departures.length === 0) {
|
|
48
|
+
// If stop already has an empty object it will just update the empty objects score/time
|
|
49
|
+
pipeline.zadd(sortedSetKey, new Date().getTime() / 1000, "{}");
|
|
51
50
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
51
|
+
else {
|
|
52
|
+
// remove empty departures from stop
|
|
53
|
+
pipeline.zrem(sortedSetKey, "{}");
|
|
54
|
+
const firstDepartureScore = new Date(departures[0].departure_datetime).getTime() / 1000;
|
|
55
|
+
const lastDepartureScore = new Date(departures[departures.length - 1].departure_datetime).getTime() / 1000;
|
|
56
|
+
// Remove departures that are in the same time range
|
|
57
|
+
pipeline.zremrangebyscore(sortedSetKey, firstDepartureScore, lastDepartureScore);
|
|
58
|
+
for (const departure of departures) {
|
|
59
|
+
const departureScore = new Date(departure.departure_datetime).getTime() / 1000;
|
|
60
|
+
pipeline.zadd(sortedSetKey, departureScore, JSON.stringify(departure));
|
|
60
61
|
}
|
|
61
|
-
else {
|
|
62
|
-
// remove empty departures from stop
|
|
63
|
-
pipeline.zrem(sortedSetKey, "{}");
|
|
64
|
-
const firstDepartureScore = new Date(departures[0].departure_datetime).getTime() / 1000;
|
|
65
|
-
const lastDepartureScore = new Date(departures[departures.length - 1].departure_datetime).getTime() / 1000;
|
|
66
|
-
// Remove departures that are in the same time range
|
|
67
|
-
pipeline.zremrangebyscore(sortedSetKey, firstDepartureScore, lastDepartureScore);
|
|
68
|
-
for (const departure of departures) {
|
|
69
|
-
const departureScore = new Date(departure.departure_datetime).getTime() / 1000;
|
|
70
|
-
pipeline.zadd(sortedSetKey, departureScore, JSON.stringify(departure));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
pipeline.expire(sortedSetKey, intervalParams.intervalToHours * 3600);
|
|
74
|
-
yield pipeline.exec();
|
|
75
62
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
63
|
+
pipeline.expire(sortedSetKey, intervalParams.intervalToHours * 3600);
|
|
64
|
+
await pipeline.exec();
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
if (err instanceof golemio_errors_1.AbstractGolemioError) {
|
|
68
|
+
throw err;
|
|
81
69
|
}
|
|
82
|
-
|
|
70
|
+
throw new golemio_errors_1.GeneralError(`${this.constructor.name}: error while saving departures`, this.constructor.name, err);
|
|
71
|
+
}
|
|
83
72
|
}
|
|
84
73
|
};
|
|
85
74
|
PublicGtfsDepartureRepository.NAMESPACE_PREFIX = const_1.PUBLIC_DEPARTURE_NAMESPACE_PREFIX;
|
package/dist/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicGtfsDepartureRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PublicGtfsDepartureRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/PublicGtfsDepartureRepository.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RunTripsRedisRepository = void 0;
|
|
4
|
+
const const_1 = require("../../../../schema-definitions/ropid-gtfs/redis/const");
|
|
4
5
|
const GtfsRunTripCacheDtoSchema_1 = require("../../../../schema-definitions/vehicle-positions/redis/schemas/GtfsRunTripCacheDtoSchema");
|
|
5
6
|
const RedisModel_1 = require("@golemio/core/dist/integration-engine/models/RedisModel");
|
|
6
7
|
const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
|
|
@@ -15,5 +16,5 @@ class RunTripsRedisRepository extends RedisModel_1.RedisModel {
|
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
exports.RunTripsRedisRepository = RunTripsRedisRepository;
|
|
18
|
-
RunTripsRedisRepository.NAMESPACE_PREFIX =
|
|
19
|
+
RunTripsRedisRepository.NAMESPACE_PREFIX = const_1.GTFS_RUN_SCHEDULE_NAMESPACE_PREFIX;
|
|
19
20
|
//# sourceMappingURL=RunTripsRedisRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunTripsRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.ts"],"names":[],"mappings":";;;AAAA,wIAA2G;AAC3G,wFAAqF;AACrF,mFAAkF;AAElF,MAAa,uBAAwB,SAAQ,uBAAU;IAGnD;QACI,KAAK,CACD,6BAA6B,EAC7B;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,uBAAuB,CAAC,gBAAgB;SACnD,EACD,IAAI,uCAAmB,CAAC,sCAAsC,EAAE,qDAAyB,CAAC,CAC7F,CAAC;IACN,CAAC;;AAdL,0DAeC;AAdiB,wCAAgB,GAAG,
|
|
1
|
+
{"version":3,"file":"RunTripsRedisRepository.js","sourceRoot":"","sources":["../../../../../src/integration-engine/ropid-gtfs/data-access/cache/RunTripsRedisRepository.ts"],"names":[],"mappings":";;;AAAA,iFAAiF;AACjF,wIAA2G;AAC3G,wFAAqF;AACrF,mFAAkF;AAElF,MAAa,uBAAwB,SAAQ,uBAAU;IAGnD;QACI,KAAK,CACD,6BAA6B,EAC7B;YACI,kBAAkB,EAAE,IAAI,CAAC,KAAK;YAC9B,oBAAoB,EAAE,IAAI,CAAC,SAAS;YACpC,wBAAwB,EAAE,KAAK;YAC/B,MAAM,EAAE,uBAAuB,CAAC,gBAAgB;SACnD,EACD,IAAI,uCAAmB,CAAC,sCAAsC,EAAE,qDAAyB,CAAC,CAC7F,CAAC;IACN,CAAC;;AAdL,0DAeC;AAdiB,wCAAgB,GAAG,0CAAkC,CAAC"}
|
|
@@ -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":"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"}
|
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"}
|