@rozenite/network-activity-plugin 1.5.1 → 1.7.0-rc.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/CHANGELOG.md +20 -0
- package/README.md +2 -0
- package/dist/{App.html → devtools/App.html} +2 -2
- package/dist/{boot-recording.cjs → react-native/chunks/boot-recording.cjs} +1 -1
- package/dist/{boot-recording.js → react-native/chunks/boot-recording.js} +3 -3
- package/dist/react-native/chunks/boot-recording.require.cjs +5 -0
- package/dist/react-native/chunks/boot-recording.require.js +5 -0
- package/dist/react-native/chunks/useNetworkActivityDevTools.require.cjs +1102 -0
- package/dist/react-native/chunks/useNetworkActivityDevTools.require.js +1102 -0
- package/dist/{react-native.cjs → react-native/index.cjs} +2 -2
- package/dist/react-native/index.d.ts +305 -0
- package/dist/{react-native.js → react-native/index.js} +2 -2
- package/dist/rozenite.json +1 -1
- package/package.json +27 -7
- package/src/react-native/agent/__tests__/network-activity-agent-state.test.ts +250 -0
- package/src/react-native/agent/state.ts +869 -0
- package/src/react-native/agent/tools.ts +146 -0
- package/src/react-native/agent/use-network-activity-agent-tools.ts +244 -0
- package/src/react-native/http/http-inspector.ts +0 -1
- package/src/react-native/useNetworkActivityDevTools.ts +11 -0
- package/tsconfig.json +3 -0
- package/dist/react-native.d.ts +0 -4
- package/dist/rozenite.config.d.ts +0 -7
- package/dist/src/react-native/boot-recording.d.ts +0 -41
- package/dist/src/react-native/config.d.ts +0 -23
- package/dist/src/react-native/events-listener.d.ts +0 -44
- package/dist/src/react-native/http/http-inspector.d.ts +0 -10
- package/dist/src/react-native/http/http-utils.d.ts +0 -15
- package/dist/src/react-native/http/network-requests-registry.d.ts +0 -6
- package/dist/src/react-native/http/overrides-registry.d.ts +0 -6
- package/dist/src/react-native/http/xhr-interceptor.d.ts +0 -44
- package/dist/src/react-native/inspector.d.ts +0 -7
- package/dist/src/react-native/network-inspector.d.ts +0 -16
- package/dist/src/react-native/sse/event-source.d.ts +0 -2
- package/dist/src/react-native/sse/sse-inspector.d.ts +0 -6
- package/dist/src/react-native/sse/sse-interceptor.d.ts +0 -36
- package/dist/src/react-native/sse/types.d.ts +0 -6
- package/dist/src/react-native/useHttpInspector.d.ts +0 -3
- package/dist/src/react-native/useNetworkActivityDevTools.d.ts +0 -3
- package/dist/src/react-native/useSSEInspector.d.ts +0 -3
- package/dist/src/react-native/useWebSocketInspector.d.ts +0 -3
- package/dist/src/react-native/utils/getBlobName.d.ts +0 -35
- package/dist/src/react-native/utils/getFormDataEntries.d.ts +0 -18
- package/dist/src/react-native/utils.d.ts +0 -6
- package/dist/src/react-native/websocket/websocket-inspector.d.ts +0 -6
- package/dist/src/react-native/websocket/websocket-interceptor.d.ts +0 -73
- package/dist/src/shared/client.d.ts +0 -17
- package/dist/src/shared/http-events.d.ts +0 -106
- package/dist/src/shared/sse-events.d.ts +0 -38
- package/dist/src/shared/websocket-events.d.ts +0 -60
- package/dist/src/ui/App.d.ts +0 -1
- package/dist/src/ui/components/Badge.d.ts +0 -9
- package/dist/src/ui/components/Button.d.ts +0 -11
- package/dist/src/ui/components/CodeBlock.d.ts +0 -3
- package/dist/src/ui/components/CodeEditor.d.ts +0 -5
- package/dist/src/ui/components/CookieCard.d.ts +0 -7
- package/dist/src/ui/components/CopyRequestDropdown.d.ts +0 -7
- package/dist/src/ui/components/DropdownMenu.d.ts +0 -27
- package/dist/src/ui/components/FilterBar.d.ts +0 -10
- package/dist/src/ui/components/Input.d.ts +0 -3
- package/dist/src/ui/components/JsonTree.d.ts +0 -5
- package/dist/src/ui/components/JsonTreeCopyableItem.d.ts +0 -7
- package/dist/src/ui/components/KeyValueGrid.d.ts +0 -13
- package/dist/src/ui/components/OverrideResponse.d.ts +0 -8
- package/dist/src/ui/components/RequestBody.d.ts +0 -6
- package/dist/src/ui/components/RequestList.d.ts +0 -30
- package/dist/src/ui/components/ScrollArea.d.ts +0 -5
- package/dist/src/ui/components/Section.d.ts +0 -8
- package/dist/src/ui/components/Separator.d.ts +0 -4
- package/dist/src/ui/components/SidePanel.d.ts +0 -1
- package/dist/src/ui/components/Tabs.d.ts +0 -7
- package/dist/src/ui/components/Toolbar.d.ts +0 -1
- package/dist/src/ui/hooks/useCopyToClipboard.d.ts +0 -4
- package/dist/src/ui/state/derived.d.ts +0 -5
- package/dist/src/ui/state/hooks.d.ts +0 -21
- package/dist/src/ui/state/model.d.ts +0 -113
- package/dist/src/ui/state/store.d.ts +0 -48
- package/dist/src/ui/tabs/CookiesTab.d.ts +0 -5
- package/dist/src/ui/tabs/HeadersTab.d.ts +0 -5
- package/dist/src/ui/tabs/MessagesTab.d.ts +0 -5
- package/dist/src/ui/tabs/RequestTab.d.ts +0 -5
- package/dist/src/ui/tabs/ResponseTab.d.ts +0 -6
- package/dist/src/ui/tabs/SSEMessagesTab.d.ts +0 -5
- package/dist/src/ui/tabs/TimingTab.d.ts +0 -5
- package/dist/src/ui/types.d.ts +0 -26
- package/dist/src/ui/utils/assert.d.ts +0 -1
- package/dist/src/ui/utils/checkRequestBodyBinary.d.ts +0 -2
- package/dist/src/ui/utils/cn.d.ts +0 -2
- package/dist/src/ui/utils/copyToClipboard.d.ts +0 -1
- package/dist/src/ui/utils/escapeShellArg.d.ts +0 -1
- package/dist/src/ui/utils/generateCurlCommand.d.ts +0 -2
- package/dist/src/ui/utils/generateFetchCall.d.ts +0 -2
- package/dist/src/ui/utils/generateMultipartBody.d.ts +0 -4
- package/dist/src/ui/utils/getId.d.ts +0 -1
- package/dist/src/ui/utils/getStatusColor.d.ts +0 -1
- package/dist/src/ui/views/InspectorView.d.ts +0 -5
- package/dist/src/ui/views/LoadingView.d.ts +0 -1
- package/dist/src/utils/applyReactNativeRequestHeadersLogic.d.ts +0 -7
- package/dist/src/utils/applyReactNativeResponseHeadersLogic.d.ts +0 -9
- package/dist/src/utils/cookieParser.d.ts +0 -6
- package/dist/src/utils/getContentTypeMimeType.d.ts +0 -2
- package/dist/src/utils/getHttpHeader.d.ts +0 -5
- package/dist/src/utils/getHttpHeaderValueAsString.d.ts +0 -11
- package/dist/src/utils/getStringSizeInBytes.d.ts +0 -1
- package/dist/src/utils/inferContentTypeFromPostData.d.ts +0 -2
- package/dist/src/utils/safeStringify.d.ts +0 -1
- package/dist/src/utils/typeChecks.d.ts +0 -9
- package/dist/useNetworkActivityDevTools.cjs +0 -171
- package/dist/useNetworkActivityDevTools.js +0 -171
- /package/dist/{assets → devtools/assets}/App-BrSkOkws.css +0 -0
- /package/dist/{assets/App-CGt4qucR.js → devtools/assets/App-pokLiGYV.js} +0 -0
- /package/dist/{event-source.cjs → react-native/chunks/event-source.cjs} +0 -0
- /package/dist/{event-source.js → react-native/chunks/event-source.js} +0 -0
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { default as EventSource, MessageEvent, ErrorEvent, OpenEvent, CloseEvent, TimeoutEvent, ExceptionEvent, CustomEvent } from 'react-native-sse';
|
|
2
|
-
export type SSEInterceptorConnectCallback = (url: string, request: EventSource) => void;
|
|
3
|
-
export type SSEInterceptorMessageCallback = (event: MessageEvent | CustomEvent<string>, request: EventSource) => void;
|
|
4
|
-
export type SSEInterceptorErrorCallback = (error: ErrorEvent | TimeoutEvent | ExceptionEvent, request: EventSource) => void;
|
|
5
|
-
export type SSEInterceptorOpenEventCallback = (event: OpenEvent, request: EventSource) => void;
|
|
6
|
-
export type SSEInterceptorCloseCallback = (event: CloseEvent, request: EventSource) => void;
|
|
7
|
-
/**
|
|
8
|
-
* A network interceptor which monkey-patches EventSource open method
|
|
9
|
-
* to gather all SSE connections and events, in order to show their
|
|
10
|
-
* information in the Network Activity panel.
|
|
11
|
-
*/
|
|
12
|
-
export declare const SSEInterceptor: {
|
|
13
|
-
/**
|
|
14
|
-
* Invoked when EventSource.open() is called (connection attempt starting).
|
|
15
|
-
*/
|
|
16
|
-
setConnectCallback(callback: SSEInterceptorConnectCallback): void;
|
|
17
|
-
/**
|
|
18
|
-
* Invoked when a message event is received.
|
|
19
|
-
*/
|
|
20
|
-
setMessageCallback(callback: SSEInterceptorMessageCallback): void;
|
|
21
|
-
/**
|
|
22
|
-
* Invoked when an error event occurs.
|
|
23
|
-
*/
|
|
24
|
-
setErrorCallback(callback: SSEInterceptorErrorCallback): void;
|
|
25
|
-
/**
|
|
26
|
-
* Invoked when the connection is successfully opened (open event fired).
|
|
27
|
-
*/
|
|
28
|
-
setOpenEventCallback(callback: SSEInterceptorOpenEventCallback): void;
|
|
29
|
-
/**
|
|
30
|
-
* Invoked when the connection is closed.
|
|
31
|
-
*/
|
|
32
|
-
setCloseCallback(callback: SSEInterceptorCloseCallback): void;
|
|
33
|
-
isInterceptorEnabled(): boolean;
|
|
34
|
-
enableInterception(): void;
|
|
35
|
-
disableInterception(): void;
|
|
36
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { default as EventSource } from 'react-native-sse';
|
|
2
|
-
export interface EventSourceWithInternals<E extends string = never> extends EventSource<E> {
|
|
3
|
-
url: string;
|
|
4
|
-
/** Used internally to mark the underlying XHR to skip it in XHR interceptor. */
|
|
5
|
-
_xhr?: XMLHttpRequest;
|
|
6
|
-
}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { HTTPInspector } from './http/http-inspector';
|
|
2
|
-
import { NetworkActivityDevToolsClient } from '../shared/client';
|
|
3
|
-
export declare const useHttpInspector: (client: NetworkActivityDevToolsClient | null, httpInspector: HTTPInspector, isEnabled: boolean, isRecordingEnabled: boolean) => void;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { NetworkActivityEventMap } from '../shared/client';
|
|
2
|
-
import { NetworkActivityDevToolsConfig } from './config';
|
|
3
|
-
export declare const useNetworkActivityDevTools: (config?: NetworkActivityDevToolsConfig) => import('@rozenite/plugin-bridge').RozeniteDevToolsClient<NetworkActivityEventMap> | null;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { SSEInspector } from './sse/sse-inspector';
|
|
2
|
-
import { NetworkActivityDevToolsClient } from '../shared/client';
|
|
3
|
-
export declare const useSSEInspector: (client: NetworkActivityDevToolsClient | null, sseInspector: SSEInspector, isEnabled: boolean, isRecordingEnabled: boolean) => void;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { WebSocketInspector } from './websocket/websocket-inspector';
|
|
2
|
-
import { NetworkActivityDevToolsClient } from '../shared/client';
|
|
3
|
-
export declare const useWebSocketInspector: (client: NetworkActivityDevToolsClient | null, websocketInspector: WebSocketInspector, isEnabled: boolean, isRecordingEnabled: boolean) => void;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility function to get the name of a blob. Handles both the direct name property and the data object.
|
|
3
|
-
*
|
|
4
|
-
* ```
|
|
5
|
-
* // node_modules/react-native/Libraries/Blob/Blob.js
|
|
6
|
-
*
|
|
7
|
-
* export type BlobData = {
|
|
8
|
-
* blobId: string,
|
|
9
|
-
* offset: number,
|
|
10
|
-
* size: number,
|
|
11
|
-
* name?: string,
|
|
12
|
-
* type?: string,
|
|
13
|
-
* lastModified?: number,
|
|
14
|
-
* __collector?: ?BlobCollector,
|
|
15
|
-
* ...
|
|
16
|
-
* };
|
|
17
|
-
*
|
|
18
|
-
* get data(): BlobData {
|
|
19
|
-
* if (!this._data) {
|
|
20
|
-
* throw new Error('Blob has been closed and is no longer available');
|
|
21
|
-
* }
|
|
22
|
-
*
|
|
23
|
-
* return this._data;
|
|
24
|
-
* }
|
|
25
|
-
*
|
|
26
|
-
* get size(): number {
|
|
27
|
-
* return this.data.size;
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* get type(): string {
|
|
31
|
-
* return this.data.type || '';
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export declare function getBlobName(blob: any): string | undefined;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extracts form data parts from a FormData object.
|
|
3
|
-
* Handles both the standard FormData API and the React Native FormData format.
|
|
4
|
-
*
|
|
5
|
-
* ```
|
|
6
|
-
* // node_modules/react-native/Libraries/Network/FormData.js
|
|
7
|
-
*
|
|
8
|
-
* class FormData {
|
|
9
|
-
* _parts: Array<FormDataNameValuePair>;
|
|
10
|
-
*
|
|
11
|
-
* constructor() {
|
|
12
|
-
* this._parts = [];
|
|
13
|
-
* }
|
|
14
|
-
*
|
|
15
|
-
* ...
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare function getFormDataEntries(formData: any): [string, unknown][];
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
type UnionToIntersection<U> = (U extends unknown ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
2
|
-
type LastOf<T> = UnionToIntersection<T extends unknown ? () => T : never> extends () => infer R ? R : never;
|
|
3
|
-
type Push<T extends unknown[], V> = [...T, V];
|
|
4
|
-
export type UnionToTuple<T, L = LastOf<T>> = [T] extends [never] ? [] : Push<UnionToTuple<Exclude<T, L>>, L>;
|
|
5
|
-
export declare const getContentType: (request: XMLHttpRequest) => string;
|
|
6
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { WebSocketEventMap } from '../../shared/websocket-events';
|
|
2
|
-
import { Inspector } from '../inspector';
|
|
3
|
-
export type WebSocketInspector = Inspector<WebSocketEventMap>;
|
|
4
|
-
export declare const WEBSOCKET_EVENTS: (keyof WebSocketEventMap)[];
|
|
5
|
-
export declare const isWebSocketEvent: (type: string) => type is keyof WebSocketEventMap;
|
|
6
|
-
export declare const getWebSocketInspector: () => WebSocketInspector;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
export interface WebSocketInterceptor {
|
|
2
|
-
/**
|
|
3
|
-
* Invoked when RCTWebSocketModule.close(...) is called.
|
|
4
|
-
*/
|
|
5
|
-
setCloseCallback(callback: (code: number | null, reason: string | null, socketId: number) => void): void;
|
|
6
|
-
/**
|
|
7
|
-
* Invoked when RCTWebSocketModule.send(...) or sendBinary(...) is called.
|
|
8
|
-
*/
|
|
9
|
-
setSendCallback(callback: (data: string, socketId: number) => void): void;
|
|
10
|
-
/**
|
|
11
|
-
* Invoked when RCTWebSocketModule.connect(...) is called.
|
|
12
|
-
*/
|
|
13
|
-
setConnectCallback(callback: (url: string, protocols: string[] | null, options: string[], socketId: number) => void): void;
|
|
14
|
-
/**
|
|
15
|
-
* Invoked when event "websocketOpen" happens.
|
|
16
|
-
*/
|
|
17
|
-
setOnOpenCallback(callback: (socketId: number) => void): void;
|
|
18
|
-
/**
|
|
19
|
-
* Invoked when event "websocketMessage" happens.
|
|
20
|
-
*/
|
|
21
|
-
setOnMessageCallback(callback: (data: string, socketId: number) => void): void;
|
|
22
|
-
/**
|
|
23
|
-
* Invoked when event "websocketFailed" happens.
|
|
24
|
-
*/
|
|
25
|
-
setOnErrorCallback(callback: (error: string, socketId: number) => void): void;
|
|
26
|
-
/**
|
|
27
|
-
* Invoked when event "websocketClosed" happens.
|
|
28
|
-
*/
|
|
29
|
-
setOnCloseCallback(callback: (error: {
|
|
30
|
-
code: number;
|
|
31
|
-
reason?: string;
|
|
32
|
-
}, socketId: number) => void): void;
|
|
33
|
-
isInterceptorEnabled(): boolean;
|
|
34
|
-
enableInterception(): void;
|
|
35
|
-
disableInterception(): void;
|
|
36
|
-
}
|
|
37
|
-
export interface WebSocketInterceptorPreRN079 {
|
|
38
|
-
/**
|
|
39
|
-
* Invoked when RCTWebSocketModule.close(...) is called.
|
|
40
|
-
*/
|
|
41
|
-
setCloseCallback(callback: (code: number | null, reason: string | null, socketId: number) => void): void;
|
|
42
|
-
/**
|
|
43
|
-
* Invoked when RCTWebSocketModule.send(...) or sendBinary(...) is called.
|
|
44
|
-
*/
|
|
45
|
-
setSendCallback(callback: (data: string, socketId: number) => void): void;
|
|
46
|
-
/**
|
|
47
|
-
* Invoked when RCTWebSocketModule.connect(...) is called.
|
|
48
|
-
*/
|
|
49
|
-
setConnectCallback(callback: (url: string, protocols: string[] | null, options: string[], socketId: number) => void): void;
|
|
50
|
-
/**
|
|
51
|
-
* Invoked when event "websocketOpen" happens.
|
|
52
|
-
*/
|
|
53
|
-
setOnOpenCallback(callback: (socketId: number) => void): void;
|
|
54
|
-
/**
|
|
55
|
-
* Invoked when event "websocketMessage" happens.
|
|
56
|
-
*/
|
|
57
|
-
setOnMessageCallback(callback: (socketId: number, data: string) => void): void;
|
|
58
|
-
/**
|
|
59
|
-
* Invoked when event "websocketFailed" happens.
|
|
60
|
-
*/
|
|
61
|
-
setOnErrorCallback(callback: (socketId: number, error: string) => void): void;
|
|
62
|
-
/**
|
|
63
|
-
* Invoked when event "websocketClosed" happens.
|
|
64
|
-
*/
|
|
65
|
-
setOnCloseCallback(callback: (socketId: number, error: {
|
|
66
|
-
code: number;
|
|
67
|
-
reason?: string;
|
|
68
|
-
}) => void): void;
|
|
69
|
-
isInterceptorEnabled(): boolean;
|
|
70
|
-
enableInterception(): void;
|
|
71
|
-
disableInterception(): void;
|
|
72
|
-
}
|
|
73
|
-
export declare const getWebSocketInterceptor: () => WebSocketInterceptor;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RozeniteDevToolsClient } from '@rozenite/plugin-bridge';
|
|
2
|
-
import { WebSocketEventMap } from './websocket-events';
|
|
3
|
-
import { SSEEventMap } from './sse-events';
|
|
4
|
-
import { HttpEventMap } from './http-events';
|
|
5
|
-
export * from './http-events';
|
|
6
|
-
export type NetworkActivityClientUISettings = {
|
|
7
|
-
showUrlAsName?: boolean;
|
|
8
|
-
};
|
|
9
|
-
export type NetworkActivityEventMap = {
|
|
10
|
-
'network-enable': unknown;
|
|
11
|
-
'network-disable': unknown;
|
|
12
|
-
'get-client-ui-settings': unknown;
|
|
13
|
-
'client-ui-settings': {
|
|
14
|
-
settings?: NetworkActivityClientUISettings;
|
|
15
|
-
};
|
|
16
|
-
} & HttpEventMap & WebSocketEventMap & SSEEventMap;
|
|
17
|
-
export type NetworkActivityDevToolsClient = RozeniteDevToolsClient<NetworkActivityEventMap>;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
export type HttpHeaders = Record<string, string | string[]>;
|
|
2
|
-
export type XHRHeaders = NonNullable<XMLHttpRequest['responseHeaders']>;
|
|
3
|
-
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD';
|
|
4
|
-
export type RequestId = string;
|
|
5
|
-
export type Timestamp = number;
|
|
6
|
-
export type XHRPostData = string | Blob | FormData | ArrayBuffer | ArrayBufferView | unknown | null | undefined;
|
|
7
|
-
export type RequestTextPostData = {
|
|
8
|
-
type: 'text';
|
|
9
|
-
value: string;
|
|
10
|
-
};
|
|
11
|
-
export type RequestBinaryPostData = {
|
|
12
|
-
type: 'binary';
|
|
13
|
-
value: {
|
|
14
|
-
size: number;
|
|
15
|
-
type?: string;
|
|
16
|
-
name?: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export type RequestFormDataPostData = {
|
|
20
|
-
type: 'form-data';
|
|
21
|
-
value: Record<string, RequestTextPostData | RequestBinaryPostData>;
|
|
22
|
-
};
|
|
23
|
-
export type RequestPostData = RequestTextPostData | RequestFormDataPostData | RequestBinaryPostData | null | undefined;
|
|
24
|
-
export type Cookie = {
|
|
25
|
-
name: string;
|
|
26
|
-
value: string;
|
|
27
|
-
domain?: string;
|
|
28
|
-
path?: string;
|
|
29
|
-
expires?: string;
|
|
30
|
-
maxAge?: string;
|
|
31
|
-
secure?: boolean;
|
|
32
|
-
httpOnly?: boolean;
|
|
33
|
-
sameSite?: string;
|
|
34
|
-
};
|
|
35
|
-
export type Request = {
|
|
36
|
-
url: string;
|
|
37
|
-
method: HttpMethod;
|
|
38
|
-
headers: HttpHeaders;
|
|
39
|
-
postData?: RequestPostData;
|
|
40
|
-
};
|
|
41
|
-
export type Response = {
|
|
42
|
-
url: string;
|
|
43
|
-
status: number;
|
|
44
|
-
statusText: string;
|
|
45
|
-
headers: HttpHeaders;
|
|
46
|
-
contentType: string;
|
|
47
|
-
size: number | null;
|
|
48
|
-
responseTime: Timestamp;
|
|
49
|
-
};
|
|
50
|
-
export type Initiator = {
|
|
51
|
-
type: string;
|
|
52
|
-
url?: string;
|
|
53
|
-
lineNumber?: number;
|
|
54
|
-
columnNumber?: number;
|
|
55
|
-
};
|
|
56
|
-
export type ResourceType = 'XHR' | 'Fetch' | 'Other';
|
|
57
|
-
export type RequestOverride = {
|
|
58
|
-
status?: number;
|
|
59
|
-
body?: string;
|
|
60
|
-
};
|
|
61
|
-
export type HttpEventMap = {
|
|
62
|
-
'request-sent': {
|
|
63
|
-
requestId: RequestId;
|
|
64
|
-
request: Request;
|
|
65
|
-
timestamp: Timestamp;
|
|
66
|
-
initiator: Initiator;
|
|
67
|
-
type: ResourceType;
|
|
68
|
-
};
|
|
69
|
-
'response-received': {
|
|
70
|
-
requestId: RequestId;
|
|
71
|
-
timestamp: Timestamp;
|
|
72
|
-
type: ResourceType;
|
|
73
|
-
response: Response;
|
|
74
|
-
};
|
|
75
|
-
'request-completed': {
|
|
76
|
-
requestId: RequestId;
|
|
77
|
-
timestamp: Timestamp;
|
|
78
|
-
duration: number;
|
|
79
|
-
size: number | null;
|
|
80
|
-
ttfb: number;
|
|
81
|
-
};
|
|
82
|
-
'request-failed': {
|
|
83
|
-
requestId: RequestId;
|
|
84
|
-
timestamp: Timestamp;
|
|
85
|
-
type: ResourceType;
|
|
86
|
-
error: string;
|
|
87
|
-
canceled: boolean;
|
|
88
|
-
};
|
|
89
|
-
'request-progress': {
|
|
90
|
-
requestId: RequestId;
|
|
91
|
-
timestamp: Timestamp;
|
|
92
|
-
loaded: number;
|
|
93
|
-
total: number;
|
|
94
|
-
lengthComputable: boolean;
|
|
95
|
-
};
|
|
96
|
-
'get-response-body': {
|
|
97
|
-
requestId: RequestId;
|
|
98
|
-
};
|
|
99
|
-
'response-body': {
|
|
100
|
-
requestId: RequestId;
|
|
101
|
-
body: string | null;
|
|
102
|
-
};
|
|
103
|
-
'set-overrides': {
|
|
104
|
-
overrides: [string, RequestOverride][];
|
|
105
|
-
};
|
|
106
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Response } from './http-events';
|
|
2
|
-
export type SSEConnectionStatus = 'connecting' | 'open' | 'closed';
|
|
3
|
-
export type SSERequestId = string;
|
|
4
|
-
export type SSEOpenEvent = {
|
|
5
|
-
type: 'sse-open';
|
|
6
|
-
requestId: SSERequestId;
|
|
7
|
-
timestamp: number;
|
|
8
|
-
response: Response;
|
|
9
|
-
};
|
|
10
|
-
export type SSEMessageEvent = {
|
|
11
|
-
type: 'sse-message';
|
|
12
|
-
requestId: SSERequestId;
|
|
13
|
-
timestamp: number;
|
|
14
|
-
payload: {
|
|
15
|
-
type: string;
|
|
16
|
-
data: string;
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export type SSEErrorEvent = {
|
|
20
|
-
type: 'sse-error';
|
|
21
|
-
requestId: SSERequestId;
|
|
22
|
-
timestamp: number;
|
|
23
|
-
error: {
|
|
24
|
-
type: 'error' | 'timeout' | 'exception';
|
|
25
|
-
message: string;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export type SSECloseEvent = {
|
|
29
|
-
type: 'sse-close';
|
|
30
|
-
requestId: SSERequestId;
|
|
31
|
-
timestamp: number;
|
|
32
|
-
};
|
|
33
|
-
export type SSEEvent = SSEOpenEvent | SSEMessageEvent | SSEErrorEvent | SSECloseEvent;
|
|
34
|
-
export type SSEEventMap = {
|
|
35
|
-
[K in SSEEvent['type']]: Extract<SSEEvent, {
|
|
36
|
-
type: K;
|
|
37
|
-
}>;
|
|
38
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export type WebSocketMessageType = 'text' | 'binary';
|
|
2
|
-
export type WebSocketConnectionStatus = 'connecting' | 'open' | 'closing' | 'closed';
|
|
3
|
-
export type WebSocketConnectEvent = {
|
|
4
|
-
type: 'websocket-connect';
|
|
5
|
-
url: string;
|
|
6
|
-
socketId: number;
|
|
7
|
-
timestamp: number;
|
|
8
|
-
protocols: string[] | null;
|
|
9
|
-
options: string[];
|
|
10
|
-
};
|
|
11
|
-
export type WebSocketOpenEvent = {
|
|
12
|
-
type: 'websocket-open';
|
|
13
|
-
url: string;
|
|
14
|
-
socketId: number;
|
|
15
|
-
timestamp: number;
|
|
16
|
-
};
|
|
17
|
-
export type WebSocketCloseEvent = {
|
|
18
|
-
type: 'websocket-close';
|
|
19
|
-
url: string;
|
|
20
|
-
socketId: number;
|
|
21
|
-
timestamp: number;
|
|
22
|
-
code: number;
|
|
23
|
-
reason?: string;
|
|
24
|
-
};
|
|
25
|
-
export type WebSocketMessageSentEvent = {
|
|
26
|
-
type: 'websocket-message-sent';
|
|
27
|
-
url: string;
|
|
28
|
-
socketId: number;
|
|
29
|
-
timestamp: number;
|
|
30
|
-
data: string;
|
|
31
|
-
messageType: WebSocketMessageType;
|
|
32
|
-
};
|
|
33
|
-
export type WebSocketMessageReceivedEvent = {
|
|
34
|
-
type: 'websocket-message-received';
|
|
35
|
-
url: string;
|
|
36
|
-
socketId: number;
|
|
37
|
-
timestamp: number;
|
|
38
|
-
data: string;
|
|
39
|
-
messageType: WebSocketMessageType;
|
|
40
|
-
};
|
|
41
|
-
export type WebSocketErrorEvent = {
|
|
42
|
-
type: 'websocket-error';
|
|
43
|
-
url: string;
|
|
44
|
-
socketId: number;
|
|
45
|
-
timestamp: number;
|
|
46
|
-
error: string;
|
|
47
|
-
};
|
|
48
|
-
export type WebSocketConnectionStatusChangedEvent = {
|
|
49
|
-
type: 'websocket-connection-status-changed';
|
|
50
|
-
url: string;
|
|
51
|
-
socketId: number;
|
|
52
|
-
timestamp: number;
|
|
53
|
-
status: WebSocketConnectionStatus;
|
|
54
|
-
};
|
|
55
|
-
export type WebSocketEvent = WebSocketConnectEvent | WebSocketOpenEvent | WebSocketCloseEvent | WebSocketMessageSentEvent | WebSocketMessageReceivedEvent | WebSocketErrorEvent | WebSocketConnectionStatusChangedEvent;
|
|
56
|
-
export type WebSocketEventMap = {
|
|
57
|
-
[K in WebSocketEvent['type']]: Extract<WebSocketEvent, {
|
|
58
|
-
type: K;
|
|
59
|
-
}>;
|
|
60
|
-
};
|
package/dist/src/ui/App.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function NetworkActivityPanel(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
declare const badgeVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
6
|
-
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
7
|
-
}
|
|
8
|
-
declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export { Badge, badgeVariants };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "default" | "xs" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
export { Button, buttonVariants };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { HttpNetworkEntry, SSENetworkEntry } from '../state/model';
|
|
2
|
-
type NetworkEntry = HttpNetworkEntry | SSENetworkEntry;
|
|
3
|
-
type CopyDropdownProps = {
|
|
4
|
-
selectedRequest: NetworkEntry;
|
|
5
|
-
};
|
|
6
|
-
export declare const CopyRequestDropdown: ({ selectedRequest }: CopyDropdownProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
-
declare const DropdownMenu: React.FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
-
declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare const DropdownMenuPortal: React.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
7
|
-
declare const DropdownMenuSub: React.FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
8
|
-
declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
-
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
10
|
-
inset?: boolean;
|
|
11
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
-
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
-
declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
15
|
-
inset?: boolean;
|
|
16
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
-
declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
20
|
-
inset?: boolean;
|
|
21
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
-
declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
23
|
-
declare const DropdownMenuShortcut: {
|
|
24
|
-
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
displayName: string;
|
|
26
|
-
};
|
|
27
|
-
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type FilterState = {
|
|
2
|
-
text: string;
|
|
3
|
-
types: Set<'http' | 'websocket' | 'sse'>;
|
|
4
|
-
};
|
|
5
|
-
type FilterBarProps = {
|
|
6
|
-
filter: FilterState;
|
|
7
|
-
onFilterChange: (filter: FilterState) => void;
|
|
8
|
-
};
|
|
9
|
-
export declare const FilterBar: ({ filter, onFilterChange }: FilterBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
type JsonTreeCopyableItemProps = PropsWithChildren<{
|
|
3
|
-
getCopyableValue: () => string;
|
|
4
|
-
className?: string;
|
|
5
|
-
}>;
|
|
6
|
-
export declare const JsonTreeCopyableItem: ({ children, getCopyableValue, className, }: JsonTreeCopyableItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export type KeyValueItem = {
|
|
3
|
-
key: string;
|
|
4
|
-
value: React.ReactNode;
|
|
5
|
-
keyClassName?: string;
|
|
6
|
-
valueClassName?: string;
|
|
7
|
-
};
|
|
8
|
-
export type KeyValueGridProps = {
|
|
9
|
-
items?: KeyValueItem[];
|
|
10
|
-
emptyMessage?: string;
|
|
11
|
-
className?: string;
|
|
12
|
-
};
|
|
13
|
-
export declare const KeyValueGrid: ({ items, emptyMessage, className, }: KeyValueGridProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HttpNetworkEntry } from '../state/model';
|
|
2
|
-
import { RequestOverride } from '../../shared/client';
|
|
3
|
-
export type OverrideResponseProps = {
|
|
4
|
-
selectedRequest: HttpNetworkEntry;
|
|
5
|
-
initialOverride: RequestOverride | undefined;
|
|
6
|
-
onClear: () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare const OverrideResponse: ({ selectedRequest, initialOverride, onClear, }: OverrideResponseProps) => import("react/jsx-runtime").JSX.Element | undefined;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ProcessedRequest } from '../state/model';
|
|
2
|
-
import { RequestId, RequestOverride } from '../../shared/client';
|
|
3
|
-
import { FilterState } from './FilterBar';
|
|
4
|
-
type NetworkRequest = {
|
|
5
|
-
id: RequestId;
|
|
6
|
-
name: string;
|
|
7
|
-
status: string | number;
|
|
8
|
-
method: string;
|
|
9
|
-
domain: string;
|
|
10
|
-
path: string;
|
|
11
|
-
size: string;
|
|
12
|
-
time: string;
|
|
13
|
-
type: string;
|
|
14
|
-
startTime: string;
|
|
15
|
-
hasOverride: boolean;
|
|
16
|
-
};
|
|
17
|
-
declare const formatSize: (bytes: number) => string;
|
|
18
|
-
declare const formatDuration: (duration: number) => string;
|
|
19
|
-
declare const formatStartTime: (startTime: number) => string;
|
|
20
|
-
declare const extractDomainAndPath: (url: string) => {
|
|
21
|
-
domain: string;
|
|
22
|
-
path: string;
|
|
23
|
-
};
|
|
24
|
-
declare const generateName: (url: string, showEntirePathName?: boolean) => string;
|
|
25
|
-
declare const processNetworkRequests: (processedRequests: ProcessedRequest[], overrides: Map<string, RequestOverride>, showEntirePathAsName?: boolean) => NetworkRequest[];
|
|
26
|
-
export type RequestListProps = {
|
|
27
|
-
filter: FilterState;
|
|
28
|
-
};
|
|
29
|
-
export declare const RequestList: ({ filter }: RequestListProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export { formatSize, formatDuration, formatStartTime, extractDomainAndPath, generateName, processNetworkRequests, };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
3
|
-
declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
export { ScrollArea, ScrollBar };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
export type SectionProps = {
|
|
3
|
-
title: string;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
collapsible?: boolean;
|
|
6
|
-
action?: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
export declare const Section: ({ title, children, collapsible, action, }: SectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
-
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
export { Separator };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SidePanel: () => import("react/jsx-runtime").JSX.Element | null;
|