react-native-inapp-inspector 2.0.7 → 2.2.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 -19
- 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 +49 -448
- 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/settingsStore.d.ts +1 -1
- package/dist/commonjs/helpers/settingsStore.js +2 -4
- package/dist/commonjs/i18n/locales/en.json +2 -3
- package/dist/commonjs/index.d.ts +0 -1
- package/dist/commonjs/index.js +9 -127
- 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 -77
- package/dist/esm/components/Inspector/InspectorHeader.js +25 -28
- package/dist/esm/components/Inspector/MainScreen.js +2 -19
- 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 +50 -449
- 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/settingsStore.d.ts +1 -1
- package/dist/esm/helpers/settingsStore.js +2 -4
- package/dist/esm/i18n/locales/en.json +2 -3
- package/dist/esm/index.d.ts +0 -1
- package/dist/esm/index.js +8 -123
- 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 -77
- package/ios/NetworkInspectorModule.mm +5 -12
- package/package.json +1 -4
- 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/FirstTimeWalkthroughModal.d.ts +0 -7
- package/dist/commonjs/components/Inspector/FirstTimeWalkthroughModal.js +0 -600
- 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/FirstTimeWalkthroughModal.d.ts +0 -7
- package/dist/esm/components/Inspector/FirstTimeWalkthroughModal.js +0 -560
- 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
|
@@ -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;
|
|
@@ -211,7 +153,6 @@ export interface PersistedSettings {
|
|
|
211
153
|
reduxExpandDepth?: number;
|
|
212
154
|
showDuplicateLogs?: boolean;
|
|
213
155
|
showUpdateToast?: boolean;
|
|
214
|
-
hasCompletedWalkthrough?: boolean;
|
|
215
156
|
}
|
|
216
157
|
export interface NetworkInspectorProps {
|
|
217
158
|
enabled?: boolean;
|
|
@@ -223,8 +164,6 @@ export interface NetworkInspectorProps {
|
|
|
223
164
|
environment?: 'DEV' | 'UAT' | 'PrePROD' | 'PROD' | 'QA' | 'Staging' | string;
|
|
224
165
|
initialVisible?: boolean;
|
|
225
166
|
visible?: boolean;
|
|
226
|
-
initialTab?: ActiveTab;
|
|
227
|
-
enablePerformanceHud?: boolean;
|
|
228
167
|
}
|
|
229
168
|
export interface NavigationTrackerProps {
|
|
230
169
|
onStateChange: (state: any) => void;
|
|
@@ -237,17 +176,12 @@ export interface InspectorContextValue {
|
|
|
237
176
|
isEnabled: boolean;
|
|
238
177
|
appIcon?: any;
|
|
239
178
|
environment?: string;
|
|
240
|
-
isPerformanceHudEnabled: boolean;
|
|
241
|
-
setIsPerformanceHudEnabled: React.Dispatch<React.SetStateAction<boolean>>;
|
|
242
179
|
modalHeightPercent: number;
|
|
243
180
|
setModalHeightPercent: React.Dispatch<React.SetStateAction<number>>;
|
|
244
181
|
modalAnimationType: 'slide' | 'fade' | 'none';
|
|
245
182
|
setModalAnimationType: React.Dispatch<React.SetStateAction<'slide' | 'fade' | 'none'>>;
|
|
246
183
|
hasNavigationContext: boolean;
|
|
247
184
|
setNavState: React.Dispatch<React.SetStateAction<any>>;
|
|
248
|
-
isWalkthroughVisible: boolean;
|
|
249
|
-
setIsWalkthroughVisible: React.Dispatch<React.SetStateAction<boolean>>;
|
|
250
|
-
openWalkthrough: () => void;
|
|
251
185
|
activeTab: ActiveTab;
|
|
252
186
|
switchActiveTab: (key: ActiveTab) => void;
|
|
253
187
|
tabVisibility: Record<ActiveTab, boolean>;
|
|
@@ -371,17 +305,6 @@ export interface InspectorContextValue {
|
|
|
371
305
|
maxCrashLogs: number;
|
|
372
306
|
setMaxCrashLogs: React.Dispatch<React.SetStateAction<number>>;
|
|
373
307
|
clearAllCrashes: () => void;
|
|
374
|
-
storageEntries: StorageEntry[];
|
|
375
|
-
refreshStorageEntries: () => Promise<void>;
|
|
376
|
-
updateStorageEntry: (key: string, value: string) => Promise<void>;
|
|
377
|
-
deleteStorageEntry: (key: string) => Promise<void>;
|
|
378
|
-
clearAllStorageEntries: () => Promise<void>;
|
|
379
|
-
selectedStorageKey: string | null;
|
|
380
|
-
setSelectedStorageKey: React.Dispatch<React.SetStateAction<string | null>>;
|
|
381
|
-
deviceInfo: DeviceInfoData;
|
|
382
|
-
auditReport: PackageHealthReport;
|
|
383
|
-
refreshAuditReport: () => void;
|
|
384
|
-
logCustomAuditIssue: (issue: Omit<AuditIssue, 'id' | 'timestamp'>) => void;
|
|
385
308
|
settingsActiveSubTab: SettingsSubTab;
|
|
386
309
|
setSettingsActiveSubTab: React.Dispatch<React.SetStateAction<SettingsSubTab>>;
|
|
387
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.2.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",
|