@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
package/dist/esm/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.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 unsubscribing the only query', given(a_server_sent_event_hub_connection, context => {
|
|
6
|
+
beforeEach(async () => {
|
|
7
|
+
context.setup();
|
|
8
|
+
context.connection.subscribe('q1', { queryName: 'MyQuery' }, sinon.stub());
|
|
9
|
+
context.simulateOpen();
|
|
10
|
+
context.simulateMessage({ type: HubMessageType.Connected, payload: 'conn-abc' });
|
|
11
|
+
context.connection.unsubscribe('q1');
|
|
12
|
+
await Promise.resolve();
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => sinon.restore());
|
|
15
|
+
it('should close the event source', () => context.fakeEventSource.close.calledOnce.should.be.true);
|
|
16
|
+
it('should send an unsubscribe POST request', () => {
|
|
17
|
+
const unsubscribeCalls = context.fetchStub.args.filter((args) => typeof args[0] === 'string' && args[0].includes('unsubscribe'));
|
|
18
|
+
unsubscribeCalls.length.should.equal(1);
|
|
19
|
+
});
|
|
20
|
+
}));
|
|
21
|
+
//# sourceMappingURL=the_only_query.js.map
|
package/dist/esm/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"the_only_query.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.ts"],"names":[],"mappings":"AAGA,OA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,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with_query_arguments.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.ts"],"names":[],"mappings":""}
|
package/dist/esm/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ServerSentEventQueryConnection } from '../../ServerSentEventQueryConnection';
|
|
3
|
+
describe('when connecting with query arguments', () => {
|
|
4
|
+
let fakeEventSource;
|
|
5
|
+
let connection;
|
|
6
|
+
let receivedData;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
fakeEventSource = {
|
|
9
|
+
url: '',
|
|
10
|
+
onmessage: null,
|
|
11
|
+
onerror: null,
|
|
12
|
+
close: sinon.stub(),
|
|
13
|
+
};
|
|
14
|
+
const FakeEventSourceClass = function (url) {
|
|
15
|
+
fakeEventSource.url = url;
|
|
16
|
+
Object.assign(fakeEventSource, { onmessage: null, onerror: null });
|
|
17
|
+
return fakeEventSource;
|
|
18
|
+
};
|
|
19
|
+
globalThis['EventSource'] = FakeEventSourceClass;
|
|
20
|
+
receivedData = [];
|
|
21
|
+
connection = new ServerSentEventQueryConnection(new URL('http://localhost/.cratis/queries/sse?query=Test'));
|
|
22
|
+
connection.connect((result) => receivedData.push(result), { category: 'books' });
|
|
23
|
+
});
|
|
24
|
+
afterEach(() => {
|
|
25
|
+
delete globalThis['EventSource'];
|
|
26
|
+
sinon.restore();
|
|
27
|
+
});
|
|
28
|
+
it('should append query arguments to the URL', () => fakeEventSource.url.should.contain('category=books'));
|
|
29
|
+
describe('when a message arrives', () => {
|
|
30
|
+
const result = { data: ['a', 'b'], isSuccess: true, isAuthorized: true, isValid: true, hasExceptions: false, hasData: true, validationResults: [], exceptionMessages: [], exceptionStackTrace: '', paging: { page: 0, size: 0, totalItems: 0, totalPages: 0 } };
|
|
31
|
+
beforeEach(() => {
|
|
32
|
+
fakeEventSource.onmessage({ data: JSON.stringify(result) });
|
|
33
|
+
});
|
|
34
|
+
it('should deliver the payload to the callback', () => receivedData.length.should.equal(1));
|
|
35
|
+
it('should pass through the raw QueryResult in direct mode', () => receivedData[0].isSuccess.should.be.true);
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=with_query_arguments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"with_query_arguments.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAUtF,QAAQ,CAAC,sCAAsC,EAAE,GAAG,EAAE;IAClD,IAAI,eAAgC,CAAC;IACrC,IAAI,UAAoD,CAAC;IACzD,IAAI,YAAqC,CAAC;IAE1C,UAAU,CAAC,GAAG,EAAE;QACZ,eAAe,GAAG;YACd,GAAG,EAAE,EAAE;YACP,SAAS,EAAE,IAAI;YACf,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE;SACtB,CAAC;QAEF,MAAM,oBAAoB,GAAG,UAAiC,GAAW;YACrE,eAAe,CAAC,GAAG,GAAG,GAAG,CAAC;YAC1B,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACnE,OAAO,eAAe,CAAC;QAC3B,CAAC,CAAC;QAED,UAAsC,CAAC,aAAa,CAAC,GAAG,oBAAoB,CAAC;QAE9E,YAAY,GAAG,EAAE,CAAC;QAClB,UAAU,GAAG,IAAI,8BAA8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AAC,wDAAwD,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,CAAE,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAClH,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"without_event_source_available.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ServerSentEventQueryConnection } from '../../ServerSentEventQueryConnection';
|
|
3
|
+
describe('when connecting in an environment where EventSource is not available', () => {
|
|
4
|
+
let originalEventSource;
|
|
5
|
+
let connection;
|
|
6
|
+
let dataReceivedStub;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
originalEventSource = globalThis['EventSource'];
|
|
9
|
+
delete globalThis['EventSource'];
|
|
10
|
+
dataReceivedStub = sinon.stub();
|
|
11
|
+
connection = new ServerSentEventQueryConnection(new URL('http://localhost/.cratis/queries/sse?query=Test'));
|
|
12
|
+
connection.connect(dataReceivedStub);
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => {
|
|
15
|
+
if (originalEventSource !== undefined) {
|
|
16
|
+
globalThis['EventSource'] = originalEventSource;
|
|
17
|
+
}
|
|
18
|
+
sinon.restore();
|
|
19
|
+
});
|
|
20
|
+
it('should not call data received', () => dataReceivedStub.called.should.be.false);
|
|
21
|
+
it('should not throw', () => true.should.be.true);
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=without_event_source_available.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"without_event_source_available.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAGtF,QAAQ,CAAC,sEAAsE,EAAE,GAAG,EAAE;IAClF,IAAI,mBAAuC,CAAC;IAC5C,IAAI,UAAoD,CAAC;IACzD,IAAI,gBAAiC,CAAC;IAEtC,UAAU,CAAC,GAAG,EAAE;QACZ,mBAAmB,GAAI,UAAsC,CAAC,aAAa,CAAuB,CAAC;QACnG,OAAQ,UAAsC,CAAC,aAAa,CAAC,CAAC;QAE9D,gBAAgB,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAChC,UAAU,GAAG,IAAI,8BAA8B,CAAW,IAAI,GAAG,CAAC,iDAAiD,CAAC,CAAC,CAAC;QACtH,UAAU,CAAC,OAAO,CAAC,gBAAsE,CAAC,CAAC;IAC/F,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;YACnC,UAAsC,CAAC,aAAa,CAAC,GAAG,mBAAmB,CAAC;QACjF,CAAC;QACD,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE,CAAC,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IACnF,EAAE,CAAC,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AACtD,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after_connecting.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.ts"],"names":[],"mappings":""}
|
package/dist/esm/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ServerSentEventQueryConnection } from '../../ServerSentEventQueryConnection';
|
|
3
|
+
describe('when disconnecting closes the EventSource', () => {
|
|
4
|
+
let closeStub;
|
|
5
|
+
let connection;
|
|
6
|
+
beforeEach(() => {
|
|
7
|
+
closeStub = sinon.stub();
|
|
8
|
+
const FakeEventSourceClass = function () {
|
|
9
|
+
this.onmessage = null;
|
|
10
|
+
this.onerror = null;
|
|
11
|
+
this.close = closeStub;
|
|
12
|
+
};
|
|
13
|
+
globalThis['EventSource'] = FakeEventSourceClass;
|
|
14
|
+
connection = new ServerSentEventQueryConnection(new URL('http://localhost/.cratis/queries/sse?query=Test'));
|
|
15
|
+
connection.connect((_) => _);
|
|
16
|
+
connection.disconnect();
|
|
17
|
+
});
|
|
18
|
+
afterEach(() => {
|
|
19
|
+
delete globalThis['EventSource'];
|
|
20
|
+
sinon.restore();
|
|
21
|
+
});
|
|
22
|
+
it('should call close on the EventSource', () => closeStub.calledOnce.should.be.true);
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=after_connecting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after_connecting.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAGtF,QAAQ,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACvD,IAAI,SAA0B,CAAC;IAC/B,IAAI,UAAoD,CAAC;IAEzD,UAAU,CAAC,GAAG,EAAE;QACZ,SAAS,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAEzB,MAAM,oBAAoB,GAAG;YACzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QAC3B,CAAC,CAAC;QAED,UAAsC,CAAC,aAAa,CAAC,GAAG,oBAAoB,CAAC;QAE9E,UAAU,GAAG,IAAI,8BAA8B,CAC3C,IAAI,GAAG,CAAC,iDAAiD,CAAC,CAC7D,CAAC;QACF,UAAU,CAAC,OAAO,CAAC,CAAC,CAAwB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QACpD,UAAU,CAAC,UAAU,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,OAAQ,UAAsC,CAAC,aAAa,CAAC,CAAC;QAC9D,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sCAAsC,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AAC1F,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"before_message_arrives.d.ts","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { ServerSentEventQueryConnection } from '../../ServerSentEventQueryConnection';
|
|
3
|
+
describe('when disconnecting prevents further message delivery', () => {
|
|
4
|
+
let fakeEventSource;
|
|
5
|
+
let connection;
|
|
6
|
+
let receivedCount;
|
|
7
|
+
beforeEach(() => {
|
|
8
|
+
fakeEventSource = { onmessage: null, onerror: null, close: sinon.stub() };
|
|
9
|
+
globalThis['EventSource'] = function () {
|
|
10
|
+
return fakeEventSource;
|
|
11
|
+
};
|
|
12
|
+
receivedCount = 0;
|
|
13
|
+
connection = new ServerSentEventQueryConnection(new URL('http://localhost/.cratis/queries/sse?query=Test'));
|
|
14
|
+
connection.connect(() => { receivedCount++; });
|
|
15
|
+
connection.disconnect();
|
|
16
|
+
fakeEventSource['onmessage']?.({ data: JSON.stringify({ isSuccess: true }) });
|
|
17
|
+
});
|
|
18
|
+
afterEach(() => {
|
|
19
|
+
delete globalThis['EventSource'];
|
|
20
|
+
sinon.restore();
|
|
21
|
+
});
|
|
22
|
+
it('should not deliver messages after disconnect', () => receivedCount.should.equal(0));
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=before_message_arrives.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"before_message_arrives.js","sourceRoot":"","sources":["../../../../../queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAEtF,QAAQ,CAAC,sDAAsD,EAAE,GAAG,EAAE;IAClE,IAAI,eAAwC,CAAC;IAC7C,IAAI,UAAoD,CAAC;IACzD,IAAI,aAAqB,CAAC;IAE1B,UAAU,CAAC,GAAG,EAAE;QACZ,eAAe,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;QAEzE,UAAsC,CAAC,aAAa,CAAC,GAAG;YACrD,OAAO,eAAe,CAAC;QAC3B,CAAC,CAAC;QAEF,aAAa,GAAG,CAAC,CAAC;QAClB,UAAU,GAAG,IAAI,8BAA8B,CAC3C,IAAI,GAAG,CAAC,iDAAiD,CAAC,CAC7D,CAAC;QACF,UAAU,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,aAAa,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAG/C,UAAU,CAAC,UAAU,EAAE,CAAC;QACvB,eAAe,CAAC,WAAW,CAA4C,EAAE,CACtE,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAkB,CAChE,CAAC;IACN,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACX,OAAQ,UAAsC,CAAC,aAAa,CAAC,CAAC;QAC9D,KAAK,CAAC,OAAO,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5F,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { WebSocketHubConnection } from '../../WebSocketHubConnection';
|
|
3
|
+
import { IReconnectPolicy } from '../../IReconnectPolicy';
|
|
4
|
+
export declare class a_web_socket_hub_connection {
|
|
5
|
+
connection: WebSocketHubConnection;
|
|
6
|
+
fakeSocket: {
|
|
7
|
+
onopen: (() => void) | null;
|
|
8
|
+
onclose: (() => void) | null;
|
|
9
|
+
onerror: ((error: Event) => void) | null;
|
|
10
|
+
onmessage: ((ev: MessageEvent) => void) | null;
|
|
11
|
+
send: sinon.SinonStub;
|
|
12
|
+
close: sinon.SinonStub;
|
|
13
|
+
readyState: number;
|
|
14
|
+
};
|
|
15
|
+
policy: sinon.SinonStubbedInstance<IReconnectPolicy>;
|
|
16
|
+
WebSocketStub: sinon.SinonStub;
|
|
17
|
+
constructor();
|
|
18
|
+
setup(): void;
|
|
19
|
+
simulateOpen(): void;
|
|
20
|
+
simulateClose(): void;
|
|
21
|
+
simulateMessage(payload: object): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=a_web_socket_hub_connection.d.ts.map
|
package/dist/esm/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a_web_socket_hub_connection.d.ts","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAK1D,qBAAa,2BAA2B;IACpC,UAAU,EAAG,sBAAsB,CAAC;IACpC,UAAU,EAAG;QACT,MAAM,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;QAC5B,OAAO,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;QAC7B,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;QACzC,SAAS,EAAE,CAAC,CAAC,EAAE,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;QAC/C,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;QACtB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QACvB,UAAU,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,MAAM,EAAG,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACtD,aAAa,EAAG,KAAK,CAAC,SAAS,CAAC;;IAWhC,KAAK,IAAI,IAAI;IAkCb,YAAY,IAAI,IAAI;IAKpB,aAAa,IAAI,IAAI;IAKrB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAGzC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { WebSocketHubConnection } from '../../WebSocketHubConnection';
|
|
3
|
+
export class a_web_socket_hub_connection {
|
|
4
|
+
connection;
|
|
5
|
+
fakeSocket;
|
|
6
|
+
policy;
|
|
7
|
+
WebSocketStub;
|
|
8
|
+
constructor() {
|
|
9
|
+
this.setup();
|
|
10
|
+
}
|
|
11
|
+
setup() {
|
|
12
|
+
this.fakeSocket = {
|
|
13
|
+
onopen: null,
|
|
14
|
+
onclose: null,
|
|
15
|
+
onerror: null,
|
|
16
|
+
onmessage: null,
|
|
17
|
+
send: sinon.stub(),
|
|
18
|
+
close: sinon.stub(),
|
|
19
|
+
readyState: 0,
|
|
20
|
+
};
|
|
21
|
+
this.WebSocketStub = sinon.stub().returns(this.fakeSocket);
|
|
22
|
+
globalThis['WebSocket'] = this.WebSocketStub;
|
|
23
|
+
globalThis['WebSocket'].CONNECTING = 0;
|
|
24
|
+
globalThis['WebSocket'].OPEN = 1;
|
|
25
|
+
globalThis['WebSocket'].CLOSING = 2;
|
|
26
|
+
globalThis['WebSocket'].CLOSED = 3;
|
|
27
|
+
this.policy = {
|
|
28
|
+
attempt: 0,
|
|
29
|
+
schedule: sinon.stub().returns(true),
|
|
30
|
+
reset: sinon.stub(),
|
|
31
|
+
cancel: sinon.stub(),
|
|
32
|
+
};
|
|
33
|
+
this.connection = new WebSocketHubConnection('ws://localhost/.cratis/queries/ws', '', undefined, this.policy);
|
|
34
|
+
}
|
|
35
|
+
simulateOpen() {
|
|
36
|
+
this.fakeSocket.readyState = 1;
|
|
37
|
+
this.fakeSocket.onopen?.();
|
|
38
|
+
}
|
|
39
|
+
simulateClose() {
|
|
40
|
+
this.fakeSocket.readyState = 3;
|
|
41
|
+
this.fakeSocket.onclose?.();
|
|
42
|
+
}
|
|
43
|
+
simulateMessage(payload) {
|
|
44
|
+
this.fakeSocket.onmessage?.({ data: JSON.stringify(payload) });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=a_web_socket_hub_connection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"a_web_socket_hub_connection.js","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AAMtE,MAAM,OAAO,2BAA2B;IACpC,UAAU,CAA0B;IACpC,UAAU,CAQR;IACF,MAAM,CAAgD;IACtD,aAAa,CAAmB;IAEhC;QACI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UAAU,GAAG,CAAC,CAAC;QAC/B,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC;IAChC,CAAC;IAED,eAAe,CAAC,OAAe;QAC3B,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAkB,CAAC,CAAC;IACnF,CAAC;CACJ"}
|
package/dist/esm/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleans_up_resources.d.ts","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_web_socket_hub_connection } from '../given/a_web_socket_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
describe('when disposing the hub connection', given(a_web_socket_hub_connection, context => {
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
context.setup();
|
|
7
|
+
context.connection.subscribe('q1', { queryName: 'MyQuery' }, sinon.stub());
|
|
8
|
+
context.simulateOpen();
|
|
9
|
+
context.connection.dispose();
|
|
10
|
+
});
|
|
11
|
+
afterEach(() => sinon.restore());
|
|
12
|
+
it('should close the socket', () => context.fakeSocket.close.calledOnce.should.be.true);
|
|
13
|
+
it('should cancel the reconnect policy', () => context.policy.cancel.calledOnce.should.be.true);
|
|
14
|
+
describe('when the socket fires onclose after dispose', () => {
|
|
15
|
+
beforeEach(() => {
|
|
16
|
+
context.policy.schedule.reset();
|
|
17
|
+
context.simulateClose();
|
|
18
|
+
});
|
|
19
|
+
it('should not schedule a reconnect', () => {
|
|
20
|
+
context.policy.schedule.callCount.should.equal(0);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
}));
|
|
24
|
+
//# sourceMappingURL=cleans_up_resources.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleans_up_resources.js","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,QAAQ,CAAC,mCAAmC,EAAE,KAAK,CAAC,2BAA2B,EAAE,OAAO,CAAC,EAAE;IACvF,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,UAAU,CAAC,OAAO,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjC,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IACxF,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE,CAAE,OAAO,CAAC,MAAM,CAAC,MAA0B,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAErH,QAAQ,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACzD,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"}
|
package/dist/esm/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sends_a_ping.d.ts","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_web_socket_hub_connection } from '../given/a_web_socket_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
const PING_INTERVAL_MS = 500;
|
|
6
|
+
describe('when keep-alive interval elapses without any message', given(a_web_socket_hub_connection, context => {
|
|
7
|
+
let clock;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
clock = sinon.useFakeTimers();
|
|
10
|
+
context.setup();
|
|
11
|
+
const { WebSocketHubConnection } = require('../../WebSocketHubConnection');
|
|
12
|
+
context.connection = new WebSocketHubConnection('ws://localhost/.cratis/queries/ws', '', PING_INTERVAL_MS, context.policy);
|
|
13
|
+
context.connection.subscribe('q1', { queryName: 'MyQuery' }, sinon.stub());
|
|
14
|
+
context.simulateOpen();
|
|
15
|
+
clock.tick(PING_INTERVAL_MS + 1);
|
|
16
|
+
});
|
|
17
|
+
afterEach(() => {
|
|
18
|
+
clock.restore();
|
|
19
|
+
sinon.restore();
|
|
20
|
+
});
|
|
21
|
+
it('should send a ping message', () => {
|
|
22
|
+
const sentMessages = context.fakeSocket.send.args.map((a) => a[0]);
|
|
23
|
+
const pingMessages = sentMessages
|
|
24
|
+
.map((m) => JSON.parse(m))
|
|
25
|
+
.filter((m) => m.type === HubMessageType.Ping);
|
|
26
|
+
pingMessages.length.should.be.greaterThan(0);
|
|
27
|
+
});
|
|
28
|
+
}));
|
|
29
|
+
//# sourceMappingURL=sends_a_ping.js.map
|
package/dist/esm/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sends_a_ping.js","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,QAAQ,CAAC,sDAAsD,EAAE,KAAK,CAAC,2BAA2B,EAAE,OAAO,CAAC,EAAE;IAC1G,IAAI,KAA4B,CAAC;IAEjC,UAAU,CAAC,GAAG,EAAE;QACZ,KAAK,GAAG,KAAK,CAAC,aAAa,EAAE,CAAC;QAC9B,OAAO,CAAC,KAAK,EAAE,CAAC;QAIhB,MAAM,EAAE,sBAAsB,EAAE,GAAG,OAAO,CAAC,8BAA8B,CAAC,CAAC;QAC3E,OAAO,CAAC,UAAU,GAAG,IAAI,sBAAsB,CAC3C,mCAAmC,EACnC,EAAE,EACF,gBAAgB,EAChB,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,KAAK,CAAC,IAAI,CAAC,gBAAgB,GAAG,CAAC,CAAC,CAAC;IACrC,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,4BAA4B,EAAE,GAAG,EAAE;QAClC,MAAM,YAAY,GAAa,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAW,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACvF,MAAM,YAAY,GAAG,YAAY;aAC5B,GAAG,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;aACjC,MAAM,CAAC,CAAC,CAA2B,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,CAAC,CAAC;QAC7E,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resets_keep_alive_timer.d.ts","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_web_socket_hub_connection } from '../given/a_web_socket_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
const PING_INTERVAL_MS = 500;
|
|
6
|
+
describe('when a message is received and then keep-alive interval elapses', given(a_web_socket_hub_connection, context => {
|
|
7
|
+
let clock;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
clock = sinon.useFakeTimers();
|
|
10
|
+
context.setup();
|
|
11
|
+
const { WebSocketHubConnection } = require('../../WebSocketHubConnection');
|
|
12
|
+
context.connection = new WebSocketHubConnection('ws://localhost/.cratis/queries/ws', '', PING_INTERVAL_MS, context.policy);
|
|
13
|
+
context.connection.subscribe('q1', { queryName: 'MyQuery' }, sinon.stub());
|
|
14
|
+
context.simulateOpen();
|
|
15
|
+
clock.tick(PING_INTERVAL_MS - 50);
|
|
16
|
+
context.simulateMessage({ type: HubMessageType.QueryResult, queryId: 'q1', payload: { items: [], totalItems: 0 } });
|
|
17
|
+
clock.tick(PING_INTERVAL_MS / 2);
|
|
18
|
+
});
|
|
19
|
+
afterEach(() => {
|
|
20
|
+
clock.restore();
|
|
21
|
+
sinon.restore();
|
|
22
|
+
});
|
|
23
|
+
it('should not send a ping', () => {
|
|
24
|
+
const sentMessages = context.fakeSocket.send.args.map((a) => a[0]);
|
|
25
|
+
const pingMessages = sentMessages
|
|
26
|
+
.map((m) => JSON.parse(m))
|
|
27
|
+
.filter((m) => m.type === HubMessageType.Ping);
|
|
28
|
+
pingMessages.length.should.equal(0);
|
|
29
|
+
});
|
|
30
|
+
}));
|
|
31
|
+
//# sourceMappingURL=resets_keep_alive_timer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resets_keep_alive_timer.js","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,QAAQ,CAAC,iEAAiE,EAAE,KAAK,CAAC,2BAA2B,EAAE,OAAO,CAAC,EAAE;IACrH,IAAI,KAA4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AK,CAAC,CAAC,CAAC,CAAC;aACjC,MAAM,CAAC,CAAC,CAA2B,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,CAAC,CAAC;QAC7E,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after_unexpected_close.d.ts","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.ts"],"names":[],"mappings":""}
|
package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_web_socket_hub_connection } from '../given/a_web_socket_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
describe('when the connection closes unexpectedly', given(a_web_socket_hub_connection, context => {
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
context.setup();
|
|
7
|
+
context.connection.subscribe('q1', { queryName: 'MyQuery' }, sinon.stub());
|
|
8
|
+
context.simulateOpen();
|
|
9
|
+
context.simulateClose();
|
|
10
|
+
});
|
|
11
|
+
afterEach(() => sinon.restore());
|
|
12
|
+
it('should delegate to the reconnect policy', () => {
|
|
13
|
+
context.policy.schedule.calledOnce.should.be.true;
|
|
14
|
+
});
|
|
15
|
+
describe('when the policy fires the reconnect callback', () => {
|
|
16
|
+
let secondSocketCreated;
|
|
17
|
+
beforeEach(() => {
|
|
18
|
+
secondSocketCreated = false;
|
|
19
|
+
context.WebSocketStub.callsFake(() => {
|
|
20
|
+
secondSocketCreated = true;
|
|
21
|
+
return context.fakeSocket;
|
|
22
|
+
});
|
|
23
|
+
const scheduleCall = context.policy.schedule.getCall(0);
|
|
24
|
+
const reconnectCallback = scheduleCall.args[0];
|
|
25
|
+
reconnectCallback();
|
|
26
|
+
});
|
|
27
|
+
it('should open a new WebSocket', () => secondSocketCreated.should.be.true);
|
|
28
|
+
});
|
|
29
|
+
}));
|
|
30
|
+
//# sourceMappingURL=after_unexpected_close.js.map
|
package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"after_unexpected_close.js","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,QAAQ,CAAC,yCAAyC,EAAE,KAAK,CAAC,2BAA2B,EAAE,OAAO,CAAC,EAAE;IAC7F,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,aAAa,EAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjC,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,mBAA4B,CAAC;QAEjC,UAAU,CAAC,GAAG,EAAE;YACZ,mBAAmB,GAAG,KAAK,CAAC;YAC5B,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,EAAE;gBACjC,mBAAmB,GAAG,IAAI,CAAC;gBAC3B,OAAO,OAAO,CAAC,UAAU,CAAC;YAC9B,CAAC,CAAC,CAAC;YAGH,MAAM,YAAY,GAAI,OAAO,CAAC,MAAM,CAAC,QAA4B,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YAC7E,MAAM,iBAAiB,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAsB,CAAC;YACpE,iBAAiB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAChF,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resubscribes_all_queries.d.ts","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.ts"],"names":[],"mappings":""}
|
package/dist/esm/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_web_socket_hub_connection } from '../given/a_web_socket_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
describe('when reconnecting after a drop', given(a_web_socket_hub_connection, context => {
|
|
6
|
+
const queryId = 'q1';
|
|
7
|
+
let callbackStub;
|
|
8
|
+
beforeEach(() => {
|
|
9
|
+
callbackStub = sinon.stub();
|
|
10
|
+
context.setup();
|
|
11
|
+
context.connection.subscribe(queryId, { queryName: 'MyQuery' }, callbackStub);
|
|
12
|
+
context.simulateOpen();
|
|
13
|
+
context.simulateClose();
|
|
14
|
+
const reconnectCallback = context.policy.schedule.getCall(0).args[0];
|
|
15
|
+
context.fakeSocket.send.reset();
|
|
16
|
+
context.policy.reset.reset();
|
|
17
|
+
reconnectCallback();
|
|
18
|
+
context.simulateOpen();
|
|
19
|
+
});
|
|
20
|
+
afterEach(() => sinon.restore());
|
|
21
|
+
it('should re-send all active subscriptions', () => {
|
|
22
|
+
context.fakeSocket.send.calledOnce.should.be.true;
|
|
23
|
+
const msg = JSON.parse(context.fakeSocket.send.getCall(0).args[0]);
|
|
24
|
+
msg.type.should.equal(HubMessageType.Subscribe);
|
|
25
|
+
msg.queryId.should.equal(queryId);
|
|
26
|
+
});
|
|
27
|
+
it('should reset the reconnect policy on successful open', () => {
|
|
28
|
+
context.policy.reset.calledOnce.should.be.true;
|
|
29
|
+
});
|
|
30
|
+
}));
|
|
31
|
+
//# sourceMappingURL=resubscribes_all_queries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resubscribes_all_queries.js","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAG9D,QAAQ,CAAC,gCAAgC,EAAE,KAAK,CAAC,2BAA2B,EAAE,OAAO,CAAC,EAAE;IACpF,MAAM,OAAO,GAAG,IAAI,CAAC;IACrB,IAAI,YAA6B,CAAC;IAElC,UAAU,CAAC,GAAG,EAAE;QACZ,YAAY,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,YAAY,CAAC,CAAC;QAC9E,OAAO,CAA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_subscribing/to_a_query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_web_socket_hub_connection } from '../given/a_web_socket_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
describe('when subscribing to a query', given(a_web_socket_hub_connection, context => {
|
|
6
|
+
const queryId = 'q1';
|
|
7
|
+
const request = { queryName: 'MyQuery', arguments: {} };
|
|
8
|
+
let callback;
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
callback = sinon.stub();
|
|
11
|
+
context.setup();
|
|
12
|
+
context.connection.subscribe(queryId, request, callback);
|
|
13
|
+
context.simulateOpen();
|
|
14
|
+
});
|
|
15
|
+
afterEach(() => sinon.restore());
|
|
16
|
+
it('should open a WebSocket', () => context.WebSocketStub.calledOnce.should.be.true);
|
|
17
|
+
it('should send a subscribe message once the socket opens', () => {
|
|
18
|
+
context.fakeSocket.send.calledOnce.should.be.true;
|
|
19
|
+
const msg = JSON.parse(context.fakeSocket.send.getCall(0).args[0]);
|
|
20
|
+
msg.type.should.equal(HubMessageType.Subscribe);
|
|
21
|
+
msg.queryId.should.equal(queryId);
|
|
22
|
+
});
|
|
23
|
+
describe('when a query result message arrives', () => {
|
|
24
|
+
const result = { isSuccess: true, data: [1, 2, 3] };
|
|
25
|
+
beforeEach(() => {
|
|
26
|
+
context.simulateMessage({ type: HubMessageType.QueryResult, queryId, payload: result });
|
|
27
|
+
});
|
|
28
|
+
it('should invoke the callback with the result', () => callback.calledOnce.should.be.true);
|
|
29
|
+
it('should pass the result payload', () => callback.getCall(0).args[0].should.deep.equal(result));
|
|
30
|
+
});
|
|
31
|
+
}));
|
|
32
|
+
//# sourceMappingURL=to_a_query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to_a_query.js","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_subsc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,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QAChD,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,qCAAqC,EAAE,GAAG,EAAE;QACjD,MAAM,MAAM,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;QAEpD,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;QAEH,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;QAC3F,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACtG,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/esm/queries/for_WebSocketHubConnection/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_WebSocketHubConnection/when_unsubscribing/the_only_query.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import sinon from 'sinon';
|
|
2
|
+
import { a_web_socket_hub_connection } from '../given/a_web_socket_hub_connection';
|
|
3
|
+
import { given } from '../../../given';
|
|
4
|
+
import { HubMessageType } from '../../WebSocketHubConnection';
|
|
5
|
+
describe('when unsubscribing the only query', given(a_web_socket_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.fakeSocket.send.reset();
|
|
12
|
+
context.connection.unsubscribe(queryId);
|
|
13
|
+
});
|
|
14
|
+
afterEach(() => sinon.restore());
|
|
15
|
+
it('should send an unsubscribe message', () => {
|
|
16
|
+
context.fakeSocket.send.calledOnce.should.be.true;
|
|
17
|
+
const msg = JSON.parse(context.fakeSocket.send.getCall(0).args[0]);
|
|
18
|
+
msg.type.should.equal(HubMessageType.Unsubscribe);
|
|
19
|
+
msg.queryId.should.equal(queryId);
|
|
20
|
+
});
|
|
21
|
+
it('should close the underlying socket', () => context.fakeSocket.close.calledOnce.should.be.true);
|
|
22
|
+
}));
|
|
23
|
+
//# sourceMappingURL=the_only_query.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"the_only_query.js","sourceRoot":"","sources":["../../../../../queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,QAAQ,CAAC,mCAAmC,EAAE,KAAK,CAAC,2BAA2B,EAAE,OAAO,CAAC,EAAE;IACvF,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,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAChC,OAAO,CAAC,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAEjC,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC1C,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC;QAClD,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACnE,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAClD,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AACvG,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -12,9 +12,21 @@ export * from './QueryResultWithState';
|
|
|
12
12
|
export * from './IObservableQueryFor';
|
|
13
13
|
export * from './ObservableQueryFor';
|
|
14
14
|
export * from './IObservableQueryConnection';
|
|
15
|
+
export * from './IObservableQueryHubConnection';
|
|
16
|
+
export * from './IReconnectPolicy';
|
|
17
|
+
export * from './ReconnectPolicy';
|
|
18
|
+
export * from './HubConnectionKeepAlive';
|
|
15
19
|
export * from './ObservableQueryConnection';
|
|
20
|
+
export * from './ObservableQueryConnectionFactory';
|
|
21
|
+
export * from './ObservableQueryConnectionPool';
|
|
22
|
+
export * from './ServerSentEventQueryConnection';
|
|
23
|
+
export * from './ServerSentEventHubConnection';
|
|
24
|
+
export * from './WebSocketHubConnection';
|
|
25
|
+
export * from './ObservableQueryMultiplexer';
|
|
16
26
|
export * from './ObservableQuerySubscription';
|
|
17
27
|
export * from './WebSocketMessage';
|
|
28
|
+
export * from './QueryTransportMethod';
|
|
29
|
+
export * from './QueryInstanceCache';
|
|
18
30
|
export * from './IQueryProvider';
|
|
19
31
|
export * from './QueryProvider';
|
|
20
32
|
export * from './QueryValidator';
|