@grafana/faro-core 1.0.0-beta3 → 1.0.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/README.md +14 -12
- package/dist/bundle/faro-core.iife.js +1 -0
- package/dist/cjs/api/events/initialize.js +1 -1
- package/dist/cjs/api/events/initialize.js.map +1 -1
- package/dist/cjs/api/exceptions/initialize.js +1 -1
- package/dist/cjs/api/exceptions/initialize.js.map +1 -1
- package/dist/cjs/api/initialize.js +3 -3
- package/dist/cjs/api/initialize.js.map +1 -1
- package/dist/cjs/api/logs/initialize.js +1 -1
- package/dist/cjs/api/logs/initialize.js.map +1 -1
- package/dist/cjs/api/measurements/initialize.js +1 -1
- package/dist/cjs/api/measurements/initialize.js.map +1 -1
- package/dist/cjs/api/meta/initialize.js +14 -1
- package/dist/cjs/api/meta/initialize.js.map +1 -1
- package/dist/cjs/api/meta/types.js.map +1 -1
- package/dist/cjs/api/traces/initialize.js +1 -1
- package/dist/cjs/api/traces/initialize.js.map +1 -1
- package/dist/cjs/config/types.js.map +1 -1
- package/dist/cjs/{utils/extensions.js → extensions/baseExtension.js} +15 -17
- package/dist/cjs/extensions/baseExtension.js.map +1 -0
- package/dist/cjs/extensions/index.js +6 -0
- package/dist/cjs/extensions/index.js.map +1 -0
- package/dist/cjs/extensions/types.js +3 -0
- package/dist/cjs/extensions/types.js.map +1 -0
- package/dist/cjs/index.js +12 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/initialize.js +11 -21
- package/dist/cjs/initialize.js.map +1 -1
- package/dist/cjs/instrumentations/base.js +6 -3
- package/dist/cjs/instrumentations/base.js.map +1 -1
- package/dist/cjs/instrumentations/index.js +3 -1
- package/dist/cjs/instrumentations/index.js.map +1 -1
- package/dist/cjs/instrumentations/initialize.js +8 -2
- package/dist/cjs/instrumentations/initialize.js.map +1 -1
- package/dist/cjs/instrumentations/registerInitial.js +9 -0
- package/dist/cjs/instrumentations/registerInitial.js.map +1 -0
- package/dist/cjs/instrumentations/types.js.map +1 -1
- package/dist/cjs/internalLogger/const.js.map +1 -1
- package/dist/cjs/internalLogger/createInternalLogger.js.map +1 -1
- package/dist/cjs/internalLogger/index.js +2 -1
- package/dist/cjs/internalLogger/index.js.map +1 -1
- package/dist/cjs/internalLogger/initialize.js.map +1 -1
- package/dist/cjs/metas/index.js +3 -1
- package/dist/cjs/metas/index.js.map +1 -1
- package/dist/cjs/metas/initialize.js +4 -30
- package/dist/cjs/metas/initialize.js.map +1 -1
- package/dist/cjs/metas/registerInitial.js +42 -0
- package/dist/cjs/metas/registerInitial.js.map +1 -0
- package/dist/cjs/metas/types.js.map +1 -1
- package/dist/cjs/sdk/faroGlobalObject.js.map +1 -1
- package/dist/cjs/sdk/index.js +3 -3
- package/dist/cjs/sdk/index.js.map +1 -1
- package/dist/cjs/sdk/internalFaroGlobalObject.js.map +1 -1
- package/dist/cjs/sdk/{register.js → registerFaro.js} +13 -3
- package/dist/cjs/sdk/registerFaro.js.map +1 -0
- package/dist/cjs/semantic.js +1 -0
- package/dist/cjs/semantic.js.map +1 -1
- package/dist/cjs/testUtils/mockConfig.js.map +1 -1
- package/dist/cjs/transports/base.js +2 -2
- package/dist/cjs/transports/base.js.map +1 -1
- package/dist/cjs/transports/index.js +3 -1
- package/dist/cjs/transports/index.js.map +1 -1
- package/dist/cjs/transports/initialize.js +5 -4
- package/dist/cjs/transports/initialize.js.map +1 -1
- package/dist/cjs/transports/registerInitial.js +11 -0
- package/dist/cjs/transports/registerInitial.js.map +1 -0
- package/dist/cjs/transports/types.js.map +1 -1
- package/dist/cjs/unpatchedConsole/initialize.js.map +1 -1
- package/dist/cjs/utils/deepEqual.js +58 -5
- package/dist/cjs/utils/deepEqual.js.map +1 -1
- package/dist/cjs/utils/index.js +1 -3
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/shortId.js.map +1 -1
- package/dist/cjs/version.js +2 -2
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/api/events/initialize.js +1 -1
- package/dist/esm/api/events/initialize.js.map +1 -1
- package/dist/esm/api/exceptions/initialize.js +1 -1
- package/dist/esm/api/exceptions/initialize.js.map +1 -1
- package/dist/esm/api/initialize.js +3 -3
- package/dist/esm/api/initialize.js.map +1 -1
- package/dist/esm/api/logs/initialize.js +1 -1
- package/dist/esm/api/logs/initialize.js.map +1 -1
- package/dist/esm/api/measurements/initialize.js +1 -1
- package/dist/esm/api/measurements/initialize.js.map +1 -1
- package/dist/esm/api/meta/initialize.js +14 -1
- package/dist/esm/api/meta/initialize.js.map +1 -1
- package/dist/esm/api/meta/types.js.map +1 -1
- package/dist/esm/api/traces/initialize.js +1 -1
- package/dist/esm/api/traces/initialize.js.map +1 -1
- package/dist/esm/config/types.js.map +1 -1
- package/dist/esm/extensions/baseExtension.js +23 -0
- package/dist/esm/extensions/baseExtension.js.map +1 -0
- package/dist/esm/extensions/index.js +2 -0
- package/dist/esm/extensions/index.js.map +1 -0
- package/dist/esm/extensions/types.js +2 -0
- package/dist/esm/extensions/types.js.map +1 -0
- package/dist/esm/index.js +4 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/initialize.js +14 -23
- package/dist/esm/initialize.js.map +1 -1
- package/dist/esm/instrumentations/base.js +6 -1
- package/dist/esm/instrumentations/base.js.map +1 -1
- package/dist/esm/instrumentations/index.js +1 -0
- package/dist/esm/instrumentations/index.js.map +1 -1
- package/dist/esm/instrumentations/initialize.js +8 -2
- package/dist/esm/instrumentations/initialize.js.map +1 -1
- package/dist/esm/instrumentations/registerInitial.js +4 -0
- package/dist/esm/instrumentations/registerInitial.js.map +1 -0
- package/dist/esm/instrumentations/types.js.map +1 -1
- package/dist/esm/internalLogger/const.js.map +1 -1
- package/dist/esm/internalLogger/createInternalLogger.js.map +1 -1
- package/dist/esm/internalLogger/index.js +1 -1
- package/dist/esm/internalLogger/index.js.map +1 -1
- package/dist/esm/internalLogger/initialize.js.map +1 -1
- package/dist/esm/metas/index.js +1 -0
- package/dist/esm/metas/index.js.map +1 -1
- package/dist/esm/metas/initialize.js +4 -18
- package/dist/esm/metas/initialize.js.map +1 -1
- package/dist/esm/metas/registerInitial.js +25 -0
- package/dist/esm/metas/registerInitial.js.map +1 -0
- package/dist/esm/metas/types.js.map +1 -1
- package/dist/esm/sdk/faroGlobalObject.js.map +1 -1
- package/dist/esm/sdk/index.js +1 -1
- package/dist/esm/sdk/index.js.map +1 -1
- package/dist/esm/sdk/internalFaroGlobalObject.js.map +1 -1
- package/dist/esm/sdk/registerFaro.js +21 -0
- package/dist/esm/sdk/registerFaro.js.map +1 -0
- package/dist/esm/semantic.js +1 -0
- package/dist/esm/semantic.js.map +1 -1
- package/dist/esm/testUtils/mockConfig.js.map +1 -1
- package/dist/esm/transports/base.js +1 -1
- package/dist/esm/transports/base.js.map +1 -1
- package/dist/esm/transports/index.js +1 -0
- package/dist/esm/transports/index.js.map +1 -1
- package/dist/esm/transports/initialize.js +5 -4
- package/dist/esm/transports/initialize.js.map +1 -1
- package/dist/esm/transports/registerInitial.js +6 -0
- package/dist/esm/transports/registerInitial.js.map +1 -0
- package/dist/esm/transports/types.js.map +1 -1
- package/dist/esm/unpatchedConsole/initialize.js.map +1 -1
- package/dist/esm/utils/deepEqual.js +55 -2
- package/dist/esm/utils/deepEqual.js.map +1 -1
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/utils/shortId.js.map +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/esm/version.js.map +1 -1
- package/dist/{cjs → types}/api/events/index.d.ts +0 -0
- package/dist/{cjs → types}/api/events/initialize.d.ts +2 -1
- package/dist/{cjs → types}/api/events/types.d.ts +0 -0
- package/dist/{cjs → types}/api/exceptions/const.d.ts +0 -0
- package/dist/{cjs → types}/api/exceptions/index.d.ts +0 -0
- package/dist/{cjs → types}/api/exceptions/initialize.d.ts +2 -1
- package/dist/{cjs → types}/api/exceptions/types.d.ts +0 -0
- package/dist/{cjs → types}/api/index.d.ts +0 -0
- package/dist/types/api/initialize.d.ts +7 -0
- package/dist/{cjs → types}/api/logs/index.d.ts +0 -0
- package/dist/{esm → types}/api/logs/initialize.d.ts +2 -1
- package/dist/{cjs → types}/api/logs/types.d.ts +0 -0
- package/dist/{cjs → types}/api/measurements/index.d.ts +0 -0
- package/dist/{esm → types}/api/measurements/initialize.d.ts +2 -1
- package/dist/{cjs → types}/api/measurements/types.d.ts +0 -0
- package/dist/{cjs → types}/api/meta/index.d.ts +0 -0
- package/dist/types/api/meta/initialize.d.ts +7 -0
- package/dist/types/api/meta/types.d.ts +10 -0
- package/dist/{cjs → types}/api/traces/index.d.ts +0 -0
- package/dist/types/api/traces/initialize.d.ts +7 -0
- package/dist/{cjs → types}/api/traces/types.d.ts +0 -0
- package/dist/{cjs → types}/api/types.d.ts +0 -0
- package/dist/{cjs → types}/config/const.d.ts +0 -0
- package/dist/{cjs → types}/config/index.d.ts +0 -0
- package/dist/{esm → types}/config/types.d.ts +2 -1
- package/dist/types/extensions/baseExtension.d.ts +15 -0
- package/dist/types/extensions/index.d.ts +2 -0
- package/dist/types/extensions/types.d.ts +16 -0
- package/dist/{cjs → types}/globalObject/globalObject.d.ts +0 -0
- package/dist/{cjs → types}/globalObject/index.d.ts +0 -0
- package/dist/{cjs → types}/index.d.ts +7 -5
- package/dist/{cjs → types}/initialize.d.ts +0 -0
- package/dist/{cjs → types}/instrumentations/base.d.ts +5 -1
- package/dist/{cjs → types}/instrumentations/index.d.ts +1 -0
- package/dist/types/instrumentations/initialize.d.ts +8 -0
- package/dist/types/instrumentations/registerInitial.d.ts +2 -0
- package/dist/{cjs → types}/instrumentations/types.d.ts +5 -1
- package/dist/{cjs → types}/internalLogger/const.d.ts +0 -0
- package/dist/{cjs → types}/internalLogger/createInternalLogger.d.ts +0 -0
- package/dist/{cjs → types}/internalLogger/index.d.ts +1 -1
- package/dist/{cjs → types}/internalLogger/initialize.d.ts +0 -0
- package/dist/{cjs → types}/internalLogger/types.d.ts +0 -0
- package/dist/{cjs → types}/metas/index.d.ts +2 -1
- package/dist/types/metas/initialize.d.ts +5 -0
- package/dist/types/metas/registerInitial.d.ts +2 -0
- package/dist/{cjs → types}/metas/types.d.ts +4 -1
- package/dist/{cjs → types}/sdk/const.d.ts +0 -0
- package/dist/{cjs → types}/sdk/faroGlobalObject.d.ts +0 -0
- package/dist/{cjs → types}/sdk/index.d.ts +1 -1
- package/dist/{cjs → types}/sdk/internalFaroGlobalObject.d.ts +0 -0
- package/dist/{esm/sdk/types.d.ts → types/sdk/registerFaro.d.ts} +3 -11
- package/dist/{cjs → types}/sdk/types.d.ts +0 -0
- package/dist/{cjs → types}/semantic.d.ts +1 -0
- package/dist/{cjs → types}/testUtils/index.d.ts +0 -0
- package/dist/{cjs → types}/testUtils/mockConfig.d.ts +0 -0
- package/dist/{cjs → types}/testUtils/mockInternalLogger.d.ts +0 -0
- package/dist/{cjs → types}/testUtils/mockStacktraceParser.d.ts +0 -0
- package/dist/{cjs → types}/testUtils/mockTransport.d.ts +1 -1
- package/dist/{cjs → types}/testUtils/testPromise.d.ts +0 -0
- package/dist/{cjs → types}/transports/base.d.ts +1 -1
- package/dist/{cjs → types}/transports/const.d.ts +0 -0
- package/dist/{cjs → types}/transports/index.d.ts +1 -0
- package/dist/{cjs → types}/transports/initialize.d.ts +3 -1
- package/dist/types/transports/registerInitial.d.ts +2 -0
- package/dist/{esm → types}/transports/types.d.ts +1 -1
- package/dist/{cjs → types}/transports/utils.d.ts +0 -0
- package/dist/{cjs → types}/unpatchedConsole/const.d.ts +0 -0
- package/dist/{cjs → types}/unpatchedConsole/index.d.ts +0 -0
- package/dist/{cjs → types}/unpatchedConsole/initialize.d.ts +0 -0
- package/dist/{cjs → types}/unpatchedConsole/types.d.ts +0 -0
- package/dist/{cjs → types}/utils/baseObject.d.ts +0 -0
- package/dist/types/utils/deepEqual.d.ts +1 -0
- package/dist/{cjs → types}/utils/getCurrentTimestamp.d.ts +0 -0
- package/dist/{cjs → types}/utils/index.d.ts +0 -2
- package/dist/{cjs → types}/utils/is.d.ts +0 -0
- package/dist/{cjs → types}/utils/logLevels.d.ts +0 -0
- package/dist/{cjs → types}/utils/noop.d.ts +0 -0
- package/dist/{cjs → types}/utils/promiseBuffer.d.ts +0 -0
- package/dist/{cjs → types}/utils/shortId.d.ts +0 -0
- package/dist/types/version.d.ts +1 -0
- package/package.json +21 -15
- package/dist/cjs/api/events/initialize.test.d.ts +0 -1
- package/dist/cjs/api/events/initialize.test.js +0 -92
- package/dist/cjs/api/events/initialize.test.js.map +0 -1
- package/dist/cjs/api/exceptions/initialize.test.d.ts +0 -1
- package/dist/cjs/api/exceptions/initialize.test.js +0 -138
- package/dist/cjs/api/exceptions/initialize.test.js.map +0 -1
- package/dist/cjs/api/initialize.d.ts +0 -6
- package/dist/cjs/api/logs/initialize.d.ts +0 -7
- package/dist/cjs/api/logs/initialize.test.d.ts +0 -1
- package/dist/cjs/api/logs/initialize.test.js +0 -88
- package/dist/cjs/api/logs/initialize.test.js.map +0 -1
- package/dist/cjs/api/measurements/initialize.d.ts +0 -7
- package/dist/cjs/api/measurements/initialize.test.d.ts +0 -1
- package/dist/cjs/api/measurements/initialize.test.js +0 -123
- package/dist/cjs/api/measurements/initialize.test.js.map +0 -1
- package/dist/cjs/api/meta/initialize.d.ts +0 -6
- package/dist/cjs/api/meta/types.d.ts +0 -8
- package/dist/cjs/api/traces/initialize.d.ts +0 -6
- package/dist/cjs/config/types.d.ts +0 -26
- package/dist/cjs/faro.test.d.ts +0 -1
- package/dist/cjs/faro.test.js +0 -42
- package/dist/cjs/faro.test.js.map +0 -1
- package/dist/cjs/instrumentations/initialize.d.ts +0 -4
- package/dist/cjs/metas/initialize.d.ts +0 -4
- package/dist/cjs/metas/initialize.test.d.ts +0 -1
- package/dist/cjs/metas/initialize.test.js +0 -21
- package/dist/cjs/metas/initialize.test.js.map +0 -1
- package/dist/cjs/sdk/register.d.ts +0 -4
- package/dist/cjs/sdk/register.js.map +0 -1
- package/dist/cjs/transports/transports.test.d.ts +0 -1
- package/dist/cjs/transports/transports.test.js +0 -141
- package/dist/cjs/transports/transports.test.js.map +0 -1
- package/dist/cjs/transports/types.d.ts +0 -37
- package/dist/cjs/utils/deepEqual.d.ts +0 -2
- package/dist/cjs/utils/extensions.d.ts +0 -19
- package/dist/cjs/utils/extensions.js.map +0 -1
- package/dist/cjs/utils/promiseBuffer.test.d.ts +0 -1
- package/dist/cjs/utils/promiseBuffer.test.js +0 -146
- package/dist/cjs/utils/promiseBuffer.test.js.map +0 -1
- package/dist/cjs/version.d.ts +0 -1
- package/dist/esm/api/events/index.d.ts +0 -2
- package/dist/esm/api/events/initialize.d.ts +0 -7
- package/dist/esm/api/events/initialize.test.d.ts +0 -1
- package/dist/esm/api/events/initialize.test.js +0 -87
- package/dist/esm/api/events/initialize.test.js.map +0 -1
- package/dist/esm/api/events/types.d.ts +0 -15
- package/dist/esm/api/exceptions/const.d.ts +0 -1
- package/dist/esm/api/exceptions/index.d.ts +0 -3
- package/dist/esm/api/exceptions/initialize.d.ts +0 -7
- package/dist/esm/api/exceptions/initialize.test.d.ts +0 -1
- package/dist/esm/api/exceptions/initialize.test.js +0 -133
- package/dist/esm/api/exceptions/initialize.test.js.map +0 -1
- package/dist/esm/api/exceptions/types.d.ts +0 -32
- package/dist/esm/api/index.d.ts +0 -9
- package/dist/esm/api/initialize.d.ts +0 -6
- package/dist/esm/api/logs/index.d.ts +0 -2
- package/dist/esm/api/logs/initialize.test.d.ts +0 -1
- package/dist/esm/api/logs/initialize.test.js +0 -83
- package/dist/esm/api/logs/initialize.test.js.map +0 -1
- package/dist/esm/api/logs/types.d.ts +0 -18
- package/dist/esm/api/measurements/index.d.ts +0 -2
- package/dist/esm/api/measurements/initialize.test.d.ts +0 -1
- package/dist/esm/api/measurements/initialize.test.js +0 -107
- package/dist/esm/api/measurements/initialize.test.js.map +0 -1
- package/dist/esm/api/measurements/types.d.ts +0 -16
- package/dist/esm/api/meta/index.d.ts +0 -2
- package/dist/esm/api/meta/initialize.d.ts +0 -6
- package/dist/esm/api/meta/types.d.ts +0 -8
- package/dist/esm/api/traces/index.d.ts +0 -2
- package/dist/esm/api/traces/initialize.d.ts +0 -6
- package/dist/esm/api/traces/types.d.ts +0 -20
- package/dist/esm/api/types.d.ts +0 -8
- package/dist/esm/config/const.d.ts +0 -1
- package/dist/esm/config/index.d.ts +0 -2
- package/dist/esm/faro.test.d.ts +0 -1
- package/dist/esm/faro.test.js +0 -40
- package/dist/esm/faro.test.js.map +0 -1
- package/dist/esm/globalObject/globalObject.d.ts +0 -7
- package/dist/esm/globalObject/index.d.ts +0 -2
- package/dist/esm/index.d.ts +0 -22
- package/dist/esm/initialize.d.ts +0 -3
- package/dist/esm/instrumentations/base.d.ts +0 -5
- package/dist/esm/instrumentations/index.d.ts +0 -3
- package/dist/esm/instrumentations/initialize.d.ts +0 -4
- package/dist/esm/instrumentations/types.d.ts +0 -10
- package/dist/esm/internalLogger/const.d.ts +0 -11
- package/dist/esm/internalLogger/createInternalLogger.d.ts +0 -4
- package/dist/esm/internalLogger/index.d.ts +0 -4
- package/dist/esm/internalLogger/initialize.d.ts +0 -5
- package/dist/esm/internalLogger/types.d.ts +0 -7
- package/dist/esm/metas/index.d.ts +0 -2
- package/dist/esm/metas/initialize.d.ts +0 -4
- package/dist/esm/metas/initialize.test.d.ts +0 -1
- package/dist/esm/metas/initialize.test.js +0 -19
- package/dist/esm/metas/initialize.test.js.map +0 -1
- package/dist/esm/metas/types.d.ts +0 -56
- package/dist/esm/sdk/const.d.ts +0 -1
- package/dist/esm/sdk/faroGlobalObject.d.ts +0 -2
- package/dist/esm/sdk/index.d.ts +0 -4
- package/dist/esm/sdk/internalFaroGlobalObject.d.ts +0 -4
- package/dist/esm/sdk/register.d.ts +0 -4
- package/dist/esm/sdk/register.js +0 -11
- package/dist/esm/sdk/register.js.map +0 -1
- package/dist/esm/semantic.d.ts +0 -7
- package/dist/esm/testUtils/index.d.ts +0 -6
- package/dist/esm/testUtils/mockConfig.d.ts +0 -2
- package/dist/esm/testUtils/mockInternalLogger.d.ts +0 -2
- package/dist/esm/testUtils/mockStacktraceParser.d.ts +0 -2
- package/dist/esm/testUtils/mockTransport.d.ts +0 -12
- package/dist/esm/testUtils/testPromise.d.ts +0 -7
- package/dist/esm/transports/base.d.ts +0 -6
- package/dist/esm/transports/const.d.ts +0 -8
- package/dist/esm/transports/index.d.ts +0 -5
- package/dist/esm/transports/initialize.d.ts +0 -6
- package/dist/esm/transports/transports.test.d.ts +0 -1
- package/dist/esm/transports/transports.test.js +0 -110
- package/dist/esm/transports/transports.test.js.map +0 -1
- package/dist/esm/transports/utils.d.ts +0 -2
- package/dist/esm/unpatchedConsole/const.d.ts +0 -2
- package/dist/esm/unpatchedConsole/index.d.ts +0 -3
- package/dist/esm/unpatchedConsole/initialize.d.ts +0 -4
- package/dist/esm/unpatchedConsole/types.d.ts +0 -1
- package/dist/esm/utils/baseObject.d.ts +0 -6
- package/dist/esm/utils/deepEqual.d.ts +0 -2
- package/dist/esm/utils/extensions.d.ts +0 -19
- package/dist/esm/utils/extensions.js +0 -23
- package/dist/esm/utils/extensions.js.map +0 -1
- package/dist/esm/utils/getCurrentTimestamp.d.ts +0 -1
- package/dist/esm/utils/index.d.ts +0 -12
- package/dist/esm/utils/is.d.ts +0 -31
- package/dist/esm/utils/logLevels.d.ts +0 -10
- package/dist/esm/utils/noop.d.ts +0 -1
- package/dist/esm/utils/promiseBuffer.d.ts +0 -14
- package/dist/esm/utils/promiseBuffer.test.d.ts +0 -1
- package/dist/esm/utils/promiseBuffer.test.js +0 -87
- package/dist/esm/utils/promiseBuffer.test.js.map +0 -1
- package/dist/esm/utils/shortId.d.ts +0 -1
- package/dist/esm/version.d.ts +0 -1
|
@@ -1,3 +1,56 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { isArray, isObject, isTypeof } from './is';
|
|
2
|
+
// This function was inspired by fast-deep-equal
|
|
3
|
+
// fast-deep-equal has issues with Rollup and also it checks for some edge cases that we don't need
|
|
4
|
+
export function deepEqual(a, b) {
|
|
5
|
+
if (a === b) {
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
// Using isTypeOf instead of isNumber as isNumber also checks against NaN
|
|
9
|
+
if (isTypeof(a, 'number') && isNaN(a)) {
|
|
10
|
+
return isTypeof(b, 'number') && isNaN(b);
|
|
11
|
+
}
|
|
12
|
+
const aIsArray = isArray(a);
|
|
13
|
+
const bIsArray = isArray(b);
|
|
14
|
+
if (aIsArray !== bIsArray) {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
if (aIsArray && bIsArray) {
|
|
18
|
+
const length = a.length;
|
|
19
|
+
if (length !== b.length) {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
for (let idx = length; idx-- !== 0;) {
|
|
23
|
+
if (!deepEqual(a[idx], b[idx])) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
const aIsObject = isObject(a);
|
|
30
|
+
const bIsObject = isObject(b);
|
|
31
|
+
if (aIsObject !== bIsObject) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
if (a && b && aIsObject && bIsObject) {
|
|
35
|
+
const aKeys = Object.keys(a);
|
|
36
|
+
const bKeys = Object.keys(b);
|
|
37
|
+
const aLength = aKeys.length;
|
|
38
|
+
const bLength = bKeys.length;
|
|
39
|
+
if (aLength !== bLength) {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
for (let aKey of aKeys) {
|
|
43
|
+
if (!bKeys.includes(aKey)) {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
for (let aKey of aKeys) {
|
|
48
|
+
if (!deepEqual(a[aKey], b[aKey])) {
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
3
56
|
//# sourceMappingURL=deepEqual.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepEqual.js","sourceRoot":"","sources":["../../../src/utils/deepEqual.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"deepEqual.js","sourceRoot":"","sources":["../../../src/utils/deepEqual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEnD,gDAAgD;AAChD,mGAAmG;AAEnG,MAAM,UAAU,SAAS,CAAC,CAAM,EAAE,CAAM;IACtC,IAAI,CAAC,KAAK,CAAC,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IAED,yEAAyE;IACzE,IAAI,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAW,CAAC,EAAE;QAC/C,OAAO,QAAQ,CAAC,CAAC,EAAE,QAAQ,CAAC,IAAI,KAAK,CAAC,CAAW,CAAC,CAAC;KACpD;IAED,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAE5B,IAAI,QAAQ,KAAK,QAAQ,EAAE;QACzB,OAAO,KAAK,CAAC;KACd;IAED,IAAI,QAAQ,IAAI,QAAQ,EAAE;QACxB,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QAExB,IAAI,MAAM,KAAK,CAAC,CAAC,MAAM,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;QAED,KAAK,IAAI,GAAG,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,CAAC,GAAI;YACpC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE;gBAC9B,OAAO,KAAK,CAAC;aACd;SACF;QAED,OAAO,IAAI,CAAC;KACb;IAED,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9B,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE9B,IAAI,SAAS,KAAK,SAAS,EAAE;QAC3B,OAAO,KAAK,CAAC;KACd;IAED,IAAI,CAAC,IAAI,CAAC,IAAI,SAAS,IAAI,SAAS,EAAE;QACpC,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAA0B,CAAC;QACtD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC;QAC7B,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC;QAE7B,IAAI,OAAO,KAAK,OAAO,EAAE;YACvB,OAAO,KAAK,CAAC;SACd;QAED,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;YACtB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE;gBACzB,OAAO,KAAK,CAAC;aACd;SACF;QAED,KAAK,IAAI,IAAI,IAAI,KAAK,EAAE;YACtB,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE;gBAChC,OAAO,KAAK,CAAC;aACd;SACF;QAED,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import { isArray, isObject, isTypeof } from './is';\n\n// This function was inspired by fast-deep-equal\n// fast-deep-equal has issues with Rollup and also it checks for some edge cases that we don't need\n\nexport function deepEqual(a: any, b: any): boolean {\n if (a === b) {\n return true;\n }\n\n // Using isTypeOf instead of isNumber as isNumber also checks against NaN\n if (isTypeof(a, 'number') && isNaN(a as number)) {\n return isTypeof(b, 'number') && isNaN(b as number);\n }\n\n const aIsArray = isArray(a);\n const bIsArray = isArray(b);\n\n if (aIsArray !== bIsArray) {\n return false;\n }\n\n if (aIsArray && bIsArray) {\n const length = a.length;\n\n if (length !== b.length) {\n return false;\n }\n\n for (let idx = length; idx-- !== 0; ) {\n if (!deepEqual(a[idx], b[idx])) {\n return false;\n }\n }\n\n return true;\n }\n\n const aIsObject = isObject(a);\n const bIsObject = isObject(b);\n\n if (aIsObject !== bIsObject) {\n return false;\n }\n\n if (a && b && aIsObject && bIsObject) {\n const aKeys = Object.keys(a) as Array<keyof typeof a>;\n const bKeys = Object.keys(b);\n const aLength = aKeys.length;\n const bLength = bKeys.length;\n\n if (aLength !== bLength) {\n return false;\n }\n\n for (let aKey of aKeys) {\n if (!bKeys.includes(aKey)) {\n return false;\n }\n }\n\n for (let aKey of aKeys) {\n if (!deepEqual(a[aKey], b[aKey])) {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n}\n"]}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { BaseExtension } from './extensions';
|
|
2
1
|
export { deepEqual } from './deepEqual';
|
|
3
2
|
export { getCurrentTimestamp } from './getCurrentTimestamp';
|
|
4
3
|
export { 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, } from './is';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,OAAO,EACP,cAAc,EACd,YAAY,EACZ,OAAO,EACP,cAAc,EACd,UAAU,EACV,YAAY,EACZ,KAAK,EACL,KAAK,EACL,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,WAAW,GACZ,MAAM,MAAM,CAAC;AAGd,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAE9B,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAGtD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue } from './baseObject';\n\nexport { deepEqual } from './deepEqual';\n\nexport { getCurrentTimestamp } from './getCurrentTimestamp';\n\nexport {\n isArray,\n isBoolean,\n isDomError,\n isDomException,\n isElement,\n isElementDefined,\n isError,\n isErrorDefined,\n isErrorEvent,\n isEvent,\n isEventDefined,\n isFunction,\n isInstanceOf,\n isInt,\n isMap,\n isMapDefined,\n isNull,\n isNumber,\n isObject,\n isPrimitive,\n isRegExp,\n isString,\n isSymbol,\n isSyntheticEvent,\n isThenable,\n isToString,\n isTypeof,\n isUndefined,\n} from './is';\nexport type { IsFnHelper } from './is';\n\nexport { allLogLevels, defaultLogLevel, LogLevel } from './logLevels';\n\nexport { noop } from './noop';\n\nexport { createPromiseBuffer } from './promiseBuffer';\nexport type { BufferItem, PromiseBuffer, PromiseBufferOptions, PromiseProducer } from './promiseBuffer';\n\nexport { genShortID } from './shortId';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shortId.js","sourceRoot":"","sources":["../../../src/utils/shortId.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,6DAA6D,CAAC;AAE/E,MAAM,UAAU,UAAU,CAAC,MAAM,GAAG,EAAE;IACpC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SAC7B,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"shortId.js","sourceRoot":"","sources":["../../../src/utils/shortId.ts"],"names":[],"mappings":"AAAA,MAAM,QAAQ,GAAG,6DAA6D,CAAC;AAE/E,MAAM,UAAU,UAAU,CAAC,MAAM,GAAG,EAAE;IACpC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;SAC7B,GAAG,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAE,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"]}
|
package/dist/esm/version.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
// auto-generated by bin/
|
|
2
|
-
export const VERSION = '1.0.0
|
|
1
|
+
// auto-generated by bin/genVersion.ts
|
|
2
|
+
export const VERSION = '1.0.0';
|
|
3
3
|
//# sourceMappingURL=version.js.map
|
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC","sourcesContent":["// auto-generated by bin/genVersion.ts\nexport const VERSION = '1.0.0';\n"]}
|
|
File without changes
|
|
@@ -2,6 +2,7 @@ import type { Config } from '../../config';
|
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
4
|
import { Transports } from '../../transports';
|
|
5
|
+
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
5
6
|
import type { TracesAPI } from '../traces';
|
|
6
7
|
import type { EventsAPI } from './types';
|
|
7
|
-
export declare function initializeEventsAPI(internalLogger: InternalLogger, config: Config,
|
|
8
|
+
export declare function initializeEventsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): EventsAPI;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -2,6 +2,7 @@ import type { Config } from '../../config';
|
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
4
|
import type { Transports } from '../../transports';
|
|
5
|
+
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
5
6
|
import type { TracesAPI } from '../traces';
|
|
6
7
|
import type { ExceptionsAPI } from './types';
|
|
7
|
-
export declare function initializeExceptionsAPI(internalLogger: InternalLogger, config: Config,
|
|
8
|
+
export declare function initializeExceptionsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): ExceptionsAPI;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Config } from '../config';
|
|
2
|
+
import type { InternalLogger } from '../internalLogger';
|
|
3
|
+
import type { Metas } from '../metas';
|
|
4
|
+
import type { Transports } from '../transports';
|
|
5
|
+
import type { UnpatchedConsole } from '../unpatchedConsole';
|
|
6
|
+
import type { API } from './types';
|
|
7
|
+
export declare function initializeAPI(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports): API;
|
|
File without changes
|
|
@@ -2,6 +2,7 @@ import type { Config } from '../../config';
|
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
4
|
import type { Transports } from '../../transports';
|
|
5
|
+
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
5
6
|
import type { TracesAPI } from '../traces';
|
|
6
7
|
import type { LogsAPI } from './types';
|
|
7
|
-
export declare function initializeLogsAPI(internalLogger: InternalLogger, config: Config,
|
|
8
|
+
export declare function initializeLogsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): LogsAPI;
|
|
File without changes
|
|
File without changes
|
|
@@ -2,6 +2,7 @@ import type { Config } from '../../config';
|
|
|
2
2
|
import type { InternalLogger } from '../../internalLogger';
|
|
3
3
|
import type { Metas } from '../../metas';
|
|
4
4
|
import type { Transports } from '../../transports';
|
|
5
|
+
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
5
6
|
import type { TracesAPI } from '../traces';
|
|
6
7
|
import type { MeasurementsAPI } from './types';
|
|
7
|
-
export declare function initializeMeasurementsAPI(internalLogger: InternalLogger, config: Config,
|
|
8
|
+
export declare function initializeMeasurementsAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, tracesApi: TracesAPI): MeasurementsAPI;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Config } from '../../config';
|
|
2
|
+
import type { InternalLogger } from '../../internalLogger';
|
|
3
|
+
import type { Metas } from '../../metas';
|
|
4
|
+
import type { Transports } from '../../transports';
|
|
5
|
+
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
6
|
+
import type { MetaAPI } from './types';
|
|
7
|
+
export declare function initializeMetaAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config, metas: Metas, _transports: Transports): MetaAPI;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MetaSession, MetaUser, MetaView } from '../../metas';
|
|
2
|
+
export interface MetaAPI {
|
|
3
|
+
setUser: (user?: MetaUser | undefined) => void;
|
|
4
|
+
resetUser: () => void;
|
|
5
|
+
setSession: (session?: MetaSession | undefined) => void;
|
|
6
|
+
resetSession: () => void;
|
|
7
|
+
getSession: () => MetaSession | undefined;
|
|
8
|
+
setView: (view?: MetaView | undefined) => void;
|
|
9
|
+
getView: () => MetaView | undefined;
|
|
10
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Config } from '../../config';
|
|
2
|
+
import type { InternalLogger } from '../../internalLogger';
|
|
3
|
+
import type { Metas } from '../../metas';
|
|
4
|
+
import { Transports } from '../../transports';
|
|
5
|
+
import type { UnpatchedConsole } from '../../unpatchedConsole';
|
|
6
|
+
import type { TracesAPI } from './types';
|
|
7
|
+
export declare function initializeTracesAPI(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config, metas: Metas, transports: Transports): TracesAPI;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { APIEvent, StacktraceParser } from '../api';
|
|
2
2
|
import type { Instrumentation } from '../instrumentations';
|
|
3
3
|
import type { InternalLoggerLevel } from '../internalLogger';
|
|
4
|
-
import type { MetaApp, MetaItem, MetaSession, MetaUser } from '../metas';
|
|
4
|
+
import type { MetaApp, MetaItem, MetaSession, MetaUser, MetaView } from '../metas';
|
|
5
5
|
import type { BeforeSendHook, Transport } from '../transports';
|
|
6
6
|
import type { UnpatchedConsole } from '../unpatchedConsole';
|
|
7
7
|
export interface Config<P = APIEvent> {
|
|
@@ -21,6 +21,7 @@ export interface Config<P = APIEvent> {
|
|
|
21
21
|
ignoreErrors?: Patterns;
|
|
22
22
|
session?: MetaSession;
|
|
23
23
|
user?: MetaUser;
|
|
24
|
+
view?: MetaView;
|
|
24
25
|
eventDomain?: string;
|
|
25
26
|
}
|
|
26
27
|
export type Patterns = Array<string | RegExp>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Config } from '../config';
|
|
2
|
+
import type { Metas } from '../metas';
|
|
3
|
+
import type { Extension } from './types';
|
|
4
|
+
export declare abstract class BaseExtension implements Extension {
|
|
5
|
+
abstract readonly name: string;
|
|
6
|
+
abstract readonly version: string;
|
|
7
|
+
unpatchedConsole: Console;
|
|
8
|
+
internalLogger: import("../internalLogger").InternalLogger;
|
|
9
|
+
config: Config<import("..").APIEvent>;
|
|
10
|
+
metas: Metas;
|
|
11
|
+
logDebug(...args: unknown[]): void;
|
|
12
|
+
logInfo(...args: unknown[]): void;
|
|
13
|
+
logWarn(...args: unknown[]): void;
|
|
14
|
+
logError(...args: unknown[]): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Config } from '../config';
|
|
2
|
+
import type { InternalLogger } from '../internalLogger';
|
|
3
|
+
import type { Metas } from '../metas';
|
|
4
|
+
import type { UnpatchedConsole } from '../unpatchedConsole';
|
|
5
|
+
export interface Extension {
|
|
6
|
+
readonly name: string;
|
|
7
|
+
readonly version: string;
|
|
8
|
+
internalLogger: InternalLogger;
|
|
9
|
+
unpatchedConsole: UnpatchedConsole;
|
|
10
|
+
config: Config;
|
|
11
|
+
metas: Metas;
|
|
12
|
+
logDebug(...args: unknown[]): void;
|
|
13
|
+
logInfo(...args: unknown[]): void;
|
|
14
|
+
logWarn(...args: unknown[]): void;
|
|
15
|
+
logError(...args: unknown[]): void;
|
|
16
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { faro, getInternalFaroFromGlobalObject, internalGlobalObjectKey, isInternalFaroOnGlobalObject, setInternalFaroOnGlobalObject, } from './sdk';
|
|
2
|
-
export type { Faro } from './sdk';
|
|
3
1
|
export { defaultExceptionType } from './api';
|
|
4
2
|
export type { API, APIEvent, EventAttributes, EventEvent, EventsAPI, ExceptionEvent, ExceptionStackFrame, ExceptionsAPI, ExtendedError, LogContext, LogEvent, LogsAPI, MeasurementEvent, MeasurementsAPI, MetaAPI, OTELApi, PushErrorOptions, PushLogOptions, PushMeasurementOptions, Stacktrace, StacktraceParser, TraceContext, TraceEvent, TracesAPI, } from './api';
|
|
3
|
+
export { BaseExtension } from './extensions';
|
|
4
|
+
export type { Extension } from './extensions';
|
|
5
5
|
export { globalObject } from './globalObject';
|
|
6
6
|
export type { GlobalObject } from './globalObject';
|
|
7
7
|
export { initializeFaro } from './initialize';
|
|
@@ -11,12 +11,14 @@ export { BaseInstrumentation } from './instrumentations';
|
|
|
11
11
|
export type { Instrumentation, Instrumentations } from './instrumentations';
|
|
12
12
|
export { createInternalLogger, defaultInternalLoggerLevel, InternalLoggerLevel } from './internalLogger';
|
|
13
13
|
export type { InternalLogger } from './internalLogger';
|
|
14
|
-
export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaPage, Metas, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, } from './metas';
|
|
14
|
+
export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaPage, Metas, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, MetaView, } from './metas';
|
|
15
|
+
export { faro, getInternalFaroFromGlobalObject, internalGlobalObjectKey, isInternalFaroOnGlobalObject, setInternalFaroOnGlobalObject, } from './sdk';
|
|
16
|
+
export type { Faro } from './sdk';
|
|
17
|
+
export { Conventions } from './semantic';
|
|
15
18
|
export { BaseTransport, getTransportBody, TransportItemType, transportItemTypeToBodyKey } from './transports';
|
|
16
19
|
export type { BeforeSendHook, Transport, TransportBody, TransportItem, TransportItemPayload, Transports, } from './transports';
|
|
17
20
|
export { defaultUnpatchedConsole } from './unpatchedConsole';
|
|
18
21
|
export type { UnpatchedConsole } from './unpatchedConsole';
|
|
19
|
-
export { allLogLevels,
|
|
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, } from './utils';
|
|
20
23
|
export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue, BufferItem, PromiseBuffer, PromiseBufferOptions, PromiseProducer, } from './utils';
|
|
21
24
|
export { VERSION } from './version';
|
|
22
|
-
export { Conventions } from './semantic';
|
|
File without changes
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { API } from '../api';
|
|
2
|
+
import { BaseExtension } from '../extensions';
|
|
3
|
+
import type { Transports } from '../transports';
|
|
2
4
|
import type { Instrumentation } from './types';
|
|
3
5
|
export declare abstract class BaseInstrumentation extends BaseExtension implements Instrumentation {
|
|
6
|
+
api: API;
|
|
7
|
+
transports: Transports;
|
|
4
8
|
abstract initialize(): void;
|
|
5
9
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { API } from '../api';
|
|
2
|
+
import type { Config } from '../config';
|
|
3
|
+
import type { InternalLogger } from '../internalLogger';
|
|
4
|
+
import type { Metas } from '../metas';
|
|
5
|
+
import type { Transports } from '../transports';
|
|
6
|
+
import type { UnpatchedConsole } from '../unpatchedConsole';
|
|
7
|
+
import type { Instrumentations } from './types';
|
|
8
|
+
export declare function initializeInstrumentations(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, api: API): Instrumentations;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { API } from '../api';
|
|
2
|
+
import type { Extension } from '../extensions';
|
|
3
|
+
import type { Transports } from '../transports';
|
|
2
4
|
export interface Instrumentation extends Extension {
|
|
5
|
+
api: API;
|
|
6
|
+
transports: Transports;
|
|
3
7
|
initialize: VoidFunction;
|
|
4
8
|
destroy?: VoidFunction;
|
|
5
9
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { defaultInternalLoggerLevel, InternalLoggerLevel } from './const';
|
|
1
|
+
export { defaultInternalLogger, defaultInternalLoggerLevel, InternalLoggerLevel } from './const';
|
|
2
2
|
export { createInternalLogger } from './createInternalLogger';
|
|
3
3
|
export { initializeInternalLogger, internalLogger } from './initialize';
|
|
4
4
|
export type { InternalLogger } from './types';
|
|
File without changes
|
|
File without changes
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export { initializeMetas } from './initialize';
|
|
2
|
-
export
|
|
2
|
+
export { registerInitialMetas } from './registerInitial';
|
|
3
|
+
export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaPage, Metas, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, MetaView, } from './types';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Config } from '../config';
|
|
2
|
+
import type { InternalLogger } from '../internalLogger';
|
|
3
|
+
import type { UnpatchedConsole } from '../unpatchedConsole';
|
|
4
|
+
import type { Metas } from './types';
|
|
5
|
+
export declare function initializeMetas(_unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, _config: Config): Metas;
|
|
@@ -32,7 +32,6 @@ export interface MetaUser {
|
|
|
32
32
|
}
|
|
33
33
|
export interface MetaSession {
|
|
34
34
|
id?: string;
|
|
35
|
-
started?: string;
|
|
36
35
|
attributes?: MetaAttributes;
|
|
37
36
|
}
|
|
38
37
|
export interface MetaPage {
|
|
@@ -46,6 +45,9 @@ export interface MetaBrowser {
|
|
|
46
45
|
os?: string;
|
|
47
46
|
mobile?: boolean;
|
|
48
47
|
}
|
|
48
|
+
export interface MetaView {
|
|
49
|
+
name: string;
|
|
50
|
+
}
|
|
49
51
|
export interface Meta {
|
|
50
52
|
sdk?: MetaSDK;
|
|
51
53
|
app?: MetaApp;
|
|
@@ -53,4 +55,5 @@ export interface Meta {
|
|
|
53
55
|
session?: MetaSession;
|
|
54
56
|
page?: MetaPage;
|
|
55
57
|
browser?: MetaBrowser;
|
|
58
|
+
view?: MetaView;
|
|
56
59
|
}
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { internalGlobalObjectKey } from './const';
|
|
2
|
-
export { faro, registerFaro } from './
|
|
2
|
+
export { faro, registerFaro } from './registerFaro';
|
|
3
3
|
export { getInternalFromGlobalObject as getInternalFaroFromGlobalObject, isInternalFaroOnGlobalObject as isInternalFaroOnGlobalObject, setInternalFaroOnGlobalObject as setInternalFaroOnGlobalObject, } from './internalFaroGlobalObject';
|
|
4
4
|
export type { Faro } from './types';
|
|
File without changes
|
|
@@ -5,14 +5,6 @@ import type { InternalLogger } from '../internalLogger';
|
|
|
5
5
|
import type { Metas } from '../metas';
|
|
6
6
|
import type { Transports } from '../transports';
|
|
7
7
|
import type { UnpatchedConsole } from '../unpatchedConsole';
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
instrumentations: Instrumentations;
|
|
12
|
-
internalLogger: InternalLogger;
|
|
13
|
-
metas: Metas;
|
|
14
|
-
pause: Transports['pause'];
|
|
15
|
-
transports: Transports;
|
|
16
|
-
unpatchedConsole: UnpatchedConsole;
|
|
17
|
-
unpause: Transports['unpause'];
|
|
18
|
-
}
|
|
8
|
+
import type { Faro } from './types';
|
|
9
|
+
export declare let faro: Faro;
|
|
10
|
+
export declare function registerFaro(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas, transports: Transports, api: API, instrumentations: Instrumentations): Faro;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -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.0.0
|
|
7
|
+
readonly version = "1.0.0";
|
|
8
8
|
items: TransportItem[];
|
|
9
9
|
constructor(ignoreURLs?: Patterns);
|
|
10
10
|
send(item: TransportItem): void | Promise<void>;
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseExtension } from '../
|
|
1
|
+
import { BaseExtension } from '../extensions';
|
|
2
2
|
import type { Transport, TransportItem } from './types';
|
|
3
3
|
export declare abstract class BaseTransport extends BaseExtension implements Transport {
|
|
4
4
|
abstract send(item: TransportItem): void | Promise<void>;
|
|
File without changes
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { initializeTransports } from './initialize';
|
|
2
2
|
export { BaseTransport } from './base';
|
|
3
3
|
export { TransportItemType, transportItemTypeToBodyKey } from './const';
|
|
4
|
+
export { registerInitialTransports } from './registerInitial';
|
|
4
5
|
export type { BeforeSendHook, Transport, TransportBody, TransportItem, TransportItemPayload, Transports, } from './types';
|
|
5
6
|
export { getTransportBody } from './utils';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Config, Patterns } from '../config';
|
|
2
2
|
import type { InternalLogger } from '../internalLogger';
|
|
3
|
+
import type { Metas } from '../metas';
|
|
4
|
+
import type { UnpatchedConsole } from '../unpatchedConsole';
|
|
3
5
|
import type { BeforeSendHook, Transports } from './types';
|
|
4
6
|
export declare function shouldIgnoreEvent(patterns: Patterns, msg: string): boolean;
|
|
5
7
|
export declare function createBeforeSendHookFromIgnorePatterns(patterns: Patterns): BeforeSendHook;
|
|
6
|
-
export declare function initializeTransports(internalLogger: InternalLogger, config: Config): Transports;
|
|
8
|
+
export declare function initializeTransports(unpatchedConsole: UnpatchedConsole, internalLogger: InternalLogger, config: Config, metas: Metas): Transports;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { APIEvent, EventEvent, ExceptionEvent, LogEvent, MeasurementEvent, TraceEvent } from '../api';
|
|
2
2
|
import type { Patterns } from '../config';
|
|
3
|
+
import type { Extension } from '../extensions';
|
|
3
4
|
import type { Meta } from '../metas';
|
|
4
|
-
import type { Extension } from '../utils';
|
|
5
5
|
import type { TransportItemType } from './const';
|
|
6
6
|
export type TransportItemPayload<P = APIEvent> = P;
|
|
7
7
|
export type BeforeSendHook<P = APIEvent> = (item: TransportItem<P>) => TransportItem<P> | null;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function deepEqual(a: any, b: any): boolean;
|
|
File without changes
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
export { BaseExtension } from './extensions';
|
|
2
|
-
export type { Extension } from './extensions';
|
|
3
1
|
export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue } from './baseObject';
|
|
4
2
|
export { deepEqual } from './deepEqual';
|
|
5
3
|
export { getCurrentTimestamp } from './getCurrentTimestamp';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VERSION = "1.0.0";
|