@sentry/browser 7.0.0-alpha.1 → 7.0.0-beta.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/cjs/client.d.ts +23 -18
- package/cjs/client.d.ts.map +1 -1
- package/cjs/client.js +75 -51
- package/cjs/client.js.map +1 -1
- package/cjs/eventbuilder.d.ts +1 -1
- package/cjs/eventbuilder.js +31 -33
- package/cjs/eventbuilder.js.map +1 -1
- package/cjs/exports.d.ts +5 -4
- package/cjs/exports.d.ts.map +1 -1
- package/cjs/exports.js +20 -8
- package/cjs/exports.js.map +1 -1
- package/cjs/helpers.d.ts +0 -5
- package/cjs/helpers.d.ts.map +1 -1
- package/cjs/helpers.js +15 -49
- package/cjs/helpers.js.map +1 -1
- package/cjs/index.d.ts +1 -2
- package/cjs/index.d.ts.map +1 -1
- package/cjs/index.js +7 -9
- package/cjs/index.js.map +1 -1
- package/cjs/integrations/breadcrumbs.d.ts +6 -7
- package/cjs/integrations/breadcrumbs.d.ts.map +1 -1
- package/cjs/integrations/breadcrumbs.js +37 -54
- package/cjs/integrations/breadcrumbs.js.map +1 -1
- package/cjs/integrations/dedupe.js +25 -26
- package/cjs/integrations/dedupe.js.map +1 -1
- package/cjs/integrations/globalhandlers.d.ts.map +1 -1
- package/cjs/integrations/globalhandlers.js +52 -53
- package/cjs/integrations/globalhandlers.js.map +1 -1
- package/cjs/integrations/linkederrors.d.ts.map +1 -1
- package/cjs/integrations/linkederrors.js +26 -29
- package/cjs/integrations/linkederrors.js.map +1 -1
- package/cjs/integrations/trycatch.js +30 -40
- package/cjs/integrations/trycatch.js.map +1 -1
- package/cjs/integrations/useragent.js +19 -21
- package/cjs/integrations/useragent.js.map +1 -1
- package/cjs/sdk.d.ts +2 -2
- package/cjs/sdk.d.ts.map +1 -1
- package/cjs/sdk.js +47 -34
- package/cjs/sdk.js.map +1 -1
- package/cjs/stack-parsers.d.ts +7 -6
- package/cjs/stack-parsers.d.ts.map +1 -1
- package/cjs/stack-parsers.js +45 -45
- package/cjs/stack-parsers.js.map +1 -1
- package/cjs/transports/fetch.d.ts +7 -14
- package/cjs/transports/fetch.d.ts.map +1 -1
- package/cjs/transports/fetch.js +17 -78
- package/cjs/transports/fetch.js.map +1 -1
- package/cjs/transports/index.d.ts +2 -6
- package/cjs/transports/index.d.ts.map +1 -1
- package/cjs/transports/index.js +2 -10
- package/cjs/transports/index.js.map +1 -1
- package/cjs/transports/utils.d.ts.map +1 -1
- package/cjs/transports/utils.js +17 -17
- package/cjs/transports/utils.js.map +1 -1
- package/cjs/transports/xhr.d.ts +9 -9
- package/cjs/transports/xhr.d.ts.map +1 -1
- package/cjs/transports/xhr.js +39 -59
- package/cjs/transports/xhr.js.map +1 -1
- package/esm/client.d.ts +23 -18
- package/esm/client.d.ts.map +1 -1
- package/esm/client.js +73 -50
- package/esm/client.js.map +1 -1
- package/esm/eventbuilder.d.ts +1 -1
- package/esm/eventbuilder.js +30 -32
- package/esm/eventbuilder.js.map +1 -1
- package/esm/exports.d.ts +5 -4
- package/esm/exports.d.ts.map +1 -1
- package/esm/exports.js +4 -3
- package/esm/exports.js.map +1 -1
- package/esm/flags.js +1 -1
- package/esm/flags.js.map +1 -1
- package/esm/helpers.d.ts +0 -5
- package/esm/helpers.d.ts.map +1 -1
- package/esm/helpers.js +15 -48
- package/esm/helpers.js.map +1 -1
- package/esm/index.d.ts +1 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +4 -6
- package/esm/index.js.map +1 -1
- package/esm/integrations/breadcrumbs.d.ts +6 -7
- package/esm/integrations/breadcrumbs.d.ts.map +1 -1
- package/esm/integrations/breadcrumbs.js +36 -54
- package/esm/integrations/breadcrumbs.js.map +1 -1
- package/esm/integrations/dedupe.js +23 -25
- package/esm/integrations/dedupe.js.map +1 -1
- package/esm/integrations/globalhandlers.d.ts.map +1 -1
- package/esm/integrations/globalhandlers.js +48 -50
- package/esm/integrations/globalhandlers.js.map +1 -1
- package/esm/integrations/linkederrors.d.ts.map +1 -1
- package/esm/integrations/linkederrors.js +24 -28
- package/esm/integrations/linkederrors.js.map +1 -1
- package/esm/integrations/trycatch.js +28 -39
- package/esm/integrations/trycatch.js.map +1 -1
- package/esm/integrations/useragent.js +17 -20
- package/esm/integrations/useragent.js.map +1 -1
- package/esm/sdk.d.ts +2 -2
- package/esm/sdk.d.ts.map +1 -1
- package/esm/sdk.js +44 -31
- package/esm/sdk.js.map +1 -1
- package/esm/stack-parsers.d.ts +7 -6
- package/esm/stack-parsers.d.ts.map +1 -1
- package/esm/stack-parsers.js +45 -45
- package/esm/stack-parsers.js.map +1 -1
- package/esm/transports/fetch.d.ts +7 -14
- package/esm/transports/fetch.d.ts.map +1 -1
- package/esm/transports/fetch.js +15 -77
- package/esm/transports/fetch.js.map +1 -1
- package/esm/transports/index.d.ts +2 -6
- package/esm/transports/index.d.ts.map +1 -1
- package/esm/transports/index.js +2 -6
- package/esm/transports/index.js.map +1 -1
- package/esm/transports/utils.d.ts.map +1 -1
- package/esm/transports/utils.js +16 -16
- package/esm/transports/utils.js.map +1 -1
- package/esm/transports/xhr.d.ts +9 -9
- package/esm/transports/xhr.d.ts.map +1 -1
- package/esm/transports/xhr.js +38 -59
- package/esm/transports/xhr.js.map +1 -1
- package/esm/version.js +1 -1
- package/esm/version.js.map +1 -1
- package/package.json +4 -4
- package/types/client.d.ts +23 -18
- package/types/client.d.ts.map +1 -1
- package/types/eventbuilder.d.ts +1 -1
- package/types/exports.d.ts +5 -4
- 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 +1 -2
- 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/globalhandlers.d.ts.map +1 -1
- package/types/integrations/linkederrors.d.ts.map +1 -1
- package/types/sdk.d.ts +2 -2
- package/types/sdk.d.ts.map +1 -1
- package/types/stack-parsers.d.ts +7 -6
- package/types/stack-parsers.d.ts.map +1 -1
- package/types/transports/fetch.d.ts +7 -14
- package/types/transports/fetch.d.ts.map +1 -1
- package/types/transports/index.d.ts +2 -6
- package/types/transports/index.d.ts.map +1 -1
- package/types/transports/utils.d.ts.map +1 -1
- package/types/transports/xhr.d.ts +9 -9
- package/types/transports/xhr.d.ts.map +1 -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/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/setup.d.ts +0 -22
- package/cjs/transports/setup.d.ts.map +0 -1
- package/cjs/transports/setup.js +0 -44
- package/cjs/transports/setup.js.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/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/setup.d.ts +0 -22
- package/esm/transports/setup.d.ts.map +0 -1
- package/esm/transports/setup.js +0 -42
- package/esm/transports/setup.js.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/transports/setup.d.ts +0 -22
- package/types/transports/setup.d.ts.map +0 -1
package/esm/transports/xhr.js
CHANGED
|
@@ -1,63 +1,42 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
'retry-after': request.getResponseHeader('Retry-After'),
|
|
36
|
-
};
|
|
37
|
-
_this._handleResponse({ requestType: sentryRequest.type, response: request, headers: headers, resolve: resolve, reject: reject });
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
request.open('POST', sentryRequest.url);
|
|
41
|
-
for (var header in _this.options.headers) {
|
|
42
|
-
if (Object.prototype.hasOwnProperty.call(_this.options.headers, header)) {
|
|
43
|
-
request.setRequestHeader(header, _this.options.headers[header]);
|
|
44
|
-
}
|
|
1
|
+
import { createTransport } from '@sentry/core';
|
|
2
|
+
import { SyncPromise } from '@sentry/utils';
|
|
3
|
+
/**
|
|
4
|
+
* The DONE ready state for XmlHttpRequest
|
|
5
|
+
*
|
|
6
|
+
* Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined
|
|
7
|
+
* (e.g. during testing, it is `undefined`)
|
|
8
|
+
*
|
|
9
|
+
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}
|
|
10
|
+
*/
|
|
11
|
+
const XHR_READYSTATE_DONE = 4;
|
|
12
|
+
/**
|
|
13
|
+
* Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.
|
|
14
|
+
*/
|
|
15
|
+
export function makeXHRTransport(options) {
|
|
16
|
+
function makeRequest(request) {
|
|
17
|
+
return new SyncPromise((resolve, reject) => {
|
|
18
|
+
const xhr = new XMLHttpRequest();
|
|
19
|
+
xhr.onerror = reject;
|
|
20
|
+
xhr.onreadystatechange = () => {
|
|
21
|
+
if (xhr.readyState === XHR_READYSTATE_DONE) {
|
|
22
|
+
const response = {
|
|
23
|
+
headers: {
|
|
24
|
+
'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),
|
|
25
|
+
'retry-after': xhr.getResponseHeader('Retry-After'),
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
resolve(response);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
xhr.open('POST', options.url);
|
|
32
|
+
for (const header in options.headers) {
|
|
33
|
+
if (Object.prototype.hasOwnProperty.call(options.headers, header)) {
|
|
34
|
+
xhr.setRequestHeader(header, options.headers[header]);
|
|
45
35
|
}
|
|
46
|
-
request.send(sentryRequest.body);
|
|
47
|
-
});
|
|
48
|
-
})
|
|
49
|
-
.then(undefined, function (reason) {
|
|
50
|
-
// It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.
|
|
51
|
-
if (reason instanceof SentryError) {
|
|
52
|
-
_this.recordLostEvent('queue_overflow', sentryRequest.type);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
_this.recordLostEvent('network_error', sentryRequest.type);
|
|
56
36
|
}
|
|
57
|
-
|
|
37
|
+
xhr.send(request.body);
|
|
58
38
|
});
|
|
59
|
-
}
|
|
60
|
-
return
|
|
61
|
-
}
|
|
62
|
-
export { XHRTransport };
|
|
39
|
+
}
|
|
40
|
+
return createTransport(options, makeRequest);
|
|
41
|
+
}
|
|
63
42
|
//# sourceMappingURL=xhr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xhr.js","sourceRoot":"","sources":["../../../../src/transports/xhr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"xhr.js","sourceRoot":"","sources":["../../../../src/transports/xhr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;;;;;;GAOG;AACH,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAM9B;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAA4B;IAC3D,SAAS,WAAW,CAAC,OAAyB;QAC5C,OAAO,IAAI,WAAW,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACzC,MAAM,GAAG,GAAG,IAAI,cAAc,EAAE,CAAC;YAEjC,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC;YAErB,GAAG,CAAC,kBAAkB,GAAG,GAAS,EAAE;gBAClC,IAAI,GAAG,CAAC,UAAU,KAAK,mBAAmB,EAAE;oBAC1C,MAAM,QAAQ,GAAG;wBACf,OAAO,EAAE;4BACP,sBAAsB,EAAE,GAAG,CAAC,iBAAiB,CAAC,sBAAsB,CAAC;4BACrE,aAAa,EAAE,GAAG,CAAC,iBAAiB,CAAC,aAAa,CAAC;yBACpD;qBACF,CAAC;oBACF,OAAO,CAAC,QAAQ,CAAC,CAAC;iBACnB;YACH,CAAC,CAAC;YAEF,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;YAE9B,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,OAAO,EAAE;gBACpC,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;oBACjE,GAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;iBACvD;aACF;YAED,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import { createTransport } from '@sentry/core';\nimport { BaseTransportOptions, Transport, TransportMakeRequestResponse, TransportRequest } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nconst XHR_READYSTATE_DONE = 4;\n\nexport interface XHRTransportOptions extends BaseTransportOptions {\n headers?: { [key: string]: string };\n}\n\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nexport function makeXHRTransport(options: XHRTransportOptions): Transport {\n function makeRequest(request: TransportRequest): PromiseLike<TransportMakeRequestResponse> {\n return new SyncPromise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n xhr.onerror = reject;\n\n xhr.onreadystatechange = (): void => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n const response = {\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n };\n resolve(response);\n }\n };\n\n xhr.open('POST', options.url);\n\n for (const header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n\n xhr.send(request.body);\n });\n }\n\n return createTransport(options, makeRequest);\n}\n"]}
|
package/esm/version.js
CHANGED
package/esm/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../../src/version.ts"],"names":[],"mappings":"AAAA,wGAAwG;AACxG,MAAM,CAAC,MAAM,QAAQ,GAAG,2BAA2B,CAAC","sourcesContent":["// TODO: Remove in the next major release and rely only on @sentry/core SDK_VERSION and SdkInfo metadata\nexport const SDK_NAME = 'sentry.javascript.browser';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/browser",
|
|
3
|
-
"version": "7.0.0-
|
|
3
|
+
"version": "7.0.0-beta.0",
|
|
4
4
|
"description": "Official Sentry SDK for browsers",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/browser",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@sentry/core": "7.0.0-
|
|
20
|
-
"@sentry/types": "7.0.0-
|
|
21
|
-
"@sentry/utils": "7.0.0-
|
|
19
|
+
"@sentry/core": "7.0.0-beta.0",
|
|
20
|
+
"@sentry/types": "7.0.0-beta.0",
|
|
21
|
+
"@sentry/utils": "7.0.0-beta.0",
|
|
22
22
|
"tslib": "^1.9.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
package/types/client.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { BaseClient,
|
|
2
|
-
import { Event, EventHint, Options, Severity, SeverityLevel
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Configuration options for the Sentry Browser SDK.
|
|
6
|
-
* @see BrowserClient for more information.
|
|
7
|
-
*/
|
|
8
|
-
export interface BrowserOptions extends Options {
|
|
1
|
+
import { BaseClient, Scope } from '@sentry/core';
|
|
2
|
+
import { ClientOptions, Event, EventHint, Options, Severity, SeverityLevel } from '@sentry/types';
|
|
3
|
+
export interface BaseBrowserOptions {
|
|
9
4
|
/**
|
|
10
5
|
* A pattern for error URLs which should exclusively be sent to Sentry.
|
|
11
6
|
* This is the opposite of {@link Options.denyUrls}.
|
|
@@ -19,25 +14,31 @@ export interface BrowserOptions extends Options {
|
|
|
19
14
|
*/
|
|
20
15
|
denyUrls?: Array<string | RegExp>;
|
|
21
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Configuration options for the Sentry Browser SDK.
|
|
19
|
+
* @see @sentry/types Options for more information.
|
|
20
|
+
*/
|
|
21
|
+
export interface BrowserOptions extends Options, BaseBrowserOptions {
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Configuration options for the Sentry Browser SDK Client class
|
|
25
|
+
* @see BrowserClient for more information.
|
|
26
|
+
*/
|
|
27
|
+
export interface BrowserClientOptions extends ClientOptions, BaseBrowserOptions {
|
|
28
|
+
}
|
|
22
29
|
/**
|
|
23
30
|
* The Sentry Browser SDK Client.
|
|
24
31
|
*
|
|
25
32
|
* @see BrowserOptions for documentation on configuration options.
|
|
26
33
|
* @see SentryClient for usage documentation.
|
|
27
34
|
*/
|
|
28
|
-
export declare class BrowserClient extends BaseClient<
|
|
35
|
+
export declare class BrowserClient extends BaseClient<BrowserClientOptions> {
|
|
29
36
|
/**
|
|
30
37
|
* Creates a new Browser SDK instance.
|
|
31
38
|
*
|
|
32
39
|
* @param options Configuration options for this SDK.
|
|
33
40
|
*/
|
|
34
|
-
constructor(options:
|
|
35
|
-
/**
|
|
36
|
-
* Show a report dialog to the user to send feedback to a specific event.
|
|
37
|
-
*
|
|
38
|
-
* @param options Set individual options for the dialog
|
|
39
|
-
*/
|
|
40
|
-
showReportDialog(options?: ReportDialogOptions): void;
|
|
41
|
+
constructor(options: BrowserClientOptions);
|
|
41
42
|
/**
|
|
42
43
|
* @inheritDoc
|
|
43
44
|
*/
|
|
@@ -49,10 +50,14 @@ export declare class BrowserClient extends BaseClient<BrowserOptions> {
|
|
|
49
50
|
/**
|
|
50
51
|
* @inheritDoc
|
|
51
52
|
*/
|
|
52
|
-
|
|
53
|
+
sendEvent(event: Event): void;
|
|
53
54
|
/**
|
|
54
55
|
* @inheritDoc
|
|
55
56
|
*/
|
|
56
|
-
protected
|
|
57
|
+
protected _prepareEvent(event: Event, scope?: Scope, hint?: EventHint): PromiseLike<Event | null>;
|
|
58
|
+
/**
|
|
59
|
+
* Sends client reports as an envelope.
|
|
60
|
+
*/
|
|
61
|
+
private _flushOutcomes;
|
|
57
62
|
}
|
|
58
63
|
//# sourceMappingURL=client.d.ts.map
|
package/types/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAwD,KAAK,EAAe,MAAM,cAAc,CAAC;AACpH,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAkBlG,MAAM,WAAW,kBAAkB;IACjC;;;;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,MAAM,WAAW,cAAe,SAAQ,OAAO,EAAE,kBAAkB;CAAG;AAEtE;;;GAGG;AACH,MAAM,WAAW,oBAAqB,SAAQ,aAAa,EAAE,kBAAkB;CAAG;AAElF;;;;;GAKG;AACH,qBAAa,aAAc,SAAQ,UAAU,CAAC,oBAAoB,CAAC;IACjE;;;;OAIG;gBACgB,OAAO,EAAE,oBAAoB;IAwBhD;;OAEG;IACI,kBAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAInF;;OAEG;IACI,gBAAgB,CACrB,OAAO,EAAE,MAAM,EAEf,KAAK,GAAE,QAAQ,GAAG,aAAsB,EACxC,IAAI,CAAC,EAAE,SAAS,GACf,WAAW,CAAC,KAAK,CAAC;IAIrB;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAgCpC;;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,OAAO,CAAC,cAAc;CAwBvB"}
|
package/types/eventbuilder.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Event, EventHint, Exception, Severity, SeverityLevel, StackFrame, StackParser } from '@sentry/types';
|
|
2
2
|
/**
|
|
3
|
-
* This function creates an exception from
|
|
3
|
+
* This function creates an exception from a JavaScript Error
|
|
4
4
|
*/
|
|
5
5
|
export declare function exceptionFromError(stackParser: StackParser, ex: Error): Exception;
|
|
6
6
|
/**
|
package/types/exports.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export type { Breadcrumb, BreadcrumbHint, Request, SdkInfo, Event, EventHint,
|
|
1
|
+
export type { Breadcrumb, BreadcrumbHint, Request, SdkInfo, Event, EventHint, Exception, Severity, SeverityLevel, StackFrame, Stacktrace, Thread, User, } from '@sentry/types';
|
|
2
2
|
export type { BrowserOptions } from './client';
|
|
3
3
|
export type { ReportDialogOptions } from './helpers';
|
|
4
|
-
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 { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, createTransport, getHubFromCarrier, getCurrentHub, Hub, makeMain, Scope, Session, startTransaction, SDK_VERSION, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, FunctionToString, InboundFilters, } from '@sentry/core';
|
|
5
5
|
export { BrowserClient } from './client';
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
6
|
+
export { makeFetchTransport, makeXHRTransport } from './transports';
|
|
7
|
+
export { defaultStackParser, defaultStackLineParsers, chromeStackLineParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser, } from './stack-parsers';
|
|
8
8
|
export { defaultIntegrations, forceLoad, init, lastEventId, onLoad, showReportDialog, flush, close, wrap } from './sdk';
|
|
9
9
|
export { SDK_NAME } from './version';
|
|
10
|
+
export { GlobalHandlers, TryCatch, Breadcrumbs, LinkedErrors, UserAgent, Dedupe } from './integrations';
|
|
10
11
|
//# sourceMappingURL=exports.d.ts.map
|
package/types/exports.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/exports.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/exports.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,SAAS,EAET,QAAQ,EACR,aAAa,EACb,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC/C,YAAY,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAErD,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,eAAe,EACf,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,EACT,gBAAgB,EAChB,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AACzB,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;AACrC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC"}
|
package/types/helpers.d.ts
CHANGED
|
@@ -44,9 +44,4 @@ export interface ReportDialogOptions {
|
|
|
44
44
|
/** Callback after reportDialog showed up */
|
|
45
45
|
onLoad?(): void;
|
|
46
46
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Injects the Report Dialog script
|
|
49
|
-
* @hidden
|
|
50
|
-
*/
|
|
51
|
-
export declare function injectReportDialog(options?: ReportDialogOptions): void;
|
|
52
47
|
//# sourceMappingURL=helpers.d.ts.map
|
package/types/helpers.d.ts.map
CHANGED
|
@@ -1 +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;
|
|
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;AAWjG;;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"}
|
package/types/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export * from './exports';
|
|
2
2
|
import { Integrations as CoreIntegrations } from '@sentry/core';
|
|
3
3
|
import * as BrowserIntegrations from './integrations';
|
|
4
|
-
import * as Transports from './transports';
|
|
5
4
|
declare const INTEGRATIONS: {
|
|
6
5
|
GlobalHandlers: typeof BrowserIntegrations.GlobalHandlers;
|
|
7
6
|
TryCatch: typeof BrowserIntegrations.TryCatch;
|
|
@@ -12,5 +11,5 @@ declare const INTEGRATIONS: {
|
|
|
12
11
|
FunctionToString: typeof CoreIntegrations.FunctionToString;
|
|
13
12
|
InboundFilters: typeof CoreIntegrations.InboundFilters;
|
|
14
13
|
};
|
|
15
|
-
export { INTEGRATIONS as Integrations
|
|
14
|
+
export { INTEGRATIONS as Integrations };
|
|
16
15
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +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;
|
|
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;AAUtD,QAAA,MAAM,YAAY;;;;;;;;;CAIjB,CAAC;AAEF,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Integration } from '@sentry/types';
|
|
2
2
|
/** JSDoc */
|
|
3
3
|
interface BreadcrumbsOptions {
|
|
4
4
|
console: boolean;
|
|
@@ -10,6 +10,7 @@ interface BreadcrumbsOptions {
|
|
|
10
10
|
sentry: boolean;
|
|
11
11
|
xhr: boolean;
|
|
12
12
|
}
|
|
13
|
+
export declare const BREADCRUMB_INTEGRATION_ID = "Breadcrumbs";
|
|
13
14
|
/**
|
|
14
15
|
* Default Breadcrumbs instrumentations
|
|
15
16
|
* TODO: Deprecated - with v6, this will be renamed to `Instrument`
|
|
@@ -23,16 +24,14 @@ export declare class Breadcrumbs implements Integration {
|
|
|
23
24
|
* @inheritDoc
|
|
24
25
|
*/
|
|
25
26
|
name: string;
|
|
26
|
-
/** JSDoc */
|
|
27
|
-
private readonly _options;
|
|
28
27
|
/**
|
|
29
|
-
*
|
|
28
|
+
* Options of the breadcrumbs integration.
|
|
30
29
|
*/
|
|
31
|
-
|
|
30
|
+
readonly options: Readonly<BreadcrumbsOptions>;
|
|
32
31
|
/**
|
|
33
|
-
*
|
|
32
|
+
* @inheritDoc
|
|
34
33
|
*/
|
|
35
|
-
|
|
34
|
+
constructor(options?: Partial<BreadcrumbsOptions>);
|
|
36
35
|
/**
|
|
37
36
|
* Instrument browser built-ins w/ breadcrumb capturing
|
|
38
37
|
* - Console API
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"breadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/integrations/breadcrumbs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAU5C,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,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AAEvD;;;GAGG;AACH,qBAAa,WAAY,YAAW,WAAW;IAC7C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAA6B;IAErD;;OAEG;IACI,IAAI,EAAE,MAAM,CAAkB;IAErC;;OAEG;IAEH,SAAgB,OAAO,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IAEtD;;OAEG;gBACgB,OAAO,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC;IAYxD;;;;;;;OAOG;IACI,SAAS,IAAI,IAAI;CAiBzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalhandlers.d.ts","sourceRoot":"","sources":["../../../../src/integrations/globalhandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,WAAW,EAA0B,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"globalhandlers.d.ts","sourceRoot":"","sources":["../../../../src/integrations/globalhandlers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAyB,WAAW,EAA0B,MAAM,eAAe,CAAC;AAgB3F,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 +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,WAAW,EAAE,MAAM,eAAe,CAAC;AASrG,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;
|
|
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,WAAW,EAAE,MAAM,eAAe,CAAC;AASrG,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;CAUzB;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,WAAW,EACnB,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,KAAK,EACZ,IAAI,CAAC,EAAE,SAAS,GACf,KAAK,GAAG,IAAI,CAOd;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,aAAa,EACpB,GAAG,EAAE,MAAM,EACX,KAAK,GAAE,SAAS,EAAO,GACtB,SAAS,EAAE,CAMb"}
|
package/types/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Integrations as CoreIntegrations } from '@sentry/core';
|
|
1
|
+
import { Hub, Integrations as CoreIntegrations } from '@sentry/core';
|
|
2
2
|
import { BrowserOptions } from './client';
|
|
3
3
|
import { ReportDialogOptions } from './helpers';
|
|
4
4
|
import { Breadcrumbs, Dedupe, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';
|
|
@@ -66,7 +66,7 @@ export declare function init(options?: BrowserOptions): void;
|
|
|
66
66
|
*
|
|
67
67
|
* @param options Everything is optional, we try to fetch all info need from the global scope.
|
|
68
68
|
*/
|
|
69
|
-
export declare function showReportDialog(options?: ReportDialogOptions): void;
|
|
69
|
+
export declare function showReportDialog(options?: ReportDialogOptions, hub?: Hub): void;
|
|
70
70
|
/**
|
|
71
71
|
* This is the getter for lastEventId.
|
|
72
72
|
*
|
package/types/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,GAAG,EAEH,YAAY,IAAI,gBAAgB,EACjC,MAAM,cAAc,CAAC;AAUtB,OAAO,EAAuC,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/E,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;AAIxG,eAAO,MAAM,mBAAmB,uJAS/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,cAAmB,GAAG,IAAI,CA8BvD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,mBAAwB,EAAE,GAAG,GAAE,GAAqB,GAAG,IAAI,CAyCpG;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"}
|
package/types/stack-parsers.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { StackLineParser } from '@sentry/types';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
2
|
+
export declare const chromeStackLineParser: StackLineParser;
|
|
3
|
+
export declare const geckoStackLineParser: StackLineParser;
|
|
4
|
+
export declare const winjsStackLineParser: StackLineParser;
|
|
5
|
+
export declare const opera10StackLineParser: StackLineParser;
|
|
6
|
+
export declare const opera11StackLineParser: StackLineParser;
|
|
7
|
+
export declare const defaultStackLineParsers: StackLineParser[];
|
|
8
|
+
export declare const defaultStackParser: import("@sentry/types").StackParser;
|
|
8
9
|
//# sourceMappingURL=stack-parsers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack-parsers.d.ts","sourceRoot":"","sources":["../../../src/stack-parsers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,eAAe,EAAqB,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"stack-parsers.d.ts","sourceRoot":"","sources":["../../../src/stack-parsers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,eAAe,EAAqB,MAAM,eAAe,CAAC;AA+D/E,eAAO,MAAM,qBAAqB,EAAE,eAA2C,CAAC;AAoChF,eAAO,MAAM,oBAAoB,EAAE,eAAyC,CAAC;AAa7E,eAAO,MAAM,oBAAoB,EAAE,eAAyC,CAAC;AAS7E,eAAO,MAAM,sBAAsB,EAAE,eAA6C,CAAC;AAUnF,eAAO,MAAM,sBAAsB,EAAE,eAA6C,CAAC;AAEnF,eAAO,MAAM,uBAAuB,mBAAsE,CAAC;AAE3G,eAAO,MAAM,kBAAkB,qCAAgD,CAAC"}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BaseTransport } from './base';
|
|
1
|
+
import { BaseTransportOptions, Transport } from '@sentry/types';
|
|
3
2
|
import { FetchImpl } from './utils';
|
|
4
|
-
|
|
5
|
-
|
|
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>;
|
|
3
|
+
export interface FetchTransportOptions extends BaseTransportOptions {
|
|
4
|
+
requestOptions?: RequestInit;
|
|
16
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* Creates a Transport that uses the Fetch API to send events to Sentry.
|
|
8
|
+
*/
|
|
9
|
+
export declare function makeFetchTransport(options: FetchTransportOptions, nativeFetch?: FetchImpl): Transport;
|
|
17
10
|
//# sourceMappingURL=fetch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/transports/fetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/transports/fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAkD,MAAM,eAAe,CAAC;AAEhH,OAAO,EAAE,SAAS,EAAgC,MAAM,SAAS,CAAC;AAElE,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE,cAAc,CAAC,EAAE,WAAW,CAAC;CAC9B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,qBAAqB,EAC9B,WAAW,GAAE,SAA0C,GACtD,SAAS,CAkBX"}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { XHRTransport } from './xhr';
|
|
4
|
-
export { makeNewFetchTransport } from './new-fetch';
|
|
5
|
-
export { makeNewXHRTransport } from './new-xhr';
|
|
6
|
-
export { setupBrowserTransport } from './setup';
|
|
1
|
+
export { makeFetchTransport } from './fetch';
|
|
2
|
+
export { makeXHRTransport } from './xhr';
|
|
7
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/transports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/transports/utils.ts"],"names":[],"mappings":"AAOA,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,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/transports/utils.ts"],"names":[],"mappings":"AAOA,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,CAiB1D"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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>;
|
|
1
|
+
import { BaseTransportOptions, Transport } from '@sentry/types';
|
|
2
|
+
export interface XHRTransportOptions extends BaseTransportOptions {
|
|
3
|
+
headers?: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
10
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.
|
|
9
|
+
*/
|
|
10
|
+
export declare function makeXHRTransport(options: XHRTransportOptions): Transport;
|
|
11
11
|
//# sourceMappingURL=xhr.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../../src/transports/xhr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../../src/transports/xhr.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,SAAS,EAAkD,MAAM,eAAe,CAAC;AAahH,MAAM,WAAW,mBAAoB,SAAQ,oBAAoB;IAC/D,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACrC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,SAAS,CAgCxE"}
|
package/cjs/transports/base.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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,EASL,aAAa,EACb,UAAU,EAGX,MAAM,eAAe,CAAC;AAYvB,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"}
|