react-native-inapp-inspector 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/8.9/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/build/reports/problems/problems-report.html +659 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +11 -0
- package/dist/commonjs/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/AuditTab.js +741 -0
- package/dist/commonjs/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/DeviceTab.js +717 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +115 -75
- package/dist/commonjs/components/Inspector/MainScreen.js +16 -2
- package/dist/commonjs/components/Inspector/NetworkDetail.js +15 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +317 -12
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +88 -39
- package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/commonjs/components/Inspector/PerformanceHud.js +210 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -18
- package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/commonjs/components/Inspector/RequestReplayModal.js +792 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.js +871 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +847 -370
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +610 -0
- package/dist/commonjs/components/Inspector/TabBar.js +23 -2
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.d.ts +8 -0
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +469 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +12 -0
- package/dist/commonjs/components/NetworkIcons.js +72 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/storageInspector.d.ts +13 -0
- package/dist/commonjs/customHooks/storageInspector.js +179 -0
- package/dist/commonjs/helpers/deviceInfo.d.ts +4 -0
- package/dist/commonjs/helpers/deviceInfo.js +94 -0
- package/dist/commonjs/helpers/index.d.ts +2 -0
- package/dist/commonjs/helpers/index.js +12 -1
- package/dist/commonjs/helpers/packageAuditor.d.ts +5 -0
- package/dist/commonjs/helpers/packageAuditor.js +182 -0
- package/dist/commonjs/helpers/searchQueryParser.d.ts +8 -3
- package/dist/commonjs/helpers/searchQueryParser.js +85 -31
- package/dist/commonjs/helpers/telemetry.js +4 -4
- package/dist/commonjs/i18n/locales/en.json +3 -2
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +171 -16
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/types/enums.d.ts +7 -0
- package/dist/commonjs/types/enums.js +7 -0
- package/dist/commonjs/types/interfaces.d.ts +82 -0
- package/dist/esm/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/esm/components/Inspector/AuditTab.js +702 -0
- package/dist/esm/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/esm/components/Inspector/DeviceTab.js +678 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +115 -75
- package/dist/esm/components/Inspector/MainScreen.js +16 -2
- package/dist/esm/components/Inspector/NetworkDetail.js +16 -1
- package/dist/esm/components/Inspector/NetworkTab.js +317 -12
- package/dist/esm/components/Inspector/NpmUpdateToast.js +88 -39
- package/dist/esm/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/esm/components/Inspector/PerformanceHud.js +170 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +31 -19
- package/dist/esm/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/esm/components/Inspector/RequestReplayModal.js +752 -0
- package/dist/esm/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/esm/components/Inspector/RequestReplayView.js +831 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +848 -371
- package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/esm/components/Inspector/StorageTab.js +571 -0
- package/dist/esm/components/Inspector/TabBar.js +24 -3
- package/dist/esm/components/Inspector/UpdateAvailableModal.d.ts +8 -0
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +432 -0
- package/dist/esm/components/NetworkIcons.d.ts +12 -0
- package/dist/esm/components/NetworkIcons.js +57 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/storageInspector.d.ts +13 -0
- package/dist/esm/customHooks/storageInspector.js +170 -0
- package/dist/esm/helpers/deviceInfo.d.ts +4 -0
- package/dist/esm/helpers/deviceInfo.js +89 -0
- package/dist/esm/helpers/index.d.ts +2 -0
- package/dist/esm/helpers/index.js +10 -0
- package/dist/esm/helpers/packageAuditor.d.ts +5 -0
- package/dist/esm/helpers/packageAuditor.js +173 -0
- package/dist/esm/helpers/searchQueryParser.d.ts +8 -3
- package/dist/esm/helpers/searchQueryParser.js +85 -31
- package/dist/esm/helpers/telemetry.js +4 -4
- package/dist/esm/i18n/locales/en.json +3 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +167 -15
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/types/enums.d.ts +7 -0
- package/dist/esm/types/enums.js +7 -0
- package/dist/esm/types/interfaces.d.ts +82 -0
- package/ios/NetworkInspectorModule.mm +12 -5
- package/package.json +4 -1
|
@@ -11,9 +11,11 @@ import { METHOD_COLORS } from '../../constants';
|
|
|
11
11
|
import { LIB_VERSION } from '../../constants';
|
|
12
12
|
import { getStatusColor, getAppName, formatTime, getSize } from '../../helpers';
|
|
13
13
|
import { getTelemetryConsentStatus } from '../../helpers/telemetry';
|
|
14
|
+
import { UpdateAvailableModal } from './UpdateAvailableModal';
|
|
14
15
|
import { WhiteBackNavigation, TrashIcon, SettingsIcon, CloseWhite, ClockIcon, SizeIcon, AppleIcon, AndroidIcon, NpmIcon, ResetIcon, } from '../NetworkIcons';
|
|
15
16
|
const InspectorHeader = React.memo(() => {
|
|
16
|
-
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, settingsPage, setSettingsPage, resetToDefaults, closeModal, detailTitle, activeTab, environment, visible, selectedCrash, setSelectedCrash, } = useInspector();
|
|
17
|
+
const { modalHeightPercent, appIcon, selected, setSelected, selectedEvent, setSelectedEvent, selectedLog, setSelectedLog, selectedReduxSlice, setSelectedReduxSlice, selectedReduxAction, setSelectedReduxAction, reduxState, reduxLastActionMap, showHeaderInfo, setShowHeaderInfo, updateAvailable, latestNpmVersion, clearAnim, activePulseAnim, unreadPulseAnim, runClearAllWithAnimation, settingsPage, setSettingsPage, resetToDefaults, closeModal, detailTitle, activeTab, environment, visible, selectedCrash, setSelectedCrash, deviceInfo, } = useInspector();
|
|
18
|
+
const [showUpdateModal, setShowUpdateModal] = React.useState(false);
|
|
17
19
|
const [isTelemetryActive, setIsTelemetryActive] = React.useState(false);
|
|
18
20
|
const telemetryPulseAnim = React.useRef(new Animated.Value(1)).current;
|
|
19
21
|
React.useEffect(() => {
|
|
@@ -77,7 +79,8 @@ const InspectorHeader = React.memo(() => {
|
|
|
77
79
|
const isDetailView = (activeTab === 'apis' && selected != null) ||
|
|
78
80
|
(activeTab === 'analytics' && selectedEvent != null) ||
|
|
79
81
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
80
|
-
(activeTab === 'redux' &&
|
|
82
|
+
(activeTab === 'redux' &&
|
|
83
|
+
(selectedReduxSlice != null || selectedReduxAction != null)) ||
|
|
81
84
|
(activeTab === 'crash' && selectedCrash != null);
|
|
82
85
|
const isSettingsView = settingsPage !== null;
|
|
83
86
|
const isAnySelected = isDetailView || isSettingsView;
|
|
@@ -102,7 +105,8 @@ const InspectorHeader = React.memo(() => {
|
|
|
102
105
|
}
|
|
103
106
|
}, [settingsPage]);
|
|
104
107
|
const headerTopPadding = Platform.OS === 'ios' && modalHeightPercent >= 95 ? 44 : 0;
|
|
105
|
-
return (
|
|
108
|
+
return (<>
|
|
109
|
+
<LinearGradient colors={['#4F46E5', '#7C3AED']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 1 }} style={styles.headerGradient}>
|
|
106
110
|
<View style={{ paddingTop: headerTopPadding, width: '100%' }}>
|
|
107
111
|
<View style={styles.header}>
|
|
108
112
|
<View style={[
|
|
@@ -203,7 +207,12 @@ const InspectorHeader = React.memo(() => {
|
|
|
203
207
|
}}>
|
|
204
208
|
<AppHeaderLogo size={46} customIcon={appIcon}/>
|
|
205
209
|
<View style={{ gap: 2.5, flex: 1, minWidth: 0 }}>
|
|
206
|
-
<View style={{
|
|
210
|
+
<View style={{
|
|
211
|
+
flexDirection: 'row',
|
|
212
|
+
alignItems: 'center',
|
|
213
|
+
gap: 6,
|
|
214
|
+
minWidth: 0,
|
|
215
|
+
}}>
|
|
207
216
|
<Text style={[styles.headerTitle, { flexShrink: 1 }]} numberOfLines={1} ellipsizeMode="tail">
|
|
208
217
|
{getAppName()}
|
|
209
218
|
</Text>
|
|
@@ -217,93 +226,117 @@ const InspectorHeader = React.memo(() => {
|
|
|
217
226
|
marginBottom: 0,
|
|
218
227
|
},
|
|
219
228
|
]}>
|
|
220
|
-
<Text style={[
|
|
221
|
-
styles.envBadgeText,
|
|
222
|
-
{ color: envConfig.text },
|
|
223
|
-
]}>
|
|
229
|
+
<Text style={[styles.envBadgeText, { color: envConfig.text }]}>
|
|
224
230
|
{envConfig.label}
|
|
225
231
|
</Text>
|
|
226
232
|
</View>
|
|
227
|
-
{updateAvailable && (<Pressable hitSlop={10} onPress={() =>
|
|
228
|
-
|
|
229
|
-
{
|
|
230
|
-
text: 'View on NPM',
|
|
231
|
-
onPress: () => Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { }),
|
|
232
|
-
},
|
|
233
|
-
])} style={{
|
|
233
|
+
{updateAvailable && (<Pressable hitSlop={10} onPress={() => setShowUpdateModal(true)} style={{
|
|
234
|
+
flexDirection: 'row',
|
|
234
235
|
alignItems: 'center',
|
|
235
|
-
|
|
236
|
+
backgroundColor: '#F59E0B',
|
|
237
|
+
borderRadius: 5,
|
|
238
|
+
paddingHorizontal: 5.5,
|
|
239
|
+
paddingVertical: 1.5,
|
|
240
|
+
gap: 3.5,
|
|
241
|
+
shadowColor: '#F59E0B',
|
|
242
|
+
shadowOffset: { width: 0, height: 1.5 },
|
|
243
|
+
shadowOpacity: 0.35,
|
|
244
|
+
shadowRadius: 3,
|
|
245
|
+
elevation: 3,
|
|
236
246
|
flexShrink: 0,
|
|
237
247
|
}}>
|
|
238
248
|
<Animated.View style={{
|
|
239
|
-
width:
|
|
240
|
-
height:
|
|
241
|
-
borderRadius:
|
|
242
|
-
backgroundColor:
|
|
243
|
-
borderWidth: 1,
|
|
244
|
-
borderColor: `${AppColors.white}E6`,
|
|
249
|
+
width: 5,
|
|
250
|
+
height: 5,
|
|
251
|
+
borderRadius: 2.5,
|
|
252
|
+
backgroundColor: '#FFFFFF',
|
|
245
253
|
opacity: activePulseAnim,
|
|
246
254
|
transform: [{ scale: unreadPulseAnim }],
|
|
247
255
|
}}/>
|
|
256
|
+
<Text style={{
|
|
257
|
+
fontFamily: AppFonts.interBold,
|
|
258
|
+
fontSize: 9,
|
|
259
|
+
color: '#FFFFFF',
|
|
260
|
+
letterSpacing: 0.3,
|
|
261
|
+
}}>
|
|
262
|
+
UPDATE ⚡
|
|
263
|
+
</Text>
|
|
248
264
|
</Pressable>)}
|
|
249
265
|
</View>
|
|
250
266
|
|
|
251
|
-
{/* OS & NPM Version
|
|
267
|
+
{/* OS & NPM Version Common Chip Bar */}
|
|
252
268
|
<View style={{
|
|
253
269
|
flexDirection: 'row',
|
|
254
270
|
alignItems: 'center',
|
|
255
271
|
gap: 5,
|
|
256
272
|
minWidth: 0,
|
|
257
273
|
}}>
|
|
274
|
+
{/* Unified Platform & Build Chip */}
|
|
258
275
|
<View style={{
|
|
259
276
|
flexDirection: 'row',
|
|
260
277
|
alignItems: 'center',
|
|
261
|
-
backgroundColor:
|
|
262
|
-
borderRadius:
|
|
263
|
-
paddingHorizontal: 6,
|
|
264
|
-
paddingVertical: 2,
|
|
265
|
-
gap: 4,
|
|
278
|
+
backgroundColor: 'rgba(255, 255, 255, 0.16)',
|
|
279
|
+
borderRadius: 6,
|
|
280
|
+
paddingHorizontal: 6.5,
|
|
281
|
+
paddingVertical: 2.5,
|
|
282
|
+
gap: 4.5,
|
|
266
283
|
borderWidth: 1,
|
|
267
|
-
borderColor:
|
|
284
|
+
borderColor: 'rgba(255, 255, 255, 0.28)',
|
|
268
285
|
flexShrink: 0,
|
|
269
286
|
}}>
|
|
270
|
-
{Platform.OS === 'ios' ? (<AppleIcon color=
|
|
287
|
+
{Platform.OS === 'ios' ? (<AppleIcon color="#FFFFFF" size={10.5}/>) : (<AndroidIcon color="#FFFFFF" size={10.5}/>)}
|
|
271
288
|
<Text style={{
|
|
272
|
-
fontFamily: AppFonts.
|
|
289
|
+
fontFamily: AppFonts.interBold,
|
|
273
290
|
fontSize: 9.5,
|
|
274
|
-
color:
|
|
291
|
+
color: '#FFFFFF',
|
|
275
292
|
letterSpacing: 0.1,
|
|
276
293
|
}} numberOfLines={1}>
|
|
277
294
|
{Platform.OS === 'ios'
|
|
278
|
-
? `iOS ${Platform.Version}
|
|
279
|
-
|
|
295
|
+
? `iOS ${String(deviceInfo?.osVersion || Platform.Version).replace(/^(ios\s*)+/i, '').trim()}${deviceInfo?.buildNumber || deviceInfo?.appVersion
|
|
296
|
+
? ` (${deviceInfo.buildNumber || deviceInfo.appVersion})`
|
|
297
|
+
: ''}`
|
|
298
|
+
: `Android ${String(deviceInfo?.osVersion || Platform.Version).replace(/^(android\s*)+/i, '').trim()}${deviceInfo?.buildNumber || deviceInfo?.appVersion
|
|
299
|
+
? ` (${deviceInfo.buildNumber || deviceInfo.appVersion})`
|
|
300
|
+
: ''}`}
|
|
280
301
|
</Text>
|
|
281
302
|
</View>
|
|
282
303
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
304
|
+
{/* Unified NPM Version Chip */}
|
|
305
|
+
<Pressable onPress={() => {
|
|
306
|
+
if (updateAvailable) {
|
|
307
|
+
setShowUpdateModal(true);
|
|
308
|
+
}
|
|
309
|
+
else {
|
|
310
|
+
Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { });
|
|
311
|
+
}
|
|
312
|
+
}} style={{
|
|
313
|
+
backgroundColor: 'rgba(255, 255, 255, 0.16)',
|
|
314
|
+
borderRadius: 6,
|
|
315
|
+
paddingHorizontal: 6.5,
|
|
316
|
+
paddingVertical: 2.5,
|
|
288
317
|
flexDirection: 'row',
|
|
289
318
|
alignItems: 'center',
|
|
290
319
|
gap: 4,
|
|
320
|
+
borderWidth: 1,
|
|
321
|
+
borderColor: 'rgba(255, 255, 255, 0.28)',
|
|
291
322
|
flexShrink: 0,
|
|
292
|
-
shadowColor: '#000000',
|
|
293
|
-
shadowOffset: { width: 0, height: 1 },
|
|
294
|
-
shadowOpacity: 0.15,
|
|
295
|
-
shadowRadius: 2,
|
|
296
|
-
elevation: 2,
|
|
297
323
|
}}>
|
|
298
|
-
<NpmIcon size={11} color="#
|
|
324
|
+
<NpmIcon size={11} color="#FF6B6B"/>
|
|
299
325
|
<Text style={{
|
|
300
326
|
fontFamily: AppFonts.interBold,
|
|
301
327
|
fontSize: 9.5,
|
|
302
|
-
color: '#
|
|
303
|
-
letterSpacing: 0.
|
|
328
|
+
color: '#FFFFFF',
|
|
329
|
+
letterSpacing: 0.15,
|
|
304
330
|
}} numberOfLines={1}>
|
|
305
331
|
v{LIB_VERSION}
|
|
306
332
|
</Text>
|
|
333
|
+
{updateAvailable && (<Text style={{
|
|
334
|
+
fontFamily: AppFonts.interBold,
|
|
335
|
+
fontSize: 9,
|
|
336
|
+
color: '#F59E0B',
|
|
337
|
+
}}>
|
|
338
|
+
↑
|
|
339
|
+
</Text>)}
|
|
307
340
|
</Pressable>
|
|
308
341
|
|
|
309
342
|
{isTelemetryActive && (<Pressable onPress={() => Alert.alert('Anonymous Telemetry Active', 'Anonymous diagnostics (such as React Native version, JavaScript engine, and device model) are currently enabled to help improve library tooling.\n\nNo user data or network payloads are captured. You can toggle this anytime in Settings.', [{ text: 'Got it' }])} style={{
|
|
@@ -444,9 +477,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
444
477
|
},
|
|
445
478
|
]}>
|
|
446
479
|
<Text style={styles.headerMethodText}>
|
|
447
|
-
{selectedEvent.source === 'firebase'
|
|
448
|
-
? 'FB'
|
|
449
|
-
: 'MAN'}
|
|
480
|
+
{selectedEvent.source === 'firebase' ? 'FB' : 'MAN'}
|
|
450
481
|
</Text>
|
|
451
482
|
</View>
|
|
452
483
|
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
@@ -489,9 +520,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
489
520
|
</View>
|
|
490
521
|
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
491
522
|
console.
|
|
492
|
-
{
|
|
493
|
-
selectedLog.type ||
|
|
494
|
-
'log'}
|
|
523
|
+
{selectedLog.sourceMethod || selectedLog.type || 'log'}
|
|
495
524
|
</Text>
|
|
496
525
|
</View>
|
|
497
526
|
<View style={styles.headerDetailSubRow}>
|
|
@@ -504,10 +533,10 @@ const InspectorHeader = React.memo(() => {
|
|
|
504
533
|
borderRadius: 20,
|
|
505
534
|
backgroundColor: `${AppColors.white}29`,
|
|
506
535
|
}}>
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
536
|
+
<ClockIcon color={AppColors.white} size={11}/>
|
|
537
|
+
<Text style={styles.headerSubTitle}>
|
|
538
|
+
{formatTime(selectedLog.timestamp)}
|
|
539
|
+
</Text>
|
|
511
540
|
</View>
|
|
512
541
|
</View>
|
|
513
542
|
</View>) : activeTab === 'redux' && selectedReduxSlice != null ? ((() => {
|
|
@@ -527,9 +556,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
527
556
|
backgroundColor: `${AppColors.purple}4D`,
|
|
528
557
|
},
|
|
529
558
|
]}>
|
|
530
|
-
<Text style={styles.headerMethodText}>
|
|
531
|
-
SLICE
|
|
532
|
-
</Text>
|
|
559
|
+
<Text style={styles.headerMethodText}>SLICE</Text>
|
|
533
560
|
</View>
|
|
534
561
|
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
535
562
|
{selectedReduxSlice}
|
|
@@ -540,20 +567,26 @@ const InspectorHeader = React.memo(() => {
|
|
|
540
567
|
styles.headerStatusDot,
|
|
541
568
|
{ backgroundColor: AppColors.liveGreen },
|
|
542
569
|
]}/>
|
|
543
|
-
<Text style={styles.headerSubTitle}>
|
|
544
|
-
|
|
570
|
+
<Text style={styles.headerSubTitle}>Live</Text>
|
|
571
|
+
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}>
|
|
572
|
+
•
|
|
545
573
|
</Text>
|
|
546
|
-
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}>•</Text>
|
|
547
574
|
<Text style={styles.headerSubTitle}>
|
|
548
575
|
{keyCount} keys
|
|
549
576
|
</Text>
|
|
550
|
-
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}
|
|
551
|
-
|
|
552
|
-
{sliceSize}
|
|
577
|
+
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}>
|
|
578
|
+
•
|
|
553
579
|
</Text>
|
|
580
|
+
<Text style={styles.headerSubTitle}>{sliceSize}</Text>
|
|
554
581
|
{lastAction?.timestamp && (<>
|
|
555
|
-
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}
|
|
556
|
-
|
|
582
|
+
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}>
|
|
583
|
+
•
|
|
584
|
+
</Text>
|
|
585
|
+
<View style={{
|
|
586
|
+
flexDirection: 'row',
|
|
587
|
+
alignItems: 'center',
|
|
588
|
+
gap: 3,
|
|
589
|
+
}}>
|
|
557
590
|
<ClockIcon color={AppColors.white} size={10}/>
|
|
558
591
|
<Text style={styles.headerSubTitle}>
|
|
559
592
|
{lastAction.timestamp}
|
|
@@ -570,9 +603,7 @@ const InspectorHeader = React.memo(() => {
|
|
|
570
603
|
backgroundColor: `${AppColors.brandPurple}4D`,
|
|
571
604
|
},
|
|
572
605
|
]}>
|
|
573
|
-
<Text style={styles.headerMethodText}>
|
|
574
|
-
ACTION
|
|
575
|
-
</Text>
|
|
606
|
+
<Text style={styles.headerMethodText}>ACTION</Text>
|
|
576
607
|
</View>
|
|
577
608
|
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
578
609
|
{selectedReduxAction.type}
|
|
@@ -598,7 +629,9 @@ const InspectorHeader = React.memo(() => {
|
|
|
598
629
|
},
|
|
599
630
|
]}>
|
|
600
631
|
<Text style={styles.headerMethodText}>
|
|
601
|
-
{selectedCrash.isFatal
|
|
632
|
+
{selectedCrash.isFatal
|
|
633
|
+
? 'FATAL'
|
|
634
|
+
: selectedCrash.type.toUpperCase()}
|
|
602
635
|
</Text>
|
|
603
636
|
</View>
|
|
604
637
|
<Text style={styles.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
@@ -615,10 +648,13 @@ const InspectorHeader = React.memo(() => {
|
|
|
615
648
|
},
|
|
616
649
|
]}/>
|
|
617
650
|
<Text style={styles.headerSubTitle}>
|
|
618
|
-
{selectedCrash.timeStr ||
|
|
651
|
+
{selectedCrash.timeStr ||
|
|
652
|
+
new Date(selectedCrash.timestamp).toLocaleTimeString()}
|
|
619
653
|
</Text>
|
|
620
654
|
{selectedCrash.deviceInfo?.platform && (<>
|
|
621
|
-
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}
|
|
655
|
+
<Text style={[styles.headerSubTitle, { opacity: 0.6 }]}>
|
|
656
|
+
•
|
|
657
|
+
</Text>
|
|
622
658
|
<Text style={styles.headerSubTitle}>
|
|
623
659
|
{selectedCrash.deviceInfo.platform.toUpperCase()}
|
|
624
660
|
</Text>
|
|
@@ -690,6 +726,10 @@ const InspectorHeader = React.memo(() => {
|
|
|
690
726
|
</View>
|
|
691
727
|
</View>
|
|
692
728
|
</View>
|
|
693
|
-
</LinearGradient>
|
|
729
|
+
</LinearGradient>
|
|
730
|
+
|
|
731
|
+
{/* Dedicated Update Available Details Modal */}
|
|
732
|
+
<UpdateAvailableModal visible={showUpdateModal} latestVersion={latestNpmVersion} onClose={() => setShowUpdateModal(false)}/>
|
|
733
|
+
</>);
|
|
694
734
|
});
|
|
695
735
|
export default InspectorHeader;
|
|
@@ -17,6 +17,9 @@ import BundleTab from './BundleTab';
|
|
|
17
17
|
import PerformanceTab from './PerformanceTab';
|
|
18
18
|
import CrashTab from './CrashTab';
|
|
19
19
|
import CrashDetail from './CrashDetail';
|
|
20
|
+
import StorageTab from './StorageTab';
|
|
21
|
+
import DeviceTab from './DeviceTab';
|
|
22
|
+
import AuditTab from './AuditTab';
|
|
20
23
|
import SettingsPanel from './SettingsPanel';
|
|
21
24
|
import TelemetryConsentModal from './TelemetryConsentModal';
|
|
22
25
|
import NpmUpdateToast from './NpmUpdateToast';
|
|
@@ -24,8 +27,9 @@ import Toast from '../Toast';
|
|
|
24
27
|
import styles from '../../styles';
|
|
25
28
|
import { AppColors } from '../../styles/AppColors';
|
|
26
29
|
import NavigationTracker from './NavigationTracker';
|
|
30
|
+
import PerformanceHud from './PerformanceHud';
|
|
27
31
|
const MainScreen = () => {
|
|
28
|
-
const { visible, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, activeTab, isReady, isEnabled, useNativeFab, hasNavigationContext, setNavState, } = useInspector();
|
|
32
|
+
const { visible, setVisible, switchActiveTab, modalAnimationType, closeModal, modalHeightPercent, selected, selectedEvent, selectedLog, selectedReduxSlice, selectedReduxAction, selectedCrash, settingsPage, activeTab, isReady, isEnabled, isPerformanceHudEnabled, useNativeFab, hasNavigationContext, setNavState, } = useInspector();
|
|
29
33
|
const isDetailActive = (activeTab === 'apis' && selected != null) ||
|
|
30
34
|
(activeTab === 'analytics' && selectedEvent != null) ||
|
|
31
35
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
@@ -66,9 +70,16 @@ const MainScreen = () => {
|
|
|
66
70
|
}).start();
|
|
67
71
|
}, [activeTab]);
|
|
68
72
|
return (<>
|
|
69
|
-
|
|
73
|
+
<View pointerEvents="box-none" style={StyleSheet.absoluteFillObject}>
|
|
74
|
+
{(Platform.OS === 'ios' || Platform.OS === 'android') &&
|
|
70
75
|
isEnabled &&
|
|
76
|
+
!visible &&
|
|
71
77
|
!useNativeFab && <FabLauncher />}
|
|
78
|
+
{isEnabled && !visible && isPerformanceHudEnabled && (<PerformanceHud visible={true} onPress={() => {
|
|
79
|
+
setVisible(true);
|
|
80
|
+
switchActiveTab('performance');
|
|
81
|
+
}}/>)}
|
|
82
|
+
</View>
|
|
72
83
|
<Modal visible={visible} animationType={modalAnimationType} transparent statusBarTranslucent={true}>
|
|
73
84
|
{visible && (<ErrorBoundary onClose={closeModal}>
|
|
74
85
|
<View style={styles.modalBackdrop}>
|
|
@@ -112,6 +123,9 @@ const MainScreen = () => {
|
|
|
112
123
|
{activeTab === 'logs' && <ConsoleTab />}
|
|
113
124
|
{activeTab === 'analytics' && <AnalyticsTab />}
|
|
114
125
|
{activeTab === 'redux' && <ReduxTab />}
|
|
126
|
+
{activeTab === 'storage' && <StorageTab />}
|
|
127
|
+
{activeTab === 'device' && <DeviceTab />}
|
|
128
|
+
{activeTab === 'audit' && <AuditTab />}
|
|
115
129
|
{activeTab === 'bundle' && <BundleTab />}
|
|
116
130
|
{activeTab === 'performance' && <PerformanceTab />}
|
|
117
131
|
{activeTab === 'crash' && <CrashTab />}
|
|
@@ -16,9 +16,11 @@ import { AppColors } from '../../styles/AppColors';
|
|
|
16
16
|
import { AppFonts } from '../../styles/AppFonts';
|
|
17
17
|
import { METHOD_COLORS } from '../../constants';
|
|
18
18
|
import { getStatusColor, getSize, formatDateTime, getFetchCommand, getCurlCommand, } from '../../helpers';
|
|
19
|
-
import { FailIcon, StatusIcon, HeadersIcon, RequestIcon, ResponseIcon, DownloadIcon, ClearIcon, SizeIcon, ExternalLinkIcon, ClockIcon, } from '../NetworkIcons';
|
|
19
|
+
import { FailIcon, StatusIcon, HeadersIcon, RequestIcon, ResponseIcon, DownloadIcon, ClearIcon, SizeIcon, ExternalLinkIcon, ClockIcon, ReplayIcon, } from '../NetworkIcons';
|
|
20
|
+
import RequestReplayView from './RequestReplayView';
|
|
20
21
|
const NetworkDetail = React.memo(() => {
|
|
21
22
|
const { t } = useTranslation();
|
|
23
|
+
const [isReplayScreenActive, setIsReplayScreenActive] = React.useState(false);
|
|
22
24
|
const { selected, detailDisplayUrl, apiDetailActiveTab, setApiDetailActiveTab, detailSearch, setDetailSearch, reqExpanded, setReqExpanded, resExpanded, setResExpanded, showReqDiff, setShowReqDiff, showResDiff, setShowResDiff, prevRequestData, prevResponseData, logRouteMapRef, } = useInspector();
|
|
23
25
|
const handleOpenUrl = () => {
|
|
24
26
|
Alert.alert(t('common.openInBrowser') || 'Open in Browser', `${t('common.openInBrowserPrompt') || 'Are you sure you want to open this URL in your external browser?'}\n\n${detailDisplayUrl}`, [
|
|
@@ -42,6 +44,9 @@ const NetworkDetail = React.memo(() => {
|
|
|
42
44
|
};
|
|
43
45
|
if (!selected)
|
|
44
46
|
return null;
|
|
47
|
+
if (isReplayScreenActive) {
|
|
48
|
+
return (<RequestReplayView request={selected} onBack={() => setIsReplayScreenActive(false)}/>);
|
|
49
|
+
}
|
|
45
50
|
return (<View style={{ flex: 1 }}>
|
|
46
51
|
{/* Non-scrollable details header */}
|
|
47
52
|
<View style={{ paddingHorizontal: 6, paddingTop: 4 }}>
|
|
@@ -247,6 +252,16 @@ const NetworkDetail = React.memo(() => {
|
|
|
247
252
|
</View>
|
|
248
253
|
|
|
249
254
|
<View style={styles.detailInfoRight}>
|
|
255
|
+
<TouchableScale style={[
|
|
256
|
+
styles.iconSquareBtn,
|
|
257
|
+
{
|
|
258
|
+
backgroundColor: `${AppColors.purple}15`,
|
|
259
|
+
borderColor: `${AppColors.purple}30`,
|
|
260
|
+
borderWidth: 1,
|
|
261
|
+
},
|
|
262
|
+
]} onPress={() => setIsReplayScreenActive(true)} accessible={true} accessibilityRole="button" accessibilityLabel="Edit & Resend Request" hitSlop={12}>
|
|
263
|
+
<ReplayIcon color={AppColors.purple} size={14}/>
|
|
264
|
+
</TouchableScale>
|
|
250
265
|
<TouchableScale style={[styles.iconSquareBtn, { backgroundColor: `${AppColors.sky600}15` }]} onPress={handleOpenUrl} hitSlop={12}>
|
|
251
266
|
<ExternalLinkIcon color={AppColors.sky600} size={14}/>
|
|
252
267
|
</TouchableScale>
|