@sentry/core
Advanced tools
Comparing version 5.17.0 to 5.18.0
export { addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, startTransaction, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/minimal'; | ||
export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub'; | ||
export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, makeMain, Scope } from '@sentry/hub'; | ||
export { API } from './api'; | ||
@@ -4,0 +4,0 @@ export { BaseClient } from './baseclient'; |
@@ -21,2 +21,3 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Hub = hub_1.Hub; | ||
exports.makeMain = hub_1.makeMain; | ||
exports.Scope = hub_1.Scope; | ||
@@ -23,0 +24,0 @@ var api_1 = require("./api"); |
import { Integration } from '@sentry/types'; | ||
/** JSDoc */ | ||
interface InboundFiltersOptions { | ||
blacklistUrls?: Array<string | RegExp>; | ||
ignoreErrors?: Array<string | RegExp>; | ||
ignoreInternal?: boolean; | ||
whitelistUrls?: Array<string | RegExp>; | ||
allowUrls: Array<string | RegExp>; | ||
denyUrls: Array<string | RegExp>; | ||
ignoreErrors: Array<string | RegExp>; | ||
ignoreInternal: boolean; | ||
/** @deprecated use {@link InboundFiltersOptions.allowUrls} instead. */ | ||
whitelistUrls: Array<string | RegExp>; | ||
/** @deprecated use {@link InboundFiltersOptions.denyUrls} instead. */ | ||
blacklistUrls: Array<string | RegExp>; | ||
} | ||
@@ -20,3 +24,3 @@ /** Inbound filters configurable by the user */ | ||
static id: string; | ||
constructor(_options?: InboundFiltersOptions); | ||
constructor(_options?: Partial<InboundFiltersOptions>); | ||
/** | ||
@@ -33,5 +37,5 @@ * @inheritDoc | ||
/** JSDoc */ | ||
private _isBlacklistedUrl; | ||
private _isDeniedUrl; | ||
/** JSDoc */ | ||
private _isWhitelistedUrl; | ||
private _isAllowedUrl; | ||
/** JSDoc */ | ||
@@ -38,0 +42,0 @@ private _mergeOptions; |
@@ -49,8 +49,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
if (this._isBlacklistedUrl(event, options)) { | ||
utils_1.logger.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: " + utils_1.getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); | ||
if (this._isDeniedUrl(event, options)) { | ||
utils_1.logger.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: " + utils_1.getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); | ||
return true; | ||
} | ||
if (!this._isWhitelistedUrl(event, options)) { | ||
utils_1.logger.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: " + utils_1.getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); | ||
if (!this._isAllowedUrl(event, options)) { | ||
utils_1.logger.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: " + utils_1.getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); | ||
return true; | ||
@@ -62,3 +62,2 @@ } | ||
InboundFilters.prototype._isSentryError = function (event, options) { | ||
if (options === void 0) { options = {}; } | ||
if (!options.ignoreInternal) { | ||
@@ -81,3 +80,2 @@ return false; | ||
InboundFilters.prototype._isIgnoredError = function (event, options) { | ||
if (options === void 0) { options = {}; } | ||
if (!options.ignoreErrors || !options.ignoreErrors.length) { | ||
@@ -92,20 +90,18 @@ return false; | ||
/** JSDoc */ | ||
InboundFilters.prototype._isBlacklistedUrl = function (event, options) { | ||
if (options === void 0) { options = {}; } | ||
InboundFilters.prototype._isDeniedUrl = function (event, options) { | ||
// TODO: Use Glob instead? | ||
if (!options.blacklistUrls || !options.blacklistUrls.length) { | ||
if (!options.denyUrls || !options.denyUrls.length) { | ||
return false; | ||
} | ||
var url = this._getEventFilterUrl(event); | ||
return !url ? false : options.blacklistUrls.some(function (pattern) { return utils_1.isMatchingPattern(url, pattern); }); | ||
return !url ? false : options.denyUrls.some(function (pattern) { return utils_1.isMatchingPattern(url, pattern); }); | ||
}; | ||
/** JSDoc */ | ||
InboundFilters.prototype._isWhitelistedUrl = function (event, options) { | ||
if (options === void 0) { options = {}; } | ||
InboundFilters.prototype._isAllowedUrl = function (event, options) { | ||
// TODO: Use Glob instead? | ||
if (!options.whitelistUrls || !options.whitelistUrls.length) { | ||
if (!options.allowUrls || !options.allowUrls.length) { | ||
return true; | ||
} | ||
var url = this._getEventFilterUrl(event); | ||
return !url ? true : options.whitelistUrls.some(function (pattern) { return utils_1.isMatchingPattern(url, pattern); }); | ||
return !url ? true : options.allowUrls.some(function (pattern) { return utils_1.isMatchingPattern(url, pattern); }); | ||
}; | ||
@@ -115,7 +111,8 @@ /** JSDoc */ | ||
if (clientOptions === void 0) { clientOptions = {}; } | ||
// tslint:disable:deprecation | ||
return { | ||
blacklistUrls: tslib_1.__spread((this._options.blacklistUrls || []), (clientOptions.blacklistUrls || [])), | ||
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), | ||
ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true, | ||
whitelistUrls: tslib_1.__spread((this._options.whitelistUrls || []), (clientOptions.whitelistUrls || [])), | ||
}; | ||
@@ -122,0 +119,0 @@ }; |
export { addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, startTransaction, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/minimal'; | ||
export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub'; | ||
export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, makeMain, Scope } from '@sentry/hub'; | ||
export { API } from './api'; | ||
@@ -4,0 +4,0 @@ export { BaseClient } from './baseclient'; |
export { addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, startTransaction, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/minimal'; | ||
export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub'; | ||
export { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, makeMain, Scope } from '@sentry/hub'; | ||
export { API } from './api'; | ||
@@ -4,0 +4,0 @@ export { BaseClient } from './baseclient'; |
import { Integration } from '@sentry/types'; | ||
/** JSDoc */ | ||
interface InboundFiltersOptions { | ||
blacklistUrls?: Array<string | RegExp>; | ||
ignoreErrors?: Array<string | RegExp>; | ||
ignoreInternal?: boolean; | ||
whitelistUrls?: Array<string | RegExp>; | ||
allowUrls: Array<string | RegExp>; | ||
denyUrls: Array<string | RegExp>; | ||
ignoreErrors: Array<string | RegExp>; | ||
ignoreInternal: boolean; | ||
/** @deprecated use {@link InboundFiltersOptions.allowUrls} instead. */ | ||
whitelistUrls: Array<string | RegExp>; | ||
/** @deprecated use {@link InboundFiltersOptions.denyUrls} instead. */ | ||
blacklistUrls: Array<string | RegExp>; | ||
} | ||
@@ -20,3 +24,3 @@ /** Inbound filters configurable by the user */ | ||
static id: string; | ||
constructor(_options?: InboundFiltersOptions); | ||
constructor(_options?: Partial<InboundFiltersOptions>); | ||
/** | ||
@@ -33,5 +37,5 @@ * @inheritDoc | ||
/** JSDoc */ | ||
private _isBlacklistedUrl; | ||
private _isDeniedUrl; | ||
/** JSDoc */ | ||
private _isWhitelistedUrl; | ||
private _isAllowedUrl; | ||
/** JSDoc */ | ||
@@ -38,0 +42,0 @@ private _mergeOptions; |
@@ -48,8 +48,8 @@ import * as tslib_1 from "tslib"; | ||
} | ||
if (this._isBlacklistedUrl(event, options)) { | ||
logger.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: " + getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); | ||
if (this._isDeniedUrl(event, options)) { | ||
logger.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: " + getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); | ||
return true; | ||
} | ||
if (!this._isWhitelistedUrl(event, options)) { | ||
logger.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: " + getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); | ||
if (!this._isAllowedUrl(event, options)) { | ||
logger.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: " + getEventDescription(event) + ".\nUrl: " + this._getEventFilterUrl(event)); | ||
return true; | ||
@@ -61,3 +61,2 @@ } | ||
InboundFilters.prototype._isSentryError = function (event, options) { | ||
if (options === void 0) { options = {}; } | ||
if (!options.ignoreInternal) { | ||
@@ -80,3 +79,2 @@ return false; | ||
InboundFilters.prototype._isIgnoredError = function (event, options) { | ||
if (options === void 0) { options = {}; } | ||
if (!options.ignoreErrors || !options.ignoreErrors.length) { | ||
@@ -91,20 +89,18 @@ return false; | ||
/** JSDoc */ | ||
InboundFilters.prototype._isBlacklistedUrl = function (event, options) { | ||
if (options === void 0) { options = {}; } | ||
InboundFilters.prototype._isDeniedUrl = function (event, options) { | ||
// TODO: Use Glob instead? | ||
if (!options.blacklistUrls || !options.blacklistUrls.length) { | ||
if (!options.denyUrls || !options.denyUrls.length) { | ||
return false; | ||
} | ||
var url = this._getEventFilterUrl(event); | ||
return !url ? false : options.blacklistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); | ||
return !url ? false : options.denyUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); | ||
}; | ||
/** JSDoc */ | ||
InboundFilters.prototype._isWhitelistedUrl = function (event, options) { | ||
if (options === void 0) { options = {}; } | ||
InboundFilters.prototype._isAllowedUrl = function (event, options) { | ||
// TODO: Use Glob instead? | ||
if (!options.whitelistUrls || !options.whitelistUrls.length) { | ||
if (!options.allowUrls || !options.allowUrls.length) { | ||
return true; | ||
} | ||
var url = this._getEventFilterUrl(event); | ||
return !url ? true : options.whitelistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); | ||
return !url ? true : options.allowUrls.some(function (pattern) { return isMatchingPattern(url, pattern); }); | ||
}; | ||
@@ -114,7 +110,8 @@ /** JSDoc */ | ||
if (clientOptions === void 0) { clientOptions = {}; } | ||
// tslint:disable:deprecation | ||
return { | ||
blacklistUrls: tslib_1.__spread((this._options.blacklistUrls || []), (clientOptions.blacklistUrls || [])), | ||
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), | ||
ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true, | ||
whitelistUrls: tslib_1.__spread((this._options.whitelistUrls || []), (clientOptions.whitelistUrls || [])), | ||
}; | ||
@@ -121,0 +118,0 @@ }; |
{ | ||
"name": "@sentry/core", | ||
"version": "5.17.0", | ||
"version": "5.18.0", | ||
"description": "Base implementation for all Sentry JavaScript SDKs", | ||
@@ -19,6 +19,6 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/hub": "5.17.0", | ||
"@sentry/minimal": "5.17.0", | ||
"@sentry/types": "5.17.0", | ||
"@sentry/utils": "5.17.0", | ||
"@sentry/hub": "5.18.0", | ||
"@sentry/minimal": "5.18.0", | ||
"@sentry/types": "5.18.0", | ||
"@sentry/utils": "5.18.0", | ||
"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
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
259818
2699
+ Added@sentry/hub@5.18.0(transitive)
+ Added@sentry/minimal@5.18.0(transitive)
+ Added@sentry/types@5.18.0(transitive)
+ Added@sentry/utils@5.18.0(transitive)
- Removed@sentry/hub@5.17.0(transitive)
- Removed@sentry/minimal@5.17.0(transitive)
- Removed@sentry/types@5.17.0(transitive)
- Removed@sentry/utils@5.17.0(transitive)
Updated@sentry/hub@5.18.0
Updated@sentry/minimal@5.18.0
Updated@sentry/types@5.18.0
Updated@sentry/utils@5.18.0