react-native-inapp-inspector 2.4.2 → 2.5.1
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/java/com/inappinspector/NetworkInspectorModule.kt +523 -2
- package/dist/commonjs/capture.d.ts +2 -0
- package/dist/commonjs/capture.js +1 -1
- package/dist/commonjs/components/AnalyticsDetail.js +23 -23
- package/dist/commonjs/components/AnalyticsEventCard.js +1 -1
- package/dist/commonjs/components/AnalyticsGraph.js +44 -44
- package/dist/commonjs/components/AnimatedBrandOwl.js +32 -32
- package/dist/commonjs/components/AppHeaderLogo.js +6 -6
- package/dist/commonjs/components/BrandCircleIcon.js +28 -28
- package/dist/commonjs/components/BrandSquareIcon.js +33 -33
- package/dist/commonjs/components/ConsoleLogCard.js +1 -1
- package/dist/commonjs/components/Inspector/AnalyticsTab.js +2 -2
- package/dist/commonjs/components/Inspector/ConfirmationModal.js +23 -25
- package/dist/commonjs/components/Inspector/ConsoleTab.js +5 -5
- package/dist/commonjs/components/Inspector/CrashTab.js +44 -11
- package/dist/commonjs/components/Inspector/DeviceInfoTab.js +1 -1
- package/dist/commonjs/components/Inspector/FabLauncher.js +30 -25
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/commonjs/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/commonjs/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/commonjs/components/Inspector/InspectorHeader.js +137 -127
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.d.ts +1 -1
- package/dist/commonjs/components/Inspector/LanguageSelectorModal.js +114 -32
- package/dist/commonjs/components/Inspector/MainScreen.js +26 -19
- package/dist/commonjs/components/Inspector/MediaGalleryTab.js +38 -35
- package/dist/commonjs/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/commonjs/components/Inspector/MediaPreviewModal.js +345 -123
- package/dist/commonjs/components/Inspector/NetworkTab.js +14 -14
- package/dist/commonjs/components/Inspector/PushCard.js +1 -1
- package/dist/commonjs/components/Inspector/PushDetail.js +9 -9
- package/dist/commonjs/components/Inspector/PushTab.js +3 -3
- package/dist/commonjs/components/Inspector/ReduxTab.js +9 -7
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/commonjs/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/commonjs/components/Inspector/SettingsPanel.js +102 -73
- package/dist/commonjs/components/Inspector/SocketCard.js +1 -1
- package/dist/commonjs/components/Inspector/SocketDetail.js +73 -63
- package/dist/commonjs/components/Inspector/SocketTab.js +4 -4
- package/dist/commonjs/components/Inspector/StorageTab.js +10 -10
- package/dist/commonjs/components/Inspector/SupportModal.js +2 -2
- package/dist/commonjs/components/Inspector/SupportPage.js +1 -1
- package/dist/commonjs/components/JsonViewer.js +47 -45
- package/dist/commonjs/components/LogCard.js +22 -20
- package/dist/commonjs/components/ModuleErrorBoundary.js +5 -5
- package/dist/commonjs/components/NetworkIcons.d.ts +27 -0
- package/dist/commonjs/components/NetworkIcons.js +103 -5
- 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/crash.d.ts +1 -1
- package/dist/commonjs/crash.js +1 -1
- package/dist/commonjs/customHooks/crashHandler.d.ts +2 -1
- package/dist/commonjs/customHooks/crashHandler.js +7 -7
- package/dist/commonjs/editor.d.ts +13 -0
- package/dist/commonjs/editor.js +1 -0
- package/dist/commonjs/helpers/index.d.ts +1 -0
- package/dist/commonjs/helpers/index.js +1 -1
- package/dist/commonjs/helpers/settingsStore.js +1 -1
- package/dist/commonjs/helpers/telemetry.js +1 -1
- package/dist/commonjs/i18n/index.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 -1
- package/dist/commonjs/index.js +3 -3
- package/dist/commonjs/native/NativeInspector.d.ts +3 -0
- package/dist/commonjs/native/NativeInspector.js +1 -1
- package/dist/commonjs/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/commonjs/styles/AppColors.d.ts +42 -2
- package/dist/commonjs/styles/AppColors.js +1 -1
- package/dist/commonjs/styles/common.js +1 -1
- package/dist/commonjs/styles/index.d.ts +7 -0
- package/dist/commonjs/styles/index.js +1 -1
- package/dist/commonjs/types/editor.d.ts +96 -0
- package/dist/commonjs/types/editor.js +1 -0
- package/dist/commonjs/types/interfaces.d.ts +21 -0
- package/dist/esm/capture.d.ts +2 -0
- package/dist/esm/capture.js +1 -1
- package/dist/esm/components/AnalyticsDetail.js +31 -31
- package/dist/esm/components/AnalyticsEventCard.js +1 -1
- package/dist/esm/components/AnalyticsGraph.js +74 -74
- package/dist/esm/components/AnimatedBrandOwl.js +114 -114
- package/dist/esm/components/AppHeaderLogo.js +7 -7
- package/dist/esm/components/BrandCircleIcon.js +70 -70
- package/dist/esm/components/BrandSquareIcon.js +61 -61
- package/dist/esm/components/ConsoleLogCard.js +1 -1
- package/dist/esm/components/Inspector/AnalyticsTab.js +14 -14
- package/dist/esm/components/Inspector/ConfirmationModal.js +23 -25
- package/dist/esm/components/Inspector/ConsoleTab.js +17 -17
- package/dist/esm/components/Inspector/CrashTab.js +202 -169
- package/dist/esm/components/Inspector/DeviceInfoTab.js +75 -75
- package/dist/esm/components/Inspector/FabLauncher.js +56 -51
- package/dist/esm/components/Inspector/FloatingCaptureWidget.d.ts +3 -0
- package/dist/esm/components/Inspector/FloatingCaptureWidget.js +54 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.d.ts +11 -0
- package/dist/esm/components/Inspector/GlobalCrashScreenModal.js +234 -0
- package/dist/esm/components/Inspector/InspectorHeader.js +162 -152
- package/dist/esm/components/Inspector/LanguageSelectorModal.d.ts +1 -1
- package/dist/esm/components/Inspector/LanguageSelectorModal.js +140 -58
- package/dist/esm/components/Inspector/MainScreen.js +61 -54
- package/dist/esm/components/Inspector/MediaGalleryTab.js +55 -52
- package/dist/esm/components/Inspector/MediaPreviewModal.d.ts +36 -0
- package/dist/esm/components/Inspector/MediaPreviewModal.js +345 -123
- package/dist/esm/components/Inspector/NetworkTab.js +74 -74
- package/dist/esm/components/Inspector/PushCard.js +1 -1
- package/dist/esm/components/Inspector/PushDetail.js +18 -18
- package/dist/esm/components/Inspector/PushTab.js +1 -1
- package/dist/esm/components/Inspector/ReduxTab.js +18 -16
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.d.ts +2 -0
- package/dist/esm/components/Inspector/SecondaryTelemetryStrip.js +43 -0
- package/dist/esm/components/Inspector/SettingsPanel.js +224 -195
- package/dist/esm/components/Inspector/SocketCard.js +8 -8
- package/dist/esm/components/Inspector/SocketDetail.js +106 -96
- package/dist/esm/components/Inspector/SocketTab.js +18 -18
- package/dist/esm/components/Inspector/StorageTab.js +47 -47
- package/dist/esm/components/Inspector/SupportModal.js +64 -64
- package/dist/esm/components/Inspector/SupportPage.js +5 -5
- package/dist/esm/components/JsonViewer.js +51 -49
- package/dist/esm/components/LogCard.js +41 -39
- package/dist/esm/components/ModuleErrorBoundary.js +10 -10
- package/dist/esm/components/NetworkIcons.d.ts +27 -0
- package/dist/esm/components/NetworkIcons.js +101 -3
- 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/crash.d.ts +1 -1
- package/dist/esm/crash.js +1 -1
- package/dist/esm/customHooks/crashHandler.d.ts +2 -1
- package/dist/esm/customHooks/crashHandler.js +7 -7
- package/dist/esm/editor.d.ts +13 -0
- package/dist/esm/editor.js +1 -0
- package/dist/esm/helpers/index.d.ts +1 -0
- package/dist/esm/helpers/index.js +4 -4
- package/dist/esm/helpers/settingsStore.js +1 -1
- package/dist/esm/helpers/telemetry.js +1 -1
- package/dist/esm/i18n/index.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 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/native/NativeInspector.d.ts +3 -0
- package/dist/esm/native/NativeInspector.js +1 -1
- package/dist/esm/native/NativeNetworkInspector.d.ts +4 -0
- package/dist/esm/styles/AppColors.d.ts +42 -2
- package/dist/esm/styles/AppColors.js +1 -1
- package/dist/esm/styles/common.js +1 -1
- package/dist/esm/styles/index.d.ts +7 -0
- package/dist/esm/styles/index.js +1 -1
- package/dist/esm/types/editor.d.ts +96 -0
- package/dist/esm/types/editor.js +1 -0
- package/dist/esm/types/interfaces.d.ts +21 -0
- package/editor.d.ts +1 -0
- package/editor.js +1 -0
- package/ios/NetworkInspectorModule.mm +429 -0
- package/package.json +10 -1
- package/react-native-inapp-inspector.podspec +1 -1
- package/src/native/NativeInspector.ts +57 -4
- package/src/native/NativeNetworkInspector.ts +4 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import te,{useMemo as O,useRef as le,useEffect as ae}from"react";import{Alert as ie,Animated as K,Linking as E,Pressable as X,StyleSheet as ne,Text as S,View as C}from"react-native";import Ce,{Path as Se}from"react-native-svg";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as B}from"../../styles/AppFonts";import{formatDateTime as Te,formatTime as ke}from"../../helpers";import{CalendarIcon as Be,ClockIcon as J,CircleCheckIcon as Re,CircleXIcon as $e,ForwardChevronIcon as Ie,GlobeIcon as Q,LockIcon as
|
|
1
|
+
import te,{useMemo as O,useRef as le,useEffect as ae}from"react";import{Alert as ie,Animated as K,Linking as E,Pressable as X,StyleSheet as ne,Text as S,View as C}from"react-native";import Ce,{Path as Se}from"react-native-svg";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as B}from"../../styles/AppFonts";import{formatDateTime as Te,formatTime as ke}from"../../helpers";import{CalendarIcon as Be,ClockIcon as J,CircleCheckIcon as Re,CircleXIcon as $e,ForwardChevronIcon as Ie,GlobeIcon as Q,LockIcon as Ve,ReceiveFrameIcon as We,SendFrameIcon as Pe,SizeIcon as De}from"../NetworkIcons";import Le from"../HighlightText";import Oe from"../TouchableScale";import{useTranslation as Fe}from"../../i18n";function He(o){return!o||o<=0?"0 B":o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(2)} MB`}function ve({item:o,onPress:T,searchStr:Y,isNew:W,isSelected:M,onToggleSelect:N,serialNumber:A}){const{t:P}=Fe(),$=o.url.startsWith("wss://")||o.url.startsWith("https://"),F=o.client==="socket.io"||o.url.includes("/socket.io"),D=O(()=>F?{label:"SIO",color:e.violet600,bg:`${e.violet600}14`,border:`${e.violet600}35`}:$?{label:"WSS",color:e.emerald600,bg:`${e.emerald600}14`,border:`${e.emerald600}35`}:{label:"WS",color:e.blue600,bg:`${e.blue600}14`,border:`${e.blue600}35`},[F,$]),H=o.status||"open",k=H==="open",V=H==="connecting",z=H==="error",Z=O(()=>k?e.greenColor:V?e.amber600:z?e.errorColor:e.slate400,[k,V,z]),L=O(()=>k?{label:"OPEN",color:e.greenColor,bg:`${e.greenColor}15`,border:`${e.greenColor}40`}:V?{label:"CONNECTING",color:e.amber600,bg:`${e.amber600}15`,border:`${e.amber600}40`}:z?{label:o.closeCode?`ERR ${o.closeCode}`:"ERROR",color:e.errorColor,bg:`${e.errorColor}15`,border:`${e.errorColor}40`}:{label:o.closeCode?`CLOSED (${o.closeCode})`:"CLOSED",color:e.slate500,bg:`${e.slate500}15`,border:`${e.slate500}40`},[k,V,z,o.closeCode]),U=O(()=>{try{const I=o.url.replace(/^(wss?|https?):\/\//,""),R=I.indexOf("/");if(R>=0){const v=I.substring(0,R),re=I.substring(R);return{host:v,path:re}}return{host:I,path:"/"}}catch{return{host:o.url,path:"/"}}},[o.url]),_=I=>{I?.stopPropagation?.();const R=o.url.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://");ie.alert(P("common.openInBrowser","Open in Browser"),`${P("common.openInBrowserPrompt","Are you sure you want to open this URL in your external browser?")}
|
|
2
2
|
|
|
3
|
-
${R}`,[{text:P("common.cancel","Cancel"),style:"cancel"},{text:P("common.open","Open"),onPress:()=>{E.canOpenURL(R).then(
|
|
4
|
-
<Oe onPress={T}style={[r.card,{borderLeftWidth:3.5,borderLeftColor:Z,backgroundColor:z?e.errorCardBg:e.white},
|
|
3
|
+
${R}`,[{text:P("common.cancel","Cancel"),style:"cancel"},{text:P("common.open","Open"),onPress:()=>{E.canOpenURL(R).then(v=>{v?E.openURL(R):E.openURL(R).catch(()=>{})}).catch(()=>{})}}])},j=le(new K.Value(W?.35:0)).current;ae(()=>{W&&K.timing(j,{toValue:0,duration:1200,useNativeDriver:!1}).start()},[W,j]);const G=(o.totalBytesSent||0)+(o.totalBytesReceived||0),ee=o.duration!=null?`${o.duration}ms`:"Active",oe=Te(o.startTime);return<C style={r.container}>
|
|
4
|
+
<Oe onPress={T}style={[r.card,{borderLeftWidth:3.5,borderLeftColor:Z,backgroundColor:z?e.errorCardBg:e.white},W&&r.cardNew]}>
|
|
5
5
|
<C style={r.cardBody}>
|
|
6
6
|
|
|
7
7
|
<C style={r.cardHeaderRow}>
|
|
@@ -32,7 +32,7 @@ ${R}`,[{text:P("common.cancel","Cancel"),style:"cancel"},{text:P("common.open","
|
|
|
32
32
|
<C style={r.cardHeaderRight}>
|
|
33
33
|
|
|
34
34
|
<C style={[r.statusPill,{backgroundColor:L.bg,borderColor:L.border}]}>
|
|
35
|
-
{k?<C style={r.pulsingDot}/>:
|
|
35
|
+
{k?<C style={r.pulsingDot}/>:V?<J color={e.amber600}size={9}/>:z?<$e color={e.errorColor}size={9}/>:<Re color={e.slate500}size={9}/>}
|
|
36
36
|
<S style={[r.statusPillText,{color:L.color}]}>
|
|
37
37
|
{L.label}
|
|
38
38
|
</S>
|
|
@@ -54,7 +54,7 @@ ${R}`,[{text:P("common.cancel","Cancel"),style:"cancel"},{text:P("common.open","
|
|
|
54
54
|
|
|
55
55
|
<C style={r.hostRow}>
|
|
56
56
|
<C style={[r.protoBadge,{backgroundColor:$?`${e.emerald600}12`:`${e.blue600}12`,borderColor:$?`${e.emerald600}2B`:`${e.blue600}2B`}]}>
|
|
57
|
-
{$?<
|
|
57
|
+
{$?<Ve size={9}color={e.emerald600}/>:<Q size={9}color={e.blue600}/>}
|
|
58
58
|
<S style={[r.protoBadgeText,{color:$?e.emerald600:e.blue600}]}>
|
|
59
59
|
{$?"WSS":"WS"}
|
|
60
60
|
</S>
|
|
@@ -88,7 +88,7 @@ ${R}`,[{text:P("common.cancel","Cancel"),style:"cancel"},{text:P("common.open","
|
|
|
88
88
|
|
|
89
89
|
|
|
90
90
|
<C style={[r.metaStatChip,{backgroundColor:`${e.emerald600}10`,borderColor:`${e.emerald600}26`}]}>
|
|
91
|
-
<
|
|
91
|
+
<We size={9}color={e.emerald600}/>
|
|
92
92
|
<S style={[r.metaStatText,{color:e.emerald600}]}>
|
|
93
93
|
{o.receivedCount||0}
|
|
94
94
|
</S>
|
|
@@ -98,7 +98,7 @@ ${R}`,[{text:P("common.cancel","Cancel"),style:"cancel"},{text:P("common.open","
|
|
|
98
98
|
{G>0&&<C style={[r.metaStatChip,{backgroundColor:`${e.purple}10`,borderColor:`${e.purple}26`}]}>
|
|
99
99
|
<De size={9}color={e.purple}/>
|
|
100
100
|
<S style={[r.metaStatText,{color:e.purple}]}>
|
|
101
|
-
{
|
|
101
|
+
{He(G)}
|
|
102
102
|
</S>
|
|
103
103
|
</C>}
|
|
104
104
|
|
|
@@ -113,4 +113,4 @@ ${R}`,[{text:P("common.cancel","Cancel"),style:"cancel"},{text:P("common.open","
|
|
|
113
113
|
</C>
|
|
114
114
|
</C>
|
|
115
115
|
</Oe>
|
|
116
|
-
</C>}const r=ne.create({container:{marginHorizontal:4,marginBottom:6},card:{borderRadius:12,borderWidth:1,borderColor:e.dividerColor,shadowColor:e.shadowColorString,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:2,elevation:1,overflow:"hidden"},cardNew:{borderColor:`${e.brandPurple}66`,backgroundColor:`${e.brandPurple}05`},cardBody:{
|
|
116
|
+
</C>}const r=ne.create({container:{marginHorizontal:4,marginBottom:6},card:{borderRadius:12,borderWidth:1,borderColor:e.dividerColor,shadowColor:e.shadowColorString,shadowOffset:{width:0,height:1},shadowOpacity:.05,shadowRadius:2,elevation:1,overflow:"hidden"},cardNew:{borderColor:`${e.brandPurple}66`,backgroundColor:`${e.brandPurple}05`},cardBody:{paddingHorizontal:8,paddingVertical:8},cardHeaderRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",marginBottom:5},cardHeaderLeft:{flexDirection:"row",alignItems:"center",gap:4.5,flex:1,minWidth:0},smallCheckbox:{width:15,height:15,borderRadius:3.5,borderWidth:1.2,borderColor:e.grayTextWeak,alignItems:"center",justifyContent:"center",backgroundColor:e.white,marginRight:2},smallCheckboxChecked:{backgroundColor:e.purple,borderColor:e.purple},serialNumber:{fontFamily:B.interSemiBold,fontSize:10.5,color:e.grayTextWeak},protocolBadge:{paddingHorizontal:5.5,paddingVertical:1.5,borderRadius:5,borderWidth:1},protocolBadgeText:{fontFamily:B.interBold,fontSize:9.5,letterSpacing:.3},chip:{paddingHorizontal:5,paddingVertical:1.5,borderRadius:4,borderWidth:1},chipText:{fontFamily:B.interBold,fontSize:9,letterSpacing:.2},cardHeaderRight:{flexDirection:"row",alignItems:"center",gap:6},statusPill:{flexDirection:"row",alignItems:"center",gap:4,paddingHorizontal:6,paddingVertical:2,borderRadius:5,borderWidth:1},statusPillText:{fontFamily:B.interBold,fontSize:9.5,letterSpacing:.3},pulsingDot:{width:6,height:6,borderRadius:3,backgroundColor:e.greenColor},globeBtn:{padding:3,borderRadius:4,backgroundColor:`${e.grayTextWeak}12`},urlBox:{marginBottom:8},urlMainRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:6,marginBottom:3},pathText:{flex:1,fontFamily:B.interBold,fontSize:12.5,color:e.grayTextStrong,lineHeight:17},highlight:{backgroundColor:"rgba(250, 204, 21, 0.40)",color:e.grayTextStrong,borderRadius:2},hostRow:{flexDirection:"row",alignItems:"center",gap:5},protoBadge:{flexDirection:"row",alignItems:"center",gap:3,paddingHorizontal:4.5,paddingVertical:1,borderRadius:4,borderWidth:1},protoBadgeText:{fontFamily:B.interBold,fontSize:8.5,letterSpacing:.2},hostText:{flex:1,fontFamily:B.interMedium,fontSize:11,color:e.grayTextWeak},cardFooterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingTop:6,borderTopWidth:1,borderTopColor:e.dividerColor},footerLeft:{flexDirection:"row",alignItems:"center",flex:1,minWidth:0,marginRight:6},cardDateRow:{flexDirection:"row",alignItems:"center",gap:4},cardDateText:{fontFamily:B.interMedium,fontSize:10,color:e.grayTextWeak},footerRight:{flexDirection:"row",alignItems:"center",gap:4},metaStatChip:{flexDirection:"row",alignItems:"center",gap:3,paddingHorizontal:5,paddingVertical:2,borderRadius:4,borderWidth:1},metaStatText:{fontFamily:B.interSemiBold,fontSize:9.5}});function Ee(o,T){return o.item===T.item&&o.isSelected===T.isSelected&&o.isNew===T.isNew&&o.searchStr===T.searchStr&&o.serialNumber===T.serialNumber&&o.onPress===T.onPress&&o.onToggleSelect===T.onToggleSelect}export default te.memo(ve,Ee);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{useMemo as E,useState as
|
|
1
|
+
import{useMemo as E,useState as H}from"react";import{Alert as $e,Linking as Z,Pressable as M,ScrollView as F,StyleSheet as Ne,Text as T,TextInput as De,TouchableOpacity as W,View as S}from"react-native";import B from"../../styles";import{AppColors as e}from"../../styles/AppColors";import{AppFonts as h}from"../../styles/AppFonts";import{useTranslation as Le}from"../../i18n";import{animateNextLayout as Ee,useInspector as Me}from"./InspectorContext";import Ke from"../SourcePageCard";import Ue from"../HeadersSection";import Je from"../SegmentedTabs";import _ from"../JsonViewer";import O from"../CopyButton";import Ge from"../ShareButton";import Te from"../CodeSnippet";import Qe from"../HighlightText";import Ye from"../TouchableScale";import{formatDateTime as Se,formatByteSize as Ce}from"../../helpers";import{shareSocketReport as Xe}from"../../helpers/shareFormatter";import{ClockIcon as Ze,ChevronIcon as _e,GlobeIcon as Tt,SendFrameIcon as $,ReceiveFrameIcon as Ve,ClearIcon as St,SearchIcon as Ct,ExternalLinkIcon as Vt,LayersIcon as Bt,TerminalIcon as Rt,SizeIcon as It,FailIcon as Pt,HeadersIcon as Ft}from"../NetworkIcons";const Wt=({item:Be})=>{const{t:C}=Le(),{selectedSocket:ve,logRouteMapRef:j}=Me(),o=Be||ve,[I,ze]=H("messages"),[z,K]=H(""),[v,N]=H("all"),[Re,D]=H(new Set);if(!o)return null;const U=o.url.startsWith("wss://")||o.url.startsWith("https://"),R=o.client==="socket.io"||o.url.includes("/socket.io"),A=E(()=>{const r=(o.status||"open").toLowerCase();return r==="open"?e.greenColor:r==="connecting"?e.amber600:r==="error"?e.errorColor:e.slate500},[o.status]),q=()=>{const r=o.url.replace(/^wss:\/\//,"https://").replace(/^ws:\/\//,"http://");$e.alert(C("common.openInBrowser")||"Open in Browser",`${C("common.openInBrowserPrompt")||"Open URL in browser?"}
|
|
2
2
|
|
|
3
|
-
${
|
|
3
|
+
${r}`,[{text:C("common.cancel")||"Cancel",style:"cancel"},{text:C("common.open")||"Open",onPress:()=>{Z.canOpenURL(r).then(V=>{V&&Z.openURL(r).catch(()=>{})})}}])},Ie=async()=>{await Xe(o)},Pe=r=>{D(V=>{const k=new Set(V);return k.has(r)?k.delete(r):k.add(r),k})},Fe=()=>{const r=new Set((o.frames||[]).map(V=>V.id));D(r)},We=()=>{D(new Set)},J=E(()=>{let r=o.frames||[];if(v!=="all"&&(r=r.filter(V=>V.direction===v)),z.trim()){const V=z.trim().toLowerCase();r=r.filter(k=>!!(k.eventName&&k.eventName.toLowerCase().includes(V)||k.type&&k.type.toLowerCase().includes(V)||typeof k.data=="string"&&k.data.toLowerCase().includes(V)||k.data&&typeof k.data=="object"&&JSON.stringify(k.data).toLowerCase().includes(V)))}return r},[o.frames,v,z]),Oe=(o.totalBytesSent||0)+(o.totalBytesReceived||0),G=E(()=>R?`import { io } from 'socket.io-client';
|
|
4
4
|
|
|
5
5
|
const socket = io('${o.url}', {
|
|
6
6
|
transports: ['websocket'],
|
|
@@ -31,7 +31,7 @@ ws.onerror = (error) => {
|
|
|
31
31
|
|
|
32
32
|
ws.onclose = (event) => {
|
|
33
33
|
console.log('WebSocket closed:', event.code, event.reason);
|
|
34
|
-
};`,[o.url,o.protocols,o.query,R]),
|
|
34
|
+
};`,[o.url,o.protocols,o.query,R]),Q=`wscat -c "${o.url}"`,Y=o.url.indexOf("://"),P=Y!==-1?o.url.substring(0,Y+3):"";return<S style={{flex:1,backgroundColor:e.contentBg}}>
|
|
35
35
|
|
|
36
36
|
<S style={{paddingHorizontal:8,paddingTop:4}}>
|
|
37
37
|
<S style={B.detailInfoBar}>
|
|
@@ -40,47 +40,47 @@ ws.onclose = (event) => {
|
|
|
40
40
|
<S style={{flexDirection:"row",alignItems:"center",gap:5,flexWrap:"wrap",flex:1}}>
|
|
41
41
|
|
|
42
42
|
<S style={[B.methodBadge,{backgroundColor:R?e.violet600:U?e.emerald600:e.blue600,paddingHorizontal:8,paddingVertical:3.5,borderRadius:6}]}>
|
|
43
|
-
<T style={[B.methodBadgeText,{color:e.white,fontSize:10.5,fontFamily:
|
|
43
|
+
<T style={[B.methodBadgeText,{color:e.white,fontSize:10.5,fontFamily:h.interBold}]}>
|
|
44
44
|
{R?"SIO":U?"WSS":"WS"}
|
|
45
45
|
</T>
|
|
46
46
|
</S>
|
|
47
47
|
|
|
48
48
|
|
|
49
49
|
<S style={[B.chip,{backgroundColor:R?`${e.violet600}14`:`${e.sky500}14`,borderColor:R?`${e.violet600}30`:`${e.sky500}30`,paddingHorizontal:6,paddingVertical:3,borderRadius:6}]}>
|
|
50
|
-
<T style={[B.chipText,{fontFamily:
|
|
50
|
+
<T style={[B.chipText,{fontFamily:h.interBold,fontSize:9.5,color:R?e.violet600:e.sky600}]}>
|
|
51
51
|
{(o.client||"WEBSOCKET").toUpperCase()}
|
|
52
52
|
</T>
|
|
53
53
|
</S>
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
<S style={[B.chip,{backgroundColor:`${
|
|
57
|
-
{o.status==="error"?<
|
|
58
|
-
<T style={[B.chipText,{color:
|
|
56
|
+
<S style={[B.chip,{backgroundColor:`${A}18`,borderColor:`${A}40`,paddingHorizontal:7,paddingVertical:3,borderRadius:6}]}>
|
|
57
|
+
{o.status==="error"?<Pt size={8}color={e.errorColor}/>:<S style={{width:6,height:6,borderRadius:3,backgroundColor:A}}/>}
|
|
58
|
+
<T style={[B.chipText,{color:A,fontFamily:h.interBold,fontSize:10.5}]}>
|
|
59
59
|
{(o.status||"open").toUpperCase()}
|
|
60
60
|
</T>
|
|
61
61
|
</S>
|
|
62
62
|
|
|
63
63
|
|
|
64
64
|
<S style={[B.chip,{backgroundColor:`${e.brandPurple}14`,borderColor:`${e.brandPurple}30`,paddingHorizontal:7,paddingVertical:3,borderRadius:6,gap:4}]}>
|
|
65
|
-
<
|
|
66
|
-
<T style={[B.chipText,{color:e.brandPurple,fontFamily:
|
|
65
|
+
<Ze color={e.brandPurple}size={10}/>
|
|
66
|
+
<T style={[B.chipText,{color:e.brandPurple,fontFamily:h.interBold,fontSize:10.5}]}>
|
|
67
67
|
{o.duration!=null?`${o.duration}ms`:"Active"}
|
|
68
68
|
</T>
|
|
69
69
|
</S>
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
<S style={[B.chip,{backgroundColor:`${e.teal600}14`,borderColor:`${e.teal600}30`,paddingHorizontal:7,paddingVertical:3,borderRadius:6,gap:4}]}>
|
|
73
|
-
|
|
74
|
-
<T style={[B.chipText,{color:e.teal600,fontFamily:
|
|
73
|
+
<$ color={e.teal600}size={10}/>
|
|
74
|
+
<T style={[B.chipText,{color:e.teal600,fontFamily:h.interBold,fontSize:10.5}]}>
|
|
75
75
|
{o.frames?.length||0} frames
|
|
76
76
|
</T>
|
|
77
77
|
</S>
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
<S style={[B.chip,{backgroundColor:`${e.sky600}14`,borderColor:`${e.sky600}30`,paddingHorizontal:7,paddingVertical:3,borderRadius:6,gap:4}]}>
|
|
81
|
-
<
|
|
82
|
-
<T style={[B.chipText,{color:e.sky600,fontFamily:
|
|
83
|
-
{
|
|
81
|
+
<It color={e.sky600}size={10}/>
|
|
82
|
+
<T style={[B.chipText,{color:e.sky600,fontFamily:h.interBold,fontSize:10.5}]}>
|
|
83
|
+
{Ce(Oe)}
|
|
84
84
|
</T>
|
|
85
85
|
</S>
|
|
86
86
|
</S>
|
|
@@ -92,31 +92,31 @@ ws.onclose = (event) => {
|
|
|
92
92
|
<S style={{flexDirection:"row",alignItems:"center",justifyContent:"space-between",flexWrap:"nowrap",gap:6}}>
|
|
93
93
|
<S style={{flexDirection:"row",alignItems:"center",gap:6,flexShrink:1,minWidth:0}}>
|
|
94
94
|
{P?<S style={{backgroundColor:P.startsWith("wss")||P.startsWith("https")?`${e.green600}18`:`${e.amber500}18`,paddingHorizontal:6,paddingVertical:2,borderRadius:4}}>
|
|
95
|
-
<T style={{fontFamily:
|
|
95
|
+
<T style={{fontFamily:h.interBold,fontSize:9,color:P.startsWith("wss")||P.startsWith("https")?e.green600:e.amber500}}>
|
|
96
96
|
{P.replace("://","").toUpperCase()}
|
|
97
97
|
</T>
|
|
98
98
|
</S>:null}
|
|
99
99
|
|
|
100
|
-
<T style={{fontFamily:
|
|
100
|
+
<T style={{fontFamily:h.interBold,fontSize:10,color:e.grayTextWeak,letterSpacing:.4,textTransform:"uppercase"}}numberOfLines={1}>
|
|
101
101
|
ENDPOINT URL
|
|
102
102
|
</T>
|
|
103
103
|
</S>
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
<S style={{flexDirection:"row",alignItems:"center",gap:5,flexShrink:0}}>
|
|
107
|
-
<
|
|
108
|
-
<
|
|
109
|
-
<
|
|
110
|
-
<
|
|
111
|
-
<
|
|
112
|
-
<
|
|
113
|
-
</
|
|
107
|
+
<O value={Q}label="wscat"iconType="terminal"/>
|
|
108
|
+
<Ge onShare={Ie}/>
|
|
109
|
+
<O value={G}label="JS"iconType="fetch"/>
|
|
110
|
+
<O value={o.url}label="URL"iconType="copy"/>
|
|
111
|
+
<Ye style={[B.iconSquareBtn,{backgroundColor:`${e.sky600}15`,borderColor:`${e.sky600}35`}]}onPress={q}hitSlop={10}accessibilityLabel="Open in Browser">
|
|
112
|
+
<Vt color={e.sky600}size={13}/>
|
|
113
|
+
</Ye>
|
|
114
114
|
</S>
|
|
115
115
|
</S>
|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
<M onPress={
|
|
119
|
-
<T selectable={!0}style={{fontFamily:
|
|
118
|
+
<M onPress={q}>
|
|
119
|
+
<T selectable={!0}style={{fontFamily:h.interMedium,fontSize:12.5,color:e.skyBlue,textDecorationLine:"underline",lineHeight:18}}>
|
|
120
120
|
{o.url}
|
|
121
121
|
</T>
|
|
122
122
|
</M>
|
|
@@ -125,193 +125,203 @@ ws.onclose = (event) => {
|
|
|
125
125
|
</S>
|
|
126
126
|
|
|
127
127
|
|
|
128
|
-
<
|
|
128
|
+
<Je tabs={[{key:"messages",label:`${C("socket.messages","Messages")} (${o.frames?.length||0})`,themeColor:e.violet600,icon:r=><$ size={12}color={r?e.white:e.grayText}/>},{key:"overview",label:C("socket.overview","Overview"),themeColor:e.sky600,icon:r=><Tt size={12}color={r?e.white:e.grayText}/>},...o.headers&&Object.keys(o.headers).length>0?[{key:"headers",label:`${C("network.detailTabs.headers","Headers")} (${Object.keys(o.headers).length})`,themeColor:e.purple,icon:r=><Ft size={12}color={r?e.white:e.grayText}/>}]:[],{key:"params",label:`${C("socket.params","Params")} (${Object.keys(o.query||{}).length})`,themeColor:e.teal600,icon:r=><Bt size={12}color={r?e.white:e.grayText}/>},{key:"raw",label:C("socket.rawAndCode","Raw & Code"),themeColor:e.amber600,icon:r=><Rt size={12}color={r?e.white:e.grayText}/>}]}activeKey={I}onChange={r=>{Ee(),ze(r)}}style={{marginHorizontal:6,marginBottom:10,marginTop:6}}/>
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
{
|
|
131
|
+
{I==="messages"&&<S style={{flex:1}}>
|
|
132
132
|
|
|
133
133
|
<S style={t.frameControlBar}>
|
|
134
134
|
<S style={t.frameSearchBar}>
|
|
135
|
-
<
|
|
136
|
-
<
|
|
135
|
+
<Ct size={13}color={e.grayTextWeak}/>
|
|
136
|
+
<De style={t.frameSearchInput}placeholder={C("socket.searchFramesPlaceholder","Search frame payloads or event names...")}placeholderTextColor={e.grayTextWeak}value={z}onChangeText={K}clearButtonMode="while-editing"/>
|
|
137
137
|
{z.length>0&&<M onPress={()=>K("")}>
|
|
138
|
-
<
|
|
138
|
+
<St size={12}color={e.grayTextWeak}/>
|
|
139
139
|
</M>}
|
|
140
140
|
</S>
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
<S style={t.frameFilterRow}>
|
|
144
144
|
<S style={t.dirPillGroup}>
|
|
145
|
-
<
|
|
145
|
+
<W onPress={()=>N("all")}style={[t.dirPill,v==="all"&&t.dirPillActive]}>
|
|
146
146
|
<T style={[t.dirPillText,v==="all"&&t.dirPillTextActive]}>
|
|
147
|
-
{
|
|
147
|
+
{C("common.all","All")}
|
|
148
148
|
</T>
|
|
149
|
-
</
|
|
149
|
+
</W>
|
|
150
150
|
|
|
151
|
-
<
|
|
152
|
-
|
|
151
|
+
<W onPress={()=>N("send")}style={[t.dirPill,v==="send"&&t.dirPillActive,{flexDirection:"row",alignItems:"center",gap:4}]}>
|
|
152
|
+
<$ size={10}color={v==="send"?e.white:e.emerald600}/>
|
|
153
153
|
<T style={[t.dirPillText,v==="send"&&t.dirPillTextActive]}>
|
|
154
|
-
{
|
|
154
|
+
{C("socket.sent","Sent")}
|
|
155
155
|
</T>
|
|
156
|
-
</
|
|
156
|
+
</W>
|
|
157
157
|
|
|
158
|
-
<
|
|
159
|
-
<
|
|
158
|
+
<W onPress={()=>N("receive")}style={[t.dirPill,v==="receive"&&t.dirPillActive,{flexDirection:"row",alignItems:"center",gap:4}]}>
|
|
159
|
+
<Ve size={10}color={v==="receive"?e.white:e.sky600}/>
|
|
160
160
|
<T style={[t.dirPillText,v==="receive"&&t.dirPillTextActive]}>
|
|
161
|
-
{
|
|
161
|
+
{C("socket.recv","Recv")}
|
|
162
162
|
</T>
|
|
163
|
-
</
|
|
163
|
+
</W>
|
|
164
164
|
</S>
|
|
165
165
|
|
|
166
166
|
<S style={t.expandGroup}>
|
|
167
|
-
<
|
|
168
|
-
<T style={t.textBtnLabel}>{
|
|
169
|
-
</
|
|
167
|
+
<W onPress={Fe}style={t.textBtn}>
|
|
168
|
+
<T style={t.textBtnLabel}>{C("common.expandAll","Expand All")}</T>
|
|
169
|
+
</W>
|
|
170
170
|
<T style={t.textBtnSep}>•</T>
|
|
171
|
-
<
|
|
172
|
-
<T style={t.textBtnLabel}>{
|
|
173
|
-
</
|
|
171
|
+
<W onPress={We}style={t.textBtn}>
|
|
172
|
+
<T style={t.textBtnLabel}>{C("common.collapseAll","Collapse All")}</T>
|
|
173
|
+
</W>
|
|
174
174
|
</S>
|
|
175
175
|
</S>
|
|
176
176
|
</S>
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
|
|
180
|
-
{
|
|
179
|
+
<F style={t.framesScrollView}contentContainerStyle={{padding:12}}>
|
|
180
|
+
{J.length===0?<S style={t.emptyFrames}>
|
|
181
181
|
<T style={t.emptyFramesText}>
|
|
182
182
|
{o.frames?.length===0?"No messages transferred on this connection yet":"No frames match the active search or direction filter"}
|
|
183
183
|
</T>
|
|
184
|
-
</S>:
|
|
184
|
+
</S>:J.map((r,V)=>{const k=r.direction==="send",X=Re.has(r.id),L=k?e.blue600:e.emerald600,Ae=k?`${e.blue600}12`:`${e.emerald600}12`,He=r.timestamp-o.startTime;return<S key={r.id}style={t.frameCard}>
|
|
185
185
|
|
|
186
|
-
<M onPress={()=>
|
|
186
|
+
<M onPress={()=>Pe(r.id)}style={t.frameCardHeader}>
|
|
187
187
|
<S style={t.frameHeaderLeft}>
|
|
188
|
-
<S style={[t.dirBadge,{backgroundColor:
|
|
189
|
-
{
|
|
188
|
+
<S style={[t.dirBadge,{backgroundColor:Ae}]}>
|
|
189
|
+
{k?<$ size={10}color={L}/>:<Ve size={10}color={L}/>}
|
|
190
190
|
<T style={[t.dirBadgeText,{color:L}]}>
|
|
191
|
-
{
|
|
191
|
+
{k?"SENT":"RECV"}
|
|
192
192
|
</T>
|
|
193
193
|
</S>
|
|
194
194
|
|
|
195
|
-
{
|
|
195
|
+
{r.eventName&&<S style={t.eventBadge}>
|
|
196
196
|
<T style={t.eventBadgeText}numberOfLines={1}>
|
|
197
|
-
{
|
|
197
|
+
{r.eventName}
|
|
198
198
|
</T>
|
|
199
199
|
</S>}
|
|
200
200
|
|
|
201
|
-
<T style={t.frameIndexText}>#{
|
|
201
|
+
<T style={t.frameIndexText}>#{V+1}</T>
|
|
202
202
|
</S>
|
|
203
203
|
|
|
204
204
|
<S style={t.frameHeaderRight}>
|
|
205
205
|
<T style={t.frameOffsetTime}>
|
|
206
|
-
+{
|
|
206
|
+
+{He}ms
|
|
207
207
|
</T>
|
|
208
208
|
<S style={t.frameSizePill}>
|
|
209
209
|
<T style={t.frameSizeText}>
|
|
210
|
-
{
|
|
210
|
+
{Ce(r.size||0)}
|
|
211
211
|
</T>
|
|
212
212
|
</S>
|
|
213
|
-
<
|
|
214
|
-
<
|
|
213
|
+
<O value={r.raw??r.data}label="Frame"/>
|
|
214
|
+
<_e direction={X?"up":"down"}size={12}color={e.grayTextWeak}/>
|
|
215
215
|
</S>
|
|
216
216
|
</M>
|
|
217
217
|
|
|
218
218
|
|
|
219
219
|
<S style={t.frameBody}>
|
|
220
|
-
{typeof
|
|
221
|
-
|
|
220
|
+
{typeof r.data=="object"&&r.data!==null?<_ data={r.data}search={z}forceOpen={X}/>:<T style={t.frameRawText}>
|
|
221
|
+
<Qe text={String(r.data)}search={z}/>
|
|
222
222
|
</T>}
|
|
223
223
|
</S>
|
|
224
224
|
</S>})}
|
|
225
|
-
|
|
225
|
+
</F>
|
|
226
226
|
</S>}
|
|
227
227
|
|
|
228
228
|
|
|
229
|
-
{
|
|
229
|
+
{I==="overview"&&<F style={t.tabContentScroll}contentContainerStyle={{padding:12}}>
|
|
230
230
|
<S style={t.sectionCard}>
|
|
231
|
-
<T style={t.sectionHeading}>CONNECTION DETAILS</T>
|
|
231
|
+
<T style={t.sectionHeading}>{C("socket.connectionDetails","CONNECTION DETAILS")}</T>
|
|
232
232
|
|
|
233
233
|
<S style={t.infoRow}>
|
|
234
|
-
<T style={t.infoKey}>URL</T>
|
|
234
|
+
<T style={t.infoKey}>{C("socket.url","URL")}</T>
|
|
235
235
|
<T style={t.infoVal}selectable>{o.url}</T>
|
|
236
236
|
</S>
|
|
237
237
|
|
|
238
238
|
<S style={t.infoRow}>
|
|
239
|
-
<T style={t.infoKey}>Client Engine</T>
|
|
239
|
+
<T style={t.infoKey}>{C("socket.clientEngine","Client Engine")}</T>
|
|
240
240
|
<T style={t.infoVal}>{o.client?.toUpperCase()||"WEBSOCKET"}</T>
|
|
241
241
|
</S>
|
|
242
242
|
|
|
243
243
|
<S style={t.infoRow}>
|
|
244
|
-
<T style={t.infoKey}>Ready State</T>
|
|
244
|
+
<T style={t.infoKey}>{C("socket.readyState","Ready State")}</T>
|
|
245
245
|
<T style={t.infoVal}>
|
|
246
246
|
{o.readyState===1?"1 (OPEN)":o.readyState===0?"0 (CONNECTING)":o.readyState===2?"2 (CLOSING)":"3 (CLOSED)"}
|
|
247
247
|
</T>
|
|
248
248
|
</S>
|
|
249
249
|
|
|
250
250
|
<S style={t.infoRow}>
|
|
251
|
-
<T style={t.infoKey}>Connected At</T>
|
|
252
|
-
<T style={t.infoVal}>{
|
|
251
|
+
<T style={t.infoKey}>{C("socket.connectedAt","Connected At")}</T>
|
|
252
|
+
<T style={t.infoVal}>{Se(o.startTime)}</T>
|
|
253
253
|
</S>
|
|
254
254
|
|
|
255
255
|
{o.endTime&&<S style={t.infoRow}>
|
|
256
|
-
<T style={t.infoKey}>Closed At</T>
|
|
257
|
-
<T style={t.infoVal}>{
|
|
256
|
+
<T style={t.infoKey}>{C("socket.closedAt","Closed At")}</T>
|
|
257
|
+
<T style={t.infoVal}>{Se(o.endTime)}</T>
|
|
258
258
|
</S>}
|
|
259
259
|
|
|
260
260
|
{o.closeCode!=null&&<S style={t.infoRow}>
|
|
261
|
-
<T style={t.infoKey}>Close Code & Reason</T>
|
|
261
|
+
<T style={t.infoKey}>{C("socket.closeCodeReason","Close Code & Reason")}</T>
|
|
262
262
|
<T style={t.infoVal}>{o.closeCode} ({o.closeReason||"N/A"})</T>
|
|
263
263
|
</S>}
|
|
264
264
|
|
|
265
265
|
{o.protocols&&<S style={t.infoRow}>
|
|
266
|
-
<T style={t.infoKey}>Subprotocols</T>
|
|
266
|
+
<T style={t.infoKey}>{C("socket.subprotocols","Subprotocols")}</T>
|
|
267
267
|
<T style={t.infoVal}>
|
|
268
268
|
{Array.isArray(o.protocols)?o.protocols.join(", "):o.protocols}
|
|
269
269
|
</T>
|
|
270
270
|
</S>}
|
|
271
271
|
|
|
272
272
|
{o.caller&&<S style={t.infoRow}>
|
|
273
|
-
<T style={t.infoKey}>Caller Stack</T>
|
|
274
|
-
<T style={[t.infoVal,{fontFamily:
|
|
273
|
+
<T style={t.infoKey}>{C("socket.callerStack","Caller Stack")}</T>
|
|
274
|
+
<T style={[t.infoVal,{fontFamily:h.interMedium,color:e.brandPurple}]}selectable>
|
|
275
275
|
{o.caller}
|
|
276
276
|
</T>
|
|
277
277
|
</S>}
|
|
278
278
|
|
|
279
279
|
{o.error&&<S style={t.infoRow}>
|
|
280
|
-
<T style={t.infoKey}>Error</T>
|
|
280
|
+
<T style={t.infoKey}>{C("socket.error","Error")}</T>
|
|
281
281
|
<T style={[t.infoVal,{color:e.errorColor}]}selectable>
|
|
282
282
|
{o.error}
|
|
283
283
|
</T>
|
|
284
284
|
</S>}
|
|
285
285
|
</S>
|
|
286
|
-
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
{(()=>{const r=o.routeInfo||j?.current&&j.current.get(o.id);return!r||!r.path||r.path==="Navigators"?null:<S style={{marginTop:12}}>
|
|
289
|
+
<Ke routeInfo={r}/>
|
|
290
|
+
</S>})()}
|
|
291
|
+
</F>}
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
{I==="headers"&&o.headers&&<F style={t.tabContentScroll}contentContainerStyle={{padding:12}}>
|
|
295
|
+
<Ue title={C("socket.handshakeHeaders","Handshake Headers")}headers={o.headers}search=""resetKey={o.id}/>
|
|
296
|
+
</F>}
|
|
287
297
|
|
|
288
298
|
|
|
289
|
-
{
|
|
299
|
+
{I==="params"&&<F style={t.tabContentScroll}contentContainerStyle={{padding:12}}>
|
|
290
300
|
<S style={t.sectionCard}>
|
|
291
|
-
<T style={t.sectionHeading}>HANDSHAKE QUERY PARAMETERS</T>
|
|
292
|
-
{!o.query||Object.keys(o.query).length===0?<T style={t.emptySectionText}>No query parameters passed in connection URL</T>:Object.entries(o.query).map(([
|
|
293
|
-
<T style={t.paramKey}selectable>{
|
|
294
|
-
<T style={t.paramVal}selectable>{
|
|
295
|
-
<
|
|
301
|
+
<T style={t.sectionHeading}>{C("socket.handshakeParams","HANDSHAKE QUERY PARAMETERS")}</T>
|
|
302
|
+
{!o.query||Object.keys(o.query).length===0?<T style={t.emptySectionText}>{C("socket.noQueryParams","No query parameters passed in connection URL")}</T>:Object.entries(o.query).map(([r,V])=><S key={r}style={t.paramRow}>
|
|
303
|
+
<T style={t.paramKey}selectable>{r}</T>
|
|
304
|
+
<T style={t.paramVal}selectable>{V}</T>
|
|
305
|
+
<O value={V}label={r}/>
|
|
296
306
|
</S>)}
|
|
297
307
|
</S>
|
|
298
|
-
|
|
308
|
+
</F>}
|
|
299
309
|
|
|
300
310
|
|
|
301
|
-
{
|
|
311
|
+
{I==="raw"&&<F style={t.tabContentScroll}contentContainerStyle={{padding:12}}>
|
|
302
312
|
<S style={t.sectionCard}>
|
|
303
|
-
<T style={t.sectionHeading}>JAVASCRIPT CLIENT CODE</T>
|
|
304
|
-
<
|
|
313
|
+
<T style={t.sectionHeading}>{C("socket.jsClientCode","JAVASCRIPT CLIENT CODE")}</T>
|
|
314
|
+
<Te code={G}language="javascript"/>
|
|
305
315
|
</S>
|
|
306
316
|
|
|
307
317
|
<S style={[t.sectionCard,{marginTop:14}]}>
|
|
308
|
-
<T style={t.sectionHeading}>TERMINAL WSCAT COMMAND</T>
|
|
309
|
-
<
|
|
318
|
+
<T style={t.sectionHeading}>{C("socket.terminalWscat","TERMINAL WSCAT COMMAND")}</T>
|
|
319
|
+
<Te code={Q}language="javascript"/>
|
|
310
320
|
</S>
|
|
311
321
|
|
|
312
322
|
<S style={[t.sectionCard,{marginTop:14}]}>
|
|
313
|
-
<T style={t.sectionHeading}>RAW CONNECTION JSON DUMP</T>
|
|
314
|
-
<
|
|
323
|
+
<T style={t.sectionHeading}>{C("socket.rawDump","RAW CONNECTION JSON DUMP")}</T>
|
|
324
|
+
<_ data={o}/>
|
|
315
325
|
</S>
|
|
316
|
-
|
|
317
|
-
</S>};export default
|
|
326
|
+
</F>}
|
|
327
|
+
</S>};export default Wt;const t=Ne.create({frameControlBar:{padding:10,backgroundColor:e.graySurface,borderBottomWidth:1,borderBottomColor:e.dividerColor,gap:8},frameSearchBar:{flexDirection:"row",alignItems:"center",backgroundColor:e.contentBg,borderRadius:8,borderWidth:1,borderColor:e.dividerColor,paddingHorizontal:8,height:34,gap:6},frameSearchInput:{flex:1,fontFamily:h.interRegular,fontSize:12,color:e.grayTextStrong,paddingVertical:0},frameFilterRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},dirPillGroup:{flexDirection:"row",gap:6},dirPill:{paddingHorizontal:8,paddingVertical:4,borderRadius:6,borderWidth:1,borderColor:e.dividerColor,backgroundColor:e.contentBg},dirPillActive:{backgroundColor:`${e.brandPurple}18`,borderColor:e.brandPurple},dirPillText:{fontFamily:h.interMedium,fontSize:11,color:e.grayTextWeak},dirPillTextActive:{color:e.brandPurple,fontFamily:h.interBold},expandGroup:{flexDirection:"row",alignItems:"center",gap:4},textBtn:{paddingVertical:2,paddingHorizontal:4},textBtnLabel:{fontFamily:h.interMedium,fontSize:11,color:e.brandPurple},textBtnSep:{color:e.grayTextWeak,fontSize:10},framesScrollView:{flex:1},emptyFrames:{padding:32,alignItems:"center"},emptyFramesText:{fontFamily:h.interMedium,fontSize:12.5,color:e.grayTextWeak,textAlign:"center"},frameCard:{backgroundColor:e.contentBg,borderRadius:8,borderWidth:1,borderColor:e.dividerColor,marginBottom:8,overflow:"hidden"},frameCardHeader:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingHorizontal:10,paddingVertical:7,backgroundColor:e.graySurface,borderBottomWidth:1,borderBottomColor:e.dividerColor},frameHeaderLeft:{flexDirection:"row",alignItems:"center",gap:6},dirBadge:{flexDirection:"row",alignItems:"center",paddingHorizontal:5,paddingVertical:2,borderRadius:4,gap:3},dirBadgeText:{fontFamily:h.interBold,fontSize:9.5},eventBadge:{backgroundColor:`${e.violet600}18`,paddingHorizontal:6,paddingVertical:2,borderRadius:4,maxWidth:130},eventBadgeText:{fontFamily:h.interBold,fontSize:10,color:e.violet600},frameIndexText:{fontFamily:h.interMedium,fontSize:10,color:e.grayTextWeak},frameHeaderRight:{flexDirection:"row",alignItems:"center",gap:6},frameOffsetTime:{fontFamily:h.interRegular,fontSize:10,color:e.grayTextWeak},frameSizePill:{backgroundColor:`${e.slate400}18`,paddingHorizontal:4,paddingVertical:1,borderRadius:4},frameSizeText:{fontFamily:h.interMedium,fontSize:9.5,color:e.grayTextStrong},frameBody:{padding:8},frameRawText:{fontFamily:h.interRegular,fontSize:12,color:e.grayTextStrong,lineHeight:16},tabContentScroll:{flex:1},sectionCard:{backgroundColor:e.contentBg,borderRadius:10,borderWidth:1,borderColor:e.dividerColor,padding:12},sectionHeading:{fontFamily:h.interBold,fontSize:11,color:e.grayTextWeak,letterSpacing:.6,marginBottom:10},infoRow:{paddingVertical:8,borderBottomWidth:1,borderBottomColor:e.dividerColor},infoKey:{fontFamily:h.interMedium,fontSize:11,color:e.grayTextWeak,marginBottom:2},infoVal:{fontFamily:h.interSemiBold,fontSize:12.5,color:e.grayTextStrong,lineHeight:18},emptySectionText:{fontFamily:h.interRegular,fontSize:12,color:e.grayTextWeak,fontStyle:"italic",paddingVertical:8},paramRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",paddingVertical:8,borderBottomWidth:1,borderBottomColor:e.dividerColor,gap:8},paramKey:{fontFamily:h.interBold,fontSize:12,color:e.brandPurple,width:"30%"},paramVal:{flex:1,fontFamily:h.interMedium,fontSize:12,color:e.grayTextStrong}});
|