react-native-inapp-inspector 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +11 -0
- package/dist/commonjs/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/AuditTab.js +741 -0
- package/dist/commonjs/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/DeviceTab.js +717 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +28 -25
- package/dist/commonjs/components/Inspector/MainScreen.js +15 -2
- package/dist/commonjs/components/Inspector/NetworkDetail.js +15 -0
- package/dist/commonjs/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/commonjs/components/Inspector/PerformanceHud.js +210 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +30 -18
- package/dist/commonjs/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/commonjs/components/Inspector/RequestReplayModal.js +792 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/commonjs/components/Inspector/RequestReplayView.js +871 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +326 -15
- package/dist/commonjs/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/commonjs/components/Inspector/StorageTab.js +610 -0
- package/dist/commonjs/components/Inspector/TabBar.js +23 -2
- package/dist/commonjs/components/NetworkIcons.d.ts +12 -0
- package/dist/commonjs/components/NetworkIcons.js +72 -3
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/storageInspector.d.ts +13 -0
- package/dist/commonjs/customHooks/storageInspector.js +179 -0
- package/dist/commonjs/helpers/deviceInfo.d.ts +4 -0
- package/dist/commonjs/helpers/deviceInfo.js +94 -0
- package/dist/commonjs/helpers/index.d.ts +2 -0
- package/dist/commonjs/helpers/index.js +12 -1
- package/dist/commonjs/helpers/packageAuditor.d.ts +5 -0
- package/dist/commonjs/helpers/packageAuditor.js +182 -0
- package/dist/commonjs/i18n/locales/en.json +3 -2
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +113 -9
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/types/enums.d.ts +7 -0
- package/dist/commonjs/types/enums.js +7 -0
- package/dist/commonjs/types/interfaces.d.ts +73 -0
- package/dist/esm/components/Inspector/AuditTab.d.ts +3 -0
- package/dist/esm/components/Inspector/AuditTab.js +702 -0
- package/dist/esm/components/Inspector/DeviceTab.d.ts +3 -0
- package/dist/esm/components/Inspector/DeviceTab.js +678 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +28 -25
- package/dist/esm/components/Inspector/MainScreen.js +15 -2
- package/dist/esm/components/Inspector/NetworkDetail.js +16 -1
- package/dist/esm/components/Inspector/PerformanceHud.d.ts +7 -0
- package/dist/esm/components/Inspector/PerformanceHud.js +170 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +31 -19
- package/dist/esm/components/Inspector/RequestReplayModal.d.ts +9 -0
- package/dist/esm/components/Inspector/RequestReplayModal.js +752 -0
- package/dist/esm/components/Inspector/RequestReplayView.d.ts +8 -0
- package/dist/esm/components/Inspector/RequestReplayView.js +831 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +327 -16
- package/dist/esm/components/Inspector/StorageTab.d.ts +3 -0
- package/dist/esm/components/Inspector/StorageTab.js +571 -0
- package/dist/esm/components/Inspector/TabBar.js +24 -3
- package/dist/esm/components/NetworkIcons.d.ts +12 -0
- package/dist/esm/components/NetworkIcons.js +57 -0
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/storageInspector.d.ts +13 -0
- package/dist/esm/customHooks/storageInspector.js +170 -0
- package/dist/esm/helpers/deviceInfo.d.ts +4 -0
- package/dist/esm/helpers/deviceInfo.js +89 -0
- package/dist/esm/helpers/index.d.ts +2 -0
- package/dist/esm/helpers/index.js +10 -0
- package/dist/esm/helpers/packageAuditor.d.ts +5 -0
- package/dist/esm/helpers/packageAuditor.js +173 -0
- package/dist/esm/i18n/locales/en.json +3 -2
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +109 -8
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/types/enums.d.ts +7 -0
- package/dist/esm/types/enums.js +7 -0
- package/dist/esm/types/interfaces.d.ts +73 -0
- package/ios/NetworkInspectorModule.mm +12 -5
- package/package.json +4 -1
package/dist/commonjs/index.d.ts
CHANGED
|
@@ -14,5 +14,6 @@ export { usePerformanceTracker, useComponentProfiler, useNavigationProfiler, tra
|
|
|
14
14
|
export { InspectLog, InspectTrackTime, InspectCatch, type InspectLogOptions, } from './decorators';
|
|
15
15
|
export { getNativeDeviceMetrics, enableNativeCrashProtection, subscribeNativeCrashes, showNativeFloatingButton, hideNativeFloatingButton, setNativeFloatingButtonBadge, subscribeNativeFloatingButtonPress, subscribeNativeDeviceShake, startNativeFpsMonitoring, stopNativeFpsMonitoring, getNativeFpsMetrics, getNativeStorageItem, setNativeStorageItem, isNativeModuleAvailable, type NativeDeviceMetrics, type NativeCrashEvent, type FloatingButtonOptions, type NativeFpsMetrics, } from './native/NativeInspector';
|
|
16
16
|
export { sendSessionTelemetryPing, trackTelemetryEvent, trackInspectorOpen, trackTabSwitch, trackLogExport, GA4_MEASUREMENT_ID, GA4_API_SECRET, } from './helpers';
|
|
17
|
+
export { runLivePackageAudit, logCodeQualityIssue, clearCustomAuditIssues, } from './helpers/packageAuditor';
|
|
17
18
|
export { BrandSquareIcon, BrandCircleIcon, } from './components/NetworkIcons';
|
|
18
19
|
export { ActiveTab, Method, StatusFilter, SortOrder, LocalFilter, ModalAnimationType, SettingsPage, SettingsSubTab, LogFilter, ConsoleLogType, AnalyticsEventSource, GAEventCategory, StackFrameType, DiffResultType, BundleSubTab, PerformanceSubTab, CrashType, CrashExportFormat, CrashDetailSubTab, CrashFilterType, BreadcrumbType, } from './types';
|
package/dist/commonjs/index.js
CHANGED
|
@@ -37,8 +37,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.registerComponentProfile = exports.getHermesMemoryStats = exports.measureAsync = exports.trackHeavyTask = exports.trackNavigationTransition = exports.trackComponentRender = exports.useNavigationProfiler = exports.useComponentProfiler = exports.usePerformanceTracker = exports.registerGAPlugin = exports.getEventCategory = exports.getLastActionForReducer = exports.clearActionHistory = exports.getActionHistory = exports.subscribeReduxState = exports.getReduxState = exports.inspectorReduxMiddleware = exports.connectReduxStore = exports.ErrorBoundary = exports.CrashTab = exports.computeCrashFingerprint = exports.recordUserActionBreadcrumb = exports.recordReduxBreadcrumb = exports.recordNetworkBreadcrumb = exports.recordNavigationBreadcrumb = exports.addCrashBreadcrumb = exports.recordCustomCrash = exports.parseCrashStackTrace = exports.exportCrashReport = exports.simulateTestCrash = exports.clearCrashRecords = exports.getCrashRecords = exports.emitCrashEvent = exports.subscribeCrashEvents = exports.setupGlobalCrashHandler = exports.getCollectionEnabled = exports.getDefaultEventParameters = exports.getCurrentUserId = exports.getCurrentUserProperties = exports.clearAnalyticsEvents = exports.subscribeAnalyticsEvents = exports.logAnalyticsEvent = exports.setupAnalyticsLogger = exports.subscribeConsoleLogs = exports.clearConsoleLogs = exports.setupConsoleLogger = exports.addAxiosInterceptors = exports.subscribeNetworkLogs = exports.clearNetworkLogs = exports.setupNetworkLogger = void 0;
|
|
40
|
-
exports.
|
|
41
|
-
exports.BreadcrumbType = exports.CrashFilterType = exports.CrashDetailSubTab = exports.CrashExportFormat = exports.CrashType = exports.PerformanceSubTab = void 0;
|
|
40
|
+
exports.GAEventCategory = exports.AnalyticsEventSource = exports.ConsoleLogType = exports.LogFilter = exports.SettingsSubTab = exports.SettingsPage = exports.ModalAnimationType = exports.LocalFilter = exports.SortOrder = exports.StatusFilter = exports.Method = exports.ActiveTab = exports.BrandCircleIcon = exports.BrandSquareIcon = exports.clearCustomAuditIssues = exports.logCodeQualityIssue = exports.runLivePackageAudit = exports.GA4_API_SECRET = exports.GA4_MEASUREMENT_ID = exports.trackLogExport = exports.trackTabSwitch = exports.trackInspectorOpen = exports.trackTelemetryEvent = exports.sendSessionTelemetryPing = exports.isNativeModuleAvailable = exports.setNativeStorageItem = exports.getNativeStorageItem = exports.getNativeFpsMetrics = exports.stopNativeFpsMonitoring = exports.startNativeFpsMonitoring = exports.subscribeNativeDeviceShake = exports.subscribeNativeFloatingButtonPress = exports.setNativeFloatingButtonBadge = exports.hideNativeFloatingButton = exports.showNativeFloatingButton = exports.subscribeNativeCrashes = exports.enableNativeCrashProtection = exports.getNativeDeviceMetrics = exports.InspectCatch = exports.InspectTrackTime = exports.InspectLog = exports.generateFixSnippet = exports.getInitialPerformanceEvents = exports.getInitialRenderProfiles = exports.getPerformanceEvents = exports.subscribePerformanceEvents = exports.clearPerformanceEvents = exports.logPerformanceEvent = exports.getRenderProfiles = exports.subscribeRenderProfiles = void 0;
|
|
41
|
+
exports.BreadcrumbType = exports.CrashFilterType = exports.CrashDetailSubTab = exports.CrashExportFormat = exports.CrashType = exports.PerformanceSubTab = exports.BundleSubTab = exports.DiffResultType = exports.StackFrameType = void 0;
|
|
42
42
|
const react_1 = __importStar(require("react"));
|
|
43
43
|
const react_native_1 = require("react-native");
|
|
44
44
|
const native_1 = require("@react-navigation/native");
|
|
@@ -64,14 +64,22 @@ const analyticsLogger_1 = require("./customHooks/analyticsLogger");
|
|
|
64
64
|
const reduxLogger_1 = require("./customHooks/reduxLogger");
|
|
65
65
|
const performanceTracker_1 = require("./customHooks/performanceTracker");
|
|
66
66
|
const bundleAnalyzer_1 = require("./customHooks/bundleAnalyzer");
|
|
67
|
+
const storageInspector_1 = require("./customHooks/storageInspector");
|
|
68
|
+
const deviceInfo_1 = require("./helpers/deviceInfo");
|
|
69
|
+
const packageAuditor_1 = require("./helpers/packageAuditor");
|
|
67
70
|
const NativeInspector_2 = require("./native/NativeInspector");
|
|
68
71
|
const constants_1 = require("./constants");
|
|
69
72
|
// Stylesheet
|
|
70
73
|
const styles_1 = require("./styles");
|
|
71
|
-
const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigationRef, appIcon, environment, initialVisible, visible: controlledVisible, }) => {
|
|
74
|
+
const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigationRef, appIcon, environment, initialVisible, visible: controlledVisible, initialTab, enablePerformanceHud = false, }) => {
|
|
75
|
+
// Zero-overhead production stub: if disabled, return null immediately
|
|
76
|
+
if (!enabled || !isEnabled) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
72
79
|
// Set custom storage synchronously during render phase
|
|
73
80
|
(0, settingsStore_1.setCustomStorage)(storage || null);
|
|
74
81
|
const [isDark, setIsDark] = (0, react_1.useState)(false);
|
|
82
|
+
const [isPerformanceHudEnabled, setIsPerformanceHudEnabled] = (0, react_1.useState)(enablePerformanceHud);
|
|
75
83
|
const [reduxState, setReduxState] = (0, react_1.useState)(null);
|
|
76
84
|
// Per-reducer last action is kept in component state so the
|
|
77
85
|
// Redux tab re-renders live on every dispatch, independent of the state tree ref.
|
|
@@ -86,6 +94,11 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
86
94
|
setVisible(controlledVisible);
|
|
87
95
|
}
|
|
88
96
|
}, [controlledVisible]);
|
|
97
|
+
(0, react_1.useEffect)(() => {
|
|
98
|
+
if (enablePerformanceHud !== undefined) {
|
|
99
|
+
setIsPerformanceHudEnabled(enablePerformanceHud);
|
|
100
|
+
}
|
|
101
|
+
}, [enablePerformanceHud]);
|
|
89
102
|
const [isReady, setIsReady] = (0, react_1.useState)(false);
|
|
90
103
|
const [selected, setSelected] = (0, react_1.useState)(null);
|
|
91
104
|
const [selectedLogs, setSelectedLogs] = (0, react_1.useState)(new Set());
|
|
@@ -125,7 +138,7 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
125
138
|
const [showReqDiff, setShowReqDiff] = (0, react_1.useState)(false);
|
|
126
139
|
const [showResDiff, setShowResDiff] = (0, react_1.useState)(false);
|
|
127
140
|
// ─── Analytics state ───────────────────────────────────────────────────────
|
|
128
|
-
const [activeTab, setActiveTab] = (0, react_1.useState)('apis');
|
|
141
|
+
const [activeTab, setActiveTab] = (0, react_1.useState)(initialTab || 'apis');
|
|
129
142
|
const [analyticsEvents, setAnalyticsEvents] = (0, react_1.useState)([]);
|
|
130
143
|
// ─── Logs state ────────────────────────────────────────────────────────────
|
|
131
144
|
const [consoleLogs, setConsoleLogs] = (0, react_1.useState)([]);
|
|
@@ -181,6 +194,47 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
181
194
|
setLastReadCrashesCount(crashRecords.length);
|
|
182
195
|
}
|
|
183
196
|
}, [activeTab, crashRecords.length]);
|
|
197
|
+
// ─── Storage state ─────────────────────────────────────────────────────────
|
|
198
|
+
const [storageEntries, setStorageEntries] = (0, react_1.useState)([]);
|
|
199
|
+
const [selectedStorageKey, setSelectedStorageKey] = (0, react_1.useState)(null);
|
|
200
|
+
const refreshStorageEntries = (0, react_1.useCallback)(async () => {
|
|
201
|
+
try {
|
|
202
|
+
const entries = await (0, storageInspector_1.fetchAllStorageEntries)();
|
|
203
|
+
setStorageEntries(entries);
|
|
204
|
+
}
|
|
205
|
+
catch { }
|
|
206
|
+
}, []);
|
|
207
|
+
const updateStorageEntry = (0, react_1.useCallback)(async (key, value) => {
|
|
208
|
+
await (0, storageInspector_1.setStorageItem)(key, value);
|
|
209
|
+
await refreshStorageEntries();
|
|
210
|
+
}, [refreshStorageEntries]);
|
|
211
|
+
const deleteStorageEntry = (0, react_1.useCallback)(async (key) => {
|
|
212
|
+
await (0, storageInspector_1.removeStorageItem)(key);
|
|
213
|
+
await refreshStorageEntries();
|
|
214
|
+
}, [refreshStorageEntries]);
|
|
215
|
+
const clearAllStorageEntries = (0, react_1.useCallback)(async () => {
|
|
216
|
+
await (0, storageInspector_1.clearAllStorage)();
|
|
217
|
+
await refreshStorageEntries();
|
|
218
|
+
}, [refreshStorageEntries]);
|
|
219
|
+
(0, react_1.useEffect)(() => {
|
|
220
|
+
refreshStorageEntries();
|
|
221
|
+
const unsub = (0, storageInspector_1.subscribeStorageChanges)(refreshStorageEntries);
|
|
222
|
+
return () => unsub();
|
|
223
|
+
}, [refreshStorageEntries]);
|
|
224
|
+
// ─── Device info state ──────────────────────────────────────────────────────
|
|
225
|
+
const [deviceInfo] = (0, react_1.useState)(() => (0, deviceInfo_1.getSystemDiagnostics)());
|
|
226
|
+
// ─── Code Quality & Package Audit state ─────────────────────────────────────
|
|
227
|
+
const [auditReport, setAuditReport] = (0, react_1.useState)(() => (0, packageAuditor_1.runLivePackageAudit)());
|
|
228
|
+
(0, react_1.useEffect)(() => {
|
|
229
|
+
const unsub = (0, packageAuditor_1.subscribeAuditChanges)(setAuditReport);
|
|
230
|
+
return () => unsub();
|
|
231
|
+
}, []);
|
|
232
|
+
const refreshAuditReport = (0, react_1.useCallback)(() => {
|
|
233
|
+
setAuditReport((0, packageAuditor_1.runLivePackageAudit)());
|
|
234
|
+
}, []);
|
|
235
|
+
const logCustomAuditIssue = (0, react_1.useCallback)((issue) => {
|
|
236
|
+
(0, packageAuditor_1.logCodeQualityIssue)(issue);
|
|
237
|
+
}, []);
|
|
184
238
|
const [maxConsoleLogs, setMaxConsoleLogs] = (0, react_1.useState)(100);
|
|
185
239
|
const [showConsoleLevels, setShowConsoleLevels] = (0, react_1.useState)({
|
|
186
240
|
info: true,
|
|
@@ -221,6 +275,9 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
221
275
|
logs: true,
|
|
222
276
|
analytics: false,
|
|
223
277
|
redux: false,
|
|
278
|
+
storage: false,
|
|
279
|
+
device: false,
|
|
280
|
+
audit: false,
|
|
224
281
|
bundle: false,
|
|
225
282
|
performance: false,
|
|
226
283
|
crash: false,
|
|
@@ -275,6 +332,9 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
275
332
|
logs: true,
|
|
276
333
|
analytics: false,
|
|
277
334
|
redux: false,
|
|
335
|
+
storage: false,
|
|
336
|
+
device: false,
|
|
337
|
+
audit: false,
|
|
278
338
|
bundle: false,
|
|
279
339
|
performance: false,
|
|
280
340
|
crash: false,
|
|
@@ -312,14 +372,24 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
312
372
|
setModalHeightPercent(saved.modalHeightPercent);
|
|
313
373
|
if (saved.modalAnimationType)
|
|
314
374
|
setModalAnimationType(saved.modalAnimationType);
|
|
315
|
-
if (saved.tabVisibility)
|
|
375
|
+
if (saved.tabVisibility) {
|
|
376
|
+
const savedVis = saved.tabVisibility;
|
|
316
377
|
setTabVisibility(prev => ({
|
|
317
378
|
...prev,
|
|
318
|
-
...
|
|
379
|
+
...savedVis,
|
|
380
|
+
storage: savedVis.storage ?? false,
|
|
381
|
+
device: savedVis.device ?? false,
|
|
382
|
+
audit: savedVis.audit ?? false,
|
|
319
383
|
apis: true, // APIs is always required
|
|
320
384
|
}));
|
|
321
|
-
|
|
385
|
+
}
|
|
386
|
+
if (initialTab) {
|
|
387
|
+
setActiveTab(initialTab);
|
|
388
|
+
}
|
|
389
|
+
else if (saved.defaultTab) {
|
|
322
390
|
setDefaultTab(saved.defaultTab);
|
|
391
|
+
setActiveTab(saved.defaultTab);
|
|
392
|
+
}
|
|
323
393
|
if (saved.isAutoRamLimitEnabled != null)
|
|
324
394
|
setIsAutoRamLimitEnabled(saved.isAutoRamLimitEnabled);
|
|
325
395
|
if (saved.maxNetworkLogs != null)
|
|
@@ -340,7 +410,10 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
340
410
|
setShowDuplicateLogs(saved.showDuplicateLogs);
|
|
341
411
|
if (saved.showUpdateToast != null)
|
|
342
412
|
setShowUpdateToast(saved.showUpdateToast);
|
|
343
|
-
if (
|
|
413
|
+
if (initialTab) {
|
|
414
|
+
setActiveTab(initialTab);
|
|
415
|
+
}
|
|
416
|
+
else if (saved.defaultTab) {
|
|
344
417
|
const dt = saved.defaultTab;
|
|
345
418
|
const vis = {
|
|
346
419
|
...{
|
|
@@ -348,6 +421,9 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
348
421
|
logs: true,
|
|
349
422
|
analytics: false,
|
|
350
423
|
redux: false,
|
|
424
|
+
storage: false,
|
|
425
|
+
device: false,
|
|
426
|
+
audit: false,
|
|
351
427
|
bundle: false,
|
|
352
428
|
performance: false,
|
|
353
429
|
crash: false,
|
|
@@ -816,6 +892,12 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
816
892
|
? defaultTab
|
|
817
893
|
: 'apis';
|
|
818
894
|
setActiveTab(target);
|
|
895
|
+
setSelected(null);
|
|
896
|
+
setSelectedEvent(null);
|
|
897
|
+
setSelectedLog(null);
|
|
898
|
+
setSelectedReduxSlice(null);
|
|
899
|
+
setSelectedReduxAction(null);
|
|
900
|
+
setSelectedCrash(null);
|
|
819
901
|
// Track inspector opened event in GA4
|
|
820
902
|
(0, helpers_1.trackInspectorOpen)({ activeTab: target });
|
|
821
903
|
// Instant synchronization of data collected while modal was closed
|
|
@@ -1795,6 +1877,20 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
1795
1877
|
setCrashRecords([]);
|
|
1796
1878
|
setSelectedCrash(null);
|
|
1797
1879
|
},
|
|
1880
|
+
// ─── Storage ─────────────────────────────────────────────────────────
|
|
1881
|
+
storageEntries,
|
|
1882
|
+
refreshStorageEntries,
|
|
1883
|
+
updateStorageEntry,
|
|
1884
|
+
deleteStorageEntry,
|
|
1885
|
+
clearAllStorageEntries,
|
|
1886
|
+
selectedStorageKey,
|
|
1887
|
+
setSelectedStorageKey,
|
|
1888
|
+
// ─── Device ──────────────────────────────────────────────────────────
|
|
1889
|
+
deviceInfo,
|
|
1890
|
+
// ─── Audit / Code Quality ─────────────────────────────────────────────
|
|
1891
|
+
auditReport,
|
|
1892
|
+
refreshAuditReport,
|
|
1893
|
+
logCustomAuditIssue,
|
|
1798
1894
|
// ─── Settings ───────────────────────────────────────────────────────
|
|
1799
1895
|
settingsActiveSubTab,
|
|
1800
1896
|
setSettingsActiveSubTab,
|
|
@@ -1819,13 +1915,17 @@ const NetworkInspector = ({ enabled = true, isEnabled = true, storage, navigatio
|
|
|
1819
1915
|
isAutoRamLimitEnabled,
|
|
1820
1916
|
setIsAutoRamLimitEnabled,
|
|
1821
1917
|
deviceFreeRamMb,
|
|
1918
|
+
isPerformanceHudEnabled,
|
|
1919
|
+
setIsPerformanceHudEnabled,
|
|
1822
1920
|
reduxAutoRefresh,
|
|
1823
1921
|
setReduxAutoRefreshState,
|
|
1824
1922
|
reduxExpandDepth,
|
|
1825
1923
|
setReduxExpandDepth,
|
|
1826
1924
|
};
|
|
1827
1925
|
return (<InspectorContext_1.InspectorContext.Provider value={contextValue}>
|
|
1828
|
-
<
|
|
1926
|
+
<react_native_1.View style={react_native_1.StyleSheet.absoluteFill} pointerEvents="box-none">
|
|
1927
|
+
<MainScreen_1.default />
|
|
1928
|
+
</react_native_1.View>
|
|
1829
1929
|
</InspectorContext_1.InspectorContext.Provider>);
|
|
1830
1930
|
};
|
|
1831
1931
|
const NetworkInspectorWrapper = (props) => {
|
|
@@ -1937,6 +2037,10 @@ Object.defineProperty(exports, "trackTabSwitch", { enumerable: true, get: functi
|
|
|
1937
2037
|
Object.defineProperty(exports, "trackLogExport", { enumerable: true, get: function () { return helpers_2.trackLogExport; } });
|
|
1938
2038
|
Object.defineProperty(exports, "GA4_MEASUREMENT_ID", { enumerable: true, get: function () { return helpers_2.GA4_MEASUREMENT_ID; } });
|
|
1939
2039
|
Object.defineProperty(exports, "GA4_API_SECRET", { enumerable: true, get: function () { return helpers_2.GA4_API_SECRET; } });
|
|
2040
|
+
var packageAuditor_2 = require("./helpers/packageAuditor");
|
|
2041
|
+
Object.defineProperty(exports, "runLivePackageAudit", { enumerable: true, get: function () { return packageAuditor_2.runLivePackageAudit; } });
|
|
2042
|
+
Object.defineProperty(exports, "logCodeQualityIssue", { enumerable: true, get: function () { return packageAuditor_2.logCodeQualityIssue; } });
|
|
2043
|
+
Object.defineProperty(exports, "clearCustomAuditIssues", { enumerable: true, get: function () { return packageAuditor_2.clearCustomAuditIssues; } });
|
|
1940
2044
|
var NetworkIcons_1 = require("./components/NetworkIcons");
|
|
1941
2045
|
Object.defineProperty(exports, "BrandSquareIcon", { enumerable: true, get: function () { return NetworkIcons_1.BrandSquareIcon; } });
|
|
1942
2046
|
Object.defineProperty(exports, "BrandCircleIcon", { enumerable: true, get: function () { return NetworkIcons_1.BrandCircleIcon; } });
|
|
@@ -3,6 +3,9 @@ export declare const ActiveTab: {
|
|
|
3
3
|
readonly Analytics: "analytics";
|
|
4
4
|
readonly Logs: "logs";
|
|
5
5
|
readonly Redux: "redux";
|
|
6
|
+
readonly Storage: "storage";
|
|
7
|
+
readonly Device: "device";
|
|
8
|
+
readonly Audit: "audit";
|
|
6
9
|
readonly Bundle: "bundle";
|
|
7
10
|
readonly Performance: "performance";
|
|
8
11
|
readonly Crash: "crash";
|
|
@@ -49,6 +52,9 @@ export declare const SettingsPage: {
|
|
|
49
52
|
readonly Logs: "logs";
|
|
50
53
|
readonly Analytics: "analytics";
|
|
51
54
|
readonly Redux: "redux";
|
|
55
|
+
readonly Storage: "storage";
|
|
56
|
+
readonly Device: "device";
|
|
57
|
+
readonly Audit: "audit";
|
|
52
58
|
readonly Bundle: "bundle";
|
|
53
59
|
readonly Performance: "performance";
|
|
54
60
|
readonly Crash: "crash";
|
|
@@ -56,6 +62,7 @@ export declare const SettingsPage: {
|
|
|
56
62
|
export type SettingsPage = (typeof SettingsPage)[keyof typeof SettingsPage] | null;
|
|
57
63
|
export declare const SettingsSubTab: {
|
|
58
64
|
readonly Module: "module";
|
|
65
|
+
readonly Limits: "limits";
|
|
59
66
|
readonly Ui: "ui";
|
|
60
67
|
};
|
|
61
68
|
export type SettingsSubTab = (typeof SettingsSubTab)[keyof typeof SettingsSubTab];
|
|
@@ -9,6 +9,9 @@ exports.ActiveTab = {
|
|
|
9
9
|
Analytics: 'analytics',
|
|
10
10
|
Logs: 'logs',
|
|
11
11
|
Redux: 'redux',
|
|
12
|
+
Storage: 'storage',
|
|
13
|
+
Device: 'device',
|
|
14
|
+
Audit: 'audit',
|
|
12
15
|
Bundle: 'bundle',
|
|
13
16
|
Performance: 'performance',
|
|
14
17
|
Crash: 'crash',
|
|
@@ -49,12 +52,16 @@ exports.SettingsPage = {
|
|
|
49
52
|
Logs: 'logs',
|
|
50
53
|
Analytics: 'analytics',
|
|
51
54
|
Redux: 'redux',
|
|
55
|
+
Storage: 'storage',
|
|
56
|
+
Device: 'device',
|
|
57
|
+
Audit: 'audit',
|
|
52
58
|
Bundle: 'bundle',
|
|
53
59
|
Performance: 'performance',
|
|
54
60
|
Crash: 'crash',
|
|
55
61
|
};
|
|
56
62
|
exports.SettingsSubTab = {
|
|
57
63
|
Module: 'module',
|
|
64
|
+
Limits: 'limits',
|
|
58
65
|
Ui: 'ui',
|
|
59
66
|
};
|
|
60
67
|
exports.LogFilter = {
|
|
@@ -3,6 +3,64 @@ import { ViewStyle } from 'react-native';
|
|
|
3
3
|
import { Animated, PanResponderInstance } from 'react-native';
|
|
4
4
|
import type { ActiveTab, BreadcrumbType, CrashType, GroupedListItem, LocalFilter, LogFilter, Method, SettingsPage, SettingsSubTab, SortOrder, StatusFilter } from './index';
|
|
5
5
|
export type SearchScope = 'all' | 'url' | 'reqBody' | 'resBody' | 'headers';
|
|
6
|
+
export interface StorageEntry {
|
|
7
|
+
key: string;
|
|
8
|
+
value: string;
|
|
9
|
+
sizeBytes: number;
|
|
10
|
+
isJson: boolean;
|
|
11
|
+
parsedJson?: any;
|
|
12
|
+
updatedAt: number;
|
|
13
|
+
}
|
|
14
|
+
export interface DeviceInfoData {
|
|
15
|
+
appName: string;
|
|
16
|
+
bundleId: string;
|
|
17
|
+
appVersion: string;
|
|
18
|
+
buildNumber: string;
|
|
19
|
+
reactNativeVersion: string;
|
|
20
|
+
jsEngine: string;
|
|
21
|
+
isHermes: boolean;
|
|
22
|
+
isFabric: boolean;
|
|
23
|
+
isTurboModule: boolean;
|
|
24
|
+
platform: 'ios' | 'android' | 'windows' | 'macos' | 'web';
|
|
25
|
+
osVersion: string;
|
|
26
|
+
deviceModel: string;
|
|
27
|
+
deviceId?: string;
|
|
28
|
+
isDevice: boolean;
|
|
29
|
+
screenWidth: number;
|
|
30
|
+
screenHeight: number;
|
|
31
|
+
screenScale: number;
|
|
32
|
+
screenFontScale: number;
|
|
33
|
+
statusBarHeight: number;
|
|
34
|
+
memoryMb?: number;
|
|
35
|
+
arch?: string;
|
|
36
|
+
locale?: string;
|
|
37
|
+
timeZone?: string;
|
|
38
|
+
}
|
|
39
|
+
export type AuditSeverity = 'critical' | 'warning' | 'info' | 'optimal';
|
|
40
|
+
export type AuditCategory = 'dependency' | 'typescript' | 'peer' | 'performance' | 'security';
|
|
41
|
+
export interface AuditIssue {
|
|
42
|
+
id: string;
|
|
43
|
+
title: string;
|
|
44
|
+
message: string;
|
|
45
|
+
severity: AuditSeverity;
|
|
46
|
+
category: AuditCategory;
|
|
47
|
+
packageName?: string;
|
|
48
|
+
currentVersion?: string;
|
|
49
|
+
requiredVersion?: string;
|
|
50
|
+
fixCommand?: string;
|
|
51
|
+
fixSnippet?: string;
|
|
52
|
+
timestamp: number;
|
|
53
|
+
}
|
|
54
|
+
export interface PackageHealthReport {
|
|
55
|
+
score: number;
|
|
56
|
+
grade: 'A+' | 'A' | 'B' | 'C' | 'D';
|
|
57
|
+
totalIssues: number;
|
|
58
|
+
criticalCount: number;
|
|
59
|
+
warningCount: number;
|
|
60
|
+
infoCount: number;
|
|
61
|
+
issues: AuditIssue[];
|
|
62
|
+
scannedAt: number;
|
|
63
|
+
}
|
|
6
64
|
export interface ParsedStackFrame {
|
|
7
65
|
method: string;
|
|
8
66
|
file: string;
|
|
@@ -164,6 +222,8 @@ export interface NetworkInspectorProps {
|
|
|
164
222
|
environment?: 'DEV' | 'UAT' | 'PrePROD' | 'PROD' | 'QA' | 'Staging' | string;
|
|
165
223
|
initialVisible?: boolean;
|
|
166
224
|
visible?: boolean;
|
|
225
|
+
initialTab?: ActiveTab;
|
|
226
|
+
enablePerformanceHud?: boolean;
|
|
167
227
|
}
|
|
168
228
|
export interface NavigationTrackerProps {
|
|
169
229
|
onStateChange: (state: any) => void;
|
|
@@ -176,6 +236,8 @@ export interface InspectorContextValue {
|
|
|
176
236
|
isEnabled: boolean;
|
|
177
237
|
appIcon?: any;
|
|
178
238
|
environment?: string;
|
|
239
|
+
isPerformanceHudEnabled: boolean;
|
|
240
|
+
setIsPerformanceHudEnabled: React.Dispatch<React.SetStateAction<boolean>>;
|
|
179
241
|
modalHeightPercent: number;
|
|
180
242
|
setModalHeightPercent: React.Dispatch<React.SetStateAction<number>>;
|
|
181
243
|
modalAnimationType: 'slide' | 'fade' | 'none';
|
|
@@ -305,6 +367,17 @@ export interface InspectorContextValue {
|
|
|
305
367
|
maxCrashLogs: number;
|
|
306
368
|
setMaxCrashLogs: React.Dispatch<React.SetStateAction<number>>;
|
|
307
369
|
clearAllCrashes: () => void;
|
|
370
|
+
storageEntries: StorageEntry[];
|
|
371
|
+
refreshStorageEntries: () => Promise<void>;
|
|
372
|
+
updateStorageEntry: (key: string, value: string) => Promise<void>;
|
|
373
|
+
deleteStorageEntry: (key: string) => Promise<void>;
|
|
374
|
+
clearAllStorageEntries: () => Promise<void>;
|
|
375
|
+
selectedStorageKey: string | null;
|
|
376
|
+
setSelectedStorageKey: React.Dispatch<React.SetStateAction<string | null>>;
|
|
377
|
+
deviceInfo: DeviceInfoData;
|
|
378
|
+
auditReport: PackageHealthReport;
|
|
379
|
+
refreshAuditReport: () => void;
|
|
380
|
+
logCustomAuditIssue: (issue: Omit<AuditIssue, 'id' | 'timestamp'>) => void;
|
|
308
381
|
settingsActiveSubTab: SettingsSubTab;
|
|
309
382
|
setSettingsActiveSubTab: React.Dispatch<React.SetStateAction<SettingsSubTab>>;
|
|
310
383
|
defaultTab: ActiveTab;
|