react-native-inapp-inspector 2.0.6 → 2.1.0
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/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +0 -11
- package/dist/commonjs/components/Inspector/InspectorHeader.js +25 -28
- package/dist/commonjs/components/Inspector/MainScreen.js +2 -15
- package/dist/commonjs/components/Inspector/NetworkDetail.js +0 -15
- package/dist/commonjs/components/Inspector/PerformanceTab.js +18 -30
- package/dist/commonjs/components/Inspector/SettingsPanel.js +15 -326
- package/dist/commonjs/components/Inspector/TabBar.js +2 -23
- package/dist/commonjs/components/NetworkIcons.d.ts +0 -12
- package/dist/commonjs/components/NetworkIcons.js +3 -72
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/helpers/index.d.ts +0 -2
- package/dist/commonjs/helpers/index.js +1 -12
- package/dist/commonjs/helpers/telemetry.js +4 -4
- package/dist/commonjs/i18n/locales/en.json +2 -3
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.js +9 -113
- package/dist/commonjs/native/NativeInspector.d.ts +0 -1
- package/dist/commonjs/types/enums.d.ts +0 -7
- package/dist/commonjs/types/enums.js +0 -7
- package/dist/commonjs/types/interfaces.d.ts +0 -73
- package/dist/esm/components/Inspector/InspectorHeader.js +25 -28
- package/dist/esm/components/Inspector/MainScreen.js +2 -15
- package/dist/esm/components/Inspector/NetworkDetail.js +1 -16
- package/dist/esm/components/Inspector/PerformanceTab.js +19 -31
- package/dist/esm/components/Inspector/SettingsPanel.js +16 -327
- package/dist/esm/components/Inspector/TabBar.js +3 -24
- package/dist/esm/components/NetworkIcons.d.ts +0 -12
- package/dist/esm/components/NetworkIcons.js +0 -57
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/helpers/index.d.ts +0 -2
- package/dist/esm/helpers/index.js +0 -10
- package/dist/esm/helpers/telemetry.js +4 -4
- package/dist/esm/i18n/locales/en.json +2 -3
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +8 -109
- package/dist/esm/native/NativeInspector.d.ts +0 -1
- package/dist/esm/types/enums.d.ts +0 -7
- package/dist/esm/types/enums.js +0 -7
- package/dist/esm/types/interfaces.d.ts +0 -73
- package/ios/NetworkInspectorModule.mm +5 -12
- package/package.json +1 -4
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +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/build/reports/problems/problems-report.html +0 -659
- package/dist/commonjs/components/Inspector/AuditTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/AuditTab.js +0 -741
- package/dist/commonjs/components/Inspector/DeviceTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/DeviceTab.js +0 -717
- package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +0 -7
- package/dist/commonjs/components/Inspector/PerformanceHud.js +0 -210
- package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +0 -9
- package/dist/commonjs/components/Inspector/RequestReplayModal.js +0 -792
- package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +0 -8
- package/dist/commonjs/components/Inspector/RequestReplayView.js +0 -871
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +0 -3
- package/dist/commonjs/components/Inspector/StorageTab.js +0 -610
- package/dist/commonjs/customHooks/storageInspector.d.ts +0 -13
- package/dist/commonjs/customHooks/storageInspector.js +0 -179
- package/dist/commonjs/helpers/deviceInfo.d.ts +0 -4
- package/dist/commonjs/helpers/deviceInfo.js +0 -94
- package/dist/commonjs/helpers/packageAuditor.d.ts +0 -5
- package/dist/commonjs/helpers/packageAuditor.js +0 -182
- package/dist/esm/components/Inspector/AuditTab.d.ts +0 -3
- package/dist/esm/components/Inspector/AuditTab.js +0 -702
- package/dist/esm/components/Inspector/DeviceTab.d.ts +0 -3
- package/dist/esm/components/Inspector/DeviceTab.js +0 -678
- package/dist/esm/components/Inspector/PerformanceHud.d.ts +0 -7
- package/dist/esm/components/Inspector/PerformanceHud.js +0 -170
- package/dist/esm/components/Inspector/RequestReplayModal.d.ts +0 -9
- package/dist/esm/components/Inspector/RequestReplayModal.js +0 -752
- package/dist/esm/components/Inspector/RequestReplayView.d.ts +0 -8
- package/dist/esm/components/Inspector/RequestReplayView.js +0 -831
- package/dist/esm/components/Inspector/StorageTab.d.ts +0 -3
- package/dist/esm/components/Inspector/StorageTab.js +0 -571
- package/dist/esm/customHooks/storageInspector.d.ts +0 -13
- package/dist/esm/customHooks/storageInspector.js +0 -170
- package/dist/esm/helpers/deviceInfo.d.ts +0 -4
- package/dist/esm/helpers/deviceInfo.js +0 -89
- package/dist/esm/helpers/packageAuditor.d.ts +0 -5
- package/dist/esm/helpers/packageAuditor.js +0 -173
|
@@ -22,7 +22,6 @@ export declare const SizeIcon: ({ color }: IconProps) => React.JSX.Element;
|
|
|
22
22
|
export declare const RequestIcon: ({ color }: IconProps) => React.JSX.Element;
|
|
23
23
|
export declare const ResponseIcon: ({ color }: IconProps) => React.JSX.Element;
|
|
24
24
|
export declare const HeadersIcon: ({ color }: IconProps) => React.JSX.Element;
|
|
25
|
-
export declare const ReplayIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
26
25
|
export declare const CopyIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
27
26
|
export declare const FetchIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
28
27
|
export declare const TerminalIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
@@ -128,14 +127,3 @@ export declare const TagIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
|
128
127
|
export declare const NpmIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
129
128
|
export declare const ResetIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
130
129
|
export declare const ChevronDownIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
131
|
-
export declare const DatabaseIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
132
|
-
export declare const DevicePhoneIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
133
|
-
export declare const FlagIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
134
|
-
export declare const EditIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
135
|
-
export declare const PlusIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
136
|
-
export declare const CodeIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
137
|
-
export declare const CpuIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
138
|
-
export declare const FingerprintIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
139
|
-
export declare const MonitorIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
140
|
-
export declare const ShieldCheckIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
141
|
-
export declare const SparklesIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
@@ -79,13 +79,6 @@ export const HeadersIcon = ({ color = AppColors.skyBlue }) => {
|
|
|
79
79
|
<Path d="M4 6h16M4 12h16M4 18h10" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
80
80
|
</Svg>);
|
|
81
81
|
};
|
|
82
|
-
export const ReplayIcon = ({ color = AppColors.purple, size = 14, }) => {
|
|
83
|
-
return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
84
|
-
<Path d="M21 2v6h-6" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
85
|
-
<Path d="M21 8A10 10 0 1 0 21.8 14" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
86
|
-
<Path d="M10 8.5l5.5 3.5-5.5 3.5v-7z" fill={color}/>
|
|
87
|
-
</Svg>);
|
|
88
|
-
};
|
|
89
82
|
export const CopyIcon = ({ color = AppColors.grayTextWeak, size = 14 }) => {
|
|
90
83
|
return (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
91
84
|
<Path d="M9 9V5a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-4" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
@@ -718,53 +711,3 @@ export const ResetIcon = ({ color = AppColors.white, size = 16 }) => (<Svg width
|
|
|
718
711
|
export const ChevronDownIcon = ({ color = AppColors.grayTextWeak, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
719
712
|
<Path d="M6 9l6 6 6-6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
720
713
|
</Svg>);
|
|
721
|
-
export const DatabaseIcon = ({ color = AppColors.purple, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
722
|
-
<Ellipse cx="12" cy="5" rx="9" ry="3" stroke={color} strokeWidth="1.8"/>
|
|
723
|
-
<Path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
724
|
-
<Path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
725
|
-
</Svg>);
|
|
726
|
-
export const DevicePhoneIcon = ({ color = AppColors.purple, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
727
|
-
<Rect x="5" y="2" width="14" height="20" rx="3" stroke={color} strokeWidth="1.8"/>
|
|
728
|
-
<Line x1="12" y1="18" x2="12.01" y2="18" stroke={color} strokeWidth="2.5" strokeLinecap="round"/>
|
|
729
|
-
<Line x1="9" y1="5" x2="15" y2="5" stroke={color} strokeWidth="1.5" strokeLinecap="round"/>
|
|
730
|
-
</Svg>);
|
|
731
|
-
export const FlagIcon = ({ color = AppColors.purple, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
732
|
-
<Path d="M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1zM4 22v-7" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
733
|
-
</Svg>);
|
|
734
|
-
export const EditIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
735
|
-
<Path d="M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
736
|
-
</Svg>);
|
|
737
|
-
export const PlusIcon = ({ color = AppColors.white, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
738
|
-
<Line x1="12" y1="5" x2="12" y2="19" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
739
|
-
<Line x1="5" y1="12" x2="19" y2="12" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
740
|
-
</Svg>);
|
|
741
|
-
export const CodeIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
742
|
-
<Path d="M16 18l6-6-6-6M8 6l-6 6 6 6" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
743
|
-
</Svg>);
|
|
744
|
-
export const CpuIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
745
|
-
<Rect x="4" y="4" width="16" height="16" rx="2" stroke={color} strokeWidth="1.8"/>
|
|
746
|
-
<Rect x="9" y="9" width="6" height="6" stroke={color} strokeWidth="1.8"/>
|
|
747
|
-
<Line x1="9" y1="1" x2="9" y2="4" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
748
|
-
<Line x1="15" y1="1" x2="15" y2="4" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
749
|
-
<Line x1="9" y1="20" x2="9" y2="23" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
750
|
-
<Line x1="15" y1="20" x2="15" y2="23" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
751
|
-
<Line x1="20" y1="9" x2="23" y2="9" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
752
|
-
<Line x1="20" y1="15" x2="23" y2="15" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
753
|
-
<Line x1="1" y1="9" x2="4" y2="9" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
754
|
-
<Line x1="1" y1="15" x2="4" y2="15" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
755
|
-
</Svg>);
|
|
756
|
-
export const FingerprintIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
757
|
-
<Path d="M2 12C2 6.477 6.477 2 12 2s10 4.477 10 10c0 2.21-.895 4.21-2.343 5.657M12 7c-2.761 0-5 2.239-5 5 0 1.38.56 2.63 1.464 3.536M12 11c-.552 0-1 .448-1 1 0 2.5 1.5 4.5 4 5" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
758
|
-
</Svg>);
|
|
759
|
-
export const MonitorIcon = ({ color = AppColors.grayText, size = 14 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
760
|
-
<Rect x="2" y="3" width="20" height="14" rx="2" stroke={color} strokeWidth="1.8"/>
|
|
761
|
-
<Line x1="8" y1="21" x2="16" y2="21" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
762
|
-
<Line x1="12" y1="17" x2="12" y2="21" stroke={color} strokeWidth="1.8" strokeLinecap="round"/>
|
|
763
|
-
</Svg>);
|
|
764
|
-
export const ShieldCheckIcon = ({ color = AppColors.greenColor, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
765
|
-
<Path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
766
|
-
<Path d="M9 12l2 2 4-4" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
767
|
-
</Svg>);
|
|
768
|
-
export const SparklesIcon = ({ color = AppColors.purple, size = 16 }) => (<Svg width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
769
|
-
<Path d="M12 3l1.912 5.885L20 10.8l-4.756 3.63L16.824 20 12 16.3 7.176 20l1.58-5.57L4 10.8l6.088-1.915L12 3z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
770
|
-
</Svg>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.0
|
|
1
|
+
export declare const LIB_VERSION = "2.1.0";
|
|
@@ -31,8 +31,6 @@ export declare const formatTimeShort: (ts: number) => string;
|
|
|
31
31
|
export declare const formatTime: (ts: number) => string;
|
|
32
32
|
/** Formats a relative gap like "+2s" / "+1m 5s" / "+350ms". */
|
|
33
33
|
export declare const formatGap: (ms: number) => string;
|
|
34
|
-
/** Formats byte size into human readable B / KB / MB. */
|
|
35
|
-
export declare const formatBytes: (bytes: number) => string;
|
|
36
34
|
/** Finds the first JSON object/array embedded anywhere in a log message. */
|
|
37
35
|
export declare const getJsonContent: (message: string) => JsonContent | null;
|
|
38
36
|
/** Pretty-prints JSON data showing 3-4 lines with trailing "..." */
|
|
@@ -393,16 +393,6 @@ export const formatGap = (ms) => {
|
|
|
393
393
|
const rem = s % 60;
|
|
394
394
|
return rem > 0 ? `+${m}m ${rem}s` : `+${m}m`;
|
|
395
395
|
};
|
|
396
|
-
/** Formats byte size into human readable B / KB / MB. */
|
|
397
|
-
export const formatBytes = (bytes) => {
|
|
398
|
-
if (bytes === 0)
|
|
399
|
-
return '0 B';
|
|
400
|
-
if (bytes < 1024)
|
|
401
|
-
return `${bytes} B`;
|
|
402
|
-
if (bytes < 1024 * 1024)
|
|
403
|
-
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
404
|
-
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
405
|
-
};
|
|
406
396
|
/** Finds the first JSON object/array embedded anywhere in a log message. */
|
|
407
397
|
export const getJsonContent = (message) => {
|
|
408
398
|
if (!message)
|
|
@@ -13,8 +13,8 @@ import { LIB_VERSION } from '../constants';
|
|
|
13
13
|
import { getNativeStorageItem, setNativeStorageItem, isNativeModuleAvailable, getNativeDeviceMetrics, } from '../native/NativeInspector';
|
|
14
14
|
// ─── GA4 Measurement Protocol Configuration ──────────────────────────────────
|
|
15
15
|
// Automatically replaced at build-time from .env by scripts/inject-telemetry.js
|
|
16
|
-
export const GA4_MEASUREMENT_ID = 'G-
|
|
17
|
-
export const GA4_API_SECRET = '
|
|
16
|
+
export const GA4_MEASUREMENT_ID = 'G-XXXXXXXXXX';
|
|
17
|
+
export const GA4_API_SECRET = 'YOUR_GA4_API_SECRET';
|
|
18
18
|
const GA4_ENDPOINT = 'https://www.google-analytics.com/mp/collect';
|
|
19
19
|
const CLIENT_ID_KEY = 'telemetry_client_id';
|
|
20
20
|
// Stable session ID created once per JavaScript runtime instance
|
|
@@ -236,9 +236,9 @@ export async function trackTelemetryEvent(eventName, params = {}, options) {
|
|
|
236
236
|
return;
|
|
237
237
|
// Don't send if credentials haven't been configured yet
|
|
238
238
|
if (!GA4_MEASUREMENT_ID ||
|
|
239
|
-
GA4_MEASUREMENT_ID === 'G-
|
|
239
|
+
GA4_MEASUREMENT_ID === 'G-XXXXXXXXXX' ||
|
|
240
240
|
!GA4_API_SECRET ||
|
|
241
|
-
GA4_API_SECRET === '
|
|
241
|
+
GA4_API_SECRET === 'YOUR_GA4_API_SECRET') {
|
|
242
242
|
return;
|
|
243
243
|
}
|
|
244
244
|
try {
|
|
@@ -50,9 +50,8 @@
|
|
|
50
50
|
"activeBadge": "ACTIVE",
|
|
51
51
|
"dormantBadge": "DORMANT",
|
|
52
52
|
"protectedBadge": "PROTECTED",
|
|
53
|
-
"modulesAndTools": "Modules &
|
|
54
|
-
"
|
|
55
|
-
"uiPreferences": "UI & Appearance",
|
|
53
|
+
"modulesAndTools": "Modules & Tools",
|
|
54
|
+
"uiPreferences": "UI Preferences",
|
|
56
55
|
"zeroOverheadTitle": "Zero Background Overhead",
|
|
57
56
|
"zeroOverheadDesc": "Check the modules you wish to activate. Disabled modules consume 0% CPU & memory until saved.",
|
|
58
57
|
"unsavedPending": "● Unsaved selections pending",
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -14,6 +14,5 @@ export { usePerformanceTracker, useComponentProfiler, useNavigationProfiler, tra
|
|
|
14
14
|
export { InspectLog, InspectTrackTime, InspectCatch, type InspectLogOptions, } from './decorators';
|
|
15
15
|
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
16
|
export { sendSessionTelemetryPing, trackTelemetryEvent, trackInspectorOpen, trackTabSwitch, trackLogExport, GA4_MEASUREMENT_ID, GA4_API_SECRET, } from './helpers';
|
|
17
|
-
export { runLivePackageAudit, logCodeQualityIssue, clearCustomAuditIssues, } from './helpers/packageAuditor';
|
|
18
17
|
export { BrandSquareIcon, BrandCircleIcon, } from './components/NetworkIcons';
|
|
19
18
|
export { ActiveTab, Method, StatusFilter, SortOrder, LocalFilter, ModalAnimationType, SettingsPage, SettingsSubTab, LogFilter, ConsoleLogType, AnalyticsEventSource, GAEventCategory, StackFrameType, DiffResultType, BundleSubTab, PerformanceSubTab, CrashType, CrashExportFormat, CrashDetailSubTab, CrashFilterType, BreadcrumbType, } from './types';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useMemo, useRef, useState, useCallback } from 'react';
|
|
2
|
-
import { Alert, Animated, PanResponder, Platform, UIManager, LogBox, InteractionManager,
|
|
2
|
+
import { Alert, Animated, PanResponder, Platform, UIManager, LogBox, InteractionManager, } from 'react-native';
|
|
3
3
|
import { NavigationContext } from '@react-navigation/native';
|
|
4
4
|
// i18n
|
|
5
5
|
import { I18nextProvider, i18n } from './i18n';
|
|
@@ -23,22 +23,14 @@ import { subscribeAnalyticsEvents, clearAnalyticsEvents, autoSetupAnalyticsLogge
|
|
|
23
23
|
import { getReduxState, subscribeReduxState, setReduxAutoRefresh, getLastActionForReducer, clearActionHistory, isReduxConnected, setReduxModuleEnabled, } from './customHooks/reduxLogger';
|
|
24
24
|
import { setPerformanceModuleEnabled } from './customHooks/performanceTracker';
|
|
25
25
|
import { setBundleModuleEnabled } from './customHooks/bundleAnalyzer';
|
|
26
|
-
import { fetchAllStorageEntries, setStorageItem, removeStorageItem, clearAllStorage, subscribeStorageChanges, } from './customHooks/storageInspector';
|
|
27
|
-
import { getSystemDiagnostics } from './helpers/deviceInfo';
|
|
28
|
-
import { runLivePackageAudit, subscribeAuditChanges, logCodeQualityIssue, } from './helpers/packageAuditor';
|
|
29
26
|
import { showNativeFloatingButton, hideNativeFloatingButton, setNativeFloatingButtonBadge, subscribeNativeFloatingButtonPress, subscribeNativeDeviceShake, isNativeModuleAvailable, } from './native/NativeInspector';
|
|
30
27
|
import { LIB_VERSION } from './constants';
|
|
31
28
|
// Stylesheet
|
|
32
29
|
import { toggleGlobalTheme } from './styles';
|
|
33
|
-
const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigationRef, appIcon, environment, initialVisible, visible: controlledVisible,
|
|
34
|
-
// Zero-overhead production stub: if disabled, return null immediately
|
|
35
|
-
if (!enabled || !isEnabled) {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
30
|
+
const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigationRef, appIcon, environment, initialVisible, visible: controlledVisible, }) => {
|
|
38
31
|
// Set custom storage synchronously during render phase
|
|
39
32
|
setCustomStorage(storage || null);
|
|
40
33
|
const [isDark, setIsDark] = useState(false);
|
|
41
|
-
const [isPerformanceHudEnabled, setIsPerformanceHudEnabled] = useState(enablePerformanceHud);
|
|
42
34
|
const [reduxState, setReduxState] = useState(null);
|
|
43
35
|
// Per-reducer last action is kept in component state so the
|
|
44
36
|
// Redux tab re-renders live on every dispatch, independent of the state tree ref.
|
|
@@ -53,11 +45,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
53
45
|
setVisible(controlledVisible);
|
|
54
46
|
}
|
|
55
47
|
}, [controlledVisible]);
|
|
56
|
-
useEffect(() => {
|
|
57
|
-
if (enablePerformanceHud !== undefined) {
|
|
58
|
-
setIsPerformanceHudEnabled(enablePerformanceHud);
|
|
59
|
-
}
|
|
60
|
-
}, [enablePerformanceHud]);
|
|
61
48
|
const [isReady, setIsReady] = useState(false);
|
|
62
49
|
const [selected, setSelected] = useState(null);
|
|
63
50
|
const [selectedLogs, setSelectedLogs] = useState(new Set());
|
|
@@ -97,7 +84,7 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
97
84
|
const [showReqDiff, setShowReqDiff] = useState(false);
|
|
98
85
|
const [showResDiff, setShowResDiff] = useState(false);
|
|
99
86
|
// ─── Analytics state ───────────────────────────────────────────────────────
|
|
100
|
-
const [activeTab, setActiveTab] = useState(
|
|
87
|
+
const [activeTab, setActiveTab] = useState('apis');
|
|
101
88
|
const [analyticsEvents, setAnalyticsEvents] = useState([]);
|
|
102
89
|
// ─── Logs state ────────────────────────────────────────────────────────────
|
|
103
90
|
const [consoleLogs, setConsoleLogs] = useState([]);
|
|
@@ -153,47 +140,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
153
140
|
setLastReadCrashesCount(crashRecords.length);
|
|
154
141
|
}
|
|
155
142
|
}, [activeTab, crashRecords.length]);
|
|
156
|
-
// ─── Storage state ─────────────────────────────────────────────────────────
|
|
157
|
-
const [storageEntries, setStorageEntries] = useState([]);
|
|
158
|
-
const [selectedStorageKey, setSelectedStorageKey] = useState(null);
|
|
159
|
-
const refreshStorageEntries = useCallback(async () => {
|
|
160
|
-
try {
|
|
161
|
-
const entries = await fetchAllStorageEntries();
|
|
162
|
-
setStorageEntries(entries);
|
|
163
|
-
}
|
|
164
|
-
catch { }
|
|
165
|
-
}, []);
|
|
166
|
-
const updateStorageEntry = useCallback(async (key, value) => {
|
|
167
|
-
await setStorageItem(key, value);
|
|
168
|
-
await refreshStorageEntries();
|
|
169
|
-
}, [refreshStorageEntries]);
|
|
170
|
-
const deleteStorageEntry = useCallback(async (key) => {
|
|
171
|
-
await removeStorageItem(key);
|
|
172
|
-
await refreshStorageEntries();
|
|
173
|
-
}, [refreshStorageEntries]);
|
|
174
|
-
const clearAllStorageEntries = useCallback(async () => {
|
|
175
|
-
await clearAllStorage();
|
|
176
|
-
await refreshStorageEntries();
|
|
177
|
-
}, [refreshStorageEntries]);
|
|
178
|
-
useEffect(() => {
|
|
179
|
-
refreshStorageEntries();
|
|
180
|
-
const unsub = subscribeStorageChanges(refreshStorageEntries);
|
|
181
|
-
return () => unsub();
|
|
182
|
-
}, [refreshStorageEntries]);
|
|
183
|
-
// ─── Device info state ──────────────────────────────────────────────────────
|
|
184
|
-
const [deviceInfo] = useState(() => getSystemDiagnostics());
|
|
185
|
-
// ─── Code Quality & Package Audit state ─────────────────────────────────────
|
|
186
|
-
const [auditReport, setAuditReport] = useState(() => runLivePackageAudit());
|
|
187
|
-
useEffect(() => {
|
|
188
|
-
const unsub = subscribeAuditChanges(setAuditReport);
|
|
189
|
-
return () => unsub();
|
|
190
|
-
}, []);
|
|
191
|
-
const refreshAuditReport = useCallback(() => {
|
|
192
|
-
setAuditReport(runLivePackageAudit());
|
|
193
|
-
}, []);
|
|
194
|
-
const logCustomAuditIssue = useCallback((issue) => {
|
|
195
|
-
logCodeQualityIssue(issue);
|
|
196
|
-
}, []);
|
|
197
143
|
const [maxConsoleLogs, setMaxConsoleLogs] = useState(100);
|
|
198
144
|
const [showConsoleLevels, setShowConsoleLevels] = useState({
|
|
199
145
|
info: true,
|
|
@@ -234,9 +180,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
234
180
|
logs: true,
|
|
235
181
|
analytics: false,
|
|
236
182
|
redux: false,
|
|
237
|
-
storage: false,
|
|
238
|
-
device: false,
|
|
239
|
-
audit: false,
|
|
240
183
|
bundle: false,
|
|
241
184
|
performance: false,
|
|
242
185
|
crash: false,
|
|
@@ -291,9 +234,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
291
234
|
logs: true,
|
|
292
235
|
analytics: false,
|
|
293
236
|
redux: false,
|
|
294
|
-
storage: false,
|
|
295
|
-
device: false,
|
|
296
|
-
audit: false,
|
|
297
237
|
bundle: false,
|
|
298
238
|
performance: false,
|
|
299
239
|
crash: false,
|
|
@@ -331,24 +271,14 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
331
271
|
setModalHeightPercent(saved.modalHeightPercent);
|
|
332
272
|
if (saved.modalAnimationType)
|
|
333
273
|
setModalAnimationType(saved.modalAnimationType);
|
|
334
|
-
if (saved.tabVisibility)
|
|
335
|
-
const savedVis = saved.tabVisibility;
|
|
274
|
+
if (saved.tabVisibility)
|
|
336
275
|
setTabVisibility(prev => ({
|
|
337
276
|
...prev,
|
|
338
|
-
...
|
|
339
|
-
storage: savedVis.storage ?? false,
|
|
340
|
-
device: savedVis.device ?? false,
|
|
341
|
-
audit: savedVis.audit ?? false,
|
|
277
|
+
...saved.tabVisibility,
|
|
342
278
|
apis: true, // APIs is always required
|
|
343
279
|
}));
|
|
344
|
-
|
|
345
|
-
if (initialTab) {
|
|
346
|
-
setActiveTab(initialTab);
|
|
347
|
-
}
|
|
348
|
-
else if (saved.defaultTab) {
|
|
280
|
+
if (saved.defaultTab)
|
|
349
281
|
setDefaultTab(saved.defaultTab);
|
|
350
|
-
setActiveTab(saved.defaultTab);
|
|
351
|
-
}
|
|
352
282
|
if (saved.isAutoRamLimitEnabled != null)
|
|
353
283
|
setIsAutoRamLimitEnabled(saved.isAutoRamLimitEnabled);
|
|
354
284
|
if (saved.maxNetworkLogs != null)
|
|
@@ -369,10 +299,7 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
369
299
|
setShowDuplicateLogs(saved.showDuplicateLogs);
|
|
370
300
|
if (saved.showUpdateToast != null)
|
|
371
301
|
setShowUpdateToast(saved.showUpdateToast);
|
|
372
|
-
if (
|
|
373
|
-
setActiveTab(initialTab);
|
|
374
|
-
}
|
|
375
|
-
else if (saved.defaultTab) {
|
|
302
|
+
if (saved.defaultTab) {
|
|
376
303
|
const dt = saved.defaultTab;
|
|
377
304
|
const vis = {
|
|
378
305
|
...{
|
|
@@ -380,9 +307,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
380
307
|
logs: true,
|
|
381
308
|
analytics: false,
|
|
382
309
|
redux: false,
|
|
383
|
-
storage: false,
|
|
384
|
-
device: false,
|
|
385
|
-
audit: false,
|
|
386
310
|
bundle: false,
|
|
387
311
|
performance: false,
|
|
388
312
|
crash: false,
|
|
@@ -851,12 +775,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
851
775
|
? defaultTab
|
|
852
776
|
: 'apis';
|
|
853
777
|
setActiveTab(target);
|
|
854
|
-
setSelected(null);
|
|
855
|
-
setSelectedEvent(null);
|
|
856
|
-
setSelectedLog(null);
|
|
857
|
-
setSelectedReduxSlice(null);
|
|
858
|
-
setSelectedReduxAction(null);
|
|
859
|
-
setSelectedCrash(null);
|
|
860
778
|
// Track inspector opened event in GA4
|
|
861
779
|
trackInspectorOpen({ activeTab: target });
|
|
862
780
|
// Instant synchronization of data collected while modal was closed
|
|
@@ -1836,20 +1754,6 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
1836
1754
|
setCrashRecords([]);
|
|
1837
1755
|
setSelectedCrash(null);
|
|
1838
1756
|
},
|
|
1839
|
-
// ─── Storage ─────────────────────────────────────────────────────────
|
|
1840
|
-
storageEntries,
|
|
1841
|
-
refreshStorageEntries,
|
|
1842
|
-
updateStorageEntry,
|
|
1843
|
-
deleteStorageEntry,
|
|
1844
|
-
clearAllStorageEntries,
|
|
1845
|
-
selectedStorageKey,
|
|
1846
|
-
setSelectedStorageKey,
|
|
1847
|
-
// ─── Device ──────────────────────────────────────────────────────────
|
|
1848
|
-
deviceInfo,
|
|
1849
|
-
// ─── Audit / Code Quality ─────────────────────────────────────────────
|
|
1850
|
-
auditReport,
|
|
1851
|
-
refreshAuditReport,
|
|
1852
|
-
logCustomAuditIssue,
|
|
1853
1757
|
// ─── Settings ───────────────────────────────────────────────────────
|
|
1854
1758
|
settingsActiveSubTab,
|
|
1855
1759
|
setSettingsActiveSubTab,
|
|
@@ -1874,17 +1778,13 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
1874
1778
|
isAutoRamLimitEnabled,
|
|
1875
1779
|
setIsAutoRamLimitEnabled,
|
|
1876
1780
|
deviceFreeRamMb,
|
|
1877
|
-
isPerformanceHudEnabled,
|
|
1878
|
-
setIsPerformanceHudEnabled,
|
|
1879
1781
|
reduxAutoRefresh,
|
|
1880
1782
|
setReduxAutoRefreshState,
|
|
1881
1783
|
reduxExpandDepth,
|
|
1882
1784
|
setReduxExpandDepth,
|
|
1883
1785
|
};
|
|
1884
1786
|
return (<InspectorContext.Provider value={contextValue}>
|
|
1885
|
-
<
|
|
1886
|
-
<MainScreen />
|
|
1887
|
-
</View>
|
|
1787
|
+
<MainScreen />
|
|
1888
1788
|
</InspectorContext.Provider>);
|
|
1889
1789
|
};
|
|
1890
1790
|
const NetworkInspectorWrapper = (props) => {
|
|
@@ -1913,6 +1813,5 @@ export { usePerformanceTracker, useComponentProfiler, useNavigationProfiler, tra
|
|
|
1913
1813
|
export { InspectLog, InspectTrackTime, InspectCatch, } from './decorators';
|
|
1914
1814
|
export { getNativeDeviceMetrics, enableNativeCrashProtection, subscribeNativeCrashes, showNativeFloatingButton, hideNativeFloatingButton, setNativeFloatingButtonBadge, subscribeNativeFloatingButtonPress, subscribeNativeDeviceShake, startNativeFpsMonitoring, stopNativeFpsMonitoring, getNativeFpsMetrics, getNativeStorageItem, setNativeStorageItem, isNativeModuleAvailable, } from './native/NativeInspector';
|
|
1915
1815
|
export { sendSessionTelemetryPing, trackTelemetryEvent, trackInspectorOpen, trackTabSwitch, trackLogExport, GA4_MEASUREMENT_ID, GA4_API_SECRET, } from './helpers';
|
|
1916
|
-
export { runLivePackageAudit, logCodeQualityIssue, clearCustomAuditIssues, } from './helpers/packageAuditor';
|
|
1917
1816
|
export { BrandSquareIcon, BrandCircleIcon, } from './components/NetworkIcons';
|
|
1918
1817
|
export { ActiveTab, Method, StatusFilter, SortOrder, LocalFilter, ModalAnimationType, SettingsPage, SettingsSubTab, LogFilter, ConsoleLogType, AnalyticsEventSource, GAEventCategory, StackFrameType, DiffResultType, BundleSubTab, PerformanceSubTab, CrashType, CrashExportFormat, CrashDetailSubTab, CrashFilterType, BreadcrumbType, } from './types';
|
|
@@ -3,9 +3,6 @@ export declare const ActiveTab: {
|
|
|
3
3
|
readonly Analytics: "analytics";
|
|
4
4
|
readonly Logs: "logs";
|
|
5
5
|
readonly Redux: "redux";
|
|
6
|
-
readonly Storage: "storage";
|
|
7
|
-
readonly Device: "device";
|
|
8
|
-
readonly Audit: "audit";
|
|
9
6
|
readonly Bundle: "bundle";
|
|
10
7
|
readonly Performance: "performance";
|
|
11
8
|
readonly Crash: "crash";
|
|
@@ -52,9 +49,6 @@ export declare const SettingsPage: {
|
|
|
52
49
|
readonly Logs: "logs";
|
|
53
50
|
readonly Analytics: "analytics";
|
|
54
51
|
readonly Redux: "redux";
|
|
55
|
-
readonly Storage: "storage";
|
|
56
|
-
readonly Device: "device";
|
|
57
|
-
readonly Audit: "audit";
|
|
58
52
|
readonly Bundle: "bundle";
|
|
59
53
|
readonly Performance: "performance";
|
|
60
54
|
readonly Crash: "crash";
|
|
@@ -62,7 +56,6 @@ export declare const SettingsPage: {
|
|
|
62
56
|
export type SettingsPage = (typeof SettingsPage)[keyof typeof SettingsPage] | null;
|
|
63
57
|
export declare const SettingsSubTab: {
|
|
64
58
|
readonly Module: "module";
|
|
65
|
-
readonly Limits: "limits";
|
|
66
59
|
readonly Ui: "ui";
|
|
67
60
|
};
|
|
68
61
|
export type SettingsSubTab = (typeof SettingsSubTab)[keyof typeof SettingsSubTab];
|
package/dist/esm/types/enums.js
CHANGED
|
@@ -6,9 +6,6 @@ export const ActiveTab = {
|
|
|
6
6
|
Analytics: 'analytics',
|
|
7
7
|
Logs: 'logs',
|
|
8
8
|
Redux: 'redux',
|
|
9
|
-
Storage: 'storage',
|
|
10
|
-
Device: 'device',
|
|
11
|
-
Audit: 'audit',
|
|
12
9
|
Bundle: 'bundle',
|
|
13
10
|
Performance: 'performance',
|
|
14
11
|
Crash: 'crash',
|
|
@@ -49,16 +46,12 @@ export const SettingsPage = {
|
|
|
49
46
|
Logs: 'logs',
|
|
50
47
|
Analytics: 'analytics',
|
|
51
48
|
Redux: 'redux',
|
|
52
|
-
Storage: 'storage',
|
|
53
|
-
Device: 'device',
|
|
54
|
-
Audit: 'audit',
|
|
55
49
|
Bundle: 'bundle',
|
|
56
50
|
Performance: 'performance',
|
|
57
51
|
Crash: 'crash',
|
|
58
52
|
};
|
|
59
53
|
export const SettingsSubTab = {
|
|
60
54
|
Module: 'module',
|
|
61
|
-
Limits: 'limits',
|
|
62
55
|
Ui: 'ui',
|
|
63
56
|
};
|
|
64
57
|
export const LogFilter = {
|
|
@@ -3,64 +3,6 @@ import { ViewStyle } from 'react-native';
|
|
|
3
3
|
import { Animated, PanResponderInstance } from 'react-native';
|
|
4
4
|
import type { ActiveTab, BreadcrumbType, CrashType, GroupedListItem, LocalFilter, LogFilter, Method, SettingsPage, SettingsSubTab, SortOrder, StatusFilter } from './index';
|
|
5
5
|
export type SearchScope = 'all' | 'url' | 'reqBody' | 'resBody' | 'headers';
|
|
6
|
-
export interface StorageEntry {
|
|
7
|
-
key: string;
|
|
8
|
-
value: string;
|
|
9
|
-
sizeBytes: number;
|
|
10
|
-
isJson: boolean;
|
|
11
|
-
parsedJson?: any;
|
|
12
|
-
updatedAt: number;
|
|
13
|
-
}
|
|
14
|
-
export interface DeviceInfoData {
|
|
15
|
-
appName: string;
|
|
16
|
-
bundleId: string;
|
|
17
|
-
appVersion: string;
|
|
18
|
-
buildNumber: string;
|
|
19
|
-
reactNativeVersion: string;
|
|
20
|
-
jsEngine: string;
|
|
21
|
-
isHermes: boolean;
|
|
22
|
-
isFabric: boolean;
|
|
23
|
-
isTurboModule: boolean;
|
|
24
|
-
platform: 'ios' | 'android' | 'windows' | 'macos' | 'web';
|
|
25
|
-
osVersion: string;
|
|
26
|
-
deviceModel: string;
|
|
27
|
-
deviceId?: string;
|
|
28
|
-
isDevice: boolean;
|
|
29
|
-
screenWidth: number;
|
|
30
|
-
screenHeight: number;
|
|
31
|
-
screenScale: number;
|
|
32
|
-
screenFontScale: number;
|
|
33
|
-
statusBarHeight: number;
|
|
34
|
-
memoryMb?: number;
|
|
35
|
-
arch?: string;
|
|
36
|
-
locale?: string;
|
|
37
|
-
timeZone?: string;
|
|
38
|
-
}
|
|
39
|
-
export type AuditSeverity = 'critical' | 'warning' | 'info' | 'optimal';
|
|
40
|
-
export type AuditCategory = 'dependency' | 'typescript' | 'peer' | 'performance' | 'security';
|
|
41
|
-
export interface AuditIssue {
|
|
42
|
-
id: string;
|
|
43
|
-
title: string;
|
|
44
|
-
message: string;
|
|
45
|
-
severity: AuditSeverity;
|
|
46
|
-
category: AuditCategory;
|
|
47
|
-
packageName?: string;
|
|
48
|
-
currentVersion?: string;
|
|
49
|
-
requiredVersion?: string;
|
|
50
|
-
fixCommand?: string;
|
|
51
|
-
fixSnippet?: string;
|
|
52
|
-
timestamp: number;
|
|
53
|
-
}
|
|
54
|
-
export interface PackageHealthReport {
|
|
55
|
-
score: number;
|
|
56
|
-
grade: 'A+' | 'A' | 'B' | 'C' | 'D';
|
|
57
|
-
totalIssues: number;
|
|
58
|
-
criticalCount: number;
|
|
59
|
-
warningCount: number;
|
|
60
|
-
infoCount: number;
|
|
61
|
-
issues: AuditIssue[];
|
|
62
|
-
scannedAt: number;
|
|
63
|
-
}
|
|
64
6
|
export interface ParsedStackFrame {
|
|
65
7
|
method: string;
|
|
66
8
|
file: string;
|
|
@@ -222,8 +164,6 @@ export interface NetworkInspectorProps {
|
|
|
222
164
|
environment?: 'DEV' | 'UAT' | 'PrePROD' | 'PROD' | 'QA' | 'Staging' | string;
|
|
223
165
|
initialVisible?: boolean;
|
|
224
166
|
visible?: boolean;
|
|
225
|
-
initialTab?: ActiveTab;
|
|
226
|
-
enablePerformanceHud?: boolean;
|
|
227
167
|
}
|
|
228
168
|
export interface NavigationTrackerProps {
|
|
229
169
|
onStateChange: (state: any) => void;
|
|
@@ -236,8 +176,6 @@ export interface InspectorContextValue {
|
|
|
236
176
|
isEnabled: boolean;
|
|
237
177
|
appIcon?: any;
|
|
238
178
|
environment?: string;
|
|
239
|
-
isPerformanceHudEnabled: boolean;
|
|
240
|
-
setIsPerformanceHudEnabled: React.Dispatch<React.SetStateAction<boolean>>;
|
|
241
179
|
modalHeightPercent: number;
|
|
242
180
|
setModalHeightPercent: React.Dispatch<React.SetStateAction<number>>;
|
|
243
181
|
modalAnimationType: 'slide' | 'fade' | 'none';
|
|
@@ -367,17 +305,6 @@ export interface InspectorContextValue {
|
|
|
367
305
|
maxCrashLogs: number;
|
|
368
306
|
setMaxCrashLogs: React.Dispatch<React.SetStateAction<number>>;
|
|
369
307
|
clearAllCrashes: () => void;
|
|
370
|
-
storageEntries: StorageEntry[];
|
|
371
|
-
refreshStorageEntries: () => Promise<void>;
|
|
372
|
-
updateStorageEntry: (key: string, value: string) => Promise<void>;
|
|
373
|
-
deleteStorageEntry: (key: string) => Promise<void>;
|
|
374
|
-
clearAllStorageEntries: () => Promise<void>;
|
|
375
|
-
selectedStorageKey: string | null;
|
|
376
|
-
setSelectedStorageKey: React.Dispatch<React.SetStateAction<string | null>>;
|
|
377
|
-
deviceInfo: DeviceInfoData;
|
|
378
|
-
auditReport: PackageHealthReport;
|
|
379
|
-
refreshAuditReport: () => void;
|
|
380
|
-
logCustomAuditIssue: (issue: Omit<AuditIssue, 'id' | 'timestamp'>) => void;
|
|
381
308
|
settingsActiveSubTab: SettingsSubTab;
|
|
382
309
|
setSettingsActiveSubTab: React.Dispatch<React.SetStateAction<SettingsSubTab>>;
|
|
383
310
|
defaultTab: ActiveTab;
|
|
@@ -515,10 +515,6 @@ RCT_EXPORT_METHOD(getDeviceMetrics:(RCTPromiseResolveBlock)resolve
|
|
|
515
515
|
[metrics setObject:[UIDevice currentDevice].systemName forKey:@"deviceBrand"];
|
|
516
516
|
[metrics setObject:[UIDevice currentDevice].systemVersion forKey:@"osVersion"];
|
|
517
517
|
[metrics setObject:@"arm64" forKey:@"cpuAbi"];
|
|
518
|
-
NSString *deviceId = [[UIDevice currentDevice].identifierForVendor UUIDString];
|
|
519
|
-
if (deviceId) {
|
|
520
|
-
[metrics setObject:deviceId forKey:@"deviceId"];
|
|
521
|
-
}
|
|
522
518
|
|
|
523
519
|
// 5. Application Identifiers (Legal & Non-PII)
|
|
524
520
|
NSBundle *mainBundle = [NSBundle mainBundle];
|
|
@@ -561,13 +557,10 @@ static UIWindow *GetAppActiveWindow(void) {
|
|
|
561
557
|
return [UIApplication sharedApplication].windows.firstObject;
|
|
562
558
|
}
|
|
563
559
|
|
|
564
|
-
static BOOL isFloatingButtonRequestedVisible = NO;
|
|
565
|
-
|
|
566
560
|
RCT_EXPORT_METHOD(showFloatingButton:(NSDictionary *)options
|
|
567
561
|
resolve:(RCTPromiseResolveBlock)resolve
|
|
568
562
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
569
563
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
570
|
-
isFloatingButtonRequestedVisible = YES;
|
|
571
564
|
UIWindow *targetWindow = GetAppActiveWindow();
|
|
572
565
|
CGRect screenBounds = targetWindow ? targetWindow.bounds : [UIScreen mainScreen].bounds;
|
|
573
566
|
|
|
@@ -606,7 +599,6 @@ RCT_EXPORT_METHOD(showFloatingButton:(NSDictionary *)options
|
|
|
606
599
|
}
|
|
607
600
|
|
|
608
601
|
void (^attachToWindow)(void) = ^{
|
|
609
|
-
if (!isFloatingButtonRequestedVisible) return;
|
|
610
602
|
UIWindow *activeWin = GetAppActiveWindow();
|
|
611
603
|
if (!activeWin || !floatingButtonView) return;
|
|
612
604
|
|
|
@@ -643,11 +635,12 @@ RCT_EXPORT_METHOD(showFloatingButton:(NSDictionary *)options
|
|
|
643
635
|
RCT_EXPORT_METHOD(hideFloatingButton:(RCTPromiseResolveBlock)resolve
|
|
644
636
|
reject:(RCTPromiseRejectBlock)reject) {
|
|
645
637
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
646
|
-
isFloatingButtonRequestedVisible = NO;
|
|
647
638
|
if (floatingButtonView != nil) {
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
639
|
+
[UIView animateWithDuration:0.15 animations:^{
|
|
640
|
+
floatingButtonView.alpha = 0.0;
|
|
641
|
+
} completion:^(BOOL finished) {
|
|
642
|
+
floatingButtonView.hidden = YES;
|
|
643
|
+
}];
|
|
651
644
|
}
|
|
652
645
|
resolve(@(YES));
|
|
653
646
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-inapp-inspector",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "The zero-config, all-in-one in-app debugger for React Native & Expo. Inspect Network (fetch/axios), Console logs, Stack Traces, Redux State, Firebase Analytics, and JS Bundle size directly on device.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -44,9 +44,6 @@
|
|
|
44
44
|
"clean": "rm -rf dist",
|
|
45
45
|
"prebuild": "node scripts/gen-version.js",
|
|
46
46
|
"build": "npm run clean && tsc && tsc -p tsconfig.esm.json && node scripts/inject-telemetry.js",
|
|
47
|
-
"typecheck": "tsc --noEmit",
|
|
48
|
-
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
49
|
-
"format:check": "prettier --check \"src/**/*.{ts,tsx}\"",
|
|
50
47
|
"watch": "tsc -w",
|
|
51
48
|
"prepack": "npm run build",
|
|
52
49
|
"publish": "node release.cjs",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|