react-native-inapp-inspector 2.5.10 → 2.5.12
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.ar.md +0 -8
- package/README.de.md +0 -8
- package/README.es.md +0 -8
- package/README.fr.md +0 -8
- package/README.hi.md +0 -8
- package/README.ja.md +0 -8
- package/README.ko.md +0 -8
- package/README.md +54 -26
- package/README.pt-BR.md +0 -8
- package/README.ru.md +0 -8
- package/README.zh-CN.md +0 -8
- package/dist/commonjs/components/ConsoleLogCard.js +32 -26
- package/dist/commonjs/components/ErrorBoundary.js +1 -1
- package/dist/commonjs/components/Inspector/ConsoleTab.js +19 -14
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +4 -4
- package/dist/commonjs/components/Inspector/InspectorHeader.js +73 -65
- package/dist/commonjs/components/Inspector/MainScreen.js +9 -6
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +187 -90
- package/dist/commonjs/components/Inspector/NetworkDetail.js +11 -8
- package/dist/commonjs/components/Inspector/NetworkTab.js +33 -31
- package/dist/commonjs/components/Inspector/PerformanceTab.d.ts +2 -0
- package/dist/commonjs/components/Inspector/PerformanceTab.js +652 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +346 -245
- package/dist/commonjs/components/Inspector/TabBar.js +17 -16
- package/dist/commonjs/components/LogCard.js +11 -8
- package/dist/commonjs/components/ModuleErrorBoundary.js +1 -1
- package/dist/commonjs/components/NetworkIcons.d.ts +9 -0
- package/dist/commonjs/components/NetworkIcons.js +51 -6
- package/dist/commonjs/constants/index.d.ts +1 -0
- package/dist/commonjs/constants/index.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 +9 -1
- package/dist/commonjs/customHooks/crashHandler.js +4 -4
- package/dist/commonjs/helpers/index.d.ts +3 -0
- package/dist/commonjs/helpers/index.js +8 -6
- package/dist/commonjs/helpers/performanceSampler.d.ts +88 -0
- package/dist/commonjs/helpers/performanceSampler.js +1 -0
- package/dist/commonjs/helpers/remoteConfig.d.ts +6 -0
- package/dist/commonjs/helpers/remoteConfig.js +1 -1
- package/dist/commonjs/helpers/telemetry.js +1 -1
- 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 +4 -2
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/enums.d.ts +1 -0
- package/dist/commonjs/types/enums.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +28 -0
- package/dist/esm/components/ConsoleLogCard.js +67 -61
- package/dist/esm/components/ErrorBoundary.js +10 -10
- package/dist/esm/components/Inspector/ConsoleTab.js +33 -28
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +22 -22
- package/dist/esm/components/Inspector/InspectorHeader.js +194 -186
- package/dist/esm/components/Inspector/MainScreen.js +61 -58
- package/dist/esm/components/Inspector/MediaGalleryTab.js +254 -157
- package/dist/esm/components/Inspector/NetworkDetail.js +62 -59
- package/dist/esm/components/Inspector/NetworkTab.js +39 -37
- package/dist/esm/components/Inspector/PerformanceTab.d.ts +2 -0
- package/dist/esm/components/Inspector/PerformanceTab.js +652 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +407 -306
- package/dist/esm/components/Inspector/TabBar.js +4 -3
- package/dist/esm/components/LogCard.js +37 -34
- package/dist/esm/components/ModuleErrorBoundary.js +1 -1
- package/dist/esm/components/NetworkIcons.d.ts +9 -0
- package/dist/esm/components/NetworkIcons.js +48 -3
- package/dist/esm/constants/index.d.ts +1 -0
- package/dist/esm/constants/index.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 +9 -1
- package/dist/esm/customHooks/crashHandler.js +6 -6
- package/dist/esm/helpers/index.d.ts +3 -0
- package/dist/esm/helpers/index.js +8 -6
- package/dist/esm/helpers/performanceSampler.d.ts +88 -0
- package/dist/esm/helpers/performanceSampler.js +1 -0
- package/dist/esm/helpers/remoteConfig.d.ts +6 -0
- package/dist/esm/helpers/remoteConfig.js +1 -1
- package/dist/esm/helpers/telemetry.js +1 -1
- 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 +4 -2
- package/dist/esm/index.js +8 -8
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/enums.d.ts +1 -0
- package/dist/esm/types/enums.js +1 -1
- package/dist/esm/types/interfaces.d.ts +28 -0
- package/package.json +24 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollView as Ce,Text as P,TouchableOpacity as U,View as C}from"react-native";import{useInspector as ke}from"./InspectorContext";import{useTranslation as we}from"../../i18n";import v from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import G from"../TouchableScale";import{SignalIcon as Se,TerminalIcon as Ie,AnalyticsIcon as Re,ReduxIcon as Te,CrashIcon as Be,BellIcon as Pe,SmartphoneIcon as Le,DatabaseIcon as Ae,QrCodeIcon as Ve,ScreencastIcon as Oe,ChevronIcon as Q,WebsocketIcon as De}from"../NetworkIcons";import{isReduxConnected as
|
|
1
|
+
import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollView as Ce,Text as P,TouchableOpacity as U,View as C}from"react-native";import{useInspector as ke}from"./InspectorContext";import{useTranslation as we}from"../../i18n";import v from"../../styles";import{AppColors as o}from"../../styles/AppColors";import{AppFonts as T}from"../../styles/AppFonts";import G from"../TouchableScale";import{SignalIcon as Se,TerminalIcon as Ie,AnalyticsIcon as Re,ReduxIcon as Te,CrashIcon as Be,BellIcon as Pe,SmartphoneIcon as Le,DatabaseIcon as Ae,QrCodeIcon as Ve,ScreencastIcon as Oe,ChevronIcon as Q,WebsocketIcon as De,SpeedometerIcon as Ee}from"../NetworkIcons";import{isReduxConnected as He}from"../../customHooks/reduxLogger";import{isAnalyticsConnected as We}from"../../customHooks/analyticsLogger";import{isLocalDebugEnvironment as $e}from"../../helpers";const n={themeColor:o.brandPurple,bgInactive:`${o.brandPurple}0D`,borderInactive:`${o.brandPurple}2B`,iconInactive:o.brandPurple,idBadgeBg:`${o.brandPurple}1C`,idBadgeBorder:`${o.brandPurple}3D`,idBadgeText:o.brandPurple},q={apis:n,logs:n,perf:n,analytics:n,redux:n,storage:n,device:n,crash:n,push:n,socket:n,debugging:n,media:n},je=ce.memo(()=>{const{t:J}=we(),{activeTab:w,switchActiveTab:L,tabVisibility:B,logs:A,consoleLogs:V,analyticsEvents:K,crashRecords:O,pushRecords:D,socketRecords:E,unreadPushCount:N,unreadSocketCount:X,lastReadApisCount:Y,lastReadLogsCount:Z,lastReadCrashesCount:ee,lastReadSocketCount:oe,mediaCount:H}=ke(),te=He(),ie=We(),k=w==="media",x=(B?.media??!0)&&(H>0||k||__DEV__),W=_(null),[z,re]=F(!1),[$,ne]=F(!0),j=_(0),le=e=>{const{contentOffset:t,layoutMeasurement:i,contentSize:r}=e.nativeEvent,S=t.x;j.current=S;const I=S>8,R=S<r.width-i.width-8;z!==I&&re(I),$!==R&&ne(R)},M=e=>{W.current?.scrollTo({x:Math.max(0,j.current+e),animated:!0})};return<C style={[v.tabBarContainer,{flexDirection:"row",alignItems:"center",paddingHorizontal:0}]}>
|
|
2
2
|
|
|
3
3
|
{z&&<U onPress={()=>M(-160)}hitSlop={{top:6,bottom:6,left:6,right:6}}activeOpacity={.7}style={{paddingLeft:6,paddingRight:2,justifyContent:"center",alignItems:"center"}}>
|
|
4
4
|
<C style={{width:22,height:22,borderRadius:11,backgroundColor:o.grayBorderSecondary,alignItems:"center",justifyContent:"center"}}>
|
|
@@ -8,10 +8,11 @@ import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollVie
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
<Ce testID="inspector.tab.scrollview"ref={W}horizontal showsHorizontalScrollIndicator={!1}onScroll={le}scrollEventThrottle={16}style={{flex:1}}contentContainerStyle={{paddingLeft:z?4:12,paddingRight:x?6:12}}>
|
|
11
|
-
{[{id:1,key:"apis",label:"APIs",count:A.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:V.length,icon:"logs"},{id:3,key:"analytics",label:"Analytics",count:K.length,icon:"analytics"},{id:
|
|
11
|
+
{[{id:1,key:"apis",label:"APIs",count:A.length,icon:"apis"},{id:2,key:"logs",label:"Logs",count:V.length,icon:"logs"},{id:3,key:"perf",label:"Perf / FPS",count:0,icon:"perf"},{id:4,key:"analytics",label:"Analytics",count:K.length,icon:"analytics"},{id:5,key:"redux",label:"Redux",count:0,icon:"redux"},{id:6,key:"storage",label:"Storage",count:0,icon:"storage"},{id:7,key:"device",label:"Device",count:0,icon:"device"},{id:8,key:"crash",label:"Crash",count:O?.length||0,icon:"crash"},{id:9,key:"push",label:"Push",count:D?.length||0,icon:"push"},{id:10,key:"socket",label:"WebSocket",count:E?.length||0,icon:"socket"},{id:11,key:"debugging",label:"Debugging",count:0,icon:"debugging"}].filter(e=>e.key==="debugging"?de.OS==="android"&&$e()&&!!B?.debugging:!(!B?.[e.key]||e.key==="redux"&&!te||e.key==="analytics"&&!ie)).map(e=>{const t=w===e.key,i=q[e.key]||q.apis,r=t?o.white:i.iconInactive,S=e.count>99?"99+":String(e.count),I=w!=="apis"&&A.length>Y,R=w!=="logs"&&V.length>Z,se=w!=="crash"&&(O?.length||0)>(ee||0),ae=w!=="socket"&&((E?.length||0)>(oe||0)||X>0);return<G key={e.key}testID={`inspector.tab.${e.key}`}onPress={()=>{L(e.key)}}style={[v.contentTabButton,{backgroundColor:t?i.themeColor:i.bgInactive,borderColor:t?i.themeColor:i.borderInactive},t&&{shadowColor:i.themeColor,shadowOffset:{width:0,height:2},shadowOpacity:.28,shadowRadius:3.5,elevation:3}]}>
|
|
12
12
|
<C style={{flexDirection:"row",alignItems:"center",gap:6}}>
|
|
13
13
|
{e.icon==="apis"&&<Se color={r}size={14}/>}
|
|
14
14
|
{e.icon==="logs"&&<Ie color={r}size={14}/>}
|
|
15
|
+
{e.icon==="perf"&&<Ee color={r}size={14}/>}
|
|
15
16
|
{e.icon==="analytics"&&<Re color={r}size={14}/>}
|
|
16
17
|
{e.icon==="redux"&&<Te color={r}size={14}/>}
|
|
17
18
|
{e.icon==="storage"&&<Ae color={r}size={14}/>}
|
|
@@ -54,4 +55,4 @@ import ce,{useRef as _,useState as F}from"react";import{Platform as de,ScrollVie
|
|
|
54
55
|
</C>
|
|
55
56
|
</G>
|
|
56
57
|
</C>}
|
|
57
|
-
</C>});export default
|
|
58
|
+
</C>});export default je;
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import
|
|
1
|
+
import re,{useEffect as ne,useRef as le,useMemo as ae}from"react";import{Alert as E,Animated as D,Linking as ie,View as C,Pressable as F,Text as T,StyleSheet as U}from"react-native";import Ce,{Path as Te}from"react-native-svg";import{AppColors as e}from"../styles/AppColors";import{METHOD_COLORS as A}from"../constants";import{getStatusColor as Se,getDurationColor as Be,formatDateTime as Re,getSize as He,getPath as Ve,getBaseUrl as ze,openWithPostman as q}from"../helpers";import{CalendarIcon as Ie,ClockIcon as N,SizeIcon as Le,CircleCheckIcon as Pe,CircleAlertIcon as $e,CircleXIcon as Oe,RepeatIcon as De,ForwardChevronIcon as Fe,GlobeIcon as We,PostmanIcon as Me}from"./NetworkIcons";import{AppFonts as S}from"../styles/AppFonts";import G from"./HighlightText";import Ee from"./TouchableScale";import{useTranslation as Ue}from"../i18n";function Ae({item:o,onPress:B,timelineMinStart:Ne,timelineTotalRange:Ge,isNew:L,isSelected:W,onToggleSelect:J,searchStr:j,testID:K}){const{t:R}=Ue(),M=A[o.method]??A.ALL,V=ae(()=>{try{const r=new URL(o.url),O=r.host,v=r.pathname+(r.search?r.search:""),te=r.protocol==="https:";return{host:O,path:v||"/",isHttps:te}}catch{const r=o.url.toLowerCase().startsWith("https:"),O=Ve(o.url);return{host:ze(o.url).replace(/^https?:\/\//,""),path:O||o.url,isHttps:r}}},[o.url]),Q=r=>{r?.stopPropagation?.(),E.alert(R("common.openInBrowser")||"Open URL",`${R("common.openInBrowserPrompt")||"Choose how you want to open or inspect this URL:"}
|
|
2
2
|
|
|
3
|
-
${
|
|
4
|
-
<
|
|
3
|
+
${o.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:"Open in Postman",onPress:()=>q(o)},{text:R("common.open")||"Browser",onPress:()=>{ie.openURL(o.url).catch(()=>{E.alert(R("common.error")||"Error",R("common.cannotOpenUrl")||"Could not open URL")})}}])},X=r=>{r?.stopPropagation?.(),q(o)},H=o.status===0||o.status!=null&&o.status>=400,z=o.status==null,P=Se(o.status),I=Be(o.duration),_=z?e.darkOrange:H?e.errorColor:e.greenColor,$=le(new D.Value(L?.35:0)).current;ne(()=>{L&&D.timing($,{toValue:0,duration:1200,useNativeDriver:!0}).start()},[L,$]);const Y=()=>{if(z)return"...";if(o.status===0||o.status==null)return R("network.statusFailed")||"FAILED";const r=typeof o.status=="number"?o.status:parseInt(String(o.status||0),10);return r===200?"200 OK":r===201?"201 Created":r===204?"204 No Content":r===304?"304 Not Modified":r===400?"400 Bad Req":r===401?"401 Unauth":r===403?"403 Forbidden":r===404?"404 Not Found":r===500?"500 Error":String(o.status)},Z=()=>{if(z)return<N color={e.darkOrange}size={10}/>;const r=typeof o.status=="number"?o.status:parseInt(String(o.status||0),10);return r>=200&&r<300?<Pe color={e.greenColor}size={10}/>:r>=300&&r<400?<De color={e.amber700}size={10}/>:r>=400&&r<500?<$e color={e.darkOrange}size={10}/>:<Oe color={e.errorColor}size={10}/>},ee=Re(o.startTime),oe=o.url.split("?")[0].toLowerCase().endsWith(".json");return<C style={t.container}>
|
|
4
|
+
<Ee testID={K}onPress={B}style={[t.card,{borderLeftWidth:3.5,borderLeftColor:_,backgroundColor:H?e.errorCardBg:e.white}]}>
|
|
5
5
|
<C style={t.cardBody}>
|
|
6
6
|
|
|
7
7
|
<C style={t.cardHeaderRow}>
|
|
8
8
|
<C style={t.cardHeaderLeft}>
|
|
9
|
-
<
|
|
10
|
-
{
|
|
9
|
+
<F onPress={()=>J(o.id)}hitSlop={12}style={[t.smallCheckbox,W&&t.smallCheckboxChecked]}>
|
|
10
|
+
{W&&<Ce width={9}height={9}viewBox="0 0 24 24"fill="none">
|
|
11
11
|
<Te d="M20 6L9 17l-5-5"stroke={e.white}strokeWidth="4"strokeLinecap="round"strokeLinejoin="round"/>
|
|
12
12
|
</Ce>}
|
|
13
|
-
</
|
|
13
|
+
</F>
|
|
14
14
|
|
|
15
|
-
<T style={t.serialNumber}>#{
|
|
15
|
+
<T style={t.serialNumber}>#{o.id+1}</T>
|
|
16
16
|
|
|
17
|
-
<C style={[t.methodBadge,{backgroundColor:
|
|
17
|
+
<C style={[t.methodBadge,{backgroundColor:M}]}>
|
|
18
18
|
<T style={t.methodBadgeText}>
|
|
19
|
-
{
|
|
19
|
+
{o.method}
|
|
20
20
|
</T>
|
|
21
21
|
</C>
|
|
22
22
|
|
|
23
|
-
{
|
|
24
|
-
<T style={[t.chipText,{color:
|
|
25
|
-
{
|
|
23
|
+
{o.client&&<C style={[t.chip,{backgroundColor:o.client==="axios"?`${e.purple}14`:o.client==="apollo"||o.client==="graphql"?`${e.pink500}14`:o.client==="xhr"?`${e.amber500}14`:`${e.sky500}14`,borderColor:o.client==="axios"?`${e.purple}30`:o.client==="apollo"||o.client==="graphql"?`${e.pink500}30`:o.client==="xhr"?`${e.amber500}30`:`${e.sky500}30`}]}>
|
|
24
|
+
<T style={[t.chipText,{color:o.client==="axios"?e.purple:o.client==="apollo"||o.client==="graphql"?e.pink500:o.client==="xhr"?e.amber700:e.sky600}]}>
|
|
25
|
+
{o.client.toUpperCase()}
|
|
26
26
|
</T>
|
|
27
27
|
</C>}
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
{(
|
|
30
|
+
{(o.url.toLowerCase().includes("graphql")||o.client==="apollo"||o.client==="graphql")&&<C style={[t.chip,{backgroundColor:e.roseBg,borderColor:e.roseBorder}]}>
|
|
31
31
|
<T style={[t.chipText,{color:e.pink600}]}>
|
|
32
32
|
GQL
|
|
33
33
|
</T>
|
|
@@ -35,15 +35,18 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
|
|
|
35
35
|
</C>
|
|
36
36
|
|
|
37
37
|
<C style={t.cardHeaderRight}>
|
|
38
|
-
<C style={[t.statusPill,{backgroundColor:H?`${e.errorColor}14`:z?`${e.darkOrange}14`:`${
|
|
39
|
-
{
|
|
40
|
-
<T style={[t.statusPillText,{color:H?e.errorColor:z?e.darkOrange
|
|
41
|
-
{
|
|
38
|
+
<C style={[t.statusPill,{backgroundColor:H?`${e.errorColor}14`:z?`${e.darkOrange}14`:`${P}14`,borderColor:H?`${e.errorColor}33`:z?`${e.darkOrange}33`:`${P}33`}]}>
|
|
39
|
+
{Z()}
|
|
40
|
+
<T style={[t.statusPillText,{color:H?e.errorColor:z?e.darkOrange:P}]}>
|
|
41
|
+
{Y()}
|
|
42
42
|
</T>
|
|
43
43
|
</C>
|
|
44
|
-
<
|
|
45
|
-
<
|
|
46
|
-
</
|
|
44
|
+
<F onPress={Q}hitSlop={8}style={t.globeBtn}accessibilityRole="button"accessibilityLabel="Open in Browser">
|
|
45
|
+
<We color={e.grayTextWeak}size={12}/>
|
|
46
|
+
</F>
|
|
47
|
+
<F onPress={X}hitSlop={8}style={[t.globeBtn,{backgroundColor:"rgba(255, 108, 55, 0.12)",borderColor:"rgba(255, 108, 55, 0.28)"}]}accessibilityRole="button"accessibilityLabel="Open with Postman">
|
|
48
|
+
<Me color="#FF6C37"size={11}/>
|
|
49
|
+
</F>
|
|
47
50
|
<Fe color={e.grayTextWeak}size={13}/>
|
|
48
51
|
</C>
|
|
49
52
|
</C>
|
|
@@ -58,21 +61,21 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
|
|
|
58
61
|
{V.isHttps?"HTTPS":"HTTP"}
|
|
59
62
|
</T>
|
|
60
63
|
</C>
|
|
61
|
-
<G text={V.host||
|
|
64
|
+
<G text={V.host||o.url}search={j}style={t.hostText}highlightStyle={t.highlight}numberOfLines={1}ellipsizeMode="tail"/>
|
|
62
65
|
</C>
|
|
63
66
|
<C style={t.urlBadgeRow}>
|
|
64
|
-
{
|
|
67
|
+
{oe&&<C style={t.jsonBadge}>
|
|
65
68
|
<T style={t.jsonBadgeText}>.json</T>
|
|
66
69
|
</C>}
|
|
67
|
-
{
|
|
68
|
-
<T style={t.dupBadgeText}>×{
|
|
70
|
+
{o.duplicateCount!=null&&o.duplicateCount>1&&<C style={t.dupBadge}>
|
|
71
|
+
<T style={t.dupBadgeText}>×{o.duplicateCount}</T>
|
|
69
72
|
</C>}
|
|
70
73
|
</C>
|
|
71
74
|
</C>
|
|
72
75
|
|
|
73
76
|
|
|
74
77
|
<C style={t.slugRow}>
|
|
75
|
-
<G text={V.path}search={
|
|
78
|
+
<G text={V.path}search={j}style={t.pathText}highlightStyle={t.highlight}numberOfLines={1}ellipsizeMode="middle"/>
|
|
76
79
|
</C>
|
|
77
80
|
</C>
|
|
78
81
|
|
|
@@ -81,22 +84,22 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
|
|
|
81
84
|
<C style={t.footerLeft}>
|
|
82
85
|
<C style={t.cardDateRow}>
|
|
83
86
|
<Ie color={e.grayTextWeak}size={10}/>
|
|
84
|
-
<T style={t.cardDateText}numberOfLines={1}>{
|
|
87
|
+
<T style={t.cardDateText}numberOfLines={1}>{ee}</T>
|
|
85
88
|
</C>
|
|
86
89
|
</C>
|
|
87
90
|
|
|
88
91
|
<C style={t.footerRight}>
|
|
89
|
-
{
|
|
92
|
+
{o.response!=null&&<C style={t.metaStatChip}>
|
|
90
93
|
<Le color={e.purple}size={9}/>
|
|
91
94
|
<T style={t.metaStatText}>
|
|
92
|
-
{He(
|
|
95
|
+
{He(o.response)}
|
|
93
96
|
</T>
|
|
94
97
|
</C>}
|
|
95
98
|
|
|
96
|
-
{
|
|
99
|
+
{o.duration!=null&&!H&&<C style={[t.metaStatChip,{backgroundColor:`${I}12`,borderColor:`${I}2E`}]}>
|
|
97
100
|
<N color={I}size={9}/>
|
|
98
101
|
<T style={[t.metaStatText,{color:I}]}>
|
|
99
|
-
{
|
|
102
|
+
{o.duration}ms
|
|
100
103
|
</T>
|
|
101
104
|
</C>}
|
|
102
105
|
</C>
|
|
@@ -104,10 +107,10 @@ ${r.url}`,[{text:R("common.cancel")||"Cancel",style:"cancel"},{text:R("common.op
|
|
|
104
107
|
|
|
105
108
|
|
|
106
109
|
<C style={t.waterfallContainer}>
|
|
107
|
-
{typeof
|
|
110
|
+
{typeof o.duration=="number"&&o.duration>0&&!H&&<C style={[t.waterfallBar,{width:`${Math.min(100,Math.max(6,o.duration/1200*100))}%`,backgroundColor:I}]}/>}
|
|
108
111
|
</C>
|
|
109
112
|
</C>
|
|
110
113
|
|
|
111
|
-
{L&&<
|
|
112
|
-
</
|
|
113
|
-
</C>}const t=
|
|
114
|
+
{L&&<D.View pointerEvents="none"style={[U.absoluteFill,{backgroundColor:M,opacity:$}]}/>}
|
|
115
|
+
</Ee>
|
|
116
|
+
</C>}const t=U.create({container:{paddingHorizontal:8,paddingVertical:4,height:126,justifyContent:"center"},card:{height:118,alignSelf:"stretch",borderRadius:10,overflow:"hidden",borderWidth:1,borderColor:e.dividerColor,shadowColor:e.shadowColorString},cardBody:{height:"100%",paddingHorizontal:8,paddingTop:8,paddingBottom:6,justifyContent:"space-between"},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:22,minHeight:22,maxHeight:22},cardHeaderLeft:{flexDirection:"row",alignItems:"center",flex:1,marginRight:4,gap:4.5,minWidth:0,overflow:"hidden"},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},smallCheckbox:{width:15,height:15,borderRadius:4,borderWidth:1.5,borderColor:e.grayTextWeak,alignItems:"center",justifyContent:"center",backgroundColor:e.white},smallCheckboxChecked:{backgroundColor:e.purple,borderColor:e.purple},serialNumber:{fontFamily:S.interBold,color:e.grayTextWeak,fontSize:10},methodBadge:{paddingHorizontal:6,paddingVertical:2,borderRadius:5,alignItems:"center",justifyContent:"center"},methodBadgeText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12,letterSpacing:.5,color:e.white},chip:{paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:S.interBold,fontSize:9,lineHeight:12},statusPill:{flexDirection:"row",alignItems:"center",gap:3.5,paddingHorizontal:6,paddingVertical:2,borderRadius:6,borderWidth:1,flexShrink:0},statusPillText:{fontFamily:S.interBold,fontSize:9.5,lineHeight:12},globeBtn:{padding:3,borderRadius:4,backgroundColor:`${e.grayTextWeak}12`,alignItems:"center",justifyContent:"center"},urlBox:{backgroundColor:e.grayBackground,borderRadius:7,borderWidth:1,borderColor:e.dividerColor,paddingHorizontal:7,paddingVertical:4.5,height:48,minHeight:48,maxHeight:48,justifyContent:"center",gap:2.5,overflow:"hidden"},urlMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:4,minHeight:16},hostRow:{flexDirection:"row",alignItems:"center",gap:5,flex:1,minWidth:0},protoBadge:{paddingHorizontal:4,paddingVertical:1,borderRadius:3.5,borderWidth:1},protoBadgeText:{fontFamily:S.interBold,fontSize:8,lineHeight:10},hostText:{fontFamily:S.interBold,fontSize:11.5,lineHeight:15,color:e.primaryBlack,flex:1},urlBadgeRow:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},jsonBadge:{backgroundColor:`${e.darkOrange}14`,borderColor:`${e.darkOrange}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},jsonBadgeText:{fontFamily:S.interBold,fontSize:8.5,color:e.darkOrange},dupBadge:{backgroundColor:`${e.purple}14`,borderColor:`${e.purple}2E`,borderWidth:1,paddingHorizontal:4.5,paddingVertical:1,borderRadius:3.5},dupBadgeText:{fontFamily:S.interBold,fontSize:8.5,color:e.purple},slugRow:{flexDirection:"row",alignItems:"center",minHeight:15},pathText:{fontFamily:S.interMedium,fontSize:10.5,lineHeight:14,color:e.slate600||e.grayText,flex:1},highlight:{backgroundColor:e.yellowHighlight,color:e.primaryBlack,borderRadius:2},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",height:18,minHeight:18,maxHeight:18,gap:4},footerLeft:{flexDirection:"row",alignItems:"center",gap:4.5,flex:1,minWidth:0,overflow:"hidden"},footerRight:{flexDirection:"row",alignItems:"center",gap:4,flexShrink:0},cardDateRow:{flexDirection:"row",alignItems:"center",gap:3.5},cardDateText:{fontFamily:S.interRegular,fontSize:10,lineHeight:13,color:e.slate400},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,backgroundColor:e.violetSoftBg,borderColor:e.violetSoftBorder,borderWidth:1,paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:4},metaStatText:{fontFamily:S.interBold,color:e.violetSoftText,fontSize:9,lineHeight:12},waterfallContainer:{height:2.5,width:"100%",backgroundColor:e.graySurface,borderRadius:1.5,overflow:"hidden",marginTop:2},waterfallBar:{height:"100%",borderRadius:1.5}});function qe(o,B){return o.item===B.item&&o.isSelected===B.isSelected&&o.isNew===B.isNew&&o.searchStr===B.searchStr&&o.timelineMinStart===B.timelineMinStart&&o.timelineTotalRange===B.timelineTotalRange&&o.onPress===B.onPress&&o.onToggleSelect===B.onToggleSelect}export default re.memo(Ae,qe);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{Component as V}from"react";import{StyleSheet as D,Text as T,View as C,TouchableOpacity as I,Platform as B}from"react-native";import{AppFonts as S}from"../styles/AppFonts";import{AppColors as e}from"../styles/AppColors";import{copyToClipboard as F}from"../helpers";import{WarningTriangleIcon as M,RefreshCcwIcon as W,CopyIcon as A}from"./NetworkIcons";import{handleInterceptedCrash as v}from"../customHooks/crashHandler";import{CrashType as N}from"../types/enums";import{t as E}from"../i18n";export class ModuleErrorBoundary extends V{constructor(){super(...arguments),this.state={hasError:!1,error:null,copied:!1},this.handleRetry=()=>{this.setState({hasError:!1,error:null,copied:!1}),this.props.onRetry&&this.props.onRetry()},this.handleCopy=()=>{if(!this.state.error)return;const r=`[Module Error: ${this.props.moduleName||"Micro-Feature"}]
|
|
2
2
|
Message: ${this.state.error.message}
|
|
3
|
-
Stack: ${this.state.error.stack||"N/A"}`;F(r),this.setState({copied:!0}),setTimeout(()=>{this.setState({copied:!1})},2e3)}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,R){try{v(r,r?.stack,!1,N.
|
|
3
|
+
Stack: ${this.state.error.stack||"N/A"}`;F(r),this.setState({copied:!0}),setTimeout(()=>{this.setState({copied:!1})},2e3)}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,R){try{v(r,r?.stack,!1,N.Render,R.componentStack||void 0)}catch{}this.props.onError&&this.props.onError(r,R)}render(){if(this.state.hasError&&this.state.error){const{fallback:r,moduleName:R="UI Module",containerStyle:O}=this.props;return typeof r=="function"?r(this.state.error,this.handleRetry):r||<C style={[t.card,O]}>
|
|
4
4
|
<C style={t.headerRow}>
|
|
5
5
|
<C style={t.titleRow}>
|
|
6
6
|
<M color={e.red600}size={16}/>
|
|
@@ -58,6 +58,7 @@ export declare const WipeIcon: ({ color, size }: IconProps) => React.JSX.Element
|
|
|
58
58
|
export declare const LayersIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
59
59
|
export declare const UserIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
60
60
|
export declare const InfoCircleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
61
|
+
export declare const PostmanIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
61
62
|
export declare const WarningTriangleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
62
63
|
export declare const ErrorCircleIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
63
64
|
export declare const TrendingUpIcon: ({ color, size, }: IconProps) => React.JSX.Element;
|
|
@@ -229,3 +230,11 @@ export declare const WarmthIcon: ({ color, size }: IconProps) => React.JSX.Eleme
|
|
|
229
230
|
export declare const ExposureIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
230
231
|
export declare const VignetteIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
231
232
|
export declare const ArrowForwardIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
233
|
+
export declare const ScaleBalanceIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
234
|
+
export declare const VolumeMuteIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
235
|
+
export declare const ShieldBanIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
236
|
+
export declare const SpeedometerIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
237
|
+
export declare const CpuChipIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
238
|
+
export declare const PulseGraphIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
239
|
+
export declare const GaugeIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
240
|
+
export declare const MemoryRamIcon: ({ color, size }: IconProps) => React.JSX.Element;
|
|
@@ -143,9 +143,11 @@ import"react";import W,{Circle as M,Ellipse as T,Line as S,Path as L,Polygon as
|
|
|
143
143
|
</W>,UserIcon=({color:e=p.grayTextWeak,size:t=12})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
144
144
|
<L d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
145
145
|
<M cx="12"cy="7"r="4"stroke={e}strokeWidth="2"/>
|
|
146
|
-
</W>,InfoCircleIcon=({color:e=p.grayTextWeak,size:t=
|
|
147
|
-
<M cx="12"cy="12"r="
|
|
148
|
-
<L d="M12 16v-4M12
|
|
146
|
+
</W>,InfoCircleIcon=({color:e=p.grayTextWeak,size:t=14})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
147
|
+
<M cx="12"cy="12"r="9"stroke={e}strokeWidth="2"/>
|
|
148
|
+
<L d="M12 16v-4M12 8.5h.01"stroke={e}strokeWidth="2.2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
149
|
+
</W>,PostmanIcon=({color:e="#FF6C37",size:t=14})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
150
|
+
<L d="M21.5 2.5L10.5 13.5M21.5 2.5L14.5 21.5L10.5 13.5M21.5 2.5L2.5 9.5L10.5 13.5"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
149
151
|
</W>,WarningTriangleIcon=({color:e=p.grayTextWeak,size:t=12})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
150
152
|
<L d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
151
153
|
<L d="M12 9v4M12 17h.01"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
@@ -754,4 +756,47 @@ import"react";import W,{Circle as M,Ellipse as T,Line as S,Path as L,Polygon as
|
|
|
754
756
|
<T cx="12"cy="12"rx="6"ry="4.5"stroke={e}strokeWidth="1.8"strokeDasharray="2,2"/>
|
|
755
757
|
</W>,ArrowForwardIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
756
758
|
<L d="M5 12h14M12 5l7 7-7 7"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
759
|
+
</W>,ScaleBalanceIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
760
|
+
<L d="M12 3v18"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
761
|
+
<L d="M4 6l8-3 8 3"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
762
|
+
<L d="M4 10l4 8H0l4-8z"stroke={e}strokeWidth="1.5"strokeLinecap="round"strokeLinejoin="round"/>
|
|
763
|
+
<L d="M20 10l4 8h-8l4-8z"stroke={e}strokeWidth="1.5"strokeLinecap="round"strokeLinejoin="round"/>
|
|
764
|
+
<L d="M8 21h8"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
765
|
+
</W>,VolumeMuteIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
766
|
+
<H points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
767
|
+
<S x1="23"y1="9"x2="17"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
768
|
+
<S x1="17"y1="9"x2="23"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
769
|
+
</W>,ShieldBanIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
770
|
+
<L d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
771
|
+
<S x1="4.5"y1="4.5"x2="19.5"y2="19.5"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
772
|
+
</W>,SpeedometerIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
773
|
+
<L d="M12 2a10 10 0 0 0-7.07 17.07L12 12l5.07-5.07"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
774
|
+
<L d="M2 12a10 10 0 1 0 20 0 10 10 0 0 0-20 0z"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
775
|
+
<M cx="12"cy="12"r="2"fill={e}/>
|
|
776
|
+
</W>,CpuChipIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
777
|
+
<B x="4"y="4"width="16"height="16"rx="2"stroke={e}strokeWidth="2"/>
|
|
778
|
+
<B x="9"y="9"width="6"height="6"stroke={e}strokeWidth="1.5"/>
|
|
779
|
+
<S x1="9"y1="1"x2="9"y2="4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
780
|
+
<S x1="15"y1="1"x2="15"y2="4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
781
|
+
<S x1="9"y1="20"x2="9"y2="23"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
782
|
+
<S x1="15"y1="20"x2="15"y2="23"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
783
|
+
<S x1="20"y1="9"x2="23"y2="9"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
784
|
+
<S x1="20"y1="15"x2="23"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
785
|
+
<S x1="1"y1="9"x2="4"y2="9"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
786
|
+
<S x1="1"y1="15"x2="4"y2="15"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
787
|
+
</W>,PulseGraphIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
788
|
+
<C points="22 12 18 12 15 21 9 3 6 12 2 12"stroke={e}strokeWidth="2"strokeLinecap="round"strokeLinejoin="round"/>
|
|
789
|
+
</W>,GaugeIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
790
|
+
<L d="M3.34 17a10 10 0 1 1 17.32 0"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
791
|
+
<L d="M12 12l4-4"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
792
|
+
<M cx="12"cy="12"r="2"fill={e}/>
|
|
793
|
+
</W>,MemoryRamIcon=({color:e=p.white,size:t=16})=><W width={t}height={t}viewBox="0 0 24 24"fill="none">
|
|
794
|
+
<B x="2"y="6"width="20"height="12"rx="2"stroke={e}strokeWidth="2"/>
|
|
795
|
+
<S x1="6"y1="18"x2="6"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
796
|
+
<S x1="10"y1="18"x2="10"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
797
|
+
<S x1="14"y1="18"x2="14"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
798
|
+
<S x1="18"y1="18"x2="18"y2="21"stroke={e}strokeWidth="2"strokeLinecap="round"/>
|
|
799
|
+
<B x="5"y="9"width="3"height="5"fill={e}/>
|
|
800
|
+
<B x="10.5"y="9"width="3"height="5"fill={e}/>
|
|
801
|
+
<B x="16"y="9"width="3"height="5"fill={e}/>
|
|
757
802
|
</W>;
|
|
@@ -4,4 +4,5 @@ export declare const METHOD_COLORS: Record<Method, string>;
|
|
|
4
4
|
export declare const DOMAIN_COLORS: string[];
|
|
5
5
|
export declare const DURATION_FAST_MS = 200;
|
|
6
6
|
export declare const DURATION_SLOW_MS = 800;
|
|
7
|
+
export declare const DEFAULT_HIDDEN_URL_PATTERNS: string[];
|
|
7
8
|
export { LIB_VERSION } from './version';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{AppColors as o}from"../styles/AppColors";export const STATUS_FILTERS=["ALL","2xx","200","3xx","4xx","400","404","5xx","500","Failed"],METHOD_COLORS={ALL:o.slate500,GET:o.emerald600,POST:o.blue600,PUT:o.amber600,PATCH:o.violet600,DELETE:o.red600,QUERY:o.sky600,OPTIONS:o.slate600,HEAD:o.cyan600},DOMAIN_COLORS=o.domainColors,DURATION_FAST_MS=200,DURATION_SLOW_MS=800;export{LIB_VERSION}from"./version";
|
|
1
|
+
import{AppColors as o}from"../styles/AppColors";export const STATUS_FILTERS=["ALL","2xx","200","3xx","4xx","400","404","5xx","500","Failed"],METHOD_COLORS={ALL:o.slate500,GET:o.emerald600,POST:o.blue600,PUT:o.amber600,PATCH:o.violet600,DELETE:o.red600,QUERY:o.sky600,OPTIONS:o.slate600,HEAD:o.cyan600},DOMAIN_COLORS=o.domainColors,DURATION_FAST_MS=200,DURATION_SLOW_MS=800,DEFAULT_HIDDEN_URL_PATTERNS=["https://google-analytics.com/g/collect","https://api.npmjs.org","https://api.github.com","https://registry.npmjs.org"];export{LIB_VERSION}from"./version";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "2.5.
|
|
1
|
+
export declare const LIB_VERSION = "2.5.12";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION="2.5.
|
|
1
|
+
export const LIB_VERSION="2.5.12";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrashRecord, ParsedStackFrame, CrashBreadcrumb } from '../types';
|
|
1
|
+
import { CrashRecord, ParsedStackFrame, CrashBreadcrumb, CrashIgnoredTypes, CrashModalTriggerPolicy } from '../types';
|
|
2
2
|
import { CrashExportFormat, CrashType } from '../types/enums';
|
|
3
3
|
export interface CrashEventPayload {
|
|
4
4
|
error: Error | any;
|
|
@@ -8,9 +8,17 @@ export interface CrashEventPayload {
|
|
|
8
8
|
timestamp: number;
|
|
9
9
|
logId?: number;
|
|
10
10
|
crashRecord?: CrashRecord;
|
|
11
|
+
shouldShowModal?: boolean;
|
|
11
12
|
}
|
|
12
13
|
export { CrashExportFormat };
|
|
14
|
+
export declare const DEFAULT_CRASH_IGNORED_TYPES: CrashIgnoredTypes;
|
|
13
15
|
type CrashListener = (payload: CrashEventPayload) => void;
|
|
16
|
+
export declare const setCrashIgnoredTypesConfig: (config: Partial<CrashIgnoredTypes>) => void;
|
|
17
|
+
export declare const getCrashIgnoredTypesConfig: () => CrashIgnoredTypes;
|
|
18
|
+
export declare const setCrashModalTriggerPolicyConfig: (policy: CrashModalTriggerPolicy) => void;
|
|
19
|
+
export declare const getCrashModalTriggerPolicyConfig: () => CrashModalTriggerPolicy;
|
|
20
|
+
export declare const setCrashThrottleDuplicatesConfig: (throttle: boolean) => void;
|
|
21
|
+
export declare const applyCrashPolicyPreset: (preset: "balanced" | "max_shield" | "silent") => CrashIgnoredTypes;
|
|
14
22
|
export declare const setCrashModuleEnabled: (enabled: boolean) => void;
|
|
15
23
|
export declare const getCrashModuleEnabled: () => boolean;
|
|
16
24
|
export declare const setMaxCrashLogsLimit: (max: number) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{LogBox as
|
|
2
|
-
`),n=[];for(const o of r){const t=o.trim();if(!t||t.includes("crashHandler.ts")||t.includes("handleInterceptedCrash")||t.includes("addLogFromCrash")||t.includes("setupGlobalCrashHandler"))continue;const a=t.match(/^([^@]+)@(.*):(\d+):(\d+)$/);if(a){const[,c,i,
|
|
3
|
-
`):d=a.stack||new Error().stack||"";let
|
|
1
|
+
import{LogBox as D,NativeModules as M,TurboModuleRegistry as U,NativeEventEmitter as P,Platform as x,AppState as J,Dimensions as z}from"react-native";import{CrashExportFormat as V,CrashType as f}from"../types/enums";import{addLogFromCrash as G}from"./consoleLogger";import{showNativeFloatingButton as W,setNativeFloatingButtonBadge as Y}from"../native/NativeInspector";import{t as s}from"../i18n";export{V as CrashExportFormat};export const DEFAULT_CRASH_IGNORED_TYPES={js:!0,native:!1,render:!0,promise:!1,custom:!1};let k=[],T=!1,N=0,L="",p=[],g=[];const F=50;let C=100;const Z=Date.now();let _=!1,b={...DEFAULT_CRASH_IGNORED_TYPES},w="fatal_only",B=!0;export const setCrashIgnoredTypesConfig=e=>{b={...b,...e}},getCrashIgnoredTypesConfig=()=>({...b}),setCrashModalTriggerPolicyConfig=e=>{w=e},getCrashModalTriggerPolicyConfig=()=>w,setCrashThrottleDuplicatesConfig=e=>{B=e},applyCrashPolicyPreset=e=>{switch(e){case"max_shield":b={js:!1,native:!1,render:!1,promise:!1,custom:!1};break;case"silent":b={js:!0,native:!0,render:!0,promise:!0,custom:!0};break;default:b={...DEFAULT_CRASH_IGNORED_TYPES};break}return{...b}},setCrashModuleEnabled=e=>{_=e},getCrashModuleEnabled=()=>_,setMaxCrashLogsLimit=e=>{C=Math.max(10,e),p.length>C&&(p=p.slice(0,C))},getMaxCrashLogsLimit=()=>C,pruneCrashRecords=e=>{const r=e!==void 0?Math.max(0,e):Math.floor(p.length/2),n=p.length-r;return n>0&&(p=p.slice(0,r)),g.length>20&&(g=g.slice(0,20)),Math.max(0,n)},addCrashBreadcrumb=(e,r,n)=>{if(_)try{const o={type:e,message:r,timestamp:Date.now(),data:n};g.unshift(o),g.length>F&&(g=g.slice(0,F))}catch{}},recordNavigationBreadcrumb=(e,r)=>{addCrashBreadcrumb("navigation",s("crash.breadcrumbNavigation",{from:e||"/",to:r||"/"}),{from:e,to:r})},recordNetworkBreadcrumb=(e,r,n,o)=>{const t=n!=null?` [${n}]`:"",a=o!=null?` (${Math.round(o)}ms)`:"";addCrashBreadcrumb("network",`${r.toUpperCase()} ${e}${t}${a}`,{url:e,method:r,status:n,duration:o})},recordReduxBreadcrumb=(e,r)=>{addCrashBreadcrumb("redux",s("crash.breadcrumbAction",{actionType:e}),{type:e,payloadSummary:typeof r=="object"&&r!==null?Object.keys(r):typeof r})},recordUserActionBreadcrumb=(e,r)=>{addCrashBreadcrumb("user",e,r)},clearCrashBreadcrumbs=()=>{g=[]},getCrashBreadcrumbs=()=>[...g],parseCrashStackTrace=e=>{if(!e||typeof e!="string")return[];const r=e.split(`
|
|
2
|
+
`),n=[];for(const o of r){const t=o.trim();if(!t||t.includes("crashHandler.ts")||t.includes("handleInterceptedCrash")||t.includes("addLogFromCrash")||t.includes("setupGlobalCrashHandler"))continue;const a=t.match(/^([^@]+)@(.*):(\d+):(\d+)$/);if(a){const[,c,i,h,$]=a,y=i.split("?")[0].split("/").pop()||i,S=!i.includes("node_modules")&&!i.includes("react-native")&&!i.includes("react-dom")&&!i.includes("hermes")&&!i.includes("internal");n.push({method:c.trim(),file:y,lineNumber:parseInt(h,10),column:parseInt($,10),raw:t,isAppCode:S});continue}const u=t.match(/^at\s+(.+)\s+\((.+):(\d+):(\d+)\)$/);if(u){const[,c,i,h,$]=u,y=i.split("?")[0].split("/").pop()||i,S=!i.includes("node_modules")&&!i.includes("react-native")&&!i.includes("react-dom")&&!i.includes("internal");n.push({method:c.trim(),file:y,lineNumber:parseInt(h,10),column:parseInt($,10),raw:t,isAppCode:S});continue}const d=t.match(/^at\s+(.+):(\d+):(\d+)$/);if(d){const[,c,i,h]=d,$=c.split("?")[0].split("/").pop()||c,y=!c.includes("node_modules")&&!c.includes("react-native");n.push({method:"<anonymous>",file:$,lineNumber:parseInt(i,10),column:parseInt(h,10),raw:t,isAppCode:y});continue}const m=t.match(/^at\s+([a-zA-Z0-9_$.]+)\(([a-zA-Z0-9_$]+\.java):(\d+)\)$/);if(m){const[,c,i,h]=m,$=!c.startsWith("com.facebook.react")&&!c.startsWith("android.");n.push({method:c,file:i,lineNumber:parseInt(h,10),column:0,raw:t,isAppCode:$});continue}const l=t.match(/^\d+\s+([^\s]+)\s+(0x[0-9a-fA-F]+)\s+(.+)$/);if(l){const[,c,,i]=l,h=!c.startsWith("lib")&&!c.startsWith("Core")&&!c.startsWith("React");n.push({method:i,file:c,lineNumber:0,column:0,raw:t,isAppCode:h});continue}n.push({method:t.startsWith("at ")?t.slice(3):t,file:"runtime",lineNumber:0,column:0,raw:t,isAppCode:!1})}return n};const q=()=>{try{const e=globalThis.performance;if(e&&e.memory)return{usedJSHeapSize:Math.round(e.memory.usedJSHeapSize/(1024*1024)),totalJSHeapSize:Math.round(e.memory.totalJSHeapSize/(1024*1024))}}catch{}},K=()=>{try{const e=z.get("window");return`${Math.round(e.width)}x${Math.round(e.height)} (${e.scale}x)`}catch{return s("crash.unknown")}};export const computeCrashFingerprint=e=>{const r=e.type||"js",n=e.name||"Error",o=e.parsedStack&&e.parsedStack.length>0?e.parsedStack[0]:null,t=o?`${o.file}:${o.lineNumber}`:"unknown";return`${r}_${n}_${t}`},getCrashRecords=()=>[...p],clearCrashRecords=()=>{p=[],emitCrashEvent({error:null,message:"__CLEARED__",timestamp:Date.now()})},subscribeCrashEvents=e=>(k.push(e),()=>{k=k.filter(r=>r!==e)}),emitCrashEvent=e=>{if(e.message!=="__CLEARED__"){const r=Date.now();if(r-N<250)return;N=r}k.forEach(r=>{try{r(e)}catch{}})},handleInterceptedCrash=(e,r,n=!1,o,t)=>{try{const a=e instanceof Error||typeof e=="object"&&e!==null?e:new Error(String(e||s("crash.runtimeException"))),u=a.message||(typeof e=="string"?e:s("crash.runtimeException"));let d="";typeof r=="string"?d=r:Array.isArray(r)?d=r.map(E=>`at ${E.methodName||"<anonymous>"} (${E.file||"unknown"}:${E.lineNumber||0}:${E.column||0})`).join(`
|
|
3
|
+
`):d=a.stack||new Error().stack||"";let m=o||f.Js;const l=u.toLowerCase();if(o||(l.includes("native")||l.includes("sigsegv")||l.includes("nsrange")||l.includes("nullpointerexception")||l.includes("fatal signal")?m=f.Native:l.includes("promise")||l.includes("unhandled rejection")||l.includes("unhandledrejection")?m=f.Promise:l.includes("render")||l.includes("errorboundary")||t?m=f.Render:m=f.Js),!!b[m])return{id:`crash_ignored_${Date.now()}`,isFatal:n,type:m,message:u,timestamp:Date.now(),dateStr:new Date().toLocaleDateString(),timeStr:new Date().toLocaleTimeString()};const i=new Date,h=i.toLocaleDateString(),$=i.toLocaleTimeString(),y=parseCrashStackTrace(d),S=`${m}_${u}_${d.slice(0,80)}`,R=Date.now();if(B&&S===L&&R-N<500)return p.length>0&&(p[0].duplicateCount=(p[0].duplicateCount||1)+1),p[0];L=S,N=R;const j=G(a,`[${n?s("crash.logFatalCrash"):s("crash.logUnhandledError")}] ${u}`,d,n),A=typeof globalThis.HermesInternal<"u",H=typeof globalThis.nativeFabricUIManager<"u",I={id:`crash_${Date.now()}_${Math.random().toString(36).substr(2,6)}`,error:a,isFatal:n,type:m,message:u,name:a.name||(n?s("crash.errorNameFatal"):s("crash.errorNameUnhandled")),stack:d,parsedStack:y,componentStack:t||void 0,timestamp:Date.now(),dateStr:h,timeStr:$,deviceInfo:{platform:x.OS,osVersion:String(x.Version),rnVersion:x.constants?.reactNativeVersion?`${x.constants.reactNativeVersion.major}.${x.constants.reactNativeVersion.minor}.${x.constants.reactNativeVersion.patch}`:s("crash.unknown"),isHermes:A,isFabric:H,appState:J.currentState||"active"},memoryInfo:q(),breadcrumbs:[...g],logId:j?.id};p.unshift(I),p.length>C&&(p=p.slice(0,C));let v=!1;w==="all_errors"?v=!0:w==="fatal_only"?v=n||m===f.Native:w==="silent_tab_only"&&(v=!1),emitCrashEvent({error:a,isFatal:n,message:`[${n?s("crash.logFatalCrash"):s("crash.logUnhandledError")}] ${u}`,stack:d,timestamp:Date.now(),logId:j?.id,crashRecord:I,shouldShowModal:v});try{W(),Y(!0)}catch{}return I}catch{return{id:`crash_${Date.now()}`,isFatal:!0,type:f.Js,message:String(e||s("crash.unknownException")),timestamp:Date.now(),dateStr:new Date().toLocaleDateString(),timeStr:new Date().toLocaleTimeString()}}},recordCustomCrash=(e,r)=>handleInterceptedCrash(e,typeof e=="object"?e.stack:void 0,r?.isFatal??!1,r?.type||f.Custom,r?.componentStack),triggerGlobalCrashScreen=e=>{emitCrashEvent({error:e.error||new Error(e.message),isFatal:!0,message:e.message,stack:e.stack,timestamp:e.timestamp||Date.now(),logId:e.logId,crashRecord:e})},simulateTestCrash=(e=f.Js,r,n,o=!0)=>{const t=new Error(r||X(e));return handleInterceptedCrash(e===f.Native?t.message:t,n||t.stack,o,e,e===f.Render?Q():void 0)};const X=e=>{switch(e){case"native":return s("crash.simNativeMessage");case"promise":return s("crash.simPromiseMessage");case"render":return s("crash.simRenderMessage");default:return s("crash.simJsMessage")}},Q=()=>{try{const e=new Error;if(e.stack)return e.stack.split(`
|
|
4
4
|
`).slice(1,6).map(r=>` ${r.trim()}`).join(`
|
|
5
|
-
`)}catch{}};export const exportCrashReport=(e,r="text")=>{if(r==="json")return JSON.stringify(e,null,2);const n=Math.round((e.timestamp-
|
|
6
|
-
`)}const o=[];return o.push("===================================================="),o.push(` ${s("crash.reportTitle")} `),o.push("===================================================="),o.push(`${s("crash.reportErrorName")} ${e.name||"Error"}`),o.push(`${s("crash.reportMessage")} ${e.message}`),o.push(`${s("crash.reportType")} ${e.type.toUpperCase()}`),o.push(`${s("crash.reportFatal")} ${e.isFatal?s("crash.reportFatalYes"):s("crash.reportFatalNo")}`),o.push(`${s("crash.reportTimestamp")} ${e.dateStr} ${e.timeStr} (${e.timestamp})`),o.push(`${s("crash.reportUptime")} ${s("crash.reportUptimeValue",{seconds:n})}`),o.push(`${s("crash.reportPlatform")} ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),o.push(`${s("crash.reportReactNative")} ${e.deviceInfo?.rnVersion||"N/A"}`),o.push(`${s("crash.reportHermes")} ${e.deviceInfo?.isHermes?s("crash.reportEnabled"):s("crash.reportDisabled")}`),o.push(`${s("crash.reportArchitecture")} ${e.deviceInfo?.isFabric?s("crash.reportFabricNew"):s("crash.reportPaperLegacy")}`),o.push(`${s("crash.reportScreenSize")} ${
|
|
7
|
-
`)},setupGlobalCrashHandler=()=>{if(!
|
|
5
|
+
`)}catch{}};export const exportCrashReport=(e,r="text")=>{if(r==="json")return JSON.stringify(e,null,2);const n=Math.round((e.timestamp-Z)/1e3);if(r==="markdown"){const t=[];return t.push(`## ${s("crash.mdReportTitle",{name:e.name||"Error"})}`),t.push(`> **${e.message}**`),t.push(""),t.push(`- **${s("crash.reportType")}** \`${e.type.toUpperCase()}\``),t.push(`- **${s("crash.reportFatal")}** \`${e.isFatal?s("crash.mdSeverityFatal"):s("crash.mdSeverityHandled")}\``),t.push(`- **${s("crash.reportTimestamp")}** ${e.dateStr} ${e.timeStr}`),t.push(`- **${s("crash.reportUptime")}** ${n}s`),t.push(`- **${s("crash.reportPlatform")}** ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),t.push(`- **${s("crash.reportReactNative")}** v${e.deviceInfo?.rnVersion||"N/A"}`),t.push(`- **${s("crash.jsEngine")}** ${e.deviceInfo?.isHermes?s("crash.hermesEngine"):s("crash.jsc")}`),t.push(`- **${s("crash.reportArchitecture")}** ${e.deviceInfo?.isFabric?s("crash.reportFabricNew"):s("crash.reportPaperLegacy")}`),e.memoryInfo&&t.push(`- **${s("crash.reportJsMemory")}** ${e.memoryInfo.usedJSHeapSize} MB / ${e.memoryInfo.totalJSHeapSize} MB`),t.push(""),t.push(`### ${s("crash.mdStackTrace")}`),t.push("```"),t.push(e.stack||s("crash.reportNoStackTrace")),t.push("```"),e.componentStack&&(t.push(""),t.push(`### ${s("crash.mdComponentHierarchy")}`),t.push("```"),t.push(e.componentStack),t.push("```")),e.breadcrumbs&&e.breadcrumbs.length>0&&(t.push(""),t.push(`### ${s("crash.mdRecentBreadcrumbs")}`),e.breadcrumbs.forEach(a=>{const u=new Date(a.timestamp).toLocaleTimeString();t.push(`- \`[${u}]\` **[${a.type.toUpperCase()}]** ${a.message}`)})),t.join(`
|
|
6
|
+
`)}const o=[];return o.push("===================================================="),o.push(` ${s("crash.reportTitle")} `),o.push("===================================================="),o.push(`${s("crash.reportErrorName")} ${e.name||"Error"}`),o.push(`${s("crash.reportMessage")} ${e.message}`),o.push(`${s("crash.reportType")} ${e.type.toUpperCase()}`),o.push(`${s("crash.reportFatal")} ${e.isFatal?s("crash.reportFatalYes"):s("crash.reportFatalNo")}`),o.push(`${s("crash.reportTimestamp")} ${e.dateStr} ${e.timeStr} (${e.timestamp})`),o.push(`${s("crash.reportUptime")} ${s("crash.reportUptimeValue",{seconds:n})}`),o.push(`${s("crash.reportPlatform")} ${e.deviceInfo?.platform?.toUpperCase()} (v${e.deviceInfo?.osVersion})`),o.push(`${s("crash.reportReactNative")} ${e.deviceInfo?.rnVersion||"N/A"}`),o.push(`${s("crash.reportHermes")} ${e.deviceInfo?.isHermes?s("crash.reportEnabled"):s("crash.reportDisabled")}`),o.push(`${s("crash.reportArchitecture")} ${e.deviceInfo?.isFabric?s("crash.reportFabricNew"):s("crash.reportPaperLegacy")}`),o.push(`${s("crash.reportScreenSize")} ${K()}`),o.push(`${s("crash.reportAppState")} ${e.deviceInfo?.appState||"active"}`),e.memoryInfo&&o.push(`${s("crash.reportJsMemory")} ${e.memoryInfo.usedJSHeapSize} MB / ${e.memoryInfo.totalJSHeapSize} MB`),o.push("----------------------------------------------------"),o.push(`${s("crash.reportStackTrace")}`),o.push(e.stack||s("crash.reportNoStackTrace")),e.componentStack&&(o.push("----------------------------------------------------"),o.push(`${s("crash.reportComponentHierarchy")}`),o.push(e.componentStack)),e.breadcrumbs&&e.breadcrumbs.length>0&&(o.push("----------------------------------------------------"),o.push(`${s("crash.reportRecentBreadcrumbs")}`),e.breadcrumbs.forEach(t=>{const a=new Date(t.timestamp).toLocaleTimeString();o.push(` [${a}] [${t.type.toUpperCase()}] ${t.message}`)})),o.push("===================================================="),o.join(`
|
|
7
|
+
`)},setupGlobalCrashHandler=()=>{if(!T){T=!0;try{D&&typeof D.ignoreAllLogs=="function"&&D.ignoreAllLogs(!0)}catch{}try{const e=require("react-native/Libraries/LogBox/Data/LogBoxData");e&&typeof e.setDisabled=="function"&&e.setDisabled(!0)}catch{}try{const e=M?.NetworkInspectorModule;e&&(typeof e.enableNativeCrashProtection=="function"&&e.enableNativeCrashProtection(),new P(e).addListener("onNativeCrash",n=>{const t=`[${(n?.platform||x.OS).toUpperCase()} ${s("crash.nativeCrashTitle")}] ${n?.message||s("crash.nativeUncaughtException")}`,a=n?.stack||"";handleInterceptedCrash(t,a,!0,"native")}))}catch{}try{const e=U||globalThis.__turboModuleProxy,r=M?.ExceptionsManager||(e?.get?e.get("ExceptionsManager"):null);if(r){r.reportFatalException=(o,t,a)=>{handleInterceptedCrash(o,t,!0,"native");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.reportSoftException=(o,t,a)=>{handleInterceptedCrash(o,t,!1,"js");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.reportException=o=>{const t=o?.message||o?.title||s("crash.nativeException"),a=o?.stack||o?.rawStack;handleInterceptedCrash(t,a,o?.isFatal??!0,"js");try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}},r.updateExceptionMessage=()=>{};try{typeof r.dismissRedbox=="function"&&r.dismissRedbox()}catch{}}const n=M?.RedBox||M?.RCTRedBox||(e?.get?e.get("RedBox")||e.get("RCTRedBox"):null);n&&(typeof n.showErrorMessage=="function"&&(n.showErrorMessage=()=>{}),typeof n.showUserError=="function"&&(n.showUserError=()=>{}),typeof n.dismiss=="function"&&n.dismiss())}catch{}try{const r=globalThis.ErrorUtils;r&&(typeof r.setGlobalHandler=="function"&&r.setGlobalHandler((n,o)=>{handleInterceptedCrash(n,n?.stack,o??!1,"js")}),typeof r.reportFatalError=="function"&&(r.reportFatalError=n=>{handleInterceptedCrash(n,n?.stack,!0,"js")}),typeof r.reportError=="function"&&(r.reportError=n=>{handleInterceptedCrash(n,n?.stack,!1,"js")}))}catch{}try{const e=globalThis,r=n=>{try{const o=n?.reason||n?.detail?.reason||n,t=o?.stack||(n?.stack??new Error().stack);handleInterceptedCrash(o,t,!1,"promise")}catch{}};typeof e.addEventListener=="function"&&e.addEventListener("unhandledrejection",r),typeof e.onunhandledrejection<"u"&&(e.onunhandledrejection=r)}catch{}}};
|
|
@@ -17,6 +17,8 @@ export declare const getPath: (url: string) => string;
|
|
|
17
17
|
export declare const getBaseUrl: (url: string) => string;
|
|
18
18
|
export declare const getCurlCommand: (log: NetworkLog) => string;
|
|
19
19
|
export declare const getFetchCommand: (log: NetworkLog) => string;
|
|
20
|
+
export declare const getPostmanRequestJson: (log: NetworkLog) => string;
|
|
21
|
+
export declare const openWithPostman: (log: NetworkLog, toastFn?: (msg: string) => void) => Promise<void>;
|
|
20
22
|
export declare const deduplicateLogs: (raw: NetworkLog[]) => NetworkLog[];
|
|
21
23
|
export declare const escapeRegex: (str: string) => string;
|
|
22
24
|
export declare const getNavigationInfo: (state: any, path?: string[]) => RouteInfo;
|
|
@@ -82,3 +84,4 @@ export interface RuntimeDiagnostics {
|
|
|
82
84
|
totalAllocMb: number;
|
|
83
85
|
}
|
|
84
86
|
export declare const getRuntimeDiagnostics: () => RuntimeDiagnostics;
|
|
87
|
+
export declare const isUrlHidden: (url: string | undefined | null, patterns: string[] | undefined | null) => boolean;
|