@sentry/replay 7.81.0 → 7.82.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.
Files changed (32) hide show
  1. package/cjs/index.js +144 -36
  2. package/cjs/index.js.map +1 -1
  3. package/esm/index.js +146 -38
  4. package/esm/index.js.map +1 -1
  5. package/package.json +6 -6
  6. package/types/coreHandlers/handleDom.d.ts +3 -4
  7. package/types/coreHandlers/handleDom.d.ts.map +1 -1
  8. package/types/coreHandlers/handleFetch.d.ts +1 -1
  9. package/types/coreHandlers/handleHistory.d.ts +3 -7
  10. package/types/coreHandlers/handleHistory.d.ts.map +1 -1
  11. package/types/coreHandlers/handleXhr.d.ts +1 -1
  12. package/types/coreHandlers/util/domUtils.d.ts +2 -7
  13. package/types/coreHandlers/util/domUtils.d.ts.map +1 -1
  14. package/types/coreHandlers/util/fetchUtils.d.ts +5 -1
  15. package/types/coreHandlers/util/fetchUtils.d.ts.map +1 -1
  16. package/types/coreHandlers/util/networkUtils.d.ts +4 -4
  17. package/types/coreHandlers/util/networkUtils.d.ts.map +1 -1
  18. package/types/coreHandlers/util/xhrUtils.d.ts.map +1 -1
  19. package/types/types/performance.d.ts +1 -1
  20. package/types/types/performance.d.ts.map +1 -1
  21. package/types/types/request.d.ts +1 -1
  22. package/types/types/request.d.ts.map +1 -1
  23. package/types/util/addGlobalListeners.d.ts.map +1 -1
  24. package/types-ts3.8/coreHandlers/handleDom.d.ts +3 -4
  25. package/types-ts3.8/coreHandlers/handleFetch.d.ts +1 -1
  26. package/types-ts3.8/coreHandlers/handleHistory.d.ts +3 -7
  27. package/types-ts3.8/coreHandlers/handleXhr.d.ts +1 -1
  28. package/types-ts3.8/coreHandlers/util/domUtils.d.ts +2 -7
  29. package/types-ts3.8/coreHandlers/util/fetchUtils.d.ts +5 -1
  30. package/types-ts3.8/coreHandlers/util/networkUtils.d.ts +7 -4
  31. package/types-ts3.8/types/performance.d.ts +1 -1
  32. package/types-ts3.8/types/request.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/replay",
3
- "version": "7.81.0",
3
+ "version": "7.82.0",
4
4
  "description": "User replays for Sentry",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",
@@ -25,17 +25,17 @@
25
25
  "homepage": "https://docs.sentry.io/platforms/javascript/session-replay/",
26
26
  "devDependencies": {
27
27
  "@babel/core": "^7.17.5",
28
- "@sentry-internal/replay-worker": "7.81.0",
28
+ "@sentry-internal/replay-worker": "7.82.0",
29
29
  "@sentry-internal/rrweb": "2.2.0",
30
30
  "@sentry-internal/rrweb-snapshot": "2.2.0",
31
31
  "fflate": "^0.8.1",
32
32
  "jsdom-worker": "^0.2.1"
33
33
  },
