Socket
Socket
Sign inDemoInstall

@datadog/browser-core

Package Overview
Dependencies
0
Maintainers
1
Versions
249
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.3.0 to 5.4.0

2

cjs/boot/init.js

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

var publicApi = (0, polyfills_1.assign)({
version: "5.3.0",
version: "5.4.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

@@ -20,3 +20,3 @@ import type { RawTelemetryConfiguration } from '../telemetry';

storeContextsAcrossPages?: boolean | undefined;
proxy?: string | undefined;
proxy?: string | ProxyFn | undefined;
site?: string | undefined;

@@ -36,2 +36,10 @@ service?: string | undefined;

type GenericBeforeSendCallback = (event: any, context?: any) => unknown;
/**
* path: /api/vX/product
* parameters: xxx=yyy&zzz=aaa
*/
type ProxyFn = (options: {
path: string;
parameters: string;
}) => string;
interface ReplicaUserConfiguration {

@@ -38,0 +46,0 @@ applicationId?: string;

@@ -29,6 +29,9 @@ "use strict";

var proxy = initConfiguration.proxy;
if (proxy) {
if (typeof proxy === 'string') {
var normalizedProxyUrl_1 = (0, urlPolyfill_1.normalizeUrl)(proxy);
return function (parameters) { return "".concat(normalizedProxyUrl_1, "?ddforward=").concat(encodeURIComponent("".concat(path, "?").concat(parameters))); };
}
if (typeof proxy === 'function') {
return function (parameters) { return proxy({ path: path, parameters: parameters }); };
}
var host = buildEndpointHost(initConfiguration);

@@ -53,3 +56,3 @@ return function (parameters) { return "https://".concat(host).concat(path, "?").concat(parameters); };

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

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

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

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

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

service: telemetryService,
version: "5.3.0",
version: "5.4.0",
source: 'browser',

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

@@ -16,3 +16,2 @@ /**

SCROLLMAP = "scrollmap",
WEB_VITALS_ATTRIBUTION = "web_vitals_attribution",
DISABLE_REPLAY_INLINE_CSS = "disable_replay_inline_css"

@@ -19,0 +18,0 @@ }

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

ExperimentalFeature["SCROLLMAP"] = "scrollmap";
ExperimentalFeature["WEB_VITALS_ATTRIBUTION"] = "web_vitals_attribution";
ExperimentalFeature["DISABLE_REPLAY_INLINE_CSS"] = "disable_replay_inline_css";

@@ -26,0 +25,0 @@ })(ExperimentalFeature || (exports.ExperimentalFeature = ExperimentalFeature = {}));

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

var publicApi = assign({
version: "5.3.0",
version: "5.4.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

@@ -20,3 +20,3 @@ import type { RawTelemetryConfiguration } from '../telemetry';

storeContextsAcrossPages?: boolean | undefined;
proxy?: string | undefined;
proxy?: string | ProxyFn | undefined;
site?: string | undefined;

@@ -36,2 +36,10 @@ service?: string | undefined;

type GenericBeforeSendCallback = (event: any, context?: any) => unknown;
/**
* path: /api/vX/product
* parameters: xxx=yyy&zzz=aaa
*/
type ProxyFn = (options: {
path: string;
parameters: string;
}) => string;
interface ReplicaUserConfiguration {

@@ -38,0 +46,0 @@ applicationId?: string;

@@ -25,6 +25,9 @@ import { timeStampNow } from '../../tools/utils/timeUtils';

var proxy = initConfiguration.proxy;
if (proxy) {
if (typeof proxy === 'string') {
var normalizedProxyUrl_1 = normalizeUrl(proxy);
return function (parameters) { return "".concat(normalizedProxyUrl_1, "?ddforward=").concat(encodeURIComponent("".concat(path, "?").concat(parameters))); };
}
if (typeof proxy === 'function') {
return function (parameters) { return proxy({ path: path, parameters: parameters }); };
}
var host = buildEndpointHost(initConfiguration);

@@ -49,3 +52,3 @@ return function (parameters) { return "https://".concat(host).concat(path, "?").concat(parameters); };

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

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

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

@@ -64,0 +67,0 @@ "dd-request-id=".concat(generateUUID()),

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

service: telemetryService,
version: "5.3.0",
version: "5.4.0",
source: 'browser',

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

@@ -16,3 +16,2 @@ /**

SCROLLMAP = "scrollmap",
WEB_VITALS_ATTRIBUTION = "web_vitals_attribution",
DISABLE_REPLAY_INLINE_CSS = "disable_replay_inline_css"

@@ -19,0 +18,0 @@ }

@@ -20,3 +20,2 @@ /**

ExperimentalFeature["SCROLLMAP"] = "scrollmap";
ExperimentalFeature["WEB_VITALS_ATTRIBUTION"] = "web_vitals_attribution";
ExperimentalFeature["DISABLE_REPLAY_INLINE_CSS"] = "disable_replay_inline_css";

@@ -23,0 +22,0 @@ })(ExperimentalFeature || (ExperimentalFeature = {}));

{
"name": "@datadog/browser-core",
"version": "5.3.0",
"version": "5.4.0",
"license": "Apache-2.0",

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

},
"gitHead": "5e8ff4fcbf59e397ae1e99bf76146be4b13c050b"
"gitHead": "9160f5cc9961c6f20055780d9880c572f6327992"
}

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

// transport options
proxy?: string | undefined
proxy?: string | ProxyFn | undefined
site?: string | undefined

@@ -53,2 +53,3 @@

datacenter?: string
// TODO next major: remove this option and replace usages by proxyFn
internalAnalyticsSubdomain?: string

@@ -63,2 +64,8 @@

/**
* path: /api/vX/product
* parameters: xxx=yyy&zzz=aaa
*/
type ProxyFn = (options: { path: string; parameters: string }) => string
interface ReplicaUserConfiguration {

@@ -65,0 +72,0 @@ applicationId?: string

@@ -44,6 +44,9 @@ import type { Payload } from '../../transport'

const proxy = initConfiguration.proxy
if (proxy) {
if (typeof proxy === 'string') {
const normalizedProxyUrl = normalizeUrl(proxy)
return (parameters) => `${normalizedProxyUrl}?ddforward=${encodeURIComponent(`${path}?${parameters}`)}`
}
if (typeof proxy === 'function') {
return (parameters) => proxy({ path, parameters })
}
const host = buildEndpointHost(initConfiguration)

@@ -50,0 +53,0 @@ return (parameters) => `https://${host}${path}?${parameters}`

@@ -19,3 +19,2 @@ /**

SCROLLMAP = 'scrollmap',
WEB_VITALS_ATTRIBUTION = 'web_vitals_attribution',
DISABLE_REPLAY_INLINE_CSS = 'disable_replay_inline_css',

@@ -22,0 +21,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

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc