New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/core

Package Overview
Dependencies
Maintainers
13
Versions
583
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/core - npm Package Compare versions

Comparing version

to
5.12.4

65

dist/baseclient.js

@@ -336,41 +336,36 @@ Object.defineProperty(exports, "__esModule", { value: true });

var finalEvent = prepared;
try {
var isInternalException = hint && hint.data && hint.data.__sentry__ === true;
if (isInternalException || !beforeSend) {
_this._getBackend().sendEvent(finalEvent);
resolve(finalEvent);
var isInternalException = hint && hint.data && hint.data.__sentry__ === true;
if (isInternalException || !beforeSend) {
_this._getBackend().sendEvent(finalEvent);
resolve(finalEvent);
return;
}
var beforeSendResult = beforeSend(prepared, hint);
// tslint:disable-next-line:strict-type-predicates
if (typeof beforeSendResult === 'undefined') {
utils_1.logger.error('`beforeSend` method has to return `null` or a valid event.');
}
else if (utils_1.isThenable(beforeSendResult)) {
_this._handleAsyncBeforeSend(beforeSendResult, resolve, reject);
}
else {
finalEvent = beforeSendResult;
if (finalEvent === null) {
utils_1.logger.log('`beforeSend` returned `null`, will not send event.');
resolve(null);
return;
}
var beforeSendResult = beforeSend(prepared, hint);
// tslint:disable-next-line:strict-type-predicates
if (typeof beforeSendResult === 'undefined') {
utils_1.logger.error('`beforeSend` method has to return `null` or a valid event.');
}
else if (utils_1.isThenable(beforeSendResult)) {
_this._handleAsyncBeforeSend(beforeSendResult, resolve, reject);
}
else {
finalEvent = beforeSendResult;
if (finalEvent === null) {
utils_1.logger.log('`beforeSend` returned `null`, will not send event.');
resolve(null);
return;
}
// From here on we are really async
_this._getBackend().sendEvent(finalEvent);
resolve(finalEvent);
}
// From here on we are really async
_this._getBackend().sendEvent(finalEvent);
resolve(finalEvent);
}
catch (exception) {
_this.captureException(exception, {
data: {
__sentry__: true,
},
originalException: exception,
});
reject('`beforeSend` threw an error, will not send event.');
}
})
.then(null, function () {
reject('`beforeSend` threw an error, will not send event.');
.then(null, function (reason) {
_this.captureException(reason, {
data: {
__sentry__: true,
},
originalException: reason,
});
reject("Event processing pipeline threw an error, original event will not be sent. Details has been sent as a new event.\nReason: " + reason);
});

@@ -377,0 +372,0 @@ });

@@ -335,41 +335,36 @@ import * as tslib_1 from "tslib";

var finalEvent = prepared;
try {
var isInternalException = hint && hint.data && hint.data.__sentry__ === true;
if (isInternalException || !beforeSend) {
_this._getBackend().sendEvent(finalEvent);
resolve(finalEvent);
var isInternalException = hint && hint.data && hint.data.__sentry__ === true;
if (isInternalException || !beforeSend) {
_this._getBackend().sendEvent(finalEvent);
resolve(finalEvent);
return;
}
var beforeSendResult = beforeSend(prepared, hint);
// tslint:disable-next-line:strict-type-predicates
if (typeof beforeSendResult === 'undefined') {
logger.error('`beforeSend` method has to return `null` or a valid event.');
}
else if (isThenable(beforeSendResult)) {
_this._handleAsyncBeforeSend(beforeSendResult, resolve, reject);
}
else {
finalEvent = beforeSendResult;
if (finalEvent === null) {
logger.log('`beforeSend` returned `null`, will not send event.');
resolve(null);
return;
}
var beforeSendResult = beforeSend(prepared, hint);
// tslint:disable-next-line:strict-type-predicates
if (typeof beforeSendResult === 'undefined') {
logger.error('`beforeSend` method has to return `null` or a valid event.');
}
else if (isThenable(beforeSendResult)) {
_this._handleAsyncBeforeSend(beforeSendResult, resolve, reject);
}
else {
finalEvent = beforeSendResult;
if (finalEvent === null) {
logger.log('`beforeSend` returned `null`, will not send event.');
resolve(null);
return;
}
// From here on we are really async
_this._getBackend().sendEvent(finalEvent);
resolve(finalEvent);
}
// From here on we are really async
_this._getBackend().sendEvent(finalEvent);
resolve(finalEvent);
}
catch (exception) {
_this.captureException(exception, {
data: {
__sentry__: true,
},
originalException: exception,
});
reject('`beforeSend` threw an error, will not send event.');
}
})
.then(null, function () {
reject('`beforeSend` threw an error, will not send event.');
.then(null, function (reason) {
_this.captureException(reason, {
data: {
__sentry__: true,
},
originalException: reason,
});
reject("Event processing pipeline threw an error, original event will not be sent. Details has been sent as a new event.\nReason: " + reason);
});

@@ -376,0 +371,0 @@ });

{
"name": "@sentry/core",
"version": "5.12.0",
"version": "5.12.4",
"description": "Base implementation for all Sentry JavaScript SDKs",

@@ -19,6 +19,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/hub": "5.12.0",
"@sentry/minimal": "5.12.0",
"@sentry/types": "5.12.0",
"@sentry/utils": "5.12.0",
"@sentry/hub": "5.12.4",
"@sentry/minimal": "5.12.4",
"@sentry/types": "5.12.4",
"@sentry/utils": "5.12.4",
"tslib": "^1.9.3"

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