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
565
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 5.20.1 to 5.21.0

12

dist/api.d.ts

@@ -16,6 +16,2 @@ import { DsnLike } from '@sentry/types';

getStoreEndpoint(): string;
/** Returns the envelope endpoint URL. */
private _getEnvelopeEndpoint;
/** Returns the ingest API endpoint for target. */
private _getIngestEndpoint;
/**

@@ -33,4 +29,2 @@ * Returns the store endpoint URL with auth in the query string.

getEnvelopeEndpointWithUrlEncodedAuth(): string;
/** Returns a URL-encoded string with auth config suitable for a query string. */
private _encodedAuth;
/** Returns only the path component for the store endpoint. */

@@ -53,3 +47,9 @@ getStoreEndpointPath(): string;

}): string;
/** Returns the envelope endpoint URL. */
private _getEnvelopeEndpoint;
/** Returns the ingest API endpoint for target. */
private _getIngestEndpoint;
/** Returns a URL-encoded string with auth config suitable for a query string. */
private _encodedAuth;
}
//# sourceMappingURL=api.d.ts.map

@@ -26,12 +26,2 @@ Object.defineProperty(exports, "__esModule", { value: true });

};
/** Returns the envelope endpoint URL. */
API.prototype._getEnvelopeEndpoint = function () {
return this._getIngestEndpoint('envelope');
};
/** Returns the ingest API endpoint for target. */
API.prototype._getIngestEndpoint = function (target) {
var base = this.getBaseApiEndpoint();
var dsn = this._dsnObject;
return "" + base + dsn.projectId + "/" + target + "/";
};
/**

@@ -53,13 +43,2 @@ * Returns the store endpoint URL with auth in the query string.

};
/** Returns a URL-encoded string with auth config suitable for a query string. */
API.prototype._encodedAuth = function () {
var dsn = this._dsnObject;
var auth = {
// We send only the minimum set of required information. See
// https://github.com/getsentry/sentry-javascript/issues/2572.
sentry_key: dsn.user,
sentry_version: SENTRY_API_VERSION,
};
return utils_1.urlEncode(auth);
};
/** Returns only the path component for the store endpoint. */

@@ -115,2 +94,23 @@ API.prototype.getStoreEndpointPath = function () {

};
/** Returns the envelope endpoint URL. */
API.prototype._getEnvelopeEndpoint = function () {
return this._getIngestEndpoint('envelope');
};
/** Returns the ingest API endpoint for target. */
API.prototype._getIngestEndpoint = function (target) {
var base = this.getBaseApiEndpoint();
var dsn = this._dsnObject;
return "" + base + dsn.projectId + "/" + target + "/";
};
/** Returns a URL-encoded string with auth config suitable for a query string. */
API.prototype._encodedAuth = function () {
var dsn = this._dsnObject;
var auth = {
// We send only the minimum set of required information. See
// https://github.com/getsentry/sentry-javascript/issues/2572.
sentry_key: dsn.user,
sentry_version: SENTRY_API_VERSION,
};
return utils_1.urlEncode(auth);
};
return API;

@@ -117,0 +117,0 @@ }());

@@ -54,6 +54,2 @@ import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';

/**
* Sets up the transport so it can be used later to send requests.
*/
protected _setupTransport(): Transport;
/**
* @inheritDoc

@@ -74,3 +70,7 @@ */

getTransport(): Transport;
/**
* Sets up the transport so it can be used later to send requests.
*/
protected _setupTransport(): Transport;
}
//# sourceMappingURL=basebackend.d.ts.map

@@ -18,10 +18,5 @@ Object.defineProperty(exports, "__esModule", { value: true });

/**
* Sets up the transport so it can be used later to send requests.
*/
BaseBackend.prototype._setupTransport = function () {
return new noop_1.NoopTransport();
};
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
BaseBackend.prototype.eventFromException = function (_exception, _hint) {

@@ -50,2 +45,8 @@ throw new utils_1.SentryError('Backend has to implement `eventFromException` method');

};
/**
* Sets up the transport so it can be used later to send requests.
*/
BaseBackend.prototype._setupTransport = function () {
return new noop_1.NoopTransport();
};
return BaseBackend;

