@openobserve/browser-core 0.2.11 → 0.2.12-beta.13
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 +44 -35
- package/src/browser/{types.ts → browser.types.ts} +42 -0
- package/src/browser/cookie.ts +69 -15
- package/src/browser/fetchObservable.ts +97 -42
- package/src/browser/{pageExitObservable.ts → pageMayExitObservable.ts} +11 -24
- package/src/browser/runOnReadyState.ts +14 -4
- package/src/browser/xhrObservable.ts +45 -38
- package/src/domain/allowedTrackingOrigins.ts +30 -0
- package/src/domain/bufferedData.ts +32 -0
- package/src/domain/configuration/configuration.ts +366 -95
- package/src/domain/configuration/endpointBuilder.ts +48 -64
- package/src/domain/configuration/index.ts +6 -4
- package/src/domain/configuration/transportConfiguration.ts +42 -35
- package/src/domain/connectivity/connectivity.ts +31 -0
- package/src/domain/connectivity/index.ts +1 -0
- package/src/domain/console/consoleObservable.ts +59 -27
- 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/{types.ts → deflate.types.ts} +18 -2
- package/src/domain/deflate/index.ts +1 -1
- package/src/domain/error/error.ts +28 -84
- package/src/domain/error/error.types.ts +21 -4
- package/src/domain/error/trackRuntimeError.ts +37 -8
- 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/browser.types.ts +12 -0
- package/src/domain/report/reportObservable.ts +37 -30
- package/src/domain/resourceUtils.ts +20 -16
- package/src/domain/session/README.md +193 -0
- package/src/domain/session/oldCookiesMigration.ts +7 -7
- 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 +51 -32
- package/src/domain/session/storeStrategies/sessionInCookie.ts +113 -23
- package/src/domain/session/storeStrategies/sessionInLocalStorage.ts +11 -8
- package/src/domain/session/storeStrategies/sessionStoreStrategy.ts +6 -2
- package/src/domain/synthetics/syntheticsWorkerValues.ts +15 -4
- package/src/domain/tags.ts +76 -0
- package/src/domain/telemetry/index.ts +12 -4
- package/src/domain/telemetry/rawTelemetryEvent.types.ts +11 -3
- package/src/domain/telemetry/telemetry.ts +242 -98
- package/src/domain/telemetry/telemetryEvent.types.ts +530 -5
- package/src/domain/trackingConsent.ts +34 -0
- package/src/index.ts +92 -55
- 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 +18 -13
- package/src/tools/encoder.ts +103 -0
- package/src/tools/experimentalFeatures.ts +18 -9
- package/src/tools/getZoneJsOriginalValue.ts +1 -1
- package/src/tools/{getGlobalObject.ts → globalObject.ts} +20 -0
- package/src/tools/instrumentMethod.ts +127 -66
- package/src/tools/matchOption.ts +1 -2
- package/src/tools/mergeInto.ts +16 -16
- package/src/tools/monitor.ts +14 -10
- package/src/tools/observable.ts +79 -15
- 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/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 +1 -1
- package/src/tools/utils/arrayUtils.ts +11 -3
- package/src/tools/utils/browserDetection.ts +35 -3
- 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 -110
- package/src/tools/utils/responseUtils.ts +1 -1
- package/src/tools/utils/stringUtils.ts +62 -4
- 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 +113 -61
- package/src/transport/eventBridge.ts +24 -5
- package/src/transport/flushController.ts +44 -23
- package/src/transport/httpRequest.ts +99 -71
- package/src/transport/index.ts +7 -4
- package/src/transport/sendWithRetryStrategy.ts +60 -41
- 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 -76
- package/cjs/browser/addEventListener.js +0 -52
- package/cjs/browser/addEventListener.js.map +0 -1
- package/cjs/browser/cookie.d.ts +0 -10
- package/cjs/browser/cookie.js +0 -69
- package/cjs/browser/cookie.js.map +0 -1
- package/cjs/browser/fetchObservable.d.ts +0 -23
- package/cjs/browser/fetchObservable.js +0 -74
- package/cjs/browser/fetchObservable.js.map +0 -1
- package/cjs/browser/pageExitObservable.d.ts +0 -14
- package/cjs/browser/pageExitObservable.js +0 -58
- 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 -22
- package/cjs/browser/xhrObservable.js +0 -93
- package/cjs/browser/xhrObservable.js.map +0 -1
- package/cjs/domain/configuration/configuration.d.ts +0 -67
- package/cjs/domain/configuration/configuration.js +0 -95
- package/cjs/domain/configuration/configuration.js.map +0 -1
- package/cjs/domain/configuration/endpointBuilder.d.ts +0 -14
- package/cjs/domain/configuration/endpointBuilder.js +0 -94
- package/cjs/domain/configuration/endpointBuilder.js.map +0 -1
- package/cjs/domain/configuration/index.d.ts +0 -3
- package/cjs/domain/configuration/index.js +0 -25
- 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/console/consoleObservable.d.ts +0 -11
- package/cjs/domain/console/consoleObservable.js +0 -75
- package/cjs/domain/console/consoleObservable.js.map +0 -1
- package/cjs/domain/deflate/index.d.ts +0 -1
- package/cjs/domain/deflate/index.js +0 -18
- package/cjs/domain/deflate/index.js.map +0 -1
- package/cjs/domain/deflate/types.d.ts +0 -26
- package/cjs/domain/deflate/types.js +0 -3
- package/cjs/domain/deflate/types.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 -5
- package/cjs/domain/error/trackRuntimeError.js +0 -21
- 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 -24
- 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 -15
- 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 -15
- package/cjs/domain/session/sessionStoreOperations.js +0 -104
- 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 -48
- 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 -40
- package/cjs/domain/session/storeStrategies/sessionInLocalStorage.js.map +0 -1
- package/cjs/domain/session/storeStrategies/sessionStoreStrategy.d.ts +0 -14
- 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 -11
- 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 -112
- package/cjs/domain/telemetry/telemetry.js +0 -146
- package/cjs/domain/telemetry/telemetry.js.map +0 -1
- package/cjs/domain/telemetry/telemetryEvent.types.d.ts +0 -375
- package/cjs/domain/telemetry/telemetryEvent.types.js +0 -7
- package/cjs/domain/telemetry/telemetryEvent.types.js.map +0 -1
- package/cjs/domain/tracekit/computeStackTrace.d.ts +0 -5
- package/cjs/domain/tracekit/computeStackTrace.js +0 -118
- package/cjs/domain/tracekit/computeStackTrace.js.map +0 -1
- package/cjs/domain/tracekit/index.d.ts +0 -3
- package/cjs/domain/tracekit/index.js +0 -8
- package/cjs/domain/tracekit/index.js.map +0 -1
- package/cjs/domain/tracekit/tracekit.d.ts +0 -35
- package/cjs/domain/tracekit/tracekit.js +0 -95
- package/cjs/domain/tracekit/tracekit.js.map +0 -1
- package/cjs/domain/tracekit/types.d.ts +0 -44
- package/cjs/domain/tracekit/types.js +0 -3
- package/cjs/domain/tracekit/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/index.d.ts +0 -63
- package/cjs/index.js +0 -155
- package/cjs/index.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 -45
- package/cjs/tools/display.js.map +0 -1
- package/cjs/tools/experimentalFeatures.d.ts +0 -24
- package/cjs/tools/experimentalFeatures.js +0 -47
- 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 -19
- package/cjs/tools/instrumentMethod.js +0 -83
- 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 -9
- 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 -44
- 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/contextManager.d.ts +0 -21
- package/cjs/tools/serialisation/contextManager.js +0 -70
- package/cjs/tools/serialisation/contextManager.js.map +0 -1
- package/cjs/tools/serialisation/heavyCustomerDataWarning.d.ts +0 -8
- package/cjs/tools/serialisation/heavyCustomerDataWarning.js +0 -18
- package/cjs/tools/serialisation/heavyCustomerDataWarning.js.map +0 -1
- package/cjs/tools/serialisation/jsonStringify.d.ts +0 -14
- 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 -2
- package/cjs/tools/utils/browserDetection.js +0 -12
- 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 -7
- package/cjs/tools/utils/stringUtils.js +0 -32
- 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 -19
- package/cjs/transport/batch.js +0 -79
- 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 -48
- package/cjs/transport/flushController.js +0 -97
- package/cjs/transport/flushController.js.map +0 -1
- package/cjs/transport/httpRequest.d.ts +0 -37
- package/cjs/transport/httpRequest.js +0 -91
- 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 -15
- package/cjs/transport/startBatchWithReplica.js +0 -37
- 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 -76
- package/esm/browser/addEventListener.js +0 -47
- package/esm/browser/addEventListener.js.map +0 -1
- package/esm/browser/cookie.d.ts +0 -10
- package/esm/browser/cookie.js +0 -61
- package/esm/browser/cookie.js.map +0 -1
- package/esm/browser/fetchObservable.d.ts +0 -23
- package/esm/browser/fetchObservable.js +0 -70
- package/esm/browser/fetchObservable.js.map +0 -1
- package/esm/browser/pageExitObservable.d.ts +0 -14
- package/esm/browser/pageExitObservable.js +0 -53
- 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 -22
- package/esm/browser/xhrObservable.js +0 -89
- package/esm/browser/xhrObservable.js.map +0 -1
- package/esm/domain/configuration/configuration.d.ts +0 -67
- package/esm/domain/configuration/configuration.js +0 -90
- package/esm/domain/configuration/configuration.js.map +0 -1
- package/esm/domain/configuration/endpointBuilder.d.ts +0 -14
- package/esm/domain/configuration/endpointBuilder.js +0 -90
- package/esm/domain/configuration/endpointBuilder.js.map +0 -1
- package/esm/domain/configuration/index.d.ts +0 -3
- package/esm/domain/configuration/index.js +0 -4
- 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/console/consoleObservable.d.ts +0 -11
- package/esm/domain/console/consoleObservable.js +0 -70
- package/esm/domain/console/consoleObservable.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 -26
- package/esm/domain/deflate/types.js +0 -2
- package/esm/domain/deflate/types.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 -5
- package/esm/domain/error/trackRuntimeError.js +0 -17
- 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 -24
- 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 -15
- 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 -15
- package/esm/domain/session/sessionStoreOperations.js +0 -99
- 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 -42
- 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 -35
- package/esm/domain/session/storeStrategies/sessionInLocalStorage.js.map +0 -1
- package/esm/domain/session/storeStrategies/sessionStoreStrategy.d.ts +0 -14
- 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 -11
- 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 -112
- package/esm/domain/telemetry/telemetry.js +0 -134
- package/esm/domain/telemetry/telemetry.js.map +0 -1
- package/esm/domain/telemetry/telemetryEvent.types.d.ts +0 -375
- package/esm/domain/telemetry/telemetryEvent.types.js +0 -6
- package/esm/domain/telemetry/telemetryEvent.types.js.map +0 -1
- package/esm/domain/tracekit/computeStackTrace.d.ts +0 -5
- package/esm/domain/tracekit/computeStackTrace.js +0 -114
- package/esm/domain/tracekit/computeStackTrace.js.map +0 -1
- package/esm/domain/tracekit/index.d.ts +0 -3
- package/esm/domain/tracekit/index.js +0 -3
- package/esm/domain/tracekit/index.js.map +0 -1
- package/esm/domain/tracekit/tracekit.d.ts +0 -35
- package/esm/domain/tracekit/tracekit.js +0 -91
- package/esm/domain/tracekit/tracekit.js.map +0 -1
- package/esm/domain/tracekit/types.d.ts +0 -44
- package/esm/domain/tracekit/types.js +0 -2
- package/esm/domain/tracekit/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 -63
- package/esm/index.js +0 -61
- 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 -41
- package/esm/tools/display.js.map +0 -1
- package/esm/tools/experimentalFeatures.d.ts +0 -24
- package/esm/tools/experimentalFeatures.js +0 -40
- 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 -19
- package/esm/tools/instrumentMethod.js +0 -77
- 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 -9
- 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 -40
- 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/contextManager.d.ts +0 -21
- package/esm/tools/serialisation/contextManager.js +0 -66
- package/esm/tools/serialisation/contextManager.js.map +0 -1
- package/esm/tools/serialisation/heavyCustomerDataWarning.d.ts +0 -8
- package/esm/tools/serialisation/heavyCustomerDataWarning.js +0 -14
- package/esm/tools/serialisation/heavyCustomerDataWarning.js.map +0 -1
- package/esm/tools/serialisation/jsonStringify.d.ts +0 -14
- 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 -2
- package/esm/tools/utils/browserDetection.js +0 -7
- 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 -7
- package/esm/tools/utils/stringUtils.js +0 -26
- 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 -19
- package/esm/transport/batch.js +0 -76
- 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 -48
- package/esm/transport/flushController.js +0 -93
- package/esm/transport/flushController.js.map +0 -1
- package/esm/transport/httpRequest.d.ts +0 -37
- package/esm/transport/httpRequest.js +0 -85
- 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 -15
- package/esm/transport/startBatchWithReplica.js +0 -33
- 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/tracekit/computeStackTrace.ts +0 -141
- package/src/domain/tracekit/index.ts +0 -3
- package/src/domain/tracekit/tracekit.ts +0 -96
- package/src/domain/tracekit/types.ts +0 -47
- 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/tools/serialisation/contextManager.ts +0 -79
- package/src/tools/serialisation/heavyCustomerDataWarning.ts +0 -26
- package/src/transport/startBatchWithReplica.ts +0 -52
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { noop } from './utils/functionUtils';
|
|
2
|
-
export declare function instrumentMethod<OBJECT extends {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}, METHOD extends keyof OBJECT>(object: OBJECT, method: METHOD, instrumentationFactory: (original: OBJECT[METHOD]) => (this: OBJECT, ...args: Parameters<OBJECT[METHOD]>) => ReturnType<OBJECT[METHOD]>): {
|
|
5
|
-
stop: () => void;
|
|
6
|
-
};
|
|
7
|
-
export declare function instrumentMethodAndCallOriginal<OBJECT extends {
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}, METHOD extends keyof OBJECT>(object: OBJECT, method: METHOD, { before, after, }: {
|
|
10
|
-
before?: (this: OBJECT, ...args: Parameters<OBJECT[METHOD]>) => void;
|
|
11
|
-
after?: (this: OBJECT, ...args: Parameters<OBJECT[METHOD]>) => void;
|
|
12
|
-
}): {
|
|
13
|
-
stop: () => void;
|
|
14
|
-
};
|
|
15
|
-
export declare function instrumentSetter<OBJECT extends {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}, PROPERTY extends keyof OBJECT>(object: OBJECT, property: PROPERTY, after: (thisObject: OBJECT, value: OBJECT[PROPERTY]) => void): {
|
|
18
|
-
stop: typeof noop;
|
|
19
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { setTimeout } from './timer';
|
|
2
|
-
import { callMonitored } from './monitor';
|
|
3
|
-
import { noop } from './utils/functionUtils';
|
|
4
|
-
export function instrumentMethod(object, method, instrumentationFactory) {
|
|
5
|
-
var original = object[method];
|
|
6
|
-
var instrumentation = instrumentationFactory(original);
|
|
7
|
-
var instrumentationWrapper = function () {
|
|
8
|
-
if (typeof instrumentation !== 'function') {
|
|
9
|
-
return undefined;
|
|
10
|
-
}
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
12
|
-
return instrumentation.apply(this, arguments);
|
|
13
|
-
};
|
|
14
|
-
object[method] = instrumentationWrapper;
|
|
15
|
-
return {
|
|
16
|
-
stop: function () {
|
|
17
|
-
if (object[method] === instrumentationWrapper) {
|
|
18
|
-
object[method] = original;
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
instrumentation = original;
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export function instrumentMethodAndCallOriginal(object, method, _a) {
|
|
27
|
-
var before = _a.before, after = _a.after;
|
|
28
|
-
return instrumentMethod(object, method, function (original) {
|
|
29
|
-
return function () {
|
|
30
|
-
var args = arguments;
|
|
31
|
-
var result;
|
|
32
|
-
if (before) {
|
|
33
|
-
callMonitored(before, this, args);
|
|
34
|
-
}
|
|
35
|
-
if (typeof original === 'function') {
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
|
37
|
-
result = original.apply(this, args);
|
|
38
|
-
}
|
|
39
|
-
if (after) {
|
|
40
|
-
callMonitored(after, this, args);
|
|
41
|
-
}
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
43
|
-
return result;
|
|
44
|
-
};
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
export function instrumentSetter(object, property, after) {
|
|
48
|
-
var originalDescriptor = Object.getOwnPropertyDescriptor(object, property);
|
|
49
|
-
if (!originalDescriptor || !originalDescriptor.set || !originalDescriptor.configurable) {
|
|
50
|
-
return { stop: noop };
|
|
51
|
-
}
|
|
52
|
-
var instrumentation = function (thisObject, value) {
|
|
53
|
-
// put hooked setter into event loop to avoid of set latency
|
|
54
|
-
setTimeout(function () {
|
|
55
|
-
after(thisObject, value);
|
|
56
|
-
}, 0);
|
|
57
|
-
};
|
|
58
|
-
var instrumentationWrapper = function (value) {
|
|
59
|
-
originalDescriptor.set.call(this, value);
|
|
60
|
-
instrumentation(this, value);
|
|
61
|
-
};
|
|
62
|
-
Object.defineProperty(object, property, {
|
|
63
|
-
set: instrumentationWrapper,
|
|
64
|
-
});
|
|
65
|
-
return {
|
|
66
|
-
stop: function () {
|
|
67
|
-
var _a;
|
|
68
|
-
if (((_a = Object.getOwnPropertyDescriptor(object, property)) === null || _a === void 0 ? void 0 : _a.set) === instrumentationWrapper) {
|
|
69
|
-
Object.defineProperty(object, property, originalDescriptor);
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
instrumentation = noop;
|
|
73
|
-
}
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=instrumentMethod.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentMethod.js","sourceRoot":"","sources":["../../src/tools/instrumentMethod.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAE5C,MAAM,UAAU,gBAAgB,CAC9B,MAAc,EACd,MAAc,EACd,sBAEsF;IAEtF,IAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;IAE/B,IAAI,eAAe,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAA;IAEtD,IAAM,sBAAsB,GAAG;QAC7B,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE;YACzC,OAAO,SAAS,CAAA;SACjB;QACD,+DAA+D;QAC/D,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,SAAkD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;KACtB;IAED,IAAI,eAAe,GAAG,UAAC,UAAkB,EAAE,KAAuB;QAChE,4DAA4D;QAC5D,UAAU,CAAC;YACT,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;QAC1B,CAAC,EAAE,CAAC,CAAC,CAAA;IACP,CAAC,CAAA;IAED,IAAM,sBAAsB,GAAG,UAAwB,KAAuB;QAC5E,kBAAkB,CAAC,GAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;QACzC,eAAe,CAAC,IAAI,EAAE,KAAK,CAAC,CAAA;IAC9B,CAAC,CAAA;IAED,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE;QACtC,GAAG,EAAE,sBAAsB;KAC5B,CAAC,CAAA;IAEF,OAAO;QACL,IAAI,EAAE;;YACJ,IAAI,CAAA,MAAA,MAAM,CAAC,wBAAwB,CAAC,MAAM,EAAE,QAAQ,CAAC,0CAAE,GAAG,MAAK,sBAAsB,EAAE;gBACrF,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAA;aAC5D;iBAAM;gBACL,eAAe,GAAG,IAAI,CAAA;aACvB;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export type MatchOption = string | RegExp | ((value: string) => boolean);
|
|
2
|
-
export declare function isMatchOption(item: unknown): item is MatchOption;
|
|
3
|
-
/**
|
|
4
|
-
* Returns true if value can be matched by at least one of the provided MatchOptions.
|
|
5
|
-
* When comparing strings, setting useStartsWith to true will compare the value with the start of
|
|
6
|
-
* the option, instead of requiring an exact match.
|
|
7
|
-
*/
|
|
8
|
-
export declare function matchList(list: MatchOption[], value: string, useStartsWith?: boolean): boolean;
|
package/esm/tools/matchOption.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { startsWith } from './utils/polyfills';
|
|
2
|
-
import { display } from './display';
|
|
3
|
-
import { getType } from './utils/typeUtils';
|
|
4
|
-
export function isMatchOption(item) {
|
|
5
|
-
var itemType = getType(item);
|
|
6
|
-
return itemType === 'string' || itemType === 'function' || item instanceof RegExp;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Returns true if value can be matched by at least one of the provided MatchOptions.
|
|
10
|
-
* When comparing strings, setting useStartsWith to true will compare the value with the start of
|
|
11
|
-
* the option, instead of requiring an exact match.
|
|
12
|
-
*/
|
|
13
|
-
export function matchList(list, value, useStartsWith) {
|
|
14
|
-
if (useStartsWith === void 0) { useStartsWith = false; }
|
|
15
|
-
return list.some(function (item) {
|
|
16
|
-
try {
|
|
17
|
-
if (typeof item === 'function') {
|
|
18
|
-
return item(value);
|
|
19
|
-
}
|
|
20
|
-
else if (item instanceof RegExp) {
|
|
21
|
-
return item.test(value);
|
|
22
|
-
}
|
|
23
|
-
else if (typeof item === 'string') {
|
|
24
|
-
return useStartsWith ? startsWith(value, item) : item === value;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
catch (e) {
|
|
28
|
-
display.error(e);
|
|
29
|
-
}
|
|
30
|
-
return false;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=matchOption.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"matchOption.js","sourceRoot":"","sources":["../../src/tools/matchOption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAI3C,MAAM,UAAU,aAAa,CAAC,IAAa;IACzC,IAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9B,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,KAAK,UAAU,IAAI,IAAI,YAAY,MAAM,CAAA;AACnF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,SAAS,CAAC,IAAmB,EAAE,KAAa,EAAE,aAAqB;IAArB,8BAAA,EAAA,qBAAqB;IACjF,OAAO,IAAI,CAAC,IAAI,CAAC,UAAC,IAAI;QACpB,IAAI;YACF,IAAI,OAAO,IAAI,KAAK,UAAU,EAAE;gBAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,CAAA;aACnB;iBAAM,IAAI,IAAI,YAAY,MAAM,EAAE;gBACjC,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aACxB;iBAAM,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;gBACnC,OAAO,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAA;aAChE;SACF;QAAC,OAAO,CAAC,EAAE;YACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;SACjB;QACD,OAAO,KAAK,CAAA;IACd,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/esm/tools/mergeInto.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
type Merged<TDestination, TSource> = TSource extends undefined ? TDestination : TDestination extends undefined ? TSource : TSource extends any[] ? TDestination extends any[] ? TDestination & TSource : TSource : TSource extends object ? TDestination extends object ? TDestination extends any[] ? TSource : TDestination & TSource : TSource : TSource;
|
|
2
|
-
/**
|
|
3
|
-
* Iterate over source and affect its sub values into destination, recursively.
|
|
4
|
-
* If the source and destination can't be merged, return source.
|
|
5
|
-
*/
|
|
6
|
-
export declare function mergeInto<D, S>(destination: D, source: S, circularReferenceChecker?: CircularReferenceChecker): Merged<D, S>;
|
|
7
|
-
/**
|
|
8
|
-
* A simplistic implementation of a deep clone algorithm.
|
|
9
|
-
* Caveats:
|
|
10
|
-
* - It doesn't maintain prototype chains - don't use with instances of custom classes.
|
|
11
|
-
* - It doesn't handle Map and Set
|
|
12
|
-
*/
|
|
13
|
-
export declare function deepClone<T>(value: T): T;
|
|
14
|
-
type Combined<A, B> = A extends null ? B : B extends null ? A : Merged<A, B>;
|
|
15
|
-
export declare function combine<A, B>(a: A, b: B): Combined<A, B>;
|
|
16
|
-
export declare function combine<A, B, C>(a: A, b: B, c: C): Combined<Combined<A, B>, C>;
|
|
17
|
-
export declare function combine<A, B, C, D>(a: A, b: B, c: C, d: D): Combined<Combined<Combined<A, B>, C>, D>;
|
|
18
|
-
export declare function combine<A, B, C, D, E>(a: A, b: B, c: C, d: D, e: E): Combined<Combined<Combined<Combined<A, B>, C>, D>, E>;
|
|
19
|
-
export declare function combine<A, B, C, D, E, F>(a: A, b: B, c: C, d: D, e: E, f: F): Combined<Combined<Combined<Combined<Combined<A, B>, C>, D>, E>, F>;
|
|
20
|
-
export declare function combine<A, B, C, D, E, F, G>(a: A, b: B, c: C, d: D, e: E, f: F, g: G): Combined<Combined<Combined<Combined<Combined<Combined<A, B>, C>, D>, E>, F>, G>;
|
|
21
|
-
export declare function combine<A, B, C, D, E, F, G, H>(a: A, b: B, c: C, d: D, e: E, f: F, g: G, h: H): Combined<Combined<Combined<Combined<Combined<Combined<Combined<A, B>, C>, D>, E>, F>, G>, H>;
|
|
22
|
-
interface CircularReferenceChecker {
|
|
23
|
-
hasAlreadyBeenSeen(value: any): boolean;
|
|
24
|
-
}
|
|
25
|
-
export {};
|
package/esm/tools/mergeInto.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { getType } from './utils/typeUtils';
|
|
2
|
-
/**
|
|
3
|
-
* Iterate over source and affect its sub values into destination, recursively.
|
|
4
|
-
* If the source and destination can't be merged, return source.
|
|
5
|
-
*/
|
|
6
|
-
export function mergeInto(destination, source, circularReferenceChecker) {
|
|
7
|
-
if (circularReferenceChecker === void 0) { circularReferenceChecker = createCircularReferenceChecker(); }
|
|
8
|
-
// ignore the source if it is undefined
|
|
9
|
-
if (source === undefined) {
|
|
10
|
-
return destination;
|
|
11
|
-
}
|
|
12
|
-
if (typeof source !== 'object' || source === null) {
|
|
13
|
-
// primitive values - just return source
|
|
14
|
-
return source;
|
|
15
|
-
}
|
|
16
|
-
else if (source instanceof Date) {
|
|
17
|
-
return new Date(source.getTime());
|
|
18
|
-
}
|
|
19
|
-
else if (source instanceof RegExp) {
|
|
20
|
-
var flags = source.flags ||
|
|
21
|
-
// old browsers compatibility
|
|
22
|
-
[
|
|
23
|
-
source.global ? 'g' : '',
|
|
24
|
-
source.ignoreCase ? 'i' : '',
|
|
25
|
-
source.multiline ? 'm' : '',
|
|
26
|
-
source.sticky ? 'y' : '',
|
|
27
|
-
source.unicode ? 'u' : '',
|
|
28
|
-
].join('');
|
|
29
|
-
return new RegExp(source.source, flags);
|
|
30
|
-
}
|
|
31
|
-
if (circularReferenceChecker.hasAlreadyBeenSeen(source)) {
|
|
32
|
-
// remove circular references
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
else if (Array.isArray(source)) {
|
|
36
|
-
var merged_1 = Array.isArray(destination) ? destination : [];
|
|
37
|
-
for (var i = 0; i < source.length; ++i) {
|
|
38
|
-
merged_1[i] = mergeInto(merged_1[i], source[i], circularReferenceChecker);
|
|
39
|
-
}
|
|
40
|
-
return merged_1;
|
|
41
|
-
}
|
|
42
|
-
var merged = getType(destination) === 'object' ? destination : {};
|
|
43
|
-
for (var key in source) {
|
|
44
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
45
|
-
merged[key] = mergeInto(merged[key], source[key], circularReferenceChecker);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return merged;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* A simplistic implementation of a deep clone algorithm.
|
|
52
|
-
* Caveats:
|
|
53
|
-
* - It doesn't maintain prototype chains - don't use with instances of custom classes.
|
|
54
|
-
* - It doesn't handle Map and Set
|
|
55
|
-
*/
|
|
56
|
-
export function deepClone(value) {
|
|
57
|
-
return mergeInto(undefined, value);
|
|
58
|
-
}
|
|
59
|
-
export function combine() {
|
|
60
|
-
var sources = [];
|
|
61
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
62
|
-
sources[_i] = arguments[_i];
|
|
63
|
-
}
|
|
64
|
-
var destination;
|
|
65
|
-
for (var _a = 0, sources_1 = sources; _a < sources_1.length; _a++) {
|
|
66
|
-
var source = sources_1[_a];
|
|
67
|
-
// Ignore any undefined or null sources.
|
|
68
|
-
if (source === undefined || source === null) {
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
destination = mergeInto(destination, source);
|
|
72
|
-
}
|
|
73
|
-
return destination;
|
|
74
|
-
}
|
|
75
|
-
function createCircularReferenceChecker() {
|
|
76
|
-
if (typeof WeakSet !== 'undefined') {
|
|
77
|
-
var set_1 = new WeakSet();
|
|
78
|
-
return {
|
|
79
|
-
hasAlreadyBeenSeen: function (value) {
|
|
80
|
-
var has = set_1.has(value);
|
|
81
|
-
if (!has) {
|
|
82
|
-
set_1.add(value);
|
|
83
|
-
}
|
|
84
|
-
return has;
|
|
85
|
-
},
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
var array = [];
|
|
89
|
-
return {
|
|
90
|
-
hasAlreadyBeenSeen: function (value) {
|
|
91
|
-
var has = array.indexOf(value) >= 0;
|
|
92
|
-
if (!has) {
|
|
93
|
-
array.push(value);
|
|
94
|
-
}
|
|
95
|
-
return has;
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=mergeInto.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mergeInto.js","sourceRoot":"","sources":["../../src/tools/mergeInto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAwB3C;;;GAGG;AACH,MAAM,UAAU,SAAS,CACvB,WAAc,EACd,MAAS,EACT,wBAA2D;IAA3D,yCAAA,EAAA,2BAA2B,8BAA8B,EAAE;IAE3D,uCAAuC;IACvC,IAAI,MAAM,K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A;QACvC,OAAO;YACL,kBAAkB,YAAC,KAAK;gBACtB,IAAM,GAAG,GAAG,KAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;gBAC1B,IAAI,CAAC,GAAG,EAAE;oBACR,KAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;iBACf;gBACD,OAAO,GAAG,CAAA;YACZ,CAAC;SACF,CAAA;KACF;IACD,IAAM,KAAK,GAAU,EAAE,CAAA;IACvB,OAAO;QACL,kBAAkB,YAAC,KAAK;YACtB,IAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;YACrC,IAAI,CAAC,GAAG,EAAE;gBACR,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aAClB;YACD,OAAO,GAAG,CAAA;QACZ,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/esm/tools/monitor.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ConsoleApiName } from './display';
|
|
2
|
-
export declare function startMonitorErrorCollection(newOnMonitorErrorCollected: (error: unknown) => void): void;
|
|
3
|
-
export declare function setDebugMode(newDebugMode: boolean): void;
|
|
4
|
-
export declare function resetMonitor(): void;
|
|
5
|
-
export declare function monitored<T extends (...params: any[]) => unknown>(_: any, __: string, descriptor: TypedPropertyDescriptor<T>): void;
|
|
6
|
-
export declare function monitor<T extends (...args: any[]) => any>(fn: T): T;
|
|
7
|
-
export declare function callMonitored<T extends (...args: any[]) => any>(fn: T, context: ThisParameterType<T>, args: Parameters<T>): ReturnType<T> | undefined;
|
|
8
|
-
export declare function callMonitored<T extends (this: void) => any>(fn: T): ReturnType<T> | undefined;
|
|
9
|
-
export declare function displayIfDebugEnabled(api: ConsoleApiName, ...args: any[]): void;
|
package/esm/tools/monitor.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
2
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3
|
-
if (ar || !(i in from)) {
|
|
4
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
5
|
-
ar[i] = from[i];
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
9
|
-
};
|
|
10
|
-
import { ConsoleApiName, display } from './display';
|
|
11
|
-
var onMonitorErrorCollected;
|
|
12
|
-
var debugMode = false;
|
|
13
|
-
export function startMonitorErrorCollection(newOnMonitorErrorCollected) {
|
|
14
|
-
onMonitorErrorCollected = newOnMonitorErrorCollected;
|
|
15
|
-
}
|
|
16
|
-
export function setDebugMode(newDebugMode) {
|
|
17
|
-
debugMode = newDebugMode;
|
|
18
|
-
}
|
|
19
|
-
export function resetMonitor() {
|
|
20
|
-
onMonitorErrorCollected = undefined;
|
|
21
|
-
debugMode = false;
|
|
22
|
-
}
|
|
23
|
-
export function monitored(_, __, descriptor) {
|
|
24
|
-
var originalMethod = descriptor.value;
|
|
25
|
-
descriptor.value = function () {
|
|
26
|
-
var args = [];
|
|
27
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
28
|
-
args[_i] = arguments[_i];
|
|
29
|
-
}
|
|
30
|
-
var decorated = onMonitorErrorCollected ? monitor(originalMethod) : originalMethod;
|
|
31
|
-
return decorated.apply(this, args);
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
export function monitor(fn) {
|
|
35
|
-
return function () {
|
|
36
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
37
|
-
return callMonitored(fn, this, arguments);
|
|
38
|
-
}; // consider output type has input type
|
|
39
|
-
}
|
|
40
|
-
export function callMonitored(fn, context, args) {
|
|
41
|
-
try {
|
|
42
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
43
|
-
return fn.apply(context, args);
|
|
44
|
-
}
|
|
45
|
-
catch (e) {
|
|
46
|
-
displayIfDebugEnabled(ConsoleApiName.error, e);
|
|
47
|
-
if (onMonitorErrorCollected) {
|
|
48
|
-
try {
|
|
49
|
-
onMonitorErrorCollected(e);
|
|
50
|
-
}
|
|
51
|
-
catch (e) {
|
|
52
|
-
displayIfDebugEnabled(ConsoleApiName.error, e);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
export function displayIfDebugEnabled(api) {
|
|
58
|
-
var args = [];
|
|
59
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
60
|
-
args[_i - 1] = arguments[_i];
|
|
61
|
-
}
|
|
62
|
-
if (debugMode) {
|
|
63
|
-
display.apply(void 0, __spreadArray([api, '[MONITOR]'], args, false));
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=monitor.js.map
|
package/esm/tools/monitor.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"monitor.js","sourceRoot":"","sources":["../../src/tools/monitor.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAEnD,IAAI,uBAA+D,CAAA;AACnE,IAAI,SAAS,GAAG,KAAK,CAAA;AAErB,MAAM,UAAU,2BAA2B,CAAC,0BAAoD;IAC9F,uBAAuB,GAAG,0BAA0B,CAAA;AACtD,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,YAAqB;IAChD,SAAS,GAAG,YAAY,CAAA;AAC1B,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,uBAAuB,GAAG,SAAS,CAAA;IACnC,SAAS,GAAG,KAAK,CAAA;AACnB,CAAC;AAED,MAAM,UAAU,SAAS,CACvB,CAAM,EACN,EAAU,EACV,UAAsC;IAEtC,IAAM,cAAc,GAAG,UAAU,CAAC,KAAM,CAAA;IACxC,UAAU,CAAC,KAAK,GAAG;QAAqB,cAAsB;aAAtB,UAAsB,EAAtB,qBAAsB,EAAtB,IAAsB;YAAtB,yBAAsB;;QAC5D,IAAM,SAAS,GAAG,uBAAuB,CAAC,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,cAAc,CAAA;QACpF,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAkB,CAAA;IACrD,CAAM,CAAA;AACR,CAAC;AAED,MAAM,UAAU,OAAO,CAAoC,EAAK;IAC9D,OAAO;QACL,+DAA+D;QAC/D,OAAO,aAAa,CAAC,EAAE,EAAE,IAAI,EAAE,SAAqC,CAAC,CAAA;IACvE,CAAiB,CAAA,CAAC,sCAAsC;AAC1D,CAAC;AAQD,MAAM,UAAU,aAAa,CAC3B,EAAK,EACL,OAAa,EACb,IAAU;IAEV,IAAI;QACF,+DAA+D;QAC/D,OAAO,EAAE,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAA;KAC/B;IAAC,OAAO,CAAC,EAAE;QACV,qBAAqB,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;QAC9C,IAAI,uBAAuB,EAAE;YAC3B,IAAI;gBACF,uBAAuB,CAAC,CAAC,CAAC,CAAA;aAC3B;YAAC,OAAO,CAAC,EAAE;gBACV,qBAAqB,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;aAC/C;SACF;KACF;AACH,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,GAAmB;IAAE,cAAc;SAAd,UAAc,EAAd,qBAAc,EAAd,IAAc;QAAd,6BAAc;;IACvE,IAAI,SAAS,EAAE;QACb,OAAO,8BAAC,GAAG,EAAE,WAAW,GAAK,IAAI,UAAC;KACnC;AACH,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export interface Subscription {
|
|
2
|
-
unsubscribe: () => void;
|
|
3
|
-
}
|
|
4
|
-
export declare class Observable<T> {
|
|
5
|
-
private onFirstSubscribe?;
|
|
6
|
-
private observers;
|
|
7
|
-
private onLastUnsubscribe?;
|
|
8
|
-
constructor(onFirstSubscribe?: (() => (() => void) | void) | undefined);
|
|
9
|
-
subscribe(f: (data: T) => void): Subscription;
|
|
10
|
-
notify(data: T): void;
|
|
11
|
-
}
|
|
12
|
-
export declare function mergeObservables<T>(...observables: Array<Observable<T>>): Observable<T>;
|
package/esm/tools/observable.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
var Observable = /** @class */ (function () {
|
|
2
|
-
function Observable(onFirstSubscribe) {
|
|
3
|
-
this.onFirstSubscribe = onFirstSubscribe;
|
|
4
|
-
this.observers = [];
|
|
5
|
-
}
|
|
6
|
-
Observable.prototype.subscribe = function (f) {
|
|
7
|
-
var _this = this;
|
|
8
|
-
if (!this.observers.length && this.onFirstSubscribe) {
|
|
9
|
-
this.onLastUnsubscribe = this.onFirstSubscribe() || undefined;
|
|
10
|
-
}
|
|
11
|
-
this.observers.push(f);
|
|
12
|
-
return {
|
|
13
|
-
unsubscribe: function () {
|
|
14
|
-
_this.observers = _this.observers.filter(function (other) { return f !== other; });
|
|
15
|
-
if (!_this.observers.length && _this.onLastUnsubscribe) {
|
|
16
|
-
_this.onLastUnsubscribe();
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
Observable.prototype.notify = function (data) {
|
|
22
|
-
this.observers.forEach(function (observer) { return observer(data); });
|
|
23
|
-
};
|
|
24
|
-
return Observable;
|
|
25
|
-
}());
|
|
26
|
-
export { Observable };
|
|
27
|
-
export function mergeObservables() {
|
|
28
|
-
var observables = [];
|
|
29
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
30
|
-
observables[_i] = arguments[_i];
|
|
31
|
-
}
|
|
32
|
-
var globalObservable = new Observable(function () {
|
|
33
|
-
var subscriptions = observables.map(function (observable) {
|
|
34
|
-
return observable.subscribe(function (data) { return globalObservable.notify(data); });
|
|
35
|
-
});
|
|
36
|
-
return function () { return subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); }); };
|
|
37
|
-
});
|
|
38
|
-
return globalObservable;
|
|
39
|
-
}
|
|
40
|
-
//# sourceMappingURL=observable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"observable.js","sourceRoot":"","sources":["../../src/tools/observable.ts"],"names":[],"mappings":"AAIA;IAIE,oBAAoB,gBAA4C;QAA5C,qBAAgB,GAAhB,gBAAgB,CAA4B;QAHxD,cAAS,GAA6B,EAAE,CAAA;IAGmB,CAAC;IAEpE,8BAAS,GAAT,UAAU,CAAoB;QAA9B,iBAaC;QAZC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACnD,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,IAAI,SAAS,CAAA;SAC9D;QACD,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QACtB,OAAO;YACL,WAAW,EAAE;gBACX,KAAI,CAAC,SAAS,GAAG,KAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAC,KAAK,IAAK,OAAA,CAAC,KAAK,KAAK,EAAX,CAAW,CAAC,CAAA;gBAC9D,IAAI,CAAC,KAAI,CAAC,SAAS,CAAC,MAAM,IAAI,KAAI,CAAC,iBAAiB,EAAE;oBACpD,KAAI,CAAC,iBAAiB,EAAE,CAAA;iBACzB;YACH,CAAC;SACF,CAAA;IACH,CAAC;IAED,2BAAM,GAAN,UAAO,IAAO;QACZ,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,UAAC,QAAQ,IAAK,OAAA,QAAQ,CAAC,IAAI,CAAC,EAAd,CAAc,CAAC,CAAA;IACtD,CAAC;IACH,iBAAC;AAAD,CAAC,AAxBD,IAwBC;;AAED,MAAM,UAAU,gBAAgB;IAAI,qBAAoC;SAApC,UAAoC,EAApC,qBAAoC,EAApC,IAAoC;QAApC,gCAAoC;;IACtE,IAAM,gBAAgB,GAAG,IAAI,UAAU,CAAI;QACzC,IAAM,aAAa,GAAmB,WAAW,CAAC,GAAG,CAAC,UAAC,UAAU;YAC/D,OAAA,UAAU,CAAC,SAAS,CAAC,UAAC,IAAI,IAAK,OAAA,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,EAA7B,CAA6B,CAAC;QAA7D,CAA6D,CAC9D,CAAA;QACD,OAAO,cAAM,OAAA,aAAa,CAAC,OAAO,CAAC,UAAC,YAAY,IAAK,OAAA,YAAY,CAAC,WAAW,EAAE,EAA1B,CAA0B,CAAC,EAAnE,CAAmE,CAAA;IAClF,CAAC,CAAC,CAAA;IAEF,OAAO,gBAAgB,CAAA;AACzB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type Options = {
|
|
2
|
-
bytesLimit: number;
|
|
3
|
-
collectStreamBody?: boolean;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* Read bytes from a ReadableStream until at least `limit` bytes have been read (or until the end of
|
|
7
|
-
* the stream). The callback is invoked with the at most `limit` bytes, and indicates that the limit
|
|
8
|
-
* has been exceeded if more bytes were available.
|
|
9
|
-
*/
|
|
10
|
-
export declare function readBytesFromStream(stream: ReadableStream<Uint8Array>, callback: (error?: Error, bytes?: Uint8Array, limitExceeded?: boolean) => void, options: Options): void;
|
|
11
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { monitor } from './monitor';
|
|
2
|
-
import { noop } from './utils/functionUtils';
|
|
3
|
-
/**
|
|
4
|
-
* Read bytes from a ReadableStream until at least `limit` bytes have been read (or until the end of
|
|
5
|
-
* the stream). The callback is invoked with the at most `limit` bytes, and indicates that the limit
|
|
6
|
-
* has been exceeded if more bytes were available.
|
|
7
|
-
*/
|
|
8
|
-
export function readBytesFromStream(stream, callback, options) {
|
|
9
|
-
var reader = stream.getReader();
|
|
10
|
-
var chunks = [];
|
|
11
|
-
var readBytesCount = 0;
|
|
12
|
-
readMore();
|
|
13
|
-
function readMore() {
|
|
14
|
-
reader.read().then(monitor(function (result) {
|
|
15
|
-
if (result.done) {
|
|
16
|
-
onDone();
|
|
17
|
-
return;
|
|
18
|
-
}
|
|
19
|
-
if (options.collectStreamBody) {
|
|
20
|
-
chunks.push(result.value);
|
|
21
|
-
}
|
|
22
|
-
readBytesCount += result.value.length;
|
|
23
|
-
if (readBytesCount > options.bytesLimit) {
|
|
24
|
-
onDone();
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
readMore();
|
|
28
|
-
}
|
|
29
|
-
}), monitor(function (error) { return callback(error); }));
|
|
30
|
-
}
|
|
31
|
-
function onDone() {
|
|
32
|
-
reader.cancel().catch(
|
|
33
|
-
// we don't care if cancel fails, but we still need to catch the error to avoid reporting it
|
|
34
|
-
// as an unhandled rejection
|
|
35
|
-
noop);
|
|
36
|
-
var bytes;
|
|
37
|
-
var limitExceeded;
|
|
38
|
-
if (options.collectStreamBody) {
|
|
39
|
-
var completeBuffer_1;
|
|
40
|
-
if (chunks.length === 1) {
|
|
41
|
-
// optimization: if the response is small enough to fit in a single buffer (provided by the browser), just
|
|
42
|
-
// use it directly.
|
|
43
|
-
completeBuffer_1 = chunks[0];
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
// else, we need to copy buffers into a larger buffer to concatenate them.
|
|
47
|
-
completeBuffer_1 = new Uint8Array(readBytesCount);
|
|
48
|
-
var offset_1 = 0;
|
|
49
|
-
chunks.forEach(function (chunk) {
|
|
50
|
-
completeBuffer_1.set(chunk, offset_1);
|
|
51
|
-
offset_1 += chunk.length;
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
bytes = completeBuffer_1.slice(0, options.bytesLimit);
|
|
55
|
-
limitExceeded = completeBuffer_1.length > options.bytesLimit;
|
|
56
|
-
}
|
|
57
|
-
callback(undefined, bytes, limitExceeded);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=readBytesFromStream.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":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KAAK,CAAC,EAAE;gBACvB,0GAA0G;gBAC1G,mBAAmB;gBACnB,gBAAc,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;aAC3B;iBAAM;gBACL,0EAA0E;gBAC1E,gBAAc,GAAG,IAAI,UAAU,CAAC,cAAc,CAAC,CAAA;gBAC/C,IAAI,QAAM,GAAG,CAAC,CAAA;gBACd,MAAM,CAAC,OAAO,CAAC,UAAC,KAAK;oBACnB,gBAAc,CAAC,GAAG,CAAC,KAAK,EAAE,QAAM,CAAC,CAAA;oBACjC,QAAM,IAAI,KAAK,CAAC,MAAM,CAAA;gBACxB,CAAC,CAAC,CAAA;aACH;YACD,KAAK,GAAG,gBAAc,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA;YACnD,aAAa,GAAG,gBAAc,CAAC,MAAM,GAAG,OAAO,CAAC,UAAU,CAAA;SAC3D;QAED,QAAQ,CAAC,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,CAAA;IAC3C,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sendToExtension.js","sourceRoot":"","sources":["../../src/tools/sendToExtension.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,eAAe,CAAC,IAA0B,EAAE,OAAgB;IAC1E,IAAM,QAAQ,GAAI,MAAwB,CAAC,+BAA+B,CAAA;IAC1E,IAAI,QAAQ,EAAE;QACZ,QAAQ,CAAC,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC,CAAA;KAC5B;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/tools/serialisation/context.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { computeBytesCount } from '../utils/byteUtils';
|
|
2
|
-
import type { CustomerDataType } from './heavyCustomerDataWarning';
|
|
3
|
-
import type { Context } from './context';
|
|
4
|
-
export declare const BYTES_COMPUTATION_THROTTLING_DELAY = 200;
|
|
5
|
-
export type ContextManager = ReturnType<typeof createContextManager>;
|
|
6
|
-
export declare function createContextManager(customerDataType: CustomerDataType, computeBytesCountImpl?: typeof computeBytesCount): {
|
|
7
|
-
getBytesCount: () => number;
|
|
8
|
-
/** @deprecated use getContext instead */
|
|
9
|
-
get: () => Context;
|
|
10
|
-
/** @deprecated use setContextProperty instead */
|
|
11
|
-
add: (key: string, value: any) => void;
|
|
12
|
-
/** @deprecated renamed to removeContextProperty */
|
|
13
|
-
remove: (key: string) => void;
|
|
14
|
-
/** @deprecated use setContext instead */
|
|
15
|
-
set: (newContext: object) => void;
|
|
16
|
-
getContext: () => Context;
|
|
17
|
-
setContext: (newContext: Context) => void;
|
|
18
|
-
setContextProperty: (key: string, property: any) => void;
|
|
19
|
-
removeContextProperty: (key: string) => void;
|
|
20
|
-
clearContext: () => void;
|
|
21
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { computeBytesCount } from '../utils/byteUtils';
|
|
2
|
-
import { throttle } from '../utils/functionUtils';
|
|
3
|
-
import { deepClone } from '../mergeInto';
|
|
4
|
-
import { getType } from '../utils/typeUtils';
|
|
5
|
-
import { jsonStringify } from './jsonStringify';
|
|
6
|
-
import { sanitize } from './sanitize';
|
|
7
|
-
import { warnIfCustomerDataLimitReached } from './heavyCustomerDataWarning';
|
|
8
|
-
export var BYTES_COMPUTATION_THROTTLING_DELAY = 200;
|
|
9
|
-
export function createContextManager(customerDataType, computeBytesCountImpl) {
|
|
10
|
-
if (computeBytesCountImpl === void 0) { computeBytesCountImpl = computeBytesCount; }
|
|
11
|
-
var context = {};
|
|
12
|
-
var bytesCountCache;
|
|
13
|
-
var alreadyWarned = false;
|
|
14
|
-
// Throttle the bytes computation to minimize the impact on performance.
|
|
15
|
-
// Especially useful if the user call context APIs synchronously multiple times in a row
|
|
16
|
-
var computeBytesCountThrottled = throttle(function (context) {
|
|
17
|
-
bytesCountCache = computeBytesCountImpl(jsonStringify(context));
|
|
18
|
-
if (!alreadyWarned) {
|
|
19
|
-
alreadyWarned = warnIfCustomerDataLimitReached(bytesCountCache, customerDataType);
|
|
20
|
-
}
|
|
21
|
-
}, BYTES_COMPUTATION_THROTTLING_DELAY).throttled;
|
|
22
|
-
var contextManager = {
|
|
23
|
-
getBytesCount: function () { return bytesCountCache; },
|
|
24
|
-
/** @deprecated use getContext instead */
|
|
25
|
-
get: function () { return context; },
|
|
26
|
-
/** @deprecated use setContextProperty instead */
|
|
27
|
-
add: function (key, value) {
|
|
28
|
-
context[key] = value;
|
|
29
|
-
computeBytesCountThrottled(context);
|
|
30
|
-
},
|
|
31
|
-
/** @deprecated renamed to removeContextProperty */
|
|
32
|
-
remove: function (key) {
|
|
33
|
-
delete context[key];
|
|
34
|
-
computeBytesCountThrottled(context);
|
|
35
|
-
},
|
|
36
|
-
/** @deprecated use setContext instead */
|
|
37
|
-
set: function (newContext) {
|
|
38
|
-
context = newContext;
|
|
39
|
-
computeBytesCountThrottled(context);
|
|
40
|
-
},
|
|
41
|
-
getContext: function () { return deepClone(context); },
|
|
42
|
-
setContext: function (newContext) {
|
|
43
|
-
if (getType(newContext) === 'object') {
|
|
44
|
-
context = sanitize(newContext);
|
|
45
|
-
computeBytesCountThrottled(context);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
contextManager.clearContext();
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
setContextProperty: function (key, property) {
|
|
52
|
-
context[key] = sanitize(property);
|
|
53
|
-
computeBytesCountThrottled(context);
|
|
54
|
-
},
|
|
55
|
-
removeContextProperty: function (key) {
|
|
56
|
-
delete context[key];
|
|
57
|
-
computeBytesCountThrottled(context);
|
|
58
|
-
},
|
|
59
|
-
clearContext: function () {
|
|
60
|
-
context = {};
|
|
61
|
-
bytesCountCache = 0;
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
return contextManager;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=contextManager.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextManager.js","sourceRoot":"","sources":["../../../src/tools/serialisation/contextManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAA;AAI3E,MAAM,CAAC,IAAM,kCAAkC,GAAG,GAAG,CAAA;AAIrD,MAAM,UAAU,oBAAoB,CAAC,gBAAkC,EAAE,qBAAyC;IAAzC,sCAAA,EAAA,yCAAyC;IAChH,IAAI,OAAO,GAAY,EAAE,CAAA;IACzB,IAAI,eAAuB,CAAA;IAC3B,IAAI,aAAa,GAAG,KAAK,CAAA;IAEzB,wEAAwE;IACxE,wFAAwF;IAChF,IAAW,0BAA0B,GAAK,QAAQ,CAAC,UAAC,OAAgB;QAC1E,eAAe,GAAG,qBAAqB,CAAC,aAAa,CAAC,OAAO,CAAE,CAAC,CAAA;QAChE,IAAI,CAAC,aAAa,EAAE;YAClB,aAAa,GAAG,8BAA8B,CAAC,eAAe,EAAE,gBAAgB,CAAC,CAAA;SAClF;IACH,CAAC,EAAE,kCAAkC,CAAC,UALO,CAKP;IAEtC,IAAM,cAAc,GAAG;QACrB,aAAa,EAAE,cAAM,OAAA,eAAe,EAAf,CAAe;QACpC,yCAAyC;QACzC,GAAG,EAAE,cAAM,OAAA,OAAO,EAAP,CAAO;QAElB,iDAAiD;QACjD,GAAG,EAAE,UAAC,GAAW,EAAE,KAAU;YAC3B,OAAO,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
|
4
|
-
User = "user",
|
|
5
|
-
GlobalContext = "global context",
|
|
6
|
-
LoggerContext = "logger context"
|
|
7
|
-
}
|
|
8
|
-
export declare function warnIfCustomerDataLimitReached(bytesCount: number, customerDataType: CustomerDataType): boolean;
|