Socket
Socket
Sign inDemoInstall

@datadog/browser-core

Package Overview
Dependencies
3
Maintainers
1
Versions
249
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.11.3 to 1.11.4

7

cjs/configuration.js

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

var transportConfiguration = {
buildMode: buildEnv.buildMode,
clientToken: userConfiguration.clientToken,

@@ -39,3 +40,3 @@ datacenter: userConfiguration.datacenter || buildEnv.datacenter,

proxyHost: userConfiguration.proxyHost,
version: buildEnv.version,
sdkVersion: buildEnv.sdkVersion,
};

@@ -60,3 +61,3 @@ var enableExperimentalFeatures = Array.isArray(userConfiguration.enableExperimentalFeatures)

}
if (transportConfiguration.env === 'e2e-test') {
if (transportConfiguration.buildMode === 'e2e-test') {
if (userConfiguration.internalMonitoringEndpoint !== undefined) {

@@ -78,3 +79,3 @@ configuration.internalMonitoringEndpoint = userConfiguration.internalMonitoringEndpoint;

var domain = conf.env === 'production' ? "datadoghq." + tld : "datad0g." + tld;
var tags = "version:" + conf.version;
var tags = "sdk_version:" + conf.sdkVersion;
var datadogHost = type + "-http-intake.logs." + domain;

@@ -81,0 +82,0 @@ var host = conf.proxyHost ? conf.proxyHost : datadogHost;

@@ -31,3 +31,3 @@ import { Configuration } from './configuration';

export declare type ErrorObservable = Observable<ErrorMessage>;
export declare function startErrorCollection(configuration: Configuration): Observable<ErrorMessage>;
export declare function startErrorCollection(configuration: Configuration): ErrorObservable;
export declare function filterErrors(configuration: Configuration, errorObservable: Observable<ErrorMessage>): Observable<ErrorMessage>;

@@ -34,0 +34,0 @@ export declare function startConsoleTracking(errorObservable: ErrorObservable): void;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var internalMonitoring_1 = require("./internalMonitoring");

@@ -64,3 +65,3 @@ var observable_1 = require("./observable");

}
originalConsoleError.apply(console, [message].concat(optionalParams));
originalConsoleError.apply(console, tslib_1.__spreadArrays([message], optionalParams));
errorObservable.notify({

@@ -72,3 +73,3 @@ context: {

},
message: ['console error:', message].concat(optionalParams).map(formatConsoleParameters).join(' '),
message: tslib_1.__spreadArrays(['console error:', message], optionalParams).map(formatConsoleParameters).join(' '),
startTime: performance.now(),

@@ -75,0 +76,0 @@ });

@@ -5,11 +5,13 @@ import { UserConfiguration } from './configuration';

export declare type Datacenter = 'eu' | 'us';
export declare type Environment = 'production' | 'staging' | 'e2e-test';
export declare type Environment = 'production' | 'staging';
export declare type BuildMode = 'release' | 'staging' | 'e2e-test';
export interface BuildEnv {
datacenter: Datacenter;
env: Environment;
version: string;
buildMode: BuildMode;
sdkVersion: string;
}
export declare function commonInit(userConfiguration: UserConfiguration, buildEnv: BuildEnv): {
configuration: import("./configuration").Configuration;
errorObservable: import("./observable").Observable<import("./errorCollection").ErrorMessage>;
errorObservable: import("./errorCollection").ErrorObservable;
internalMonitoring: import("./internalMonitoring").InternalMonitoring;

@@ -16,0 +18,0 @@ };

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

function addErrorToMonitoringBatch(e) {
addToMonitoringBatch(tslib_1.__assign({}, formatError(e), { status: StatusType.error }));
addToMonitoringBatch(tslib_1.__assign(tslib_1.__assign({}, formatError(e)), { status: StatusType.error }));
}

@@ -83,0 +83,0 @@ function addToMonitoringBatch(message) {

@@ -22,3 +22,3 @@ import { Observable } from './observable';

export declare type RequestObservables = [Observable<RequestStartEvent>, Observable<RequestCompleteEvent>];
export declare function startRequestCollection(): [Observable<RequestStartEvent>, Observable<RequestCompleteEvent>];
export declare function startRequestCollection(): RequestObservables;
export declare function trackXhr([requestStartObservable, requestCompleteObservable]: RequestObservables): void;

@@ -25,0 +25,0 @@ export declare function trackFetch([requestStartObservable, requestCompleteObservable]: RequestObservables): void;

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

return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, resolve(tslib_1.__assign({}, response, { clone: function () {
return [2 /*return*/, resolve(tslib_1.__assign(tslib_1.__assign({}, response), { clone: function () {
var cloned = {

@@ -68,0 +68,0 @@ text: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {

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

if (this.bufferMessageCount !== 0) {
var messages = this.pushOnlyBuffer.concat(utils_1.objectValues(this.upsertBuffer));
var messages = tslib_1.__spreadArrays(this.pushOnlyBuffer, utils_1.objectValues(this.upsertBuffer));
this.request.send(messages.join('\n'), this.bufferBytesSize);

@@ -68,0 +68,0 @@ this.pushOnlyBuffer = [];

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

import * as tslib_1 from "tslib";
import { __assign } from "tslib";
import { includes, ONE_KILO_BYTE, ONE_SECOND } from './utils';

@@ -32,2 +32,3 @@ export var DEFAULT_CONFIGURATION = {

var transportConfiguration = {
buildMode: buildEnv.buildMode,
clientToken: userConfiguration.clientToken,

@@ -37,3 +38,3 @@ datacenter: userConfiguration.datacenter || buildEnv.datacenter,

proxyHost: userConfiguration.proxyHost,
version: buildEnv.version,
sdkVersion: buildEnv.sdkVersion,
};

@@ -43,3 +44,3 @@ var enableExperimentalFeatures = Array.isArray(userConfiguration.enableExperimentalFeatures)

: [];
var configuration = tslib_1.__assign({ isEnabled: function (feature) {
var configuration = __assign({ isEnabled: function (feature) {
return includes(enableExperimentalFeatures, feature);

@@ -59,3 +60,3 @@ }, logsEndpoint: getEndpoint('browser', transportConfiguration), rumEndpoint: getEndpoint('rum', transportConfiguration), traceEndpoint: getEndpoint('public-trace', transportConfiguration) }, DEFAULT_CONFIGURATION);

}
if (transportConfiguration.env === 'e2e-test') {
if (transportConfiguration.buildMode === 'e2e-test') {
if (userConfiguration.internalMonitoringEndpoint !== undefined) {

@@ -76,3 +77,3 @@ configuration.internalMonitoringEndpoint = userConfiguration.internalMonitoringEndpoint;

var domain = conf.env === 'production' ? "datadoghq." + tld : "datad0g." + tld;
var tags = "version:" + conf.version;
var tags = "sdk_version:" + conf.sdkVersion;
var datadogHost = type + "-http-intake.logs." + domain;

@@ -79,0 +80,0 @@ var host = conf.proxyHost ? conf.proxyHost : datadogHost;

@@ -31,3 +31,3 @@ import { Configuration } from './configuration';

export declare type ErrorObservable = Observable<ErrorMessage>;
export declare function startErrorCollection(configuration: Configuration): Observable<ErrorMessage>;
export declare function startErrorCollection(configuration: Configuration): ErrorObservable;
export declare function filterErrors(configuration: Configuration, errorObservable: Observable<ErrorMessage>): Observable<ErrorMessage>;

@@ -34,0 +34,0 @@ export declare function startConsoleTracking(errorObservable: ErrorObservable): void;

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

import { __spreadArrays } from "tslib";
import { monitor } from './internalMonitoring';

@@ -60,3 +61,3 @@ import { Observable } from './observable';

}
originalConsoleError.apply(console, [message].concat(optionalParams));
originalConsoleError.apply(console, __spreadArrays([message], optionalParams));
errorObservable.notify({

@@ -68,3 +69,3 @@ context: {

},
message: ['console error:', message].concat(optionalParams).map(formatConsoleParameters).join(' '),
message: __spreadArrays(['console error:', message], optionalParams).map(formatConsoleParameters).join(' '),
startTime: performance.now(),

@@ -71,0 +72,0 @@ });

@@ -5,11 +5,13 @@ import { UserConfiguration } from './configuration';

export declare type Datacenter = 'eu' | 'us';
export declare type Environment = 'production' | 'staging' | 'e2e-test';
export declare type Environment = 'production' | 'staging';
export declare type BuildMode = 'release' | 'staging' | 'e2e-test';
export interface BuildEnv {
datacenter: Datacenter;
env: Environment;
version: string;
buildMode: BuildMode;
sdkVersion: string;
}
export declare function commonInit(userConfiguration: UserConfiguration, buildEnv: BuildEnv): {
configuration: import("./configuration").Configuration;
errorObservable: import("./observable").Observable<import("./errorCollection").ErrorMessage>;
errorObservable: import("./errorCollection").ErrorObservable;
internalMonitoring: import("./internalMonitoring").InternalMonitoring;

@@ -16,0 +18,0 @@ };

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

import * as tslib_1 from "tslib";
import { __assign } from "tslib";
import { buildConfiguration } from './configuration';

@@ -10,3 +10,3 @@ import { areCookiesAuthorized } from './cookie';

export function makeGlobal(stub) {
var global = tslib_1.__assign({}, stub);
var global = __assign({}, stub);
// Add an "hidden" property to set debug mode. We define it that way to hide it

@@ -13,0 +13,0 @@ // as much as possible but of course it's not a real protection.

// tslint:disable ban-types
import * as tslib_1 from "tslib";
import { __assign } from "tslib";
import lodashAssign from 'lodash.assign';

@@ -73,3 +73,3 @@ import lodashMerge from 'lodash.merge';

function addErrorToMonitoringBatch(e) {
addToMonitoringBatch(tslib_1.__assign({}, formatError(e), { status: StatusType.error }));
addToMonitoringBatch(__assign(__assign({}, formatError(e)), { status: StatusType.error }));
}

@@ -76,0 +76,0 @@ function addToMonitoringBatch(message) {

@@ -22,3 +22,3 @@ import { Observable } from './observable';

export declare type RequestObservables = [Observable<RequestStartEvent>, Observable<RequestCompleteEvent>];
export declare function startRequestCollection(): [Observable<RequestStartEvent>, Observable<RequestCompleteEvent>];
export declare function startRequestCollection(): RequestObservables;
export declare function trackXhr([requestStartObservable, requestCompleteObservable]: RequestObservables): void;

@@ -25,0 +25,0 @@ export declare function trackFetch([requestStartObservable, requestCompleteObservable]: RequestObservables): void;

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

import * as tslib_1 from "tslib";
import { __awaiter, __generator } from "tslib";
import { toStackTraceString } from './errorCollection';

@@ -91,5 +91,5 @@ import { monitor } from './internalMonitoring';

});
var reportFetch = function (response) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var reportFetch = function (response) { return __awaiter(_this, void 0, void 0, function () {
var duration, url, stackTrace, text, e_1;
return tslib_1.__generator(this, function (_a) {
return __generator(this, function (_a) {
switch (_a.label) {

@@ -96,0 +96,0 @@ case 0:

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

import * as tslib_1 from "tslib";
import { __assign, __awaiter, __generator } from "tslib";
import { noop } from './utils';

@@ -56,9 +56,9 @@ export var SPEC_ENDPOINTS = {

});
promise.resolveWith = function (response) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
promise.resolveWith = function (response) { return __awaiter(_this, void 0, void 0, function () {
var _this = this;
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, resolve(tslib_1.__assign({}, response, { clone: function () {
return __generator(this, function (_a) {
return [2 /*return*/, resolve(__assign(__assign({}, response), { clone: function () {
var cloned = {
text: function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
text: function () { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
if (response.responseTextError) {

@@ -75,3 +75,3 @@ throw response.responseTextError;

}); };
promise.rejectWith = function (error) { return tslib_1.__awaiter(_this, void 0, void 0, function () { return tslib_1.__generator(this, function (_a) {
promise.rejectWith = function (error) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
return [2 /*return*/, reject(error)];

@@ -78,0 +78,0 @@ }); }); };

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

import { __spreadArrays } from "tslib";
import lodashMerge from 'lodash.merge';

@@ -62,3 +63,3 @@ import { monitor } from './internalMonitoring';

if (this.bufferMessageCount !== 0) {
var messages = this.pushOnlyBuffer.concat(objectValues(this.upsertBuffer));
var messages = __spreadArrays(this.pushOnlyBuffer, objectValues(this.upsertBuffer));
this.request.send(messages.join('\n'), this.bufferBytesSize);

@@ -65,0 +66,0 @@ this.pushOnlyBuffer = [];

{
"name": "@datadog/browser-core",
"version": "1.11.3",
"version": "1.11.4",
"license": "Apache-2.0",

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

},
"gitHead": "028354ee47756c0b8d49d0e8f8706dd8d43ef4c7"
"gitHead": "946c02838dc2dfc17e71313293fc7ea453b34fce"
}

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

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