@grafana/faro-core 1.2.0 → 1.2.2
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/events/index.d.ts +2 -0
- package/dist/bundle/types/api/events/initialize.d.ts +8 -0
- package/dist/bundle/types/api/events/types.d.ts +15 -0
- package/dist/bundle/types/api/exceptions/const.d.ts +1 -0
- package/dist/bundle/types/api/exceptions/index.d.ts +3 -0
- package/dist/bundle/types/api/exceptions/initialize.d.ts +8 -0
- package/dist/bundle/types/api/exceptions/types.d.ts +35 -0
- package/dist/bundle/types/api/index.d.ts +9 -0
- package/dist/bundle/types/api/initialize.d.ts +7 -0
- package/dist/bundle/types/api/logs/index.d.ts +2 -0
- package/dist/bundle/types/api/logs/initialize.d.ts +8 -0
- package/dist/bundle/types/api/logs/types.d.ts +18 -0
- package/dist/bundle/types/api/measurements/index.d.ts +2 -0
- package/dist/bundle/types/api/measurements/initialize.d.ts +8 -0
- package/dist/bundle/types/api/measurements/types.d.ts +20 -0
- package/dist/bundle/types/api/meta/index.d.ts +2 -0
- package/dist/bundle/types/api/meta/initialize.d.ts +7 -0
- package/dist/bundle/types/api/meta/types.d.ts +10 -0
- package/dist/bundle/types/api/traces/index.d.ts +2 -0
- package/dist/bundle/types/api/traces/initialize.d.ts +7 -0
- package/dist/bundle/types/api/traces/types.d.ts +20 -0
- package/dist/bundle/types/api/types.d.ts +8 -0
- package/dist/bundle/types/config/const.d.ts +6 -0
- package/dist/bundle/types/config/index.d.ts +2 -0
- package/dist/bundle/types/config/types.d.ts +34 -0
- package/dist/bundle/types/extensions/baseExtension.d.ts +15 -0
- package/dist/bundle/types/extensions/index.d.ts +2 -0
- package/dist/bundle/types/extensions/types.d.ts +16 -0
- package/dist/bundle/types/globalObject/globalObject.d.ts +7 -0
- package/dist/bundle/types/globalObject/index.d.ts +2 -0
- package/dist/bundle/types/index.d.ts +24 -0
- package/dist/bundle/types/initialize.d.ts +3 -0
- package/dist/bundle/types/instrumentations/base.d.ts +9 -0
- package/dist/bundle/types/instrumentations/index.d.ts +4 -0
- package/dist/bundle/types/instrumentations/initialize.d.ts +8 -0
- package/dist/bundle/types/instrumentations/registerInitial.d.ts +2 -0
- package/dist/bundle/types/instrumentations/types.d.ts +14 -0
- package/dist/bundle/types/internalLogger/const.d.ts +11 -0
- package/dist/bundle/types/internalLogger/createInternalLogger.d.ts +4 -0
- package/dist/bundle/types/internalLogger/index.d.ts +4 -0
- package/dist/bundle/types/internalLogger/initialize.d.ts +5 -0
- package/dist/bundle/types/internalLogger/types.d.ts +7 -0
- package/dist/bundle/types/metas/index.d.ts +3 -0
- package/dist/bundle/types/metas/initialize.d.ts +5 -0
- package/dist/bundle/types/metas/registerInitial.d.ts +2 -0
- package/dist/bundle/types/metas/types.d.ts +71 -0
- package/dist/bundle/types/sdk/const.d.ts +1 -0
- package/dist/bundle/types/sdk/faroGlobalObject.d.ts +2 -0
- package/dist/bundle/types/sdk/index.d.ts +4 -0
- package/dist/bundle/types/sdk/internalFaroGlobalObject.d.ts +4 -0
- package/dist/bundle/types/sdk/registerFaro.d.ts +10 -0
- package/dist/bundle/types/sdk/types.d.ts +18 -0
- package/dist/bundle/types/semantic.d.ts +8 -0
- package/dist/bundle/types/testUtils/index.d.ts +6 -0
- package/dist/bundle/types/testUtils/mockConfig.d.ts +2 -0
- package/dist/bundle/types/testUtils/mockInternalLogger.d.ts +2 -0
- package/dist/bundle/types/testUtils/mockStacktraceParser.d.ts +2 -0
- package/dist/bundle/types/testUtils/mockTransport.d.ts +13 -0
- package/dist/bundle/types/testUtils/testPromise.d.ts +7 -0
- package/dist/bundle/types/transports/base.d.ts +7 -0
- package/dist/bundle/types/transports/batchExecutor.d.ts +16 -0
- package/dist/bundle/types/transports/const.d.ts +9 -0
- package/dist/bundle/types/transports/index.d.ts +6 -0
- package/dist/bundle/types/transports/initialize.d.ts +8 -0
- package/dist/bundle/types/transports/registerInitial.d.ts +2 -0
- package/dist/bundle/types/transports/types.d.ts +46 -0
- package/dist/bundle/types/transports/utils.d.ts +5 -0
- package/dist/bundle/types/unpatchedConsole/const.d.ts +2 -0
- package/dist/bundle/types/unpatchedConsole/index.d.ts +3 -0
- package/dist/bundle/types/unpatchedConsole/initialize.d.ts +4 -0
- package/dist/bundle/types/unpatchedConsole/types.d.ts +1 -0
- package/dist/bundle/types/utils/baseObject.d.ts +6 -0
- package/dist/bundle/types/utils/date.d.ts +1 -0
- package/dist/bundle/types/utils/deepEqual.d.ts +1 -0
- package/dist/bundle/types/utils/getCurrentTimestamp.d.ts +1 -0
- package/dist/bundle/types/utils/index.d.ts +11 -0
- package/dist/bundle/types/utils/is.d.ts +31 -0
- package/dist/bundle/types/utils/logLevels.d.ts +10 -0
- package/dist/bundle/types/utils/noop.d.ts +1 -0
- package/dist/bundle/types/utils/promiseBuffer.d.ts +14 -0
- package/dist/bundle/types/utils/shortId.d.ts +1 -0
- package/dist/bundle/types/version.d.ts +1 -0
- package/dist/cjs/config/types.js.map +1 -1
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/metas/index.js.map +1 -1
- package/dist/cjs/metas/registerInitial.js +5 -4
- package/dist/cjs/metas/registerInitial.js.map +1 -1
- package/dist/cjs/metas/types.js.map +1 -1
- package/dist/cjs/utils/date.js +8 -0
- package/dist/cjs/utils/date.js.map +1 -0
- package/dist/cjs/utils/index.js +3 -1
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/config/types.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/metas/index.js.map +1 -1
- package/dist/esm/metas/registerInitial.js +5 -4
- package/dist/esm/metas/registerInitial.js.map +1 -1
- package/dist/esm/metas/types.js.map +1 -1
- package/dist/esm/utils/date.js +4 -0
- package/dist/esm/utils/date.js.map +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/index.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/spec/core/src/config/types.js.map +1 -1
- package/dist/spec/core/src/index.js +2 -1
- package/dist/spec/core/src/index.js.map +1 -1
- package/dist/spec/core/src/metas/index.js.map +1 -1
- package/dist/spec/core/src/metas/registerInitial.js +5 -4
- package/dist/spec/core/src/metas/registerInitial.js.map +1 -1
- package/dist/spec/core/src/metas/types.js.map +1 -1
- package/dist/spec/core/src/utils/date.js +8 -0
- package/dist/spec/core/src/utils/date.js.map +1 -0
- package/dist/spec/core/src/utils/index.js +3 -1
- package/dist/spec/core/src/utils/index.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/config/types.d.ts +6 -0
- package/dist/types/core/src/config/types.d.ts +6 -0
- package/dist/types/core/src/index.d.ts +1 -1
- package/dist/types/core/src/metas/index.d.ts +1 -1
- package/dist/types/core/src/metas/types.d.ts +4 -0
- package/dist/types/core/src/testUtils/mockTransport.d.ts +1 -1
- package/dist/types/core/src/utils/date.d.ts +1 -0
- package/dist/types/core/src/utils/index.d.ts +1 -0
- package/dist/types/core/src/version.d.ts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/metas/index.d.ts +1 -1
- package/dist/types/metas/types.d.ts +4 -0
- package/dist/types/testUtils/mockTransport.d.ts +1 -1
- package/dist/types/utils/date.d.ts +1 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +2 -2
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AA4B7C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAmBzG,OAAO,EACL,IAAI,EACJ,+BAA+B,EAC/B,uBAAuB,EACvB,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAW9G,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,SAAS,EACT,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,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,EACX,QAAQ,EACR,IAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AA4B7C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAGzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAGzD,OAAO,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAmBzG,OAAO,EACL,IAAI,EACJ,+BAA+B,EAC/B,uBAAuB,EACvB,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAW9G,OAAO,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAG7D,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,SAAS,EACT,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,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,EACX,QAAQ,EACR,IAAI,EACJ,OAAO,GACR,MAAM,SAAS,CAAC;AAYjB,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC","sourcesContent":["export { defaultExceptionType } from './api';\nexport type {\n API,\n APIEvent,\n EventAttributes,\n EventEvent,\n EventsAPI,\n ExceptionEvent,\n ExceptionStackFrame,\n ExceptionsAPI,\n ExtendedError,\n LogContext,\n LogEvent,\n LogsAPI,\n MeasurementEvent,\n MeasurementsAPI,\n MetaAPI,\n OTELApi,\n PushErrorOptions,\n PushLogOptions,\n PushMeasurementOptions,\n Stacktrace,\n StacktraceParser,\n TraceContext,\n TraceEvent,\n TracesAPI,\n} from './api';\n\nexport { BaseExtension } from './extensions';\nexport type { Extension } from './extensions';\n\nexport { globalObject } from './globalObject';\nexport type { GlobalObject } from './globalObject';\n\nexport { initializeFaro } from './initialize';\n\nexport { defaultBatchingConfig, defaultGlobalObjectKey } from './config';\nexport type { Config, Patterns } from './config';\n\nexport { BaseInstrumentation } from './instrumentations';\nexport type { Instrumentation, Instrumentations } from './instrumentations';\n\nexport { createInternalLogger, defaultInternalLoggerLevel, InternalLoggerLevel } from './internalLogger';\nexport type { InternalLogger } from './internalLogger';\n\nexport type {\n Meta,\n MetaApp,\n MetaAttributes,\n MetaBrowser,\n MetaGetter,\n MetaItem,\n MetaPage,\n Metas,\n MetaSDK,\n MetaSDKIntegration,\n MetaSession,\n MetaUser,\n MetaView,\n} from './metas';\n\nexport {\n faro,\n getInternalFaroFromGlobalObject,\n internalGlobalObjectKey,\n isInternalFaroOnGlobalObject,\n setInternalFaroOnGlobalObject,\n} from './sdk';\nexport type { Faro } from './sdk';\n\nexport { Conventions } from './semantic';\n\nexport { BaseTransport, getTransportBody, TransportItemType, transportItemTypeToBodyKey } from './transports';\nexport type {\n BeforeSendHook,\n SendFn,\n Transport,\n TransportBody,\n TransportItem,\n TransportItemPayload,\n Transports,\n} from './transports';\n\nexport { defaultUnpatchedConsole } from './unpatchedConsole';\nexport type { UnpatchedConsole } from './unpatchedConsole';\n\nexport {\n allLogLevels,\n createPromiseBuffer,\n deepEqual,\n defaultLogLevel,\n genShortID,\n getCurrentTimestamp,\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 LogLevel,\n noop,\n dateNow,\n} from './utils';\nexport type {\n BaseObject,\n BaseObjectKey,\n BaseObjectPrimitiveValue,\n BaseObjectValue,\n BufferItem,\n PromiseBuffer,\n PromiseBufferOptions,\n PromiseProducer,\n} from './utils';\n\nexport { VERSION } from './version';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/metas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { initializeMetas } from './initialize';\n\nexport { registerInitialMetas } from './registerInitial';\n\nexport type {\n Meta,\n MetaApp,\n MetaAttributes,\n MetaBrowser,\n MetaGetter,\n MetaItem,\n
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/metas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export { initializeMetas } from './initialize';\n\nexport { registerInitialMetas } from './registerInitial';\n\nexport type {\n Meta,\n MetaApp,\n MetaAttributes,\n MetaBrowser,\n MetaGetter,\n MetaItem,\n MetaK6,\n MetaPage,\n MetaSDK,\n MetaSDKIntegration,\n MetaSession,\n MetaUser,\n MetaView,\n Metas,\n} from './types';\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VERSION } from '../version';
|
|
2
2
|
export function registerInitialMetas(faro) {
|
|
3
|
-
var _a;
|
|
3
|
+
var _a, _b, _c;
|
|
4
4
|
const initial = {
|
|
5
5
|
sdk: {
|
|
6
6
|
name: '@grafana/faro-core',
|
|
@@ -8,8 +8,9 @@ export function registerInitialMetas(faro) {
|
|
|
8
8
|
integrations: faro.config.instrumentations.map(({ name, version }) => ({ name, version })),
|
|
9
9
|
},
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
const session = (_b = (_a = faro.config.experimentalSessions) === null || _a === void 0 ? void 0 : _a.session) !== null && _b !== void 0 ? _b : faro.config.session;
|
|
12
|
+
if (session) {
|
|
13
|
+
faro.api.setSession(session);
|
|
13
14
|
}
|
|
14
15
|
if (faro.config.app) {
|
|
15
16
|
initial.app = faro.config.app;
|
|
@@ -20,6 +21,6 @@ export function registerInitialMetas(faro) {
|
|
|
20
21
|
if (faro.config.view) {
|
|
21
22
|
initial.view = faro.config.view;
|
|
22
23
|
}
|
|
23
|
-
faro.metas.add(initial, ...((
|
|
24
|
+
faro.metas.add(initial, ...((_c = faro.config.metas) !== null && _c !== void 0 ? _c : []));
|
|
24
25
|
}
|
|
25
26
|
//# sourceMappingURL=registerInitial.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerInitial.js","sourceRoot":"","sources":["../../../src/metas/registerInitial.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,MAAM,UAAU,oBAAoB,CAAC,IAAU;;IAC7C,MAAM,OAAO,GAAS;QACpB,GAAG,EAAE;YACH,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;SAC3F;KACF,CAAC;IAEF,
|
|
1
|
+
{"version":3,"file":"registerInitial.js","sourceRoot":"","sources":["../../../src/metas/registerInitial.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAIrC,MAAM,UAAU,oBAAoB,CAAC,IAAU;;IAC7C,MAAM,OAAO,GAAS;QACpB,GAAG,EAAE;YACH,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,OAAO;YAChB,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;SAC3F;KACF,CAAC;IAEF,MAAM,OAAO,GAAG,MAAA,MAAA,IAAI,CAAC,MAAM,CAAC,oBAAoB,0CAAE,OAAO,mCAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IACjF,IAAI,OAAO,EAAE;QACX,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;KAC9B;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;QACnB,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;KAC/B;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QACpB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;KACjC;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QACpB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;KACjC;IAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,MAAA,IAAI,CAAC,MAAM,CAAC,KAAK,mCAAI,EAAE,CAAC,CAAC,CAAC;AACxD,CAAC","sourcesContent":["import type { Faro } from '../sdk';\nimport { VERSION } from '../version';\n\nimport type { Meta } from './types';\n\nexport function registerInitialMetas(faro: Faro): void {\n const initial: Meta = {\n sdk: {\n name: '@grafana/faro-core',\n version: VERSION,\n integrations: faro.config.instrumentations.map(({ name, version }) => ({ name, version })),\n },\n };\n\n const session = faro.config.experimentalSessions?.session ?? faro.config.session;\n if (session) {\n faro.api.setSession(session);\n }\n\n if (faro.config.app) {\n initial.app = faro.config.app;\n }\n\n if (faro.config.user) {\n initial.user = faro.config.user;\n }\n\n if (faro.config.view) {\n initial.view = faro.config.view;\n }\n\n faro.metas.add(initial, ...(faro.config.metas ?? []));\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/metas/types.ts"],"names":[],"mappings":"","sourcesContent":["export type MetaGetter<P = Partial<Meta>> = () => P;\n\nexport type MetaItem<P = Partial<Meta>> = P | MetaGetter<P>;\n\nexport type MetasListener = (value: Meta) => void;\n\nexport interface Metas {\n add: (...getters: MetaItem[]) => void;\n remove: (...getters: MetaItem[]) => void;\n addListener: (listener: MetasListener) => void;\n removeListener: (listener: MetasListener) => void;\n value: Meta;\n}\n\nexport type MetaAttributes = Record<string, string>;\n\nexport interface MetaSDKIntegration {\n name?: string;\n version?: string;\n}\n\nexport interface MetaSDK {\n name?: string;\n version?: string;\n integrations?: MetaSDKIntegration[];\n}\n\nexport interface MetaApp {\n name?: string;\n release?: string;\n version?: string;\n environment?: string;\n}\n\nexport interface MetaUser {\n email?: string;\n id?: string;\n username?: string;\n attributes?: MetaAttributes;\n}\n\nexport interface MetaSession {\n id?: string;\n attributes?: MetaAttributes;\n}\n\nexport interface MetaPage {\n id?: string;\n url?: string;\n attributes?: MetaAttributes;\n}\n\ninterface NavigatorUABrandVersion {\n brand?: string;\n version?: string;\n}\n\nexport interface MetaBrowser {\n name?: string;\n version?: string;\n os?: string;\n mobile?: boolean;\n userAgent?: string;\n language?: string;\n brands?: NavigatorUABrandVersion[] | string;\n}\n\nexport interface MetaView {\n name: string;\n}\n\nexport interface Meta {\n sdk?: MetaSDK;\n app?: MetaApp;\n user?: MetaUser;\n session?: MetaSession;\n page?: MetaPage;\n browser?: MetaBrowser;\n view?: MetaView;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/metas/types.ts"],"names":[],"mappings":"","sourcesContent":["export type MetaGetter<P = Partial<Meta>> = () => P;\n\nexport type MetaItem<P = Partial<Meta>> = P | MetaGetter<P>;\n\nexport type MetasListener = (value: Meta) => void;\n\nexport interface Metas {\n add: (...getters: MetaItem[]) => void;\n remove: (...getters: MetaItem[]) => void;\n addListener: (listener: MetasListener) => void;\n removeListener: (listener: MetasListener) => void;\n value: Meta;\n}\n\nexport type MetaAttributes = Record<string, string>;\n\nexport interface MetaSDKIntegration {\n name?: string;\n version?: string;\n}\n\nexport interface MetaSDK {\n name?: string;\n version?: string;\n integrations?: MetaSDKIntegration[];\n}\n\nexport interface MetaApp {\n name?: string;\n release?: string;\n version?: string;\n environment?: string;\n}\n\nexport interface MetaUser {\n email?: string;\n id?: string;\n username?: string;\n attributes?: MetaAttributes;\n}\n\nexport interface MetaSession {\n id?: string;\n attributes?: MetaAttributes;\n}\n\nexport interface MetaPage {\n id?: string;\n url?: string;\n attributes?: MetaAttributes;\n}\n\ninterface NavigatorUABrandVersion {\n brand?: string;\n version?: string;\n}\n\nexport interface MetaBrowser {\n name?: string;\n version?: string;\n os?: string;\n mobile?: boolean;\n userAgent?: string;\n language?: string;\n brands?: NavigatorUABrandVersion[] | string;\n}\n\nexport interface MetaView {\n name: string;\n}\n\nexport interface MetaK6 {\n isK6Browser?: boolean;\n}\n\nexport interface Meta {\n sdk?: MetaSDK;\n app?: MetaApp;\n user?: MetaUser;\n session?: MetaSession;\n page?: MetaPage;\n browser?: MetaBrowser;\n view?: MetaView;\n k6?: MetaK6;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../../src/utils/date.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,OAAO;IACrB,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;AACpB,CAAC","sourcesContent":["export function dateNow(): number {\n return Date.now();\n}\n"]}
|
package/dist/esm/utils/index.js
CHANGED
|
@@ -5,4 +5,5 @@ export { allLogLevels, defaultLogLevel, LogLevel } from './logLevels';
|
|
|
5
5
|
export { noop } from './noop';
|
|
6
6
|
export { createPromiseBuffer } from './promiseBuffer';
|
|
7
7
|
export { genShortID } from './shortId';
|
|
8
|
+
export { dateNow } from './date';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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
|
+
{"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;AAEvC,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,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\nexport { dateNow } from './date';\n"]}
|
package/dist/esm/version.js
CHANGED
package/dist/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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.2.
|
|
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.2.2';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/config/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { APIEvent, StacktraceParser } from '../api';\nimport type { Instrumentation } from '../instrumentations';\nimport type { InternalLoggerLevel } from '../internalLogger';\nimport type { MetaApp, MetaItem, MetaSession, MetaUser, MetaView } from '../metas';\nimport type { BatchExecutorOptions, BeforeSendHook, Transport } from '../transports';\nimport type { UnpatchedConsole } from '../unpatchedConsole';\n\nexport interface Config<P = APIEvent> {\n app: MetaApp;\n batching?: BatchExecutorOptions;\n dedupe: boolean;\n globalObjectKey: string;\n instrumentations: Instrumentation[];\n internalLoggerLevel: InternalLoggerLevel;\n isolate: boolean;\n metas: MetaItem[];\n parseStacktrace: StacktraceParser;\n paused: boolean;\n preventGlobalExposure: boolean;\n transports: Transport[];\n unpatchedConsole: UnpatchedConsole;\n\n beforeSend?: BeforeSendHook<P>;\n ignoreErrors?: Patterns;\n session?: MetaSession;\n user?: MetaUser;\n view?: MetaView;\n eventDomain?: string;\n}\n\nexport type Patterns = Array<string | RegExp>;\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/config/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { APIEvent, StacktraceParser } from '../api';\nimport type { Instrumentation } from '../instrumentations';\nimport type { InternalLoggerLevel } from '../internalLogger';\nimport type { MetaApp, MetaItem, MetaSession, MetaUser, MetaView } from '../metas';\nimport type { BatchExecutorOptions, BeforeSendHook, Transport } from '../transports';\nimport type { UnpatchedConsole } from '../unpatchedConsole';\n\nexport interface Config<P = APIEvent> {\n app: MetaApp;\n batching?: BatchExecutorOptions;\n dedupe: boolean;\n globalObjectKey: string;\n instrumentations: Instrumentation[];\n internalLoggerLevel: InternalLoggerLevel;\n isolate: boolean;\n metas: MetaItem[];\n parseStacktrace: StacktraceParser;\n paused: boolean;\n preventGlobalExposure: boolean;\n transports: Transport[];\n unpatchedConsole: UnpatchedConsole;\n\n beforeSend?: BeforeSendHook<P>;\n ignoreErrors?: Patterns;\n // TODO: Deprecate?\n session?: MetaSession;\n // TODO: rename to \"sessions\" once feature is ready. Do not use in any prod envs!\n experimentalSessions?: {\n enabled?: boolean;\n persistent?: boolean;\n session?: MetaSession;\n onSessionChange?: (oldSession: MetaSession | null, newSession: MetaSession) => void;\n };\n\n user?: MetaUser;\n view?: MetaView;\n eventDomain?: string;\n}\n\nexport type Patterns = Array<string | RegExp>;\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isSymbol = exports.isString = exports.isRegExp = exports.isPrimitive = exports.isObject = exports.isNumber = exports.isNull = exports.isMapDefined = exports.isMap = exports.isInt = exports.isInstanceOf = exports.isFunction = exports.isEventDefined = exports.isEvent = exports.isErrorEvent = exports.isErrorDefined = exports.isError = exports.isElementDefined = exports.isElement = exports.isDomException = exports.isDomError = exports.isBoolean = exports.isArray = exports.getCurrentTimestamp = exports.genShortID = exports.defaultLogLevel = exports.deepEqual = exports.createPromiseBuffer = exports.allLogLevels = exports.defaultUnpatchedConsole = exports.transportItemTypeToBodyKey = exports.TransportItemType = exports.getTransportBody = exports.BaseTransport = exports.Conventions = exports.setInternalFaroOnGlobalObject = exports.isInternalFaroOnGlobalObject = exports.internalGlobalObjectKey = exports.getInternalFaroFromGlobalObject = exports.faro = exports.InternalLoggerLevel = exports.defaultInternalLoggerLevel = exports.createInternalLogger = exports.BaseInstrumentation = exports.defaultGlobalObjectKey = exports.defaultBatchingConfig = exports.initializeFaro = exports.globalObject = exports.BaseExtension = exports.defaultExceptionType = void 0;
|
|
4
|
-
exports.VERSION = exports.noop = exports.LogLevel = exports.isUndefined = exports.isTypeof = exports.isToString = exports.isThenable = exports.isSyntheticEvent = void 0;
|
|
4
|
+
exports.VERSION = exports.dateNow = exports.noop = exports.LogLevel = exports.isUndefined = exports.isTypeof = exports.isToString = exports.isThenable = exports.isSyntheticEvent = void 0;
|
|
5
5
|
var api_1 = require("./api");
|
|
6
6
|
Object.defineProperty(exports, "defaultExceptionType", { enumerable: true, get: function () { return api_1.defaultExceptionType; } });
|
|
7
7
|
var extensions_1 = require("./extensions");
|
|
@@ -71,6 +71,7 @@ Object.defineProperty(exports, "isTypeof", { enumerable: true, get: function ()
|
|
|
71
71
|
Object.defineProperty(exports, "isUndefined", { enumerable: true, get: function () { return utils_1.isUndefined; } });
|
|
72
72
|
Object.defineProperty(exports, "LogLevel", { enumerable: true, get: function () { return utils_1.LogLevel; } });
|
|
73
73
|
Object.defineProperty(exports, "noop", { enumerable: true, get: function () { return utils_1.noop; } });
|
|
74
|
+
Object.defineProperty(exports, "dateNow", { enumerable: true, get: function () { return utils_1.dateNow; } });
|
|
74
75
|
var version_1 = require("./version");
|
|
75
76
|
Object.defineProperty(exports, "VERSION", { enumerable: true, get: function () { return version_1.VERSION; } });
|
|
76
77
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":";;;;AAAA,6BAA6C;AAApC,2GAAA,oBAAoB,OAAA;AA4B7B,2CAA6C;AAApC,2GAAA,aAAa,OAAA;AAGtB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAGrB,2CAA8C;AAArC,4GAAA,cAAc,OAAA;AAEvB,mCAAyE;AAAhE,+GAAA,qBAAqB,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AAGtD,uDAAyD;AAAhD,uHAAA,mBAAmB,OAAA;AAG5B,mDAAyG;AAAhG,sHAAA,oBAAoB,OAAA;AAAE,4HAAA,0BAA0B,OAAA;AAAE,qHAAA,mBAAmB,OAAA;AAmB9E,6BAMe;AALb,2FAAA,IAAI,OAAA;AACJ,sHAAA,+BAA+B,OAAA;AAC/B,8GAAA,uBAAuB,OAAA;AACvB,mHAAA,4BAA4B,OAAA;AAC5B,oHAAA,6BAA6B,OAAA;AAI/B,uCAAyC;AAAhC,uGAAA,WAAW,OAAA;AAEpB,2CAA8G;AAArG,2GAAA,aAAa,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AAAE,+GAAA,iBAAiB,OAAA;AAAE,wHAAA,0BAA0B,OAAA;AAWvF,uDAA6D;AAApD,2HAAA,uBAAuB,OAAA;AAGhC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":";;;;AAAA,6BAA6C;AAApC,2GAAA,oBAAoB,OAAA;AA4B7B,2CAA6C;AAApC,2GAAA,aAAa,OAAA;AAGtB,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAGrB,2CAA8C;AAArC,4GAAA,cAAc,OAAA;AAEvB,mCAAyE;AAAhE,+GAAA,qBAAqB,OAAA;AAAE,gHAAA,sBAAsB,OAAA;AAGtD,uDAAyD;AAAhD,uHAAA,mBAAmB,OAAA;AAG5B,mDAAyG;AAAhG,sHAAA,oBAAoB,OAAA;AAAE,4HAAA,0BAA0B,OAAA;AAAE,qHAAA,mBAAmB,OAAA;AAmB9E,6BAMe;AALb,2FAAA,IAAI,OAAA;AACJ,sHAAA,+BAA+B,OAAA;AAC/B,8GAAA,uBAAuB,OAAA;AACvB,mHAAA,4BAA4B,OAAA;AAC5B,oHAAA,6BAA6B,OAAA;AAI/B,uCAAyC;AAAhC,uGAAA,WAAW,OAAA;AAEpB,2CAA8G;AAArG,2GAAA,aAAa,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AAAE,+GAAA,iBAAiB,OAAA;AAAE,wHAAA,0BAA0B,OAAA;AAWvF,uDAA6D;AAApD,2HAAA,uBAAuB,OAAA;AAGhC,iCAsCiB;AArCf,qGAAA,YAAY,OAAA;AACZ,4GAAA,mBAAmB,OAAA;AACnB,kGAAA,SAAS,OAAA;AACT,wGAAA,eAAe,OAAA;AACf,mGAAA,UAAU,OAAA;AACV,4GAAA,mBAAmB,OAAA;AACnB,gGAAA,OAAO,OAAA;AACP,kGAAA,SAAS,OAAA;AACT,mGAAA,UAAU,OAAA;AACV,uGAAA,cAAc,OAAA;AACd,kGAAA,SAAS,OAAA;AACT,yGAAA,gBAAgB,OAAA;AAChB,gGAAA,OAAO,OAAA;AACP,uGAAA,cAAc,OAAA;AACd,qGAAA,YAAY,OAAA;AACZ,gGAAA,OAAO,OAAA;AACP,uGAAA,cAAc,OAAA;AACd,mGAAA,UAAU,OAAA;AACV,qGAAA,YAAY,OAAA;AACZ,8FAAA,KAAK,OAAA;AACL,8FAAA,KAAK,OAAA;AACL,qGAAA,YAAY,OAAA;AACZ,+FAAA,MAAM,OAAA;AACN,iGAAA,QAAQ,OAAA;AACR,iGAAA,QAAQ,OAAA;AACR,oGAAA,WAAW,OAAA;AACX,iGAAA,QAAQ,OAAA;AACR,iGAAA,QAAQ,OAAA;AACR,iGAAA,QAAQ,OAAA;AACR,yGAAA,gBAAgB,OAAA;AAChB,mGAAA,UAAU,OAAA;AACV,mGAAA,UAAU,OAAA;AACV,iGAAA,QAAQ,OAAA;AACR,oGAAA,WAAW,OAAA;AACX,iGAAA,QAAQ,OAAA;AACR,6FAAA,IAAI,OAAA;AACJ,gGAAA,OAAO,OAAA;AAaT,qCAAoC;AAA3B,kGAAA,OAAO,OAAA","sourcesContent":["export { defaultExceptionType } from './api';\nexport type {\n API,\n APIEvent,\n EventAttributes,\n EventEvent,\n EventsAPI,\n ExceptionEvent,\n ExceptionStackFrame,\n ExceptionsAPI,\n ExtendedError,\n LogContext,\n LogEvent,\n LogsAPI,\n MeasurementEvent,\n MeasurementsAPI,\n MetaAPI,\n OTELApi,\n PushErrorOptions,\n PushLogOptions,\n PushMeasurementOptions,\n Stacktrace,\n StacktraceParser,\n TraceContext,\n TraceEvent,\n TracesAPI,\n} from './api';\n\nexport { BaseExtension } from './extensions';\nexport type { Extension } from './extensions';\n\nexport { globalObject } from './globalObject';\nexport type { GlobalObject } from './globalObject';\n\nexport { initializeFaro } from './initialize';\n\nexport { defaultBatchingConfig, defaultGlobalObjectKey } from './config';\nexport type { Config, Patterns } from './config';\n\nexport { BaseInstrumentation } from './instrumentations';\nexport type { Instrumentation, Instrumentations } from './instrumentations';\n\nexport { createInternalLogger, defaultInternalLoggerLevel, InternalLoggerLevel } from './internalLogger';\nexport type { InternalLogger } from './internalLogger';\n\nexport type {\n Meta,\n MetaApp,\n MetaAttributes,\n MetaBrowser,\n MetaGetter,\n MetaItem,\n MetaPage,\n Metas,\n MetaSDK,\n MetaSDKIntegration,\n MetaSession,\n MetaUser,\n MetaView,\n} from './metas';\n\nexport {\n faro,\n getInternalFaroFromGlobalObject,\n internalGlobalObjectKey,\n isInternalFaroOnGlobalObject,\n setInternalFaroOnGlobalObject,\n} from './sdk';\nexport type { Faro } from './sdk';\n\nexport { Conventions } from './semantic';\n\nexport { BaseTransport, getTransportBody, TransportItemType, transportItemTypeToBodyKey } from './transports';\nexport type {\n BeforeSendHook,\n SendFn,\n Transport,\n TransportBody,\n TransportItem,\n TransportItemPayload,\n Transports,\n} from './transports';\n\nexport { defaultUnpatchedConsole } from './unpatchedConsole';\nexport type { UnpatchedConsole } from './unpatchedConsole';\n\nexport {\n allLogLevels,\n createPromiseBuffer,\n deepEqual,\n defaultLogLevel,\n genShortID,\n getCurrentTimestamp,\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 LogLevel,\n noop,\n dateNow,\n} from './utils';\nexport type {\n BaseObject,\n BaseObjectKey,\n BaseObjectPrimitiveValue,\n BaseObjectValue,\n BufferItem,\n PromiseBuffer,\n PromiseBufferOptions,\n PromiseProducer,\n} from './utils';\n\nexport { VERSION } from './version';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/metas/index.ts"],"names":[],"mappings":";;;AAAA,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AAExB,qDAAyD;AAAhD,uHAAA,oBAAoB,OAAA","sourcesContent":["export { initializeMetas } from './initialize';\n\nexport { registerInitialMetas } from './registerInitial';\n\nexport type {\n Meta,\n MetaApp,\n MetaAttributes,\n MetaBrowser,\n MetaGetter,\n MetaItem,\n
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/metas/index.ts"],"names":[],"mappings":";;;AAAA,2CAA+C;AAAtC,6GAAA,eAAe,OAAA;AAExB,qDAAyD;AAAhD,uHAAA,oBAAoB,OAAA","sourcesContent":["export { initializeMetas } from './initialize';\n\nexport { registerInitialMetas } from './registerInitial';\n\nexport type {\n Meta,\n MetaApp,\n MetaAttributes,\n MetaBrowser,\n MetaGetter,\n MetaItem,\n MetaK6,\n MetaPage,\n MetaSDK,\n MetaSDKIntegration,\n MetaSession,\n MetaUser,\n MetaView,\n Metas,\n} from './types';\n"]}
|
|
@@ -13,7 +13,7 @@ exports.registerInitialMetas = void 0;
|
|
|
13
13
|
var version_1 = require("../version");
|
|
14
14
|
function registerInitialMetas(faro) {
|
|
15
15
|
var _a;
|
|
16
|
-
var _b;
|
|
16
|
+
var _b, _c, _d;
|
|
17
17
|
var initial = {
|
|
18
18
|
sdk: {
|
|
19
19
|
name: '@grafana/faro-core',
|
|
@@ -24,8 +24,9 @@ function registerInitialMetas(faro) {
|
|
|
24
24
|
}),
|
|
25
25
|
},
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
var session = (_c = (_b = faro.config.experimentalSessions) === null || _b === void 0 ? void 0 : _b.session) !== null && _c !== void 0 ? _c : faro.config.session;
|
|
28
|
+
if (session) {
|
|
29
|
+
faro.api.setSession(session);
|
|
29
30
|
}
|
|
30
31
|
if (faro.config.app) {
|
|
31
32
|
initial.app = faro.config.app;
|
|
@@ -36,7 +37,7 @@ function registerInitialMetas(faro) {
|
|
|
36
37
|
if (faro.config.view) {
|
|
37
38
|
initial.view = faro.config.view;
|
|
38
39
|
}
|
|
39
|
-
(_a = faro.metas).add.apply(_a, __spreadArray([initial], ((
|
|
40
|
+
(_a = faro.metas).add.apply(_a, __spreadArray([initial], ((_d = faro.config.metas) !== null && _d !== void 0 ? _d : []), false));
|
|
40
41
|
}
|
|
41
42
|
exports.registerInitialMetas = registerInitialMetas;
|
|
42
43
|
//# sourceMappingURL=registerInitial.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registerInitial.js","sourceRoot":"","sources":["../../../../../src/metas/registerInitial.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sCAAqC;AAIrC,SAAgB,oBAAoB,CAAC,IAAU;;;IAC7C,IAAM,OAAO,GAAS;QACpB,GAAG,EAAE;YACH,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,iBAAO;YAChB,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAC,EAAiB;oBAAf,IAAI,UAAA,EAAE,OAAO,aAAA;gBAAO,OAAA,CAAC,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC;YAAnB,CAAmB,CAAC;SAC3F;KACF,CAAC;IAEF,
|
|
1
|
+
{"version":3,"file":"registerInitial.js","sourceRoot":"","sources":["../../../../../src/metas/registerInitial.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sCAAqC;AAIrC,SAAgB,oBAAoB,CAAC,IAAU;;;IAC7C,IAAM,OAAO,GAAS;QACpB,GAAG,EAAE;YACH,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,iBAAO;YAChB,YAAY,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,GAAG,CAAC,UAAC,EAAiB;oBAAf,IAAI,UAAA,EAAE,OAAO,aAAA;gBAAO,OAAA,CAAC,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EAAE,CAAC;YAAnB,CAAmB,CAAC;SAC3F;KACF,CAAC;IAEF,IAAM,OAAO,GAAG,MAAA,MAAA,IAAI,CAAC,MAAM,CAAC,oBAAoB,0CAAE,OAAO,mCAAI,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IACjF,IAAI,OAAO,EAAE;QACX,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;KAC9B;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;QACnB,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;KAC/B;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QACpB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;KACjC;IAED,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE;QACpB,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;KACjC;IAED,CAAA,KAAA,IAAI,CAAC,KAAK,CAAA,CAAC,GAAG,0BAAC,OAAO,GAAK,CAAC,MAAA,IAAI,CAAC,MAAM,CAAC,KAAK,mCAAI,EAAE,CAAC,UAAE;AACxD,CAAC;AA3BD,oDA2BC","sourcesContent":["import type { Faro } from '../sdk';\nimport { VERSION } from '../version';\n\nimport type { Meta } from './types';\n\nexport function registerInitialMetas(faro: Faro): void {\n const initial: Meta = {\n sdk: {\n name: '@grafana/faro-core',\n version: VERSION,\n integrations: faro.config.instrumentations.map(({ name, version }) => ({ name, version })),\n },\n };\n\n const session = faro.config.experimentalSessions?.session ?? faro.config.session;\n if (session) {\n faro.api.setSession(session);\n }\n\n if (faro.config.app) {\n initial.app = faro.config.app;\n }\n\n if (faro.config.user) {\n initial.user = faro.config.user;\n }\n\n if (faro.config.view) {\n initial.view = faro.config.view;\n }\n\n faro.metas.add(initial, ...(faro.config.metas ?? []));\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/metas/types.ts"],"names":[],"mappings":"","sourcesContent":["export type MetaGetter<P = Partial<Meta>> = () => P;\n\nexport type MetaItem<P = Partial<Meta>> = P | MetaGetter<P>;\n\nexport type MetasListener = (value: Meta) => void;\n\nexport interface Metas {\n add: (...getters: MetaItem[]) => void;\n remove: (...getters: MetaItem[]) => void;\n addListener: (listener: MetasListener) => void;\n removeListener: (listener: MetasListener) => void;\n value: Meta;\n}\n\nexport type MetaAttributes = Record<string, string>;\n\nexport interface MetaSDKIntegration {\n name?: string;\n version?: string;\n}\n\nexport interface MetaSDK {\n name?: string;\n version?: string;\n integrations?: MetaSDKIntegration[];\n}\n\nexport interface MetaApp {\n name?: string;\n release?: string;\n version?: string;\n environment?: string;\n}\n\nexport interface MetaUser {\n email?: string;\n id?: string;\n username?: string;\n attributes?: MetaAttributes;\n}\n\nexport interface MetaSession {\n id?: string;\n attributes?: MetaAttributes;\n}\n\nexport interface MetaPage {\n id?: string;\n url?: string;\n attributes?: MetaAttributes;\n}\n\ninterface NavigatorUABrandVersion {\n brand?: string;\n version?: string;\n}\n\nexport interface MetaBrowser {\n name?: string;\n version?: string;\n os?: string;\n mobile?: boolean;\n userAgent?: string;\n language?: string;\n brands?: NavigatorUABrandVersion[] | string;\n}\n\nexport interface MetaView {\n name: string;\n}\n\nexport interface Meta {\n sdk?: MetaSDK;\n app?: MetaApp;\n user?: MetaUser;\n session?: MetaSession;\n page?: MetaPage;\n browser?: MetaBrowser;\n view?: MetaView;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/metas/types.ts"],"names":[],"mappings":"","sourcesContent":["export type MetaGetter<P = Partial<Meta>> = () => P;\n\nexport type MetaItem<P = Partial<Meta>> = P | MetaGetter<P>;\n\nexport type MetasListener = (value: Meta) => void;\n\nexport interface Metas {\n add: (...getters: MetaItem[]) => void;\n remove: (...getters: MetaItem[]) => void;\n addListener: (listener: MetasListener) => void;\n removeListener: (listener: MetasListener) => void;\n value: Meta;\n}\n\nexport type MetaAttributes = Record<string, string>;\n\nexport interface MetaSDKIntegration {\n name?: string;\n version?: string;\n}\n\nexport interface MetaSDK {\n name?: string;\n version?: string;\n integrations?: MetaSDKIntegration[];\n}\n\nexport interface MetaApp {\n name?: string;\n release?: string;\n version?: string;\n environment?: string;\n}\n\nexport interface MetaUser {\n email?: string;\n id?: string;\n username?: string;\n attributes?: MetaAttributes;\n}\n\nexport interface MetaSession {\n id?: string;\n attributes?: MetaAttributes;\n}\n\nexport interface MetaPage {\n id?: string;\n url?: string;\n attributes?: MetaAttributes;\n}\n\ninterface NavigatorUABrandVersion {\n brand?: string;\n version?: string;\n}\n\nexport interface MetaBrowser {\n name?: string;\n version?: string;\n os?: string;\n mobile?: boolean;\n userAgent?: string;\n language?: string;\n brands?: NavigatorUABrandVersion[] | string;\n}\n\nexport interface MetaView {\n name: string;\n}\n\nexport interface MetaK6 {\n isK6Browser?: boolean;\n}\n\nexport interface Meta {\n sdk?: MetaSDK;\n app?: MetaApp;\n user?: MetaUser;\n session?: MetaSession;\n page?: MetaPage;\n browser?: MetaBrowser;\n view?: MetaView;\n k6?: MetaK6;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.js","sourceRoot":"","sources":["../../../../../src/utils/date.ts"],"names":[],"mappings":";;;AAAA,SAAgB,OAAO;IACrB,OAAO,IAAI,CAAC,GAAG,EAAE,CAAC;AACpB,CAAC;AAFD,0BAEC","sourcesContent":["export function dateNow(): number {\n return Date.now();\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.genShortID = exports.createPromiseBuffer = exports.noop = exports.LogLevel = exports.defaultLogLevel = exports.allLogLevels = exports.isUndefined = exports.isTypeof = exports.isToString = exports.isThenable = exports.isSyntheticEvent = exports.isSymbol = exports.isString = exports.isRegExp = exports.isPrimitive = exports.isObject = exports.isNumber = exports.isNull = exports.isMapDefined = exports.isMap = exports.isInt = exports.isInstanceOf = exports.isFunction = exports.isEventDefined = exports.isEvent = exports.isErrorEvent = exports.isErrorDefined = exports.isError = exports.isElementDefined = exports.isElement = exports.isDomException = exports.isDomError = exports.isBoolean = exports.isArray = exports.getCurrentTimestamp = exports.deepEqual = void 0;
|
|
3
|
+
exports.dateNow = exports.genShortID = exports.createPromiseBuffer = exports.noop = exports.LogLevel = exports.defaultLogLevel = exports.allLogLevels = exports.isUndefined = exports.isTypeof = exports.isToString = exports.isThenable = exports.isSyntheticEvent = exports.isSymbol = exports.isString = exports.isRegExp = exports.isPrimitive = exports.isObject = exports.isNumber = exports.isNull = exports.isMapDefined = exports.isMap = exports.isInt = exports.isInstanceOf = exports.isFunction = exports.isEventDefined = exports.isEvent = exports.isErrorEvent = exports.isErrorDefined = exports.isError = exports.isElementDefined = exports.isElement = exports.isDomException = exports.isDomError = exports.isBoolean = exports.isArray = exports.getCurrentTimestamp = exports.deepEqual = void 0;
|
|
4
4
|
var deepEqual_1 = require("./deepEqual");
|
|
5
5
|
Object.defineProperty(exports, "deepEqual", { enumerable: true, get: function () { return deepEqual_1.deepEqual; } });
|
|
6
6
|
var getCurrentTimestamp_1 = require("./getCurrentTimestamp");
|
|
@@ -44,4 +44,6 @@ var promiseBuffer_1 = require("./promiseBuffer");
|
|
|
44
44
|
Object.defineProperty(exports, "createPromiseBuffer", { enumerable: true, get: function () { return promiseBuffer_1.createPromiseBuffer; } });
|
|
45
45
|
var shortId_1 = require("./shortId");
|
|
46
46
|
Object.defineProperty(exports, "genShortID", { enumerable: true, get: function () { return shortId_1.genShortID; } });
|
|
47
|
+
var date_1 = require("./date");
|
|
48
|
+
Object.defineProperty(exports, "dateNow", { enumerable: true, get: function () { return date_1.dateNow; } });
|
|
47
49
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utils/index.ts"],"names":[],"mappings":";;;AAEA,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAElB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAE5B,2BA6Bc;AA5BZ,6FAAA,OAAO,OAAA;AACP,+FAAA,SAAS,OAAA;AACT,gGAAA,UAAU,OAAA;AACV,oGAAA,cAAc,OAAA;AACd,+FAAA,SAAS,OAAA;AACT,sGAAA,gBAAgB,OAAA;AAChB,6FAAA,OAAO,OAAA;AACP,oGAAA,cAAc,OAAA;AACd,kGAAA,YAAY,OAAA;AACZ,6FAAA,OAAO,OAAA;AACP,oGAAA,cAAc,OAAA;AACd,gGAAA,UAAU,OAAA;AACV,kGAAA,YAAY,OAAA;AACZ,2FAAA,KAAK,OAAA;AACL,2FAAA,KAAK,OAAA;AACL,kGAAA,YAAY,OAAA;AACZ,4FAAA,MAAM,OAAA;AACN,8FAAA,QAAQ,OAAA;AACR,8FAAA,QAAQ,OAAA;AACR,iGAAA,WAAW,OAAA;AACX,8FAAA,QAAQ,OAAA;AACR,8FAAA,QAAQ,OAAA;AACR,8FAAA,QAAQ,OAAA;AACR,sGAAA,gBAAgB,OAAA;AAChB,gGAAA,UAAU,OAAA;AACV,gGAAA,UAAU,OAAA;AACV,8FAAA,QAAQ,OAAA;AACR,iGAAA,WAAW,OAAA;AAIb,yCAAsE;AAA7D,yGAAA,YAAY,OAAA;AAAE,4GAAA,eAAe,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAEhD,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AAEb,iDAAsD;AAA7C,oHAAA,mBAAmB,OAAA;AAG5B,qCAAuC;AAA9B,qGAAA,UAAU,OAAA","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
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utils/index.ts"],"names":[],"mappings":";;;AAEA,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAElB,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA;AAE5B,2BA6Bc;AA5BZ,6FAAA,OAAO,OAAA;AACP,+FAAA,SAAS,OAAA;AACT,gGAAA,UAAU,OAAA;AACV,oGAAA,cAAc,OAAA;AACd,+FAAA,SAAS,OAAA;AACT,sGAAA,gBAAgB,OAAA;AAChB,6FAAA,OAAO,OAAA;AACP,oGAAA,cAAc,OAAA;AACd,kGAAA,YAAY,OAAA;AACZ,6FAAA,OAAO,OAAA;AACP,oGAAA,cAAc,OAAA;AACd,gGAAA,UAAU,OAAA;AACV,kGAAA,YAAY,OAAA;AACZ,2FAAA,KAAK,OAAA;AACL,2FAAA,KAAK,OAAA;AACL,kGAAA,YAAY,OAAA;AACZ,4FAAA,MAAM,OAAA;AACN,8FAAA,QAAQ,OAAA;AACR,8FAAA,QAAQ,OAAA;AACR,iGAAA,WAAW,OAAA;AACX,8FAAA,QAAQ,OAAA;AACR,8FAAA,QAAQ,OAAA;AACR,8FAAA,QAAQ,OAAA;AACR,sGAAA,gBAAgB,OAAA;AAChB,gGAAA,UAAU,OAAA;AACV,gGAAA,UAAU,OAAA;AACV,8FAAA,QAAQ,OAAA;AACR,iGAAA,WAAW,OAAA;AAIb,yCAAsE;AAA7D,yGAAA,YAAY,OAAA;AAAE,4GAAA,eAAe,OAAA;AAAE,qGAAA,QAAQ,OAAA;AAEhD,+BAA8B;AAArB,4FAAA,IAAI,OAAA;AAEb,iDAAsD;AAA7C,oHAAA,mBAAmB,OAAA;AAG5B,qCAAuC;AAA9B,qGAAA,UAAU,OAAA;AAEnB,+BAAiC;AAAxB,+FAAA,OAAO,OAAA","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\nexport { dateNow } from './date';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/version.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACzB,QAAA,OAAO,GAAG,OAAO,CAAC","sourcesContent":["// auto-generated by bin/genVersion.ts\nexport const VERSION = '1.2.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../src/version.ts"],"names":[],"mappings":";;;AAAA,sCAAsC;AACzB,QAAA,OAAO,GAAG,OAAO,CAAC","sourcesContent":["// auto-generated by bin/genVersion.ts\nexport const VERSION = '1.2.2';\n"]}
|
|
@@ -21,6 +21,12 @@ export interface Config<P = APIEvent> {
|
|
|
21
21
|
beforeSend?: BeforeSendHook<P>;
|
|
22
22
|
ignoreErrors?: Patterns;
|
|
23
23
|
session?: MetaSession;
|
|
24
|
+
experimentalSessions?: {
|
|
25
|
+
enabled?: boolean;
|
|
26
|
+
persistent?: boolean;
|
|
27
|
+
session?: MetaSession;
|
|
28
|
+
onSessionChange?: (oldSession: MetaSession | null, newSession: MetaSession) => void;
|
|
29
|
+
};
|
|
24
30
|
user?: MetaUser;
|
|
25
31
|
view?: MetaView;
|
|
26
32
|
eventDomain?: string;
|
|
@@ -21,6 +21,12 @@ export interface Config<P = APIEvent> {
|
|
|
21
21
|
beforeSend?: BeforeSendHook<P>;
|
|
22
22
|
ignoreErrors?: Patterns;
|
|
23
23
|
session?: MetaSession;
|
|
24
|
+
experimentalSessions?: {
|
|
25
|
+
enabled?: boolean;
|
|
26
|
+
persistent?: boolean;
|
|
27
|
+
session?: MetaSession;
|
|
28
|
+
onSessionChange?: (oldSession: MetaSession | null, newSession: MetaSession) => void;
|
|
29
|
+
};
|
|
24
30
|
user?: MetaUser;
|
|
25
31
|
view?: MetaView;
|
|
26
32
|
eventDomain?: string;
|
|
@@ -19,6 +19,6 @@ 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, } from './utils';
|
|
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, } from './utils';
|
|
23
23
|
export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue, BufferItem, PromiseBuffer, PromiseBufferOptions, PromiseProducer, } from './utils';
|
|
24
24
|
export { VERSION } from './version';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { initializeMetas } from './initialize';
|
|
2
2
|
export { registerInitialMetas } from './registerInitial';
|
|
3
|
-
export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem,
|
|
3
|
+
export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaK6, MetaPage, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, MetaView, Metas, } from './types';
|
|
@@ -55,6 +55,9 @@ export interface MetaBrowser {
|
|
|
55
55
|
export interface MetaView {
|
|
56
56
|
name: string;
|
|
57
57
|
}
|
|
58
|
+
export interface MetaK6 {
|
|
59
|
+
isK6Browser?: boolean;
|
|
60
|
+
}
|
|
58
61
|
export interface Meta {
|
|
59
62
|
sdk?: MetaSDK;
|
|
60
63
|
app?: MetaApp;
|
|
@@ -63,5 +66,6 @@ export interface Meta {
|
|
|
63
66
|
page?: MetaPage;
|
|
64
67
|
browser?: MetaBrowser;
|
|
65
68
|
view?: MetaView;
|
|
69
|
+
k6?: MetaK6;
|
|
66
70
|
}
|
|
67
71
|
export {};
|
|
@@ -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.2.
|
|
7
|
+
readonly version = "1.2.2";
|
|
8
8
|
items: TransportItem[];
|
|
9
9
|
constructor(ignoreURLs?: Patterns);
|
|
10
10
|
send(items: TransportItem[]): void | Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dateNow(): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.2.
|
|
1
|
+
export declare const VERSION = "1.2.2";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,6 +19,6 @@ 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, } from './utils';
|
|
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, } from './utils';
|
|
23
23
|
export type { BaseObject, BaseObjectKey, BaseObjectPrimitiveValue, BaseObjectValue, BufferItem, PromiseBuffer, PromiseBufferOptions, PromiseProducer, } from './utils';
|
|
24
24
|
export { VERSION } from './version';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { initializeMetas } from './initialize';
|
|
2
2
|
export { registerInitialMetas } from './registerInitial';
|
|
3
|
-
export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem,
|
|
3
|
+
export type { Meta, MetaApp, MetaAttributes, MetaBrowser, MetaGetter, MetaItem, MetaK6, MetaPage, MetaSDK, MetaSDKIntegration, MetaSession, MetaUser, MetaView, Metas, } from './types';
|
|
@@ -55,6 +55,9 @@ export interface MetaBrowser {
|
|
|
55
55
|
export interface MetaView {
|
|
56
56
|
name: string;
|
|
57
57
|
}
|
|
58
|
+
export interface MetaK6 {
|
|
59
|
+
isK6Browser?: boolean;
|
|
60
|
+
}
|
|
58
61
|
export interface Meta {
|
|
59
62
|
sdk?: MetaSDK;
|
|
60
63
|
app?: MetaApp;
|
|
@@ -63,5 +66,6 @@ export interface Meta {
|
|
|
63
66
|
page?: MetaPage;
|
|
64
67
|
browser?: MetaBrowser;
|
|
65
68
|
view?: MetaView;
|
|
69
|
+
k6?: MetaK6;
|
|
66
70
|
}
|
|
67
71
|
export {};
|
|
@@ -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.2.
|
|
7
|
+
readonly version = "1.2.2";
|
|
8
8
|
items: TransportItem[];
|
|
9
9
|
constructor(ignoreURLs?: Patterns);
|
|
10
10
|
send(items: TransportItem[]): void | Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function dateNow(): number;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.2.
|
|
1
|
+
export declare const VERSION = "1.2.2";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/faro-core",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Core package of Faro.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"observability",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "aa7fb430007d0bc6c4713c1cc7b827d3f27c061b"
|
|
66
66
|
}
|