Skip to content

Commit de36842

Browse files
committed
break circular dependency
1 parent 889cb13 commit de36842

File tree

4 files changed

+21
-19
lines changed

4 files changed

+21
-19
lines changed

packages/replay/src/types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export * from './performance';
22
export * from './replay';
33
export * from './replayFrame';
4+
export * from './request';
45
export * from './rrweb';
56
export type { EventType } from '@sentry-internal/rrweb';

packages/replay/src/types/performance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { ReplayNetworkRequestOrResponse } from './replay';
1+
import type { ReplayNetworkRequestOrResponse } from './request';
22

33
export type AllPerformanceEntry = PerformancePaintTiming | PerformanceResourceTiming | PerformanceNavigationTiming;
44

packages/replay/src/types/replay.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import type {
1111
import type { SKIPPED, THROTTLED } from '../util/throttle';
1212
import type { AllPerformanceEntry } from './performance';
1313
import type { ReplayFrameEvent } from './replayFrame';
14+
import type { ReplayNetworkRequestOrResponse } from './request';
1415
import type { eventWithTime, recordOptions } from './rrweb';
1516

1617
export type RecordingEvent = ReplayFrameEvent | eventWithTime;
@@ -444,24 +445,6 @@ export type FetchHint = FetchBreadcrumbHint & {
444445
response: Response;
445446
};
446447

447-
type JsonObject = Record<string, unknown>;
448-
type JsonArray = unknown[];
449-
450-
export type NetworkBody = JsonObject | JsonArray | string;
451-
452-
export type NetworkMetaWarning = 'JSON_TRUNCATED' | 'TEXT_TRUNCATED' | 'INVALID_JSON' | 'URL_SKIPPED';
453-
454-
interface NetworkMeta {
455-
warnings?: NetworkMetaWarning[];
456-
}
457-
458-
export interface ReplayNetworkRequestOrResponse {
459-
size?: number;
460-
body?: NetworkBody;
461-
headers: Record<string, string>;
462-
_meta?: NetworkMeta;
463-
}
464-
465448
export type ReplayNetworkRequestData = {
466449
startTimestamp: number;
467450
endTimestamp: number;

packages/replay/src/types/request.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
type JsonObject = Record<string, unknown>;
3+
type JsonArray = unknown[];
4+
5+
export type NetworkBody = JsonObject | JsonArray | string;
6+
7+
export type NetworkMetaWarning = 'JSON_TRUNCATED' | 'TEXT_TRUNCATED' | 'INVALID_JSON' | 'URL_SKIPPED';
8+
9+
interface NetworkMeta {
10+
warnings?: NetworkMetaWarning[];
11+
}
12+
13+
export interface ReplayNetworkRequestOrResponse {
14+
size?: number;
15+
body?: NetworkBody;
16+
headers: Record<string, string>;
17+
_meta?: NetworkMeta;
18+
}

0 commit comments

Comments
 (0)