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,269 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Supported gesture types for activating the debugger overlay. */
|
|
3
|
+
export type GestureType = 'threeFingerLongPress' | 'twoFingerTripleTap' | 'shake' | 'custom';
|
|
4
|
+
/** Configuration for the DebuggerProvider. */
|
|
5
|
+
export interface DebuggerConfig {
|
|
6
|
+
/** Whether the debugger is enabled. Defaults to `true`. */
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
/** Gesture type to activate the overlay. Defaults to `'threeFingerLongPress'`. */
|
|
9
|
+
gesture?: GestureType;
|
|
10
|
+
/** Duration in ms for long press gestures. Defaults to `800`. */
|
|
11
|
+
longPressDuration?: number;
|
|
12
|
+
/** Number of fingers for multi-touch gestures. Defaults to `3`. */
|
|
13
|
+
numberOfFingers?: number;
|
|
14
|
+
/** Auto-start console interception on mount. Defaults to `true`. */
|
|
15
|
+
interceptConsole?: boolean;
|
|
16
|
+
/** Auto-start network interception on mount. Defaults to `true`. */
|
|
17
|
+
interceptNetwork?: boolean;
|
|
18
|
+
/** Auto-start crash capturing on mount. Defaults to `true`. */
|
|
19
|
+
interceptCrashes?: boolean;
|
|
20
|
+
/** Maximum number of network requests to keep in memory. Defaults to `500`. */
|
|
21
|
+
maxNetworkRequests?: number;
|
|
22
|
+
/** Maximum number of console entries to keep in memory. Defaults to `1000`. */
|
|
23
|
+
maxConsoleEntries?: number;
|
|
24
|
+
/** Maximum number of timeline events to keep in memory. Defaults to `2000`. */
|
|
25
|
+
maxTimelineEvents?: number;
|
|
26
|
+
/** Application version string shown in Device Info. */
|
|
27
|
+
appVersion?: string;
|
|
28
|
+
/** Application build number shown in Device Info. */
|
|
29
|
+
buildNumber?: string;
|
|
30
|
+
/** Bundle identifier shown in Device Info. */
|
|
31
|
+
bundleId?: string;
|
|
32
|
+
/** Custom theme overrides. */
|
|
33
|
+
theme?: Partial<DebuggerTheme>;
|
|
34
|
+
/** List of plugin IDs to disable. */
|
|
35
|
+
disabledPlugins?: string[];
|
|
36
|
+
/** Bubble initial position. */
|
|
37
|
+
bubblePosition?: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
/** Bubble size in dp. Defaults to `50`. */
|
|
42
|
+
bubbleSize?: number;
|
|
43
|
+
}
|
|
44
|
+
export interface DebuggerTheme {
|
|
45
|
+
background: string;
|
|
46
|
+
surface: string;
|
|
47
|
+
surfaceAlt: string;
|
|
48
|
+
text: string;
|
|
49
|
+
textSecondary: string;
|
|
50
|
+
textMuted: string;
|
|
51
|
+
accent: string;
|
|
52
|
+
accentLight: string;
|
|
53
|
+
success: string;
|
|
54
|
+
warning: string;
|
|
55
|
+
error: string;
|
|
56
|
+
info: string;
|
|
57
|
+
border: string;
|
|
58
|
+
overlay: string;
|
|
59
|
+
bubbleBackground: string;
|
|
60
|
+
bubbleIcon: string;
|
|
61
|
+
codeBackground: string;
|
|
62
|
+
codeText: string;
|
|
63
|
+
headerBackground: string;
|
|
64
|
+
tabActive: string;
|
|
65
|
+
tabInactive: string;
|
|
66
|
+
statusBarOk: string;
|
|
67
|
+
statusBarWarn: string;
|
|
68
|
+
statusBarError: string;
|
|
69
|
+
shadow: string;
|
|
70
|
+
}
|
|
71
|
+
/** Props passed to every plugin component. */
|
|
72
|
+
export interface PluginComponentProps {
|
|
73
|
+
/** Current theme tokens. */
|
|
74
|
+
theme: DebuggerTheme;
|
|
75
|
+
}
|
|
76
|
+
/** Definition of a debugger plugin. */
|
|
77
|
+
export interface DebuggerPlugin {
|
|
78
|
+
/** Unique plugin identifier. */
|
|
79
|
+
id: string;
|
|
80
|
+
/** Display name shown in the tab bar. */
|
|
81
|
+
name: string;
|
|
82
|
+
/** Emoji icon for the tab. */
|
|
83
|
+
icon: string;
|
|
84
|
+
/** React component rendered in the plugin's tab. */
|
|
85
|
+
component: React.ComponentType<PluginComponentProps>;
|
|
86
|
+
/** Called when the debugger mounts. Useful for starting interceptors. */
|
|
87
|
+
onInit?: () => void;
|
|
88
|
+
/** Called when the debugger unmounts. Useful for cleanup. */
|
|
89
|
+
onDestroy?: () => void;
|
|
90
|
+
/** Plugin sort order. Lower numbers appear first. Defaults to `100`. */
|
|
91
|
+
order?: number;
|
|
92
|
+
}
|
|
93
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS' | string;
|
|
94
|
+
export interface NetworkRequest {
|
|
95
|
+
/** Unique request ID. */
|
|
96
|
+
id: string;
|
|
97
|
+
/** HTTP method. */
|
|
98
|
+
method: HttpMethod;
|
|
99
|
+
/** Full URL. */
|
|
100
|
+
url: string;
|
|
101
|
+
/** Request start time (UNIX ms). */
|
|
102
|
+
startTime: number;
|
|
103
|
+
/** Request end time (UNIX ms). */
|
|
104
|
+
endTime?: number;
|
|
105
|
+
/** Duration in ms. */
|
|
106
|
+
duration?: number;
|
|
107
|
+
/** HTTP status code. */
|
|
108
|
+
status?: number;
|
|
109
|
+
/** Request headers. */
|
|
110
|
+
requestHeaders?: Record<string, string>;
|
|
111
|
+
/** Response headers. */
|
|
112
|
+
responseHeaders?: Record<string, string>;
|
|
113
|
+
/** Request body (string or serialized). */
|
|
114
|
+
requestBody?: string;
|
|
115
|
+
/** Response body (string or serialized). */
|
|
116
|
+
responseBody?: string;
|
|
117
|
+
/** Content type of the response. */
|
|
118
|
+
responseContentType?: string;
|
|
119
|
+
/** Response size in bytes. */
|
|
120
|
+
responseSize?: number;
|
|
121
|
+
/** Request size in bytes. */
|
|
122
|
+
requestSize?: number;
|
|
123
|
+
/** Whether the request errored. */
|
|
124
|
+
isError?: boolean;
|
|
125
|
+
/** Error message if failed. */
|
|
126
|
+
errorMessage?: string;
|
|
127
|
+
/** GraphQL operation name if detected. */
|
|
128
|
+
gqlOperation?: string;
|
|
129
|
+
/** GraphQL operation type (query/mutation/subscription). */
|
|
130
|
+
gqlType?: string;
|
|
131
|
+
}
|
|
132
|
+
export type ConsoleLevel = 'log' | 'info' | 'warn' | 'error' | 'debug';
|
|
133
|
+
export interface ConsoleEntry {
|
|
134
|
+
/** Unique entry ID. */
|
|
135
|
+
id: string;
|
|
136
|
+
/** Log level. */
|
|
137
|
+
level: ConsoleLevel;
|
|
138
|
+
/** Timestamp (UNIX ms). */
|
|
139
|
+
timestamp: number;
|
|
140
|
+
/** Serialized arguments. */
|
|
141
|
+
message: string;
|
|
142
|
+
/** Raw arguments for inspection. */
|
|
143
|
+
args?: unknown[];
|
|
144
|
+
}
|
|
145
|
+
export type FlagType = 'boolean' | 'string' | 'number' | 'json';
|
|
146
|
+
export interface FeatureFlag {
|
|
147
|
+
/** Unique flag key. */
|
|
148
|
+
key: string;
|
|
149
|
+
/** Display label. */
|
|
150
|
+
label?: string;
|
|
151
|
+
/** Data type. */
|
|
152
|
+
type: FlagType;
|
|
153
|
+
/** Default (original) value. */
|
|
154
|
+
defaultValue: boolean | string | number | object;
|
|
155
|
+
/** Current (possibly overridden) value. */
|
|
156
|
+
currentValue: boolean | string | number | object;
|
|
157
|
+
/** Description of the flag. */
|
|
158
|
+
description?: string;
|
|
159
|
+
/** Group/category for organization. */
|
|
160
|
+
group?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface RemoteConfigValue {
|
|
163
|
+
key: string;
|
|
164
|
+
value: string | number | boolean | object;
|
|
165
|
+
source: 'remote' | 'default' | 'static';
|
|
166
|
+
}
|
|
167
|
+
export interface RemoteConfigProvider {
|
|
168
|
+
/** Get all config key-value pairs. */
|
|
169
|
+
getAll: () => Promise<RemoteConfigValue[]> | RemoteConfigValue[];
|
|
170
|
+
/** Get a single value by key. */
|
|
171
|
+
getValue?: (key: string) => Promise<RemoteConfigValue | null> | RemoteConfigValue | null;
|
|
172
|
+
/** Last fetch timestamp. */
|
|
173
|
+
getLastFetchTime?: () => Promise<number | null> | number | null;
|
|
174
|
+
/** Provider name (e.g. "Firebase", "LaunchDarkly"). */
|
|
175
|
+
name?: string;
|
|
176
|
+
}
|
|
177
|
+
export interface StorageAdapter {
|
|
178
|
+
/** Adapter display name. */
|
|
179
|
+
name: string;
|
|
180
|
+
/** Get all keys. */
|
|
181
|
+
getAllKeys: () => Promise<string[]>;
|
|
182
|
+
/** Get a value by key. */
|
|
183
|
+
getItem: (key: string) => Promise<string | null>;
|
|
184
|
+
/** Set a value by key. */
|
|
185
|
+
setItem: (key: string, value: string) => Promise<void>;
|
|
186
|
+
/** Remove a key. */
|
|
187
|
+
removeItem: (key: string) => Promise<void>;
|
|
188
|
+
/** Clear all storage. */
|
|
189
|
+
clear?: () => Promise<void>;
|
|
190
|
+
}
|
|
191
|
+
export type EventCategory = 'network' | 'navigation' | 'state' | 'lifecycle' | 'error' | 'console' | 'custom' | string;
|
|
192
|
+
export interface TimelineEvent {
|
|
193
|
+
/** Unique event ID. */
|
|
194
|
+
id: string;
|
|
195
|
+
/** Timestamp (UNIX ms). */
|
|
196
|
+
timestamp: number;
|
|
197
|
+
/** Event category for filtering. */
|
|
198
|
+
category: EventCategory;
|
|
199
|
+
/** Short event title. */
|
|
200
|
+
title: string;
|
|
201
|
+
/** Optional detailed data. */
|
|
202
|
+
data?: unknown;
|
|
203
|
+
/** Emoji icon. */
|
|
204
|
+
icon?: string;
|
|
205
|
+
/** Color hint for the UI. */
|
|
206
|
+
color?: string;
|
|
207
|
+
}
|
|
208
|
+
export interface CrashEntry {
|
|
209
|
+
/** Unique entry ID. */
|
|
210
|
+
id: string;
|
|
211
|
+
/** Timestamp (UNIX ms). */
|
|
212
|
+
timestamp: number;
|
|
213
|
+
/** Error message. */
|
|
214
|
+
message: string;
|
|
215
|
+
/** Stack trace. */
|
|
216
|
+
stack?: string;
|
|
217
|
+
/** Whether it was fatal. */
|
|
218
|
+
isFatal: boolean;
|
|
219
|
+
/** Component stack (React error boundary). */
|
|
220
|
+
componentStack?: string;
|
|
221
|
+
}
|
|
222
|
+
export interface CustomAction {
|
|
223
|
+
/** Unique action ID. */
|
|
224
|
+
id: string;
|
|
225
|
+
/** Display name. */
|
|
226
|
+
name: string;
|
|
227
|
+
/** Emoji icon. */
|
|
228
|
+
icon?: string;
|
|
229
|
+
/** Async handler executed when the action is triggered. */
|
|
230
|
+
handler: () => void | Promise<void>;
|
|
231
|
+
/** If true, shows a confirmation dialog before executing. */
|
|
232
|
+
destructive?: boolean;
|
|
233
|
+
/** Group/category for organization. */
|
|
234
|
+
group?: string;
|
|
235
|
+
/** Description shown under the action name. */
|
|
236
|
+
description?: string;
|
|
237
|
+
}
|
|
238
|
+
export interface NavigationRoute {
|
|
239
|
+
name: string;
|
|
240
|
+
key: string;
|
|
241
|
+
params?: Record<string, unknown>;
|
|
242
|
+
state?: NavigationState;
|
|
243
|
+
}
|
|
244
|
+
export interface NavigationState {
|
|
245
|
+
index: number;
|
|
246
|
+
routes: NavigationRoute[];
|
|
247
|
+
type?: string;
|
|
248
|
+
stale?: boolean;
|
|
249
|
+
}
|
|
250
|
+
export interface DebuggerContextValue {
|
|
251
|
+
/** Whether the debugger is visible. */
|
|
252
|
+
isVisible: boolean;
|
|
253
|
+
/** Toggle overlay visibility. */
|
|
254
|
+
toggle: () => void;
|
|
255
|
+
/** Show the overlay. */
|
|
256
|
+
show: () => void;
|
|
257
|
+
/** Hide the overlay. */
|
|
258
|
+
hide: () => void;
|
|
259
|
+
/** Full config. */
|
|
260
|
+
config: Required<DebuggerConfig>;
|
|
261
|
+
/** Current theme. */
|
|
262
|
+
theme: DebuggerTheme;
|
|
263
|
+
/** Registered plugins. */
|
|
264
|
+
plugins: DebuggerPlugin[];
|
|
265
|
+
}
|
|
266
|
+
export interface ChildrenProp {
|
|
267
|
+
children: ReactNode;
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlC,mEAAmE;AACnE,MAAM,MAAM,WAAW,GAAG,sBAAsB,GAAG,oBAAoB,GAAG,OAAO,GAAG,QAAQ,CAAC;AAI7F,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,kFAAkF;IAClF,OAAO,CAAC,EAAE,WAAW,CAAC;IAEtB,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,mEAAmE;IACnE,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,oEAAoE;IACpE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,+DAA+D;IAC/D,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,+EAA+E;IAC/E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,+EAA+E;I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AI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,eAAe,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,MAAM,WAAW,oBAAoB;IACnC,uCAAuC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,iCAAiC;IACjC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,wBAAwB;IACxB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,wBAAwB;IACxB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,mBAAmB;IACnB,MAAM,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IACjC,qBAAqB;IACrB,KAAK,EAAE,aAAa,CAAC;IACrB,0BAA0B;IAC1B,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DebuggerContextValue } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Hook to access the debugger context.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* const { show, hide, toggle, isVisible } = useDebugger();
|
|
8
|
+
*
|
|
9
|
+
* // Programmatically open the debugger
|
|
10
|
+
* show();
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
export declare function useDebugger(): DebuggerContextValue;
|
|
14
|
+
//# sourceMappingURL=useDebugger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDebugger.d.ts","sourceRoot":"","sources":["../../../src/core/useDebugger.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,IAAI,oBAAoB,CAQlD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/** Generate a unique ID (collision-safe for debugging purposes). */
|
|
2
|
+
export declare function generateId(): string;
|
|
3
|
+
/** Format bytes into a human-readable string. */
|
|
4
|
+
export declare function formatBytes(bytes: number | undefined): string;
|
|
5
|
+
/** Format milliseconds into a readable duration. */
|
|
6
|
+
export declare function formatDuration(ms: number | undefined): string;
|
|
7
|
+
/** Format a UNIX timestamp into a local time string (HH:MM:SS.mmm). */
|
|
8
|
+
export declare function formatTimestamp(ts: number): string;
|
|
9
|
+
/** Format a relative time ago (e.g., "2s ago", "5m ago"). */
|
|
10
|
+
export declare function formatTimeAgo(ts: number): string;
|
|
11
|
+
/** Truncate a string with ellipsis if it exceeds maxLength. */
|
|
12
|
+
export declare function truncate(str: string, maxLength?: number): string;
|
|
13
|
+
/** Safely serialize any value to a JSON string with pretty printing. */
|
|
14
|
+
export declare function safeStringify(value: unknown, indent?: number): string;
|
|
15
|
+
/** Safely parse a JSON string, returning null on failure. */
|
|
16
|
+
export declare function safeParse(str: string): unknown | null;
|
|
17
|
+
/** Copy text to the device clipboard. */
|
|
18
|
+
export declare function copyToClipboard(text: string): Promise<void>;
|
|
19
|
+
/** Share text via the native share sheet. */
|
|
20
|
+
export declare function shareText(text: string, title?: string): Promise<void>;
|
|
21
|
+
/** Get the HTTP status color based on the status code. */
|
|
22
|
+
export declare function getStatusColor(status: number | undefined): string;
|
|
23
|
+
/** Get the HTTP method color. */
|
|
24
|
+
export declare function getMethodColor(method: string): string;
|
|
25
|
+
/** Get a console level color. */
|
|
26
|
+
export declare function getLevelColor(level: string): string;
|
|
27
|
+
/**
|
|
28
|
+
* Extract GraphQL operation name and type from request body.
|
|
29
|
+
* Returns `null` if it's not a GraphQL request.
|
|
30
|
+
*/
|
|
31
|
+
export declare function extractGraphQLInfo(body: string | undefined): {
|
|
32
|
+
operation: string;
|
|
33
|
+
type: string;
|
|
34
|
+
} | null;
|
|
35
|
+
/**
|
|
36
|
+
* Convert a network request to a cURL command string.
|
|
37
|
+
*/
|
|
38
|
+
export declare function toCurl(request: {
|
|
39
|
+
method: string;
|
|
40
|
+
url: string;
|
|
41
|
+
requestHeaders?: Record<string, string>;
|
|
42
|
+
requestBody?: string;
|
|
43
|
+
}): string;
|
|
44
|
+
/** Debounce function calls. */
|
|
45
|
+
export declare function debounce<T extends (...args: unknown[]) => void>(fn: T, delay: number): (...args: Parameters<T>) => void;
|
|
46
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/core/utils.ts"],"names":[],"mappings":"AAEA,oEAAoE;AACpE,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,iDAAiD;AACjD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAO7D;AAED,oDAAoD;AACpD,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAM7D;AAED,uEAAuE;AACvE,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAOlD;AAED,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAOhD;AAED,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,GAAE,MAAY,GAAG,MAAM,CAIrE;AAED,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,GAAE,MAAU,GAAG,MAAM,CAiBxE;AAED,6DAA6D;AAC7D,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,GAAG,IAAI,C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that works in production builds.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export { DebuggerProvider } from './core/DebuggerProvider';
|
|
10
|
+
export { useDebugger } from './core/useDebugger';
|
|
11
|
+
export { PluginRegistry, registerPlugin, unregisterPlugin } from './core/PluginRegistry';
|
|
12
|
+
export type { DebuggerConfig, DebuggerPlugin, DebuggerTheme, GestureType, NetworkRequest, ConsoleEntry, ConsoleLevel, FeatureFlag, FlagType, RemoteConfigProvider, RemoteConfigValue, StorageAdapter, TimelineEvent, EventCategory, CrashEntry, CustomAction, PluginComponentProps, } from './core/types';
|
|
13
|
+
export { NetworkInterceptor } from './plugins/network/NetworkInterceptor';
|
|
14
|
+
export { ConsoleInterceptor } from './plugins/console/ConsoleInterceptor';
|
|
15
|
+
export { registerFlag, resetFlags, getFlag } from './plugins/featureFlags/flagStore';
|
|
16
|
+
export { setStateAdapter, removeStateAdapter } from './plugins/stateInspector/stateAdapterRegistry';
|
|
17
|
+
export type { StateAdapter } from './plugins/stateInspector/stateAdapterRegistry';
|
|
18
|
+
export { setRemoteConfigProvider } from './plugins/remoteConfig/remoteConfigStore';
|
|
19
|
+
export { setStorageAdapter, removeStorageAdapter, } from './plugins/storageBrowser/storageAdapterRegistry';
|
|
20
|
+
export { setNavigationRef } from './plugins/navigationInspector/navigationStore';
|
|
21
|
+
export { registerAction, removeAction } from './plugins/customActions/actionStore';
|
|
22
|
+
export { logTimelineEvent } from './plugins/timeline/timelineStore';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzF,YAAY,EACV,cAAc,EACd,cAAc,EACd,aAAa,EACb,WAAW,EACX,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,aAAa,EACb,UAAU,EACV,YAAY,EACZ,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAKtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG1E,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAGrF,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,+CAA+C,CAAC;AACpG,YAAY,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAE,uBAAuB,EAAE,MAAM,0CAA0C,CAAC;AAGnF,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,iDAAiD,CAAC;AAGzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AAGjF,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAGnF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ConsoleEntry } from '../../core/types';
|
|
2
|
+
type ConsoleListener = (entries: ConsoleEntry[]) => void;
|
|
3
|
+
/**
|
|
4
|
+
* ConsoleInterceptor — Captures console.log/warn/error/info/debug calls.
|
|
5
|
+
*
|
|
6
|
+
* Wraps the global console methods and stores entries in a ring buffer.
|
|
7
|
+
* Original console behavior is preserved — messages still appear in the developer console.
|
|
8
|
+
*/
|
|
9
|
+
declare class ConsoleInterceptorClass {
|
|
10
|
+
private entries;
|
|
11
|
+
private listeners;
|
|
12
|
+
private maxEntries;
|
|
13
|
+
private isActive;
|
|
14
|
+
private originals;
|
|
15
|
+
/** Start intercepting console calls. */
|
|
16
|
+
start(maxEntries?: number): void;
|
|
17
|
+
/** Stop intercepting and restore original console. */
|
|
18
|
+
stop(): void;
|
|
19
|
+
/** Subscribe to entry changes. Returns unsubscribe function. */
|
|
20
|
+
subscribe(listener: ConsoleListener): () => void;
|
|
21
|
+
/** Get all entries. */
|
|
22
|
+
getAll(): ConsoleEntry[];
|
|
23
|
+
/** Clear all entries. */
|
|
24
|
+
clear(): void;
|
|
25
|
+
get active(): boolean;
|
|
26
|
+
private addEntry;
|
|
27
|
+
private notify;
|
|
28
|
+
}
|
|
29
|
+
/** Singleton console interceptor instance. */
|
|
30
|
+
export declare const ConsoleInterceptor: ConsoleInterceptorClass;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=ConsoleInterceptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsoleInterceptor.d.ts","sourceRoot":"","sources":["../../../../src/plugins/console/ConsoleInterceptor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAgB,MAAM,kBAAkB,CAAC;AAGnE,KAAK,eAAe,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;AAEzD;;;;;GAKG;AACH,cAAM,uBAAuB;IAC3B,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,UAAU,CAAgB;IAClC,OAAO,CAAC,QAAQ,CAAkB;IAElC,OAAO,CAAC,SAAS,CAMf;IAEF,wCAAwC;IACxC,KAAK,CAAC,UAAU,GAAE,MAAa,GAAG,IAAI;IAiBtC,sDAAsD;IACtD,IAAI,IAAI,IAAI;IAUZ,gEAAgE;IAChE,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,MAAM,IAAI;IAMhD,uBAAuB;IACvB,MAAM,IAAI,YAAY,EAAE;IAIxB,yBAAyB;IACzB,KAAK,IAAI,IAAI;IAKb,IAAI,MAAM,IAAI,OAAO,CAEpB;IAED,OAAO,CAAC,QAAQ;IAoBhB,OAAO,CAAC,MAAM;CAUf;AAED,8CAA8C;AAC9C,eAAO,MAAM,kBAAkB,yBAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConsoleViewerPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/console/ConsoleViewerPlugin.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAIV,cAAc,EACf,MAAM,kBAAkB,CAAC;AAuN1B,wBAAgB,yBAAyB,IAAI,cAAc,CAU1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CrashReporterPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/crashReporter/CrashReporterPlugin.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAoC,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiTzF,wBAAgB,yBAAyB,IAAI,cAAc,CAQ1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CustomActionsPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/customActions/CustomActionsPlugin.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAsC,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAoL3F,wBAAgB,yBAAyB,IAAI,cAAc,CAQ1D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CustomAction } from '../../core/types';
|
|
2
|
+
type ActionListener = (actions: CustomAction[]) => void;
|
|
3
|
+
declare class ActionStoreClass {
|
|
4
|
+
private actions;
|
|
5
|
+
private listeners;
|
|
6
|
+
register(action: CustomAction): void;
|
|
7
|
+
remove(id: string): void;
|
|
8
|
+
getAll(): CustomAction[];
|
|
9
|
+
subscribe(listener: ActionListener): () => void;
|
|
10
|
+
private notify;
|
|
11
|
+
}
|
|
12
|
+
export declare const actionStore: ActionStoreClass;
|
|
13
|
+
export declare function registerAction(action: CustomAction): void;
|
|
14
|
+
export declare function removeAction(id: string): void;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=actionStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actionStore.d.ts","sourceRoot":"","sources":["../../../../src/plugins/customActions/actionStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,KAAK,cAAc,GAAG,CAAC,OAAO,EAAE,YAAY,EAAE,KAAK,IAAI,CAAC;AAExD,cAAM,gBAAgB;IACpB,OAAO,CAAC,OAAO,CAAwC;IACvD,OAAO,CAAC,SAAS,CAAkC;IAEnD,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAKpC,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAKxB,MAAM,IAAI,YAAY,EAAE;IAIxB,SAAS,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,IAAI;IAM/C,OAAO,CAAC,MAAM;CAUf;AAED,eAAO,MAAM,WAAW,kBAAyB,CAAC;AAElD,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAEzD;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAE7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeepLinkTesterPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/deepLinkTester/DeepLinkTesterPlugin.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAwB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiM7E,wBAAgB,0BAA0B,IAAI,cAAc,CAQ3D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeviceInfoPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/deviceInfo/DeviceInfoPlugin.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAwB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsI7E,wBAAgB,sBAAsB,IAAI,cAAc,CAQvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FeatureFlagsPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/featureFlags/FeatureFlagsPlugin.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAqC,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA8T1F,wBAAgB,wBAAwB,IAAI,cAAc,CAQzD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { FeatureFlag } from '../../core/types';
|
|
2
|
+
type FlagListener = (flags: FeatureFlag[]) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Feature Flag Store — In-memory registry for feature flags.
|
|
5
|
+
*
|
|
6
|
+
* Flags can be registered by the consumer app and toggled at runtime
|
|
7
|
+
* via the debugger overlay. Overrides persist in-memory (optionally in AsyncStorage).
|
|
8
|
+
*/
|
|
9
|
+
declare class FlagStoreClass {
|
|
10
|
+
private flags;
|
|
11
|
+
private listeners;
|
|
12
|
+
private changeCallbacks;
|
|
13
|
+
/** Register a feature flag. */
|
|
14
|
+
register(flag: Omit<FeatureFlag, 'currentValue'> & {
|
|
15
|
+
currentValue?: FeatureFlag['currentValue'];
|
|
16
|
+
}): void;
|
|
17
|
+
/** Get a flag value. Returns the overridden value if set, otherwise the default. */
|
|
18
|
+
get(key: string): FeatureFlag['currentValue'] | undefined;
|
|
19
|
+
/** Get a flag definition. */
|
|
20
|
+
getFlag(key: string): FeatureFlag | undefined;
|
|
21
|
+
/** Get all flags. */
|
|
22
|
+
getAll(): FeatureFlag[];
|
|
23
|
+
/** Override a flag value. */
|
|
24
|
+
override(key: string, value: FeatureFlag['currentValue']): void;
|
|
25
|
+
/** Reset a single flag to its default value. */
|
|
26
|
+
reset(key: string): void;
|
|
27
|
+
/** Reset all flags to defaults. */
|
|
28
|
+
resetAll(): void;
|
|
29
|
+
/** Register a callback when a specific flag changes. */
|
|
30
|
+
onChange(key: string, callback: (value: FeatureFlag['currentValue']) => void): () => void;
|
|
31
|
+
/** Subscribe to all flag changes. */
|
|
32
|
+
subscribe(listener: FlagListener): () => void;
|
|
33
|
+
private notify;
|
|
34
|
+
}
|
|
35
|
+
declare const flagStore: FlagStoreClass;
|
|
36
|
+
/** Register a feature flag. */
|
|
37
|
+
export declare function registerFlag(flag: Omit<FeatureFlag, 'currentValue'> & {
|
|
38
|
+
currentValue?: FeatureFlag['currentValue'];
|
|
39
|
+
}): void;
|
|
40
|
+
/** Reset all flag overrides. */
|
|
41
|
+
export declare function resetFlags(): void;
|
|
42
|
+
/** Get a flag's current value. */
|
|
43
|
+
export declare function getFlag(key: string): FeatureFlag['currentValue'] | undefined;
|
|
44
|
+
export { flagStore };
|
|
45
|
+
//# sourceMappingURL=flagStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"flagStore.d.ts","sourceRoot":"","sources":["../../../../src/plugins/featureFlags/flagStore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,KAAK,YAAY,GAAG,CAAC,KAAK,EAAE,WAAW,EAAE,KAAK,IAAI,CAAC;AAEnD;;;;;GAKG;AACH,cAAM,cAAc;IAClB,OAAO,CAAC,KAAK,CAAuC;IACpD,OAAO,CAAC,SAAS,CAAgC;IACjD,OAAO,CAAC,eAAe,CAAwE;IAE/F,+BAA+B;IAC/B,QAAQ,CACN,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG;QAAE,YAAY,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;KAAE,GACvF,IAAI;IASP,oFAAoF;IACpF,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC,cAAc,CAAC,GAAG,SAAS;IAIzD,6BAA6B;IAC7B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS;IAI7C,qBAAqB;IACrB,MAAM,IAAI,WAAW,EAAE;IAIvB,6BAA6B;IAC7B,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,cAAc,CAAC,GAAG,IAAI;IAU/D,gDAAgD;IAChD,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IASxB,mCAAmC;IACnC,QAAQ,IAAI,IAAI;IAShB,wDAAwD;IACxD,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,cAAc,CAAC,KAAK,IAAI,GAAG,MAAM,IAAI;IAKzF,qCAAqC;IACrC,SAAS,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,IAAI;IAM7C,OAAO,CAAC,MAAM;CAUf;AAED,QAAA,MAAM,SAAS,gBAAuB,CAAC;AAEvC,+BAA+B;AAC/B,wBAAgB,YAAY,CAC1B,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG;IAAE,YAAY,CAAC,EAAE,WAAW,CAAC,cAAc,CAAC,CAAA;CAAE,GACvF,IAAI,CAEN;AAED,gCAAgC;AAChC,wBAAgB,UAAU,IAAI,IAAI,CAEjC;AAED,kCAAkC;AAClC,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC,cAAc,CAAC,GAAG,SAAS,CAE5E;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NavigationInspectorPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/navigationInspector/NavigationInspectorPlugin.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAwB,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA+J7E,wBAAgB,+BAA+B,IAAI,cAAc,CAQhE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type Listener = () => void;
|
|
2
|
+
declare class NavigationStoreClass {
|
|
3
|
+
private ref;
|
|
4
|
+
private history;
|
|
5
|
+
private listeners;
|
|
6
|
+
private maxHistory;
|
|
7
|
+
setRef(ref: {
|
|
8
|
+
current: unknown;
|
|
9
|
+
}): void;
|
|
10
|
+
getRef(): unknown;
|
|
11
|
+
addHistoryEntry(name: string, params?: Record<string, unknown>): void;
|
|
12
|
+
getHistory(): {
|
|
13
|
+
name: string;
|
|
14
|
+
params?: Record<string, unknown>;
|
|
15
|
+
timestamp: number;
|
|
16
|
+
}[];
|
|
17
|
+
getState(): unknown;
|
|
18
|
+
getCurrentRoute(): {
|
|
19
|
+
name: string;
|
|
20
|
+
params?: Record<string, unknown>;
|
|
21
|
+
} | null;
|
|
22
|
+
subscribe(listener: Listener): () => void;
|
|
23
|
+
private notify;
|
|
24
|
+
}
|
|
25
|
+
export declare const navigationStore: NavigationStoreClass;
|
|
26
|
+
export declare function setNavigationRef(ref: {
|
|
27
|
+
current: unknown;
|
|
28
|
+
}): void;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=navigationStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigationStore.d.ts","sourceRoot":"","sources":["../../../../src/plugins/navigationInspector/navigationStore.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,GAAG,MAAM,IAAI,CAAC;AAE3B,cAAM,oBAAoB;IACxB,OAAO,CAAC,GAAG,CAAqC;IAChD,OAAO,CAAC,OAAO,CAA+E;IAC9F,OAAO,CAAC,SAAS,CAA4B;IAC7C,OAAO,CAAC,UAAU,CAAM;IAExB,MAAM,CAAC,GAAG,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;IAKvC,MAAM,IAAI,OAAO;IAIjB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;IAQrE,UAAU;cArBe,MAAM;iBAAW,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;mBAAa,MAAM;;IAyBpF,QAAQ,IAAI,OAAO;IASnB,eAAe,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,GAAG,IAAI;IAW5E,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,IAAI;IAKzC,OAAO,CAAC,MAAM;CASf;AAED,eAAO,MAAM,eAAe,sBAA6B,CAAC;AAE1D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAEhE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NetworkInspectorPlugin.d.ts","sourceRoot":"","sources":["../../../../src/plugins/network/NetworkInspectorPlugin.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAgkBvD,wBAAgB,4BAA4B,IAAI,cAAc,CAU7D"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { NetworkRequest } from '../../core/types';
|
|
2
|
+
type NetworkListener = (requests: NetworkRequest[]) => void;
|
|
3
|
+
/**
|
|
4
|
+
* NetworkInterceptor — Intercepts XMLHttpRequest and fetch to capture network traffic.
|
|
5
|
+
*
|
|
6
|
+
* Uses monkey-patching to wrap the global XHR and fetch implementations.
|
|
7
|
+
* Stores request/response data in an in-memory ring buffer.
|
|
8
|
+
* Thread-safe listener management for UI updates.
|
|
9
|
+
*/
|
|
10
|
+
declare class NetworkInterceptorClass {
|
|
11
|
+
private requests;
|
|
12
|
+
private listeners;
|
|
13
|
+
private maxRequests;
|
|
14
|
+
private isActive;
|
|
15
|
+
private originalXHROpen;
|
|
16
|
+
private originalXHRSend;
|
|
17
|
+
private originalXHRSetHeader;
|
|
18
|
+
private originalFetch;
|
|
19
|
+
/** Start intercepting network requests. */
|
|
20
|
+
start(maxRequests?: number, forceEnable?: boolean): void;
|
|
21
|
+
/** Stop intercepting and restore original implementations. */
|
|
22
|
+
stop(): void;
|
|
23
|
+
/** Subscribe to request changes. Returns unsubscribe function. */
|
|
24
|
+
subscribe(listener: NetworkListener): () => void;
|
|
25
|
+
/** Get all captured requests. */
|
|
26
|
+
getAll(): NetworkRequest[];
|
|
27
|
+
/** Clear all captured requests. */
|
|
28
|
+
clear(): void;
|
|
29
|
+
/** Check if the interceptor is active. */
|
|
30
|
+
get active(): boolean;
|
|
31
|
+
private interceptXHR;
|
|
32
|
+
private restoreXHR;
|
|
33
|
+
private interceptFetch;
|
|
34
|
+
private restoreFetch;
|
|
35
|
+
private addRequest;
|
|
36
|
+
private updateRequest;
|
|
37
|
+
private notify;
|
|
38
|
+
}
|
|
39
|
+
/** Singleton network interceptor instance. */
|
|
40
|
+
export declare const NetworkInterceptor: NetworkInterceptorClass;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=NetworkInterceptor.d.ts.map
|