@sentry/replay 7.104.0 → 8.0.0-alpha.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 +1 -1
- package/cjs/index.js +128 -258
- package/cjs/index.js.map +1 -1
- package/esm/index.js +130 -260
- package/esm/index.js.map +1 -1
- package/package.json +7 -7
- package/types/coreHandlers/handleBreadcrumbs.d.ts +14 -0
- package/types/coreHandlers/handleBreadcrumbs.d.ts.map +1 -0
- package/types/coreHandlers/handleGlobalEvent.d.ts +1 -1
- package/types/coreHandlers/handleGlobalEvent.d.ts.map +1 -1
- package/types/coreHandlers/handleNetworkBreadcrumbs.d.ts +1 -2
- package/types/coreHandlers/handleNetworkBreadcrumbs.d.ts.map +1 -1
- package/types/coreHandlers/util/fetchUtils.d.ts +3 -8
- package/types/coreHandlers/util/fetchUtils.d.ts.map +1 -1
- package/types/coreHandlers/util/networkUtils.d.ts +1 -2
- package/types/coreHandlers/util/networkUtils.d.ts.map +1 -1
- package/types/coreHandlers/util/xhrUtils.d.ts +2 -4
- package/types/coreHandlers/util/xhrUtils.d.ts.map +1 -1
- package/types/util/addGlobalListeners.d.ts.map +1 -1
- package/types/util/getReplay.d.ts.map +1 -1
- package/types/util/prepareReplayEvent.d.ts +2 -2
- package/types/util/prepareReplayEvent.d.ts.map +1 -1
- package/types-ts3.8/coreHandlers/handleBreadcrumbs.d.ts +14 -0
- package/types-ts3.8/coreHandlers/handleGlobalEvent.d.ts +1 -1
- package/types-ts3.8/coreHandlers/handleNetworkBreadcrumbs.d.ts +1 -2
- package/types-ts3.8/coreHandlers/util/fetchUtils.d.ts +3 -8
- package/types-ts3.8/coreHandlers/util/networkUtils.d.ts +1 -2
- package/types-ts3.8/coreHandlers/util/xhrUtils.d.ts +2 -4
- package/types-ts3.8/util/prepareReplayEvent.d.ts +2 -2
- package/types/coreHandlers/handleFetch.d.ts +0 -9
- package/types/coreHandlers/handleFetch.d.ts.map +0 -1
- package/types/coreHandlers/handleScope.d.ts +0 -13
- package/types/coreHandlers/handleScope.d.ts.map +0 -1
- package/types/coreHandlers/handleXhr.d.ts +0 -9
- package/types/coreHandlers/handleXhr.d.ts.map +0 -1
- package/types-ts3.8/coreHandlers/handleFetch.d.ts +0 -9
- package/types-ts3.8/coreHandlers/handleScope.d.ts +0 -13
- package/types-ts3.8/coreHandlers/handleXhr.d.ts +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/replay",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.0-alpha.1",
|
|
4
4
|
"description": "User replays for Sentry",
|
|
5
5
|
"main": "cjs/index.js",
|
|
6
6
|
"module": "esm/index.js",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"homepage": "https://docs.sentry.io/platforms/javascript/session-replay/",
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@babel/core": "^7.17.5",
|
|
34
|
-
"@sentry-internal/replay-worker": "
|
|
34
|
+
"@sentry-internal/replay-worker": "8.0.0-alpha.1",
|
|
35
35
|
"@sentry-internal/rrweb": "2.11.0",
|
|
36
36
|
"@sentry-internal/rrweb-snapshot": "2.11.0",
|
|
37
37
|
"fflate": "^0.8.1",
|
|
38
38
|
"jsdom-worker": "^0.2.1"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@sentry-internal/tracing": "
|
|
42
|
-
"@sentry/core": "
|
|
43
|
-
"@sentry/types": "
|
|
44
|
-
"@sentry/utils": "
|
|
41
|
+
"@sentry-internal/tracing": "8.0.0-alpha.1",
|
|
42
|
+
"@sentry/core": "8.0.0-alpha.1",
|
|
43
|
+
"@sentry/types": "8.0.0-alpha.1",
|
|
44
|
+
"@sentry/utils": "8.0.0-alpha.1"
|
|
45
45
|
},
|
|
46
46
|
"engines": {
|
|
47
|
-
"node": ">=
|
|
47
|
+
"node": ">=14.8"
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Breadcrumb } from '@sentry/types';
|
|
2
|
+
import type { ReplayContainer } from '../types';
|
|
3
|
+
import type { ReplayFrame } from '../types/replayFrame';
|
|
4
|
+
type BreadcrumbWithCategory = Required<Pick<Breadcrumb, 'category'>>;
|
|
5
|
+
/**
|
|
6
|
+
* Handle breadcrumbs that Sentry captures, and make sure to capture relevant breadcrumbs to Replay as well.
|
|
7
|
+
*/
|
|
8
|
+
export declare function handleBreadcrumbs(replay: ReplayContainer): void;
|
|
9
|
+
/** Exported only for tests. */
|
|
10
|
+
export declare function normalizeBreadcrumb(breadcrumb: Breadcrumb): Breadcrumb | null;
|
|
11
|
+
/** exported for tests only */
|
|
12
|
+
export declare function normalizeConsoleBreadcrumb(breadcrumb: Omit<Breadcrumb, 'category'> & BreadcrumbWithCategory): ReplayFrame;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=handleBreadcrumbs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handleBreadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleBreadcrumbs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAIhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAIxD,KAAK,sBAAsB,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAErE;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAQ/D;AAaD,+BAA+B;AAC/B,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,GAAG,IAAI,CAsB7E;AAED,8BAA8B;AAC9B,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,sBAAsB,GAChE,WAAW,CAgDb"}
|
|
@@ -3,5 +3,5 @@ import type { ReplayContainer } from '../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns a listener to be added to `addEventProcessor(listener)`.
|
|
5
5
|
*/
|
|
6
|
-
export declare function handleGlobalEventListener(replay: ReplayContainer
|
|
6
|
+
export declare function handleGlobalEventListener(replay: ReplayContainer): (event: Event, hint: EventHint) => Event | null;
|
|
7
7
|
//# sourceMappingURL=handleGlobalEvent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleGlobalEvent.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleGlobalEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAItD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"handleGlobalEvent.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleGlobalEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAItD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAMhD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,KAAK,KAAK,GAAG,IAAI,CA4DlH"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { Breadcrumb, BreadcrumbHint
|
|
1
|
+
import type { Breadcrumb, BreadcrumbHint } from '@sentry/types';
|
|
2
2
|
import type { ReplayContainer, ReplayNetworkOptions } from '../types';
|
|
3
3
|
interface ExtendedNetworkBreadcrumbsOptions extends ReplayNetworkOptions {
|
|
4
4
|
replay: ReplayContainer;
|
|
5
|
-
textEncoder: TextEncoderInternal;
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
8
7
|
* This method does two things:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleNetworkBreadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleNetworkBreadcrumbs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"handleNetworkBreadcrumbs.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleNetworkBreadcrumbs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAA0C,MAAM,eAAe,CAAC;AAIxG,OAAO,KAAK,EAAa,eAAe,EAAE,oBAAoB,EAAW,MAAM,UAAU,CAAC;AAI1F,UAAU,iCAAkC,SAAQ,oBAAoB;IACtE,MAAM,EAAE,eAAe,CAAC;CACzB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CA2BtE;AAED,8BAA8B;AAC9B,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iCAAiC,EAC1C,UAAU,EAAE,UAAU,EACtB,IAAI,CAAC,EAAE,cAAc,GACpB,IAAI,CA8BN"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Breadcrumb, FetchBreadcrumbData
|
|
1
|
+
import type { Breadcrumb, FetchBreadcrumbData } from '@sentry/types';
|
|
2
2
|
import type { FetchHint, ReplayContainer, ReplayNetworkOptions, ReplayNetworkRequestOrResponse } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Capture a fetch breadcrumb to a replay.
|
|
@@ -7,7 +7,6 @@ import type { FetchHint, ReplayContainer, ReplayNetworkOptions, ReplayNetworkReq
|
|
|
7
7
|
export declare function captureFetchBreadcrumbToReplay(breadcrumb: Breadcrumb & {
|
|
8
8
|
data: FetchBreadcrumbData;
|
|
9
9
|
}, hint: Partial<FetchHint>, options: ReplayNetworkOptions & {
|
|
10
|
-
textEncoder: TextEncoderInternal;
|
|
11
10
|
replay: ReplayContainer;
|
|
12
11
|
}): Promise<void>;
|
|
13
12
|
/**
|
|
@@ -17,11 +16,7 @@ export declare function captureFetchBreadcrumbToReplay(breadcrumb: Breadcrumb &
|
|
|
17
16
|
*/
|
|
18
17
|
export declare function enrichFetchBreadcrumb(breadcrumb: Breadcrumb & {
|
|
19
18
|
data: FetchBreadcrumbData;
|
|
20
|
-
}, hint: Partial<FetchHint
|
|
21
|
-
textEncoder: TextEncoderInternal;
|
|
22
|
-
}): void;
|
|
19
|
+
}, hint: Partial<FetchHint>): void;
|
|
23
20
|
/** Exported only for tests. */
|
|
24
|
-
export declare function _getResponseInfo(captureDetails: boolean, { networkCaptureBodies,
|
|
25
|
-
textEncoder: TextEncoderInternal;
|
|
26
|
-
}, response: Response | undefined, responseBodySize?: number): Promise<ReplayNetworkRequestOrResponse | undefined>;
|
|
21
|
+
export declare function _getResponseInfo(captureDetails: boolean, { networkCaptureBodies, networkResponseHeaders, }: Pick<ReplayNetworkOptions, 'networkCaptureBodies' | 'networkResponseHeaders'>, response: Response | undefined, responseBodySize?: number): Promise<ReplayNetworkRequestOrResponse | undefined>;
|
|
27
22
|
//# sourceMappingURL=fetchUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/fetchUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"fetchUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/fetchUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAIrE,OAAO,KAAK,EACV,SAAS,EAET,eAAe,EACf,oBAAoB,EAEpB,8BAA8B,EAC/B,MAAM,aAAa,CAAC;AAcrB;;;GAGG;AACH,wBAAsB,8BAA8B,CAClD,UAAU,EAAE,UAAU,GAAG;IAAE,IAAI,EAAE,mBAAmB,CAAA;CAAE,EACtD,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,EACxB,OAAO,EAAE,oBAAoB,GAAG;IAC9B,MAAM,EAAE,eAAe,CAAC;CACzB,GACA,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,UAAU,GAAG;IAAE,IAAI,EAAE,mBAAmB,CAAA;CAAE,EACtD,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,GACvB,IAAI,CAcN;AA4DD,+BAA+B;AAC/B,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,OAAO,EACvB,EACE,oBAAoB,EACpB,sBAAsB,GACvB,EAAE,IAAI,CAAC,oBAAoB,EAAE,sBAAsB,GAAG,wBAAwB,CAAC,EAChF,QAAQ,EAAE,QAAQ,GAAG,SAAS,EAC9B,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,8BAA8B,GAAG,SAAS,CAAC,CAyBrD"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { TextEncoderInternal } from '@sentry/types';
|
|
2
1
|
import type { NetworkMetaWarning, NetworkRequestData, ReplayNetworkRequestData, ReplayNetworkRequestOrResponse, ReplayPerformanceEntry } from '../../types';
|
|
3
2
|
/** Get the size of a body. */
|
|
4
|
-
export declare function getBodySize(body: RequestInit['body']
|
|
3
|
+
export declare function getBodySize(body: RequestInit['body']): number | undefined;
|
|
5
4
|
/** Convert a Content-Length header to number/undefined. */
|
|
6
5
|
export declare function parseContentLengthHeader(header: string | null | undefined): number | undefined;
|
|
7
6
|
/** Get the string representation of a body. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"networkUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/networkUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"networkUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/networkUtils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAEV,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAErB,8BAA8B;AAC9B,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS,CAmCzE;AAED,4DAA4D;AAC5D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO9F;AAED,+CAA+C;AAC/C,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,CAAC,MAAM,GAAG,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAyBtF;AAED,iEAAiE;AACjE,wBAAgB,YAAY,CAC1B,IAAI,EAAE,8BAA8B,GAAG,SAAS,EAChD,OAAO,EAAE,kBAAkB,GAC1B,8BAA8B,CAiBhC;AAED,8DAA8D;AAC9D,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,wBAAwB,GAAG,IAAI,GACpC,sBAAsB,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAqBnD;AAED,0FAA0F;AAC1F,wBAAgB,oCAAoC,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,8BAA8B,CAQjH;AAED,yEAAyE;AACzE,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,IAAI,EAAE,MAAM,GAAG,SAAS,GACvB,8BAA8B,GAAG,SAAS,CAgC5C;AAED,8BAA8B;AAC9B,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CASnH;AA8DD,oDAAoD;AACpD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,GAAG,OAAO,CAI1E;AAED,yBAAyB;AACzB,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,SAA0B,GAAG,MAAM,CAoBjF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Breadcrumb,
|
|
1
|
+
import type { Breadcrumb, XhrBreadcrumbData } from '@sentry/types';
|
|
2
2
|
import type { NetworkMetaWarning, ReplayContainer, ReplayNetworkOptions, XhrHint } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Capture an XHR breadcrumb to a replay.
|
|
@@ -16,9 +16,7 @@ export declare function captureXhrBreadcrumbToReplay(breadcrumb: Breadcrumb & {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function enrichXhrBreadcrumb(breadcrumb: Breadcrumb & {
|
|
18
18
|
data: XhrBreadcrumbData;
|
|
19
|
-
}, hint: Partial<XhrHint
|
|
20
|
-
textEncoder: TextEncoderInternal;
|
|
21
|
-
}): void;
|
|
19
|
+
}, hint: Partial<XhrHint>): void;
|
|
22
20
|
/**
|
|
23
21
|
* Get the string representation of the XHR response.
|
|
24
22
|
* Based on MDN, these are the possible types of the response:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xhrUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/xhrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"xhrUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/xhrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAInE,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EAEpB,OAAO,EACR,MAAM,aAAa,CAAC;AAcrB;;;GAGG;AACH,wBAAsB,4BAA4B,CAChD,UAAU,EAAE,UAAU,GAAG;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,EACpD,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,EACtB,OAAO,EAAE,oBAAoB,GAAG;IAAE,MAAM,EAAE,eAAe,CAAA;CAAE,GAC1D,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,UAAU,EAAE,UAAU,GAAG;IAAE,IAAI,EAAE,iBAAiB,CAAA;CAAE,EACpD,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,GACrB,IAAI,CAkBN;AA+FD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,cAAc,CAAC,UAAU,CAAC,EAChC,YAAY,EAAE,cAAc,CAAC,cAAc,CAAC,GAC3C,CAAC,MAAM,GAAG,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAyB3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addGlobalListeners.d.ts","sourceRoot":"","sources":["../../../../src/util/addGlobalListeners.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"addGlobalListeners.d.ts","sourceRoot":"","sources":["../../../../src/util/addGlobalListeners.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAmDhE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getReplay.d.ts","sourceRoot":"","sources":["../../../../src/util/getReplay.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;GAEG;
|
|
1
|
+
{"version":3,"file":"getReplay.d.ts","sourceRoot":"","sources":["../../../../src/util/getReplay.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAExD;;GAEG;AACH,wBAAgB,SAAS,IAAI,UAAU,CAAC,OAAO,iBAAiB,CAAC,GAAG,SAAS,CAG5E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { IntegrationIndex
|
|
2
|
-
import type { Client, ReplayEvent } from '@sentry/types';
|
|
1
|
+
import type { IntegrationIndex } from '@sentry/core';
|
|
2
|
+
import type { Client, ReplayEvent, Scope } from '@sentry/types';
|
|
3
3
|
/**
|
|
4
4
|
* Prepare a replay event & enrich it with the SDK metadata.
|
|
5
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepareReplayEvent.d.ts","sourceRoot":"","sources":["../../../../src/util/prepareReplayEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"prepareReplayEvent.d.ts","sourceRoot":"","sources":["../../../../src/util/prepareReplayEvent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAErD,OAAO,KAAK,EAAE,MAAM,EAAa,WAAW,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAE3E;;GAEG;AACH,wBAAsB,kBAAkB,CAAC,EACvC,MAAM,EACN,KAAK,EACL,QAAQ,EAAE,QAAQ,EAClB,KAAK,GACN,EAAE;IACD,MAAM,EAAE,MAAM,GAAG;QAAE,aAAa,CAAC,EAAE,gBAAgB,CAAA;KAAE,CAAC;IACtD,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,WAAW,CAAC;CACpB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAwC9B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Breadcrumb } from '@sentry/types';
|
|
2
|
+
import { ReplayContainer } from '../types';
|
|
3
|
+
import { ReplayFrame } from '../types/replayFrame';
|
|
4
|
+
type BreadcrumbWithCategory = Required<Pick<Breadcrumb, 'category'>>;
|
|
5
|
+
/**
|
|
6
|
+
* Handle breadcrumbs that Sentry captures, and make sure to capture relevant breadcrumbs to Replay as well.
|
|
7
|
+
*/
|
|
8
|
+
export declare function handleBreadcrumbs(replay: ReplayContainer): void;
|
|
9
|
+
/** Exported only for tests. */
|
|
10
|
+
export declare function normalizeBreadcrumb(breadcrumb: Breadcrumb): Breadcrumb | null;
|
|
11
|
+
/** exported for tests only */
|
|
12
|
+
export declare function normalizeConsoleBreadcrumb(breadcrumb: Pick<Breadcrumb, Exclude<keyof Breadcrumb, 'category'>> & BreadcrumbWithCategory): ReplayFrame;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=handleBreadcrumbs.d.ts.map
|
|
@@ -3,5 +3,5 @@ import { ReplayContainer } from '../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns a listener to be added to `addEventProcessor(listener)`.
|
|
5
5
|
*/
|
|
6
|
-
export declare function handleGlobalEventListener(replay: ReplayContainer
|
|
6
|
+
export declare function handleGlobalEventListener(replay: ReplayContainer): (event: Event, hint: EventHint) => Event | null;
|
|
7
7
|
//# sourceMappingURL=handleGlobalEvent.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Breadcrumb, BreadcrumbHint
|
|
1
|
+
import { Breadcrumb, BreadcrumbHint } from '@sentry/types';
|
|
2
2
|
import { ReplayContainer, ReplayNetworkOptions } from '../types';
|
|
3
3
|
interface ExtendedNetworkBreadcrumbsOptions extends ReplayNetworkOptions {
|
|
4
4
|
replay: ReplayContainer;
|
|
5
|
-
textEncoder: TextEncoderInternal;
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
8
7
|
* This method does two things:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Breadcrumb, FetchBreadcrumbData
|
|
1
|
+
import { Breadcrumb, FetchBreadcrumbData } from '@sentry/types';
|
|
2
2
|
import { FetchHint, ReplayContainer, ReplayNetworkOptions, ReplayNetworkRequestOrResponse } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Capture a fetch breadcrumb to a replay.
|
|
@@ -7,7 +7,6 @@ import { FetchHint, ReplayContainer, ReplayNetworkOptions, ReplayNetworkRequestO
|
|
|
7
7
|
export declare function captureFetchBreadcrumbToReplay(breadcrumb: Breadcrumb & {
|
|
8
8
|
data: FetchBreadcrumbData;
|
|
9
9
|
}, hint: Partial<FetchHint>, options: ReplayNetworkOptions & {
|
|
10
|
-
textEncoder: TextEncoderInternal;
|
|
11
10
|
replay: ReplayContainer;
|
|
12
11
|
}): Promise<void>;
|
|
13
12
|
/**
|
|
@@ -17,11 +16,7 @@ export declare function captureFetchBreadcrumbToReplay(breadcrumb: Breadcrumb &
|
|
|
17
16
|
*/
|
|
18
17
|
export declare function enrichFetchBreadcrumb(breadcrumb: Breadcrumb & {
|
|
19
18
|
data: FetchBreadcrumbData;
|
|
20
|
-
}, hint: Partial<FetchHint
|
|
21
|
-
textEncoder: TextEncoderInternal;
|
|
22
|
-
}): void;
|
|
19
|
+
}, hint: Partial<FetchHint>): void;
|
|
23
20
|
/** Exported only for tests. */
|
|
24
|
-
export declare function _getResponseInfo(captureDetails: boolean, { networkCaptureBodies,
|
|
25
|
-
textEncoder: TextEncoderInternal;
|
|
26
|
-
}, response: Response | undefined, responseBodySize?: number): Promise<ReplayNetworkRequestOrResponse | undefined>;
|
|
21
|
+
export declare function _getResponseInfo(captureDetails: boolean, { networkCaptureBodies, networkResponseHeaders, }: Pick<ReplayNetworkOptions, 'networkCaptureBodies' | 'networkResponseHeaders'>, response: Response | undefined, responseBodySize?: number): Promise<ReplayNetworkRequestOrResponse | undefined>;
|
|
27
22
|
//# sourceMappingURL=fetchUtils.d.ts.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { TextEncoderInternal } from '@sentry/types';
|
|
2
1
|
import { NetworkMetaWarning, NetworkRequestData, ReplayNetworkRequestData, ReplayNetworkRequestOrResponse, ReplayPerformanceEntry } from '../../types';
|
|
3
2
|
/** Get the size of a body. */
|
|
4
|
-
export declare function getBodySize(body: RequestInit['body']
|
|
3
|
+
export declare function getBodySize(body: RequestInit['body']): number | undefined;
|
|
5
4
|
/** Convert a Content-Length header to number/undefined. */
|
|
6
5
|
export declare function parseContentLengthHeader(header: string | null | undefined): number | undefined;
|
|
7
6
|
/** Get the string representation of a body. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Breadcrumb,
|
|
1
|
+
import { Breadcrumb, XhrBreadcrumbData } from '@sentry/types';
|
|
2
2
|
import { NetworkMetaWarning, ReplayContainer, ReplayNetworkOptions, XhrHint } from '../../types';
|
|
3
3
|
/**
|
|
4
4
|
* Capture an XHR breadcrumb to a replay.
|
|
@@ -16,9 +16,7 @@ export declare function captureXhrBreadcrumbToReplay(breadcrumb: Breadcrumb & {
|
|
|
16
16
|
*/
|
|
17
17
|
export declare function enrichXhrBreadcrumb(breadcrumb: Breadcrumb & {
|
|
18
18
|
data: XhrBreadcrumbData;
|
|
19
|
-
}, hint: Partial<XhrHint
|
|
20
|
-
textEncoder: TextEncoderInternal;
|
|
21
|
-
}): void;
|
|
19
|
+
}, hint: Partial<XhrHint>): void;
|
|
22
20
|
/**
|
|
23
21
|
* Get the string representation of the XHR response.
|
|
24
22
|
* Based on MDN, these are the possible types of the response:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IntegrationIndex
|
|
2
|
-
import { Client, ReplayEvent } from '@sentry/types';
|
|
1
|
+
import { IntegrationIndex } from '@sentry/core';
|
|
2
|
+
import { Client, ReplayEvent, Scope } from '@sentry/types';
|
|
3
3
|
/**
|
|
4
4
|
* Prepare a replay event & enrich it with the SDK metadata.
|
|
5
5
|
*/
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { HandlerDataFetch } from '@sentry/types';
|
|
2
|
-
import type { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from '../types';
|
|
3
|
-
/** only exported for tests */
|
|
4
|
-
export declare function handleFetch(handlerData: HandlerDataFetch): null | ReplayPerformanceEntry<NetworkRequestData>;
|
|
5
|
-
/**
|
|
6
|
-
* Returns a listener to be added to `addFetchInstrumentationHandler(listener)`.
|
|
7
|
-
*/
|
|
8
|
-
export declare function handleFetchSpanListener(replay: ReplayContainer): (handlerData: HandlerDataFetch) => void;
|
|
9
|
-
//# sourceMappingURL=handleFetch.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handleFetch.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleFetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAG5F,8BAA8B;AAC9B,wBAAgB,WAAW,CAAC,WAAW,EAAE,gBAAgB,GAAG,IAAI,GAAG,sBAAsB,CAAC,kBAAkB,CAAC,CAoB5G;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,WAAW,EAAE,gBAAgB,KAAK,IAAI,CAUxG"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Breadcrumb, Scope } from '@sentry/types';
|
|
2
|
-
import type { ReplayContainer } from '../types';
|
|
3
|
-
import type { ReplayFrame } from '../types/replayFrame';
|
|
4
|
-
type BreadcrumbWithCategory = Required<Pick<Breadcrumb, 'category'>>;
|
|
5
|
-
export declare const handleScopeListener: (replay: ReplayContainer) => (scope: Scope) => void;
|
|
6
|
-
/**
|
|
7
|
-
* An event handler to handle scope changes.
|
|
8
|
-
*/
|
|
9
|
-
export declare function handleScope(scope: Scope): Breadcrumb | null;
|
|
10
|
-
/** exported for tests only */
|
|
11
|
-
export declare function normalizeConsoleBreadcrumb(breadcrumb: Omit<Breadcrumb, 'category'> & BreadcrumbWithCategory): ReplayFrame;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=handleScope.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handleScope.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleScope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAIvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMxD,KAAK,sBAAsB,GAAG,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC;AAMrE,eAAO,MAAM,mBAAmB,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,CAAC,KAAK,EAAE,KAAK,KAAK,IAc9E,CAAC;AAEJ;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,GAAG,IAAI,CA4B3D;AAED,8BAA8B;AAC9B,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,sBAAsB,GAChE,WAAW,CAgDb"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { HandlerDataXhr } from '@sentry/types';
|
|
2
|
-
import type { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from '../types';
|
|
3
|
-
/** only exported for tests */
|
|
4
|
-
export declare function handleXhr(handlerData: HandlerDataXhr): ReplayPerformanceEntry<NetworkRequestData> | null;
|
|
5
|
-
/**
|
|
6
|
-
* Returns a listener to be added to `addXhrInstrumentationHandler(listener)`.
|
|
7
|
-
*/
|
|
8
|
-
export declare function handleXhrSpanListener(replay: ReplayContainer): (handlerData: HandlerDataXhr) => void;
|
|
9
|
-
//# sourceMappingURL=handleXhr.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handleXhr.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleXhr.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAG5F,8BAA8B;AAC9B,wBAAgB,SAAS,CAAC,WAAW,EAAE,cAAc,GAAG,sBAAsB,CAAC,kBAAkB,CAAC,GAAG,IAAI,CA0BxG;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,WAAW,EAAE,cAAc,KAAK,IAAI,CAUpG"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { HandlerDataFetch } from '@sentry/types';
|
|
2
|
-
import { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from '../types';
|
|
3
|
-
/** only exported for tests */
|
|
4
|
-
export declare function handleFetch(handlerData: HandlerDataFetch): null | ReplayPerformanceEntry<NetworkRequestData>;
|
|
5
|
-
/**
|
|
6
|
-
* Returns a listener to be added to `addFetchInstrumentationHandler(listener)`.
|
|
7
|
-
*/
|
|
8
|
-
export declare function handleFetchSpanListener(replay: ReplayContainer): (handlerData: HandlerDataFetch) => void;
|
|
9
|
-
//# sourceMappingURL=handleFetch.d.ts.map
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Breadcrumb, Scope } from '@sentry/types';
|
|
2
|
-
import { ReplayContainer } from '../types';
|
|
3
|
-
import { ReplayFrame } from '../types/replayFrame';
|
|
4
|
-
type BreadcrumbWithCategory = Required<Pick<Breadcrumb, 'category'>>;
|
|
5
|
-
export declare const handleScopeListener: (replay: ReplayContainer) => (scope: Scope) => void;
|
|
6
|
-
/**
|
|
7
|
-
* An event handler to handle scope changes.
|
|
8
|
-
*/
|
|
9
|
-
export declare function handleScope(scope: Scope): Breadcrumb | null;
|
|
10
|
-
/** exported for tests only */
|
|
11
|
-
export declare function normalizeConsoleBreadcrumb(breadcrumb: Pick<Breadcrumb, Exclude<keyof Breadcrumb, 'category'>> & BreadcrumbWithCategory): ReplayFrame;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=handleScope.d.ts.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { HandlerDataXhr } from '@sentry/types';
|
|
2
|
-
import { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from '../types';
|
|
3
|
-
/** only exported for tests */
|
|
4
|
-
export declare function handleXhr(handlerData: HandlerDataXhr): ReplayPerformanceEntry<NetworkRequestData> | null;
|
|
5
|
-
/**
|
|
6
|
-
* Returns a listener to be added to `addXhrInstrumentationHandler(listener)`.
|
|
7
|
-
*/
|
|
8
|
-
export declare function handleXhrSpanListener(replay: ReplayContainer): (handlerData: HandlerDataXhr) => void;
|
|
9
|
-
//# sourceMappingURL=handleXhr.d.ts.map
|