@sentry/browser 7.0.0-alpha.0 → 7.0.0-beta.1
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/README.md +2 -3
- package/cjs/client.js +130 -68
- package/cjs/client.js.map +1 -1
- package/cjs/eventbuilder.js +227 -168
- package/cjs/eventbuilder.js.map +1 -1
- package/cjs/exports.js +55 -42
- package/cjs/exports.js.map +1 -1
- package/cjs/flags.js +7 -3
- package/cjs/flags.js.map +1 -1
- package/cjs/helpers.js +123 -130
- package/cjs/helpers.js.map +1 -1
- package/cjs/index.js +78 -13
- package/cjs/index.js.map +1 -1
- package/cjs/integrations/breadcrumbs.js +223 -193
- package/cjs/integrations/breadcrumbs.js.map +1 -1
- package/cjs/integrations/dedupe.js +183 -143
- package/cjs/integrations/dedupe.js.map +1 -1
- package/cjs/integrations/globalhandlers.js +212 -171
- package/cjs/integrations/globalhandlers.js.map +1 -1
- package/cjs/integrations/httpcontext.js +51 -0
- package/cjs/integrations/httpcontext.js.map +1 -0
- package/cjs/integrations/index.js +18 -14
- package/cjs/integrations/index.js.map +1 -1
- package/cjs/integrations/linkederrors.js +79 -48
- package/cjs/integrations/linkederrors.js.map +1 -1
- package/cjs/integrations/trycatch.js +245 -216
- package/cjs/integrations/trycatch.js.map +1 -1
- package/cjs/sdk.js +168 -108
- package/cjs/sdk.js.map +1 -1
- package/cjs/stack-parsers.js +134 -83
- package/cjs/stack-parsers.js.map +1 -1
- package/cjs/transports/fetch.js +34 -80
- package/cjs/transports/fetch.js.map +1 -1
- package/cjs/transports/index.js +10 -12
- package/cjs/transports/index.js.map +1 -1
- package/cjs/transports/utils.js +57 -52
- package/cjs/transports/utils.js.map +1 -1
- package/cjs/transports/xhr.js +53 -63
- package/cjs/transports/xhr.js.map +1 -1
- package/esm/client.js +128 -67
- package/esm/client.js.map +1 -1
- package/esm/eventbuilder.js +218 -159
- package/esm/eventbuilder.js.map +1 -1
- package/esm/exports.js +12 -7
- package/esm/exports.js.map +1 -1
- package/esm/flags.js +5 -2
- package/esm/flags.js.map +1 -1
- package/esm/helpers.js +121 -127
- package/esm/helpers.js.map +1 -1
- package/esm/index.js +28 -10
- package/esm/index.js.map +1 -1
- package/esm/integrations/breadcrumbs.js +219 -191
- package/esm/integrations/breadcrumbs.js.map +1 -1
- package/esm/integrations/dedupe.js +180 -141
- package/esm/integrations/dedupe.js.map +1 -1
- package/esm/integrations/globalhandlers.js +209 -169
- package/esm/integrations/globalhandlers.js.map +1 -1
- package/esm/integrations/httpcontext.js +49 -0
- package/esm/integrations/httpcontext.js.map +1 -0
- package/esm/integrations/index.js +7 -7
- package/esm/integrations/index.js.map +1 -1
- package/esm/integrations/linkederrors.js +75 -45
- package/esm/integrations/linkederrors.js.map +1 -1
- package/esm/integrations/trycatch.js +242 -214
- package/esm/integrations/trycatch.js.map +1 -1
- package/esm/sdk.js +164 -105
- package/esm/sdk.js.map +1 -1
- package/esm/stack-parsers.js +126 -82
- package/esm/stack-parsers.js.map +1 -1
- package/esm/transports/fetch.js +32 -79
- package/esm/transports/fetch.js.map +1 -1
- package/esm/transports/index.js +3 -6
- package/esm/transports/index.js.map +1 -1
- package/esm/transports/utils.js +56 -51
- package/esm/transports/utils.js.map +1 -1
- package/esm/transports/xhr.js +51 -62
- package/esm/transports/xhr.js.map +1 -1
- package/package.json +4 -5
- package/types/client.d.ts +42 -11
- package/types/client.d.ts.map +1 -1
- package/types/eventbuilder.d.ts +10 -12
- package/types/eventbuilder.d.ts.map +1 -1
- package/types/exports.d.ts +7 -6
- package/types/exports.d.ts.map +1 -1
- package/types/helpers.d.ts +0 -5
- package/types/helpers.d.ts.map +1 -1
- package/types/index.d.ts +2 -3
- package/types/index.d.ts.map +1 -1
- package/types/integrations/breadcrumbs.d.ts +6 -7
- package/types/integrations/breadcrumbs.d.ts.map +1 -1
- package/types/integrations/dedupe.d.ts.map +1 -1
- package/types/integrations/globalhandlers.d.ts.map +1 -1
- package/types/integrations/{useragent.d.ts → httpcontext.d.ts} +3 -3
- package/types/integrations/httpcontext.d.ts.map +1 -0
- package/types/integrations/index.d.ts +1 -1
- package/types/integrations/index.d.ts.map +1 -1
- package/types/integrations/linkederrors.d.ts +3 -3
- package/types/integrations/linkederrors.d.ts.map +1 -1
- package/types/sdk.d.ts +5 -5
- package/types/sdk.d.ts.map +1 -1
- package/types/stack-parsers.d.ts +8 -6
- package/types/stack-parsers.d.ts.map +1 -1
- package/types/transports/fetch.d.ts +6 -15
- package/types/transports/fetch.d.ts.map +1 -1
- package/types/transports/index.d.ts +2 -5
- package/types/transports/index.d.ts.map +1 -1
- package/types/transports/types.d.ts +10 -0
- package/types/transports/types.d.ts.map +1 -0
- package/types/transports/utils.d.ts.map +1 -1
- package/types/transports/xhr.d.ts +6 -10
- package/types/transports/xhr.d.ts.map +1 -1
- package/cjs/backend.d.ts +0 -39
- package/cjs/backend.d.ts.map +0 -1
- package/cjs/backend.js +0 -58
- package/cjs/backend.js.map +0 -1
- package/cjs/client.d.ts +0 -33
- package/cjs/client.d.ts.map +0 -1
- package/cjs/eventbuilder.d.ts +0 -39
- package/cjs/eventbuilder.d.ts.map +0 -1
- package/cjs/exports.d.ts +0 -9
- package/cjs/exports.d.ts.map +0 -1
- package/cjs/flags.d.ts +0 -3
- package/cjs/flags.d.ts.map +0 -1
- package/cjs/helpers.d.ts +0 -52
- package/cjs/helpers.d.ts.map +0 -1
- package/cjs/index.d.ts +0 -16
- package/cjs/index.d.ts.map +0 -1
- package/cjs/integrations/breadcrumbs.d.ts +0 -47
- package/cjs/integrations/breadcrumbs.d.ts.map +0 -1
- package/cjs/integrations/dedupe.d.ts +0 -21
- package/cjs/integrations/dedupe.d.ts.map +0 -1
- package/cjs/integrations/globalhandlers.d.ts +0 -30
- package/cjs/integrations/globalhandlers.d.ts.map +0 -1
- package/cjs/integrations/index.d.ts +0 -7
- package/cjs/integrations/index.d.ts.map +0 -1
- package/cjs/integrations/linkederrors.d.ts +0 -42
- package/cjs/integrations/linkederrors.d.ts.map +0 -1
- package/cjs/integrations/trycatch.d.ts +0 -33
- package/cjs/integrations/trycatch.d.ts.map +0 -1
- package/cjs/integrations/useragent.d.ts +0 -17
- package/cjs/integrations/useragent.d.ts.map +0 -1
- package/cjs/integrations/useragent.js +0 -42
- package/cjs/integrations/useragent.js.map +0 -1
- package/cjs/sdk.d.ts +0 -112
- package/cjs/sdk.d.ts.map +0 -1
- package/cjs/stack-parsers.d.ts +0 -7
- package/cjs/stack-parsers.d.ts.map +0 -1
- package/cjs/transports/base.d.ts +0 -65
- package/cjs/transports/base.d.ts.map +0 -1
- package/cjs/transports/base.js +0 -141
- package/cjs/transports/base.js.map +0 -1
- package/cjs/transports/fetch.d.ts +0 -17
- package/cjs/transports/fetch.d.ts.map +0 -1
- package/cjs/transports/index.d.ts +0 -6
- package/cjs/transports/index.d.ts.map +0 -1
- package/cjs/transports/new-fetch.d.ts +0 -10
- package/cjs/transports/new-fetch.d.ts.map +0 -1
- package/cjs/transports/new-fetch.js +0 -27
- package/cjs/transports/new-fetch.js.map +0 -1
- package/cjs/transports/new-xhr.d.ts +0 -11
- package/cjs/transports/new-xhr.d.ts.map +0 -1
- package/cjs/transports/new-xhr.js +0 -46
- package/cjs/transports/new-xhr.js.map +0 -1
- package/cjs/transports/utils.d.ts +0 -48
- package/cjs/transports/utils.d.ts.map +0 -1
- package/cjs/transports/xhr.d.ts +0 -11
- package/cjs/transports/xhr.d.ts.map +0 -1
- package/cjs/version.d.ts +0 -2
- package/cjs/version.d.ts.map +0 -1
- package/cjs/version.js +0 -4
- package/cjs/version.js.map +0 -1
- package/esm/backend.d.ts +0 -39
- package/esm/backend.d.ts.map +0 -1
- package/esm/backend.js +0 -57
- package/esm/backend.js.map +0 -1
- package/esm/client.d.ts +0 -33
- package/esm/client.d.ts.map +0 -1
- package/esm/eventbuilder.d.ts +0 -39
- package/esm/eventbuilder.d.ts.map +0 -1
- package/esm/exports.d.ts +0 -9
- package/esm/exports.d.ts.map +0 -1
- package/esm/flags.d.ts +0 -3
- package/esm/flags.d.ts.map +0 -1
- package/esm/helpers.d.ts +0 -52
- package/esm/helpers.d.ts.map +0 -1
- package/esm/index.d.ts +0 -16
- package/esm/index.d.ts.map +0 -1
- package/esm/integrations/breadcrumbs.d.ts +0 -47
- package/esm/integrations/breadcrumbs.d.ts.map +0 -1
- package/esm/integrations/dedupe.d.ts +0 -21
- package/esm/integrations/dedupe.d.ts.map +0 -1
- package/esm/integrations/globalhandlers.d.ts +0 -30
- package/esm/integrations/globalhandlers.d.ts.map +0 -1
- package/esm/integrations/index.d.ts +0 -7
- package/esm/integrations/index.d.ts.map +0 -1
- package/esm/integrations/linkederrors.d.ts +0 -42
- package/esm/integrations/linkederrors.d.ts.map +0 -1
- package/esm/integrations/trycatch.d.ts +0 -33
- package/esm/integrations/trycatch.d.ts.map +0 -1
- package/esm/integrations/useragent.d.ts +0 -17
- package/esm/integrations/useragent.d.ts.map +0 -1
- package/esm/integrations/useragent.js +0 -41
- package/esm/integrations/useragent.js.map +0 -1
- package/esm/sdk.d.ts +0 -112
- package/esm/sdk.d.ts.map +0 -1
- package/esm/stack-parsers.d.ts +0 -7
- package/esm/stack-parsers.d.ts.map +0 -1
- package/esm/transports/base.d.ts +0 -65
- package/esm/transports/base.d.ts.map +0 -1
- package/esm/transports/base.js +0 -140
- package/esm/transports/base.js.map +0 -1
- package/esm/transports/fetch.d.ts +0 -17
- package/esm/transports/fetch.d.ts.map +0 -1
- package/esm/transports/index.d.ts +0 -6
- package/esm/transports/index.d.ts.map +0 -1
- package/esm/transports/new-fetch.d.ts +0 -10
- package/esm/transports/new-fetch.d.ts.map +0 -1
- package/esm/transports/new-fetch.js +0 -25
- package/esm/transports/new-fetch.js.map +0 -1
- package/esm/transports/new-xhr.d.ts +0 -11
- package/esm/transports/new-xhr.d.ts.map +0 -1
- package/esm/transports/new-xhr.js +0 -44
- package/esm/transports/new-xhr.js.map +0 -1
- package/esm/transports/utils.d.ts +0 -48
- package/esm/transports/utils.d.ts.map +0 -1
- package/esm/transports/xhr.d.ts +0 -11
- package/esm/transports/xhr.d.ts.map +0 -1
- package/esm/version.d.ts +0 -2
- package/esm/version.d.ts.map +0 -1
- package/esm/version.js +0 -3
- package/esm/version.js.map +0 -1
- package/types/backend.d.ts +0 -39
- package/types/backend.d.ts.map +0 -1
- package/types/integrations/useragent.d.ts.map +0 -1
- package/types/transports/base.d.ts +0 -65
- package/types/transports/base.d.ts.map +0 -1
- package/types/transports/new-fetch.d.ts +0 -10
- package/types/transports/new-fetch.d.ts.map +0 -1
- package/types/transports/new-xhr.d.ts +0 -11
- package/types/transports/new-xhr.d.ts.map +0 -1
- package/types/version.d.ts +0 -2
- package/types/version.d.ts.map +0 -1
package/esm/backend.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { BaseBackend } from '@sentry/core';
|
|
2
|
-
import { Event, EventHint, Options, Severity, Transport } from '@sentry/types';
|
|
3
|
-
/**
|
|
4
|
-
* Configuration options for the Sentry Browser SDK.
|
|
5
|
-
* @see BrowserClient for more information.
|
|
6
|
-
*/
|
|
7
|
-
export interface BrowserOptions extends Options {
|
|
8
|
-
/**
|
|
9
|
-
* A pattern for error URLs which should exclusively be sent to Sentry.
|
|
10
|
-
* This is the opposite of {@link Options.denyUrls}.
|
|
11
|
-
* By default, all errors will be sent.
|
|
12
|
-
*/
|
|
13
|
-
allowUrls?: Array<string | RegExp>;
|
|
14
|
-
/**
|
|
15
|
-
* A pattern for error URLs which should not be sent to Sentry.
|
|
16
|
-
* To allow certain errors instead, use {@link Options.allowUrls}.
|
|
17
|
-
* By default, all errors will be sent.
|
|
18
|
-
*/
|
|
19
|
-
denyUrls?: Array<string | RegExp>;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* The Sentry Browser SDK Backend.
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
export declare class BrowserBackend extends BaseBackend<BrowserOptions> {
|
|
26
|
-
/**
|
|
27
|
-
* @inheritDoc
|
|
28
|
-
*/
|
|
29
|
-
eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event>;
|
|
30
|
-
/**
|
|
31
|
-
* @inheritDoc
|
|
32
|
-
*/
|
|
33
|
-
eventFromMessage(message: string, level?: Severity, hint?: EventHint): PromiseLike<Event>;
|
|
34
|
-
/**
|
|
35
|
-
* @inheritDoc
|
|
36
|
-
*/
|
|
37
|
-
protected _setupTransport(): Transport;
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=backend.d.ts.map
|
package/esm/backend.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAyD,MAAM,cAAc,CAAC;AAClG,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAoB,MAAM,eAAe,CAAC;AAMjG;;;GAGG;AACH,MAAM,WAAW,cAAe,SAAQ,OAAO;IAC7C;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAEnC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACnC;AAED;;;GAGG;AACH,qBAAa,cAAe,SAAQ,WAAW,CAAC,cAAc,CAAC;IAC7D;;OAEG;IACI,kBAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAGnF;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,QAAwB,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAI/G;;OAEG;IACH,SAAS,CAAC,eAAe,IAAI,SAAS;CAgCvC"}
|
package/esm/backend.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { __assign, __extends } from "tslib";
|
|
2
|
-
import { BaseBackend, getEnvelopeEndpointWithUrlEncodedAuth, initAPIDetails } from '@sentry/core';
|
|
3
|
-
import { Severity } from '@sentry/types';
|
|
4
|
-
import { supportsFetch } from '@sentry/utils';
|
|
5
|
-
import { eventFromException, eventFromMessage } from './eventbuilder';
|
|
6
|
-
import { FetchTransport, makeNewFetchTransport, makeNewXHRTransport, XHRTransport } from './transports';
|
|
7
|
-
/**
|
|
8
|
-
* The Sentry Browser SDK Backend.
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
var BrowserBackend = /** @class */ (function (_super) {
|
|
12
|
-
__extends(BrowserBackend, _super);
|
|
13
|
-
function BrowserBackend() {
|
|
14
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* @inheritDoc
|
|
18
|
-
*/
|
|
19
|
-
BrowserBackend.prototype.eventFromException = function (exception, hint) {
|
|
20
|
-
return eventFromException(exception, hint, this._options.attachStacktrace);
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {
|
|
26
|
-
if (level === void 0) { level = Severity.Info; }
|
|
27
|
-
return eventFromMessage(message, level, hint, this._options.attachStacktrace);
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* @inheritDoc
|
|
31
|
-
*/
|
|
32
|
-
BrowserBackend.prototype._setupTransport = function () {
|
|
33
|
-
if (!this._options.dsn) {
|
|
34
|
-
// We return the noop transport here in case there is no Dsn.
|
|
35
|
-
return _super.prototype._setupTransport.call(this);
|
|
36
|
-
}
|
|
37
|
-
var transportOptions = __assign(__assign({}, this._options.transportOptions), { dsn: this._options.dsn, tunnel: this._options.tunnel, sendClientReports: this._options.sendClientReports, _metadata: this._options._metadata });
|
|
38
|
-
var api = initAPIDetails(transportOptions.dsn, transportOptions._metadata, transportOptions.tunnel);
|
|
39
|
-
var url = getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel);
|
|
40
|
-
if (this._options.transport) {
|
|
41
|
-
return new this._options.transport(transportOptions);
|
|
42
|
-
}
|
|
43
|
-
if (supportsFetch()) {
|
|
44
|
-
var requestOptions = __assign({}, transportOptions.fetchParameters);
|
|
45
|
-
this._newTransport = makeNewFetchTransport({ requestOptions: requestOptions, url: url });
|
|
46
|
-
return new FetchTransport(transportOptions);
|
|
47
|
-
}
|
|
48
|
-
this._newTransport = makeNewXHRTransport({
|
|
49
|
-
url: url,
|
|
50
|
-
headers: transportOptions.headers,
|
|
51
|
-
});
|
|
52
|
-
return new XHRTransport(transportOptions);
|
|
53
|
-
};
|
|
54
|
-
return BrowserBackend;
|
|
55
|
-
}(BaseBackend));
|
|
56
|
-
export { BrowserBackend };
|
|
57
|
-
//# sourceMappingURL=backend.js.map
|
package/esm/backend.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../../src/backend.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,qCAAqC,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO,EAA6B,QAAQ,EAA+B,MAAM,eAAe,CAAC;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAsBxG;;;GAGG;AACH;IAAoC,kCAA2B;IAA/D;;IAiDA,CAAC;IAhDC;;OAEG;IACI,2CAAkB,GAAzB,UAA0B,SAAkB,EAAE,IAAgB;QAC5D,OAAO,kBAAkB,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,gB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,OAAO,IAAI,cAAc,CAAC,gBAAgB,CAAC,CAAC;SAC7C;QAED,IAAI,CAAC,aAAa,GAAG,mBAAmB,CAAC;YACvC,GAAG,KAAA;YACH,OAAO,EAAE,gBAAgB,CAAC,OAAO;SAClC,CAAC,CAAC;QACH,OAAO,IAAI,YAAY,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;IACH,qBAAC;AAAD,CAAC,AAjDD,CAAoC,WAAW,GAiD9C","sourcesContent":["import { BaseBackend, getEnvelopeEndpointWithUrlEncodedAuth, initAPIDetails } from '@sentry/core';\nimport { Event, EventHint, Options, Severity, Transport, TransportOptions } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\n\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, makeNewFetchTransport, makeNewXHRTransport, XHRTransport } from './transports';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see BrowserClient for more information.\n */\nexport interface BrowserOptions extends Options {\n /**\n * A pattern for error URLs which should exclusively be sent to Sentry.\n * This is the opposite of {@link Options.denyUrls}.\n * By default, all errors will be sent.\n */\n allowUrls?: Array<string | RegExp>;\n\n /**\n * A pattern for error URLs which should not be sent to Sentry.\n * To allow certain errors instead, use {@link Options.allowUrls}.\n * By default, all errors will be sent.\n */\n denyUrls?: Array<string | RegExp>;\n}\n\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nexport class BrowserBackend extends BaseBackend<BrowserOptions> {\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event> {\n return eventFromException(exception, hint, this._options.attachStacktrace);\n }\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level: Severity = Severity.Info, hint?: EventHint): PromiseLike<Event> {\n return eventFromMessage(message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n protected _setupTransport(): Transport {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return super._setupTransport();\n }\n\n const transportOptions: TransportOptions = {\n ...this._options.transportOptions,\n dsn: this._options.dsn,\n tunnel: this._options.tunnel,\n sendClientReports: this._options.sendClientReports,\n _metadata: this._options._metadata,\n };\n\n const api = initAPIDetails(transportOptions.dsn, transportOptions._metadata, transportOptions.tunnel);\n const url = getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel);\n\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n const requestOptions: RequestInit = { ...transportOptions.fetchParameters };\n this._newTransport = makeNewFetchTransport({ requestOptions, url });\n return new FetchTransport(transportOptions);\n }\n\n this._newTransport = makeNewXHRTransport({\n url,\n headers: transportOptions.headers,\n });\n return new XHRTransport(transportOptions);\n }\n}\n"]}
|
package/esm/client.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BaseClient, Scope } from '@sentry/core';
|
|
2
|
-
import { Event, EventHint } from '@sentry/types';
|
|
3
|
-
import { BrowserBackend, BrowserOptions } from './backend';
|
|
4
|
-
import { ReportDialogOptions } from './helpers';
|
|
5
|
-
/**
|
|
6
|
-
* The Sentry Browser SDK Client.
|
|
7
|
-
*
|
|
8
|
-
* @see BrowserOptions for documentation on configuration options.
|
|
9
|
-
* @see SentryClient for usage documentation.
|
|
10
|
-
*/
|
|
11
|
-
export declare class BrowserClient extends BaseClient<BrowserBackend, BrowserOptions> {
|
|
12
|
-
/**
|
|
13
|
-
* Creates a new Browser SDK instance.
|
|
14
|
-
*
|
|
15
|
-
* @param options Configuration options for this SDK.
|
|
16
|
-
*/
|
|
17
|
-
constructor(options?: BrowserOptions);
|
|
18
|
-
/**
|
|
19
|
-
* Show a report dialog to the user to send feedback to a specific event.
|
|
20
|
-
*
|
|
21
|
-
* @param options Set individual options for the dialog
|
|
22
|
-
*/
|
|
23
|
-
showReportDialog(options?: ReportDialogOptions): void;
|
|
24
|
-
/**
|
|
25
|
-
* @inheritDoc
|
|
26
|
-
*/
|
|
27
|
-
protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike<Event | null>;
|
|
28
|
-
/**
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
protected _sendEvent(event: Event): void;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=client.d.ts.map
|
package/esm/client.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAe,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAGjD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3D,OAAO,EAAsB,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGpE;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,UAAU,CAAC,cAAc,EAAE,cAAc,CAAC;IAC3E;;;;OAIG;gBACgB,OAAO,GAAE,cAAmB;IAgB/C;;;;OAIG;IACI,gBAAgB,CAAC,OAAO,GAAE,mBAAwB,GAAG,IAAI;IAkBhE;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,GAAG,IAAI,CAAC;IAKjG;;OAEG;IACH,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAOzC"}
|
package/esm/eventbuilder.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { Event, EventHint, Exception, Severity, StackFrame } from '@sentry/types';
|
|
2
|
-
/**
|
|
3
|
-
* This function creates an exception from an TraceKitStackTrace
|
|
4
|
-
* @param stacktrace TraceKitStackTrace that will be converted to an exception
|
|
5
|
-
* @hidden
|
|
6
|
-
*/
|
|
7
|
-
export declare function exceptionFromError(ex: Error): Exception;
|
|
8
|
-
/**
|
|
9
|
-
* @hidden
|
|
10
|
-
*/
|
|
11
|
-
export declare function eventFromPlainObject(exception: Record<string, unknown>, syntheticException?: Error, isUnhandledRejection?: boolean): Event;
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export declare function eventFromError(ex: Error): Event;
|
|
16
|
-
/** Parses stack frames from an error */
|
|
17
|
-
export declare function parseStackFrames(ex: Error & {
|
|
18
|
-
framesToPop?: number;
|
|
19
|
-
stacktrace?: string;
|
|
20
|
-
}): StackFrame[];
|
|
21
|
-
/**
|
|
22
|
-
* Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
|
|
23
|
-
* @hidden
|
|
24
|
-
*/
|
|
25
|
-
export declare function eventFromException(exception: unknown, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
|
|
26
|
-
/**
|
|
27
|
-
* Builds and Event from a Message
|
|
28
|
-
* @hidden
|
|
29
|
-
*/
|
|
30
|
-
export declare function eventFromMessage(message: string, level?: Severity, hint?: EventHint, attachStacktrace?: boolean): PromiseLike<Event>;
|
|
31
|
-
/**
|
|
32
|
-
* @hidden
|
|
33
|
-
*/
|
|
34
|
-
export declare function eventFromUnknownInput(exception: unknown, syntheticException?: Error, attachStacktrace?: boolean, isUnhandledRejection?: boolean): Event;
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
export declare function eventFromString(input: string, syntheticException?: Error, attachStacktrace?: boolean): Event;
|
|
39
|
-
//# sourceMappingURL=eventbuilder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"eventbuilder.d.ts","sourceRoot":"","sources":["../../../src/eventbuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAwBlF;;;;GAI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umbHint, Request, SdkInfo, Event, EventHint, EventStatus, Exception, Response, Severity, StackFrame, Stacktrace, Thread, User, } from '@sentry/types';
|
|
2
|
-
export { SeverityLevel } from '@sentry/utils';
|
|
3
|
-
export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, makeMain, Scope, Session, startTransaction, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/core';
|
|
4
|
-
export { BrowserOptions } from './backend';
|
|
5
|
-
export { BrowserClient } from './client';
|
|
6
|
-
export { injectReportDialog, ReportDialogOptions } from './helpers';
|
|
7
|
-
export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap } from './sdk';
|
|
8
|
-
export { SDK_NAME } from './version';
|
|
9
|
-
//# sourceMappingURL=exports.d.ts.map
|
package/esm/exports.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,cAAc,EACd,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,QAAQ,EACR,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,SAAS,GACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AACxH,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC"}
|
package/esm/flags.d.ts
DELETED
package/esm/flags.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"flags.d.ts","sourceRoot":"","sources":["../../../src/flags.ts"],"names":[],"mappings":"AAgBA,2DAA2D;AAC3D,eAAO,MAAM,cAAc,SAAoE,CAAC"}
|
package/esm/helpers.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
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
|
package/esm/helpers.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;AAgBjG;;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/esm/index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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
|
package/esm/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,47 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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;AAK/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"}
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,7 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,42 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,33 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
|
-
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
|
|
3
|
-
import { getGlobalObject } from '@sentry/utils';
|
|
4
|
-
var global = getGlobalObject();
|
|
5
|
-
/** UserAgent */
|
|
6
|
-
var UserAgent = /** @class */ (function () {
|
|
7
|
-
function UserAgent() {
|
|
8
|
-
/**
|
|
9
|
-
* @inheritDoc
|
|
10
|
-
*/
|
|
11
|
-
this.name = UserAgent.id;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* @inheritDoc
|
|
15
|
-
*/
|
|
16
|
-
UserAgent.prototype.setupOnce = function () {
|
|
17
|
-
addGlobalEventProcessor(function (event) {
|
|
18
|
-
if (getCurrentHub().getIntegration(UserAgent)) {
|
|
19
|
-
// if none of the information we want exists, don't bother
|
|
20
|
-
if (!global.navigator && !global.location && !global.document) {
|
|
21
|
-
return event;
|
|
22
|
-
}
|
|
23
|
-
// grab as much info as exists and add it to the event
|
|
24
|
-
var url = (event.request && event.request.url) || (global.location && global.location.href);
|
|
25
|
-
var referrer = (global.document || {}).referrer;
|
|
26
|
-
var userAgent = (global.navigator || {}).userAgent;
|
|
27
|
-
var headers = __assign(__assign(__assign({}, (event.request && event.request.headers)), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));
|
|
28
|
-
var request = __assign(__assign({}, (url && { url: url })), { headers: headers });
|
|
29
|
-
return __assign(__assign({}, event), { request: request });
|
|
30
|
-
}
|
|
31
|
-
return event;
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* @inheritDoc
|
|
36
|
-
*/
|
|
37
|
-
UserAgent.id = 'UserAgent';
|
|
38
|
-
return UserAgent;
|
|
39
|
-
}());
|
|
40
|
-
export { UserAgent };
|
|
41
|
-
//# sourceMappingURL=useragent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useragent.js","sourceRoot":"","sources":["../../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,CAAC;IACL,CAAC;IArCD;;OAEG;IACW,YAAE,GAAW,WAAW,CAAC;IAmCzC,gBAAC;CAAA,AAvCD,IAuCC;SAvCY,SAAS","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { Event, Integration } from '@sentry/types';\nimport { getGlobalObject } from '@sentry/utils';\n\nconst global = getGlobalObject<Window>();\n\n/** UserAgent */\nexport class UserAgent implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'UserAgent';\n\n /**\n * @inheritDoc\n */\n public name: string = UserAgent.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor((event: Event) => {\n if (getCurrentHub().getIntegration(UserAgent)) {\n // if none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (global.location && global.location.href);\n const { referrer } = global.document || {};\n const { userAgent } = global.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...(url && { url }), headers };\n\n return { ...event, request };\n }\n return event;\n });\n }\n}\n"]}
|