Socket
Socket
Sign inDemoInstall

@datadog/browser-core

Package Overview
Dependencies
0
Maintainers
1
Versions
248
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.11.0 to 5.12.0

2

cjs/boot/init.js

@@ -9,3 +9,3 @@ "use strict";

var publicApi = (0, polyfills_1.assign)({
version: "5.11.0",
version: "5.12.0",
// This API method is intentionally not monitored, since the only thing executed is the

@@ -12,0 +12,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and

@@ -1,2 +0,1 @@

import type { RawTelemetryConfiguration } from '../telemetry';
import type { Duration } from '../../tools/utils/timeUtils';

@@ -71,3 +70,18 @@ import type { SessionStoreStrategyType } from '../session/storeStrategies/sessionStoreStrategy';

export declare function validateAndBuildConfiguration(initConfiguration: InitConfiguration): Configuration | undefined;
export declare function serializeConfiguration(initConfiguration: InitConfiguration): Partial<RawTelemetryConfiguration>;
export declare function serializeConfiguration(initConfiguration: InitConfiguration): {
session_sample_rate: number | undefined;
telemetry_sample_rate: number | undefined;
telemetry_configuration_sample_rate: number | undefined;
use_before_send: boolean;
use_cross_site_session_cookie: boolean | undefined;
use_partitioned_cross_site_session_cookie: boolean | undefined;
use_secure_session_cookie: boolean | undefined;
use_proxy: boolean;
silent_multiple_init: boolean | undefined;
track_session_across_subdomains: boolean | undefined;
allow_fallback_to_local_storage: boolean;
store_contexts_across_pages: boolean;
allow_untrusted_events: boolean;
tracking_consent: TrackingConsent | undefined;
};
export {};

@@ -95,2 +95,3 @@ "use strict";

allow_untrusted_events: !!initConfiguration.allowUntrustedEvents,
tracking_consent: initConfiguration.trackingConsent,
};

@@ -97,0 +98,0 @@ }

