react-native-inapp-inspector 2.3.20 → 2.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -14
- package/android/src/main/java/com/inappinspector/NetworkInspectorModule.kt +58 -1
- package/dist/commonjs/components/AppHeaderLogo.js +2 -2
- package/dist/commonjs/components/ConsoleLogCard.js +1 -1
- package/dist/commonjs/components/HighlightText.js +13 -13
- package/dist/commonjs/components/Inspector/AboutModal.js +143 -251
- package/dist/commonjs/components/Inspector/DebuggingTab.js +19 -13
- package/dist/commonjs/components/Inspector/InspectorHeader.js +54 -80
- package/dist/commonjs/components/Inspector/MainScreen.js +13 -23
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +4 -4
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +1 -1
- package/dist/commonjs/components/Inspector/NpmStarPrompt.js +1 -1
- package/dist/commonjs/components/Inspector/TabBar.js +7 -7
- package/dist/commonjs/components/Inspector/UpdateAvailableModal.js +23 -24
- package/dist/commonjs/components/LogCard.js +16 -16
- package/dist/commonjs/components/NetworkIcons.d.ts +10 -0
- package/dist/commonjs/components/NetworkIcons.js +46 -4
- package/dist/commonjs/components/QRCodeView.js +2 -2
- package/dist/commonjs/components/TreeNode.js +16 -16
- package/dist/commonjs/constants/version.d.ts +1 -1
- package/dist/commonjs/constants/version.js +1 -1
- package/dist/commonjs/customHooks/bundleAnalyzer.js +1 -1
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +2 -2
- package/dist/commonjs/index.js +1 -1
- package/dist/commonjs/native/NativeInspector.d.ts +1 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/types/interfaces.d.ts +0 -2
- package/dist/esm/components/AppHeaderLogo.js +6 -6
- package/dist/esm/components/ConsoleLogCard.js +6 -6
- package/dist/esm/components/HighlightText.js +17 -17
- package/dist/esm/components/Inspector/AboutModal.js +205 -313
- package/dist/esm/components/Inspector/DebuggingTab.js +32 -26
- package/dist/esm/components/Inspector/InspectorHeader.js +96 -122
- package/dist/esm/components/Inspector/MainScreen.js +66 -76
- package/dist/esm/components/Inspector/MediaGalleryTab.js +19 -19
- package/dist/esm/components/Inspector/MediaPreviewModal.js +18 -18
- package/dist/esm/components/Inspector/NpmStarPrompt.js +1 -1
- package/dist/esm/components/Inspector/TabBar.js +21 -21
- package/dist/esm/components/Inspector/UpdateAvailableModal.js +65 -66
- package/dist/esm/components/LogCard.js +43 -43
- package/dist/esm/components/NetworkIcons.d.ts +10 -0
- package/dist/esm/components/NetworkIcons.js +191 -149
- package/dist/esm/components/QRCodeView.js +4 -4
- package/dist/esm/components/TreeNode.js +53 -53
- package/dist/esm/constants/version.d.ts +1 -1
- package/dist/esm/constants/version.js +1 -1
- package/dist/esm/customHooks/bundleAnalyzer.js +1 -1
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/index.js +7 -7
- package/dist/esm/native/NativeInspector.d.ts +1 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/types/interfaces.d.ts +0 -2
- package/ios/NetworkInspectorModule.mm +39 -3
- package/package.json +1 -1
- package/src/native/NativeInspector.ts +18 -0
- package/dist/commonjs/components/Inspector/FeedbackModal.d.ts +0 -16
- package/dist/commonjs/components/Inspector/FeedbackModal.js +0 -198
- package/dist/esm/components/Inspector/FeedbackModal.d.ts +0 -16
- package/dist/esm/components/Inspector/FeedbackModal.js +0 -198
|
@@ -213,8 +213,6 @@ export interface InspectorContextValue {
|
|
|
213
213
|
setShowHeaderInfo: React.Dispatch<React.SetStateAction<boolean>>;
|
|
214
214
|
settingsPage: SettingsPage;
|
|
215
215
|
setSettingsPage: React.Dispatch<React.SetStateAction<SettingsPage>>;
|
|
216
|
-
isFeedbackOpen: boolean;
|
|
217
|
-
setIsFeedbackOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
218
216
|
isAboutOpen: boolean;
|
|
219
217
|
setIsAboutOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
220
218
|
updateAvailable: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
{
|
|
3
|
-
</C>}return<C style={[
|
|
4
|
-
<
|
|
5
|
-
</C>}return<C style={[
|
|
1
|
+
import b from"react";import{Image as R,StyleSheet as A,View as C}from"react-native";import S from"./BrandSquareIcon";import{AppColors as o}from"../styles/AppColors";export const AppHeaderLogo=({size:e=46,customIcon:t})=>{const r=Math.round(e*.23);if(t){if(b.isValidElement(t)){const y=b.cloneElement(t,{size:e,width:e,height:e});return<C style={[i.container,{width:e,height:e,borderRadius:r}]}>
|
|
2
|
+
{y}
|
|
3
|
+
</C>}return<C style={[i.imageContainer,{width:e,height:e,borderRadius:r}]}>
|
|
4
|
+
<R source={t}style={[i.image,{borderRadius:r-2}]}resizeMode="cover"/>
|
|
5
|
+
</C>}return<C style={[i.container,{width:e,height:e,borderRadius:r}]}>
|
|
6
6
|
<S size={e}/>
|
|
7
|
-
</C>};const
|
|
7
|
+
</C>};const i=A.create({container:{overflow:"hidden",alignItems:"center",justifyContent:"center",borderWidth:1.5,borderColor:o.whiteAlpha33,backgroundColor:o.whiteAlpha12,shadowColor:o.shadowColorString,shadowOffset:{width:0,height:2},shadowOpacity:.35,shadowRadius:5,elevation:4},imageContainer:{overflow:"hidden",backgroundColor:o.whiteAlpha15,borderWidth:1.5,borderColor:o.whiteAlpha33,alignItems:"center",justifyContent:"center",shadowColor:o.shadowColorString,shadowOffset:{width:0,height:2},shadowOpacity:.3,shadowRadius:4,elevation:3,padding:1.5},image:{width:"100%",height:"100%"}});export default AppHeaderLogo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import z,{useState as G}from"react";import{useTranslation as v}from"../i18n";import{Pressable as N,StyleSheet as K,Text as I,View as T}from"react-native";import{AppColors as o}from"../styles/AppColors";import{AppFonts as b}from"../styles/AppFonts";import{formatTime as j,getJsonContent as Y,getJsonPreviewText as X,parseStackLine as J,openInVSCode as Q}from"../helpers";import Z from"./CopyButton";import
|
|
1
|
+
import z,{useState as G}from"react";import{useTranslation as v}from"../i18n";import{Pressable as N,StyleSheet as K,Text as I,View as T}from"react-native";import{AppColors as o}from"../styles/AppColors";import{AppFonts as b}from"../styles/AppFonts";import{formatTime as j,getJsonContent as Y,getJsonPreviewText as X,parseStackLine as J,openInVSCode as Q}from"../helpers";import Z from"./CopyButton";import P from"./LogSyntaxHighlighter";import{ChevronIcon as D,ExternalLinkIcon as _,FlaskIcon as ee,ZapIcon as W,GlobeIcon as oe,DiceIcon as re,AtomIcon as H,BarChartIcon as te,KeyIcon as le,SmartphoneIcon as ae,AlertTriangleIcon as ne,BugIcon as ie,TagIcon as de,MapPinIcon as M,StorageIcon as ce,SignalIcon as se,FlameIcon as ge,MoneyIcon as pe,CircleCheckIcon as fe,RefreshCcwIcon as Te,PerformanceIcon as ue,ChipIcon as be,SettingsIcon as Ce,TerminalIcon as ye,InfoCircleIcon as Ie,ShieldAlertIcon as me,LayoutIcon as he,ClockIcon as Ee}from"./NetworkIcons";import{useInspector as Be}from"./Inspector/InspectorContext";const $=(B,t,E,F,S)=>{if(!B)return null;const h=/^((?:\[[^\]]+\]\s*)+)/,A=B.match(h);if(A){const C=A[1],R=B.substring(C.length),V=C.match(/\[[^\]]+\]/g)||[],u=O=>{const e=O.replace(/[\[\]]/g,"").trim().toUpperCase();return e==="AXIOS"?{color:o.emerald600,Icon:W,label:"AXIOS"}:e==="API"||e==="FETCH"||e==="HTTP"||e==="REST"||e==="NETWORK"?{color:o.sky600,Icon:oe,label:e}:e==="GRAPHQL"||e==="GQL"||e==="APOLLO"||e==="MUTATION"||e==="QUERY"?{color:o.pink500,Icon:H,label:e}:e==="WS"||e==="WEBSOCKET"||e==="SOCKET"||e==="SOCKET.IO"||e==="REALTIME"?{color:o.cyan600,Icon:se,label:e}:e==="REDUX"||e==="STORE"||e==="STATE"||e==="ZUSTAND"||e==="MOBX"||e==="RECOIL"||e==="ACTION"||e==="DISPATCH"?{color:o.violet600,Icon:H,label:e}:e==="ANALYTICS"||e==="FIREBASE"||e==="GA4"||e==="GA"||e==="SEGMENT"||e==="MIXPANEL"||e==="POSTHOG"||e==="TRACK"||e==="EVENT"?{color:o.teal600,Icon:te,label:e}:e==="AUTH"||e==="TOKEN"||e==="SESSION"||e==="JWT"||e==="LOGIN"||e==="LOGOUT"||e==="USER"?{color:o.amber600,Icon:le,label:e}:e==="SECURITY"||e==="SHIELD"||e==="PERMISSION"||e==="PERMISSIONS"?{color:o.indigo600Alt,Icon:me,label:e}:e==="NAV"||e==="NAVIGATION"||e==="ROUTE"||e==="SCREEN"||e==="ROUTER"||e==="DEEPLINK"?{color:o.indigo600Alt,Icon:M,label:e}:e==="STORAGE"||e==="ASYNCSTORAGE"||e==="MMKV"||e==="SQLITE"||e==="DB"||e==="DATABASE"||e==="REALM"||e==="CACHE"?{color:o.purple500,Icon:ce,label:e}:e==="PERF"||e==="RENDER"||e==="PERFORMANCE"||e==="FPS"||e==="MEMORY"?{color:o.violet500,Icon:ue,label:e}:e==="INIT"||e==="BOOT"||e==="STARTUP"||e==="LIFECYCLE"||e==="MOUNT"||e==="UNMOUNT"?{color:o.blue600,Icon:W,label:e}:e==="SYNC"||e==="REFRESH"||e==="BACKGROUND"||e==="JOB"||e==="WORKER"?{color:o.sky600,Icon:Te,label:e}:e==="PUSH"||e==="NOTIF"||e==="NOTIFICATION"||e==="FCM"||e==="APNS"?{color:o.darkOrange,Icon:ge,label:e}:e==="PAY"||e==="PAYMENT"||e==="STRIPE"||e==="IAP"||e==="BILLING"||e==="CHECKOUT"||e==="CART"?{color:o.emerald600,Icon:pe,label:e}:e==="DEVICE"||e==="HARDWARE"||e==="BLE"||e==="BLUETOOTH"||e==="NFC"||e==="SENSOR"?{color:o.slate600,Icon:be,label:e}:e==="LOCATION"||e==="GPS"||e==="GEO"?{color:o.emerald600,Icon:M,label:e}:e==="APP"?{color:o.indigo600Alt,Icon:ae,label:"APP"}:e==="UI"||e==="VIEW"||e==="THEME"||e==="STYLE"||e==="LAYOUT"?{color:o.pink600,Icon:he,label:e}:e==="TEST"||e==="MOCK"||e==="SPEC"?{color:o.emerald500,Icon:ee,label:"TEST"}:e==="SAMPLE"||e==="BATCH"?{color:o.indigo600Alt,Icon:re,label:e}:e==="CONFIG"||e==="ENV"||e==="SETTINGS"?{color:o.slate700,Icon:Ce,label:e}:e==="DEBUG"||e==="TRACE"?{color:o.purpleText,Icon:ye,label:e}:e==="INFO"?{color:o.sky600,Icon:Ie,label:"INFO"}:e==="SUCCESS"||e==="OK"||e==="DONE"||e==="PASSED"?{color:o.green600,Icon:fe,label:e}:e==="WARN"||e==="WARNING"?{color:o.amber600,Icon:ne,label:"WARN"}:e==="ERROR"||e==="CRASH"||e==="BUG"||e==="FATAL"||e==="EXCEPTION"||e==="FAIL"?{color:o.red600,Icon:ie,label:e==="CRASH"||e==="BUG"||e==="FATAL"||e==="EXCEPTION"||e==="FAIL"?e:"ERROR"}:{color:o.slate600,Icon:de,label:e}};return<T style={{flexDirection:"column",gap:6}}>
|
|
2
2
|
<T style={{flexDirection:"row",flexWrap:"wrap",gap:5}}>
|
|
3
3
|
{V.map((O,e)=>{const m=u(O),L=m.Icon;return<T key={e}style={[r.prefixTag,{backgroundColor:`${m.color}14`,borderColor:`${m.color}33`}]}>
|
|
4
4
|
<L color={m.color}size={10}/>
|
|
@@ -7,8 +7,8 @@ import z,{useState as G}from"react";import{useTranslation as v}from"../i18n";imp
|
|
|
7
7
|
</I>
|
|
8
8
|
</T>})}
|
|
9
9
|
</T>
|
|
10
|
-
<
|
|
11
|
-
</T>}return<
|
|
10
|
+
<P text={R}search={t}style={E}numberOfLines={S}detectLinks={!0}/>
|
|
11
|
+
</T>}return<P text={B}search={t}style={E}numberOfLines={S}detectLinks={!0}/>};export const ConsoleLogCard=z.memo(function({item:t,searchStr:E=""}){const{setSelectedLog:F}=Be(),{t:S}=v(),[h,A]=G(!1),C=Y(t.message),R=t.message.toLowerCase().includes("[analytics error]"),V=t.sourceMethod==="log",u=t.caller&&t.caller!=="Unknown"?J(t.caller,!0):null,e=(()=>{const y=(t.type||"log").toLowerCase(),x=(t.sourceMethod||y).toLowerCase();return R||y==="error"||x==="error"?{border:o.errorColor,badgeBg:`${o.errorColor}18`,badgeText:o.errorColor,label:"ERROR",cardBg:o.errorCardBg,methodBorder:`${o.errorColor}30`,methodBg:`${o.errorColor}12`,methodText:o.errorColor,textColor:o.redErrorText}:y==="warn"||x==="warn"?{border:o.amber600,badgeBg:`${o.amber600}18`,badgeText:o.amber800,label:"WARN",cardBg:o.warnCardBg,methodBorder:`${o.amber600}33`,methodBg:`${o.amber600}14`,methodText:o.amber800,textColor:o.amber800}:y==="debug"||x==="debug"?{border:o.purple500,badgeBg:`${o.purple500}18`,badgeText:o.purple,label:"DEBUG",cardBg:o.purpleTintBg,methodBorder:`${o.purple500}33`,methodBg:`${o.purple500}12`,methodText:o.purple,textColor:o.purpleText}:x==="info"||y==="info"&&x!=="log"?{border:o.sky500,badgeBg:`${o.sky500}18`,badgeText:o.sky600,label:"INFO",cardBg:o.blueTintBg,methodBorder:`${o.sky500}33`,methodBg:`${o.sky500}12`,methodText:o.sky600,textColor:o.blue800}:{border:o.indigo500,badgeBg:`${o.indigo500}15`,badgeText:o.indigo600Alt,label:"LOG",cardBg:o.white,methodBorder:o.dividerColor,methodBg:o.indigo50,methodText:o.indigo600Alt,textColor:o.primaryBlack}})(),m=C?X(C.data):null,L=()=>{F(t)},U=y=>{y?.stopPropagation?.(),A(x=>!x)};return<T style={r.container}>
|
|
12
12
|
<N onPress={L}style={({pressed:y})=>[r.card,{borderLeftColor:e.border,borderLeftWidth:3.5,backgroundColor:e.cardBg},y&&r.cardPressed]}>
|
|
13
13
|
|
|
14
14
|
<T style={r.cardHeader}>
|
|
@@ -43,7 +43,7 @@ import z,{useState as G}from"react";import{useTranslation as v}from"../i18n";imp
|
|
|
43
43
|
</T>
|
|
44
44
|
|
|
45
45
|
<T style={r.headerRight}>
|
|
46
|
-
<Z value={t.message}label={
|
|
46
|
+
<Z value={t.message}label={S("console.logMessage")}/>
|
|
47
47
|
<D color={o.grayTextWeak}size={14}/>
|
|
48
48
|
</T>
|
|
49
49
|
</T>
|
|
@@ -53,7 +53,7 @@ import z,{useState as G}from"react";import{useTranslation as v}from"../i18n";imp
|
|
|
53
53
|
{C?<>
|
|
54
54
|
{C.header?$(C.header,E,[r.messageText,{color:o.primaryBlack}],r.highlight,h?void 0:2):null}
|
|
55
55
|
{m&&<T style={r.jsonPreviewContainer}>
|
|
56
|
-
<
|
|
56
|
+
<P text={m.text}search={E}style={[r.jsonPreviewText,{color:o.primaryBlack}]}detectLinks={!1}numberOfLines={h?void 0:4}/>
|
|
57
57
|
{m.text.split(`
|
|
58
58
|
`).length>4&&<N onPress={U}hitSlop={6}style={r.expandToggle}>
|
|
59
59
|
<I style={r.expandToggleText}>
|
|
@@ -90,7 +90,7 @@ import z,{useState as G}from"react";import{useTranslation as v}from"../i18n";imp
|
|
|
90
90
|
{R&&<T style={r.footerRight}>
|
|
91
91
|
<T style={[r.footerBadge,{backgroundColor:`${o.skyBlue}15`,borderColor:`${o.skyBlue}30`}]}>
|
|
92
92
|
<I style={[r.footerBadgeText,{color:o.skyBlue}]}>
|
|
93
|
-
{
|
|
93
|
+
{S("console.analyticsBadge")}
|
|
94
94
|
</I>
|
|
95
95
|
</T>
|
|
96
96
|
</T>}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
{
|
|
3
|
-
</T>;const d=/(https?:\/\/[^\s]+)/g,
|
|
4
|
-
{
|
|
5
|
-
{
|
|
6
|
-
</T>:<T key={
|
|
7
|
-
</T>};if(E&&
|
|
8
|
-
{
|
|
9
|
-
{
|
|
10
|
-
</T>:
|
|
11
|
-
</T>}if(!
|
|
12
|
-
{
|
|
13
|
-
</T>;const
|
|
14
|
-
{
|
|
15
|
-
{
|
|
16
|
-
</T>:<T key={
|
|
17
|
-
</T>});export default
|
|
1
|
+
import D from"react";import{Text as T}from"react-native";import{escapeRegex as H,handleOpenExternalLink as G}from"../helpers";import{AppColors as N}from"../styles/AppColors";const U=D.memo(function({text:f,search:k,style:c,highlightStyle:C,detectLinks:E,numberOfLines:L,...w}){if(!f||f.length>2e4&&!k&&!E)return<T style={c}numberOfLines={L}{...w}>
|
|
2
|
+
{f}
|
|
3
|
+
</T>;const d=/(https?:\/\/[^\s]+)/g,O=(y,u)=>{if(!k)return<T key={u}>{y}</T>;const R=new RegExp(`(${H(k)})`,"gi"),B=y.split(R);return<T key={u}>
|
|
4
|
+
{B.map((a,$)=>a.toLowerCase()===k.toLowerCase()?<T key={$}style={C}>
|
|
5
|
+
{a}
|
|
6
|
+
</T>:<T key={$}>{a}</T>)}
|
|
7
|
+
</T>};if(E&&f&&f.length<2e4){const y=f.split(d);return<T style={c}numberOfLines={L}{...w}>
|
|
8
|
+
{y.map((u,R)=>u.match(d)?<T key={`link-${R}`}style={{color:N.skyBlue,textDecorationLine:"underline"}}onPress={()=>{G(u)}}>
|
|
9
|
+
{u}
|
|
10
|
+
</T>:O(u,`text-${R}`))}
|
|
11
|
+
</T>}if(!k)return<T style={c}numberOfLines={L}{...w}>
|
|
12
|
+
{f}
|
|
13
|
+
</T>;const h=new RegExp(`(${H(k)})`,"gi"),A=f.split(h);return<T style={c}numberOfLines={L}{...w}>
|
|
14
|
+
{A.map((y,u)=>y.toLowerCase()===k.toLowerCase()?<T key={u}style={C}>
|
|
15
|
+
{y}
|
|
16
|
+
</T>:<T key={u}>{y}</T>)}
|
|
17
|
+
</T>});export default U;
|