@grafana/faro-core 1.14.3 → 1.15.0
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/dist/bundle/faro-core.iife.js +1 -1
- package/dist/bundle/types/api/const.d.ts +4 -3
- package/dist/bundle/types/api/index.d.ts +2 -2
- package/dist/bundle/types/api/logs/initialize.d.ts +1 -1
- package/dist/bundle/types/api/measurements/initialize.d.ts +1 -2
- package/dist/bundle/types/api/traces/initialize.d.ts +1 -1
- package/dist/bundle/types/api/types.d.ts +16 -6
- package/dist/bundle/types/extensions/baseExtension.d.ts +1 -1
- package/dist/bundle/types/globalObject/globalObject.d.ts +1 -2
- package/dist/bundle/types/index.d.ts +3 -3
- package/dist/bundle/types/testUtils/mockTransport.d.ts +1 -1
- package/dist/bundle/types/utils/index.d.ts +1 -1
- package/dist/bundle/types/utils/reactive.d.ts +12 -41
- package/dist/bundle/types/version.d.ts +1 -1
- package/dist/cjs/api/ItemBuffer.js.map +1 -1
- package/dist/cjs/api/const.js +5 -4
- package/dist/cjs/api/const.js.map +1 -1
- package/dist/cjs/api/events/initialize.js +2 -3
- package/dist/cjs/api/events/initialize.js.map +1 -1
- package/dist/cjs/api/exceptions/const.js.map +1 -1
- package/dist/cjs/api/exceptions/initialize.js +2 -3
- package/dist/cjs/api/exceptions/initialize.js.map +1 -1
- package/dist/cjs/api/index.js +5 -4
- package/dist/cjs/api/index.js.map +1 -1
- package/dist/cjs/api/initialize.js +2 -2
- package/dist/cjs/api/initialize.js.map +1 -1
- package/dist/cjs/api/logs/const.js.map +1 -1
- package/dist/cjs/api/logs/initialize.js +2 -3
- package/dist/cjs/api/logs/initialize.js.map +1 -1
- package/dist/cjs/api/measurements/initialize.js +2 -3
- package/dist/cjs/api/measurements/initialize.js.map +1 -1
- package/dist/cjs/api/meta/initialize.js +1 -2
- package/dist/cjs/api/meta/initialize.js.map +1 -1
- package/dist/cjs/api/traces/initialize.js +1 -2
- package/dist/cjs/api/traces/initialize.js.map +1 -1
- package/dist/cjs/api/types.js.map +1 -1
- package/dist/cjs/api/userActionLifecycleHandler.js +4 -5
- package/dist/cjs/api/userActionLifecycleHandler.js.map +1 -1
- package/dist/cjs/api/utils.js +1 -2
- package/dist/cjs/api/utils.js.map +1 -1
- package/dist/cjs/index.js +6 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/initialize.js +1 -2
- package/dist/cjs/initialize.js.map +1 -1
- package/dist/cjs/instrumentations/base.js.map +1 -1
- package/dist/cjs/instrumentations/initialize.js +1 -2
- package/dist/cjs/instrumentations/initialize.js.map +1 -1
- package/dist/cjs/instrumentations/registerInitial.js +1 -2
- package/dist/cjs/instrumentations/registerInitial.js.map +1 -1
- package/dist/cjs/internalLogger/const.js +1 -1
- package/dist/cjs/internalLogger/const.js.map +1 -1
- package/dist/cjs/internalLogger/createInternalLogger.js +1 -2
- package/dist/cjs/internalLogger/createInternalLogger.js.map +1 -1
- package/dist/cjs/internalLogger/initialize.js +2 -2
- package/dist/cjs/internalLogger/initialize.js.map +1 -1
- package/dist/cjs/metas/initialize.js +1 -2
- package/dist/cjs/metas/initialize.js.map +1 -1
- package/dist/cjs/metas/registerInitial.js +1 -2
- package/dist/cjs/metas/registerInitial.js.map +1 -1
- package/dist/cjs/sdk/faroGlobalObject.js +1 -2
- package/dist/cjs/sdk/faroGlobalObject.js.map +1 -1
- package/dist/cjs/sdk/internalFaroGlobalObject.js +3 -4
- package/dist/cjs/sdk/internalFaroGlobalObject.js.map +1 -1
- package/dist/cjs/sdk/registerFaro.js +2 -2
- package/dist/cjs/sdk/registerFaro.js.map +1 -1
- package/dist/cjs/testUtils/mockConfig.js +1 -2
- package/dist/cjs/testUtils/mockConfig.js.map +1 -1
- package/dist/cjs/testUtils/mockStacktraceParser.js.map +1 -1
- package/dist/cjs/testUtils/mockTransport.js.map +1 -1
- package/dist/cjs/testUtils/testPromise.js +1 -2
- package/dist/cjs/testUtils/testPromise.js.map +1 -1
- package/dist/cjs/transports/batchExecutor.js.map +1 -1
- package/dist/cjs/transports/const.js +1 -1
- package/dist/cjs/transports/const.js.map +1 -1
- package/dist/cjs/transports/initialize.js +1 -2
- package/dist/cjs/transports/initialize.js.map +1 -1
- package/dist/cjs/transports/registerInitial.js +1 -2
- package/dist/cjs/transports/registerInitial.js.map +1 -1
- package/dist/cjs/transports/utils.js +2 -3
- package/dist/cjs/transports/utils.js.map +1 -1
- package/dist/cjs/unpatchedConsole/initialize.js +2 -2
- package/dist/cjs/unpatchedConsole/initialize.js.map +1 -1
- package/dist/cjs/utils/date.js +3 -4
- package/dist/cjs/utils/date.js.map +1 -1
- package/dist/cjs/utils/deepEqual.js +1 -2
- package/dist/cjs/utils/deepEqual.js.map +1 -1
- package/dist/cjs/utils/index.js +1 -2
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/is.js +5 -5
- package/dist/cjs/utils/is.js.map +1 -1
- package/dist/cjs/utils/json.js +3 -4
- package/dist/cjs/utils/json.js.map +1 -1
- package/dist/cjs/utils/logLevels.js +1 -1
- package/dist/cjs/utils/logLevels.js.map +1 -1
- package/dist/cjs/utils/noop.js +1 -2
- package/dist/cjs/utils/noop.js.map +1 -1
- package/dist/cjs/utils/promiseBuffer.js +1 -2
- package/dist/cjs/utils/promiseBuffer.js.map +1 -1
- package/dist/cjs/utils/reactive.js +61 -75
- package/dist/cjs/utils/reactive.js.map +1 -1
- package/dist/cjs/utils/shortId.js +1 -2
- package/dist/cjs/utils/shortId.js.map +1 -1
- package/dist/cjs/utils/sourceMaps.js +1 -2
- package/dist/cjs/utils/sourceMaps.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/api/ItemBuffer.js.map +1 -1
- package/dist/esm/api/const.js +4 -3
- package/dist/esm/api/const.js.map +1 -1
- package/dist/esm/api/events/initialize.js +2 -2
- package/dist/esm/api/events/initialize.js.map +1 -1
- package/dist/esm/api/exceptions/const.js.map +1 -1
- package/dist/esm/api/exceptions/initialize.js +2 -2
- package/dist/esm/api/exceptions/initialize.js.map +1 -1
- package/dist/esm/api/index.js +1 -1
- package/dist/esm/api/index.js.map +1 -1
- package/dist/esm/api/logs/const.js.map +1 -1
- package/dist/esm/api/logs/initialize.js +2 -2
- package/dist/esm/api/logs/initialize.js.map +1 -1
- package/dist/esm/api/measurements/initialize.js +2 -2
- package/dist/esm/api/measurements/initialize.js.map +1 -1
- package/dist/esm/api/meta/initialize.js.map +1 -1
- package/dist/esm/api/traces/initialize.js.map +1 -1
- package/dist/esm/api/types.js.map +1 -1
- package/dist/esm/api/userActionLifecycleHandler.js +4 -4
- package/dist/esm/api/userActionLifecycleHandler.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/initialize.js.map +1 -1
- package/dist/esm/instrumentations/initialize.js.map +1 -1
- package/dist/esm/internalLogger/createInternalLogger.js.map +1 -1
- package/dist/esm/metas/initialize.js.map +1 -1
- package/dist/esm/metas/registerInitial.js.map +1 -1
- package/dist/esm/sdk/faroGlobalObject.js.map +1 -1
- package/dist/esm/sdk/internalFaroGlobalObject.js.map +1 -1
- package/dist/esm/testUtils/mockStacktraceParser.js.map +1 -1
- package/dist/esm/transports/batchExecutor.js.map +1 -1
- package/dist/esm/transports/initialize.js.map +1 -1
- package/dist/esm/transports/utils.js.map +1 -1
- package/dist/esm/utils/deepEqual.js.map +1 -1
- package/dist/esm/utils/index.js +1 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/is.js.map +1 -1
- package/dist/esm/utils/json.js.map +1 -1
- package/dist/esm/utils/promiseBuffer.js.map +1 -1
- package/dist/esm/utils/reactive.js +55 -69
- package/dist/esm/utils/reactive.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/spec/core/src/api/ItemBuffer.js.map +1 -1
- package/dist/spec/core/src/api/const.js +5 -4
- package/dist/spec/core/src/api/const.js.map +1 -1
- package/dist/spec/core/src/api/events/initialize.js +2 -3
- package/dist/spec/core/src/api/events/initialize.js.map +1 -1
- package/dist/spec/core/src/api/events/initialize.test.js +3 -3
- package/dist/spec/core/src/api/events/initialize.test.js.map +1 -1
- package/dist/spec/core/src/api/exceptions/const.js.map +1 -1
- package/dist/spec/core/src/api/exceptions/initialize.js +2 -3
- package/dist/spec/core/src/api/exceptions/initialize.js.map +1 -1
- package/dist/spec/core/src/api/exceptions/initialize.test.js +3 -3
- package/dist/spec/core/src/api/exceptions/initialize.test.js.map +1 -1
- package/dist/spec/core/src/api/index.js +5 -4
- package/dist/spec/core/src/api/index.js.map +1 -1
- package/dist/spec/core/src/api/initialize.js +2 -2
- package/dist/spec/core/src/api/initialize.js.map +1 -1
- package/dist/spec/core/src/api/initialize.test.js +17 -7
- package/dist/spec/core/src/api/initialize.test.js.map +1 -1
- package/dist/spec/core/src/api/logs/const.js.map +1 -1
- package/dist/spec/core/src/api/logs/initialize.js +2 -3
- package/dist/spec/core/src/api/logs/initialize.js.map +1 -1
- package/dist/spec/core/src/api/logs/initialize.test.js +3 -3
- package/dist/spec/core/src/api/logs/initialize.test.js.map +1 -1
- package/dist/spec/core/src/api/measurements/initialize.js +2 -3
- package/dist/spec/core/src/api/measurements/initialize.js.map +1 -1
- package/dist/spec/core/src/api/measurements/initialize.test.js +3 -3
- package/dist/spec/core/src/api/measurements/initialize.test.js.map +1 -1
- package/dist/spec/core/src/api/meta/initialize.js +1 -2
- package/dist/spec/core/src/api/meta/initialize.js.map +1 -1
- package/dist/spec/core/src/api/traces/initialize.js +1 -2
- package/dist/spec/core/src/api/traces/initialize.js.map +1 -1
- package/dist/spec/core/src/api/types.js.map +1 -1
- package/dist/spec/core/src/api/userActionLifecycleHandler.js +4 -5
- package/dist/spec/core/src/api/userActionLifecycleHandler.js.map +1 -1
- package/dist/spec/core/src/api/userActionLifecycleHandler.test.js +26 -9
- package/dist/spec/core/src/api/userActionLifecycleHandler.test.js.map +1 -1
- package/dist/spec/core/src/api/utils.js +1 -2
- package/dist/spec/core/src/api/utils.js.map +1 -1
- package/dist/spec/core/src/index.js +6 -6
- package/dist/spec/core/src/index.js.map +1 -1
- package/dist/spec/core/src/initialize.js +1 -2
- package/dist/spec/core/src/initialize.js.map +1 -1
- package/dist/spec/core/src/instrumentations/base.js.map +1 -1
- package/dist/spec/core/src/instrumentations/initialize.js +1 -2
- package/dist/spec/core/src/instrumentations/initialize.js.map +1 -1
- package/dist/spec/core/src/instrumentations/registerInitial.js +1 -2
- package/dist/spec/core/src/instrumentations/registerInitial.js.map +1 -1
- package/dist/spec/core/src/internalLogger/const.js +1 -1
- package/dist/spec/core/src/internalLogger/const.js.map +1 -1
- package/dist/spec/core/src/internalLogger/createInternalLogger.js +1 -2
- package/dist/spec/core/src/internalLogger/createInternalLogger.js.map +1 -1
- package/dist/spec/core/src/internalLogger/initialize.js +2 -2
- package/dist/spec/core/src/internalLogger/initialize.js.map +1 -1
- package/dist/spec/core/src/metas/initialize.js +1 -2
- package/dist/spec/core/src/metas/initialize.js.map +1 -1
- package/dist/spec/core/src/metas/registerInitial.js +1 -2
- package/dist/spec/core/src/metas/registerInitial.js.map +1 -1
- package/dist/spec/core/src/sdk/faroGlobalObject.js +1 -2
- package/dist/spec/core/src/sdk/faroGlobalObject.js.map +1 -1
- package/dist/spec/core/src/sdk/internalFaroGlobalObject.js +3 -4
- package/dist/spec/core/src/sdk/internalFaroGlobalObject.js.map +1 -1
- package/dist/spec/core/src/sdk/registerFaro.js +2 -2
- package/dist/spec/core/src/sdk/registerFaro.js.map +1 -1
- package/dist/spec/core/src/testUtils/mockConfig.js +1 -2
- package/dist/spec/core/src/testUtils/mockConfig.js.map +1 -1
- package/dist/spec/core/src/testUtils/mockStacktraceParser.js.map +1 -1
- package/dist/spec/core/src/testUtils/mockTransport.js.map +1 -1
- package/dist/spec/core/src/testUtils/testPromise.js +1 -2
- package/dist/spec/core/src/testUtils/testPromise.js.map +1 -1
- package/dist/spec/core/src/transports/batchExecutor.js.map +1 -1
- package/dist/spec/core/src/transports/const.js +1 -1
- package/dist/spec/core/src/transports/const.js.map +1 -1
- package/dist/spec/core/src/transports/initialize.js +1 -2
- package/dist/spec/core/src/transports/initialize.js.map +1 -1
- package/dist/spec/core/src/transports/registerInitial.js +1 -2
- package/dist/spec/core/src/transports/registerInitial.js.map +1 -1
- package/dist/spec/core/src/transports/transports.test.js.map +1 -1
- package/dist/spec/core/src/transports/utils.js +2 -3
- package/dist/spec/core/src/transports/utils.js.map +1 -1
- package/dist/spec/core/src/unpatchedConsole/initialize.js +2 -2
- package/dist/spec/core/src/unpatchedConsole/initialize.js.map +1 -1
- package/dist/spec/core/src/utils/date.js +3 -4
- package/dist/spec/core/src/utils/date.js.map +1 -1
- package/dist/spec/core/src/utils/deepEqual.js +1 -2
- package/dist/spec/core/src/utils/deepEqual.js.map +1 -1
- package/dist/spec/core/src/utils/index.js +1 -2
- package/dist/spec/core/src/utils/index.js.map +1 -1
- package/dist/spec/core/src/utils/is.js +5 -5
- package/dist/spec/core/src/utils/is.js.map +1 -1
- package/dist/spec/core/src/utils/json.js +3 -4
- package/dist/spec/core/src/utils/json.js.map +1 -1
- package/dist/spec/core/src/utils/logLevels.js +1 -1
- package/dist/spec/core/src/utils/logLevels.js.map +1 -1
- package/dist/spec/core/src/utils/noop.js +1 -2
- package/dist/spec/core/src/utils/noop.js.map +1 -1
- package/dist/spec/core/src/utils/promiseBuffer.js +1 -2
- package/dist/spec/core/src/utils/promiseBuffer.js.map +1 -1
- package/dist/spec/core/src/utils/promiseBuffer.test.js +2 -2
- package/dist/spec/core/src/utils/reactive.js +61 -75
- package/dist/spec/core/src/utils/reactive.js.map +1 -1
- package/dist/spec/core/src/utils/reactive.test.js +32 -19
- package/dist/spec/core/src/utils/reactive.test.js.map +1 -1
- package/dist/spec/core/src/utils/shortId.js +1 -2
- package/dist/spec/core/src/utils/shortId.js.map +1 -1
- package/dist/spec/core/src/utils/sourceMaps.js +1 -2
- package/dist/spec/core/src/utils/sourceMaps.js.map +1 -1
- package/dist/spec/core/src/version.js +1 -1
- package/dist/spec/core/src/version.js.map +1 -1
- package/dist/types/api/const.d.ts +4 -3
- package/dist/types/api/index.d.ts +2 -2
- package/dist/types/api/logs/initialize.d.ts +1 -1
- package/dist/types/api/measurements/initialize.d.ts +1 -2
- package/dist/types/api/traces/initialize.d.ts +1 -1
- package/dist/types/api/types.d.ts +16 -6
- package/dist/types/core/src/api/const.d.ts +4 -3
- package/dist/types/core/src/api/index.d.ts +2 -2
- package/dist/types/core/src/api/logs/initialize.d.ts +1 -1
- package/dist/types/core/src/api/measurements/initialize.d.ts +1 -2
- package/dist/types/core/src/api/traces/initialize.d.ts +1 -1
- package/dist/types/core/src/api/types.d.ts +16 -6
- package/dist/types/core/src/extensions/baseExtension.d.ts +1 -1
- package/dist/types/core/src/globalObject/globalObject.d.ts +1 -2
- package/dist/types/core/src/index.d.ts +3 -3
- package/dist/types/core/src/testUtils/mockTransport.d.ts +1 -1
- package/dist/types/core/src/utils/index.d.ts +1 -1
- package/dist/types/core/src/utils/reactive.d.ts +12 -41
- package/dist/types/core/src/version.d.ts +1 -1
- package/dist/types/extensions/baseExtension.d.ts +1 -1
- package/dist/types/globalObject/globalObject.d.ts +1 -2
- package/dist/types/index.d.ts +3 -3
- package/dist/types/testUtils/mockTransport.d.ts +1 -1
- package/dist/types/utils/index.d.ts +1 -1
- package/dist/types/utils/reactive.d.ts +12 -41
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactive.test.js","sourceRoot":"","sources":["../../../../../src/utils/reactive.test.ts"],"names":[],"mappings":";;AAAA,wBAAuC;AAEvC,QAAQ,CAAC,UAAU,EAAE;IACnB,QAAQ,CAAC,YAAY,EAAE;QACrB,EAAE,CAAC,yDAAyD,EAAE;YAC5D,IAAM,UAAU,GAAG,IAAI,cAAU,EAAU,CAAC;YAC5C,IAAM,QAAQ,GAAG,IAAI,CAAC,E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,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACjD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { merge, Observable } from '..';\n\ndescribe('Reactive', () => {\n describe('Observable', () => {\n it('Creates an observable, subscribe to it, and emit values', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n observable.subscribe(callback);\n observable.notify(1);\n observable.notify(2);\n\n expect(callback).toHaveBeenCalledTimes(2);\n expect(callback).toHaveBeenNthCalledWith(1, 1);\n expect(callback).toHaveBeenNthCalledWith(2, 2);\n });\n\n it('Unsubscribes from an observable', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n const subscription = observable.subscribe(callback);\n observable.notify(1);\n\n subscription.unsubscribe();\n observable.notify(2);\n\n expect(callback).toHaveBeenCalledTimes(1);\n expect(callback).toHaveBeenCalledWith(1);\n });\n\n it('Unsubscribes all subscriptions from the observable when unsubscribeAll is called', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n observable.subscribe(callback);\n observable.subscribe(callback);\n observable.subscribe(callback);\n\n observable.notify(1);\n observable.unsubscribeAll();\n\n observable.subscribe(callback);\n observable.subscribe(callback);\n observable.subscribe(callback);\n\n expect(callback).toHaveBeenCalledTimes(3);\n expect(callback).toHaveBeenCalledWith(1);\n });\n\n it('takes emitted values until the predicate returns false', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n observable.takeWhile((value) => value <= 2).subscribe(callback);\n observable.notify(1);\n observable.notify(2);\n observable.notify(3);\n\n expect(callback).toHaveBeenCalledTimes(2);\n expect(callback).toHaveBeenNthCalledWith(1, 1);\n expect(callback).toHaveBeenNthCalledWith(2, 2);\n });\n\n it('subscribes to the first emitted value and unsubscribes after', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n observable.first(callback);\n observable.notify(1);\n observable.notify(2);\n\n expect(callback).toHaveBeenCalledTimes(1);\n expect(callback).toHaveBeenCalledWith(1);\n });\n\n it('unsubscribes a callback from the list of subscribers', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n const sub = observable.subscribe(callback);\n observable.notify(1);\n sub.unsubscribe();\n observable.notify(2);\n\n expect(callback).toHaveBeenCalledTimes(1);\n expect(callback).toHaveBeenCalledWith(1);\n });\n });\n\n describe('Merge', () => {\n it('Merges multiple observables into a single observable using the merge() function', () => {\n const observable1 = new Observable<number | string>();\n const observable2 = new Observable<number | string>();\n const callback = jest.fn();\n\n merge(observable1, observable2).subscribe(callback);\n\n observable1.notify(1);\n observable2.notify('A');\n observable1.notify(2);\n observable2.notify('B');\n\n expect(callback).toHaveBeenCalledTimes(4);\n expect(callback).toHaveBeenNthCalledWith(1, 1);\n expect(callback).toHaveBeenNthCalledWith(2, 'A');\n expect(callback).toHaveBeenNthCalledWith(3, 2);\n expect(callback).toHaveBeenNthCalledWith(4, 'B');\n });\n\n it('Unsubscribes from all observables when merge.unsubscribeAll isCalled', () => {\n const observable1 = new Observable<number>();\n const observable2 = new Observable<number>();\n const callback = jest.fn();\n\n const mergeObserver = merge(observable1, observable2);\n mergeObserver.subscribe(callback);\n\n observable1.notify(1);\n observable2.notify(2);\n\n mergeObserver.unsubscribeAll();\n observable1.notify(3);\n observable2.notify(4);\n\n expect(callback).toHaveBeenCalledTimes(2);\n expect(callback).toHaveBeenNthCalledWith(1, 1);\n expect(callback).toHaveBeenNthCalledWith(2, 2);\n });\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"reactive.test.js","sourceRoot":"","sources":["../../../../../src/utils/reactive.test.ts"],"names":[],"mappings":";;AAAA,wBAA0C;AAE1C,QAAQ,CAAC,UAAU,EAAE;IACnB,QAAQ,CAAC,YAAY,EAAE;QACrB,EAAE,CAAC,yDAAyD,EAAE;YAC5D,IAAM,UAAU,GAAG,IAAI,cAAU,EAAU,CAAC;YAC5C,IAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;YAE3B,UAAU,CAAC,SAAS,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C,KAAK,IAAK,OAAA,CAAC,IAAA,YAAQ,EAAC,KAAK,CAAC,EAAhB,CAAgB,CAAC,CAAC;YAChH,IAAM,QAAQ,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;YAE3B,IAAI,mBAAmB,GAAG,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YAEzD,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACrB,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACrB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YAClC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACrB,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACrB,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YAErB,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,QAAQ,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;YAEzC,qFAAqF;YACrF,QAAQ,CAAC,SAAS,EAAE,CAAC;YACrB,mBAAmB,GAAG,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;YACrD,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACrB,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACrB,mBAAmB,CAAC,WAAW,EAAE,CAAC;YAElC,MAAM,CAAC,QAAQ,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,QAAQ,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { isString, Observable } from '..';\n\ndescribe('Reactive', () => {\n describe('Observable', () => {\n it('Creates an observable, subscribe to it, and emit values', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n observable.subscribe(callback);\n observable.notify(1);\n observable.notify(2);\n\n expect(callback).toHaveBeenCalledTimes(2);\n expect(callback).toHaveBeenNthCalledWith(1, 1);\n expect(callback).toHaveBeenNthCalledWith(2, 2);\n });\n\n it('Unsubscribes from an observable', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n const subscription = observable.subscribe(callback);\n observable.notify(1);\n\n subscription.unsubscribe();\n observable.notify(2);\n\n expect(callback).toHaveBeenCalledTimes(1);\n expect(callback).toHaveBeenCalledWith(1);\n });\n\n it('takes emitted values until the predicate returns false', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n observable.takeWhile((value) => value <= 2).subscribe(callback);\n observable.notify(1);\n observable.notify(2);\n observable.notify(3);\n\n expect(callback).toHaveBeenCalledTimes(2);\n expect(callback).toHaveBeenNthCalledWith(1, 1);\n expect(callback).toHaveBeenNthCalledWith(2, 2);\n });\n\n it('subscribes to the first emitted value and unsubscribes after', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n observable.first().subscribe(callback);\n observable.notify(1);\n observable.notify(2);\n\n expect(callback).toHaveBeenCalledTimes(1);\n expect(callback).toHaveBeenCalledWith(1);\n });\n\n it('unsubscribes a callback from the list of subscribers', () => {\n const observable = new Observable<number>();\n const callback = jest.fn();\n\n const sub = observable.subscribe(callback);\n observable.notify(1);\n sub.unsubscribe();\n observable.notify(2);\n\n expect(callback).toHaveBeenCalledTimes(1);\n expect(callback).toHaveBeenCalledWith(1);\n });\n });\n\n describe('Merge', () => {\n it('Merges multiple observables into a single observable using the merge() function', () => {\n const observable1 = new Observable<number | string>();\n const observable2 = new Observable<number | string>();\n const callback = jest.fn();\n\n const mergeObserverSub = new Observable<number | string>().merge(observable1, observable2).subscribe(callback);\n\n observable1.notify(1);\n observable2.notify('A');\n observable1.notify(2);\n observable2.notify('B');\n\n expect(callback).toHaveBeenCalledTimes(4);\n expect(callback).toHaveBeenNthCalledWith(1, 1);\n expect(callback).toHaveBeenNthCalledWith(2, 'A');\n expect(callback).toHaveBeenNthCalledWith(3, 2);\n expect(callback).toHaveBeenNthCalledWith(4, 'B');\n\n mergeObserverSub.unsubscribe();\n observable1.notify(3);\n observable2.notify('C');\n expect(callback).toHaveBeenCalledTimes(4);\n expect(callback).not.toHaveBeenNthCalledWith(5, 3);\n expect(callback).not.toHaveBeenNthCalledWith(6, 'C');\n });\n\n it('Unsubscribes from all observables when merge.unsubscribeAll isCalled', () => {\n const observable1 = new Observable<number>();\n const observable2 = new Observable<number>();\n const callback = jest.fn();\n\n const mergeObserverSub = new Observable<number>().merge(observable1, observable2);\n mergeObserverSub.subscribe(callback);\n\n observable1.notify(1);\n observable2.notify(2);\n\n mergeObserverSub.unsubscribe(callback);\n observable1.notify(3);\n observable2.notify(4);\n\n expect(callback).toHaveBeenCalledTimes(2);\n expect(callback).toHaveBeenNthCalledWith(1, 1);\n expect(callback).toHaveBeenNthCalledWith(2, 2);\n });\n\n it('Unsubscribes from all chained observables when unsubscribe is called on the final operator in the chain', () => {\n const observable = new Observable<number>().takeWhile((value) => value < 3).filter((value) => !isString(value));\n const callback = jest.fn();\n\n let chainedSubscription = observable.subscribe(callback);\n\n observable.notify(1);\n observable.notify(2);\n chainedSubscription.unsubscribe();\n observable.notify(3);\n observable.notify(4);\n observable.notify(5);\n\n expect(callback).toHaveBeenCalledTimes(2);\n expect(callback).toHaveBeenCalledWith(2);\n\n // If we would have a left over (pending) subscription, it would be called more times\n callback.mockClear();\n chainedSubscription = observable.subscribe(callback);\n observable.notify(1);\n observable.notify(2);\n chainedSubscription.unsubscribe();\n\n expect(callback).toHaveBeenCalledTimes(2);\n expect(callback).toHaveBeenCalledWith(2);\n });\n });\n});\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.genShortID =
|
|
3
|
+
exports.genShortID = genShortID;
|
|
4
4
|
var alphabet = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789';
|
|
5
5
|
function genShortID(length) {
|
|
6
6
|
if (length === void 0) { length = 10; }
|
|
@@ -8,5 +8,4 @@ function genShortID(length) {
|
|
|
8
8
|
.map(function () { return alphabet[Math.floor(Math.random() * alphabet.length)]; })
|
|
9
9
|
.join('');
|
|
10
10
|
}
|
|
11
|
-
exports.genShortID = genShortID;
|
|
12
11
|
//# sourceMappingURL=shortId.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortId.js","sourceRoot":"","sources":["../../../../../src/utils/shortId.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shortId.js","sourceRoot":"","sources":["../../../../../src/utils/shortId.ts"],"names":[],"mappings":";;AAEA,gCAIC;AAND,IAAM,QAAQ,GAAG,6DAA6D,CAAC;AAE/E,SAAgB,UAAU,CAAC,MAAW;IAAX,uBAAA,EAAA,WAAW;IACpC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SAC7B,GAAG,CAAC,cAAM,OAAA,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAE,EAAtD,CAAsD,CAAC;SACjE,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC","sourcesContent":["const alphabet = 'abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ0123456789';\n\nexport function genShortID(length = 10): string {\n return Array.from(Array(length))\n .map(() => alphabet[Math.floor(Math.random() * alphabet.length)]!)\n .join('');\n}\n"]}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBundleId =
|
|
3
|
+
exports.getBundleId = getBundleId;
|
|
4
4
|
var globalObject_1 = require("../globalObject");
|
|
5
5
|
function getBundleId(appName) {
|
|
6
6
|
return globalObject_1.globalObject === null || globalObject_1.globalObject === void 0 ? void 0 : globalObject_1.globalObject["__faroBundleId_".concat(appName)];
|
|
7
7
|
}
|
|
8
|
-
exports.getBundleId = getBundleId;
|
|
9
8
|
//# sourceMappingURL=sourceMaps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sourceMaps.js","sourceRoot":"","sources":["../../../../../src/utils/sourceMaps.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sourceMaps.js","sourceRoot":"","sources":["../../../../../src/utils/sourceMaps.ts"],"names":[],"mappings":";;AAEA,kCAEC;AAJD,gDAA+C;AAE/C,SAAgB,WAAW,CAAC,OAAe;IACzC,OAAQ,2BAAoB,aAApB,2BAAY,uBAAZ,2BAAY,CAAW,yBAAkB,OAAO,CAAE,CAAC,CAAC;AAC9D,CAAC","sourcesContent":["import { globalObject } from '../globalObject';\n\nexport function getBundleId(appName: string): string | undefined {\n return (globalObject as any)?.[`__faroBundleId_${appName}`];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/version.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACzB,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// auto-generated by bin/genVersion.ts\nexport const VERSION = '1.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/version.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACzB,QAAA,OAAO,GAAG,QAAQ,CAAC","sourcesContent":["// auto-generated by bin/genVersion.ts\nexport const VERSION = '1.15.0';\n"]}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
export declare const USER_ACTION_START = "user-action-start";
|
|
2
|
+
export declare const USER_ACTION_END = "user-action-end";
|
|
3
|
+
export declare const USER_ACTION_CANCEL = "user-action-cancel";
|
|
4
|
+
export declare const USER_ACTION_HALT = "user-action-halt";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { initializeAPI } from './initialize';
|
|
2
|
-
export type { API, APIEvent, ApiMessageBusMessages, UserActionCancelMessage, UserActionEndMessage, UserActionStartMessage, UserAction, } from './types';
|
|
2
|
+
export type { API, APIEvent, ApiMessageBusMessages, UserActionCancelMessage, UserActionEndMessage, UserActionStartMessage, UserActionHaltMessage, UserAction, } from './types';
|
|
3
3
|
export type { EventAttributes, EventEvent, EventsAPI, PushEventOptions } from './events';
|
|
4
4
|
export { defaultExceptionType, defaultErrorArgsSerializer } from './exceptions';
|
|
5
5
|
export type { ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, PushErrorOptions, Stacktrace, StacktraceParser, } from './exceptions';
|
|
@@ -9,4 +9,4 @@ export type { MeasurementEvent, MeasurementsAPI, PushMeasurementOptions } from '
|
|
|
9
9
|
export type { MetaAPI } from './meta';
|
|
10
10
|
export type { OTELApi, TraceContext, TraceEvent, TracesAPI } from './traces';
|
|
11
11
|
export { apiMessageBus } from './initialize';
|
|
12
|
-
export {
|
|
12
|
+
export { USER_ACTION_CANCEL, USER_ACTION_END, USER_ACTION_START, USER_ACTION_HALT } from './const';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Config } from '../../config';
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
|
-
import { TransportItem, Transports } from '../../transports';
|
|
4
|
+
import type { TransportItem, Transports } from '../../transports';
|
|
5
5
|
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
6
6
|
import type { ItemBuffer } from '../ItemBuffer';
|
|
7
7
|
import type { TracesAPI } from '../traces';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { Config } from '../../config';
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
|
-
import { TransportItem } from '../../transports';
|
|
5
|
-
import type { Transports } from '../../transports';
|
|
4
|
+
import type { TransportItem, Transports } from '../../transports';
|
|
6
5
|
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
7
6
|
import type { ItemBuffer } from '../ItemBuffer';
|
|
8
7
|
import type { TracesAPI } from '../traces';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Config } from '../../config';
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
|
-
import { Transports } from '../../transports';
|
|
4
|
+
import type { Transports } from '../../transports/types';
|
|
5
5
|
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
6
6
|
import type { TracesAPI } from './types';
|
|
7
7
|
export declare function initializeTracesAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config, metas: Metas, transports: Transports): TracesAPI;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { USER_ACTION_CANCEL, USER_ACTION_END, USER_ACTION_HALT, USER_ACTION_START } from './const';
|
|
2
2
|
import type { EventEvent, EventsAPI } from './events';
|
|
3
3
|
import type { ExceptionEvent, ExceptionsAPI } from './exceptions';
|
|
4
4
|
import type { LogEvent, LogsAPI } from './logs';
|
|
@@ -7,10 +7,10 @@ import type { MetaAPI } from './meta';
|
|
|
7
7
|
import type { TraceEvent, TracesAPI } from './traces';
|
|
8
8
|
export type APIEvent = LogEvent | ExceptionEvent | MeasurementEvent | TraceEvent | EventEvent;
|
|
9
9
|
export type API = LogsAPI & ExceptionsAPI & MeasurementsAPI & TracesAPI & MetaAPI & EventsAPI;
|
|
10
|
-
export type ApiMessageBusMessages = UserActionStartMessage | UserActionEndMessage | UserActionCancelMessage;
|
|
11
|
-
export type UserActionMessageType = typeof
|
|
10
|
+
export type ApiMessageBusMessages = UserActionStartMessage | UserActionEndMessage | UserActionCancelMessage | UserActionHaltMessage;
|
|
11
|
+
export type UserActionMessageType = typeof USER_ACTION_START | typeof USER_ACTION_END | typeof USER_ACTION_CANCEL | typeof USER_ACTION_HALT;
|
|
12
12
|
export type UserActionStartMessage = {
|
|
13
|
-
type: typeof
|
|
13
|
+
type: typeof USER_ACTION_START;
|
|
14
14
|
name: string;
|
|
15
15
|
startTime: number;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export type UserActionStartMessage = {
|
|
|
19
19
|
parentId: string;
|
|
20
20
|
};
|
|
21
21
|
export type UserActionEndMessage = {
|
|
22
|
-
type: typeof
|
|
22
|
+
type: typeof USER_ACTION_END;
|
|
23
23
|
name: string;
|
|
24
24
|
startTime: number;
|
|
25
25
|
endTime: number;
|
|
@@ -31,13 +31,23 @@ export type UserActionEndMessage = {
|
|
|
31
31
|
id: string;
|
|
32
32
|
};
|
|
33
33
|
export type UserActionCancelMessage = {
|
|
34
|
-
type: typeof
|
|
34
|
+
type: typeof USER_ACTION_CANCEL;
|
|
35
35
|
name: string;
|
|
36
36
|
/**
|
|
37
37
|
* Unique identifier of the parent user action to which this action belongs.
|
|
38
38
|
*/
|
|
39
39
|
parentId?: string;
|
|
40
40
|
};
|
|
41
|
+
export type UserActionHaltMessage = {
|
|
42
|
+
type: typeof USER_ACTION_HALT;
|
|
43
|
+
name: string;
|
|
44
|
+
reason: 'pending-requests';
|
|
45
|
+
haltTime: number;
|
|
46
|
+
/**
|
|
47
|
+
* Unique identifier of the parent user action to which this action belongs.
|
|
48
|
+
*/
|
|
49
|
+
parentId?: string;
|
|
50
|
+
};
|
|
41
51
|
export type UserAction = {
|
|
42
52
|
name: string;
|
|
43
53
|
id?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
export declare const USER_ACTION_START = "user-action-start";
|
|
2
|
+
export declare const USER_ACTION_END = "user-action-end";
|
|
3
|
+
export declare const USER_ACTION_CANCEL = "user-action-cancel";
|
|
4
|
+
export declare const USER_ACTION_HALT = "user-action-halt";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { initializeAPI } from './initialize';
|
|
2
|
-
export type { API, APIEvent, ApiMessageBusMessages, UserActionCancelMessage, UserActionEndMessage, UserActionStartMessage, UserAction, } from './types';
|
|
2
|
+
export type { API, APIEvent, ApiMessageBusMessages, UserActionCancelMessage, UserActionEndMessage, UserActionStartMessage, UserActionHaltMessage, UserAction, } from './types';
|
|
3
3
|
export type { EventAttributes, EventEvent, EventsAPI, PushEventOptions } from './events';
|
|
4
4
|
export { defaultExceptionType, defaultErrorArgsSerializer } from './exceptions';
|
|
5
5
|
export type { ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, PushErrorOptions, Stacktrace, StacktraceParser, } from './exceptions';
|
|
@@ -9,4 +9,4 @@ export type { MeasurementEvent, MeasurementsAPI, PushMeasurementOptions } from '
|
|
|
9
9
|
export type { MetaAPI } from './meta';
|
|
10
10
|
export type { OTELApi, TraceContext, TraceEvent, TracesAPI } from './traces';
|
|
11
11
|
export { apiMessageBus } from './initialize';
|
|
12
|
-
export {
|
|
12
|
+
export { USER_ACTION_CANCEL, USER_ACTION_END, USER_ACTION_START, USER_ACTION_HALT } from './const';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Config } from '../../config';
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
|
-
import { TransportItem, Transports } from '../../transports';
|
|
4
|
+
import type { TransportItem, Transports } from '../../transports';
|
|
5
5
|
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
6
6
|
import type { ItemBuffer } from '../ItemBuffer';
|
|
7
7
|
import type { TracesAPI } from '../traces';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { Config } from '../../config';
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
|
-
import { TransportItem } from '../../transports';
|
|
5
|
-
import type { Transports } from '../../transports';
|
|
4
|
+
import type { TransportItem, Transports } from '../../transports';
|
|
6
5
|
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
7
6
|
import type { ItemBuffer } from '../ItemBuffer';
|
|
8
7
|
import type { TracesAPI } from '../traces';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Config } from '../../config';
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
|
-
import { Transports } from '../../transports';
|
|
4
|
+
import type { Transports } from '../../transports/types';
|
|
5
5
|
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
6
6
|
import type { TracesAPI } from './types';
|
|
7
7
|
export declare function initializeTracesAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config, metas: Metas, transports: Transports): TracesAPI;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { USER_ACTION_CANCEL, USER_ACTION_END, USER_ACTION_HALT, USER_ACTION_START } from './const';
|
|
2
2
|
import type { EventEvent, EventsAPI } from './events';
|
|
3
3
|
import type { ExceptionEvent, ExceptionsAPI } from './exceptions';
|
|
4
4
|
import type { LogEvent, LogsAPI } from './logs';
|
|
@@ -7,10 +7,10 @@ import type { MetaAPI } from './meta';
|
|
|
7
7
|
import type { TraceEvent, TracesAPI } from './traces';
|
|
8
8
|
export type APIEvent = LogEvent | ExceptionEvent | MeasurementEvent | TraceEvent | EventEvent;
|
|
9
9
|
export type API = LogsAPI & ExceptionsAPI & MeasurementsAPI & TracesAPI & MetaAPI & EventsAPI;
|
|
10
|
-
export type ApiMessageBusMessages = UserActionStartMessage | UserActionEndMessage | UserActionCancelMessage;
|
|
11
|
-
export type UserActionMessageType = typeof
|
|
10
|
+
export type ApiMessageBusMessages = UserActionStartMessage | UserActionEndMessage | UserActionCancelMessage | UserActionHaltMessage;
|
|
11
|
+
export type UserActionMessageType = typeof USER_ACTION_START | typeof USER_ACTION_END | typeof USER_ACTION_CANCEL | typeof USER_ACTION_HALT;
|
|
12
12
|
export type UserActionStartMessage = {
|
|
13
|
-
type: typeof
|
|
13
|
+
type: typeof USER_ACTION_START;
|
|
14
14
|
name: string;
|
|
15
15
|
startTime: number;
|
|
16
16
|
/**
|
|
@@ -19,7 +19,7 @@ export type UserActionStartMessage = {
|
|
|
19
19
|
parentId: string;
|
|
20
20
|
};
|
|
21
21
|
export type UserActionEndMessage = {
|
|
22
|
-
type: typeof
|
|
22
|
+
type: typeof USER_ACTION_END;
|
|
23
23
|
name: string;
|
|
24
24
|
startTime: number;
|
|
25
25
|
endTime: number;
|
|
@@ -31,13 +31,23 @@ export type UserActionEndMessage = {
|
|
|
31
31
|
id: string;
|
|
32
32
|
};
|
|
33
33
|
export type UserActionCancelMessage = {
|
|
34
|
-
type: typeof
|
|
34
|
+
type: typeof USER_ACTION_CANCEL;
|
|
35
35
|
name: string;
|
|
36
36
|
/**
|
|
37
37
|
* Unique identifier of the parent user action to which this action belongs.
|
|
38
38
|
*/
|
|
39
39
|
parentId?: string;
|
|
40
40
|
};
|
|
41
|
+
export type UserActionHaltMessage = {
|
|
42
|
+
type: typeof USER_ACTION_HALT;
|
|
43
|
+
name: string;
|
|
44
|
+
reason: 'pending-requests';
|
|
45
|
+
haltTime: number;
|
|
46
|
+
/**
|
|
47
|
+
* Unique identifier of the parent user action to which this action belongs.
|
|
48
|
+
*/
|
|
49
|
+
parentId?: string;
|
|
50
|
+
};
|
|
41
51
|
export type UserAction = {
|
|
42
52
|
name: string;
|
|
43
53
|
id?: string;
|
|
@@ -6,7 +6,7 @@ export declare abstract class BaseExtension implements Extension {
|
|
|
6
6
|
abstract readonly version: string;
|
|
7
7
|
unpatchedConsole: Console;
|
|
8
8
|
internalLogger: import("../internalLogger").InternalLogger;
|
|
9
|
-
config: Config
|
|
9
|
+
config: Config;
|
|
10
10
|
metas: Metas;
|
|
11
11
|
logDebug(...args: unknown[]): void;
|
|
12
12
|
logInfo(...args: unknown[]): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { Faro, internalGlobalObjectKey } from '../sdk';
|
|
3
2
|
export type GlobalObject<T = typeof globalThis | typeof global | typeof self> = T & {
|
|
4
3
|
[label: string]: Faro;
|
|
5
4
|
[internalGlobalObjectKey]: Faro;
|
|
6
5
|
};
|
|
7
|
-
export declare const globalObject: GlobalObject
|
|
6
|
+
export declare const globalObject: GlobalObject;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { defaultExceptionType, defaultLogArgsSerializer, defaultErrorArgsSerializer, apiMessageBus,
|
|
2
|
-
export type { API, APIEvent, EventAttributes, EventEvent, EventsAPI, ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, LogArgsSerializer, LogContext, LogEvent, LogsAPI, MeasurementEvent, MeasurementsAPI, MetaAPI, OTELApi, PushErrorOptions, PushEventOptions, PushLogOptions, PushMeasurementOptions, Stacktrace, StacktraceParser, TraceContext, TraceEvent, TracesAPI, ApiMessageBusMessages, UserActionStartMessage, UserActionEndMessage, UserActionCancelMessage, UserAction, } from './api';
|
|
1
|
+
export { defaultExceptionType, defaultLogArgsSerializer, defaultErrorArgsSerializer, apiMessageBus, USER_ACTION_CANCEL, USER_ACTION_END, USER_ACTION_START, USER_ACTION_HALT, } from './api';
|
|
2
|
+
export type { API, APIEvent, EventAttributes, EventEvent, EventsAPI, ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, LogArgsSerializer, LogContext, LogEvent, LogsAPI, MeasurementEvent, MeasurementsAPI, MetaAPI, OTELApi, PushErrorOptions, PushEventOptions, PushLogOptions, PushMeasurementOptions, Stacktrace, StacktraceParser, TraceContext, TraceEvent, TracesAPI, ApiMessageBusMessages, UserActionStartMessage, UserActionEndMessage, UserActionCancelMessage, UserActionHaltMessage, UserAction, } from './api';
|
|
3
3
|
export { BaseExtension } from './extensions';
|
|
4
4
|
export type { Extension } from './extensions';
|
|
5
5
|
export { globalObject } from './globalObject';
|
|
@@ -19,7 +19,7 @@ export { BaseTransport, getTransportBody, TransportItemType, transportItemTypeTo
|
|
|
19
19
|
export type { BeforeSendHook, SendFn, Transport, TransportBody, TransportItem, TransportItemPayload, Transports, } from './transports';
|
|
20
20
|
export { defaultUnpatchedConsole } from './unpatchedConsole';
|
|
21
21
|
export type { UnpatchedConsole } from './unpatchedConsole';
|
|
22
|
-
export { allLogLevels, createPromiseBuffer, deepEqual, defaultLogLevel, genShortID, getCurrentTimestamp, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, LogLevel, noop, dateNow, isEmpty, getCircularDependencyReplacer, stringifyExternalJson, stringifyObjectValues, Observable,
|
|
22
|
+
export { allLogLevels, createPromiseBuffer, deepEqual, defaultLogLevel, genShortID, getCurrentTimestamp, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, LogLevel, noop, dateNow, isEmpty, getCircularDependencyReplacer, stringifyExternalJson, stringifyObjectValues, Observable, } from './utils';
|
|
23
23
|
export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue, BufferItem, PromiseBuffer, PromiseBufferOptions, PromiseProducer, Subscription, } from './utils';
|
|
24
24
|
export { VERSION } from './version';
|
|
25
25
|
export { unknownString } from './consts';
|
|
@@ -4,7 +4,7 @@ import type { Transport, TransportItem } from '../transports';
|
|
|
4
4
|
export declare class MockTransport extends BaseTransport implements Transport {
|
|
5
5
|
private ignoreURLs;
|
|
6
6
|
readonly name = "@grafana/transport-mock";
|
|
7
|
-
readonly version = "1.
|
|
7
|
+
readonly version = "1.15.0";
|
|
8
8
|
items: TransportItem[];
|
|
9
9
|
constructor(ignoreURLs?: Patterns);
|
|
10
10
|
send(items: TransportItem[]): void | Promise<void>;
|
|
@@ -11,5 +11,5 @@ export { genShortID } from './shortId';
|
|
|
11
11
|
export { getBundleId } from './sourceMaps';
|
|
12
12
|
export { dateNow } from './date';
|
|
13
13
|
export { getCircularDependencyReplacer, stringifyExternalJson, stringifyObjectValues } from './json';
|
|
14
|
-
export { Observable
|
|
14
|
+
export { Observable } from './reactive';
|
|
15
15
|
export type { Subscription } from './reactive';
|
|
@@ -1,46 +1,17 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Subscription = {
|
|
2
2
|
unsubscribe: () => void;
|
|
3
|
-
}
|
|
3
|
+
};
|
|
4
|
+
type Subscriber<T> = (value: T) => void;
|
|
4
5
|
export declare class Observable<T = any> {
|
|
5
6
|
private subscribers;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* @returns A subscription object with an unsubscribe method to cancel the subscription.
|
|
11
|
-
*/
|
|
12
|
-
subscribe(callback: (data: T) => void): Subscription;
|
|
13
|
-
/**
|
|
14
|
-
* Notifies all subscribers with the given data.
|
|
15
|
-
* @param data - The data to emit to all subscribers.
|
|
16
|
-
*/
|
|
17
|
-
notify(data: T): void;
|
|
18
|
-
/**
|
|
19
|
-
* Subscribes a callback function to the observable and automatically unsubscribes after the first emission.
|
|
20
|
-
* @param callback - The function to call when the observable emits a value.
|
|
21
|
-
* @returns A subscription object with an unsubscribe method to cancel the subscription.
|
|
22
|
-
*/
|
|
23
|
-
first(callback: (data: T) => void): Subscription;
|
|
24
|
-
/**
|
|
25
|
-
* Emits values from the source observable until the provided predicate function returns false.
|
|
26
|
-
* @param predicate - A function that evaluates each value emitted by the source observable.
|
|
27
|
-
* @returns A new observable that emits values from the source observable while the predicate returns true.
|
|
28
|
-
*/
|
|
7
|
+
subscribe(subscriber: Subscriber<T>): Subscription;
|
|
8
|
+
unsubscribe(subscriber: Subscriber<T>): void;
|
|
9
|
+
notify(value: T): void;
|
|
10
|
+
first(): Observable<T>;
|
|
29
11
|
takeWhile(predicate: (value: T) => boolean): Observable<T>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* This method sets the `subscribers` array to an empty array, effectively removing all current subscribers.
|
|
35
|
-
*/
|
|
36
|
-
unsubscribeAll(): void;
|
|
37
|
-
private unsubscribe;
|
|
12
|
+
filter(predicate: (value: T) => boolean): Observable<T>;
|
|
13
|
+
merge(...observables: Array<Observable<T>>): Observable<T>;
|
|
14
|
+
private withUnsubscribeOverride;
|
|
15
|
+
private unsubscribeAll;
|
|
38
16
|
}
|
|
39
|
-
|
|
40
|
-
* Merges multiple observables into a single observable.
|
|
41
|
-
*
|
|
42
|
-
* @template T - The type of the values emitted by the observables.
|
|
43
|
-
* @param {...Observable[]} observables - The observables to merge.
|
|
44
|
-
* @returns {Observable} A new observable that emits values from all input observables.
|
|
45
|
-
*/
|
|
46
|
-
export declare function merge<T>(...observables: Array<Observable<T>>): Observable<T>;
|
|
17
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.15.0";
|
|
@@ -6,7 +6,7 @@ export declare abstract class BaseExtension implements Extension {
|
|
|
6
6
|
abstract readonly version: string;
|
|
7
7
|
unpatchedConsole: Console;
|
|
8
8
|
internalLogger: import("../internalLogger").InternalLogger;
|
|
9
|
-
config: Config
|
|
9
|
+
config: Config;
|
|
10
10
|
metas: Metas;
|
|
11
11
|
logDebug(...args: unknown[]): void;
|
|
12
12
|
logInfo(...args: unknown[]): void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { Faro, internalGlobalObjectKey } from '../sdk';
|
|
3
2
|
export type GlobalObject<T = typeof globalThis | typeof global | typeof self> = T & {
|
|
4
3
|
[label: string]: Faro;
|
|
5
4
|
[internalGlobalObjectKey]: Faro;
|
|
6
5
|
};
|
|
7
|
-
export declare const globalObject: GlobalObject
|
|
6
|
+
export declare const globalObject: GlobalObject;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { defaultExceptionType, defaultLogArgsSerializer, defaultErrorArgsSerializer, apiMessageBus,
|
|
2
|
-
export type { API, APIEvent, EventAttributes, EventEvent, EventsAPI, ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, LogArgsSerializer, LogContext, LogEvent, LogsAPI, MeasurementEvent, MeasurementsAPI, MetaAPI, OTELApi, PushErrorOptions, PushEventOptions, PushLogOptions, PushMeasurementOptions, Stacktrace, StacktraceParser, TraceContext, TraceEvent, TracesAPI, ApiMessageBusMessages, UserActionStartMessage, UserActionEndMessage, UserActionCancelMessage, UserAction, } from './api';
|
|
1
|
+
export { defaultExceptionType, defaultLogArgsSerializer, defaultErrorArgsSerializer, apiMessageBus, USER_ACTION_CANCEL, USER_ACTION_END, USER_ACTION_START, USER_ACTION_HALT, } from './api';
|
|
2
|
+
export type { API, APIEvent, EventAttributes, EventEvent, EventsAPI, ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, LogArgsSerializer, LogContext, LogEvent, LogsAPI, MeasurementEvent, MeasurementsAPI, MetaAPI, OTELApi, PushErrorOptions, PushEventOptions, PushLogOptions, PushMeasurementOptions, Stacktrace, StacktraceParser, TraceContext, TraceEvent, TracesAPI, ApiMessageBusMessages, UserActionStartMessage, UserActionEndMessage, UserActionCancelMessage, UserActionHaltMessage, UserAction, } from './api';
|
|
3
3
|
export { BaseExtension } from './extensions';
|
|
4
4
|
export type { Extension } from './extensions';
|
|
5
5
|
export { globalObject } from './globalObject';
|
|
@@ -19,7 +19,7 @@ export { BaseTransport, getTransportBody, TransportItemType, transportItemTypeTo
|
|
|
19
19
|
export type { BeforeSendHook, SendFn, Transport, TransportBody, TransportItem, TransportItemPayload, Transports, } from './transports';
|
|
20
20
|
export { defaultUnpatchedConsole } from './unpatchedConsole';
|
|
21
21
|
export type { UnpatchedConsole } from './unpatchedConsole';
|
|
22
|
-
export { allLogLevels, createPromiseBuffer, deepEqual, defaultLogLevel, genShortID, getCurrentTimestamp, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, LogLevel, noop, dateNow, isEmpty, getCircularDependencyReplacer, stringifyExternalJson, stringifyObjectValues, Observable,
|
|
22
|
+
export { allLogLevels, createPromiseBuffer, deepEqual, defaultLogLevel, genShortID, getCurrentTimestamp, isArray, isBoolean, isDomError, isDomException, isElement, isElementDefined, isError, isErrorDefined, isErrorEvent, isEvent, isEventDefined, isFunction, isInstanceOf, isInt, isMap, isMapDefined, isNull, isNumber, isObject, isPrimitive, isRegExp, isString, isSymbol, isSyntheticEvent, isThenable, isToString, isTypeof, isUndefined, LogLevel, noop, dateNow, isEmpty, getCircularDependencyReplacer, stringifyExternalJson, stringifyObjectValues, Observable, } from './utils';
|
|
23
23
|
export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue, BufferItem, PromiseBuffer, PromiseBufferOptions, PromiseProducer, Subscription, } from './utils';
|
|
24
24
|
export { VERSION } from './version';
|
|
25
25
|
export { unknownString } from './consts';
|
|
@@ -4,7 +4,7 @@ import type { Transport, TransportItem } from '../transports';
|
|
|
4
4
|
export declare class MockTransport extends BaseTransport implements Transport {
|
|
5
5
|
private ignoreURLs;
|
|
6
6
|
readonly name = "@grafana/transport-mock";
|
|
7
|
-
readonly version = "1.
|
|
7
|
+
readonly version = "1.15.0";
|
|
8
8
|
items: TransportItem[];
|
|
9
9
|
constructor(ignoreURLs?: Patterns);
|
|
10
10
|
send(items: TransportItem[]): void | Promise<void>;
|
|
@@ -11,5 +11,5 @@ export { genShortID } from './shortId';
|
|
|
11
11
|
export { getBundleId } from './sourceMaps';
|
|
12
12
|
export { dateNow } from './date';
|
|
13
13
|
export { getCircularDependencyReplacer, stringifyExternalJson, stringifyObjectValues } from './json';
|
|
14
|
-
export { Observable
|
|
14
|
+
export { Observable } from './reactive';
|
|
15
15
|
export type { Subscription } from './reactive';
|
|
@@ -1,46 +1,17 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Subscription = {
|
|
2
2
|
unsubscribe: () => void;
|
|
3
|
-
}
|
|
3
|
+
};
|
|
4
|
+
type Subscriber<T> = (value: T) => void;
|
|
4
5
|
export declare class Observable<T = any> {
|
|
5
6
|
private subscribers;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* @returns A subscription object with an unsubscribe method to cancel the subscription.
|
|
11
|
-
*/
|
|
12
|
-
subscribe(callback: (data: T) => void): Subscription;
|
|
13
|
-
/**
|
|
14
|
-
* Notifies all subscribers with the given data.
|
|
15
|
-
* @param data - The data to emit to all subscribers.
|
|
16
|
-
*/
|
|
17
|
-
notify(data: T): void;
|
|
18
|
-
/**
|
|
19
|
-
* Subscribes a callback function to the observable and automatically unsubscribes after the first emission.
|
|
20
|
-
* @param callback - The function to call when the observable emits a value.
|
|
21
|
-
* @returns A subscription object with an unsubscribe method to cancel the subscription.
|
|
22
|
-
*/
|
|
23
|
-
first(callback: (data: T) => void): Subscription;
|
|
24
|
-
/**
|
|
25
|
-
* Emits values from the source observable until the provided predicate function returns false.
|
|
26
|
-
* @param predicate - A function that evaluates each value emitted by the source observable.
|
|
27
|
-
* @returns A new observable that emits values from the source observable while the predicate returns true.
|
|
28
|
-
*/
|
|
7
|
+
subscribe(subscriber: Subscriber<T>): Subscription;
|
|
8
|
+
unsubscribe(subscriber: Subscriber<T>): void;
|
|
9
|
+
notify(value: T): void;
|
|
10
|
+
first(): Observable<T>;
|
|
29
11
|
takeWhile(predicate: (value: T) => boolean): Observable<T>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
* This method sets the `subscribers` array to an empty array, effectively removing all current subscribers.
|
|
35
|
-
*/
|
|
36
|
-
unsubscribeAll(): void;
|
|
37
|
-
private unsubscribe;
|
|
12
|
+
filter(predicate: (value: T) => boolean): Observable<T>;
|
|
13
|
+
merge(...observables: Array<Observable<T>>): Observable<T>;
|
|
14
|
+
private withUnsubscribeOverride;
|
|
15
|
+
private unsubscribeAll;
|
|
38
16
|
}
|
|
39
|
-
|
|
40
|
-
* Merges multiple observables into a single observable.
|
|
41
|
-
*
|
|
42
|
-
* @template T - The type of the values emitted by the observables.
|
|
43
|
-
* @param {...Observable[]} observables - The observables to merge.
|
|
44
|
-
* @returns {Observable} A new observable that emits values from all input observables.
|
|
45
|
-
*/
|
|
46
|
-
export declare function merge<T>(...observables: Array<Observable<T>>): Observable<T>;
|
|
17
|
+
export {};
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.
|
|
1
|
+
export declare const VERSION = "1.15.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/faro-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Core package of Faro.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "4974804d189a2a94254c22c0d7901448e7678f8f"
|
|
67
67
|
}
|