react-native-inapp-inspector 2.2.2 → 2.2.4
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/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 +11 -2
- 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/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/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 +11 -2
- 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/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/package.json +9 -1
- package/src/analytics.ts +35 -0
- package/src/bundle.ts +25 -0
- package/src/components/AnalyticsDetail.tsx +870 -0
- package/src/components/AnalyticsEventCard.tsx +442 -0
- package/src/components/AnalyticsGraph.tsx +583 -0
- package/src/components/AnimatedEntrance.tsx +64 -0
- package/src/components/AppHeaderLogo.tsx +109 -0
- package/src/components/BrandCircleIcon.tsx +144 -0
- package/src/components/BrandSquareIcon.tsx +144 -0
- package/src/components/CodeSnippet.tsx +725 -0
- package/src/components/ConsoleLogCard.tsx +628 -0
- package/src/components/CopyButton.tsx +87 -0
- package/src/components/DiffViewer.tsx +82 -0
- package/src/components/DomainHeader.tsx +237 -0
- package/src/components/EmptyState.tsx +73 -0
- package/src/components/EndOfListFooter.tsx +100 -0
- package/src/components/ErrorBoundary.tsx +688 -0
- package/src/components/HeadersSection.tsx +192 -0
- package/src/components/HighlightText.tsx +100 -0
- package/src/components/Inspector/AnalyticsFilterModal.tsx +1250 -0
- package/src/components/Inspector/AnalyticsTab.tsx +1336 -0
- package/src/components/Inspector/BundleTab.tsx +4760 -0
- package/src/components/Inspector/ConsoleTab.tsx +702 -0
- package/src/components/Inspector/CrashDetail.tsx +941 -0
- package/src/components/Inspector/CrashFilterModal.tsx +721 -0
- package/src/components/Inspector/CrashTab.tsx +871 -0
- package/src/components/Inspector/DeviceInfoTab.tsx +1204 -0
- package/src/components/Inspector/FabLauncher.tsx +80 -0
- package/src/components/Inspector/InspectorContext.tsx +28 -0
- package/src/components/Inspector/InspectorHeader.tsx +972 -0
- package/src/components/Inspector/LogDetail.tsx +1431 -0
- package/src/components/Inspector/MainScreen.tsx +262 -0
- package/src/components/Inspector/NavigationTracker.tsx +13 -0
- package/src/components/Inspector/NetworkDetail.tsx +794 -0
- package/src/components/Inspector/NetworkTab.tsx +1183 -0
- package/src/components/Inspector/NpmUpdateToast.tsx +392 -0
- package/src/components/Inspector/PerformanceTab.tsx +1928 -0
- package/src/components/Inspector/ReduxDetail.tsx +1651 -0
- package/src/components/Inspector/ReduxTab.tsx +954 -0
- package/src/components/Inspector/SettingsPanel.tsx +3447 -0
- package/src/components/Inspector/StorageTab.tsx +1048 -0
- package/src/components/Inspector/TabBar.tsx +207 -0
- package/src/components/Inspector/TelemetryConsentModal.tsx +416 -0
- package/src/components/Inspector/UpdateAvailableModal.tsx +557 -0
- package/src/components/JsonViewer.tsx +486 -0
- package/src/components/LogCard.tsx +491 -0
- package/src/components/LogSyntaxHighlighter.tsx +178 -0
- package/src/components/MetaAccordion.tsx +340 -0
- package/src/components/MiniBarChart.tsx +42 -0
- package/src/components/MiniLineChart.tsx +33 -0
- package/src/components/NetworkIcons.tsx +2221 -0
- package/src/components/SectionHeader.tsx +113 -0
- package/src/components/SegmentedTabs.tsx +83 -0
- package/src/components/Slider.tsx +300 -0
- package/src/components/SourcePageCard.tsx +148 -0
- package/src/components/Toast.tsx +131 -0
- package/src/components/TouchableScale.tsx +91 -0
- package/src/components/TreeNode.tsx +186 -0
- package/src/console.ts +24 -0
- package/src/constants/index.ts +38 -0
- package/src/constants/version.ts +3 -0
- package/src/crash.ts +32 -0
- package/src/customHooks/analyticsLogger.ts +336 -0
- package/src/customHooks/bundleAnalyzer.ts +1256 -0
- package/src/customHooks/consoleLogger.ts +497 -0
- package/src/customHooks/crashHandler.ts +944 -0
- package/src/customHooks/logFilters.ts +32 -0
- package/src/customHooks/networkLogger.ts +419 -0
- package/src/customHooks/performanceTracker.ts +1014 -0
- package/src/customHooks/reduxLogger.ts +406 -0
- package/src/customHooks/storageInspector.ts +509 -0
- package/src/customHooks/useAccordion.tsx +60 -0
- package/src/decorators/index.ts +184 -0
- package/src/helpers/gaAnalyticsRegistry.ts +204 -0
- package/src/helpers/index.ts +860 -0
- package/src/helpers/memoryManager.ts +138 -0
- package/src/helpers/searchQueryParser.ts +283 -0
- package/src/helpers/settingsStore.ts +171 -0
- package/src/helpers/telemetry.ts +505 -0
- package/src/helpers/toast.ts +17 -0
- package/src/i18n/index.ts +69 -0
- package/src/i18n/locales/en.json +1058 -0
- package/src/index.tsx +2356 -0
- package/src/native/NativeInspector.ts +397 -0
- package/src/native/NativeNetworkInspector.ts +24 -0
- package/src/network.ts +22 -0
- package/src/performance.ts +38 -0
- package/src/redux.ts +23 -0
- package/src/storage.ts +18 -0
- package/src/styles/AppColors.ts +408 -0
- package/src/styles/AppFonts.ts +8 -0
- package/src/styles/common.ts +209 -0
- package/src/styles/index.ts +1570 -0
- package/src/types/enums.ts +199 -0
- package/src/types/index.ts +34 -0
- package/src/types/interfaces.ts +515 -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 &&
|
|
@@ -50,6 +50,10 @@ const CheckSvg = ({ size = 14, color = '#FFFFFF' }) => (<react_native_svg_1.defa
|
|
|
50
50
|
const CloseSvg = ({ size = 13, color = '#64748B' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
51
51
|
<react_native_svg_1.Path d="M18 6L6 18M6 6l12 12" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
52
52
|
</react_native_svg_1.default>);
|
|
53
|
+
const GearSvg = ({ size = 13, color = '#6366F1' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
54
|
+
<react_native_svg_1.Path d="M12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
55
|
+
<react_native_svg_1.Path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1Z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
56
|
+
</react_native_svg_1.default>);
|
|
53
57
|
const TelemetryConsentModal = () => {
|
|
54
58
|
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
55
59
|
const fadeAnim = (0, react_1.useState)(new react_native_1.Animated.Value(0))[0];
|
|
@@ -126,8 +130,9 @@ const TelemetryConsentModal = () => {
|
|
|
126
130
|
|
|
127
131
|
{/* Subheading instruction hint badge */}
|
|
128
132
|
<react_native_1.View style={styles.hintBadge}>
|
|
133
|
+
<GearSvg size={12} color="#6366F1"/>
|
|
129
134
|
<react_native_1.Text style={styles.hintBadgeText}>
|
|
130
|
-
|
|
135
|
+
You can enable or disable this anytime in Settings
|
|
131
136
|
</react_native_1.Text>
|
|
132
137
|
</react_native_1.View>
|
|
133
138
|
</react_native_1.View>
|
|
@@ -258,12 +263,16 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
258
263
|
...fontStack,
|
|
259
264
|
},
|
|
260
265
|
hintBadge: {
|
|
266
|
+
flexDirection: 'row',
|
|
267
|
+
alignItems: 'center',
|
|
268
|
+
justifyContent: 'center',
|
|
269
|
+
gap: 5,
|
|
261
270
|
backgroundColor: '#EDE9FE80',
|
|
262
271
|
borderWidth: 1,
|
|
263
272
|
borderColor: '#DDD6FE',
|
|
264
273
|
borderRadius: 7,
|
|
265
274
|
paddingHorizontal: 8,
|
|
266
|
-
paddingVertical:
|
|
275
|
+
paddingVertical: 3,
|
|
267
276
|
marginBottom: 8,
|
|
268
277
|
},
|
|
269
278
|
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.4";
|
|
@@ -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.4';
|
|
@@ -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);
|