react-native-inapp-inspector 1.1.33 → 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 +268 -27
- 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 +80 -33
- 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 +268 -27
- 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 +77 -32
- 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;
|
|
@@ -520,9 +527,18 @@ const parseBundleSource = (bundleText, totalBytes, scriptURL, isLive = true) =>
|
|
|
520
527
|
category = 'json';
|
|
521
528
|
color = AppColors_1.AppColors.emerald500;
|
|
522
529
|
}
|
|
523
|
-
// Approximate module size from total and module count
|
|
530
|
+
// Approximate module size from total dev size and module count
|
|
524
531
|
const approxKb = Math.max(2, Math.round((totalDevKb * 0.15) / Math.max(modules.length, 20)));
|
|
525
|
-
|
|
532
|
+
// In React Native Metro bundler, modules included in the bundle are transitively
|
|
533
|
+
// imported from the entrypoint (index.js / App.tsx) and active in the dependency tree.
|
|
534
|
+
// A module is marked as 'Not Consumed' only if it is an orphaned test file, mock fixture, or dead spec.
|
|
535
|
+
const isTestOrFixture = cleanPath.includes('.test.') ||
|
|
536
|
+
cleanPath.includes('.spec.') ||
|
|
537
|
+
cleanPath.includes('__tests__') ||
|
|
538
|
+
cleanPath.includes('__mocks__') ||
|
|
539
|
+
cleanPath.includes('.stories.') ||
|
|
540
|
+
cleanPath.includes('fixtures/');
|
|
541
|
+
const isConsumed = !isTestOrFixture;
|
|
526
542
|
discoveredFiles.push({
|
|
527
543
|
id: `host-file-${fileIdx++}`,
|
|
528
544
|
name,
|
|
@@ -535,7 +551,7 @@ const parseBundleSource = (bundleText, totalBytes, scriptURL, isLive = true) =>
|
|
|
535
551
|
status: isConsumed ? 'optimal' : 'warning',
|
|
536
552
|
advice: isConsumed
|
|
537
553
|
? 'In-Use: Bundled and active in host application dependency tree'
|
|
538
|
-
: 'Not consumed:
|
|
554
|
+
: 'Not consumed: Test fixture or orphaned file packaged in bundle',
|
|
539
555
|
isConsumed,
|
|
540
556
|
});
|
|
541
557
|
}
|
|
@@ -669,25 +685,60 @@ const parseBundleSource = (bundleText, totalBytes, scriptURL, isLive = true) =>
|
|
|
669
685
|
});
|
|
670
686
|
// Sort packages by size descending
|
|
671
687
|
packagesList.sort((a, b) => b.sizeKb - a.sizeKb);
|
|
672
|
-
// Compute Development Split-Up
|
|
673
|
-
|
|
674
|
-
const
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
688
|
+
// Compute Development Split-Up dynamically from real discovered files and packages
|
|
689
|
+
let realNodeModulesKb = 0;
|
|
690
|
+
for (const pkg of packagesList) {
|
|
691
|
+
realNodeModulesKb += pkg.sizeKb || 0;
|
|
692
|
+
}
|
|
693
|
+
let realAppSourceKb = 0;
|
|
694
|
+
let realAssetsMediaKb = 0;
|
|
695
|
+
for (const file of discoveredFiles) {
|
|
696
|
+
if (file.category === 'image' || file.category === 'font') {
|
|
697
|
+
realAssetsMediaKb += file.sizeKb || 0;
|
|
698
|
+
}
|
|
699
|
+
else {
|
|
700
|
+
realAppSourceKb += file.sizeKb || 0;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
const appSourceKb = realAppSourceKb > 0 ? realAppSourceKb : Math.round(totalDevKb * 0.18);
|
|
704
|
+
const nodeModulesKb = realNodeModulesKb > 0 ? realNodeModulesKb : Math.round(totalDevKb * 0.58);
|
|
705
|
+
const assetsMediaKb = realAssetsMediaKb > 0 ? realAssetsMediaKb : Math.round(totalDevKb * 0.08);
|
|
706
|
+
const metroOverheadKb = Math.max(0, totalDevKb - appSourceKb - nodeModulesKb - assetsMediaKb);
|
|
707
|
+
// ─── Production Binary (.ipa / .aab / .apk) Dynamically Scaled ────────────
|
|
708
|
+
// Fully dynamic across any React Native project based on:
|
|
709
|
+
// 1. Exact Hermes bytecode size (releaseJsMb derived from totalDevKb)
|
|
710
|
+
// 2. Exact third-party package count and dependency weight
|
|
711
|
+
// 3. Exact media assets, fonts, and images size (assetsMediaKb)
|
|
679
712
|
const releaseJsMb = Number(((totalDevKb * 0.38) / 1024).toFixed(2));
|
|
680
|
-
const
|
|
681
|
-
const
|
|
682
|
-
|
|
683
|
-
|
|
713
|
+
const nodeModulesMb = Number((nodeModulesKb / 1024).toFixed(2));
|
|
714
|
+
const assetsMediaMb = Number((assetsMediaKb / 1024).toFixed(2));
|
|
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);
|
|
718
|
+
// ─── 1. iOS Binary Calculations (.ipa / App Store) ────────────────────────
|
|
719
|
+
// Base React Native iOS engine Mach-O + third-party dynamic Frameworks + Assets + Hermes
|
|
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));
|
|
723
|
+
const metadataMb = 6.4;
|
|
684
724
|
const iosInstallMb = Number((releaseJsMb + nativeFrameworksMb + nativeMachoMb + assetsCatalogMb + metadataMb).toFixed(1));
|
|
685
|
-
|
|
686
|
-
const
|
|
687
|
-
|
|
688
|
-
const
|
|
689
|
-
const
|
|
690
|
-
const
|
|
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));
|
|
727
|
+
// ─── 2. Android Google Play App Bundle (.aab / dynamic split delivery) ───
|
|
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));
|
|
731
|
+
const androidInstallMb = Number((releaseJsMb + androidCppMb + androidDexMb + androidResMb + 3.8).toFixed(1));
|
|
732
|
+
const androidDownloadMb = Number((androidInstallMb * 0.54).toFixed(1));
|
|
733
|
+
// ─── 3. Universal Standalone FAT APK (.apk) ───────────────────────────────
|
|
734
|
+
// Multi-ABI FAT APK bundling 4 distinct native architectures (arm64-v8a + armeabi-v7a + x86_64 + x86)
|
|
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;
|
|
740
|
+
const androidApkInstallMb = Number((releaseJsMb + androidMultiAbiCppMb + androidApkDexMb + androidApkResMb + androidApkMetaMb).toFixed(1));
|
|
741
|
+
const androidApkDownloadMb = Number(androidApkInstallMb.toFixed(1));
|
|
691
742
|
const iosComponents = [
|
|
692
743
|
{
|
|
693
744
|
id: 'ios-c1',
|
|
@@ -785,17 +836,13 @@ const parseBundleSource = (bundleText, totalBytes, scriptURL, isLive = true) =>
|
|
|
785
836
|
id: 'and-c5',
|
|
786
837
|
name: (0, i18n_1.t)('bundle.andComp5Name'),
|
|
787
838
|
category: 'meta',
|
|
788
|
-
sizeMb:
|
|
789
|
-
pct: Number(((
|
|
839
|
+
sizeMb: 3.8,
|
|
840
|
+
pct: Number(((3.8 / androidInstallMb) * 100).toFixed(1)),
|
|
790
841
|
color: AppColors_1.AppColors.amber500,
|
|
791
842
|
description: (0, i18n_1.t)('bundle.andComp5Desc'),
|
|
792
843
|
advice: (0, i18n_1.t)('bundle.andComp5Advice'),
|
|
793
844
|
},
|
|
794
845
|
];
|
|
795
|
-
// Universal Standalone APK metrics (Multi-ABI FAT APK: arm64 + v7a + x86_64)
|
|
796
|
-
const androidMultiAbiCppMb = Number((androidCppMb * 2.6).toFixed(1));
|
|
797
|
-
const androidApkInstallMb = Number((releaseJsMb + androidMultiAbiCppMb + androidDexMb + androidResMb + 3.2).toFixed(1));
|
|
798
|
-
const androidApkDownloadMb = Number((androidApkInstallMb * 0.58).toFixed(1));
|
|
799
846
|
const androidApkComponents = [
|
|
800
847
|
{
|
|
801
848
|
id: 'apk-c1',
|
|
@@ -811,8 +858,8 @@ const parseBundleSource = (bundleText, totalBytes, scriptURL, isLive = true) =>
|
|
|
811
858
|
id: 'apk-c2',
|
|
812
859
|
name: (0, i18n_1.t)('bundle.apkComp2Name'),
|
|
813
860
|
category: 'frameworks',
|
|
814
|
-
sizeMb:
|
|
815
|
-
pct: Number(((
|
|
861
|
+
sizeMb: androidApkDexMb,
|
|
862
|
+
pct: Number(((androidApkDexMb / androidApkInstallMb) * 100).toFixed(1)),
|
|
816
863
|
color: AppColors_1.AppColors.indigo500,
|
|
817
864
|
description: (0, i18n_1.t)('bundle.apkComp2Desc'),
|
|
818
865
|
advice: (0, i18n_1.t)('bundle.apkComp2Advice'),
|
|
@@ -821,8 +868,8 @@ const parseBundleSource = (bundleText, totalBytes, scriptURL, isLive = true) =>
|
|
|
821
868
|
id: 'apk-c3',
|
|
822
869
|
name: (0, i18n_1.t)('bundle.apkComp3Name'),
|
|
823
870
|
category: 'assets',
|
|
824
|
-
sizeMb:
|
|
825
|
-
pct: Number(((
|
|
871
|
+
sizeMb: androidApkResMb,
|
|
872
|
+
pct: Number(((androidApkResMb / androidApkInstallMb) * 100).toFixed(1)),
|
|
826
873
|
color: AppColors_1.AppColors.pink500,
|
|
827
874
|
description: (0, i18n_1.t)('bundle.apkComp3Desc'),
|
|
828
875
|
advice: (0, i18n_1.t)('bundle.apkComp3Advice'),
|
|
@@ -841,8 +888,8 @@ const parseBundleSource = (bundleText, totalBytes, scriptURL, isLive = true) =>
|
|
|
841
888
|
id: 'apk-c5',
|
|
842
889
|
name: (0, i18n_1.t)('bundle.apkComp5Name'),
|
|
843
890
|
category: 'meta',
|
|
844
|
-
sizeMb:
|
|
845
|
-
pct: Number(((
|
|
891
|
+
sizeMb: androidApkMetaMb,
|
|
892
|
+
pct: Number(((androidApkMetaMb / androidApkInstallMb) * 100).toFixed(1)),
|
|
846
893
|
color: AppColors_1.AppColors.amber500,
|
|
847
894
|
description: (0, i18n_1.t)('bundle.apkComp5Desc'),
|
|
848
895
|
advice: (0, i18n_1.t)('bundle.apkComp5Advice'),
|
|
@@ -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[];
|