@pratham.raval/browser-core 6.22.3
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/README.md +3 -0
- package/cjs/boot/displayAlreadyInitializedError.d.ts +2 -0
- package/cjs/boot/displayAlreadyInitializedError.js +10 -0
- package/cjs/boot/displayAlreadyInitializedError.js.map +1 -0
- package/cjs/boot/init.d.ts +14 -0
- package/cjs/boot/init.js +39 -0
- package/cjs/boot/init.js.map +1 -0
- package/cjs/browser/addEventListener.d.ts +87 -0
- package/cjs/browser/addEventListener.js +55 -0
- package/cjs/browser/addEventListener.js.map +1 -0
- package/cjs/browser/browser.types.d.ts +51 -0
- package/cjs/browser/browser.types.js +6 -0
- package/cjs/browser/browser.types.js.map +1 -0
- package/cjs/browser/cookie.d.ts +18 -0
- package/cjs/browser/cookie.js +101 -0
- package/cjs/browser/cookie.js.map +1 -0
- package/cjs/browser/fetchObservable.d.ts +25 -0
- package/cjs/browser/fetchObservable.js +79 -0
- package/cjs/browser/fetchObservable.js.map +1 -0
- package/cjs/browser/pageMayExitObservable.d.ts +14 -0
- package/cjs/browser/pageMayExitObservable.js +45 -0
- package/cjs/browser/pageMayExitObservable.js.map +1 -0
- package/cjs/browser/runOnReadyState.d.ts +5 -0
- package/cjs/browser/runOnReadyState.js +20 -0
- package/cjs/browser/runOnReadyState.js.map +1 -0
- package/cjs/browser/xhrObservable.d.ts +23 -0
- package/cjs/browser/xhrObservable.js +83 -0
- package/cjs/browser/xhrObservable.js.map +1 -0
- package/cjs/domain/allowedTrackingOrigins.d.ts +4 -0
- package/cjs/domain/allowedTrackingOrigins.js +25 -0
- package/cjs/domain/allowedTrackingOrigins.js.map +1 -0
- package/cjs/domain/bufferedData.d.ts +14 -0
- package/cjs/domain/bufferedData.js +22 -0
- package/cjs/domain/bufferedData.js.map +1 -0
- package/cjs/domain/configuration/configuration.d.ts +303 -0
- package/cjs/domain/configuration/configuration.js +152 -0
- package/cjs/domain/configuration/configuration.js.map +1 -0
- package/cjs/domain/configuration/endpointBuilder.d.ts +12 -0
- package/cjs/domain/configuration/endpointBuilder.js +78 -0
- package/cjs/domain/configuration/endpointBuilder.js.map +1 -0
- package/cjs/domain/configuration/index.d.ts +5 -0
- package/cjs/domain/configuration/index.js +16 -0
- package/cjs/domain/configuration/index.js.map +1 -0
- package/cjs/domain/configuration/transportConfiguration.d.ts +20 -0
- package/cjs/domain/configuration/transportConfiguration.js +54 -0
- package/cjs/domain/configuration/transportConfiguration.js.map +1 -0
- package/cjs/domain/connectivity/connectivity.d.ts +14 -0
- package/cjs/domain/connectivity/connectivity.js +14 -0
- package/cjs/domain/connectivity/connectivity.js.map +1 -0
- package/cjs/domain/connectivity/index.d.ts +1 -0
- package/cjs/domain/connectivity/index.js +18 -0
- package/cjs/domain/connectivity/index.js.map +1 -0
- package/cjs/domain/console/consoleObservable.d.ts +21 -0
- package/cjs/domain/console/consoleObservable.js +84 -0
- package/cjs/domain/console/consoleObservable.js.map +1 -0
- package/cjs/domain/context/contextConstants.d.ts +21 -0
- package/cjs/domain/context/contextConstants.js +18 -0
- package/cjs/domain/context/contextConstants.js.map +1 -0
- package/cjs/domain/context/contextManager.d.ts +19 -0
- package/cjs/domain/context/contextManager.js +60 -0
- package/cjs/domain/context/contextManager.js.map +1 -0
- package/cjs/domain/context/contextUtils.d.ts +5 -0
- package/cjs/domain/context/contextUtils.js +16 -0
- package/cjs/domain/context/contextUtils.js.map +1 -0
- package/cjs/domain/context/defineContextMethod.d.ts +6 -0
- package/cjs/domain/context/defineContextMethod.js +21 -0
- package/cjs/domain/context/defineContextMethod.js.map +1 -0
- package/cjs/domain/context/storeContextManager.d.ts +6 -0
- package/cjs/domain/context/storeContextManager.js +40 -0
- package/cjs/domain/context/storeContextManager.js.map +1 -0
- package/cjs/domain/contexts/accountContext.d.ts +26 -0
- package/cjs/domain/contexts/accountContext.js +33 -0
- package/cjs/domain/contexts/accountContext.js.map +1 -0
- package/cjs/domain/contexts/globalContext.d.ts +18 -0
- package/cjs/domain/contexts/globalContext.js +21 -0
- package/cjs/domain/contexts/globalContext.js.map +1 -0
- package/cjs/domain/contexts/rumInternalContext.type.d.ts +14 -0
- package/cjs/domain/contexts/rumInternalContext.type.js +3 -0
- package/cjs/domain/contexts/rumInternalContext.type.js.map +1 -0
- package/cjs/domain/contexts/userContext.d.ts +29 -0
- package/cjs/domain/contexts/userContext.js +45 -0
- package/cjs/domain/contexts/userContext.js.map +1 -0
- package/cjs/domain/deflate/deflate.types.d.ts +40 -0
- package/cjs/domain/deflate/deflate.types.js +3 -0
- package/cjs/domain/deflate/deflate.types.js.map +1 -0
- package/cjs/domain/deflate/index.d.ts +1 -0
- package/cjs/domain/deflate/index.js +18 -0
- package/cjs/domain/deflate/index.js.map +1 -0
- package/cjs/domain/error/error.d.ts +23 -0
- package/cjs/domain/error/error.js +74 -0
- package/cjs/domain/error/error.js.map +1 -0
- package/cjs/domain/error/error.types.d.ts +47 -0
- package/cjs/domain/error/error.types.js +13 -0
- package/cjs/domain/error/error.types.js.map +1 -0
- package/cjs/domain/error/trackRuntimeError.d.ts +11 -0
- package/cjs/domain/error/trackRuntimeError.js +48 -0
- package/cjs/domain/error/trackRuntimeError.js.map +1 -0
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.d.ts +5 -0
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.js +39 -0
- package/cjs/domain/eventRateLimiter/createEventRateLimiter.js.map +1 -0
- package/cjs/domain/extension/extensionUtils.d.ts +10 -0
- package/cjs/domain/extension/extensionUtils.js +30 -0
- package/cjs/domain/extension/extensionUtils.js.map +1 -0
- package/cjs/domain/intakeSites.d.ts +8 -0
- package/cjs/domain/intakeSites.js +11 -0
- package/cjs/domain/intakeSites.js.map +1 -0
- package/cjs/domain/report/browser.types.d.ts +34 -0
- package/cjs/domain/report/browser.types.js +3 -0
- package/cjs/domain/report/browser.types.js.map +1 -0
- package/cjs/domain/report/reportObservable.d.ts +14 -0
- package/cjs/domain/report/reportObservable.js +99 -0
- package/cjs/domain/report/reportObservable.js.map +1 -0
- package/cjs/domain/resourceUtils.d.ts +18 -0
- package/cjs/domain/resourceUtils.js +20 -0
- package/cjs/domain/resourceUtils.js.map +1 -0
- package/cjs/domain/session/oldCookiesMigration.d.ts +11 -0
- package/cjs/domain/session/oldCookiesMigration.js +40 -0
- package/cjs/domain/session/oldCookiesMigration.js.map +1 -0
- package/cjs/domain/session/sessionConstants.d.ts +15 -0
- package/cjs/domain/session/sessionConstants.js +16 -0
- package/cjs/domain/session/sessionConstants.js.map +1 -0
- package/cjs/domain/session/sessionManager.d.ts +28 -0
- package/cjs/domain/session/sessionManager.js +185 -0
- package/cjs/domain/session/sessionManager.js.map +1 -0
- package/cjs/domain/session/sessionState.d.ts +16 -0
- package/cjs/domain/session/sessionState.js +76 -0
- package/cjs/domain/session/sessionState.js.map +1 -0
- package/cjs/domain/session/sessionStateValidation.d.ts +3 -0
- package/cjs/domain/session/sessionStateValidation.js +11 -0
- package/cjs/domain/session/sessionStateValidation.js.map +1 -0
- package/cjs/domain/session/sessionStore.d.ts +38 -0
- package/cjs/domain/session/sessionStore.js +181 -0
- package/cjs/domain/session/sessionStore.js.map +1 -0
- package/cjs/domain/session/sessionStoreOperations.d.ts +12 -0
- package/cjs/domain/session/sessionStoreOperations.js +119 -0
- package/cjs/domain/session/sessionStoreOperations.js.map +1 -0
- package/cjs/domain/session/storeStrategies/sessionInCookie.d.ts +8 -0
- package/cjs/domain/session/storeStrategies/sessionInCookie.js +56 -0
- package/cjs/domain/session/storeStrategies/sessionInCookie.js.map +1 -0
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.d.ts +4 -0
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js +41 -0
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js.map +1 -0
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.d.ts +16 -0
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.js +5 -0
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.js.map +1 -0
- package/cjs/domain/synthetics/syntheticsWorkerValues.d.ts +12 -0
- package/cjs/domain/synthetics/syntheticsWorkerValues.js +31 -0
- package/cjs/domain/synthetics/syntheticsWorkerValues.js.map +1 -0
- package/cjs/domain/tags.d.ts +6 -0
- package/cjs/domain/tags.js +67 -0
- package/cjs/domain/tags.js.map +1 -0
- package/cjs/domain/telemetry/index.d.ts +4 -0
- package/cjs/domain/telemetry/index.js +28 -0
- package/cjs/domain/telemetry/index.js.map +1 -0
- package/cjs/domain/telemetry/rawTelemetryEvent.types.d.ts +18 -0
- package/cjs/domain/telemetry/rawTelemetryEvent.types.js +9 -0
- package/cjs/domain/telemetry/rawTelemetryEvent.types.js.map +1 -0
- package/cjs/domain/telemetry/telemetry.d.ts +56 -0
- package/cjs/domain/telemetry/telemetry.js +248 -0
- package/cjs/domain/telemetry/telemetry.js.map +1 -0
- package/cjs/domain/telemetry/telemetryEvent.types.d.ts +858 -0
- package/cjs/domain/telemetry/telemetryEvent.types.js +7 -0
- package/cjs/domain/telemetry/telemetryEvent.types.js.map +1 -0
- package/cjs/domain/trackingConsent.d.ts +13 -0
- package/cjs/domain/trackingConsent.js +28 -0
- package/cjs/domain/trackingConsent.js.map +1 -0
- package/cjs/index.d.ts +100 -0
- package/cjs/index.js +193 -0
- package/cjs/index.js.map +1 -0
- package/cjs/tools/abstractHooks.d.ts +24 -0
- package/cjs/tools/abstractHooks.js +41 -0
- package/cjs/tools/abstractHooks.js.map +1 -0
- package/cjs/tools/abstractLifeCycle.d.ts +23 -0
- package/cjs/tools/abstractLifeCycle.js +28 -0
- package/cjs/tools/abstractLifeCycle.js.map +1 -0
- package/cjs/tools/boundedBuffer.d.ts +16 -0
- package/cjs/tools/boundedBuffer.js +32 -0
- package/cjs/tools/boundedBuffer.js.map +1 -0
- package/cjs/tools/catchUserErrors.d.ts +1 -0
- package/cjs/tools/catchUserErrors.js +15 -0
- package/cjs/tools/catchUserErrors.js.map +1 -0
- package/cjs/tools/display.d.ts +38 -0
- package/cjs/tools/display.js +44 -0
- package/cjs/tools/display.js.map +1 -0
- package/cjs/tools/encoder.d.ts +54 -0
- package/cjs/tools/encoder.js +40 -0
- package/cjs/tools/encoder.js.map +1 -0
- package/cjs/tools/experimentalFeatures.d.ts +20 -0
- package/cjs/tools/experimentalFeatures.js +49 -0
- package/cjs/tools/experimentalFeatures.js.map +1 -0
- package/cjs/tools/getZoneJsOriginalValue.d.ts +19 -0
- package/cjs/tools/getZoneJsOriginalValue.js +29 -0
- package/cjs/tools/getZoneJsOriginalValue.js.map +1 -0
- package/cjs/tools/globalObject.d.ts +19 -0
- package/cjs/tools/globalObject.js +44 -0
- package/cjs/tools/globalObject.js.map +1 -0
- package/cjs/tools/instrumentMethod.d.ts +75 -0
- package/cjs/tools/instrumentMethod.js +118 -0
- package/cjs/tools/instrumentMethod.js.map +1 -0
- package/cjs/tools/matchOption.d.ts +8 -0
- package/cjs/tools/matchOption.js +35 -0
- package/cjs/tools/matchOption.js.map +1 -0
- package/cjs/tools/mergeInto.d.ts +25 -0
- package/cjs/tools/mergeInto.js +98 -0
- package/cjs/tools/mergeInto.js.map +1 -0
- package/cjs/tools/monitor.d.ts +9 -0
- package/cjs/tools/monitor.js +62 -0
- package/cjs/tools/monitor.js.map +1 -0
- package/cjs/tools/observable.d.ts +30 -0
- package/cjs/tools/observable.js +89 -0
- package/cjs/tools/observable.js.map +1 -0
- package/cjs/tools/queueMicrotask.d.ts +1 -0
- package/cjs/tools/queueMicrotask.js +17 -0
- package/cjs/tools/queueMicrotask.js.map +1 -0
- package/cjs/tools/readBytesFromStream.d.ts +11 -0
- package/cjs/tools/readBytesFromStream.js +63 -0
- package/cjs/tools/readBytesFromStream.js.map +1 -0
- package/cjs/tools/requestIdleCallback.d.ts +12 -0
- package/cjs/tools/requestIdleCallback.js +35 -0
- package/cjs/tools/requestIdleCallback.js.map +1 -0
- package/cjs/tools/sendToExtension.d.ts +3 -0
- package/cjs/tools/sendToExtension.js +11 -0
- package/cjs/tools/sendToExtension.js.map +1 -0
- package/cjs/tools/serialisation/context.d.ts +9 -0
- package/cjs/tools/serialisation/context.js +3 -0
- package/cjs/tools/serialisation/context.js.map +1 -0
- package/cjs/tools/serialisation/jsonStringify.d.ts +13 -0
- package/cjs/tools/serialisation/jsonStringify.js +48 -0
- package/cjs/tools/serialisation/jsonStringify.js.map +1 -0
- package/cjs/tools/serialisation/sanitize.d.ts +18 -0
- package/cjs/tools/serialisation/sanitize.js +188 -0
- package/cjs/tools/serialisation/sanitize.js.map +1 -0
- package/cjs/tools/stackTrace/computeStackTrace.d.ts +25 -0
- package/cjs/tools/stackTrace/computeStackTrace.js +187 -0
- package/cjs/tools/stackTrace/computeStackTrace.js.map +1 -0
- package/cjs/tools/stackTrace/handlingStack.d.ts +10 -0
- package/cjs/tools/stackTrace/handlingStack.js +46 -0
- package/cjs/tools/stackTrace/handlingStack.js.map +1 -0
- package/cjs/tools/taskQueue.d.ts +15 -0
- package/cjs/tools/taskQueue.js +54 -0
- package/cjs/tools/taskQueue.js.map +1 -0
- package/cjs/tools/timer.d.ts +5 -0
- package/cjs/tools/timer.js +22 -0
- package/cjs/tools/timer.js.map +1 -0
- package/cjs/tools/utils/arrayUtils.d.ts +3 -0
- package/cjs/tools/utils/arrayUtils.js +20 -0
- package/cjs/tools/utils/arrayUtils.js.map +1 -0
- package/cjs/tools/utils/browserDetection.d.ts +8 -0
- package/cjs/tools/utils/browserDetection.js +33 -0
- package/cjs/tools/utils/browserDetection.js.map +1 -0
- package/cjs/tools/utils/byteUtils.d.ts +8 -0
- package/cjs/tools/utils/byteUtils.js +30 -0
- package/cjs/tools/utils/byteUtils.js.map +1 -0
- package/cjs/tools/utils/functionUtils.d.ts +8 -0
- package/cjs/tools/utils/functionUtils.js +43 -0
- package/cjs/tools/utils/functionUtils.js.map +1 -0
- package/cjs/tools/utils/numberUtils.d.ts +9 -0
- package/cjs/tools/utils/numberUtils.js +24 -0
- package/cjs/tools/utils/numberUtils.js.map +1 -0
- package/cjs/tools/utils/objectUtils.d.ts +10 -0
- package/cjs/tools/utils/objectUtils.js +23 -0
- package/cjs/tools/utils/objectUtils.js.map +1 -0
- package/cjs/tools/utils/polyfills.d.ts +7 -0
- package/cjs/tools/utils/polyfills.js +23 -0
- package/cjs/tools/utils/polyfills.js.map +1 -0
- package/cjs/tools/utils/responseUtils.d.ts +2 -0
- package/cjs/tools/utils/responseUtils.js +17 -0
- package/cjs/tools/utils/responseUtils.js.map +1 -0
- package/cjs/tools/utils/stringUtils.d.ts +8 -0
- package/cjs/tools/utils/stringUtils.js +55 -0
- package/cjs/tools/utils/stringUtils.js.map +1 -0
- package/cjs/tools/utils/timeUtils.d.ts +53 -0
- package/cjs/tools/utils/timeUtils.js +101 -0
- package/cjs/tools/utils/timeUtils.js.map +1 -0
- package/cjs/tools/utils/timezone.d.ts +1 -0
- package/cjs/tools/utils/timezone.js +13 -0
- package/cjs/tools/utils/timezone.js.map +1 -0
- package/cjs/tools/utils/typeUtils.d.ts +4 -0
- package/cjs/tools/utils/typeUtils.js +16 -0
- package/cjs/tools/utils/typeUtils.js.map +1 -0
- package/cjs/tools/utils/urlPolyfill.d.ts +5 -0
- package/cjs/tools/utils/urlPolyfill.js +59 -0
- package/cjs/tools/utils/urlPolyfill.js.map +1 -0
- package/cjs/tools/valueHistory.d.ts +27 -0
- package/cjs/tools/valueHistory.js +104 -0
- package/cjs/tools/valueHistory.js.map +1 -0
- package/cjs/transport/batch.d.ts +16 -0
- package/cjs/transport/batch.js +108 -0
- package/cjs/transport/batch.js.map +1 -0
- package/cjs/transport/eventBridge.d.ts +21 -0
- package/cjs/transport/eventBridge.js +46 -0
- package/cjs/transport/eventBridge.js.map +1 -0
- package/cjs/transport/flushController.d.ts +58 -0
- package/cjs/transport/flushController.js +109 -0
- package/cjs/transport/flushController.js.map +1 -0
- package/cjs/transport/httpRequest.d.ts +51 -0
- package/cjs/transport/httpRequest.js +80 -0
- package/cjs/transport/httpRequest.js.map +1 -0
- package/cjs/transport/index.d.ts +7 -0
- package/cjs/transport/index.js +14 -0
- package/cjs/transport/index.js.map +1 -0
- package/cjs/transport/sendWithRetryStrategy.d.ts +41 -0
- package/cjs/transport/sendWithRetryStrategy.js +163 -0
- package/cjs/transport/sendWithRetryStrategy.js.map +1 -0
- package/esm/boot/displayAlreadyInitializedError.d.ts +2 -0
- package/esm/boot/displayAlreadyInitializedError.js +7 -0
- package/esm/boot/displayAlreadyInitializedError.js.map +1 -0
- package/esm/boot/init.d.ts +14 -0
- package/esm/boot/init.js +35 -0
- package/esm/boot/init.js.map +1 -0
- package/esm/browser/addEventListener.d.ts +87 -0
- package/esm/browser/addEventListener.js +51 -0
- package/esm/browser/addEventListener.js.map +1 -0
- package/esm/browser/browser.types.d.ts +51 -0
- package/esm/browser/browser.types.js +5 -0
- package/esm/browser/browser.types.js.map +1 -0
- package/esm/browser/cookie.d.ts +18 -0
- package/esm/browser/cookie.js +91 -0
- package/esm/browser/cookie.js.map +1 -0
- package/esm/browser/fetchObservable.d.ts +25 -0
- package/esm/browser/fetchObservable.js +75 -0
- package/esm/browser/fetchObservable.js.map +1 -0
- package/esm/browser/pageMayExitObservable.d.ts +14 -0
- package/esm/browser/pageMayExitObservable.js +40 -0
- package/esm/browser/pageMayExitObservable.js.map +1 -0
- package/esm/browser/runOnReadyState.d.ts +5 -0
- package/esm/browser/runOnReadyState.js +16 -0
- package/esm/browser/runOnReadyState.js.map +1 -0
- package/esm/browser/xhrObservable.d.ts +23 -0
- package/esm/browser/xhrObservable.js +80 -0
- package/esm/browser/xhrObservable.js.map +1 -0
- package/esm/domain/allowedTrackingOrigins.d.ts +4 -0
- package/esm/domain/allowedTrackingOrigins.js +21 -0
- package/esm/domain/allowedTrackingOrigins.js.map +1 -0
- package/esm/domain/bufferedData.d.ts +14 -0
- package/esm/domain/bufferedData.js +19 -0
- package/esm/domain/bufferedData.js.map +1 -0
- package/esm/domain/configuration/configuration.d.ts +303 -0
- package/esm/domain/configuration/configuration.js +146 -0
- package/esm/domain/configuration/configuration.js.map +1 -0
- package/esm/domain/configuration/endpointBuilder.d.ts +12 -0
- package/esm/domain/configuration/endpointBuilder.js +74 -0
- package/esm/domain/configuration/endpointBuilder.js.map +1 -0
- package/esm/domain/configuration/index.d.ts +5 -0
- package/esm/domain/configuration/index.js +4 -0
- package/esm/domain/configuration/index.js.map +1 -0
- package/esm/domain/configuration/transportConfiguration.d.ts +20 -0
- package/esm/domain/configuration/transportConfiguration.js +50 -0
- package/esm/domain/configuration/transportConfiguration.js.map +1 -0
- package/esm/domain/connectivity/connectivity.d.ts +14 -0
- package/esm/domain/connectivity/connectivity.js +11 -0
- package/esm/domain/connectivity/connectivity.js.map +1 -0
- package/esm/domain/connectivity/index.d.ts +1 -0
- package/esm/domain/connectivity/index.js +2 -0
- package/esm/domain/connectivity/index.js.map +1 -0
- package/esm/domain/console/consoleObservable.d.ts +21 -0
- package/esm/domain/console/consoleObservable.js +80 -0
- package/esm/domain/console/consoleObservable.js.map +1 -0
- package/esm/domain/context/contextConstants.d.ts +21 -0
- package/esm/domain/context/contextConstants.js +15 -0
- package/esm/domain/context/contextConstants.js.map +1 -0
- package/esm/domain/context/contextManager.d.ts +19 -0
- package/esm/domain/context/contextManager.js +57 -0
- package/esm/domain/context/contextManager.js.map +1 -0
- package/esm/domain/context/contextUtils.d.ts +5 -0
- package/esm/domain/context/contextUtils.js +13 -0
- package/esm/domain/context/contextUtils.js.map +1 -0
- package/esm/domain/context/defineContextMethod.d.ts +6 -0
- package/esm/domain/context/defineContextMethod.js +17 -0
- package/esm/domain/context/defineContextMethod.js.map +1 -0
- package/esm/domain/context/storeContextManager.d.ts +6 -0
- package/esm/domain/context/storeContextManager.js +35 -0
- package/esm/domain/context/storeContextManager.js.map +1 -0
- package/esm/domain/contexts/accountContext.d.ts +26 -0
- package/esm/domain/contexts/accountContext.js +29 -0
- package/esm/domain/contexts/accountContext.js.map +1 -0
- package/esm/domain/contexts/globalContext.d.ts +18 -0
- package/esm/domain/contexts/globalContext.js +17 -0
- package/esm/domain/contexts/globalContext.js.map +1 -0
- package/esm/domain/contexts/rumInternalContext.type.d.ts +14 -0
- package/esm/domain/contexts/rumInternalContext.type.js +2 -0
- package/esm/domain/contexts/rumInternalContext.type.js.map +1 -0
- package/esm/domain/contexts/userContext.d.ts +29 -0
- package/esm/domain/contexts/userContext.js +41 -0
- package/esm/domain/contexts/userContext.js.map +1 -0
- package/esm/domain/deflate/deflate.types.d.ts +40 -0
- package/esm/domain/deflate/deflate.types.js +2 -0
- package/esm/domain/deflate/deflate.types.js.map +1 -0
- package/esm/domain/deflate/index.d.ts +1 -0
- package/esm/domain/deflate/index.js +2 -0
- package/esm/domain/deflate/index.js.map +1 -0
- package/esm/domain/error/error.d.ts +23 -0
- package/esm/domain/error/error.js +65 -0
- package/esm/domain/error/error.js.map +1 -0
- package/esm/domain/error/error.types.d.ts +47 -0
- package/esm/domain/error/error.types.js +10 -0
- package/esm/domain/error/error.types.js.map +1 -0
- package/esm/domain/error/trackRuntimeError.d.ts +11 -0
- package/esm/domain/error/trackRuntimeError.js +43 -0
- package/esm/domain/error/trackRuntimeError.js.map +1 -0
- package/esm/domain/eventRateLimiter/createEventRateLimiter.d.ts +5 -0
- package/esm/domain/eventRateLimiter/createEventRateLimiter.js +36 -0
- package/esm/domain/eventRateLimiter/createEventRateLimiter.js.map +1 -0
- package/esm/domain/extension/extensionUtils.d.ts +10 -0
- package/esm/domain/extension/extensionUtils.js +25 -0
- package/esm/domain/extension/extensionUtils.js.map +1 -0
- package/esm/domain/intakeSites.d.ts +8 -0
- package/esm/domain/intakeSites.js +8 -0
- package/esm/domain/intakeSites.js.map +1 -0
- package/esm/domain/report/browser.types.d.ts +34 -0
- package/esm/domain/report/browser.types.js +2 -0
- package/esm/domain/report/browser.types.js.map +1 -0
- package/esm/domain/report/reportObservable.d.ts +14 -0
- package/esm/domain/report/reportObservable.js +95 -0
- package/esm/domain/report/reportObservable.js.map +1 -0
- package/esm/domain/resourceUtils.d.ts +18 -0
- package/esm/domain/resourceUtils.js +17 -0
- package/esm/domain/resourceUtils.js.map +1 -0
- package/esm/domain/session/oldCookiesMigration.d.ts +11 -0
- package/esm/domain/session/oldCookiesMigration.js +36 -0
- package/esm/domain/session/oldCookiesMigration.js.map +1 -0
- package/esm/domain/session/sessionConstants.d.ts +15 -0
- package/esm/domain/session/sessionConstants.js +13 -0
- package/esm/domain/session/sessionConstants.js.map +1 -0
- package/esm/domain/session/sessionManager.d.ts +28 -0
- package/esm/domain/session/sessionManager.js +180 -0
- package/esm/domain/session/sessionManager.js.map +1 -0
- package/esm/domain/session/sessionState.d.ts +16 -0
- package/esm/domain/session/sessionState.js +66 -0
- package/esm/domain/session/sessionState.js.map +1 -0
- package/esm/domain/session/sessionStateValidation.d.ts +3 -0
- package/esm/domain/session/sessionStateValidation.js +7 -0
- package/esm/domain/session/sessionStateValidation.js.map +1 -0
- package/esm/domain/session/sessionStore.d.ts +38 -0
- package/esm/domain/session/sessionStore.js +175 -0
- package/esm/domain/session/sessionStore.js.map +1 -0
- package/esm/domain/session/sessionStoreOperations.d.ts +12 -0
- package/esm/domain/session/sessionStoreOperations.js +114 -0
- package/esm/domain/session/sessionStoreOperations.js.map +1 -0
- package/esm/domain/session/storeStrategies/sessionInCookie.d.ts +8 -0
- package/esm/domain/session/storeStrategies/sessionInCookie.js +50 -0
- package/esm/domain/session/storeStrategies/sessionInCookie.js.map +1 -0
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.d.ts +4 -0
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js +37 -0
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js.map +1 -0
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.d.ts +16 -0
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.js +2 -0
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.js.map +1 -0
- package/esm/domain/synthetics/syntheticsWorkerValues.d.ts +12 -0
- package/esm/domain/synthetics/syntheticsWorkerValues.js +24 -0
- package/esm/domain/synthetics/syntheticsWorkerValues.js.map +1 -0
- package/esm/domain/tags.d.ts +6 -0
- package/esm/domain/tags.js +60 -0
- package/esm/domain/tags.js.map +1 -0
- package/esm/domain/telemetry/index.d.ts +4 -0
- package/esm/domain/telemetry/index.js +3 -0
- package/esm/domain/telemetry/index.js.map +1 -0
- package/esm/domain/telemetry/rawTelemetryEvent.types.d.ts +18 -0
- package/esm/domain/telemetry/rawTelemetryEvent.types.js +6 -0
- package/esm/domain/telemetry/rawTelemetryEvent.types.js.map +1 -0
- package/esm/domain/telemetry/telemetry.d.ts +56 -0
- package/esm/domain/telemetry/telemetry.js +235 -0
- package/esm/domain/telemetry/telemetry.js.map +1 -0
- package/esm/domain/telemetry/telemetryEvent.types.d.ts +858 -0
- package/esm/domain/telemetry/telemetryEvent.types.js +6 -0
- package/esm/domain/telemetry/telemetryEvent.types.js.map +1 -0
- package/esm/domain/trackingConsent.d.ts +13 -0
- package/esm/domain/trackingConsent.js +24 -0
- package/esm/domain/trackingConsent.js.map +1 -0
- package/esm/index.d.ts +100 -0
- package/esm/index.js +76 -0
- package/esm/index.js.map +1 -0
- package/esm/tools/abstractHooks.d.ts +24 -0
- package/esm/tools/abstractHooks.js +37 -0
- package/esm/tools/abstractHooks.js.map +1 -0
- package/esm/tools/abstractLifeCycle.d.ts +23 -0
- package/esm/tools/abstractLifeCycle.js +24 -0
- package/esm/tools/abstractLifeCycle.js.map +1 -0
- package/esm/tools/boundedBuffer.d.ts +16 -0
- package/esm/tools/boundedBuffer.js +29 -0
- package/esm/tools/boundedBuffer.js.map +1 -0
- package/esm/tools/catchUserErrors.d.ts +1 -0
- package/esm/tools/catchUserErrors.js +12 -0
- package/esm/tools/catchUserErrors.js.map +1 -0
- package/esm/tools/display.d.ts +38 -0
- package/esm/tools/display.js +41 -0
- package/esm/tools/display.js.map +1 -0
- package/esm/tools/encoder.d.ts +54 -0
- package/esm/tools/encoder.js +37 -0
- package/esm/tools/encoder.js.map +1 -0
- package/esm/tools/experimentalFeatures.d.ts +20 -0
- package/esm/tools/experimentalFeatures.js +41 -0
- package/esm/tools/experimentalFeatures.js.map +1 -0
- package/esm/tools/getZoneJsOriginalValue.d.ts +19 -0
- package/esm/tools/getZoneJsOriginalValue.js +26 -0
- package/esm/tools/getZoneJsOriginalValue.js.map +1 -0
- package/esm/tools/globalObject.d.ts +19 -0
- package/esm/tools/globalObject.js +40 -0
- package/esm/tools/globalObject.js.map +1 -0
- package/esm/tools/instrumentMethod.d.ts +75 -0
- package/esm/tools/instrumentMethod.js +114 -0
- package/esm/tools/instrumentMethod.js.map +1 -0
- package/esm/tools/matchOption.d.ts +8 -0
- package/esm/tools/matchOption.js +31 -0
- package/esm/tools/matchOption.js.map +1 -0
- package/esm/tools/mergeInto.d.ts +25 -0
- package/esm/tools/mergeInto.js +93 -0
- package/esm/tools/mergeInto.js.map +1 -0
- package/esm/tools/monitor.d.ts +9 -0
- package/esm/tools/monitor.js +52 -0
- package/esm/tools/monitor.js.map +1 -0
- package/esm/tools/observable.d.ts +30 -0
- package/esm/tools/observable.js +83 -0
- package/esm/tools/observable.js.map +1 -0
- package/esm/tools/queueMicrotask.d.ts +1 -0
- package/esm/tools/queueMicrotask.js +14 -0
- package/esm/tools/queueMicrotask.js.map +1 -0
- package/esm/tools/readBytesFromStream.d.ts +11 -0
- package/esm/tools/readBytesFromStream.js +60 -0
- package/esm/tools/readBytesFromStream.js.map +1 -0
- package/esm/tools/requestIdleCallback.d.ts +12 -0
- package/esm/tools/requestIdleCallback.js +30 -0
- package/esm/tools/requestIdleCallback.js.map +1 -0
- package/esm/tools/sendToExtension.d.ts +3 -0
- package/esm/tools/sendToExtension.js +8 -0
- package/esm/tools/sendToExtension.js.map +1 -0
- package/esm/tools/serialisation/context.d.ts +9 -0
- package/esm/tools/serialisation/context.js +2 -0
- package/esm/tools/serialisation/context.js.map +1 -0
- package/esm/tools/serialisation/jsonStringify.d.ts +13 -0
- package/esm/tools/serialisation/jsonStringify.js +44 -0
- package/esm/tools/serialisation/jsonStringify.js.map +1 -0
- package/esm/tools/serialisation/sanitize.d.ts +18 -0
- package/esm/tools/serialisation/sanitize.js +185 -0
- package/esm/tools/serialisation/sanitize.js.map +1 -0
- package/esm/tools/stackTrace/computeStackTrace.d.ts +25 -0
- package/esm/tools/stackTrace/computeStackTrace.js +183 -0
- package/esm/tools/stackTrace/computeStackTrace.js.map +1 -0
- package/esm/tools/stackTrace/handlingStack.d.ts +10 -0
- package/esm/tools/stackTrace/handlingStack.js +41 -0
- package/esm/tools/stackTrace/handlingStack.js.map +1 -0
- package/esm/tools/taskQueue.d.ts +15 -0
- package/esm/tools/taskQueue.js +50 -0
- package/esm/tools/taskQueue.js.map +1 -0
- package/esm/tools/timer.d.ts +5 -0
- package/esm/tools/timer.js +16 -0
- package/esm/tools/timer.js.map +1 -0
- package/esm/tools/utils/arrayUtils.d.ts +3 -0
- package/esm/tools/utils/arrayUtils.js +15 -0
- package/esm/tools/utils/arrayUtils.js.map +1 -0
- package/esm/tools/utils/browserDetection.d.ts +8 -0
- package/esm/tools/utils/browserDetection.js +28 -0
- package/esm/tools/utils/browserDetection.js.map +1 -0
- package/esm/tools/utils/byteUtils.d.ts +8 -0
- package/esm/tools/utils/byteUtils.js +25 -0
- package/esm/tools/utils/byteUtils.js.map +1 -0
- package/esm/tools/utils/functionUtils.d.ts +8 -0
- package/esm/tools/utils/functionUtils.js +39 -0
- package/esm/tools/utils/functionUtils.js.map +1 -0
- package/esm/tools/utils/numberUtils.d.ts +9 -0
- package/esm/tools/utils/numberUtils.js +18 -0
- package/esm/tools/utils/numberUtils.js.map +1 -0
- package/esm/tools/utils/objectUtils.d.ts +10 -0
- package/esm/tools/utils/objectUtils.js +17 -0
- package/esm/tools/utils/objectUtils.js.map +1 -0
- package/esm/tools/utils/polyfills.d.ts +7 -0
- package/esm/tools/utils/polyfills.js +18 -0
- package/esm/tools/utils/polyfills.js.map +1 -0
- package/esm/tools/utils/responseUtils.d.ts +2 -0
- package/esm/tools/utils/responseUtils.js +13 -0
- package/esm/tools/utils/responseUtils.js.map +1 -0
- package/esm/tools/utils/stringUtils.d.ts +8 -0
- package/esm/tools/utils/stringUtils.js +49 -0
- package/esm/tools/utils/stringUtils.js.map +1 -0
- package/esm/tools/utils/timeUtils.d.ts +53 -0
- package/esm/tools/utils/timeUtils.js +84 -0
- package/esm/tools/utils/timeUtils.js.map +1 -0
- package/esm/tools/utils/timezone.d.ts +1 -0
- package/esm/tools/utils/timezone.js +10 -0
- package/esm/tools/utils/timezone.js.map +1 -0
- package/esm/tools/utils/typeUtils.d.ts +4 -0
- package/esm/tools/utils/typeUtils.js +13 -0
- package/esm/tools/utils/typeUtils.js.map +1 -0
- package/esm/tools/utils/urlPolyfill.d.ts +5 -0
- package/esm/tools/utils/urlPolyfill.js +52 -0
- package/esm/tools/utils/urlPolyfill.js.map +1 -0
- package/esm/tools/valueHistory.d.ts +27 -0
- package/esm/tools/valueHistory.js +100 -0
- package/esm/tools/valueHistory.js.map +1 -0
- package/esm/transport/batch.d.ts +16 -0
- package/esm/transport/batch.js +105 -0
- package/esm/transport/batch.js.map +1 -0
- package/esm/transport/eventBridge.d.ts +21 -0
- package/esm/transport/eventBridge.js +41 -0
- package/esm/transport/eventBridge.js.map +1 -0
- package/esm/transport/flushController.d.ts +58 -0
- package/esm/transport/flushController.js +106 -0
- package/esm/transport/flushController.js.map +1 -0
- package/esm/transport/httpRequest.d.ts +51 -0
- package/esm/transport/httpRequest.js +75 -0
- package/esm/transport/httpRequest.js.map +1 -0
- package/esm/transport/index.d.ts +7 -0
- package/esm/transport/index.js +5 -0
- package/esm/transport/index.js.map +1 -0
- package/esm/transport/sendWithRetryStrategy.d.ts +41 -0
- package/esm/transport/sendWithRetryStrategy.js +158 -0
- package/esm/transport/sendWithRetryStrategy.js.map +1 -0
- package/package.json +31 -0
- package/src/boot/displayAlreadyInitializedError.ts +8 -0
- package/src/boot/init.ts +55 -0
- package/src/browser/addEventListener.ts +145 -0
- package/src/browser/browser.types.ts +82 -0
- package/src/browser/cookie.ts +107 -0
- package/src/browser/fetchObservable.ts +127 -0
- package/src/browser/pageMayExitObservable.ts +56 -0
- package/src/browser/runOnReadyState.ts +25 -0
- package/src/browser/xhrObservable.ts +130 -0
- package/src/domain/allowedTrackingOrigins.ts +30 -0
- package/src/domain/bufferedData.ts +32 -0
- package/src/domain/configuration/configuration.ts +472 -0
- package/src/domain/configuration/endpointBuilder.ts +119 -0
- package/src/domain/configuration/index.ts +11 -0
- package/src/domain/configuration/transportConfiguration.ts +78 -0
- package/src/domain/connectivity/connectivity.ts +31 -0
- package/src/domain/connectivity/index.ts +1 -0
- package/src/domain/console/consoleObservable.ts +118 -0
- package/src/domain/context/contextConstants.ts +27 -0
- package/src/domain/context/contextManager.ts +85 -0
- package/src/domain/context/contextUtils.ts +14 -0
- package/src/domain/context/defineContextMethod.ts +31 -0
- package/src/domain/context/storeContextManager.ts +55 -0
- 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/deflate.types.ts +57 -0
- package/src/domain/deflate/index.ts +1 -0
- package/src/domain/error/error.ts +103 -0
- package/src/domain/error/error.types.ts +64 -0
- package/src/domain/error/trackRuntimeError.ts +50 -0
- package/src/domain/eventRateLimiter/createEventRateLimiter.ts +46 -0
- package/src/domain/extension/extensionUtils.ts +28 -0
- package/src/domain/intakeSites.ts +17 -0
- package/src/domain/report/browser.types.ts +38 -0
- package/src/domain/report/reportObservable.ts +133 -0
- package/src/domain/resourceUtils.ts +21 -0
- package/src/domain/session/README.md +193 -0
- package/src/domain/session/oldCookiesMigration.ts +42 -0
- package/src/domain/session/sessionConstants.ts +19 -0
- package/src/domain/session/sessionManager.ts +244 -0
- package/src/domain/session/sessionState.ts +88 -0
- package/src/domain/session/sessionStateValidation.ts +9 -0
- package/src/domain/session/sessionStore.ts +244 -0
- package/src/domain/session/sessionStoreOperations.ts +131 -0
- package/src/domain/session/storeStrategies/sessionInCookie.ts +85 -0
- package/src/domain/session/storeStrategies/sessionInLocalStorage.ts +44 -0
- package/src/domain/session/storeStrategies/sessionStoreStrategy.ts +16 -0
- package/src/domain/synthetics/syntheticsWorkerValues.ts +38 -0
- package/src/domain/tags.ts +76 -0
- package/src/domain/telemetry/index.ts +22 -0
- package/src/domain/telemetry/rawTelemetryEvent.types.ts +22 -0
- package/src/domain/telemetry/telemetry.ts +345 -0
- package/src/domain/telemetry/telemetryEvent.types.ts +899 -0
- package/src/domain/trackingConsent.ts +34 -0
- package/src/index.ts +164 -0
- package/src/tools/abstractHooks.ts +72 -0
- package/src/tools/abstractLifeCycle.ts +46 -0
- package/src/tools/boundedBuffer.ts +45 -0
- package/src/tools/catchUserErrors.ts +11 -0
- package/src/tools/display.ts +56 -0
- package/src/tools/encoder.ts +103 -0
- package/src/tools/experimentalFeatures.ts +51 -0
- package/src/tools/getZoneJsOriginalValue.ts +38 -0
- package/src/tools/globalObject.ts +51 -0
- package/src/tools/instrumentMethod.ts +170 -0
- package/src/tools/matchOption.ts +31 -0
- package/src/tools/mergeInto.ts +177 -0
- package/src/tools/monitor.ts +72 -0
- package/src/tools/observable.ts +104 -0
- package/src/tools/queueMicrotask.ts +13 -0
- package/src/tools/readBytesFromStream.ts +77 -0
- package/src/tools/requestIdleCallback.ts +40 -0
- package/src/tools/sendToExtension.ts +14 -0
- package/src/tools/serialisation/context.ts +11 -0
- package/src/tools/serialisation/jsonStringify.ts +53 -0
- package/src/tools/serialisation/sanitize.ts +273 -0
- package/src/tools/stackTrace/computeStackTrace.ts +250 -0
- package/src/tools/stackTrace/handlingStack.ts +48 -0
- package/src/tools/taskQueue.ts +63 -0
- package/src/tools/timer.ts +21 -0
- package/src/tools/utils/arrayUtils.ts +15 -0
- package/src/tools/utils/browserDetection.ts +39 -0
- package/src/tools/utils/byteUtils.ts +35 -0
- package/src/tools/utils/functionUtils.ts +45 -0
- package/src/tools/utils/numberUtils.ts +20 -0
- package/src/tools/utils/objectUtils.ts +19 -0
- package/src/tools/utils/polyfills.ts +23 -0
- package/src/tools/utils/responseUtils.ts +12 -0
- package/src/tools/utils/stringUtils.ts +52 -0
- package/src/tools/utils/timeUtils.ts +117 -0
- package/src/tools/utils/timezone.ts +9 -0
- package/src/tools/utils/typeUtils.ts +12 -0
- package/src/tools/utils/urlPolyfill.ts +56 -0
- package/src/tools/valueHistory.ts +151 -0
- package/src/transport/batch.ts +144 -0
- package/src/transport/eventBridge.ts +61 -0
- package/src/transport/flushController.ts +144 -0
- package/src/transport/httpRequest.ts +164 -0
- package/src/transport/index.ts +7 -0
- package/src/transport/sendWithRetryStrategy.ts +222 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storeContextManager.js","sourceRoot":"","sources":["../../../src/domain/context/storeContextManager.ts"],"names":[],"mappings":";;AAYA,kDAkCC;AAED,0CAEC;AAED,wDAEC;AAtDD,qEAA4E;AAG5E,qDAA+C;AAC/C,+DAA6D;AAI7D,MAAM,wBAAwB,GAAG,OAAO,CAAA;AAExC,MAAM,gBAAgB,GAAgC,EAAE,CAAA;AAExD,SAAgB,mBAAmB,CACjC,aAA4B,EAC5B,cAA8B,EAC9B,UAAkB,EAClB,gBAAkC;IAElC,MAAM,UAAU,GAAG,eAAe,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAA;IAEhE,gBAAgB,CAAC,IAAI,CACnB,IAAA,mCAAgB,EAAC,aAAa,EAAE,MAAM,qCAAqB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;QACrE,IAAI,UAAU,KAAK,GAAG,EAAE,CAAC;YACvB,sBAAsB,EAAE,CAAA;QAC1B,CAAC;IACH,CAAC,CAAC,CACH,CAAA;IACD,cAAc,CAAC,gBAAgB,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;IAExD,MAAM,kBAAkB,GAAG,IAAA,mBAAO,EAAC,cAAc,EAAE,EAAE,cAAc,CAAC,UAAU,EAAE,CAAC,CAAA;IACjF,IAAI,CAAC,IAAA,2BAAa,EAAC,kBAAkB,CAAC,EAAE,CAAC;QACvC,cAAc,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAA;IAC/C,CAAC;IAED,SAAS,sBAAsB;QAC7B,cAAc,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC,CAAA;IAC7C,CAAC;IAED,SAAS,aAAa;QACpB,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC,CAAC,CAAA;IAC/E,CAAC;IAED,SAAS,cAAc;QACrB,MAAM,UAAU,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;QACnD,OAAO,UAAU,CAAC,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,UAAU,CAAa,CAAC,CAAC,CAAC,EAAE,CAAA;IAC9D,CAAC;AACH,CAAC;AAED,SAAgB,eAAe,CAAC,UAAkB,EAAE,gBAAkC;IACpF,OAAO,GAAG,wBAAwB,IAAI,UAAU,IAAI,gBAAgB,EAAE,CAAA;AACxE,CAAC;AAED,SAAgB,sBAAsB;IACpC,gBAAgB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAA;AACrD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Configuration } from '../configuration';
|
|
2
|
+
import type { AbstractHooks } from '../../tools/abstractHooks';
|
|
3
|
+
/**
|
|
4
|
+
* Account information for the browser SDK.
|
|
5
|
+
*/
|
|
6
|
+
export interface Account {
|
|
7
|
+
id: string;
|
|
8
|
+
name?: string | undefined;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export declare function startAccountContext(hooks: AbstractHooks, configuration: Configuration, productKey: string): {
|
|
12
|
+
getContext: () => import("../..").Context;
|
|
13
|
+
setContext: (newContext: unknown) => void;
|
|
14
|
+
setContextProperty: (key: string, property: any) => void;
|
|
15
|
+
removeContextProperty: (key: string) => void;
|
|
16
|
+
clearContext: () => void;
|
|
17
|
+
changeObservable: import("../..").Observable<void>;
|
|
18
|
+
};
|
|
19
|
+
export declare function buildAccountContextManager(): {
|
|
20
|
+
getContext: () => import("../..").Context;
|
|
21
|
+
setContext: (newContext: unknown) => void;
|
|
22
|
+
setContextProperty: (key: string, property: any) => void;
|
|
23
|
+
removeContextProperty: (key: string) => void;
|
|
24
|
+
clearContext: () => void;
|
|
25
|
+
changeObservable: import("../..").Observable<void>;
|
|
26
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startAccountContext = startAccountContext;
|
|
4
|
+
exports.buildAccountContextManager = buildAccountContextManager;
|
|
5
|
+
const storeContextManager_1 = require("../context/storeContextManager");
|
|
6
|
+
const abstractHooks_1 = require("../../tools/abstractHooks");
|
|
7
|
+
const objectUtils_1 = require("../../tools/utils/objectUtils");
|
|
8
|
+
const contextManager_1 = require("../context/contextManager");
|
|
9
|
+
function startAccountContext(hooks, configuration, productKey) {
|
|
10
|
+
const accountContextManager = buildAccountContextManager();
|
|
11
|
+
if (configuration.storeContextsAcrossPages) {
|
|
12
|
+
(0, storeContextManager_1.storeContextManager)(configuration, accountContextManager, productKey, 4 /* CustomerDataType.Account */);
|
|
13
|
+
}
|
|
14
|
+
hooks.register(0 /* HookNames.Assemble */, () => {
|
|
15
|
+
const account = accountContextManager.getContext();
|
|
16
|
+
if ((0, objectUtils_1.isEmptyObject)(account) || !account.id) {
|
|
17
|
+
return abstractHooks_1.SKIPPED;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
account,
|
|
21
|
+
};
|
|
22
|
+
});
|
|
23
|
+
return accountContextManager;
|
|
24
|
+
}
|
|
25
|
+
function buildAccountContextManager() {
|
|
26
|
+
return (0, contextManager_1.createContextManager)('account', {
|
|
27
|
+
propertiesConfig: {
|
|
28
|
+
id: { type: 'string', required: true },
|
|
29
|
+
name: { type: 'string' },
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=accountContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accountContext.js","sourceRoot":"","sources":["../../../src/domain/contexts/accountContext.ts"],"names":[],"mappings":";;AAiBA,kDAoBC;AAED,gEAOC;AA5CD,wEAAoE;AACpE,6DAA8D;AAE9D,+DAA6D;AAC7D,8DAAgE;AAWhE,SAAgB,mBAAmB,CAAC,KAAoB,EAAE,aAA4B,EAAE,UAAkB;IACxG,MAAM,qBAAqB,GAAG,0BAA0B,EAAE,CAAA;IAE1D,IAAI,aAAa,CAAC,wBAAwB,EAAE,CAAC;QAC3C,IAAA,yCAAmB,EAAC,aAAa,EAAE,qBAAqB,EAAE,UAAU,mCAA2B,CAAA;IACjG,CAAC;IAED,KAAK,CAAC,QAAQ,6BAAqB,GAAG,EAAE;QACtC,MAAM,OAAO,GAAG,qBAAqB,CAAC,UAAU,EAAa,CAAA;QAE7D,IAAI,IAAA,2BAAa,EAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;YAC1C,OAAO,uBAAO,CAAA;QAChB,CAAC;QAED,OAAO;YACL,OAAO;SACR,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,OAAO,qBAAqB,CAAA;AAC9B,CAAC;AAED,SAAgB,0BAA0B;IACxC,OAAO,IAAA,qCAAoB,EAAC,SAAS,EAAE;QACrC,gBAAgB,EAAE;YAChB,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;YACtC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SACzB;KACF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AbstractHooks } from '../../tools/abstractHooks';
|
|
2
|
+
import type { Configuration } from '../configuration';
|
|
3
|
+
export declare function startGlobalContext(hooks: AbstractHooks, configuration: Configuration, productKey: string, useContextNamespace: boolean): {
|
|
4
|
+
getContext: () => import("../..").Context;
|
|
5
|
+
setContext: (newContext: unknown) => void;
|
|
6
|
+
setContextProperty: (key: string, property: any) => void;
|
|
7
|
+
removeContextProperty: (key: string) => void;
|
|
8
|
+
clearContext: () => void;
|
|
9
|
+
changeObservable: import("../..").Observable<void>;
|
|
10
|
+
};
|
|
11
|
+
export declare function buildGlobalContextManager(): {
|
|
12
|
+
getContext: () => import("../..").Context;
|
|
13
|
+
setContext: (newContext: unknown) => void;
|
|
14
|
+
setContextProperty: (key: string, property: any) => void;
|
|
15
|
+
removeContextProperty: (key: string) => void;
|
|
16
|
+
clearContext: () => void;
|
|
17
|
+
changeObservable: import("../..").Observable<void>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startGlobalContext = startGlobalContext;
|
|
4
|
+
exports.buildGlobalContextManager = buildGlobalContextManager;
|
|
5
|
+
const storeContextManager_1 = require("../context/storeContextManager");
|
|
6
|
+
const contextManager_1 = require("../context/contextManager");
|
|
7
|
+
function startGlobalContext(hooks, configuration, productKey, useContextNamespace) {
|
|
8
|
+
const globalContextManager = buildGlobalContextManager();
|
|
9
|
+
if (configuration.storeContextsAcrossPages) {
|
|
10
|
+
(0, storeContextManager_1.storeContextManager)(configuration, globalContextManager, productKey, 2 /* CustomerDataType.GlobalContext */);
|
|
11
|
+
}
|
|
12
|
+
hooks.register(0 /* HookNames.Assemble */, () => {
|
|
13
|
+
const context = globalContextManager.getContext();
|
|
14
|
+
return useContextNamespace ? { context } : context;
|
|
15
|
+
});
|
|
16
|
+
return globalContextManager;
|
|
17
|
+
}
|
|
18
|
+
function buildGlobalContextManager() {
|
|
19
|
+
return (0, contextManager_1.createContextManager)('global context');
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=globalContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalContext.js","sourceRoot":"","sources":["../../../src/domain/contexts/globalContext.ts"],"names":[],"mappings":";;AAOA,gDAkBC;AAED,8DAEC;AA3BD,wEAAoE;AAEpE,8DAAgE;AAGhE,SAAgB,kBAAkB,CAChC,KAAoB,EACpB,aAA4B,EAC5B,UAAkB,EAClB,mBAA4B;IAE5B,MAAM,oBAAoB,GAAG,yBAAyB,EAAE,CAAA;IAExD,IAAI,aAAa,CAAC,wBAAwB,EAAE,CAAC;QAC3C,IAAA,yCAAmB,EAAC,aAAa,EAAE,oBAAoB,EAAE,UAAU,yCAAiC,CAAA;IACtG,CAAC;IAED,KAAK,CAAC,QAAQ,6BAAqB,GAAG,EAAE;QACtC,MAAM,OAAO,GAAG,oBAAoB,CAAC,UAAU,EAAE,CAAA;QACjD,OAAO,mBAAmB,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAA;IACpD,CAAC,CAAC,CAAA;IAEF,OAAO,oBAAoB,CAAA;AAC7B,CAAC;AAED,SAAgB,yBAAyB;IACvC,OAAO,IAAA,qCAAoB,EAAC,gBAAgB,CAAC,CAAA;AAC/C,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Context } from '../../tools/serialisation/context';
|
|
2
|
+
export interface RumInternalContext extends Context {
|
|
3
|
+
application_id: string;
|
|
4
|
+
session_id: string | undefined;
|
|
5
|
+
view?: {
|
|
6
|
+
id: string;
|
|
7
|
+
url: string;
|
|
8
|
+
referrer: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
};
|
|
11
|
+
user_action?: {
|
|
12
|
+
id: string | string[];
|
|
13
|
+
};
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rumInternalContext.type.js","sourceRoot":"","sources":["../../../src/domain/contexts/rumInternalContext.type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AbstractHooks } from '../../tools/abstractHooks';
|
|
2
|
+
import type { Configuration } from '../configuration';
|
|
3
|
+
import type { RelativeTime } from '../../tools/utils/timeUtils';
|
|
4
|
+
export interface User {
|
|
5
|
+
id?: string | undefined;
|
|
6
|
+
email?: string | undefined;
|
|
7
|
+
name?: string | undefined;
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
export declare function startUserContext(hooks: AbstractHooks, configuration: Configuration, sessionManager: {
|
|
11
|
+
findTrackedSession: (startTime?: RelativeTime) => {
|
|
12
|
+
anonymousId?: string;
|
|
13
|
+
} | undefined;
|
|
14
|
+
}, productKey: string): {
|
|
15
|
+
getContext: () => import("../..").Context;
|
|
16
|
+
setContext: (newContext: unknown) => void;
|
|
17
|
+
setContextProperty: (key: string, property: any) => void;
|
|
18
|
+
removeContextProperty: (key: string) => void;
|
|
19
|
+
clearContext: () => void;
|
|
20
|
+
changeObservable: import("../..").Observable<void>;
|
|
21
|
+
};
|
|
22
|
+
export declare function buildUserContextManager(): {
|
|
23
|
+
getContext: () => import("../..").Context;
|
|
24
|
+
setContext: (newContext: unknown) => void;
|
|
25
|
+
setContextProperty: (key: string, property: any) => void;
|
|
26
|
+
removeContextProperty: (key: string) => void;
|
|
27
|
+
clearContext: () => void;
|
|
28
|
+
changeObservable: import("../..").Observable<void>;
|
|
29
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startUserContext = startUserContext;
|
|
4
|
+
exports.buildUserContextManager = buildUserContextManager;
|
|
5
|
+
const storeContextManager_1 = require("../context/storeContextManager");
|
|
6
|
+
const abstractHooks_1 = require("../../tools/abstractHooks");
|
|
7
|
+
const contextManager_1 = require("../context/contextManager");
|
|
8
|
+
const objectUtils_1 = require("../../tools/utils/objectUtils");
|
|
9
|
+
function startUserContext(hooks, configuration, sessionManager, productKey) {
|
|
10
|
+
const userContextManager = buildUserContextManager();
|
|
11
|
+
if (configuration.storeContextsAcrossPages) {
|
|
12
|
+
(0, storeContextManager_1.storeContextManager)(configuration, userContextManager, productKey, 1 /* CustomerDataType.User */);
|
|
13
|
+
}
|
|
14
|
+
hooks.register(0 /* HookNames.Assemble */, ({ eventType, startTime }) => {
|
|
15
|
+
const user = userContextManager.getContext();
|
|
16
|
+
const session = sessionManager.findTrackedSession(startTime);
|
|
17
|
+
if (session && session.anonymousId && !user.anonymous_id && !!configuration.trackAnonymousUser) {
|
|
18
|
+
user.anonymous_id = session.anonymousId;
|
|
19
|
+
}
|
|
20
|
+
if ((0, objectUtils_1.isEmptyObject)(user)) {
|
|
21
|
+
return abstractHooks_1.SKIPPED;
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
type: eventType,
|
|
25
|
+
usr: user,
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
hooks.register(1 /* HookNames.AssembleTelemetry */, ({ startTime }) => {
|
|
29
|
+
var _a;
|
|
30
|
+
return ({
|
|
31
|
+
anonymous_id: (_a = sessionManager.findTrackedSession(startTime)) === null || _a === void 0 ? void 0 : _a.anonymousId,
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
return userContextManager;
|
|
35
|
+
}
|
|
36
|
+
function buildUserContextManager() {
|
|
37
|
+
return (0, contextManager_1.createContextManager)('user', {
|
|
38
|
+
propertiesConfig: {
|
|
39
|
+
id: { type: 'string' },
|
|
40
|
+
name: { type: 'string' },
|
|
41
|
+
email: { type: 'string' },
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=userContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"userContext.js","sourceRoot":"","sources":["../../../src/domain/contexts/userContext.ts"],"names":[],"mappings":";;AAgBA,4CAqCC;AAED,0DAQC;AA7DD,wEAAoE;AACpE,6DAA8D;AAC9D,8DAAgE;AAEhE,+DAA6D;AAU7D,SAAgB,gBAAgB,CAC9B,KAAoB,EACpB,aAA4B,EAC5B,cAEC,EACD,UAAkB;IAElB,MAAM,kBAAkB,GAAG,uBAAuB,EAAE,CAAA;IAEpD,IAAI,aAAa,CAAC,wBAAwB,EAAE,CAAC;QAC3C,IAAA,yCAAmB,EAAC,aAAa,EAAE,kBAAkB,EAAE,UAAU,gCAAwB,CAAA;IAC3F,CAAC;IAED,KAAK,CAAC,QAAQ,6BAAqB,CAAC,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE;QAC9D,MAAM,IAAI,GAAG,kBAAkB,CAAC,UAAU,EAAE,CAAA;QAC5C,MAAM,OAAO,GAAG,cAAc,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAA;QAE5D,IAAI,OAAO,IAAI,OAAO,CAAC,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,IAAI,CAAC,CAAC,aAAa,CAAC,kBAAkB,EAAE,CAAC;YAC/F,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,WAAW,CAAA;QACzC,CAAC;QAED,IAAI,IAAA,2BAAa,EAAC,IAAI,CAAC,EAAE,CAAC;YACxB,OAAO,uBAAO,CAAA;QAChB,CAAC;QAED,OAAO;YACL,IAAI,EAAE,SAAS;YACf,GAAG,EAAE,IAAI;SACV,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,KAAK,CAAC,QAAQ,sCAA8B,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE;;QAAC,OAAA,CAAC;YAC9D,YAAY,EAAE,MAAA,cAAc,CAAC,kBAAkB,CAAC,SAAS,CAAC,0CAAE,WAAW;SACxE,CAAC,CAAA;KAAA,CAAC,CAAA;IAEH,OAAO,kBAAkB,CAAA;AAC3B,CAAC;AAED,SAAgB,uBAAuB;IACrC,OAAO,IAAA,qCAAoB,EAAC,MAAM,EAAE;QAClC,gBAAgB,EAAE;YAChB,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACxB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;SAC1B;KACF,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Encoder } from '../../tools/encoder';
|
|
2
|
+
import type { Uint8ArrayBuffer } from '../../tools/utils/byteUtils';
|
|
3
|
+
export type DeflateWorkerAction = {
|
|
4
|
+
action: 'init';
|
|
5
|
+
} | {
|
|
6
|
+
action: 'write';
|
|
7
|
+
id: number;
|
|
8
|
+
streamId: number;
|
|
9
|
+
data: string;
|
|
10
|
+
} | {
|
|
11
|
+
action: 'reset';
|
|
12
|
+
streamId: number;
|
|
13
|
+
};
|
|
14
|
+
export type DeflateWorkerResponse = {
|
|
15
|
+
type: 'initialized';
|
|
16
|
+
version: string;
|
|
17
|
+
} | {
|
|
18
|
+
type: 'wrote';
|
|
19
|
+
id: number;
|
|
20
|
+
streamId: number;
|
|
21
|
+
result: Uint8ArrayBuffer;
|
|
22
|
+
trailer: Uint8ArrayBuffer;
|
|
23
|
+
additionalBytesCount: number;
|
|
24
|
+
} | {
|
|
25
|
+
type: 'errored';
|
|
26
|
+
streamId?: number;
|
|
27
|
+
error: Error | string;
|
|
28
|
+
};
|
|
29
|
+
export interface DeflateWorker extends Worker {
|
|
30
|
+
postMessage(message: DeflateWorkerAction): void;
|
|
31
|
+
}
|
|
32
|
+
export type DeflateEncoder = Encoder<Uint8ArrayBuffer> & {
|
|
33
|
+
stop: () => void;
|
|
34
|
+
};
|
|
35
|
+
export declare const enum DeflateEncoderStreamId {
|
|
36
|
+
REPLAY = 1,
|
|
37
|
+
RUM = 2,
|
|
38
|
+
TELEMETRY = 4,
|
|
39
|
+
PROFILING = 6
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deflate.types.js","sourceRoot":"","sources":["../../../src/domain/deflate/deflate.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './deflate.types';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./deflate.types"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/domain/deflate/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ClocksState } from '../../tools/utils/timeUtils';
|
|
2
|
+
import type { Context } from '../../tools/serialisation/context';
|
|
3
|
+
import type { StackTrace } from '../../tools/stackTrace/computeStackTrace';
|
|
4
|
+
import type { ErrorSource, ErrorHandling, RawError, RawErrorCause, ErrorWithCause, NonErrorPrefix } from './error.types';
|
|
5
|
+
export declare const NO_ERROR_STACK_PRESENT_MESSAGE = "No stack, consider using an instance of Error";
|
|
6
|
+
interface RawErrorParams {
|
|
7
|
+
stackTrace?: StackTrace;
|
|
8
|
+
originalError: unknown;
|
|
9
|
+
handlingStack?: string;
|
|
10
|
+
componentStack?: string;
|
|
11
|
+
startClocks: ClocksState;
|
|
12
|
+
nonErrorPrefix: NonErrorPrefix;
|
|
13
|
+
useFallbackStack?: boolean;
|
|
14
|
+
source: ErrorSource;
|
|
15
|
+
handling: ErrorHandling;
|
|
16
|
+
}
|
|
17
|
+
export declare function computeRawError({ stackTrace, originalError, handlingStack, componentStack, startClocks, nonErrorPrefix, useFallbackStack, source, handling, }: RawErrorParams): RawError;
|
|
18
|
+
export declare function tryToGetFingerprint(originalError: unknown): string | undefined;
|
|
19
|
+
export declare function tryToGetErrorContext(originalError: unknown): Context | undefined;
|
|
20
|
+
export declare function getFileFromStackTraceString(stack: string): string | undefined;
|
|
21
|
+
export declare function isError(error: unknown): error is Error;
|
|
22
|
+
export declare function flattenErrorCauses(error: ErrorWithCause, parentSource: ErrorSource): RawErrorCause[] | undefined;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NO_ERROR_STACK_PRESENT_MESSAGE = void 0;
|
|
4
|
+
exports.computeRawError = computeRawError;
|
|
5
|
+
exports.tryToGetFingerprint = tryToGetFingerprint;
|
|
6
|
+
exports.tryToGetErrorContext = tryToGetErrorContext;
|
|
7
|
+
exports.getFileFromStackTraceString = getFileFromStackTraceString;
|
|
8
|
+
exports.isError = isError;
|
|
9
|
+
exports.flattenErrorCauses = flattenErrorCauses;
|
|
10
|
+
const sanitize_1 = require("../../tools/serialisation/sanitize");
|
|
11
|
+
const jsonStringify_1 = require("../../tools/serialisation/jsonStringify");
|
|
12
|
+
const computeStackTrace_1 = require("../../tools/stackTrace/computeStackTrace");
|
|
13
|
+
const handlingStack_1 = require("../../tools/stackTrace/handlingStack");
|
|
14
|
+
exports.NO_ERROR_STACK_PRESENT_MESSAGE = 'No stack, consider using an instance of Error';
|
|
15
|
+
function computeRawError({ stackTrace, originalError, handlingStack, componentStack, startClocks, nonErrorPrefix, useFallbackStack = true, source, handling, }) {
|
|
16
|
+
const isErrorInstance = isError(originalError);
|
|
17
|
+
if (!stackTrace && isErrorInstance) {
|
|
18
|
+
stackTrace = (0, computeStackTrace_1.computeStackTrace)(originalError);
|
|
19
|
+
}
|
|
20
|
+
return {
|
|
21
|
+
startClocks,
|
|
22
|
+
source,
|
|
23
|
+
handling,
|
|
24
|
+
handlingStack,
|
|
25
|
+
componentStack,
|
|
26
|
+
originalError,
|
|
27
|
+
type: stackTrace ? stackTrace.name : undefined,
|
|
28
|
+
message: computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError),
|
|
29
|
+
stack: stackTrace ? (0, handlingStack_1.toStackTraceString)(stackTrace) : useFallbackStack ? exports.NO_ERROR_STACK_PRESENT_MESSAGE : undefined,
|
|
30
|
+
causes: isErrorInstance ? flattenErrorCauses(originalError, source) : undefined,
|
|
31
|
+
fingerprint: tryToGetFingerprint(originalError),
|
|
32
|
+
context: tryToGetErrorContext(originalError),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError) {
|
|
36
|
+
// Favor stackTrace message only if tracekit has really been able to extract something meaningful (message + name)
|
|
37
|
+
// TODO rework tracekit integration to avoid scattering error building logic
|
|
38
|
+
return (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.message) && (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name)
|
|
39
|
+
? stackTrace.message
|
|
40
|
+
: !isErrorInstance
|
|
41
|
+
? `${nonErrorPrefix} ${(0, jsonStringify_1.jsonStringify)((0, sanitize_1.sanitize)(originalError))}`
|
|
42
|
+
: 'Empty message';
|
|
43
|
+
}
|
|
44
|
+
function tryToGetFingerprint(originalError) {
|
|
45
|
+
return isError(originalError) && 'dd_fingerprint' in originalError ? String(originalError.dd_fingerprint) : undefined;
|
|
46
|
+
}
|
|
47
|
+
function tryToGetErrorContext(originalError) {
|
|
48
|
+
if (originalError !== null && typeof originalError === 'object' && 'dd_context' in originalError) {
|
|
49
|
+
return originalError.dd_context;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function getFileFromStackTraceString(stack) {
|
|
53
|
+
var _a;
|
|
54
|
+
return (_a = /@ (.+)/.exec(stack)) === null || _a === void 0 ? void 0 : _a[1];
|
|
55
|
+
}
|
|
56
|
+
function isError(error) {
|
|
57
|
+
return error instanceof Error || Object.prototype.toString.call(error) === '[object Error]';
|
|
58
|
+
}
|
|
59
|
+
function flattenErrorCauses(error, parentSource) {
|
|
60
|
+
let currentError = error;
|
|
61
|
+
const causes = [];
|
|
62
|
+
while (isError(currentError === null || currentError === void 0 ? void 0 : currentError.cause) && causes.length < 10) {
|
|
63
|
+
const stackTrace = (0, computeStackTrace_1.computeStackTrace)(currentError.cause);
|
|
64
|
+
causes.push({
|
|
65
|
+
message: currentError.cause.message,
|
|
66
|
+
source: parentSource,
|
|
67
|
+
type: stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name,
|
|
68
|
+
stack: stackTrace && (0, handlingStack_1.toStackTraceString)(stackTrace),
|
|
69
|
+
});
|
|
70
|
+
currentError = currentError.cause;
|
|
71
|
+
}
|
|
72
|
+
return causes.length ? causes : undefined;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../../src/domain/error/error.ts"],"names":[],"mappings":";;;AAuBA,0CA8BC;AAiBD,kDAEC;AAED,oDAIC;AAED,kEAEC;AAED,0BAEC;AAED,gDAcC;AAtGD,iEAA6D;AAG7D,2EAAuE;AAEvE,gFAA4E;AAC5E,wEAAyE;AAG5D,QAAA,8BAA8B,GAAG,+CAA+C,CAAA;AAc7F,SAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACX,cAAc,EACd,gBAAgB,GAAG,IAAI,EACvB,MAAM,EACN,QAAQ,GACO;IACf,MAAM,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;IAC9C,IAAI,CAAC,UAAU,IAAI,eAAe,EAAE,CAAC;QACnC,UAAU,GAAG,IAAA,qCAAiB,EAAC,aAAa,CAAC,CAAA;IAC/C,CAAC;IAED,OAAO;QACL,WAAW;QACX,MAAM;QACN,QAAQ;QACR,aAAa;QACb,cAAc;QACd,aAAa;QACb,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QAC9C,OAAO,EAAE,cAAc,CAAC,UAAU,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,CAAC;QACnF,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,IAAA,kCAAkB,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,sCAA8B,CAAC,CAAC,CAAC,SAAS;QAClH,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,kBAAkB,CAAC,aAA+B,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS;QACjG,WAAW,EAAE,mBAAmB,CAAC,aAAa,CAAC;QAC/C,OAAO,EAAE,oBAAoB,CAAC,aAAa,CAAC;KAC7C,CAAA;AACH,CAAC;AAED,SAAS,cAAc,CACrB,UAAkC,EAClC,eAAwB,EACxB,cAA8B,EAC9B,aAAsB;IAEtB,kHAAkH;IAClH,4EAA4E;IAC5E,OAAO,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,MAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAA;QAC5C,CAAC,CAAC,UAAU,CAAC,OAAO;QACpB,CAAC,CAAC,CAAC,eAAe;YAChB,CAAC,CAAC,GAAG,cAAc,IAAI,IAAA,6BAAa,EAAC,IAAA,mBAAQ,EAAC,aAAa,CAAC,CAAE,EAAE;YAChE,CAAC,CAAC,eAAe,CAAA;AACvB,CAAC;AAED,SAAgB,mBAAmB,CAAC,aAAsB;IACxD,OAAO,OAAO,CAAC,aAAa,CAAC,IAAI,gBAAgB,IAAI,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;AACvH,CAAC;AAED,SAAgB,oBAAoB,CAAC,aAAsB;IACzD,IAAI,aAAa,KAAK,IAAI,IAAI,OAAO,aAAa,KAAK,QAAQ,IAAI,YAAY,IAAI,aAAa,EAAE,CAAC;QACjG,OAAO,aAAa,CAAC,UAAqB,CAAA;IAC5C,CAAC;AACH,CAAC;AAED,SAAgB,2BAA2B,CAAC,KAAa;;IACvD,OAAO,MAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,0CAAG,CAAC,CAAC,CAAA;AAClC,CAAC;AAED,SAAgB,OAAO,CAAC,KAAc;IACpC,OAAO,KAAK,YAAY,KAAK,IAAI,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,gBAAgB,CAAA;AAC7F,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAqB,EAAE,YAAyB;IACjF,IAAI,YAAY,GAAG,KAAK,CAAA;IACxB,MAAM,MAAM,GAAoB,EAAE,CAAA;IAClC,OAAO,OAAO,CAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QAC1D,MAAM,UAAU,GAAG,IAAA,qCAAiB,EAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QACxD,MAAM,CAAC,IAAI,CAAC;YACV,OAAO,EAAE,YAAY,CAAC,KAAK,CAAC,OAAO;YACnC,MAAM,EAAE,YAAY;YACpB,IAAI,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI;YACtB,KAAK,EAAE,UAAU,IAAI,IAAA,kCAAkB,EAAC,UAAU,CAAC;SACpD,CAAC,CAAA;QACF,YAAY,GAAG,YAAY,CAAC,KAAK,CAAA;IACnC,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAA;AAC3C,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Context } from '../../tools/serialisation/context';
|
|
2
|
+
import type { ClocksState } from '../../tools/utils/timeUtils';
|
|
3
|
+
export interface ErrorWithCause extends Omit<Error, 'cause'> {
|
|
4
|
+
cause?: unknown;
|
|
5
|
+
}
|
|
6
|
+
export interface RawErrorCause {
|
|
7
|
+
message: string;
|
|
8
|
+
source: ErrorSource;
|
|
9
|
+
type?: string;
|
|
10
|
+
stack?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface Csp {
|
|
13
|
+
disposition: 'enforce' | 'report';
|
|
14
|
+
}
|
|
15
|
+
export interface RawError {
|
|
16
|
+
startClocks: ClocksState;
|
|
17
|
+
message: string;
|
|
18
|
+
type?: string;
|
|
19
|
+
stack?: string;
|
|
20
|
+
source: ErrorSource;
|
|
21
|
+
originalError?: unknown;
|
|
22
|
+
handling?: ErrorHandling;
|
|
23
|
+
handlingStack?: string;
|
|
24
|
+
componentStack?: string;
|
|
25
|
+
causes?: RawErrorCause[];
|
|
26
|
+
fingerprint?: string;
|
|
27
|
+
csp?: Csp;
|
|
28
|
+
context?: Context;
|
|
29
|
+
}
|
|
30
|
+
export declare const ErrorSource: {
|
|
31
|
+
readonly AGENT: "agent";
|
|
32
|
+
readonly CONSOLE: "console";
|
|
33
|
+
readonly CUSTOM: "custom";
|
|
34
|
+
readonly LOGGER: "logger";
|
|
35
|
+
readonly NETWORK: "network";
|
|
36
|
+
readonly SOURCE: "source";
|
|
37
|
+
readonly REPORT: "report";
|
|
38
|
+
};
|
|
39
|
+
export declare const enum NonErrorPrefix {
|
|
40
|
+
UNCAUGHT = "Uncaught",
|
|
41
|
+
PROVIDED = "Provided"
|
|
42
|
+
}
|
|
43
|
+
export declare const enum ErrorHandling {
|
|
44
|
+
HANDLED = "handled",
|
|
45
|
+
UNHANDLED = "unhandled"
|
|
46
|
+
}
|
|
47
|
+
export type ErrorSource = (typeof ErrorSource)[keyof typeof ErrorSource];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorSource = void 0;
|
|
4
|
+
exports.ErrorSource = {
|
|
5
|
+
AGENT: 'agent',
|
|
6
|
+
CONSOLE: 'console',
|
|
7
|
+
CUSTOM: 'custom',
|
|
8
|
+
LOGGER: 'logger',
|
|
9
|
+
NETWORK: 'network',
|
|
10
|
+
SOURCE: 'source',
|
|
11
|
+
REPORT: 'report',
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=error.types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.types.js","sourceRoot":"","sources":["../../../src/domain/error/error.types.ts"],"names":[],"mappings":";;;AA2Ca,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACR,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observable } from '../../tools/observable';
|
|
2
|
+
import type { StackTrace } from '../../tools/stackTrace/computeStackTrace';
|
|
3
|
+
import type { RawError } from './error.types';
|
|
4
|
+
export type UnhandledErrorCallback = (originalError: unknown, stackTrace?: StackTrace) => any;
|
|
5
|
+
export declare function trackRuntimeError(): Observable<RawError>;
|
|
6
|
+
export declare function instrumentOnError(callback: UnhandledErrorCallback): {
|
|
7
|
+
stop: typeof import("../..").noop;
|
|
8
|
+
};
|
|
9
|
+
export declare function instrumentUnhandledRejection(callback: UnhandledErrorCallback): {
|
|
10
|
+
stop: typeof import("../..").noop;
|
|
11
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.trackRuntimeError = trackRuntimeError;
|
|
4
|
+
exports.instrumentOnError = instrumentOnError;
|
|
5
|
+
exports.instrumentUnhandledRejection = instrumentUnhandledRejection;
|
|
6
|
+
const instrumentMethod_1 = require("../../tools/instrumentMethod");
|
|
7
|
+
const observable_1 = require("../../tools/observable");
|
|
8
|
+
const timeUtils_1 = require("../../tools/utils/timeUtils");
|
|
9
|
+
const computeStackTrace_1 = require("../../tools/stackTrace/computeStackTrace");
|
|
10
|
+
const globalObject_1 = require("../../tools/globalObject");
|
|
11
|
+
const error_1 = require("./error");
|
|
12
|
+
const error_types_1 = require("./error.types");
|
|
13
|
+
function trackRuntimeError() {
|
|
14
|
+
return new observable_1.Observable((observer) => {
|
|
15
|
+
const handleRuntimeError = (originalError, stackTrace) => {
|
|
16
|
+
const rawError = (0, error_1.computeRawError)({
|
|
17
|
+
stackTrace,
|
|
18
|
+
originalError,
|
|
19
|
+
startClocks: (0, timeUtils_1.clocksNow)(),
|
|
20
|
+
nonErrorPrefix: "Uncaught" /* NonErrorPrefix.UNCAUGHT */,
|
|
21
|
+
source: error_types_1.ErrorSource.SOURCE,
|
|
22
|
+
handling: "unhandled" /* ErrorHandling.UNHANDLED */,
|
|
23
|
+
});
|
|
24
|
+
observer.notify(rawError);
|
|
25
|
+
};
|
|
26
|
+
const { stop: stopInstrumentingOnError } = instrumentOnError(handleRuntimeError);
|
|
27
|
+
const { stop: stopInstrumentingOnUnhandledRejection } = instrumentUnhandledRejection(handleRuntimeError);
|
|
28
|
+
return () => {
|
|
29
|
+
stopInstrumentingOnError();
|
|
30
|
+
stopInstrumentingOnUnhandledRejection();
|
|
31
|
+
};
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function instrumentOnError(callback) {
|
|
35
|
+
return (0, instrumentMethod_1.instrumentMethod)((0, globalObject_1.getGlobalObject)(), 'onerror', ({ parameters: [messageObj, url, line, column, errorObj] }) => {
|
|
36
|
+
let stackTrace;
|
|
37
|
+
if (!(0, error_1.isError)(errorObj)) {
|
|
38
|
+
stackTrace = (0, computeStackTrace_1.computeStackTraceFromOnErrorMessage)(messageObj, url, line, column);
|
|
39
|
+
}
|
|
40
|
+
callback(errorObj !== null && errorObj !== void 0 ? errorObj : messageObj, stackTrace);
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function instrumentUnhandledRejection(callback) {
|
|
44
|
+
return (0, instrumentMethod_1.instrumentMethod)((0, globalObject_1.getGlobalObject)(), 'onunhandledrejection', ({ parameters: [e] }) => {
|
|
45
|
+
callback(e.reason || 'Empty reason');
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=trackRuntimeError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackRuntimeError.js","sourceRoot":"","sources":["../../../src/domain/error/trackRuntimeError.ts"],"names":[],"mappings":";;AAYA,8CAqBC;AAED,8CAQC;AAED,oEAIC;AAjDD,mEAA+D;AAC/D,uDAAmD;AACnD,2DAAuD;AAEvD,gFAA8F;AAC9F,2DAA0D;AAC1D,mCAAkD;AAElD,+CAA0E;AAI1E,SAAgB,iBAAiB;IAC/B,OAAO,IAAI,uBAAU,CAAW,CAAC,QAAQ,EAAE,EAAE;QAC3C,MAAM,kBAAkB,GAAG,CAAC,aAAsB,EAAE,UAAuB,EAAE,EAAE;YAC7E,MAAM,QAAQ,GAAG,IAAA,uBAAe,EAAC;gBAC/B,UAAU;gBACV,aAAa;gBACb,WAAW,EAAE,IAAA,qBAAS,GAAE;gBACxB,cAAc,0CAAyB;gBACvC,MAAM,EAAE,yBAAW,CAAC,MAAM;gBAC1B,QAAQ,2CAAyB;aAClC,CAAC,CAAA;YACF,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAA;QAC3B,CAAC,CAAA;QACD,MAAM,EAAE,IAAI,EAAE,wBAAwB,EAAE,GAAG,iBAAiB,CAAC,kBAAkB,CAAC,CAAA;QAChF,MAAM,EAAE,IAAI,EAAE,qCAAqC,EAAE,GAAG,4BAA4B,CAAC,kBAAkB,CAAC,CAAA;QAExG,OAAO,GAAG,EAAE;YACV,wBAAwB,EAAE,CAAA;YAC1B,qCAAqC,EAAE,CAAA;QACzC,CAAC,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAC,QAAgC;IAChE,OAAO,IAAA,mCAAgB,EAAC,IAAA,8BAAe,GAAE,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE;QAClH,IAAI,UAAU,CAAA;QACd,IAAI,CAAC,IAAA,eAAO,EAAC,QAAQ,CAAC,EAAE,CAAC;YACvB,UAAU,GAAG,IAAA,uDAAmC,EAAC,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;QACjF,CAAC;QACD,QAAQ,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,UAAU,EAAE,UAAU,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAgB,4BAA4B,CAAC,QAAgC;IAC3E,OAAO,IAAA,mCAAgB,EAAC,IAAA,8BAAe,GAAE,EAAE,sBAAsB,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE;QACzF,QAAQ,CAAC,CAAC,CAAC,MAAM,IAAI,cAAc,CAAC,CAAA;IACtC,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { RawError } from '../error/error.types';
|
|
2
|
+
export type EventRateLimiter = ReturnType<typeof createEventRateLimiter>;
|
|
3
|
+
export declare function createEventRateLimiter(eventType: string, limit: number, onLimitReached: (limitError: RawError) => void): {
|
|
4
|
+
isLimitReached(): boolean;
|
|
5
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createEventRateLimiter = createEventRateLimiter;
|
|
4
|
+
const timer_1 = require("../../tools/timer");
|
|
5
|
+
const timeUtils_1 = require("../../tools/utils/timeUtils");
|
|
6
|
+
const error_types_1 = require("../error/error.types");
|
|
7
|
+
function createEventRateLimiter(eventType, limit, onLimitReached) {
|
|
8
|
+
let eventCount = 0;
|
|
9
|
+
let allowNextEvent = false;
|
|
10
|
+
return {
|
|
11
|
+
isLimitReached() {
|
|
12
|
+
if (eventCount === 0) {
|
|
13
|
+
(0, timer_1.setTimeout)(() => {
|
|
14
|
+
eventCount = 0;
|
|
15
|
+
}, timeUtils_1.ONE_MINUTE);
|
|
16
|
+
}
|
|
17
|
+
eventCount += 1;
|
|
18
|
+
if (eventCount <= limit || allowNextEvent) {
|
|
19
|
+
allowNextEvent = false;
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
if (eventCount === limit + 1) {
|
|
23
|
+
allowNextEvent = true;
|
|
24
|
+
try {
|
|
25
|
+
onLimitReached({
|
|
26
|
+
message: `Reached max number of ${eventType}s by minute: ${limit}`,
|
|
27
|
+
source: error_types_1.ErrorSource.AGENT,
|
|
28
|
+
startClocks: (0, timeUtils_1.clocksNow)(),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
allowNextEvent = false;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return true;
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=createEventRateLimiter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createEventRateLimiter.js","sourceRoot":"","sources":["../../../src/domain/eventRateLimiter/createEventRateLimiter.ts"],"names":[],"mappings":";;AAOA,wDAsCC;AA7CD,6CAA8C;AAC9C,2DAAmE;AAEnE,sDAAkD;AAIlD,SAAgB,sBAAsB,CACpC,SAAiB,EACjB,KAAa,EACb,cAA8C;IAE9C,IAAI,UAAU,GAAG,CAAC,CAAA;IAClB,IAAI,cAAc,GAAG,KAAK,CAAA;IAE1B,OAAO;QACL,cAAc;YACZ,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;gBACrB,IAAA,kBAAU,EAAC,GAAG,EAAE;oBACd,UAAU,GAAG,CAAC,CAAA;gBAChB,CAAC,EAAE,sBAAU,CAAC,CAAA;YAChB,CAAC;YAED,UAAU,IAAI,CAAC,CAAA;YACf,IAAI,UAAU,IAAI,KAAK,IAAI,cAAc,EAAE,CAAC;gBAC1C,cAAc,GAAG,KAAK,CAAA;gBACtB,OAAO,KAAK,CAAA;YACd,CAAC;YAED,IAAI,UAAU,KAAK,KAAK,GAAG,CAAC,EAAE,CAAC;gBAC7B,cAAc,GAAG,IAAI,CAAA;gBACrB,IAAI,CAAC;oBACH,cAAc,CAAC;wBACb,OAAO,EAAE,yBAAyB,SAAS,gBAAgB,KAAK,EAAE;wBAClE,MAAM,EAAE,yBAAW,CAAC,KAAK;wBACzB,WAAW,EAAE,IAAA,qBAAS,GAAE;qBACzB,CAAC,CAAA;gBACJ,CAAC;wBAAS,CAAC;oBACT,cAAc,GAAG,KAAK,CAAA;gBACxB,CAAC;YACH,CAAC;YAED,OAAO,IAAI,CAAA;QACb,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const EXTENSION_PREFIXES: string[];
|
|
2
|
+
export declare function containsExtensionUrl(str: string): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Utility function to detect if the SDK is being initialized in an unsupported browser extension environment.
|
|
5
|
+
*
|
|
6
|
+
* @param windowLocation - The current window location to check
|
|
7
|
+
* @param stack - The error stack to check for extension URLs
|
|
8
|
+
* @returns true if running in an unsupported browser extension environment
|
|
9
|
+
*/
|
|
10
|
+
export declare function isUnsupportedExtensionEnvironment(windowLocation: string, stack?: string): boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXTENSION_PREFIXES = void 0;
|
|
4
|
+
exports.containsExtensionUrl = containsExtensionUrl;
|
|
5
|
+
exports.isUnsupportedExtensionEnvironment = isUnsupportedExtensionEnvironment;
|
|
6
|
+
exports.EXTENSION_PREFIXES = ['chrome-extension://', 'moz-extension://'];
|
|
7
|
+
function containsExtensionUrl(str) {
|
|
8
|
+
return exports.EXTENSION_PREFIXES.some((prefix) => str.includes(prefix));
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Utility function to detect if the SDK is being initialized in an unsupported browser extension environment.
|
|
12
|
+
*
|
|
13
|
+
* @param windowLocation - The current window location to check
|
|
14
|
+
* @param stack - The error stack to check for extension URLs
|
|
15
|
+
* @returns true if running in an unsupported browser extension environment
|
|
16
|
+
*/
|
|
17
|
+
function isUnsupportedExtensionEnvironment(windowLocation, stack = '') {
|
|
18
|
+
// If the page itself is an extension page.
|
|
19
|
+
if (containsExtensionUrl(windowLocation)) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
// Since we generate the error on the init, we check the 2nd frame line.
|
|
23
|
+
const frameLines = stack.split('\n').filter((line) => {
|
|
24
|
+
const trimmedLine = line.trim();
|
|
25
|
+
return trimmedLine.length && /^at\s+|@/.test(trimmedLine);
|
|
26
|
+
});
|
|
27
|
+
const target = frameLines[1] || '';
|
|
28
|
+
return containsExtensionUrl(target);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=extensionUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extensionUtils.js","sourceRoot":"","sources":["../../../src/domain/extension/extensionUtils.ts"],"names":[],"mappings":";;;AAEA,oDAEC;AASD,8EAcC;AA3BY,QAAA,kBAAkB,GAAG,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAA;AAE7E,SAAgB,oBAAoB,CAAC,GAAW;IAC9C,OAAO,0BAAkB,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAA;AAClE,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,iCAAiC,CAAC,cAAsB,EAAE,QAAgB,EAAE;IAC1F,2CAA2C;IAC3C,IAAI,oBAAoB,CAAC,cAAc,CAAC,EAAE,CAAC;QACzC,OAAO,KAAK,CAAA;IACd,CAAC;IAED,wEAAwE;IACxE,MAAM,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QACnD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;QAC/B,OAAO,WAAW,CAAC,MAAM,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;IAC3D,CAAC,CAAC,CAAA;IACF,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IAElC,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAA;AACrC,CAAC"}
|