browser-debugger-cli 0.6.6 → 0.6.8
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 +48 -269
- package/dist/commands/__tests__/console.contract.test.d.ts +9 -0
- package/dist/commands/__tests__/console.contract.test.d.ts.map +1 -0
- package/dist/commands/__tests__/console.contract.test.js +118 -0
- package/dist/commands/__tests__/console.contract.test.js.map +1 -0
- package/dist/commands/__tests__/helpJson.contract.test.d.ts +12 -0
- package/dist/commands/__tests__/helpJson.contract.test.d.ts.map +1 -0
- package/dist/commands/__tests__/helpJson.contract.test.js +121 -0
- package/dist/commands/__tests__/helpJson.contract.test.js.map +1 -0
- package/dist/commands/__tests__/machineReadableHelp.contract.test.js +26 -7
- package/dist/commands/__tests__/machineReadableHelp.contract.test.js.map +1 -1
- package/dist/commands/cdp.d.ts.map +1 -1
- package/dist/commands/cdp.js.map +1 -1
- package/dist/commands/cleanup.d.ts.map +1 -1
- package/dist/commands/cleanup.js +17 -91
- package/dist/commands/cleanup.js.map +1 -1
- package/dist/commands/console.d.ts +17 -0
- package/dist/commands/console.d.ts.map +1 -1
- package/dist/commands/console.js +158 -56
- package/dist/commands/console.js.map +1 -1
- package/dist/commands/details.d.ts.map +1 -1
- package/dist/commands/details.js +3 -1
- package/dist/commands/details.js.map +1 -1
- package/dist/commands/dom/DomElementResolver.d.ts +138 -0
- package/dist/commands/dom/DomElementResolver.d.ts.map +1 -0
- package/dist/commands/dom/DomElementResolver.js +173 -0
- package/dist/commands/dom/DomElementResolver.js.map +1 -0
- package/dist/commands/dom/a11y.d.ts.map +1 -1
- package/dist/commands/dom/a11y.js +4 -28
- package/dist/commands/dom/a11y.js.map +1 -1
- package/dist/commands/dom/evalHelpers.d.ts.map +1 -1
- package/dist/commands/dom/evalHelpers.js +1 -1
- package/dist/commands/dom/evalHelpers.js.map +1 -1
- package/dist/commands/dom/formFillHelpers.d.ts.map +1 -1
- package/dist/commands/dom/formFillHelpers.js +11 -11
- package/dist/commands/dom/formFillHelpers.js.map +1 -1
- package/dist/commands/dom/formInteraction.d.ts.map +1 -1
- package/dist/commands/dom/formInteraction.js +5 -5
- package/dist/commands/dom/formInteraction.js.map +1 -1
- package/dist/commands/dom/helpers.d.ts +0 -50
- package/dist/commands/dom/helpers.d.ts.map +1 -1
- package/dist/commands/dom/helpers.js +2 -56
- package/dist/commands/dom/helpers.js.map +1 -1
- package/dist/commands/dom/index.d.ts.map +1 -1
- package/dist/commands/dom/index.js +50 -44
- package/dist/commands/dom/index.js.map +1 -1
- package/dist/commands/dom/keyMapping.d.ts +0 -6
- package/dist/commands/dom/keyMapping.d.ts.map +1 -1
- package/dist/commands/dom/keyMapping.js +0 -8
- package/dist/commands/dom/keyMapping.js.map +1 -1
- package/dist/commands/dom/reactEventHelpers.d.ts +12 -18
- package/dist/commands/dom/reactEventHelpers.d.ts.map +1 -1
- package/dist/commands/dom/reactEventHelpers.js +21 -70
- package/dist/commands/dom/reactEventHelpers.js.map +1 -1
- package/dist/commands/helpJson.d.ts +165 -0
- package/dist/commands/helpJson.d.ts.map +1 -0
- package/dist/commands/helpJson.js +252 -0
- package/dist/commands/helpJson.js.map +1 -0
- package/dist/commands/machineReadableHelp.d.ts +21 -2
- package/dist/commands/machineReadableHelp.d.ts.map +1 -1
- package/dist/commands/machineReadableHelp.js +95 -60
- package/dist/commands/machineReadableHelp.js.map +1 -1
- package/dist/commands/network.d.ts.map +1 -1
- package/dist/commands/network.js.map +1 -1
- package/dist/commands/peek.d.ts.map +1 -1
- package/dist/commands/peek.js +5 -7
- package/dist/commands/peek.js.map +1 -1
- package/dist/commands/shared/CommandRunner.d.ts +4 -10
- package/dist/commands/shared/CommandRunner.d.ts.map +1 -1
- package/dist/commands/shared/CommandRunner.js +2 -2
- package/dist/commands/shared/CommandRunner.js.map +1 -1
- package/dist/commands/shared/commonOptions.d.ts +0 -15
- package/dist/commands/shared/commonOptions.d.ts.map +1 -1
- package/dist/commands/shared/commonOptions.js +0 -32
- package/dist/commands/shared/commonOptions.js.map +1 -1
- package/dist/commands/shared/optionTypes.d.ts +247 -0
- package/dist/commands/shared/optionTypes.d.ts.map +1 -0
- package/dist/commands/shared/optionTypes.js +20 -0
- package/dist/commands/shared/optionTypes.js.map +1 -0
- package/dist/commands/shared/startHelpers.d.ts.map +1 -1
- package/dist/commands/shared/startHelpers.js +3 -3
- package/dist/commands/shared/startHelpers.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +8 -6
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/stop.d.ts.map +1 -1
- package/dist/commands/stop.js +17 -43
- package/dist/commands/stop.js.map +1 -1
- package/dist/commands/tail.d.ts.map +1 -1
- package/dist/commands/tail.js +49 -59
- package/dist/commands/tail.js.map +1 -1
- package/dist/connection/types.d.ts +2 -1
- package/dist/connection/types.d.ts.map +1 -1
- package/dist/constants.d.ts +14 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +39 -0
- package/dist/constants.js.map +1 -1
- package/dist/daemon/handlers/responseHandler.d.ts.map +1 -1
- package/dist/daemon/handlers/responseHandler.js +1 -0
- package/dist/daemon/handlers/responseHandler.js.map +1 -1
- package/dist/daemon/ipcServer.js +8 -8
- package/dist/daemon/ipcServer.js.map +1 -1
- package/dist/daemon/lifecycle/signalHandlers.d.ts.map +1 -1
- package/dist/daemon/lifecycle/signalHandlers.js +19 -3
- package/dist/daemon/lifecycle/signalHandlers.js.map +1 -1
- package/dist/daemon/lifecycle/workerCleanup.d.ts.map +1 -1
- package/dist/daemon/lifecycle/workerCleanup.js +5 -2
- package/dist/daemon/lifecycle/workerCleanup.js.map +1 -1
- package/dist/daemon/patternDefinitions.d.ts +0 -13
- package/dist/daemon/patternDefinitions.d.ts.map +1 -1
- package/dist/daemon/patternDefinitions.js +0 -17
- package/dist/daemon/patternDefinitions.js.map +1 -1
- package/dist/daemon/worker/commandRegistry.d.ts.map +1 -1
- package/dist/daemon/worker/commandRegistry.js +3 -0
- package/dist/daemon/worker/commandRegistry.js.map +1 -1
- package/dist/index.js +34 -2
- package/dist/index.js.map +1 -1
- package/dist/ipc/protocol/commands.d.ts +2 -0
- package/dist/ipc/protocol/commands.d.ts.map +1 -1
- package/dist/ipc/protocol/commands.js.map +1 -1
- package/dist/ipc/session/queries.d.ts +2 -0
- package/dist/ipc/session/queries.d.ts.map +1 -1
- package/dist/ipc/utils/responseValidator.d.ts +7 -1
- package/dist/ipc/utils/responseValidator.d.ts.map +1 -1
- package/dist/ipc/utils/responseValidator.js +6 -1
- package/dist/ipc/utils/responseValidator.js.map +1 -1
- package/dist/session/QueryCacheManager.d.ts +140 -0
- package/dist/session/QueryCacheManager.d.ts.map +1 -0
- package/dist/session/QueryCacheManager.js +233 -0
- package/dist/session/QueryCacheManager.js.map +1 -0
- package/dist/session/cleanup.d.ts +63 -1
- package/dist/session/cleanup.d.ts.map +1 -1
- package/dist/session/cleanup.js +191 -65
- package/dist/session/cleanup.js.map +1 -1
- package/dist/session/queryCache.d.ts +25 -14
- package/dist/session/queryCache.d.ts.map +1 -1
- package/dist/session/queryCache.js +31 -60
- package/dist/session/queryCache.js.map +1 -1
- package/dist/telemetry/__tests__/roleInference.unit.test.d.ts +9 -0
- package/dist/telemetry/__tests__/roleInference.unit.test.d.ts.map +1 -0
- package/dist/telemetry/__tests__/roleInference.unit.test.js +138 -0
- package/dist/telemetry/__tests__/roleInference.unit.test.js.map +1 -0
- package/dist/telemetry/console.d.ts.map +1 -1
- package/dist/telemetry/console.js +29 -17
- package/dist/telemetry/console.js.map +1 -1
- package/dist/telemetry/dom.d.ts +1 -0
- package/dist/telemetry/dom.d.ts.map +1 -1
- package/dist/telemetry/dom.js +9 -4
- package/dist/telemetry/dom.js.map +1 -1
- package/dist/telemetry/filters.d.ts +3 -0
- package/dist/telemetry/filters.d.ts.map +1 -1
- package/dist/telemetry/filters.js +25 -3
- package/dist/telemetry/filters.js.map +1 -1
- package/dist/telemetry/network.d.ts.map +1 -1
- package/dist/telemetry/network.js +35 -6
- package/dist/telemetry/network.js.map +1 -1
- package/dist/telemetry/remoteObject.d.ts +58 -0
- package/dist/telemetry/remoteObject.d.ts.map +1 -0
- package/dist/telemetry/remoteObject.js +134 -0
- package/dist/telemetry/remoteObject.js.map +1 -0
- package/dist/telemetry/roleInference.d.ts +50 -0
- package/dist/telemetry/roleInference.d.ts.map +1 -0
- package/dist/telemetry/roleInference.js +163 -0
- package/dist/telemetry/roleInference.js.map +1 -0
- package/dist/telemetry/utils.d.ts +0 -57
- package/dist/telemetry/utils.d.ts.map +1 -1
- package/dist/telemetry/utils.js +0 -71
- package/dist/telemetry/utils.js.map +1 -1
- package/dist/types/dom.d.ts +2 -0
- package/dist/types/dom.d.ts.map +1 -1
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/formatters/a11y.d.ts +0 -9
- package/dist/ui/formatters/a11y.d.ts.map +1 -1
- package/dist/ui/formatters/a11y.js +0 -45
- package/dist/ui/formatters/a11y.js.map +1 -1
- package/dist/ui/formatters/console.d.ts +131 -0
- package/dist/ui/formatters/console.d.ts.map +1 -0
- package/dist/ui/formatters/console.js +400 -0
- package/dist/ui/formatters/console.js.map +1 -0
- package/dist/ui/formatters/preview.d.ts.map +1 -1
- package/dist/ui/formatters/preview.js +2 -39
- package/dist/ui/formatters/preview.js.map +1 -1
- package/dist/ui/logging/index.d.ts +1 -1
- package/dist/ui/logging/index.d.ts.map +1 -1
- package/dist/ui/logging/index.js +1 -1
- package/dist/ui/logging/index.js.map +1 -1
- package/dist/ui/logging/logger.d.ts +21 -0
- package/dist/ui/logging/logger.d.ts.map +1 -1
- package/dist/ui/logging/logger.js +24 -6
- package/dist/ui/logging/logger.js.map +1 -1
- package/dist/ui/messages/commands.d.ts +0 -14
- package/dist/ui/messages/commands.d.ts.map +1 -1
- package/dist/ui/messages/commands.js +0 -18
- package/dist/ui/messages/commands.js.map +1 -1
- package/dist/ui/messages/consoleMessages.d.ts +12 -27
- package/dist/ui/messages/consoleMessages.d.ts.map +1 -1
- package/dist/ui/messages/consoleMessages.js +16 -31
- package/dist/ui/messages/consoleMessages.js.map +1 -1
- package/dist/ui/messages/errors.d.ts +0 -16
- package/dist/ui/messages/errors.d.ts.map +1 -1
- package/dist/ui/messages/errors.js +0 -18
- package/dist/ui/messages/errors.js.map +1 -1
- package/dist/ui/messages/hints.d.ts +0 -10
- package/dist/ui/messages/hints.d.ts.map +1 -1
- package/dist/ui/messages/hints.js +0 -12
- package/dist/ui/messages/hints.js.map +1 -1
- package/dist/utils/decisionTrees.d.ts +0 -17
- package/dist/utils/decisionTrees.d.ts.map +1 -1
- package/dist/utils/decisionTrees.js +17 -23
- package/dist/utils/decisionTrees.js.map +1 -1
- package/dist/utils/errorMapping.d.ts +60 -0
- package/dist/utils/errorMapping.d.ts.map +1 -0
- package/dist/utils/errorMapping.js +97 -0
- package/dist/utils/errorMapping.js.map +1 -0
- package/dist/utils/file.d.ts +27 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/file.js +37 -0
- package/dist/utils/file.js.map +1 -0
- package/dist/utils/levenshtein.d.ts +0 -17
- package/dist/utils/levenshtein.d.ts.map +1 -1
- package/dist/utils/levenshtein.js +0 -31
- package/dist/utils/levenshtein.js.map +1 -1
- package/dist/utils/strings.d.ts +14 -0
- package/dist/utils/strings.d.ts.map +1 -0
- package/dist/utils/strings.js +23 -0
- package/dist/utils/strings.js.map +1 -0
- package/dist/utils/taskMappings.d.ts +0 -17
- package/dist/utils/taskMappings.d.ts.map +1 -1
- package/dist/utils/taskMappings.js +18 -24
- package/dist/utils/taskMappings.js.map +1 -1
- package/dist/utils/typeGuards.d.ts +62 -0
- package/dist/utils/typeGuards.d.ts.map +1 -0
- package/dist/utils/typeGuards.js +94 -0
- package/dist/utils/typeGuards.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized IPC error-to-exit code mapping.
|
|
3
|
+
*
|
|
4
|
+
* Provides a single source of truth for mapping IPC error codes and connection
|
|
5
|
+
* errors to semantic exit codes. This eliminates scattered, inconsistent error
|
|
6
|
+
* handling across commands.
|
|
7
|
+
*
|
|
8
|
+
* WHY: Different commands had duplicate, inconsistent error-to-exit-code logic.
|
|
9
|
+
* Some used helper functions, others used string matching. This module provides
|
|
10
|
+
* consistent, maintainable error handling.
|
|
11
|
+
*/
|
|
12
|
+
import { IPCErrorCode } from '../ipc/index.js';
|
|
13
|
+
/**
|
|
14
|
+
* Map IPC error codes to semantic exit codes.
|
|
15
|
+
*
|
|
16
|
+
* @param errorCode - IPC error code from daemon response
|
|
17
|
+
* @returns Semantic exit code for the error
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* const exitCode = getExitCodeForIPCError(response.errorCode);
|
|
22
|
+
* process.exit(exitCode);
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare function getExitCodeForIPCError(errorCode?: IPCErrorCode): number;
|
|
26
|
+
/**
|
|
27
|
+
* Map connection error messages to semantic exit codes.
|
|
28
|
+
*
|
|
29
|
+
* Handles common socket and connection errors that indicate the daemon
|
|
30
|
+
* is not running or unreachable.
|
|
31
|
+
*
|
|
32
|
+
* @param errorMessage - Error message string to analyze
|
|
33
|
+
* @returns Semantic exit code for the error
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* try {
|
|
38
|
+
* await connectToDaemon();
|
|
39
|
+
* } catch (error) {
|
|
40
|
+
* const exitCode = getExitCodeForConnectionError(getErrorMessage(error));
|
|
41
|
+
* process.exit(exitCode);
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare function getExitCodeForConnectionError(errorMessage: string): number;
|
|
46
|
+
/**
|
|
47
|
+
* Check if an error message indicates the daemon is not running.
|
|
48
|
+
*
|
|
49
|
+
* @param errorMessage - Error message to check
|
|
50
|
+
* @returns True if the error indicates daemon is not running
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* if (isDaemonNotRunningError(errorMessage)) {
|
|
55
|
+
* console.error('Start a session first with: bdg <url>');
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function isDaemonNotRunningError(errorMessage: string): boolean;
|
|
60
|
+
//# sourceMappingURL=errorMapping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorMapping.d.ts","sourceRoot":"","sources":["../../src/utils/errorMapping.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,CAAC,EAAE,YAAY,GAAG,MAAM,CAoBvE;AASD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,6BAA6B,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAgB1E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAErE"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized IPC error-to-exit code mapping.
|
|
3
|
+
*
|
|
4
|
+
* Provides a single source of truth for mapping IPC error codes and connection
|
|
5
|
+
* errors to semantic exit codes. This eliminates scattered, inconsistent error
|
|
6
|
+
* handling across commands.
|
|
7
|
+
*
|
|
8
|
+
* WHY: Different commands had duplicate, inconsistent error-to-exit-code logic.
|
|
9
|
+
* Some used helper functions, others used string matching. This module provides
|
|
10
|
+
* consistent, maintainable error handling.
|
|
11
|
+
*/
|
|
12
|
+
import { IPCErrorCode } from '../ipc/index.js';
|
|
13
|
+
import { EXIT_CODES } from '../utils/exitCodes.js';
|
|
14
|
+
/**
|
|
15
|
+
* Map IPC error codes to semantic exit codes.
|
|
16
|
+
*
|
|
17
|
+
* @param errorCode - IPC error code from daemon response
|
|
18
|
+
* @returns Semantic exit code for the error
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const exitCode = getExitCodeForIPCError(response.errorCode);
|
|
23
|
+
* process.exit(exitCode);
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export function getExitCodeForIPCError(errorCode) {
|
|
27
|
+
switch (errorCode) {
|
|
28
|
+
case IPCErrorCode.NO_SESSION:
|
|
29
|
+
return EXIT_CODES.RESOURCE_NOT_FOUND;
|
|
30
|
+
case IPCErrorCode.SESSION_ALREADY_RUNNING:
|
|
31
|
+
return EXIT_CODES.RESOURCE_ALREADY_EXISTS;
|
|
32
|
+
case IPCErrorCode.CHROME_LAUNCH_FAILED:
|
|
33
|
+
return EXIT_CODES.CHROME_LAUNCH_FAILURE;
|
|
34
|
+
case IPCErrorCode.CDP_TIMEOUT:
|
|
35
|
+
return EXIT_CODES.CDP_TIMEOUT;
|
|
36
|
+
case IPCErrorCode.SESSION_KILL_FAILED:
|
|
37
|
+
case IPCErrorCode.WORKER_START_FAILED:
|
|
38
|
+
case IPCErrorCode.DAEMON_ERROR:
|
|
39
|
+
case undefined:
|
|
40
|
+
return EXIT_CODES.UNHANDLED_EXCEPTION;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check if error indicates socket connection failure (daemon not running).
|
|
45
|
+
*/
|
|
46
|
+
function isSocketConnectionError(lowerMessage) {
|
|
47
|
+
return lowerMessage.includes('enoent') || lowerMessage.includes('econnrefused');
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Map connection error messages to semantic exit codes.
|
|
51
|
+
*
|
|
52
|
+
* Handles common socket and connection errors that indicate the daemon
|
|
53
|
+
* is not running or unreachable.
|
|
54
|
+
*
|
|
55
|
+
* @param errorMessage - Error message string to analyze
|
|
56
|
+
* @returns Semantic exit code for the error
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```typescript
|
|
60
|
+
* try {
|
|
61
|
+
* await connectToDaemon();
|
|
62
|
+
* } catch (error) {
|
|
63
|
+
* const exitCode = getExitCodeForConnectionError(getErrorMessage(error));
|
|
64
|
+
* process.exit(exitCode);
|
|
65
|
+
* }
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export function getExitCodeForConnectionError(errorMessage) {
|
|
69
|
+
const lowerMessage = errorMessage.toLowerCase();
|
|
70
|
+
if (isSocketConnectionError(lowerMessage)) {
|
|
71
|
+
return EXIT_CODES.RESOURCE_NOT_FOUND;
|
|
72
|
+
}
|
|
73
|
+
if (lowerMessage.includes('no active session')) {
|
|
74
|
+
return EXIT_CODES.RESOURCE_NOT_FOUND;
|
|
75
|
+
}
|
|
76
|
+
if (lowerMessage.includes('timeout')) {
|
|
77
|
+
return EXIT_CODES.CDP_TIMEOUT;
|
|
78
|
+
}
|
|
79
|
+
return EXIT_CODES.SESSION_FILE_ERROR;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Check if an error message indicates the daemon is not running.
|
|
83
|
+
*
|
|
84
|
+
* @param errorMessage - Error message to check
|
|
85
|
+
* @returns True if the error indicates daemon is not running
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```typescript
|
|
89
|
+
* if (isDaemonNotRunningError(errorMessage)) {
|
|
90
|
+
* console.error('Start a session first with: bdg <url>');
|
|
91
|
+
* }
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export function isDaemonNotRunningError(errorMessage) {
|
|
95
|
+
return isSocketConnectionError(errorMessage.toLowerCase());
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=errorMapping.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorMapping.js","sourceRoot":"","sources":["../../src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,IAAI,YAAY,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;QACrC,OAAO,UAAU,CAAC,WAAW,CAAC;IAChC,CAAC;IAED,OAAO,UAAU,CAAC,kBAAkB,CAAC;AACvC,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,uBAAuB,CAAC,YAAoB;IAC1D,OAAO,uBAAuB,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File system utilities for safe file operations.
|
|
3
|
+
*
|
|
4
|
+
* Provides wrapper functions that handle errors gracefully and log failures
|
|
5
|
+
* at debug level instead of throwing exceptions.
|
|
6
|
+
*/
|
|
7
|
+
import type { Logger } from '../ui/logging/index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Safely remove a file, logging any errors at debug level.
|
|
10
|
+
*
|
|
11
|
+
* Uses `fs.rmSync` with `force: true` to avoid errors if the file doesn't exist.
|
|
12
|
+
* Any errors during removal are logged at debug level instead of thrown.
|
|
13
|
+
*
|
|
14
|
+
* @param path - Absolute path to the file to remove
|
|
15
|
+
* @param context - Human-readable description for debug logging (e.g., "metadata file")
|
|
16
|
+
* @param log - Logger instance to use for debug output
|
|
17
|
+
* @returns True if file was removed or didn't exist, false if removal failed
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* const log = createLogger('cleanup');
|
|
22
|
+
* safeRemoveFile('/path/to/session.pid', 'session PID file', log);
|
|
23
|
+
* // On error logs: [cleanup] Failed to remove session PID file: EACCES: permission denied
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare function safeRemoveFile(path: string, context: string, log: Logger): boolean;
|
|
27
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAGpD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAQlF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File system utilities for safe file operations.
|
|
3
|
+
*
|
|
4
|
+
* Provides wrapper functions that handle errors gracefully and log failures
|
|
5
|
+
* at debug level instead of throwing exceptions.
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
import { logDebugError } from '../ui/logging/index.js';
|
|
9
|
+
/**
|
|
10
|
+
* Safely remove a file, logging any errors at debug level.
|
|
11
|
+
*
|
|
12
|
+
* Uses `fs.rmSync` with `force: true` to avoid errors if the file doesn't exist.
|
|
13
|
+
* Any errors during removal are logged at debug level instead of thrown.
|
|
14
|
+
*
|
|
15
|
+
* @param path - Absolute path to the file to remove
|
|
16
|
+
* @param context - Human-readable description for debug logging (e.g., "metadata file")
|
|
17
|
+
* @param log - Logger instance to use for debug output
|
|
18
|
+
* @returns True if file was removed or didn't exist, false if removal failed
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const log = createLogger('cleanup');
|
|
23
|
+
* safeRemoveFile('/path/to/session.pid', 'session PID file', log);
|
|
24
|
+
* // On error logs: [cleanup] Failed to remove session PID file: EACCES: permission denied
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function safeRemoveFile(path, context, log) {
|
|
28
|
+
try {
|
|
29
|
+
fs.rmSync(path, { force: true });
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
logDebugError(log, `remove ${context}`, error);
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAGzB,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,OAAe,EAAE,GAAW;IACvE,IAAI,CAAC;QACH,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;QACjC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,aAAa,CAAC,GAAG,EAAE,UAAU,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC;QAC/C,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -25,21 +25,4 @@
|
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
27
|
export declare function levenshteinDistance(str1: string, str2: string): number;
|
|
28
|
-
/**
|
|
29
|
-
* Find closest matches from a list of candidates based on edit distance.
|
|
30
|
-
*
|
|
31
|
-
* @param target - The string to match against
|
|
32
|
-
* @param candidates - Array of candidate strings
|
|
33
|
-
* @param maxResults - Maximum number of results to return (default: 3)
|
|
34
|
-
* @param maxDistance - Maximum edit distance to consider (default: half target length or 3)
|
|
35
|
-
* @returns Array of closest matching candidates, sorted by distance
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```typescript
|
|
39
|
-
* const candidates = ['apple', 'application', 'apply', 'banana'];
|
|
40
|
-
* findClosestMatches('aple', candidates); // ['apple', 'apply']
|
|
41
|
-
* findClosestMatches('app', candidates, 2); // ['apple', 'apply']
|
|
42
|
-
* ```
|
|
43
|
-
*/
|
|
44
|
-
export declare function findClosestMatches(target: string, candidates: string[], maxResults?: number, maxDistance?: number): string[];
|
|
45
28
|
//# sourceMappingURL=levenshtein.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"levenshtein.d.ts","sourceRoot":"","sources":["../../src/utils/levenshtein.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA6BtE
|
|
1
|
+
{"version":3,"file":"levenshtein.d.ts","sourceRoot":"","sources":["../../src/utils/levenshtein.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CA6BtE"}
|
|
@@ -51,35 +51,4 @@ export function levenshteinDistance(str1, str2) {
|
|
|
51
51
|
}
|
|
52
52
|
return matrix[len1]?.[len2] ?? 0;
|
|
53
53
|
}
|
|
54
|
-
/**
|
|
55
|
-
* Find closest matches from a list of candidates based on edit distance.
|
|
56
|
-
*
|
|
57
|
-
* @param target - The string to match against
|
|
58
|
-
* @param candidates - Array of candidate strings
|
|
59
|
-
* @param maxResults - Maximum number of results to return (default: 3)
|
|
60
|
-
* @param maxDistance - Maximum edit distance to consider (default: half target length or 3)
|
|
61
|
-
* @returns Array of closest matching candidates, sorted by distance
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```typescript
|
|
65
|
-
* const candidates = ['apple', 'application', 'apply', 'banana'];
|
|
66
|
-
* findClosestMatches('aple', candidates); // ['apple', 'apply']
|
|
67
|
-
* findClosestMatches('app', candidates, 2); // ['apple', 'apply']
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
export function findClosestMatches(target, candidates, maxResults = 3, maxDistance) {
|
|
71
|
-
const targetLower = target.toLowerCase();
|
|
72
|
-
const threshold = maxDistance ?? Math.max(targetLower.length / 2, 3);
|
|
73
|
-
const matches = [];
|
|
74
|
-
for (const candidate of candidates) {
|
|
75
|
-
const distance = levenshteinDistance(targetLower, candidate.toLowerCase());
|
|
76
|
-
if (distance <= threshold) {
|
|
77
|
-
matches.push({ candidate, distance });
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return matches
|
|
81
|
-
.sort((a, b) => a.distance - b.distance)
|
|
82
|
-
.slice(0, maxResults)
|
|
83
|
-
.map((m) => m.candidate);
|
|
84
|
-
}
|
|
85
54
|
//# sourceMappingURL=levenshtein.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"levenshtein.js","sourceRoot":"","sources":["../../src/utils/levenshtein.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,IAAY;IAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACzB,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;IACzB,MAAM,MAAM,GAAe,EAAE,CAAC;IAE9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC3B,IAAI,QAAQ,EAAE,CAAC;QACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/B,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QAC/B,MAAM,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AAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String manipulation utilities.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Truncate text to a maximum character length.
|
|
6
|
+
*
|
|
7
|
+
* Adds an ellipsis character when text is truncated.
|
|
8
|
+
*
|
|
9
|
+
* @param text - Text to truncate
|
|
10
|
+
* @param maxLength - Maximum character length (default: 500)
|
|
11
|
+
* @returns Truncated text with ellipsis if needed
|
|
12
|
+
*/
|
|
13
|
+
export declare function truncateByLength(text: string, maxLength?: number): string;
|
|
14
|
+
//# sourceMappingURL=strings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/utils/strings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,GAAE,MAA2B,GAAG,MAAM,CAK7F"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* String manipulation utilities.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Default maximum text length for truncation.
|
|
6
|
+
*/
|
|
7
|
+
const DEFAULT_MAX_LENGTH = 500;
|
|
8
|
+
/**
|
|
9
|
+
* Truncate text to a maximum character length.
|
|
10
|
+
*
|
|
11
|
+
* Adds an ellipsis character when text is truncated.
|
|
12
|
+
*
|
|
13
|
+
* @param text - Text to truncate
|
|
14
|
+
* @param maxLength - Maximum character length (default: 500)
|
|
15
|
+
* @returns Truncated text with ellipsis if needed
|
|
16
|
+
*/
|
|
17
|
+
export function truncateByLength(text, maxLength = DEFAULT_MAX_LENGTH) {
|
|
18
|
+
if (text.length <= maxLength) {
|
|
19
|
+
return text;
|
|
20
|
+
}
|
|
21
|
+
return text.slice(0, maxLength - 1) + '…';
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=strings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strings.js","sourceRoot":"","sources":["../../src/utils/strings.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,YAAoB,kBAAkB;IACnF,IAAI,IAAI,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC;AAC5C,CAAC"}
|
|
@@ -21,27 +21,10 @@ export interface TaskMapping {
|
|
|
21
21
|
* Maps common automation intents to optimal command patterns.
|
|
22
22
|
*/
|
|
23
23
|
export declare const TASK_MAPPINGS: Record<string, TaskMapping>;
|
|
24
|
-
/**
|
|
25
|
-
* Get task mapping by key.
|
|
26
|
-
*
|
|
27
|
-
* @param taskKey - Task identifier
|
|
28
|
-
* @returns Task mapping if found, undefined otherwise
|
|
29
|
-
*/
|
|
30
|
-
export declare function getTaskMapping(taskKey: string): TaskMapping | undefined;
|
|
31
24
|
/**
|
|
32
25
|
* Get all task mappings.
|
|
33
26
|
*
|
|
34
27
|
* @returns Complete task mapping registry
|
|
35
28
|
*/
|
|
36
29
|
export declare function getAllTaskMappings(): Record<string, TaskMapping>;
|
|
37
|
-
/**
|
|
38
|
-
* Search task mappings by description keyword.
|
|
39
|
-
*
|
|
40
|
-
* @param keyword - Search term (case-insensitive)
|
|
41
|
-
* @returns Matching task mappings with keys
|
|
42
|
-
*/
|
|
43
|
-
export declare function searchTaskMappings(keyword: string): Array<{
|
|
44
|
-
key: string;
|
|
45
|
-
mapping: TaskMapping;
|
|
46
|
-
}>;
|
|
47
30
|
//# sourceMappingURL=taskMappings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskMappings.d.ts","sourceRoot":"","sources":["../../src/utils/taskMappings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"taskMappings.d.ts","sourceRoot":"","sources":["../../src/utils/taskMappings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,oDAAoD;IACpD,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,sCAAsC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAkHrD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAEhE"}
|
|
@@ -65,9 +65,24 @@ export const TASK_MAPPINGS = {
|
|
|
65
65
|
description: 'Get HTTP headers for specific request',
|
|
66
66
|
cdpAlternative: 'Network.getResponseBody + event data',
|
|
67
67
|
},
|
|
68
|
-
|
|
69
|
-
commands: ['console
|
|
70
|
-
description: '
|
|
68
|
+
inspect_console: {
|
|
69
|
+
commands: ['console'],
|
|
70
|
+
description: 'Smart console inspection (current page, errors/warnings deduplicated)',
|
|
71
|
+
cdpAlternative: 'Runtime.consoleAPICalled events',
|
|
72
|
+
},
|
|
73
|
+
console_history: {
|
|
74
|
+
commands: ['console --history'],
|
|
75
|
+
description: 'Show console messages from all page loads',
|
|
76
|
+
cdpAlternative: 'Runtime.consoleAPICalled events',
|
|
77
|
+
},
|
|
78
|
+
stream_console: {
|
|
79
|
+
commands: ['console --follow'],
|
|
80
|
+
description: 'Stream console messages in real-time',
|
|
81
|
+
cdpAlternative: 'Runtime.consoleAPICalled event subscription',
|
|
82
|
+
},
|
|
83
|
+
list_console_messages: {
|
|
84
|
+
commands: ['console --list'],
|
|
85
|
+
description: 'List all console messages chronologically',
|
|
71
86
|
cdpAlternative: 'Runtime.consoleAPICalled events',
|
|
72
87
|
},
|
|
73
88
|
preview_data: {
|
|
@@ -91,15 +106,6 @@ export const TASK_MAPPINGS = {
|
|
|
91
106
|
cdpAlternative: 'IPC ping + process checks',
|
|
92
107
|
},
|
|
93
108
|
};
|
|
94
|
-
/**
|
|
95
|
-
* Get task mapping by key.
|
|
96
|
-
*
|
|
97
|
-
* @param taskKey - Task identifier
|
|
98
|
-
* @returns Task mapping if found, undefined otherwise
|
|
99
|
-
*/
|
|
100
|
-
export function getTaskMapping(taskKey) {
|
|
101
|
-
return TASK_MAPPINGS[taskKey];
|
|
102
|
-
}
|
|
103
109
|
/**
|
|
104
110
|
* Get all task mappings.
|
|
105
111
|
*
|
|
@@ -108,16 +114,4 @@ export function getTaskMapping(taskKey) {
|
|
|
108
114
|
export function getAllTaskMappings() {
|
|
109
115
|
return TASK_MAPPINGS;
|
|
110
116
|
}
|
|
111
|
-
/**
|
|
112
|
-
* Search task mappings by description keyword.
|
|
113
|
-
*
|
|
114
|
-
* @param keyword - Search term (case-insensitive)
|
|
115
|
-
* @returns Matching task mappings with keys
|
|
116
|
-
*/
|
|
117
|
-
export function searchTaskMappings(keyword) {
|
|
118
|
-
const lowerKeyword = keyword.toLowerCase();
|
|
119
|
-
return Object.entries(TASK_MAPPINGS)
|
|
120
|
-
.filter(([, mapping]) => mapping.description.toLowerCase().includes(lowerKeyword))
|
|
121
|
-
.map(([key, mapping]) => ({ key, mapping }));
|
|
122
|
-
}
|
|
123
117
|
//# sourceMappingURL=taskMappings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskMappings.js","sourceRoot":"","sources":["../../src/utils/taskMappings.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAcH;;;;GAIG;AACH,MAAM,CAAC,MAAM,aAAa,GAAgC;IACxD,kBAAkB,EAAE;QAClB,QAAQ,EAAE,CAAC,gBAAgB,CAAC;QAC5B,WAAW,EAAE,sCAAsC;QACnD,cAAc,EAAE,wBAAwB;KACzC;IAED,kBAAkB,EAAE;QAClB,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,WAAW,EAAE,oCAAoC;QACjD,cAAc,EAAE,qCAAqC;KACtD;IAED,kBAAkB,EAAE;QAClB,QAAQ,EAAE,CAAC,UAAU,CAAC;QACtB,WAAW,EAAE,8CAA8C;QAC3D,cAAc,EAAE,kBAAkB;KACnC;IAED,eAAe,EAAE;QACf,QAAQ,EAAE,CAAC,UAAU,CAAC;QACtB,WAAW,EAAE,mCAAmC;QAChD,cAAc,EAAE,wCAAwC;KACzD;IAED,aAAa,EAAE;QACb,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,WAAW,EAAE,2BAA2B;QACxC,cAAc,EAAE,+BAA+B;KAChD;IAED,SAAS,EAAE;QACT,QAAQ,EAAE,CAAC,cAAc,CAAC;QAC1B,WAAW,EAAE,0DAA0D;QACvE,cAAc,EAAE,wBAAwB;KACzC;IAED,mBAAmB,EAAE;QACnB,QAAQ,EAAE,CAAC,SAAS,CAAC;QACrB,WAAW,EAAE,kCAAkC;QAC/C,cAAc,EAAE,2CAA2C;KAC5D;IAED,kBAAkB,EAAE;QAClB,QAAQ,EAAE,CAAC,UAAU,CA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AE,MAAM,CAAC;QACnC,WAAW,EAAE,sCAAsC;QACnD,cAAc,EAAE,6CAA6C;KAC9D;IAED,gBAAgB,EAAE;QAChB,QAAQ,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;QAChD,WAAW,EAAE,0DAA0D;QACvE,cAAc,EAAE,0CAA0C;KAC3D;IAED,oBAAoB,EAAE;QACpB,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,WAAW,EAAE,yCAAyC;QACtD,cAAc,EAAE,2BAA2B;KAC5C;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type guards for runtime type validation.
|
|
3
|
+
*
|
|
4
|
+
* Provides type-safe validation of IPC response data, replacing unsafe
|
|
5
|
+
* `as unknown as` type assertions with proper runtime checks.
|
|
6
|
+
*
|
|
7
|
+
* WHY: Type assertions bypass TypeScript's type system and can lead to
|
|
8
|
+
* runtime errors. Type guards provide actual runtime validation while
|
|
9
|
+
* maintaining type safety.
|
|
10
|
+
*/
|
|
11
|
+
import type { NetworkRequest, ConsoleMessage } from '../types.js';
|
|
12
|
+
/**
|
|
13
|
+
* Type guard to check if a value is a valid NetworkRequest.
|
|
14
|
+
*
|
|
15
|
+
* Validates the presence of required NetworkRequest properties.
|
|
16
|
+
*
|
|
17
|
+
* @param value - Unknown value to validate
|
|
18
|
+
* @returns True if value is a valid NetworkRequest
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* if (isNetworkRequest(item)) {
|
|
23
|
+
* console.log(item.url); // TypeScript knows item is NetworkRequest
|
|
24
|
+
* }
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function isNetworkRequest(value: unknown): value is NetworkRequest;
|
|
28
|
+
/**
|
|
29
|
+
* Type guard to check if a value is a valid ConsoleMessage.
|
|
30
|
+
*
|
|
31
|
+
* Validates the presence of required ConsoleMessage properties.
|
|
32
|
+
*
|
|
33
|
+
* @param value - Unknown value to validate
|
|
34
|
+
* @returns True if value is a valid ConsoleMessage
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* if (isConsoleMessage(item)) {
|
|
39
|
+
* console.log(item.text); // TypeScript knows item is ConsoleMessage
|
|
40
|
+
* }
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
export declare function isConsoleMessage(value: unknown): value is ConsoleMessage;
|
|
44
|
+
/**
|
|
45
|
+
* Validate and return a details item with proper type safety.
|
|
46
|
+
*
|
|
47
|
+
* Replaces unsafe `as unknown as` assertions with runtime validation.
|
|
48
|
+
* Throws CommandError if validation fails.
|
|
49
|
+
*
|
|
50
|
+
* @param item - Unknown item from IPC response
|
|
51
|
+
* @param type - Expected type ('network' or 'console')
|
|
52
|
+
* @returns Validated NetworkRequest or ConsoleMessage
|
|
53
|
+
* @throws CommandError if item fails validation
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* const validatedItem = validateDetailsItem(response.data.item, 'network');
|
|
58
|
+
* // validatedItem is now typed as NetworkRequest | ConsoleMessage
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
export declare function validateDetailsItem(item: unknown, type: 'network' | 'console'): NetworkRequest | ConsoleMessage;
|
|
62
|
+
//# sourceMappingURL=typeGuards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeGuards.d.ts","sourceRoot":"","sources":["../../src/utils/typeGuards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAaxE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAYxE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,SAAS,GAAG,SAAS,GAC1B,cAAc,GAAG,cAAc,CA4BjC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type guards for runtime type validation.
|
|
3
|
+
*
|
|
4
|
+
* Provides type-safe validation of IPC response data, replacing unsafe
|
|
5
|
+
* `as unknown as` type assertions with proper runtime checks.
|
|
6
|
+
*
|
|
7
|
+
* WHY: Type assertions bypass TypeScript's type system and can lead to
|
|
8
|
+
* runtime errors. Type guards provide actual runtime validation while
|
|
9
|
+
* maintaining type safety.
|
|
10
|
+
*/
|
|
11
|
+
import { CommandError } from '../ui/errors/index.js';
|
|
12
|
+
import { EXIT_CODES } from '../utils/exitCodes.js';
|
|
13
|
+
/**
|
|
14
|
+
* Type guard to check if a value is a valid NetworkRequest.
|
|
15
|
+
*
|
|
16
|
+
* Validates the presence of required NetworkRequest properties.
|
|
17
|
+
*
|
|
18
|
+
* @param value - Unknown value to validate
|
|
19
|
+
* @returns True if value is a valid NetworkRequest
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* if (isNetworkRequest(item)) {
|
|
24
|
+
* console.log(item.url); // TypeScript knows item is NetworkRequest
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export function isNetworkRequest(value) {
|
|
29
|
+
if (!value || typeof value !== 'object') {
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
const record = value;
|
|
33
|
+
return (typeof record['requestId'] === 'string' &&
|
|
34
|
+
typeof record['url'] === 'string' &&
|
|
35
|
+
typeof record['method'] === 'string' &&
|
|
36
|
+
typeof record['timestamp'] === 'number');
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Type guard to check if a value is a valid ConsoleMessage.
|
|
40
|
+
*
|
|
41
|
+
* Validates the presence of required ConsoleMessage properties.
|
|
42
|
+
*
|
|
43
|
+
* @param value - Unknown value to validate
|
|
44
|
+
* @returns True if value is a valid ConsoleMessage
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* if (isConsoleMessage(item)) {
|
|
49
|
+
* console.log(item.text); // TypeScript knows item is ConsoleMessage
|
|
50
|
+
* }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export function isConsoleMessage(value) {
|
|
54
|
+
if (!value || typeof value !== 'object') {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
const record = value;
|
|
58
|
+
return (typeof record['type'] === 'string' &&
|
|
59
|
+
typeof record['text'] === 'string' &&
|
|
60
|
+
typeof record['timestamp'] === 'number');
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Validate and return a details item with proper type safety.
|
|
64
|
+
*
|
|
65
|
+
* Replaces unsafe `as unknown as` assertions with runtime validation.
|
|
66
|
+
* Throws CommandError if validation fails.
|
|
67
|
+
*
|
|
68
|
+
* @param item - Unknown item from IPC response
|
|
69
|
+
* @param type - Expected type ('network' or 'console')
|
|
70
|
+
* @returns Validated NetworkRequest or ConsoleMessage
|
|
71
|
+
* @throws CommandError if item fails validation
|
|
72
|
+
*
|
|
73
|
+
* @example
|
|
74
|
+
* ```typescript
|
|
75
|
+
* const validatedItem = validateDetailsItem(response.data.item, 'network');
|
|
76
|
+
* // validatedItem is now typed as NetworkRequest | ConsoleMessage
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export function validateDetailsItem(item, type) {
|
|
80
|
+
if (!item || typeof item !== 'object') {
|
|
81
|
+
throw new CommandError('Invalid item data: expected an object', { suggestion: 'This may indicate corrupted data from the daemon' }, EXIT_CODES.SESSION_FILE_ERROR);
|
|
82
|
+
}
|
|
83
|
+
if (type === 'network') {
|
|
84
|
+
if (!isNetworkRequest(item)) {
|
|
85
|
+
throw new CommandError('Invalid network request data: missing required fields (requestId, url, method, timestamp)', { suggestion: 'The request data may be incomplete or corrupted' }, EXIT_CODES.SESSION_FILE_ERROR);
|
|
86
|
+
}
|
|
87
|
+
return item;
|
|
88
|
+
}
|
|
89
|
+
if (!isConsoleMessage(item)) {
|
|
90
|
+
throw new CommandError('Invalid console message data: missing required fields (type, text, timestamp)', { suggestion: 'The console message data may be incomplete or corrupted' }, EXIT_CODES.SESSION_FILE_ERROR);
|
|
91
|
+
}
|
|
92
|
+
return item;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=typeGuards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typeGuards.js","sourceRoot":"","sources":["../../src/utils/typeGuards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,MAAM,GAAG,KAAgC,CAAC;IAEhD,OAAO,CACL,OAAO,MAAM,CAAC,WAAW,CAAC,KAAK,QAAQ;QACvC,OAAO,MAAM,CAAC,KAAK,CAAC,KAAK,QAAQ;QACjC,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,QAAQ;QACpC,OAAO,MAAM,CAAC,WAAW,CAAC,KAAK,QAAQ,CACxC,CAAC;AACJ,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,IAAI,CAAC,KAAK,IAA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