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.
- package/dist/commonjs/components/AnalyticsDetail.js +5 -1
- package/dist/commonjs/components/AnalyticsEventCard.js +2 -1
- package/dist/commonjs/components/BrandSquareIcon.js +51 -117
- package/dist/commonjs/components/DiffViewer.js +1 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +22 -0
- package/dist/commonjs/components/Inspector/DeviceInfoTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +835 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +12 -14
- package/dist/commonjs/components/Inspector/LogDetail.js +6 -3
- package/dist/commonjs/components/Inspector/MainScreen.js +7 -3
- package/dist/commonjs/components/Inspector/NetworkTab.js +92 -15
- package/dist/commonjs/components/Inspector/PerformanceTab.js +38 -12
- package/dist/commonjs/components/Inspector/SettingsPanel.js +440 -229
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +892 -0
- package/dist/commonjs/components/Inspector/TabBar.js +14 -0
- package/dist/commonjs/components/Inspector/TelemetryConsentModal.js +12 -18
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +4 -1
- package/dist/commonjs/components/NetworkIcons.d.ts +6 -0
- package/dist/commonjs/components/NetworkIcons.js +30 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.js +44 -22
- package/dist/commonjs/customHooks/storageInspector.d.ts +67 -0
- package/dist/commonjs/customHooks/storageInspector.js +486 -0
- package/dist/commonjs/i18n/locales/en.json +8 -2
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +16 -1
- package/dist/commonjs/native/NativeInspector.js +50 -26
- package/dist/commonjs/storage.d.ts +5 -0
- package/dist/commonjs/storage.js +18 -0
- package/dist/commonjs/types/enums.d.ts +5 -0
- package/dist/commonjs/types/enums.js +5 -0
- package/dist/esm/components/AnalyticsDetail.js +6 -2
- package/dist/esm/components/AnalyticsEventCard.js +2 -1
- package/dist/esm/components/BrandSquareIcon.js +52 -118
- package/dist/esm/components/DiffViewer.js +1 -1
- package/dist/esm/components/Inspector/BundleTab.js +22 -0
- package/dist/esm/components/Inspector/DeviceInfoTab.d.ts +3 -0
- package/dist/esm/components/Inspector/DeviceInfoTab.js +796 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +13 -15
- package/dist/esm/components/Inspector/LogDetail.js +7 -4
- package/dist/esm/components/Inspector/MainScreen.js +7 -3
- package/dist/esm/components/Inspector/NetworkTab.js +93 -16
- package/dist/esm/components/Inspector/PerformanceTab.js +39 -13
- package/dist/esm/components/Inspector/SettingsPanel.js +441 -230
- package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/esm/components/Inspector/StorageTab.js +853 -0
- package/dist/esm/components/Inspector/TabBar.js +15 -1
- package/dist/esm/components/Inspector/TelemetryConsentModal.js +12 -18
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +4 -1
- package/dist/esm/components/NetworkIcons.d.ts +6 -0
- package/dist/esm/components/NetworkIcons.js +23 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/bundleAnalyzer.js +44 -22
- package/dist/esm/customHooks/storageInspector.d.ts +67 -0
- package/dist/esm/customHooks/storageInspector.js +469 -0
- package/dist/esm/i18n/locales/en.json +8 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/native/NativeInspector.js +51 -27
- package/dist/esm/storage.d.ts +5 -0
- package/dist/esm/storage.js +5 -0
- package/dist/esm/types/enums.d.ts +5 -0
- package/dist/esm/types/enums.js +5 -0
- package/ios/NetworkInspectorModule.mm +34 -19
- package/package.json +8 -1
- package/src/components/AnalyticsDetail.tsx +6 -1
- package/src/components/AnalyticsEventCard.tsx +2 -1
- package/src/components/BrandSquareIcon.tsx +109 -118
- package/src/components/DiffViewer.tsx +1 -1
- package/src/components/Inspector/BundleTab.tsx +29 -0
- package/src/components/Inspector/DeviceInfoTab.tsx +1204 -0
- package/src/components/Inspector/InspectorHeader.tsx +13 -14
- package/src/components/Inspector/LogDetail.tsx +15 -11
- package/src/components/Inspector/MainScreen.tsx +7 -3
- package/src/components/Inspector/NetworkTab.tsx +104 -16
- package/src/components/Inspector/PerformanceTab.tsx +46 -12
- package/src/components/Inspector/SettingsPanel.tsx +570 -304
- package/src/components/Inspector/StorageTab.tsx +1048 -0
- package/src/components/Inspector/TabBar.tsx +20 -0
- package/src/components/Inspector/TelemetryConsentModal.tsx +17 -52
- package/src/components/Inspector/UpdateAvailableModal.tsx +13 -1
- package/src/components/NetworkIcons.tsx +103 -0
- package/src/constants/version.ts +1 -1
- package/src/customHooks/bundleAnalyzer.ts +47 -22
- package/src/customHooks/storageInspector.ts +509 -0
- package/src/i18n/locales/en.json +8 -2
- package/src/index.tsx +21 -1
- package/src/native/NativeInspector.ts +56 -24
- package/src/storage.ts +18 -0
- package/src/types/enums.ts +5 -0
|
@@ -61,6 +61,18 @@ const TabBar = react_1.default.memo(() => {
|
|
|
61
61
|
count: crashRecords?.length || 0,
|
|
62
62
|
icon: 'crash',
|
|
63
63
|
},
|
|
64
|
+
{
|
|
65
|
+
key: 'device',
|
|
66
|
+
label: 'Device',
|
|
67
|
+
count: 0,
|
|
68
|
+
icon: 'device',
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: 'storage',
|
|
72
|
+
label: 'Storage',
|
|
73
|
+
count: 0,
|
|
74
|
+
icon: 'storage',
|
|
75
|
+
},
|
|
64
76
|
]
|
|
65
77
|
.filter(tab => {
|
|
66
78
|
if (!tabVisibility?.[tab.key])
|
|
@@ -103,6 +115,8 @@ const TabBar = react_1.default.memo(() => {
|
|
|
103
115
|
{tab.icon === 'bundle' && (<NetworkIcons_1.PackageIcon color={iconColor} size={14}/>)}
|
|
104
116
|
{tab.icon === 'performance' && (<NetworkIcons_1.PerformanceIcon color={iconColor} size={14}/>)}
|
|
105
117
|
{tab.icon === 'crash' && (<NetworkIcons_1.CrashIcon color={iconColor} size={14}/>)}
|
|
118
|
+
{tab.icon === 'device' && (<NetworkIcons_1.SmartphoneIcon color={iconColor} size={14}/>)}
|
|
119
|
+
{tab.icon === 'storage' && (<NetworkIcons_1.DatabaseIcon color={iconColor} size={14}/>)}
|
|
106
120
|
<react_native_1.Text numberOfLines={1} ellipsizeMode="tail" style={[
|
|
107
121
|
styles_1.default.contentTabButtonText,
|
|
108
122
|
isActive &&
|
|
@@ -36,20 +36,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.TelemetryConsentModal = void 0;
|
|
37
37
|
const react_1 = __importStar(require("react"));
|
|
38
38
|
const react_native_1 = require("react-native");
|
|
39
|
-
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
40
39
|
const BrandSquareIcon_1 = require("../BrandSquareIcon");
|
|
40
|
+
const NetworkIcons_1 = require("../NetworkIcons");
|
|
41
41
|
const telemetry_1 = require("../../helpers/telemetry");
|
|
42
|
-
// ─── Inline Crisp SVG Icons ───────────────────────────────────────────────────
|
|
43
|
-
const ShieldCheckSvg = ({ size = 15, color = '#7C3AED' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
44
|
-
<react_native_svg_1.Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
45
|
-
<react_native_svg_1.Path d="M9 12l2 2 4-4" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
46
|
-
</react_native_svg_1.default>);
|
|
47
|
-
const CheckSvg = ({ size = 14, color = '#FFFFFF' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
48
|
-
<react_native_svg_1.Path d="M20 6L9 17l-5-5" stroke={color} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"/>
|
|
49
|
-
</react_native_svg_1.default>);
|
|
50
|
-
const CloseSvg = ({ size = 13, color = '#64748B' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
51
|
-
<react_native_svg_1.Path d="M18 6L6 18M6 6l12 12" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
52
|
-
</react_native_svg_1.default>);
|
|
53
42
|
const TelemetryConsentModal = () => {
|
|
54
43
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
55
44
|
const fadeAnim = (0, react_1.useState)(new react_native_1.Animated.Value(0))[0];
|
|
@@ -112,7 +101,7 @@ const TelemetryConsentModal = () => {
|
|
|
112
101
|
]}>
|
|
113
102
|
{/* Top-Right Dismiss Icon Button */}
|
|
114
103
|
<react_native_1.TouchableOpacity style={styles.topCloseButton} onPress={() => handleDecision(false)} hitSlop={10} activeOpacity={0.7}>
|
|
115
|
-
<
|
|
104
|
+
<NetworkIcons_1.ClearIcon size={12} color="#64748B"/>
|
|
116
105
|
</react_native_1.TouchableOpacity>
|
|
117
106
|
|
|
118
107
|
{/* Centered Enlarged Square Brand Icon Header */}
|
|
@@ -126,8 +115,9 @@ const TelemetryConsentModal = () => {
|
|
|
126
115
|
|
|
127
116
|
{/* Subheading instruction hint badge */}
|
|
128
117
|
<react_native_1.View style={styles.hintBadge}>
|
|
118
|
+
<NetworkIcons_1.SettingsIcon size={12} color="#6366F1"/>
|
|
129
119
|
<react_native_1.Text style={styles.hintBadgeText}>
|
|
130
|
-
|
|
120
|
+
You can enable or disable this anytime in Settings
|
|
131
121
|
</react_native_1.Text>
|
|
132
122
|
</react_native_1.View>
|
|
133
123
|
</react_native_1.View>
|
|
@@ -142,7 +132,7 @@ const TelemetryConsentModal = () => {
|
|
|
142
132
|
{/* Privacy Callout Box */}
|
|
143
133
|
<react_native_1.View style={styles.privacyBadge}>
|
|
144
134
|
<react_native_1.View style={styles.privacyShieldWrapper}>
|
|
145
|
-
<
|
|
135
|
+
<NetworkIcons_1.ShieldCheckIcon size={15} color="#7C3AED"/>
|
|
146
136
|
</react_native_1.View>
|
|
147
137
|
<react_native_1.Text style={styles.privacyText}>
|
|
148
138
|
<react_native_1.Text style={styles.privacyHighlight}>Privacy Guaranteed:</react_native_1.Text> We
|
|
@@ -154,12 +144,12 @@ const TelemetryConsentModal = () => {
|
|
|
154
144
|
{/* Enhanced Action Buttons with Icons */}
|
|
155
145
|
<react_native_1.View style={styles.buttonRow}>
|
|
156
146
|
<react_native_1.TouchableOpacity style={styles.declineButton} onPress={() => handleDecision(false)} activeOpacity={0.7}>
|
|
157
|
-
<
|
|
147
|
+
<NetworkIcons_1.ClearIcon size={12} color="#64748B"/>
|
|
158
148
|
<react_native_1.Text style={styles.declineText}>Not Now</react_native_1.Text>
|
|
159
149
|
</react_native_1.TouchableOpacity>
|
|
160
150
|
|
|
161
151
|
<react_native_1.TouchableOpacity style={styles.allowButton} onPress={() => handleDecision(true)} activeOpacity={0.85}>
|
|
162
|
-
<
|
|
152
|
+
<NetworkIcons_1.CheckIcon size={13} color="#FFFFFF"/>
|
|
163
153
|
<react_native_1.Text style={styles.allowText}>Allow & Share</react_native_1.Text>
|
|
164
154
|
</react_native_1.TouchableOpacity>
|
|
165
155
|
</react_native_1.View>
|
|
@@ -258,12 +248,16 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
258
248
|
...fontStack,
|
|
259
249
|
},
|
|
260
250
|
hintBadge: {
|
|
251
|
+
flexDirection: 'row',
|
|
252
|
+
alignItems: 'center',
|
|
253
|
+
justifyContent: 'center',
|
|
254
|
+
gap: 5,
|
|
261
255
|
backgroundColor: '#EDE9FE80',
|
|
262
256
|
borderWidth: 1,
|
|
263
257
|
borderColor: '#DDD6FE',
|
|
264
258
|
borderRadius: 7,
|
|
265
259
|
paddingHorizontal: 8,
|
|
266
|
-
paddingVertical:
|
|
260
|
+
paddingVertical: 3,
|
|
267
261
|
marginBottom: 8,
|
|
268
262
|
},
|
|
269
263
|
hintBadgeText: {
|
|
@@ -61,6 +61,9 @@ const CloseSvg = ({ size = 13, color = '#64748B' }) => (<react_native_svg_1.defa
|
|
|
61
61
|
const SparkleSvg = ({ size = 14, color = '#F59E0B' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
62
62
|
<react_native_svg_1.Path d="M12 2l2.4 6.6L21 11l-6.6 2.4L12 20l-2.4-6.6L3 11l6.6-2.4L12 2z" fill={color}/>
|
|
63
63
|
</react_native_svg_1.default>);
|
|
64
|
+
const ArrowRightSvg = ({ size = 14, color = '#94A3B8' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
65
|
+
<react_native_svg_1.Path d="M5 12h14M12 5l7 7-7 7" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
66
|
+
</react_native_svg_1.default>);
|
|
64
67
|
const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
|
|
65
68
|
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
66
69
|
const fadeAnim = (0, react_1.useState)(new react_native_1.Animated.Value(0))[0];
|
|
@@ -153,7 +156,7 @@ const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
|
|
|
153
156
|
</react_native_1.View>
|
|
154
157
|
|
|
155
158
|
<react_native_1.View style={styles.arrowContainer}>
|
|
156
|
-
<
|
|
159
|
+
<ArrowRightSvg size={14} color="#94A3B8"/>
|
|
157
160
|
</react_native_1.View>
|
|
158
161
|
|
|
159
162
|
<react_native_1.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;
|
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.InfoCircleIcon = exports.UserIcon = exports.LayersIcon = exports.WipeIcon = exports.FolderIcon = exports.SettingsIcon = exports.EyeIcon = exports.JsIcon = exports.CssIcon = exports.HtmlIcon = exports.BrandSquareIcon = exports.BrandCircleIcon = exports.MoonIcon = exports.SunIcon = exports.DebugIcon = exports.InsightsIcon = exports.AnalyticsIcon = exports.WhiteBackNavigation = exports.CloseWhite = exports.DownloadIcon = exports.FilterIcon = exports.ChevronIcon = exports.SortArrowIcon = exports.GlobeIcon = exports.DiffIcon = exports.SignalIcon = exports.ExportIcon = exports.HeaderPauseIcon = exports.TrashIcon = exports.FailIcon = exports.CircleAlertIcon = exports.CircleXIcon = exports.CircleCheckIcon = exports.CheckIcon = exports.TerminalIcon = exports.FetchIcon = exports.CopyIcon = exports.HeadersIcon = exports.ResponseIcon = exports.RequestIcon = exports.SizeIcon = exports.StatusIcon = exports.CalendarIcon = exports.ClockIcon = exports.ClearIcon = exports.SearchIcon = exports.ExpandCollapseIcon = exports.ScreenIcon = exports.MapPinIcon = exports.EmptyRadarIcon = void 0;
|
|
40
40
|
exports.DiagnosticsIcon = exports.StackTraceIcon = exports.LayoutIcon = exports.ChipIcon = exports.SkullIcon = exports.ShieldAlertIcon = exports.CrashIcon = exports.UserCheckIcon = exports.TargetGoalIcon = exports.RepeatIcon = exports.PinIcon = exports.HourglassIcon = exports.FlameIcon = exports.CodeBracketsIcon = exports.AndroidIcon = exports.AppleIcon = exports.LinkChainIcon = exports.GitHubIcon = exports.PackageBoxIcon = exports.ExternalLinkIcon = exports.MoneyIcon = exports.CartIcon = exports.TextAaIcon = exports.BrainIcon = exports.AtomIcon = exports.MapIcon = exports.SparkleIcon = exports.LightbulbIcon = exports.DocIcon = exports.FolderOpenIcon = exports.BanIcon = exports.BoltIcon = exports.PerformanceIcon = exports.ReduxIcon = exports.MetadataIcon = exports.StorageIcon = exports.RefreshCcwIcon = exports.TimelineIcon = exports.LiveStateIcon = exports.BundleIcon = exports.ForwardChevronIcon = exports.PackageIcon = exports.TableIcon = exports.RawIcon = exports.PrettyIcon = exports.SortIcon = exports.MotionIcon = exports.TrendingUpIcon = exports.ErrorCircleIcon = exports.WarningTriangleIcon = void 0;
|
|
41
|
-
exports.ChevronDownIcon = exports.ResetIcon = exports.NpmIcon = exports.TagIcon = exports.BugIcon = exports.AlertTriangleIcon = exports.SmartphoneIcon = exports.KeyIcon = exports.BarChartIcon = exports.DiceIcon = exports.ZapIcon = exports.FlaskIcon = exports.LoadingSpinnerIcon = exports.ListenerIcon = exports.AllFramesIcon = exports.AppFramesIcon = exports.RawJsonIcon = exports.TrailIcon = void 0;
|
|
41
|
+
exports.PlusIcon = exports.PencilIcon = exports.DatabaseIcon = exports.ShieldCheckIcon = exports.WifiIcon = exports.CpuIcon = exports.ChevronDownIcon = exports.ResetIcon = exports.NpmIcon = exports.TagIcon = exports.BugIcon = exports.AlertTriangleIcon = exports.SmartphoneIcon = exports.KeyIcon = exports.BarChartIcon = exports.DiceIcon = exports.ZapIcon = exports.FlaskIcon = exports.LoadingSpinnerIcon = exports.ListenerIcon = exports.AllFramesIcon = exports.AppFramesIcon = exports.RawJsonIcon = exports.TrailIcon = void 0;
|
|
42
42
|
const react_1 = __importDefault(require("react"));
|
|
43
43
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
44
44
|
// Stylesheet
|
|
@@ -869,3 +869,32 @@ const ChevronDownIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14
|
|
|
869
869
|
<react_native_svg_1.Path d="M6 9l6 6 6-6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
870
870
|
</react_native_svg_1.default>);
|
|
871
871
|
exports.ChevronDownIcon = ChevronDownIcon;
|
|
872
|
+
const CpuIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
873
|
+
<react_native_svg_1.Rect x="4" y="4" width="16" height="16" rx="2" stroke={color} strokeWidth="2"/>
|
|
874
|
+
<react_native_svg_1.Rect x="9" y="9" width="6" height="6" stroke={color} strokeWidth="2"/>
|
|
875
|
+
<react_native_svg_1.Path d="M9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
876
|
+
</react_native_svg_1.default>);
|
|
877
|
+
exports.CpuIcon = CpuIcon;
|
|
878
|
+
const WifiIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
879
|
+
<react_native_svg_1.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"/>
|
|
880
|
+
</react_native_svg_1.default>);
|
|
881
|
+
exports.WifiIcon = WifiIcon;
|
|
882
|
+
const ShieldCheckIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
883
|
+
<react_native_svg_1.Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
884
|
+
<react_native_svg_1.Path d="M9 12l2 2 4-4" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
885
|
+
</react_native_svg_1.default>);
|
|
886
|
+
exports.ShieldCheckIcon = ShieldCheckIcon;
|
|
887
|
+
const DatabaseIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
888
|
+
<react_native_svg_1.Ellipse cx="12" cy="5" rx="9" ry="3" stroke={color} strokeWidth="2"/>
|
|
889
|
+
<react_native_svg_1.Path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
890
|
+
<react_native_svg_1.Path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
891
|
+
</react_native_svg_1.default>);
|
|
892
|
+
exports.DatabaseIcon = DatabaseIcon;
|
|
893
|
+
const PencilIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
894
|
+
<react_native_svg_1.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"/>
|
|
895
|
+
</react_native_svg_1.default>);
|
|
896
|
+
exports.PencilIcon = PencilIcon;
|
|
897
|
+
const PlusIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14, }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
898
|
+
<react_native_svg_1.Path d="M12 5v14M5 12h14" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
899
|
+
</react_native_svg_1.default>);
|
|
900
|
+
exports.PlusIcon = PlusIcon;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.2.
|
|
1
|
+
export declare const LIB_VERSION = "2.2.5";
|
|
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LIB_VERSION = void 0;
|
|
4
4
|
// AUTO-GENERATED FILE — do not edit by hand.
|
|
5
5
|
// Regenerated from package.json on every build by scripts/gen-version.js.
|
|
6
|
-
exports.LIB_VERSION = '2.2.
|
|
6
|
+
exports.LIB_VERSION = '2.2.5';
|
|
@@ -26,8 +26,9 @@ exports.getBundleModuleEnabled = getBundleModuleEnabled;
|
|
|
26
26
|
const getSourceCodeModule = () => {
|
|
27
27
|
try {
|
|
28
28
|
const legacy = react_native_1.NativeModules?.SourceCode;
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
const scriptURL = legacy?.scriptURL || legacy?.getConstants?.()?.scriptURL;
|
|
30
|
+
if (typeof scriptURL === 'string' && scriptURL.length > 0) {
|
|
31
|
+
return { scriptURL };
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
34
|
catch { }
|
|
@@ -102,9 +103,9 @@ const extractHostAndPort = (scriptURL) => {
|
|
|
102
103
|
}
|
|
103
104
|
return { host: null, port: null };
|
|
104
105
|
};
|
|
105
|
-
const probeCandidateUrlsInParallel = async (scriptURL, timeoutMs =
|
|
106
|
+
const probeCandidateUrlsInParallel = async (scriptURL, timeoutMs = 3000) => {
|
|
106
107
|
const { host: extractedHost, port: extractedPort } = extractHostAndPort(scriptURL);
|
|
107
|
-
// 1. If we have a direct scriptURL, try fetching directly
|
|
108
|
+
// 1. If we have a direct HTTP scriptURL, try fetching directly
|
|
108
109
|
if (scriptURL && scriptURL.startsWith('http')) {
|
|
109
110
|
try {
|
|
110
111
|
const controller = new AbortController();
|
|
@@ -124,7 +125,7 @@ const probeCandidateUrlsInParallel = async (scriptURL, timeoutMs = 2500) => {
|
|
|
124
125
|
// Continue to dynamic port discovery
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
|
-
// 2. Dynamic Port Discovery via lightweight Metro /status
|
|
128
|
+
// 2. Dynamic Port Discovery via parallel lightweight Metro /status probes
|
|
128
129
|
const candidateHosts = extractedHost
|
|
129
130
|
? [extractedHost, 'localhost', '127.0.0.1', ...(react_native_1.Platform.OS === 'android' ? ['10.0.2.2', '10.0.3.2'] : [])]
|
|
130
131
|
: ['localhost', '127.0.0.1', ...(react_native_1.Platform.OS === 'android' ? ['10.0.2.2', '10.0.3.2'] : [])];
|
|
@@ -132,29 +133,50 @@ const probeCandidateUrlsInParallel = async (scriptURL, timeoutMs = 2500) => {
|
|
|
132
133
|
const candidatePorts = extractedPort
|
|
133
134
|
? Array.from(new Set([extractedPort, ...DYNAMIC_DEV_PORTS]))
|
|
134
135
|
: DYNAMIC_DEV_PORTS;
|
|
135
|
-
|
|
136
|
-
// Probe lightweight /status on candidate ports (very fast 400ms timeout)
|
|
136
|
+
const probeTasks = [];
|
|
137
137
|
for (const host of uniqueHosts) {
|
|
138
138
|
for (const port of candidatePorts) {
|
|
139
|
-
|
|
139
|
+
probeTasks.push(new Promise(async (resolve, reject) => {
|
|
140
140
|
const controller = new AbortController();
|
|
141
|
-
const timer = setTimeout(() => controller.abort(),
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
const timer = setTimeout(() => controller.abort(), 700);
|
|
142
|
+
try {
|
|
143
|
+
const res = await fetch(`http://${host}:${port}/status`, { signal: controller.signal });
|
|
144
|
+
clearTimeout(timer);
|
|
145
|
+
if (res.ok) {
|
|
146
|
+
const statusText = await res.text();
|
|
147
|
+
if (statusText && statusText.includes('packager-status:running')) {
|
|
148
|
+
resolve({ host, port });
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
149
151
|
}
|
|
150
152
|
}
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
catch {
|
|
154
|
+
clearTimeout(timer);
|
|
155
|
+
}
|
|
156
|
+
reject(new Error('unreachable'));
|
|
157
|
+
}));
|
|
155
158
|
}
|
|
156
|
-
|
|
157
|
-
|
|
159
|
+
}
|
|
160
|
+
let activeServer = null;
|
|
161
|
+
try {
|
|
162
|
+
activeServer = await new Promise((resolve, reject) => {
|
|
163
|
+
let pending = probeTasks.length;
|
|
164
|
+
if (pending === 0) {
|
|
165
|
+
reject(new Error('No candidate hosts'));
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
probeTasks.forEach(p => {
|
|
169
|
+
p.then(resolve).catch(() => {
|
|
170
|
+
pending--;
|
|
171
|
+
if (pending === 0) {
|
|
172
|
+
reject(new Error('All probes failed'));
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
activeServer = null;
|
|
158
180
|
}
|
|
159
181
|
// 3. If a live Metro port was detected dynamically, fetch the bundle from it
|
|
160
182
|
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);
|