@cratis/arc 20.54.5 → 20.55.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/dist/cjs/Globals.js +21 -8
- package/dist/cjs/Globals.js.map +1 -1
- package/dist/cjs/UrlHelpers.js +46 -13
- package/dist/cjs/UrlHelpers.js.map +1 -1
- package/dist/cjs/commands/Command.js +50 -38
- package/dist/cjs/commands/Command.js.map +1 -1
- package/dist/cjs/commands/CommandResult.js +58 -36
- package/dist/cjs/commands/CommandResult.js.map +1 -1
- package/dist/cjs/commands/CommandResults.js +24 -22
- package/dist/cjs/commands/CommandResults.js.map +1 -1
- package/dist/cjs/commands/CommandValidator.js +10 -2
- package/dist/cjs/commands/CommandValidator.js.map +1 -1
- package/dist/cjs/commands/index.js +2 -2
- package/dist/cjs/commands/index.js.map +1 -1
- package/dist/cjs/deepEqual.js +9 -9
- package/dist/cjs/deepEqual.js.map +1 -1
- package/dist/cjs/identity/IIdentityProvider.js +5 -1
- package/dist/cjs/identity/IIdentityProvider.js.map +1 -1
- package/dist/cjs/identity/IdentityProvider.js +44 -22
- package/dist/cjs/identity/IdentityProvider.js.map +1 -1
- package/dist/cjs/identity/index.js +2 -1
- package/dist/cjs/identity/index.js.map +1 -1
- package/dist/cjs/index.js +1 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/joinPaths.js +2 -0
- package/dist/cjs/joinPaths.js.map +1 -1
- package/dist/cjs/messaging/IMessenger.js +5 -1
- package/dist/cjs/messaging/IMessenger.js.map +1 -1
- package/dist/cjs/messaging/Message.js +10 -2
- package/dist/cjs/messaging/Message.js.map +1 -1
- package/dist/cjs/messaging/Messenger.js +15 -10
- package/dist/cjs/messaging/Messenger.js.map +1 -1
- package/dist/cjs/messaging/index.js +2 -1
- package/dist/cjs/messaging/index.js.map +1 -1
- package/dist/cjs/queries/HubConnectionKeepAlive.js +41 -6
- package/dist/cjs/queries/HubConnectionKeepAlive.js.map +1 -1
- package/dist/cjs/queries/IQueryProvider.js +5 -1
- package/dist/cjs/queries/IQueryProvider.js.map +1 -1
- package/dist/cjs/queries/NullObservableQueryConnection.js +13 -7
- package/dist/cjs/queries/NullObservableQueryConnection.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryConnection.js +43 -31
- package/dist/cjs/queries/ObservableQueryConnection.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryConnectionFactory.js +36 -14
- package/dist/cjs/queries/ObservableQueryConnectionFactory.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryConnectionPool.js +37 -6
- package/dist/cjs/queries/ObservableQueryConnectionPool.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryDiagnostics.js +29 -14
- package/dist/cjs/queries/ObservableQueryDiagnostics.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryFor.js +57 -31
- package/dist/cjs/queries/ObservableQueryFor.js.map +1 -1
- package/dist/cjs/queries/ObservableQueryMultiplexer.js +109 -51
- package/dist/cjs/queries/ObservableQueryMultiplexer.js.map +1 -1
- package/dist/cjs/queries/ObservableQuerySubscription.js +12 -3
- package/dist/cjs/queries/ObservableQuerySubscription.js.map +1 -1
- package/dist/cjs/queries/Paging.js +20 -6
- package/dist/cjs/queries/Paging.js.map +1 -1
- package/dist/cjs/queries/PagingInfo.js +23 -7
- package/dist/cjs/queries/PagingInfo.js.map +1 -1
- package/dist/cjs/queries/QueryFor.js +42 -24
- package/dist/cjs/queries/QueryFor.js.map +1 -1
- package/dist/cjs/queries/QueryInstanceCache.js +149 -37
- package/dist/cjs/queries/QueryInstanceCache.js.map +1 -1
- package/dist/cjs/queries/QueryProvider.js +13 -3
- package/dist/cjs/queries/QueryProvider.js.map +1 -1
- package/dist/cjs/queries/QueryResult.js +39 -33
- package/dist/cjs/queries/QueryResult.js.map +1 -1
- package/dist/cjs/queries/QueryResultWithState.js +26 -4
- package/dist/cjs/queries/QueryResultWithState.js.map +1 -1
- package/dist/cjs/queries/QueryTransportMethod.js +15 -5
- package/dist/cjs/queries/QueryTransportMethod.js.map +1 -1
- package/dist/cjs/queries/QueryValidator.js +10 -2
- package/dist/cjs/queries/QueryValidator.js.map +1 -1
- package/dist/cjs/queries/ReconnectPolicy.js +27 -6
- package/dist/cjs/queries/ReconnectPolicy.js.map +1 -1
- package/dist/cjs/queries/ServerSentEventHubConnection.js +107 -61
- package/dist/cjs/queries/ServerSentEventHubConnection.js.map +1 -1
- package/dist/cjs/queries/ServerSentEventQueryConnection.js +31 -23
- package/dist/cjs/queries/ServerSentEventQueryConnection.js.map +1 -1
- package/dist/cjs/queries/SortDirection.js +18 -6
- package/dist/cjs/queries/SortDirection.js.map +1 -1
- package/dist/cjs/queries/Sorting.js +16 -4
- package/dist/cjs/queries/Sorting.js.map +1 -1
- package/dist/cjs/queries/SortingActions.js +15 -4
- package/dist/cjs/queries/SortingActions.js.map +1 -1
- package/dist/cjs/queries/SortingActionsForObservableQuery.js +16 -4
- package/dist/cjs/queries/SortingActionsForObservableQuery.js.map +1 -1
- package/dist/cjs/queries/SortingActionsForQuery.js +16 -4
- package/dist/cjs/queries/SortingActionsForQuery.js.map +1 -1
- package/dist/cjs/queries/ValidateRequestArguments.js +13 -9
- package/dist/cjs/queries/ValidateRequestArguments.js.map +1 -1
- package/dist/cjs/queries/WebSocketHubConnection.js +98 -52
- package/dist/cjs/queries/WebSocketHubConnection.js.map +1 -1
- package/dist/cjs/queries/WebSocketMessage.js +18 -6
- package/dist/cjs/queries/WebSocketMessage.js.map +1 -1
- package/dist/cjs/queries/index.js +6 -18
- package/dist/cjs/queries/index.js.map +1 -1
- package/dist/cjs/reflection/ParameterDescriptor.js +11 -2
- package/dist/cjs/reflection/ParameterDescriptor.js.map +1 -1
- package/dist/cjs/reflection/ParametersHelper.js +11 -3
- package/dist/cjs/reflection/ParametersHelper.js.map +1 -1
- package/dist/cjs/reflection/PropertyDescriptor.js +11 -2
- package/dist/cjs/reflection/PropertyDescriptor.js.map +1 -1
- package/dist/cjs/reflection/index.js +2 -1
- package/dist/cjs/reflection/index.js.map +1 -1
- package/dist/cjs/validation/PropertyRule.js +23 -5
- package/dist/cjs/validation/PropertyRule.js.map +1 -1
- package/dist/cjs/validation/PropertyValidator.js +25 -6
- package/dist/cjs/validation/PropertyValidator.js.map +1 -1
- package/dist/cjs/validation/RuleBuilder.js +22 -4
- package/dist/cjs/validation/RuleBuilder.js.map +1 -1
- package/dist/cjs/validation/RuleBuilderExtensions.js +95 -13
- package/dist/cjs/validation/RuleBuilderExtensions.js.map +1 -1
- package/dist/cjs/validation/ValidationResult.js +6 -2
- package/dist/cjs/validation/ValidationResult.js.map +1 -1
- package/dist/cjs/validation/ValidationResultSeverity.js +21 -7
- package/dist/cjs/validation/ValidationResultSeverity.js.map +1 -1
- package/dist/cjs/validation/Validator.js +32 -9
- package/dist/cjs/validation/Validator.js.map +1 -1
- package/dist/cjs/validation/index.js +3 -5
- package/dist/cjs/validation/index.js.map +1 -1
- package/dist/cjs/validation/rules/ComparisonRules.js +46 -20
- package/dist/cjs/validation/rules/ComparisonRules.js.map +1 -1
- package/dist/cjs/validation/rules/EmailRule.js +12 -4
- package/dist/cjs/validation/rules/EmailRule.js.map +1 -1
- package/dist/cjs/validation/rules/LengthRules.js +39 -19
- package/dist/cjs/validation/rules/LengthRules.js.map +1 -1
- package/dist/cjs/validation/rules/NotEmptyRule.js +20 -6
- package/dist/cjs/validation/rules/NotEmptyRule.js.map +1 -1
- package/dist/cjs/validation/rules/PhoneRule.js +12 -4
- package/dist/cjs/validation/rules/PhoneRule.js.map +1 -1
- package/dist/cjs/validation/rules/RegexRule.js +15 -6
- package/dist/cjs/validation/rules/RegexRule.js.map +1 -1
- package/dist/cjs/validation/rules/UrlRule.js +12 -4
- package/dist/cjs/validation/rules/UrlRule.js.map +1 -1
- package/dist/esm/Globals.js +20 -8
- package/dist/esm/Globals.js.map +1 -1
- package/dist/esm/UrlHelpers.d.ts.map +1 -1
- package/dist/esm/UrlHelpers.js +46 -13
- package/dist/esm/UrlHelpers.js.map +1 -1
- package/dist/esm/commands/Command.d.ts.map +1 -1
- package/dist/esm/commands/Command.js +50 -38
- package/dist/esm/commands/Command.js.map +1 -1
- package/dist/esm/commands/CommandResult.d.ts.map +1 -1
- package/dist/esm/commands/CommandResult.js +58 -36
- package/dist/esm/commands/CommandResult.js.map +1 -1
- package/dist/esm/commands/CommandResults.d.ts.map +1 -1
- package/dist/esm/commands/CommandResults.js +24 -22
- package/dist/esm/commands/CommandResults.js.map +1 -1
- package/dist/esm/commands/CommandValidator.d.ts.map +1 -1
- package/dist/esm/commands/CommandValidator.js +10 -2
- package/dist/esm/commands/CommandValidator.js.map +1 -1
- package/dist/esm/commands/for_Command/CommandWithRouteParams.d.ts.map +1 -1
- package/dist/esm/commands/for_Command/SomeCommand.d.ts.map +1 -1
- package/dist/esm/commands/for_Command/given/a_command.d.ts.map +1 -1
- package/dist/esm/commands/for_Command/given/a_command_with_validator.d.ts.map +1 -1
- package/dist/esm/commands/index.js +3 -1
- package/dist/esm/commands/index.js.map +1 -1
- package/dist/esm/deepEqual.d.ts.map +1 -1
- package/dist/esm/deepEqual.js +9 -9
- package/dist/esm/deepEqual.js.map +1 -1
- package/dist/esm/given.d.ts.map +1 -1
- package/dist/esm/helpers/fetchHelper.d.ts.map +1 -1
- package/dist/esm/identity/IIdentityProvider.d.ts.map +1 -1
- package/dist/esm/identity/IIdentityProvider.js +5 -1
- package/dist/esm/identity/IIdentityProvider.js.map +1 -1
- package/dist/esm/identity/IdentityProvider.d.ts.map +1 -1
- package/dist/esm/identity/IdentityProvider.js +44 -22
- package/dist/esm/identity/IdentityProvider.js.map +1 -1
- package/dist/esm/identity/for_IdentityProvider/given/an_identity_provider.d.ts.map +1 -1
- package/dist/esm/identity/index.js +3 -0
- package/dist/esm/identity/index.js.map +1 -1
- package/dist/esm/joinPaths.js +2 -0
- package/dist/esm/joinPaths.js.map +1 -1
- package/dist/esm/messaging/IMessenger.d.ts.map +1 -1
- package/dist/esm/messaging/IMessenger.js +5 -1
- package/dist/esm/messaging/IMessenger.js.map +1 -1
- package/dist/esm/messaging/Message.d.ts.map +1 -1
- package/dist/esm/messaging/Message.js +10 -2
- package/dist/esm/messaging/Message.js.map +1 -1
- package/dist/esm/messaging/Messenger.d.ts.map +1 -1
- package/dist/esm/messaging/Messenger.js +15 -10
- package/dist/esm/messaging/Messenger.js.map +1 -1
- package/dist/esm/messaging/for_Messenger/when_scoping_messages.js.map +1 -1
- package/dist/esm/messaging/index.js +3 -0
- package/dist/esm/messaging/index.js.map +1 -1
- package/dist/esm/queries/HubConnectionKeepAlive.d.ts.map +1 -1
- package/dist/esm/queries/HubConnectionKeepAlive.js +41 -6
- package/dist/esm/queries/HubConnectionKeepAlive.js.map +1 -1
- package/dist/esm/queries/IQueryProvider.d.ts.map +1 -1
- package/dist/esm/queries/IQueryProvider.js +5 -1
- package/dist/esm/queries/IQueryProvider.js.map +1 -1
- package/dist/esm/queries/NullObservableQueryConnection.d.ts.map +1 -1
- package/dist/esm/queries/NullObservableQueryConnection.js +13 -7
- package/dist/esm/queries/NullObservableQueryConnection.js.map +1 -1
- package/dist/esm/queries/ObservableQueryConnection.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryConnection.js +43 -31
- package/dist/esm/queries/ObservableQueryConnection.js.map +1 -1
- package/dist/esm/queries/ObservableQueryConnectionFactory.js +36 -14
- package/dist/esm/queries/ObservableQueryConnectionFactory.js.map +1 -1
- package/dist/esm/queries/ObservableQueryConnectionPool.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryConnectionPool.js +37 -6
- package/dist/esm/queries/ObservableQueryConnectionPool.js.map +1 -1
- package/dist/esm/queries/ObservableQueryDiagnostics.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryDiagnostics.js +29 -14
- package/dist/esm/queries/ObservableQueryDiagnostics.js.map +1 -1
- package/dist/esm/queries/ObservableQueryFor.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryFor.js +57 -31
- package/dist/esm/queries/ObservableQueryFor.js.map +1 -1
- package/dist/esm/queries/ObservableQueryMultiplexer.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQueryMultiplexer.js +109 -51
- package/dist/esm/queries/ObservableQueryMultiplexer.js.map +1 -1
- package/dist/esm/queries/ObservableQuerySubscription.d.ts.map +1 -1
- package/dist/esm/queries/ObservableQuerySubscription.js +12 -3
- package/dist/esm/queries/ObservableQuerySubscription.js.map +1 -1
- package/dist/esm/queries/Paging.d.ts.map +1 -1
- package/dist/esm/queries/Paging.js +20 -6
- package/dist/esm/queries/Paging.js.map +1 -1
- package/dist/esm/queries/PagingInfo.d.ts.map +1 -1
- package/dist/esm/queries/PagingInfo.js +23 -7
- package/dist/esm/queries/PagingInfo.js.map +1 -1
- package/dist/esm/queries/QueryFor.d.ts.map +1 -1
- package/dist/esm/queries/QueryFor.js +42 -24
- package/dist/esm/queries/QueryFor.js.map +1 -1
- package/dist/esm/queries/QueryInstanceCache.d.ts.map +1 -1
- package/dist/esm/queries/QueryInstanceCache.js +149 -37
- package/dist/esm/queries/QueryInstanceCache.js.map +1 -1
- package/dist/esm/queries/QueryProvider.d.ts.map +1 -1
- package/dist/esm/queries/QueryProvider.js +13 -3
- package/dist/esm/queries/QueryProvider.js.map +1 -1
- package/dist/esm/queries/QueryResult.d.ts.map +1 -1
- package/dist/esm/queries/QueryResult.js +39 -33
- package/dist/esm/queries/QueryResult.js.map +1 -1
- package/dist/esm/queries/QueryResultWithState.d.ts.map +1 -1
- package/dist/esm/queries/QueryResultWithState.js +26 -4
- package/dist/esm/queries/QueryResultWithState.js.map +1 -1
- package/dist/esm/queries/QueryTransportMethod.js +13 -5
- package/dist/esm/queries/QueryTransportMethod.js.map +1 -1
- package/dist/esm/queries/QueryValidator.d.ts.map +1 -1
- package/dist/esm/queries/QueryValidator.js +10 -2
- package/dist/esm/queries/QueryValidator.js.map +1 -1
- package/dist/esm/queries/ReconnectPolicy.d.ts.map +1 -1
- package/dist/esm/queries/ReconnectPolicy.js +27 -6
- package/dist/esm/queries/ReconnectPolicy.js.map +1 -1
- package/dist/esm/queries/ServerSentEventHubConnection.d.ts.map +1 -1
- package/dist/esm/queries/ServerSentEventHubConnection.js +107 -61
- package/dist/esm/queries/ServerSentEventHubConnection.js.map +1 -1
- package/dist/esm/queries/ServerSentEventQueryConnection.d.ts.map +1 -1
- package/dist/esm/queries/ServerSentEventQueryConnection.js +31 -23
- package/dist/esm/queries/ServerSentEventQueryConnection.js.map +1 -1
- package/dist/esm/queries/SortDirection.js +16 -6
- package/dist/esm/queries/SortDirection.js.map +1 -1
- package/dist/esm/queries/Sorting.d.ts.map +1 -1
- package/dist/esm/queries/Sorting.js +16 -4
- package/dist/esm/queries/Sorting.js.map +1 -1
- package/dist/esm/queries/SortingActions.d.ts.map +1 -1
- package/dist/esm/queries/SortingActions.js +15 -4
- package/dist/esm/queries/SortingActions.js.map +1 -1
- package/dist/esm/queries/SortingActionsForObservableQuery.d.ts.map +1 -1
- package/dist/esm/queries/SortingActionsForObservableQuery.js +16 -4
- package/dist/esm/queries/SortingActionsForObservableQuery.js.map +1 -1
- package/dist/esm/queries/SortingActionsForQuery.d.ts.map +1 -1
- package/dist/esm/queries/SortingActionsForQuery.js +16 -4
- package/dist/esm/queries/SortingActionsForQuery.js.map +1 -1
- package/dist/esm/queries/ValidateRequestArguments.js +13 -9
- package/dist/esm/queries/ValidateRequestArguments.js.map +1 -1
- package/dist/esm/queries/WebSocketHubConnection.d.ts.map +1 -1
- package/dist/esm/queries/WebSocketHubConnection.js +97 -52
- package/dist/esm/queries/WebSocketHubConnection.js.map +1 -1
- package/dist/esm/queries/WebSocketMessage.js +16 -6
- package/dist/esm/queries/WebSocketMessage.js.map +1 -1
- 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_with_websocket.d.ts.map +1 -1
- package/dist/esm/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts.map +1 -1
- package/dist/esm/queries/for_ObservableQueryFor/given/TestQueries.d.ts.map +1 -1
- package/dist/esm/queries/for_ObservableQueryFor/given/an_observable_query_for.d.ts.map +1 -1
- package/dist/esm/queries/for_QueryFor/given/TestQueries.d.ts.map +1 -1
- package/dist/esm/queries/for_QueryFor/given/a_query_for.d.ts.map +1 -1
- package/dist/esm/queries/for_QueryFor/given/a_query_with_validator.d.ts.map +1 -1
- package/dist/esm/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts.map +1 -1
- package/dist/esm/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts.map +1 -1
- package/dist/esm/queries/index.js +3 -1
- package/dist/esm/queries/index.js.map +1 -1
- package/dist/esm/reflection/ParameterDescriptor.d.ts.map +1 -1
- package/dist/esm/reflection/ParameterDescriptor.js +11 -2
- package/dist/esm/reflection/ParameterDescriptor.js.map +1 -1
- package/dist/esm/reflection/ParametersHelper.d.ts.map +1 -1
- package/dist/esm/reflection/ParametersHelper.js +11 -3
- package/dist/esm/reflection/ParametersHelper.js.map +1 -1
- package/dist/esm/reflection/PropertyDescriptor.d.ts.map +1 -1
- package/dist/esm/reflection/PropertyDescriptor.js +11 -2
- package/dist/esm/reflection/PropertyDescriptor.js.map +1 -1
- package/dist/esm/reflection/index.js +3 -0
- package/dist/esm/reflection/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/validation/PropertyRule.d.ts.map +1 -1
- package/dist/esm/validation/PropertyRule.js +23 -5
- package/dist/esm/validation/PropertyRule.js.map +1 -1
- package/dist/esm/validation/PropertyValidator.d.ts.map +1 -1
- package/dist/esm/validation/PropertyValidator.js +25 -6
- package/dist/esm/validation/PropertyValidator.js.map +1 -1
- package/dist/esm/validation/RuleBuilder.d.ts.map +1 -1
- package/dist/esm/validation/RuleBuilder.js +22 -4
- package/dist/esm/validation/RuleBuilder.js.map +1 -1
- package/dist/esm/validation/RuleBuilderExtensions.js +95 -13
- package/dist/esm/validation/RuleBuilderExtensions.js.map +1 -1
- package/dist/esm/validation/ValidationResult.d.ts.map +1 -1
- package/dist/esm/validation/ValidationResult.js +6 -2
- package/dist/esm/validation/ValidationResult.js.map +1 -1
- package/dist/esm/validation/ValidationResultSeverity.js +19 -7
- package/dist/esm/validation/ValidationResultSeverity.js.map +1 -1
- package/dist/esm/validation/Validator.d.ts.map +1 -1
- package/dist/esm/validation/Validator.js +32 -9
- package/dist/esm/validation/Validator.js.map +1 -1
- package/dist/esm/validation/index.js +3 -0
- package/dist/esm/validation/index.js.map +1 -1
- package/dist/esm/validation/rules/ComparisonRules.d.ts.map +1 -1
- package/dist/esm/validation/rules/ComparisonRules.js +46 -20
- package/dist/esm/validation/rules/ComparisonRules.js.map +1 -1
- package/dist/esm/validation/rules/EmailRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/EmailRule.js +12 -4
- package/dist/esm/validation/rules/EmailRule.js.map +1 -1
- package/dist/esm/validation/rules/LengthRules.d.ts.map +1 -1
- package/dist/esm/validation/rules/LengthRules.js +39 -19
- package/dist/esm/validation/rules/LengthRules.js.map +1 -1
- package/dist/esm/validation/rules/NotEmptyRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/NotEmptyRule.js +20 -6
- package/dist/esm/validation/rules/NotEmptyRule.js.map +1 -1
- package/dist/esm/validation/rules/PhoneRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/PhoneRule.js +12 -4
- package/dist/esm/validation/rules/PhoneRule.js.map +1 -1
- package/dist/esm/validation/rules/RegexRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/RegexRule.js +15 -6
- package/dist/esm/validation/rules/RegexRule.js.map +1 -1
- package/dist/esm/validation/rules/UrlRule.d.ts.map +1 -1
- package/dist/esm/validation/rules/UrlRule.js +12 -4
- package/dist/esm/validation/rules/UrlRule.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/GetHttpHeaders.d.ts +0 -2
- package/dist/cjs/GetHttpHeaders.d.ts.map +0 -1
- package/dist/cjs/Globals.d.ts +0 -21
- package/dist/cjs/Globals.d.ts.map +0 -1
- package/dist/cjs/ICanBeConfigured.d.ts +0 -8
- package/dist/cjs/ICanBeConfigured.d.ts.map +0 -1
- package/dist/cjs/UrlHelpers.d.ts +0 -9
- package/dist/cjs/UrlHelpers.d.ts.map +0 -1
- package/dist/cjs/commands/Command.d.ts +0 -45
- package/dist/cjs/commands/Command.d.ts.map +0 -1
- package/dist/cjs/commands/CommandResult.d.ts +0 -49
- package/dist/cjs/commands/CommandResult.d.ts.map +0 -1
- package/dist/cjs/commands/CommandResults.d.ts +0 -23
- package/dist/cjs/commands/CommandResults.d.ts.map +0 -1
- package/dist/cjs/commands/CommandValidator.d.ts +0 -6
- package/dist/cjs/commands/CommandValidator.d.ts.map +0 -1
- package/dist/cjs/commands/ICommand.d.ts +0 -21
- package/dist/cjs/commands/ICommand.d.ts.map +0 -1
- package/dist/cjs/commands/ICommandResult.d.ts +0 -15
- package/dist/cjs/commands/ICommandResult.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/CommandWithRouteParams.d.ts +0 -16
- package/dist/cjs/commands/for_Command/CommandWithRouteParams.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/SomeCommand.d.ts +0 -14
- package/dist/cjs/commands/for_Command/SomeCommand.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/given/a_command.d.ts +0 -12
- package/dist/cjs/commands/for_Command/given/a_command.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/given/a_command_with_validator.d.ts +0 -33
- package/dist/cjs/commands/for_Command/given/a_command_with_validator.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_clearing_the_command.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_clearing_the_command.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_constructing_command.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_constructing_command.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_api_base_path.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_api_base_path.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_origin.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_constructing_command_with_globals_origin.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/and_command_route_not_found.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/and_command_route_not_found.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/and_fetch_throws_exception.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/and_fetch_throws_exception.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_allowed_severity_warning.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_allowed_severity_warning.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failure_and_custom_message.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_failure_and_custom_message.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_passing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_client_validation_passing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_command_properties.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_command_properties.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_custom_http_headers.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_custom_http_headers.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_empty_required_string_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_empty_required_string_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_microservice_header.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_microservice_header.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_missing_required_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_missing_required_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_null_required_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_null_required_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_origin_and_api_base_path.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_origin_and_api_base_path.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_route_parameters.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_route_parameters.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_executing/with_successful_response.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_executing/with_successful_response.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_different_from_initial_value.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_different_from_initial_value.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_same_as_initial_value.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_changed_value_that_is_same_as_initial_value.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_changes_and_initial_value_is_undefined.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_changes_and_initial_value_is_undefined.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_changes_and_there_is_a_callback.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_changes_and_there_is_a_callback.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_property_has_changed_and_we_revert.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_property_has_changed_and_we_revert.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_setting_initial_values_after_property_changed.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_setting_initial_values_after_property_changed.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/and_fetch_throws_exception.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/and_fetch_throws_exception.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/and_validation_endpoint_not_found.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/and_validation_endpoint_not_found.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/does_not_update_initial_values.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/does_not_update_initial_values.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_client_validation_failure.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_client_validation_failure.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_client_validation_passing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_client_validation_passing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_empty_required_string_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_empty_required_string_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_null_required_property.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_null_required_property.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_required_property_missing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_required_property_missing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_route_parameters.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_route_parameters.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_successful_response.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_successful_response.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating/with_validation_errors.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating/with_validation_errors.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_failure.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_failure.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_passing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_client_validation_passing.d.ts.map +0 -1
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_required_property_missing.d.ts +0 -2
- package/dist/cjs/commands/for_Command/when_validating_client_side/with_required_property_missing.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_has_exceptions.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_has_exceptions.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_invalid.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_invalid.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_successful.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_successful.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_unauthorized.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_chaining_callbacks/and_result_is_unauthorized.d.ts.map +0 -1
- package/dist/cjs/commands/for_CommandResult/when_constructing_with_primitive_response.d.ts +0 -2
- package/dist/cjs/commands/for_CommandResult/when_constructing_with_primitive_response.d.ts.map +0 -1
- package/dist/cjs/commands/index.d.ts +0 -8
- package/dist/cjs/commands/index.d.ts.map +0 -1
- package/dist/cjs/deepEqual.d.ts +0 -2
- package/dist/cjs/deepEqual.d.ts.map +0 -1
- package/dist/cjs/given.d.ts +0 -5
- package/dist/cjs/given.d.ts.map +0 -1
- package/dist/cjs/helpers/fetchHelper.d.ts +0 -7
- package/dist/cjs/helpers/fetchHelper.d.ts.map +0 -1
- package/dist/cjs/identity/IIdentity.d.ts +0 -10
- package/dist/cjs/identity/IIdentity.d.ts.map +0 -1
- package/dist/cjs/identity/IIdentityProvider.d.ts +0 -6
- package/dist/cjs/identity/IIdentityProvider.d.ts.map +0 -1
- package/dist/cjs/identity/IdentityProvider.d.ts +0 -20
- package/dist/cjs/identity/IdentityProvider.d.ts.map +0 -1
- package/dist/cjs/identity/IdentityProviderResult.d.ts +0 -7
- package/dist/cjs/identity/IdentityProviderResult.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/given/an_identity_provider.d.ts +0 -12
- package/dist/cjs/identity/for_IdentityProvider/given/an_identity_provider.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_roles.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_roles.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_type_safe_details.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/with_type_safe_details.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/without_roles.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_getting_current/without_roles.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_api_base_path_set.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_api_base_path_set.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_globals_api_base_path.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_globals_api_base_path.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_origin_set.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_origin_set.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_type_safe_details.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_type_safe_details.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_unauthorized_response.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/with_unauthorized_response.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/without_api_base_path.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_refreshing/without_api_base_path.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_setting_api_base_path.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_setting_api_base_path.d.ts.map +0 -1
- package/dist/cjs/identity/for_IdentityProvider/when_setting_origin.d.ts +0 -2
- package/dist/cjs/identity/for_IdentityProvider/when_setting_origin.d.ts.map +0 -1
- package/dist/cjs/identity/index.d.ts +0 -5
- package/dist/cjs/identity/index.d.ts.map +0 -1
- package/dist/cjs/index.d.ts +0 -14
- package/dist/cjs/index.d.ts.map +0 -1
- package/dist/cjs/joinPaths.d.ts +0 -2
- package/dist/cjs/joinPaths.d.ts.map +0 -1
- package/dist/cjs/messaging/IMessenger.d.ts +0 -10
- package/dist/cjs/messaging/IMessenger.d.ts.map +0 -1
- package/dist/cjs/messaging/Message.d.ts +0 -7
- package/dist/cjs/messaging/Message.d.ts.map +0 -1
- package/dist/cjs/messaging/Messenger.d.ts +0 -20
- package/dist/cjs/messaging/Messenger.d.ts.map +0 -1
- package/dist/cjs/messaging/for_Messenger/when_scoping_messages.d.ts +0 -2
- package/dist/cjs/messaging/for_Messenger/when_scoping_messages.d.ts.map +0 -1
- package/dist/cjs/messaging/index.d.ts +0 -4
- package/dist/cjs/messaging/index.d.ts.map +0 -1
- package/dist/cjs/queries/ChangeSet.d.ts +0 -6
- package/dist/cjs/queries/ChangeSet.d.ts.map +0 -1
- package/dist/cjs/queries/HubConnectionKeepAlive.d.ts +0 -12
- package/dist/cjs/queries/HubConnectionKeepAlive.d.ts.map +0 -1
- package/dist/cjs/queries/IChangeStreamFor.d.ts +0 -4
- package/dist/cjs/queries/IChangeStreamFor.d.ts.map +0 -1
- package/dist/cjs/queries/IObservableQueryConnection.d.ts +0 -8
- package/dist/cjs/queries/IObservableQueryConnection.d.ts.map +0 -1
- package/dist/cjs/queries/IObservableQueryDiagnostics.d.ts +0 -9
- package/dist/cjs/queries/IObservableQueryDiagnostics.d.ts.map +0 -1
- package/dist/cjs/queries/IObservableQueryFor.d.ts +0 -14
- package/dist/cjs/queries/IObservableQueryFor.d.ts.map +0 -1
- package/dist/cjs/queries/IObservableQueryHubConnection.d.ts +0 -12
- package/dist/cjs/queries/IObservableQueryHubConnection.d.ts.map +0 -1
- package/dist/cjs/queries/IQuery.d.ts +0 -10
- package/dist/cjs/queries/IQuery.d.ts.map +0 -1
- package/dist/cjs/queries/IQueryFor.d.ts +0 -13
- package/dist/cjs/queries/IQueryFor.d.ts.map +0 -1
- package/dist/cjs/queries/IQueryProvider.d.ts +0 -6
- package/dist/cjs/queries/IQueryProvider.d.ts.map +0 -1
- package/dist/cjs/queries/IQueryResult.d.ts +0 -17
- package/dist/cjs/queries/IQueryResult.d.ts.map +0 -1
- package/dist/cjs/queries/IReconnectPolicy.d.ts +0 -8
- package/dist/cjs/queries/IReconnectPolicy.d.ts.map +0 -1
- package/dist/cjs/queries/NullObservableQueryConnection.d.ts +0 -11
- package/dist/cjs/queries/NullObservableQueryConnection.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryConnection.d.ts +0 -29
- package/dist/cjs/queries/ObservableQueryConnection.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryConnectionFactory.d.ts +0 -13
- package/dist/cjs/queries/ObservableQueryConnectionFactory.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryConnectionPool.d.ts +0 -9
- package/dist/cjs/queries/ObservableQueryConnectionPool.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryDiagnostics.d.ts +0 -21
- package/dist/cjs/queries/ObservableQueryDiagnostics.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryDiagnosticsSnapshot.d.ts +0 -48
- package/dist/cjs/queries/ObservableQueryDiagnosticsSnapshot.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryFor.d.ts +0 -37
- package/dist/cjs/queries/ObservableQueryFor.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQueryMultiplexer.d.ts +0 -33
- package/dist/cjs/queries/ObservableQueryMultiplexer.d.ts.map +0 -1
- package/dist/cjs/queries/ObservableQuerySubscription.d.ts +0 -7
- package/dist/cjs/queries/ObservableQuerySubscription.d.ts.map +0 -1
- package/dist/cjs/queries/Paging.d.ts +0 -8
- package/dist/cjs/queries/Paging.d.ts.map +0 -1
- package/dist/cjs/queries/PagingInfo.d.ts +0 -9
- package/dist/cjs/queries/PagingInfo.d.ts.map +0 -1
- package/dist/cjs/queries/QueryFor.d.ts +0 -34
- package/dist/cjs/queries/QueryFor.d.ts.map +0 -1
- package/dist/cjs/queries/QueryInstanceCache.d.ts +0 -39
- package/dist/cjs/queries/QueryInstanceCache.d.ts.map +0 -1
- package/dist/cjs/queries/QueryProvider.d.ts +0 -13
- package/dist/cjs/queries/QueryProvider.d.ts.map +0 -1
- package/dist/cjs/queries/QueryResult.d.ts +0 -53
- package/dist/cjs/queries/QueryResult.d.ts.map +0 -1
- package/dist/cjs/queries/QueryResultWithState.d.ts +0 -24
- package/dist/cjs/queries/QueryResultWithState.d.ts.map +0 -1
- package/dist/cjs/queries/QueryTransportMethod.d.ts +0 -5
- package/dist/cjs/queries/QueryTransportMethod.d.ts.map +0 -1
- package/dist/cjs/queries/QueryValidator.d.ts +0 -6
- package/dist/cjs/queries/QueryValidator.d.ts.map +0 -1
- package/dist/cjs/queries/ReconnectPolicy.d.ts +0 -15
- package/dist/cjs/queries/ReconnectPolicy.d.ts.map +0 -1
- package/dist/cjs/queries/ServerSentEventHubConnection.d.ts +0 -41
- package/dist/cjs/queries/ServerSentEventHubConnection.d.ts.map +0 -1
- package/dist/cjs/queries/ServerSentEventQueryConnection.d.ts +0 -14
- package/dist/cjs/queries/ServerSentEventQueryConnection.d.ts.map +0 -1
- package/dist/cjs/queries/SortDirection.d.ts +0 -6
- package/dist/cjs/queries/SortDirection.d.ts.map +0 -1
- package/dist/cjs/queries/Sorting.d.ts +0 -9
- package/dist/cjs/queries/Sorting.d.ts.map +0 -1
- package/dist/cjs/queries/SortingActions.d.ts +0 -10
- package/dist/cjs/queries/SortingActions.d.ts.map +0 -1
- package/dist/cjs/queries/SortingActionsForObservableQuery.d.ts +0 -10
- package/dist/cjs/queries/SortingActionsForObservableQuery.d.ts.map +0 -1
- package/dist/cjs/queries/SortingActionsForQuery.d.ts +0 -10
- package/dist/cjs/queries/SortingActionsForQuery.d.ts.map +0 -1
- package/dist/cjs/queries/ValidateRequestArguments.d.ts +0 -2
- package/dist/cjs/queries/ValidateRequestArguments.d.ts.map +0 -1
- package/dist/cjs/queries/WebSocketHubConnection.d.ts +0 -58
- package/dist/cjs/queries/WebSocketHubConnection.d.ts.map +0 -1
- package/dist/cjs/queries/WebSocketMessage.d.ts +0 -11
- package/dist/cjs/queries/WebSocketMessage.d.ts.map +0 -1
- package/dist/cjs/queries/for_HubConnectionKeepAlive/behavior.d.ts +0 -2
- package/dist/cjs/queries/for_HubConnectionKeepAlive/behavior.d.ts.map +0 -1
- package/dist/cjs/queries/for_HubConnectionKeepAlive/when_started_with_custom_idle_threshold/respects_threshold.d.ts +0 -2
- package/dist/cjs/queries/for_HubConnectionKeepAlive/when_started_with_custom_idle_threshold/respects_threshold.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts +0 -9
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection_with_websocket.d.ts +0 -21
- package/dist/cjs/queries/for_ObservableQueryConnection/given/an_observable_query_connection_with_websocket.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/when_constructing.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnection/when_constructing.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_data_message_with_type.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_data_message_with_type.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_legacy_data_message.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnection/when_receiving_legacy_data_message.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts +0 -9
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/given/a_descriptor.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_sse_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_direct_mode_and_websocket_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_exceeding_safe_limit.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_exceeding_safe_limit.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_within_safe_limit.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_sse_transport_and_connection_count_within_safe_limit.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport_and_high_connection_count.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionFactory/when_creating/with_hub_mode_and_websocket_transport_and_high_connection_count.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_least_loaded_slot_is_chosen.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_multiple_slots/and_size_is_zero.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryConnectionPool/when_acquiring/with_single_slot/and_one_subscriber.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryDiagnostics/when_tracking_owners.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryDiagnostics/when_tracking_owners.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/given/TestQueries.d.ts +0 -53
- package/dist/cjs/queries/for_ObservableQueryFor/given/TestQueries.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/given/an_observable_query_for.d.ts +0 -10
- package/dist/cjs/queries/for_ObservableQueryFor/given/an_observable_query_for.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_enumerable.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_enumerable.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_api_base_path.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_api_base_path.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_origin.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_constructing_with_globals_origin.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_disposing.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_disposing.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_enumerable_query.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_enumerable_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_invalid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_invalid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_paging.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_paging.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partially_missing_required_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_partially_missing_required_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_sorting.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_sorting.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_valid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_performing/with_valid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_api_base_path.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_api_base_path.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_microservice.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_microservice.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_origin.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_setting_origin.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_and_sse_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_disabled_and_sse_transport.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_direct_mode_enabled.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_enumerable_query.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_enumerable_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_multiple_required_route_parameters.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_multiple_required_route_parameters.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_null_or_undefined_args.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_null_or_undefined_args.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_route_and_query_args.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_sse_transport_and_route_and_query_args.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_stale_descriptor_backed_instance_property.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_hub_mode_and_stale_descriptor_backed_instance_property.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_invalid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_invalid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_paging.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_paging.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_partially_missing_required_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_partially_missing_required_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_route_and_query_args.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_route_and_query_args.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_sorting.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_sorting.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_valid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryFor/when_subscribing/with_valid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_changed_cache_key.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_changed_cache_key.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_new_cache_key.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_a_new_cache_key.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_an_explicit_size.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_an_explicit_size.d.ts.map +0 -1
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_the_same_cache_key.d.ts +0 -2
- package/dist/cjs/queries/for_ObservableQueryMultiplexer/when_getting_or_creating/with_the_same_cache_key.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/given/TestQueries.d.ts +0 -57
- package/dist/cjs/queries/for_QueryFor/given/TestQueries.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/given/a_query_for.d.ts +0 -11
- package/dist/cjs/queries/for_QueryFor/given/a_query_for.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/given/a_query_with_validator.d.ts +0 -35
- package/dist/cjs/queries/for_QueryFor/given/a_query_with_validator.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_constructing.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_constructing.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_constructing_enumerable.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_constructing_enumerable.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_api_base_path.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_api_base_path.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_origin.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_constructing_with_globals_origin.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_abort_controller.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_abort_controller.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failing.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failing.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failure_and_custom_message.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_failure_and_custom_message.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_passing.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_client_validation_passing.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_query.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_enumerable_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_fetch_error.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_fetch_error.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_invalid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_invalid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_json_parse_error.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_json_parse_error.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_paging.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_paging.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_partial_parameter_descriptor_values.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_partially_missing_required_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_partially_missing_required_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_query_without_required_parameters.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_query_without_required_parameters.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_route_parameters_and_unused_parameters.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_sorting.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_sorting.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_performing/with_valid_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_performing/with_valid_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_setting_api_base_path.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_setting_api_base_path.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_setting_microservice.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_setting_microservice.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryFor/when_setting_origin.d.ts +0 -2
- package/dist/cjs/queries/for_QueryFor/when_setting_origin.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_acquiring/after_release.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_acquiring/after_release.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_empty_arguments_object.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/with_same_arguments_different_order.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_building_key/without_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/with_cancellation_before_timeout.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/with_cancellation_before_timeout.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/without_cancellation.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_deferring_dispose/without_cancellation.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/an_empty_cache.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/an_empty_cache.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_active_subscriptions.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_active_subscriptions.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_pending_deferred_cleanup.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_disposing/with_pending_deferred_cleanup.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_no_result_stored.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_last_result/with_stored_result.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_existing_entry.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_getting_or_creating/with_new_entry.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/a_key_that_does_not_exist.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/one_of_two_subscribers.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/the_only_subscriber.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/after_timeout_elapses.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/after_timeout_elapses.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/before_timeout_elapses.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_releasing/with_retention_timeout/before_timeout_elapses.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_a_result.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_changed_data.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_changed_data.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_identical_data_as_previous_result.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/with_identical_data_as_previous_result.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/without_previous_result.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_setting_last_result/without_previous_result.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_active_subscriptions.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_active_subscriptions.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_no_subscriptions.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_no_subscriptions.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_pending_deferred_cleanup.d.ts +0 -2
- package/dist/cjs/queries/for_QueryInstanceCache/when_tearing_down_all_subscriptions/with_pending_deferred_cleanup.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_an_array_with_items.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_an_array_with_items.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_defined_instance.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_defined_instance.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_empty_array.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_empty_array.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_enumerable.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_enumerable.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_non_enumerable.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_null_for_non_enumerable.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_undefined.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_asking_has_data/and_it_is_undefined.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResult/when_data_is_single_item_for_enumerable/and_it_is_an_array.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResult/when_data_is_single_item_for_enumerable/and_it_is_an_array.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_null_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_null_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_undefined_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_empty/with_undefined_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_null_data.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_null_data.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_undefined_data.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_from_query_result/with_undefined_data.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_null_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_null_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_undefined_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_undefined_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_valid_default_value.d.ts +0 -2
- package/dist/cjs/queries/for_QueryResultWithState/when_creating_initial/with_valid_default_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_canceling/with_pending_timer.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_cancelling/with_pending_timer.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_resetting/after_scheduling.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/delay_is_capped_at_max.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_not_reached/first_attempt.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_max_attempts_reached/abandons_reconnect.d.ts.map +0 -1
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_rescheduled_before_first_fires/cancels_previous_timer.d.ts +0 -2
- package/dist/cjs/queries/for_ReconnectPolicy/when_scheduling/and_rescheduled_before_first_fires/cancels_previous_timer.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts +0 -21
- package/dist/cjs/queries/for_ServerSentEventHubConnection/given/a_server_sent_event_hub_connection.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_connect_timeout_fires/triggers_reconnect.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_disposing/cleans_up_resources.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_keep_alive_is_idle/triggers_reconnect.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_reconnecting/after_error.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/and_subscribe_post_fails.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/and_subscribe_post_fails.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/queues_until_connected.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_subscribing/sends_subscribe_post.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/nulls_event_source_handlers_before_closing.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/nulls_event_source_handlers_before_closing.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventHubConnection/when_unsubscribing/the_only_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/with_query_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_connecting/without_event_source_available.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/after_connecting.d.ts.map +0 -1
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts +0 -2
- package/dist/cjs/queries/for_ServerSentEventQueryConnection/when_disconnecting/before_message_arrives.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_empty_string_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_empty_string_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_missing_property.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_missing_property.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_no_required_arguments.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_no_required_arguments.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_null_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_null_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_numeric_zero_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_numeric_zero_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_undefined_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_undefined_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_valid_string_value.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/with_valid_string_value.d.ts.map +0 -1
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/without_arguments_object.d.ts +0 -2
- package/dist/cjs/queries/for_ValidateRequestArguments/when_validating_arguments/without_arguments_object.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts +0 -23
- package/dist/cjs/queries/for_WebSocketHubConnection/given/a_web_socket_hub_connection.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_disposing/cleans_up_resources.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_keep_alive_is_idle/sends_a_ping.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_a_message/resets_keep_alive_timer.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_receiving_unauthorized/notifies_subscriber_and_removes_subscription.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/after_unexpected_close.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_reconnecting/resubscribes_all_queries.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_subscribing/to_a_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/nulls_socket_handlers_before_closing.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/nulls_socket_handlers_before_closing.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketHubConnection/when_unsubscribing/the_only_query.d.ts.map +0 -1
- package/dist/cjs/queries/for_WebSocketMessage/when_creating_messages.d.ts +0 -2
- package/dist/cjs/queries/for_WebSocketMessage/when_creating_messages.d.ts.map +0 -1
- package/dist/cjs/queries/index.d.ts +0 -39
- package/dist/cjs/queries/index.d.ts.map +0 -1
- package/dist/cjs/reflection/IHaveParameters.d.ts +0 -5
- package/dist/cjs/reflection/IHaveParameters.d.ts.map +0 -1
- package/dist/cjs/reflection/ParameterDescriptor.d.ts +0 -8
- package/dist/cjs/reflection/ParameterDescriptor.d.ts.map +0 -1
- package/dist/cjs/reflection/ParametersHelper.d.ts +0 -5
- package/dist/cjs/reflection/ParametersHelper.d.ts.map +0 -1
- package/dist/cjs/reflection/PropertyDescriptor.d.ts +0 -8
- package/dist/cjs/reflection/PropertyDescriptor.d.ts.map +0 -1
- package/dist/cjs/reflection/index.d.ts +0 -5
- package/dist/cjs/reflection/index.d.ts.map +0 -1
- package/dist/cjs/validation/IValidationRule.d.ts +0 -5
- package/dist/cjs/validation/IValidationRule.d.ts.map +0 -1
- package/dist/cjs/validation/PropertyRule.d.ts +0 -11
- package/dist/cjs/validation/PropertyRule.d.ts.map +0 -1
- package/dist/cjs/validation/PropertyValidator.d.ts +0 -11
- package/dist/cjs/validation/PropertyValidator.d.ts.map +0 -1
- package/dist/cjs/validation/RuleBuilder.d.ts +0 -11
- package/dist/cjs/validation/RuleBuilder.d.ts.map +0 -1
- package/dist/cjs/validation/RuleBuilderExtensions.d.ts +0 -32
- package/dist/cjs/validation/RuleBuilderExtensions.d.ts.map +0 -1
- package/dist/cjs/validation/ValidationResult.d.ts +0 -9
- package/dist/cjs/validation/ValidationResult.d.ts.map +0 -1
- package/dist/cjs/validation/ValidationResultSeverity.d.ts +0 -7
- package/dist/cjs/validation/ValidationResultSeverity.d.ts.map +0 -1
- package/dist/cjs/validation/Validator.d.ts +0 -11
- package/dist/cjs/validation/Validator.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_defining_multiple_rules_for_same_property.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_defining_multiple_rules_for_same_property.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_using_custom_error_message.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_using_custom_error_message.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_validating/with_all_rules_passing.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_validating/with_all_rules_passing.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_validating/with_multiple_rules_failing.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_validating/with_multiple_rules_failing.d.ts.map +0 -1
- package/dist/cjs/validation/for_Validator/when_validating/with_one_rule_failing.d.ts +0 -2
- package/dist/cjs/validation/for_Validator/when_validating/with_one_rule_failing.d.ts.map +0 -1
- package/dist/cjs/validation/index.d.ts +0 -14
- package/dist/cjs/validation/index.d.ts.map +0 -1
- package/dist/cjs/validation/rules/ComparisonRules.d.ts +0 -22
- package/dist/cjs/validation/rules/ComparisonRules.d.ts.map +0 -1
- package/dist/cjs/validation/rules/EmailRule.d.ts +0 -7
- package/dist/cjs/validation/rules/EmailRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/LengthRules.d.ts +0 -18
- package/dist/cjs/validation/rules/LengthRules.d.ts.map +0 -1
- package/dist/cjs/validation/rules/NotEmptyRule.d.ts +0 -10
- package/dist/cjs/validation/rules/NotEmptyRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/PhoneRule.d.ts +0 -7
- package/dist/cjs/validation/rules/PhoneRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/RegexRule.d.ts +0 -7
- package/dist/cjs/validation/rules/RegexRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/UrlRule.d.ts +0 -7
- package/dist/cjs/validation/rules/UrlRule.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_empty_string.d.ts +0 -2
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_empty_string.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_invalid_email.d.ts +0 -2
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_invalid_email.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_valid_email.d.ts +0 -2
- package/dist/cjs/validation/rules/for_EmailRule/when_validating/with_valid_email.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_GreaterThanOrEqualRule/when_validating/with_value_equal_to_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_GreaterThanOrEqualRule/when_validating/with_value_equal_to_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_equal_to_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_equal_to_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_greater_than_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_greater_than_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_less_than_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_GreaterThanRule/when_validating/with_value_less_than_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_longer_than_maximum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_longer_than_maximum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_shorter_than_minimum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_shorter_than_minimum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_within_range.d.ts +0 -2
- package/dist/cjs/validation/rules/for_LengthRule/when_validating/with_string_within_range.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_LessThanRule/when_validating/with_value_less_than_threshold.d.ts +0 -2
- package/dist/cjs/validation/rules/for_LessThanRule/when_validating/with_value_less_than_threshold.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_equal_to_maximum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_equal_to_maximum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_longer_than_maximum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MaxLengthRule/when_validating/with_string_longer_than_maximum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_equal_to_minimum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_equal_to_minimum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_longer_than_minimum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_longer_than_minimum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_shorter_than_minimum.d.ts +0 -2
- package/dist/cjs/validation/rules/for_MinLengthRule/when_validating/with_string_shorter_than_minimum.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_setting_custom_message.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_setting_custom_message.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_array.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_array.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_string.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_empty_string.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_non_empty_array.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_non_empty_array.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_null_value.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_null_value.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_undefined_value.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_undefined_value.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_valid_string.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_valid_string.d.ts.map +0 -1
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_whitespace_string.d.ts +0 -2
- package/dist/cjs/validation/rules/for_NotEmptyRule/when_validating/with_whitespace_string.d.ts.map +0 -1
|
@@ -1,21 +1,27 @@
|
|
|
1
1
|
import { QueryResult } from './QueryResult.js';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* Represents a {@link IObservableQueryConnection} when for instance one can't establish a connection.
|
|
7
|
+
*/ class NullObservableQueryConnection {
|
|
4
8
|
defaultValue;
|
|
5
|
-
|
|
9
|
+
/**
|
|
10
|
+
* Initializes a new instance of the {@link NullObservableQueryConnection} class.
|
|
11
|
+
* @param {TDataType} defaultValue The default value to serve.
|
|
12
|
+
*/ constructor(defaultValue){
|
|
6
13
|
this.defaultValue = defaultValue;
|
|
7
14
|
}
|
|
8
|
-
get lastPingLatency() {
|
|
15
|
+
/** @inheritdoc */ get lastPingLatency() {
|
|
9
16
|
return 0;
|
|
10
17
|
}
|
|
11
|
-
get averageLatency() {
|
|
18
|
+
/** @inheritdoc */ get averageLatency() {
|
|
12
19
|
return 0;
|
|
13
20
|
}
|
|
14
|
-
connect(dataReceived) {
|
|
21
|
+
/** @inheritdoc */ connect(dataReceived) {
|
|
15
22
|
dataReceived(QueryResult.empty(this.defaultValue));
|
|
16
23
|
}
|
|
17
|
-
disconnect() {
|
|
18
|
-
}
|
|
24
|
+
/** @inheritdoc */ /* eslint-disable @typescript-eslint/no-empty-function */ disconnect() {}
|
|
19
25
|
}
|
|
20
26
|
|
|
21
27
|
export { NullObservableQueryConnection };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NullObservableQueryConnection.js","sources":["../../../queries/NullObservableQueryConnection.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DataReceived } from './ObservableQueryConnection';\nimport { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { QueryResult } from './QueryResult';\n\n/**\n * Represents a {@link IObservableQueryConnection} when for instance one can't establish a connection.\n */\n\nexport class NullObservableQueryConnection<TDataType> implements IObservableQueryConnection<TDataType> {\n /**\n * Initializes a new instance of the {@link NullObservableQueryConnection} class.\n * @param {TDataType} defaultValue The default value to serve.\n */\n constructor(readonly defaultValue: TDataType) {\n }\n\n /** @inheritdoc */\n get lastPingLatency(): number {\n return 0;\n }\n\n /** @inheritdoc */\n get averageLatency(): number {\n return 0;\n }\n\n /** @inheritdoc */\n connect(dataReceived: DataReceived<TDataType>) {\n dataReceived(QueryResult.empty(this.defaultValue));\n }\n\n /** @inheritdoc */\n /* eslint-disable @typescript-eslint/no-empty-function */\n disconnect() {\n }\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"NullObservableQueryConnection.js","sources":["../../../queries/NullObservableQueryConnection.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DataReceived } from './ObservableQueryConnection';\nimport { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { QueryResult } from './QueryResult';\n\n/**\n * Represents a {@link IObservableQueryConnection} when for instance one can't establish a connection.\n */\n\nexport class NullObservableQueryConnection<TDataType> implements IObservableQueryConnection<TDataType> {\n /**\n * Initializes a new instance of the {@link NullObservableQueryConnection} class.\n * @param {TDataType} defaultValue The default value to serve.\n */\n constructor(readonly defaultValue: TDataType) {\n }\n\n /** @inheritdoc */\n get lastPingLatency(): number {\n return 0;\n }\n\n /** @inheritdoc */\n get averageLatency(): number {\n return 0;\n }\n\n /** @inheritdoc */\n connect(dataReceived: DataReceived<TDataType>) {\n dataReceived(QueryResult.empty(this.defaultValue));\n }\n\n /** @inheritdoc */\n /* eslint-disable @typescript-eslint/no-empty-function */\n disconnect() {\n }\n}\n"],"names":["NullObservableQueryConnection","defaultValue","lastPingLatency","averageLatency","connect","dataReceived","QueryResult","empty","disconnect"],"mappings":";;AAAA;AACA;AAMA;;AAEC,IAEM,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AAC,aAAa;IAkBrB,OAAO,CAAC,UAAU;CAYrB"}
|
|
@@ -2,7 +2,11 @@ import { Globals } from '../Globals.js';
|
|
|
2
2
|
import { ReconnectPolicy } from './ReconnectPolicy.js';
|
|
3
3
|
import { WebSocketMessageType } from './WebSocketMessage.js';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
6
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
7
|
+
/**
|
|
8
|
+
* Represents the connection for an observable query.
|
|
9
|
+
*/ class ObservableQueryConnection {
|
|
6
10
|
_microservice;
|
|
7
11
|
_reconnectPolicy;
|
|
8
12
|
_socket;
|
|
@@ -14,7 +18,13 @@ class ObservableQueryConnection {
|
|
|
14
18
|
_lastPongLatency = 0;
|
|
15
19
|
_latencySamples = [];
|
|
16
20
|
_connectionStartTime;
|
|
17
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Initializes a new instance of the {@link ObservableQueryConnection<TDataType>} class.
|
|
23
|
+
* @param {Url} url The fully qualified Url.
|
|
24
|
+
* @param {string} _microservice The microservice name.
|
|
25
|
+
* @param {number} pingIntervalMs The ping interval in milliseconds (default: 10000).
|
|
26
|
+
* @param {IReconnectPolicy} reconnectPolicy The reconnect policy to use (default: {@link ReconnectPolicy}).
|
|
27
|
+
*/ constructor(url, _microservice, pingIntervalMs = 10000, _reconnectPolicy = new ReconnectPolicy()){
|
|
18
28
|
this._microservice = _microservice;
|
|
19
29
|
this._reconnectPolicy = _reconnectPolicy;
|
|
20
30
|
this._pingIntervalMs = pingIntervalMs;
|
|
@@ -24,62 +34,63 @@ class ObservableQueryConnection {
|
|
|
24
34
|
const microserviceParam = `${Globals.microserviceWSQueryArgument}=${this._microservice}`;
|
|
25
35
|
if (this._url.indexOf('?') > 0) {
|
|
26
36
|
this._url = `${this._url}&${microserviceParam}`;
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
37
|
+
} else {
|
|
29
38
|
this._url = `${this._url}?${microserviceParam}`;
|
|
30
39
|
}
|
|
31
40
|
}
|
|
32
41
|
}
|
|
33
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Disposes the connection.
|
|
44
|
+
*/ dispose() {
|
|
34
45
|
this.disconnect();
|
|
35
46
|
}
|
|
36
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Gets the latency of the last ping/pong sequence in milliseconds.
|
|
49
|
+
*/ get lastPingLatency() {
|
|
37
50
|
return this._lastPongLatency;
|
|
38
51
|
}
|
|
39
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Gets the average latency since the connection started in milliseconds.
|
|
54
|
+
*/ get averageLatency() {
|
|
40
55
|
if (this._latencySamples.length === 0) {
|
|
41
56
|
return 0;
|
|
42
57
|
}
|
|
43
|
-
const sum = this._latencySamples.reduce((acc, val)
|
|
58
|
+
const sum = this._latencySamples.reduce((acc, val)=>acc + val, 0);
|
|
44
59
|
return sum / this._latencySamples.length;
|
|
45
60
|
}
|
|
46
|
-
connect(dataReceived, queryArguments) {
|
|
61
|
+
/** @inheritdoc */ connect(dataReceived, queryArguments) {
|
|
47
62
|
let url = this._url;
|
|
48
63
|
if (queryArguments) {
|
|
49
64
|
if (url.indexOf('?') < 0) {
|
|
50
65
|
url = `${url}?`;
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
66
|
+
} else {
|
|
53
67
|
url = `${url}&`;
|
|
54
68
|
}
|
|
55
|
-
const query = Object.keys(queryArguments).map(key
|
|
69
|
+
const query = Object.keys(queryArguments).map((key)=>`${key}=${queryArguments[key]}`).join('&');
|
|
56
70
|
url = `${url}${query}`;
|
|
57
71
|
}
|
|
58
|
-
const connectSocket = ()
|
|
72
|
+
const connectSocket = ()=>{
|
|
59
73
|
this._socket = new WebSocket(url);
|
|
60
|
-
this._socket.onopen = ()
|
|
61
|
-
if (this._disconnected)
|
|
62
|
-
return;
|
|
74
|
+
this._socket.onopen = ()=>{
|
|
75
|
+
if (this._disconnected) return;
|
|
63
76
|
console.log(`Connection for '${url}' established`);
|
|
64
77
|
this._reconnectPolicy.reset();
|
|
65
78
|
this._connectionStartTime = Date.now();
|
|
66
79
|
this.startPinging();
|
|
67
80
|
};
|
|
68
|
-
this._socket.onclose = ()
|
|
69
|
-
if (this._disconnected)
|
|
70
|
-
return;
|
|
81
|
+
this._socket.onclose = ()=>{
|
|
82
|
+
if (this._disconnected) return;
|
|
71
83
|
console.log(`Unexpected connection closed for route '${url}'`);
|
|
72
84
|
this.stopPinging();
|
|
73
85
|
this._reconnectPolicy.schedule(connectSocket, url);
|
|
74
86
|
};
|
|
75
|
-
this._socket.onerror = (error)
|
|
76
|
-
if (this._disconnected)
|
|
77
|
-
return;
|
|
87
|
+
this._socket.onerror = (error)=>{
|
|
88
|
+
if (this._disconnected) return;
|
|
78
89
|
console.log(`Error with connection for '${url}' - ${error}`);
|
|
79
90
|
this.stopPinging();
|
|
80
91
|
this._reconnectPolicy.schedule(connectSocket, url);
|
|
81
92
|
};
|
|
82
|
-
this._socket.onmessage = (ev)
|
|
93
|
+
this._socket.onmessage = (ev)=>{
|
|
83
94
|
if (this._disconnected) {
|
|
84
95
|
console.log('Received message after closing connection');
|
|
85
96
|
return;
|
|
@@ -87,11 +98,10 @@ class ObservableQueryConnection {
|
|
|
87
98
|
this.handleMessage(ev.data, dataReceived);
|
|
88
99
|
};
|
|
89
100
|
};
|
|
90
|
-
if (this._disconnected)
|
|
91
|
-
return;
|
|
101
|
+
if (this._disconnected) return;
|
|
92
102
|
connectSocket();
|
|
93
103
|
}
|
|
94
|
-
disconnect() {
|
|
104
|
+
/** @inheritdoc */ disconnect() {
|
|
95
105
|
if (this._disconnected) {
|
|
96
106
|
return;
|
|
97
107
|
}
|
|
@@ -105,7 +115,7 @@ class ObservableQueryConnection {
|
|
|
105
115
|
}
|
|
106
116
|
startPinging() {
|
|
107
117
|
this.stopPinging();
|
|
108
|
-
this._pingInterval = setInterval(()
|
|
118
|
+
this._pingInterval = setInterval(()=>{
|
|
109
119
|
this.sendPing();
|
|
110
120
|
}, this._pingIntervalMs);
|
|
111
121
|
}
|
|
@@ -129,15 +139,16 @@ class ObservableQueryConnection {
|
|
|
129
139
|
handleMessage(rawData, dataReceived) {
|
|
130
140
|
try {
|
|
131
141
|
const message = JSON.parse(rawData);
|
|
142
|
+
// Handle messages based on type
|
|
132
143
|
if (message.type === WebSocketMessageType.Pong) {
|
|
133
144
|
this.handlePong(message);
|
|
134
|
-
}
|
|
135
|
-
|
|
145
|
+
} else if (message.type === WebSocketMessageType.Data || !message.type) {
|
|
146
|
+
// For new-style messages (type === 'Data') the query result is wrapped in message.data.
|
|
147
|
+
// For legacy/backward-compatible messages (no type) the entire message IS the query result.
|
|
136
148
|
const data = message.type === WebSocketMessageType.Data ? message.data : message;
|
|
137
149
|
dataReceived(data);
|
|
138
150
|
}
|
|
139
|
-
}
|
|
140
|
-
catch (error) {
|
|
151
|
+
} catch (error) {
|
|
141
152
|
console.error('Error parsing WebSocket message:', error);
|
|
142
153
|
}
|
|
143
154
|
}
|
|
@@ -146,6 +157,7 @@ class ObservableQueryConnection {
|
|
|
146
157
|
const latency = Date.now() - message.timestamp;
|
|
147
158
|
this._lastPongLatency = latency;
|
|
148
159
|
this._latencySamples.push(latency);
|
|
160
|
+
// Keep only the last 100 samples for average calculation
|
|
149
161
|
if (this._latencySamples.length > 100) {
|
|
150
162
|
this._latencySamples.shift();
|
|
151
163
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservableQueryConnection.js","sources":["../../../queries/ObservableQueryConnection.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Globals } from '../Globals';\nimport { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { IReconnectPolicy } from './IReconnectPolicy';\nimport { ReconnectPolicy } from './ReconnectPolicy';\nimport { QueryResult } from './QueryResult';\nimport { WebSocketMessage, WebSocketMessageType } from './WebSocketMessage';\n\nexport type DataReceived<TDataType> = (data: QueryResult<TDataType>) => void;\n\n/**\n * Represents the connection for an observable query.\n */\nexport class ObservableQueryConnection<TDataType> implements IObservableQueryConnection<TDataType> {\n\n private _socket!: WebSocket;\n private _disconnected = false;\n private _url: string;\n private _pingInterval?: ReturnType<typeof setInterval>;\n private _pingIntervalMs: number = 10000;\n private _lastPingSentTime?: number;\n private _lastPongLatency: number = 0;\n private _latencySamples: number[] = [];\n private _connectionStartTime?: number;\n\n /**\n * Initializes a new instance of the {@link ObservableQueryConnection<TDataType>} class.\n * @param {Url} url The fully qualified Url.\n * @param {string} _microservice The microservice name.\n * @param {number} pingIntervalMs The ping interval in milliseconds (default: 10000).\n * @param {IReconnectPolicy} reconnectPolicy The reconnect policy to use (default: {@link ReconnectPolicy}).\n */\n constructor(url: URL, private readonly _microservice: string, pingIntervalMs: number = 10000, private readonly _reconnectPolicy: IReconnectPolicy = new ReconnectPolicy()) {\n this._pingIntervalMs = pingIntervalMs;\n const secure = url.protocol?.indexOf('https') === 0 || false;\n\n this._url = `${secure ? 'wss' : 'ws'}://${url.host}${url.pathname}${url.search}`;\n if (this._microservice?.length > 0) {\n const microserviceParam = `${Globals.microserviceWSQueryArgument}=${this._microservice}`;\n if (this._url.indexOf('?') > 0) {\n this._url = `${this._url}&${microserviceParam}`;\n } else {\n this._url = `${this._url}?${microserviceParam}`;\n }\n }\n }\n\n /**\n * Disposes the connection.\n */\n dispose() {\n this.disconnect();\n }\n\n /**\n * Gets the latency of the last ping/pong sequence in milliseconds.\n */\n get lastPingLatency(): number {\n return this._lastPongLatency;\n }\n\n /**\n * Gets the average latency since the connection started in milliseconds.\n */\n get averageLatency(): number {\n if (this._latencySamples.length === 0) {\n return 0;\n }\n const sum = this._latencySamples.reduce((acc, val) => acc + val, 0);\n return sum / this._latencySamples.length;\n }\n\n /** @inheritdoc */\n connect(dataReceived: DataReceived<TDataType>, queryArguments?: object) {\n let url = this._url;\n if (queryArguments) {\n if (url.indexOf('?') < 0) {\n url = `${url}?`;\n } else {\n url = `${url}&`;\n }\n const query = Object.keys(queryArguments).map(key => `${key}=${queryArguments[key]}`).join('&');\n url = `${url}${query}`;\n }\n\n const connectSocket = () => {\n this._socket = new WebSocket(url);\n this._socket.onopen = () => {\n if (this._disconnected) return;\n console.log(`Connection for '${url}' established`);\n this._reconnectPolicy.reset();\n this._connectionStartTime = Date.now();\n this.startPinging();\n };\n this._socket.onclose = () => {\n if (this._disconnected) return;\n console.log(`Unexpected connection closed for route '${url}'`);\n this.stopPinging();\n this._reconnectPolicy.schedule(connectSocket, url);\n };\n this._socket.onerror = (error) => {\n if (this._disconnected) return;\n console.log(`Error with connection for '${url}' - ${error}`);\n this.stopPinging();\n this._reconnectPolicy.schedule(connectSocket, url);\n };\n this._socket.onmessage = (ev) => {\n if (this._disconnected) {\n console.log('Received message after closing connection');\n return;\n }\n this.handleMessage(ev.data, dataReceived);\n };\n };\n\n if (this._disconnected) return;\n connectSocket();\n }\n\n /** @inheritdoc */\n disconnect() {\n if (this._disconnected) {\n return;\n }\n console.log(`Disconnecting '${this._url}'`);\n this._disconnected = true;\n this._reconnectPolicy.cancel();\n this.stopPinging();\n this._socket?.close();\n console.log(`Connection for '${this._url}' closed`);\n this._socket = undefined!;\n }\n\n private startPinging() {\n this.stopPinging();\n this._pingInterval = setInterval(() => {\n this.sendPing();\n }, this._pingIntervalMs);\n }\n\n private stopPinging() {\n if (this._pingInterval) {\n clearInterval(this._pingInterval);\n this._pingInterval = undefined;\n }\n }\n\n private sendPing() {\n if (this._disconnected || !this._socket || this._socket.readyState !== WebSocket.OPEN) {\n return;\n }\n\n this._lastPingSentTime = Date.now();\n const pingMessage: WebSocketMessage = {\n type: WebSocketMessageType.Ping,\n timestamp: this._lastPingSentTime\n };\n\n this._socket.send(JSON.stringify(pingMessage));\n }\n\n private handleMessage(rawData: string, dataReceived: DataReceived<TDataType>) {\n try {\n const message = JSON.parse(rawData) as WebSocketMessage;\n\n // Handle messages based on type\n if (message.type === WebSocketMessageType.Pong) {\n this.handlePong(message);\n } else if (message.type === WebSocketMessageType.Data || !message.type) {\n // For new-style messages (type === 'Data') the query result is wrapped in message.data.\n // For legacy/backward-compatible messages (no type) the entire message IS the query result.\n const data = message.type === WebSocketMessageType.Data ? message.data : message;\n dataReceived(data as QueryResult<TDataType>);\n }\n } catch (error) {\n console.error('Error parsing WebSocket message:', error);\n }\n }\n\n private handlePong(message: WebSocketMessage) {\n if (message.timestamp && this._lastPingSentTime) {\n const latency = Date.now() - message.timestamp;\n this._lastPongLatency = latency;\n this._latencySamples.push(latency);\n\n // Keep only the last 100 samples for average calculation\n if (this._latencySamples.length > 100) {\n this._latencySamples.shift();\n }\n }\n }\n}\n"],"names":[],"mappings":";;;;MAea,yBAAyB,CAAA;AAmBK,IAAA,aAAA;AAAwE,IAAA,gBAAA;AAjBvG,IAAA,OAAO;IACP,aAAa,GAAG,KAAK;AACrB,IAAA,IAAI;AACJ,IAAA,aAAa;IACb,eAAe,GAAW,KAAK;AAC/B,IAAA,iBAAiB;IACjB,gBAAgB,GAAW,CAAC;IAC5B,eAAe,GAAa,EAAE;AAC9B,IAAA,oBAAoB;IAS5B,WAAA,CAAY,GAAQ,EAAmB,aAAqB,EAAE,cAAA,GAAyB,KAAK,EAAmB,gBAAA,GAAqC,IAAI,eAAe,EAAE,EAAA;QAAlI,IAAA,CAAA,aAAa,GAAb,aAAa;QAA2D,IAAA,CAAA,gBAAgB,GAAhB,gBAAgB;AAC3H,QAAA,IAAI,CAAC,eAAe,GAAG,cAAc;AACrC,QAAA,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,KAAK;QAE5D,IAAI,CAAC,IAAI,GAAG,CAAA,EAAG,MAAM,GAAG,KAAK,GAAG,IAAI,MAAM,GAAG,CAAC,IAAI,CAAA,EAAG,GAAG,CAAC,QAAQ,CAAA,EAAG,GAAG,CAAC,MAAM,CAAA,CAAE;QAChF,IAAI,IAAI,CAAC,aAAa,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O;AAC/B,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC;YAGlC,IAAI,IAAI,CAAC,eAAe,CAAC,MAAM,GAAG,GAAG,EAAE;AACnC,gBAAA,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE;YAChC;QACJ;IACJ;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"ObservableQueryConnection.js","sources":["../../../queries/ObservableQueryConnection.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Globals } from '../Globals';\nimport { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { IReconnectPolicy } from './IReconnectPolicy';\nimport { ReconnectPolicy } from './ReconnectPolicy';\nimport { QueryResult } from './QueryResult';\nimport { WebSocketMessage, WebSocketMessageType } from './WebSocketMessage';\n\nexport type DataReceived<TDataType> = (data: QueryResult<TDataType>) => void;\n\n/**\n * Represents the connection for an observable query.\n */\nexport class ObservableQueryConnection<TDataType> implements IObservableQueryConnection<TDataType> {\n\n private _socket!: WebSocket;\n private _disconnected = false;\n private _url: string;\n private _pingInterval?: ReturnType<typeof setInterval>;\n private _pingIntervalMs: number = 10000;\n private _lastPingSentTime?: number;\n private _lastPongLatency: number = 0;\n private _latencySamples: number[] = [];\n private _connectionStartTime?: number;\n\n /**\n * Initializes a new instance of the {@link ObservableQueryConnection<TDataType>} class.\n * @param {Url} url The fully qualified Url.\n * @param {string} _microservice The microservice name.\n * @param {number} pingIntervalMs The ping interval in milliseconds (default: 10000).\n * @param {IReconnectPolicy} reconnectPolicy The reconnect policy to use (default: {@link ReconnectPolicy}).\n */\n constructor(url: URL, private readonly _microservice: string, pingIntervalMs: number = 10000, private readonly _reconnectPolicy: IReconnectPolicy = new ReconnectPolicy()) {\n this._pingIntervalMs = pingIntervalMs;\n const secure = url.protocol?.indexOf('https') === 0 || false;\n\n this._url = `${secure ? 'wss' : 'ws'}://${url.host}${url.pathname}${url.search}`;\n if (this._microservice?.length > 0) {\n const microserviceParam = `${Globals.microserviceWSQueryArgument}=${this._microservice}`;\n if (this._url.indexOf('?') > 0) {\n this._url = `${this._url}&${microserviceParam}`;\n } else {\n this._url = `${this._url}?${microserviceParam}`;\n }\n }\n }\n\n /**\n * Disposes the connection.\n */\n dispose() {\n this.disconnect();\n }\n\n /**\n * Gets the latency of the last ping/pong sequence in milliseconds.\n */\n get lastPingLatency(): number {\n return this._lastPongLatency;\n }\n\n /**\n * Gets the average latency since the connection started in milliseconds.\n */\n get averageLatency(): number {\n if (this._latencySamples.length === 0) {\n return 0;\n }\n const sum = this._latencySamples.reduce((acc, val) => acc + val, 0);\n return sum / this._latencySamples.length;\n }\n\n /** @inheritdoc */\n connect(dataReceived: DataReceived<TDataType>, queryArguments?: object) {\n let url = this._url;\n if (queryArguments) {\n if (url.indexOf('?') < 0) {\n url = `${url}?`;\n } else {\n url = `${url}&`;\n }\n const query = Object.keys(queryArguments).map(key => `${key}=${queryArguments[key]}`).join('&');\n url = `${url}${query}`;\n }\n\n const connectSocket = () => {\n this._socket = new WebSocket(url);\n this._socket.onopen = () => {\n if (this._disconnected) return;\n console.log(`Connection for '${url}' established`);\n this._reconnectPolicy.reset();\n this._connectionStartTime = Date.now();\n this.startPinging();\n };\n this._socket.onclose = () => {\n if (this._disconnected) return;\n console.log(`Unexpected connection closed for route '${url}'`);\n this.stopPinging();\n this._reconnectPolicy.schedule(connectSocket, url);\n };\n this._socket.onerror = (error) => {\n if (this._disconnected) return;\n console.log(`Error with connection for '${url}' - ${error}`);\n this.stopPinging();\n this._reconnectPolicy.schedule(connectSocket, url);\n };\n this._socket.onmessage = (ev) => {\n if (this._disconnected) {\n console.log('Received message after closing connection');\n return;\n }\n this.handleMessage(ev.data, dataReceived);\n };\n };\n\n if (this._disconnected) return;\n connectSocket();\n }\n\n /** @inheritdoc */\n disconnect() {\n if (this._disconnected) {\n return;\n }\n console.log(`Disconnecting '${this._url}'`);\n this._disconnected = true;\n this._reconnectPolicy.cancel();\n this.stopPinging();\n this._socket?.close();\n console.log(`Connection for '${this._url}' closed`);\n this._socket = undefined!;\n }\n\n private startPinging() {\n this.stopPinging();\n this._pingInterval = setInterval(() => {\n this.sendPing();\n }, this._pingIntervalMs);\n }\n\n private stopPinging() {\n if (this._pingInterval) {\n clearInterval(this._pingInterval);\n this._pingInterval = undefined;\n }\n }\n\n private sendPing() {\n if (this._disconnected || !this._socket || this._socket.readyState !== WebSocket.OPEN) {\n return;\n }\n\n this._lastPingSentTime = Date.now();\n const pingMessage: WebSocketMessage = {\n type: WebSocketMessageType.Ping,\n timestamp: this._lastPingSentTime\n };\n\n this._socket.send(JSON.stringify(pingMessage));\n }\n\n private handleMessage(rawData: string, dataReceived: DataReceived<TDataType>) {\n try {\n const message = JSON.parse(rawData) as WebSocketMessage;\n\n // Handle messages based on type\n if (message.type === WebSocketMessageType.Pong) {\n this.handlePong(message);\n } else if (message.type === WebSocketMessageType.Data || !message.type) {\n // For new-style messages (type === 'Data') the query result is wrapped in message.data.\n // For legacy/backward-compatible messages (no type) the entire message IS the query result.\n const data = message.type === WebSocketMessageType.Data ? message.data : message;\n dataReceived(data as QueryResult<TDataType>);\n }\n } catch (error) {\n console.error('Error parsing WebSocket message:', error);\n }\n }\n\n private handlePong(message: WebSocketMessage) {\n if (message.timestamp && this._lastPingSentTime) {\n const latency = Date.now() - message.timestamp;\n this._lastPongLatency = latency;\n this._latencySamples.push(latency);\n\n // Keep only the last 100 samples for average calculation\n if (this._latencySamples.length > 100) {\n this._latencySamples.shift();\n }\n }\n }\n}\n"],"names":["ObservableQueryConnection","_socket","_disconnected","_url","_pingInterval","_pingIntervalMs","_lastPingSentTime","_lastPongLatency","_latencySamples","_connectionStartTime","url","_microservice","pingIntervalMs","_reconnectPolicy","ReconnectPolicy","secure","protocol","indexOf","host","pathname","search","length","microserviceParam","Globals","microserviceWSQueryArgument","dispose","disconnect","lastPingLatency","averageLatency","sum","reduce","acc","val","connect","dataReceived","queryArguments","query","Object","keys","map","key","join","connectSocket","WebSocket","onopen","console","log","reset","Date","now","startPinging","onclose","stopPinging","schedule","onerror","error","onmessage","ev","handleMessage","data","cancel","close","undefined","setInterval","sendPing","clearInterval","readyState","OPEN","pingMessage","type","WebSocketMessageType","Ping","timestamp","send","JSON","stringify","rawData","message","parse","Pong","handlePong","Data","latency","push","shift"],"mappings":";;;;AAAA;AACA;AAWA;;AAEC,IACM,MAAMA,yBAAAA,CAAAA;;;IAEDC,OAAAA;AACAC,IAAAA,aAAAA,GAAgB,KAAA;IAChBC,IAAAA;IACAC,aAAAA;AACAC,IAAAA,eAAAA,GAA0B,KAAA;IAC1BC,iBAAAA;AACAC,IAAAA,gBAAAA,GAA2B,CAAA;AAC3BC,IAAAA,eAAAA,GAA4B,EAAE;IAC9BC,oBAAAA;AAER;;;;;;AAMC,QACD,WAAA,CAAYC,GAAQ,EAAmBC,aAAqB,EAAEC,cAAAA,GAAyB,KAAK,EAAmBC,gBAAAA,GAAqC,IAAIC,iBAAiB,CAAE;aAApIH,aAAAA,GAAAA,aAAAA;aAAwEE,gBAAAA,GAAAA,gBAAAA;QAC3G,IAAI,CAACR,eAAe,GAAGO,cAAAA;AACvB,QAAA,MAAMG,SAASL,GAAAA,CAAIM,QAAQ,EAAEC,OAAAA,CAAQ,aAAa,CAAA,IAAK,KAAA;AAEvD,QAAA,IAAI,CAACd,IAAI,GAAG,CAAA,EAAGY,MAAAA,GAAS,QAAQ,IAAA,CAAK,GAAG,EAAEL,GAAAA,CAAIQ,IAAI,CAAA,EAAGR,GAAAA,CAAIS,QAAQ,CAAA,EAAGT,GAAAA,CAAIU,MAAM,CAAA,CAAE;AAChF,QAAA,IAAI,IAAI,CAACT,aAAa,EAAEU,SAAS,CAAA,EAAG;YAChC,MAAMC,iBAAAA,GAAoB,CAAA,EAAGC,OAAAA,CAAQC,2BAA2B,CAAC,CAAC,EAAE,IAAI,CAACb,aAAa,CAAA,CAAE;AACxF,YAAA,IAAI,IAAI,CAACR,IAAI,CA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AAA;AACjB,YAAA;AACJ,QAAA,CAAA,CAAE,OAAOJ,KAAAA,EAAO;YACZV,OAAAA,CAAQU,KAAK,CAAC,kCAAA,EAAoCA,KAAAA,CAAAA;AACtD,QAAA;AACJ,IAAA;AAEQyB,IAAAA,UAAAA,CAAWH,OAAyB,EAAE;AAC1C,QAAA,IAAIA,QAAQL,SAAS,IAAI,IAAI,CAAClE,iBAAiB,EAAE;AAC7C,YAAA,MAAM4E,OAAAA,GAAUlC,IAAAA,CAAKC,GAAG,EAAA,GAAK4B,QAAQL,SAAS;YAC9C,IAAI,CAACjE,gBAAgB,GAAG2E,OAAAA;AACxB,YAAA,IAAI,CAAC1E,eAAe,CAAC2E,IAAI,CAACD,OAAAA,CAAAA;;AAG1B,YAAA,IAAI,IAAI,CAAC1E,eAAe,CAACa,MAAM,GAAG,GAAA,EAAK;gBACnC,IAAI,CAACb,eAAe,CAAC4E,KAAK,EAAA;AAC9B,YAAA;AACJ,QAAA;AACJ,IAAA;AACJ;;;;"}
|
|
@@ -8,17 +8,36 @@ import { ServerSentEventHubConnection } from './ServerSentEventHubConnection.js'
|
|
|
8
8
|
import { WebSocketHubConnection } from './WebSocketHubConnection.js';
|
|
9
9
|
import { getOrCreateMultiplexer, WS_HUB_ROUTE, MultiplexedObservableQueryConnection } from './ObservableQueryMultiplexer.js';
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
12
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
13
|
+
/**
|
|
14
|
+
* The SSE subscribe POST endpoint route.
|
|
15
|
+
*/ const SSE_SUBSCRIBE_ROUTE = '/.cratis/queries/sse/subscribe';
|
|
16
|
+
/**
|
|
17
|
+
* The SSE unsubscribe POST endpoint route.
|
|
18
|
+
*/ const SSE_UNSUBSCRIBE_ROUTE = '/.cratis/queries/sse/unsubscribe';
|
|
19
|
+
/**
|
|
20
|
+
* Single entry-point for creating observable query connections.
|
|
21
|
+
*
|
|
22
|
+
* The transport is chosen as a 2x2 matrix of (direct | hub) x (WebSocket | SSE):
|
|
23
|
+
*
|
|
24
|
+
* | | Direct (per-query URL) | Hub (centralized endpoint) |
|
|
25
|
+
* |----------------|-------------------------------|-------------------------------|
|
|
26
|
+
* | **WebSocket** | ObservableQueryConnection | MultiplexedObservableQueryConnection |
|
|
27
|
+
* | **SSE** | ServerSentEventQueryConnection | MultiplexedObservableQueryConnection |
|
|
28
|
+
*
|
|
29
|
+
* In multiplexed mode, both transports share the same multiplexer — it creates either
|
|
30
|
+
* WebSocket or SSE connections depending on the transport setting.
|
|
31
|
+
*
|
|
32
|
+
* {@link ObservableQueryFor} never needs to know which transport is in use.
|
|
33
|
+
*/ function createObservableQueryConnection(descriptor) {
|
|
14
34
|
const isSSE = Globals.queryTransportMethod === QueryTransportMethod.ServerSentEvents;
|
|
15
35
|
if (Globals.queryDirectMode) {
|
|
16
|
-
return isSSE
|
|
17
|
-
? createDirectSSEConnection(descriptor)
|
|
18
|
-
: createDirectWebSocketConnection(descriptor);
|
|
36
|
+
return isSSE ? createDirectSSEConnection(descriptor) : createDirectWebSocketConnection(descriptor);
|
|
19
37
|
}
|
|
20
38
|
return createMultiplexedConnection(descriptor, isSSE);
|
|
21
39
|
}
|
|
40
|
+
// ---- Direct mode: one connection per query, hitting the query's own URL ----
|
|
22
41
|
function buildDirectUrl(descriptor) {
|
|
23
42
|
const { route } = UrlHelpers.replaceRouteParameters(descriptor.route, descriptor.args);
|
|
24
43
|
const actualRoute = joinPaths(descriptor.apiBasePath, route);
|
|
@@ -30,19 +49,23 @@ function createDirectWebSocketConnection(descriptor) {
|
|
|
30
49
|
function createDirectSSEConnection(descriptor) {
|
|
31
50
|
return new ServerSentEventQueryConnection(buildDirectUrl(descriptor));
|
|
32
51
|
}
|
|
33
|
-
|
|
52
|
+
// ---- Multiplexed mode: centralized endpoint, multiple queries share connections ----
|
|
53
|
+
/**
|
|
54
|
+
* Maximum number of SSE hub connections that fits safely within the HTTP/1.1 browser
|
|
55
|
+
* per-origin connection limit (typically 6 for Chrome/Firefox). Each SSE EventSource
|
|
56
|
+
* occupies one persistent connection slot indefinitely. Exceeding this cap blocks the
|
|
57
|
+
* subscribe/unsubscribe POST requests that share the same pool, causing queries to hang.
|
|
58
|
+
* Servers configured for HTTP/2 do not have this restriction.
|
|
59
|
+
*/ const MAX_SAFE_SSE_CONNECTIONS = 4;
|
|
34
60
|
function createMultiplexedConnection(descriptor, isSSE) {
|
|
35
61
|
const transport = isSSE ? 'sse' : 'ws';
|
|
36
62
|
const requestedCount = Globals.queryConnectionCount;
|
|
37
63
|
const effectiveCount = isSSE ? Math.min(requestedCount, MAX_SAFE_SSE_CONNECTIONS) : requestedCount;
|
|
38
64
|
if (isSSE && requestedCount > MAX_SAFE_SSE_CONNECTIONS) {
|
|
39
|
-
console.warn(`[Arc] queryConnectionCount (${requestedCount}) exceeds the safe limit for SSE transport (${MAX_SAFE_SSE_CONNECTIONS}). ` +
|
|
40
|
-
`HTTP/1.1 browsers allow at most 6 concurrent connections per origin; ` +
|
|
41
|
-
`using more SSE connections blocks subscribe/unsubscribe requests, causing queries to hang. ` +
|
|
42
|
-
`Capping at ${MAX_SAFE_SSE_CONNECTIONS}. Enable HTTP/2 on your server to use a higher connection count.`);
|
|
65
|
+
console.warn(`[Arc] queryConnectionCount (${requestedCount}) exceeds the safe limit for SSE transport (${MAX_SAFE_SSE_CONNECTIONS}). ` + `HTTP/1.1 browsers allow at most 6 concurrent connections per origin; ` + `using more SSE connections blocks subscribe/unsubscribe requests, causing queries to hang. ` + `Capping at ${MAX_SAFE_SSE_CONNECTIONS}. Enable HTTP/2 on your server to use a higher connection count.`);
|
|
43
66
|
}
|
|
44
67
|
const cacheKey = `${requestedCount}|${transport}|${descriptor.origin}|${descriptor.apiBasePath}|${descriptor.microservice}`;
|
|
45
|
-
const multiplexer = getOrCreateMultiplexer(()
|
|
68
|
+
const multiplexer = getOrCreateMultiplexer(()=>{
|
|
46
69
|
if (isSSE) {
|
|
47
70
|
const sseRoute = joinPaths(descriptor.apiBasePath, SSE_HUB_ROUTE);
|
|
48
71
|
const sseUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, sseRoute);
|
|
@@ -51,8 +74,7 @@ function createMultiplexedConnection(descriptor, isSSE) {
|
|
|
51
74
|
const unsubscribeRoute = joinPaths(descriptor.apiBasePath, SSE_UNSUBSCRIBE_ROUTE);
|
|
52
75
|
const unsubscribeUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, unsubscribeRoute);
|
|
53
76
|
return new ServerSentEventHubConnection(sseUrl.toString(), subscribeUrl.toString(), unsubscribeUrl.toString(), descriptor.microservice);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
77
|
+
} else {
|
|
56
78
|
const hubRoute = joinPaths(descriptor.apiBasePath, WS_HUB_ROUTE);
|
|
57
79
|
const hubUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, hubRoute);
|
|
58
80
|
const secure = hubUrl.protocol?.indexOf('https') === 0;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservableQueryConnectionFactory.js","sources":["../../../queries/ObservableQueryConnectionFactory.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Globals } from '../Globals';\nimport { joinPaths } from '../joinPaths';\nimport { UrlHelpers } from '../UrlHelpers';\nimport { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { ObservableQueryConnection } from './ObservableQueryConnection';\nimport { QueryTransportMethod } from './QueryTransportMethod';\nimport { ServerSentEventQueryConnection, SSE_HUB_ROUTE } from './ServerSentEventQueryConnection';\nimport { ServerSentEventHubConnection } from './ServerSentEventHubConnection';\nimport { WebSocketHubConnection } from './WebSocketHubConnection';\nimport { MultiplexedObservableQueryConnection, WS_HUB_ROUTE, getOrCreateMultiplexer } from './ObservableQueryMultiplexer';\n\n/**\n * The SSE subscribe POST endpoint route.\n */\nexport const SSE_SUBSCRIBE_ROUTE = '/.cratis/queries/sse/subscribe';\n\n/**\n * The SSE unsubscribe POST endpoint route.\n */\nexport const SSE_UNSUBSCRIBE_ROUTE = '/.cratis/queries/sse/unsubscribe';\n\n/**\n * Describes what the factory needs to know about a query in order to create\n * the right connection. Transport details are intentionally absent — the\n * factory reads those from {@link Globals}.\n */\nexport interface QueryConnectionDescriptor {\n /** The route template (e.g. `/api/accounts/debit/all-accounts`). */\n route: string;\n /** Fully-qualified backend query name used by hub transports. */\n queryName: string;\n /** Origin base URL (e.g. `http://localhost:5000`). */\n origin: string;\n /** API base path prefix. */\n apiBasePath: string;\n /** Microservice identifier. */\n microservice: string;\n /** Route/query arguments for the current subscription. */\n args?: object;\n}\n\n/**\n * Single entry-point for creating observable query connections.\n *\n * The transport is chosen as a 2x2 matrix of (direct | hub) x (WebSocket | SSE):\n *\n * | | Direct (per-query URL) | Hub (centralized endpoint) |\n * |----------------|-------------------------------|-------------------------------|\n * | **WebSocket** | ObservableQueryConnection | MultiplexedObservableQueryConnection |\n * | **SSE** | ServerSentEventQueryConnection | MultiplexedObservableQueryConnection |\n *\n * In multiplexed mode, both transports share the same multiplexer — it creates either\n * WebSocket or SSE connections depending on the transport setting.\n *\n * {@link ObservableQueryFor} never needs to know which transport is in use.\n */\nexport function createObservableQueryConnection<TDataType>(descriptor: QueryConnectionDescriptor): IObservableQueryConnection<TDataType> {\n const isSSE = Globals.queryTransportMethod === QueryTransportMethod.ServerSentEvents;\n\n if (Globals.queryDirectMode) {\n return isSSE\n ? createDirectSSEConnection<TDataType>(descriptor)\n : createDirectWebSocketConnection<TDataType>(descriptor);\n }\n\n return createMultiplexedConnection<TDataType>(descriptor, isSSE);\n}\n\n// ---- Direct mode: one connection per query, hitting the query's own URL ----\n\nfunction buildDirectUrl(descriptor: QueryConnectionDescriptor): URL {\n const { route } = UrlHelpers.replaceRouteParameters(descriptor.route, descriptor.args as object);\n const actualRoute = joinPaths(descriptor.apiBasePath, route);\n return UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, actualRoute);\n}\n\nfunction createDirectWebSocketConnection<TDataType>(descriptor: QueryConnectionDescriptor): IObservableQueryConnection<TDataType> {\n return new ObservableQueryConnection<TDataType>(buildDirectUrl(descriptor), descriptor.microservice);\n}\n\nfunction createDirectSSEConnection<TDataType>(descriptor: QueryConnectionDescriptor): IObservableQueryConnection<TDataType> {\n return new ServerSentEventQueryConnection<TDataType>(buildDirectUrl(descriptor));\n}\n\n// ---- Multiplexed mode: centralized endpoint, multiple queries share connections ----\n\n/**\n * Maximum number of SSE hub connections that fits safely within the HTTP/1.1 browser\n * per-origin connection limit (typically 6 for Chrome/Firefox). Each SSE EventSource\n * occupies one persistent connection slot indefinitely. Exceeding this cap blocks the\n * subscribe/unsubscribe POST requests that share the same pool, causing queries to hang.\n * Servers configured for HTTP/2 do not have this restriction.\n */\nconst MAX_SAFE_SSE_CONNECTIONS = 4;\n\nfunction createMultiplexedConnection<TDataType>(descriptor: QueryConnectionDescriptor, isSSE: boolean): IObservableQueryConnection<TDataType> {\n const transport = isSSE ? 'sse' : 'ws';\n const requestedCount = Globals.queryConnectionCount;\n const effectiveCount = isSSE ? Math.min(requestedCount, MAX_SAFE_SSE_CONNECTIONS) : requestedCount;\n\n if (isSSE && requestedCount > MAX_SAFE_SSE_CONNECTIONS) {\n console.warn(\n `[Arc] queryConnectionCount (${requestedCount}) exceeds the safe limit for SSE transport (${MAX_SAFE_SSE_CONNECTIONS}). ` +\n `HTTP/1.1 browsers allow at most 6 concurrent connections per origin; ` +\n `using more SSE connections blocks subscribe/unsubscribe requests, causing queries to hang. ` +\n `Capping at ${MAX_SAFE_SSE_CONNECTIONS}. Enable HTTP/2 on your server to use a higher connection count.`\n );\n }\n\n const cacheKey = `${requestedCount}|${transport}|${descriptor.origin}|${descriptor.apiBasePath}|${descriptor.microservice}`;\n\n const multiplexer = getOrCreateMultiplexer(() => {\n if (isSSE) {\n const sseRoute = joinPaths(descriptor.apiBasePath, SSE_HUB_ROUTE);\n const sseUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, sseRoute);\n const subscribeRoute = joinPaths(descriptor.apiBasePath, SSE_SUBSCRIBE_ROUTE);\n const subscribeUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, subscribeRoute);\n const unsubscribeRoute = joinPaths(descriptor.apiBasePath, SSE_UNSUBSCRIBE_ROUTE);\n const unsubscribeUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, unsubscribeRoute);\n return new ServerSentEventHubConnection(\n sseUrl.toString(),\n subscribeUrl.toString(),\n unsubscribeUrl.toString(),\n descriptor.microservice,\n );\n } else {\n const hubRoute = joinPaths(descriptor.apiBasePath, WS_HUB_ROUTE);\n const hubUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, hubRoute);\n const secure = hubUrl.protocol?.indexOf('https') === 0;\n const wsUrl = `${secure ? 'wss' : 'ws'}://${hubUrl.host}${hubUrl.pathname}${hubUrl.search}`;\n return new WebSocketHubConnection(wsUrl, descriptor.microservice);\n }\n }, cacheKey, effectiveCount);\n\n return new MultiplexedObservableQueryConnection<TDataType>(multiplexer, descriptor.queryName);\n}\n"],"names":[],"mappings":";;;;;;;;;;AAiBO,MAAM,mBAAmB,GAAG;AAK5B,MAAM,qBAAqB,GAAG;AAqC/B,SAAU,+BAA+B,CAAY,UAAqC,EAAA;IAC5F,MAAM,KAAK,GAAG,OAAO,CAAC,oBAAoB,KAAK,oBAAoB,CAAC,gBAAgB;AAEpF,IAAA,IAAI,OAAO,CAAC,eAAe,EAAE;AACzB,QAAA,OAAO;AACH,cAAE,yBAAyB,CAAY,UAAU;AACjD,cAAE,+BAA+B,CAAY,UAAU,CAAC;IAChE;AAEA,IAAA,OAAO,2BAA2B,CAAY,UAAU,EAAE,KAAK,CAAC;AACpE;AAIA,SAAS,cAAc,CAAC,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AM,MAAM,CAAC,IAAI,CAAA,EAAG,MAAM,CAAC,QAAQ,CAAA,EAAG,MAAM,CAAC,MAAM,CAAA,CAAE;YAC3F,OAAO,IAAI,sBAAsB,CAAC,KAAK,EAAE,UAAU,CAAC,YAAY,CAAC;QACrE;AACJ,IAAA,CAAC,EAAE,QAAQ,EAAE,cAAc,CAAC;IAE5B,OAAO,IAAI,oCAAoC,CAAY,WAAW,EAAE,UAAU,CAAC,SAAS,CAAC;AACjG;;;;"}
|
|
1
|
+
{"version":3,"file":"ObservableQueryConnectionFactory.js","sources":["../../../queries/ObservableQueryConnectionFactory.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Globals } from '../Globals';\nimport { joinPaths } from '../joinPaths';\nimport { UrlHelpers } from '../UrlHelpers';\nimport { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { ObservableQueryConnection } from './ObservableQueryConnection';\nimport { QueryTransportMethod } from './QueryTransportMethod';\nimport { ServerSentEventQueryConnection, SSE_HUB_ROUTE } from './ServerSentEventQueryConnection';\nimport { ServerSentEventHubConnection } from './ServerSentEventHubConnection';\nimport { WebSocketHubConnection } from './WebSocketHubConnection';\nimport { MultiplexedObservableQueryConnection, WS_HUB_ROUTE, getOrCreateMultiplexer } from './ObservableQueryMultiplexer';\n\n/**\n * The SSE subscribe POST endpoint route.\n */\nexport const SSE_SUBSCRIBE_ROUTE = '/.cratis/queries/sse/subscribe';\n\n/**\n * The SSE unsubscribe POST endpoint route.\n */\nexport const SSE_UNSUBSCRIBE_ROUTE = '/.cratis/queries/sse/unsubscribe';\n\n/**\n * Describes what the factory needs to know about a query in order to create\n * the right connection. Transport details are intentionally absent — the\n * factory reads those from {@link Globals}.\n */\nexport interface QueryConnectionDescriptor {\n /** The route template (e.g. `/api/accounts/debit/all-accounts`). */\n route: string;\n /** Fully-qualified backend query name used by hub transports. */\n queryName: string;\n /** Origin base URL (e.g. `http://localhost:5000`). */\n origin: string;\n /** API base path prefix. */\n apiBasePath: string;\n /** Microservice identifier. */\n microservice: string;\n /** Route/query arguments for the current subscription. */\n args?: object;\n}\n\n/**\n * Single entry-point for creating observable query connections.\n *\n * The transport is chosen as a 2x2 matrix of (direct | hub) x (WebSocket | SSE):\n *\n * | | Direct (per-query URL) | Hub (centralized endpoint) |\n * |----------------|-------------------------------|-------------------------------|\n * | **WebSocket** | ObservableQueryConnection | MultiplexedObservableQueryConnection |\n * | **SSE** | ServerSentEventQueryConnection | MultiplexedObservableQueryConnection |\n *\n * In multiplexed mode, both transports share the same multiplexer — it creates either\n * WebSocket or SSE connections depending on the transport setting.\n *\n * {@link ObservableQueryFor} never needs to know which transport is in use.\n */\nexport function createObservableQueryConnection<TDataType>(descriptor: QueryConnectionDescriptor): IObservableQueryConnection<TDataType> {\n const isSSE = Globals.queryTransportMethod === QueryTransportMethod.ServerSentEvents;\n\n if (Globals.queryDirectMode) {\n return isSSE\n ? createDirectSSEConnection<TDataType>(descriptor)\n : createDirectWebSocketConnection<TDataType>(descriptor);\n }\n\n return createMultiplexedConnection<TDataType>(descriptor, isSSE);\n}\n\n// ---- Direct mode: one connection per query, hitting the query's own URL ----\n\nfunction buildDirectUrl(descriptor: QueryConnectionDescriptor): URL {\n const { route } = UrlHelpers.replaceRouteParameters(descriptor.route, descriptor.args as object);\n const actualRoute = joinPaths(descriptor.apiBasePath, route);\n return UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, actualRoute);\n}\n\nfunction createDirectWebSocketConnection<TDataType>(descriptor: QueryConnectionDescriptor): IObservableQueryConnection<TDataType> {\n return new ObservableQueryConnection<TDataType>(buildDirectUrl(descriptor), descriptor.microservice);\n}\n\nfunction createDirectSSEConnection<TDataType>(descriptor: QueryConnectionDescriptor): IObservableQueryConnection<TDataType> {\n return new ServerSentEventQueryConnection<TDataType>(buildDirectUrl(descriptor));\n}\n\n// ---- Multiplexed mode: centralized endpoint, multiple queries share connections ----\n\n/**\n * Maximum number of SSE hub connections that fits safely within the HTTP/1.1 browser\n * per-origin connection limit (typically 6 for Chrome/Firefox). Each SSE EventSource\n * occupies one persistent connection slot indefinitely. Exceeding this cap blocks the\n * subscribe/unsubscribe POST requests that share the same pool, causing queries to hang.\n * Servers configured for HTTP/2 do not have this restriction.\n */\nconst MAX_SAFE_SSE_CONNECTIONS = 4;\n\nfunction createMultiplexedConnection<TDataType>(descriptor: QueryConnectionDescriptor, isSSE: boolean): IObservableQueryConnection<TDataType> {\n const transport = isSSE ? 'sse' : 'ws';\n const requestedCount = Globals.queryConnectionCount;\n const effectiveCount = isSSE ? Math.min(requestedCount, MAX_SAFE_SSE_CONNECTIONS) : requestedCount;\n\n if (isSSE && requestedCount > MAX_SAFE_SSE_CONNECTIONS) {\n console.warn(\n `[Arc] queryConnectionCount (${requestedCount}) exceeds the safe limit for SSE transport (${MAX_SAFE_SSE_CONNECTIONS}). ` +\n `HTTP/1.1 browsers allow at most 6 concurrent connections per origin; ` +\n `using more SSE connections blocks subscribe/unsubscribe requests, causing queries to hang. ` +\n `Capping at ${MAX_SAFE_SSE_CONNECTIONS}. Enable HTTP/2 on your server to use a higher connection count.`\n );\n }\n\n const cacheKey = `${requestedCount}|${transport}|${descriptor.origin}|${descriptor.apiBasePath}|${descriptor.microservice}`;\n\n const multiplexer = getOrCreateMultiplexer(() => {\n if (isSSE) {\n const sseRoute = joinPaths(descriptor.apiBasePath, SSE_HUB_ROUTE);\n const sseUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, sseRoute);\n const subscribeRoute = joinPaths(descriptor.apiBasePath, SSE_SUBSCRIBE_ROUTE);\n const subscribeUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, subscribeRoute);\n const unsubscribeRoute = joinPaths(descriptor.apiBasePath, SSE_UNSUBSCRIBE_ROUTE);\n const unsubscribeUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, unsubscribeRoute);\n return new ServerSentEventHubConnection(\n sseUrl.toString(),\n subscribeUrl.toString(),\n unsubscribeUrl.toString(),\n descriptor.microservice,\n );\n } else {\n const hubRoute = joinPaths(descriptor.apiBasePath, WS_HUB_ROUTE);\n const hubUrl = UrlHelpers.createUrlFrom(descriptor.origin, descriptor.apiBasePath, hubRoute);\n const secure = hubUrl.protocol?.indexOf('https') === 0;\n const wsUrl = `${secure ? 'wss' : 'ws'}://${hubUrl.host}${hubUrl.pathname}${hubUrl.search}`;\n return new WebSocketHubConnection(wsUrl, descriptor.microservice);\n }\n }, cacheKey, effectiveCount);\n\n return new MultiplexedObservableQueryConnection<TDataType>(multiplexer, descriptor.queryName);\n}\n"],"names":["SSE_SUBSCRIBE_ROUTE","SSE_UNSUBSCRIBE_ROUTE","createObservableQueryConnection","descriptor","isSSE","Globals","queryTransportMethod","QueryTransportMethod","ServerSentEvents","queryDirectMode","createDirectSSEConnection","createDirectWebSocketConnection","createMultiplexedConnection","buildDirectUrl","route","UrlHelpers","replaceRouteParameters","args","actualRoute","joinPaths","apiBasePath","createUrlFrom","origin","ObservableQueryConnection","microservice","ServerSentEventQueryConnection","MAX_SAFE_SSE_CONNECTIONS","transport","requestedCount","queryConnectionCount","effectiveCount","Math","min","console","warn","cacheKey","multiplexer","getOrCreateMultiplexer","sseRoute","SSE_HUB_ROUTE","sseUrl","subscribeRoute","subscribeUrl","unsubscribeRoute","unsubscribeUrl","ServerSentEventHubConnection","toString","hubRoute","WS_HUB_ROUTE","hubUrl","secure","protocol","indexOf","wsUrl","host","pathname","search","WebSocketHubConnection","MultiplexedObservableQueryConnection","queryName"],"mappings":";;;;;;;;;;AAAA;AACA;AAaA;;IAGO,MAAMA,mBAAAA,GAAsB;AAEnC;;IAGO,MAAMC,qBAAAA,GAAwB;AAsBrC;;;;;;;;;;;;;;IAeO,SAASC,+BAAAA,CAA2CC,UAAqC,EAAA;AAC5F,IAAA,MAAMC,KAAAA,GAAQC,OAAAA,CAAQC,oBAAoB,KAAKC,qBAAqBC,gB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"version":3,"file":"ObservableQueryConnectionPool.d.ts","sourceRoot":"","sources":["../../../queries/ObservableQueryConnectionPool.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAuB3D,qBAAa,6BAA6B,CAAC,SAAS;IAU5C,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAT7B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IAOpC,YACI,IAAI,EAAE,MAAM,EACK,QAAQ,EAAE,MAAM,0BAA0B,CAAC,SAAS,CAAC,EAGzE;IASD,OAAO,CAAC,YAAY,EAAE,YAAY,CAAC,SAAS,CAAC,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,IAAI,CAalF;CACJ"}
|
|
@@ -1,16 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
/**
|
|
4
|
+
* Represents a pool of observable query connection factories distributed round-robin across N slots.
|
|
5
|
+
*
|
|
6
|
+
* Each call to {@link acquire} picks the slot with the fewest active queries (falling back to
|
|
7
|
+
* round-robin when counts are equal) and creates a fresh connection for that subscriber via the
|
|
8
|
+
* provided factory. The connection is a dedicated instance per subscriber; the pool only tracks
|
|
9
|
+
* slot utilization so future multiplexed transports (e.g. WebSocket) can share connections
|
|
10
|
+
* across a fixed number of physical hub connections.
|
|
11
|
+
*
|
|
12
|
+
* When {@link size} is 1 (the default), all queries are counted against a single slot — the
|
|
13
|
+
* natural behavior for a single multiplexed connection.
|
|
14
|
+
*
|
|
15
|
+
* @template TDataType The type of data received from the connections.
|
|
16
|
+
*/ class ObservableQueryConnectionPool {
|
|
2
17
|
_factory;
|
|
3
18
|
_slots;
|
|
4
|
-
|
|
19
|
+
/**
|
|
20
|
+
* Initializes a new {@link ObservableQueryConnectionPool}.
|
|
21
|
+
* @param {number} size Number of logical slots (hub connections) in the pool.
|
|
22
|
+
* @param {() => IObservableQueryConnection<TDataType>} factory Factory that produces a new connection instance per subscriber.
|
|
23
|
+
*/ constructor(size, _factory){
|
|
5
24
|
this._factory = _factory;
|
|
6
|
-
this._slots = Array.from({
|
|
25
|
+
this._slots = Array.from({
|
|
26
|
+
length: Math.max(1, size)
|
|
27
|
+
}, ()=>({
|
|
28
|
+
queryCount: 0
|
|
29
|
+
}));
|
|
7
30
|
}
|
|
8
|
-
|
|
9
|
-
|
|
31
|
+
/**
|
|
32
|
+
* Picks the least-loaded pool slot, creates a fresh connection via the factory, and starts
|
|
33
|
+
* delivering data to the provided callback.
|
|
34
|
+
* @param {DataReceived<TDataType>} dataReceived Callback invoked for each message.
|
|
35
|
+
* @param {object} queryArguments Arguments forwarded to the connection.
|
|
36
|
+
* @returns A cleanup function that decrements the slot counter and disconnects the connection.
|
|
37
|
+
*/ acquire(dataReceived, queryArguments) {
|
|
38
|
+
// Pick the slot with the fewest active queries.
|
|
39
|
+
const slot = this._slots.reduce((min, current)=>current.queryCount < min.queryCount ? current : min, this._slots[0]);
|
|
10
40
|
slot.queryCount++;
|
|
41
|
+
// Each subscriber gets its own dedicated connection instance.
|
|
11
42
|
const connection = this._factory();
|
|
12
43
|
connection.connect(dataReceived, queryArguments);
|
|
13
|
-
return ()
|
|
44
|
+
return ()=>{
|
|
14
45
|
connection.disconnect();
|
|
15
46
|
slot.queryCount = Math.max(0, slot.queryCount - 1);
|
|
16
47
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservableQueryConnectionPool.js","sources":["../../../queries/ObservableQueryConnectionPool.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { DataReceived } from './ObservableQueryConnection';\n\n/**\n * Tracks the number of active subscribers assigned to each pool slot.\n */\ninterface PoolSlot {\n queryCount: number;\n}\n\n/**\n * Represents a pool of observable query connection factories distributed round-robin across N slots.\n *\n * Each call to {@link acquire} picks the slot with the fewest active queries (falling back to\n * round-robin when counts are equal) and creates a fresh connection for that subscriber via the\n * provided factory. The connection is a dedicated instance per subscriber; the pool only tracks\n * slot utilization so future multiplexed transports (e.g. WebSocket) can share connections\n * across a fixed number of physical hub connections.\n *\n * When {@link size} is 1 (the default), all queries are counted against a single slot — the\n * natural behavior for a single multiplexed connection.\n *\n * @template TDataType The type of data received from the connections.\n */\nexport class ObservableQueryConnectionPool<TDataType> {\n private readonly _slots: PoolSlot[];\n\n /**\n * Initializes a new {@link ObservableQueryConnectionPool}.\n * @param {number} size Number of logical slots (hub connections) in the pool.\n * @param {() => IObservableQueryConnection<TDataType>} factory Factory that produces a new connection instance per subscriber.\n */\n constructor(\n size: number,\n private readonly _factory: () => IObservableQueryConnection<TDataType>\n ) {\n this._slots = Array.from({ length: Math.max(1, size) }, () => ({ queryCount: 0 }));\n }\n\n /**\n * Picks the least-loaded pool slot, creates a fresh connection via the factory, and starts\n * delivering data to the provided callback.\n * @param {DataReceived<TDataType>} dataReceived Callback invoked for each message.\n * @param {object} queryArguments Arguments forwarded to the connection.\n * @returns A cleanup function that decrements the slot counter and disconnects the connection.\n */\n acquire(dataReceived: DataReceived<TDataType>, queryArguments?: object): () => void {\n // Pick the slot with the fewest active queries.\n const slot = this._slots.reduce((min, current) => current.queryCount < min.queryCount ? current : min, this._slots[0]);\n slot.queryCount++;\n\n // Each subscriber gets its own dedicated connection instance.\n const connection = this._factory();\n connection.connect(dataReceived, queryArguments);\n\n return () => {\n connection.disconnect();\n slot.queryCount = Math.max(0, slot.queryCount - 1);\n };\n }\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ObservableQueryConnectionPool.js","sources":["../../../queries/ObservableQueryConnectionPool.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { IObservableQueryConnection } from './IObservableQueryConnection';\nimport { DataReceived } from './ObservableQueryConnection';\n\n/**\n * Tracks the number of active subscribers assigned to each pool slot.\n */\ninterface PoolSlot {\n queryCount: number;\n}\n\n/**\n * Represents a pool of observable query connection factories distributed round-robin across N slots.\n *\n * Each call to {@link acquire} picks the slot with the fewest active queries (falling back to\n * round-robin when counts are equal) and creates a fresh connection for that subscriber via the\n * provided factory. The connection is a dedicated instance per subscriber; the pool only tracks\n * slot utilization so future multiplexed transports (e.g. WebSocket) can share connections\n * across a fixed number of physical hub connections.\n *\n * When {@link size} is 1 (the default), all queries are counted against a single slot — the\n * natural behavior for a single multiplexed connection.\n *\n * @template TDataType The type of data received from the connections.\n */\nexport class ObservableQueryConnectionPool<TDataType> {\n private readonly _slots: PoolSlot[];\n\n /**\n * Initializes a new {@link ObservableQueryConnectionPool}.\n * @param {number} size Number of logical slots (hub connections) in the pool.\n * @param {() => IObservableQueryConnection<TDataType>} factory Factory that produces a new connection instance per subscriber.\n */\n constructor(\n size: number,\n private readonly _factory: () => IObservableQueryConnection<TDataType>\n ) {\n this._slots = Array.from({ length: Math.max(1, size) }, () => ({ queryCount: 0 }));\n }\n\n /**\n * Picks the least-loaded pool slot, creates a fresh connection via the factory, and starts\n * delivering data to the provided callback.\n * @param {DataReceived<TDataType>} dataReceived Callback invoked for each message.\n * @param {object} queryArguments Arguments forwarded to the connection.\n * @returns A cleanup function that decrements the slot counter and disconnects the connection.\n */\n acquire(dataReceived: DataReceived<TDataType>, queryArguments?: object): () => void {\n // Pick the slot with the fewest active queries.\n const slot = this._slots.reduce((min, current) => current.queryCount < min.queryCount ? current : min, this._slots[0]);\n slot.queryCount++;\n\n // Each subscriber gets its own dedicated connection instance.\n const connection = this._factory();\n connection.connect(dataReceived, queryArguments);\n\n return () => {\n connection.disconnect();\n slot.queryCount = Math.max(0, slot.queryCount - 1);\n };\n }\n}\n"],"names":["ObservableQueryConnectionPool","_slots","size","_factory","Array","from","length","Math","max","queryCount","acquire","dataReceived","queryArguments","slot","reduce","min","current","connection","connect","disconnect"],"mappings":"AAAA;AACA;AAYA;;;;;;;;;;;;;AAaC,IACM,MAAMA,6BAAAA,CAAAA;;IACQC,MAAAA;AAEjB;;;;AAIC,QACD,WAAA,CACIC,IAAY,EACKC,QAAqD,CACxE;aADmBA,QAAAA,GAAAA,QAAAA;AAEjB,QAAA,IAAI,CAACF,MAAM,GAAGG,KAAAA,CAAMC,IAAI,CAAC;YAAEC,MAAAA,EAAQC,IAAAA,CAAKC,GAAG,CAAC,CAAA,EAAGN,IAAAA;AAAM,SAAA,EAAG,KAAO;gBAAEO,UAAAA,EAAY;aAAE,CAAA,CAAA;AACnF,IAAA;AAEA;;;;;;AAMC,QACDC,OAAAA,CAAQC,YAAqC,EAAEC,cAAuB,EAAc;;QAEhF,MAAMC,IAAAA,GAAO,IAAI,CAACZ,MAAM,CAACa,MAAM,CAAC,CAACC,GAAAA,EAAKC,OAAAA,GAAYA,OAAAA,CAAQP,UAAU,GAAGM,GAAAA,CAAIN,UAAU,GAAGO,OAAAA,GAAUD,KAAK,IAAI,CAACd,MAAM,CAAC,CAAA,CAAE,CAAA;AACrHY,QAAAA,IAAAA,CAAKJ,UAAU,EAAA;;QAGf,MAAMQ,UAAAA,GAAa,IAAI,CAACd,QAAQ,EAAA;QAChCc,UAAAA,CAAWC,OAAO,CAACP,YAAAA,EAAcC,cAAAA,CAAAA;QAEjC,OAAO,IAAA;AACHK,YAAAA,UAAAA,CAAWE,UAAU,EAAA;YACrBN,IAAAA,CAAKJ,UAAU,GAAGF,IAAAA,CAAKC,GAAG,CAAC,CAAA,EAAGK,IAAAA,CAAKJ,UAAU,GAAG,CAAA,CAAA;AACpD,QAAA,CAAA;AACJ,IAAA;AACJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObservableQueryDiagnostics.d.ts","sourceRoot":"","sources":["../../../queries/ObservableQueryDiagnostics.ts"],"names":[],"mappings":"AAGA,OAA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AmB,EAAE,MAAM,oBAAoB,EAChE;IAKJ,IAAI,UAAU,IAAI,UAAU,CAAC,kCAAkC,CAAC,CAE/D;IAGD,WAAW,IAAI,kCAAkC,CAIhD;IAGD,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAGnD;IAGD,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAGlC;IAED,OAAO,CAAC,4BAA4B;IAwBpC,OAAO,CAAC,eAAe;IAkCvB,OAAO,CAAC,gBAAgB;CAG3B"}
|
|
@@ -1,29 +1,41 @@
|
|
|
1
1
|
import { Subject } from 'rxjs';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* Implements the {@link IObservableQueryDiagnostics} contract by collecting live state from
|
|
7
|
+
* the {@link QueryInstanceCache} and the shared {@link ObservableQueryMultiplexer}.
|
|
8
|
+
*/ class ObservableQueryDiagnostics {
|
|
4
9
|
_cache;
|
|
5
10
|
_getMultiplexer;
|
|
6
11
|
_getTransportConfig;
|
|
7
12
|
_snapshots = new Subject();
|
|
8
13
|
_ownersByKey = new Map();
|
|
9
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Initializes a new instance of {@link ObservableQueryDiagnostics}.
|
|
16
|
+
* @param _cache The {@link QueryInstanceCache} whose state will be reflected.
|
|
17
|
+
* @param _getMultiplexer Factory that returns the current shared multiplexer, or {@code undefined}.
|
|
18
|
+
* @param _getTransportConfig Factory that returns the current transport diagnostics.
|
|
19
|
+
*/ constructor(_cache, _getMultiplexer, _getTransportConfig){
|
|
10
20
|
this._cache = _cache;
|
|
11
21
|
this._getMultiplexer = _getMultiplexer;
|
|
12
22
|
this._getTransportConfig = _getTransportConfig;
|
|
13
23
|
}
|
|
14
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Stream of diagnostics snapshots.
|
|
26
|
+
*/ get snapshots$() {
|
|
15
27
|
return this._snapshots.asObservable();
|
|
16
28
|
}
|
|
17
|
-
getSnapshot() {
|
|
29
|
+
/** @inheritdoc */ getSnapshot() {
|
|
18
30
|
const snapshot = this._createSnapshot();
|
|
19
31
|
this._publishSnapshot(snapshot);
|
|
20
32
|
return snapshot;
|
|
21
33
|
}
|
|
22
|
-
beginTracking(cacheKey, owner) {
|
|
34
|
+
/** @inheritdoc */ beginTracking(cacheKey, owner) {
|
|
23
35
|
this._ownersByKey.set(cacheKey, owner);
|
|
24
36
|
this._publishSnapshot(this._createSnapshot());
|
|
25
37
|
}
|
|
26
|
-
endTracking(cacheKey) {
|
|
38
|
+
/** @inheritdoc */ endTracking(cacheKey) {
|
|
27
39
|
this._ownersByKey.delete(cacheKey);
|
|
28
40
|
this._publishSnapshot(this._createSnapshot());
|
|
29
41
|
}
|
|
@@ -35,17 +47,17 @@ class ObservableQueryDiagnostics {
|
|
|
35
47
|
configuredConnectionCount: 0,
|
|
36
48
|
effectiveConnectionCount: 0,
|
|
37
49
|
activeConnectionCount: 0,
|
|
38
|
-
connections: []
|
|
50
|
+
connections: []
|
|
39
51
|
};
|
|
40
52
|
}
|
|
41
53
|
const connections = mux.getConnectionsSnapshot();
|
|
42
|
-
const activeConnectionCount = connections.filter(c
|
|
54
|
+
const activeConnectionCount = connections.filter((c)=>c.isConnected).length;
|
|
43
55
|
return {
|
|
44
56
|
isConnected: activeConnectionCount > 0,
|
|
45
57
|
configuredConnectionCount: connections.length,
|
|
46
58
|
effectiveConnectionCount: connections.length,
|
|
47
59
|
activeConnectionCount,
|
|
48
|
-
connections
|
|
60
|
+
connections
|
|
49
61
|
};
|
|
50
62
|
}
|
|
51
63
|
_createSnapshot() {
|
|
@@ -54,18 +66,21 @@ class ObservableQueryDiagnostics {
|
|
|
54
66
|
const cache = this._cache.getDiagnosticsSnapshot();
|
|
55
67
|
const ownersByQueryKey = {};
|
|
56
68
|
const queriesByOwner = {};
|
|
57
|
-
for (const [key, owner] of this._ownersByKey)
|
|
69
|
+
for (const [key, owner] of this._ownersByKey){
|
|
58
70
|
ownersByQueryKey[key] = owner;
|
|
59
71
|
if (!queriesByOwner[owner]) {
|
|
60
72
|
queriesByOwner[owner] = [];
|
|
61
73
|
}
|
|
62
74
|
queriesByOwner[owner].push(key);
|
|
63
75
|
}
|
|
64
|
-
const ownership = {
|
|
65
|
-
|
|
76
|
+
const ownership = {
|
|
77
|
+
ownersByQueryKey,
|
|
78
|
+
queriesByOwner
|
|
79
|
+
};
|
|
80
|
+
const disconnectedQueryCount = multiplexer.connections.filter((c)=>!c.isConnected).length;
|
|
66
81
|
const health = {
|
|
67
82
|
allQueriesConnected: multiplexer.isConnected && cache.healthy,
|
|
68
|
-
disconnectedQueryCount
|
|
83
|
+
disconnectedQueryCount
|
|
69
84
|
};
|
|
70
85
|
return {
|
|
71
86
|
health,
|
|
@@ -73,7 +88,7 @@ class ObservableQueryDiagnostics {
|
|
|
73
88
|
multiplexer,
|
|
74
89
|
cache,
|
|
75
90
|
ownership,
|
|
76
|
-
timestamp: new Date().toISOString()
|
|
91
|
+
timestamp: new Date().toISOString()
|
|
77
92
|
};
|
|
78
93
|
}
|
|
79
94
|
_publishSnapshot(snapshot) {
|