react-native-inapp-inspector 2.2.3 → 2.2.5

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.
Files changed (93) hide show
  1. package/dist/commonjs/components/AnalyticsDetail.js +5 -1
  2. package/dist/commonjs/components/AnalyticsEventCard.js +2 -1
  3. package/dist/commonjs/components/BrandSquareIcon.js +51 -117
  4. package/dist/commonjs/components/DiffViewer.js +1 -1
  5. package/dist/commonjs/components/Inspector/BundleTab.js +22 -0
  6. package/dist/commonjs/components/Inspector/DeviceInfoTab.d.ts +3 -0
  7. package/dist/commonjs/components/Inspector/DeviceInfoTab.js +835 -0
  8. package/dist/commonjs/components/Inspector/InspectorHeader.js +12 -14
  9. package/dist/commonjs/components/Inspector/LogDetail.js +6 -3
  10. package/dist/commonjs/components/Inspector/MainScreen.js +7 -3
  11. package/dist/commonjs/components/Inspector/NetworkTab.js +92 -15
  12. package/dist/commonjs/components/Inspector/PerformanceTab.js +38 -12
  13. package/dist/commonjs/components/Inspector/SettingsPanel.js +440 -229
  14. package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
  15. package/dist/commonjs/components/Inspector/StorageTab.js +892 -0
  16. package/dist/commonjs/components/Inspector/TabBar.js +14 -0
  17. package/dist/commonjs/components/Inspector/TelemetryConsentModal.js +12 -18
  18. package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +4 -1
  19. package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
  20. package/dist/commonjs/components/NetworkIcons.js +30 -1
  21. package/dist/commonjs/constants/version.d.ts +1 -1
  22. package/dist/commonjs/constants/version.js +1 -1
  23. package/dist/commonjs/customHooks/bundleAnalyzer.js +44 -22
  24. package/dist/commonjs/customHooks/storageInspector.d.ts +67 -0
  25. package/dist/commonjs/customHooks/storageInspector.js +486 -0
  26. package/dist/commonjs/i18n/locales/en.json +8 -2
  27. package/dist/commonjs/index.d.ts +1 -0
  28. package/dist/commonjs/index.js +16 -1
  29. package/dist/commonjs/native/NativeInspector.js +50 -26
  30. package/dist/commonjs/storage.d.ts +5 -0
  31. package/dist/commonjs/storage.js +18 -0
  32. package/dist/commonjs/types/enums.d.ts +5 -0
  33. package/dist/commonjs/types/enums.js +5 -0
  34. package/dist/esm/components/AnalyticsDetail.js +6 -2
  35. package/dist/esm/components/AnalyticsEventCard.js +2 -1
  36. package/dist/esm/components/BrandSquareIcon.js +52 -118
  37. package/dist/esm/components/DiffViewer.js +1 -1
  38. package/dist/esm/components/Inspector/BundleTab.js +22 -0
  39. package/dist/esm/components/Inspector/DeviceInfoTab.d.ts +3 -0
  40. package/dist/esm/components/Inspector/DeviceInfoTab.js +796 -0
  41. package/dist/esm/components/Inspector/InspectorHeader.js +13 -15
  42. package/dist/esm/components/Inspector/LogDetail.js +7 -4
  43. package/dist/esm/components/Inspector/MainScreen.js +7 -3
  44. package/dist/esm/components/Inspector/NetworkTab.js +93 -16
  45. package/dist/esm/components/Inspector/PerformanceTab.js +39 -13
  46. package/dist/esm/components/Inspector/SettingsPanel.js +441 -230
  47. package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
  48. package/dist/esm/components/Inspector/StorageTab.js +853 -0
  49. package/dist/esm/components/Inspector/TabBar.js +15 -1
  50. package/dist/esm/components/Inspector/TelemetryConsentModal.js +12 -18
  51. package/dist/esm/components/Inspector/UpdateAvailableModal.js +4 -1
  52. package/dist/esm/components/NetworkIcons.d.ts +6 -0
  53. package/dist/esm/components/NetworkIcons.js +23 -0
  54. package/dist/esm/constants/version.d.ts +1 -1
  55. package/dist/esm/constants/version.js +1 -1
  56. package/dist/esm/customHooks/bundleAnalyzer.js +44 -22
  57. package/dist/esm/customHooks/storageInspector.d.ts +67 -0
  58. package/dist/esm/customHooks/storageInspector.js +469 -0
  59. package/dist/esm/i18n/locales/en.json +8 -2
  60. package/dist/esm/index.d.ts +1 -0
  61. package/dist/esm/index.js +5 -0
  62. package/dist/esm/native/NativeInspector.js +51 -27
  63. package/dist/esm/storage.d.ts +5 -0
  64. package/dist/esm/storage.js +5 -0
  65. package/dist/esm/types/enums.d.ts +5 -0
  66. package/dist/esm/types/enums.js +5 -0
  67. package/ios/NetworkInspectorModule.mm +34 -19
  68. package/package.json +8 -1
  69. package/src/components/AnalyticsDetail.tsx +6 -1
  70. package/src/components/AnalyticsEventCard.tsx +2 -1
  71. package/src/components/BrandSquareIcon.tsx +109 -118
  72. package/src/components/DiffViewer.tsx +1 -1
  73. package/src/components/Inspector/BundleTab.tsx +29 -0
  74. package/src/components/Inspector/DeviceInfoTab.tsx +1204 -0
  75. package/src/components/Inspector/InspectorHeader.tsx +13 -14
  76. package/src/components/Inspector/LogDetail.tsx +15 -11
  77. package/src/components/Inspector/MainScreen.tsx +7 -3
  78. package/src/components/Inspector/NetworkTab.tsx +104 -16
  79. package/src/components/Inspector/PerformanceTab.tsx +46 -12
  80. package/src/components/Inspector/SettingsPanel.tsx +570 -304
  81. package/src/components/Inspector/StorageTab.tsx +1048 -0
  82. package/src/components/Inspector/TabBar.tsx +20 -0
  83. package/src/components/Inspector/TelemetryConsentModal.tsx +17 -52
  84. package/src/components/Inspector/UpdateAvailableModal.tsx +13 -1
  85. package/src/components/NetworkIcons.tsx +103 -0
  86. package/src/constants/version.ts +1 -1
  87. package/src/customHooks/bundleAnalyzer.ts +47 -22
  88. package/src/customHooks/storageInspector.ts +509 -0
  89. package/src/i18n/locales/en.json +8 -2
  90. package/src/index.tsx +21 -1
  91. package/src/native/NativeInspector.ts +56 -24
  92. package/src/storage.ts +18 -0
  93. package/src/types/enums.ts +5 -0
