browser-debugger-cli 0.1.0 → 0.3.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/dist/__testfixtures__/cdpMessages.d.ts +1 -1
- package/dist/__testfixtures__/connectionTargets.d.ts +1 -1
- package/dist/__tests__/fixtures/schema-v0.2.1.golden.json +47 -0
- package/dist/__tests__/schema.contract.test.d.ts +19 -0
- package/dist/__tests__/schema.contract.test.d.ts.map +1 -0
- package/dist/__tests__/schema.contract.test.js +236 -0
- package/dist/__tests__/schema.contract.test.js.map +1 -0
- package/dist/__testutils__/assertions.d.ts +1 -1
- package/dist/__testutils__/testFixtures.d.ts +1 -1
- package/dist/cli/commands/cdp.js +1 -1
- package/dist/cli/commands/cleanup.d.ts.map +1 -1
- package/dist/cli/commands/cleanup.js +12 -13
- package/dist/cli/commands/cleanup.js.map +1 -1
- package/dist/cli/commands/console.js +2 -2
- package/dist/cli/commands/details.js +3 -3
- package/dist/cli/commands/details.js.map +1 -1
- package/dist/cli/commands/dom/helpers/errorHandler.d.ts.map +1 -1
- package/dist/cli/commands/dom/helpers/errorHandler.js +4 -3
- package/dist/cli/commands/dom/helpers/errorHandler.js.map +1 -1
- package/dist/cli/commands/dom/index.js +1 -1
- package/dist/cli/commands/dom.d.ts.map +1 -0
- package/dist/cli/commands/dom.js +257 -0
- package/dist/cli/commands/dom.js.map +1 -0
- package/dist/cli/commands/domErrorHandler.d.ts +45 -0
- package/dist/cli/commands/domErrorHandler.d.ts.map +1 -0
- package/dist/cli/commands/domErrorHandler.js +71 -0
- package/dist/cli/commands/domErrorHandler.js.map +1 -0
- package/dist/cli/commands/domEvalHelpers.d.ts +52 -0
- package/dist/cli/commands/domEvalHelpers.d.ts.map +1 -0
- package/dist/cli/commands/domEvalHelpers.js +76 -0
- package/dist/cli/commands/domEvalHelpers.js.map +1 -0
- package/dist/cli/commands/domOptionsBuilder.d.ts +35 -0
- package/dist/cli/commands/domOptionsBuilder.d.ts.map +1 -0
- package/dist/cli/commands/domOptionsBuilder.js +51 -0
- package/dist/cli/commands/domOptionsBuilder.js.map +1 -0
- package/dist/cli/{collectors/helpers/selectorParser.d.ts → commands/domSelectorParser.d.ts} +1 -1
- package/dist/cli/commands/domSelectorParser.d.ts.map +1 -0
- package/dist/cli/{collectors/helpers/selectorParser.js → commands/domSelectorParser.js} +1 -1
- package/dist/cli/commands/domSelectorParser.js.map +1 -0
- package/dist/cli/commands/network.d.ts.map +1 -1
- package/dist/cli/commands/network.js +8 -5
- package/dist/cli/commands/network.js.map +1 -1
- package/dist/cli/commands/peek.d.ts.map +1 -1
- package/dist/cli/commands/peek.js +7 -7
- package/dist/cli/commands/peek.js.map +1 -1
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +19 -2
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +13 -10
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/stop.d.ts.map +1 -1
- package/dist/cli/commands/stop.js +7 -6
- package/dist/cli/commands/stop.js.map +1 -1
- package/dist/cli/formatters/detailsFormatter.d.ts +1 -1
- package/dist/cli/formatters/previewFormatter.d.ts +1 -1
- package/dist/cli/formatters/previewFormatter.js +1 -1
- package/dist/cli/formatters/previewFormatter.js.map +1 -1
- package/dist/cli/formatters/statusFormatter.d.ts +6 -1
- package/dist/cli/formatters/statusFormatter.d.ts.map +1 -1
- package/dist/cli/formatters/statusFormatter.js +49 -4
- package/dist/cli/formatters/statusFormatter.js.map +1 -1
- package/dist/cli/handlers/CommandRunner.d.ts.map +1 -1
- package/dist/cli/handlers/CommandRunner.js +5 -5
- package/dist/cli/handlers/CommandRunner.js.map +1 -1
- package/dist/cli/handlers/OutputBuilder.d.ts +1 -1
- package/dist/cli/handlers/daemonSessionController.d.ts +1 -1
- package/dist/cli/handlers/daemonSessionController.d.ts.map +1 -1
- package/dist/cli/handlers/daemonSessionController.js +16 -45
- package/dist/cli/handlers/daemonSessionController.js.map +1 -1
- package/dist/cli/handlers/landingPage.d.ts +8 -0
- package/dist/cli/handlers/landingPage.d.ts.map +1 -0
- package/dist/cli/handlers/landingPage.js +8 -0
- package/dist/cli/handlers/landingPage.js.map +1 -0
- package/dist/cli/registry.js +10 -10
- package/dist/cli/registry.js.map +1 -1
- package/dist/collectors/__tests__/network.contract.test.js +25 -10
- package/dist/collectors/__tests__/network.contract.test.js.map +1 -1
- package/dist/collectors/console.d.ts +1 -1
- package/dist/collectors/console.js.map +1 -1
- package/dist/collectors/dom.d.ts +1 -1
- package/dist/collectors/network.d.ts +1 -1
- package/dist/collectors/network.js.map +1 -1
- package/dist/commandRegistry.d.ts +11 -0
- package/dist/commandRegistry.d.ts.map +1 -0
- package/dist/commandRegistry.js +45 -0
- package/dist/commandRegistry.js.map +1 -0
- package/dist/commands/__tests__/cdp.contract.test.d.ts +24 -0
- package/dist/commands/__tests__/cdp.contract.test.d.ts.map +1 -0
- package/dist/commands/__tests__/cdp.contract.test.js +466 -0
- package/dist/commands/__tests__/cdp.contract.test.js.map +1 -0
- package/dist/commands/__tests__/domEval.contract.test.d.ts +17 -0
- package/dist/commands/__tests__/domEval.contract.test.d.ts.map +1 -0
- package/dist/commands/__tests__/domEval.contract.test.js +231 -0
- package/dist/commands/__tests__/domEval.contract.test.js.map +1 -0
- package/dist/commands/cdp.d.ts +8 -0
- package/dist/commands/cdp.d.ts.map +1 -0
- package/dist/commands/cdp.js +45 -0
- package/dist/commands/cdp.js.map +1 -0
- package/dist/commands/cleanup.d.ts +8 -0
- package/dist/commands/cleanup.d.ts.map +1 -0
- package/dist/commands/cleanup.js +170 -0
- package/dist/commands/cleanup.js.map +1 -0
- package/dist/commands/console.d.ts +8 -0
- package/dist/commands/console.d.ts.map +1 -0
- package/dist/commands/console.js +92 -0
- package/dist/commands/console.js.map +1 -0
- package/dist/commands/details.d.ts +8 -0
- package/dist/commands/details.d.ts.map +1 -0
- package/dist/commands/details.js +68 -0
- package/dist/commands/details.js.map +1 -0
- package/dist/commands/dom.d.ts +8 -0
- package/dist/commands/dom.d.ts.map +1 -0
- package/dist/commands/dom.js +249 -0
- package/dist/commands/dom.js.map +1 -0
- package/dist/commands/domErrorHandler.d.ts +45 -0
- package/dist/commands/domErrorHandler.d.ts.map +1 -0
- package/dist/commands/domErrorHandler.js +71 -0
- package/dist/commands/domErrorHandler.js.map +1 -0
- package/dist/commands/domEvalHelpers.d.ts +48 -0
- package/dist/commands/domEvalHelpers.d.ts.map +1 -0
- package/dist/commands/domEvalHelpers.js +72 -0
- package/dist/commands/domEvalHelpers.js.map +1 -0
- package/dist/commands/domOptionsBuilder.d.ts +35 -0
- package/dist/commands/domOptionsBuilder.d.ts.map +1 -0
- package/dist/commands/domOptionsBuilder.js +51 -0
- package/dist/commands/domOptionsBuilder.js.map +1 -0
- package/dist/commands/domSelectorParser.d.ts +20 -0
- package/dist/commands/domSelectorParser.d.ts.map +1 -0
- package/dist/commands/domSelectorParser.js +20 -0
- package/dist/commands/domSelectorParser.js.map +1 -0
- package/dist/commands/network.d.ts +8 -0
- package/dist/commands/network.d.ts.map +1 -0
- package/dist/commands/network.js +41 -0
- package/dist/commands/network.js.map +1 -0
- package/dist/commands/peek.d.ts +8 -0
- package/dist/commands/peek.d.ts.map +1 -0
- package/dist/commands/peek.js +115 -0
- package/dist/commands/peek.js.map +1 -0
- package/dist/commands/shared/CommandRunner.d.ts +62 -0
- package/dist/commands/shared/CommandRunner.d.ts.map +1 -0
- package/dist/commands/shared/CommandRunner.js +97 -0
- package/dist/commands/shared/CommandRunner.js.map +1 -0
- package/dist/commands/shared/OutputBuilder.d.ts +60 -0
- package/dist/commands/shared/OutputBuilder.d.ts.map +1 -0
- package/dist/commands/shared/OutputBuilder.js +138 -0
- package/dist/commands/shared/OutputBuilder.js.map +1 -0
- package/dist/commands/shared/commonOptions.d.ts +54 -0
- package/dist/commands/shared/commonOptions.d.ts.map +1 -0
- package/dist/commands/shared/commonOptions.js +65 -0
- package/dist/commands/shared/commonOptions.js.map +1 -0
- package/dist/commands/shared/daemonSessionController.d.ts +23 -0
- package/dist/commands/shared/daemonSessionController.d.ts.map +1 -0
- package/dist/commands/shared/daemonSessionController.js +79 -0
- package/dist/commands/shared/daemonSessionController.js.map +1 -0
- package/dist/commands/shared/landingPage.d.ts +8 -0
- package/dist/commands/shared/landingPage.d.ts.map +1 -0
- package/dist/commands/shared/landingPage.js +8 -0
- package/dist/commands/shared/landingPage.js.map +1 -0
- package/dist/commands/shared/sessionController.d.ts +21 -0
- package/dist/commands/shared/sessionController.d.ts.map +1 -0
- package/dist/commands/shared/sessionController.js +54 -0
- package/dist/commands/shared/sessionController.js.map +1 -0
- package/dist/commands/start.d.ts +9 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +85 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/{cli/commands/query.d.ts → commands/status.d.ts} +3 -3
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +88 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/stop.d.ts +8 -0
- package/dist/commands/stop.d.ts.map +1 -0
- package/dist/commands/stop.js +152 -0
- package/dist/commands/stop.js.map +1 -0
- package/dist/commands.d.ts +11 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +45 -0
- package/dist/commands.js.map +1 -0
- package/dist/connection/__tests__/cdp.contract.test.d.ts.map +1 -1
- package/dist/connection/__tests__/cdp.contract.test.js +1 -2
- package/dist/connection/__tests__/cdp.contract.test.js.map +1 -1
- package/dist/connection/__tests__/finder.contract.test.js +1 -1
- package/dist/connection/__tests__/finder.contract.test.js.map +1 -1
- package/dist/connection/cdp.d.ts +1 -1
- package/dist/connection/cdp.js.map +1 -1
- package/dist/connection/domOperations.d.ts +48 -0
- package/dist/connection/domOperations.d.ts.map +1 -0
- package/dist/connection/domOperations.js +104 -0
- package/dist/connection/domOperations.js.map +1 -0
- package/dist/connection/finder.js.map +1 -1
- package/dist/connection/launcher.d.ts +7 -3
- package/dist/connection/launcher.d.ts.map +1 -1
- package/dist/connection/launcher.js +82 -21
- package/dist/connection/launcher.js.map +1 -1
- package/dist/constants.d.ts +17 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +28 -0
- package/dist/constants.js.map +1 -1
- package/dist/daemon/__tests__/ipcServer.contract.test.js +25 -11
- package/dist/daemon/__tests__/ipcServer.contract.test.js.map +1 -1
- package/dist/daemon/ipcServer.d.ts.map +1 -1
- package/dist/daemon/ipcServer.js +86 -6
- package/dist/daemon/ipcServer.js.map +1 -1
- package/dist/daemon/launcher.d.ts.map +1 -1
- package/dist/daemon/launcher.js +8 -6
- package/dist/daemon/launcher.js.map +1 -1
- package/dist/daemon/startSession.d.ts +2 -2
- package/dist/daemon/startSession.d.ts.map +1 -1
- package/dist/daemon/startSession.js +14 -11
- package/dist/daemon/startSession.js.map +1 -1
- package/dist/daemon/worker.d.ts +1 -1
- package/dist/daemon/worker.js +179 -52
- package/dist/daemon/worker.js.map +1 -1
- package/dist/{cli/collectors/helpers/domCache.d.ts → dom/cache.d.ts} +1 -5
- package/dist/dom/cache.d.ts.map +1 -0
- package/dist/{cli/collectors/helpers/domCache.js → dom/cache.js} +5 -19
- package/dist/dom/cache.js.map +1 -0
- package/dist/dom/index.d.ts +9 -0
- package/dist/dom/index.d.ts.map +1 -0
- package/dist/dom/index.js +9 -0
- package/dist/dom/index.js.map +1 -0
- package/dist/{cli/collectors/helpers/domQuery.d.ts → dom/query.d.ts} +5 -2
- package/dist/dom/query.d.ts.map +1 -0
- package/dist/{cli/collectors/helpers/domQuery.js → dom/query.js} +11 -7
- package/dist/dom/query.js.map +1 -0
- package/dist/index.js +117 -35
- package/dist/index.js.map +1 -1
- package/dist/ipc/__tests__/client.contract.test.js +11 -1
- package/dist/ipc/__tests__/client.contract.test.js.map +1 -1
- package/dist/ipc/client.d.ts +17 -4
- package/dist/ipc/client.d.ts.map +1 -1
- package/dist/ipc/client.js +26 -6
- package/dist/ipc/client.js.map +1 -1
- package/dist/ipc/commands.d.ts +52 -1
- package/dist/ipc/commands.d.ts.map +1 -1
- package/dist/ipc/commands.js +8 -0
- package/dist/ipc/commands.js.map +1 -1
- package/dist/ipc/types.d.ts +34 -3
- package/dist/ipc/types.d.ts.map +1 -1
- package/dist/ipc/types.js.map +1 -1
- package/dist/session/metadata.d.ts +2 -2
- package/dist/session/metadata.d.ts.map +1 -1
- package/dist/session/output.d.ts +1 -1
- package/dist/session/process.d.ts.map +1 -1
- package/dist/session/process.js +4 -3
- package/dist/session/process.js.map +1 -1
- package/dist/session/queryCache.d.ts +36 -0
- package/dist/session/queryCache.d.ts.map +1 -0
- package/dist/session/queryCache.js +66 -0
- package/dist/session/queryCache.js.map +1 -0
- package/dist/telemetry/__tests__/network.contract.test.d.ts +28 -0
- package/dist/telemetry/__tests__/network.contract.test.d.ts.map +1 -0
- package/dist/telemetry/__tests__/network.contract.test.js +540 -0
- package/dist/telemetry/__tests__/network.contract.test.js.map +1 -0
- package/dist/telemetry/console.d.ts +19 -0
- package/dist/telemetry/console.d.ts.map +1 -0
- package/dist/telemetry/console.js +87 -0
- package/dist/telemetry/console.js.map +1 -0
- package/dist/telemetry/dom.d.ts +21 -0
- package/dist/telemetry/dom.d.ts.map +1 -0
- package/dist/telemetry/dom.js +99 -0
- package/dist/telemetry/dom.js.map +1 -0
- package/dist/telemetry/network.d.ts +33 -0
- package/dist/telemetry/network.d.ts.map +1 -0
- package/dist/telemetry/network.js +191 -0
- package/dist/telemetry/network.js.map +1 -0
- package/dist/types.d.ts +25 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/errors.d.ts +39 -0
- package/dist/ui/errors.d.ts.map +1 -0
- package/dist/ui/errors.js +48 -0
- package/dist/ui/errors.js.map +1 -0
- package/dist/ui/formatters/cookies.d.ts +32 -0
- package/dist/ui/formatters/cookies.d.ts.map +1 -0
- package/dist/ui/formatters/cookies.js +45 -0
- package/dist/ui/formatters/cookies.js.map +1 -0
- package/dist/ui/formatters/details.d.ts +10 -0
- package/dist/ui/formatters/details.d.ts.map +1 -0
- package/dist/ui/formatters/details.js +61 -0
- package/dist/ui/formatters/details.js.map +1 -0
- package/dist/ui/formatters/dom.d.ts +135 -0
- package/dist/ui/formatters/dom.d.ts.map +1 -0
- package/dist/ui/formatters/dom.js +193 -0
- package/dist/ui/formatters/dom.js.map +1 -0
- package/dist/ui/formatters/index.d.ts +11 -0
- package/dist/ui/formatters/index.d.ts.map +1 -0
- package/dist/ui/formatters/index.js +11 -0
- package/dist/ui/formatters/index.js.map +1 -0
- package/dist/ui/formatters/preview.d.ts +25 -0
- package/dist/ui/formatters/preview.d.ts.map +1 -0
- package/dist/ui/formatters/preview.js +182 -0
- package/dist/ui/formatters/preview.js.map +1 -0
- package/dist/ui/formatters/status.d.ts +39 -0
- package/dist/ui/formatters/status.d.ts.map +1 -0
- package/dist/ui/formatters/status.js +153 -0
- package/dist/ui/formatters/status.js.map +1 -0
- package/dist/ui/formatting.d.ts +300 -0
- package/dist/ui/formatting.d.ts.map +1 -0
- package/dist/ui/formatting.js +454 -0
- package/dist/ui/formatting.js.map +1 -0
- package/dist/ui/messages/chrome.d.ts +172 -0
- package/dist/ui/messages/chrome.d.ts.map +1 -0
- package/dist/ui/messages/chrome.js +253 -0
- package/dist/ui/messages/chrome.js.map +1 -0
- package/dist/ui/messages/commands.d.ts +88 -0
- package/dist/ui/messages/commands.d.ts.map +1 -0
- package/dist/ui/messages/commands.js +150 -0
- package/dist/ui/messages/commands.js.map +1 -0
- package/dist/ui/messages/consoleMessages.d.ts +39 -0
- package/dist/ui/messages/consoleMessages.d.ts.map +1 -0
- package/dist/ui/messages/consoleMessages.js +48 -0
- package/dist/ui/messages/consoleMessages.js.map +1 -0
- package/dist/ui/messages/debug.d.ts +182 -0
- package/dist/ui/messages/debug.d.ts.map +1 -0
- package/dist/ui/messages/debug.js +243 -0
- package/dist/ui/messages/debug.js.map +1 -0
- package/dist/ui/messages/errors.d.ts +91 -0
- package/dist/ui/messages/errors.d.ts.map +1 -0
- package/dist/ui/messages/errors.js +135 -0
- package/dist/ui/messages/errors.js.map +1 -0
- package/dist/ui/messages/index.d.ts +12 -0
- package/dist/ui/messages/index.d.ts.map +1 -0
- package/dist/ui/messages/index.js +12 -0
- package/dist/ui/messages/index.js.map +1 -0
- package/dist/ui/messages/internal.d.ts +30 -0
- package/dist/ui/messages/internal.d.ts.map +1 -0
- package/dist/ui/messages/internal.js +42 -0
- package/dist/ui/messages/internal.js.map +1 -0
- package/dist/ui/messages/preview.d.ts +51 -0
- package/dist/ui/messages/preview.d.ts.map +1 -0
- package/dist/ui/messages/preview.js +76 -0
- package/dist/ui/messages/preview.js.map +1 -0
- package/dist/ui/messages/session.d.ts +54 -0
- package/dist/ui/messages/session.d.ts.map +1 -0
- package/dist/ui/messages/session.js +77 -0
- package/dist/ui/messages/session.js.map +1 -0
- package/dist/ui/messages/validation.d.ts +34 -0
- package/dist/ui/messages/validation.d.ts.map +1 -0
- package/dist/ui/messages/validation.js +38 -0
- package/dist/ui/messages/validation.js.map +1 -0
- package/dist/utils/__tests__/filters.unit.test.js +1 -1
- package/dist/utils/cdpHandlers.d.ts +1 -1
- package/dist/utils/cdpHandlers.js +1 -1
- package/dist/utils/chromeDiagnostics.d.ts +0 -12
- package/dist/utils/chromeDiagnostics.d.ts.map +1 -1
- package/dist/utils/chromeDiagnostics.js +0 -51
- package/dist/utils/chromeDiagnostics.js.map +1 -1
- package/dist/utils/filters.js +1 -1
- package/dist/utils/filters.js.map +1 -1
- package/dist/utils/http.d.ts +1 -1
- package/dist/utils/http.js.map +1 -1
- package/dist/utils/logger.d.ts +68 -12
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +62 -12
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/pageReadiness.d.ts +46 -0
- package/dist/utils/pageReadiness.d.ts.map +1 -0
- package/dist/utils/pageReadiness.js +271 -0
- package/dist/utils/pageReadiness.js.map +1 -0
- package/dist/utils/ui.d.ts +36 -0
- package/dist/utils/ui.d.ts.map +1 -0
- package/dist/utils/ui.js +47 -0
- package/dist/utils/ui.js.map +1 -0
- package/dist/utils/url.d.ts +60 -26
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +130 -84
- package/dist/utils/url.js.map +1 -1
- package/package.json +2 -5
- package/dist/cli/collectors/dom.d.ts.map +0 -1
- package/dist/cli/collectors/dom.js +0 -361
- package/dist/cli/collectors/dom.js.map +0 -1
- package/dist/cli/collectors/helpers/domCache.d.ts.map +0 -1
- package/dist/cli/collectors/helpers/domCache.js.map +0 -1
- package/dist/cli/collectors/helpers/domQuery.d.ts.map +0 -1
- package/dist/cli/collectors/helpers/domQuery.js.map +0 -1
- package/dist/cli/collectors/helpers/selectorParser.d.ts.map +0 -1
- package/dist/cli/collectors/helpers/selectorParser.js.map +0 -1
- package/dist/cli/commands/__tests__/ipcTest.test.d.ts +0 -2
- package/dist/cli/commands/__tests__/ipcTest.test.d.ts.map +0 -1
- package/dist/cli/commands/__tests__/ipcTest.test.js +0 -37
- package/dist/cli/commands/__tests__/ipcTest.test.js.map +0 -1
- package/dist/cli/commands/ipcTest.d.ts +0 -23
- package/dist/cli/commands/ipcTest.d.ts.map +0 -1
- package/dist/cli/commands/ipcTest.js +0 -181
- package/dist/cli/commands/ipcTest.js.map +0 -1
- package/dist/cli/commands/query.d.ts.map +0 -1
- package/dist/cli/commands/query.js +0 -127
- package/dist/cli/commands/query.js.map +0 -1
- package/dist/cli/handlers/ChromeBootstrap.d.ts +0 -24
- package/dist/cli/handlers/ChromeBootstrap.d.ts.map +0 -1
- package/dist/cli/handlers/ChromeBootstrap.js +0 -50
- package/dist/cli/handlers/ChromeBootstrap.js.map +0 -1
- package/dist/cli/handlers/OutputWriter.d.ts +0 -15
- package/dist/cli/handlers/OutputWriter.d.ts.map +0 -1
- package/dist/cli/handlers/OutputWriter.js +0 -34
- package/dist/cli/handlers/OutputWriter.js.map +0 -1
- package/dist/cli/handlers/PreviewWriter.d.ts +0 -52
- package/dist/cli/handlers/PreviewWriter.d.ts.map +0 -1
- package/dist/cli/handlers/PreviewWriter.js +0 -119
- package/dist/cli/handlers/PreviewWriter.js.map +0 -1
- package/dist/cli/handlers/SessionLock.d.ts +0 -16
- package/dist/cli/handlers/SessionLock.d.ts.map +0 -1
- package/dist/cli/handlers/SessionLock.js +0 -38
- package/dist/cli/handlers/SessionLock.js.map +0 -1
- package/dist/cli/handlers/SessionLoop.d.ts +0 -19
- package/dist/cli/handlers/SessionLoop.d.ts.map +0 -1
- package/dist/cli/handlers/SessionLoop.js +0 -47
- package/dist/cli/handlers/SessionLoop.js.map +0 -1
- package/dist/cli/handlers/ShutdownController.d.ts +0 -38
- package/dist/cli/handlers/ShutdownController.d.ts.map +0 -1
- package/dist/cli/handlers/ShutdownController.js +0 -83
- package/dist/cli/handlers/ShutdownController.js.map +0 -1
- package/dist/cli/handlers/SignalHandler.d.ts +0 -35
- package/dist/cli/handlers/SignalHandler.d.ts.map +0 -1
- package/dist/cli/handlers/SignalHandler.js +0 -81
- package/dist/cli/handlers/SignalHandler.js.map +0 -1
- package/dist/cli/handlers/TargetSetup.d.ts +0 -42
- package/dist/cli/handlers/TargetSetup.d.ts.map +0 -1
- package/dist/cli/handlers/TargetSetup.js +0 -87
- package/dist/cli/handlers/TargetSetup.js.map +0 -1
- package/dist/connection/__tests__/tabs.contract.test.d.ts +0 -2
- package/dist/connection/__tests__/tabs.contract.test.d.ts.map +0 -1
- package/dist/connection/__tests__/tabs.contract.test.js +0 -137
- package/dist/connection/__tests__/tabs.contract.test.js.map +0 -1
- package/dist/connection/tabs.d.ts +0 -82
- package/dist/connection/tabs.d.ts.map +0 -1
- package/dist/connection/tabs.js +0 -577
- package/dist/connection/tabs.js.map +0 -1
- package/dist/session/BdgSession.d.ts +0 -129
- package/dist/session/BdgSession.d.ts.map +0 -1
- package/dist/session/BdgSession.js +0 -270
- package/dist/session/BdgSession.js.map +0 -1
- package/dist/session/index.d.ts +0 -15
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/index.js +0 -23
- package/dist/session/index.js.map +0 -1
- package/dist/utils/validation.d.ts +0 -12
- package/dist/utils/validation.d.ts.map +0 -1
- package/dist/utils/validation.js +0 -20
- package/dist/utils/validation.js.map +0 -1
- /package/dist/cli/{collectors → commands}/dom.d.ts +0 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cookie formatter for human-readable output.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* CDP Cookie type
|
|
6
|
+
*/
|
|
7
|
+
export interface Cookie {
|
|
8
|
+
name: string;
|
|
9
|
+
value: string;
|
|
10
|
+
domain: string;
|
|
11
|
+
path: string;
|
|
12
|
+
expires?: number;
|
|
13
|
+
httpOnly: boolean;
|
|
14
|
+
secure: boolean;
|
|
15
|
+
sameSite?: 'Strict' | 'Lax' | 'None';
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Format cookies for human-readable output.
|
|
19
|
+
*
|
|
20
|
+
* @param cookies - Array of CDP cookies
|
|
21
|
+
* @returns Formatted cookie list
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const output = formatCookies([
|
|
26
|
+
* { name: 'session', value: 'abc123', domain: '.example.com', ... }
|
|
27
|
+
* ]);
|
|
28
|
+
* console.log(output);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function formatCookies(cookies: Cookie[]): string;
|
|
32
|
+
//# sourceMappingURL=cookies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookies.d.ts","sourceRoot":"","sources":["../../../src/ui/formatters/cookies.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;CACtC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAmCvD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cookie formatter for human-readable output.
|
|
3
|
+
*/
|
|
4
|
+
import { OutputFormatter, pluralize } from '../../ui/formatting.js';
|
|
5
|
+
/**
|
|
6
|
+
* Format cookies for human-readable output.
|
|
7
|
+
*
|
|
8
|
+
* @param cookies - Array of CDP cookies
|
|
9
|
+
* @returns Formatted cookie list
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* const output = formatCookies([
|
|
14
|
+
* { name: 'session', value: 'abc123', domain: '.example.com', ... }
|
|
15
|
+
* ]);
|
|
16
|
+
* console.log(output);
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export function formatCookies(cookies) {
|
|
20
|
+
if (cookies.length === 0) {
|
|
21
|
+
return 'No cookies found';
|
|
22
|
+
}
|
|
23
|
+
const fmt = new OutputFormatter();
|
|
24
|
+
fmt.text(`${pluralize(cookies.length, 'Cookie', 'Cookies')}:`).blank();
|
|
25
|
+
cookies.forEach((cookie, index) => {
|
|
26
|
+
fmt.text(`[${index + 1}] ${cookie.name}`);
|
|
27
|
+
const expires = cookie.expires && cookie.expires !== -1
|
|
28
|
+
? new Date(cookie.expires * 1000).toISOString()
|
|
29
|
+
: 'Session';
|
|
30
|
+
fmt.list([
|
|
31
|
+
`Value: ${cookie.value}`,
|
|
32
|
+
`Domain: ${cookie.domain}`,
|
|
33
|
+
`Path: ${cookie.path}`,
|
|
34
|
+
`Expires: ${expires}`,
|
|
35
|
+
`HttpOnly: ${cookie.httpOnly ? 'Yes' : 'No'}`,
|
|
36
|
+
`Secure: ${cookie.secure ? 'Yes' : 'No'}`,
|
|
37
|
+
`SameSite: ${cookie.sameSite ?? 'None'}`,
|
|
38
|
+
], 2);
|
|
39
|
+
if (index < cookies.length - 1) {
|
|
40
|
+
fmt.blank();
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return fmt.build();
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=cookies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cookies.js","sourceRoot":"","sources":["../../../src/ui/formatters/cookies.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAgBhE;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,aAAa,CAAC,OAAiB;IAC7C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,eAAe,EAAE,CAAC;IAClC,GAAG,CAAC,IAAI,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,CAAC;IAEvE,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QAChC,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,GAAG,CAAC,KAAK,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QAE1C,MAAM,OAAO,GACX,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC;YACrC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;YAC/C,CAAC,CAAC,SAAS,CAAC;QAEhB,GAAG,CAAC,IAAI,CACN;YACE,UAAU,MAAM,CAAC,KAAK,EAAE;YACxB,WAAW,MAAM,CAAC,MAAM,EAAE;YAC1B,SAAS,MAAM,CAAC,IAAI,EAAE;YACtB,YAAY,OAAO,EAAE;YACrB,aAAa,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;YAC7C,WAAW,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE;YACzC,aAAa,MAAM,CAAC,QAAQ,IAAI,MAAM,EAAE;SACzC,EACD,CAAC,CACF,CAAC;QAEF,IAAI,KAAK,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,GAAG,CAAC,KAAK,EAAE,CAAC;QACd,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC,KAAK,EAAE,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NetworkRequest, ConsoleMessage } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Format network request details for human-readable output
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatNetworkDetails(request: NetworkRequest): string;
|
|
6
|
+
/**
|
|
7
|
+
* Format console message details for human-readable output
|
|
8
|
+
*/
|
|
9
|
+
export declare function formatConsoleDetails(message: ConsoleMessage): string;
|
|
10
|
+
//# sourceMappingURL=details.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../src/ui/formatters/details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9D;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CA4CpE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAsBpE"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { OutputFormatter } from '../../ui/formatting.js';
|
|
2
|
+
/**
|
|
3
|
+
* Format network request details for human-readable output
|
|
4
|
+
*/
|
|
5
|
+
export function formatNetworkDetails(request) {
|
|
6
|
+
const fmt = new OutputFormatter();
|
|
7
|
+
fmt.text('Network Request Details').separator('━', 70);
|
|
8
|
+
fmt.keyValueList([
|
|
9
|
+
['Request ID', request.requestId],
|
|
10
|
+
['URL', request.url],
|
|
11
|
+
['Method', request.method],
|
|
12
|
+
['Status', request.status?.toString() ?? 'pending'],
|
|
13
|
+
['MIME Type', request.mimeType ?? 'N/A'],
|
|
14
|
+
], 13);
|
|
15
|
+
fmt.blank();
|
|
16
|
+
if (request.requestHeaders) {
|
|
17
|
+
fmt.text('Request Headers:').separator('━', 70);
|
|
18
|
+
Object.entries(request.requestHeaders).forEach(([key, value]) => {
|
|
19
|
+
fmt.text(` ${key}: ${value}`);
|
|
20
|
+
});
|
|
21
|
+
fmt.blank();
|
|
22
|
+
}
|
|
23
|
+
if (request.requestBody) {
|
|
24
|
+
fmt.text('Request Body:').separator('━', 70);
|
|
25
|
+
fmt.text(request.requestBody);
|
|
26
|
+
fmt.blank();
|
|
27
|
+
}
|
|
28
|
+
if (request.responseHeaders) {
|
|
29
|
+
fmt.text('Response Headers:').separator('━', 70);
|
|
30
|
+
Object.entries(request.responseHeaders).forEach(([key, value]) => {
|
|
31
|
+
fmt.text(` ${key}: ${value}`);
|
|
32
|
+
});
|
|
33
|
+
fmt.blank();
|
|
34
|
+
}
|
|
35
|
+
if (request.responseBody) {
|
|
36
|
+
fmt.text('Response Body:').separator('━', 70);
|
|
37
|
+
fmt.text(request.responseBody);
|
|
38
|
+
}
|
|
39
|
+
return fmt.build();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Format console message details for human-readable output
|
|
43
|
+
*/
|
|
44
|
+
export function formatConsoleDetails(message) {
|
|
45
|
+
const fmt = new OutputFormatter();
|
|
46
|
+
fmt.text('Console Message Details').separator('━', 70);
|
|
47
|
+
fmt.keyValueList([
|
|
48
|
+
['Type', message.type],
|
|
49
|
+
['Timestamp', new Date(message.timestamp).toISOString()],
|
|
50
|
+
['Text', message.text],
|
|
51
|
+
], 12);
|
|
52
|
+
fmt.blank();
|
|
53
|
+
if (message.args && message.args.length > 0) {
|
|
54
|
+
fmt.text('Arguments:').separator('━', 70);
|
|
55
|
+
message.args.forEach((arg, idx) => {
|
|
56
|
+
fmt.text(` [${idx}]: ${JSON.stringify(arg, null, 2)}`);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
return fmt.build();
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=details.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"details.js","sourceRoot":"","sources":["../../../src/ui/formatters/details.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { DomQueryData, DomHighlightData, DomGetData } from '../../ipc/commands.js';
|
|
2
|
+
/**
|
|
3
|
+
* Format DOM query results for human-readable output.
|
|
4
|
+
*
|
|
5
|
+
* Displays found elements with their index, tag, classes, and preview text.
|
|
6
|
+
* Shows helpful message when no elements are found.
|
|
7
|
+
*
|
|
8
|
+
* @param data - DOM query result containing selector, count, and matching nodes
|
|
9
|
+
* @returns Formatted output string
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* formatDomQuery({
|
|
14
|
+
* selector: '.error',
|
|
15
|
+
* count: 2,
|
|
16
|
+
* nodes: [
|
|
17
|
+
* { index: 0, nodeId: 123, tag: 'div', classes: ['error'], preview: 'Invalid input' },
|
|
18
|
+
* { index: 1, nodeId: 456, tag: 'span', classes: ['error'], preview: 'Required field' }
|
|
19
|
+
* ]
|
|
20
|
+
* });
|
|
21
|
+
* // Output:
|
|
22
|
+
* // Found 2 elements matching ".error":
|
|
23
|
+
* // [0] <div class="error"> Invalid input
|
|
24
|
+
* // [1] <span class="error"> Required field
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function formatDomQuery(data: DomQueryData): string;
|
|
28
|
+
/**
|
|
29
|
+
* Format DOM highlight results for human-readable output.
|
|
30
|
+
*
|
|
31
|
+
* Displays success message with count of highlighted elements.
|
|
32
|
+
*
|
|
33
|
+
* @param data - DOM highlight result containing count of highlighted elements
|
|
34
|
+
* @returns Formatted output string
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```typescript
|
|
38
|
+
* formatDomHighlight({ highlighted: 3, nodeIds: [123, 456, 789] });
|
|
39
|
+
* // Output: ✓ Highlighted 3 elements
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function formatDomHighlight(data: DomHighlightData): string;
|
|
43
|
+
/**
|
|
44
|
+
* Format DOM get results for human-readable output.
|
|
45
|
+
*
|
|
46
|
+
* Displays full outerHTML for matched elements. For single elements, shows HTML directly.
|
|
47
|
+
* For multiple elements, shows numbered list with HTML for each.
|
|
48
|
+
*
|
|
49
|
+
* @param data - DOM get result containing array of nodes with outerHTML
|
|
50
|
+
* @returns Formatted output string
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* ```typescript
|
|
54
|
+
* // Single element
|
|
55
|
+
* formatDomGet({
|
|
56
|
+
* nodes: [{ nodeId: 123, outerHTML: '<div class="error">Invalid input</div>' }]
|
|
57
|
+
* });
|
|
58
|
+
* // Output: <div class="error">Invalid input</div>
|
|
59
|
+
*
|
|
60
|
+
* // Multiple elements
|
|
61
|
+
* formatDomGet({
|
|
62
|
+
* nodes: [
|
|
63
|
+
* { nodeId: 123, outerHTML: '<div class="error">Error 1</div>' },
|
|
64
|
+
* { nodeId: 456, outerHTML: '<span class="error">Error 2</span>' }
|
|
65
|
+
* ]
|
|
66
|
+
* });
|
|
67
|
+
* // Output:
|
|
68
|
+
* // [1] <div class="error">Error 1</div>
|
|
69
|
+
* // [2] <span class="error">Error 2</span>
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export declare function formatDomGet(data: DomGetData): string;
|
|
73
|
+
/**
|
|
74
|
+
* Format DOM eval results for human-readable output.
|
|
75
|
+
*
|
|
76
|
+
* Outputs the evaluated JavaScript result as formatted JSON.
|
|
77
|
+
*
|
|
78
|
+
* @param data - DOM eval result containing the evaluated value
|
|
79
|
+
* @returns Formatted JSON string
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```typescript
|
|
83
|
+
* formatDomEval({ result: 'My Page Title' });
|
|
84
|
+
* // Output: "My Page Title"
|
|
85
|
+
*
|
|
86
|
+
* formatDomEval({ result: { url: 'https://example.com', title: 'Example' } });
|
|
87
|
+
* // Output:
|
|
88
|
+
* // {
|
|
89
|
+
* // "url": "https://example.com",
|
|
90
|
+
* // "title": "Example"
|
|
91
|
+
* // }
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare function formatDomEval(data: {
|
|
95
|
+
result: unknown;
|
|
96
|
+
}): string;
|
|
97
|
+
/**
|
|
98
|
+
* Format screenshot capture result for human-readable display.
|
|
99
|
+
*
|
|
100
|
+
* @param data - Screenshot metadata
|
|
101
|
+
* @returns Formatted string with screenshot details
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```typescript
|
|
105
|
+
* formatDomScreenshot({
|
|
106
|
+
* path: '/path/to/screenshot.png',
|
|
107
|
+
* format: 'png',
|
|
108
|
+
* width: 1920,
|
|
109
|
+
* height: 1080,
|
|
110
|
+
* size: 245632,
|
|
111
|
+
* fullPage: true
|
|
112
|
+
* });
|
|
113
|
+
* // Output:
|
|
114
|
+
* // Screenshot captured
|
|
115
|
+
* // Path: /path/to/screenshot.png
|
|
116
|
+
* // Format: png
|
|
117
|
+
* // Dimensions: 1920x1080
|
|
118
|
+
* // Size: 240.0 KB
|
|
119
|
+
* // Full page: yes
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
122
|
+
export declare function formatDomScreenshot(data: {
|
|
123
|
+
path: string;
|
|
124
|
+
format: 'png' | 'jpeg';
|
|
125
|
+
quality?: number;
|
|
126
|
+
width: number;
|
|
127
|
+
height: number;
|
|
128
|
+
size: number;
|
|
129
|
+
viewport?: {
|
|
130
|
+
width: number;
|
|
131
|
+
height: number;
|
|
132
|
+
};
|
|
133
|
+
fullPage: boolean;
|
|
134
|
+
}): string;
|
|
135
|
+
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../src/ui/formatters/dom.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,CA8BzD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAWjE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAcrD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAE/D;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,QAAQ,EAAE,OAAO,CAAC;CACnB,GAAG,MAAM,CAyBT"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { OutputFormatter } from '../../ui/formatting.js';
|
|
2
|
+
/**
|
|
3
|
+
* Format DOM query results for human-readable output.
|
|
4
|
+
*
|
|
5
|
+
* Displays found elements with their index, tag, classes, and preview text.
|
|
6
|
+
* Shows helpful message when no elements are found.
|
|
7
|
+
*
|
|
8
|
+
* @param data - DOM query result containing selector, count, and matching nodes
|
|
9
|
+
* @returns Formatted output string
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* formatDomQuery({
|
|
14
|
+
* selector: '.error',
|
|
15
|
+
* count: 2,
|
|
16
|
+
* nodes: [
|
|
17
|
+
* { index: 0, nodeId: 123, tag: 'div', classes: ['error'], preview: 'Invalid input' },
|
|
18
|
+
* { index: 1, nodeId: 456, tag: 'span', classes: ['error'], preview: 'Required field' }
|
|
19
|
+
* ]
|
|
20
|
+
* });
|
|
21
|
+
* // Output:
|
|
22
|
+
* // Found 2 elements matching ".error":
|
|
23
|
+
* // [0] <div class="error"> Invalid input
|
|
24
|
+
* // [1] <span class="error"> Required field
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export function formatDomQuery(data) {
|
|
28
|
+
const { count, nodes, selector } = data;
|
|
29
|
+
const fmt = new OutputFormatter();
|
|
30
|
+
if (count === 0) {
|
|
31
|
+
return fmt
|
|
32
|
+
.text(`No elements found matching "${selector}"`)
|
|
33
|
+
.blank()
|
|
34
|
+
.section('Suggestions:', [
|
|
35
|
+
`Verify selector: bdg dom eval "document.querySelector('${selector}')"`,
|
|
36
|
+
'List elements: bdg dom query "*"',
|
|
37
|
+
])
|
|
38
|
+
.build();
|
|
39
|
+
}
|
|
40
|
+
const nodeLines = nodes.map((node) => {
|
|
41
|
+
const classInfo = node.classes?.length ? ` class="${node.classes.join(' ')}"` : '';
|
|
42
|
+
return `[${node.index}] <${node.tag}${classInfo}> ${node.preview}`;
|
|
43
|
+
});
|
|
44
|
+
return fmt
|
|
45
|
+
.text(`Found ${count} element${count === 1 ? '' : 's'} matching "${selector}":`)
|
|
46
|
+
.list(nodeLines)
|
|
47
|
+
.blank()
|
|
48
|
+
.section('Next steps:', [
|
|
49
|
+
'Highlight: bdg dom highlight <index>',
|
|
50
|
+
'Get HTML: bdg dom get <index>',
|
|
51
|
+
'Inspect: bdg details dom <index>',
|
|
52
|
+
])
|
|
53
|
+
.build();
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Format DOM highlight results for human-readable output.
|
|
57
|
+
*
|
|
58
|
+
* Displays success message with count of highlighted elements.
|
|
59
|
+
*
|
|
60
|
+
* @param data - DOM highlight result containing count of highlighted elements
|
|
61
|
+
* @returns Formatted output string
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```typescript
|
|
65
|
+
* formatDomHighlight({ highlighted: 3, nodeIds: [123, 456, 789] });
|
|
66
|
+
* // Output: ✓ Highlighted 3 elements
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export function formatDomHighlight(data) {
|
|
70
|
+
const fmt = new OutputFormatter();
|
|
71
|
+
return fmt
|
|
72
|
+
.text(`✓ Highlighted ${data.highlighted} element${data.highlighted === 1 ? '' : 's'}`)
|
|
73
|
+
.blank()
|
|
74
|
+
.section('Next steps:', [
|
|
75
|
+
'Get HTML: bdg dom get <index>',
|
|
76
|
+
'Query more: bdg dom query <selector>',
|
|
77
|
+
])
|
|
78
|
+
.build();
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Format DOM get results for human-readable output.
|
|
82
|
+
*
|
|
83
|
+
* Displays full outerHTML for matched elements. For single elements, shows HTML directly.
|
|
84
|
+
* For multiple elements, shows numbered list with HTML for each.
|
|
85
|
+
*
|
|
86
|
+
* @param data - DOM get result containing array of nodes with outerHTML
|
|
87
|
+
* @returns Formatted output string
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```typescript
|
|
91
|
+
* // Single element
|
|
92
|
+
* formatDomGet({
|
|
93
|
+
* nodes: [{ nodeId: 123, outerHTML: '<div class="error">Invalid input</div>' }]
|
|
94
|
+
* });
|
|
95
|
+
* // Output: <div class="error">Invalid input</div>
|
|
96
|
+
*
|
|
97
|
+
* // Multiple elements
|
|
98
|
+
* formatDomGet({
|
|
99
|
+
* nodes: [
|
|
100
|
+
* { nodeId: 123, outerHTML: '<div class="error">Error 1</div>' },
|
|
101
|
+
* { nodeId: 456, outerHTML: '<span class="error">Error 2</span>' }
|
|
102
|
+
* ]
|
|
103
|
+
* });
|
|
104
|
+
* // Output:
|
|
105
|
+
* // [1] <div class="error">Error 1</div>
|
|
106
|
+
* // [2] <span class="error">Error 2</span>
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
export function formatDomGet(data) {
|
|
110
|
+
const { nodes } = data;
|
|
111
|
+
if (nodes.length === 1) {
|
|
112
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
113
|
+
return nodes[0].outerHTML ?? '';
|
|
114
|
+
}
|
|
115
|
+
const fmt = new OutputFormatter();
|
|
116
|
+
nodes.forEach((node, i) => {
|
|
117
|
+
fmt.text(`[${i + 1}] ${node.outerHTML}`);
|
|
118
|
+
});
|
|
119
|
+
return fmt.build();
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Format DOM eval results for human-readable output.
|
|
123
|
+
*
|
|
124
|
+
* Outputs the evaluated JavaScript result as formatted JSON.
|
|
125
|
+
*
|
|
126
|
+
* @param data - DOM eval result containing the evaluated value
|
|
127
|
+
* @returns Formatted JSON string
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```typescript
|
|
131
|
+
* formatDomEval({ result: 'My Page Title' });
|
|
132
|
+
* // Output: "My Page Title"
|
|
133
|
+
*
|
|
134
|
+
* formatDomEval({ result: { url: 'https://example.com', title: 'Example' } });
|
|
135
|
+
* // Output:
|
|
136
|
+
* // {
|
|
137
|
+
* // "url": "https://example.com",
|
|
138
|
+
* // "title": "Example"
|
|
139
|
+
* // }
|
|
140
|
+
* ```
|
|
141
|
+
*/
|
|
142
|
+
export function formatDomEval(data) {
|
|
143
|
+
return JSON.stringify(data.result, null, 2);
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Format screenshot capture result for human-readable display.
|
|
147
|
+
*
|
|
148
|
+
* @param data - Screenshot metadata
|
|
149
|
+
* @returns Formatted string with screenshot details
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* formatDomScreenshot({
|
|
154
|
+
* path: '/path/to/screenshot.png',
|
|
155
|
+
* format: 'png',
|
|
156
|
+
* width: 1920,
|
|
157
|
+
* height: 1080,
|
|
158
|
+
* size: 245632,
|
|
159
|
+
* fullPage: true
|
|
160
|
+
* });
|
|
161
|
+
* // Output:
|
|
162
|
+
* // Screenshot captured
|
|
163
|
+
* // Path: /path/to/screenshot.png
|
|
164
|
+
* // Format: png
|
|
165
|
+
* // Dimensions: 1920x1080
|
|
166
|
+
* // Size: 240.0 KB
|
|
167
|
+
* // Full page: yes
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
export function formatDomScreenshot(data) {
|
|
171
|
+
const fmt = new OutputFormatter();
|
|
172
|
+
// Format file size
|
|
173
|
+
const sizeKB = data.size / 1024;
|
|
174
|
+
const sizeStr = sizeKB < 1024 ? `${sizeKB.toFixed(1)} KB` : `${(sizeKB / 1024).toFixed(1)} MB`;
|
|
175
|
+
fmt
|
|
176
|
+
.text('Screenshot captured')
|
|
177
|
+
.blank()
|
|
178
|
+
.keyValueList([
|
|
179
|
+
['Path', data.path],
|
|
180
|
+
['Format', data.format.toUpperCase()],
|
|
181
|
+
...(data.format === 'jpeg' && data.quality !== undefined
|
|
182
|
+
? [['Quality', `${data.quality}%`]]
|
|
183
|
+
: []),
|
|
184
|
+
['Dimensions', `${data.width}x${data.height}`],
|
|
185
|
+
['Size', sizeStr],
|
|
186
|
+
['Full page', data.fullPage ? 'yes' : 'no'],
|
|
187
|
+
...(data.viewport
|
|
188
|
+
? [['Viewport', `${data.viewport.width}x${data.viewport.height}`]]
|
|
189
|
+
: []),
|
|
190
|
+
]);
|
|
191
|
+
return fmt.build();
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=dom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../../src/ui/formatters/dom.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data formatters for human-readable output.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all formatter modules for easy importing.
|
|
5
|
+
*/
|
|
6
|
+
export * from './cookies.js';
|
|
7
|
+
export * from './dom.js';
|
|
8
|
+
export * from './status.js';
|
|
9
|
+
export * from './preview.js';
|
|
10
|
+
export * from './details.js';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/formatters/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data formatters for human-readable output.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all formatter modules for easy importing.
|
|
5
|
+
*/
|
|
6
|
+
export * from './cookies.js';
|
|
7
|
+
export * from './dom.js';
|
|
8
|
+
export * from './status.js';
|
|
9
|
+
export * from './preview.js';
|
|
10
|
+
export * from './details.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/formatters/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { BdgOutput } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Flags that shape how preview output is rendered for `bdg peek`.
|
|
4
|
+
*/
|
|
5
|
+
export interface PreviewOptions {
|
|
6
|
+
/** Emit raw JSON instead of formatted text. */
|
|
7
|
+
json?: boolean;
|
|
8
|
+
/** Limit output to network requests (ignores console data). */
|
|
9
|
+
network?: boolean;
|
|
10
|
+
/** Limit output to console messages (ignores network data). */
|
|
11
|
+
console?: boolean;
|
|
12
|
+
/** Number of recent entries to include (parsed as integer). */
|
|
13
|
+
last: string;
|
|
14
|
+
/** Use the expanded, human-friendly layout. */
|
|
15
|
+
verbose?: boolean;
|
|
16
|
+
/** Stream updates until interrupted (tail-like behaviour). */
|
|
17
|
+
follow?: boolean;
|
|
18
|
+
/** Current view timestamp (for follow mode to show refresh time). */
|
|
19
|
+
viewedAt?: Date;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Format preview output (peek command)
|
|
23
|
+
*/
|
|
24
|
+
export declare function formatPreview(output: BdgOutput, options: PreviewOptions): string;
|
|
25
|
+
//# sourceMappingURL=preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../src/ui/formatters/preview.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AASzC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+DAA+D;IAC/D,IAAI,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,IAAI,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,GAAG,MAAM,CAMhF"}
|