react-native-inapp-inspector 2.5.13 → 2.5.15
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 +0 -8
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +118 -31
- package/dist/commonjs/components/Inspector/ConsoleExportModal.js +1 -1
- package/dist/commonjs/components/Inspector/ConsoleTab.js +7 -7
- package/dist/commonjs/components/Inspector/FabLauncher.js +3 -3
- package/dist/commonjs/components/Inspector/InspectorHeader.js +30 -30
- package/dist/commonjs/components/Inspector/MainScreen.js +38 -75
- package/dist/commonjs/components/Inspector/NetworkExportModal.js +4 -4
- package/dist/commonjs/components/Inspector/NetworkTab.js +51 -51
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +17 -16
- package/dist/commonjs/components/Inspector/SettingsPanel.js +40 -41
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
- package/dist/commonjs/components/Inspector/SkeletonPlaceholder.js +34 -3
- package/dist/commonjs/components/Inspector/TabBar.js +9 -15
- package/dist/commonjs/components/LogCard.js +7 -7
- package/dist/commonjs/components/SkeletonPlaceholder.d.ts +3 -0
- package/dist/commonjs/components/SkeletonPlaceholder.js +34 -3
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/helpers/shareFormatter.js +14 -14
- package/dist/commonjs/index.d.ts +1 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +2 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/commonjs/styles/AppFonts.d.ts +4 -0
- package/dist/commonjs/styles/AppFonts.js +1 -1
- package/dist/commonjs/styles/index.d.ts +2 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +0 -2
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +1 -1
- package/dist/esm/components/Inspector/ConsoleExportModal.js +1 -1
- package/dist/esm/components/Inspector/ConsoleTab.js +48 -48
- package/dist/esm/components/Inspector/FabLauncher.js +42 -42
- package/dist/esm/components/Inspector/InspectorHeader.js +50 -50
- package/dist/esm/components/Inspector/MainScreen.js +87 -124
- package/dist/esm/components/Inspector/NetworkExportModal.js +1 -1
- package/dist/esm/components/Inspector/NetworkTab.js +83 -83
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +1 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +23 -22
- package/dist/esm/components/Inspector/SettingsPanel.js +106 -107
- package/dist/esm/components/Inspector/SkeletonPlaceholder.d.ts +3 -0
- package/dist/esm/components/Inspector/SkeletonPlaceholder.js +42 -11
- package/dist/esm/components/Inspector/TabBar.js +35 -41
- package/dist/esm/components/LogCard.js +53 -53
- package/dist/esm/components/SkeletonPlaceholder.d.ts +3 -0
- package/dist/esm/components/SkeletonPlaceholder.js +42 -11
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/helpers/shareFormatter.js +14 -14
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +8 -8
- package/dist/esm/native/NativeInspector.d.ts +2 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/esm/styles/AppFonts.d.ts +4 -0
- package/dist/esm/styles/AppFonts.js +1 -1
- package/dist/esm/styles/index.d.ts +2 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +0 -2
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +1 -1
- package/ios/NetworkInspectorModule.mm +288 -325
- package/package.json +1 -1
- package/src/native/NativeInspector.ts +30 -0
- package/src/native/NativeNetworkInspector.ts +2 -0
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.d.ts +0 -8
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.js +0 -76
- package/dist/commonjs/components/Inspector/DebuggingTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/DebuggingTab.js +0 -197
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.d.ts +0 -7
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.js +0 -97
- package/dist/commonjs/components/Inspector/UiInspectorDetail.d.ts +0 -2
- package/dist/commonjs/components/Inspector/UiInspectorDetail.js +0 -485
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.d.ts +0 -2
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.js +0 -199
- package/dist/commonjs/components/Inspector/UiInspectorTab.d.ts +0 -2
- package/dist/commonjs/components/Inspector/UiInspectorTab.js +0 -117
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.d.ts +0 -10
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.js +0 -148
- package/dist/commonjs/components/Inspector/index.d.ts +0 -28
- package/dist/commonjs/components/Inspector/index.js +0 -1
- package/dist/commonjs/customHooks/uiInspectorManager.d.ts +0 -22
- package/dist/commonjs/customHooks/uiInspectorManager.js +0 -1
- package/dist/commonjs/helpers/uiInspectorEngine.d.ts +0 -62
- package/dist/commonjs/helpers/uiInspectorEngine.js +0 -19
- package/dist/esm/components/Inspector/BoxModelVisualizer.d.ts +0 -8
- package/dist/esm/components/Inspector/BoxModelVisualizer.js +0 -76
- package/dist/esm/components/Inspector/DebuggingTab.d.ts +0 -3
- package/dist/esm/components/Inspector/DebuggingTab.js +0 -197
- package/dist/esm/components/Inspector/UiA11yAuditPanel.d.ts +0 -7
- package/dist/esm/components/Inspector/UiA11yAuditPanel.js +0 -97
- package/dist/esm/components/Inspector/UiInspectorDetail.d.ts +0 -2
- package/dist/esm/components/Inspector/UiInspectorDetail.js +0 -422
- package/dist/esm/components/Inspector/UiInspectorOverlay.d.ts +0 -2
- package/dist/esm/components/Inspector/UiInspectorOverlay.js +0 -138
- package/dist/esm/components/Inspector/UiInspectorTab.d.ts +0 -2
- package/dist/esm/components/Inspector/UiInspectorTab.js +0 -117
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.d.ts +0 -10
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.js +0 -148
- package/dist/esm/components/Inspector/index.d.ts +0 -28
- package/dist/esm/components/Inspector/index.js +0 -1
- package/dist/esm/customHooks/uiInspectorManager.d.ts +0 -22
- package/dist/esm/customHooks/uiInspectorManager.js +0 -1
- package/dist/esm/helpers/uiInspectorEngine.d.ts +0 -48
- package/dist/esm/helpers/uiInspectorEngine.js +0 -19
|
@@ -1,4 +1,35 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(o,t,r,i){i===void 0&&(i=r);var e=Object.getOwnPropertyDescriptor(t,r);(!e||("get"in e?!t.__esModule:e.writable||e.configurable))&&(e={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(o,i,e)}):(function(o,t,r,i){i===void 0&&(i=r),o[i]=t[r]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(o,t){Object.defineProperty(o,"default",{enumerable:!0,value:t})}):function(o,t){o.default=t}),__importStar=this&&this.__importStar||(function(){var o=function(t){return o=Object.getOwnPropertyNames||function(r){var i=[];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(i[i.length]=e);return i},o(t)};return function(t){if(t&&t.__esModule)return t;var r={};if(t!=null)for(var i=o(t),e=0;e<i.length;e++)i[e]!=="default"&&__createBinding(r,t,i[e]);return __setModuleDefault(r,t),r}})();Object.defineProperty(exports,"__esModule",{value:!0}),exports.SkeletonPlaceholder=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),AppColors_1=require("../styles/AppColors");exports.SkeletonPlaceholder=react_1.default.memo(function({tab:t="apis",type:r="card",cardCount:i=4}){const e=(0,react_1.useRef)(new react_native_1.Animated.Value(.4)).current;return(0,react_1.useEffect)(()=>{const a=react_native_1.Animated.loop(react_native_1.Animated.sequence([react_native_1.Animated.timing(e,{toValue:.95,duration:700,useNativeDriver:!0}),react_native_1.Animated.timing(e,{toValue:.4,duration:700,useNativeDriver:!0})]));return a.start(),()=>a.stop()},[e]),r==="detail"?<react_native_1.View style={skeletonStyles.container}accessible={!0}accessibilityRole="progressbar"accessibilityLabel="Loading details, please wait"accessibilityLiveRegion="polite">
|
|
2
|
+
<react_native_1.Animated.View style={[skeletonStyles.detailHeader,{opacity:e}]}/>
|
|
3
|
+
<react_native_1.View style={skeletonStyles.chipStripSkeleton}>
|
|
4
|
+
<react_native_1.Animated.View style={[skeletonStyles.chipSkeleton,{width:70,opacity:e}]}/>
|
|
5
|
+
<react_native_1.Animated.View style={[skeletonStyles.chipSkeleton,{width:90,opacity:e}]}/>
|
|
6
|
+
<react_native_1.Animated.View style={[skeletonStyles.chipSkeleton,{width:80,opacity:e}]}/>
|
|
7
|
+
</react_native_1.View>
|
|
8
|
+
<react_native_1.Animated.View style={[skeletonStyles.detailCodeCard,{opacity:e}]}>
|
|
9
|
+
<react_native_1.View style={[skeletonStyles.urlLineLong,{width:"85%"}]}/>
|
|
10
|
+
<react_native_1.View style={[skeletonStyles.urlLineLong,{width:"70%",marginTop:8}]}/>
|
|
11
|
+
<react_native_1.View style={[skeletonStyles.urlLineLong,{width:"92%",marginTop:8}]}/>
|
|
12
|
+
<react_native_1.View style={[skeletonStyles.urlLineLong,{width:"60%",marginTop:8}]}/>
|
|
13
|
+
<react_native_1.View style={[skeletonStyles.urlLineLong,{width:"78%",marginTop:8}]}/>
|
|
14
|
+
</react_native_1.Animated.View>
|
|
15
|
+
</react_native_1.View>:t==="media"?<react_native_1.View style={skeletonStyles.container}accessible={!0}accessibilityRole="progressbar"accessibilityLabel="Loading media gallery, please wait"accessibilityLiveRegion="polite">
|
|
16
|
+
<react_native_1.View style={skeletonStyles.mediaGrid}>
|
|
17
|
+
{Array.from({length:6}).map((a,l)=><react_native_1.Animated.View key={`skeleton_media_${l}`}style={[skeletonStyles.mediaTile,{opacity:e}]}/>)}
|
|
18
|
+
</react_native_1.View>
|
|
19
|
+
</react_native_1.View>:t==="perf"?<react_native_1.View style={skeletonStyles.container}accessible={!0}accessibilityRole="progressbar"accessibilityLabel="Loading performance diagnostics, please wait"accessibilityLiveRegion="polite">
|
|
20
|
+
<react_native_1.Animated.View style={[skeletonStyles.heroCard,{opacity:e}]}>
|
|
21
|
+
<react_native_1.View style={skeletonStyles.cardTopRow}>
|
|
22
|
+
<react_native_1.View style={skeletonStyles.timeSkeleton}/>
|
|
23
|
+
<react_native_1.View style={skeletonStyles.statusBadgeSkeleton}/>
|
|
24
|
+
</react_native_1.View>
|
|
25
|
+
<react_native_1.View style={[skeletonStyles.urlLineLong,{height:32,marginTop:12}]}/>
|
|
26
|
+
</react_native_1.Animated.View>
|
|
27
|
+
<react_native_1.Animated.View style={[skeletonStyles.cardSkeleton,{opacity:e}]}>
|
|
28
|
+
<react_native_1.View style={[skeletonStyles.urlLineLong,{width:"40%"}]}/>
|
|
29
|
+
<react_native_1.View style={[skeletonStyles.urlLineShort,{marginTop:10}]}/>
|
|
30
|
+
<react_native_1.View style={[skeletonStyles.urlLineLong,{marginTop:8}]}/>
|
|
31
|
+
</react_native_1.Animated.View>
|
|
32
|
+
</react_native_1.View>:<react_native_1.View style={skeletonStyles.container}accessible={!0}accessibilityRole="progressbar"accessibilityLabel={`Loading ${t} data, please wait`}accessibilityLiveRegion="polite">
|
|
2
33
|
|
|
3
34
|
<react_native_1.View style={skeletonStyles.toolbarSkeleton}>
|
|
4
35
|
<react_native_1.Animated.View style={[skeletonStyles.searchBarSkeleton,{opacity:e}]}/>
|
|
@@ -17,7 +48,7 @@
|
|
|
17
48
|
</react_native_1.View>
|
|
18
49
|
|
|
19
50
|
|
|
20
|
-
{Array.from({length:
|
|
51
|
+
{Array.from({length:i}).map((a,l)=><react_native_1.Animated.View key={`skeleton_card_${l}`}style={[skeletonStyles.cardSkeleton,{opacity:e}]}>
|
|
21
52
|
|
|
22
53
|
<react_native_1.View style={skeletonStyles.cardTopRow}>
|
|
23
54
|
<react_native_1.View style={skeletonStyles.badgeGroup}>
|
|
@@ -37,4 +68,4 @@
|
|
|
37
68
|
<react_native_1.View style={skeletonStyles.metaPillSkeleton}/>
|
|
38
69
|
</react_native_1.View>
|
|
39
70
|
</react_native_1.Animated.View>)}
|
|
40
|
-
</react_native_1.View>});const skeletonStyles=react_native_1.StyleSheet.create({container:{flex:1,paddingHorizontal:12,paddingTop:8},toolbarSkeleton:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},searchBarSkeleton:{flex:1,height:36,borderRadius:8,backgroundColor:AppColors_1.AppColors.graySurface,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},actionButtonsRow:{flexDirection:"row",gap:6},iconButtonSkeleton:{width:36,height:36,borderRadius:8,backgroundColor:AppColors_1.AppColors.graySurface,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},chipStripSkeleton:{flexDirection:"row",gap:6,marginBottom:10},chipSkeleton:{height:24,borderRadius:6,backgroundColor:AppColors_1.AppColors.graySurface,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},cardSkeleton:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,padding:12,marginBottom:8,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},cardTopRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},badgeGroup:{flexDirection:"row",alignItems:"center",gap:6},statusBadgeSkeleton:{width:38,height:18,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200},methodBadgeSkeleton:{width:44,height:18,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200},timeSkeleton:{width:48,height:12,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200},urlLineLong:{height:13,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200,marginBottom:5,width:"90%"},urlLineShort:{height:11,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200,marginBottom:8,width:"55%"},cardBottomRow:{flexDirection:"row",gap:8,marginTop:2},metaPillSkeleton:{width:52,height:14,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200}});exports.default=exports.SkeletonPlaceholder;
|
|
71
|
+
</react_native_1.View>});const skeletonStyles=react_native_1.StyleSheet.create({container:{flex:1,paddingHorizontal:12,paddingTop:8},toolbarSkeleton:{flexDirection:"row",alignItems:"center",gap:8,marginBottom:8},searchBarSkeleton:{flex:1,height:36,borderRadius:8,backgroundColor:AppColors_1.AppColors.graySurface,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},actionButtonsRow:{flexDirection:"row",gap:6},iconButtonSkeleton:{width:36,height:36,borderRadius:8,backgroundColor:AppColors_1.AppColors.graySurface,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},chipStripSkeleton:{flexDirection:"row",gap:6,marginBottom:10},chipSkeleton:{height:24,borderRadius:6,backgroundColor:AppColors_1.AppColors.graySurface,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},cardSkeleton:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,padding:12,marginBottom:8,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},cardTopRow:{flexDirection:"row",justifyContent:"space-between",alignItems:"center",marginBottom:8},badgeGroup:{flexDirection:"row",alignItems:"center",gap:6},statusBadgeSkeleton:{width:38,height:18,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200},methodBadgeSkeleton:{width:44,height:18,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200},timeSkeleton:{width:48,height:12,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200},urlLineLong:{height:13,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200,marginBottom:5,width:"90%"},urlLineShort:{height:11,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200,marginBottom:8,width:"55%"},cardBottomRow:{flexDirection:"row",gap:8,marginTop:2},metaPillSkeleton:{width:52,height:14,borderRadius:4,backgroundColor:AppColors_1.AppColors.slate200},heroCard:{backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:12,padding:16,marginBottom:12,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},detailHeader:{height:48,borderRadius:8,backgroundColor:AppColors_1.AppColors.graySurface,marginBottom:12},detailCodeCard:{flex:1,backgroundColor:AppColors_1.AppColors.primaryLight,borderRadius:10,padding:14,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor},mediaGrid:{flexDirection:"row",flexWrap:"wrap",gap:8},mediaTile:{width:"31%",aspectRatio:1,borderRadius:8,backgroundColor:AppColors_1.AppColors.graySurface,borderWidth:1,borderColor:AppColors_1.AppColors.dividerColor}});exports.default=exports.SkeletonPlaceholder;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const ENC_MID = "
|
|
2
|
-
export declare const ENC_SEC = "
|
|
3
|
-
export declare const TELEMETRY_SALT = "
|
|
1
|
+
export declare const ENC_MID = "";
|
|
2
|
+
export declare const ENC_SEC = "";
|
|
3
|
+
export declare const TELEMETRY_SALT = "";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TELEMETRY_SALT=exports.ENC_SEC=exports.ENC_MID=void 0,exports.ENC_MID="
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TELEMETRY_SALT=exports.ENC_SEC=exports.ENC_MID=void 0,exports.ENC_MID="",exports.ENC_SEC="",exports.TELEMETRY_SALT="";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.5.
|
|
1
|
+
export declare const LIB_VERSION = "2.5.15";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LIB_VERSION=void 0,exports.LIB_VERSION="2.5.
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LIB_VERSION=void 0,exports.LIB_VERSION="2.5.15";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFirebaseRemoteConfig=getFirebaseRemoteConfig,exports.isFirebaseRemoteConfigAvailable=isFirebaseRemoteConfigAvailable,exports.fetchRemoteConfigSettings=fetchRemoteConfigSettings,exports.fetchRemoteConfigModuleStatus=fetchRemoteConfigModuleStatus;const MODULE_KEYS=["apis","logs","perf","analytics","redux","storage","device","crash","
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFirebaseRemoteConfig=getFirebaseRemoteConfig,exports.isFirebaseRemoteConfigAvailable=isFirebaseRemoteConfigAvailable,exports.fetchRemoteConfigSettings=fetchRemoteConfigSettings,exports.fetchRemoteConfigModuleStatus=fetchRemoteConfigModuleStatus;const MODULE_KEYS=["apis","logs","perf","analytics","redux","storage","device","crash","media","socket"];let cachedRemoteConfigInstance=null;function getFirebaseRemoteConfig(e){if(e&&typeof e=="object")return cachedRemoteConfigInstance=e,e;if(cachedRemoteConfigInstance)return cachedRemoteConfigInstance;try{const n=require("@react-native-firebase/remote-config"),t=typeof n.default=="function"?n.default():typeof n=="function"?n():n;return cachedRemoteConfigInstance=t,t}catch{return null}}function isFirebaseRemoteConfigAvailable(e){return!!getFirebaseRemoteConfig(e)}function extractValue(e){if(e!=null){if(typeof e=="boolean")return e;if(typeof e=="number")return e!==0;if(typeof e=="string"){const n=e.trim().toLowerCase();if(n==="true"||n==="1"||n==="enabled"||n==="on")return!0;if(n==="false"||n==="0"||n==="disabled"||n==="off")return!1;try{return JSON.parse(e)}catch{return}}if(typeof e.asBoolean=="function")return e.asBoolean();if(typeof e.asString=="function"){const n=e.asString(),t=n.trim().toLowerCase();if(t==="true"||t==="1"||t==="enabled"||t==="on")return!0;if(t==="false"||t==="0"||t==="disabled"||t==="off")return!1;try{return JSON.parse(n)}catch{return}}}}async function fetchRemoteConfigSettings(e,n=8e3){const t=getFirebaseRemoteConfig(e);if(!t)return null;try{const l=(async()=>{typeof t.fetchAndActivate=="function"?await t.fetchAndActivate():(typeof t.fetch=="function"&&await t.fetch(),typeof t.activate=="function"&&await t.activate())})(),p=new Promise((o,r)=>setTimeout(()=>r(new Error("Remote Config fetch timeout")),n));await Promise.race([l,p]).catch(()=>{});const a=o=>{if(typeof t.getValue=="function")try{return t.getValue(o)}catch{return}return t[o]},s={},i={},d=["inspector_modules","inapp_inspector_modules","react_native_inapp_inspector_modules"];for(const o of d){const r=a(o),f=extractValue(r);if(f&&typeof f=="object")for(const c of MODULE_KEYS)typeof f[c]=="boolean"&&(i[c]=f[c])}for(const o of MODULE_KEYS){const r=[`inspector_module_${o}`,`inapp_inspector_${o}`,`inspector_${o}`,`inapp_inspector_module_${o}`,`rn_inspector_${o}`];for(const f of r){const c=a(f),u=extractValue(c);if(typeof u=="boolean"){i[o]=u;break}}}Object.keys(i).length>0&&(i.apis===void 0&&(i.apis=!0),s.modules=i);const y=["inspector_capture_widget_enabled","inapp_inspector_capture_widget","inspector_floating_capture_enabled"];for(const o of y){const r=extractValue(a(o));if(typeof r=="boolean"){s.captureWidgetEnabled=r;break}}const b=["inspector_enabled","inapp_inspector_enabled"];for(const o of b){const r=extractValue(a(o));if(typeof r=="boolean"){s.enabled=r;break}}return Object.keys(s).length>0?s:null}catch{return null}}async function fetchRemoteConfigModuleStatus(e,n=8e3){return(await fetchRemoteConfigSettings(e,n))?.modules||null}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_NETWORK_EXPORT_OPTIONS=exports.DEFAULT_CONSOLE_EXPORT_OPTIONS=void 0,exports.formatApiReport=formatApiReport,exports.formatPushReport=formatPushReport,exports.formatCrashReport=formatCrashReport,exports.formatAnalyticsReport=formatAnalyticsReport,exports.formatReduxReport=formatReduxReport,exports.formatLogReport=formatLogReport,exports.shareApiReport=shareApiReport,exports.sharePushReport=sharePushReport,exports.shareCrashReport=shareCrashReport,exports.shareAnalyticsReport=shareAnalyticsReport,exports.shareReduxReport=shareReduxReport,exports.shareLogReport=shareLogReport,exports.formatSocketReport=formatSocketReport,exports.shareSocketReport=shareSocketReport,exports.generateConsoleLogsFilename=generateConsoleLogsFilename,exports.formatConsoleLogsExport=formatConsoleLogsExport,exports.estimateConsoleLogsExportSize=estimateConsoleLogsExportSize,exports.shareConsoleLogs=shareConsoleLogs,exports.generateNetworkLogsFilename=generateNetworkLogsFilename,exports.formatNetworkLogsExport=formatNetworkLogsExport,exports.estimateNetworkLogsExportSize=estimateNetworkLogsExportSize,exports.shareNetworkLogs=shareNetworkLogs;const react_native_1=require("react-native"),NativeInspector_1=require("../native/NativeInspector"),index_1=require("./index");function safeStringify(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function formatApiReport(e){const n=(e.method||"GET").toUpperCase(),t=e.status===0?"Failed / Network Error":e.status!=null?`${e.status} ${e.status===200?"OK":""}`.trim():"Pending",
|
|
2
|
-
`)}function formatPushReport(e){const n=(0,index_1.formatDateTime)(e.timestamp||Date.now()),t=(e.source||"push").toUpperCase(),
|
|
3
|
-
`)}function formatCrashReport(e){const n=`${e.dateStr||""} ${e.timeStr||""}`.trim()||(0,index_1.formatDateTime)(e.timestamp),t=["\u{1F4A5} CRASH REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u26A0\uFE0F Error: ${e.name||"Error"}: ${e.message||"Unknown error"}`,`\u{1F6A8} Fatal: ${e.isFatal?"YES (Fatal)":"NO (Caught)"}`,`\u{1F3F7}\uFE0F Type: ${(e.type||"js").toUpperCase()}`,`\u{1F552} Time: ${n}`];return e.deviceInfo&&t.push(`\u{1F4F1} Platform: ${e.deviceInfo.platform||"N/A"} (OS: ${e.deviceInfo.osVersion||"N/A"}, RN: ${e.deviceInfo.rnVersion||"N/A"})`),e.memoryInfo?.usedJSHeapSize&&t.push(`\u{1F4BE} Used Heap: ${Math.round(e.memoryInfo.usedJSHeapSize/(1024*1024))} MB`),t.push(""),e.stack&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack),t.push("")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(`\u{1F43E} Breadcrumbs (${e.breadcrumbs.length}):`),e.breadcrumbs.slice(-10).forEach(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DEFAULT_NETWORK_EXPORT_OPTIONS=exports.DEFAULT_CONSOLE_EXPORT_OPTIONS=void 0,exports.formatApiReport=formatApiReport,exports.formatPushReport=formatPushReport,exports.formatCrashReport=formatCrashReport,exports.formatAnalyticsReport=formatAnalyticsReport,exports.formatReduxReport=formatReduxReport,exports.formatLogReport=formatLogReport,exports.shareApiReport=shareApiReport,exports.sharePushReport=sharePushReport,exports.shareCrashReport=shareCrashReport,exports.shareAnalyticsReport=shareAnalyticsReport,exports.shareReduxReport=shareReduxReport,exports.shareLogReport=shareLogReport,exports.formatSocketReport=formatSocketReport,exports.shareSocketReport=shareSocketReport,exports.generateConsoleLogsFilename=generateConsoleLogsFilename,exports.formatConsoleLogsExport=formatConsoleLogsExport,exports.estimateConsoleLogsExportSize=estimateConsoleLogsExportSize,exports.shareConsoleLogs=shareConsoleLogs,exports.generateNetworkLogsFilename=generateNetworkLogsFilename,exports.formatNetworkLogsExport=formatNetworkLogsExport,exports.estimateNetworkLogsExportSize=estimateNetworkLogsExportSize,exports.shareNetworkLogs=shareNetworkLogs;const react_native_1=require("react-native"),NativeInspector_1=require("../native/NativeInspector"),index_1=require("./index");function safeStringify(e){if(e===void 0)return"undefined";if(e===null)return"null";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function formatApiReport(e){const n=(e.method||"GET").toUpperCase(),t=e.status===0?"Failed / Network Error":e.status!=null?`${e.status} ${e.status===200?"OK":""}`.trim():"Pending",r=e.duration!=null?`${e.duration}ms`:"N/A",p=(0,index_1.formatDateTime)(e.startTime||Date.now()),s=(0,index_1.getCurlCommand)(e),u=["\u{1F680} API INSPECTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Method: ${n}`,`\u{1F4CA} Status: ${t}`,`\u23F1\uFE0F Duration: ${r}`,`\u{1F552} Time: ${p}`];return e.client&&u.push(`\u{1F50C} Client: ${e.client.toUpperCase()}`),u.push(`\u{1F310} URL: ${e.url||"N/A"}`),u.push(""),e.requestHeaders&&Object.keys(e.requestHeaders).length>0&&(u.push("\u{1F4CB} Request Headers:"),u.push(safeStringify(e.requestHeaders)),u.push("")),e.request!=null&&e.request!==""&&(u.push("\u{1F4DD} Request Body:"),u.push(safeStringify(e.request)),u.push("")),e.responseHeaders&&Object.keys(e.responseHeaders).length>0&&(u.push("\u{1F4D1} Response Headers:"),u.push(safeStringify(e.responseHeaders)),u.push("")),e.response!=null&&e.response!==""&&(u.push("\u{1F4E5} Response Data:"),u.push(safeStringify(e.response)),u.push("")),s&&(u.push("\u{1F4BB} cURL Command:"),u.push(s),u.push("")),u.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),u.push("Generated by React Native InApp Inspector"),u.join(`
|
|
2
|
+
`)}function formatPushReport(e){const n=(0,index_1.formatDateTime)(e.timestamp||Date.now()),t=(e.source||"push").toUpperCase(),r=(e.appState||"unknown").toUpperCase(),p=(e.action||"received").toUpperCase(),s=["\u{1F514} PUSH NOTIFICATION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Title: ${e.title||"(No Title)"}`,`\u{1F4DD} Body: ${e.body||"(No Body)"}`,`\u{1F3E2} Source: ${t}${e.domain?` (${e.domain})`:""}`,`\u{1F194} Message ID: ${e.id||"N/A"}`,`\u{1F4F1} App State: ${r}`,`\u{1F3AF} Action: ${p}`,`\u{1F552} Time: ${n}`];return e.subtitle&&s.push(`\u{1F4D1} Subtitle: ${e.subtitle}`),e.channelId&&s.push(`\u{1F3F7}\uFE0F Channel: ${e.channelId}`),e.priority&&s.push(`\u26A1 Priority: ${e.priority}`),e.badge!=null&&s.push(`\u{1F522} Badge: ${e.badge}`),e.sound&&s.push(`\u{1F50A} Sound: ${e.sound}`),e.imageUrl&&s.push(`\u{1F5BC}\uFE0F Image: ${e.imageUrl}`),s.push(""),e.data&&Object.keys(e.data).length>0&&(s.push("\u{1F4E6} Custom Data Payload:"),s.push(safeStringify(e.data)),s.push("")),e.customDomainAttributes&&Object.keys(e.customDomainAttributes).length>0&&(s.push("\u{1F3E2} Domain Attributes:"),s.push(safeStringify(e.customDomainAttributes)),s.push("")),e.rawPayload!=null&&(s.push("\u2699\uFE0F Raw Payload:"),s.push(safeStringify(e.rawPayload)),s.push("")),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
|
|
3
|
+
`)}function formatCrashReport(e){const n=`${e.dateStr||""} ${e.timeStr||""}`.trim()||(0,index_1.formatDateTime)(e.timestamp),t=["\u{1F4A5} CRASH REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u26A0\uFE0F Error: ${e.name||"Error"}: ${e.message||"Unknown error"}`,`\u{1F6A8} Fatal: ${e.isFatal?"YES (Fatal)":"NO (Caught)"}`,`\u{1F3F7}\uFE0F Type: ${(e.type||"js").toUpperCase()}`,`\u{1F552} Time: ${n}`];return e.deviceInfo&&t.push(`\u{1F4F1} Platform: ${e.deviceInfo.platform||"N/A"} (OS: ${e.deviceInfo.osVersion||"N/A"}, RN: ${e.deviceInfo.rnVersion||"N/A"})`),e.memoryInfo?.usedJSHeapSize&&t.push(`\u{1F4BE} Used Heap: ${Math.round(e.memoryInfo.usedJSHeapSize/(1024*1024))} MB`),t.push(""),e.stack&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack),t.push("")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(`\u{1F43E} Breadcrumbs (${e.breadcrumbs.length}):`),e.breadcrumbs.slice(-10).forEach(r=>{t.push(` \u2022 [${r.type}] ${r.message} (${(0,index_1.formatDateTime)(r.timestamp)})`)}),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
|
|
4
4
|
`)}function formatAnalyticsReport(e){const n=(0,index_1.formatDateTime)(e.timestamp),t=["\u{1F4CA} ANALYTICS EVENT REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Event Name: ${e.name||"Unknown"}`,`\u{1F3E2} Source: ${(e.source||"manual").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`];return e.screenName&&t.push(`\u{1F4F1} Screen Name: ${e.screenName}`),e.userId&&t.push(`\u{1F464} User ID: ${e.userId}`),e.trackingId&&t.push(`\u{1F194} Tracking ID: ${e.trackingId}`),t.push(""),e.params&&Object.keys(e.params).length>0&&(t.push("\u{1F4E6} Event Parameters:"),t.push(safeStringify(e.params)),t.push("")),e.userProperties&&Object.keys(e.userProperties).length>0&&(t.push("\u{1F464} User Properties:"),t.push(safeStringify(e.userProperties)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
|
|
5
5
|
`)}function formatReduxReport(e){const n=typeof e.timestamp=="number"?(0,index_1.formatDateTime)(e.timestamp):e.timestamp,t=["\u{1F504} REDUX ACTION REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Action Type: ${e.type||"UNKNOWN"}`,`\u{1F552} Timestamp: ${n}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),e.originType&&t.push(`\u2699\uFE0F Origin: ${e.originType}`),e.affectedSlices&&e.affectedSlices.length>0&&t.push(`\u{1F370} Slices: ${e.affectedSlices.join(", ")}`),t.push(""),t.push("\u{1F4E6} Action Payload:"),t.push(safeStringify(e.payload)),t.push(""),e.prevState!==void 0&&(t.push("\u23EE\uFE0F Previous State:"),t.push(safeStringify(e.prevState)),t.push("")),e.nextState!==void 0&&(t.push("\u23ED\uFE0F Next State:"),t.push(safeStringify(e.nextState)),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
|
|
6
6
|
`)}function formatLogReport(e){const n=(0,index_1.formatDateTime)(e.timestamp),t=["\u{1F4DC} CONSOLE LOG REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4CC} Level: ${(e.type||"info").toUpperCase()}`,`\u{1F552} Timestamp: ${n}`,`\u{1F4AC} Message: ${e.message||""}`];return e.caller&&t.push(`\u{1F4CD} Caller: ${e.caller}`),t.push(""),e.rawArgs&&e.rawArgs.length>0&&(t.push("\u{1F4E6} Arguments:"),t.push(safeStringify(e.rawArgs)),t.push("")),(e.stack||e.errorStack)&&(t.push("\u{1F4DC} Stack Trace:"),t.push(e.stack||e.errorStack||""),t.push("")),t.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),t.push("Generated by React Native InApp Inspector"),t.join(`
|
|
7
|
-
`)}async function triggerNativeShare(e,n,t){try{const
|
|
8
|
-
`)}async function shareSocketReport(e){const n=formatSocketReport(e),t=`socket_${e.id??Date.now()}.txt`,
|
|
9
|
-
`).map(
|
|
10
|
-
`);m.push(R)}return m.push(""),m.push(`/${
|
|
7
|
+
`)}async function triggerNativeShare(e,n,t){try{const r=t||`export_${Date.now()}.txt`,p=await(0,NativeInspector_1.writeNativeExportFile)(r,n);if(p){const s=r.endsWith(".json")?"application/json":(r.endsWith(".log")||r.endsWith(".txt"),"text/plain");if(await(0,NativeInspector_1.shareNativeFile)(p,s,e))return}await react_native_1.Share.share({title:e,message:n,url:p||void 0},{dialogTitle:e,subject:e})}catch(r){r?.message!=="User did not share"&&react_native_1.Alert.alert("Share Error",r?.message||"Failed to open share sheet")}}async function shareApiReport(e){const n=formatApiReport(e),t=`api_${e.id??Date.now()}.txt`,r=`API: ${e.method||"GET"} ${e.url?.substring(0,40)||""}`;await triggerNativeShare(r,n,t)}async function sharePushReport(e){const n=formatPushReport(e),t=`push_${e.id??Date.now()}.txt`,r=`Push: ${e.title||e.id||"Notification"}`;await triggerNativeShare(r,n,t)}async function shareCrashReport(e){const n=formatCrashReport(e),t=`crash_${e.timestamp??Date.now()}.txt`,r=`Crash: ${e.name||e.message||"Error"}`;await triggerNativeShare(r,n,t)}async function shareAnalyticsReport(e){const n=formatAnalyticsReport(e),t=`analytics_${e.id??Date.now()}.txt`,r=`Analytics: ${e.name||"Event"}`;await triggerNativeShare(r,n,t)}async function shareReduxReport(e){const n=formatReduxReport(e),t=`redux_${e.id??Date.now()}.txt`,r=`Redux: ${e.type||"Action"}`;await triggerNativeShare(r,n,t)}async function shareLogReport(e){const n=formatLogReport(e),t=`log_${e.id??Date.now()}.txt`,r=`Log: ${(e.type||"info").toUpperCase()} - ${e.message?.substring(0,30)||""}`;await triggerNativeShare(r,n,t)}function formatSocketReport(e){const n=(e.client||"websocket").toUpperCase(),t=(e.status||"open").toUpperCase(),r=e.duration!=null?`${e.duration}ms`:"Active / Open",p=(0,index_1.formatDateTime)(e.startTime||Date.now()),s=["\u{1F50C} WEBSOCKET / SOCKET.IO REPORT","\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501",`\u{1F4E1} Client: ${n}`,`\u{1F310} URL: ${e.url||"N/A"}`,`\u26A1 Status: ${t}`,`\u23F1\uFE0F Connected: ${p}`,`\u23F3 Duration: ${r}`,`\u{1F4E6} Total Frames: ${e.frames?.length||0} (${e.sentCount||0} sent, ${e.receivedCount||0} recvd)`,`\u{1F4CA} Data Size: ${(e.totalBytesSent||0)+(e.totalBytesReceived||0)} bytes`];return e.protocols&&s.push(`\u{1F4DC} Protocols: ${Array.isArray(e.protocols)?e.protocols.join(", "):e.protocols}`),e.closeCode!=null&&s.push(`\u{1F6D1} Close Code: ${e.closeCode} (${e.closeReason||"N/A"})`),e.error&&s.push(`\u274C Error: ${e.error}`),e.caller&&s.push(`\u{1F4CD} Caller: ${e.caller}`),e.query&&Object.keys(e.query).length>0&&(s.push(""),s.push("\u{1F50D} Query Parameters:"),s.push(safeStringify(e.query))),e.frames&&e.frames.length>0&&(s.push(""),s.push("\u{1F4AC} Recent Message Frames:"),e.frames.slice(-10).forEach((u,T)=>{const E=u.direction==="send"?"\u2B06\uFE0F SEND":"\u2B07\uFE0F RECV",S=u.eventName?` [${u.eventName}]`:"";s.push(`--- Frame #${T+1} (${E}${S}, ${u.type}, ${u.size||0}B) ---`),s.push(safeStringify(u.data))})),s.push(""),s.push("\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),s.push("Generated by React Native InApp Inspector"),s.join(`
|
|
8
|
+
`)}async function shareSocketReport(e){const n=formatSocketReport(e),t=`socket_${e.id??Date.now()}.txt`,r=`Socket: ${e.client?.toUpperCase()||"WS"} ${e.url?.substring(0,35)||""}`;await triggerNativeShare(r,n,t)}exports.DEFAULT_CONSOLE_EXPORT_OPTIONS={includeStackTrace:!0,includeArguments:!0,includeCaller:!0,includeTimestamps:!0,includeAppInfo:!0,includeDuplicates:!1,ignorePattern:""};function generateConsoleLogsFilename(e="txt"){const n=new Date,t=String(n.getDate()).padStart(2,"0"),r=String(n.getMonth()+1).padStart(2,"0"),p=String(n.getFullYear()).slice(-2),s=Math.random().toString(36).substring(2,8).padEnd(6,"0");return`log_${t}${r}${p}_${s}.${e==="log"?"log":"txt"}`}function formatConsoleLogsExport(e,n="txt",t=exports.DEFAULT_CONSOLE_EXPORT_OPTIONS){if(!e||e.length===0)return"No console logs to export.";const{includeStackTrace:r=!0,includeArguments:p=!0,includeCaller:s=!0,includeTimestamps:u=!0,includeAppInfo:T=!0,includeDuplicates:E=!1,ignorePattern:S=""}=t;let N=e;if(S&&S.trim().length>0)try{const c=new RegExp(S.trim(),"i");N=e.filter(a=>{const o=a.message||"",l=a.rawArgs?safeStringify(a.rawArgs):"",h=a.caller||"";return!c.test(o)&&!c.test(l)&&!c.test(h)})}catch{}if(N.length===0)return"No console logs to export (all filtered out).";const C=new Date().toLocaleString(),d="********************************************************************************",f=[];T&&f.push(`/${d}`,` * \u{1F4DC} CONSOLE LOGS EXPORT (${n.toUpperCase()})`,` * \u{1F552} Exported At: ${C}`,` * \u{1F4CA} Total Logs: ${e.length}`," * \u2699\uFE0F Generator: React Native InApp Inspector",` ${d}/`,"");const y=e.map((c,a)=>{const o=a+1,l=(0,index_1.formatDateTime)(c.timestamp),h=(c.type||"info").toUpperCase(),$=E&&c.duplicateCount&&c.duplicateCount>1?` [DUPLICATES: \xD7${c.duplicateCount}]`:"",m=[`/${d}`,` * \u{1F4CC} LOG #${o} Starts [${h}]${u?` - ${l}`:""}${$}`,` ${d}/`];if(s&&c.caller&&m.push(`\u{1F4CD} Caller: ${c.caller}`),u&&m.push(`\u{1F552} Time: ${l}`),m.push(`\u{1F3F7}\uFE0F Level: ${h}`),c.sourceMethod&&c.sourceMethod!==c.type&&m.push(`\u2699\uFE0F Method: console.${c.sourceMethod}()`),m.push(""),m.push("\u{1F4AC} Message:"),m.push(c.message||"(Empty message)"),p&&c.rawArgs&&c.rawArgs.length>0&&(m.push(""),m.push("\u{1F4E6} Arguments / Data:"),m.push(safeStringify(c.rawArgs))),r&&(c.stack||c.errorStack)){m.push(""),m.push("\u{1F4DC} Stack Trace & Frames:");const R=(c.stack||c.errorStack||"").split(`
|
|
9
|
+
`).map(i=>` ${i}`).join(`
|
|
10
|
+
`);m.push(R)}return m.push(""),m.push(`/${d}`),m.push(` * \u{1F3C1} LOG #${o} Ends`),m.push(` ${d}/`),m.join(`
|
|
11
11
|
`)}).join(`
|
|
12
12
|
|
|
13
|
-
`),x=T?["",`/${
|
|
14
|
-
`):"";return`${
|
|
15
|
-
`)}${y}${x}`}function estimateConsoleLogsExportSize(e,n="txt",t=exports.DEFAULT_CONSOLE_EXPORT_OPTIONS){if(!e||e.length===0)return 0;const
|
|
16
|
-
`];return g.forEach((o,l)=>{const h=l+1,$=(o.method||"GET").toUpperCase(),m=o.status===0?"Failed / Error":o.status!=null?String(o.status):"Pending",R=o.duration!=null?`${o.duration}ms`:"N/A",
|
|
17
|
-
`)}const y=[];S&&y.push(`/${
|
|
13
|
+
`),x=T?["",`/${d}`," * \u{1F3C1} END OF CONSOLE LOGS EXPORT",` ${d}/`].join(`
|
|
14
|
+
`):"";return`${f.join(`
|
|
15
|
+
`)}${y}${x}`}function estimateConsoleLogsExportSize(e,n="txt",t=exports.DEFAULT_CONSOLE_EXPORT_OPTIONS){if(!e||e.length===0)return 0;const r=Math.min(e.length,20),p=e.slice(0,r),u=formatConsoleLogsExport(p,n,t).length/r;return Math.round(u*e.length)}async function shareConsoleLogs(e,n="txt",t=exports.DEFAULT_CONSOLE_EXPORT_OPTIONS,r){const p=formatConsoleLogsExport(e,n,t),s=generateConsoleLogsFilename(n);await triggerNativeShare(r||s,p,s)}exports.DEFAULT_NETWORK_EXPORT_OPTIONS={includeRequestHeaders:!0,includeRequestBody:!0,includeResponseHeaders:!0,includeResponseBody:!0,includeCurlCommand:!0,includeTimestamps:!0,includeAppInfo:!0,ignorePattern:""};function generateNetworkLogsFilename(e="txt"){const n=new Date,t=String(n.getDate()).padStart(2,"0"),r=String(n.getMonth()+1).padStart(2,"0"),p=String(n.getFullYear()).slice(-2),s=Math.random().toString(36).substring(2,8).padEnd(6,"0");return`api_${t}${r}${p}_${s}.${e==="log"?"log":"txt"}`}function formatNetworkLogsExport(e,n="txt",t=exports.DEFAULT_NETWORK_EXPORT_OPTIONS){if(!e||e.length===0)return"No API requests to export.";const{includeRequestHeaders:r=!0,includeRequestBody:p=!0,includeResponseHeaders:s=!0,includeResponseBody:u=!0,includeCurlCommand:T=!0,includeTimestamps:E=!0,includeAppInfo:S=!0,ignorePattern:N=""}=t;let g=e;if(N&&N.trim().length>0)try{const a=new RegExp(N.trim(),"i");g=e.filter(o=>{const l=o.url||"",h=o.method||"",$=o.client||"",m=o.request?safeStringify(o.request):"",R=o.response?safeStringify(o.response):"",i=o.requestHeaders?safeStringify(o.requestHeaders):"",O=o.responseHeaders?safeStringify(o.responseHeaders):"";return!a.test(l)&&!a.test(h)&&!a.test($)&&!a.test(m)&&!a.test(R)&&!a.test(i)&&!a.test(O)})}catch{}if(g.length===0)return"No API requests to export (all filtered out).";const d=new Date().toLocaleString(),f="********************************************************************************";if(n==="json"){const a=g.map((o,l)=>{const h={index:l+1,id:o.id,url:o.url,method:(o.method||"GET").toUpperCase(),status:o.status,duration:o.duration,startTime:o.startTime,client:o.client};return r&&o.requestHeaders&&(h.requestHeaders=o.requestHeaders),p&&o.request!=null&&(h.request=o.request),s&&o.responseHeaders&&(h.responseHeaders=o.responseHeaders),u&&o.response!=null&&(h.response=o.response),T&&(h.curl=(0,index_1.getCurlCommand)(o)),h});return JSON.stringify(a,null,2)}if(n==="curl"){const a=["#!/usr/bin/env bash","# ============================================================================== ","# \u{1F680} API Network Logs - cURL Script Export",`# \u{1F552} Exported At: ${d}`,`# \u{1F4CA} Total Commands: ${g.length}`,"# \u2699\uFE0F Generator: React Native InApp Inspector",`# ==============================================================================
|
|
16
|
+
`];return g.forEach((o,l)=>{const h=l+1,$=(o.method||"GET").toUpperCase(),m=o.status===0?"Failed / Error":o.status!=null?String(o.status):"Pending",R=o.duration!=null?`${o.duration}ms`:"N/A",i=(0,index_1.formatDateTime)(o.startTime||Date.now());a.push(`# Request #${h}: [${$}] ${o.url||"N/A"} (Status: ${m}, ${R}, ${i})`);const O=(0,index_1.getCurlCommand)(o);O?a.push(O):a.push(`curl -X ${$} "${o.url||""}"`),a.push("")}),a.join(`
|
|
17
|
+
`)}const y=[];S&&y.push(`/${f}`,` * \u{1F680} API NETWORK LOGS EXPORT (${n.toUpperCase()})`,` * \u{1F552} Exported At: ${d}`,` * \u{1F4CA} Total Requests: ${g.length}`," * \u2699\uFE0F Generator: React Native InApp Inspector",` ${f}/`,"");const x=g.map((a,o)=>{const l=o+1,h=(0,index_1.formatDateTime)(a.startTime||Date.now()),$=(a.method||"GET").toUpperCase(),m=a.status===0?"Failed / Network Error":a.status!=null?`${a.status} ${a.status===200?"OK":""}`.trim():"Pending",R=a.duration!=null?`${a.duration}ms`:"N/A",i=[`/${f}`,` * \u{1F4CC} REQUEST #${l} Starts [${$}] [${m}] [${R}]${E?` - ${h}`:""}`,` ${f}/`];if(i.push(`\u{1F310} URL: ${a.url||"N/A"}`),i.push(`\u{1F4CC} Method: ${$}`),i.push(`\u{1F4CA} Status: ${m}`),i.push(`\u23F1\uFE0F Duration: ${R}`),E&&i.push(`\u{1F552} Time: ${h}`),a.client&&i.push(`\u{1F50C} Client: ${a.client.toUpperCase()}`),r&&a.requestHeaders&&Object.keys(a.requestHeaders).length>0&&(i.push(""),i.push("\u{1F4CB} Request Headers:"),i.push(safeStringify(a.requestHeaders))),p&&a.request!=null&&a.request!==""&&(i.push(""),i.push("\u{1F4DD} Request Body:"),i.push(safeStringify(a.request))),s&&a.responseHeaders&&Object.keys(a.responseHeaders).length>0&&(i.push(""),i.push("\u{1F4D1} Response Headers:"),i.push(safeStringify(a.responseHeaders))),u&&a.response!=null&&a.response!==""&&(i.push(""),i.push("\u{1F4E5} Response Data:"),i.push(safeStringify(a.response))),T){const O=(0,index_1.getCurlCommand)(a);O&&(i.push(""),i.push("\u{1F4BB} cURL Command:"),i.push(O))}return i.push(""),i.push(`/${f}`),i.push(` * \u{1F3C1} REQUEST #${l} Ends`),i.push(` ${f}/`),i.join(`
|
|
18
18
|
`)}).join(`
|
|
19
19
|
|
|
20
|
-
`),c=S?["",`/${
|
|
20
|
+
`),c=S?["",`/${f}`," * \u{1F3C1} END OF API NETWORK LOGS EXPORT",` ${f}/`].join(`
|
|
21
21
|
`):"";return`${y.join(`
|
|
22
|
-
`)}${x}${c}`}function estimateNetworkLogsExportSize(e,n="txt",t=exports.DEFAULT_NETWORK_EXPORT_OPTIONS){if(!e||e.length===0)return 0;const
|
|
22
|
+
`)}${x}${c}`}function estimateNetworkLogsExportSize(e,n="txt",t=exports.DEFAULT_NETWORK_EXPORT_OPTIONS){if(!e||e.length===0)return 0;const r=Math.min(e.length,10),p=e.slice(0,r),u=formatNetworkLogsExport(p,n,t).length/r;return Math.round(u*e.length)}async function shareNetworkLogs(e,n="txt",t=exports.DEFAULT_NETWORK_EXPORT_OPTIONS,r){const p=formatNetworkLogsExport(e,n,t),s=generateNetworkLogsFilename(n);await triggerNativeShare(r||s,p,s)}
|
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { default as GlobalCrashScreenModal } from './components/Inspector/Global
|
|
|
13
13
|
export { connectReduxStore, inspectorReduxMiddleware, getReduxState, subscribeReduxState, getActionHistory, clearActionHistory, getLastActionForReducer, setMaxReduxHistoryLimit, getMaxReduxHistoryLimit, pruneReduxHistory, isReduxConnected, } from './customHooks/reduxLogger';
|
|
14
14
|
export { getEventCategory, registerGAPlugin, type GAPlugin, } from './helpers/gaAnalyticsRegistry';
|
|
15
15
|
export { InspectLog, InspectTrackTime, InspectCatch, type InspectLogOptions, } from './decorators';
|
|
16
|
-
export { getNativeDeviceMetrics, enableNativeCrashProtection, subscribeNativeCrashes, showNativeFloatingButton, hideNativeFloatingButton, setNativeFloatingButtonBadge, subscribeNativeFloatingButtonPress, subscribeNativeDeviceShake, startNativeFpsMonitoring, stopNativeFpsMonitoring, getNativeFpsMetrics, getNativeStorageItem, setNativeStorageItem, isNativeModuleAvailable, type NativeDeviceMetrics, type NativeCrashEvent, type FloatingButtonOptions, type NativeFpsMetrics, } from './native/NativeInspector';
|
|
16
|
+
export { getNativeDeviceMetrics, enableNativeCrashProtection, getLastNativeCrash, clearLastNativeCrash, subscribeNativeCrashes, showNativeFloatingButton, hideNativeFloatingButton, setNativeFloatingButtonBadge, subscribeNativeFloatingButtonPress, subscribeNativeDeviceShake, startNativeFpsMonitoring, stopNativeFpsMonitoring, getNativeFpsMetrics, getNativeStorageItem, setNativeStorageItem, isNativeModuleAvailable, type NativeDeviceMetrics, type NativeCrashEvent, type FloatingButtonOptions, type NativeFpsMetrics, } from './native/NativeInspector';
|
|
17
17
|
export { setupMemoryWarningHandler, pruneAllLogs, subscribeMemoryWarning, type MemoryPruneSummary, } from './helpers';
|
|
18
18
|
export { recordPushNotification, recordSalesforcePush, getPushRecords, clearPushRecords, subscribePushEvents, simulateTestPush, autoSetupPushLogger, setMaxPushRecordsLimit, getDiscoveredPushSources, prunePushRecords, } from './customHooks/pushNotificationLogger';
|
|
19
19
|
export { setupSocketLogger, clearSocketRecords, subscribeSocketRecords, getSocketRecords, setSocketModuleEnabled, getSocketModuleEnabled, setMaxSocketRecordsLimit, getMaxSocketRecordsLimit, pruneSocketRecords, recordSocketConnection, recordSocketFrame, recordSocketClose, recordSocketError, simulateTestSocket, analyzeSocketPayload, } from './customHooks/socketLogger';
|