@sentry/replay
Advanced tools
Comparing version 7.66.0 to 7.67.0-beta.0
{ | ||
"name": "@sentry/replay", | ||
"version": "7.66.0", | ||
"version": "7.67.0-beta.0", | ||
"description": "User replays for Sentry", | ||
@@ -28,5 +28,5 @@ "main": "cjs/index.js", | ||
"@babel/core": "^7.17.5", | ||
"@sentry-internal/replay-worker": "7.66.0", | ||
"@sentry-internal/rrweb": "1.108.0", | ||
"@sentry-internal/rrweb-snapshot": "1.108.0", | ||
"@sentry-internal/replay-worker": "7.67.0-beta.0", | ||
"@sentry-internal/rrweb": "2.0.0-alpha10.1", | ||
"@sentry-internal/rrweb-snapshot": "2.0.0-alpha10.1", | ||
"jsdom-worker": "^0.2.1", | ||
@@ -36,5 +36,5 @@ "tslib": "^2.4.1 || ^1.9.3" | ||
"dependencies": { | ||
"@sentry/core": "7.66.0", | ||
"@sentry/types": "7.66.0", | ||
"@sentry/utils": "7.66.0" | ||
"@sentry/core": "7.67.0-beta.0", | ||
"@sentry/types": "7.67.0-beta.0", | ||
"@sentry/utils": "7.67.0-beta.0" | ||
}, | ||
@@ -41,0 +41,0 @@ "engines": { |
@@ -24,2 +24,4 @@ export declare const WINDOW: import("@sentry/utils").InternalGlobal & Window; | ||
export declare const MIN_REPLAY_DURATION_LIMIT = 15000; | ||
/** Default attributes to be ignored when `maskAllText` is enabled */ | ||
export declare const DEFAULT_IGNORED_ATTRIBUTES: string[]; | ||
//# sourceMappingURL=constants.d.ts.map |
@@ -1,2 +0,1 @@ | ||
import type { INode } from '@sentry-internal/rrweb-snapshot'; | ||
import type { Breadcrumb } from '@sentry/types'; | ||
@@ -7,3 +6,3 @@ import type { ReplayContainer } from '../types'; | ||
/** Get the base DOM breadcrumb. */ | ||
export declare function getBaseDomBreadcrumb(target: Node | INode | null, message: string): Breadcrumb; | ||
export declare function getBaseDomBreadcrumb(target: Node | null, message: string): Breadcrumb; | ||
/** | ||
@@ -10,0 +9,0 @@ * An event handler to react to DOM events. |
export { Replay } from './integration'; | ||
export type { EventType, eventWithTime, BreadcrumbFrame, BreadcrumbFrameEvent, OptionFrameEvent, ReplayFrame, ReplayFrameEvent, SpanFrame, SpanFrameEvent, } from './types'; | ||
export type { ReplayEventType, ReplayEventWithTime, ReplayBreadcrumbFrame, ReplayBreadcrumbFrameEvent, ReplayOptionFrameEvent, ReplayFrame, ReplayFrameEvent, ReplaySpanFrame, ReplaySpanFrameEvent, } from './types'; | ||
export * from './types/deprecated'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -28,3 +28,3 @@ import type { Integration } from '@sentry/types'; | ||
private _replay?; | ||
constructor({ flushMinDelay, flushMaxDelay, minReplayDuration, stickySession, useCompression, _experiments, sessionSampleRate, errorSampleRate, maskAllText, maskAllInputs, blockAllMedia, mutationBreadcrumbLimit, mutationLimit, slowClickTimeout, slowClickIgnoreSelectors, networkDetailAllowUrls, networkDetailDenyUrls, networkCaptureBodies, networkRequestHeaders, networkResponseHeaders, mask, unmask, block, unblock, ignore, maskFn, beforeAddRecordingEvent, blockClass, blockSelector, maskInputOptions, maskTextClass, maskTextSelector, ignoreClass, }?: ReplayConfiguration); | ||
constructor({ flushMinDelay, flushMaxDelay, minReplayDuration, stickySession, useCompression, _experiments, sessionSampleRate, errorSampleRate, maskAllText, maskAllInputs, blockAllMedia, mutationBreadcrumbLimit, mutationLimit, slowClickTimeout, slowClickIgnoreSelectors, networkDetailAllowUrls, networkDetailDenyUrls, networkCaptureBodies, networkRequestHeaders, networkResponseHeaders, mask, maskAttributes, unmask, block, unblock, ignore, maskFn, beforeAddRecordingEvent, blockClass, blockSelector, maskInputOptions, maskTextClass, maskTextSelector, ignoreClass, }?: ReplayConfiguration); | ||
/** If replay has already been initialized */ | ||
@@ -31,0 +31,0 @@ protected get _isInitialized(): boolean; |
@@ -84,3 +84,3 @@ import type { ReplayRecordingMode, Transaction } from '@sentry/types'; | ||
*/ | ||
initializeSampling(): void; | ||
initializeSampling(previousSessionId?: string): void; | ||
/** | ||
@@ -226,2 +226,8 @@ * Start a replay regardless of sampling rate. Calling this will always | ||
/** | ||
* Refresh a session with a new one. | ||
* This stops the current session (without forcing a flush, as that would never work since we are expired), | ||
* and then does a new sampling based on the refreshed session. | ||
*/ | ||
private _refreshSession; | ||
/** | ||
* Adds listeners to record events for the replay | ||
@@ -228,0 +234,0 @@ */ |
@@ -6,6 +6,7 @@ import type { Session, SessionOptions, Timeouts } from '../types'; | ||
*/ | ||
export declare function loadOrCreateSession(currentSession: Session | undefined, { timeouts, traceInternals, }: { | ||
export declare function loadOrCreateSession({ timeouts, traceInternals, previousSessionId, }: { | ||
timeouts: Timeouts; | ||
traceInternals?: boolean; | ||
previousSessionId?: string; | ||
}, sessionOptions: SessionOptions): Session; | ||
//# sourceMappingURL=loadOrCreateSession.d.ts.map |
@@ -6,5 +6,5 @@ import type { Breadcrumb, FetchBreadcrumbHint, HandlerDataFetch, ReplayRecordingData, ReplayRecordingMode, SentryWrappedXMLHttpRequest, Transaction, XhrBreadcrumbHint } from '@sentry/types'; | ||
import type { ReplayNetworkRequestOrResponse } from './request'; | ||
import type { eventWithTime, recordOptions } from './rrweb'; | ||
export type RecordingEvent = ReplayFrameEvent | eventWithTime; | ||
export type RecordingOptions = recordOptions; | ||
import type { ReplayEventWithTime, RrwebRecordOptions } from './rrweb'; | ||
export type RecordingEvent = ReplayFrameEvent | ReplayEventWithTime; | ||
export type RecordingOptions = RrwebRecordOptions; | ||
export interface SendReplayData { | ||
@@ -216,3 +216,8 @@ recordingData: ReplayRecordingData; | ||
} | ||
type OptionalReplayPluginOptions = Partial<ReplayPluginOptions>; | ||
type OptionalReplayPluginOptions = Partial<ReplayPluginOptions> & { | ||
/** | ||
* Mask element attributes that are contained in list | ||
*/ | ||
maskAttributes?: string[]; | ||
}; | ||
export interface DeprecatedPrivacyOptions { | ||
@@ -307,7 +312,2 @@ /** | ||
sampled: Sampled; | ||
/** | ||
* If this is false, the session should not be refreshed when it was inactive. | ||
* This can be the case if you had a buffered session which is now recording because an error happened. | ||
*/ | ||
shouldRefresh: boolean; | ||
} | ||
@@ -314,0 +314,0 @@ export type EventBufferType = 'sync' | 'worker'; |
import type { Breadcrumb } from '@sentry/types'; | ||
import type { HistoryData, LargestContentfulPaintData, MemoryData, NavigationData, NetworkRequestData, PaintData, ResourceData } from './performance'; | ||
import type { EventType } from './rrweb'; | ||
import type { ReplayEventTypeCustom } from './rrweb'; | ||
type AnyRecord = Record<string, any>; | ||
interface BaseBreadcrumbFrame { | ||
interface ReplayBaseBreadcrumbFrame { | ||
timestamp: number; | ||
@@ -15,3 +15,3 @@ /** | ||
} | ||
interface BaseDomFrameData { | ||
interface ReplayBaseDomFrameData { | ||
nodeId?: number; | ||
@@ -25,31 +25,31 @@ node?: { | ||
} | ||
interface ConsoleFrameData { | ||
interface ReplayConsoleFrameData { | ||
logger: string; | ||
arguments?: unknown[]; | ||
} | ||
interface ConsoleFrame extends BaseBreadcrumbFrame { | ||
interface ReplayConsoleFrame extends ReplayBaseBreadcrumbFrame { | ||
category: 'console'; | ||
level: Breadcrumb['level']; | ||
message: string; | ||
data: ConsoleFrameData; | ||
data: ReplayConsoleFrameData; | ||
} | ||
type ClickFrameData = BaseDomFrameData; | ||
interface ClickFrame extends BaseBreadcrumbFrame { | ||
type ReplayClickFrameData = ReplayBaseDomFrameData; | ||
interface ReplayClickFrame extends ReplayBaseBreadcrumbFrame { | ||
category: 'ui.click'; | ||
message: string; | ||
data: ClickFrameData; | ||
data: ReplayClickFrameData; | ||
} | ||
interface InputFrame extends BaseBreadcrumbFrame { | ||
interface ReplayInputFrame extends ReplayBaseBreadcrumbFrame { | ||
category: 'ui.input'; | ||
message: string; | ||
} | ||
interface MutationFrameData { | ||
interface ReplayMutationFrameData { | ||
count: number; | ||
limit: boolean; | ||
} | ||
interface MutationFrame extends BaseBreadcrumbFrame { | ||
interface ReplayMutationFrame extends ReplayBaseBreadcrumbFrame { | ||
category: 'replay.mutations'; | ||
data: MutationFrameData; | ||
data: ReplayMutationFrameData; | ||
} | ||
interface KeyboardEventFrameData extends BaseDomFrameData { | ||
interface ReplayKeyboardEventFrameData extends ReplayBaseDomFrameData { | ||
metaKey: boolean; | ||
@@ -61,13 +61,13 @@ shiftKey: boolean; | ||
} | ||
interface KeyboardEventFrame extends BaseBreadcrumbFrame { | ||
interface ReplayKeyboardEventFrame extends ReplayBaseBreadcrumbFrame { | ||
category: 'ui.keyDown'; | ||
data: KeyboardEventFrameData; | ||
data: ReplayKeyboardEventFrameData; | ||
} | ||
interface BlurFrame extends BaseBreadcrumbFrame { | ||
interface ReplayBlurFrame extends ReplayBaseBreadcrumbFrame { | ||
category: 'ui.blur'; | ||
} | ||
interface FocusFrame extends BaseBreadcrumbFrame { | ||
interface ReplayFocusFrame extends ReplayBaseBreadcrumbFrame { | ||
category: 'ui.focus'; | ||
} | ||
interface SlowClickFrameData extends ClickFrameData { | ||
interface ReplaySlowClickFrameData extends ReplayClickFrameData { | ||
url: string; | ||
@@ -79,7 +79,7 @@ route?: string; | ||
} | ||
export interface SlowClickFrame extends BaseBreadcrumbFrame { | ||
export interface ReplaySlowClickFrame extends ReplayBaseBreadcrumbFrame { | ||
category: 'ui.slowClickDetected'; | ||
data: SlowClickFrameData; | ||
data: ReplaySlowClickFrameData; | ||
} | ||
interface MultiClickFrameData extends ClickFrameData { | ||
interface ReplayMultiClickFrameData extends ReplayClickFrameData { | ||
url: string; | ||
@@ -90,7 +90,7 @@ route?: string; | ||
} | ||
export interface MultiClickFrame extends BaseBreadcrumbFrame { | ||
export interface ReplayMultiClickFrame extends ReplayBaseBreadcrumbFrame { | ||
category: 'ui.multiClick'; | ||
data: MultiClickFrameData; | ||
data: ReplayMultiClickFrameData; | ||
} | ||
interface OptionFrame { | ||
interface ReplayOptionFrame { | ||
blockAllMedia: boolean; | ||
@@ -108,4 +108,4 @@ errorSampleRate: number; | ||
} | ||
export type BreadcrumbFrame = ConsoleFrame | ClickFrame | InputFrame | KeyboardEventFrame | BlurFrame | FocusFrame | SlowClickFrame | MultiClickFrame | MutationFrame | BaseBreadcrumbFrame; | ||
interface BaseSpanFrame { | ||
export type ReplayBreadcrumbFrame = ReplayConsoleFrame | ReplayClickFrame | ReplayInputFrame | ReplayKeyboardEventFrame | ReplayBlurFrame | ReplayFocusFrame | ReplaySlowClickFrame | ReplayMultiClickFrame | ReplayMutationFrame | ReplayBaseBreadcrumbFrame; | ||
interface ReplayBaseSpanFrame { | ||
op: string; | ||
@@ -117,34 +117,34 @@ description: string; | ||
} | ||
interface HistoryFrame extends BaseSpanFrame { | ||
interface ReplayHistoryFrame extends ReplayBaseSpanFrame { | ||
data: HistoryData; | ||
op: 'navigation.push'; | ||
} | ||
interface LargestContentfulPaintFrame extends BaseSpanFrame { | ||
interface ReplayLargestContentfulPaintFrame extends ReplayBaseSpanFrame { | ||
data: LargestContentfulPaintData; | ||
op: 'largest-contentful-paint'; | ||
} | ||
interface MemoryFrame extends BaseSpanFrame { | ||
interface ReplayMemoryFrame extends ReplayBaseSpanFrame { | ||
data: MemoryData; | ||
op: 'memory'; | ||
} | ||
interface NavigationFrame extends BaseSpanFrame { | ||
interface ReplayNavigationFrame extends ReplayBaseSpanFrame { | ||
data: NavigationData; | ||
op: 'navigation.navigate' | 'navigation.reload' | 'navigation.back_forward'; | ||
} | ||
interface PaintFrame extends BaseSpanFrame { | ||
interface ReplayPaintFrame extends ReplayBaseSpanFrame { | ||
data: PaintData; | ||
op: 'paint'; | ||
} | ||
interface RequestFrame extends BaseSpanFrame { | ||
interface ReplayRequestFrame extends ReplayBaseSpanFrame { | ||
data: NetworkRequestData; | ||
op: 'resource.fetch' | 'resource.xhr'; | ||
} | ||
interface ResourceFrame extends BaseSpanFrame { | ||
interface ReplayResourceFrame extends ReplayBaseSpanFrame { | ||
data: ResourceData; | ||
op: 'resource.css' | 'resource.iframe' | 'resource.img' | 'resource.link' | 'resource.other' | 'resource.script'; | ||
op: 'resource.css' | 'resource.ReplayiFrame' | 'resource.img' | 'resource.link' | 'resource.other' | 'resource.script'; | ||
} | ||
export type SpanFrame = BaseSpanFrame | HistoryFrame | RequestFrame | LargestContentfulPaintFrame | MemoryFrame | NavigationFrame | PaintFrame | ResourceFrame; | ||
export type ReplayFrame = BreadcrumbFrame | SpanFrame; | ||
export type ReplaySpanFrame = ReplayBaseSpanFrame | ReplayHistoryFrame | ReplayRequestFrame | ReplayLargestContentfulPaintFrame | ReplayMemoryFrame | ReplayNavigationFrame | ReplayPaintFrame | ReplayResourceFrame; | ||
export type ReplayFrame = ReplayBreadcrumbFrame | ReplaySpanFrame; | ||
interface RecordingCustomEvent { | ||
type: EventType.Custom; | ||
type: typeof ReplayEventTypeCustom; | ||
timestamp: number; | ||
@@ -156,6 +156,6 @@ data: { | ||
} | ||
export interface BreadcrumbFrameEvent extends RecordingCustomEvent { | ||
export interface ReplayBreadcrumbFrameEvent extends RecordingCustomEvent { | ||
data: { | ||
tag: 'breadcrumb'; | ||
payload: BreadcrumbFrame; | ||
payload: ReplayBreadcrumbFrame; | ||
/** | ||
@@ -167,16 +167,16 @@ * This will indicate to backend to additionally log as a metric | ||
} | ||
export interface SpanFrameEvent extends RecordingCustomEvent { | ||
export interface ReplaySpanFrameEvent extends RecordingCustomEvent { | ||
data: { | ||
tag: 'performanceSpan'; | ||
payload: SpanFrame; | ||
payload: ReplaySpanFrame; | ||
}; | ||
} | ||
export interface OptionFrameEvent extends RecordingCustomEvent { | ||
export interface ReplayOptionFrameEvent extends RecordingCustomEvent { | ||
data: { | ||
tag: 'options'; | ||
payload: OptionFrame; | ||
payload: ReplayOptionFrame; | ||
}; | ||
} | ||
export type ReplayFrameEvent = BreadcrumbFrameEvent | SpanFrameEvent | OptionFrameEvent; | ||
export type ReplayFrameEvent = ReplayBreadcrumbFrameEvent | ReplaySpanFrameEvent | ReplayOptionFrameEvent; | ||
export {}; | ||
//# sourceMappingURL=replayFrame.d.ts.map |
@@ -1,13 +0,11 @@ | ||
type blockClass = string | RegExp; | ||
type maskTextClass = string | RegExp; | ||
type ClassOption = string | RegExp; | ||
/** Duplicate this from @sentry-internal/rrweb so we can export this as well. */ | ||
export declare enum EventType { | ||
DomContentLoaded = 0, | ||
Load = 1, | ||
FullSnapshot = 2, | ||
IncrementalSnapshot = 3, | ||
Meta = 4, | ||
Custom = 5, | ||
Plugin = 6 | ||
} | ||
export declare const ReplayEventTypeDomContentLoaded = 0; | ||
export declare const ReplayEventTypeLoad = 1; | ||
export declare const ReplayEventTypeFullSnapshot = 2; | ||
export declare const ReplayEventTypeIncrementalSnapshot = 3; | ||
export declare const ReplayEventTypeMeta = 4; | ||
export declare const ReplayEventTypeCustom = 5; | ||
export declare const ReplayEventTypePlugin = 6; | ||
export type ReplayEventType = typeof ReplayEventTypeDomContentLoaded | typeof ReplayEventTypeLoad | typeof ReplayEventTypeFullSnapshot | typeof ReplayEventTypeIncrementalSnapshot | typeof ReplayEventTypeMeta | typeof ReplayEventTypeCustom | typeof ReplayEventTypePlugin; | ||
/** | ||
@@ -17,4 +15,4 @@ * This is a partial copy of rrweb's eventWithTime type which only contains the properties | ||
*/ | ||
export type eventWithTime = { | ||
type: EventType; | ||
export type ReplayEventWithTime = { | ||
type: ReplayEventType; | ||
data: unknown; | ||
@@ -29,8 +27,8 @@ timestamp: number; | ||
*/ | ||
export type recordOptions = { | ||
export type RrwebRecordOptions = { | ||
maskAllText?: boolean; | ||
maskAllInputs?: boolean; | ||
blockClass?: blockClass; | ||
blockClass?: ClassOption; | ||
ignoreClass?: string; | ||
maskTextClass?: maskTextClass; | ||
maskTextClass?: ClassOption; | ||
maskTextSelector?: string; | ||
@@ -37,0 +35,0 @@ blockSelector?: string; |
@@ -1,6 +0,6 @@ | ||
import type { BreadcrumbFrame } from '../types/replayFrame'; | ||
import type { ReplayBreadcrumbFrame } from '../types/replayFrame'; | ||
/** | ||
* Create a breadcrumb for a replay. | ||
*/ | ||
export declare function createBreadcrumb(breadcrumb: Omit<BreadcrumbFrame, 'timestamp' | 'type'> & Partial<Pick<BreadcrumbFrame, 'timestamp'>>): BreadcrumbFrame; | ||
export declare function createBreadcrumb(breadcrumb: Omit<ReplayBreadcrumbFrame, 'timestamp' | 'type'> & Partial<Pick<ReplayBreadcrumbFrame, 'timestamp'>>): ReplayBreadcrumbFrame; | ||
//# sourceMappingURL=createBreadcrumb.d.ts.map |
@@ -6,4 +6,2 @@ import type { DeprecatedPrivacyOptions, ReplayIntegrationPrivacyOptions } from '../types'; | ||
unmaskTextSelector: string; | ||
maskInputSelector: string; | ||
unmaskInputSelector: string; | ||
blockSelector: string; | ||
@@ -10,0 +8,0 @@ unblockSelector: string; |
@@ -1,2 +0,2 @@ | ||
import type { OptionFrameEvent, RecordingEvent, ReplayContainer } from '../types'; | ||
import type { RecordingEvent, ReplayContainer, ReplayOptionFrameEvent } from '../types'; | ||
type RecordingEmitCallback = (event: RecordingEvent, isCheckout?: boolean) => void; | ||
@@ -12,4 +12,4 @@ /** | ||
*/ | ||
export declare function createOptionsEvent(replay: ReplayContainer): OptionFrameEvent; | ||
export declare function createOptionsEvent(replay: ReplayContainer): ReplayOptionFrameEvent; | ||
export {}; | ||
//# sourceMappingURL=handleRecordingEmit.d.ts.map |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2532635
159
20487
1
2
+ Added@sentry/core@7.67.0-beta.0(transitive)
+ Added@sentry/types@7.67.0-beta.0(transitive)
+ Added@sentry/utils@7.67.0-beta.0(transitive)
- Removed@sentry/core@7.66.0(transitive)
- Removed@sentry/types@7.66.0(transitive)
- Removed@sentry/utils@7.66.0(transitive)
Updated@sentry/core@7.67.0-beta.0
Updated@sentry/types@7.67.0-beta.0
Updated@sentry/utils@7.67.0-beta.0