34
34
  "dependencies": {
35
- "@sentry-internal/tracing": "7.81.0",
36
- "@sentry/core": "7.81.0",
37
- "@sentry/types": "7.81.0",
38
- "@sentry/utils": "7.81.0"
35
+ "@sentry-internal/tracing": "7.82.0",
36
+ "@sentry/core": "7.82.0",
37
+ "@sentry/types": "7.82.0",
38
+ "@sentry/utils": "7.82.0"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=12"
@@ -1,12 +1,11 @@
1
- import type { Breadcrumb } from '@sentry/types';
1
+ import type { Breadcrumb, HandlerDataDom } from '@sentry/types';
2
2
  import type { ReplayContainer } from '../types';
3
- import type { DomHandlerData } from './util/domUtils';
4
- export declare const handleDomListener: (replay: ReplayContainer) => (handlerData: DomHandlerData) => void;
3
+ export declare const handleDomListener: (replay: ReplayContainer) => (handlerData: HandlerDataDom) => void;
5
4
  /** Get the base DOM breadcrumb. */
6
5
  export declare function getBaseDomBreadcrumb(target: Node | null, message: string): Breadcrumb;
7
6
  /**
8
7
  * An event handler to react to DOM events.
9
8
  * Exported for tests.
10
9
  */
11
- export declare function handleDom(handlerData: DomHandlerData): Breadcrumb | null;
10
+ export declare function handleDom(handlerData: HandlerDataDom): Breadcrumb | null;
12
11
  //# sourceMappingURL=handleDom.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handleDom.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleDom.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAItD,eAAO,MAAM,iBAAiB,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,CAAC,WAAW,EAAE,cAAc,KAAK,IAmC7F,CAAC;AAEF,mCAAmC;AACnC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CAwBrF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,cAAc,GAAG,UAAU,GAAG,IAAI,CAOxE"}
1
+ {"version":3,"file":"handleDom.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleDom.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAGhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAOhD,eAAO,MAAM,iBAAiB,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,CAAC,WAAW,EAAE,cAAc,KAAK,IAoC7F,CAAC;AAEF,mCAAmC;AACnC,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CAwBrF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,cAAc,GAAG,UAAU,GAAG,IAAI,CAOxE"}
@@ -3,7 +3,7 @@ import type { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from
3
3
  /** only exported for tests */
4
4
  export declare function handleFetch(handlerData: HandlerDataFetch): null | ReplayPerformanceEntry<NetworkRequestData>;
5
5
  /**
6
- * Returns a listener to be added to `addInstrumentationHandler('fetch', listener)`.
6
+ * Returns a listener to be added to `addFetchInstrumentationHandler(listener)`.
7
7
  */
8
8
  export declare function handleFetchSpanListener(replay: ReplayContainer): (handlerData: HandlerDataFetch) => void;
9
9
  //# sourceMappingURL=handleFetch.d.ts.map
@@ -1,11 +1,7 @@
1
+ import type { HandlerDataHistory } from '@sentry/types';
1
2
  import type { ReplayContainer } from '../types';
2
- interface HistoryHandlerData {
3
- from: string;
4
- to: string;
5
- }
6
3
  /**
7
- * Returns a listener to be added to `addInstrumentationHandler('history', listener)`.
4
+ * Returns a listener to be added to `addHistoryInstrumentationHandler(listener)`.
8
5
  */
9
- export declare function handleHistorySpanListener(replay: ReplayContainer): (handlerData: HistoryHandlerData) => void;
10
- export {};
6
+ export declare function handleHistorySpanListener(replay: ReplayContainer): (handlerData: HandlerDataHistory) => void;
11
7
  //# sourceMappingURL=handleHistory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handleHistory.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleHistory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAe,eAAe,EAA0B,MAAM,UAAU,CAAC;AAGrF,UAAU,kBAAkB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAkBD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,WAAW,EAAE,kBAAkB,KAAK,IAAI,CAsB5G"}
1
+ {"version":3,"file":"handleHistory.d.ts","sourceRoot":"","sources":["../../../../src/coreHandlers/handleHistory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,OAAO,KAAK,EAAe,eAAe,EAA0B,MAAM,UAAU,CAAC;AAmBrF;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,WAAW,EAAE,kBAAkB,KAAK,IAAI,CAsB5G"}
@@ -3,7 +3,7 @@ import type { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from
3
3
  /** only exported for tests */
4
4
  export declare function handleXhr(handlerData: HandlerDataXhr): ReplayPerformanceEntry<NetworkRequestData> | null;
5
5
  /**
6
- * Returns a listener to be added to `addInstrumentationHandler('xhr', listener)`.
6
+ * Returns a listener to be added to `addXhrInstrumentationHandler(listener)`.
7
7
  */
8
8
  export declare function handleXhrSpanListener(replay: ReplayContainer): (handlerData: HandlerDataXhr) => void;
9
9
  //# sourceMappingURL=handleXhr.d.ts.map
@@ -1,10 +1,5 @@
1
1
  import type { INode } from '@sentry-internal/rrweb-snapshot';
2
- export interface DomHandlerData {
3
- name: string;
4
- event: Node | {
5
- target: EventTarget;
6
- };
7
- }
2
+ import type { HandlerDataDom } from '@sentry/types';
8
3
  /** Get the closest interactive parent element, or else return the given element. */
9
4
  export declare function getClosestInteractive(element: Element): Element;
10
5
  /**
@@ -13,7 +8,7 @@ export declare function getClosestInteractive(element: Element): Element;
13
8
  * This is useful because if you click on the image in <button><img></button>,
14
9
  * The target will be the image, not the button, which we don't want here
15
10
  */
16
- export declare function getClickTargetNode(event: DomHandlerData['event'] | MouseEvent): Node | INode | null;
11
+ export declare function getClickTargetNode(event: HandlerDataDom['event'] | MouseEvent | Node): Node | INode | null;
17
12
  /** Get the event target node. */
18
13
  export declare function getTargetNode(event: Node | {
19
14
  target: EventTarget | null;
@@ -1 +1 @@
1
- {"version":3,"file":"domUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/domUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAE7D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,GAAG;QAAE,MAAM,EAAE,WAAW,CAAA;KAAE,CAAC;CACvC;AAID,oFAAoF;AACpF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAG/D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG,UAAU,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAQnG;AAED,iCAAiC;AACjC,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,GAAG;IAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAM/F"}
1
+ {"version":3,"file":"domUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/domUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAIpD,oFAAoF;AACpF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAG/D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,GAAG,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAQ1G;AAED,iCAAiC;AACjC,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,GAAG;IAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;CAAE,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,CAM/F"}
@@ -1,5 +1,5 @@
1
1
  import type { Breadcrumb, FetchBreadcrumbData, TextEncoderInternal } from '@sentry/types';
2
- import type { FetchHint, ReplayContainer, ReplayNetworkOptions } from '../../types';
2
+ import type { FetchHint, ReplayContainer, ReplayNetworkOptions, ReplayNetworkRequestOrResponse } from '../../types';
3
3
  /**
4
4
  * Capture a fetch breadcrumb to a replay.
5
5
  * This adds additional data (where approriate).
@@ -20,4 +20,8 @@ export declare function enrichFetchBreadcrumb(breadcrumb: Breadcrumb & {
20
20
  }, hint: Partial<FetchHint>, options: {
21
21
  textEncoder: TextEncoderInternal;
22
22
  }): void;
23
+ /** Exported only for tests. */
24
+ export declare function _getResponseInfo(captureDetails: boolean, { networkCaptureBodies, textEncoder, networkResponseHeaders, }: Pick<ReplayNetworkOptions, 'networkCaptureBodies' | 'networkResponseHeaders'> & {
25
+ textEncoder: TextEncoderInternal;
26
+ }, response: Response | undefined, responseBodySize?: number): Promise<ReplayNetworkRequestOrResponse | undefined>;
23
27
  //# 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,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAG1F,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,oBAAoB,EAGrB,MAAM,aAAa,CAAC;AAarB;;;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,WAAW,EAAE,mBAAmB,CAAC;IACjC,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,EACxB,OAAO,EAAE;IAAE,WAAW,EAAE,mBAAmB,CAAA;CAAE,GAC5C,IAAI,CAcN"}
1
+ {"version":3,"file":"fetchUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/fetchUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAG1F,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,WAAW,EAAE,mBAAmB,CAAC;IACjC,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,EACxB,OAAO,EAAE;IAAE,WAAW,EAAE,mBAAmB,CAAA;CAAE,GAC5C,IAAI,CAcN;AA8DD,+BAA+B;AAC/B,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,OAAO,EACvB,EACE,oBAAoB,EACpB,WAAW,EACX,sBAAsB,GACvB,EAAE,IAAI,CAAC,oBAAoB,EAAE,sBAAsB,GAAG,wBAAwB,CAAC,GAAG;IACjF,WAAW,EAAE,mBAAmB,CAAC;CAClC,EACD,QAAQ,EAAE,QAAQ,GAAG,SAAS,EAC9B,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAAC,8BAA8B,GAAG,SAAS,CAAC,CAyBrD"}
@@ -1,15 +1,15 @@
1
1
  import type { TextEncoderInternal } from '@sentry/types';
2
- import type { NetworkBody, NetworkRequestData, ReplayNetworkRequestData, ReplayNetworkRequestOrResponse, ReplayPerformanceEntry } from '../../types';
2
+ import type { NetworkMetaWarning, NetworkRequestData, ReplayNetworkRequestData, ReplayNetworkRequestOrResponse, ReplayPerformanceEntry } from '../../types';
3
3
  /** Get the size of a body. */
4
4
  export declare function getBodySize(body: RequestInit['body'], textEncoder: TextEncoder | TextEncoderInternal): number | undefined;
5
5
  /** Convert a Content-Length header to number/undefined. */
6
6
  export declare function parseContentLengthHeader(header: string | null | undefined): number | undefined;
7
7
  /** Get the string representation of a body. */
8
- export declare function getBodyString(body: unknown): string | undefined;
8
+ export declare function getBodyString(body: unknown): [string | undefined, NetworkMetaWarning?];
9
+ /** Merge a warning into an existing network request/response. */
10
+ export declare function mergeWarning(info: ReplayNetworkRequestOrResponse | undefined, warning: NetworkMetaWarning): ReplayNetworkRequestOrResponse;
9
11
  /** Convert ReplayNetworkRequestData to a PerformanceEntry. */
10
12
  export declare function makeNetworkReplayBreadcrumb(type: string, data: ReplayNetworkRequestData | null): ReplayPerformanceEntry<NetworkRequestData> | null;
11
- /** Get either a JSON network body, or a text representation. */
12
- export declare function getNetworkBody(bodyText: string | undefined): NetworkBody | undefined;
13
13
  /** Build the request or response part of a replay network breadcrumb that was skipped. */
14
14
  export declare function buildSkippedNetworkRequestOrResponse(bodySize: number | undefined): ReplayNetworkRequestOrResponse;
15
15
  /** Build the request or response part of a replay network breadcrumb. */
@@ -1 +1 @@
1
- {"version":3,"file":"networkUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/networkUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAIzD,OAAO,KAAK,EACV,WAAW,EAEX,kBAAkB,EAClB,wBAAwB,EACxB,8BAA8B,EAC9B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AAErB,8BAA8B;AAC9B,wBAAgB,WAAW,CACzB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EACzB,WAAW,EAAE,WAAW,GAAG,mBAAmB,GAC7C,MAAM,GAAG,SAAS,CAiCpB;AAED,4DAA4D;AAC5D,wBAAgB,wBAAwB,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,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 +1 @@
1
- {"version":3,"file":"xhrUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/xhrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGxF,OAAO,KAAK,EAAE,eAAe,EAAE,oBAAoB,EAA4B,OAAO,EAAE,MAAM,aAAa,CAAC;AAa5G;;;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,EACtB,OAAO,EAAE;IAAE,WAAW,EAAE,mBAAmB,CAAA;CAAE,GAC5C,IAAI,CAkBN"}
1
+ {"version":3,"file":"xhrUtils.d.ts","sourceRoot":"","sources":["../../../../../src/coreHandlers/util/xhrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGxF,OAAO,KAAK,EAEV,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,EACtB,OAAO,EAAE;IAAE,WAAW,EAAE,mBAAmB,CAAA;CAAE,GAC5C,IAAI,CAkBN"}
@@ -96,7 +96,7 @@ export interface NetworkRequestData {
96
96
  response?: ReplayNetworkRequestOrResponse;
97
97
  }
98
98
  export interface HistoryData {
99
- previous: string;
99
+ previous: string | undefined;
100
100
  }
101
101
  export type AllEntryData = AllPerformanceEntryData | MemoryData | NetworkRequestData | HistoryData;
102
102
  export interface ReplayPerformanceEntry<T> {
@@ -1 +1 @@
1
- {"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../../src/types/performance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,WAAW,CAAC;AAEhE,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,GAAG,yBAAyB,GAAG,2BAA2B,CAAC;AAInH,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACtD,MAAM,MAAM,2BAA2B,GAAG,gBAAgB,GACxD,yBAAyB,GAAG;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,0BAA0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ChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,8BAA8B,CAAC;IACzC,QAAQ,CAAC,EAAE,8BAA8B,CAAC;CAC3C;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,MAAM,YAAY,GAAG,uBAAuB,GAAG,UAAU,GAAG,kBAAkB,GAAG,WAAW,CAAC;AAEnG,MAAM,WAAW,sBAAsB,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,IAAI,EAAE,CAAC,CAAC;CACT"}
@@ -1,7 +1,7 @@
1
1
  type JsonObject = Record<string, unknown>;
2
2
  type JsonArray = unknown[];
3
3
  export type NetworkBody = JsonObject | JsonArray | string;
4
- export type NetworkMetaWarning = 'MAYBE_JSON_TRUNCATED' | 'TEXT_TRUNCATED' | 'URL_SKIPPED';
4
+ export type NetworkMetaWarning = 'MAYBE_JSON_TRUNCATED' | 'TEXT_TRUNCATED' | 'URL_SKIPPED' | 'BODY_PARSE_ERROR';
5
5
  interface NetworkMeta {
6
6
  warnings?: NetworkMetaWarning[];
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/types/request.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1C,KAAK,SAAS,GAAG,OAAO,EAAE,CAAC;AAE3B,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,aAAa,CAAC;AAE3F,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB"}
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../src/types/request.ts"],"names":[],"mappings":"AAAA,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC1C,KAAK,SAAS,GAAG,OAAO,EAAE,CAAC;AAE3B,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,gBAAgB,GAAG,aAAa,GAAG,kBAAkB,CAAC;AAEhH,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,kBAAkB,EAAE,CAAC;CACjC;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB"}
@@ -1 +1 @@
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,CA4ChE"}
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,CAuDhE"}
@@ -1,12 +1,11 @@
1
- import { Breadcrumb } from '@sentry/types';
1
+ import { Breadcrumb, HandlerDataDom } from '@sentry/types';
2
2
  import { ReplayContainer } from '../types';
3
- import { DomHandlerData } from './util/domUtils';
4
- export declare const handleDomListener: (replay: ReplayContainer) => (handlerData: DomHandlerData) => void;
3
+ export declare const handleDomListener: (replay: ReplayContainer) => (handlerData: HandlerDataDom) => void;
5
4
  /** Get the base DOM breadcrumb. */
6
5
  export declare function getBaseDomBreadcrumb(target: Node | null, message: string): Breadcrumb;
7
6
  /**
8
7
  * An event handler to react to DOM events.
9
8
  * Exported for tests.
10
9
  */
11
- export declare function handleDom(handlerData: DomHandlerData): Breadcrumb | null;
10
+ export declare function handleDom(handlerData: HandlerDataDom): Breadcrumb | null;
12
11
  //# sourceMappingURL=handleDom.d.ts.map
@@ -3,7 +3,7 @@ import { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from '../
3
3
  /** only exported for tests */
4
4
  export declare function handleFetch(handlerData: HandlerDataFetch): null | ReplayPerformanceEntry<NetworkRequestData>;
5
5
  /**
6
- * Returns a listener to be added to `addInstrumentationHandler('fetch', listener)`.
6
+ * Returns a listener to be added to `addFetchInstrumentationHandler(listener)`.
7
7
  */
8
8
  export declare function handleFetchSpanListener(replay: ReplayContainer): (handlerData: HandlerDataFetch) => void;
9
9
  //# sourceMappingURL=handleFetch.d.ts.map
@@ -1,11 +1,7 @@
1
+ import { HandlerDataHistory } from '@sentry/types';
1
2
  import { ReplayContainer } from '../types';
2
- interface HistoryHandlerData {
3
- from: string;
4
- to: string;
5
- }
6
3
  /**
7
- * Returns a listener to be added to `addInstrumentationHandler('history', listener)`.
4
+ * Returns a listener to be added to `addHistoryInstrumentationHandler(listener)`.
8
5
  */
9
- export declare function handleHistorySpanListener(replay: ReplayContainer): (handlerData: HistoryHandlerData) => void;
10
- export {};
6
+ export declare function handleHistorySpanListener(replay: ReplayContainer): (handlerData: HandlerDataHistory) => void;
11
7
  //# sourceMappingURL=handleHistory.d.ts.map
@@ -3,7 +3,7 @@ import { NetworkRequestData, ReplayContainer, ReplayPerformanceEntry } from '../
3
3
  /** only exported for tests */
4
4
  export declare function handleXhr(handlerData: HandlerDataXhr): ReplayPerformanceEntry<NetworkRequestData> | null;
5
5
  /**
6
- * Returns a listener to be added to `addInstrumentationHandler('xhr', listener)`.
6
+ * Returns a listener to be added to `addXhrInstrumentationHandler(listener)`.
7
7
  */
8
8
  export declare function handleXhrSpanListener(replay: ReplayContainer): (handlerData: HandlerDataXhr) => void;
9
9
  //# sourceMappingURL=handleXhr.d.ts.map
@@ -1,10 +1,5 @@
1
1
  import { INode } from '@sentry-internal/rrweb-snapshot';
2
- export interface DomHandlerData {
3
- name: string;
4
- event: Node | {
5
- target: EventTarget;
6
- };
7
- }
2
+ import { HandlerDataDom } from '@sentry/types';
8
3
  /** Get the closest interactive parent element, or else return the given element. */
9
4
  export declare function getClosestInteractive(element: Element): Element;
10
5
  /**
@@ -13,7 +8,7 @@ export declare function getClosestInteractive(element: Element): Element;
13
8
  * This is useful because if you click on the image in <button><img></button>,
14
9
  * The target will be the image, not the button, which we don't want here
15
10
  */
16
- export declare function getClickTargetNode(event: DomHandlerData['event'] | MouseEvent): Node | INode | null;
11
+ export declare function getClickTargetNode(event: HandlerDataDom['event'] | MouseEvent | Node): Node | INode | null;
17
12
  /** Get the event target node. */
18
13
  export declare function getTargetNode(event: Node | {
19
14
  target: EventTarget | null;
@@ -1,5 +1,5 @@
1
1
  import { Breadcrumb, FetchBreadcrumbData, TextEncoderInternal } from '@sentry/types';
2
- import { FetchHint, ReplayContainer, ReplayNetworkOptions } from '../../types';
2
+ import { FetchHint, ReplayContainer, ReplayNetworkOptions, ReplayNetworkRequestOrResponse } from '../../types';
3
3
  /**
4
4
  * Capture a fetch breadcrumb to a replay.
5
5
  * This adds additional data (where approriate).
@@ -20,4 +20,8 @@ export declare function enrichFetchBreadcrumb(breadcrumb: Breadcrumb & {
20
20
  }, hint: Partial<FetchHint>, options: {
21
21
  textEncoder: TextEncoderInternal;
22
22
  }): void;
23
+ /** Exported only for tests. */
24
+ export declare function _getResponseInfo(captureDetails: boolean, { networkCaptureBodies, textEncoder, networkResponseHeaders, }: Pick<ReplayNetworkOptions, 'networkCaptureBodies' | 'networkResponseHeaders'> & {
25
+ textEncoder: TextEncoderInternal;
26
+ }, response: Response | undefined, responseBodySize?: number): Promise<ReplayNetworkRequestOrResponse | undefined>;
23
27
  //# sourceMappingURL=fetchUtils.d.ts.map
@@ -1,15 +1,18 @@
1
1
  import { TextEncoderInternal } from '@sentry/types';
2
- import { NetworkBody, NetworkRequestData, ReplayNetworkRequestData, ReplayNetworkRequestOrResponse, ReplayPerformanceEntry } from '../../types';
2
+ import { NetworkMetaWarning, NetworkRequestData, ReplayNetworkRequestData, ReplayNetworkRequestOrResponse, ReplayPerformanceEntry } from '../../types';
3
3
  /** Get the size of a body. */
4
4
  export declare function getBodySize(body: RequestInit['body'], textEncoder: TextEncoder | TextEncoderInternal): number | undefined;
5
5
  /** Convert a Content-Length header to number/undefined. */
6
6
  export declare function parseContentLengthHeader(header: string | null | undefined): number | undefined;
7
7
  /** Get the string representation of a body. */
8
- export declare function getBodyString(body: unknown): string | undefined;
8
+ export declare function getBodyString(body: unknown): [
9
+ string | undefined,
10
+ NetworkMetaWarning?
11
+ ];
12
+ /** Merge a warning into an existing network request/response. */
13
+ export declare function mergeWarning(info: ReplayNetworkRequestOrResponse | undefined, warning: NetworkMetaWarning): ReplayNetworkRequestOrResponse;
9
14
  /** Convert ReplayNetworkRequestData to a PerformanceEntry. */
10
15
  export declare function makeNetworkReplayBreadcrumb(type: string, data: ReplayNetworkRequestData | null): ReplayPerformanceEntry<NetworkRequestData> | null;
11
- /** Get either a JSON network body, or a text representation. */
12
- export declare function getNetworkBody(bodyText: string | undefined): NetworkBody | undefined;
13
16
  /** Build the request or response part of a replay network breadcrumb that was skipped. */
14
17
  export declare function buildSkippedNetworkRequestOrResponse(bodySize: number | undefined): ReplayNetworkRequestOrResponse;
15
18
  /** Build the request or response part of a replay network breadcrumb. */
@@ -96,7 +96,7 @@ export interface NetworkRequestData {
96
96
  response?: ReplayNetworkRequestOrResponse;
97
97
  }
98
98
  export interface HistoryData {
99
- previous: string;
99
+ previous: string | undefined;
100
100
  }
101
101
  export type AllEntryData = AllPerformanceEntryData | MemoryData | NetworkRequestData | HistoryData;
102
102
  export interface ReplayPerformanceEntry<T> {
@@ -1,7 +1,7 @@
1
1
  type JsonObject = Record<string, unknown>;
2
2
  type JsonArray = unknown[];
3
3
  export type NetworkBody = JsonObject | JsonArray | string;
4
- export type NetworkMetaWarning = 'MAYBE_JSON_TRUNCATED' | 'TEXT_TRUNCATED' | 'URL_SKIPPED';
4
+ export type NetworkMetaWarning = 'MAYBE_JSON_TRUNCATED' | 'TEXT_TRUNCATED' | 'URL_SKIPPED' | 'BODY_PARSE_ERROR';
5
5
  interface NetworkMeta {
6
6
  warnings?: NetworkMetaWarning[];
7
7
  }