@cratis/arc 19.11.1 → 20.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Globals.ts +20 -1
- package/dist/cjs/Globals.d.ts +4 -0
- package/dist/cjs/Globals.d.ts.map +1 -1
- package/dist/cjs/Globals.js +6 -1
- package/dist/cjs/Globals.js.map +1 -1
- package/dist/cjs/queries/HubConnectionKeepAlive.d.ts +11 -0
- package/dist/cjs/queries/HubConnectionKeepAlive.d.ts.map +1 -0
- package/dist/cjs/queries/HubConnectionKeepAlive.js +33 -0
- package/dist/cjs/queries/HubConnectionKeepAlive.js.map +1 -0
- package/dist/cjs/queries/IObservableQueryHubConnection.d.ts +11 -0
- package/dist/cjs/queries/IObservableQueryHubConnection.d.ts.map +1 -0
- package/dist/cjs/queries/IReconnectPolicy.d.ts +8 -0
- package/dist/cjs/queries/IReconnectPolicy.d.ts.map +1 -0
- package/dist/cjs/queries/ObservableQueryConnection.d.ts +3 -1
- package/dist/cjs/queries/ObservableQueryConnection.d.ts.map +1 -1
- package/dist/cjs/queries/ObservableQueryConnection.js +8 -21
- package/dist/cjs/queries/ObservableQueryConnection.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryConnectionFactory.d.ts +13 -0
- package/dist/cjs/queries/ObservableQueryConnectionFactory.d.ts.map +1 -0
- package/dist/cjs/queries/ObservableQueryConnectionFactory.js +62 -0
- package/dist/cjs/queries/ObservableQueryConnectionFactory.js.map +1 -0
- package/dist/cjs/queries/ObservableQueryConnectionPool.d.ts +9 -0
- package/dist/cjs/queries/ObservableQueryConnectionPool.d.ts.map +1 -0
- package/dist/cjs/queries/ObservableQueryConnectionPool.js +23 -0
- package/dist/cjs/queries/ObservableQueryConnectionPool.js.map +1 -0
- package/dist/cjs/queries/ObservableQueryFor.d.ts +1 -0
- package/dist/cjs/queries/ObservableQueryFor.d.ts.map +1 -1
- package/dist/cjs/queries/ObservableQueryFor.js +10 -5
- package/dist/cjs/queries/ObservableQueryFor.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryMultiplexer.d.ts +30 -0
- package/dist/cjs/queries/ObservableQueryMultiplexer.d.ts.map +1 -0
- package/dist/cjs/queries/ObservableQueryMultiplexer.js +120 -0
- package/dist/cjs/queries/ObservableQueryMultiplexer.js.map +1 -0
- package/dist/cjs/queries/QueryInstanceCache.d.ts +29 -0
- package/dist/cjs/queries/QueryInstanceCache.d.ts.map +1 -0
- package/dist/cjs/queries/QueryInstanceCache.js +95 -0
- package/dist/cjs/queries/QueryInstanceCache.js.map +1 -0
- package/dist/cjs/queries/QueryTransportMethod.d.ts +5 -0
- package/dist/cjs/queries/QueryTransportMethod.d.ts.map +1 -0
- package/dist/cjs/queries/QueryTransportMethod.js +8 -0
- package/dist/cjs/queries/QueryTransportMethod.js.map +1 -0
- package/dist/cjs/queries/ReconnectPolicy.d.ts +15 -0
- package/dist/cjs/queries/ReconnectPolicy.d.ts.map +1 -0
- package/dist/cjs/queries/ReconnectPolicy.js +43 -0
- package/dist/cjs/queries/ReconnectPolicy.js.map +1 -0
- package/dist/cjs/queries/ServerSentEventHubConnection.d.ts +39 -0
- package/dist/cjs/queries/ServerSentEventHubConnection.d.ts.map +1 -0
- package/dist/cjs/queries/ServerSentEventHubConnection.js +233 -0
- package/dist/cjs/queries/ServerSentEventHubConnection.js.map +1 -0
- package/dist/cjs/queries/ServerSentEventQueryConnection.d.ts +14 -0
- package/dist/cjs/queries/ServerSentEventQueryConnection.d.ts.map +1 -0
- package/dist/cjs/queries/ServerSentEventQueryConnection.js +59 -0
- package/dist/cjs/queries/ServerSentEventQueryConnection.js.map +1 -0
- package/dist/cjs/queries/WebSocketHubConnection.d.ts +55 -0
- package/dist/cjs/queries/WebSocketHubConnection.d.ts.map +1 -0
- package/dist/cjs/queries/WebSocketHubConnection.js +193 -0
- package/dist/cjs/queries/WebSocketHubConnection.js.map +1 -0
- package/dist/cjs/queries/for_HubConnectionKeepAlive/behavior.d.ts +2 -0
- package/dist/cjs/queries/for_HubConnectionKeepAlive/behavior.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts +1 -2
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts.map +1 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts +9 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts.map +1 -0
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts +2 -0
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts.map +1 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts +2 -0
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts.map +1 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts +2 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts.map +1 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts +2 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts.map +1 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts +2 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts.map +1 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts +2 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts.map +1 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts +2 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts.map +1 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts +2 -0
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts +21 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts.map +1 -0
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts +2 -0
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts.map +1 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts +23 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts.map +1 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts +2 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts.map +1 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts +2 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts.map +1 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts +2 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts.map +1 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts +2 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts.map +1 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts +2 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts.map +1 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts +2 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts.map +1 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts +2 -0
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts.map +1 -0
- package/dist/cjs/queries/index.d.ts +12 -0
- package/dist/cjs/queries/index.d.ts.map +1 -1
- package/dist/cjs/queries/index.js +34 -0
- package/dist/cjs/queries/index.js.map +1 -1
- package/dist/esm/Globals.d.ts +4 -0
- package/dist/esm/Globals.d.ts.map +1 -1
- package/dist/esm/Globals.js +6 -1
- package/dist/esm/Globals.js.map +1 -1
- package/dist/esm/queries/HubConnectionKeepAlive.d.ts +11 -0
- package/dist/esm/queries/HubConnectionKeepAlive.d.ts.map +1 -0
- package/dist/esm/queries/HubConnectionKeepAlive.js +31 -0
- package/dist/esm/queries/HubConnectionKeepAlive.js.map +1 -0
- package/dist/esm/queries/IObservableQueryHubConnection.d.ts +11 -0
- package/dist/esm/queries/IObservableQueryHubConnection.d.ts.map +1 -0
- package/dist/esm/queries/IObservableQueryHubConnection.js +2 -0
- package/dist/esm/queries/IObservableQueryHubConnection.js.map +1 -0
- package/dist/esm/queries/IReconnectPolicy.d.ts +8 -0
- package/dist/esm/queries/IReconnectPolicy.d.ts.map +1 -0
- package/dist/esm/queries/IReconnectPolicy.js +2 -0
- package/dist/esm/queries/IReconnectPolicy.js.map +1 -0
- package/dist/esm/queries/ObservableQueryConnection.d.ts +3 -1
- package/dist/esm/queries/ObservableQueryConnection.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryConnection.js +8 -21
- package/dist/esm/queries/ObservableQueryConnection.js.map +1 -1
- package/dist/esm/queries/ObservableQueryConnectionFactory.d.ts +13 -0
- package/dist/esm/queries/ObservableQueryConnectionFactory.d.ts.map +1 -0
- package/dist/esm/queries/ObservableQueryConnectionFactory.js +58 -0
- package/dist/esm/queries/ObservableQueryConnectionFactory.js.map +1 -0
- package/dist/esm/queries/ObservableQueryConnectionPool.d.ts +9 -0
- package/dist/esm/queries/ObservableQueryConnectionPool.d.ts.map +1 -0
- package/dist/esm/queries/ObservableQueryConnectionPool.js +21 -0
- package/dist/esm/queries/ObservableQueryConnectionPool.js.map +1 -0
- package/dist/esm/queries/ObservableQueryFor.d.ts +1 -0
- package/dist/esm/queries/ObservableQueryFor.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryFor.js +10 -5
- package/dist/esm/queries/ObservableQueryFor.js.map +1 -1
- package/dist/esm/queries/ObservableQueryMultiplexer.d.ts +30 -0
- package/dist/esm/queries/ObservableQueryMultiplexer.d.ts.map +1 -0
- package/dist/esm/queries/ObservableQueryMultiplexer.js +114 -0
- package/dist/esm/queries/ObservableQueryMultiplexer.js.map +1 -0
- package/dist/esm/queries/QueryInstanceCache.d.ts +29 -0
- package/dist/esm/queries/QueryInstanceCache.d.ts.map +1 -0
- package/dist/esm/queries/QueryInstanceCache.js +93 -0
- package/dist/esm/queries/QueryInstanceCache.js.map +1 -0
- package/dist/esm/queries/QueryTransportMethod.d.ts +5 -0
- package/dist/esm/queries/QueryTransportMethod.d.ts.map +1 -0
- package/dist/esm/queries/QueryTransportMethod.js +8 -0
- package/dist/esm/queries/QueryTransportMethod.js.map +1 -0
- package/dist/esm/queries/ReconnectPolicy.d.ts +15 -0
- package/dist/esm/queries/ReconnectPolicy.d.ts.map +1 -0
- package/dist/esm/queries/ReconnectPolicy.js +41 -0
- package/dist/esm/queries/ReconnectPolicy.js.map +1 -0
- package/dist/esm/queries/ServerSentEventHubConnection.d.ts +39 -0
- package/dist/esm/queries/ServerSentEventHubConnection.d.ts.map +1 -0
- package/dist/esm/queries/ServerSentEventHubConnection.js +231 -0
- package/dist/esm/queries/ServerSentEventHubConnection.js.map +1 -0
- package/dist/esm/queries/ServerSentEventQueryConnection.d.ts +14 -0
- package/dist/esm/queries/ServerSentEventQueryConnection.d.ts.map +1 -0
- package/dist/esm/queries/ServerSentEventQueryConnection.js +56 -0
- package/dist/esm/queries/ServerSentEventQueryConnection.js.map +1 -0
- package/dist/esm/queries/WebSocketHubConnection.d.ts +55 -0
- package/dist/esm/queries/WebSocketHubConnection.d.ts.map +1 -0
- package/dist/esm/queries/WebSocketHubConnection.js +191 -0
- package/dist/esm/queries/WebSocketHubConnection.js.map +1 -0
- package/dist/esm/queries/for_HubConnectionKeepAlive/behavior.d.ts +2 -0
- package/dist/esm/queries/for_HubConnectionKeepAlive/behavior.d.ts.map +1 -0
- package/dist/esm/queries/for_HubConnectionKeepAlive/behavior.js +57 -0
- package/dist/esm/queries/for_HubConnectionKeepAlive/behavior.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts +1 -2
- package/dist/esm/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts.map +1 -1
- package/dist/esm/queries/for_ObservableQueryConnection/given/an_observable_query_connection.js +9 -5
- package/dist/esm/queries/for_ObservableQueryConnection/given/an_observable_query_connection.js.map +1 -1
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts +9 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.js +19 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.js +49 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.js +47 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.js +54 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.js +49 -0
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.js +34 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.js +18 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.js +32 -0
- package/dist/esm/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.js +54 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.js +55 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts +2 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts.map +1 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.js +45 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.js.map +1 -0
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_partially_missing_required_arguments.js +18 -11
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_partially_missing_required_arguments.js.map +1 -1
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_route_and_query_args.js +12 -5
- package/dist/esm/queries/for_ObservableQueryFor/when_subscribing/with_route_and_query_args.js.map +1 -1
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_arguments.js +12 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_arguments.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.js +11 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.js +13 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/without_arguments.js +11 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_building_key/without_arguments.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.js +12 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.js +16 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.js +23 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.js +16 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.js +17 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.js +13 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.js +17 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.js.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts +2 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts.map +1 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.js +15 -0
- package/dist/esm/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.js.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts +2 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.js +24 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.js.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts +2 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.js +24 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.js.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts +2 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_resetting/after_scheduling.js +29 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_resetting/after_scheduling.js.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts +2 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.js +33 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.js.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts +2 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.js +28 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.js.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts +2 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts.map +1 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.js +29 -0
- package/dist/esm/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts +21 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.js +50 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.js +24 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.js +27 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.js +26 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.js +46 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.js +21 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.js +32 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.js +21 -0
- package/dist/esm/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.js +38 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.js +23 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.js +24 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.js.map +1 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts +2 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts.map +1 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.js +24 -0
- package/dist/esm/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.js.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts +23 -0
- package/dist/esm/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.js +47 -0
- package/dist/esm/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.js.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts +2 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.js +24 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.js.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts +2 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.js +29 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.js.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts +2 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.js +31 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.js.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts +2 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.js +30 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.js.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts +2 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.js +31 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.js.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts +2 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.js +32 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.js.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts +2 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts.map +1 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.js +23 -0
- package/dist/esm/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.js.map +1 -0
- package/dist/esm/queries/index.d.ts +12 -0
- package/dist/esm/queries/index.d.ts.map +1 -1
- package/dist/esm/queries/index.js +10 -0
- package/dist/esm/queries/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/queries/HubConnectionKeepAlive.ts +61 -0
- package/queries/IObservableQueryHubConnection.ts +50 -0
- package/queries/IReconnectPolicy.ts +39 -0
- package/queries/ObservableQueryConnection.ts +8 -24
- package/queries/ObservableQueryConnectionFactory.ts +118 -0
- package/queries/ObservableQueryConnectionPool.ts +64 -0
- package/queries/ObservableQueryFor.ts +11 -5
- package/queries/ObservableQueryMultiplexer.ts +214 -0
- package/queries/QueryInstanceCache.ts +243 -0
- package/queries/QueryTransportMethod.ts +17 -0
- package/queries/ReconnectPolicy.ts +68 -0
- package/queries/ServerSentEventHubConnection.ts +309 -0
- package/queries/ServerSentEventQueryConnection.ts +84 -0
- package/queries/WebSocketHubConnection.ts +291 -0
- package/queries/for_HubConnectionKeepAlive/behavior.ts +73 -0
- package/queries/for_ObservableQueryConnection/given/an_observable_query_connection.ts +13 -9
- package/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.ts +26 -0
- package/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.ts +62 -0
- package/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.ts +59 -0
- package/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.ts +69 -0
- package/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.ts +61 -0
- package/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.ts +47 -0
- package/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.ts +26 -0
- package/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.ts +44 -0
- package/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.ts +69 -0
- package/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.ts +70 -0
- package/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.ts +57 -0
- package/queries/for_ObservableQueryFor/when_subscribing/with_partially_missing_required_arguments.ts +19 -11
- package/queries/for_ObservableQueryFor/when_subscribing/with_route_and_query_args.ts +14 -7
- package/queries/for_QueryInstanceCache/when_building_key/with_arguments.ts +17 -0
- package/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.ts +16 -0
- package/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.ts +18 -0
- package/queries/for_QueryInstanceCache/when_building_key/without_arguments.ts +16 -0
- package/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.ts +17 -0
- package/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.ts +23 -0
- package/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.ts +29 -0
- package/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.ts +21 -0
- package/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.ts +21 -0
- package/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.ts +18 -0
- package/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.ts +23 -0
- package/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.ts +20 -0
- package/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.ts +33 -0
- package/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.ts +33 -0
- package/queries/for_ReconnectPolicy/when_resetting/after_scheduling.ts +39 -0
- package/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.ts +44 -0
- package/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.ts +38 -0
- package/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.ts +39 -0
- package/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.ts +85 -0
- package/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.ts +46 -0
- package/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.ts +34 -0
- package/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.ts +48 -0
- package/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.ts +62 -0
- package/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.ts +31 -0
- package/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.ts +42 -0
- package/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.ts +32 -0
- package/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.ts +63 -0
- package/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.ts +31 -0
- package/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.ts +36 -0
- package/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.ts +38 -0
- package/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.ts +81 -0
- package/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.ts +31 -0
- package/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.ts +47 -0
- package/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.ts +53 -0
- package/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.ts +41 -0
- package/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.ts +43 -0
- package/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.ts +42 -0
- package/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.ts +30 -0
- package/queries/index.ts +12 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with_pending_timer.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ReconnectPolicy/when_canceling/with_pending_timer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ReconnectPolicy } from '../../ReconnectPolicy';
|
|
3
|
+
describe('when canceling a pending reconnect', () => {
|
|
4
|
+
let policy;
|
|
5
|
+
let clock;
|
|
6
|
+
let callbackStub;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
clock = sinon.useFakeTimers();
|
|
9
|
+
policy = new ReconnectPolicy(100, 500, 500, 10_000);
|
|
10
|
+
callbackStub = sinon.stub();
|
|
11
|
+
policy.schedule(callbackStub, 'url');
|
|
12
|
+
policy.cancel();
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
clock.restore();
|
|
16
|
+
sinon.restore();
|
|
17
|
+
});
|
|
18
|
+
it('should not invoke the callback after the timer would have fired', () => {
|
|
19
|
+
clock.tick(60_000);
|
|
20
|
+
callbackStub.callCount.should.equal(0);
|
|
21
|
+
});
|
|
22
|
+
it('should preserve the attempt counter', () => policy.attempt.should.equal(1));
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=with_pending_timer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with_pending_timer.js","sourceRoot":"","sources":["../../../../../queries/for_ReconnectPolicy/when_canceling/with_pending_timer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,QAAQ,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAChD,IAAI,MAAuB,CAAC;IAC5B,IAAI,KAA4B,CAAC;IACjC,IAAI,YAA6B,CAAC;IAElC,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAC9B,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACpD,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAG5B,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,MAAM,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QACvE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with_pending_timer.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ReconnectPolicy } from '../../ReconnectPolicy';
|
|
3
|
+
describe('when canceling a pending reconnect', () => {
|
|
4
|
+
let policy;
|
|
5
|
+
let clock;
|
|
6
|
+
let callbackStub;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
clock = sinon.useFakeTimers();
|
|
9
|
+
policy = new ReconnectPolicy(100, 500, 500, 10_000);
|
|
10
|
+
callbackStub = sinon.stub();
|
|
11
|
+
policy.schedule(callbackStub, 'url');
|
|
12
|
+
policy.cancel();
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
clock.restore();
|
|
16
|
+
sinon.restore();
|
|
17
|
+
});
|
|
18
|
+
it('should not invoke the callback after the timer would have fired', () => {
|
|
19
|
+
clock.tick(60_000);
|
|
20
|
+
callbackStub.callCount.should.equal(0);
|
|
21
|
+
});
|
|
22
|
+
it('should preserve the attempt counter', () => policy.attempt.should.equal(1));
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=with_pending_timer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with_pending_timer.js","sourceRoot":"","sources":["../../../../../queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,QAAQ,CAAC,oCAAoC,EAAE,GAAG,EAAE;IAChD,IAAI,MAAuB,CAAC;IAC5B,IAAI,KAA4B,CAAC;IACjC,IAAI,YAA6B,CAAC;IAElC,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAC9B,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACpD,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAG5B,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,MAAM,CAAC,MAAM,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iEAAiE,EAAE,GAAG,EAAE;QACvE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACpF,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after_scheduling.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ReconnectPolicy/when_resetting/after_scheduling.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ReconnectPolicy } from '../../ReconnectPolicy';
|
|
3
|
+
describe('when resetting the reconnect policy', () => {
|
|
4
|
+
let policy;
|
|
5
|
+
let clock;
|
|
6
|
+
let callbackStub;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
clock = sinon.useFakeTimers();
|
|
9
|
+
policy = new ReconnectPolicy(100, 500, 500, 10_000);
|
|
10
|
+
callbackStub = sinon.stub();
|
|
11
|
+
policy.schedule(callbackStub, 'url');
|
|
12
|
+
policy.reset();
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
clock.restore();
|
|
16
|
+
sinon.restore();
|
|
17
|
+
});
|
|
18
|
+
it('should reset the attempt counter to 0', () => policy.attempt.should.equal(0));
|
|
19
|
+
it('should cancel the pending timer so the callback is never invoked', () => {
|
|
20
|
+
clock.tick(60_000);
|
|
21
|
+
callbackStub.callCount.should.equal(0);
|
|
22
|
+
});
|
|
23
|
+
it('should allow rescheduling from attempt 1 again', () => {
|
|
24
|
+
const rescheduled = policy.schedule(callbackStub, 'url');
|
|
25
|
+
rescheduled.should.be.true;
|
|
26
|
+
policy.attempt.should.equal(1);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=after_scheduling.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after_scheduling.js","sourceRoot":"","sources":["../../../../../queries/for_ReconnectPolicy/when_resetting/after_scheduling.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;IACjD,IAAI,MAAuB,CAAC;IAC5B,IAAI,KAA4B,CAAC;IACjC,IAAI,YAA6B,CAAC;IAElC,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAC9B,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACpD,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAG5B,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,MAAM,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAElF,EAAE,CAAC,kEAAkE,EAAE,GAAG,EAAE;QACxE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACtD,MAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACzD,WAAW,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;QAC3B,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delay_is_capped_at_max.d.ts","sourceRoot":"","sources":["../../../../../../queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ReconnectPolicy } from '../../../ReconnectPolicy';
|
|
3
|
+
describe('when scheduling and delay is capped at max', () => {
|
|
4
|
+
let policy;
|
|
5
|
+
let clock;
|
|
6
|
+
let callbackStub;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
clock = sinon.useFakeTimers();
|
|
9
|
+
policy = new ReconnectPolicy(100, 500, 500, 2_000);
|
|
10
|
+
callbackStub = sinon.stub();
|
|
11
|
+
policy.schedule(callbackStub, 'url');
|
|
12
|
+
clock.tick(1000);
|
|
13
|
+
policy.schedule(callbackStub, 'url');
|
|
14
|
+
clock.tick(1500);
|
|
15
|
+
policy.schedule(callbackStub, 'url');
|
|
16
|
+
clock.tick(2000);
|
|
17
|
+
callbackStub.reset();
|
|
18
|
+
policy.schedule(callbackStub, 'url');
|
|
19
|
+
});
|
|
20
|
+
afterEach(() => {
|
|
21
|
+
clock.restore();
|
|
22
|
+
sinon.restore();
|
|
23
|
+
});
|
|
24
|
+
it('should not fire before the cap delay', () => {
|
|
25
|
+
clock.tick(1999);
|
|
26
|
+
callbackStub.callCount.should.equal(0);
|
|
27
|
+
});
|
|
28
|
+
it('should fire exactly at the cap delay', () => {
|
|
29
|
+
clock.tick(2000);
|
|
30
|
+
callbackStub.calledOnce.should.be.true;
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=delay_is_capped_at_max.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delay_is_capped_at_max.js","sourceRoot":"","sources":["../../../../../../queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,QAAQ,CAAC,4CAA4C,EAAE,GAAG,EAAE;IACxD,IAAI,MAAuB,CAAC;IAC5B,IAAI,KAA4B,CAAC;IACjC,IAAI,YAA6B,CAAC;IAElC,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAE9B,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QACnD,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAG5B,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,YAAY,CAAC,KAAK,EAAE,CAAC;QAErB,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAC5C,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"first_attempt.d.ts","sourceRoot":"","sources":["../../../../../../queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ReconnectPolicy } from '../../../ReconnectPolicy';
|
|
3
|
+
describe('when scheduling and max attempts not reached', () => {
|
|
4
|
+
let policy;
|
|
5
|
+
let clock;
|
|
6
|
+
let callbackStub;
|
|
7
|
+
let scheduled;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
clock = sinon.useFakeTimers();
|
|
10
|
+
policy = new ReconnectPolicy(100, 500, 500, 10_000);
|
|
11
|
+
callbackStub = sinon.stub();
|
|
12
|
+
scheduled = policy.schedule(callbackStub, 'test-label');
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
clock.restore();
|
|
16
|
+
sinon.restore();
|
|
17
|
+
});
|
|
18
|
+
it('should return true', () => scheduled.should.be.true);
|
|
19
|
+
it('should increment the attempt counter to 1', () => policy.attempt.should.equal(1));
|
|
20
|
+
it('should not invoke the callback immediately', () => callbackStub.callCount.should.equal(0));
|
|
21
|
+
describe('when the delay elapses', () => {
|
|
22
|
+
beforeEach(() => {
|
|
23
|
+
clock.tick(1000);
|
|
24
|
+
});
|
|
25
|
+
it('should invoke the callback once', () => callbackStub.calledOnce.should.be.true);
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=first_attempt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"first_attempt.js","sourceRoot":"","sources":["../../../../../../queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,QAAQ,CAAC,8CAA8C,EAAE,GAAG,EAAE;IAC1D,IAAI,MAAuB,CAAC;IAC5B,IAAI,KAA4B,CAAC;IACjC,IAAI,YAA6B,CAAC;IAClC,IAAI,SAAkB,CAAC;IAEvB,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAC9B,MAAM,GAAG,IAAI,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACpD,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAE5B,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oBAAoB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACzD,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACtF,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAE/F,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;QACpC,UAAU,CAAC,GAAG,EAAE;YAEZ,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACxF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abandons_reconnect.d.ts","sourceRoot":"","sources":["../../../../../../queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ReconnectPolicy } from '../../../ReconnectPolicy';
|
|
3
|
+
describe('when scheduling and max attempts reached', () => {
|
|
4
|
+
let policy;
|
|
5
|
+
let clock;
|
|
6
|
+
let callbackStub;
|
|
7
|
+
let scheduled;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
clock = sinon.useFakeTimers();
|
|
10
|
+
policy = new ReconnectPolicy(2, 500, 500, 10_000);
|
|
11
|
+
callbackStub = sinon.stub();
|
|
12
|
+
policy.schedule(callbackStub, 'url');
|
|
13
|
+
clock.tick(1000);
|
|
14
|
+
policy.schedule(callbackStub, 'url');
|
|
15
|
+
clock.tick(1500);
|
|
16
|
+
callbackStub.reset();
|
|
17
|
+
scheduled = policy.schedule(callbackStub, 'url');
|
|
18
|
+
});
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
clock.restore();
|
|
21
|
+
sinon.restore();
|
|
22
|
+
});
|
|
23
|
+
it('should return false', () => scheduled.should.be.false);
|
|
24
|
+
it('should not invoke the callback', () => {
|
|
25
|
+
clock.tick(60_000);
|
|
26
|
+
callbackStub.callCount.should.equal(0);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
//# sourceMappingURL=abandons_reconnect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abandons_reconnect.js","sourceRoot":"","sources":["../../../../../../queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE3D,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;IACtD,IAAI,MAAuB,CAAC;IAC5B,IAAI,KAA4B,CAAC;IACjC,IAAI,YAA6B,CAAC;IAClC,IAAI,SAAkB,CAAC;IAEvB,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAE9B,MAAM,GAAG,IAAI,eAAe,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QAClD,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAE5B,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,YAAY,CAAC,KAAK,EAAE,CAAC;QAGrB,SAAS,GAAG,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAC3D,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;QACtC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnB,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ServerSentEventHubConnection } from '../../ServerSentEventHubConnection';
|
|
3
|
+
import { IReconnectPolicy } from '../../IReconnectPolicy';
|
|
4
|
+
export declare class a_server_sent_event_hub_connection {
|
|
5
|
+
connection: ServerSentEventHubConnection;
|
|
6
|
+
fakeEventSource: {
|
|
7
|
+
onopen: (() => void) | null;
|
|
8
|
+
onmessage: ((event: MessageEvent) => void) | null;
|
|
9
|
+
onerror: (() => void) | null;
|
|
10
|
+
close: sinon.SinonStub;
|
|
11
|
+
readyState: number;
|
|
12
|
+
};
|
|
13
|
+
policy: sinon.SinonStubbedInstance<IReconnectPolicy>;
|
|
14
|
+
fetchStub: sinon.SinonStub;
|
|
15
|
+
constructor();
|
|
16
|
+
setup(): void;
|
|
17
|
+
simulateOpen(): void;
|
|
18
|
+
simulateMessage(payload: object): void;
|
|
19
|
+
simulateError(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=a_server_sent_event_hub_connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a_server_sent_event_hub_connection.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAqB,MAAM,wBAAwB,CAAC;AAI7E,qBAAa,kCAAkC;IAC3C,UAAU,EAAG,4BAA4B,CAAC;IAC1C,eAAe,EAAG;QACd,MAAM,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;QAC5B,SAAS,EAAE,CAAC,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;QAClD,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;QAC7B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,UAAU,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,MAAM,EAAG,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACtD,SAAS,EAAG,KAAK,CAAC,SAAS,CAAC;;IAW5B,KAAK,IAAI,IAAI;IA0Cb,YAAY,IAAI,IAAI;IAKpB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAItC,aAAa,IAAI,IAAI;CAGxB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ServerSentEventHubConnection } from '../../ServerSentEventHubConnection';
|
|
3
|
+
export class a_server_sent_event_hub_connection {
|
|
4
|
+
connection;
|
|
5
|
+
fakeEventSource;
|
|
6
|
+
policy;
|
|
7
|
+
fetchStub;
|
|
8
|
+
constructor() {
|
|
9
|
+
this.setup();
|
|
10
|
+
}
|
|
11
|
+
setup() {
|
|
12
|
+
this.fakeEventSource = {
|
|
13
|
+
onopen: null,
|
|
14
|
+
onmessage: null,
|
|
15
|
+
onerror: null,
|
|
16
|
+
close: sinon.stub(),
|
|
17
|
+
readyState: 0,
|
|
18
|
+
};
|
|
19
|
+
const self = this;
|
|
20
|
+
const FakeEventSourceClass = function () {
|
|
21
|
+
Object.assign(self.fakeEventSource, { onopen: null, onmessage: null, onerror: null });
|
|
22
|
+
self.fakeEventSource.readyState = 0;
|
|
23
|
+
return self.fakeEventSource;
|
|
24
|
+
};
|
|
25
|
+
globalThis['EventSource'] = FakeEventSourceClass;
|
|
26
|
+
globalThis['EventSource'].CONNECTING = 0;
|
|
27
|
+
globalThis['EventSource'].OPEN = 1;
|
|
28
|
+
globalThis['EventSource'].CLOSED = 2;
|
|
29
|
+
this.fetchStub = sinon.stub().resolves({ ok: true });
|
|
30
|
+
globalThis['fetch'] = this.fetchStub;
|
|
31
|
+
this.policy = {
|
|
32
|
+
attempt: 0,
|
|
33
|
+
schedule: sinon.stub().returns(true),
|
|
34
|
+
reset: sinon.stub(),
|
|
35
|
+
cancel: sinon.stub(),
|
|
36
|
+
};
|
|
37
|
+
this.connection = new ServerSentEventHubConnection('http://localhost/.cratis/queries/sse', 'http://localhost/.cratis/queries/sse/subscribe', 'http://localhost/.cratis/queries/sse/unsubscribe', '', undefined, undefined, this.policy);
|
|
38
|
+
}
|
|
39
|
+
simulateOpen() {
|
|
40
|
+
this.fakeEventSource.readyState = 1;
|
|
41
|
+
this.fakeEventSource.onopen?.();
|
|
42
|
+
}
|
|
43
|
+
simulateMessage(payload) {
|
|
44
|
+
this.fakeEventSource.onmessage?.({ data: JSON.stringify(payload) });
|
|
45
|
+
}
|
|
46
|
+
simulateError() {
|
|
47
|
+
this.fakeEventSource.onerror?.();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=a_server_sent_event_hub_connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a_server_sent_event_hub_connection.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAKlF,MAAM,OAAO,kCAAkC;IAC3C,UAAU,CAAgC;IAC1C,eAAe,CAMb;IACF,MAAM,CAAgD;IACtD,SAAS,CAAmB;IAE5B;QACI,IAAI,CAAC,KAAK,EAAE,CAAC;IACjB,CAAC;IAOD,KAAK;QACD,IAAI,CAAC,eAAe,GAAG;YACnB,MAAM,EAAE,IAAI;YACZ,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE;YACnB,UAAU,EAAE,CAAC;SAChB,CAAC;QAGF,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,MAAM,oBAAoB,GAAG;YACzB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACtF,IAAI,CAAC,eAAe,CAAC,UAAU,GAAG,CAAC,CAAC;YACpC,OAAO,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC,CAAC;QACD,UAAkB,CAAC,aAAa,CAAC,GAAG,oBAAoB,CAAC;QACzD,UAAkB,CAAC,aAAa,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC;QACjD,UAAkB,CAAC,aAAa,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;QAC3C,UAAkB,CAAC,aAAa,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC;QAE9C,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;QACpD,UAAkB,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC;QAE9C,IAAI,CAAC,MAAM,GAAG;YACV,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,KAAK,CAAC,IAAI,EAAwC,CAAC,OAAO,CAAC,IAAI,CAAC;YAC1E,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE;YACnB,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE;SACvB,CAAC;QAEF,IAAI,CAAC,UAAU,GAAG,IAAI,4BAA4B,CAC9C,sCAAsC,EACtC,gDAAgD,EAChD,kDAAkD,EAClD,EAAE,EACF,SAAS,EACT,SAAS,EACT,IAAI,CAAC,MAAM,CACd,CAAC;IACN,CAAC;IAED,YAAY;QACR,IAAI,CAAC,eAAe,CAAC,UAAU,GAAG,CAAC,CAAC;QACpC,IAAI,CAAC,eAAe,CAAC,MAAM,EAAE,EAAE,CAAC;IACpC,CAAC;IAED,eAAe,CAAC,OAAe;QAC3B,IAAI,CAAC,eAAe,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAkB,CAAC,CAAC;IACxF,CAAC;IAED,aAAa;QACT,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,EAAE,CAAC;IACrC,CAAC;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers_reconnect.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_server_sent_event_hub_connection } from '../given/a_server_sent_event_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
const CONNECT_TIMEOUT_MS = 500;
|
|
5
|
+
describe('when the connect timeout elapses before a Connected message arrives', given(a_server_sent_event_hub_connection, context => {
|
|
6
|
+
let clock;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
clock = sinon.useFakeTimers();
|
|
9
|
+
context.setup();
|
|
10
|
+
const { ServerSentEventHubConnection } = require('../../ServerSentEventHubConnection');
|
|
11
|
+
context.connection = new ServerSentEventHubConnection('http://localhost/.cratis/queries/sse', 'http://localhost/.cratis/queries/sse/subscribe', 'http://localhost/.cratis/queries/sse/unsubscribe', '', 30000, CONNECT_TIMEOUT_MS, context.policy);
|
|
12
|
+
context.connection.subscribe('q1', { queryName: 'MyQuery' }, sinon.stub());
|
|
13
|
+
context.simulateOpen();
|
|
14
|
+
clock.tick(CONNECT_TIMEOUT_MS + 1);
|
|
15
|
+
});
|
|
16
|
+
afterEach(() => {
|
|
17
|
+
clock.restore();
|
|
18
|
+
sinon.restore();
|
|
19
|
+
});
|
|
20
|
+
it('should schedule a reconnect via the policy', () => {
|
|
21
|
+
context.policy.schedule.calledOnce.should.be.true;
|
|
22
|
+
});
|
|
23
|
+
}));
|
|
24
|
+
//# sourceMappingURL=triggers_reconnect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers_reconnect.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,QAAQ,CAAC,qEAAqE,EAAE,KAAK,CAAC,kCAAkC,EAAE,OAAO,CAAC,EAAE;IAChI,IAAI,KAA4B,CAAC;IAEjC,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAC9B,OAAO,CAAC,KAAK,EAAE,CAAC;QAGhB,MAAM,EAAE,4BAA4B,EAAE,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;QACvF,OAAO,CAAC,UAAU,GAAG,IAAI,4BAA4B,CACjD,sCAAsC,EACtC,gDAAgD,EAChD,kDAAkD,EAClD,EAAE,EACF,KAAK,EACL,kBAAkB,EAClB,OAAO,CAAC,MAAM,CACjB,CAAC;QAEF,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAG3E,OAAO,CAAC,YAAY,EAAE,CAAC;QAGvB,KAAK,CAAC,IAAI,CAAC,kBAAkB,GAAG,CAAC,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACjD,OAAO,CAAC,MAAM,CAAC,QAA4B,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;IAC3E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleans_up_resources.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.ts"],"names":[],"mappings":""}
|
package/dist/esm/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_server_sent_event_hub_connection } from '../given/a_server_sent_event_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
describe('when disposing the hub connection', given(a_server_sent_event_hub_connection, context => {
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
context.setup();
|
|
8
|
+
context.connection.subscribe('q1', { queryName: 'MyQuery' }, sinon.stub());
|
|
9
|
+
context.simulateOpen();
|
|
10
|
+
context.simulateMessage({ type: HubMessageType.Connected, payload: 'conn-1' });
|
|
11
|
+
context.connection.dispose();
|
|
12
|
+
});
|
|
13
|
+
afterEach(() => sinon.restore());
|
|
14
|
+
it('should close the EventSource', () => context.fakeEventSource.close.calledOnce.should.be.true);
|
|
15
|
+
it('should cancel the reconnect policy', () => context.policy.cancel.calledOnce.should.be.true);
|
|
16
|
+
it('should report zero active subscriptions', () => context.connection.queryCount.should.equal(0));
|
|
17
|
+
describe('when an error event fires after dispose', () => {
|
|
18
|
+
beforeEach(() => {
|
|
19
|
+
context.policy.schedule.reset();
|
|
20
|
+
context.simulateError();
|
|
21
|
+
});
|
|
22
|
+
it('should not schedule a reconnect', () => {
|
|
23
|
+
context.policy.schedule.callCount.should.equal(0);
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}));
|
|
27
|
+
//# sourceMappingURL=cleans_up_resources.js.map
|
package/dist/esm/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleans_up_resources.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,QAAQ,CAAC,mCAAmC,EAAE,KAAK,CAAC,kCAAkC,EAAE,OAAO,CAAC,EAAE;IAC9F,UAAU,CAAC,GAAG,EAAE;QACZ,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3E,OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC/E,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjC,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAClG,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE,CAAE,OAAO,CAAC,MAAM,CAAC,MAA0B,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACrH,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnG,QAAQ,CAAC,yCAAyC,EAAE,GAAG,EAAE;QACrD,UAAU,CAAC,GAAG,EAAE;YACX,OAAO,CAAC,MAAM,CAAC,QAA4B,CAAC,KAAK,EAAE,CAAC;YACrD,OAAO,CAAC,aAAa,EAAE,CAAC;QAC5B,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;YACtC,OAAO,CAAC,MAAM,CAAC,QAA4B,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3E,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers_reconnect.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_server_sent_event_hub_connection } from '../given/a_server_sent_event_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
const KEEP_ALIVE_MS = 500;
|
|
6
|
+
describe('when keep-alive interval elapses without any server message', given(a_server_sent_event_hub_connection, context => {
|
|
7
|
+
let clock;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
clock = sinon.useFakeTimers();
|
|
10
|
+
context.setup();
|
|
11
|
+
const { ServerSentEventHubConnection } = require('../../ServerSentEventHubConnection');
|
|
12
|
+
context.connection = new ServerSentEventHubConnection('http://localhost/.cratis/queries/sse', 'http://localhost/.cratis/queries/sse/subscribe', 'http://localhost/.cratis/queries/sse/unsubscribe', '', KEEP_ALIVE_MS, 15000, context.policy);
|
|
13
|
+
context.connection.subscribe('q1', { queryName: 'MyQuery' }, sinon.stub());
|
|
14
|
+
context.simulateOpen();
|
|
15
|
+
context.simulateMessage({ type: HubMessageType.Connected, payload: 'conn-123' });
|
|
16
|
+
clock.tick(KEEP_ALIVE_MS + 1);
|
|
17
|
+
});
|
|
18
|
+
afterEach(() => {
|
|
19
|
+
clock.restore();
|
|
20
|
+
sinon.restore();
|
|
21
|
+
});
|
|
22
|
+
it('should schedule a reconnect via the policy', () => {
|
|
23
|
+
context.policy.schedule.calledOnce.should.be.true;
|
|
24
|
+
});
|
|
25
|
+
}));
|
|
26
|
+
//# sourceMappingURL=triggers_reconnect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"triggers_reconnect.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,aAAa,GAAG,GAAG,CAAC;AAE1B,QAAQ,CAAC,6DAA6D,EAAE,KAAK,CAAC,kCAAkC,EAAE,OAAO,CAAC,EAAE;IACxH,IAAI,KAA4B,CAAC;IAEjC,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAC9B,OAAO,CAAC,KAAK,EAAE,CAAC;QAGhB,MAAM,EAAE,4BAA4B,EAAE,GAAG,OAAO,CAAC,oCAAoC,CAAC,CAAC;QACvF,OAAO,CAAC,UAAU,GAAG,IAAI,4BAA4B,CACjD,sCAAsC,EACtC,gDAAgD,EAChD,kDAAkD,EAClD,EAAE,EACF,aAAa,EACb,KAAK,EACL,OAAO,CAAC,MAAM,CACjB,CAAC;QAEF,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3E,OAAO,CAAC,YAAY,EAAE,CAAC;QAGvB,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;QAGjF,KAAK,CAAC,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,KAAK,CAAC,OAAO,EAAE,CAAC;QAChB,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;QACjD,OAAO,CAAC,MAAM,CAAC,QAA4B,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;IAC3E,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/esm/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after_error.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_server_sent_event_hub_connection } from '../given/a_server_sent_event_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
describe('when connection errors', given(a_server_sent_event_hub_connection, context => {
|
|
6
|
+
const queryId = 'q1';
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
context.setup();
|
|
9
|
+
context.connection.subscribe(queryId, { queryName: 'MyQuery' }, sinon.stub());
|
|
10
|
+
context.simulateOpen();
|
|
11
|
+
context.simulateMessage({ type: HubMessageType.Connected, payload: 'conn-1' });
|
|
12
|
+
context.simulateError();
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => sinon.restore());
|
|
15
|
+
it('should close the EventSource', () => context.fakeEventSource.close.calledOnce.should.be.true);
|
|
16
|
+
it('should delegate to the reconnect policy', () => {
|
|
17
|
+
context.policy.schedule.calledOnce.should.be.true;
|
|
18
|
+
});
|
|
19
|
+
describe('when the policy fires the reconnect callback', () => {
|
|
20
|
+
let newEventSourceCreated;
|
|
21
|
+
beforeEach(() => {
|
|
22
|
+
newEventSourceCreated = false;
|
|
23
|
+
const FakeClass = function () {
|
|
24
|
+
newEventSourceCreated = true;
|
|
25
|
+
return context.fakeEventSource;
|
|
26
|
+
};
|
|
27
|
+
FakeClass['CONNECTING'] = 0;
|
|
28
|
+
FakeClass['OPEN'] = 1;
|
|
29
|
+
FakeClass['CLOSED'] = 2;
|
|
30
|
+
globalThis['EventSource'] = FakeClass;
|
|
31
|
+
const reconnectCallback = context.policy.schedule.getCall(0).args[0];
|
|
32
|
+
reconnectCallback();
|
|
33
|
+
});
|
|
34
|
+
it('should open a new EventSource', () => newEventSourceCreated.should.be.true);
|
|
35
|
+
});
|
|
36
|
+
describe('when Connected arrives after reconnect', () => {
|
|
37
|
+
beforeEach(() => {
|
|
38
|
+
const reconnectCallback = context.policy.schedule.getCall(0).args[0];
|
|
39
|
+
reconnectCallback();
|
|
40
|
+
context.fetchStub.resetHistory();
|
|
41
|
+
context.simulateMessage({ type: HubMessageType.Connected, payload: 'conn-2' });
|
|
42
|
+
});
|
|
43
|
+
it('should re-subscribe all active queries', () => context.fetchStub.calledOnce.should.be.true);
|
|
44
|
+
});
|
|
45
|
+
}));
|
|
46
|
+
//# sourceMappingURL=after_error.js.map
|
package/dist/esm/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after_error.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,QAAQ,CAAC,wBAAwB,EAAE,KAAK,CAAC,kCAAkC,EAAE,OAAO,CAAC,EAAE;IACnF,MAAM,OAAO,GAAG,IAAI,CAAC;IAErB,UAAU,CAAC,GAAG,EAAE;QACZ,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9E,OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC/E,OAAO,CAAC,aAAa,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjC,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAElG,EAAE,CAAC,yCAAyC,EAAE,GAAG,EAAE;QAC9C,OAAO,CAAC,MAAM,CAAC,QAA4B,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;IAC3E,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,8CAA8C,EAAE,GAAG,EAAE;QAC1D,IAAI,qBAA8B,CAAC;QAEnC,UAAU,CAAC,GAAG,EAAE;YACZ,qBAAqB,GAAG,KAAK,CAAC;YAG9B,MAAM,SAAS,GAAG;gBACd,qBAAqB,GAAG,IAAI,CAAC;gBAC7B,OAAO,OAAO,CAAC,eAAe,CAAC;YACnC,CAAgD,CAAC;YAChD,SAAgD,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;YACnE,SAAgD,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YAC7D,SAAgD,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC/D,UAAsC,CAAC,aAAa,CAAC,GAAG,SAAS,CAAC;YAEnE,MAAM,iBAAiB,GAAI,OAAO,CAAC,MAAM,CAAC,QAA4B,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAsB,CAAC;YAC/G,iBAAiB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACpF,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,wCAAwC,EAAE,GAAG,EAAE;QACpD,UAAU,CAAC,GAAG,EAAE;YACZ,MAAM,iBAAiB,GAAI,OAAO,CAAC,MAAM,CAAC,QAA4B,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAsB,CAAC;YAC/G,iBAAiB,EAAE,CAAC;YACpB,OAAO,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;YACjC,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACnF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACpG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queues_until_connected.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.ts"],"names":[],"mappings":""}
|
package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_server_sent_event_hub_connection } from '../given/a_server_sent_event_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
describe('when subscribing before Connected arrives', given(a_server_sent_event_hub_connection, context => {
|
|
6
|
+
const queryId = 'q1';
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
context.setup();
|
|
9
|
+
context.connection.subscribe(queryId, { queryName: 'MyQuery' }, sinon.stub());
|
|
10
|
+
context.simulateOpen();
|
|
11
|
+
});
|
|
12
|
+
afterEach(() => sinon.restore());
|
|
13
|
+
it('should not POST before the Connected message arrives', () => context.fetchStub.callCount.should.equal(0));
|
|
14
|
+
describe('when Connected message arrives', () => {
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
context.simulateMessage({ type: HubMessageType.Connected, payload: 'conn-1' });
|
|
17
|
+
});
|
|
18
|
+
it('should drain the pending subscription with a POST', () => context.fetchStub.calledOnce.should.be.true);
|
|
19
|
+
});
|
|
20
|
+
}));
|
|
21
|
+
//# sourceMappingURL=queues_until_connected.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queues_until_connected.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,QAAQ,CAAC,2CAA2C,EAAE,KAAK,CAAC,kCAAkC,EAAE,OAAO,CAAC,EAAE;IACtG,MAAM,OAAO,GAAG,IAAI,CAAC;IAErB,UAAU,CAAC,GAAG,EAAE;QAEZ,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9E,OAAO,CAAC,YAAY,EAAE,CAAC;IAE3B,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjC,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAE9G,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;QAC5C,UAAU,CAAC,GAAG,EAAE;YACZ,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC;QACnF,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAC/G,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sends_subscribe_post.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.ts"],"names":[],"mappings":""}
|
package/dist/esm/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_server_sent_event_hub_connection } from '../given/a_server_sent_event_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
describe('when subscribing sends the subscribe POST after Connected', given(a_server_sent_event_hub_connection, context => {
|
|
6
|
+
const queryId = 'q1';
|
|
7
|
+
const connectionId = 'conn-abc';
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
context.setup();
|
|
10
|
+
context.connection.subscribe(queryId, { queryName: 'MyQuery' }, sinon.stub());
|
|
11
|
+
context.simulateOpen();
|
|
12
|
+
context.simulateMessage({ type: HubMessageType.Connected, payload: connectionId });
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => sinon.restore());
|
|
15
|
+
it('should POST to the subscribe URL', () => context.fetchStub.calledOnce.should.be.true);
|
|
16
|
+
it('should pass the connection id in the request body', () => {
|
|
17
|
+
const body = JSON.parse(context.fetchStub.getCall(0).args[1].body);
|
|
18
|
+
body.connectionId.should.equal(connectionId);
|
|
19
|
+
});
|
|
20
|
+
it('should pass the query id in the request body', () => {
|
|
21
|
+
const body = JSON.parse(context.fetchStub.getCall(0).args[1].body);
|
|
22
|
+
body.queryId.should.equal(queryId);
|
|
23
|
+
});
|
|
24
|
+
describe('when a query result message arrives', () => {
|
|
25
|
+
const result = { isSuccess: true, data: ['x'] };
|
|
26
|
+
beforeEach(() => {
|
|
27
|
+
context.simulateMessage({ type: HubMessageType.QueryResult, queryId, payload: result });
|
|
28
|
+
});
|
|
29
|
+
it('should have one active subscription', () => context.connection.queryCount.should.equal(1));
|
|
30
|
+
});
|
|
31
|
+
}));
|
|
32
|
+
//# sourceMappingURL=sends_subscribe_post.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sends_subscribe_post.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,kCAAkC,EAAE,MAAM,6CAA6C,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,QAAQ,CAAC,2DAA2D,EAAE,KAAK,CAAC,kCAAkC,EAAE,OAAO,CAAC,EAAE;IACtH,MAAM,OAAO,GAAG,IAAI,CAAC;IACrB,MAAM,YAAY,GAAG,UAAU,CAAC;IAEhC,UAAU,CAAC,GAAG,EAAE;QACZ,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC9E,OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,CAAC;IACvF,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjC,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAC1F,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QACzD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IACH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE;QACpD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QACnE,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;QACjD,MAAM,MAAM,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;QAEhD,UAAU,CAAC,GAAG,EAAE;YACZ,OAAO,CAAC,eAAe,CAAC,EAAE,IAAI,EAAE,cAAc,CAAC,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;QAC5F,CAAC,CAAC,CAAC;QAGH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACnG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/esm/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"the_only_query.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.ts"],"names":[],"mappings":""}
|