@openobserve/browser-core 0.2.11-rc1 → 0.2.12-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/package.json +6 -5
- package/src/boot/displayAlreadyInitializedError.ts +8 -0
- package/src/boot/init.ts +29 -15
- package/src/browser/addEventListener.ts +13 -10
- package/src/browser/{types.ts → browser.types.ts} +42 -0
- package/src/browser/cookie.ts +49 -14
- package/src/browser/fetchObservable.ts +80 -21
- package/src/browser/{pageExitObservable.ts → pageMayExitObservable.ts} +11 -22
- package/src/browser/runOnReadyState.ts +14 -4
- package/src/browser/xhrObservable.ts +17 -4
- package/src/domain/allowedTrackingOrigins.ts +30 -0
- package/src/domain/bufferedData.ts +32 -0
- package/src/domain/configuration/configuration.ts +352 -83
- package/src/domain/configuration/endpointBuilder.ts +29 -32
- package/src/domain/configuration/index.ts +6 -5
- package/src/domain/configuration/transportConfiguration.ts +42 -35
- package/src/domain/connectivity/connectivity.ts +5 -1
- package/src/domain/console/consoleObservable.ts +57 -21
- package/src/domain/context/contextConstants.ts +22 -0
- package/src/domain/context/contextManager.ts +48 -11
- package/src/domain/context/contextUtils.ts +14 -0
- package/src/domain/context/defineContextMethod.ts +31 -0
- package/src/domain/context/storeContextManager.ts +7 -3
- package/src/domain/contexts/accountContext.ts +47 -0
- package/src/domain/contexts/globalContext.ts +30 -0
- package/src/domain/contexts/rumInternalContext.type.ts +15 -0
- package/src/domain/contexts/userContext.ts +64 -0
- package/src/domain/deflate/{types.ts → deflate.types.ts} +6 -4
- package/src/domain/deflate/index.ts +1 -1
- package/src/domain/error/error.ts +28 -84
- package/src/domain/error/error.types.ts +10 -2
- package/src/domain/error/trackRuntimeError.ts +29 -32
- package/src/domain/eventRateLimiter/createEventRateLimiter.ts +5 -2
- package/src/domain/extension/extensionUtils.ts +28 -0
- package/src/domain/intakeSites.ts +18 -0
- package/src/domain/report/reportObservable.ts +35 -30
- package/src/domain/resourceUtils.ts +20 -16
- package/src/domain/session/README.md +193 -0
- package/src/domain/session/oldCookiesMigration.ts +2 -2
- package/src/domain/session/sessionConstants.ts +16 -1
- package/src/domain/session/sessionManager.ts +179 -15
- package/src/domain/session/sessionState.ts +49 -17
- package/src/domain/session/sessionStateValidation.ts +9 -0
- package/src/domain/session/sessionStore.ts +118 -55
- package/src/domain/session/sessionStoreOperations.ts +47 -20
- package/src/domain/session/storeStrategies/sessionInCookie.ts +105 -26
- package/src/domain/session/storeStrategies/sessionInLocalStorage.ts +10 -8
- package/src/domain/session/storeStrategies/sessionStoreStrategy.ts +5 -2
- package/src/domain/synthetics/syntheticsWorkerValues.ts +13 -2
- package/src/domain/tags.ts +76 -0
- package/src/domain/telemetry/index.ts +12 -4
- package/src/domain/telemetry/rawTelemetryEvent.types.ts +6 -3
- package/src/domain/telemetry/telemetry.ts +235 -106
- package/src/domain/telemetry/telemetryEvent.types.ts +514 -5
- package/src/domain/trackingConsent.ts +34 -0
- package/src/index.ts +90 -59
- package/src/tools/abstractHooks.ts +72 -0
- package/src/tools/abstractLifeCycle.ts +1 -0
- package/src/tools/boundedBuffer.ts +36 -8
- package/src/tools/display.ts +4 -0
- package/src/tools/encoder.ts +3 -2
- package/src/tools/experimentalFeatures.ts +18 -7
- package/src/tools/getZoneJsOriginalValue.ts +1 -1
- package/src/tools/{getGlobalObject.ts → globalObject.ts} +20 -0
- package/src/tools/instrumentMethod.ts +58 -41
- package/src/tools/matchOption.ts +1 -2
- package/src/tools/monitor.ts +11 -7
- package/src/tools/observable.ts +78 -12
- package/src/tools/queueMicrotask.ts +13 -0
- package/src/tools/readBytesFromStream.ts +24 -64
- package/src/tools/requestIdleCallback.ts +40 -0
- package/src/tools/sendToExtension.ts +3 -1
- package/src/tools/serialisation/context.ts +4 -1
- package/src/tools/serialisation/sanitize.ts +32 -14
- package/src/{domain/error → tools/stackTrace}/computeStackTrace.ts +72 -8
- package/src/tools/stackTrace/handlingStack.ts +48 -0
- package/src/tools/taskQueue.ts +63 -0
- package/src/tools/timer.ts +1 -1
- package/src/tools/utils/arrayUtils.ts +11 -3
- package/src/tools/utils/browserDetection.ts +0 -9
- package/src/tools/utils/byteUtils.ts +13 -2
- package/src/tools/utils/functionUtils.ts +0 -2
- package/src/tools/utils/numberUtils.ts +2 -1
- package/src/tools/utils/objectUtils.ts +1 -3
- package/src/tools/utils/polyfills.ts +6 -107
- package/src/tools/utils/responseUtils.ts +1 -1
- package/src/tools/utils/stringUtils.ts +34 -2
- package/src/tools/utils/timeUtils.ts +18 -13
- package/src/tools/utils/timezone.ts +9 -0
- package/src/tools/utils/urlPolyfill.ts +29 -59
- package/src/tools/valueHistory.ts +66 -35
- package/src/transport/batch.ts +77 -80
- package/src/transport/eventBridge.ts +24 -5
- package/src/transport/flushController.ts +27 -21
- package/src/transport/httpRequest.ts +92 -71
- package/src/transport/index.ts +7 -4
- package/src/transport/sendWithRetryStrategy.ts +55 -36
- package/cjs/boot/init.d.ts +0 -5
- package/cjs/boot/init.js +0 -36
- package/cjs/boot/init.js.map +0 -1
- package/cjs/browser/addEventListener.d.ts +0 -84
- package/cjs/browser/addEventListener.js +0 -94
- package/cjs/browser/addEventListener.js.map +0 -1
- package/cjs/browser/cookie.d.ts +0 -17
- package/cjs/browser/cookie.js +0 -86
- package/cjs/browser/cookie.js.map +0 -1
- package/cjs/browser/fetchObservable.d.ts +0 -23
- package/cjs/browser/fetchObservable.js +0 -69
- package/cjs/browser/fetchObservable.js.map +0 -1
- package/cjs/browser/pageExitObservable.d.ts +0 -14
- package/cjs/browser/pageExitObservable.js +0 -57
- package/cjs/browser/pageExitObservable.js.map +0 -1
- package/cjs/browser/runOnReadyState.d.ts +0 -2
- package/cjs/browser/runOnReadyState.js +0 -15
- package/cjs/browser/runOnReadyState.js.map +0 -1
- package/cjs/browser/types.d.ts +0 -19
- package/cjs/browser/types.js +0 -6
- package/cjs/browser/types.js.map +0 -1
- package/cjs/browser/xhrObservable.d.ts +0 -21
- package/cjs/browser/xhrObservable.js +0 -85
- package/cjs/browser/xhrObservable.js.map +0 -1
- package/cjs/domain/configuration/configuration.d.ts +0 -72
- package/cjs/domain/configuration/configuration.js +0 -94
- package/cjs/domain/configuration/configuration.js.map +0 -1
- package/cjs/domain/configuration/endpointBuilder.d.ts +0 -10
- package/cjs/domain/configuration/endpointBuilder.js +0 -84
- package/cjs/domain/configuration/endpointBuilder.js.map +0 -1
- package/cjs/domain/configuration/index.d.ts +0 -4
- package/cjs/domain/configuration/index.js +0 -27
- package/cjs/domain/configuration/index.js.map +0 -1
- package/cjs/domain/configuration/intakeSites.d.ts +0 -5
- package/cjs/domain/configuration/intakeSites.js +0 -9
- package/cjs/domain/configuration/intakeSites.js.map +0 -1
- package/cjs/domain/configuration/tags.d.ts +0 -4
- package/cjs/domain/configuration/tags.js +0 -39
- package/cjs/domain/configuration/tags.js.map +0 -1
- package/cjs/domain/configuration/transportConfiguration.d.ts +0 -16
- package/cjs/domain/configuration/transportConfiguration.js +0 -42
- package/cjs/domain/configuration/transportConfiguration.js.map +0 -1
- package/cjs/domain/connectivity/connectivity.d.ts +0 -13
- package/cjs/domain/connectivity/connectivity.js +0 -14
- package/cjs/domain/connectivity/connectivity.js.map +0 -1
- package/cjs/domain/connectivity/index.d.ts +0 -1
- package/cjs/domain/connectivity/index.js +0 -18
- package/cjs/domain/connectivity/index.js.map +0 -1
- package/cjs/domain/console/consoleObservable.d.ts +0 -11
- package/cjs/domain/console/consoleObservable.js +0 -72
- package/cjs/domain/console/consoleObservable.js.map +0 -1
- package/cjs/domain/context/contextConstants.d.ts +0 -5
- package/cjs/domain/context/contextConstants.js +0 -3
- package/cjs/domain/context/contextConstants.js.map +0 -1
- package/cjs/domain/context/contextManager.d.ts +0 -12
- package/cjs/domain/context/contextManager.js +0 -43
- package/cjs/domain/context/contextManager.js.map +0 -1
- package/cjs/domain/context/customerDataTracker.d.ts +0 -45
- package/cjs/domain/context/customerDataTracker.js +0 -107
- package/cjs/domain/context/customerDataTracker.js.map +0 -1
- package/cjs/domain/context/storeContextManager.d.ts +0 -6
- package/cjs/domain/context/storeContextManager.js +0 -38
- package/cjs/domain/context/storeContextManager.js.map +0 -1
- package/cjs/domain/deflate/types.d.ts +0 -0
- package/cjs/domain/deflate/types.js +0 -3
- package/cjs/domain/deflate/types.js.map +0 -1
- package/cjs/domain/error/computeStackTrace.d.ts +0 -33
- package/cjs/domain/error/computeStackTrace.js +0 -142
- package/cjs/domain/error/computeStackTrace.js.map +0 -1
- package/cjs/domain/error/error.d.ts +0 -28
- package/cjs/domain/error/error.js +0 -131
- package/cjs/domain/error/error.js.map +0 -1
- package/cjs/domain/error/error.types.d.ts +0 -40
- package/cjs/domain/error/error.types.js +0 -13
- package/cjs/domain/error/error.types.js.map +0 -1
- package/cjs/domain/error/trackRuntimeError.d.ts +0 -13
- package/cjs/domain/error/trackRuntimeError.js +0 -54
- package/cjs/domain/error/trackRuntimeError.js.map +0 -1
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.d.ts +0 -5
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.js +0 -40
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.js.map +0 -1
- package/cjs/domain/report/browser.types.d.ts +0 -34
- package/cjs/domain/report/browser.types.js +0 -3
- package/cjs/domain/report/browser.types.js.map +0 -1
- package/cjs/domain/report/reportObservable.d.ts +0 -17
- package/cjs/domain/report/reportObservable.js +0 -94
- package/cjs/domain/report/reportObservable.js.map +0 -1
- package/cjs/domain/resourceUtils.d.ts +0 -16
- package/cjs/domain/resourceUtils.js +0 -3
- package/cjs/domain/resourceUtils.js.map +0 -1
- package/cjs/domain/session/oldCookiesMigration.d.ts +0 -11
- package/cjs/domain/session/oldCookiesMigration.js +0 -40
- package/cjs/domain/session/oldCookiesMigration.js.map +0 -1
- package/cjs/domain/session/sessionConstants.d.ts +0 -2
- package/cjs/domain/session/sessionConstants.js +0 -7
- package/cjs/domain/session/sessionConstants.js.map +0 -1
- package/cjs/domain/session/sessionManager.d.ts +0 -20
- package/cjs/domain/session/sessionManager.js +0 -65
- package/cjs/domain/session/sessionManager.js.map +0 -1
- package/cjs/domain/session/sessionState.d.ts +0 -11
- package/cjs/domain/session/sessionState.js +0 -45
- package/cjs/domain/session/sessionState.js.map +0 -1
- package/cjs/domain/session/sessionStore.d.ts +0 -34
- package/cjs/domain/session/sessionStore.js +0 -144
- package/cjs/domain/session/sessionStore.js.map +0 -1
- package/cjs/domain/session/sessionStoreOperations.d.ts +0 -10
- package/cjs/domain/session/sessionStoreOperations.js +0 -96
- package/cjs/domain/session/sessionStoreOperations.js.map +0 -1
- package/cjs/domain/session/storeStrategies/sessionInCookie.d.ts +0 -6
- package/cjs/domain/session/storeStrategies/sessionInCookie.js +0 -59
- package/cjs/domain/session/storeStrategies/sessionInCookie.js.map +0 -1
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.d.ts +0 -3
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js +0 -41
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js.map +0 -1
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.d.ts +0 -15
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.js +0 -5
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.js.map +0 -1
- package/cjs/domain/synthetics/syntheticsWorkerValues.d.ts +0 -11
- package/cjs/domain/synthetics/syntheticsWorkerValues.js +0 -22
- package/cjs/domain/synthetics/syntheticsWorkerValues.js.map +0 -1
- package/cjs/domain/telemetry/index.d.ts +0 -3
- package/cjs/domain/telemetry/index.js +0 -28
- package/cjs/domain/telemetry/index.js.map +0 -1
- package/cjs/domain/telemetry/rawTelemetryEvent.types.d.ts +0 -15
- package/cjs/domain/telemetry/rawTelemetryEvent.types.js +0 -8
- package/cjs/domain/telemetry/rawTelemetryEvent.types.js.map +0 -1
- package/cjs/domain/telemetry/telemetry.d.ts +0 -116
- package/cjs/domain/telemetry/telemetry.js +0 -157
- package/cjs/domain/telemetry/telemetry.js.map +0 -1
- package/cjs/domain/telemetry/telemetryEvent.types.d.ts +0 -391
- package/cjs/domain/telemetry/telemetryEvent.types.js +0 -7
- package/cjs/domain/telemetry/telemetryEvent.types.js.map +0 -1
- package/cjs/domain/user/index.d.ts +0 -2
- package/cjs/domain/user/index.js +0 -19
- package/cjs/domain/user/index.js.map +0 -1
- package/cjs/domain/user/user.d.ts +0 -12
- package/cjs/domain/user/user.js +0 -35
- package/cjs/domain/user/user.js.map +0 -1
- package/cjs/domain/user/user.types.d.ts +0 -6
- package/cjs/domain/user/user.types.js +0 -3
- package/cjs/domain/user/user.types.js.map +0 -1
- package/cjs/tools/abstractLifeCycle.d.ts +0 -23
- package/cjs/tools/abstractLifeCycle.js +0 -29
- package/cjs/tools/abstractLifeCycle.js.map +0 -1
- package/cjs/tools/boundedBuffer.d.ts +0 -5
- package/cjs/tools/boundedBuffer.js +0 -22
- package/cjs/tools/boundedBuffer.js.map +0 -1
- package/cjs/tools/catchUserErrors.d.ts +0 -1
- package/cjs/tools/catchUserErrors.js +0 -20
- package/cjs/tools/catchUserErrors.js.map +0 -1
- package/cjs/tools/display.d.ts +0 -35
- package/cjs/tools/display.js +0 -41
- package/cjs/tools/display.js.map +0 -1
- package/cjs/tools/encoder.d.ts +0 -53
- package/cjs/tools/encoder.js +0 -41
- package/cjs/tools/encoder.js.map +0 -1
- package/cjs/tools/experimentalFeatures.d.ts +0 -22
- package/cjs/tools/experimentalFeatures.js +0 -45
- package/cjs/tools/experimentalFeatures.js.map +0 -1
- package/cjs/tools/getGlobalObject.d.ts +0 -4
- package/cjs/tools/getGlobalObject.js +0 -37
- package/cjs/tools/getGlobalObject.js.map +0 -1
- package/cjs/tools/getZoneJsOriginalValue.d.ts +0 -19
- package/cjs/tools/getZoneJsOriginalValue.js +0 -30
- package/cjs/tools/getZoneJsOriginalValue.js.map +0 -1
- package/cjs/tools/instrumentMethod.d.ts +0 -59
- package/cjs/tools/instrumentMethod.js +0 -106
- package/cjs/tools/instrumentMethod.js.map +0 -1
- package/cjs/tools/matchOption.d.ts +0 -8
- package/cjs/tools/matchOption.js +0 -38
- package/cjs/tools/matchOption.js.map +0 -1
- package/cjs/tools/mergeInto.d.ts +0 -25
- package/cjs/tools/mergeInto.js +0 -105
- package/cjs/tools/mergeInto.js.map +0 -1
- package/cjs/tools/monitor.d.ts +0 -8
- package/cjs/tools/monitor.js +0 -76
- package/cjs/tools/monitor.js.map +0 -1
- package/cjs/tools/observable.d.ts +0 -12
- package/cjs/tools/observable.js +0 -43
- package/cjs/tools/observable.js.map +0 -1
- package/cjs/tools/readBytesFromStream.d.ts +0 -11
- package/cjs/tools/readBytesFromStream.js +0 -64
- package/cjs/tools/readBytesFromStream.js.map +0 -1
- package/cjs/tools/sendToExtension.d.ts +0 -3
- package/cjs/tools/sendToExtension.js +0 -11
- package/cjs/tools/sendToExtension.js.map +0 -1
- package/cjs/tools/serialisation/context.d.ts +0 -6
- package/cjs/tools/serialisation/context.js +0 -3
- package/cjs/tools/serialisation/context.js.map +0 -1
- package/cjs/tools/serialisation/jsonStringify.d.ts +0 -13
- package/cjs/tools/serialisation/jsonStringify.js +0 -49
- package/cjs/tools/serialisation/jsonStringify.js.map +0 -1
- package/cjs/tools/serialisation/sanitize.d.ts +0 -18
- package/cjs/tools/serialisation/sanitize.js +0 -185
- package/cjs/tools/serialisation/sanitize.js.map +0 -1
- package/cjs/tools/timer.d.ts +0 -5
- package/cjs/tools/timer.js +0 -23
- package/cjs/tools/timer.js.map +0 -1
- package/cjs/tools/utils/arrayUtils.d.ts +0 -1
- package/cjs/tools/utils/arrayUtils.js +0 -11
- package/cjs/tools/utils/arrayUtils.js.map +0 -1
- package/cjs/tools/utils/browserDetection.d.ts +0 -10
- package/cjs/tools/utils/browserDetection.js +0 -42
- package/cjs/tools/utils/browserDetection.js.map +0 -1
- package/cjs/tools/utils/byteUtils.d.ts +0 -4
- package/cjs/tools/utils/byteUtils.js +0 -31
- package/cjs/tools/utils/byteUtils.js.map +0 -1
- package/cjs/tools/utils/functionUtils.d.ts +0 -9
- package/cjs/tools/utils/functionUtils.js +0 -48
- package/cjs/tools/utils/functionUtils.js.map +0 -1
- package/cjs/tools/utils/numberUtils.d.ts +0 -8
- package/cjs/tools/utils/numberUtils.js +0 -24
- package/cjs/tools/utils/numberUtils.js.map +0 -1
- package/cjs/tools/utils/objectUtils.d.ts +0 -10
- package/cjs/tools/utils/objectUtils.js +0 -26
- package/cjs/tools/utils/objectUtils.js.map +0 -1
- package/cjs/tools/utils/polyfills.d.ts +0 -24
- package/cjs/tools/utils/polyfills.js +0 -110
- package/cjs/tools/utils/polyfills.js.map +0 -1
- package/cjs/tools/utils/responseUtils.d.ts +0 -2
- package/cjs/tools/utils/responseUtils.js +0 -18
- package/cjs/tools/utils/responseUtils.js.map +0 -1
- package/cjs/tools/utils/stringUtils.d.ts +0 -8
- package/cjs/tools/utils/stringUtils.js +0 -59
- package/cjs/tools/utils/stringUtils.js.map +0 -1
- package/cjs/tools/utils/timeUtils.d.ts +0 -57
- package/cjs/tools/utils/timeUtils.js +0 -99
- package/cjs/tools/utils/timeUtils.js.map +0 -1
- package/cjs/tools/utils/typeUtils.d.ts +0 -4
- package/cjs/tools/utils/typeUtils.js +0 -17
- package/cjs/tools/utils/typeUtils.js.map +0 -1
- package/cjs/tools/utils/urlPolyfill.d.ts +0 -14
- package/cjs/tools/utils/urlPolyfill.js +0 -92
- package/cjs/tools/utils/urlPolyfill.js.map +0 -1
- package/cjs/tools/valueHistory.d.ts +0 -50
- package/cjs/tools/valueHistory.js +0 -106
- package/cjs/tools/valueHistory.js.map +0 -1
- package/cjs/transport/batch.d.ts +0 -21
- package/cjs/transport/batch.js +0 -123
- package/cjs/transport/batch.js.map +0 -1
- package/cjs/transport/eventBridge.d.ts +0 -12
- package/cjs/transport/eventBridge.js +0 -34
- package/cjs/transport/eventBridge.js.map +0 -1
- package/cjs/transport/flushController.d.ts +0 -58
- package/cjs/transport/flushController.js +0 -112
- package/cjs/transport/flushController.js.map +0 -1
- package/cjs/transport/httpRequest.d.ts +0 -38
- package/cjs/transport/httpRequest.js +0 -95
- package/cjs/transport/httpRequest.js.map +0 -1
- package/cjs/transport/index.d.ts +0 -4
- package/cjs/transport/index.js +0 -13
- package/cjs/transport/index.js.map +0 -1
- package/cjs/transport/sendWithRetryStrategy.d.ts +0 -39
- package/cjs/transport/sendWithRetryStrategy.js +0 -151
- package/cjs/transport/sendWithRetryStrategy.js.map +0 -1
- package/cjs/transport/startBatchWithReplica.d.ts +0 -20
- package/cjs/transport/startBatchWithReplica.js +0 -42
- package/cjs/transport/startBatchWithReplica.js.map +0 -1
- package/esm/boot/init.d.ts +0 -5
- package/esm/boot/init.js +0 -31
- package/esm/boot/init.js.map +0 -1
- package/esm/browser/addEventListener.d.ts +0 -84
- package/esm/browser/addEventListener.js +0 -89
- package/esm/browser/addEventListener.js.map +0 -1
- package/esm/browser/cookie.d.ts +0 -17
- package/esm/browser/cookie.js +0 -76
- package/esm/browser/cookie.js.map +0 -1
- package/esm/browser/fetchObservable.d.ts +0 -23
- package/esm/browser/fetchObservable.js +0 -65
- package/esm/browser/fetchObservable.js.map +0 -1
- package/esm/browser/pageExitObservable.d.ts +0 -14
- package/esm/browser/pageExitObservable.js +0 -52
- package/esm/browser/pageExitObservable.js.map +0 -1
- package/esm/browser/runOnReadyState.d.ts +0 -2
- package/esm/browser/runOnReadyState.js +0 -11
- package/esm/browser/runOnReadyState.js.map +0 -1
- package/esm/browser/types.d.ts +0 -19
- package/esm/browser/types.js +0 -5
- package/esm/browser/types.js.map +0 -1
- package/esm/browser/xhrObservable.d.ts +0 -21
- package/esm/browser/xhrObservable.js +0 -81
- package/esm/browser/xhrObservable.js.map +0 -1
- package/esm/domain/configuration/configuration.d.ts +0 -72
- package/esm/domain/configuration/configuration.js +0 -89
- package/esm/domain/configuration/configuration.js.map +0 -1
- package/esm/domain/configuration/endpointBuilder.d.ts +0 -10
- package/esm/domain/configuration/endpointBuilder.js +0 -80
- package/esm/domain/configuration/endpointBuilder.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/intakeSites.d.ts +0 -5
- package/esm/domain/configuration/intakeSites.js +0 -6
- package/esm/domain/configuration/intakeSites.js.map +0 -1
- package/esm/domain/configuration/tags.d.ts +0 -4
- package/esm/domain/configuration/tags.js +0 -34
- package/esm/domain/configuration/tags.js.map +0 -1
- package/esm/domain/configuration/transportConfiguration.d.ts +0 -16
- package/esm/domain/configuration/transportConfiguration.js +0 -38
- package/esm/domain/configuration/transportConfiguration.js.map +0 -1
- package/esm/domain/connectivity/connectivity.d.ts +0 -13
- package/esm/domain/connectivity/connectivity.js +0 -10
- package/esm/domain/connectivity/connectivity.js.map +0 -1
- package/esm/domain/connectivity/index.d.ts +0 -1
- package/esm/domain/connectivity/index.js +0 -2
- package/esm/domain/connectivity/index.js.map +0 -1
- package/esm/domain/console/consoleObservable.d.ts +0 -11
- package/esm/domain/console/consoleObservable.js +0 -67
- package/esm/domain/console/consoleObservable.js.map +0 -1
- package/esm/domain/context/contextConstants.d.ts +0 -5
- package/esm/domain/context/contextConstants.js +0 -2
- package/esm/domain/context/contextConstants.js.map +0 -1
- package/esm/domain/context/contextManager.d.ts +0 -12
- package/esm/domain/context/contextManager.js +0 -39
- package/esm/domain/context/contextManager.js.map +0 -1
- package/esm/domain/context/customerDataTracker.d.ts +0 -45
- package/esm/domain/context/customerDataTracker.js +0 -102
- package/esm/domain/context/customerDataTracker.js.map +0 -1
- package/esm/domain/context/storeContextManager.d.ts +0 -6
- package/esm/domain/context/storeContextManager.js +0 -32
- package/esm/domain/context/storeContextManager.js.map +0 -1
- package/esm/domain/deflate/index.d.ts +0 -1
- package/esm/domain/deflate/index.js +0 -2
- package/esm/domain/deflate/index.js.map +0 -1
- package/esm/domain/deflate/types.d.ts +0 -38
- package/esm/domain/deflate/types.js +0 -2
- package/esm/domain/deflate/types.js.map +0 -1
- package/esm/domain/error/computeStackTrace.d.ts +0 -33
- package/esm/domain/error/computeStackTrace.js +0 -137
- package/esm/domain/error/computeStackTrace.js.map +0 -1
- package/esm/domain/error/error.d.ts +0 -28
- package/esm/domain/error/error.js +0 -121
- package/esm/domain/error/error.js.map +0 -1
- package/esm/domain/error/error.types.d.ts +0 -40
- package/esm/domain/error/error.types.js +0 -10
- package/esm/domain/error/error.types.js.map +0 -1
- package/esm/domain/error/trackRuntimeError.d.ts +0 -13
- package/esm/domain/error/trackRuntimeError.js +0 -48
- package/esm/domain/error/trackRuntimeError.js.map +0 -1
- package/esm/domain/eventRateLimiter/createEventRateLimiter.d.ts +0 -5
- package/esm/domain/eventRateLimiter/createEventRateLimiter.js +0 -36
- package/esm/domain/eventRateLimiter/createEventRateLimiter.js.map +0 -1
- package/esm/domain/report/browser.types.d.ts +0 -34
- package/esm/domain/report/browser.types.js +0 -2
- package/esm/domain/report/browser.types.js.map +0 -1
- package/esm/domain/report/reportObservable.d.ts +0 -17
- package/esm/domain/report/reportObservable.js +0 -90
- package/esm/domain/report/reportObservable.js.map +0 -1
- package/esm/domain/resourceUtils.d.ts +0 -16
- package/esm/domain/resourceUtils.js +0 -2
- package/esm/domain/resourceUtils.js.map +0 -1
- package/esm/domain/session/oldCookiesMigration.d.ts +0 -11
- package/esm/domain/session/oldCookiesMigration.js +0 -36
- package/esm/domain/session/oldCookiesMigration.js.map +0 -1
- package/esm/domain/session/sessionConstants.d.ts +0 -2
- package/esm/domain/session/sessionConstants.js +0 -4
- package/esm/domain/session/sessionConstants.js.map +0 -1
- package/esm/domain/session/sessionManager.d.ts +0 -20
- package/esm/domain/session/sessionManager.js +0 -60
- package/esm/domain/session/sessionManager.js.map +0 -1
- package/esm/domain/session/sessionState.d.ts +0 -11
- package/esm/domain/session/sessionState.js +0 -38
- package/esm/domain/session/sessionState.js.map +0 -1
- package/esm/domain/session/sessionStore.d.ts +0 -34
- package/esm/domain/session/sessionStore.js +0 -139
- package/esm/domain/session/sessionStore.js.map +0 -1
- package/esm/domain/session/sessionStoreOperations.d.ts +0 -10
- package/esm/domain/session/sessionStoreOperations.js +0 -92
- package/esm/domain/session/sessionStoreOperations.js.map +0 -1
- package/esm/domain/session/storeStrategies/sessionInCookie.d.ts +0 -6
- package/esm/domain/session/storeStrategies/sessionInCookie.js +0 -53
- package/esm/domain/session/storeStrategies/sessionInCookie.js.map +0 -1
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.d.ts +0 -3
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js +0 -36
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js.map +0 -1
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.d.ts +0 -15
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.js +0 -2
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.js.map +0 -1
- package/esm/domain/synthetics/syntheticsWorkerValues.d.ts +0 -11
- package/esm/domain/synthetics/syntheticsWorkerValues.js +0 -16
- package/esm/domain/synthetics/syntheticsWorkerValues.js.map +0 -1
- package/esm/domain/telemetry/index.d.ts +0 -3
- package/esm/domain/telemetry/index.js +0 -4
- package/esm/domain/telemetry/index.js.map +0 -1
- package/esm/domain/telemetry/rawTelemetryEvent.types.d.ts +0 -15
- package/esm/domain/telemetry/rawTelemetryEvent.types.js +0 -5
- package/esm/domain/telemetry/rawTelemetryEvent.types.js.map +0 -1
- package/esm/domain/telemetry/telemetry.d.ts +0 -116
- package/esm/domain/telemetry/telemetry.js +0 -145
- package/esm/domain/telemetry/telemetry.js.map +0 -1
- package/esm/domain/telemetry/telemetryEvent.types.d.ts +0 -391
- package/esm/domain/telemetry/telemetryEvent.types.js +0 -6
- package/esm/domain/telemetry/telemetryEvent.types.js.map +0 -1
- package/esm/domain/user/index.d.ts +0 -2
- package/esm/domain/user/index.js +0 -3
- package/esm/domain/user/index.js.map +0 -1
- package/esm/domain/user/user.d.ts +0 -12
- package/esm/domain/user/user.js +0 -30
- package/esm/domain/user/user.js.map +0 -1
- package/esm/domain/user/user.types.d.ts +0 -6
- package/esm/domain/user/user.types.js +0 -2
- package/esm/domain/user/user.types.js.map +0 -1
- package/esm/index.d.ts +0 -67
- package/esm/index.js +0 -64
- package/esm/index.js.map +0 -1
- package/esm/tools/abstractLifeCycle.d.ts +0 -23
- package/esm/tools/abstractLifeCycle.js +0 -26
- package/esm/tools/abstractLifeCycle.js.map +0 -1
- package/esm/tools/boundedBuffer.d.ts +0 -5
- package/esm/tools/boundedBuffer.js +0 -19
- package/esm/tools/boundedBuffer.js.map +0 -1
- package/esm/tools/catchUserErrors.d.ts +0 -1
- package/esm/tools/catchUserErrors.js +0 -16
- package/esm/tools/catchUserErrors.js.map +0 -1
- package/esm/tools/display.d.ts +0 -35
- package/esm/tools/display.js +0 -38
- package/esm/tools/display.js.map +0 -1
- package/esm/tools/encoder.d.ts +0 -53
- package/esm/tools/encoder.js +0 -37
- package/esm/tools/encoder.js.map +0 -1
- package/esm/tools/experimentalFeatures.d.ts +0 -22
- package/esm/tools/experimentalFeatures.js +0 -38
- package/esm/tools/experimentalFeatures.js.map +0 -1
- package/esm/tools/getGlobalObject.d.ts +0 -4
- package/esm/tools/getGlobalObject.js +0 -33
- package/esm/tools/getGlobalObject.js.map +0 -1
- package/esm/tools/getZoneJsOriginalValue.d.ts +0 -19
- package/esm/tools/getZoneJsOriginalValue.js +0 -26
- package/esm/tools/getZoneJsOriginalValue.js.map +0 -1
- package/esm/tools/instrumentMethod.d.ts +0 -59
- package/esm/tools/instrumentMethod.js +0 -101
- package/esm/tools/instrumentMethod.js.map +0 -1
- package/esm/tools/matchOption.d.ts +0 -8
- package/esm/tools/matchOption.js +0 -33
- package/esm/tools/matchOption.js.map +0 -1
- package/esm/tools/mergeInto.d.ts +0 -25
- package/esm/tools/mergeInto.js +0 -99
- package/esm/tools/mergeInto.js.map +0 -1
- package/esm/tools/monitor.d.ts +0 -8
- package/esm/tools/monitor.js +0 -66
- package/esm/tools/monitor.js.map +0 -1
- package/esm/tools/observable.d.ts +0 -12
- package/esm/tools/observable.js +0 -39
- package/esm/tools/observable.js.map +0 -1
- package/esm/tools/readBytesFromStream.d.ts +0 -11
- package/esm/tools/readBytesFromStream.js +0 -60
- package/esm/tools/readBytesFromStream.js.map +0 -1
- package/esm/tools/sendToExtension.d.ts +0 -3
- package/esm/tools/sendToExtension.js +0 -7
- package/esm/tools/sendToExtension.js.map +0 -1
- package/esm/tools/serialisation/context.d.ts +0 -6
- package/esm/tools/serialisation/context.js +0 -2
- package/esm/tools/serialisation/context.js.map +0 -1
- package/esm/tools/serialisation/jsonStringify.d.ts +0 -13
- package/esm/tools/serialisation/jsonStringify.js +0 -44
- package/esm/tools/serialisation/jsonStringify.js.map +0 -1
- package/esm/tools/serialisation/sanitize.d.ts +0 -18
- package/esm/tools/serialisation/sanitize.js +0 -181
- package/esm/tools/serialisation/sanitize.js.map +0 -1
- package/esm/tools/timer.d.ts +0 -5
- package/esm/tools/timer.js +0 -16
- package/esm/tools/timer.js.map +0 -1
- package/esm/tools/utils/arrayUtils.d.ts +0 -1
- package/esm/tools/utils/arrayUtils.js +0 -7
- package/esm/tools/utils/arrayUtils.js.map +0 -1
- package/esm/tools/utils/browserDetection.d.ts +0 -10
- package/esm/tools/utils/browserDetection.js +0 -35
- package/esm/tools/utils/browserDetection.js.map +0 -1
- package/esm/tools/utils/byteUtils.d.ts +0 -4
- package/esm/tools/utils/byteUtils.js +0 -26
- package/esm/tools/utils/byteUtils.js.map +0 -1
- package/esm/tools/utils/functionUtils.d.ts +0 -9
- package/esm/tools/utils/functionUtils.js +0 -43
- package/esm/tools/utils/functionUtils.js.map +0 -1
- package/esm/tools/utils/numberUtils.d.ts +0 -8
- package/esm/tools/utils/numberUtils.js +0 -17
- package/esm/tools/utils/numberUtils.js.map +0 -1
- package/esm/tools/utils/objectUtils.d.ts +0 -10
- package/esm/tools/utils/objectUtils.js +0 -19
- package/esm/tools/utils/objectUtils.js.map +0 -1
- package/esm/tools/utils/polyfills.d.ts +0 -24
- package/esm/tools/utils/polyfills.js +0 -95
- package/esm/tools/utils/polyfills.js.map +0 -1
- package/esm/tools/utils/responseUtils.d.ts +0 -2
- package/esm/tools/utils/responseUtils.js +0 -13
- package/esm/tools/utils/responseUtils.js.map +0 -1
- package/esm/tools/utils/stringUtils.d.ts +0 -8
- package/esm/tools/utils/stringUtils.js +0 -52
- package/esm/tools/utils/stringUtils.js.map +0 -1
- package/esm/tools/utils/timeUtils.d.ts +0 -57
- package/esm/tools/utils/timeUtils.js +0 -82
- package/esm/tools/utils/timeUtils.js.map +0 -1
- package/esm/tools/utils/typeUtils.d.ts +0 -4
- package/esm/tools/utils/typeUtils.js +0 -13
- package/esm/tools/utils/typeUtils.js.map +0 -1
- package/esm/tools/utils/urlPolyfill.d.ts +0 -14
- package/esm/tools/utils/urlPolyfill.js +0 -80
- package/esm/tools/utils/urlPolyfill.js.map +0 -1
- package/esm/tools/valueHistory.d.ts +0 -50
- package/esm/tools/valueHistory.js +0 -103
- package/esm/tools/valueHistory.js.map +0 -1
- package/esm/transport/batch.d.ts +0 -21
- package/esm/transport/batch.js +0 -120
- package/esm/transport/batch.js.map +0 -1
- package/esm/transport/eventBridge.d.ts +0 -12
- package/esm/transport/eventBridge.js +0 -29
- package/esm/transport/eventBridge.js.map +0 -1
- package/esm/transport/flushController.d.ts +0 -58
- package/esm/transport/flushController.js +0 -108
- package/esm/transport/flushController.js.map +0 -1
- package/esm/transport/httpRequest.d.ts +0 -38
- package/esm/transport/httpRequest.js +0 -89
- package/esm/transport/httpRequest.js.map +0 -1
- package/esm/transport/index.d.ts +0 -4
- package/esm/transport/index.js +0 -5
- package/esm/transport/index.js.map +0 -1
- package/esm/transport/sendWithRetryStrategy.d.ts +0 -39
- package/esm/transport/sendWithRetryStrategy.js +0 -146
- package/esm/transport/sendWithRetryStrategy.js.map +0 -1
- package/esm/transport/startBatchWithReplica.d.ts +0 -20
- package/esm/transport/startBatchWithReplica.js +0 -38
- package/esm/transport/startBatchWithReplica.js.map +0 -1
- package/src/domain/configuration/intakeSites.ts +0 -5
- package/src/domain/configuration/tags.ts +0 -43
- package/src/domain/context/customerDataTracker.ts +0 -134
- package/src/domain/user/index.ts +0 -2
- package/src/domain/user/user.ts +0 -33
- package/src/domain/user/user.types.ts +0 -6
- package/src/transport/startBatchWithReplica.ts +0 -68
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timeUtils.js","sourceRoot":"","sources":["../../../src/tools/utils/timeUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAE/C,MAAM,CAAC,IAAM,UAAU,GAAG,IAAI,CAAA;AAC9B,MAAM,CAAC,IAAM,UAAU,GAAG,EAAE,GAAG,UAAU,CAAA;AACzC,MAAM,CAAC,IAAM,QAAQ,GAAG,EAAE,GAAG,UAAU,CAAA;AACvC,MAAM,CAAC,IAAM,OAAO,GAAG,EAAE,GAAG,QAAQ,CAAA;AACpC,MAAM,CAAC,IAAM,QAAQ,GAAG,GAAG,GAAG,OAAO,CAAA;AAQrC,MAAM,UAAU,gBAAgB,CAAC,QAAsB;IACrD,OAAO,EAAE,QAAQ,UAAA,EAAE,SAAS,EAAE,qBAAqB,CAAC,QAAQ,CAAC,EAAE,CAAA;AACjE,CAAC;AAED,SAAS,qBAAqB,CAAC,YAA0B;IACvD,IAAM,eAAe,GAAG,CAAC,OAAO,EAAE,GAAG,WAAW,CAAC,GAAG,EAAE,CAAc,CAAA;IACpE,2CAA2C;IAC3C,IAAI,eAAe,GAAG,kBAAkB,EAAE,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,eAAe,EAAE,YAAY,CAAC,CAAc,CAAA;IAC5E,CAAC;IACD,OAAO,YAAY,CAAC,YAAY,CAAC,CAAA;AACnC,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,GAAG,WAAW,CAAC,kBAAkB,EAAE,EAAE,WA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B,EAAE,EAAE,YAAY,CAAC,CAAc,CAAA;AACjF,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAA8B;IAClE,OAAO,IAAI,GAAG,QAAQ,CAAA;AACxB,CAAC;AAED;;GAEG;AACH,IAAI,eAAsC,CAAA;AAE1C,SAAS,kBAAkB;IACzB,IAAI,eAAe,KAAK,SAAS,EAAE,CAAC;QAClC,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,eAA4B,CAAA;IACnE,CAAC;IACD,OAAO,eAAe,CAAA;AACxB,CAAC;AAED,MAAM,UAAU,oBAAoB;IAClC,eAAe,GAAG,SAAS,CAAA;AAC7B,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Similar to `typeof`, but distinguish plain objects from `null` and arrays
|
|
3
|
-
*/
|
|
4
|
-
export function getType(value) {
|
|
5
|
-
if (value === null) {
|
|
6
|
-
return 'null';
|
|
7
|
-
}
|
|
8
|
-
if (Array.isArray(value)) {
|
|
9
|
-
return 'array';
|
|
10
|
-
}
|
|
11
|
-
return typeof value;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=typeUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"typeUtils.js","sourceRoot":"","sources":["../../../src/tools/utils/typeUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,UAAU,OAAO,CAAC,KAAc;IACpC,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,OAAO,MAAM,CAAA;IACf,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,OAAO,CAAA;IAChB,CAAC;IACD,OAAO,OAAO,KAAK,CAAA;AACrB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare function normalizeUrl(url: string): string;
|
|
2
|
-
export declare function isValidUrl(url: string): boolean;
|
|
3
|
-
export declare function getOrigin(url: string): string;
|
|
4
|
-
export declare function getPathName(url: string): string;
|
|
5
|
-
export declare function getSearch(url: string): string;
|
|
6
|
-
export declare function getHash(url: string): string;
|
|
7
|
-
export declare function buildUrl(url: string, base?: string): URL | HTMLAnchorElement;
|
|
8
|
-
export declare function getLocationOrigin(): string;
|
|
9
|
-
/**
|
|
10
|
-
* Fallback
|
|
11
|
-
* On IE HTMLAnchorElement origin is not supported: https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/origin
|
|
12
|
-
* On Firefox window.location.origin is "null" for file: URIs: https://bugzilla.mozilla.org/show_bug.cgi?id=878297
|
|
13
|
-
*/
|
|
14
|
-
export declare function getLinkElementOrigin(element: Location | HTMLAnchorElement | URL): string;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { jsonStringify } from '../serialisation/jsonStringify';
|
|
2
|
-
export function normalizeUrl(url) {
|
|
3
|
-
return buildUrl(url, getLocationOrigin()).href;
|
|
4
|
-
}
|
|
5
|
-
export function isValidUrl(url) {
|
|
6
|
-
try {
|
|
7
|
-
return !!buildUrl(url);
|
|
8
|
-
}
|
|
9
|
-
catch (_a) {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export function getOrigin(url) {
|
|
14
|
-
return getLinkElementOrigin(buildUrl(url));
|
|
15
|
-
}
|
|
16
|
-
export function getPathName(url) {
|
|
17
|
-
var pathname = buildUrl(url).pathname;
|
|
18
|
-
return pathname[0] === '/' ? pathname : "/".concat(pathname);
|
|
19
|
-
}
|
|
20
|
-
export function getSearch(url) {
|
|
21
|
-
return buildUrl(url).search;
|
|
22
|
-
}
|
|
23
|
-
export function getHash(url) {
|
|
24
|
-
return buildUrl(url).hash;
|
|
25
|
-
}
|
|
26
|
-
export function buildUrl(url, base) {
|
|
27
|
-
var supportedURL = getSupportedUrl();
|
|
28
|
-
if (supportedURL) {
|
|
29
|
-
try {
|
|
30
|
-
return base !== undefined ? new supportedURL(url, base) : new supportedURL(url);
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
throw new Error("Failed to construct URL: ".concat(String(error), " ").concat(jsonStringify({ url: url, base: base })));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
if (base === undefined && !/:/.test(url)) {
|
|
37
|
-
throw new Error("Invalid URL: '".concat(url, "'"));
|
|
38
|
-
}
|
|
39
|
-
var doc = document;
|
|
40
|
-
var anchorElement = doc.createElement('a');
|
|
41
|
-
if (base !== undefined) {
|
|
42
|
-
doc = document.implementation.createHTMLDocument('');
|
|
43
|
-
var baseElement = doc.createElement('base');
|
|
44
|
-
baseElement.href = base;
|
|
45
|
-
doc.head.appendChild(baseElement);
|
|
46
|
-
doc.body.appendChild(anchorElement);
|
|
47
|
-
}
|
|
48
|
-
anchorElement.href = url;
|
|
49
|
-
return anchorElement;
|
|
50
|
-
}
|
|
51
|
-
var originalURL = URL;
|
|
52
|
-
var isURLSupported;
|
|
53
|
-
function getSupportedUrl() {
|
|
54
|
-
if (isURLSupported === undefined) {
|
|
55
|
-
try {
|
|
56
|
-
var url = new originalURL('http://test/path');
|
|
57
|
-
isURLSupported = url.href === 'http://test/path';
|
|
58
|
-
}
|
|
59
|
-
catch (_a) {
|
|
60
|
-
isURLSupported = false;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return isURLSupported ? originalURL : undefined;
|
|
64
|
-
}
|
|
65
|
-
export function getLocationOrigin() {
|
|
66
|
-
return getLinkElementOrigin(window.location);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Fallback
|
|
70
|
-
* On IE HTMLAnchorElement origin is not supported: https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/origin
|
|
71
|
-
* On Firefox window.location.origin is "null" for file: URIs: https://bugzilla.mozilla.org/show_bug.cgi?id=878297
|
|
72
|
-
*/
|
|
73
|
-
export function getLinkElementOrigin(element) {
|
|
74
|
-
if (element.origin && element.origin !== 'null') {
|
|
75
|
-
return element.origin;
|
|
76
|
-
}
|
|
77
|
-
var sanitizedHost = element.host.replace(/(:80|:443)$/, '');
|
|
78
|
-
return "".concat(element.protocol, "//").concat(sanitizedHost);
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=urlPolyfill.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"urlPolyfill.js","sourceRoot":"","sources":["../../../src/tools/utils/urlPolyfill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAE9D,MAAM,UAAU,YAAY,CAAC,GAAW;IACtC,OAAO,QAAQ,CAAC,GAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC,IAAI,CAAA;AAChD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW;IACpC,IAAI,CAAC;QACH,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAA;IACxB,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,oBAAoB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAA;AAC5C,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,GAAW;IACrC,IAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAA;IACvC,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAI,QAAQ,CAAE,CAAA;AACxD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,MAAM,CAAA;AAC7B,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,GAAW;IACjC,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAA;AAC3B,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,GAAW,E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,eAAe;IACtB,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,IAAI,CAAC;YACH,IAAM,GAAG,GAAG,IAAI,WAAW,CAAC,kBAAkB,CAAC,CAAA;YAC/C,cAAc,GAAG,GAAG,CAAC,IAAI,KAAK,kBAAkB,CAAA;QAClD,CAAC;QAAC,WAAM,CAAC;YACP,cAAc,GAAG,KAAK,CAAA;QACxB,CAAC;IACH,CAAC;IACD,OAAO,cAAc,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAA;AACjD,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC/B,OAAO,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;AAC9C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAA2C;IAC9E,IAAI,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;QAChD,OAAO,OAAO,CAAC,MAAM,CAAA;IACvB,CAAC;IACD,IAAM,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAA;IAC7D,OAAO,UAAG,OAAO,CAAC,QAAQ,eAAK,aAAa,CAAE,CAAA;AAChD,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { Duration, RelativeTime } from './utils/timeUtils';
|
|
2
|
-
export interface ValueHistoryEntry<T> {
|
|
3
|
-
startTime: RelativeTime;
|
|
4
|
-
endTime: RelativeTime;
|
|
5
|
-
value: T;
|
|
6
|
-
remove(): void;
|
|
7
|
-
close(endTime: RelativeTime): void;
|
|
8
|
-
}
|
|
9
|
-
export declare const CLEAR_OLD_VALUES_INTERVAL: number;
|
|
10
|
-
/**
|
|
11
|
-
* Store and keep track of values spans. This whole class assumes that values are added in
|
|
12
|
-
* chronological order (i.e. all entries have an increasing start time).
|
|
13
|
-
*/
|
|
14
|
-
export declare class ValueHistory<Value> {
|
|
15
|
-
private expireDelay;
|
|
16
|
-
private maxEntries?;
|
|
17
|
-
private entries;
|
|
18
|
-
private clearOldValuesInterval;
|
|
19
|
-
constructor(expireDelay: number, maxEntries?: number | undefined);
|
|
20
|
-
/**
|
|
21
|
-
* Add a value to the history associated with a start time. Returns a reference to this newly
|
|
22
|
-
* added entry that can be removed or closed.
|
|
23
|
-
*/
|
|
24
|
-
add(value: Value, startTime: RelativeTime): ValueHistoryEntry<Value>;
|
|
25
|
-
/**
|
|
26
|
-
* Return the latest value that was active during `startTime`, or the currently active value
|
|
27
|
-
* if no `startTime` is provided. This method assumes that entries are not overlapping.
|
|
28
|
-
*/
|
|
29
|
-
find(startTime?: RelativeTime): Value | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* Helper function to close the currently active value, if any. This method assumes that entries
|
|
32
|
-
* are not overlapping.
|
|
33
|
-
*/
|
|
34
|
-
closeActive(endTime: RelativeTime): void;
|
|
35
|
-
/**
|
|
36
|
-
* Return all values with an active period overlapping with the duration,
|
|
37
|
-
* or all values that were active during `startTime` if no duration is provided,
|
|
38
|
-
* or all currently active values if no `startTime` is provided.
|
|
39
|
-
*/
|
|
40
|
-
findAll(startTime?: RelativeTime, duration?: Duration): Value[];
|
|
41
|
-
/**
|
|
42
|
-
* Remove all entries from this collection.
|
|
43
|
-
*/
|
|
44
|
-
reset(): void;
|
|
45
|
-
/**
|
|
46
|
-
* Stop internal garbage collection of past entries.
|
|
47
|
-
*/
|
|
48
|
-
stop(): void;
|
|
49
|
-
private clearOldValues;
|
|
50
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { setInterval, clearInterval } from './timer';
|
|
2
|
-
import { addDuration, relativeNow, ONE_MINUTE } from './utils/timeUtils';
|
|
3
|
-
var END_OF_TIMES = Infinity;
|
|
4
|
-
export var CLEAR_OLD_VALUES_INTERVAL = ONE_MINUTE;
|
|
5
|
-
/**
|
|
6
|
-
* Store and keep track of values spans. This whole class assumes that values are added in
|
|
7
|
-
* chronological order (i.e. all entries have an increasing start time).
|
|
8
|
-
*/
|
|
9
|
-
var ValueHistory = /** @class */ (function () {
|
|
10
|
-
function ValueHistory(expireDelay, maxEntries) {
|
|
11
|
-
var _this = this;
|
|
12
|
-
this.expireDelay = expireDelay;
|
|
13
|
-
this.maxEntries = maxEntries;
|
|
14
|
-
this.entries = [];
|
|
15
|
-
this.clearOldValuesInterval = setInterval(function () { return _this.clearOldValues(); }, CLEAR_OLD_VALUES_INTERVAL);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Add a value to the history associated with a start time. Returns a reference to this newly
|
|
19
|
-
* added entry that can be removed or closed.
|
|
20
|
-
*/
|
|
21
|
-
ValueHistory.prototype.add = function (value, startTime) {
|
|
22
|
-
var _this = this;
|
|
23
|
-
var entry = {
|
|
24
|
-
value: value,
|
|
25
|
-
startTime: startTime,
|
|
26
|
-
endTime: END_OF_TIMES,
|
|
27
|
-
remove: function () {
|
|
28
|
-
var index = _this.entries.indexOf(entry);
|
|
29
|
-
if (index >= 0) {
|
|
30
|
-
_this.entries.splice(index, 1);
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
close: function (endTime) {
|
|
34
|
-
entry.endTime = endTime;
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
if (this.maxEntries && this.entries.length >= this.maxEntries) {
|
|
38
|
-
this.entries.pop();
|
|
39
|
-
}
|
|
40
|
-
this.entries.unshift(entry);
|
|
41
|
-
return entry;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Return the latest value that was active during `startTime`, or the currently active value
|
|
45
|
-
* if no `startTime` is provided. This method assumes that entries are not overlapping.
|
|
46
|
-
*/
|
|
47
|
-
ValueHistory.prototype.find = function (startTime) {
|
|
48
|
-
if (startTime === void 0) { startTime = END_OF_TIMES; }
|
|
49
|
-
for (var _i = 0, _a = this.entries; _i < _a.length; _i++) {
|
|
50
|
-
var entry = _a[_i];
|
|
51
|
-
if (entry.startTime <= startTime) {
|
|
52
|
-
if (startTime <= entry.endTime) {
|
|
53
|
-
return entry.value;
|
|
54
|
-
}
|
|
55
|
-
break;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
/**
|
|
60
|
-
* Helper function to close the currently active value, if any. This method assumes that entries
|
|
61
|
-
* are not overlapping.
|
|
62
|
-
*/
|
|
63
|
-
ValueHistory.prototype.closeActive = function (endTime) {
|
|
64
|
-
var latestEntry = this.entries[0];
|
|
65
|
-
if (latestEntry && latestEntry.endTime === END_OF_TIMES) {
|
|
66
|
-
latestEntry.close(endTime);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* Return all values with an active period overlapping with the duration,
|
|
71
|
-
* or all values that were active during `startTime` if no duration is provided,
|
|
72
|
-
* or all currently active values if no `startTime` is provided.
|
|
73
|
-
*/
|
|
74
|
-
ValueHistory.prototype.findAll = function (startTime, duration) {
|
|
75
|
-
if (startTime === void 0) { startTime = END_OF_TIMES; }
|
|
76
|
-
if (duration === void 0) { duration = 0; }
|
|
77
|
-
var endTime = addDuration(startTime, duration);
|
|
78
|
-
return this.entries
|
|
79
|
-
.filter(function (entry) { return entry.startTime <= endTime && startTime <= entry.endTime; })
|
|
80
|
-
.map(function (entry) { return entry.value; });
|
|
81
|
-
};
|
|
82
|
-
/**
|
|
83
|
-
* Remove all entries from this collection.
|
|
84
|
-
*/
|
|
85
|
-
ValueHistory.prototype.reset = function () {
|
|
86
|
-
this.entries = [];
|
|
87
|
-
};
|
|
88
|
-
/**
|
|
89
|
-
* Stop internal garbage collection of past entries.
|
|
90
|
-
*/
|
|
91
|
-
ValueHistory.prototype.stop = function () {
|
|
92
|
-
clearInterval(this.clearOldValuesInterval);
|
|
93
|
-
};
|
|
94
|
-
ValueHistory.prototype.clearOldValues = function () {
|
|
95
|
-
var oldTimeThreshold = relativeNow() - this.expireDelay;
|
|
96
|
-
while (this.entries.length > 0 && this.entries[this.entries.length - 1].endTime < oldTimeThreshold) {
|
|
97
|
-
this.entries.pop();
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
return ValueHistory;
|
|
101
|
-
}());
|
|
102
|
-
export { ValueHistory };
|
|
103
|
-
//# sourceMappingURL=valueHistory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"valueHistory.js","sourceRoot":"","sources":["../../src/tools/valueHistory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAGpD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAExE,IAAM,YAAY,GAAG,QAAwB,CAAA;AAU7C,MAAM,CAAC,IAAM,yBAAyB,GAAG,UAAU,CAAA;AAEnD;;;GAGG;AACH;IAIE,sBACU,WAAmB,EACnB,UAAmB;QAF7B,iBAKC;QAJS,gBAAW,GAAX,WAAW,CAAQ;QACnB,eAAU,GAAV,UAAU,CAAS;QALrB,YAAO,GAAoC,EAAE,CAAA;QAOnD,IAAI,CAAC,sBAAsB,GAAG,WAAW,CAAC,cAAM,OAAA,KAAI,CAAC,cAAc,EAAE,EAArB,CAAqB,EAAE,yBAAyB,CAAC,CAAA;IACnG,CAAC;IAED;;;OAGG;IACH,0BAAG,GAAH,UAAI,KAAY,EAAE,SAAuB;QAAzC,iBAuBC;QAtBC,IAAM,KAAK,GAA6B;YACtC,KAAK,OAAA;YACL,SAAS,WAAA;YACT,OAAO,EAAE,YAAY;YACrB,MAAM,EAAE;gBACN,IAAM,KAAK,GAAG,KAAI,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;gBACzC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;oBACf,KAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;gBAC/B,CAAC;YACH,CAAC;YACD,KAAK,EAAE,UAAC,OAAqB;gBAC3B,KAAK,CAAC,OA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AO,IAAI,SAAS,IAAI,KAAK,CAAC,OAAO,EAAxD,CAAwD,CAAC;aAC3E,GAAG,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,EAAX,CAAW,CAAC,CAAA;IAChC,CAAC;IAED;;OAEG;IACH,4BAAK,GAAL;QACE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAA;IACnB,CAAC;IAED;;OAEG;IACH,2BAAI,GAAJ;QACE,aAAa,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAA;IAC5C,CAAC;IAEO,qCAAc,GAAtB;QACE,IAAM,gBAAgB,GAAG,WAAW,EAAE,GAAG,IAAI,CAAC,WAAW,CAAA;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,OAAO,GAAG,gBAAgB,EAAE,CAAC;YACnG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAA;QACpB,CAAC;IACH,CAAC;IACH,mBAAC;AAAD,CAAC,AAlGD,IAkGC"}
|
package/esm/transport/batch.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Context } from '../tools/serialisation/context';
|
|
2
|
-
import type { Encoder } from '../tools/encoder';
|
|
3
|
-
import type { HttpRequest } from './httpRequest';
|
|
4
|
-
import type { FlushController } from './flushController';
|
|
5
|
-
export declare class Batch {
|
|
6
|
-
private encoder;
|
|
7
|
-
private request;
|
|
8
|
-
flushController: FlushController;
|
|
9
|
-
private messageBytesLimit;
|
|
10
|
-
private upsertBuffer;
|
|
11
|
-
private flushSubscription;
|
|
12
|
-
constructor(encoder: Encoder, request: HttpRequest, flushController: FlushController, messageBytesLimit: number);
|
|
13
|
-
add(message: Context): void;
|
|
14
|
-
upsert(message: Context, key: string): void;
|
|
15
|
-
stop(): void;
|
|
16
|
-
private flush;
|
|
17
|
-
private addOrUpdate;
|
|
18
|
-
private push;
|
|
19
|
-
private remove;
|
|
20
|
-
private hasMessageFor;
|
|
21
|
-
}
|
package/esm/transport/batch.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { display } from '../tools/display';
|
|
2
|
-
import { objectValues } from '../tools/utils/polyfills';
|
|
3
|
-
import { isPageExitReason } from '../browser/pageExitObservable';
|
|
4
|
-
import { jsonStringify } from '../tools/serialisation/jsonStringify';
|
|
5
|
-
import { computeBytesCount } from '../tools/utils/byteUtils';
|
|
6
|
-
var Batch = /** @class */ (function () {
|
|
7
|
-
function Batch(encoder, request, flushController, messageBytesLimit) {
|
|
8
|
-
var _this = this;
|
|
9
|
-
this.encoder = encoder;
|
|
10
|
-
this.request = request;
|
|
11
|
-
this.flushController = flushController;
|
|
12
|
-
this.messageBytesLimit = messageBytesLimit;
|
|
13
|
-
this.upsertBuffer = {};
|
|
14
|
-
this.flushSubscription = this.flushController.flushObservable.subscribe(function (event) { return _this.flush(event); });
|
|
15
|
-
}
|
|
16
|
-
Batch.prototype.add = function (message) {
|
|
17
|
-
this.addOrUpdate(message);
|
|
18
|
-
};
|
|
19
|
-
Batch.prototype.upsert = function (message, key) {
|
|
20
|
-
this.addOrUpdate(message, key);
|
|
21
|
-
};
|
|
22
|
-
Batch.prototype.stop = function () {
|
|
23
|
-
this.flushSubscription.unsubscribe();
|
|
24
|
-
};
|
|
25
|
-
Batch.prototype.flush = function (event) {
|
|
26
|
-
var upsertMessages = objectValues(this.upsertBuffer).join('\n');
|
|
27
|
-
this.upsertBuffer = {};
|
|
28
|
-
var isPageExit = isPageExitReason(event.reason);
|
|
29
|
-
var send = isPageExit ? this.request.sendOnExit : this.request.send;
|
|
30
|
-
if (isPageExit &&
|
|
31
|
-
// Note: checking that the encoder is async is not strictly needed, but it's an optimization:
|
|
32
|
-
// if the encoder is async we need to send two requests in some cases (one for encoded data
|
|
33
|
-
// and the other for non-encoded data). But if it's not async, we don't have to worry about
|
|
34
|
-
// it and always send a single request.
|
|
35
|
-
this.encoder.isAsync) {
|
|
36
|
-
var encoderResult = this.encoder.finishSync();
|
|
37
|
-
// Send encoded messages
|
|
38
|
-
if (encoderResult.outputBytesCount) {
|
|
39
|
-
send(formatPayloadFromEncoder(encoderResult, event));
|
|
40
|
-
}
|
|
41
|
-
// Send messages that are not yet encoded at this point
|
|
42
|
-
var pendingMessages = [encoderResult.pendingData, upsertMessages].filter(Boolean).join('\n');
|
|
43
|
-
if (pendingMessages) {
|
|
44
|
-
send({
|
|
45
|
-
data: pendingMessages,
|
|
46
|
-
bytesCount: computeBytesCount(pendingMessages),
|
|
47
|
-
flushReason: event.reason,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
if (upsertMessages) {
|
|
53
|
-
this.encoder.write(this.encoder.isEmpty ? upsertMessages : "\n".concat(upsertMessages));
|
|
54
|
-
}
|
|
55
|
-
this.encoder.finish(function (encoderResult) {
|
|
56
|
-
send(formatPayloadFromEncoder(encoderResult, event));
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
Batch.prototype.addOrUpdate = function (message, key) {
|
|
61
|
-
var serializedMessage = jsonStringify(message);
|
|
62
|
-
var estimatedMessageBytesCount = this.encoder.estimateEncodedBytesCount(serializedMessage);
|
|
63
|
-
if (estimatedMessageBytesCount >= this.messageBytesLimit) {
|
|
64
|
-
display.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit, "KB."));
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
if (this.hasMessageFor(key)) {
|
|
68
|
-
this.remove(key);
|
|
69
|
-
}
|
|
70
|
-
this.push(serializedMessage, estimatedMessageBytesCount, key);
|
|
71
|
-
};
|
|
72
|
-
Batch.prototype.push = function (serializedMessage, estimatedMessageBytesCount, key) {
|
|
73
|
-
var _this = this;
|
|
74
|
-
this.flushController.notifyBeforeAddMessage(estimatedMessageBytesCount);
|
|
75
|
-
if (key !== undefined) {
|
|
76
|
-
this.upsertBuffer[key] = serializedMessage;
|
|
77
|
-
this.flushController.notifyAfterAddMessage();
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
this.encoder.write(this.encoder.isEmpty ? serializedMessage : "\n".concat(serializedMessage), function (realMessageBytesCount) {
|
|
81
|
-
_this.flushController.notifyAfterAddMessage(realMessageBytesCount - estimatedMessageBytesCount);
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
Batch.prototype.remove = function (key) {
|
|
86
|
-
var removedMessage = this.upsertBuffer[key];
|
|
87
|
-
delete this.upsertBuffer[key];
|
|
88
|
-
var messageBytesCount = this.encoder.estimateEncodedBytesCount(removedMessage);
|
|
89
|
-
this.flushController.notifyAfterRemoveMessage(messageBytesCount);
|
|
90
|
-
};
|
|
91
|
-
Batch.prototype.hasMessageFor = function (key) {
|
|
92
|
-
return key !== undefined && this.upsertBuffer[key] !== undefined;
|
|
93
|
-
};
|
|
94
|
-
return Batch;
|
|
95
|
-
}());
|
|
96
|
-
export { Batch };
|
|
97
|
-
function formatPayloadFromEncoder(encoderResult, flushEvent) {
|
|
98
|
-
var data;
|
|
99
|
-
if (typeof encoderResult.output === 'string') {
|
|
100
|
-
data = encoderResult.output;
|
|
101
|
-
}
|
|
102
|
-
else {
|
|
103
|
-
data = new Blob([encoderResult.output], {
|
|
104
|
-
// This will set the 'Content-Type: text/plain' header. Reasoning:
|
|
105
|
-
// * The intake rejects the request if there is no content type.
|
|
106
|
-
// * The browser will issue CORS preflight requests if we set it to 'application/json', which
|
|
107
|
-
// could induce higher intake load (and maybe has other impacts).
|
|
108
|
-
// * Also it's not quite JSON, since we are concatenating multiple JSON objects separated by
|
|
109
|
-
// new lines.
|
|
110
|
-
type: 'text/plain',
|
|
111
|
-
});
|
|
112
|
-
}
|
|
113
|
-
return {
|
|
114
|
-
data: data,
|
|
115
|
-
bytesCount: encoderResult.outputBytesCount,
|
|
116
|
-
encoding: encoderResult.encoding,
|
|
117
|
-
flushReason: flushEvent.reason,
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
//# sourceMappingURL=batch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/transport/batch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AAGpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAI5D;IAIE,eACU,OAAgB,EAChB,OAAoB,EACrB,eAAgC,EAC/B,iBAAyB;QAJnC,iBAOC;QANS,YAAO,GAAP,OAAO,CAAS;QAChB,YAAO,GAAP,OAAO,CAAa;QACrB,oBAAe,GAAf,eAAe,CAAiB;QAC/B,sBAAiB,GAAjB,iBAAiB,CAAQ;QAP3B,iBAAY,GAA8B,EAAE,CAAA;QASlD,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,eAAe,CAAC,eAAe,CAAC,SAAS,CAAC,UAAC,KAAK,IAAK,OAAA,KAAI,CAAC,KAAK,CAAC,KAAK,CAAC,EAAjB,CAAiB,CAAC,CAAA;IACvG,CAAC;IAED,mBAAG,GAAH,UAAI,OAAgB;QAClB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;IAC3B,CAAC;IAED,sBAAM,GAAN,UAAO,OAAgB,EAAE,GAAW;QAClC,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,GAAG,CAAC,CAAA;IAChC,CAAC;IAED,oBAAI,GAAJ;QACE,IAAI,CAAC,iBAAiB,CAAC,WAAW,EAAE,CAAA;IACtC,CAAC;IAEO,qBAAK,GAAb,UAAc,KAAiB;QAC7B,IAAM,cAAc,GAAG,YA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|
|
3
|
-
}
|
|
4
|
-
export interface DatadogEventBridge {
|
|
5
|
-
getAllowedWebViewHosts(): string;
|
|
6
|
-
send(msg: string): void;
|
|
7
|
-
}
|
|
8
|
-
export declare function getEventBridge<T, E>(): {
|
|
9
|
-
getAllowedWebViewHosts(): string[];
|
|
10
|
-
send(eventType: T, event: E): void;
|
|
11
|
-
} | undefined;
|
|
12
|
-
export declare function canUseEventBridge(currentHost?: string): boolean;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { endsWith } from '../tools/utils/polyfills';
|
|
2
|
-
import { getGlobalObject } from '../tools/getGlobalObject';
|
|
3
|
-
export function getEventBridge() {
|
|
4
|
-
var eventBridgeGlobal = getEventBridgeGlobal();
|
|
5
|
-
if (!eventBridgeGlobal) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
return {
|
|
9
|
-
getAllowedWebViewHosts: function () {
|
|
10
|
-
return JSON.parse(eventBridgeGlobal.getAllowedWebViewHosts());
|
|
11
|
-
},
|
|
12
|
-
send: function (eventType, event) {
|
|
13
|
-
eventBridgeGlobal.send(JSON.stringify({ eventType: eventType, event: event }));
|
|
14
|
-
},
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export function canUseEventBridge(currentHost) {
|
|
18
|
-
var _a;
|
|
19
|
-
if (currentHost === void 0) { currentHost = (_a = getGlobalObject().location) === null || _a === void 0 ? void 0 : _a.hostname; }
|
|
20
|
-
var bridge = getEventBridge();
|
|
21
|
-
return (!!bridge &&
|
|
22
|
-
bridge
|
|
23
|
-
.getAllowedWebViewHosts()
|
|
24
|
-
.some(function (allowedHost) { return currentHost === allowedHost || endsWith(currentHost, ".".concat(allowedHost)); }));
|
|
25
|
-
}
|
|
26
|
-
function getEventBridgeGlobal() {
|
|
27
|
-
return getGlobalObject().DatadogEventBridge;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=eventBridge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventBridge.js","sourceRoot":"","sources":["../../src/transport/eventBridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAW1D,MAAM,UAAU,cAAc;IAC5B,IAAM,iBAAiB,GAAG,oBAAoB,EAAE,CAAA;IAEhD,IAAI,CAAC,iBAAiB,EAAE,CAAC;QACvB,OAAM;IACR,CAAC;IAED,OAAO;QACL,sBAAsB;YACpB,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,CAAa,CAAA;QAC3E,CAAC;QACD,IAAI,YAAC,SAAY,EAAE,KAAQ;YACzB,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,SAAS,WAAA,EAAE,KAAK,OAAA,EAAE,CAAC,CAAC,CAAA;QAC9D,CAAC;KACF,CAAA;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,WAA0D;;IAA1D,4BAAA,EAAA,oBAAc,eAAe,EAAU,CAAC,QAAQ,0CAAE,QAAQ;IAC1F,IAAM,MAAM,GAAG,cAAc,EAAE,CAAA;IAC/B,OAAO,CACL,CAAC,CAAC,MAAM;QACR,MAAM;aACH,sBAAsB,EAAE;aACxB,IAAI,CAAC,UAAC,WAAW,IAAK,OAAA,WAAW,KAAK,WAAW,IAAI,QAAQ,CAAC,WAAW,EAAE,WAAI,WAAW,CAAE,CAAC,EAAvE,CAAuE,CAAC,CAClG,CAAA;AACH,CAAC;AAED,SAAS,oBAAoB;IAC3B,OAAO,eAAe,EAAgC,CAAC,kBAAkB,CAAA;AAC3E,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import type { PageExitEvent, PageExitReason } from '../browser/pageExitObservable';
|
|
2
|
-
import { Observable } from '../tools/observable';
|
|
3
|
-
import type { Duration } from '../tools/utils/timeUtils';
|
|
4
|
-
export type FlushReason = PageExitReason | 'duration_limit' | 'bytes_limit' | 'messages_limit' | 'session_expire';
|
|
5
|
-
export type FlushController = ReturnType<typeof createFlushController>;
|
|
6
|
-
export interface FlushEvent {
|
|
7
|
-
reason: FlushReason;
|
|
8
|
-
bytesCount: number;
|
|
9
|
-
messagesCount: number;
|
|
10
|
-
}
|
|
11
|
-
interface FlushControllerOptions {
|
|
12
|
-
messagesLimit: number;
|
|
13
|
-
bytesLimit: number;
|
|
14
|
-
durationLimit: Duration;
|
|
15
|
-
pageExitObservable: Observable<PageExitEvent>;
|
|
16
|
-
sessionExpireObservable: Observable<void>;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Returns a "flush controller", responsible of notifying when flushing a pool of pending data needs
|
|
20
|
-
* to happen. The implementation is designed to support both synchronous and asynchronous usages,
|
|
21
|
-
* but relies on invariants described in each method documentation to keep a coherent state.
|
|
22
|
-
*/
|
|
23
|
-
export declare function createFlushController({ messagesLimit, bytesLimit, durationLimit, pageExitObservable, sessionExpireObservable, }: FlushControllerOptions): {
|
|
24
|
-
flushObservable: Observable<FlushEvent>;
|
|
25
|
-
readonly messagesCount: number;
|
|
26
|
-
/**
|
|
27
|
-
* Notifies that a message will be added to a pool of pending messages waiting to be flushed.
|
|
28
|
-
*
|
|
29
|
-
* This function needs to be called synchronously, right before adding the message, so no flush
|
|
30
|
-
* event can happen after `notifyBeforeAddMessage` and before adding the message.
|
|
31
|
-
*
|
|
32
|
-
* @param estimatedMessageBytesCount: an estimation of the message bytes count once it is
|
|
33
|
-
* actually added.
|
|
34
|
-
*/
|
|
35
|
-
notifyBeforeAddMessage(estimatedMessageBytesCount: number): void;
|
|
36
|
-
/**
|
|
37
|
-
* Notifies that a message *was* added to a pool of pending messages waiting to be flushed.
|
|
38
|
-
*
|
|
39
|
-
* This function can be called asynchronously after the message was added, but in this case it
|
|
40
|
-
* should not be called if a flush event occurred in between.
|
|
41
|
-
*
|
|
42
|
-
* @param messageBytesCountDiff: the difference between the estimated message bytes count and
|
|
43
|
-
* its actual bytes count once added to the pool.
|
|
44
|
-
*/
|
|
45
|
-
notifyAfterAddMessage(messageBytesCountDiff?: number): void;
|
|
46
|
-
/**
|
|
47
|
-
* Notifies that a message was removed from a pool of pending messages waiting to be flushed.
|
|
48
|
-
*
|
|
49
|
-
* This function needs to be called synchronously, right after removing the message, so no flush
|
|
50
|
-
* event can happen after removing the message and before `notifyAfterRemoveMessage`.
|
|
51
|
-
*
|
|
52
|
-
* @param messageBytesCount: the message bytes count that was added to the pool. Should
|
|
53
|
-
* correspond to the sum of bytes counts passed to `notifyBeforeAddMessage` and
|
|
54
|
-
* `notifyAfterAddMessage`.
|
|
55
|
-
*/
|
|
56
|
-
notifyAfterRemoveMessage(messageBytesCount: number): void;
|
|
57
|
-
};
|
|
58
|
-
export {};
|