@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
package/cjs/transport/batch.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Batch = void 0;
|
|
4
|
-
var display_1 = require("../tools/display");
|
|
5
|
-
var polyfills_1 = require("../tools/utils/polyfills");
|
|
6
|
-
var pageExitObservable_1 = require("../browser/pageExitObservable");
|
|
7
|
-
var jsonStringify_1 = require("../tools/serialisation/jsonStringify");
|
|
8
|
-
var byteUtils_1 = require("../tools/utils/byteUtils");
|
|
9
|
-
var Batch = /** @class */ (function () {
|
|
10
|
-
function Batch(encoder, request, flushController, messageBytesLimit) {
|
|
11
|
-
var _this = this;
|
|
12
|
-
this.encoder = encoder;
|
|
13
|
-
this.request = request;
|
|
14
|
-
this.flushController = flushController;
|
|
15
|
-
this.messageBytesLimit = messageBytesLimit;
|
|
16
|
-
this.upsertBuffer = {};
|
|
17
|
-
this.flushSubscription = this.flushController.flushObservable.subscribe(function (event) { return _this.flush(event); });
|
|
18
|
-
}
|
|
19
|
-
Batch.prototype.add = function (message) {
|
|
20
|
-
this.addOrUpdate(message);
|
|
21
|
-
};
|
|
22
|
-
Batch.prototype.upsert = function (message, key) {
|
|
23
|
-
this.addOrUpdate(message, key);
|
|
24
|
-
};
|
|
25
|
-
Batch.prototype.stop = function () {
|
|
26
|
-
this.flushSubscription.unsubscribe();
|
|
27
|
-
};
|
|
28
|
-
Batch.prototype.flush = function (event) {
|
|
29
|
-
var upsertMessages = (0, polyfills_1.objectValues)(this.upsertBuffer).join('\n');
|
|
30
|
-
this.upsertBuffer = {};
|
|
31
|
-
var isPageExit = (0, pageExitObservable_1.isPageExitReason)(event.reason);
|
|
32
|
-
var send = isPageExit ? this.request.sendOnExit : this.request.send;
|
|
33
|
-
if (isPageExit &&
|
|
34
|
-
// Note: checking that the encoder is async is not strictly needed, but it's an optimization:
|
|
35
|
-
// if the encoder is async we need to send two requests in some cases (one for encoded data
|
|
36
|
-
// and the other for non-encoded data). But if it's not async, we don't have to worry about
|
|
37
|
-
// it and always send a single request.
|
|
38
|
-
this.encoder.isAsync) {
|
|
39
|
-
var encoderResult = this.encoder.finishSync();
|
|
40
|
-
// Send encoded messages
|
|
41
|
-
if (encoderResult.outputBytesCount) {
|
|
42
|
-
send(formatPayloadFromEncoder(encoderResult, event));
|
|
43
|
-
}
|
|
44
|
-
// Send messages that are not yet encoded at this point
|
|
45
|
-
var pendingMessages = [encoderResult.pendingData, upsertMessages].filter(Boolean).join('\n');
|
|
46
|
-
if (pendingMessages) {
|
|
47
|
-
send({
|
|
48
|
-
data: pendingMessages,
|
|
49
|
-
bytesCount: (0, byteUtils_1.computeBytesCount)(pendingMessages),
|
|
50
|
-
flushReason: event.reason,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
if (upsertMessages) {
|
|
56
|
-
this.encoder.write(this.encoder.isEmpty ? upsertMessages : "\n".concat(upsertMessages));
|
|
57
|
-
}
|
|
58
|
-
this.encoder.finish(function (encoderResult) {
|
|
59
|
-
send(formatPayloadFromEncoder(encoderResult, event));
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
Batch.prototype.addOrUpdate = function (message, key) {
|
|
64
|
-
var serializedMessage = (0, jsonStringify_1.jsonStringify)(message);
|
|
65
|
-
var estimatedMessageBytesCount = this.encoder.estimateEncodedBytesCount(serializedMessage);
|
|
66
|
-
if (estimatedMessageBytesCount >= this.messageBytesLimit) {
|
|
67
|
-
display_1.display.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit, "KB."));
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (this.hasMessageFor(key)) {
|
|
71
|
-
this.remove(key);
|
|
72
|
-
}
|
|
73
|
-
this.push(serializedMessage, estimatedMessageBytesCount, key);
|
|
74
|
-
};
|
|
75
|
-
Batch.prototype.push = function (serializedMessage, estimatedMessageBytesCount, key) {
|
|
76
|
-
var _this = this;
|
|
77
|
-
this.flushController.notifyBeforeAddMessage(estimatedMessageBytesCount);
|
|
78
|
-
if (key !== undefined) {
|
|
79
|
-
this.upsertBuffer[key] = serializedMessage;
|
|
80
|
-
this.flushController.notifyAfterAddMessage();
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
this.encoder.write(this.encoder.isEmpty ? serializedMessage : "\n".concat(serializedMessage), function (realMessageBytesCount) {
|
|
84
|
-
_this.flushController.notifyAfterAddMessage(realMessageBytesCount - estimatedMessageBytesCount);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
Batch.prototype.remove = function (key) {
|
|
89
|
-
var removedMessage = this.upsertBuffer[key];
|
|
90
|
-
delete this.upsertBuffer[key];
|
|
91
|
-
var messageBytesCount = this.encoder.estimateEncodedBytesCount(removedMessage);
|
|
92
|
-
this.flushController.notifyAfterRemoveMessage(messageBytesCount);
|
|
93
|
-
};
|
|
94
|
-
Batch.prototype.hasMessageFor = function (key) {
|
|
95
|
-
return key !== undefined && this.upsertBuffer[key] !== undefined;
|
|
96
|
-
};
|
|
97
|
-
return Batch;
|
|
98
|
-
}());
|
|
99
|
-
exports.Batch = Batch;
|
|
100
|
-
function formatPayloadFromEncoder(encoderResult, flushEvent) {
|
|
101
|
-
var data;
|
|
102
|
-
if (typeof encoderResult.output === 'string') {
|
|
103
|
-
data = encoderResult.output;
|
|
104
|
-
}
|
|
105
|
-
else {
|
|
106
|
-
data = new Blob([encoderResult.output], {
|
|
107
|
-
// This will set the 'Content-Type: text/plain' header. Reasoning:
|
|
108
|
-
// * The intake rejects the request if there is no content type.
|
|
109
|
-
// * The browser will issue CORS preflight requests if we set it to 'application/json', which
|
|
110
|
-
// could induce higher intake load (and maybe has other impacts).
|
|
111
|
-
// * Also it's not quite JSON, since we are concatenating multiple JSON objects separated by
|
|
112
|
-
// new lines.
|
|
113
|
-
type: 'text/plain',
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
return {
|
|
117
|
-
data: data,
|
|
118
|
-
bytesCount: encoderResult.outputBytesCount,
|
|
119
|
-
encoding: encoderResult.encoding,
|
|
120
|
-
flushReason: flushEvent.reason,
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
//# sourceMappingURL=batch.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/transport/batch.ts"],"names":[],"mappings":";;;AAAA,4CAA0C;AAE1C,sDAAuD;AACvD,oEAAgE;AAChE,sEAAoE;AAGpE,sDAA4D;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,W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M;KAC/B,CAAA;AACH,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface BrowserWindowWithEventBridge extends Window {
|
|
2
|
-
DatadogEventBridge?: DatadogEventBridge;
|
|
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,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.canUseEventBridge = exports.getEventBridge = void 0;
|
|
4
|
-
var polyfills_1 = require("../tools/utils/polyfills");
|
|
5
|
-
var getGlobalObject_1 = require("../tools/getGlobalObject");
|
|
6
|
-
function getEventBridge() {
|
|
7
|
-
var eventBridgeGlobal = getEventBridgeGlobal();
|
|
8
|
-
if (!eventBridgeGlobal) {
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
return {
|
|
12
|
-
getAllowedWebViewHosts: function () {
|
|
13
|
-
return JSON.parse(eventBridgeGlobal.getAllowedWebViewHosts());
|
|
14
|
-
},
|
|
15
|
-
send: function (eventType, event) {
|
|
16
|
-
eventBridgeGlobal.send(JSON.stringify({ eventType: eventType, event: event }));
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
exports.getEventBridge = getEventBridge;
|
|
21
|
-
function canUseEventBridge(currentHost) {
|
|
22
|
-
var _a;
|
|
23
|
-
if (currentHost === void 0) { currentHost = (_a = (0, getGlobalObject_1.getGlobalObject)().location) === null || _a === void 0 ? void 0 : _a.hostname; }
|
|
24
|
-
var bridge = getEventBridge();
|
|
25
|
-
return (!!bridge &&
|
|
26
|
-
bridge
|
|
27
|
-
.getAllowedWebViewHosts()
|
|
28
|
-
.some(function (allowedHost) { return currentHost === allowedHost || (0, polyfills_1.endsWith)(currentHost, ".".concat(allowedHost)); }));
|
|
29
|
-
}
|
|
30
|
-
exports.canUseEventBridge = canUseEventBridge;
|
|
31
|
-
function getEventBridgeGlobal() {
|
|
32
|
-
return (0, getGlobalObject_1.getGlobalObject)().DatadogEventBridge;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=eventBridge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventBridge.js","sourceRoot":"","sources":["../../src/transport/eventBridge.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AACnD,4DAA0D;AAW1D,SAAgB,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;AAfD,wCAeC;AAED,SAAgB,iBAAiB,CAAC,WAA0D;;IAA1D,4BAAA,EAAA,oBAAc,IAAA,iCAAe,GAAU,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,IAAA,oBAAQ,EAAC,WAAW,EAAE,WAAI,WAAW,CAAE,CAAC,EAAvE,CAAuE,CAAC,CAClG,CAAA;AACH,CAAC;AARD,8CAQC;AAED,SAAS,oBAAoB;IAC3B,OAAO,IAAA,iCAAe,GAAgC,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 {};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFlushController = void 0;
|
|
4
|
-
var observable_1 = require("../tools/observable");
|
|
5
|
-
var timer_1 = require("../tools/timer");
|
|
6
|
-
/**
|
|
7
|
-
* Returns a "flush controller", responsible of notifying when flushing a pool of pending data needs
|
|
8
|
-
* to happen. The implementation is designed to support both synchronous and asynchronous usages,
|
|
9
|
-
* but relies on invariants described in each method documentation to keep a coherent state.
|
|
10
|
-
*/
|
|
11
|
-
function createFlushController(_a) {
|
|
12
|
-
var messagesLimit = _a.messagesLimit, bytesLimit = _a.bytesLimit, durationLimit = _a.durationLimit, pageExitObservable = _a.pageExitObservable, sessionExpireObservable = _a.sessionExpireObservable;
|
|
13
|
-
var pageExitSubscription = pageExitObservable.subscribe(function (event) { return flush(event.reason); });
|
|
14
|
-
var sessionExpireSubscription = sessionExpireObservable.subscribe(function () { return flush('session_expire'); });
|
|
15
|
-
var flushObservable = new observable_1.Observable(function () { return function () {
|
|
16
|
-
pageExitSubscription.unsubscribe();
|
|
17
|
-
sessionExpireSubscription.unsubscribe();
|
|
18
|
-
}; });
|
|
19
|
-
var currentBytesCount = 0;
|
|
20
|
-
var currentMessagesCount = 0;
|
|
21
|
-
function flush(flushReason) {
|
|
22
|
-
if (currentMessagesCount === 0) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
var messagesCount = currentMessagesCount;
|
|
26
|
-
var bytesCount = currentBytesCount;
|
|
27
|
-
currentMessagesCount = 0;
|
|
28
|
-
currentBytesCount = 0;
|
|
29
|
-
cancelDurationLimitTimeout();
|
|
30
|
-
flushObservable.notify({
|
|
31
|
-
reason: flushReason,
|
|
32
|
-
messagesCount: messagesCount,
|
|
33
|
-
bytesCount: bytesCount,
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
var durationLimitTimeoutId;
|
|
37
|
-
function scheduleDurationLimitTimeout() {
|
|
38
|
-
if (durationLimitTimeoutId === undefined) {
|
|
39
|
-
durationLimitTimeoutId = (0, timer_1.setTimeout)(function () {
|
|
40
|
-
flush('duration_limit');
|
|
41
|
-
}, durationLimit);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
function cancelDurationLimitTimeout() {
|
|
45
|
-
(0, timer_1.clearTimeout)(durationLimitTimeoutId);
|
|
46
|
-
durationLimitTimeoutId = undefined;
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
flushObservable: flushObservable,
|
|
50
|
-
get messagesCount() {
|
|
51
|
-
return currentMessagesCount;
|
|
52
|
-
},
|
|
53
|
-
/**
|
|
54
|
-
* Notifies that a message will be added to a pool of pending messages waiting to be flushed.
|
|
55
|
-
*
|
|
56
|
-
* This function needs to be called synchronously, right before adding the message, so no flush
|
|
57
|
-
* event can happen after `notifyBeforeAddMessage` and before adding the message.
|
|
58
|
-
*
|
|
59
|
-
* @param estimatedMessageBytesCount: an estimation of the message bytes count once it is
|
|
60
|
-
* actually added.
|
|
61
|
-
*/
|
|
62
|
-
notifyBeforeAddMessage: function (estimatedMessageBytesCount) {
|
|
63
|
-
if (currentBytesCount + estimatedMessageBytesCount >= bytesLimit) {
|
|
64
|
-
flush('bytes_limit');
|
|
65
|
-
}
|
|
66
|
-
// Consider the message to be added now rather than in `notifyAfterAddMessage`, because if no
|
|
67
|
-
// message was added yet and `notifyAfterAddMessage` is called asynchronously, we still want
|
|
68
|
-
// to notify when a flush is needed (for example on page exit).
|
|
69
|
-
currentMessagesCount += 1;
|
|
70
|
-
currentBytesCount += estimatedMessageBytesCount;
|
|
71
|
-
scheduleDurationLimitTimeout();
|
|
72
|
-
},
|
|
73
|
-
/**
|
|
74
|
-
* Notifies that a message *was* added to a pool of pending messages waiting to be flushed.
|
|
75
|
-
*
|
|
76
|
-
* This function can be called asynchronously after the message was added, but in this case it
|
|
77
|
-
* should not be called if a flush event occurred in between.
|
|
78
|
-
*
|
|
79
|
-
* @param messageBytesCountDiff: the difference between the estimated message bytes count and
|
|
80
|
-
* its actual bytes count once added to the pool.
|
|
81
|
-
*/
|
|
82
|
-
notifyAfterAddMessage: function (messageBytesCountDiff) {
|
|
83
|
-
if (messageBytesCountDiff === void 0) { messageBytesCountDiff = 0; }
|
|
84
|
-
currentBytesCount += messageBytesCountDiff;
|
|
85
|
-
if (currentMessagesCount >= messagesLimit) {
|
|
86
|
-
flush('messages_limit');
|
|
87
|
-
}
|
|
88
|
-
else if (currentBytesCount >= bytesLimit) {
|
|
89
|
-
flush('bytes_limit');
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
/**
|
|
93
|
-
* Notifies that a message was removed from a pool of pending messages waiting to be flushed.
|
|
94
|
-
*
|
|
95
|
-
* This function needs to be called synchronously, right after removing the message, so no flush
|
|
96
|
-
* event can happen after removing the message and before `notifyAfterRemoveMessage`.
|
|
97
|
-
*
|
|
98
|
-
* @param messageBytesCount: the message bytes count that was added to the pool. Should
|
|
99
|
-
* correspond to the sum of bytes counts passed to `notifyBeforeAddMessage` and
|
|
100
|
-
* `notifyAfterAddMessage`.
|
|
101
|
-
*/
|
|
102
|
-
notifyAfterRemoveMessage: function (messageBytesCount) {
|
|
103
|
-
currentBytesCount -= messageBytesCount;
|
|
104
|
-
currentMessagesCount -= 1;
|
|
105
|
-
if (currentMessagesCount === 0) {
|
|
106
|
-
cancelDurationLimitTimeout();
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
exports.createFlushController = createFlushController;
|
|
112
|
-
//# sourceMappingURL=flushController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flushController.js","sourceRoot":"","sources":["../../src/transport/flushController.ts"],"names":[],"mappings":";;;AACA,kDAAgD;AAEhD,wCAAyD;AAoBzD;;;;GAIG;AACH,SAAgB,qBAAqB,CAAC,EAMb;QALvB,aAAa,mBAAA,EACb,UAAU,gBAAA,EACV,aAAa,mBAAA,EACb,kBAAkB,wBAAA,EAClB,uBAAuB,6BAAA;IAEvB,IAAM,oBAAoB,GAAG,kBAAkB,CAAC,SAAS,CAAC,UAAC,KAAK,IAAK,OAAA,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAnB,CAAmB,CAAC,CAAA;IACzF,IAAM,yBAAyB,GAAG,uBAAuB,CAAC,SAAS,CAAC,cAAM,OAAA,KAAK,CAAC,gBAAgB,CAAC,EAAvB,CAAuB,CAAC,CAAA;IAElG,IAAM,eAAe,GAAG,IAAI,uBAAU,CAAa,cAAM,OAAA;QACvD,oBAAoB,CAAC,WAAW,EAAE,CAAA;QAClC,yBA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4BAA4B,EAAE,CAAA;QAChC,CAAC;QAED;;;;;;;;WAQG;QACH,qBAAqB,YAAC,qBAAyB;YAAzB,sCAAA,EAAA,yBAAyB;YAC7C,iBAAiB,IAAI,qBAAqB,CAAA;YAE1C,IAAI,oBAAoB,IAAI,aAAa,EAAE,CAAC;gBAC1C,KAAK,CAAC,gBAAgB,CAAC,CAAA;YACzB,CAAC;iBAAM,IAAI,iBAAiB,IAAI,UAAU,EAAE,CAAC;gBAC3C,KAAK,CAAC,aAAa,CAAC,CAAA;YACtB,CAAC;QACH,CAAC;QAED;;;;;;;;;WASG;QACH,wBAAwB,YAAC,iBAAyB;YAChD,iBAAiB,IAAI,iBAAiB,CAAA;YACtC,oBAAoB,IAAI,CAAC,CAAA;YACzB,IAAI,oBAAoB,KAAK,CAAC,EAAE,CAAC;gBAC/B,0BAA0B,EAAE,CAAA;YAC9B,CAAC;QACH,CAAC;KACF,CAAA;AACH,CAAC;AAnHD,sDAmHC"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import type { EndpointBuilder, Configuration } from '../domain/configuration';
|
|
2
|
-
import type { Context } from '../tools/serialisation/context';
|
|
3
|
-
import type { RawError } from '../domain/error/error.types';
|
|
4
|
-
import type { FlushReason } from './flushController';
|
|
5
|
-
/**
|
|
6
|
-
* Use POST request without content type to:
|
|
7
|
-
* - avoid CORS preflight requests
|
|
8
|
-
* - allow usage of sendBeacon
|
|
9
|
-
*
|
|
10
|
-
* multiple elements are sent separated by \n in order
|
|
11
|
-
* to be parsed correctly without content type header
|
|
12
|
-
*/
|
|
13
|
-
export type HttpRequest = ReturnType<typeof createHttpRequest>;
|
|
14
|
-
export interface HttpResponse extends Context {
|
|
15
|
-
status: number;
|
|
16
|
-
type?: ResponseType;
|
|
17
|
-
}
|
|
18
|
-
export interface Payload {
|
|
19
|
-
data: string | FormData | Blob;
|
|
20
|
-
bytesCount: number;
|
|
21
|
-
retry?: RetryInfo;
|
|
22
|
-
flushReason?: FlushReason;
|
|
23
|
-
encoding?: 'deflate';
|
|
24
|
-
}
|
|
25
|
-
export interface RetryInfo {
|
|
26
|
-
count: number;
|
|
27
|
-
lastFailureStatus: number;
|
|
28
|
-
}
|
|
29
|
-
export declare function createHttpRequest(configuration: Configuration, endpointBuilder: EndpointBuilder, bytesLimit: number, reportError: (error: RawError) => void): {
|
|
30
|
-
send: (payload: Payload) => void;
|
|
31
|
-
/**
|
|
32
|
-
* Since fetch keepalive behaves like regular fetch on Firefox,
|
|
33
|
-
* keep using sendBeaconStrategy on exit
|
|
34
|
-
*/
|
|
35
|
-
sendOnExit: (payload: Payload) => void;
|
|
36
|
-
};
|
|
37
|
-
export declare function fetchKeepAliveStrategy(configuration: Configuration, endpointBuilder: EndpointBuilder, bytesLimit: number, payload: Payload, onResponse?: (r: HttpResponse) => void): void;
|
|
38
|
-
export declare function sendXHR(configuration: Configuration, url: string, data: Payload['data'], onResponse?: (r: HttpResponse) => void): void;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sendXHR = exports.fetchKeepAliveStrategy = exports.createHttpRequest = void 0;
|
|
4
|
-
var telemetry_1 = require("../domain/telemetry");
|
|
5
|
-
var monitor_1 = require("../tools/monitor");
|
|
6
|
-
var addEventListener_1 = require("../browser/addEventListener");
|
|
7
|
-
var sendWithRetryStrategy_1 = require("./sendWithRetryStrategy");
|
|
8
|
-
function createHttpRequest(configuration, endpointBuilder, bytesLimit, reportError) {
|
|
9
|
-
var retryState = (0, sendWithRetryStrategy_1.newRetryState)();
|
|
10
|
-
var sendStrategyForRetry = function (payload, onResponse) {
|
|
11
|
-
return fetchKeepAliveStrategy(configuration, endpointBuilder, bytesLimit, payload, onResponse);
|
|
12
|
-
};
|
|
13
|
-
return {
|
|
14
|
-
send: function (payload) {
|
|
15
|
-
(0, sendWithRetryStrategy_1.sendWithRetryStrategy)(payload, retryState, sendStrategyForRetry, endpointBuilder.trackType, reportError);
|
|
16
|
-
},
|
|
17
|
-
/**
|
|
18
|
-
* Since fetch keepalive behaves like regular fetch on Firefox,
|
|
19
|
-
* keep using sendBeaconStrategy on exit
|
|
20
|
-
*/
|
|
21
|
-
sendOnExit: function (payload) {
|
|
22
|
-
sendBeaconStrategy(configuration, endpointBuilder, bytesLimit, payload);
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
exports.createHttpRequest = createHttpRequest;
|
|
27
|
-
function sendBeaconStrategy(configuration, endpointBuilder, bytesLimit, payload) {
|
|
28
|
-
var canUseBeacon = !!navigator.sendBeacon && payload.bytesCount < bytesLimit;
|
|
29
|
-
if (canUseBeacon) {
|
|
30
|
-
try {
|
|
31
|
-
var beaconUrl = endpointBuilder.build('beacon', payload);
|
|
32
|
-
var isQueued = navigator.sendBeacon(beaconUrl, payload.data);
|
|
33
|
-
if (isQueued) {
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
catch (e) {
|
|
38
|
-
reportBeaconError(e);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
var xhrUrl = endpointBuilder.build('xhr', payload);
|
|
42
|
-
sendXHR(configuration, xhrUrl, payload.data);
|
|
43
|
-
}
|
|
44
|
-
var hasReportedBeaconError = false;
|
|
45
|
-
function reportBeaconError(e) {
|
|
46
|
-
if (!hasReportedBeaconError) {
|
|
47
|
-
hasReportedBeaconError = true;
|
|
48
|
-
(0, telemetry_1.addTelemetryError)(e);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function fetchKeepAliveStrategy(configuration, endpointBuilder, bytesLimit, payload, onResponse) {
|
|
52
|
-
var canUseKeepAlive = isKeepAliveSupported() && payload.bytesCount < bytesLimit;
|
|
53
|
-
if (canUseKeepAlive) {
|
|
54
|
-
var fetchUrl = endpointBuilder.build('fetch', payload);
|
|
55
|
-
fetch(fetchUrl, { method: 'POST', body: payload.data, keepalive: true, mode: 'cors' }).then((0, monitor_1.monitor)(function (response) { return onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: response.status, type: response.type }); }), (0, monitor_1.monitor)(function () {
|
|
56
|
-
var xhrUrl = endpointBuilder.build('xhr', payload);
|
|
57
|
-
// failed to queue the request
|
|
58
|
-
sendXHR(configuration, xhrUrl, payload.data, onResponse);
|
|
59
|
-
}));
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
var xhrUrl = endpointBuilder.build('xhr', payload);
|
|
63
|
-
sendXHR(configuration, xhrUrl, payload.data, onResponse);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
exports.fetchKeepAliveStrategy = fetchKeepAliveStrategy;
|
|
67
|
-
function isKeepAliveSupported() {
|
|
68
|
-
// Request can throw, cf https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#errors
|
|
69
|
-
try {
|
|
70
|
-
return window.Request && 'keepalive' in new Request('http://a');
|
|
71
|
-
}
|
|
72
|
-
catch (_a) {
|
|
73
|
-
return false;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
function sendXHR(configuration, url, data, onResponse) {
|
|
77
|
-
var request = new XMLHttpRequest();
|
|
78
|
-
request.open('POST', url, true);
|
|
79
|
-
if (data instanceof Blob) {
|
|
80
|
-
// When using a Blob instance, IE does not use its 'type' to define the 'Content-Type' header
|
|
81
|
-
// automatically, so the intake request ends up being rejected with an HTTP status 415
|
|
82
|
-
// Defining the header manually fixes this issue.
|
|
83
|
-
request.setRequestHeader('Content-Type', data.type);
|
|
84
|
-
}
|
|
85
|
-
(0, addEventListener_1.addEventListener)(configuration, request, 'loadend', function () {
|
|
86
|
-
onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: request.status });
|
|
87
|
-
}, {
|
|
88
|
-
// prevent multiple onResponse callbacks
|
|
89
|
-
// if the xhr instance is reused by a third party
|
|
90
|
-
once: true,
|
|
91
|
-
});
|
|
92
|
-
request.send(data);
|
|
93
|
-
}
|
|
94
|
-
exports.sendXHR = sendXHR;
|
|
95
|
-
//# sourceMappingURL=httpRequest.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"httpRequest.js","sourceRoot":"","sources":["../../src/transport/httpRequest.ts"],"names":[],"mappings":";;;AACA,iDAAuD;AAEvD,4CAA0C;AAC1C,gEAA8D;AAE9D,iEAA8E;AAgC9E,SAAgB,iBAAiB,CAC/B,aAA4B,EAC5B,eAAgC,EAChC,UAAkB,EAClB,WAAsC;IAEtC,IAAM,UAAU,GAAG,IAAA,qCAAa,GAAE,CAAA;IAClC,IAAM,oBAAoB,GAAG,UAAC,OAAgB,EAAE,UAAqC;QACnF,OAAA,sBAAsB,CAAC,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,CAAC;IAAvF,CAAuF,CAAA;IAEzF,OAAO;QACL,IAAI,EAAE,UAAC,OAAgB;YACrB,IAAA,6CAAqB,EAAC,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,eAAe,CAAC,SAAS,EAAE,WAAW,CAAC,CAAA;QAC1G,CAAC;QACD;;;WAGG;QACH,UAAU,EAAE,UAAC,OAAgB;YAC3B,kBAAkB,CAAC,aAAa,EAAE,eAAe,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;QACzE,CAAC;KACF,CAAA;AACH,CAAC;AAtBD,8CAsBC;AAED,SAAS,kBAAkB,CACzB,aAA4B,EAC5B,eAAgC,EAChC,UAAkB,EAClB,OAAgB;IAEhB,IAAM,YAAY,GAAG,CAAC,CAAC,SAAS,CAAC,UAAU,IAAI,OAAO,CAAC,UAAU,GAAG,UAAU,CAAA;IAC9E,IAAI,YAAY,EAAE,CAAC;QACjB,IAAI,CAAC;YACH,IAAM,SAAS,GAAG,eAAe,CAAC,KAAK,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAA;YAC1D,IAAM,QAAQ,GAAG,SAAS,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC,IAAI,CAAC,CAAA;YAE9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AAI,CAAC,CAAA;AACpB,CAAC;AA5BD,0BA4BC"}
|
package/cjs/transport/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { HttpRequest, createHttpRequest, Payload, RetryInfo } from './httpRequest';
|
|
2
|
-
export { canUseEventBridge, getEventBridge, BrowserWindowWithEventBridge } from './eventBridge';
|
|
3
|
-
export { startBatchWithReplica } from './startBatchWithReplica';
|
|
4
|
-
export { createFlushController, FlushController, FlushEvent, FlushReason } from './flushController';
|
package/cjs/transport/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createFlushController = exports.startBatchWithReplica = exports.getEventBridge = exports.canUseEventBridge = exports.createHttpRequest = void 0;
|
|
4
|
-
var httpRequest_1 = require("./httpRequest");
|
|
5
|
-
Object.defineProperty(exports, "createHttpRequest", { enumerable: true, get: function () { return httpRequest_1.createHttpRequest; } });
|
|
6
|
-
var eventBridge_1 = require("./eventBridge");
|
|
7
|
-
Object.defineProperty(exports, "canUseEventBridge", { enumerable: true, get: function () { return eventBridge_1.canUseEventBridge; } });
|
|
8
|
-
Object.defineProperty(exports, "getEventBridge", { enumerable: true, get: function () { return eventBridge_1.getEventBridge; } });
|
|
9
|
-
var startBatchWithReplica_1 = require("./startBatchWithReplica");
|
|
10
|
-
Object.defineProperty(exports, "startBatchWithReplica", { enumerable: true, get: function () { return startBatchWithReplica_1.startBatchWithReplica; } });
|
|
11
|
-
var flushController_1 = require("./flushController");
|
|
12
|
-
Object.defineProperty(exports, "createFlushController", { enumerable: true, get: function () { return flushController_1.createFlushController; } });
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transport/index.ts"],"names":[],"mappings":";;;AAAA,6CAAkF;AAA5D,gHAAA,iBAAiB,OAAA;AACvC,6CAA+F;AAAtF,gHAAA,iBAAiB,OAAA;AAAE,6GAAA,cAAc,OAAA;AAC1C,iEAA+D;AAAtD,8HAAA,qBAAqB,OAAA;AAC9B,qDAAmG;AAA1F,wHAAA,qBAAqB,OAAA"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { TrackType } from '../domain/configuration';
|
|
2
|
-
import type { RawError } from '../domain/error/error.types';
|
|
3
|
-
import type { Payload, HttpResponse } from './httpRequest';
|
|
4
|
-
export declare const MAX_ONGOING_BYTES_COUNT: number;
|
|
5
|
-
export declare const MAX_ONGOING_REQUESTS = 32;
|
|
6
|
-
export declare const MAX_QUEUE_BYTES_COUNT: number;
|
|
7
|
-
export declare const MAX_BACKOFF_TIME: number;
|
|
8
|
-
export declare const INITIAL_BACKOFF_TIME = 1000;
|
|
9
|
-
declare const enum TransportStatus {
|
|
10
|
-
UP = 0,
|
|
11
|
-
FAILURE_DETECTED = 1,
|
|
12
|
-
DOWN = 2
|
|
13
|
-
}
|
|
14
|
-
export interface RetryState {
|
|
15
|
-
transportStatus: TransportStatus;
|
|
16
|
-
currentBackoffTime: number;
|
|
17
|
-
bandwidthMonitor: ReturnType<typeof newBandwidthMonitor>;
|
|
18
|
-
queuedPayloads: ReturnType<typeof newPayloadQueue>;
|
|
19
|
-
queueFullReported: boolean;
|
|
20
|
-
}
|
|
21
|
-
type SendStrategy = (payload: Payload, onResponse: (r: HttpResponse) => void) => void;
|
|
22
|
-
export declare function sendWithRetryStrategy(payload: Payload, state: RetryState, sendStrategy: SendStrategy, trackType: TrackType, reportError: (error: RawError) => void): void;
|
|
23
|
-
export declare function newRetryState(): RetryState;
|
|
24
|
-
declare function newPayloadQueue(): {
|
|
25
|
-
bytesCount: number;
|
|
26
|
-
enqueue(payload: Payload): void;
|
|
27
|
-
first(): Payload;
|
|
28
|
-
dequeue(): Payload | undefined;
|
|
29
|
-
size(): number;
|
|
30
|
-
isFull(): boolean;
|
|
31
|
-
};
|
|
32
|
-
declare function newBandwidthMonitor(): {
|
|
33
|
-
ongoingRequestCount: number;
|
|
34
|
-
ongoingByteCount: number;
|
|
35
|
-
canHandle(payload: Payload): boolean;
|
|
36
|
-
add(payload: Payload): void;
|
|
37
|
-
remove(payload: Payload): void;
|
|
38
|
-
};
|
|
39
|
-
export {};
|