react-native-inapp-inspector 2.0.3 → 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
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface UpdateAvailableModalProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
latestVersion: string | null;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const UpdateAvailableModal: React.FC<UpdateAvailableModalProps>;
|
|
8
|
+
export default UpdateAvailableModal;
|
|
@@ -0,0 +1,469 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.UpdateAvailableModal = void 0;
|
|
37
|
+
const react_1 = __importStar(require("react"));
|
|
38
|
+
const react_native_1 = require("react-native");
|
|
39
|
+
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
40
|
+
const BrandSquareIcon_1 = require("../BrandSquareIcon");
|
|
41
|
+
const NetworkIcons_1 = require("../NetworkIcons");
|
|
42
|
+
const constants_1 = require("../../constants");
|
|
43
|
+
const helpers_1 = require("../../helpers");
|
|
44
|
+
const toast_1 = require("../../helpers/toast");
|
|
45
|
+
// ─── Crisp SVG Icons ─────────────────────────────────────────────────────────
|
|
46
|
+
const CopySvg = ({ size = 14, color = '#64748B' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
47
|
+
<react_native_svg_1.Path d="M8 4v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2h-8a2 2 0 0 0-2 2z" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
48
|
+
<react_native_svg_1.Path d="M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
49
|
+
</react_native_svg_1.default>);
|
|
50
|
+
const CheckSvg = ({ size = 14, color = '#10B981' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
51
|
+
<react_native_svg_1.Path d="M20 6L9 17l-5-5" stroke={color} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round"/>
|
|
52
|
+
</react_native_svg_1.default>);
|
|
53
|
+
const ExternalLinkSvg = ({ size = 13, color = '#FFFFFF' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
54
|
+
<react_native_svg_1.Path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
55
|
+
<react_native_svg_1.Path d="M15 3h6v6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
56
|
+
<react_native_svg_1.Path d="M10 14L21 3" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
57
|
+
</react_native_svg_1.default>);
|
|
58
|
+
const CloseSvg = ({ size = 13, color = '#64748B' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
59
|
+
<react_native_svg_1.Path d="M18 6L6 18M6 6l12 12" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
60
|
+
</react_native_svg_1.default>);
|
|
61
|
+
const SparkleSvg = ({ size = 14, color = '#F59E0B' }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
62
|
+
<react_native_svg_1.Path d="M12 2l2.4 6.6L21 11l-6.6 2.4L12 20l-2.4-6.6L3 11l6.6-2.4L12 2z" fill={color}/>
|
|
63
|
+
</react_native_svg_1.default>);
|
|
64
|
+
const UpdateAvailableModal = ({ visible, latestVersion, onClose, }) => {
|
|
65
|
+
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
66
|
+
const fadeAnim = (0, react_1.useState)(new react_native_1.Animated.Value(0))[0];
|
|
67
|
+
const scaleAnim = (0, react_1.useState)(new react_native_1.Animated.Value(0.92))[0];
|
|
68
|
+
const installCommand = `npm install react-native-inapp-inspector@latest`;
|
|
69
|
+
(0, react_1.useEffect)(() => {
|
|
70
|
+
if (visible) {
|
|
71
|
+
setCopied(false);
|
|
72
|
+
react_native_1.Animated.parallel([
|
|
73
|
+
react_native_1.Animated.timing(fadeAnim, {
|
|
74
|
+
toValue: 1,
|
|
75
|
+
duration: 220,
|
|
76
|
+
useNativeDriver: true,
|
|
77
|
+
}),
|
|
78
|
+
react_native_1.Animated.spring(scaleAnim, {
|
|
79
|
+
toValue: 1,
|
|
80
|
+
friction: 8,
|
|
81
|
+
tension: 50,
|
|
82
|
+
useNativeDriver: true,
|
|
83
|
+
}),
|
|
84
|
+
]).start();
|
|
85
|
+
}
|
|
86
|
+
}, [visible, fadeAnim, scaleAnim]);
|
|
87
|
+
const handleClose = () => {
|
|
88
|
+
react_native_1.Animated.parallel([
|
|
89
|
+
react_native_1.Animated.timing(fadeAnim, {
|
|
90
|
+
toValue: 0,
|
|
91
|
+
duration: 160,
|
|
92
|
+
useNativeDriver: true,
|
|
93
|
+
}),
|
|
94
|
+
react_native_1.Animated.timing(scaleAnim, {
|
|
95
|
+
toValue: 0.92,
|
|
96
|
+
duration: 160,
|
|
97
|
+
useNativeDriver: true,
|
|
98
|
+
}),
|
|
99
|
+
]).start(() => {
|
|
100
|
+
onClose();
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
const handleCopyCommand = () => {
|
|
104
|
+
(0, helpers_1.copyToClipboard)(installCommand, 'Install Command');
|
|
105
|
+
setCopied(true);
|
|
106
|
+
(0, toast_1.showToast)('Copied npm install command to clipboard!');
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
setCopied(false);
|
|
109
|
+
}, 2500);
|
|
110
|
+
};
|
|
111
|
+
const handleOpenNpm = () => {
|
|
112
|
+
react_native_1.Linking.openURL('https://www.npmjs.com/package/react-native-inapp-inspector').catch(() => { });
|
|
113
|
+
handleClose();
|
|
114
|
+
};
|
|
115
|
+
if (!visible)
|
|
116
|
+
return null;
|
|
117
|
+
return (<react_native_1.Modal transparent visible={visible} animationType="none" statusBarTranslucent onRequestClose={handleClose}>
|
|
118
|
+
<react_native_1.View style={styles.overlay}>
|
|
119
|
+
<react_native_1.Animated.View style={[
|
|
120
|
+
styles.card,
|
|
121
|
+
{
|
|
122
|
+
opacity: fadeAnim,
|
|
123
|
+
transform: [{ scale: scaleAnim }],
|
|
124
|
+
},
|
|
125
|
+
]}>
|
|
126
|
+
{/* Top-Right Dismiss Button */}
|
|
127
|
+
<react_native_1.TouchableOpacity style={styles.topCloseButton} onPress={handleClose} hitSlop={10} activeOpacity={0.7}>
|
|
128
|
+
<CloseSvg size={13} color="#64748B"/>
|
|
129
|
+
</react_native_1.TouchableOpacity>
|
|
130
|
+
|
|
131
|
+
{/* Header section with brand square icon & sparkle */}
|
|
132
|
+
<react_native_1.View style={styles.headerSection}>
|
|
133
|
+
<react_native_1.View style={styles.iconHaloRing}>
|
|
134
|
+
<BrandSquareIcon_1.BrandSquareIcon size={52}/>
|
|
135
|
+
<react_native_1.View style={styles.sparkleBadge}>
|
|
136
|
+
<SparkleSvg size={13} color="#F59E0B"/>
|
|
137
|
+
</react_native_1.View>
|
|
138
|
+
</react_native_1.View>
|
|
139
|
+
|
|
140
|
+
<react_native_1.Text style={styles.title}>Update Available</react_native_1.Text>
|
|
141
|
+
<react_native_1.Text style={styles.subtitle}>
|
|
142
|
+
A newer release of react-native-inapp-inspector is ready
|
|
143
|
+
</react_native_1.Text>
|
|
144
|
+
</react_native_1.View>
|
|
145
|
+
|
|
146
|
+
{/* Version Comparison Card */}
|
|
147
|
+
<react_native_1.View style={styles.versionComparisonCard}>
|
|
148
|
+
<react_native_1.View style={styles.versionColumn}>
|
|
149
|
+
<react_native_1.Text style={styles.versionLabel}>INSTALLED</react_native_1.Text>
|
|
150
|
+
<react_native_1.View style={styles.installedChip}>
|
|
151
|
+
<react_native_1.Text style={styles.installedText}>v{constants_1.LIB_VERSION}</react_native_1.Text>
|
|
152
|
+
</react_native_1.View>
|
|
153
|
+
</react_native_1.View>
|
|
154
|
+
|
|
155
|
+
<react_native_1.View style={styles.arrowContainer}>
|
|
156
|
+
<react_native_1.Text style={styles.arrowText}>➔</react_native_1.Text>
|
|
157
|
+
</react_native_1.View>
|
|
158
|
+
|
|
159
|
+
<react_native_1.View style={styles.versionColumn}>
|
|
160
|
+
<react_native_1.Text style={styles.versionLabel}>LATEST ON NPM</react_native_1.Text>
|
|
161
|
+
<react_native_1.View style={styles.latestChip}>
|
|
162
|
+
<NetworkIcons_1.NpmIcon size={12} color="#CB3837"/>
|
|
163
|
+
<react_native_1.Text style={styles.latestText}>v{latestVersion || 'latest'}</react_native_1.Text>
|
|
164
|
+
</react_native_1.View>
|
|
165
|
+
</react_native_1.View>
|
|
166
|
+
</react_native_1.View>
|
|
167
|
+
|
|
168
|
+
{/* Quick Install Snippet Box */}
|
|
169
|
+
<react_native_1.View style={styles.codeSnippetBox}>
|
|
170
|
+
<react_native_1.View style={styles.codeSnippetHeader}>
|
|
171
|
+
<react_native_1.Text style={styles.codeSnippetLabel}>UPGRADE COMMAND</react_native_1.Text>
|
|
172
|
+
{copied && (<react_native_1.View style={styles.copiedIndicator}>
|
|
173
|
+
<CheckSvg size={11} color="#10B981"/>
|
|
174
|
+
<react_native_1.Text style={styles.copiedText}>Copied</react_native_1.Text>
|
|
175
|
+
</react_native_1.View>)}
|
|
176
|
+
</react_native_1.View>
|
|
177
|
+
|
|
178
|
+
<react_native_1.TouchableOpacity style={styles.commandRow} onPress={handleCopyCommand} activeOpacity={0.75}>
|
|
179
|
+
<react_native_1.Text style={styles.commandText} numberOfLines={1}>
|
|
180
|
+
{installCommand}
|
|
181
|
+
</react_native_1.Text>
|
|
182
|
+
<react_native_1.View style={styles.copyIconWrapper}>
|
|
183
|
+
{copied ? <CheckSvg size={14} color="#10B981"/> : <CopySvg size={14} color="#64748B"/>}
|
|
184
|
+
</react_native_1.View>
|
|
185
|
+
</react_native_1.TouchableOpacity>
|
|
186
|
+
</react_native_1.View>
|
|
187
|
+
|
|
188
|
+
{/* Action Buttons */}
|
|
189
|
+
<react_native_1.View style={styles.buttonRow}>
|
|
190
|
+
<react_native_1.TouchableOpacity style={styles.secondaryButton} onPress={handleClose} activeOpacity={0.7}>
|
|
191
|
+
<react_native_1.Text style={styles.secondaryButtonText}>Later</react_native_1.Text>
|
|
192
|
+
</react_native_1.TouchableOpacity>
|
|
193
|
+
|
|
194
|
+
<react_native_1.TouchableOpacity style={styles.primaryButton} onPress={handleOpenNpm} activeOpacity={0.85}>
|
|
195
|
+
<react_native_1.Text style={styles.primaryButtonText}>View on NPM</react_native_1.Text>
|
|
196
|
+
<ExternalLinkSvg size={12} color="#FFFFFF"/>
|
|
197
|
+
</react_native_1.TouchableOpacity>
|
|
198
|
+
</react_native_1.View>
|
|
199
|
+
</react_native_1.Animated.View>
|
|
200
|
+
</react_native_1.View>
|
|
201
|
+
</react_native_1.Modal>);
|
|
202
|
+
};
|
|
203
|
+
exports.UpdateAvailableModal = UpdateAvailableModal;
|
|
204
|
+
const fontStack = react_native_1.Platform.select({
|
|
205
|
+
ios: {
|
|
206
|
+
fontFamily: 'System',
|
|
207
|
+
},
|
|
208
|
+
android: {
|
|
209
|
+
fontFamily: 'sans-serif',
|
|
210
|
+
},
|
|
211
|
+
default: {},
|
|
212
|
+
});
|
|
213
|
+
const styles = react_native_1.StyleSheet.create({
|
|
214
|
+
overlay: {
|
|
215
|
+
flex: 1,
|
|
216
|
+
backgroundColor: 'rgba(15, 23, 42, 0.62)',
|
|
217
|
+
justifyContent: 'center',
|
|
218
|
+
alignItems: 'center',
|
|
219
|
+
paddingHorizontal: 20,
|
|
220
|
+
zIndex: 999999,
|
|
221
|
+
},
|
|
222
|
+
card: {
|
|
223
|
+
width: '100%',
|
|
224
|
+
maxWidth: 360,
|
|
225
|
+
backgroundColor: '#FFFFFF',
|
|
226
|
+
borderRadius: 24,
|
|
227
|
+
borderWidth: 1,
|
|
228
|
+
borderColor: '#E2E8F0',
|
|
229
|
+
paddingHorizontal: 20,
|
|
230
|
+
paddingTop: 22,
|
|
231
|
+
paddingBottom: 20,
|
|
232
|
+
alignItems: 'center',
|
|
233
|
+
shadowColor: '#0F172A',
|
|
234
|
+
shadowOffset: { width: 0, height: 18 },
|
|
235
|
+
shadowOpacity: 0.24,
|
|
236
|
+
shadowRadius: 36,
|
|
237
|
+
elevation: 24,
|
|
238
|
+
},
|
|
239
|
+
topCloseButton: {
|
|
240
|
+
position: 'absolute',
|
|
241
|
+
top: 14,
|
|
242
|
+
right: 14,
|
|
243
|
+
width: 28,
|
|
244
|
+
height: 28,
|
|
245
|
+
borderRadius: 14,
|
|
246
|
+
backgroundColor: '#F8FAFC',
|
|
247
|
+
justifyContent: 'center',
|
|
248
|
+
alignItems: 'center',
|
|
249
|
+
borderWidth: 1,
|
|
250
|
+
borderColor: '#E2E8F0',
|
|
251
|
+
zIndex: 10,
|
|
252
|
+
},
|
|
253
|
+
headerSection: {
|
|
254
|
+
alignItems: 'center',
|
|
255
|
+
width: '100%',
|
|
256
|
+
marginBottom: 12,
|
|
257
|
+
},
|
|
258
|
+
iconHaloRing: {
|
|
259
|
+
width: 66,
|
|
260
|
+
height: 66,
|
|
261
|
+
borderRadius: 20,
|
|
262
|
+
backgroundColor: '#FAF5FF',
|
|
263
|
+
justifyContent: 'center',
|
|
264
|
+
alignItems: 'center',
|
|
265
|
+
borderWidth: 1.5,
|
|
266
|
+
borderColor: '#F3E8FF',
|
|
267
|
+
marginBottom: 8,
|
|
268
|
+
shadowColor: '#7C3AED',
|
|
269
|
+
shadowOffset: { width: 0, height: 4 },
|
|
270
|
+
shadowOpacity: 0.16,
|
|
271
|
+
shadowRadius: 10,
|
|
272
|
+
elevation: 4,
|
|
273
|
+
},
|
|
274
|
+
sparkleBadge: {
|
|
275
|
+
position: 'absolute',
|
|
276
|
+
top: -4,
|
|
277
|
+
right: -4,
|
|
278
|
+
width: 22,
|
|
279
|
+
height: 22,
|
|
280
|
+
borderRadius: 11,
|
|
281
|
+
backgroundColor: '#FEF3C7',
|
|
282
|
+
justifyContent: 'center',
|
|
283
|
+
alignItems: 'center',
|
|
284
|
+
borderWidth: 1.5,
|
|
285
|
+
borderColor: '#FFFFFF',
|
|
286
|
+
},
|
|
287
|
+
title: {
|
|
288
|
+
fontSize: 17.5,
|
|
289
|
+
fontWeight: '800',
|
|
290
|
+
color: '#0F172A',
|
|
291
|
+
letterSpacing: -0.4,
|
|
292
|
+
textAlign: 'center',
|
|
293
|
+
lineHeight: 22,
|
|
294
|
+
marginBottom: 2,
|
|
295
|
+
...fontStack,
|
|
296
|
+
},
|
|
297
|
+
subtitle: {
|
|
298
|
+
fontSize: 12,
|
|
299
|
+
fontWeight: '500',
|
|
300
|
+
color: '#64748B',
|
|
301
|
+
textAlign: 'center',
|
|
302
|
+
lineHeight: 16,
|
|
303
|
+
paddingHorizontal: 8,
|
|
304
|
+
...fontStack,
|
|
305
|
+
},
|
|
306
|
+
versionComparisonCard: {
|
|
307
|
+
flexDirection: 'row',
|
|
308
|
+
alignItems: 'center',
|
|
309
|
+
justifyContent: 'space-between',
|
|
310
|
+
backgroundColor: '#F8FAFC',
|
|
311
|
+
borderRadius: 14,
|
|
312
|
+
borderWidth: 1,
|
|
313
|
+
borderColor: '#E2E8F0',
|
|
314
|
+
paddingVertical: 10,
|
|
315
|
+
paddingHorizontal: 14,
|
|
316
|
+
marginBottom: 12,
|
|
317
|
+
width: '100%',
|
|
318
|
+
},
|
|
319
|
+
versionColumn: {
|
|
320
|
+
alignItems: 'center',
|
|
321
|
+
gap: 4,
|
|
322
|
+
},
|
|
323
|
+
versionLabel: {
|
|
324
|
+
fontSize: 9.5,
|
|
325
|
+
fontWeight: '700',
|
|
326
|
+
color: '#94A3B8',
|
|
327
|
+
letterSpacing: 0.6,
|
|
328
|
+
...fontStack,
|
|
329
|
+
},
|
|
330
|
+
installedChip: {
|
|
331
|
+
backgroundColor: '#E2E8F0',
|
|
332
|
+
paddingHorizontal: 8,
|
|
333
|
+
paddingVertical: 3,
|
|
334
|
+
borderRadius: 6,
|
|
335
|
+
},
|
|
336
|
+
installedText: {
|
|
337
|
+
fontSize: 12,
|
|
338
|
+
fontWeight: '700',
|
|
339
|
+
color: '#475569',
|
|
340
|
+
...fontStack,
|
|
341
|
+
},
|
|
342
|
+
arrowContainer: {
|
|
343
|
+
paddingHorizontal: 6,
|
|
344
|
+
},
|
|
345
|
+
arrowText: {
|
|
346
|
+
fontSize: 14,
|
|
347
|
+
color: '#94A3B8',
|
|
348
|
+
fontWeight: '700',
|
|
349
|
+
},
|
|
350
|
+
latestChip: {
|
|
351
|
+
flexDirection: 'row',
|
|
352
|
+
alignItems: 'center',
|
|
353
|
+
gap: 4,
|
|
354
|
+
backgroundColor: '#EDE9FE',
|
|
355
|
+
paddingHorizontal: 8,
|
|
356
|
+
paddingVertical: 3,
|
|
357
|
+
borderRadius: 6,
|
|
358
|
+
borderWidth: 1,
|
|
359
|
+
borderColor: '#DDD6FE',
|
|
360
|
+
},
|
|
361
|
+
latestText: {
|
|
362
|
+
fontSize: 12,
|
|
363
|
+
fontWeight: '800',
|
|
364
|
+
color: '#6D28D9',
|
|
365
|
+
...fontStack,
|
|
366
|
+
},
|
|
367
|
+
codeSnippetBox: {
|
|
368
|
+
backgroundColor: '#0F172A',
|
|
369
|
+
borderRadius: 12,
|
|
370
|
+
padding: 10,
|
|
371
|
+
width: '100%',
|
|
372
|
+
marginBottom: 14,
|
|
373
|
+
borderWidth: 1,
|
|
374
|
+
borderColor: '#1E293B',
|
|
375
|
+
},
|
|
376
|
+
codeSnippetHeader: {
|
|
377
|
+
flexDirection: 'row',
|
|
378
|
+
justifyContent: 'space-between',
|
|
379
|
+
alignItems: 'center',
|
|
380
|
+
marginBottom: 6,
|
|
381
|
+
},
|
|
382
|
+
codeSnippetLabel: {
|
|
383
|
+
fontSize: 9.5,
|
|
384
|
+
fontWeight: '700',
|
|
385
|
+
color: '#64748B',
|
|
386
|
+
letterSpacing: 0.6,
|
|
387
|
+
...fontStack,
|
|
388
|
+
},
|
|
389
|
+
copiedIndicator: {
|
|
390
|
+
flexDirection: 'row',
|
|
391
|
+
alignItems: 'center',
|
|
392
|
+
gap: 3,
|
|
393
|
+
},
|
|
394
|
+
copiedText: {
|
|
395
|
+
fontSize: 9.5,
|
|
396
|
+
fontWeight: '600',
|
|
397
|
+
color: '#10B981',
|
|
398
|
+
...fontStack,
|
|
399
|
+
},
|
|
400
|
+
commandRow: {
|
|
401
|
+
flexDirection: 'row',
|
|
402
|
+
alignItems: 'center',
|
|
403
|
+
justifyContent: 'space-between',
|
|
404
|
+
backgroundColor: '#1E293B',
|
|
405
|
+
borderRadius: 8,
|
|
406
|
+
paddingVertical: 7,
|
|
407
|
+
paddingHorizontal: 9,
|
|
408
|
+
gap: 8,
|
|
409
|
+
},
|
|
410
|
+
commandText: {
|
|
411
|
+
flex: 1,
|
|
412
|
+
fontSize: 11,
|
|
413
|
+
fontFamily: react_native_1.Platform.OS === 'ios' ? 'Courier' : 'monospace',
|
|
414
|
+
color: '#38BDF8',
|
|
415
|
+
},
|
|
416
|
+
copyIconWrapper: {
|
|
417
|
+
width: 22,
|
|
418
|
+
height: 22,
|
|
419
|
+
borderRadius: 6,
|
|
420
|
+
backgroundColor: '#334155',
|
|
421
|
+
justifyContent: 'center',
|
|
422
|
+
alignItems: 'center',
|
|
423
|
+
},
|
|
424
|
+
buttonRow: {
|
|
425
|
+
flexDirection: 'row',
|
|
426
|
+
justifyContent: 'space-between',
|
|
427
|
+
alignItems: 'center',
|
|
428
|
+
gap: 10,
|
|
429
|
+
width: '100%',
|
|
430
|
+
},
|
|
431
|
+
secondaryButton: {
|
|
432
|
+
flex: 1,
|
|
433
|
+
alignItems: 'center',
|
|
434
|
+
justifyContent: 'center',
|
|
435
|
+
paddingVertical: 11,
|
|
436
|
+
borderRadius: 12,
|
|
437
|
+
backgroundColor: '#F1F5F9',
|
|
438
|
+
borderWidth: 1,
|
|
439
|
+
borderColor: '#E2E8F0',
|
|
440
|
+
},
|
|
441
|
+
secondaryButtonText: {
|
|
442
|
+
fontSize: 13,
|
|
443
|
+
fontWeight: '600',
|
|
444
|
+
color: '#475569',
|
|
445
|
+
...fontStack,
|
|
446
|
+
},
|
|
447
|
+
primaryButton: {
|
|
448
|
+
flex: 1.3,
|
|
449
|
+
flexDirection: 'row',
|
|
450
|
+
alignItems: 'center',
|
|
451
|
+
justifyContent: 'center',
|
|
452
|
+
gap: 6,
|
|
453
|
+
paddingVertical: 11,
|
|
454
|
+
borderRadius: 12,
|
|
455
|
+
backgroundColor: '#7C3AED',
|
|
456
|
+
shadowColor: '#7C3AED',
|
|
457
|
+
shadowOffset: { width: 0, height: 3 },
|
|
458
|
+
shadowOpacity: 0.28,
|
|
459
|
+
shadowRadius: 6,
|
|
460
|
+
elevation: 4,
|
|
461
|
+
},
|
|
462
|
+
primaryButtonText: {
|
|
463
|
+
fontSize: 13,
|
|
464
|
+
fontWeight: '700',
|
|
465
|
+
color: '#FFFFFF',
|
|
466
|
+
...fontStack,
|
|
467
|
+
},
|
|
468
|
+
});
|
|
469
|
+
exports.default = exports.UpdateAvailableModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.0.
|
|
1
|
+
export declare const LIB_VERSION = "2.0.5";
|
|
@@ -3,4 +3,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LIB_VERSION = void 0;
|
|
4
4
|
// AUTO-GENERATED FILE — do not edit by hand.
|
|
5
5
|
// Regenerated from package.json on every build by scripts/gen-version.js.
|
|
6
|
-
exports.LIB_VERSION = '2.0.
|
|
6
|
+
exports.LIB_VERSION = '2.0.5';
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { NetworkLog } from '../types';
|
|
1
|
+
import { NetworkLog, SearchScope } from '../types';
|
|
2
|
+
export interface SearchQueryOptions {
|
|
3
|
+
scope?: SearchScope;
|
|
4
|
+
isRegex?: boolean;
|
|
5
|
+
isCaseSensitive?: boolean;
|
|
6
|
+
}
|
|
2
7
|
/**
|
|
3
8
|
* Parses query strings like `method:POST is:error slow:>1s status:200 auth`
|
|
4
|
-
* and checks whether a given NetworkLog matches all tokens.
|
|
9
|
+
* and checks whether a given NetworkLog matches all tokens against the specified scope.
|
|
5
10
|
*/
|
|
6
|
-
export declare function matchNetworkLogQuery(log: NetworkLog, searchQuery: string, routePath?: string): boolean;
|
|
11
|
+
export declare function matchNetworkLogQuery(log: NetworkLog, searchQuery: string, routePath?: string, options?: SearchQueryOptions): boolean;
|
|
@@ -3,38 +3,74 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.matchNetworkLogQuery = matchNetworkLogQuery;
|
|
4
4
|
/**
|
|
5
5
|
* Parses query strings like `method:POST is:error slow:>1s status:200 auth`
|
|
6
|
-
* and checks whether a given NetworkLog matches all tokens.
|
|
6
|
+
* and checks whether a given NetworkLog matches all tokens against the specified scope.
|
|
7
7
|
*/
|
|
8
|
-
function matchNetworkLogQuery(log, searchQuery, routePath) {
|
|
8
|
+
function matchNetworkLogQuery(log, searchQuery, routePath, options) {
|
|
9
9
|
if (!searchQuery || searchQuery.trim().length === 0)
|
|
10
10
|
return true;
|
|
11
|
-
const rawTokens = searchQuery
|
|
12
|
-
.trim()
|
|
13
|
-
.match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g) || [];
|
|
11
|
+
const rawTokens = searchQuery.trim().match(/(?:[^\s"']+|"[^"]*"|'[^']*')+/g) || [];
|
|
14
12
|
if (rawTokens.length === 0)
|
|
15
13
|
return true;
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
14
|
+
const isCaseSensitive = Boolean(options?.isCaseSensitive);
|
|
15
|
+
const isRegex = Boolean(options?.isRegex);
|
|
16
|
+
const scope = options?.scope || 'all';
|
|
17
|
+
const methodRaw = log.method || '';
|
|
18
|
+
const urlRaw = log.url || '';
|
|
19
|
+
const statusNum = typeof log.status === 'number'
|
|
20
|
+
? log.status
|
|
21
|
+
: parseInt(String(log.status || 0), 10);
|
|
19
22
|
const statusStr = String(log.status ?? '');
|
|
20
23
|
const durationNum = log.duration || 0;
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
const clientRaw = log.client || '';
|
|
25
|
+
const reqRaw = typeof log.request === 'string'
|
|
26
|
+
? log.request
|
|
27
|
+
: JSON.stringify(log.request || '');
|
|
28
|
+
const resRaw = typeof log.response === 'string'
|
|
29
|
+
? log.response
|
|
30
|
+
: JSON.stringify(log.response || '');
|
|
31
|
+
const reqHeadersRaw = JSON.stringify(log.requestHeaders || '');
|
|
32
|
+
const resHeadersRaw = JSON.stringify(log.responseHeaders || '');
|
|
33
|
+
const pathRaw = routePath || '';
|
|
34
|
+
// Construct search corpus based on active scope
|
|
35
|
+
const getScopedCorpus = (caseSens) => {
|
|
36
|
+
let parts = [];
|
|
37
|
+
if (scope === 'url') {
|
|
38
|
+
parts = [methodRaw, urlRaw, pathRaw];
|
|
39
|
+
}
|
|
40
|
+
else if (scope === 'reqBody') {
|
|
41
|
+
parts = [reqRaw];
|
|
42
|
+
}
|
|
43
|
+
else if (scope === 'resBody') {
|
|
44
|
+
parts = [resRaw];
|
|
45
|
+
}
|
|
46
|
+
else if (scope === 'headers') {
|
|
47
|
+
parts = [reqHeadersRaw, resHeadersRaw];
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
parts = [
|
|
51
|
+
methodRaw,
|
|
52
|
+
urlRaw,
|
|
53
|
+
statusStr,
|
|
54
|
+
pathRaw,
|
|
55
|
+
clientRaw,
|
|
56
|
+
reqRaw,
|
|
57
|
+
resRaw,
|
|
58
|
+
reqHeadersRaw,
|
|
59
|
+
resHeadersRaw,
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
const combined = parts.join(' ');
|
|
63
|
+
return caseSens ? combined : combined.toLowerCase();
|
|
64
|
+
};
|
|
65
|
+
const targetCorpus = getScopedCorpus(isCaseSensitive);
|
|
66
|
+
const methodStr = methodRaw.toLowerCase();
|
|
67
|
+
const urlStr = urlRaw.toLowerCase();
|
|
68
|
+
const clientStr = clientRaw.toLowerCase();
|
|
69
|
+
const reqStr = reqRaw.toLowerCase();
|
|
70
|
+
const resStr = resRaw.toLowerCase();
|
|
71
|
+
const reqHeadersStr = reqHeadersRaw.toLowerCase();
|
|
72
|
+
const resHeadersStr = resHeadersRaw.toLowerCase();
|
|
73
|
+
const pathStr = pathRaw.toLowerCase();
|
|
38
74
|
for (const rawToken of rawTokens) {
|
|
39
75
|
const token = rawToken.replace(/^["']|["']$/g, '').trim();
|
|
40
76
|
if (!token)
|
|
@@ -96,7 +132,10 @@ function matchNetworkLogQuery(log, searchQuery, routePath) {
|
|
|
96
132
|
// 3. is:<FLAG>
|
|
97
133
|
if (lowerToken.startsWith('is:')) {
|
|
98
134
|
const flag = lowerToken.slice(3).trim();
|
|
99
|
-
if (flag === 'error' ||
|
|
135
|
+
if (flag === 'error' ||
|
|
136
|
+
flag === 'failed' ||
|
|
137
|
+
flag === 'err' ||
|
|
138
|
+
flag === 'fail') {
|
|
100
139
|
const isErr = log.status === 0 || log.status == null || statusNum >= 400;
|
|
101
140
|
if (!isErr)
|
|
102
141
|
return false;
|
|
@@ -208,14 +247,14 @@ function matchNetworkLogQuery(log, searchQuery, routePath) {
|
|
|
208
247
|
// 8. req:<TERM> or body:<TERM>
|
|
209
248
|
if (lowerToken.startsWith('req:') || lowerToken.startsWith('body:')) {
|
|
210
249
|
const target = lowerToken.replace(/^(req:|body:)/, '').trim();
|
|
211
|
-
if (!reqStr.
|
|
250
|
+
if (!reqStr.includes(target))
|
|
212
251
|
return false;
|
|
213
252
|
continue;
|
|
214
253
|
}
|
|
215
254
|
// 9. res:<TERM>
|
|
216
255
|
if (lowerToken.startsWith('res:')) {
|
|
217
256
|
const target = lowerToken.slice(4).trim();
|
|
218
|
-
if (!resStr.
|
|
257
|
+
if (!resStr.includes(target))
|
|
219
258
|
return false;
|
|
220
259
|
continue;
|
|
221
260
|
}
|
|
@@ -227,9 +266,24 @@ function matchNetworkLogQuery(log, searchQuery, routePath) {
|
|
|
227
266
|
}
|
|
228
267
|
continue;
|
|
229
268
|
}
|
|
230
|
-
// 11. Generic
|
|
231
|
-
if (
|
|
232
|
-
|
|
269
|
+
// 11. Generic Match (handles Regex, Case-sensitivity, and Scoped corpus)
|
|
270
|
+
if (isRegex) {
|
|
271
|
+
try {
|
|
272
|
+
const re = new RegExp(token, isCaseSensitive ? '' : 'i');
|
|
273
|
+
if (!re.test(targetCorpus))
|
|
274
|
+
return false;
|
|
275
|
+
}
|
|
276
|
+
catch {
|
|
277
|
+
const queryTerm = isCaseSensitive ? token : lowerToken;
|
|
278
|
+
if (!targetCorpus.includes(queryTerm))
|
|
279
|
+
return false;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
else {
|
|
283
|
+
const queryTerm = isCaseSensitive ? token : lowerToken;
|
|
284
|
+
if (!targetCorpus.includes(queryTerm)) {
|
|
285
|
+
return false;
|
|
286
|
+
}
|
|
233
287
|
}
|
|
234
288
|
}
|
|
235
289
|
return true;
|
|
@@ -31,8 +31,8 @@ const constants_1 = require("../constants");
|
|
|
31
31
|
const NativeInspector_1 = require("../native/NativeInspector");
|
|
32
32
|
// ─── GA4 Measurement Protocol Configuration ──────────────────────────────────
|
|
33
33
|
// Automatically replaced at build-time from .env by scripts/inject-telemetry.js
|
|
34
|
-
exports.GA4_MEASUREMENT_ID = 'G-
|
|
35
|
-
exports.GA4_API_SECRET = '
|
|
34
|
+
exports.GA4_MEASUREMENT_ID = 'G-3QGMQVZX5V';
|
|
35
|
+
exports.GA4_API_SECRET = 'C46RQZ3PTfmHDnLnvU3KIg';
|
|
36
36
|
const GA4_ENDPOINT = 'https://www.google-analytics.com/mp/collect';
|
|
37
37
|
const CLIENT_ID_KEY = 'telemetry_client_id';
|
|
38
38
|
// Stable session ID created once per JavaScript runtime instance
|
|
@@ -254,9 +254,9 @@ async function trackTelemetryEvent(eventName, params = {}, options) {
|
|
|
254
254
|
return;
|
|
255
255
|
// Don't send if credentials haven't been configured yet
|
|
256
256
|
if (!exports.GA4_MEASUREMENT_ID ||
|
|
257
|
-
exports.GA4_MEASUREMENT_ID === 'G-
|
|
257
|
+
exports.GA4_MEASUREMENT_ID === 'G-3QGMQVZX5V' ||
|
|
258
258
|
!exports.GA4_API_SECRET ||
|
|
259
|
-
exports.GA4_API_SECRET === '
|
|
259
|
+
exports.GA4_API_SECRET === 'C46RQZ3PTfmHDnLnvU3KIg') {
|
|
260
260
|
return;
|
|
261
261
|
}
|
|
262
262
|
try {
|