react-native-inapp-inspector 1.1.34 → 2.0.0
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/README.md +123 -101
- package/android/build.gradle +13 -1
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +904 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorPackage.kt +17 -0
- package/dist/commonjs/components/ConsoleLogCard.js +57 -56
- package/dist/commonjs/components/CopyButton.js +10 -1
- package/dist/commonjs/components/ErrorBoundary.js +3 -0
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +7 -3
- package/dist/commonjs/components/Inspector/BundleTab.js +20 -20
- package/dist/commonjs/components/Inspector/ConsoleTab.js +1 -1
- package/dist/commonjs/components/Inspector/CrashDetail.js +16 -12
- package/dist/commonjs/components/Inspector/CrashTab.js +97 -90
- package/dist/commonjs/components/Inspector/InspectorHeader.js +28 -24
- package/dist/commonjs/components/Inspector/MainScreen.js +20 -103
- package/dist/commonjs/components/Inspector/NetworkTab.js +143 -10
- package/dist/commonjs/components/Inspector/PerformanceTab.js +96 -3
- package/dist/commonjs/components/Inspector/ReduxDetail.js +24 -19
- package/dist/commonjs/components/Inspector/ReduxTab.js +30 -18
- package/dist/commonjs/components/Inspector/SettingsPanel.js +1578 -754
- package/dist/commonjs/components/Inspector/TabBar.js +6 -3
- package/dist/commonjs/components/LogCard.js +27 -9
- package/dist/commonjs/components/MetaAccordion.js +42 -0
- package/dist/commonjs/components/NetworkIcons.d.ts +10 -0
- package/dist/commonjs/components/NetworkIcons.js +53 -1
- package/dist/commonjs/components/Toast.js +3 -3
- package/dist/commonjs/components/TouchableScale.d.ts +5 -2
- package/dist/commonjs/components/TouchableScale.js +30 -32
- package/dist/commonjs/constants/index.d.ts +1 -2
- package/dist/commonjs/constants/index.js +4 -0
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/analyticsLogger.d.ts +6 -0
- package/dist/commonjs/customHooks/analyticsLogger.js +16 -5
- 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 +17 -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/helpers/index.js +10 -1
- package/dist/commonjs/helpers/settingsStore.d.ts +9 -0
- package/dist/commonjs/helpers/settingsStore.js +59 -3
- package/dist/commonjs/i18n/locales/en.json +96 -28
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +307 -73
- package/dist/commonjs/native/NativeInspector.d.ts +125 -0
- package/dist/commonjs/native/NativeInspector.js +313 -0
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +22 -0
- package/dist/commonjs/native/NativeNetworkInspector.js +4 -0
- package/dist/commonjs/styles/AppColors.d.ts +28 -0
- package/dist/commonjs/styles/AppColors.js +30 -0
- package/dist/commonjs/styles/index.js +6 -6
- package/dist/commonjs/types/enums.d.ts +1 -1
- package/dist/commonjs/types/interfaces.d.ts +9 -0
- package/dist/esm/components/ConsoleLogCard.js +58 -57
- package/dist/esm/components/CopyButton.js +10 -1
- package/dist/esm/components/ErrorBoundary.js +3 -0
- package/dist/esm/components/Inspector/AnalyticsTab.js +7 -3
- package/dist/esm/components/Inspector/BundleTab.js +20 -20
- package/dist/esm/components/Inspector/ConsoleTab.js +1 -1
- package/dist/esm/components/Inspector/CrashDetail.js +16 -12
- package/dist/esm/components/Inspector/CrashTab.js +97 -90
- package/dist/esm/components/Inspector/InspectorHeader.js +29 -25
- package/dist/esm/components/Inspector/MainScreen.js +21 -71
- package/dist/esm/components/Inspector/NetworkTab.js +145 -12
- package/dist/esm/components/Inspector/PerformanceTab.js +96 -3
- package/dist/esm/components/Inspector/ReduxDetail.js +24 -19
- package/dist/esm/components/Inspector/ReduxTab.js +30 -18
- package/dist/esm/components/Inspector/SettingsPanel.js +1582 -758
- package/dist/esm/components/Inspector/TabBar.js +7 -4
- package/dist/esm/components/LogCard.js +27 -9
- package/dist/esm/components/MetaAccordion.js +42 -0
- package/dist/esm/components/NetworkIcons.d.ts +10 -0
- package/dist/esm/components/NetworkIcons.js +42 -0
- package/dist/esm/components/Toast.js +3 -3
- package/dist/esm/components/TouchableScale.d.ts +5 -2
- package/dist/esm/components/TouchableScale.js +31 -33
- package/dist/esm/constants/index.d.ts +1 -2
- package/dist/esm/constants/index.js +4 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/analyticsLogger.d.ts +6 -0
- package/dist/esm/customHooks/analyticsLogger.js +12 -4
- 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 +14 -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/helpers/index.js +10 -1
- package/dist/esm/helpers/settingsStore.d.ts +9 -0
- package/dist/esm/helpers/settingsStore.js +58 -3
- package/dist/esm/i18n/locales/en.json +96 -28
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +279 -59
- package/dist/esm/native/NativeInspector.d.ts +125 -0
- package/dist/esm/native/NativeInspector.js +289 -0
- package/dist/esm/native/NativeNetworkInspector.d.ts +22 -0
- package/dist/esm/native/NativeNetworkInspector.js +2 -0
- package/dist/esm/styles/AppColors.d.ts +28 -0
- package/dist/esm/styles/AppColors.js +30 -0
- package/dist/esm/styles/index.js +6 -6
- package/dist/esm/types/enums.d.ts +1 -1
- package/dist/esm/types/interfaces.d.ts +9 -0
- package/ios/NetworkInspectorModule.h +6 -0
- package/ios/NetworkInspectorModule.m +720 -5
- package/package.json +15 -3
- package/react-native-inapp-inspector.podspec +7 -2
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.java +0 -97
- package/android/src/main/java/com/inappinspector/NetworkInspectorPackage.java +0 -28
|
@@ -6,12 +6,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
const react_1 = __importDefault(require("react"));
|
|
7
7
|
const react_native_1 = require("react-native");
|
|
8
8
|
const InspectorContext_1 = require("./InspectorContext");
|
|
9
|
-
const TouchableScale_1 = __importDefault(require("../TouchableScale"));
|
|
10
9
|
const styles_1 = __importDefault(require("../../styles"));
|
|
11
10
|
const AppColors_1 = require("../../styles/AppColors");
|
|
12
11
|
const NetworkIcons_1 = require("../NetworkIcons");
|
|
13
12
|
const reduxLogger_1 = require("../../customHooks/reduxLogger");
|
|
14
13
|
const analyticsLogger_1 = require("../../customHooks/analyticsLogger");
|
|
14
|
+
const NativeInspector_1 = require("../../native/NativeInspector");
|
|
15
15
|
const TabBar = react_1.default.memo(() => {
|
|
16
16
|
const { activeTab, switchActiveTab, tabVisibility, logs, consoleLogs, analyticsEvents, crashRecords, lastReadApisCount, lastReadLogsCount, lastReadCrashesCount, unreadPulseAnim, } = (0, InspectorContext_1.useInspector)();
|
|
17
17
|
const isReduxAvail = (0, reduxLogger_1.isReduxConnected)();
|
|
@@ -85,7 +85,10 @@ const TabBar = react_1.default.memo(() => {
|
|
|
85
85
|
consoleLogs.length > lastReadLogsCount;
|
|
86
86
|
const hasUnreadCrashes = activeTab !== 'crash' &&
|
|
87
87
|
(crashRecords?.length || 0) > (lastReadCrashesCount || 0);
|
|
88
|
-
return (<
|
|
88
|
+
return (<react_native_1.TouchableOpacity key={tab.key} activeOpacity={0.7} onPress={() => {
|
|
89
|
+
switchActiveTab(tab.key);
|
|
90
|
+
(0, NativeInspector_1.triggerNativeHaptic)('light');
|
|
91
|
+
}} style={[
|
|
89
92
|
styles_1.default.contentTabButton,
|
|
90
93
|
isActive && styles_1.default.contentTabButtonActive,
|
|
91
94
|
]}>
|
|
@@ -121,7 +124,7 @@ const TabBar = react_1.default.memo(() => {
|
|
|
121
124
|
transform: [{ scale: unreadPulseAnim }],
|
|
122
125
|
}}/>)}
|
|
123
126
|
</react_native_1.View>
|
|
124
|
-
</
|
|
127
|
+
</react_native_1.TouchableOpacity>);
|
|
125
128
|
})}
|
|
126
129
|
</react_native_1.ScrollView>
|
|
127
130
|
</react_native_1.View>);
|
|
@@ -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,13 @@ 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;
|
|
127
|
+
export declare const NpmIcon: ({ 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.NpmIcon = 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,55 @@ 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;
|
|
858
|
+
const NpmIcon = ({ color = '#CB3837', size = 14 }) => (<react_native_svg_1.default width={size} height={size} viewBox="0 0 256 256" fill="none">
|
|
859
|
+
<react_native_svg_1.Rect width="256" height="256" rx="32" fill={color}/>
|
|
860
|
+
<react_native_svg_1.Path d="M48 48h160v160h-32V96h-32v112H48V48z" fill="#FFFFFF"/>
|
|
861
|
+
</react_native_svg_1.default>);
|
|
862
|
+
exports.NpmIcon = NpmIcon;
|
|
@@ -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,13 @@
|
|
|
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
|
+
enableHaptics?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const TouchableScale: React.NamedExoticComponent<TouchableScaleProps>;
|
|
10
13
|
export default TouchableScale;
|
|
@@ -35,48 +35,46 @@ 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
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
style,
|
|
42
|
-
{ opacity: pressed ? 0.75 : 1 },
|
|
43
|
-
]}>
|
|
44
|
-
{children}
|
|
45
|
-
</react_native_1.Pressable>);
|
|
46
|
-
}
|
|
38
|
+
const NativeInspector_1 = require("../native/NativeInspector");
|
|
39
|
+
const AnimatedPressable = react_native_1.Animated.createAnimatedComponent(react_native_1.Pressable);
|
|
40
|
+
const TouchableScale = react_1.default.memo(function TouchableScale({ onPress, onLongPress, style, children, hitSlop, disabled, enableHaptics = true, accessible, accessibilityRole, accessibilityLabel, accessibilityHint, accessibilityState, accessibilityValue, ...rest }) {
|
|
47
41
|
const scale = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
48
42
|
const opacity = (0, react_1.useRef)(new react_native_1.Animated.Value(1)).current;
|
|
49
|
-
const
|
|
43
|
+
const handlePressIn = () => {
|
|
44
|
+
if (disabled)
|
|
45
|
+
return;
|
|
46
|
+
if (enableHaptics) {
|
|
47
|
+
(0, NativeInspector_1.triggerNativeHaptic)('light');
|
|
48
|
+
}
|
|
50
49
|
react_native_1.Animated.parallel([
|
|
51
|
-
react_native_1.Animated.
|
|
52
|
-
toValue:
|
|
53
|
-
|
|
54
|
-
tension: 120,
|
|
50
|
+
react_native_1.Animated.timing(scale, {
|
|
51
|
+
toValue: 0.94,
|
|
52
|
+
duration: 50,
|
|
55
53
|
useNativeDriver: true,
|
|
56
54
|
}),
|
|
57
55
|
react_native_1.Animated.timing(opacity, {
|
|
58
|
-
toValue:
|
|
59
|
-
duration:
|
|
56
|
+
toValue: 0.85,
|
|
57
|
+
duration: 50,
|
|
60
58
|
useNativeDriver: true,
|
|
61
59
|
}),
|
|
62
60
|
]).start();
|
|
63
61
|
};
|
|
64
|
-
const
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
62
|
+
const handlePressOut = () => {
|
|
63
|
+
react_native_1.Animated.parallel([
|
|
64
|
+
react_native_1.Animated.timing(scale, {
|
|
65
|
+
toValue: 1,
|
|
66
|
+
duration: 100,
|
|
67
|
+
useNativeDriver: true,
|
|
68
|
+
}),
|
|
69
|
+
react_native_1.Animated.timing(opacity, {
|
|
70
|
+
toValue: 1,
|
|
71
|
+
duration: 100,
|
|
72
|
+
useNativeDriver: true,
|
|
73
|
+
}),
|
|
74
|
+
]).start();
|
|
75
75
|
};
|
|
76
|
-
return (<
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
</react_native_1.Animated.View>
|
|
80
|
-
</react_native_1.Pressable>);
|
|
76
|
+
return (<AnimatedPressable accessible={accessible} accessibilityRole={accessibilityRole} accessibilityLabel={accessibilityLabel} accessibilityHint={accessibilityHint} accessibilityState={accessibilityState} accessibilityValue={accessibilityValue} disabled={disabled} style={[style, { opacity, transform: [{ scale }] }]} onPressIn={handlePressIn} onPressOut={handlePressOut} onPress={onPress} onLongPress={onLongPress} hitSlop={hitSlop} {...rest}>
|
|
77
|
+
{children}
|
|
78
|
+
</AnimatedPressable>);
|
|
81
79
|
});
|
|
82
80
|
exports.default = TouchableScale;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Method } from '../types';
|
|
2
|
-
|
|
3
|
-
export declare const STATUS_FILTERS: StatusFilter[];
|
|
2
|
+
export declare const STATUS_FILTERS: string[];
|
|
4
3
|
export declare const METHOD_COLORS: Record<Method, string>;
|
|
5
4
|
export declare const DOMAIN_COLORS: string[];
|
|
6
5
|
export declare const DURATION_FAST_MS = 200;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "
|
|
1
|
+
export declare const LIB_VERSION = "2.0.0";
|
|
@@ -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 = '
|
|
6
|
+
exports.LIB_VERSION = '2.0.0';
|
|
@@ -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[];
|
|
@@ -15,6 +17,10 @@ export declare const getCollectionEnabled: () => boolean;
|
|
|
15
17
|
* Useful for custom analytics wrappers or testing.
|
|
16
18
|
*/
|
|
17
19
|
export declare const logAnalyticsEvent: (name: string, params?: Record<string, any>, userProperties?: Record<string, any>) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Returns true if analytics logging is active (always ready for custom and Firebase events).
|
|
22
|
+
*/
|
|
18
23
|
export declare const isAnalyticsConnected: () => boolean;
|
|
24
|
+
export declare const isFirebaseAnalyticsPatched: () => boolean;
|
|
19
25
|
export declare const setupAnalyticsLogger: (analyticsInstance: any) => void;
|
|
20
26
|
export declare const autoSetupAnalyticsLogger: () => boolean;
|
|
@@ -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.isFirebaseAnalyticsPatched = 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();
|
|
@@ -98,11 +107,13 @@ exports.logAnalyticsEvent = logAnalyticsEvent;
|
|
|
98
107
|
* setupAnalyticsLogger(analytics());
|
|
99
108
|
*/
|
|
100
109
|
let isAnalyticsPatched = false;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
110
|
+
/**
|
|
111
|
+
* Returns true if analytics logging is active (always ready for custom and Firebase events).
|
|
112
|
+
*/
|
|
113
|
+
const isAnalyticsConnected = () => true;
|
|
105
114
|
exports.isAnalyticsConnected = isAnalyticsConnected;
|
|
115
|
+
const isFirebaseAnalyticsPatched = () => isAnalyticsPatched;
|
|
116
|
+
exports.isFirebaseAnalyticsPatched = isFirebaseAnalyticsPatched;
|
|
106
117
|
const setupAnalyticsLogger = (analyticsInstance) => {
|
|
107
118
|
if (!analyticsInstance) {
|
|
108
119
|
console.warn('[AnalyticsLogger] No analytics instance provided — skipping setup.');
|
|
@@ -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;
|