@sentry/browser 6.18.1-beta.0 → 6.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/bundle.debug.min.js +3 -0
- package/bundles/bundle.debug.min.js.map +1 -0
- package/bundles/bundle.es6.debug.min.js +3 -0
- package/bundles/bundle.es6.debug.min.js.map +1 -0
- package/{build → bundles}/bundle.es6.js +270 -278
- package/bundles/bundle.es6.js.map +1 -0
- package/bundles/bundle.es6.min.js +3 -0
- package/bundles/bundle.es6.min.js.map +1 -0
- package/{build → bundles}/bundle.js +305 -306
- package/bundles/bundle.js.map +1 -0
- package/bundles/bundle.min.js +3 -0
- package/bundles/bundle.min.js.map +1 -0
- package/dist/backend.d.ts.map +1 -1
- package/dist/backend.js +2 -2
- package/dist/backend.js.map +1 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/eventbuilder.d.ts +24 -10
- package/dist/eventbuilder.d.ts.map +1 -1
- package/dist/eventbuilder.js +119 -23
- package/dist/eventbuilder.js.map +1 -1
- package/dist/exports.d.ts.map +1 -1
- package/dist/exports.js.map +1 -1
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +2 -6
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integrations/breadcrumbs.d.ts.map +1 -1
- package/dist/integrations/breadcrumbs.js.map +1 -1
- package/dist/integrations/dedupe.d.ts.map +1 -1
- package/dist/integrations/dedupe.js +1 -1
- package/dist/integrations/dedupe.js.map +1 -1
- package/dist/integrations/globalhandlers.d.ts.map +1 -1
- package/dist/integrations/globalhandlers.js +3 -11
- package/dist/integrations/globalhandlers.js.map +1 -1
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/index.js.map +1 -1
- package/dist/integrations/linkederrors.d.ts.map +1 -1
- package/dist/integrations/linkederrors.js +2 -2
- package/dist/integrations/linkederrors.js.map +1 -1
- package/dist/integrations/trycatch.d.ts.map +1 -1
- package/dist/integrations/trycatch.js +26 -21
- package/dist/integrations/trycatch.js.map +1 -1
- package/dist/integrations/useragent.d.ts.map +1 -1
- package/dist/integrations/useragent.js.map +1 -1
- package/dist/sdk.d.ts.map +1 -1
- package/dist/sdk.js +3 -9
- package/dist/sdk.js.map +1 -1
- package/dist/stack-parsers.d.ts +5 -5
- package/dist/stack-parsers.d.ts.map +1 -1
- package/dist/stack-parsers.js +16 -6
- package/dist/stack-parsers.js.map +1 -1
- package/dist/transports/base.d.ts +6 -6
- package/dist/transports/base.d.ts.map +1 -1
- package/dist/transports/base.js +17 -68
- package/dist/transports/base.js.map +1 -1
- package/dist/transports/fetch.d.ts.map +1 -1
- package/dist/transports/fetch.js +2 -0
- package/dist/transports/fetch.js.map +1 -1
- package/dist/transports/index.d.ts.map +1 -1
- package/dist/transports/index.js.map +1 -1
- package/dist/transports/utils.d.ts.map +1 -1
- package/dist/transports/utils.js +2 -3
- package/dist/transports/utils.js.map +1 -1
- package/dist/transports/xhr.d.ts.map +1 -1
- package/dist/transports/xhr.js +2 -0
- package/dist/transports/xhr.js.map +1 -1
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js.map +1 -1
- package/esm/backend.d.ts.map +1 -1
- package/esm/backend.js +2 -2
- package/esm/backend.js.map +1 -1
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js +2 -2
- package/esm/client.js.map +1 -1
- package/esm/eventbuilder.d.ts +24 -10
- package/esm/eventbuilder.d.ts.map +1 -1
- package/esm/eventbuilder.js +113 -21
- package/esm/eventbuilder.js.map +1 -1
- package/esm/exports.d.ts.map +1 -1
- package/esm/exports.js.map +1 -1
- package/esm/helpers.d.ts.map +1 -1
- package/esm/helpers.js +2 -6
- package/esm/helpers.js.map +1 -1
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js.map +1 -1
- package/esm/integrations/breadcrumbs.d.ts.map +1 -1
- package/esm/integrations/breadcrumbs.js.map +1 -1
- package/esm/integrations/dedupe.d.ts.map +1 -1
- package/esm/integrations/dedupe.js +2 -2
- package/esm/integrations/dedupe.js.map +1 -1
- package/esm/integrations/globalhandlers.d.ts.map +1 -1
- package/esm/integrations/globalhandlers.js +3 -11
- package/esm/integrations/globalhandlers.js.map +1 -1
- package/esm/integrations/index.d.ts.map +1 -1
- package/esm/integrations/index.js.map +1 -1
- package/esm/integrations/linkederrors.d.ts.map +1 -1
- package/esm/integrations/linkederrors.js +1 -1
- package/esm/integrations/linkederrors.js.map +1 -1
- package/esm/integrations/trycatch.d.ts.map +1 -1
- package/esm/integrations/trycatch.js +26 -21
- package/esm/integrations/trycatch.js.map +1 -1
- package/esm/integrations/useragent.d.ts.map +1 -1
- package/esm/integrations/useragent.js.map +1 -1
- package/esm/sdk.d.ts.map +1 -1
- package/esm/sdk.js +3 -9
- package/esm/sdk.js.map +1 -1
- package/esm/stack-parsers.d.ts +5 -5
- package/esm/stack-parsers.d.ts.map +1 -1
- package/esm/stack-parsers.js +16 -6
- package/esm/stack-parsers.js.map +1 -1
- package/esm/transports/base.d.ts +6 -6
- package/esm/transports/base.d.ts.map +1 -1
- package/esm/transports/base.js +19 -70
- package/esm/transports/base.js.map +1 -1
- package/esm/transports/fetch.d.ts.map +1 -1
- package/esm/transports/fetch.js +2 -0
- package/esm/transports/fetch.js.map +1 -1
- package/esm/transports/index.d.ts.map +1 -1
- package/esm/transports/index.js.map +1 -1
- package/esm/transports/utils.d.ts.map +1 -1
- package/esm/transports/utils.js +2 -3
- package/esm/transports/utils.js.map +1 -1
- package/esm/transports/xhr.d.ts.map +1 -1
- package/esm/transports/xhr.js +2 -0
- package/esm/transports/xhr.js.map +1 -1
- package/esm/version.d.ts.map +1 -1
- package/esm/version.js.map +1 -1
- package/package.json +16 -14
- package/types/backend.d.ts +43 -0
- package/types/backend.d.ts.map +1 -0
- package/types/client.d.ts +33 -0
- package/types/client.d.ts.map +1 -0
- package/types/eventbuilder.d.ts +39 -0
- package/types/eventbuilder.d.ts.map +1 -0
- package/types/exports.d.ts +10 -0
- package/types/exports.d.ts.map +1 -0
- package/types/helpers.d.ts +52 -0
- package/types/helpers.d.ts.map +1 -0
- package/types/index.d.ts +16 -0
- package/types/index.d.ts.map +1 -0
- package/types/integrations/breadcrumbs.d.ts +47 -0
- package/types/integrations/breadcrumbs.d.ts.map +1 -0
- package/types/integrations/dedupe.d.ts +21 -0
- package/types/integrations/dedupe.d.ts.map +1 -0
- package/types/integrations/globalhandlers.d.ts +30 -0
- package/types/integrations/globalhandlers.d.ts.map +1 -0
- package/types/integrations/index.d.ts +7 -0
- package/types/integrations/index.d.ts.map +1 -0
- package/types/integrations/linkederrors.d.ts +42 -0
- package/types/integrations/linkederrors.d.ts.map +1 -0
- package/types/integrations/trycatch.d.ts +33 -0
- package/types/integrations/trycatch.d.ts.map +1 -0
- package/types/integrations/useragent.d.ts +17 -0
- package/types/integrations/useragent.d.ts.map +1 -0
- package/types/sdk.d.ts +112 -0
- package/types/sdk.d.ts.map +1 -0
- package/types/stack-parsers.d.ts +7 -0
- package/types/stack-parsers.d.ts.map +1 -0
- package/types/transports/base.d.ts +65 -0
- package/types/transports/base.d.ts.map +1 -0
- package/types/transports/fetch.d.ts +17 -0
- package/types/transports/fetch.d.ts.map +1 -0
- package/types/transports/index.d.ts +4 -0
- package/types/transports/index.d.ts.map +1 -0
- package/types/transports/utils.d.ts +48 -0
- package/types/transports/utils.d.ts.map +1 -0
- package/types/transports/xhr.d.ts +11 -0
- package/types/transports/xhr.d.ts.map +1 -0
- package/types/version.d.ts +2 -0
- package/types/version.d.ts.map +1 -0
- package/build/bundle.es6.js.map +0 -1
- package/build/bundle.es6.min.js +0 -3
- package/build/bundle.es6.min.js.map +0 -1
- package/build/bundle.js.map +0 -1
- package/build/bundle.min.js +0 -3
- package/build/bundle.min.js.map +0 -1
- package/dist/parsers.d.ts +0 -21
- package/dist/parsers.d.ts.map +0 -1
- package/dist/parsers.js +0 -108
- package/dist/parsers.js.map +0 -1
- package/esm/parsers.d.ts +0 -21
- package/esm/parsers.d.ts.map +0 -1
- package/esm/parsers.js +0 -103
- package/esm/parsers.js.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { DsnLike, Mechanism, WrappedFunction } from '@sentry/types';
|
|
2
|
+
/**
|
|
3
|
+
* @hidden
|
|
4
|
+
*/
|
|
5
|
+
export declare function shouldIgnoreOnError(): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* @hidden
|
|
8
|
+
*/
|
|
9
|
+
export declare function ignoreNextOnError(): void;
|
|
10
|
+
/**
|
|
11
|
+
* Instruments the given function and sends an event to Sentry every time the
|
|
12
|
+
* function throws an exception.
|
|
13
|
+
*
|
|
14
|
+
* @param fn A function to wrap.
|
|
15
|
+
* @returns The wrapped function.
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
export declare function wrap(fn: WrappedFunction, options?: {
|
|
19
|
+
mechanism?: Mechanism;
|
|
20
|
+
}, before?: WrappedFunction): any;
|
|
21
|
+
/**
|
|
22
|
+
* All properties the report dialog supports
|
|
23
|
+
*/
|
|
24
|
+
export interface ReportDialogOptions {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
eventId?: string;
|
|
27
|
+
dsn?: DsnLike;
|
|
28
|
+
user?: {
|
|
29
|
+
email?: string;
|
|
30
|
+
name?: string;
|
|
31
|
+
};
|
|
32
|
+
lang?: string;
|
|
33
|
+
title?: string;
|
|
34
|
+
subtitle?: string;
|
|
35
|
+
subtitle2?: string;
|
|
36
|
+
labelName?: string;
|
|
37
|
+
labelEmail?: string;
|
|
38
|
+
labelComments?: string;
|
|
39
|
+
labelClose?: string;
|
|
40
|
+
labelSubmit?: string;
|
|
41
|
+
errorGeneric?: string;
|
|
42
|
+
errorFormEntry?: string;
|
|
43
|
+
successMessage?: string;
|
|
44
|
+
/** Callback after reportDialog showed up */
|
|
45
|
+
onLoad?(): void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Injects the Report Dialog script
|
|
49
|
+
* @hidden
|
|
50
|
+
*/
|
|
51
|
+
export declare function injectReportDialog(options?: ReportDialogOptions): void;
|
|
52
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAwB,SAAS,EAAS,eAAe,EAAE,MAAM,eAAe,CAAC;AAejG;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,CAMxC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAClB,EAAE,EAAE,eAAe,EACnB,OAAO,GAAE;IACP,SAAS,CAAC,EAAE,SAAS,CAAC;CAClB,EACN,MAAM,CAAC,EAAE,eAAe,GAEvB,GAAG,CAyGL;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAElC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE;QACL,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,MAAM,CAAC,IAAI,IAAI,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI,CA6B1E"}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './exports';
|
|
2
|
+
import { Integrations as CoreIntegrations } from '@sentry/core';
|
|
3
|
+
import * as BrowserIntegrations from './integrations';
|
|
4
|
+
import * as Transports from './transports';
|
|
5
|
+
declare const INTEGRATIONS: {
|
|
6
|
+
GlobalHandlers: typeof BrowserIntegrations.GlobalHandlers;
|
|
7
|
+
TryCatch: typeof BrowserIntegrations.TryCatch;
|
|
8
|
+
Breadcrumbs: typeof BrowserIntegrations.Breadcrumbs;
|
|
9
|
+
LinkedErrors: typeof BrowserIntegrations.LinkedErrors;
|
|
10
|
+
UserAgent: typeof BrowserIntegrations.UserAgent;
|
|
11
|
+
Dedupe: typeof BrowserIntegrations.Dedupe;
|
|
12
|
+
FunctionToString: typeof CoreIntegrations.FunctionToString;
|
|
13
|
+
InboundFilters: typeof CoreIntegrations.InboundFilters;
|
|
14
|
+
};
|
|
15
|
+
export { INTEGRATIONS as Integrations, Transports };
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAGhE,OAAO,KAAK,mBAAmB,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAU3C,QAAA,MAAM,YAAY;;;;;;;;;CAIjB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Event, Integration } from '@sentry/types';
|
|
2
|
+
/** JSDoc */
|
|
3
|
+
interface BreadcrumbsOptions {
|
|
4
|
+
console: boolean;
|
|
5
|
+
dom: boolean | {
|
|
6
|
+
serializeAttribute: string | string[];
|
|
7
|
+
};
|
|
8
|
+
fetch: boolean;
|
|
9
|
+
history: boolean;
|
|
10
|
+
sentry: boolean;
|
|
11
|
+
xhr: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Default Breadcrumbs instrumentations
|
|
15
|
+
* TODO: Deprecated - with v6, this will be renamed to `Instrument`
|
|
16
|
+
*/
|
|
17
|
+
export declare class Breadcrumbs implements Integration {
|
|
18
|
+
/**
|
|
19
|
+
* @inheritDoc
|
|
20
|
+
*/
|
|
21
|
+
static id: string;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/** JSDoc */
|
|
27
|
+
private readonly _options;
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
constructor(options?: Partial<BreadcrumbsOptions>);
|
|
32
|
+
/**
|
|
33
|
+
* Create a breadcrumb of `sentry` from the events themselves
|
|
34
|
+
*/
|
|
35
|
+
addSentryBreadcrumb(event: Event): void;
|
|
36
|
+
/**
|
|
37
|
+
* Instrument browser built-ins w/ breadcrumb capturing
|
|
38
|
+
* - Console API
|
|
39
|
+
* - DOM API (click/typing)
|
|
40
|
+
* - XMLHttpRequest API
|
|
41
|
+
* - Fetch API
|
|
42
|
+
* - History API
|
|
43
|
+
*/
|
|
44
|
+
setupOnce(): void;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAY,MAAM,eAAe,CAAC;AAW7D,YAAY;AACZ,UAAU,kBAAkB;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,OAAO,GAAG;QAAE,kBAAkB,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;IACzD,KAAK,EAAE,OAAO,CAAC;IACf,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,OAAO,CAAC;CACd;AAED;;;GAGG;AACH,qBAAa,WAAY,YAAW,WAAW;IAC7C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAiB;IAEzC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAkB;IAErC,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;IAE9C;;OAEG;gBACgB,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;IAYxD;;OAEG;IACI,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAiB9C;;;;;;;OAOG;IACI,SAAS,IAAI,IAAI;CAiBzB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EventProcessor, Hub, Integration } from '@sentry/types';
|
|
2
|
+
/** Deduplication filter */
|
|
3
|
+
export declare class Dedupe implements Integration {
|
|
4
|
+
/**
|
|
5
|
+
* @inheritDoc
|
|
6
|
+
*/
|
|
7
|
+
static id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
private _previousEvent?;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=dedupe.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dedupe.d.ts","sourceRoot":"","sources":["../../../src/integrations/dedupe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,cAAc,EAAa,GAAG,EAAE,WAAW,EAAc,MAAM,eAAe,CAAC;AAG/F,2BAA2B;AAC3B,qBAAa,MAAO,YAAW,WAAW;IACxC;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAY;IAEpC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAa;IAEhC;;OAEG;IACH,OAAO,CAAC,cAAc,CAAC,CAAQ;IAE/B;;OAEG;IACI,SAAS,CAAC,uBAAuB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI;CAmB9G"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Integration } from '@sentry/types';
|
|
2
|
+
declare type GlobalHandlersIntegrationsOptionKeys = 'onerror' | 'onunhandledrejection';
|
|
3
|
+
/** JSDoc */
|
|
4
|
+
declare type GlobalHandlersIntegrations = Record<GlobalHandlersIntegrationsOptionKeys, boolean>;
|
|
5
|
+
/** Global handlers */
|
|
6
|
+
export declare class GlobalHandlers implements Integration {
|
|
7
|
+
/**
|
|
8
|
+
* @inheritDoc
|
|
9
|
+
*/
|
|
10
|
+
static id: string;
|
|
11
|
+
/**
|
|
12
|
+
* @inheritDoc
|
|
13
|
+
*/
|
|
14
|
+
name: string;
|
|
15
|
+
/** JSDoc */
|
|
16
|
+
private readonly _options;
|
|
17
|
+
/**
|
|
18
|
+
* Stores references functions to installing handlers. Will set to undefined
|
|
19
|
+
* after they have been run so that they are not used twice.
|
|
20
|
+
*/
|
|
21
|
+
private _installFunc;
|
|
22
|
+
/** JSDoc */
|
|
23
|
+
constructor(options?: GlobalHandlersIntegrations);
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
setupOnce(): void;
|
|
28
|
+
}
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=globalhandlers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalhandlers.d.ts","sourceRoot":"","sources":["../../../src/integrations/globalhandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,WAAW,EAAuB,MAAM,eAAe,CAAC;AAexF,aAAK,oCAAoC,GAAG,SAAS,GAAG,sBAAsB,CAAC;AAE/E,YAAY;AACZ,aAAK,0BAA0B,GAAG,MAAM,CAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC;AAExF,sBAAsB;AACtB,qBAAa,cAAe,YAAW,WAAW;IAChD;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAoB;IAE5C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAqB;IAExC,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IAEtD;;;OAGG;IACH,OAAO,CAAC,YAAY,CAGlB;IAEF,YAAY;gBACO,OAAO,CAAC,EAAE,0BAA0B;IAOvD;;OAEG;IACI,SAAS,IAAI,IAAI;CAgBzB"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { GlobalHandlers } from './globalhandlers';
|
|
2
|
+
export { TryCatch } from './trycatch';
|
|
3
|
+
export { Breadcrumbs } from './breadcrumbs';
|
|
4
|
+
export { LinkedErrors } from './linkederrors';
|
|
5
|
+
export { UserAgent } from './useragent';
|
|
6
|
+
export { Dedupe } from './dedupe';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Event, EventHint, Exception, ExtendedError, Integration } from '@sentry/types';
|
|
2
|
+
interface LinkedErrorsOptions {
|
|
3
|
+
key: string;
|
|
4
|
+
limit: number;
|
|
5
|
+
}
|
|
6
|
+
/** Adds SDK info to an event. */
|
|
7
|
+
export declare class LinkedErrors implements Integration {
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
static id: string;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
readonly name: string;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
private readonly _key;
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
private readonly _limit;
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
constructor(options?: Partial<LinkedErrorsOptions>);
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
setupOnce(): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
export declare function _handler(key: string, limit: number, event: Event, hint?: EventHint): Event | null;
|
|
37
|
+
/**
|
|
38
|
+
* JSDOC
|
|
39
|
+
*/
|
|
40
|
+
export declare function _walkErrorTree(limit: number, error: ExtendedError, key: string, stack?: Exception[]): Exception[];
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=linkederrors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linkederrors.d.ts","sourceRoot":"","sources":["../../../src/integrations/linkederrors.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQxF,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,iCAAiC;AACjC,qBAAa,YAAa,YAAW,WAAW;IAC9C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAkB;IAE1C;;OAEG;IACH,SAAgB,IAAI,EAAE,MAAM,CAAmB;IAE/C;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA6B;IAElD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+B;IAEtD;;OAEG;gBACgB,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAM;IAK7D;;OAEG;IACI,SAAS,IAAI,IAAI;CAMzB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,IAAI,CAOjG;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,SAAS,EAAO,GAAG,SAAS,EAAE,CAMrH"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Integration } from '@sentry/types';
|
|
2
|
+
/** JSDoc */
|
|
3
|
+
interface TryCatchOptions {
|
|
4
|
+
setTimeout: boolean;
|
|
5
|
+
setInterval: boolean;
|
|
6
|
+
requestAnimationFrame: boolean;
|
|
7
|
+
XMLHttpRequest: boolean;
|
|
8
|
+
eventTarget: boolean | string[];
|
|
9
|
+
}
|
|
10
|
+
/** Wrap timer functions and event targets to catch errors and provide better meta data */
|
|
11
|
+
export declare class TryCatch implements Integration {
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
static id: string;
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
name: string;
|
|
20
|
+
/** JSDoc */
|
|
21
|
+
private readonly _options;
|
|
22
|
+
/**
|
|
23
|
+
* @inheritDoc
|
|
24
|
+
*/
|
|
25
|
+
constructor(options?: Partial<TryCatchOptions>);
|
|
26
|
+
/**
|
|
27
|
+
* Wrap timer functions and event targets to catch errors
|
|
28
|
+
* and provide better metadata.
|
|
29
|
+
*/
|
|
30
|
+
setupOnce(): void;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=trycatch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trycatch.d.ts","sourceRoot":"","sources":["../../../src/integrations/trycatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAmB,MAAM,eAAe,CAAC;AAuC7D,YAAY;AACZ,UAAU,eAAe;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,qBAAqB,EAAE,OAAO,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;CACjC;AAED,0FAA0F;AAC1F,qBAAa,QAAS,YAAW,WAAW;IAC1C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAc;IAEtC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAe;IAElC,YAAY;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkB;IAE3C;;OAEG;gBACgB,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC;IAWrD;;;OAGG;IACI,SAAS,IAAI,IAAI;CAyBzB"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Integration } from '@sentry/types';
|
|
2
|
+
/** UserAgent */
|
|
3
|
+
export declare class UserAgent implements Integration {
|
|
4
|
+
/**
|
|
5
|
+
* @inheritDoc
|
|
6
|
+
*/
|
|
7
|
+
static id: string;
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
setupOnce(): void;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=useragent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useragent.d.ts","sourceRoot":"","sources":["../../../src/integrations/useragent.ts"],"names":[],"mappings":"AACA,OAAO,EAAS,WAAW,EAAE,MAAM,eAAe,CAAC;AAKnD,gBAAgB;AAChB,qBAAa,SAAU,YAAW,WAAW;IAC3C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAe;IAEvC;;OAEG;IACI,IAAI,EAAE,MAAM,CAAgB;IAEnC;;OAEG;IACI,SAAS,IAAI,IAAI;CAyBzB"}
|
package/types/sdk.d.ts
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Integrations as CoreIntegrations } from '@sentry/core';
|
|
2
|
+
import { BrowserOptions } from './backend';
|
|
3
|
+
import { ReportDialogOptions } from './helpers';
|
|
4
|
+
import { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';
|
|
5
|
+
export declare const defaultIntegrations: (CoreIntegrations.FunctionToString | CoreIntegrations.InboundFilters | GlobalHandlers | TryCatch | Breadcrumbs | LinkedErrors | UserAgent | Dedupe)[];
|
|
6
|
+
/**
|
|
7
|
+
* The Sentry Browser SDK Client.
|
|
8
|
+
*
|
|
9
|
+
* To use this SDK, call the {@link init} function as early as possible when
|
|
10
|
+
* loading the web page. To set context information or send manual events, use
|
|
11
|
+
* the provided methods.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
*
|
|
15
|
+
* ```
|
|
16
|
+
*
|
|
17
|
+
* import { init } from '@sentry/browser';
|
|
18
|
+
*
|
|
19
|
+
* init({
|
|
20
|
+
* dsn: '__DSN__',
|
|
21
|
+
* // ...
|
|
22
|
+
* });
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* import { configureScope } from '@sentry/browser';
|
|
29
|
+
* configureScope((scope: Scope) => {
|
|
30
|
+
* scope.setExtra({ battery: 0.7 });
|
|
31
|
+
* scope.setTag({ user_mode: 'admin' });
|
|
32
|
+
* scope.setUser({ id: '4711' });
|
|
33
|
+
* });
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* import { addBreadcrumb } from '@sentry/browser';
|
|
40
|
+
* addBreadcrumb({
|
|
41
|
+
* message: 'My Breadcrumb',
|
|
42
|
+
* // ...
|
|
43
|
+
* });
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
*
|
|
48
|
+
* ```
|
|
49
|
+
*
|
|
50
|
+
* import * as Sentry from '@sentry/browser';
|
|
51
|
+
* Sentry.captureMessage('Hello, world!');
|
|
52
|
+
* Sentry.captureException(new Error('Good bye'));
|
|
53
|
+
* Sentry.captureEvent({
|
|
54
|
+
* message: 'Manual',
|
|
55
|
+
* stacktrace: [
|
|
56
|
+
* // ...
|
|
57
|
+
* ],
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
61
|
+
* @see {@link BrowserOptions} for documentation on configuration options.
|
|
62
|
+
*/
|
|
63
|
+
export declare function init(options?: BrowserOptions): void;
|
|
64
|
+
/**
|
|
65
|
+
* Present the user with a report dialog.
|
|
66
|
+
*
|
|
67
|
+
* @param options Everything is optional, we try to fetch all info need from the global scope.
|
|
68
|
+
*/
|
|
69
|
+
export declare function showReportDialog(options?: ReportDialogOptions): void;
|
|
70
|
+
/**
|
|
71
|
+
* This is the getter for lastEventId.
|
|
72
|
+
*
|
|
73
|
+
* @returns The last event id of a captured event.
|
|
74
|
+
*/
|
|
75
|
+
export declare function lastEventId(): string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* This function is here to be API compatible with the loader.
|
|
78
|
+
* @hidden
|
|
79
|
+
*/
|
|
80
|
+
export declare function forceLoad(): void;
|
|
81
|
+
/**
|
|
82
|
+
* This function is here to be API compatible with the loader.
|
|
83
|
+
* @hidden
|
|
84
|
+
*/
|
|
85
|
+
export declare function onLoad(callback: () => void): void;
|
|
86
|
+
/**
|
|
87
|
+
* Call `flush()` on the current client, if there is one. See {@link Client.flush}.
|
|
88
|
+
*
|
|
89
|
+
* @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
|
|
90
|
+
* the client to wait until all events are sent before resolving the promise.
|
|
91
|
+
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
92
|
+
* doesn't (or if there's no client defined).
|
|
93
|
+
*/
|
|
94
|
+
export declare function flush(timeout?: number): PromiseLike<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Call `close()` on the current client, if there is one. See {@link Client.close}.
|
|
97
|
+
*
|
|
98
|
+
* @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
|
|
99
|
+
* parameter will cause the client to wait until all events are sent before disabling itself.
|
|
100
|
+
* @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
|
|
101
|
+
* doesn't (or if there's no client defined).
|
|
102
|
+
*/
|
|
103
|
+
export declare function close(timeout?: number): PromiseLike<boolean>;
|
|
104
|
+
/**
|
|
105
|
+
* Wrap code within a try/catch block so the SDK is able to capture errors.
|
|
106
|
+
*
|
|
107
|
+
* @param fn A function to wrap.
|
|
108
|
+
*
|
|
109
|
+
* @returns The result of wrapped function call.
|
|
110
|
+
*/
|
|
111
|
+
export declare function wrap(fn: (...args: any) => any): any;
|
|
112
|
+
//# sourceMappingURL=sdk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,YAAY,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAI5F,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAwB,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAExG,eAAO,MAAM,mBAAmB,uJAS/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,cAAmB,GAAG,IAAI,CAuBvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI,CAiBxE;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,MAAM,GAAG,SAAS,CAEhD;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAEjD;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAO5D;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC,CAO5D;AAED;;;;;;GAMG;AAEH,wBAAgB,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,CAEnD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StackLineParser } from '@sentry/utils';
|
|
2
|
+
export declare const chromeStackParser: StackLineParser;
|
|
3
|
+
export declare const geckoStackParser: StackLineParser;
|
|
4
|
+
export declare const winjsStackParser: StackLineParser;
|
|
5
|
+
export declare const opera10StackParser: StackLineParser;
|
|
6
|
+
export declare const opera11StackParser: StackLineParser;
|
|
7
|
+
//# sourceMappingURL=stack-parsers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-parsers.d.ts","sourceRoot":"","sources":["../../src/stack-parsers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,eAAe,CAAC;AA8DnE,eAAO,MAAM,iBAAiB,EAAE,eAA2C,CAAC;AAoC5E,eAAO,MAAM,gBAAgB,EAAE,eAAyC,CAAC;AAazE,eAAO,MAAM,gBAAgB,EAAE,eAAyC,CAAC;AASzE,eAAO,MAAM,kBAAkB,EAAE,eAA6C,CAAC;AAU/E,eAAO,MAAM,kBAAkB,EAAE,eAA6C,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { APIDetails } from '@sentry/core';
|
|
2
|
+
import { Event, Outcome, Response as SentryResponse, SentryRequest, SentryRequestType, Session, Transport, TransportOptions } from '@sentry/types';
|
|
3
|
+
import { PromiseBuffer, RateLimits } from '@sentry/utils';
|
|
4
|
+
/** Base Transport class implementation */
|
|
5
|
+
export declare abstract class BaseTransport implements Transport {
|
|
6
|
+
options: TransportOptions;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated
|
|
9
|
+
*/
|
|
10
|
+
url: string;
|
|
11
|
+
/** Helper to get Sentry API endpoints. */
|
|
12
|
+
protected readonly _api: APIDetails;
|
|
13
|
+
/** A simple buffer holding all requests. */
|
|
14
|
+
protected readonly _buffer: PromiseBuffer<SentryResponse>;
|
|
15
|
+
/** Locks transport after receiving rate limits in a response */
|
|
16
|
+
protected _rateLimits: RateLimits;
|
|
17
|
+
protected _outcomes: {
|
|
18
|
+
[key: string]: number;
|
|
19
|
+
};
|
|
20
|
+
constructor(options: TransportOptions);
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
sendEvent(event: Event): PromiseLike<SentryResponse>;
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
sendSession(session: Session): PromiseLike<SentryResponse>;
|
|
29
|
+
/**
|
|
30
|
+
* @inheritDoc
|
|
31
|
+
*/
|
|
32
|
+
close(timeout?: number): PromiseLike<boolean>;
|
|
33
|
+
/**
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
recordLostEvent(reason: Outcome, category: SentryRequestType): void;
|
|
37
|
+
/**
|
|
38
|
+
* Send outcomes as an envelope
|
|
39
|
+
*/
|
|
40
|
+
protected _flushOutcomes(): void;
|
|
41
|
+
/**
|
|
42
|
+
* Handle Sentry repsonse for promise-based transports.
|
|
43
|
+
*/
|
|
44
|
+
protected _handleResponse({ requestType, response, headers, resolve, reject, }: {
|
|
45
|
+
requestType: SentryRequestType;
|
|
46
|
+
response: Response | XMLHttpRequest;
|
|
47
|
+
headers: Record<string, string | null>;
|
|
48
|
+
resolve: (value?: SentryResponse | PromiseLike<SentryResponse> | null | undefined) => void;
|
|
49
|
+
reject: (reason?: unknown) => void;
|
|
50
|
+
}): void;
|
|
51
|
+
/**
|
|
52
|
+
* Gets the time that given category is disabled until for rate limiting
|
|
53
|
+
*
|
|
54
|
+
* @deprecated Please use `disabledUntil` from @sentry/utils
|
|
55
|
+
*/
|
|
56
|
+
protected _disabledUntil(requestType: SentryRequestType): Date;
|
|
57
|
+
/**
|
|
58
|
+
* Checks if a category is rate limited
|
|
59
|
+
*
|
|
60
|
+
* @deprecated Please use `isRateLimited` from @sentry/utils
|
|
61
|
+
*/
|
|
62
|
+
protected _isRateLimited(requestType: SentryRequestType): boolean;
|
|
63
|
+
protected abstract _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike<SentryResponse>;
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/transports/base.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAMX,MAAM,cAAc,CAAC;AACtB,OAAO,EAEL,KAAK,EACL,OAAO,EACP,QAAQ,IAAI,cAAc,EAC1B,aAAa,EACb,iBAAiB,EACjB,OAAO,EACP,SAAS,EACT,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAUL,aAAa,EACb,UAAU,EAGX,MAAM,eAAe,CAAC;AAWvB,0CAA0C;AAC1C,8BAAsB,aAAc,YAAW,SAAS;IAiB5B,OAAO,EAAE,gBAAgB;IAhBnD;;OAEG;IACI,GAAG,EAAE,MAAM,CAAC;IAEnB,0CAA0C;IAC1C,SAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAEpC,4CAA4C;IAC5C,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAyB;IAElF,gEAAgE;IAChE,SAAS,CAAC,WAAW,EAAE,UAAU,CAAM;IAEvC,SAAS,CAAC,SAAS,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAM;gBAE1B,OAAO,EAAE,gBAAgB;IAcnD;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAAC,cAAc,CAAC;IAI3D;;OAEG;IACI,WAAW,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,CAAC,cAAc,CAAC;IAIjE;;OAEG;IACI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,CAAC,OAAO,CAAC;IAIpD;;OAEG;IACI,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAc1E;;OAEG;IACH,SAAS,CAAC,cAAc,IAAI,IAAI;IAoChC;;OAEG;IACH,SAAS,CAAC,eAAe,CAAC,EACxB,WAAW,EACX,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,GACP,EAAE;QACD,WAAW,EAAE,iBAAiB,CAAC;QAC/B,QAAQ,EAAE,QAAQ,GAAG,cAAc,CAAC;QACpC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;QACvC,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,cAAc,CAAC,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;QAC3F,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;KACpC,GAAG,IAAI;IAmBR;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,WAAW,EAAE,iBAAiB,GAAG,IAAI;IAK9D;;;;OAIG;IACH,SAAS,CAAC,cAAc,CAAC,WAAW,EAAE,iBAAiB,GAAG,OAAO;IAKjE,SAAS,CAAC,QAAQ,CAAC,YAAY,CAC7B,aAAa,EAAE,aAAa,EAC5B,eAAe,EAAE,KAAK,GAAG,OAAO,GAC/B,WAAW,CAAC,cAAc,CAAC;CAC/B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Event, Response, SentryRequest, Session, TransportOptions } from '@sentry/types';
|
|
2
|
+
import { BaseTransport } from './base';
|
|
3
|
+
import { FetchImpl } from './utils';
|
|
4
|
+
/** `fetch` based transport */
|
|
5
|
+
export declare class FetchTransport extends BaseTransport {
|
|
6
|
+
/**
|
|
7
|
+
* Fetch API reference which always points to native browser implementation.
|
|
8
|
+
*/
|
|
9
|
+
private _fetch;
|
|
10
|
+
constructor(options: TransportOptions, fetchImpl?: FetchImpl);
|
|
11
|
+
/**
|
|
12
|
+
* @param sentryRequest Prepared SentryRequest to be delivered
|
|
13
|
+
* @param originalPayload Original payload used to create SentryRequest
|
|
14
|
+
*/
|
|
15
|
+
protected _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike<Response>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../src/transports/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAG1F,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,SAAS,EAAgC,MAAM,SAAS,CAAC;AAElE,8BAA8B;AAC9B,qBAAa,cAAe,SAAQ,aAAa;IAC/C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAe;gBAEV,OAAO,EAAE,gBAAgB,EAAE,SAAS,GAAE,SAA0C;IAKnG;;;OAGG;IACH,SAAS,CAAC,YAAY,CAAC,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,GAAG,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC;CA+D9G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/transports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export declare type FetchImpl = typeof fetch;
|
|
2
|
+
/**
|
|
3
|
+
* A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.
|
|
4
|
+
* Whenever someone wraps the Fetch API and returns the wrong promise chain,
|
|
5
|
+
* this chain becomes orphaned and there is no possible way to capture it's rejections
|
|
6
|
+
* other than allowing it bubble up to this very handler. eg.
|
|
7
|
+
*
|
|
8
|
+
* const f = window.fetch;
|
|
9
|
+
* window.fetch = function () {
|
|
10
|
+
* const p = f.apply(this, arguments);
|
|
11
|
+
*
|
|
12
|
+
* p.then(function() {
|
|
13
|
+
* console.log('hi.');
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* return p;
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* `p.then(function () { ... })` is producing a completely separate promise chain,
|
|
20
|
+
* however, what's returned is `p` - the result of original `fetch` call.
|
|
21
|
+
*
|
|
22
|
+
* This mean, that whenever we use the Fetch API to send our own requests, _and_
|
|
23
|
+
* some ad-blocker blocks it, this orphaned chain will _always_ reject,
|
|
24
|
+
* effectively causing another event to be captured.
|
|
25
|
+
* This makes a whole process become an infinite loop, which we need to somehow
|
|
26
|
+
* deal with, and break it in one way or another.
|
|
27
|
+
*
|
|
28
|
+
* To deal with this issue, we are making sure that we _always_ use the real
|
|
29
|
+
* browser Fetch API, instead of relying on what `window.fetch` exposes.
|
|
30
|
+
* The only downside to this would be missing our own requests as breadcrumbs,
|
|
31
|
+
* but because we are already not doing this, it should be just fine.
|
|
32
|
+
*
|
|
33
|
+
* Possible failed fetch error messages per-browser:
|
|
34
|
+
*
|
|
35
|
+
* Chrome: Failed to fetch
|
|
36
|
+
* Edge: Failed to Fetch
|
|
37
|
+
* Firefox: NetworkError when attempting to fetch resource
|
|
38
|
+
* Safari: resource blocked by content blocker
|
|
39
|
+
*/
|
|
40
|
+
export declare function getNativeFetchImplementation(): FetchImpl;
|
|
41
|
+
/**
|
|
42
|
+
* Sends sdk client report using sendBeacon or fetch as a fallback if available
|
|
43
|
+
*
|
|
44
|
+
* @param url report endpoint
|
|
45
|
+
* @param body report payload
|
|
46
|
+
*/
|
|
47
|
+
export declare function sendReport(url: string, body: string): void;
|
|
48
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/transports/utils.ts"],"names":[],"mappings":"AAKA,oBAAY,SAAS,GAAG,OAAO,KAAK,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,4BAA4B,IAAI,SAAS,CAiCxD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAqB1D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Event, Response, SentryRequest, Session } from '@sentry/types';
|
|
2
|
+
import { BaseTransport } from './base';
|
|
3
|
+
/** `XHR` based transport */
|
|
4
|
+
export declare class XHRTransport extends BaseTransport {
|
|
5
|
+
/**
|
|
6
|
+
* @param sentryRequest Prepared SentryRequest to be delivered
|
|
7
|
+
* @param originalPayload Original payload used to create SentryRequest
|
|
8
|
+
*/
|
|
9
|
+
protected _sendRequest(sentryRequest: SentryRequest, originalPayload: Event | Session): PromiseLike<Response>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=xhr.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../src/transports/xhr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxE,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAEvC,4BAA4B;AAC5B,qBAAa,YAAa,SAAQ,aAAa;IAC7C;;;OAGG;IACH,SAAS,CAAC,YAAY,CAAC,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,KAAK,GAAG,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC;CAmD9G"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,QAAQ,8BAA8B,CAAC"}
|