Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/types

Package Overview
Dependencies
Maintainers
11
Versions
481
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/types - npm Package Compare versions

Comparing version 7.88.0 to 7.89.0

2

package.json
{
"name": "@sentry/types",
"version": "7.88.0",
"version": "7.89.0",
"description": "Types for all Sentry JavaScript SDKs",

@@ -5,0 +5,0 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

@@ -40,2 +40,4 @@ import { Breadcrumb, BreadcrumbHint } from './breadcrumb';

* @returns Scope, the new cloned scope
*
* @deprecated Use `withScope` instead.
*/

@@ -49,2 +51,4 @@ pushScope(): Scope;

* discarded.
*
* @deprecated Use `withScope` instead.
*/

@@ -65,3 +69,3 @@ popScope(): boolean;

*/
withScope(callback: (scope: Scope) => void): void;
withScope<T>(callback: (scope: Scope) => T): T;
/** Returns the client of the top stack. */

@@ -157,2 +161,3 @@ getClient(): Client | undefined;

* @param callback Callback function that receives Scope.
* @deprecated Use `getScope()` directly.
*/

@@ -159,0 +164,0 @@ configureScope(callback: (scope: Scope) => void): void;

@@ -16,3 +16,3 @@ export { Attachment } from './attachment';

export { Hub } from './hub';
export { Integration, IntegrationClass } from './integration';
export { Integration, IntegrationClass, IntegrationFn, IntegrationFnResult } from './integration';
export { Mechanism } from './mechanism';

@@ -19,0 +19,0 @@ export { ExtractedNodeRequestData, HttpHeaderValue, Primitive, WorkerLocation } from './misc';

@@ -13,2 +13,37 @@ import { Client } from './client';

}
/**
* An integration in function form.
* This is expected to return an integration result,
*/
export type IntegrationFn = (...rest: any[]) => IntegrationFnResult;
export interface IntegrationFnResult {
/**
* The name of the integration.
*/
name: string;
/**
* This hook is only called once, even if multiple clients are created.
* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
*/
setupOnce?(): void;
/**
* Set up an integration for the given client.
* Receives the client as argument.
*
* Whenever possible, prefer this over `setupOnce`, as that is only run for the first client,
* whereas `setup` runs for each client. Only truly global things (e.g. registering global handlers)
* should be done in `setupOnce`.
*/
setup?(client: Client): void;
/**
* An optional hook that allows to preprocess an event _before_ it is passed to all other event processors.
*/
preprocessEvent?(event: Event, hint: EventHint | undefined, client: Client): void;
/**
* An optional hook that allows to process an event.
* Return `null` to drop the event, or mutate the event & return it.
* This receives the client that the integration was installed for as third argument.
*/
processEvent?(event: Event, hint: EventHint, client: Client): Event | null | PromiseLike<Event | null>;
}
/** Integration interface */

@@ -15,0 +50,0 @@ export interface Integration {

@@ -40,2 +40,4 @@ import type { Breadcrumb, BreadcrumbHint } from './breadcrumb';

* @returns Scope, the new cloned scope
*
* @deprecated Use `withScope` instead.
*/

@@ -49,2 +51,4 @@ pushScope(): Scope;

* discarded.
*
* @deprecated Use `withScope` instead.
*/

@@ -65,3 +69,3 @@ popScope(): boolean;

*/
withScope(callback: (scope: Scope) => void): void;
withScope<T>(callback: (scope: Scope) => T): T;
/** Returns the client of the top stack. */

@@ -157,2 +161,3 @@ getClient(): Client | undefined;

* @param callback Callback function that receives Scope.
* @deprecated Use `getScope()` directly.
*/

@@ -159,0 +164,0 @@ configureScope(callback: (scope: Scope) => void): void;

@@ -16,3 +16,3 @@ export type { Attachment } from './attachment';

export type { Hub } from './hub';
export type { Integration, IntegrationClass } from './integration';
export type { Integration, IntegrationClass, IntegrationFn, IntegrationFnResult } from './integration';
export type { Mechanism } from './mechanism';

@@ -19,0 +19,0 @@ export type { ExtractedNodeRequestData, HttpHeaderValue, Primitive, WorkerLocation } from './misc';

@@ -13,2 +13,37 @@ import type { Client } from './client';

}
/**
* An integration in function form.
* This is expected to return an integration result,
*/
export type IntegrationFn = (...rest: any[]) => IntegrationFnResult;
export interface IntegrationFnResult {
/**
* The name of the integration.
*/
name: string;
/**
* This hook is only called once, even if multiple clients are created.
* It does not receives any arguments, and should only use for e.g. global monkey patching and similar things.
*/
setupOnce?(): void;
/**
* Set up an integration for the given client.
* Receives the client as argument.
*
* Whenever possible, prefer this over `setupOnce`, as that is only run for the first client,
* whereas `setup` runs for each client. Only truly global things (e.g. registering global handlers)
* should be done in `setupOnce`.
*/
setup?(client: Client): void;
/**
* An optional hook that allows to preprocess an event _before_ it is passed to all other event processors.
*/
preprocessEvent?(event: Event, hint: EventHint | undefined, client: Client): void;
/**
* An optional hook that allows to process an event.
* Return `null` to drop the event, or mutate the event & return it.
* This receives the client that the integration was installed for as third argument.
*/
processEvent?(event: Event, hint: EventHint, client: Client): Event | null | PromiseLike<Event | null>;
}
/** Integration interface */

@@ -15,0 +50,0 @@ export interface Integration {

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