react-native-inapp-inspector 2.0.4 → 2.0.5
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/dist/commonjs/components/Inspector/InspectorHeader.js +87 -50
- package/dist/commonjs/components/Inspector/MainScreen.js +1 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +317 -12
- package/dist/commonjs/components/Inspector/NpmUpdateToast.js +88 -39
- package/dist/commonjs/components/Inspector/SettingsPanel.js +525 -359
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.d.ts +8 -0
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +469 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- 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/index.js +58 -7
- package/dist/commonjs/types/interfaces.d.ts +9 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +87 -50
- package/dist/esm/components/Inspector/MainScreen.js +1 -0
- package/dist/esm/components/Inspector/NetworkTab.js +317 -12
- package/dist/esm/components/Inspector/NpmUpdateToast.js +88 -39
- package/dist/esm/components/Inspector/SettingsPanel.js +526 -360
- package/dist/esm/components/Inspector/UpdateAvailableModal.d.ts +8 -0
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +432 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- 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/index.js +58 -7
- package/dist/esm/types/interfaces.d.ts +9 -0
- package/package.json +1 -1
|
@@ -49,9 +49,11 @@ const constants_1 = require("../../constants");
|
|
|
49
49
|
const constants_2 = require("../../constants");
|
|
50
50
|
const helpers_1 = require("../../helpers");
|
|
51
51
|
const telemetry_1 = require("../../helpers/telemetry");
|
|
52
|
+
const UpdateAvailableModal_1 = require("./UpdateAvailableModal");
|
|
52
53
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
53
54
|
const InspectorHeader = react_1.default.memo(() => {
|
|
54
55
|
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, } = (0, InspectorContext_1.useInspector)();
|
|
56
|
+
const [showUpdateModal, setShowUpdateModal] = react_1.default.useState(false);
|
|
55
57
|
const [isTelemetryActive, setIsTelemetryActive] = react_1.default.useState(false);
|
|
56
58
|
const telemetryPulseAnim = react_1.default.useRef(new react_native_1.Animated.Value(1)).current;
|
|
57
59
|
react_1.default.useEffect(() => {
|
|
@@ -115,7 +117,8 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
115
117
|
const isDetailView = (activeTab === 'apis' && selected != null) ||
|
|
116
118
|
(activeTab === 'analytics' && selectedEvent != null) ||
|
|
117
119
|
(activeTab === 'logs' && selectedLog != null) ||
|
|
118
|
-
(activeTab === 'redux' &&
|
|
120
|
+
(activeTab === 'redux' &&
|
|
121
|
+
(selectedReduxSlice != null || selectedReduxAction != null)) ||
|
|
119
122
|
(activeTab === 'crash' && selectedCrash != null);
|
|
120
123
|
const isSettingsView = settingsPage !== null;
|
|
121
124
|
const isAnySelected = isDetailView || isSettingsView;
|
|
@@ -140,7 +143,8 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
140
143
|
}
|
|
141
144
|
}, [settingsPage]);
|
|
142
145
|
const headerTopPadding = react_native_1.Platform.OS === 'ios' && modalHeightPercent >= 95 ? 44 : 0;
|
|
143
|
-
return (
|
|
146
|
+
return (<>
|
|
147
|
+
<react_native_linear_gradient_1.default colors={['#4F46E5', '#7C3AED']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 1 }} style={styles_1.default.headerGradient}>
|
|
144
148
|
<react_native_1.View style={{ paddingTop: headerTopPadding, width: '100%' }}>
|
|
145
149
|
<react_native_1.View style={styles_1.default.header}>
|
|
146
150
|
<react_native_1.View style={[
|
|
@@ -241,7 +245,12 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
241
245
|
}}>
|
|
242
246
|
<AppHeaderLogo_1.default size={46} customIcon={appIcon}/>
|
|
243
247
|
<react_native_1.View style={{ gap: 2.5, flex: 1, minWidth: 0 }}>
|
|
244
|
-
<react_native_1.View style={{
|
|
248
|
+
<react_native_1.View style={{
|
|
249
|
+
flexDirection: 'row',
|
|
250
|
+
alignItems: 'center',
|
|
251
|
+
gap: 6,
|
|
252
|
+
minWidth: 0,
|
|
253
|
+
}}>
|
|
245
254
|
<react_native_1.Text style={[styles_1.default.headerTitle, { flexShrink: 1 }]} numberOfLines={1} ellipsizeMode="tail">
|
|
246
255
|
{(0, helpers_1.getAppName)()}
|
|
247
256
|
</react_native_1.Text>
|
|
@@ -255,34 +264,41 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
255
264
|
marginBottom: 0,
|
|
256
265
|
},
|
|
257
266
|
]}>
|
|
258
|
-
<react_native_1.Text style={[
|
|
259
|
-
styles_1.default.envBadgeText,
|
|
260
|
-
{ color: envConfig.text },
|
|
261
|
-
]}>
|
|
267
|
+
<react_native_1.Text style={[styles_1.default.envBadgeText, { color: envConfig.text }]}>
|
|
262
268
|
{envConfig.label}
|
|
263
269
|
</react_native_1.Text>
|
|
264
270
|
</react_native_1.View>
|
|
265
|
-
{updateAvailable && (<react_native_1.Pressable hitSlop={10} onPress={() =>
|
|
266
|
-
|
|
267
|
-
{
|
|
268
|
-
text: 'View on NPM',
|
|
269
|
-
onPress: () => react_native_1.Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { }),
|
|
270
|
-
},
|
|
271
|
-
])} style={{
|
|
271
|
+
{updateAvailable && (<react_native_1.Pressable hitSlop={10} onPress={() => setShowUpdateModal(true)} style={{
|
|
272
|
+
flexDirection: 'row',
|
|
272
273
|
alignItems: 'center',
|
|
273
|
-
|
|
274
|
+
backgroundColor: '#F59E0B',
|
|
275
|
+
borderRadius: 5,
|
|
276
|
+
paddingHorizontal: 5.5,
|
|
277
|
+
paddingVertical: 1.5,
|
|
278
|
+
gap: 3.5,
|
|
279
|
+
shadowColor: '#F59E0B',
|
|
280
|
+
shadowOffset: { width: 0, height: 1.5 },
|
|
281
|
+
shadowOpacity: 0.35,
|
|
282
|
+
shadowRadius: 3,
|
|
283
|
+
elevation: 3,
|
|
274
284
|
flexShrink: 0,
|
|
275
285
|
}}>
|
|
276
286
|
<react_native_1.Animated.View style={{
|
|
277
|
-
width:
|
|
278
|
-
height:
|
|
279
|
-
borderRadius:
|
|
280
|
-
backgroundColor:
|
|
281
|
-
borderWidth: 1,
|
|
282
|
-
borderColor: `${AppColors_1.AppColors.white}E6`,
|
|
287
|
+
width: 5,
|
|
288
|
+
height: 5,
|
|
289
|
+
borderRadius: 2.5,
|
|
290
|
+
backgroundColor: '#FFFFFF',
|
|
283
291
|
opacity: activePulseAnim,
|
|
284
292
|
transform: [{ scale: unreadPulseAnim }],
|
|
285
293
|
}}/>
|
|
294
|
+
<react_native_1.Text style={{
|
|
295
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
296
|
+
fontSize: 9,
|
|
297
|
+
color: '#FFFFFF',
|
|
298
|
+
letterSpacing: 0.3,
|
|
299
|
+
}}>
|
|
300
|
+
UPDATE ⚡
|
|
301
|
+
</react_native_1.Text>
|
|
286
302
|
</react_native_1.Pressable>)}
|
|
287
303
|
</react_native_1.View>
|
|
288
304
|
|
|
@@ -318,7 +334,14 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
318
334
|
</react_native_1.Text>
|
|
319
335
|
</react_native_1.View>
|
|
320
336
|
|
|
321
|
-
<react_native_1.Pressable onPress={() =>
|
|
337
|
+
<react_native_1.Pressable onPress={() => {
|
|
338
|
+
if (updateAvailable) {
|
|
339
|
+
setShowUpdateModal(true);
|
|
340
|
+
}
|
|
341
|
+
else {
|
|
342
|
+
react_native_1.Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { });
|
|
343
|
+
}
|
|
344
|
+
}} style={{
|
|
322
345
|
backgroundColor: '#FFFFFF',
|
|
323
346
|
borderRadius: 5,
|
|
324
347
|
paddingHorizontal: 6,
|
|
@@ -342,6 +365,13 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
342
365
|
}} numberOfLines={1}>
|
|
343
366
|
v{constants_2.LIB_VERSION}
|
|
344
367
|
</react_native_1.Text>
|
|
368
|
+
{updateAvailable && (<react_native_1.Text style={{
|
|
369
|
+
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
370
|
+
fontSize: 9,
|
|
371
|
+
color: '#F59E0B',
|
|
372
|
+
}}>
|
|
373
|
+
↑
|
|
374
|
+
</react_native_1.Text>)}
|
|
345
375
|
</react_native_1.Pressable>
|
|
346
376
|
|
|
347
377
|
{isTelemetryActive && (<react_native_1.Pressable onPress={() => react_native_1.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={{
|
|
@@ -482,9 +512,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
482
512
|
},
|
|
483
513
|
]}>
|
|
484
514
|
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
485
|
-
{selectedEvent.source === 'firebase'
|
|
486
|
-
? 'FB'
|
|
487
|
-
: 'MAN'}
|
|
515
|
+
{selectedEvent.source === 'firebase' ? 'FB' : 'MAN'}
|
|
488
516
|
</react_native_1.Text>
|
|
489
517
|
</react_native_1.View>
|
|
490
518
|
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
@@ -527,9 +555,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
527
555
|
</react_native_1.View>
|
|
528
556
|
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
529
557
|
console.
|
|
530
|
-
{
|
|
531
|
-
selectedLog.type ||
|
|
532
|
-
'log'}
|
|
558
|
+
{selectedLog.sourceMethod || selectedLog.type || 'log'}
|
|
533
559
|
</react_native_1.Text>
|
|
534
560
|
</react_native_1.View>
|
|
535
561
|
<react_native_1.View style={styles_1.default.headerDetailSubRow}>
|
|
@@ -542,10 +568,10 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
542
568
|
borderRadius: 20,
|
|
543
569
|
backgroundColor: `${AppColors_1.AppColors.white}29`,
|
|
544
570
|
}}>
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
571
|
+
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.white} size={11}/>
|
|
572
|
+
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
573
|
+
{(0, helpers_1.formatTime)(selectedLog.timestamp)}
|
|
574
|
+
</react_native_1.Text>
|
|
549
575
|
</react_native_1.View>
|
|
550
576
|
</react_native_1.View>
|
|
551
577
|
</react_native_1.View>) : activeTab === 'redux' && selectedReduxSlice != null ? ((() => {
|
|
@@ -565,9 +591,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
565
591
|
backgroundColor: `${AppColors_1.AppColors.purple}4D`,
|
|
566
592
|
},
|
|
567
593
|
]}>
|
|
568
|
-
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
569
|
-
SLICE
|
|
570
|
-
</react_native_1.Text>
|
|
594
|
+
<react_native_1.Text style={styles_1.default.headerMethodText}>SLICE</react_native_1.Text>
|
|
571
595
|
</react_native_1.View>
|
|
572
596
|
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
573
597
|
{selectedReduxSlice}
|
|
@@ -578,20 +602,26 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
578
602
|
styles_1.default.headerStatusDot,
|
|
579
603
|
{ backgroundColor: AppColors_1.AppColors.liveGreen },
|
|
580
604
|
]}/>
|
|
581
|
-
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
582
|
-
|
|
605
|
+
<react_native_1.Text style={styles_1.default.headerSubTitle}>Live</react_native_1.Text>
|
|
606
|
+
<react_native_1.Text style={[styles_1.default.headerSubTitle, { opacity: 0.6 }]}>
|
|
607
|
+
•
|
|
583
608
|
</react_native_1.Text>
|
|
584
|
-
<react_native_1.Text style={[styles_1.default.headerSubTitle, { opacity: 0.6 }]}>•</react_native_1.Text>
|
|
585
609
|
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
586
610
|
{keyCount} keys
|
|
587
611
|
</react_native_1.Text>
|
|
588
|
-
<react_native_1.Text style={[styles_1.default.headerSubTitle, { opacity: 0.6 }]}
|
|
589
|
-
|
|
590
|
-
{sliceSize}
|
|
612
|
+
<react_native_1.Text style={[styles_1.default.headerSubTitle, { opacity: 0.6 }]}>
|
|
613
|
+
•
|
|
591
614
|
</react_native_1.Text>
|
|
615
|
+
<react_native_1.Text style={styles_1.default.headerSubTitle}>{sliceSize}</react_native_1.Text>
|
|
592
616
|
{lastAction?.timestamp && (<>
|
|
593
|
-
<react_native_1.Text style={[styles_1.default.headerSubTitle, { opacity: 0.6 }]}
|
|
594
|
-
|
|
617
|
+
<react_native_1.Text style={[styles_1.default.headerSubTitle, { opacity: 0.6 }]}>
|
|
618
|
+
•
|
|
619
|
+
</react_native_1.Text>
|
|
620
|
+
<react_native_1.View style={{
|
|
621
|
+
flexDirection: 'row',
|
|
622
|
+
alignItems: 'center',
|
|
623
|
+
gap: 3,
|
|
624
|
+
}}>
|
|
595
625
|
<NetworkIcons_1.ClockIcon color={AppColors_1.AppColors.white} size={10}/>
|
|
596
626
|
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
597
627
|
{lastAction.timestamp}
|
|
@@ -608,9 +638,7 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
608
638
|
backgroundColor: `${AppColors_1.AppColors.brandPurple}4D`,
|
|
609
639
|
},
|
|
610
640
|
]}>
|
|
611
|
-
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
612
|
-
ACTION
|
|
613
|
-
</react_native_1.Text>
|
|
641
|
+
<react_native_1.Text style={styles_1.default.headerMethodText}>ACTION</react_native_1.Text>
|
|
614
642
|
</react_native_1.View>
|
|
615
643
|
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
616
644
|
{selectedReduxAction.type}
|
|
@@ -636,7 +664,9 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
636
664
|
},
|
|
637
665
|
]}>
|
|
638
666
|
<react_native_1.Text style={styles_1.default.headerMethodText}>
|
|
639
|
-
{selectedCrash.isFatal
|
|
667
|
+
{selectedCrash.isFatal
|
|
668
|
+
? 'FATAL'
|
|
669
|
+
: selectedCrash.type.toUpperCase()}
|
|
640
670
|
</react_native_1.Text>
|
|
641
671
|
</react_native_1.View>
|
|
642
672
|
<react_native_1.Text style={styles_1.default.headerDetailTitle} numberOfLines={1} ellipsizeMode="middle">
|
|
@@ -653,10 +683,13 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
653
683
|
},
|
|
654
684
|
]}/>
|
|
655
685
|
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
656
|
-
{selectedCrash.timeStr ||
|
|
686
|
+
{selectedCrash.timeStr ||
|
|
687
|
+
new Date(selectedCrash.timestamp).toLocaleTimeString()}
|
|
657
688
|
</react_native_1.Text>
|
|
658
689
|
{selectedCrash.deviceInfo?.platform && (<>
|
|
659
|
-
<react_native_1.Text style={[styles_1.default.headerSubTitle, { opacity: 0.6 }]}
|
|
690
|
+
<react_native_1.Text style={[styles_1.default.headerSubTitle, { opacity: 0.6 }]}>
|
|
691
|
+
•
|
|
692
|
+
</react_native_1.Text>
|
|
660
693
|
<react_native_1.Text style={styles_1.default.headerSubTitle}>
|
|
661
694
|
{selectedCrash.deviceInfo.platform.toUpperCase()}
|
|
662
695
|
</react_native_1.Text>
|
|
@@ -728,6 +761,10 @@ const InspectorHeader = react_1.default.memo(() => {
|
|
|
728
761
|
</react_native_1.View>
|
|
729
762
|
</react_native_1.View>
|
|
730
763
|
</react_native_1.View>
|
|
731
|
-
</react_native_linear_gradient_1.default>
|
|
764
|
+
</react_native_linear_gradient_1.default>
|
|
765
|
+
|
|
766
|
+
{/* Dedicated Update Available Details Modal */}
|
|
767
|
+
<UpdateAvailableModal_1.UpdateAvailableModal visible={showUpdateModal} latestVersion={latestNpmVersion} onClose={() => setShowUpdateModal(false)}/>
|
|
768
|
+
</>);
|
|
732
769
|
});
|
|
733
770
|
exports.default = InspectorHeader;
|
|
@@ -106,6 +106,7 @@ const MainScreen = () => {
|
|
|
106
106
|
return (<>
|
|
107
107
|
{(react_native_1.Platform.OS === 'ios' || react_native_1.Platform.OS === 'android') &&
|
|
108
108
|
isEnabled &&
|
|
109
|
+
!visible &&
|
|
109
110
|
!useNativeFab && <FabLauncher_1.default />}
|
|
110
111
|
<react_native_1.Modal visible={visible} animationType={modalAnimationType} transparent statusBarTranslucent={true}>
|
|
111
112
|
{visible && (<ErrorBoundary_1.default onClose={closeModal}>
|