react-native-inapp-inspector 2.5.12 → 2.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/.gradle/8.9/checksums/checksums.lock +0 -0
- package/android/.gradle/8.9/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/8.9/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/8.9/fileChanges/last-build.bin +0 -0
- package/android/.gradle/8.9/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/8.9/gc.properties +0 -0
- package/android/.gradle/9.2.0/checksums/checksums.lock +0 -0
- package/android/.gradle/9.2.0/fileChanges/last-build.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/9.2.0/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/9.2.0/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.settings/org.eclipse.buildship.core.prefs +13 -0
- package/android/src/main/AndroidManifest.xml +11 -0
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +379 -19
- package/android/src/main/res/xml/inappinspector_file_paths.xml +7 -0
- package/dist/commonjs/components/Inspector/AnalyticsFilterModal.js +47 -49
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.d.ts +8 -0
- package/dist/commonjs/components/Inspector/BoxModelVisualizer.js +76 -0
- package/dist/commonjs/components/Inspector/ConsoleExportModal.js +51 -51
- package/dist/commonjs/components/Inspector/CrashTab.js +17 -17
- package/dist/commonjs/components/Inspector/DebuggingTab.js +24 -24
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +2 -2
- package/dist/commonjs/components/Inspector/FabLauncher.js +2 -2
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +2 -2
- package/dist/commonjs/components/Inspector/InspectorHeader.js +10 -10
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +10 -10
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +1 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +222 -222
- package/dist/commonjs/components/Inspector/NetworkExportModal.d.ts +10 -0
- package/dist/commonjs/components/Inspector/NetworkExportModal.js +333 -0
- package/dist/commonjs/components/Inspector/NetworkTab.js +48 -41
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +11 -12
- package/dist/commonjs/components/Inspector/ReduxDetail.js +17 -19
- package/dist/commonjs/components/Inspector/ReduxTab.js +5 -5
- package/dist/commonjs/components/Inspector/SettingsPanel.js +3 -6
- package/dist/commonjs/components/Inspector/SocketCard.js +2 -2
- package/dist/commonjs/components/Inspector/SupportPage.js +5 -5
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.d.ts +7 -0
- package/dist/commonjs/components/Inspector/UiA11yAuditPanel.js +97 -0
- package/dist/commonjs/components/Inspector/UiInspectorDetail.d.ts +2 -0
- package/dist/commonjs/components/Inspector/UiInspectorDetail.js +485 -0
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.d.ts +2 -0
- package/dist/commonjs/components/Inspector/UiInspectorOverlay.js +199 -0
- package/dist/commonjs/components/Inspector/UiInspectorTab.d.ts +2 -0
- package/dist/commonjs/components/Inspector/UiInspectorTab.js +117 -0
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.d.ts +10 -0
- package/dist/commonjs/components/Inspector/UiLiveStyleTweaker.js +148 -0
- package/dist/commonjs/components/Inspector/index.d.ts +28 -0
- package/dist/commonjs/components/Inspector/index.js +1 -0
- package/dist/commonjs/components/LogCard.js +9 -7
- package/dist/commonjs/constants/index.js +1 -1
- package/dist/commonjs/constants/telemetryConfig.d.ts +3 -3
- package/dist/commonjs/constants/telemetryConfig.js +1 -1
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +1 -1
- package/dist/commonjs/customHooks/crashHandler.js +6 -6
- package/dist/commonjs/customHooks/uiInspectorManager.d.ts +22 -0
- package/dist/commonjs/customHooks/uiInspectorManager.js +1 -0
- package/dist/commonjs/helpers/index.js +1 -3
- package/dist/commonjs/helpers/searchQueryParser.d.ts +1 -0
- package/dist/commonjs/helpers/searchQueryParser.js +7 -5
- package/dist/commonjs/helpers/shareFormatter.d.ts +16 -0
- package/dist/commonjs/helpers/shareFormatter.js +16 -9
- package/dist/commonjs/helpers/uiInspectorEngine.d.ts +62 -0
- package/dist/commonjs/helpers/uiInspectorEngine.js +19 -0
- package/dist/commonjs/i18n/locales/ar.json +1 -1
- package/dist/commonjs/i18n/locales/bn.json +1 -1
- package/dist/commonjs/i18n/locales/de.json +1 -1
- package/dist/commonjs/i18n/locales/en.json +1 -1
- package/dist/commonjs/i18n/locales/es.json +1 -1
- package/dist/commonjs/i18n/locales/fr.json +1 -1
- package/dist/commonjs/i18n/locales/gu.json +1 -1
- package/dist/commonjs/i18n/locales/hi.json +1 -1
- package/dist/commonjs/i18n/locales/id.json +1 -1
- package/dist/commonjs/i18n/locales/it.json +1 -1
- package/dist/commonjs/i18n/locales/ja.json +1 -1
- package/dist/commonjs/i18n/locales/kn.json +1 -1
- package/dist/commonjs/i18n/locales/ko.json +1 -1
- package/dist/commonjs/i18n/locales/ml.json +1 -1
- package/dist/commonjs/i18n/locales/mr.json +1 -1
- package/dist/commonjs/i18n/locales/nl.json +1 -1
- package/dist/commonjs/i18n/locales/pa.json +1 -1
- package/dist/commonjs/i18n/locales/pl.json +1 -1
- package/dist/commonjs/i18n/locales/pt.json +1 -1
- package/dist/commonjs/i18n/locales/ru.json +1 -1
- package/dist/commonjs/i18n/locales/ta.json +1 -1
- package/dist/commonjs/i18n/locales/te.json +1 -1
- package/dist/commonjs/i18n/locales/tr.json +1 -1
- package/dist/commonjs/i18n/locales/vi.json +1 -1
- package/dist/commonjs/i18n/locales/zh.json +1 -1
- package/dist/commonjs/index.d.ts +3 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +2 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/commonjs/types/editor.d.ts +31 -0
- package/dist/esm/components/Inspector/AnalyticsFilterModal.js +73 -75
- package/dist/esm/components/Inspector/BoxModelVisualizer.d.ts +8 -0
- package/dist/esm/components/Inspector/BoxModelVisualizer.js +76 -0
- package/dist/esm/components/Inspector/ConsoleExportModal.js +67 -67
- package/dist/esm/components/Inspector/CrashTab.js +58 -58
- package/dist/esm/components/Inspector/DebuggingTab.js +89 -89
- package/dist/esm/components/Inspector/DeviceInfoTab.js +2 -2
- package/dist/esm/components/Inspector/FabLauncher.js +21 -21
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +23 -23
- package/dist/esm/components/Inspector/InspectorHeader.js +26 -26
- package/dist/esm/components/Inspector/MediaGalleryTab.js +151 -151
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +1 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.js +468 -468
- package/dist/esm/components/Inspector/NetworkExportModal.d.ts +10 -0
- package/dist/esm/components/Inspector/NetworkExportModal.js +333 -0
- package/dist/esm/components/Inspector/NetworkTab.js +118 -111
- package/dist/esm/components/Inspector/NpmStarPrompt.js +32 -33
- package/dist/esm/components/Inspector/ReduxDetail.js +54 -56
- package/dist/esm/components/Inspector/ReduxTab.js +9 -9
- package/dist/esm/components/Inspector/SettingsPanel.js +3 -6
- package/dist/esm/components/Inspector/SocketCard.js +13 -13
- package/dist/esm/components/Inspector/SupportPage.js +5 -5
- package/dist/esm/components/Inspector/UiA11yAuditPanel.d.ts +7 -0
- package/dist/esm/components/Inspector/UiA11yAuditPanel.js +97 -0
- package/dist/esm/components/Inspector/UiInspectorDetail.d.ts +2 -0
- package/dist/esm/components/Inspector/UiInspectorDetail.js +422 -0
- package/dist/esm/components/Inspector/UiInspectorOverlay.d.ts +2 -0
- package/dist/esm/components/Inspector/UiInspectorOverlay.js +138 -0
- package/dist/esm/components/Inspector/UiInspectorTab.d.ts +2 -0
- package/dist/esm/components/Inspector/UiInspectorTab.js +117 -0
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.d.ts +10 -0
- package/dist/esm/components/Inspector/UiLiveStyleTweaker.js +148 -0
- package/dist/esm/components/Inspector/index.d.ts +28 -0
- package/dist/esm/components/Inspector/index.js +1 -0
- package/dist/esm/components/LogCard.js +57 -55
- package/dist/esm/constants/index.js +1 -1
- package/dist/esm/constants/telemetryConfig.d.ts +3 -3
- package/dist/esm/constants/telemetryConfig.js +1 -1
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/crashHandler.d.ts +1 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/customHooks/uiInspectorManager.d.ts +22 -0
- package/dist/esm/customHooks/uiInspectorManager.js +1 -0
- package/dist/esm/helpers/index.js +4 -6
- package/dist/esm/helpers/searchQueryParser.d.ts +1 -0
- package/dist/esm/helpers/searchQueryParser.js +7 -5
- package/dist/esm/helpers/shareFormatter.d.ts +16 -0
- package/dist/esm/helpers/shareFormatter.js +20 -13
- package/dist/esm/helpers/uiInspectorEngine.d.ts +48 -0
- package/dist/esm/helpers/uiInspectorEngine.js +19 -0
- package/dist/esm/i18n/locales/ar.json +1 -1
- package/dist/esm/i18n/locales/bn.json +1 -1
- package/dist/esm/i18n/locales/de.json +1 -1
- package/dist/esm/i18n/locales/en.json +1 -1
- package/dist/esm/i18n/locales/es.json +1 -1
- package/dist/esm/i18n/locales/fr.json +1 -1
- package/dist/esm/i18n/locales/gu.json +1 -1
- package/dist/esm/i18n/locales/hi.json +1 -1
- package/dist/esm/i18n/locales/id.json +1 -1
- package/dist/esm/i18n/locales/it.json +1 -1
- package/dist/esm/i18n/locales/ja.json +1 -1
- package/dist/esm/i18n/locales/kn.json +1 -1
- package/dist/esm/i18n/locales/ko.json +1 -1
- package/dist/esm/i18n/locales/ml.json +1 -1
- package/dist/esm/i18n/locales/mr.json +1 -1
- package/dist/esm/i18n/locales/nl.json +1 -1
- package/dist/esm/i18n/locales/pa.json +1 -1
- package/dist/esm/i18n/locales/pl.json +1 -1
- package/dist/esm/i18n/locales/pt.json +1 -1
- package/dist/esm/i18n/locales/ru.json +1 -1
- package/dist/esm/i18n/locales/ta.json +1 -1
- package/dist/esm/i18n/locales/te.json +1 -1
- package/dist/esm/i18n/locales/tr.json +1 -1
- package/dist/esm/i18n/locales/vi.json +1 -1
- package/dist/esm/i18n/locales/zh.json +1 -1
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +7 -7
- package/dist/esm/native/NativeInspector.d.ts +2 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +2 -0
- package/dist/esm/types/editor.d.ts +31 -0
- package/ios/NetworkInspectorModule.mm +314 -16
- package/package.json +1 -1
- package/src/native/NativeInspector.ts +37 -0
- package/src/native/NativeNetworkInspector.ts +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(i,r,
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(i,r,a,l){l===void 0&&(l=a);var t=Object.getOwnPropertyDescriptor(r,a);(!t||("get"in t?!r.__esModule:t.writable||t.configurable))&&(t={enumerable:!0,get:function(){return r[a]}}),Object.defineProperty(i,l,t)}):(function(i,r,a,l){l===void 0&&(l=a),i[l]=r[a]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}):function(i,r){i.default=r}),__importStar=this&&this.__importStar||(function(){var i=function(r){return i=Object.getOwnPropertyNames||function(a){var l=[];for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(l[l.length]=t);return l},i(r)};return function(r){if(r&&r.__esModule)return r;var a={};if(r!=null)for(var l=i(r),t=0;t<l.length;t++)l[t]!=="default"&&__createBinding(a,r,l[t]);return __setModuleDefault(a,r),a}})(),__importDefault=this&&this.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConsoleExportModal=void 0;const react_1=__importStar(require("react")),react_native_1=require("react-native"),TouchableScale_1=__importDefault(require("../TouchableScale")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),NetworkIcons_1=require("../NetworkIcons"),NativeInspector_1=require("../../native/NativeInspector"),helpers_1=require("../../helpers"),shareFormatter_1=require("../../helpers/shareFormatter"),i18n_1=require("../../i18n"),ConsoleExportModal=({visible:i,onClose:r,filteredLogs:a,allLogs:l})=>{const{t}=(0,i18n_1.useTranslation)(),[T,B]=(0,react_1.useState)("config"),[y,q]=(0,react_1.useState)("filtered"),[v,G]=(0,react_1.useState)("info"),[s,L]=(0,react_1.useState)("all"),[E,U]=(0,react_1.useState)("50"),[_,K]=(0,react_1.useState)(""),[c,J]=(0,react_1.useState)("txt"),[P,X]=(0,react_1.useState)(!1),[O,Z]=(0,react_1.useState)(!1),[M,Q]=(0,react_1.useState)(!1),[W,Y]=(0,react_1.useState)(!1),[N,ee]=(0,react_1.useState)(!1),[ie,j]=(0,react_1.useState)(0),[le,$]=(0,react_1.useState)(0),[x,te]=(0,react_1.useState)(""),[p,oe]=(0,react_1.useState)(""),[ae,re]=(0,react_1.useState)(0),A=(0,react_1.useRef)(new react_native_1.Animated.Value(0)).current,k=(0,react_1.useRef)(new react_native_1.Animated.Value(1)).current,h=(0,react_1.useMemo)(()=>{if(!_||_.trim().length===0)return{isValid:!0,error:null,regex:null};try{return{isValid:!0,error:null,regex:new RegExp(_.trim(),"i")}}catch(e){return{isValid:!1,error:e?.message||"Invalid pattern",regex:null}}},[_]),I=(0,react_1.useMemo)(()=>({includeStackTrace:P,includeArguments:O,includeCaller:M,includeTimestamps:W,includeAppInfo:N,includeDuplicates:!1,ignorePattern:s==="custom"&&h.isValid?_.trim():void 0}),[P,O,M,W,N,s,h.isValid,_]);(0,react_1.useEffect)(()=>{if(T==="progress"){const e=react_native_1.Animated.loop(react_native_1.Animated.sequence([react_native_1.Animated.timing(k,{toValue:1.05,duration:600,easing:react_native_1.Easing.inOut(react_native_1.Easing.ease),useNativeDriver:!0}),react_native_1.Animated.timing(k,{toValue:1,duration:600,easing:react_native_1.Easing.inOut(react_native_1.Easing.ease),useNativeDriver:!0})]));return e.start(),()=>e.stop()}},[T,k]),(0,react_1.useEffect)(()=>{i&&(B("config"),L("all"),G("info"),J("txt"),U("50"),K(""),X(!1),Z(!1),Q(!1),Y(!1),ee(!1),j(0),$(0),te(""),oe(""),re(0),A.setValue(0))},[i,A]);const b=(0,react_1.useMemo)(()=>y==="filtered"?a:l,[y,a,l]),F=(0,react_1.useMemo)(()=>v==="all"?b:b.filter(e=>v==="info"?e.type==="info"||e.sourceMethod==="log"||e.sourceMethod==="info":v==="warn"?e.type==="warn":v==="error"?e.type==="error":!0),[b,v]),R=(0,react_1.useMemo)(()=>{let e=0,o=0,C=0;return b.forEach(w=>{w.type==="error"?C++:w.type==="warn"?o++:e++}),{all:b.length,info:e,warn:o,error:C}},[b]),{selectedLogs:n,ignoredCount:z}=(0,react_1.useMemo)(()=>{if(F.length===0)return{selectedLogs:[],ignoredCount:0};let o=F,C=0;if(s==="custom"&&h.regex){const m=h.regex,H=o.length;o=o.filter(S=>{const ge=S.message||"",ue=S.rawArgs?JSON.stringify(S.rawArgs):"",fe=S.caller||"";return!m.test(ge)&&!m.test(ue)&&!m.test(fe)}),C=H-o.length}let w=o.length;if(s==="all")w=o.length;else if(s==="custom"){const m=parseInt(E,10);w=isNaN(m)||m<=0?o.length:Math.min(m,o.length)}return{selectedLogs:o.slice(-w),ignoredCount:C}},[F,s,E,h.regex]),D=(0,react_1.useMemo)(()=>(0,shareFormatter_1.estimateConsoleLogsExportSize)(n,c,I),[n,c,I]),V=e=>e<=0?"0 KB":e<1024?`${(e/1024).toFixed(2)} KB`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(2)} MB`,ne=(0,react_1.useCallback)(()=>{if(n.length===0){(0,helpers_1.showToast)(t("console.noLogsToExport","No logs available to export"));return}(0,NativeInspector_1.triggerNativeHaptic)("medium"),B("progress"),j(0),$(0),A.setValue(0);const e=n.length,o=Math.max(1,Math.floor(e/10));let C=0;const w=setInterval(()=>{C=Math.min(C+o,e);const m=C/e;j(Math.round(m*100)),$(C),react_native_1.Animated.timing(A,{toValue:m,duration:120,easing:react_native_1.Easing.linear,useNativeDriver:!1}).start(),C>=e&&(clearInterval(w),setTimeout(()=>{const H=(0,shareFormatter_1.formatConsoleLogsExport)(n,c,I),S=(0,shareFormatter_1.generateConsoleLogsFilename)(c);te(H),oe(S),re(H.length),B("complete"),(0,NativeInspector_1.triggerNativeHaptic)("heavy")},180))},45)},[n,c,I,A,t]),se=(0,react_1.useCallback)(async()=>{if(x){(0,NativeInspector_1.triggerNativeHaptic)("light");try{const e=await(0,NativeInspector_1.writeNativeExportFile)(p,x);if(e&&await(0,NativeInspector_1.shareNativeFile)(e,"text/plain",p))return;await react_native_1.Share.share({title:p,message:x,url:e||void 0},{dialogTitle:`Share ${p}`,subject:p})}catch(e){e?.message!=="User did not share"&&(0,helpers_1.showToast)(e?.message||"Failed to open share sheet")}}},[x,p,c]),ce=(0,react_1.useCallback)(async()=>{if(x){(0,NativeInspector_1.triggerNativeHaptic)("medium");try{const e=await(0,NativeInspector_1.writeNativeExportFile)(p,x);if(e&&await(0,NativeInspector_1.shareNativeFile)(e,"text/plain",`Save ${p}`)){(0,helpers_1.showToast)(t("console.savePromptOpened","Opened save to disk dialog"));return}await react_native_1.Share.share({title:`Save ${p}`,message:x,url:e||void 0},{dialogTitle:`Save to Disk (${p})`,subject:p}),(0,helpers_1.showToast)(t("console.savePromptOpened","Opened save to disk dialog"))}catch(e){e?.message!=="User did not share"&&(0,helpers_1.showToast)(e?.message||"Save error")}}},[x,p,c,t]),pe=(0,react_1.useCallback)(()=>{x&&((0,NativeInspector_1.triggerNativeHaptic)("light"),(0,helpers_1.copyToClipboard)(x,"Console Logs"),(0,helpers_1.showToast)(t("console.copiedLogs","Logs copied to clipboard!")))},[x,t]),de=a.length!==l.length;return<react_native_1.Modal visible={i}transparent animationType="slide"onRequestClose={r}>
|
|
2
2
|
<react_native_1.View style={styles.overlay}>
|
|
3
3
|
<react_native_1.Pressable style={styles.backdrop}onPress={r}/>
|
|
4
4
|
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
{t("console.exportTitle","Export Console Logs")}
|
|
20
20
|
</react_native_1.Text>
|
|
21
21
|
<react_native_1.Text style={styles.subtitle}>
|
|
22
|
-
{
|
|
22
|
+
{T==="config"?`${n.length} logs ready for export`:T==="progress"?"Preparing exported file...":"Export complete"}
|
|
23
23
|
</react_native_1.Text>
|
|
24
24
|
</react_native_1.View>
|
|
25
25
|
</react_native_1.View>
|
|
@@ -29,25 +29,25 @@
|
|
|
29
29
|
</react_native_1.View>
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
{
|
|
32
|
+
{T==="config"&&<>
|
|
33
33
|
<react_native_1.ScrollView showsVerticalScrollIndicator={!1}contentContainerStyle={styles.configContainer}>
|
|
34
34
|
|
|
35
|
-
{
|
|
35
|
+
{de&&<react_native_1.View style={styles.section}>
|
|
36
36
|
<react_native_1.Text style={styles.sectionLabel}>
|
|
37
37
|
{t("console.exportScope","LOG SOURCE SCOPE")}
|
|
38
38
|
</react_native_1.Text>
|
|
39
39
|
<react_native_1.View style={styles.segmentedRow}>
|
|
40
|
-
<TouchableScale_1.default onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),
|
|
41
|
-
<NetworkIcons_1.FilterIcon size={13}color={
|
|
42
|
-
<react_native_1.Text style={[styles.segmentBtnText,
|
|
40
|
+
<TouchableScale_1.default onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),q("filtered")}}style={[styles.segmentBtn,y==="filtered"&&styles.segmentBtnActive]}>
|
|
41
|
+
<NetworkIcons_1.FilterIcon size={13}color={y==="filtered"?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayTextWeak}/>
|
|
42
|
+
<react_native_1.Text style={[styles.segmentBtnText,y==="filtered"&&styles.segmentBtnTextActive]}>
|
|
43
43
|
{t("console.filteredView","Active Filter")} (
|
|
44
|
-
{
|
|
44
|
+
{a.length})
|
|
45
45
|
</react_native_1.Text>
|
|
46
46
|
</TouchableScale_1.default>
|
|
47
47
|
|
|
48
|
-
<TouchableScale_1.default onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),
|
|
49
|
-
<NetworkIcons_1.LayersIcon size={13}color={
|
|
50
|
-
<react_native_1.Text style={[styles.segmentBtnText,
|
|
48
|
+
<TouchableScale_1.default onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),q("all")}}style={[styles.segmentBtn,y==="all"&&styles.segmentBtnActive]}>
|
|
49
|
+
<NetworkIcons_1.LayersIcon size={13}color={y==="all"?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayTextWeak}/>
|
|
50
|
+
<react_native_1.Text style={[styles.segmentBtnText,y==="all"&&styles.segmentBtnTextActive]}>
|
|
51
51
|
{t("console.allLogsScope","All Logs")} ({l.length})
|
|
52
52
|
</react_native_1.Text>
|
|
53
53
|
</TouchableScale_1.default>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<react_native_1.View style={styles.section}>
|
|
59
59
|
<react_native_1.Text style={styles.sectionLabel}>LOG LEVEL FILTER</react_native_1.Text>
|
|
60
60
|
<react_native_1.View style={styles.levelRow}>
|
|
61
|
-
{[{id:"all",label:"All",count:
|
|
61
|
+
{[{id:"all",label:"All",count:R.all,color:AppColors_1.AppColors.purple,Icon:NetworkIcons_1.LayersIcon},{id:"info",label:"Info / Log",count:R.info,color:AppColors_1.AppColors.sky600,Icon:NetworkIcons_1.InfoCircleIcon},{id:"warn",label:"Warn",count:R.warn,color:AppColors_1.AppColors.amber600,Icon:NetworkIcons_1.WarningTriangleIcon},{id:"error",label:"Error",count:R.error,color:AppColors_1.AppColors.errorColor,Icon:NetworkIcons_1.ErrorCircleIcon}].map(e=>{const o=v===e.id,C=e.Icon;return<TouchableScale_1.default key={e.id}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),G(e.id)}}style={[styles.levelChip,o&&{backgroundColor:`${e.color}15`,borderColor:e.color}]}>
|
|
62
62
|
<C size={11}color={o?e.color:AppColors_1.AppColors.grayTextWeak}/>
|
|
63
63
|
<react_native_1.Text style={[styles.levelChipText,o&&{color:e.color,fontFamily:AppFonts_1.AppFonts.interBold}]}>
|
|
64
64
|
{e.label}
|
|
@@ -78,21 +78,21 @@
|
|
|
78
78
|
<react_native_1.Text style={styles.sectionLabel}>LOGS COUNT RANGE</react_native_1.Text>
|
|
79
79
|
<react_native_1.View style={styles.countPill}>
|
|
80
80
|
<react_native_1.Text style={styles.countPillText}>
|
|
81
|
-
Matched: {
|
|
81
|
+
Matched: {F.length}
|
|
82
82
|
</react_native_1.Text>
|
|
83
83
|
</react_native_1.View>
|
|
84
84
|
</react_native_1.View>
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
<react_native_1.View style={styles.segmentedRow}>
|
|
88
|
-
<TouchableScale_1.default onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),
|
|
88
|
+
<TouchableScale_1.default onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),L("all")}}style={[styles.segmentBtn,s==="all"&&styles.segmentBtnActive]}>
|
|
89
89
|
<NetworkIcons_1.ZapIcon size={13}color={s==="all"?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayTextStrong}/>
|
|
90
90
|
<react_native_1.Text style={[styles.segmentBtnText,s==="all"&&styles.segmentBtnTextActive]}>
|
|
91
|
-
All ({
|
|
91
|
+
All ({F.length})
|
|
92
92
|
</react_native_1.Text>
|
|
93
93
|
</TouchableScale_1.default>
|
|
94
94
|
|
|
95
|
-
<TouchableScale_1.default onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),
|
|
95
|
+
<TouchableScale_1.default onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),L("custom")}}style={[styles.segmentBtn,s==="custom"&&styles.segmentBtnActive]}>
|
|
96
96
|
<NetworkIcons_1.PenIcon size={12}color={s==="custom"?AppColors_1.AppColors.purple:AppColors_1.AppColors.grayTextStrong}/>
|
|
97
97
|
<react_native_1.Text style={[styles.segmentBtnText,s==="custom"&&styles.segmentBtnTextActive]}>
|
|
98
98
|
Custom
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
<react_native_1.Text style={styles.customFieldLabel}>
|
|
108
108
|
{t("console.enterCount","Enter number of logs:")}
|
|
109
109
|
</react_native_1.Text>
|
|
110
|
-
<react_native_1.TextInput keyboardType="number-pad"value={
|
|
110
|
+
<react_native_1.TextInput keyboardType="number-pad"value={E}onChangeText={U}style={styles.customCountInput}placeholder="e.g. 50"placeholderTextColor={AppColors_1.AppColors.slate400}/>
|
|
111
111
|
</react_native_1.View>
|
|
112
112
|
|
|
113
113
|
|
|
@@ -116,16 +116,16 @@
|
|
|
116
116
|
<react_native_1.Text style={styles.customFieldLabel}>
|
|
117
117
|
{t("console.ignorePatterns","Ignore Patterns (Regex):")}
|
|
118
118
|
</react_native_1.Text>
|
|
119
|
-
{
|
|
119
|
+
{h.isValid&&z>0&&<react_native_1.View style={styles.regexExclusionBadge}>
|
|
120
120
|
<react_native_1.Text style={styles.regexExclusionBadgeText}>
|
|
121
|
-
-{
|
|
121
|
+
-{z} excluded
|
|
122
122
|
</react_native_1.Text>
|
|
123
123
|
</react_native_1.View>}
|
|
124
124
|
</react_native_1.View>
|
|
125
125
|
|
|
126
|
-
<react_native_1.TextInput autoCapitalize="none"autoCorrect={!1}value={
|
|
126
|
+
<react_native_1.TextInput autoCapitalize="none"autoCorrect={!1}value={_}onChangeText={K}style={[styles.regexInput,!h.isValid&&styles.regexInputError]}placeholder="e.g. ^\[DEBUG\]|analytics|token=.*"placeholderTextColor={AppColors_1.AppColors.slate400}/>
|
|
127
127
|
|
|
128
|
-
{
|
|
128
|
+
{h.isValid?<react_native_1.Text style={styles.regexHelpText}>
|
|
129
129
|
{t("console.ignorePatternsDesc","Logs matching this regex will be excluded from export.")}
|
|
130
130
|
</react_native_1.Text>:<react_native_1.Text style={styles.regexErrorText}>
|
|
131
131
|
⚠️{" "}
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
<react_native_1.View style={styles.section}>
|
|
140
140
|
<react_native_1.Text style={styles.sectionLabel}>EXPORT FORMAT</react_native_1.Text>
|
|
141
141
|
<react_native_1.View style={styles.formatRowInline}>
|
|
142
|
-
{[{id:"txt",label:"Plain Text (.txt)",desc:"Universal text with structured banners"},{id:"log",label:"Log File (.log)",desc:"Standard log format with frame blocks"}].map(e=>{const o=
|
|
142
|
+
{[{id:"txt",label:"Plain Text (.txt)",desc:"Universal text with structured banners"},{id:"log",label:"Log File (.log)",desc:"Standard log format with frame blocks"}].map(e=>{const o=c===e.id;return<TouchableScale_1.default key={e.id}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),J(e.id)}}style={[styles.formatCardInline,o&&styles.formatCardInlineActive]}>
|
|
143
143
|
<react_native_1.View style={styles.formatCardInlineHeader}>
|
|
144
144
|
<react_native_1.View style={[styles.radioCircle,o&&styles.radioCircleActive]}>
|
|
145
145
|
{o&&<react_native_1.View style={styles.radioDot}/>}
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
<react_native_1.View style={styles.section}>
|
|
158
158
|
<react_native_1.Text style={styles.sectionLabel}>CONTENT OPTIONS</react_native_1.Text>
|
|
159
159
|
<react_native_1.View style={styles.optionsGrid}>
|
|
160
|
-
{[{key:"stack",label:"Stack Trace & Frames",value:
|
|
160
|
+
{[{key:"stack",label:"Stack Trace & Frames",value:P,toggle:()=>X(e=>!e)},{key:"args",label:"Arguments & Payloads",value:O,toggle:()=>Z(e=>!e)},{key:"caller",label:"Caller & File Origin",value:M,toggle:()=>Q(e=>!e)},{key:"timestamps",label:"Exact Timestamps",value:W,toggle:()=>Y(e=>!e)},{key:"appinfo",label:"System Header Banner",value:N,toggle:()=>ee(e=>!e)}].map(e=><TouchableScale_1.default key={e.key}onPress={()=>{(0,NativeInspector_1.triggerNativeHaptic)("light"),e.toggle()}}style={[styles.optionRow,e.value&&styles.optionRowActive]}>
|
|
161
161
|
<react_native_1.View style={[styles.checkbox,e.value&&styles.checkboxActive]}>
|
|
162
162
|
{e.value&&<NetworkIcons_1.CheckIcon size={10}color={AppColors_1.AppColors.white}/>}
|
|
163
163
|
</react_native_1.View>
|
|
@@ -175,37 +175,37 @@
|
|
|
175
175
|
<react_native_1.View style={styles.footerSummaryLeft}>
|
|
176
176
|
<react_native_1.View style={styles.footerSummaryDot}/>
|
|
177
177
|
<react_native_1.Text style={styles.footerSummaryCountText}>
|
|
178
|
-
{
|
|
178
|
+
{n.length} logs
|
|
179
179
|
</react_native_1.Text>
|
|
180
180
|
<react_native_1.Text style={styles.footerSummaryDivider}>•</react_native_1.Text>
|
|
181
181
|
<react_native_1.Text style={styles.footerSummarySizeText}>
|
|
182
|
-
~{
|
|
182
|
+
~{V(D)}
|
|
183
183
|
</react_native_1.Text>
|
|
184
184
|
<react_native_1.Text style={styles.footerSummaryDivider}>•</react_native_1.Text>
|
|
185
185
|
<react_native_1.Text style={styles.footerSummaryFormatText}>
|
|
186
|
-
.{
|
|
186
|
+
.{c.toUpperCase()}
|
|
187
187
|
</react_native_1.Text>
|
|
188
188
|
</react_native_1.View>
|
|
189
189
|
|
|
190
|
-
{
|
|
190
|
+
{z>0&&<react_native_1.View style={styles.footerIgnoredPill}>
|
|
191
191
|
<react_native_1.Text style={styles.footerIgnoredPillText}>
|
|
192
|
-
-{
|
|
192
|
+
-{z} ignored
|
|
193
193
|
</react_native_1.Text>
|
|
194
194
|
</react_native_1.View>}
|
|
195
195
|
</react_native_1.View>
|
|
196
196
|
|
|
197
|
-
<TouchableScale_1.default onPress={
|
|
197
|
+
<TouchableScale_1.default onPress={ne}disabled={n.length===0}style={[styles.exportActionBtn,n.length===0&&styles.exportActionBtnDisabled]}>
|
|
198
198
|
<NetworkIcons_1.ExportIcon size={17}color={AppColors_1.AppColors.white}/>
|
|
199
199
|
<react_native_1.Text style={styles.exportActionBtnText}>
|
|
200
|
-
{t("console.exportLogsAction",{count:
|
|
200
|
+
{t("console.exportLogsAction",{count:n.length,size:V(D),defaultValue:`Export ${n.length} Logs (${V(D)})`})}
|
|
201
201
|
</react_native_1.Text>
|
|
202
202
|
</TouchableScale_1.default>
|
|
203
203
|
</react_native_1.View>
|
|
204
204
|
</>}
|
|
205
205
|
|
|
206
206
|
|
|
207
|
-
{
|
|
208
|
-
<react_native_1.Animated.View style={[styles.progressIconBadge,{transform:[{scale:
|
|
207
|
+
{T==="progress"&&<react_native_1.View style={styles.progressContainer}>
|
|
208
|
+
<react_native_1.Animated.View style={[styles.progressIconBadge,{transform:[{scale:k}]}]}>
|
|
209
209
|
<NetworkIcons_1.ExportIcon size={30}color={AppColors_1.AppColors.purple}/>
|
|
210
210
|
</react_native_1.Animated.View>
|
|
211
211
|
|
|
@@ -213,24 +213,24 @@
|
|
|
213
213
|
{t("console.exportingLogs","Exporting Console Logs...")}
|
|
214
214
|
</react_native_1.Text>
|
|
215
215
|
<react_native_1.Text style={styles.progressSub}>
|
|
216
|
-
{t("console.processingItem","Processing")} {
|
|
217
|
-
{
|
|
218
|
-
{
|
|
216
|
+
{t("console.processingItem","Processing")} {le} /{" "}
|
|
217
|
+
{n.length} {t("console.records","records")} (
|
|
218
|
+
{ie}%)
|
|
219
219
|
</react_native_1.Text>
|
|
220
220
|
|
|
221
221
|
|
|
222
222
|
<react_native_1.View style={styles.progressTrack}>
|
|
223
|
-
<react_native_1.Animated.View style={[styles.progressBar,{width:
|
|
223
|
+
<react_native_1.Animated.View style={[styles.progressBar,{width:A.interpolate({inputRange:[0,1],outputRange:["0%","100%"]})}]}/>
|
|
224
224
|
</react_native_1.View>
|
|
225
225
|
|
|
226
226
|
<react_native_1.Text style={styles.progressFootnote}>
|
|
227
|
-
Formatting .{
|
|
228
|
-
{
|
|
227
|
+
Formatting .{c.toUpperCase()} payload with separators •{" "}
|
|
228
|
+
{V(D)}
|
|
229
229
|
</react_native_1.Text>
|
|
230
230
|
</react_native_1.View>}
|
|
231
231
|
|
|
232
232
|
|
|
233
|
-
{
|
|
233
|
+
{T==="complete"&&<react_native_1.View style={styles.completeContainer}>
|
|
234
234
|
<react_native_1.View style={styles.completeSuccessBadge}>
|
|
235
235
|
<NetworkIcons_1.CircleCheckIcon size={34}color={AppColors_1.AppColors.emerald500}/>
|
|
236
236
|
</react_native_1.View>
|
|
@@ -245,27 +245,27 @@
|
|
|
245
245
|
|
|
246
246
|
<react_native_1.View style={styles.fileDetailsCard}>
|
|
247
247
|
<react_native_1.View style={styles.fileDetailsRow}>
|
|
248
|
-
<react_native_1.Text style={styles.fileDetailLabel}>📁 File
|
|
248
|
+
<react_native_1.Text style={styles.fileDetailLabel}>📁 {t("console.exportFileLabel","File:")}</react_native_1.Text>
|
|
249
249
|
<react_native_1.Text style={styles.fileDetailValue}numberOfLines={1}>
|
|
250
|
-
{
|
|
250
|
+
{p}
|
|
251
251
|
</react_native_1.Text>
|
|
252
252
|
</react_native_1.View>
|
|
253
253
|
<react_native_1.View style={styles.fileDetailsRow}>
|
|
254
|
-
<react_native_1.Text style={styles.fileDetailLabel}>📊 Log Count
|
|
254
|
+
<react_native_1.Text style={styles.fileDetailLabel}>📊 {t("console.exportLogCountLabel","Log Count:")}</react_native_1.Text>
|
|
255
255
|
<react_native_1.Text style={styles.fileDetailValue}>
|
|
256
|
-
{
|
|
256
|
+
{n.length} logs
|
|
257
257
|
</react_native_1.Text>
|
|
258
258
|
</react_native_1.View>
|
|
259
259
|
<react_native_1.View style={styles.fileDetailsRow}>
|
|
260
|
-
<react_native_1.Text style={styles.fileDetailLabel}>💾 Final Size
|
|
260
|
+
<react_native_1.Text style={styles.fileDetailLabel}>💾 {t("console.exportFinalSizeLabel","Final Size:")}</react_native_1.Text>
|
|
261
261
|
<react_native_1.Text style={[styles.fileDetailValue,{color:AppColors_1.AppColors.emerald500,fontFamily:AppFonts_1.AppFonts.interBold}]}>
|
|
262
|
-
{
|
|
262
|
+
{V(ae)}
|
|
263
263
|
</react_native_1.Text>
|
|
264
264
|
</react_native_1.View>
|
|
265
265
|
<react_native_1.View style={styles.fileDetailsRow}>
|
|
266
|
-
<react_native_1.Text style={styles.fileDetailLabel}>⚙️ Format
|
|
266
|
+
<react_native_1.Text style={styles.fileDetailLabel}>⚙️ {t("console.exportFormatLabel","Format:")}</react_native_1.Text>
|
|
267
267
|
<react_native_1.Text style={styles.fileDetailValue}>
|
|
268
|
-
.{
|
|
268
|
+
.{c.toUpperCase()}
|
|
269
269
|
</react_native_1.Text>
|
|
270
270
|
</react_native_1.View>
|
|
271
271
|
</react_native_1.View>
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
|
|
274
274
|
<react_native_1.View style={styles.actionButtonGroup}>
|
|
275
275
|
|
|
276
|
-
<TouchableScale_1.default onPress={
|
|
276
|
+
<TouchableScale_1.default onPress={se}style={[styles.primaryActionBtn,styles.shareBtn]}>
|
|
277
277
|
<NetworkIcons_1.ShareIcon size={15}color={AppColors_1.AppColors.white}/>
|
|
278
278
|
<react_native_1.Text style={styles.primaryActionBtnText}>
|
|
279
279
|
{t("console.shareReport","Share Logs")}
|
|
@@ -281,7 +281,7 @@
|
|
|
281
281
|
</TouchableScale_1.default>
|
|
282
282
|
|
|
283
283
|
|
|
284
|
-
<TouchableScale_1.default onPress={
|
|
284
|
+
<TouchableScale_1.default onPress={ce}style={[styles.primaryActionBtn,styles.saveDiskBtn]}>
|
|
285
285
|
<NetworkIcons_1.SaveIcon size={15}color={AppColors_1.AppColors.white}/>
|
|
286
286
|
<react_native_1.Text style={styles.primaryActionBtnText}>
|
|
287
287
|
{t("console.saveToDisk","Save to Disk")}
|
|
@@ -289,7 +289,7 @@
|
|
|
289
289
|
</TouchableScale_1.default>
|
|
290
290
|
|
|
291
291
|
|
|
292
|
-
<TouchableScale_1.default onPress={
|
|
292
|
+
<TouchableScale_1.default onPress={pe}style={styles.secondaryActionBtn}>
|
|
293
293
|
<NetworkIcons_1.CopyIcon size={14}color={AppColors_1.AppColors.purple}/>
|
|
294
294
|
<react_native_1.Text style={styles.secondaryActionBtnText}>
|
|
295
295
|
{t("console.copyToClipboard","Copy Content")}
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
|
|
300
300
|
|
|
301
301
|
<react_native_1.View style={styles.bottomFooterRow}>
|
|
302
|
-
<TouchableScale_1.default onPress={()=>
|
|
302
|
+
<TouchableScale_1.default onPress={()=>B("config")}style={styles.textBtn}>
|
|
303
303
|
<react_native_1.Text style={styles.textBtnText}>
|
|
304
304
|
{t("console.exportAnother","\u2190 Export Another")}
|
|
305
305
|
</react_native_1.Text>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,o,s,n){n===void 0&&(n=s);var i=Object.getOwnPropertyDescriptor(o,s);(!i||("get"in i?!o.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(t,n,i)}):(function(t,o,s,n){n===void 0&&(n=s),t[n]=o[s]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,o){Object.defineProperty(t,"default",{enumerable:!0,value:o})}):function(t,o){t.default=o}),__importStar=this&&this.__importStar||(function(){var t=function(o){return t=Object.getOwnPropertyNames||function(s){var n=[];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[n.length]=i);return n},t(o)};return function(o){if(o&&o.__esModule)return o;var s={};if(o!=null)for(var n=t(o),i=0;i<n.length;i++)n[i]!=="default"&&__createBinding(s,o,n[i]);return __setModuleDefault(s,o),s}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../../i18n"),InspectorContext_1=require("./InspectorContext"),TouchableScale_1=__importDefault(require("../TouchableScale")),AnimatedEntrance_1=__importDefault(require("../AnimatedEntrance")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),FeatureUnderDevNotice_1=__importDefault(require("./FeatureUnderDevNotice")),HighlightText_1=__importDefault(require("../HighlightText")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),crashHandler_1=require("../../customHooks/crashHandler"),CrashFilterModal_1=__importStar(require("./CrashFilterModal")),ConfirmationModal_1=require("./ConfirmationModal"),NetworkIcons_1=require("../NetworkIcons"),getRelativeTime=t=>{const o=Date.now(),s=Math.max(0,o-t),n=Math.floor(s/1e3),i=Math.floor(n/60),T=Math.floor(i/60),x=Math.floor(T/24);return n<60?`${n}s ago`:i<60?`${i}m ago`:T<24?`${T}h ago`:`${x}d ago`},LOAD_MORE_STEP=10,CrashTab=react_1.default.memo(()=>{const{t}=(0,i18n_1.useTranslation)(),{crashRecords:o,setSelectedCrash:s,maxCrashLogs:n}=(0,InspectorContext_1.useInspector)(),i=n||50,T=(0,react_1.useRef)(null),[x,v]=(0,react_1.useState)(i),[f,A]=(0,react_1.useState)(""),[
|
|
1
|
+
"use strict";var __createBinding=this&&this.__createBinding||(Object.create?(function(t,o,s,n){n===void 0&&(n=s);var i=Object.getOwnPropertyDescriptor(o,s);(!i||("get"in i?!o.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(t,n,i)}):(function(t,o,s,n){n===void 0&&(n=s),t[n]=o[s]})),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?(function(t,o){Object.defineProperty(t,"default",{enumerable:!0,value:o})}):function(t,o){t.default=o}),__importStar=this&&this.__importStar||(function(){var t=function(o){return t=Object.getOwnPropertyNames||function(s){var n=[];for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&(n[n.length]=i);return n},t(o)};return function(o){if(o&&o.__esModule)return o;var s={};if(o!=null)for(var n=t(o),i=0;i<n.length;i++)n[i]!=="default"&&__createBinding(s,o,n[i]);return __setModuleDefault(s,o),s}})(),__importDefault=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(exports,"__esModule",{value:!0});const react_1=__importStar(require("react")),react_native_1=require("react-native"),i18n_1=require("../../i18n"),InspectorContext_1=require("./InspectorContext"),TouchableScale_1=__importDefault(require("../TouchableScale")),AnimatedEntrance_1=__importDefault(require("../AnimatedEntrance")),EndOfListFooter_1=__importDefault(require("../EndOfListFooter")),FeatureUnderDevNotice_1=__importDefault(require("./FeatureUnderDevNotice")),HighlightText_1=__importDefault(require("../HighlightText")),AppColors_1=require("../../styles/AppColors"),AppFonts_1=require("../../styles/AppFonts"),crashHandler_1=require("../../customHooks/crashHandler"),CrashFilterModal_1=__importStar(require("./CrashFilterModal")),ConfirmationModal_1=require("./ConfirmationModal"),NetworkIcons_1=require("../NetworkIcons"),getRelativeTime=t=>{const o=Date.now(),s=Math.max(0,o-t),n=Math.floor(s/1e3),i=Math.floor(n/60),T=Math.floor(i/60),x=Math.floor(T/24);return n<60?`${n}s ago`:i<60?`${i}m ago`:T<24?`${T}h ago`:`${x}d ago`},LOAD_MORE_STEP=10,CrashTab=react_1.default.memo(()=>{const{t}=(0,i18n_1.useTranslation)(),{crashRecords:o,setSelectedCrash:s,maxCrashLogs:n}=(0,InspectorContext_1.useInspector)(),i=n||50,T=(0,react_1.useRef)(null),[x,v]=(0,react_1.useState)(i),[f,A]=(0,react_1.useState)(""),[h,S]=(0,react_1.useState)("all"),[l,V]=(0,react_1.useState)(CrashFilterModal_1.DEFAULT_CRASH_FILTERS),[I,F]=(0,react_1.useState)(!1),[B,b]=(0,react_1.useState)(!1);(0,react_1.useEffect)(()=>{v(n||50),T.current?.scrollToOffset({offset:0,animated:!1})},[f,h,l,n]);const g=(0,react_1.useMemo)(()=>{const e=o.length;let r=0,a=0,y=0,C=0,w=0;return o.forEach(_=>{_.isFatal&&r++,_.type==="js"?a++:_.type==="promise"?y++:_.type==="render"?C++:_.type==="native"&&w++}),{total:e,fatalCount:r,jsCount:a,promiseCount:y,renderCount:C,nativeCount:w}},[o]),m=(0,react_1.useMemo)(()=>{let e=o.filter(r=>{if(h==="fatal"&&!r.isFatal||h==="js"&&r.type!=="js"||h==="promise"&&r.type!=="promise"||h==="render"&&r.type!=="render"||h==="native"&&r.type!=="native"||l.types.size>0&&!l.types.has("all")&&!(l.types.has("fatal")&&r.isFatal||l.types.has("js")&&r.type==="js"||l.types.has("promise")&&r.type==="promise"||l.types.has("render")&&r.type==="render"||l.types.has("native")&&r.type==="native"))return!1;if(l.timeWindow!=="all"){const a=Date.now(),y=l.timeWindow==="15m"?a-900*1e3:l.timeWindow==="1h"?a-3600*1e3:l.timeWindow==="24h"?a-1440*60*1e3:a-10080*60*1e3;if(r.timestamp<y)return!1}if(l.platform!=="all"&&(r.deviceInfo?.platform||"").toLowerCase()!==l.platform)return!1;if(l.engine!=="all"){const a=r.deviceInfo?.isHermes;if(l.engine==="hermes"&&a!==!0||l.engine==="jsc"&&a===!0)return!1}if(f.trim().length>0){const a=f.trim().toLowerCase().split(/\s+/).filter(Boolean),y=[r.message||"",r.name||"",r.stack||"",r.type||"",r.deviceInfo?.platform||"",...(r.breadcrumbs||[]).map(C=>`${C.type||""} ${C.message||""}`)].join(" ").toLowerCase();return a.every(C=>y.includes(C))}return!0});return l.sortBy==="time_asc"&&(e=[...e].sort((r,a)=>r.timestamp-a.timestamp)),e},[o,h,f,l]),k=()=>{b(!0)},z=(0,react_1.useCallback)(({item:e,index:r})=>{const a=e.isFatal,y=e.type.toUpperCase(),C=e.parsedStack&&e.parsedStack.length>0?e.parsedStack.find(R=>R.isAppCode)||e.parsedStack[0]:null,w=e.type==="native"?`${AppColors_1.AppColors.errorColor}22`:e.type==="render"?`${AppColors_1.AppColors.purple}22`:e.type==="promise"?`${AppColors_1.AppColors.darkOrange}22`:`${AppColors_1.AppColors.offerPurple}22`,_=e.type==="native"?AppColors_1.AppColors.errorColor:e.type==="render"?AppColors_1.AppColors.purple:e.type==="promise"?AppColors_1.AppColors.darkOrange:AppColors_1.AppColors.offerPurple;return<AnimatedEntrance_1.default index={r}distance={8}>
|
|
2
2
|
<TouchableScale_1.default onPress={()=>{s(e)}}style={[localStyles.cardContainer,a&&localStyles.fatalCardBorder]}>
|
|
3
3
|
|
|
4
4
|
<react_native_1.View style={localStyles.cardHeader}>
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
</react_native_1.View>}
|
|
16
16
|
|
|
17
17
|
<react_native_1.View style={[localStyles.typeBadge,{backgroundColor:w}]}>
|
|
18
|
-
<react_native_1.Text style={[localStyles.typeBadgeText,{color:
|
|
19
|
-
{
|
|
18
|
+
<react_native_1.Text style={[localStyles.typeBadgeText,{color:_}]}>
|
|
19
|
+
{y}
|
|
20
20
|
</react_native_1.Text>
|
|
21
21
|
</react_native_1.View>
|
|
22
22
|
</react_native_1.View>
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
{f.length>0&&<react_native_1.View style={{flexDirection:"row",alignItems:"center",gap:4}}>
|
|
141
141
|
<react_native_1.View style={{backgroundColor:`${AppColors_1.AppColors.purple}20`,borderRadius:10,paddingHorizontal:6,paddingVertical:1.5}}>
|
|
142
142
|
<react_native_1.Text style={{color:AppColors_1.AppColors.purple,fontSize:9.5,fontFamily:AppFonts_1.AppFonts.interBold}}>
|
|
143
|
-
{
|
|
143
|
+
{m.length}
|
|
144
144
|
</react_native_1.Text>
|
|
145
145
|
</react_native_1.View>
|
|
146
146
|
<react_native_1.TouchableOpacity onPress={()=>A("")}hitSlop={8}>
|
|
@@ -166,9 +166,9 @@
|
|
|
166
166
|
|
|
167
167
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",marginBottom:8,paddingHorizontal:12,gap:6}}>
|
|
168
168
|
<react_native_1.ScrollView horizontal showsHorizontalScrollIndicator={!1}style={{flex:1}}contentContainerStyle={{flexDirection:"row",alignItems:"center",gap:6,paddingRight:6}}>
|
|
169
|
-
{[{key:"all",label:t("crash.filterAll"),Icon:NetworkIcons_1.LayersIcon,count:g.total,themeColor:AppColors_1.AppColors.purple},{key:"fatal",label:t("crash.filterFatal"),Icon:NetworkIcons_1.SkullIcon,count:g.fatalCount,themeColor:AppColors_1.AppColors.errorColor},{key:"js",label:t("crash.filterJsError"),Icon:NetworkIcons_1.JsIcon,count:g.jsCount,themeColor:AppColors_1.AppColors.amber600},{key:"promise",label:t("crash.filterPromise"),Icon:NetworkIcons_1.HourglassIcon,count:g.promiseCount,themeColor:AppColors_1.AppColors.orange600},{key:"render",label:t("crash.filterRender"),Icon:NetworkIcons_1.LayoutIcon,count:g.renderCount,themeColor:AppColors_1.AppColors.violet600},{key:"native",label:t("crash.filterNative"),Icon:NetworkIcons_1.ChipIcon,count:g.nativeCount,themeColor:AppColors_1.AppColors.cyan600}].map(e=>{const r=
|
|
169
|
+
{[{key:"all",label:t("crash.filterAll"),Icon:NetworkIcons_1.LayersIcon,count:g.total,themeColor:AppColors_1.AppColors.purple},{key:"fatal",label:t("crash.filterFatal"),Icon:NetworkIcons_1.SkullIcon,count:g.fatalCount,themeColor:AppColors_1.AppColors.errorColor},{key:"js",label:t("crash.filterJsError"),Icon:NetworkIcons_1.JsIcon,count:g.jsCount,themeColor:AppColors_1.AppColors.amber600},{key:"promise",label:t("crash.filterPromise"),Icon:NetworkIcons_1.HourglassIcon,count:g.promiseCount,themeColor:AppColors_1.AppColors.orange600},{key:"render",label:t("crash.filterRender"),Icon:NetworkIcons_1.LayoutIcon,count:g.renderCount,themeColor:AppColors_1.AppColors.violet600},{key:"native",label:t("crash.filterNative"),Icon:NetworkIcons_1.ChipIcon,count:g.nativeCount,themeColor:AppColors_1.AppColors.cyan600}].map(e=>{const r=h===e.key,a=e.themeColor||AppColors_1.AppColors.purple,y=r?AppColors_1.AppColors.white:a,C=e.Icon;return<TouchableScale_1.default key={e.key}onPress={()=>S(e.key)}>
|
|
170
170
|
<react_native_1.View style={{flexDirection:"row",alignItems:"center",paddingHorizontal:9,paddingVertical:4.5,borderRadius:8,backgroundColor:r?a:`${a}12`,borderWidth:1,borderColor:r?a:`${a}30`,gap:5}}>
|
|
171
|
-
<C size={11}color={
|
|
171
|
+
<C size={11}color={y}/>
|
|
172
172
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:r?AppColors_1.AppColors.white:AppColors_1.AppColors.primaryBlack}}>
|
|
173
173
|
{e.label}
|
|
174
174
|
</react_native_1.Text>
|
|
@@ -185,56 +185,56 @@
|
|
|
185
185
|
</>}
|
|
186
186
|
|
|
187
187
|
|
|
188
|
-
{
|
|
188
|
+
{m.length===0?<react_native_1.ScrollView contentContainerStyle={localStyles.emptyContainer}showsVerticalScrollIndicator={!1}>
|
|
189
189
|
<react_native_1.View style={localStyles.emptyIconCircle}>
|
|
190
190
|
<NetworkIcons_1.ShieldAlertIcon size={38}color={AppColors_1.AppColors.greenColor}/>
|
|
191
191
|
</react_native_1.View>
|
|
192
192
|
<react_native_1.Text style={localStyles.emptyTitle}>
|
|
193
|
-
{f.length>0?"No matching crash entries":
|
|
193
|
+
{f.length>0?"No matching crash entries":h!=="all"||!(0,CrashFilterModal_1.isCrashFiltersDefault)(l)?"No crashes match filters":t("crash.emptyTitle")}
|
|
194
194
|
</react_native_1.Text>
|
|
195
195
|
<react_native_1.Text style={localStyles.emptySub}>
|
|
196
|
-
{f?`No crash entries matched "${f}"`:
|
|
196
|
+
{f?`No crash entries matched "${f}"`:h!=="all"||!(0,CrashFilterModal_1.isCrashFiltersDefault)(l)?"Try adjusting your filters or search keywords.":t("crash.emptySubtitle")}
|
|
197
197
|
</react_native_1.Text>
|
|
198
|
-
{f.length>0||
|
|
198
|
+
{f.length>0||h!=="all"||!(0,CrashFilterModal_1.isCrashFiltersDefault)(l)?<TouchableScale_1.default onPress={()=>{A(""),S("all"),V(CrashFilterModal_1.DEFAULT_CRASH_FILTERS)}}style={{marginTop:10,paddingHorizontal:14,paddingVertical:7,borderRadius:8,backgroundColor:AppColors_1.AppColors.purple}}>
|
|
199
199
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:11.5,color:AppColors_1.AppColors.white}}>
|
|
200
|
-
Clear Search & Filters
|
|
200
|
+
{t("common.clearSearchFilters","Clear Search & Filters")}
|
|
201
201
|
</react_native_1.Text>
|
|
202
202
|
</TouchableScale_1.default>:<react_native_1.View style={{marginTop:18,alignItems:"center",width:"100%",paddingHorizontal:16}}>
|
|
203
203
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.grayText,letterSpacing:.6,marginBottom:10}}>
|
|
204
|
-
TEST CRASH SENTINEL
|
|
204
|
+
{t("crash.testCrashSentinel","TEST CRASH SENTINEL")}
|
|
205
205
|
</react_native_1.Text>
|
|
206
206
|
<react_native_1.View style={{flexDirection:"row",gap:7,flexWrap:"wrap",justifyContent:"center"}}>
|
|
207
207
|
<TouchableScale_1.default onPress={()=>(0,crashHandler_1.simulateTestCrash)("js","Test JavaScript ReferenceError: variable is not defined",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${AppColors_1.AppColors.amber600}14`,borderWidth:1,borderColor:`${AppColors_1.AppColors.amber600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
|
|
208
208
|
<NetworkIcons_1.JsIcon size={11}color={AppColors_1.AppColors.amber600}/>
|
|
209
209
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.primaryBlack}}>
|
|
210
|
-
Simulate JS Crash
|
|
210
|
+
{t("crash.simulateJsCrash","Simulate JS Crash")}
|
|
211
211
|
</react_native_1.Text>
|
|
212
212
|
</TouchableScale_1.default>
|
|
213
213
|
|
|
214
214
|
<TouchableScale_1.default onPress={()=>(0,crashHandler_1.simulateTestCrash)("native","Test Native Crash: SIGSEGV (Segmentation Fault)",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${AppColors_1.AppColors.cyan600}14`,borderWidth:1,borderColor:`${AppColors_1.AppColors.cyan600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
|
|
215
215
|
<NetworkIcons_1.ChipIcon size={11}color={AppColors_1.AppColors.cyan600}/>
|
|
216
216
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.primaryBlack}}>
|
|
217
|
-
Simulate Native Crash
|
|
217
|
+
{t("crash.simulateNativeCrash","Simulate Native Crash")}
|
|
218
218
|
</react_native_1.Text>
|
|
219
219
|
</TouchableScale_1.default>
|
|
220
220
|
|
|
221
221
|
<TouchableScale_1.default onPress={()=>(0,crashHandler_1.simulateTestCrash)("promise","Unhandled Promise Rejection: Gateway connection timed out",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${AppColors_1.AppColors.orange600}14`,borderWidth:1,borderColor:`${AppColors_1.AppColors.orange600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
|
|
222
222
|
<NetworkIcons_1.HourglassIcon size={11}color={AppColors_1.AppColors.orange600}/>
|
|
223
223
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.primaryBlack}}>
|
|
224
|
-
Simulate Promise
|
|
224
|
+
{t("crash.simulatePromise","Simulate Promise")}
|
|
225
225
|
</react_native_1.Text>
|
|
226
226
|
</TouchableScale_1.default>
|
|
227
227
|
|
|
228
228
|
<TouchableScale_1.default onPress={()=>(0,crashHandler_1.simulateTestCrash)("render","Render Error: Cannot read property of undefined in Component",void 0,!0)}style={{flexDirection:"row",alignItems:"center",gap:5,backgroundColor:`${AppColors_1.AppColors.violet600}14`,borderWidth:1,borderColor:`${AppColors_1.AppColors.violet600}38`,paddingHorizontal:9,paddingVertical:6,borderRadius:8}}>
|
|
229
229
|
<NetworkIcons_1.LayoutIcon size={11}color={AppColors_1.AppColors.violet600}/>
|
|
230
230
|
<react_native_1.Text style={{fontFamily:AppFonts_1.AppFonts.interBold,fontSize:10.5,color:AppColors_1.AppColors.primaryBlack}}>
|
|
231
|
-
Simulate Render
|
|
231
|
+
{t("crash.simulateRender","Simulate Render")}
|
|
232
232
|
</react_native_1.Text>
|
|
233
233
|
</TouchableScale_1.default>
|
|
234
234
|
</react_native_1.View>
|
|
235
235
|
</react_native_1.View>}
|
|
236
236
|
</react_native_1.ScrollView>:<>
|
|
237
|
-
<react_native_1.FlatList ref={T}data={
|
|
237
|
+
<react_native_1.FlatList ref={T}data={m.slice(0,x)}keyExtractor={e=>e.id}renderItem={z}initialNumToRender={10}maxToRenderPerBatch={8}windowSize={5}updateCellsBatchingPeriod={40}removeClippedSubviews={!0}renderToHardwareTextureAndroid={!0}style={{flex:1}}contentContainerStyle={[localStyles.listContent,{flexGrow:1}]}showsVerticalScrollIndicator={!1}nestedScrollEnabled={!0}keyboardShouldPersistTaps="handled"ListFooterComponent={m.length>0?<EndOfListFooter_1.default count={Math.min(x,m.length)}totalCount={m.length}label="crashes"loadMoreStep={LOAD_MORE_STEP}hasMore={m.length>x}onLoadMore={()=>v(e=>e+LOAD_MORE_STEP)}/>:null}/>
|
|
238
238
|
</>}
|
|
239
239
|
|
|
240
240
|
|