perimeterx-js-core 0.24.3 → 0.25.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/lib/cjs/action/ActionPriorityOrder.js +1 -1
- package/lib/cjs/action/index.js +6 -6
- package/lib/cjs/action/utils.js +3 -3
- package/lib/cjs/activities/HttpActivityClient.js +6 -6
- package/lib/cjs/activities/HttpBatchedActivityClient.js +1 -1
- package/lib/cjs/activities/index.js +7 -7
- package/lib/cjs/activities/model/index.js +4 -4
- package/lib/cjs/activities/utils.js +5 -5
- package/lib/cjs/additional_activity_handler/index.js +2 -2
- package/lib/cjs/blocker/BlockerBase.js +1 -1
- package/lib/cjs/blocker/JsonBlockerBase.js +2 -2
- package/lib/cjs/blocker/MobileBlocker.js +3 -3
- package/lib/cjs/blocker/index.js +7 -7
- package/lib/cjs/blocker/model/BlockActionToWordMap.js +1 -1
- package/lib/cjs/blocker/model/index.js +3 -3
- package/lib/cjs/blocker/utils.js +1 -1
- package/lib/cjs/config/ConfigurationBase.js +14 -11
- package/lib/cjs/config/defaults/DefaultConfigurationParams.js +4 -4
- package/lib/cjs/config/defaults/index.js +1 -1
- package/lib/cjs/config/index.js +6 -7
- package/lib/cjs/config/params/index.js +5 -5
- package/lib/cjs/config/remote_config/RemoteConfigUtils.js +15 -5
- package/lib/cjs/config/remote_config/index.js +7 -7
- package/lib/cjs/config/remote_config/manager/DefaultRemoteConfigManager.js +191 -0
- package/lib/cjs/config/remote_config/manager/index.js +18 -0
- package/lib/cjs/config/remote_config/model/index.js +2 -2
- package/lib/cjs/config/remote_config/service_client/HttpRemoteConfigServiceClient.js +2 -2
- package/lib/cjs/config/remote_config/service_client/index.js +2 -2
- package/lib/cjs/config/remote_config/storage_client/index.js +1 -1
- package/lib/cjs/config/remote_config/update_parser/DefaultNotifyRemoteConfigUpdateParser.js +139 -0
- package/lib/cjs/config/remote_config/update_parser/IRemoteConfigUpdateParser.js +2 -0
- package/lib/cjs/config/remote_config/update_parser/index.js +18 -0
- package/lib/cjs/context/DefaultContext.js +30 -12
- package/lib/cjs/context/SerializedContext.js +4 -4
- package/lib/cjs/context/index.js +4 -4
- package/lib/cjs/context/interfaces/RemoteConfigUpdateData.js +2 -0
- package/lib/cjs/context/interfaces/index.js +9 -8
- package/lib/cjs/cors/DefaultCors.js +2 -2
- package/lib/cjs/cors/index.js +2 -2
- package/lib/cjs/custom_parameters/CustomParameters.js +1 -1
- package/lib/cjs/custom_parameters/CustomParametersUtils.js +1 -1
- package/lib/cjs/custom_parameters/index.js +1 -1
- package/lib/cjs/enforcer/EnforcerBase.js +18 -12
- package/lib/cjs/enforcer/index.js +4 -4
- package/lib/cjs/enforcer/utils.js +46 -50
- package/lib/cjs/filter/index.js +2 -2
- package/lib/cjs/first_party/index.js +2 -2
- package/lib/cjs/graphql/DefaultGraphQLParser.js +3 -3
- package/lib/cjs/graphql/index.js +4 -4
- package/lib/cjs/graphql/model/index.js +3 -3
- package/lib/cjs/http/index.js +2 -2
- package/lib/cjs/http/interfaces/index.js +10 -10
- package/lib/cjs/http/utils/MinimalResponseUtils.js +1 -1
- package/lib/cjs/http/utils/MultipartFormDataUtils.js +1 -1
- package/lib/cjs/http/utils/OutgoingRequestImpl.js +1 -1
- package/lib/cjs/http/utils/index.js +8 -8
- package/lib/cjs/impl/cipher/CryptoCipherUtils.js +1 -1
- package/lib/cjs/impl/hash/CryptoHashUtils.js +1 -1
- package/lib/cjs/impl/hash/CryptoJSHashUtils.js +1 -1
- package/lib/cjs/impl/hash/SubtleCryptoHashUtils.js +1 -1
- package/lib/cjs/impl/hmac/CryptoHmacUtils.js +1 -1
- package/lib/cjs/impl/hmac/CryptoJSHmacUtils.js +1 -1
- package/lib/cjs/impl/hmac/SubtleCryptoHmacUtils.js +1 -1
- package/lib/cjs/impl/http/phin/PhinHttpClient.js +3 -3
- package/lib/cjs/impl/http/phin/PhinIncomingResponse.js +3 -3
- package/lib/cjs/impl/http/phin/index.js +2 -2
- package/lib/cjs/impl/url/CustomImplUrlUtils.js +3 -3
- package/lib/cjs/impl/url/DefaultUrlUtils.js +1 -1
- package/lib/cjs/impl/url/UrlImpl.js +3 -3
- package/lib/cjs/index.js +25 -25
- package/lib/cjs/logger/DefaultLogger.js +1 -1
- package/lib/cjs/logger/HttpLogServiceClient.js +3 -3
- package/lib/cjs/logger/LoggerBase.js +1 -1
- package/lib/cjs/logger/index.js +6 -6
- package/lib/cjs/logger/model/index.js +3 -3
- package/lib/cjs/monitored_request/MonitoredRequestUtils.js +1 -1
- package/lib/cjs/monitored_request/index.js +1 -1
- package/lib/cjs/phase/flow/EndEnforcerFlow.js +7 -5
- package/lib/cjs/phase/flow/EnforceFlow.js +2 -2
- package/lib/cjs/phase/flow/FilterFlow.js +6 -7
- package/lib/cjs/phase/flow/PostEnforceFlow.js +1 -1
- package/lib/cjs/phase/flow/index.js +4 -4
- package/lib/cjs/phase/impl/AdditionalActivityHandlerPhase.js +1 -1
- package/lib/cjs/phase/impl/CreateBlockResponsePhase.js +4 -4
- package/lib/cjs/phase/impl/DecideActionPhase.js +3 -3
- package/lib/cjs/phase/impl/EnrichContextFromRequestPhase.js +2 -2
- package/lib/cjs/phase/impl/EnrichContextFromResponsePhase.js +1 -1
- package/lib/cjs/phase/impl/FirstPartyPhase.js +1 -1
- package/lib/cjs/phase/impl/IdentifyRemoteConfigNotifyRequestPhase.js +75 -0
- package/lib/cjs/phase/impl/ModifyOutgoingResponsePhase.js +2 -2
- package/lib/cjs/phase/impl/ParseTokenPhase.js +2 -2
- package/lib/cjs/phase/impl/RiskApiPhase.js +4 -4
- package/lib/cjs/phase/impl/SendAsyncActivitiesOnRequestPhase.js +1 -1
- package/lib/cjs/phase/impl/UpdateRemoteConfigPhase.js +7 -14
- package/lib/cjs/phase/impl/index.js +21 -20
- package/lib/cjs/phase/index.js +4 -4
- package/lib/cjs/products/account_defender/AccountDefender.js +2 -2
- package/lib/cjs/products/account_defender/index.js +5 -5
- package/lib/cjs/products/bot_defender/BotDefender.js +12 -12
- package/lib/cjs/products/bot_defender/BotDefenderUtils.js +2 -2
- package/lib/cjs/products/bot_defender/block/DefaultBotDefenderBlocker.js +6 -6
- package/lib/cjs/products/bot_defender/block/captcha/CaptchaBlocker.js +3 -3
- package/lib/cjs/products/bot_defender/block/captcha/HtmlCaptchaBlocker.js +3 -3
- package/lib/cjs/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +1 -1
- package/lib/cjs/products/bot_defender/block/captcha/MobileCaptchaBlocker.js +2 -2
- package/lib/cjs/products/bot_defender/block/captcha/index.js +4 -4
- package/lib/cjs/products/bot_defender/block/index.js +5 -5
- package/lib/cjs/products/bot_defender/block/model/index.js +2 -2
- package/lib/cjs/products/bot_defender/block/templates/index.js +2 -2
- package/lib/cjs/products/bot_defender/filter/DefaultBotDefenderFilter.js +3 -3
- package/lib/cjs/products/bot_defender/filter/index.js +1 -1
- package/lib/cjs/products/bot_defender/first_party/DefaultBotDefenderFirstParty.js +5 -5
- package/lib/cjs/products/bot_defender/first_party/constants.js +1 -1
- package/lib/cjs/products/bot_defender/first_party/index.js +4 -4
- package/lib/cjs/products/bot_defender/first_party/utils.js +1 -1
- package/lib/cjs/products/bot_defender/index.js +9 -9
- package/lib/cjs/products/bot_defender/reasons/index.js +4 -4
- package/lib/cjs/products/credential_intelligence/CredentialIntelligence.js +4 -4
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.js +2 -2
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.js +6 -6
- package/lib/cjs/products/credential_intelligence/endpoint/extractor/index.js +5 -5
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceHashProtocolFactory.js +4 -4
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.js +3 -3
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.js +2 -2
- package/lib/cjs/products/credential_intelligence/endpoint/hash_protocol/index.js +7 -7
- package/lib/cjs/products/credential_intelligence/endpoint/index.js +8 -8
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.js +1 -1
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.js +6 -6
- package/lib/cjs/products/credential_intelligence/endpoint/login_successful/index.js +8 -8
- package/lib/cjs/products/credential_intelligence/endpoint/matcher/CredentialIntelligenceEndpointMatcherFactory.js +3 -3
- package/lib/cjs/products/credential_intelligence/endpoint/matcher/index.js +5 -5
- package/lib/cjs/products/credential_intelligence/index.js +5 -5
- package/lib/cjs/products/credential_intelligence/model/index.js +4 -4
- package/lib/cjs/products/hype_sale_challenge/HypeSaleChallenge.js +6 -6
- package/lib/cjs/products/hype_sale_challenge/block/JsonHypeSaleChallengeBlocker.js +2 -2
- package/lib/cjs/products/hype_sale_challenge/block/MobileHypeSaleChallengeBlocker.js +2 -2
- package/lib/cjs/products/hype_sale_challenge/block/index.js +3 -3
- package/lib/cjs/products/hype_sale_challenge/block/templates/index.js +1 -1
- package/lib/cjs/products/hype_sale_challenge/index.js +5 -5
- package/lib/cjs/products/hype_sale_challenge/model/index.js +2 -2
- package/lib/cjs/products/hype_sale_challenge/utils.js +1 -1
- package/lib/cjs/products/index.js +6 -6
- package/lib/cjs/products/interfaces/index.js +5 -5
- package/lib/cjs/products/utils/ProductPriorityOrder.js +1 -1
- package/lib/cjs/products/utils/index.js +2 -2
- package/lib/cjs/pxde/DefaultDataEnrichment.js +3 -3
- package/lib/cjs/pxde/index.js +4 -4
- package/lib/cjs/pxde/model/index.js +2 -2
- package/lib/cjs/pxhd/PXHDUtils.js +2 -2
- package/lib/cjs/pxhd/index.js +2 -2
- package/lib/cjs/pxhd/model/index.js +2 -2
- package/lib/cjs/risk_api/client/PostRiskApiClientBase.js +5 -5
- package/lib/cjs/risk_api/client/PostRiskApiClientV2.js +2 -2
- package/lib/cjs/risk_api/client/PostRiskApiClientV3.js +2 -2
- package/lib/cjs/risk_api/client/index.js +4 -4
- package/lib/cjs/risk_api/index.js +4 -4
- package/lib/cjs/risk_api/model/index.js +4 -4
- package/lib/cjs/risk_api/risk_response/RiskResponseBase.js +1 -1
- package/lib/cjs/risk_api/risk_response/index.js +6 -6
- package/lib/cjs/risk_api/risk_response/serialize/index.js +2 -2
- package/lib/cjs/risk_api/risk_response/v2/DefaultRiskResponseV2.js +1 -1
- package/lib/cjs/risk_api/risk_response/v2/index.js +2 -2
- package/lib/cjs/risk_api/risk_response/v3/DefaultRiskResponseV3.js +1 -1
- package/lib/cjs/risk_api/risk_response/v3/index.js +2 -2
- package/lib/cjs/risk_token/index.js +8 -8
- package/lib/cjs/risk_token/parser/DefaultTokenV2Parser.js +3 -3
- package/lib/cjs/risk_token/parser/DefaultTokenV3Parser.js +3 -3
- package/lib/cjs/risk_token/parser/TokenParserBase.js +4 -4
- package/lib/cjs/risk_token/parser/index.js +5 -5
- package/lib/cjs/risk_token/token/TokenBase.js +1 -1
- package/lib/cjs/risk_token/token/index.js +5 -5
- package/lib/cjs/risk_token/token/serialize/SerializedToken.js +1 -1
- package/lib/cjs/risk_token/token/serialize/index.js +2 -2
- package/lib/cjs/risk_token/token/v2/DefaultTokenV2.js +4 -4
- package/lib/cjs/risk_token/token/v2/index.js +2 -2
- package/lib/cjs/risk_token/token/v3/DefaultTokenV3.js +6 -6
- package/lib/cjs/risk_token/token/v3/index.js +3 -3
- package/lib/cjs/risk_token/utils.js +2 -2
- package/lib/cjs/sensitive_request/SensitiveRequestUtils.js +1 -1
- package/lib/cjs/sensitive_request/index.js +1 -1
- package/lib/cjs/snippet_injection/index.js +4 -4
- package/lib/cjs/snippet_injection/snippet_injector/index.js +1 -1
- package/lib/cjs/snippet_injection/snippet_retriever/DefaultSnippetRetriever.js +2 -2
- package/lib/cjs/snippet_injection/snippet_retriever/index.js +2 -2
- package/lib/cjs/telemetry/DefaultTelemetry.js +4 -4
- package/lib/cjs/telemetry/index.js +2 -2
- package/lib/cjs/utils/base64/index.js +1 -1
- package/lib/cjs/utils/cipher/index.js +1 -1
- package/lib/cjs/utils/constants.js +1 -1
- package/lib/cjs/utils/cookie_parser/StringSplitCookieParser.js +1 -1
- package/lib/cjs/utils/cookie_parser/index.js +2 -2
- package/lib/cjs/utils/error/EnforcerConfigurationError.js +2 -2
- package/lib/cjs/utils/error/EnforcerError.js +1 -1
- package/lib/cjs/utils/error/EnforcerTimeoutError.js +2 -2
- package/lib/cjs/utils/error/index.js +4 -4
- package/lib/cjs/utils/hash/index.js +1 -1
- package/lib/cjs/utils/hmac/index.js +1 -1
- package/lib/cjs/utils/index.js +16 -16
- package/lib/cjs/utils/ip_range_checker/index.js +1 -1
- package/lib/cjs/utils/request_id_generator/index.js +2 -2
- package/lib/cjs/utils/timestamp_hmac_header_validator/DefaultTimestampHmacHeaderValidator.js +2 -2
- package/lib/cjs/utils/timestamp_hmac_header_validator/index.js +2 -2
- package/lib/cjs/utils/url/index.js +3 -3
- package/lib/cjs/utils/utils.js +5 -5
- package/lib/esm/action/ActionPriorityOrder.js +1 -1
- package/lib/esm/action/index.js +6 -6
- package/lib/esm/action/utils.js +3 -3
- package/lib/esm/activities/HttpActivityClient.js +6 -6
- package/lib/esm/activities/HttpBatchedActivityClient.js +1 -1
- package/lib/esm/activities/index.js +7 -7
- package/lib/esm/activities/model/index.js +4 -4
- package/lib/esm/activities/utils.js +5 -5
- package/lib/esm/additional_activity_handler/index.js +2 -2
- package/lib/esm/blocker/BlockerBase.js +1 -1
- package/lib/esm/blocker/JsonBlockerBase.js +2 -2
- package/lib/esm/blocker/MobileBlocker.js +3 -3
- package/lib/esm/blocker/index.js +7 -7
- package/lib/esm/blocker/model/BlockActionToWordMap.js +1 -1
- package/lib/esm/blocker/model/index.js +3 -3
- package/lib/esm/blocker/utils.js +1 -1
- package/lib/esm/config/ConfigurationBase.js +15 -13
- package/lib/esm/config/defaults/DefaultConfigurationParams.js +4 -4
- package/lib/esm/config/defaults/index.js +1 -1
- package/lib/esm/config/index.js +6 -7
- package/lib/esm/config/params/index.js +5 -5
- package/lib/esm/config/remote_config/RemoteConfigUtils.js +14 -5
- package/lib/esm/config/remote_config/index.js +7 -7
- package/lib/esm/config/remote_config/manager/DefaultRemoteConfigManager.js +87 -0
- package/lib/esm/config/remote_config/manager/index.js +2 -0
- package/lib/esm/config/remote_config/model/index.js +2 -2
- package/lib/esm/config/remote_config/service_client/HttpRemoteConfigServiceClient.js +2 -2
- package/lib/esm/config/remote_config/service_client/index.js +2 -2
- package/lib/esm/config/remote_config/storage_client/index.js +1 -1
- package/lib/esm/config/remote_config/update_parser/DefaultNotifyRemoteConfigUpdateParser.js +60 -0
- package/lib/esm/config/remote_config/update_parser/IRemoteConfigUpdateParser.js +1 -0
- package/lib/esm/config/remote_config/update_parser/index.js +2 -0
- package/lib/esm/context/DefaultContext.js +27 -14
- package/lib/esm/context/SerializedContext.js +5 -5
- package/lib/esm/context/index.js +4 -4
- package/lib/esm/context/interfaces/RemoteConfigUpdateData.js +1 -0
- package/lib/esm/context/interfaces/index.js +9 -8
- package/lib/esm/cors/DefaultCors.js +2 -2
- package/lib/esm/cors/index.js +2 -2
- package/lib/esm/custom_parameters/CustomParameters.js +1 -1
- package/lib/esm/custom_parameters/CustomParametersUtils.js +1 -1
- package/lib/esm/custom_parameters/index.js +1 -1
- package/lib/esm/enforcer/EnforcerBase.js +5 -2
- package/lib/esm/enforcer/index.js +4 -4
- package/lib/esm/enforcer/utils.js +43 -28
- package/lib/esm/filter/index.js +2 -2
- package/lib/esm/first_party/index.js +2 -2
- package/lib/esm/graphql/DefaultGraphQLParser.js +3 -3
- package/lib/esm/graphql/index.js +4 -4
- package/lib/esm/graphql/model/index.js +3 -3
- package/lib/esm/http/index.js +2 -2
- package/lib/esm/http/interfaces/index.js +10 -10
- package/lib/esm/http/utils/MinimalResponseUtils.js +1 -1
- package/lib/esm/http/utils/MultipartFormDataUtils.js +1 -1
- package/lib/esm/http/utils/OutgoingRequestImpl.js +1 -1
- package/lib/esm/http/utils/index.js +8 -8
- package/lib/esm/impl/cipher/CryptoCipherUtils.js +1 -1
- package/lib/esm/impl/hash/CryptoHashUtils.js +1 -1
- package/lib/esm/impl/hash/CryptoJSHashUtils.js +1 -1
- package/lib/esm/impl/hash/SubtleCryptoHashUtils.js +1 -1
- package/lib/esm/impl/hmac/CryptoHmacUtils.js +1 -1
- package/lib/esm/impl/hmac/CryptoJSHmacUtils.js +1 -1
- package/lib/esm/impl/hmac/SubtleCryptoHmacUtils.js +1 -1
- package/lib/esm/impl/http/phin/PhinHttpClient.js +3 -3
- package/lib/esm/impl/http/phin/PhinIncomingResponse.js +3 -3
- package/lib/esm/impl/http/phin/index.js +2 -2
- package/lib/esm/impl/url/CustomImplUrlUtils.js +3 -3
- package/lib/esm/impl/url/DefaultUrlUtils.js +1 -1
- package/lib/esm/impl/url/UrlImpl.js +3 -3
- package/lib/esm/index.js +25 -25
- package/lib/esm/logger/DefaultLogger.js +1 -1
- package/lib/esm/logger/HttpLogServiceClient.js +3 -3
- package/lib/esm/logger/LoggerBase.js +2 -2
- package/lib/esm/logger/index.js +6 -6
- package/lib/esm/logger/model/index.js +3 -3
- package/lib/esm/monitored_request/MonitoredRequestUtils.js +1 -1
- package/lib/esm/monitored_request/index.js +1 -1
- package/lib/esm/phase/flow/EndEnforcerFlow.js +5 -3
- package/lib/esm/phase/flow/EnforceFlow.js +2 -2
- package/lib/esm/phase/flow/FilterFlow.js +6 -7
- package/lib/esm/phase/flow/PostEnforceFlow.js +1 -1
- package/lib/esm/phase/flow/index.js +4 -4
- package/lib/esm/phase/impl/AdditionalActivityHandlerPhase.js +1 -1
- package/lib/esm/phase/impl/CreateBlockResponsePhase.js +4 -4
- package/lib/esm/phase/impl/DecideActionPhase.js +3 -3
- package/lib/esm/phase/impl/EnrichContextFromRequestPhase.js +2 -2
- package/lib/esm/phase/impl/EnrichContextFromResponsePhase.js +1 -1
- package/lib/esm/phase/impl/FirstPartyPhase.js +1 -1
- package/lib/esm/phase/impl/IdentifyRemoteConfigNotifyRequestPhase.js +24 -0
- package/lib/esm/phase/impl/ModifyOutgoingResponsePhase.js +2 -2
- package/lib/esm/phase/impl/ParseTokenPhase.js +2 -2
- package/lib/esm/phase/impl/RiskApiPhase.js +4 -4
- package/lib/esm/phase/impl/SendAsyncActivitiesOnRequestPhase.js +1 -1
- package/lib/esm/phase/impl/UpdateRemoteConfigPhase.js +6 -13
- package/lib/esm/phase/impl/index.js +21 -20
- package/lib/esm/phase/index.js +4 -4
- package/lib/esm/products/account_defender/AccountDefender.js +2 -2
- package/lib/esm/products/account_defender/index.js +5 -5
- package/lib/esm/products/bot_defender/BotDefender.js +12 -12
- package/lib/esm/products/bot_defender/BotDefenderUtils.js +2 -2
- package/lib/esm/products/bot_defender/block/DefaultBotDefenderBlocker.js +6 -6
- package/lib/esm/products/bot_defender/block/captcha/CaptchaBlocker.js +3 -3
- package/lib/esm/products/bot_defender/block/captcha/HtmlCaptchaBlocker.js +3 -3
- package/lib/esm/products/bot_defender/block/captcha/JsonCaptchaBlocker.js +1 -1
- package/lib/esm/products/bot_defender/block/captcha/MobileCaptchaBlocker.js +2 -2
- package/lib/esm/products/bot_defender/block/captcha/index.js +4 -4
- package/lib/esm/products/bot_defender/block/index.js +5 -5
- package/lib/esm/products/bot_defender/block/model/index.js +2 -2
- package/lib/esm/products/bot_defender/block/templates/index.js +2 -2
- package/lib/esm/products/bot_defender/filter/DefaultBotDefenderFilter.js +3 -3
- package/lib/esm/products/bot_defender/filter/index.js +1 -1
- package/lib/esm/products/bot_defender/first_party/DefaultBotDefenderFirstParty.js +5 -5
- package/lib/esm/products/bot_defender/first_party/constants.js +1 -1
- package/lib/esm/products/bot_defender/first_party/index.js +4 -4
- package/lib/esm/products/bot_defender/first_party/utils.js +1 -1
- package/lib/esm/products/bot_defender/index.js +9 -9
- package/lib/esm/products/bot_defender/reasons/index.js +4 -4
- package/lib/esm/products/credential_intelligence/CredentialIntelligence.js +4 -4
- package/lib/esm/products/credential_intelligence/endpoint/extractor/BodyCredentialExtractor.js +2 -2
- package/lib/esm/products/credential_intelligence/endpoint/extractor/CredentialExtractorFactory.js +6 -6
- package/lib/esm/products/credential_intelligence/endpoint/extractor/index.js +5 -5
- package/lib/esm/products/credential_intelligence/endpoint/hash_protocol/CredentialIntelligenceHashProtocolFactory.js +4 -4
- package/lib/esm/products/credential_intelligence/endpoint/hash_protocol/MultistepHashProtocol.js +3 -3
- package/lib/esm/products/credential_intelligence/endpoint/hash_protocol/SingleStepHashProtocol.js +2 -2
- package/lib/esm/products/credential_intelligence/endpoint/hash_protocol/index.js +7 -7
- package/lib/esm/products/credential_intelligence/endpoint/index.js +8 -8
- package/lib/esm/products/credential_intelligence/endpoint/login_successful/HeaderLoginSuccessfulParser.js +1 -1
- package/lib/esm/products/credential_intelligence/endpoint/login_successful/LoginSuccessfulParserFactory.js +6 -6
- package/lib/esm/products/credential_intelligence/endpoint/login_successful/index.js +8 -8
- package/lib/esm/products/credential_intelligence/endpoint/matcher/CredentialIntelligenceEndpointMatcherFactory.js +3 -3
- package/lib/esm/products/credential_intelligence/endpoint/matcher/index.js +5 -5
- package/lib/esm/products/credential_intelligence/index.js +5 -5
- package/lib/esm/products/credential_intelligence/model/index.js +4 -4
- package/lib/esm/products/hype_sale_challenge/HypeSaleChallenge.js +6 -6
- package/lib/esm/products/hype_sale_challenge/block/JsonHypeSaleChallengeBlocker.js +2 -2
- package/lib/esm/products/hype_sale_challenge/block/MobileHypeSaleChallengeBlocker.js +2 -2
- package/lib/esm/products/hype_sale_challenge/block/index.js +3 -3
- package/lib/esm/products/hype_sale_challenge/block/templates/index.js +1 -1
- package/lib/esm/products/hype_sale_challenge/index.js +5 -5
- package/lib/esm/products/hype_sale_challenge/model/index.js +2 -2
- package/lib/esm/products/hype_sale_challenge/utils.js +1 -1
- package/lib/esm/products/index.js +6 -6
- package/lib/esm/products/interfaces/index.js +5 -5
- package/lib/esm/products/utils/ProductPriorityOrder.js +1 -1
- package/lib/esm/products/utils/index.js +2 -2
- package/lib/esm/pxde/DefaultDataEnrichment.js +3 -3
- package/lib/esm/pxde/index.js +4 -4
- package/lib/esm/pxde/model/index.js +2 -2
- package/lib/esm/pxhd/PXHDUtils.js +2 -2
- package/lib/esm/pxhd/index.js +2 -2
- package/lib/esm/pxhd/model/index.js +2 -2
- package/lib/esm/risk_api/client/PostRiskApiClientBase.js +5 -5
- package/lib/esm/risk_api/client/PostRiskApiClientV2.js +2 -2
- package/lib/esm/risk_api/client/PostRiskApiClientV3.js +2 -2
- package/lib/esm/risk_api/client/index.js +4 -4
- package/lib/esm/risk_api/index.js +4 -4
- package/lib/esm/risk_api/model/index.js +4 -4
- package/lib/esm/risk_api/risk_response/RiskResponseBase.js +1 -1
- package/lib/esm/risk_api/risk_response/index.js +6 -6
- package/lib/esm/risk_api/risk_response/serialize/index.js +2 -2
- package/lib/esm/risk_api/risk_response/v2/DefaultRiskResponseV2.js +1 -1
- package/lib/esm/risk_api/risk_response/v2/index.js +2 -2
- package/lib/esm/risk_api/risk_response/v3/DefaultRiskResponseV3.js +1 -1
- package/lib/esm/risk_api/risk_response/v3/index.js +2 -2
- package/lib/esm/risk_token/index.js +8 -8
- package/lib/esm/risk_token/parser/DefaultTokenV2Parser.js +3 -3
- package/lib/esm/risk_token/parser/DefaultTokenV3Parser.js +3 -3
- package/lib/esm/risk_token/parser/TokenParserBase.js +4 -4
- package/lib/esm/risk_token/parser/index.js +5 -5
- package/lib/esm/risk_token/token/TokenBase.js +1 -1
- package/lib/esm/risk_token/token/index.js +5 -5
- package/lib/esm/risk_token/token/serialize/SerializedToken.js +1 -1
- package/lib/esm/risk_token/token/serialize/index.js +2 -2
- package/lib/esm/risk_token/token/v2/DefaultTokenV2.js +4 -4
- package/lib/esm/risk_token/token/v2/index.js +2 -2
- package/lib/esm/risk_token/token/v3/DefaultTokenV3.js +6 -6
- package/lib/esm/risk_token/token/v3/index.js +3 -3
- package/lib/esm/risk_token/utils.js +2 -2
- package/lib/esm/sensitive_request/SensitiveRequestUtils.js +1 -1
- package/lib/esm/sensitive_request/index.js +1 -1
- package/lib/esm/snippet_injection/index.js +4 -4
- package/lib/esm/snippet_injection/snippet_injector/index.js +1 -1
- package/lib/esm/snippet_injection/snippet_retriever/DefaultSnippetRetriever.js +2 -2
- package/lib/esm/snippet_injection/snippet_retriever/index.js +2 -2
- package/lib/esm/telemetry/DefaultTelemetry.js +4 -4
- package/lib/esm/telemetry/index.js +2 -2
- package/lib/esm/utils/base64/index.js +1 -1
- package/lib/esm/utils/cipher/index.js +1 -1
- package/lib/esm/utils/constants.js +1 -1
- package/lib/esm/utils/cookie_parser/StringSplitCookieParser.js +1 -1
- package/lib/esm/utils/cookie_parser/index.js +2 -2
- package/lib/esm/utils/error/EnforcerConfigurationError.js +2 -2
- package/lib/esm/utils/error/EnforcerError.js +1 -1
- package/lib/esm/utils/error/EnforcerTimeoutError.js +2 -2
- package/lib/esm/utils/error/index.js +4 -4
- package/lib/esm/utils/hash/index.js +1 -1
- package/lib/esm/utils/hmac/index.js +1 -1
- package/lib/esm/utils/index.js +16 -16
- package/lib/esm/utils/ip_range_checker/index.js +1 -1
- package/lib/esm/utils/request_id_generator/index.js +2 -2
- package/lib/esm/utils/timestamp_hmac_header_validator/DefaultTimestampHmacHeaderValidator.js +2 -2
- package/lib/esm/utils/timestamp_hmac_header_validator/index.js +2 -2
- package/lib/esm/utils/url/index.js +3 -3
- package/lib/esm/utils/utils.js +5 -5
- package/lib/types/config/ConfigurationBase.d.ts +3 -2
- package/lib/types/config/IConfiguration.d.ts +3 -2
- package/lib/types/config/index.d.ts +0 -1
- package/lib/types/config/params/CoreConfigurationParams.d.ts +1 -1
- package/lib/types/config/remote_config/RemoteConfigUtils.d.ts +2 -1
- package/lib/types/config/remote_config/index.d.ts +2 -2
- package/lib/types/config/remote_config/manager/DefaultRemoteConfigManager.d.ts +23 -0
- package/lib/types/config/remote_config/manager/IRemoteConfigManager.d.ts +7 -0
- package/lib/types/config/remote_config/manager/index.d.ts +2 -0
- package/lib/types/config/remote_config/model/RemoteConfigNotifyRequestPayload.d.ts +3 -0
- package/lib/types/config/remote_config/model/index.d.ts +1 -1
- package/lib/types/config/remote_config/service_client/HttpRemoteConfigServiceClient.d.ts +2 -2
- package/lib/types/config/remote_config/service_client/IRemoteConfigServiceClient.d.ts +2 -2
- package/lib/types/config/remote_config/storage_client/IRemoteConfigStorageClient.d.ts +1 -1
- package/lib/types/config/remote_config/update_parser/DefaultNotifyRemoteConfigUpdateParser.d.ts +22 -0
- package/lib/types/config/remote_config/update_parser/IRemoteConfigUpdateParser.d.ts +5 -0
- package/lib/types/config/remote_config/update_parser/index.d.ts +2 -0
- package/lib/types/context/ContextJson.d.ts +2 -2
- package/lib/types/context/DefaultContext.d.ts +5 -3
- package/lib/types/context/SerializedContext.d.ts +2 -2
- package/lib/types/context/interfaces/IContext.d.ts +4 -3
- package/lib/types/context/interfaces/RemoteConfigUpdateData.d.ts +4 -0
- package/lib/types/context/interfaces/index.d.ts +1 -0
- package/lib/types/enforcer/EnforcerBase.d.ts +2 -1
- package/lib/types/enforcer/EnforcerOptions.d.ts +3 -2
- package/lib/types/enforcer/utils.d.ts +7 -1
- package/lib/types/logger/ILogger.d.ts +4 -0
- package/lib/types/logger/LoggerBase.d.ts +1 -1
- package/lib/types/phase/flow/EndEnforcerFlow.d.ts +2 -2
- package/lib/types/phase/flow/FilterFlow.d.ts +1 -1
- package/lib/types/phase/impl/IdentifyRemoteConfigNotifyRequestPhase.d.ts +9 -0
- package/lib/types/phase/impl/UpdateRemoteConfigPhase.d.ts +3 -5
- package/lib/types/phase/impl/index.d.ts +2 -1
- package/lib/types/utils/constants.d.ts +1 -1
- package/package.json +15 -14
- package/lib/cjs/config/ConfigurationBuilderBase.js +0 -135
- package/lib/cjs/config/remote_config/DefaultRemoteConfigUpdater.js +0 -200
- package/lib/esm/config/ConfigurationBuilderBase.js +0 -66
- package/lib/esm/config/remote_config/DefaultRemoteConfigUpdater.js +0 -99
- package/lib/types/config/ConfigurationBuilderBase.d.ts +0 -13
- package/lib/types/config/remote_config/DefaultRemoteConfigUpdater.d.ts +0 -34
- package/lib/types/config/remote_config/IRemoteConfigUpdater.d.ts +0 -6
- package/lib/types/config/remote_config/model/RemoteConfigUpdateRequestData.d.ts +0 -3
- /package/lib/cjs/config/remote_config/{IRemoteConfigUpdater.js → manager/IRemoteConfigManager.js} +0 -0
- /package/lib/cjs/config/remote_config/model/{RemoteConfigUpdateRequestData.js → RemoteConfigNotifyRequestPayload.js} +0 -0
- /package/lib/esm/config/remote_config/{IRemoteConfigUpdater.js → manager/IRemoteConfigManager.js} +0 -0
- /package/lib/esm/config/remote_config/model/{RemoteConfigUpdateRequestData.js → RemoteConfigNotifyRequestPayload.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ACTION_PRIORITY_ORDER = void 0;
|
|
4
|
-
var Action_1 = require("./Action");
|
|
4
|
+
var Action_1 = require("./Action.js");
|
|
5
5
|
exports.ACTION_PRIORITY_ORDER = [
|
|
6
6
|
Action_1.Action.BLOCK,
|
|
7
7
|
Action_1.Action.SIMULATED_BLOCK,
|
package/lib/cjs/action/index.js
CHANGED
|
@@ -14,9 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./Action"), exports);
|
|
18
|
-
__exportStar(require("./ActionData"), exports);
|
|
19
|
-
__exportStar(require("./ActionPriorityOrder"), exports);
|
|
20
|
-
__exportStar(require("./Decision"), exports);
|
|
21
|
-
__exportStar(require("./ProductAction"), exports);
|
|
22
|
-
__exportStar(require("./utils"), exports);
|
|
17
|
+
__exportStar(require("./Action.js"), exports);
|
|
18
|
+
__exportStar(require("./ActionData.js"), exports);
|
|
19
|
+
__exportStar(require("./ActionPriorityOrder.js"), exports);
|
|
20
|
+
__exportStar(require("./Decision.js"), exports);
|
|
21
|
+
__exportStar(require("./ProductAction.js"), exports);
|
|
22
|
+
__exportStar(require("./utils.js"), exports);
|
package/lib/cjs/action/utils.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getReasonForHighestPriorityProduct = exports.getDecisionFromActions = exports.getProductActions = exports.getDecisionFromContext = void 0;
|
|
4
|
-
var Action_1 = require("./Action");
|
|
5
|
-
var products_1 = require("../products");
|
|
6
|
-
var ActionPriorityOrder_1 = require("./ActionPriorityOrder");
|
|
4
|
+
var Action_1 = require("./Action.js");
|
|
5
|
+
var products_1 = require("../products/index.js");
|
|
6
|
+
var ActionPriorityOrder_1 = require("./ActionPriorityOrder.js");
|
|
7
7
|
var getDecisionFromContext = function (context) {
|
|
8
8
|
return (0, exports.getDecisionFromActions)((0, exports.getProductActions)(context));
|
|
9
9
|
};
|
|
@@ -37,12 +37,12 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.HttpActivityClient = void 0;
|
|
40
|
-
var action_1 = require("../action");
|
|
41
|
-
var http_1 = require("../http");
|
|
42
|
-
var utils_1 = require("../utils");
|
|
43
|
-
var ActivityType_1 = require("./ActivityType");
|
|
44
|
-
var utils_2 = require("./utils");
|
|
45
|
-
var constants_1 = require("./constants");
|
|
40
|
+
var action_1 = require("../action/index.js");
|
|
41
|
+
var http_1 = require("../http/index.js");
|
|
42
|
+
var utils_1 = require("../utils/index.js");
|
|
43
|
+
var ActivityType_1 = require("./ActivityType.js");
|
|
44
|
+
var utils_2 = require("./utils.js");
|
|
45
|
+
var constants_1 = require("./constants.js");
|
|
46
46
|
var HttpActivityClient = /** @class */ (function () {
|
|
47
47
|
function HttpActivityClient(config, httpClient) {
|
|
48
48
|
this.config = config;
|
|
@@ -52,7 +52,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
52
52
|
};
|
|
53
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
54
|
exports.HttpBatchedActivityClient = void 0;
|
|
55
|
-
var HttpActivityClient_1 = require("./HttpActivityClient");
|
|
55
|
+
var HttpActivityClient_1 = require("./HttpActivityClient.js");
|
|
56
56
|
var HttpBatchedActivityClient = /** @class */ (function (_super) {
|
|
57
57
|
__extends(HttpBatchedActivityClient, _super);
|
|
58
58
|
function HttpBatchedActivityClient(config, httpClient) {
|
|
@@ -14,10 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./IActivityClient"), exports);
|
|
18
|
-
__exportStar(require("./ActivityType"), exports);
|
|
19
|
-
__exportStar(require("./HttpActivityClient"), exports);
|
|
20
|
-
__exportStar(require("./HttpBatchedActivityClient"), exports);
|
|
21
|
-
__exportStar(require("./model"), exports);
|
|
22
|
-
__exportStar(require("./utils"), exports);
|
|
23
|
-
__exportStar(require("./constants"), exports);
|
|
17
|
+
__exportStar(require("./IActivityClient.js"), exports);
|
|
18
|
+
__exportStar(require("./ActivityType.js"), exports);
|
|
19
|
+
__exportStar(require("./HttpActivityClient.js"), exports);
|
|
20
|
+
__exportStar(require("./HttpBatchedActivityClient.js"), exports);
|
|
21
|
+
__exportStar(require("./model/index.js"), exports);
|
|
22
|
+
__exportStar(require("./utils.js"), exports);
|
|
23
|
+
__exportStar(require("./constants.js"), exports);
|
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./AsyncActivity"), exports);
|
|
18
|
-
__exportStar(require("./AsyncActivityDetails"), exports);
|
|
19
|
-
__exportStar(require("./HeaderEntry"), exports);
|
|
20
|
-
__exportStar(require("./CommonActivityDetails"), exports);
|
|
17
|
+
__exportStar(require("./AsyncActivity.js"), exports);
|
|
18
|
+
__exportStar(require("./AsyncActivityDetails.js"), exports);
|
|
19
|
+
__exportStar(require("./HeaderEntry.js"), exports);
|
|
20
|
+
__exportStar(require("./CommonActivityDetails.js"), exports);
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.toHeaderEntryArray = exports.createAdditionalS2SActivityDetails = exports.createBlockActivityDetails = exports.createPageRequestedActivityDetails = exports.addResponseDataToAsyncActivityCommonDetails = exports.addRiskApiDataToAsyncActivityCommonDetails = exports.addTokenDataToDetails = exports.addRequestDataToDetails = exports.addServerDataToDetails = exports.addTlsDataToDetails = exports.addProductDataToDetails = exports.addCustomParametersToDetails = exports.addConfigDataToDetails = exports.addRootContextDataToDetails = exports.createCommonActivityDetails = exports.createAsyncActivityCommonDetails = exports.createActivityDetails = exports.createAsyncActivity = void 0;
|
|
4
4
|
exports.redactCookieSecret = redactCookieSecret;
|
|
5
|
-
var utils_1 = require("../utils");
|
|
6
|
-
var products_1 = require("../products");
|
|
7
|
-
var action_1 = require("../action");
|
|
8
|
-
var ActivityType_1 = require("./ActivityType");
|
|
9
|
-
var risk_token_1 = require("../risk_token");
|
|
5
|
+
var utils_1 = require("../utils/index.js");
|
|
6
|
+
var products_1 = require("../products/index.js");
|
|
7
|
+
var action_1 = require("../action/index.js");
|
|
8
|
+
var ActivityType_1 = require("./ActivityType.js");
|
|
9
|
+
var risk_token_1 = require("../risk_token/index.js");
|
|
10
10
|
var createAsyncActivity = function (activityType, config, context) {
|
|
11
11
|
var _a;
|
|
12
12
|
return {
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./AdditionalActivityHandler"), exports);
|
|
18
|
-
__exportStar(require("./AdditionalActivityHandlerUtils"), exports);
|
|
17
|
+
__exportStar(require("./AdditionalActivityHandler.js"), exports);
|
|
18
|
+
__exportStar(require("./AdditionalActivityHandlerUtils.js"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BlockerBase = void 0;
|
|
4
|
-
var http_1 = require("../http");
|
|
4
|
+
var http_1 = require("../http/index.js");
|
|
5
5
|
var BlockerBase = /** @class */ (function () {
|
|
6
6
|
function BlockerBase(contentType, statusCode) {
|
|
7
7
|
if (statusCode === void 0) { statusCode = 403; }
|
|
@@ -16,8 +16,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.JsonBlockerBase = void 0;
|
|
19
|
-
var BlockerBase_1 = require("./BlockerBase");
|
|
20
|
-
var http_1 = require("../http");
|
|
19
|
+
var BlockerBase_1 = require("./BlockerBase.js");
|
|
20
|
+
var http_1 = require("../http/index.js");
|
|
21
21
|
var JsonBlockerBase = /** @class */ (function (_super) {
|
|
22
22
|
__extends(JsonBlockerBase, _super);
|
|
23
23
|
function JsonBlockerBase() {
|
|
@@ -16,9 +16,9 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.MobileBlocker = void 0;
|
|
19
|
-
var http_1 = require("../http");
|
|
20
|
-
var blocker_1 = require("../blocker");
|
|
21
|
-
var BlockerBase_1 = require("./BlockerBase");
|
|
19
|
+
var http_1 = require("../http/index.js");
|
|
20
|
+
var blocker_1 = require("../blocker/index.js");
|
|
21
|
+
var BlockerBase_1 = require("./BlockerBase.js");
|
|
22
22
|
var MobileBlocker = /** @class */ (function (_super) {
|
|
23
23
|
__extends(MobileBlocker, _super);
|
|
24
24
|
function MobileBlocker(config, base64Utils, template) {
|
package/lib/cjs/blocker/index.js
CHANGED
|
@@ -14,10 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./IConditionalBlocker"), exports);
|
|
18
|
-
__exportStar(require("./IBlocker"), exports);
|
|
19
|
-
__exportStar(require("./BlockerBase"), exports);
|
|
20
|
-
__exportStar(require("./JsonBlockerBase"), exports);
|
|
21
|
-
__exportStar(require("./MobileBlocker"), exports);
|
|
22
|
-
__exportStar(require("./model"), exports);
|
|
23
|
-
__exportStar(require("./utils"), exports);
|
|
17
|
+
__exportStar(require("./IConditionalBlocker.js"), exports);
|
|
18
|
+
__exportStar(require("./IBlocker.js"), exports);
|
|
19
|
+
__exportStar(require("./BlockerBase.js"), exports);
|
|
20
|
+
__exportStar(require("./JsonBlockerBase.js"), exports);
|
|
21
|
+
__exportStar(require("./MobileBlocker.js"), exports);
|
|
22
|
+
__exportStar(require("./model/index.js"), exports);
|
|
23
|
+
__exportStar(require("./utils.js"), exports);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.BLOCK_ACTION_TO_WORD_MAP = void 0;
|
|
4
|
-
var BlockAction_1 = require("./BlockAction");
|
|
4
|
+
var BlockAction_1 = require("./BlockAction.js");
|
|
5
5
|
exports.BLOCK_ACTION_TO_WORD_MAP = new Map([
|
|
6
6
|
[BlockAction_1.BlockAction.CAPTCHA, 'captcha'],
|
|
7
7
|
[BlockAction_1.BlockAction.RATE_LIMIT, 'ratelimit'],
|
|
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./BlockAction"), exports);
|
|
18
|
-
__exportStar(require("./BlockActionToWordMap"), exports);
|
|
19
|
-
__exportStar(require("./BlockData"), exports);
|
|
17
|
+
__exportStar(require("./BlockAction.js"), exports);
|
|
18
|
+
__exportStar(require("./BlockActionToWordMap.js"), exports);
|
|
19
|
+
__exportStar(require("./BlockData.js"), exports);
|
package/lib/cjs/blocker/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createBlockData = exports.renderHtml = void 0;
|
|
4
|
-
var products_1 = require("../products");
|
|
4
|
+
var products_1 = require("../products/index.js");
|
|
5
5
|
var renderHtml = function (htmlTemplate, blockData) {
|
|
6
6
|
if (!blockData) {
|
|
7
7
|
return htmlTemplate;
|
|
@@ -12,11 +12,11 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
14
|
exports.ConfigurationBase = void 0;
|
|
15
|
-
var defaults_1 = require("./defaults");
|
|
16
|
-
var logger_1 = require("../logger");
|
|
17
|
-
var utils_1 = require("../utils");
|
|
18
|
-
var remote_config_1 = require("./remote_config");
|
|
19
|
-
var risk_token_1 = require("../risk_token");
|
|
15
|
+
var defaults_1 = require("./defaults/index.js");
|
|
16
|
+
var logger_1 = require("../logger/index.js");
|
|
17
|
+
var utils_1 = require("../utils/index.js");
|
|
18
|
+
var remote_config_1 = require("./remote_config/index.js");
|
|
19
|
+
var risk_token_1 = require("../risk_token/index.js");
|
|
20
20
|
var ConfigurationBase = /** @class */ (function () {
|
|
21
21
|
function ConfigurationBase(params, defaultParams, removedParams) {
|
|
22
22
|
this.defaultConfigParams = __assign(__assign({}, (0, defaults_1.defaultConfigurationParams)()), defaultParams);
|
|
@@ -83,12 +83,13 @@ var ConfigurationBase = /** @class */ (function () {
|
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
85
|
ConfigurationBase.prototype.createInternalLogger = function (params) {
|
|
86
|
-
|
|
86
|
+
var _a;
|
|
87
|
+
return new logger_1.DefaultLogger(params.px_logger_severity, false, (_a = this.logger) === null || _a === void 0 ? void 0 : _a.getLogs());
|
|
87
88
|
};
|
|
88
|
-
ConfigurationBase.prototype.
|
|
89
|
-
this.
|
|
90
|
-
var
|
|
91
|
-
this.configParams = this.createActiveConfiguration(
|
|
89
|
+
ConfigurationBase.prototype.setRemoteConfigData = function (remoteConfigData) {
|
|
90
|
+
this.remoteConfigData = remoteConfigData;
|
|
91
|
+
var params = __assign(__assign({}, this.staticConfigParams), remote_config_1.RemoteConfigUtils.prepareRemoteConfigParams(remoteConfigData, this.logger));
|
|
92
|
+
this.configParams = this.createActiveConfiguration(params, this.defaultConfigParams);
|
|
92
93
|
};
|
|
93
94
|
ConfigurationBase.prototype.getActiveConfig = function () {
|
|
94
95
|
var activeConfig = Object.assign({}, this.configParams);
|
|
@@ -102,7 +103,9 @@ var ConfigurationBase = /** @class */ (function () {
|
|
|
102
103
|
return Object.assign({}, this.staticConfigParams);
|
|
103
104
|
};
|
|
104
105
|
ConfigurationBase.prototype.getRemoteConfig = function () {
|
|
105
|
-
return
|
|
106
|
+
return this.remoteConfigData
|
|
107
|
+
? remote_config_1.RemoteConfigUtils.prepareRemoteConfigParams(this.remoteConfigData, this.logger)
|
|
108
|
+
: {};
|
|
106
109
|
};
|
|
107
110
|
Object.defineProperty(ConfigurationBase.prototype, "moduleVersion", {
|
|
108
111
|
get: function () {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.defaultConfigurationParams = void 0;
|
|
4
|
-
var logger_1 = require("../../logger");
|
|
5
|
-
var utils_1 = require("../../utils");
|
|
6
|
-
var products_1 = require("../../products");
|
|
7
|
-
var risk_token_1 = require("../../risk_token");
|
|
4
|
+
var logger_1 = require("../../logger/index.js");
|
|
5
|
+
var utils_1 = require("../../utils/index.js");
|
|
6
|
+
var products_1 = require("../../products/index.js");
|
|
7
|
+
var risk_token_1 = require("../../risk_token/index.js");
|
|
8
8
|
var defaultConfigurationParams = function () { return ({
|
|
9
9
|
px_app_id: '',
|
|
10
10
|
px_auth_token: '',
|
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./DefaultConfigurationParams"), exports);
|
|
17
|
+
__exportStar(require("./DefaultConfigurationParams.js"), exports);
|
package/lib/cjs/config/index.js
CHANGED
|
@@ -14,10 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./IConfiguration"), exports);
|
|
18
|
-
__exportStar(require("./ConfigurationBase"), exports);
|
|
19
|
-
__exportStar(require("./
|
|
20
|
-
__exportStar(require("./
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
__exportStar(require("./defaults"), exports);
|
|
17
|
+
__exportStar(require("./IConfiguration.js"), exports);
|
|
18
|
+
__exportStar(require("./ConfigurationBase.js"), exports);
|
|
19
|
+
__exportStar(require("./CustomRequestFunction.js"), exports);
|
|
20
|
+
__exportStar(require("./remote_config/index.js"), exports);
|
|
21
|
+
__exportStar(require("./params/index.js"), exports);
|
|
22
|
+
__exportStar(require("./defaults/index.js"), exports);
|
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./ActiveConfigurationParams"), exports);
|
|
18
|
-
__exportStar(require("./AllConfigurationParams"), exports);
|
|
19
|
-
__exportStar(require("./CoreConfigurationParams"), exports);
|
|
20
|
-
__exportStar(require("./RemoteConfigurationParams"), exports);
|
|
21
|
-
__exportStar(require("./StaticConfigurationParams"), exports);
|
|
17
|
+
__exportStar(require("./ActiveConfigurationParams.js"), exports);
|
|
18
|
+
__exportStar(require("./AllConfigurationParams.js"), exports);
|
|
19
|
+
__exportStar(require("./CoreConfigurationParams.js"), exports);
|
|
20
|
+
__exportStar(require("./RemoteConfigurationParams.js"), exports);
|
|
21
|
+
__exportStar(require("./StaticConfigurationParams.js"), exports);
|
|
@@ -10,9 +10,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RemoteConfigUtils = void 0;
|
|
13
|
-
var http_1 = require("../../http");
|
|
14
|
-
var utils_1 = require("../../utils");
|
|
15
|
-
var constants_1 = require("./constants");
|
|
13
|
+
var http_1 = require("../../http/index.js");
|
|
14
|
+
var utils_1 = require("../../utils/index.js");
|
|
15
|
+
var constants_1 = require("./constants.js");
|
|
16
16
|
var RemoteConfigUtils;
|
|
17
17
|
(function (RemoteConfigUtils) {
|
|
18
18
|
RemoteConfigUtils.isRemoteConfigUpdateRequest = function (request) {
|
|
@@ -20,8 +20,18 @@ var RemoteConfigUtils;
|
|
|
20
20
|
request.headers.get(utils_1.PUSH_DATA_FEATURE_HEADER_NAME) === constants_1.REMOTE_CONFIG_PUSH_DATA_FEATURE_NAME &&
|
|
21
21
|
!!request.headers.get(utils_1.PUSH_DATA_HMAC_HEADER_NAME);
|
|
22
22
|
};
|
|
23
|
-
RemoteConfigUtils.prepareRemoteConfigParams = function (
|
|
24
|
-
var
|
|
23
|
+
RemoteConfigUtils.prepareRemoteConfigParams = function (_a, logger) {
|
|
24
|
+
var version = _a.version, configValue = _a.configValue;
|
|
25
|
+
var remoteConfig = {
|
|
26
|
+
px_remote_config_version: version,
|
|
27
|
+
px_remote_config_enabled: configValue.px_remote_config_enabled,
|
|
28
|
+
};
|
|
29
|
+
if (!configValue.px_remote_config_enabled) {
|
|
30
|
+
// returning only the version and the fact that remote config is disabled
|
|
31
|
+
// so we can report the version on async activities without merging the rest of the remote configs
|
|
32
|
+
return remoteConfig;
|
|
33
|
+
}
|
|
34
|
+
Object.assign(remoteConfig, configValue);
|
|
25
35
|
// Remote config receives strings and regexes in separate fields (px_sensitive_routes, px_sensitive_routes_regex)
|
|
26
36
|
// Before initializing a new active configuration, we merge the two into the more generic field (px_sensitive_routes)
|
|
27
37
|
constants_1.CONFIG_KEYS_WITH_REGEX_EQUIVALENT_IN_REMOTE_CONFIG.forEach(function (k) {
|
|
@@ -14,10 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./constants"), exports);
|
|
18
|
-
__exportStar(require("./model"), exports);
|
|
19
|
-
__exportStar(require("./service_client"), exports);
|
|
20
|
-
__exportStar(require("./storage_client"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
__exportStar(require("./RemoteConfigUtils"), exports);
|
|
17
|
+
__exportStar(require("./constants.js"), exports);
|
|
18
|
+
__exportStar(require("./model/index.js"), exports);
|
|
19
|
+
__exportStar(require("./service_client/index.js"), exports);
|
|
20
|
+
__exportStar(require("./storage_client/index.js"), exports);
|
|
21
|
+
__exportStar(require("./manager/index.js"), exports);
|
|
22
|
+
__exportStar(require("./update_parser/index.js"), exports);
|
|
23
|
+
__exportStar(require("./RemoteConfigUtils.js"), exports);
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.DefaultRemoteConfigManager = void 0;
|
|
40
|
+
var utils_1 = require("../../../utils/index.js");
|
|
41
|
+
var constants_1 = require("../constants.js");
|
|
42
|
+
var DefaultRemoteConfigManager = /** @class */ (function () {
|
|
43
|
+
function DefaultRemoteConfigManager(config, options) {
|
|
44
|
+
this.config = config;
|
|
45
|
+
this.serviceClient = options.serviceClient;
|
|
46
|
+
this.storageClient = options.storageClient;
|
|
47
|
+
}
|
|
48
|
+
DefaultRemoteConfigManager.prototype.loadRemoteConfig = function () {
|
|
49
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
50
|
+
var remoteConfigData, e_1;
|
|
51
|
+
return __generator(this, function (_a) {
|
|
52
|
+
switch (_a.label) {
|
|
53
|
+
case 0:
|
|
54
|
+
if (!this.config.remoteConfigId || !this.config.remoteConfigAuthToken) {
|
|
55
|
+
this.config.logger.debug('no remote config id or auth token provided, skipping remote config load');
|
|
56
|
+
return [2 /*return*/];
|
|
57
|
+
}
|
|
58
|
+
_a.label = 1;
|
|
59
|
+
case 1:
|
|
60
|
+
_a.trys.push([1, 3, , 4]);
|
|
61
|
+
return [4 /*yield*/, this.loadRemoteConfigData()];
|
|
62
|
+
case 2:
|
|
63
|
+
remoteConfigData = _a.sent();
|
|
64
|
+
if (!!(remoteConfigData === null || remoteConfigData === void 0 ? void 0 : remoteConfigData.version) && remoteConfigData.version > this.config.remoteConfigVersion) {
|
|
65
|
+
this.config.setRemoteConfigData(remoteConfigData);
|
|
66
|
+
}
|
|
67
|
+
return [3 /*break*/, 4];
|
|
68
|
+
case 3:
|
|
69
|
+
e_1 = _a.sent();
|
|
70
|
+
this.config.logger.debug("caught error loading remote config: ".concat(e_1));
|
|
71
|
+
return [3 /*break*/, 4];
|
|
72
|
+
case 4: return [2 /*return*/];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
DefaultRemoteConfigManager.prototype.loadRemoteConfigData = function () {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
79
|
+
var remoteConfigData;
|
|
80
|
+
return __generator(this, function (_a) {
|
|
81
|
+
switch (_a.label) {
|
|
82
|
+
case 0: return [4 /*yield*/, this.storageClient.load()];
|
|
83
|
+
case 1:
|
|
84
|
+
remoteConfigData = _a.sent();
|
|
85
|
+
if (!remoteConfigData) {
|
|
86
|
+
this.config.logger.debug('unable to load remote config from storage');
|
|
87
|
+
return [2 /*return*/, null];
|
|
88
|
+
}
|
|
89
|
+
if (!this.isValidRemoteConfigId(remoteConfigData.id)) {
|
|
90
|
+
this.config.logger.debug("remote config ID in static config does not match ID found in storage ".concat(remoteConfigData.id));
|
|
91
|
+
return [2 /*return*/, null];
|
|
92
|
+
}
|
|
93
|
+
return [2 /*return*/, remoteConfigData];
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
DefaultRemoteConfigManager.prototype.isValidRemoteConfigId = function (remoteConfigId) {
|
|
99
|
+
return remoteConfigId === this.config.remoteConfigId;
|
|
100
|
+
};
|
|
101
|
+
DefaultRemoteConfigManager.prototype.shouldUpdateRemoteConfig = function (context) {
|
|
102
|
+
return context.remoteConfigUpdateData.shouldUpdate;
|
|
103
|
+
};
|
|
104
|
+
DefaultRemoteConfigManager.prototype.updateRemoteConfig = function (context) {
|
|
105
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
+
var desiredVersion, remoteConfigData, e_2;
|
|
107
|
+
var _a;
|
|
108
|
+
return __generator(this, function (_b) {
|
|
109
|
+
switch (_b.label) {
|
|
110
|
+
case 0:
|
|
111
|
+
desiredVersion = (_a = context.remoteConfigUpdateData.desiredVersion) !== null && _a !== void 0 ? _a : 0;
|
|
112
|
+
return [4 /*yield*/, this.fetchRemoteConfigData(desiredVersion, context)];
|
|
113
|
+
case 1:
|
|
114
|
+
remoteConfigData = _b.sent();
|
|
115
|
+
if (!remoteConfigData) {
|
|
116
|
+
return [2 /*return*/];
|
|
117
|
+
}
|
|
118
|
+
_b.label = 2;
|
|
119
|
+
case 2:
|
|
120
|
+
_b.trys.push([2, 4, , 5]);
|
|
121
|
+
return [4 /*yield*/, this.storageClient.save(remoteConfigData)];
|
|
122
|
+
case 3:
|
|
123
|
+
_b.sent();
|
|
124
|
+
context.logger.debug("successfully updated remote config to version ".concat(remoteConfigData.version));
|
|
125
|
+
return [3 /*break*/, 5];
|
|
126
|
+
case 4:
|
|
127
|
+
e_2 = _b.sent();
|
|
128
|
+
context.logger.debug("unable to save remote config version ".concat(remoteConfigData.version, " to storage: ").concat(e_2), {
|
|
129
|
+
errorType: constants_1.WRITE_REMOTE_CONFIG_ERROR_NAME,
|
|
130
|
+
});
|
|
131
|
+
return [3 /*break*/, 5];
|
|
132
|
+
case 5: return [2 /*return*/];
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
DefaultRemoteConfigManager.prototype.fetchRemoteConfigData = function (desiredVersion, context) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
139
|
+
var _a, remoteConfigMaxFetchAttempts, remoteConfigRetryIntervalMs, i, remoteConfigData, e_3;
|
|
140
|
+
return __generator(this, function (_b) {
|
|
141
|
+
switch (_b.label) {
|
|
142
|
+
case 0:
|
|
143
|
+
_b.trys.push([0, 7, , 8]);
|
|
144
|
+
_a = this.config, remoteConfigMaxFetchAttempts = _a.remoteConfigMaxFetchAttempts, remoteConfigRetryIntervalMs = _a.remoteConfigRetryIntervalMs;
|
|
145
|
+
i = 0;
|
|
146
|
+
_b.label = 1;
|
|
147
|
+
case 1:
|
|
148
|
+
if (!(i < remoteConfigMaxFetchAttempts)) return [3 /*break*/, 6];
|
|
149
|
+
return [4 /*yield*/, this.serviceClient.fetch({ version: desiredVersion })];
|
|
150
|
+
case 2:
|
|
151
|
+
remoteConfigData = _b.sent();
|
|
152
|
+
if (!(!!remoteConfigData && remoteConfigData.version >= desiredVersion)) return [3 /*break*/, 3];
|
|
153
|
+
return [2 /*return*/, remoteConfigData];
|
|
154
|
+
case 3: return [4 /*yield*/, this.sleepBetweenFetchAttempts(remoteConfigRetryIntervalMs)];
|
|
155
|
+
case 4:
|
|
156
|
+
_b.sent();
|
|
157
|
+
_b.label = 5;
|
|
158
|
+
case 5:
|
|
159
|
+
i++;
|
|
160
|
+
return [3 /*break*/, 1];
|
|
161
|
+
case 6:
|
|
162
|
+
context.logger.debug("unable to fetch remote config version ".concat(desiredVersion, " or higher: reached ").concat(remoteConfigMaxFetchAttempts, " fetch attempts"), {
|
|
163
|
+
errorType: constants_1.WRITE_REMOTE_CONFIG_ERROR_NAME,
|
|
164
|
+
});
|
|
165
|
+
return [3 /*break*/, 8];
|
|
166
|
+
case 7:
|
|
167
|
+
e_3 = _b.sent();
|
|
168
|
+
context.logger.debug("unable to fetch remote config version ".concat(desiredVersion, " or higher: ").concat(e_3), {
|
|
169
|
+
errorType: constants_1.WRITE_REMOTE_CONFIG_ERROR_NAME,
|
|
170
|
+
});
|
|
171
|
+
return [3 /*break*/, 8];
|
|
172
|
+
case 8: return [2 /*return*/, null];
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
};
|
|
177
|
+
DefaultRemoteConfigManager.prototype.sleepBetweenFetchAttempts = function (ms) {
|
|
178
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
179
|
+
return __generator(this, function (_a) {
|
|
180
|
+
switch (_a.label) {
|
|
181
|
+
case 0: return [4 /*yield*/, (0, utils_1.sleep)(ms)];
|
|
182
|
+
case 1:
|
|
183
|
+
_a.sent();
|
|
184
|
+
return [2 /*return*/];
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
});
|
|
188
|
+
};
|
|
189
|
+
return DefaultRemoteConfigManager;
|
|
190
|
+
}());
|
|
191
|
+
exports.DefaultRemoteConfigManager = DefaultRemoteConfigManager;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./IRemoteConfigManager.js"), exports);
|
|
18
|
+
__exportStar(require("./DefaultRemoteConfigManager.js"), exports);
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./RemoteConfigData"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
17
|
+
__exportStar(require("./RemoteConfigData.js"), exports);
|
|
18
|
+
__exportStar(require("./RemoteConfigNotifyRequestPayload.js"), exports);
|
|
@@ -37,8 +37,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.HttpRemoteConfigServiceClient = void 0;
|
|
40
|
-
var http_1 = require("../../../http");
|
|
41
|
-
var constants_1 = require("../constants");
|
|
40
|
+
var http_1 = require("../../../http/index.js");
|
|
41
|
+
var constants_1 = require("../constants.js");
|
|
42
42
|
var HttpRemoteConfigServiceClient = /** @class */ (function () {
|
|
43
43
|
function HttpRemoteConfigServiceClient(config, httpClient) {
|
|
44
44
|
this.config = config;
|
|
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./IRemoteConfigServiceClient"), exports);
|
|
18
|
-
__exportStar(require("./HttpRemoteConfigServiceClient"), exports);
|
|
17
|
+
__exportStar(require("./IRemoteConfigServiceClient.js"), exports);
|
|
18
|
+
__exportStar(require("./HttpRemoteConfigServiceClient.js"), exports);
|
|
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./IRemoteConfigStorageClient"), exports);
|
|
17
|
+
__exportStar(require("./IRemoteConfigStorageClient.js"), exports);
|