react-native-xenon 0.1.0 → 0.2.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/README.md +5 -5
- package/lib/commonjs/assets/icons/record.png +0 -0
- package/lib/commonjs/colors.js +14 -0
- package/lib/commonjs/colors.js.map +1 -0
- package/lib/commonjs/hooks/useConsoleInterceptor.js +6 -7
- package/lib/commonjs/hooks/useConsoleInterceptor.js.map +1 -1
- package/lib/commonjs/hooks/useNetworkInterceptor.js +28 -24
- package/lib/commonjs/hooks/useNetworkInterceptor.js.map +1 -1
- package/lib/commonjs/icons.js +15 -0
- package/lib/commonjs/icons.js.map +1 -0
- package/lib/commonjs/interceptors/ConsoleInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/FetchInterceptor.js +5 -2
- package/lib/commonjs/interceptors/FetchInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/Interceptor.js +7 -1
- package/lib/commonjs/interceptors/Interceptor.js.map +1 -1
- package/lib/commonjs/interceptors/WebSocketInterceptor.js +11 -4
- package/lib/commonjs/interceptors/WebSocketInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/XHRInterceptor.js +4 -1
- package/lib/commonjs/interceptors/XHRInterceptor.js.map +1 -1
- package/lib/commonjs/types/index.js +8 -8
- package/lib/commonjs/types/index.js.map +1 -1
- package/lib/commonjs/ui/Xenon.js +12 -9
- package/lib/commonjs/ui/Xenon.js.map +1 -1
- package/lib/commonjs/ui/components/bubble/Bubble.js +5 -2
- package/lib/commonjs/ui/components/bubble/Bubble.js.map +1 -1
- package/lib/commonjs/ui/components/details/LogMessageDetails.js +3 -1
- package/lib/commonjs/ui/components/details/LogMessageDetails.js.map +1 -1
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js +17 -19
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js.map +1 -1
- package/lib/commonjs/ui/components/headers/DebuggerHeader.js +9 -7
- package/lib/commonjs/ui/components/headers/DebuggerHeader.js.map +1 -1
- package/lib/commonjs/ui/components/headers/NetworkPanelHeader.js +22 -9
- package/lib/commonjs/ui/components/headers/NetworkPanelHeader.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +2 -2
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/items/ConsolePanelItem.js +3 -1
- package/lib/commonjs/ui/components/items/ConsolePanelItem.js.map +1 -1
- package/lib/commonjs/ui/components/items/DebuggerHeaderItem.js +17 -10
- package/lib/commonjs/ui/components/items/DebuggerHeaderItem.js.map +1 -1
- package/lib/commonjs/ui/components/items/NetworkPanelItem.js +21 -9
- package/lib/commonjs/ui/components/items/NetworkPanelItem.js.map +1 -1
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsHeaderItem.js +4 -2
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsHeaderItem.js.map +1 -1
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsItem.js +4 -2
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsItem.js.map +1 -1
- package/lib/commonjs/ui/components/panels/ConsolePanel.js +2 -1
- package/lib/commonjs/ui/components/panels/ConsolePanel.js.map +1 -1
- package/lib/commonjs/ui/components/panels/NetworkPanel.js +4 -2
- package/lib/commonjs/ui/components/panels/NetworkPanel.js.map +1 -1
- package/lib/commonjs/utils.js +7 -5
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/assets/icons/record.png +0 -0
- package/lib/module/colors.js +10 -0
- package/lib/module/colors.js.map +1 -0
- package/lib/module/hooks/useConsoleInterceptor.js +6 -7
- package/lib/module/hooks/useConsoleInterceptor.js.map +1 -1
- package/lib/module/hooks/useNetworkInterceptor.js +18 -14
- package/lib/module/hooks/useNetworkInterceptor.js.map +1 -1
- package/lib/module/icons.js +11 -0
- package/lib/module/icons.js.map +1 -0
- package/lib/module/interceptors/ConsoleInterceptor.js.map +1 -1
- package/lib/module/interceptors/FetchInterceptor.js +6 -3
- package/lib/module/interceptors/FetchInterceptor.js.map +1 -1
- package/lib/module/interceptors/Interceptor.js +7 -1
- package/lib/module/interceptors/Interceptor.js.map +1 -1
- package/lib/module/interceptors/WebSocketInterceptor.js +11 -4
- package/lib/module/interceptors/WebSocketInterceptor.js.map +1 -1
- package/lib/module/interceptors/XHRInterceptor.js +4 -1
- package/lib/module/interceptors/XHRInterceptor.js.map +1 -1
- package/lib/module/types/index.js +1 -1
- package/lib/module/types/index.js.map +1 -1
- package/lib/module/ui/Xenon.js +13 -10
- package/lib/module/ui/Xenon.js.map +1 -1
- package/lib/module/ui/components/bubble/Bubble.js +4 -2
- package/lib/module/ui/components/bubble/Bubble.js.map +1 -1
- package/lib/module/ui/components/details/LogMessageDetails.js +2 -1
- package/lib/module/ui/components/details/LogMessageDetails.js.map +1 -1
- package/lib/module/ui/components/details/NetworkRequestDetails.js +18 -20
- package/lib/module/ui/components/details/NetworkRequestDetails.js.map +1 -1
- package/lib/module/ui/components/headers/DebuggerHeader.js +9 -7
- package/lib/module/ui/components/headers/DebuggerHeader.js.map +1 -1
- package/lib/module/ui/components/headers/NetworkPanelHeader.js +21 -9
- package/lib/module/ui/components/headers/NetworkPanelHeader.js.map +1 -1
- package/lib/module/ui/components/index.js +2 -2
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/items/ConsolePanelItem.js +2 -1
- package/lib/module/ui/components/items/ConsolePanelItem.js.map +1 -1
- package/lib/module/ui/components/items/DebuggerHeaderItem.js +16 -10
- package/lib/module/ui/components/items/DebuggerHeaderItem.js.map +1 -1
- package/lib/module/ui/components/items/NetworkPanelItem.js +21 -10
- package/lib/module/ui/components/items/NetworkPanelItem.js.map +1 -1
- package/lib/module/ui/components/items/NetworkRequestDetailsHeaderItem.js +3 -2
- package/lib/module/ui/components/items/NetworkRequestDetailsHeaderItem.js.map +1 -1
- package/lib/module/ui/components/items/NetworkRequestDetailsItem.js +3 -2
- package/lib/module/ui/components/items/NetworkRequestDetailsItem.js.map +1 -1
- package/lib/module/ui/components/panels/ConsolePanel.js +2 -1
- package/lib/module/ui/components/panels/ConsolePanel.js.map +1 -1
- package/lib/module/ui/components/panels/NetworkPanel.js +4 -2
- package/lib/module/ui/components/panels/NetworkPanel.js.map +1 -1
- package/lib/module/utils.js +3 -2
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/commonjs/src/colors.d.ts +8 -0
- package/lib/typescript/commonjs/src/colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/contexts/MainContext.d.ts +1 -1
- package/lib/typescript/commonjs/src/contexts/MainContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useConsoleInterceptor.d.ts +2 -2
- package/lib/typescript/commonjs/src/hooks/useConsoleInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useNetworkInterceptor.d.ts +2 -2
- package/lib/typescript/commonjs/src/hooks/useNetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/icons.d.ts +9 -0
- package/lib/typescript/commonjs/src/icons.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/interceptors/ConsoleInterceptor.d.ts +1 -1
- package/lib/typescript/commonjs/src/interceptors/ConsoleInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/FetchInterceptor.d.ts +1 -1
- package/lib/typescript/commonjs/src/interceptors/FetchInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/HttpInterceptor.d.ts +1 -1
- package/lib/typescript/commonjs/src/interceptors/Interceptor.d.ts +3 -1
- package/lib/typescript/commonjs/src/interceptors/Interceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/WebSocketInterceptor.d.ts +4 -3
- package/lib/typescript/commonjs/src/interceptors/WebSocketInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/XHRInterceptor.d.ts +1 -1
- package/lib/typescript/commonjs/src/interceptors/XHRInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/common.d.ts +2 -0
- package/lib/typescript/commonjs/src/types/common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/http.d.ts +1 -2
- package/lib/typescript/commonjs/src/types/http.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/types/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/websocket.d.ts +6 -7
- package/lib/typescript/commonjs/src/types/websocket.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/Xenon.d.ts +4 -4
- package/lib/typescript/commonjs/src/ui/Xenon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/bubble/Bubble.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/details/LogMessageDetails.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/details/NetworkRequestDetails.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/headers/DebuggerHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/headers/NetworkPanelHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/index.d.ts +2 -2
- package/lib/typescript/commonjs/src/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/ConsolePanelItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/DebuggerHeaderItem.d.ts +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/DebuggerHeaderItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkPanelItem.d.ts +5 -4
- package/lib/typescript/commonjs/src/ui/components/items/NetworkPanelItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkRequestDetailsHeaderItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkRequestDetailsItem.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/panels/ConsolePanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/panels/NetworkPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/utils.d.ts +3 -2
- package/lib/typescript/commonjs/src/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/colors.d.ts +8 -0
- package/lib/typescript/module/src/colors.d.ts.map +1 -0
- package/lib/typescript/module/src/contexts/MainContext.d.ts +1 -1
- package/lib/typescript/module/src/contexts/MainContext.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useConsoleInterceptor.d.ts +2 -2
- package/lib/typescript/module/src/hooks/useConsoleInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useNetworkInterceptor.d.ts +2 -2
- package/lib/typescript/module/src/hooks/useNetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/icons.d.ts +9 -0
- package/lib/typescript/module/src/icons.d.ts.map +1 -0
- package/lib/typescript/module/src/interceptors/ConsoleInterceptor.d.ts +1 -1
- package/lib/typescript/module/src/interceptors/ConsoleInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/FetchInterceptor.d.ts +1 -1
- package/lib/typescript/module/src/interceptors/FetchInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/HttpInterceptor.d.ts +1 -1
- package/lib/typescript/module/src/interceptors/Interceptor.d.ts +3 -1
- package/lib/typescript/module/src/interceptors/Interceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/WebSocketInterceptor.d.ts +4 -3
- package/lib/typescript/module/src/interceptors/WebSocketInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/XHRInterceptor.d.ts +1 -1
- package/lib/typescript/module/src/interceptors/XHRInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/types/common.d.ts +2 -0
- package/lib/typescript/module/src/types/common.d.ts.map +1 -1
- package/lib/typescript/module/src/types/http.d.ts +1 -2
- package/lib/typescript/module/src/types/http.d.ts.map +1 -1
- package/lib/typescript/module/src/types/index.d.ts +1 -1
- package/lib/typescript/module/src/types/index.d.ts.map +1 -1
- package/lib/typescript/module/src/types/websocket.d.ts +6 -7
- package/lib/typescript/module/src/types/websocket.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/Xenon.d.ts +4 -4
- package/lib/typescript/module/src/ui/Xenon.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/bubble/Bubble.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/details/LogMessageDetails.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/details/NetworkRequestDetails.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/headers/DebuggerHeader.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/headers/NetworkPanelHeader.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/index.d.ts +2 -2
- package/lib/typescript/module/src/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/ConsolePanelItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/DebuggerHeaderItem.d.ts +1 -1
- package/lib/typescript/module/src/ui/components/items/DebuggerHeaderItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/NetworkPanelItem.d.ts +5 -4
- package/lib/typescript/module/src/ui/components/items/NetworkPanelItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/NetworkRequestDetailsHeaderItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/NetworkRequestDetailsItem.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/panels/ConsolePanel.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/panels/NetworkPanel.d.ts.map +1 -1
- package/lib/typescript/module/src/utils.d.ts +3 -2
- package/lib/typescript/module/src/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/icons/record.png +0 -0
- package/src/colors.ts +8 -0
- package/src/contexts/MainContext.ts +1 -1
- package/src/global.d.ts +4 -4
- package/src/hooks/useConsoleInterceptor.ts +5 -7
- package/src/hooks/useNetworkInterceptor.ts +19 -13
- package/src/icons.ts +9 -0
- package/src/interceptors/ConsoleInterceptor.ts +3 -3
- package/src/interceptors/FetchInterceptor.ts +7 -3
- package/src/interceptors/Interceptor.ts +9 -1
- package/src/interceptors/WebSocketInterceptor.ts +14 -5
- package/src/interceptors/XHRInterceptor.ts +7 -1
- package/src/types/common.ts +2 -0
- package/src/types/http.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/types/websocket.ts +6 -11
- package/src/ui/Xenon.tsx +110 -101
- package/src/ui/components/bubble/Bubble.tsx +4 -2
- package/src/ui/components/details/LogMessageDetails.tsx +2 -1
- package/src/ui/components/details/NetworkRequestDetails.tsx +29 -21
- package/src/ui/components/headers/DebuggerHeader.tsx +9 -13
- package/src/ui/components/headers/NetworkPanelHeader.tsx +20 -9
- package/src/ui/components/index.ts +2 -2
- package/src/ui/components/items/ConsolePanelItem.tsx +2 -1
- package/src/ui/components/items/DebuggerHeaderItem.tsx +18 -12
- package/src/ui/components/items/NetworkPanelItem.tsx +33 -13
- package/src/ui/components/items/NetworkRequestDetailsHeaderItem.tsx +3 -2
- package/src/ui/components/items/NetworkRequestDetailsItem.tsx +3 -2
- package/src/ui/components/panels/ConsolePanel.tsx +2 -1
- package/src/ui/components/panels/NetworkPanel.tsx +4 -2
- package/src/utils.ts +5 -2
- package/lib/commonjs/assets/record.png +0 -0
- package/lib/module/assets/record.png +0 -0
- package/src/assets/record.png +0 -0
- /package/lib/commonjs/assets/{code.png → icons/code.png} +0 -0
- /package/lib/commonjs/assets/{delete.png → icons/delete.png} +0 -0
- /package/lib/commonjs/assets/{hide.png → icons/hide.png} +0 -0
- /package/lib/commonjs/assets/{move.png → icons/move.png} +0 -0
- /package/lib/module/assets/{code.png → icons/code.png} +0 -0
- /package/lib/module/assets/{delete.png → icons/delete.png} +0 -0
- /package/lib/module/assets/{hide.png → icons/hide.png} +0 -0
- /package/lib/module/assets/{move.png → icons/move.png} +0 -0
- /package/src/assets/{code.png → icons/code.png} +0 -0
- /package/src/assets/{delete.png → icons/delete.png} +0 -0
- /package/src/assets/{hide.png → icons/hide.png} +0 -0
- /package/src/assets/{move.png → icons/move.png} +0 -0
@@ -1,17 +1,23 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
import { Image, StyleSheet, Text, TouchableOpacity } from 'react-native';
|
4
|
+
import colors from "../../../colors.js";
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
-
export default function DebuggerHeaderItem(
|
6
|
+
export default function DebuggerHeaderItem({
|
7
|
+
content,
|
8
|
+
isLabel,
|
9
|
+
isActive,
|
10
|
+
onPress
|
11
|
+
}) {
|
6
12
|
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
7
|
-
onPress:
|
13
|
+
onPress: onPress,
|
8
14
|
activeOpacity: 0.8,
|
9
|
-
style: [styles.container,
|
10
|
-
children: typeof
|
15
|
+
style: [styles.container, isLabel ? isActive ? styles.activeLabelContainer : styles.labelContainer : isActive ? styles.activeContainer : undefined],
|
16
|
+
children: typeof content === 'string' ? /*#__PURE__*/_jsx(Text, {
|
11
17
|
style: styles.title,
|
12
|
-
children:
|
18
|
+
children: content
|
13
19
|
}) : /*#__PURE__*/_jsx(Image, {
|
14
|
-
source:
|
20
|
+
source: content,
|
15
21
|
style: styles.icon
|
16
22
|
})
|
17
23
|
});
|
@@ -21,7 +27,7 @@ const styles = StyleSheet.create({
|
|
21
27
|
paddingVertical: 4,
|
22
28
|
paddingHorizontal: 8,
|
23
29
|
borderRadius: 4,
|
24
|
-
backgroundColor:
|
30
|
+
backgroundColor: colors.gray,
|
25
31
|
borderWidth: 1,
|
26
32
|
borderColor: 'transparent'
|
27
33
|
},
|
@@ -31,16 +37,16 @@ const styles = StyleSheet.create({
|
|
31
37
|
activeLabelContainer: {
|
32
38
|
backgroundColor: 'transparent',
|
33
39
|
borderWidth: 1,
|
34
|
-
borderColor:
|
40
|
+
borderColor: colors.black
|
35
41
|
},
|
36
42
|
activeContainer: {
|
37
|
-
backgroundColor:
|
43
|
+
backgroundColor: colors.red
|
38
44
|
},
|
39
45
|
title: {
|
40
46
|
fontSize: 14,
|
41
47
|
lineHeight: 17,
|
42
48
|
fontWeight: '500',
|
43
|
-
color:
|
49
|
+
color: colors.black
|
44
50
|
},
|
45
51
|
icon: {
|
46
52
|
width: 17,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Image","StyleSheet","Text","TouchableOpacity","jsx","_jsx","DebuggerHeaderItem","
|
1
|
+
{"version":3,"names":["Image","StyleSheet","Text","TouchableOpacity","colors","jsx","_jsx","DebuggerHeaderItem","content","isLabel","isActive","onPress","activeOpacity","style","styles","container","activeLabelContainer","labelContainer","activeContainer","undefined","children","title","source","icon","create","paddingVertical","paddingHorizontal","borderRadius","backgroundColor","gray","borderWidth","borderColor","black","red","fontSize","lineHeight","fontWeight","color","width","height"],"sourceRoot":"../../../../../src","sources":["ui/components/items/DebuggerHeaderItem.tsx"],"mappings":";;AAAA,SAASA,KAAK,EAAEC,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,QAAiC,cAAc;AACjG,OAAOC,MAAM,MAAM,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASrC,eAAe,SAASC,kBAAkBA,CAAC;EACzCC,OAAO;EACPC,OAAO;EACPC,QAAQ;EACRC;AACuB,CAAC,EAAE;EAC1B,oBACEL,IAAA,CAACH,gBAAgB;IACfQ,OAAO,EAAEA,OAAQ;IACjBC,aAAa,EAAE,GAAI;IACnBC,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChBN,OAAO,GACHC,QAAQ,GACNI,MAAM,CAACE,oBAAoB,GAC3BF,MAAM,CAACG,cAAc,GACvBP,QAAQ,GACNI,MAAM,CAACI,eAAe,GACtBC,SAAS,CACf;IAAAC,QAAA,EAED,OAAOZ,OAAO,KAAK,QAAQ,gBAC1BF,IAAA,CAACJ,IAAI;MAACW,KAAK,EAAEC,MAAM,CAACO,KAAM;MAAAD,QAAA,EAAEZ;IAAO,CAAO,CAAC,gBAE3CF,IAAA,CAACN,KAAK;MAACsB,MAAM,EAAEd,OAAQ;MAACK,KAAK,EAAEC,MAAM,CAACS;IAAK,CAAE;EAC9C,CACe,CAAC;AAEvB;AAEA,MAAMT,MAAM,GAAGb,UAAU,CAACuB,MAAM,CAAC;EAC/BT,SAAS,EAAE;IACTU,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE,CAAC;IACpBC,YAAY,EAAE,CAAC;IACfC,eAAe,EAAExB,MAAM,CAACyB,IAAI;IAC5BC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE;EACf,CAAC;EACDd,cAAc,EAAE;IACdW,eAAe,EAAE;EACnB,CAAC;EACDZ,oBAAoB,EAAE;IACpBY,eAAe,EAAE,aAAa;IAC9BE,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE3B,MAAM,CAAC4B;EACtB,CAAC;EACDd,eAAe,EAAE;IACfU,eAAe,EAAExB,MAAM,CAAC6B;EAC1B,CAAC;EACDZ,KAAK,EAAE;IACLa,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,UAAU,EAAE,KAAK;IACjBC,KAAK,EAAEjC,MAAM,CAAC4B;EAChB,CAAC;EACDT,IAAI,EAAE;IACJe,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -3,12 +3,14 @@
|
|
3
3
|
import { useMemo } from 'react';
|
4
4
|
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
|
5
5
|
import { URL } from 'react-native-url-polyfill';
|
6
|
-
import {
|
6
|
+
import { formatRequestDuration, formatRequestMethod, formatRequestStatusCode } from "../../../utils.js";
|
7
|
+
import colors from "../../../colors.js";
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
8
9
|
export default function NetworkPanelItem({
|
10
|
+
method,
|
9
11
|
name,
|
12
|
+
duration,
|
10
13
|
status,
|
11
|
-
method,
|
12
14
|
onPress
|
13
15
|
}) {
|
14
16
|
const requestName = useMemo(() => {
|
@@ -26,25 +28,32 @@ export default function NetworkPanelItem({
|
|
26
28
|
onPress: onPress,
|
27
29
|
style: styles.container,
|
28
30
|
children: [/*#__PURE__*/_jsx(View, {
|
29
|
-
style:
|
31
|
+
style: styles.column,
|
32
|
+
children: /*#__PURE__*/_jsx(Text, {
|
33
|
+
numberOfLines: 1,
|
34
|
+
style: styles.text,
|
35
|
+
children: formatRequestMethod(method)
|
36
|
+
})
|
37
|
+
}), /*#__PURE__*/_jsx(View, {
|
38
|
+
style: [styles.column, styles.nameColumn],
|
30
39
|
children: /*#__PURE__*/_jsx(Text, {
|
31
40
|
numberOfLines: 1,
|
32
41
|
style: styles.text,
|
33
42
|
children: requestName
|
34
43
|
})
|
35
44
|
}), /*#__PURE__*/_jsx(View, {
|
36
|
-
style: styles.column,
|
45
|
+
style: [styles.column, styles.durationColumn],
|
37
46
|
children: /*#__PURE__*/_jsx(Text, {
|
38
47
|
numberOfLines: 1,
|
39
48
|
style: styles.text,
|
40
|
-
children:
|
49
|
+
children: formatRequestDuration(duration)
|
41
50
|
})
|
42
51
|
}), /*#__PURE__*/_jsx(View, {
|
43
52
|
style: styles.column,
|
44
53
|
children: /*#__PURE__*/_jsx(Text, {
|
45
54
|
numberOfLines: 1,
|
46
55
|
style: styles.text,
|
47
|
-
children:
|
56
|
+
children: formatRequestStatusCode(status)
|
48
57
|
})
|
49
58
|
})]
|
50
59
|
});
|
@@ -54,9 +63,11 @@ const styles = StyleSheet.create({
|
|
54
63
|
flex: 1,
|
55
64
|
flexDirection: 'row'
|
56
65
|
},
|
57
|
-
|
58
|
-
flex:
|
59
|
-
|
66
|
+
nameColumn: {
|
67
|
+
flex: 5
|
68
|
+
},
|
69
|
+
durationColumn: {
|
70
|
+
flex: 2
|
60
71
|
},
|
61
72
|
column: {
|
62
73
|
flex: 1.5,
|
@@ -65,7 +76,7 @@ const styles = StyleSheet.create({
|
|
65
76
|
paddingRight: 0
|
66
77
|
},
|
67
78
|
text: {
|
68
|
-
color:
|
79
|
+
color: colors.black,
|
69
80
|
fontSize: 14
|
70
81
|
}
|
71
82
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useMemo","StyleSheet","Text","TouchableOpacity","View","URL","
|
1
|
+
{"version":3,"names":["useMemo","StyleSheet","Text","TouchableOpacity","View","URL","formatRequestDuration","formatRequestMethod","formatRequestStatusCode","colors","jsx","_jsx","jsxs","_jsxs","NetworkPanelItem","method","name","duration","status","onPress","requestName","url","suffixUrl","pathname","search","host","error","style","styles","container","children","column","numberOfLines","text","nameColumn","durationColumn","create","flex","flexDirection","flexShrink","padding","paddingRight","color","black","fontSize"],"sourceRoot":"../../../../../src","sources":["ui/components/items/NetworkPanelItem.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAASC,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACvE,SAASC,GAAG,QAAQ,2BAA2B;AAE/C,SACEC,qBAAqB,EACrBC,mBAAmB,EACnBC,uBAAuB,QAClB,mBAAgB;AACvB,OAAOC,MAAM,MAAM,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUrC,eAAe,SAASC,gBAAgBA,CAAC;EACvCC,MAAM;EACNC,IAAI;EACJC,QAAQ;EACRC,MAAM;EACNC;AACqB,CAAC,EAAE;EACxB,MAAMC,WAAW,GAAGpB,OAAO,CAAC,MAAM;IAChC,IAAI,CAACgB,IAAI,EAAE,OAAO,UAAU;IAE5B,IAAI;MACF,MAAMK,GAAG,GAAG,IAAIhB,GAAG,CAACW,IAAI,CAAC;MACzB,MAAMM,SAAS,GAAGD,GAAG,CAACE,QAAQ,GAAGF,GAAG,CAACG,MAAM;MAE3C,IAAIF,SAAS,KAAK,GAAG,EAAE,OAAOD,GAAG,CAACI,IAAI;MACtC,OAAOH,SAAS;IAClB,CAAC,CAAC,OAAOI,KAAK,EAAE;MACd,OAAOV,IAAI;IACb;EACF,CAAC,EAAE,CAACA,IAAI,CAAC,CAAC;EAEV,oBACEH,KAAA,CAACV,gBAAgB;IAACgB,OAAO,EAAEA,OAAQ;IAACQ,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC1DnB,IAAA,CAACP,IAAI;MAACuB,KAAK,EAAEC,MAAM,CAACG,MAAO;MAAAD,QAAA,eACzBnB,IAAA,CAACT,IAAI;QAAC8B,aAAa,EAAE,CAAE;QAACL,KAAK,EAAEC,MAAM,CAACK,IAAK;QAAAH,QAAA,EACxCvB,mBAAmB,CAACQ,MAAM;MAAC,CACxB;IAAC,CACH,CAAC,eAEPJ,IAAA,CAACP,IAAI;MAACuB,KAAK,EAAE,CAACC,MAAM,CAACG,MAAM,EAAEH,MAAM,CAACM,UAAU,CAAE;MAAAJ,QAAA,eAC9CnB,IAAA,CAACT,IAAI;QAAC8B,aAAa,EAAE,CAAE;QAACL,KAAK,EAAEC,MAAM,CAACK,IAAK;QAAAH,QAAA,EACxCV;MAAW,CACR;IAAC,CACH,CAAC,eAEPT,IAAA,CAACP,IAAI;MAACuB,KAAK,EAAE,CAACC,MAAM,CAACG,MAAM,EAAEH,MAAM,CAACO,cAAc,CAAE;MAAAL,QAAA,eAClDnB,IAAA,CAACT,IAAI;QAAC8B,aAAa,EAAE,CAAE;QAACL,KAAK,EAAEC,MAAM,CAACK,IAAK;QAAAH,QAAA,EACxCxB,qBAAqB,CAACW,QAAQ;MAAC,CAC5B;IAAC,CACH,CAAC,eAEPN,IAAA,CAACP,IAAI;MAACuB,KAAK,EAAEC,MAAM,CAACG,MAAO;MAAAD,QAAA,eACzBnB,IAAA,CAACT,IAAI;QAAC8B,aAAa,EAAE,CAAE;QAACL,KAAK,EAAEC,MAAM,CAACK,IAAK;QAAAH,QAAA,EACxCtB,uBAAuB,CAACU,MAAM;MAAC,CAC5B;IAAC,CACH,CAAC;EAAA,CACS,CAAC;AAEvB;AAEA,MAAMU,MAAM,GAAG3B,UAAU,CAACmC,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,IAAI,EAAE,CAAC;IACPC,aAAa,EAAE;EACjB,CAAC;EACDJ,UAAU,EAAE;IACVG,IAAI,EAAE;EACR,CAAC;EACDF,cAAc,EAAE;IACdE,IAAI,EAAE;EACR,CAAC;EACDN,MAAM,EAAE;IACNM,IAAI,EAAE,GAAG;IACTE,UAAU,EAAE,CAAC;IACbC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE;EAChB,CAAC;EACDR,IAAI,EAAE;IACJS,KAAK,EAAEjC,MAAM,CAACkC,KAAK;IACnBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
import { StyleSheet, Text, TouchableOpacity } from 'react-native';
|
4
|
+
import colors from "../../../colors.js";
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
6
|
export default function NetworkRequestDetailsHeaderItem({
|
6
7
|
visible,
|
@@ -33,11 +34,11 @@ const styles = StyleSheet.create({
|
|
33
34
|
activeItem: {
|
34
35
|
backgroundColor: 'transparent',
|
35
36
|
borderWidth: 1,
|
36
|
-
borderColor:
|
37
|
+
borderColor: colors.black
|
37
38
|
},
|
38
39
|
itemText: {
|
39
40
|
fontSize: 14,
|
40
|
-
color:
|
41
|
+
color: colors.black
|
41
42
|
}
|
42
43
|
});
|
43
44
|
//# sourceMappingURL=NetworkRequestDetailsHeaderItem.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["StyleSheet","Text","TouchableOpacity","jsx","_jsx","NetworkRequestDetailsHeaderItem","visible","name","isSelected","label","onPress","activeOpacity","style","styles","item","activeItem","children","itemText","create","flex","paddingHorizontal","paddingVertical","borderRadius","backgroundColor","borderWidth","borderColor","fontSize","color"],"sourceRoot":"../../../../../src","sources":["ui/components/items/NetworkRequestDetailsHeaderItem.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
1
|
+
{"version":3,"names":["StyleSheet","Text","TouchableOpacity","colors","jsx","_jsx","NetworkRequestDetailsHeaderItem","visible","name","isSelected","label","onPress","activeOpacity","style","styles","item","activeItem","children","itemText","create","flex","paddingHorizontal","paddingVertical","borderRadius","backgroundColor","borderWidth","borderColor","black","fontSize","color"],"sourceRoot":"../../../../../src","sources":["ui/components/items/NetworkRequestDetailsHeaderItem.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,gBAAgB,QAAQ,cAAc;AAEjE,OAAOC,MAAM,MAAM,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUrC,eAAe,SAASC,+BAA+BA,CAAC;EACtDC,OAAO;EACPC,IAAI;EACJC,UAAU;EACVC,KAAK;EACLC;AACoC,CAAC,EAAE;EACvC,IAAI,CAACJ,OAAO,EAAE,OAAO,IAAI;EAEzB,oBACEF,IAAA,CAACH,gBAAgB;IAEfU,aAAa,EAAE,GAAI;IACnBD,OAAO,EAAEA,OAAQ;IACjBE,KAAK,EAAE,CAACC,MAAM,CAACC,IAAI,EAAEN,UAAU,IAAIK,MAAM,CAACE,UAAU,CAAE;IAAAC,QAAA,eAEtDZ,IAAA,CAACJ,IAAI;MAACY,KAAK,EAAEC,MAAM,CAACI,QAAS;MAAAD,QAAA,EAAEP;IAAK,CAAO;EAAC,GALvCF,IAMW,CAAC;AAEvB;AAEA,MAAMM,MAAM,GAAGd,UAAU,CAACmB,MAAM,CAAC;EAC/BJ,IAAI,EAAE;IACJK,IAAI,EAAE,CAAC;IACPC,iBAAiB,EAAE,CAAC;IACpBC,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE,CAAC;IACfC,eAAe,EAAE,aAAa;IAC9BC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE;EACf,CAAC;EACDV,UAAU,EAAE;IACVQ,eAAe,EAAE,aAAa;IAC9BC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAEvB,MAAM,CAACwB;EACtB,CAAC;EACDT,QAAQ,EAAE;IACRU,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE1B,MAAM,CAACwB;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
import { StyleSheet, Text } from 'react-native';
|
4
|
+
import colors from "../../../colors.js";
|
4
5
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
5
6
|
export default function NetworkRequestDetailsItem({
|
6
7
|
label,
|
@@ -26,12 +27,12 @@ export default function NetworkRequestDetailsItem({
|
|
26
27
|
const styles = StyleSheet.create({
|
27
28
|
text: {
|
28
29
|
fontSize: 14,
|
29
|
-
color:
|
30
|
+
color: colors.black
|
30
31
|
},
|
31
32
|
label: {
|
32
33
|
fontSize: 14,
|
33
34
|
fontWeight: 'bold',
|
34
|
-
color:
|
35
|
+
color: colors.black
|
35
36
|
}
|
36
37
|
});
|
37
38
|
//# sourceMappingURL=NetworkRequestDetailsItem.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["StyleSheet","Text","jsxs","_jsxs","jsx","_jsx","NetworkRequestDetailsItem","label","content","selectable","style","styles","text","children","create","fontSize","color","fontWeight"],"sourceRoot":"../../../../../src","sources":["ui/components/items/NetworkRequestDetailsItem.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAAC,SAAAC,IAAA,IAAAC,KAAA,EAAAC,GAAA,IAAAC,IAAA;
|
1
|
+
{"version":3,"names":["StyleSheet","Text","colors","jsxs","_jsxs","jsx","_jsx","NetworkRequestDetailsItem","label","content","selectable","style","styles","text","children","create","fontSize","color","black","fontWeight"],"sourceRoot":"../../../../../src","sources":["ui/components/items/NetworkRequestDetailsItem.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,MAAM,MAAM,oBAAiB;AAAC,SAAAC,IAAA,IAAAC,KAAA,EAAAC,GAAA,IAAAC,IAAA;AAQrC,eAAe,SAASC,yBAAyBA,CAAC;EAChDC,KAAK;EACLC,OAAO;EACPC;AAC8B,CAAC,EAAE;EACjC,IAAIF,KAAK,EAAE;IACT,oBACEJ,KAAA,CAACH,IAAI;MAACU,KAAK,EAAEC,MAAM,CAACC,IAAK;MAACH,UAAU,EAAEA,UAAW;MAAAI,QAAA,gBAC/CV,KAAA,CAACH,IAAI;QAACU,KAAK,EAAEC,MAAM,CAACJ,KAAM;QAAAM,QAAA,GACvBN,KAAK,EACL,IAAI;MAAA,CACD,CAAC,EACNC,OAAO;IAAA,CACJ,CAAC;EAEX;EAEA,oBACEH,IAAA,CAACL,IAAI;IAACU,KAAK,EAAEC,MAAM,CAACC,IAAK;IAACH,UAAU,EAAEA,UAAW;IAAAI,QAAA,EAC9CL;EAAO,CACJ,CAAC;AAEX;AAEA,MAAMG,MAAM,GAAGZ,UAAU,CAACe,MAAM,CAAC;EAC/BF,IAAI,EAAE;IACJG,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAEf,MAAM,CAACgB;EAChB,CAAC;EACDV,KAAK,EAAE;IACLQ,QAAQ,EAAE,EAAE;IACZG,UAAU,EAAE,MAAM;IAClBF,KAAK,EAAEf,MAAM,CAACgB;EAChB;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -5,6 +5,7 @@ import { FlatList, StyleSheet, View } from 'react-native';
|
|
5
5
|
import { MainContext } from "../../../contexts/index.js";
|
6
6
|
import { useScrollToBottom } from "../../../hooks/index.js";
|
7
7
|
import ConsolePanelItem from "../items/ConsolePanelItem.js";
|
8
|
+
import colors from "../../../colors.js";
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
10
|
const Separator = () => /*#__PURE__*/_jsx(View, {
|
10
11
|
style: styles.divider
|
@@ -47,7 +48,7 @@ const styles = StyleSheet.create({
|
|
47
48
|
},
|
48
49
|
divider: {
|
49
50
|
height: 1,
|
50
|
-
backgroundColor:
|
51
|
+
backgroundColor: colors.gray
|
51
52
|
}
|
52
53
|
});
|
53
54
|
//# sourceMappingURL=ConsolePanel.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useCallback","useContext","FlatList","StyleSheet","View","MainContext","useScrollToBottom","ConsolePanelItem","jsx","_jsx","Separator","style","styles","divider","ConsolePanel","logInterceptor","logMessages","setPanelSelected","detailsData","listRef","length","renderItem","item","onPress","current","console","ref","container","data","ItemSeparatorComponent","keyExtractor","_","index","toString","create","flex","paddingHorizontal","height","backgroundColor"],"sourceRoot":"../../../../../src","sources":["ui/components/panels/ConsolePanel.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAC/C,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAA6B,cAAc;AAC9E,SAASC,WAAW,QAAQ,4BAAmB;AAC/C,SAASC,iBAAiB,QAAQ,yBAAgB;AAElD,OAAOC,gBAAgB,MAAM,8BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;
|
1
|
+
{"version":3,"names":["useCallback","useContext","FlatList","StyleSheet","View","MainContext","useScrollToBottom","ConsolePanelItem","colors","jsx","_jsx","Separator","style","styles","divider","ConsolePanel","logInterceptor","logMessages","setPanelSelected","detailsData","listRef","length","renderItem","item","onPress","current","console","ref","container","data","ItemSeparatorComponent","keyExtractor","_","index","toString","create","flex","paddingHorizontal","height","backgroundColor","gray"],"sourceRoot":"../../../../../src","sources":["ui/components/panels/ConsolePanel.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAC/C,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAA6B,cAAc;AAC9E,SAASC,WAAW,QAAQ,4BAAmB;AAC/C,SAASC,iBAAiB,QAAQ,yBAAgB;AAElD,OAAOC,gBAAgB,MAAM,8BAA2B;AACxD,OAAOC,MAAM,MAAM,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAErC,MAAMC,SAAS,GAAGA,CAAA,kBAAMD,IAAA,CAACN,IAAI;EAACQ,KAAK,EAAEC,MAAM,CAACC;AAAQ,CAAE,CAAC;AAEvD,eAAe,SAASC,YAAYA,CAAA,EAAG;EACrC,MAAM;IACJC,cAAc,EAAE;MAAEC;IAAY,CAAC;IAC/BC,gBAAgB;IAChBC;EACF,CAAC,GAAGlB,UAAU,CAACI,WAAW,CAAE;EAE5B,MAAMe,OAAO,GAAGd,iBAAiB,CAACW,WAAW,CAACI,MAAM,CAAC;EAErD,MAAMC,UAAU,GAAGtB,WAAW,CAC5B,CAAC;IAAEuB;EAAK,CAAC,KAAK;IACZ,oBACEb,IAAA,CAACH,gBAAgB;MAAA,GACXgB,IAAI;MACRC,OAAO,EAAEA,CAAA,KAAM;QACbL,WAAW,CAACM,OAAO,GAAG;UAAEC,OAAO,EAAEH;QAAK,CAAC;QACvCL,gBAAgB,CAAC,IAAI,CAAC;MACxB;IAAE,CACH,CAAC;EAEN,CAAC,EACD,CAACC,WAAW,EAAED,gBAAgB,CAChC,CAAC;EAED,oBACER,IAAA,CAACR,QAAQ;IACPyB,GAAG,EAAEP,OAAQ;IACbR,KAAK,EAAEC,MAAM,CAACe,SAAU;IACxBC,IAAI,EAAEZ,WAAY;IAClBK,UAAU,EAAEA,UAAW;IACvBQ,sBAAsB,EAAEnB,SAAU;IAClCoB,YAAY,EAAEA,CAACC,CAAC,EAAEC,KAAK,KAAKA,KAAK,CAACC,QAAQ,CAAC;EAAE,CAC9C,CAAC;AAEN;AAEA,MAAMrB,MAAM,GAAGV,UAAU,CAACgC,MAAM,CAAC;EAC/BP,SAAS,EAAE;IACTQ,IAAI,EAAE,CAAC;IACPC,iBAAiB,EAAE;EACrB,CAAC;EACDvB,OAAO,EAAE;IACPwB,MAAM,EAAE,CAAC;IACTC,eAAe,EAAE/B,MAAM,CAACgC;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
@@ -7,6 +7,7 @@ import { useScrollToBottom } from "../../../hooks/index.js";
|
|
7
7
|
import { NetworkType } from "../../../types/index.js";
|
8
8
|
import NetworkPanelHeader from "../headers/NetworkPanelHeader.js";
|
9
9
|
import NetworkPanelItem from "../items/NetworkPanelItem.js";
|
10
|
+
import colors from "../../../colors.js";
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
11
12
|
const Separator = () => /*#__PURE__*/_jsx(View, {
|
12
13
|
style: styles.divider
|
@@ -31,8 +32,9 @@ export default function NetworkPanel() {
|
|
31
32
|
setPanelSelected(null);
|
32
33
|
};
|
33
34
|
return /*#__PURE__*/_jsx(NetworkPanelItem, {
|
34
|
-
name: isWebSocket ? item.uri : item.url,
|
35
35
|
method: isWebSocket ? undefined : item.method,
|
36
|
+
name: item.url,
|
37
|
+
duration: item.duration,
|
36
38
|
status: item.status,
|
37
39
|
onPress: onPress
|
38
40
|
});
|
@@ -55,7 +57,7 @@ const styles = StyleSheet.create({
|
|
55
57
|
},
|
56
58
|
divider: {
|
57
59
|
height: 1,
|
58
|
-
backgroundColor:
|
60
|
+
backgroundColor: colors.gray
|
59
61
|
}
|
60
62
|
});
|
61
63
|
//# sourceMappingURL=NetworkPanel.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["useCallback","useContext","FlatList","StyleSheet","View","MainContext","useScrollToBottom","NetworkType","NetworkPanelHeader","NetworkPanelItem","jsx","_jsx","Separator","style","styles","divider","NetworkPanel","networkInterceptor","networkRequests","setPanelSelected","detailsData","listRef","size","renderItem","item","_","isWebSocket","type","WS","onPress","current","network","
|
1
|
+
{"version":3,"names":["useCallback","useContext","FlatList","StyleSheet","View","MainContext","useScrollToBottom","NetworkType","NetworkPanelHeader","NetworkPanelItem","colors","jsx","_jsx","Separator","style","styles","divider","NetworkPanel","networkInterceptor","networkRequests","setPanelSelected","detailsData","listRef","size","renderItem","item","_","isWebSocket","type","WS","onPress","current","network","method","undefined","name","url","duration","status","ref","data","Array","from","container","ListHeaderComponent","stickyHeaderIndices","ItemSeparatorComponent","keyExtractor","key","create","flex","paddingHorizontal","height","backgroundColor","gray"],"sourceRoot":"../../../../../src","sources":["ui/components/panels/NetworkPanel.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,UAAU,QAAQ,OAAO;AAC/C,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAA6B,cAAc;AAC9E,SAASC,WAAW,QAAQ,4BAAmB;AAC/C,SAASC,iBAAiB,QAAQ,yBAAgB;AAClD,SAASC,WAAW,QAA0D,yBAAgB;AAC9F,OAAOC,kBAAkB,MAAM,kCAA+B;AAC9D,OAAOC,gBAAgB,MAAM,8BAA2B;AACxD,OAAOC,MAAM,MAAM,oBAAiB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAErC,MAAMC,SAAS,GAAGA,CAAA,kBAAMD,IAAA,CAACR,IAAI;EAACU,KAAK,EAAEC,MAAM,CAACC;AAAQ,CAAE,CAAC;AAEvD,eAAe,SAASC,YAAYA,CAAA,EAAG;EACrC,MAAM;IACJC,kBAAkB,EAAE;MAAEC;IAAgB,CAAC;IACvCC,gBAAgB;IAChBC;EACF,CAAC,GAAGpB,UAAU,CAACI,WAAW,CAAE;EAE5B,MAAMiB,OAAO,GAAGhB,iBAAiB,CAACa,eAAe,CAACI,IAAI,CAAC;EAEvD,MAAMC,UAAU,GAAGxB,WAAW,CAC5B,CAAC;IAAEyB,IAAI,EAAE,CAACC,CAAC,EAAED,IAAI;EAAE,CAAC,KAAK;IACvB,MAAME,WAAW,GAAGF,IAAI,CAACG,IAAI,KAAKrB,WAAW,CAACsB,EAAE;IAEhD,MAAMC,OAAO,GAAGA,CAAA,KAAM;MACpBT,WAAW,CAACU,OAAO,GAAG;QAAEC,OAAO,EAAEP;MAAK,CAAC;MACvCL,gBAAgB,CAAC,IAAI,CAAC;IACxB,CAAC;IAED,oBACER,IAAA,CAACH,gBAAgB;MACfwB,MAAM,EAAEN,WAAW,GAAGO,SAAS,GAAGT,IAAI,CAACQ,MAAO;MAC9CE,IAAI,EAAEV,IAAI,CAACW,GAAI;MACfC,QAAQ,EAAEZ,IAAI,CAACY,QAAS;MACxBC,MAAM,EAAEb,IAAI,CAACa,MAAO;MACpBR,OAAO,EAAEA;IAAQ,CAClB,CAAC;EAEN,CAAC,EACD,CAACT,WAAW,EAAED,gBAAgB,CAChC,CAAC;EAED,oBACER,IAAA,CAACV,QAAQ;IACPqC,GAAG,EAAEjB,OAAQ;IACbkB,IAAI,EAAEC,KAAK,CAACC,IAAI,CAACvB,eAAe,CAAE;IAClCL,KAAK,EAAEC,MAAM,CAAC4B,SAAU;IACxBC,mBAAmB,EAAEpC,kBAAmB;IACxCqC,mBAAmB,EAAE,CAAC,CAAC,CAAE;IACzBC,sBAAsB,EAAEjC,SAAU;IAClCkC,YAAY,EAAEA,CAAC,CAACC,GAAG,CAAC,KAAKA,GAAI;IAC7BxB,UAAU,EAAEA;EAAW,CACxB,CAAC;AAEN;AAEA,MAAMT,MAAM,GAAGZ,UAAU,CAAC8C,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,IAAI,EAAE,CAAC;IACPC,iBAAiB,EAAE;EACrB,CAAC;EACDnC,OAAO,EAAE;IACPoC,MAAM,EAAE,CAAC;IACTC,eAAe,EAAE3C,MAAM,CAAC4C;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
package/lib/module/utils.js
CHANGED
@@ -10,8 +10,9 @@ export const getHttpInterceptorId = () => {
|
|
10
10
|
return timestamp + randomNum;
|
11
11
|
};
|
12
12
|
export const keyValueToString = (key, value) => `${key}: ${limitChar(value)}\n`;
|
13
|
-
export const
|
14
|
-
export const
|
13
|
+
export const formatRequestMethod = method => method ?? 'GET';
|
14
|
+
export const formatRequestDuration = duration => duration ? `${duration}ms` : 'pending';
|
15
|
+
export const formatRequestStatusCode = statusCode => `${statusCode ?? 'pending'}`;
|
15
16
|
export const formatLogMessage = (type, values) => {
|
16
17
|
const message = values.reduce((pre, cur, index, array) => {
|
17
18
|
const isLastItem = index === array.length - 1;
|
package/lib/module/utils.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["limitChar","value","limit","stringValue","JSON","stringify","length","slice","getHttpInterceptorId","timestamp","Date","now","toString","randomNum","Math","random","substring","keyValueToString","key","
|
1
|
+
{"version":3,"names":["limitChar","value","limit","stringValue","JSON","stringify","length","slice","getHttpInterceptorId","timestamp","Date","now","toString","randomNum","Math","random","substring","keyValueToString","key","formatRequestMethod","method","formatRequestDuration","duration","formatRequestStatusCode","statusCode","formatLogMessage","type","values","message","reduce","pre","cur","index","array","isLastItem","toUpperCase","convertToCurl","url","headers","body","curlCommand","Object","entries","bodyString"],"sourceRoot":"../../src","sources":["utils.ts"],"mappings":";;AAEA,OAAO,MAAMA,SAAS,GAAGA,CAACC,KAAU,EAAEC,KAAK,GAAG,IAAI,KAAK;EACrD,MAAMC,WAAW,GAAG,OAAOF,KAAK,KAAK,QAAQ,GAAGA,KAAK,GAAGG,IAAI,CAACC,SAAS,CAACJ,KAAK,IAAI,EAAE,CAAC;EAEnF,OAAOE,WAAW,CAACG,MAAM,GAAGJ,KAAK,GAC7B,GAAGC,WAAW,CAACI,KAAK,CAAC,CAAC,EAAEL,KAAK,CAAC,mBAAmBA,KAAK,gBAAgB,GACtEC,WAAW;AACjB,CAAC;AAED,OAAO,MAAMK,oBAAoB,GAAGA,CAAA,KAAM;EACxC,MAAMC,SAAS,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC;EACzC,MAAMC,SAAS,GAAGC,IAAI,CAACC,MAAM,CAAC,CAAC,CAACH,QAAQ,CAAC,EAAE,CAAC,CAACI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC;EAC7D,OAAOP,SAAS,GAAGI,SAAS;AAC9B,CAAC;AAED,OAAO,MAAMI,gBAAgB,GAAGA,CAACC,GAAW,EAAEjB,KAAU,KACtD,GAAGiB,GAAG,KAAKlB,SAAS,CAACC,KAAK,CAAC,IAAI;AAEjC,OAAO,MAAMkB,mBAAmB,GAAIC,MAAe,IAAKA,MAAM,IAAI,KAAK;AAEvE,OAAO,MAAMC,qBAAqB,GAAIC,QAAiB,IACrDA,QAAQ,GAAG,GAAGA,QAAQ,IAAI,GAAG,SAAS;AAExC,OAAO,MAAMC,uBAAuB,GAAIC,UAAmB,IAAK,GAAGA,UAAU,IAAI,SAAS,EAAE;AAE5F,OAAO,MAAMC,gBAAgB,GAAGA,CAACC,IAAY,EAAEC,MAAa,KAAK;EAC/D,MAAMC,OAAe,GAAGD,MAAM,CAACE,MAAM,CAAC,CAACC,GAAG,EAAEC,GAAG,EAAEC,KAAK,EAAEC,KAAK,KAAK;IAChE,MAAMC,UAAU,GAAGF,KAAK,KAAKC,KAAK,CAAC3B,MAAM,GAAG,CAAC;IAE7C,OAAOwB,GAAG,GAAG9B,SAAS,CAAC+B,GAAG,CAAC,IAAIG,UAAU,GAAG,EAAE,GAAG,IAAI,CAAC;EACxD,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO,GAAGR,IAAI,CAACS,WAAW,CAAC,CAAC,KAAKP,OAAO,EAAE;AAC5C,CAAC;AAED,OAAO,MAAMQ,aAAa,GAAGA,CAC3BhB,MAA6B,EAC7BiB,GAAuB,EACvBC,OAAsC,EACtCC,IAAyB,KACtB;EACH,IAAIC,WAAW,GAAG,WAAWpB,MAAM,CAACe,WAAW,CAAC,CAAC,KAAKE,GAAG,GAAG;EAE5D,IAAIC,OAAO,EAAE;IACX,KAAK,MAAM,CAACpB,GAAG,EAAEjB,KAAK,CAAC,IAAIwC,MAAM,CAACC,OAAO,CAACJ,OAAO,CAAC,EAAE;MAClDE,WAAW,IAAI,QAAQtB,GAAG,KAAKjB,KAAK,GAAG;IACzC;EACF;EAEA,IAAIsC,IAAI,EAAE;IACR,MAAMI,UAAU,GAAG,OAAOJ,IAAI,KAAK,QAAQ,GAAGA,IAAI,GAAGnC,IAAI,CAACC,SAAS,CAACkC,IAAI,CAAC;IACzEC,WAAW,IAAI,QAAQG,UAAU,GAAG;EACtC;EAEA,OAAOH,WAAW;AACpB,CAAC","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/colors.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM;;;;;EAKV,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type MutableRefObject } from 'react';
|
2
2
|
import type { useConsoleInterceptor, useNetworkInterceptor } from '../hooks';
|
3
|
-
import type {
|
3
|
+
import type { DebuggerPanel, DebuggerPosition, DebuggerVisibility, HttpRequest, LogMessage, SetState, WebSocketRequest } from '../types';
|
4
4
|
export interface MainContextValue {
|
5
5
|
debuggerVisibility: DebuggerVisibility;
|
6
6
|
setDebuggerVisibility: SetState<DebuggerVisibility>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MainContext.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/MainContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EACV,
|
1
|
+
{"version":3,"file":"MainContext.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/MainContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,qBAAqB,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACpD,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,mBAAmB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,CAAC;IAChD,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,gBAAgB,EAAE,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACjD,kBAAkB,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC7D,cAAc,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;IACzD,WAAW,EAAE,gBAAgB,CACzB;QAAE,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,UAAU,CAAA;KAAE,GACvC;QAAE,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,WAAW,GAAG,gBAAgB,CAAA;KAAE,GAC3D,IAAI,CACP,CAAC;IACF,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,QAAA,MAAM,WAAW,kDAA+C,CAAC;AAEjE,eAAe,WAAW,CAAC"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import type { LogMessage } from '../types';
|
2
2
|
interface ConsoleInterceptorParams {
|
3
|
-
autoEnabled
|
3
|
+
autoEnabled: boolean;
|
4
4
|
}
|
5
|
-
export default function useConsoleInterceptor(
|
5
|
+
export default function useConsoleInterceptor({ autoEnabled }: ConsoleInterceptorParams): {
|
6
6
|
isInterceptorEnabled: boolean;
|
7
7
|
enableInterception: () => void;
|
8
8
|
disableInterception: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useConsoleInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useConsoleInterceptor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,wBAAwB;IAChC,WAAW,
|
1
|
+
{"version":3,"file":"useConsoleInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useConsoleInterceptor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,wBAAwB;IAChC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,WAAW,EAAE,EAAE,wBAAwB;;;;;;EA8CtF"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
interface NetworkInterceptorParams {
|
2
|
-
autoEnabled
|
2
|
+
autoEnabled: boolean;
|
3
3
|
}
|
4
|
-
export default function useNetworkInterceptor(
|
4
|
+
export default function useNetworkInterceptor({ autoEnabled }: NetworkInterceptorParams): {
|
5
5
|
isInterceptorEnabled: boolean;
|
6
6
|
enableInterception: () => void;
|
7
7
|
disableInterception: () => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNetworkInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useNetworkInterceptor.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"useNetworkInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useNetworkInterceptor.ts"],"names":[],"mappings":"AAwBA,UAAU,wBAAwB;IAChC,WAAW,EAAE,OAAO,CAAC;CACtB;AAMD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,WAAW,EAAE,EAAE,wBAAwB;;;;;;EA4OtF"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../src/icons.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK;;;;;;EAMT,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import Interceptor from './Interceptor';
|
2
2
|
export default class ConsoleInterceptor extends Interceptor {
|
3
|
-
static instance: ConsoleInterceptor;
|
3
|
+
static readonly instance: ConsoleInterceptor;
|
4
4
|
private constructor();
|
5
5
|
private callback;
|
6
6
|
setCallback(callback: typeof this.callback): this;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConsoleInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/ConsoleInterceptor.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,eAAe,CAAC;AAaxC,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,MAAM,CAAC,QAAQ,qBAA4B;
|
1
|
+
{"version":3,"file":"ConsoleInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/ConsoleInterceptor.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,eAAe,CAAC;AAaxC,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,WAAW;IACzD,MAAM,CAAC,QAAQ,CAAC,QAAQ,qBAA4B;IAEpD,OAAO;IAIP,OAAO,CAAC,QAAQ,CAAsD;IAEtE,WAAW,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,QAAQ;IAK1C,kBAAkB,IAAI,IAAI;IAoE1B,mBAAmB,IAAI,IAAI;CAkB5B"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import HttpInterceptor from './HttpInterceptor';
|
2
2
|
export default class FetchInterceptor extends HttpInterceptor {
|
3
|
-
static instance: FetchInterceptor;
|
3
|
+
static readonly instance: FetchInterceptor;
|
4
4
|
private constructor();
|
5
5
|
enableInterception(): void;
|
6
6
|
disableInterception(): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FetchInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/FetchInterceptor.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAIhD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,eAAe;IAC3D,MAAM,CAAC,QAAQ,mBAA0B;
|
1
|
+
{"version":3,"file":"FetchInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/FetchInterceptor.ts"],"names":[],"mappings":"AAGA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAIhD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,eAAe;IAC3D,MAAM,CAAC,QAAQ,CAAC,QAAQ,mBAA0B;IAElD,OAAO;IAIP,kBAAkB;IAkHlB,mBAAmB;CASpB"}
|
@@ -16,7 +16,7 @@ export default abstract class HttpInterceptor extends NetworkInterceptor {
|
|
16
16
|
requestHeaderCallback: ((id: import("../types").ID, header: string, value: string) => void) | undefined;
|
17
17
|
sendCallback: ((id: import("../types").ID, data?: any) => void) | undefined;
|
18
18
|
headerReceivedCallback: ((id: import("../types").ID, responseContentType: string | undefined, responseSize: number | undefined, responseHeaders: string) => void) | undefined;
|
19
|
-
responseCallback: ((id: import("../types").ID, status: number | undefined, timeout: number | undefined, response: any, responseURL: string | undefined, responseType: string | undefined) => void) | undefined;
|
19
|
+
responseCallback: ((id: import("../types").ID, status: number | undefined, timeout: number | undefined, duration: number, response: any, responseURL: string | undefined, responseType: string | undefined) => void) | undefined;
|
20
20
|
};
|
21
21
|
protected clearCallbacks(): void;
|
22
22
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Interceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/Interceptor.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,WAAW;
|
1
|
+
{"version":3,"file":"Interceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/Interceptor.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,WAAW;;IAGvC,IAAI,oBAAoB,IAIkB,OAAO,CAFhD;IAED,SAAS,KAAK,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAEhD;IAED,QAAQ,CAAC,kBAAkB,IAAI,IAAI;IACnC,QAAQ,CAAC,mBAAmB,IAAI,IAAI;CACrC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { NetworkInterceptor } from './NetworkInterceptor';
|
2
2
|
export default class WebSocketInterceptor extends NetworkInterceptor {
|
3
|
-
static instance: WebSocketInterceptor;
|
3
|
+
static readonly instance: WebSocketInterceptor;
|
4
4
|
private constructor();
|
5
5
|
private connectCallback;
|
6
6
|
private sendCallback;
|
@@ -17,14 +17,15 @@ export default class WebSocketInterceptor extends NetworkInterceptor {
|
|
17
17
|
setOnErrorCallback(callback: typeof this.onErrorCallback): this;
|
18
18
|
setOnCloseCallback(callback: typeof this.onCloseCallback): this;
|
19
19
|
protected getCallbacks(): {
|
20
|
-
connectCallback: ((
|
20
|
+
connectCallback: ((url: string, protocols?: import("../types").WebSocketRequest["protocols"], options?: import("../types").WebSocketRequest["options"], socketId?: number) => void) | undefined;
|
21
21
|
sendCallback: ((data: string, socketId: number) => void) | undefined;
|
22
|
-
closeCallback: ((code:
|
22
|
+
closeCallback: ((code: number, reason: string, socketId: number) => void) | undefined;
|
23
23
|
arrayBufferToString: (data?: string) => string;
|
24
24
|
};
|
25
25
|
protected clearCallbacks(): void;
|
26
26
|
private eventEmitter;
|
27
27
|
private subscriptions;
|
28
|
+
private readonly timeStart;
|
28
29
|
private arrayBufferToString;
|
29
30
|
private registerEvents;
|
30
31
|
private unregisterEvents;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WebSocketInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/WebSocketInterceptor.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAO1D,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,kBAAkB;IAClE,MAAM,CAAC,QAAQ,uBAA8B;
|
1
|
+
{"version":3,"file":"WebSocketInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/WebSocketInterceptor.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAO1D,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,kBAAkB;IAClE,MAAM,CAAC,QAAQ,CAAC,QAAQ,uBAA8B;IAEtD,OAAO;IAIP,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,YAAY,CAA+B;IACnD,OAAO,CAAC,aAAa,CAAgC;IACrD,OAAO,CAAC,cAAc,CAAiC;IACvD,OAAO,CAAC,iBAAiB,CAAoC;IAC7D,OAAO,CAAC,eAAe,CAAkC;IACzD,OAAO,CAAC,eAAe,CAAkC;IAEzD,kBAAkB,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,eAAe;IAKxD,eAAe,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,YAAY;IAKlD,gBAAgB,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,aAAa;IAKpD,iBAAiB,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,cAAc;IAKtD,oBAAoB,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,iBAAiB;IAK5D,kBAAkB,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,eAAe;IAKxD,kBAAkB,CAAC,QAAQ,EAAE,OAAO,IAAI,CAAC,eAAe;IAKxD,SAAS,CAAC,YAAY;;;;qCA4Ba,MAAM;;IAdzC,SAAS,CAAC,cAAc,IAAI,IAAI;IAUhC,OAAO,CAAC,YAAY,CAAmC;IACvD,OAAO,CAAC,aAAa,CAA6B;IAClD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkC;IAE5D,OAAO,CAAC,mBAAmB;IAc3B,OAAO,CAAC,cAAc;IA2BtB,OAAO,CAAC,gBAAgB;IAMxB,kBAAkB,IAAI,IAAI;IAwC1B,mBAAmB,IAAI,IAAI;CAc5B"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import HttpInterceptor from './HttpInterceptor';
|
2
2
|
export default class XHRInterceptor extends HttpInterceptor {
|
3
|
-
static instance: XHRInterceptor;
|
3
|
+
static readonly instance: XHRInterceptor;
|
4
4
|
private constructor();
|
5
5
|
enableInterception(): void;
|
6
6
|
disableInterception(): void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"XHRInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/XHRInterceptor.ts"],"names":[],"mappings":"AAEA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAMhD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,eAAe;IACzD,MAAM,CAAC,QAAQ,iBAAwB;
|
1
|
+
{"version":3,"file":"XHRInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/XHRInterceptor.ts"],"names":[],"mappings":"AAEA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAMhD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,eAAe;IACzD,MAAM,CAAC,QAAQ,CAAC,QAAQ,iBAAwB;IAEhD,OAAO;IAIP,kBAAkB;IA4ElB,mBAAmB;CAWpB"}
|
@@ -10,7 +10,9 @@ export declare enum DebuggerPanel {
|
|
10
10
|
}
|
11
11
|
export type ID = string | undefined;
|
12
12
|
export interface NetworkRequest {
|
13
|
+
url: string;
|
13
14
|
status?: number;
|
15
|
+
duration?: number;
|
14
16
|
}
|
15
17
|
export type DebuggerVisibility = 'hidden' | 'bubble' | 'panel';
|
16
18
|
export type DebuggerPosition = 'top' | 'bottom';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtD,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,EAAE,OAAO;CACV;AAED,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;AAEpC,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtD,oBAAY,WAAW;IACrB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,EAAE,OAAO;CACV;AAED,oBAAY,aAAa;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAAC;AAEpC,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/D,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEhD,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,uBAAuB,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,CAAC"}
|
@@ -2,7 +2,6 @@ import type { ID, NetworkRequest, NetworkType } from './common';
|
|
2
2
|
export interface HttpRequest extends NetworkRequest {
|
3
3
|
type: NetworkType.Fetch | NetworkType.XHR;
|
4
4
|
method: string;
|
5
|
-
url: string;
|
6
5
|
requestHeaders?: Record<string, string>;
|
7
6
|
requestHeadersString?: string;
|
8
7
|
body?: any;
|
@@ -17,5 +16,5 @@ export type HttpOpenCallback = ((id: ID, type: HttpRequest['type'], method: stri
|
|
17
16
|
export type HttpRequestHeaderCallback = ((id: ID, header: string, value: string) => void) | null;
|
18
17
|
export type HttpSendCallback = ((id: ID, data?: any) => void) | null;
|
19
18
|
export type HttpHeaderReceivedCallback = ((id: ID, responseContentType: string | undefined, responseSize: number | undefined, responseHeaders: string) => void) | null;
|
20
|
-
export type HttpResponseCallback = ((id: ID, status: number | undefined, timeout: number | undefined, response: any, responseURL: string | undefined, responseType: string | undefined) => void) | null;
|
19
|
+
export type HttpResponseCallback = ((id: ID, status: number | undefined, timeout: number | undefined, duration: number, response: any, responseURL: string | undefined, responseType: string | undefined) => void) | null;
|
21
20
|
//# sourceMappingURL=http.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../../src/types/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEhE,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,IAAI,EAAE,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../../src/types/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEhE,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,IAAI,EAAE,WAAW,CAAC,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,MAAM,gBAAgB,GACxB,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAC1E,IAAI,CAAC;AAET,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;AAEjG,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC;AAErE,MAAM,MAAM,0BAA0B,GAClC,CAAC,CACC,EAAE,EAAE,EAAE,EACN,mBAAmB,EAAE,MAAM,GAAG,SAAS,EACvC,YAAY,EAAE,MAAM,GAAG,SAAS,EAChC,eAAe,EAAE,MAAM,KACpB,IAAI,CAAC,GACV,IAAI,CAAC;AAET,MAAM,MAAM,oBAAoB,GAC5B,CAAC,CACC,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,EACb,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,YAAY,EAAE,MAAM,GAAG,SAAS,KAC7B,IAAI,CAAC,GACV,IAAI,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|