browser-debugger-cli 0.1.0 → 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/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 +1 -1
- 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,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-related user-facing messages.
|
|
3
|
+
*
|
|
4
|
+
* Centralized location for all session UI text including landing pages,
|
|
5
|
+
* status displays, and session management messages.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Options for the landing page display.
|
|
9
|
+
*/
|
|
10
|
+
export interface LandingPageOptions {
|
|
11
|
+
/** Target URL being monitored */
|
|
12
|
+
url: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Generate the landing page display for session start.
|
|
16
|
+
*
|
|
17
|
+
* Shows a clean, organized overview of available commands grouped by domain.
|
|
18
|
+
*
|
|
19
|
+
* @param options - Landing page options
|
|
20
|
+
* @returns Formatted landing page string
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* const message = landingPage({
|
|
25
|
+
* url: 'http://localhost:3000'
|
|
26
|
+
* });
|
|
27
|
+
* console.log(message);
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function landingPage(options: LandingPageOptions): string;
|
|
31
|
+
/**
|
|
32
|
+
* Generate "session stopped" success message.
|
|
33
|
+
*
|
|
34
|
+
* @param outputPath - Path to session output file
|
|
35
|
+
* @returns Formatted success message
|
|
36
|
+
*/
|
|
37
|
+
export declare function sessionStopped(outputPath: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Standard messages for stop command operations.
|
|
40
|
+
*/
|
|
41
|
+
export declare const STOP_MESSAGES: {
|
|
42
|
+
readonly SUCCESS: "Session stopped successfully";
|
|
43
|
+
readonly NO_SESSION: "No active session found";
|
|
44
|
+
readonly FAILED: "Failed to stop session";
|
|
45
|
+
readonly DAEMON_NOT_RUNNING: "Daemon not running";
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Generate stop session failed error message.
|
|
49
|
+
*
|
|
50
|
+
* @param reason - Reason for failure
|
|
51
|
+
* @returns Formatted error message
|
|
52
|
+
*/
|
|
53
|
+
export declare function stopFailedError(reason: string): string;
|
|
54
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/ui/messages/session.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,iCAAiC;IACjC,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,kBAAkB,GAAG,MAAM,CA+B/D;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEzD;AAMD;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;CAKhB,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEtD"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session-related user-facing messages.
|
|
3
|
+
*
|
|
4
|
+
* Centralized location for all session UI text including landing pages,
|
|
5
|
+
* status displays, and session management messages.
|
|
6
|
+
*/
|
|
7
|
+
import { section } from '../../ui/formatting.js';
|
|
8
|
+
/**
|
|
9
|
+
* Generate the landing page display for session start.
|
|
10
|
+
*
|
|
11
|
+
* Shows a clean, organized overview of available commands grouped by domain.
|
|
12
|
+
*
|
|
13
|
+
* @param options - Landing page options
|
|
14
|
+
* @returns Formatted landing page string
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const message = landingPage({
|
|
19
|
+
* url: 'http://localhost:3000'
|
|
20
|
+
* });
|
|
21
|
+
* console.log(message);
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export function landingPage(options) {
|
|
25
|
+
const { url } = options;
|
|
26
|
+
const lines = [];
|
|
27
|
+
lines.push('');
|
|
28
|
+
lines.push('▲ Session Started');
|
|
29
|
+
lines.push('');
|
|
30
|
+
lines.push(`Target: ${url}`);
|
|
31
|
+
lines.push('');
|
|
32
|
+
lines.push(section('Explore by domain:', [
|
|
33
|
+
'bdg dom DOM inspection & manipulation',
|
|
34
|
+
'bdg network Network requests & cookies',
|
|
35
|
+
'bdg console Console logs & messages',
|
|
36
|
+
]));
|
|
37
|
+
lines.push('');
|
|
38
|
+
lines.push(section('Session:', [
|
|
39
|
+
'bdg status Check session state',
|
|
40
|
+
'bdg stop End session & save',
|
|
41
|
+
]));
|
|
42
|
+
lines.push('');
|
|
43
|
+
lines.push(section('Advanced:', ['bdg cdp <method> [params] Direct CDP access (300+ methods)']));
|
|
44
|
+
lines.push('');
|
|
45
|
+
return lines.join('\n');
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Generate "session stopped" success message.
|
|
49
|
+
*
|
|
50
|
+
* @param outputPath - Path to session output file
|
|
51
|
+
* @returns Formatted success message
|
|
52
|
+
*/
|
|
53
|
+
export function sessionStopped(outputPath) {
|
|
54
|
+
return `Session stopped. Output saved to: ${outputPath}`;
|
|
55
|
+
}
|
|
56
|
+
// ============================================================================
|
|
57
|
+
// Stop Command Messages
|
|
58
|
+
// ============================================================================
|
|
59
|
+
/**
|
|
60
|
+
* Standard messages for stop command operations.
|
|
61
|
+
*/
|
|
62
|
+
export const STOP_MESSAGES = {
|
|
63
|
+
SUCCESS: 'Session stopped successfully',
|
|
64
|
+
NO_SESSION: 'No active session found',
|
|
65
|
+
FAILED: 'Failed to stop session',
|
|
66
|
+
DAEMON_NOT_RUNNING: 'Daemon not running',
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Generate stop session failed error message.
|
|
70
|
+
*
|
|
71
|
+
* @param reason - Reason for failure
|
|
72
|
+
* @returns Formatted error message
|
|
73
|
+
*/
|
|
74
|
+
export function stopFailedError(reason) {
|
|
75
|
+
return `Stop session failed: ${reason}`;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../src/ui/messages/session.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAU7C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CAAC,OAA2B;IACrD,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IAExB,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;IACjC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC,CAAC;IAC7B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CACR,OAAO,CAAC,oBAAoB,EAAE;QAC5B,+CAA+C;QAC/C,4CAA4C;QAC5C,yCAAyC;KAC1C,CAAC,CACH,CAAC;IACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CACR,OAAO,CAAC,UAAU,EAAE;QAClB,qCAAqC;QACrC,oCAAoC;KACrC,CAAC,CACH,CAAC;IACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CACR,OAAO,CAAC,WAAW,EAAE,CAAC,+DAA+D,CAAC,CAAC,CACxF,CAAC;IACF,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAEf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC/C,OAAO,qCAAqC,UAAU,EAAE,CAAC;AAC3D,CAAC;AAED,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,OAAO,EAAE,8BAA8B;IACvC,UAAU,EAAE,yBAAyB;IACrC,MAAM,EAAE,wBAAwB;IAChC,kBAAkB,EAAE,oBAAoB;CAChC,CAAC;AAEX;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,MAAc;IAC5C,OAAO,wBAAwB,MAAM,EAAE,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation error messages
|
|
3
|
+
*
|
|
4
|
+
* User-facing messages for input validation failures across commands.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Generate invalid integer error message.
|
|
8
|
+
*
|
|
9
|
+
* @param fieldName - Name of the field being validated
|
|
10
|
+
* @param value - The invalid value provided
|
|
11
|
+
* @returns Formatted error message
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* throw new Error(invalidIntegerError('timeout', 'abc'));
|
|
16
|
+
* // "Invalid timeout: "abc" is not a valid integer"
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function invalidIntegerError(fieldName: string, value: string): string;
|
|
20
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/ui/messages/validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE5E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Validation error messages
|
|
3
|
+
*
|
|
4
|
+
* User-facing messages for input validation failures across commands.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Generate invalid integer error message.
|
|
8
|
+
*
|
|
9
|
+
* @param fieldName - Name of the field being validated
|
|
10
|
+
* @param value - The invalid value provided
|
|
11
|
+
* @returns Formatted error message
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* throw new Error(invalidIntegerError('timeout', 'abc'));
|
|
16
|
+
* // "Invalid timeout: "abc" is not a valid integer"
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export function invalidIntegerError(fieldName, value) {
|
|
20
|
+
return `Invalid ${fieldName}: "${value}" is not a valid integer`;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../../src/ui/messages/validation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CAAC,SAAiB,EAAE,KAAa;IAClE,OAAO,WAAW,SAAS,MAAM,KAAK,0BAA0B,CAAC;AACnE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as assert from 'node:assert/strict';
|
|
2
2
|
import { describe, it } from 'node:test';
|
|
3
|
-
import { matchesWildcard, shouldFetchBody, shouldExcludeUrl, shouldExcludeDomain, shouldExcludeConsoleMessage, DEFAULT_SKIP_BODY_PATTERNS, DEFAULT_EXCLUDED_DOMAINS, DEFAULT_EXCLUDED_CONSOLE_PATTERNS, } from '
|
|
3
|
+
import { matchesWildcard, shouldFetchBody, shouldExcludeUrl, shouldExcludeDomain, shouldExcludeConsoleMessage, DEFAULT_SKIP_BODY_PATTERNS, DEFAULT_EXCLUDED_DOMAINS, DEFAULT_EXCLUDED_CONSOLE_PATTERNS, } from '../../utils/filters.js';
|
|
4
4
|
void describe('filters - matchesWildcard', () => {
|
|
5
5
|
void it('should match exact strings', () => {
|
|
6
6
|
assert.equal(matchesWildcard('api.example.com', 'api.example.com'), true);
|
|
@@ -3,7 +3,7 @@ import type { CDPConnection } from '../connection/cdp.js';
|
|
|
3
3
|
* Registry for managing CDP event handlers with automatic cleanup.
|
|
4
4
|
*
|
|
5
5
|
* Provides a centralized way to register and clean up CDP event handlers,
|
|
6
|
-
* eliminating the boilerplate code repeated across all
|
|
6
|
+
* eliminating the boilerplate code repeated across all telemetry modules.
|
|
7
7
|
*/
|
|
8
8
|
export declare class CDPHandlerRegistry {
|
|
9
9
|
private handlers;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Registry for managing CDP event handlers with automatic cleanup.
|
|
3
3
|
*
|
|
4
4
|
* Provides a centralized way to register and clean up CDP event handlers,
|
|
5
|
-
* eliminating the boilerplate code repeated across all
|
|
5
|
+
* eliminating the boilerplate code repeated across all telemetry modules.
|
|
6
6
|
*/
|
|
7
7
|
export class CDPHandlerRegistry {
|
|
8
8
|
handlers = [];
|
|
@@ -13,16 +13,4 @@ export interface ChromeDiagnostics {
|
|
|
13
13
|
* @returns Chrome diagnostics information
|
|
14
14
|
*/
|
|
15
15
|
export declare function getChromeDiagnostics(): ChromeDiagnostics;
|
|
16
|
-
/**
|
|
17
|
-
* Format diagnostics for error reporting when Chrome launch fails.
|
|
18
|
-
* @param diagnostics - Chrome diagnostics information
|
|
19
|
-
* @returns Formatted error message with troubleshooting steps
|
|
20
|
-
*/
|
|
21
|
-
export declare function formatDiagnosticsForError(diagnostics: ChromeDiagnostics): string[];
|
|
22
|
-
/**
|
|
23
|
-
* Format diagnostics for verbose status output (bdg status --verbose).
|
|
24
|
-
* @param diagnostics - Chrome diagnostics information
|
|
25
|
-
* @returns Array of formatted status lines
|
|
26
|
-
*/
|
|
27
|
-
export declare function formatDiagnosticsForStatus(diagnostics: ChromeDiagnostics): string[];
|
|
28
16
|
//# sourceMappingURL=chromeDiagnostics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chromeDiagnostics.d.ts","sourceRoot":"","sources":["../../src/utils/chromeDiagnostics.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAOD;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CA0BxD
|
|
1
|
+
{"version":3,"file":"chromeDiagnostics.d.ts","sourceRoot":"","sources":["../../src/utils/chromeDiagnostics.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAOD;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CA0BxD"}
|
|
@@ -34,55 +34,4 @@ export function getChromeDiagnostics() {
|
|
|
34
34
|
};
|
|
35
35
|
return cachedDiagnostics;
|
|
36
36
|
}
|
|
37
|
-
/**
|
|
38
|
-
* Format diagnostics for error reporting when Chrome launch fails.
|
|
39
|
-
* @param diagnostics - Chrome diagnostics information
|
|
40
|
-
* @returns Formatted error message with troubleshooting steps
|
|
41
|
-
*/
|
|
42
|
-
export function formatDiagnosticsForError(diagnostics) {
|
|
43
|
-
const lines = [];
|
|
44
|
-
if (diagnostics.installationCount === 0) {
|
|
45
|
-
lines.push('Error: No Chrome installations detected\n');
|
|
46
|
-
lines.push('Install Chrome from:');
|
|
47
|
-
lines.push(' https://www.google.com/chrome/\n');
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
lines.push(`Found ${diagnostics.installationCount} Chrome installation${diagnostics.installationCount > 1 ? 's' : ''}:\n`);
|
|
51
|
-
diagnostics.installations.forEach((path, index) => {
|
|
52
|
-
lines.push(` ${index + 1}. ${path}`);
|
|
53
|
-
});
|
|
54
|
-
lines.push('');
|
|
55
|
-
if (diagnostics.defaultPath) {
|
|
56
|
-
lines.push(`Default binary: ${diagnostics.defaultPath}\n`);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
lines.push('Default binary: Could not determine\n');
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
return lines;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Format diagnostics for verbose status output (bdg status --verbose).
|
|
66
|
-
* @param diagnostics - Chrome diagnostics information
|
|
67
|
-
* @returns Array of formatted status lines
|
|
68
|
-
*/
|
|
69
|
-
export function formatDiagnosticsForStatus(diagnostics) {
|
|
70
|
-
const lines = [];
|
|
71
|
-
if (diagnostics.defaultPath) {
|
|
72
|
-
lines.push(`Binary: ${diagnostics.defaultPath}`);
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
lines.push('Binary: Could not determine');
|
|
76
|
-
}
|
|
77
|
-
lines.push(`Installations: ${diagnostics.installationCount} found`);
|
|
78
|
-
if (diagnostics.installationCount > 0 && diagnostics.installationCount <= 3) {
|
|
79
|
-
diagnostics.installations.forEach((path, index) => {
|
|
80
|
-
lines.push(` ${index + 1}. ${path}`);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
else if (diagnostics.installationCount > 3) {
|
|
84
|
-
lines.push(` (Use 'bdg cleanup --aggressive' to see all)`);
|
|
85
|
-
}
|
|
86
|
-
return lines;
|
|
87
|
-
}
|
|
88
37
|
//# sourceMappingURL=chromeDiagnostics.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chromeDiagnostics.js","sourceRoot":"","sources":["../../src/utils/chromeDiagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,iBAAiB,CAAC;AAWlD;;GAEG;AACH,IAAI,iBAAiB,GAA6B,IAAI,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB;IAClC,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW,GAAkB,IAAI,CAAC;IACtC,IAAI,CAAC;QACH,WAAW,GAAG,cAAc,CAAC,aAAa,EAAE,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,+CAA+C;IACjD,CAAC;IAED,IAAI,aAAa,GAAa,EAAE,CAAC;IACjC,IAAI,CAAC;QACH,aAAa,GAAG,cAAc,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IAC7D,CAAC;IAAC,MAAM,CAAC;QACP,oDAAoD;IACtD,CAAC;IAED,iBAAiB,GAAG;QAClB,WAAW;QACX,aAAa;QACb,iBAAiB,EAAE,aAAa,CAAC,MAAM;KACxC,CAAC;IAEF,OAAO,iBAAiB,CAAC;AAC3B,CAAC
|
|
1
|
+
{"version":3,"file":"chromeDiagnostics.js","sourceRoot":"","sources":["../../src/utils/chromeDiagnostics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,iBAAiB,CAAC;AAWlD;;GAEG;AACH,IAAI,iBAAiB,GAA6B,IAAI,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB;IAClC,IAAI,iBAAiB,EAAE,CAAC;QACtB,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IAED,IAAI,WAAW,GAAkB,IAAI,CAAC;IACtC,IAAI,CAAC;QACH,WAAW,GAAG,cAAc,CAAC,aAAa,EAAE,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,+CAA+C;IACjD,CAAC;IAED,IAAI,aAAa,GAAa,EAAE,CAAC;IACjC,IAAI,CAAC;QACH,aAAa,GAAG,cAAc,CAAC,QAAQ,CAAC,gBAAgB,EAAE,CAAC;IAC7D,CAAC;IAAC,MAAM,CAAC;QACP,oDAAoD;IACtD,CAAC;IAED,iBAAiB,GAAG;QAClB,WAAW;QACX,aAAa;QACb,iBAAiB,EAAE,aAAa,CAAC,MAAM;KACxC,CAAC;IAEF,OAAO,iBAAiB,CAAC;AAC3B,CAAC"}
|
package/dist/utils/http.d.ts
CHANGED
package/dist/utils/http.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["../../src/utils/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGlE;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAe,gBAAgB;IACnE,IAAI,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,UAAU,cAAc,IAAI,IAAI,YAAY,CAAC,CAAC;QAC3E,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;YACjB,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAgB,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,QAAgB,EAChB,OAAe,gBAAgB;IAE/B,MAAM,OAAO,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,CAAC;IAC5C,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,QAAQ,CAAC,IAAI,IAAI,CAAC;AACxD,CAAC"}
|
package/dist/utils/logger.d.ts
CHANGED
|
@@ -1,42 +1,98 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Logging utilities for consistent formatted output.
|
|
2
|
+
* Logging utilities for consistent formatted output with log level support.
|
|
3
3
|
*
|
|
4
|
-
* WHY: Centralizes log formatting
|
|
4
|
+
* WHY: Centralizes log formatting and enables debug mode for verbose logging.
|
|
5
|
+
* By default, only 'info' level logs are shown. Set BDG_DEBUG=1 or use --debug
|
|
6
|
+
* flag to enable verbose 'debug' level logs.
|
|
5
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* Enable debug logging globally.
|
|
10
|
+
*
|
|
11
|
+
* This is typically called during CLI initialization when --debug flag is detected.
|
|
12
|
+
* Debug mode shows all logs including verbose internal state changes and tracing.
|
|
13
|
+
*/
|
|
14
|
+
export declare function enableDebugLogging(): void;
|
|
15
|
+
/**
|
|
16
|
+
* Check if debug logging is currently enabled.
|
|
17
|
+
*
|
|
18
|
+
* @returns True if debug mode is active
|
|
19
|
+
*/
|
|
20
|
+
export declare function isDebugEnabled(): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Log level determines visibility of log messages.
|
|
23
|
+
*
|
|
24
|
+
* - 'info': Always shown (important user-facing messages, errors, key milestones)
|
|
25
|
+
* - 'debug': Only shown in debug mode (verbose internal state, IPC traces, progress updates)
|
|
26
|
+
*/
|
|
27
|
+
export type LogLevel = 'info' | 'debug';
|
|
6
28
|
/**
|
|
7
29
|
* Log contexts for different components.
|
|
8
30
|
* Used to prefix log messages with component name.
|
|
9
31
|
*/
|
|
10
32
|
export type LogContext = 'bdg' | 'launcher' | 'daemon' | 'worker' | 'client' | 'cleanup' | 'session' | 'chrome' | 'cdp' | 'ipc';
|
|
11
33
|
/**
|
|
12
|
-
*
|
|
34
|
+
* Logger instance with support for different log levels.
|
|
35
|
+
*/
|
|
36
|
+
export interface Logger {
|
|
37
|
+
/**
|
|
38
|
+
* Log an info message (always shown).
|
|
39
|
+
* Use for important user-facing messages and key milestones.
|
|
40
|
+
*/
|
|
41
|
+
info: (message: string) => void;
|
|
42
|
+
/**
|
|
43
|
+
* Log a debug message (only shown in debug mode).
|
|
44
|
+
* Use for verbose internal state, progress updates, and traces.
|
|
45
|
+
*/
|
|
46
|
+
debug: (message: string) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Log a message (defaults to info level).
|
|
49
|
+
* Provided for backward compatibility.
|
|
50
|
+
*/
|
|
51
|
+
(message: string): void;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Create a logger instance for a specific context.
|
|
13
55
|
*
|
|
14
|
-
* WHY: Provides consistent log formatting with context prefix.
|
|
56
|
+
* WHY: Provides consistent log formatting with context prefix and level support.
|
|
57
|
+
* By default, ALL logs are hidden unless --debug flag or BDG_DEBUG=1 is set.
|
|
58
|
+
* This keeps normal output clean and only shows logs when debugging.
|
|
15
59
|
*
|
|
16
60
|
* @param context - Component context for log prefix
|
|
17
|
-
* @returns Logger
|
|
61
|
+
* @returns Logger instance with info/debug methods
|
|
18
62
|
*
|
|
19
63
|
* @example
|
|
20
64
|
* ```typescript
|
|
21
65
|
* const log = createLogger('cleanup');
|
|
22
|
-
*
|
|
23
|
-
* //
|
|
66
|
+
*
|
|
67
|
+
* // Always shown (even without --debug)
|
|
68
|
+
* log.info('Cleaned up stale session files');
|
|
69
|
+
*
|
|
70
|
+
* // Only shown in debug mode (--debug or BDG_DEBUG=1)
|
|
71
|
+
* log.debug('Checking PID file at ~/.bdg/daemon.pid');
|
|
72
|
+
*
|
|
73
|
+
* // Backward compatible (treated as debug - only shown in debug mode)
|
|
74
|
+
* log('Daemon started successfully');
|
|
24
75
|
* ```
|
|
25
76
|
*/
|
|
26
|
-
export declare function createLogger(context: LogContext):
|
|
77
|
+
export declare function createLogger(context: LogContext): Logger;
|
|
27
78
|
/**
|
|
28
79
|
* Log a message with a specific context (one-off usage).
|
|
29
80
|
*
|
|
30
|
-
* WHY: Convenient for single log statements without creating a logger
|
|
81
|
+
* WHY: Convenient for single log statements without creating a logger instance.
|
|
31
82
|
*
|
|
32
83
|
* @param context - Component context for log prefix
|
|
33
84
|
* @param message - Log message
|
|
85
|
+
* @param level - Log level (defaults to 'debug' - only shown with --debug)
|
|
34
86
|
*
|
|
35
87
|
* @example
|
|
36
88
|
* ```typescript
|
|
37
|
-
*
|
|
38
|
-
*
|
|
89
|
+
* // Always shown (even without --debug)
|
|
90
|
+
* log('cleanup', 'Removed stale daemon socket', 'info');
|
|
91
|
+
*
|
|
92
|
+
* // Only shown in debug mode (default behavior)
|
|
93
|
+
* log('cleanup', 'Found PID file');
|
|
94
|
+
* log('cleanup', 'Checking lock file', 'debug');
|
|
39
95
|
* ```
|
|
40
96
|
*/
|
|
41
|
-
export declare function log(context: LogContext, message: string): void;
|
|
97
|
+
export declare function log(context: LogContext, message: string, level?: LogLevel): void;
|
|
42
98
|
//# sourceMappingURL=logger.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAExC;AAMD;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAExC;;;GAGG;AACH,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,GACR,KAAK,GACL,KAAK,CAAC;AAMV;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB;;;OAGG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEhC;;;OAGG;IACH,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAEjC;;;OAGG;IACH,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAMD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAaxD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,GAAE,QAAkB,GAAG,IAAI,CAKzF"}
|
package/dist/utils/logger.js
CHANGED
|
@@ -1,43 +1,93 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Logging utilities for consistent formatted output.
|
|
2
|
+
* Logging utilities for consistent formatted output with log level support.
|
|
3
3
|
*
|
|
4
|
-
* WHY: Centralizes log formatting
|
|
4
|
+
* WHY: Centralizes log formatting and enables debug mode for verbose logging.
|
|
5
|
+
* By default, only 'info' level logs are shown. Set BDG_DEBUG=1 or use --debug
|
|
6
|
+
* flag to enable verbose 'debug' level logs.
|
|
5
7
|
*/
|
|
8
|
+
// ============================================================================
|
|
9
|
+
// Global Debug State
|
|
10
|
+
// ============================================================================
|
|
11
|
+
let debugEnabled = false;
|
|
6
12
|
/**
|
|
7
|
-
*
|
|
13
|
+
* Enable debug logging globally.
|
|
8
14
|
*
|
|
9
|
-
*
|
|
15
|
+
* This is typically called during CLI initialization when --debug flag is detected.
|
|
16
|
+
* Debug mode shows all logs including verbose internal state changes and tracing.
|
|
17
|
+
*/
|
|
18
|
+
export function enableDebugLogging() {
|
|
19
|
+
debugEnabled = true;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Check if debug logging is currently enabled.
|
|
23
|
+
*
|
|
24
|
+
* @returns True if debug mode is active
|
|
25
|
+
*/
|
|
26
|
+
export function isDebugEnabled() {
|
|
27
|
+
return debugEnabled || process.env['BDG_DEBUG'] === '1';
|
|
28
|
+
}
|
|
29
|
+
// ============================================================================
|
|
30
|
+
// Logger Implementation
|
|
31
|
+
// ============================================================================
|
|
32
|
+
/**
|
|
33
|
+
* Create a logger instance for a specific context.
|
|
34
|
+
*
|
|
35
|
+
* WHY: Provides consistent log formatting with context prefix and level support.
|
|
36
|
+
* By default, ALL logs are hidden unless --debug flag or BDG_DEBUG=1 is set.
|
|
37
|
+
* This keeps normal output clean and only shows logs when debugging.
|
|
10
38
|
*
|
|
11
39
|
* @param context - Component context for log prefix
|
|
12
|
-
* @returns Logger
|
|
40
|
+
* @returns Logger instance with info/debug methods
|
|
13
41
|
*
|
|
14
42
|
* @example
|
|
15
43
|
* ```typescript
|
|
16
44
|
* const log = createLogger('cleanup');
|
|
17
|
-
*
|
|
18
|
-
* //
|
|
45
|
+
*
|
|
46
|
+
* // Always shown (even without --debug)
|
|
47
|
+
* log.info('Cleaned up stale session files');
|
|
48
|
+
*
|
|
49
|
+
* // Only shown in debug mode (--debug or BDG_DEBUG=1)
|
|
50
|
+
* log.debug('Checking PID file at ~/.bdg/daemon.pid');
|
|
51
|
+
*
|
|
52
|
+
* // Backward compatible (treated as debug - only shown in debug mode)
|
|
53
|
+
* log('Daemon started successfully');
|
|
19
54
|
* ```
|
|
20
55
|
*/
|
|
21
56
|
export function createLogger(context) {
|
|
22
|
-
|
|
57
|
+
const logMessage = (message, level = 'debug') => {
|
|
58
|
+
if (level === 'debug' && !isDebugEnabled()) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
23
61
|
console.error(`[${context}] ${message}`);
|
|
24
62
|
};
|
|
63
|
+
const logger = ((message) => logMessage(message, 'debug'));
|
|
64
|
+
logger.info = (message) => logMessage(message, 'info');
|
|
65
|
+
logger.debug = (message) => logMessage(message, 'debug');
|
|
66
|
+
return logger;
|
|
25
67
|
}
|
|
26
68
|
/**
|
|
27
69
|
* Log a message with a specific context (one-off usage).
|
|
28
70
|
*
|
|
29
|
-
* WHY: Convenient for single log statements without creating a logger
|
|
71
|
+
* WHY: Convenient for single log statements without creating a logger instance.
|
|
30
72
|
*
|
|
31
73
|
* @param context - Component context for log prefix
|
|
32
74
|
* @param message - Log message
|
|
75
|
+
* @param level - Log level (defaults to 'debug' - only shown with --debug)
|
|
33
76
|
*
|
|
34
77
|
* @example
|
|
35
78
|
* ```typescript
|
|
36
|
-
*
|
|
37
|
-
*
|
|
79
|
+
* // Always shown (even without --debug)
|
|
80
|
+
* log('cleanup', 'Removed stale daemon socket', 'info');
|
|
81
|
+
*
|
|
82
|
+
* // Only shown in debug mode (default behavior)
|
|
83
|
+
* log('cleanup', 'Found PID file');
|
|
84
|
+
* log('cleanup', 'Checking lock file', 'debug');
|
|
38
85
|
* ```
|
|
39
86
|
*/
|
|
40
|
-
export function log(context, message) {
|
|
87
|
+
export function log(context, message, level = 'debug') {
|
|
88
|
+
if (level === 'debug' && !isDebugEnabled()) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
41
91
|
console.error(`[${context}] ${message}`);
|
|
42
92
|
}
|
|
43
93
|
//# sourceMappingURL=logger.js.map
|
package/dist/utils/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,IAAI,YAAY,GAAG,KAAK,CAAC;AAEzB;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;IAChC,YAAY,GAAG,IAAI,CAAC;AACtB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,GAAG,CAAC;AAC1D,CAAC;AAyDD,+EAA+E;AAC/E,wBAAwB;AACxB,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,YAAY,CAAC,OAAmB;IAC9C,MAAM,UAAU,GAAG,CAAC,OAAe,EAAE,QAAkB,OAAO,EAAQ,EAAE;QACtE,IAAI,KAAK,KAAK,OAAO,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;YAC3C,OAAO;QACT,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC,CAAC;IAEF,MAAM,MAAM,GAAG,CAAC,CAAC,OAAe,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAW,CAAC;IAC7E,MAAM,CAAC,IAAI,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC/D,MAAM,CAAC,KAAK,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAEjE,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,GAAG,CAAC,OAAmB,EAAE,OAAe,EAAE,QAAkB,OAAO;IACjF,IAAI,KAAK,KAAK,OAAO,IAAI,CAAC,cAAc,EAAE,EAAE,CAAC;QAC3C,OAAO;IACT,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Smart page readiness detection using self-tuning thresholds
|
|
3
|
+
*
|
|
4
|
+
* This module provides adaptive page load detection that works for any page type
|
|
5
|
+
* without configuration. It uses a three-phase approach:
|
|
6
|
+
* 1. Load event (baseline readiness)
|
|
7
|
+
* 2. Network stability (adapts to request patterns)
|
|
8
|
+
* 3. DOM stability (adapts to mutation rate)
|
|
9
|
+
*/
|
|
10
|
+
import type { CDPConnection } from '../connection/cdp.js';
|
|
11
|
+
/**
|
|
12
|
+
* Options for page readiness detection
|
|
13
|
+
*/
|
|
14
|
+
export interface PageReadinessOptions {
|
|
15
|
+
/**
|
|
16
|
+
* Maximum wait time before proceeding anyway
|
|
17
|
+
* Default: 2000ms (2 seconds)
|
|
18
|
+
*/
|
|
19
|
+
maxWaitMs?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Wait for network and DOM stability after load event
|
|
22
|
+
* Default: false (load event is sufficient for most pages)
|
|
23
|
+
* Enable for SPAs with heavy post-load hydration
|
|
24
|
+
*/
|
|
25
|
+
waitForStability?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Wait for page to be ready using self-tuning detection
|
|
29
|
+
*
|
|
30
|
+
* Strategy:
|
|
31
|
+
* 1. Wait for load event (baseline)
|
|
32
|
+
* 2. Wait for network to stabilize (adaptive)
|
|
33
|
+
* 3. Wait for DOM to stabilize (adaptive)
|
|
34
|
+
*
|
|
35
|
+
* All thresholds adapt to observed page behavior.
|
|
36
|
+
* No framework detection, no configuration needed.
|
|
37
|
+
*
|
|
38
|
+
* @param cdp - CDP connection
|
|
39
|
+
* @param options - Optional configuration
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* ```typescript
|
|
43
|
+
* // Default: Self-tuning for any page
|
|
44
|
+
* await waitForPageReady(cdp);
|
|
45
|
+
*
|
|
46
|
+
* // Custom timeout for slow apps
|
|
47
|
+
* await waitForPageReady(cdp, { maxWaitMs: 60000 });
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
export declare function waitForPageReady(cdp: CDPConnection, options?: PageReadinessOptions): Promise<void>;
|
|
51
|
+
//# sourceMappingURL=pageReadiness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageReadiness.d.ts","sourceRoot":"","sources":["../../src/utils/pageReadiness.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,aAAa,EAClB,OAAO,GAAE,oBAAyB,GACjC,OAAO,CAAC,IAAI,CAAC,CAwBf"}
|