react-native-inapp-inspector 1.1.34 → 1.1.35
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/ConsoleLogCard.js +57 -56
- package/dist/commonjs/components/CopyButton.js +7 -1
- package/dist/commonjs/components/Inspector/BundleTab.js +19 -19
- package/dist/commonjs/components/Inspector/CrashDetail.js +16 -12
- package/dist/commonjs/components/Inspector/InspectorHeader.js +16 -16
- package/dist/commonjs/components/Inspector/MainScreen.js +6 -2
- package/dist/commonjs/components/Inspector/NetworkTab.js +97 -1
- package/dist/commonjs/components/Inspector/ReduxDetail.js +24 -19
- package/dist/commonjs/components/Inspector/ReduxTab.js +12 -8
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1243 -673
- package/dist/commonjs/components/LogCard.js +27 -9
- package/dist/commonjs/components/MetaAccordion.js +42 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +9 -0
- package/dist/commonjs/components/NetworkIcons.js +48 -1
- package/dist/commonjs/components/Toast.js +3 -3
- package/dist/commonjs/components/TouchableScale.d.ts +4 -2
- package/dist/commonjs/components/TouchableScale.js +4 -4
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +10 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.d.ts +2 -0
- package/dist/commonjs/customHooks/bundleAnalyzer.js +26 -17
- package/dist/commonjs/customHooks/consoleLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/consoleLogger.js +10 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +2 -0
- package/dist/commonjs/customHooks/crashHandler.js +10 -1
- package/dist/commonjs/customHooks/networkLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/networkLogger.js +12 -1
- package/dist/commonjs/customHooks/performanceTracker.d.ts +3 -1
- package/dist/commonjs/customHooks/performanceTracker.js +18 -4
- package/dist/commonjs/customHooks/reduxLogger.d.ts +2 -0
- package/dist/commonjs/customHooks/reduxLogger.js +10 -1
- package/dist/commonjs/i18n/locales/en.json +96 -28
- package/dist/commonjs/index.js +78 -34
- package/dist/commonjs/styles/AppColors.d.ts +28 -0
- package/dist/commonjs/styles/AppColors.js +30 -0
- package/dist/esm/components/ConsoleLogCard.js +58 -57
- package/dist/esm/components/CopyButton.js +7 -1
- package/dist/esm/components/Inspector/BundleTab.js +19 -19
- package/dist/esm/components/Inspector/CrashDetail.js +16 -12
- package/dist/esm/components/Inspector/InspectorHeader.js +16 -16
- package/dist/esm/components/Inspector/MainScreen.js +6 -2
- package/dist/esm/components/Inspector/NetworkTab.js +99 -3
- package/dist/esm/components/Inspector/ReduxDetail.js +24 -19
- package/dist/esm/components/Inspector/ReduxTab.js +12 -8
- package/dist/esm/components/Inspector/SettingsPanel.js +1246 -676
- package/dist/esm/components/LogCard.js +27 -9
- package/dist/esm/components/MetaAccordion.js +42 -0
- package/dist/esm/components/NetworkIcons.d.ts +9 -0
- package/dist/esm/components/NetworkIcons.js +38 -0
- package/dist/esm/components/Toast.js +3 -3
- package/dist/esm/components/TouchableScale.d.ts +4 -2
- package/dist/esm/components/TouchableScale.js +4 -4
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +2 -0
- package/dist/esm/customHooks/analyticsLogger.js +7 -0
- package/dist/esm/customHooks/bundleAnalyzer.d.ts +2 -0
- package/dist/esm/customHooks/bundleAnalyzer.js +23 -16
- package/dist/esm/customHooks/consoleLogger.d.ts +2 -0
- package/dist/esm/customHooks/consoleLogger.js +7 -0
- package/dist/esm/customHooks/crashHandler.d.ts +2 -0
- package/dist/esm/customHooks/crashHandler.js +7 -0
- package/dist/esm/customHooks/networkLogger.d.ts +2 -0
- package/dist/esm/customHooks/networkLogger.js +9 -0
- package/dist/esm/customHooks/performanceTracker.d.ts +3 -1
- package/dist/esm/customHooks/performanceTracker.js +15 -3
- package/dist/esm/customHooks/reduxLogger.d.ts +2 -0
- package/dist/esm/customHooks/reduxLogger.js +7 -0
- package/dist/esm/i18n/locales/en.json +96 -28
- package/dist/esm/index.js +64 -20
- package/dist/esm/styles/AppColors.d.ts +28 -0
- package/dist/esm/styles/AppColors.js +30 -0
- package/package.json +3 -2
|
@@ -172,11 +172,11 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
172
172
|
styles_1.default.chip,
|
|
173
173
|
{
|
|
174
174
|
backgroundColor: item.url.toLowerCase().startsWith('https')
|
|
175
|
-
?
|
|
176
|
-
:
|
|
175
|
+
? AppColors_1.AppColors.mintGreenBg
|
|
176
|
+
: AppColors_1.AppColors.amberWarmBg,
|
|
177
177
|
borderColor: item.url.toLowerCase().startsWith('https')
|
|
178
|
-
?
|
|
179
|
-
:
|
|
178
|
+
? AppColors_1.AppColors.mintGreenBorder
|
|
179
|
+
: AppColors_1.AppColors.amberWarmBorder,
|
|
180
180
|
paddingHorizontal: 4,
|
|
181
181
|
paddingVertical: 1,
|
|
182
182
|
borderRadius: 4,
|
|
@@ -188,8 +188,8 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
188
188
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
189
189
|
fontSize: 8,
|
|
190
190
|
color: item.url.toLowerCase().startsWith('https')
|
|
191
|
-
?
|
|
192
|
-
:
|
|
191
|
+
? AppColors_1.AppColors.mintGreenText
|
|
192
|
+
: AppColors_1.AppColors.amber700,
|
|
193
193
|
},
|
|
194
194
|
]}>
|
|
195
195
|
{item.url.toLowerCase().startsWith('https') ? 'HTTPS' : 'HTTP'}
|
|
@@ -202,8 +202,8 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
202
202
|
item.client === 'graphql') && (<react_native_1.View style={[
|
|
203
203
|
styles_1.default.chip,
|
|
204
204
|
{
|
|
205
|
-
backgroundColor:
|
|
206
|
-
borderColor:
|
|
205
|
+
backgroundColor: AppColors_1.AppColors.roseBg,
|
|
206
|
+
borderColor: AppColors_1.AppColors.roseBorder,
|
|
207
207
|
paddingHorizontal: 4,
|
|
208
208
|
paddingVertical: 1,
|
|
209
209
|
borderRadius: 4,
|
|
@@ -214,7 +214,7 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
214
214
|
{
|
|
215
215
|
fontFamily: AppFonts_1.AppFonts.interBold,
|
|
216
216
|
fontSize: 8,
|
|
217
|
-
color:
|
|
217
|
+
color: AppColors_1.AppColors.pink600,
|
|
218
218
|
},
|
|
219
219
|
]}>
|
|
220
220
|
GQL
|
|
@@ -354,6 +354,24 @@ const LogCard = react_1.default.memo(function LogCard({ item, onPress, timelineM
|
|
|
354
354
|
</react_native_1.View>)}
|
|
355
355
|
</react_native_1.View>
|
|
356
356
|
</react_native_1.View>
|
|
357
|
+
|
|
358
|
+
{/* Mini Latency Timing Waterfall Bar */}
|
|
359
|
+
{typeof item.duration === 'number' && item.duration > 0 && !isFailed && (<react_native_1.View style={{ marginTop: 6, gap: 2 }}>
|
|
360
|
+
<react_native_1.View style={{
|
|
361
|
+
height: 2.5,
|
|
362
|
+
width: '100%',
|
|
363
|
+
backgroundColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
364
|
+
borderRadius: 1.5,
|
|
365
|
+
overflow: 'hidden',
|
|
366
|
+
}}>
|
|
367
|
+
<react_native_1.View style={{
|
|
368
|
+
height: '100%',
|
|
369
|
+
width: `${Math.min(100, Math.max(6, (item.duration / 1200) * 100))}%`,
|
|
370
|
+
backgroundColor: durationColor,
|
|
371
|
+
borderRadius: 1.5,
|
|
372
|
+
}}/>
|
|
373
|
+
</react_native_1.View>
|
|
374
|
+
</react_native_1.View>)}
|
|
357
375
|
</react_native_1.View>
|
|
358
376
|
<react_native_1.Animated.View pointerEvents="none" style={[
|
|
359
377
|
react_native_1.StyleSheet.absoluteFill,
|
|
@@ -208,6 +208,48 @@ const MetaAccordion = ({ status, statusColor, duration, size, triggeredAt, metho
|
|
|
208
208
|
</react_native_1.Text>
|
|
209
209
|
</react_native_1.View>
|
|
210
210
|
</react_native_1.View>
|
|
211
|
+
|
|
212
|
+
{/* Visual Latency Timing Breakdown Waterfall */}
|
|
213
|
+
{duration != null && !isFailed && (<react_native_1.View style={{ paddingVertical: 8, gap: 6 }}>
|
|
214
|
+
<react_native_1.View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
215
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 11, color: AppColors_1.AppColors.primaryBlack }}>
|
|
216
|
+
{t('network.timingWaterfall')}
|
|
217
|
+
</react_native_1.Text>
|
|
218
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interMedium, fontSize: 10.5, color: (0, helpers_1.getDurationColor)(duration) }}>
|
|
219
|
+
{duration < constants_1.DURATION_FAST_MS
|
|
220
|
+
? t('network.perf.fast')
|
|
221
|
+
: duration < constants_1.DURATION_SLOW_MS
|
|
222
|
+
? t('network.perf.moderate')
|
|
223
|
+
: t('network.perf.slow')}
|
|
224
|
+
</react_native_1.Text>
|
|
225
|
+
</react_native_1.View>
|
|
226
|
+
|
|
227
|
+
<react_native_1.View style={{
|
|
228
|
+
height: 6,
|
|
229
|
+
backgroundColor: AppColors_1.AppColors.grayBorderSecondary,
|
|
230
|
+
borderRadius: 3,
|
|
231
|
+
overflow: 'hidden',
|
|
232
|
+
}}>
|
|
233
|
+
<react_native_1.View style={{
|
|
234
|
+
height: '100%',
|
|
235
|
+
width: `${Math.min(100, Math.max(8, (duration / 1200) * 100))}%`,
|
|
236
|
+
backgroundColor: (0, helpers_1.getDurationColor)(duration),
|
|
237
|
+
borderRadius: 3,
|
|
238
|
+
}}/>
|
|
239
|
+
</react_native_1.View>
|
|
240
|
+
|
|
241
|
+
<react_native_1.View style={{ flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', marginTop: 1 }}>
|
|
242
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 9.5, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
243
|
+
0 ms
|
|
244
|
+
</react_native_1.Text>
|
|
245
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interBold, fontSize: 10, color: (0, helpers_1.getDurationColor)(duration) }}>
|
|
246
|
+
{duration} ms
|
|
247
|
+
</react_native_1.Text>
|
|
248
|
+
<react_native_1.Text style={{ fontFamily: AppFonts_1.AppFonts.interRegular, fontSize: 9.5, color: AppColors_1.AppColors.grayTextWeak }}>
|
|
249
|
+
1,200+ ms
|
|
250
|
+
</react_native_1.Text>
|
|
251
|
+
</react_native_1.View>
|
|
252
|
+
</react_native_1.View>)}
|
|
211
253
|
<react_native_1.View style={styles_1.default.metaDivider}/>
|
|
212
254
|
|
|
213
255
|
<react_native_1.View style={styles_1.default.metaRow}>
|
|
@@ -115,3 +115,12 @@ export declare const AppFramesIcon: ({ color, size, }: IconProps) => React.JSX.E
|
|
|
115
115
|
export declare const AllFramesIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
116
116
|
export declare const ListenerIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
117
117
|
export declare const LoadingSpinnerIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
118
|
+
export declare const FlaskIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
119
|
+
export declare const ZapIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
120
|
+
export declare const DiceIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
121
|
+
export declare const BarChartIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
122
|
+
export declare const KeyIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
123
|
+
export declare const SmartphoneIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
124
|
+
export declare const AlertTriangleIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
125
|
+
export declare const BugIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
126
|
+
export declare const TagIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.InfoCircleIcon = exports.UserIcon = exports.LayersIcon = exports.WipeIcon = exports.FolderIcon = exports.SettingsIcon = exports.EyeIcon = exports.JsIcon = exports.CssIcon = exports.HtmlIcon = exports.BrandSquareIcon = exports.BrandCircleIcon = exports.MoonIcon = exports.SunIcon = exports.DebugIcon = exports.InsightsIcon = exports.AnalyticsIcon = exports.WhiteBackNavigation = exports.CloseWhite = exports.DownloadIcon = exports.FilterIcon = exports.ChevronIcon = exports.SortArrowIcon = exports.GlobeIcon = exports.DiffIcon = exports.SignalIcon = exports.ExportIcon = exports.HeaderPauseIcon = exports.TrashIcon = exports.FailIcon = exports.CircleAlertIcon = exports.CircleXIcon = exports.CircleCheckIcon = exports.CheckIcon = exports.TerminalIcon = exports.FetchIcon = exports.CopyIcon = exports.HeadersIcon = exports.ResponseIcon = exports.RequestIcon = exports.SizeIcon = exports.StatusIcon = exports.CalendarIcon = exports.ClockIcon = exports.ClearIcon = exports.SearchIcon = exports.ExpandCollapseIcon = exports.ScreenIcon = exports.MapPinIcon = exports.EmptyRadarIcon = void 0;
|
|
40
40
|
exports.DiagnosticsIcon = exports.StackTraceIcon = exports.LayoutIcon = exports.ChipIcon = exports.SkullIcon = exports.ShieldAlertIcon = exports.CrashIcon = exports.UserCheckIcon = exports.TargetGoalIcon = exports.RepeatIcon = exports.PinIcon = exports.HourglassIcon = exports.FlameIcon = exports.CodeBracketsIcon = exports.AndroidIcon = exports.AppleIcon = exports.LinkChainIcon = exports.GitHubIcon = exports.PackageBoxIcon = exports.ExternalLinkIcon = exports.MoneyIcon = exports.CartIcon = exports.TextAaIcon = exports.BrainIcon = exports.AtomIcon = exports.MapIcon = exports.SparkleIcon = exports.LightbulbIcon = exports.DocIcon = exports.FolderOpenIcon = exports.BanIcon = exports.BoltIcon = exports.PerformanceIcon = exports.ReduxIcon = exports.MetadataIcon = exports.StorageIcon = exports.RefreshCcwIcon = exports.TimelineIcon = exports.LiveStateIcon = exports.BundleIcon = exports.ForwardChevronIcon = exports.PackageIcon = exports.TableIcon = exports.RawIcon = exports.PrettyIcon = exports.SortIcon = exports.MotionIcon = exports.TrendingUpIcon = exports.ErrorCircleIcon = exports.WarningTriangleIcon = void 0;
|
|
41
|
-
exports.LoadingSpinnerIcon = exports.ListenerIcon = exports.AllFramesIcon = exports.AppFramesIcon = exports.RawJsonIcon = exports.TrailIcon = void 0;
|
|
41
|
+
exports.TagIcon = exports.BugIcon = exports.AlertTriangleIcon = exports.SmartphoneIcon = exports.KeyIcon = exports.BarChartIcon = exports.DiceIcon = exports.ZapIcon = exports.FlaskIcon = exports.LoadingSpinnerIcon = exports.ListenerIcon = exports.AllFramesIcon = exports.AppFramesIcon = exports.RawJsonIcon = exports.TrailIcon = void 0;
|
|
42
42
|
const react_1 = __importDefault(require("react"));
|
|
43
43
|
const react_native_svg_1 = __importStar(require("react-native-svg"));
|
|
44
44
|
// Stylesheet
|
|
@@ -808,3 +808,50 @@ const LoadingSpinnerIcon = ({ color = AppColors_1.AppColors.amber800Warm, size =
|
|
|
808
808
|
</react_native_svg_1.default>);
|
|
809
809
|
};
|
|
810
810
|
exports.LoadingSpinnerIcon = LoadingSpinnerIcon;
|
|
811
|
+
const FlaskIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
812
|
+
<react_native_svg_1.Path d="M10 2v5.5L4.4 18.2A2 2 0 0 0 6.2 21h11.6a2 2 0 0 0 1.8-2.8L14 7.5V2M8.5 2h7M7 15h10" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
813
|
+
<react_native_svg_1.Circle cx="12" cy="18" r="1" fill={color}/>
|
|
814
|
+
</react_native_svg_1.default>);
|
|
815
|
+
exports.FlaskIcon = FlaskIcon;
|
|
816
|
+
const ZapIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
817
|
+
<react_native_svg_1.Path d="M13 2 3 14h9l-1 8 10-12h-9l1-8z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
818
|
+
</react_native_svg_1.default>);
|
|
819
|
+
exports.ZapIcon = ZapIcon;
|
|
820
|
+
const DiceIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
821
|
+
<react_native_svg_1.Rect x="3" y="3" width="18" height="18" rx="4" stroke={color} strokeWidth="1.8"/>
|
|
822
|
+
<react_native_svg_1.Circle cx="8.5" cy="8.5" r="1.5" fill={color}/>
|
|
823
|
+
<react_native_svg_1.Circle cx="15.5" cy="8.5" r="1.5" fill={color}/>
|
|
824
|
+
<react_native_svg_1.Circle cx="12" cy="12" r="1.5" fill={color}/>
|
|
825
|
+
<react_native_svg_1.Circle cx="8.5" cy="15.5" r="1.5" fill={color}/>
|
|
826
|
+
<react_native_svg_1.Circle cx="15.5" cy="15.5" r="1.5" fill={color}/>
|
|
827
|
+
</react_native_svg_1.default>);
|
|
828
|
+
exports.DiceIcon = DiceIcon;
|
|
829
|
+
const BarChartIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
830
|
+
<react_native_svg_1.Path d="M18 20V10M12 20V4M6 20v-6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
831
|
+
</react_native_svg_1.default>);
|
|
832
|
+
exports.BarChartIcon = BarChartIcon;
|
|
833
|
+
const KeyIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
834
|
+
<react_native_svg_1.Circle cx="7.5" cy="15.5" r="4.5" stroke={color} strokeWidth="1.8"/>
|
|
835
|
+
<react_native_svg_1.Path d="m11 12 8.5-8.5M16 4.5l3 3M19 7.5l2-2" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
836
|
+
</react_native_svg_1.default>);
|
|
837
|
+
exports.KeyIcon = KeyIcon;
|
|
838
|
+
const SmartphoneIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
839
|
+
<react_native_svg_1.Rect x="5" y="2" width="14" height="20" rx="3" stroke={color} strokeWidth="1.8"/>
|
|
840
|
+
<react_native_svg_1.Path d="M12 18h.01" stroke={color} strokeWidth="2.5" strokeLinecap="round"/>
|
|
841
|
+
</react_native_svg_1.default>);
|
|
842
|
+
exports.SmartphoneIcon = SmartphoneIcon;
|
|
843
|
+
const AlertTriangleIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
844
|
+
<react_native_svg_1.Path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
845
|
+
<react_native_svg_1.Path d="M12 9v4M12 17h.01" stroke={color} strokeWidth="2" strokeLinecap="round"/>
|
|
846
|
+
</react_native_svg_1.default>);
|
|
847
|
+
exports.AlertTriangleIcon = AlertTriangleIcon;
|
|
848
|
+
const BugIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
849
|
+
<react_native_svg_1.Rect width="8" height="12" x="8" y="8" rx="4" stroke={color} strokeWidth="1.8"/>
|
|
850
|
+
<react_native_svg_1.Path d="m19 7-3 2M5 7l3 2M19 19l-3-2M5 19l3-2M20 13h-4M4 13h4M10 4l2 2 2-2" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
851
|
+
</react_native_svg_1.default>);
|
|
852
|
+
exports.BugIcon = BugIcon;
|
|
853
|
+
const TagIcon = ({ color = AppColors_1.AppColors.grayTextWeak, size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 24 24" fill="none">
|
|
854
|
+
<react_native_svg_1.Path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8 8a2 2 0 0 0 2.828 0l7.172-7.172a2 2 0 0 0 0-2.828l-8-8z" stroke={color} strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round"/>
|
|
855
|
+
<react_native_svg_1.Circle cx="7.5" cy="7.5" r="1.5" fill={color}/>
|
|
856
|
+
</react_native_svg_1.default>);
|
|
857
|
+
exports.TagIcon = TagIcon;
|
|
@@ -120,17 +120,17 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
120
120
|
toastCard: {
|
|
121
121
|
flexDirection: 'row',
|
|
122
122
|
alignItems: 'center',
|
|
123
|
-
backgroundColor:
|
|
123
|
+
backgroundColor: AppColors_1.AppColors.toastBg,
|
|
124
124
|
paddingVertical: 10,
|
|
125
125
|
paddingHorizontal: 16,
|
|
126
126
|
borderRadius: 24,
|
|
127
|
-
shadowColor:
|
|
127
|
+
shadowColor: AppColors_1.AppColors.black,
|
|
128
128
|
shadowOffset: { width: 0, height: 6 },
|
|
129
129
|
shadowOpacity: 0.28,
|
|
130
130
|
shadowRadius: 10,
|
|
131
131
|
elevation: 8,
|
|
132
132
|
borderWidth: 1,
|
|
133
|
-
borderColor:
|
|
133
|
+
borderColor: AppColors_1.AppColors.toastBorder,
|
|
134
134
|
maxWidth: '90%',
|
|
135
135
|
gap: 9,
|
|
136
136
|
},
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
import { PressableProps } from 'react-native';
|
|
3
|
+
export interface TouchableScaleProps extends PressableProps {
|
|
3
4
|
onPress?: () => void;
|
|
4
5
|
onLongPress?: () => void;
|
|
5
6
|
style?: any;
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
hitSlop?: any;
|
|
8
9
|
disabled?: boolean;
|
|
9
|
-
}
|
|
10
|
+
}
|
|
11
|
+
declare const TouchableScale: React.NamedExoticComponent<TouchableScaleProps>;
|
|
10
12
|
export default TouchableScale;
|
|
@@ -35,12 +35,12 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
const react_1 = __importStar(require("react"));
|
|
37
37
|
const react_native_1 = require("react-native");
|
|
38
|
-
const TouchableScale = react_1.default.memo(function TouchableScale({ onPress, onLongPress, style, children, hitSlop, disabled, }) {
|
|
38
|
+
const TouchableScale = react_1.default.memo(function TouchableScale({ onPress, onLongPress, style, children, hitSlop, disabled, accessible, accessibilityRole, accessibilityLabel, accessibilityHint, accessibilityState, accessibilityValue, ...rest }) {
|
|
39
39
|
if (react_native_1.Platform.OS === 'android') {
|
|
40
|
-
return (<react_native_1.Pressable disabled={disabled} onPress={onPress} onLongPress={onLongPress} hitSlop={hitSlop} style={({ pressed }) => [
|
|
40
|
+
return (<react_native_1.Pressable accessible={accessible} accessibilityRole={accessibilityRole} accessibilityLabel={accessibilityLabel} accessibilityHint={accessibilityHint} accessibilityState={accessibilityState} accessibilityValue={accessibilityValue} disabled={disabled} onPress={onPress} onLongPress={onLongPress} hitSlop={hitSlop} style={({ pressed }) => [
|
|
41
41
|
style,
|
|
42
42
|
{ opacity: pressed ? 0.75 : 1 },
|
|
43
|
-
]}>
|
|
43
|
+
]} {...rest}>
|
|
44
44
|
{children}
|
|
45
45
|
</react_native_1.Pressable>);
|
|
46
46
|
}
|
|
@@ -73,7 +73,7 @@ const TouchableScale = react_1.default.memo(function TouchableScale({ onPress, o
|
|
|
73
73
|
flexShrink: flattenedStyle.flexShrink,
|
|
74
74
|
gap: flattenedStyle.gap,
|
|
75
75
|
};
|
|
76
|
-
return (<react_native_1.Pressable disabled={disabled} style={style} onPressIn={() => animatePress(true)} onPressOut={() => animatePress(false)} onPress={onPress} onLongPress={onLongPress} hitSlop={hitSlop}>
|
|
76
|
+
return (<react_native_1.Pressable accessible={accessible} accessibilityRole={accessibilityRole} accessibilityLabel={accessibilityLabel} accessibilityHint={accessibilityHint} accessibilityState={accessibilityState} accessibilityValue={accessibilityValue} disabled={disabled} style={style} onPressIn={() => animatePress(true)} onPressOut={() => animatePress(false)} onPress={onPress} onLongPress={onLongPress} hitSlop={hitSlop} {...rest}>
|
|
77
77
|
<react_native_1.Animated.View style={[{ opacity, transform: [{ scale }] }, layoutStyle]}>
|
|
78
78
|
{children}
|
|
79
79
|
</react_native_1.Animated.View>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "1.1.
|
|
1
|
+
export declare const LIB_VERSION = "1.1.35";
|
|
@@ -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 = '1.1.
|
|
6
|
+
exports.LIB_VERSION = '1.1.35';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { AnalyticsEvent } from '../types';
|
|
2
|
+
export declare const setAnalyticsModuleEnabled: (enabled: boolean) => void;
|
|
3
|
+
export declare const getAnalyticsModuleEnabled: () => boolean;
|
|
2
4
|
export declare const subscribeAnalyticsEvents: (callback: (events: AnalyticsEvent[]) => void) => () => void;
|
|
3
5
|
export declare const clearAnalyticsEvents: () => void;
|
|
4
6
|
export declare const getAnalyticsEvents: () => AnalyticsEvent[];
|
|
@@ -22,11 +22,18 @@
|
|
|
22
22
|
// setUserId(id)
|
|
23
23
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.autoSetupAnalyticsLogger = exports.setupAnalyticsLogger = exports.isAnalyticsConnected = exports.logAnalyticsEvent = exports.getCollectionEnabled = exports.getDefaultEventParameters = exports.getCurrentUserId = exports.getCurrentUserProperties = exports.getAnalyticsEvents = exports.clearAnalyticsEvents = exports.subscribeAnalyticsEvents = void 0;
|
|
25
|
+
exports.autoSetupAnalyticsLogger = exports.setupAnalyticsLogger = exports.isAnalyticsConnected = exports.logAnalyticsEvent = exports.getCollectionEnabled = exports.getDefaultEventParameters = exports.getCurrentUserId = exports.getCurrentUserProperties = exports.getAnalyticsEvents = exports.clearAnalyticsEvents = exports.subscribeAnalyticsEvents = exports.getAnalyticsModuleEnabled = exports.setAnalyticsModuleEnabled = void 0;
|
|
26
26
|
// ─── Internal state ───────────────────────────────────────────────────────────
|
|
27
27
|
let events = [];
|
|
28
28
|
let listeners = [];
|
|
29
29
|
let counter = 0;
|
|
30
|
+
let isAnalyticsModuleEnabled = false;
|
|
31
|
+
const setAnalyticsModuleEnabled = (enabled) => {
|
|
32
|
+
isAnalyticsModuleEnabled = enabled;
|
|
33
|
+
};
|
|
34
|
+
exports.setAnalyticsModuleEnabled = setAnalyticsModuleEnabled;
|
|
35
|
+
const getAnalyticsModuleEnabled = () => isAnalyticsModuleEnabled;
|
|
36
|
+
exports.getAnalyticsModuleEnabled = getAnalyticsModuleEnabled;
|
|
30
37
|
// Running snapshot of user properties set so far — attached to every event
|
|
31
38
|
let currentUserProperties = {};
|
|
32
39
|
let currentUserId;
|
|
@@ -38,6 +45,8 @@ const notify = () => {
|
|
|
38
45
|
listeners.forEach(cb => cb(snapshot));
|
|
39
46
|
};
|
|
40
47
|
const addEvent = (event) => {
|
|
48
|
+
if (!isAnalyticsModuleEnabled)
|
|
49
|
+
return;
|
|
41
50
|
events.unshift(event);
|
|
42
51
|
events = events.slice(0, 200);
|
|
43
52
|
notify();
|
|
@@ -103,6 +103,8 @@ export interface HostBundleAnalysisResult {
|
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
|
+
export declare const setBundleModuleEnabled: (enabled: boolean) => void;
|
|
107
|
+
export declare const getBundleModuleEnabled: () => boolean;
|
|
106
108
|
export declare const getHostScriptURL: () => string;
|
|
107
109
|
export declare const trackRuntimeModuleExecution: () => void;
|
|
108
110
|
export declare const trackRuntimeDefine: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCachedBundleAnalysis = exports.clearCachedBundleAnalysis = exports.analyzeHostAppBundle = exports.getInitialBundleAnalysis = exports.parseBundleSource = exports.trackRuntimeDefine = exports.trackRuntimeModuleExecution = exports.getHostScriptURL = void 0;
|
|
3
|
+
exports.getCachedBundleAnalysis = exports.clearCachedBundleAnalysis = exports.analyzeHostAppBundle = exports.getInitialBundleAnalysis = exports.parseBundleSource = exports.trackRuntimeDefine = exports.trackRuntimeModuleExecution = exports.getHostScriptURL = exports.getBundleModuleEnabled = exports.setBundleModuleEnabled = void 0;
|
|
4
4
|
const AppColors_1 = require("../styles/AppColors");
|
|
5
5
|
const i18n_1 = require("../i18n");
|
|
6
6
|
// ─── Real Host App Bundle Analyzer ──────────────────────────────────────────
|
|
@@ -16,6 +16,13 @@ const react_native_1 = require("react-native");
|
|
|
16
16
|
let cachedAnalysis = null;
|
|
17
17
|
let isAnalyzing = false;
|
|
18
18
|
const subscribers = [];
|
|
19
|
+
let isBundleModuleEnabled = false;
|
|
20
|
+
const setBundleModuleEnabled = (enabled) => {
|
|
21
|
+
isBundleModuleEnabled = enabled;
|
|
22
|
+
};
|
|
23
|
+
exports.setBundleModuleEnabled = setBundleModuleEnabled;
|
|
24
|
+
const getBundleModuleEnabled = () => isBundleModuleEnabled;
|
|
25
|
+
exports.getBundleModuleEnabled = getBundleModuleEnabled;
|
|
19
26
|
const getSourceCodeModule = () => {
|
|
20
27
|
try {
|
|
21
28
|
const legacy = react_native_1.NativeModules?.SourceCode;
|
|
@@ -705,31 +712,33 @@ const parseBundleSource = (bundleText, totalBytes, scriptURL, isLive = true) =>
|
|
|
705
712
|
const releaseJsMb = Number(((totalDevKb * 0.38) / 1024).toFixed(2));
|
|
706
713
|
const nodeModulesMb = Number((nodeModulesKb / 1024).toFixed(2));
|
|
707
714
|
const assetsMediaMb = Number((assetsMediaKb / 1024).toFixed(2));
|
|
708
|
-
|
|
715
|
+
// In node_modules, only ~15-20% of packages contain compiled native code (C++ .so, Swift/Obj-C)
|
|
716
|
+
// Clamp effective native packages so large JS dependency trees (150+ packages) scale realistically
|
|
717
|
+
const effectiveNativePkgCount = Math.min(packagesList.length, 55);
|
|
709
718
|
// ─── 1. iOS Binary Calculations (.ipa / App Store) ────────────────────────
|
|
710
719
|
// Base React Native iOS engine Mach-O + third-party dynamic Frameworks + Assets + Hermes
|
|
711
|
-
const nativeFrameworksMb = Number((
|
|
712
|
-
const nativeMachoMb = Number((
|
|
713
|
-
const assetsCatalogMb = Number((
|
|
720
|
+
const nativeFrameworksMb = Number((48.0 + effectiveNativePkgCount * 0.35 + nodeModulesMb * 0.9).toFixed(1));
|
|
721
|
+
const nativeMachoMb = Number((38.0 + effectiveNativePkgCount * 0.22 + nodeModulesMb * 0.6).toFixed(1));
|
|
722
|
+
const assetsCatalogMb = Number((30.0 + assetsMediaMb * 2.2).toFixed(1));
|
|
714
723
|
const metadataMb = 6.4;
|
|
715
724
|
const iosInstallMb = Number((releaseJsMb + nativeFrameworksMb + nativeMachoMb + assetsCatalogMb + metadataMb).toFixed(1));
|
|
716
|
-
// iOS .ipa is a compressed ZIP archive of the app bundle (typically
|
|
717
|
-
const iosDownloadMb = Number((iosInstallMb * 0.
|
|
725
|
+
// iOS .ipa is a compressed ZIP archive of the app bundle (typically 65% of on-device install footprint) -> ~111.9 MB
|
|
726
|
+
const iosDownloadMb = Number((iosInstallMb * 0.655).toFixed(1));
|
|
718
727
|
// ─── 2. Android Google Play App Bundle (.aab / dynamic split delivery) ───
|
|
719
|
-
const androidCppMb = Number((
|
|
720
|
-
const androidDexMb = Number((
|
|
721
|
-
const androidResMb = Number((
|
|
728
|
+
const androidCppMb = Number((20.0 + effectiveNativePkgCount * 0.12 + nodeModulesMb * 0.4).toFixed(1));
|
|
729
|
+
const androidDexMb = Number((14.0 + effectiveNativePkgCount * 0.08 + nodeModulesMb * 0.25).toFixed(1));
|
|
730
|
+
const androidResMb = Number((16.0 + assetsMediaMb * 1.5).toFixed(1));
|
|
722
731
|
const androidInstallMb = Number((releaseJsMb + androidCppMb + androidDexMb + androidResMb + 3.8).toFixed(1));
|
|
723
|
-
const androidDownloadMb = Number((androidInstallMb * 0.
|
|
732
|
+
const androidDownloadMb = Number((androidInstallMb * 0.54).toFixed(1));
|
|
724
733
|
// ─── 3. Universal Standalone FAT APK (.apk) ───────────────────────────────
|
|
725
734
|
// Multi-ABI FAT APK bundling 4 distinct native architectures (arm64-v8a + armeabi-v7a + x86_64 + x86)
|
|
726
|
-
//
|
|
727
|
-
const androidMultiAbiCppMb = Number((
|
|
728
|
-
const androidApkDexMb = Number((
|
|
729
|
-
const androidApkResMb = Number((
|
|
730
|
-
const androidApkMetaMb = 8.
|
|
735
|
+
// Base multi-ABI engine C++ libraries (libhermes.so, libreactnativejni.so, libfbjni.so, libc++_shared.so) ~195 MB
|
|
736
|
+
const androidMultiAbiCppMb = Number((195.0 + effectiveNativePkgCount * 0.55 + nodeModulesMb * 1.6).toFixed(1));
|
|
737
|
+
const androidApkDexMb = Number((54.0 + effectiveNativePkgCount * 0.2 + nodeModulesMb * 0.6).toFixed(1));
|
|
738
|
+
const androidApkResMb = Number((58.0 + assetsMediaMb * 2.8).toFixed(1));
|
|
739
|
+
const androidApkMetaMb = 8.5;
|
|
731
740
|
const androidApkInstallMb = Number((releaseJsMb + androidMultiAbiCppMb + androidApkDexMb + androidApkResMb + androidApkMetaMb).toFixed(1));
|
|
732
|
-
const androidApkDownloadMb = Number(
|
|
741
|
+
const androidApkDownloadMb = Number(androidApkInstallMb.toFixed(1));
|
|
733
742
|
const iosComponents = [
|
|
734
743
|
{
|
|
735
744
|
id: 'ios-c1',
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ConsoleLog } from '../types';
|
|
2
|
+
export declare const setConsoleModuleEnabled: (enabled: boolean) => void;
|
|
3
|
+
export declare const getConsoleModuleEnabled: () => boolean;
|
|
2
4
|
export declare const addLogFromCrash: (error: any, message: string, stack?: string, isFatal?: boolean) => ConsoleLog;
|
|
3
5
|
export declare const subscribeConsoleLogs: (callback: (logs: ConsoleLog[]) => void) => () => void;
|
|
4
6
|
export declare const clearConsoleLogs: () => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupConsoleLogger = exports.getConsoleLogs = exports.clearConsoleLogs = exports.subscribeConsoleLogs = exports.addLogFromCrash = void 0;
|
|
3
|
+
exports.setupConsoleLogger = exports.getConsoleLogs = exports.clearConsoleLogs = exports.subscribeConsoleLogs = exports.addLogFromCrash = exports.getConsoleModuleEnabled = exports.setConsoleModuleEnabled = void 0;
|
|
4
4
|
const react_native_1 = require("react-native");
|
|
5
5
|
const logFilters_1 = require("./logFilters");
|
|
6
6
|
const crashHandler_1 = require("./crashHandler");
|
|
@@ -8,6 +8,13 @@ let logs = [];
|
|
|
8
8
|
let listeners = [];
|
|
9
9
|
let counter = 0;
|
|
10
10
|
let isIntercepting = false;
|
|
11
|
+
let isConsoleModuleEnabled = true;
|
|
12
|
+
const setConsoleModuleEnabled = (enabled) => {
|
|
13
|
+
isConsoleModuleEnabled = enabled;
|
|
14
|
+
};
|
|
15
|
+
exports.setConsoleModuleEnabled = setConsoleModuleEnabled;
|
|
16
|
+
const getConsoleModuleEnabled = () => isConsoleModuleEnabled;
|
|
17
|
+
exports.getConsoleModuleEnabled = getConsoleModuleEnabled;
|
|
11
18
|
const MAX_LOGS = 100;
|
|
12
19
|
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
13
20
|
const formatArgs = (args) => {
|
|
@@ -189,6 +196,8 @@ const notify = () => {
|
|
|
189
196
|
listeners.forEach(cb => cb(snapshot));
|
|
190
197
|
};
|
|
191
198
|
const addLog = (type, args, sourceMethod) => {
|
|
199
|
+
if (!isConsoleModuleEnabled)
|
|
200
|
+
return;
|
|
192
201
|
if (isIntercepting)
|
|
193
202
|
return;
|
|
194
203
|
isIntercepting = true;
|
|
@@ -11,6 +11,8 @@ export interface CrashEventPayload {
|
|
|
11
11
|
}
|
|
12
12
|
export { CrashExportFormat };
|
|
13
13
|
type CrashListener = (payload: CrashEventPayload) => void;
|
|
14
|
+
export declare const setCrashModuleEnabled: (enabled: boolean) => void;
|
|
15
|
+
export declare const getCrashModuleEnabled: () => boolean;
|
|
14
16
|
export declare const setMaxCrashLogsLimit: (max: number) => void;
|
|
15
17
|
export declare const addCrashBreadcrumb: (type: CrashBreadcrumb["type"], message: string, data?: any) => void;
|
|
16
18
|
export declare const recordNavigationBreadcrumb: (fromRoute: string, toRoute: string) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setupGlobalCrashHandler = exports.exportCrashReport = exports.simulateTestCrash = exports.recordCustomCrash = exports.handleInterceptedCrash = exports.emitCrashEvent = exports.subscribeCrashEvents = exports.clearCrashRecords = exports.getCrashRecords = exports.computeCrashFingerprint = exports.parseCrashStackTrace = exports.getCrashBreadcrumbs = exports.clearCrashBreadcrumbs = exports.recordUserActionBreadcrumb = exports.recordReduxBreadcrumb = exports.recordNetworkBreadcrumb = exports.recordNavigationBreadcrumb = exports.addCrashBreadcrumb = exports.setMaxCrashLogsLimit = exports.CrashExportFormat = void 0;
|
|
3
|
+
exports.setupGlobalCrashHandler = exports.exportCrashReport = exports.simulateTestCrash = exports.recordCustomCrash = exports.handleInterceptedCrash = exports.emitCrashEvent = exports.subscribeCrashEvents = exports.clearCrashRecords = exports.getCrashRecords = exports.computeCrashFingerprint = exports.parseCrashStackTrace = exports.getCrashBreadcrumbs = exports.clearCrashBreadcrumbs = exports.recordUserActionBreadcrumb = exports.recordReduxBreadcrumb = exports.recordNetworkBreadcrumb = exports.recordNavigationBreadcrumb = exports.addCrashBreadcrumb = exports.setMaxCrashLogsLimit = exports.getCrashModuleEnabled = exports.setCrashModuleEnabled = exports.CrashExportFormat = void 0;
|
|
4
4
|
const react_native_1 = require("react-native");
|
|
5
5
|
const enums_1 = require("../types/enums");
|
|
6
6
|
Object.defineProperty(exports, "CrashExportFormat", { enumerable: true, get: function () { return enums_1.CrashExportFormat; } });
|
|
@@ -14,6 +14,13 @@ let breadcrumbsStore = [];
|
|
|
14
14
|
const MAX_BREADCRUMBS = 50;
|
|
15
15
|
let maxStoredCrashes = 100;
|
|
16
16
|
const appStartTime = Date.now();
|
|
17
|
+
let isCrashModuleEnabled = false;
|
|
18
|
+
const setCrashModuleEnabled = (enabled) => {
|
|
19
|
+
isCrashModuleEnabled = enabled;
|
|
20
|
+
};
|
|
21
|
+
exports.setCrashModuleEnabled = setCrashModuleEnabled;
|
|
22
|
+
const getCrashModuleEnabled = () => isCrashModuleEnabled;
|
|
23
|
+
exports.getCrashModuleEnabled = getCrashModuleEnabled;
|
|
17
24
|
// ─── BREADCRUMB MANAGERS ───────────────────────────────────────────────────────
|
|
18
25
|
const setMaxCrashLogsLimit = (max) => {
|
|
19
26
|
maxStoredCrashes = Math.max(10, max);
|
|
@@ -23,6 +30,8 @@ const setMaxCrashLogsLimit = (max) => {
|
|
|
23
30
|
};
|
|
24
31
|
exports.setMaxCrashLogsLimit = setMaxCrashLogsLimit;
|
|
25
32
|
const addCrashBreadcrumb = (type, message, data) => {
|
|
33
|
+
if (!isCrashModuleEnabled)
|
|
34
|
+
return;
|
|
26
35
|
try {
|
|
27
36
|
const entry = {
|
|
28
37
|
type,
|
|
@@ -12,6 +12,8 @@ type NetworkLog = {
|
|
|
12
12
|
requestHeaders?: Record<string, string>;
|
|
13
13
|
responseHeaders?: Record<string, string>;
|
|
14
14
|
};
|
|
15
|
+
export declare const setNetworkModuleEnabled: (enabled: boolean) => void;
|
|
16
|
+
export declare const getNetworkModuleEnabled: () => boolean;
|
|
15
17
|
export declare const subscribeNetworkLogs: (callback: (logs: NetworkLog[]) => void) => () => void;
|
|
16
18
|
export declare const clearNetworkLogs: () => void;
|
|
17
19
|
export declare const getNetworkLogs: () => NetworkLog[];
|
|
@@ -3,12 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.addAxiosInterceptors = exports.setupNetworkLogger = exports.getNetworkLogs = exports.clearNetworkLogs = exports.subscribeNetworkLogs = void 0;
|
|
6
|
+
exports.addAxiosInterceptors = exports.setupNetworkLogger = exports.getNetworkLogs = exports.clearNetworkLogs = exports.subscribeNetworkLogs = exports.getNetworkModuleEnabled = exports.setNetworkModuleEnabled = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const crashHandler_1 = require("./crashHandler");
|
|
9
9
|
let logs = [];
|
|
10
10
|
let listeners = [];
|
|
11
11
|
let counter = 0;
|
|
12
|
+
let isNetworkModuleEnabled = true;
|
|
13
|
+
const setNetworkModuleEnabled = (enabled) => {
|
|
14
|
+
isNetworkModuleEnabled = enabled;
|
|
15
|
+
};
|
|
16
|
+
exports.setNetworkModuleEnabled = setNetworkModuleEnabled;
|
|
17
|
+
const getNetworkModuleEnabled = () => isNetworkModuleEnabled;
|
|
18
|
+
exports.getNetworkModuleEnabled = getNetworkModuleEnabled;
|
|
12
19
|
const ALLOWED_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE"];
|
|
13
20
|
const IGNORED_URL_PATTERNS = [
|
|
14
21
|
/\/symbolicate(?:[/?#]|$)/i,
|
|
@@ -121,6 +128,8 @@ const notify = () => {
|
|
|
121
128
|
listeners.forEach((cb) => cb(snapshot));
|
|
122
129
|
};
|
|
123
130
|
const addOrUpdateLog = (log) => {
|
|
131
|
+
if (!isNetworkModuleEnabled)
|
|
132
|
+
return;
|
|
124
133
|
const method = log.method?.toUpperCase();
|
|
125
134
|
if (!ALLOWED_METHODS.includes(method))
|
|
126
135
|
return;
|
|
@@ -144,6 +153,8 @@ const setupNetworkLogger = () => {
|
|
|
144
153
|
const originalFetch = globalThis.fetch;
|
|
145
154
|
if (originalFetch) {
|
|
146
155
|
globalThis.fetch = async (url, options = {}) => {
|
|
156
|
+
if (!isNetworkModuleEnabled)
|
|
157
|
+
return originalFetch(url, options);
|
|
147
158
|
const method = (options?.method || "GET").toUpperCase();
|
|
148
159
|
if (!ALLOWED_METHODS.includes(method))
|
|
149
160
|
return originalFetch(url, options);
|
|
@@ -77,6 +77,8 @@ export declare function getCallerSourceFile(fallbackName?: string): string;
|
|
|
77
77
|
export declare const getInitialRenderProfiles: () => ComponentRenderProfile[];
|
|
78
78
|
export declare const getInitialPerformanceEvents: () => PerformanceEvent[];
|
|
79
79
|
export declare const INITIAL_EVENTS: PerformanceEvent[];
|
|
80
|
+
export declare const setPerformanceModuleEnabled: (enabled: boolean) => void;
|
|
81
|
+
export declare const getPerformanceModuleEnabled: () => boolean;
|
|
80
82
|
export declare const subscribeRenderProfiles: (listener: (profiles: ComponentRenderProfile[]) => void) => () => void;
|
|
81
83
|
export declare const getRenderProfiles: () => ComponentRenderProfile[];
|
|
82
84
|
export declare const registerComponentProfile: (profile: ComponentRenderProfile) => void;
|
|
@@ -129,7 +131,7 @@ export declare const useComponentProfiler: (componentName: string, options?: {
|
|
|
129
131
|
sourceFile?: string;
|
|
130
132
|
propsToCompare?: Record<string, any>;
|
|
131
133
|
}) => void;
|
|
132
|
-
export declare const usePerformanceTracker: () => {
|
|
134
|
+
export declare const usePerformanceTracker: (enabled?: boolean) => {
|
|
133
135
|
isRecording: boolean;
|
|
134
136
|
setIsRecording: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
135
137
|
currentFps: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPerformanceEvents = exports.subscribePerformanceEvents = exports.clearPerformanceEvents = exports.logPerformanceEvent = exports.usePerformanceTracker = exports.useComponentProfiler = exports.measureAsync = exports.trackHeavyTask = exports.useNavigationProfiler = exports.trackNavigationTransition = exports.getHermesMemoryStats = exports.trackComponentRender = exports.registerComponentProfile = exports.getRenderProfiles = exports.subscribeRenderProfiles = exports.INITIAL_EVENTS = exports.getInitialPerformanceEvents = exports.getInitialRenderProfiles = exports.generateFixSnippet = void 0;
|
|
3
|
+
exports.getPerformanceEvents = exports.subscribePerformanceEvents = exports.clearPerformanceEvents = exports.logPerformanceEvent = exports.usePerformanceTracker = exports.useComponentProfiler = exports.measureAsync = exports.trackHeavyTask = exports.useNavigationProfiler = exports.trackNavigationTransition = exports.getHermesMemoryStats = exports.trackComponentRender = exports.registerComponentProfile = exports.getRenderProfiles = exports.subscribeRenderProfiles = exports.getPerformanceModuleEnabled = exports.setPerformanceModuleEnabled = exports.INITIAL_EVENTS = exports.getInitialPerformanceEvents = exports.getInitialRenderProfiles = exports.generateFixSnippet = void 0;
|
|
4
4
|
exports.getCallerSourceFile = getCallerSourceFile;
|
|
5
5
|
const AppColors_1 = require("../styles/AppColors");
|
|
6
6
|
const i18n_1 = require("../i18n");
|
|
@@ -177,6 +177,13 @@ exports.getInitialRenderProfiles = getInitialRenderProfiles;
|
|
|
177
177
|
const getInitialPerformanceEvents = () => [];
|
|
178
178
|
exports.getInitialPerformanceEvents = getInitialPerformanceEvents;
|
|
179
179
|
exports.INITIAL_EVENTS = [];
|
|
180
|
+
let isPerformanceModuleEnabled = false;
|
|
181
|
+
const setPerformanceModuleEnabled = (enabled) => {
|
|
182
|
+
isPerformanceModuleEnabled = enabled;
|
|
183
|
+
};
|
|
184
|
+
exports.setPerformanceModuleEnabled = setPerformanceModuleEnabled;
|
|
185
|
+
const getPerformanceModuleEnabled = () => isPerformanceModuleEnabled;
|
|
186
|
+
exports.getPerformanceModuleEnabled = getPerformanceModuleEnabled;
|
|
180
187
|
const globalRenderRegistry = new Map();
|
|
181
188
|
const renderListeners = new Set();
|
|
182
189
|
const notifyRenderListeners = () => {
|
|
@@ -199,11 +206,15 @@ exports.subscribeRenderProfiles = subscribeRenderProfiles;
|
|
|
199
206
|
const getRenderProfiles = () => Array.from(globalRenderRegistry.values());
|
|
200
207
|
exports.getRenderProfiles = getRenderProfiles;
|
|
201
208
|
const registerComponentProfile = (profile) => {
|
|
209
|
+
if (!isPerformanceModuleEnabled)
|
|
210
|
+
return;
|
|
202
211
|
globalRenderRegistry.set(profile.name, profile);
|
|
203
212
|
notifyRenderListeners();
|
|
204
213
|
};
|
|
205
214
|
exports.registerComponentProfile = registerComponentProfile;
|
|
206
215
|
const trackComponentRender = (params) => {
|
|
216
|
+
if (!isPerformanceModuleEnabled)
|
|
217
|
+
return;
|
|
207
218
|
const existing = globalRenderRegistry.get(params.name);
|
|
208
219
|
const now = Date.now();
|
|
209
220
|
const renderTimeMs = params.renderTimeMs ?? 1.5;
|
|
@@ -451,7 +462,8 @@ const useComponentProfiler = (componentName, options) => {
|
|
|
451
462
|
});
|
|
452
463
|
};
|
|
453
464
|
exports.useComponentProfiler = useComponentProfiler;
|
|
454
|
-
const usePerformanceTracker = () => {
|
|
465
|
+
const usePerformanceTracker = (enabled = true) => {
|
|
466
|
+
const isTrackerActive = enabled && isPerformanceModuleEnabled;
|
|
455
467
|
const [isRecording, setIsRecording] = (0, react_1.useState)(true);
|
|
456
468
|
const [currentFps, setCurrentFps] = (0, react_1.useState)(60);
|
|
457
469
|
const [minFps, setMinFps] = (0, react_1.useState)(60);
|
|
@@ -465,6 +477,8 @@ const usePerformanceTracker = () => {
|
|
|
465
477
|
const [renderProfiles, setRenderProfiles] = (0, react_1.useState)(() => (0, exports.getRenderProfiles)());
|
|
466
478
|
const [events, setEvents] = (0, react_1.useState)(() => (0, exports.getPerformanceEvents)());
|
|
467
479
|
(0, react_1.useEffect)(() => {
|
|
480
|
+
if (!isTrackerActive)
|
|
481
|
+
return;
|
|
468
482
|
const unsubRender = (0, exports.subscribeRenderProfiles)(profiles => {
|
|
469
483
|
setRenderProfiles(profiles);
|
|
470
484
|
});
|
|
@@ -475,13 +489,13 @@ const usePerformanceTracker = () => {
|
|
|
475
489
|
unsubRender();
|
|
476
490
|
unsubEvents();
|
|
477
491
|
};
|
|
478
|
-
}, []);
|
|
492
|
+
}, [isTrackerActive]);
|
|
479
493
|
const lastFrameTimeRef = (0, react_1.useRef)(Date.now());
|
|
480
494
|
const rafIdRef = (0, react_1.useRef)(null);
|
|
481
495
|
const appStartTimestampRef = (0, react_1.useRef)(Date.now());
|
|
482
496
|
// Live Frame Measurement Loop
|
|
483
497
|
(0, react_1.useEffect)(() => {
|
|
484
|
-
if (!isRecording)
|
|
498
|
+
if (!isTrackerActive || !isRecording)
|
|
485
499
|
return;
|
|
486
500
|
let isMounted = true;
|
|
487
501
|
let frameCount = 0;
|