@sentry/types
Advanced tools
| import { Severity } from './severity'; | ||
| /** JSDoc */ | ||
| export interface Breadcrumb { | ||
| type?: string; | ||
| level?: Severity; | ||
| event_id?: string; | ||
| category?: string; | ||
| message?: string; | ||
| data?: any; | ||
| timestamp?: number; | ||
| } | ||
| /** JSDoc */ | ||
| export interface BreadcrumbHint { | ||
| [key: string]: any; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=breadcrumb.js.map |
| {"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../src/breadcrumb.ts"],"names":[],"mappings":"","sourcesContent":["import { Severity } from './severity';\n\n/** JSDoc */\nexport interface Breadcrumb {\n type?: string;\n level?: Severity;\n event_id?: string;\n category?: string;\n message?: string;\n data?: any;\n timestamp?: number;\n}\n\n/** JSDoc */\nexport interface BreadcrumbHint {\n [key: string]: any;\n}\n"]} |
| import { Dsn } from './dsn'; | ||
| import { Event, EventHint } from './event'; | ||
| import { Integration, IntegrationClass } from './integration'; | ||
| import { Options } from './options'; | ||
| import { Scope } from './scope'; | ||
| import { Severity } from './severity'; | ||
| /** | ||
| * User-Facing Sentry SDK Client. | ||
| * | ||
| * This interface contains all methods to interface with the SDK once it has | ||
| * been installed. It allows to send events to Sentry, record breadcrumbs and | ||
| * set a context included in every event. Since the SDK mutates its environment, | ||
| * there will only be one instance during runtime. | ||
| * | ||
| */ | ||
| export interface Client<O extends Options = Options> { | ||
| /** | ||
| * Captures an exception event and sends it to Sentry. | ||
| * | ||
| * @param exception An exception-like object. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @param scope An optional scope containing event metadata. | ||
| * @returns The event id | ||
| */ | ||
| captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined; | ||
| /** | ||
| * Captures a message event and sends it to Sentry. | ||
| * | ||
| * @param message The message to send to Sentry. | ||
| * @param level Define the level of the message. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @param scope An optional scope containing event metadata. | ||
| * @returns The event id | ||
| */ | ||
| captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined; | ||
| /** | ||
| * Captures a manually created event and sends it to Sentry. | ||
| * | ||
| * @param event The event to send to Sentry. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @param scope An optional scope containing event metadata. | ||
| * @returns The event id | ||
| */ | ||
| captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined; | ||
| /** Returns the current Dsn. */ | ||
| getDsn(): Dsn | undefined; | ||
| /** Returns the current options. */ | ||
| getOptions(): O; | ||
| /** | ||
| * A promise that resolves when all current events have been sent. | ||
| * If you provide a timeout and the queue takes longer to drain the promise returns false. | ||
| * | ||
| * @param timeout Maximum time in ms the client should wait. | ||
| */ | ||
| close(timeout?: number): Promise<boolean>; | ||
| /** | ||
| * A promise that resolves when all current events have been sent. | ||
| * If you provide a timeout and the queue takes longer to drain the promise returns false. | ||
| * | ||
| * @param timeout Maximum time in ms the client should wait. | ||
| */ | ||
| flush(timeout?: number): Promise<boolean>; | ||
| /** Returns an array of installed integrations on the client. */ | ||
| getIntegration<T extends Integration>(integartion: IntegrationClass<T>): T | null; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=client.js.map |
| {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"","sourcesContent":["import { Dsn } from './dsn';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Options } from './options';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\n\n/**\n * User-Facing Sentry SDK Client.\n *\n * This interface contains all methods to interface with the SDK once it has\n * been installed. It allows to send events to Sentry, record breadcrumbs and\n * set a context included in every event. Since the SDK mutates its environment,\n * there will only be one instance during runtime.\n *\n */\nexport interface Client<O extends Options = Options> {\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined;\n\n /** Returns the current Dsn. */\n getDsn(): Dsn | undefined;\n\n /** Returns the current options. */\n getOptions(): O;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n close(timeout?: number): Promise<boolean>;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n flush(timeout?: number): Promise<boolean>;\n\n /** Returns an array of installed integrations on the client. */\n getIntegration<T extends Integration>(integartion: IntegrationClass<T>): T | null;\n}\n"]} |
| /** Supported Sentry transport protocols in a Dsn. */ | ||
| export declare type DsnProtocol = 'http' | 'https'; | ||
| /** Primitive components of a Dsn. */ | ||
| export interface DsnComponents { | ||
| /** Protocol used to connect to Sentry. */ | ||
| protocol: DsnProtocol; | ||
| /** Public authorization key. */ | ||
| user: string; | ||
| /** private _authorization key (deprecated, optional). */ | ||
| pass?: string; | ||
| /** Hostname of the Sentry instance. */ | ||
| host: string; | ||
| /** Port of the Sentry instance. */ | ||
| port?: string; | ||
| /** Sub path/ */ | ||
| path?: string; | ||
| /** Project ID */ | ||
| projectId: string; | ||
| } | ||
| /** Anything that can be parsed into a Dsn. */ | ||
| export declare type DsnLike = string | DsnComponents; | ||
| /** The Sentry Dsn, identifying a Sentry instance and project. */ | ||
| export interface Dsn extends DsnComponents { | ||
| /** | ||
| * Renders the string representation of this Dsn. | ||
| * | ||
| * By default, this will render the public representation without the password | ||
| * component. To get the deprecated private _representation, set `withPassword` | ||
| * to true. | ||
| * | ||
| * @param withPassword When set to true, the password will be included. | ||
| */ | ||
| toString(withPassword: boolean): string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=dsn.js.map |
| {"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key. */\n user: string;\n /** private _authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport interface Dsn extends DsnComponents {\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n toString(withPassword: boolean): string;\n}\n"]} |
| /** | ||
| * Just an Error object with arbitrary attributes attached to it. | ||
| */ | ||
| export interface ExtendedError extends Error { | ||
| [key: string]: any; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=error.js.map |
| {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Just an Error object with arbitrary attributes attached to it.\n */\nexport interface ExtendedError extends Error {\n [key: string]: any;\n}\n"]} |
| import { Breadcrumb } from './breadcrumb'; | ||
| import { Exception } from './exception'; | ||
| import { Request } from './request'; | ||
| import { SdkInfo } from './sdkinfo'; | ||
| import { Severity } from './severity'; | ||
| import { Span } from './span'; | ||
| import { Stacktrace } from './stacktrace'; | ||
| import { User } from './user'; | ||
| /** JSDoc */ | ||
| export interface Event { | ||
| event_id?: string; | ||
| message?: string; | ||
| timestamp?: number; | ||
| level?: Severity; | ||
| platform?: string; | ||
| logger?: string; | ||
| server_name?: string; | ||
| release?: string; | ||
| dist?: string; | ||
| environment?: string; | ||
| sdk?: SdkInfo; | ||
| request?: Request; | ||
| transaction?: string; | ||
| modules?: { | ||
| [key: string]: string; | ||
| }; | ||
| fingerprint?: string[]; | ||
| exception?: { | ||
| values?: Exception[]; | ||
| }; | ||
| stacktrace?: Stacktrace; | ||
| breadcrumbs?: Breadcrumb[]; | ||
| contexts?: { | ||
| [key: string]: object; | ||
| }; | ||
| tags?: { | ||
| [key: string]: string; | ||
| }; | ||
| extra?: { | ||
| [key: string]: any; | ||
| }; | ||
| user?: User; | ||
| spans?: Span[]; | ||
| type?: EventType; | ||
| } | ||
| /** JSDoc */ | ||
| export declare type EventType = 'none'; | ||
| /** JSDoc */ | ||
| export interface EventHint { | ||
| event_id?: string; | ||
| syntheticException?: Error | null; | ||
| originalException?: Error | null; | ||
| data?: any; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=event.js.map |
| {"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Exception } from './exception';\nimport { Request } from './request';\nimport { SdkInfo } from './sdkinfo';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Stacktrace } from './stacktrace';\nimport { User } from './user';\n\n/** JSDoc */\nexport interface Event {\n event_id?: string;\n message?: string;\n timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: Exception[];\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: { [key: string]: object };\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n user?: User;\n spans?: Span[];\n type?: EventType;\n}\n\n/** JSDoc */\nexport type EventType = 'none';\n\n/** JSDoc */\nexport interface EventHint {\n event_id?: string;\n syntheticException?: Error | null;\n originalException?: Error | null;\n data?: any;\n}\n"]} |
| import { Event, EventHint } from './event'; | ||
| /** | ||
| * Event processors are used to change the event before it will be send. | ||
| * We strongly advise to make this function sync. | ||
| * Returning a Promise<Event | null> will work just fine, but better be sure that you know what you are doing. | ||
| * Event processing will be deferred until your Promise is resolved. | ||
| */ | ||
| export declare type EventProcessor = (event: Event, hint?: EventHint) => Promise<Event | null> | Event | null; |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=eventprocessor.js.map |
| {"version":3,"file":"eventprocessor.js","sourceRoot":"","sources":["../src/eventprocessor.ts"],"names":[],"mappings":"","sourcesContent":["import { Event, EventHint } from './event';\n\n/**\n * Event processors are used to change the event before it will be send.\n * We strongly advise to make this function sync.\n * Returning a Promise<Event | null> will work just fine, but better be sure that you know what you are doing.\n * Event processing will be deferred until your Promise is resolved.\n */\nexport type EventProcessor = (event: Event, hint?: EventHint) => Promise<Event | null> | Event | null;\n"]} |
| import { Mechanism } from './mechanism'; | ||
| import { Stacktrace } from './stacktrace'; | ||
| /** JSDoc */ | ||
| export interface Exception { | ||
| type?: string; | ||
| value?: string; | ||
| mechanism?: Mechanism; | ||
| module?: string; | ||
| thread_id?: number; | ||
| stacktrace?: Stacktrace; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=exception.js.map |
| {"version":3,"file":"exception.js","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"","sourcesContent":["import { Mechanism } from './mechanism';\nimport { Stacktrace } from './stacktrace';\n\n/** JSDoc */\nexport interface Exception {\n type?: string;\n value?: string;\n mechanism?: Mechanism;\n module?: string;\n thread_id?: number;\n stacktrace?: Stacktrace;\n}\n"]} |
+115
| import { Breadcrumb, BreadcrumbHint } from './breadcrumb'; | ||
| import { Client } from './client'; | ||
| import { Event, EventHint } from './event'; | ||
| import { Integration, IntegrationClass } from './integration'; | ||
| import { Scope } from './scope'; | ||
| import { Severity } from './severity'; | ||
| /** | ||
| * Internal class used to make sure we always have the latest internal functions | ||
| * working in case we have a version conflict. | ||
| */ | ||
| export interface Hub { | ||
| /** | ||
| * Checks if this hub's version is older than the given version. | ||
| * | ||
| * @param version A version number to compare to. | ||
| * @return True if the given version is newer; otherwise false. | ||
| * | ||
| * @hidden | ||
| */ | ||
| isOlderThan(version: number): boolean; | ||
| /** | ||
| * This binds the given client to the current scope. | ||
| * @param client An SDK client (client) instance. | ||
| */ | ||
| bindClient(client?: Client): void; | ||
| /** | ||
| * Create a new scope to store context information. | ||
| * | ||
| * The scope will be layered on top of the current one. It is isolated, i.e. all | ||
| * breadcrumbs and context information added to this scope will be removed once | ||
| * the scope ends. Be sure to always remove this scope with {@link this.popScope} | ||
| * when the operation finishes or throws. | ||
| * | ||
| * @returns Scope, the new cloned scope | ||
| */ | ||
| pushScope(): Scope; | ||
| /** | ||
| * Removes a previously pushed scope from the stack. | ||
| * | ||
| * This restores the state before the scope was pushed. All breadcrumbs and | ||
| * context information added since the last call to {@link this.pushScope} are | ||
| * discarded. | ||
| */ | ||
| popScope(): boolean; | ||
| /** | ||
| * Creates a new scope with and executes the given operation within. | ||
| * The scope is automatically removed once the operation | ||
| * finishes or throws. | ||
| * | ||
| * This is essentially a convenience function for: | ||
| * | ||
| * pushScope(); | ||
| * callback(); | ||
| * popScope(); | ||
| * | ||
| * @param callback that will be enclosed into push/popScope. | ||
| */ | ||
| withScope(callback: (scope: Scope) => void): void; | ||
| /** Returns the client of the top stack. */ | ||
| getClient(): Client | undefined; | ||
| /** | ||
| * Captures an exception event and sends it to Sentry. | ||
| * | ||
| * @param exception An exception-like object. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @returns The generated eventId. | ||
| */ | ||
| captureException(exception: any, hint?: EventHint): string; | ||
| /** | ||
| * Captures a message event and sends it to Sentry. | ||
| * | ||
| * @param message The message to send to Sentry. | ||
| * @param level Define the level of the message. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @returns The generated eventId. | ||
| */ | ||
| captureMessage(message: string, level?: Severity, hint?: EventHint): string; | ||
| /** | ||
| * Captures a manually created event and sends it to Sentry. | ||
| * | ||
| * @param event The event to send to Sentry. | ||
| * @param hint May contain additional information about the original exception. | ||
| */ | ||
| captureEvent(event: Event, hint?: EventHint): string; | ||
| /** | ||
| * This is the getter for lastEventId. | ||
| * | ||
| * @returns The last event id of a captured event. | ||
| */ | ||
| lastEventId(): string | undefined; | ||
| /** | ||
| * Records a new breadcrumb which will be attached to future events. | ||
| * | ||
| * Breadcrumbs will be added to subsequent events to provide more context on | ||
| * user's actions prior to an error or crash. | ||
| * | ||
| * @param breadcrumb The breadcrumb to record. | ||
| * @param hint May contain additional information about the original breadcrumb. | ||
| */ | ||
| addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void; | ||
| /** | ||
| * Callback to set context information onto the scope. | ||
| * | ||
| * @param callback Callback function that receives Scope. | ||
| */ | ||
| configureScope(callback: (scope: Scope) => void): void; | ||
| /** | ||
| * For the duraction of the callback, this hub will be set as the global current Hub. | ||
| * This function is useful if you want to run your own client and hook into an already initialized one | ||
| * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration. | ||
| */ | ||
| run(callback: (hub: Hub) => void): void; | ||
| /** Returns the integration if installed on the current client. */ | ||
| getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=hub.js.map |
| {"version":3,"file":"hub.js","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Client } from './client';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\n\n/**\n * Internal class used to make sure we always have the latest internal functions\n * working in case we have a version conflict.\n */\nexport interface Hub {\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @hidden\n */\n isOlderThan(version: number): boolean;\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n */\n bindClient(client?: Client): void;\n\n /**\n * Create a new scope to store context information.\n *\n * The scope will be layered on top of the current one. It is isolated, i.e. all\n * breadcrumbs and context information added to this scope will be removed once\n * the scope ends. Be sure to always remove this scope with {@link this.popScope}\n * when the operation finishes or throws.\n *\n * @returns Scope, the new cloned scope\n */\n pushScope(): Scope;\n\n /**\n * Removes a previously pushed scope from the stack.\n *\n * This restores the state before the scope was pushed. All breadcrumbs and\n * context information added since the last call to {@link this.pushScope} are\n * discarded.\n */\n popScope(): boolean;\n\n /**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\n withScope(callback: (scope: Scope) => void): void;\n\n /** Returns the client of the top stack. */\n getClient(): Client | undefined;\n\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureException(exception: any, hint?: EventHint): string;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint): string;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n */\n captureEvent(event: Event, hint?: EventHint): string;\n\n /**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\n lastEventId(): string | undefined;\n\n /**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n * @param hint May contain additional information about the original breadcrumb.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n /**\n * Callback to set context information onto the scope.\n *\n * @param callback Callback function that receives Scope.\n */\n configureScope(callback: (scope: Scope) => void): void;\n\n /**\n * For the duraction of the callback, this hub will be set as the global current Hub.\n * This function is useful if you want to run your own client and hook into an already initialized one\n * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.\n */\n run(callback: (hub: Hub) => void): void;\n\n /** Returns the integration if installed on the current client. */\n getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;\n}\n"]} |
| import { EventProcessor } from './eventprocessor'; | ||
| import { Hub } from './hub'; | ||
| /** Integration Class Interface */ | ||
| export interface IntegrationClass<T> { | ||
| new (): T; | ||
| /** | ||
| * Property that holds the integration name | ||
| */ | ||
| id: string; | ||
| } | ||
| /** Integration interface */ | ||
| export interface Integration { | ||
| /** | ||
| * Returns {@link IntegrationClass.id} | ||
| */ | ||
| name: string; | ||
| /** | ||
| * Sets the integration up only once. | ||
| * This takes no options on purpose, options should be passed in the constructor | ||
| */ | ||
| setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=integration.js.map |
| {"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"","sourcesContent":["import { EventProcessor } from './eventprocessor';\nimport { Hub } from './hub';\n\n/** Integration Class Interface */\nexport interface IntegrationClass<T> {\n new (): T;\n /**\n * Property that holds the integration name\n */\n id: string;\n}\n\n/** Integration interface */\nexport interface Integration {\n /**\n * Returns {@link IntegrationClass.id}\n */\n name: string;\n\n /**\n * Sets the integration up only once.\n * This takes no options on purpose, options should be passed in the constructor\n */\n setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;\n}\n"]} |
| /** Console logging verbosity for the SDK. */ | ||
| export declare enum LogLevel { | ||
| /** No logs will be generated. */ | ||
| None = 0, | ||
| /** Only SDK internal errors will be logged. */ | ||
| Error = 1, | ||
| /** Information useful for debugging the SDK will be logged. */ | ||
| Debug = 2, | ||
| /** All SDK actions will be logged. */ | ||
| Verbose = 3 | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| /** Console logging verbosity for the SDK. */ | ||
| var LogLevel; | ||
| (function (LogLevel) { | ||
| /** No logs will be generated. */ | ||
| LogLevel[LogLevel["None"] = 0] = "None"; | ||
| /** Only SDK internal errors will be logged. */ | ||
| LogLevel[LogLevel["Error"] = 1] = "Error"; | ||
| /** Information useful for debugging the SDK will be logged. */ | ||
| LogLevel[LogLevel["Debug"] = 2] = "Debug"; | ||
| /** All SDK actions will be logged. */ | ||
| LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; | ||
| })(LogLevel = exports.LogLevel || (exports.LogLevel = {})); | ||
| //# sourceMappingURL=loglevel.js.map |
| {"version":3,"file":"loglevel.js","sourceRoot":"","sources":["../src/loglevel.ts"],"names":[],"mappings":";;AAAA,6CAA6C;AAC7C,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,iCAAiC;IACjC,uCAAQ,CAAA;IACR,+CAA+C;IAC/C,yCAAS,CAAA;IACT,+DAA+D;IAC/D,yCAAS,CAAA;IACT,sCAAsC;IACtC,6CAAW,CAAA;AACb,CAAC,EATW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASnB","sourcesContent":["/** Console logging verbosity for the SDK. */\nexport enum LogLevel {\n /** No logs will be generated. */\n None = 0,\n /** Only SDK internal errors will be logged. */\n Error = 1,\n /** Information useful for debugging the SDK will be logged. */\n Debug = 2,\n /** All SDK actions will be logged. */\n Verbose = 3,\n}\n"]} |
| /** JSDoc */ | ||
| export interface Mechanism { | ||
| type: string; | ||
| handled: boolean; | ||
| data?: { | ||
| [key: string]: string; | ||
| }; | ||
| synthetic?: boolean; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=mechanism.js.map |
| {"version":3,"file":"mechanism.js","sourceRoot":"","sources":["../src/mechanism.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Mechanism {\n type: string;\n handled: boolean;\n data?: {\n [key: string]: string;\n };\n synthetic?: boolean;\n}\n"]} |
| import { Breadcrumb, BreadcrumbHint } from './breadcrumb'; | ||
| import { Event, EventHint } from './event'; | ||
| import { Integration } from './integration'; | ||
| import { LogLevel } from './loglevel'; | ||
| import { Transport, TransportClass, TransportOptions } from './transport'; | ||
| /** Base configuration options for every SDK. */ | ||
| export interface Options { | ||
| /** | ||
| * Enable debug functionality in the SDK itself | ||
| */ | ||
| debug?: boolean; | ||
| /** | ||
| * Specifies whether this SDK should activate and send events to Sentry. | ||
| * Disabling the SDK reduces all overhead from instrumentation, collecting | ||
| * breadcrumbs and capturing events. Defaults to true. | ||
| */ | ||
| enabled?: boolean; | ||
| /** | ||
| * The Dsn used to connect to Sentry and identify the project. If omitted, the | ||
| * SDK will not send any data to Sentry. | ||
| */ | ||
| dsn?: string; | ||
| /** | ||
| * If this is set to false, default integrations will not be added, otherwise this will internally be set to the | ||
| * recommended default integrations. | ||
| */ | ||
| defaultIntegrations?: false | Integration[]; | ||
| /** | ||
| * List of integrations that should be installed after SDK was initialized. | ||
| * Accepts either a list of integrations or a function that receives | ||
| * default integrations and returns a new, updated list. | ||
| */ | ||
| integrations?: Integration[] | ((integrations: Integration[]) => Integration[]); | ||
| /** | ||
| * A pattern for error messages which should not be sent to Sentry. | ||
| * By default, all errors will be sent. | ||
| */ | ||
| ignoreErrors?: Array<string | RegExp>; | ||
| /** | ||
| * Transport object that should be used to send events to Sentry | ||
| */ | ||
| transport?: TransportClass<Transport>; | ||
| /** | ||
| * Options for the default transport that the SDK uses. | ||
| */ | ||
| transportOptions?: TransportOptions; | ||
| /** | ||
| * The release identifier used when uploading respective source maps. Specify | ||
| * this value to allow Sentry to resolve the correct source maps when | ||
| * processing events. | ||
| */ | ||
| release?: string; | ||
| /** The current environment of your application (e.g. "production"). */ | ||
| environment?: string; | ||
| /** Sets the distribution for all events */ | ||
| dist?: string; | ||
| /** The maximum number of breadcrumbs sent with events. Defaults to 100. */ | ||
| maxBreadcrumbs?: number; | ||
| /** Console logging verbosity for the SDK Client. */ | ||
| logLevel?: LogLevel; | ||
| /** A global sample rate to apply to all events (0 - 1). */ | ||
| sampleRate?: number; | ||
| /** Attaches stacktraces to pure capture message / log integrations */ | ||
| attachStacktrace?: boolean; | ||
| /** Maxium number of chars a single value can have before it will be truncated. */ | ||
| maxValueLength?: number; | ||
| /** | ||
| * A callback invoked during event submission, allowing to optionally modify | ||
| * the event before it is sent to Sentry. | ||
| * | ||
| * Note that you must return a valid event from this callback. If you do not | ||
| * wish to modify the event, simply return it at the end. | ||
| * Returning null will case the event to be dropped. | ||
| * | ||
| * @param event The error or message event generated by the SDK. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @returns A new event that will be sent | null. | ||
| */ | ||
| beforeSend?(event: Event, hint?: EventHint): Promise<Event | null> | Event | null; | ||
| /** | ||
| * A callback invoked when adding a breadcrumb, allowing to optionally modify | ||
| * it before adding it to future events. | ||
| * | ||
| * Note that you must return a valid breadcrumb from this callback. If you do | ||
| * not wish to modify the breadcrumb, simply return it at the end. | ||
| * Returning null will case the breadcrumb to be dropped. | ||
| * | ||
| * @param breadcrumb The breadcrumb as created by the SDK. | ||
| * @returns The breadcrumb that will be added | null. | ||
| */ | ||
| beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=options.js.map |
| {"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Event, EventHint } from './event';\nimport { Integration } from './integration';\nimport { LogLevel } from './loglevel';\nimport { Transport, TransportClass, TransportOptions } from './transport';\n\n/** Base configuration options for every SDK. */\nexport interface Options {\n /**\n * Enable debug functionality in the SDK itself\n */\n debug?: boolean;\n\n /**\n * Specifies whether this SDK should activate and send events to Sentry.\n * Disabling the SDK reduces all overhead from instrumentation, collecting\n * breadcrumbs and capturing events. Defaults to true.\n */\n enabled?: boolean;\n\n /**\n * The Dsn used to connect to Sentry and identify the project. If omitted, the\n * SDK will not send any data to Sentry.\n */\n dsn?: string;\n\n /**\n * If this is set to false, default integrations will not be added, otherwise this will internally be set to the\n * recommended default integrations.\n */\n defaultIntegrations?: false | Integration[];\n\n /**\n * List of integrations that should be installed after SDK was initialized.\n * Accepts either a list of integrations or a function that receives\n * default integrations and returns a new, updated list.\n */\n integrations?: Integration[] | ((integrations: Integration[]) => Integration[]);\n\n /**\n * A pattern for error messages which should not be sent to Sentry.\n * By default, all errors will be sent.\n */\n ignoreErrors?: Array<string | RegExp>;\n\n /**\n * Transport object that should be used to send events to Sentry\n */\n transport?: TransportClass<Transport>;\n\n /**\n * Options for the default transport that the SDK uses.\n */\n transportOptions?: TransportOptions;\n\n /**\n * The release identifier used when uploading respective source maps. Specify\n * this value to allow Sentry to resolve the correct source maps when\n * processing events.\n */\n release?: string;\n\n /** The current environment of your application (e.g. \"production\"). */\n environment?: string;\n\n /** Sets the distribution for all events */\n dist?: string;\n\n /** The maximum number of breadcrumbs sent with events. Defaults to 100. */\n maxBreadcrumbs?: number;\n\n /** Console logging verbosity for the SDK Client. */\n logLevel?: LogLevel;\n\n /** A global sample rate to apply to all events (0 - 1). */\n sampleRate?: number;\n\n /** Attaches stacktraces to pure capture message / log integrations */\n attachStacktrace?: boolean;\n\n /** Maxium number of chars a single value can have before it will be truncated. */\n maxValueLength?: number;\n\n /**\n * A callback invoked during event submission, allowing to optionally modify\n * the event before it is sent to Sentry.\n *\n * Note that you must return a valid event from this callback. If you do not\n * wish to modify the event, simply return it at the end.\n * Returning null will case the event to be dropped.\n *\n * @param event The error or message event generated by the SDK.\n * @param hint May contain additional information about the original exception.\n * @returns A new event that will be sent | null.\n */\n beforeSend?(event: Event, hint?: EventHint): Promise<Event | null> | Event | null;\n\n /**\n * A callback invoked when adding a breadcrumb, allowing to optionally modify\n * it before adding it to future events.\n *\n * Note that you must return a valid breadcrumb from this callback. If you do\n * not wish to modify the breadcrumb, simply return it at the end.\n * Returning null will case the breadcrumb to be dropped.\n *\n * @param breadcrumb The breadcrumb as created by the SDK.\n * @returns The breadcrumb that will be added | null.\n */\n beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null;\n}\n"]} |
| /** JSDoc */ | ||
| export interface Package { | ||
| name: string; | ||
| version: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=package.js.map |
| {"version":3,"file":"package.js","sourceRoot":"","sources":["../src/package.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Package {\n name: string;\n version: string;\n}\n"]} |
| /** JSDoc */ | ||
| export interface Request { | ||
| url?: string; | ||
| method?: string; | ||
| data?: any; | ||
| query_string?: string; | ||
| cookies?: { | ||
| [key: string]: string; | ||
| }; | ||
| env?: { | ||
| [key: string]: string; | ||
| }; | ||
| headers?: { | ||
| [key: string]: string; | ||
| }; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=request.js.map |
| {"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Request {\n url?: string;\n method?: string;\n data?: any;\n query_string?: string;\n cookies?: { [key: string]: string };\n env?: { [key: string]: string };\n headers?: { [key: string]: string };\n}\n"]} |
| import { Event } from './event'; | ||
| import { Status } from './status'; | ||
| /** JSDoc */ | ||
| export interface Response { | ||
| status: Status; | ||
| event?: Event; | ||
| reason?: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=response.js.map |
| {"version":3,"file":"response.js","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"","sourcesContent":["import { Event } from './event';\nimport { Status } from './status';\n\n/** JSDoc */\nexport interface Response {\n status: Status;\n event?: Event;\n reason?: string;\n}\n"]} |
| import { Breadcrumb } from './breadcrumb'; | ||
| import { EventProcessor } from './eventprocessor'; | ||
| import { Severity } from './severity'; | ||
| import { User } from './user'; | ||
| /** | ||
| * Holds additional event information. {@link Scope.applyToEvent} will be | ||
| * called by the client before an event will be sent. | ||
| */ | ||
| export interface Scope { | ||
| /** Add new event processor that will be called after {@link applyToEvent}. */ | ||
| addEventProcessor(callback: EventProcessor): this; | ||
| /** | ||
| * Updates user context information for future events. | ||
| * | ||
| * @param user User context object to be set in the current context. | ||
| */ | ||
| setUser(user: User): this; | ||
| /** | ||
| * Set an object that will be merged sent as tags data with the event. | ||
| * @param tags Tags context object to merge into current context. | ||
| */ | ||
| setTags(tags: { | ||
| [key: string]: string; | ||
| }): this; | ||
| /** | ||
| * Set key:value that will be sent as tags data with the event. | ||
| * @param key String key of tag | ||
| * @param value String value of tag | ||
| */ | ||
| setTag(key: string, value: string): this; | ||
| /** | ||
| * Set an object that will be merged sent as extra data with the event. | ||
| * @param extras Extras object to merge into current context. | ||
| */ | ||
| setExtras(extras: { | ||
| [key: string]: any; | ||
| }): this; | ||
| /** | ||
| * Set key:value that will be sent as extra data with the event. | ||
| * @param key String of extra | ||
| * @param extra Any kind of data. This data will be normailzed. | ||
| */ | ||
| setExtra(key: string, extra: any): this; | ||
| /** | ||
| * Sets the fingerprint on the scope to send with the events. | ||
| * @param fingerprint string[] to group events in Sentry. | ||
| */ | ||
| setFingerprint(fingerprint: string[]): this; | ||
| /** | ||
| * Sets the level on the scope for future events. | ||
| * @param level string {@link Severity} | ||
| */ | ||
| setLevel(level: Severity): this; | ||
| /** Clears the current scope and resets its properties. */ | ||
| clear(): this; | ||
| /** | ||
| * Sets the breadcrumbs in the scope | ||
| * @param breadcrumbs Breadcrumb | ||
| * @param maxBreadcrumbs number of max breadcrumbs to merged into event. | ||
| */ | ||
| addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this; | ||
| /** | ||
| * Clears all currently set Breadcrumbs. | ||
| */ | ||
| clearBreadcrumbs(): this; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=scope.js.map |
| {"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { EventProcessor } from './eventprocessor';\nimport { Severity } from './severity';\nimport { User } from './user';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport interface Scope {\n /** Add new event processor that will be called after {@link applyToEvent}. */\n addEventProcessor(callback: EventProcessor): this;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context.\n */\n setUser(user: User): this;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): this;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): this;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: { [key: string]: any }): this;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n setExtra(key: string, extra: any): this;\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param fingerprint string[] to group events in Sentry.\n */\n setFingerprint(fingerprint: string[]): this;\n\n /**\n * Sets the level on the scope for future events.\n * @param level string {@link Severity}\n */\n setLevel(level: Severity): this;\n\n /** Clears the current scope and resets its properties. */\n clear(): this;\n\n /**\n * Sets the breadcrumbs in the scope\n * @param breadcrumbs Breadcrumb\n * @param maxBreadcrumbs number of max breadcrumbs to merged into event.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;\n\n /**\n * Clears all currently set Breadcrumbs.\n */\n clearBreadcrumbs(): this;\n}\n"]} |
| import { Package } from './package'; | ||
| /** JSDoc */ | ||
| export interface SdkInfo { | ||
| name: string; | ||
| version: string; | ||
| integrations?: string[]; | ||
| packages?: Package[]; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=sdkinfo.js.map |
| {"version":3,"file":"sdkinfo.js","sourceRoot":"","sources":["../src/sdkinfo.ts"],"names":[],"mappings":"","sourcesContent":["import { Package } from './package';\n\n/** JSDoc */\nexport interface SdkInfo {\n name: string;\n version: string;\n integrations?: string[];\n packages?: Package[];\n}\n"]} |
| /** JSDoc */ | ||
| export declare enum Severity { | ||
| /** JSDoc */ | ||
| Fatal = "fatal", | ||
| /** JSDoc */ | ||
| Error = "error", | ||
| /** JSDoc */ | ||
| Warning = "warning", | ||
| /** JSDoc */ | ||
| Log = "log", | ||
| /** JSDoc */ | ||
| Info = "info", | ||
| /** JSDoc */ | ||
| Debug = "debug", | ||
| /** JSDoc */ | ||
| Critical = "critical" | ||
| } | ||
| export declare namespace Severity { | ||
| /** | ||
| * Converts a string-based level into a {@link Severity}. | ||
| * | ||
| * @param level string representation of Severity | ||
| * @returns Severity | ||
| */ | ||
| function fromString(level: string): Severity; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| /** JSDoc */ | ||
| var Severity; | ||
| (function (Severity) { | ||
| /** JSDoc */ | ||
| Severity["Fatal"] = "fatal"; | ||
| /** JSDoc */ | ||
| Severity["Error"] = "error"; | ||
| /** JSDoc */ | ||
| Severity["Warning"] = "warning"; | ||
| /** JSDoc */ | ||
| Severity["Log"] = "log"; | ||
| /** JSDoc */ | ||
| Severity["Info"] = "info"; | ||
| /** JSDoc */ | ||
| Severity["Debug"] = "debug"; | ||
| /** JSDoc */ | ||
| Severity["Critical"] = "critical"; | ||
| })(Severity = exports.Severity || (exports.Severity = {})); | ||
| // tslint:disable:completed-docs | ||
| // tslint:disable:no-unnecessary-qualifier no-namespace | ||
| (function (Severity) { | ||
| /** | ||
| * Converts a string-based level into a {@link Severity}. | ||
| * | ||
| * @param level string representation of Severity | ||
| * @returns Severity | ||
| */ | ||
| function fromString(level) { | ||
| switch (level) { | ||
| case 'debug': | ||
| return Severity.Debug; | ||
| case 'info': | ||
| return Severity.Info; | ||
| case 'warn': | ||
| case 'warning': | ||
| return Severity.Warning; | ||
| case 'error': | ||
| return Severity.Error; | ||
| case 'fatal': | ||
| return Severity.Fatal; | ||
| case 'critical': | ||
| return Severity.Critical; | ||
| case 'log': | ||
| default: | ||
| return Severity.Log; | ||
| } | ||
| } | ||
| Severity.fromString = fromString; | ||
| })(Severity = exports.Severity || (exports.Severity = {})); | ||
| //# sourceMappingURL=severity.js.map |
| {"version":3,"file":"severity.js","sourceRoot":"","sources":["../src/severity.ts"],"names":[],"mappings":";;AAAA,YAAY;AACZ,IAAY,QAeX;AAfD,WAAY,QAAQ;IAClB,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,+BAAmB,CAAA;IACnB,YAAY;IACZ,uBAAW,CAAA;IACX,YAAY;IACZ,yBAAa,CAAA;IACb,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,iCAAqB,CAAA;AACvB,CAAC,EAfW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAenB;AACD,gCAAgC;AAChC,uDAAuD;AACvD,WAAiB,QAAQ;IACvB;;;;;OAKG;IACH,SAAgB,UAAU,CAAC,KAAa;QACtC,QAAQ,KAAK,EAAE;YACb,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,MAAM;gBACT,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,KAAK,MAAM,CAAC;YACZ,KAAK,SAAS;gBACZ,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC1B,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,UAAU;gBACb,OAAO,QAAQ,CAAC,QAAQ,CAAC;YAC3B,KAAK,KAAK,CAAC;YACX;gBACE,OAAO,QAAQ,CAAC,GAAG,CAAC;SACvB;IACH,CAAC;IAnBe,mBAAU,aAmBzB,CAAA;AACH,CAAC,EA3BgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA2BxB","sourcesContent":["/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n"]} |
| /** JSDoc */ | ||
| export interface Span { | ||
| /** JSDoc */ | ||
| toJSON(): object; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=span.js.map |
| {"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Span {\n /** JSDoc */\n toJSON(): object;\n}\n"]} |
| /** JSDoc */ | ||
| export interface StackFrame { | ||
| filename?: string; | ||
| function?: string; | ||
| module?: string; | ||
| platform?: string; | ||
| lineno?: number; | ||
| colno?: number; | ||
| abs_path?: string; | ||
| context_line?: string; | ||
| pre_context?: string[]; | ||
| post_context?: string[]; | ||
| in_app?: boolean; | ||
| vars?: { | ||
| [key: string]: any; | ||
| }; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=stackframe.js.map |
| {"version":3,"file":"stackframe.js","sourceRoot":"","sources":["../src/stackframe.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface StackFrame {\n filename?: string;\n function?: string;\n module?: string;\n platform?: string;\n lineno?: number;\n colno?: number;\n abs_path?: string;\n context_line?: string;\n pre_context?: string[];\n post_context?: string[];\n in_app?: boolean;\n vars?: { [key: string]: any };\n}\n"]} |
| import { StackFrame } from './stackframe'; | ||
| /** JSDoc */ | ||
| export interface Stacktrace { | ||
| frames?: StackFrame[]; | ||
| frames_omitted?: [number, number]; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=stacktrace.js.map |
| {"version":3,"file":"stacktrace.js","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"","sourcesContent":["import { StackFrame } from './stackframe';\n\n/** JSDoc */\nexport interface Stacktrace {\n frames?: StackFrame[];\n frames_omitted?: [number, number];\n}\n"]} |
| /** The status of an event. */ | ||
| export declare enum Status { | ||
| /** The status could not be determined. */ | ||
| Unknown = "unknown", | ||
| /** The event was skipped due to configuration or callbacks. */ | ||
| Skipped = "skipped", | ||
| /** The event was sent to Sentry successfully. */ | ||
| Success = "success", | ||
| /** The client is currently rate limited and will try again later. */ | ||
| RateLimit = "rate_limit", | ||
| /** The event could not be processed. */ | ||
| Invalid = "invalid", | ||
| /** A server-side error ocurred during submission. */ | ||
| Failed = "failed" | ||
| } | ||
| export declare namespace Status { | ||
| /** | ||
| * Converts a HTTP status code into a {@link Status}. | ||
| * | ||
| * @param code The HTTP response status code. | ||
| * @returns The send status or {@link Status.Unknown}. | ||
| */ | ||
| function fromHttpCode(code: number): Status; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| /** The status of an event. */ | ||
| var Status; | ||
| (function (Status) { | ||
| /** The status could not be determined. */ | ||
| Status["Unknown"] = "unknown"; | ||
| /** The event was skipped due to configuration or callbacks. */ | ||
| Status["Skipped"] = "skipped"; | ||
| /** The event was sent to Sentry successfully. */ | ||
| Status["Success"] = "success"; | ||
| /** The client is currently rate limited and will try again later. */ | ||
| Status["RateLimit"] = "rate_limit"; | ||
| /** The event could not be processed. */ | ||
| Status["Invalid"] = "invalid"; | ||
| /** A server-side error ocurred during submission. */ | ||
| Status["Failed"] = "failed"; | ||
| })(Status = exports.Status || (exports.Status = {})); | ||
| // tslint:disable:completed-docs | ||
| // tslint:disable:no-unnecessary-qualifier no-namespace | ||
| (function (Status) { | ||
| /** | ||
| * Converts a HTTP status code into a {@link Status}. | ||
| * | ||
| * @param code The HTTP response status code. | ||
| * @returns The send status or {@link Status.Unknown}. | ||
| */ | ||
| function fromHttpCode(code) { | ||
| if (code >= 200 && code < 300) { | ||
| return Status.Success; | ||
| } | ||
| if (code === 429) { | ||
| return Status.RateLimit; | ||
| } | ||
| if (code >= 400 && code < 500) { | ||
| return Status.Invalid; | ||
| } | ||
| if (code >= 500) { | ||
| return Status.Failed; | ||
| } | ||
| return Status.Unknown; | ||
| } | ||
| Status.fromHttpCode = fromHttpCode; | ||
| })(Status = exports.Status || (exports.Status = {})); | ||
| //# sourceMappingURL=status.js.map |
| {"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":";;AAAA,8BAA8B;AAC9B,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,0CAA0C;IAC1C,6BAAmB,CAAA;IACnB,+DAA+D;IAC/D,6BAAmB,CAAA;IACnB,iDAAiD;IACjD,6BAAmB,CAAA;IACnB,qEAAqE;IACrE,kCAAwB,CAAA;IACxB,wCAAwC;IACxC,6BAAmB,CAAA;IACnB,qDAAqD;IACrD,2BAAiB,CAAA;AACnB,CAAC,EAbW,MAAM,GAAN,cAAM,KAAN,cAAM,QAajB;AACD,gCAAgC;AAChC,uDAAuD;AACvD,WAAiB,MAAM;IACrB;;;;;OAKG;IACH,SAAgB,YAAY,CAAC,IAAY;QACvC,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,KAAK,GAAG,EAAE;YAChB,OAAO,MAAM,CAAC,SAAS,CAAC;SACzB;QAED,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,IAAI,GAAG,EAAE;YACf,OAAO,MAAM,CAAC,MAAM,CAAC;SACtB;QAED,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAlBe,mBAAY,eAkB3B,CAAA;AACH,CAAC,EA1BgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA0BtB","sourcesContent":["/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n"]} |
| import { Stacktrace } from './stacktrace'; | ||
| /** JSDoc */ | ||
| export interface Thread { | ||
| id?: number; | ||
| name?: string; | ||
| stacktrace?: Stacktrace; | ||
| crashed?: boolean; | ||
| current?: boolean; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=thread.js.map |
| {"version":3,"file":"thread.js","sourceRoot":"","sources":["../src/thread.ts"],"names":[],"mappings":"","sourcesContent":["import { Stacktrace } from './stacktrace';\n\n/** JSDoc */\nexport interface Thread {\n id?: number;\n name?: string;\n stacktrace?: Stacktrace;\n crashed?: boolean;\n current?: boolean;\n}\n"]} |
| import { DsnLike } from './dsn'; | ||
| import { Event } from './event'; | ||
| import { Response } from './response'; | ||
| /** Transport used sending data to Sentry */ | ||
| export interface Transport { | ||
| /** | ||
| * Sends the body to the Store endpoint in Sentry. | ||
| * | ||
| * @param body String body that should be sent to Sentry. | ||
| */ | ||
| sendEvent(event: Event): Promise<Response>; | ||
| /** | ||
| * Call this function to wait until all pending requests have been sent. | ||
| * | ||
| * @param timeout Number time in ms to wait until the buffer is drained. | ||
| */ | ||
| close(timeout?: number): Promise<boolean>; | ||
| } | ||
| /** JSDoc */ | ||
| export declare type TransportClass<T extends Transport> = new (options: TransportOptions) => T; | ||
| /** JSDoc */ | ||
| export interface TransportOptions { | ||
| [key: string]: any; | ||
| /** Sentry DSN */ | ||
| dsn: DsnLike; | ||
| /** Define custom headers */ | ||
| headers?: object; | ||
| /** Set a HTTP proxy that should be used for outbound requests. */ | ||
| httpProxy?: string; | ||
| /** Set a HTTPS proxy that should be used for outbound requests. */ | ||
| httpsProxy?: string; | ||
| /** HTTPS proxy certificates path */ | ||
| caCerts?: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=transport.js.map |
| {"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"","sourcesContent":["import { DsnLike } from './dsn';\nimport { Event } from './event';\nimport { Response } from './response';\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the body to the Store endpoint in Sentry.\n *\n * @param body String body that should be sent to Sentry.\n */\n sendEvent(event: Event): Promise<Response>;\n\n /**\n * Call this function to wait until all pending requests have been sent.\n *\n * @param timeout Number time in ms to wait until the buffer is drained.\n */\n close(timeout?: number): Promise<boolean>;\n}\n\n/** JSDoc */\nexport type TransportClass<T extends Transport> = new (options: TransportOptions) => T;\n\n/** JSDoc */\nexport interface TransportOptions {\n [key: string]: any;\n /** Sentry DSN */\n dsn: DsnLike;\n /** Define custom headers */\n headers?: object;\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n /** HTTPS proxy certificates path */\n caCerts?: string;\n}\n"]} |
| /** JSDoc */ | ||
| export interface User { | ||
| [key: string]: any; | ||
| id?: string; | ||
| ip_address?: string; | ||
| email?: string; | ||
| username?: string; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=user.js.map |
| {"version":3,"file":"user.js","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface User {\n [key: string]: any;\n id?: string;\n ip_address?: string;\n email?: string;\n username?: string;\n}\n"]} |
| /** JSDoc */ | ||
| export interface WrappedFunction extends Function { | ||
| [key: string]: any; | ||
| __sentry__?: boolean; | ||
| __sentry_wrapped__?: WrappedFunction; | ||
| __sentry_original__?: WrappedFunction; | ||
| } |
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| //# sourceMappingURL=wrappedfunction.js.map |
| {"version":3,"file":"wrappedfunction.js","sourceRoot":"","sources":["../src/wrappedfunction.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface WrappedFunction extends Function {\n [key: string]: any;\n __sentry__?: boolean;\n __sentry_wrapped__?: WrappedFunction;\n __sentry_original__?: WrappedFunction;\n}\n"]} |
| import { Severity } from './severity'; | ||
| /** JSDoc */ | ||
| export interface Breadcrumb { | ||
| type?: string; | ||
| level?: Severity; | ||
| event_id?: string; | ||
| category?: string; | ||
| message?: string; | ||
| data?: any; | ||
| timestamp?: number; | ||
| } | ||
| /** JSDoc */ | ||
| export interface BreadcrumbHint { | ||
| [key: string]: any; | ||
| } |
| //# sourceMappingURL=breadcrumb.js.map |
| {"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../src/breadcrumb.ts"],"names":[],"mappings":"","sourcesContent":["import { Severity } from './severity';\n\n/** JSDoc */\nexport interface Breadcrumb {\n type?: string;\n level?: Severity;\n event_id?: string;\n category?: string;\n message?: string;\n data?: any;\n timestamp?: number;\n}\n\n/** JSDoc */\nexport interface BreadcrumbHint {\n [key: string]: any;\n}\n"]} |
| import { Dsn } from './dsn'; | ||
| import { Event, EventHint } from './event'; | ||
| import { Integration, IntegrationClass } from './integration'; | ||
| import { Options } from './options'; | ||
| import { Scope } from './scope'; | ||
| import { Severity } from './severity'; | ||
| /** | ||
| * User-Facing Sentry SDK Client. | ||
| * | ||
| * This interface contains all methods to interface with the SDK once it has | ||
| * been installed. It allows to send events to Sentry, record breadcrumbs and | ||
| * set a context included in every event. Since the SDK mutates its environment, | ||
| * there will only be one instance during runtime. | ||
| * | ||
| */ | ||
| export interface Client<O extends Options = Options> { | ||
| /** | ||
| * Captures an exception event and sends it to Sentry. | ||
| * | ||
| * @param exception An exception-like object. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @param scope An optional scope containing event metadata. | ||
| * @returns The event id | ||
| */ | ||
| captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined; | ||
| /** | ||
| * Captures a message event and sends it to Sentry. | ||
| * | ||
| * @param message The message to send to Sentry. | ||
| * @param level Define the level of the message. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @param scope An optional scope containing event metadata. | ||
| * @returns The event id | ||
| */ | ||
| captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined; | ||
| /** | ||
| * Captures a manually created event and sends it to Sentry. | ||
| * | ||
| * @param event The event to send to Sentry. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @param scope An optional scope containing event metadata. | ||
| * @returns The event id | ||
| */ | ||
| captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined; | ||
| /** Returns the current Dsn. */ | ||
| getDsn(): Dsn | undefined; | ||
| /** Returns the current options. */ | ||
| getOptions(): O; | ||
| /** | ||
| * A promise that resolves when all current events have been sent. | ||
| * If you provide a timeout and the queue takes longer to drain the promise returns false. | ||
| * | ||
| * @param timeout Maximum time in ms the client should wait. | ||
| */ | ||
| close(timeout?: number): Promise<boolean>; | ||
| /** | ||
| * A promise that resolves when all current events have been sent. | ||
| * If you provide a timeout and the queue takes longer to drain the promise returns false. | ||
| * | ||
| * @param timeout Maximum time in ms the client should wait. | ||
| */ | ||
| flush(timeout?: number): Promise<boolean>; | ||
| /** Returns an array of installed integrations on the client. */ | ||
| getIntegration<T extends Integration>(integartion: IntegrationClass<T>): T | null; | ||
| } |
| //# sourceMappingURL=client.js.map |
| {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"","sourcesContent":["import { Dsn } from './dsn';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Options } from './options';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\n\n/**\n * User-Facing Sentry SDK Client.\n *\n * This interface contains all methods to interface with the SDK once it has\n * been installed. It allows to send events to Sentry, record breadcrumbs and\n * set a context included in every event. Since the SDK mutates its environment,\n * there will only be one instance during runtime.\n *\n */\nexport interface Client<O extends Options = Options> {\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureException(exception: any, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint, scope?: Scope): string | undefined;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope An optional scope containing event metadata.\n * @returns The event id\n */\n captureEvent(event: Event, hint?: EventHint, scope?: Scope): string | undefined;\n\n /** Returns the current Dsn. */\n getDsn(): Dsn | undefined;\n\n /** Returns the current options. */\n getOptions(): O;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n close(timeout?: number): Promise<boolean>;\n\n /**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\n flush(timeout?: number): Promise<boolean>;\n\n /** Returns an array of installed integrations on the client. */\n getIntegration<T extends Integration>(integartion: IntegrationClass<T>): T | null;\n}\n"]} |
+34
| /** Supported Sentry transport protocols in a Dsn. */ | ||
| export declare type DsnProtocol = 'http' | 'https'; | ||
| /** Primitive components of a Dsn. */ | ||
| export interface DsnComponents { | ||
| /** Protocol used to connect to Sentry. */ | ||
| protocol: DsnProtocol; | ||
| /** Public authorization key. */ | ||
| user: string; | ||
| /** private _authorization key (deprecated, optional). */ | ||
| pass?: string; | ||
| /** Hostname of the Sentry instance. */ | ||
| host: string; | ||
| /** Port of the Sentry instance. */ | ||
| port?: string; | ||
| /** Sub path/ */ | ||
| path?: string; | ||
| /** Project ID */ | ||
| projectId: string; | ||
| } | ||
| /** Anything that can be parsed into a Dsn. */ | ||
| export declare type DsnLike = string | DsnComponents; | ||
| /** The Sentry Dsn, identifying a Sentry instance and project. */ | ||
| export interface Dsn extends DsnComponents { | ||
| /** | ||
| * Renders the string representation of this Dsn. | ||
| * | ||
| * By default, this will render the public representation without the password | ||
| * component. To get the deprecated private _representation, set `withPassword` | ||
| * to true. | ||
| * | ||
| * @param withPassword When set to true, the password will be included. | ||
| */ | ||
| toString(withPassword: boolean): string; | ||
| } |
| //# sourceMappingURL=dsn.js.map |
| {"version":3,"file":"dsn.js","sourceRoot":"","sources":["../src/dsn.ts"],"names":[],"mappings":"","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key. */\n user: string;\n /** private _authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nexport interface Dsn extends DsnComponents {\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private _representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n toString(withPassword: boolean): string;\n}\n"]} |
| /** | ||
| * Just an Error object with arbitrary attributes attached to it. | ||
| */ | ||
| export interface ExtendedError extends Error { | ||
| [key: string]: any; | ||
| } |
| //# sourceMappingURL=error.js.map |
| {"version":3,"file":"error.js","sourceRoot":"","sources":["../src/error.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Just an Error object with arbitrary attributes attached to it.\n */\nexport interface ExtendedError extends Error {\n [key: string]: any;\n}\n"]} |
| import { Breadcrumb } from './breadcrumb'; | ||
| import { Exception } from './exception'; | ||
| import { Request } from './request'; | ||
| import { SdkInfo } from './sdkinfo'; | ||
| import { Severity } from './severity'; | ||
| import { Span } from './span'; | ||
| import { Stacktrace } from './stacktrace'; | ||
| import { User } from './user'; | ||
| /** JSDoc */ | ||
| export interface Event { | ||
| event_id?: string; | ||
| message?: string; | ||
| timestamp?: number; | ||
| level?: Severity; | ||
| platform?: string; | ||
| logger?: string; | ||
| server_name?: string; | ||
| release?: string; | ||
| dist?: string; | ||
| environment?: string; | ||
| sdk?: SdkInfo; | ||
| request?: Request; | ||
| transaction?: string; | ||
| modules?: { | ||
| [key: string]: string; | ||
| }; | ||
| fingerprint?: string[]; | ||
| exception?: { | ||
| values?: Exception[]; | ||
| }; | ||
| stacktrace?: Stacktrace; | ||
| breadcrumbs?: Breadcrumb[]; | ||
| contexts?: { | ||
| [key: string]: object; | ||
| }; | ||
| tags?: { | ||
| [key: string]: string; | ||
| }; | ||
| extra?: { | ||
| [key: string]: any; | ||
| }; | ||
| user?: User; | ||
| spans?: Span[]; | ||
| type?: EventType; | ||
| } | ||
| /** JSDoc */ | ||
| export declare type EventType = 'none'; | ||
| /** JSDoc */ | ||
| export interface EventHint { | ||
| event_id?: string; | ||
| syntheticException?: Error | null; | ||
| originalException?: Error | null; | ||
| data?: any; | ||
| } |
| //# sourceMappingURL=event.js.map |
| {"version":3,"file":"event.js","sourceRoot":"","sources":["../src/event.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { Exception } from './exception';\nimport { Request } from './request';\nimport { SdkInfo } from './sdkinfo';\nimport { Severity } from './severity';\nimport { Span } from './span';\nimport { Stacktrace } from './stacktrace';\nimport { User } from './user';\n\n/** JSDoc */\nexport interface Event {\n event_id?: string;\n message?: string;\n timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: Exception[];\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: { [key: string]: object };\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n user?: User;\n spans?: Span[];\n type?: EventType;\n}\n\n/** JSDoc */\nexport type EventType = 'none';\n\n/** JSDoc */\nexport interface EventHint {\n event_id?: string;\n syntheticException?: Error | null;\n originalException?: Error | null;\n data?: any;\n}\n"]} |
| import { Event, EventHint } from './event'; | ||
| /** | ||
| * Event processors are used to change the event before it will be send. | ||
| * We strongly advise to make this function sync. | ||
| * Returning a Promise<Event | null> will work just fine, but better be sure that you know what you are doing. | ||
| * Event processing will be deferred until your Promise is resolved. | ||
| */ | ||
| export declare type EventProcessor = (event: Event, hint?: EventHint) => Promise<Event | null> | Event | null; |
| //# sourceMappingURL=eventprocessor.js.map |
| {"version":3,"file":"eventprocessor.js","sourceRoot":"","sources":["../src/eventprocessor.ts"],"names":[],"mappings":"","sourcesContent":["import { Event, EventHint } from './event';\n\n/**\n * Event processors are used to change the event before it will be send.\n * We strongly advise to make this function sync.\n * Returning a Promise<Event | null> will work just fine, but better be sure that you know what you are doing.\n * Event processing will be deferred until your Promise is resolved.\n */\nexport type EventProcessor = (event: Event, hint?: EventHint) => Promise<Event | null> | Event | null;\n"]} |
| import { Mechanism } from './mechanism'; | ||
| import { Stacktrace } from './stacktrace'; | ||
| /** JSDoc */ | ||
| export interface Exception { | ||
| type?: string; | ||
| value?: string; | ||
| mechanism?: Mechanism; | ||
| module?: string; | ||
| thread_id?: number; | ||
| stacktrace?: Stacktrace; | ||
| } |
| //# sourceMappingURL=exception.js.map |
| {"version":3,"file":"exception.js","sourceRoot":"","sources":["../src/exception.ts"],"names":[],"mappings":"","sourcesContent":["import { Mechanism } from './mechanism';\nimport { Stacktrace } from './stacktrace';\n\n/** JSDoc */\nexport interface Exception {\n type?: string;\n value?: string;\n mechanism?: Mechanism;\n module?: string;\n thread_id?: number;\n stacktrace?: Stacktrace;\n}\n"]} |
+115
| import { Breadcrumb, BreadcrumbHint } from './breadcrumb'; | ||
| import { Client } from './client'; | ||
| import { Event, EventHint } from './event'; | ||
| import { Integration, IntegrationClass } from './integration'; | ||
| import { Scope } from './scope'; | ||
| import { Severity } from './severity'; | ||
| /** | ||
| * Internal class used to make sure we always have the latest internal functions | ||
| * working in case we have a version conflict. | ||
| */ | ||
| export interface Hub { | ||
| /** | ||
| * Checks if this hub's version is older than the given version. | ||
| * | ||
| * @param version A version number to compare to. | ||
| * @return True if the given version is newer; otherwise false. | ||
| * | ||
| * @hidden | ||
| */ | ||
| isOlderThan(version: number): boolean; | ||
| /** | ||
| * This binds the given client to the current scope. | ||
| * @param client An SDK client (client) instance. | ||
| */ | ||
| bindClient(client?: Client): void; | ||
| /** | ||
| * Create a new scope to store context information. | ||
| * | ||
| * The scope will be layered on top of the current one. It is isolated, i.e. all | ||
| * breadcrumbs and context information added to this scope will be removed once | ||
| * the scope ends. Be sure to always remove this scope with {@link this.popScope} | ||
| * when the operation finishes or throws. | ||
| * | ||
| * @returns Scope, the new cloned scope | ||
| */ | ||
| pushScope(): Scope; | ||
| /** | ||
| * Removes a previously pushed scope from the stack. | ||
| * | ||
| * This restores the state before the scope was pushed. All breadcrumbs and | ||
| * context information added since the last call to {@link this.pushScope} are | ||
| * discarded. | ||
| */ | ||
| popScope(): boolean; | ||
| /** | ||
| * Creates a new scope with and executes the given operation within. | ||
| * The scope is automatically removed once the operation | ||
| * finishes or throws. | ||
| * | ||
| * This is essentially a convenience function for: | ||
| * | ||
| * pushScope(); | ||
| * callback(); | ||
| * popScope(); | ||
| * | ||
| * @param callback that will be enclosed into push/popScope. | ||
| */ | ||
| withScope(callback: (scope: Scope) => void): void; | ||
| /** Returns the client of the top stack. */ | ||
| getClient(): Client | undefined; | ||
| /** | ||
| * Captures an exception event and sends it to Sentry. | ||
| * | ||
| * @param exception An exception-like object. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @returns The generated eventId. | ||
| */ | ||
| captureException(exception: any, hint?: EventHint): string; | ||
| /** | ||
| * Captures a message event and sends it to Sentry. | ||
| * | ||
| * @param message The message to send to Sentry. | ||
| * @param level Define the level of the message. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @returns The generated eventId. | ||
| */ | ||
| captureMessage(message: string, level?: Severity, hint?: EventHint): string; | ||
| /** | ||
| * Captures a manually created event and sends it to Sentry. | ||
| * | ||
| * @param event The event to send to Sentry. | ||
| * @param hint May contain additional information about the original exception. | ||
| */ | ||
| captureEvent(event: Event, hint?: EventHint): string; | ||
| /** | ||
| * This is the getter for lastEventId. | ||
| * | ||
| * @returns The last event id of a captured event. | ||
| */ | ||
| lastEventId(): string | undefined; | ||
| /** | ||
| * Records a new breadcrumb which will be attached to future events. | ||
| * | ||
| * Breadcrumbs will be added to subsequent events to provide more context on | ||
| * user's actions prior to an error or crash. | ||
| * | ||
| * @param breadcrumb The breadcrumb to record. | ||
| * @param hint May contain additional information about the original breadcrumb. | ||
| */ | ||
| addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void; | ||
| /** | ||
| * Callback to set context information onto the scope. | ||
| * | ||
| * @param callback Callback function that receives Scope. | ||
| */ | ||
| configureScope(callback: (scope: Scope) => void): void; | ||
| /** | ||
| * For the duraction of the callback, this hub will be set as the global current Hub. | ||
| * This function is useful if you want to run your own client and hook into an already initialized one | ||
| * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration. | ||
| */ | ||
| run(callback: (hub: Hub) => void): void; | ||
| /** Returns the integration if installed on the current client. */ | ||
| getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null; | ||
| } |
| //# sourceMappingURL=hub.js.map |
| {"version":3,"file":"hub.js","sourceRoot":"","sources":["../src/hub.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Client } from './client';\nimport { Event, EventHint } from './event';\nimport { Integration, IntegrationClass } from './integration';\nimport { Scope } from './scope';\nimport { Severity } from './severity';\n\n/**\n * Internal class used to make sure we always have the latest internal functions\n * working in case we have a version conflict.\n */\nexport interface Hub {\n /**\n * Checks if this hub's version is older than the given version.\n *\n * @param version A version number to compare to.\n * @return True if the given version is newer; otherwise false.\n *\n * @hidden\n */\n isOlderThan(version: number): boolean;\n\n /**\n * This binds the given client to the current scope.\n * @param client An SDK client (client) instance.\n */\n bindClient(client?: Client): void;\n\n /**\n * Create a new scope to store context information.\n *\n * The scope will be layered on top of the current one. It is isolated, i.e. all\n * breadcrumbs and context information added to this scope will be removed once\n * the scope ends. Be sure to always remove this scope with {@link this.popScope}\n * when the operation finishes or throws.\n *\n * @returns Scope, the new cloned scope\n */\n pushScope(): Scope;\n\n /**\n * Removes a previously pushed scope from the stack.\n *\n * This restores the state before the scope was pushed. All breadcrumbs and\n * context information added since the last call to {@link this.pushScope} are\n * discarded.\n */\n popScope(): boolean;\n\n /**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\n withScope(callback: (scope: Scope) => void): void;\n\n /** Returns the client of the top stack. */\n getClient(): Client | undefined;\n\n /**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureException(exception: any, hint?: EventHint): string;\n\n /**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @param hint May contain additional information about the original exception.\n * @returns The generated eventId.\n */\n captureMessage(message: string, level?: Severity, hint?: EventHint): string;\n\n /**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n */\n captureEvent(event: Event, hint?: EventHint): string;\n\n /**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\n lastEventId(): string | undefined;\n\n /**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n * @param hint May contain additional information about the original breadcrumb.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): void;\n /**\n * Callback to set context information onto the scope.\n *\n * @param callback Callback function that receives Scope.\n */\n configureScope(callback: (scope: Scope) => void): void;\n\n /**\n * For the duraction of the callback, this hub will be set as the global current Hub.\n * This function is useful if you want to run your own client and hook into an already initialized one\n * e.g.: Reporting issues to your own sentry when running in your component while still using the users configuration.\n */\n run(callback: (hub: Hub) => void): void;\n\n /** Returns the integration if installed on the current client. */\n getIntegration<T extends Integration>(integration: IntegrationClass<T>): T | null;\n}\n"]} |
| import { EventProcessor } from './eventprocessor'; | ||
| import { Hub } from './hub'; | ||
| /** Integration Class Interface */ | ||
| export interface IntegrationClass<T> { | ||
| new (): T; | ||
| /** | ||
| * Property that holds the integration name | ||
| */ | ||
| id: string; | ||
| } | ||
| /** Integration interface */ | ||
| export interface Integration { | ||
| /** | ||
| * Returns {@link IntegrationClass.id} | ||
| */ | ||
| name: string; | ||
| /** | ||
| * Sets the integration up only once. | ||
| * This takes no options on purpose, options should be passed in the constructor | ||
| */ | ||
| setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void; | ||
| } |
| //# sourceMappingURL=integration.js.map |
| {"version":3,"file":"integration.js","sourceRoot":"","sources":["../src/integration.ts"],"names":[],"mappings":"","sourcesContent":["import { EventProcessor } from './eventprocessor';\nimport { Hub } from './hub';\n\n/** Integration Class Interface */\nexport interface IntegrationClass<T> {\n new (): T;\n /**\n * Property that holds the integration name\n */\n id: string;\n}\n\n/** Integration interface */\nexport interface Integration {\n /**\n * Returns {@link IntegrationClass.id}\n */\n name: string;\n\n /**\n * Sets the integration up only once.\n * This takes no options on purpose, options should be passed in the constructor\n */\n setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;\n}\n"]} |
| /** Console logging verbosity for the SDK. */ | ||
| export declare enum LogLevel { | ||
| /** No logs will be generated. */ | ||
| None = 0, | ||
| /** Only SDK internal errors will be logged. */ | ||
| Error = 1, | ||
| /** Information useful for debugging the SDK will be logged. */ | ||
| Debug = 2, | ||
| /** All SDK actions will be logged. */ | ||
| Verbose = 3 | ||
| } |
| /** Console logging verbosity for the SDK. */ | ||
| export var LogLevel; | ||
| (function (LogLevel) { | ||
| /** No logs will be generated. */ | ||
| LogLevel[LogLevel["None"] = 0] = "None"; | ||
| /** Only SDK internal errors will be logged. */ | ||
| LogLevel[LogLevel["Error"] = 1] = "Error"; | ||
| /** Information useful for debugging the SDK will be logged. */ | ||
| LogLevel[LogLevel["Debug"] = 2] = "Debug"; | ||
| /** All SDK actions will be logged. */ | ||
| LogLevel[LogLevel["Verbose"] = 3] = "Verbose"; | ||
| })(LogLevel || (LogLevel = {})); | ||
| //# sourceMappingURL=loglevel.js.map |
| {"version":3,"file":"loglevel.js","sourceRoot":"","sources":["../src/loglevel.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,MAAM,CAAN,IAAY,QASX;AATD,WAAY,QAAQ;IAClB,iCAAiC;IACjC,uCAAQ,CAAA;IACR,+CAA+C;IAC/C,yCAAS,CAAA;IACT,+DAA+D;IAC/D,yCAAS,CAAA;IACT,sCAAsC;IACtC,6CAAW,CAAA;AACb,CAAC,EATW,QAAQ,KAAR,QAAQ,QASnB","sourcesContent":["/** Console logging verbosity for the SDK. */\nexport enum LogLevel {\n /** No logs will be generated. */\n None = 0,\n /** Only SDK internal errors will be logged. */\n Error = 1,\n /** Information useful for debugging the SDK will be logged. */\n Debug = 2,\n /** All SDK actions will be logged. */\n Verbose = 3,\n}\n"]} |
| /** JSDoc */ | ||
| export interface Mechanism { | ||
| type: string; | ||
| handled: boolean; | ||
| data?: { | ||
| [key: string]: string; | ||
| }; | ||
| synthetic?: boolean; | ||
| } |
| //# sourceMappingURL=mechanism.js.map |
| {"version":3,"file":"mechanism.js","sourceRoot":"","sources":["../src/mechanism.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Mechanism {\n type: string;\n handled: boolean;\n data?: {\n [key: string]: string;\n };\n synthetic?: boolean;\n}\n"]} |
| import { Breadcrumb, BreadcrumbHint } from './breadcrumb'; | ||
| import { Event, EventHint } from './event'; | ||
| import { Integration } from './integration'; | ||
| import { LogLevel } from './loglevel'; | ||
| import { Transport, TransportClass, TransportOptions } from './transport'; | ||
| /** Base configuration options for every SDK. */ | ||
| export interface Options { | ||
| /** | ||
| * Enable debug functionality in the SDK itself | ||
| */ | ||
| debug?: boolean; | ||
| /** | ||
| * Specifies whether this SDK should activate and send events to Sentry. | ||
| * Disabling the SDK reduces all overhead from instrumentation, collecting | ||
| * breadcrumbs and capturing events. Defaults to true. | ||
| */ | ||
| enabled?: boolean; | ||
| /** | ||
| * The Dsn used to connect to Sentry and identify the project. If omitted, the | ||
| * SDK will not send any data to Sentry. | ||
| */ | ||
| dsn?: string; | ||
| /** | ||
| * If this is set to false, default integrations will not be added, otherwise this will internally be set to the | ||
| * recommended default integrations. | ||
| */ | ||
| defaultIntegrations?: false | Integration[]; | ||
| /** | ||
| * List of integrations that should be installed after SDK was initialized. | ||
| * Accepts either a list of integrations or a function that receives | ||
| * default integrations and returns a new, updated list. | ||
| */ | ||
| integrations?: Integration[] | ((integrations: Integration[]) => Integration[]); | ||
| /** | ||
| * A pattern for error messages which should not be sent to Sentry. | ||
| * By default, all errors will be sent. | ||
| */ | ||
| ignoreErrors?: Array<string | RegExp>; | ||
| /** | ||
| * Transport object that should be used to send events to Sentry | ||
| */ | ||
| transport?: TransportClass<Transport>; | ||
| /** | ||
| * Options for the default transport that the SDK uses. | ||
| */ | ||
| transportOptions?: TransportOptions; | ||
| /** | ||
| * The release identifier used when uploading respective source maps. Specify | ||
| * this value to allow Sentry to resolve the correct source maps when | ||
| * processing events. | ||
| */ | ||
| release?: string; | ||
| /** The current environment of your application (e.g. "production"). */ | ||
| environment?: string; | ||
| /** Sets the distribution for all events */ | ||
| dist?: string; | ||
| /** The maximum number of breadcrumbs sent with events. Defaults to 100. */ | ||
| maxBreadcrumbs?: number; | ||
| /** Console logging verbosity for the SDK Client. */ | ||
| logLevel?: LogLevel; | ||
| /** A global sample rate to apply to all events (0 - 1). */ | ||
| sampleRate?: number; | ||
| /** Attaches stacktraces to pure capture message / log integrations */ | ||
| attachStacktrace?: boolean; | ||
| /** Maxium number of chars a single value can have before it will be truncated. */ | ||
| maxValueLength?: number; | ||
| /** | ||
| * A callback invoked during event submission, allowing to optionally modify | ||
| * the event before it is sent to Sentry. | ||
| * | ||
| * Note that you must return a valid event from this callback. If you do not | ||
| * wish to modify the event, simply return it at the end. | ||
| * Returning null will case the event to be dropped. | ||
| * | ||
| * @param event The error or message event generated by the SDK. | ||
| * @param hint May contain additional information about the original exception. | ||
| * @returns A new event that will be sent | null. | ||
| */ | ||
| beforeSend?(event: Event, hint?: EventHint): Promise<Event | null> | Event | null; | ||
| /** | ||
| * A callback invoked when adding a breadcrumb, allowing to optionally modify | ||
| * it before adding it to future events. | ||
| * | ||
| * Note that you must return a valid breadcrumb from this callback. If you do | ||
| * not wish to modify the breadcrumb, simply return it at the end. | ||
| * Returning null will case the breadcrumb to be dropped. | ||
| * | ||
| * @param breadcrumb The breadcrumb as created by the SDK. | ||
| * @returns The breadcrumb that will be added | null. | ||
| */ | ||
| beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null; | ||
| } |
| //# sourceMappingURL=options.js.map |
| {"version":3,"file":"options.js","sourceRoot":"","sources":["../src/options.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nimport { Event, EventHint } from './event';\nimport { Integration } from './integration';\nimport { LogLevel } from './loglevel';\nimport { Transport, TransportClass, TransportOptions } from './transport';\n\n/** Base configuration options for every SDK. */\nexport interface Options {\n /**\n * Enable debug functionality in the SDK itself\n */\n debug?: boolean;\n\n /**\n * Specifies whether this SDK should activate and send events to Sentry.\n * Disabling the SDK reduces all overhead from instrumentation, collecting\n * breadcrumbs and capturing events. Defaults to true.\n */\n enabled?: boolean;\n\n /**\n * The Dsn used to connect to Sentry and identify the project. If omitted, the\n * SDK will not send any data to Sentry.\n */\n dsn?: string;\n\n /**\n * If this is set to false, default integrations will not be added, otherwise this will internally be set to the\n * recommended default integrations.\n */\n defaultIntegrations?: false | Integration[];\n\n /**\n * List of integrations that should be installed after SDK was initialized.\n * Accepts either a list of integrations or a function that receives\n * default integrations and returns a new, updated list.\n */\n integrations?: Integration[] | ((integrations: Integration[]) => Integration[]);\n\n /**\n * A pattern for error messages which should not be sent to Sentry.\n * By default, all errors will be sent.\n */\n ignoreErrors?: Array<string | RegExp>;\n\n /**\n * Transport object that should be used to send events to Sentry\n */\n transport?: TransportClass<Transport>;\n\n /**\n * Options for the default transport that the SDK uses.\n */\n transportOptions?: TransportOptions;\n\n /**\n * The release identifier used when uploading respective source maps. Specify\n * this value to allow Sentry to resolve the correct source maps when\n * processing events.\n */\n release?: string;\n\n /** The current environment of your application (e.g. \"production\"). */\n environment?: string;\n\n /** Sets the distribution for all events */\n dist?: string;\n\n /** The maximum number of breadcrumbs sent with events. Defaults to 100. */\n maxBreadcrumbs?: number;\n\n /** Console logging verbosity for the SDK Client. */\n logLevel?: LogLevel;\n\n /** A global sample rate to apply to all events (0 - 1). */\n sampleRate?: number;\n\n /** Attaches stacktraces to pure capture message / log integrations */\n attachStacktrace?: boolean;\n\n /** Maxium number of chars a single value can have before it will be truncated. */\n maxValueLength?: number;\n\n /**\n * A callback invoked during event submission, allowing to optionally modify\n * the event before it is sent to Sentry.\n *\n * Note that you must return a valid event from this callback. If you do not\n * wish to modify the event, simply return it at the end.\n * Returning null will case the event to be dropped.\n *\n * @param event The error or message event generated by the SDK.\n * @param hint May contain additional information about the original exception.\n * @returns A new event that will be sent | null.\n */\n beforeSend?(event: Event, hint?: EventHint): Promise<Event | null> | Event | null;\n\n /**\n * A callback invoked when adding a breadcrumb, allowing to optionally modify\n * it before adding it to future events.\n *\n * Note that you must return a valid breadcrumb from this callback. If you do\n * not wish to modify the breadcrumb, simply return it at the end.\n * Returning null will case the breadcrumb to be dropped.\n *\n * @param breadcrumb The breadcrumb as created by the SDK.\n * @returns The breadcrumb that will be added | null.\n */\n beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null;\n}\n"]} |
| /** JSDoc */ | ||
| export interface Package { | ||
| name: string; | ||
| version: string; | ||
| } |
| //# sourceMappingURL=package.js.map |
| {"version":3,"file":"package.js","sourceRoot":"","sources":["../src/package.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Package {\n name: string;\n version: string;\n}\n"]} |
| /** JSDoc */ | ||
| export interface Request { | ||
| url?: string; | ||
| method?: string; | ||
| data?: any; | ||
| query_string?: string; | ||
| cookies?: { | ||
| [key: string]: string; | ||
| }; | ||
| env?: { | ||
| [key: string]: string; | ||
| }; | ||
| headers?: { | ||
| [key: string]: string; | ||
| }; | ||
| } |
| //# sourceMappingURL=request.js.map |
| {"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Request {\n url?: string;\n method?: string;\n data?: any;\n query_string?: string;\n cookies?: { [key: string]: string };\n env?: { [key: string]: string };\n headers?: { [key: string]: string };\n}\n"]} |
| import { Event } from './event'; | ||
| import { Status } from './status'; | ||
| /** JSDoc */ | ||
| export interface Response { | ||
| status: Status; | ||
| event?: Event; | ||
| reason?: string; | ||
| } |
| //# sourceMappingURL=response.js.map |
| {"version":3,"file":"response.js","sourceRoot":"","sources":["../src/response.ts"],"names":[],"mappings":"","sourcesContent":["import { Event } from './event';\nimport { Status } from './status';\n\n/** JSDoc */\nexport interface Response {\n status: Status;\n event?: Event;\n reason?: string;\n}\n"]} |
| import { Breadcrumb } from './breadcrumb'; | ||
| import { EventProcessor } from './eventprocessor'; | ||
| import { Severity } from './severity'; | ||
| import { User } from './user'; | ||
| /** | ||
| * Holds additional event information. {@link Scope.applyToEvent} will be | ||
| * called by the client before an event will be sent. | ||
| */ | ||
| export interface Scope { | ||
| /** Add new event processor that will be called after {@link applyToEvent}. */ | ||
| addEventProcessor(callback: EventProcessor): this; | ||
| /** | ||
| * Updates user context information for future events. | ||
| * | ||
| * @param user User context object to be set in the current context. | ||
| */ | ||
| setUser(user: User): this; | ||
| /** | ||
| * Set an object that will be merged sent as tags data with the event. | ||
| * @param tags Tags context object to merge into current context. | ||
| */ | ||
| setTags(tags: { | ||
| [key: string]: string; | ||
| }): this; | ||
| /** | ||
| * Set key:value that will be sent as tags data with the event. | ||
| * @param key String key of tag | ||
| * @param value String value of tag | ||
| */ | ||
| setTag(key: string, value: string): this; | ||
| /** | ||
| * Set an object that will be merged sent as extra data with the event. | ||
| * @param extras Extras object to merge into current context. | ||
| */ | ||
| setExtras(extras: { | ||
| [key: string]: any; | ||
| }): this; | ||
| /** | ||
| * Set key:value that will be sent as extra data with the event. | ||
| * @param key String of extra | ||
| * @param extra Any kind of data. This data will be normailzed. | ||
| */ | ||
| setExtra(key: string, extra: any): this; | ||
| /** | ||
| * Sets the fingerprint on the scope to send with the events. | ||
| * @param fingerprint string[] to group events in Sentry. | ||
| */ | ||
| setFingerprint(fingerprint: string[]): this; | ||
| /** | ||
| * Sets the level on the scope for future events. | ||
| * @param level string {@link Severity} | ||
| */ | ||
| setLevel(level: Severity): this; | ||
| /** Clears the current scope and resets its properties. */ | ||
| clear(): this; | ||
| /** | ||
| * Sets the breadcrumbs in the scope | ||
| * @param breadcrumbs Breadcrumb | ||
| * @param maxBreadcrumbs number of max breadcrumbs to merged into event. | ||
| */ | ||
| addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this; | ||
| /** | ||
| * Clears all currently set Breadcrumbs. | ||
| */ | ||
| clearBreadcrumbs(): this; | ||
| } |
| //# sourceMappingURL=scope.js.map |
| {"version":3,"file":"scope.js","sourceRoot":"","sources":["../src/scope.ts"],"names":[],"mappings":"","sourcesContent":["import { Breadcrumb } from './breadcrumb';\nimport { EventProcessor } from './eventprocessor';\nimport { Severity } from './severity';\nimport { User } from './user';\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nexport interface Scope {\n /** Add new event processor that will be called after {@link applyToEvent}. */\n addEventProcessor(callback: EventProcessor): this;\n\n /**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context.\n */\n setUser(user: User): this;\n\n /**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\n setTags(tags: { [key: string]: string }): this;\n\n /**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\n setTag(key: string, value: string): this;\n\n /**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\n setExtras(extras: { [key: string]: any }): this;\n\n /**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normailzed.\n */\n setExtra(key: string, extra: any): this;\n\n /**\n * Sets the fingerprint on the scope to send with the events.\n * @param fingerprint string[] to group events in Sentry.\n */\n setFingerprint(fingerprint: string[]): this;\n\n /**\n * Sets the level on the scope for future events.\n * @param level string {@link Severity}\n */\n setLevel(level: Severity): this;\n\n /** Clears the current scope and resets its properties. */\n clear(): this;\n\n /**\n * Sets the breadcrumbs in the scope\n * @param breadcrumbs Breadcrumb\n * @param maxBreadcrumbs number of max breadcrumbs to merged into event.\n */\n addBreadcrumb(breadcrumb: Breadcrumb, maxBreadcrumbs?: number): this;\n\n /**\n * Clears all currently set Breadcrumbs.\n */\n clearBreadcrumbs(): this;\n}\n"]} |
| import { Package } from './package'; | ||
| /** JSDoc */ | ||
| export interface SdkInfo { | ||
| name: string; | ||
| version: string; | ||
| integrations?: string[]; | ||
| packages?: Package[]; | ||
| } |
| //# sourceMappingURL=sdkinfo.js.map |
| {"version":3,"file":"sdkinfo.js","sourceRoot":"","sources":["../src/sdkinfo.ts"],"names":[],"mappings":"","sourcesContent":["import { Package } from './package';\n\n/** JSDoc */\nexport interface SdkInfo {\n name: string;\n version: string;\n integrations?: string[];\n packages?: Package[];\n}\n"]} |
| /** JSDoc */ | ||
| export declare enum Severity { | ||
| /** JSDoc */ | ||
| Fatal = "fatal", | ||
| /** JSDoc */ | ||
| Error = "error", | ||
| /** JSDoc */ | ||
| Warning = "warning", | ||
| /** JSDoc */ | ||
| Log = "log", | ||
| /** JSDoc */ | ||
| Info = "info", | ||
| /** JSDoc */ | ||
| Debug = "debug", | ||
| /** JSDoc */ | ||
| Critical = "critical" | ||
| } | ||
| export declare namespace Severity { | ||
| /** | ||
| * Converts a string-based level into a {@link Severity}. | ||
| * | ||
| * @param level string representation of Severity | ||
| * @returns Severity | ||
| */ | ||
| function fromString(level: string): Severity; | ||
| } |
| /** JSDoc */ | ||
| export var Severity; | ||
| (function (Severity) { | ||
| /** JSDoc */ | ||
| Severity["Fatal"] = "fatal"; | ||
| /** JSDoc */ | ||
| Severity["Error"] = "error"; | ||
| /** JSDoc */ | ||
| Severity["Warning"] = "warning"; | ||
| /** JSDoc */ | ||
| Severity["Log"] = "log"; | ||
| /** JSDoc */ | ||
| Severity["Info"] = "info"; | ||
| /** JSDoc */ | ||
| Severity["Debug"] = "debug"; | ||
| /** JSDoc */ | ||
| Severity["Critical"] = "critical"; | ||
| })(Severity || (Severity = {})); | ||
| // tslint:disable:completed-docs | ||
| // tslint:disable:no-unnecessary-qualifier no-namespace | ||
| (function (Severity) { | ||
| /** | ||
| * Converts a string-based level into a {@link Severity}. | ||
| * | ||
| * @param level string representation of Severity | ||
| * @returns Severity | ||
| */ | ||
| function fromString(level) { | ||
| switch (level) { | ||
| case 'debug': | ||
| return Severity.Debug; | ||
| case 'info': | ||
| return Severity.Info; | ||
| case 'warn': | ||
| case 'warning': | ||
| return Severity.Warning; | ||
| case 'error': | ||
| return Severity.Error; | ||
| case 'fatal': | ||
| return Severity.Fatal; | ||
| case 'critical': | ||
| return Severity.Critical; | ||
| case 'log': | ||
| default: | ||
| return Severity.Log; | ||
| } | ||
| } | ||
| Severity.fromString = fromString; | ||
| })(Severity || (Severity = {})); | ||
| //# sourceMappingURL=severity.js.map |
| {"version":3,"file":"severity.js","sourceRoot":"","sources":["../src/severity.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,MAAM,CAAN,IAAY,QAeX;AAfD,WAAY,QAAQ;IAClB,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,+BAAmB,CAAA;IACnB,YAAY;IACZ,uBAAW,CAAA;IACX,YAAY;IACZ,yBAAa,CAAA;IACb,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,iCAAqB,CAAA;AACvB,CAAC,EAfW,QAAQ,KAAR,QAAQ,QAenB;AACD,gCAAgC;AAChC,uDAAuD;AACvD,WAAiB,QAAQ;IACvB;;;;;OAKG;IACH,SAAgB,UAAU,CAAC,KAAa;QACtC,QAAQ,KAAK,EAAE;YACb,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,MAAM;gBACT,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,KAAK,MAAM,CAAC;YACZ,KAAK,SAAS;gBACZ,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC1B,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,UAAU;gBACb,OAAO,QAAQ,CAAC,QAAQ,CAAC;YAC3B,KAAK,KAAK,CAAC;YACX;gBACE,OAAO,QAAQ,CAAC,GAAG,CAAC;SACvB;IACH,CAAC;IAnBe,mBAAU,aAmBzB,CAAA;AACH,CAAC,EA3BgB,QAAQ,KAAR,QAAQ,QA2BxB","sourcesContent":["/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n"]} |
| /** JSDoc */ | ||
| export interface Span { | ||
| /** JSDoc */ | ||
| toJSON(): object; | ||
| } |
| //# sourceMappingURL=span.js.map |
| {"version":3,"file":"span.js","sourceRoot":"","sources":["../src/span.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface Span {\n /** JSDoc */\n toJSON(): object;\n}\n"]} |
| /** JSDoc */ | ||
| export interface StackFrame { | ||
| filename?: string; | ||
| function?: string; | ||
| module?: string; | ||
| platform?: string; | ||
| lineno?: number; | ||
| colno?: number; | ||
| abs_path?: string; | ||
| context_line?: string; | ||
| pre_context?: string[]; | ||
| post_context?: string[]; | ||
| in_app?: boolean; | ||
| vars?: { | ||
| [key: string]: any; | ||
| }; | ||
| } |
| //# sourceMappingURL=stackframe.js.map |
| {"version":3,"file":"stackframe.js","sourceRoot":"","sources":["../src/stackframe.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface StackFrame {\n filename?: string;\n function?: string;\n module?: string;\n platform?: string;\n lineno?: number;\n colno?: number;\n abs_path?: string;\n context_line?: string;\n pre_context?: string[];\n post_context?: string[];\n in_app?: boolean;\n vars?: { [key: string]: any };\n}\n"]} |
| import { StackFrame } from './stackframe'; | ||
| /** JSDoc */ | ||
| export interface Stacktrace { | ||
| frames?: StackFrame[]; | ||
| frames_omitted?: [number, number]; | ||
| } |
| //# sourceMappingURL=stacktrace.js.map |
| {"version":3,"file":"stacktrace.js","sourceRoot":"","sources":["../src/stacktrace.ts"],"names":[],"mappings":"","sourcesContent":["import { StackFrame } from './stackframe';\n\n/** JSDoc */\nexport interface Stacktrace {\n frames?: StackFrame[];\n frames_omitted?: [number, number];\n}\n"]} |
| /** The status of an event. */ | ||
| export declare enum Status { | ||
| /** The status could not be determined. */ | ||
| Unknown = "unknown", | ||
| /** The event was skipped due to configuration or callbacks. */ | ||
| Skipped = "skipped", | ||
| /** The event was sent to Sentry successfully. */ | ||
| Success = "success", | ||
| /** The client is currently rate limited and will try again later. */ | ||
| RateLimit = "rate_limit", | ||
| /** The event could not be processed. */ | ||
| Invalid = "invalid", | ||
| /** A server-side error ocurred during submission. */ | ||
| Failed = "failed" | ||
| } | ||
| export declare namespace Status { | ||
| /** | ||
| * Converts a HTTP status code into a {@link Status}. | ||
| * | ||
| * @param code The HTTP response status code. | ||
| * @returns The send status or {@link Status.Unknown}. | ||
| */ | ||
| function fromHttpCode(code: number): Status; | ||
| } |
| /** The status of an event. */ | ||
| export var Status; | ||
| (function (Status) { | ||
| /** The status could not be determined. */ | ||
| Status["Unknown"] = "unknown"; | ||
| /** The event was skipped due to configuration or callbacks. */ | ||
| Status["Skipped"] = "skipped"; | ||
| /** The event was sent to Sentry successfully. */ | ||
| Status["Success"] = "success"; | ||
| /** The client is currently rate limited and will try again later. */ | ||
| Status["RateLimit"] = "rate_limit"; | ||
| /** The event could not be processed. */ | ||
| Status["Invalid"] = "invalid"; | ||
| /** A server-side error ocurred during submission. */ | ||
| Status["Failed"] = "failed"; | ||
| })(Status || (Status = {})); | ||
| // tslint:disable:completed-docs | ||
| // tslint:disable:no-unnecessary-qualifier no-namespace | ||
| (function (Status) { | ||
| /** | ||
| * Converts a HTTP status code into a {@link Status}. | ||
| * | ||
| * @param code The HTTP response status code. | ||
| * @returns The send status or {@link Status.Unknown}. | ||
| */ | ||
| function fromHttpCode(code) { | ||
| if (code >= 200 && code < 300) { | ||
| return Status.Success; | ||
| } | ||
| if (code === 429) { | ||
| return Status.RateLimit; | ||
| } | ||
| if (code >= 400 && code < 500) { | ||
| return Status.Invalid; | ||
| } | ||
| if (code >= 500) { | ||
| return Status.Failed; | ||
| } | ||
| return Status.Unknown; | ||
| } | ||
| Status.fromHttpCode = fromHttpCode; | ||
| })(Status || (Status = {})); | ||
| //# sourceMappingURL=status.js.map |
| {"version":3,"file":"status.js","sourceRoot":"","sources":["../src/status.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,MAAM,CAAN,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,0CAA0C;IAC1C,6BAAmB,CAAA;IACnB,+DAA+D;IAC/D,6BAAmB,CAAA;IACnB,iDAAiD;IACjD,6BAAmB,CAAA;IACnB,qEAAqE;IACrE,kCAAwB,CAAA;IACxB,wCAAwC;IACxC,6BAAmB,CAAA;IACnB,qDAAqD;IACrD,2BAAiB,CAAA;AACnB,CAAC,EAbW,MAAM,KAAN,MAAM,QAajB;AACD,gCAAgC;AAChC,uDAAuD;AACvD,WAAiB,MAAM;IACrB;;;;;OAKG;IACH,SAAgB,YAAY,CAAC,IAAY;QACvC,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,KAAK,GAAG,EAAE;YAChB,OAAO,MAAM,CAAC,SAAS,CAAC;SACzB;QAED,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,IAAI,GAAG,EAAE;YACf,OAAO,MAAM,CAAC,MAAM,CAAC;SACtB;QAED,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAlBe,mBAAY,eAkB3B,CAAA;AACH,CAAC,EA1BgB,MAAM,KAAN,MAAM,QA0BtB","sourcesContent":["/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n"]} |
| import { Stacktrace } from './stacktrace'; | ||
| /** JSDoc */ | ||
| export interface Thread { | ||
| id?: number; | ||
| name?: string; | ||
| stacktrace?: Stacktrace; | ||
| crashed?: boolean; | ||
| current?: boolean; | ||
| } |
| //# sourceMappingURL=thread.js.map |
| {"version":3,"file":"thread.js","sourceRoot":"","sources":["../src/thread.ts"],"names":[],"mappings":"","sourcesContent":["import { Stacktrace } from './stacktrace';\n\n/** JSDoc */\nexport interface Thread {\n id?: number;\n name?: string;\n stacktrace?: Stacktrace;\n crashed?: boolean;\n current?: boolean;\n}\n"]} |
| import { DsnLike } from './dsn'; | ||
| import { Event } from './event'; | ||
| import { Response } from './response'; | ||
| /** Transport used sending data to Sentry */ | ||
| export interface Transport { | ||
| /** | ||
| * Sends the body to the Store endpoint in Sentry. | ||
| * | ||
| * @param body String body that should be sent to Sentry. | ||
| */ | ||
| sendEvent(event: Event): Promise<Response>; | ||
| /** | ||
| * Call this function to wait until all pending requests have been sent. | ||
| * | ||
| * @param timeout Number time in ms to wait until the buffer is drained. | ||
| */ | ||
| close(timeout?: number): Promise<boolean>; | ||
| } | ||
| /** JSDoc */ | ||
| export declare type TransportClass<T extends Transport> = new (options: TransportOptions) => T; | ||
| /** JSDoc */ | ||
| export interface TransportOptions { | ||
| [key: string]: any; | ||
| /** Sentry DSN */ | ||
| dsn: DsnLike; | ||
| /** Define custom headers */ | ||
| headers?: object; | ||
| /** Set a HTTP proxy that should be used for outbound requests. */ | ||
| httpProxy?: string; | ||
| /** Set a HTTPS proxy that should be used for outbound requests. */ | ||
| httpsProxy?: string; | ||
| /** HTTPS proxy certificates path */ | ||
| caCerts?: string; | ||
| } |
| //# sourceMappingURL=transport.js.map |
| {"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"","sourcesContent":["import { DsnLike } from './dsn';\nimport { Event } from './event';\nimport { Response } from './response';\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the body to the Store endpoint in Sentry.\n *\n * @param body String body that should be sent to Sentry.\n */\n sendEvent(event: Event): Promise<Response>;\n\n /**\n * Call this function to wait until all pending requests have been sent.\n *\n * @param timeout Number time in ms to wait until the buffer is drained.\n */\n close(timeout?: number): Promise<boolean>;\n}\n\n/** JSDoc */\nexport type TransportClass<T extends Transport> = new (options: TransportOptions) => T;\n\n/** JSDoc */\nexport interface TransportOptions {\n [key: string]: any;\n /** Sentry DSN */\n dsn: DsnLike;\n /** Define custom headers */\n headers?: object;\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n /** HTTPS proxy certificates path */\n caCerts?: string;\n}\n"]} |
| /** JSDoc */ | ||
| export interface User { | ||
| [key: string]: any; | ||
| id?: string; | ||
| ip_address?: string; | ||
| email?: string; | ||
| username?: string; | ||
| } |
| //# sourceMappingURL=user.js.map |
| {"version":3,"file":"user.js","sourceRoot":"","sources":["../src/user.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface User {\n [key: string]: any;\n id?: string;\n ip_address?: string;\n email?: string;\n username?: string;\n}\n"]} |
| /** JSDoc */ | ||
| export interface WrappedFunction extends Function { | ||
| [key: string]: any; | ||
| __sentry__?: boolean; | ||
| __sentry_wrapped__?: WrappedFunction; | ||
| __sentry_original__?: WrappedFunction; | ||
| } |
| //# sourceMappingURL=wrappedfunction.js.map |
| {"version":3,"file":"wrappedfunction.js","sourceRoot":"","sources":["../src/wrappedfunction.ts"],"names":[],"mappings":"","sourcesContent":["/** JSDoc */\nexport interface WrappedFunction extends Function {\n [key: string]: any;\n __sentry__?: boolean;\n __sentry_wrapped__?: WrappedFunction;\n __sentry_original__?: WrappedFunction;\n}\n"]} |
+26
-276
@@ -1,276 +0,26 @@ | ||
| /** Supported Sentry transport protocols in a Dsn. */ | ||
| export declare type DsnProtocol = 'http' | 'https'; | ||
| /** Primitive components of a Dsn. */ | ||
| export interface DsnComponents { | ||
| /** Protocol used to connect to Sentry. */ | ||
| protocol: DsnProtocol; | ||
| /** Public authorization key. */ | ||
| user: string; | ||
| /** Private authorization key (deprecated, optional). */ | ||
| pass?: string; | ||
| /** Hostname of the Sentry instance. */ | ||
| host: string; | ||
| /** Port of the Sentry instance. */ | ||
| port?: string; | ||
| /** Sub path/ */ | ||
| path?: string; | ||
| /** Project ID */ | ||
| projectId: string; | ||
| } | ||
| /** Anything that can be parsed into a Dsn. */ | ||
| export declare type DsnLike = string | DsnComponents; | ||
| /** JSDoc */ | ||
| export declare enum Severity { | ||
| /** JSDoc */ | ||
| Fatal = "fatal", | ||
| /** JSDoc */ | ||
| Error = "error", | ||
| /** JSDoc */ | ||
| Warning = "warning", | ||
| /** JSDoc */ | ||
| Log = "log", | ||
| /** JSDoc */ | ||
| Info = "info", | ||
| /** JSDoc */ | ||
| Debug = "debug", | ||
| /** JSDoc */ | ||
| Critical = "critical" | ||
| } | ||
| export declare namespace Severity { | ||
| /** | ||
| * Converts a string-based level into a {@link Severity}. | ||
| * | ||
| * @param level string representation of Severity | ||
| * @returns Severity | ||
| */ | ||
| function fromString(level: string): Severity; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Breadcrumb { | ||
| type?: string; | ||
| level?: Severity; | ||
| event_id?: string; | ||
| category?: string; | ||
| message?: string; | ||
| data?: any; | ||
| timestamp?: number; | ||
| } | ||
| /** JSDoc */ | ||
| export interface User { | ||
| [key: string]: any; | ||
| id?: string; | ||
| ip_address?: string; | ||
| email?: string; | ||
| username?: string; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SdkInfo { | ||
| name: string; | ||
| version: string; | ||
| integrations?: string[]; | ||
| packages?: Package[]; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Package { | ||
| name: string; | ||
| version: string; | ||
| } | ||
| /** JSDoc */ | ||
| export interface StackFrame { | ||
| filename?: string; | ||
| function?: string; | ||
| module?: string; | ||
| platform?: string; | ||
| lineno?: number; | ||
| colno?: number; | ||
| abs_path?: string; | ||
| context_line?: string; | ||
| pre_context?: string[]; | ||
| post_context?: string[]; | ||
| in_app?: boolean; | ||
| vars?: { | ||
| [key: string]: any; | ||
| }; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Stacktrace { | ||
| frames?: StackFrame[]; | ||
| frames_omitted?: [number, number]; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Thread { | ||
| id?: number; | ||
| name?: string; | ||
| stacktrace?: Stacktrace; | ||
| crashed?: boolean; | ||
| current?: boolean; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryException { | ||
| type?: string; | ||
| value?: string; | ||
| module?: string; | ||
| thread_id?: number; | ||
| stacktrace?: Stacktrace; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Request { | ||
| url?: string; | ||
| method?: string; | ||
| data?: any; | ||
| query_string?: string; | ||
| cookies?: { | ||
| [key: string]: string; | ||
| }; | ||
| env?: { | ||
| [key: string]: string; | ||
| }; | ||
| headers?: { | ||
| [key: string]: string; | ||
| }; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryEvent { | ||
| event_id?: string; | ||
| message?: string; | ||
| timestamp?: number; | ||
| level?: Severity; | ||
| platform?: string; | ||
| logger?: string; | ||
| server_name?: string; | ||
| release?: string; | ||
| dist?: string; | ||
| environment?: string; | ||
| sdk?: SdkInfo; | ||
| request?: Request; | ||
| transaction?: string; | ||
| modules?: { | ||
| [key: string]: string; | ||
| }; | ||
| fingerprint?: string[]; | ||
| exception?: { | ||
| values?: SentryException[]; | ||
| mechanism?: Mechanism; | ||
| }; | ||
| stacktrace?: Stacktrace; | ||
| breadcrumbs?: Breadcrumb[]; | ||
| contexts?: { | ||
| [key: string]: object; | ||
| }; | ||
| tags?: { | ||
| [key: string]: string; | ||
| }; | ||
| extra?: { | ||
| [key: string]: any; | ||
| }; | ||
| user?: User; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Mechanism { | ||
| type: string; | ||
| handled: boolean; | ||
| data?: { | ||
| [key: string]: string; | ||
| }; | ||
| } | ||
| /** Integration interface */ | ||
| export interface Integration { | ||
| /** | ||
| * Returns {@link IntegrationClass.id} | ||
| */ | ||
| name: string; | ||
| /** @deprecated */ | ||
| install?(options?: object): void; | ||
| setupOnce(): void; | ||
| } | ||
| /** Integration Class Interface */ | ||
| export interface IntegrationClass<T> { | ||
| new (): T; | ||
| /** | ||
| * Property that holds the integration name | ||
| */ | ||
| id: string; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryResponse { | ||
| status: Status; | ||
| event?: SentryEvent; | ||
| reason?: string; | ||
| } | ||
| /** JSDoc */ | ||
| export interface TransportOptions { | ||
| [key: string]: any; | ||
| /** Sentry DSN */ | ||
| dsn: DsnLike; | ||
| /** Define custom headers */ | ||
| headers?: object; | ||
| /** Set a HTTP proxy that should be used for outbound requests. */ | ||
| httpProxy?: string; | ||
| /** Set a HTTPS proxy that should be used for outbound requests. */ | ||
| httpsProxy?: string; | ||
| /** HTTPS proxy certificates path */ | ||
| caCerts?: string; | ||
| } | ||
| /** Transport used sending data to Sentry */ | ||
| export interface Transport { | ||
| /** | ||
| * Sends the body to the Store endpoint in Sentry. | ||
| * | ||
| * @param body String body that should be sent to Sentry. | ||
| */ | ||
| sendEvent(body: string): Promise<SentryResponse>; | ||
| /** | ||
| * Call this function to wait until all pending requests have been sent. | ||
| * | ||
| * @param timeout Number time in ms to wait until the buffer is drained. | ||
| */ | ||
| close(timeout?: number): Promise<boolean>; | ||
| /** @deprecated Implement sendEvent instead */ | ||
| captureEvent?(event: SentryEvent): Promise<SentryResponse>; | ||
| } | ||
| /** JSDoc */ | ||
| export interface TransportClass<T extends Transport> { | ||
| new (options: TransportOptions): T; | ||
| } | ||
| /** The status of an event. */ | ||
| export declare enum Status { | ||
| /** The status could not be determined. */ | ||
| Unknown = "unknown", | ||
| /** The event was skipped due to configuration or callbacks. */ | ||
| Skipped = "skipped", | ||
| /** The event was sent to Sentry successfully. */ | ||
| Success = "success", | ||
| /** The client is currently rate limited and will try again later. */ | ||
| RateLimit = "rate_limit", | ||
| /** The event could not be processed. */ | ||
| Invalid = "invalid", | ||
| /** A server-side error ocurred during submission. */ | ||
| Failed = "failed" | ||
| } | ||
| export declare namespace Status { | ||
| /** | ||
| * Converts a HTTP status code into a {@link Status}. | ||
| * | ||
| * @param code The HTTP response status code. | ||
| * @returns The send status or {@link Status.Unknown}. | ||
| */ | ||
| function fromHttpCode(code: number): Status; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryWrappedFunction extends Function { | ||
| [key: string]: any; | ||
| __sentry__?: boolean; | ||
| __sentry_wrapped__?: SentryWrappedFunction; | ||
| __sentry_original__?: SentryWrappedFunction; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryEventHint { | ||
| event_id?: string; | ||
| syntheticException?: Error | null; | ||
| originalException?: Error | null; | ||
| data?: any; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryBreadcrumbHint { | ||
| [key: string]: any; | ||
| } | ||
| export { Breadcrumb, BreadcrumbHint } from './breadcrumb'; | ||
| export { Client } from './client'; | ||
| export { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn'; | ||
| export { ExtendedError } from './error'; | ||
| export { Event, EventHint } from './event'; | ||
| export { EventProcessor } from './eventprocessor'; | ||
| export { Exception } from './exception'; | ||
| export { Hub } from './hub'; | ||
| export { Integration, IntegrationClass } from './integration'; | ||
| export { LogLevel } from './loglevel'; | ||
| export { Mechanism } from './mechanism'; | ||
| export { Options } from './options'; | ||
| export { Package } from './package'; | ||
| export { Request } from './request'; | ||
| export { Response } from './response'; | ||
| export { Scope } from './scope'; | ||
| export { SdkInfo } from './sdkinfo'; | ||
| export { Severity } from './severity'; | ||
| export { Span } from './span'; | ||
| export { StackFrame } from './stackframe'; | ||
| export { Stacktrace } from './stacktrace'; | ||
| export { Status } from './status'; | ||
| export { Thread } from './thread'; | ||
| export { Transport, TransportOptions, TransportClass } from './transport'; | ||
| export { User } from './user'; | ||
| export { WrappedFunction } from './wrappedfunction'; |
+6
-89
| "use strict"; | ||
| Object.defineProperty(exports, "__esModule", { value: true }); | ||
| /** JSDoc */ | ||
| var Severity; | ||
| (function (Severity) { | ||
| /** JSDoc */ | ||
| Severity["Fatal"] = "fatal"; | ||
| /** JSDoc */ | ||
| Severity["Error"] = "error"; | ||
| /** JSDoc */ | ||
| Severity["Warning"] = "warning"; | ||
| /** JSDoc */ | ||
| Severity["Log"] = "log"; | ||
| /** JSDoc */ | ||
| Severity["Info"] = "info"; | ||
| /** JSDoc */ | ||
| Severity["Debug"] = "debug"; | ||
| /** JSDoc */ | ||
| Severity["Critical"] = "critical"; | ||
| })(Severity = exports.Severity || (exports.Severity = {})); | ||
| // tslint:disable:no-unnecessary-qualifier no-namespace | ||
| (function (Severity) { | ||
| /** | ||
| * Converts a string-based level into a {@link Severity}. | ||
| * | ||
| * @param level string representation of Severity | ||
| * @returns Severity | ||
| */ | ||
| function fromString(level) { | ||
| switch (level) { | ||
| case 'debug': | ||
| return Severity.Debug; | ||
| case 'info': | ||
| return Severity.Info; | ||
| case 'warn': | ||
| case 'warning': | ||
| return Severity.Warning; | ||
| case 'error': | ||
| return Severity.Error; | ||
| case 'fatal': | ||
| return Severity.Fatal; | ||
| case 'critical': | ||
| return Severity.Critical; | ||
| case 'log': | ||
| default: | ||
| return Severity.Log; | ||
| } | ||
| } | ||
| Severity.fromString = fromString; | ||
| })(Severity = exports.Severity || (exports.Severity = {})); | ||
| /** The status of an event. */ | ||
| var Status; | ||
| (function (Status) { | ||
| /** The status could not be determined. */ | ||
| Status["Unknown"] = "unknown"; | ||
| /** The event was skipped due to configuration or callbacks. */ | ||
| Status["Skipped"] = "skipped"; | ||
| /** The event was sent to Sentry successfully. */ | ||
| Status["Success"] = "success"; | ||
| /** The client is currently rate limited and will try again later. */ | ||
| Status["RateLimit"] = "rate_limit"; | ||
| /** The event could not be processed. */ | ||
| Status["Invalid"] = "invalid"; | ||
| /** A server-side error ocurred during submission. */ | ||
| Status["Failed"] = "failed"; | ||
| })(Status = exports.Status || (exports.Status = {})); | ||
| // tslint:disable:no-unnecessary-qualifier no-namespace | ||
| (function (Status) { | ||
| /** | ||
| * Converts a HTTP status code into a {@link Status}. | ||
| * | ||
| * @param code The HTTP response status code. | ||
| * @returns The send status or {@link Status.Unknown}. | ||
| */ | ||
| function fromHttpCode(code) { | ||
| if (code >= 200 && code < 300) { | ||
| return Status.Success; | ||
| } | ||
| if (code === 429) { | ||
| return Status.RateLimit; | ||
| } | ||
| if (code >= 400 && code < 500) { | ||
| return Status.Invalid; | ||
| } | ||
| if (code >= 500) { | ||
| return Status.Failed; | ||
| } | ||
| return Status.Unknown; | ||
| } | ||
| Status.fromHttpCode = fromHttpCode; | ||
| })(Status = exports.Status || (exports.Status = {})); | ||
| var loglevel_1 = require("./loglevel"); | ||
| exports.LogLevel = loglevel_1.LogLevel; | ||
| var severity_1 = require("./severity"); | ||
| exports.Severity = severity_1.Severity; | ||
| var status_1 = require("./status"); | ||
| exports.Status = status_1.Status; | ||
| //# sourceMappingURL=index.js.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAwBA,YAAY;AACZ,IAAY,QAeX;AAfD,WAAY,QAAQ;IAClB,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,+BAAmB,CAAA;IACnB,YAAY;IACZ,uBAAW,CAAA;IACX,YAAY;IACZ,yBAAa,CAAA;IACb,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,iCAAqB,CAAA;AACvB,CAAC,EAfW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAenB;AAED,uDAAuD;AACvD,WAAiB,QAAQ;IACvB;;;;;OAKG;IACH,SAAgB,UAAU,CAAC,KAAa;QACtC,QAAQ,KAAK,EAAE;YACb,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,MAAM;gBACT,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,KAAK,MAAM,CAAC;YACZ,KAAK,SAAS;gBACZ,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC1B,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,UAAU;gBACb,OAAO,QAAQ,CAAC,QAAQ,CAAC;YAC3B,KAAK,KAAK,CAAC;YACX;gBACE,OAAO,QAAQ,CAAC,GAAG,CAAC;SACvB;IACH,CAAC;IAnBe,mBAAU,aAmBzB,CAAA;AACH,CAAC,EA3BgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QA2BxB;AAoMD,8BAA8B;AAC9B,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,0CAA0C;IAC1C,6BAAmB,CAAA;IACnB,+DAA+D;IAC/D,6BAAmB,CAAA;IACnB,iDAAiD;IACjD,6BAAmB,CAAA;IACnB,qEAAqE;IACrE,kCAAwB,CAAA;IACxB,wCAAwC;IACxC,6BAAmB,CAAA;IACnB,qDAAqD;IACrD,2BAAiB,CAAA;AACnB,CAAC,EAbW,MAAM,GAAN,cAAM,KAAN,cAAM,QAajB;AAED,uDAAuD;AACvD,WAAiB,MAAM;IACrB;;;;;OAKG;IACH,SAAgB,YAAY,CAAC,IAAY;QACvC,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,KAAK,GAAG,EAAE;YAChB,OAAO,MAAM,CAAC,SAAS,CAAC;SACzB;QAED,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,IAAI,GAAG,EAAE;YACf,OAAO,MAAM,CAAC,MAAM,CAAC;SACtB;QAED,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAlBe,mBAAY,eAkB3B,CAAA;AACH,CAAC,EA1BgB,MAAM,GAAN,cAAM,KAAN,cAAM,QA0BtB","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key. */\n user: string;\n /** Private authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n\n/** JSDoc */\nexport interface Breadcrumb {\n type?: string;\n level?: Severity;\n event_id?: string;\n category?: string;\n message?: string;\n data?: any;\n timestamp?: number;\n}\n\n/** JSDoc */\nexport interface User {\n [key: string]: any;\n id?: string;\n ip_address?: string;\n email?: string;\n username?: string;\n}\n\n/** JSDoc */\nexport interface SdkInfo {\n name: string;\n version: string;\n integrations?: string[];\n packages?: Package[];\n}\n\n/** JSDoc */\nexport interface Package {\n name: string;\n version: string;\n}\n\n/** JSDoc */\nexport interface StackFrame {\n filename?: string;\n function?: string;\n module?: string;\n platform?: string;\n lineno?: number;\n colno?: number;\n abs_path?: string;\n context_line?: string;\n pre_context?: string[];\n post_context?: string[];\n in_app?: boolean;\n vars?: { [key: string]: any };\n}\n\n/** JSDoc */\nexport interface Stacktrace {\n frames?: StackFrame[];\n frames_omitted?: [number, number];\n}\n\n/** JSDoc */\nexport interface Thread {\n id?: number;\n name?: string;\n stacktrace?: Stacktrace;\n crashed?: boolean;\n current?: boolean;\n}\n\n/** JSDoc */\nexport interface SentryException {\n type?: string;\n value?: string;\n module?: string;\n thread_id?: number;\n stacktrace?: Stacktrace;\n}\n\n/** JSDoc */\nexport interface Request {\n url?: string;\n method?: string;\n data?: any;\n query_string?: string;\n cookies?: { [key: string]: string };\n env?: { [key: string]: string };\n headers?: { [key: string]: string };\n}\n\n/** JSDoc */\nexport interface SentryEvent {\n event_id?: string;\n message?: string;\n timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: SentryException[];\n mechanism?: Mechanism;\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: { [key: string]: object };\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n user?: User;\n}\n\n/** JSDoc */\nexport interface Mechanism {\n type: string;\n handled: boolean;\n data?: {\n [key: string]: string;\n };\n}\n\n/** Integration interface */\nexport interface Integration {\n /**\n * Returns {@link IntegrationClass.id}\n */\n name: string;\n // TODO: Remove with v5\n /** @deprecated */\n install?(options?: object): void;\n\n // This takes no options on purpose, options should be passed in the constructor\n setupOnce(): void; // TODO: make not optional\n}\n\n/** Integration Class Interface */\nexport interface IntegrationClass<T> {\n new (): T;\n /**\n * Property that holds the integration name\n */\n id: string;\n}\n\n/** JSDoc */\nexport interface SentryResponse {\n status: Status;\n event?: SentryEvent;\n reason?: string;\n}\n\n/** JSDoc */\nexport interface TransportOptions {\n [key: string]: any;\n /** Sentry DSN */\n dsn: DsnLike;\n /** Define custom headers */\n headers?: object;\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n /** HTTPS proxy certificates path */\n caCerts?: string;\n}\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the body to the Store endpoint in Sentry.\n *\n * @param body String body that should be sent to Sentry.\n */\n sendEvent(body: string): Promise<SentryResponse>;\n\n /**\n * Call this function to wait until all pending requests have been sent.\n *\n * @param timeout Number time in ms to wait until the buffer is drained.\n */\n close(timeout?: number): Promise<boolean>;\n\n // TODO: Remove with v5\n /** @deprecated Implement sendEvent instead */\n captureEvent?(event: SentryEvent): Promise<SentryResponse>;\n}\n\n/** JSDoc */\nexport interface TransportClass<T extends Transport> {\n new (options: TransportOptions): T;\n}\n\n/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n\n/** JSDoc */\nexport interface SentryWrappedFunction extends Function {\n [key: string]: any;\n __sentry__?: boolean;\n __sentry_wrapped__?: SentryWrappedFunction;\n __sentry_original__?: SentryWrappedFunction;\n}\n\n/** JSDoc */\nexport interface SentryEventHint {\n event_id?: string;\n syntheticException?: Error | null;\n originalException?: Error | null;\n data?: any;\n}\n\n/** JSDoc */\nexport interface SentryBreadcrumbHint {\n [key: string]: any;\n}\n"]} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AASA,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAQjB,uCAAsC;AAA7B,8BAAA,QAAQ,CAAA;AAIjB,mCAAkC;AAAzB,0BAAA,MAAM,CAAA","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { ExtendedError } from './error';\nexport { Event, EventHint } from './event';\nexport { EventProcessor } from './eventprocessor';\nexport { Exception } from './exception';\nexport { Hub } from './hub';\nexport { Integration, IntegrationClass } from './integration';\nexport { LogLevel } from './loglevel';\nexport { Mechanism } from './mechanism';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request } from './request';\nexport { Response } from './response';\nexport { Scope } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { Severity } from './severity';\nexport { Span } from './span';\nexport { StackFrame } from './stackframe';\nexport { Stacktrace } from './stacktrace';\nexport { Status } from './status';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]} |
+26
-276
@@ -1,276 +0,26 @@ | ||
| /** Supported Sentry transport protocols in a Dsn. */ | ||
| export declare type DsnProtocol = 'http' | 'https'; | ||
| /** Primitive components of a Dsn. */ | ||
| export interface DsnComponents { | ||
| /** Protocol used to connect to Sentry. */ | ||
| protocol: DsnProtocol; | ||
| /** Public authorization key. */ | ||
| user: string; | ||
| /** Private authorization key (deprecated, optional). */ | ||
| pass?: string; | ||
| /** Hostname of the Sentry instance. */ | ||
| host: string; | ||
| /** Port of the Sentry instance. */ | ||
| port?: string; | ||
| /** Sub path/ */ | ||
| path?: string; | ||
| /** Project ID */ | ||
| projectId: string; | ||
| } | ||
| /** Anything that can be parsed into a Dsn. */ | ||
| export declare type DsnLike = string | DsnComponents; | ||
| /** JSDoc */ | ||
| export declare enum Severity { | ||
| /** JSDoc */ | ||
| Fatal = "fatal", | ||
| /** JSDoc */ | ||
| Error = "error", | ||
| /** JSDoc */ | ||
| Warning = "warning", | ||
| /** JSDoc */ | ||
| Log = "log", | ||
| /** JSDoc */ | ||
| Info = "info", | ||
| /** JSDoc */ | ||
| Debug = "debug", | ||
| /** JSDoc */ | ||
| Critical = "critical" | ||
| } | ||
| export declare namespace Severity { | ||
| /** | ||
| * Converts a string-based level into a {@link Severity}. | ||
| * | ||
| * @param level string representation of Severity | ||
| * @returns Severity | ||
| */ | ||
| function fromString(level: string): Severity; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Breadcrumb { | ||
| type?: string; | ||
| level?: Severity; | ||
| event_id?: string; | ||
| category?: string; | ||
| message?: string; | ||
| data?: any; | ||
| timestamp?: number; | ||
| } | ||
| /** JSDoc */ | ||
| export interface User { | ||
| [key: string]: any; | ||
| id?: string; | ||
| ip_address?: string; | ||
| email?: string; | ||
| username?: string; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SdkInfo { | ||
| name: string; | ||
| version: string; | ||
| integrations?: string[]; | ||
| packages?: Package[]; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Package { | ||
| name: string; | ||
| version: string; | ||
| } | ||
| /** JSDoc */ | ||
| export interface StackFrame { | ||
| filename?: string; | ||
| function?: string; | ||
| module?: string; | ||
| platform?: string; | ||
| lineno?: number; | ||
| colno?: number; | ||
| abs_path?: string; | ||
| context_line?: string; | ||
| pre_context?: string[]; | ||
| post_context?: string[]; | ||
| in_app?: boolean; | ||
| vars?: { | ||
| [key: string]: any; | ||
| }; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Stacktrace { | ||
| frames?: StackFrame[]; | ||
| frames_omitted?: [number, number]; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Thread { | ||
| id?: number; | ||
| name?: string; | ||
| stacktrace?: Stacktrace; | ||
| crashed?: boolean; | ||
| current?: boolean; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryException { | ||
| type?: string; | ||
| value?: string; | ||
| module?: string; | ||
| thread_id?: number; | ||
| stacktrace?: Stacktrace; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Request { | ||
| url?: string; | ||
| method?: string; | ||
| data?: any; | ||
| query_string?: string; | ||
| cookies?: { | ||
| [key: string]: string; | ||
| }; | ||
| env?: { | ||
| [key: string]: string; | ||
| }; | ||
| headers?: { | ||
| [key: string]: string; | ||
| }; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryEvent { | ||
| event_id?: string; | ||
| message?: string; | ||
| timestamp?: number; | ||
| level?: Severity; | ||
| platform?: string; | ||
| logger?: string; | ||
| server_name?: string; | ||
| release?: string; | ||
| dist?: string; | ||
| environment?: string; | ||
| sdk?: SdkInfo; | ||
| request?: Request; | ||
| transaction?: string; | ||
| modules?: { | ||
| [key: string]: string; | ||
| }; | ||
| fingerprint?: string[]; | ||
| exception?: { | ||
| values?: SentryException[]; | ||
| mechanism?: Mechanism; | ||
| }; | ||
| stacktrace?: Stacktrace; | ||
| breadcrumbs?: Breadcrumb[]; | ||
| contexts?: { | ||
| [key: string]: object; | ||
| }; | ||
| tags?: { | ||
| [key: string]: string; | ||
| }; | ||
| extra?: { | ||
| [key: string]: any; | ||
| }; | ||
| user?: User; | ||
| } | ||
| /** JSDoc */ | ||
| export interface Mechanism { | ||
| type: string; | ||
| handled: boolean; | ||
| data?: { | ||
| [key: string]: string; | ||
| }; | ||
| } | ||
| /** Integration interface */ | ||
| export interface Integration { | ||
| /** | ||
| * Returns {@link IntegrationClass.id} | ||
| */ | ||
| name: string; | ||
| /** @deprecated */ | ||
| install?(options?: object): void; | ||
| setupOnce(): void; | ||
| } | ||
| /** Integration Class Interface */ | ||
| export interface IntegrationClass<T> { | ||
| new (): T; | ||
| /** | ||
| * Property that holds the integration name | ||
| */ | ||
| id: string; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryResponse { | ||
| status: Status; | ||
| event?: SentryEvent; | ||
| reason?: string; | ||
| } | ||
| /** JSDoc */ | ||
| export interface TransportOptions { | ||
| [key: string]: any; | ||
| /** Sentry DSN */ | ||
| dsn: DsnLike; | ||
| /** Define custom headers */ | ||
| headers?: object; | ||
| /** Set a HTTP proxy that should be used for outbound requests. */ | ||
| httpProxy?: string; | ||
| /** Set a HTTPS proxy that should be used for outbound requests. */ | ||
| httpsProxy?: string; | ||
| /** HTTPS proxy certificates path */ | ||
| caCerts?: string; | ||
| } | ||
| /** Transport used sending data to Sentry */ | ||
| export interface Transport { | ||
| /** | ||
| * Sends the body to the Store endpoint in Sentry. | ||
| * | ||
| * @param body String body that should be sent to Sentry. | ||
| */ | ||
| sendEvent(body: string): Promise<SentryResponse>; | ||
| /** | ||
| * Call this function to wait until all pending requests have been sent. | ||
| * | ||
| * @param timeout Number time in ms to wait until the buffer is drained. | ||
| */ | ||
| close(timeout?: number): Promise<boolean>; | ||
| /** @deprecated Implement sendEvent instead */ | ||
| captureEvent?(event: SentryEvent): Promise<SentryResponse>; | ||
| } | ||
| /** JSDoc */ | ||
| export interface TransportClass<T extends Transport> { | ||
| new (options: TransportOptions): T; | ||
| } | ||
| /** The status of an event. */ | ||
| export declare enum Status { | ||
| /** The status could not be determined. */ | ||
| Unknown = "unknown", | ||
| /** The event was skipped due to configuration or callbacks. */ | ||
| Skipped = "skipped", | ||
| /** The event was sent to Sentry successfully. */ | ||
| Success = "success", | ||
| /** The client is currently rate limited and will try again later. */ | ||
| RateLimit = "rate_limit", | ||
| /** The event could not be processed. */ | ||
| Invalid = "invalid", | ||
| /** A server-side error ocurred during submission. */ | ||
| Failed = "failed" | ||
| } | ||
| export declare namespace Status { | ||
| /** | ||
| * Converts a HTTP status code into a {@link Status}. | ||
| * | ||
| * @param code The HTTP response status code. | ||
| * @returns The send status or {@link Status.Unknown}. | ||
| */ | ||
| function fromHttpCode(code: number): Status; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryWrappedFunction extends Function { | ||
| [key: string]: any; | ||
| __sentry__?: boolean; | ||
| __sentry_wrapped__?: SentryWrappedFunction; | ||
| __sentry_original__?: SentryWrappedFunction; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryEventHint { | ||
| event_id?: string; | ||
| syntheticException?: Error | null; | ||
| originalException?: Error | null; | ||
| data?: any; | ||
| } | ||
| /** JSDoc */ | ||
| export interface SentryBreadcrumbHint { | ||
| [key: string]: any; | ||
| } | ||
| export { Breadcrumb, BreadcrumbHint } from './breadcrumb'; | ||
| export { Client } from './client'; | ||
| export { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn'; | ||
| export { ExtendedError } from './error'; | ||
| export { Event, EventHint } from './event'; | ||
| export { EventProcessor } from './eventprocessor'; | ||
| export { Exception } from './exception'; | ||
| export { Hub } from './hub'; | ||
| export { Integration, IntegrationClass } from './integration'; | ||
| export { LogLevel } from './loglevel'; | ||
| export { Mechanism } from './mechanism'; | ||
| export { Options } from './options'; | ||
| export { Package } from './package'; | ||
| export { Request } from './request'; | ||
| export { Response } from './response'; | ||
| export { Scope } from './scope'; | ||
| export { SdkInfo } from './sdkinfo'; | ||
| export { Severity } from './severity'; | ||
| export { Span } from './span'; | ||
| export { StackFrame } from './stackframe'; | ||
| export { Stacktrace } from './stacktrace'; | ||
| export { Status } from './status'; | ||
| export { Thread } from './thread'; | ||
| export { Transport, TransportOptions, TransportClass } from './transport'; | ||
| export { User } from './user'; | ||
| export { WrappedFunction } from './wrappedfunction'; |
+3
-89
@@ -1,90 +0,4 @@ | ||
| /** JSDoc */ | ||
| export var Severity; | ||
| (function (Severity) { | ||
| /** JSDoc */ | ||
| Severity["Fatal"] = "fatal"; | ||
| /** JSDoc */ | ||
| Severity["Error"] = "error"; | ||
| /** JSDoc */ | ||
| Severity["Warning"] = "warning"; | ||
| /** JSDoc */ | ||
| Severity["Log"] = "log"; | ||
| /** JSDoc */ | ||
| Severity["Info"] = "info"; | ||
| /** JSDoc */ | ||
| Severity["Debug"] = "debug"; | ||
| /** JSDoc */ | ||
| Severity["Critical"] = "critical"; | ||
| })(Severity || (Severity = {})); | ||
| // tslint:disable:no-unnecessary-qualifier no-namespace | ||
| (function (Severity) { | ||
| /** | ||
| * Converts a string-based level into a {@link Severity}. | ||
| * | ||
| * @param level string representation of Severity | ||
| * @returns Severity | ||
| */ | ||
| function fromString(level) { | ||
| switch (level) { | ||
| case 'debug': | ||
| return Severity.Debug; | ||
| case 'info': | ||
| return Severity.Info; | ||
| case 'warn': | ||
| case 'warning': | ||
| return Severity.Warning; | ||
| case 'error': | ||
| return Severity.Error; | ||
| case 'fatal': | ||
| return Severity.Fatal; | ||
| case 'critical': | ||
| return Severity.Critical; | ||
| case 'log': | ||
| default: | ||
| return Severity.Log; | ||
| } | ||
| } | ||
| Severity.fromString = fromString; | ||
| })(Severity || (Severity = {})); | ||
| /** The status of an event. */ | ||
| export var Status; | ||
| (function (Status) { | ||
| /** The status could not be determined. */ | ||
| Status["Unknown"] = "unknown"; | ||
| /** The event was skipped due to configuration or callbacks. */ | ||
| Status["Skipped"] = "skipped"; | ||
| /** The event was sent to Sentry successfully. */ | ||
| Status["Success"] = "success"; | ||
| /** The client is currently rate limited and will try again later. */ | ||
| Status["RateLimit"] = "rate_limit"; | ||
| /** The event could not be processed. */ | ||
| Status["Invalid"] = "invalid"; | ||
| /** A server-side error ocurred during submission. */ | ||
| Status["Failed"] = "failed"; | ||
| })(Status || (Status = {})); | ||
| // tslint:disable:no-unnecessary-qualifier no-namespace | ||
| (function (Status) { | ||
| /** | ||
| * Converts a HTTP status code into a {@link Status}. | ||
| * | ||
| * @param code The HTTP response status code. | ||
| * @returns The send status or {@link Status.Unknown}. | ||
| */ | ||
| function fromHttpCode(code) { | ||
| if (code >= 200 && code < 300) { | ||
| return Status.Success; | ||
| } | ||
| if (code === 429) { | ||
| return Status.RateLimit; | ||
| } | ||
| if (code >= 400 && code < 500) { | ||
| return Status.Invalid; | ||
| } | ||
| if (code >= 500) { | ||
| return Status.Failed; | ||
| } | ||
| return Status.Unknown; | ||
| } | ||
| Status.fromHttpCode = fromHttpCode; | ||
| })(Status || (Status = {})); | ||
| export { LogLevel } from './loglevel'; | ||
| export { Severity } from './severity'; | ||
| export { Status } from './status'; | ||
| //# sourceMappingURL=index.js.map |
+1
-1
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAwBA,YAAY;AACZ,MAAM,CAAN,IAAY,QAeX;AAfD,WAAY,QAAQ;IAClB,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,+BAAmB,CAAA;IACnB,YAAY;IACZ,uBAAW,CAAA;IACX,YAAY;IACZ,yBAAa,CAAA;IACb,YAAY;IACZ,2BAAe,CAAA;IACf,YAAY;IACZ,iCAAqB,CAAA;AACvB,CAAC,EAfW,QAAQ,KAAR,QAAQ,QAenB;AAED,uDAAuD;AACvD,WAAiB,QAAQ;IACvB;;;;;OAKG;IACH,SAAgB,UAAU,CAAC,KAAa;QACtC,QAAQ,KAAK,EAAE;YACb,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,MAAM;gBACT,OAAO,QAAQ,CAAC,IAAI,CAAC;YACvB,KAAK,MAAM,CAAC;YACZ,KAAK,SAAS;gBACZ,OAAO,QAAQ,CAAC,OAAO,CAAC;YAC1B,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,OAAO;gBACV,OAAO,QAAQ,CAAC,KAAK,CAAC;YACxB,KAAK,UAAU;gBACb,OAAO,QAAQ,CAAC,QAAQ,CAAC;YAC3B,KAAK,KAAK,CAAC;YACX;gBACE,OAAO,QAAQ,CAAC,GAAG,CAAC;SACvB;IACH,CAAC;IAnBe,mBAAU,aAmBzB,CAAA;AACH,CAAC,EA3BgB,QAAQ,KAAR,QAAQ,QA2BxB;AAoMD,8BAA8B;AAC9B,MAAM,CAAN,IAAY,MAaX;AAbD,WAAY,MAAM;IAChB,0CAA0C;IAC1C,6BAAmB,CAAA;IACnB,+DAA+D;IAC/D,6BAAmB,CAAA;IACnB,iDAAiD;IACjD,6BAAmB,CAAA;IACnB,qEAAqE;IACrE,kCAAwB,CAAA;IACxB,wCAAwC;IACxC,6BAAmB,CAAA;IACnB,qDAAqD;IACrD,2BAAiB,CAAA;AACnB,CAAC,EAbW,MAAM,KAAN,MAAM,QAajB;AAED,uDAAuD;AACvD,WAAiB,MAAM;IACrB;;;;;OAKG;IACH,SAAgB,YAAY,CAAC,IAAY;QACvC,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,KAAK,GAAG,EAAE;YAChB,OAAO,MAAM,CAAC,SAAS,CAAC;SACzB;QAED,IAAI,IAAI,IAAI,GAAG,IAAI,IAAI,GAAG,GAAG,EAAE;YAC7B,OAAO,MAAM,CAAC,OAAO,CAAC;SACvB;QAED,IAAI,IAAI,IAAI,GAAG,EAAE;YACf,OAAO,MAAM,CAAC,MAAM,CAAC;SACtB;QAED,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAlBe,mBAAY,eAkB3B,CAAA;AACH,CAAC,EA1BgB,MAAM,KAAN,MAAM,QA0BtB","sourcesContent":["/** Supported Sentry transport protocols in a Dsn. */\nexport type DsnProtocol = 'http' | 'https';\n\n/** Primitive components of a Dsn. */\nexport interface DsnComponents {\n /** Protocol used to connect to Sentry. */\n protocol: DsnProtocol;\n /** Public authorization key. */\n user: string;\n /** Private authorization key (deprecated, optional). */\n pass?: string;\n /** Hostname of the Sentry instance. */\n host: string;\n /** Port of the Sentry instance. */\n port?: string;\n /** Sub path/ */\n path?: string;\n /** Project ID */\n projectId: string;\n}\n\n/** Anything that can be parsed into a Dsn. */\nexport type DsnLike = string | DsnComponents;\n\n/** JSDoc */\nexport enum Severity {\n /** JSDoc */\n Fatal = 'fatal',\n /** JSDoc */\n Error = 'error',\n /** JSDoc */\n Warning = 'warning',\n /** JSDoc */\n Log = 'log',\n /** JSDoc */\n Info = 'info',\n /** JSDoc */\n Debug = 'debug',\n /** JSDoc */\n Critical = 'critical',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Severity {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n export function fromString(level: string): Severity {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n}\n\n/** JSDoc */\nexport interface Breadcrumb {\n type?: string;\n level?: Severity;\n event_id?: string;\n category?: string;\n message?: string;\n data?: any;\n timestamp?: number;\n}\n\n/** JSDoc */\nexport interface User {\n [key: string]: any;\n id?: string;\n ip_address?: string;\n email?: string;\n username?: string;\n}\n\n/** JSDoc */\nexport interface SdkInfo {\n name: string;\n version: string;\n integrations?: string[];\n packages?: Package[];\n}\n\n/** JSDoc */\nexport interface Package {\n name: string;\n version: string;\n}\n\n/** JSDoc */\nexport interface StackFrame {\n filename?: string;\n function?: string;\n module?: string;\n platform?: string;\n lineno?: number;\n colno?: number;\n abs_path?: string;\n context_line?: string;\n pre_context?: string[];\n post_context?: string[];\n in_app?: boolean;\n vars?: { [key: string]: any };\n}\n\n/** JSDoc */\nexport interface Stacktrace {\n frames?: StackFrame[];\n frames_omitted?: [number, number];\n}\n\n/** JSDoc */\nexport interface Thread {\n id?: number;\n name?: string;\n stacktrace?: Stacktrace;\n crashed?: boolean;\n current?: boolean;\n}\n\n/** JSDoc */\nexport interface SentryException {\n type?: string;\n value?: string;\n module?: string;\n thread_id?: number;\n stacktrace?: Stacktrace;\n}\n\n/** JSDoc */\nexport interface Request {\n url?: string;\n method?: string;\n data?: any;\n query_string?: string;\n cookies?: { [key: string]: string };\n env?: { [key: string]: string };\n headers?: { [key: string]: string };\n}\n\n/** JSDoc */\nexport interface SentryEvent {\n event_id?: string;\n message?: string;\n timestamp?: number;\n level?: Severity;\n platform?: string;\n logger?: string;\n server_name?: string;\n release?: string;\n dist?: string;\n environment?: string;\n sdk?: SdkInfo;\n request?: Request;\n transaction?: string;\n modules?: { [key: string]: string };\n fingerprint?: string[];\n exception?: {\n values?: SentryException[];\n mechanism?: Mechanism;\n };\n stacktrace?: Stacktrace;\n breadcrumbs?: Breadcrumb[];\n contexts?: { [key: string]: object };\n tags?: { [key: string]: string };\n extra?: { [key: string]: any };\n user?: User;\n}\n\n/** JSDoc */\nexport interface Mechanism {\n type: string;\n handled: boolean;\n data?: {\n [key: string]: string;\n };\n}\n\n/** Integration interface */\nexport interface Integration {\n /**\n * Returns {@link IntegrationClass.id}\n */\n name: string;\n // TODO: Remove with v5\n /** @deprecated */\n install?(options?: object): void;\n\n // This takes no options on purpose, options should be passed in the constructor\n setupOnce(): void; // TODO: make not optional\n}\n\n/** Integration Class Interface */\nexport interface IntegrationClass<T> {\n new (): T;\n /**\n * Property that holds the integration name\n */\n id: string;\n}\n\n/** JSDoc */\nexport interface SentryResponse {\n status: Status;\n event?: SentryEvent;\n reason?: string;\n}\n\n/** JSDoc */\nexport interface TransportOptions {\n [key: string]: any;\n /** Sentry DSN */\n dsn: DsnLike;\n /** Define custom headers */\n headers?: object;\n /** Set a HTTP proxy that should be used for outbound requests. */\n httpProxy?: string;\n /** Set a HTTPS proxy that should be used for outbound requests. */\n httpsProxy?: string;\n /** HTTPS proxy certificates path */\n caCerts?: string;\n}\n\n/** Transport used sending data to Sentry */\nexport interface Transport {\n /**\n * Sends the body to the Store endpoint in Sentry.\n *\n * @param body String body that should be sent to Sentry.\n */\n sendEvent(body: string): Promise<SentryResponse>;\n\n /**\n * Call this function to wait until all pending requests have been sent.\n *\n * @param timeout Number time in ms to wait until the buffer is drained.\n */\n close(timeout?: number): Promise<boolean>;\n\n // TODO: Remove with v5\n /** @deprecated Implement sendEvent instead */\n captureEvent?(event: SentryEvent): Promise<SentryResponse>;\n}\n\n/** JSDoc */\nexport interface TransportClass<T extends Transport> {\n new (options: TransportOptions): T;\n}\n\n/** The status of an event. */\nexport enum Status {\n /** The status could not be determined. */\n Unknown = 'unknown',\n /** The event was skipped due to configuration or callbacks. */\n Skipped = 'skipped',\n /** The event was sent to Sentry successfully. */\n Success = 'success',\n /** The client is currently rate limited and will try again later. */\n RateLimit = 'rate_limit',\n /** The event could not be processed. */\n Invalid = 'invalid',\n /** A server-side error ocurred during submission. */\n Failed = 'failed',\n}\n\n// tslint:disable:no-unnecessary-qualifier no-namespace\nexport namespace Status {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n export function fromHttpCode(code: number): Status {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n\n if (code === 429) {\n return Status.RateLimit;\n }\n\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n\n if (code >= 500) {\n return Status.Failed;\n }\n\n return Status.Unknown;\n }\n}\n\n/** JSDoc */\nexport interface SentryWrappedFunction extends Function {\n [key: string]: any;\n __sentry__?: boolean;\n __sentry_wrapped__?: SentryWrappedFunction;\n __sentry_original__?: SentryWrappedFunction;\n}\n\n/** JSDoc */\nexport interface SentryEventHint {\n event_id?: string;\n syntheticException?: Error | null;\n originalException?: Error | null;\n data?: any;\n}\n\n/** JSDoc */\nexport interface SentryBreadcrumbHint {\n [key: string]: any;\n}\n"]} | ||
| {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAQtC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAItC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC","sourcesContent":["export { Breadcrumb, BreadcrumbHint } from './breadcrumb';\nexport { Client } from './client';\nexport { Dsn, DsnComponents, DsnLike, DsnProtocol } from './dsn';\nexport { ExtendedError } from './error';\nexport { Event, EventHint } from './event';\nexport { EventProcessor } from './eventprocessor';\nexport { Exception } from './exception';\nexport { Hub } from './hub';\nexport { Integration, IntegrationClass } from './integration';\nexport { LogLevel } from './loglevel';\nexport { Mechanism } from './mechanism';\nexport { Options } from './options';\nexport { Package } from './package';\nexport { Request } from './request';\nexport { Response } from './response';\nexport { Scope } from './scope';\nexport { SdkInfo } from './sdkinfo';\nexport { Severity } from './severity';\nexport { Span } from './span';\nexport { StackFrame } from './stackframe';\nexport { Stacktrace } from './stacktrace';\nexport { Status } from './status';\nexport { Thread } from './thread';\nexport { Transport, TransportOptions, TransportClass } from './transport';\nexport { User } from './user';\nexport { WrappedFunction } from './wrappedfunction';\n"]} |
+14
-12
@@ -1,2 +0,4 @@ | ||
| Copyright (c) 2018 Sentry (https://sentry.io) and individual contributors. | ||
| BSD 3-Clause License | ||
| Copyright (c) 2019, Sentry | ||
| All rights reserved. | ||
@@ -7,16 +9,16 @@ | ||
| 1. Redistributions of source code must retain the above copyright notice, | ||
| this list of conditions and the following disclaimer. | ||
| * Redistributions of source code must retain the above copyright notice, this | ||
| list of conditions and the following disclaimer. | ||
| 2. Redistributions in binary form must reproduce the above copyright | ||
| notice, this list of conditions and the following disclaimer in the | ||
| documentation and/or other materials provided with the distribution. | ||
| * Redistributions in binary form must reproduce the above copyright notice, | ||
| this list of conditions and the following disclaimer in the documentation | ||
| and/or other materials provided with the distribution. | ||
| 3. Neither the name of the Sentry nor the names of its contributors may be | ||
| used to endorse or promote products derived from this software without specific | ||
| prior written permission. | ||
| * Neither the name of the copyright holder nor the names of its | ||
| contributors may be used to endorse or promote products derived from | ||
| this software without specific prior written permission. | ||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
| ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
| WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
@@ -23,0 +25,0 @@ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
+10
-8
| { | ||
| "name": "@sentry/types", | ||
| "version": "4.5.3", | ||
| "version": "5.0.0-rc.0", | ||
| "description": "Types for all Sentry JavaScript SDKs", | ||
@@ -13,2 +13,3 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
| "main": "dist/index.js", | ||
| "module": "esm/index.js", | ||
| "types": "dist/index.d.ts", | ||
@@ -20,6 +21,6 @@ "publishConfig": { | ||
| "npm-run-all": "^4.1.2", | ||
| "prettier": "^1.14.0", | ||
| "prettier": "^1.16.4", | ||
| "prettier-check": "^2.0.0", | ||
| "tslint": "^5.11.0", | ||
| "typescript": "^3.2.0" | ||
| "tslint": "^5.14.0", | ||
| "typescript": "^3.3.3333" | ||
| }, | ||
@@ -29,6 +30,7 @@ "scripts": { | ||
| "build:es5": "tsc -p tsconfig.build.json", | ||
| "build:esm": "run-s build:esm:transpile build:esm:rewrite", | ||
| "build:esm:transpile": "tsc -p tsconfig.esm.json", | ||
| "build:esm:rewrite": "node ../../scripts/esm-rewrite.js", | ||
| "build:watch": "tsc -p tsconfig.build.json -w --preserveWatchOutput", | ||
| "build:esm": "tsc -p tsconfig.esm.json", | ||
| "build:watch": "run-p build:watch:es5 build:watch:esm", | ||
| "build:watch:es5": "tsc -p tsconfig.build.json -w --preserveWatchOutput", | ||
| "build:watch:esm": "tsc -p tsconfig.esm.json -w --preserveWatchOutput", | ||
| "link:yarn": "yarn link", | ||
| "lint": "run-s lint:prettier lint:tslint", | ||
@@ -35,0 +37,0 @@ "lint:prettier": "prettier-check \"{src,test}/**/*.ts\"", |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
121948
194.33%165
1733.33%1683
129.92%1
Infinity%3
200%1
Infinity%