react-native-inapp-inspector 1.1.24 → 1.1.26
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/build.gradle +36 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.java +114 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorPackage.java +28 -0
- package/dist/commonjs/components/AnalyticsEventCard.js +94 -88
- package/dist/commonjs/components/ConsoleLogCard.js +49 -25
- package/dist/commonjs/components/ErrorBoundary.d.ts +1 -1
- package/dist/commonjs/components/ErrorBoundary.js +9 -145
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.d.ts +7 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +1002 -0
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +637 -10
- package/dist/commonjs/components/Inspector/BundleTab.d.ts +1 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +826 -406
- package/dist/commonjs/components/Inspector/CrashDetail.d.ts +3 -0
- package/dist/commonjs/components/Inspector/CrashDetail.js +796 -0
- package/dist/commonjs/components/Inspector/CrashFilterModal.d.ts +20 -0
- package/dist/commonjs/components/Inspector/CrashFilterModal.js +597 -0
- package/dist/commonjs/components/Inspector/CrashTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/CrashTab.js +727 -0
- package/dist/commonjs/components/Inspector/InspectorContext.js +6 -1
- package/dist/commonjs/components/Inspector/InspectorHeader.js +65 -28
- package/dist/commonjs/components/Inspector/LogDetail.js +227 -114
- package/dist/commonjs/components/Inspector/MainScreen.js +13 -4
- package/dist/commonjs/components/Inspector/NetworkDetail.js +131 -81
- package/dist/commonjs/components/Inspector/PerformanceTab.js +20 -10
- package/dist/commonjs/components/Inspector/SettingsPanel.js +90 -1
- package/dist/commonjs/components/Inspector/TabBar.js +15 -3
- package/dist/commonjs/components/NetworkIcons.d.ts +25 -0
- package/dist/commonjs/components/NetworkIcons.js +188 -1
- package/dist/commonjs/components/SegmentedTabs.js +33 -23
- package/dist/commonjs/components/TreeNode.js +13 -12
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.js +70 -44
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +5 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.js +497 -126
- package/dist/commonjs/customHooks/consoleLogger.d.ts +1 -0
- package/dist/commonjs/customHooks/consoleLogger.js +153 -51
- package/dist/commonjs/customHooks/crashHandler.d.ts +64 -0
- package/dist/commonjs/customHooks/crashHandler.js +681 -0
- package/dist/commonjs/customHooks/networkLogger.js +74 -49
- package/dist/commonjs/customHooks/performanceTracker.d.ts +8 -0
- package/dist/commonjs/customHooks/performanceTracker.js +44 -3
- package/dist/commonjs/decorators/index.d.ts +49 -0
- package/dist/commonjs/decorators/index.js +142 -0
- package/dist/commonjs/helpers/gaAnalyticsRegistry.d.ts +18 -0
- package/dist/commonjs/helpers/gaAnalyticsRegistry.js +174 -0
- package/dist/commonjs/helpers/index.d.ts +7 -4
- package/dist/commonjs/helpers/index.js +102 -64
- package/dist/commonjs/i18n/locales/en.json +182 -4
- package/dist/commonjs/index.d.ts +6 -0
- package/dist/commonjs/index.js +310 -8
- package/dist/commonjs/styles/index.d.ts +4 -1
- package/dist/commonjs/styles/index.js +22 -19
- package/dist/commonjs/types/enums.d.ts +156 -9
- package/dist/commonjs/types/enums.js +139 -2
- package/dist/commonjs/types/interfaces.d.ts +70 -1
- package/dist/esm/components/AnalyticsEventCard.js +95 -89
- package/dist/esm/components/ConsoleLogCard.js +49 -25
- package/dist/esm/components/ErrorBoundary.d.ts +1 -1
- package/dist/esm/components/ErrorBoundary.js +10 -113
- package/dist/esm/components/Inspector/AnalyticsFilterModal.d.ts +7 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +964 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +639 -12
- package/dist/esm/components/Inspector/BundleTab.d.ts +1 -1
- package/dist/esm/components/Inspector/BundleTab.js +827 -407
- package/dist/esm/components/Inspector/CrashDetail.d.ts +3 -0
- package/dist/esm/components/Inspector/CrashDetail.js +758 -0
- package/dist/esm/components/Inspector/CrashFilterModal.d.ts +20 -0
- package/dist/esm/components/Inspector/CrashFilterModal.js +557 -0
- package/dist/esm/components/Inspector/CrashTab.d.ts +3 -0
- package/dist/esm/components/Inspector/CrashTab.js +689 -0
- package/dist/esm/components/Inspector/InspectorContext.js +1 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +66 -29
- package/dist/esm/components/Inspector/LogDetail.js +227 -114
- package/dist/esm/components/Inspector/MainScreen.js +14 -5
- package/dist/esm/components/Inspector/NetworkDetail.js +132 -49
- package/dist/esm/components/Inspector/PerformanceTab.js +20 -10
- package/dist/esm/components/Inspector/SettingsPanel.js +91 -2
- package/dist/esm/components/Inspector/TabBar.js +16 -4
- package/dist/esm/components/NetworkIcons.d.ts +25 -0
- package/dist/esm/components/NetworkIcons.js +161 -0
- package/dist/esm/components/SegmentedTabs.js +33 -23
- package/dist/esm/components/TreeNode.js +13 -12
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.js +70 -44
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +5 -1
- package/dist/esm/customHooks/bundleAnalyzer.js +493 -125
- package/dist/esm/customHooks/consoleLogger.d.ts +1 -0
- package/dist/esm/customHooks/consoleLogger.js +151 -50
- package/dist/esm/customHooks/crashHandler.d.ts +64 -0
- package/dist/esm/customHooks/crashHandler.js +659 -0
- package/dist/esm/customHooks/networkLogger.js +74 -49
- package/dist/esm/customHooks/performanceTracker.d.ts +8 -0
- package/dist/esm/customHooks/performanceTracker.js +38 -1
- package/dist/esm/decorators/index.d.ts +49 -0
- package/dist/esm/decorators/index.js +137 -0
- package/dist/esm/helpers/gaAnalyticsRegistry.d.ts +18 -0
- package/dist/esm/helpers/gaAnalyticsRegistry.js +169 -0
- package/dist/esm/helpers/index.d.ts +7 -4
- package/dist/esm/helpers/index.js +100 -63
- package/dist/esm/i18n/locales/en.json +182 -4
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.js +262 -8
- package/dist/esm/styles/index.d.ts +4 -1
- package/dist/esm/styles/index.js +22 -19
- package/dist/esm/types/enums.d.ts +156 -9
- package/dist/esm/types/enums.js +138 -3
- package/dist/esm/types/interfaces.d.ts +70 -1
- package/ios/NetworkInspectorModule.h +6 -0
- package/ios/NetworkInspectorModule.m +125 -0
- package/package.json +5 -2
- package/react-native-inapp-inspector.podspec +18 -0
|
@@ -1,45 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
3
|
exports.ErrorBoundary = void 0;
|
|
37
|
-
const react_1 =
|
|
4
|
+
const react_1 = require("react");
|
|
38
5
|
const react_native_1 = require("react-native");
|
|
39
6
|
const AppColors_1 = require("../styles/AppColors");
|
|
40
7
|
const AppFonts_1 = require("../styles/AppFonts");
|
|
41
8
|
const helpers_1 = require("../helpers");
|
|
42
|
-
const
|
|
9
|
+
const crashHandler_1 = require("../customHooks/crashHandler");
|
|
10
|
+
const enums_1 = require("../types/enums");
|
|
43
11
|
function parseStackTrace(stack) {
|
|
44
12
|
if (!stack)
|
|
45
13
|
return null;
|
|
@@ -104,119 +72,15 @@ ${error.stack}`;
|
|
|
104
72
|
return { hasError: true, error };
|
|
105
73
|
}
|
|
106
74
|
componentDidCatch(error, errorInfo) {
|
|
107
|
-
|
|
75
|
+
try {
|
|
76
|
+
const stack = error?.stack || errorInfo?.componentStack;
|
|
77
|
+
(0, crashHandler_1.handleInterceptedCrash)(error, stack, false, enums_1.CrashType.Render, errorInfo?.componentStack);
|
|
78
|
+
}
|
|
79
|
+
catch { }
|
|
108
80
|
}
|
|
109
81
|
render() {
|
|
110
82
|
if (this.state.hasError) {
|
|
111
|
-
|
|
112
|
-
if (isInline) {
|
|
113
|
-
return (<react_native_1.View style={styles.inlineContainer}>
|
|
114
|
-
<react_native_1.View style={{ flexDirection: 'row', alignItems: 'center', gap: 6 }}>
|
|
115
|
-
<NetworkIcons_1.WarningTriangleIcon color={AppColors_1.AppColors.redErrorText} size={14}/>
|
|
116
|
-
<react_native_1.Text style={styles.inlineTitle}>Inspector Crash</react_native_1.Text>
|
|
117
|
-
</react_native_1.View>
|
|
118
|
-
<react_native_1.TouchableOpacity style={styles.inlineResetBtn} onPress={this.handleReset}>
|
|
119
|
-
<react_native_1.Text style={styles.inlineResetText}>Reload</react_native_1.Text>
|
|
120
|
-
</react_native_1.TouchableOpacity>
|
|
121
|
-
</react_native_1.View>);
|
|
122
|
-
}
|
|
123
|
-
const error = this.state.error;
|
|
124
|
-
const isNativeCrash = error ? (error.message.includes('Native') || error.message.includes('native') || error.message.includes('Swift') || error.message.includes('Java')) : false;
|
|
125
|
-
const parsed = error && error.stack ? parseStackTrace(error.stack) : null;
|
|
126
|
-
return (<react_native_1.View style={styles.container}>
|
|
127
|
-
<react_native_1.View style={styles.card}>
|
|
128
|
-
<react_native_1.View style={{ marginBottom: 12, alignItems: 'center' }}>
|
|
129
|
-
<NetworkIcons_1.WarningTriangleIcon color={AppColors_1.AppColors.amber500} size={44}/>
|
|
130
|
-
</react_native_1.View>
|
|
131
|
-
<react_native_1.Text style={styles.title}>Something went wrong</react_native_1.Text>
|
|
132
|
-
|
|
133
|
-
<react_native_1.View style={{
|
|
134
|
-
flexDirection: 'row',
|
|
135
|
-
alignItems: 'center',
|
|
136
|
-
backgroundColor: isNativeCrash ? `${AppColors_1.AppColors.errorColor}1A` : `${AppColors_1.AppColors.amber500}1A`,
|
|
137
|
-
paddingHorizontal: 10,
|
|
138
|
-
paddingVertical: 4,
|
|
139
|
-
borderRadius: 20,
|
|
140
|
-
marginBottom: 12,
|
|
141
|
-
gap: 4
|
|
142
|
-
}}>
|
|
143
|
-
<react_native_1.View style={{
|
|
144
|
-
width: 8,
|
|
145
|
-
height: 8,
|
|
146
|
-
borderRadius: 4,
|
|
147
|
-
backgroundColor: isNativeCrash ? AppColors_1.AppColors.errorColor : AppColors_1.AppColors.amber500,
|
|
148
|
-
}}/>
|
|
149
|
-
<react_native_1.Text style={{
|
|
150
|
-
fontSize: 10,
|
|
151
|
-
fontWeight: 'bold',
|
|
152
|
-
color: isNativeCrash ? AppColors_1.AppColors.errorColor : AppColors_1.AppColors.amber500,
|
|
153
|
-
fontFamily: AppFonts_1.AppFonts.interBold || 'System'
|
|
154
|
-
}}>
|
|
155
|
-
{isNativeCrash ? 'NATIVE CRASH' : 'JAVASCRIPT CRASH'}
|
|
156
|
-
</react_native_1.Text>
|
|
157
|
-
</react_native_1.View>
|
|
158
|
-
|
|
159
|
-
<react_native_1.Text style={styles.subtitle}>
|
|
160
|
-
The In-App Inspector or active view encountered an error. Traceback details are parsed below:
|
|
161
|
-
</react_native_1.Text>
|
|
162
|
-
|
|
163
|
-
{parsed && (<react_native_1.View style={{
|
|
164
|
-
backgroundColor: AppColors_1.AppColors.slate100,
|
|
165
|
-
borderRadius: 8,
|
|
166
|
-
padding: 10,
|
|
167
|
-
width: '100%',
|
|
168
|
-
marginBottom: 10,
|
|
169
|
-
borderWidth: 1,
|
|
170
|
-
borderColor: AppColors_1.AppColors.slate200,
|
|
171
|
-
gap: 4
|
|
172
|
-
}}>
|
|
173
|
-
<react_native_1.Text style={{ fontSize: 11, color: AppColors_1.AppColors.slate600, fontFamily: AppFonts_1.AppFonts.interMedium }} numberOfLines={1}>
|
|
174
|
-
<react_native_1.Text style={{ fontWeight: 'bold' }}>Method:</react_native_1.Text> {parsed.method}
|
|
175
|
-
</react_native_1.Text>
|
|
176
|
-
<react_native_1.Text style={{ fontSize: 11, color: AppColors_1.AppColors.slate600, fontFamily: AppFonts_1.AppFonts.interMedium }} numberOfLines={1}>
|
|
177
|
-
<react_native_1.Text style={{ fontWeight: 'bold' }}>File:</react_native_1.Text> {parsed.file}
|
|
178
|
-
</react_native_1.Text>
|
|
179
|
-
<react_native_1.Text style={{ fontSize: 11, color: AppColors_1.AppColors.slate600, fontFamily: AppFonts_1.AppFonts.interMedium }}>
|
|
180
|
-
<react_native_1.Text style={{ fontWeight: 'bold' }}>Line:</react_native_1.Text> {parsed.line} <react_native_1.Text style={{ fontWeight: 'bold' }}>Col:</react_native_1.Text> {parsed.column}
|
|
181
|
-
</react_native_1.Text>
|
|
182
|
-
</react_native_1.View>)}
|
|
183
|
-
|
|
184
|
-
{error && (<react_native_1.ScrollView style={styles.scroll} contentContainerStyle={styles.scrollContent}>
|
|
185
|
-
<react_native_1.Text style={styles.code}>
|
|
186
|
-
{error.message}
|
|
187
|
-
{'\n\n'}
|
|
188
|
-
{error.stack}
|
|
189
|
-
</react_native_1.Text>
|
|
190
|
-
</react_native_1.ScrollView>)}
|
|
191
|
-
|
|
192
|
-
<react_native_1.View style={{ width: '100%', gap: 8, marginBottom: 12 }}>
|
|
193
|
-
<react_native_1.TouchableOpacity style={{
|
|
194
|
-
backgroundColor: AppColors_1.AppColors.slate900,
|
|
195
|
-
height: 38,
|
|
196
|
-
borderRadius: 8,
|
|
197
|
-
justifyContent: 'center',
|
|
198
|
-
alignItems: 'center',
|
|
199
|
-
flexDirection: 'row',
|
|
200
|
-
gap: 6
|
|
201
|
-
}} onPress={this.handleCopyTrace}>
|
|
202
|
-
<NetworkIcons_1.CopyIcon color={AppColors_1.AppColors.white} size={14}/>
|
|
203
|
-
<react_native_1.Text style={{ color: AppColors_1.AppColors.white, fontSize: 12, fontWeight: 'bold', fontFamily: AppFonts_1.AppFonts.interBold || 'System' }}>
|
|
204
|
-
Copy Crash Traceback
|
|
205
|
-
</react_native_1.Text>
|
|
206
|
-
</react_native_1.TouchableOpacity>
|
|
207
|
-
</react_native_1.View>
|
|
208
|
-
|
|
209
|
-
<react_native_1.View style={styles.btnRow}>
|
|
210
|
-
<react_native_1.TouchableOpacity style={styles.resetBtn} onPress={this.handleReset}>
|
|
211
|
-
<react_native_1.Text style={styles.resetBtnText}>Retry / Reload</react_native_1.Text>
|
|
212
|
-
</react_native_1.TouchableOpacity>
|
|
213
|
-
|
|
214
|
-
{this.props.onClose && (<react_native_1.TouchableOpacity style={styles.closeBtn} onPress={this.props.onClose}>
|
|
215
|
-
<react_native_1.Text style={styles.closeBtnText}>Close Inspector</react_native_1.Text>
|
|
216
|
-
</react_native_1.TouchableOpacity>)}
|
|
217
|
-
</react_native_1.View>
|
|
218
|
-
</react_native_1.View>
|
|
219
|
-
</react_native_1.View>);
|
|
83
|
+
return null;
|
|
220
84
|
}
|
|
221
85
|
return this.props.children;
|
|
222
86
|
}
|