@@ -52,0 +53,0 @@ }());

Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
/* eslint-disable max-lines */
var hub_1 = require("@sentry/hub");

@@ -59,2 +60,3 @@ var utils_1 = require("@sentry/utils");

*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
BaseClient.prototype.captureException = function (exception, hint, scope) {

@@ -64,2 +66,3 @@ var _this = this;

this._processing = true;
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this._getBackend()

@@ -82,2 +85,3 @@ .eventFromException(exception, hint)

: this._getBackend().eventFromException(message, hint);
// eslint-disable-next-line @typescript-eslint/no-floating-promises
promisedEvent.then(function (event) {

@@ -214,3 +218,3 @@ eventId = _this.captureEvent(event, hint, scope);

var _a = this.getOptions().normalizeDepth, normalizeDepth = _a === void 0 ? 3 : _a;
var prepared = tslib_1.__assign({}, event, { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : utils_1.uuid4()), timestamp: event.timestamp || utils_1.timestampWithMs() });
var prepared = tslib_1.__assign(tslib_1.__assign({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : utils_1.uuid4()), timestamp: event.timestamp || utils_1.timestampWithMs() });
this._applyClientOptions(prepared);

@@ -233,3 +237,2 @@ this._applyIntegrationsMetadata(prepared);

return result.then(function (evt) {
// tslint:disable-next-line:strict-type-predicates
if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {

@@ -255,12 +258,11 @@ return _this._normalizeEvent(evt, normalizeDepth);

}
// tslint:disable:no-unsafe-any
var normalized = tslib_1.__assign({}, event, (event.breadcrumbs && {
breadcrumbs: event.breadcrumbs.map(function (b) { return (tslib_1.__assign({}, b, (b.data && {
var normalized = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({}, event), (event.breadcrumbs && {
breadcrumbs: event.breadcrumbs.map(function (b) { return (tslib_1.__assign(tslib_1.__assign({}, b), (b.data && {
data: utils_1.normalize(b.data, depth),
}))); }),
}), (event.user && {
})), (event.user && {
user: utils_1.normalize(event.user, depth),
}), (event.contexts && {
})), (event.contexts && {
contexts: utils_1.normalize(event.contexts, depth),
}), (event.extra && {
})), (event.extra && {
extra: utils_1.normalize(event.extra, depth),

@@ -276,2 +278,3 @@ }));

if (event.contexts && event.contexts.trace) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
normalized.contexts.trace = event.contexts.trace;

@@ -343,2 +346,3 @@ }

var _this = this;
// eslint-disable-next-line @typescript-eslint/unbound-method
var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;

@@ -371,3 +375,2 @@ if (!this._isEnabled()) {

var beforeSendResult = beforeSend(prepared, hint);
// tslint:disable-next-line:strict-type-predicates
if (typeof beforeSendResult === 'undefined') {

@@ -374,0 +377,0 @@ utils_1.logger.error('`beforeSend` method has to return `null` or a valid event.');

@@ -7,7 +7,7 @@ import { Integration } from '@sentry/types';

*/
name: string;
static id: string;
/**
* @inheritDoc
*/
static id: string;
name: string;
/**

@@ -14,0 +14,0 @@ * @inheritDoc

@@ -15,3 +15,5 @@ Object.defineProperty(exports, "__esModule", { value: true });

FunctionToString.prototype.setupOnce = function () {
// eslint-disable-next-line @typescript-eslint/unbound-method
originalFunctionToString = Function.prototype.toString;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Function.prototype.toString = function () {

@@ -23,3 +25,2 @@ var args = [];

var context = this.__sentry_original__ || this;
// tslint:disable-next-line:no-unsafe-any
return originalFunctionToString.apply(context, args);

@@ -26,0 +27,0 @@ };

@@ -19,7 +19,7 @@ import { Integration } from '@sentry/types';

*/
name: string;
static id: string;
/**
* @inheritDoc
*/
static id: string;
name: string;
constructor(_options?: Partial<InboundFiltersOptions>);

@@ -26,0 +26,0 @@ /**

@@ -107,3 +107,2 @@ Object.defineProperty(exports, "__esModule", { value: true });

if (clientOptions === void 0) { clientOptions = {}; }
// tslint:disable:deprecation
return {

@@ -110,0 +109,0 @@ allowUrls: tslib_1.__spread((this._options.whitelistUrls || []), (this._options.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),

@@ -16,6 +16,2 @@ import { DsnLike } from '@sentry/types';

getStoreEndpoint(): string;
/** Returns the envelope endpoint URL. */
private _getEnvelopeEndpoint;
/** Returns the ingest API endpoint for target. */
private _getIngestEndpoint;
/**

@@ -33,4 +29,2 @@ * Returns the store endpoint URL with auth in the query string.

getEnvelopeEndpointWithUrlEncodedAuth(): string;
/** Returns a URL-encoded string with auth config suitable for a query string. */
private _encodedAuth;
/** Returns only the path component for the store endpoint. */

@@ -53,3 +47,9 @@ getStoreEndpointPath(): string;

}): string;
/** Returns the envelope endpoint URL. */
private _getEnvelopeEndpoint;
/** Returns the ingest API endpoint for target. */
private _getIngestEndpoint;
/** Returns a URL-encoded string with auth config suitable for a query string. */
private _encodedAuth;
}
//# sourceMappingURL=api.d.ts.map

@@ -25,12 +25,2 @@ import { Dsn, urlEncode } from '@sentry/utils';

};
/** Returns the envelope endpoint URL. */
API.prototype._getEnvelopeEndpoint = function () {
return this._getIngestEndpoint('envelope');
};
/** Returns the ingest API endpoint for target. */
API.prototype._getIngestEndpoint = function (target) {
var base = this.getBaseApiEndpoint();
var dsn = this._dsnObject;
return "" + base + dsn.projectId + "/" + target + "/";
};
/**

@@ -52,13 +42,2 @@ * Returns the store endpoint URL with auth in the query string.

};
/** Returns a URL-encoded string with auth config suitable for a query string. */
API.prototype._encodedAuth = function () {
var dsn = this._dsnObject;
var auth = {
// We send only the minimum set of required information. See
// https://github.com/getsentry/sentry-javascript/issues/2572.
sentry_key: dsn.user,
sentry_version: SENTRY_API_VERSION,
};
return urlEncode(auth);
};
/** Returns only the path component for the store endpoint. */

@@ -114,2 +93,23 @@ API.prototype.getStoreEndpointPath = function () {

};
/** Returns the envelope endpoint URL. */
API.prototype._getEnvelopeEndpoint = function () {
return this._getIngestEndpoint('envelope');
};
/** Returns the ingest API endpoint for target. */
API.prototype._getIngestEndpoint = function (target) {
var base = this.getBaseApiEndpoint();
var dsn = this._dsnObject;
return "" + base + dsn.projectId + "/" + target + "/";
};
/** Returns a URL-encoded string with auth config suitable for a query string. */
API.prototype._encodedAuth = function () {
var dsn = this._dsnObject;
var auth = {
// We send only the minimum set of required information. See
// https://github.com/getsentry/sentry-javascript/issues/2572.
sentry_key: dsn.user,
sentry_version: SENTRY_API_VERSION,
};
return urlEncode(auth);
};
return API;

@@ -116,0 +116,0 @@ }());

@@ -54,6 +54,2 @@ import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';

/**
* Sets up the transport so it can be used later to send requests.
*/
protected _setupTransport(): Transport;
/**
* @inheritDoc

@@ -74,3 +70,7 @@ */

getTransport(): Transport;
/**
* Sets up the transport so it can be used later to send requests.
*/
protected _setupTransport(): Transport;
}
//# sourceMappingURL=basebackend.d.ts.map

@@ -17,10 +17,5 @@ import { logger, SentryError } from '@sentry/utils';

/**
* Sets up the transport so it can be used later to send requests.
*/
BaseBackend.prototype._setupTransport = function () {
return new NoopTransport();
};
/**
* @inheritDoc
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
BaseBackend.prototype.eventFromException = function (_exception, _hint) {

@@ -49,2 +44,8 @@ throw new SentryError('Backend has to implement `eventFromException` method');

};
/**
* Sets up the transport so it can be used later to send requests.
*/
BaseBackend.prototype._setupTransport = function () {
return new NoopTransport();
};
return BaseBackend;

@@ -51,0 +52,0 @@ }());

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

import * as tslib_1 from "tslib";
import { __assign } from "tslib";
/* eslint-disable max-lines */
import { Scope } from '@sentry/hub';

@@ -58,2 +59,3 @@ import { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, timestampWithMs, truncate, uuid4, } from '@sentry/utils';

*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
BaseClient.prototype.captureException = function (exception, hint, scope) {

@@ -63,2 +65,3 @@ var _this = this;

this._processing = true;
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this._getBackend()

@@ -81,2 +84,3 @@ .eventFromException(exception, hint)

: this._getBackend().eventFromException(message, hint);
// eslint-disable-next-line @typescript-eslint/no-floating-promises
promisedEvent.then(function (event) {

@@ -213,3 +217,3 @@ eventId = _this.captureEvent(event, hint, scope);

var _a = this.getOptions().normalizeDepth, normalizeDepth = _a === void 0 ? 3 : _a;
var prepared = tslib_1.__assign({}, event, { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()), timestamp: event.timestamp || timestampWithMs() });
var prepared = __assign(__assign({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()), timestamp: event.timestamp || timestampWithMs() });
this._applyClientOptions(prepared);

@@ -232,3 +236,2 @@ this._applyIntegrationsMetadata(prepared);

return result.then(function (evt) {
// tslint:disable-next-line:strict-type-predicates
if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {

@@ -254,12 +257,11 @@ return _this._normalizeEvent(evt, normalizeDepth);

}
// tslint:disable:no-unsafe-any
var normalized = tslib_1.__assign({}, event, (event.breadcrumbs && {
breadcrumbs: event.breadcrumbs.map(function (b) { return (tslib_1.__assign({}, b, (b.data && {
var normalized = __assign(__assign(__assign(__assign(__assign({}, event), (event.breadcrumbs && {
breadcrumbs: event.breadcrumbs.map(function (b) { return (__assign(__assign({}, b), (b.data && {
data: normalize(b.data, depth),
}))); }),
}), (event.user && {
})), (event.user && {
user: normalize(event.user, depth),
}), (event.contexts && {
})), (event.contexts && {
contexts: normalize(event.contexts, depth),
}), (event.extra && {
})), (event.extra && {
extra: normalize(event.extra, depth),

@@ -275,2 +277,3 @@ }));

if (event.contexts && event.contexts.trace) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
normalized.contexts.trace = event.contexts.trace;

@@ -342,2 +345,3 @@ }

var _this = this;
// eslint-disable-next-line @typescript-eslint/unbound-method
var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;

@@ -370,3 +374,2 @@ if (!this._isEnabled()) {

var beforeSendResult = beforeSend(prepared, hint);
// tslint:disable-next-line:strict-type-predicates
if (typeof beforeSendResult === 'undefined') {

@@ -373,0 +376,0 @@ logger.error('`beforeSend` method has to return `null` or a valid event.');

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

import * as tslib_1 from "tslib";
import { __read, __spread } from "tslib";
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';

@@ -7,3 +7,3 @@ import { logger } from '@sentry/utils';

export function getIntegrationsToSetup(options) {
var defaultIntegrations = (options.defaultIntegrations && tslib_1.__spread(options.defaultIntegrations)) || [];
var defaultIntegrations = (options.defaultIntegrations && __spread(options.defaultIntegrations)) || [];
var userIntegrations = options.integrations;

@@ -35,3 +35,3 @@ var integrations = [];

else {
integrations = tslib_1.__spread(defaultIntegrations);
integrations = __spread(defaultIntegrations);
}

@@ -42,3 +42,3 @@ // Make sure that if present, `Debug` integration will always run last

if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {
integrations.push.apply(integrations, tslib_1.__spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));
integrations.push.apply(integrations, __spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));
}

@@ -45,0 +45,0 @@ return integrations;

@@ -7,7 +7,7 @@ import { Integration } from '@sentry/types';

*/
name: string;
static id: string;
/**
* @inheritDoc
*/
static id: string;
name: string;
/**

@@ -14,0 +14,0 @@ * @inheritDoc

@@ -14,3 +14,5 @@ var originalFunctionToString;

FunctionToString.prototype.setupOnce = function () {
// eslint-disable-next-line @typescript-eslint/unbound-method
originalFunctionToString = Function.prototype.toString;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Function.prototype.toString = function () {

@@ -22,3 +24,2 @@ var args = [];

var context = this.__sentry_original__ || this;
// tslint:disable-next-line:no-unsafe-any
return originalFunctionToString.apply(context, args);

@@ -25,0 +26,0 @@ };

@@ -19,7 +19,7 @@ import { Integration } from '@sentry/types';

*/
name: string;
static id: string;
/**
* @inheritDoc
*/
static id: string;
name: string;
constructor(_options?: Partial<InboundFiltersOptions>);

@@ -26,0 +26,0 @@ /**

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

import * as tslib_1 from "tslib";
import { __read, __spread } from "tslib";
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';

@@ -106,7 +106,6 @@ import { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';

if (clientOptions === void 0) { clientOptions = {}; }
// tslint:disable:deprecation
return {
allowUrls: tslib_1.__spread((this._options.whitelistUrls || []), (this._options.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),
denyUrls: tslib_1.__spread((this._options.blacklistUrls || []), (this._options.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),
ignoreErrors: tslib_1.__spread((this._options.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),
allowUrls: __spread((this._options.whitelistUrls || []), (this._options.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),
denyUrls: __spread((this._options.blacklistUrls || []), (this._options.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),
ignoreErrors: __spread((this._options.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),
ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,

@@ -113,0 +112,0 @@ };

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

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

"dependencies": {
"@sentry/hub": "5.20.1",
"@sentry/minimal": "5.20.1",
"@sentry/types": "5.20.1",
"@sentry/utils": "5.20.1",
"@sentry/hub": "5.21.0",
"@sentry/minimal": "5.21.0",
"@sentry/types": "5.21.0",
"@sentry/utils": "5.21.0",
"tslib": "^1.9.3"
},
"devDependencies": {
"@sentry-internal/eslint-config-sdk": "5.21.0",
"eslint": "7.6.0",
"jest": "^24.7.1",
"npm-run-all": "^4.1.2",
"prettier": "^1.17.0",
"prettier-check": "^2.0.0",
"prettier": "1.17.0",
"rimraf": "^2.6.3",
"tslint": "5.16.0",
"typescript": "3.4.5"
"typescript": "3.6.5"
},

@@ -44,9 +44,8 @@ "scripts": {

"link:yarn": "yarn link",
"lint": "run-s lint:prettier lint:tslint",
"lint:prettier": "prettier-check \"{src,test}/**/*.ts\"",
"lint:tslint": "tslint -t stylish -p .",
"lint:tslint:json": "tslint --format json -p . | tee lint-results.json",
"fix": "run-s fix:tslint fix:prettier",
"lint": "run-s lint:prettier lint:eslint",
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
"fix": "run-s fix:eslint fix:prettier",
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
"fix:tslint": "tslint --fix -t stylish -p .",
"fix:eslint": "eslint . --format stylish --fix",
"test": "jest",

@@ -53,0 +52,0 @@ "test:watch": "jest --watch"

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

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc