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
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createConsoleViewerPlugin = createConsoleViewerPlugin;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _ConsoleInterceptor = require("./ConsoleInterceptor");
|
|
10
|
+
var _utils = require("../../core/utils");
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
const ConsoleViewerPanel = ({
|
|
13
|
+
theme
|
|
14
|
+
}) => {
|
|
15
|
+
const [entries, setEntries] = (0, _react.useState)([]);
|
|
16
|
+
const [searchQuery, setSearchQuery] = (0, _react.useState)('');
|
|
17
|
+
const [levelFilter, setLevelFilter] = (0, _react.useState)(null);
|
|
18
|
+
const [expandedId, setExpandedId] = (0, _react.useState)(null);
|
|
19
|
+
(0, _react.useEffect)(() => {
|
|
20
|
+
const unsubscribe = _ConsoleInterceptor.ConsoleInterceptor.subscribe(setEntries);
|
|
21
|
+
return unsubscribe;
|
|
22
|
+
}, []);
|
|
23
|
+
const filteredEntries = (0, _react.useMemo)(() => {
|
|
24
|
+
let filtered = entries;
|
|
25
|
+
if (levelFilter) {
|
|
26
|
+
filtered = filtered.filter(e => e.level === levelFilter);
|
|
27
|
+
}
|
|
28
|
+
if (searchQuery) {
|
|
29
|
+
const q = searchQuery.toLowerCase();
|
|
30
|
+
filtered = filtered.filter(e => e.message.toLowerCase().includes(q));
|
|
31
|
+
}
|
|
32
|
+
return filtered;
|
|
33
|
+
}, [entries, searchQuery, levelFilter]);
|
|
34
|
+
const levelCounts = (0, _react.useMemo)(() => {
|
|
35
|
+
const counts = {
|
|
36
|
+
log: 0,
|
|
37
|
+
info: 0,
|
|
38
|
+
warn: 0,
|
|
39
|
+
error: 0,
|
|
40
|
+
debug: 0
|
|
41
|
+
};
|
|
42
|
+
for (const entry of entries) {
|
|
43
|
+
counts[entry.level]++;
|
|
44
|
+
}
|
|
45
|
+
return counts;
|
|
46
|
+
}, [entries]);
|
|
47
|
+
const handleClear = (0, _react.useCallback)(() => {
|
|
48
|
+
_ConsoleInterceptor.ConsoleInterceptor.clear();
|
|
49
|
+
setExpandedId(null);
|
|
50
|
+
}, []);
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
52
|
+
style: styles.container
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
54
|
+
horizontal: true,
|
|
55
|
+
showsHorizontalScrollIndicator: false,
|
|
56
|
+
style: [styles.filterBar, {
|
|
57
|
+
backgroundColor: theme.surface
|
|
58
|
+
}],
|
|
59
|
+
contentContainerStyle: styles.filterContent
|
|
60
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
61
|
+
style: [styles.filterChip, {
|
|
62
|
+
backgroundColor: !levelFilter ? theme.accent : theme.surfaceAlt,
|
|
63
|
+
borderColor: theme.border
|
|
64
|
+
}],
|
|
65
|
+
onPress: () => setLevelFilter(null),
|
|
66
|
+
activeOpacity: 0.7
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
68
|
+
style: [styles.filterText, {
|
|
69
|
+
color: !levelFilter ? '#FFF' : theme.textSecondary
|
|
70
|
+
}]
|
|
71
|
+
}, "All (", entries.length, ")")), ['error', 'warn', 'info', 'log', 'debug'].map(level => /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
72
|
+
key: level,
|
|
73
|
+
style: [styles.filterChip, {
|
|
74
|
+
backgroundColor: levelFilter === level ? (0, _utils.getLevelColor)(level) : theme.surfaceAlt,
|
|
75
|
+
borderColor: theme.border
|
|
76
|
+
}],
|
|
77
|
+
onPress: () => setLevelFilter(levelFilter === level ? null : level),
|
|
78
|
+
activeOpacity: 0.7
|
|
79
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
80
|
+
style: [styles.filterText, {
|
|
81
|
+
color: levelFilter === level ? '#FFF' : (0, _utils.getLevelColor)(level)
|
|
82
|
+
}]
|
|
83
|
+
}, level, " (", levelCounts[level], ")"))), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
84
|
+
onPress: handleClear,
|
|
85
|
+
style: [styles.filterChip, {
|
|
86
|
+
backgroundColor: theme.surfaceAlt,
|
|
87
|
+
borderColor: theme.error
|
|
88
|
+
}],
|
|
89
|
+
activeOpacity: 0.7
|
|
90
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
91
|
+
style: [styles.filterText, {
|
|
92
|
+
color: theme.error
|
|
93
|
+
}]
|
|
94
|
+
}, "Clear"))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
95
|
+
style: [styles.searchContainer, {
|
|
96
|
+
backgroundColor: theme.surface
|
|
97
|
+
}]
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
|
|
99
|
+
style: [styles.searchInput, {
|
|
100
|
+
color: theme.text,
|
|
101
|
+
backgroundColor: theme.surfaceAlt,
|
|
102
|
+
borderColor: theme.border
|
|
103
|
+
}],
|
|
104
|
+
placeholder: "Search logs...",
|
|
105
|
+
placeholderTextColor: theme.textMuted,
|
|
106
|
+
value: searchQuery,
|
|
107
|
+
onChangeText: setSearchQuery,
|
|
108
|
+
autoCapitalize: "none"
|
|
109
|
+
})), /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
110
|
+
data: filteredEntries,
|
|
111
|
+
keyExtractor: item => item.id,
|
|
112
|
+
renderItem: ({
|
|
113
|
+
item
|
|
114
|
+
}) => /*#__PURE__*/_react.default.createElement(ConsoleRow, {
|
|
115
|
+
entry: item,
|
|
116
|
+
theme: theme,
|
|
117
|
+
isExpanded: expandedId === item.id,
|
|
118
|
+
onToggle: () => setExpandedId(expandedId === item.id ? null : item.id)
|
|
119
|
+
}),
|
|
120
|
+
ListEmptyComponent: /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
121
|
+
style: styles.emptyContainer
|
|
122
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
123
|
+
style: [styles.emptyText, {
|
|
124
|
+
color: theme.textMuted
|
|
125
|
+
}]
|
|
126
|
+
}, "No console output")),
|
|
127
|
+
initialNumToRender: 30,
|
|
128
|
+
maxToRenderPerBatch: 15
|
|
129
|
+
}));
|
|
130
|
+
};
|
|
131
|
+
const ConsoleRow = /*#__PURE__*/_react.default.memo(({
|
|
132
|
+
entry,
|
|
133
|
+
theme,
|
|
134
|
+
isExpanded,
|
|
135
|
+
onToggle
|
|
136
|
+
}) => {
|
|
137
|
+
const levelColor = (0, _utils.getLevelColor)(entry.level);
|
|
138
|
+
const levelBg = `${levelColor}15`;
|
|
139
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
140
|
+
style: [styles.logRow, {
|
|
141
|
+
backgroundColor: levelBg,
|
|
142
|
+
borderBottomColor: theme.border
|
|
143
|
+
}],
|
|
144
|
+
onPress: onToggle,
|
|
145
|
+
onLongPress: () => (0, _utils.copyToClipboard)(entry.message),
|
|
146
|
+
activeOpacity: 0.7
|
|
147
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
148
|
+
style: styles.logHeader
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
150
|
+
style: [styles.levelBadge, {
|
|
151
|
+
backgroundColor: levelColor
|
|
152
|
+
}]
|
|
153
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
154
|
+
style: styles.levelText
|
|
155
|
+
}, entry.level.toUpperCase())), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
156
|
+
style: [styles.logTimestamp, {
|
|
157
|
+
color: theme.textMuted
|
|
158
|
+
}]
|
|
159
|
+
}, (0, _utils.formatTimestamp)(entry.timestamp))), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
160
|
+
style: [styles.logMessage, {
|
|
161
|
+
color: theme.text
|
|
162
|
+
}],
|
|
163
|
+
numberOfLines: isExpanded ? undefined : 3
|
|
164
|
+
}, entry.message), isExpanded && entry.message.length > 100 && /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
165
|
+
onPress: () => (0, _utils.copyToClipboard)(entry.message),
|
|
166
|
+
style: [styles.copyLogButton, {
|
|
167
|
+
backgroundColor: theme.surfaceAlt
|
|
168
|
+
}],
|
|
169
|
+
activeOpacity: 0.7
|
|
170
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
171
|
+
style: [styles.copyLogText, {
|
|
172
|
+
color: theme.accent
|
|
173
|
+
}]
|
|
174
|
+
}, "Copy")));
|
|
175
|
+
});
|
|
176
|
+
const styles = _reactNative.StyleSheet.create({
|
|
177
|
+
container: {
|
|
178
|
+
flex: 1
|
|
179
|
+
},
|
|
180
|
+
filterBar: {
|
|
181
|
+
maxHeight: 44
|
|
182
|
+
},
|
|
183
|
+
filterContent: {
|
|
184
|
+
paddingHorizontal: 12,
|
|
185
|
+
paddingVertical: 8,
|
|
186
|
+
gap: 6
|
|
187
|
+
},
|
|
188
|
+
filterChip: {
|
|
189
|
+
paddingHorizontal: 10,
|
|
190
|
+
paddingVertical: 4,
|
|
191
|
+
borderRadius: 12,
|
|
192
|
+
borderWidth: 1
|
|
193
|
+
},
|
|
194
|
+
filterText: {
|
|
195
|
+
fontSize: 11,
|
|
196
|
+
fontWeight: '600'
|
|
197
|
+
},
|
|
198
|
+
searchContainer: {
|
|
199
|
+
paddingHorizontal: 12,
|
|
200
|
+
paddingBottom: 8
|
|
201
|
+
},
|
|
202
|
+
searchInput: {
|
|
203
|
+
height: 36,
|
|
204
|
+
borderRadius: 8,
|
|
205
|
+
paddingHorizontal: 12,
|
|
206
|
+
fontSize: 13,
|
|
207
|
+
borderWidth: 1
|
|
208
|
+
},
|
|
209
|
+
logRow: {
|
|
210
|
+
paddingHorizontal: 12,
|
|
211
|
+
paddingVertical: 8,
|
|
212
|
+
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth
|
|
213
|
+
},
|
|
214
|
+
logHeader: {
|
|
215
|
+
flexDirection: 'row',
|
|
216
|
+
alignItems: 'center',
|
|
217
|
+
gap: 8,
|
|
218
|
+
marginBottom: 4
|
|
219
|
+
},
|
|
220
|
+
levelBadge: {
|
|
221
|
+
paddingHorizontal: 6,
|
|
222
|
+
paddingVertical: 1,
|
|
223
|
+
borderRadius: 4
|
|
224
|
+
},
|
|
225
|
+
levelText: {
|
|
226
|
+
fontSize: 9,
|
|
227
|
+
fontWeight: '800',
|
|
228
|
+
color: '#FFF',
|
|
229
|
+
letterSpacing: 0.5
|
|
230
|
+
},
|
|
231
|
+
logTimestamp: {
|
|
232
|
+
fontSize: 10
|
|
233
|
+
},
|
|
234
|
+
logMessage: {
|
|
235
|
+
fontSize: 12,
|
|
236
|
+
fontFamily: 'monospace',
|
|
237
|
+
lineHeight: 18
|
|
238
|
+
},
|
|
239
|
+
copyLogButton: {
|
|
240
|
+
marginTop: 8,
|
|
241
|
+
alignSelf: 'flex-start',
|
|
242
|
+
paddingHorizontal: 10,
|
|
243
|
+
paddingVertical: 4,
|
|
244
|
+
borderRadius: 6
|
|
245
|
+
},
|
|
246
|
+
copyLogText: {
|
|
247
|
+
fontSize: 11,
|
|
248
|
+
fontWeight: '600'
|
|
249
|
+
},
|
|
250
|
+
emptyContainer: {
|
|
251
|
+
alignItems: 'center',
|
|
252
|
+
paddingVertical: 40
|
|
253
|
+
},
|
|
254
|
+
emptyText: {
|
|
255
|
+
fontSize: 13
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
function createConsoleViewerPlugin() {
|
|
259
|
+
return {
|
|
260
|
+
id: 'console-viewer',
|
|
261
|
+
name: 'Console',
|
|
262
|
+
icon: '📋',
|
|
263
|
+
component: ConsoleViewerPanel,
|
|
264
|
+
order: 20,
|
|
265
|
+
onInit: () => _ConsoleInterceptor.ConsoleInterceptor.start(),
|
|
266
|
+
onDestroy: () => _ConsoleInterceptor.ConsoleInterceptor.stop()
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
//# sourceMappingURL=ConsoleViewerPlugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_ConsoleInterceptor","_utils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ConsoleViewerPanel","theme","entries","setEntries","useState","searchQuery","setSearchQuery","levelFilter","setLevelFilter","expandedId","setExpandedId","useEffect","unsubscribe","ConsoleInterceptor","subscribe","filteredEntries","useMemo","filtered","filter","level","q","toLowerCase","message","includes","levelCounts","counts","log","info","warn","error","debug","entry","handleClear","useCallback","clear","createElement","View","style","styles","container","ScrollView","horizontal","showsHorizontalScrollIndicator","filterBar","backgroundColor","surface","contentContainerStyle","filterContent","TouchableOpacity","filterChip","accent","surfaceAlt","borderColor","border","onPress","activeOpacity","Text","filterText","color","textSecondary","length","map","key","getLevelColor","searchContainer","TextInput","searchInput","text","placeholder","placeholderTextColor","textMuted","value","onChangeText","autoCapitalize","FlatList","data","keyExtractor","item","id","renderItem","ConsoleRow","isExpanded","onToggle","ListEmptyComponent","emptyContainer","emptyText","initialNumToRender","maxToRenderPerBatch","React","memo","levelColor","levelBg","logRow","borderBottomColor","onLongPress","copyToClipboard","logHeader","levelBadge","levelText","toUpperCase","logTimestamp","formatTimestamp","timestamp","logMessage","numberOfLines","undefined","copyLogButton","copyLogText","StyleSheet","create","flex","maxHeight","paddingHorizontal","paddingVertical","gap","borderRadius","borderWidth","fontSize","fontWeight","paddingBottom","height","borderBottomWidth","hairlineWidth","flexDirection","alignItems","marginBottom","letterSpacing","fontFamily","lineHeight","marginTop","alignSelf","createConsoleViewerPlugin","name","icon","component","order","onInit","start","onDestroy","stop"],"sourceRoot":"../../../../src","sources":["plugins/console/ConsoleViewerPlugin.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAeA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAmF,SAAAD,wBAAAK,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAA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AE;IACbuB,SAAS,EAAE,CAAC;IACZC,SAAS,EAAE,YAAY;IACvBlB,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBE,YAAY,EAAE;EAChB,CAAC;EACDR,WAAW,EAAE;IAAEU,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE;EAAM,CAAC;EAChDlC,cAAc,EAAE;IAAEwC,UAAU,EAAE,QAAQ;IAAEX,eAAe,EAAE;EAAG,CAAC;EAC7D5B,SAAS,EAAE;IAAEgC,QAAQ,EAAE;EAAG;AAC5B,CAAC,CAAC;AAEK,SAASc,yBAAyBA,CAAA,EAAmB;EAC1D,OAAO;IACLrD,EAAE,EAAE,gBAAgB;IACpBsD,IAAI,EAAE,SAAS;IACfC,IAAI,EAAE,IAAI;IACVC,SAAS,EAAEtI,kBAAkB;IAC7BuI,KAAK,EAAE,EAAE;IACTC,MAAM,EAAEA,CAAA,KAAM3H,sCAAkB,CAAC4H,KAAK,CAAC,CAAC;IACxCC,SAAS,EAAEA,CAAA,KAAM7H,sCAAkB,CAAC8H,IAAI,CAAC;EAC3C,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createCrashReporterPlugin = createCrashReporterPlugin;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _utils = require("../../core/utils");
|
|
10
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
11
|
+
// ─── Crash Store ────────────────────────────────────────────────────────────
|
|
12
|
+
|
|
13
|
+
class CrashStoreClass {
|
|
14
|
+
entries = [];
|
|
15
|
+
listeners = new Set();
|
|
16
|
+
isActive = false;
|
|
17
|
+
maxEntries = 100;
|
|
18
|
+
originalHandler = null;
|
|
19
|
+
start() {
|
|
20
|
+
if (this.isActive) return;
|
|
21
|
+
this.isActive = true;
|
|
22
|
+
|
|
23
|
+
// Capture unhandled JS errors
|
|
24
|
+
const ErrorUtils = globalThis.ErrorUtils;
|
|
25
|
+
if (ErrorUtils) {
|
|
26
|
+
this.originalHandler = ErrorUtils.getGlobalHandler();
|
|
27
|
+
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
28
|
+
this.addEntry({
|
|
29
|
+
id: (0, _utils.generateId)(),
|
|
30
|
+
timestamp: Date.now(),
|
|
31
|
+
message: error.message,
|
|
32
|
+
stack: error.stack,
|
|
33
|
+
isFatal: isFatal ?? false
|
|
34
|
+
});
|
|
35
|
+
// Forward to original handler
|
|
36
|
+
if (this.originalHandler) {
|
|
37
|
+
this.originalHandler(error, isFatal);
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Capture unhandled promise rejections
|
|
43
|
+
const tracking = require('promise/setimmediate/rejection-tracking');
|
|
44
|
+
if (tracking) {
|
|
45
|
+
try {
|
|
46
|
+
tracking.enable({
|
|
47
|
+
allRejections: true,
|
|
48
|
+
onUnhandled: (_id, error) => {
|
|
49
|
+
this.addEntry({
|
|
50
|
+
id: (0, _utils.generateId)(),
|
|
51
|
+
timestamp: Date.now(),
|
|
52
|
+
message: error?.message || 'Unhandled Promise Rejection',
|
|
53
|
+
stack: error?.stack,
|
|
54
|
+
isFatal: false
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
} catch {
|
|
59
|
+
// Rejection tracking may not be available
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
stop() {
|
|
64
|
+
if (!this.isActive) return;
|
|
65
|
+
this.isActive = false;
|
|
66
|
+
const ErrorUtils = globalThis.ErrorUtils;
|
|
67
|
+
if (ErrorUtils && this.originalHandler) {
|
|
68
|
+
ErrorUtils.setGlobalHandler(this.originalHandler);
|
|
69
|
+
this.originalHandler = null;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
addEntry(entry) {
|
|
73
|
+
this.entries = [entry, ...this.entries].slice(0, this.maxEntries);
|
|
74
|
+
this.notify();
|
|
75
|
+
}
|
|
76
|
+
getAll() {
|
|
77
|
+
return [...this.entries];
|
|
78
|
+
}
|
|
79
|
+
clear() {
|
|
80
|
+
this.entries = [];
|
|
81
|
+
this.notify();
|
|
82
|
+
}
|
|
83
|
+
subscribe(listener) {
|
|
84
|
+
this.listeners.add(listener);
|
|
85
|
+
listener(this.entries);
|
|
86
|
+
return () => this.listeners.delete(listener);
|
|
87
|
+
}
|
|
88
|
+
notify() {
|
|
89
|
+
const snapshot = this.entries;
|
|
90
|
+
for (const l of this.listeners) {
|
|
91
|
+
try {
|
|
92
|
+
l(snapshot);
|
|
93
|
+
} catch {
|
|
94
|
+
/* ignore */
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const crashStore = new CrashStoreClass();
|
|
100
|
+
|
|
101
|
+
// ─── Crash Reporter Panel ───────────────────────────────────────────────────
|
|
102
|
+
|
|
103
|
+
const CrashReporterPanel = ({
|
|
104
|
+
theme
|
|
105
|
+
}) => {
|
|
106
|
+
const [entries, setEntries] = (0, _react.useState)([]);
|
|
107
|
+
const [selectedEntry, setSelectedEntry] = (0, _react.useState)(null);
|
|
108
|
+
(0, _react.useEffect)(() => {
|
|
109
|
+
const unsub = crashStore.subscribe(setEntries);
|
|
110
|
+
return unsub;
|
|
111
|
+
}, []);
|
|
112
|
+
const handleClear = (0, _react.useCallback)(() => {
|
|
113
|
+
crashStore.clear();
|
|
114
|
+
setSelectedEntry(null);
|
|
115
|
+
}, []);
|
|
116
|
+
if (selectedEntry) {
|
|
117
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
118
|
+
style: styles.container
|
|
119
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
120
|
+
style: [styles.header, {
|
|
121
|
+
backgroundColor: theme.surface,
|
|
122
|
+
borderBottomColor: theme.border
|
|
123
|
+
}]
|
|
124
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
125
|
+
onPress: () => setSelectedEntry(null),
|
|
126
|
+
activeOpacity: 0.7
|
|
127
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
128
|
+
style: [styles.backBtn, {
|
|
129
|
+
color: theme.accent
|
|
130
|
+
}]
|
|
131
|
+
}, "\u2190 Back")), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
132
|
+
style: styles.headerActions
|
|
133
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
134
|
+
onPress: () => (0, _utils.copyToClipboard)(`${selectedEntry.message}\n\n${selectedEntry.stack || ''}`),
|
|
135
|
+
activeOpacity: 0.7
|
|
136
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
137
|
+
style: [styles.actionText, {
|
|
138
|
+
color: theme.accent
|
|
139
|
+
}]
|
|
140
|
+
}, "Copy")), /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
141
|
+
onPress: () => (0, _utils.shareText)(`${selectedEntry.message}\n\n${selectedEntry.stack || ''}`, 'Crash Report'),
|
|
142
|
+
activeOpacity: 0.7
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
144
|
+
style: [styles.actionText, {
|
|
145
|
+
color: theme.accent
|
|
146
|
+
}]
|
|
147
|
+
}, "Share")))), /*#__PURE__*/_react.default.createElement(_reactNative.ScrollView, {
|
|
148
|
+
style: styles.detailContent
|
|
149
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
150
|
+
style: [styles.crashBadge, {
|
|
151
|
+
backgroundColor: selectedEntry.isFatal ? theme.error : theme.warning
|
|
152
|
+
}]
|
|
153
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
154
|
+
style: styles.crashBadgeText
|
|
155
|
+
}, selectedEntry.isFatal ? 'FATAL' : 'NON-FATAL')), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
156
|
+
style: [styles.crashTime, {
|
|
157
|
+
color: theme.textMuted
|
|
158
|
+
}]
|
|
159
|
+
}, (0, _utils.formatTimestamp)(selectedEntry.timestamp)), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
160
|
+
style: [styles.crashMessage, {
|
|
161
|
+
color: theme.text
|
|
162
|
+
}]
|
|
163
|
+
}, selectedEntry.message), selectedEntry.stack && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
164
|
+
style: [styles.stackBlock, {
|
|
165
|
+
backgroundColor: theme.codeBackground
|
|
166
|
+
}]
|
|
167
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
168
|
+
style: [styles.stackText, {
|
|
169
|
+
color: theme.codeText
|
|
170
|
+
}],
|
|
171
|
+
selectable: true
|
|
172
|
+
}, selectedEntry.stack)), selectedEntry.componentStack && /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
173
|
+
style: [styles.stackBlock, {
|
|
174
|
+
backgroundColor: theme.codeBackground,
|
|
175
|
+
marginTop: 12
|
|
176
|
+
}]
|
|
177
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
178
|
+
style: [styles.stackLabel, {
|
|
179
|
+
color: theme.textSecondary
|
|
180
|
+
}]
|
|
181
|
+
}, "Component Stack"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
182
|
+
style: [styles.stackText, {
|
|
183
|
+
color: theme.codeText
|
|
184
|
+
}],
|
|
185
|
+
selectable: true
|
|
186
|
+
}, selectedEntry.componentStack))));
|
|
187
|
+
}
|
|
188
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
189
|
+
style: styles.container
|
|
190
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
191
|
+
style: [styles.header, {
|
|
192
|
+
backgroundColor: theme.surface,
|
|
193
|
+
borderBottomColor: theme.border
|
|
194
|
+
}]
|
|
195
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
196
|
+
style: [styles.headerTitle, {
|
|
197
|
+
color: theme.text
|
|
198
|
+
}]
|
|
199
|
+
}, entries.length > 0 ? `${entries.length} crashes` : 'No crashes 🎉'), entries.length > 0 && /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
200
|
+
onPress: handleClear,
|
|
201
|
+
activeOpacity: 0.7
|
|
202
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
203
|
+
style: [styles.clearBtn, {
|
|
204
|
+
color: theme.error
|
|
205
|
+
}]
|
|
206
|
+
}, "Clear"))), /*#__PURE__*/_react.default.createElement(_reactNative.FlatList, {
|
|
207
|
+
data: entries,
|
|
208
|
+
keyExtractor: item => item.id,
|
|
209
|
+
renderItem: ({
|
|
210
|
+
item
|
|
211
|
+
}) => /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
212
|
+
style: [styles.crashRow, {
|
|
213
|
+
borderBottomColor: theme.border,
|
|
214
|
+
backgroundColor: item.isFatal ? `${theme.error}10` : theme.surface
|
|
215
|
+
}],
|
|
216
|
+
onPress: () => setSelectedEntry(item),
|
|
217
|
+
activeOpacity: 0.7
|
|
218
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
219
|
+
style: [styles.fatalDot, {
|
|
220
|
+
backgroundColor: item.isFatal ? theme.error : theme.warning
|
|
221
|
+
}]
|
|
222
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
223
|
+
style: styles.crashInfo
|
|
224
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
225
|
+
style: [styles.crashMsg, {
|
|
226
|
+
color: theme.text
|
|
227
|
+
}],
|
|
228
|
+
numberOfLines: 2
|
|
229
|
+
}, item.message), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
230
|
+
style: [styles.crashTimestamp, {
|
|
231
|
+
color: theme.textMuted
|
|
232
|
+
}]
|
|
233
|
+
}, (0, _utils.formatTimestamp)(item.timestamp)))),
|
|
234
|
+
ListEmptyComponent: /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
235
|
+
style: styles.emptyContainer
|
|
236
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
237
|
+
style: styles.emptyIcon
|
|
238
|
+
}, "\u2705"), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
239
|
+
style: [styles.emptyText, {
|
|
240
|
+
color: theme.textMuted
|
|
241
|
+
}]
|
|
242
|
+
}, "No crashes captured"))
|
|
243
|
+
}));
|
|
244
|
+
};
|
|
245
|
+
const styles = _reactNative.StyleSheet.create({
|
|
246
|
+
container: {
|
|
247
|
+
flex: 1
|
|
248
|
+
},
|
|
249
|
+
header: {
|
|
250
|
+
flexDirection: 'row',
|
|
251
|
+
justifyContent: 'space-between',
|
|
252
|
+
alignItems: 'center',
|
|
253
|
+
paddingHorizontal: 12,
|
|
254
|
+
paddingVertical: 10,
|
|
255
|
+
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth
|
|
256
|
+
},
|
|
257
|
+
headerTitle: {
|
|
258
|
+
fontSize: 14,
|
|
259
|
+
fontWeight: '700'
|
|
260
|
+
},
|
|
261
|
+
clearBtn: {
|
|
262
|
+
fontSize: 13,
|
|
263
|
+
fontWeight: '700'
|
|
264
|
+
},
|
|
265
|
+
backBtn: {
|
|
266
|
+
fontSize: 14,
|
|
267
|
+
fontWeight: '600'
|
|
268
|
+
},
|
|
269
|
+
headerActions: {
|
|
270
|
+
flexDirection: 'row',
|
|
271
|
+
gap: 12
|
|
272
|
+
},
|
|
273
|
+
actionText: {
|
|
274
|
+
fontSize: 12,
|
|
275
|
+
fontWeight: '600'
|
|
276
|
+
},
|
|
277
|
+
crashRow: {
|
|
278
|
+
flexDirection: 'row',
|
|
279
|
+
alignItems: 'center',
|
|
280
|
+
paddingHorizontal: 12,
|
|
281
|
+
paddingVertical: 10,
|
|
282
|
+
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth
|
|
283
|
+
},
|
|
284
|
+
fatalDot: {
|
|
285
|
+
width: 8,
|
|
286
|
+
height: 8,
|
|
287
|
+
borderRadius: 4,
|
|
288
|
+
marginRight: 10
|
|
289
|
+
},
|
|
290
|
+
crashInfo: {
|
|
291
|
+
flex: 1
|
|
292
|
+
},
|
|
293
|
+
crashMsg: {
|
|
294
|
+
fontSize: 13,
|
|
295
|
+
fontWeight: '500'
|
|
296
|
+
},
|
|
297
|
+
crashTimestamp: {
|
|
298
|
+
fontSize: 10,
|
|
299
|
+
marginTop: 2
|
|
300
|
+
},
|
|
301
|
+
emptyContainer: {
|
|
302
|
+
alignItems: 'center',
|
|
303
|
+
paddingVertical: 60
|
|
304
|
+
},
|
|
305
|
+
emptyIcon: {
|
|
306
|
+
fontSize: 48,
|
|
307
|
+
marginBottom: 12
|
|
308
|
+
},
|
|
309
|
+
emptyText: {
|
|
310
|
+
fontSize: 13
|
|
311
|
+
},
|
|
312
|
+
detailContent: {
|
|
313
|
+
flex: 1,
|
|
314
|
+
padding: 12
|
|
315
|
+
},
|
|
316
|
+
crashBadge: {
|
|
317
|
+
alignSelf: 'flex-start',
|
|
318
|
+
paddingHorizontal: 10,
|
|
319
|
+
paddingVertical: 3,
|
|
320
|
+
borderRadius: 6,
|
|
321
|
+
marginBottom: 8
|
|
322
|
+
},
|
|
323
|
+
crashBadgeText: {
|
|
324
|
+
fontSize: 10,
|
|
325
|
+
fontWeight: '800',
|
|
326
|
+
color: '#FFF',
|
|
327
|
+
letterSpacing: 1
|
|
328
|
+
},
|
|
329
|
+
crashTime: {
|
|
330
|
+
fontSize: 11,
|
|
331
|
+
marginBottom: 8
|
|
332
|
+
},
|
|
333
|
+
crashMessage: {
|
|
334
|
+
fontSize: 16,
|
|
335
|
+
fontWeight: '700',
|
|
336
|
+
marginBottom: 16
|
|
337
|
+
},
|
|
338
|
+
stackBlock: {
|
|
339
|
+
padding: 12,
|
|
340
|
+
borderRadius: 8
|
|
341
|
+
},
|
|
342
|
+
stackLabel: {
|
|
343
|
+
fontSize: 11,
|
|
344
|
+
fontWeight: '700',
|
|
345
|
+
marginBottom: 4,
|
|
346
|
+
textTransform: 'uppercase'
|
|
347
|
+
},
|
|
348
|
+
stackText: {
|
|
349
|
+
fontSize: 11,
|
|
350
|
+
fontFamily: 'monospace',
|
|
351
|
+
lineHeight: 18
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
function createCrashReporterPlugin() {
|
|
355
|
+
return {
|
|
356
|
+
id: 'crash-reporter',
|
|
357
|
+
name: 'Crashes',
|
|
358
|
+
icon: '💥',
|
|
359
|
+
component: CrashReporterPanel,
|
|
360
|
+
order: 100
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
//# sourceMappingURL=CrashReporterPlugin.js.map
|