react-native-xenon 0.4.1 → 0.5.0
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/LICENSE +1 -1
- package/lib/commonjs/assets/icons/arrow-left.png +0 -0
- package/lib/commonjs/assets/icons/beautify.png +0 -0
- package/lib/commonjs/assets/icons/share.png +0 -0
- package/lib/commonjs/core/utils.js +49 -14
- package/lib/commonjs/core/utils.js.map +1 -1
- package/lib/commonjs/hooks/useNetworkInterceptor.js +5 -4
- package/lib/commonjs/hooks/useNetworkInterceptor.js.map +1 -1
- package/lib/commonjs/interceptors/FetchInterceptor.js +1 -1
- package/lib/commonjs/interceptors/FetchInterceptor.js.map +1 -1
- package/lib/commonjs/theme/colors.js +1 -0
- package/lib/commonjs/theme/colors.js.map +1 -1
- package/lib/commonjs/theme/icons.js +4 -1
- package/lib/commonjs/theme/icons.js.map +1 -1
- package/lib/commonjs/types/common.js.map +1 -1
- package/lib/commonjs/ui/Xenon.js +92 -110
- package/lib/commonjs/ui/Xenon.js.map +1 -1
- package/lib/commonjs/ui/components/details/DetailsViewer.js +11 -7
- package/lib/commonjs/ui/components/details/DetailsViewer.js.map +1 -1
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js +55 -60
- package/lib/commonjs/ui/components/details/NetworkRequestDetails.js.map +1 -1
- package/lib/commonjs/ui/components/headers/DebuggerHeader.js +139 -73
- package/lib/commonjs/ui/components/headers/DebuggerHeader.js.map +1 -1
- package/lib/commonjs/ui/components/headers/NetworkPanelHeader.js +3 -3
- package/lib/commonjs/ui/components/headers/NetworkPanelHeader.js.map +1 -1
- package/lib/commonjs/ui/components/items/DebuggerHeaderItem.js +4 -4
- package/lib/commonjs/ui/components/items/DebuggerHeaderItem.js.map +1 -1
- package/lib/commonjs/ui/components/items/NetworkPanelItem.js +4 -4
- package/lib/commonjs/ui/components/items/NetworkPanelItem.js.map +1 -1
- package/lib/commonjs/ui/components/panels/ConsolePanel.js +8 -5
- package/lib/commonjs/ui/components/panels/ConsolePanel.js.map +1 -1
- package/lib/commonjs/ui/components/panels/NetworkPanel.js +6 -4
- package/lib/commonjs/ui/components/panels/NetworkPanel.js.map +1 -1
- package/lib/module/assets/icons/arrow-left.png +0 -0
- package/lib/module/assets/icons/beautify.png +0 -0
- package/lib/module/assets/icons/share.png +0 -0
- package/lib/module/core/utils.js +49 -14
- package/lib/module/core/utils.js.map +1 -1
- package/lib/module/hooks/useNetworkInterceptor.js +5 -4
- package/lib/module/hooks/useNetworkInterceptor.js.map +1 -1
- package/lib/module/interceptors/FetchInterceptor.js +1 -1
- package/lib/module/interceptors/FetchInterceptor.js.map +1 -1
- package/lib/module/theme/colors.js +1 -0
- package/lib/module/theme/colors.js.map +1 -1
- package/lib/module/theme/icons.js +4 -1
- package/lib/module/theme/icons.js.map +1 -1
- package/lib/module/types/common.js.map +1 -1
- package/lib/module/ui/Xenon.js +92 -110
- package/lib/module/ui/Xenon.js.map +1 -1
- package/lib/module/ui/components/details/DetailsViewer.js +11 -7
- package/lib/module/ui/components/details/DetailsViewer.js.map +1 -1
- package/lib/module/ui/components/details/NetworkRequestDetails.js +55 -60
- package/lib/module/ui/components/details/NetworkRequestDetails.js.map +1 -1
- package/lib/module/ui/components/headers/DebuggerHeader.js +139 -73
- package/lib/module/ui/components/headers/DebuggerHeader.js.map +1 -1
- package/lib/module/ui/components/headers/NetworkPanelHeader.js +3 -3
- package/lib/module/ui/components/headers/NetworkPanelHeader.js.map +1 -1
- package/lib/module/ui/components/items/DebuggerHeaderItem.js +4 -4
- package/lib/module/ui/components/items/DebuggerHeaderItem.js.map +1 -1
- package/lib/module/ui/components/items/NetworkPanelItem.js +4 -4
- package/lib/module/ui/components/items/NetworkPanelItem.js.map +1 -1
- package/lib/module/ui/components/panels/ConsolePanel.js +8 -5
- package/lib/module/ui/components/panels/ConsolePanel.js.map +1 -1
- package/lib/module/ui/components/panels/NetworkPanel.js +6 -4
- package/lib/module/ui/components/panels/NetworkPanel.js.map +1 -1
- 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/core/utils.d.ts +14 -4
- package/lib/typescript/commonjs/src/core/utils.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/hooks/useNetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/interceptors/FetchInterceptor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/colors.d.ts +1 -0
- package/lib/typescript/commonjs/src/theme/colors.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/theme/icons.d.ts +3 -0
- package/lib/typescript/commonjs/src/theme/icons.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/types/common.d.ts +13 -1
- package/lib/typescript/commonjs/src/types/common.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/Xenon.d.ts +12 -15
- package/lib/typescript/commonjs/src/ui/Xenon.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/details/DetailsViewer.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 +1 -5
- package/lib/typescript/commonjs/src/ui/components/headers/DebuggerHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/ui/components/items/DebuggerHeaderItem.d.ts +2 -1
- package/lib/typescript/commonjs/src/ui/components/items/DebuggerHeaderItem.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/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/core/utils.d.ts +14 -4
- package/lib/typescript/module/src/core/utils.d.ts.map +1 -1
- package/lib/typescript/module/src/hooks/useNetworkInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/interceptors/FetchInterceptor.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/colors.d.ts +1 -0
- package/lib/typescript/module/src/theme/colors.d.ts.map +1 -1
- package/lib/typescript/module/src/theme/icons.d.ts +3 -0
- package/lib/typescript/module/src/theme/icons.d.ts.map +1 -1
- package/lib/typescript/module/src/types/common.d.ts +13 -1
- package/lib/typescript/module/src/types/common.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/Xenon.d.ts +12 -15
- package/lib/typescript/module/src/ui/Xenon.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/details/DetailsViewer.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 +1 -5
- package/lib/typescript/module/src/ui/components/headers/DebuggerHeader.d.ts.map +1 -1
- package/lib/typescript/module/src/ui/components/items/DebuggerHeaderItem.d.ts +2 -1
- package/lib/typescript/module/src/ui/components/items/DebuggerHeaderItem.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/package.json +1 -1
- package/src/assets/icons/arrow-left.png +0 -0
- package/src/assets/icons/beautify.png +0 -0
- package/src/assets/icons/share.png +0 -0
- package/src/contexts/MainContext.ts +1 -1
- package/src/core/utils.ts +56 -17
- package/src/hooks/useNetworkInterceptor.ts +17 -4
- package/src/interceptors/FetchInterceptor.ts +5 -1
- package/src/theme/colors.ts +1 -0
- package/src/theme/icons.ts +3 -0
- package/src/types/common.ts +17 -1
- package/src/ui/Xenon.tsx +78 -107
- package/src/ui/components/details/DetailsViewer.tsx +9 -7
- package/src/ui/components/details/NetworkRequestDetails.tsx +87 -74
- package/src/ui/components/headers/DebuggerHeader.tsx +199 -91
- package/src/ui/components/headers/NetworkPanelHeader.tsx +3 -3
- package/src/ui/components/items/DebuggerHeaderItem.tsx +3 -4
- package/src/ui/components/items/NetworkPanelItem.tsx +4 -4
- package/src/ui/components/panels/ConsolePanel.tsx +8 -4
- package/src/ui/components/panels/NetworkPanel.tsx +13 -3
- package/lib/commonjs/core/data.js +0 -10
- package/lib/commonjs/core/data.js.map +0 -1
- package/lib/commonjs/ui/components/headers/NetworkRequestDetailsHeader.js +0 -64
- package/lib/commonjs/ui/components/headers/NetworkRequestDetailsHeader.js.map +0 -1
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsHeaderItem.js +0 -48
- package/lib/commonjs/ui/components/items/NetworkRequestDetailsHeaderItem.js.map +0 -1
- package/lib/module/core/data.js +0 -10
- package/lib/module/core/data.js.map +0 -1
- package/lib/module/ui/components/headers/NetworkRequestDetailsHeader.js +0 -64
- package/lib/module/ui/components/headers/NetworkRequestDetailsHeader.js.map +0 -1
- package/lib/module/ui/components/items/NetworkRequestDetailsHeaderItem.js +0 -48
- package/lib/module/ui/components/items/NetworkRequestDetailsHeaderItem.js.map +0 -1
- package/lib/typescript/commonjs/src/core/data.d.ts +0 -10
- package/lib/typescript/commonjs/src/core/data.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/headers/NetworkRequestDetailsHeader.d.ts +0 -13
- package/lib/typescript/commonjs/src/ui/components/headers/NetworkRequestDetailsHeader.d.ts.map +0 -1
- package/lib/typescript/commonjs/src/ui/components/items/NetworkRequestDetailsHeaderItem.d.ts +0 -9
- package/lib/typescript/commonjs/src/ui/components/items/NetworkRequestDetailsHeaderItem.d.ts.map +0 -1
- package/lib/typescript/module/src/core/data.d.ts +0 -10
- package/lib/typescript/module/src/core/data.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/headers/NetworkRequestDetailsHeader.d.ts +0 -13
- package/lib/typescript/module/src/ui/components/headers/NetworkRequestDetailsHeader.d.ts.map +0 -1
- package/lib/typescript/module/src/ui/components/items/NetworkRequestDetailsHeaderItem.d.ts +0 -9
- package/lib/typescript/module/src/ui/components/items/NetworkRequestDetailsHeaderItem.d.ts.map +0 -1
- package/src/core/data.ts +0 -12
- package/src/ui/components/headers/NetworkRequestDetailsHeader.tsx +0 -90
- package/src/ui/components/items/NetworkRequestDetailsHeaderItem.tsx +0 -49
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../../src/theme/icons.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../../src/theme/icons.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK;;;;;;;;;EAST,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { HttpRequest, LogMessage, WebSocketRequest } from '.';
|
1
2
|
export declare enum NetworkType {
|
2
3
|
XHR = "xhr",
|
3
4
|
Fetch = "fetch",
|
@@ -14,10 +15,21 @@ export interface NetworkRequest {
|
|
14
15
|
status?: number;
|
15
16
|
duration?: number;
|
16
17
|
}
|
17
|
-
export type
|
18
|
+
export type DetailTab = 'overview' | 'headers' | 'request' | 'response' | 'messages' | 'logMessage';
|
18
19
|
export interface DebuggerState {
|
19
20
|
visibility: 'hidden' | 'bubble' | 'panel';
|
20
21
|
position: 'top' | 'bottom';
|
21
22
|
selectedPanel: DebuggerPanel | null;
|
23
|
+
detailsData: {
|
24
|
+
type: DebuggerPanel.Network;
|
25
|
+
data: HttpRequest | WebSocketRequest;
|
26
|
+
selectedTab: Exclude<DetailTab, 'logMessage'>;
|
27
|
+
beautified: boolean;
|
28
|
+
} | {
|
29
|
+
type: DebuggerPanel.Console;
|
30
|
+
data: LogMessage;
|
31
|
+
selectedTab: Extract<DetailTab, 'logMessage'>;
|
32
|
+
beautified: boolean;
|
33
|
+
} | null;
|
22
34
|
}
|
23
35
|
//# sourceMappingURL=common.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,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,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAElD,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,UAAU,GAAG,SAAS,GAAG,
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAEnE,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,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAElD,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,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AAEpG,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC1C,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC3B,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,WAAW,EACP;QACE,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,WAAW,GAAG,gBAAgB,CAAC;QACrC,WAAW,EAAE,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAC9C,UAAU,EAAE,OAAO,CAAC;KACrB,GACD;QACE,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,UAAU,CAAC;QACjB,WAAW,EAAE,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAC9C,UAAU,EAAE,OAAO,CAAC;KACrB,GACD,IAAI,CAAC;CACV"}
|
@@ -1,18 +1,15 @@
|
|
1
|
-
|
2
|
-
interface
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
declare namespace Xenon {
|
2
|
+
interface Props {
|
3
|
+
autoInspectNetworkEnabled?: boolean;
|
4
|
+
autoInspectConsoleEnabled?: boolean;
|
5
|
+
bubbleSize?: number;
|
6
|
+
idleBubbleOpacity?: number;
|
7
|
+
}
|
8
|
+
export const isVisible: () => boolean;
|
9
|
+
export const show: () => void;
|
10
|
+
export const hide: () => void;
|
11
|
+
export const Component: import("react").MemoExoticComponent<({ autoInspectNetworkEnabled, autoInspectConsoleEnabled, bubbleSize, idleBubbleOpacity, }: Props) => import("react/jsx-runtime").JSX.Element>;
|
12
|
+
export {};
|
6
13
|
}
|
7
|
-
interface XenonComponentProps {
|
8
|
-
autoInspectNetworkEnabled?: boolean;
|
9
|
-
autoInspectConsoleEnabled?: boolean;
|
10
|
-
bubbleSize?: number;
|
11
|
-
idleBubbleOpacity?: number;
|
12
|
-
}
|
13
|
-
interface ReactNativeXenon extends XenonComponentMethods {
|
14
|
-
Component: NamedExoticComponent<XenonComponentProps>;
|
15
|
-
}
|
16
|
-
declare const Xenon: ReactNativeXenon;
|
17
14
|
export default Xenon;
|
18
15
|
//# sourceMappingURL=Xenon.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Xenon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Xenon.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Xenon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Xenon.tsx"],"names":[],"mappings":"AAYA,kBAAU,KAAK,CAAC;IAOd,UAAU,KAAK;QACb,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B;IA2GD,MAAM,CAAC,MAAM,SAAS,eAA0C,CAAC;IACjE,MAAM,CAAC,MAAM,IAAI,QAAO,IAA2B,CAAC;IACpD,MAAM,CAAC,MAAM,IAAI,QAAO,IAA2B,CAAC;IAEpD,MAAM,CAAC,MAAM,SAAS,iIAtFnB,KAAK,6CAsF+B,CAAC;;CAEzC;AAED,eAAe,KAAK,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DetailsViewer.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/DetailsViewer.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"DetailsViewer.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/DetailsViewer.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,aAAa,mDAYpC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkRequestDetails.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/NetworkRequestDetails.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"NetworkRequestDetails.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/NetworkRequestDetails.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAkB,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGzF,UAAU,0BAA0B;IAClC,IAAI,EAAE,WAAW,GAAG,gBAAgB,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE,0BAA0B,2CAiIjF"}
|
@@ -1,6 +1,2 @@
|
|
1
|
-
|
2
|
-
detailsShown: boolean;
|
3
|
-
}
|
4
|
-
export default function DebuggerHeader({ detailsShown }: DebuggerHeaderProps): import("react/jsx-runtime").JSX.Element;
|
5
|
-
export {};
|
1
|
+
export default function DebuggerHeader(): import("react/jsx-runtime").JSX.Element;
|
6
2
|
//# sourceMappingURL=DebuggerHeader.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DebuggerHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/headers/DebuggerHeader.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"DebuggerHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/headers/DebuggerHeader.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,UAAU,cAAc,4CAsNrC"}
|
@@ -3,8 +3,9 @@ interface DebuggerHeaderItemProps {
|
|
3
3
|
content?: ImageRequireSource | string;
|
4
4
|
isLabel?: boolean;
|
5
5
|
isActive?: boolean;
|
6
|
+
activeColor?: string;
|
6
7
|
onPress: () => void;
|
7
8
|
}
|
8
|
-
export default function DebuggerHeaderItem({ content, isLabel, isActive, onPress, }: DebuggerHeaderItemProps): import("react/jsx-runtime").JSX.Element;
|
9
|
+
export default function DebuggerHeaderItem({ content, isLabel, isActive, activeColor, onPress, }: DebuggerHeaderItemProps): import("react/jsx-runtime").JSX.Element;
|
9
10
|
export {};
|
10
11
|
//# sourceMappingURL=DebuggerHeaderItem.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DebuggerHeaderItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/items/DebuggerHeaderItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlG,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,GACR,EAAE,uBAAuB,2CAuBzB"}
|
1
|
+
{"version":3,"file":"DebuggerHeaderItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/items/DebuggerHeaderItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlG,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,OAAO,EACP,OAAO,EACP,QAAQ,EACR,WAAwB,EACxB,OAAO,GACR,EAAE,uBAAuB,2CAuBzB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConsolePanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/panels/ConsolePanel.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"ConsolePanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/panels/ConsolePanel.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,UAAU,YAAY,4CAoCnC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/panels/NetworkPanel.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"NetworkPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/panels/NetworkPanel.tsx"],"names":[],"mappings":"AAgBA,MAAM,CAAC,OAAO,UAAU,YAAY,4CA4CnC"}
|
@@ -5,7 +5,7 @@ interface MainContextValue {
|
|
5
5
|
debuggerState: DebuggerState;
|
6
6
|
setDebuggerState: Updater<DebuggerState>;
|
7
7
|
networkInterceptor: ReturnType<typeof useNetworkInterceptor>;
|
8
|
-
|
8
|
+
consoleInterceptor: ReturnType<typeof useConsoleInterceptor>;
|
9
9
|
}
|
10
10
|
declare const MainContext: import("react").Context<MainContextValue | null>;
|
11
11
|
export default MainContext;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MainContext.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/MainContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,gBAAgB;IACxB,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACzC,kBAAkB,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC7D,
|
1
|
+
{"version":3,"file":"MainContext.d.ts","sourceRoot":"","sources":["../../../../../src/contexts/MainContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,gBAAgB;IACxB,aAAa,EAAE,aAAa,CAAC;IAC7B,gBAAgB,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACzC,kBAAkB,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAC7D,kBAAkB,EAAE,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;CAC9D;AAED,QAAA,MAAM,WAAW,kDAA+C,CAAC;AAEjE,eAAe,WAAW,CAAC"}
|
@@ -1,13 +1,23 @@
|
|
1
|
-
import type
|
1
|
+
import { type HttpRequest, type WebSocketRequest } from '../types';
|
2
|
+
export declare const getNetworkUtils: (data: HttpRequest | WebSocketRequest) => {
|
3
|
+
isHttp: boolean;
|
4
|
+
requestUrl: URL;
|
5
|
+
overviewShown: boolean;
|
6
|
+
headersShown: boolean;
|
7
|
+
requestShown: boolean;
|
8
|
+
responseShown: boolean;
|
9
|
+
messagesShown: boolean;
|
10
|
+
};
|
2
11
|
export declare const getVerticalSafeMargin: (screenHeight: number) => number;
|
3
|
-
export declare const limitChar: (value: any, limit?: number) => string;
|
4
|
-
export declare const getHttpInterceptorId: () => string;
|
5
12
|
export declare const clamp: (value: number, min: number, max: number) => number;
|
6
|
-
export declare const
|
13
|
+
export declare const getHttpInterceptorId: () => string;
|
14
|
+
export declare const limitChar: (value: any, limit?: number) => string;
|
15
|
+
export declare const keyValueToString: (key: string, value: any, newLine?: "leading" | "trailing" | null) => string;
|
7
16
|
export declare const formatRequestMethod: (method?: string) => string;
|
8
17
|
export declare const formatRequestDuration: (duration?: number) => string;
|
9
18
|
export declare const formatRequestStatusCode: (statusCode?: number) => string;
|
10
19
|
export declare const formatLogMessage: (type: string, values: any[]) => string;
|
20
|
+
export declare const beautify: (data: any, beautified: boolean) => string;
|
11
21
|
export declare const convertToCurl: (method: HttpRequest["method"], url: HttpRequest["url"], headers: HttpRequest["requestHeaders"], body: HttpRequest["body"]) => string;
|
12
22
|
export declare function frozen(_target: Object): void;
|
13
23
|
export declare function singleton<T extends {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/core/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEhF,eAAO,MAAM,eAAe,SAAU,WAAW,GAAG,gBAAgB;;;;;;;;CAmBnE,CAAC;AAGF,eAAO,MAAM,qBAAqB,iBAAkB,MAAM,WAAqB,CAAC;AAEhF,eAAO,MAAM,KAAK,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,WACxB,CAAC;AAEtC,eAAO,MAAM,oBAAoB,cAIhC,CAAC;AAIF,eAAO,MAAM,SAAS,UAAW,GAAG,2BAMnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,QACtB,MAAM,SACJ,GAAG,YACD,SAAS,GAAG,UAAU,GAAG,IAAI,KACrC,MACqG,CAAC;AAEzG,eAAO,MAAM,mBAAmB,YAAa,MAAM,WAAoB,CAAC;AAExE,eAAO,MAAM,qBAAqB,cAAe,MAAM,WACf,CAAC;AAEzC,eAAO,MAAM,uBAAuB,gBAAiB,MAAM,WAAiC,CAAC;AAE7F,eAAO,MAAM,gBAAgB,SAAU,MAAM,UAAU,GAAG,EAAE,WAO3D,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAU,GAAG,cAAc,OAAO,WAOtD,CAAC;AAEF,eAAO,MAAM,aAAa,WAChB,WAAW,CAAC,QAAQ,CAAC,OACxB,WAAW,CAAC,KAAK,CAAC,WACd,WAAW,CAAC,gBAAgB,CAAC,QAChC,WAAW,CAAC,MAAM,CAAC,WAgB1B,CAAC;AAIF,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,QAIrC;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS;IAAE,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;CAAE,EAAE,WAAW,EAAE,CAAC;kBAIvD,GAAG,EAAE;;MAS7B"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useNetworkInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useNetworkInterceptor.ts"],"names":[],"mappings":"AAcA,UAAU,wBAAwB;IAChC,WAAW,EAAE,OAAO,CAAC;CACtB;AAUD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,WAAW,EAAE,EAAE,wBAAwB;;;;;;
|
1
|
+
{"version":3,"file":"useNetworkInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useNetworkInterceptor.ts"],"names":[],"mappings":"AAcA,UAAU,wBAAwB;IAChC,WAAW,EAAE,OAAO,CAAC;CACtB;AAUD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,WAAW,EAAE,EAAE,wBAAwB;;;;;;EA4PtF"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FetchInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/FetchInterceptor.ts"],"names":[],"mappings":"AASA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAKhD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,eAAe;IAE3D,kBAAkB;
|
1
|
+
{"version":3,"file":"FetchInterceptor.d.ts","sourceRoot":"","sources":["../../../../../src/interceptors/FetchInterceptor.ts"],"names":[],"mappings":"AASA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAKhD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,eAAe;IAE3D,kBAAkB;IAmHlB,mBAAmB;CASpB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../../src/theme/colors.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../../src/theme/colors.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,MAAM;;;;;;EAMV,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../../src/theme/icons.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../../../src/theme/icons.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,KAAK;;;;;;;;;EAST,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { HttpRequest, LogMessage, WebSocketRequest } from '.';
|
1
2
|
export declare enum NetworkType {
|
2
3
|
XHR = "xhr",
|
3
4
|
Fetch = "fetch",
|
@@ -14,10 +15,21 @@ export interface NetworkRequest {
|
|
14
15
|
status?: number;
|
15
16
|
duration?: number;
|
16
17
|
}
|
17
|
-
export type
|
18
|
+
export type DetailTab = 'overview' | 'headers' | 'request' | 'response' | 'messages' | 'logMessage';
|
18
19
|
export interface DebuggerState {
|
19
20
|
visibility: 'hidden' | 'bubble' | 'panel';
|
20
21
|
position: 'top' | 'bottom';
|
21
22
|
selectedPanel: DebuggerPanel | null;
|
23
|
+
detailsData: {
|
24
|
+
type: DebuggerPanel.Network;
|
25
|
+
data: HttpRequest | WebSocketRequest;
|
26
|
+
selectedTab: Exclude<DetailTab, 'logMessage'>;
|
27
|
+
beautified: boolean;
|
28
|
+
} | {
|
29
|
+
type: DebuggerPanel.Console;
|
30
|
+
data: LogMessage;
|
31
|
+
selectedTab: Extract<DetailTab, 'logMessage'>;
|
32
|
+
beautified: boolean;
|
33
|
+
} | null;
|
22
34
|
}
|
23
35
|
//# sourceMappingURL=common.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,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,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAElD,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,UAAU,GAAG,SAAS,GAAG,
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/types/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,GAAG,CAAC;AAEnE,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,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;AAElD,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,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CAAC;AAEpG,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC1C,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC3B,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IACpC,WAAW,EACP;QACE,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,WAAW,GAAG,gBAAgB,CAAC;QACrC,WAAW,EAAE,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAC9C,UAAU,EAAE,OAAO,CAAC;KACrB,GACD;QACE,IAAI,EAAE,aAAa,CAAC,OAAO,CAAC;QAC5B,IAAI,EAAE,UAAU,CAAC;QACjB,WAAW,EAAE,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;QAC9C,UAAU,EAAE,OAAO,CAAC;KACrB,GACD,IAAI,CAAC;CACV"}
|
@@ -1,18 +1,15 @@
|
|
1
|
-
|
2
|
-
interface
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
declare namespace Xenon {
|
2
|
+
interface Props {
|
3
|
+
autoInspectNetworkEnabled?: boolean;
|
4
|
+
autoInspectConsoleEnabled?: boolean;
|
5
|
+
bubbleSize?: number;
|
6
|
+
idleBubbleOpacity?: number;
|
7
|
+
}
|
8
|
+
export const isVisible: () => boolean;
|
9
|
+
export const show: () => void;
|
10
|
+
export const hide: () => void;
|
11
|
+
export const Component: import("react").MemoExoticComponent<({ autoInspectNetworkEnabled, autoInspectConsoleEnabled, bubbleSize, idleBubbleOpacity, }: Props) => import("react/jsx-runtime").JSX.Element>;
|
12
|
+
export {};
|
6
13
|
}
|
7
|
-
interface XenonComponentProps {
|
8
|
-
autoInspectNetworkEnabled?: boolean;
|
9
|
-
autoInspectConsoleEnabled?: boolean;
|
10
|
-
bubbleSize?: number;
|
11
|
-
idleBubbleOpacity?: number;
|
12
|
-
}
|
13
|
-
interface ReactNativeXenon extends XenonComponentMethods {
|
14
|
-
Component: NamedExoticComponent<XenonComponentProps>;
|
15
|
-
}
|
16
|
-
declare const Xenon: ReactNativeXenon;
|
17
14
|
export default Xenon;
|
18
15
|
//# sourceMappingURL=Xenon.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Xenon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Xenon.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Xenon.d.ts","sourceRoot":"","sources":["../../../../../src/ui/Xenon.tsx"],"names":[],"mappings":"AAYA,kBAAU,KAAK,CAAC;IAOd,UAAU,KAAK;QACb,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B;IA2GD,MAAM,CAAC,MAAM,SAAS,eAA0C,CAAC;IACjE,MAAM,CAAC,MAAM,IAAI,QAAO,IAA2B,CAAC;IACpD,MAAM,CAAC,MAAM,IAAI,QAAO,IAA2B,CAAC;IAEpD,MAAM,CAAC,MAAM,SAAS,iIAtFnB,KAAK,6CAsF+B,CAAC;;CAEzC;AAED,eAAe,KAAK,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DetailsViewer.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/DetailsViewer.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"DetailsViewer.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/DetailsViewer.tsx"],"names":[],"mappings":"AAMA,MAAM,CAAC,OAAO,UAAU,aAAa,mDAYpC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkRequestDetails.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/NetworkRequestDetails.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"NetworkRequestDetails.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/details/NetworkRequestDetails.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAkB,KAAK,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGzF,UAAU,0BAA0B;IAClC,IAAI,EAAE,WAAW,GAAG,gBAAgB,CAAC;CACtC;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE,0BAA0B,2CAiIjF"}
|
@@ -1,6 +1,2 @@
|
|
1
|
-
|
2
|
-
detailsShown: boolean;
|
3
|
-
}
|
4
|
-
export default function DebuggerHeader({ detailsShown }: DebuggerHeaderProps): import("react/jsx-runtime").JSX.Element;
|
5
|
-
export {};
|
1
|
+
export default function DebuggerHeader(): import("react/jsx-runtime").JSX.Element;
|
6
2
|
//# sourceMappingURL=DebuggerHeader.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DebuggerHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/headers/DebuggerHeader.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"DebuggerHeader.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/headers/DebuggerHeader.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,UAAU,cAAc,4CAsNrC"}
|
@@ -3,8 +3,9 @@ interface DebuggerHeaderItemProps {
|
|
3
3
|
content?: ImageRequireSource | string;
|
4
4
|
isLabel?: boolean;
|
5
5
|
isActive?: boolean;
|
6
|
+
activeColor?: string;
|
6
7
|
onPress: () => void;
|
7
8
|
}
|
8
|
-
export default function DebuggerHeaderItem({ content, isLabel, isActive, onPress, }: DebuggerHeaderItemProps): import("react/jsx-runtime").JSX.Element;
|
9
|
+
export default function DebuggerHeaderItem({ content, isLabel, isActive, activeColor, onPress, }: DebuggerHeaderItemProps): import("react/jsx-runtime").JSX.Element;
|
9
10
|
export {};
|
10
11
|
//# sourceMappingURL=DebuggerHeaderItem.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DebuggerHeaderItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/items/DebuggerHeaderItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlG,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,GACR,EAAE,uBAAuB,2CAuBzB"}
|
1
|
+
{"version":3,"file":"DebuggerHeaderItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/items/DebuggerHeaderItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAGlG,UAAU,uBAAuB;IAC/B,OAAO,CAAC,EAAE,kBAAkB,GAAG,MAAM,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,OAAO,EACP,OAAO,EACP,QAAQ,EACR,WAAwB,EACxB,OAAO,GACR,EAAE,uBAAuB,2CAuBzB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConsolePanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/panels/ConsolePanel.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"ConsolePanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/panels/ConsolePanel.tsx"],"names":[],"mappings":"AASA,MAAM,CAAC,OAAO,UAAU,YAAY,4CAoCnC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NetworkPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/panels/NetworkPanel.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"NetworkPanel.d.ts","sourceRoot":"","sources":["../../../../../../../src/ui/components/panels/NetworkPanel.tsx"],"names":[],"mappings":"AAgBA,MAAM,CAAC,OAAO,UAAU,YAAY,4CA4CnC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-native-xenon",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.5.0",
|
4
4
|
"description": "A comprehensive tool for analyzing HTTP(S) requests and logs in React Native apps. Designed for use across all environments, it offers an intuitive interface for efficient debugging and issue resolution.",
|
5
5
|
"source": "./src/index.ts",
|
6
6
|
"main": "./lib/commonjs/index.js",
|
Binary file
|
Binary file
|
Binary file
|
@@ -7,7 +7,7 @@ interface MainContextValue {
|
|
7
7
|
debuggerState: DebuggerState;
|
8
8
|
setDebuggerState: Updater<DebuggerState>;
|
9
9
|
networkInterceptor: ReturnType<typeof useNetworkInterceptor>;
|
10
|
-
|
10
|
+
consoleInterceptor: ReturnType<typeof useConsoleInterceptor>;
|
11
11
|
}
|
12
12
|
|
13
13
|
const MainContext = createContext<MainContextValue | null>(null);
|
package/src/core/utils.ts
CHANGED
@@ -1,26 +1,54 @@
|
|
1
|
-
import type
|
1
|
+
import { NetworkType, type HttpRequest, type WebSocketRequest } from '../types';
|
2
|
+
|
3
|
+
export const getNetworkUtils = (data: HttpRequest | WebSocketRequest) => {
|
4
|
+
const isHttp = data?.type !== NetworkType.WS;
|
5
|
+
const requestUrl = new URL(data.url);
|
6
|
+
|
7
|
+
const overviewShown = !!data.url;
|
8
|
+
const headersShown = isHttp && (!!data.requestHeaders || !!data.responseHeaders);
|
9
|
+
const requestShown = isHttp && (!!requestUrl.search || !!data.body);
|
10
|
+
const responseShown = isHttp && !!data.response;
|
11
|
+
const messagesShown = !isHttp && !!data.messages;
|
12
|
+
|
13
|
+
return {
|
14
|
+
isHttp,
|
15
|
+
requestUrl,
|
16
|
+
overviewShown,
|
17
|
+
headersShown,
|
18
|
+
requestShown,
|
19
|
+
responseShown,
|
20
|
+
messagesShown,
|
21
|
+
};
|
22
|
+
};
|
2
23
|
|
24
|
+
//#region metrics
|
3
25
|
export const getVerticalSafeMargin = (screenHeight: number) => screenHeight / 8;
|
4
26
|
|
5
|
-
export const
|
6
|
-
|
7
|
-
|
8
|
-
return stringValue.length > limit
|
9
|
-
? `${stringValue.slice(0, limit)}\n---LIMITED TO ${limit} CHARACTERS---`
|
10
|
-
: stringValue;
|
11
|
-
};
|
27
|
+
export const clamp = (value: number, min: number, max: number) =>
|
28
|
+
Math.max(min, Math.min(max, value));
|
12
29
|
|
13
30
|
export const getHttpInterceptorId = () => {
|
14
31
|
const timestamp = Date.now().toString(36);
|
15
32
|
const randomNum = Math.random().toString(36).substring(2, 10);
|
16
33
|
return timestamp + randomNum;
|
17
34
|
};
|
35
|
+
//#endregion
|
18
36
|
|
19
|
-
|
20
|
-
|
37
|
+
//#region formatters
|
38
|
+
export const limitChar = (value: any, limit = 5000) => {
|
39
|
+
const stringValue = typeof value === 'string' ? value : JSON.stringify(value ?? '');
|
21
40
|
|
22
|
-
|
23
|
-
|
41
|
+
return stringValue.length > limit
|
42
|
+
? `${stringValue.slice(0, limit)}\n---LIMITED TO ${limit} CHARACTERS---`
|
43
|
+
: stringValue;
|
44
|
+
};
|
45
|
+
|
46
|
+
export const keyValueToString = (
|
47
|
+
key: string,
|
48
|
+
value: any,
|
49
|
+
newLine: 'leading' | 'trailing' | null = 'trailing',
|
50
|
+
): string =>
|
51
|
+
`${newLine === 'leading' ? '\n' : ''}${key}: ${limitChar(value)}${newLine === 'trailing' ? '\n' : ''}`;
|
24
52
|
|
25
53
|
export const formatRequestMethod = (method?: string) => method ?? 'GET';
|
26
54
|
|
@@ -30,15 +58,23 @@ export const formatRequestDuration = (duration?: number) =>
|
|
30
58
|
export const formatRequestStatusCode = (statusCode?: number) => `${statusCode ?? 'pending'}`;
|
31
59
|
|
32
60
|
export const formatLogMessage = (type: string, values: any[]) => {
|
33
|
-
const message: string = values.reduce(
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
}, '');
|
61
|
+
const message: string = values.reduce(
|
62
|
+
(pre, cur, index) => pre + (!index ? '' : ', ') + limitChar(cur),
|
63
|
+
'',
|
64
|
+
);
|
38
65
|
|
39
66
|
return `${type.toUpperCase()}: ${message}`;
|
40
67
|
};
|
41
68
|
|
69
|
+
export const beautify = (data: any, beautified: boolean) => {
|
70
|
+
try {
|
71
|
+
const res = typeof data === 'string' ? JSON.parse(data) : data;
|
72
|
+
return beautified ? JSON.stringify(res, null, 2) : limitChar(res);
|
73
|
+
} catch (error) {
|
74
|
+
return limitChar(data);
|
75
|
+
}
|
76
|
+
};
|
77
|
+
|
42
78
|
export const convertToCurl = (
|
43
79
|
method: HttpRequest['method'],
|
44
80
|
url: HttpRequest['url'],
|
@@ -60,7 +96,9 @@ export const convertToCurl = (
|
|
60
96
|
|
61
97
|
return curlCommand;
|
62
98
|
};
|
99
|
+
//#endregion
|
63
100
|
|
101
|
+
//#region decorators
|
64
102
|
export function frozen(_target: Object) {
|
65
103
|
const descriptor: PropertyDescriptor = arguments[2];
|
66
104
|
descriptor.configurable = false;
|
@@ -81,3 +119,4 @@ export function singleton<T extends { new (...args: any[]): {} }>(constructor: T
|
|
81
119
|
|
82
120
|
return Singleton;
|
83
121
|
}
|
122
|
+
//#endregion
|
@@ -53,10 +53,15 @@ export default function useNetworkInterceptor({ autoEnabled }: NetworkIntercepto
|
|
53
53
|
setNetworkRequests((draft: NetworkRequests<HttpRequest>) => {
|
54
54
|
if (!draft.get(id)) return draft;
|
55
55
|
|
56
|
-
const
|
56
|
+
const requestHeaderNewLine: Parameters<typeof keyValueToString>[2] = draft.get(id)!
|
57
|
+
.requestHeadersString?.length
|
58
|
+
? 'leading'
|
59
|
+
: null;
|
60
|
+
|
61
|
+
const currentHeaderLine = keyValueToString(header, value, requestHeaderNewLine);
|
57
62
|
|
58
63
|
const fetchRequestHeaderLineRegex = RegExp(
|
59
|
-
keyValueToString(NETWORK_REQUEST_HEADER, NetworkType.Fetch),
|
64
|
+
keyValueToString(NETWORK_REQUEST_HEADER, NetworkType.Fetch, requestHeaderNewLine),
|
60
65
|
'gi',
|
61
66
|
);
|
62
67
|
|
@@ -163,7 +168,11 @@ export default function useNetworkInterceptor({ autoEnabled }: NetworkIntercepto
|
|
163
168
|
if (!draft.get(`${socketId}`)) return draft;
|
164
169
|
|
165
170
|
draft.get(`${socketId}`)!.messages ??= '';
|
166
|
-
draft.get(`${socketId}`)!.messages += keyValueToString(
|
171
|
+
draft.get(`${socketId}`)!.messages += keyValueToString(
|
172
|
+
'SENT',
|
173
|
+
data,
|
174
|
+
draft.get(`${socketId}`)!.messages?.length ? 'leading' : null,
|
175
|
+
);
|
167
176
|
});
|
168
177
|
};
|
169
178
|
|
@@ -195,7 +204,11 @@ export default function useNetworkInterceptor({ autoEnabled }: NetworkIntercepto
|
|
195
204
|
if (!draft.get(`${socketId}`)) return draft;
|
196
205
|
|
197
206
|
draft.get(`${socketId}`)!.messages ??= '';
|
198
|
-
draft.get(`${socketId}`)!.messages += keyValueToString(
|
207
|
+
draft.get(`${socketId}`)!.messages += keyValueToString(
|
208
|
+
'RECEIVED',
|
209
|
+
message,
|
210
|
+
draft.get(`${socketId}`)!.messages?.length ? 'leading' : null,
|
211
|
+
);
|
199
212
|
});
|
200
213
|
};
|
201
214
|
|
@@ -97,7 +97,11 @@ export default class FetchInterceptor extends HttpInterceptor {
|
|
97
97
|
let responseHeaders: string = '';
|
98
98
|
|
99
99
|
for (const [headerKey, headerValue] of clonedResponseHeaders.entries()) {
|
100
|
-
responseHeaders += keyValueToString(
|
100
|
+
responseHeaders += keyValueToString(
|
101
|
+
headerKey,
|
102
|
+
headerValue,
|
103
|
+
responseHeaders.length ? 'leading' : null,
|
104
|
+
);
|
101
105
|
}
|
102
106
|
|
103
107
|
headerReceivedCallback?.(interceptionId, responseContentType, responseSize, responseHeaders);
|
package/src/theme/colors.ts
CHANGED
package/src/theme/icons.ts
CHANGED
@@ -4,6 +4,9 @@ const icons = Object.freeze({
|
|
4
4
|
hide: require('../assets/icons/hide.png'),
|
5
5
|
move: require('../assets/icons/move.png'),
|
6
6
|
record: require('../assets/icons/record.png'),
|
7
|
+
share: require('../assets/icons/share.png'),
|
8
|
+
arrowLeft: require('../assets/icons/arrow-left.png'),
|
9
|
+
beautify: require('../assets/icons/beautify.png'),
|
7
10
|
});
|
8
11
|
|
9
12
|
export default icons;
|
package/src/types/common.ts
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
import type { HttpRequest, LogMessage, WebSocketRequest } from '.';
|
2
|
+
|
1
3
|
export enum NetworkType {
|
2
4
|
XHR = 'xhr',
|
3
5
|
Fetch = 'fetch',
|
@@ -19,10 +21,24 @@ export interface NetworkRequest {
|
|
19
21
|
duration?: number;
|
20
22
|
}
|
21
23
|
|
22
|
-
export type
|
24
|
+
export type DetailTab = 'overview' | 'headers' | 'request' | 'response' | 'messages' | 'logMessage';
|
23
25
|
|
24
26
|
export interface DebuggerState {
|
25
27
|
visibility: 'hidden' | 'bubble' | 'panel';
|
26
28
|
position: 'top' | 'bottom';
|
27
29
|
selectedPanel: DebuggerPanel | null;
|
30
|
+
detailsData:
|
31
|
+
| {
|
32
|
+
type: DebuggerPanel.Network;
|
33
|
+
data: HttpRequest | WebSocketRequest;
|
34
|
+
selectedTab: Exclude<DetailTab, 'logMessage'>;
|
35
|
+
beautified: boolean;
|
36
|
+
}
|
37
|
+
| {
|
38
|
+
type: DebuggerPanel.Console;
|
39
|
+
data: LogMessage;
|
40
|
+
selectedTab: Extract<DetailTab, 'logMessage'>;
|
41
|
+
beautified: boolean;
|
42
|
+
}
|
43
|
+
| null;
|
28
44
|
}
|