@sentry/core
Advanced tools
Comparing version 4.0.0-beta.9 to 4.0.0-beta.10
import { Scope } from '@sentry/hub'; | ||
import { Breadcrumb, SdkInfo, SentryEvent, SentryResponse } from '@sentry/types'; | ||
import { Breadcrumb, SentryEvent, SentryResponse } from '@sentry/types'; | ||
import { DSN } from './dsn'; | ||
@@ -17,5 +17,2 @@ import { Backend, Client, Options } from './interfaces'; | ||
* | ||
* Subclasses must implement one abstract method: {@link getSdkInfo}. It must | ||
* return the unique name and the version of the SDK. | ||
* | ||
* If a DSN is specified in the options, it will be parsed and stored. Use | ||
@@ -99,6 +96,2 @@ * {@link Client.getDSN} to retrieve the DSN at any moment. In case the DSN is | ||
getOptions(): O; | ||
/** | ||
* @inheritDoc | ||
*/ | ||
abstract getSdkInfo(): SdkInfo; | ||
/** Returns the current backend. */ | ||
@@ -111,4 +104,3 @@ protected getBackend(): B; | ||
* | ||
* The information includes release and environment from `options`, SDK | ||
* information returned by {@link BaseClient.getSdkInfo}, as well as | ||
* The information includes release and environment from `options`, | ||
* breadcrumbs and context (extra, tags and user) from the scope. | ||
@@ -123,3 +115,3 @@ * | ||
*/ | ||
protected prepareEvent(event: SentryEvent, scope?: Scope): Promise<SentryEvent>; | ||
protected prepareEvent(event: SentryEvent, scope?: Scope): Promise<SentryEvent | null>; | ||
/** | ||
@@ -126,0 +118,0 @@ * Processes an event (either error or message) and sends it to Sentry. |
@@ -72,5 +72,2 @@ "use strict"; | ||
* | ||
* Subclasses must implement one abstract method: {@link getSdkInfo}. It must | ||
* return the unique name and the version of the SDK. | ||
* | ||
* If a DSN is specified in the options, it will be parsed and stored. Use | ||
@@ -196,5 +193,3 @@ * {@link Client.getDSN} to retrieve the DSN at any moment. In case the DSN is | ||
} | ||
finalBreadcrumb = beforeBreadcrumb | ||
? beforeBreadcrumb(mergedBreadcrumb) | ||
: mergedBreadcrumb; | ||
finalBreadcrumb = beforeBreadcrumb ? beforeBreadcrumb(mergedBreadcrumb) : mergedBreadcrumb; | ||
return [4 /*yield*/, this.getBackend().storeBreadcrumb(finalBreadcrumb)]; | ||
@@ -236,4 +231,3 @@ case 1: | ||
* | ||
* The information includes release and environment from `options`, SDK | ||
* information returned by {@link BaseClient.getSdkInfo}, as well as | ||
* The information includes release and environment from `options`, | ||
* breadcrumbs and context (extra, tags and user) from the scope. | ||
@@ -253,3 +247,3 @@ * | ||
_a = this.getOptions(), environment = _a.environment, _b = _a.maxBreadcrumbs, maxBreadcrumbs = _b === void 0 ? DEFAULT_BREADCRUMBS : _b, release = _a.release; | ||
prepared = __assign({ sdk: this.getSdkInfo() }, event); | ||
prepared = __assign({}, event); | ||
if (prepared.environment === undefined && environment !== undefined) { | ||
@@ -264,5 +258,3 @@ prepared.environment = environment; | ||
} | ||
exception = prepared.exception && | ||
prepared.exception.values && | ||
prepared.exception.values[0]; | ||
exception = prepared.exception && prepared.exception.values && prepared.exception.values[0]; | ||
if (exception && exception.value) { | ||
@@ -310,4 +302,2 @@ exception.value = string_1.truncate(exception.value, MAX_URL_LENGTH); | ||
return [2 /*return*/, { | ||
code: -1, | ||
event_id: event.event_id, | ||
status: types_1.Status.Skipped, | ||
@@ -320,6 +310,4 @@ }]; | ||
_a = this.getOptions(), shouldSend = _a.shouldSend, beforeSend = _a.beforeSend, afterSend = _a.afterSend; | ||
if (shouldSend && !shouldSend(prepared)) { | ||
if (prepared === null || (shouldSend && !shouldSend(prepared))) { | ||
return [2 /*return*/, { | ||
code: -1, | ||
event_id: event.event_id, | ||
status: types_1.Status.Skipped, | ||
@@ -326,0 +314,0 @@ }]; |
@@ -1,2 +0,2 @@ | ||
export { captureException, captureMessage, configureScope, } from '@sentry/minimal'; | ||
export { captureException, captureMessage, configureScope } from '@sentry/minimal'; | ||
export { Hub, Scope } from '@sentry/hub'; | ||
@@ -3,0 +3,0 @@ export { BackendClass, BaseClient } from './base'; |
import { Scope } from '@sentry/hub'; | ||
import { Breadcrumb, Integration, SdkInfo, SentryEvent, SentryResponse, Transport, TransportClass, TransportOptions } from '@sentry/types'; | ||
import { Breadcrumb, Integration, SentryEvent, SentryResponse, Transport, TransportClass, TransportOptions } from '@sentry/types'; | ||
import { DSN } from './dsn'; | ||
@@ -186,4 +186,2 @@ /** Console logging verbosity for the SDK. */ | ||
getOptions(): O; | ||
/** Returns the current used SDK version and name. */ | ||
getSdkInfo(): SdkInfo; | ||
} | ||
@@ -190,0 +188,0 @@ /** |
{ | ||
"name": "@sentry/core", | ||
"version": "4.0.0-beta.9", | ||
"version": "4.0.0-beta.10", | ||
"description": "Base implementation for all Sentry JavaScript SDKs", | ||
@@ -18,6 +18,6 @@ "repository": "git://github.com/getsentry/raven-js.git", | ||
"dependencies": { | ||
"@sentry/hub": "4.0.0-beta.9", | ||
"@sentry/minimal": "4.0.0-beta.9", | ||
"@sentry/types": "4.0.0-beta.9", | ||
"@sentry/utils": "4.0.0-beta.9" | ||
"@sentry/hub": "4.0.0-beta.10", | ||
"@sentry/minimal": "4.0.0-beta.10", | ||
"@sentry/types": "4.0.0-beta.10", | ||
"@sentry/utils": "4.0.0-beta.10" | ||
}, | ||
@@ -24,0 +24,0 @@ "devDependencies": { |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81318
993
+ Added@sentry/hub@4.0.0-beta.10(transitive)
+ Added@sentry/minimal@4.0.0-beta.10(transitive)
+ Added@sentry/types@4.0.0-beta.10(transitive)
+ Added@sentry/utils@4.0.0-beta.10(transitive)
- Removed@sentry/hub@4.0.0-beta.9(transitive)
- Removed@sentry/minimal@4.0.0-beta.9(transitive)
- Removed@sentry/types@4.0.0-beta.9(transitive)
- Removed@sentry/utils@4.0.0-beta.9(transitive)
Updated@sentry/hub@4.0.0-beta.10
Updated@sentry/types@4.0.0-beta.10
Updated@sentry/utils@4.0.0-beta.10