File tree 5 files changed +17
-5
lines changed
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 {
69
69
// eslint-disable-next-line deprecation/deprecation
70
70
blockSelector,
71
71
// eslint-disable-next-line deprecation/deprecation
72
+ maskInputOptions,
73
+ // eslint-disable-next-line deprecation/deprecation
72
74
maskTextClass,
73
75
// eslint-disable-next-line deprecation/deprecation
74
76
maskTextSelector,
@@ -77,6 +79,7 @@ export class Replay implements Integration {
77
79
} : ReplayConfiguration = { } ) {
78
80
this . _recordingOptions = {
79
81
maskAllInputs,
82
+ maskInputOptions : { ...( maskInputOptions || { } ) , password : true } ,
80
83
maskTextFn : maskFn ,
81
84
maskInputFn : maskFn ,
82
85
Original file line number Diff line number Diff line change @@ -158,6 +158,14 @@ export interface DeprecatedPrivacyOptions {
158
158
* @deprecated Use `block` which accepts an array of CSS selectors
159
159
*/
160
160
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' ] ;
161
169
/**
162
170
* @deprecated Use `mask` which accepts an array of CSS selectors
163
171
*/
@@ -166,10 +174,6 @@ export interface DeprecatedPrivacyOptions {
166
174
* @deprecated Use `mask` which accepts an array of CSS selectors
167
175
*/
168
176
maskTextSelector ?: RecordingOptions [ 'maskTextSelector' ] ;
169
- /**
170
- * @deprecated Use `ignore` which accepts an array of CSS selectors
171
- */
172
- ignoreClass ?: RecordingOptions [ 'ignoreClass' ] ;
173
177
}
174
178
175
179
export interface ReplayConfiguration
Original file line number Diff line number Diff line change @@ -36,4 +36,5 @@ export type recordOptions = {
36
36
maskTextClass ?: maskTextClass ;
37
37
maskTextSelector ?: string ;
38
38
blockSelector ?: string ;
39
+ maskInputOptions ?: Record < string , boolean > ;
39
40
} & Record < string , unknown > ;
Original file line number Diff line number Diff line change 1
1
import type { DeprecatedPrivacyOptions , ReplayIntegrationPrivacyOptions } from '../types' ;
2
2
3
- type GetPrivacyOptions = Required < Omit < ReplayIntegrationPrivacyOptions , 'maskFn' > > & DeprecatedPrivacyOptions ;
3
+ type GetPrivacyOptions = Required < Omit < ReplayIntegrationPrivacyOptions , 'maskFn' > > &
4
+ Omit < DeprecatedPrivacyOptions , 'maskInputOptions' > ;
4
5
interface GetPrivacyReturn {
5
6
maskTextSelector : string ;
6
7
unmaskTextSelector : string ;
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ describe('Integration | rrweb', () => {
25
25
"inlineStylesheet": true,
26
26
"maskAllInputs": true,
27
27
"maskInputFn": undefined,
28
+ "maskInputOptions": Object {
29
+ "password": true,
30
+ },
28
31
"maskInputSelector": ".sentry-mask,[data-sentry-mask]",
29
32
"maskTextFn": undefined,
30
33
"maskTextSelector": "body *:not(style), body *:not(script)",
You can’t perform that action at this time.
0 commit comments