react-native-inapp-inspector 1.1.29 → 1.1.31
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/dist/commonjs/components/AnalyticsDetail.js +668 -108
- package/dist/commonjs/components/AppHeaderLogo.js +5 -2
- package/dist/commonjs/components/ConsoleLogCard.js +81 -59
- package/dist/commonjs/components/DomainHeader.js +21 -17
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +297 -200
- package/dist/commonjs/components/Inspector/ConsoleTab.js +162 -56
- package/dist/commonjs/components/Inspector/InspectorHeader.js +56 -119
- package/dist/commonjs/components/Inspector/LogDetail.js +45 -12
- package/dist/commonjs/components/Inspector/NetworkTab.js +4 -1
- package/dist/commonjs/components/Inspector/ReduxDetail.js +237 -42
- package/dist/commonjs/components/Inspector/ReduxTab.js +456 -35
- package/dist/commonjs/components/JsonViewer.js +1 -1
- package/dist/commonjs/components/NetworkIcons.js +19 -10
- package/dist/commonjs/components/TreeNode.js +12 -2
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/reduxLogger.js +128 -5
- package/dist/commonjs/helpers/index.d.ts +1 -1
- package/dist/commonjs/helpers/index.js +32 -16
- package/dist/commonjs/i18n/locales/en.json +45 -2
- package/dist/commonjs/styles/AppColors.d.ts +6 -0
- package/dist/commonjs/styles/AppColors.js +6 -0
- package/dist/commonjs/styles/index.d.ts +22 -1
- package/dist/commonjs/styles/index.js +25 -4
- package/dist/commonjs/types/interfaces.d.ts +7 -0
- package/dist/esm/components/AnalyticsDetail.js +670 -110
- package/dist/esm/components/AppHeaderLogo.js +5 -2
- package/dist/esm/components/ConsoleLogCard.js +81 -59
- package/dist/esm/components/DomainHeader.js +21 -17
- package/dist/esm/components/Inspector/AnalyticsTab.js +298 -201
- package/dist/esm/components/Inspector/ConsoleTab.js +163 -57
- package/dist/esm/components/Inspector/InspectorHeader.js +57 -120
- package/dist/esm/components/Inspector/LogDetail.js +45 -12
- package/dist/esm/components/Inspector/NetworkTab.js +4 -1
- package/dist/esm/components/Inspector/ReduxDetail.js +239 -44
- package/dist/esm/components/Inspector/ReduxTab.js +458 -37
- package/dist/esm/components/JsonViewer.js +1 -1
- package/dist/esm/components/NetworkIcons.js +19 -10
- package/dist/esm/components/TreeNode.js +12 -2
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/reduxLogger.js +128 -5
- package/dist/esm/helpers/index.d.ts +1 -1
- package/dist/esm/helpers/index.js +32 -16
- package/dist/esm/i18n/locales/en.json +45 -2
- package/dist/esm/styles/AppColors.d.ts +6 -0
- package/dist/esm/styles/AppColors.js +6 -0
- package/dist/esm/styles/index.d.ts +22 -1
- package/dist/esm/styles/index.js +25 -4
- package/dist/esm/types/interfaces.d.ts +7 -0
- package/package.json +11 -11
|
@@ -69,14 +69,17 @@ const logoStyles = react_native_1.StyleSheet.create({
|
|
|
69
69
|
container: {
|
|
70
70
|
borderRadius: 10,
|
|
71
71
|
overflow: 'hidden',
|
|
72
|
-
backgroundColor: '
|
|
72
|
+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
73
|
+
borderWidth: 1,
|
|
74
|
+
borderColor: 'rgba(255, 255, 255, 0.28)',
|
|
75
|
+
padding: 2.5,
|
|
73
76
|
alignItems: 'center',
|
|
74
77
|
justifyContent: 'center',
|
|
75
78
|
},
|
|
76
79
|
image: {
|
|
77
80
|
width: '100%',
|
|
78
81
|
height: '100%',
|
|
79
|
-
borderRadius:
|
|
82
|
+
borderRadius: 7.5,
|
|
80
83
|
},
|
|
81
84
|
});
|
|
82
85
|
exports.default = exports.AppHeaderLogo;
|
|
@@ -26,37 +26,37 @@ const getLogMessageWithBadges = (message, searchStr, textStyle, highlightStyle,
|
|
|
26
26
|
const getTagDecorator = (tag) => {
|
|
27
27
|
const clean = tag.replace(/[\[\]]/g, '').trim().toUpperCase();
|
|
28
28
|
if (clean === 'AXIOS') {
|
|
29
|
-
return { color:
|
|
29
|
+
return { color: AppColors_1.AppColors.emerald600, icon: '⚡', label: 'AXIOS' };
|
|
30
30
|
}
|
|
31
31
|
if (clean === 'API' || clean === 'FETCH' || clean === 'HTTP' || clean === 'NETWORK') {
|
|
32
|
-
return { color:
|
|
32
|
+
return { color: AppColors_1.AppColors.sky600, icon: '🌐', label: clean };
|
|
33
33
|
}
|
|
34
34
|
if (clean === 'SAMPLE' || clean === 'BATCH') {
|
|
35
|
-
return { color:
|
|
35
|
+
return { color: AppColors_1.AppColors.indigo600Alt, icon: '🎲', label: clean };
|
|
36
36
|
}
|
|
37
37
|
if (clean === 'REDUX' || clean === 'STORE' || clean === 'STATE') {
|
|
38
|
-
return { color:
|
|
38
|
+
return { color: AppColors_1.AppColors.violet600, icon: '⚛️', label: clean };
|
|
39
39
|
}
|
|
40
40
|
if (clean === 'ANALYTICS' || clean === 'FIREBASE' || clean === 'GA4' || clean === 'GA') {
|
|
41
|
-
return { color:
|
|
41
|
+
return { color: AppColors_1.AppColors.teal600, icon: '📊', label: clean };
|
|
42
42
|
}
|
|
43
43
|
if (clean === 'AUTH' || clean === 'TOKEN' || clean === 'SESSION') {
|
|
44
|
-
return { color:
|
|
44
|
+
return { color: AppColors_1.AppColors.amber600, icon: '🔑', label: clean };
|
|
45
45
|
}
|
|
46
46
|
if (clean === 'APP') {
|
|
47
|
-
return { color:
|
|
47
|
+
return { color: AppColors_1.AppColors.indigo600Alt, icon: '📱', label: 'APP' };
|
|
48
48
|
}
|
|
49
49
|
if (clean === 'TEST') {
|
|
50
|
-
return { color:
|
|
50
|
+
return { color: AppColors_1.AppColors.emerald500, icon: '🧪', label: 'TEST' };
|
|
51
51
|
}
|
|
52
52
|
if (clean === 'WARN' || clean === 'WARNING') {
|
|
53
|
-
return { color:
|
|
53
|
+
return { color: AppColors_1.AppColors.amber600, icon: '⚠️', label: 'WARN' };
|
|
54
54
|
}
|
|
55
55
|
if (clean === 'ERROR' || clean === 'CRASH' || clean === 'BUG') {
|
|
56
|
-
return { color:
|
|
56
|
+
return { color: AppColors_1.AppColors.red600, icon: '💥', label: 'ERROR' };
|
|
57
57
|
}
|
|
58
58
|
if (clean === 'PERF' || clean === 'RENDER') {
|
|
59
|
-
return { color:
|
|
59
|
+
return { color: AppColors_1.AppColors.violet500, icon: '⚡', label: clean };
|
|
60
60
|
}
|
|
61
61
|
return { color: AppColors_1.AppColors.slate600, icon: '🏷️', label: clean };
|
|
62
62
|
};
|
|
@@ -95,51 +95,72 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
95
95
|
? (0, helpers_1.parseStackLine)(item.caller, true)
|
|
96
96
|
: null;
|
|
97
97
|
const getLogColors = () => {
|
|
98
|
-
const
|
|
99
|
-
|
|
98
|
+
const type = (item.type || 'log').toLowerCase();
|
|
99
|
+
const method = (item.sourceMethod || type).toLowerCase();
|
|
100
|
+
if (isAnalyticsError || type === 'error' || method === 'error') {
|
|
100
101
|
return {
|
|
101
|
-
border:
|
|
102
|
-
badgeBg:
|
|
103
|
-
badgeText:
|
|
102
|
+
border: '#EF4444',
|
|
103
|
+
badgeBg: '#FEE2E2',
|
|
104
|
+
badgeText: '#DC2626',
|
|
104
105
|
label: 'ERROR',
|
|
105
|
-
cardBg:
|
|
106
|
+
cardBg: '#FEF2F2',
|
|
107
|
+
methodBorder: '#FECACA',
|
|
108
|
+
methodBg: '#FEE2E2',
|
|
109
|
+
methodText: '#DC2626',
|
|
110
|
+
textColor: '#991B1B',
|
|
106
111
|
};
|
|
107
112
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
};
|
|
134
|
-
}
|
|
135
|
-
return {
|
|
136
|
-
border: AppColors_1.AppColors.purple,
|
|
137
|
-
badgeBg: `${AppColors_1.AppColors.purple}15`,
|
|
138
|
-
badgeText: AppColors_1.AppColors.purple,
|
|
139
|
-
label: 'INFO',
|
|
140
|
-
cardBg: isDark ? `${AppColors_1.AppColors.purple}1F` : AppColors_1.AppColors.purpleShade50,
|
|
141
|
-
};
|
|
113
|
+
if (type === 'warn' || method === 'warn') {
|
|
114
|
+
return {
|
|
115
|
+
border: '#F59E0B',
|
|
116
|
+
badgeBg: '#FEF3C7',
|
|
117
|
+
badgeText: '#D97706',
|
|
118
|
+
label: 'WARN',
|
|
119
|
+
cardBg: '#FFFBEB',
|
|
120
|
+
methodBorder: '#FDE68A',
|
|
121
|
+
methodBg: '#FEF3C7',
|
|
122
|
+
methodText: '#D97706',
|
|
123
|
+
textColor: '#92400E',
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
if (type === 'debug' || method === 'debug') {
|
|
127
|
+
return {
|
|
128
|
+
border: '#8B5CF6',
|
|
129
|
+
badgeBg: '#EDE9FE',
|
|
130
|
+
badgeText: '#7C3AED',
|
|
131
|
+
label: 'DEBUG',
|
|
132
|
+
cardBg: '#F5F3FF',
|
|
133
|
+
methodBorder: '#DDD6FE',
|
|
134
|
+
methodBg: '#EDE9FE',
|
|
135
|
+
methodText: '#7C3AED',
|
|
136
|
+
textColor: '#4C1D95',
|
|
137
|
+
};
|
|
142
138
|
}
|
|
139
|
+
if (type === 'info' || method === 'info') {
|
|
140
|
+
return {
|
|
141
|
+
border: '#0EA5E9',
|
|
142
|
+
badgeBg: '#E0F2FE',
|
|
143
|
+
badgeText: '#0284C7',
|
|
144
|
+
label: 'INFO',
|
|
145
|
+
cardBg: '#F0F9FF',
|
|
146
|
+
methodBorder: '#BAE6FD',
|
|
147
|
+
methodBg: '#E0F2FE',
|
|
148
|
+
methodText: '#0284C7',
|
|
149
|
+
textColor: '#075985',
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
// Default / Standard console.log
|
|
153
|
+
return {
|
|
154
|
+
border: '#6366F1',
|
|
155
|
+
badgeBg: '#EEF2FF',
|
|
156
|
+
badgeText: '#4F46E5',
|
|
157
|
+
label: 'LOG',
|
|
158
|
+
cardBg: '#FFFFFF',
|
|
159
|
+
methodBorder: '#E0E7FF',
|
|
160
|
+
methodBg: '#EEF2FF',
|
|
161
|
+
methodText: '#4F46E5',
|
|
162
|
+
textColor: '#0F172A',
|
|
163
|
+
};
|
|
143
164
|
};
|
|
144
165
|
const colors = getLogColors();
|
|
145
166
|
const jsonPreview = jsonContent
|
|
@@ -153,6 +174,7 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
153
174
|
styles.card,
|
|
154
175
|
{
|
|
155
176
|
borderLeftColor: colors.border,
|
|
177
|
+
borderLeftWidth: 3.5,
|
|
156
178
|
backgroundColor: colors.cardBg,
|
|
157
179
|
},
|
|
158
180
|
pressed && styles.cardPressed,
|
|
@@ -161,18 +183,18 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
161
183
|
<react_native_1.View style={styles.headerLeft}>
|
|
162
184
|
<react_native_1.View style={[styles.typeChip, { backgroundColor: colors.badgeBg }]}>
|
|
163
185
|
<react_native_1.View style={[styles.typeDot, { backgroundColor: colors.badgeText }]}/>
|
|
164
|
-
<react_native_1.Text style={[styles.typeChipText, { color: colors.badgeText }]}>
|
|
186
|
+
<react_native_1.Text style={[styles.typeChipText, { color: colors.badgeText, fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
165
187
|
{colors.label}
|
|
166
188
|
</react_native_1.Text>
|
|
167
189
|
</react_native_1.View>
|
|
168
190
|
<react_native_1.View style={[
|
|
169
191
|
styles.metaChip,
|
|
170
192
|
{
|
|
171
|
-
backgroundColor:
|
|
172
|
-
borderColor:
|
|
193
|
+
backgroundColor: colors.methodBg,
|
|
194
|
+
borderColor: colors.methodBorder,
|
|
173
195
|
},
|
|
174
196
|
]}>
|
|
175
|
-
<react_native_1.Text style={[styles.metaChipText, { color:
|
|
197
|
+
<react_native_1.Text style={[styles.metaChipText, { color: colors.methodText, fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
176
198
|
console.
|
|
177
199
|
{('sourceMethod' in item ? item.sourceMethod : undefined) ||
|
|
178
200
|
item.type ||
|
|
@@ -182,11 +204,11 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
182
204
|
{jsonContent && (<react_native_1.View style={[
|
|
183
205
|
styles.metaChip,
|
|
184
206
|
{
|
|
185
|
-
backgroundColor:
|
|
186
|
-
borderColor:
|
|
207
|
+
backgroundColor: '#ECFDF5',
|
|
208
|
+
borderColor: '#A7F3D0',
|
|
187
209
|
},
|
|
188
210
|
]}>
|
|
189
|
-
<react_native_1.Text style={[styles.metaChipText, { color:
|
|
211
|
+
<react_native_1.Text style={[styles.metaChipText, { color: '#059669', fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
190
212
|
{Array.isArray(jsonContent.data)
|
|
191
213
|
? `Array[${jsonContent.data.length}]`
|
|
192
214
|
: `Object{${Object.keys(jsonContent.data).length}}`}
|
|
@@ -201,7 +223,7 @@ exports.ConsoleLogCard = react_1.default.memo(function ConsoleLogCard({ item, se
|
|
|
201
223
|
borderColor: `${AppColors_1.AppColors.purple}3D`,
|
|
202
224
|
},
|
|
203
225
|
]}>
|
|
204
|
-
<react_native_1.Text style={[styles.metaChipText, { color: AppColors_1.AppColors.purple }]}>
|
|
226
|
+
<react_native_1.Text style={[styles.metaChipText, { color: AppColors_1.AppColors.purple, fontFamily: AppFonts_1.AppFonts.interBold }]}>
|
|
205
227
|
×{item.duplicateCount}
|
|
206
228
|
</react_native_1.Text>
|
|
207
229
|
</react_native_1.View>)}
|
|
@@ -65,18 +65,21 @@ const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, i
|
|
|
65
65
|
const pctSuccess = total > 0 ? Math.round((stats.success / total) * 100) : 0;
|
|
66
66
|
const pctFailed = total > 0 ? Math.round((stats.failed / total) * 100) : 0;
|
|
67
67
|
const pctLoading = total > 0 ? Math.round((stats.loading / total) * 100) : 0;
|
|
68
|
-
return (<react_native_1.Pressable style={
|
|
68
|
+
return (<react_native_1.Pressable style={[
|
|
69
|
+
styles_1.default.domainHeaderCard,
|
|
70
|
+
!isCollapsed && styles_1.default.domainHeaderCardExpanded,
|
|
71
|
+
]} onPress={() => onToggleCollapse(pageName)}>
|
|
69
72
|
<react_native_1.View style={styles_1.default.domainHeaderTopRow}>
|
|
70
73
|
<react_native_1.View style={styles_1.default.domainHeaderLeft}>
|
|
71
|
-
<react_native_1.Animated.View style={{ transform: [{ rotate: chevronRotate }] }}>
|
|
74
|
+
<react_native_1.Animated.View style={{ transform: [{ rotate: chevronRotate }], flexShrink: 0 }}>
|
|
72
75
|
<NetworkIcons_1.ChevronIcon color={AppColors_1.AppColors.grayTextWeak} size={13}/>
|
|
73
76
|
</react_native_1.Animated.View>
|
|
74
|
-
<react_native_1.View style={[styles_1.default.domainIconWrap, { backgroundColor: `${color}18
|
|
77
|
+
<react_native_1.View style={[styles_1.default.domainIconWrap, { backgroundColor: `${color}18`, flexShrink: 0 }]}>
|
|
75
78
|
<NetworkIcons_1.ScreenIcon color={color} size={14}/>
|
|
76
79
|
</react_native_1.View>
|
|
77
80
|
<react_native_1.View style={{ flex: 1, justifyContent: 'center', minWidth: 0 }}>
|
|
78
|
-
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
79
|
-
<react_native_1.Text style={[styles_1.default.domainTitleText, { flexShrink: 1 }]} numberOfLines={1}>
|
|
81
|
+
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6, minWidth: 0 }}>
|
|
82
|
+
<react_native_1.Text style={[styles_1.default.domainTitleText, { flexShrink: 1 }]} numberOfLines={1} ellipsizeMode="tail">
|
|
80
83
|
{pageName}
|
|
81
84
|
</react_native_1.Text>
|
|
82
85
|
{total > 0 && (<react_native_1.View style={{
|
|
@@ -84,52 +87,53 @@ const DomainHeader = ({ pageName, color, stats, activeFilters, onToggleFilter, i
|
|
|
84
87
|
alignItems: 'center',
|
|
85
88
|
gap: 4,
|
|
86
89
|
backgroundColor: stats.failed > 0
|
|
87
|
-
?
|
|
90
|
+
? AppColors_1.AppColors.red100
|
|
88
91
|
: stats.loading > 0
|
|
89
|
-
?
|
|
90
|
-
:
|
|
92
|
+
? AppColors_1.AppColors.amber100
|
|
93
|
+
: AppColors_1.AppColors.emerald100,
|
|
91
94
|
paddingHorizontal: 5,
|
|
92
95
|
paddingVertical: 1.5,
|
|
93
96
|
borderRadius: 4,
|
|
97
|
+
flexShrink: 0,
|
|
94
98
|
}}>
|
|
95
99
|
<react_native_1.View style={{
|
|
96
|
-
width:
|
|
100
|
+
width: 22,
|
|
97
101
|
height: 3.5,
|
|
98
102
|
borderRadius: 2,
|
|
99
|
-
backgroundColor:
|
|
103
|
+
backgroundColor: AppColors_1.AppColors.gray200,
|
|
100
104
|
flexDirection: 'row',
|
|
101
105
|
overflow: 'hidden',
|
|
102
106
|
}}>
|
|
103
107
|
{pctSuccess > 0 && (<react_native_1.View style={{
|
|
104
108
|
width: `${pctSuccess}%`,
|
|
105
109
|
height: '100%',
|
|
106
|
-
backgroundColor:
|
|
110
|
+
backgroundColor: AppColors_1.AppColors.emerald500,
|
|
107
111
|
}}/>)}
|
|
108
112
|
{pctFailed > 0 && (<react_native_1.View style={{
|
|
109
113
|
width: `${pctFailed}%`,
|
|
110
114
|
height: '100%',
|
|
111
|
-
backgroundColor:
|
|
115
|
+
backgroundColor: AppColors_1.AppColors.red500,
|
|
112
116
|
}}/>)}
|
|
113
117
|
{pctLoading > 0 && (<react_native_1.View style={{
|
|
114
118
|
width: `${pctLoading}%`,
|
|
115
119
|
height: '100%',
|
|
116
|
-
backgroundColor:
|
|
120
|
+
backgroundColor: AppColors_1.AppColors.amber500,
|
|
117
121
|
}}/>)}
|
|
118
122
|
</react_native_1.View>
|
|
119
123
|
<react_native_1.Text style={{
|
|
120
124
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
121
125
|
fontSize: 8.5,
|
|
122
126
|
color: stats.failed > 0
|
|
123
|
-
?
|
|
127
|
+
? AppColors_1.AppColors.redErrorText
|
|
124
128
|
: stats.loading > 0
|
|
125
|
-
?
|
|
126
|
-
:
|
|
129
|
+
? AppColors_1.AppColors.amber800Warm
|
|
130
|
+
: AppColors_1.AppColors.emerald700,
|
|
127
131
|
}}>
|
|
128
132
|
{pctSuccess}%
|
|
129
133
|
</react_native_1.Text>
|
|
130
134
|
</react_native_1.View>)}
|
|
131
135
|
</react_native_1.View>
|
|
132
|
-
<react_native_1.Text style={styles_1.default.domainSummaryText} numberOfLines={1}>
|
|
136
|
+
<react_native_1.Text style={styles_1.default.domainSummaryText} numberOfLines={1} ellipsizeMode="tail">
|
|
133
137
|
{(0, helpers_1.formatDateTime)(timestamp)}
|
|
134
138
|
</react_native_1.Text>
|
|
135
139
|
</react_native_1.View>
|