@cloudcare/react-native-session-replay 0.4.1-alpha.1 → 0.4.2-alpha.1

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.
package/README.md ADDED
@@ -0,0 +1,33 @@
1
+ # Session Replay for React Native
2
+
3
+ Session Replay support for the Guance React Native SDK.
4
+
5
+ Use this package together with `@cloudcare/react-native-mobile` to capture user sessions and protect sensitive UI content with configurable privacy rules.
6
+
7
+ ## Installation
8
+
9
+ ```sh
10
+ npm install @cloudcare/react-native-session-replay
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```js
16
+ import {
17
+ import {
18
+ FTReactNativeSessionReplay,
19
+ FTSessionReplayConfig,
20
+ SessionReplayPrivacy,
21
+ } from '@cloudcare/react-native-session-replay';
22
+
23
+ // ...
24
+
25
+ ```
26
+
27
+ ## More
28
+
29
+ [View Doc Here](https://docs.guance.com/real-user-monitoring/session-replay/mobile/react-native/)
30
+
31
+ ## License
32
+
33
+ Apache 2.0
@@ -46,12 +46,18 @@ public class FTSessionReplayImpl {
46
46
 
47
47
  // Handle deprecated privacy setting for backward compatibility
48
48
  if (privacy != null) {
49
- SessionReplayPrivacy sessionReplayPrivacy = switch (privacy) {
50
- case 0 -> SessionReplayPrivacy.MASK;
51
- case 1 -> SessionReplayPrivacy.ALLOW;
52
- case 2 -> SessionReplayPrivacy.MASK_USER_INPUT;
53
- default -> null;
54
- };
49
+ SessionReplayPrivacy sessionReplayPrivacy = null;
50
+ switch (privacy) {
51
+ case 0:
52
+ sessionReplayPrivacy = SessionReplayPrivacy.MASK;
53
+ break;
54
+ case 1:
55
+ sessionReplayPrivacy = SessionReplayPrivacy.ALLOW;
56
+ break;
57
+ case 2:
58
+ sessionReplayPrivacy = SessionReplayPrivacy.MASK_USER_INPUT;
59
+ break;
60
+ }
55
61
  sessionReplayConfig.setPrivacy(sessionReplayPrivacy);
56
62
  }
57
63
 
@@ -99,7 +105,8 @@ public class FTSessionReplayImpl {
99
105
  }
100
106
 
101
107
  // Handle enableLinkRUMKeys
102
- if (enableLinkRUMKeysObj instanceof ReadableArray rumKeysArray) {
108
+ if (enableLinkRUMKeysObj instanceof ReadableArray) {
109
+ ReadableArray rumKeysArray = (ReadableArray) enableLinkRUMKeysObj;
103
110
  String[] rumKeys = new String[rumKeysArray.size()];
104
111
  for (int i = 0; i < rumKeysArray.size(); i++) {
105
112
  rumKeys[i] = rumKeysArray.getString(i);
@@ -46,6 +46,7 @@ let TextAndInputPrivacyLevel = exports.TextAndInputPrivacyLevel = /*#__PURE__*/f
46
46
  /**
47
47
  * Set Session Replay configuration.
48
48
  * @param sampleRate Sampling rate
49
+ * @param sessionReplayOnErrorSampleRate error session sampling rate. For sessions not sampled, if ERROR is hit, collect data 1 minute before the error occurs
49
50
  * @param privacy Privacy level for content masking in session replay
50
51
  * @param touchPrivacy Privacy level for touch masking in session replay
51
52
  * @param textAndInputPrivacy Privacy level for text and input masking in session replay
@@ -55,8 +56,11 @@ let TextAndInputPrivacyLevel = exports.TextAndInputPrivacyLevel = /*#__PURE__*/f
55
56
  */
56
57
  class FTReactNativeSessionReplayWrapper {
57
58
  constructor() {
59
+ /* eslint-disable @typescript-eslint/no-var-requires */
58
60
  _defineProperty(this, "sessionReplay", require('./specs/NativeFTReactNativeSessionReplay').default);
59
61
  }
62
+ /* eslint-enable @typescript-eslint/no-var-requires */
63
+
60
64
  sessionReplayConfig(config) {
61
65
  return this.sessionReplay.sessionReplayConfig(config);
62
66
  }
@@ -1 +1 @@
1
- {"version":3,"names":["SessionReplayPrivacy","exports","TouchPrivacyLevel","ImagePrivacyLevel","TextAndInputPrivacyLevel","FTReactNativeSessionReplayWrapper","constructor","_defineProperty","require","default","sessionReplayConfig","config","sessionReplay","FTReactNativeSessionReplay"],"sources":["ft_session_replay.tsx"],"sourcesContent":["// import { NativeModules } from 'react-native';\n/**\n * Privacy level for content masking in session replay. Deprecated, recommend using fine-grained privacy levels for settings\n */\nexport enum SessionReplayPrivacy {\n MASK = 0,\n ALLOW = 1,\n MASK_USER_INPUT = 2,\n}\n\n/**\n * Available privacy levels for touch masking in session replay.\n */\nexport enum TouchPrivacyLevel {\n SHOW = 'SHOW',\n HIDE = 'HIDE',\n}\n\n/**\n * Available privacy levels for image masking in session replay\n */\nexport enum ImagePrivacyLevel {\n MASK_NON_BUNDLED_ONLY = 'MASK_NON_BUNDLED_ONLY',\n MASK_ALL = 'MASK_ALL',\n MASK_NONE = 'MASK_NONE',\n}\n\n/**\n * Available privacy levels for text and input masking in session replay\n */\nexport enum TextAndInputPrivacyLevel {\n MASK_SENSITIVE_INPUTS = 'MASK_SENSITIVE_INPUTS',\n MASK_ALL_INPUTS = 'MASK_ALL_INPUTS',\n MASK_ALL = 'MASK_ALL',\n}\n/**\n * Set Session Replay configuration.\n * @param sampleRate Sampling rate\n * @param privacy Privacy level for content masking in session replay\n * @param touchPrivacy Privacy level for touch masking in session replay\n * @param textAndInputPrivacy Privacy level for text and input masking in session replay\n * @param imagePrivacy Privacy level for image masking in session replay\n * @param enableLinkRUMKeys Enable linking RUM data with session replay data. The value is an array of RUM global context keys. When the keys exist in RUM global context, the corresponding values will be linked to session replay data.\n * @returns a Promise.\n */\nexport interface FTSessionReplayConfig {\n sampleRate?: number;\n sessionReplayOnErrorSampleRate?: number;\n privacy?: SessionReplayPrivacy;\n touchPrivacy?: TouchPrivacyLevel;\n textAndInputPrivacy?: TextAndInputPrivacyLevel;\n imagePrivacy?: ImagePrivacyLevel;\n enableLinkRUMKeys?: string[];\n}\ntype FTReactNativeSessionReplayType = {\n /**\n * Set Session Replay configuration and enable session replay\n * @param config Session Replay configuration parameters.\n * @returns a Promise.\n */\n sessionReplayConfig(config: FTSessionReplayConfig): Promise<void>;\n};\n\nclass FTReactNativeSessionReplayWrapper implements FTReactNativeSessionReplayType {\n private sessionReplay: FTReactNativeSessionReplayType = require('./specs/NativeFTReactNativeSessionReplay')\n .default;\n sessionReplayConfig(config:FTSessionReplayConfig): Promise<void>{\n return this.sessionReplay.sessionReplayConfig(config);\n }\n}\nexport const FTReactNativeSessionReplay: FTReactNativeSessionReplayType =\n new FTReactNativeSessionReplayWrapper();\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AAFA,IAGYA,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,0BAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAMhC;AACA;AACA;AAFA,IAGYE,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAK7B;AACA;AACA;AAFA,IAGYC,iBAAiB,GAAAF,OAAA,CAAAE,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAM7B;AACA;AACA;AAFA,IAGYC,wBAAwB,GAAAH,OAAA,CAAAG,wBAAA,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;AAKpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAmBA,MAAMC,iCAAiC,CAA2C;EAAAC,YAAA;IAAAC,eAAA,wBACtBC,OAAO,CAAC,0CAA0C,CAAC,CACtGC,OAAO;EAAA;EACZC,mBAAmBA,CAACC,MAA4B,EAAgB;IAC5D,OAAO,IAAI,CAACC,aAAa,CAACF,mBAAmB,CAACC,MAAM,CAAC;EACzD;AACJ;AACO,MAAME,0BAA0D,GAAAZ,OAAA,CAAAY,0BAAA,GACrE,IAAIR,iCAAiC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["SessionReplayPrivacy","exports","TouchPrivacyLevel","ImagePrivacyLevel","TextAndInputPrivacyLevel","FTReactNativeSessionReplayWrapper","constructor","_defineProperty","require","default","sessionReplayConfig","config","sessionReplay","FTReactNativeSessionReplay"],"sources":["ft_session_replay.tsx"],"sourcesContent":["// import { NativeModules } from 'react-native';\n/**\n * Privacy level for content masking in session replay. Deprecated, recommend using fine-grained privacy levels for settings\n */\nexport enum SessionReplayPrivacy {\n MASK = 0,\n ALLOW = 1,\n MASK_USER_INPUT = 2,\n}\n\n/**\n * Available privacy levels for touch masking in session replay.\n */\nexport enum TouchPrivacyLevel {\n SHOW = 'SHOW',\n HIDE = 'HIDE',\n}\n\n/**\n * Available privacy levels for image masking in session replay\n */\nexport enum ImagePrivacyLevel {\n MASK_NON_BUNDLED_ONLY = 'MASK_NON_BUNDLED_ONLY',\n MASK_ALL = 'MASK_ALL',\n MASK_NONE = 'MASK_NONE',\n}\n\n/**\n * Available privacy levels for text and input masking in session replay\n */\nexport enum TextAndInputPrivacyLevel {\n MASK_SENSITIVE_INPUTS = 'MASK_SENSITIVE_INPUTS',\n MASK_ALL_INPUTS = 'MASK_ALL_INPUTS',\n MASK_ALL = 'MASK_ALL',\n}\n/**\n * Set Session Replay configuration.\n * @param sampleRate Sampling rate\n * @param sessionReplayOnErrorSampleRate error session sampling rate. For sessions not sampled, if ERROR is hit, collect data 1 minute before the error occurs\n * @param privacy Privacy level for content masking in session replay\n * @param touchPrivacy Privacy level for touch masking in session replay\n * @param textAndInputPrivacy Privacy level for text and input masking in session replay\n * @param imagePrivacy Privacy level for image masking in session replay\n * @param enableLinkRUMKeys Enable linking RUM data with session replay data. The value is an array of RUM global context keys. When the keys exist in RUM global context, the corresponding values will be linked to session replay data.\n * @returns a Promise.\n */\nexport interface FTSessionReplayConfig {\n sampleRate?: number;\n sessionReplayOnErrorSampleRate?: number;\n privacy?: SessionReplayPrivacy;\n touchPrivacy?: TouchPrivacyLevel;\n textAndInputPrivacy?: TextAndInputPrivacyLevel;\n imagePrivacy?: ImagePrivacyLevel;\n enableLinkRUMKeys?: string[];\n}\ntype FTReactNativeSessionReplayType = {\n /**\n * Set Session Replay configuration and enable session replay\n * @param config Session Replay configuration parameters.\n * @returns a Promise.\n */\n sessionReplayConfig(config: FTSessionReplayConfig): Promise<void>;\n};\n\nclass FTReactNativeSessionReplayWrapper\n implements FTReactNativeSessionReplayType\n{\n /* eslint-disable @typescript-eslint/no-var-requires */\n private sessionReplay: FTReactNativeSessionReplayType =\n require('./specs/NativeFTReactNativeSessionReplay').default;\n /* eslint-enable @typescript-eslint/no-var-requires */\n\n sessionReplayConfig(config: FTSessionReplayConfig): Promise<void> {\n return this.sessionReplay.sessionReplayConfig(config);\n }\n}\nexport const FTReactNativeSessionReplay: FTReactNativeSessionReplayType =\n new FTReactNativeSessionReplayWrapper();\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AAFA,IAGYA,oBAAoB,GAAAC,OAAA,CAAAD,oBAAA,0BAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;AAMhC;AACA;AACA;AAFA,IAGYE,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAK7B;AACA;AACA;AAFA,IAGYC,iBAAiB,GAAAF,OAAA,CAAAE,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAM7B;AACA;AACA;AAFA,IAGYC,wBAAwB,GAAAH,OAAA,CAAAG,wBAAA,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;AAKpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAmBA,MAAMC,iCAAiC,CAEvC;EAAAC,YAAA;IACE;IAAAC,eAAA,wBAEEC,OAAO,CAAC,0CAA0C,CAAC,CAACC,OAAO;EAAA;EAC7D;;EAEAC,mBAAmBA,CAACC,MAA6B,EAAiB;IAChE,OAAO,IAAI,CAACC,aAAa,CAACF,mBAAmB,CAACC,MAAM,CAAC;EACvD;AACF;AACO,MAAME,0BAA0D,GAAAZ,OAAA,CAAAY,0BAAA,GACrE,IAAIR,iCAAiC,CAAC,CAAC","ignoreList":[]}
@@ -12,7 +12,9 @@ const isNewArchitectureEnabled = () => {
12
12
  const getNativeComponent = () => {
13
13
  if (isNewArchitectureEnabled()) {
14
14
  try {
15
+ /* eslint-disable @typescript-eslint/no-var-requires */
15
16
  const NewArchComponent = require('./FTPrivacyViewNativeComponent').default;
17
+ /* eslint-enable @typescript-eslint/no-var-requires */
16
18
  if (NewArchComponent) {
17
19
  return NewArchComponent;
18
20
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","isNewArchitectureEnabled","_UIManager$getViewMan","UIManager","getViewManagerConfig","call","undefined","getNativeComponent","NewArchComponent","default","error","console","debug","Error","message","String","requireNativeComponent","FTPrivacyViewNative","_default","exports"],"sources":["FTPrivacyViewNative.ts"],"sourcesContent":["import { UIManager } from 'react-native';\nimport { requireNativeComponent } from 'react-native';\nimport type { FTPrivacyViewNativeProps } from '../types';\n\nconst isNewArchitectureEnabled = () => {\n return UIManager.getViewManagerConfig?.('FTPrivacyView') === undefined;\n};\n\nconst getNativeComponent = () => {\n if (isNewArchitectureEnabled()) {\n try {\n const NewArchComponent =\n require('./FTPrivacyViewNativeComponent').default;\n if (NewArchComponent) {\n return NewArchComponent;\n }\n } catch (error) {\n console.debug(\n 'Fabric component not available, falling back to Paper:',\n error instanceof Error ? error.message : String(error)\n );\n }\n }\n\n return requireNativeComponent<FTPrivacyViewNativeProps>('FTPrivacyView');\n};\n\nconst FTPrivacyViewNative = getNativeComponent();\n\nexport default FTPrivacyViewNative;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EAAA,IAAAC,qBAAA;EACrC,OAAO,EAAAA,qBAAA,GAAAC,sBAAS,CAACC,oBAAoB,cAAAF,qBAAA,uBAA9BA,qBAAA,CAAAG,IAAA,CAAAF,sBAAS,EAAwB,eAAe,CAAC,MAAKG,SAAS;AACxE,CAAC;AAED,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EAC/B,IAAIN,wBAAwB,CAAC,CAAC,EAAE;IAC9B,IAAI;MACF,MAAMO,gBAAgB,GACpBR,OAAO,CAAC,gCAAgC,CAAC,CAACS,OAAO;MACnD,IAAID,gBAAgB,EAAE;QACpB,OAAOA,gBAAgB;MACzB;IACF,CAAC,CAAC,OAAOE,KAAK,EAAE;MACdC,OAAO,CAACC,KAAK,CACX,wDAAwD,EACxDF,KAAK,YAAYG,KAAK,GAAGH,KAAK,CAACI,OAAO,GAAGC,MAAM,CAACL,KAAK,CACvD,CAAC;IACH;EACF;EAEA,OAAO,IAAAM,mCAAsB,EAA2B,eAAe,CAAC;AAC1E,CAAC;AAED,MAAMC,mBAAmB,GAAGV,kBAAkB,CAAC,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAElCQ,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","isNewArchitectureEnabled","_UIManager$getViewMan","UIManager","getViewManagerConfig","call","undefined","getNativeComponent","NewArchComponent","default","error","console","debug","Error","message","String","requireNativeComponent","FTPrivacyViewNative","_default","exports"],"sources":["FTPrivacyViewNative.ts"],"sourcesContent":["import { UIManager } from 'react-native';\nimport { requireNativeComponent } from 'react-native';\nimport type { FTPrivacyViewNativeProps } from '../types';\n\nconst isNewArchitectureEnabled = () => {\n return UIManager.getViewManagerConfig?.('FTPrivacyView') === undefined;\n};\n\nconst getNativeComponent = () => {\n if (isNewArchitectureEnabled()) {\n try {\n /* eslint-disable @typescript-eslint/no-var-requires */\n const NewArchComponent =\n require('./FTPrivacyViewNativeComponent').default;\n /* eslint-enable @typescript-eslint/no-var-requires */\n if (NewArchComponent) {\n return NewArchComponent;\n }\n } catch (error) {\n console.debug(\n 'Fabric component not available, falling back to Paper:',\n error instanceof Error ? error.message : String(error)\n );\n }\n }\n\n return requireNativeComponent<FTPrivacyViewNativeProps>('FTPrivacyView');\n};\n\nconst FTPrivacyViewNative = getNativeComponent();\n\nexport default FTPrivacyViewNative;\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAIA,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EAAA,IAAAC,qBAAA;EACrC,OAAO,EAAAA,qBAAA,GAAAC,sBAAS,CAACC,oBAAoB,cAAAF,qBAAA,uBAA9BA,qBAAA,CAAAG,IAAA,CAAAF,sBAAS,EAAwB,eAAe,CAAC,MAAKG,SAAS;AACxE,CAAC;AAED,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EAC/B,IAAIN,wBAAwB,CAAC,CAAC,EAAE;IAC9B,IAAI;MACF;MACA,MAAMO,gBAAgB,GACpBR,OAAO,CAAC,gCAAgC,CAAC,CAACS,OAAO;MACnD;MACA,IAAID,gBAAgB,EAAE;QACpB,OAAOA,gBAAgB;MACzB;IACF,CAAC,CAAC,OAAOE,KAAK,EAAE;MACdC,OAAO,CAACC,KAAK,CACX,wDAAwD,EACxDF,KAAK,YAAYG,KAAK,GAAGH,KAAK,CAACI,OAAO,GAAGC,MAAM,CAACL,KAAK,CACvD,CAAC;IACH;EACF;EAEA,OAAO,IAAAM,mCAAsB,EAA2B,eAAe,CAAC;AAC1E,CAAC;AAED,MAAMC,mBAAmB,GAAGV,kBAAkB,CAAC,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAElCQ,mBAAmB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","get"],"sources":["NativeFTReactNativeSessionReplay.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n /**\n * Set Session Replay configuration and enable session replay\n * @param config Session Replay configuration parameters.\n * @returns a Promise.\n */\n sessionReplayConfig(config:Object): Promise<void>;\n}\nexport default TurboModuleRegistry.get<Spec>('FTReactNativeSessionReplay');"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AAFA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAYeC,gCAAmB,CAACC,GAAG,CAAO,4BAA4B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","get"],"sources":["NativeFTReactNativeSessionReplay.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n /**\n * Set Session Replay configuration and enable session replay\n * @param config Session Replay configuration parameters.\n * @returns a Promise.\n */\n sessionReplayConfig(config: Object): Promise<void>;\n}\nexport default TurboModuleRegistry.get<Spec>('FTReactNativeSessionReplay');\n"],"mappings":";;;;;;AAEA,IAAAA,YAAA,GAAAC,OAAA;AAFA;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAYeC,gCAAmB,CAACC,GAAG,CAAO,4BAA4B,CAAC","ignoreList":[]}
@@ -43,6 +43,7 @@ export let TextAndInputPrivacyLevel = /*#__PURE__*/function (TextAndInputPrivacy
43
43
  /**
44
44
  * Set Session Replay configuration.
45
45
  * @param sampleRate Sampling rate
46
+ * @param sessionReplayOnErrorSampleRate error session sampling rate. For sessions not sampled, if ERROR is hit, collect data 1 minute before the error occurs
46
47
  * @param privacy Privacy level for content masking in session replay
47
48
  * @param touchPrivacy Privacy level for touch masking in session replay
48
49
  * @param textAndInputPrivacy Privacy level for text and input masking in session replay
@@ -53,8 +54,11 @@ export let TextAndInputPrivacyLevel = /*#__PURE__*/function (TextAndInputPrivacy
53
54
 
54
55
  class FTReactNativeSessionReplayWrapper {
55
56
  constructor() {
57
+ /* eslint-disable @typescript-eslint/no-var-requires */
56
58
  _defineProperty(this, "sessionReplay", require('./specs/NativeFTReactNativeSessionReplay').default);
57
59
  }
60
+ /* eslint-enable @typescript-eslint/no-var-requires */
61
+
58
62
  sessionReplayConfig(config) {
59
63
  return this.sessionReplay.sessionReplayConfig(config);
60
64
  }
@@ -1 +1 @@
1
- {"version":3,"names":["SessionReplayPrivacy","TouchPrivacyLevel","ImagePrivacyLevel","TextAndInputPrivacyLevel","FTReactNativeSessionReplayWrapper","constructor","_defineProperty","require","default","sessionReplayConfig","config","sessionReplay","FTReactNativeSessionReplay"],"sources":["ft_session_replay.tsx"],"sourcesContent":["// import { NativeModules } from 'react-native';\n/**\n * Privacy level for content masking in session replay. Deprecated, recommend using fine-grained privacy levels for settings\n */\nexport enum SessionReplayPrivacy {\n MASK = 0,\n ALLOW = 1,\n MASK_USER_INPUT = 2,\n}\n\n/**\n * Available privacy levels for touch masking in session replay.\n */\nexport enum TouchPrivacyLevel {\n SHOW = 'SHOW',\n HIDE = 'HIDE',\n}\n\n/**\n * Available privacy levels for image masking in session replay\n */\nexport enum ImagePrivacyLevel {\n MASK_NON_BUNDLED_ONLY = 'MASK_NON_BUNDLED_ONLY',\n MASK_ALL = 'MASK_ALL',\n MASK_NONE = 'MASK_NONE',\n}\n\n/**\n * Available privacy levels for text and input masking in session replay\n */\nexport enum TextAndInputPrivacyLevel {\n MASK_SENSITIVE_INPUTS = 'MASK_SENSITIVE_INPUTS',\n MASK_ALL_INPUTS = 'MASK_ALL_INPUTS',\n MASK_ALL = 'MASK_ALL',\n}\n/**\n * Set Session Replay configuration.\n * @param sampleRate Sampling rate\n * @param privacy Privacy level for content masking in session replay\n * @param touchPrivacy Privacy level for touch masking in session replay\n * @param textAndInputPrivacy Privacy level for text and input masking in session replay\n * @param imagePrivacy Privacy level for image masking in session replay\n * @param enableLinkRUMKeys Enable linking RUM data with session replay data. The value is an array of RUM global context keys. When the keys exist in RUM global context, the corresponding values will be linked to session replay data.\n * @returns a Promise.\n */\nexport interface FTSessionReplayConfig {\n sampleRate?: number;\n sessionReplayOnErrorSampleRate?: number;\n privacy?: SessionReplayPrivacy;\n touchPrivacy?: TouchPrivacyLevel;\n textAndInputPrivacy?: TextAndInputPrivacyLevel;\n imagePrivacy?: ImagePrivacyLevel;\n enableLinkRUMKeys?: string[];\n}\ntype FTReactNativeSessionReplayType = {\n /**\n * Set Session Replay configuration and enable session replay\n * @param config Session Replay configuration parameters.\n * @returns a Promise.\n */\n sessionReplayConfig(config: FTSessionReplayConfig): Promise<void>;\n};\n\nclass FTReactNativeSessionReplayWrapper implements FTReactNativeSessionReplayType {\n private sessionReplay: FTReactNativeSessionReplayType = require('./specs/NativeFTReactNativeSessionReplay')\n .default;\n sessionReplayConfig(config:FTSessionReplayConfig): Promise<void>{\n return this.sessionReplay.sessionReplayConfig(config);\n }\n}\nexport const FTReactNativeSessionReplay: FTReactNativeSessionReplayType =\n new FTReactNativeSessionReplayWrapper();\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA,WAAYA,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;;AAMhC;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;;AAK7B;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;;AAM7B;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;AAKpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA,MAAMC,iCAAiC,CAA2C;EAAAC,YAAA;IAAAC,eAAA,wBACtBC,OAAO,CAAC,0CAA0C,CAAC,CACtGC,OAAO;EAAA;EACZC,mBAAmBA,CAACC,MAA4B,EAAgB;IAC5D,OAAO,IAAI,CAACC,aAAa,CAACF,mBAAmB,CAACC,MAAM,CAAC;EACzD;AACJ;AACA,OAAO,MAAME,0BAA0D,GACrE,IAAIR,iCAAiC,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["SessionReplayPrivacy","TouchPrivacyLevel","ImagePrivacyLevel","TextAndInputPrivacyLevel","FTReactNativeSessionReplayWrapper","constructor","_defineProperty","require","default","sessionReplayConfig","config","sessionReplay","FTReactNativeSessionReplay"],"sources":["ft_session_replay.tsx"],"sourcesContent":["// import { NativeModules } from 'react-native';\n/**\n * Privacy level for content masking in session replay. Deprecated, recommend using fine-grained privacy levels for settings\n */\nexport enum SessionReplayPrivacy {\n MASK = 0,\n ALLOW = 1,\n MASK_USER_INPUT = 2,\n}\n\n/**\n * Available privacy levels for touch masking in session replay.\n */\nexport enum TouchPrivacyLevel {\n SHOW = 'SHOW',\n HIDE = 'HIDE',\n}\n\n/**\n * Available privacy levels for image masking in session replay\n */\nexport enum ImagePrivacyLevel {\n MASK_NON_BUNDLED_ONLY = 'MASK_NON_BUNDLED_ONLY',\n MASK_ALL = 'MASK_ALL',\n MASK_NONE = 'MASK_NONE',\n}\n\n/**\n * Available privacy levels for text and input masking in session replay\n */\nexport enum TextAndInputPrivacyLevel {\n MASK_SENSITIVE_INPUTS = 'MASK_SENSITIVE_INPUTS',\n MASK_ALL_INPUTS = 'MASK_ALL_INPUTS',\n MASK_ALL = 'MASK_ALL',\n}\n/**\n * Set Session Replay configuration.\n * @param sampleRate Sampling rate\n * @param sessionReplayOnErrorSampleRate error session sampling rate. For sessions not sampled, if ERROR is hit, collect data 1 minute before the error occurs\n * @param privacy Privacy level for content masking in session replay\n * @param touchPrivacy Privacy level for touch masking in session replay\n * @param textAndInputPrivacy Privacy level for text and input masking in session replay\n * @param imagePrivacy Privacy level for image masking in session replay\n * @param enableLinkRUMKeys Enable linking RUM data with session replay data. The value is an array of RUM global context keys. When the keys exist in RUM global context, the corresponding values will be linked to session replay data.\n * @returns a Promise.\n */\nexport interface FTSessionReplayConfig {\n sampleRate?: number;\n sessionReplayOnErrorSampleRate?: number;\n privacy?: SessionReplayPrivacy;\n touchPrivacy?: TouchPrivacyLevel;\n textAndInputPrivacy?: TextAndInputPrivacyLevel;\n imagePrivacy?: ImagePrivacyLevel;\n enableLinkRUMKeys?: string[];\n}\ntype FTReactNativeSessionReplayType = {\n /**\n * Set Session Replay configuration and enable session replay\n * @param config Session Replay configuration parameters.\n * @returns a Promise.\n */\n sessionReplayConfig(config: FTSessionReplayConfig): Promise<void>;\n};\n\nclass FTReactNativeSessionReplayWrapper\n implements FTReactNativeSessionReplayType\n{\n /* eslint-disable @typescript-eslint/no-var-requires */\n private sessionReplay: FTReactNativeSessionReplayType =\n require('./specs/NativeFTReactNativeSessionReplay').default;\n /* eslint-enable @typescript-eslint/no-var-requires */\n\n sessionReplayConfig(config: FTSessionReplayConfig): Promise<void> {\n return this.sessionReplay.sessionReplayConfig(config);\n }\n}\nexport const FTReactNativeSessionReplay: FTReactNativeSessionReplayType =\n new FTReactNativeSessionReplayWrapper();\n"],"mappings":";;;AAAA;AACA;AACA;AACA;AACA,WAAYA,oBAAoB,0BAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAApBA,oBAAoB,CAApBA,oBAAoB;EAAA,OAApBA,oBAAoB;AAAA;;AAMhC;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;;AAK7B;AACA;AACA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;;AAM7B;AACA;AACA;AACA,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;AAKpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAmBA,MAAMC,iCAAiC,CAEvC;EAAAC,YAAA;IACE;IAAAC,eAAA,wBAEEC,OAAO,CAAC,0CAA0C,CAAC,CAACC,OAAO;EAAA;EAC7D;;EAEAC,mBAAmBA,CAACC,MAA6B,EAAiB;IAChE,OAAO,IAAI,CAACC,aAAa,CAACF,mBAAmB,CAACC,MAAM,CAAC;EACvD;AACF;AACA,OAAO,MAAME,0BAA0D,GACrE,IAAIR,iCAAiC,CAAC,CAAC","ignoreList":[]}
@@ -7,7 +7,9 @@ const isNewArchitectureEnabled = () => {
7
7
  const getNativeComponent = () => {
8
8
  if (isNewArchitectureEnabled()) {
9
9
  try {
10
+ /* eslint-disable @typescript-eslint/no-var-requires */
10
11
  const NewArchComponent = require('./FTPrivacyViewNativeComponent').default;
12
+ /* eslint-enable @typescript-eslint/no-var-requires */
11
13
  if (NewArchComponent) {
12
14
  return NewArchComponent;
13
15
  }
@@ -1 +1 @@
1
- {"version":3,"names":["UIManager","requireNativeComponent","isNewArchitectureEnabled","_UIManager$getViewMan","getViewManagerConfig","call","undefined","getNativeComponent","NewArchComponent","require","default","error","console","debug","Error","message","String","FTPrivacyViewNative"],"sources":["FTPrivacyViewNative.ts"],"sourcesContent":["import { UIManager } from 'react-native';\nimport { requireNativeComponent } from 'react-native';\nimport type { FTPrivacyViewNativeProps } from '../types';\n\nconst isNewArchitectureEnabled = () => {\n return UIManager.getViewManagerConfig?.('FTPrivacyView') === undefined;\n};\n\nconst getNativeComponent = () => {\n if (isNewArchitectureEnabled()) {\n try {\n const NewArchComponent =\n require('./FTPrivacyViewNativeComponent').default;\n if (NewArchComponent) {\n return NewArchComponent;\n }\n } catch (error) {\n console.debug(\n 'Fabric component not available, falling back to Paper:',\n error instanceof Error ? error.message : String(error)\n );\n }\n }\n\n return requireNativeComponent<FTPrivacyViewNativeProps>('FTPrivacyView');\n};\n\nconst FTPrivacyViewNative = getNativeComponent();\n\nexport default FTPrivacyViewNative;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,cAAc;AACxC,SAASC,sBAAsB,QAAQ,cAAc;AAGrD,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EAAA,IAAAC,qBAAA;EACrC,OAAO,EAAAA,qBAAA,GAAAH,SAAS,CAACI,oBAAoB,cAAAD,qBAAA,uBAA9BA,qBAAA,CAAAE,IAAA,CAAAL,SAAS,EAAwB,eAAe,CAAC,MAAKM,SAAS;AACxE,CAAC;AAED,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EAC/B,IAAIL,wBAAwB,CAAC,CAAC,EAAE;IAC9B,IAAI;MACF,MAAMM,gBAAgB,GACpBC,OAAO,CAAC,gCAAgC,CAAC,CAACC,OAAO;MACnD,IAAIF,gBAAgB,EAAE;QACpB,OAAOA,gBAAgB;MACzB;IACF,CAAC,CAAC,OAAOG,KAAK,EAAE;MACdC,OAAO,CAACC,KAAK,CACX,wDAAwD,EACxDF,KAAK,YAAYG,KAAK,GAAGH,KAAK,CAACI,OAAO,GAAGC,MAAM,CAACL,KAAK,CACvD,CAAC;IACH;EACF;EAEA,OAAOV,sBAAsB,CAA2B,eAAe,CAAC;AAC1E,CAAC;AAED,MAAMgB,mBAAmB,GAAGV,kBAAkB,CAAC,CAAC;AAEhD,eAAeU,mBAAmB","ignoreList":[]}
1
+ {"version":3,"names":["UIManager","requireNativeComponent","isNewArchitectureEnabled","_UIManager$getViewMan","getViewManagerConfig","call","undefined","getNativeComponent","NewArchComponent","require","default","error","console","debug","Error","message","String","FTPrivacyViewNative"],"sources":["FTPrivacyViewNative.ts"],"sourcesContent":["import { UIManager } from 'react-native';\nimport { requireNativeComponent } from 'react-native';\nimport type { FTPrivacyViewNativeProps } from '../types';\n\nconst isNewArchitectureEnabled = () => {\n return UIManager.getViewManagerConfig?.('FTPrivacyView') === undefined;\n};\n\nconst getNativeComponent = () => {\n if (isNewArchitectureEnabled()) {\n try {\n /* eslint-disable @typescript-eslint/no-var-requires */\n const NewArchComponent =\n require('./FTPrivacyViewNativeComponent').default;\n /* eslint-enable @typescript-eslint/no-var-requires */\n if (NewArchComponent) {\n return NewArchComponent;\n }\n } catch (error) {\n console.debug(\n 'Fabric component not available, falling back to Paper:',\n error instanceof Error ? error.message : String(error)\n );\n }\n }\n\n return requireNativeComponent<FTPrivacyViewNativeProps>('FTPrivacyView');\n};\n\nconst FTPrivacyViewNative = getNativeComponent();\n\nexport default FTPrivacyViewNative;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,cAAc;AACxC,SAASC,sBAAsB,QAAQ,cAAc;AAGrD,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EAAA,IAAAC,qBAAA;EACrC,OAAO,EAAAA,qBAAA,GAAAH,SAAS,CAACI,oBAAoB,cAAAD,qBAAA,uBAA9BA,qBAAA,CAAAE,IAAA,CAAAL,SAAS,EAAwB,eAAe,CAAC,MAAKM,SAAS;AACxE,CAAC;AAED,MAAMC,kBAAkB,GAAGA,CAAA,KAAM;EAC/B,IAAIL,wBAAwB,CAAC,CAAC,EAAE;IAC9B,IAAI;MACF;MACA,MAAMM,gBAAgB,GACpBC,OAAO,CAAC,gCAAgC,CAAC,CAACC,OAAO;MACnD;MACA,IAAIF,gBAAgB,EAAE;QACpB,OAAOA,gBAAgB;MACzB;IACF,CAAC,CAAC,OAAOG,KAAK,EAAE;MACdC,OAAO,CAACC,KAAK,CACX,wDAAwD,EACxDF,KAAK,YAAYG,KAAK,GAAGH,KAAK,CAACI,OAAO,GAAGC,MAAM,CAACL,KAAK,CACvD,CAAC;IACH;EACF;EAEA,OAAOV,sBAAsB,CAA2B,eAAe,CAAC;AAC1E,CAAC;AAED,MAAMgB,mBAAmB,GAAGV,kBAAkB,CAAC,CAAC;AAEhD,eAAeU,mBAAmB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["TurboModuleRegistry","get"],"sources":["NativeFTReactNativeSessionReplay.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n /**\n * Set Session Replay configuration and enable session replay\n * @param config Session Replay configuration parameters.\n * @returns a Promise.\n */\n sessionReplayConfig(config:Object): Promise<void>;\n}\nexport default TurboModuleRegistry.get<Spec>('FTReactNativeSessionReplay');"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAUlD,eAAeA,mBAAmB,CAACC,GAAG,CAAO,4BAA4B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["TurboModuleRegistry","get"],"sources":["NativeFTReactNativeSessionReplay.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/ban-types */\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\n\nexport interface Spec extends TurboModule {\n /**\n * Set Session Replay configuration and enable session replay\n * @param config Session Replay configuration parameters.\n * @returns a Promise.\n */\n sessionReplayConfig(config: Object): Promise<void>;\n}\nexport default TurboModuleRegistry.get<Spec>('FTReactNativeSessionReplay');\n"],"mappings":"AAAA;;AAEA,SAASA,mBAAmB,QAAQ,cAAc;AAUlD,eAAeA,mBAAmB,CAACC,GAAG,CAAO,4BAA4B,CAAC","ignoreList":[]}
@@ -32,6 +32,7 @@ export declare enum TextAndInputPrivacyLevel {
32
32
  /**
33
33
  * Set Session Replay configuration.
34
34
  * @param sampleRate Sampling rate
35
+ * @param sessionReplayOnErrorSampleRate error session sampling rate. For sessions not sampled, if ERROR is hit, collect data 1 minute before the error occurs
35
36
  * @param privacy Privacy level for content masking in session replay
36
37
  * @param touchPrivacy Privacy level for touch masking in session replay
37
38
  * @param textAndInputPrivacy Privacy level for text and input masking in session replay
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcare/react-native-session-replay",
3
- "version": "0.4.1-alpha.1",
4
- "description": "Session Replay package for CloudCare React Native SDK",
3
+ "version": "0.4.2-alpha.1",
4
+ "description": "Session Replay package for Guance React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
7
7
  "types": "lib/typescript/index.d.ts",
@@ -81,6 +81,11 @@
81
81
  "jsSrcsDir": "./src/specs",
82
82
  "android": {
83
83
  "javaPackageName": "com.ft.sdk.reactnative.sessionreplay"
84
+ },
85
+ "ios": {
86
+ "componentProvider": {
87
+ "FTPrivacyView": "FTPrivacyViewFabric"
88
+ }
84
89
  }
85
90
  },
86
91
  "dependencies": {
@@ -8,14 +8,14 @@ const fs = require('fs');
8
8
  const path = require('path');
9
9
 
10
10
  function getReactNativeVersion() {
11
- try {
12
- // eslint-disable-next-line global-require
13
- return require('react-native/package.json').version;
14
- } catch (error) {
15
- throw new Error(
16
- 'Failed to find React Native. Ensure it is installed in your project.'
17
- );
18
- }
11
+ try {
12
+ // eslint-disable-next-line global-require
13
+ return require('react-native/package.json').version;
14
+ } catch (error) {
15
+ throw new Error(
16
+ 'Failed to find React Native. Ensure it is installed in your project.'
17
+ );
18
+ }
19
19
  }
20
20
 
21
21
  const rnVersion = getReactNativeVersion();
@@ -24,7 +24,7 @@ const outputDir = path.resolve(__dirname, '../ios');
24
24
  const outputFile = path.join(outputDir, 'RCTVersion.h');
25
25
 
26
26
  if (!fs.existsSync(outputDir)) {
27
- fs.mkdirSync(outputDir, { recursive: true });
27
+ fs.mkdirSync(outputDir, { recursive: true });
28
28
  }
29
29
 
30
30
  const [major, minor, patch] = rnVersion.split('.').map(Number);
@@ -40,8 +40,8 @@ const headerContent = `#ifndef RCTVersion_h
40
40
  `;
41
41
 
42
42
  try {
43
- fs.writeFileSync(outputFile, headerContent, 'utf8');
43
+ fs.writeFileSync(outputFile, headerContent, 'utf8');
44
44
  } catch (error) {
45
- console.error(`Failed to write RCTVersion.h: ${error.message}`);
46
- process.exit(1);
45
+ console.error(`Failed to write RCTVersion.h: ${error.message}`);
46
+ process.exit(1);
47
47
  }
@@ -36,6 +36,7 @@ export enum TextAndInputPrivacyLevel {
36
36
  /**
37
37
  * Set Session Replay configuration.
38
38
  * @param sampleRate Sampling rate
39
+ * @param sessionReplayOnErrorSampleRate error session sampling rate. For sessions not sampled, if ERROR is hit, collect data 1 minute before the error occurs
39
40
  * @param privacy Privacy level for content masking in session replay
40
41
  * @param touchPrivacy Privacy level for touch masking in session replay
41
42
  * @param textAndInputPrivacy Privacy level for text and input masking in session replay
@@ -61,12 +62,17 @@ type FTReactNativeSessionReplayType = {
61
62
  sessionReplayConfig(config: FTSessionReplayConfig): Promise<void>;
62
63
  };
63
64
 
64
- class FTReactNativeSessionReplayWrapper implements FTReactNativeSessionReplayType {
65
- private sessionReplay: FTReactNativeSessionReplayType = require('./specs/NativeFTReactNativeSessionReplay')
66
- .default;
67
- sessionReplayConfig(config:FTSessionReplayConfig): Promise<void>{
68
- return this.sessionReplay.sessionReplayConfig(config);
69
- }
65
+ class FTReactNativeSessionReplayWrapper
66
+ implements FTReactNativeSessionReplayType
67
+ {
68
+ /* eslint-disable @typescript-eslint/no-var-requires */
69
+ private sessionReplay: FTReactNativeSessionReplayType =
70
+ require('./specs/NativeFTReactNativeSessionReplay').default;
71
+ /* eslint-enable @typescript-eslint/no-var-requires */
72
+
73
+ sessionReplayConfig(config: FTSessionReplayConfig): Promise<void> {
74
+ return this.sessionReplay.sessionReplayConfig(config);
75
+ }
70
76
  }
71
77
  export const FTReactNativeSessionReplay: FTReactNativeSessionReplayType =
72
78
  new FTReactNativeSessionReplayWrapper();
@@ -9,8 +9,10 @@ const isNewArchitectureEnabled = () => {
9
9
  const getNativeComponent = () => {
10
10
  if (isNewArchitectureEnabled()) {
11
11
  try {
12
+ /* eslint-disable @typescript-eslint/no-var-requires */
12
13
  const NewArchComponent =
13
14
  require('./FTPrivacyViewNativeComponent').default;
15
+ /* eslint-enable @typescript-eslint/no-var-requires */
14
16
  if (NewArchComponent) {
15
17
  return NewArchComponent;
16
18
  }
@@ -3,11 +3,11 @@ import type { TurboModule } from 'react-native';
3
3
  import { TurboModuleRegistry } from 'react-native';
4
4
 
5
5
  export interface Spec extends TurboModule {
6
- /**
7
- * Set Session Replay configuration and enable session replay
8
- * @param config Session Replay configuration parameters.
9
- * @returns a Promise.
10
- */
11
- sessionReplayConfig(config:Object): Promise<void>;
6
+ /**
7
+ * Set Session Replay configuration and enable session replay
8
+ * @param config Session Replay configuration parameters.
9
+ * @returns a Promise.
10
+ */
11
+ sessionReplayConfig(config: Object): Promise<void>;
12
12
  }
13
- export default TurboModuleRegistry.get<Spec>('FTReactNativeSessionReplay');
13
+ export default TurboModuleRegistry.get<Spec>('FTReactNativeSessionReplay');