react-native-debug-toolkit 3.1.3 → 3.1.5
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 +83 -65
- package/README.zh-CN.md +82 -64
- package/bin/debug-toolkit.js +10 -2
- package/lib/commonjs/core/DebugToolkit.js +118 -97
- package/lib/commonjs/core/DebugToolkit.js.map +1 -1
- package/lib/commonjs/core/initialize.js +4 -4
- package/lib/commonjs/core/initialize.js.map +1 -1
- package/lib/commonjs/features/environment/index.js +22 -24
- package/lib/commonjs/features/environment/index.js.map +1 -1
- package/lib/commonjs/features/network/NetworkLogTab.js +7 -3
- package/lib/commonjs/features/network/NetworkLogTab.js.map +1 -1
- package/lib/commonjs/features/network/index.js +25 -47
- package/lib/commonjs/features/network/index.js.map +1 -1
- package/lib/commonjs/features/network/networkInterceptor.js +3 -3
- package/lib/commonjs/features/network/networkInterceptor.js.map +1 -1
- package/lib/commonjs/index.js +0 -30
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/DaemonClient.js +37 -51
- package/lib/commonjs/utils/DaemonClient.js.map +1 -1
- package/lib/commonjs/utils/createChannelFeature.js +8 -1
- package/lib/commonjs/utils/createChannelFeature.js.map +1 -1
- package/lib/commonjs/utils/deviceReport.js +3 -1
- package/lib/commonjs/utils/deviceReport.js.map +1 -1
- package/lib/commonjs/utils/urlRewriter.js +15 -0
- package/lib/commonjs/utils/urlRewriter.js.map +1 -0
- package/lib/module/core/DebugToolkit.js +117 -96
- package/lib/module/core/DebugToolkit.js.map +1 -1
- package/lib/module/core/initialize.js +6 -7
- package/lib/module/core/initialize.js.map +1 -1
- package/lib/module/features/environment/index.js +22 -24
- package/lib/module/features/environment/index.js.map +1 -1
- package/lib/module/features/network/NetworkLogTab.js +7 -3
- package/lib/module/features/network/NetworkLogTab.js.map +1 -1
- package/lib/module/features/network/index.js +25 -46
- package/lib/module/features/network/index.js.map +1 -1
- package/lib/module/features/network/networkInterceptor.js +3 -3
- package/lib/module/features/network/networkInterceptor.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/DaemonClient.js +38 -42
- package/lib/module/utils/DaemonClient.js.map +1 -1
- package/lib/module/utils/createChannelFeature.js +8 -1
- package/lib/module/utils/createChannelFeature.js.map +1 -1
- package/lib/module/utils/deviceReport.js +4 -2
- package/lib/module/utils/deviceReport.js.map +1 -1
- package/lib/module/utils/urlRewriter.js +10 -0
- package/lib/module/utils/urlRewriter.js.map +1 -0
- package/lib/typescript/src/core/DebugToolkit.d.ts +23 -10
- package/lib/typescript/src/core/DebugToolkit.d.ts.map +1 -1
- package/lib/typescript/src/core/initialize.d.ts.map +1 -1
- package/lib/typescript/src/features/environment/index.d.ts.map +1 -1
- package/lib/typescript/src/features/network/NetworkLogTab.d.ts.map +1 -1
- package/lib/typescript/src/features/network/index.d.ts +3 -3
- package/lib/typescript/src/features/network/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/types/feature.d.ts +5 -0
- package/lib/typescript/src/types/feature.d.ts.map +1 -1
- package/lib/typescript/src/types/index.d.ts +1 -1
- package/lib/typescript/src/types/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/DaemonClient.d.ts +5 -11
- package/lib/typescript/src/utils/DaemonClient.d.ts.map +1 -1
- package/lib/typescript/src/utils/createChannelFeature.d.ts +4 -0
- package/lib/typescript/src/utils/createChannelFeature.d.ts.map +1 -1
- package/lib/typescript/src/utils/deviceReport.d.ts +10 -1
- package/lib/typescript/src/utils/deviceReport.d.ts.map +1 -1
- package/lib/typescript/src/utils/urlRewriter.d.ts +5 -0
- package/lib/typescript/src/utils/urlRewriter.d.ts.map +1 -0
- package/node/daemon/src/console/console.html +197 -27
- package/node/daemon/src/server.js +32 -2
- package/node/daemon/src/store.js +45 -6
- package/node/mcp/src/logs.js +15 -4
- package/node/mcp/src/tools.js +4 -2
- package/package.json +6 -2
- package/src/core/DebugToolkit.tsx +119 -105
- package/src/core/initialize.ts +7 -8
- package/src/features/environment/index.ts +25 -27
- package/src/features/network/NetworkLogTab.tsx +6 -3
- package/src/features/network/index.ts +30 -52
- package/src/features/network/networkInterceptor.ts +3 -3
- package/src/index.ts +3 -8
- package/src/types/feature.ts +6 -0
- package/src/types/index.ts +1 -0
- package/src/utils/DaemonClient.ts +39 -56
- package/src/utils/createChannelFeature.ts +12 -1
- package/src/utils/deviceReport.ts +12 -3
- package/src/utils/urlRewriter.ts +11 -0
- package/lib/commonjs/utils/urlRewriterRegistry.js +0 -14
- package/lib/commonjs/utils/urlRewriterRegistry.js.map +0 -1
- package/lib/module/utils/urlRewriterRegistry.js +0 -10
- package/lib/module/utils/urlRewriterRegistry.js.map +0 -1
- package/lib/typescript/src/utils/urlRewriterRegistry.d.ts +0 -7
- package/lib/typescript/src/utils/urlRewriterRegistry.d.ts.map +0 -1
- package/src/utils/urlRewriterRegistry.ts +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_urlRewriter","getUrlRewriter","setUrlRewriter","rewriter"],"sourceRoot":"../../../src","sources":["utils/urlRewriter.ts"],"mappings":";;AAEA,IAAIA,YAAgC,GAAG,IAAI;AAE3C,OAAO,SAASC,cAAcA,CAAA,EAAuB;EACnD,OAAOD,YAAY;AACrB;AAEA,OAAO,SAASE,cAAcA,CAACC,QAA4B,EAAQ;EACjEH,YAAY,GAAGG,QAAQ;AACzB","ignoreList":[]}
|
|
@@ -1,24 +1,37 @@
|
|
|
1
|
-
import type { AnyDebugFeature } from '../types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import type { AnyDebugFeature, DebugFeatureListener, FeatureDataProvider } from '../types';
|
|
2
|
+
declare class DebugToolkitCore implements FeatureDataProvider {
|
|
3
|
+
private _features;
|
|
4
|
+
private _launcherVisible;
|
|
5
|
+
private _panelOpen;
|
|
6
|
+
private _enabled;
|
|
7
|
+
private _listeners;
|
|
8
|
+
private notify;
|
|
9
|
+
get features(): AnyDebugFeature[];
|
|
10
|
+
subscribe(listener: DebugFeatureListener): () => void;
|
|
11
|
+
get enabled(): boolean;
|
|
8
12
|
setEnabled(enabled: boolean): void;
|
|
9
13
|
replaceFeatures(features: AnyDebugFeature[]): void;
|
|
10
14
|
addFeature(feature: AnyDebugFeature): void;
|
|
11
15
|
removeFeature(name: string): void;
|
|
12
|
-
reset(): void;
|
|
13
16
|
hasFeatures(): boolean;
|
|
14
|
-
|
|
17
|
+
get panelOpen(): boolean;
|
|
15
18
|
openPanel(): void;
|
|
16
19
|
closePanel(): void;
|
|
17
20
|
togglePanel(): void;
|
|
21
|
+
get launcherVisible(): boolean;
|
|
18
22
|
showLauncher(): void;
|
|
19
23
|
hideLauncher(): void;
|
|
20
24
|
clearAll(): void;
|
|
25
|
+
reset(): void;
|
|
21
26
|
destroy(): void;
|
|
22
|
-
}
|
|
27
|
+
}
|
|
28
|
+
/** Module-level default instance for non-React scenarios and backward compatibility. */
|
|
29
|
+
export declare const debugToolkit: DebugToolkitCore;
|
|
30
|
+
export type DebugToolkit = DebugToolkitCore;
|
|
31
|
+
/**
|
|
32
|
+
* @deprecated Use `debugToolkit` or get instance from `initializeDebugToolkit()`.
|
|
33
|
+
* This is the default module-level instance exported for backward compatibility.
|
|
34
|
+
*/
|
|
35
|
+
export declare const DebugToolkit: DebugToolkitCore;
|
|
23
36
|
export {};
|
|
24
37
|
//# sourceMappingURL=DebugToolkit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DebugToolkit.d.ts","sourceRoot":"","sources":["../../../../src/core/DebugToolkit.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"DebugToolkit.d.ts","sourceRoot":"","sources":["../../../../src/core/DebugToolkit.tsx"],"names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,CAAC,CAAC,CAAC,CAAC;IAC7D,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAmDD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,YAAY,CAkCrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/environment/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEZ,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/environment/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EAEZ,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AA6CrB,MAAM,WAAW,qBAAsB,SAAQ,YAAY,CAAC,gBAAgB,CAAC;IAC3E,oBAAoB,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IAClE,iBAAiB,EAAE,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1D,uBAAuB,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;CAC9C;AAED,eAAO,MAAM,wBAAwB,GACnC,sBAAsB,iBAAiB,EAAE,KACxC,qBAsIF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkLogTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/network/NetworkLogTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"NetworkLogTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/network/NetworkLogTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAcxC,OAAO,KAAK,EAAE,uBAAuB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA4B5E,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAAC,eAAe,EAAE,CAAC,CA+I7E,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { NetworkLogEntry } from '../../types';
|
|
2
2
|
export interface NetworkFeatureConfig {
|
|
3
3
|
/** Maximum number of network logs to keep (default: 200) */
|
|
4
4
|
maxLogs?: number;
|
|
5
5
|
/** URLs to filter out from logging */
|
|
6
6
|
blacklist?: Array<string | RegExp>;
|
|
7
7
|
}
|
|
8
|
-
export declare const createNetworkFeature: (config?: NetworkFeatureConfig) => DebugFeature<NetworkLogEntry[]>;
|
|
9
|
-
export declare function
|
|
8
|
+
export declare const createNetworkFeature: (config?: NetworkFeatureConfig) => import("../../types").DebugFeature<NetworkLogEntry[]>;
|
|
9
|
+
export declare function addToBlacklist(endpoint: string): void;
|
|
10
10
|
export declare function _isNetworkUrlBlacklistedForTesting(url: string): boolean;
|
|
11
11
|
/** Reset module-level state for testing */
|
|
12
12
|
export declare function _resetNetworkForTesting(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/network/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/network/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAqCnD,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;CACpC;AAED,eAAO,MAAM,oBAAoB,GAAI,SAAS,oBAAoB,0DA2BjE,CAAC;AAgBF,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAMrD;AAED,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEvE;AAED,2CAA2C;AAC3C,wBAAgB,uBAAuB,IAAI,IAAI,CAI9C"}
|
|
@@ -25,7 +25,7 @@ export { createDebugDeviceReport } from './utils/deviceReport';
|
|
|
25
25
|
export type { DebugDeviceReport, DebugDeviceReportOptions } from './utils/deviceReport';
|
|
26
26
|
export { DaemonClient, daemonClient } from './utils/DaemonClient';
|
|
27
27
|
export type { DaemonSettings, DaemonConnectionMode, DaemonConnectionFailureReason, DaemonConnectionOptions, DaemonConnectionResult, StreamStatus, StreamToDaemonOptions, ReportResult, ReportToDaemonOptions, } from './utils/DaemonClient';
|
|
28
|
-
export { getDefaultDaemonEndpoint
|
|
29
|
-
export type { AnyDebugFeature, BuiltInFeatureName, DebugFeature, DebugFeatureRenderProps, NetworkLogEntry, ConsoleLogEntry, ZustandLogEntry, NavigationLogEntry, TrackLogEntry, EnvironmentConfig, EnvironmentState, } from './types';
|
|
28
|
+
export { getDefaultDaemonEndpoint } from './utils/DaemonClient';
|
|
29
|
+
export type { AnyDebugFeature, BuiltInFeatureName, DebugFeature, DebugFeatureListener, DebugFeatureRenderProps, FeatureDataProvider, NetworkLogEntry, ConsoleLogEntry, ZustandLogEntry, NavigationLogEntry, TrackLogEntry, EnvironmentConfig, EnvironmentState, } from './types';
|
|
30
30
|
export { initializeDebugToolkit as default } from './core/initialize';
|
|
31
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,E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jB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,sBAAsB,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -6,6 +6,11 @@ export interface DebugFeatureRenderProps<TSnapshot = unknown> {
|
|
|
6
6
|
feature: DebugFeature<TSnapshot>;
|
|
7
7
|
}
|
|
8
8
|
export type AnyDebugFeature = DebugFeature<any>;
|
|
9
|
+
/** Provides feature list and change notifications to consumers (e.g., DaemonClient). */
|
|
10
|
+
export interface FeatureDataProvider {
|
|
11
|
+
readonly features: AnyDebugFeature[];
|
|
12
|
+
subscribe(listener: DebugFeatureListener): () => void;
|
|
13
|
+
}
|
|
9
14
|
export interface DebugFeature<TSnapshot = unknown> {
|
|
10
15
|
name: string;
|
|
11
16
|
label: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature.d.ts","sourceRoot":"","sources":["../../../../src/types/feature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,MAAM,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC;AAE9C,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,SAAS,GACT,SAAS,GACT,YAAY,GACZ,OAAO,GACP,aAAa,GACb,WAAW,CAAC;AAEhB,MAAM,WAAW,uBAAuB,CAAC,SAAS,GAAG,OAAO;IAC1D,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;CAClC;AAGD,MAAM,MAAM,eAAe,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC;AAEhD,MAAM,WAAW,YAAY,CAAC,SAAS,GAAG,OAAO;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,WAAW,EAAE,MAAM,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,O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,CAAC,EAAE,CAAC,QAAQ,EAAE,oBAAoB,KAAK,MAAM,IAAI,CAAC;IAC3D,aAAa,CAAC,EAAE,aAAa,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,CAAC;IAClE,KAAK,CAAC,EAAE,MAAM;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACvD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type { AnyDebugFeature, BuiltInFeatureName, DebugFeature, DebugFeatureListener, DebugFeatureRenderProps, } from './feature';
|
|
1
|
+
export type { AnyDebugFeature, BuiltInFeatureName, DebugFeature, DebugFeatureListener, DebugFeatureRenderProps, FeatureDataProvider, } from './feature';
|
|
2
2
|
export type { ConsoleLogEntry, NavigationLogEntry, NetworkLogEntry, TrackLogEntry, ZustandLogEntry, } from './logs';
|
|
3
3
|
export type { EnvironmentConfig, EnvironmentState, } from './environment';
|
|
4
4
|
export type { NavigationContainerRef, } from './navigation';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,uBAAuB,EACvB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AAEnB,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,eAAe,GAChB,MAAM,QAAQ,CAAC;AAEhB,YAAY,EACV,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAEtB,YAAY,EACV,aAAa,EACb,mBAAmB,GACpB,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FeatureDataProvider } from '../types';
|
|
1
2
|
import { type DebugDeviceReport, type DebugDeviceReportOptions } from './deviceReport';
|
|
2
3
|
export type DaemonConnectionMode = 'simulator' | 'device';
|
|
3
4
|
export interface DaemonSettings {
|
|
@@ -83,6 +84,7 @@ export declare function normalizeDaemonSettings(settings: DaemonSettings): {
|
|
|
83
84
|
export interface DaemonClientOptions {
|
|
84
85
|
fetch?: FetchLike;
|
|
85
86
|
AbortController?: AbortControllerCtor;
|
|
87
|
+
featureProvider: FeatureDataProvider;
|
|
86
88
|
onEndpointDetected?: (url: string) => void;
|
|
87
89
|
}
|
|
88
90
|
export declare class DaemonClient {
|
|
@@ -91,9 +93,11 @@ export declare class DaemonClient {
|
|
|
91
93
|
private _stream;
|
|
92
94
|
private _fetch;
|
|
93
95
|
private _AbortController;
|
|
96
|
+
private _featureProvider;
|
|
94
97
|
private _onEndpointDetected;
|
|
95
98
|
private _restorePromise;
|
|
96
|
-
|
|
99
|
+
private _sessionId;
|
|
100
|
+
constructor(options: DaemonClientOptions);
|
|
97
101
|
getSettings(): DaemonSettings;
|
|
98
102
|
configure(settings: DaemonSettings): void;
|
|
99
103
|
checkConnection(options?: DaemonConnectionOptions): Promise<DaemonConnectionResult>;
|
|
@@ -126,16 +130,6 @@ export declare class DaemonClient {
|
|
|
126
130
|
private enqueueSendDelta;
|
|
127
131
|
}
|
|
128
132
|
export declare const daemonClient: DaemonClient;
|
|
129
|
-
export declare function loadDaemonSettings(): Promise<DaemonSettings>;
|
|
130
|
-
export declare function saveDaemonSettings(settings: DaemonSettings): Promise<void>;
|
|
131
|
-
export declare function loadDaemonStreamingEnabled(): Promise<boolean | null>;
|
|
132
|
-
export declare function saveDaemonStreamingEnabled(enabled: boolean): Promise<void>;
|
|
133
|
-
export declare function startStreaming(options?: StreamToDaemonOptions): void;
|
|
134
|
-
export declare function stopStreaming(): void;
|
|
135
|
-
export declare function isStreaming(): boolean;
|
|
136
|
-
export declare function checkDaemonConnection(options?: DaemonConnectionOptions): Promise<DaemonConnectionResult>;
|
|
137
|
-
export declare function reportDebugDeviceToDaemon(options?: ReportToDaemonOptions): Promise<ReportResult>;
|
|
138
|
-
export declare function restoreDaemonStreaming(): Promise<void>;
|
|
139
133
|
export declare function _resetDaemonClientForTesting(): void;
|
|
140
134
|
export {};
|
|
141
135
|
//# sourceMappingURL=DaemonClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DaemonClient.d.ts","sourceRoot":"","sources":["../../../../src/utils/DaemonClient.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"DaemonClient.d.ts","sourceRoot":"","sources":["../../../../src/utils/DaemonClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAE9B,MAAM,gBAAgB,CAAC;AAKxB,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE1D,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,oBAAoB,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,YAAY,GACpB;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,GACvB;IAAE,KAAK,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACxC;IAAE,KAAK,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,aAAa,CAAA;C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AAO,CAAC,qBAAqB;YAwBf,gBAAgB;IAuC9B,OAAO,CAAC,gBAAgB;CAsGzB;AAID,eAAO,MAAM,YAAY,cAAsD,CAAC;AAmEhF,wBAAgB,4BAA4B,IAAI,IAAI,CAEnD"}
|
|
@@ -23,5 +23,9 @@ export declare function createChannelFeature<TPayload, TEntry extends {
|
|
|
23
23
|
renderContent?: ComponentType<DebugFeatureRenderProps<TEntry[]>>;
|
|
24
24
|
maxLogs?: number;
|
|
25
25
|
persist?: ChannelFeaturePersistConfig<TEntry>;
|
|
26
|
+
/** Return null to skip, or the (possibly modified) payload to proceed. */
|
|
27
|
+
beforePush?: (payload: TPayload) => TPayload | null;
|
|
28
|
+
/** Called after channel subscription in setup. Return a cleanup function. */
|
|
29
|
+
onSetup?: () => (() => void) | void;
|
|
26
30
|
}): DebugFeature<TEntry[]>;
|
|
27
31
|
//# sourceMappingURL=createChannelFeature.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createChannelFeature.d.ts","sourceRoot":"","sources":["../../../../src/utils/createChannelFeature.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAwB,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAC5F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAMzD,MAAM,WAAW,2BAA2B,CAAC,MAAM;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,SAAS;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,EAC3E,UAAU,EAAE,MAAM,YAAY,CAAC,QAAQ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CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAC;IAC9C,0EAA0E;IAC1E,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,QAAQ,GAAG,IAAI,CAAC;IACpD,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,CAAC;CACrC,GACA,YAAY,CAAC,MAAM,EAAE,CAAC,CAqDxB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { FeatureDataProvider } from '../types';
|
|
1
2
|
export interface DebugDeviceReportOptions {
|
|
2
3
|
maxPerType?: number;
|
|
3
4
|
maxBodyBytes?: number;
|
|
@@ -9,10 +10,18 @@ export interface DeviceInfo {
|
|
|
9
10
|
osVersion: string;
|
|
10
11
|
appVersion: string;
|
|
11
12
|
}
|
|
13
|
+
export interface SessionInfo {
|
|
14
|
+
id: string;
|
|
15
|
+
startedAt: number;
|
|
16
|
+
}
|
|
12
17
|
export interface DebugDeviceReport {
|
|
13
18
|
version: 2;
|
|
14
19
|
device: DeviceInfo;
|
|
20
|
+
session?: SessionInfo;
|
|
15
21
|
logs: Record<string, unknown[] | undefined>;
|
|
16
22
|
}
|
|
17
|
-
export declare function createDebugDeviceReport(options?: DebugDeviceReportOptions
|
|
23
|
+
export declare function createDebugDeviceReport(options?: DebugDeviceReportOptions & {
|
|
24
|
+
featureProvider?: FeatureDataProvider;
|
|
25
|
+
session?: SessionInfo;
|
|
26
|
+
}): DebugDeviceReport;
|
|
18
27
|
//# sourceMappingURL=deviceReport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deviceReport.d.ts","sourceRoot":"","sources":["../../../../src/utils/deviceReport.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deviceReport.d.ts","sourceRoot":"","sources":["../../../../src/utils/deviceReport.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAOpD,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,CAAC,CAAC;IACX,MAAM,EAAE,UAAU,CAAC;IACnB,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC,CAAC;CAC7C;AAuID,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,wBAAwB,GAAG;IAAE,eAAe,CAAC,EAAE,mBAAmB,CAAC;IAAC,OAAO,CAAC,EAAE,WAAW,CAAA;CAAO,GACxG,iBAAiB,CAyCnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urlRewriter.d.ts","sourceRoot":"","sources":["../../../../src/utils/urlRewriter.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;AAI3C,wBAAgB,cAAc,IAAI,WAAW,GAAG,IAAI,CAEnD;AAED,wBAAgB,cAAc,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,GAAG,IAAI,CAEjE"}
|
|
@@ -421,6 +421,33 @@ header h1 span{color:var(--text3);font-weight:400}
|
|
|
421
421
|
padding:12px 14px;border-bottom:1px solid rgba(30,45,74,.5);
|
|
422
422
|
display:flex;align-items:center;gap:10px;
|
|
423
423
|
}
|
|
424
|
+
.network-meta-line{
|
|
425
|
+
padding:6px 14px;border-bottom:1px solid rgba(30,45,74,.5);
|
|
426
|
+
font-family:var(--font-mono);font-size:10px;color:var(--text3);
|
|
427
|
+
display:flex;gap:10px;flex-wrap:wrap;
|
|
428
|
+
}
|
|
429
|
+
.network-meta-line span{white-space:nowrap}
|
|
430
|
+
|
|
431
|
+
/* Collapsible sections */
|
|
432
|
+
.collapse-section{border:1px solid var(--border);border-radius:var(--radius);background:rgba(8,12,22,.35);overflow:hidden;margin-bottom:0}
|
|
433
|
+
.collapse-header{
|
|
434
|
+
display:flex;align-items:center;justify-content:space-between;
|
|
435
|
+
padding:7px 12px;border-bottom:1px solid var(--border);
|
|
436
|
+
background:rgba(0,229,255,.03);cursor:pointer;user-select:none;
|
|
437
|
+
}
|
|
438
|
+
.collapse-header:hover{background:rgba(0,229,255,.06)}
|
|
439
|
+
.collapse-header-left{display:flex;align-items:center;gap:6px}
|
|
440
|
+
.collapse-arrow{
|
|
441
|
+
font-size:9px;color:var(--text3);transition:transform .2s;display:inline-block;
|
|
442
|
+
}
|
|
443
|
+
.collapse-arrow.open{transform:rotate(90deg)}
|
|
444
|
+
.collapse-title{
|
|
445
|
+
font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.08em;
|
|
446
|
+
color:var(--cyan);font-family:var(--font-mono);
|
|
447
|
+
}
|
|
448
|
+
.collapse-body{display:none;padding:0}
|
|
449
|
+
.collapse-body.open{display:block}
|
|
450
|
+
.section-body-inner{padding:4px 0}
|
|
424
451
|
.method-badge{
|
|
425
452
|
font-family:var(--font-mono);font-size:11px;font-weight:700;
|
|
426
453
|
padding:3px 10px;border-radius:3px;letter-spacing:.04em;
|
|
@@ -445,6 +472,23 @@ header h1 span{color:var(--text3);font-weight:400}
|
|
|
445
472
|
.nav-arrow{color:var(--cyan);font-size:14px}
|
|
446
473
|
.nav-to{color:var(--text);font-weight:500}
|
|
447
474
|
|
|
475
|
+
/* Session divider */
|
|
476
|
+
.session-divider{
|
|
477
|
+
display:flex;align-items:center;gap:12px;
|
|
478
|
+
padding:10px 0;margin:6px 0;
|
|
479
|
+
}
|
|
480
|
+
.session-divider-line{flex:1;height:1px;background:var(--border2)}
|
|
481
|
+
.session-divider-label{
|
|
482
|
+
font-family:var(--font-mono);font-size:10px;
|
|
483
|
+
color:var(--text3);white-space:nowrap;letter-spacing:.04em;
|
|
484
|
+
display:flex;align-items:center;gap:6px;
|
|
485
|
+
}
|
|
486
|
+
.session-divider-dot{
|
|
487
|
+
width:5px;height:5px;border-radius:50%;
|
|
488
|
+
background:var(--amber);flex-shrink:0;
|
|
489
|
+
}
|
|
490
|
+
.session-new .session-divider-dot{background:var(--cyan)}
|
|
491
|
+
|
|
448
492
|
/* Entry footer */
|
|
449
493
|
.entry-footer{
|
|
450
494
|
display:flex;align-items:center;gap:8px;
|
|
@@ -664,11 +708,18 @@ mark{
|
|
|
664
708
|
return labels[type] || (type ? type.charAt(0).toUpperCase() + type.slice(1) : 'Unknown');
|
|
665
709
|
}
|
|
666
710
|
|
|
711
|
+
function capitalizePlatform(p) {
|
|
712
|
+
if (p === 'ios') return 'iOS';
|
|
713
|
+
if (p === 'android') return 'Android';
|
|
714
|
+
var s = String(p || 'unknown');
|
|
715
|
+
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
716
|
+
}
|
|
717
|
+
|
|
667
718
|
function formatDevice(device) {
|
|
668
719
|
if (!device || typeof device !== 'object') return 'Unknown device';
|
|
669
720
|
var parts = [];
|
|
670
|
-
if (device.platform) parts.push(
|
|
671
|
-
if (device.model) parts.push(String(device.model));
|
|
721
|
+
if (device.platform) parts.push(capitalizePlatform(device.platform));
|
|
722
|
+
if (device.model && String(device.model) !== 'unknown') parts.push(String(device.model));
|
|
672
723
|
if (device.osVersion) parts.push('OS ' + String(device.osVersion));
|
|
673
724
|
return parts.length ? parts.join(' / ') : 'Unknown device';
|
|
674
725
|
}
|
|
@@ -819,6 +870,34 @@ mark{
|
|
|
819
870
|
return renderSection(title, renderValue(object), object);
|
|
820
871
|
}
|
|
821
872
|
|
|
873
|
+
function renderCollapsibleSection(title, content, dataForCopy, collapsed) {
|
|
874
|
+
var id = 'ns-' + Math.random().toString(36).slice(2,8);
|
|
875
|
+
var isOpen = !collapsed;
|
|
876
|
+
var copyAttr = dataForCopy !== undefined
|
|
877
|
+
? ' data-copy="' + escapeHtml(typeof dataForCopy === 'string' ? dataForCopy : JSON.stringify(dataForCopy)) + '"'
|
|
878
|
+
: '';
|
|
879
|
+
var html = '<div class="collapse-section">';
|
|
880
|
+
html += '<div class="collapse-header" onclick="toggleNetworkSection(\'' + id + '\')">';
|
|
881
|
+
html += '<div class="collapse-header-left">';
|
|
882
|
+
html += '<span class="collapse-arrow' + (isOpen ? ' open' : '') + '" id="arrow-' + id + '">▶</span>';
|
|
883
|
+
html += '<span class="collapse-title">' + escapeHtml(title) + '</span>';
|
|
884
|
+
html += '</div>';
|
|
885
|
+
html += '<button class="detail-section-copy" onclick="event.stopPropagation();copySectionData(this)" title="Copy section"' + copyAttr + '>⎘</button>';
|
|
886
|
+
html += '</div>';
|
|
887
|
+
html += '<div class="collapse-body' + (isOpen ? ' open' : '') + '" id="' + id + '">';
|
|
888
|
+
html += '<div class="section-body-inner">' + content + '</div>';
|
|
889
|
+
html += '</div></div>';
|
|
890
|
+
return html;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
window.toggleNetworkSection = function(id) {
|
|
894
|
+
var body = document.getElementById(id);
|
|
895
|
+
var arrow = document.getElementById('arrow-' + id);
|
|
896
|
+
if (!body) return;
|
|
897
|
+
body.classList.toggle('open');
|
|
898
|
+
if (arrow) arrow.classList.toggle('open');
|
|
899
|
+
};
|
|
900
|
+
|
|
822
901
|
function renderConsoleDetails(entry) {
|
|
823
902
|
var messages = Array.isArray(entry.data) ? entry.data : [entry.data];
|
|
824
903
|
return renderSection('Console', renderRows([
|
|
@@ -835,33 +914,84 @@ mark{
|
|
|
835
914
|
var method = (request.method || 'GET').toUpperCase();
|
|
836
915
|
var methodClass = 'method-' + method.toLowerCase();
|
|
837
916
|
|
|
838
|
-
|
|
917
|
+
// Hero - always visible
|
|
918
|
+
var html = '<div class="network-hero"><span class="method-badge ' + methodClass + '">' + escapeHtml(method) + '</span>' +
|
|
839
919
|
'<span class="network-url">' + escapeHtml(request.url || '-') + '</span></div>';
|
|
840
920
|
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
if (
|
|
921
|
+
// Compact meta line - always visible
|
|
922
|
+
var metaParts = [];
|
|
923
|
+
if (response && response.status !== undefined) {
|
|
924
|
+
metaParts.push(response.status + (response.statusText ? ' ' + response.statusText : ''));
|
|
925
|
+
}
|
|
926
|
+
if (entry.duration !== undefined) metaParts.push(entry.duration + 'ms');
|
|
927
|
+
if (entry.timestamp) metaParts.push(formatTimeShort(new Date(entry.timestamp).toISOString()));
|
|
928
|
+
if (metaParts.length) {
|
|
929
|
+
html += '<div class="network-meta-line">' + metaParts.map(function(p) { return '<span>' + escapeHtml(p) + '</span>'; }).join('') + '</div>';
|
|
930
|
+
}
|
|
847
931
|
|
|
848
|
-
|
|
932
|
+
// Request Body - EXPANDED by default, always visible
|
|
933
|
+
var reqBodyContent = request.body
|
|
934
|
+
? renderValue(request.body)
|
|
935
|
+
: '<span class="value-pill" style="color:var(--text3)">No request body</span>';
|
|
936
|
+
html += renderCollapsibleSection('Request Body', reqBodyContent, request.body || null, false);
|
|
849
937
|
|
|
938
|
+
// Response Data - EXPANDED by default, always visible
|
|
850
939
|
if (response) {
|
|
851
|
-
var
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
if (response.headers) resRows.push(['Headers', response.headers]);
|
|
856
|
-
if (response.data) resRows.push(['Data', response.data]);
|
|
857
|
-
html += renderSection('Response', renderRows(resRows), response);
|
|
940
|
+
var resDataContent = response.data != null
|
|
941
|
+
? renderValue(response.data)
|
|
942
|
+
: '<span class="value-pill" style="color:var(--text3)">No response body</span>';
|
|
943
|
+
html += renderCollapsibleSection('Response Data', resDataContent, response.data || null, false);
|
|
858
944
|
}
|
|
945
|
+
|
|
946
|
+
// Error - always visible if present
|
|
859
947
|
if (entry.error) {
|
|
860
948
|
html += renderSection('Error', renderValue(entry.error), entry.error);
|
|
861
949
|
}
|
|
950
|
+
|
|
951
|
+
// Everything below is COLLAPSED by default
|
|
952
|
+
var reqHeadersContent = request.headers
|
|
953
|
+
? renderValue(request.headers)
|
|
954
|
+
: '<span class="value-pill" style="color:var(--text3)">No headers</span>';
|
|
955
|
+
html += renderCollapsibleSection('Request Headers', reqHeadersContent, request.headers || null, true);
|
|
956
|
+
|
|
957
|
+
if (response) {
|
|
958
|
+
var resHeadersContent = response.headers
|
|
959
|
+
? renderValue(response.headers)
|
|
960
|
+
: '<span class="value-pill" style="color:var(--text3)">No headers</span>';
|
|
961
|
+
html += renderCollapsibleSection('Response Headers', resHeadersContent, response.headers || null, true);
|
|
962
|
+
}
|
|
963
|
+
|
|
964
|
+
// cURL command
|
|
965
|
+
var curlStr = buildCurlCommand(entry);
|
|
966
|
+
if (curlStr) {
|
|
967
|
+
var curlContent = '<pre class="json-block" style="max-height:none;font-size:11px;line-height:1.6">' + escapeHtml(curlStr) + '</pre>';
|
|
968
|
+
html += renderCollapsibleSection('cURL', curlContent, curlStr, true);
|
|
969
|
+
}
|
|
970
|
+
|
|
862
971
|
return html;
|
|
863
972
|
}
|
|
864
973
|
|
|
974
|
+
// Keep in sync with src/features/network/NetworkLogTab.tsx buildCurl()
|
|
975
|
+
function buildCurlCommand(entry) {
|
|
976
|
+
var request = readObject(entry.request) || entry;
|
|
977
|
+
if (!request.url) return '';
|
|
978
|
+
var method = (request.method || 'GET').toUpperCase();
|
|
979
|
+
function q(s) { return String(s).replace(/'/g, "'\\''"); }
|
|
980
|
+
var parts = ["curl -X " + method + " '" + q(request.url) + "'"];
|
|
981
|
+
var headers = request.headers;
|
|
982
|
+
if (headers && typeof headers === 'object') {
|
|
983
|
+
Object.keys(headers).forEach(function(k) {
|
|
984
|
+
parts.push(" -H '" + q(k) + ": " + q(headers[k]) + "'");
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
var body = request.body;
|
|
988
|
+
if (body != null) {
|
|
989
|
+
var bodyStr = typeof body === 'string' ? body : JSON.stringify(body);
|
|
990
|
+
parts.push(" -d '" + q(bodyStr) + "'");
|
|
991
|
+
}
|
|
992
|
+
return parts.join(' \\\n');
|
|
993
|
+
}
|
|
994
|
+
|
|
865
995
|
function renderNavigationDetails(entry) {
|
|
866
996
|
var hero = '<div class="nav-hero">';
|
|
867
997
|
if (entry.from || entry.path) hero += '<span class="nav-from">' + escapeHtml(entry.from || entry.path || '-') + '</span>';
|
|
@@ -982,7 +1112,7 @@ mark{
|
|
|
982
1112
|
html += '<div><div class="device-title">' + escapeHtml(deviceText) + '</div>';
|
|
983
1113
|
html += '<div class="device-subtitle">IP ' + escapeHtml(ipText) + '</div></div>';
|
|
984
1114
|
html += '<div class="device-meta-group">';
|
|
985
|
-
html += '<div class="device-meta-line"><strong>
|
|
1115
|
+
html += '<div class="device-meta-line"><strong>ID</strong>' + escapeHtml(deviceLog.deviceId) + '</div>';
|
|
986
1116
|
html += '<div class="device-meta-line"><strong>Last seen</strong>' + formatTime(deviceLog.lastSeenAt || deviceLog.receivedAt) + '</div>';
|
|
987
1117
|
html += '</div>';
|
|
988
1118
|
html += '<div class="device-tags">' + renderDeviceTags(lc) + '</div>';
|
|
@@ -1043,7 +1173,7 @@ mark{
|
|
|
1043
1173
|
if (device && typeof device === 'object') {
|
|
1044
1174
|
html += '<div class="device-info">';
|
|
1045
1175
|
var pClass = device.platform === 'ios' ? 'platform-ios' : device.platform === 'android' ? 'platform-android' : '';
|
|
1046
|
-
html += '<span class="device-badge ' + pClass + '">' + escapeHtml((device.platform
|
|
1176
|
+
html += '<span class="device-badge ' + pClass + '">' + escapeHtml(capitalizePlatform(device.platform)) + '</span>';
|
|
1047
1177
|
if (device.model) html += '<span class="device-badge">' + escapeHtml(device.model) + '</span>';
|
|
1048
1178
|
if (device.osVersion) html += '<span class="device-badge">OS ' + escapeHtml(device.osVersion) + '</span>';
|
|
1049
1179
|
if (device.appVersion) html += '<span class="device-badge">v' + escapeHtml(device.appVersion) + '</span>';
|
|
@@ -1058,6 +1188,7 @@ mark{
|
|
|
1058
1188
|
html += renderCurlPanel('Curl this device', [
|
|
1059
1189
|
curlCommand('/devices/' + encodeURIComponent(deviceId)),
|
|
1060
1190
|
curlCommand('/devices/' + encodeURIComponent(deviceId) + '/logs?limit=200'),
|
|
1191
|
+
curlCommand('/devices/' + encodeURIComponent(deviceId) + '/logs?limit=200&includeBodies=true'),
|
|
1061
1192
|
curlCommand('/devices/' + encodeURIComponent(deviceId) + '/logs?type=network&failedOnly=true&limit=50'),
|
|
1062
1193
|
curlCommand('/devices/' + encodeURIComponent(deviceId) + '/logs?type=console&limit=200'),
|
|
1063
1194
|
]);
|
|
@@ -1089,10 +1220,6 @@ mark{
|
|
|
1089
1220
|
|
|
1090
1221
|
// Actions
|
|
1091
1222
|
html += '<div class="actions">';
|
|
1092
|
-
html += '<button class="btn" onclick="copyJSON()">';
|
|
1093
|
-
html += '<svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><rect x="9" y="9" width="13" height="13" rx="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/></svg>';
|
|
1094
|
-
html += 'Copy JSON</button>';
|
|
1095
|
-
html += '<span style="flex:1"></span>';
|
|
1096
1223
|
html += '<span style="font-size:10px;color:var(--text3);font-family:var(--font-mono)"><span class="kbd">/</span> search <span class="kbd">j</span><span class="kbd">k</span> navigate <span class="kbd">Enter</span> expand <span class="kbd">Esc</span> back</span>';
|
|
1097
1224
|
html += '</div>';
|
|
1098
1225
|
|
|
@@ -1183,12 +1310,9 @@ mark{
|
|
|
1183
1310
|
html += '<div class="log-copy" onclick="event.stopPropagation();copyEntryJSON(\'' + rowId + '\')"><button class="copy-btn" title="Copy entry JSON">⎘</button></div>';
|
|
1184
1311
|
html += '<div class="log-expand">' + (isExpanded ? '▶' : '▶') + '</div>';
|
|
1185
1312
|
html += '</div>';
|
|
1186
|
-
html += '<div class="log-detail
|
|
1313
|
+
html += '<div class="log-detail" id="detail-' + rowId + '">';
|
|
1187
1314
|
html += '<div class="log-detail-inner"><div class="detail-sections">';
|
|
1188
1315
|
html += renderLogDetails(entry, lt);
|
|
1189
|
-
html += '<div class="entry-footer">';
|
|
1190
|
-
html += '<button class="btn btn-sm" onclick="event.stopPropagation();copyEntryJSON(\'' + rowId + '\')">⎘ Copy JSON</button>';
|
|
1191
|
-
html += '</div>';
|
|
1192
1316
|
html += '</div></div></div>';
|
|
1193
1317
|
html += '</div>';
|
|
1194
1318
|
return html;
|
|
@@ -1213,8 +1337,24 @@ mark{
|
|
|
1213
1337
|
}
|
|
1214
1338
|
|
|
1215
1339
|
focusedIndex = -1;
|
|
1340
|
+
var currentSessionId = null;
|
|
1341
|
+
var knownSessionIds = new Set();
|
|
1342
|
+
if (currentDevice && currentDevice.session) {
|
|
1343
|
+
knownSessionIds.add(currentDevice.session.id);
|
|
1344
|
+
}
|
|
1216
1345
|
var html = '<div class="log-list">';
|
|
1217
1346
|
entries.forEach(function(item, i) {
|
|
1347
|
+
var entrySessionId = item.entry && typeof item.entry === 'object' ? item.entry.sessionId : null;
|
|
1348
|
+
if (entrySessionId && entrySessionId !== currentSessionId) {
|
|
1349
|
+
var isNewSession = knownSessionIds.has(entrySessionId);
|
|
1350
|
+
var label = isNewSession ? 'Current session' : ('Session ' + entrySessionId.slice(0, 8));
|
|
1351
|
+
html += '<div class="session-divider' + (isNewSession ? ' session-new' : '') + '">';
|
|
1352
|
+
html += '<div class="session-divider-line"></div>';
|
|
1353
|
+
html += '<span class="session-divider-label"><span class="session-divider-dot"></span>' + label + '</span>';
|
|
1354
|
+
html += '<div class="session-divider-line"></div>';
|
|
1355
|
+
html += '</div>';
|
|
1356
|
+
currentSessionId = entrySessionId;
|
|
1357
|
+
}
|
|
1218
1358
|
var absoluteIndex = startIndex + i;
|
|
1219
1359
|
var rowId = getLogEntryKey(item.entry, item.type, absoluteIndex);
|
|
1220
1360
|
html += renderLogEntryHtml(item.entry, item.type, rowId, i, expandedRows[rowId]);
|
|
@@ -1591,7 +1731,37 @@ mark{
|
|
|
1591
1731
|
}
|
|
1592
1732
|
|
|
1593
1733
|
var html = '';
|
|
1734
|
+
var liveCurrentSessionId = null;
|
|
1735
|
+
var liveKnownSessionIds = new Set();
|
|
1736
|
+
if (currentDevice && currentDevice.session) {
|
|
1737
|
+
liveKnownSessionIds.add(currentDevice.session.id);
|
|
1738
|
+
}
|
|
1739
|
+
// find existing sessionId from first entry in list for divider continuity
|
|
1740
|
+
var existingFirst = list.querySelector('.log-entry');
|
|
1741
|
+
if (existingFirst) {
|
|
1742
|
+
var existingIndex = parseInt(existingFirst.getAttribute('data-index'), 10);
|
|
1743
|
+
var existingEntries = collectLogEntries(
|
|
1744
|
+
currentDevice.report ? currentDevice.report.logs : {},
|
|
1745
|
+
readVisibleLogOptions().type,
|
|
1746
|
+
readVisibleLogOptions().failedOnly
|
|
1747
|
+
);
|
|
1748
|
+
var existingSlice = existingEntries.slice(0, PAGE_SIZE);
|
|
1749
|
+
if (existingSlice.length > 0 && existingSlice[0].entry && typeof existingSlice[0].entry === 'object') {
|
|
1750
|
+
liveCurrentSessionId = existingSlice[0].entry.sessionId || null;
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1594
1753
|
items.forEach(function(item) {
|
|
1754
|
+
var entrySessionId = item.entry && typeof item.entry === 'object' ? item.entry.sessionId : null;
|
|
1755
|
+
if (entrySessionId && entrySessionId !== liveCurrentSessionId) {
|
|
1756
|
+
var isNewSession = liveKnownSessionIds.has(entrySessionId);
|
|
1757
|
+
var label = isNewSession ? 'Current session' : ('Session ' + entrySessionId.slice(0, 8));
|
|
1758
|
+
html += '<div class="session-divider' + (isNewSession ? ' session-new' : '') + '">';
|
|
1759
|
+
html += '<div class="session-divider-line"></div>';
|
|
1760
|
+
html += '<span class="session-divider-label"><span class="session-divider-dot"></span>' + label + '</span>';
|
|
1761
|
+
html += '<div class="session-divider-line"></div>';
|
|
1762
|
+
html += '</div>';
|
|
1763
|
+
liveCurrentSessionId = entrySessionId;
|
|
1764
|
+
}
|
|
1595
1765
|
var rowId = getLogEntryKey(item.entry, item.type, 'live-' + (liveSequence += 1));
|
|
1596
1766
|
html += renderLogEntryHtml(item.entry, item.type, rowId, 0, false);
|
|
1597
1767
|
});
|