@factset/frontgate-js-sdk 7.0.0 → 7.0.2
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/CHANGELOG.md +1058 -792
- package/dist/lib/esnext/FrontgateClient.js +0 -1
- package/dist/lib/esnext/authentication/CookieTokenAuthenticationFactors.js +0 -1
- package/dist/lib/esnext/authentication/index.js +0 -1
- package/dist/lib/esnext/authentication/util/ChallengeResolver.js +0 -1
- package/dist/lib/esnext/authentication/util/SecretGenerator.js +0 -1
- package/dist/lib/esnext/authentication/util/index.js +0 -1
- package/dist/lib/esnext/common/errors.js +0 -1
- package/dist/lib/esnext/common/functions.js +0 -1
- package/dist/lib/esnext/common/interfaces/PtlMessage.js +0 -1
- package/dist/lib/esnext/common/interfaces/index.js +0 -1
- package/dist/lib/esnext/common/interfaces/result/HTTPProxyRequestResult.js +0 -1
- package/dist/lib/esnext/common/interfaces/result/HighLevelRequestResult.js +0 -1
- package/dist/lib/esnext/common/interfaces/result/RequestResult.js +0 -1
- package/dist/lib/esnext/common/types/Quality.js +0 -1
- package/dist/lib/esnext/common/types/RequestQuality.js +0 -1
- package/dist/lib/esnext/common/types/index.js +0 -1
- package/dist/lib/esnext/compat/index.js +0 -1
- package/dist/lib/esnext/connection/index.js +0 -1
- package/dist/lib/esnext/connection/util/Compressor.js +0 -1
- package/dist/lib/esnext/connection/util/functions.js +0 -1
- package/dist/lib/esnext/index.js +0 -1
- package/dist/lib/esnext/logger/AbstractLogger.js +0 -1
- package/dist/lib/esnext/logger/ConsoleLogger.js +0 -1
- package/dist/lib/esnext/logger/LoggerHelper.js +0 -1
- package/dist/lib/esnext/logger/LoggerInterface.js +0 -1
- package/dist/lib/esnext/logger/NullLogger.js +0 -1
- package/dist/lib/esnext/logger/WinstonLogger.js +0 -1
- package/dist/lib/esnext/logger/index.js +0 -1
- package/dist/lib/esnext/message/index.js +0 -1
- package/dist/lib/esnext/message/interfaces/HTTPProxyRequestOptions.js +0 -1
- package/dist/lib/esnext/message/interfaces/HighLevelRequestMethod.js +0 -1
- package/dist/lib/esnext/message/interfaces/HighLevelRequestOptions.js +0 -1
- package/dist/lib/esnext/message/interfaces/index.js +0 -1
- package/dist/lib/esnext/message/request/AbstractMdg2Request.js +0 -1
- package/dist/lib/esnext/message/request/AuthenticationByTokenRequest.js +0 -1
- package/dist/lib/esnext/message/request/AuthenticationRequest.js +0 -1
- package/dist/lib/esnext/message/request/AuthenticationTokenRequest.js +0 -1
- package/dist/lib/esnext/message/request/CancelSubscriptionRequest.js +0 -1
- package/dist/lib/esnext/message/request/ConfigurationRequest.js +0 -1
- package/dist/lib/esnext/message/request/HTTPProxyRequest.js +0 -1
- package/dist/lib/esnext/message/request/HighLevelRequest.js +0 -1
- package/dist/lib/esnext/message/request/PingRequest.js +0 -1
- package/dist/lib/esnext/message/request/TransportLayerClientRequestHeader.js +0 -1
- package/dist/lib/esnext/message/request/index.js +0 -1
- package/dist/lib/esnext/message/request/raw/RawRequest.js +0 -1
- package/dist/lib/esnext/message/request/raw/example/CreateNotationSearchRequest.js +0 -1
- package/dist/lib/esnext/message/request/raw/index.js +0 -1
- package/dist/lib/esnext/message/response/AuthenticationResponse.js +0 -1
- package/dist/lib/esnext/message/response/AuthenticationTokenResponse.js +0 -1
- package/dist/lib/esnext/message/response/ConfigurationResponse.js +0 -1
- package/dist/lib/esnext/message/response/DisconnectionMessage.js +0 -1
- package/dist/lib/esnext/message/response/ErrorResponse.js +0 -1
- package/dist/lib/esnext/message/response/HTTPProxyResponse.js +0 -1
- package/dist/lib/esnext/message/response/HighLevelResponse.js +0 -1
- package/dist/lib/esnext/message/response/Mdg2Response.js +0 -1
- package/dist/lib/esnext/message/response/PingResponse.js +0 -1
- package/dist/lib/esnext/message/response/index.js +0 -1
- package/dist/lib/esnext/message/types/Time.js +0 -1
- package/dist/lib/esnext/message/types/TransportLayerClientRequestHeaderFlag.js +0 -1
- package/dist/lib/esnext/message/types/index.js +0 -1
- package/dist/lib/esnext/message/update/HighLevelUpdate.js +0 -1
- package/dist/lib/esnext/message/update/index.js +0 -1
- package/dist/lib/esnext/mixins/AuthTokenRequestMixin.js +0 -1
- package/dist/lib/esnext/mixins/EndpointRequestMixin.js +0 -1
- package/dist/lib/esnext/mixins/HTTPProxyRequestMixin.js +4 -5
- package/dist/lib/esnext/mixins/LoggerMixin.js +3 -4
- package/dist/lib/esnext/mixins/MessageCompressorMixin.js +0 -1
- package/dist/lib/esnext/mixins/OpenTelemetryMixin.js +0 -1
- package/dist/lib/esnext/mixins/PingMixin.js +0 -1
- package/dist/lib/esnext/mixins/ReconnectMixin.js +0 -1
- package/dist/lib/esnext/mixins/RemoteLoggerMixin.js +0 -1
- package/dist/lib/esnext/mixins/RequestMixin.js +0 -1
- package/dist/lib/esnext/mixins/auth/AppAuthMixin.js +0 -1
- package/dist/lib/esnext/mixins/auth/CookieTokenAuthMixin.js +0 -1
- package/dist/lib/esnext/mixins/auth/FetchAuthenticationMixin.js +1 -2
- package/dist/lib/esnext/mixins/auth/SessionAuthMixin.js +2 -3
- package/dist/lib/esnext/mixins/auth/TokenAuthMixin.js +2 -3
- package/dist/lib/esnext/mixins/auth/UserCredentialAuthMixin.js +0 -1
- package/dist/lib/esnext/mixins/auth/UserPasswordAuthMixin.js +0 -1
- package/dist/lib/esnext/mixins/auth/index.js +0 -1
- package/dist/lib/esnext/mixins/connection/FrontgateWSMixin.js +9 -10
- package/dist/lib/esnext/mixins/connection/index.js +0 -1
- package/dist/lib/esnext/mixins/index.js +0 -1
- package/dist/lib/esnext/mixins/subscription/DataObserver.js +0 -1
- package/dist/lib/esnext/mixins/subscription/EndpointSubscriptionMixin.js +149 -123
- package/dist/lib/esnext/mixins/subscription/RawSubscriptionMixin.js +11 -12
- package/dist/lib/esnext/mixins/subscription/index.js +0 -1
- package/dist/lib/esnext/util/functions.js +4 -6
- package/dist/lib/esnext/version.js +1 -2
- package/dist/lib/node/FrontgateClient.js +0 -1
- package/dist/lib/node/authentication/CookieTokenAuthenticationFactors.js +0 -1
- package/dist/lib/node/authentication/index.js +0 -1
- package/dist/lib/node/authentication/util/ChallengeResolver.js +0 -1
- package/dist/lib/node/authentication/util/SecretGenerator.js +0 -1
- package/dist/lib/node/authentication/util/index.js +0 -1
- package/dist/lib/node/common/errors.js +0 -1
- package/dist/lib/node/common/functions.js +0 -1
- package/dist/lib/node/common/interfaces/PtlMessage.js +0 -1
- package/dist/lib/node/common/interfaces/index.js +0 -1
- package/dist/lib/node/common/interfaces/result/HTTPProxyRequestResult.js +0 -1
- package/dist/lib/node/common/interfaces/result/HighLevelRequestResult.js +0 -1
- package/dist/lib/node/common/interfaces/result/RequestResult.js +0 -1
- package/dist/lib/node/common/types/Quality.js +0 -1
- package/dist/lib/node/common/types/RequestQuality.js +0 -1
- package/dist/lib/node/common/types/index.js +0 -1
- package/dist/lib/node/compat/index.js +0 -1
- package/dist/lib/node/connection/index.js +0 -1
- package/dist/lib/node/connection/util/Compressor.js +0 -1
- package/dist/lib/node/connection/util/functions.js +0 -1
- package/dist/lib/node/index.js +0 -1
- package/dist/lib/node/logger/AbstractLogger.js +0 -1
- package/dist/lib/node/logger/ConsoleLogger.js +0 -1
- package/dist/lib/node/logger/LoggerHelper.js +0 -1
- package/dist/lib/node/logger/LoggerInterface.js +0 -1
- package/dist/lib/node/logger/NullLogger.js +0 -1
- package/dist/lib/node/logger/WinstonLogger.js +0 -1
- package/dist/lib/node/logger/index.js +0 -1
- package/dist/lib/node/message/index.js +0 -1
- package/dist/lib/node/message/interfaces/HTTPProxyRequestOptions.js +0 -1
- package/dist/lib/node/message/interfaces/HighLevelRequestMethod.js +0 -1
- package/dist/lib/node/message/interfaces/HighLevelRequestOptions.js +0 -1
- package/dist/lib/node/message/interfaces/index.js +0 -1
- package/dist/lib/node/message/request/AbstractMdg2Request.js +0 -1
- package/dist/lib/node/message/request/AuthenticationByTokenRequest.js +0 -1
- package/dist/lib/node/message/request/AuthenticationRequest.js +0 -1
- package/dist/lib/node/message/request/AuthenticationTokenRequest.js +0 -1
- package/dist/lib/node/message/request/CancelSubscriptionRequest.js +0 -1
- package/dist/lib/node/message/request/ConfigurationRequest.js +0 -1
- package/dist/lib/node/message/request/HTTPProxyRequest.js +0 -1
- package/dist/lib/node/message/request/HighLevelRequest.js +0 -1
- package/dist/lib/node/message/request/PingRequest.js +0 -1
- package/dist/lib/node/message/request/TransportLayerClientRequestHeader.js +0 -1
- package/dist/lib/node/message/request/index.js +0 -1
- package/dist/lib/node/message/request/raw/RawRequest.js +0 -1
- package/dist/lib/node/message/request/raw/example/CreateNotationSearchRequest.js +0 -1
- package/dist/lib/node/message/request/raw/index.js +0 -1
- package/dist/lib/node/message/response/AuthenticationResponse.js +0 -1
- package/dist/lib/node/message/response/AuthenticationTokenResponse.js +0 -1
- package/dist/lib/node/message/response/ConfigurationResponse.js +0 -1
- package/dist/lib/node/message/response/DisconnectionMessage.js +0 -1
- package/dist/lib/node/message/response/ErrorResponse.js +0 -1
- package/dist/lib/node/message/response/HTTPProxyResponse.js +0 -1
- package/dist/lib/node/message/response/HighLevelResponse.js +0 -1
- package/dist/lib/node/message/response/Mdg2Response.js +0 -1
- package/dist/lib/node/message/response/PingResponse.js +0 -1
- package/dist/lib/node/message/response/index.js +0 -1
- package/dist/lib/node/message/types/Time.js +0 -1
- package/dist/lib/node/message/types/TransportLayerClientRequestHeaderFlag.js +0 -1
- package/dist/lib/node/message/types/index.js +0 -1
- package/dist/lib/node/message/update/HighLevelUpdate.js +0 -1
- package/dist/lib/node/message/update/index.js +0 -1
- package/dist/lib/node/mixins/AuthTokenRequestMixin.js +0 -1
- package/dist/lib/node/mixins/EndpointRequestMixin.js +0 -1
- package/dist/lib/node/mixins/HTTPProxyRequestMixin.js +4 -5
- package/dist/lib/node/mixins/LoggerMixin.js +3 -4
- package/dist/lib/node/mixins/MessageCompressorMixin.js +0 -1
- package/dist/lib/node/mixins/OpenTelemetryMixin.js +0 -1
- package/dist/lib/node/mixins/PingMixin.js +0 -1
- package/dist/lib/node/mixins/ReconnectMixin.js +0 -1
- package/dist/lib/node/mixins/RemoteLoggerMixin.js +0 -1
- package/dist/lib/node/mixins/RequestMixin.js +0 -1
- package/dist/lib/node/mixins/auth/AppAuthMixin.js +0 -1
- package/dist/lib/node/mixins/auth/CookieTokenAuthMixin.js +0 -1
- package/dist/lib/node/mixins/auth/FetchAuthenticationMixin.js +1 -2
- package/dist/lib/node/mixins/auth/SessionAuthMixin.js +2 -3
- package/dist/lib/node/mixins/auth/TokenAuthMixin.js +2 -3
- package/dist/lib/node/mixins/auth/UserCredentialAuthMixin.js +0 -1
- package/dist/lib/node/mixins/auth/UserPasswordAuthMixin.js +0 -1
- package/dist/lib/node/mixins/auth/index.js +0 -1
- package/dist/lib/node/mixins/connection/FrontgateWSMixin.js +9 -10
- package/dist/lib/node/mixins/connection/index.js +0 -1
- package/dist/lib/node/mixins/index.js +0 -1
- package/dist/lib/node/mixins/subscription/DataObserver.js +0 -1
- package/dist/lib/node/mixins/subscription/EndpointSubscriptionMixin.js +149 -123
- package/dist/lib/node/mixins/subscription/RawSubscriptionMixin.js +11 -12
- package/dist/lib/node/mixins/subscription/index.js +0 -1
- package/dist/lib/node/util/functions.js +4 -6
- package/dist/lib/node/version.js +1 -2
- package/dist/lib/types/mixins/AuthTokenRequestMixin.d.ts +2 -2
- package/dist/lib/types/mixins/EndpointRequestMixin.d.ts +3 -3
- package/dist/lib/types/mixins/HTTPProxyRequestMixin.d.ts +2 -2
- package/dist/lib/types/mixins/LoggerMixin.d.ts +3 -3
- package/dist/lib/types/mixins/MessageCompressorMixin.d.ts +3 -3
- package/dist/lib/types/mixins/OpenTelemetryMixin.d.ts +3 -3
- package/dist/lib/types/mixins/PingMixin.d.ts +2 -2
- package/dist/lib/types/mixins/ReconnectMixin.d.ts +5 -5
- package/dist/lib/types/mixins/RemoteLoggerMixin.d.ts +2 -2
- package/dist/lib/types/mixins/RequestMixin.d.ts +2 -2
- package/dist/lib/types/mixins/auth/AppAuthMixin.d.ts +8 -8
- package/dist/lib/types/mixins/auth/CookieTokenAuthMixin.d.ts +2 -2
- package/dist/lib/types/mixins/auth/FetchAuthenticationMixin.d.ts +28 -27
- package/dist/lib/types/mixins/auth/SessionAuthMixin.d.ts +32 -32
- package/dist/lib/types/mixins/auth/TokenAuthMixin.d.ts +4 -4
- package/dist/lib/types/mixins/auth/UserCredentialAuthMixin.d.ts +8 -8
- package/dist/lib/types/mixins/auth/UserPasswordAuthMixin.d.ts +8 -8
- package/dist/lib/types/mixins/connection/FrontgateWSMixin.d.ts +21 -21
- package/dist/lib/types/mixins/subscription/EndpointSubscriptionMixin.d.ts +5 -6
- package/dist/lib/types/mixins/subscription/RawSubscriptionMixin.d.ts +4 -4
- package/dist/lib/types/util/functions.d.ts +1 -2
- package/dist/lib/umd/mdg2.client.min.umd.js +1 -1
- package/dist/lib/umd/mdg2.client.umd.js +240 -219
- package/package.json +26 -25
- package/dist/lib/esnext/FrontgateClient.js.map +0 -1
- package/dist/lib/esnext/authentication/CookieTokenAuthenticationFactors.js.map +0 -1
- package/dist/lib/esnext/authentication/index.js.map +0 -1
- package/dist/lib/esnext/authentication/util/ChallengeResolver.js.map +0 -1
- package/dist/lib/esnext/authentication/util/SecretGenerator.js.map +0 -1
- package/dist/lib/esnext/authentication/util/index.js.map +0 -1
- package/dist/lib/esnext/common/errors.js.map +0 -1
- package/dist/lib/esnext/common/functions.js.map +0 -1
- package/dist/lib/esnext/common/interfaces/PtlMessage.js.map +0 -1
- package/dist/lib/esnext/common/interfaces/index.js.map +0 -1
- package/dist/lib/esnext/common/interfaces/result/HTTPProxyRequestResult.js.map +0 -1
- package/dist/lib/esnext/common/interfaces/result/HighLevelRequestResult.js.map +0 -1
- package/dist/lib/esnext/common/interfaces/result/RequestResult.js.map +0 -1
- package/dist/lib/esnext/common/types/Quality.js.map +0 -1
- package/dist/lib/esnext/common/types/RequestQuality.js.map +0 -1
- package/dist/lib/esnext/common/types/index.js.map +0 -1
- package/dist/lib/esnext/compat/index.js.map +0 -1
- package/dist/lib/esnext/connection/index.js.map +0 -1
- package/dist/lib/esnext/connection/util/Compressor.js.map +0 -1
- package/dist/lib/esnext/connection/util/functions.js.map +0 -1
- package/dist/lib/esnext/index.js.map +0 -1
- package/dist/lib/esnext/logger/AbstractLogger.js.map +0 -1
- package/dist/lib/esnext/logger/ConsoleLogger.js.map +0 -1
- package/dist/lib/esnext/logger/LoggerHelper.js.map +0 -1
- package/dist/lib/esnext/logger/LoggerInterface.js.map +0 -1
- package/dist/lib/esnext/logger/NullLogger.js.map +0 -1
- package/dist/lib/esnext/logger/WinstonLogger.js.map +0 -1
- package/dist/lib/esnext/logger/index.js.map +0 -1
- package/dist/lib/esnext/message/index.js.map +0 -1
- package/dist/lib/esnext/message/interfaces/HTTPProxyRequestOptions.js.map +0 -1
- package/dist/lib/esnext/message/interfaces/HighLevelRequestMethod.js.map +0 -1
- package/dist/lib/esnext/message/interfaces/HighLevelRequestOptions.js.map +0 -1
- package/dist/lib/esnext/message/interfaces/index.js.map +0 -1
- package/dist/lib/esnext/message/request/AbstractMdg2Request.js.map +0 -1
- package/dist/lib/esnext/message/request/AuthenticationByTokenRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/AuthenticationRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/AuthenticationTokenRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/CancelSubscriptionRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/ConfigurationRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/HTTPProxyRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/HighLevelRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/PingRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/TransportLayerClientRequestHeader.js.map +0 -1
- package/dist/lib/esnext/message/request/index.js.map +0 -1
- package/dist/lib/esnext/message/request/raw/RawRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/raw/example/CreateNotationSearchRequest.js.map +0 -1
- package/dist/lib/esnext/message/request/raw/index.js.map +0 -1
- package/dist/lib/esnext/message/response/AuthenticationResponse.js.map +0 -1
- package/dist/lib/esnext/message/response/AuthenticationTokenResponse.js.map +0 -1
- package/dist/lib/esnext/message/response/ConfigurationResponse.js.map +0 -1
- package/dist/lib/esnext/message/response/DisconnectionMessage.js.map +0 -1
- package/dist/lib/esnext/message/response/ErrorResponse.js.map +0 -1
- package/dist/lib/esnext/message/response/HTTPProxyResponse.js.map +0 -1
- package/dist/lib/esnext/message/response/HighLevelResponse.js.map +0 -1
- package/dist/lib/esnext/message/response/Mdg2Response.js.map +0 -1
- package/dist/lib/esnext/message/response/PingResponse.js.map +0 -1
- package/dist/lib/esnext/message/response/index.js.map +0 -1
- package/dist/lib/esnext/message/types/Time.js.map +0 -1
- package/dist/lib/esnext/message/types/TransportLayerClientRequestHeaderFlag.js.map +0 -1
- package/dist/lib/esnext/message/types/index.js.map +0 -1
- package/dist/lib/esnext/message/update/HighLevelUpdate.js.map +0 -1
- package/dist/lib/esnext/message/update/index.js.map +0 -1
- package/dist/lib/esnext/mixins/AuthTokenRequestMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/EndpointRequestMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/HTTPProxyRequestMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/LoggerMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/MessageCompressorMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/OpenTelemetryMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/PingMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/ReconnectMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/RemoteLoggerMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/RequestMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/auth/AppAuthMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/auth/CookieTokenAuthMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/auth/FetchAuthenticationMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/auth/SessionAuthMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/auth/TokenAuthMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/auth/UserCredentialAuthMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/auth/UserPasswordAuthMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/auth/index.js.map +0 -1
- package/dist/lib/esnext/mixins/connection/FrontgateWSMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/connection/index.js.map +0 -1
- package/dist/lib/esnext/mixins/index.js.map +0 -1
- package/dist/lib/esnext/mixins/subscription/DataObserver.js.map +0 -1
- package/dist/lib/esnext/mixins/subscription/EndpointSubscriptionMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/subscription/RawSubscriptionMixin.js.map +0 -1
- package/dist/lib/esnext/mixins/subscription/index.js.map +0 -1
- package/dist/lib/esnext/util/functions.js.map +0 -1
- package/dist/lib/esnext/version.js.map +0 -1
- package/dist/lib/node/FrontgateClient.js.map +0 -1
- package/dist/lib/node/authentication/CookieTokenAuthenticationFactors.js.map +0 -1
- package/dist/lib/node/authentication/index.js.map +0 -1
- package/dist/lib/node/authentication/util/ChallengeResolver.js.map +0 -1
- package/dist/lib/node/authentication/util/SecretGenerator.js.map +0 -1
- package/dist/lib/node/authentication/util/index.js.map +0 -1
- package/dist/lib/node/common/errors.js.map +0 -1
- package/dist/lib/node/common/functions.js.map +0 -1
- package/dist/lib/node/common/interfaces/PtlMessage.js.map +0 -1
- package/dist/lib/node/common/interfaces/index.js.map +0 -1
- package/dist/lib/node/common/interfaces/result/HTTPProxyRequestResult.js.map +0 -1
- package/dist/lib/node/common/interfaces/result/HighLevelRequestResult.js.map +0 -1
- package/dist/lib/node/common/interfaces/result/RequestResult.js.map +0 -1
- package/dist/lib/node/common/types/Quality.js.map +0 -1
- package/dist/lib/node/common/types/RequestQuality.js.map +0 -1
- package/dist/lib/node/common/types/index.js.map +0 -1
- package/dist/lib/node/compat/index.js.map +0 -1
- package/dist/lib/node/connection/index.js.map +0 -1
- package/dist/lib/node/connection/util/Compressor.js.map +0 -1
- package/dist/lib/node/connection/util/functions.js.map +0 -1
- package/dist/lib/node/index.js.map +0 -1
- package/dist/lib/node/logger/AbstractLogger.js.map +0 -1
- package/dist/lib/node/logger/ConsoleLogger.js.map +0 -1
- package/dist/lib/node/logger/LoggerHelper.js.map +0 -1
- package/dist/lib/node/logger/LoggerInterface.js.map +0 -1
- package/dist/lib/node/logger/NullLogger.js.map +0 -1
- package/dist/lib/node/logger/WinstonLogger.js.map +0 -1
- package/dist/lib/node/logger/index.js.map +0 -1
- package/dist/lib/node/message/index.js.map +0 -1
- package/dist/lib/node/message/interfaces/HTTPProxyRequestOptions.js.map +0 -1
- package/dist/lib/node/message/interfaces/HighLevelRequestMethod.js.map +0 -1
- package/dist/lib/node/message/interfaces/HighLevelRequestOptions.js.map +0 -1
- package/dist/lib/node/message/interfaces/index.js.map +0 -1
- package/dist/lib/node/message/request/AbstractMdg2Request.js.map +0 -1
- package/dist/lib/node/message/request/AuthenticationByTokenRequest.js.map +0 -1
- package/dist/lib/node/message/request/AuthenticationRequest.js.map +0 -1
- package/dist/lib/node/message/request/AuthenticationTokenRequest.js.map +0 -1
- package/dist/lib/node/message/request/CancelSubscriptionRequest.js.map +0 -1
- package/dist/lib/node/message/request/ConfigurationRequest.js.map +0 -1
- package/dist/lib/node/message/request/HTTPProxyRequest.js.map +0 -1
- package/dist/lib/node/message/request/HighLevelRequest.js.map +0 -1
- package/dist/lib/node/message/request/PingRequest.js.map +0 -1
- package/dist/lib/node/message/request/TransportLayerClientRequestHeader.js.map +0 -1
- package/dist/lib/node/message/request/index.js.map +0 -1
- package/dist/lib/node/message/request/raw/RawRequest.js.map +0 -1
- package/dist/lib/node/message/request/raw/example/CreateNotationSearchRequest.js.map +0 -1
- package/dist/lib/node/message/request/raw/index.js.map +0 -1
- package/dist/lib/node/message/response/AuthenticationResponse.js.map +0 -1
- package/dist/lib/node/message/response/AuthenticationTokenResponse.js.map +0 -1
- package/dist/lib/node/message/response/ConfigurationResponse.js.map +0 -1
- package/dist/lib/node/message/response/DisconnectionMessage.js.map +0 -1
- package/dist/lib/node/message/response/ErrorResponse.js.map +0 -1
- package/dist/lib/node/message/response/HTTPProxyResponse.js.map +0 -1
- package/dist/lib/node/message/response/HighLevelResponse.js.map +0 -1
- package/dist/lib/node/message/response/Mdg2Response.js.map +0 -1
- package/dist/lib/node/message/response/PingResponse.js.map +0 -1
- package/dist/lib/node/message/response/index.js.map +0 -1
- package/dist/lib/node/message/types/Time.js.map +0 -1
- package/dist/lib/node/message/types/TransportLayerClientRequestHeaderFlag.js.map +0 -1
- package/dist/lib/node/message/types/index.js.map +0 -1
- package/dist/lib/node/message/update/HighLevelUpdate.js.map +0 -1
- package/dist/lib/node/message/update/index.js.map +0 -1
- package/dist/lib/node/mixins/AuthTokenRequestMixin.js.map +0 -1
- package/dist/lib/node/mixins/EndpointRequestMixin.js.map +0 -1
- package/dist/lib/node/mixins/HTTPProxyRequestMixin.js.map +0 -1
- package/dist/lib/node/mixins/LoggerMixin.js.map +0 -1
- package/dist/lib/node/mixins/MessageCompressorMixin.js.map +0 -1
- package/dist/lib/node/mixins/OpenTelemetryMixin.js.map +0 -1
- package/dist/lib/node/mixins/PingMixin.js.map +0 -1
- package/dist/lib/node/mixins/ReconnectMixin.js.map +0 -1
- package/dist/lib/node/mixins/RemoteLoggerMixin.js.map +0 -1
- package/dist/lib/node/mixins/RequestMixin.js.map +0 -1
- package/dist/lib/node/mixins/auth/AppAuthMixin.js.map +0 -1
- package/dist/lib/node/mixins/auth/CookieTokenAuthMixin.js.map +0 -1
- package/dist/lib/node/mixins/auth/FetchAuthenticationMixin.js.map +0 -1
- package/dist/lib/node/mixins/auth/SessionAuthMixin.js.map +0 -1
- package/dist/lib/node/mixins/auth/TokenAuthMixin.js.map +0 -1
- package/dist/lib/node/mixins/auth/UserCredentialAuthMixin.js.map +0 -1
- package/dist/lib/node/mixins/auth/UserPasswordAuthMixin.js.map +0 -1
- package/dist/lib/node/mixins/auth/index.js.map +0 -1
- package/dist/lib/node/mixins/connection/FrontgateWSMixin.js.map +0 -1
- package/dist/lib/node/mixins/connection/index.js.map +0 -1
- package/dist/lib/node/mixins/index.js.map +0 -1
- package/dist/lib/node/mixins/subscription/DataObserver.js.map +0 -1
- package/dist/lib/node/mixins/subscription/EndpointSubscriptionMixin.js.map +0 -1
- package/dist/lib/node/mixins/subscription/RawSubscriptionMixin.js.map +0 -1
- package/dist/lib/node/mixins/subscription/index.js.map +0 -1
- package/dist/lib/node/util/functions.js.map +0 -1
- package/dist/lib/node/version.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global2, factory) {
|
|
2
2
|
typeof exports === "object" && typeof module !== "undefined" ? factory(exports) : typeof define === "function" && define.amd ? define(["exports"], factory) : (global2 = typeof globalThis !== "undefined" ? globalThis : global2 || self, factory(global2.fdsg = {}));
|
|
3
|
-
})(this, function(exports2) {
|
|
3
|
+
})(this, (function(exports2) {
|
|
4
4
|
"use strict";
|
|
5
5
|
function getDefaultExportFromCjs(x2) {
|
|
6
6
|
return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
|
|
@@ -175,15 +175,15 @@
|
|
|
175
175
|
function timeToMilliseconds(time) {
|
|
176
176
|
return time.toString().slice(0, -3);
|
|
177
177
|
}
|
|
178
|
-
const PACKAGE_JSON = { version: "7.0.
|
|
178
|
+
const PACKAGE_JSON = { version: "7.0.2", package: "@factset/frontgate-js-sdk" };
|
|
179
179
|
function getClientInformation() {
|
|
180
180
|
const navigator2 = getNavigator();
|
|
181
181
|
return {
|
|
182
|
-
userAgent: navigator2.userAgent,
|
|
183
|
-
platform:
|
|
182
|
+
userAgent: navigator2.userAgent ?? "unknown",
|
|
183
|
+
platform: "frontgate-js-sdk",
|
|
184
184
|
version: PACKAGE_JSON.version,
|
|
185
185
|
package: PACKAGE_JSON.package,
|
|
186
|
-
mobile: /Mobi/i.test(navigator2.userAgent)
|
|
186
|
+
mobile: /Mobi/i.test(navigator2.userAgent ?? "unknown")
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
189
|
function getNavigator() {
|
|
@@ -192,11 +192,10 @@
|
|
|
192
192
|
}
|
|
193
193
|
if (typeof process !== "undefined") {
|
|
194
194
|
return {
|
|
195
|
-
userAgent: `node.js/io.js, ${process.version}
|
|
196
|
-
platform: `${process.platform}_${process.arch}`
|
|
195
|
+
userAgent: `node.js/io.js, ${process.version}`
|
|
197
196
|
};
|
|
198
197
|
}
|
|
199
|
-
return { userAgent: "unknown"
|
|
198
|
+
return { userAgent: "unknown" };
|
|
200
199
|
}
|
|
201
200
|
const encodeSpanContext$1 = (spanContext) => {
|
|
202
201
|
const buffer = [18, 20, 9];
|
|
@@ -1170,8 +1169,8 @@
|
|
|
1170
1169
|
}
|
|
1171
1170
|
#message_buffer_size;
|
|
1172
1171
|
#msgBuffer = [];
|
|
1173
|
-
set conf(
|
|
1174
|
-
const internalConf = this.#applyDefaultsToConfig(
|
|
1172
|
+
set conf(newConf) {
|
|
1173
|
+
const internalConf = this.#applyDefaultsToConfig(newConf);
|
|
1175
1174
|
this.#message_buffer_size = internalConf.messageBufferSize;
|
|
1176
1175
|
this.#wsConf = internalConf;
|
|
1177
1176
|
}
|
|
@@ -1422,16 +1421,16 @@
|
|
|
1422
1421
|
details: error
|
|
1423
1422
|
});
|
|
1424
1423
|
}
|
|
1425
|
-
#applyDefaultsToConfig(
|
|
1426
|
-
const maxIdleIntervalInS =
|
|
1427
|
-
const maxIdleInterval =
|
|
1424
|
+
#applyDefaultsToConfig(oldConf) {
|
|
1425
|
+
const maxIdleIntervalInS = oldConf.maximumIdleIntervalInS ?? 60;
|
|
1426
|
+
const maxIdleInterval = oldConf.maximumIdleInterval ?? maxIdleIntervalInS * 1e6;
|
|
1428
1427
|
return {
|
|
1429
|
-
...
|
|
1430
|
-
payloadContent:
|
|
1428
|
+
...oldConf,
|
|
1429
|
+
payloadContent: oldConf.payloadContent ?? "foundation",
|
|
1431
1430
|
maximumIdleIntervalInS: maxIdleIntervalInS,
|
|
1432
1431
|
maximumIdleInterval: maxIdleInterval,
|
|
1433
|
-
tls:
|
|
1434
|
-
messageBufferSize:
|
|
1432
|
+
tls: oldConf.tls ?? true,
|
|
1433
|
+
messageBufferSize: oldConf.messageBufferSize ?? 512
|
|
1435
1434
|
};
|
|
1436
1435
|
}
|
|
1437
1436
|
isConnected() {
|
|
@@ -1450,15 +1449,15 @@
|
|
|
1450
1449
|
disabledFeatureGroups: ["Connection"]
|
|
1451
1450
|
});
|
|
1452
1451
|
};
|
|
1453
|
-
const logger = (
|
|
1452
|
+
const logger = (loggerInstance, logLevel) => {
|
|
1454
1453
|
if (logLevel) {
|
|
1455
|
-
|
|
1454
|
+
loggerInstance.setLevel(logLevel);
|
|
1456
1455
|
}
|
|
1457
1456
|
const mixinLogger = (Base) => {
|
|
1458
1457
|
return class extends Base {
|
|
1459
1458
|
constructor(...args) {
|
|
1460
1459
|
super(...args);
|
|
1461
|
-
this.logger =
|
|
1460
|
+
this.logger = loggerInstance;
|
|
1462
1461
|
}
|
|
1463
1462
|
};
|
|
1464
1463
|
};
|
|
@@ -1563,7 +1562,7 @@
|
|
|
1563
1562
|
x = (x & 61680) >> 4 | (x & 3855) << 4;
|
|
1564
1563
|
rev[i] = ((x & 65280) >> 8 | (x & 255) << 8) >> 1;
|
|
1565
1564
|
}
|
|
1566
|
-
var hMap = function(cd, mb, r) {
|
|
1565
|
+
var hMap = (function(cd, mb, r) {
|
|
1567
1566
|
var s = cd.length;
|
|
1568
1567
|
var i2 = 0;
|
|
1569
1568
|
var l = new u16(mb);
|
|
@@ -1598,7 +1597,7 @@
|
|
|
1598
1597
|
}
|
|
1599
1598
|
}
|
|
1600
1599
|
return co;
|
|
1601
|
-
};
|
|
1600
|
+
});
|
|
1602
1601
|
var flt = new u8(288);
|
|
1603
1602
|
for (var i = 0; i < 144; ++i)
|
|
1604
1603
|
flt[i] = 8;
|
|
@@ -2162,7 +2161,7 @@
|
|
|
2162
2161
|
err(6, "invalid zlib data: " + (d[1] & 32 ? "need" : "unexpected") + " dictionary");
|
|
2163
2162
|
return (d[1] >> 3 & 4) + 2;
|
|
2164
2163
|
};
|
|
2165
|
-
var Deflate = /* @__PURE__ */ function() {
|
|
2164
|
+
var Deflate = /* @__PURE__ */ (function() {
|
|
2166
2165
|
function Deflate2(opts, cb) {
|
|
2167
2166
|
if (typeof opts == "function")
|
|
2168
2167
|
cb = opts, opts = {};
|
|
@@ -2218,8 +2217,8 @@
|
|
|
2218
2217
|
this.s.w = this.s.i, this.s.i -= 2;
|
|
2219
2218
|
};
|
|
2220
2219
|
return Deflate2;
|
|
2221
|
-
}();
|
|
2222
|
-
var Inflate = /* @__PURE__ */ function() {
|
|
2220
|
+
})();
|
|
2221
|
+
var Inflate = /* @__PURE__ */ (function() {
|
|
2223
2222
|
function Inflate2(opts, cb) {
|
|
2224
2223
|
if (typeof opts == "function")
|
|
2225
2224
|
cb = opts, opts = {};
|
|
@@ -2255,8 +2254,8 @@
|
|
|
2255
2254
|
this.e(chunk), this.c(final);
|
|
2256
2255
|
};
|
|
2257
2256
|
return Inflate2;
|
|
2258
|
-
}();
|
|
2259
|
-
var Zlib = /* @__PURE__ */ function() {
|
|
2257
|
+
})();
|
|
2258
|
+
var Zlib = /* @__PURE__ */ (function() {
|
|
2260
2259
|
function Zlib2(opts, cb) {
|
|
2261
2260
|
this.c = adler();
|
|
2262
2261
|
this.v = 1;
|
|
@@ -2278,8 +2277,8 @@
|
|
|
2278
2277
|
Deflate.prototype.flush.call(this);
|
|
2279
2278
|
};
|
|
2280
2279
|
return Zlib2;
|
|
2281
|
-
}();
|
|
2282
|
-
var Unzlib = /* @__PURE__ */ function() {
|
|
2280
|
+
})();
|
|
2281
|
+
var Unzlib = /* @__PURE__ */ (function() {
|
|
2283
2282
|
function Unzlib2(opts, cb) {
|
|
2284
2283
|
Inflate.call(this, opts, cb);
|
|
2285
2284
|
this.v = opts && opts.dictionary ? 2 : 1;
|
|
@@ -2299,7 +2298,7 @@
|
|
|
2299
2298
|
Inflate.prototype.c.call(this, final);
|
|
2300
2299
|
};
|
|
2301
2300
|
return Unzlib2;
|
|
2302
|
-
}();
|
|
2301
|
+
})();
|
|
2303
2302
|
var te = typeof TextEncoder != "undefined" && /* @__PURE__ */ new TextEncoder();
|
|
2304
2303
|
var td = typeof TextDecoder != "undefined" && /* @__PURE__ */ new TextDecoder();
|
|
2305
2304
|
var tds = 0;
|
|
@@ -2472,16 +2471,26 @@
|
|
|
2472
2471
|
const config = { ...originalConfig };
|
|
2473
2472
|
return class extends Base {
|
|
2474
2473
|
#subscriptions = /* @__PURE__ */ new Map();
|
|
2474
|
+
#subscriptionCounts = /* @__PURE__ */ new Map();
|
|
2475
|
+
#inFlights = /* @__PURE__ */ new Map();
|
|
2475
2476
|
async observeEndpoint(method, path, data, requestOptions) {
|
|
2476
2477
|
const key = `${method}:${path}:${JSON.stringify(data)}:${JSON.stringify(requestOptions ?? {})}`;
|
|
2478
|
+
if (this.#inFlights.has(key)) {
|
|
2479
|
+
const inFlightPromise = this.#inFlights.get(key);
|
|
2480
|
+
this.log(LogLevel.INFO, `Catching inflight subscription for ${key}`);
|
|
2481
|
+
const subscriptionCount = this.#subscriptionCounts.get(key) ?? 0;
|
|
2482
|
+
this.#subscriptionCounts.set(key, subscriptionCount + 1);
|
|
2483
|
+
return inFlightPromise;
|
|
2484
|
+
}
|
|
2477
2485
|
const timeOutInMs = config.timeout ?? this.defaultTimeoutInMs;
|
|
2478
2486
|
const resubscribeTimeout = config.subscriptionResubscribeTimeout ?? 1e3;
|
|
2479
2487
|
if (this.#subscriptions.has(key)) {
|
|
2480
2488
|
const subscription = this.#subscriptions.get(key);
|
|
2489
|
+
const subscriptionCount = this.#subscriptionCounts.get(key) ?? 0;
|
|
2481
2490
|
if (subscription) {
|
|
2482
|
-
|
|
2491
|
+
this.#subscriptionCounts.set(key, subscriptionCount + 1);
|
|
2483
2492
|
this.log(LogLevel.INFO, `Reusing existing subscription for ${key}`);
|
|
2484
|
-
return subscription
|
|
2493
|
+
return subscription;
|
|
2485
2494
|
}
|
|
2486
2495
|
}
|
|
2487
2496
|
this.log(LogLevel.INFO, `Creating new subscription for ${key}`);
|
|
@@ -2492,146 +2501,158 @@
|
|
|
2492
2501
|
callbackType: "job",
|
|
2493
2502
|
callbackId: ""
|
|
2494
2503
|
};
|
|
2495
|
-
await this.hooks.callHook("frontgateConnection:sendMessage", subscriptionMsg);
|
|
2496
2504
|
const promise = new Promise((resolve, reject) => {
|
|
2497
|
-
this.hooks.
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
reject(new ErrorResponse(JSON.stringify(response)));
|
|
2501
|
-
return;
|
|
2502
|
-
}
|
|
2503
|
-
let hlResponseData;
|
|
2504
|
-
try {
|
|
2505
|
-
hlResponseData = JSON.parse(response.body.value);
|
|
2506
|
-
} catch (e) {
|
|
2507
|
-
this.log(LogLevel.ERROR, `Failed to parse response: ${response.body.value}`);
|
|
2508
|
-
this.log(LogLevel.ERROR, e);
|
|
2509
|
-
reject(e);
|
|
2510
|
-
return;
|
|
2511
|
-
}
|
|
2512
|
-
const observer = new FrontgateClientEndpointDataObserver(response.header.id_job, hlResponseData);
|
|
2513
|
-
let removeMessageUpdateHook = this.hooks.hook(`frontgateConnection:response:${subscriptionMsg.callbackId}`, (update) => {
|
|
2514
|
-
if (!update.Message.includes("HighLevelUpdate")) {
|
|
2515
|
-
if (update.Message.includes("SubscriptionLoss")) {
|
|
2516
|
-
this.log(LogLevel.DEBUG, `Received: ${update.Message}`);
|
|
2517
|
-
setTimeout(() => {
|
|
2518
|
-
void resubscribe();
|
|
2519
|
-
}, addRandomnessToTime(resubscribeTimeout));
|
|
2520
|
-
removeMessageUpdateHook();
|
|
2521
|
-
return;
|
|
2522
|
-
}
|
|
2505
|
+
this.hooks.callHook("frontgateConnection:sendMessage", subscriptionMsg).then(() => {
|
|
2506
|
+
this.hooks.hookOnce(`frontgateConnection:response:${subscriptionMsg.callbackId}`, (response) => {
|
|
2507
|
+
if (!response.Message.includes("HighLevelResponse")) {
|
|
2523
2508
|
this.log(LogLevel.ERROR, `Unexpected response: ${response.Message}`);
|
|
2524
|
-
|
|
2525
|
-
removeMessageUpdateHook();
|
|
2509
|
+
reject(new ErrorResponse(JSON.stringify(response)));
|
|
2526
2510
|
return;
|
|
2527
2511
|
}
|
|
2528
|
-
let
|
|
2512
|
+
let hlResponseData;
|
|
2529
2513
|
try {
|
|
2530
|
-
|
|
2514
|
+
hlResponseData = JSON.parse(response.body.value);
|
|
2531
2515
|
} catch (e) {
|
|
2532
|
-
this.log(LogLevel.ERROR, `Failed to parse response: ${
|
|
2533
|
-
|
|
2516
|
+
this.log(LogLevel.ERROR, `Failed to parse response: ${response.body.value}`);
|
|
2517
|
+
this.log(LogLevel.ERROR, e);
|
|
2518
|
+
reject(e);
|
|
2534
2519
|
return;
|
|
2535
2520
|
}
|
|
2536
|
-
observer
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
if (!response.Message.includes("HighLevelResponse")) {
|
|
2545
|
-
const err2 = new ErrorResponse(resp);
|
|
2546
|
-
this.log(LogLevel.ERROR, `Unexpected response: ${resp.Message}`);
|
|
2521
|
+
const observer = new FrontgateClientEndpointDataObserver(response.header.id_job, hlResponseData);
|
|
2522
|
+
let removeMessageUpdateHook = this.hooks.hook(`frontgateConnection:response:${subscriptionMsg.callbackId}`, (update) => {
|
|
2523
|
+
if (!update.Message.includes("HighLevelUpdate")) {
|
|
2524
|
+
if (update.Message.includes("SubscriptionLoss")) {
|
|
2525
|
+
this.log(LogLevel.DEBUG, `Received: ${update.Message}`);
|
|
2526
|
+
setTimeout(() => {
|
|
2527
|
+
void resubscribe();
|
|
2528
|
+
}, addRandomnessToTime(resubscribeTimeout));
|
|
2547
2529
|
removeMessageUpdateHook();
|
|
2548
|
-
rej(err2);
|
|
2549
2530
|
return;
|
|
2550
2531
|
}
|
|
2551
|
-
this.log(LogLevel.
|
|
2552
|
-
observer.
|
|
2553
|
-
removeMessageUpdateHook
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2532
|
+
this.log(LogLevel.ERROR, `Unexpected response: ${response.Message}`);
|
|
2533
|
+
observer.pushError(new ErrorResponse(JSON.stringify(update)));
|
|
2534
|
+
removeMessageUpdateHook();
|
|
2535
|
+
return;
|
|
2536
|
+
}
|
|
2537
|
+
let hlUpdate;
|
|
2538
|
+
try {
|
|
2539
|
+
hlUpdate = new HighLevelUpdate(update);
|
|
2540
|
+
} catch (e) {
|
|
2541
|
+
this.log(LogLevel.ERROR, `Failed to parse response: ${update.body.value}`);
|
|
2542
|
+
observer.pushError(e);
|
|
2543
|
+
return;
|
|
2544
|
+
}
|
|
2545
|
+
observer.pushPatchData(hlUpdate.data);
|
|
2546
|
+
});
|
|
2547
|
+
const resubscribe = async () => {
|
|
2548
|
+
removeMessageUpdateHook();
|
|
2549
|
+
this.log(LogLevel.INFO, `Resubscribing to ${key} due to reconnect`);
|
|
2550
|
+
await this.hooks.callHook("frontgateConnection:sendMessage", subscriptionMsg);
|
|
2551
|
+
const resubscribePromise = new Promise((res, rej) => {
|
|
2552
|
+
this.hooks.hookOnce(`frontgateConnection:response:${subscriptionMsg.callbackId}`, (resp) => {
|
|
2553
|
+
if (!response.Message.includes("HighLevelResponse")) {
|
|
2554
|
+
const err2 = new ErrorResponse(resp);
|
|
2555
|
+
this.log(LogLevel.ERROR, `Unexpected response: ${resp.Message}`);
|
|
2556
|
+
removeMessageUpdateHook();
|
|
2557
|
+
rej(err2);
|
|
2573
2558
|
return;
|
|
2574
2559
|
}
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
if (
|
|
2580
|
-
this.log(LogLevel.
|
|
2560
|
+
this.log(LogLevel.INFO, `Resubscribed to ${key} with ${resp.header.id_job}`);
|
|
2561
|
+
observer.idJob = resp.header.id_job;
|
|
2562
|
+
removeMessageUpdateHook = this.hooks.hook(`frontgateConnection:response:${resp.header.id_job}`, (update) => {
|
|
2563
|
+
if (!update.Message.includes("HighLevelUpdate")) {
|
|
2564
|
+
if (update.Message.includes("SubscriptionLoss")) {
|
|
2565
|
+
this.log(LogLevel.DEBUG, `Received: ${update.Message}`);
|
|
2566
|
+
setTimeout(() => {
|
|
2567
|
+
void resubscribe();
|
|
2568
|
+
}, addRandomnessToTime(resubscribeTimeout));
|
|
2581
2569
|
return;
|
|
2582
2570
|
}
|
|
2583
|
-
this
|
|
2571
|
+
this.log(LogLevel.ERROR, `Unexpected response: ${update.Message}`);
|
|
2572
|
+
const err2 = new ErrorResponse(update);
|
|
2573
|
+
observer.pushError(err2);
|
|
2574
|
+
return;
|
|
2584
2575
|
}
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2576
|
+
let hlUpdate;
|
|
2577
|
+
try {
|
|
2578
|
+
hlUpdate = new HighLevelUpdate(update);
|
|
2579
|
+
} catch (e) {
|
|
2580
|
+
this.log(LogLevel.ERROR, `Failed to parse response: ${update.body.value}`);
|
|
2581
|
+
observer.pushError(e);
|
|
2582
|
+
return;
|
|
2583
|
+
}
|
|
2584
|
+
observer.unsubscribe = () => {
|
|
2585
|
+
const subscription = this.#subscriptions.get(key);
|
|
2586
|
+
if (subscription) {
|
|
2587
|
+
const subcounts = this.#subscriptionCounts.get(key) ?? 0;
|
|
2588
|
+
this.#subscriptionCounts.set(key, subcounts - 1);
|
|
2589
|
+
if (subcounts - 1 > 0) {
|
|
2590
|
+
this.log(LogLevel.INFO, `Not unsubscribing from ${key} as there are still ${subcounts} subscribers`);
|
|
2591
|
+
return;
|
|
2592
|
+
}
|
|
2593
|
+
this.#subscriptions.delete(key);
|
|
2594
|
+
this.#subscriptionCounts.delete(key);
|
|
2595
|
+
}
|
|
2596
|
+
this.log(LogLevel.INFO, `Unsubscribing from ${key}`);
|
|
2597
|
+
const cancelationRequest = new CancelSubscriptionRequest(observer.idJob);
|
|
2598
|
+
const unsubscribeMsg = {
|
|
2599
|
+
message: cancelationRequest.getPtlMessage(),
|
|
2600
|
+
callbackType: "job",
|
|
2601
|
+
callbackId: ""
|
|
2602
|
+
};
|
|
2603
|
+
void this.hooks.callHook("frontgateConnection:sendMessage", unsubscribeMsg);
|
|
2604
|
+
removeMessageUpdateHook();
|
|
2605
|
+
removeReconnectHook();
|
|
2591
2606
|
};
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
};
|
|
2596
|
-
observer.pushPatchData(hlUpdate.data);
|
|
2607
|
+
observer.pushPatchData(hlUpdate.data);
|
|
2608
|
+
});
|
|
2609
|
+
res();
|
|
2597
2610
|
});
|
|
2598
|
-
res();
|
|
2599
2611
|
});
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
observer.pushError(new ErrorResponse({ Message: "Reconnect failed", Error: e }));
|
|
2605
|
-
}
|
|
2606
|
-
};
|
|
2607
|
-
const removeReconnectHook = this.hooks.hook("reconnect:success", resubscribe);
|
|
2608
|
-
observer.unsubscribe = () => {
|
|
2609
|
-
const subscription = this.#subscriptions.get(key);
|
|
2610
|
-
if (subscription) {
|
|
2611
|
-
subscription.count--;
|
|
2612
|
-
if (subscription.count > 0) {
|
|
2613
|
-
this.log(LogLevel.INFO, `Not unsubscribing from ${key} as there are still ${subscription.count} subscribers`);
|
|
2614
|
-
return;
|
|
2612
|
+
try {
|
|
2613
|
+
await useTimeout(timeOutInMs, "Request timeout reached", resubscribePromise);
|
|
2614
|
+
} catch (e) {
|
|
2615
|
+
observer.pushError(new ErrorResponse({ Message: "Reconnect failed", Error: e }));
|
|
2615
2616
|
}
|
|
2616
|
-
this.#subscriptions.delete(key);
|
|
2617
|
-
}
|
|
2618
|
-
this.log(LogLevel.INFO, `Unsubscribing from ${key}`);
|
|
2619
|
-
const cancelationRequest = new CancelSubscriptionRequest(observer.idJob);
|
|
2620
|
-
const unsubscribeMsg = {
|
|
2621
|
-
message: cancelationRequest.getPtlMessage(),
|
|
2622
|
-
callbackType: "job",
|
|
2623
|
-
callbackId: ""
|
|
2624
2617
|
};
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2618
|
+
const removeReconnectHook = this.hooks.hook("reconnect:success", resubscribe);
|
|
2619
|
+
observer.unsubscribe = () => {
|
|
2620
|
+
const subscription = this.#subscriptions.get(key);
|
|
2621
|
+
if (subscription) {
|
|
2622
|
+
const subcounts = this.#subscriptionCounts.get(key) ?? 0;
|
|
2623
|
+
this.#subscriptionCounts.set(key, subcounts - 1);
|
|
2624
|
+
if (subcounts - 1 > 0) {
|
|
2625
|
+
this.log(LogLevel.INFO, `Not unsubscribing from ${key} as there are still ${subcounts} subscribers`);
|
|
2626
|
+
return;
|
|
2627
|
+
}
|
|
2628
|
+
this.#subscriptions.delete(key);
|
|
2629
|
+
this.#subscriptionCounts.delete(key);
|
|
2630
|
+
}
|
|
2631
|
+
this.log(LogLevel.INFO, `Unsubscribing from ${key}`);
|
|
2632
|
+
const cancelationRequest = new CancelSubscriptionRequest(observer.idJob);
|
|
2633
|
+
const unsubscribeMsg = {
|
|
2634
|
+
message: cancelationRequest.getPtlMessage(),
|
|
2635
|
+
callbackType: "job",
|
|
2636
|
+
callbackId: ""
|
|
2637
|
+
};
|
|
2638
|
+
void this.hooks.callHook("frontgateConnection:sendMessage", unsubscribeMsg);
|
|
2639
|
+
removeMessageUpdateHook();
|
|
2640
|
+
removeReconnectHook();
|
|
2641
|
+
};
|
|
2642
|
+
this.#subscriptions.set(key, observer);
|
|
2643
|
+
const currentSubscounts = this.#subscriptionCounts.get(key) ?? 0;
|
|
2644
|
+
this.#subscriptionCounts.set(key, currentSubscounts + 1);
|
|
2645
|
+
this.#inFlights.delete(key);
|
|
2646
|
+
resolve(observer);
|
|
2647
|
+
});
|
|
2648
|
+
}).catch((e) => {
|
|
2649
|
+
reject(e);
|
|
2631
2650
|
});
|
|
2632
2651
|
});
|
|
2633
2652
|
const rejectReason = `Request timeout reached (${timeOutInMs} ms) for ${subscriptionMsg.message.Message}`;
|
|
2634
|
-
|
|
2653
|
+
const wrappedTimeoutPromise = useTimeout(timeOutInMs, rejectReason, promise);
|
|
2654
|
+
this.#inFlights.set(key, wrappedTimeoutPromise);
|
|
2655
|
+
return wrappedTimeoutPromise;
|
|
2635
2656
|
}
|
|
2636
2657
|
};
|
|
2637
2658
|
};
|
|
@@ -2691,17 +2712,17 @@
|
|
|
2691
2712
|
this.log(LogLevel.INFO, `Resubscribing to ${key} due to reconnect`);
|
|
2692
2713
|
await this.hooks.callHook("frontgateConnection:sendMessage", subscriptionMsg);
|
|
2693
2714
|
const resubscribePromise = new Promise((res, rej) => {
|
|
2694
|
-
this.hooks.hookOnce(`frontgateConnection:response:${subscriptionMsg.callbackId}`, (
|
|
2695
|
-
if (
|
|
2696
|
-
const err2 = new ErrorResponse(
|
|
2697
|
-
this.log(LogLevel.ERROR, `Unexpected resp: ${
|
|
2715
|
+
this.hooks.hookOnce(`frontgateConnection:response:${subscriptionMsg.callbackId}`, (resubscribeResponse) => {
|
|
2716
|
+
if (resubscribeResponse.Message.includes("Error") || resubscribeResponse.Message.includes("PermissionDenied")) {
|
|
2717
|
+
const err2 = new ErrorResponse(resubscribeResponse);
|
|
2718
|
+
this.log(LogLevel.ERROR, `Unexpected resp: ${resubscribeResponse.Message}`);
|
|
2698
2719
|
rej(err2);
|
|
2699
2720
|
return;
|
|
2700
2721
|
}
|
|
2701
|
-
const
|
|
2702
|
-
const
|
|
2703
|
-
observer.idJob =
|
|
2704
|
-
removeMessageUpdateHook = this.hooks.hook(`frontgateConnection:response:${
|
|
2722
|
+
const resubscriptionKey = subscriptionType === "connection" ? `${resubscribeResponse.header.id_service}-${request.getPtlMessage().id_notation}` : resubscribeResponse.header.id_job;
|
|
2723
|
+
const resubscriptionCancelationRequest = typeof CancelationRequestConstructor === "undefined" ? new CancelSubscriptionRequest(resubscribeResponse.header.id_job) : new CancelationRequestConstructor(resubscribeResponse.header.id_service, request.getPtlMessage().id_notation);
|
|
2724
|
+
observer.idJob = resubscribeResponse.header.id_job;
|
|
2725
|
+
removeMessageUpdateHook = this.hooks.hook(`frontgateConnection:response:${resubscriptionKey}`, (update) => {
|
|
2705
2726
|
if (update.Message.includes("Error") || update.Message.includes("PermissionDenied")) {
|
|
2706
2727
|
this.log(LogLevel.ERROR, `Unexpected response: ${update.Message}`);
|
|
2707
2728
|
const err2 = new ErrorResponse(update);
|
|
@@ -2720,7 +2741,7 @@
|
|
|
2720
2741
|
}
|
|
2721
2742
|
this.log(LogLevel.INFO, `Unsubscribing from ${key}`);
|
|
2722
2743
|
const unsubscribeMsg = {
|
|
2723
|
-
message:
|
|
2744
|
+
message: resubscriptionCancelationRequest.getPtlMessage(),
|
|
2724
2745
|
callbackType: "job",
|
|
2725
2746
|
callbackId: ""
|
|
2726
2747
|
};
|
|
@@ -2943,8 +2964,8 @@
|
|
|
2943
2964
|
};
|
|
2944
2965
|
this.hooks.hook("frontgateConnection:connected", authFn);
|
|
2945
2966
|
}
|
|
2946
|
-
set token(
|
|
2947
|
-
this.#token =
|
|
2967
|
+
set token(newToken) {
|
|
2968
|
+
this.#token = newToken;
|
|
2948
2969
|
}
|
|
2949
2970
|
};
|
|
2950
2971
|
};
|
|
@@ -2976,7 +2997,7 @@
|
|
|
2976
2997
|
void this.hooks.callHook("frontgateConnection:setIdUser", ID_USER_AUTHENTICATED);
|
|
2977
2998
|
this.log(LogLevel.DEBUG, "Fetching connection configuration");
|
|
2978
2999
|
const fetchConfig = await this.#fetchConnectionConfiguration();
|
|
2979
|
-
this.log(LogLevel.DEBUG, "Connection configuration received",
|
|
3000
|
+
this.log(LogLevel.DEBUG, "Connection configuration received", fetchConfig);
|
|
2980
3001
|
settings.url = fetchConfig.url;
|
|
2981
3002
|
if (fetchConfig.authtenticationType === "token" && fetchConfig.authenticationToken) {
|
|
2982
3003
|
this.#token = fetchConfig.authenticationToken;
|
|
@@ -3249,7 +3270,7 @@
|
|
|
3249
3270
|
};
|
|
3250
3271
|
var DiagComponentLogger = (
|
|
3251
3272
|
/** @class */
|
|
3252
|
-
function() {
|
|
3273
|
+
(function() {
|
|
3253
3274
|
function DiagComponentLogger2(props) {
|
|
3254
3275
|
this._namespace = props.namespace || "DiagComponentLogger";
|
|
3255
3276
|
}
|
|
@@ -3289,7 +3310,7 @@
|
|
|
3289
3310
|
return logProxy("verbose", this._namespace, args);
|
|
3290
3311
|
};
|
|
3291
3312
|
return DiagComponentLogger2;
|
|
3292
|
-
}()
|
|
3313
|
+
})()
|
|
3293
3314
|
);
|
|
3294
3315
|
function logProxy(funcName, namespace, args) {
|
|
3295
3316
|
var logger2 = getGlobal("diag");
|
|
@@ -3361,7 +3382,7 @@
|
|
|
3361
3382
|
var API_NAME$4 = "diag";
|
|
3362
3383
|
var DiagAPI = (
|
|
3363
3384
|
/** @class */
|
|
3364
|
-
function() {
|
|
3385
|
+
(function() {
|
|
3365
3386
|
function DiagAPI2() {
|
|
3366
3387
|
function _logProxy(funcName) {
|
|
3367
3388
|
return function() {
|
|
@@ -3420,7 +3441,7 @@
|
|
|
3420
3441
|
return this._instance;
|
|
3421
3442
|
};
|
|
3422
3443
|
return DiagAPI2;
|
|
3423
|
-
}()
|
|
3444
|
+
})()
|
|
3424
3445
|
);
|
|
3425
3446
|
var __read$2 = function(o, n) {
|
|
3426
3447
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -3452,7 +3473,7 @@
|
|
|
3452
3473
|
};
|
|
3453
3474
|
var BaggageImpl = (
|
|
3454
3475
|
/** @class */
|
|
3455
|
-
function() {
|
|
3476
|
+
(function() {
|
|
3456
3477
|
function BaggageImpl2(entries) {
|
|
3457
3478
|
this._entries = entries ? new Map(entries) : /* @__PURE__ */ new Map();
|
|
3458
3479
|
}
|
|
@@ -3506,7 +3527,7 @@
|
|
|
3506
3527
|
return new BaggageImpl2();
|
|
3507
3528
|
};
|
|
3508
3529
|
return BaggageImpl2;
|
|
3509
|
-
}()
|
|
3530
|
+
})()
|
|
3510
3531
|
);
|
|
3511
3532
|
DiagAPI.instance();
|
|
3512
3533
|
function createBaggage(entries) {
|
|
@@ -3520,7 +3541,7 @@
|
|
|
3520
3541
|
}
|
|
3521
3542
|
var BaseContext = (
|
|
3522
3543
|
/** @class */
|
|
3523
|
-
/* @__PURE__ */ function() {
|
|
3544
|
+
/* @__PURE__ */ (function() {
|
|
3524
3545
|
function BaseContext2(parentContext) {
|
|
3525
3546
|
var self2 = this;
|
|
3526
3547
|
self2._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();
|
|
@@ -3539,10 +3560,10 @@
|
|
|
3539
3560
|
};
|
|
3540
3561
|
}
|
|
3541
3562
|
return BaseContext2;
|
|
3542
|
-
}()
|
|
3563
|
+
})()
|
|
3543
3564
|
);
|
|
3544
3565
|
var ROOT_CONTEXT = new BaseContext();
|
|
3545
|
-
var __extends = /* @__PURE__ */ function() {
|
|
3566
|
+
var __extends = /* @__PURE__ */ (function() {
|
|
3546
3567
|
var extendStatics = function(d, b) {
|
|
3547
3568
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
3548
3569
|
d2.__proto__ = b2;
|
|
@@ -3560,10 +3581,10 @@
|
|
|
3560
3581
|
}
|
|
3561
3582
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
3562
3583
|
};
|
|
3563
|
-
}();
|
|
3584
|
+
})();
|
|
3564
3585
|
var NoopMeter = (
|
|
3565
3586
|
/** @class */
|
|
3566
|
-
function() {
|
|
3587
|
+
(function() {
|
|
3567
3588
|
function NoopMeter2() {
|
|
3568
3589
|
}
|
|
3569
3590
|
NoopMeter2.prototype.createGauge = function(_name, _options) {
|
|
@@ -3592,19 +3613,19 @@
|
|
|
3592
3613
|
NoopMeter2.prototype.removeBatchObservableCallback = function(_callback) {
|
|
3593
3614
|
};
|
|
3594
3615
|
return NoopMeter2;
|
|
3595
|
-
}()
|
|
3616
|
+
})()
|
|
3596
3617
|
);
|
|
3597
3618
|
var NoopMetric = (
|
|
3598
3619
|
/** @class */
|
|
3599
|
-
/* @__PURE__ */ function() {
|
|
3620
|
+
/* @__PURE__ */ (function() {
|
|
3600
3621
|
function NoopMetric2() {
|
|
3601
3622
|
}
|
|
3602
3623
|
return NoopMetric2;
|
|
3603
|
-
}()
|
|
3624
|
+
})()
|
|
3604
3625
|
);
|
|
3605
3626
|
var NoopCounterMetric = (
|
|
3606
3627
|
/** @class */
|
|
3607
|
-
function(_super) {
|
|
3628
|
+
(function(_super) {
|
|
3608
3629
|
__extends(NoopCounterMetric2, _super);
|
|
3609
3630
|
function NoopCounterMetric2() {
|
|
3610
3631
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -3612,11 +3633,11 @@
|
|
|
3612
3633
|
NoopCounterMetric2.prototype.add = function(_value, _attributes) {
|
|
3613
3634
|
};
|
|
3614
3635
|
return NoopCounterMetric2;
|
|
3615
|
-
}(NoopMetric)
|
|
3636
|
+
})(NoopMetric)
|
|
3616
3637
|
);
|
|
3617
3638
|
var NoopUpDownCounterMetric = (
|
|
3618
3639
|
/** @class */
|
|
3619
|
-
function(_super) {
|
|
3640
|
+
(function(_super) {
|
|
3620
3641
|
__extends(NoopUpDownCounterMetric2, _super);
|
|
3621
3642
|
function NoopUpDownCounterMetric2() {
|
|
3622
3643
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -3624,11 +3645,11 @@
|
|
|
3624
3645
|
NoopUpDownCounterMetric2.prototype.add = function(_value, _attributes) {
|
|
3625
3646
|
};
|
|
3626
3647
|
return NoopUpDownCounterMetric2;
|
|
3627
|
-
}(NoopMetric)
|
|
3648
|
+
})(NoopMetric)
|
|
3628
3649
|
);
|
|
3629
3650
|
var NoopGaugeMetric = (
|
|
3630
3651
|
/** @class */
|
|
3631
|
-
function(_super) {
|
|
3652
|
+
(function(_super) {
|
|
3632
3653
|
__extends(NoopGaugeMetric2, _super);
|
|
3633
3654
|
function NoopGaugeMetric2() {
|
|
3634
3655
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -3636,11 +3657,11 @@
|
|
|
3636
3657
|
NoopGaugeMetric2.prototype.record = function(_value, _attributes) {
|
|
3637
3658
|
};
|
|
3638
3659
|
return NoopGaugeMetric2;
|
|
3639
|
-
}(NoopMetric)
|
|
3660
|
+
})(NoopMetric)
|
|
3640
3661
|
);
|
|
3641
3662
|
var NoopHistogramMetric = (
|
|
3642
3663
|
/** @class */
|
|
3643
|
-
function(_super) {
|
|
3664
|
+
(function(_super) {
|
|
3644
3665
|
__extends(NoopHistogramMetric2, _super);
|
|
3645
3666
|
function NoopHistogramMetric2() {
|
|
3646
3667
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
@@ -3648,11 +3669,11 @@
|
|
|
3648
3669
|
NoopHistogramMetric2.prototype.record = function(_value, _attributes) {
|
|
3649
3670
|
};
|
|
3650
3671
|
return NoopHistogramMetric2;
|
|
3651
|
-
}(NoopMetric)
|
|
3672
|
+
})(NoopMetric)
|
|
3652
3673
|
);
|
|
3653
3674
|
var NoopObservableMetric = (
|
|
3654
3675
|
/** @class */
|
|
3655
|
-
function() {
|
|
3676
|
+
(function() {
|
|
3656
3677
|
function NoopObservableMetric2() {
|
|
3657
3678
|
}
|
|
3658
3679
|
NoopObservableMetric2.prototype.addCallback = function(_callback) {
|
|
@@ -3660,37 +3681,37 @@
|
|
|
3660
3681
|
NoopObservableMetric2.prototype.removeCallback = function(_callback) {
|
|
3661
3682
|
};
|
|
3662
3683
|
return NoopObservableMetric2;
|
|
3663
|
-
}()
|
|
3684
|
+
})()
|
|
3664
3685
|
);
|
|
3665
3686
|
var NoopObservableCounterMetric = (
|
|
3666
3687
|
/** @class */
|
|
3667
|
-
function(_super) {
|
|
3688
|
+
(function(_super) {
|
|
3668
3689
|
__extends(NoopObservableCounterMetric2, _super);
|
|
3669
3690
|
function NoopObservableCounterMetric2() {
|
|
3670
3691
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3671
3692
|
}
|
|
3672
3693
|
return NoopObservableCounterMetric2;
|
|
3673
|
-
}(NoopObservableMetric)
|
|
3694
|
+
})(NoopObservableMetric)
|
|
3674
3695
|
);
|
|
3675
3696
|
var NoopObservableGaugeMetric = (
|
|
3676
3697
|
/** @class */
|
|
3677
|
-
function(_super) {
|
|
3698
|
+
(function(_super) {
|
|
3678
3699
|
__extends(NoopObservableGaugeMetric2, _super);
|
|
3679
3700
|
function NoopObservableGaugeMetric2() {
|
|
3680
3701
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3681
3702
|
}
|
|
3682
3703
|
return NoopObservableGaugeMetric2;
|
|
3683
|
-
}(NoopObservableMetric)
|
|
3704
|
+
})(NoopObservableMetric)
|
|
3684
3705
|
);
|
|
3685
3706
|
var NoopObservableUpDownCounterMetric = (
|
|
3686
3707
|
/** @class */
|
|
3687
|
-
function(_super) {
|
|
3708
|
+
(function(_super) {
|
|
3688
3709
|
__extends(NoopObservableUpDownCounterMetric2, _super);
|
|
3689
3710
|
function NoopObservableUpDownCounterMetric2() {
|
|
3690
3711
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
3691
3712
|
}
|
|
3692
3713
|
return NoopObservableUpDownCounterMetric2;
|
|
3693
|
-
}(NoopObservableMetric)
|
|
3714
|
+
})(NoopObservableMetric)
|
|
3694
3715
|
);
|
|
3695
3716
|
var NOOP_METER = new NoopMeter();
|
|
3696
3717
|
var NOOP_COUNTER_METRIC = new NoopCounterMetric();
|
|
@@ -3750,7 +3771,7 @@
|
|
|
3750
3771
|
};
|
|
3751
3772
|
var NoopContextManager = (
|
|
3752
3773
|
/** @class */
|
|
3753
|
-
function() {
|
|
3774
|
+
(function() {
|
|
3754
3775
|
function NoopContextManager2() {
|
|
3755
3776
|
}
|
|
3756
3777
|
NoopContextManager2.prototype.active = function() {
|
|
@@ -3773,7 +3794,7 @@
|
|
|
3773
3794
|
return this;
|
|
3774
3795
|
};
|
|
3775
3796
|
return NoopContextManager2;
|
|
3776
|
-
}()
|
|
3797
|
+
})()
|
|
3777
3798
|
);
|
|
3778
3799
|
var __read = function(o, n) {
|
|
3779
3800
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
@@ -3805,7 +3826,7 @@
|
|
|
3805
3826
|
var NOOP_CONTEXT_MANAGER = new NoopContextManager();
|
|
3806
3827
|
var ContextAPI = (
|
|
3807
3828
|
/** @class */
|
|
3808
|
-
function() {
|
|
3829
|
+
(function() {
|
|
3809
3830
|
function ContextAPI2() {
|
|
3810
3831
|
}
|
|
3811
3832
|
ContextAPI2.getInstance = function() {
|
|
@@ -3839,7 +3860,7 @@
|
|
|
3839
3860
|
unregisterGlobal(API_NAME$3, DiagAPI.instance());
|
|
3840
3861
|
};
|
|
3841
3862
|
return ContextAPI2;
|
|
3842
|
-
}()
|
|
3863
|
+
})()
|
|
3843
3864
|
);
|
|
3844
3865
|
var TraceFlags;
|
|
3845
3866
|
(function(TraceFlags2) {
|
|
@@ -3855,7 +3876,7 @@
|
|
|
3855
3876
|
};
|
|
3856
3877
|
var NonRecordingSpan = (
|
|
3857
3878
|
/** @class */
|
|
3858
|
-
function() {
|
|
3879
|
+
(function() {
|
|
3859
3880
|
function NonRecordingSpan2(_spanContext) {
|
|
3860
3881
|
if (_spanContext === void 0) {
|
|
3861
3882
|
_spanContext = INVALID_SPAN_CONTEXT;
|
|
@@ -3894,7 +3915,7 @@
|
|
|
3894
3915
|
NonRecordingSpan2.prototype.recordException = function(_exception, _time) {
|
|
3895
3916
|
};
|
|
3896
3917
|
return NonRecordingSpan2;
|
|
3897
|
-
}()
|
|
3918
|
+
})()
|
|
3898
3919
|
);
|
|
3899
3920
|
var SPAN_KEY = createContextKey("OpenTelemetry Context Key SPAN");
|
|
3900
3921
|
function getSpan(context) {
|
|
@@ -3933,7 +3954,7 @@
|
|
|
3933
3954
|
var contextApi = ContextAPI.getInstance();
|
|
3934
3955
|
var NoopTracer = (
|
|
3935
3956
|
/** @class */
|
|
3936
|
-
function() {
|
|
3957
|
+
(function() {
|
|
3937
3958
|
function NoopTracer2() {
|
|
3938
3959
|
}
|
|
3939
3960
|
NoopTracer2.prototype.startSpan = function(name, options, context) {
|
|
@@ -3973,7 +3994,7 @@
|
|
|
3973
3994
|
return contextApi.with(contextWithSpanSet, fn, void 0, span);
|
|
3974
3995
|
};
|
|
3975
3996
|
return NoopTracer2;
|
|
3976
|
-
}()
|
|
3997
|
+
})()
|
|
3977
3998
|
);
|
|
3978
3999
|
function isSpanContext(spanContext) {
|
|
3979
4000
|
return typeof spanContext === "object" && typeof spanContext["spanId"] === "string" && typeof spanContext["traceId"] === "string" && typeof spanContext["traceFlags"] === "number";
|
|
@@ -3981,7 +4002,7 @@
|
|
|
3981
4002
|
var NOOP_TRACER = new NoopTracer();
|
|
3982
4003
|
var ProxyTracer = (
|
|
3983
4004
|
/** @class */
|
|
3984
|
-
function() {
|
|
4005
|
+
(function() {
|
|
3985
4006
|
function ProxyTracer2(_provider, name, version, options) {
|
|
3986
4007
|
this._provider = _provider;
|
|
3987
4008
|
this.name = name;
|
|
@@ -4007,23 +4028,23 @@
|
|
|
4007
4028
|
return this._delegate;
|
|
4008
4029
|
};
|
|
4009
4030
|
return ProxyTracer2;
|
|
4010
|
-
}()
|
|
4031
|
+
})()
|
|
4011
4032
|
);
|
|
4012
4033
|
var NoopTracerProvider = (
|
|
4013
4034
|
/** @class */
|
|
4014
|
-
function() {
|
|
4035
|
+
(function() {
|
|
4015
4036
|
function NoopTracerProvider2() {
|
|
4016
4037
|
}
|
|
4017
4038
|
NoopTracerProvider2.prototype.getTracer = function(_name, _version, _options) {
|
|
4018
4039
|
return new NoopTracer();
|
|
4019
4040
|
};
|
|
4020
4041
|
return NoopTracerProvider2;
|
|
4021
|
-
}()
|
|
4042
|
+
})()
|
|
4022
4043
|
);
|
|
4023
4044
|
var NOOP_TRACER_PROVIDER = new NoopTracerProvider();
|
|
4024
4045
|
var ProxyTracerProvider = (
|
|
4025
4046
|
/** @class */
|
|
4026
|
-
function() {
|
|
4047
|
+
(function() {
|
|
4027
4048
|
function ProxyTracerProvider2() {
|
|
4028
4049
|
}
|
|
4029
4050
|
ProxyTracerProvider2.prototype.getTracer = function(name, version, options) {
|
|
@@ -4042,26 +4063,26 @@
|
|
|
4042
4063
|
return (_a2 = this._delegate) === null || _a2 === void 0 ? void 0 : _a2.getTracer(name, version, options);
|
|
4043
4064
|
};
|
|
4044
4065
|
return ProxyTracerProvider2;
|
|
4045
|
-
}()
|
|
4066
|
+
})()
|
|
4046
4067
|
);
|
|
4047
4068
|
ContextAPI.getInstance();
|
|
4048
4069
|
DiagAPI.instance();
|
|
4049
4070
|
var NoopMeterProvider = (
|
|
4050
4071
|
/** @class */
|
|
4051
|
-
function() {
|
|
4072
|
+
(function() {
|
|
4052
4073
|
function NoopMeterProvider2() {
|
|
4053
4074
|
}
|
|
4054
4075
|
NoopMeterProvider2.prototype.getMeter = function(_name, _version, _options) {
|
|
4055
4076
|
return NOOP_METER;
|
|
4056
4077
|
};
|
|
4057
4078
|
return NoopMeterProvider2;
|
|
4058
|
-
}()
|
|
4079
|
+
})()
|
|
4059
4080
|
);
|
|
4060
4081
|
var NOOP_METER_PROVIDER = new NoopMeterProvider();
|
|
4061
4082
|
var API_NAME$2 = "metrics";
|
|
4062
4083
|
var MetricsAPI = (
|
|
4063
4084
|
/** @class */
|
|
4064
|
-
function() {
|
|
4085
|
+
(function() {
|
|
4065
4086
|
function MetricsAPI2() {
|
|
4066
4087
|
}
|
|
4067
4088
|
MetricsAPI2.getInstance = function() {
|
|
@@ -4083,12 +4104,12 @@
|
|
|
4083
4104
|
unregisterGlobal(API_NAME$2, DiagAPI.instance());
|
|
4084
4105
|
};
|
|
4085
4106
|
return MetricsAPI2;
|
|
4086
|
-
}()
|
|
4107
|
+
})()
|
|
4087
4108
|
);
|
|
4088
4109
|
MetricsAPI.getInstance();
|
|
4089
4110
|
var NoopTextMapPropagator = (
|
|
4090
4111
|
/** @class */
|
|
4091
|
-
function() {
|
|
4112
|
+
(function() {
|
|
4092
4113
|
function NoopTextMapPropagator2() {
|
|
4093
4114
|
}
|
|
4094
4115
|
NoopTextMapPropagator2.prototype.inject = function(_context, _carrier) {
|
|
@@ -4100,7 +4121,7 @@
|
|
|
4100
4121
|
return [];
|
|
4101
4122
|
};
|
|
4102
4123
|
return NoopTextMapPropagator2;
|
|
4103
|
-
}()
|
|
4124
|
+
})()
|
|
4104
4125
|
);
|
|
4105
4126
|
var BAGGAGE_KEY = createContextKey("OpenTelemetry Baggage Key");
|
|
4106
4127
|
function getBaggage(context) {
|
|
@@ -4119,7 +4140,7 @@
|
|
|
4119
4140
|
var NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();
|
|
4120
4141
|
var PropagationAPI = (
|
|
4121
4142
|
/** @class */
|
|
4122
|
-
function() {
|
|
4143
|
+
(function() {
|
|
4123
4144
|
function PropagationAPI2() {
|
|
4124
4145
|
this.createBaggage = createBaggage;
|
|
4125
4146
|
this.getBaggage = getBaggage;
|
|
@@ -4158,13 +4179,13 @@
|
|
|
4158
4179
|
return getGlobal(API_NAME$1) || NOOP_TEXT_MAP_PROPAGATOR;
|
|
4159
4180
|
};
|
|
4160
4181
|
return PropagationAPI2;
|
|
4161
|
-
}()
|
|
4182
|
+
})()
|
|
4162
4183
|
);
|
|
4163
4184
|
PropagationAPI.getInstance();
|
|
4164
4185
|
var API_NAME = "trace";
|
|
4165
4186
|
var TraceAPI = (
|
|
4166
4187
|
/** @class */
|
|
4167
|
-
function() {
|
|
4188
|
+
(function() {
|
|
4168
4189
|
function TraceAPI2() {
|
|
4169
4190
|
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
4170
4191
|
this.wrapSpanContext = wrapSpanContext;
|
|
@@ -4200,7 +4221,7 @@
|
|
|
4200
4221
|
this._proxyTracerProvider = new ProxyTracerProvider();
|
|
4201
4222
|
};
|
|
4202
4223
|
return TraceAPI2;
|
|
4203
|
-
}()
|
|
4224
|
+
})()
|
|
4204
4225
|
);
|
|
4205
4226
|
var trace = TraceAPI.getInstance();
|
|
4206
4227
|
const openTelemetry = () => {
|
|
@@ -4260,13 +4281,13 @@
|
|
|
4260
4281
|
const mixinHTTPProxyRequestable = (Base) => {
|
|
4261
4282
|
return class extends Base {
|
|
4262
4283
|
async requestProxyEndpoint(method, path, body, options, timeOutInMs = this.defaultTimeoutInMs) {
|
|
4263
|
-
const
|
|
4284
|
+
const request = new HTTPProxyRequest(method, path, options);
|
|
4264
4285
|
if (body) {
|
|
4265
|
-
|
|
4286
|
+
request.setBody(body);
|
|
4266
4287
|
}
|
|
4267
|
-
|
|
4288
|
+
request.header.setTimeout(timeOutInMs);
|
|
4268
4289
|
const msg = {
|
|
4269
|
-
message:
|
|
4290
|
+
message: request.getPtlMessage(),
|
|
4270
4291
|
callbackType: "job",
|
|
4271
4292
|
callbackId: ""
|
|
4272
4293
|
};
|
|
@@ -4805,4 +4826,4 @@
|
|
|
4805
4826
|
exports2.useTimeout = useTimeout;
|
|
4806
4827
|
exports2.wsConnection = wsConnection;
|
|
4807
4828
|
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
|
|
4808
|
-
});
|
|
4829
|
+
}));
|