react-native-prod-debugger 1.0.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/LICENSE +21 -0
- package/README.md +350 -0
- package/lib/commonjs/core/DebugBubble.js +139 -0
- package/lib/commonjs/core/DebugBubble.js.map +1 -0
- package/lib/commonjs/core/DebugOverlay.js +184 -0
- package/lib/commonjs/core/DebugOverlay.js.map +1 -0
- package/lib/commonjs/core/DebuggerProvider.js +174 -0
- package/lib/commonjs/core/DebuggerProvider.js.map +1 -0
- package/lib/commonjs/core/GestureDetector.js +83 -0
- package/lib/commonjs/core/GestureDetector.js.map +1 -0
- package/lib/commonjs/core/PluginRegistry.js +124 -0
- package/lib/commonjs/core/PluginRegistry.js.map +1 -0
- package/lib/commonjs/core/theme.js +50 -0
- package/lib/commonjs/core/theme.js.map +1 -0
- package/lib/commonjs/core/types.js +6 -0
- package/lib/commonjs/core/types.js.map +1 -0
- package/lib/commonjs/core/useDebugger.js +27 -0
- package/lib/commonjs/core/useDebugger.js.map +1 -0
- package/lib/commonjs/core/utils.js +239 -0
- package/lib/commonjs/core/utils.js.map +1 -0
- package/lib/commonjs/index.js +132 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/plugins/console/ConsoleInterceptor.js +103 -0
- package/lib/commonjs/plugins/console/ConsoleInterceptor.js.map +1 -0
- package/lib/commonjs/plugins/console/ConsoleViewerPlugin.js +269 -0
- package/lib/commonjs/plugins/console/ConsoleViewerPlugin.js.map +1 -0
- package/lib/commonjs/plugins/crashReporter/CrashReporterPlugin.js +363 -0
- package/lib/commonjs/plugins/crashReporter/CrashReporterPlugin.js.map +1 -0
- package/lib/commonjs/plugins/customActions/CustomActionsPlugin.js +218 -0
- package/lib/commonjs/plugins/customActions/CustomActionsPlugin.js.map +1 -0
- package/lib/commonjs/plugins/customActions/actionStore.js +46 -0
- package/lib/commonjs/plugins/customActions/actionStore.js.map +1 -0
- package/lib/commonjs/plugins/deepLinkTester/DeepLinkTesterPlugin.js +268 -0
- package/lib/commonjs/plugins/deepLinkTester/DeepLinkTesterPlugin.js.map +1 -0
- package/lib/commonjs/plugins/deviceInfo/DeviceInfoPlugin.js +184 -0
- package/lib/commonjs/plugins/deviceInfo/DeviceInfoPlugin.js.map +1 -0
- package/lib/commonjs/plugins/featureFlags/FeatureFlagsPlugin.js +381 -0
- package/lib/commonjs/plugins/featureFlags/FeatureFlagsPlugin.js.map +1 -0
- package/lib/commonjs/plugins/featureFlags/flagStore.js +125 -0
- package/lib/commonjs/plugins/featureFlags/flagStore.js.map +1 -0
- package/lib/commonjs/plugins/navigationInspector/NavigationInspectorPlugin.js +250 -0
- package/lib/commonjs/plugins/navigationInspector/NavigationInspectorPlugin.js.map +1 -0
- package/lib/commonjs/plugins/navigationInspector/navigationStore.js +65 -0
- package/lib/commonjs/plugins/navigationInspector/navigationStore.js.map +1 -0
- package/lib/commonjs/plugins/network/NetworkInspectorPlugin.js +709 -0
- package/lib/commonjs/plugins/network/NetworkInspectorPlugin.js.map +1 -0
- package/lib/commonjs/plugins/network/NetworkInterceptor.js +305 -0
- package/lib/commonjs/plugins/network/NetworkInterceptor.js.map +1 -0
- package/lib/commonjs/plugins/performance/PerformanceMonitorPlugin.js +261 -0
- package/lib/commonjs/plugins/performance/PerformanceMonitorPlugin.js.map +1 -0
- package/lib/commonjs/plugins/remoteConfig/RemoteConfigPlugin.js +265 -0
- package/lib/commonjs/plugins/remoteConfig/RemoteConfigPlugin.js.map +1 -0
- package/lib/commonjs/plugins/remoteConfig/remoteConfigStore.js +50 -0
- package/lib/commonjs/plugins/remoteConfig/remoteConfigStore.js.map +1 -0
- package/lib/commonjs/plugins/stateInspector/StateInspectorPlugin.js +378 -0
- package/lib/commonjs/plugins/stateInspector/StateInspectorPlugin.js.map +1 -0
- package/lib/commonjs/plugins/stateInspector/stateAdapterRegistry.js +62 -0
- package/lib/commonjs/plugins/stateInspector/stateAdapterRegistry.js.map +1 -0
- package/lib/commonjs/plugins/storageBrowser/StorageBrowserPlugin.js +496 -0
- package/lib/commonjs/plugins/storageBrowser/StorageBrowserPlugin.js.map +1 -0
- package/lib/commonjs/plugins/storageBrowser/storageAdapterRegistry.js +44 -0
- package/lib/commonjs/plugins/storageBrowser/storageAdapterRegistry.js.map +1 -0
- package/lib/commonjs/plugins/timeline/TimelinePlugin.js +294 -0
- package/lib/commonjs/plugins/timeline/TimelinePlugin.js.map +1 -0
- package/lib/commonjs/plugins/timeline/timelineStore.js +61 -0
- package/lib/commonjs/plugins/timeline/timelineStore.js.map +1 -0
- package/lib/module/core/DebugBubble.js +131 -0
- package/lib/module/core/DebugBubble.js.map +1 -0
- package/lib/module/core/DebugOverlay.js +176 -0
- package/lib/module/core/DebugOverlay.js.map +1 -0
- package/lib/module/core/DebuggerProvider.js +167 -0
- package/lib/module/core/DebuggerProvider.js.map +1 -0
- package/lib/module/core/GestureDetector.js +75 -0
- package/lib/module/core/GestureDetector.js.map +1 -0
- package/lib/module/core/PluginRegistry.js +116 -0
- package/lib/module/core/PluginRegistry.js.map +1 -0
- package/lib/module/core/theme.js +43 -0
- package/lib/module/core/theme.js.map +1 -0
- package/lib/module/core/types.js +2 -0
- package/lib/module/core/types.js.map +1 -0
- package/lib/module/core/useDebugger.js +21 -0
- package/lib/module/core/useDebugger.js.map +1 -0
- package/lib/module/core/utils.js +219 -0
- package/lib/module/core/utils.js.map +1 -0
- package/lib/module/index.js +44 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/plugins/console/ConsoleInterceptor.js +97 -0
- package/lib/module/plugins/console/ConsoleInterceptor.js.map +1 -0
- package/lib/module/plugins/console/ConsoleViewerPlugin.js +262 -0
- package/lib/module/plugins/console/ConsoleViewerPlugin.js.map +1 -0
- package/lib/module/plugins/crashReporter/CrashReporterPlugin.js +357 -0
- package/lib/module/plugins/crashReporter/CrashReporterPlugin.js.map +1 -0
- package/lib/module/plugins/customActions/CustomActionsPlugin.js +211 -0
- package/lib/module/plugins/customActions/CustomActionsPlugin.js.map +1 -0
- package/lib/module/plugins/customActions/actionStore.js +38 -0
- package/lib/module/plugins/customActions/actionStore.js.map +1 -0
- package/lib/module/plugins/deepLinkTester/DeepLinkTesterPlugin.js +261 -0
- package/lib/module/plugins/deepLinkTester/DeepLinkTesterPlugin.js.map +1 -0
- package/lib/module/plugins/deviceInfo/DeviceInfoPlugin.js +177 -0
- package/lib/module/plugins/deviceInfo/DeviceInfoPlugin.js.map +1 -0
- package/lib/module/plugins/featureFlags/FeatureFlagsPlugin.js +374 -0
- package/lib/module/plugins/featureFlags/FeatureFlagsPlugin.js.map +1 -0
- package/lib/module/plugins/featureFlags/flagStore.js +117 -0
- package/lib/module/plugins/featureFlags/flagStore.js.map +1 -0
- package/lib/module/plugins/navigationInspector/NavigationInspectorPlugin.js +243 -0
- package/lib/module/plugins/navigationInspector/NavigationInspectorPlugin.js.map +1 -0
- package/lib/module/plugins/navigationInspector/navigationStore.js +58 -0
- package/lib/module/plugins/navigationInspector/navigationStore.js.map +1 -0
- package/lib/module/plugins/network/NetworkInspectorPlugin.js +703 -0
- package/lib/module/plugins/network/NetworkInspectorPlugin.js.map +1 -0
- package/lib/module/plugins/network/NetworkInterceptor.js +299 -0
- package/lib/module/plugins/network/NetworkInterceptor.js.map +1 -0
- package/lib/module/plugins/performance/PerformanceMonitorPlugin.js +254 -0
- package/lib/module/plugins/performance/PerformanceMonitorPlugin.js.map +1 -0
- package/lib/module/plugins/remoteConfig/RemoteConfigPlugin.js +258 -0
- package/lib/module/plugins/remoteConfig/RemoteConfigPlugin.js.map +1 -0
- package/lib/module/plugins/remoteConfig/remoteConfigStore.js +43 -0
- package/lib/module/plugins/remoteConfig/remoteConfigStore.js.map +1 -0
- package/lib/module/plugins/stateInspector/StateInspectorPlugin.js +372 -0
- package/lib/module/plugins/stateInspector/StateInspectorPlugin.js.map +1 -0
- package/lib/module/plugins/stateInspector/stateAdapterRegistry.js +54 -0
- package/lib/module/plugins/stateInspector/stateAdapterRegistry.js.map +1 -0
- package/lib/module/plugins/storageBrowser/StorageBrowserPlugin.js +489 -0
- package/lib/module/plugins/storageBrowser/StorageBrowserPlugin.js.map +1 -0
- package/lib/module/plugins/storageBrowser/storageAdapterRegistry.js +36 -0
- package/lib/module/plugins/storageBrowser/storageAdapterRegistry.js.map +1 -0
- package/lib/module/plugins/timeline/TimelinePlugin.js +287 -0
- package/lib/module/plugins/timeline/TimelinePlugin.js.map +1 -0
- package/lib/module/plugins/timeline/timelineStore.js +54 -0
- package/lib/module/plugins/timeline/timelineStore.js.map +1 -0
- package/lib/typescript/core/DebugBubble.d.ts +22 -0
- package/lib/typescript/core/DebugBubble.d.ts.map +1 -0
- package/lib/typescript/core/DebugOverlay.d.ts +18 -0
- package/lib/typescript/core/DebugOverlay.d.ts.map +1 -0
- package/lib/typescript/core/DebuggerProvider.d.ts +25 -0
- package/lib/typescript/core/DebuggerProvider.d.ts.map +1 -0
- package/lib/typescript/core/GestureDetector.d.ts +20 -0
- package/lib/typescript/core/GestureDetector.d.ts.map +1 -0
- package/lib/typescript/core/PluginRegistry.d.ts +41 -0
- package/lib/typescript/core/PluginRegistry.d.ts.map +1 -0
- package/lib/typescript/core/theme.d.ts +11 -0
- package/lib/typescript/core/theme.d.ts.map +1 -0
- package/lib/typescript/core/types.d.ts +269 -0
- package/lib/typescript/core/types.d.ts.map +1 -0
- package/lib/typescript/core/useDebugger.d.ts +14 -0
- package/lib/typescript/core/useDebugger.d.ts.map +1 -0
- package/lib/typescript/core/utils.d.ts +46 -0
- package/lib/typescript/core/utils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +23 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/plugins/console/ConsoleInterceptor.d.ts +32 -0
- package/lib/typescript/plugins/console/ConsoleInterceptor.d.ts.map +1 -0
- package/lib/typescript/plugins/console/ConsoleViewerPlugin.d.ts +3 -0
- package/lib/typescript/plugins/console/ConsoleViewerPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/crashReporter/CrashReporterPlugin.d.ts +3 -0
- package/lib/typescript/plugins/crashReporter/CrashReporterPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/customActions/CustomActionsPlugin.d.ts +3 -0
- package/lib/typescript/plugins/customActions/CustomActionsPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/customActions/actionStore.d.ts +16 -0
- package/lib/typescript/plugins/customActions/actionStore.d.ts.map +1 -0
- package/lib/typescript/plugins/deepLinkTester/DeepLinkTesterPlugin.d.ts +3 -0
- package/lib/typescript/plugins/deepLinkTester/DeepLinkTesterPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/deviceInfo/DeviceInfoPlugin.d.ts +3 -0
- package/lib/typescript/plugins/deviceInfo/DeviceInfoPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/featureFlags/FeatureFlagsPlugin.d.ts +3 -0
- package/lib/typescript/plugins/featureFlags/FeatureFlagsPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/featureFlags/flagStore.d.ts +45 -0
- package/lib/typescript/plugins/featureFlags/flagStore.d.ts.map +1 -0
- package/lib/typescript/plugins/navigationInspector/NavigationInspectorPlugin.d.ts +3 -0
- package/lib/typescript/plugins/navigationInspector/NavigationInspectorPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/navigationInspector/navigationStore.d.ts +30 -0
- package/lib/typescript/plugins/navigationInspector/navigationStore.d.ts.map +1 -0
- package/lib/typescript/plugins/network/NetworkInspectorPlugin.d.ts +3 -0
- package/lib/typescript/plugins/network/NetworkInspectorPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/network/NetworkInterceptor.d.ts +42 -0
- package/lib/typescript/plugins/network/NetworkInterceptor.d.ts.map +1 -0
- package/lib/typescript/plugins/performance/PerformanceMonitorPlugin.d.ts +3 -0
- package/lib/typescript/plugins/performance/PerformanceMonitorPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/remoteConfig/RemoteConfigPlugin.d.ts +3 -0
- package/lib/typescript/plugins/remoteConfig/RemoteConfigPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/remoteConfig/remoteConfigStore.d.ts +20 -0
- package/lib/typescript/plugins/remoteConfig/remoteConfigStore.d.ts.map +1 -0
- package/lib/typescript/plugins/stateInspector/StateInspectorPlugin.d.ts +3 -0
- package/lib/typescript/plugins/stateInspector/StateInspectorPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/stateInspector/stateAdapterRegistry.d.ts +34 -0
- package/lib/typescript/plugins/stateInspector/stateAdapterRegistry.d.ts.map +1 -0
- package/lib/typescript/plugins/storageBrowser/StorageBrowserPlugin.d.ts +3 -0
- package/lib/typescript/plugins/storageBrowser/StorageBrowserPlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/storageBrowser/storageAdapterRegistry.d.ts +16 -0
- package/lib/typescript/plugins/storageBrowser/storageAdapterRegistry.d.ts.map +1 -0
- package/lib/typescript/plugins/timeline/TimelinePlugin.d.ts +3 -0
- package/lib/typescript/plugins/timeline/TimelinePlugin.d.ts.map +1 -0
- package/lib/typescript/plugins/timeline/timelineStore.d.ts +24 -0
- package/lib/typescript/plugins/timeline/timelineStore.d.ts.map +1 -0
- package/package.json +131 -0
- package/src/core/DebugBubble.tsx +149 -0
- package/src/core/DebugOverlay.tsx +211 -0
- package/src/core/DebuggerProvider.tsx +211 -0
- package/src/core/GestureDetector.tsx +95 -0
- package/src/core/PluginRegistry.ts +118 -0
- package/src/core/theme.ts +41 -0
- package/src/core/types.ts +339 -0
- package/src/core/useDebugger.ts +24 -0
- package/src/core/utils.ts +221 -0
- package/src/index.ts +67 -0
- package/src/plugins/console/ConsoleInterceptor.ts +110 -0
- package/src/plugins/console/ConsoleViewerPlugin.tsx +241 -0
- package/src/plugins/crashReporter/CrashReporterPlugin.tsx +316 -0
- package/src/plugins/customActions/CustomActionsPlugin.tsx +199 -0
- package/src/plugins/customActions/actionStore.ts +49 -0
- package/src/plugins/deepLinkTester/DeepLinkTesterPlugin.tsx +213 -0
- package/src/plugins/deviceInfo/DeviceInfoPlugin.tsx +153 -0
- package/src/plugins/featureFlags/FeatureFlagsPlugin.tsx +338 -0
- package/src/plugins/featureFlags/flagStore.ts +118 -0
- package/src/plugins/navigationInspector/NavigationInspectorPlugin.tsx +170 -0
- package/src/plugins/navigationInspector/navigationStore.ts +70 -0
- package/src/plugins/network/NetworkInspectorPlugin.tsx +598 -0
- package/src/plugins/network/NetworkInterceptor.ts +344 -0
- package/src/plugins/performance/PerformanceMonitorPlugin.tsx +194 -0
- package/src/plugins/remoteConfig/RemoteConfigPlugin.tsx +205 -0
- package/src/plugins/remoteConfig/remoteConfigStore.ts +48 -0
- package/src/plugins/stateInspector/StateInspectorPlugin.tsx +342 -0
- package/src/plugins/stateInspector/stateAdapterRegistry.ts +66 -0
- package/src/plugins/storageBrowser/StorageBrowserPlugin.tsx +410 -0
- package/src/plugins/storageBrowser/storageAdapterRegistry.ts +47 -0
- package/src/plugins/timeline/TimelinePlugin.tsx +242 -0
- package/src/plugins/timeline/timelineStore.ts +65 -0
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
|
|
3
|
+
// ─── Gesture Configuration ──────────────────────────────────────────────────
|
|
4
|
+
|
|
5
|
+
/** Supported gesture types for activating the debugger overlay. */
|
|
6
|
+
export type GestureType = 'threeFingerLongPress' | 'twoFingerTripleTap' | 'shake' | 'custom';
|
|
7
|
+
|
|
8
|
+
// ─── Provider Configuration ─────────────────────────────────────────────────
|
|
9
|
+
|
|
10
|
+
/** Configuration for the DebuggerProvider. */
|
|
11
|
+
export interface DebuggerConfig {
|
|
12
|
+
/** Whether the debugger is enabled. Defaults to `true`. */
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
|
|
15
|
+
/** Gesture type to activate the overlay. Defaults to `'threeFingerLongPress'`. */
|
|
16
|
+
gesture?: GestureType;
|
|
17
|
+
|
|
18
|
+
/** Duration in ms for long press gestures. Defaults to `800`. */
|
|
19
|
+
longPressDuration?: number;
|
|
20
|
+
|
|
21
|
+
/** Number of fingers for multi-touch gestures. Defaults to `3`. */
|
|
22
|
+
numberOfFingers?: number;
|
|
23
|
+
|
|
24
|
+
/** Auto-start console interception on mount. Defaults to `true`. */
|
|
25
|
+
interceptConsole?: boolean;
|
|
26
|
+
|
|
27
|
+
/** Auto-start network interception on mount. Defaults to `true`. */
|
|
28
|
+
interceptNetwork?: boolean;
|
|
29
|
+
|
|
30
|
+
/** Auto-start crash capturing on mount. Defaults to `true`. */
|
|
31
|
+
interceptCrashes?: boolean;
|
|
32
|
+
|
|
33
|
+
/** Maximum number of network requests to keep in memory. Defaults to `500`. */
|
|
34
|
+
maxNetworkRequests?: number;
|
|
35
|
+
|
|
36
|
+
/** Maximum number of console entries to keep in memory. Defaults to `1000`. */
|
|
37
|
+
maxConsoleEntries?: number;
|
|
38
|
+
|
|
39
|
+
/** Maximum number of timeline events to keep in memory. Defaults to `2000`. */
|
|
40
|
+
maxTimelineEvents?: number;
|
|
41
|
+
|
|
42
|
+
/** Application version string shown in Device Info. */
|
|
43
|
+
appVersion?: string;
|
|
44
|
+
|
|
45
|
+
/** Application build number shown in Device Info. */
|
|
46
|
+
buildNumber?: string;
|
|
47
|
+
|
|
48
|
+
/** Bundle identifier shown in Device Info. */
|
|
49
|
+
bundleId?: string;
|
|
50
|
+
|
|
51
|
+
/** Custom theme overrides. */
|
|
52
|
+
theme?: Partial<DebuggerTheme>;
|
|
53
|
+
|
|
54
|
+
/** List of plugin IDs to disable. */
|
|
55
|
+
disabledPlugins?: string[];
|
|
56
|
+
|
|
57
|
+
/** Bubble initial position. */
|
|
58
|
+
bubblePosition?: { x: number; y: number };
|
|
59
|
+
|
|
60
|
+
/** Bubble size in dp. Defaults to `50`. */
|
|
61
|
+
bubbleSize?: number;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// ─── Theme ──────────────────────────────────────────────────────────────────
|
|
65
|
+
|
|
66
|
+
export interface DebuggerTheme {
|
|
67
|
+
background: string;
|
|
68
|
+
surface: string;
|
|
69
|
+
surfaceAlt: string;
|
|
70
|
+
text: string;
|
|
71
|
+
textSecondary: string;
|
|
72
|
+
textMuted: string;
|
|
73
|
+
accent: string;
|
|
74
|
+
accentLight: string;
|
|
75
|
+
success: string;
|
|
76
|
+
warning: string;
|
|
77
|
+
error: string;
|
|
78
|
+
info: string;
|
|
79
|
+
border: string;
|
|
80
|
+
overlay: string;
|
|
81
|
+
bubbleBackground: string;
|
|
82
|
+
bubbleIcon: string;
|
|
83
|
+
codeBackground: string;
|
|
84
|
+
codeText: string;
|
|
85
|
+
headerBackground: string;
|
|
86
|
+
tabActive: string;
|
|
87
|
+
tabInactive: string;
|
|
88
|
+
statusBarOk: string;
|
|
89
|
+
statusBarWarn: string;
|
|
90
|
+
statusBarError: string;
|
|
91
|
+
shadow: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ─── Plugin System ──────────────────────────────────────────────────────────
|
|
95
|
+
|
|
96
|
+
/** Props passed to every plugin component. */
|
|
97
|
+
export interface PluginComponentProps {
|
|
98
|
+
/** Current theme tokens. */
|
|
99
|
+
theme: DebuggerTheme;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** Definition of a debugger plugin. */
|
|
103
|
+
export interface DebuggerPlugin {
|
|
104
|
+
/** Unique plugin identifier. */
|
|
105
|
+
id: string;
|
|
106
|
+
/** Display name shown in the tab bar. */
|
|
107
|
+
name: string;
|
|
108
|
+
/** Emoji icon for the tab. */
|
|
109
|
+
icon: string;
|
|
110
|
+
/** React component rendered in the plugin's tab. */
|
|
111
|
+
component: React.ComponentType<PluginComponentProps>;
|
|
112
|
+
/** Called when the debugger mounts. Useful for starting interceptors. */
|
|
113
|
+
onInit?: () => void;
|
|
114
|
+
/** Called when the debugger unmounts. Useful for cleanup. */
|
|
115
|
+
onDestroy?: () => void;
|
|
116
|
+
/** Plugin sort order. Lower numbers appear first. Defaults to `100`. */
|
|
117
|
+
order?: number;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// ─── Network Inspector ──────────────────────────────────────────────────────
|
|
121
|
+
|
|
122
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS' | string;
|
|
123
|
+
|
|
124
|
+
export interface NetworkRequest {
|
|
125
|
+
/** Unique request ID. */
|
|
126
|
+
id: string;
|
|
127
|
+
/** HTTP method. */
|
|
128
|
+
method: HttpMethod;
|
|
129
|
+
/** Full URL. */
|
|
130
|
+
url: string;
|
|
131
|
+
/** Request start time (UNIX ms). */
|
|
132
|
+
startTime: number;
|
|
133
|
+
/** Request end time (UNIX ms). */
|
|
134
|
+
endTime?: number;
|
|
135
|
+
/** Duration in ms. */
|
|
136
|
+
duration?: number;
|
|
137
|
+
/** HTTP status code. */
|
|
138
|
+
status?: number;
|
|
139
|
+
/** Request headers. */
|
|
140
|
+
requestHeaders?: Record<string, string>;
|
|
141
|
+
/** Response headers. */
|
|
142
|
+
responseHeaders?: Record<string, string>;
|
|
143
|
+
/** Request body (string or serialized). */
|
|
144
|
+
requestBody?: string;
|
|
145
|
+
/** Response body (string or serialized). */
|
|
146
|
+
responseBody?: string;
|
|
147
|
+
/** Content type of the response. */
|
|
148
|
+
responseContentType?: string;
|
|
149
|
+
/** Response size in bytes. */
|
|
150
|
+
responseSize?: number;
|
|
151
|
+
/** Request size in bytes. */
|
|
152
|
+
requestSize?: number;
|
|
153
|
+
/** Whether the request errored. */
|
|
154
|
+
isError?: boolean;
|
|
155
|
+
/** Error message if failed. */
|
|
156
|
+
errorMessage?: string;
|
|
157
|
+
/** GraphQL operation name if detected. */
|
|
158
|
+
gqlOperation?: string;
|
|
159
|
+
/** GraphQL operation type (query/mutation/subscription). */
|
|
160
|
+
gqlType?: string;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// ─── Console ────────────────────────────────────────────────────────────────
|
|
164
|
+
|
|
165
|
+
export type ConsoleLevel = 'log' | 'info' | 'warn' | 'error' | 'debug';
|
|
166
|
+
|
|
167
|
+
export interface ConsoleEntry {
|
|
168
|
+
/** Unique entry ID. */
|
|
169
|
+
id: string;
|
|
170
|
+
/** Log level. */
|
|
171
|
+
level: ConsoleLevel;
|
|
172
|
+
/** Timestamp (UNIX ms). */
|
|
173
|
+
timestamp: number;
|
|
174
|
+
/** Serialized arguments. */
|
|
175
|
+
message: string;
|
|
176
|
+
/** Raw arguments for inspection. */
|
|
177
|
+
args?: unknown[];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// ─── Feature Flags ──────────────────────────────────────────────────────────
|
|
181
|
+
|
|
182
|
+
export type FlagType = 'boolean' | 'string' | 'number' | 'json';
|
|
183
|
+
|
|
184
|
+
export interface FeatureFlag {
|
|
185
|
+
/** Unique flag key. */
|
|
186
|
+
key: string;
|
|
187
|
+
/** Display label. */
|
|
188
|
+
label?: string;
|
|
189
|
+
/** Data type. */
|
|
190
|
+
type: FlagType;
|
|
191
|
+
/** Default (original) value. */
|
|
192
|
+
defaultValue: boolean | string | number | object;
|
|
193
|
+
/** Current (possibly overridden) value. */
|
|
194
|
+
currentValue: boolean | string | number | object;
|
|
195
|
+
/** Description of the flag. */
|
|
196
|
+
description?: string;
|
|
197
|
+
/** Group/category for organization. */
|
|
198
|
+
group?: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// ─── Remote Config ──────────────────────────────────────────────────────────
|
|
202
|
+
|
|
203
|
+
export interface RemoteConfigValue {
|
|
204
|
+
key: string;
|
|
205
|
+
value: string | number | boolean | object;
|
|
206
|
+
source: 'remote' | 'default' | 'static';
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface RemoteConfigProvider {
|
|
210
|
+
/** Get all config key-value pairs. */
|
|
211
|
+
getAll: () => Promise<RemoteConfigValue[]> | RemoteConfigValue[];
|
|
212
|
+
/** Get a single value by key. */
|
|
213
|
+
getValue?: (key: string) => Promise<RemoteConfigValue | null> | RemoteConfigValue | null;
|
|
214
|
+
/** Last fetch timestamp. */
|
|
215
|
+
getLastFetchTime?: () => Promise<number | null> | number | null;
|
|
216
|
+
/** Provider name (e.g. "Firebase", "LaunchDarkly"). */
|
|
217
|
+
name?: string;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// ─── Storage ────────────────────────────────────────────────────────────────
|
|
221
|
+
|
|
222
|
+
export interface StorageAdapter {
|
|
223
|
+
/** Adapter display name. */
|
|
224
|
+
name: string;
|
|
225
|
+
/** Get all keys. */
|
|
226
|
+
getAllKeys: () => Promise<string[]>;
|
|
227
|
+
/** Get a value by key. */
|
|
228
|
+
getItem: (key: string) => Promise<string | null>;
|
|
229
|
+
/** Set a value by key. */
|
|
230
|
+
setItem: (key: string, value: string) => Promise<void>;
|
|
231
|
+
/** Remove a key. */
|
|
232
|
+
removeItem: (key: string) => Promise<void>;
|
|
233
|
+
/** Clear all storage. */
|
|
234
|
+
clear?: () => Promise<void>;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// ─── Timeline ───────────────────────────────────────────────────────────────
|
|
238
|
+
|
|
239
|
+
export type EventCategory =
|
|
240
|
+
| 'network'
|
|
241
|
+
| 'navigation'
|
|
242
|
+
| 'state'
|
|
243
|
+
| 'lifecycle'
|
|
244
|
+
| 'error'
|
|
245
|
+
| 'console'
|
|
246
|
+
| 'custom'
|
|
247
|
+
| string;
|
|
248
|
+
|
|
249
|
+
export interface TimelineEvent {
|
|
250
|
+
/** Unique event ID. */
|
|
251
|
+
id: string;
|
|
252
|
+
/** Timestamp (UNIX ms). */
|
|
253
|
+
timestamp: number;
|
|
254
|
+
/** Event category for filtering. */
|
|
255
|
+
category: EventCategory;
|
|
256
|
+
/** Short event title. */
|
|
257
|
+
title: string;
|
|
258
|
+
/** Optional detailed data. */
|
|
259
|
+
data?: unknown;
|
|
260
|
+
/** Emoji icon. */
|
|
261
|
+
icon?: string;
|
|
262
|
+
/** Color hint for the UI. */
|
|
263
|
+
color?: string;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// ─── Crash Reporter ─────────────────────────────────────────────────────────
|
|
267
|
+
|
|
268
|
+
export interface CrashEntry {
|
|
269
|
+
/** Unique entry ID. */
|
|
270
|
+
id: string;
|
|
271
|
+
/** Timestamp (UNIX ms). */
|
|
272
|
+
timestamp: number;
|
|
273
|
+
/** Error message. */
|
|
274
|
+
message: string;
|
|
275
|
+
/** Stack trace. */
|
|
276
|
+
stack?: string;
|
|
277
|
+
/** Whether it was fatal. */
|
|
278
|
+
isFatal: boolean;
|
|
279
|
+
/** Component stack (React error boundary). */
|
|
280
|
+
componentStack?: string;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
// ─── Custom Actions ─────────────────────────────────────────────────────────
|
|
284
|
+
|
|
285
|
+
export interface CustomAction {
|
|
286
|
+
/** Unique action ID. */
|
|
287
|
+
id: string;
|
|
288
|
+
/** Display name. */
|
|
289
|
+
name: string;
|
|
290
|
+
/** Emoji icon. */
|
|
291
|
+
icon?: string;
|
|
292
|
+
/** Async handler executed when the action is triggered. */
|
|
293
|
+
handler: () => void | Promise<void>;
|
|
294
|
+
/** If true, shows a confirmation dialog before executing. */
|
|
295
|
+
destructive?: boolean;
|
|
296
|
+
/** Group/category for organization. */
|
|
297
|
+
group?: string;
|
|
298
|
+
/** Description shown under the action name. */
|
|
299
|
+
description?: string;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
// ─── Navigation ─────────────────────────────────────────────────────────────
|
|
303
|
+
|
|
304
|
+
export interface NavigationRoute {
|
|
305
|
+
name: string;
|
|
306
|
+
key: string;
|
|
307
|
+
params?: Record<string, unknown>;
|
|
308
|
+
state?: NavigationState;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export interface NavigationState {
|
|
312
|
+
index: number;
|
|
313
|
+
routes: NavigationRoute[];
|
|
314
|
+
type?: string;
|
|
315
|
+
stale?: boolean;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// ─── Internal ───────────────────────────────────────────────────────────────
|
|
319
|
+
|
|
320
|
+
export interface DebuggerContextValue {
|
|
321
|
+
/** Whether the debugger is visible. */
|
|
322
|
+
isVisible: boolean;
|
|
323
|
+
/** Toggle overlay visibility. */
|
|
324
|
+
toggle: () => void;
|
|
325
|
+
/** Show the overlay. */
|
|
326
|
+
show: () => void;
|
|
327
|
+
/** Hide the overlay. */
|
|
328
|
+
hide: () => void;
|
|
329
|
+
/** Full config. */
|
|
330
|
+
config: Required<DebuggerConfig>;
|
|
331
|
+
/** Current theme. */
|
|
332
|
+
theme: DebuggerTheme;
|
|
333
|
+
/** Registered plugins. */
|
|
334
|
+
plugins: DebuggerPlugin[];
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export interface ChildrenProp {
|
|
338
|
+
children: ReactNode;
|
|
339
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { DebuggerContext } from './DebuggerProvider';
|
|
3
|
+
import type { DebuggerContextValue } from './types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Hook to access the debugger context.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```tsx
|
|
10
|
+
* const { show, hide, toggle, isVisible } = useDebugger();
|
|
11
|
+
*
|
|
12
|
+
* // Programmatically open the debugger
|
|
13
|
+
* show();
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export function useDebugger(): DebuggerContextValue {
|
|
17
|
+
const context = useContext(DebuggerContext);
|
|
18
|
+
if (!context) {
|
|
19
|
+
throw new Error(
|
|
20
|
+
'[react-native-prod-debugger] useDebugger must be used within a <DebuggerProvider>.',
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
return context;
|
|
24
|
+
}
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { Clipboard, Share, Platform } from 'react-native';
|
|
2
|
+
|
|
3
|
+
/** Generate a unique ID (collision-safe for debugging purposes). */
|
|
4
|
+
export function generateId(): string {
|
|
5
|
+
return `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** Format bytes into a human-readable string. */
|
|
9
|
+
export function formatBytes(bytes: number | undefined): string {
|
|
10
|
+
if (bytes === undefined || bytes === null) return '—';
|
|
11
|
+
if (bytes === 0) return '0 B';
|
|
12
|
+
const units = ['B', 'KB', 'MB', 'GB'];
|
|
13
|
+
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
14
|
+
const value = bytes / Math.pow(1024, i);
|
|
15
|
+
return `${value.toFixed(i === 0 ? 0 : 1)} ${units[i]}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Format milliseconds into a readable duration. */
|
|
19
|
+
export function formatDuration(ms: number | undefined): string {
|
|
20
|
+
if (ms === undefined || ms === null) return '—';
|
|
21
|
+
if (ms < 1) return '<1ms';
|
|
22
|
+
if (ms < 1000) return `${Math.round(ms)}ms`;
|
|
23
|
+
if (ms < 60_000) return `${(ms / 1000).toFixed(1)}s`;
|
|
24
|
+
return `${(ms / 60_000).toFixed(1)}m`;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** Format a UNIX timestamp into a local time string (HH:MM:SS.mmm). */
|
|
28
|
+
export function formatTimestamp(ts: number): string {
|
|
29
|
+
const d = new Date(ts);
|
|
30
|
+
const h = d.getHours().toString().padStart(2, '0');
|
|
31
|
+
const m = d.getMinutes().toString().padStart(2, '0');
|
|
32
|
+
const s = d.getSeconds().toString().padStart(2, '0');
|
|
33
|
+
const ms = d.getMilliseconds().toString().padStart(3, '0');
|
|
34
|
+
return `${h}:${m}:${s}.${ms}`;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Format a relative time ago (e.g., "2s ago", "5m ago"). */
|
|
38
|
+
export function formatTimeAgo(ts: number): string {
|
|
39
|
+
const diff = Date.now() - ts;
|
|
40
|
+
if (diff < 1000) return 'just now';
|
|
41
|
+
if (diff < 60_000) return `${Math.floor(diff / 1000)}s ago`;
|
|
42
|
+
if (diff < 3_600_000) return `${Math.floor(diff / 60_000)}m ago`;
|
|
43
|
+
if (diff < 86_400_000) return `${Math.floor(diff / 3_600_000)}h ago`;
|
|
44
|
+
return `${Math.floor(diff / 86_400_000)}d ago`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Truncate a string with ellipsis if it exceeds maxLength. */
|
|
48
|
+
export function truncate(str: string, maxLength: number = 200): string {
|
|
49
|
+
if (!str) return '';
|
|
50
|
+
if (str.length <= maxLength) return str;
|
|
51
|
+
return str.slice(0, maxLength) + '…';
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Safely serialize any value to a JSON string with pretty printing. */
|
|
55
|
+
export function safeStringify(value: unknown, indent: number = 2): string {
|
|
56
|
+
try {
|
|
57
|
+
if (value === undefined) return 'undefined';
|
|
58
|
+
if (value === null) return 'null';
|
|
59
|
+
if (typeof value === 'string') return value;
|
|
60
|
+
if (typeof value === 'function') return `[Function: ${value.name || 'anonymous'}]`;
|
|
61
|
+
if (value instanceof Error) {
|
|
62
|
+
return JSON.stringify(
|
|
63
|
+
{ name: value.name, message: value.message, stack: value.stack },
|
|
64
|
+
null,
|
|
65
|
+
indent,
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
return JSON.stringify(value, getCircularReplacer(), indent);
|
|
69
|
+
} catch {
|
|
70
|
+
return String(value);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** Safely parse a JSON string, returning null on failure. */
|
|
75
|
+
export function safeParse(str: string): unknown | null {
|
|
76
|
+
try {
|
|
77
|
+
return JSON.parse(str);
|
|
78
|
+
} catch {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** Copy text to the device clipboard. */
|
|
84
|
+
export async function copyToClipboard(text: string): Promise<void> {
|
|
85
|
+
try {
|
|
86
|
+
if (Clipboard?.setString) {
|
|
87
|
+
Clipboard.setString(text);
|
|
88
|
+
}
|
|
89
|
+
} catch {
|
|
90
|
+
// Silently fail — clipboard may not be available
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Share text via the native share sheet. */
|
|
95
|
+
export async function shareText(text: string, title?: string): Promise<void> {
|
|
96
|
+
try {
|
|
97
|
+
await Share.share(
|
|
98
|
+
{ message: text, title },
|
|
99
|
+
Platform.OS === 'ios' ? { subject: title } : undefined,
|
|
100
|
+
);
|
|
101
|
+
} catch {
|
|
102
|
+
// Silently fail — share may be cancelled
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Get the HTTP status color based on the status code. */
|
|
107
|
+
export function getStatusColor(status: number | undefined): string {
|
|
108
|
+
if (!status) return '#6B6B80';
|
|
109
|
+
if (status < 300) return '#10B981'; // green
|
|
110
|
+
if (status < 400) return '#F59E0B'; // yellow
|
|
111
|
+
return '#EF4444'; // red
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Get the HTTP method color. */
|
|
115
|
+
export function getMethodColor(method: string): string {
|
|
116
|
+
const colors: Record<string, string> = {
|
|
117
|
+
GET: '#3B82F6',
|
|
118
|
+
POST: '#10B981',
|
|
119
|
+
PUT: '#F59E0B',
|
|
120
|
+
PATCH: '#A78BFA',
|
|
121
|
+
DELETE: '#EF4444',
|
|
122
|
+
HEAD: '#6B6B80',
|
|
123
|
+
OPTIONS: '#6B6B80',
|
|
124
|
+
};
|
|
125
|
+
return colors[method.toUpperCase()] || '#6B6B80';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Get a console level color. */
|
|
129
|
+
export function getLevelColor(level: string): string {
|
|
130
|
+
const colors: Record<string, string> = {
|
|
131
|
+
log: '#EAEAEA',
|
|
132
|
+
info: '#3B82F6',
|
|
133
|
+
warn: '#F59E0B',
|
|
134
|
+
error: '#EF4444',
|
|
135
|
+
debug: '#A78BFA',
|
|
136
|
+
};
|
|
137
|
+
return colors[level] || '#EAEAEA';
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Extract GraphQL operation name and type from request body.
|
|
142
|
+
* Returns `null` if it's not a GraphQL request.
|
|
143
|
+
*/
|
|
144
|
+
export function extractGraphQLInfo(
|
|
145
|
+
body: string | undefined,
|
|
146
|
+
): { operation: string; type: string } | null {
|
|
147
|
+
if (!body) return null;
|
|
148
|
+
try {
|
|
149
|
+
const parsed = JSON.parse(body);
|
|
150
|
+
const query: string | undefined = parsed?.query;
|
|
151
|
+
if (!query) return null;
|
|
152
|
+
|
|
153
|
+
// Extract operation type and name
|
|
154
|
+
const match = query.match(/^\s*(query|mutation|subscription)\s+(\w+)/);
|
|
155
|
+
if (match) {
|
|
156
|
+
return { type: match[1], operation: match[2] };
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Try named operations without explicit type
|
|
160
|
+
const nameMatch = query.match(/^\s*\{\s*(\w+)/);
|
|
161
|
+
if (nameMatch) {
|
|
162
|
+
return { type: 'query', operation: nameMatch[1] };
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return { type: 'query', operation: parsed.operationName || 'Unknown' };
|
|
166
|
+
} catch {
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Convert a network request to a cURL command string.
|
|
173
|
+
*/
|
|
174
|
+
export function toCurl(request: {
|
|
175
|
+
method: string;
|
|
176
|
+
url: string;
|
|
177
|
+
requestHeaders?: Record<string, string>;
|
|
178
|
+
requestBody?: string;
|
|
179
|
+
}): string {
|
|
180
|
+
const parts: string[] = [`curl -X ${request.method}`];
|
|
181
|
+
|
|
182
|
+
if (request.requestHeaders) {
|
|
183
|
+
for (const [key, value] of Object.entries(request.requestHeaders)) {
|
|
184
|
+
parts.push(`-H '${key}: ${value}'`);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (request.requestBody) {
|
|
189
|
+
parts.push(`-d '${request.requestBody.replace(/'/g, "\\'")}'`);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
parts.push(`'${request.url}'`);
|
|
193
|
+
return parts.join(' \\\n ');
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** Debounce function calls. */
|
|
197
|
+
export function debounce<T extends (...args: unknown[]) => void>(
|
|
198
|
+
fn: T,
|
|
199
|
+
delay: number,
|
|
200
|
+
): (...args: Parameters<T>) => void {
|
|
201
|
+
let timer: ReturnType<typeof setTimeout> | null = null;
|
|
202
|
+
return (...args: Parameters<T>) => {
|
|
203
|
+
if (timer) clearTimeout(timer);
|
|
204
|
+
timer = setTimeout(() => fn(...args), delay);
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Circular reference replacer for JSON.stringify.
|
|
210
|
+
* Prevents "Converting circular structure to JSON" errors.
|
|
211
|
+
*/
|
|
212
|
+
function getCircularReplacer() {
|
|
213
|
+
const seen = new WeakSet();
|
|
214
|
+
return (_key: string, value: unknown) => {
|
|
215
|
+
if (typeof value === 'object' && value !== null) {
|
|
216
|
+
if (seen.has(value)) return '[Circular]';
|
|
217
|
+
seen.add(value);
|
|
218
|
+
}
|
|
219
|
+
return value;
|
|
220
|
+
};
|
|
221
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* react-native-prod-debugger
|
|
3
|
+
*
|
|
4
|
+
* A comprehensive, in-app debugging toolkit for React Native
|
|
5
|
+
* that works in production builds.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
// ─── Core ────────────────────────────────────────────────────────────────────
|
|
11
|
+
export { DebuggerProvider } from './core/DebuggerProvider';
|
|
12
|
+
export { useDebugger } from './core/useDebugger';
|
|
13
|
+
export { PluginRegistry, registerPlugin, unregisterPlugin } from './core/PluginRegistry';
|
|
14
|
+
|
|
15
|
+
// ─── Types ───────────────────────────────────────────────────────────────────
|
|
16
|
+
export type {
|
|
17
|
+
DebuggerConfig,
|
|
18
|
+
DebuggerPlugin,
|
|
19
|
+
DebuggerTheme,
|
|
20
|
+
GestureType,
|
|
21
|
+
NetworkRequest,
|
|
22
|
+
ConsoleEntry,
|
|
23
|
+
ConsoleLevel,
|
|
24
|
+
FeatureFlag,
|
|
25
|
+
FlagType,
|
|
26
|
+
RemoteConfigProvider,
|
|
27
|
+
RemoteConfigValue,
|
|
28
|
+
StorageAdapter,
|
|
29
|
+
TimelineEvent,
|
|
30
|
+
EventCategory,
|
|
31
|
+
CrashEntry,
|
|
32
|
+
CustomAction,
|
|
33
|
+
PluginComponentProps,
|
|
34
|
+
} from './core/types';
|
|
35
|
+
|
|
36
|
+
// ─── Plugin APIs ─────────────────────────────────────────────────────────────
|
|
37
|
+
|
|
38
|
+
// Network Inspector
|
|
39
|
+
export { NetworkInterceptor } from './plugins/network/NetworkInterceptor';
|
|
40
|
+
|
|
41
|
+
// Console Viewer
|
|
42
|
+
export { ConsoleInterceptor } from './plugins/console/ConsoleInterceptor';
|
|
43
|
+
|
|
44
|
+
// Feature Flags
|
|
45
|
+
export { registerFlag, resetFlags, getFlag } from './plugins/featureFlags/flagStore';
|
|
46
|
+
|
|
47
|
+
// State Inspector
|
|
48
|
+
export { setStateAdapter, removeStateAdapter } from './plugins/stateInspector/stateAdapterRegistry';
|
|
49
|
+
export type { StateAdapter } from './plugins/stateInspector/stateAdapterRegistry';
|
|
50
|
+
|
|
51
|
+
// Remote Config
|
|
52
|
+
export { setRemoteConfigProvider } from './plugins/remoteConfig/remoteConfigStore';
|
|
53
|
+
|
|
54
|
+
// Storage Browser
|
|
55
|
+
export {
|
|
56
|
+
setStorageAdapter,
|
|
57
|
+
removeStorageAdapter,
|
|
58
|
+
} from './plugins/storageBrowser/storageAdapterRegistry';
|
|
59
|
+
|
|
60
|
+
// Navigation Inspector
|
|
61
|
+
export { setNavigationRef } from './plugins/navigationInspector/navigationStore';
|
|
62
|
+
|
|
63
|
+
// Custom Actions
|
|
64
|
+
export { registerAction, removeAction } from './plugins/customActions/actionStore';
|
|
65
|
+
|
|
66
|
+
// Timeline / Event Logger
|
|
67
|
+
export { logTimelineEvent } from './plugins/timeline/timelineStore';
|