@@ -36,7 +36,10 @@ "use strict";

}
var host = buildEndpointHost(initConfiguration);
var host = buildEndpointHost(trackType, initConfiguration);
return function (parameters) { return "https://".concat(host).concat(path, "?").concat(parameters); };
}
function buildEndpointHost(initConfiguration) {
function buildEndpointHost(trackType, initConfiguration) {
var _a = initConfiguration.site, site = _a === void 0 ? intakeSites_1.INTAKE_SITE_US1 : _a, internalAnalyticsSubdomain = initConfiguration.internalAnalyticsSubdomain;
if (trackType === 'logs' && initConfiguration.usePciIntake && site === intakeSites_1.INTAKE_SITE_US1) {
return 'pci.browser-intake-datadoghq.com';
}
if (internalAnalyticsSubdomain && site === intakeSites_1.INTAKE_SITE_US1) {

@@ -59,3 +62,3 @@ return "".concat(internalAnalyticsSubdomain, ".").concat(intakeSites_1.INTAKE_SITE_US1);

var retry = _b.retry, flushReason = _b.flushReason, encoding = _b.encoding;
var tags = ["sdk_version:".concat("5.11.0"), "api:".concat(api)].concat(configurationTags);
var tags = ["sdk_version:".concat("5.12.0"), "api:".concat(api)].concat(configurationTags);
if (flushReason && (0, experimentalFeatures_1.isExperimentalFeatureEnabled)(experimentalFeatures_1.ExperimentalFeature.COLLECT_FLUSH_REASON)) {

@@ -71,3 +74,3 @@ tags.push("flush_reason:".concat(flushReason));

"dd-api-key=".concat(clientToken),
"dd-evp-origin-version=".concat(encodeURIComponent("5.11.0")),
"dd-evp-origin-version=".concat(encodeURIComponent("5.12.0")),
'dd-evp-origin=browser',

@@ -74,0 +77,0 @@ "dd-request-id=".concat((0, stringUtils_1.generateUUID)()),

@@ -11,2 +11,5 @@ import type { ClocksState } from '../../tools/utils/timeUtils';

};
export type Csp = {
disposition: 'enforce' | 'report';
};
export interface RawError {

@@ -23,2 +26,3 @@ startClocks: ClocksState;

fingerprint?: string;
csp?: Csp;
}

@@ -25,0 +29,0 @@ export declare const ErrorSource: {

@@ -44,2 +44,3 @@ import type { Context } from '../../tools/serialisation/context';

session_replay_sample_rate?: number | undefined;
tracking_consent?: string | undefined;
start_session_replay_recording_manually?: boolean | undefined;

@@ -65,2 +66,3 @@ use_proxy?: boolean | undefined;

use_worker_url?: boolean | undefined;
compress_intake_requests?: boolean | undefined;
track_frustrations?: boolean | undefined;

@@ -94,2 +96,7 @@ track_views_manually?: boolean | undefined;

dart_version?: string | undefined;
unity_version?: string | undefined;
app_hang_threshold?: number | undefined;
use_pci_intake?: boolean | undefined;
tracer_api?: string | undefined;
tracer_api_version?: string | undefined;
};

@@ -96,0 +103,0 @@ })[];

@@ -55,3 +55,3 @@ "use strict";

service: telemetryService,
version: "5.11.0",
version: "5.12.0",
source: 'browser',

@@ -58,0 +58,0 @@ _dd: {

@@ -115,2 +115,6 @@ /**

/**
* The initial tracking consent value
*/
tracking_consent?: string;
/**
* Whether the session replay start is handled manually

@@ -196,2 +200,6 @@ */

/**
* Whether intake requests are compressed
*/
compress_intake_requests?: boolean;
/**
* Whether user frustrations are tracked

@@ -308,2 +316,22 @@ */

dart_version?: string;
/**
* The version of Unity used in a Unity application
*/
unity_version?: string;
/**
* The threshold used for iOS App Hangs monitoring (in milliseconds)
*/
app_hang_threshold?: number;
/**
* Either forward logs to the PCI compliant intake or not
*/
use_pci_intake?: boolean;
/**
* The tracer API used by the SDK. Possible values: 'Datadog', 'OpenTelemetry', 'OpenTracing'
*/
tracer_api?: string;
/**
* The version of the tracer API used by the SDK. Eg. '0.1.0'
*/
tracer_api_version?: string;
[k: string]: unknown;

@@ -310,0 +338,0 @@ };

@@ -63,8 +63,4 @@ export { Configuration, InitConfiguration, validateAndBuildConfiguration, DefaultPrivacyLevel, EndpointBuilder, serializeConfiguration, INTAKE_SITE_STAGING, INTAKE_SITE_US1, INTAKE_SITE_US1_FED, INTAKE_SITE_EU1, } from './domain/configuration';

export * from './tools/utils/typeUtils';
export { ErrorHandling } from './domain/error/error.types';
export { ErrorSource } from './domain/error/error.types';
export { RawError } from './domain/error/error.types';
export { RawErrorCause } from './domain/error/error.types';
export { ErrorWithCause } from './domain/error/error.types';
export { ErrorHandling, ErrorSource, RawError, RawErrorCause, ErrorWithCause, Csp } from './domain/error/error.types';
export * from './domain/deflate';
export * from './domain/connectivity';

@@ -14,5 +14,3 @@ import { noop } from './utils/functionUtils';

/**
* The parameters with which the method was called. To avoid having to clone the argument list
* every time, this property is actually an instance of Argument, not Array, so not all methods
* are available (like .forEach).
* The parameters with which the method was called.
*

@@ -19,0 +17,0 @@ * Note: if needed, parameters can be mutated by the instrumentation

@@ -7,2 +7,3 @@ "use strict";

var functionUtils_1 = require("./utils/functionUtils");
var polyfills_1 = require("./utils/polyfills");
/**

@@ -53,3 +54,3 @@ * Instruments a method on a object, calling the given callback before the original method is

return function () {
var parameters = arguments;
var parameters = (0, polyfills_1.arrayFrom)(arguments);
var result;

@@ -56,0 +57,0 @@ var postCallCallback;

@@ -6,3 +6,3 @@ import { catchUserErrors } from '../tools/catchUserErrors';

var publicApi = assign({
version: "5.11.0",
version: "5.12.0",
// This API method is intentionally not monitored, since the only thing executed is the

@@ -9,0 +9,0 @@ // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and

@@ -1,2 +0,1 @@

import type { RawTelemetryConfiguration } from '../telemetry';
import type { Duration } from '../../tools/utils/timeUtils';

@@ -71,3 +70,18 @@ import type { SessionStoreStrategyType } from '../session/storeStrategies/sessionStoreStrategy';

export declare function validateAndBuildConfiguration(initConfiguration: InitConfiguration): Configuration | undefined;
export declare function serializeConfiguration(initConfiguration: InitConfiguration): Partial<RawTelemetryConfiguration>;
export declare function serializeConfiguration(initConfiguration: InitConfiguration): {
session_sample_rate: number | undefined;
telemetry_sample_rate: number | undefined;
telemetry_configuration_sample_rate: number | undefined;
use_before_send: boolean;
use_cross_site_session_cookie: boolean | undefined;
use_partitioned_cross_site_session_cookie: boolean | undefined;
use_secure_session_cookie: boolean | undefined;
use_proxy: boolean;
silent_multiple_init: boolean | undefined;
track_session_across_subdomains: boolean | undefined;
allow_fallback_to_local_storage: boolean;
store_contexts_across_pages: boolean;
allow_untrusted_events: boolean;
tracking_consent: TrackingConsent | undefined;
};
export {};

@@ -91,4 +91,5 @@ import { catchUserErrors } from '../../tools/catchUserErrors';

allow_untrusted_events: !!initConfiguration.allowUntrustedEvents,
tracking_consent: initConfiguration.trackingConsent,
};
}
//# sourceMappingURL=configuration.js.map

@@ -32,7 +32,10 @@ import { timeStampNow } from '../../tools/utils/timeUtils';

}
var host = buildEndpointHost(initConfiguration);
var host = buildEndpointHost(trackType, initConfiguration);
return function (parameters) { return "https://".concat(host).concat(path, "?").concat(parameters); };
}
function buildEndpointHost(initConfiguration) {
function buildEndpointHost(trackType, initConfiguration) {
var _a = initConfiguration.site, site = _a === void 0 ? INTAKE_SITE_US1 : _a, internalAnalyticsSubdomain = initConfiguration.internalAnalyticsSubdomain;
if (trackType === 'logs' && initConfiguration.usePciIntake && site === INTAKE_SITE_US1) {
return 'pci.browser-intake-datadoghq.com';
}
if (internalAnalyticsSubdomain && site === INTAKE_SITE_US1) {

@@ -55,3 +58,3 @@ return "".concat(internalAnalyticsSubdomain, ".").concat(INTAKE_SITE_US1);

var retry = _b.retry, flushReason = _b.flushReason, encoding = _b.encoding;
var tags = ["sdk_version:".concat("5.11.0"), "api:".concat(api)].concat(configurationTags);
var tags = ["sdk_version:".concat("5.12.0"), "api:".concat(api)].concat(configurationTags);
if (flushReason && isExperimentalFeatureEnabled(ExperimentalFeature.COLLECT_FLUSH_REASON)) {

@@ -67,3 +70,3 @@ tags.push("flush_reason:".concat(flushReason));

"dd-api-key=".concat(clientToken),
"dd-evp-origin-version=".concat(encodeURIComponent("5.11.0")),
"dd-evp-origin-version=".concat(encodeURIComponent("5.12.0")),
'dd-evp-origin=browser',

@@ -70,0 +73,0 @@ "dd-request-id=".concat(generateUUID()),

@@ -11,2 +11,5 @@ import type { ClocksState } from '../../tools/utils/timeUtils';

};
export type Csp = {
disposition: 'enforce' | 'report';
};
export interface RawError {

@@ -23,2 +26,3 @@ startClocks: ClocksState;

fingerprint?: string;
csp?: Csp;
}

@@ -25,0 +29,0 @@ export declare const ErrorSource: {

@@ -44,2 +44,3 @@ import type { Context } from '../../tools/serialisation/context';

session_replay_sample_rate?: number | undefined;
tracking_consent?: string | undefined;
start_session_replay_recording_manually?: boolean | undefined;

@@ -65,2 +66,3 @@ use_proxy?: boolean | undefined;

use_worker_url?: boolean | undefined;
compress_intake_requests?: boolean | undefined;
track_frustrations?: boolean | undefined;

@@ -94,2 +96,7 @@ track_views_manually?: boolean | undefined;

dart_version?: string | undefined;
unity_version?: string | undefined;
app_hang_threshold?: number | undefined;
use_pci_intake?: boolean | undefined;
tracer_api?: string | undefined;
tracer_api_version?: string | undefined;
};

@@ -96,0 +103,0 @@ })[];

@@ -52,3 +52,3 @@ import { ConsoleApiName } from '../../tools/display';

service: telemetryService,
version: "5.11.0",
version: "5.12.0",
source: 'browser',

@@ -55,0 +55,0 @@ _dd: {

@@ -115,2 +115,6 @@ /**

/**
* The initial tracking consent value
*/
tracking_consent?: string;
/**
* Whether the session replay start is handled manually

@@ -196,2 +200,6 @@ */

/**
* Whether intake requests are compressed
*/
compress_intake_requests?: boolean;
/**
* Whether user frustrations are tracked

@@ -308,2 +316,22 @@ */

dart_version?: string;
/**
* The version of Unity used in a Unity application
*/
unity_version?: string;
/**
* The threshold used for iOS App Hangs monitoring (in milliseconds)
*/
app_hang_threshold?: number;
/**
* Either forward logs to the PCI compliant intake or not
*/
use_pci_intake?: boolean;
/**
* The tracer API used by the SDK. Possible values: 'Datadog', 'OpenTelemetry', 'OpenTracing'
*/
tracer_api?: string;
/**
* The version of the tracer API used by the SDK. Eg. '0.1.0'
*/
tracer_api_version?: string;
[k: string]: unknown;

@@ -310,0 +338,0 @@ };

