browser-debugger-cli 0.1.0-alpha.1 → 0.2.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/README.md +58 -68
- package/dist/__testfixtures__/cdpMessages.d.ts +1 -1
- package/dist/__testfixtures__/connectionTargets.d.ts +1 -1
- 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 +467 -0
- package/dist/commands/__tests__/cdp.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 +129 -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 +257 -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 +52 -0
- package/dist/commands/domEvalHelpers.d.ts.map +1 -0
- package/dist/commands/domEvalHelpers.js +76 -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 +43 -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 +114 -0
- package/dist/commands/peek.js.map +1 -0
- package/dist/commands/shared/CommandRunner.d.ts +60 -0
- package/dist/commands/shared/CommandRunner.d.ts.map +1 -0
- package/dist/commands/shared/CommandRunner.js +81 -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 +64 -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 +55 -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 +87 -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 +150 -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.js +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 +72 -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 +12 -11
- package/dist/daemon/startSession.js.map +1 -1
- package/dist/daemon/worker.d.ts +1 -1
- package/dist/daemon/worker.js +97 -41
- 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 +4 -4
- package/dist/ipc/client.d.ts.map +1 -1
- package/dist/ipc/client.js +10 -6
- package/dist/ipc/client.js.map +1 -1
- package/dist/ipc/commands.d.ts +33 -1
- package/dist/ipc/commands.d.ts.map +1 -1
- package/dist/ipc/commands.js +4 -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 +1 -1
- 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 +48 -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 +63 -0
- package/dist/ui/formatters/details.js.map +1 -0
- package/dist/ui/formatters/index.d.ts +10 -0
- package/dist/ui/formatters/index.d.ts.map +1 -0
- package/dist/ui/formatters/index.js +10 -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 +177 -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 +197 -0
- package/dist/ui/formatting.d.ts.map +1 -0
- package/dist/ui/formatting.js +318 -0
- package/dist/ui/formatting.js.map +1 -0
- package/dist/ui/messages/chrome.d.ts +102 -0
- package/dist/ui/messages/chrome.d.ts.map +1 -0
- package/dist/ui/messages/chrome.js +162 -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 +180 -0
- package/dist/ui/messages/debug.d.ts.map +1 -0
- package/dist/ui/messages/debug.js +241 -0
- package/dist/ui/messages/debug.js.map +1 -0
- package/dist/ui/messages/errors.d.ts +80 -0
- package/dist/ui/messages/errors.d.ts.map +1 -0
- package/dist/ui/messages/errors.js +122 -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 +27 -0
- package/dist/ui/messages/preview.d.ts.map +1 -0
- package/dist/ui/messages/preview.js +45 -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 +20 -0
- package/dist/ui/messages/validation.d.ts.map +1 -0
- package/dist/ui/messages/validation.js +22 -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/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 +51 -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 +6 -24
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/url.js +6 -67
- package/dist/utils/url.js.map +1 -1
- package/package.json +2 -2
- 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,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debug and diagnostic messages for daemon and worker processes.
|
|
3
|
+
*
|
|
4
|
+
* User-facing debug output for internal operations, prefixed with
|
|
5
|
+
* component names for clarity during troubleshooting.
|
|
6
|
+
*/
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Daemon Messages
|
|
9
|
+
// ============================================================================
|
|
10
|
+
/**
|
|
11
|
+
* Generate worker spawn message with configuration.
|
|
12
|
+
*
|
|
13
|
+
* @param workerPath - Path to worker script
|
|
14
|
+
* @param config - Worker configuration object
|
|
15
|
+
* @returns Formatted debug message
|
|
16
|
+
*/
|
|
17
|
+
export function daemonSpawningWorker(workerPath, config) {
|
|
18
|
+
return `[daemon] Spawning worker: node ${workerPath} <config>\n[daemon] Worker config: ${JSON.stringify(config)}`;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Generate worker spawned success message.
|
|
22
|
+
*
|
|
23
|
+
* @param pid - Worker process ID
|
|
24
|
+
* @returns Formatted debug message
|
|
25
|
+
*/
|
|
26
|
+
export function daemonWorkerSpawned(pid) {
|
|
27
|
+
return `[daemon] Worker spawned (PID ${pid})`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Generate worker ready signal received message.
|
|
31
|
+
*
|
|
32
|
+
* @param workerPid - Worker process ID
|
|
33
|
+
* @param chromePid - Chrome process ID
|
|
34
|
+
* @returns Formatted debug message
|
|
35
|
+
*/
|
|
36
|
+
export function daemonWorkerReady(workerPid, chromePid) {
|
|
37
|
+
return `[daemon] Worker ready signal received\n[daemon] Worker PID: ${workerPid}\n[daemon] Chrome PID: ${chromePid}`;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Generate failed to parse stdout message.
|
|
41
|
+
*
|
|
42
|
+
* @param line - The line that failed to parse
|
|
43
|
+
* @returns Formatted debug message
|
|
44
|
+
*/
|
|
45
|
+
export function daemonParseError(line) {
|
|
46
|
+
return `[daemon] Failed to parse stdout line: ${line}`;
|
|
47
|
+
}
|
|
48
|
+
// ============================================================================
|
|
49
|
+
// Worker Messages
|
|
50
|
+
// ============================================================================
|
|
51
|
+
/**
|
|
52
|
+
* Generate telemetry module activation message.
|
|
53
|
+
*
|
|
54
|
+
* @param collectorName - Name of telemetry module being activated
|
|
55
|
+
* @returns Formatted debug message
|
|
56
|
+
*/
|
|
57
|
+
export function workerActivatingCollector(collectorName) {
|
|
58
|
+
return `[worker] Activating ${collectorName} telemetry`;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Generate all telemetry modules activated message.
|
|
62
|
+
*
|
|
63
|
+
* @param telemetry - Array of activated telemetry module names
|
|
64
|
+
* @returns Formatted debug message
|
|
65
|
+
*/
|
|
66
|
+
export function workerCollectorsActivated(telemetry) {
|
|
67
|
+
return `[worker] All telemetry modules activated: ${telemetry.join(', ')}`;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Generate unknown command received message.
|
|
71
|
+
*
|
|
72
|
+
* @param commandName - The unknown command name
|
|
73
|
+
* @returns Formatted debug message
|
|
74
|
+
*/
|
|
75
|
+
export function workerUnknownCommand(commandName) {
|
|
76
|
+
return `[worker] Unknown command: ${commandName}`;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Generate handling command message.
|
|
80
|
+
*
|
|
81
|
+
* @param commandName - Command being handled
|
|
82
|
+
* @returns Formatted debug message
|
|
83
|
+
*/
|
|
84
|
+
export function workerHandlingCommand(commandName) {
|
|
85
|
+
return `[worker] Handling ${commandName}_request`;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Generate command response sent message.
|
|
89
|
+
*
|
|
90
|
+
* @param commandName - Command that was handled
|
|
91
|
+
* @param success - Whether the command succeeded
|
|
92
|
+
* @param error - Optional error message if failed
|
|
93
|
+
* @returns Formatted debug message
|
|
94
|
+
*/
|
|
95
|
+
export function workerCommandResponse(commandName, success, error) {
|
|
96
|
+
if (success) {
|
|
97
|
+
return `[worker] Sent ${commandName}_response (success)`;
|
|
98
|
+
}
|
|
99
|
+
return `[worker] Sent ${commandName}_response (error: ${error})`;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Generate IPC message parse failure message.
|
|
103
|
+
*
|
|
104
|
+
* @param error - Error message from parse failure
|
|
105
|
+
* @returns Formatted debug message
|
|
106
|
+
*/
|
|
107
|
+
export function workerIPCParseError(error) {
|
|
108
|
+
return `[worker] Failed to parse IPC message: ${error}`;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Generate stdin closed message.
|
|
112
|
+
*
|
|
113
|
+
* @returns Formatted debug message
|
|
114
|
+
*/
|
|
115
|
+
export function workerStdinClosed() {
|
|
116
|
+
return '[worker] Stdin closed, daemon disconnected';
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Generate stdin listener setup message.
|
|
120
|
+
*
|
|
121
|
+
* @returns Formatted debug message
|
|
122
|
+
*/
|
|
123
|
+
export function workerStdinListenerSetup() {
|
|
124
|
+
return '[worker] Stdin listener set up for IPC commands';
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Generate ready signal sent message.
|
|
128
|
+
*
|
|
129
|
+
* @param workerPid - Worker process ID
|
|
130
|
+
* @param chromePid - Chrome process ID
|
|
131
|
+
* @returns Formatted debug message
|
|
132
|
+
*/
|
|
133
|
+
export function workerReadySignalSent(workerPid, chromePid) {
|
|
134
|
+
return `[worker] Ready signal sent (PID ${workerPid}, Chrome PID ${chromePid})`;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Generate graceful shutdown started message.
|
|
138
|
+
*
|
|
139
|
+
* @returns Formatted debug message
|
|
140
|
+
*/
|
|
141
|
+
export function workerShutdownStarted() {
|
|
142
|
+
return '[worker] Starting graceful shutdown...';
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Generate collecting final DOM snapshot message.
|
|
146
|
+
*
|
|
147
|
+
* @returns Formatted debug message
|
|
148
|
+
*/
|
|
149
|
+
export function workerCollectingDOM() {
|
|
150
|
+
return '[worker] Collecting final DOM snapshot...';
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Generate DOM snapshot collected message.
|
|
154
|
+
*
|
|
155
|
+
* @returns Formatted debug message
|
|
156
|
+
*/
|
|
157
|
+
export function workerDOMCollected() {
|
|
158
|
+
return '[worker] DOM snapshot collected';
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Generate failed to collect DOM message.
|
|
162
|
+
*
|
|
163
|
+
* @param error - Error message from collection failure
|
|
164
|
+
* @returns Formatted debug message
|
|
165
|
+
*/
|
|
166
|
+
export function workerDOMCollectionFailed(error) {
|
|
167
|
+
return `[worker] Failed to collect DOM: ${error}`;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Generate writing final output message.
|
|
171
|
+
*
|
|
172
|
+
* @returns Formatted debug message
|
|
173
|
+
*/
|
|
174
|
+
export function workerWritingOutput() {
|
|
175
|
+
return '[worker] Writing final output...';
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Generate running cleanup functions message.
|
|
179
|
+
*
|
|
180
|
+
* @returns Formatted debug message
|
|
181
|
+
*/
|
|
182
|
+
export function workerRunningCleanup() {
|
|
183
|
+
return '[worker] Running collector cleanup functions...';
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Generate closing CDP connection message.
|
|
187
|
+
*
|
|
188
|
+
* @returns Formatted debug message
|
|
189
|
+
*/
|
|
190
|
+
export function workerClosingCDP() {
|
|
191
|
+
return '[worker] Closing CDP connection...';
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Generate graceful shutdown complete message.
|
|
195
|
+
*
|
|
196
|
+
* @returns Formatted debug message
|
|
197
|
+
*/
|
|
198
|
+
export function workerShutdownComplete() {
|
|
199
|
+
return '[worker] Graceful shutdown complete';
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Generate exiting due to Chrome connection loss message.
|
|
203
|
+
*
|
|
204
|
+
* @returns Formatted debug message
|
|
205
|
+
*/
|
|
206
|
+
export function workerExitingConnectionLoss() {
|
|
207
|
+
return '[worker] Exiting due to Chrome connection loss';
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Generate received SIGTERM message.
|
|
211
|
+
*
|
|
212
|
+
* @returns Formatted debug message
|
|
213
|
+
*/
|
|
214
|
+
export function workerReceivedSIGTERM() {
|
|
215
|
+
return '[worker] Received SIGTERM';
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Generate received SIGINT message.
|
|
219
|
+
*
|
|
220
|
+
* @returns Formatted debug message
|
|
221
|
+
*/
|
|
222
|
+
export function workerReceivedSIGINT() {
|
|
223
|
+
return '[worker] Received SIGINT';
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Generate timeout reached message.
|
|
227
|
+
*
|
|
228
|
+
* @returns Formatted debug message
|
|
229
|
+
*/
|
|
230
|
+
export function workerTimeoutReached() {
|
|
231
|
+
return '[worker] Timeout reached, initiating shutdown';
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Generate session active waiting message.
|
|
235
|
+
*
|
|
236
|
+
* @returns Formatted debug message
|
|
237
|
+
*/
|
|
238
|
+
export function workerSessionActive() {
|
|
239
|
+
return '[worker] Session active, waiting for signal or timeout...';
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=debug.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/ui/messages/debug.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common error messages and patterns.
|
|
3
|
+
*
|
|
4
|
+
* Centralized location for reusable error messages with consistent formatting.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Generate "session already running" error message.
|
|
8
|
+
*
|
|
9
|
+
* @param pid - Process ID of running session
|
|
10
|
+
* @param duration - Session duration in milliseconds
|
|
11
|
+
* @param targetUrl - Optional target URL to show
|
|
12
|
+
* @returns Formatted error message
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```typescript
|
|
16
|
+
* const message = sessionAlreadyRunningError(12345, 60000, 'http://localhost:3000');
|
|
17
|
+
* console.error(message);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function sessionAlreadyRunningError(pid: number, duration: number, targetUrl?: string): string;
|
|
21
|
+
/**
|
|
22
|
+
* Generate "daemon not running" error message.
|
|
23
|
+
*
|
|
24
|
+
* @returns Formatted error message with suggestion
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```typescript
|
|
28
|
+
* console.error(daemonNotRunningError());
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function daemonNotRunningError(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Generate "daemon connection failed" error message.
|
|
34
|
+
*
|
|
35
|
+
* @returns Formatted error message with troubleshooting
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* console.error(daemonConnectionFailedError());
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function daemonConnectionFailedError(): string;
|
|
43
|
+
/**
|
|
44
|
+
* Generate generic error message with optional context.
|
|
45
|
+
*
|
|
46
|
+
* @param message - Error message
|
|
47
|
+
* @param context - Optional additional context
|
|
48
|
+
* @returns Formatted error message
|
|
49
|
+
*
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* console.error(genericError('Operation failed', 'Network timeout'));
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function genericError(message: string, context?: string): string;
|
|
56
|
+
/**
|
|
57
|
+
* Generate "unknown error" message.
|
|
58
|
+
*
|
|
59
|
+
* @returns Formatted error message
|
|
60
|
+
*/
|
|
61
|
+
export declare function unknownError(): string;
|
|
62
|
+
/**
|
|
63
|
+
* Generate "invalid response" error message.
|
|
64
|
+
*
|
|
65
|
+
* @param reason - Reason for invalid response
|
|
66
|
+
* @returns Formatted error message
|
|
67
|
+
*/
|
|
68
|
+
export declare function invalidResponseError(reason: string): string;
|
|
69
|
+
/**
|
|
70
|
+
* Generate "no preview data available" error message.
|
|
71
|
+
*
|
|
72
|
+
* @returns Formatted error message with suggestions
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```typescript
|
|
76
|
+
* console.error(noPreviewDataError());
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare function noPreviewDataError(): string;
|
|
80
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/ui/messages/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,MAAM,GACjB,MAAM,CAkBR;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAK9C;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,CAKpD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAKtE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAM3C"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common error messages and patterns.
|
|
3
|
+
*
|
|
4
|
+
* Centralized location for reusable error messages with consistent formatting.
|
|
5
|
+
*/
|
|
6
|
+
import { formatDuration } from '../../ui/formatting.js';
|
|
7
|
+
/**
|
|
8
|
+
* Generate "session already running" error message.
|
|
9
|
+
*
|
|
10
|
+
* @param pid - Process ID of running session
|
|
11
|
+
* @param duration - Session duration in milliseconds
|
|
12
|
+
* @param targetUrl - Optional target URL to show
|
|
13
|
+
* @returns Formatted error message
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const message = sessionAlreadyRunningError(12345, 60000, 'http://localhost:3000');
|
|
18
|
+
* console.error(message);
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export function sessionAlreadyRunningError(pid, duration, targetUrl) {
|
|
22
|
+
const lines = [];
|
|
23
|
+
lines.push('');
|
|
24
|
+
lines.push('Error: Session already running');
|
|
25
|
+
lines.push('');
|
|
26
|
+
lines.push(` PID: ${pid}`);
|
|
27
|
+
if (targetUrl) {
|
|
28
|
+
lines.push(` Target: ${targetUrl}`);
|
|
29
|
+
}
|
|
30
|
+
lines.push(` Duration: ${formatDuration(duration)}`);
|
|
31
|
+
lines.push('');
|
|
32
|
+
lines.push('Suggestions:');
|
|
33
|
+
lines.push(' View session: bdg status');
|
|
34
|
+
lines.push(' Stop and restart: bdg stop && bdg <url>');
|
|
35
|
+
lines.push('');
|
|
36
|
+
return lines.join('\n');
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Generate "daemon not running" error message.
|
|
40
|
+
*
|
|
41
|
+
* @returns Formatted error message with suggestion
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* console.error(daemonNotRunningError());
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export function daemonNotRunningError() {
|
|
49
|
+
const lines = [];
|
|
50
|
+
lines.push('Error: Daemon not running');
|
|
51
|
+
lines.push('Start it with: bdg <url>');
|
|
52
|
+
return lines.join('\n');
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Generate "daemon connection failed" error message.
|
|
56
|
+
*
|
|
57
|
+
* @returns Formatted error message with troubleshooting
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```typescript
|
|
61
|
+
* console.error(daemonConnectionFailedError());
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
export function daemonConnectionFailedError() {
|
|
65
|
+
const lines = [];
|
|
66
|
+
lines.push('[bdg] Daemon not running');
|
|
67
|
+
lines.push('[bdg] Try running the command again or check daemon status with: bdg status');
|
|
68
|
+
return lines.join('\n');
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Generate generic error message with optional context.
|
|
72
|
+
*
|
|
73
|
+
* @param message - Error message
|
|
74
|
+
* @param context - Optional additional context
|
|
75
|
+
* @returns Formatted error message
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```typescript
|
|
79
|
+
* console.error(genericError('Operation failed', 'Network timeout'));
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export function genericError(message, context) {
|
|
83
|
+
if (context) {
|
|
84
|
+
return `Error: ${message}\n${context}`;
|
|
85
|
+
}
|
|
86
|
+
return `Error: ${message}`;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Generate "unknown error" message.
|
|
90
|
+
*
|
|
91
|
+
* @returns Formatted error message
|
|
92
|
+
*/
|
|
93
|
+
export function unknownError() {
|
|
94
|
+
return 'Error: Unknown error';
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Generate "invalid response" error message.
|
|
98
|
+
*
|
|
99
|
+
* @param reason - Reason for invalid response
|
|
100
|
+
* @returns Formatted error message
|
|
101
|
+
*/
|
|
102
|
+
export function invalidResponseError(reason) {
|
|
103
|
+
return `[bdg] Invalid response from daemon: ${reason}`;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Generate "no preview data available" error message.
|
|
107
|
+
*
|
|
108
|
+
* @returns Formatted error message with suggestions
|
|
109
|
+
*
|
|
110
|
+
* @example
|
|
111
|
+
* ```typescript
|
|
112
|
+
* console.error(noPreviewDataError());
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
export function noPreviewDataError() {
|
|
116
|
+
return `Error: No active session found
|
|
117
|
+
No preview data available
|
|
118
|
+
|
|
119
|
+
Start a session with: bdg <url>
|
|
120
|
+
Check session status: bdg status`;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/ui/messages/errors.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,0BAA0B,CACxC,GAAW,EACX,QAAgB,EAChB,SAAkB;IAElB,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IAC7C,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC,CAAC;IACjC,IAAI,SAAS,EAAE,CAAC;QACd,KAAK,CAAC,IAAI,CAAC,eAAe,SAAS,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,eAAe,cAAc,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IACtD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IAC7C,KAAK,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;IACxD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,qBAAqB;IACnC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC;IACxC,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,2BAA2B;IACzC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;IACvC,KAAK,CAAC,IAAI,CAAC,6EAA6E,CAAC,CAAC;IAC1F,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe,EAAE,OAAgB;IAC5D,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,UAAU,OAAO,KAAK,OAAO,EAAE,CAAC;IACzC,CAAC;IACD,OAAO,UAAU,OAAO,EAAE,CAAC;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,sBAAsB,CAAC;AAChC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAc;IACjD,OAAO,uCAAuC,MAAM,EAAE,CAAC;AACzD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;iCAIwB,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized user-facing messages.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all message modules for easy importing.
|
|
5
|
+
*/
|
|
6
|
+
export * from './session.js';
|
|
7
|
+
export * from './chrome.js';
|
|
8
|
+
export * from './errors.js';
|
|
9
|
+
export * from './commands.js';
|
|
10
|
+
export * from './debug.js';
|
|
11
|
+
export * from './internal.js';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/messages/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized user-facing messages.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports all message modules for easy importing.
|
|
5
|
+
*/
|
|
6
|
+
export * from './session.js';
|
|
7
|
+
export * from './chrome.js';
|
|
8
|
+
export * from './errors.js';
|
|
9
|
+
export * from './commands.js';
|
|
10
|
+
export * from './debug.js';
|
|
11
|
+
export * from './internal.js';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/messages/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal system messages for session management operations.
|
|
3
|
+
*
|
|
4
|
+
* User-facing messages for internal operations like cache writes,
|
|
5
|
+
* process management, and file system operations that may fail
|
|
6
|
+
* but shouldn't stop execution.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Generate warning for failed DOM cache write.
|
|
10
|
+
*
|
|
11
|
+
* @param error - Error message from write failure
|
|
12
|
+
* @returns Formatted warning message
|
|
13
|
+
*/
|
|
14
|
+
export declare function domCacheWriteWarning(error: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Generate taskkill stderr output message (Windows).
|
|
17
|
+
*
|
|
18
|
+
* @param stderr - Standard error output from taskkill command
|
|
19
|
+
* @returns Formatted diagnostic message
|
|
20
|
+
*/
|
|
21
|
+
export declare function taskkillStderr(stderr: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Generate taskkill failure error message.
|
|
24
|
+
*
|
|
25
|
+
* @param exitCode - Exit code from taskkill
|
|
26
|
+
* @param errorMsg - Error message from stderr/stdout
|
|
27
|
+
* @returns Formatted error message
|
|
28
|
+
*/
|
|
29
|
+
export declare function taskkillFailedError(exitCode: number, errorMsg: string): string;
|
|
30
|
+
//# sourceMappingURL=internal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/ui/messages/internal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1D;AAMD;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAE9E"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal system messages for session management operations.
|
|
3
|
+
*
|
|
4
|
+
* User-facing messages for internal operations like cache writes,
|
|
5
|
+
* process management, and file system operations that may fail
|
|
6
|
+
* but shouldn't stop execution.
|
|
7
|
+
*/
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Cache Messages
|
|
10
|
+
// ============================================================================
|
|
11
|
+
/**
|
|
12
|
+
* Generate warning for failed DOM cache write.
|
|
13
|
+
*
|
|
14
|
+
* @param error - Error message from write failure
|
|
15
|
+
* @returns Formatted warning message
|
|
16
|
+
*/
|
|
17
|
+
export function domCacheWriteWarning(error) {
|
|
18
|
+
return `Warning: Failed to write DOM cache: ${error}`;
|
|
19
|
+
}
|
|
20
|
+
// ============================================================================
|
|
21
|
+
// Process Management Messages
|
|
22
|
+
// ============================================================================
|
|
23
|
+
/**
|
|
24
|
+
* Generate taskkill stderr output message (Windows).
|
|
25
|
+
*
|
|
26
|
+
* @param stderr - Standard error output from taskkill command
|
|
27
|
+
* @returns Formatted diagnostic message
|
|
28
|
+
*/
|
|
29
|
+
export function taskkillStderr(stderr) {
|
|
30
|
+
return `taskkill stderr: ${stderr}`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Generate taskkill failure error message.
|
|
34
|
+
*
|
|
35
|
+
* @param exitCode - Exit code from taskkill
|
|
36
|
+
* @param errorMsg - Error message from stderr/stdout
|
|
37
|
+
* @returns Formatted error message
|
|
38
|
+
*/
|
|
39
|
+
export function taskkillFailedError(exitCode, errorMsg) {
|
|
40
|
+
return `taskkill failed (exit code ${exitCode}): ${errorMsg}`;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=internal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/ui/messages/internal.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAAC,KAAa;IAChD,OAAO,uCAAuC,KAAK,EAAE,CAAC;AACxD,CAAC;AAED,+EAA+E;AAC/E,8BAA8B;AAC9B,+EAA+E;AAE/E;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,MAAc;IAC3C,OAAO,oBAAoB,MAAM,EAAE,CAAC;AACtC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAAgB,EAAE,QAAgB;IACpE,OAAO,8BAA8B,QAAQ,MAAM,QAAQ,EAAE,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview command messages (bdg peek)
|
|
3
|
+
*
|
|
4
|
+
* User-facing messages for the peek command, including empty states,
|
|
5
|
+
* tips, and interactive command suggestions.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PREVIEW_EMPTY_STATES: {
|
|
8
|
+
readonly NO_DATA: "(none)";
|
|
9
|
+
readonly NO_NETWORK_REQUESTS: "No network requests yet";
|
|
10
|
+
readonly NO_CONSOLE_MESSAGES: "No console messages yet";
|
|
11
|
+
};
|
|
12
|
+
export declare const PREVIEW_HEADERS: {
|
|
13
|
+
readonly LIVE_PREVIEW: "Live Preview (Partial Data)";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Generate compact mode tip message.
|
|
17
|
+
*
|
|
18
|
+
* @returns Single-line tip for basic peek usage
|
|
19
|
+
*/
|
|
20
|
+
export declare function compactTipsMessage(): string;
|
|
21
|
+
/**
|
|
22
|
+
* Generate verbose mode commands section.
|
|
23
|
+
*
|
|
24
|
+
* @returns Multi-line commands help for verbose mode
|
|
25
|
+
*/
|
|
26
|
+
export declare function verboseCommandsMessage(): string;
|
|
27
|
+
//# sourceMappingURL=preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../src/ui/messages/preview.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,eAAO,MAAM,oBAAoB;;;;CAIvB,CAAC;AAMX,eAAO,MAAM,eAAe;;CAElB,CAAC;AAMX;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,CAO/C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Preview command messages (bdg peek)
|
|
3
|
+
*
|
|
4
|
+
* User-facing messages for the peek command, including empty states,
|
|
5
|
+
* tips, and interactive command suggestions.
|
|
6
|
+
*/
|
|
7
|
+
// ============================================================================
|
|
8
|
+
// Empty State Messages
|
|
9
|
+
// ============================================================================
|
|
10
|
+
export const PREVIEW_EMPTY_STATES = {
|
|
11
|
+
NO_DATA: '(none)',
|
|
12
|
+
NO_NETWORK_REQUESTS: 'No network requests yet',
|
|
13
|
+
NO_CONSOLE_MESSAGES: 'No console messages yet',
|
|
14
|
+
};
|
|
15
|
+
// ============================================================================
|
|
16
|
+
// Header Messages
|
|
17
|
+
// ============================================================================
|
|
18
|
+
export const PREVIEW_HEADERS = {
|
|
19
|
+
LIVE_PREVIEW: 'Live Preview (Partial Data)',
|
|
20
|
+
};
|
|
21
|
+
// ============================================================================
|
|
22
|
+
// Tips and Command Suggestions
|
|
23
|
+
// ============================================================================
|
|
24
|
+
/**
|
|
25
|
+
* Generate compact mode tip message.
|
|
26
|
+
*
|
|
27
|
+
* @returns Single-line tip for basic peek usage
|
|
28
|
+
*/
|
|
29
|
+
export function compactTipsMessage() {
|
|
30
|
+
return 'Tip: bdg stop | bdg peek --last 50 | bdg peek --verbose';
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Generate verbose mode commands section.
|
|
34
|
+
*
|
|
35
|
+
* @returns Multi-line commands help for verbose mode
|
|
36
|
+
*/
|
|
37
|
+
export function verboseCommandsMessage() {
|
|
38
|
+
const lines = [];
|
|
39
|
+
lines.push('Commands:');
|
|
40
|
+
lines.push(' Stop session: bdg stop');
|
|
41
|
+
lines.push(' Full preview: bdg peek --last 50');
|
|
42
|
+
lines.push(' Watch live: bdg peek --follow');
|
|
43
|
+
return lines.join('\n');
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../../../src/ui/messages/preview.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,+EAA+E;AAC/E,uBAAuB;AACvB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,OAAO,EAAE,QAAQ;IACjB,mBAAmB,EAAE,yBAAyB;IAC9C,mBAAmB,EAAE,yBAAyB;CACtC,CAAC;AAEX,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,YAAY,EAAE,6BAA6B;CACnC,CAAC;AAEX,+EAA+E;AAC/E,+BAA+B;AAC/B,+EAA+E;AAE/E;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,yDAAyD,CAAC;AACnE,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,sBAAsB;IACpC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IACxB,KAAK,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAC1C,KAAK,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;IACpD,KAAK,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;IACnD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|