@kubesense/kubesense-browser-rum-core 1.7.0 → 2.0.0-beta.1
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/LICENSE +1 -1
- package/cjs/boot/preStartRum.d.ts +4 -3
- package/cjs/boot/preStartRum.js +229 -204
- package/cjs/boot/preStartRum.js.map +1 -1
- package/cjs/boot/rumPublicApi.d.ts +190 -51
- package/cjs/boot/rumPublicApi.js +267 -164
- package/cjs/boot/rumPublicApi.js.map +1 -1
- package/cjs/boot/startRum.d.ts +42 -31
- package/cjs/boot/startRum.js +157 -150
- package/cjs/boot/startRum.js.map +1 -1
- package/cjs/browser/cookieObservable.d.ts +1 -5
- package/cjs/browser/cookieObservable.js +30 -34
- package/cjs/browser/cookieObservable.js.map +1 -1
- package/cjs/browser/domMutationObservable.d.ts +3 -3
- package/cjs/browser/domMutationObservable.js +29 -53
- package/cjs/browser/domMutationObservable.js.map +1 -1
- package/cjs/browser/htmlDomUtils.d.ts +5 -0
- package/cjs/browser/htmlDomUtils.js +38 -28
- package/cjs/browser/htmlDomUtils.js.map +1 -1
- package/cjs/browser/locationChangeObservable.d.ts +1 -2
- package/cjs/browser/locationChangeObservable.js +44 -45
- package/cjs/browser/locationChangeObservable.js.map +1 -1
- package/cjs/browser/performanceObservable.d.ts +4 -4
- package/cjs/browser/performanceObservable.js +50 -114
- package/cjs/browser/performanceObservable.js.map +1 -1
- package/cjs/browser/performanceUtils.d.ts +13 -1
- package/cjs/browser/performanceUtils.js +63 -37
- package/cjs/browser/performanceUtils.js.map +1 -1
- package/cjs/browser/scroll.js +17 -28
- package/cjs/browser/scroll.js.map +1 -1
- package/cjs/browser/viewportObservable.d.ts +2 -3
- package/cjs/browser/viewportObservable.js +29 -31
- package/cjs/browser/viewportObservable.js.map +1 -1
- package/cjs/browser/windowOpenObservable.js +11 -7
- package/cjs/browser/windowOpenObservable.js.map +1 -1
- package/cjs/domain/action/actionCollection.d.ts +11 -12
- package/cjs/domain/action/actionCollection.js +82 -89
- package/cjs/domain/action/actionCollection.js.map +1 -1
- package/cjs/domain/action/actionNameConstants.js +10 -9
- package/cjs/domain/action/actionNameConstants.js.map +1 -1
- package/cjs/domain/action/clickChain.js +51 -54
- package/cjs/domain/action/clickChain.js.map +1 -1
- package/cjs/domain/action/computeFrustration.js +30 -62
- package/cjs/domain/action/computeFrustration.js.map +1 -1
- package/cjs/domain/action/frustrationIgnore.d.ts +9 -0
- package/cjs/domain/action/frustrationIgnore.js +32 -0
- package/cjs/domain/action/frustrationIgnore.js.map +1 -0
- package/cjs/domain/action/getActionNameFromElement.js +141 -217
- package/cjs/domain/action/getActionNameFromElement.js.map +1 -1
- package/cjs/domain/action/interactionSelectorCache.d.ts +1 -1
- package/cjs/domain/action/interactionSelectorCache.js +17 -18
- package/cjs/domain/action/interactionSelectorCache.js.map +1 -1
- package/cjs/domain/action/isActionChildEvent.d.ts +2 -0
- package/cjs/domain/action/isActionChildEvent.js +8 -0
- package/cjs/domain/action/isActionChildEvent.js.map +1 -0
- package/cjs/domain/action/listenActionEvents.d.ts +2 -3
- package/cjs/domain/action/listenActionEvents.js +51 -55
- package/cjs/domain/action/listenActionEvents.js.map +1 -1
- package/cjs/domain/action/trackClickActions.d.ts +15 -21
- package/cjs/domain/action/trackClickActions.js +188 -226
- package/cjs/domain/action/trackClickActions.js.map +1 -1
- package/cjs/domain/action/trackManualActions.d.ts +45 -0
- package/cjs/domain/action/trackManualActions.js +48 -0
- package/cjs/domain/action/trackManualActions.js.map +1 -0
- package/cjs/domain/assembly.d.ts +1 -2
- package/cjs/domain/assembly.js +80 -95
- package/cjs/domain/assembly.js.map +1 -1
- package/cjs/domain/configuration/configuration.d.ts +575 -81
- package/cjs/domain/configuration/configuration.js +464 -199
- package/cjs/domain/configuration/configuration.js.map +1 -1
- package/cjs/domain/configuration/index.d.ts +1 -0
- package/cjs/domain/configuration/index.js +27 -21
- package/cjs/domain/configuration/jsonPathParser.js +125 -139
- package/cjs/domain/configuration/jsonPathParser.js.map +1 -1
- package/cjs/domain/configuration/remoteConfiguration.d.ts +18 -5
- package/cjs/domain/configuration/remoteConfiguration.js +268 -226
- package/cjs/domain/configuration/remoteConfiguration.js.map +1 -1
- package/cjs/domain/configuration/remoteConfiguration.types.d.ts +49 -0
- package/cjs/domain/configuration/remoteConfigurationCache.d.ts +42 -0
- package/cjs/domain/configuration/remoteConfigurationCache.js +95 -0
- package/cjs/domain/configuration/remoteConfigurationCache.js.map +1 -0
- package/cjs/domain/configuration/remoteSdkConfiguration.d.ts +11 -2
- package/cjs/domain/configuration/remoteSdkConfiguration.js +185 -117
- package/cjs/domain/configuration/remoteSdkConfiguration.js.map +1 -1
- package/cjs/domain/configuration/sessionReplayRoutes.d.ts +1 -6
- package/cjs/domain/configuration/sessionReplayRoutes.js +20 -63
- package/cjs/domain/configuration/sessionReplayRoutes.js.map +1 -1
- package/cjs/domain/contexts/ciVisibilityContext.d.ts +2 -4
- package/cjs/domain/contexts/ciVisibilityContext.js +36 -32
- package/cjs/domain/contexts/ciVisibilityContext.js.map +1 -1
- package/cjs/domain/contexts/connectivityContext.d.ts +2 -2
- package/cjs/domain/contexts/connectivityContext.js +10 -9
- package/cjs/domain/contexts/connectivityContext.js.map +1 -1
- package/cjs/domain/contexts/defaultContext.d.ts +3 -3
- package/cjs/domain/contexts/defaultContext.js +28 -32
- package/cjs/domain/contexts/defaultContext.js.map +1 -1
- package/cjs/domain/contexts/displayContext.d.ts +2 -3
- package/cjs/domain/contexts/displayContext.js +22 -26
- package/cjs/domain/contexts/displayContext.js.map +1 -1
- package/cjs/domain/contexts/featureFlagContext.d.ts +2 -2
- package/cjs/domain/contexts/featureFlagContext.js +38 -50
- package/cjs/domain/contexts/featureFlagContext.js.map +1 -1
- package/cjs/domain/contexts/internalContext.d.ts +2 -3
- package/cjs/domain/contexts/internalContext.js +26 -22
- package/cjs/domain/contexts/internalContext.js.map +1 -1
- package/cjs/domain/contexts/pageStateHistory.d.ts +3 -4
- package/cjs/domain/contexts/pageStateHistory.js +76 -96
- package/cjs/domain/contexts/pageStateHistory.js.map +1 -1
- package/cjs/domain/contexts/sessionContext.d.ts +9 -3
- package/cjs/domain/contexts/sessionContext.js +31 -45
- package/cjs/domain/contexts/sessionContext.js.map +1 -1
- package/cjs/domain/contexts/sourceCodeMfeContext.d.ts +10 -0
- package/cjs/domain/contexts/sourceCodeMfeContext.js +35 -0
- package/cjs/domain/contexts/sourceCodeMfeContext.js.map +1 -0
- package/cjs/domain/contexts/syntheticsContext.d.ts +2 -2
- package/cjs/domain/contexts/syntheticsContext.js +19 -23
- package/cjs/domain/contexts/syntheticsContext.js.map +1 -1
- package/cjs/domain/contexts/trackingConsentContext.d.ts +2 -2
- package/cjs/domain/contexts/trackingConsentContext.js +10 -12
- package/cjs/domain/contexts/trackingConsentContext.js.map +1 -1
- package/cjs/domain/contexts/urlContexts.d.ts +4 -3
- package/cjs/domain/contexts/urlContexts.js +65 -61
- package/cjs/domain/contexts/urlContexts.js.map +1 -1
- package/cjs/domain/contexts/userAgentDataContext.d.ts +2 -2
- package/cjs/domain/contexts/userAgentDataContext.js +20 -29
- package/cjs/domain/contexts/userAgentDataContext.js.map +1 -1
- package/cjs/domain/contexts/viewHistory.d.ts +5 -2
- package/cjs/domain/contexts/viewHistory.js +41 -45
- package/cjs/domain/contexts/viewHistory.js.map +1 -1
- package/cjs/domain/discardNegativeDuration.d.ts +1 -1
- package/cjs/domain/discardNegativeDuration.js +6 -5
- package/cjs/domain/discardNegativeDuration.js.map +1 -1
- package/cjs/domain/error/errorCollection.d.ts +3 -3
- package/cjs/domain/error/errorCollection.js +67 -68
- package/cjs/domain/error/errorCollection.js.map +1 -1
- package/cjs/domain/error/trackReportError.d.ts +1 -2
- package/cjs/domain/error/trackReportError.js +10 -14
- package/cjs/domain/error/trackReportError.js.map +1 -1
- package/cjs/domain/event/eventCollection.d.ts +2 -1
- package/cjs/domain/event/eventCollection.js +21 -22
- package/cjs/domain/event/eventCollection.js.map +1 -1
- package/cjs/domain/eventTracker.d.ts +37 -0
- package/cjs/domain/eventTracker.js +94 -0
- package/cjs/domain/eventTracker.js.map +1 -0
- package/cjs/domain/extractRegexMatch.d.ts +5 -0
- package/cjs/domain/extractRegexMatch.js +16 -0
- package/cjs/domain/extractRegexMatch.js.map +1 -0
- package/cjs/domain/getComposedPathSelector.d.ts +22 -0
- package/cjs/domain/getComposedPathSelector.js +95 -0
- package/cjs/domain/getComposedPathSelector.js.map +1 -0
- package/cjs/domain/getSelectorFromElement.d.ts +18 -6
- package/cjs/domain/getSelectorFromElement.js +199 -191
- package/cjs/domain/getSelectorFromElement.js.map +1 -1
- package/cjs/domain/getSessionReplayUrl.d.ts +2 -2
- package/cjs/domain/getSessionReplayUrl.js +17 -30
- package/cjs/domain/getSessionReplayUrl.js.map +1 -1
- package/cjs/domain/hooks.d.ts +26 -17
- package/cjs/domain/hooks.js +12 -5
- package/cjs/domain/hooks.js.map +1 -1
- package/cjs/domain/lifeCycle.d.ts +26 -12
- package/cjs/domain/lifeCycle.js +28 -5
- package/cjs/domain/lifeCycle.js.map +1 -1
- package/cjs/domain/limitModification.d.ts +5 -1
- package/cjs/domain/limitModification.js +32 -36
- package/cjs/domain/limitModification.js.map +1 -1
- package/cjs/domain/longTask/longTaskCollection.d.ts +0 -13
- package/cjs/domain/longTask/longTaskCollection.js +75 -87
- package/cjs/domain/longTask/longTaskCollection.js.map +1 -1
- package/cjs/domain/plugins.d.ts +37 -14
- package/cjs/domain/plugins.js +22 -13
- package/cjs/domain/plugins.js.map +1 -1
- package/cjs/domain/privacy.d.ts +6 -1
- package/cjs/domain/privacy.js +143 -286
- package/cjs/domain/privacy.js.map +1 -1
- package/cjs/domain/privacyConstants.js +43 -34
- package/cjs/domain/privacyConstants.js.map +1 -1
- package/cjs/domain/requestCollection.d.ts +6 -5
- package/cjs/domain/requestCollection.js +82 -105
- package/cjs/domain/requestCollection.js.map +1 -1
- package/cjs/domain/resource/graphql.d.ts +1 -1
- package/cjs/domain/resource/graphql.js +85 -86
- package/cjs/domain/resource/graphql.js.map +1 -1
- package/cjs/domain/resource/requestRegistry.js +30 -38
- package/cjs/domain/resource/requestRegistry.js.map +1 -1
- package/cjs/domain/resource/resourceCollection.d.ts +5 -3
- package/cjs/domain/resource/resourceCollection.js +241 -175
- package/cjs/domain/resource/resourceCollection.js.map +1 -1
- package/cjs/domain/resource/resourceUtils.d.ts +13 -13
- package/cjs/domain/resource/resourceUtils.js +323 -221
- package/cjs/domain/resource/resourceUtils.js.map +1 -1
- package/cjs/domain/resource/trackManualResources.d.ts +55 -0
- package/cjs/domain/resource/trackManualResources.js +53 -0
- package/cjs/domain/resource/trackManualResources.js.map +1 -0
- package/cjs/domain/resource/webSocketCollection.d.ts +46 -0
- package/cjs/domain/resource/webSocketCollection.js +163 -0
- package/cjs/domain/resource/webSocketCollection.js.map +1 -0
- package/cjs/domain/session/session.types.d.ts +4 -0
- package/cjs/domain/sessionReplayState.d.ts +8 -0
- package/cjs/domain/sessionReplayState.js +19 -0
- package/cjs/domain/sessionReplayState.js.map +1 -0
- package/cjs/domain/startCustomerDataTelemetry.js +39 -43
- package/cjs/domain/startCustomerDataTelemetry.js.map +1 -1
- package/cjs/domain/tracing/getDocumentTraceId.d.ts +1 -1
- package/cjs/domain/tracing/getDocumentTraceId.js +42 -63
- package/cjs/domain/tracing/getDocumentTraceId.js.map +1 -1
- package/cjs/domain/tracing/identifier.js +13 -46
- package/cjs/domain/tracing/identifier.js.map +1 -1
- package/cjs/domain/tracing/tracer.d.ts +2 -5
- package/cjs/domain/tracing/tracer.js +110 -150
- package/cjs/domain/tracing/tracer.js.map +1 -1
- package/cjs/domain/trackEventCounts.js +43 -48
- package/cjs/domain/trackEventCounts.js.map +1 -1
- package/cjs/domain/view/bfCacheSupport.d.ts +1 -2
- package/cjs/domain/view/bfCacheSupport.js +10 -11
- package/cjs/domain/view/bfCacheSupport.js.map +1 -1
- package/cjs/domain/view/trackViewEventCounts.js +14 -13
- package/cjs/domain/view/trackViewEventCounts.js.map +1 -1
- package/cjs/domain/view/trackViews.d.ts +8 -2
- package/cjs/domain/view/trackViews.js +221 -270
- package/cjs/domain/view/trackViews.js.map +1 -1
- package/cjs/domain/view/viewCollection.d.ts +4 -3
- package/cjs/domain/view/viewCollection.js +124 -148
- package/cjs/domain/view/viewCollection.js.map +1 -1
- package/cjs/domain/view/viewDiff.d.ts +22 -0
- package/cjs/domain/view/viewDiff.js +62 -0
- package/cjs/domain/view/viewDiff.js.map +1 -0
- package/cjs/domain/view/viewMetrics/getClsAttributionImpactedArea.js +20 -22
- package/cjs/domain/view/viewMetrics/getClsAttributionImpactedArea.js.map +1 -1
- package/cjs/domain/view/viewMetrics/interactionCountPolyfill.d.ts +1 -0
- package/cjs/domain/view/viewMetrics/interactionCountPolyfill.js +35 -33
- package/cjs/domain/view/viewMetrics/interactionCountPolyfill.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackBfcacheMetrics.d.ts +1 -1
- package/cjs/domain/view/viewMetrics/trackBfcacheMetrics.js +14 -13
- package/cjs/domain/view/viewMetrics/trackBfcacheMetrics.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackCommonViewMetrics.d.ts +4 -2
- package/cjs/domain/view/viewMetrics/trackCommonViewMetrics.js +51 -34
- package/cjs/domain/view/viewMetrics/trackCommonViewMetrics.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackCumulativeLayoutShift.d.ts +1 -1
- package/cjs/domain/view/viewMetrics/trackCumulativeLayoutShift.js +106 -122
- package/cjs/domain/view/viewMetrics/trackCumulativeLayoutShift.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackFirstContentfulPaint.d.ts +2 -3
- package/cjs/domain/view/viewMetrics/trackFirstContentfulPaint.js +26 -34
- package/cjs/domain/view/viewMetrics/trackFirstContentfulPaint.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackFirstHidden.d.ts +2 -3
- package/cjs/domain/view/viewMetrics/trackFirstHidden.js +31 -31
- package/cjs/domain/view/viewMetrics/trackFirstHidden.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackInitialViewMetrics.d.ts +1 -3
- package/cjs/domain/view/viewMetrics/trackInitialViewMetrics.js +33 -38
- package/cjs/domain/view/viewMetrics/trackInitialViewMetrics.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackInteractionToNextPaint.d.ts +10 -1
- package/cjs/domain/view/viewMetrics/trackInteractionToNextPaint.js +202 -144
- package/cjs/domain/view/viewMetrics/trackInteractionToNextPaint.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackLargestContentfulPaint.d.ts +6 -1
- package/cjs/domain/view/viewMetrics/trackLargestContentfulPaint.js +65 -55
- package/cjs/domain/view/viewMetrics/trackLargestContentfulPaint.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackLoadingTime.d.ts +2 -1
- package/cjs/domain/view/viewMetrics/trackLoadingTime.js +42 -46
- package/cjs/domain/view/viewMetrics/trackLoadingTime.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackNavigationTimings.d.ts +2 -3
- package/cjs/domain/view/viewMetrics/trackNavigationTimings.js +28 -36
- package/cjs/domain/view/viewMetrics/trackNavigationTimings.js.map +1 -1
- package/cjs/domain/view/viewMetrics/trackScrollMetrics.d.ts +3 -4
- package/cjs/domain/view/viewMetrics/trackScrollMetrics.js +63 -72
- package/cjs/domain/view/viewMetrics/trackScrollMetrics.js.map +1 -1
- package/cjs/domain/vital/vitalCollection.d.ts +44 -20
- package/cjs/domain/vital/vitalCollection.js +81 -109
- package/cjs/domain/vital/vitalCollection.js.map +1 -1
- package/cjs/domain/waitPageActivityEnd.d.ts +1 -4
- package/cjs/domain/waitPageActivityEnd.js +99 -119
- package/cjs/domain/waitPageActivityEnd.js.map +1 -1
- package/cjs/domainContext.types.d.ts +21 -13
- package/cjs/index.d.ts +11 -10
- package/cjs/index.js +84 -62
- package/cjs/rawRumEvent.types.d.ts +79 -13
- package/cjs/rawRumEvent.types.js +40 -27
- package/cjs/rawRumEvent.types.js.map +1 -1
- package/cjs/rumEvent.types.d.ts +906 -669
- package/cjs/transport/formDataTransport.js +43 -41
- package/cjs/transport/formDataTransport.js.map +1 -1
- package/cjs/transport/startRumBatch.d.ts +27 -3
- package/cjs/transport/startRumBatch.js +132 -31
- package/cjs/transport/startRumBatch.js.map +1 -1
- package/cjs/transport/startRumEventBridge.js +10 -8
- package/cjs/transport/startRumEventBridge.js.map +1 -1
- package/esm/boot/preStartRum.mjs +233 -0
- package/esm/boot/preStartRum.mjs.map +1 -0
- package/esm/boot/rumPublicApi.mjs +271 -0
- package/esm/boot/rumPublicApi.mjs.map +1 -0
- package/esm/boot/startRum.mjs +159 -0
- package/esm/boot/startRum.mjs.map +1 -0
- package/esm/browser/cookieObservable.mjs +34 -0
- package/esm/browser/cookieObservable.mjs.map +1 -0
- package/esm/browser/domMutationObservable.mjs +33 -0
- package/esm/browser/domMutationObservable.mjs.map +1 -0
- package/esm/browser/htmlDomUtils.mjs +48 -0
- package/esm/browser/htmlDomUtils.mjs.map +1 -0
- package/esm/browser/locationChangeObservable.mjs +50 -0
- package/esm/browser/locationChangeObservable.mjs.map +1 -0
- package/esm/browser/performanceObservable.mjs +60 -0
- package/esm/browser/performanceObservable.mjs.map +1 -0
- package/esm/browser/performanceUtils.mjs +64 -0
- package/esm/browser/performanceUtils.mjs.map +1 -0
- package/esm/browser/scroll.mjs +21 -0
- package/esm/browser/scroll.mjs.map +1 -0
- package/esm/browser/viewportObservable.mjs +33 -0
- package/esm/browser/viewportObservable.mjs.map +1 -0
- package/esm/browser/windowOpenObservable.mjs +14 -0
- package/esm/browser/windowOpenObservable.mjs.map +1 -0
- package/esm/domain/action/actionCollection.mjs +89 -0
- package/esm/domain/action/actionCollection.mjs.map +1 -0
- package/esm/domain/action/actionNameConstants.mjs +11 -0
- package/esm/domain/action/actionNameConstants.mjs.map +1 -0
- package/esm/domain/action/clickChain.mjs +57 -0
- package/esm/domain/action/clickChain.mjs.map +1 -0
- package/esm/domain/action/computeFrustration.mjs +36 -0
- package/esm/domain/action/computeFrustration.mjs.map +1 -0
- package/esm/domain/action/frustrationIgnore.mjs +31 -0
- package/esm/domain/action/frustrationIgnore.mjs.map +1 -0
- package/esm/domain/action/getActionNameFromElement.mjs +163 -0
- package/esm/domain/action/getActionNameFromElement.mjs.map +1 -0
- package/esm/domain/action/interactionSelectorCache.mjs +19 -0
- package/esm/domain/action/interactionSelectorCache.mjs.map +1 -0
- package/esm/domain/action/isActionChildEvent.mjs +8 -0
- package/esm/domain/action/isActionChildEvent.mjs.map +1 -0
- package/esm/domain/action/listenActionEvents.mjs +57 -0
- package/esm/domain/action/listenActionEvents.mjs.map +1 -0
- package/esm/domain/action/trackClickActions.mjs +198 -0
- package/esm/domain/action/trackClickActions.mjs.map +1 -0
- package/esm/domain/action/trackManualActions.mjs +48 -0
- package/esm/domain/action/trackManualActions.mjs.map +1 -0
- package/esm/domain/assembly.mjs +87 -0
- package/esm/domain/assembly.mjs.map +1 -0
- package/esm/domain/configuration/configuration.mjs +474 -0
- package/esm/domain/configuration/configuration.mjs.map +1 -0
- package/esm/domain/configuration/index.mjs +6 -0
- package/esm/domain/configuration/jsonPathParser.mjs +145 -0
- package/esm/domain/configuration/jsonPathParser.mjs.map +1 -0
- package/esm/domain/configuration/remoteConfiguration.mjs +279 -0
- package/esm/domain/configuration/remoteConfiguration.mjs.map +1 -0
- package/esm/domain/configuration/remoteConfigurationCache.mjs +92 -0
- package/esm/domain/configuration/remoteConfigurationCache.mjs.map +1 -0
- package/esm/domain/configuration/remoteSdkConfiguration.mjs +208 -0
- package/esm/domain/configuration/remoteSdkConfiguration.mjs.map +1 -0
- package/esm/domain/configuration/sessionReplayRoutes.mjs +26 -0
- package/esm/domain/configuration/sessionReplayRoutes.mjs.map +1 -0
- package/esm/domain/contexts/ciVisibilityContext.mjs +37 -0
- package/esm/domain/contexts/ciVisibilityContext.mjs.map +1 -0
- package/esm/domain/contexts/connectivityContext.mjs +12 -0
- package/esm/domain/contexts/connectivityContext.mjs.map +1 -0
- package/esm/domain/contexts/defaultContext.mjs +30 -0
- package/esm/domain/contexts/defaultContext.mjs.map +1 -0
- package/esm/domain/contexts/displayContext.mjs +24 -0
- package/esm/domain/contexts/displayContext.mjs.map +1 -0
- package/esm/domain/contexts/featureFlagContext.mjs +40 -0
- package/esm/domain/contexts/featureFlagContext.mjs.map +1 -0
- package/esm/domain/contexts/internalContext.mjs +30 -0
- package/esm/domain/contexts/internalContext.mjs.map +1 -0
- package/esm/domain/contexts/pageStateHistory.mjs +82 -0
- package/esm/domain/contexts/pageStateHistory.mjs.map +1 -0
- package/esm/domain/contexts/sessionContext.mjs +33 -0
- package/esm/domain/contexts/sessionContext.mjs.map +1 -0
- package/esm/domain/contexts/sourceCodeMfeContext.mjs +35 -0
- package/esm/domain/contexts/sourceCodeMfeContext.mjs.map +1 -0
- package/esm/domain/contexts/syntheticsContext.mjs +21 -0
- package/esm/domain/contexts/syntheticsContext.mjs.map +1 -0
- package/esm/domain/contexts/trackingConsentContext.mjs +12 -0
- package/esm/domain/contexts/trackingConsentContext.mjs.map +1 -0
- package/esm/domain/contexts/urlContexts.mjs +67 -0
- package/esm/domain/contexts/urlContexts.mjs.map +1 -0
- package/esm/domain/contexts/userAgentDataContext.mjs +22 -0
- package/esm/domain/contexts/userAgentDataContext.mjs.map +1 -0
- package/esm/domain/contexts/viewHistory.mjs +43 -0
- package/esm/domain/contexts/viewHistory.mjs.map +1 -0
- package/esm/domain/discardNegativeDuration.mjs +9 -0
- package/esm/domain/discardNegativeDuration.mjs.map +1 -0
- package/esm/domain/error/errorCollection.mjs +72 -0
- package/esm/domain/error/errorCollection.mjs.map +1 -0
- package/esm/domain/error/trackReportError.mjs +12 -0
- package/esm/domain/error/trackReportError.mjs.map +1 -0
- package/esm/domain/event/eventCollection.mjs +26 -0
- package/esm/domain/event/eventCollection.mjs.map +1 -0
- package/esm/domain/eventTracker.mjs +93 -0
- package/esm/domain/eventTracker.mjs.map +1 -0
- package/esm/domain/extractRegexMatch.mjs +16 -0
- package/esm/domain/extractRegexMatch.mjs.map +1 -0
- package/esm/domain/getComposedPathSelector.mjs +93 -0
- package/esm/domain/getComposedPathSelector.mjs.map +1 -0
- package/esm/domain/getSelectorFromElement.mjs +218 -0
- package/esm/domain/getSelectorFromElement.mjs.map +1 -0
- package/esm/domain/getSessionReplayUrl.mjs +20 -0
- package/esm/domain/getSessionReplayUrl.mjs.map +1 -0
- package/esm/domain/hooks.mjs +13 -0
- package/esm/domain/hooks.mjs.map +1 -0
- package/esm/domain/lifeCycle.mjs +28 -0
- package/esm/domain/lifeCycle.mjs.map +1 -0
- package/esm/domain/limitModification.mjs +42 -0
- package/esm/domain/limitModification.mjs.map +1 -0
- package/esm/domain/longTask/longTaskCollection.mjs +79 -0
- package/esm/domain/longTask/longTaskCollection.mjs.map +1 -0
- package/esm/domain/plugins.mjs +23 -0
- package/esm/domain/plugins.mjs.map +1 -0
- package/esm/domain/privacy.mjs +161 -0
- package/esm/domain/privacy.mjs.map +1 -0
- package/esm/domain/privacyConstants.mjs +36 -0
- package/esm/domain/privacyConstants.mjs.map +1 -0
- package/esm/domain/requestCollection.mjs +86 -0
- package/esm/domain/requestCollection.mjs.map +1 -0
- package/esm/domain/resource/graphql.mjs +93 -0
- package/esm/domain/resource/graphql.mjs.map +1 -0
- package/esm/domain/resource/requestRegistry.mjs +32 -0
- package/esm/domain/resource/requestRegistry.mjs.map +1 -0
- package/esm/domain/resource/resourceCollection.mjs +256 -0
- package/esm/domain/resource/resourceCollection.mjs.map +1 -0
- package/esm/domain/resource/resourceUtils.mjs +349 -0
- package/esm/domain/resource/resourceUtils.mjs.map +1 -0
- package/esm/domain/resource/trackManualResources.mjs +53 -0
- package/esm/domain/resource/trackManualResources.mjs.map +1 -0
- package/esm/domain/resource/webSocketCollection.mjs +160 -0
- package/esm/domain/resource/webSocketCollection.mjs.map +1 -0
- package/esm/domain/sessionReplayState.mjs +18 -0
- package/esm/domain/sessionReplayState.mjs.map +1 -0
- package/esm/domain/startCustomerDataTelemetry.mjs +51 -0
- package/esm/domain/startCustomerDataTelemetry.mjs.map +1 -0
- package/esm/domain/tracing/getDocumentTraceId.mjs +50 -0
- package/esm/domain/tracing/getDocumentTraceId.mjs.map +1 -0
- package/esm/domain/tracing/identifier.mjs +20 -0
- package/esm/domain/tracing/identifier.mjs.map +1 -0
- package/esm/domain/tracing/tracer.mjs +120 -0
- package/esm/domain/tracing/tracer.mjs.map +1 -0
- package/esm/domain/trackEventCounts.mjs +45 -0
- package/esm/domain/trackEventCounts.mjs.map +1 -0
- package/esm/domain/view/bfCacheSupport.mjs +12 -0
- package/esm/domain/view/bfCacheSupport.mjs.map +1 -0
- package/esm/domain/view/trackViewEventCounts.mjs +17 -0
- package/esm/domain/view/trackViewEventCounts.mjs.map +1 -0
- package/esm/domain/view/trackViews.mjs +230 -0
- package/esm/domain/view/trackViews.mjs.map +1 -0
- package/esm/domain/view/viewCollection.mjs +129 -0
- package/esm/domain/view/viewCollection.mjs.map +1 -0
- package/esm/domain/view/viewDiff.mjs +61 -0
- package/esm/domain/view/viewDiff.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.mjs +30 -0
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.mjs +45 -0
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.mjs +18 -0
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.mjs +54 -0
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.mjs +117 -0
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.mjs +29 -0
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackFirstHidden.mjs +33 -0
- package/esm/domain/view/viewMetrics/trackFirstHidden.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.mjs +36 -0
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.mjs +210 -0
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.mjs +70 -0
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackLoadingTime.mjs +46 -0
- package/esm/domain/view/viewMetrics/trackLoadingTime.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackNavigationTimings.mjs +35 -0
- package/esm/domain/view/viewMetrics/trackNavigationTimings.mjs.map +1 -0
- package/esm/domain/view/viewMetrics/trackScrollMetrics.mjs +66 -0
- package/esm/domain/view/viewMetrics/trackScrollMetrics.mjs.map +1 -0
- package/esm/domain/vital/vitalCollection.mjs +85 -0
- package/esm/domain/vital/vitalCollection.mjs.map +1 -0
- package/esm/domain/waitPageActivityEnd.mjs +107 -0
- package/esm/domain/waitPageActivityEnd.mjs.map +1 -0
- package/esm/index.mjs +23 -0
- package/esm/rawRumEvent.types.mjs +42 -0
- package/esm/rawRumEvent.types.mjs.map +1 -0
- package/esm/transport/formDataTransport.mjs +48 -0
- package/esm/transport/formDataTransport.mjs.map +1 -0
- package/esm/transport/startRumBatch.mjs +132 -0
- package/esm/transport/startRumBatch.mjs.map +1 -0
- package/esm/transport/startRumEventBridge.mjs +13 -0
- package/esm/transport/startRumEventBridge.mjs.map +1 -0
- package/package.json +19 -11
- package/src/boot/preStartRum.ts +216 -88
- package/src/boot/rumPublicApi.ts +358 -119
- package/src/boot/startRum.ts +88 -84
- package/src/browser/cookieObservable.ts +19 -28
- package/src/browser/domMutationObservable.ts +7 -12
- package/src/browser/htmlDomUtils.ts +15 -0
- package/src/browser/locationChangeObservable.ts +23 -12
- package/src/browser/performanceObservable.ts +23 -73
- package/src/browser/performanceUtils.ts +52 -4
- package/src/browser/viewportObservable.ts +4 -6
- package/src/domain/action/actionCollection.ts +94 -87
- package/src/domain/action/clickChain.ts +11 -10
- package/src/domain/action/computeFrustration.ts +19 -5
- package/src/domain/action/frustrationIgnore.ts +54 -0
- package/src/domain/action/getActionNameFromElement.ts +27 -61
- package/src/domain/action/interactionSelectorCache.ts +2 -2
- package/src/domain/action/isActionChildEvent.ts +6 -0
- package/src/domain/action/listenActionEvents.ts +2 -11
- package/src/domain/action/trackClickActions.ts +92 -82
- package/src/domain/action/trackManualActions.ts +104 -0
- package/src/domain/assembly.ts +57 -70
- package/src/domain/configuration/configuration.ts +587 -208
- package/src/domain/configuration/index.ts +1 -0
- package/src/domain/configuration/remoteConfiguration.ts +152 -29
- package/src/domain/configuration/remoteConfiguration.types.ts +51 -1
- package/src/domain/configuration/remoteConfigurationCache.ts +153 -0
- package/src/domain/configuration/remoteSdkConfiguration.ts +131 -13
- package/src/domain/configuration/sessionReplayRoutes.ts +2 -47
- package/src/domain/contexts/ciVisibilityContext.ts +23 -12
- package/src/domain/contexts/connectivityContext.ts +7 -10
- package/src/domain/contexts/defaultContext.ts +11 -14
- package/src/domain/contexts/displayContext.ts +8 -12
- package/src/domain/contexts/featureFlagContext.ts +5 -4
- package/src/domain/contexts/internalContext.ts +3 -3
- package/src/domain/contexts/pageStateHistory.ts +20 -31
- package/src/domain/contexts/sessionContext.ts +16 -22
- package/src/domain/contexts/sourceCodeMfeContext.ts +53 -0
- package/src/domain/contexts/syntheticsContext.ts +7 -17
- package/src/domain/contexts/trackingConsentContext.ts +7 -4
- package/src/domain/contexts/urlContexts.ts +13 -9
- package/src/domain/contexts/userAgentDataContext.ts +12 -13
- package/src/domain/contexts/viewHistory.ts +4 -3
- package/src/domain/discardNegativeDuration.ts +1 -1
- package/src/domain/error/errorCollection.ts +12 -22
- package/src/domain/error/trackReportError.ts +4 -7
- package/src/domain/event/eventCollection.ts +4 -2
- package/src/domain/eventTracker.ts +169 -0
- package/src/domain/extractRegexMatch.ts +15 -0
- package/src/domain/getComposedPathSelector.ts +130 -0
- package/src/domain/getSelectorFromElement.ts +125 -31
- package/src/domain/getSessionReplayUrl.ts +4 -13
- package/src/domain/hooks.ts +34 -21
- package/src/domain/lifeCycle.ts +21 -8
- package/src/domain/limitModification.ts +20 -4
- package/src/domain/longTask/longTaskCollection.ts +18 -47
- package/src/domain/plugins.ts +54 -25
- package/src/domain/privacy.ts +16 -24
- package/src/domain/requestCollection.ts +108 -97
- package/src/domain/resource/graphql.ts +71 -25
- package/src/domain/resource/requestRegistry.ts +1 -3
- package/src/domain/resource/resourceCollection.ts +319 -137
- package/src/domain/resource/resourceUtils.ts +24 -26
- package/src/domain/resource/trackManualResources.ts +121 -0
- package/src/domain/resource/webSocketCollection.ts +281 -0
- package/src/domain/session/session.types.ts +5 -0
- package/src/domain/sessionReplayState.ts +36 -0
- package/src/domain/startCustomerDataTelemetry.ts +2 -2
- package/src/domain/tracing/getDocumentTraceId.ts +5 -4
- package/src/domain/tracing/identifier.ts +6 -37
- package/src/domain/tracing/tracer.ts +22 -21
- package/src/domain/tracing/tracer.types.ts +3 -3
- package/src/domain/view/bfCacheSupport.ts +1 -6
- package/src/domain/view/trackViews.ts +40 -37
- package/src/domain/view/viewCollection.ts +29 -23
- package/src/domain/view/viewDiff.ts +115 -0
- package/src/domain/view/viewMetrics/interactionCountPolyfill.ts +13 -2
- package/src/domain/view/viewMetrics/trackBfcacheMetrics.ts +1 -1
- package/src/domain/view/viewMetrics/trackCommonViewMetrics.ts +27 -6
- package/src/domain/view/viewMetrics/trackCumulativeLayoutShift.ts +5 -3
- package/src/domain/view/viewMetrics/trackFirstContentfulPaint.ts +4 -9
- package/src/domain/view/viewMetrics/trackFirstHidden.ts +2 -8
- package/src/domain/view/viewMetrics/trackInitialViewMetrics.ts +4 -13
- package/src/domain/view/viewMetrics/trackInteractionToNextPaint.ts +180 -35
- package/src/domain/view/viewMetrics/trackLargestContentfulPaint.ts +47 -6
- package/src/domain/view/viewMetrics/trackLoadingTime.ts +4 -3
- package/src/domain/view/viewMetrics/trackNavigationTimings.ts +10 -18
- package/src/domain/view/viewMetrics/trackScrollMetrics.ts +23 -37
- package/src/domain/vital/vitalCollection.ts +83 -102
- package/src/domain/waitPageActivityEnd.ts +7 -11
- package/src/domainContext.types.ts +23 -15
- package/src/index.ts +17 -11
- package/src/rawRumEvent.types.ts +80 -26
- package/src/rumEvent.types.ts +730 -505
- package/src/transport/formDataTransport.ts +16 -6
- package/src/transport/startRumBatch.ts +181 -24
- package/cjs/browser/firstInputPolyfill.d.ts +0 -8
- package/cjs/browser/firstInputPolyfill.js +0 -68
- package/cjs/browser/firstInputPolyfill.js.map +0 -1
- package/cjs/domain/configuration/index.js.map +0 -1
- package/cjs/domain/configuration/remoteConfiguration.types.js +0 -7
- package/cjs/domain/configuration/remoteConfiguration.types.js.map +0 -1
- package/cjs/domain/error/trackConsoleError.d.ts +0 -4
- package/cjs/domain/error/trackConsoleError.js +0 -13
- package/cjs/domain/error/trackConsoleError.js.map +0 -1
- package/cjs/domain/resource/matchRequestResourceEntry.d.ts +0 -16
- package/cjs/domain/resource/matchRequestResourceEntry.js +0 -49
- package/cjs/domain/resource/matchRequestResourceEntry.js.map +0 -1
- package/cjs/domain/resource/retrieveInitialDocumentResourceTiming.d.ts +0 -4
- package/cjs/domain/resource/retrieveInitialDocumentResourceTiming.js +0 -24
- package/cjs/domain/resource/retrieveInitialDocumentResourceTiming.js.map +0 -1
- package/cjs/domain/rumSessionManager.d.ts +0 -36
- package/cjs/domain/rumSessionManager.js +0 -77
- package/cjs/domain/rumSessionManager.js.map +0 -1
- package/cjs/domain/sampler/sampler.d.ts +0 -10
- package/cjs/domain/sampler/sampler.js +0 -63
- package/cjs/domain/sampler/sampler.js.map +0 -1
- package/cjs/domain/tracing/sampler.d.ts +0 -10
- package/cjs/domain/tracing/sampler.js +0 -69
- package/cjs/domain/tracing/sampler.js.map +0 -1
- package/cjs/domain/tracing/tracer.types.js +0 -3
- package/cjs/domain/tracing/tracer.types.js.map +0 -1
- package/cjs/domain/view/viewMetrics/startInitialViewMetricsTelemetry.d.ts +0 -6
- package/cjs/domain/view/viewMetrics/startInitialViewMetricsTelemetry.js +0 -44
- package/cjs/domain/view/viewMetrics/startInitialViewMetricsTelemetry.js.map +0 -1
- package/cjs/domain/view/viewMetrics/trackFirstInput.d.ts +0 -19
- package/cjs/domain/view/viewMetrics/trackFirstInput.js +0 -43
- package/cjs/domain/view/viewMetrics/trackFirstInput.js.map +0 -1
- package/cjs/domainContext.types.js +0 -6
- package/cjs/domainContext.types.js.map +0 -1
- package/cjs/index.js.map +0 -1
- package/cjs/rumEvent.types.js +0 -7
- package/cjs/rumEvent.types.js.map +0 -1
- package/esm/boot/preStartRum.d.ts +0 -7
- package/esm/boot/preStartRum.js +0 -205
- package/esm/boot/preStartRum.js.map +0 -1
- package/esm/boot/rumPublicApi.d.ts +0 -409
- package/esm/boot/rumPublicApi.js +0 -165
- package/esm/boot/rumPublicApi.js.map +0 -1
- package/esm/boot/startRum.d.ts +0 -109
- package/esm/boot/startRum.js +0 -149
- package/esm/boot/startRum.js.map +0 -1
- package/esm/browser/cookieObservable.d.ts +0 -8
- package/esm/browser/cookieObservable.js +0 -35
- package/esm/browser/cookieObservable.js.map +0 -1
- package/esm/browser/domMutationObservable.d.ts +0 -27
- package/esm/browser/domMutationObservable.js +0 -54
- package/esm/browser/domMutationObservable.js.map +0 -1
- package/esm/browser/firstInputPolyfill.d.ts +0 -8
- package/esm/browser/firstInputPolyfill.js +0 -65
- package/esm/browser/firstInputPolyfill.js.map +0 -1
- package/esm/browser/htmlDomUtils.d.ts +0 -13
- package/esm/browser/htmlDomUtils.js +0 -36
- package/esm/browser/htmlDomUtils.js.map +0 -1
- package/esm/browser/locationChangeObservable.d.ts +0 -7
- package/esm/browser/locationChangeObservable.js +0 -48
- package/esm/browser/locationChangeObservable.js.map +0 -1
- package/esm/browser/performanceObservable.d.ts +0 -174
- package/esm/browser/performanceObservable.js +0 -121
- package/esm/browser/performanceObservable.js.map +0 -1
- package/esm/browser/performanceUtils.d.ts +0 -7
- package/esm/browser/performanceUtils.js +0 -38
- package/esm/browser/performanceUtils.js.map +0 -1
- package/esm/browser/scroll.d.ts +0 -2
- package/esm/browser/scroll.js +0 -29
- package/esm/browser/scroll.js.map +0 -1
- package/esm/browser/viewportObservable.d.ts +0 -10
- package/esm/browser/viewportObservable.js +0 -32
- package/esm/browser/viewportObservable.js.map +0 -1
- package/esm/browser/windowOpenObservable.d.ts +0 -5
- package/esm/browser/windowOpenObservable.js +0 -7
- package/esm/browser/windowOpenObservable.js.map +0 -1
- package/esm/domain/action/actionCollection.d.ts +0 -21
- package/esm/domain/action/actionCollection.js +0 -93
- package/esm/domain/action/actionCollection.js.map +0 -1
- package/esm/domain/action/actionNameConstants.d.ts +0 -18
- package/esm/domain/action/actionNameConstants.js +0 -8
- package/esm/domain/action/actionNameConstants.js.map +0 -1
- package/esm/domain/action/clickChain.d.ts +0 -8
- package/esm/domain/action/clickChain.js +0 -57
- package/esm/domain/action/clickChain.js.map +0 -1
- package/esm/domain/action/computeFrustration.d.ts +0 -6
- package/esm/domain/action/computeFrustration.js +0 -65
- package/esm/domain/action/computeFrustration.js.map +0 -1
- package/esm/domain/action/getActionNameFromElement.d.ts +0 -4
- package/esm/domain/action/getActionNameFromElement.js +0 -236
- package/esm/domain/action/getActionNameFromElement.js.map +0 -1
- package/esm/domain/action/interactionSelectorCache.d.ts +0 -5
- package/esm/domain/action/interactionSelectorCache.js +0 -18
- package/esm/domain/action/interactionSelectorCache.js.map +0 -1
- package/esm/domain/action/listenActionEvents.d.ts +0 -19
- package/esm/domain/action/listenActionEvents.js +0 -58
- package/esm/domain/action/listenActionEvents.js.map +0 -1
- package/esm/domain/action/trackClickActions.d.ts +0 -81
- package/esm/domain/action/trackClickActions.js +0 -232
- package/esm/domain/action/trackClickActions.js.map +0 -1
- package/esm/domain/assembly.d.ts +0 -5
- package/esm/domain/assembly.js +0 -99
- package/esm/domain/assembly.js.map +0 -1
- package/esm/domain/configuration/configuration.d.ts +0 -358
- package/esm/domain/configuration/configuration.js +0 -209
- package/esm/domain/configuration/configuration.js.map +0 -1
- package/esm/domain/configuration/index.d.ts +0 -4
- package/esm/domain/configuration/index.js +0 -5
- package/esm/domain/configuration/index.js.map +0 -1
- package/esm/domain/configuration/jsonPathParser.d.ts +0 -28
- package/esm/domain/configuration/jsonPathParser.js +0 -156
- package/esm/domain/configuration/jsonPathParser.js.map +0 -1
- package/esm/domain/configuration/remoteConfiguration.d.ts +0 -39
- package/esm/domain/configuration/remoteConfiguration.js +0 -236
- package/esm/domain/configuration/remoteConfiguration.js.map +0 -1
- package/esm/domain/configuration/remoteConfiguration.types.d.ts +0 -138
- package/esm/domain/configuration/remoteConfiguration.types.js +0 -6
- package/esm/domain/configuration/remoteConfiguration.types.js.map +0 -1
- package/esm/domain/configuration/remoteSdkConfiguration.d.ts +0 -18
- package/esm/domain/configuration/remoteSdkConfiguration.js +0 -137
- package/esm/domain/configuration/remoteSdkConfiguration.js.map +0 -1
- package/esm/domain/configuration/sessionReplayRoutes.d.ts +0 -35
- package/esm/domain/configuration/sessionReplayRoutes.js +0 -65
- package/esm/domain/configuration/sessionReplayRoutes.js.map +0 -1
- package/esm/domain/contexts/ciVisibilityContext.d.ts +0 -12
- package/esm/domain/contexts/ciVisibilityContext.js +0 -30
- package/esm/domain/contexts/ciVisibilityContext.js.map +0 -1
- package/esm/domain/contexts/connectivityContext.d.ts +0 -2
- package/esm/domain/contexts/connectivityContext.js +0 -8
- package/esm/domain/contexts/connectivityContext.js.map +0 -1
- package/esm/domain/contexts/defaultContext.d.ts +0 -4
- package/esm/domain/contexts/defaultContext.js +0 -31
- package/esm/domain/contexts/defaultContext.js.map +0 -1
- package/esm/domain/contexts/displayContext.d.ts +0 -6
- package/esm/domain/contexts/displayContext.js +0 -25
- package/esm/domain/contexts/displayContext.js.map +0 -1
- package/esm/domain/contexts/featureFlagContext.d.ts +0 -19
- package/esm/domain/contexts/featureFlagContext.js +0 -49
- package/esm/domain/contexts/featureFlagContext.js.map +0 -1
- package/esm/domain/contexts/internalContext.d.ts +0 -12
- package/esm/domain/contexts/internalContext.js +0 -23
- package/esm/domain/contexts/internalContext.js.map +0 -1
- package/esm/domain/contexts/pageStateHistory.d.ts +0 -23
- package/esm/domain/contexts/pageStateHistory.js +0 -100
- package/esm/domain/contexts/pageStateHistory.js.map +0 -1
- package/esm/domain/contexts/sessionContext.d.ts +0 -5
- package/esm/domain/contexts/sessionContext.js +0 -44
- package/esm/domain/contexts/sessionContext.js.map +0 -1
- package/esm/domain/contexts/syntheticsContext.d.ts +0 -2
- package/esm/domain/contexts/syntheticsContext.js +0 -22
- package/esm/domain/contexts/syntheticsContext.js.map +0 -1
- package/esm/domain/contexts/trackingConsentContext.d.ts +0 -3
- package/esm/domain/contexts/trackingConsentContext.js +0 -11
- package/esm/domain/contexts/trackingConsentContext.js.map +0 -1
- package/esm/domain/contexts/urlContexts.d.ts +0 -22
- package/esm/domain/contexts/urlContexts.js +0 -60
- package/esm/domain/contexts/urlContexts.js.map +0 -1
- package/esm/domain/contexts/userAgentDataContext.d.ts +0 -2
- package/esm/domain/contexts/userAgentDataContext.js +0 -28
- package/esm/domain/contexts/userAgentDataContext.js.map +0 -1
- package/esm/domain/contexts/viewHistory.d.ts +0 -17
- package/esm/domain/contexts/viewHistory.js +0 -44
- package/esm/domain/contexts/viewHistory.js.map +0 -1
- package/esm/domain/discardNegativeDuration.d.ts +0 -2
- package/esm/domain/discardNegativeDuration.js +0 -5
- package/esm/domain/discardNegativeDuration.js.map +0 -1
- package/esm/domain/error/errorCollection.d.ts +0 -17
- package/esm/domain/error/errorCollection.js +0 -70
- package/esm/domain/error/errorCollection.js.map +0 -1
- package/esm/domain/error/trackConsoleError.d.ts +0 -4
- package/esm/domain/error/trackConsoleError.js +0 -10
- package/esm/domain/error/trackConsoleError.js.map +0 -1
- package/esm/domain/error/trackReportError.d.ts +0 -5
- package/esm/domain/error/trackReportError.js +0 -13
- package/esm/domain/error/trackReportError.js.map +0 -1
- package/esm/domain/event/eventCollection.d.ts +0 -10
- package/esm/domain/event/eventCollection.js +0 -24
- package/esm/domain/event/eventCollection.js.map +0 -1
- package/esm/domain/getSelectorFromElement.d.ts +0 -64
- package/esm/domain/getSelectorFromElement.js +0 -213
- package/esm/domain/getSelectorFromElement.js.map +0 -1
- package/esm/domain/getSessionReplayUrl.d.ts +0 -9
- package/esm/domain/getSessionReplayUrl.js +0 -30
- package/esm/domain/getSessionReplayUrl.js.map +0 -1
- package/esm/domain/hooks.d.ts +0 -23
- package/esm/domain/hooks.js +0 -3
- package/esm/domain/hooks.js.map +0 -1
- package/esm/domain/lifeCycle.d.ts +0 -73
- package/esm/domain/lifeCycle.js +0 -3
- package/esm/domain/lifeCycle.js.map +0 -1
- package/esm/domain/limitModification.d.ts +0 -8
- package/esm/domain/limitModification.js +0 -43
- package/esm/domain/limitModification.js.map +0 -1
- package/esm/domain/longTask/longTaskCollection.d.ts +0 -18
- package/esm/domain/longTask/longTaskCollection.js +0 -87
- package/esm/domain/longTask/longTaskCollection.js.map +0 -1
- package/esm/domain/plugins.d.ts +0 -40
- package/esm/domain/plugins.js +0 -12
- package/esm/domain/plugins.js.map +0 -1
- package/esm/domain/privacy.d.ts +0 -44
- package/esm/domain/privacy.js +0 -302
- package/esm/domain/privacy.js.map +0 -1
- package/esm/domain/privacyConstants.d.ts +0 -23
- package/esm/domain/privacyConstants.js +0 -35
- package/esm/domain/privacyConstants.js.map +0 -1
- package/esm/domain/requestCollection.d.ts +0 -54
- package/esm/domain/requestCollection.js +0 -106
- package/esm/domain/requestCollection.js.map +0 -1
- package/esm/domain/resource/graphql.d.ts +0 -23
- package/esm/domain/resource/graphql.js +0 -91
- package/esm/domain/resource/graphql.js.map +0 -1
- package/esm/domain/resource/matchRequestResourceEntry.d.ts +0 -16
- package/esm/domain/resource/matchRequestResourceEntry.js +0 -46
- package/esm/domain/resource/matchRequestResourceEntry.js.map +0 -1
- package/esm/domain/resource/requestRegistry.d.ts +0 -9
- package/esm/domain/resource/requestRegistry.js +0 -37
- package/esm/domain/resource/requestRegistry.js.map +0 -1
- package/esm/domain/resource/resourceCollection.d.ts +0 -7
- package/esm/domain/resource/resourceCollection.js +0 -187
- package/esm/domain/resource/resourceCollection.js.map +0 -1
- package/esm/domain/resource/resourceUtils.d.ts +0 -55
- package/esm/domain/resource/resourceUtils.js +0 -244
- package/esm/domain/resource/resourceUtils.js.map +0 -1
- package/esm/domain/resource/retrieveInitialDocumentResourceTiming.d.ts +0 -4
- package/esm/domain/resource/retrieveInitialDocumentResourceTiming.js +0 -21
- package/esm/domain/resource/retrieveInitialDocumentResourceTiming.js.map +0 -1
- package/esm/domain/rumSessionManager.d.ts +0 -36
- package/esm/domain/rumSessionManager.js +0 -72
- package/esm/domain/rumSessionManager.js.map +0 -1
- package/esm/domain/sampler/sampler.d.ts +0 -10
- package/esm/domain/sampler/sampler.js +0 -58
- package/esm/domain/sampler/sampler.js.map +0 -1
- package/esm/domain/startCustomerDataTelemetry.d.ts +0 -4
- package/esm/domain/startCustomerDataTelemetry.js +0 -52
- package/esm/domain/startCustomerDataTelemetry.js.map +0 -1
- package/esm/domain/tracing/getDocumentTraceId.d.ts +0 -12
- package/esm/domain/tracing/getDocumentTraceId.js +0 -68
- package/esm/domain/tracing/getDocumentTraceId.js.map +0 -1
- package/esm/domain/tracing/identifier.d.ts +0 -13
- package/esm/domain/tracing/identifier.js +0 -50
- package/esm/domain/tracing/identifier.js.map +0 -1
- package/esm/domain/tracing/sampler.d.ts +0 -10
- package/esm/domain/tracing/sampler.js +0 -64
- package/esm/domain/tracing/sampler.js.map +0 -1
- package/esm/domain/tracing/tracer.d.ts +0 -30
- package/esm/domain/tracing/tracer.js +0 -156
- package/esm/domain/tracing/tracer.js.map +0 -1
- package/esm/domain/tracing/tracer.types.d.ts +0 -12
- package/esm/domain/tracing/tracer.types.js +0 -2
- package/esm/domain/tracing/tracer.types.js.map +0 -1
- package/esm/domain/trackEventCounts.d.ts +0 -17
- package/esm/domain/trackEventCounts.js +0 -47
- package/esm/domain/trackEventCounts.js.map +0 -1
- package/esm/domain/view/bfCacheSupport.d.ts +0 -2
- package/esm/domain/view/bfCacheSupport.js +0 -10
- package/esm/domain/view/bfCacheSupport.js.map +0 -1
- package/esm/domain/view/trackViewEventCounts.d.ts +0 -5
- package/esm/domain/view/trackViewEventCounts.js +0 -13
- package/esm/domain/view/trackViewEventCounts.js.map +0 -1
- package/esm/domain/view/trackViews.d.ts +0 -65
- package/esm/domain/view/trackViews.js +0 -278
- package/esm/domain/view/trackViews.js.map +0 -1
- package/esm/domain/view/viewCollection.d.ts +0 -18
- package/esm/domain/view/viewCollection.js +0 -150
- package/esm/domain/view/viewCollection.js.map +0 -1
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.d.ts +0 -6
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.js +0 -28
- package/esm/domain/view/viewMetrics/getClsAttributionImpactedArea.js.map +0 -1
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.d.ts +0 -18
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.js +0 -39
- package/esm/domain/view/viewMetrics/interactionCountPolyfill.js.map +0 -1
- package/esm/domain/view/viewMetrics/startInitialViewMetricsTelemetry.d.ts +0 -6
- package/esm/domain/view/viewMetrics/startInitialViewMetricsTelemetry.js +0 -41
- package/esm/domain/view/viewMetrics/startInitialViewMetricsTelemetry.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.d.ts +0 -8
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.js +0 -14
- package/esm/domain/view/viewMetrics/trackBfcacheMetrics.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.d.ts +0 -21
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.js +0 -34
- package/esm/domain/view/viewMetrics/trackCommonViewMetrics.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.d.ts +0 -37
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.js +0 -130
- package/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.d.ts +0 -13
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.js +0 -34
- package/esm/domain/view/viewMetrics/trackFirstContentfulPaint.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackFirstHidden.d.ts +0 -10
- package/esm/domain/view/viewMetrics/trackFirstHidden.js +0 -30
- package/esm/domain/view/viewMetrics/trackFirstHidden.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackFirstInput.d.ts +0 -19
- package/esm/domain/view/viewMetrics/trackFirstInput.js +0 -40
- package/esm/domain/view/viewMetrics/trackFirstInput.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.d.ts +0 -15
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.js +0 -38
- package/esm/domain/view/viewMetrics/trackInitialViewMetrics.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.d.ts +0 -25
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.js +0 -149
- package/esm/domain/view/viewMetrics/trackInteractionToNextPaint.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.d.ts +0 -18
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.js +0 -57
- package/esm/domain/view/viewMetrics/trackLargestContentfulPaint.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackLoadingTime.d.ts +0 -14
- package/esm/domain/view/viewMetrics/trackLoadingTime.js +0 -47
- package/esm/domain/view/viewMetrics/trackLoadingTime.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackNavigationTimings.d.ts +0 -14
- package/esm/domain/view/viewMetrics/trackNavigationTimings.js +0 -40
- package/esm/domain/view/viewMetrics/trackNavigationTimings.js.map +0 -1
- package/esm/domain/view/viewMetrics/trackScrollMetrics.d.ts +0 -25
- package/esm/domain/view/viewMetrics/trackScrollMetrics.js +0 -72
- package/esm/domain/view/viewMetrics/trackScrollMetrics.js.map +0 -1
- package/esm/domain/vital/vitalCollection.d.ts +0 -55
- package/esm/domain/vital/vitalCollection.js +0 -107
- package/esm/domain/vital/vitalCollection.js.map +0 -1
- package/esm/domain/waitPageActivityEnd.d.ts +0 -54
- package/esm/domain/waitPageActivityEnd.js +0 -123
- package/esm/domain/waitPageActivityEnd.js.map +0 -1
- package/esm/domainContext.types.d.ts +0 -39
- package/esm/domainContext.types.js +0 -5
- package/esm/domainContext.types.js.map +0 -1
- package/esm/index.d.ts +0 -42
- package/esm/index.js +0 -22
- package/esm/index.js.map +0 -1
- package/esm/rawRumEvent.types.d.ts +0 -326
- package/esm/rawRumEvent.types.js +0 -31
- package/esm/rawRumEvent.types.js.map +0 -1
- package/esm/rumEvent.types.d.ts +0 -2038
- package/esm/rumEvent.types.js +0 -6
- package/esm/rumEvent.types.js.map +0 -1
- package/esm/transport/formDataTransport.d.ts +0 -16
- package/esm/transport/formDataTransport.js +0 -43
- package/esm/transport/formDataTransport.js.map +0 -1
- package/esm/transport/startRumBatch.d.ts +0 -5
- package/esm/transport/startRumBatch.js +0 -30
- package/esm/transport/startRumBatch.js.map +0 -1
- package/esm/transport/startRumEventBridge.d.ts +0 -2
- package/esm/transport/startRumEventBridge.js +0 -8
- package/esm/transport/startRumEventBridge.js.map +0 -1
- package/src/browser/firstInputPolyfill.ts +0 -87
- package/src/domain/error/trackConsoleError.ts +0 -14
- package/src/domain/resource/matchRequestResourceEntry.ts +0 -68
- package/src/domain/resource/retrieveInitialDocumentResourceTiming.ts +0 -27
- package/src/domain/rumSessionManager.ts +0 -134
- package/src/domain/sampler/sampler.ts +0 -63
- package/src/domain/tracing/sampler.ts +0 -69
- package/src/domain/view/viewMetrics/startInitialViewMetricsTelemetry.ts +0 -70
- package/src/domain/view/viewMetrics/trackFirstInput.ts +0 -59
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remoteSdkConfiguration.js","sourceRoot":"","sources":["../../../src/domain/configuration/remoteSdkConfiguration.ts"],"names":[],"mappings":";;AA6CA,kEAMC;AAED,sDAiBC;AAqHD,0EAEC;AA5LD,8EAS0C;AAI1C;;;;;;;;;;;GAWG;AAEH,MAAM,cAAc,GAAG;IACrB,4CAAmB,CAAC,KAAK;IACzB,4CAAmB,CAAC,IAAI;IACxB,4CAAmB,CAAC,eAAe;CAC3B,CAAA;AAEV,MAAM,wBAAwB,GAAG,CAAC,8CAAqB,CAAC,GAAG,EAAE,8CAAqB,CAAC,OAAO,CAAU,CAAA;AAQpG;;;GAGG;AACH,SAAgB,2BAA2B,CAAC,iBAAuC;IACjF,MAAM,YAAY,GAAG,IAAA,2CAAkB,GAAE,CAAA;IACzC,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;IAChD,CAAC;IACD,OAAO,qBAAqB,CAAC,iBAAiB,EAAE,YAAY,CAAC,CAAA;AAC/D,CAAC;AAED,SAAgB,qBAAqB,CACnC,iBAAuC,EACvC,YAA6B;IAE7B,MAAM,QAAQ,GAAG,YAAY,CAAC,QAAQ,CAAA;IACtC,IAAI,IAAA,oCAAW,EAAC,QAAkD,EAAE,KAAK,CAAC,KAAK,KAAK,EAAE,CAAC;QACrF,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,KAAK,EAAE,CAAA;IACjD,CAAC;IAED,MAAM,OAAO,GAAyB,EAAE,GAAG,iBAAiB,EAAE,CAAA;IAE9D,eAAe,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;IAC1C,yBAAyB,CAAC,OAAO,EAAE,YAAY,CAAC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,CAAC;IACD,MAAM,CAAC,OAAO,EAAE,qBAAqB,EAAE,IAAA,uCAAc,EAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAA;AACjF,CAAC;AAED;;;GAGG;AACH,SAAS,oBAAoB,CAAC,OAA6B,EAAE,QAAqC;IAChG,MAAM,MAAM,GAAG,QAAkD,CAAA;IAEjE,IAAI,IAAA,oCAAW,EAAC,MAAM,EAAE,eAAe,CAAC,KAAK,KAAK,EAAE,CAAC;QACnD,OAAO,CAAC,uBAAuB,GAAG,CAAC,CAAA;QACnC,OAAO,CAAC,mCAAmC,GAAG,IAAI,CAAA;QAClD,0FAA0F;QAC1F,mDAAmD;QACnD,OAAO,CAAC,mBAAmB,GAAG,SAAS,CAAA;IACzC,CAAC;IAED,IAAI,IAAA,oCAAW,EAAC,MAAM,EAAE,WAAW,CAAC,KAAK,KAAK,EAAE,CAAC;QAC/C,OAAO,CAAC,mBAAmB,GAAG,CAAC,CAAA;IACjC,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,MAAM,CACb,MAA4B,EAC5B,GAAM,EACN,KAA0C;IAE1C,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;IACrB,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAgB,+BAA+B,CAAC,iBAAuC;IACrF,OAAO,IAAA,yCAAgB,EAAC,iBAAiB,EAAE,iBAAiB,CAAC,aAAa,CAAC,CAAA;AAC7E,CAAC"}
|
|
1
|
+
{"version":3,"file":"remoteSdkConfiguration.js","names":["DefaultPrivacyLevel","TraceContextInjection","CanvasRecordingQuality","getCachedSdkConfig","readBoolean","readSampleRate","readEnum","readString","readStringList","isIndexableObject","readNumberInRange","refreshSdkConfig"],"sources":["../../../src/domain/configuration/remoteSdkConfiguration.ts"],"sourcesContent":["import type { RemoteSdkConfig } from '@kubesense/kubesense-browser-core'\nimport {\n DefaultPrivacyLevel,\n TraceContextInjection,\n getCachedSdkConfig,\n readBoolean,\n readEnum,\n readNumberInRange,\n readSampleRate,\n readString,\n readStringList,\n refreshSdkConfig,\n} from '@kubesense/kubesense-browser-core'\nimport { isIndexableObject } from '@kubesense/kubesense-js-core/util'\nimport type { MatchOption } from '@kubesense/kubesense-js-core/configuration'\nimport type { PropagatorType } from '../tracing/tracer.types'\nimport type { RumInitConfiguration } from './configuration'\nimport { CanvasRecordingQuality } from './configuration'\nimport type { SessionReplayRoutes } from './sessionReplayRoutes'\n\nconst PROPAGATOR_TYPES: readonly PropagatorType[] = ['kubesense', 'b3', 'b3multi', 'tracecontext']\n\n/**\n * Applies the dashboard-managed configuration document to the user's init configuration.\n *\n * Only scalar settings travel: anything that is a function or a matcher (`beforeSend`,\n * `allowedTracingUrls`, `excludedActivityUrls`, plugins) stays in application code. Identity and\n * endpoint settings (`clientToken`, `applicationId`, `kubesenseRumEndpoint`, `proxy`) are also\n * excluded — they determine where the configuration request itself goes, and letting them be\n * remotely rewritten would be a redirection risk.\n *\n * Every field is applied only when present and valid, so the user's own init configuration —\n * and failing that, the SDK default — always wins over a missing or malformed remote value.\n */\n\nconst PRIVACY_LEVELS = [\n DefaultPrivacyLevel.ALLOW,\n DefaultPrivacyLevel.MASK,\n DefaultPrivacyLevel.MASK_USER_INPUT,\n DefaultPrivacyLevel.MASK_UNLESS_ALLOWLISTED,\n] as const\n\nconst TRACE_CONTEXT_INJECTIONS = [TraceContextInjection.ALL, TraceContextInjection.SAMPLED] as const\n\nconst CANVAS_RECORDING_QUALITIES = [\n CanvasRecordingQuality.LOW,\n CanvasRecordingQuality.MEDIUM,\n CanvasRecordingQuality.HIGH,\n] as const\n\nexport interface RemoteSdkConfigurationResult {\n initConfiguration: RumInitConfiguration\n /** `false` when the dashboard has switched RUM off entirely. */\n rumEnabled: boolean\n}\n\n/** The context managers the document can contribute to. */\nexport interface RemoteSdkConfigurationContexts {\n globalContext?: { setContextProperty: (key: string, value: unknown) => void }\n userContext?: { setContextProperty: (key: string, value: unknown) => void }\n}\n\n/**\n * Read the cached document and merge it into the init configuration. Synchronous and\n * network-free: this runs on the initialization path.\n */\nexport function applyCachedSdkConfiguration(\n initConfiguration: RumInitConfiguration,\n contexts?: RemoteSdkConfigurationContexts\n): RemoteSdkConfigurationResult {\n const remoteConfig = getCachedSdkConfig(initConfiguration.clientToken)\n if (!remoteConfig) {\n return { initConfiguration, rumEnabled: true }\n }\n return applySdkConfiguration(initConfiguration, remoteConfig, contexts)\n}\n\nexport function applySdkConfiguration(\n initConfiguration: RumInitConfiguration,\n remoteConfig: RemoteSdkConfig,\n contexts?: RemoteSdkConfigurationContexts\n): RemoteSdkConfigurationResult {\n const features = remoteConfig.features\n if (readBoolean(features as { [key: string]: unknown } | undefined, 'rum') === false) {\n return { initConfiguration, rumEnabled: false }\n }\n\n const applied: RumInitConfiguration = { ...initConfiguration }\n\n applyRumSection(applied, remoteConfig.rum)\n applyContexts(remoteConfig.rum, contexts)\n applySessionReplaySection(applied, remoteConfig.sessionReplay)\n applyProfilingSection(applied, remoteConfig.profiling)\n applyFeatureSwitches(applied, features)\n\n return { initConfiguration: applied, rumEnabled: true }\n}\n\nfunction applyRumSection(applied: RumInitConfiguration, rum: { [key: string]: unknown } | undefined) {\n if (!rum) {\n return\n }\n\n assign(applied, 'sessionSampleRate', readSampleRate(rum, 'sessionSampleRate'))\n assign(applied, 'telemetrySampleRate', readSampleRate(rum, 'telemetrySampleRate'))\n assign(applied, 'traceSampleRate', readSampleRate(rum, 'traceSampleRate'))\n\n assign(applied, 'trackUserInteractions', readBoolean(rum, 'trackUserInteractions'))\n assign(applied, 'trackResources', readBoolean(rum, 'trackResources'))\n assign(applied, 'trackLongTasks', readBoolean(rum, 'trackLongTasks'))\n assign(applied, 'trackViewsManually', readBoolean(rum, 'trackViewsManually'))\n assign(applied, 'trackAnonymousUser', readBoolean(rum, 'trackAnonymousUser'))\n assign(applied, 'trackSessionAcrossSubdomains', readBoolean(rum, 'trackSessionAcrossSubdomains'))\n assign(applied, 'enablePrivacyForActionName', readBoolean(rum, 'enablePrivacyForActionName'))\n assign(applied, 'propagateTraceBaggage', readBoolean(rum, 'propagateTraceBaggage'))\n\n assign(applied, 'defaultPrivacyLevel', readEnum(rum, 'defaultPrivacyLevel', PRIVACY_LEVELS))\n assign(applied, 'traceContextInjection', readEnum(rum, 'traceContextInjection', TRACE_CONTEXT_INJECTIONS))\n assign(applied, 'actionNameAttribute', readString(rum, 'actionNameAttribute'))\n\n assign(applied, 'betaEnableViewUpdates', readBoolean(rum, 'betaEnableViewUpdates'))\n assign(applied, 'betaTrackWebSockets', readBoolean(rum, 'betaTrackWebSockets'))\n // Only the \"collect the default headers / collect nothing\" switch travels. The MatchHeader[] form\n // selects headers by name with optional extractor functions, which cannot come from JSON.\n assign(applied, 'trackResourceHeaders', readBoolean(rum, 'trackResourceHeaders'))\n\n assign(applied, 'allowedTracingUrls', readTracingUrls(rum.allowedTracingUrls))\n assign(applied, 'allowedTrackingOrigins', readStringList(rum.allowedTrackingOrigins))\n\n assign(applied, 'service', readString(rum, 'service'))\n assign(applied, 'env', readString(rum, 'env'))\n assign(applied, 'version', readString(rum, 'version'))\n}\n\n/**\n * Tracing URLs arriving as JSON can only be plain strings (prefix matches), optionally paired with\n * the propagators to inject. As with route rules, regexes and functions stay in application code:\n * they cannot be expressed safely in JSON, and this list decides which cross-origin requests get\n * tracing headers attached — a pattern that is broader than intended leaks trace ids to third\n * parties and can break their CORS preflight.\n */\nfunction readTracingUrls(value: unknown): RumInitConfiguration['allowedTracingUrls'] | undefined {\n if (!Array.isArray(value)) {\n return undefined\n }\n\n const options: Array<MatchOption | { match: MatchOption; propagatorTypes?: PropagatorType[] }> = []\n for (const entry of value) {\n if (typeof entry === 'string' && entry.length > 0) {\n options.push(entry)\n continue\n }\n if (!isIndexableObject(entry)) {\n continue\n }\n const match = readString(entry, 'match')\n if (!match) {\n continue\n }\n const propagatorTypes = readStringList(entry.propagatorTypes)?.filter((propagator): propagator is PropagatorType =>\n (PROPAGATOR_TYPES as readonly string[]).includes(propagator)\n )\n options.push(propagatorTypes?.length ? { match, propagatorTypes } : { match })\n }\n\n return options.length > 0 ? options : undefined\n}\n\n/**\n * Properties from the document are set individually rather than replacing the whole context, so\n * anything the application has already attached with `setGlobalContext()` / `setUser()` survives.\n *\n * The user is applied here, before `startUserContext()` installs its change subscription, so a\n * remotely-supplied identity behaves exactly like an application calling `setUser()` at the top of\n * its bootstrap: it becomes the session owner rather than looking like a mid-session user switch.\n * Changing the user in the dashboard therefore expires the session once, on the first load that\n * reads the new document — which is the intended behaviour for a user change — and steady-state\n * loads leave the session alone.\n */\nfunction applyContexts(\n rum: { [key: string]: unknown } | undefined,\n contexts: RemoteSdkConfigurationContexts | undefined\n) {\n applyContextProperties(contexts?.globalContext, rum?.context)\n applyContextProperties(contexts?.userContext, rum?.user)\n}\n\nfunction applyContextProperties(\n contextManager: { setContextProperty: (key: string, value: unknown) => void } | undefined,\n properties: unknown\n) {\n if (!contextManager || !isIndexableObject(properties)) {\n return\n }\n\n for (const [key, value] of Object.entries(properties)) {\n contextManager.setContextProperty(key, value)\n }\n}\n\nfunction applySessionReplaySection(\n applied: RumInitConfiguration,\n sessionReplay: { [key: string]: unknown } | undefined\n) {\n if (!sessionReplay) {\n return\n }\n\n assign(applied, 'sessionReplaySampleRate', readSampleRate(sessionReplay, 'sampleRate'))\n assign(applied, 'startSessionReplayRecordingManually', readBoolean(sessionReplay, 'startRecordingManually'))\n assign(applied, 'defaultPrivacyLevel', readEnum(sessionReplay, 'defaultPrivacyLevel', PRIVACY_LEVELS))\n assign(applied, 'sessionReplayRoutes', readRoutes(sessionReplay.routes))\n assign(applied, 'sessionReplayCanvasRecording', readCanvasRecording(sessionReplay.canvasRecording))\n}\n\n/**\n * Canvas capture is the most expensive replay setting there is — it uploads rendered frames — so it\n * is only enabled when the document says so explicitly, and each limit is validated against the\n * range the SDK accepts instead of being clamped.\n */\nfunction readCanvasRecording(canvasRecording: unknown): RumInitConfiguration['sessionReplayCanvasRecording'] {\n if (!isIndexableObject(canvasRecording)) {\n return undefined\n }\n\n const enable = readBoolean(canvasRecording, 'enable')\n if (enable === undefined) {\n // Without an explicit switch there is nothing to apply: the remaining fields are only limits.\n return undefined\n }\n\n return {\n enable,\n quality: readEnum(canvasRecording, 'quality', CANVAS_RECORDING_QUALITIES),\n maxFramesPerSecond: readNumberInRange(canvasRecording, 'maxFramesPerSecond', 0, 8),\n hashingMaxDimension: readNumberInRange(canvasRecording, 'hashingMaxDimension', 1, 100),\n maxImageDimension: readNumberInRange(canvasRecording, 'maxImageDimension', 1, 1280),\n }\n}\n\n/**\n * Route rules arriving as JSON can only be plain strings (prefix matches). Regexes and functions\n * are deliberately not accepted from the dashboard: they cannot be expressed safely in JSON and a\n * pathological pattern would run on every view change.\n */\nfunction readRoutes(routes: unknown): SessionReplayRoutes | undefined {\n if (!routes || typeof routes !== 'object' || Array.isArray(routes)) {\n return undefined\n }\n\n const include = readStringList((routes as { include?: unknown }).include)\n const exclude = readStringList((routes as { exclude?: unknown }).exclude)\n\n if (!include && !exclude) {\n return undefined\n }\n\n return { include, exclude }\n}\n\nfunction applyProfilingSection(applied: RumInitConfiguration, profiling: { [key: string]: unknown } | undefined) {\n if (!profiling) {\n return\n }\n assign(applied, 'profilingSampleRate', readSampleRate(profiling, 'sampleRate'))\n}\n\n/**\n * Feature switches are applied last so they always win over the per-section sample rates above.\n * Turning a feature off is expressed through the setting that stops all of its collection.\n */\nfunction applyFeatureSwitches(applied: RumInitConfiguration, features: RemoteSdkConfig['features']) {\n const source = features as { [key: string]: unknown } | undefined\n\n if (readBoolean(source, 'sessionReplay') === false) {\n applied.sessionReplaySampleRate = 0\n applied.startSessionReplayRecordingManually = true\n // Drop any route rules too: with replay off they are dead weight, and leaving them behind\n // would suggest recording still happens somewhere.\n applied.sessionReplayRoutes = undefined\n }\n\n if (readBoolean(source, 'profiling') === false) {\n applied.profilingSampleRate = 0\n }\n}\n\n/**\n * Assigning only defined values keeps the \"absent means keep the local value\" guarantee in one\n * place instead of at every call site.\n */\nfunction assign<K extends keyof RumInitConfiguration>(\n target: RumInitConfiguration,\n key: K,\n value: RumInitConfiguration[K] | undefined\n) {\n if (value !== undefined) {\n target[key] = value\n }\n}\n\n/**\n * Refresh the cache for the next page load. Must be called *after* the SDK has started so it\n * never delays initialization.\n */\nexport function scheduleSdkConfigurationRefresh(initConfiguration: RumInitConfiguration) {\n return refreshSdkConfig(initConfiguration, initConfiguration.applicationId)\n}\n"],"mappings":";;;;AAoBA,MAAM,mBAA8C;CAAC;CAAa;CAAM;CAAW;AAAc;;;;;;;;;;;;;AAejG,MAAM,iBAAiB;CACrBA,kCAAAA,oBAAoB;CACpBA,kCAAAA,oBAAoB;CACpBA,kCAAAA,oBAAoB;CACpBA,kCAAAA,oBAAoB;AACtB;AAEA,MAAM,2BAA2B,CAACC,kCAAAA,sBAAsB,KAAKA,kCAAAA,sBAAsB,OAAO;AAE1F,MAAM,6BAA6B;CACjCC,sBAAAA,uBAAuB;CACvBA,sBAAAA,uBAAuB;CACvBA,sBAAAA,uBAAuB;AACzB;;;;;AAkBA,SAAgB,4BACd,mBACA,UAC8B;CAC9B,MAAM,gBAAA,GAAeC,kCAAAA,mBAAAA,CAAmB,kBAAkB,WAAW;CACrE,IAAI,CAAC,cACH,OAAO;EAAE;EAAmB,YAAY;CAAK;CAE/C,OAAO,sBAAsB,mBAAmB,cAAc,QAAQ;AACxE;AAEA,SAAgB,sBACd,mBACA,cACA,UAC8B;CAC9B,MAAM,WAAW,aAAa;CAC9B,KAAA,GAAIC,kCAAAA,YAAAA,CAAY,UAAoD,KAAK,MAAM,OAC7E,OAAO;EAAE;EAAmB,YAAY;CAAM;CAGhD,MAAM,UAAgC,EAAE,GAAG,kBAAkB;CAE7D,gBAAgB,SAAS,aAAa,GAAG;CACzC,cAAc,aAAa,KAAK,QAAQ;CACxC,0BAA0B,SAAS,aAAa,aAAa;CAC7D,sBAAsB,SAAS,aAAa,SAAS;CACrD,qBAAqB,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,MAAM,GAC/D;CAGF,MAAM,WAAA,GAAUF,kCAAAA,eAAAA,CAAgB,OAAiC,OAAO;CACxE,MAAM,WAAA,GAAUA,kCAAAA,eAAAA,CAAgB,OAAiC,OAAO;CAExE,IAAI,CAAC,WAAW,CAAC,SACf;CAGF,OAAO;EAAE;EAAS;CAAQ;AAC5B;AAEA,SAAS,sBAAsB,SAA+B,WAAmD;CAC/G,IAAI,CAAC,WACH;CAEF,OAAO,SAAS,wBAAA,GAAuBH,kCAAAA,eAAAA,CAAe,WAAW,YAAY,CAAC;AAChF;;;;;AAMA,SAAS,qBAAqB,SAA+B,UAAuC;CAClG,MAAM,SAAS;CAEf,KAAA,GAAID,kCAAAA,YAAAA,CAAY,QAAQ,eAAe,MAAM,OAAO;EAClD,QAAQ,0BAA0B;EAClC,QAAQ,sCAAsC;EAG9C,QAAQ,sBAAsB,KAAA;CAChC;CAEA,KAAA,GAAIA,kCAAAA,YAAAA,CAAY,QAAQ,WAAW,MAAM,OACvC,QAAQ,sBAAsB;AAElC;;;;;AAMA,SAAS,OACP,QACA,KACA,OACA;CACA,IAAI,UAAU,KAAA,GACZ,OAAO,OAAO;AAElB;;;;;AAMA,SAAgB,gCAAgC,mBAAyC;CACvF,QAAA,GAAOO,kCAAAA,iBAAAA,CAAiB,mBAAmB,kBAAkB,aAAa;AAC5E"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { MatchOption } from '@kubesense/kubesense-
|
|
1
|
+
import type { MatchOption } from '@kubesense/kubesense-js-core/configuration';
|
|
2
2
|
/**
|
|
3
3
|
* Route-scoped Session Replay.
|
|
4
4
|
*
|
|
@@ -28,8 +28,3 @@ export declare function getRoutePath(location?: Location | URL): string;
|
|
|
28
28
|
* been configured with routes.
|
|
29
29
|
*/
|
|
30
30
|
export declare function isRouteRecordable(routes: SessionReplayRoutes | undefined, path: string): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Validates the user-provided option. An invalid entry is dropped rather than silently treated
|
|
33
|
-
* as "match nothing", which would turn a typo into a total loss of replay.
|
|
34
|
-
*/
|
|
35
|
-
export declare function validateSessionReplayRoutes(routes: unknown): SessionReplayRoutes | undefined;
|
|
@@ -1,70 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getRoutePath = getRoutePath;
|
|
4
|
-
exports.isRouteRecordable = isRouteRecordable;
|
|
5
|
-
exports.validateSessionReplayRoutes = validateSessionReplayRoutes;
|
|
6
|
-
const kubesense_browser_core_1 = require("@kubesense/kubesense-browser-core");
|
|
1
|
+
let _kubesense_kubesense_browser_core = require("@kubesense/kubesense-browser-core");
|
|
2
|
+
//#region src/domain/configuration/sessionReplayRoutes.ts
|
|
7
3
|
/**
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
4
|
+
* Rules are matched against the **path** — `pathname` + `search` + `hash` — not the full URL, so
|
|
5
|
+
* a dashboard entry reads the way a route is written (`/checkout`). String options match by
|
|
6
|
+
* prefix, so `/checkout` also covers `/checkout/payment`.
|
|
7
|
+
*/
|
|
12
8
|
function getRoutePath(location = window.location) {
|
|
13
|
-
|
|
9
|
+
return `${location.pathname}${location.search}${location.hash}`;
|
|
14
10
|
}
|
|
15
11
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
* Returns whether recording is allowed on the given path.
|
|
13
|
+
*
|
|
14
|
+
* No rules at all means "record everywhere", which keeps the behaviour of an SDK that has never
|
|
15
|
+
* been configured with routes.
|
|
16
|
+
*/
|
|
21
17
|
function isRouteRecordable(routes, path) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (routes.exclude && routes.exclude.length > 0 && (0, kubesense_browser_core_1.matchList)(routes.exclude, path, true)) {
|
|
27
|
-
return false;
|
|
28
|
-
}
|
|
29
|
-
if (routes.include && routes.include.length > 0) {
|
|
30
|
-
return (0, kubesense_browser_core_1.matchList)(routes.include, path, true);
|
|
31
|
-
}
|
|
32
|
-
return true;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Validates the user-provided option. An invalid entry is dropped rather than silently treated
|
|
36
|
-
* as "match nothing", which would turn a typo into a total loss of replay.
|
|
37
|
-
*/
|
|
38
|
-
function validateSessionReplayRoutes(routes) {
|
|
39
|
-
if (routes === undefined || routes === null) {
|
|
40
|
-
return undefined;
|
|
41
|
-
}
|
|
42
|
-
if (typeof routes !== 'object' || Array.isArray(routes)) {
|
|
43
|
-
kubesense_browser_core_1.display.error('Session Replay routes should be an object with optional include and exclude arrays');
|
|
44
|
-
return undefined;
|
|
45
|
-
}
|
|
46
|
-
const include = validateMatchOptionList(routes.include, 'include');
|
|
47
|
-
const exclude = validateMatchOptionList(routes.exclude, 'exclude');
|
|
48
|
-
if (!include && !exclude) {
|
|
49
|
-
return undefined;
|
|
50
|
-
}
|
|
51
|
-
return { include, exclude };
|
|
52
|
-
}
|
|
53
|
-
function validateMatchOptionList(list, name) {
|
|
54
|
-
if (list === undefined) {
|
|
55
|
-
return undefined;
|
|
56
|
-
}
|
|
57
|
-
if (!Array.isArray(list)) {
|
|
58
|
-
kubesense_browser_core_1.display.error(`Session Replay routes "${name}" should be an array`);
|
|
59
|
-
return undefined;
|
|
60
|
-
}
|
|
61
|
-
const validOptions = list.filter((item) => {
|
|
62
|
-
if ((0, kubesense_browser_core_1.isMatchOption)(item)) {
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
kubesense_browser_core_1.display.error(`Session Replay routes "${name}" entries should be a string, RegExp or function`);
|
|
66
|
-
return false;
|
|
67
|
-
});
|
|
68
|
-
return validOptions.length > 0 ? validOptions : undefined;
|
|
18
|
+
if (!routes) return true;
|
|
19
|
+
if (routes.exclude && routes.exclude.length > 0 && (0, _kubesense_kubesense_browser_core.matchList)(routes.exclude, path, true)) return false;
|
|
20
|
+
if (routes.include && routes.include.length > 0) return (0, _kubesense_kubesense_browser_core.matchList)(routes.include, path, true);
|
|
21
|
+
return true;
|
|
69
22
|
}
|
|
23
|
+
//#endregion
|
|
24
|
+
exports.getRoutePath = getRoutePath;
|
|
25
|
+
exports.isRouteRecordable = isRouteRecordable;
|
|
26
|
+
|
|
70
27
|
//# sourceMappingURL=sessionReplayRoutes.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sessionReplayRoutes.js","
|
|
1
|
+
{"version":3,"file":"sessionReplayRoutes.js","names":["matchList"],"sources":["../../../src/domain/configuration/sessionReplayRoutes.ts"],"sourcesContent":["import type { MatchOption } from '@kubesense/kubesense-js-core/configuration'\nimport { matchList } from '@kubesense/kubesense-browser-core'\n\n/**\n * Route-scoped Session Replay.\n *\n * Recording is normally decided once per session by `sessionReplaySampleRate`. These rules add a\n * second, per-view gate so a session that *is* eligible only gets recorded while the user is on\n * a matching route.\n *\n * Rules can only ever narrow recording, never widen it: a session that lost the replay sampling\n * draw is never recorded, whatever the routes say.\n */\nexport interface SessionReplayRoutes {\n /** Record only on these routes. When omitted, every route is eligible. */\n include?: MatchOption[] | undefined\n /** Never record on these routes. Takes precedence over `include`. */\n exclude?: MatchOption[] | undefined\n}\n\n/**\n * Rules are matched against the **path** — `pathname` + `search` + `hash` — not the full URL, so\n * a dashboard entry reads the way a route is written (`/checkout`). String options match by\n * prefix, so `/checkout` also covers `/checkout/payment`.\n */\nexport function getRoutePath(location: Location | URL = window.location): string {\n return `${location.pathname}${location.search}${location.hash}`\n}\n\n/**\n * Returns whether recording is allowed on the given path.\n *\n * No rules at all means \"record everywhere\", which keeps the behaviour of an SDK that has never\n * been configured with routes.\n */\nexport function isRouteRecordable(routes: SessionReplayRoutes | undefined, path: string): boolean {\n if (!routes) {\n return true\n }\n\n // Exclusions win, so a route can always be carved out of a broad `include`.\n if (routes.exclude && routes.exclude.length > 0 && matchList(routes.exclude, path, true)) {\n return false\n }\n\n if (routes.include && routes.include.length > 0) {\n return matchList(routes.include, path, true)\n }\n\n return true\n}\n"],"mappings":";;;;;;;AAyBA,SAAgB,aAAa,WAA2B,OAAO,UAAkB;CAC/E,OAAO,GAAG,SAAS,WAAW,SAAS,SAAS,SAAS;AAC3D;;;;;;;AAQA,SAAgB,kBAAkB,QAAyC,MAAuB;CAChG,IAAI,CAAC,QACH,OAAO;CAIT,IAAI,OAAO,WAAW,OAAO,QAAQ,SAAS,MAAA,GAAKA,kCAAAA,UAAAA,CAAU,OAAO,SAAS,MAAM,IAAI,GACrF,OAAO;CAGT,IAAI,OAAO,WAAW,OAAO,QAAQ,SAAS,GAC5C,QAAA,GAAOA,kCAAAA,UAAAA,CAAU,OAAO,SAAS,MAAM,IAAI;CAG7C,OAAO;AACT"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Hooks } from '../hooks';
|
|
1
|
+
import type { AssembleHook } from '../hooks';
|
|
3
2
|
export declare const CI_VISIBILITY_TEST_ID_COOKIE_NAME = "kubesense-ci-visibility-test-execution-id";
|
|
4
3
|
export interface CiTestWindow extends Window {
|
|
5
4
|
Cypress?: {
|
|
6
5
|
env: (key: string) => string | undefined;
|
|
7
6
|
};
|
|
8
7
|
}
|
|
9
|
-
export
|
|
10
|
-
export declare function startCiVisibilityContext(configuration: Configuration, hooks: Hooks, cookieObservable?: import("@kubesense/kubesense-browser-core").Observable<string | undefined>): {
|
|
8
|
+
export declare function startCiVisibilityContext(assembleHook: AssembleHook, cookieObservable?: import("@kubesense/kubesense-browser-core").Observable<string | undefined>): {
|
|
11
9
|
stop: () => void;
|
|
12
10
|
};
|
|
@@ -1,34 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
1
|
+
const require_cookieObservable = require("../../browser/cookieObservable.js");
|
|
2
|
+
require("./sessionContext.js");
|
|
3
|
+
let _kubesense_kubesense_browser_core = require("@kubesense/kubesense-browser-core");
|
|
4
|
+
let _kubesense_kubesense_js_core_assembly = require("@kubesense/kubesense-js-core/assembly");
|
|
5
|
+
//#region src/domain/contexts/ciVisibilityContext.ts
|
|
6
|
+
const CI_VISIBILITY_TEST_ID_COOKIE_NAME = "kubesense-ci-visibility-test-execution-id";
|
|
7
|
+
function startCiVisibilityContext(assembleHook, cookieObservable = require_cookieObservable.createCookieObservable(CI_VISIBILITY_TEST_ID_COOKIE_NAME)) {
|
|
8
|
+
let testExecutionId = (0, _kubesense_kubesense_browser_core.getInitCookie)("kubesense-ci-visibility-test-execution-id") || readCypressTraceId();
|
|
9
|
+
const cookieObservableSubscription = cookieObservable.subscribe((value) => {
|
|
10
|
+
testExecutionId = value;
|
|
11
|
+
});
|
|
12
|
+
assembleHook.register(({ eventType }) => {
|
|
13
|
+
if (typeof testExecutionId !== "string") return _kubesense_kubesense_js_core_assembly.SKIPPED;
|
|
14
|
+
return {
|
|
15
|
+
type: eventType,
|
|
16
|
+
session: { type: "ci_test" },
|
|
17
|
+
ci_test: { test_execution_id: testExecutionId }
|
|
18
|
+
};
|
|
19
|
+
});
|
|
20
|
+
return { stop: () => {
|
|
21
|
+
cookieObservableSubscription.unsubscribe();
|
|
22
|
+
} };
|
|
23
|
+
}
|
|
24
|
+
function readCypressTraceId() {
|
|
25
|
+
const cypress = window.Cypress;
|
|
26
|
+
if (!cypress) return;
|
|
27
|
+
try {
|
|
28
|
+
return cypress.env("traceId");
|
|
29
|
+
} catch {
|
|
30
|
+
_kubesense_kubesense_browser_core.display.warn("Failed to read Cypress test execution id via Cypress.env(). Upgrade dd-trace-js to >= 5.88.0 to keep RUM ↔ test correlation working.");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
33
|
}
|
|
34
|
+
//#endregion
|
|
35
|
+
exports.CI_VISIBILITY_TEST_ID_COOKIE_NAME = CI_VISIBILITY_TEST_ID_COOKIE_NAME;
|
|
36
|
+
exports.startCiVisibilityContext = startCiVisibilityContext;
|
|
37
|
+
|
|
34
38
|
//# sourceMappingURL=ciVisibilityContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ciVisibilityContext.js","
|
|
1
|
+
{"version":3,"file":"ciVisibilityContext.js","names":["createCookieObservable","getInitCookie","SKIPPED"],"sources":["../../../src/domain/contexts/ciVisibilityContext.ts"],"sourcesContent":["import { display, getInitCookie } from '@kubesense/kubesense-browser-core'\nimport { SKIPPED } from '@kubesense/kubesense-js-core/assembly'\nimport { createCookieObservable } from '../../browser/cookieObservable'\nimport type { AssembleHook, DefaultRumEventAttributes } from '../hooks'\nimport { SessionType } from './sessionContext'\n\nexport const CI_VISIBILITY_TEST_ID_COOKIE_NAME = 'kubesense-ci-visibility-test-execution-id'\n\nexport interface CiTestWindow extends Window {\n Cypress?: {\n env: (key: string) => string | undefined\n }\n}\n\nexport function startCiVisibilityContext(\n assembleHook: AssembleHook,\n cookieObservable = createCookieObservable(CI_VISIBILITY_TEST_ID_COOKIE_NAME)\n) {\n let testExecutionId = getInitCookie(CI_VISIBILITY_TEST_ID_COOKIE_NAME) || readCypressTraceId()\n\n const cookieObservableSubscription = cookieObservable.subscribe((value) => {\n testExecutionId = value\n })\n\n assembleHook.register(({ eventType }): DefaultRumEventAttributes | SKIPPED => {\n if (typeof testExecutionId !== 'string') {\n return SKIPPED\n }\n\n return {\n type: eventType,\n session: {\n type: SessionType.CI_TEST,\n },\n ci_test: {\n test_execution_id: testExecutionId,\n },\n }\n })\n\n return {\n stop: () => {\n cookieObservableSubscription.unsubscribe()\n },\n }\n}\n\nfunction readCypressTraceId(): string | undefined {\n const cypress = (window as CiTestWindow).Cypress\n if (!cypress) {\n return undefined\n }\n try {\n return cypress.env('traceId')\n } catch {\n display.warn(\n 'Failed to read Cypress test execution id via Cypress.env(). Upgrade dd-trace-js to >= 5.88.0 to keep RUM ↔ test correlation working.'\n )\n return undefined\n }\n}\n"],"mappings":";;;;;AAMA,MAAa,oCAAoC;AAQjD,SAAgB,yBACd,cACA,mBAAmBA,yBAAAA,uBAAuB,iCAAiC,GAC3E;CACA,IAAI,mBAAA,GAAkBC,kCAAAA,cAAAA,CAAAA,2CAA+C,KAAK,mBAAmB;CAE7F,MAAM,+BAA+B,iBAAiB,WAAW,UAAU;EACzE,kBAAkB;CACpB,CAAC;CAED,aAAa,UAAU,EAAE,gBAAqD;EAC5E,IAAI,OAAO,oBAAoB,UAC7B,OAAOC,sCAAAA;EAGT,OAAO;GACL,MAAM;GACN,SAAS,EACP,MAAA,UACF;GACA,SAAS,EACP,mBAAmB,gBACrB;EACF;CACF,CAAC;CAED,OAAO,EACL,YAAY;EACV,6BAA6B,YAAY;CAC3C,EACF;AACF;AAEA,SAAS,qBAAyC;CAChD,MAAM,UAAW,OAAwB;CACzC,IAAI,CAAC,SACH;CAEF,IAAI;EACF,OAAO,QAAQ,IAAI,SAAS;CAC9B,QAAQ;EACN,kCAAA,QAAQ,KACN,sIACF;EACA;CACF;AACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function startConnectivityContext(
|
|
1
|
+
import type { AssembleHook } from '../hooks';
|
|
2
|
+
export declare function startConnectivityContext(assembleHook: AssembleHook): void;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
connectivity: (0, kubesense_browser_core_1.getConnectivity)(),
|
|
9
|
-
}));
|
|
1
|
+
let _kubesense_kubesense_browser_core = require("@kubesense/kubesense-browser-core");
|
|
2
|
+
//#region src/domain/contexts/connectivityContext.ts
|
|
3
|
+
function startConnectivityContext(assembleHook) {
|
|
4
|
+
assembleHook.register(({ eventType }) => ({
|
|
5
|
+
type: eventType,
|
|
6
|
+
connectivity: (0, _kubesense_kubesense_browser_core.getConnectivity)()
|
|
7
|
+
}));
|
|
10
8
|
}
|
|
9
|
+
//#endregion
|
|
10
|
+
exports.startConnectivityContext = startConnectivityContext;
|
|
11
|
+
|
|
11
12
|
//# sourceMappingURL=connectivityContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connectivityContext.js","
|
|
1
|
+
{"version":3,"file":"connectivityContext.js","names":["getConnectivity"],"sources":["../../../src/domain/contexts/connectivityContext.ts"],"sourcesContent":["import { getConnectivity } from '@kubesense/kubesense-browser-core'\nimport type { AssembleHook, DefaultRumEventAttributes } from '../hooks'\n\nexport function startConnectivityContext(assembleHook: AssembleHook) {\n assembleHook.register(({ eventType }): DefaultRumEventAttributes => ({\n type: eventType,\n connectivity: getConnectivity(),\n }))\n}\n"],"mappings":";;AAGA,SAAgB,yBAAyB,cAA4B;CACnE,aAAa,UAAU,EAAE,iBAA4C;EACnE,MAAM;EACN,eAAA,GAAcA,kCAAAA,gBAAAA,CAAgB;CAChC,EAAE;AACJ"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RumConfiguration } from '../configuration';
|
|
2
|
-
import type {
|
|
3
|
-
export type SdkName = 'rum' | 'rum-slim' | 'rum-synthetics';
|
|
4
|
-
export declare function startDefaultContext(
|
|
2
|
+
import type { AssembleHook } from '../hooks';
|
|
3
|
+
export type SdkName = 'rum' | 'rum-slim' | 'rum-synthetics' | 'rum-salesforce' | 'rum-shopify';
|
|
4
|
+
export declare function startDefaultContext(assembleHook: AssembleHook, configuration: RumConfiguration, sdkName: SdkName | undefined): void;
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
date: (0, kubesense_browser_core_1.timeStampNow)(),
|
|
27
|
-
source,
|
|
28
|
-
};
|
|
29
|
-
});
|
|
30
|
-
hooks.register(1 /* HookNames.AssembleTelemetry */, () => ({
|
|
31
|
-
application: { id: configuration.applicationId },
|
|
32
|
-
}));
|
|
1
|
+
let _kubesense_kubesense_js_core_time = require("@kubesense/kubesense-js-core/time");
|
|
2
|
+
let _kubesense_kubesense_browser_core = require("@kubesense/kubesense-browser-core");
|
|
3
|
+
//#region src/domain/contexts/defaultContext.ts
|
|
4
|
+
function startDefaultContext(assembleHook, configuration, sdkName) {
|
|
5
|
+
assembleHook.register(({ eventType }) => {
|
|
6
|
+
const source = configuration.source;
|
|
7
|
+
return {
|
|
8
|
+
type: eventType,
|
|
9
|
+
_kubesense: {
|
|
10
|
+
format_version: 2,
|
|
11
|
+
drift: (0, _kubesense_kubesense_js_core_time.clockDrift)(),
|
|
12
|
+
configuration: {
|
|
13
|
+
session_sample_rate: (0, _kubesense_kubesense_browser_core.round)(configuration.sessionSampleRate, 3),
|
|
14
|
+
session_replay_sample_rate: (0, _kubesense_kubesense_browser_core.round)(configuration.sessionReplaySampleRate, 3),
|
|
15
|
+
profiling_sample_rate: (0, _kubesense_kubesense_browser_core.round)(configuration.profilingSampleRate, 3),
|
|
16
|
+
trace_sample_rate: (0, _kubesense_kubesense_browser_core.round)(configuration.traceSampleRate, 3)
|
|
17
|
+
},
|
|
18
|
+
browser_sdk_version: (0, _kubesense_kubesense_browser_core.canUseEventBridge)() ? "2.0.0" : void 0,
|
|
19
|
+
sdk_name: sdkName
|
|
20
|
+
},
|
|
21
|
+
application: { id: configuration.applicationId },
|
|
22
|
+
date: (0, _kubesense_kubesense_js_core_time.timeStampNow)(),
|
|
23
|
+
source
|
|
24
|
+
};
|
|
25
|
+
});
|
|
33
26
|
}
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.startDefaultContext = startDefaultContext;
|
|
29
|
+
|
|
34
30
|
//# sourceMappingURL=defaultContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultContext.js","
|
|
1
|
+
{"version":3,"file":"defaultContext.js","names":["clockDrift","round","canUseEventBridge","timeStampNow"],"sources":["../../../src/domain/contexts/defaultContext.ts"],"sourcesContent":["import { clockDrift, timeStampNow } from '@kubesense/kubesense-js-core/time'\nimport { canUseEventBridge, round } from '@kubesense/kubesense-browser-core'\nimport type { RumConfiguration } from '../configuration'\nimport type { AssembleHook, DefaultRumEventAttributes } from '../hooks'\n\n// replaced at build time\ndeclare const __BUILD_ENV__SDK_VERSION__: string\n\nexport type SdkName = 'rum' | 'rum-slim' | 'rum-synthetics' | 'rum-salesforce' | 'rum-shopify'\n\nexport function startDefaultContext(\n assembleHook: AssembleHook,\n configuration: RumConfiguration,\n sdkName: SdkName | undefined\n) {\n assembleHook.register(({ eventType }): DefaultRumEventAttributes => {\n const source = configuration.source\n\n return {\n type: eventType,\n _kubesense: {\n format_version: 2,\n drift: clockDrift(),\n configuration: {\n session_sample_rate: round(configuration.sessionSampleRate, 3),\n session_replay_sample_rate: round(configuration.sessionReplaySampleRate, 3),\n profiling_sample_rate: round(configuration.profilingSampleRate, 3),\n trace_sample_rate: round(configuration.traceSampleRate, 3),\n },\n browser_sdk_version: canUseEventBridge() ? __BUILD_ENV__SDK_VERSION__ : undefined,\n sdk_name: sdkName,\n },\n application: {\n id: configuration.applicationId,\n },\n date: timeStampNow(),\n source,\n }\n })\n}\n"],"mappings":";;;AAUA,SAAgB,oBACd,cACA,eACA,SACA;CACA,aAAa,UAAU,EAAE,gBAA2C;EAClE,MAAM,SAAS,cAAc;EAE7B,OAAO;GACL,MAAM;GACN,YAAY;IACV,gBAAgB;IAChB,QAAA,GAAOA,kCAAAA,WAAAA,CAAW;IAClB,eAAe;KACb,sBAAA,GAAqBC,kCAAAA,MAAAA,CAAM,cAAc,mBAAmB,CAAC;KAC7D,6BAAA,GAA4BA,kCAAAA,MAAAA,CAAM,cAAc,yBAAyB,CAAC;KAC1E,wBAAA,GAAuBA,kCAAAA,MAAAA,CAAM,cAAc,qBAAqB,CAAC;KACjE,oBAAA,GAAmBA,kCAAAA,MAAAA,CAAM,cAAc,iBAAiB,CAAC;IAC3D;IACA,sBAAA,GAAqBC,kCAAAA,kBAAAA,CAAkB,IAAA,UAAiC,KAAA;IACxE,UAAU;GACZ;GACA,aAAa,EACX,IAAI,cAAc,cACpB;GACA,OAAA,GAAMC,kCAAAA,aAAAA,CAAa;GACnB;EACF;CACF,CAAC;AACH"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { Hooks } from '../hooks';
|
|
1
|
+
import type { AssembleHook } from '../hooks';
|
|
3
2
|
export type DisplayContext = ReturnType<typeof startDisplayContext>;
|
|
4
|
-
export declare function startDisplayContext(
|
|
3
|
+
export declare function startDisplayContext(assembleHook: AssembleHook): {
|
|
5
4
|
stop: () => void;
|
|
6
5
|
};
|
|
@@ -1,28 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
stop: () => {
|
|
21
|
-
unsubscribeViewport();
|
|
22
|
-
if (animationFrameId) {
|
|
23
|
-
cancelAnimationFrame(animationFrameId);
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
};
|
|
1
|
+
const require_viewportObservable = require("../../browser/viewportObservable.js");
|
|
2
|
+
let _kubesense_kubesense_js_core_monitor = require("@kubesense/kubesense-js-core/monitor");
|
|
3
|
+
//#region src/domain/contexts/displayContext.ts
|
|
4
|
+
function startDisplayContext(assembleHook) {
|
|
5
|
+
let viewport;
|
|
6
|
+
const animationFrameId = requestAnimationFrame((0, _kubesense_kubesense_js_core_monitor.monitor)(() => {
|
|
7
|
+
viewport = require_viewportObservable.getViewportDimension();
|
|
8
|
+
}));
|
|
9
|
+
const unsubscribeViewport = require_viewportObservable.initViewportObservable().subscribe((viewportDimension) => {
|
|
10
|
+
viewport = viewportDimension;
|
|
11
|
+
}).unsubscribe;
|
|
12
|
+
assembleHook.register(({ eventType }) => ({
|
|
13
|
+
type: eventType,
|
|
14
|
+
display: viewport ? { viewport } : void 0
|
|
15
|
+
}));
|
|
16
|
+
return { stop: () => {
|
|
17
|
+
unsubscribeViewport();
|
|
18
|
+
if (animationFrameId) cancelAnimationFrame(animationFrameId);
|
|
19
|
+
} };
|
|
27
20
|
}
|
|
21
|
+
//#endregion
|
|
22
|
+
exports.startDisplayContext = startDisplayContext;
|
|
23
|
+
|
|
28
24
|
//# sourceMappingURL=displayContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"displayContext.js","
|
|
1
|
+
{"version":3,"file":"displayContext.js","names":["monitor","getViewportDimension","initViewportObservable"],"sources":["../../../src/domain/contexts/displayContext.ts"],"sourcesContent":["import { monitor } from '@kubesense/kubesense-js-core/monitor'\nimport type { ViewportDimension } from '../../browser/viewportObservable'\nimport { getViewportDimension, initViewportObservable } from '../../browser/viewportObservable'\nimport type { AssembleHook, DefaultRumEventAttributes } from '../hooks'\n\nexport type DisplayContext = ReturnType<typeof startDisplayContext>\n\nexport function startDisplayContext(assembleHook: AssembleHook) {\n let viewport: ViewportDimension | undefined\n // Use requestAnimationFrame to delay the calculation of viewport dimensions until after SDK initialization, preventing long tasks.\n const animationFrameId = requestAnimationFrame(\n monitor(() => {\n viewport = getViewportDimension()\n })\n )\n\n const unsubscribeViewport = initViewportObservable().subscribe((viewportDimension) => {\n viewport = viewportDimension\n }).unsubscribe\n\n assembleHook.register(({ eventType }): DefaultRumEventAttributes => ({\n type: eventType,\n display: viewport ? { viewport } : undefined,\n }))\n\n return {\n stop: () => {\n unsubscribeViewport()\n if (animationFrameId) {\n cancelAnimationFrame(animationFrameId)\n }\n },\n }\n}\n"],"mappings":";;;AAOA,SAAgB,oBAAoB,cAA4B;CAC9D,IAAI;CAEJ,MAAM,mBAAmB,uBAAA,GACvBA,qCAAAA,QAAAA,OAAc;EACZ,WAAWC,2BAAAA,qBAAqB;CAClC,CAAC,CACH;CAEA,MAAM,sBAAsBC,2BAAAA,uBAAuB,CAAC,CAAC,WAAW,sBAAsB;EACpF,WAAW;CACb,CAAC,CAAC,CAAC;CAEH,aAAa,UAAU,EAAE,iBAA4C;EACnE,MAAM;EACN,SAAS,WAAW,EAAE,SAAS,IAAI,KAAA;CACrC,EAAE;CAEF,OAAO,EACL,YAAY;EACV,oBAAoB;EACpB,IAAI,kBACF,qBAAqB,gBAAgB;CAEzC,EACF;AACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ContextValue, Context } from '@kubesense/kubesense-browser-core';
|
|
2
2
|
import type { LifeCycle } from '../lifeCycle';
|
|
3
3
|
import type { RumConfiguration } from '../configuration';
|
|
4
|
-
import type {
|
|
4
|
+
import type { AssembleHook } from '../hooks';
|
|
5
5
|
export declare const FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY: number;
|
|
6
6
|
export declare const BYTES_COMPUTATION_THROTTLING_DELAY = 200;
|
|
7
7
|
export type FeatureFlagContext = Context;
|
|
@@ -16,4 +16,4 @@ export interface FeatureFlagContexts {
|
|
|
16
16
|
*
|
|
17
17
|
* Note: we choose not to add a new context at each evaluation to save memory
|
|
18
18
|
*/
|
|
19
|
-
export declare function startFeatureFlagContexts(lifeCycle: LifeCycle,
|
|
19
|
+
export declare function startFeatureFlagContexts(lifeCycle: LifeCycle, assembleHook: AssembleHook, configuration: RumConfiguration): FeatureFlagContexts;
|
|
@@ -1,53 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
exports.FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY = kubesense_browser_core_1.SESSION_TIME_OUT_DELAY;
|
|
8
|
-
exports.BYTES_COMPUTATION_THROTTLING_DELAY = 200;
|
|
1
|
+
const require_rawRumEvent_types = require("../../rawRumEvent.types.js");
|
|
2
|
+
require("../lifeCycle.js");
|
|
3
|
+
let _kubesense_kubesense_browser_core = require("@kubesense/kubesense-browser-core");
|
|
4
|
+
let _kubesense_kubesense_js_core_assembly = require("@kubesense/kubesense-js-core/assembly");
|
|
5
|
+
//#region src/domain/contexts/featureFlagContext.ts
|
|
6
|
+
const FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY = _kubesense_kubesense_browser_core.SESSION_TIME_OUT_DELAY;
|
|
9
7
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
function startFeatureFlagContexts(lifeCycle,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
return {
|
|
40
|
-
type: eventType,
|
|
41
|
-
feature_flags: featureFlagContext,
|
|
42
|
-
};
|
|
43
|
-
});
|
|
44
|
-
return {
|
|
45
|
-
addFeatureFlagEvaluation: (key, value) => {
|
|
46
|
-
const currentContext = featureFlagContexts.find();
|
|
47
|
-
if (currentContext) {
|
|
48
|
-
currentContext[key] = value;
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
};
|
|
8
|
+
* Start feature flag contexts
|
|
9
|
+
*
|
|
10
|
+
* Feature flag contexts follow the life of views.
|
|
11
|
+
* A new context is added when a view is created and ended when the view is ended
|
|
12
|
+
*
|
|
13
|
+
* Note: we choose not to add a new context at each evaluation to save memory
|
|
14
|
+
*/
|
|
15
|
+
function startFeatureFlagContexts(lifeCycle, assembleHook, configuration) {
|
|
16
|
+
const featureFlagContexts = (0, _kubesense_kubesense_browser_core.createValueHistory)({ expireDelay: FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY });
|
|
17
|
+
lifeCycle.subscribe(1, ({ startClocks }) => {
|
|
18
|
+
featureFlagContexts.add({}, startClocks.relative);
|
|
19
|
+
});
|
|
20
|
+
lifeCycle.subscribe(6, ({ endClocks }) => {
|
|
21
|
+
featureFlagContexts.closeActive(endClocks.relative);
|
|
22
|
+
});
|
|
23
|
+
assembleHook.register(({ startTime, eventType }) => {
|
|
24
|
+
if (!configuration.trackFeatureFlagsForEvents.concat([require_rawRumEvent_types.RumEventType.VIEW, require_rawRumEvent_types.RumEventType.ERROR]).includes(eventType)) return _kubesense_kubesense_js_core_assembly.SKIPPED;
|
|
25
|
+
const featureFlagContext = featureFlagContexts.find(startTime);
|
|
26
|
+
if (!featureFlagContext || (0, _kubesense_kubesense_browser_core.isEmptyObject)(featureFlagContext)) return _kubesense_kubesense_js_core_assembly.SKIPPED;
|
|
27
|
+
return {
|
|
28
|
+
type: eventType,
|
|
29
|
+
feature_flags: featureFlagContext
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
return { addFeatureFlagEvaluation: (key, value) => {
|
|
33
|
+
const currentContext = featureFlagContexts.find();
|
|
34
|
+
if (currentContext) currentContext[key] = value;
|
|
35
|
+
} };
|
|
52
36
|
}
|
|
37
|
+
//#endregion
|
|
38
|
+
exports.FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY = FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY;
|
|
39
|
+
exports.startFeatureFlagContexts = startFeatureFlagContexts;
|
|
40
|
+
|
|
53
41
|
//# sourceMappingURL=featureFlagContext.js.map
|