@@ -63,8 +63,4 @@ export { Configuration, InitConfiguration, validateAndBuildConfiguration, DefaultPrivacyLevel, EndpointBuilder, serializeConfiguration, INTAKE_SITE_STAGING, INTAKE_SITE_US1, INTAKE_SITE_US1_FED, INTAKE_SITE_EU1, } from './domain/configuration';

export * from './tools/utils/typeUtils';
export { ErrorHandling } from './domain/error/error.types';
export { ErrorSource } from './domain/error/error.types';
export { RawError } from './domain/error/error.types';
export { RawErrorCause } from './domain/error/error.types';
export { ErrorWithCause } from './domain/error/error.types';
export { ErrorHandling, ErrorSource, RawError, RawErrorCause, ErrorWithCause, Csp } from './domain/error/error.types';
export * from './domain/deflate';
export * from './domain/connectivity';

@@ -14,5 +14,3 @@ import { noop } from './utils/functionUtils';

/**
* The parameters with which the method was called. To avoid having to clone the argument list
* every time, this property is actually an instance of Argument, not Array, so not all methods
* are available (like .forEach).
* The parameters with which the method was called.
*

@@ -19,0 +17,0 @@ * Note: if needed, parameters can be mutated by the instrumentation

import { setTimeout } from './timer';
import { callMonitored } from './monitor';
import { noop } from './utils/functionUtils';
import { arrayFrom } from './utils/polyfills';
/**

@@ -48,3 +49,3 @@ * Instruments a method on a object, calling the given callback before the original method is

return function () {
var parameters = arguments;
var parameters = arrayFrom(arguments);
var result;

@@ -51,0 +52,0 @@ var postCallCallback;

{
"name": "@datadog/browser-core",
"version": "5.11.0",
"version": "5.12.0",
"license": "Apache-2.0",

@@ -26,3 +26,3 @@ "main": "cjs/index.js",

},
"gitHead": "1e90f71c41375d4a9281b904207312c21c72b24a"
"gitHead": "4350ee6453b6757e6256caa44a22ecdbabc035d5"
}

@@ -181,3 +181,3 @@ import { catchUserErrors } from '../../tools/catchUserErrors'

export function serializeConfiguration(initConfiguration: InitConfiguration): Partial<RawTelemetryConfiguration> {
export function serializeConfiguration(initConfiguration: InitConfiguration) {
return {

@@ -197,3 +197,4 @@ session_sample_rate: initConfiguration.sessionSampleRate,

allow_untrusted_events: !!initConfiguration.allowUntrustedEvents,
}
tracking_consent: initConfiguration.trackingConsent,
} satisfies RawTelemetryConfiguration
}

@@ -58,9 +58,13 @@ import type { Payload } from '../../transport'

}
const host = buildEndpointHost(initConfiguration)
const host = buildEndpointHost(trackType, initConfiguration)
return (parameters) => `https://${host}${path}?${parameters}`
}
function buildEndpointHost(initConfiguration: InitConfiguration) {
function buildEndpointHost(trackType: TrackType, initConfiguration: InitConfiguration & { usePciIntake?: boolean }) {
const { site = INTAKE_SITE_US1, internalAnalyticsSubdomain } = initConfiguration
if (trackType === 'logs' && initConfiguration.usePciIntake && site === INTAKE_SITE_US1) {
return 'pci.browser-intake-datadoghq.com'
}
if (internalAnalyticsSubdomain && site === INTAKE_SITE_US1) {

@@ -67,0 +71,0 @@ return `${internalAnalyticsSubdomain}.${INTAKE_SITE_US1}`

@@ -23,2 +23,6 @@ import type { ClocksState } from '../../tools/utils/timeUtils'

export type Csp = {
disposition: 'enforce' | 'report'
}
export interface RawError {

@@ -35,2 +39,3 @@ startClocks: ClocksState

fingerprint?: string
csp?: Csp
}

@@ -37,0 +42,0 @@

@@ -117,2 +117,6 @@ /* eslint-disable */