@@ -4,7 +4,7 @@ import { useInspector } from './InspectorContext';
4
4
  import styles from '../../styles';
5
5
  import { AppColors } from '../../styles/AppColors';
6
6
  import TouchableScale from '../TouchableScale';
7
- import { SignalIcon, TerminalIcon, AnalyticsIcon, PackageIcon, ReduxIcon, PerformanceIcon, CrashIcon, } from '../NetworkIcons';
7
+ import { SignalIcon, TerminalIcon, AnalyticsIcon, PackageIcon, ReduxIcon, PerformanceIcon, CrashIcon, SmartphoneIcon, DatabaseIcon, } from '../NetworkIcons';
8
8
  import { isReduxConnected } from '../../customHooks/reduxLogger';
9
9
  import { isAnalyticsConnected } from '../../customHooks/analyticsLogger';
10
10
  const TabBar = React.memo(() => {
@@ -56,6 +56,18 @@ const TabBar = React.memo(() => {
56
56
  count: crashRecords?.length || 0,
57
57
  icon: 'crash',
58
58
  },
59
+ {
60
+ key: 'device',
61
+ label: 'Device',
62
+ count: 0,
63
+ icon: 'device',
64
+ },
65
+ {
66
+ key: 'storage',
67
+ label: 'Storage',
68
+ count: 0,
69
+ icon: 'storage',
70
+ },
59
71
  ]
60
72
  .filter(tab => {
61
73
  if (!tabVisibility?.[tab.key])
@@ -98,6 +110,8 @@ const TabBar = React.memo(() => {
98
110
  {tab.icon === 'bundle' && (<PackageIcon color={iconColor} size={14}/>)}
99
111
  {tab.icon === 'performance' && (<PerformanceIcon color={iconColor} size={14}/>)}
100
112
  {tab.icon === 'crash' && (<CrashIcon color={iconColor} size={14}/>)}
113
+ {tab.icon === 'device' && (<SmartphoneIcon color={iconColor} size={14}/>)}
114
+ {tab.icon === 'storage' && (<DatabaseIcon color={iconColor} size={14}/>)}
101
115
  <Text numberOfLines={1} ellipsizeMode="tail" style={[
102
116
  styles.contentTabButtonText,
103
117
  isActive &&
@@ -1,19 +1,8 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { Modal, View, Text, TouchableOpacity, StyleSheet, Animated, Platform, } from 'react-native';
3
- import Svg, { Path } from 'react-native-svg';
4
3
  import { BrandSquareIcon } from '../BrandSquareIcon';
4
+ import { SettingsIcon, ShieldCheckIcon, CheckIcon, ClearIcon, } from '../NetworkIcons';
5
5
  import { getTelemetryConsentStatus, setTelemetryConsent, sendSessionTelemetryPing, } from '../../helpers/telemetry';
6
- // ─── Inline Crisp SVG Icons ───────────────────────────────────────────────────
7
- const ShieldCheckSvg = ({ size = 15, color = '#7C3AED' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
8
- <Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
9
- <Path d="M9 12l2 2 4-4" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
10
- </Svg>);
11
- const CheckSvg = ({ size = 14, color = '#FFFFFF' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
12
- <Path d="M20 6L9 17l-5-5" stroke={color} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"/>
13
- </Svg>);
14
- const CloseSvg = ({ size = 13, color = '#64748B' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
15
- <Path d="M18 6L6 18M6 6l12 12" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
16
- </Svg>);
17
6
  export const TelemetryConsentModal = () => {
18
7
  const [visible, setVisible] = useState(false);
19
8
  const fadeAnim = useState(new Animated.Value(0))[0];
@@ -76,7 +65,7 @@ export const TelemetryConsentModal = () => {
76
65
  ]}>
77
66
  {/* Top-Right Dismiss Icon Button */}
78
67
  <TouchableOpacity style={styles.topCloseButton} onPress={() => handleDecision(false)} hitSlop={10} activeOpacity={0.7}>
79
- <CloseSvg size={13} color="#64748B"/>
68
+ <ClearIcon size={12} color="#64748B"/>
80
69
  </TouchableOpacity>
81
70
 
82
71
  {/* Centered Enlarged Square Brand Icon Header */}
@@ -90,8 +79,9 @@ export const TelemetryConsentModal = () => {
90
79
 
91
80
  {/* Subheading instruction hint badge */}
92
81
  <View style={styles.hintBadge}>
82
+ <SettingsIcon size={12} color="#6366F1"/>
93
83
  <Text style={styles.hintBadgeText}>
94
- ⚙️ You can enable or disable this anytime in Settings
84
+ You can enable or disable this anytime in Settings
95
85
  </Text>
96
86
  </View>
97
87
  </View>
@@ -106,7 +96,7 @@ export const TelemetryConsentModal = () => {
106
96
  {/* Privacy Callout Box */}
107
97
  <View style={styles.privacyBadge}>
108
98
  <View style={styles.privacyShieldWrapper}>
109
- <ShieldCheckSvg size={15} color="#7C3AED"/>
99
+ <ShieldCheckIcon size={15} color="#7C3AED"/>
110
100
  </View>
111
101
  <Text style={styles.privacyText}>
112
102
  <Text style={styles.privacyHighlight}>Privacy Guaranteed:</Text> We
@@ -118,12 +108,12 @@ export const TelemetryConsentModal = () => {
118
108
  {/* Enhanced Action Buttons with Icons */}
119
109
  <View style={styles.buttonRow}>
120
110
  <TouchableOpacity style={styles.declineButton} onPress={() => handleDecision(false)} activeOpacity={0.7}>
121
- <CloseSvg size={12} color="#64748B"/>
111
+ <ClearIcon size={12} color="#64748B"/>
122
112
  <Text style={styles.declineText}>Not Now</Text>
123
113
  </TouchableOpacity>
124
114
 
125
115
  <TouchableOpacity style={styles.allowButton} onPress={() => handleDecision(true)} activeOpacity={0.85}>
126
- <CheckSvg size={13} color="#FFFFFF"/>
116
+ <CheckIcon size={13} color="#FFFFFF"/>
127
117
  <Text style={styles.allowText}>Allow & Share</Text>
128
118
  </TouchableOpacity>
129
119
  </View>
@@ -221,12 +211,16 @@ const styles = StyleSheet.create({
221
211
  ...fontStack,
222
212
  },
223
213
  hintBadge: {
214
+ flexDirection: 'row',
215
+ alignItems: 'center',
216
+ justifyContent: 'center',
217
+ gap: 5,
224
218
  backgroundColor: '#EDE9FE80',
225
219
  borderWidth: 1,
226
220
  borderColor: '#DDD6FE',
227
221
  borderRadius: 7,
228
222
  paddingHorizontal: 8,
229
- paddingVertical: 2.5,
223
+ paddingVertical: 3,
230
224
  marginBottom: 8,
231
225
  },
232
226
  hintBadgeText: {
@@ -25,6 +25,9 @@ const CloseSvg = ({ size = 13, color = '#64748B' }) => (<Svg width={size} height
25
25
  const SparkleSvg = ({ size = 14, color = '#F59E0B' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
26
26
  <Path d="M12 2l2.4 6.6L21 11l-6.6 2.4L12 20l-2.4-6.6L3 11l6.6-2.4L12 2z" fill={color}/>
27
27
  </Svg>);
28
+ const ArrowRightSvg = ({ size = 14, color = '#94A3B8' }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
29
+ <Path d="M5 12h14M12 5l7 7-7 7" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
30
+ </Svg>);
28
31
  export const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
29
32
  const [copied, setCopied] = useState(false);
30
33
  const fadeAnim = useState(new Animated.Value(0))[0];
@@ -117,7 +120,7 @@ export const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
117
120
  </View>
118
121
 
119
122
  <View style={styles.arrowContainer}>
120
- <Text style={styles.arrowText}>➔</Text>
123
+ <ArrowRightSvg size={14} color="#94A3B8"/>
121
124
  </View>
122
125
 
123
126
  <View style={styles.versionColumn}>
@@ -127,3 +127,9 @@ export declare const TagIcon: ({ color, size }: IconProps) => React.JSX.Element;
127
127
  export declare const NpmIcon: ({ color, size }: IconProps) => React.JSX.Element;
128
128
  export declare const ResetIcon: ({ color, size }: IconProps) => React.JSX.Element;
129
129
  export declare const ChevronDownIcon: ({ color, size }: IconProps) => React.JSX.Element;
130
+ export declare const CpuIcon: ({ color, size, }: IconProps) => React.JSX.Element;
131
+ export declare const WifiIcon: ({ color, size, }: IconProps) => React.JSX.Element;
132
+ export declare const ShieldCheckIcon: ({ color, size, }: IconProps) => React.JSX.Element;
133
+ export declare const DatabaseIcon: ({ color, size, }: IconProps) => React.JSX.Element;
134
+ export declare const PencilIcon: ({ color, size, }: IconProps) => React.JSX.Element;
135
+ export declare const PlusIcon: ({ color, size, }: IconProps) => React.JSX.Element;
@@ -711,3 +711,26 @@ export const ResetIcon = ({ color = AppColors.white, size = 16 }) => (<Svg width
711
711
  export const ChevronDownIcon = ({ color = AppColors.grayTextWeak, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
712
712
  <Path d="M6 9l6 6 6-6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
713
713
  </Svg>);
714
+ export const CpuIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
715
+ <Rect x="4" y="4" width="16" height="16" rx="2" stroke={color} strokeWidth="2"/>
716
+ <Rect x="9" y="9" width="6" height="6" stroke={color} strokeWidth="2"/>
717
+ <Path d="M9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3" stroke={color} strokeWidth="2" strokeLinecap="round"/>
718
+ </Svg>);
719
+ export const WifiIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
720
+ <Path d="M5 12.55a11 11 0 0 1 14.08 0M1.42 9a16 16 0 0 1 21.16 0M8.53 16.11a6 6 0 0 1 6.95 0M12 20h.01" stroke={color} strokeWidth="2" strokeLinecap="round"/>
721
+ </Svg>);
722
+ export const ShieldCheckIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
723
+ <Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
724
+ <Path d="M9 12l2 2 4-4" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
725
+ </Svg>);
726
+ export const DatabaseIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
727
+ <Ellipse cx="12" cy="5" rx="9" ry="3" stroke={color} strokeWidth="2"/>
728
+ <Path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3" stroke={color} strokeWidth="2" strokeLinecap="round"/>
729
+ <Path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5" stroke={color} strokeWidth="2" strokeLinecap="round"/>
730
+ </Svg>);
731
+ export const PencilIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
732
+ <Path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
733
+ </Svg>);
734
+ export const PlusIcon = ({ color = AppColors.grayTextWeak, size = 14, }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
735
+ <Path d="M12 5v14M5 12h14" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
736
+ </Svg>);
@@ -1 +1 @@
1
- export declare const LIB_VERSION = "2.2.3";
1
+ export declare const LIB_VERSION = "2.2.5";
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED FILE — do not edit by hand.
2
2
  // Regenerated from package.json on every build by scripts/gen-version.js.
3
- export const LIB_VERSION = '2.2.3';
3
+ export const LIB_VERSION = '2.2.5';
@@ -21,8 +21,9 @@ export const getBundleModuleEnabled = () => isBundleModuleEnabled;
21
21
  const getSourceCodeModule = () => {
22
22
  try {
23
23
  const legacy = NativeModules?.SourceCode;
24
- if (legacy && typeof legacy.scriptURL === 'string' && legacy.scriptURL.length > 0) {
25
- return legacy;
24
+ const scriptURL = legacy?.scriptURL || legacy?.getConstants?.()?.scriptURL;
25
+ if (typeof scriptURL === 'string' && scriptURL.length > 0) {
26
+ return { scriptURL };
26
27
  }
27
28
  }
28
29
  catch { }
@@ -96,9 +97,9 @@ const extractHostAndPort = (scriptURL) => {
96
97
  }
97
98
  return { host: null, port: null };
98
99
  };
99
- const probeCandidateUrlsInParallel = async (scriptURL, timeoutMs = 2500) => {
100
+ const probeCandidateUrlsInParallel = async (scriptURL, timeoutMs = 3000) => {
100
101
  const { host: extractedHost, port: extractedPort } = extractHostAndPort(scriptURL);
101
- // 1. If we have a direct scriptURL, try fetching directly
102
+ // 1. If we have a direct HTTP scriptURL, try fetching directly
102
103
  if (scriptURL && scriptURL.startsWith('http')) {
103
104
  try {
104
105
  const controller = new AbortController();
@@ -118,7 +119,7 @@ const probeCandidateUrlsInParallel = async (scriptURL, timeoutMs = 2500) => {
118
119
  // Continue to dynamic port discovery
119
120
  }
120
121
  }
121
- // 2. Dynamic Port Discovery via lightweight Metro /status probe (20 bytes per check)
122
+ // 2. Dynamic Port Discovery via parallel lightweight Metro /status probes
122
123
  const candidateHosts = extractedHost
123
124
  ? [extractedHost, 'localhost', '127.0.0.1', ...(Platform.OS === 'android' ? ['10.0.2.2', '10.0.3.2'] : [])]
124
125
  : ['localhost', '127.0.0.1', ...(Platform.OS === 'android' ? ['10.0.2.2', '10.0.3.2'] : [])];
@@ -126,29 +127,50 @@ const probeCandidateUrlsInParallel = async (scriptURL, timeoutMs = 2500) => {
126
127
  const candidatePorts = extractedPort
127
128
  ? Array.from(new Set([extractedPort, ...DYNAMIC_DEV_PORTS]))
128
129
  : DYNAMIC_DEV_PORTS;
129
- let activeServer = null;
130
- // Probe lightweight /status on candidate ports (very fast 400ms timeout)
130
+ const probeTasks = [];
131
131
  for (const host of uniqueHosts) {
132
132
  for (const port of candidatePorts) {
133
- try {
133
+ probeTasks.push(new Promise(async (resolve, reject) => {
134
134
  const controller = new AbortController();
135
- const timer = setTimeout(() => controller.abort(), 450);
136
- const res = await fetch(`http://${host}:${port}/status`, { signal: controller.signal });
137
- clearTimeout(timer);
138
- if (res.ok) {
139
- const statusText = await res.text();
140
- if (statusText && statusText.includes('packager-status:running')) {
141
- activeServer = { host, port };
142
- break;
135
+ const timer = setTimeout(() => controller.abort(), 700);
136
+ try {
137
+ const res = await fetch(`http://${host}:${port}/status`, { signal: controller.signal });
138
+ clearTimeout(timer);
139
+ if (res.ok) {
140
+ const statusText = await res.text();
141
+ if (statusText && statusText.includes('packager-status:running')) {
142
+ resolve({ host, port });
143
+ return;
144
+ }
143
145
  }
144
146
  }
145
- }
146
- catch {
147
- // Continue to next port
148
- }
147
+ catch {
148
+ clearTimeout(timer);
149
+ }
150
+ reject(new Error('unreachable'));
151
+ }));
149
152
  }
150
- if (activeServer)
151
- break;
153
+ }
154
+ let activeServer = null;
155
+ try {
156
+ activeServer = await new Promise((resolve, reject) => {
157
+ let pending = probeTasks.length;
158
+ if (pending === 0) {
159
+ reject(new Error('No candidate hosts'));
160
+ return;
161
+ }
162
+ probeTasks.forEach(p => {
163
+ p.then(resolve).catch(() => {
164
+ pending--;
165
+ if (pending === 0) {
166
+ reject(new Error('All probes failed'));
167
+ }
168
+ });
169
+ });
170
+ });
171
+ }
172
+ catch {
173
+ activeServer = null;
152
174
  }
153
175
  // 3. If a live Metro port was detected dynamically, fetch the bundle from it
154
176
  if (activeServer) {
@@ -0,0 +1,67 @@
1
+ export interface StorageEntry {
2
+ key: string;
3
+ value: string;
4
+ parsedValue?: any;
5
+ type: 'json' | 'string' | 'number' | 'boolean' | 'null';
6
+ byteSize: number;
7
+ }
8
+ export type StorageDriver = 'asyncStorage' | 'mmkv';
9
+ /**
10
+ * Register an AsyncStorage instance with the inspector (optional override).
11
+ */
12
+ export declare const connectAsyncStorage: (storageInstance: any) => void;
13
+ /**
14
+ * Register an MMKV instance with the inspector (optional override).
15
+ */
16
+ export declare const connectMMKV: (mmkvInstance: any, id?: string) => void;
17
+ /**
18
+ * Auto-detect AsyncStorage:
19
+ * 1. Explicit connection
20
+ * 2. Global instance
21
+ * 3. Dynamic require '@react-native-async-storage/async-storage'
22
+ * 4. Native Bridge Direct interface
23
+ */
24
+ export declare const getResolvedAsyncStorage: () => any;
25
+ /**
26
+ * Auto-detect MMKV:
27
+ * 1. Explicit connection
28
+ * 2. Dynamic require 'react-native-mmkv' & instantiate default instance
29
+ * 3. Global MMKV / JSI instances
30
+ */
31
+ export declare const getResolvedMMKV: (id?: string) => any;
32
+ export declare const isAsyncStorageConnected: () => boolean;
33
+ export declare const isMMKVConnected: () => boolean;
34
+ export declare const getRegisteredMMKVInstanceIds: () => string[];
35
+ /**
36
+ * Calculate approximate byte size of a UTF-8 string
37
+ */
38
+ export declare const calculateByteSize: (str: string) => number;
39
+ /**
40
+ * Determine type and format value safely
41
+ */
42
+ export declare const analyzeStorageValue: (rawVal: any) => {
43
+ strVal: string;
44
+ parsedVal?: any;
45
+ type: "json" | "string" | "number" | "boolean" | "null";
46
+ byteSize: number;
47
+ };
48
+ /**
49
+ * Fetch all storage entries for given driver
50
+ */
51
+ export declare const fetchStorageEntries: (driver: StorageDriver, instanceId?: string) => Promise<StorageEntry[]>;
52
+ /**
53
+ * Create or Update a key-value entry (CRUD: Create / Update)
54
+ */
55
+ export declare const setStorageEntry: (driver: StorageDriver, key: string, value: string, instanceId?: string) => Promise<boolean>;
56
+ /**
57
+ * Delete a single key (CRUD: Delete)
58
+ */
59
+ export declare const removeStorageEntry: (driver: StorageDriver, key: string, instanceId?: string) => Promise<boolean>;
60
+ /**
61
+ * Wipe all keys for given storage (CRUD: Clear All)
62
+ */
63
+ export declare const clearStorageDriver: (driver: StorageDriver, instanceId?: string) => Promise<boolean>;
64
+ /**
65
+ * Subscribe to storage mutations
66
+ */
67
+ export declare const subscribeToStorageChanges: (listener: () => void) => (() => void);