File tree Expand file tree Collapse file tree 5 files changed +17
-5
lines changed Expand file tree Collapse file tree 5 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,8 @@ export class Replay implements Integration {
6969 // eslint-disable-next-line deprecation/deprecation
7070 blockSelector,
7171 // eslint-disable-next-line deprecation/deprecation
72+ maskInputOptions,
73+ // eslint-disable-next-line deprecation/deprecation
7274 maskTextClass,
7375 // eslint-disable-next-line deprecation/deprecation
7476 maskTextSelector,
@@ -77,6 +79,7 @@ export class Replay implements Integration {
7779 } : ReplayConfiguration = { } ) {
7880 this . _recordingOptions = {
7981 maskAllInputs,
82+ maskInputOptions : { ...( maskInputOptions || { } ) , password : true } ,
8083 maskTextFn : maskFn ,
8184 maskInputFn : maskFn ,
8285
Original file line number Diff line number Diff line change @@ -158,6 +158,14 @@ export interface DeprecatedPrivacyOptions {
158158 * @deprecated Use `block` which accepts an array of CSS selectors
159159 */
160160 blockClass ?: RecordingOptions [ 'blockClass' ] ;
161+ /**
162+ * @deprecated Use `ignore` which accepts an array of CSS selectors
163+ */
164+ ignoreClass ?: RecordingOptions [ 'ignoreClass' ] ;
165+ /**
166+ * @deprecated Use `mask` which accepts an array of CSS selectors
167+ */
168+ maskInputOptions ?: RecordingOptions [ 'maskInputOptions' ] ;
161169 /**
162170 * @deprecated Use `mask` which accepts an array of CSS selectors
163171 */
@@ -166,10 +174,6 @@ export interface DeprecatedPrivacyOptions {
166174 * @deprecated Use `mask` which accepts an array of CSS selectors
167175 */
168176 maskTextSelector ?: RecordingOptions [ 'maskTextSelector' ] ;
169- /**
170- * @deprecated Use `ignore` which accepts an array of CSS selectors
171- */
172- ignoreClass ?: RecordingOptions [ 'ignoreClass' ] ;
173177}
174178
175179export interface ReplayConfiguration
Original file line number Diff line number Diff line change @@ -36,4 +36,5 @@ export type recordOptions = {
3636 maskTextClass ?: maskTextClass ;
3737 maskTextSelector ?: string ;
3838 blockSelector ?: string ;
39+ maskInputOptions ?: Record < string , boolean > ;
3940} & Record < string , unknown > ;
Original file line number Diff line number Diff line change 11import type { DeprecatedPrivacyOptions , ReplayIntegrationPrivacyOptions } from '../types' ;
22
3- type GetPrivacyOptions = Required < Omit < ReplayIntegrationPrivacyOptions , 'maskFn' > > & DeprecatedPrivacyOptions ;
3+ type GetPrivacyOptions = Required < Omit < ReplayIntegrationPrivacyOptions , 'maskFn' > > &
4+ Omit < DeprecatedPrivacyOptions , 'maskInputOptions' > ;
45interface GetPrivacyReturn {
56 maskTextSelector : string ;
67 unmaskTextSelector : string ;
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ describe('Integration | rrweb', () => {
2525 "inlineStylesheet": true,
2626 "maskAllInputs": true,
2727 "maskInputFn": undefined,
28+ "maskInputOptions": Object {
29+ "password": true,
30+ },
2831 "maskInputSelector": ".sentry-mask,[data-sentry-mask]",
2932 "maskTextFn": undefined,
3033 "maskTextSelector": "body *:not(style), body *:not(script)",
You can’t perform that action at this time.
0 commit comments