/**
* The initial tracking consent value
*/
tracking_consent?: string
/**
* Whether the session replay start is handled manually

@@ -198,2 +202,6 @@ */

/**
* Whether intake requests are compressed
*/
compress_intake_requests?: boolean
/**
* Whether user frustrations are tracked

@@ -314,2 +322,23 @@ */

dart_version?: string
/**
* The version of Unity used in a Unity application
*/
unity_version?: string
/**
* The threshold used for iOS App Hangs monitoring (in milliseconds)
*/
app_hang_threshold?: number
/**
* Either forward logs to the PCI compliant intake or not
*/
use_pci_intake?: boolean
/**
* The tracer API used by the SDK. Possible values: 'Datadog', 'OpenTelemetry', 'OpenTracing'
*/
tracer_api?: string
/**
* The version of the tracer API used by the SDK. Eg. '0.1.0'
*/
tracer_api_version?: string
[k: string]: unknown

@@ -316,0 +345,0 @@ }

@@ -132,8 +132,4 @@ export {

export * from './tools/utils/typeUtils'
export { ErrorHandling } from './domain/error/error.types'
export { ErrorSource } from './domain/error/error.types'
export { RawError } from './domain/error/error.types'
export { RawErrorCause } from './domain/error/error.types'
export { ErrorWithCause } from './domain/error/error.types'
export { ErrorHandling, ErrorSource, RawError, RawErrorCause, ErrorWithCause, Csp } from './domain/error/error.types'
export * from './domain/deflate'
export * from './domain/connectivity'
import { setTimeout } from './timer'
import { callMonitored } from './monitor'
import { noop } from './utils/functionUtils'
import { arrayFrom } from './utils/polyfills'

@@ -16,5 +17,3 @@ /**

/**
* The parameters with which the method was called. To avoid having to clone the argument list
* every time, this property is actually an instance of Argument, not Array, so not all methods
* are available (like .forEach).
* The parameters with which the method was called.
*

@@ -90,3 +89,3 @@ * Note: if needed, parameters can be mutated by the instrumentation

return function (this: TARGET) {
const parameters = arguments as unknown as Parameters<TARGET[METHOD]>
const parameters = arrayFrom(arguments) as Parameters<TARGET[METHOD]>
let result

@@ -93,0 +92,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc